comand-component-library 4.2.78 → 4.2.80

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.78",
3
+ "version": "4.2.80",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "CoManD-UI",
6
6
  "private": false,
@@ -1258,6 +1258,26 @@
1258
1258
  </CmdWidthLimitationWrapper>
1259
1259
  <!-- end main-navigation --------------------------------------------------------------------------------------------------->
1260
1260
 
1261
+ <!-- begin multistep-form-progress-bar --------------------------------------------------------------------------------------------------->
1262
+ <CmdWidthLimitationWrapper>
1263
+ <h2 class="headline-demopage" id="section-multistep-form-progress-bar">
1264
+ <span>Multistepform-Progressbar</span>
1265
+ <a href="#" class="button small icon-cog" title="Open Component Settings"
1266
+ @click.prevent="openSettingsSidebar('CmdMultistepFormProgressBar')"></a>
1267
+ </h2>
1268
+ <h3>Steps with icons</h3>
1269
+ <CmdMultistepFormProgressBar ref="CmdMultistepFormProgressBar" :multisteps="multistepsData.withIcon"
1270
+ v-bind="cmdMultistepFormProgressBarSettingsData" @click="showPageMultistep = $event.index + 1" />
1271
+ <h3>Router</h3>
1272
+ <CmdMultistepFormProgressBar ref="CmdMultistepFormProgressBar" :multisteps="multistepsData.router"
1273
+ v-bind="cmdMultistepFormProgressBarSettingsData" @click="showPageMultistep = $event.index + 1" />
1274
+ <div>
1275
+ <p>Page {{ showPageMultistep }}</p>
1276
+ </div>
1277
+ </CmdWidthLimitationWrapper>
1278
+ <!-- end multistep-form-progress-bar --------------------------------------------------------------------------------------------------->
1279
+
1280
+
1261
1281
  <!-- begin multistep-form-wrapper --------------------------------------------------------------------------------------------------->
1262
1282
  <CmdWidthLimitationWrapper>
1263
1283
  <h2 class="headline-demopage" id="section-multistep-form-wrapper">
@@ -1269,37 +1289,108 @@
1269
1289
  <h3>Data provided by property</h3>
1270
1290
  <CmdMultistepFormWrapper>
1271
1291
  <template v-slot:page-1="props">
1292
+ <h3>Page 1 - all fields required</h3>
1272
1293
  <CmdForm
1273
- :formElements="multistepFormWrapperPage1Data"
1274
- :useSlot="false" @validation-status-change="toggleSystemMessage($event, props)"
1275
- :submitButtonOptions="{show: false}"
1276
- :modelValue="props.formDataForPage"
1277
- @update:modelValue="props.updateFormDataForPage"
1278
- />
1294
+ :formElements="multistepFormWrapperPage1Data"
1295
+ :useSlot="false"
1296
+ @validation-status-change="toggleSystemMessage($event, props)"
1297
+ :submitButton="{show: false}"
1298
+ :modelValue="props.formDataForPage"
1299
+ @update:modelValue="props.updateFormDataForPage"
1300
+ />
1279
1301
  <a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a><br />
1280
1302
  <a href="#" @click.prevent="props.removeErrorOnPage">Remove Error</a>
1281
1303
  </template>
1282
1304
  <template v-slot:page-2="props">
