@webitel/ui-sdk 26.10.1 → 26.10.2

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 (23) hide show
  1. package/dist/{clients-CD7NXpWz.js → clients-BuWrwEVp.js} +1 -1
  2. package/dist/{components-BaLs0ZtL.js → components-D1ukd_PU.js} +4 -4
  3. package/dist/{composables-BeyROIj_.js → composables-Cy5nWaAF.js} +44 -40
  4. package/dist/ui-sdk.js +1 -1
  5. package/dist/ui-sdk.umd.cjs +1 -1
  6. package/dist/{wt-chat-emoji-Ctwc4VYl.js → wt-chat-emoji-CRt5jka9.js} +1 -1
  7. package/dist/{wt-display-chip-items-BsaEZtrc.js → wt-display-chip-items-2KUHhVtF.js} +1 -1
  8. package/dist/{wt-expansion-card-CNkGLQvo.js → wt-expansion-card-Bpj0G5u9.js} +1 -1
  9. package/dist/{wt-galleria-BIczN4CP.js → wt-galleria-C3oGpcUO.js} +1 -1
  10. package/dist/{wt-send-message-popup--fi3UrPJ.js → wt-send-message-popup-B-nGWr7E.js} +2 -2
  11. package/dist/{wt-table-Cy3TfK4i.js → wt-table-BAmMqyti.js} +1 -1
  12. package/dist/{wt-type-extension-value-input-DOivJ4hj.js → wt-type-extension-value-input-CGsB_7Nc.js} +2 -2
  13. package/dist/{wt-vidstack-player-D-W9J2CY.js → wt-vidstack-player-CGsUsqeG.js} +1 -1
  14. package/package.json +1 -1
  15. package/src/components/_internals/composables/useSelect/types.ts +1 -0
  16. package/src/components/_internals/composables/useSelect/useSelect.ts +2 -0
  17. package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +5 -1
  18. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +5 -0
  19. package/src/components/wt-single-select/__tests__/WtSingleSelect.spec.js +44 -0
  20. package/types/.tsbuildinfo +1 -1
  21. package/types/components/_internals/composables/useSelect/types.d.ts +1 -0
  22. package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +1 -1
  23. package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +1 -0
@@ -2,7 +2,7 @@ import { c as e } from "./dist-EXdgfpvN.js";
2
2
  import { a as t, i as n, n as r, t as i } from "./genClient-CvWlQ0TZ.js";
3
3
  import { i as a, r as o } from "./caseConverters-DGri4uJo.js";
4
4
  import { a as s, r as ee } from "./startOfDay-BH-DGnTQ.js";
5
- import { E as c, w as l } from "./components-BaLs0ZtL.js";
5
+ import { E as c, w as l } from "./components-D1ukd_PU.js";
6
6
  import { a as u, r as d } from "./convertDuration-DZkUGHBR.js";
7
7
  import { S as f, T as p, v as te } from "./enums-CKer6GJR.js";
8
8
  import { t as ne } from "./deep-copy-BJdHBMNZ.js";
@@ -19,7 +19,7 @@ import { t as ge } from "./wt-checkbox-BBdi-1oS.js";
19
19
  import { t as _e } from "./wt-icon-action-DnDFrScL.js";
20
20
  import { t as ve } from "./wt-icon-btn-8EHSKSxB.js";
21
21
  import { t as ye } from "./useValidation-B1EJdGM4.js";
22
- import { i as be, n as xe, r as Se } from "./composables-BeyROIj_.js";
22
+ import { i as be, n as xe, r as Se } from "./composables-Cy5nWaAF.js";
23
23
  import { t as Ce } from "./wt-expand-transition-C2p9bR4j.js";
24
24
  import { a as we, c as Te, i as Ee, n as De, o as Oe, r as ke, s as Ae, t as je } from "./floating-ui.dom-Ch9ml4Rx.js";
25
25
  import * as Me from "vue";
@@ -19273,13 +19273,13 @@ var Fc = {
19273
19273
  ])), [[r, d]]) : R("", !0)], 2);
19274
19274
  };
19275
19275
  }
