comand-component-library 3.3.84 → 3.3.86
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.js +5623 -3929
- package/dist/comand-component-library.umd.cjs +4 -4
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/App.vue +215 -112
- package/src/assets/data/component-structure.json +228 -0
- package/src/assets/data/form-elements.json +156 -0
- package/src/assets/data/opening-hours.json +79 -37
- package/src/components/CmdAddressData.vue +187 -201
- package/src/components/CmdAddressDataItem.vue +306 -0
- package/src/components/CmdBox.vue +1 -0
- package/src/components/CmdBoxWrapper.vue +53 -5
- package/src/components/CmdFancyBox.vue +31 -4
- package/src/components/CmdForm.vue +98 -4
- package/src/components/CmdFormElement.vue +5 -1
- package/src/components/CmdHeadline.vue +179 -52
- package/src/components/CmdImage.vue +205 -76
- package/src/components/CmdImageGallery.vue +88 -85
- package/src/components/CmdListOfLinks.vue +63 -43
- package/src/components/CmdListOfLinksItem.vue +97 -0
- package/src/components/CmdLoginForm.vue +3 -6
- package/src/components/CmdMultistepFormProgressBar.vue +37 -8
- package/src/components/CmdOpeningHours.vue +280 -63
- package/src/components/CmdOpeningHoursItem.vue +264 -0
- package/src/components/{CmdPager.vue → CmdPagination.vue} +2 -2
- package/src/components/CmdSlideshow.vue +137 -10
- package/src/components/CmdSocialNetworks.vue +115 -28
- package/src/components/CmdSocialNetworksItem.vue +184 -0
- package/src/components/CmdTable.vue +0 -1
- package/src/components/CmdTextImageBlock.vue +158 -0
- package/src/components/CmdThumbnailScroller.vue +132 -12
- package/src/components/CmdToggleDarkMode.vue +58 -1
- package/src/components/EditComponentWrapper.vue +553 -0
- package/src/index.js +2 -2
- package/src/mixins/EditMode.vue +28 -9
- package/src/utils/editmode.js +30 -5
- package/src/components/CmdTextBlock.vue +0 -73
- package/src/editmode/editModeContext.js +0 -50
@@ -1,52 +1,60 @@
|
|
1
1
|
<template>
|
2
2
|
<div :class="['cmd-list-of-links', {box: styleAsBox, horizontal: orientation === 'horizontal', 'section-anchors': sectionAnchors, 'large-icons': largeIcons}]">
|
3
|
-
<!-- begin
|
3
|
+
<!-- begin cmd-headline -->
|
4
4
|
<CmdHeadline
|
5
|
-
v-if="cmdHeadline"
|
5
|
+
v-if="cmdHeadline?.headlineText || editModeContext"
|
6
6
|
v-bind="cmdHeadline"
|
7
7
|
/>
|
8
|
-
<!-- end
|
8
|
+
<!-- end cmd-headline -->
|
9
9
|
|
10
10
|
<!-- begin list of links -->
|
11
11
|
<ul :class="['flex-container', {'no-gap': !useGap},'align-' + align, setStretchClass]">
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
12
|
+
<CmdListOfLinksItem
|
13
|
+
v-if="!editModeContext"
|
14
|
+
v-for="(link, index) in links"
|
15
|
+
:key="index"
|
16
|
+
:class="{'active': sectionAnchors && activeSection === index}"
|
17
|
+
:link="link"
|
18
|
+
/>
|
19
|
+
|
20
|
+
<!-- begin edit-mode -->
|
21
|
+
<li v-else>
|
22
|
+
<EditComponentWrapper
|
23
|
+
v-for="(link, index) in links"
|
24
|
+
:key="'x' + index"
|
25
|
+
class="edit-items"
|
26
|
+
:showComponentName="false"
|
27
|
+
componentTag="ul"
|
28
|
+
componentName="CmdLinkItem"
|
29
|
+
:componentProps="link"
|
30
|
+
:allowedComponentTypes="[]"
|
31
|
+
:componentPath="['props', 'links', index]"
|
32
|
+
:itemProvider="itemProvider"
|
33
|
+
>
|
34
|
+
<CmdListOfLinksItem
|
35
|
+
:class="{'active': sectionAnchors && activeSection === index}"
|
36
|
+
:link="link"
|
37
|
+
/>
|
38
|
+
</EditComponentWrapper>
|
39
|
+
<button v-if="links.length === 0" type="button" class="button confirm small" @click="onAddItem">
|
40
|
+
<span class="icon-plus"></span>
|
41
|
+
<span>Add new entry</span>
|
42
|
+
</button>
|
36
43
|
</li>
|
44
|
+
<!-- end edit-mode -->
|
37
45
|
</ul>
|
38
46
|
<!-- end list of links -->
|
39
47
|
</div>
|
40
48
|
</template>
|
41
49
|
|
42
50
|
<script>
|
43
|
-
|
44
|
-
import {
|
45
|
-
import {openFancyBox} from "./CmdFancyBox.vue"
|
51
|
+
import EditMode from "../mixins/EditMode.vue"
|
52
|
+
import {buildComponentPath, updateHandlerProvider} from "../utils/editmode.js"
|
46
53
|
|
47
54
|
export default {
|
48
55
|
name: "CmdListOfLinks",
|
49
56
|
emits: ["click"],
|
57
|
+
mixins: [EditMode],
|
50
58
|
props: {
|
51
59
|
/**
|
52
60
|
* activate if component should contain a list of anchors for the section within the page
|
@@ -133,16 +141,31 @@ export default {
|
|
133
141
|
}
|
134
142
|
},
|
135
143
|
methods: {
|
136
|
-
|
137
|
-
|
144
|
+
onAddItem() {
|
145
|
+
this.editModeContext.content.addContent(
|
146
|
+
buildComponentPath(this, 'props', 'links', -1),
|
147
|
+
this.itemProvider)
|
148
|
+
},
|
149
|
+
itemProvider() {
|
150
|
+
return {
|
151
|
+
"iconClass": "icon-user-profile",
|
152
|
+
"type": "href",
|
153
|
+
"text": "Linktext",
|
154
|
+
"path": "#",
|
155
|
+
"tooltip": "Tooltip",
|
156
|
+
"target": "_blank"
|
157
|
+
}
|
138
158
|
},
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
159
|
+
updateHandlerProvider() {
|
160
|
+
return updateHandlerProvider(this, {
|
161
|
+
update(props, childUpdateHandlers) {
|
162
|
+
const cmdHeadlineUpdateHandler = childUpdateHandlers?.find(handler => handler.name === "CmdHeadline")
|
163
|
+
if (cmdHeadlineUpdateHandler) {
|
164
|
+
props.cmdHeadline = props.cmdHeadline || {}
|
165
|
+
cmdHeadlineUpdateHandler.update(props.cmdHeadline)
|
144
166
|
}
|
145
|
-
|
167
|
+
}
|
168
|
+
})
|
146
169
|
}
|
147
170
|
}
|
148
171
|
}
|
@@ -151,10 +174,7 @@ export default {
|
|
151
174
|
<style lang="scss">
|
152
175
|
/* begin cmd-list-of-links ---------------------------------------------------------------------------------------- */
|
153
176
|
.cmd-list-of-links {
|
154
|
-
|
155
|
-
flex-direction: column;
|
156
|
-
|
157
|
-
ul {
|
177
|
+
> ul {
|
158
178
|
flex-direction: column;
|
159
179
|
gap: calc(var(--default-gap) / 2);
|
160
180
|
margin: 0;
|
@@ -166,7 +186,7 @@ export default {
|
|
166
186
|
}
|
167
187
|
|
168
188
|
&.horizontal {
|
169
|
-
ul {
|
189
|
+
> ul {
|
170
190
|
gap: var(--default-gap);
|
171
191
|
flex-direction: row;
|
172
192
|
|
@@ -0,0 +1,97 @@
|
|
1
|
+
<template>
|
2
|
+
<!-- begin default-view -->
|
3
|
+
<li v-if="!editing" class="cmd-list-of-links-item">
|
4
|
+
<!-- begin use href -->
|
5
|
+
<a v-if="link.type === 'href' || link.type === undefined"
|
6
|
+
:href="link.path"
|
7
|
+
:target="link.target"
|
8
|
+
@click="executeLink(link, $event)"
|
9
|
+
:title="link.tooltip && link.tooltip !== undefined ? link.tooltip : undefined">
|
10
|
+
<!-- begin CmdIcon -->
|
11
|
+
<CmdIcon v-if="link.iconClass" :iconClass="link.iconClass" :type="link.iconType" />
|
12
|
+
<!-- end CmdIcon -->
|
13
|
+
<span v-if="link.text">{{ link.text }}</span>
|
14
|
+
</a>
|
15
|
+
<!-- end use href --->
|
16
|
+
|
17
|
+
<!-- begin use router-link -->
|
18
|
+
<router-link v-else-if="link.type === 'router'"
|
19
|
+
:to="getRoute(link)"
|
20
|
+
:title="link.tooltip">
|
21
|
+
<!-- begin CmdIcon -->
|
22
|
+
<CmdIcon v-if="link.iconClass" :iconClass="link.iconClass" :type="link.iconType" />
|
23
|
+
<!-- end CmdIcon -->
|
24
|
+
<span v-if="link.text">{{ link.text }}</span>
|
25
|
+
</router-link>
|
26
|
+
<!-- end use router-link -->
|
27
|
+
</li>
|
28
|
+
<!-- end default-view -->
|
29
|
+
|
30
|
+
<!-- begin edit-mode -->
|
31
|
+
<template v-else>
|
32
|
+
<div class="input-wrapper">
|
33
|
+
<CmdFormElement
|
34
|
+
element="input"
|
35
|
+
type="text"
|
36
|
+
labelText="Linktext"
|
37
|
+
:showLabel="false"
|
38
|
+
placeholder="Linktext"
|
39
|
+
v-model="editableText"
|
40
|
+
/>
|
41
|
+
</div>
|
42
|
+
</template>
|
43
|
+
<!-- end edit-mode -->
|
44
|
+
</template>
|
45
|
+
|
46
|
+
<script>
|
47
|
+
import EditMode from "../mixins/EditMode.vue"
|
48
|
+
|
49
|
+
// import functions
|
50
|
+
//import {getRoute} from 'comand-component-library'
|
51
|
+
import {openFancyBox} from "./CmdFancyBox.vue"
|
52
|
+
import {buildComponentPath, updateHandlerProvider} from "../utils/editmode.js"
|
53
|
+
export default {
|
54
|
+
name: "CmdListOfLinksItem",
|
55
|
+
inheritAttrs: false,
|
56
|
+
mixins: [EditMode],
|
57
|
+
data() {
|
58
|
+
return {
|
59
|
+
editableText: this.link.text
|
60
|
+
}
|
61
|
+
},
|
62
|
+
props: {
|
63
|
+
/**
|
64
|
+
* single link
|
65
|
+
*/
|
66
|
+
link: {
|
67
|
+
type: Object,
|
68
|
+
required: false
|
69
|
+
}
|
70
|
+
},
|
71
|
+
methods: {
|
72
|
+
updateHandlerProvider() {
|
73
|
+
const text = this.editableText
|
74
|
+
return updateHandlerProvider(this, {
|
75
|
+
update(props) {
|
76
|
+
props.text = text
|
77
|
+
}
|
78
|
+
})
|
79
|
+
},
|
80
|
+
getRoute(link) {
|
81
|
+
return getRoute(link)
|
82
|
+
},
|
83
|
+
executeLink(link, event) {
|
84
|
+
if (link.fancybox) {
|
85
|
+
event.preventDefault()
|
86
|
+
openFancyBox({url: link.path, showSubmitButtons: link.showSubmitButtons})
|
87
|
+
return
|
88
|
+
}
|
89
|
+
this.$emit("click", {link, originalEvent: event})
|
90
|
+
},
|
91
|
+
}
|
92
|
+
}
|
93
|
+
</script>
|
94
|
+
|
95
|
+
<style lang="scss">
|
96
|
+
|
97
|
+
</style>
|
@@ -404,9 +404,10 @@ export default {
|
|
404
404
|
if (event == null) {
|
405
405
|
return
|
406
406
|
}
|
407
|
-
|
407
|
+
|
408
|
+
if (fieldType === "username") {
|
408
409
|
this.usernameValidationStatus = event === "success";
|
409
|
-
} else if(fieldType === "password") {
|
410
|
+
} else if (fieldType === "password") {
|
410
411
|
this.passwordValidationStatus = event === "success";
|
411
412
|
} else {
|
412
413
|
this.emailValidationStatus = event === "success";
|
@@ -435,10 +436,6 @@ export default {
|
|
435
436
|
align-items: center;
|
436
437
|
text-decoration: none;
|
437
438
|
flex: none;
|
438
|
-
|
439
|
-
[class*="icon-"] {
|
440
|
-
text-decoration: none;
|
441
|
-
}
|
442
439
|
}
|
443
440
|
|
444
441
|
> .button {
|
@@ -124,8 +124,8 @@ export default {
|
|
124
124
|
width: 100%;
|
125
125
|
background: var(--primary-color-reduced-opacity);
|
126
126
|
|
127
|
-
span, [class*="icon-"] {
|
128
|
-
color: var(--
|
127
|
+
:is(span, [class*="icon-"]) {
|
128
|
+
color: var(--pure-white);
|
129
129
|
|
130
130
|
& + [class*="icon-"] {
|
131
131
|
&:last-child {
|
@@ -147,11 +147,17 @@ export default {
|
|
147
147
|
}
|
148
148
|
}
|
149
149
|
}
|
150
|
+
}
|
150
151
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
152
|
+
&:hover, &:active, &:focus {
|
153
|
+
background: var(--primary-color);
|
154
|
+
|
155
|
+
:is(span, [class*="icon-"]) {
|
156
|
+
color: var(--pure-white);
|
157
|
+
}
|
158
|
+
|
159
|
+
.number {
|
160
|
+
color: var(--primary-color);
|
155
161
|
}
|
156
162
|
}
|
157
163
|
|
@@ -165,7 +171,9 @@ export default {
|
|
165
171
|
justify-content: center;
|
166
172
|
border-radius: var(--full-circle);
|
167
173
|
border: var(--default-border);
|
168
|
-
color: var(--
|
174
|
+
border-color: var(--pure-white);
|
175
|
+
background: var(--pure-white);
|
176
|
+
color: var(--primary-color-reduced-opacity);
|
169
177
|
}
|
170
178
|
}
|
171
179
|
|
@@ -190,12 +198,24 @@ export default {
|
|
190
198
|
span, [class*="icon-"] {
|
191
199
|
color: var(--pure-white);
|
192
200
|
}
|
201
|
+
|
202
|
+
&:hover, &:active, &:focus {
|
203
|
+
span, [class*="icon-"] {
|
204
|
+
color: var(--pure-white);
|
205
|
+
|
206
|
+
& + [class*="icon-"] {
|
207
|
+
&:last-child {
|
208
|
+
color: var(--text-color);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
193
213
|
}
|
194
214
|
|
195
215
|
.number {
|
196
216
|
background: var(--pure-white);
|
197
217
|
border-color: var(--pure-white);
|
198
|
-
color: var(--primary-color);
|
218
|
+
color: var(--primary-color) !important;
|
199
219
|
}
|
200
220
|
|
201
221
|
& ~ li {
|
@@ -224,8 +244,17 @@ export default {
|
|
224
244
|
color: var(--primary-color);
|
225
245
|
}
|
226
246
|
}
|
247
|
+
|
248
|
+
.number {
|
249
|
+
border-color: var(--primary-color);
|
250
|
+
}
|
227
251
|
}
|
228
252
|
}
|
253
|
+
|
254
|
+
.number {
|
255
|
+
background: none;
|
256
|
+
border-color: var(--border-color);
|
257
|
+
}
|
229
258
|
}
|
230
259
|
|
231
260
|
& + li {
|