comand-component-library 3.1.90 → 3.1.92
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.umd.min.js +1 -1
- package/package.json +2 -2
- package/src/App.vue +119 -45
- package/src/assets/data/main-navigation.json +1 -0
- package/src/assets/data/tabs.json +1 -0
- package/src/assets/styles/global-styles.scss +0 -1
- package/src/components/CmdBox.vue +15 -9
- package/src/components/CmdCookieDisclaimer.vue +38 -9
- package/src/components/CmdFakeSelect.vue +11 -19
- package/src/components/CmdFancyBox.vue +46 -13
- package/src/components/CmdFormElement.vue +29 -32
- package/src/components/CmdImageGallery.vue +2 -2
- package/src/components/CmdInputGroup.vue +9 -16
- package/src/components/CmdLoginForm.vue +80 -103
- package/src/components/CmdMainNavigation.vue +6 -6
- package/src/components/CmdMultipleSwitch.vue +4 -12
- package/src/components/CmdNewsletterSubscription.vue +205 -0
- package/src/components/CmdShareButtons.vue +100 -27
- package/src/components/{CmdBoxSiteSearch.vue → CmdSiteSearch.vue} +34 -13
- package/src/components/CmdSystemMessage.vue +6 -0
- package/src/components/CmdTabs.vue +5 -5
- package/src/components/CmdThumbnailScroller.vue +9 -1
- package/src/components/CmdTooltip.vue +1 -1
- package/src/components/CmdTooltipForInputElements.vue +1 -19
- package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +10 -0
- package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +0 -5
- package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +3 -3
- package/src/documentation/generated/CmdNewsletterSubscriptionPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +24 -0
- package/src/documentation/generated/CmdSiteSearchPropertyDescriptions.json +79 -0
- package/src/documentation/generated/CmdTooltipForInputElementsPropertyDescriptions.json +1 -6
- package/src/index.js +1 -1
- package/src/mixins/CmdFormElement/DefaultMessageProperties.js +2 -1
- package/src/mixins/CmdThumbnailScroller/DefaultMessageProperties.js +9 -0
- package/src/mixins/FieldValidation.js +19 -7
- package/src/mixins/Identifier.js +28 -0
- package/src/utils/common.js +5 -1
@@ -4,7 +4,6 @@
|
|
4
4
|
<!-- begin CmdHeadline -->
|
5
5
|
<CmdHeadline
|
6
6
|
v-if="cmdHeadlineCookieDisclaimer?.show && cmdHeadlineCookieDisclaimer?.headlineText && cmdHeadlineCookieDisclaimer?.headlineLevel"
|
7
|
-
v-bind="cmdHeadlineCookieDisclaimer"
|
8
7
|
:headlineText="cmdHeadlineCookieDisclaimer.headlineText"
|
9
8
|
:headlineLevel="cmdHeadlineCookieDisclaimer.headlineLevel"
|
10
9
|
/>
|
@@ -14,11 +13,18 @@
|
|
14
13
|
<slot name="cookie-options">
|
15
14
|
<!-- begin required cookies -->
|
16
15
|
<div v-if="cookieOptions?.required" class="flex-container vertical">
|
17
|
-
|
16
|
+
<!-- begin CmdHeadline -->
|
17
|
+
<CmdHeadline
|
18
|
+
v-if="cmdBoxRequiredCookies?.showHeadline"
|
19
|
+
:headline-text="cmdBoxRequiredCookies?.headlineText"
|
20
|
+
:headline-level="cmdBoxRequiredCookies?.headlineLevel "
|
21
|
+
/>
|
22
|
+
<!-- end CmdHeadline -->
|
23
|
+
|
18
24
|
<!-- begin CmdBox -->
|
19
25
|
<CmdBox v-for="(cookie, index) in cookieOptions.required.cookies || []"
|
20
26
|
:useSlots="['header', 'body']"
|
21
|
-
|
27
|
+
:collapsible="cmdBoxRequiredCookies?.collapsible"
|
22
28
|
:key="index"
|
23
29
|
>
|
24
30
|
<template v-slot:header>
|
@@ -57,11 +63,18 @@
|
|
57
63
|
|
58
64
|
<!-- begin optional cookies -->
|
59
65
|
<div v-if="cookieOptions?.optional" class="flex-container vertical">
|
60
|
-
|
66
|
+
<!-- begin CmdHeadline -->
|
67
|
+
<CmdHeadline
|
68
|
+
v-if="cmdBoxOptionalCookies?.showHeadline"
|
69
|
+
:headline-text="cmdBoxOptionalCookies?.headlineText"
|
70
|
+
:headline-level="cmdBoxOptionalCookies?.headlineLevel
|
71
|
+
"/>
|
72
|
+
<!-- end CmdHeadline -->
|
73
|
+
|
61
74
|
<!-- begin CmdBox -->
|
62
75
|
<CmdBox v-for="(cookie, index) in cookieOptions.optional.cookies || []"
|
63
76
|
:useSlots="['header', 'body']"
|
64
|
-
|
77
|
+
:collapsible="cmdBoxOptionalCookies?.collapsible"
|
65
78
|
:key="index"
|
66
79
|
>
|
67
80
|
<template v-slot:header>
|
@@ -172,7 +185,7 @@ export default {
|
|
172
185
|
showHeadline: true,
|
173
186
|
headlineText: "Required cookies",
|
174
187
|
headlineLevel: 3
|
175
|
-
|
188
|
+
}
|
176
189
|
}
|
177
190
|
},
|
178
191
|
/**
|
@@ -282,9 +295,25 @@ export default {
|
|
282
295
|
|
283
296
|
.cmd-box {
|
284
297
|
.box-header {
|
285
|
-
|
286
|
-
|
287
|
-
|
298
|
+
justify-content: unset; /* overwrite setting for collapsible boxes */
|
299
|
+
|
300
|
+
label {
|
301
|
+
&.disabled {
|
302
|
+
.label-text span {
|
303
|
+
color: var(--pure-white) !important; /* required to set label-text in header to white */
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
& + .toggle-icon {
|
308
|
+
width: 100%;
|
309
|
+
justify-content: flex-end;
|
310
|
+
text-align: right;
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
&:hover, &:active, &:focus {
|
315
|
+
label.disabled .label-text span {
|
316
|
+
color: var(--disabled-color) !important; /* required to set label-text on hover back to disabled-color */
|
288
317
|
}
|
289
318
|
}
|
290
319
|
}
|
@@ -10,14 +10,15 @@
|
|
10
10
|
}
|
11
11
|
]"
|
12
12
|
:title="$attrs.title"
|
13
|
-
|
13
|
+
role="listbox"
|
14
|
+
:aria-labelledby="htmlId"
|
14
15
|
:aria-required="$attrs.required !== undefined"
|
15
16
|
ref="fakeselect"
|
16
17
|
>
|
17
18
|
<template v-if="showLabel">
|
18
19
|
<!-- begin label -->
|
19
|
-
<span class="label-text"
|
20
|
-
<span>{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
|
20
|
+
<span class="label-text">
|
21
|
+
<span :id="htmlId">{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
|
21
22
|
|
22
23
|
<!-- begin CmdTooltipForInputElements -->
|
23
24
|
<CmdTooltipForInputElements
|
@@ -25,9 +26,9 @@
|
|
25
26
|
ref="tooltip"
|
26
27
|
:validationStatus="validationStatus"
|
27
28
|
:validationMessage="getValidationMessage"
|
28
|
-
:validationTooltip="validationTooltip"
|
29
29
|
:relatedId="tooltipId"
|
30
30
|
:cmdListOfRequirements="listOfRequirements"
|
31
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
31
32
|
/>
|
32
33
|
<!-- end CmdTooltipForInputElements -->
|
33
34
|
|
@@ -36,10 +37,9 @@
|
|
36
37
|
@click.prevent
|
37
38
|
:class="getStatusIconClass"
|
38
39
|
:title="!useCustomTooltip ? getValidationMessage : ''"
|
39
|
-
:aria-errormessage="
|
40
|
+
:aria-errormessage="tooltipId"
|
40
41
|
aria-live="assertive"
|
41
|
-
:id="tooltipId"
|
42
|
-
:role="validationStatus === 'error' ? 'alert' : 'dialog'">
|
42
|
+
:id="tooltipId">
|
43
43
|
</a>
|
44
44
|
</span>
|
45
45
|
<!-- end label -->
|
@@ -119,14 +119,12 @@
|
|
119
119
|
</template>
|
120
120
|
|
121
121
|
<script>
|
122
|
-
// import utils
|
123
|
-
import {createUuid} from "../utils/common.js"
|
124
|
-
|
125
122
|
// import mixins
|
126
123
|
import I18n from "../mixins/I18n"
|
127
124
|
import DefaultMessageProperties from "../mixins/CmdFakeSelect/DefaultMessageProperties"
|
128
|
-
import FieldValidation from "../mixins/FieldValidation
|
129
|
-
import
|
125
|
+
import FieldValidation from "../mixins/FieldValidation"
|
126
|
+
import Identifier from "../mixins/Identifier"
|
127
|
+
import Tooltip from "../mixins/Tooltip"
|
130
128
|
|
131
129
|
// import components
|
132
130
|
import CmdTooltipForInputElements from "./CmdTooltipForInputElements"
|
@@ -138,6 +136,7 @@ export default {
|
|
138
136
|
I18n,
|
139
137
|
DefaultMessageProperties,
|
140
138
|
FieldValidation,
|
139
|
+
Identifier,
|
141
140
|
Tooltip
|
142
141
|
],
|
143
142
|
components: {
|
@@ -311,13 +310,6 @@ export default {
|
|
311
310
|
},
|
312
311
|
selectAllOptionsIcon() {
|
313
312
|
return "icon-check"
|
314
|
-
},
|
315
|
-
// get ID for accessibility
|
316
|
-
labelId() {
|
317
|
-
if (this.$attrs.id !== undefined) {
|
318
|
-
return this.$attrs.id
|
319
|
-
}
|
320
|
-
return "label-" + createUuid()
|
321
313
|
}
|
322
314
|
},
|
323
315
|
mounted() {
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<div v-if="showFancyBox"
|
4
4
|
:class="['cmd-fancybox', {'show-overlay': showOverlay}]"
|
5
5
|
role="dialog"
|
6
|
-
aria-labelledby="
|
6
|
+
:aria-labelledby="htmlId">
|
7
7
|
<div class="popup" :class="{'image' : fancyBoxImageUrl || fancyBoxGallery }">
|
8
|
-
<!-- begin print
|
8
|
+
<!-- begin print buttons -->
|
9
9
|
<div class="button-wrapper no-flex"
|
10
10
|
v-if="(fancyboxOptions.printButtons && (fancyboxOptions.printButtons.color || fancyboxOptions.printButtons.grayscale)) || fancyboxOptions.closeIcon">
|
11
11
|
<a href="#"
|
@@ -22,15 +22,27 @@
|
|
22
22
|
id="print-grayscale"
|
23
23
|
@click.prevent="printInGrayscale = true">
|
24
24
|
</a>
|
25
|
-
<!-- end print
|
25
|
+
<!-- end print buttons -->
|
26
|
+
|
27
|
+
<!-- begin close-icon -->
|
26
28
|
<a href="#"
|
27
29
|
v-if="fancyboxOptions.closeIcon"
|
28
30
|
:class="fancyboxOptions.closeIcon.iconClass"
|
29
31
|
:title="fancyboxOptions.closeIcon.tooltip"
|
30
32
|
@click.prevent="close">
|
31
33
|
</a>
|
34
|
+
<!-- end close-icon -->
|
32
35
|
</div>
|
33
36
|
<div :class="{'grayscale' : printInGrayscale}">
|
37
|
+
<!-- begin CmdHeadline -->
|
38
|
+
<CmdHeadline
|
39
|
+
v-show="cmdHeadline?.show"
|
40
|
+
:headlineText="cmdHeadline?.headlineText"
|
41
|
+
:headlineLevel="cmdHeadline?.headlineLevel"
|
42
|
+
:id="htmlId"
|
43
|
+
/>
|
44
|
+
<!-- end CmdHeadline -->
|
45
|
+
|
34
46
|
<div v-if="fancyBoxImageUrl" class="content">
|
35
47
|
<img :src="fancyBoxImageUrl" :alt="altText" />
|
36
48
|
</div>
|
@@ -75,7 +87,11 @@
|
|
75
87
|
<script>
|
76
88
|
import {defineComponent, createApp} from "vue"
|
77
89
|
|
90
|
+
// import mixins
|
91
|
+
import Identifier from "../mixins/Identifier"
|
92
|
+
|
78
93
|
// import components
|
94
|
+
import CmdHeadline from "./CmdHeadline"
|
79
95
|
import CmdSlideButton from "./CmdSlideButton.vue"
|
80
96
|
import CmdThumbnailScroller from './CmdThumbnailScroller.vue'
|
81
97
|
|
@@ -92,9 +108,23 @@
|
|
92
108
|
const FancyBox = defineComponent({
|
93
109
|
name: "CmdFancyBox",
|
94
110
|
components: {
|
111
|
+
CmdHeadline,
|
95
112
|
CmdSlideButton,
|
96
113
|
CmdThumbnailScroller
|
97
114
|
},
|
115
|
+
mixins: [
|
116
|
+
Identifier
|
117
|
+
],
|
118
|
+
data() {
|
119
|
+
return {
|
120
|
+
fancyBoxContent: null,
|
121
|
+
fancyBoxElements: null,
|
122
|
+
fancyBoxImageUrl: null,
|
123
|
+
index: this.defaultGalleryIndex,
|
124
|
+
printInGrayscale: false,
|
125
|
+
showFancyBox: this.show
|
126
|
+
}
|
127
|
+
},
|
98
128
|
props: {
|
99
129
|
/**
|
100
130
|
* set if content should be loaded by url
|
@@ -188,16 +218,15 @@
|
|
188
218
|
altText: {
|
189
219
|
type: String,
|
190
220
|
required: false
|
191
|
-
}
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
index: this.defaultGalleryIndex
|
221
|
+
},
|
222
|
+
/**
|
223
|
+
* properties for CmdHeadline-component
|
224
|
+
*
|
225
|
+
* @requiredForAccessibility: true
|
226
|
+
*/
|
227
|
+
cmdHeadline: {
|
228
|
+
type: Object,
|
229
|
+
required: false
|
201
230
|
}
|
202
231
|
},
|
203
232
|
created() {
|
@@ -362,6 +391,10 @@
|
|
362
391
|
border-radius: var(--border-radius);
|
363
392
|
overflow-y: auto;
|
364
393
|
|
394
|
+
.cmd-cookie-disclaimer {
|
395
|
+
padding: 0;
|
396
|
+
}
|
397
|
+
|
365
398
|
> .grayscale {
|
366
399
|
filter: grayscale(1);
|
367
400
|
}
|
@@ -15,13 +15,14 @@
|
|
15
15
|
'has-state': validationStatus
|
16
16
|
}
|
17
17
|
]"
|
18
|
-
:for="
|
18
|
+
:for="htmlId"
|
19
19
|
:title="$attrs.title"
|
20
20
|
ref="label">
|
21
21
|
|
22
22
|
<!-- begin label-text (+ required asterisk) -->
|
23
23
|
<span v-if="(labelText || $slots.labeltext) && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
|
24
|
-
|
24
|
+
v-show="showLabel"
|
25
|
+
class="label-text">
|
25
26
|
<span>
|
26
27
|
<template v-if="labelText">{{ labelText }}</template>
|
27
28
|
<!-- begin slot 'labeltext' -->
|
@@ -36,9 +37,9 @@
|
|
36
37
|
ref="tooltip"
|
37
38
|
:validationStatus="validationStatus"
|
38
39
|
:validationMessage="getValidationMessage"
|
39
|
-
:validationTooltip="validationTooltip"
|
40
40
|
:relatedId="tooltipId"
|
41
41
|
:cmdListOfRequirements="listOfRequirements"
|
42
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
42
43
|
/>
|
43
44
|
<!-- end CmdTooltipForInputElements -->
|
44
45
|
|
@@ -47,10 +48,9 @@
|
|
47
48
|
@click.prevent
|
48
49
|
:class="getStatusIconClass"
|
49
50
|
:title="validationTooltip"
|
50
|
-
:aria-errormessage="
|
51
|
+
:aria-errormessage="tooltipId"
|
51
52
|
aria-live="assertive"
|
52
|
-
:id="tooltipId"
|
53
|
-
:role="validationStatus === 'error' ? 'alert' : 'dialog'">
|
53
|
+
:id="tooltipId">
|
54
54
|
</a>
|
55
55
|
</span>
|
56
56
|
<!-- end label-text (+ required asterisk) -->
|
@@ -63,13 +63,14 @@
|
|
63
63
|
<template v-if="element === 'input' && $attrs.type !== 'checkbox' && $attrs.type !== 'radio' && $attrs.type !== 'search'">
|
64
64
|
<input
|
65
65
|
v-bind="elementAttributes"
|
66
|
-
:id="
|
66
|
+
:id="htmlId"
|
67
67
|
:class="inputClass"
|
68
68
|
@focus="tooltip = true"
|
69
69
|
@blur="onBlur"
|
70
70
|
@input="onInput"
|
71
71
|
@mouseover="datalistFocus"
|
72
72
|
@keyup="checkForCapsLock"
|
73
|
+
@change="$emit('change', $event)"
|
73
74
|
:autocomplete="autocomplete"
|
74
75
|
:list="datalist ? datalist.id : null"
|
75
76
|
:value="modelValue"
|
@@ -109,7 +110,7 @@
|
|
109
110
|
:checked="isChecked"
|
110
111
|
:value="inputValue"
|
111
112
|
:class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType, 'toggle-switch': toggleSwitch }]"
|
112
|
-
:id="
|
113
|
+
:id="htmlId"
|
113
114
|
:disabled="$attrs.disabled"
|
114
115
|
:aria-invalid="validationStatus === 'error'"
|
115
116
|
/>
|
@@ -133,7 +134,7 @@
|
|
133
134
|
:checked="isChecked"
|
134
135
|
:value="inputValue"
|
135
136
|
:class="{inputClass, validationStatus}"
|
136
|
-
:id="
|
137
|
+
:id="htmlId"
|
137
138
|
:disabled="$attrs.disabled"
|
138
139
|
:aria-invalid="validationStatus === 'error'"
|
139
140
|
/>
|
@@ -152,7 +153,7 @@
|
|
152
153
|
<!-- begin selectbox -->
|
153
154
|
<select v-if="element === 'select'"
|
154
155
|
v-bind="elementAttributes"
|
155
|
-
:id="
|
156
|
+
:id="htmlId"
|
156
157
|
@blur="onBlur"
|
157
158
|
@change="$emit('update:modelValue', $event.target.value)">
|
158
159
|
<option v-for="(option, index) in selectOptions" :key="index" :value="option.value"
|
@@ -164,7 +165,7 @@
|
|
164
165
|
<!-- begin textarea -->
|
165
166
|
<textarea v-if="element === 'textarea'"
|
166
167
|
v-bind="elementAttributes"
|
167
|
-
:id="
|
168
|
+
:id="htmlId"
|
168
169
|
:value="modelValue"
|
169
170
|
:maxlength="getMaxLength()"
|
170
171
|
@input="onInput"
|
@@ -179,7 +180,7 @@
|
|
179
180
|
<span class="search-field-wrapper flex-container no-gap">
|
180
181
|
<input
|
181
182
|
v-bind="elementAttributes"
|
182
|
-
:id="
|
183
|
+
:id="htmlId"
|
183
184
|
@input="onInput"
|
184
185
|
:maxlength="getMaxLength()"
|
185
186
|
:value="modelValue"
|
@@ -206,13 +207,11 @@
|
|
206
207
|
</template>
|
207
208
|
|
208
209
|
<script>
|
209
|
-
// import utils
|
210
|
-
import {createUuid} from "../utils/common.js"
|
211
|
-
|
212
210
|
// import mixins
|
213
211
|
import I18n from "../mixins/I18n"
|
214
212
|
import DefaultMessageProperties from "../mixins/CmdFormElement/DefaultMessageProperties"
|
215
213
|
import FieldValidation from "../mixins/FieldValidation.js"
|
214
|
+
import Identifier from "../mixins/Identifier.js"
|
216
215
|
import Tooltip from "../mixins/Tooltip.js"
|
217
216
|
|
218
217
|
// import components
|
@@ -228,6 +227,7 @@ export default {
|
|
228
227
|
I18n,
|
229
228
|
DefaultMessageProperties,
|
230
229
|
FieldValidation,
|
230
|
+
Identifier,
|
231
231
|
Tooltip
|
232
232
|
],
|
233
233
|
data() {
|
@@ -347,13 +347,6 @@ export default {
|
|
347
347
|
type: String,
|
348
348
|
required: false
|
349
349
|
},
|
350
|
-
/**
|
351
|
-
* if for native form-element
|
352
|
-
*/
|
353
|
-
id: {
|
354
|
-
type: String,
|
355
|
-
required: false
|
356
|
-
},
|
357
350
|
/**
|
358
351
|
* set if a native datalist should be used
|
359
352
|
*/
|
@@ -682,13 +675,6 @@ export default {
|
|
682
675
|
}
|
683
676
|
return null
|
684
677
|
},
|
685
|
-
// get ID for accessibility
|
686
|
-
labelId() {
|
687
|
-
if (this.$attrs.id !== undefined) {
|
688
|
-
return this.$attrs.id
|
689
|
-
}
|
690
|
-
return "label-" + createUuid()
|
691
|
-
},
|
692
678
|
// toggle icons for toggle-switch
|
693
679
|
toggleSwitchIconClass() {
|
694
680
|
if(this.toggleSwitch && this.useIconsForToggleSwitch && this.toggleSwitchUncheckedIconClass && this.toggleSwitchCheckedIconClass) {
|
@@ -701,6 +687,17 @@ export default {
|
|
701
687
|
}
|
702
688
|
},
|
703
689
|
methods: {
|
690
|
+
additionalStandardRequirements() {
|
691
|
+
const requirements = []
|
692
|
+
// check if field is type "email"
|
693
|
+
if(this.$attrs.type === "email") {
|
694
|
+
requirements.push({
|
695
|
+
message: this.getMessage("cmdformelement.validationTooltip.is_valid_email"),
|
696
|
+
valid: () => this.$refs.input.checkValidity()
|
697
|
+
})
|
698
|
+
}
|
699
|
+
return requirements
|
700
|
+
},
|
704
701
|
getDomElement() {
|
705
702
|
return this.$refs.label
|
706
703
|
},
|
@@ -720,8 +717,6 @@ export default {
|
|
720
717
|
const useValidation = event.target.closest("form")?.dataset.useValidation === "true"
|
721
718
|
|
722
719
|
if (useValidation) {
|
723
|
-
this.validationStatus = ""
|
724
|
-
|
725
720
|
// if input is filled, set status to success (expect for checkboxes and radiobuttons)
|
726
721
|
if (!["checkbox", "radio"].includes(this.$attrs.type) && this.modelValue) {
|
727
722
|
this.validationStatus = "success"
|
@@ -742,6 +737,8 @@ export default {
|
|
742
737
|
}
|
743
738
|
}
|
744
739
|
}
|
740
|
+
|
741
|
+
this.$emit('validation-status-change', this.validationStatus)
|
745
742
|
}
|
746
743
|
},
|
747
744
|
onBlur(event) {
|
@@ -804,7 +801,7 @@ export default {
|
|
804
801
|
watch: {
|
805
802
|
status: {
|
806
803
|
handler() {
|
807
|
-
this.validationStatus = this.status
|
804
|
+
this.validationStatus = this.status || ""
|
808
805
|
},
|
809
806
|
immediate: true
|
810
807
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
:key="index"
|
5
5
|
@click.prevent="showFancyBox(index)"
|
6
6
|
href="#"
|
7
|
-
:title="getMessage('
|
7
|
+
:title="getMessage('cmdimagegallery.tooltip.open_large_image')">
|
8
8
|
<figure>
|
9
9
|
<figcaption v-if="image.figcaption && figcaptionPosition === 'top'">{{ image.figcaption }}</figcaption>
|
10
10
|
<img :src="image.srcImageSmall" :alt="image.alt" />
|
@@ -19,7 +19,7 @@ import {openFancyBox} from "./CmdFancyBox"
|
|
19
19
|
|
20
20
|
// import mixins
|
21
21
|
import I18n from "../mixins/I18n"
|
22
|
-
import DefaultMessageProperties from "../mixins/
|
22
|
+
import DefaultMessageProperties from "../mixins/CmdImageGallery/DefaultMessageProperties"
|
23
23
|
|
24
24
|
export default {
|
25
25
|
name: "CmdImageGallery",
|
@@ -8,9 +8,10 @@
|
|
8
8
|
'toggle-switch': toggleSwitch,
|
9
9
|
'has-state': validationStatus
|
10
10
|
}
|
11
|
-
]"
|
12
|
-
|
13
|
-
|
11
|
+
]"
|
12
|
+
:aria-labelledby="htmlId">
|
13
|
+
<span v-show="showLabel" class="label-text">
|
14
|
+
<span :id="htmlId">{{ labelText }}<sup v-if="required">*</sup></span>
|
14
15
|
|
15
16
|
<!-- begin CmdTooltipForInputElements -->
|
16
17
|
<CmdTooltipForInputElements
|
@@ -20,11 +21,11 @@
|
|
20
21
|
:inputRequirements="inputRequirements"
|
21
22
|
:validationStatus="validationStatus"
|
22
23
|
:validationMessage="getValidationMessage"
|
23
|
-
:validationTooltip="validationTooltip"
|
24
24
|
:inputAttributes="$attrs"
|
25
25
|
:inputModelValue="modelValue"
|
26
26
|
:helplink="helplink"
|
27
27
|
:relatedId="tooltipId"
|
28
|
+
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
28
29
|
/>
|
29
30
|
<!-- end CmdTooltipForInputElements -->
|
30
31
|
|
@@ -33,10 +34,9 @@
|
|
33
34
|
@click.prevent
|
34
35
|
:class="getStatusIconClass"
|
35
36
|
:title="validationTooltip"
|
36
|
-
:aria-errormessage="
|
37
|
+
:aria-errormessage="tooltipId"
|
37
38
|
aria-live="assertive"
|
38
|
-
:id="tooltipId"
|
39
|
-
:role="validationStatus === 'error' ? 'alert' : 'dialog'">
|
39
|
+
:id="tooltipId">
|
40
40
|
</a>
|
41
41
|
</span>
|
42
42
|
<span v-if="!useSlot" :class="['flex-container', {'no-flex': !stretchHorizontally, 'no-gap': multipleSwitch}]">
|
@@ -66,10 +66,9 @@
|
|
66
66
|
</template>
|
67
67
|
|
68
68
|
<script>
|
69
|
-
import {createUuid} from "../utils/common"
|
70
|
-
|
71
69
|
// import mixins
|
72
70
|
import FieldValidation from "../mixins/FieldValidation.js"
|
71
|
+
import Identifier from "../mixins/Identifier"
|
73
72
|
import Tooltip from "../mixins/Tooltip.js"
|
74
73
|
|
75
74
|
// import components
|
@@ -81,6 +80,7 @@ export default {
|
|
81
80
|
},
|
82
81
|
mixins: [
|
83
82
|
FieldValidation,
|
83
|
+
Identifier,
|
84
84
|
Tooltip
|
85
85
|
],
|
86
86
|
data() {
|
@@ -239,13 +239,6 @@ export default {
|
|
239
239
|
}
|
240
240
|
return this.getMessage("cmdformelement.validationTooltip.open_field_requirements")
|
241
241
|
},
|
242
|
-
// get ID for accessibility
|
243
|
-
labelId() {
|
244
|
-
if (this.$attrs.id !== undefined) {
|
245
|
-
return this.$attrs.id
|
246
|
-
}
|
247
|
-
return "label-" + createUuid()
|
248
|
-
},
|
249
242
|
inputValue: {
|
250
243
|
// read inputValue
|
251
244
|
get() {
|