19276
- }, [["__scopeId", "data-v-72aa56d0"]]), Bc = H(() => import("./wt-action-bar-CJiWenUy.js")), Vc = H(() => import("./wt-button-select-BnRHgJ4i.js")), Hc = H(() => import("./wt-confirm-dialog-DCUitG2v.js")), Uc = H(() => import("./wt-context-menu-yW52oF-2.js")), Wc = H(() => import("./wt-copy-action-d9gVzAsB.js")), Gc = H(() => import("./wt-datepicker-Cx8yPH4d.js")), Kc = H(() => import("./wt-dual-panel-BHfOeLJZ.js")), qc = H(() => import("./wt-dummy-J18Wmsn6.js")), Jc = H(() => import("./wt-error-page-vhu4lIyF.js")), Yc = H(() => import("./wt-expansion-panel-CGFamfkt.js")), Xc = H(() => import("./wt-expansion-card-CNkGLQvo.js")), Zc = H(() => import("./wt-filters-panel-wrapper-Cc9b3aci.js")), Qc = H(() => import("./wt-galleria-BIczN4CP.js")), $c = H(() => import("./wt-notifications-bar-DDuf0Ui1.js")), el = H(() => import("./wt-page-header-CDbd4aOh.js")), tl = H(() => import("./wt-pagination-DLRMTDRV.js")), nl = H(() => import("./wt-player-DUnqV23Z.js")), rl = H(() => import("./wt-popover-BI6YyXy0.js").then((e) => e.n)), il = H(() => import("./wt-search-bar-Bp9M1oCq.js")), al = H(() => import("./wt-slider-x-Tch7RT.js").then((e) => e.n)), ol = H(() => import("./wt-status-select-qCkEA9K6.js")), sl = H(() => import("./wt-stepper-B6zpd1Uh.js")), cl = H(() => import("./wt-table-Cy3TfK4i.js")), ll = H(() => import("./wt-table-actions-D7harVHK.js")), ul = H(() => import("./wt-table-column-select-DzXaRs03.js")), dl = H(() => import("./wt-tabs-BJ-sFhv7.js")), fl = H(() => import("./wt-time-input-Ds40EseE.js")), pl = H(() => import("./wt-timepicker-BW0HmFJI.js")), ml = H(() => import("./wt-tree-Cu_yRDjp.js")), hl = H(() => import("./wt-tree-table-CAbPVuSj.js")), gl = H(() => import("./wt-vidstack-player-D-W9J2CY.js")), _l = H(() => import("./wt-call-media-action-Bkyppnsm.js")), vl = H(() => import("./wt-chat-emoji-Ctwc4VYl.js")), yl = H(() => import("./wt-display-chip-items-BsaEZtrc.js")), bl = H(() => import("./wt-navigation-menu-BMupOW07.js")), xl = H({
19276
+ }, [["__scopeId", "data-v-72aa56d0"]]), Bc = H(() => import("./wt-action-bar-CJiWenUy.js")), Vc = H(() => import("./wt-button-select-BnRHgJ4i.js")), Hc = H(() => import("./wt-confirm-dialog-DCUitG2v.js")), Uc = H(() => import("./wt-context-menu-yW52oF-2.js")), Wc = H(() => import("./wt-copy-action-d9gVzAsB.js")), Gc = H(() => import("./wt-datepicker-Cx8yPH4d.js")), Kc = H(() => import("./wt-dual-panel-BHfOeLJZ.js")), qc = H(() => import("./wt-dummy-J18Wmsn6.js")), Jc = H(() => import("./wt-error-page-vhu4lIyF.js")), Yc = H(() => import("./wt-expansion-panel-CGFamfkt.js")), Xc = H(() => import("./wt-expansion-card-Bpj0G5u9.js")), Zc = H(() => import("./wt-filters-panel-wrapper-Cc9b3aci.js")), Qc = H(() => import("./wt-galleria-C3oGpcUO.js")), $c = H(() => import("./wt-notifications-bar-DDuf0Ui1.js")), el = H(() => import("./wt-page-header-CDbd4aOh.js")), tl = H(() => import("./wt-pagination-DLRMTDRV.js")), nl = H(() => import("./wt-player-DUnqV23Z.js")), rl = H(() => import("./wt-popover-BI6YyXy0.js").then((e) => e.n)), il = H(() => import("./wt-search-bar-Bp9M1oCq.js")), al = H(() => import("./wt-slider-x-Tch7RT.js").then((e) => e.n)), ol = H(() => import("./wt-status-select-qCkEA9K6.js")), sl = H(() => import("./wt-stepper-B6zpd1Uh.js")), cl = H(() => import("./wt-table-BAmMqyti.js")), ll = H(() => import("./wt-table-actions-D7harVHK.js")), ul = H(() => import("./wt-table-column-select-DzXaRs03.js")), dl = H(() => import("./wt-tabs-BJ-sFhv7.js")), fl = H(() => import("./wt-time-input-Ds40EseE.js")), pl = H(() => import("./wt-timepicker-BW0HmFJI.js")), ml = H(() => import("./wt-tree-Cu_yRDjp.js")), hl = H(() => import("./wt-tree-table-CAbPVuSj.js")), gl = H(() => import("./wt-vidstack-player-CGsUsqeG.js")), _l = H(() => import("./wt-call-media-action-Bkyppnsm.js")), vl = H(() => import("./wt-chat-emoji-CRt5jka9.js")), yl = H(() => import("./wt-display-chip-items-2KUHhVtF.js")), bl = H(() => import("./wt-navigation-menu-BMupOW07.js")), xl = H({
19277
19277
  loader: () => import("./wt-rich-text-editor-55G1zOWR.js"),
19278
19278
  loadingComponent: S,
19279
19279
  delay: 0
19280
19280
  }), Sl = H(() => import("./wt-selection-popup-Dei_JZah.js")), Cl = H(() => import("./wt-start-page-2Bdzg5V5.js"));
