diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 066b06a2..d3cd1db5 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -61,7 +61,9 @@ :setLastValuePushedToGa="setLastValuePushedToGa" :suppressError="suppressError" /> - +
+
@@ -96,16 +100,16 @@ export default { listCard, ErrorMessage, radio, - providerPrefRadio, + providerPrefRadio }, props: { buttonTypeString: { type: String, - default: 'listButton', + default: 'listButton' }, buttonTypeObject: { type: Object, - default: null, + default: null }, isMultiSelect: Boolean, groupName: String, @@ -113,16 +117,16 @@ export default { answers: Array, textPosition: { type: String, - default: 'text-center', + default: 'text-center' }, selectingInitiatesLoad: Boolean, loaderColor: { type: String, - default: 'blue', + default: 'blue' }, loaderPosition: { type: String, - default: 'right', + default: 'right' }, isRequired: Boolean, isOverflowScrollable: Boolean, @@ -137,7 +141,7 @@ export default { additionalButtonData: Object, additionalButtonStyling: String, isSmallQuestionText: Boolean, - isSmallQuestionLabelText: Boolean, + isSmallQuestionLabelText: Boolean }, emits: ['update:modelValue'], setup(props) { @@ -146,7 +150,7 @@ export default { const fieldOptions = { value: modelValue, - initialValue: null, + initialValue: null }; const { @@ -156,7 +160,7 @@ export default { meta, validate, errors, - resetField, + resetField } = useField(props.groupName, props.validationRules, fieldOptions); return { @@ -166,12 +170,12 @@ export default { validate, meta, errors, - resetField, + resetField }; }, data() { return { - lastValuePushedToGa: null, + lastValuePushedToGa: null }; }, computed: { @@ -180,8 +184,8 @@ export default { const baseClasses = this.isOverflowScrollable ? 'container-fluid overflow-scroll position-absolute px-5 pt-1 py-0' : this.buttonTypeString === 'listCard' - ? 'w-100' - : ''; + ? 'w-100' + : ''; const SmallQuestionTextClass = this.isSmallQuestionText ? `${baseClasses}small-question-text` @@ -241,15 +245,15 @@ export default { // Determine number of buttons and add class accordingly. // This is to accommodate unique spacing per design specs. if ( - this.buttonTypeString === 'listCard' && - this.buttonsInfo.length > 2 + this.buttonTypeString === 'listCard' + && this.buttonsInfo.length > 2 ) { classes += ' two-list-card-width'; } if ( - this.buttonTypeString === 'listCard' && - this.buttonsInfo.length === 1 + this.buttonTypeString === 'listCard' + && this.buttonsInfo.length === 1 ) { classes += ' one-list-card-width'; } @@ -257,31 +261,29 @@ export default { return classes; }, buttonsInfo() { - return (Array.isArray(this.answers) ? this.answers : [])?.map( - (answer) => ({ - buttonLabel: answer.buttonLabel ?? answer.Text ?? answer, - altText: + return (Array.isArray(this.answers) ? this.answers : [])?.map((answer) => ({ + buttonLabel: answer.buttonLabel ?? answer.Text ?? answer, + altText: answer.altText ?? (answer.Name ? answer.Name : answer), - buttonLabelSubCopy: + buttonLabelSubCopy: answer.buttonLabelSubCopy ?? answer.SubText, - buttonBodyCopy: + buttonBodyCopy: answer.buttonBodyCopy ?? answer.buttonBodyCopy, - buttonAuxiliaryCopy: - answer.buttonAuxiliaryCopy ?? - answer.buttonAuxiliaryCopy, - buttonFooterCopy: + buttonAuxiliaryCopy: + answer.buttonAuxiliaryCopy + ?? answer.buttonAuxiliaryCopy, + buttonFooterCopy: answer.buttonFooterCopy ?? answer.buttonFooterCopy, - buttonImage: answer.buttonImage ?? answer.AnswerImageUrl, - buttonImageId: answer.buttonImageId ?? answer.ImageId, - groupName: this.formatString(this.groupName), - value: - answer.value ?? - (this.useTextForValue && answer.Text + buttonImage: answer.buttonImage ?? answer.AnswerImageUrl, + buttonImageId: answer.buttonImageId ?? answer.ImageId, + groupName: this.formatString(this.groupName), + value: + answer.value + ?? (this.useTextForValue && answer.Text ? answer.Text - : answer.Name) ?? - (typeof answer !== 'object' ? answer : null), - }) - ); + : answer.Name) + ?? (typeof answer !== 'object' ? answer : null) + })); }, selectedValues: { get() { @@ -289,15 +291,15 @@ export default { }, set(selectedAnswers) { this.$emit('update:modelValue', selectedAnswers); - }, - }, + } + } }, watch: { modelValue(newValue) { this.resetField({ - value: newValue, + value: newValue }); - }, + } }, beforeMount() { if (this.buttonTypeObject) { @@ -307,7 +309,7 @@ export default { }, beforeUnmount() { this.resetField({ - value: '', + value: '' }); }, methods: { @@ -316,8 +318,8 @@ export default { }, setLastValuePushedToGa(lastValuePushedToGa) { this.lastValuePushedToGa = lastValuePushedToGa; - }, - }, + } + } }; @@ -338,7 +340,7 @@ export default { line-height: 1.625rem; & > span { - text-align: center; + text-align: left; } } diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 8d96aad9..78524cef 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -26,7 +26,7 @@ @mousedown="closeModal" @keypress.space="closeModal"> -