comand-component-library 4.1.64 → 4.1.66
Sign up to get free protection for your applications and to get access to all the features.
@@ -1906,7 +1906,7 @@ const Y = /* @__PURE__ */ P(ss, [["render", ys]]), bs = {
|
|
1906
1906
|
mounted() {
|
1907
1907
|
if (this.relatedId) {
|
1908
1908
|
const e = document.getElementById(this.relatedId);
|
1909
|
-
e && (document.querySelector(this.scrollContainer).addEventListener("scroll", this.hideTooltip), document.addEventListener("keyup", this.hideTooltipOnEsc), this.toggleVisibilityByClick ? e.addEventListener("click", this.toggleTooltipVisibility) : (e.addEventListener("mouseenter", this.showTooltip), e.addEventListener("mouseleave", this.hideTooltip)));
|
1909
|
+
e && (this.scrollContainer && (document.querySelector(this.scrollContainer).addEventListener("scroll", this.hideTooltip), document.addEventListener("keyup", this.hideTooltipOnEsc)), this.toggleVisibilityByClick ? e.addEventListener("click", this.toggleTooltipVisibility) : (e.addEventListener("mouseenter", this.showTooltip), e.addEventListener("mouseleave", this.hideTooltip)));
|
1910
1910
|
}
|
1911
1911
|
},
|
1912
1912
|
methods: {
|
@@ -2179,6 +2179,13 @@ function Is(e, n, t, s, i, o) {
|
|
2179
2179
|
const Bs = /* @__PURE__ */ P(ks, [["render", Is]]), Fs = {
|
2180
2180
|
name: "CmdTooltipForFormElements",
|
2181
2181
|
props: {
|
2182
|
+
/**
|
2183
|
+
* specify a scroll-container which scrolling hides the tooltip
|
2184
|
+
*/
|
2185
|
+
scrollContainerForTooltip: {
|
2186
|
+
type: String,
|
2187
|
+
required: !1
|
2188
|
+
},
|
2182
2189
|
/**
|
2183
2190
|
* related-id for CmdTooltip-component
|
2184
2191
|
*/
|
@@ -2235,13 +2242,14 @@ function Ds(e, n, t, s, i, o) {
|
|
2235
2242
|
ref: "tooltip",
|
2236
2243
|
class: _(["cmd-tooltip-for-form-elements box", t.validationStatus]),
|
2237
2244
|
relatedId: t.relatedId,
|
2245
|
+
scrollContainer: t.scrollContainerForTooltip,
|
2238
2246
|
"toggle-visibility-by-click": !0
|
2239
2247
|
}, {
|
2240
2248
|
default: k(() => [
|
2241
2249
|
o.cmdListOfRequirementsProperties.showRequirements ? (l(), w(d, R(I({ key: 0 }, o.cmdListOfRequirementsProperties)), null, 16)) : m("", !0)
|
2242
2250
|
]),
|
2243
2251
|
_: 1
|
2244
|
-
}, 8, ["class", "relatedId"]);
|
2252
|
+
}, 8, ["class", "relatedId", "scrollContainer"]);
|
2245
2253
|
}
|
2246
2254
|
const mn = /* @__PURE__ */ P(Fs, [["render", Ds]]), hn = {
|
2247
2255
|
data() {
|
@@ -2610,6 +2618,13 @@ const fn = {
|
|
2610
2618
|
};
|
2611
2619
|
},
|
2612
2620
|
props: {
|
2621
|
+
/**
|
2622
|
+
* specify a scroll-container which scrolling hides the tooltip
|
2623
|
+
*/
|
2624
|
+
scrollContainerForTooltip: {
|
2625
|
+
type: String,
|
2626
|
+
required: !1
|
2627
|
+
},
|
2613
2628
|
/**
|
2614
2629
|
* set value for v-model (must be named modelValue in vue3 if default v-model should be used)
|
2615
2630
|
*/
|
@@ -3157,9 +3172,10 @@ function ga(e, n, t, s, i, o) {
|
|
3157
3172
|
ref: "tooltip",
|
3158
3173
|
validationStatus: e.validationStatus,
|
3159
3174
|
relatedId: e.tooltipId,
|
3175
|
+
scrollContainerForTooltip: t.scrollContainerForTooltip,
|
3160
3176
|
cmdListOfRequirements: e.listOfRequirements,
|
3161
3177
|
role: e.validationStatus === "error" ? "alert" : "dialog"
|
3162
|
-
}, null, 8, ["validationStatus", "relatedId", "cmdListOfRequirements", "role"])) : m("", !0)
|
3178
|
+
}, null, 8, ["validationStatus", "relatedId", "scrollContainerForTooltip", "cmdListOfRequirements", "role"])) : m("", !0)
|
3163
3179
|
], 2)) : m("", !0),
|
3164
3180
|
e.$attrs.type !== "checkbox" && e.$attrs.type !== "radio" && e.$attrs.type !== "search" ? (l(), r("span", Ws, [
|
3165
3181
|
t.fieldIconClass ? (l(), w(d, {
|
@@ -18534,7 +18550,7 @@ function c1(e, n, t, s, i, o) {
|
|
18534
18550
|
})
|
18535
18551
|
], 64);
|
18536
18552
|
}
|
18537
|
-
const bo = /* @__PURE__ */ P(e1, [["render", c1]]), u1 = "comand-component-library", m1 = "4.1.
|
18553
|
+
const bo = /* @__PURE__ */ P(e1, [["render", c1]]), u1 = "comand-component-library", m1 = "4.1.66", h1 = "GPL-3.0-only", p1 = "CoManD-UI", f1 = "module", g1 = {
|
18538
18554
|
prepublishOnly: "npm run build-lib",
|
18539
18555
|
dev: "vite",
|
18540
18556
|
build: "vite build",
|
package/package.json
CHANGED
@@ -53,6 +53,7 @@
|
|
53
53
|
ref="tooltip"
|
54
54
|
:validationStatus="validationStatus"
|
55
55
|
:relatedId="tooltipId"
|
56
|
+
:scrollContainerForTooltip="scrollContainerForTooltip"
|
56
57
|
:cmdListOfRequirements="listOfRequirements"
|
57
58
|
:role="validationStatus === 'error' ? 'alert' : 'dialog'"
|
58
59
|
/>
|
@@ -283,6 +284,13 @@ export default {
|
|
283
284
|
}
|
284
285
|
},
|
285
286
|
props: {
|
287
|
+
/**
|
288
|
+
* specify a scroll-container which scrolling hides the tooltip
|
289
|
+
*/
|
290
|
+
scrollContainerForTooltip: {
|
291
|
+
type: String,
|
292
|
+
required: false
|
293
|
+
},
|
286
294
|
/**
|
287
295
|
* set value for v-model (must be named modelValue in vue3 if default v-model should be used)
|
288
296
|
*/
|
@@ -117,8 +117,10 @@ export default {
|
|
117
117
|
const relatedElement = document.getElementById(this.relatedId)
|
118
118
|
|
119
119
|
if(relatedElement) {
|
120
|
-
|
121
|
-
|
120
|
+
if(this.scrollContainer) {
|
121
|
+
document.querySelector(this.scrollContainer).addEventListener("scroll", this.hideTooltip) // avoid fixed tooltip on scroll
|
122
|
+
document.addEventListener("keyup", this.hideTooltipOnEsc) // close tooltip by using "escape"-key
|
123
|
+
}
|
122
124
|
|
123
125
|
if (this.toggleVisibilityByClick) {
|
124
126
|
relatedElement.addEventListener("click", this.toggleTooltipVisibility)
|
@@ -5,6 +5,7 @@
|
|
5
5
|
class="cmd-tooltip-for-form-elements box"
|
6
6
|
:class="validationStatus"
|
7
7
|
:relatedId="relatedId"
|
8
|
+
:scrollContainer="scrollContainerForTooltip"
|
8
9
|
:toggle-visibility-by-click="true">
|
9
10
|
|
10
11
|
<!-- begin CmdListOfRequirements -->
|
@@ -21,6 +22,13 @@
|
|
21
22
|
export default {
|
22
23
|
name: "CmdTooltipForFormElements",
|
23
24
|
props: {
|
25
|
+
/**
|
26
|
+
* specify a scroll-container which scrolling hides the tooltip
|
27
|
+
*/
|
28
|
+
scrollContainerForTooltip: {
|
29
|
+
type: String,
|
30
|
+
required: false
|
31
|
+
},
|
24
32
|
/**
|
25
33
|
* related-id for CmdTooltip-component
|
26
34
|
*/
|