comand-component-library 4.0.30 → 4.0.32
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 +671 -611
- package/dist/comand-component-library.umd.cjs +7 -7
- package/dist/media/images/user-images/fake-user-2.jpg +0 -0
- package/dist/media/images/user-images/fake-user-3.jpg +0 -0
- package/dist/media/images/user-images/fake-user-4.jpg +0 -0
- package/dist/media/images/user-images/fake-user-5.jpg +0 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +34 -1
- package/src/assets/data/listOfComponents.json +3 -1
- package/src/componentSettingsDataAndControls.vue +57 -1
- package/src/components/CmdBox.vue +1 -1
- package/src/components/CmdContainer.vue +29 -3
- package/src/components/CmdImage.vue +12 -6
- package/src/components/CmdLink.vue +9 -4
- package/src/components/CmdWidthLimitationWrapper.vue +31 -15
- package/src/index.js +1 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="cmd-container">
|
3
|
-
<div v-html="contentAboveSlot"></div>
|
2
|
+
<div class="cmd-container" :class="containerClass">
|
3
|
+
<div v-if="contentAboveSlot" v-html="contentAboveSlot"></div>
|
4
4
|
<slot></slot>
|
5
|
-
<div v-html="contentBelowSlot"></div>
|
5
|
+
<div v-if="contentBelowSlot" v-html="contentBelowSlot"></div>
|
6
6
|
</div>
|
7
7
|
</template>
|
8
8
|
|
@@ -25,12 +25,38 @@ export default {
|
|
25
25
|
contentBelowSlot: {
|
26
26
|
type: String,
|
27
27
|
required: false
|
28
|
+
},
|
29
|
+
/**
|
30
|
+
* define container-type
|
31
|
+
*
|
32
|
+
* @allowedValues: "grid", "flex"
|
33
|
+
*/
|
34
|
+
containerType: {
|
35
|
+
type: String,
|
36
|
+
required: false
|
28
37
|
}
|
29
38
|
},
|
30
39
|
methods: {
|
31
40
|
addHandlerProvider() {
|
32
41
|
return ""
|
33
42
|
}
|
43
|
+
},
|
44
|
+
computed: {
|
45
|
+
containerClass() {
|
46
|
+
let htmlClass = null
|
47
|
+
switch(this.containerType) {
|
48
|
+
case "grid":
|
49
|
+
htmlClass = "grid-container-create-columns"
|
50
|
+
break
|
51
|
+
case "flex":
|
52
|
+
htmlClass = "flex-container vertical"
|
53
|
+
break
|
54
|
+
default:
|
55
|
+
htmlClass = null
|
56
|
+
break
|
57
|
+
}
|
58
|
+
return htmlClass
|
59
|
+
}
|
34
60
|
}
|
35
61
|
}
|
36
62
|
</script>
|
@@ -16,6 +16,7 @@
|
|
16
16
|
<figure :class="['cmd-image flex-container no-gap vertical', textAlign]">
|
17
17
|
<!-- begin figcaption above image -->
|
18
18
|
<template v-if="figcaption?.show && figcaption?.position === 'top'">
|
19
|
+
<!-- begin CmdFormElement -->
|
19
20
|
<CmdFormElement
|
20
21
|
v-if="slotProps.editing"
|
21
22
|
element="input"
|
@@ -25,7 +26,8 @@
|
|
25
26
|
labelText="Text figcaption"
|
26
27
|
v-model="editableFigcaptionText"
|
27
28
|
/>
|
28
|
-
|
29
|
+
<!-- end CmdFormElement -->
|
30
|
+
<figcaption v-else-if="figcaption?.text" v-html="figcaption?.text" />
|
29
31
|
</template>
|
30
32
|
<!-- end figcaption above image -->
|
31
33
|
|
@@ -62,6 +64,7 @@
|
|
62
64
|
|
63
65
|
<!-- begin figcaption below image -->
|
64
66
|
<template v-if="figcaption?.show && figcaption?.position !== 'top'">
|
67
|
+
<!-- begin CmdFormElement -->
|
65
68
|
<CmdFormElement
|
66
69
|
v-if="slotProps.editing"
|
67
70
|
element="input"
|
@@ -73,12 +76,15 @@
|
|
73
76
|
v-model="editableFigcaptionText"
|
74
77
|
placeholder="figcaption"
|
75
78
|
/>
|
76
|
-
|
79
|
+
<!-- end CmdFormElement -->
|
80
|
+
<figcaption v-else-if="figcaption?.text" v-html="figcaption?.text" />
|
77
81
|
</template>
|
78
82
|
<!-- end figcaption below image -->
|
79
83
|
|
80
84
|
<!-- begin show placeholder if no image exists (and component is not edited) -->
|
81
|
-
<button v-if="!slotProps.editing && !imageSource"
|
85
|
+
<button v-if="!slotProps.editing && !imageSource"
|
86
|
+
type="button"
|
87
|
+
class="button confirm"
|
82
88
|
@click="onAddItem">
|
83
89
|
<span class="icon-add"></span>
|
84
90
|
<span>Add new image</span>
|
@@ -91,9 +97,9 @@
|
|
91
97
|
|
92
98
|
<!-- begin default-view -->
|
93
99
|
<figure v-else :class="['cmd-image', textAlign]">
|
94
|
-
<figcaption v-if="figcaption?.show && figcaption?.position === 'top'"
|
100
|
+
<figcaption v-if="figcaption?.show && figcaption?.position === 'top'" v-html="figcaption?.text" />
|
95
101
|
<img :src="imageSource" :alt="image?.alt" :title="image?.tooltip" @load="onImageLoaded" />
|
96
|
-
<figcaption v-if="figcaption?.show && figcaption?.position !== 'top'"
|
102
|
+
<figcaption v-if="figcaption?.show && figcaption?.position !== 'top'" v-html="figcaption?.text" />
|
97
103
|
</figure>
|
98
104
|
<!-- end default-view -->
|
99
105
|
</template>
|
@@ -112,7 +118,7 @@ export default {
|
|
112
118
|
mediumMaxWidth: 1023,
|
113
119
|
smallMaxWidth: 600,
|
114
120
|
currentWindowWidth: window.innerWidth,
|
115
|
-
allowedFileExtensions: ["jpg", "jpeg", "png", "webp"],
|
121
|
+
allowedFileExtensions: ["gif", "jpg", "jpeg", "png", "webp", "svg"],
|
116
122
|
uploadInitiated: false,
|
117
123
|
allowDrop: false,
|
118
124
|
showFigcaption: true,
|
@@ -33,16 +33,22 @@ export default {
|
|
33
33
|
props: {
|
34
34
|
/**
|
35
35
|
* set type of link
|
36
|
+
*
|
36
37
|
* @allowedValues: 'href', 'router', 'button'
|
37
38
|
*/
|
38
39
|
linkType: {
|
39
40
|
type: String,
|
40
|
-
default: "href"
|
41
|
+
default: "href",
|
42
|
+
validator(value) {
|
43
|
+
return value === "href" ||
|
44
|
+
value === "router" ||
|
45
|
+
value === "button"
|
46
|
+
}
|
41
47
|
},
|
42
48
|
/**
|
43
|
-
* set path
|
49
|
+
* set a path
|
44
50
|
*
|
45
|
-
* linkType must be 'href', 'router'
|
51
|
+
* linkType-property must be 'href', 'router'
|
46
52
|
*/
|
47
53
|
path: {
|
48
54
|
type: String,
|
@@ -66,7 +72,6 @@ export default {
|
|
66
72
|
},
|
67
73
|
/**
|
68
74
|
* displayed text
|
69
|
-
*
|
70
75
|
*/
|
71
76
|
text: {
|
72
77
|
type: String,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="cmd-width-limitation-wrapper" :class="{'sticky': sticky}">
|
3
3
|
<!-- begin slot-content in section -->
|
4
|
-
<section v-if="useInnerSection" :class="
|
4
|
+
<section v-if="useInnerSection" :class="setSectionClass" :id="anchorId">
|
5
5
|
<!-- begin cmd-headline -->
|
6
6
|
<CmdHeadline
|
7
7
|
v-if="cmdHeadline"
|
@@ -12,16 +12,14 @@
|
|
12
12
|
<!-- end cmd-headline -->
|
13
13
|
|
14
14
|
<!-- begin slot-content (one column only) -->
|
15
|
-
<slot v-if="numberOfColumns === 1"
|
15
|
+
<slot v-if="numberOfColumns === 1"></slot>
|
16
16
|
<!-- end slot-content (one column only) -->
|
17
17
|
|
18
18
|
<!-- begin grid-/flex-container to wrap multiple columns/items -->
|
19
|
-
<div v-else :class="
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<!-- end slot-content (multiple columns only) -->
|
24
|
-
</div>
|
19
|
+
<div v-else :class="setInnerClass">
|
20
|
+
<!-- begin slot-content (multiple columns only) -->
|
21
|
+
<slot></slot>
|
22
|
+
<!-- end slot-content (multiple columns only) -->
|
25
23
|
</div>
|
26
24
|
<!-- end grid-/flex-container to wrap multiple columns/items -->
|
27
25
|
</section>
|
@@ -49,9 +47,9 @@ export default {
|
|
49
47
|
return value >= 0
|
50
48
|
}
|
51
49
|
},
|
52
|
-
|
53
|
-
type:
|
54
|
-
default:
|
50
|
+
contentType: {
|
51
|
+
type: String,
|
52
|
+
default: "flex"
|
55
53
|
},
|
56
54
|
/**
|
57
55
|
* set a html-tag as inner tag
|
@@ -91,7 +89,7 @@ export default {
|
|
91
89
|
*
|
92
90
|
* innerWrapper-property must be true
|
93
91
|
*/
|
94
|
-
|
92
|
+
sectionClass: {
|
95
93
|
type: String,
|
96
94
|
required: false
|
97
95
|
},
|
@@ -102,6 +100,10 @@ export default {
|
|
102
100
|
type: String,
|
103
101
|
required: false
|
104
102
|
},
|
103
|
+
contentTypeOrientation: {
|
104
|
+
type: String,
|
105
|
+
default: "horizontal"
|
106
|
+
},
|
105
107
|
/**
|
106
108
|
* properties for CmdHeadline-component
|
107
109
|
*
|
@@ -113,9 +115,9 @@ export default {
|
|
113
115
|
},
|
114
116
|
},
|
115
117
|
computed: {
|
116
|
-
|
117
|
-
if (this.
|
118
|
-
return this.
|
118
|
+
setSectionClass() {
|
119
|
+
if (this.sectionClass) {
|
120
|
+
return this.sectionClass
|
119
121
|
}
|
120
122
|
if (this.innerComponent === "header") {
|
121
123
|
return "grid-container-create-columns"
|
@@ -125,6 +127,20 @@ export default {
|
|
125
127
|
}
|
126
128
|
return ""
|
127
129
|
},
|
130
|
+
setInnerClass() {
|
131
|
+
if(this.contentType === "grid") {
|
132
|
+
return "grid-container-create-columns"
|
133
|
+
}
|
134
|
+
|
135
|
+
if(this.contentType === "flex") {
|
136
|
+
if(this.contentTypeOrientation === "horizontal") {
|
137
|
+
return "flex-container"
|
138
|
+
} else if(this.contentTypeOrientation === "vertical") {
|
139
|
+
return "flex-container vertical"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
return ""
|
143
|
+
},
|
128
144
|
setOuterId() {
|
129
145
|
if (this.innerComponent === "header") {
|
130
146
|
return "site-header"
|
package/src/index.js
CHANGED
@@ -22,6 +22,7 @@ export { default as CmdImage } from '@/components/CmdImage.vue'
|
|
22
22
|
export { default as CmdImageGallery } from '@/components/CmdImageGallery.vue'
|
23
23
|
export { default as CmdImageZoom } from '@/components/CmdImageZoom.vue'
|
24
24
|
export { default as CmdInputGroup } from '@/components/CmdInputGroup.vue'
|
25
|
+
export { default as CmdLink } from '@/components/CmdLink.vue'
|
25
26
|
export { default as CmdListOfLinks } from '@/components/CmdListOfLinks.vue'
|
26
27
|
export { default as CmdLoginForm } from '@/components/CmdLoginForm.vue'
|
27
28
|
export { default as CmdMainNavigation } from '@/components/CmdMainNavigation.vue'
|