@webitel/ui-sdk 26.6.82 → 26.6.84

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.
Files changed (22) hide show
  1. package/dist/{clients-CIZxqjbV.js → clients-IxWZVjVW.js} +62 -68
  2. package/dist/{components-rPVG1iQS.js → components-DRYvDFUw.js} +40 -34
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.js +1 -1
  5. package/dist/ui-sdk.umd.cjs +385 -385
  6. package/dist/{wt-chat-emoji-DnG7Ikl3.js → wt-chat-emoji-CoyN97-5.js} +1 -1
  7. package/dist/{wt-datepicker-Dj4InHRH.js → wt-datepicker-D2NUlmuX.js} +87 -56
  8. package/dist/{wt-display-chip-items-DUicVxt2.js → wt-display-chip-items-BLskmlas.js} +1 -1
  9. package/dist/{wt-send-message-popup-C2r4l9Ln.js → wt-send-message-popup-CgFHdZeN.js} +2 -2
  10. package/dist/{wt-type-extension-value-input-B9CGBDQg.js → wt-type-extension-value-input-ChqHhqXh.js} +2 -2
  11. package/dist/{wt-vidstack-player-DYCrCT9T.js → wt-vidstack-player-V88ZHB7B.js} +1 -1
  12. package/package.json +1 -1
  13. package/src/components/wt-datepicker/_internals/composables/useOverlayAnchor.ts +56 -0
  14. package/src/components/wt-datepicker/wt-datepicker.vue +11 -1
  15. package/src/components/wt-multi-select/wt-multi-select.vue +7 -1
  16. package/src/components/wt-single-select/wt-single-select.vue +7 -1
  17. package/types/components/wt-datepicker/_internals/composables/useOverlayAnchor.d.ts +4 -0
  18. package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +2 -2
  19. package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +2 -0
  20. package/types/components/wt-popover/wt-popover.vue.d.ts +2 -2
  21. package/types/components/wt-single-select/wt-single-select.vue.d.ts +2 -0
  22. package/types/components/wt-tooltip/_internals/wt-tooltip-floating.vue.d.ts +2 -2
@@ -1,4 +1,4 @@
1
- import "./components-rPVG1iQS.js";
1
+ import "./components-DRYvDFUw.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-De8CDKZ1.js";
4
4
  import { t as n } from "./wt-button-dC4nOW56.js";
@@ -3,7 +3,7 @@ import { d as t, f as n, l as r, r as i } from "./enums-De8CDKZ1.js";
3
3
  import { a, i as o, n as s, r as c, t as l } from "./toZonedTime-B8L5kbse.js";
4
4
  import { t as u } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { t as d } from "./useValidation-DGl2otXJ.js";
6
- import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as ee, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, guardReactiveProps as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeProps as C, onMounted as w, onUnmounted as T, openBlock as E, renderSlot as D, resolveComponent as O, toDisplayString as k, toRefs as A, unref as j, useModel as M, useTemplateRef as N, vShow as P, watch as F, withCtx as I, withDirectives as L } from "vue";
6
+ import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeModels as x, mergeProps as ee, nextTick as S, normalizeProps as C, onMounted as w, onUnmounted as T, openBlock as E, renderSlot as D, resolveComponent as O, toDisplayString as k, toRefs as A, unref as j, useModel as M, useTemplateRef as N, vShow as P, watch as F, withCtx as I, withDirectives as L } from "vue";
7
7
  import R from "primevue/datepicker";
8
8
  //#region node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js
