@webitel/ui-sdk 26.6.45 → 26.6.46
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-Z7U49tas.js → components-gi3TmScp.js} +4 -4
- package/dist/{composables-C5OKo5yW.js → composables-BJtyGE9D.js} +46 -46
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +380 -380
- package/dist/{wt-chat-emoji-D3jwmQoi.js → wt-chat-emoji-70Ip-iGR.js} +1 -1
- package/dist/{wt-display-chip-items-DJEixQxK.js → wt-display-chip-items-7t7gfd-q.js} +1 -1
- package/dist/{wt-expansion-card--JQgcTaF.js → wt-expansion-card-Bvs6YO3O.js} +1 -1
- package/dist/{wt-galleria-B1gOHiGe.js → wt-galleria-BXZJO_cB.js} +1 -1
- package/dist/{wt-send-message-popup-tV8OM9Au.js → wt-send-message-popup-Bg1K-tw8.js} +1 -1
- package/dist/{wt-table--FlzjuAF.js → wt-table-D4XANcJ1.js} +1 -1
- package/dist/{wt-type-extension-value-input-B6VJ9AKB.js → wt-type-extension-value-input-DQhC5C4L.js} +1 -1
- package/dist/{wt-vidstack-player-BjULgk7W.js → wt-vidstack-player-CmdiCgCp.js} +1 -1
- package/package.json +1 -1
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +16 -9
- package/src/components/_internals/composables/useSelect/useSelectUtils.ts +6 -0
- package/src/components/wt-button/wt-button.vue +1 -1
- package/types/components/_internals/composables/useSelect/useSelectUtils.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./chunk-CY3AvKd6.js";
|
|
2
2
|
import { n as t, t as n } from "./dist-BYiYpK00.js";
|
|
3
|
-
import "./components-
|
|
3
|
+
import "./components-gi3TmScp.js";
|
|
4
4
|
import { t as r } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
5
5
|
import { c as i } from "./enums-pbYAJNeb.js";
|
|
6
6
|
import { t as a } from "./wt-button-BJmzJIU6.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, i as t } from "./components-
|
|
1
|
+
import { c as e, i as t } from "./components-gi3TmScp.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 { c as t } from "./enums-pbYAJNeb.js";
|
|
3
3
|
import { t as n } from "./useExpansion-DVdIpoOn.js";
|
|
4
|
-
import "./composables-
|
|
4
|
+
import "./composables-BJtyGE9D.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-B8Px6VcD.js";
|
|
3
|
-
import { a as n, o as r } from "./composables-
|
|
3
|
+
import { a as n, o as r } from "./composables-BJtyGE9D.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,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./components-
|
|
1
|
+
import { n as e } from "./components-gi3TmScp.js";
|
|
2
2
|
import { t } from "./vue-i18n-B8Px6VcD.js";
|
|
3
3
|
import { n, r } from "./clients-aQCH0OHp.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { t } from "./vue-i18n-B8Px6VcD.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-BJtyGE9D.js";
|
|
5
5
|
import { Fragment as ee, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, defineComponent as p, nextTick as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, resolveDirective as C, toDisplayString as w, useSlots as T, useTemplateRef as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
|
|
6
6
|
//#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var A = { class: "wt-table__th__content typo-body-1-bold" }, j = { class: "wt-table__td__actions" }, M = 10, N = /*#__PURE__*/ e(/* @__PURE__ */ p({
|
package/dist/{wt-type-extension-value-input-B6VJ9AKB.js → wt-type-extension-value-input-DQhC5C4L.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, s as r } from "./components-
|
|
1
|
+
import { a as e, o as t, r as n, s as r } from "./components-gi3TmScp.js";
|
|
2
2
|
import { t as i } from "./enums-pbYAJNeb.js";
|
|
3
3
|
import { t as a } from "./vue-i18n-B8Px6VcD.js";
|
|
4
4
|
import { t as o } from "./clients-aQCH0OHp.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { reactive, ref, watch } from 'vue';
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
3
|
import debounce from '../../../../scripts/debounce';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
dedupeByKey,
|
|
6
|
+
filterOptionsBySearchValue,
|
|
7
|
+
isOptionSelected,
|
|
8
|
+
toArray,
|
|
9
|
+
} from './useSelectUtils';
|
|
5
10
|
|
|
6
11
|
export const useSelectOptions = ({
|
|
7
12
|
selected,
|
|
@@ -62,7 +67,10 @@ export const useSelectOptions = ({
|
|
|
62
67
|
// when optionValue is used PrimeVue passes the extracted primitive instead of the full object
|
|
63
68
|
if (optionValue?.value && typeof option !== 'object') {
|
|
64
69
|
const foundOption = (
|
|
65
|
-
|
|
70
|
+
[
|
|
71
|
+
...filteredOptions.value,
|
|
72
|
+
...selectedOptionsCache.value,
|
|
73
|
+
] as Record<string, unknown>[]
|
|
66
74
|
).find((o) => o[optionValue.value] === option);
|
|
67
75
|
return foundOption ? getOptionLabel(foundOption) : String(option);
|
|
68
76
|
}
|
|
@@ -76,6 +84,9 @@ export const useSelectOptions = ({
|
|
|
76
84
|
return option[defaultOptionLabel] || option;
|
|
77
85
|
};
|
|
78
86
|
|
|
87
|
+
const filterBySearch = (opts, value) =>
|
|
88
|
+
filterOptionsBySearchValue(opts, value, getOptionLabel);
|
|
89
|
+
|
|
79
90
|
// Cache of full option objects for currently selected values,
|
|
80
91
|
// so they can be preserved in filteredOptions after filtering
|
|
81
92
|
const selectedOptionsCache = ref([]);
|
|
@@ -111,9 +122,7 @@ export const useSelectOptions = ({
|
|
|
111
122
|
page,
|
|
112
123
|
});
|
|
113
124
|
const matchingCached = search
|
|
114
|
-
? selectedOptionsCache.value
|
|
115
|
-
getOptionLabel(option).toLowerCase().includes(search.toLowerCase()),
|
|
116
|
-
)
|
|
125
|
+
? filterBySearch(selectedOptionsCache.value, search)
|
|
117
126
|
: selectedOptionsCache.value;
|
|
118
127
|
const baseOptions =
|
|
119
128
|
searchParams.page === 1
|
|
@@ -142,9 +151,7 @@ export const useSelectOptions = ({
|
|
|
142
151
|
const filterOptions = (value) => {
|
|
143
152
|
filterText.value = value;
|
|
144
153
|
if (!searchMethod.value) {
|
|
145
|
-
const matchingOptions = options.value
|
|
146
|
-
getOptionLabel(option).toLowerCase().includes(value.toLowerCase()),
|
|
147
|
-
);
|
|
154
|
+
const matchingOptions = filterBySearch(options.value, value);
|
|
148
155
|
filteredOptions.value = sortOptions(
|
|
149
156
|
dedupeByKey(
|
|
150
157
|
[
|
|
@@ -169,7 +176,7 @@ export const useSelectOptions = ({
|
|
|
169
176
|
filteredOptions.value = sortOptions(
|
|
170
177
|
dedupeByKey(
|
|
171
178
|
[
|
|
172
|
-
...missingSelected,
|
|
179
|
+
...filterBySearch(missingSelected, filterText.value),
|
|
173
180
|
...filteredOptions.value,
|
|
174
181
|
],
|
|
175
182
|
dataKey.value,
|
|
@@ -40,3 +40,9 @@ export const dedupeByKey = (items: unknown[], key: string): unknown[] => {
|
|
|
40
40
|
...seen.values(),
|
|
41
41
|
];
|
|
42
42
|
};
|
|
43
|
+
|
|
44
|
+
export const filterOptionsBySearchValue = (options, value, getOptionLabel) => {
|
|
45
|
+
return options.filter((option) =>
|
|
46
|
+
getOptionLabel(option).toLowerCase().includes(value.toLowerCase()),
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
<script lang="ts" setup>
|
|
55
55
|
import type { ButtonProps } from 'primevue';
|
|
56
|
-
import { computed, inject,
|
|
56
|
+
import { computed, inject, ref, toRef, useAttrs, watch } from 'vue';
|
|
57
57
|
|
|
58
58
|
import { ButtonColor, ButtonVariant, ComponentSize } from '../../enums';
|
|
59
59
|
import WtBadge from '../wt-badge-new/wt-badge.vue';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const toArray: (value: any) => any[];
|
|
2
2
|
export declare const isOptionSelected: (option: any, selectedArray: any, dataKey: any) => any;
|
|
3
3
|
export declare const dedupeByKey: (items: unknown[], key: string) => unknown[];
|
|
4
|
+
export declare const filterOptionsBySearchValue: (options: any, value: any, getOptionLabel: any) => any;
|