1283
- Content Page 2<br />
1284
-
1285
- <CmdFormElement element="input" type="text" labelText="Test2" v-model="props.formDataForPage.name" />
1286
-
1305
+ <h3>Page 2 - 2/2 fields required (in slot)</h3>
1306
+ <CmdForm
1307
+ :submitButton="{show: false}"
1308
+ :cmdHeadline=" { headlineText: 'Form-Elements in Slot', headlineLevel: 3 }"
1309
+ >
1310
+ <CmdFormElement
1311
+ element="input"
1312
+ type="text"
1313
+ labelText="Telephone:"
1314
+ name="page-2-telephone"
1315
+ id="page-2-telephone"
1316
+ placeholder="Enter phone number"
1317
+ :required="true"
1318
+ :modelValue="props.formDataForPage['page-2-telephone']"
1319
+ @update:modelValue="setValue($event, 'page-2-telephone', props)"
1320
+ @validation-status-change="setValidationStatus($event, 'page-2-telephone', props)"
1321
+ />
1322
+ <CmdFormElement
1323
+ element="input"
1324
+ type="email"
1325
+ labelText="E-Mail:"
1326
+ name="page-2-email"
1327
+ id="page-2-email"
1328
+ :required="true"
1329
+ placeholder="Enter email address"
1330
+ :modelValue="props.formDataForPage['page-2-email']"
1331
+ @update:modelValue="setValue($event, 'page-2-email', props)"
1332
+ @validation-status-change="setValidationStatus($event, 'page-2-email', props)"
1333
+ />
1334
+ </CmdForm>
1287
1335
  <a href="#" @click.prevent="props.setErrorOnPage('This is an error!')">Set Error</a>
1288
1336
  </template>
1289
- <template v-slot:page-3>
1290
- Content Page 3
1337
+ <template v-slot:page-3="props">
1338
+ <h3>Page 3 - no fields required</h3>
1339
+ <CmdForm
1340
+ @validation-status-change="toggleSystemMessage($event, props)"
1341
+ :submitButton="{show: false}"
1342
+ :modelValue="props.formDataForPage"
1343
+ @update:modelValue="props.updateFormDataForPage"
1344
+ :cmdHeadline=" { headlineText: 'Form-Elements in Slot', headlineLevel: 3 }"
1345
+ >
1346
+ <CmdFormElement
1347
+ element="input"
1348
+ type="text"
1349
+ labelText="Street/No:"
1350
+ name="street-no"
1351
+ id="street-no"
1352
+ placeholder="Enter street and number"
1353
+ v-model="props.formDataForPage.streetNo"
1354
+ />
1355
+ <div class="input-wrapper">
1356
+ <CmdFormElement
1357
+ element="input"
1358
+ type="number"
1359
+ labelText="Zip:"
1360
+ name="zip"
1361
+ id="zip"
1362
+ v-model="props.formDataForPage.zip"
1363
+ />
1364
+ <CmdFormElement
1365
+ element="input"
1366
+ type="text"
1367
+ labelText="City:"
1368
+ name="city"
1369
+ id="city"
1370
+ v-model="props.formDataForPage.city"
1371
+ />
1372
+ </div>
1373
+ </CmdForm>
1291
1374
  </template>
1292
1375
  <template v-slot:page-4>
1376
+ <h3>Page 4</h3>
1293
1377
  Content Page 4
1294
1378
  </template>
1295
1379
  <template v-slot:page-5="props">
1380
+ <h3>Page 5</h3>
1296
1381
  <CmdForm
1297
- :formElements="multistepFormWrapperPage1Data"
1298
- :useSlot="false"
1299
- @validation-status-change="toggleSystemMessage($event, props)"
1300
- :submitButton="{disabled: props.atleastOnePageWithError}" />
1382
+ :formElements="multistepFormWrapperPage1Data"
1383
+ :useSlot="false"
1384
+ @validation-status-change="toggleSystemMessage($event, props)"
1385
+ :submitButton="{disabled: props.atleastOnePageWithError}"
1386
+ :cancelButton="{ show: false}"
1387
+ />
1301
1388
  props.atleastOnPageWithError: {{ props.atleastOnePageWithError }}
1302
1389
  </template>
1390
+ <twmplate>
1391
+ <h3>Page 6 - Confirmation</h3>
1392
+ <p>Thank you for seding your request!</p>
1393
+ </twmplate>
1303
1394
  </CmdMultistepFormWrapper>
1304
1395
  <h3>Data provided by slot</h3>
1305
1396
  <CmdMultistepFormWrapper>