9
9
  function z(e, t, n) {
@@ -16,8 +16,36 @@ function z(e, t, n) {
16
16
  return new Date(r + i);
17
17
  }
18
18
  //#endregion
19
+ //#region src/components/wt-datepicker/_internals/composables/useOverlayAnchor.ts
20
+ function B() {
21
+ let e = null;
22
+ function t(e, t) {
23
+ e.style.width !== t && (e.style.width = t, e.style.minWidth = "");
24
+ }
25
+ function n(e, t, n) {
26
+ e.style.transformOrigin !== t && (e.style.transformOrigin = t, e.style.top = n);
27
+ }
28
+ function r(r) {
29
+ e?.disconnect();
30
+ let i = r.style.width, a = r.style.transformOrigin, o = r.style.top;
31
+ e = new MutationObserver(() => {
32
+ t(r, i), n(r, a, o);
33
+ }), e.observe(r, {
34
+ attributes: !0,
35
+ attributeFilter: ["style"]
36
+ });
37
+ }
38
+ function i() {
39
+ e?.disconnect(), e = null;
40
+ }
41
+ return T(i), {
42
+ lock: r,
43
+ unlock: i
44
+ };
45
+ }
46
+ //#endregion
19
47
  //#region src/components/wt-datepicker/_internals/composables/usePreventZeroPad.ts
20
- function B(e) {
48
+ function V(e) {
21
49
  let t = null;
22
50
  function n(e) {
23
51
  let n = e.target, r = n.value, i = n.selectionStart ?? 0, a = r.split("/"), o = 0;
@@ -48,7 +76,7 @@ function B(e) {
48
76
  }
49
77
  //#endregion
50
78
  //#region src/components/wt-datepicker/_internals/composables/useRestoreOnBlur.ts
51
- function V(e, t, n) {
79
+ function H(e, t, n) {
52
80
  let r = null;
53
81
  function i() {
54
82
  F(e, (e) => {
@@ -69,25 +97,25 @@ function V(e, t, n) {
69
97
  }
70
98
  //#endregion
71
99
  //#region src/components/wt-datepicker/wt-datepicker.vue?vue&type=script&setup=true&lang.ts
72
- var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" }, W = [
100
+ var U = { class: "wt-datepicker" }, W = { class: "wt-datepicker__button-bar" }, G = [
73
101
  "onMousedown",
74
102
  "onMouseup",
75
103
  "onMouseleave"
76
- ], G = [
104
+ ], K = [
77
105
  "onMousedown",
78
106
  "onMouseup",
79
107
  "onMouseleave"
80
- ], K = [
108
+ ], q = [
81
109
  "onMousedown",
82
110
  "onMouseup",
83
111
  "onMouseleave"
84
- ], q = [
112
+ ], J = [
85
113
  "onMousedown",
86
114
  "onMouseup",
87
115
  "onMouseleave"
88
- ], J = /*#__PURE__*/ e(/* @__PURE__ */ v({
116
+ ], Y = /*#__PURE__*/ e(/* @__PURE__ */ y({
89
117
  __name: "wt-datepicker",
90
- props: /*@__PURE__*/ b({
118
+ props: /*@__PURE__*/ x({
91
119
  showTime: { type: Boolean },
92
120
  minDate: {},
93
121
  maxDate: {},
@@ -167,7 +195,7 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
167
195
  modelValue: { default: null },
168
196
  modelModifiers: {}
169
197
  }),
170
- emits: /*@__PURE__*/ b([
198
+ emits: /*@__PURE__*/ x([
171
199
  "update:modelValue",
172
200
  "value-change",
173
201
  "input",
@@ -183,7 +211,7 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
183
211
  "keydown"
184
212
  ], ["update:modelValue"]),
185
213
  setup(e, { emit: a }) {
186
- let o = e, s = M(e, "modelValue"), { t: c } = u(), v = f({
214
+ let o = e, s = M(e, "modelValue"), { t: c } = u(), y = f({
187
215
  get() {
188
216
  if (!s.value) return null;
189
217
  let e = /* @__PURE__ */ new Date(+s.value);
@@ -198,42 +226,44 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
198
226
  let t = o.timezone ? z(e, o.timezone) : e;
199
227
  s.value = t.getTime();
200
228
  }
201
- }), b = N("datepicker"), w = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
202
- B(() => b.value?.$el?.querySelector("input"));
203
- let { onBlur: T, watchRestoreOnBlurLastValidValue: F } = V(v, () => b.value, () => !!o.clearable);
229
+ }), x = N("datepicker"), w = `datepicker-${Math.random().toString(36).slice(2, 11)}`;
230
+ V(() => x.value?.$el?.querySelector("input"));
231
+ let { onBlur: T, watchRestoreOnBlurLastValidValue: F } = H(y, () => x.value, () => !!o.clearable);
204
232
  F();
205
- let J = f(() => o.placholder || `dd/mm/yyyy ${o.showTime ? "hh:mm" : ""}`), Y = () => {
206
- if (o.showTime && v.value) {
207
- let e = v.value;
233
+ let Y = f(() => o.placholder || `dd/mm/yyyy ${o.showTime ? "hh:mm" : ""}`), { lock: X, unlock: Z } = B(), Q = () => {
234
+ if (o.showTime && y.value) {
235
+ let e = y.value;
208
236
  S(() => {
209
- v.value = new Date(e.getTime());
237
+ y.value = new Date(e.getTime());
210
238
  });
211
239
  }
212
240
  setTimeout(() => {
213
- b.value?.alignOverlay();
214
- let e = b.value?.overlay;
215
- e && (e.style.minWidth = "");
241
+ x.value?.alignOverlay();
242
+ let e = x.value?.overlay;
243
+ e && (e.style.minWidth = "", X(e));
216
244
  }, 0);
217
- }, X = f(() => o.required ? `${o.label}*` : o.label), { v: Z, customValidators: Q } = A(o), { isValidation: te, invalid: ne, validationText: $, validationTextColor: re } = d({
218
- v: Z,
219
- customValidators: Q
245
+ }, te = () => {
246
+ Z();
247
+ }, ne = f(() => o.required ? `${o.label}*` : o.label), { v: re, customValidators: ie } = A(o), { isValidation: ae, invalid: oe, validationText: $, validationTextColor: se } = d({
248
+ v: re,
249
+ customValidators: ie
220
250
  });
221
251
  return (a, o) => {
222
252
  let s = O("wt-label"), l = O("wt-button"), u = O("wt-icon-btn"), d = O("wt-message");
223
- return E(), ee("div", H, [
224
- _(s, x(e.labelProps, { disabled: e.disabled }, {
253
+ return E(), h("div", U, [
254
+ v(s, ee(e.labelProps, { disabled: e.disabled }, {
225
255
  for: w,
226
- invalid: j(ne)
256
+ invalid: j(oe)
227
257
  }), {
228
- default: I(() => [D(a.$slots, "label", C(y({ label: e.label })), () => [g(k(X.value), 1)], !0)], void 0, !0),
258
+ default: I(() => [D(a.$slots, "label", C(b({ label: e.label })), () => [_(k(ne.value), 1)], !0)], void 0, !0),
229
259
  _: 3
230
260
  }, 16, ["disabled", "invalid"]),
231
- _(j(R), {
261
+ v(j(R), {
232
262
  ref_key: "datepicker",
233
- ref: b,
263
+ ref: x,
234
264
  id: w,
235
- modelValue: v.value,
236
- "onUpdate:modelValue": o[0] ||= (e) => v.value = e,
265
+ modelValue: y.value,
266
+ "onUpdate:modelValue": o[0] ||= (e) => y.value = e,
237
267
  "date-format": "dd/mm/yy",
238
268
  "input-class": "typo-body-1",
239
269
  required: e.required,
@@ -241,8 +271,8 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
241
271
  "show-time": e.showTime,
242
272
  "min-date": e.minDate,
243
273
  "max-date": e.maxDate,
244
- placeholder: J.value,
245
- "show-clear": e.clearable && v.value,
274
+ placeholder: Y.value,
275
+ "show-clear": e.clearable && y.value,
246
276
  "show-button-bar": "",
247
277
  fluid: "",
248
278
  pt: {
@@ -254,69 +284,70 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
254
284
  minute: { class: "typo-body-2" },
255
285
  panel: { style: { maxWidth: "380px" } }
256
286
  },
257
- onShow: Y,
287
+ onShow: Q,
288
+ onHide: te,
258
289
  onBlur: j(T)
259
290
  }, {
260
- buttonbar: I(({ todayCallback: i, clearCallback: a }) => [h("div", U, [_(l, {
291
+ buttonbar: I(({ todayCallback: i, clearCallback: a }) => [g("div", W, [v(l, {
261
292
  color: j(n).SECONDARY,
262
293
  variant: j(t).OUTLINED,
263
294
  size: j(r).SM,
264
295
  onClick: i
265
296
  }, {
266
- default: I(() => [g(k(j(c)("reusable.today")), 1)], void 0, !0),
297
+ default: I(() => [_(k(j(c)("reusable.today")), 1)], void 0, !0),
267
298
  _: 1
268
299
  }, 8, [
269
300
  "color",
270
301
  "variant",
271
302
  "size",
272
303
  "onClick"
273
- ]), L(_(l, {
304
+ ]), L(v(l, {
274
305
  color: j(n).SECONDARY,
275
306
  variant: j(t).OUTLINED,
276
307
  size: j(r).SM,
277
308
  onClick: a
278
309
  }, {
279
- default: I(() => [g(k(j(c)("reusable.clear")), 1)], void 0, !0),
310
+ default: I(() => [_(k(j(c)("reusable.clear")), 1)], void 0, !0),
280
311
  _: 1
281
312
  }, 8, [
282
313
  "color",
283
314
  "variant",
284
315
  "size",
285
316
  "onClick"
286
- ]), [[P, e.clearable && v.value]])])]),
287
- prevbutton: I(({ actionCallback: e }) => [_(u, {
317
+ ]), [[P, e.clearable && y.value]])])]),
318
+ prevbutton: I(({ actionCallback: e }) => [v(u, {
288
319
  icon: "arrow-left",
289
320
  onClick: e
290
321
  }, null, 8, ["onClick"])]),
291
- nextbutton: I(({ actionCallback: e }) => [_(u, {
322
+ nextbutton: I(({ actionCallback: e }) => [v(u, {
292
323
  icon: "arrow-right",
293
324
  onClick: e
294
325
  }, null, 8, ["onClick"])]),
295
- clearicon: I(({ clearCallback: e }) => [_(u, {
326
+ clearicon: I(({ clearCallback: e }) => [v(u, {
296
327
  icon: "close",
297
328
  class: "wt-datepicker__clear-icon",
298
329
  onClick: e
299
330
  }, null, 8, ["onClick"])]),
300
- hourincrementbutton: I(({ callbacks: e }) => [h("span", {
331
+ hourincrementbutton: I(({ callbacks: e }) => [g("span", {
301
332
  onMousedown: e.mousedown,
302
333
  onMouseup: e.mouseup,
303
334
  onMouseleave: e.mouseleave
304
- }, [_(u, { icon: "arrow-up" })], 40, W)]),
305
- hourdecrementbutton: I(({ callbacks: e }) => [h("span", {
335
+ }, [v(u, { icon: "arrow-up" })], 40, G)]),
336
+ hourdecrementbutton: I(({ callbacks: e }) => [g("span", {
306
337
  onMousedown: e.mousedown,
307
338
  onMouseup: e.mouseup,
308
339
  onMouseleave: e.mouseleave
309
- }, [_(u, { icon: "arrow-down" })], 40, G)]),
310
- minuteincrementbutton: I(({ callbacks: e }) => [h("span", {
340
+ }, [v(u, { icon: "arrow-down" })], 40, K)]),
341
+ minuteincrementbutton: I(({ callbacks: e }) => [g("span", {
311
342
  onMousedown: e.mousedown,
312
343
  onMouseup: e.mouseup,
313
344
  onMouseleave: e.mouseleave
314
- }, [_(u, { icon: "arrow-up" })], 40, K)]),
315
- minutedecrementbutton: I(({ callbacks: e }) => [h("span", {
345
+ }, [v(u, { icon: "arrow-up" })], 40, q)]),
346
+ minutedecrementbutton: I(({ callbacks: e }) => [g("span", {
316
347
  onMousedown: e.mousedown,
317
348
  onMouseup: e.mouseup,
318
349
  onMouseleave: e.mouseleave
319
- }, [_(u, { icon: "arrow-down" })], 40, q)]),
350
+ }, [v(u, { icon: "arrow-down" })], 40, J)]),
320
351
  _: 1
321
352
  }, 8, [
322
353
  "modelValue",
@@ -329,13 +360,13 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
329
360
  "show-clear",
330
361
  "onBlur"
331
362
  ]),
332
- j(te) && j($) ? (E(), p(d, {
363
+ j(ae) && j($) ? (E(), p(d, {
333
364
  key: 0,
334
- color: j(re),
365
+ color: j(se),
335
366
  variant: j(i).SIMPLE,
336
367
  size: j(r).SM
337
368
  }, {
338
- default: I(() => [g(k(j($)), 1)], void 0, !0),
369
+ default: I(() => [_(k(j($)), 1)], void 0, !0),
339
370
  _: 1
340
371
  }, 8, [
341
372
  "color",
@@ -345,6 +376,6 @@ var H = { class: "wt-datepicker" }, U = { class: "wt-datepicker__button-bar" },
345
376
  ]);
346
377
  };
347
378
  }
348
- }), [["__scopeId", "data-v-4be684aa"]]);
379
+ }), [["__scopeId", "data-v-3f1c1cb8"]]);
349
380
  //#endregion
350
- export { J as default };
381
+ export { Y as default };
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-rPVG1iQS.js";
1
+ import { C as e, i as t } from "./components-DRYvDFUw.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";
@@ -1,5 +1,5 @@
1
- import { n as e, r as t } from "./clients-CIZxqjbV.js";
2
- import { n } from "./components-rPVG1iQS.js";
1
+ import { n as e, r as t } from "./clients-IxWZVjVW.js";
2
+ import { n } from "./components-DRYvDFUw.js";
3
3
  import { t as r } from "./vue-i18n-Db_oYfO8.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";
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
- import { t as e } from "./clients-CIZxqjbV.js";
2
- import { a as t, o as n, r, s as i } from "./components-rPVG1iQS.js";
1
+ import { t as e } from "./clients-IxWZVjVW.js";
2
+ import { a as t, o as n, r, s as i } from "./components-DRYvDFUw.js";
3
3
  import { t as a } from "./enums-De8CDKZ1.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { w as e } from "./components-rPVG1iQS.js";
1
+ import { w as e } from "./components-DRYvDFUw.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-De8CDKZ1.js";
4
4
  import "./wt-button-dC4nOW56.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.6.82",
3
+ "version": "26.6.84",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -0,0 +1,56 @@
1
+ import { onUnmounted } from 'vue';
2
+
3
+ // Prevents PrimeVue's currentView watcher from:
4
+ // - widening the overlay when switching to the month/year grid
5
+ // - flipping the overlay between above/below the input when panel height changes
6
+ export function useOverlayAnchor() {
7
+ let observer: MutationObserver | null = null;
8
+
9
+ // https://webitel.atlassian.net/browse/WTEL-9906
10
+ function lockWidth(panel: HTMLElement, lockedWidth: string) {
11
+ if (panel.style.width !== lockedWidth) {
12
+ panel.style.width = lockedWidth;
13
+ panel.style.minWidth = '';
14
+ }
15
+ }
16
+
17
+ // https://webitel.atlassian.net/browse/WTEL-9860?focusedCommentId=766440
18
+ function lockSide(panel: HTMLElement, lockedSide: string, lockedTop: string) {
19
+ if (panel.style.transformOrigin !== lockedSide) {
20
+ panel.style.transformOrigin = lockedSide;
21
+ panel.style.top = lockedTop;
22
+ }
23
+ }
24
+
25
+ function lock(panel: HTMLElement) {
26
+ observer?.disconnect();
27
+
28
+ const lockedWidth = panel.style.width;
29
+ const lockedSide = panel.style.transformOrigin; // 'top' = below input, 'bottom' = above
30
+ const lockedTop = panel.style.top;
31
+
32
+ observer = new MutationObserver(() => {
33
+ lockWidth(panel, lockedWidth);
34
+ lockSide(panel, lockedSide, lockedTop);
35
+ });
36
+
37
+ observer.observe(panel, {
38
+ attributes: true,
39
+ attributeFilter: [
40
+ 'style',
41
+ ],
42
+ });
43
+ }
44
+
45
+ function unlock() {
46
+ observer?.disconnect();
47
+ observer = null;
48
+ }
49
+
50
+ onUnmounted(unlock);
51
+
52
+ return {
53
+ lock,
54
+ unlock,
55
+ };
56
+ }
@@ -49,6 +49,7 @@
49
49
  }
50
50
  }"
51
51
  @show="onPanelShow"
52
+ @hide="onPanelHide"
52
53
  @blur="onBlur"
53
54
  >
54
55
  <template #buttonbar="{ todayCallback, clearCallback }">
@@ -152,6 +153,7 @@ import {
152
153
  MessageVariant,
153
154
  } from '../../enums';
154
155
  import { useValidation } from '../../mixins/validationMixin/useValidation';
156
+ import { useOverlayAnchor } from './_internals/composables/useOverlayAnchor';
155
157
  import { usePreventZeroPad } from './_internals/composables/usePreventZeroPad';
156
158
  import { useRestoreOnBlur } from './_internals/composables/useRestoreOnBlur';
157
159
 
@@ -220,6 +222,8 @@ const getPlaceholder = computed(() => {
220
222
  return props.placholder || `dd/mm/yyyy ${props.showTime ? 'hh:mm' : ''}`;
221
223
  });
222
224
 
225
+ const { lock: lockOverlay, unlock: unlockOverlay } = useOverlayAnchor();
226
+
223
227
  // PrimeVue initializes its internal currentHour/currentMinute from new Date() when the
224
228
  // overlay opens, ignoring the model value. Re-assigning the same value forces a re-sync.
225
229
  const onPanelShow = () => {
@@ -234,10 +238,16 @@ const onPanelShow = () => {
234
238
  setTimeout(() => {
235
239
  datepicker.value?.alignOverlay();
236
240
  const panel = datepicker.value?.overlay;
237
- if (panel) panel.style.minWidth = '';
241
+ if (!panel) return;
242
+ panel.style.minWidth = '';
243
+ lockOverlay(panel);
238
244
  }, 0);
239
245
  };
240
246
 
247
+ const onPanelHide = () => {
248
+ unlockOverlay();
249
+ };
250
+
241
251
  const requiredLabel = computed(() => {
242
252
  return props.required ? `${props.label}*` : props.label;
243
253
  });
@@ -44,7 +44,7 @@
44
44
  @before-show="onDropdownBeforeShow"
45
45
  @before-hide="onDropdownBeforeHide"
46
46
  @show="onDropdownShow"
47
- @hide="onDropdownHide"
47
+ @hide="handleDropdownHide"
48
48
  >
49
49
  <template v-if="!chipsView" #value="{ value, placeholder }">
50
50
  <span v-if="value && value.length">
@@ -209,6 +209,7 @@ const emit = defineEmits<{
209
209
  value: string,
210
210
  ];
211
211
  reset: [];
212
+ hide: [];
212
213
  }>();
213
214
 
214
215
  const {
@@ -261,6 +262,11 @@ const hasLabel = computed(() => {
261
262
  const requiredLabel = computed(() => {
262
263
  return props.required ? `${props.label}*` : props.label;
263
264
  });
265
+
266
+ const handleDropdownHide = () => {
267
+ onDropdownHide();
268
+ emit('hide');
269
+ };
264
270
  </script>
265
271
 
266
272
  <style scoped>
@@ -37,7 +37,7 @@
37
37
  @before-show="onDropdownBeforeShow"
38
38
  @before-hide="onDropdownBeforeHide"
39
39
  @show="onDropdownShow"
40
- @hide="onDropdownHide"
40
+ @hide="handleDropdownHide"
41
41
  >
42
42
  <template #header>
43
43
  <wt-input-text
@@ -176,6 +176,7 @@ const model = defineModel<string>({
176
176
 
177
177
  const emit = defineEmits<{
178
178
  reset: [];
179
+ hide: [];
179
180
  }>();
180
181
 
181
182
  const selectId = `select-${Math.random().toString(36).slice(2, 11)}`;
@@ -232,6 +233,11 @@ const hasLabel = computed(() => {
232
233
  const requiredLabel = computed(() => {
233
234
  return props.required ? `${props.label}*` : props.label;
234
235
  });
236
+
237
+ const handleDropdownHide = () => {
238
+ onDropdownHide();
239
+ emit('hide');
240
+ };
235
241
  </script>
236
242
 
237
243
  <style scoped>
@@ -0,0 +1,4 @@
1
+ export declare function useOverlayAnchor(): {
2
+ lock: (panel: HTMLElement) => void;
3
+ unlock: () => void;
4
+ };
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
30
30
  focus: () => any;
31
31
  keydown: () => any;
32
32
  "update:modelValue": (...args: unknown[]) => any;
33
- show: () => any;
34
33
  hide: () => any;
34
+ show: () => any;
35
35
  "value-change": () => any;
36
36
  "date-select": () => any;
37
37
  "today-click": () => any;
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
44
44
  onFocus?: () => any;
45
45
  onKeydown?: () => any;
46
46
  "onUpdate:modelValue"?: (...args: unknown[]) => any;
47
- onShow?: () => any;
48
47
  onHide?: () => any;
48
+ onShow?: () => any;
49
49
  "onValue-change"?: () => any;
50
50
  "onDate-select"?: () => any;
51
51
  "onToday-click"?: () => any;
@@ -59,10 +59,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
59
59
  reset: () => any;
60
60
  "update:modelValue": (value: any[]) => any;
61
61
  "add:custom-value": (value: string) => any;
62
+ hide: () => any;
62
63
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
63
64
  onReset?: () => any;
64
65
  "onUpdate:modelValue"?: (value: any[]) => any;
65
66
  "onAdd:custom-value"?: (value: string) => any;
67
+ onHide?: () => any;
66
68
  }>, {
67
69
  options: unknown[];
68
70
  customValidators: unknown[];
@@ -20,11 +20,11 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {
20
20
  show: (event?: Event, target?: HTMLElement | null | undefined) => void;
21
21
  hide: (event?: Event) => void;
22
22
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
- show: () => any;
24
23
  hide: () => any;
24
+ show: () => any;
25
25
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
26
- onShow?: () => any;
27
26
  onHide?: () => any;
27
+ onShow?: () => any;
28
28
  }>, {
29
29
  dt: import("@primevue/core").DesignToken<any>;
30
30
  disabled: boolean;
@@ -62,9 +62,11 @@ type __VLS_Slots = {} & {
62
62
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
63
63
  reset: () => any;
64
64
  "update:modelValue": (value: string) => any;
65
+ hide: () => any;
65
66
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
66
67
  onReset?: () => any;
67
68
  "onUpdate:modelValue"?: (value: string) => any;
69
+ onHide?: () => any;
68
70
  }>, {
69
71
  options: unknown[];
70
72
  customValidators: unknown[];
@@ -10,16 +10,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
10
10
  default: () => any[];
11
11
  };
12
12
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- show: (...args: any[]) => void;
14
13
  hide: (...args: any[]) => void;
14
+ show: (...args: any[]) => void;
15
15
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
16
  triggers: {
17
17
  type: ArrayConstructor;
18
18
  default: () => any[];
19
19
  };
20
20
  }>> & Readonly<{
21
- onShow?: (...args: any[]) => any;
22
21
  onHide?: (...args: any[]) => any;
22
+ onShow?: (...args: any[]) => any;
23
23
  }>, {
24
24
  triggers: unknown[];
25
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;