@webitel/ui-sdk 26.6.81 → 26.6.82
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-B8_ZV_PF.js → components-rPVG1iQS.js} +52 -50
- package/dist/{composables-BtjgpN_Q.js → composables-DEdhzUqN.js} +79 -76
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{wt-chat-emoji-CSuQT5Vb.js → wt-chat-emoji-DnG7Ikl3.js} +1 -1
- package/dist/{wt-display-chip-items-CesI8QLx.js → wt-display-chip-items-DUicVxt2.js} +1 -1
- package/dist/{wt-expansion-card-IE8wNONx.js → wt-expansion-card-BANe4zX2.js} +1 -1
- package/dist/{wt-galleria-UzlXk6Xn.js → wt-galleria-YxNez7SX.js} +1 -1
- package/dist/{wt-send-message-popup-DkAlpARA.js → wt-send-message-popup-C2r4l9Ln.js} +1 -1
- package/dist/{wt-table-BMyEF8Xb.js → wt-table-CPGSqs5Z.js} +1 -1
- package/dist/{wt-type-extension-value-input-6SFJF1XM.js → wt-type-extension-value-input-B9CGBDQg.js} +1 -1
- package/dist/{wt-vidstack-player-RqPsPq-u.js → wt-vidstack-player-DYCrCT9T.js} +1 -1
- package/package.json +1 -1
- package/src/components/_internals/composables/useSelect/useSelect.ts +4 -0
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +17 -0
- package/src/components/wt-multi-select/wt-multi-select.vue +5 -3
- package/src/components/wt-single-select/wt-single-select.vue +5 -3
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +3 -1
- package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +3 -1
- package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +2 -2
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-rPVG1iQS.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-DEdhzUqN.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-DEdhzUqN.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-CIZxqjbV.js";
|
|
2
|
-
import { n } from "./components-
|
|
2
|
+
import { n } from "./components-rPVG1iQS.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-DEdhzUqN.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-6SFJF1XM.js → wt-type-extension-value-input-B9CGBDQg.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./clients-CIZxqjbV.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-rPVG1iQS.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
|
@@ -17,6 +17,7 @@ export const useSelect = ({
|
|
|
17
17
|
searchMethod,
|
|
18
18
|
selectId,
|
|
19
19
|
isSingle,
|
|
20
|
+
disabledOptions = undefined,
|
|
20
21
|
emit = () => {},
|
|
21
22
|
}) => {
|
|
22
23
|
const {
|
|
@@ -31,6 +32,7 @@ export const useSelect = ({
|
|
|
31
32
|
resetAndFetch,
|
|
32
33
|
filterOptions,
|
|
33
34
|
updateSelectedOptionsCache,
|
|
35
|
+
isOptionDisabled,
|
|
34
36
|
} = useSelectOptions({
|
|
35
37
|
selected,
|
|
36
38
|
options,
|
|
@@ -39,6 +41,7 @@ export const useSelect = ({
|
|
|
39
41
|
dataKey,
|
|
40
42
|
allowCustomValues,
|
|
41
43
|
searchMethod,
|
|
44
|
+
disabledOptions,
|
|
42
45
|
});
|
|
43
46
|
|
|
44
47
|
const {
|
|
@@ -110,5 +113,6 @@ export const useSelect = ({
|
|
|
110
113
|
onDropdownHide,
|
|
111
114
|
onInputKeydown,
|
|
112
115
|
clearValue,
|
|
116
|
+
isOptionDisabled,
|
|
113
117
|
};
|
|
114
118
|
};
|
|
@@ -16,6 +16,7 @@ export const useSelectOptions = ({
|
|
|
16
16
|
dataKey,
|
|
17
17
|
allowCustomValues,
|
|
18
18
|
searchMethod,
|
|
19
|
+
disabledOptions,
|
|
19
20
|
}) => {
|
|
20
21
|
const { t } = useI18n();
|
|
21
22
|
const defaultOptionLabel = 'name';
|
|
@@ -227,6 +228,21 @@ export const useSelectOptions = ({
|
|
|
227
228
|
},
|
|
228
229
|
);
|
|
229
230
|
|
|
231
|
+
const isOptionDisabled = (option: unknown): boolean => {
|
|
232
|
+
if (!disabledOptions?.value) return false;
|
|
233
|
+
return Array.isArray(disabledOptions.value)
|
|
234
|
+
? (disabledOptions.value as unknown[]).some(
|
|
235
|
+
(d) =>
|
|
236
|
+
d != null &&
|
|
237
|
+
typeof d === 'object' &&
|
|
238
|
+
option != null &&
|
|
239
|
+
typeof option === 'object' &&
|
|
240
|
+
(d as Record<string, unknown>)[dataKey.value] ===
|
|
241
|
+
(option as Record<string, unknown>)[dataKey.value],
|
|
242
|
+
)
|
|
243
|
+
: Boolean(disabledOptions.value);
|
|
244
|
+
};
|
|
245
|
+
|
|
230
246
|
return {
|
|
231
247
|
filterText,
|
|
232
248
|
filteredOptions,
|
|
@@ -239,5 +255,6 @@ export const useSelectOptions = ({
|
|
|
239
255
|
resetAndFetch,
|
|
240
256
|
filterOptions,
|
|
241
257
|
updateSelectedOptionsCache,
|
|
258
|
+
isOptionDisabled,
|
|
242
259
|
};
|
|
243
260
|
};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:auto-option-focus="true"
|
|
26
26
|
:disabled="disabled"
|
|
27
27
|
:placeholder="placeholder || label"
|
|
28
|
-
:option-disabled="
|
|
28
|
+
:option-disabled="isOptionDisabled"
|
|
29
29
|
:options="filteredOptions"
|
|
30
30
|
:option-label="(option) => getOptionLabel(option)"
|
|
31
31
|
:option-value="optionValue"
|
|
@@ -141,9 +141,9 @@ interface Props extends SelectProps {
|
|
|
141
141
|
required?: boolean;
|
|
142
142
|
disabled?: boolean;
|
|
143
143
|
/**
|
|
144
|
-
* true disables all options but keeps dropdown visible
|
|
144
|
+
* true disables all options but keeps dropdown visible; an array disables specific options by dataKey
|
|
145
145
|
*/
|
|
146
|
-
disabledOptions?: boolean;
|
|
146
|
+
disabledOptions?: boolean | unknown[];
|
|
147
147
|
/**
|
|
148
148
|
* false disables options search
|
|
149
149
|
*/
|
|
@@ -225,6 +225,7 @@ const {
|
|
|
225
225
|
filterOptions,
|
|
226
226
|
onInputKeydown,
|
|
227
227
|
clearValue,
|
|
228
|
+
isOptionDisabled,
|
|
228
229
|
} = useSelect({
|
|
229
230
|
selected: model,
|
|
230
231
|
options: computed(() => props.options),
|
|
@@ -238,6 +239,7 @@ const {
|
|
|
238
239
|
searchMethod: computed(() => props.searchMethod),
|
|
239
240
|
selectId: computed(() => selectId),
|
|
240
241
|
isSingle: false,
|
|
242
|
+
disabledOptions: computed(() => props.disabledOptions),
|
|
241
243
|
emit,
|
|
242
244
|
});
|
|
243
245
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:focus-on-hover="false"
|
|
23
23
|
:disabled="disabled"
|
|
24
24
|
:placeholder="placeholder || label"
|
|
25
|
-
:option-disabled="
|
|
25
|
+
:option-disabled="isOptionDisabled"
|
|
26
26
|
:options="filteredOptions"
|
|
27
27
|
:option-label="(option) => getOptionLabel(option)"
|
|
28
28
|
:option-value="optionValue"
|
|
@@ -118,9 +118,9 @@ interface Props extends SelectProps {
|
|
|
118
118
|
disabled?: boolean;
|
|
119
119
|
size?: string | null;
|
|
120
120
|
/**
|
|
121
|
-
* true disables all options but keeps dropdown visible
|
|
121
|
+
* true disables all options but keeps dropdown visible; an array disables specific options by dataKey
|
|
122
122
|
*/
|
|
123
|
-
disabledOptions?: boolean;
|
|
123
|
+
disabledOptions?: boolean | unknown[];
|
|
124
124
|
/**
|
|
125
125
|
* false disables options search
|
|
126
126
|
*/
|
|
@@ -197,6 +197,7 @@ const {
|
|
|
197
197
|
filterOptions,
|
|
198
198
|
onInputKeydown,
|
|
199
199
|
clearValue,
|
|
200
|
+
isOptionDisabled,
|
|
200
201
|
} = useSelect({
|
|
201
202
|
selected: model,
|
|
202
203
|
options: computed(() => props.options),
|
|
@@ -209,6 +210,7 @@ const {
|
|
|
209
210
|
searchMethod: computed(() => props.searchMethod),
|
|
210
211
|
selectId: computed(() => selectId),
|
|
211
212
|
isSingle: true,
|
|
213
|
+
disabledOptions: computed(() => props.disabledOptions),
|
|
212
214
|
emit,
|
|
213
215
|
});
|
|
214
216
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, emit, }: {
|
|
1
|
+
export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, disabledOptions, emit, }: {
|
|
2
2
|
selected: any;
|
|
3
3
|
options: any;
|
|
4
4
|
optionLabel: any;
|
|
@@ -11,6 +11,7 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
|
|
|
11
11
|
searchMethod: any;
|
|
12
12
|
selectId: any;
|
|
13
13
|
isSingle: any;
|
|
14
|
+
disabledOptions?: any;
|
|
14
15
|
emit?: () => void;
|
|
15
16
|
}) => {
|
|
16
17
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
@@ -27,4 +28,5 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
|
|
|
27
28
|
onDropdownHide: () => void;
|
|
28
29
|
onInputKeydown: () => void;
|
|
29
30
|
clearValue: () => void;
|
|
31
|
+
isOptionDisabled: (option: unknown) => boolean;
|
|
30
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod, }: {
|
|
1
|
+
export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod, disabledOptions, }: {
|
|
2
2
|
selected: any;
|
|
3
3
|
options: any;
|
|
4
4
|
optionLabel: any;
|
|
@@ -6,6 +6,7 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
|
|
|
6
6
|
dataKey: any;
|
|
7
7
|
allowCustomValues: any;
|
|
8
8
|
searchMethod: any;
|
|
9
|
+
disabledOptions: any;
|
|
9
10
|
}) => {
|
|
10
11
|
filterText: import("vue").Ref<string, string>;
|
|
11
12
|
filteredOptions: import("vue").Ref<any, any>;
|
|
@@ -18,4 +19,5 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
|
|
|
18
19
|
resetAndFetch: (search?: string) => void;
|
|
19
20
|
filterOptions: (value: any) => void;
|
|
20
21
|
updateSelectedOptionsCache: () => void;
|
|
22
|
+
isOptionDisabled: (option: unknown) => boolean;
|
|
21
23
|
};
|
|
@@ -5,9 +5,9 @@ interface Props extends SelectProps {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/**
|
|
8
|
-
* true disables all options but keeps dropdown visible
|
|
8
|
+
* true disables all options but keeps dropdown visible; an array disables specific options by dataKey
|
|
9
9
|
*/
|
|
10
|
-
disabledOptions?: boolean;
|
|
10
|
+
disabledOptions?: boolean | unknown[];
|
|
11
11
|
/**
|
|
12
12
|
* false disables options search
|
|
13
13
|
*/
|
|
@@ -6,9 +6,9 @@ interface Props extends SelectProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: string | null;
|
|
8
8
|
/**
|
|
9
|
-
* true disables all options but keeps dropdown visible
|
|
9
|
+
* true disables all options but keeps dropdown visible; an array disables specific options by dataKey
|
|
10
10
|
*/
|
|
11
|
-
disabledOptions?: boolean;
|
|
11
|
+
disabledOptions?: boolean | unknown[];
|
|
12
12
|
/**
|
|
13
13
|
* false disables options search
|
|
14
14
|
*/
|