@webitel/ui-sdk 26.6.90 → 26.6.91

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 (23) hide show
  1. package/dist/{components-BqXO2X92.js → components-DxLcN-EN.js} +483 -481
  2. package/dist/{composables-CuxX3Ib0.js → composables-vmCh4eqT.js} +18 -20
  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-DMGWnSDG.js → wt-chat-emoji-D8WBh59k.js} +1 -1
  7. package/dist/{wt-display-chip-items-CL9lPf4i.js → wt-display-chip-items-DR-fMv8R.js} +1 -1
  8. package/dist/{wt-expansion-card-afRJCmRw.js → wt-expansion-card-DvLD-TP4.js} +1 -1
  9. package/dist/{wt-galleria-DGkRyAjw.js → wt-galleria-DT0SOjXk.js} +1 -1
  10. package/dist/{wt-send-message-popup-BV_3DOj4.js → wt-send-message-popup-BCuqX1qv.js} +1 -1
  11. package/dist/{wt-table-CC01Dw6T.js → wt-table-DS_2J5zF.js} +1 -1
  12. package/dist/{wt-type-extension-value-input-Cb_PUwOS.js → wt-type-extension-value-input-Bprdgg6Y.js} +1 -1
  13. package/dist/{wt-vidstack-player-DlSB9Hkq.js → wt-vidstack-player-DGPPCRtG.js} +1 -1
  14. package/package.json +1 -1
  15. package/src/components/_internals/composables/useSelect/useSelect.ts +2 -4
  16. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +2 -18
  17. package/src/components/wt-datepicker/_internals/composables/useRestoreOnBlur.ts +1 -1
  18. package/src/components/wt-multi-select/wt-multi-select.vue +8 -5
  19. package/src/components/wt-single-select/wt-single-select.vue +8 -5
  20. package/types/components/_internals/composables/useSelect/useSelect.d.ts +2 -3
  21. package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +2 -3
  22. package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +6 -2
  23. package/types/components/wt-single-select/wt-single-select.vue.d.ts +6 -2
