comand-component-library 4.2.56 → 4.2.58
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.js +4898 -4556
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +103 -7
- package/src/assets/data/form-elements.json +29 -0
- package/src/assets/data/listOfComponents.json +1 -0
- package/src/componentSettingsDataAndControls.vue +1 -2
- package/src/components/CmdFancyBox.vue +7 -3
- package/src/components/CmdForm.vue +30 -23
- package/src/components/CmdMultistepFormProgressBar.vue +38 -6
- package/src/components/CmdMultistepFormWrapper.vue +190 -0
- package/src/components/CmdPagination.vue +62 -55
- package/src/index.js +1 -0
package/src/ComponentLibrary.vue
CHANGED
|
@@ -508,12 +508,6 @@
|
|
|
508
508
|
<CmdInputGroup ref="CmdInputGroup" v-bind="cmdInputGroupSettingsData"
|
|
509
509
|
labelText="Grouplabel for radio-group given by property:"
|
|
510
510
|
:inputElements="idForReplacedInputsInInputGroup('radio-group')" v-model="inputGroup">
|
|
511
|
-
<CmdFormElement element="input" labelText="Label for radiobutton" type="radio"
|
|
512
|
-
id="input-group-radiobutton" name="radiogroup2" inputValue="radiobuttonValue1"
|
|
513
|
-
v-model="inputGroup" :status="validationStatus" :disabled="disabledStatus" />
|
|
514
|
-
<CmdFormElement element="input" labelText="Label for radiobutton" type="radio"
|
|
515
|
-
id="input-group-radiobutton" name="radiogroup2" inputValue="radiobuttonValue2"
|
|
516
|
-
v-model="inputGroup" :status="validationStatus" :disabled="disabledStatus" />
|
|
517
511
|
</CmdInputGroup>
|
|
518
512
|
<dl>
|
|
519
513
|
<dt>Selected value:</dt>
|
|
@@ -1266,6 +1260,107 @@
|
|
|
1266
1260
|
</CmdWidthLimitationWrapper>
|
|
1267
1261
|
<!-- end main-navigation --------------------------------------------------------------------------------------------------->
|
|
1268
1262
|
|
|
1263
|
+
<!-- begin multistep-form-wrapper --------------------------------------------------------------------------------------------------->
|
|
1264
|
+
<CmdWidthLimitationWrapper>
|
|
1265
|
+
<h2 class="headline-demopage" id="section-multistep-form-wrapper">
|
|
1266
|
+
<span>Multistepform-Wrapper</span>
|
|
1267
|
+
<a href="#" class="button small icon-cog" title="Open Component Settings"
|
|
1268
|
+
@click.prevent="openSettingsSidebar('CmdMultistepFormProgressBar')">
|
|
1269
|
+
</a>
|
|
1270
|
+
</h2>
|
|
1271
|
+
<h3>Data provided by property</h3>
|
|
1272
|
+
<CmdMultistepFormWrapper>
|
|
1273
|
+
<template v-slot:page-1="props">
|
|
1274
|
+
Content Page 1<br />
|
|
1275
|
+
<a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a><br />
|
|
1276
|
+
<a href="#" @click.prevent="props.removeErrorOnPage">Remove Error</a>
|
|
1277
|
+
</template>
|
|
1278
|
+
<template v-slot:page-2="props">
|
|
1279
|
+
Content Page 2<br />
|
|
1280
|
+
<a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a>
|
|
1281
|
+
</template>
|
|
1282
|
+
<template v-slot:page-3>
|
|
1283
|
+
Content Page 3
|
|
1284
|
+
</template>
|
|
1285
|
+
<template v-slot:page-4>
|
|
1286
|
+
Content Page 4
|
|
1287
|
+
</template>
|
|
1288
|
+
<template v-slot:page-5>
|
|
1289
|
+
Content Page 5
|
|
1290
|
+
</template>
|
|
1291
|
+
</CmdMultistepFormWrapper>
|
|
1292
|
+
<h3>Data provided by slot</h3>
|
|
1293
|
+
<CmdMultistepFormWrapper>
|
|
1294
|
+
<template v-slot:progress-bar="props">
|
|
1295
|
+
<ul class="flex-container">
|
|
1296
|
+
<li v-for="index of props.numberOfPages" :key="index">
|
|
1297
|
+
<a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">{{ index }}</a>
|
|
1298
|
+
</li>
|
|
1299
|
+
</ul>
|
|
1300
|
+
</template>
|
|
1301
|
+
<template v-slot:page-1="props">
|
|
1302
|
+
Content Page 1
|
|
1303
|
+
<span v-if="props.hasError">Error</span>
|
|
1304
|
+
<a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a>
|
|
1305
|
+
</template>
|
|
1306
|
+
<template v-slot:page-2="props">
|
|
1307
|
+
Content Page 2
|
|
1308
|
+
<span v-if="props.hasError">Error</span>
|
|
1309
|
+
<a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a>
|
|
1310
|
+
</template>
|
|
1311
|
+
<template v-slot:page-3="props">
|
|
1312
|
+
Content Page 3
|
|
1313
|
+
<span v-if="props.hasError">Error</span>
|
|
1314
|
+
</template>
|
|
1315
|
+
<template v-slot:page-4="props">
|
|
1316
|
+
Content Page 4
|
|
1317
|
+
<span v-if="props.hasError">Error</span>
|
|
1318
|
+
</template>
|
|
1319
|
+
<template v-slot:page-5="props">
|
|
1320
|
+
Content Page 5
|
|
1321
|
+
<span v-if="props.hasError">Error</span>
|
|
1322
|
+
</template>
|
|
1323
|
+
<template v-slot:pagination="props">
|
|
1324
|
+
<div class="button-wrapper reverse justify-content-space-between">
|
|
1325
|
+
<CmdLink
|
|
1326
|
+
linkType="button"
|
|
1327
|
+
highlightLevel="none"
|
|
1328
|
+
:icon='{
|
|
1329
|
+
iconClass: "icon-chevron-one-stripe-right",
|
|
1330
|
+
tooltip: "To next page",
|
|
1331
|
+
position: "right"
|
|
1332
|
+
}'
|
|
1333
|
+
text="Next"
|
|
1334
|
+
:disabled="props.disabledNextLink"
|
|
1335
|
+
@click="props.setNextPage"
|
|
1336
|
+
/>
|
|
1337
|
+
<CmdLink
|
|
1338
|
+
linkType="button"
|
|
1339
|
+
class="cancel"
|
|
1340
|
+
highlightLevel="none"
|
|
1341
|
+
:icon='{
|
|
1342
|
+
iconClass: "icon-cancel-circle",
|
|
1343
|
+
}'
|
|
1344
|
+
text="Cancel"
|
|
1345
|
+
/>
|
|
1346
|
+
<CmdLink
|
|
1347
|
+
linkType="button"
|
|
1348
|
+
highlightLevel="none"
|
|
1349
|
+
:icon='{
|
|
1350
|
+
iconClass: "icon-chevron-one-stripe-left",
|
|
1351
|
+
tooltip: "To previous page"
|
|
1352
|
+
}'
|
|
1353
|
+
text="Back"
|
|
1354
|
+
@click="props.setPrevPage"
|
|
1355
|
+
:disabled="props.disabledPrevLink"
|
|
1356
|
+
/>
|
|
1357
|
+
props.disabledPrevLink: {{ props.disabledPrevLink }}
|
|
1358
|
+
</div>
|
|
1359
|
+
</template>
|
|
1360
|
+
</CmdMultistepFormWrapper>
|
|
1361
|
+
</CmdWidthLimitationWrapper>
|
|
1362
|
+
<!-- end multistep-form-wrapper --------------------------------------------------------------------------------------------------->
|
|
1363
|
+
|
|
1269
1364
|
<!-- begin multistep-form-progress-bar --------------------------------------------------------------------------------------------------->
|
|
1270
1365
|
<CmdWidthLimitationWrapper>
|
|
1271
1366
|
<h2 class="headline-demopage" id="section-multistep-form-progress-bar">
|
|
@@ -2117,7 +2212,8 @@ export default {
|
|
|
2117
2212
|
show: true,
|
|
2118
2213
|
headlineText: "Fancybox with text", headlineLevel: 3
|
|
2119
2214
|
},
|
|
2120
|
-
ariaLabelText: ariaLabelText
|
|
2215
|
+
ariaLabelText: ariaLabelText,
|
|
2216
|
+
showPrintButtons: true
|
|
2121
2217
|
})
|
|
2122
2218
|
} else if (type === "url") {
|
|
2123
2219
|
openFancyBox({
|
|
@@ -148,5 +148,34 @@
|
|
|
148
148
|
"required": false,
|
|
149
149
|
"disabled": false,
|
|
150
150
|
"maxlength": 500
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"component": "CmdInputGroup",
|
|
154
|
+
"labelText": "Input Group (Radio):",
|
|
155
|
+
"toggleSwitches": true,
|
|
156
|
+
"value": "website",
|
|
157
|
+
"inputElements": [
|
|
158
|
+
{
|
|
159
|
+
"labelText": "Website",
|
|
160
|
+
"id": "radio-id-1",
|
|
161
|
+
"name": "input-group-radio",
|
|
162
|
+
"iconClass": "icon-globe",
|
|
163
|
+
"value": "website"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"labelText": "E-Mail",
|
|
167
|
+
"id": "radio-id-2",
|
|
168
|
+
"name": "input-group-radio",
|
|
169
|
+
"iconClass": "icon-mail",
|
|
170
|
+
"value": "email"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"labelText": "Phone",
|
|
174
|
+
"id": "radio-id-3",
|
|
175
|
+
"name": "input-group-radio",
|
|
176
|
+
"iconClass": "icon-phone",
|
|
177
|
+
"value": "phone"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
151
180
|
}
|
|
152
181
|
]
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
<!-- begin close-icon -->
|
|
49
49
|
<a v-if="fancyBoxOptionsProperties.closeIcon?.show"
|
|
50
50
|
href="#"
|
|
51
|
-
class="button"
|
|
52
51
|
id="close-dialog"
|
|
53
52
|
:title="fancyBoxOptionsProperties.closeIcon?.tooltip"
|
|
54
53
|
ref="close-dialog"
|
|
@@ -676,6 +675,13 @@ export default FancyBox
|
|
|
676
675
|
<style lang="scss">
|
|
677
676
|
@import "../assets/styles/variables";
|
|
678
677
|
|
|
678
|
+
.cmd-fancybox {
|
|
679
|
+
> header {
|
|
680
|
+
flex-direction: row; /* avoid overwriting by global header styles */
|
|
681
|
+
align-items: center;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
679
685
|
.cmd-fancybox {
|
|
680
686
|
@media only screen and (max-width: $medium-max-width) {
|
|
681
687
|
.outer-content-wrapper {
|
|
@@ -690,8 +696,6 @@ export default FancyBox
|
|
|
690
696
|
}
|
|
691
697
|
|
|
692
698
|
> header {
|
|
693
|
-
flex-direction: row;
|
|
694
|
-
|
|
695
699
|
.button:not(#close-dialog) {
|
|
696
700
|
display: none;
|
|
697
701
|
}
|
|
@@ -13,29 +13,36 @@
|
|
|
13
13
|
<slot v-if="useSlot"></slot>
|
|
14
14
|
<!-- end default-slot-content -->
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
<template v-else v-for="(item, index) in formElements" :key="index">
|
|
17
|
+
<!-- begin loop for formElements -->
|
|
18
|
+
<CmdFormElement
|
|
19
|
+
v-if="!item.component || item.component === 'CmdFormElement'"
|
|
20
|
+
:key="index"
|
|
21
|
+
:element="item.element || 'input'"
|
|
22
|
+
:type="item.type || 'text'"
|
|
23
|
+
:name="item.name"
|
|
24
|
+
:class="item.htmlClass"
|
|
25
|
+
:id="item.id || createHtmlId()"
|
|
26
|
+
v-model="formValues[item.name]"
|
|
27
|
+
:inputValue="item.inputValue"
|
|
28
|
+
:fieldIconClass="item.innerIconClass"
|
|
29
|
+
:selectOptions="item.selectOptions"
|
|
30
|
+
:labelText="item.labelText"
|
|
31
|
+
:placeholder="item.placeholder"
|
|
32
|
+
:required="item.required"
|
|
33
|
+
:disabled="item.disabled"
|
|
34
|
+
:autocomplete="item.autocomplete"
|
|
35
|
+
:minlength="item.minlength"
|
|
36
|
+
:maxlength="item.maxlength"
|
|
37
|
+
:nativeButton="item.nativeButton"
|
|
38
|
+
/>
|
|
39
|
+
<CmdInputGroup
|
|
40
|
+
v-else-if="item.component === 'CmdInputGroup'"
|
|
41
|
+
v-model="formValues[item.name]"
|
|
42
|
+
:labelText="item.labelText"
|
|
43
|
+
:inputElements="item.inputElements"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
39
46
|
<!-- end loop for formElements -->
|
|
40
47
|
|
|
41
48
|
<div v-if="submitButtonOptions && (submitButtonOptions.position === 'insideFieldset' || submitButtonOptions.position === null)" class="flex-container no-wrap-on-small-devices">
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdMultistepFormProgressBar ---------------------------------------------------------------------------------------- -->
|
|
3
3
|
<ol :class="['cmd-multistep-form-progress-bar', {'use-gap': useGap, 'full-width': fullWidth}]">
|
|
4
|
-
<li v-for="(step, index) in multisteps" :key="index">
|
|
4
|
+
<li v-for="(step, index) in multisteps" :key="index" :class="errorLinkClass(index)">
|
|
5
5
|
<!-- begin CmdLink -->
|
|
6
6
|
<CmdLink
|
|
7
7
|
:linkType="step.linkType"
|
|
8
|
-
:class="['stretch-on-small-devices', activeLinkClass(index)]"
|
|
8
|
+
:class="['stretch-on-small-devices', activeLinkClass(index), errorLinkClass(index)]"
|
|
9
9
|
:styleAsButton="styleAsButtons"
|
|
10
10
|
:highlightLevel="highlightLevel"
|
|
11
11
|
:path="step.path"
|
|
@@ -91,9 +91,18 @@ export default {
|
|
|
91
91
|
* list of multisteps
|
|
92
92
|
*/
|
|
93
93
|
multisteps: {
|
|
94
|
-
type: Array,
|
|
94
|
+
type: Array,
|
|
95
95
|
required: true
|
|
96
96
|
},
|
|
97
|
+
/**
|
|
98
|
+
* provide a list of steps, that should be highlighted as "error"
|
|
99
|
+
*
|
|
100
|
+
* @affectStyling: true
|
|
101
|
+
*/
|
|
102
|
+
errorSteps: {
|
|
103
|
+
type: Array,
|
|
104
|
+
required: false
|
|
105
|
+
},
|
|
97
106
|
/**
|
|
98
107
|
* icon-class for separator shown between multisteps
|
|
99
108
|
*/
|
|
@@ -103,6 +112,11 @@ export default {
|
|
|
103
112
|
return "icon-chevron-one-stripe-right"
|
|
104
113
|
}
|
|
105
114
|
},
|
|
115
|
+
/**
|
|
116
|
+
* toggle if a gap between the steps should be displayes
|
|
117
|
+
*
|
|
118
|
+
* @affectStyling: true
|
|
119
|
+
*/
|
|
106
120
|
useGap: {
|
|
107
121
|
type: Boolean,
|
|
108
122
|
default: true
|
|
@@ -113,11 +127,17 @@ export default {
|
|
|
113
127
|
if(this.activeLink === index) {
|
|
114
128
|
return "active"
|
|
115
129
|
}
|
|
116
|
-
return
|
|
130
|
+
return null
|
|
131
|
+
},
|
|
132
|
+
errorLinkClass(index) {
|
|
133
|
+
if(this.errorSteps?.includes(index + 1)) {
|
|
134
|
+
return "error"
|
|
135
|
+
}
|
|
136
|
+
return null
|
|
117
137
|
},
|
|
118
138
|
clickedStep(event, index) {
|
|
119
139
|
this.activeLink = index;
|
|
120
|
-
this.$emit("click", {
|
|
140
|
+
this.$emit("click", {originalEvent: event, index: index, stepPath: this.multisteps[index]?.path})
|
|
121
141
|
},
|
|
122
142
|
getRoute(step) {
|
|
123
143
|
return getRoute(step)
|
|
@@ -152,7 +172,6 @@ export default {
|
|
|
152
172
|
}
|
|
153
173
|
}
|
|
154
174
|
|
|
155
|
-
|
|
156
175
|
.button {
|
|
157
176
|
border-radius: 0;
|
|
158
177
|
}
|
|
@@ -294,6 +313,19 @@ export default {
|
|
|
294
313
|
}
|
|
295
314
|
}
|
|
296
315
|
|
|
316
|
+
&.error {
|
|
317
|
+
.number {
|
|
318
|
+
border-color: var(--error-color);
|
|
319
|
+
color: var(--error-color);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.active {
|
|
323
|
+
.number {
|
|
324
|
+
background: var(--error-color) !important;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
297
329
|
:is(.active, .router-link-exact-active):not(.disabled) {
|
|
298
330
|
a {
|
|
299
331
|
background: var(--button-primary-background-highlighted);
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- begin CmdMultistepFormWrapper ---------------------------------------------------------------------------------------- -->
|
|
3
|
+
<div class="cmd-multistepform-wrapper">
|
|
4
|
+
<!-- begin slot for progress-bar -->
|
|
5
|
+
<slot name="progress-bar" :setCurrentPage="setCurrentPage" :numberOfPages="numberOfPages">
|
|
6
|
+
<CmdMultistepFormProgressBar
|
|
7
|
+
v-if="cmdMultistepFormProgressBar.show"
|
|
8
|
+
v-bind="cmdMultistepFormProgressBarProperties"
|
|
9
|
+
:multisteps="multisteps"
|
|
10
|
+
:activeStep="currentPage - 1"
|
|
11
|
+
:errorSteps="errorSteps"
|
|
12
|
+
@click="setCurrentPage($event.index + 1)"
|
|
13
|
+
/>
|
|
14
|
+
</slot>
|
|
15
|
+
<!-- begin slot for progress-bar -->
|
|
16
|
+
|
|
17
|
+
<div v-show="page === currentPage" :class="'multistep-page-' + page" v-for="(page, index) in numberOfPages" :key="index">
|
|
18
|
+
<CmdSystemMessage v-if="pagesWithError.some(item => item.page === page)" :systemMessage="getSystemMessage(page)" validationStatus="error" />
|
|
19
|
+
page: {{ page }}<br />
|
|
20
|
+
index: {{ index }}<br />
|
|
21
|
+
currentPage: {{ currentPage }}<br />
|
|
22
|
+
errorSteps: {{ errorSteps }}
|
|
23
|
+
|
|
24
|
+
<!-- begin slot for page content -->
|
|
25
|
+
<slot :name="'page-' + page" :setErrorOnPage="(message) => setErrorOnPage(page, message)" :removeErrorOnPage="removeErrorOnPage">
|
|
26
|
+
</slot>
|
|
27
|
+
<!-- end slot for page content -->
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- begin slot for pagination -->
|
|
31
|
+
<slot name="pagination"
|
|
32
|
+
:currentPage="currentPage"
|
|
33
|
+
:setPrevPage="setPrevPage"
|
|
34
|
+
:setNextPage="setNextPage"
|
|
35
|
+
:disabledPrevLink="currentPage === 1"
|
|
36
|
+
:disabledNextLink="currentPage === numberOfPages"
|
|
37
|
+
>
|
|
38
|
+
<CmdPagination
|
|
39
|
+
v-if="cmdPagination.show"
|
|
40
|
+
:activePage="currentPage"
|
|
41
|
+
:numberOfPages="numberOfPages"
|
|
42
|
+
v-bind="cmdPaginationProperties"
|
|
43
|
+
@click="setCurrentPage($event.page)"
|
|
44
|
+
/>
|
|
45
|
+
</slot>
|
|
46
|
+
<!-- end slot for pagination -->
|
|
47
|
+
</div>
|
|
48
|
+
<!-- end CmdMultistepFormWrapper ---------------------------------------------------------------------------------------- -->
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
export default {
|
|
53
|
+
name: "CmdMultistepFormWrapper",
|
|
54
|
+
data () {
|
|
55
|
+
return {
|
|
56
|
+
currentPage: 1,
|
|
57
|
+
pagesWithError: []
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
props: {
|
|
61
|
+
/**
|
|
62
|
+
* properties for CmdMultistepFormProgressBar-component
|
|
63
|
+
*/
|
|
64
|
+
cmdMultistepFormProgressBar: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default() {
|
|
67
|
+
return {
|
|
68
|
+
show: true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* properties for CmdMultistepFormProgressBar-component
|
|
74
|
+
*/
|
|
75
|
+
showButtonWrapper: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* properties for CmdLink-component
|
|
81
|
+
*/
|
|
82
|
+
cmdLinkPrevious: {
|
|
83
|
+
type: Object,
|
|
84
|
+
required: false
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* properties for CmdLink-component
|
|
88
|
+
*/
|
|
89
|
+
cmdLinkNext: {
|
|
90
|
+
type: Object,
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* properties for CmdPagination-component
|
|
95
|
+
*/
|
|
96
|
+
cmdPagination: {
|
|
97
|
+
type: Object,
|
|
98
|
+
default() {
|
|
99
|
+
return {
|
|
100
|
+
show: true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
mounted() {
|
|
106
|
+
console.log("slots:", this.$slots)
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
getSystemMessage(page) {
|
|
110
|
+
const pageEntry = this.pagesWithError.find(item => item.page === page);
|
|
111
|
+
return pageEntry.message
|
|
112
|
+
},
|
|
113
|
+
setErrorOnPage(page, message) {
|
|
114
|
+
const exists = this.pagesWithError.some(item => item.page === page);
|
|
115
|
+
|
|
116
|
+
if (!exists) {
|
|
117
|
+
this.pagesWithError.push({ page: page, message: message });
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
removeErrorOnPage() {
|
|
121
|
+
this.pagesWithError = []
|
|
122
|
+
},
|
|
123
|
+
setCurrentPage(page) {
|
|
124
|
+
this.currentPage = page
|
|
125
|
+
},
|
|
126
|
+
setPrevPage() {
|
|
127
|
+
if (this.currentPage > 1) {
|
|
128
|
+
this.currentPage--
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
setNextPage() {
|
|
132
|
+
if (this.currentPage < this.numberOfPages) {
|
|
133
|
+
this.currentPage++
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
computed: {
|
|
138
|
+
errorSteps() {
|
|
139
|
+
const steps = []
|
|
140
|
+
this.pagesWithError.find((item) => {
|
|
141
|
+
steps.push(item.page)
|
|
142
|
+
})
|
|
143
|
+
console.log("steps", steps)
|
|
144
|
+
|
|
145
|
+
return steps
|
|
146
|
+
},
|
|
147
|
+
multisteps() {
|
|
148
|
+
const steps = []
|
|
149
|
+
|
|
150
|
+
for (let i = 1; i <= this.numberOfPages; i++) {
|
|
151
|
+
steps.push(i);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return steps
|
|
155
|
+
},
|
|
156
|
+
numberOfPages() {
|
|
157
|
+
return Object.keys(this.$slots).filter(key => key.startsWith("page-")).length
|
|
158
|
+
},
|
|
159
|
+
cmdMultistepFormProgressBarProperties() {
|
|
160
|
+
return {
|
|
161
|
+
show: true,
|
|
162
|
+
showStepNumber: true,
|
|
163
|
+
...this.cmdMultistepFormProgressBar
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
cmdPaginationProperties() {
|
|
167
|
+
return {
|
|
168
|
+
pages: null,
|
|
169
|
+
itemsPerPage: null,
|
|
170
|
+
showPageNumbers: true,
|
|
171
|
+
linkType: "href",
|
|
172
|
+
prevLink: {
|
|
173
|
+
iconClass: "icon-chevron-one-stripe-left",
|
|
174
|
+
text: "prev",
|
|
175
|
+
showText: true
|
|
176
|
+
},
|
|
177
|
+
nextLink: {
|
|
178
|
+
iconClass: "icon-chevron-one-stripe-right",
|
|
179
|
+
text: "next",
|
|
180
|
+
showText: true
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<style>
|
|
189
|
+
|
|
190
|
+
</style>
|