19281
- H(() => import("./wt-type-extension-value-input-DOivJ4hj.js"));
19282
- var wl = H(() => import("./wt-screen-recordings-action-61pRZySe.js")), Tl = H(() => import("./wt-send-message-popup--fi3UrPJ.js")), El = {
19281
+ H(() => import("./wt-type-extension-value-input-CGsB_7Nc.js"));
19282
+ var wl = H(() => import("./wt-screen-recordings-action-61pRZySe.js")), Tl = H(() => import("./wt-send-message-popup-B-nGWr7E.js")), El = {
19283
19283
  WtActionBar: Bc,
19284
19284
  WtImage: Gi,
19285
19285
  WtEmpty: Xi,
@@ -100,44 +100,44 @@ var u = () => {
100
100
  a.value = "", o("");
101
101
  });
102
102
  } };
103
- }, x = ({ selectId: e, selectRef: t, filterInput: n, searchMethod: i, filteredOptions: a, filterText: o, filterOptions: s, resetAndFetch: u, sortOptions: d, fetchOptions: f, isLoading: p, searchHasNext: m }) => {
104
- let h = c(!1), g = null, _ = null, v = () => document.querySelector(`#${e.value}_list`)?.parentElement, y = (e) => {
103
+ }, x = ({ selectId: e, selectRef: t, filterInput: n, searchMethod: i, filteredOptions: a, filterText: o, filterOptions: s, resetAndFetch: u, cancelPendingSearch: d, sortOptions: f, fetchOptions: p, isLoading: m, searchHasNext: h }) => {
104
+ let g = c(!1), _ = null, v = null, y = () => document.querySelector(`#${e.value}_list`)?.parentElement, b = (e) => {
105
105
  let t = e.target;
106
- t.scrollTop + t.clientHeight >= t.scrollHeight - 40 && !p.value && m.value && f();
107
- }, b = null, x = () => {
108
- h.value = !0, a.value = d(a.value), b = requestAnimationFrame(() => {
109
- b = null, v()?.scrollTo(0, 0);
106
+ t.scrollTop + t.clientHeight >= t.scrollHeight - 40 && !m.value && h.value && p();
107
+ }, x = null, S = () => {
108
+ g.value = !0, a.value = f(a.value), x = requestAnimationFrame(() => {
109
+ x = null, y()?.scrollTo(0, 0);
110
110
  });
111
- }, S = () => {
112
- n.value?.focus(), i.value && v()?.addEventListener("scroll", y);
111
+ }, C = () => {
112
+ n.value?.focus(), i.value && y()?.addEventListener("scroll", b);
113
113
  let e = t?.value?.overlay;
114
- e && (g = new ResizeObserver(() => {
114
+ e && (_ = new ResizeObserver(() => {
115
115
  t.value?.alignOverlay?.();
116
- }), g.observe(e));
116
+ }), _.observe(e));
117
117
  let r = t?.value?.$el;
118
118
  if (r) {
119
119
  let e = r.getBoundingClientRect().top, n = r.getBoundingClientRect().left, i = () => {
120
120
  let a = r.getBoundingClientRect();
121
- (a.top !== e || a.left !== n) && (e = a.top, n = a.left, t.value?.alignOverlay?.()), _ = requestAnimationFrame(i);
121
+ (a.top !== e || a.left !== n) && (e = a.top, n = a.left, t.value?.alignOverlay?.()), v = requestAnimationFrame(i);
122
122
  };
123
- _ = requestAnimationFrame(i);
123
+ v = requestAnimationFrame(i);
124
124
  }
125
- }, C = !1;
125
+ }, w = !1;
126
126
  return l(a, () => {
127
- C && (C = !1, r(() => v()?.scrollTo(0, 0)));
127
+ w && (w = !1, r(() => y()?.scrollTo(0, 0)));
128
128
  }), {
129
- isDropdownOpen: h,
130
- onDropdownBeforeShow: x,
129
+ isDropdownOpen: g,
130
+ onDropdownBeforeShow: S,
131
131
  onDropdownBeforeHide: () => {
132
132
  let e = t?.value?.overlay;
133
- e && (e.style.pointerEvents = "none"), v()?.scrollTo(0, 0);
133
+ e && (e.style.pointerEvents = "none"), y()?.scrollTo(0, 0);
134
134
  },
135
- onDropdownShow: S,
135
+ onDropdownShow: C,
136
136
  onDropdownHide: () => {
137
- h.value = !1, b !== null && (cancelAnimationFrame(b), b = null), g?.disconnect(), g = null, _ !== null && (cancelAnimationFrame(_), _ = null), i.value ? (v()?.removeEventListener("scroll", y), o.value && u()) : s(""), o.value = "";
137
+ g.value = !1, x !== null && (cancelAnimationFrame(x), x = null), _?.disconnect(), _ = null, v !== null && (cancelAnimationFrame(v), v = null), i.value ? (y()?.removeEventListener("scroll", b), o.value && (d(), u())) : s(""), o.value = "";
138
138
  },
139
139
  filterOptionsAndScrollToTop: (e) => {
140
- C = !0, s(e);
140
+ w = !0, s(e);
141
141
  }
142
142
  };
143
143
  }, S = (e) => {
@@ -191,16 +191,18 @@ var u = () => {
191
191
  search: e,
192
192
  page: t
193
193
  }), a = e ? T(E.value, e) : E.value, s = S.page === 1 ? v([...a, ...r], o.value) : h.value.concat(r);
194
- h.value = C(s), N(n.value), x.value = i ?? !1, S.page += 1, b.value = !1;
194
+ h.value = C(s), P(n.value), x.value = i ?? !1, S.page += 1, b.value = !1;
195
195
  }, A = (e = "") => {
196
196
  S.search = e, S.page = 1, k();
197
- }, j = t((e) => A(e)), M = (e) => {
197
+ }, j = t((e) => A(e)), M = () => {
198
+ j.cancel();
199
+ }, N = (e) => {
198
200
  if (m.value = e, d.value) j(e);
199
201
  else {
200
202
  let t = T(E.value, e), n = T(r.value, e);
201
203
  h.value = C(v([...t, ...n], o.value));
202
204
  }
203
- }, N = (e) => {
205
+ }, P = (e) => {
204
206
  if (!e || !d.value || f?.value) return;
205
207
  let t = g(e).filter((e) => !_(e, h.value, o.value));
206
208
  if (t.length) {
@@ -209,7 +211,7 @@ var u = () => {
209
211
  }
210
212
  };
211
213
  return l(() => n.value, (e) => {
212
- D(), N(e);
214
+ D(), P(e);
213
215
  }), l(() => r.value, (e) => {
214
216
  d.value || (h.value = C(e));
215
217
  }), {
@@ -222,11 +224,12 @@ var u = () => {
222
224
  fetchOptions: k,
223
225
  fetchSelectedByIds: O,
224
226
  resetAndFetch: A,
225
- filterOptionsBase: M,
227
+ cancelPendingSearch: M,
228
+ filterOptionsBase: N,
226
229
  updateSelectedOptionsCache: D
227
230
  };
228
231
  }, w = ({ selected: e, options: t, optionLabel: n, optionValue: r, dataKey: i, allowCustomValues: o, manualCustomValues: s = !1, filterInput: c, selectRef: l, searchMethod: u, selectId: d, isSingle: f, autoOpen: p, strictApiOptions: m = void 0, emit: g = (e, ...t) => {} }) => {
229
- let { filterText: _, filteredOptions: v, isLoading: y, searchHasNext: w, sortOptions: T, getOptionLabel: E, fetchOptions: D, fetchSelectedByIds: O, resetAndFetch: k, filterOptionsBase: A, updateSelectedOptionsCache: j } = C({
232
+ let { filterText: _, filteredOptions: v, isLoading: y, searchHasNext: w, sortOptions: T, getOptionLabel: E, fetchOptions: D, fetchSelectedByIds: O, resetAndFetch: k, cancelPendingSearch: A, filterOptionsBase: j, updateSelectedOptionsCache: M } = C({
230
233
  selected: e,
231
234
  options: t,
232
235
  optionLabel: n,
@@ -235,47 +238,48 @@ var u = () => {
235
238
  allowCustomValues: o,
236
239
  searchMethod: u,
237
240
  strictApiOptions: m
238
- }), { isDropdownOpen: M, onDropdownBeforeShow: N, onDropdownBeforeHide: P, onDropdownShow: F, onDropdownHide: I, filterOptionsAndScrollToTop: L } = x({
241
+ }), { isDropdownOpen: N, onDropdownBeforeShow: P, onDropdownBeforeHide: F, onDropdownShow: I, onDropdownHide: L, filterOptionsAndScrollToTop: R } = x({
239
242
  selectId: d,
240
243
  selectRef: l,
241
244
  filterInput: c,
242
245
  searchMethod: u,
243
246
  filteredOptions: v,
244
247
  filterText: _,
245
- filterOptions: A,
248
+ filterOptions: j,
246
249
  resetAndFetch: k,
250
+ cancelPendingSearch: A,
247
251
  sortOptions: T,
248
252
  fetchOptions: D,
249
253
  isLoading: y,
250
254
  searchHasNext: w
251
- }), { showFooterLoader: R } = S(y), { openWhenSettled: z } = h(p, l), { onInputKeydown: B } = b({
255
+ }), { showFooterLoader: z } = S(y), { openWhenSettled: B } = h(p, l), { onInputKeydown: V } = b({
252
256
  selected: e,
253
257
  filteredOptions: v,
254
258
  options: t,
255
259
  dataKey: i,
256
260
  filterText: _,
257
- filterOptions: L,
258
- updateSelectedOptionsCache: j,
261
+ filterOptions: R,
262
+ updateSelectedOptionsCache: M,
259
263
  selectRef: l,
260
264
  allowCustomValues: o,
261
265
  isSingle: f
262
266
  });
263
267
  return a(async () => {
264
- await O(), u.value && await D(), z();
268
+ await O(), u.value && await D(), B();
265
269
  }), {
266
270
  isLoading: y,
267
- showFooterLoader: R,
268
- isDropdownOpen: M,
271
+ showFooterLoader: z,
272
+ isDropdownOpen: N,
269
273
  filterText: _,
270
274
  filteredOptions: v,
271
275
  getOptionLabel: E,
272
276
  fetchOptions: D,
273
- filterOptions: L,
274
- onDropdownBeforeShow: N,
275
- onDropdownBeforeHide: P,
276
- onDropdownShow: F,
277
- onDropdownHide: I,
278
- onInputKeydown: B,
277
+ filterOptions: R,
278
+ onDropdownBeforeShow: P,
279
+ onDropdownBeforeHide: F,
280
+ onDropdownShow: I,
281
+ onDropdownHide: L,
282
+ onInputKeydown: V,
279
283
  clearValue: () => {
280
284
  let t = "";
281
285
  Array.isArray(e.value) ? t = [] : typeof e.value == "object" && e.value !== null && (t = {}), e.value = t, g("reset", t);
package/dist/ui-sdk.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./genClient-CvWlQ0TZ.js";
2
2
  import { n as t } from "./wt-icon-B9Yy9aye.js";
3
- import { S as n, _ as r, b as i, c as a, d as o, f as s, g as c, h as l, l as u, m as d, p as f, t as p, u as m, v as h, x as g, y as _ } from "./components-BaLs0ZtL.js";
3
+ import { S as n, _ as r, b as i, c as a, d as o, f as s, g as c, h as l, l as u, m as d, p as f, t as p, u as m, v as h, x as g, y as _ } from "./components-D1ukd_PU.js";
4
4
  import { h as v, u as y } from "./enums-CKer6GJR.js";
5
5
  import { t as b } from "./useEventBus-B-ZeklLu.js";
6
6
  import { computed as x, reactive as S, shallowRef as C, watch as w } from "vue";