comand-component-library 3.3.36 → 3.3.38
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.js +902 -900
- package/dist/comand-component-library.umd.cjs +4 -4
- package/package.json +1 -1
- package/src/assets/data/list-of-links.json +2 -1
- package/src/components/CmdAddressData.vue +2 -2
- package/src/components/CmdBackToTopButton.vue +14 -10
- package/src/components/CmdBankAccountData.vue +9 -3
- package/src/components/CmdListOfLinks.vue +1 -1
- package/src/components/CmdSiteHeader.vue +1 -1
package/package.json
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
v-telephone="entry.href">
|
33
33
|
{{ entry.href }}
|
34
34
|
</a>
|
35
|
-
<
|
35
|
+
<span v-else v-html="entry.data"></span>
|
36
36
|
</dd>
|
37
37
|
<!-- end data (except for address) -->
|
38
38
|
|
@@ -121,7 +121,7 @@
|
|
121
121
|
</template>
|
122
122
|
<template v-else>{{ entry.href }}</template>
|
123
123
|
</a>
|
124
|
-
<
|
124
|
+
<span v-else-if="!showIconsOnly" v-html="entry.data"></span>
|
125
125
|
<!-- end all entries except address -->
|
126
126
|
|
127
127
|
<!-- begin address -->
|
@@ -17,11 +17,15 @@ export default {
|
|
17
17
|
data() {
|
18
18
|
return {
|
19
19
|
windowInnerHeight: window.innerHeight,
|
20
|
-
windowScrollY: window.scrollY,
|
21
|
-
|
20
|
+
windowScrollY: window.scrollY ?? (document.querySelector(this.parentSelector)?.scrollTop || 0),
|
21
|
+
scrollHeight: document.querySelector(this.parentSelector)?.scrollHeight || 0
|
22
22
|
}
|
23
23
|
},
|
24
24
|
props: {
|
25
|
+
parentSelector: {
|
26
|
+
type: String,
|
27
|
+
default: "body"
|
28
|
+
},
|
25
29
|
/**
|
26
30
|
* icon-class (and shown tooltip on hover) for back to top button
|
27
31
|
*
|
@@ -39,27 +43,27 @@ export default {
|
|
39
43
|
}
|
40
44
|
},
|
41
45
|
created() {
|
42
|
-
window.addEventListener('resize', this.onViewportChange)
|
43
|
-
window.addEventListener('scroll', this.onViewportChange)
|
46
|
+
window.addEventListener('resize', this.onViewportChange)
|
47
|
+
window.addEventListener('scroll', this.onViewportChange)
|
44
48
|
},
|
45
49
|
unmounted() {
|
46
|
-
window.removeEventListener('resize', this.onViewportChange)
|
47
|
-
window.removeEventListener('scroll', this.onViewportChange)
|
50
|
+
window.removeEventListener('resize', this.onViewportChange)
|
51
|
+
window.removeEventListener('scroll', this.onViewportChange)
|
48
52
|
},
|
49
53
|
/* watch for changes */
|
50
54
|
computed: {
|
51
55
|
show() {
|
52
|
-
return this.windowScrollY > 0 && this.windowInnerHeight < this.
|
56
|
+
return this.windowScrollY > 0 && this.windowInnerHeight < this.scrollHeight
|
53
57
|
}
|
54
58
|
},
|
55
59
|
methods: {
|
56
60
|
onViewportChange() {
|
57
61
|
this.windowInnerHeight = window.innerHeight;
|
58
|
-
this.windowScrollY = window.scrollY
|
59
|
-
this.
|
62
|
+
this.windowScrollY = window.scrollY ?? (document.querySelector(this.parentSelector)?.scrollTop || 0)
|
63
|
+
this.scrollHeight = document.querySelector(this.parentSelector)?.scrollHeight || 0
|
60
64
|
},
|
61
65
|
onBackToTop() {
|
62
|
-
window.scrollTo({top: 0, left: 0, behavior: 'smooth'})
|
66
|
+
window.scrollTo({top: 0, left: 0, behavior: 'smooth'})
|
63
67
|
}
|
64
68
|
}
|
65
69
|
}
|
@@ -80,9 +80,15 @@ export default {
|
|
80
80
|
methods: {
|
81
81
|
copyToClipboard(entry) {
|
82
82
|
// get data, remove spaces and copy to clipboard
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
// navigator.permissions.query({name: "clipboard-write"})
|
84
|
+
// .then(result => {
|
85
|
+
// if (result.state === "granted" || result.state === "prompt") {
|
86
|
+
// const output = entry.replace(/\s/g, "")
|
87
|
+
// navigator.clipboard.writeText(output)
|
88
|
+
// alert(output + " was copied to clipboard")
|
89
|
+
// }
|
90
|
+
// })
|
91
|
+
// .catch(error => console.error(error))
|
86
92
|
}
|
87
93
|
}
|
88
94
|
}
|
@@ -139,7 +139,7 @@ export default {
|
|
139
139
|
executeLink(link, event) {
|
140
140
|
if (link.fancybox) {
|
141
141
|
event.preventDefault()
|
142
|
-
openFancyBox({url: link.path})
|
142
|
+
openFancyBox({url: link.path, showSubmitButtons: link.showSubmitButtons})
|
143
143
|
return
|
144
144
|
}
|
145
145
|
this.$emit("click", {link, originalEvent: event})
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<!-- begin CmdMainNavigation -->
|
32
32
|
<CmdMainNavigation
|
33
33
|
v-if="cmdMainNavigation?.navigationEntries?.length && navigationInline"
|
34
|
-
|
34
|
+
v-bind="cmdMainNavigation"
|
35
35
|
:closeOffcanvas="closeOffcanvas"
|
36
36
|
/>
|
37
37
|
<!-- end CmdMainNavigation -->
|