@ironsource/shared-ui 2.1.6-rc.36 → 2.1.6-rc.38

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 (36) hide show
  1. package/DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css +1 -0
  2. package/DropdownV4.vue_vue_type_style_index_0_scoped_b484da34_lang.css +1 -0
  3. package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
  4. package/TreeDropdown.vue_vue_type_style_index_0_scoped_54adec1e_lang.css +1 -0
  5. package/components/autocomplete/Autocomplete.vue.d.ts +1 -0
  6. package/components/autocomplete/Autocomplete.vue2.js +6 -5
  7. package/components/autocomplete/index.d.ts +1 -0
  8. package/components/dropdown/common/Dropdown.common.js +22 -22
  9. package/components/dropdown/common/Option.common.d.ts +1 -1
  10. package/components/dropdown/common/Option.common.js +9 -9
  11. package/components/dropdown/composables/useChildOptions.d.ts +7 -0
  12. package/components/dropdown/composables/useChildOptions.js +14 -0
  13. package/components/dropdown/v4/DropdownV4.vue.d.ts +6 -0
  14. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  15. package/components/dropdown/v4/DropdownV4.vue2.js +43 -40
  16. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  17. package/components/dropdown/v4/OptionV4.vue2.js +21 -22
  18. package/components/dropdown/v4/TreeDropdown.vue.d.ts +112 -0
  19. package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
  20. package/components/dropdown/v4/TreeDropdown.vue2.js +120 -0
  21. package/components/dropdown/v4/index.d.ts +189 -2
  22. package/components/dropdown/v4/index.js +7 -4
  23. package/components/multibar/MultiBarMenu.vue2.js +12 -11
  24. package/components/table/common/Table.common.d.ts +1 -0
  25. package/components/table/common/Table.common.js +65 -61
  26. package/components/table/v4/DataGrid.vue.d.ts +3 -1
  27. package/components/table/v4/DataGrid.vue.js +2 -2
  28. package/components/table/v4/DataGrid.vue2.js +169 -166
  29. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  30. package/components/table/v4/index.d.ts +9 -3
  31. package/index.d.ts +393 -8
  32. package/mocks/options.d.ts +12 -0
  33. package/package.json +1 -1
  34. package/DataGrid.vue_vue_type_style_index_0_scoped_ac14037f_lang.css +0 -1
  35. package/DropdownV4.vue_vue_type_style_index_0_scoped_2e7a89bc_lang.css +0 -1
  36. package/OptionV4.vue_vue_type_style_index_0_scoped_69abfd4a_lang.css +0 -1
@@ -0,0 +1 @@
1
+ .sticky[data-v-057abdf5]{position:sticky}.table-container[data-v-057abdf5]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-057abdf5]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-057abdf5]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-057abdf5]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-057abdf5]{width:13.75rem}.table-header.isStickyHeader[data-v-057abdf5]{z-index:calc(var(--671cd302) + 3);top:0}.table-head-container[data-v-057abdf5]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-057abdf5]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-057abdf5]{display:inline-table}.table-header-actions[data-v-057abdf5]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-057abdf5]{position:relative}.table-row.loading[data-v-057abdf5]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-057abdf5]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-057abdf5]{border-bottom:none}.expanded-row[data-v-057abdf5]{grid-column:var(--be93a49a);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-057abdf5]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md);border-collapse:collapse;border-spacing:0}table.hasFooter[data-v-057abdf5]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-057abdf5],table th[data-v-057abdf5]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-057abdf5]:first-of-type,table th[data-v-057abdf5]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-057abdf5]:last-of-type,table th[data-v-057abdf5]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-057abdf5],table th.expand-toggle-cell[data-v-057abdf5]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-057abdf5]{border-bottom:none;z-index:calc(var(--671cd302) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-057abdf5]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--13ad9fec)}table>thead>tr>th[data-v-057abdf5]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-057abdf5]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-057abdf5]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-057abdf5]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-057abdf5]{cursor:pointer}table>thead.sticky[data-v-057abdf5]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-057abdf5]{z-index:calc(var(--671cd302) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-057abdf5]{display:block}table>tbody>*>tr[data-v-057abdf5]{background-color:var(--background-default);min-height:var(--6feb5274);height:auto;display:grid;align-items:center;grid-template-columns:var(--13ad9fec)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-057abdf5]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-057abdf5],table>tbody>*>tr.activeMenu>td[data-v-057abdf5]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-057abdf5]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--6feb5274);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-057abdf5]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-057abdf5]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-057abdf5]{justify-content:flex-end;text-align:right}.section-container[data-v-057abdf5]{left:0}.sections[data-v-057abdf5]{display:flex}.section[data-v-057abdf5]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-057abdf5]{width:100%}.empty-state[data-v-057abdf5]{min-height:250px}
@@ -0,0 +1 @@
1
+ .v-enter-active[data-v-b484da34],.v-leave-active[data-v-b484da34]{transition:opacity .25s ease}ol[data-v-b484da34],ul[data-v-b484da34],menu[data-v-b484da34]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-b484da34],.dropdown.full-width .button__container[data-v-b484da34]{width:100%}.dropdown-list-wrapper[data-v-b484da34]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-b484da34]{padding:.5rem}.list-container--multi[data-v-b484da34]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-b484da34]{padding-bottom:.25rem}.inline-search .list-container[data-v-b484da34]{padding-top:0}.no-result-container[data-v-b484da34]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-b484da34]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-b484da34]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-b484da34]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.image-slot[data-v-b484da34]{margin-right:.5rem}.actions-wrapper[data-v-b484da34]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between;margin-top:.25rem}.apply-button[data-v-b484da34]{margin-left:.5rem}
@@ -0,0 +1 @@
1
+ .label[data-v-9db0f796]{color:#41454d}.item-container[data-v-9db0f796]{width:100%;display:flex;align-items:center;cursor:pointer;border-radius:var(--border-radius-lg);margin-bottom:.25rem;color:var(--text-primary);padding:6px 8px}.item-container--disabled[data-v-9db0f796]{cursor:initial;color:var(--text-disabled)}.item-container[data-v-9db0f796]:hover:not(.item-container--disabled){background-color:var(--action-hover)}.item-container--active[data-v-9db0f796],.item-container[data-v-9db0f796]:active{background-color:var(--action-selected)}.item-container:not(.item-container--multi).item-container--selected[data-v-9db0f796]{background-color:var(--action-selected)}.subtitle[data-v-9db0f796]{color:#7b838c;line-height:1rem}.clear-button[data-v-9db0f796]{display:flex;padding:0 4px;color:#7b838c;align-items:center;height:auto;background-image:none;min-width:auto;border:none;background-color:transparent}.clear-button[data-v-9db0f796]:hover{color:#3083ff}.item[data-v-9db0f796]{width:100%;display:flex;gap:.5rem;align-items:center}.item--with-icon[data-v-9db0f796],.item--multi[data-v-9db0f796]{display:flex;flex-direction:row;align-items:center;justify-content:start}.item .image[data-v-9db0f796]{width:20px;height:20px;flex:none}.item .image img[data-v-9db0f796]{width:20px;height:20px;border-radius:4px}.item .start-icon[data-v-9db0f796],.item .end-icon[data-v-9db0f796]{display:flex;color:var(--action-active)}.item .option-text[data-v-9db0f796]{line-height:1.1875rem}.text-container[data-v-9db0f796]{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left}.tooltip-option[data-v-9db0f796]{display:block}.tooltip-option[data-v-9db0f796] .container{width:100%}
@@ -0,0 +1 @@
1
+ .child-options[data-v-54adec1e]{padding-left:1rem}
@@ -115,6 +115,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
115
115
  }>, {
116
116
  default?(_: {
117
117
  option: unknown;
118
+ index: number;
118
119
  selected: boolean;
119
120
  active: boolean;
120
121
  disabled: any;
@@ -6,6 +6,7 @@ import "../dropdown/v4/ChipDropdownTrigger.vue.js";
6
6
  import "../dropdown/v4/AppDropdownTrigger.vue.js";
7
7
  import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
8
8
  import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
9
+ import "../dropdown/v4/TreeDropdown.vue.js";
9
10
  import "../dropdown/v4/OptionV4.vue.js";
10
11
  import E from "../input/v4/TextField.vue.js";
11
12
  import { useVModel as z } from "@vueuse/core";
@@ -14,7 +15,7 @@ import P from "../shared/FieldMaxLength.vue.js";
14
15
  const N = {
15
16
  key: 0,
16
17
  class: "footer"
17
- }, Q = /* @__PURE__ */ w({
18
+ }, X = /* @__PURE__ */ w({
18
19
  __name: "Autocomplete",
19
20
  props: {
20
21
  modelValue: { default: "" },
@@ -40,8 +41,8 @@ const N = {
40
41
  testId: { default: "" }
41
42
  },
42
43
  emits: ["update:modelValue"],
43
- setup(e, { emit: g }) {
44
- const a = e, i = z(a, "modelValue", g), p = (l) => {
44
+ setup(e, { emit: p }) {
45
+ const a = e, i = z(a, "modelValue", p), g = (l) => {
45
46
  l !== void 0 && (i.value = a.displayValue(l));
46
47
  }, k = c(() => (i.value || "").length), y = (l, t) => a.displayValue(l).toLowerCase().replace(/\s+/g, "").includes(t.toLowerCase().replace(/\s+/g, "")), u = c(() => {
47
48
  const l = i.value.toString();
@@ -68,7 +69,7 @@ const N = {
68
69
  "search-auto-focus": !1,
69
70
  "full-width": !1,
70
71
  "test-id": e.testId,
71
- "onUpdate:selected": p
72
+ "onUpdate:selected": g
72
73
  }, {
73
74
  "dropdown-trigger": x(() => [
74
75
  v(d(E), {
@@ -117,5 +118,5 @@ const N = {
117
118
  }
118
119
  });
119
120
  export {
120
- Q as default
121
+ X as default
121
122
  };
@@ -469,6 +469,7 @@ declare const AutocompleteTypes: () => ({
469
469
  $slots: {
470
470
  default?(_: {
471
471
  option: unknown;
472
+ index: number;
472
473
  selected: boolean;
473
474
  active: boolean;
474
475
  disabled: any;
@@ -1,17 +1,17 @@
1
1
  import { useToggle as me } from "../../../composables/useToggle.js";
2
2
  import { ref as n, computed as r, watch as m, useSlots as Pe, toRaw as A, nextTick as N, provide as Te, onMounted as we } from "vue";
3
3
  import { isObjectInArray as W } from "../../../utils/array.js";
4
- import { objectsEqual as xe } from "../../../utils/object.js";
5
- import { useClamp as Ie, useVirtualList as De, onClickOutside as Y } from "@vueuse/core";
6
- import { Mode as P, Type as _, DropdownContext as Ne } from "./DropdownContext.js";
4
+ import { objectsEqual as Ie } from "../../../utils/object.js";
5
+ import { useClamp as xe, useVirtualList as De, onClickOutside as Y } from "@vueuse/core";
6
+ import { Mode as P, Type as V, DropdownContext as Ne } from "./DropdownContext.js";
7
7
  import { pxToRem as Re } from "../../../utils/style.js";
8
8
  import { useEditableContext as Ee } from "../../table-cells/common/EditableContext.js";
9
9
  const Ue = (l, O, b) => {
10
10
  const Z = (e, t) => l.multi ? W(e, t) : A(e) === t;
11
- let k;
11
+ let _;
12
12
  ((e) => {
13
13
  e[e.None = 0] = "None", e[e.Next = 1] = "Next", e[e.Previous = -1] = "Previous", e[e.NextPage = 10] = "NextPage", e[e.PrevPage = -10] = "PrevPage";
14
- })(k || (k = {}));
14
+ })(_ || (_ = {}));
15
15
  const a = n(
16
16
  l.selected
17
17
  ), R = Ee(), u = r({
@@ -28,7 +28,7 @@ const Ue = (l, O, b) => {
28
28
  a.value = l.selected, v.value = l.selected;
29
29
  }
30
30
  );
31
- const p = Pe(), w = n(null), g = n(null), V = n(null), E = n(null), H = n(null), x = n(null), F = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => x.value ? x.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), I = n(-1), T = n(""), v = n(l.selected || []), q = () => x.value?.focus(), [d, te, ae] = me({
31
+ const F = Pe(), w = n(null), g = n(null), k = n(null), E = n(null), H = n(null), I = n(null), p = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => I.value ? I.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), T = n(""), v = n(l.selected || []), q = () => I.value?.focus(), [d, te, ae] = me({
32
32
  disabled: l.disabled,
33
33
  initialValue: l.defaultOpen
34
34
  });
@@ -47,7 +47,7 @@ const Ue = (l, O, b) => {
47
47
  set(e) {
48
48
  O("update:isOpen", e);
49
49
  }
50
- }), ne = r(() => s.value.length - 1), o = Ie(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
50
+ }), ne = r(() => s.value.length - 1), o = xe(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
51
51
  if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
52
52
  return l.placeholder;
53
53
  const t = !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix ? `${e.value.length} selected` : `${l.multiOptionsPlaceholderPrefix ?? ""}${e.value.length ?? "0"}${l.multiOptionsPlaceholderSuffix ?? ""}`;
@@ -83,20 +83,20 @@ const Ue = (l, O, b) => {
83
83
  scrollTo: D
84
84
  } = De(s, {
85
85
  itemHeight: j.value,
86
- overscan: 2
86
+ overscan: l.disableVirtualScroll ? 1 / 0 : 2
87
87
  });
88
88
  m(
89
89
  () => l.isOpen,
90
90
  (e) => {
91
91
  G(e);
92
92
  }
93
- ), m([I], async () => {
93
+ ), m([x], async () => {
94
94
  await N();
95
95
  }), m(
96
- [d, o, I],
96
+ [d, o, x],
97
97
  async ([e], [t]) => {
98
- d.value && (await N(), I.value !== -1 && e !== t && setTimeout(() => {
99
- l.multi && b.VERSION === 4 || D(I.value);
98
+ d.value && (await N(), x.value !== -1 && e !== t && setTimeout(() => {
99
+ l.multi && b.VERSION === 4 || D(x.value);
100
100
  }), o.value && setTimeout(() => {
101
101
  D(o.value);
102
102
  }));
@@ -131,15 +131,15 @@ const Ue = (l, O, b) => {
131
131
  }, fe = () => {
132
132
  de(), b.VERSION !== 4 && (u.value = a.value);
133
133
  }, ge = (e = !0) => {
134
- a.value = [], e && (u.value = [], v.value = [], O("clear"));
134
+ a.value = [], e && (u.value = [], v.value = []), O("clear");
135
135
  }, C = (e, t) => {
136
136
  if (e = A(e), c.value[t]?.disabled)
137
137
  return;
138
- if (I.value = t, i.mode !== P.Multi) {
138
+ if (x.value = t, i.mode !== P.Multi) {
139
139
  l.keepOpen || h(!1), i.goToOption(
140
140
  0
141
141
  /* None */
142
- ), u.value = e, M(""), q(), i.type === _.Search && g.value && (g.value.value = l.displayValue(e));
142
+ ), u.value = e, M(""), q(), i.type === V.Search && g.value && (g.value.value = l.displayValue(e));
143
143
  return;
144
144
  }
145
145
  if (!Array.isArray(a.value))
@@ -148,7 +148,7 @@ const Ue = (l, O, b) => {
148
148
  const S = A(a.value);
149
149
  if (W(S, e)) {
150
150
  a.value = S.filter(
151
- (f) => !xe(f, e)
151
+ (f) => !Ie(f, e)
152
152
  );
153
153
  return;
154
154
  } else {
@@ -163,7 +163,7 @@ const Ue = (l, O, b) => {
163
163
  activeOption: E,
164
164
  listRef: w,
165
165
  clearable: l.clearable,
166
- type: p.input ? _.Search : _.Dropdown,
166
+ type: F.input ? V.Search : V.Dropdown,
167
167
  mode: l.multi ? P.Multi : P.Single,
168
168
  query: T,
169
169
  selectedValue: K,
@@ -213,7 +213,7 @@ const Ue = (l, O, b) => {
213
213
  },
214
214
  {
215
215
  ignore: [
216
- x,
216
+ I,
217
217
  B,
218
218
  L,
219
219
  U,
@@ -227,7 +227,7 @@ const Ue = (l, O, b) => {
227
227
  };
228
228
  we(async () => {
229
229
  l.autoFocus && (await N(), setTimeout(() => {
230
- V.value.focus();
230
+ k.value.focus();
231
231
  })), i.goToOption(0);
232
232
  });
233
233
  const Se = () => {
@@ -322,11 +322,11 @@ const Ue = (l, O, b) => {
322
322
  scrollTo: D,
323
323
  onClickOutside: Y,
324
324
  listRef: w,
325
- buttonRef: x,
325
+ buttonRef: I,
326
326
  apply: B,
327
327
  cancel: L,
328
- el: V,
329
- triggerRef: F,
328
+ el: k,
329
+ triggerRef: p,
330
330
  clearAll: U,
331
331
  onClearAllSelections: ge
332
332
  };
@@ -1,5 +1,5 @@
1
1
  export declare const optionCommon: (props: any) => {
2
- selected: import("vue").ComputedRef<boolean>;
2
+ selected: import("vue").ComputedRef<any>;
3
3
  isMulti: import("vue").ComputedRef<boolean>;
4
4
  id: string;
5
5
  onClick: (event: Event) => void;
@@ -1,22 +1,22 @@
1
1
  import { ref as s, onMounted as m, onUnmounted as v, computed as o, toRaw as i } from "vue";
2
2
  import { useId as f } from "../../../composables/useId.js";
3
3
  import { useDropdownContext as O, Mode as l } from "./DropdownContext.js";
4
- const A = (t) => {
5
- const e = O("Option"), n = f().value, u = s(null), c = (d) => {
6
- t.selectAllOption ? d.stopPropagation() : e.select(t.option);
4
+ const A = (e) => {
5
+ const t = O("Option"), n = f().value, u = s(null), c = (a) => {
6
+ e.selectAllOption ? a.stopPropagation() : t.select(e.option);
7
7
  };
8
- m(() => e.registerOption(n, t.disabled, !!t.subtitle)), v(() => {
9
- e.unRegisterOption(n);
8
+ m(() => t.registerOption(n, e.disabled, !!e.subtitle)), v(() => {
9
+ t.unRegisterOption(n);
10
10
  });
11
- const r = o(() => e.mode === l.Multi), a = o(() => t.active !== null ? t.active : e.activeIndex.value !== null ? e.activeOption.value === t.option : !1);
11
+ const r = o(() => t.mode === l.Multi), d = o(() => e.active !== null ? e.active : t.activeIndex.value !== null ? t.activeOption.value === e.option : !1);
12
12
  return {
13
- selected: o(() => t.selectedProp ? !0 : e.mode === l.Multi && Array.isArray(e.selectedOption.value) ? i(e.selectedOption.value.includes(t.option)) : i(e.selectedOption.value) === i(t.option)),
13
+ selected: o(() => e.selectedProp !== null ? e.selectedProp : t.mode === l.Multi && Array.isArray(t.selectedOption.value) ? i(t.selectedOption.value.includes(e.option)) : i(t.selectedOption.value) === i(e.option)),
14
14
  isMulti: r,
15
15
  id: n,
16
16
  onClick: c,
17
- api: e,
17
+ api: t,
18
18
  el: u,
19
- active: a
19
+ active: d
20
20
  };
21
21
  };
22
22
  export {
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useChildOptions: (selection: Ref<unknown[]>, childrenKey: string) => {
3
+ hasChildren: (option: unknown) => boolean;
4
+ getChildren: (option: unknown) => unknown[];
5
+ someChildrenSelected: (option: any) => boolean;
6
+ allChildrenSelected: (option: unknown) => boolean;
7
+ };
@@ -0,0 +1,14 @@
1
+ const u = (t, s) => {
2
+ const l = (e) => e[s] || [], r = (e) => l(e)?.length > 0;
3
+ return {
4
+ hasChildren: r,
5
+ getChildren: l,
6
+ someChildrenSelected: (e) => r(e) ? l(e).some((n) => t.value.includes(n)) : !1,
7
+ allChildrenSelected: (e) => r(e) ? l(e).every(
8
+ (n) => t.value.includes(n)
9
+ ) : !1
10
+ };
11
+ };
12
+ export {
13
+ u as useChildOptions
14
+ };
@@ -48,6 +48,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
48
48
  fullWidth?: boolean;
49
49
  optionsListWidth?: string;
50
50
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
51
+ disableVirtualScroll?: boolean;
51
52
  }>, {
52
53
  multi: boolean;
53
54
  inlineSearchPlaceholder: string;
@@ -94,6 +95,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
94
95
  fullWidth: boolean;
95
96
  optionsListWidth: any;
96
97
  statusType: any;
98
+ disableVirtualScroll: boolean;
97
99
  }>, {
98
100
  selectItem: (option: any, index?: number) => void;
99
101
  scrollTo: (index: number) => void;
@@ -155,6 +157,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
155
157
  fullWidth?: boolean;
156
158
  optionsListWidth?: string;
157
159
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
160
+ disableVirtualScroll?: boolean;
158
161
  }>, {
159
162
  multi: boolean;
160
163
  inlineSearchPlaceholder: string;
@@ -201,6 +204,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
201
204
  fullWidth: boolean;
202
205
  optionsListWidth: any;
203
206
  statusType: any;
207
+ disableVirtualScroll: boolean;
204
208
  }>>> & {
205
209
  onCopyToClipboard?: () => any;
206
210
  onClear?: () => any;
@@ -255,6 +259,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
255
259
  fullWidth: boolean;
256
260
  optionsListWidth: string;
257
261
  statusType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
262
+ disableVirtualScroll: boolean;
258
263
  }>, {
259
264
  label?(_: {}): any;
260
265
  "dropdown-trigger"?(_: {
@@ -270,6 +275,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
270
275
  }): any;
271
276
  default?(_: {
272
277
  option: unknown;
278
+ index: number;
273
279
  selected: boolean;
274
280
  active: boolean;
275
281
  disabled: any;
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
- /* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_2e7a89bc_lang.css"; //*');
2
+ /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_b484da34_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2e7a89bc"]]);
5
+ const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-b484da34"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_2e7a89bc_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as se, computed as x, openBlock as i, createElementBlock as n, mergeProps as u, unref as e, renderSlot as w, createElementVNode as m, createVNode as a, withCtx as c, Transition as ue, normalizeClass as A, normalizeStyle as ce, isRef as fe, createCommentVNode as r, createTextVNode as g, toDisplayString as ye, withModifiers as $, Fragment as me, renderList as pe, toRaw as b, createBlock as H, resolveDynamicComponent as ge } from "vue";
1
+ import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_b484da34_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as se, computed as x, openBlock as i, createElementBlock as n, mergeProps as u, unref as e, renderSlot as w, createElementVNode as p, createVNode as a, withCtx as c, Transition as ue, normalizeClass as A, normalizeStyle as ce, isRef as fe, createCommentVNode as r, createTextVNode as g, toDisplayString as ye, withModifiers as $, Fragment as pe, renderList as me, toRaw as h, createBlock as H, resolveDynamicComponent as ge } from "vue";
2
2
  import L from "../../button/v4/ButtonV4.vue.js";
3
3
  import "../../button/v4/IconButtonV4.vue.js";
4
4
  import "./DropdownV4.vue.js";
@@ -8,6 +8,7 @@ import be from "./ChipDropdownTrigger.vue.js";
8
8
  import he from "./AppDropdownTrigger.vue.js";
9
9
  import "./ButtonDropdownTrigger.vue.js";
10
10
  import "./ButtonFilterDropdownTrigger.vue.js";
11
+ import "./TreeDropdown.vue.js";
11
12
  import U from "./OptionV4.vue.js";
12
13
  import Ie from "../../search/v4/SearchV4.vue.js";
13
14
  import W from "../../typography/v4/Typography.vue.js";
@@ -16,7 +17,7 @@ import { DropdownTestIdModifiers as f } from "../../../testids/index.js";
16
17
  import { dropdownCommon as we } from "../common/Dropdown.common.js";
17
18
  import Ce from "../../loader/v4/Loader.vue.js";
18
19
  import { useTestIdAttrs as Se } from "../../../utils/testIds.js";
19
- import { TRIGGERS as p } from "./Dropdown.types.js";
20
+ import { TRIGGERS as m } from "./Dropdown.types.js";
20
21
  import { useElementSize as Ae } from "@vueuse/core";
21
22
  import Le from "../../shared/FieldHelpText.vue.js";
22
23
  const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke = { key: 1 }, Ne = { key: 2 }, De = {
@@ -28,10 +29,10 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
28
29
  }, Re = {
29
30
  key: 1,
30
31
  class: "loader"
31
- }, Fe = { key: 2 }, ze = ["aria-selected", "aria-disabled", "onClick"], Ve = {
32
+ }, Fe = { key: 2 }, Ve = ["aria-selected", "aria-disabled", "onClick"], ze = {
32
33
  key: 1,
33
34
  class: "actions-wrapper"
34
- }, xe = { class: "actions-clear-all" }, $e = { class: "actions-apply-cancel" }, st = /* @__PURE__ */ se({
35
+ }, xe = { class: "actions-clear-all" }, $e = { class: "actions-apply-cancel" }, ut = /* @__PURE__ */ se({
35
36
  __name: "DropdownV4",
36
37
  props: {
37
38
  modelValue: { default: null },
@@ -62,7 +63,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
62
63
  triggerFeedbackShowIcon: { type: Boolean, default: !1 },
63
64
  size: { default: "medium" },
64
65
  mandatory: { type: Boolean, default: !1 },
65
- predefinedTrigger: { default: p.DEFAULT },
66
+ predefinedTrigger: { default: m.DEFAULT },
66
67
  inlineSearch: { type: Boolean, default: !1 },
67
68
  inlineSearchPlaceholder: { default: "Search" },
68
69
  onSearch: { type: Function, default: null },
@@ -81,7 +82,8 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
81
82
  theme: { default: "light-theme-v4" },
82
83
  fullWidth: { type: Boolean, default: !0 },
83
84
  optionsListWidth: { default: null },
84
- statusType: { default: null }
85
+ statusType: { default: null },
86
+ disableVirtualScroll: { type: Boolean, default: !1 }
85
87
  },
86
88
  emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard"],
87
89
  setup(t, { expose: M, emit: O }) {
@@ -95,7 +97,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
95
97
  }, {
96
98
  onKeydown: k,
97
99
  open: s,
98
- toggleMenu: h,
100
+ toggleMenu: I,
99
101
  onButtonKeydown: G,
100
102
  query: C,
101
103
  containerProps: X,
@@ -122,13 +124,13 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
122
124
  el: ne,
123
125
  onClearAllSelections: F,
124
126
  clearAll: ae
125
- } = we(d, O, E), y = Se(d.testId, f), z = x(() => !d.predefinedTrigger || d.predefinedTrigger === p.DEFAULT ? ke : d.predefinedTrigger === p.APP ? he : null), { width: V } = Ae(R), de = x(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === p.DEFAULT || d.predefinedTrigger === p.APP ? V.value - 2 > 240 ? `${V.value - 2}px` : `${E.DROPLIST_MIN_WIDTH}px` : "auto"), re = () => {
126
- h();
127
+ } = we(d, O, E), y = Se(d.testId, f), V = x(() => !d.predefinedTrigger || d.predefinedTrigger === m.DEFAULT ? ke : d.predefinedTrigger === m.APP ? he : null), { width: z } = Ae(R), de = x(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === m.DEFAULT || d.predefinedTrigger === m.APP ? z.value - 2 > 240 ? `${z.value - 2}px` : `${E.DROPLIST_MIN_WIDTH}px` : "auto"), re = () => {
128
+ I();
127
129
  };
128
130
  return M({
129
131
  selectItem: D,
130
132
  scrollTo: te
131
- }), (I, o) => (i(), n("div", u({
133
+ }), (v, o) => (i(), n("div", u({
132
134
  ref_key: "el",
133
135
  ref: ne,
134
136
  class: ["dropdown dropdown--main-wrapper", [{ "dropdown--disabled": t.disabled, "full-width": t.fullWidth }]],
@@ -137,8 +139,8 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
137
139
  onKeydown: o[8] || (o[8] = //@ts-ignore
138
140
  (...l) => e(k) && e(k)(...l))
139
141
  }), [
140
- w(I.$slots, "label", {}, void 0, !0),
141
- m("div", Ee, [
142
+ w(v.$slots, "label", {}, void 0, !0),
143
+ p("div", Ee, [
142
144
  a(e(ve), u({
143
145
  theme: t.theme,
144
146
  "popper-class": [
@@ -191,15 +193,15 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
191
193
  onKeydown: e(k)
192
194
  }, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id", "onUpdate:modelValue", "onKeydown"])
193
195
  ])) : r("", !0),
194
- w(I.$slots, "input-list", { open: e(s) }, void 0, !0),
195
- m("div", u({
196
+ w(v.$slots, "input-list", { open: e(s) }, void 0, !0),
197
+ p("div", u({
196
198
  class: ["list-container", { "list-container--multi": t.multi }],
197
199
  style: { height: `${e(q)}rem` }
198
200
  }, {
199
201
  ...e(X),
200
202
  ...e(y)[e(f).LIST_CONTAINER]
201
203
  }), [
202
- m("ul", u(e(Y), {
204
+ p("ul", u(e(Y), {
203
205
  role: "listbox",
204
206
  class: ["list", { "list--multi": t.multi }]
205
207
  }), [
@@ -240,22 +242,23 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
240
242
  _: 1
241
243
  }, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
242
244
  ])) : r("", !0),
243
- e(K).length && !t.loading ? (i(!0), n(me, { key: 3 }, pe(e(K), ({ data: l, index: v }) => (i(), n("li", {
244
- key: v,
245
- "aria-selected": e(S)(b(e(T)), l),
245
+ e(K).length && !t.loading ? (i(!0), n(pe, { key: 3 }, me(e(K), ({ data: l, index: b }) => (i(), n("li", {
246
+ key: b,
247
+ "aria-selected": e(S)(h(e(T)), l),
246
248
  "aria-disabled": !!t.disabled,
247
- onClick: $(() => e(D)(l, v), ["stop"])
249
+ onClick: $(() => e(D)(l, b), ["stop"])
248
250
  }, [
249
- w(I.$slots, "default", {
251
+ w(v.$slots, "default", {
250
252
  option: l,
251
- selected: e(S)(b(e(T)), l),
252
- active: b(e(P)) === v,
253
+ index: b,
254
+ selected: e(S)(h(e(T)), l),
255
+ active: h(e(P)) === b,
253
256
  disabled: l[d.disabledOptionKey]
254
257
  }, () => [
255
258
  a(e(U), {
256
259
  option: l,
257
- selected: e(S)(b(e(T)), l),
258
- active: b(e(P)) === v,
260
+ "selected-prop": e(S)(h(e(T)), l),
261
+ active: h(e(P)) === b,
259
262
  disabled: l[d.disabledOptionKey],
260
263
  "name-key": t.optionNameKey,
261
264
  "image-key": t.optionImageKey,
@@ -263,13 +266,13 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
263
266
  "icon-type": t.optionIconType,
264
267
  "end-icon-key": t.optionEndIconKey,
265
268
  "end-icon-type": t.optionEndIconType
266
- }, null, 8, ["option", "selected", "active", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type"])
269
+ }, null, 8, ["option", "selected-prop", "active", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type"])
267
270
  ], !0)
268
- ], 8, ze))), 128)) : r("", !0)
271
+ ], 8, Ve))), 128)) : r("", !0)
269
272
  ], 16)
270
273
  ], 16),
271
- t.multi ? (i(), n("div", Ve, [
272
- m("div", xe, [
274
+ t.multi ? (i(), n("div", ze, [
275
+ p("div", xe, [
273
276
  a(e(L), u(
274
277
  {
275
278
  ref_key: "clearAll",
@@ -289,7 +292,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
289
292
  _: 1
290
293
  }, 16)
291
294
  ]),
292
- m("div", $e, [
295
+ p("div", $e, [
293
296
  a(e(L), u(
294
297
  {
295
298
  ref_key: "cancel",
@@ -327,27 +330,27 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
327
330
  })
328
331
  ]),
329
332
  default: c(() => [
330
- m("div", {
333
+ p("div", {
331
334
  class: A(["button__container", {
332
335
  "button__container--open": !!e(s),
333
336
  [`button__container--${t.size}`]: !0,
334
337
  "button__container--disabled": t.disabled
335
338
  }])
336
339
  }, [
337
- w(I.$slots, "dropdown-trigger", {
340
+ w(v.$slots, "dropdown-trigger", {
338
341
  buttonTriggerProps: {
339
342
  open: e(s),
340
343
  disabled: t.disabled,
341
344
  label: e(Z) || t.placeholder,
342
- onClick: () => e(h)()
345
+ onClick: () => e(I)()
343
346
  }
344
347
  }, () => [
345
- m("div", {
348
+ p("div", {
346
349
  ref_key: "buttonRef",
347
350
  ref: R
348
351
  }, [
349
- e(z) ? (i(), n("div", Be, [
350
- (i(), H(ge(e(z)), {
352
+ e(V) ? (i(), n("div", Be, [
353
+ (i(), H(ge(e(V)), {
351
354
  placeholder: t.placeholder,
352
355
  open: e(s),
353
356
  label: t.triggerLabel,
@@ -374,12 +377,12 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
374
377
  onCopyToClipboard: o[0] || (o[0] = (l) => O("copyToClipboard"))
375
378
  }, null, 40, ["placeholder", "open", "label", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "option-end-icon-key", "option-end-icon-type", "feedback-variant", "value-to-copy", "status-dot-type", "size", "onKeydown"]))
376
379
  ])) : r("", !0),
377
- t.predefinedTrigger === e(p).ICON_BUTTON ? (i(), n("div", Ke, [
380
+ t.predefinedTrigger === e(m).ICON_BUTTON ? (i(), n("div", Ke, [
378
381
  a(e(Te), {
379
- onClick: o[1] || (o[1] = (l) => e(h)())
382
+ onClick: o[1] || (o[1] = (l) => e(I)())
380
383
  })
381
384
  ])) : r("", !0),
382
- t.predefinedTrigger === e(p).CHIP ? (i(), n("div", Ne, [
385
+ t.predefinedTrigger === e(m).CHIP ? (i(), n("div", Ne, [
383
386
  a(e(be), {
384
387
  open: e(s),
385
388
  label: t.placeholder,
@@ -388,7 +391,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
388
391
  "selected-option": t.multi ? e(N) : e(T),
389
392
  "display-value": t.displayValue,
390
393
  multi: t.multi,
391
- onClick: o[2] || (o[2] = (l) => e(h)()),
394
+ onClick: o[2] || (o[2] = (l) => e(I)()),
392
395
  onClear: o[3] || (o[3] = (l) => e(F)())
393
396
  }, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi"])
394
397
  ])) : r("", !0)
@@ -411,5 +414,5 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke
411
414
  }
412
415
  });
413
416
  export {
414
- st as default
417
+ ut as default
415
418
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./OptionV4.vue2.js";
2
2
  /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../OptionV4.vue_vue_type_style_index_0_scoped_69abfd4a_lang.css"; //*');
4
- const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-69abfd4a"]]);
3
+ // import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css"; //*');
4
+ const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-9db0f796"]]);
5
5
  export {
6
6
  s as default
7
7
  };