@webitel/ui-sdk 26.6.81 → 26.6.83

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 (26) hide show
  1. package/dist/{clients-CIZxqjbV.js → clients-IxWZVjVW.js} +62 -68
  2. package/dist/{components-B8_ZV_PF.js → components-B2L1ZiHW.js} +61 -53
  3. package/dist/{composables-BtjgpN_Q.js → composables-DEdhzUqN.js} +79 -76
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.js +1 -1
  6. package/dist/ui-sdk.umd.cjs +106 -106
  7. package/dist/{wt-chat-emoji-CSuQT5Vb.js → wt-chat-emoji-D4dD09cG.js} +1 -1
  8. package/dist/{wt-display-chip-items-CesI8QLx.js → wt-display-chip-items-CSqQ0S_z.js} +1 -1
  9. package/dist/{wt-expansion-card-IE8wNONx.js → wt-expansion-card-BANe4zX2.js} +1 -1
  10. package/dist/{wt-galleria-UzlXk6Xn.js → wt-galleria-YxNez7SX.js} +1 -1
  11. package/dist/{wt-send-message-popup-DkAlpARA.js → wt-send-message-popup-D1SPWpd0.js} +2 -2
  12. package/dist/{wt-table-BMyEF8Xb.js → wt-table-CPGSqs5Z.js} +1 -1
  13. package/dist/{wt-type-extension-value-input-6SFJF1XM.js → wt-type-extension-value-input-C0NYBiHc.js} +2 -2
  14. package/dist/{wt-vidstack-player-RqPsPq-u.js → wt-vidstack-player-BhGCF8P9.js} +1 -1
  15. package/package.json +1 -1
  16. package/src/components/_internals/composables/useSelect/useSelect.ts +4 -0
  17. package/src/components/_internals/composables/useSelect/useSelectOptions.ts +17 -0
  18. package/src/components/wt-multi-select/wt-multi-select.vue +12 -4
  19. package/src/components/wt-single-select/wt-single-select.vue +12 -4
  20. package/types/components/_internals/composables/useSelect/useSelect.d.ts +3 -1
  21. package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +3 -1
  22. package/types/components/wt-datepicker/wt-datepicker.vue.d.ts +2 -2
  23. package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +4 -2
  24. package/types/components/wt-popover/wt-popover.vue.d.ts +2 -2
  25. package/types/components/wt-single-select/wt-single-select.vue.d.ts +4 -2
  26. package/types/components/wt-tooltip/_internals/wt-tooltip-floating.vue.d.ts +2 -2
