comand-component-library 4.2.81 → 4.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/ComponentLibrary.vue
CHANGED
|
@@ -1378,13 +1378,21 @@
|
|
|
1378
1378
|
</template>
|
|
1379
1379
|
<template v-slot:page-5="props">
|
|
1380
1380
|
<h3>Page 5</h3>
|
|
1381
|
-
<CmdForm
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1381
|
+
<CmdForm
|
|
1382
|
+
:cmdHeadline=" { headlineText: 'Confirmation', headlineLevel: 3 }"
|
|
1383
|
+
>
|
|
1384
|
+
<CmdFormElement
|
|
1385
|
+
element="input"
|
|
1386
|
+
type="checkbox"
|
|
1387
|
+
labelText="Confirm data privacy:"
|
|
1388
|
+
name="confirm-data-privacy"
|
|
1389
|
+
id="confirm-data-privac"
|
|
1390
|
+
:required="true"
|
|
1391
|
+
:modelValue="props.formDataForPage['confirm-data-privacy']"
|
|
1392
|
+
@update:modelValue="setValue($event, 'confirm-data-privacy', props)"
|
|
1393
|
+
@validation-status-change="setValidationStatusCheckbox($event, 'confirm-data-privacy', props)"
|
|
1394
|
+
/>
|
|
1395
|
+
</CmdForm>
|
|
1388
1396
|
props.atleastOnPageWithError: {{ props.atleastOnePageWithError }}
|
|
1389
1397
|
</template>
|
|
1390
1398
|
<twmplate>
|
|
@@ -2014,6 +2022,7 @@ export default {
|
|
|
2014
2022
|
inputFieldPattern: "",
|
|
2015
2023
|
inputSearch: "",
|
|
2016
2024
|
textarea: "",
|
|
2025
|
+
formElementsWithErrorPageConfirm: ["confirm-data-privacy"],
|
|
2017
2026
|
inputGroupRadio: "radiobuttonValue1",
|
|
2018
2027
|
inputGroup: "website",
|
|
2019
2028
|
inputGroupValueReplaceInputTypeRadio: "phone",
|
|
@@ -2207,6 +2216,16 @@ export default {
|
|
|
2207
2216
|
const status = this.formElementsWithError.length > 0 ? "error" : "success"
|
|
2208
2217
|
this.toggleSystemMessage(status, props)
|
|
2209
2218
|
},
|
|
2219
|
+
setValidationStatusCheckbox(event, itemName, props) {
|
|
2220
|
+
console.log("event", event)
|
|
2221
|
+
if (event === "error" && !this.formElementsWithErrorPageConfirm.some(entry => entry.name === itemName)) {
|
|
2222
|
+
this.formElementsWithErrorPageConfirm.push(itemName)
|
|
2223
|
+
} else if (event === "success" && this.formElementsWithErrorPageConfirm.includes(itemName)) {
|
|
2224
|
+
this.formElementsWithErrorPageConfirm = this.formElementsWithErrorPageConfirm.filter((element) => element !== itemName)
|
|
2225
|
+
}
|
|
2226
|
+
const status = this.formElementsWithErrorPageConfirm.length > 0 ? "error" : "success"
|
|
2227
|
+
this.toggleSystemMessage(status, props)
|
|
2228
|
+
},
|
|
2210
2229
|
outputFormData(event) {
|
|
2211
2230
|
console.log("outputFormData", event)
|
|
2212
2231
|
},
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
v-bind="elementAttributes"
|
|
135
135
|
@change="onChange"
|
|
136
136
|
@blur="onBlur"
|
|
137
|
+
@input="onInput"
|
|
137
138
|
:checked="isChecked"
|
|
138
139
|
:value="inputValue"
|
|
139
140
|
:class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType}]"
|
|
@@ -852,9 +853,9 @@ export default {
|
|
|
852
853
|
const value = event.target.value
|
|
853
854
|
|
|
854
855
|
// if input is filled, set status to success (expect for checkboxes and radiobuttons)
|
|
855
|
-
if (!["checkbox", "radio"].includes(this.$attrs.type) && value) {
|
|
856
|
+
//if (!["checkbox", "radio"].includes(this.$attrs.type) && value) {
|
|
856
857
|
this.validationStatus = "success"
|
|
857
|
-
}
|
|
858
|
+
//}
|
|
858
859
|
|
|
859
860
|
if (typeof event.target.checkValidity === "function" && !event.target.checkValidity()) {
|
|
860
861
|
this.validationStatus = "error"
|