comand-component-library 3.1.71 → 3.1.74
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.umd.min.js +1 -1
- package/package.json +2 -2
- package/src/App.vue +314 -189
- package/src/assets/data/cookie-disclaimer.json +7 -6
- package/src/assets/styles/global-styles.scss +10 -40
- package/src/components/CmdBox.vue +7 -5
- package/src/components/CmdCookieDisclaimer.vue +76 -8
- package/src/components/CmdFakeSelect.vue +40 -50
- package/src/components/CmdFormElement.vue +32 -41
- package/src/components/CmdInputGroup.vue +158 -12
- package/src/components/CmdListOfRequirements.vue +128 -0
- package/src/components/CmdMainNavigation.vue +2 -2
- package/src/components/CmdToggleDarkMode.vue +27 -10
- package/src/components/CmdTooltip.vue +1 -1
- package/src/documentation/generated/CmdAddressDataPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdBackToTopButtonPropertyDescriptions.json +12 -0
- package/src/documentation/generated/CmdBankAccountDataPropertyDescriptions.json +34 -0
- package/src/documentation/generated/CmdBoxPropertyDescriptions.json +96 -0
- package/src/documentation/generated/CmdBoxSiteSearchPropertyDescriptions.json +79 -0
- package/src/documentation/generated/CmdBoxWrapperPropertyDescriptions.json +47 -0
- package/src/documentation/generated/CmdBreadcrumbsPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdCompanyLogoPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdCookieDisclaimerPropertyDescriptions.json +37 -0
- package/src/documentation/generated/CmdCustomHeadlinePropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdFakeSelectPropertyDescriptions.json +84 -0
- package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +62 -0
- package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +253 -0
- package/src/documentation/generated/CmdFormFiltersPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdFormPropertyDescriptions.json +40 -0
- package/src/documentation/generated/CmdGoogleMapsPropertyDescriptions.json +7 -0
- package/src/documentation/generated/CmdImageGalleryPropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdImageZoomPropertyDescriptions.json +12 -0
- package/src/documentation/generated/CmdInputGroupPropertyDescriptions.json +122 -0
- package/src/documentation/generated/CmdListOfLinksPropertyDescriptions.json +60 -0
- package/src/documentation/generated/CmdListOfRequirementsPropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +90 -0
- package/src/documentation/generated/CmdMainNavigationPropertyDescriptions.json +62 -0
- package/src/documentation/generated/CmdMultistepFormProgressBarPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdPagerPropertyDescriptions.json +37 -0
- package/src/documentation/generated/CmdProgressBarPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +34 -0
- package/src/documentation/generated/CmdSiteHeaderPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdSlideButtonPropertyDescriptions.json +25 -0
- package/src/documentation/generated/CmdSlideshowPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdSwitchLanguagePropertyDescriptions.json +7 -0
- package/src/documentation/generated/CmdSystemMessagePropertyDescriptions.json +40 -0
- package/src/documentation/generated/CmdTablePropertyDescriptions.json +72 -0
- package/src/documentation/generated/CmdTabsPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdThumbnailScrollerPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdTooltipPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdUploadFormPropertyDescriptions.json +175 -0
- package/src/documentation/generated/CmdWidthLimitationWrapperPropertyDescriptions.json +41 -0
- package/src/mixins/CmdCookieDisclaimer/DefaultMessageProperties.js +10 -0
- package/src/mixins/FieldValidation.js +1 -1
@@ -4,10 +4,10 @@
|
|
4
4
|
"cookies": [
|
5
5
|
{
|
6
6
|
"id": "cookie-sessionid",
|
7
|
+
"value": "sessionid",
|
7
8
|
"description": "This cookie is required for functionality",
|
8
9
|
"labelText": "SessionID",
|
9
|
-
"
|
10
|
-
"status": "disabled",
|
10
|
+
"disabled": true,
|
11
11
|
"linkDataPrivacy": {
|
12
12
|
"label": "Details for this cookie:",
|
13
13
|
"link": "/content/data-privacy-en.html",
|
@@ -16,10 +16,10 @@
|
|
16
16
|
},
|
17
17
|
{
|
18
18
|
"id": "cookie-google-recaptcha",
|
19
|
+
"value": "google-recaptcha",
|
19
20
|
"description": "This cookie prevents bots from sending forms",
|
20
21
|
"labelText": "Google reCaptcha™",
|
21
|
-
"
|
22
|
-
"status": "disabled",
|
22
|
+
"disabled": true,
|
23
23
|
"linkDataPrivacy": {
|
24
24
|
"label": "Details for this cookie:",
|
25
25
|
"link": "https://policies.google.com/privacy?hl=en-US",
|
@@ -34,9 +34,10 @@
|
|
34
34
|
"cookies": [
|
35
35
|
{
|
36
36
|
"id": "cookie-google-maps",
|
37
|
+
"value": "google-maps",
|
37
38
|
"description": "This cookie enables the Google Map™",
|
38
39
|
"labelText": "Google Maps™",
|
39
|
-
"
|
40
|
+
"disabled": false,
|
40
41
|
"linkDataPrivacy": {
|
41
42
|
"label": "Details for this cookie:",
|
42
43
|
"link": "https://policies.google.com/privacy?hl=en-US",
|
@@ -46,9 +47,9 @@
|
|
46
47
|
},
|
47
48
|
{
|
48
49
|
"id": "cookie-google-analytics",
|
50
|
+
"value": "google-analytics",
|
49
51
|
"description": "This cookie collects anonymous data for statistics and improvements",
|
50
52
|
"labelText": "Google Analytics™",
|
51
|
-
"checked": false,
|
52
53
|
"linkDataPrivacy": {
|
53
54
|
"label": "Details for this cookie:",
|
54
55
|
"link": "https://policies.google.com/privacy?hl=en-US",
|
@@ -173,7 +173,14 @@ body.avoid-scrolling {
|
|
173
173
|
/* end product-listing --------------------------------------------------------------------------------------------------------------------------------------------------- */
|
174
174
|
|
175
175
|
/* begin tooltip for cmd-form-element and cmd-fake-select ---------------------------------------------------------------------------------------------------------------- */
|
176
|
-
.cmd-form-element, .cmd-fake-select {
|
176
|
+
.cmd-form-element, .cmd-fake-select, .cmd-input-group {
|
177
|
+
.cmd-tooltip {
|
178
|
+
position: absolute;
|
179
|
+
right: 0;
|
180
|
+
transform: translateY(calc(-100% - calc(var(--default-margin) / 2)));
|
181
|
+
left: auto !important; /* overwrite calculated inline-styles from javascript for cmd-tooltip-component */
|
182
|
+
top: 0 !important; /* overwrite calculated inline-styles from javascript for cmd-tooltip-component */
|
183
|
+
}
|
177
184
|
|
178
185
|
&.has-state, & + .cmd-tooltip {
|
179
186
|
.label-text {
|
@@ -190,7 +197,6 @@ body.avoid-scrolling {
|
|
190
197
|
--status-color: var(--warning-color);
|
191
198
|
}
|
192
199
|
|
193
|
-
|
194
200
|
&.success {
|
195
201
|
--status-color: var(--success-color);
|
196
202
|
}
|
@@ -202,44 +208,6 @@ body.avoid-scrolling {
|
|
202
208
|
|
203
209
|
& + .cmd-tooltip {
|
204
210
|
border-color: var(--status-color);
|
205
|
-
|
206
|
-
h6:last-of-type {
|
207
|
-
margin-top: 0;
|
208
|
-
}
|
209
|
-
|
210
|
-
.list-of-requirements {
|
211
|
-
.error {
|
212
|
-
color: var(--error-color);
|
213
|
-
}
|
214
|
-
|
215
|
-
.warning {
|
216
|
-
color: var(--warning-color);
|
217
|
-
}
|
218
|
-
|
219
|
-
.success {
|
220
|
-
color: var(--success-color);
|
221
|
-
}
|
222
|
-
|
223
|
-
.info {
|
224
|
-
color: var(--info-color);
|
225
|
-
}
|
226
|
-
|
227
|
-
span[class*="icon"] {
|
228
|
-
font-size: 1.2rem;
|
229
|
-
}
|
230
|
-
|
231
|
-
& ~ a {
|
232
|
-
display: flex;
|
233
|
-
align-items: center;
|
234
|
-
justify-content: center;
|
235
|
-
text-align: center;
|
236
|
-
text-decoration: none;
|
237
|
-
|
238
|
-
span[class*="icon"] {
|
239
|
-
font-size: 1.2rem;
|
240
|
-
}
|
241
|
-
}
|
242
|
-
}
|
243
211
|
}
|
244
212
|
}
|
245
213
|
/* end tooltip for cmd-form-element and cmd-fake-select ------------------------------------------------------------------------------------------------------------------ */
|
@@ -300,6 +268,7 @@ html {
|
|
300
268
|
&.light-mode {
|
301
269
|
/* assign default colors for custom light-mode set by class */
|
302
270
|
--color-scheme-text-color: var(--light-mode-text-color);
|
271
|
+
--color-scheme-text-color-buttons: var(--light-mode-text-color-buttons);
|
303
272
|
--color-scheme-background-color: var(--light-mode-background-color);
|
304
273
|
--color-scheme-text-color-inverted: var(--dark-mode-text-color);
|
305
274
|
--color-scheme-background-inverted: var(--dark-mode-background-color);
|
@@ -309,6 +278,7 @@ html {
|
|
309
278
|
&.dark-mode {
|
310
279
|
/* assign default colors for custom dark-mode set by class */
|
311
280
|
--color-scheme-text-color: var(--dark-mode-text-color);
|
281
|
+
--color-scheme-text-color-buttons: var(--dark-mode-background-color);
|
312
282
|
--color-scheme-background-color: var(--dark-mode-background-color);
|
313
283
|
--color-scheme-text-color-inverted: var(--light-mode-text-color);
|
314
284
|
--color-scheme-background-inverted: var(--light-mode-background-color);
|
@@ -8,9 +8,10 @@
|
|
8
8
|
<slot name="header"></slot>
|
9
9
|
<!-- end slot 'header' -->
|
10
10
|
<a href="#"
|
11
|
+
class="toggle-icon"
|
11
12
|
:title="open ? iconOpen.tooltip : iconClosed.tooltip"
|
12
13
|
@click.prevent="toggleContentVisibility">
|
13
|
-
<span
|
14
|
+
<span :class="[open ? iconOpen.iconClass : iconClosed.iconClass]"></span>
|
14
15
|
</a>
|
15
16
|
</div>
|
16
17
|
<!-- end collapsible header with slot -->
|
@@ -43,7 +44,7 @@
|
|
43
44
|
</template>
|
44
45
|
|
45
46
|
<!-- begin box-body -->
|
46
|
-
<div v-if="open" class="box-body" aria-expanded="true">
|
47
|
+
<div v-if="open" class="box-body" aria-expanded="true" role="article">
|
47
48
|
<!-- begin slot 'body' -->
|
48
49
|
<slot name="body">
|
49
50
|
<transition :name="toggleTransition">
|
@@ -313,8 +314,8 @@ export default {
|
|
313
314
|
margin-bottom: 0;
|
314
315
|
}
|
315
316
|
|
316
|
-
&:not(.open)
|
317
|
-
|
317
|
+
&:not(.open) {
|
318
|
+
justify-content: flex-start;
|
318
319
|
}
|
319
320
|
}
|
320
321
|
|
@@ -334,9 +335,10 @@ export default {
|
|
334
335
|
|
335
336
|
* {
|
336
337
|
color: var(--pure-white);
|
338
|
+
margin-bottom: 0;
|
337
339
|
}
|
338
340
|
|
339
|
-
> [class*="icon"]
|
341
|
+
> .toggle-icon, .toggle-icon > [class*="icon"] {
|
340
342
|
font-size: 1rem;
|
341
343
|
margin-left: auto;
|
342
344
|
}
|
@@ -12,6 +12,7 @@
|
|
12
12
|
|
13
13
|
<!-- begin slot for cookie-options -->
|
14
14
|
<slot name="cookie-options">
|
15
|
+
<!-- begin required cookies -->
|
15
16
|
<div v-if="cookieOptions.required" class="flex-container vertical">
|
16
17
|
<CmdCustomHeadline v-if="cmdBoxRequiredCookies?.showHeadline" :headline-text="cmdBoxRequiredCookies?.headlineText" :headline-level="cmdBoxRequiredCookies?.headlineLevel "/>
|
17
18
|
<!-- begin CmdBox -->
|
@@ -25,9 +26,13 @@
|
|
25
26
|
<CmdFormElement
|
26
27
|
element="input"
|
27
28
|
type="checkbox"
|
28
|
-
|
29
|
-
|
29
|
+
v-model="acceptedCookies"
|
30
|
+
:inputValue="cookie.value"
|
31
|
+
:labelText="cookie.labelText"
|
32
|
+
:disabled="cookie.disabled"
|
33
|
+
:id="cookie.id"
|
30
34
|
:toggleSwitch="true"
|
35
|
+
:title="getMessage('cmdcookiedisclaimer.title.cookie_cannot_be_disabled')"
|
31
36
|
/>
|
32
37
|
<!-- end CmdFormElement -->
|
33
38
|
</template>
|
@@ -46,7 +51,11 @@
|
|
46
51
|
</CmdBox>
|
47
52
|
<!-- end CmdBox -->
|
48
53
|
</div>
|
54
|
+
<!-- end required cookies -->
|
55
|
+
|
49
56
|
<hr/>
|
57
|
+
|
58
|
+
<!-- begin optional cookies -->
|
50
59
|
<div v-if="cookieOptions.optional" class="flex-container vertical">
|
51
60
|
<CmdCustomHeadline v-if="cmdBoxOptionalCookies?.showHeadline" :headline-text="cmdBoxOptionalCookies?.headlineText" :headline-level="cmdBoxOptionalCookies?.headlineLevel "/>
|
52
61
|
<!-- begin CmdBox -->
|
@@ -60,9 +69,13 @@
|
|
60
69
|
<CmdFormElement
|
61
70
|
element="input"
|
62
71
|
type="checkbox"
|
63
|
-
|
64
|
-
|
72
|
+
v-model="acceptedCookies"
|
73
|
+
:inputValue="cookie.value"
|
74
|
+
:labelText="cookie.labelText"
|
75
|
+
:disabled="cookie.disabled"
|
76
|
+
:id="cookie.id"
|
65
77
|
:toggleSwitch="true"
|
78
|
+
:title="getMessage('cmdcookiedisclaimer.title.toggle_to_accept_cookie')"
|
66
79
|
/>
|
67
80
|
<!-- end CmdFormElement -->
|
68
81
|
</template>
|
@@ -81,6 +94,7 @@
|
|
81
94
|
</CmdBox>
|
82
95
|
<!-- end CmdBox -->
|
83
96
|
</div>
|
97
|
+
<!-- end optional cookies -->
|
84
98
|
</slot>
|
85
99
|
<!-- end slot for cookie-options -->
|
86
100
|
|
@@ -90,10 +104,10 @@
|
|
90
104
|
|
91
105
|
<!-- begin button-wrapper for 'accept'-buttons -->
|
92
106
|
<div class="button-wrapper align-center">
|
93
|
-
<button v-if="buttonLabelAcceptCurrentSettings" type="button" @click="
|
107
|
+
<button v-if="buttonLabelAcceptCurrentSettings" type="button" @click="acceptCurrentCookies">
|
94
108
|
<span>{{ buttonLabelAcceptCurrentSettings }}</span>
|
95
109
|
</button>
|
96
|
-
<button v-if="buttonLabelAcceptAllCookies" type="button" class="primary" @click="
|
110
|
+
<button v-if="buttonLabelAcceptAllCookies" type="button" class="primary" @click="acceptAllCookies">
|
97
111
|
<span>{{ buttonLabelAcceptAllCookies }}</span>
|
98
112
|
</button>
|
99
113
|
</div>
|
@@ -103,6 +117,10 @@
|
|
103
117
|
</template>
|
104
118
|
|
105
119
|
<script>
|
120
|
+
// import mixins
|
121
|
+
import I18n from "../mixins/I18n"
|
122
|
+
import DefaultMessageProperties from "../mixins/CmdCookieDisclaimer/DefaultMessageProperties"
|
123
|
+
|
106
124
|
// import components
|
107
125
|
import CmdBox from "./CmdBox"
|
108
126
|
import CmdCustomHeadline from "./CmdCustomHeadline"
|
@@ -110,6 +128,7 @@ import CmdFormElement from "./CmdFormElement"
|
|
110
128
|
|
111
129
|
export default {
|
112
130
|
name: "CmdCookieDisclaimer",
|
131
|
+
mixins: [I18n, DefaultMessageProperties],
|
113
132
|
components: {
|
114
133
|
CmdBox,
|
115
134
|
CmdCustomHeadline,
|
@@ -122,6 +141,13 @@ export default {
|
|
122
141
|
}
|
123
142
|
},
|
124
143
|
props: {
|
144
|
+
/**
|
145
|
+
* set default v-model (must be named modelValue in Vue3)
|
146
|
+
*/
|
147
|
+
modelValue: {
|
148
|
+
type: Array,
|
149
|
+
required: false
|
150
|
+
},
|
125
151
|
/**
|
126
152
|
* properties for CmdCustomHeadline-component at top of cookie disclaimer
|
127
153
|
*/
|
@@ -185,9 +211,43 @@ export default {
|
|
185
211
|
default: "Proceed with current settings!"
|
186
212
|
}
|
187
213
|
},
|
214
|
+
computed: {
|
215
|
+
acceptedCookies: {
|
216
|
+
get() {
|
217
|
+
const cookies = this.modelValue ? [...this.modelValue] : []
|
218
|
+
const requiredCookies = this.cookieOptions?.required?.cookies || []
|
219
|
+
for (let i = 0; i < requiredCookies.length; i++) {
|
220
|
+
if(!cookies.includes(requiredCookies[i].value)) {
|
221
|
+
cookies.push(requiredCookies[i].value)
|
222
|
+
}
|
223
|
+
}
|
224
|
+
return cookies
|
225
|
+
},
|
226
|
+
set(value) {
|
227
|
+
this.$emit("update:modelValue", value)
|
228
|
+
}
|
229
|
+
}
|
230
|
+
},
|
188
231
|
methods: {
|
189
|
-
|
190
|
-
this.$emit("close-cookie-disclaimer",
|
232
|
+
acceptCurrentCookies() {
|
233
|
+
this.$emit("close-cookie-disclaimer", this.acceptedCookies)
|
234
|
+
},
|
235
|
+
acceptAllCookies() {
|
236
|
+
const allCookies = []
|
237
|
+
|
238
|
+
// push all required cookies to array
|
239
|
+
const requiredCookies = this.cookieOptions?.required?.cookies
|
240
|
+
for(let i = 0; i < requiredCookies.length ; i++) {
|
241
|
+
allCookies.push(requiredCookies[i].value)
|
242
|
+
}
|
243
|
+
|
244
|
+
// push all optional cookies to array
|
245
|
+
const optionalCookies = this.cookieOptions?.optional?.cookies
|
246
|
+
for(let i = 0; i < optionalCookies.length ; i++) {
|
247
|
+
allCookies.push(optionalCookies[i].value)
|
248
|
+
}
|
249
|
+
|
250
|
+
this.$emit("close-cookie-disclaimer", allCookies)
|
191
251
|
},
|
192
252
|
openDataPrivacy(event) {
|
193
253
|
/* first 'target' = clicked-element, second 'target' = target-attribute */
|
@@ -215,6 +275,14 @@ export default {
|
|
215
275
|
top: auto;
|
216
276
|
|
217
277
|
.cmd-box {
|
278
|
+
.box-header {
|
279
|
+
label.disabled {
|
280
|
+
.label-text span {
|
281
|
+
color: var(--pure-white) !important;
|
282
|
+
}
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
218
286
|
.box-body {
|
219
287
|
padding: var(--default-padding);
|
220
288
|
}
|
@@ -5,7 +5,8 @@
|
|
5
5
|
'cmd-fake-select label',
|
6
6
|
{
|
7
7
|
color: type === 'color',
|
8
|
-
'has-state': validationStatus && validationStatus !== 'none'
|
8
|
+
'has-state': validationStatus && validationStatus !== 'none',
|
9
|
+
disabled: $attrs.disabled
|
9
10
|
}
|
10
11
|
]"
|
11
12
|
:aria-labelledby="labelId"
|
@@ -16,6 +17,30 @@
|
|
16
17
|
<!-- begin label -->
|
17
18
|
<span class="label-text" :id="labelId">
|
18
19
|
<span>{{ labelText }}<sup v-if="$attrs.required !== undefined">*</sup></span>
|
20
|
+
|
21
|
+
<!-- begin CmdTooltip -->
|
22
|
+
<CmdTooltip v-if="useCustomTooltip" class="box" :class="validationStatus" :relatedId="tooltipId" :toggle-visibility-by-click="true">
|
23
|
+
<!-- begin CmdSystemMessage -->
|
24
|
+
<CmdSystemMessage
|
25
|
+
v-if="getValidationMessage"
|
26
|
+
:message="getValidationMessage"
|
27
|
+
:validation-status="validationStatus"
|
28
|
+
:iconClose="{show: false}"
|
29
|
+
/>
|
30
|
+
<!-- end CmdSystemMessage -->
|
31
|
+
|
32
|
+
<!-- begin CmdListOfRequirements -->
|
33
|
+
<CmdListOfRequirements
|
34
|
+
v-if="showRequirements && (validationStatus === '' || validationStatus === 'error')"
|
35
|
+
:inputRequirements="inputRequirements"
|
36
|
+
:inputModelValue="modelValue"
|
37
|
+
:inputAttributes="$attrs"
|
38
|
+
:helplink="helplink"
|
39
|
+
/>
|
40
|
+
<!-- end CmdListOfRequirements -->
|
41
|
+
</CmdTooltip>
|
42
|
+
<!-- end CmdTooltip -->
|
43
|
+
|
19
44
|
<a v-if="$attrs.required || inputRequirements.length"
|
20
45
|
href="#"
|
21
46
|
@click.prevent
|
@@ -101,51 +126,6 @@
|
|
101
126
|
</li>
|
102
127
|
</ul>
|
103
128
|
</div>
|
104
|
-
<!-- begin CmdTooltip -->
|
105
|
-
<CmdTooltip v-if="useCustomTooltip" class="box" :class="validationStatus" :relatedId="tooltipId" :toggle-visibility-by-click="true">
|
106
|
-
<!-- begin CmdSystemMessage -->
|
107
|
-
<CmdSystemMessage
|
108
|
-
v-if="getValidationMessage"
|
109
|
-
:message="getValidationMessage"
|
110
|
-
:validationStatus="validationStatus"
|
111
|
-
:iconClose="{show: false}"
|
112
|
-
/>
|
113
|
-
<!-- end CmdSystemMessage -->
|
114
|
-
|
115
|
-
<template v-if="showRequirements && (validationStatus === '' || validationStatus === 'error')">
|
116
|
-
<!-- begin list of requirements -->
|
117
|
-
<h6>{{ getMessage("cmdfakeselect.headline.requirements_for_input") }}<br/>"{{ labelText }}"</h6>
|
118
|
-
<dl class="list-of-requirements">
|
119
|
-
<template v-for="(requirement, index) in inputRequirements" :key="index">
|
120
|
-
<dt aria-live="assertive" :class="requirement.valid(modelValue, $attrs) ? 'success' : 'error'">{{ requirement.message }}:</dt>
|
121
|
-
<dd :class="requirement.valid(modelValue, $attrs) ? 'success' : 'error'">
|
122
|
-
<span aria-live="assertive" :class="requirement.valid(modelValue, $attrs) ? 'icon-check-circle' : 'icon-error-circle'"
|
123
|
-
:title="requirement.valid(modelValue, $attrs) ? 'success' : 'error'"></span>
|
124
|
-
</dd>
|
125
|
-
</template>
|
126
|
-
</dl>
|
127
|
-
<!-- end list of requirements -->
|
128
|
-
|
129
|
-
<!-- begin helplink -->
|
130
|
-
<template v-if="helplink">
|
131
|
-
<hr v-if="helplink.show"/>
|
132
|
-
<a v-if="helplink.show && helplink.url"
|
133
|
-
:href="helplink.url"
|
134
|
-
:target="helplink.target"
|
135
|
-
@click.prevent>
|
136
|
-
<span v-if="helplink.icon?.iconClass"
|
137
|
-
:class="helplink.icon?.iconClass"
|
138
|
-
:title="helplink.icon?.tooltip">
|
139
|
-
</span>
|
140
|
-
<span v-if="helplink.text">
|
141
|
-
{{ helplink.text }}
|
142
|
-
</span>
|
143
|
-
</a>
|
144
|
-
</template>
|
145
|
-
<!-- end helplink -->
|
146
|
-
</template>
|
147
|
-
</CmdTooltip>
|
148
|
-
<!-- end CmdTooltip -->
|
149
129
|
</template>
|
150
130
|
|
151
131
|
<script>
|
@@ -154,11 +134,12 @@ import {createUuid} from "../utils/common.js"
|
|
154
134
|
|
155
135
|
// import mixins
|
156
136
|
import I18n from "../mixins/I18n"
|
157
|
-
import DefaultMessageProperties from "../mixins/
|
137
|
+
import DefaultMessageProperties from "../mixins/CmdFakeSelect/DefaultMessageProperties"
|
158
138
|
import FieldValidation from "../mixins/FieldValidation.js"
|
159
139
|
import Tooltip from "../mixins/Tooltip.js"
|
160
140
|
|
161
141
|
// import components
|
142
|
+
import CmdListOfRequirements from "./CmdListOfRequirements"
|
162
143
|
import CmdSystemMessage from "./CmdSystemMessage"
|
163
144
|
import CmdTooltip from "./CmdTooltip"
|
164
145
|
|
@@ -172,6 +153,7 @@ export default {
|
|
172
153
|
Tooltip
|
173
154
|
],
|
174
155
|
components: {
|
156
|
+
CmdListOfRequirements,
|
175
157
|
CmdSystemMessage,
|
176
158
|
CmdTooltip
|
177
159
|
},
|
@@ -229,7 +211,7 @@ export default {
|
|
229
211
|
/**
|
230
212
|
* status (i.e. for validation)
|
231
213
|
*
|
232
|
-
* @allowedValues: error, success,
|
214
|
+
* @allowedValues: error, warning, success, info
|
233
215
|
* @affectsStyling: true
|
234
216
|
*/
|
235
217
|
status: {
|
@@ -333,7 +315,7 @@ export default {
|
|
333
315
|
},
|
334
316
|
// get ID for accessibility
|
335
317
|
labelId() {
|
336
|
-
if(this.$attrs.id !== undefined) {
|
318
|
+
if (this.$attrs.id !== undefined) {
|
337
319
|
return this.$attrs.id
|
338
320
|
}
|
339
321
|
return "label-" + createUuid()
|
@@ -372,7 +354,7 @@ export default {
|
|
372
354
|
}
|
373
355
|
},
|
374
356
|
toggleOptions() {
|
375
|
-
if (this.
|
357
|
+
if (this.$attrs.disabled !== 'disabled') {
|
376
358
|
this.showOptions = !this.showOptions
|
377
359
|
}
|
378
360
|
},
|
@@ -546,8 +528,16 @@ export default {
|
|
546
528
|
&.active {
|
547
529
|
background: var(--light-gray);
|
548
530
|
|
531
|
+
span {
|
532
|
+
color: var(--text-color);
|
533
|
+
}
|
534
|
+
|
549
535
|
&:hover, &:active, &:focus {
|
550
536
|
background: var(--primary-color);
|
537
|
+
|
538
|
+
span {
|
539
|
+
color: var(--pure-white);
|
540
|
+
}
|
551
541
|
}
|
552
542
|
}
|
553
543
|
}
|
@@ -15,12 +15,38 @@
|
|
15
15
|
'has-state': validationStatus
|
16
16
|
}]"
|
17
17
|
:for="labelId"
|
18
|
+
:title="$attrs.title"
|
18
19
|
ref="label">
|
19
20
|
|
20
21
|
<!-- begin label-text (+ required asterisk) -->
|
21
22
|
<span v-if="labelText && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
|
22
23
|
:class="['label-text', !showLabel ? 'hidden' : undefined]">
|
23
24
|
<span>{{ labelText }}<sup v-if="$attrs.required">*</sup></span>
|
25
|
+
|
26
|
+
<!-- begin CmdTooltip -->
|
27
|
+
<CmdTooltip v-if="useCustomTooltip" class="box" :class="validationStatus" :relatedId="tooltipId" :toggle-visibility-by-click="true">
|
28
|
+
<!-- begin CmdSystemMessage -->
|
29
|
+
<CmdSystemMessage
|
30
|
+
v-if="getValidationMessage"
|
31
|
+
:message="getValidationMessage"
|
32
|
+
:validation-status="validationStatus"
|
33
|
+
:iconClose="{show: false}"
|
34
|
+
/>
|
35
|
+
<!-- end CmdSystemMessage -->
|
36
|
+
|
37
|
+
<!-- begin CmdListOfRequirements -->
|
38
|
+
<CmdListOfRequirements
|
39
|
+
v-if="showRequirements && (validationStatus === '' || validationStatus === 'error')"
|
40
|
+
:inputRequirements="inputRequirements"
|
41
|
+
:helplink="helplink"
|
42
|
+
:inputModelValue="modelValue"
|
43
|
+
:inputAttributes="$attrs"
|
44
|
+
:validationTooltip="validationTooltip"
|
45
|
+
/>
|
46
|
+
<!-- end CmdListOfRequirements -->
|
47
|
+
</CmdTooltip>
|
48
|
+
<!-- end CmdTooltip -->
|
49
|
+
|
24
50
|
<a v-if="$attrs.required || inputRequirements.length"
|
25
51
|
href="#"
|
26
52
|
@click.prevent
|
@@ -89,6 +115,7 @@
|
|
89
115
|
:value="inputValue"
|
90
116
|
:class="[inputClass, validationStatus, toggleSwitchIconClass, { 'replace-input-type': replaceInputType, 'toggle-switch': toggleSwitch }]"
|
91
117
|
:id="labelId"
|
118
|
+
:disabled="$attrs.disabled"
|
92
119
|
:aria-invalid="validationStatus === 'error'"
|
93
120
|
/>
|
94
121
|
<span v-if="labelText" :class="['label-text', { hidden: !showLabel }]"><span>{{ labelText }}<sup v-if="$attrs.required">*</sup></span></span>
|
@@ -103,6 +130,7 @@
|
|
103
130
|
:value="inputValue"
|
104
131
|
:class="{inputClass, validationStatus}"
|
105
132
|
:id="labelId"
|
133
|
+
:disabled="$attrs.disabled"
|
106
134
|
:aria-invalid="validationStatus === 'error'"
|
107
135
|
/>
|
108
136
|
<span class="label-text">{{ onLabel }}</span>
|
@@ -152,7 +180,7 @@
|
|
152
180
|
:maxlength="getMaxLength()"
|
153
181
|
:value="modelValue"
|
154
182
|
/>
|
155
|
-
<a v-if="showSearchButton" href="#" class="button no-flex" :title="iconSearch.tooltip" @click.prevent="executeSearch">
|
183
|
+
<a v-if="showSearchButton" href="#" :class="['button no-flex', {disabled: $attrs.disabled}]" :title="iconSearch.tooltip" @click.prevent="executeSearch">
|
156
184
|
<span :class="iconSearch.iconClass"></span>
|
157
185
|
</a>
|
158
186
|
<a v-if="iconDelete.show" href="#" @click.prevent="$emit('update:modelValue', '')" :class="iconDelete.iconClass" :title="iconDelete.tooltip"></a>
|
@@ -171,45 +199,6 @@
|
|
171
199
|
<span v-if="nativeButton?.icon?.show && nativeButton?.icon?.position === 'after'" :class="nativeButton?.icon?.iconClass"></span>
|
172
200
|
</button>
|
173
201
|
<!-- end button -->
|
174
|
-
|
175
|
-
<!-- begin CmdTooltip -->
|
176
|
-
<CmdTooltip v-if="useCustomTooltip" class="box" :class="validationStatus" :relatedId="tooltipId" :toggle-visibility-by-click="true">
|
177
|
-
<!-- begin CmdSystemMessage -->
|
178
|
-
<CmdSystemMessage
|
179
|
-
v-if="getValidationMessage"
|
180
|
-
:message="getValidationMessage"
|
181
|
-
:validation-status="validationStatus"
|
182
|
-
:iconClose="{show: false}"
|
183
|
-
/>
|
184
|
-
<!-- end CmdSystemMessage -->
|
185
|
-
|
186
|
-
<template v-if="showRequirements && (validationStatus === '' || validationStatus === 'error')">
|
187
|
-
<!-- begin list of requirements -->
|
188
|
-
<h6>
|
189
|
-
{{ getMessage("cmdformelement.headline.requirements_for_input") }}<br/>
|
190
|
-
"{{ labelText }}"
|
191
|
-
</h6>
|
192
|
-
<dl class="list-of-requirements">
|
193
|
-
<template v-for="(requirement, index) in inputRequirements" :key="index">
|
194
|
-
<dt aria-live="assertive" :class="requirement.valid(modelValue, $attrs) ? 'success' : 'error'">{{ requirement.message }}:</dt>
|
195
|
-
<dd :class="requirement.valid(modelValue, $attrs) ? 'success' : 'error'">
|
196
|
-
<span aria-live="assertive" :class="requirement.valid(modelValue, $attrs) ? iconHasStateSuccess.iconClass : iconHasStateError.iconClass"
|
197
|
-
:title="requirement.valid(modelValue, $attrs) ? iconHasStateSuccess.tooltip : iconHasStateError.tooltip"></span>
|
198
|
-
</dd>
|
199
|
-
</template>
|
200
|
-
</dl>
|
201
|
-
<!-- end list of requirements -->
|
202
|
-
|
203
|
-
<!-- begin helplink -->
|
204
|
-
<hr v-if="helplink?.show"/>
|
205
|
-
<a v-if="helplink?.show && helplink?.url" :href="helplink.url" :target="helplink.target" @click.prevent>
|
206
|
-
<span v-if="helplink.icon?.iconClass" :class="helplink.icon?.iconClass" :title="helplink.icon?.tooltip"></span>
|
207
|
-
<span v-if="helplink.text">{{ helplink.text }}</span>
|
208
|
-
</a>
|
209
|
-
<!-- end helplink -->
|
210
|
-
</template>
|
211
|
-
</CmdTooltip>
|
212
|
-
<!-- end CmdTooltip -->
|
213
202
|
</template>
|
214
203
|
|
215
204
|
<script>
|
@@ -223,6 +212,7 @@ import FieldValidation from "../mixins/FieldValidation.js"
|
|
223
212
|
import Tooltip from "../mixins/Tooltip.js"
|
224
213
|
|
225
214
|
// import components
|
215
|
+
import CmdListOfRequirements from "./CmdListOfRequirements"
|
226
216
|
import CmdSystemMessage from "./CmdSystemMessage"
|
227
217
|
import CmdTooltip from "./CmdTooltip"
|
228
218
|
|
@@ -230,6 +220,7 @@ export default {
|
|
230
220
|
inheritAttrs: false,
|
231
221
|
name: "FormElement",
|
232
222
|
components: {
|
223
|
+
CmdListOfRequirements,
|
233
224
|
CmdSystemMessage,
|
234
225
|
CmdTooltip
|
235
226
|
},
|
@@ -422,7 +413,7 @@ export default {
|
|
422
413
|
/**
|
423
414
|
* set status for label and form-element
|
424
415
|
*
|
425
|
-
* @allowedValues: error, success
|
416
|
+
* @allowedValues: error, warning, success, info
|
426
417
|
*
|
427
418
|
* @affectsStyling: true
|
428
419
|
*/
|