@@ -1,4 +1,4 @@
1
- import "./components-B8_ZV_PF.js";
1
+ import "./components-B2L1ZiHW.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-B8_ZV_PF.js";
1
+ import { C as e, i as t } from "./components-B2L1ZiHW.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-BtjgpN_Q.js";
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-BtjgpN_Q.js";
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
- import { n as e, r as t } from "./clients-CIZxqjbV.js";
2
- import { n } from "./components-B8_ZV_PF.js";
1
+ import { n as e, r as t } from "./clients-IxWZVjVW.js";
2
+ import { n } from "./components-B2L1ZiHW.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-BtjgpN_Q.js";
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({
@@ -1,5 +1,5 @@
1
- import { t as e } from "./clients-CIZxqjbV.js";
2
- import { a as t, o as n, r, s as i } from "./components-B8_ZV_PF.js";
1
+ import { t as e } from "./clients-IxWZVjVW.js";
2
+ import { a as t, o as n, r, s as i } from "./components-B2L1ZiHW.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-B8_ZV_PF.js";
1
+ import { w as e } from "./components-B2L1ZiHW.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.81",
3
+ "version": "26.6.83",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -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="() => disabledOptions"
28
+ :option-disabled="isOptionDisabled"
29
29
  :options="filteredOptions"
30
30
  :option-label="(option) => getOptionLabel(option)"
31
31
  :option-value="optionValue"
@@ -44,7 +44,7 @@
44
44
  @before-show="onDropdownBeforeShow"
45
45
  @before-hide="onDropdownBeforeHide"
46
46
  @show="onDropdownShow"
47
- @hide="onDropdownHide"
47
+ @hide="handleDropdownHide"
48
48
  >
49
49
  <template v-if="!chipsView" #value="{ value, placeholder }">
50
50
  <span v-if="value && value.length">
@@ -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
  */
@@ -209,6 +209,7 @@ const emit = defineEmits<{
209
209
  value: string,
210
210
  ];
211
211
  reset: [];
212
+ hide: [];
212
213
  }>();
213
214
 
214
215
  const {
@@ -225,6 +226,7 @@ const {
225
226
  filterOptions,
226
227
  onInputKeydown,
227
228
  clearValue,
229
+ isOptionDisabled,
228
230
  } = useSelect({
229
231
  selected: model,
230
232
  options: computed(() => props.options),
@@ -238,6 +240,7 @@ const {
238
240
  searchMethod: computed(() => props.searchMethod),
239
241
  selectId: computed(() => selectId),
240
242
  isSingle: false,
243
+ disabledOptions: computed(() => props.disabledOptions),
241
244
  emit,
242
245
  });
243
246
 
@@ -259,6 +262,11 @@ const hasLabel = computed(() => {
259
262
  const requiredLabel = computed(() => {
260
263
  return props.required ? `${props.label}*` : props.label;
261
264
  });
265
+
266
+ const handleDropdownHide = () => {
267
+ onDropdownHide();
268
+ emit('hide');
269
+ };
262
270
  </script>
263
271
 
264
272
  <style scoped>
@@ -22,7 +22,7 @@
22
22
  :focus-on-hover="false"
23
23
  :disabled="disabled"
24
24
  :placeholder="placeholder || label"
25
- :option-disabled="() => disabledOptions"
25
+ :option-disabled="isOptionDisabled"
26
26
  :options="filteredOptions"
27
27
  :option-label="(option) => getOptionLabel(option)"
28
28
  :option-value="optionValue"
@@ -37,7 +37,7 @@
37
37
  @before-show="onDropdownBeforeShow"
38
38
  @before-hide="onDropdownBeforeHide"
39
39
  @show="onDropdownShow"
40
- @hide="onDropdownHide"
40
+ @hide="handleDropdownHide"
41
41
  >
42
42
  <template #header>
43
43
  <wt-input-text
@@ -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
  */
@@ -176,6 +176,7 @@ const model = defineModel<string>({
176
176
 
177
177
  const emit = defineEmits<{
178
178
  reset: [];
179
+ hide: [];
179
180
  }>();
180
181
 
181
182
  const selectId = `select-${Math.random().toString(36).slice(2, 11)}`;
@@ -197,6 +198,7 @@ const {
197
198
  filterOptions,
198
199
  onInputKeydown,
199
200
  clearValue,
201
+ isOptionDisabled,
200
202
  } = useSelect({
201
203
  selected: model,
202
204
  options: computed(() => props.options),
@@ -209,6 +211,7 @@ const {
209
211
  searchMethod: computed(() => props.searchMethod),
210
212
  selectId: computed(() => selectId),
211
213
  isSingle: true,
214
+ disabledOptions: computed(() => props.disabledOptions),
212
215
  emit,
213
216
  });
214
217
 
@@ -230,6 +233,11 @@ const hasLabel = computed(() => {
230
233
  const requiredLabel = computed(() => {
231
234
  return props.required ? `${props.label}*` : props.label;
232
235
  });
236
+
237
+ const handleDropdownHide = () => {
238
+ onDropdownHide();
239
+ emit('hide');
240
+ };
233
241
  </script>
234
242
 
235
243
  <style scoped>
@@ -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
  };
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
30
30
  focus: () => any;
31
31
  keydown: () => any;
32
32
  "update:modelValue": (...args: unknown[]) => any;
33
- show: () => any;
34
33
  hide: () => any;
34
+ show: () => any;
35
35
  "value-change": () => any;
36
36
  "date-select": () => any;
37
37
  "today-click": () => any;
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
44
44
  onFocus?: () => any;
45
45
  onKeydown?: () => any;
46
46
  "onUpdate:modelValue"?: (...args: unknown[]) => any;
47
- onShow?: () => any;
48
47
  onHide?: () => any;
48
+ onShow?: () => any;
49
49
  "onValue-change"?: () => any;
50
50
  "onDate-select"?: () => any;
51
51
  "onToday-click"?: () => any;
@@ -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
  */
@@ -59,10 +59,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
59
59
  reset: () => any;
60
60
  "update:modelValue": (value: any[]) => any;
61
61
  "add:custom-value": (value: string) => any;
62
+ hide: () => any;
62
63
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
63
64
  onReset?: () => any;
64
65
  "onUpdate:modelValue"?: (value: any[]) => any;
65
66
  "onAdd:custom-value"?: (value: string) => any;
67
+ onHide?: () => any;
66
68
  }>, {
67
69
  options: unknown[];
68
70
  customValidators: unknown[];
@@ -20,11 +20,11 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {
20
20
  show: (event?: Event, target?: HTMLElement | null | undefined) => void;
21
21
  hide: (event?: Event) => void;
22
22
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
- show: () => any;
24
23
  hide: () => any;
24
+ show: () => any;
25
25
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
26
- onShow?: () => any;
27
26
  onHide?: () => any;
27
+ onShow?: () => any;
28
28
  }>, {
29
29
  dt: import("@primevue/core").DesignToken<any>;
30
30
  disabled: boolean;
@@ -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
  */
@@ -62,9 +62,11 @@ type __VLS_Slots = {} & {
62
62
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
63
63
  reset: () => any;
64
64
  "update:modelValue": (value: string) => any;
65
+ hide: () => any;
65
66
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
66
67
  onReset?: () => any;
67
68
  "onUpdate:modelValue"?: (value: string) => any;
69
+ onHide?: () => any;
68
70
  }>, {
69
71
  options: unknown[];
70
72
  customValidators: unknown[];
@@ -10,16 +10,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
10
10
  default: () => any[];
11
11
  };
12
12
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- show: (...args: any[]) => void;
14
13
  hide: (...args: any[]) => void;
14
+ show: (...args: any[]) => void;
15
15
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
16
  triggers: {
17
17
  type: ArrayConstructor;
18
18
  default: () => any[];
19
19
  };
20
20
  }>> & Readonly<{
21
- onShow?: (...args: any[]) => any;
22
21
  onHide?: (...args: any[]) => any;
22
+ onShow?: (...args: any[]) => any;
23
23
  }>, {
24
24
  triggers: unknown[];
25
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;