@ironsource/shared-ui 2.1.6-test.13 → 2.1.6-test.15

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 (112) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_06e0871a_lang.css +1 -0
  2. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css +1 -0
  3. package/ChipV4.vue_vue_type_style_index_0_scoped_12c0f396_lang.css +1 -0
  4. package/DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css +1 -0
  5. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +1 -0
  6. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +1 -0
  7. package/DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css +1 -0
  8. package/FoldableSection.vue_vue_type_style_index_0_scoped_1a5f0e2e_lang.css +1 -0
  9. package/HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css +1 -0
  10. package/IconV4.vue_vue_type_style_index_0_scoped_9d3c9cda_lang.css +1 -0
  11. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +1 -0
  12. package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
  13. package/README.md +35 -0
  14. package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +1 -0
  15. package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +1 -0
  16. package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +1 -0
  17. package/components/alert/Alert.vue.d.ts +28 -0
  18. package/components/alert/Alert.vue.js +4 -4
  19. package/components/alert/Alert.vue2.js +67 -46
  20. package/components/alert/index.d.ts +104 -2
  21. package/components/autocomplete/Autocomplete.vue.d.ts +1 -0
  22. package/components/autocomplete/Autocomplete.vue2.js +6 -5
  23. package/components/autocomplete/index.d.ts +1 -0
  24. package/components/button/v4/ButtonV4.vue.d.ts +7 -7
  25. package/components/button/v4/IconButtonV4.vue.d.ts +4 -4
  26. package/components/button/v4/index.d.ts +61 -61
  27. package/components/chip/v4/Chip.types.d.ts +6 -0
  28. package/components/chip/v4/ChipV4.vue.d.ts +28 -35
  29. package/components/chip/v4/ChipV4.vue.js +3 -3
  30. package/components/chip/v4/ChipV4.vue2.js +28 -59
  31. package/components/chip/v4/index.d.ts +45 -148
  32. package/components/datePicker/common/DatePicker.common.js +14 -14
  33. package/components/datePicker/v4/DatePickerV4.vue2.js +3 -2
  34. package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
  35. package/components/dateRange/v4/DateRangeV4.vue2.js +4 -3
  36. package/components/dialog/v3/Dialog.vue.d.ts +1 -1
  37. package/components/dialog/v3/index.d.ts +20 -20
  38. package/components/dropdown/common/Dropdown.common.js +80 -75
  39. package/components/dropdown/common/Option.common.d.ts +1 -1
  40. package/components/dropdown/common/Option.common.js +9 -9
  41. package/components/dropdown/composables/useChildOptions.d.ts +7 -0
  42. package/components/dropdown/composables/useChildOptions.js +14 -0
  43. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +14 -3
  44. package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
  45. package/components/dropdown/v4/AppDropdownTrigger.vue2.js +102 -61
  46. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +8 -3
  47. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  48. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +22 -21
  49. package/components/dropdown/v4/DropdownV4.vue.d.ts +22 -6
  50. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  51. package/components/dropdown/v4/DropdownV4.vue2.js +81 -73
  52. package/components/dropdown/v4/OptionV4.vue.d.ts +6 -6
  53. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  54. package/components/dropdown/v4/OptionV4.vue2.js +51 -45
  55. package/components/dropdown/v4/TreeDropdown.vue.d.ts +112 -0
  56. package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
  57. package/components/dropdown/v4/TreeDropdown.vue2.js +122 -0
  58. package/components/dropdown/v4/dropdownStoryArgs.d.ts +1 -1
  59. package/components/dropdown/v4/index.d.ts +332 -49
  60. package/components/dropdown/v4/index.js +7 -4
  61. package/components/emptyState/v3/EmptyState.vue.d.ts +2 -2
  62. package/components/emptyState/v3/index.d.ts +47 -47
  63. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
  64. package/components/emptyState/v4/index.d.ts +7 -7
  65. package/components/icon/v4/Icon.types.d.ts +1 -1
  66. package/components/icon/v4/IconV4.vue.d.ts +16 -6
  67. package/components/icon/v4/IconV4.vue.js +4 -4
  68. package/components/icon/v4/IconV4.vue2.js +36 -33
  69. package/components/icon/v4/index.d.ts +53 -15
  70. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  71. package/components/inlineCopy/InlineCopy.vue2.js +1 -1
  72. package/components/layout/FoldableSection.vue.js +5 -5
  73. package/components/layout/FoldableSection.vue2.js +1 -1
  74. package/components/multibar/MultiBarMenu.vue2.js +12 -11
  75. package/components/snackbar/v4/SnackbarV4.vue.d.ts +20 -20
  76. package/components/table/common/Table.common.d.ts +1 -0
  77. package/components/table/common/Table.common.js +65 -61
  78. package/components/table/v4/DataGrid.vue.d.ts +5 -1
  79. package/components/table/v4/DataGrid.vue.js +3 -3
  80. package/components/table/v4/DataGrid.vue2.js +166 -162
  81. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  82. package/components/table/v4/HelpIcon.vue.js +5 -5
  83. package/components/table/v4/HelpIcon.vue2.js +5 -5
  84. package/components/table/v4/index.d.ts +16 -4
  85. package/components/textArea/v4/TextAreaV4.vue.js +3 -3
  86. package/components/textArea/v4/TextAreaV4.vue2.js +1 -1
  87. package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
  88. package/components/toggle/v4/ToggleV4.vue.js +3 -3
  89. package/components/toggle/v4/ToggleV4.vue2.js +12 -12
  90. package/components/toggle/v4/index.d.ts +20 -20
  91. package/composables/useFormValidation.js +19 -13
  92. package/design-foundation.stories/icons/iconsData.d.ts +5 -1
  93. package/index.d.ts +1091 -632
  94. package/mocks/apps.d.ts +1 -0
  95. package/mocks/options.d.ts +12 -0
  96. package/package.json +1 -1
  97. package/utils/text.d.ts +1 -0
  98. package/utils/text.js +9 -0
  99. package/Alert.vue_vue_type_style_index_0_scoped_d6680a72_lang.css +0 -1
  100. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_39c47ad1_lang.css +0 -1
  101. package/ChipV4.vue_vue_type_style_index_0_scoped_78d7c9c0_lang.css +0 -1
  102. package/DataGrid.vue_vue_type_style_index_0_scoped_6df3b70f_lang.css +0 -1
  103. package/DateRangeV4.vue_vue_type_style_index_0_scoped_1cc45a5d_lang.css +0 -1
  104. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css +0 -1
  105. package/DropdownV4.vue_vue_type_style_index_0_scoped_0363db63_lang.css +0 -1
  106. package/FoldableSection.vue_vue_type_style_index_0_scoped_8d0fd203_lang.css +0 -1
  107. package/HelpIcon.vue_vue_type_style_index_0_scoped_7a611779_lang.css +0 -1
  108. package/IconV4.vue_vue_type_style_index_0_scoped_a78f8a3e_lang.css +0 -1
  109. package/InlineCopy.vue_vue_type_style_index_0_scoped_6a7b3795_lang.css +0 -1
  110. package/OptionV4.vue_vue_type_style_index_0_scoped_e0c24b6a_lang.css +0 -1
  111. package/TextAreaV4.vue_vue_type_style_index_0_scoped_8199b662_lang.css +0 -1
  112. package/ToggleV4.vue_vue_type_style_index_0_scoped_ad231e8c_lang.css +0 -1