@@ -1373,25 +1464,6 @@
1373
1464
  </CmdWidthLimitationWrapper>
1374
1465
  <!-- end multistep-form-wrapper --------------------------------------------------------------------------------------------------->
1375
1466
 
1376
- <!-- begin multistep-form-progress-bar --------------------------------------------------------------------------------------------------->
1377
- <CmdWidthLimitationWrapper>
1378
- <h2 class="headline-demopage" id="section-multistep-form-progress-bar">
1379
- <span>Multistepform-Progressbar</span>
1380
- <a href="#" class="button small icon-cog" title="Open Component Settings"
1381
- @click.prevent="openSettingsSidebar('CmdMultistepFormProgressBar')"></a>
1382
- </h2>
1383
- <h3>Steps with icons</h3>
1384
- <CmdMultistepFormProgressBar ref="CmdMultistepFormProgressBar" :multisteps="multistepsData.withIcon"
1385
- v-bind="cmdMultistepFormProgressBarSettingsData" @click="showPageMultistep = $event.index + 1" />
1386
- <h3>Router</h3>
1387
- <CmdMultistepFormProgressBar ref="CmdMultistepFormProgressBar" :multisteps="multistepsData.router"
1388
- v-bind="cmdMultistepFormProgressBarSettingsData" @click="showPageMultistep = $event.index + 1" />
1389
- <div>
1390
- <p>Page {{ showPageMultistep }}</p>
1391
- </div>
1392
- </CmdWidthLimitationWrapper>
1393
- <!-- end multistep-form-progress-bar --------------------------------------------------------------------------------------------------->
1394
-
1395
1467
  <!-- begin newsletter-subscription --------------------------------------------------------------------------------------------------->
1396
1468
  <CmdWidthLimitationWrapper>
1397
1469
  <h2 class="headline-demopage" id="section-newsletter-subscription">
@@ -2006,6 +2078,7 @@ export default {
2006
2078
  inputPassword: "",
2007
2079
  inputField1: "",
2008
2080
  inputFieldRequired: "",
2081
+ formElementsWithError: ["page-2-telephone", "page-2-email"],
2009
2082
  componentName: "",
2010
2083
  componentProps: {},
2011
2084
  componentSettings: {},
@@ -2118,6 +2191,22 @@ export default {
2118
2191
  }
2119
2192
  },
