comand-component-library 4.0.66 → 4.0.68
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.js +474 -486
- package/dist/comand-component-library.umd.cjs +5 -5
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +16 -3
- package/src/assets/data/list-of-links.json +2 -2
- package/src/components/CmdContainer.vue +5 -4
- package/src/components/CmdListOfLinksItem.vue +0 -9
- package/src/directives/fancybox.js +1 -2
package/package.json
CHANGED
package/src/ComponentLibrary.vue
CHANGED
@@ -1297,8 +1297,8 @@
|
|
1297
1297
|
contentOrientation="horizontal"
|
1298
1298
|
innerClass="inner-class"
|
1299
1299
|
>
|
1300
|
-
<
|
1301
|
-
<
|
1300
|
+
<component :is="componentNameForContainer" headlineText="Headline 1" headlineLevel="6" />
|
1301
|
+
<component :is="componentNameForContainer" headlineText="Headline 2" headlineLevel="6" />
|
1302
1302
|
</CmdContainer>
|
1303
1303
|
</CmdWidthLimitationWrapper>
|
1304
1304
|
<!-- end container ------------------------------------------------------------------------------------------------------------------------------------------------------->
|
@@ -1517,6 +1517,15 @@
|
|
1517
1517
|
:fancybox="true"
|
1518
1518
|
:icon="{iconClass: 'icon-chevron-one-stripe-right', position: 'right', tooltip: 'Tooltip for hyperlink'}"
|
1519
1519
|
/>
|
1520
|
+
<button @click="showCmdLink = true"><span>Add link</span></button>
|
1521
|
+
<CmdLink
|
1522
|
+
v-if="showCmdLink"
|
1523
|
+
path="#"
|
1524
|
+
linkType="href"
|
1525
|
+
text="Link added on click"
|
1526
|
+
:fancybox="true"
|
1527
|
+
:icon="{iconClass: 'icon-chevron-one-stripe-right', position: 'right', tooltip: 'Tooltip for hyperlink'}"
|
1528
|
+
/>
|
1520
1529
|
</CmdWidthLimitationWrapper>
|
1521
1530
|
<!-- end link ------------------------------------------------------------------------------------------------------------------------------------------------------->
|
1522
1531
|
|
@@ -2106,14 +2115,17 @@ import {localizedTime} from "./components/CmdOpeningHours.vue"
|
|
2106
2115
|
// import data and controls for settings
|
2107
2116
|
import componentSettingsDataAndControls from "@/componentSettingsDataAndControls.vue"
|
2108
2117
|
|
2118
|
+
import CmdHeadline from "./components/CmdHeadline.vue"
|
2109
2119
|
export default {
|
2110
2120
|
name: "App",
|
2111
2121
|
mixins: [componentSettingsDataAndControls],
|
2112
2122
|
components: {
|
2113
|
-
PageOverview
|
2123
|
+
PageOverview,
|
2124
|
+
CmdHeadline
|
2114
2125
|
},
|
2115
2126
|
data() {
|
2116
2127
|
return {
|
2128
|
+
componentNameForContainer: "CmdHeadline",
|
2117
2129
|
listOfComponents,
|
2118
2130
|
activeEntry: "CmdAddressData",
|
2119
2131
|
basicFormData: {},
|
@@ -2174,6 +2186,7 @@ export default {
|
|
2174
2186
|
accordionGroupOpen: false,
|
2175
2187
|
showPageMultistep: 1,
|
2176
2188
|
showPagePager: 1,
|
2189
|
+
showCmdLink: false,
|
2177
2190
|
selectedOption: "",
|
2178
2191
|
selectedOptions: [],
|
2179
2192
|
selectedCountry: "de",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"tooltip": "Tooltip"
|
15
15
|
},
|
16
16
|
"type": "href",
|
17
|
-
"text": "
|
17
|
+
"text": "Fancybox content",
|
18
18
|
"path": "/content/fancybox-content.html",
|
19
19
|
"fancybox": true,
|
20
20
|
"children": [
|
@@ -45,7 +45,7 @@
|
|
45
45
|
},
|
46
46
|
"type": "href",
|
47
47
|
"text": "External link",
|
48
|
-
"path": "
|
48
|
+
"path": "https://www.comand-cms.com",
|
49
49
|
"target": "_blank",
|
50
50
|
"tooltip": "Open CoManD-Website in new tab"
|
51
51
|
}
|
@@ -100,18 +100,19 @@ export default {
|
|
100
100
|
}
|
101
101
|
|
102
102
|
const vnodes = this.$slots.default()
|
103
|
+
|
103
104
|
if (vnodes.length === 1 && typeof vnodes[0].type === "symbol" && Array.isArray(vnodes[0].children)) {
|
104
105
|
return vnodes[0].children.length === 1
|
105
106
|
}
|
107
|
+
if (vnodes.length === 1 && typeof vnodes[0].type === "object" && vnodes[0].type.name === "RenderComponents" && typeof vnodes[0].props === "object" && Array.isArray(vnodes[0].props.components)) {
|
108
|
+
return vnodes[0].props.components.length === 1
|
109
|
+
}
|
106
110
|
return vnodes.length === 1
|
107
111
|
}
|
108
112
|
},
|
109
113
|
computed: {
|
110
|
-
containerClass() {
|
111
|
-
|
112
|
-
},
|
113
114
|
setInnerClass() {
|
114
|
-
let htmlClass = this.innerClass
|
115
|
+
let htmlClass = this.innerClass || ""
|
115
116
|
switch (this.containerType) {
|
116
117
|
case "grid":
|
117
118
|
htmlClass += " grid-container-create-columns"
|
@@ -4,7 +4,6 @@
|
|
4
4
|
<!-- begin CmdLink -->
|
5
5
|
<CmdLink
|
6
6
|
v-bind="link"
|
7
|
-
@click="executeLink()"
|
8
7
|
/>
|
9
8
|
<!-- end CmdLink -->
|
10
9
|
|
@@ -69,14 +68,6 @@ export default {
|
|
69
68
|
props.text = text
|
70
69
|
}
|
71
70
|
})
|
72
|
-
},
|
73
|
-
executeLink(event) {
|
74
|
-
if (this.link?.fancybox) {
|
75
|
-
event.preventDefault()
|
76
|
-
openFancyBox({url: this.link?.path, showSubmitButtons: this.link?.showSubmitButtons})
|
77
|
-
return
|
78
|
-
}
|
79
|
-
this.$emit("click", event)
|
80
71
|
}
|
81
72
|
}
|
82
73
|
}
|
@@ -11,7 +11,7 @@ function addClickHandlerToFancyboxLinks(fancyboxLinks) {
|
|
11
11
|
export default {
|
12
12
|
// el = real dom-element
|
13
13
|
mounted(el) {
|
14
|
-
// get
|
14
|
+
// get initially loaded elements
|
15
15
|
const fancyboxLinks = el.querySelectorAll(".fancybox")
|
16
16
|
addClickHandlerToFancyboxLinks(fancyboxLinks)
|
17
17
|
|
@@ -36,7 +36,6 @@ export default {
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
}
|
39
|
-
|
40
39
|
addClickHandlerToFancyboxLinks(targetElements)
|
41
40
|
})
|
42
41
|
|