@webitel/ui-sdk 26.6.88 → 26.6.90
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-DaDed2hn.js → components-BqXO2X92.js} +397 -395
- package/dist/{composables-DEdhzUqN.js → composables-CuxX3Ib0.js} +39 -34
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +274 -274
- package/dist/{wt-chat-emoji-T8LDtZS-.js → wt-chat-emoji-DMGWnSDG.js} +1 -1
- package/dist/{wt-display-chip-items-C0p7MwL6.js → wt-display-chip-items-CL9lPf4i.js} +1 -1
- package/dist/{wt-expansion-card-BANe4zX2.js → wt-expansion-card-afRJCmRw.js} +1 -1
- package/dist/{wt-galleria-YxNez7SX.js → wt-galleria-DGkRyAjw.js} +1 -1
- package/dist/{wt-send-message-popup-D4CA3o4I.js → wt-send-message-popup-BV_3DOj4.js} +1 -1
- package/dist/{wt-table-CPGSqs5Z.js → wt-table-CC01Dw6T.js} +1 -1
- package/dist/{wt-type-extension-value-input-DSF-DMlv.js → wt-type-extension-value-input-Cb_PUwOS.js} +1 -1
- package/dist/{wt-vidstack-player-Wgg83Pt1.js → wt-vidstack-player-DlSB9Hkq.js} +1 -1
- package/package.json +1 -1
- package/src/components/_internals/composables/useSelect/useSelect.ts +5 -4
- package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +25 -1
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +2 -2
- package/src/components/wt-card/wt-card.vue +1 -1
- package/src/components/wt-popup/wt-popup.vue +14 -0
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +1 -1
- package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +1 -0
- package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-BqXO2X92.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-
|
|
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-
|
|
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-
|
|
2
|
+
import { n } from "./components-BqXO2X92.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-
|
|
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({
|
package/dist/{wt-type-extension-value-input-DSF-DMlv.js → wt-type-extension-value-input-Cb_PUwOS.js}
RENAMED
|
@@ -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-
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-BqXO2X92.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";
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ export const useSelect = ({
|
|
|
30
30
|
fetchOptions,
|
|
31
31
|
fetchSelectedByIds,
|
|
32
32
|
resetAndFetch,
|
|
33
|
-
|
|
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
|
|
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
|
-
|
|
256
|
+
filterOptionsBase,
|
|
257
257
|
updateSelectedOptionsCache,
|
|
258
258
|
isOptionDisabled,
|
|
259
259
|
};
|
|
@@ -39,6 +39,7 @@ v-show="showPopupComponent" :class="[`wt-popup--size-${size}`, { 'wt-popup--over
|
|
|
39
39
|
|
|
40
40
|
<script lang="ts" setup>
|
|
41
41
|
import { TransitionSlide } from '@morev/vue-transitions';
|
|
42
|
+
import { useScrollLock } from '@vueuse/core';
|
|
42
43
|
import { computed, defineEmits, defineProps, ref, watch } from 'vue';
|
|
43
44
|
|
|
44
45
|
import { ComponentSize } from '../../enums/ComponentSize/ComponentSize';
|
|
@@ -123,6 +124,19 @@ const showPopupComponent = computed(() => {
|
|
|
123
124
|
return wrapperShown.value || isCloseAnimationPlaying.value;
|
|
124
125
|
});
|
|
125
126
|
|
|
127
|
+
// lock page (body) scroll while the popup overlay is visible
|
|
128
|
+
const isBodyScrollLocked = useScrollLock(document.body);
|
|
129
|
+
|
|
130
|
+
watch(
|
|
131
|
+
showPopupComponent,
|
|
132
|
+
(isVisible) => {
|
|
133
|
+
isBodyScrollLocked.value = isVisible;
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
immediate: true,
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
|
|
126
140
|
// overlay should be shown before popup to show animation properly
|
|
127
141
|
watch(
|
|
128
142
|
() => props.shown,
|
|
@@ -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:
|
|
24
|
+
filterOptions: (value: string) => void;
|
|
25
25
|
onDropdownBeforeShow: () => void;
|
|
26
26
|
onDropdownBeforeHide: () => void;
|
|
27
27
|
onDropdownShow: () => void;
|
|
@@ -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
|
-
|
|
20
|
+
filterOptionsBase: (value: any) => void;
|
|
21
21
|
updateSelectedOptionsCache: () => void;
|
|
22
22
|
isOptionDisabled: (option: unknown) => boolean;
|
|
23
23
|
};
|