comand-component-library 4.0.65 → 4.0.67
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 +219 -222
- package/dist/comand-component-library.umd.cjs +5 -5
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +8 -0
- package/src/assets/data/list-of-links.json +2 -2
- package/src/components/CmdLink.vue +10 -3
- package/src/components/CmdListOfLinksItem.vue +0 -9
package/package.json
CHANGED
package/src/ComponentLibrary.vue
CHANGED
@@ -1509,6 +1509,14 @@
|
|
1509
1509
|
v-bind="cmdLinkSettingsData"
|
1510
1510
|
:icon="{iconClass: 'icon-chevron-one-stripe-right', position: 'right', tooltip: 'Tooltip for hyperlink'}"
|
1511
1511
|
/>
|
1512
|
+
<CmdLink
|
1513
|
+
linkType="href"
|
1514
|
+
ref="CmdLink"
|
1515
|
+
v-bind="cmdLinkSettingsData"
|
1516
|
+
text="Link with fancybox"
|
1517
|
+
:fancybox="true"
|
1518
|
+
:icon="{iconClass: 'icon-chevron-one-stripe-right', position: 'right', tooltip: 'Tooltip for hyperlink'}"
|
1519
|
+
/>
|
1512
1520
|
</CmdWidthLimitationWrapper>
|
1513
1521
|
<!-- end link ------------------------------------------------------------------------------------------------------------------------------------------------------->
|
1514
1522
|
|
@@ -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
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- begin CmdLink -->
|
3
3
|
<!-- begin href -->
|
4
|
-
<a v-if="linkType === 'href'" :href="path" :target="target" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton}]" @click="emitClick($event, 'href')">
|
4
|
+
<a v-if="linkType === 'href'" :href="path" :target="target" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton, 'fancybox': fancybox}]" @click="emitClick($event, 'href')">
|
5
5
|
<CmdInnerLink :text="text" :icon="icon">
|
6
6
|
<slot></slot>
|
7
7
|
</CmdInnerLink>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<!-- end href -->
|
10
10
|
|
11
11
|
<!-- begin router -->
|
12
|
-
<router-link v-else-if="linkType === 'router'" :to="path" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton}]" @click="emitClick($event, 'router')">
|
12
|
+
<router-link v-else-if="linkType === 'router'" :to="path" :class="['cmd-link', {'button': styleAsButton, 'primary': primaryButton, 'fancybox': fancybox}]" @click="emitClick($event, 'router')">
|
13
13
|
<CmdInnerLink :text="text" :icon="icon">
|
14
14
|
<slot></slot>
|
15
15
|
</CmdInnerLink>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<!-- end router -->
|
18
18
|
|
19
19
|
<!-- begin button -->
|
20
|
-
<button v-else-if="linkType === 'button'" :class="['cmd-link button', {'primary': primaryButton}]" type="submit" @click="emitClick($event, 'button')">
|
20
|
+
<button v-else-if="linkType === 'button'" :class="['cmd-link button', {'primary': primaryButton, 'fancybox': fancybox}]" type="submit" @click="emitClick($event, 'button')">
|
21
21
|
<CmdInnerLink :text="text" :icon="icon">
|
22
22
|
<slot></slot>
|
23
23
|
</CmdInnerLink>
|
@@ -94,6 +94,13 @@ export default {
|
|
94
94
|
primaryButton: {
|
95
95
|
type: Boolean,
|
96
96
|
default: false
|
97
|
+
},
|
98
|
+
/**
|
99
|
+
* set if path should be opened in fancybox
|
100
|
+
*/
|
101
|
+
fancybox: {
|
102
|
+
type: Boolean,
|
103
|
+
default: false
|
97
104
|
}
|
98
105
|
},
|
99
106
|
methods: {
|
@@ -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
|
}
|