@webitel/ui-sdk 26.6.87 → 26.6.89

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 (21) hide show
  1. package/dist/{components-DaDed2hn.js → components-COWAuGBm.js} +5 -5
  2. package/dist/{composables-DEdhzUqN.js → composables-CuxX3Ib0.js} +39 -34
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.js +1 -1
  5. package/dist/ui-sdk.umd.cjs +1 -1
  6. package/dist/{wt-chat-emoji-T8LDtZS-.js → wt-chat-emoji-DiA3YxyK.js} +1 -1
  7. package/dist/{wt-display-chip-items-C0p7MwL6.js → wt-display-chip-items-BN8K7NHE.js} +1 -1
  8. package/dist/{wt-expansion-card-BANe4zX2.js → wt-expansion-card-afRJCmRw.js} +1 -1
  9. package/dist/{wt-galleria-YxNez7SX.js → wt-galleria-DGkRyAjw.js} +1 -1
  10. package/dist/{wt-send-message-popup-D4CA3o4I.js → wt-send-message-popup-DcFoPulz.js} +1 -1
  11. package/dist/{wt-table-CPGSqs5Z.js → wt-table-CC01Dw6T.js} +1 -1
  12. package/dist/{wt-type-extension-value-input-DSF-DMlv.js → wt-type-extension-value-input-BICQ_NeQ.js} +1 -1
  13. package/dist/{wt-vidstack-player-Wgg83Pt1.js → wt-vidstack-player-Dl1GJcn_.js} +1 -1
  14. package/package.json +1 -1
  15. package/src/components/_internals/composables/useSelect/useSelect.ts +5 -4
  16. package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +25 -1
  17. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +2 -2
  18. package/src/components/wt-card/wt-card.vue +1 -1
  19. package/types/components/_internals/composables/useSelect/useSelect.d.ts +1 -1
  20. package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +1 -0
  21. package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- import "./components-DaDed2hn.js";
