comand-component-library 4.2.88 → 4.2.89
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/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.js +6585 -6536
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +34 -25
- package/src/assets/data/form-elements.json +87 -52
- package/src/components/CmdFakeSelect.vue +11 -0
- package/src/components/CmdForm.vue +42 -60
- package/src/components/CmdInputGroup.vue +5 -2
- package/src/components/CmdMultistepFormProgressBar.vue +16 -12
- package/src/components/CmdMultistepFormWrapper.vue +4 -1
- package/src/components/CmdTag.vue +1 -1
package/package.json
CHANGED
package/src/ComponentLibrary.vue
CHANGED
|
@@ -1376,31 +1376,35 @@
|
|
|
1376
1376
|
</div>
|
|
1377
1377
|
</CmdForm>
|
|
1378
1378
|
</template>
|
|
1379
|
-
<template v-slot:page-
|
|
1380
|
-
<
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
<
|
|
1403
|
-
|
|
1379
|
+
<template v-slot:page-last="props">
|
|
1380
|
+
<template v-if="!confirmDataPrivacy">
|
|
1381
|
+
<h3>Page 4</h3>
|
|
1382
|
+
<CmdForm
|
|
1383
|
+
:cmdHeadline=" { headlineText: 'Confirmation', headlineLevel: 3 }"
|
|
1384
|
+
:submitButton="{ disabled : props.atleastOneStepWithError, type: 'button' }"
|
|
1385
|
+
:cancelButton="{ show: false }"
|
|
1386
|
+
@submit="validateForm"
|
|
1387
|
+
>
|
|
1388
|
+
<p>Please confirm that all data you provided is legit.</p>
|
|
1389
|
+
<CmdFormElement
|
|
1390
|
+
element="input"
|
|
1391
|
+
type="checkbox"
|
|
1392
|
+
labelText="Confirm data privacy:"
|
|
1393
|
+
name="confirm-data-privacy"
|
|
1394
|
+
id="confirm-data-privac"
|
|
1395
|
+
:required="true"
|
|
1396
|
+
v-model="dataPrivacyChecked"
|
|
1397
|
+
@update:modelValue="setValue($event, 'confirm-data-privacy', props)"
|
|
1398
|
+
@validation-status-change="setValidationStatusCheckbox($event, 'confirm-data-privacy', props)"
|
|
1399
|
+
/>
|
|
1400
|
+
</CmdForm>
|
|
1401
|
+
</template>
|
|
1402
|
+
<template v-else>
|
|
1403
|
+
<h3>Confirmation</h3>
|
|
1404
|
+
<CmdSystemMessage systemMessage="Your request was send successfully!" validationStatus="success" :iconClose="{ show: false }" />
|
|
1405
|
+
<p>A copy with all submitted data was send to you.</p>
|
|
1406
|
+
props.formDataForPage: {{ props.formDataForPage }}
|
|
1407
|
+
</template>
|
|
1404
1408
|
</template>
|
|
1405
1409
|
</CmdMultistepFormWrapper>
|
|
1406
1410
|
<h3>Data provided by slot</h3>
|
|
@@ -2007,6 +2011,7 @@ export default {
|
|
|
2007
2011
|
componentControls: {},
|
|
2008
2012
|
componentView: true,
|
|
2009
2013
|
colorScheme: "none",
|
|
2014
|
+
confirmDataPrivacy: false,
|
|
2010
2015
|
showLeftSidebar: true,
|
|
2011
2016
|
selectedTemplate: "blank",
|
|
2012
2017
|
acceptedCookies: ["google-maps"],
|
|
@@ -2014,6 +2019,7 @@ export default {
|
|
|
2014
2019
|
showSettingsSidebar: false,
|
|
2015
2020
|
disabledStatus: undefined,
|
|
2016
2021
|
validationStatus: "",
|
|
2022
|
+
dataPrivacyChecked: false,
|
|
2017
2023
|
loginData: {
|
|
2018
2024
|
username: "",
|
|
2019
2025
|
password: ""
|
|
@@ -2404,6 +2410,9 @@ export default {
|
|
|
2404
2410
|
doSomething() {
|
|
2405
2411
|
alert("Language changed!")
|
|
2406
2412
|
},
|
|
2413
|
+
validateForm() {
|
|
2414
|
+
this.confirmDataPrivacy = true
|
|
2415
|
+
},
|
|
2407
2416
|
executeSearch() {
|
|
2408
2417
|
return Math.floor(Math.random() * 100)
|
|
2409
2418
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"htmlClass": "form-element-text-class",
|
|
7
7
|
"id": "form-element-text-id",
|
|
8
8
|
"value": "",
|
|
9
|
-
"fieldIconClass": "icon-
|
|
9
|
+
"fieldIconClass": "icon-globe",
|
|
10
10
|
"labelText": "Text input",
|
|
11
11
|
"placeholder": "Placeholdertext",
|
|
12
12
|
"required": false,
|
|
@@ -15,33 +15,33 @@
|
|
|
15
15
|
{
|
|
16
16
|
"component": "flexContainer",
|
|
17
17
|
"formElements": [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
{
|
|
19
|
+
"element": "input",
|
|
20
|
+
"type": "text",
|
|
21
|
+
"name": "form-element-username",
|
|
22
|
+
"htmlClass": "form-element-text-class",
|
|
23
|
+
"id": "form-element-username",
|
|
24
|
+
"value": "default value",
|
|
25
|
+
"fieldIconClass": "icon-user-profile",
|
|
26
|
+
"labelText": "Username input",
|
|
27
|
+
"placeholder": "Placeholdertext",
|
|
28
|
+
"required": true,
|
|
29
|
+
"disabled": false
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"element": "input",
|
|
33
|
+
"type": "password",
|
|
34
|
+
"name": "form-element-password-name",
|
|
35
|
+
"htmlClass": "form-element-password-class",
|
|
36
|
+
"id": "form-element-password-id",
|
|
37
|
+
"value": "",
|
|
38
|
+
"fieldIconClass": "icon-security-settings",
|
|
39
|
+
"labelText": "Password input",
|
|
40
|
+
"placeholder": "Placeholdertext",
|
|
41
|
+
"required": false,
|
|
42
|
+
"disabled": false
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"element": "input",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"htmlClass": "form-element-tel-class",
|
|
51
51
|
"id": "form-element-tel-id",
|
|
52
52
|
"value": "default value",
|
|
53
|
-
"fieldIconClass": "icon-
|
|
53
|
+
"fieldIconClass": "icon-phone",
|
|
54
54
|
"labelText": "Telephone input (disabled)",
|
|
55
55
|
"placeholder": "Placeholdertext",
|
|
56
56
|
"required": false,
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"htmlClass": "form-element-email-class",
|
|
64
64
|
"id": "form-element-email-id",
|
|
65
65
|
"value": "default value",
|
|
66
|
-
"fieldIconClass": "icon-
|
|
66
|
+
"fieldIconClass": "icon-mail",
|
|
67
67
|
"labelText": "Email input (with icon)",
|
|
68
68
|
"placeholder": "Placeholdertext",
|
|
69
69
|
"required": false,
|
|
@@ -156,31 +156,66 @@
|
|
|
156
156
|
"maxlength": 500
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
"component": "
|
|
160
|
-
"
|
|
161
|
-
"toggleSwitches": true,
|
|
162
|
-
"value": "website",
|
|
163
|
-
"inputElements": [
|
|
164
|
-
{
|
|
165
|
-
"labelText": "Website",
|
|
166
|
-
"id": "radio-id-1",
|
|
167
|
-
"name": "input-group-radio",
|
|
168
|
-
"iconClass": "icon-globe",
|
|
169
|
-
"value": "website"
|
|
170
|
-
},
|
|
159
|
+
"component": "flexContainer",
|
|
160
|
+
"formElements": [
|
|
171
161
|
{
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"value": "
|
|
162
|
+
"component": "CmdInputGroup",
|
|
163
|
+
"labelText": "Input Group (Checkbox):",
|
|
164
|
+
"toggleSwitches": true,
|
|
165
|
+
"inputTypes": "checkbox",
|
|
166
|
+
"value": "checkbox-website",
|
|
167
|
+
"inputElements": [
|
|
168
|
+
{
|
|
169
|
+
"labelText": "Website",
|
|
170
|
+
"id": "checkbox-id-1",
|
|
171
|
+
"name": "input-group-checkbox",
|
|
172
|
+
"iconClass": "icon-globe",
|
|
173
|
+
"value": "checkbox-website"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"labelText": "E-Mail",
|
|
177
|
+
"id": "checkbox-id-2",
|
|
178
|
+
"name": "input-group-checkbox",
|
|
179
|
+
"iconClass": "icon-mail",
|
|
180
|
+
"value": "checkbox-email"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"labelText": "Phone",
|
|
184
|
+
"id": "checkbox-id-3",
|
|
185
|
+
"name": "input-group-checkbox",
|
|
186
|
+
"iconClass": "icon-phone",
|
|
187
|
+
"value": "checkbox-phone"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
177
190
|
},
|
|
178
191
|
{
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
192
|
+
"component": "CmdInputGroup",
|
|
193
|
+
"labelText": "Input Group (Radio):",
|
|
194
|
+
"toggleSwitches": true,
|
|
195
|
+
"value": "radio-website",
|
|
196
|
+
"inputElements": [
|
|
197
|
+
{
|
|
198
|
+
"labelText": "Website",
|
|
199
|
+
"id": "radio-id-1",
|
|
200
|
+
"name": "input-group-radio",
|
|
201
|
+
"iconClass": "icon-globe",
|
|
202
|
+
"value": "radio-website"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"labelText": "E-Mail",
|
|
206
|
+
"id": "radio-id-2",
|
|
207
|
+
"name": "input-group-radio",
|
|
208
|
+
"iconClass": "icon-mail",
|
|
209
|
+
"value": "radio-email"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"labelText": "Phone",
|
|
213
|
+
"id": "radio-id-3",
|
|
214
|
+
"name": "input-group-radio",
|
|
215
|
+
"iconClass": "icon-phone",
|
|
216
|
+
"value": "radio-phone"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
184
219
|
}
|
|
185
220
|
]
|
|
186
221
|
}
|
|
@@ -432,6 +432,7 @@ export default {
|
|
|
432
432
|
methods: {
|
|
433
433
|
toggleAllOptions() {
|
|
434
434
|
this.validationStatus = "success"
|
|
435
|
+
|
|
435
436
|
const checkboxValues = []
|
|
436
437
|
if (this.modelValue.length === this.selectData.length) {
|
|
437
438
|
if (this.$attrs.required) {
|
|
@@ -444,7 +445,9 @@ export default {
|
|
|
444
445
|
}
|
|
445
446
|
|
|
446
447
|
this.$emit("update:modelValue", checkboxValues)
|
|
448
|
+
this.$emit('validation-status-change', this.validationStatus)
|
|
447
449
|
},
|
|
450
|
+
// toggle options/dropdown
|
|
448
451
|
toggleOptions() {
|
|
449
452
|
if (this.$attrs.disabled !== 'disabled') {
|
|
450
453
|
this.showOptions = !this.showOptions
|
|
@@ -465,8 +468,11 @@ export default {
|
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
470
|
|
|
471
|
+
// hide options after selection
|
|
468
472
|
this.showOptions = false
|
|
473
|
+
|
|
469
474
|
this.$emit('update:modelValue', optionValue)
|
|
475
|
+
this.$emit('validation-status-change', this.validationStatus)
|
|
470
476
|
},
|
|
471
477
|
// check if a checkbox is changed for selectbox with checkboxes
|
|
472
478
|
optionSelect(event) {
|
|
@@ -484,18 +490,23 @@ export default {
|
|
|
484
490
|
|
|
485
491
|
this.$emit('update:modelValue', value)
|
|
486
492
|
},
|
|
493
|
+
// hide options (in dropdown)
|
|
487
494
|
closeOptions() {
|
|
488
495
|
this.showOptions = false
|
|
489
496
|
},
|
|
497
|
+
// set path for flag-icons (type-property must be 'country')
|
|
490
498
|
pathFlag(isoCode) {
|
|
491
499
|
return this.pathFlags + "/flag-" + isoCode + ".svg"
|
|
492
500
|
},
|
|
501
|
+
// validate on blur
|
|
493
502
|
onBlur() {
|
|
494
503
|
this.validationStatus = "success"
|
|
495
504
|
|
|
496
505
|
if (this.$attrs.required !== undefined && (!this.modelValue || this.modelValue.length === 0)) {
|
|
497
506
|
this.validationStatus = "error"
|
|
498
507
|
}
|
|
508
|
+
|
|
509
|
+
this.$emit('validation-status-change', this.validationStatus)
|
|
499
510
|
},
|
|
500
511
|
// overwrite requirement-message form fieldValidation.js
|
|
501
512
|
getRequirementMessage() {
|
|
@@ -10,16 +10,18 @@
|
|
|
10
10
|
>
|
|
11
11
|
<template v-if="useFieldset">
|
|
12
12
|
<fieldset class="flex-container flex-direction-column"><!-- do not remove .flex-direction-column to keep specificity -->
|
|
13
|
+
<!-- begin (mandatory) legend-->
|
|
13
14
|
<legend :class="{hidden : !legendOptions.show, 'align-left': legendOptions.align === 'left'}">{{
|
|
14
15
|
legendOptions.text
|
|
15
16
|
}}
|
|
16
17
|
</legend>
|
|
17
|
-
|
|
18
|
+
<!-- end (mandatory) legend-->
|
|
19
|
+
|
|
18
20
|
<CmdHeadline
|
|
19
21
|
v-if="cmdHeadline?.headlineText"
|
|
20
22
|
v-bind="cmdHeadline"
|
|
21
23
|
/>
|
|
22
|
-
|
|
24
|
+
|
|
23
25
|
<CmdSystemMessage
|
|
24
26
|
v-if="systemMessage.show && systemMessage.message"
|
|
25
27
|
:validationStatus="systemMessage.validationStatus"
|
|
@@ -30,84 +32,57 @@
|
|
|
30
32
|
<slot v-if="useSlot"></slot>
|
|
31
33
|
<!-- end default-slot-content -->
|
|
32
34
|
|
|
35
|
+
<!-- begin loop for formElements -->
|
|
33
36
|
<template v-else v-for="(item, index) in formElements" :key="index">
|
|
34
|
-
<!-- begin loop for formElements -->
|
|
35
37
|
<CmdFormElement
|
|
36
38
|
v-if="!item.component || item.component === 'CmdFormElement'"
|
|
37
39
|
:key="index"
|
|
38
|
-
:element="item.element || 'input'"
|
|
39
|
-
:type="item.type || 'text'"
|
|
40
|
-
:name="item.name"
|
|
41
40
|
:class="item.htmlClass"
|
|
42
|
-
|
|
41
|
+
v-bind="item"
|
|
43
42
|
v-model="formValues[item.name]"
|
|
44
|
-
:inputValue="item.inputValue"
|
|
45
|
-
:fieldIconClass="item.innerIconClass"
|
|
46
|
-
:selectOptions="item.selectOptions"
|
|
47
|
-
:toggleSwitch="item.toggleSwitch"
|
|
48
|
-
:labelText="item.labelText"
|
|
49
|
-
:placeholder="item.placeholder"
|
|
50
|
-
:required="item.required"
|
|
51
|
-
:disabled="item.disabled"
|
|
52
|
-
:autocomplete="item.autocomplete"
|
|
53
|
-
:minlength="item.minlength"
|
|
54
|
-
:maxlength="item.maxlength"
|
|
55
|
-
:nativeButton="item.nativeButton"
|
|
56
|
-
:colored="item.colored"
|
|
57
43
|
@validation-status-change="formElementHasError($event, item.name)"
|
|
58
44
|
/>
|
|
59
|
-
<
|
|
60
|
-
v-
|
|
45
|
+
<CmdFakeSelect
|
|
46
|
+
v-if="item.component === 'CmdFakeSelect'"
|
|
47
|
+
:class="item.htmlClass"
|
|
48
|
+
v-bind="item"
|
|
61
49
|
v-model="formValues[item.name]"
|
|
62
|
-
:labelText="item.labelText"
|
|
63
|
-
:inputElements="item.inputElements"
|
|
64
|
-
:toggleSwitches="item.toggleSwitches"
|
|
65
|
-
:colored="item.colored"
|
|
66
50
|
/>
|
|
51
|
+
<CmdInputGroup
|
|
52
|
+
v-else-if="item.component === 'CmdInputGroup'"
|
|
53
|
+
:class="item.htmlClass"
|
|
54
|
+
v-bind="item"
|
|
55
|
+
v-model="formValues[item.name]"
|
|
56
|
+
/>
|
|
67
57
|
<div
|
|
68
|
-
v-else-if="item.component === 'flexContainer'"
|
|
69
|
-
class="flex-container"
|
|
58
|
+
v-else-if="item.component === 'flexContainer' || item.component === 'inputWrapper'"
|
|
59
|
+
:class="item.component === 'flexContainer' ? 'flex-container' : 'input-wrapper'"
|
|
70
60
|
>
|
|
61
|
+
<!-- begin inner loop for formElements inside flex-container/input-wrapper -->
|
|
71
62
|
<template v-for="(item, index) in item.formElements" :key="index">
|
|
72
63
|
<CmdFormElement
|
|
73
64
|
v-if="!item.component || item.component === 'CmdFormElement'"
|
|
74
65
|
:key="index"
|
|
75
|
-
:element="item.element || 'input'"
|
|
76
|
-
:type="item.type || 'text'"
|
|
77
|
-
:name="item.name"
|
|
78
66
|
:class="item.htmlClass"
|
|
79
|
-
|
|
67
|
+
v-bind="item"
|
|
80
68
|
v-model="formValues[item.name]"
|
|
81
|
-
:inputValue="item.inputValue"
|
|
82
|
-
:toggleSwitch="item.toggleSwitch"
|
|
83
|
-
:fieldIconClass="item.innerIconClass"
|
|
84
|
-
:selectOptions="item.selectOptions"
|
|
85
|
-
:labelText="item.labelText"
|
|
86
|
-
:placeholder="item.placeholder"
|
|
87
|
-
:required="item.required"
|
|
88
|
-
:disabled="item.disabled"
|
|
89
|
-
:autocomplete="item.autocomplete"
|
|
90
|
-
:minlength="item.minlength"
|
|
91
|
-
:maxlength="item.maxlength"
|
|
92
|
-
:nativeButton="item.nativeButton"
|
|
93
69
|
@validation-status-change="formElementHasError($event, item.name)"
|
|
94
70
|
/>
|
|
95
71
|
<CmdInputGroup
|
|
96
72
|
v-else-if="item.component === 'CmdInputGroup'"
|
|
97
73
|
v-model="formValues[item.name]"
|
|
98
|
-
|
|
99
|
-
:inputElements="item.inputElements"
|
|
100
|
-
:toggleSwitches="item.toggleSwitches"
|
|
101
|
-
:colored="item.colored"
|
|
74
|
+
v-bind="item"
|
|
102
75
|
/>
|
|
103
76
|
</template>
|
|
77
|
+
<!-- end inner loop for formElements inside flex-container/input-wrapper -->
|
|
104
78
|
</div>
|
|
105
79
|
</template>
|
|
106
80
|
<!-- end loop for formElements -->
|
|
107
81
|
|
|
82
|
+
<!-- begin submit- and cancel-button inside fieldset -->
|
|
108
83
|
<div v-if="submitButtonOptions.show && (submitButtonOptions.position === 'insideFieldset' || submitButtonOptions.position === null)" class="flex-container no-wrap-on-small-devices">
|
|
109
84
|
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
|
110
|
-
<!-- begin cancel-button
|
|
85
|
+
<!-- begin cancel-button -->
|
|
111
86
|
<button
|
|
112
87
|
v-if="cancelButtonOptions.show"
|
|
113
88
|
:class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
|
|
@@ -117,23 +92,26 @@
|
|
|
117
92
|
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
|
118
93
|
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
|
119
94
|
</button>
|
|
120
|
-
<!-- end cancel-button
|
|
95
|
+
<!-- end cancel-button -->
|
|
121
96
|
|
|
122
|
-
<!-- begin submit-button
|
|
97
|
+
<!-- begin submit-button -->
|
|
123
98
|
<button
|
|
124
99
|
:class="['button', {'stretch-on-small-devices': submitButtonOptions.stretchOnSmallDevices, primary: submitButtonOptions.primary, disabled: submitButtonOptions.disabled}]"
|
|
125
100
|
:type="submitButtonOptions.type"
|
|
101
|
+
@click.prevent="onSubmit"
|
|
126
102
|
>
|
|
127
103
|
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
|
128
104
|
<span v-if="submitButtonOptions.text">{{ submitButtonOptions.text }}</span>
|
|
129
105
|
</button>
|
|
130
|
-
<!-- end submit-button
|
|
106
|
+
<!-- end submit-button -->
|
|
131
107
|
</div>
|
|
108
|
+
<!-- end submit- and cancel-button inside fieldset -->
|
|
132
109
|
</fieldset>
|
|
133
110
|
|
|
111
|
+
<!-- begin submit- and cancel-button outside/below fieldset -->
|
|
134
112
|
<div v-if="submitButtonOptions.show && submitButtonOptions.position === 'belowFieldset'" class="flex-container no-wrap-on-small-devices">
|
|
135
113
|
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
|
136
|
-
<!-- begin cancel-button
|
|
114
|
+
<!-- begin cancel-button-->
|
|
137
115
|
<button
|
|
138
116
|
v-if="cancelButtonOptions.show"
|
|
139
117
|
:class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
|
|
@@ -143,17 +121,18 @@
|
|
|
143
121
|
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
|
144
122
|
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
|
145
123
|
</button>
|
|
146
|
-
<!-- end cancel-button
|
|
124
|
+
<!-- end cancel-button -->
|
|
147
125
|
|
|
148
|
-
<!-- begin submit-button
|
|
126
|
+
<!-- begin submit-button -->
|
|
149
127
|
<button v-if="submitButtonOptions.show"
|
|
150
128
|
:class="['button', {'stretch-on-small-devices': submitButtonOptions.stretchOnSmallDevices, primary: submitButtonOptions.primary, disabled: submitButtonOptions.disabled}]"
|
|
151
129
|
:type="submitButtonOptions.type || 'submit'">
|
|
152
130
|
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
|
153
131
|
<span v-if="submitButtonOptions.text">{{ submitButtonOptions.text }}</span>
|
|
154
132
|
</button>
|
|
155
|
-
<!-- end submit-button
|
|
133
|
+
<!-- end submit-button -->
|
|
156
134
|
</div>
|
|
135
|
+
<!-- end submit- and cancel-button outside/below fieldset -->
|
|
157
136
|
|
|
158
137
|
<!-- begin button-row-slot-content -->
|
|
159
138
|
<slot name="button-row"></slot>
|
|
@@ -189,6 +168,9 @@ export default {
|
|
|
189
168
|
}
|
|
190
169
|
},
|
|
191
170
|
props: {
|
|
171
|
+
/**
|
|
172
|
+
* model-value for entire form
|
|
173
|
+
*/
|
|
192
174
|
modelValue: {
|
|
193
175
|
type: Object
|
|
194
176
|
},
|
|
@@ -299,7 +281,7 @@ export default {
|
|
|
299
281
|
computed: {
|
|
300
282
|
legendOptions() {
|
|
301
283
|
return {
|
|
302
|
-
show:
|
|
284
|
+
show: false,
|
|
303
285
|
align: "left",
|
|
304
286
|
text: "Legend",
|
|
305
287
|
...this.legend
|
|
@@ -371,10 +353,10 @@ export default {
|
|
|
371
353
|
event.preventDefault()
|
|
372
354
|
this.errorOccurred = true
|
|
373
355
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
356
|
+
} else {
|
|
357
|
+
this.submitFormData(event)
|
|
377
358
|
}
|
|
359
|
+
}
|
|
378
360
|
},
|
|
379
361
|
watch: {
|
|
380
362
|
modelValue: {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
:value="inputElement.value"
|
|
60
60
|
v-model="inputValue"
|
|
61
61
|
:disabled="inputElement.disabled"
|
|
62
|
-
:class="{'replace-input-type': replaceInputType}"
|
|
62
|
+
:class="[inputElements.htmlClass, {'replace-input-type': replaceInputType}]"
|
|
63
63
|
/>
|
|
64
64
|
<!-- begin CmdIcon -->
|
|
65
65
|
<CmdIcon
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
/**
|
|
110
110
|
* set orientation
|
|
111
111
|
*
|
|
112
|
-
* @
|
|
112
|
+
* @allowedValues = horizontal, vertical
|
|
113
113
|
*/
|
|
114
114
|
orientation: {
|
|
115
115
|
type: String,
|
|
@@ -277,6 +277,8 @@ export default {
|
|
|
277
277
|
return
|
|
278
278
|
}
|
|
279
279
|
this.validationStatus = this.status
|
|
280
|
+
|
|
281
|
+
this.$emit('validation-status-change', this.validationStatus)
|
|
280
282
|
}
|
|
281
283
|
},
|
|
282
284
|
computed: {
|
|
@@ -300,6 +302,7 @@ export default {
|
|
|
300
302
|
},
|
|
301
303
|
// set/write a value to update v-model for this component
|
|
302
304
|
set(value) {
|
|
305
|
+
this.$emit('validation-status-change', this.validationStatus)
|
|
303
306
|
this.$emit("update:modelValue", value)
|
|
304
307
|
}
|
|
305
308
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<li v-for="(step, index) in multisteps" :key="index" :class="[errorLinkClass(index), successLinkClass(index)]">
|
|
5
5
|
<!-- begin CmdLink -->
|
|
6
6
|
<CmdLink
|
|
7
|
+
v-if="stepsCanBeClicked"
|
|
7
8
|
:linkType="step.linkType"
|
|
8
9
|
:class="['stretch-on-small-devices', activeLinkClass(index), errorLinkClass(index), successLinkClass(index)]"
|
|
9
10
|
:styleAsButton="styleAsButtons"
|
|
@@ -21,6 +22,14 @@
|
|
|
21
22
|
</CmdLink>
|
|
22
23
|
<!-- end CmdLink -->
|
|
23
24
|
|
|
25
|
+
<template v-else>
|
|
26
|
+
<span v-if="showStepNumber" class="number">{{ index + 1 }}</span>
|
|
27
|
+
<!-- begin CmdIcon -->
|
|
28
|
+
<CmdIcon v-if="step.iconClass" :iconClass="step.iconClass" :type="step.iconType" />
|
|
29
|
+
<!-- end CmdIcon -->
|
|
30
|
+
<span v-if="step.text">{{ step.text }}</span>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
24
33
|
<!-- begin separator -->
|
|
25
34
|
<span v-if="index + 1 !== multisteps.length && useGap" :class="['separator', separatorIconClass]"></span>
|
|
26
35
|
<!-- end separator -->
|
|
@@ -42,6 +51,13 @@ export default {
|
|
|
42
51
|
}
|
|
43
52
|
},
|
|
44
53
|
props: {
|
|
54
|
+
/**
|
|
55
|
+
* active if steps should be clickable
|
|
56
|
+
*/
|
|
57
|
+
stepsCanBeClicked: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
45
61
|
/**
|
|
46
62
|
* set highlight-level for steps
|
|
47
63
|
*
|
|
@@ -249,12 +265,6 @@ export default {
|
|
|
249
265
|
|
|
250
266
|
&:has(:not(.button)) {
|
|
251
267
|
flex: none;
|
|
252
|
-
|
|
253
|
-
&:is(:hover, :active, :focus) {
|
|
254
|
-
span, span[class*="icon-"] {
|
|
255
|
-
color: var(--hyperlink-color);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
268
|
}
|
|
259
269
|
|
|
260
270
|
a, button {
|
|
@@ -293,12 +303,6 @@ export default {
|
|
|
293
303
|
}
|
|
294
304
|
}
|
|
295
305
|
|
|
296
|
-
&:hover, &:active, &:focus {
|
|
297
|
-
.number {
|
|
298
|
-
color: var(--hyperlink-color);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
306
|
.number {
|
|
303
307
|
line-height: 100%;
|
|
304
308
|
width: 2rem;
|
|
@@ -32,7 +32,10 @@
|
|
|
32
32
|
|
|
33
33
|
<!-- begin slot for last step -->
|
|
34
34
|
<slot
|
|
35
|
-
name="last
|
|
35
|
+
name="page-last"
|
|
36
|
+
:setErrorOnPage="(message) => setErrorOnPage(step, message)"
|
|
37
|
+
:removeErrorOnPage="() => removeErrorOnPage(step)"
|
|
38
|
+
:atleastOneStepWithError="atleastOneStepWithError"
|
|
36
39
|
/>
|
|
37
40
|
<!-- end slot for last step -->
|
|
38
41
|
</div>
|