Removed all unused 'disableAutoFill' code
This commit is contained in:
parent
38b346a05e
commit
21517e45a7
11 changed files with 6 additions and 92 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
:for="inputId"
|
:for="inputId"
|
||||||
:aria-label="questionText"
|
:aria-label="questionText"
|
||||||
class="form-label"
|
class="form-label"
|
||||||
v-html="labelText"></label>
|
v-html="questionText"></label>
|
||||||
<select
|
<select
|
||||||
v-model="selectedOption"
|
v-model="selectedOption"
|
||||||
class="form-select"
|
class="form-select"
|
||||||
|
|
@ -35,14 +35,13 @@ export default {
|
||||||
name: "dropdown-question",
|
name: "dropdown-question",
|
||||||
props: {
|
props: {
|
||||||
modelValue: String,
|
modelValue: String,
|
||||||
//inputId: String,
|
customInputId: String,
|
||||||
options: {
|
options: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
isDisabled: Boolean,
|
isDisabled: Boolean,
|
||||||
isRequired: Boolean,
|
isRequired: Boolean,
|
||||||
disableAutoFill: Boolean,
|
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
hasError: Boolean,
|
hasError: Boolean,
|
||||||
|
|
@ -99,30 +98,6 @@ export default {
|
||||||
this.$emit("update:modelValue", 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
return questionText;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedOption(newValue) {
|
selectedOption(newValue) {
|
||||||
|
|
|
||||||
|
|
@ -73,24 +73,6 @@ describe("textboxQuestion.vue", () => {
|
||||||
expect(paragraph.attributes("class")).toContain("form-control");
|
expect(paragraph.attributes("class")).toContain("form-control");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should render the 'questionText' data value as the label text when disableAutoFill is false.", async () => {
|
|
||||||
// Arrange
|
|
||||||
const wrapper = shallowMount(textboxQuestion, {
|
|
||||||
global: {
|
|
||||||
directives: {
|
|
||||||
maska: maska,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mixins: [mockMixin],
|
|
||||||
});
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const label = wrapper.find("label");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(label.text()).toContain(questionText);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Should return input id as the id of the input field", async () => {
|
it("Should return input id as the id of the input field", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(textboxQuestion, {
|
const wrapper = shallowMount(textboxQuestion, {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
iconRight ? 'icon-right' : '',
|
iconRight ? 'icon-right' : '',
|
||||||
cornerStyle === 'rounded' ? 'rounded-pill' : '',
|
cornerStyle === 'rounded' ? 'rounded-pill' : '',
|
||||||
]"
|
]"
|
||||||
:autocomplete="preventAutoFill && 'do-not-autofill'"
|
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
@blur="handleChange"
|
@blur="handleChange"
|
||||||
|
|
@ -42,7 +41,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useField, validate } from "vee-validate";
|
import { useField, validate } from "vee-validate";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "textbox-question",
|
name: "textbox-question",
|
||||||
|
|
@ -70,14 +68,12 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
handleOnInput: Boolean,
|
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
maxLength: String,
|
maxLength: String,
|
||||||
questionAlignment: String, // Left or center. Left is default.
|
questionAlignment: String, // Left or center. Left is default.
|
||||||
cornerStyle: String, // Rounded or square. Square is default.
|
cornerStyle: String, // Rounded or square. Square is default.
|
||||||
includeSearchIcon: Boolean,
|
includeSearchIcon: Boolean,
|
||||||
preventAutoFill: Boolean,
|
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId;
|
const inputId = !props.customInputId ? `input-${crypto.randomUUID()}` : props.customInputId;
|
||||||
|
|
@ -129,30 +125,6 @@ export default {
|
||||||
this.$emit("update:modelValue", 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();
|
|
||||||
}
|
|
||||||
|
|
||||||
return questionText;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
async value(newValue) {
|
async value(newValue) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
placeholderText="Search"
|
placeholderText="Search"
|
||||||
aria-haspopup=""
|
aria-haspopup=""
|
||||||
hasIcon
|
hasIcon
|
||||||
disableAutoFill
|
|
||||||
validationRules="street-address-required"
|
validationRules="street-address-required"
|
||||||
@keydown.enter.prevent />
|
@keydown.enter.prevent />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -56,7 +55,6 @@
|
||||||
v-model="addressModel.zipCode"
|
v-model="addressModel.zipCode"
|
||||||
ref="zipCode"
|
ref="zipCode"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
disableAutoFill
|
|
||||||
validationRules="zip-code-required|zip-code-format" />
|
validationRules="zip-code-required|zip-code-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
v-model="customerModel.firstName"
|
v-model="customerModel.firstName"
|
||||||
ref="firstName"
|
ref="firstName"
|
||||||
inputId="08497a2efd9a4a73a70360ab47b4838d"
|
inputId="08497a2efd9a4a73a70360ab47b4838d"
|
||||||
disableAutoFill
|
|
||||||
validationRules="first-name-required" />
|
validationRules="first-name-required" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -18,7 +17,6 @@
|
||||||
v-model="customerModel.lastName"
|
v-model="customerModel.lastName"
|
||||||
ref="lastName"
|
ref="lastName"
|
||||||
inputId="0030e56a57e74a4ab92de7fb8e97fec5"
|
inputId="0030e56a57e74a4ab92de7fb8e97fec5"
|
||||||
disableAutoFill
|
|
||||||
validationRules="last-name-required" />
|
validationRules="last-name-required" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -29,7 +27,6 @@
|
||||||
v-model="customerModel.emailAddress"
|
v-model="customerModel.emailAddress"
|
||||||
ref="emailAddress"
|
ref="emailAddress"
|
||||||
inputId="00450a91b8964a768ce3992e6feb890f"
|
inputId="00450a91b8964a768ce3992e6feb890f"
|
||||||
disableAutoFill
|
|
||||||
validationRules="email-address-required|email-address-format" />
|
validationRules="email-address-required|email-address-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
inputId="serviceZipCode"
|
inputId="serviceZipCode"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
|
||||||
validationRules="zip-required|zip-format" />
|
validationRules="zip-required|zip-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,7 +44,6 @@
|
||||||
v-model="emailAddress"
|
v-model="emailAddress"
|
||||||
inputId="emailAddress"
|
inputId="emailAddress"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
|
||||||
validationRules="email-address-required|email-address-format" />
|
validationRules="email-address-required|email-address-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ import alert from "@/ux-components/alert/alert";
|
||||||
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
||||||
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
||||||
import textBlock from "@/digital-components/text-block/text-block";
|
import textBlock from "@/digital-components/text-block/text-block";
|
||||||
import { useForm } from "vee-validate";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "mobile-location-modal-questions",
|
name: "mobile-location-modal-questions",
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,8 @@ export default {
|
||||||
name: "service-location",
|
name: "service-location",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// serviceState: "",
|
isZipServiceableMobile: null,
|
||||||
// serviceZipCode: "",
|
isZipServiceableInShop: null,
|
||||||
// isServiceable: null,
|
|
||||||
// isVehicleProtected: null,
|
|
||||||
// isZipServiceableMobile: null,
|
|
||||||
// isZipServiceableInShop: null,
|
|
||||||
serviceZipCodeQuestion: {
|
serviceZipCodeQuestion: {
|
||||||
state: "",
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ export default {
|
||||||
|
|
||||||
// Notify the page that the service zip has been updated to clear Mobile Location form
|
// Notify the page that the service zip has been updated to clear Mobile Location form
|
||||||
this.$emit("service-zip-updated");
|
this.$emit("service-zip-updated");
|
||||||
|
|
||||||
// Update the page level model
|
// Update the page level model
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
this.$emit("update:modelValue", this.internalModel);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
v-model="value"
|
v-model="value"
|
||||||
inputId="serviceZipCode"
|
inputId="serviceZipCode"
|
||||||
questionAlignment="center"
|
questionAlignment="center"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
:displayQuestionText="false"
|
:displayQuestionText="false"
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="zip-required|zip-format" />
|
validationRules="zip-required|zip-format" />
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
v-model="vin"
|
v-model="vin"
|
||||||
inputId="vin"
|
inputId="vin"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
|
||||||
validationRules="vin-required|vin-format"
|
validationRules="vin-required|vin-format"
|
||||||
:isDisabled="vinPopulatedOnPageLoad"
|
:isDisabled="vinPopulatedOnPageLoad"
|
||||||
maxLength="17"
|
maxLength="17"
|
||||||
|
|
@ -35,7 +34,6 @@
|
||||||
inputId="serviceZipCode"
|
inputId="serviceZipCode"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
|
||||||
validationRules="zip-required|zip-format" />
|
validationRules="zip-required|zip-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -46,7 +44,6 @@
|
||||||
v-model="emailAddress"
|
v-model="emailAddress"
|
||||||
inputId="emailAddress"
|
inputId="emailAddress"
|
||||||
isRequired
|
isRequired
|
||||||
disableAutoFill
|
|
||||||
validationRules="email-address-required|email-address-format" />
|
validationRules="email-address-required|email-address-format" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue