comand-component-library 4.3.26 → 4.3.28
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 +8574 -8438
- package/dist/styles/demopage-only.css +48 -0
- package/package.json +2 -2
- package/src/ComponentLibrary.vue +1923 -1881
- package/src/assets/data/text-image-block.json +3 -1
- package/src/assets/data/thumbnail-scroller-images.json +1 -1
- package/src/components/CmdAccordion.vue +1 -1
- package/src/components/CmdAddressData.vue +60 -72
- package/src/components/CmdBankAccountData.vue +55 -33
- package/src/components/CmdBasicForm.vue +19 -7
- package/src/components/CmdBox.vue +8 -0
- package/src/components/CmdBoxWrapper.vue +14 -0
- package/src/components/CmdBreadcrumbs.vue +10 -27
- package/src/components/CmdCompanyLogo.vue +3 -0
- package/src/components/CmdContainer.vue +21 -2
- package/src/components/CmdCookieDisclaimer.vue +5 -5
- package/src/components/CmdFakeSelect.vue +27 -17
- package/src/components/CmdFancyBox.vue +73 -85
- package/src/components/CmdFootnote.vue +2 -1
- package/src/components/CmdForm.vue +118 -160
- package/src/components/CmdFormFilters.vue +1 -0
- package/src/components/CmdGoogleMaps.vue +9 -2
- package/src/components/CmdHeadline.vue +10 -9
- package/src/components/CmdImage.vue +44 -21
- package/src/components/CmdImageGallery.vue +13 -8
- package/src/components/CmdLink.vue +20 -5
- package/src/components/CmdList.vue +7 -2
- package/src/components/CmdLoginForm.vue +156 -255
- package/src/components/CmdMailToolEntry.vue +2 -1
- package/src/components/CmdMultistepFormProgressBar.vue +2 -2
- package/src/components/CmdMultistepFormWrapper.vue +2 -6
- package/src/components/CmdOpeningHours.vue +14 -2
- package/src/components/CmdSidebar.vue +2 -2
- package/src/components/CmdSiteWrapper.vue +66 -58
- package/src/components/CmdSlideshow.vue +5 -0
- package/src/components/CmdSocialNetworks.vue +27 -17
- package/src/components/CmdSwitchLanguage.vue +16 -19
- package/src/components/CmdSystemMessage.vue +71 -66
- package/src/components/CmdTable.vue +42 -24
- package/src/components/CmdTabs.vue +15 -7
- package/src/components/CmdTag.vue +28 -23
- package/src/components/CmdTextImageBlock.vue +62 -53
- package/src/components/CmdThumbnailScroller.vue +18 -6
- package/src/components/CmdToast.vue +60 -17
- package/src/components/CmdToggleDarkMode.vue +31 -32
- package/src/components/CmdTooltip.vue +33 -20
- package/src/components/CmdUploadForm.vue +212 -183
- package/src/components/CmdWidthLimitationWrapper.vue +19 -3
- package/dist/styles/templates/casual.css +0 -3
|
@@ -1,142 +1,85 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdForm ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<form
|
|
4
|
-
:
|
|
5
|
-
:action="formAction"
|
|
6
|
-
:data-use-validation="useValidation"
|
|
7
|
-
@submit="onSubmit"
|
|
8
|
-
:novalidate="novalidate"
|
|
9
|
-
:method="formMethod"
|
|
10
|
-
>
|
|
3
|
+
<form :class="['cmd-form', { error: errorOccurred }]" :action="formAction" :data-use-validation="useValidation"
|
|
4
|
+
@submit="onSubmit" :novalidate="novalidate" :method="formMethod">
|
|
11
5
|
<template v-if="useFieldset">
|
|
12
|
-
<fieldset class="flex-container flex-direction-column"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
v-if="systemMessage.show && systemMessage.message"
|
|
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
|
-
@validation-status-change="formElementHasError($event, item.name)"
|
|
71
|
-
/>
|
|
72
|
-
<CmdFakeSelect
|
|
73
|
-
v-else-if="item.component === 'CmdFakeSelect'"
|
|
74
|
-
:class="item.htmlClass"
|
|
75
|
-
v-bind="item"
|
|
76
|
-
v-model="formValues[item.name]"
|
|
77
|
-
/>
|
|
78
|
-
<CmdInputGroup
|
|
79
|
-
v-else-if="item.component === 'CmdInputGroup'"
|
|
80
|
-
v-model="formValues[item.name]"
|
|
81
|
-
v-bind="item"
|
|
82
|
-
/>
|
|
83
|
-
</template>
|
|
84
|
-
<!-- end inner loop for formElements inside flex-container/input-wrapper -->
|
|
6
|
+
<fieldset class="flex-container flex-direction-column">
|
|
7
|
+
<slot>
|
|
8
|
+
<!-- do not remove .flex-direction-column to keep specificity -->
|
|
9
|
+
<!-- begin (mandatory) legend-->
|
|
10
|
+
<legend
|
|
11
|
+
:class="{ hidden: !legendProperties.show, 'align-left': legendProperties.align === 'left' }">{{
|
|
12
|
+
legendProperties.text
|
|
13
|
+
}}
|
|
14
|
+
</legend>
|
|
15
|
+
<!-- end (mandatory) legend-->
|
|
16
|
+
|
|
17
|
+
<CmdHeadline v-if="cmdHeadlineProperties.show && cmdHeadlineProperties?.headlineText"
|
|
18
|
+
v-bind="cmdHeadlineProperties" />
|
|
19
|
+
|
|
20
|
+
<CmdSystemMessage v-if="systemMessage.show && systemMessage.message"
|
|
21
|
+
:validationStatus="systemMessage.validationStatus" :systemMessage="systemMessage.message" />
|
|
22
|
+
<!-- begin loop for formElements -->
|
|
23
|
+
<template v-else v-for="(item, index) in formElements" :key="index">
|
|
24
|
+
<CmdFormElement v-if="!item.component || item.component === 'CmdFormElement'" :key="index"
|
|
25
|
+
:class="item.htmlClass" v-bind="item" v-model="formValues[item.name]"
|
|
26
|
+
@validation-status-change="formElementHasError($event, item.name)" />
|
|
27
|
+
<CmdFakeSelect v-if="item.component === 'CmdFakeSelect'" :class="item.htmlClass" v-bind="item"
|
|
28
|
+
v-model="formValues[item.name]" />
|
|
29
|
+
<CmdInputGroup v-else-if="item.component === 'CmdInputGroup'" :class="item.htmlClass"
|
|
30
|
+
v-bind="item" v-model="formValues[item.name]" />
|
|
31
|
+
<div v-else-if="item.component === 'flexContainer' || item.component === 'inputWrapper'"
|
|
32
|
+
:class="item.component === 'flexContainer' ? 'flex-container' : 'input-wrapper'">
|
|
33
|
+
<!-- begin inner loop for formElements inside flex-container/input-wrapper -->
|
|
34
|
+
<template v-for="(item, index) in item.formElements" :key="index">
|
|
35
|
+
<CmdFormElement v-if="!item.component || item.component === 'CmdFormElement'"
|
|
36
|
+
:key="index" :class="item.htmlClass" v-bind="item" v-model="formValues[item.name]"
|
|
37
|
+
@validation-status-change="formElementHasError($event, item.name)" />
|
|
38
|
+
<CmdFakeSelect v-else-if="item.component === 'CmdFakeSelect'" :class="item.htmlClass"
|
|
39
|
+
v-bind="item" v-model="formValues[item.name]" />
|
|
40
|
+
<CmdInputGroup v-else-if="item.component === 'CmdInputGroup'"
|
|
41
|
+
v-model="formValues[item.name]" v-bind="item" />
|
|
42
|
+
</template>
|
|
43
|
+
<!-- end inner loop for formElements inside flex-container/input-wrapper -->
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
<!-- end loop for formElements -->
|
|
47
|
+
|
|
48
|
+
<!-- begin submit- and cancel-button inside fieldset -->
|
|
49
|
+
<div v-if="cmdLinkSubmitButtonProperties.show && (cmdLinkSubmitButtonProperties.position === 'insideFieldset' || cmdLinkSubmitButtonProperties.position === null)"
|
|
50
|
+
class="flex-container no-wrap-on-small-devices">
|
|
51
|
+
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
|
52
|
+
|
|
53
|
+
<!-- begin cancel-button -->
|
|
54
|
+
<CmdLink v-if="cmdLinkCancelButtonProperties.show" v-bind="cmdLinkCancelButtonProperties"
|
|
55
|
+
:class="{ 'stretch-on-small-devices': cmdLinkCancelButtonProperties.stretchOnSmallDevices, disabled: cmdLinkCancelButtonProperties.disabled }"
|
|
56
|
+
@click="cancelFormSubmit" />
|
|
57
|
+
<!-- end cancel-button -->
|
|
58
|
+
|
|
59
|
+
<!-- begin submit-button -->
|
|
60
|
+
<CmdLink v-if="cmdLinkSubmitButtonProperties.show" v-bind="cmdLinkSubmitButtonProperties"
|
|
61
|
+
:class="{ 'stretch-on-small-devices': cmdLinkSubmitButtonProperties.stretchOnSmallDevices, disabled: cmdLinkSubmitButtonProperties.disabled }"
|
|
62
|
+
@click.prevent="onSubmit" />
|
|
63
|
+
<!-- end submit-button -->
|
|
85
64
|
</div>
|
|
86
|
-
</
|
|
87
|
-
<!-- end loop for formElements -->
|
|
88
|
-
|
|
89
|
-
<!-- begin submit- and cancel-button inside fieldset -->
|
|
90
|
-
<div v-if="submitButtonOptions.show && (submitButtonOptions.position === 'insideFieldset' || submitButtonOptions.position === null)" class="flex-container no-wrap-on-small-devices">
|
|
91
|
-
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
|
92
|
-
<!-- begin cancel-button -->
|
|
93
|
-
<button
|
|
94
|
-
v-if="cancelButtonOptions.show"
|
|
95
|
-
:class="['button', {'stretch-on-small-devices': cancelButtonOptions.stretchOnSmallDevices, disabled: cancelButtonOptions.disabled, cancel: cancelButtonOptions.useDefaultStyling}]"
|
|
96
|
-
type="button"
|
|
97
|
-
@click="cancelFormSubmit"
|
|
98
|
-
>
|
|
99
|
-
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
|
100
|
-
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
|
101
|
-
</button>
|
|
102
|
-
<!-- end cancel-button -->
|
|
103
|
-
|
|
104
|
-
<!-- begin submit-button -->
|
|
105
|
-
<button
|
|
106
|
-
:class="['button', {'stretch-on-small-devices': submitButtonOptions.stretchOnSmallDevices, primary: submitButtonOptions.primary, disabled: submitButtonOptions.disabled}]"
|
|
107
|
-
:type="submitButtonOptions.type"
|
|
108
|
-
@click.prevent="onSubmit"
|
|
109
|
-
>
|
|
110
|
-
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
|
111
|
-
<span v-if="submitButtonOptions.text">{{ submitButtonOptions.text }}</span>
|
|
112
|
-
</button>
|
|
113
|
-
<!-- end submit-button -->
|
|
114
|
-
</div>
|
|
65
|
+
</slot>
|
|
115
66
|
<!-- end submit- and cancel-button inside fieldset -->
|
|
116
67
|
</fieldset>
|
|
117
68
|
|
|
118
69
|
<!-- begin submit- and cancel-button outside/below fieldset -->
|
|
119
|
-
<div v-if="
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
:class="
|
|
125
|
-
|
|
126
|
-
@click="cancelFormSubmit"
|
|
127
|
-
>
|
|
128
|
-
<span v-if="cancelButtonOptions.iconClass" :class="cancelButtonOptions.iconClass"></span>
|
|
129
|
-
<span v-if="cancelButtonOptions.text">{{ cancelButtonOptions.text }}</span>
|
|
130
|
-
</button>
|
|
70
|
+
<div v-if="cmdLinkCancelButtonProperties.show && cmdLinkCancelButtonProperties.position === 'belowFieldset'"
|
|
71
|
+
class="flex-container no-wrap-on-small-devices">
|
|
72
|
+
<small v-if="mandatoryText" class="mandatory-text"><sup>*</sup>{{ mandatoryText }}</small>
|
|
73
|
+
<!-- begin cancel-button -->
|
|
74
|
+
<CmdLink v-if="cmdLinkCancelButtonProperties.show" v-bind="cmdLinkCancelButtonProperties"
|
|
75
|
+
:class="{ 'stretch-on-small-devices': cmdLinkCancelButtonProperties.stretchOnSmallDevices, disabled: cmdLinkCancelButtonProperties.disabled }"
|
|
76
|
+
@click="cancelFormSubmit" />
|
|
131
77
|
<!-- end cancel-button -->
|
|
132
78
|
|
|
133
79
|
<!-- begin submit-button -->
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<span v-if="submitButtonOptions.iconClass" :class="submitButtonOptions.iconClass"></span>
|
|
138
|
-
<span v-if="submitButtonOptions.text">{{ submitButtonOptions.text }}</span>
|
|
139
|
-
</button>
|
|
80
|
+
<CmdLink v-if="cmdLinkSubmitButtonProperties.show" v-bind="cmdLinkSubmitButtonProperties"
|
|
81
|
+
:class="{ 'stretch-on-small-devices': cmdLinkSubmitButtonProperties.stretchOnSmallDevices, disabled: cmdLinkSubmitButtonProperties.disabled }"
|
|
82
|
+
@click.prevent="onSubmit" />
|
|
140
83
|
<!-- end submit-button -->
|
|
141
84
|
</div>
|
|
142
85
|
<!-- end submit- and cancel-button outside/below fieldset -->
|
|
@@ -154,13 +97,13 @@
|
|
|
154
97
|
</template>
|
|
155
98
|
|
|
156
99
|
<script>
|
|
157
|
-
import {createHtmlId} from "@"
|
|
158
|
-
import CmdSystemMessage from "@/components/CmdSystemMessage.vue"
|
|
100
|
+
import { createHtmlId } from "@"
|
|
101
|
+
import CmdSystemMessage from "@/components/CmdSystemMessage.vue"
|
|
159
102
|
|
|
160
103
|
export default {
|
|
161
104
|
name: "CmdForm",
|
|
162
|
-
components: {CmdSystemMessage},
|
|
163
|
-
emits: ["validation-status-change", "submit", "update:modelValue"],
|
|
105
|
+
components: { CmdSystemMessage },
|
|
106
|
+
emits: ["validation-status-change", "cancel-form-submit", "submit", "update:modelValue"],
|
|
164
107
|
data() {
|
|
165
108
|
return {
|
|
166
109
|
errorOccurred: false,
|
|
@@ -248,24 +191,24 @@ export default {
|
|
|
248
191
|
type: Boolean,
|
|
249
192
|
default: true
|
|
250
193
|
},
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
194
|
+
/**
|
|
195
|
+
* text to clarify which inputs are mandatory
|
|
196
|
+
*/
|
|
197
|
+
mandatoryText: {
|
|
255
198
|
type: String,
|
|
256
199
|
default: "mandatory inputs"
|
|
257
200
|
},
|
|
258
201
|
/**
|
|
259
|
-
*
|
|
202
|
+
* properties for CmdLink-component for cancel-button
|
|
260
203
|
*/
|
|
261
|
-
|
|
204
|
+
cmdLinkCancelButton: {
|
|
262
205
|
type: Object,
|
|
263
206
|
required: false
|
|
264
207
|
},
|
|
265
208
|
/**
|
|
266
|
-
*
|
|
209
|
+
* properties for CmdLink-component for submit-button
|
|
267
210
|
*/
|
|
268
|
-
|
|
211
|
+
cmdLinkSubmitButton: {
|
|
269
212
|
type: Object,
|
|
270
213
|
required: false
|
|
271
214
|
},
|
|
@@ -280,13 +223,20 @@ export default {
|
|
|
280
223
|
mounted() {
|
|
281
224
|
// 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
|
|
282
225
|
const requiredElementNames = this.formElements?.filter(element => element.required === true).map(element => element.name)
|
|
283
|
-
|
|
226
|
+
|
|
284
227
|
requiredElementNames?.forEach((name) => {
|
|
285
228
|
this.formElementsWithError.push(name)
|
|
286
229
|
})
|
|
287
230
|
},
|
|
288
231
|
computed: {
|
|
289
|
-
|
|
232
|
+
cmdHeadlineProperties() {
|
|
233
|
+
return {
|
|
234
|
+
show: true,
|
|
235
|
+
headlineLevel: 3,
|
|
236
|
+
...this.cmdHeadline
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
legendProperties() {
|
|
290
240
|
return {
|
|
291
241
|
show: false,
|
|
292
242
|
align: "left",
|
|
@@ -294,31 +244,37 @@ export default {
|
|
|
294
244
|
...this.legend
|
|
295
245
|
}
|
|
296
246
|
},
|
|
297
|
-
|
|
247
|
+
cmdLinkCancelButtonProperties() {
|
|
298
248
|
return {
|
|
299
249
|
show: true,
|
|
300
|
-
|
|
250
|
+
linkType: "button",
|
|
251
|
+
highlightLevel: null,
|
|
252
|
+
icon: {
|
|
253
|
+
iconClass: "icon-cancel-circle"
|
|
254
|
+
},
|
|
301
255
|
text: "Cancel",
|
|
302
|
-
useDefaultStyling: false,
|
|
303
256
|
stretchOnSmallDevices: false,
|
|
304
257
|
position: "insideFieldset",
|
|
305
|
-
...this.
|
|
258
|
+
...this.cmdLinkCancelButton
|
|
306
259
|
}
|
|
307
260
|
},
|
|
308
|
-
|
|
261
|
+
cmdLinkSubmitButtonProperties() {
|
|
309
262
|
return {
|
|
310
263
|
show: true,
|
|
311
|
-
|
|
264
|
+
linkType: "button",
|
|
265
|
+
icon: {
|
|
266
|
+
iconClass: "icon-check-circle"
|
|
267
|
+
},
|
|
312
268
|
text: "Submit",
|
|
313
269
|
type: "submit",
|
|
314
|
-
stretchOnSmallDevices: false,
|
|
315
270
|
position: "insideFieldset",
|
|
316
271
|
primary: true,
|
|
317
|
-
...this.
|
|
272
|
+
...this.cmdLinkSubmitButton
|
|
318
273
|
}
|
|
319
274
|
}
|
|
320
275
|
},
|
|
321
276
|
methods: {
|
|
277
|
+
createHtmlId,
|
|
322
278
|
formElementHasError(event, itemName) {
|
|
323
279
|
if (event === "error" && !this.formElementsWithError.some(entry => entry.name === itemName)) {
|
|
324
280
|
this.formElementsWithError.push(itemName)
|
|
@@ -328,7 +284,6 @@ export default {
|
|
|
328
284
|
|
|
329
285
|
this.$emit("validation-status-change", this.formElementsWithError.length ? "error" : "success")
|
|
330
286
|
},
|
|
331
|
-
createHtmlId,
|
|
332
287
|
showMessage(validationStatus, message) {
|
|
333
288
|
this.systemMessage.show = true
|
|
334
289
|
this.systemMessage.validationStatus = validationStatus
|
|
@@ -336,7 +291,7 @@ export default {
|
|
|
336
291
|
},
|
|
337
292
|
cancelFormSubmit(event) {
|
|
338
293
|
const isConfirmed = window.confirm("Are you sure you want to cancel the form submit (all entered data will be lost)?");
|
|
339
|
-
|
|
294
|
+
|
|
340
295
|
if (isConfirmed) {
|
|
341
296
|
this.$emit("cancel-form-submit", event)
|
|
342
297
|
}
|
|
@@ -347,7 +302,7 @@ export default {
|
|
|
347
302
|
if (this.formElements) {
|
|
348
303
|
// iterate form-elements in flex-containers and input-wrappers to get their names and values
|
|
349
304
|
this.formElements.forEach((element) => {
|
|
350
|
-
if(element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
305
|
+
if (element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
351
306
|
element.formElements.forEach(innerElement => {
|
|
352
307
|
formdata[innerElement.name] = this.formValues[innerElement.name]
|
|
353
308
|
})
|
|
@@ -357,7 +312,7 @@ export default {
|
|
|
357
312
|
formdata[element.name] = this.formValues[element.name]
|
|
358
313
|
})
|
|
359
314
|
}
|
|
360
|
-
this.$emit("submit", {originalEvent: event, formdata: formdata})
|
|
315
|
+
this.$emit("submit", { originalEvent: event, formdata: formdata })
|
|
361
316
|
},
|
|
362
317
|
onSubmit(event) {
|
|
363
318
|
if (this.useValidation) {
|
|
@@ -376,8 +331,8 @@ export default {
|
|
|
376
331
|
watch: {
|
|
377
332
|
modelValue: {
|
|
378
333
|
handler() {
|
|
379
|
-
|
|
380
|
-
|
|
334
|
+
if (!this.modelValue) {
|
|
335
|
+
return
|
|
381
336
|
}
|
|
382
337
|
|
|
383
338
|
// assign values in loop, because entire object cannot be assigned
|
|
@@ -420,7 +375,7 @@ export default {
|
|
|
420
375
|
handler() {
|
|
421
376
|
this.formElements?.forEach(element => {
|
|
422
377
|
// iterate form-elements inside flex-containers and input-wrappers
|
|
423
|
-
if(element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
378
|
+
if (element.component === 'flexContainer' || element.component === 'inputWrapper') {
|
|
424
379
|
element.formElements.forEach(innerElement => {
|
|
425
380
|
if (innerElement.type === "checkbox") {
|
|
426
381
|
// create array if element is a checkbox (to contain several values)
|
|
@@ -437,7 +392,7 @@ export default {
|
|
|
437
392
|
})
|
|
438
393
|
return
|
|
439
394
|
}
|
|
440
|
-
|
|
395
|
+
|
|
441
396
|
// iterate form-elements on main-level
|
|
442
397
|
if (element.type === "checkbox") {
|
|
443
398
|
// create array if element is a checkbox (to contain several values)
|
|
@@ -464,6 +419,7 @@ export default {
|
|
|
464
419
|
/* begin cmd-form ---------------------------------------------------------------------------------------- */
|
|
465
420
|
.cmd-form {
|
|
466
421
|
&:not([data-use-validation="true"]) {
|
|
422
|
+
|
|
467
423
|
label.error :where(::placeholder, select option:first-child),
|
|
468
424
|
:where(input, select, textarea):invalid:focus {
|
|
469
425
|
color: var(--error-color);
|
|
@@ -497,7 +453,9 @@ export default {
|
|
|
497
453
|
}
|
|
498
454
|
|
|
499
455
|
&.error {
|
|
500
|
-
|
|
456
|
+
|
|
457
|
+
fieldset,
|
|
458
|
+
*:invalid {
|
|
501
459
|
border-color: var(--error-color);
|
|
502
460
|
}
|
|
503
461
|
}
|
|
@@ -514,7 +472,7 @@ export default {
|
|
|
514
472
|
margin-left: auto;
|
|
515
473
|
}
|
|
516
474
|
|
|
517
|
-
fieldset
|
|
475
|
+
fieldset+.button-wrapper {
|
|
518
476
|
margin-top: var(--default-margin);
|
|
519
477
|
}
|
|
520
478
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- begin CmdGoogleMaps ---------------------------------------------------------------------------------------- -->
|
|
3
3
|
<div class="cmd-google-maps responsive-wrapper">
|
|
4
4
|
<!-- begin CmdHeadline -->
|
|
5
|
-
<CmdHeadline v-if="
|
|
5
|
+
<CmdHeadline v-if="cmdHeadlineProperties.show && cmdHeadlineProperties.headlineText" v-bind="cmdHeadlineProperties" />
|
|
6
6
|
<!-- end CmdHeadline-->
|
|
7
7
|
|
|
8
8
|
<!-- begin CmdSystemMessage -->
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
required: true
|
|
62
62
|
},
|
|
63
63
|
/**
|
|
64
|
-
* properties for
|
|
64
|
+
* properties for CmdHeadline-component
|
|
65
65
|
*/
|
|
66
66
|
cmdHeadline: {
|
|
67
67
|
type: Object,
|
|
@@ -74,6 +74,13 @@ export default {
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
computed: {
|
|
77
|
+
cmdHeadlineProperties() {
|
|
78
|
+
return {
|
|
79
|
+
show: true,
|
|
80
|
+
headlineLevel: 3,
|
|
81
|
+
...this.cmdHeadline
|
|
82
|
+
}
|
|
83
|
+
},
|
|
77
84
|
locateAddress() {
|
|
78
85
|
if(this.address) {
|
|
79
86
|
const url = new URL("https://maps.google.de/maps?ie=UTF8&t=&z=17&iwloc=B&output=embed")
|
|
@@ -80,16 +80,12 @@
|
|
|
80
80
|
<!-- end CmdFormElement -->
|
|
81
81
|
|
|
82
82
|
<template v-else-if="headlineText"
|
|
83
|
-
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon': cmdIcon?.iconClass}, headlineTextAlign]"
|
|
84
|
-
<!-- begin CmdIcon -->
|
|
83
|
+
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon': cmdIcon?.iconClass}, headlineTextAlign]">>
|
|
85
84
|
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon"/>
|
|
86
|
-
<!-- end CmdIcon -->
|
|
87
85
|
|
|
88
86
|
<template v-if="preHeadlineText">
|
|
89
87
|
<component v-if="headlineText" :is="headlineTag">
|
|
90
|
-
<!-- begin CmdIcon -->
|
|
91
88
|
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon"/>
|
|
92
|
-
<!-- end CmdIcon -->
|
|
93
89
|
|
|
94
90
|
<span :class="['pre-headline-text-wrapper', 'text-align-' + textAlign]">
|
|
95
91
|
<!-- begin pre-headline-text -->
|
|
@@ -128,6 +124,11 @@ import {buildComponentPath, findEditComponentWrapper, updateHandlerProvider} fro
|
|
|
128
124
|
export default {
|
|
129
125
|
name: "CmdHeadline",
|
|
130
126
|
mixins: [EditMode],
|
|
127
|
+
inject: {
|
|
128
|
+
editModeContext: {
|
|
129
|
+
default: null
|
|
130
|
+
}
|
|
131
|
+
},
|
|
131
132
|
data() {
|
|
132
133
|
return {
|
|
133
134
|
editableHeadlineText: null,
|
|
@@ -152,13 +153,13 @@ export default {
|
|
|
152
153
|
/**
|
|
153
154
|
* set highlight-level for headline
|
|
154
155
|
*
|
|
155
|
-
* @allowedValues:
|
|
156
|
+
* @allowedValues: null, "primary", "secondary", "tertiary"
|
|
156
157
|
*/
|
|
157
158
|
highlightLevel: {
|
|
158
159
|
type: String,
|
|
159
|
-
default:
|
|
160
|
+
default: null,
|
|
160
161
|
validator(value) {
|
|
161
|
-
return value ===
|
|
162
|
+
return value === null ||
|
|
162
163
|
value === "primary" ||
|
|
163
164
|
value === "secondary" ||
|
|
164
165
|
value === "tertiary"
|
|
@@ -188,7 +189,7 @@ export default {
|
|
|
188
189
|
}
|
|
189
190
|
},
|
|
190
191
|
/**
|
|
191
|
-
* properties for CmdIcon-component to show icon
|
|
192
|
+
* properties for CmdIcon-component to show icon before headline
|
|
192
193
|
*/
|
|
193
194
|
cmdIcon: {
|
|
194
195
|
type: Object,
|