@webitel/ui-sdk 26.6.122 → 26.6.123

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.
@@ -1,4 +1,4 @@
1
- import "./components-BKFSDrzd.js";
1
+ import "./components-DrF4f3Z-.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-DwAda_g4.js";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-BKFSDrzd.js";
1
+ import { C as e, i as t } from "./components-DrF4f3Z-.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,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { l as t } from "./enums-De8CDKZ1.js";
3
3
  import { t as n } from "./useExpansion-DVdIpoOn.js";
4
- import "./composables-DgOEWk-2.js";
4
+ import "./composables-C_OatTQJ.js";
5
5
  import { t as r } from "./wt-expand-transition-C2p9bR4j.js";
6
6
  import { createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, normalizeClass as l, normalizeProps as u, openBlock as d, renderSlot as f, resolveComponent as p, toRef as m, unref as h, vShow as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
7
7
  //#region src/components/wt-expansion-card/wt-expansion-card.vue?vue&type=script&setup=true&lang.ts
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { t } from "./vue-i18n-Db_oYfO8.js";
3
- import { a as n, o as r } from "./composables-DgOEWk-2.js";
3
+ import { a as n, o as r } from "./composables-C_OatTQJ.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderSlot as x, resolveComponent as S, toDisplayString as C, unref as w, useAttrs as T, useModel as E, vShow as D, watch as O, withCtx as k, withDirectives as A } from "vue";
5
5
  //#region src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js
6
6
  var j = () => {
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t } from "./clients-DqzkR0RW.js";
2
- import { n } from "./components-BKFSDrzd.js";
2
+ import { n } from "./components-DrF4f3Z-.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,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { t } from "./vue-i18n-Db_oYfO8.js";
3
3
  import { n, t as r } from "./sortQueryAdapters-CyYXvnDN.js";
4
- import { t as i } from "./composables-DgOEWk-2.js";
4
+ import { t as i } from "./composables-C_OatTQJ.js";
5
5
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, nextTick as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDirective as w, toDisplayString as T, useSlots as E, useTemplateRef as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
6
6
  //#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
7
7
  var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-table__td__actions" }, N = 10, P = /*#__PURE__*/ e(/* @__PURE__ */ m({
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clients-DqzkR0RW.js";
2
- import { a as t, o as n, r, s as i } from "./components-BKFSDrzd.js";
2
+ import { a as t, o as n, r, s as i } from "./components-DrF4f3Z-.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-BKFSDrzd.js";
1
+ import { w as e } from "./components-DrF4f3Z-.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-DwAda_g4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.6.122",
3
+ "version": "26.6.123",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -31,11 +31,34 @@ export const useSelectDropdown = ({
31
31
  }
32
32
  };
33
33
 
34
+ /*
35
+ @author @HlukhovYe
36
+
37
+ https://webitel.atlassian.net/browse/WTEL-10023
38
+
39
+ primevue's onOverlayEnter scrolls the selected option into view using the
40
+ index it had before this reorder is reflected in the DOM (Vue batches the
41
+ prop update, so primevue's synchronous findSelectedOptionIndex() /
42
+ scrollIntoView still act on the stale order). Since our reorder always
43
+ puts the selected option at index 0, the list must always open scrolled to
44
+ the top -- anywhere else is leftover from that stale index.
45
+
46
+ requestAnimationFrame runs after the browser has applied this frame's
47
+ layout (so primevue's own scrollIntoView has already landed) but before
48
+ that frame is presented, so snapping scrollTop back to 0 here is invisible
49
+ -- no jump.
50
+ */
51
+ let scrollResetRafId: number | null = null;
52
+
34
53
  const onDropdownBeforeShow = () => {
35
54
  isDropdownOpen.value = true;
36
55
  // @author @HlukhovYe
37
56
  // when user previously selected items, they should be on top only after reopening dropdown
38
57
  filteredOptions.value = sortOptions(filteredOptions.value);
58
+ scrollResetRafId = requestAnimationFrame(() => {
59
+ scrollResetRafId = null;
60
+ getListContainer()?.scrollTo(0, 0);
61
+ });
39
62
  };
40
63
 
41
64
  const onDropdownShow = () => {
@@ -117,6 +140,10 @@ export const useSelectDropdown = ({
117
140
 
118
141
  const onDropdownHide = () => {
119
142
  isDropdownOpen.value = false;
143
+ if (scrollResetRafId !== null) {
144
+ cancelAnimationFrame(scrollResetRafId);
145
+ scrollResetRafId = null;
146
+ }
120
147
  overlayResizeObserver?.disconnect();
121
148
  overlayResizeObserver = null;
122
149
  if (positionRafId !== null) {