comand-component-library 4.3.27 → 5.0.0
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 +7568 -7448
- package/dist/styles/demopage-only.css +35 -1
- package/package.json +47 -46
- package/src/ComponentLibrary.vue +2697 -2688
- package/src/assets/data/component-structure.json +1 -1
- package/src/assets/data/form-elements.json +224 -224
- package/src/assets/data/social-networks-page-by-json.json +43 -43
- package/src/assets/styles/component-library-global-styles.scss +296 -295
- package/src/componentSettingsDataAndControls.vue +1 -18
- package/src/components/CmdAccordion.vue +1 -1
- package/src/components/CmdAddressData.vue +6 -1
- package/src/components/CmdAddressDataItem.vue +6 -1
- package/src/components/CmdBasicForm.vue +2 -2
- package/src/components/CmdBox.vue +1103 -1086
- package/src/components/CmdBoxWrapper.vue +11 -1
- package/src/components/CmdBreadcrumbs.vue +2 -2
- package/src/components/CmdCodeOutput.vue +1 -1
- package/src/components/CmdContainer.vue +13 -1
- package/src/components/CmdCookieDisclaimer.vue +480 -480
- package/src/components/CmdFakeSelect.vue +930 -917
- package/src/components/CmdFlexibleScrollContainer.vue +42 -42
- package/src/components/CmdForm.vue +481 -481
- package/src/components/CmdFormElement.vue +1110 -1091
- package/src/components/CmdFormFilters.vue +146 -146
- package/src/components/CmdGoogleMaps.vue +1 -1
- package/src/components/CmdHeadline.vue +21 -4
- package/src/components/CmdIcon.vue +8 -2
- package/src/components/CmdImage.vue +27 -21
- package/src/components/CmdImageZoom.vue +9 -8
- package/src/components/CmdInputGroup.vue +436 -435
- package/src/components/CmdLink.vue +1 -1
- package/src/components/CmdList.vue +3 -3
- package/src/components/CmdListOfRequirements.vue +192 -192
- package/src/components/CmdLoginForm.vue +618 -618
- package/src/components/CmdMailToolFilter.vue +217 -217
- package/src/components/CmdMainNavigation.vue +581 -572
- package/src/components/CmdMultistepFormProgressBar.vue +9 -9
- package/src/components/CmdNewsletterSubscription.vue +199 -199
- package/src/components/CmdPagination.vue +4 -2
- package/src/components/CmdParagraph.vue +10 -4
- package/src/components/CmdProgressBar.vue +72 -72
- package/src/components/CmdSiteHeader.vue +382 -389
- package/src/components/CmdSiteSearch.vue +420 -420
- package/src/components/CmdSiteWrapper.vue +12 -5
- package/src/components/CmdSlideshow.vue +519 -519
- package/src/components/CmdSmartSearch.vue +291 -291
- package/src/components/CmdSystemMessage.vue +3 -2
- package/src/components/CmdTable.vue +401 -401
- package/src/components/CmdTabs.vue +262 -262
- package/src/components/CmdTag.vue +2 -2
- package/src/components/CmdTextImageBlock.vue +8 -2
- package/src/components/CmdThumbnailScroller.vue +0 -7
- package/src/components/CmdToast.vue +1 -1
- package/src/components/CmdToggleDarkMode.vue +13 -11
- package/src/components/CmdTooltip.vue +305 -301
- package/src/components/CmdUploadForm.vue +1299 -1305
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/components/EditComponentWrapper.vue +5 -5
- package/src/index.js +5 -0
- package/src/main.js +4 -3
- package/src/utils/template.js +57 -0
- package/dist/styles/templates/casual.css +0 -3
- package/src/assets/styles/template.css +0 -1
|
@@ -1,436 +1,437 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- begin CmdInputGroup ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div :class="[
|
|
4
|
-
'cmd-input-group label',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
type:
|
|
132
|
-
default:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
* set
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* @
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
type:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
value === "
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* @affectsStyling: true
|
|
193
|
-
*/
|
|
194
|
-
|
|
195
|
-
type:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
*
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
|
-
type: Boolean,
|
|
214
|
-
default: false
|
|
215
|
-
},
|
|
216
|
-
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
*
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
*
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
type: Boolean,
|
|
264
|
-
default: false
|
|
265
|
-
},
|
|
266
|
-
/**
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/* overwrite default behavior from frontend-framework */
|
|
372
|
-
|
|
373
|
-
display:
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
&:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
&.multiple-switch {
|
|
415
|
-
&.error {
|
|
416
|
-
--status-color: var(--error-color);
|
|
417
|
-
|
|
418
|
-
label {
|
|
419
|
-
border-color: var(--error-color);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
color: var(--error-color);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
&:is(:hover, :active, :focus) {
|
|
426
|
-
|
|
427
|
-
color: var(--hyperlink-color-highlighted);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<!-- begin CmdInputGroup ---------------------------------------------------------------------------------------- -->
|
|
3
|
+
<div :class="[
|
|
4
|
+
'cmd-input-group label',
|
|
5
|
+
{
|
|
6
|
+
'has-state': validationStatus,
|
|
7
|
+
inline: labelInline,
|
|
8
|
+
'multiple-switch': multipleSwitch,
|
|
9
|
+
disabled: disableGroup,
|
|
10
|
+
'toggle-switches': toggleSwitches
|
|
11
|
+
}
|
|
12
|
+
]" :aria-labelledby="htmlId">
|
|
13
|
+
|
|
14
|
+
<!-- begin label -->
|
|
15
|
+
<span v-show="showLabel" class="label-text">
|
|
16
|
+
<span :id="htmlId">{{ labelText }}<sup v-if="required" aria-hidden="true">*</sup></span>
|
|
17
|
+
|
|
18
|
+
<!-- begin status-icon (linked with tooltip) -->
|
|
19
|
+
<button v-if="($attrs.required || inputRequirements.length) && showStatusIcon" type="button"
|
|
20
|
+
class="no-style" :title="validationTooltip" :aria-errormessage="tooltipId" aria-live="assertive"
|
|
21
|
+
:popovertarget="'tooltip-target-' + htmlId" :style="'anchor-name: --tooltip-anchor-' + htmlId">
|
|
22
|
+
<!-- begin CmdIcon -->
|
|
23
|
+
<CmdIcon :iconClass="getStatusIconClass" />
|
|
24
|
+
<!-- end CmdIcon -->
|
|
25
|
+
</button>
|
|
26
|
+
<!-- end status-icon (linked with tooltip) -->
|
|
27
|
+
|
|
28
|
+
<!-- begin CmdTooltip -->
|
|
29
|
+
<CmdTooltip ref="tooltip" class="cmd-tooltip-for-form-elements box"
|
|
30
|
+
:id="'tooltip-target-' + htmlId" :scrollContainer="scrollContainerForTooltip"
|
|
31
|
+
:popoverTargetName="'tooltip-target-' + htmlId" :validationStatus="validationStatus"
|
|
32
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'" :toggle-visibility-by-click="true"
|
|
33
|
+
:style="'position-anchor: --tooltip-anchor-' + htmlId">
|
|
34
|
+
|
|
35
|
+
<!-- begin CmdListOfRequirements -->
|
|
36
|
+
<CmdListOfRequirements v-if="cmdListOfRequirementsProperties.showRequirements"
|
|
37
|
+
v-bind="cmdListOfRequirementsProperties" />
|
|
38
|
+
<!-- end CmdListOfRequirements -->
|
|
39
|
+
</CmdTooltip>
|
|
40
|
+
<!-- end CmdTooltip -->
|
|
41
|
+
</span>
|
|
42
|
+
<!-- end label -->
|
|
43
|
+
|
|
44
|
+
<!-- begin view without slot -->
|
|
45
|
+
<span v-if="!useSlot" :class="['flex-container',
|
|
46
|
+
{
|
|
47
|
+
'vertical': orientation === 'vertical',
|
|
48
|
+
'no-gap': multipleSwitch,
|
|
49
|
+
'switch-wrapper': multipleSwitch
|
|
50
|
+
},
|
|
51
|
+
stretchHorizontally ? 'stretch-horizontally' : 'flex-items-flex-none'
|
|
52
|
+
]">
|
|
53
|
+
<CmdFormElement v-for="(inputElement, index) in inputElements" :type="inputTypes" :id="inputElement.id"
|
|
54
|
+
:name="inputElement.name" :value="inputElement.value" :disabled="inputElement.disabled"
|
|
55
|
+
:labelText="inputElement.labelText" :toggleSwitch="true" :colored="true" v-model="inputValue"
|
|
56
|
+
:key="index">
|
|
57
|
+
<template #labeltext>
|
|
58
|
+
<CmdIcon v-if="multipleSwitch && inputElement.iconClass" :iconClass="inputElement.iconClass"
|
|
59
|
+
:type="inputElement.iconType" />
|
|
60
|
+
<span v-if="inputElement.labelText" class="label-text">{{ inputElement.labelText }}</span>
|
|
61
|
+
</template>
|
|
62
|
+
</CmdFormElement>
|
|
63
|
+
</span>
|
|
64
|
+
<!-- end view without slot -->
|
|
65
|
+
|
|
66
|
+
<!-- begin useSlot -->
|
|
67
|
+
<div v-else class="flex-container flex-none">
|
|
68
|
+
<!-- begin slot -->
|
|
69
|
+
<slot></slot>
|
|
70
|
+
<!-- end slot -->
|
|
71
|
+
</div>
|
|
72
|
+
<!-- end useSlot -->
|
|
73
|
+
</div>
|
|
74
|
+
<!-- end CmdInputGroup ---------------------------------------------------------------------------------------- -->
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script>
|
|
78
|
+
// import mixins
|
|
79
|
+
import FieldValidation from "../mixins/FieldValidation.js"
|
|
80
|
+
import Identifier from "../mixins/Identifier"
|
|
81
|
+
import Tooltip from "../mixins/Tooltip.js"
|
|
82
|
+
import DefaultMessageProperties from "../mixins/CmdFormElement/DefaultMessageProperties"
|
|
83
|
+
|
|
84
|
+
export default {
|
|
85
|
+
mixins: [
|
|
86
|
+
DefaultMessageProperties,
|
|
87
|
+
FieldValidation,
|
|
88
|
+
Identifier,
|
|
89
|
+
Tooltip
|
|
90
|
+
],
|
|
91
|
+
emits: ["validation-status-change", "update:modelValue"],
|
|
92
|
+
props: {
|
|
93
|
+
/**
|
|
94
|
+
* set value for v-model (must be named modelValue in vue3 if default v-model should be used)
|
|
95
|
+
*/
|
|
96
|
+
modelValue: {
|
|
97
|
+
type: [Array, String],
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* specify a scroll-container which scrolling hides the tooltip
|
|
102
|
+
*/
|
|
103
|
+
scrollContainerForTooltip: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: false
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* set orientation
|
|
109
|
+
*
|
|
110
|
+
* @allowedValues = horizontal, vertical
|
|
111
|
+
*/
|
|
112
|
+
orientation: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: 'horizontal',
|
|
115
|
+
validator(value) {
|
|
116
|
+
return value === "horizontal" ||
|
|
117
|
+
value === "vertical"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* set if input-group should be required
|
|
122
|
+
*/
|
|
123
|
+
required: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: false
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* activate if interactive status-icon (to show requirements) should be shown inline with label
|
|
129
|
+
*/
|
|
130
|
+
showStatusIcon: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: false
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* on/off-, yes/no-color-styling
|
|
136
|
+
*
|
|
137
|
+
* set to true, if checkbox/radio-buttons should have green/checked and red/unchecked color-coding
|
|
138
|
+
* toggleSwitch-prop must be set to "true"
|
|
139
|
+
* element-prop must be set to "input" and type-attribute must be set to "checkbox" or "radio"
|
|
140
|
+
*
|
|
141
|
+
* @affectsStyling: true
|
|
142
|
+
*/
|
|
143
|
+
colored: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* list of input-elements inside group
|
|
149
|
+
*
|
|
150
|
+
* useSlot-property must be set to 'false'
|
|
151
|
+
*/
|
|
152
|
+
inputElements: {
|
|
153
|
+
type: Array,
|
|
154
|
+
required: false
|
|
155
|
+
},
|
|
156
|
+
/**
|
|
157
|
+
* set type for inputs in group
|
|
158
|
+
*
|
|
159
|
+
* @allowedValues: checkbox, radio
|
|
160
|
+
*/
|
|
161
|
+
inputTypes: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: "radio",
|
|
164
|
+
validator(value) {
|
|
165
|
+
return value === "checkbox" ||
|
|
166
|
+
value === "radio"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* set status for label and inner form-elements
|
|
171
|
+
*
|
|
172
|
+
* @allowedValues: "", error, warning, success, info
|
|
173
|
+
*
|
|
174
|
+
* @affectsStyling: true
|
|
175
|
+
*/
|
|
176
|
+
status: {
|
|
177
|
+
type: String,
|
|
178
|
+
required: false,
|
|
179
|
+
validator(value) {
|
|
180
|
+
return value === "" ||
|
|
181
|
+
value === "error" ||
|
|
182
|
+
value === "warning" ||
|
|
183
|
+
value === "success" ||
|
|
184
|
+
value === "info"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* for replacing native checkboxes/radio-buttons by custom ones (based on frontend-framework)
|
|
189
|
+
*
|
|
190
|
+
* toggleSwitches-property must be set to 'false'
|
|
191
|
+
*
|
|
192
|
+
* @affectsStyling: true
|
|
193
|
+
*/
|
|
194
|
+
replaceInputType: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: false
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* for replacing native checkboxes/radio-buttons by toggle-switches (based on frontend-framework)
|
|
200
|
+
*
|
|
201
|
+
* replaceInputType-property must be set to 'false'
|
|
202
|
+
*
|
|
203
|
+
* @affectsStyling: true
|
|
204
|
+
*/
|
|
205
|
+
toggleSwitches: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
default: false
|
|
208
|
+
},
|
|
209
|
+
/**
|
|
210
|
+
* activate if input-elements should be given by slot
|
|
211
|
+
*/
|
|
212
|
+
useSlot: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: false
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* toggle multipleSwitch-styling
|
|
218
|
+
*
|
|
219
|
+
* @affectsStyling: true
|
|
220
|
+
*/
|
|
221
|
+
multipleSwitch: {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
default: false
|
|
224
|
+
},
|
|
225
|
+
/**
|
|
226
|
+
* toggle label-text visibility
|
|
227
|
+
*/
|
|
228
|
+
showLabel: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
default: true
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
* label-text for input-group
|
|
234
|
+
*
|
|
235
|
+
* @requiredForAccessibility: true
|
|
236
|
+
*/
|
|
237
|
+
labelText: {
|
|
238
|
+
type: String,
|
|
239
|
+
required: true
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* toggle label-position (inline/left of input-elements or above input-elements)
|
|
243
|
+
*/
|
|
244
|
+
labelInline: {
|
|
245
|
+
type: Boolean,
|
|
246
|
+
default: false
|
|
247
|
+
},
|
|
248
|
+
/**
|
|
249
|
+
* toggle if input-elements will be stretched horizontally
|
|
250
|
+
*
|
|
251
|
+
* @affectsStyling: true
|
|
252
|
+
*/
|
|
253
|
+
stretchHorizontally: {
|
|
254
|
+
type: Boolean,
|
|
255
|
+
default: false
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* define disabled-property to set disabled-style
|
|
259
|
+
*
|
|
260
|
+
* component cannot handle native disabled-attribute, because it is no native form-element
|
|
261
|
+
*/
|
|
262
|
+
disableGroup: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
default: false
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* properties for CmdListOfRequirements-component
|
|
268
|
+
*/
|
|
269
|
+
cmdListOfRequirements: {
|
|
270
|
+
type: Object,
|
|
271
|
+
required: false
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
methods: {
|
|
275
|
+
updateStatus() {
|
|
276
|
+
if (this.required) {
|
|
277
|
+
if (this.inputValue?.length) {
|
|
278
|
+
this.validationStatus = "success"
|
|
279
|
+
return
|
|
280
|
+
}
|
|
281
|
+
this.validationStatus = "error"
|
|
282
|
+
return
|
|
283
|
+
}
|
|
284
|
+
this.validationStatus = this.status
|
|
285
|
+
|
|
286
|
+
this.$emit("validation-status-change", this.validationStatus)
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
computed: {
|
|
290
|
+
cmdListOfRequirementsProperties() {
|
|
291
|
+
return {
|
|
292
|
+
showRequirements: true,
|
|
293
|
+
validationTooltip: "",
|
|
294
|
+
inputRequirements: [],
|
|
295
|
+
inputAttributes: {},
|
|
296
|
+
showHeadline: true,
|
|
297
|
+
inputModelValue: "",
|
|
298
|
+
helplink: {},
|
|
299
|
+
labelText: "",
|
|
300
|
+
...this.cmdListOfRequirements
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
validationTooltip() {
|
|
304
|
+
if (!this.useCustomTooltip) {
|
|
305
|
+
return this.getValidationMessage
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// set default-tooltip if customTooltip is not set
|
|
309
|
+
if (this.validationStatus === 'error') {
|
|
310
|
+
return this.getMessage("form_element.validation_tooltip.an_error_occurred")
|
|
311
|
+
} else if (this.validationStatus === 'success') {
|
|
312
|
+
return this.getMessage("form_element.validation_tooltip.information_is_filled_correctly")
|
|
313
|
+
}
|
|
314
|
+
return this.getMessage("form_element.validation_tooltip.open_field_requirements")
|
|
315
|
+
},
|
|
316
|
+
inputValue: {
|
|
317
|
+
// read inputValue
|
|
318
|
+
get() {
|
|
319
|
+
return this.modelValue
|
|
320
|
+
},
|
|
321
|
+
// set/write a value to update v-model for this component
|
|
322
|
+
set(value) {
|
|
323
|
+
this.$emit("validation-status-change", this.validationStatus)
|
|
324
|
+
this.$emit("update:modelValue", value)
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
watch: {
|
|
329
|
+
status: {
|
|
330
|
+
handler() {
|
|
331
|
+
this.updateStatus()
|
|
332
|
+
},
|
|
333
|
+
immediate: true
|
|
334
|
+
},
|
|
335
|
+
modelValue: {
|
|
336
|
+
handler() {
|
|
337
|
+
this.updateStatus()
|
|
338
|
+
},
|
|
339
|
+
immediate: true
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
</script>
|
|
344
|
+
|
|
345
|
+
<style>
|
|
346
|
+
/* begin cmd-input-group ------------------------------------------------------------------------------------------ */
|
|
347
|
+
.cmd-input-group {
|
|
348
|
+
&.inline {
|
|
349
|
+
display: flex;
|
|
350
|
+
gap: var(--default-gap);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.stretch-horizontally {
|
|
354
|
+
align-self: normal;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/* overwrite default behavior from frontend-framework */
|
|
358
|
+
.toggle-switch {
|
|
359
|
+
display: block;
|
|
360
|
+
|
|
361
|
+
.label-text {
|
|
362
|
+
text-align: center;
|
|
363
|
+
display: inline-block;
|
|
364
|
+
|
|
365
|
+
[class*="icon-"] {
|
|
366
|
+
background: none;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* overwrite default behavior from frontend-framework */
|
|
372
|
+
>.label-text {
|
|
373
|
+
display: inline-flex;
|
|
374
|
+
|
|
375
|
+
.flex-container {
|
|
376
|
+
gap: 1rem 1.5rem;
|
|
377
|
+
/* vertical, horizontal */
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
>span {
|
|
381
|
+
&+a:has([class*="icon-"]) {
|
|
382
|
+
margin-left: calc(var(--default-margin) / 2);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&:hover,
|
|
388
|
+
&:active,
|
|
389
|
+
&:focus {
|
|
390
|
+
&+.flex-container {
|
|
391
|
+
input {
|
|
392
|
+
border-color: var(--default-border-color);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
&.has-state {
|
|
399
|
+
input:checked~span {
|
|
400
|
+
--status-color: var(--hyperlink-color);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.label-text span {
|
|
404
|
+
color: var(--status-color);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
&.error {
|
|
408
|
+
--status-color: var(--error-color-text);
|
|
409
|
+
|
|
410
|
+
/* labels for checkboxes and radiobuttons */
|
|
411
|
+
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
&.multiple-switch {
|
|
415
|
+
&.error {
|
|
416
|
+
--status-color: var(--error-color-text);
|
|
417
|
+
|
|
418
|
+
label {
|
|
419
|
+
border-color: var(--error-color-text);
|
|
420
|
+
|
|
421
|
+
>* {
|
|
422
|
+
color: var(--error-color-text);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
&:is(:hover, :active, :focus) {
|
|
426
|
+
>* {
|
|
427
|
+
color: var(--hyperlink-color-highlighted);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* end cmd-input-group ------------------------------------------------------------------------------------------ */
|
|
436
437
|
</style>
|