comand-component-library 3.1.84 → 3.1.87
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 +1 -1
- package/src/App.vue +21 -2
- package/src/assets/data/address-data.json +2 -1
- package/src/assets/data/opening-hours.json +10 -10
- package/src/assets/styles/global-styles.scss +1 -1
- package/src/components/CmdAddressData.vue +37 -29
- package/src/components/CmdFakeSelect.vue +6 -6
- package/src/components/CmdFormElement.vue +35 -25
- package/src/components/CmdListOfRequirements.vue +1 -1
- package/src/components/CmdMainNavigation.vue +8 -7
- package/src/components/CmdOpeningHours.vue +117 -9
- package/src/components/CmdSiteHeader.vue +7 -7
- package/src/components/CmdSlideButton.vue +1 -1
- package/src/components/CmdSwitchLanguage.vue +2 -4
- package/src/components/CmdTable.vue +0 -7
- package/src/components/CmdToggleDarkMode.vue +6 -4
- package/src/components/CmdTooltip.vue +1 -1
- package/src/components/CmdTooltipForInputElements.vue +21 -55
- package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +4 -4
- package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +17 -2
- package/src/documentation/generated/CmdSiteHeaderPropertyDescriptions.json +5 -5
- package/src/documentation/generated/CmdTooltipForInputElementsPropertyDescriptions.json +2 -27
- package/src/mixins/FieldValidation.js +22 -0
@@ -32,13 +32,6 @@ export default {
|
|
32
32
|
CmdMainNavigation
|
33
33
|
},
|
34
34
|
props: {
|
35
|
-
/**
|
36
|
-
* properties for CmdMainNavigation-component
|
37
|
-
*/
|
38
|
-
cmdMainNavigation: {
|
39
|
-
type: Object,
|
40
|
-
required: true
|
41
|
-
},
|
42
35
|
/**
|
43
36
|
* use only if default-button of inner navigation-component should not be used
|
44
37
|
*/
|
@@ -61,6 +54,13 @@ export default {
|
|
61
54
|
useGrid: {
|
62
55
|
type: Boolean,
|
63
56
|
default: true
|
57
|
+
},
|
58
|
+
/**
|
59
|
+
* properties for CmdMainNavigation-component
|
60
|
+
*/
|
61
|
+
cmdMainNavigation: {
|
62
|
+
type: Object,
|
63
|
+
required: true
|
64
64
|
}
|
65
65
|
}
|
66
66
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<a href="#"
|
3
3
|
@click.prevent
|
4
|
-
:class="['cmd-slide-button', 'button', slideButtonType
|
4
|
+
:class="['cmd-slide-button', 'button', slideButtonType]"
|
5
5
|
:title="getDirection.tooltip">
|
6
6
|
<span :class="getDirection.iconClass || 'next'"></span>
|
7
7
|
</a>
|
@@ -47,9 +47,7 @@ export default {
|
|
47
47
|
return require("../assets/images/flags/flag-" + isoCode + ".svg")
|
48
48
|
},
|
49
49
|
activeLanguage(language) {
|
50
|
-
|
51
|
-
return true
|
52
|
-
}
|
50
|
+
return language.active
|
53
51
|
}
|
54
52
|
}
|
55
53
|
}
|
@@ -67,7 +65,7 @@ export default {
|
|
67
65
|
list-style-type: none;
|
68
66
|
margin: 0;
|
69
67
|
|
70
|
-
a:not(
|
68
|
+
a:not([class*="active"]) {
|
71
69
|
filter: contrast(.5);
|
72
70
|
|
73
71
|
&:hover, &:focus, &:active {
|
@@ -194,19 +194,12 @@ export default {
|
|
194
194
|
gap: calc(var(--default-gap) / 2);
|
195
195
|
|
196
196
|
.button {
|
197
|
-
background: none;
|
198
197
|
padding: 0;
|
199
198
|
min-width: 2rem;
|
200
199
|
min-height: 2rem;
|
201
|
-
background: var(--pure-white);
|
202
200
|
|
203
201
|
span[class*="icon"] {
|
204
|
-
color: var(--primary-color);
|
205
202
|
font-size: 1rem;
|
206
|
-
|
207
|
-
&:hover, &:active, &:focus {
|
208
|
-
color: var(--hyperlink-color-highlighted);
|
209
|
-
}
|
210
203
|
}
|
211
204
|
}
|
212
205
|
}
|
@@ -23,8 +23,7 @@ export default {
|
|
23
23
|
},
|
24
24
|
data() {
|
25
25
|
return {
|
26
|
-
darkMode: false
|
27
|
-
labelText: ""
|
26
|
+
darkMode: false
|
28
27
|
}
|
29
28
|
},
|
30
29
|
props: {
|
@@ -99,6 +98,11 @@ export default {
|
|
99
98
|
this.darkMode = event.detail === "dark-mode"
|
100
99
|
}
|
101
100
|
},
|
101
|
+
computed: {
|
102
|
+
labelText() {
|
103
|
+
return this.darkMode ? this.labelTextDarkMode : this.labelTextLightMode
|
104
|
+
}
|
105
|
+
},
|
102
106
|
watch: {
|
103
107
|
darkMode: {
|
104
108
|
handler() {
|
@@ -106,10 +110,8 @@ export default {
|
|
106
110
|
const htmlTag = document.documentElement
|
107
111
|
if (this.darkMode) {
|
108
112
|
htmlTag.classList.replace("light-mode", "dark-mode")
|
109
|
-
this.labelText = this.labelTextDarkMode
|
110
113
|
} else {
|
111
114
|
htmlTag.classList.replace("dark-mode", "light-mode")
|
112
|
-
this.labelText = this.labelTextLightMode
|
113
115
|
}
|
114
116
|
|
115
117
|
// emits custom events from html-tag
|
@@ -177,7 +177,7 @@ export default {
|
|
177
177
|
line-height: 100%;
|
178
178
|
font-size: 1.1rem;
|
179
179
|
position: fixed;
|
180
|
-
background: var(--
|
180
|
+
background: var(--color-scheme-background-color);
|
181
181
|
z-index: 100;
|
182
182
|
border: var(--default-border);
|
183
183
|
border-color: hsl(220, 2%, 25%);
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<!-- begin CmdSystemMessage -->
|
11
11
|
<CmdSystemMessage
|
12
|
-
v-if="inputAttributes
|
12
|
+
v-if="cmdListOfRequirements?.inputAttributes?.required && validationMessage"
|
13
13
|
:systemMessage="validationMessage"
|
14
14
|
:validation-status="validationStatus"
|
15
15
|
:iconClose="{show: false}"
|
@@ -18,13 +18,14 @@
|
|
18
18
|
|
19
19
|
<!-- begin CmdListOfRequirements -->
|
20
20
|
<CmdListOfRequirements
|
21
|
-
v-if="showRequirements"
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
21
|
+
v-if="cmdListOfRequirements.showRequirements"
|
22
|
+
:showHeadline="cmdListOfRequirements.showHeadline"
|
23
|
+
:inputRequirements="cmdListOfRequirements.inputRequirements"
|
24
|
+
:helplink="cmdListOfRequirements.helplink"
|
25
|
+
:inputModelValue="cmdListOfRequirements.inputModelValue"
|
26
|
+
:inputAttributes="cmdListOfRequirements.inputAttributes"
|
27
|
+
:validationTooltip="cmdListOfRequirements.validationTooltip"
|
28
|
+
:labelText="cmdListOfRequirements.labelText"
|
28
29
|
/>
|
29
30
|
<!-- end CmdListOfRequirements -->
|
30
31
|
</CmdTooltip>
|
@@ -45,13 +46,6 @@ export default {
|
|
45
46
|
CmdTooltip
|
46
47
|
},
|
47
48
|
props: {
|
48
|
-
/**
|
49
|
-
* text for label (used in headline)
|
50
|
-
*/
|
51
|
-
labelText: {
|
52
|
-
type: String,
|
53
|
-
required: false
|
54
|
-
},
|
55
49
|
/**
|
56
50
|
* related-id for CmdTooltip-component
|
57
51
|
*/
|
@@ -74,50 +68,22 @@ export default {
|
|
74
68
|
default: ""
|
75
69
|
},
|
76
70
|
/**
|
77
|
-
*
|
78
|
-
*/
|
79
|
-
showRequirements: {
|
80
|
-
type: Boolean,
|
81
|
-
default: false
|
82
|
-
},
|
83
|
-
/**
|
84
|
-
* validation-tooltip for CmdListOfRequirements-component
|
71
|
+
* properties for CmdListOfRequirements-component
|
85
72
|
*/
|
86
|
-
|
87
|
-
type: String,
|
88
|
-
default: ""
|
89
|
-
},
|
90
|
-
/**
|
91
|
-
* list of input-requirements for CmdListOfRequirements-component
|
92
|
-
*/
|
93
|
-
inputRequirements: {
|
94
|
-
type: Array,
|
95
|
-
default() {
|
96
|
-
return []
|
97
|
-
}
|
98
|
-
},
|
99
|
-
/**
|
100
|
-
* input-attributes for CmdListOfRequirements-component
|
101
|
-
*/
|
102
|
-
inputAttributes: {
|
73
|
+
cmdListOfRequirements: {
|
103
74
|
type: Object,
|
104
75
|
default() {
|
105
|
-
return {
|
76
|
+
return {
|
77
|
+
showRequirements: true,
|
78
|
+
validationTooltip: "",
|
79
|
+
inputRequirements: [],
|
80
|
+
inputAttributes: {},
|
81
|
+
showHeadline: true,
|
82
|
+
inputModelValue: "",
|
83
|
+
helplink: {},
|
84
|
+
labelText: ""
|
85
|
+
}
|
106
86
|
}
|
107
|
-
},
|
108
|
-
/**
|
109
|
-
* input-model-value for CmdListOfRequirements-component
|
110
|
-
*/
|
111
|
-
inputModelValue: {
|
112
|
-
type: [String, Boolean, Array, Number],
|
113
|
-
default: ""
|
114
|
-
},
|
115
|
-
/**
|
116
|
-
* helplink for CmdListOfRequirements-component
|
117
|
-
*/
|
118
|
-
helplink: {
|
119
|
-
type: Object,
|
120
|
-
required: false
|
121
87
|
}
|
122
88
|
},
|
123
89
|
methods: {
|
@@ -193,7 +193,7 @@
|
|
193
193
|
"icon for error-validated items in list-of-requirements",
|
194
194
|
"",
|
195
195
|
"element-property must me set to 'input'",
|
196
|
-
"showRequirements-
|
196
|
+
"showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'",
|
197
197
|
""
|
198
198
|
]
|
199
199
|
},
|
@@ -202,7 +202,7 @@
|
|
202
202
|
"icon for warning-validated items in list-of-requirements",
|
203
203
|
"",
|
204
204
|
"element-property must me set to 'input'",
|
205
|
-
"showRequirements-
|
205
|
+
"showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'",
|
206
206
|
""
|
207
207
|
]
|
208
208
|
},
|
@@ -211,7 +211,7 @@
|
|
211
211
|
"icon for success-validated items in list-of-requirements",
|
212
212
|
"",
|
213
213
|
"element-property must me set to 'input'",
|
214
|
-
"showRequirements-
|
214
|
+
"showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'",
|
215
215
|
""
|
216
216
|
]
|
217
217
|
},
|
@@ -220,7 +220,7 @@
|
|
220
220
|
"icon for info-validated items in list-of-requirements",
|
221
221
|
"",
|
222
222
|
"element-property must me set to 'input'",
|
223
|
-
"showRequirements-
|
223
|
+
"showRequirements-subproperty (of CmdListOfRequirements) must be set to 'true'",
|
224
224
|
""
|
225
225
|
]
|
226
226
|
},
|
@@ -14,9 +14,14 @@
|
|
14
14
|
]
|
15
15
|
}
|
16
16
|
},
|
17
|
-
"
|
17
|
+
"textOpen": {
|
18
18
|
"comments": [
|
19
|
-
"text for open
|
19
|
+
"text for 'open'-information"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"textClosed": {
|
23
|
+
"comments": [
|
24
|
+
"text for 'closed'-information"
|
20
25
|
]
|
21
26
|
},
|
22
27
|
"openingHours": {
|
@@ -38,5 +43,15 @@
|
|
38
43
|
"comments": [
|
39
44
|
"properties for CmdHeadline-component"
|
40
45
|
]
|
46
|
+
},
|
47
|
+
"timeFormatter": {
|
48
|
+
"comments": [
|
49
|
+
"properties for CmdHeadline-component"
|
50
|
+
]
|
51
|
+
},
|
52
|
+
"componentHandlesClosedStatus": {
|
53
|
+
"comments": [
|
54
|
+
"properties for CmdHeadline-component"
|
55
|
+
]
|
41
56
|
}
|
42
57
|
}
|
@@ -1,9 +1,4 @@
|
|
1
1
|
{
|
2
|
-
"cmdMainNavigation": {
|
3
|
-
"comments": [
|
4
|
-
"properties for CmdMainNavigation-component"
|
5
|
-
]
|
6
|
-
},
|
7
2
|
"closeOffcanvas": {
|
8
3
|
"comments": [
|
9
4
|
"use only if default-button of inner navigation-component should not be used"
|
@@ -23,5 +18,10 @@
|
|
23
18
|
"true"
|
24
19
|
]
|
25
20
|
}
|
21
|
+
},
|
22
|
+
"cmdMainNavigation": {
|
23
|
+
"comments": [
|
24
|
+
"properties for CmdMainNavigation-component"
|
25
|
+
]
|
26
26
|
}
|
27
27
|
}
|
@@ -1,9 +1,4 @@
|
|
1
1
|
{
|
2
|
-
"labelText": {
|
3
|
-
"comments": [
|
4
|
-
"text for label (used in headline)"
|
5
|
-
]
|
6
|
-
},
|
7
2
|
"relatedId": {
|
8
3
|
"comments": [
|
9
4
|
"related-id for CmdTooltip-component"
|
@@ -19,29 +14,9 @@
|
|
19
14
|
"validation-message for CmdSystemMessage-component"
|
20
15
|
]
|
21
16
|
},
|
22
|
-
"
|
23
|
-
"comments": [
|
24
|
-
"toggle visibility for CmdListOfRequirements-component"
|
25
|
-
]
|
26
|
-
},
|
27
|
-
"validationTooltip": {
|
28
|
-
"comments": [
|
29
|
-
"validation-tooltip for CmdListOfRequirements-component"
|
30
|
-
]
|
31
|
-
},
|
32
|
-
"inputRequirements": {
|
33
|
-
"comments": [
|
34
|
-
"list of input-requirements for CmdListOfRequirements-component"
|
35
|
-
]
|
36
|
-
},
|
37
|
-
"inputAttributes": {
|
38
|
-
"comments": [
|
39
|
-
"helplink for CmdListOfRequirements-component"
|
40
|
-
]
|
41
|
-
},
|
42
|
-
"methods": {
|
17
|
+
"cmdListOfRequirements": {
|
43
18
|
"comments": [
|
44
|
-
"
|
19
|
+
"properties for CmdListOfRequirements-component"
|
45
20
|
]
|
46
21
|
}
|
47
22
|
}
|
@@ -142,9 +142,31 @@ export default {
|
|
142
142
|
iconClass: "icon-not-visible"
|
143
143
|
}
|
144
144
|
}
|
145
|
+
},
|
146
|
+
/**
|
147
|
+
* properties for CmdListOfRequirements-component
|
148
|
+
*/
|
149
|
+
cmdListOfRequirements: {
|
150
|
+
type: Object,
|
151
|
+
required: false
|
145
152
|
}
|
146
153
|
},
|
147
154
|
computed: {
|
155
|
+
listOfRequirements() {
|
156
|
+
if (this.cmdListOfRequirements == null) {
|
157
|
+
return {
|
158
|
+
showRequirements: true,
|
159
|
+
showHeadline: true,
|
160
|
+
validationTooltip: this.validationTooltip,
|
161
|
+
inputRequirements: this.inputRequirements,
|
162
|
+
inputAttributes: this.$attrs,
|
163
|
+
inputModelValue: this.modelValue,
|
164
|
+
helplink: {},
|
165
|
+
labelText: this.labelText
|
166
|
+
}
|
167
|
+
}
|
168
|
+
return this.cmdListOfRequirements
|
169
|
+
},
|
148
170
|
getValidationMessage() {
|
149
171
|
// check if all requirements are valid
|
150
172
|
// const allRequirementsValid = !this.inputRequirements.some((item) => {
|