@ironsource/shared-ui 2.1.11-test.1 → 2.1.11-test.26

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 (107) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css +1 -0
  2. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_1aa6df01_lang.css +1 -0
  3. package/Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css +1 -0
  4. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +1 -0
  5. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +1 -0
  6. package/DataGrid.vue_vue_type_style_index_0_scoped_e7591db4_lang.css +1 -0
  7. package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +1 -0
  8. package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +1 -0
  9. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +1 -0
  10. package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
  11. package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +1 -0
  12. package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +1 -0
  13. package/README.md +4 -15
  14. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +1 -0
  15. package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +1 -0
  16. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +1 -0
  17. package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +1 -0
  18. package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +1 -0
  19. package/components/autocomplete/Autocomplete.vue2.js +3 -2
  20. package/components/button/v4/ToggleButtonGroupAB.vue.d.ts +3 -1
  21. package/components/button/v4/ToggleButtonGroupAB.vue.js +2 -2
  22. package/components/button/v4/ToggleButtonGroupAB.vue2.js +44 -39
  23. package/components/button/v4/index.d.ts +9 -3
  24. package/components/chart/Chart.vue.js +5 -5
  25. package/components/chart/Chart.vue2.js +48 -46
  26. package/components/chart/SettingsHeader.vue.js +3 -3
  27. package/components/chart/SettingsHeader.vue2.js +34 -26
  28. package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
  29. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  30. package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
  31. package/components/dropdown/common/Dropdown.common.js +191 -184
  32. package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
  33. package/components/dropdown/v3/index.d.ts +39 -39
  34. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
  35. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
  36. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +6 -6
  37. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  38. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
  39. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
  40. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  41. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +73 -47
  42. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +90 -0
  43. package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
  44. package/components/dropdown/v4/ConditionalDropdown.vue2.js +185 -0
  45. package/components/dropdown/v4/DropdownV4.vue.d.ts +31 -6
  46. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  47. package/components/dropdown/v4/DropdownV4.vue2.js +224 -198
  48. package/components/dropdown/v4/OptionV4.vue.d.ts +10 -0
  49. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  50. package/components/dropdown/v4/OptionV4.vue2.js +135 -98
  51. package/components/dropdown/v4/TreeDropdown.vue.d.ts +6 -1
  52. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  53. package/components/dropdown/v4/TreeDropdown.vue2.js +209 -167
  54. package/components/dropdown/v4/index.d.ts +402 -87
  55. package/components/dropdown/v4/index.js +6 -3
  56. package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
  57. package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
  58. package/components/icon/v4/consts.d.ts +1 -1
  59. package/components/icon/v4/consts.js +1 -1
  60. package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
  61. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  62. package/components/inlineCopy/InlineCopy.vue2.js +24 -22
  63. package/components/inlineCopy/index.d.ts +9 -0
  64. package/components/input/v4/TextField.vue.js +3 -3
  65. package/components/input/v4/TextField.vue2.js +12 -12
  66. package/components/multibar/MultiBarMenu.vue2.js +3 -2
  67. package/components/popover/v4/PopoverV4.vue.d.ts +14 -2
  68. package/components/popover/v4/PopoverV4.vue.js +4 -3
  69. package/components/popover/v4/PopoverV4.vue2.js +40 -24
  70. package/components/popover/v4/index.d.ts +55 -11
  71. package/components/sortableList/SortableList.vue.d.ts +1 -1
  72. package/components/sortableList/index.d.ts +4 -4
  73. package/components/table/common/Table.common.js +69 -71
  74. package/components/table/common/Table.types.d.ts +1 -1
  75. package/components/table/v3/Table.vue.d.ts +1 -1
  76. package/components/table/v3/index.d.ts +5 -5
  77. package/components/table/v4/DataGrid.vue.d.ts +6 -1
  78. package/components/table/v4/DataGrid.vue.js +4 -4
  79. package/components/table/v4/DataGrid.vue2.js +124 -117
  80. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  81. package/components/table/v4/index.d.ts +26 -7
  82. package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
  83. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  84. package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
  85. package/components/tooltip/v4/index.d.ts +39 -1
  86. package/design-foundation.stories/icons/iconsData.d.ts +1 -1
  87. package/index.d.ts +1123 -262
  88. package/index.js +1 -1
  89. package/mocks/options.d.ts +48 -2
  90. package/mocks/words.d.ts +1 -1
  91. package/package.json +3 -2
  92. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
  93. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
  94. package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css +0 -1
  95. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
  96. package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
  97. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +0 -1
  98. package/DropdownV4.vue_vue_type_style_index_0_scoped_991a7aad_lang.css +0 -1
  99. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
  100. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
  101. package/OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css +0 -1
  102. package/PopoverV4.vue_vue_type_style_index_0_scoped_74bbce13_lang.css +0 -1
  103. package/SettingsHeader.vue_vue_type_style_index_0_scoped_1791e4fe_lang.css +0 -1
  104. package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
  105. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css +0 -1
  106. package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
  107. package/TreeDropdown.vue_vue_type_style_index_0_scoped_e944c610_lang.css +0 -1
