From 6f01f890abbdad17322eb823808640f247a96e06 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 18 May 2022 15:34:00 -0400 Subject: [PATCH] CSR-584: fix indentation --- .../textbox-question/textbox-question.vue | 176 +++++++++--------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/src/common-components/textbox-question/textbox-question.vue b/src/common-components/textbox-question/textbox-question.vue index 1c92c6b82..31437b8b9 100644 --- a/src/common-components/textbox-question/textbox-question.vue +++ b/src/common-components/textbox-question/textbox-question.vue @@ -17,8 +17,8 @@ autocomplete="do-not-autofill" :class="[hasIcon ? 'has-icon' : '', iconRight ? 'icon-right' : '']" :validationRules="validationRules" - @change="handleChange" - @blur="handleChange" + @change="handleChange" + @blur="handleChange" />
{{ errorMessage }} @@ -30,36 +30,36 @@ import { useField, validate } from "vee-validate"; export default { - name: "textbox-question", - props: { - type: { - type: String, - default: "text", - }, - placeholderText: { - type: String, - default: "", - }, - modelValue: String, - inputId: String, - isDisabled: Boolean, - isRequired: Boolean, - disableAutoFill: Boolean, - hasIcon: Boolean, // If input has an icon - iconRight: Boolean, // Place icon on right side of text input, otherwise default is left if hasIcon prop is used - hasError: Boolean, - mask: { - type: String, - default: "", - }, - validationRules: String, - semiAggressiveValidation: Boolean, - cmsWidgetName: String, - }, - setup(props) { - const propsClone = Object.assign({}, props); - const modelValue = propsClone.modelValue; - let initialValue; + name: "textbox-question", + props: { + type: { + type: String, + default: "text", + }, + placeholderText: { + type: String, + default: "", + }, + modelValue: String, + inputId: String, + isDisabled: Boolean, + isRequired: Boolean, + disableAutoFill: Boolean, + hasIcon: Boolean, // If input has an icon + iconRight: Boolean, // Place icon on right side of text input, otherwise default is left if hasIcon prop is used + hasError: Boolean, + mask: { + type: String, + default: "", + }, + validationRules: String, + semiAggressiveValidation: Boolean, + cmsWidgetName: String, + }, + setup(props) { + const propsClone = Object.assign({}, props); + const modelValue = propsClone.modelValue; + let initialValue; switch (typeof modelValue) { case "number": @@ -76,65 +76,65 @@ export default { initialValue: initialValue, }; - const { errorMessage, handleBlur, handleChange, meta, validate, errors } = - useField(props.inputId, props.validationRules, fieldOptions); + const { errorMessage, handleBlur, handleChange, meta, validate, errors } = + useField(props.inputId, props.validationRules, fieldOptions); - return { - errorMessage, - handleBlur, - handleChange, - validate, - meta, - errors, - }; - }, - computed: { - questionText() { - return this.getCmsContent(this.cmsWidgetName, "QuestionText"); - }, - value: { - get: function () { - return this.modelValue; - }, - set: function (newValue) { - this.$emit("update:modelValue", newValue); - }, - }, - labelText: { - get: function () { - const noBreakChar = "⁠"; - var questionText = ""; - if (this.disableAutoFill) { - var words = this.questionText.toString().split(/[ ]+/); - words.forEach(function (word) { - const position = 1; - word = [ - word.toString().slice(0, position), - noBreakChar, - word.toString().slice(position), - ].join(""); - questionText += `${word} `; - }); + return { + errorMessage, + handleBlur, + handleChange, + validate, + meta, + errors, + }; + }, + computed: { + questionText() { + return this.getCmsContent(this.cmsWidgetName, "QuestionText"); + }, + value: { + get: function () { + return this.modelValue; + }, + set: function (newValue) { + this.$emit("update:modelValue", newValue); + }, + }, + labelText: { + get: function () { + const noBreakChar = "⁠"; + var questionText = ""; + if (this.disableAutoFill) { + var words = this.questionText.toString().split(/[ ]+/); + words.forEach(function (word) { + const position = 1; + word = [ + word.toString().slice(0, position), + noBreakChar, + word.toString().slice(position), + ].join(""); + questionText += `${word} `; + }); - questionText = questionText.trimEnd(); - } else { - questionText = this.questionText.toString(); - } + questionText = questionText.trimEnd(); + } else { + questionText = this.questionText.toString(); + } - return questionText; - }, - }, - }, - watch: { - async value(newValue) { - if (this.semiAggressiveValidation) { - const result = await validate(newValue, this.validationRules); // do a test validation check, without triggering full validation - if (result.valid) { - this.handleChange(newValue); // trigger full validation on this field only - } - } - }, - }, + return questionText; + }, + }, + }, + watch: { + async value(newValue) { + if (this.semiAggressiveValidation) { + const result = await validate(newValue, this.validationRules); // do a test validation check, without triggering full validation + if (result.valid) { + this.handleChange(newValue); // trigger full validation on this field only + } + } + }, + }, };