comand-component-library 4.2.82 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "4.2.82",
3
+ "version": "4.2.83",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "CoManD-UI",
6
6
  "private": false,
@@ -1378,13 +1378,21 @@
1378
1378
  </template>
1379
1379
  <template v-slot:page-5="props">
1380
1380
  <h3>Page 5</h3>
1381
- <CmdForm
1382
- :formElements="multistepFormWrapperPage1Data"
1383
- :useSlot="false"
1384
- @validation-status-change="toggleSystemMessage($event, props)"
1385
- :submitButton="{disabled: props.atleastOnePageWithError}"
1386
- :cancelButton="{ show: false}"
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
  },
@@ -853,9 +853,9 @@ export default {
853
853
  const value = event.target.value
854
854
 
855
855
  // if input is filled, set status to success (expect for checkboxes and radiobuttons)
856
- if (!["checkbox", "radio"].includes(this.$attrs.type) && value) {
856
+ //if (!["checkbox", "radio"].includes(this.$attrs.type) && value) {
857
857
  this.validationStatus = "success"
858
- }
858
+ //}
859
859
 
860
860
  if (typeof event.target.checkValidity === "function" && !event.target.checkValidity()) {
861
861
  this.validationStatus = "error"