@@ -1,156 +1,156 @@
1
- import { useToggle as ke } from "../../../composables/useToggle.js";
2
- import { inject as Ve, ref as i, computed as r, watch as b, useSlots as _e, toRaw as P, nextTick as N, provide as Ge, onMounted as He } from "vue";
3
- import { isObjectInArray as ee } from "../../../utils/array.js";
1
+ import { useToggle as _e } from "../../../composables/useToggle.js";
2
+ import { inject as Ve, ref as r, computed as c, watch as b, useSlots as ke, toRaw as P, nextTick as K, provide as Ge, onMounted as Le } from "vue";
3
+ import { isObjectInArray as ae } from "../../../utils/array.js";
4
4
  import { objectsEqual as Be } from "../../../utils/object.js";
5
- import { useClamp as Le, useVirtualList as Ue, onClickOutside as le } from "@vueuse/core";
6
- import { Mode as T, Type as _, DropdownContext as qe } from "./DropdownContext.js";
5
+ import { useClamp as He, useVirtualList as Ue, onClickOutside as ne, useInfiniteScroll as qe } from "@vueuse/core";
6
+ import { Mode as T, Type as L, DropdownContext as Xe } from "./DropdownContext.js";
7
7
  import { pxToRem as $e } from "../../../utils/style.js";
8
8
  import { useEditableContext as je } from "../../table-cells/common/EditableContext.js";
