@webitel/ui-sdk 26.6.51 → 26.6.52
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/{components-CCbLe_rX.js → components-CkQp88E1.js} +3 -3
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{wt-chat-emoji-Dfd4PYWk.js → wt-chat-emoji-BMsFdEFN.js} +1 -1
- package/dist/{wt-display-chip-items-Ca8E1ka5.js → wt-display-chip-items-C_FJyoHS.js} +1 -1
- package/dist/{wt-player-BxvfY3f0.js → wt-player-B-8_UKI8.js} +1 -1
- package/dist/{wt-popover-CJZH3wMl.js → wt-popover-CJin-2BO.js} +39 -28
- package/dist/{wt-send-message-popup-iP4Sf5tM.js → wt-send-message-popup-DnpN75TV.js} +1 -1
- package/dist/{wt-type-extension-value-input-Do7kwcYM.js → wt-type-extension-value-input-DblktBU4.js} +1 -1
- package/dist/{wt-vidstack-player-ChEwg7sN.js → wt-vidstack-player-CeejfVM2.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-popover/_internals/composables/usePopoverOverlayFix.ts +44 -14
- package/src/components/wt-popover/wt-popover.vue +3 -2
- package/types/components/wt-popover/_internals/composables/usePopoverOverlayFix.d.ts +4 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, t } from "./chunk-CY3AvKd6.js";
|
|
2
2
|
import { n, t as r } from "./dist-BYiYpK00.js";
|
|
3
|
-
import "./components-
|
|
3
|
+
import "./components-CkQp88E1.js";
|
|
4
4
|
import { t as i } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
5
5
|
import { c as a } from "./enums-pbYAJNeb.js";
|
|
6
6
|
import { t as o } from "./wt-button-CZfPNaIj.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, i as t } from "./components-
|
|
1
|
+
import { c as e, i as t } from "./components-CkQp88E1.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./displayText-CtaxzaBz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -3,7 +3,7 @@ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
|
3
3
|
import { c as n } from "./enums-pbYAJNeb.js";
|
|
4
4
|
import { t as r } from "./wt-button-CZfPNaIj.js";
|
|
5
5
|
import { n as i, t as a } from "./useVidstackSrc-jCDCYTce.js";
|
|
6
|
-
import { t as o } from "./wt-popover-
|
|
6
|
+
import { t as o } from "./wt-popover-CJin-2BO.js";
|
|
7
7
|
import { t as s } from "./wt-slider-BS3SoGht.js";
|
|
8
8
|
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, openBlock as _, ref as v, renderList as y, resolveComponent as b, toDisplayString as x, toRefs as S, unref as C, watch as w, withCtx as T } from "vue";
|
|
9
9
|
//#region src/components/_shared/settings-panel/components/speed-settings/speed-settings.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { r as e } from "./chunk-CY3AvKd6.js";
|
|
2
2
|
import { createElementBlock as t, createVNode as n, defineComponent as r, guardReactiveProps as i, mergeProps as a, normalizeProps as o, onBeforeUnmount as s, onMounted as c, openBlock as l, renderSlot as u, resolveComponent as d, toHandlers as f, unref as p, useAttrs as m, useTemplateRef as h, withCtx as g } from "vue";
|
|
3
3
|
//#region src/components/wt-popover/_internals/composables/usePopoverOverlayFix.ts
|
|
4
|
-
var _ = (e) => {
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
var _ = (e, t) => {
|
|
5
|
+
let n = (n) => {
|
|
6
|
+
let r = n.target;
|
|
7
|
+
if (r?.closest(".p-select-overlay, .p-multiselect-overlay")) {
|
|
8
|
+
let t = e.value?.outsideClickListener;
|
|
9
|
+
if (!t) return;
|
|
10
|
+
document.removeEventListener("click", t), document.addEventListener("click", () => {
|
|
11
|
+
setTimeout(() => {
|
|
12
|
+
let t = e.value?.outsideClickListener;
|
|
13
|
+
t && document.addEventListener("click", t);
|
|
14
|
+
}, 0);
|
|
15
|
+
}, {
|
|
16
|
+
once: !0,
|
|
17
|
+
capture: !0
|
|
18
|
+
});
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
e.value?.visible && e.value.container && (e.value.container.contains(r) || t.value?.contains(r) || e.value.hide?.());
|
|
14
22
|
};
|
|
15
|
-
c(() => document.addEventListener("pointerdown",
|
|
23
|
+
c(() => document.addEventListener("pointerdown", n, !0)), s(() => document.removeEventListener("pointerdown", n, !0));
|
|
16
24
|
}, v = /*@__PURE__*/ r({
|
|
17
25
|
__name: "wt-popover",
|
|
18
26
|
props: {
|
|
@@ -42,25 +50,28 @@ var _ = (e) => {
|
|
|
42
50
|
},
|
|
43
51
|
emits: ["show", "hide"],
|
|
44
52
|
setup(e, { expose: r }) {
|
|
45
|
-
let s = m(), c = h("innerPopover"), v = e;
|
|
46
|
-
_(c);
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
},
|
|
53
|
+
let s = m(), c = h("innerPopover"), v = h("wrapper"), y = e;
|
|
54
|
+
_(c, v);
|
|
55
|
+
let b = (e, t) => {
|
|
56
|
+
y.disabled || c.value?.toggle(e, t ?? void 0);
|
|
57
|
+
}, x = (e, t) => {
|
|
58
|
+
y.disabled || c.value?.show(e, t ?? void 0);
|
|
59
|
+
}, S = (e) => {
|
|
52
60
|
c.value?.hide(e);
|
|
53
61
|
};
|
|
54
62
|
return r({
|
|
55
|
-
toggle:
|
|
56
|
-
show:
|
|
57
|
-
hide:
|
|
63
|
+
toggle: b,
|
|
64
|
+
show: x,
|
|
65
|
+
hide: S
|
|
58
66
|
}), (r, m) => {
|
|
59
67
|
let h = d("p-popover");
|
|
60
|
-
return l(), t("div",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
return l(), t("div", {
|
|
69
|
+
ref_key: "wrapper",
|
|
70
|
+
ref: v
|
|
71
|
+
}, [u(r.$slots, "activator", o(i({
|
|
72
|
+
show: x,
|
|
73
|
+
toggle: b,
|
|
74
|
+
hide: S
|
|
64
75
|
}))), n(h, a(p(s), {
|
|
65
76
|
ref_key: "innerPopover",
|
|
66
77
|
ref: c
|
|
@@ -76,8 +87,8 @@ var _ = (e) => {
|
|
|
76
87
|
unstyled: e.unstyled
|
|
77
88
|
}, f(p(s))), {
|
|
78
89
|
default: g(() => [u(r.$slots, "default", o(i({
|
|
79
|
-
hide:
|
|
80
|
-
toggle:
|
|
90
|
+
hide: S,
|
|
91
|
+
toggle: b
|
|
81
92
|
})))], void 0, !0),
|
|
82
93
|
_: 3
|
|
83
94
|
}, 16, [
|
|
@@ -90,7 +101,7 @@ var _ = (e) => {
|
|
|
90
101
|
"pt-options",
|
|
91
102
|
"close-on-escape",
|
|
92
103
|
"unstyled"
|
|
93
|
-
])]);
|
|
104
|
+
])], 512);
|
|
94
105
|
};
|
|
95
106
|
}
|
|
96
107
|
}), y = /* @__PURE__ */ e({ default: () => b }), b = v;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./components-
|
|
1
|
+
import { n as e } from "./components-CkQp88E1.js";
|
|
2
2
|
import { t } from "./vue-i18n-B8Px6VcD.js";
|
|
3
3
|
import { n, r } from "./clients-aQCH0OHp.js";
|
|
4
4
|
import { createBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
package/dist/{wt-type-extension-value-input-Do7kwcYM.js → wt-type-extension-value-input-DblktBU4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, s as r } from "./components-
|
|
1
|
+
import { a as e, o as t, r as n, s as r } from "./components-CkQp88E1.js";
|
|
2
2
|
import { t as i } from "./enums-pbYAJNeb.js";
|
|
3
3
|
import { t as a } from "./vue-i18n-B8Px6VcD.js";
|
|
4
4
|
import { t as o } from "./clients-aQCH0OHp.js";
|
package/package.json
CHANGED
|
@@ -5,27 +5,57 @@ import { onBeforeUnmount, onMounted, type Ref } from 'vue';
|
|
|
5
5
|
// the click retargets to body and PrimeVue's outside-click closes the popover.
|
|
6
6
|
// Fix: on pointerdown inside a teleported overlay, suppress the popover's outside-click
|
|
7
7
|
// listener for one click cycle so it doesn't fire on the retargeted body click.
|
|
8
|
+
//
|
|
9
|
+
/*
|
|
10
|
+
* @author @Oleksandr Palonnyi
|
|
11
|
+
*
|
|
12
|
+
* Additionally: vidstack's media-button calls stopPropagation() on click events to prevent
|
|
13
|
+
* the media player from intercepting them. This stops PrimeVue's bubble-phase document click
|
|
14
|
+
* listener from ever firing, so any popover inside a media-button stays open when the user
|
|
15
|
+
* clicks outside. A capture-phase pointerdown listener on document fires top-down before any
|
|
16
|
+
* element handler runs, so stopPropagation on click cannot affect it.
|
|
17
|
+
*
|
|
18
|
+
* [WTEL-9770](https://webitel.atlassian.net/browse/WTEL-9770)
|
|
19
|
+
*/
|
|
8
20
|
export const usePopoverOverlayFix = (
|
|
9
21
|
innerPopover: Ref<{
|
|
10
22
|
outsideClickListener?: EventListener;
|
|
23
|
+
visible?: boolean;
|
|
24
|
+
container?: HTMLElement | null;
|
|
25
|
+
hide?: () => void;
|
|
11
26
|
} | null>,
|
|
27
|
+
wrapperElement: Ref<HTMLElement | null>,
|
|
12
28
|
) => {
|
|
13
29
|
const onDocumentPointerdown = (event: PointerEvent) => {
|
|
14
30
|
const target = event.target as Element;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
|
|
32
|
+
if (target?.closest('.p-select-overlay, .p-multiselect-overlay')) {
|
|
33
|
+
const outsideClickListener = innerPopover.value?.outsideClickListener;
|
|
34
|
+
if (!outsideClickListener) return;
|
|
35
|
+
document.removeEventListener('click', outsideClickListener);
|
|
36
|
+
document.addEventListener(
|
|
37
|
+
'click',
|
|
38
|
+
() => {
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
const listenerToRestore = innerPopover.value?.outsideClickListener;
|
|
41
|
+
if (listenerToRestore) {
|
|
42
|
+
document.addEventListener('click', listenerToRestore);
|
|
43
|
+
}
|
|
44
|
+
}, 0);
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
once: true,
|
|
48
|
+
capture: true,
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!innerPopover.value?.visible) return;
|
|
55
|
+
if (!innerPopover.value.container) return;
|
|
56
|
+
if (innerPopover.value.container.contains(target)) return;
|
|
57
|
+
if (wrapperElement.value?.contains(target)) return;
|
|
58
|
+
innerPopover.value.hide?.();
|
|
29
59
|
};
|
|
30
60
|
|
|
31
61
|
onMounted(() =>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div ref="wrapper">
|
|
3
3
|
<slot name="activator" v-bind="{ show, toggle, hide }" />
|
|
4
4
|
|
|
5
5
|
<p-popover
|
|
@@ -32,6 +32,7 @@ interface Props extends PopoverProps {
|
|
|
32
32
|
|
|
33
33
|
const attrs = useAttrs();
|
|
34
34
|
const innerPopover = useTemplateRef('innerPopover');
|
|
35
|
+
const wrapper = useTemplateRef('wrapper');
|
|
35
36
|
const props = withDefaults(defineProps<Props>(), {
|
|
36
37
|
appendTo: 'body',
|
|
37
38
|
baseZIndex: 0,
|
|
@@ -46,7 +47,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
46
47
|
});
|
|
47
48
|
defineEmits<PopoverEmitsOptions>();
|
|
48
49
|
|
|
49
|
-
usePopoverOverlayFix(innerPopover);
|
|
50
|
+
usePopoverOverlayFix(innerPopover, wrapper);
|
|
50
51
|
|
|
51
52
|
const toggle = (event?: Event, target?: HTMLElement | null | undefined) => {
|
|
52
53
|
if (props.disabled) return;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
export declare const usePopoverOverlayFix: (innerPopover: Ref<{
|
|
3
3
|
outsideClickListener?: EventListener;
|
|
4
|
-
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
container?: HTMLElement | null;
|
|
6
|
+
hide?: () => void;
|
|
7
|
+
} | null>, wrapperElement: Ref<HTMLElement | null>) => void;
|