@@ -1,4 +1,4 @@
1
- import "./components-BqXO2X92.js";
1
+ import "./components-DxLcN-EN.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-BqXO2X92.js";
1
+ import { C as e, i as t } from "./components-DxLcN-EN.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-CuxX3Ib0.js";
4
+ import "./composables-vmCh4eqT.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-CuxX3Ib0.js";
3
+ import { a as n, o as r } from "./composables-vmCh4eqT.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-BqXO2X92.js";
2
+ import { n } from "./components-DxLcN-EN.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-CuxX3Ib0.js";
4
+ import { t as i } from "./composables-vmCh4eqT.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-BqXO2X92.js";
2
+ import { a as t, o as n, r, s as i } from "./components-DxLcN-EN.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-BqXO2X92.js";
1
+ import { w as e } from "./components-DxLcN-EN.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.90",
3
+ "version": "26.6.91",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -17,7 +17,7 @@ export const useSelect = ({
17
17
  searchMethod,
18
18
  selectId,
19
19
  isSingle,
20
- disabledOptions = undefined,
20
+ strictApiOptions = undefined,
21
21
  emit = () => {},
22
22
  }) => {
23
23
  const {
@@ -32,7 +32,6 @@ export const useSelect = ({
32
32
  resetAndFetch,
33
33
  filterOptionsBase,
34
34
  updateSelectedOptionsCache,
35
- isOptionDisabled,
36
35
  } = useSelectOptions({
37
36
  selected,
38
37
  options,
@@ -41,7 +40,7 @@ export const useSelect = ({
41
40
  dataKey,
42
41
  allowCustomValues,
43
42
  searchMethod,
44
- disabledOptions,
43
+ strictApiOptions,
45
44
  });
46
45
 
47
46
  const {
@@ -114,6 +113,5 @@ export const useSelect = ({
114
113
  onDropdownHide,
115
114
  onInputKeydown,
116
115
  clearValue,
117
- isOptionDisabled,
118
116
  };
119
117
  };
@@ -16,7 +16,7 @@ export const useSelectOptions = ({
16
16
  dataKey,
17
17
  allowCustomValues,
18
18
  searchMethod,
19
- disabledOptions,
19
+ strictApiOptions,
20
20
  }) => {
21
21
  const { t } = useI18n();
22
22
  const defaultOptionLabel = 'name';
@@ -186,7 +186,7 @@ export const useSelectOptions = ({
186
186
 
187
187
  const addSelectedValueToList = (newVal) => {
188
188
  // If the selected value is not in the list, add it
189
- if (!newVal || !searchMethod.value) return;
189
+ if (!newVal || !searchMethod.value || strictApiOptions?.value) return;
190
190
  const selectedAsArray = toArray(newVal);
191
191
  const missingSelected = selectedAsArray.filter(
192
192
  (s) => !isOptionSelected(s, filteredOptions.value, dataKey.value),
@@ -228,21 +228,6 @@ export const useSelectOptions = ({
228
228
  },
229
229
  );
230
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
-
246
231
  return {
247
232
  filterText,
248
233
  filteredOptions,
@@ -255,6 +240,5 @@ export const useSelectOptions = ({
255
240
  resetAndFetch,
256
241
  filterOptionsBase,
257
242
  updateSelectedOptionsCache,
258
- isOptionDisabled,
259
243
  };
260
244
  };
@@ -1,4 +1,4 @@
1
- import { nextTick, type WritableComputedRef, watch } from 'vue';
1
+ import { nextTick } from 'vue';
2
2
 
3
3
  /**
4
4
  * @author @HlukhovYe
@@ -25,7 +25,7 @@
25
25
  :auto-option-focus="true"
26
26
  :disabled="disabled"
27
27
  :placeholder="placeholder || label"
28
- :option-disabled="isOptionDisabled"
28
+ :option-disabled="() => !!props.disabledOptions"
29
29
  :options="filteredOptions"
30
30
  :option-label="(option) => getOptionLabel(option)"
31
31
  :option-value="optionValue"
@@ -141,9 +141,13 @@ interface Props extends SelectProps {
141
141
  required?: boolean;
142
142
  disabled?: boolean;
143
143
  /**
144
- * true disables all options but keeps dropdown visible; an array disables specific options by dataKey
144
+ * true disables all options but keeps dropdown visible
145
145
  */
146
- disabledOptions?: boolean | unknown[];
146
+ disabledOptions?: boolean;
147
+ /**
148
+ * true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
149
+ */
150
+ strictApiOptions?: boolean;
147
151
  /**
148
152
  * false disables options search
149
153
  */
@@ -226,7 +230,6 @@ const {
226
230
  filterOptions,
227
231
  onInputKeydown,
228
232
  clearValue,
229
- isOptionDisabled,
230
233
  } = useSelect({
231
234
  selected: model,
232
235
  options: computed(() => props.options),
@@ -240,7 +243,7 @@ const {
240
243
  searchMethod: computed(() => props.searchMethod),
241
244
  selectId: computed(() => selectId),
242
245
  isSingle: false,
243
- disabledOptions: computed(() => props.disabledOptions),
246
+ strictApiOptions: computed(() => props.strictApiOptions),
244
247
  emit,
245
248
  });
246
249
 
@@ -22,7 +22,7 @@
22
22
  :focus-on-hover="false"
23
23
  :disabled="disabled"
24
24
  :placeholder="placeholder || label"
25
- :option-disabled="isOptionDisabled"
25
+ :option-disabled="() => !!props.disabledOptions"
26
26
  :options="filteredOptions"
27
27
  :option-label="(option) => getOptionLabel(option)"
28
28
  :option-value="optionValue"
@@ -118,9 +118,13 @@ interface Props extends SelectProps {
118
118
  disabled?: boolean;
119
119
  size?: string | null;
120
120
  /**
121
- * true disables all options but keeps dropdown visible; an array disables specific options by dataKey
121
+ * true disables all options but keeps dropdown visible
122
122
  */
123
- disabledOptions?: boolean | unknown[];
123
+ disabledOptions?: boolean;
124
+ /**
125
+ * true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
126
+ */
127
+ strictApiOptions?: boolean;
124
128
  /**
125
129
  * false disables options search
126
130
  */
@@ -198,7 +202,6 @@ const {
198
202
  filterOptions,
199
203
  onInputKeydown,
200
204
  clearValue,
201
- isOptionDisabled,
202
205
  } = useSelect({
203
206
  selected: model,
204
207
  options: computed(() => props.options),
@@ -211,7 +214,7 @@ const {
211
214
  searchMethod: computed(() => props.searchMethod),
212
215
  selectId: computed(() => selectId),
213
216
  isSingle: true,
214
- disabledOptions: computed(() => props.disabledOptions),
217
+ strictApiOptions: computed(() => props.strictApiOptions),
215
218
  emit,
216
219
  });
217
220
 
@@ -1,4 +1,4 @@
1
- export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, disabledOptions, emit, }: {
1
+ export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, strictApiOptions, emit, }: {
2
2
  selected: any;
3
3
  options: any;
4
4
  optionLabel: any;
@@ -11,7 +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
+ strictApiOptions?: any;
15
15
  emit?: () => void;
16
16
  }) => {
17
17
  isLoading: import("vue").Ref<boolean, boolean>;
@@ -28,5 +28,4 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
28
28
  onDropdownHide: () => void;
29
29
  onInputKeydown: () => void;
30
30
  clearValue: () => void;
31
- isOptionDisabled: (option: unknown) => boolean;
32
31
  };
@@ -1,4 +1,4 @@
1
- export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod, disabledOptions, }: {
1
+ export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod, strictApiOptions, }: {
2
2
  selected: any;
3
3
  options: any;
4
4
  optionLabel: any;
@@ -6,7 +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
+ strictApiOptions: any;
10
10
  }) => {
11
11
  filterText: import("vue").Ref<string, string>;
12
12
  filteredOptions: import("vue").Ref<any, any>;
@@ -19,5 +19,4 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
19
19
  resetAndFetch: (search?: string) => void;
20
20
  filterOptionsBase: (value: any) => void;
21
21
  updateSelectedOptionsCache: () => void;
22
- isOptionDisabled: (option: unknown) => boolean;
23
22
  };
@@ -5,9 +5,13 @@ interface Props extends SelectProps {
5
5
  required?: boolean;
6
6
  disabled?: boolean;
7
7
  /**
8
- * true disables all options but keeps dropdown visible; an array disables specific options by dataKey
8
+ * true disables all options but keeps dropdown visible
9
9
  */
10
- disabledOptions?: boolean | unknown[];
10
+ disabledOptions?: boolean;
11
+ /**
12
+ * true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
13
+ */
14
+ strictApiOptions?: boolean;
11
15
  /**
12
16
  * false disables options search
13
17
  */
@@ -6,9 +6,13 @@ interface Props extends SelectProps {
6
6
  disabled?: boolean;
7
7
  size?: string | null;
8
8
  /**
9
- * true disables all options but keeps dropdown visible; an array disables specific options by dataKey
9
+ * true disables all options but keeps dropdown visible
10
10
  */
11
- disabledOptions?: boolean | unknown[];
11
+ disabledOptions?: boolean;
12
+ /**
13
+ * true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
14
+ */
15
+ strictApiOptions?: boolean;
12
16
  /**
13
17
  * false disables options search
14
18
  */