1
+ import "./components-COWAuGBm.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";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-DaDed2hn.js";
1
+ import { C as e, i as t } from "./components-COWAuGBm.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-DEdhzUqN.js";
4
+ import "./composables-CuxX3Ib0.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-DEdhzUqN.js";
3
+ import { a as n, o as r } from "./composables-CuxX3Ib0.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-IxWZVjVW.js";
2
- import { n } from "./components-DaDed2hn.js";
2
+ import { n } from "./components-COWAuGBm.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-DEdhzUqN.js";
4
+ import { t as i } from "./composables-CuxX3Ib0.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-IxWZVjVW.js";
2
- import { a as t, o as n, r, s as i } from "./components-DaDed2hn.js";
2
+ import { a as t, o as n, r, s as i } from "./components-COWAuGBm.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-DaDed2hn.js";
1
+ import { w as e } from "./components-COWAuGBm.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.87",
3
+ "version": "26.6.89",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -30,7 +30,7 @@ export const useSelect = ({
30
30
  fetchOptions,
31
31
  fetchSelectedByIds,
32
32
  resetAndFetch,
33
- filterOptions,
33
+ filterOptionsBase,
34
34
  updateSelectedOptionsCache,
35
35
  isOptionDisabled,
36
36
  } = useSelectOptions({
@@ -50,6 +50,7 @@ export const useSelect = ({
50
50
  onDropdownBeforeHide,
51
51
  onDropdownShow,
52
52
  onDropdownHide,
53
+ filterOptionsAndScrollToTop,
53
54
  } = useSelectDropdown({
54
55
  selectId,
55
56
  selectRef,
@@ -57,7 +58,7 @@ export const useSelect = ({
57
58
  searchMethod,
58
59
  filteredOptions,
59
60
  filterText,
60
- filterOptions,
61
+ filterOptions: filterOptionsBase,
61
62
  resetAndFetch,
62
63
  sortOptions,
63
64
  fetchOptions,
@@ -74,7 +75,7 @@ export const useSelect = ({
74
75
  optionValue,
75
76
  dataKey,
76
77
  filterText,
77
- filterOptions,
78
+ filterOptions: filterOptionsAndScrollToTop,
78
79
  updateSelectedOptionsCache,
79
80
  selectRef,
80
81
  allowCustomValues,
@@ -106,7 +107,7 @@ export const useSelect = ({
106
107
  filteredOptions,
107
108
  getOptionLabel,
108
109
  fetchOptions,
109
- filterOptions,
110
+ filterOptions: filterOptionsAndScrollToTop,
110
111
  onDropdownBeforeShow,
111
112
  onDropdownBeforeHide,
112
113
  onDropdownShow,
@@ -1,4 +1,4 @@
1
- import { ref } from 'vue';
1
+ import { nextTick, ref, watch } from 'vue';
2
2
 
3
3
  export const useSelectDropdown = ({
4
4
  selectId,
@@ -82,6 +82,29 @@ export const useSelectDropdown = ({
82
82
  }
83
83
  };
84
84
 
85
+ /*
86
+ @author @HlukhovYe
87
+
88
+ https://webitel.atlassian.net/browse/WTEL-9798
89
+
90
+ Scroll the list to top after filtering. A plain nextTick() after filterOptions() is not
91
+ enough when searchMethod is used — filteredOptions only updates after the async fetch
92
+ resolves. The flag ensures the scroll fires on the first filteredOptions change after a
93
+ search input, but not on subsequent changes (e.g. infinite-scroll page appends).
94
+ */
95
+ let scrollOnNextOptionsUpdate = false;
96
+
97
+ watch(filteredOptions, () => {
98
+ if (!scrollOnNextOptionsUpdate) return;
99
+ scrollOnNextOptionsUpdate = false;
100
+ nextTick(() => getListContainer()?.scrollTo(0, 0));
101
+ });
102
+
103
+ const filterOptionsAndScrollToTop = (value: string) => {
104
+ scrollOnNextOptionsUpdate = true;
105
+ filterOptions(value);
106
+ };
107
+
85
108
  const onDropdownBeforeHide = () => {
86
109
  /**
87
110
  * @author @HlukhovYe
@@ -119,5 +142,6 @@ export const useSelectDropdown = ({
119
142
  onDropdownBeforeHide,
120
143
  onDropdownShow,
121
144
  onDropdownHide,
145
+ filterOptionsAndScrollToTop,
122
146
  };
123
147
  };
@@ -165,7 +165,7 @@ export const useSelectOptions = ({
165
165
 
166
166
  const debouncedFetch = debounce((value) => resetAndFetch(value));
167
167
 
168
- const filterOptions = (value) => {
168
+ const filterOptionsBase = (value) => {
169
169
  filterText.value = value;
170
170
  if (!searchMethod.value) {
171
171
  const matchingCached = filterBySearch(selectedOptionsCache.value, value);
@@ -253,7 +253,7 @@ export const useSelectOptions = ({
253
253
  fetchOptions,
254
254
  fetchSelectedByIds,
255
255
  resetAndFetch,
256
- filterOptions,
256
+ filterOptionsBase,
257
257
  updateSelectedOptionsCache,
258
258
  isOptionDisabled,
259
259
  };
@@ -9,6 +9,6 @@
9
9
  min-width: 0;
10
10
  border-radius: var(--wt-card-border-radius);
11
11
  padding: var(--wt-card-padding);
12
- box-shadow: var(--elevation-3);
12
+ box-shadow: var(--elevation-1);
13
13
  }
14
14
  </style>
@@ -21,7 +21,7 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
21
21
  filteredOptions: import("vue").Ref<any, any>;
22
22
  getOptionLabel: (option: any) => any;
23
23
  fetchOptions: () => Promise<void>;
24
- filterOptions: (value: any) => void;
24
+ filterOptions: (value: string) => void;
25
25
  onDropdownBeforeShow: () => void;
26
26
  onDropdownBeforeHide: () => void;
27
27
  onDropdownShow: () => void;
@@ -17,4 +17,5 @@ export declare const useSelectDropdown: ({ selectId, selectRef, filterInput, sea
17
17
  onDropdownBeforeHide: () => void;
18
18
  onDropdownShow: () => void;
19
19
  onDropdownHide: () => void;
20
+ filterOptionsAndScrollToTop: (value: string) => void;
20
21
  };
@@ -17,7 +17,7 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
17
17
  fetchOptions: () => Promise<void>;
18
18
  fetchSelectedByIds: () => Promise<void>;
19
19
  resetAndFetch: (search?: string) => void;
20
- filterOptions: (value: any) => void;
20
+ filterOptionsBase: (value: any) => void;
21
21
  updateSelectedOptionsCache: () => void;
22
22
  isOptionDisabled: (option: unknown) => boolean;
23
23
  };