9
- import { useGroupedOptions as Xe } from "./useGroupedOptions.js";
10
- const ll = (l, S, A) => {
11
- const te = Ve("isTreeDropdown", !1), {
12
- sortOutGroups: G,
13
- flattenAndMarkGroupOptions: ae,
14
- isGroup: H,
15
- selectAllWithGroups: ne,
16
- isIndeterminateGrouped: ue,
17
- allSelectedGrouped: ie,
18
- areAllPreviousSelected: re
19
- } = Xe(l), oe = (e, t) => l.multi ? l.comparingKey ? e.findIndex(
20
- (u) => u[l.comparingKey] === t[l.comparingKey]
21
- ) > -1 : ee(e, t) : l.comparingKey ? e[l.comparingKey] === t[l.comparingKey] : P(e) === t;
22
- let B;
9
+ import { useGroupedOptions as ze } from "./useGroupedOptions.js";
10
+ const tl = (l, f, g) => {
11
+ const B = Ve("isTreeDropdown", !1), {
12
+ sortOutGroups: H,
13
+ flattenAndMarkGroupOptions: ue,
14
+ isGroup: U,
15
+ selectAllWithGroups: ie,
16
+ isIndeterminateGrouped: re,
17
+ allSelectedGrouped: q,
18
+ areAllPreviousSelected: oe
19
+ } = ze(l), ce = (e, t) => l.multi && Array.isArray(e) ? l.comparingKey ? e?.findIndex(
20
+ (i) => i[l.comparingKey] === t[l.comparingKey]
21
+ ) > -1 : ae(e, t) : l.comparingKey ? e?.[l.comparingKey] === t[l.comparingKey] : e === t;
22
+ let X;
23
23
  ((e) => {
24
24
  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";
25
- })(B || (B = {}));
26
- const a = i(
25
+ })(X || (X = {}));
26
+ const a = r(
27
27
  l.selected
28
- ), R = je(), n = r({
28
+ ), R = je(), n = c({
29
29
  get() {
30
30
  return R?.value?.value ?? a.value;
31
31
  },
32
32
  set(e) {
33
- R.onChange?.(e), R.onClose?.(), S("update:selected", e);
33
+ R.onChange?.(e), R.onClose?.(), f("update:selected", e);
34
34
  }
35
35
  });
36
36
  b(
37
37
  () => l.selected,
38
38
  () => {
39
- a.value = l.selected, s.value = l.selected;
39
+ a.value = l.selected, d.value = l.selected;
40
40
  }
41
41
  );
42
- const ce = _e(), w = i(null), h = i(null), L = i(null), E = i(null), U = i(null), I = i(null), se = i(), q = i(null), $ = i(null), j = i(null), ve = 8, de = r(() => I.value ? I.value.getBoundingClientRect().height + ve + l.distance : 0), X = i(!1), f = i([]), x = i(-1), O = i(""), s = i(l.selected || []), z = () => I.value?.focus(), [g, fe, ge] = ke({
42
+ const se = ke(), w = r(null), m = r(null), $ = r(null), E = r(null), j = r(null), I = r(null), de = r(), z = r(null), W = r(null), J = r(null), ve = 8, fe = c(() => I.value ? I.value.getBoundingClientRect().height + ve + l.distance : 0), D = r(!1), y = r([]), x = r(-1), h = r(""), d = r(l.selected || []), Q = () => I.value?.focus(), [O, ge, ye] = _e({
43
43
  disabled: l.disabled,
44
44
  initialValue: l.defaultOpen
45
45
  });
46
46
  b(
47
47
  () => l.disabled,
48
48
  (e) => {
49
- e !== void 0 && ge(e);
49
+ e !== void 0 && ye(e);
50
50
  }
51
51
  );
52
- const W = (e) => {
53
- ye.value = fe(e);
54
- }, ye = r({
52
+ const Y = (e) => {
53
+ he.value = ge(e);
54
+ }, he = c({
55
55
  get() {
56
56
  return l.isOpen;
57
57
  },
58
58
  set(e) {
59
- S("update:isOpen", e);
59
+ f("update:isOpen", e);
60
60
  }
61
- }), he = r(() => o.value.length - 1), d = Le(0, 0, he), J = r(() => n.value ? l.displayValue(n.value) : ""), Oe = (e) => {
61
+ }), Oe = c(() => o.value.length - 1), v = He(0, 0, Oe), Z = c(() => n.value ? l.displayValue(n.value) : ""), Se = (e) => {
62
62
  if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
63
63
  return l.placeholder;
64
64
  const t = !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix ? `${e.value.length} selected` : `${l.multiOptionsPlaceholderPrefix ?? ""}${e.value.length ?? "0"}${l.multiOptionsPlaceholderSuffix ?? ""}`;
65
65
  return e.value.length == 1 && l.displayValue ? l.displayValue(e.value[0]) : t;
66
- }, me = r(() => {
66
+ }, me = c(() => {
67
67
  if (!l.multi)
68
68
  return n.value ? l.displayValue(n.value) : l.placeholder;
69
69
  if (Array.isArray(a.value))
70
- return Oe(a);
71
- }), K = r(() => {
70
+ return Se(a);
71
+ }), M = c(() => {
72
72
  if (Array.isArray(a.value))
73
- return l.groupedOptions ? ie(o, a) : a.value.length === o.value.length;
74
- }), Se = r(() => !l.multi || !Array.isArray(a.value) ? !1 : l.groupedOptions ? ue(
73
+ return l.groupedOptions ? q(o, a) : a.value.length === o.value.length;
74
+ }), Ae = c(() => !l.multi || !Array.isArray(a.value) ? !1 : l.groupedOptions ? re(
75
75
  o,
76
76
  a
77
- ) : a.value.length > 0 && a.value.length < o.value.length), M = (e) => {
78
- O.value = e;
79
- }, D = r(() => l.groupedOptions ? ae(l.options) : l.options), Ae = r(() => {
80
- if (re(
81
- D,
82
- s
77
+ ) : a.value.length > 0 && a.value.length < o.value.length), _ = (e) => {
78
+ h.value = e;
79
+ }, N = c(() => l.groupedOptions ? ue(l.options) : l.options), be = c(() => {
80
+ if (oe(
81
+ N,
82
+ d
83
83
  ))
84
- return D.value;
84
+ return N.value;
85
85
  const e = {
86
86
  selected: [],
87
87
  notSelected: []
88
88
  };
89
- P(D).value.forEach((u) => {
90
- const v = (l.comparingKey ? s.value.findIndex(
91
- (V) => V[l.comparingKey] === u[l.comparingKey]
92
- ) > -1 : s.value.includes(u)) ? "selected" : "notSelected";
93
- e[v].push(u);
89
+ P(N).value.forEach((i) => {
90
+ const u = (l.comparingKey ? d.value.findIndex(
91
+ (G) => G[l.comparingKey] === i[l.comparingKey]
92
+ ) > -1 : d.value.includes(i)) ? "selected" : "notSelected";
93
+ e[u].push(i);
94
94
  });
95
- const t = l.groupedOptions ? G(e.notSelected) : e.notSelected;
95
+ const t = l.groupedOptions ? H(e.notSelected) : e.notSelected;
96
96
  return [].concat(e.selected, t);
97
- }), o = r(() => {
98
- const e = Array.isArray(s.value) && l.multi && A.VERSION === 4 && !te ? Ae.value : D.value;
97
+ }), o = c(() => {
98
+ const e = Array.isArray(d.value) && l.multi && g.VERSION === 4 && !B ? be.value : N.value;
99
99
  if (l.onSearch) {
100
- const t = e.filter((u) => l.groupedOptions && H(u) ? u : l.onSearch(u, O.value));
101
- return l.groupedOptions ? G(t) : t;
100
+ const t = e.filter((i) => l.groupedOptions && U(i) ? i : l.onSearch(i, h.value));
101
+ return l.groupedOptions ? H(t) : t;
102
102
  } else
103
103
  return e;
104
- }), be = r(() => f.value[0]?.hasSubtitle), Q = r(() => c.mode === T.Multi), Y = r(
105
- () => be.value ? A.MULTILINE_LIST_HEIGHT : A.LIST_HEIGHT
104
+ }), Pe = c(() => y.value[0]?.hasSubtitle), F = c(() => s.mode === T.Multi), p = c(
105
+ () => Pe.value ? g.MULTILINE_LIST_HEIGHT : g.LIST_HEIGHT
106
106
  ), {
107
- list: Z,
108
- containerProps: F,
109
- wrapperProps: Pe,
107
+ list: ee,
108
+ containerProps: V,
109
+ wrapperProps: Te,
110
110
  scrollTo: C
111
111
  } = Ue(o, {
112
- itemHeight: Y.value,
112
+ itemHeight: p.value,
113
113
  overscan: l.disableVirtualScroll ? 1 / 0 : 2
114
114
  });
115
115
  b(
116
116
  () => l.isOpen,
117
117
  (e) => {
118
- W(e);
118
+ Y(e);
119
119
  }
120
120
  ), b([x], async () => {
121
- await N();
121
+ await K();
122
122
  }), b(
123
- [g, d, x],
123
+ [O, v, x],
124
124
  async ([e], [t]) => {
125
- g.value && (await N(), x.value !== -1 && e !== t && setTimeout(() => {
126
- l.multi && A.VERSION === 4 || C(x.value);
127
- }), d.value && setTimeout(() => {
128
- C(d.value);
125
+ O.value && (await K(), x.value !== -1 && e !== t && setTimeout(() => {
126
+ l.multi && g.VERSION === 4 || C(x.value);
127
+ }), v.value && setTimeout(() => {
128
+ C(v.value);
129
129
  }));
130
130
  }
131
- ), b(O, () => {
132
- S("onsearch", O.value), C(0);
131
+ ), b(h, () => {
132
+ f("onsearch", h.value), C(0);
133
133
  });
134
- const m = (e, t = !1) => {
135
- l.disabled || (W(e), N(() => {
136
- g.value && S("opened"), g.value || S("closed"), w.value && t && w.value.focus();
134
+ const A = (e, t = !1) => {
135
+ l.disabled || (Y(e), K(() => {
136
+ O.value && f("opened"), O.value || f("closed"), w.value && t && w.value.focus();
137
137
  }));
138
138
  };
139
- b(g, (e) => {
139
+ b(O, (e) => {
140
140
  if (e) {
141
- O.value = "", Q.value && Array.isArray(n.value) && (s.value = P(n.value).slice());
141
+ h.value = "", F.value && Array.isArray(n.value) && (d.value = P(n.value).slice());
142
142
  return;
143
143
  }
144
- z();
144
+ Q();
145
145
  });
146
- const Te = () => {
147
- if (K.value) {
146
+ const we = () => {
147
+ if (M.value) {
148
148
  a.value = [];
149
149
  return;
150
150
  }
151
151
  if (Array.isArray(a.value)) {
152
152
  if (l.groupedOptions)
153
- ne(o, a);
153
+ ie(o, a);
154
154
  else {
155
155
  if (a.value.length === o.value.length) {
156
156
  a.value = [];
@@ -158,116 +158,117 @@ const ll = (l, S, A) => {
158
158
  }
159
159
  a.value = o.value;
160
160
  }
161
- S("selectAll");
161
+ f("selectAll");
162
162
  }
163
- }, we = () => {
164
- Te(), A.VERSION !== 4 && (n.value = a.value);
165
- }, Ie = (e = !0) => {
166
- a.value = [], e && (n.value = [], s.value = []), S("clear");
163
+ }, Ie = () => {
164
+ we(), g.VERSION !== 4 && (n.value = a.value);
165
+ }, xe = (e = !0) => {
166
+ a.value = [], e && (n.value = [], d.value = []), f("clear");
167
167
  }, k = (e, t) => {
168
- if (e = P(e), f.value[t]?.disabled)
168
+ if (e = P(e), g.VERSION === 4 ? e[l.disabledOptionKey] : y.value[t]?.disabled)
169
169
  return;
170
- if (x.value = t, c.mode !== T.Multi) {
171
- l.keepOpen || m(!1), c.goToOption(
170
+ if (x.value = t, !l.multi) {
171
+ l.keepOpen || A(!1), s.goToOption(
172
172
  0
173
173
  /* None */
174
- ), n.value = e, M(""), z(), c.type === _.Search && h.value && (h.value.value = l.displayValue(e));
174
+ ), n.value = e, _(""), Q(), s.type === L.Search && m.value && (m.value.value = l.displayValue(e)), le();
175
175
  return;
176
176
  }
177
177
  if (!Array.isArray(a.value))
178
178
  return;
179
- h.value?.focus();
180
- const y = P(a.value);
181
- if (ee(y, e) || l.comparingKey && y.findIndex(
182
- (v) => v[l.comparingKey] === e[l.comparingKey]
179
+ m.value?.focus();
180
+ const S = P(a.value);
181
+ if (ae(S, e) || l.comparingKey && S.findIndex(
182
+ (u) => u[l.comparingKey] === e[l.comparingKey]
183
183
  ) > -1) {
184
- a.value = y.filter(
185
- (v) => !Be(v, e)
186
- );
184
+ a.value = S.filter((u) => l.comparingKey ? u[l.comparingKey] !== e[l.comparingKey] : !Be(u, e));
187
185
  return;
188
186
  } else {
189
- a.value = [...y, e];
187
+ a.value = [...S, e];
190
188
  return;
191
189
  }
192
- }, xe = (e) => f.value[e]?.disabled, c = {
193
- activeIndex: d,
194
- options: f,
190
+ }, De = (e) => y.value[e]?.disabled, s = {
191
+ activeIndex: v,
192
+ options: y,
195
193
  selectedOption: n,
196
- labelRef: U,
194
+ labelRef: j,
197
195
  activeOption: E,
198
196
  listRef: w,
199
197
  clearable: l.clearable,
200
- type: ce.input ? _.Search : _.Dropdown,
198
+ type: se.input ? L.Search : L.Dropdown,
201
199
  mode: l.multi ? T.Multi : T.Single,
202
- query: O,
203
- selectedValue: J,
204
- toggle: m,
200
+ query: h,
201
+ selectedValue: Z,
202
+ toggle: A,
205
203
  disabled: l.disabled,
206
- open: g,
204
+ open: O,
207
205
  mandatory: l.mandatory,
208
206
  size: l.size,
209
207
  placeholder: l.placeholder,
210
208
  select: k,
211
209
  clearSelection: () => {
212
- M(""), n.value = c.mode === T.Single ? null : [], s.value = c.mode === T.Single ? null : [], h.value && (h.value.value = "");
210
+ _(""), n.value = s.mode === T.Single ? null : [], d.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
213
211
  },
214
- search: M,
212
+ search: _,
215
213
  goToOption: async (e) => {
216
- if (!g.value)
214
+ if (!O.value)
217
215
  return;
218
- let t = d.value + e;
219
- const u = f.value.filter(
220
- (v) => v.disabled
221
- ).length, y = o.value.length - u;
222
- for (t > y && (t = y + 1); ; ) {
223
- if (!f.value[t]?.disabled) {
224
- E.value = o.value[t], d.value = t;
216
+ let t = v.value + e;
217
+ const i = y.value.filter(
218
+ (u) => u.disabled
219
+ ).length, S = o.value.length - i;
220
+ for (t > S && (t = S + 1); ; ) {
221
+ if (!y.value[t]?.disabled) {
222
+ E.value = o.value[t], v.value = t;
225
223
  return;
226
224
  }
227
- if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!xe(d.value)) {
228
- E.value = o.value[t], d.value = t;
225
+ if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!De(v.value)) {
226
+ E.value = o.value[t], v.value = t;
229
227
  return;
230
228
  }
231
229
  }
232
230
  },
233
231
  registerInput: (e) => {
234
- h.value = e.value;
232
+ m.value = e.value;
235
233
  },
236
- registerOption: (e, t, u) => {
237
- f.value = [...f.value, { id: e, disabled: t, hasSubtitle: u }];
234
+ registerOption: (e, t, i) => {
235
+ y.value = [...y.value, { id: e, disabled: t, hasSubtitle: i }];
238
236
  },
239
237
  unRegisterOption(e) {
240
- f.value = f.value.filter((t) => t.id !== e);
238
+ y.value = y.value.filter((t) => t.id !== e);
241
239
  }
242
240
  };
243
- Ge(qe, c), le(
241
+ Ge(Xe, s), ne(
244
242
  w,
245
243
  () => {
246
- g.value && p();
244
+ O.value && te();
247
245
  },
248
246
  {
249
247
  ignore: [
250
248
  I,
251
- q,
252
- $,
253
- j,
254
- h,
255
- F.ref
249
+ z,
250
+ W,
251
+ J,
252
+ m,
253
+ V.ref
256
254
  ]
257
255
  }
258
256
  );
259
- const De = () => {
260
- h.value && (h.value.value = c.query.value = "");
257
+ const Me = () => {
258
+ m.value && (m.value.value = s.query.value = "");
261
259
  };
262
- He(async () => {
263
- l.autoFocus && (await N(), setTimeout(() => {
264
- L.value.focus();
265
- })), c.goToOption(0);
260
+ Le(async () => {
261
+ l.autoFocus && (await K(), setTimeout(() => {
262
+ $.value.focus();
263
+ })), s.goToOption(0), l.multi && !B && (l.groupedOptions ? D.value = q(
264
+ o,
265
+ a
266
+ ) : D.value = l.options.length === l.selected.length);
266
267
  });
267
- const Ce = () => {
268
- X.value = K.value, n.value = a.value, Array.isArray(n.value) && (s.value = P(n.value).slice()), S("apply", n.value), m(!1), De();
269
- }, p = () => {
270
- Q.value && Array.isArray(s.value) && (n.value = P(s.value).slice()), O.value = "", m(!1);
268
+ const le = () => {
269
+ l.multi && (D.value = M.value, n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice())), f("apply", n.value), f("allSelectedChanged", M.value), A(!1), Me();
270
+ }, te = () => {
271
+ F.value && Array.isArray(d.value) && (n.value = P(d.value).slice()), h.value = "", A(!1);
271
272
  }, Ne = (e) => {
272
273
  if (!l.disableKeyboardEvents)
273
274
  switch (e.key) {
@@ -275,103 +276,109 @@ const ll = (l, S, A) => {
275
276
  case "Enter":
276
277
  case "ArrowUp":
277
278
  case "ArrowDown":
278
- m(!0), e.preventDefault();
279
+ A(!0), e.preventDefault();
279
280
  }
280
- }, Re = (e) => {
281
+ }, Ce = (e) => {
281
282
  if (!l.disableKeyboardEvents)
282
283
  switch (e.key) {
283
284
  case "ArrowUp": {
284
- c.goToOption(
285
+ s.goToOption(
285
286
  -1
286
287
  /* Previous */
287
288
  ), e.preventDefault(), e.stopPropagation();
288
289
  break;
289
290
  }
290
291
  case "ArrowDown": {
291
- c.goToOption(
292
+ s.goToOption(
292
293
  1
293
294
  /* Next */
294
295
  ), e.preventDefault(), e.stopPropagation();
295
296
  break;
296
297
  }
297
298
  case "Escape": {
298
- m(!1), e.preventDefault();
299
+ A(!1), e.preventDefault();
299
300
  break;
300
301
  }
301
302
  case "PageUp": {
302
- c.goToOption(
303
+ s.goToOption(
303
304
  10
304
305
  /* NextPage */
305
306
  ), e.preventDefault();
306
307
  break;
307
308
  }
308
309
  case "PageDown": {
309
- c.goToOption(
310
+ s.goToOption(
310
311
  -10
311
312
  /* PrevPage */
312
313
  ), e.preventDefault();
313
314
  break;
314
315
  }
315
316
  case "Enter": {
316
- if (!g.value) {
317
- m(!0);
317
+ if (!O.value) {
318
+ A(!0);
318
319
  return;
319
320
  }
320
- k(o.value[d.value], d.value), c.mode === T.Single && !l.keepOpen && m(!1), e.preventDefault();
321
+ k(o.value[v.value], v.value), s.mode === T.Single && !l.keepOpen && A(!1), e.preventDefault();
321
322
  break;
322
323
  }
323
324
  }
324
- }, Ee = r(() => {
325
+ }, Ke = c(() => {
325
326
  if (l.loading)
326
327
  return 8.5;
327
- const e = l.customNumberOfDisplayedOptions || Z.value.reduce((V, Ke) => {
328
- const Me = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Ke.data) : 1;
329
- return V + Me;
330
- }, 0), t = l.multi && l.showSelectAll && !O.value ? 1 : 0, u = e > A.MAX_NUMBER_OF_OPTIONS, y = e + t;
331
- let v = u ? A.MAX_NUMBER_OF_OPTIONS + 0.1 : y;
332
- return l.noResultsText && v === 0 && (v = v + 1), $e(
333
- v * Y.value + A.PADDING_PX
328
+ const e = l.loadMoreLoading && g.MAX_NUMBER_OF_OPTIONS || l.customNumberOfDisplayedOptions || ee.value.reduce((G, Re) => {
329
+ const Ee = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Re.data) : 1;
330
+ return G + Ee;
331
+ }, 0), t = l.multi && l.showSelectAll && !h.value ? 1 : 0, i = e > g.MAX_NUMBER_OF_OPTIONS, S = e + t;
332
+ let u = i ? g.MAX_NUMBER_OF_OPTIONS + 0.1 : S;
333
+ return l.loadMoreLoading && l.multi && (u = u - 0.9), l.noResultsText && u === 0 && (u = u + 1), l.withConditions && h.value && (u = u + 1), $e(
334
+ u * p.value + g.PADDING_PX
334
335
  );
335
336
  });
336
- return {
337
- onKeydown: Re,
338
- location: de,
339
- open: g,
340
- toggleMenu: m,
337
+ return qe(
338
+ V.ref,
339
+ () => {
340
+ !l.loadMoreLoading && l.infiniteLoading && f("loadMore");
341
+ },
342
+ { distance: l.infiniteScrollThreshold }
343
+ ), {
344
+ onKeydown: Ce,
345
+ location: fe,
346
+ open: O,
347
+ toggleMenu: A,
341
348
  onButtonKeydown: Ne,
342
349
  displayedValue: me,
343
- labelRef: U,
344
- query: O,
345
- containerProps: F,
346
- calculateTableHeight: Ee,
347
- wrapperProps: Pe,
350
+ labelRef: j,
351
+ query: h,
352
+ containerProps: V,
353
+ calculateTableHeight: Ke,
354
+ wrapperProps: Te,
348
355
  filteredOptions: o,
349
- allSelected: K,
350
- allSelectedApplied: X,
351
- isIndeterminate: Se,
352
- onSelectAll: we,
353
- virtualOptions: Z,
354
- isSelected: oe,
356
+ allSelected: M,
357
+ allSelectedApplied: D,
358
+ isIndeterminate: Ae,
359
+ onSelectAll: Ie,
360
+ virtualOptions: ee,
361
+ isSelected: ce,
355
362
  selectedOption: n,
356
- selectedOptionPrevious: s,
357
- selectedValue: J,
363
+ selectedOptionPrevious: d,
364
+ selectedValue: Z,
358
365
  onSelect: k,
359
- activeIndex: d,
360
- onCancel: p,
361
- onApply: Ce,
366
+ activeIndex: v,
367
+ onCancel: te,
368
+ onApply: le,
362
369
  scrollTo: C,
363
- onClickOutside: le,
370
+ onClickOutside: ne,
364
371
  listRef: w,
365
372
  buttonRef: I,
366
- apply: q,
367
- cancel: $,
368
- el: L,
369
- triggerRef: se,
370
- clearAll: j,
371
- onClearAllSelections: Ie,
372
- isGroup: H
373
+ apply: z,
374
+ cancel: W,
375
+ el: $,
376
+ triggerRef: de,
377
+ clearAll: J,
378
+ onClearAllSelections: xe,
379
+ isGroup: U
373
380
  };
374
381
  };
375
382
  export {
376
- ll as dropdownCommon
383
+ tl as dropdownCommon
377
384
  };
@@ -186,6 +186,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
186
186
  skidding: number;
187
187
  modelValue: any;
188
188
  selected: any;
189
+ valueToCopy: string;
189
190
  placeholder: string;
190
191
  autoFocus: boolean;
191
192
  multi: boolean;
@@ -197,9 +198,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
197
198
  inlineSearch: boolean;
198
199
  onSearch: (option: any, term: string) => boolean;
199
200
  noResultsText: string;
200
- valueToCopy: string;
201
- helperText: string;
202
201
  searchPlaceholder: string;
202
+ helperText: string;
203
203
  showButtonOnOpen: boolean;
204
204
  clearable: boolean;
205
205
  multiOptionsPlaceholderPrefix: string;