@@ -1,38 +1,38 @@
1
- import { useToggle as me } from "../../../composables/useToggle.js";
2
- import { ref as n, computed as r, watch as P, useSlots as Pe, toRaw as A, nextTick as D, provide as Te, onMounted as we } from "vue";
1
+ import { useToggle as we } from "../../../composables/useToggle.js";
2
+ import { ref as n, computed as r, watch as m, useSlots as Ie, toRaw as O, nextTick as C, provide as xe, onMounted as De } 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 m, Type as _, DropdownContext as Ne } from "./DropdownContext.js";
7
- import { pxToRem as Re } from "../../../utils/style.js";
8
- import { useEditableContext as Ee } from "../../table-cells/common/EditableContext.js";
9
- const Ue = (l, O, b) => {
10
- const Z = (e, t) => l.multi ? W(e, t) : A(e) === t;
11
- let k;
4
+ import { objectsEqual as Ce } from "../../../utils/object.js";
5
+ import { useClamp as Ne, useVirtualList as Re, onClickOutside as Y } from "@vueuse/core";
6
+ import { Mode as P, Type as V, DropdownContext as Ee } from "./DropdownContext.js";
7
+ import { pxToRem as Me } from "../../../utils/style.js";
8
+ import { useEditableContext as Ve } from "../../table-cells/common/EditableContext.js";
9
+ const Ke = (l, A, b) => {
10
+ const Z = (e, t) => l.multi ? W(e, t) : O(e) === t;
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
- ), N = Ee(), u = r({
17
+ ), N = Ve(), u = r({
18
18
  get() {
19
19
  return N?.value?.value ?? a.value;
20
20
  },
21
21
  set(e) {
22
- N.onChange?.(e), N.onClose?.(), O("update:selected", e);
22
+ N.onChange?.(e), N.onClose?.(), A("update:selected", e);
23
23
  }
24
24
  });
25
- P(
25
+ m(
26
26
  () => l.selected,
27
27
  () => {
28
28
  a.value = l.selected, v.value = l.selected;
29
29
  }
30
30
  );
31
- const p = Pe(), T = n(null), g = n(null), V = n(null), R = n(null), H = n(null), w = n(null), F = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => w.value ? w.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), I = n(""), v = n(l.selected || []), q = () => w.value?.focus(), [d, te, ae] = me({
31
+ const F = Ie(), w = n(null), g = n(null), k = n(null), R = 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] = we({
32
32
  disabled: l.disabled,
33
33
  initialValue: l.defaultOpen
34
34
  });
35
- P(
35
+ m(
36
36
  () => l.disabled,
37
37
  (e) => {
38
38
  e !== void 0 && ae(e);
@@ -45,9 +45,9 @@ const Ue = (l, O, b) => {
45
45
  return l.isOpen;
46
46
  },
47
47
  set(e) {
48
- O("update:isOpen", e);
48
+ A("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 = Ne(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 ?? ""}`;
@@ -61,55 +61,57 @@ const Ue = (l, O, b) => {
61
61
  if (Array.isArray(a.value))
62
62
  return a.value.length === s.value.length;
63
63
  }), oe = r(() => !l.multi || !Array.isArray(a.value) ? !1 : a.value.length > 0 && a.value.length < s.value.length), E = (e) => {
64
- I.value = e;
64
+ T.value = e;
65
65
  }, se = r(() => {
66
- const e = A(v.value), t = {
66
+ const e = O(v.value), t = {
67
67
  selected: [],
68
68
  notSelected: []
69
69
  };
70
- return A(l.options).forEach((y) => {
70
+ return O(l.options).forEach((y) => {
71
71
  const f = e.includes(y) ? "selected" : "notSelected";
72
72
  t[f].push(y);
73
73
  }), [].concat(t.selected, t.notSelected);
74
74
  }), s = r(() => {
75
75
  const e = Array.isArray(v.value) && l.multi && b.VERSION === 4 ? se.value : l.options;
76
- return l.onSearch ? e.filter((t) => l.onSearch(t, I.value)) : e;
77
- }), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode === m.Multi), j = r(
76
+ return l.onSearch ? e.filter((t) => l.onSearch(t, T.value)) : e;
77
+ }), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode === P.Multi), j = r(
78
78
  () => ce.value ? b.MULTILINE_LIST_HEIGHT : b.LIST_HEIGHT
79
79
  ), {
80
80
  list: z,
81
81
  containerProps: J,
82
82
  wrapperProps: ve,
83
- scrollTo: M
84
- } = De(s, {
83
+ scrollTo: D
84
+ } = Re(s, {
85
85
  itemHeight: j.value,
86
- overscan: 2
86
+ overscan: l.disableVirtualScroll ? 1 / 0 : 2
87
87
  });
88
- P(
88
+ m(
89
89
  () => l.isOpen,
90
90
  (e) => {
91
91
  G(e);
92
92
  }
93
- ), P([x], async () => {
94
- await D();
95
- }), P(
93
+ ), m([x], async () => {
94
+ await C();
95
+ }), m(
96
96
  [d, o, x],
97
97
  async ([e], [t]) => {
98
- d.value && (await D(), x.value !== -1 && e !== t && setTimeout(() => {
99
- l.multi && b.VERSION === 4 || M(x.value);
98
+ d.value && (await C(), x.value !== -1 && e !== t && setTimeout(() => {
99
+ l.multi && b.VERSION === 4 || D(x.value);
100
100
  }), o.value && setTimeout(() => {
101
- M(o.value);
101
+ D(o.value);
102
102
  }));
103
103
  }
104
- );
104
+ ), m(T, () => {
105
+ D(0);
106
+ });
105
107
  const h = (e, t = !1) => {
106
- l.disabled || (G(e), D(() => {
107
- d.value && O("opened"), d.value || O("closed"), T.value && t && T.value.focus();
108
+ l.disabled || (G(e), C(() => {
109
+ d.value && A("opened"), d.value || A("closed"), w.value && t && w.value.focus();
108
110
  }));
109
111
  };
110
- P(d, (e) => {
112
+ m(d, (e) => {
111
113
  if (e) {
112
- X.value && Array.isArray(u.value) && (v.value = A(u.value).slice());
114
+ X.value && Array.isArray(u.value) && (v.value = O(u.value).slice());
113
115
  return;
114
116
  }
115
117
  q();
@@ -124,29 +126,29 @@ const Ue = (l, O, b) => {
124
126
  a.value = [];
125
127
  return;
126
128
  }
127
- a.value = s.value, O("selectAll");
129
+ a.value = s.value, A("selectAll");
128
130
  }
129
131
  }, fe = () => {
130
132
  de(), b.VERSION !== 4 && (u.value = a.value);
131
133
  }, ge = (e = !0) => {
132
- a.value = [], e && (u.value = [], v.value = [], O("clear"));
133
- }, C = (e, t) => {
134
- if (e = A(e), c.value[t]?.disabled)
134
+ a.value = [], e && (u.value = [], v.value = []), A("clear");
135
+ }, M = (e, t) => {
136
+ if (e = O(e), c.value[t]?.disabled)
135
137
  return;
136
- if (x.value = t, i.mode !== m.Multi) {
138
+ if (x.value = t, i.mode !== P.Multi) {
137
139
  l.keepOpen || h(!1), i.goToOption(
138
140
  0
139
141
  /* None */
140
- ), u.value = e, E(""), q(), i.type === _.Search && g.value && (g.value.value = l.displayValue(e));
142
+ ), u.value = e, E(""), q(), i.type === V.Search && g.value && (g.value.value = l.displayValue(e));
141
143
  return;
142
144
  }
143
145
  if (!Array.isArray(a.value))
144
146
  return;
145
147
  g.value?.focus();
146
- const S = A(a.value);
148
+ const S = O(a.value);
147
149
  if (W(S, e)) {
148
150
  a.value = S.filter(
149
- (f) => !xe(f, e)
151
+ (f) => !Ce(f, e)
150
152
  );
151
153
  return;
152
154
  } else {
@@ -159,11 +161,11 @@ const Ue = (l, O, b) => {
159
161
  selectedOption: u,
160
162
  labelRef: H,
161
163
  activeOption: R,
162
- listRef: T,
164
+ listRef: w,
163
165
  clearable: l.clearable,
164
- type: p.input ? _.Search : _.Dropdown,
165
- mode: l.multi ? m.Multi : m.Single,
166
- query: I,
166
+ type: F.input ? V.Search : V.Dropdown,
167
+ mode: l.multi ? P.Multi : P.Single,
168
+ query: T,
167
169
  selectedValue: K,
168
170
  toggle: h,
169
171
  disabled: l.disabled,
@@ -171,9 +173,9 @@ const Ue = (l, O, b) => {
171
173
  mandatory: l.mandatory,
172
174
  size: l.size,
173
175
  placeholder: l.placeholder,
174
- select: C,
176
+ select: M,
175
177
  clearSelection: () => {
176
- E(""), u.value = i.mode === m.Single ? null : [], v.value = i.mode === m.Single ? null : [], g.value && (g.value.value = "");
178
+ E(""), u.value = i.mode === P.Single ? null : [], v.value = i.mode === P.Single ? null : [], g.value && (g.value.value = "");
177
179
  },
178
180
  search: E,
179
181
  goToOption: async (e) => {
@@ -204,14 +206,14 @@ const Ue = (l, O, b) => {
204
206
  c.value = c.value.filter((t) => t.id !== e);
205
207
  }
206
208
  };
207
- Te(Ne, i), Y(
208
- T,
209
+ xe(Ee, i), Y(
210
+ w,
209
211
  () => {
210
212
  d.value && Q();
211
213
  },
212
214
  {
213
215
  ignore: [
214
- w,
216
+ I,
215
217
  B,
216
218
  L,
217
219
  U,
@@ -223,15 +225,15 @@ const Ue = (l, O, b) => {
223
225
  const ye = () => {
224
226
  g.value && (g.value.value = i.query.value = "");
225
227
  };
226
- we(async () => {
227
- l.autoFocus && (await D(), setTimeout(() => {
228
- V.value.focus();
228
+ De(async () => {
229
+ l.autoFocus && (await C(), setTimeout(() => {
230
+ k.value.focus();
229
231
  })), i.goToOption(0);
230
232
  });
231
233
  const Se = () => {
232
- u.value = a.value, Array.isArray(u.value) && (v.value = A(u.value).slice()), O("apply", u.value), h(!1), ye();
234
+ u.value = a.value, Array.isArray(u.value) && (v.value = O(u.value).slice()), A("apply", u.value), h(!1), ye();
233
235
  }, Q = () => {
234
- X.value && Array.isArray(v.value) && (u.value = A(v.value).slice()), I.value = "", h(!1);
236
+ X.value && Array.isArray(v.value) && (u.value = O(v.value).slice()), T.value = "", h(!1);
235
237
  }, be = (e) => {
236
238
  if (!l.disableKeyboardEvents)
237
239
  switch (e.key) {
@@ -241,7 +243,7 @@ const Ue = (l, O, b) => {
241
243
  case "ArrowDown":
242
244
  h(!0), e.preventDefault();
243
245
  }
244
- }, Ae = (e) => {
246
+ }, Oe = (e) => {
245
247
  if (!l.disableKeyboardEvents)
246
248
  switch (e.key) {
247
249
  case "ArrowUp": {
@@ -281,28 +283,31 @@ const Ue = (l, O, b) => {
281
283
  h(!0);
282
284
  return;
283
285
  }
284
- C(s.value[o.value], o.value), i.mode === m.Single && !l.keepOpen && h(!1), e.preventDefault();
286
+ M(s.value[o.value], o.value), i.mode === P.Single && !l.keepOpen && h(!1), e.preventDefault();
285
287
  break;
286
288
  }
287
289
  }
288
- }, Oe = r(() => {
289
- const e = z.value.length, t = l.multi && l.showSelectAll ? 1 : 0, y = e > b.MAX_NUMBER_OF_OPTIONS, S = e + t;
290
+ }, Ae = r(() => {
291
+ const e = z.value.reduce((me, Pe) => {
292
+ const Te = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Pe.data) : 1;
293
+ return me + Te;
294
+ }, 0), t = l.multi && l.showSelectAll ? 1 : 0, y = e > b.MAX_NUMBER_OF_OPTIONS, S = e + t;
290
295
  let f = y ? b.MAX_NUMBER_OF_OPTIONS + 0.1 : S;
291
- return l.noResultsText && f === 0 && (f = f + 1), Re(
296
+ return l.noResultsText && f === 0 && (f = f + 1), Me(
292
297
  f * j.value + b.PADDING_PX
293
298
  );
294
299
  });
295
300
  return {
296
- onKeydown: Ae,
301
+ onKeydown: Oe,
297
302
  location: le,
298
303
  open: d,
299
304
  toggleMenu: h,
300
305
  onButtonKeydown: be,
301
306
  displayedValue: re,
302
307
  labelRef: H,
303
- query: I,
308
+ query: T,
304
309
  containerProps: J,
305
- calculateTableHeight: Oe,
310
+ calculateTableHeight: Ae,
306
311
  wrapperProps: ve,
307
312
  filteredOptions: s,
308
313
  allSelected: $,
@@ -313,22 +318,22 @@ const Ue = (l, O, b) => {
313
318
  selectedOption: u,
314
319
  selectedOptionPrevious: v,
315
320
  selectedValue: K,
316
- onSelect: C,
321
+ onSelect: M,
317
322
  activeIndex: o,
318
323
  onCancel: Q,
319
324
  onApply: Se,
320
- scrollTo: M,
325
+ scrollTo: D,
321
326
  onClickOutside: Y,
322
- listRef: T,
323
- buttonRef: w,
327
+ listRef: w,
328
+ buttonRef: I,
324
329
  apply: B,
325
330
  cancel: L,
326
- el: V,
327
- triggerRef: F,
331
+ el: k,
332
+ triggerRef: p,
328
333
  clearAll: U,
329
334
  onClearAllSelections: ge
330
335
  };
331
336
  };
332
337
  export {
333
- Ue as dropdownCommon
338
+ Ke as dropdownCommon
334
339
  };
@@ -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 c = (s, t) => {
2
+ const l = (e) => e && e[t] ? e[t] : [], r = (e) => l(e)?.length > 0;
3
+ return {
4
+ hasChildren: r,
5
+ getChildren: l,
6
+ someChildrenSelected: (e) => r(e) ? l(e).some((n) => s.value.includes(n)) : !1,
7
+ allChildrenSelected: (e) => r(e) ? l(e).every(
8
+ (n) => s.value.includes(n)
9
+ ) : !1
10
+ };
11
+ };
12
+ export {
13
+ c as useChildOptions
14
+ };
@@ -17,7 +17,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
17
17
  optionNameKey?: string;
18
18
  optionImageKey?: string;
19
19
  optionIconKey?: string;
20
- optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
20
+ optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
21
+ optionEndIconKey?: string;
22
+ optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
21
23
  }>, {
22
24
  placeholder: string;
23
25
  selectedOption: any;
@@ -41,6 +43,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
41
43
  optionImageKey: any;
42
44
  optionIconKey: any;
43
45
  optionIconType: any;
46
+ optionEndIconKey: any;
47
+ optionEndIconType: any;
44
48
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
49
  click: () => void;
46
50
  copyToClipboard: () => void;
@@ -63,7 +67,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
63
67
  optionNameKey?: string;
64
68
  optionImageKey?: string;
65
69
  optionIconKey?: string;
66
- optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
70
+ optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
71
+ optionEndIconKey?: string;
72
+ optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
67
73
  }>, {
68
74
  placeholder: string;
69
75
  selectedOption: any;
@@ -87,6 +93,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
87
93
  optionImageKey: any;
88
94
  optionIconKey: any;
89
95
  optionIconType: any;
96
+ optionEndIconKey: any;
97
+ optionEndIconType: any;
90
98
  }>>> & {
91
99
  onClick?: () => any;
92
100
  onCopyToClipboard?: () => any;
@@ -105,13 +113,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
105
113
  optionNameKey: string;
106
114
  optionIconKey: string;
107
115
  optionImageKey: string;
108
- optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
116
+ optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
117
+ optionEndIconKey: string;
118
+ optionEndIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
109
119
  valueToCopy: string;
110
120
  selectedOption: any;
111
121
  brandIconType: "android" | "ios";
112
122
  }>, {
113
123
  image?(_: {}): any;
114
124
  "icon-start"?(_: {}): any;
125
+ "icon-end"?(_: {}): any;
115
126
  }>;
116
127
  export default _default;
117
128
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./AppDropdownTrigger.vue2.js";
2
- /* empty css */import p from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../AppDropdownTrigger.vue_vue_type_style_index_0_scoped_39c47ad1_lang.css"; //*');
4
- const s = /* @__PURE__ */ p(o, [["__scopeId", "data-v-39c47ad1"]]);
2
+ /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-858cefbf"]]);
5
5
  export {
6
6
  s as default
7
7
  };