2120
2193
  methods: {
2194
+ setValue(event, itemName, props) {
2195
+ const data = {
2196
+ ...props.formDataForPage,
2197
+ [itemName]: event
2198
+ }
2199
+ props.updateFormDataForPage(data)
2200
+ },
2201
+ setValidationStatus(event, itemName, props) {
2202
+ if (event === "error" && !this.formElementsWithError.some(entry => entry.name === itemName)) {
2203
+ this.formElementsWithError.push(itemName)
2204
+ } else if (event === "success" && this.formElementsWithError.includes(itemName)) {
2205
+ this.formElementsWithError = this.formElementsWithError.filter((element) => element !== itemName)
2206
+ }
2207
+ const status = this.formElementsWithError.length > 0 ? "error" : "success"
2208
+ this.toggleSystemMessage(status, props)
2209
+ },
2121
2210
  outputFormData(event) {
2122
2211
  console.log("outputFormData", event)
2123
2212
  },
@@ -2125,7 +2214,6 @@ export default {
2125
2214
  alert(text)
2126
2215
  },
2127
2216
  toggleSystemMessage(event, props) {
2128
- console.log("event", event)
2129
2217
  if(event === "error") {
2130
2218
  props.setErrorOnPage("Please fill all required fields!")
2131
2219
  } else {
@@ -4,6 +4,7 @@
4
4
  "type": "text",
5
5
  "name": "form-element-text-name",
6
6
  "htmlClass": "form-element-text-class",
7
+ "id": "form-element-text-id",
7
8
  "value": "",
8
9
  "fieldIconClass": "icon-lock",
9
10
  "labelText": "Text input",
@@ -17,12 +18,13 @@
17
18
  {
18
19
  "element": "input",
19
20
  "type": "text",
20
- "name": "form-element-text-name",
21
+ "name": "form-element-username",
21
22
  "htmlClass": "form-element-text-class",
22
- "id": "form-element-text-id",
23
+ "id": "form-element-username",
23
24
  "value": "default value",
24
25
  "fieldIconClass": "icon-cogs",
25
26
  "labelText": "Username input",
27
+ "placeholder": "Placeholdertext",
26
28
  "required": true,
27
29
  "disabled": false
28
30
  },
@@ -23,8 +23,8 @@
23
23
  "LoginForm",
24
24
  "MailTool",
25
25
  "MainNavigation",
26
- "MultistepFormWrapper",
27
26
  "MultistepFormProgressBar",
27
+ "MultistepFormWrapper",
28
28
  "NewsletterSubscription",
29
29
  "OpeningHours",
30
30
  "PageFooter",
@@ -3,7 +3,7 @@
3
3
  {
4
4
  "id": 1,
5
5
  "cmdImage": {
6
- "src": "/public/media/images/user-images/fake-user-1.jpg",
6
+ "src": "/media/images/user-images/fake-user-1.jpg",
7
7
  "alt": "User image"
8
8
  },
9
9
  "contactFullName": "Name Sender #1",
@@ -14,7 +14,7 @@
14
14
  {
15
15
  "id": 2,
16
16
  "cmdImage": {
17
- "src": "/public/media/images/user-images/fake-user-2.jpg",
17
+ "src": "/media/images/user-images/fake-user-2.jpg",
18
18
  "alt": "User image"
19
19
  },
20
20
  "contactFullName": "Name Sender #2",
@@ -27,7 +27,7 @@
27
27
  {
28
28
  "id": 3,
29
29
  "cmdImage": {
30
- "src": "/public/media/images/user-images/fake-user-2.jpg",
30
+ "src": "/media/images/user-images/fake-user-2.jpg",
31
31
  "alt": "User image"
32
32
  },
33
33
  "contactFullName": "Name Receiver #1",
@@ -38,7 +38,7 @@
38
38
  {
39
39
  "id": 4,
40
40
  "cmdImage": {
41
- "src": "/public/media/images/user-images/fake-user-3.jpg",
41
+ "src": "/media/images/user-images/fake-user-3.jpg",
42
42
  "alt": "User image"
43
43
  },
44
44
  "contactFullName": "Name Receiver #2",
@@ -8,7 +8,18 @@
8
8
  legendOptions.text
9
9
  }}
10
10
  </legend>
11
- <CmdSystemMessage v-if="systemMessage.show && systemMessage.message" :validationStatus="systemMessage.validationStatus" :systemMessage="systemMessage.message"/>
11
+
12
+ <CmdHeadline
13
+ v-if="cmdHeadline?.headlineText"
14
+ v-bind="cmdHeadline"
15
+ />
16
+
17
+ <CmdSystemMessage
18
+ v-if="systemMessage.show && systemMessage.message"
19
+ :validationStatus="systemMessage.validationStatus"
20
+ :systemMessage="systemMessage.message"
21
+ />
22
+
12
23
  <!-- begin default-slot-content -->
13
24
  <slot v-if="useSlot"></slot>
14
25
  <!-- end default-slot-content -->
@@ -27,6 +38,7 @@
27
38
  :inputValue="item.inputValue"
28
39
  :fieldIconClass="item.innerIconClass"
29
40
  :selectOptions="item.selectOptions"
41
+ :toggleSwitch="item.toggleSwitch"
30
42
  :labelText="item.labelText"
31
43
  :placeholder="item.placeholder"
32
44
  :required="item.required"
@@ -35,6 +47,7 @@
35
47
  :minlength="item.minlength"
36
48
  :maxlength="item.maxlength"
37
49
  :nativeButton="item.nativeButton"
50
+ :colored="item.colored"
38
51
  @validation-status-change="formElementHasError($event, item.name)"
39
52
  />
40
53
  <CmdInputGroup
@@ -42,6 +55,8 @@
42
55
  v-model="formValues[item.name]"
43
56
  :labelText="item.labelText"
44
57
  :inputElements="item.inputElements"
58
+ :toggleSwitches="item.toggleSwitches"
59
+ :colored="item.colored"
45
60
  />
46
61
  <div
47
62
  v-else-if="item.component === 'flexContainer'"
@@ -58,6 +73,7 @@
58
73
  :id="item.id || createHtmlId()"
59
74
  v-model="formValues[item.name]"
60
75
  :inputValue="item.inputValue"
76
+ :toggleSwitch="item.toggleSwitch"
61
77
  :fieldIconClass="item.innerIconClass"
62
78
  :selectOptions="item.selectOptions"
63
79
  :labelText="item.labelText"
@@ -75,6 +91,8 @@
75
91
  v-model="formValues[item.name]"
76
92
  :labelText="item.labelText"
77
93
  :inputElements="item.inputElements"
94
+ :toggleSwitches="item.toggleSwitches"
95
+ :colored="item.colored"
78
96
  />
79
97
  </template>
80
98
  </div>
@@ -85,7 +103,7 @@
85
103
  <small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
86
104
  <!-- begin cancel-button (below fieldset) -->
87
105
  <button
88
- v-if="cancelButtonOptions !== undefined"
106
+ v-if="cancelButtonOptions.show"
89
107
  :class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
90
108
  type="button"
91
109
  @click="cancelFormSubmit"
@@ -249,18 +267,28 @@ export default {
249
267
  type: Object,
250
268
  required: false
251
269
  },
252
- /**
270
+ /**
253
271
  * submit-button to submit all form-data
254
272
  */
255
273
  submitButton: {
256
274
  type: Object,
257
275
  required: false
276
+ },
277
+ /**
278
+ * properties for CmdHeadline-component
279
+ */
280
+ cmdHeadline: {
281
+ type: Object,
282
+ required: false
258
283
  }
259
284
  },
260
285
  mounted() {
261
- // get the names of all elements that match the phrase and push to data-property
262
- const requiredElementNames = this.formElements?.filter(element => element.required === true).map(element => element.name);
263
- this.formElementsWithError.push(requiredElementNames)
286
+ // get the names of all elements that match the phrase and push to data-property to initially collect all required field to set correct validationStatus for form
287
+ const requiredElementNames = this.formElements?.filter(element => element.required === true).map(element => element.name)
288
+
289
+ requiredElementNames?.forEach((name) => {
290
+ this.formElementsWithError.push(name)
291
+ })
264
292
  },
265
293
  computed: {
266
294
  legendOptions() {
@@ -297,13 +325,12 @@ export default {
297
325
  },
298
326
  methods: {
299
327
  formElementHasError(event, itemName) {
300
- if (event === "error" && !this.formElementsWithError.includes(itemName)) {
328
+ if (event === "error" && !this.formElementsWithError.some(entry => entry.name === itemName)) {
301
329
  this.formElementsWithError.push(itemName)
302
330
  } else if (event === "success" && this.formElementsWithError.includes(itemName)) {
303
331
  this.formElementsWithError = this.formElementsWithError.filter((element) => element !== itemName)
304
332
  }
305
- console.log("event in CmdForm", event)
306
- console.log("itemName in CmdForm", itemName)
333
+
307
334
  this.$emit("validation-status-change", this.formElementsWithError.length ? "error" : "success")
308
335
  },
309
336
  createHtmlId,
@@ -32,7 +32,7 @@
32
32
  <!-- end headline with pre-headline-text -->
33
33
 
34
34
  <!-- begin headline without pre-headline-text -->
35
- <component v-else :is="headlineTag">
35
+ <component v-else :is="headlineTag" :class="[highlightLevel, headlineTextAlign]">
36
36
  <!-- begin CmdIcon -->
37
37
  <CmdIcon v-if="cmdIcon" v-bind="cmdIcon"/>
38
38
  <!-- end CmdIcon -->
@@ -211,7 +211,7 @@ export default {
211
211
  }
212
212
 
213
213
  &:hover, &:active, &:focus {
214
- border-color: var(--hyperlink-color-highlighted)M
214
+ border-color: var(--hyperlink-color-highlighted);
215
215
  }
216
216
  }
217
217
  }
@@ -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" :class="errorLinkClass(index)">
4
+ <li v-for="(step, index) in multisteps" :key="index" :class="[errorLinkClass(index), successLinkClass(index)]">
5
5
  <!-- begin CmdLink -->
6
6
  <CmdLink
7
7
  :linkType="step.linkType"
8
- :class="['stretch-on-small-devices', activeLinkClass(index), errorLinkClass(index)]"
8
+ :class="['stretch-on-small-devices', activeLinkClass(index), errorLinkClass(index), successLinkClass(index)]"
9
9
  :styleAsButton="styleAsButtons"
10
10
  :highlightLevel="highlightLevel"
11
11
  :path="step.path"
@@ -103,6 +103,15 @@ export default {
103
103
  type: Array,
104
104
  required: false
105
105
  },
106
+ /**
107
+ * provide a list of steps, that should be highlighted as "success"
108
+ *
109
+ * @affectStyling: true
110
+ */
111
+ successSteps: {
112
+ type: Array,
113
+ required: false
114
+ },
106
115
  /**
107
116
  * icon-class for separator shown between multisteps
108
117
  */
@@ -125,13 +134,19 @@ export default {
125
134
  methods: {
126
135
  activeLinkClass(index) {
127
136
  if(this.activeLink === index) {
128
- return "active"
137
+ return "active"
129
138
  }
130
139
  return null
131
140
  },
132
141
  errorLinkClass(index) {
133
142
  if(this.errorSteps?.includes(index + 1)) {
134
- return "error"
143
+ return "error"
144
+ }
145
+ return null
146
+ },
147
+ successLinkClass(index) {
148
+ if(this.successSteps?.includes(index + 1)) {
149
+ return "success"
135
150
  }
136
151
  return null
137
152
  },
@@ -326,6 +341,19 @@ export default {
326
341
  }
327
342
  }
328
343
 
344
+ &.success {
345
+ .number {
346
+ border-color: var(--success-color);
347
+ color: var(--success-color);
348
+ }
349
+
350
+ .active {
351
+ .number {
352
+ background: var(--success-color) !important;
353
+ }
354
+ }
355
+ }
356
+
329
357
  :is(.active, .router-link-exact-active):not(.disabled) {
330
358
  a {
331
359
  background: var(--button-primary-background-highlighted);
@@ -9,6 +9,7 @@
9
9
  :multisteps="multisteps"
10
10
  :activeStep="currentPage - 1"
11
11
  :errorSteps="errorSteps"
12
+ :successSteps="successSteps"
12
13
  @click="setCurrentPage($event.index + 1)"
13
14
  />
14
15
  </slot>
@@ -56,7 +57,7 @@ export default {
56
57
  return {
57
58
  currentPage: 1,
58
59
  statusForPages: [],
59
- inputMade: false,
60
+ inputMade: [],
60
61
  formData: {}
61
62
  }
62
63
  },
@@ -121,8 +122,10 @@ export default {
121
122
  },
122
123
  setErrorOnPage(page, message) {
123
124
  const exists = this.statusForPages.some(item => item.page === page);
124
-
125
- this.inputMade = true
125
+
126
+ if(!this.inputMade.includes(page)) {
127
+ this.inputMade.push(page)
128
+ }
126
129
 
127
130
  if (!exists) {
128
131
  this.statusForPages.push({ page: page, message: message });
@@ -130,8 +133,10 @@ export default {
130
133
  },
131
134
  removeErrorOnPage(page) {
132
135
  const index = this.statusForPages.findIndex(item => item.page === page);
133
-
134
- this.inputMade = true
136
+
137
+ if(!this.inputMade.includes(page)) {
138
+ this.inputMade.push(page)
139
+ }
135
140
 
136
141
  if (index !== -1) {
137
142
  this.statusForPages.splice(index, 1);
@@ -153,19 +158,36 @@ export default {
153
158
  },
154
159
  computed: {
155
160
  atleastOnePageWithError() {
156
- return this.statusForPages.length > 0 || !this.inputMade
161
+ return this.statusForPages.length > 0 || this.inputMade.length === 0
157
162
  },
158
163
  pageHasError() {
159
164
  return this.statusForPages.some((item) => {
160
165
  return item.page === this.currentPage
161
166
  })
162
167
  },
168
+ successSteps() {
169
+ const steps = []
170
+
171
+ if(this.inputMade.length) {
172
+ for(let i = 0; i < this.numberOfPages; i++) {
173
+ const success = !this.statusForPages.find((item) => {
174
+ return item.page === i + 1
175
+ })
176
+
177
+ // if no statusForPages is found (all pages are 'success' ant at least one input was made)
178
+ if(success && this.inputMade.includes(i + 1)) {
179
+ steps.push(i + 1)
180
+ }
181
+ }
182
+ }
183
+
184
+ return steps
185
+ },
163
186
  errorSteps() {
164
187
  const steps = []
165
- this.statusForPages.find((item) => {
188
+ this.statusForPages.forEach((item) => {
166
189
  steps.push(item.page)
167
190
  })
168
- console.log("steps", steps)
169
191
 
170
192
  return steps
171
193
  },
@@ -211,5 +233,9 @@ export default {
211
233
  </script>
212
234
 
213
235
  <style>
214
-
236
+ .cmd-multistepform-wrapper {
237
+ display: flex;
238
+ flex-direction: column;
239
+ gap: var(--default-gap);
240
+ }
215
241
  </style>
@@ -3,7 +3,7 @@
3
3
  <transition :name="transition">
4
4
  <div
5
5
  v-if="showSystemMessage"
6
- :class="['cmd-system-message', 'system-message', 'flex-container', 'vertical', { 'full-width': fullWidth }, 'text-align-' + textAlign, validationStatus]"
6
+ :class="['cmd-system-message', 'system-message', 'flex-container', 'flex-direction-column', { 'full-width': fullWidth }, systemMessageTextAlign, validationStatus]"
7
7
  :role="validationStatus === 'error' ? 'alert' : 'dialog'"
8
8
  :aria-labelledby="htmlId"
9
9
  >
@@ -161,6 +161,19 @@ export default {
161
161
  }
162
162
  }
163
163
  return null
164
+ },
165
+ systemMessageTextAlign() {
166
+ if (this.textAlign) {
167
+ switch (this.textAlign) {
168
+ case "right":
169
+ return "align-items-flex-end"
170
+ case "center":
171
+ return "align-items-center"
172
+ default:
173
+ return "align-items-flex-start"
174
+ }
175
+ }
176
+ return ""
164
177
  }
165
178
  },
166
179
  methods: {
@@ -182,9 +195,12 @@ export default {
182
195
  .cmd-system-message {
183
196
  display: inline-flex;
184
197
  margin: var(--default-margin) 0;
185
- align-items: center;
186
198
  align-self: flex-start; /* if used in flex-container component should not be stretched */
187
199
 
200
+ .message-headline {
201
+ margin: 0; /* overwrite default-settings from frontend-framework */
202
+ }
203
+
188
204
  > :last-child {
189
205
  margin-bottom: 0;
190
206
  }