@ironsource/shared-ui 2.1.11-rc.19 → 2.1.11-rc.20

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.
@@ -36,10 +36,10 @@ const ll = (l, A, O) => {
36
36
  b(
37
37
  () => l.selected,
38
38
  () => {
39
- a.value = l.selected, v.value = l.selected;
39
+ a.value = l.selected, d.value = l.selected;
40
40
  }
41
41
  );
42
- const se = _e(), w = i(null), m = i(null), $ = i(null), E = i(null), j = i(null), I = i(null), ve = i(), X = i(null), z = i(null), W = i(null), de = 8, fe = c(() => I.value ? I.value.getBoundingClientRect().height + de + l.distance : 0), D = i(!1), f = i([]), x = i(-1), g = i(""), v = i(l.selected || []), J = () => I.value?.focus(), [y, ge, ye] = Ve({
42
+ const se = _e(), w = i(null), m = i(null), $ = i(null), E = i(null), j = i(null), I = i(null), de = i(), X = i(null), z = i(null), W = i(null), ve = 8, fe = c(() => I.value ? I.value.getBoundingClientRect().height + ve + l.distance : 0), D = i(!1), f = i([]), x = i(-1), g = i(""), d = i(l.selected || []), J = () => I.value?.focus(), [y, ge, ye] = Ve({
43
43
  disabled: l.disabled,
44
44
  initialValue: l.defaultOpen
45
45
  });
@@ -58,7 +58,7 @@ const ll = (l, A, O) => {
58
58
  set(e) {
59
59
  A("update:isOpen", e);
60
60
  }
61
- }), Oe = c(() => r.value.length - 1), d = Le(0, 0, Oe), Y = c(() => n.value ? l.displayValue(n.value) : ""), me = (e) => {
61
+ }), Oe = c(() => r.value.length - 1), v = Le(0, 0, Oe), Y = c(() => n.value ? l.displayValue(n.value) : ""), me = (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 ?? ""}`;
@@ -79,7 +79,7 @@ const ll = (l, A, O) => {
79
79
  }, K = c(() => l.groupedOptions ? ue(l.options) : l.options), be = c(() => {
80
80
  if (oe(
81
81
  K,
82
- v
82
+ d
83
83
  ))
84
84
  return K.value;
85
85
  const e = {
@@ -87,15 +87,15 @@ const ll = (l, A, O) => {
87
87
  notSelected: []
88
88
  };
89
89
  P(K).value.forEach((u) => {
90
- const o = (l.comparingKey ? v.value.findIndex(
90
+ const o = (l.comparingKey ? d.value.findIndex(
91
91
  (_) => _[l.comparingKey] === u[l.comparingKey]
92
- ) > -1 : v.value.includes(u)) ? "selected" : "notSelected";
92
+ ) > -1 : d.value.includes(u)) ? "selected" : "notSelected";
93
93
  e[o].push(u);
94
94
  });
95
95
  const t = l.groupedOptions ? B(e.notSelected) : e.notSelected;
96
96
  return [].concat(e.selected, t);
97
97
  }), r = c(() => {
98
- const e = Array.isArray(v.value) && l.multi && O.VERSION === 4 && !H ? be.value : K.value;
98
+ const e = Array.isArray(d.value) && l.multi && O.VERSION === 4 && !H ? be.value : K.value;
99
99
  if (l.onSearch) {
100
100
  const t = e.filter((u) => l.groupedOptions && L(u) ? u : l.onSearch(u, g.value));
101
101
  return l.groupedOptions ? B(t) : t;
@@ -120,12 +120,12 @@ const ll = (l, A, O) => {
120
120
  ), b([x], async () => {
121
121
  await N();
122
122
  }), b(
123
- [y, d, x],
123
+ [y, v, x],
124
124
  async ([e], [t]) => {
125
125
  y.value && (await N(), x.value !== -1 && e !== t && setTimeout(() => {
126
126
  l.multi && O.VERSION === 4 || C(x.value);
127
- }), d.value && setTimeout(() => {
128
- C(d.value);
127
+ }), v.value && setTimeout(() => {
128
+ C(v.value);
129
129
  }));
130
130
  }
131
131
  ), b(g, () => {
@@ -138,7 +138,7 @@ const ll = (l, A, O) => {
138
138
  };
139
139
  b(y, (e) => {
140
140
  if (e) {
141
- g.value = "", Z.value && Array.isArray(n.value) && (v.value = P(n.value).slice());
141
+ g.value = "", Z.value && Array.isArray(n.value) && (d.value = P(n.value).slice());
142
142
  return;
143
143
  }
144
144
  J();
@@ -163,7 +163,7 @@ const ll = (l, A, O) => {
163
163
  }, Ie = () => {
164
164
  we(), O.VERSION !== 4 && (n.value = a.value);
165
165
  }, xe = (e = !0) => {
166
- a.value = [], e && (n.value = [], v.value = []), A("clear");
166
+ a.value = [], e && (n.value = [], d.value = []), A("clear");
167
167
  }, k = (e, t) => {
168
168
  if (e = P(e), O.VERSION === 4 ? e[l.disabledOptionKey] : f.value[t]?.disabled)
169
169
  return;
@@ -188,7 +188,7 @@ const ll = (l, A, O) => {
188
188
  return;
189
189
  }
190
190
  }, De = (e) => f.value[e]?.disabled, s = {
191
- activeIndex: d,
191
+ activeIndex: v,
192
192
  options: f,
193
193
  selectedOption: n,
194
194
  labelRef: j,
@@ -207,23 +207,23 @@ const ll = (l, A, O) => {
207
207
  placeholder: l.placeholder,
208
208
  select: k,
209
209
  clearSelection: () => {
210
- V(""), n.value = s.mode === T.Single ? null : [], v.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
210
+ V(""), n.value = s.mode === T.Single ? null : [], d.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
211
211
  },
212
212
  search: V,
213
213
  goToOption: async (e) => {
214
214
  if (!y.value)
215
215
  return;
216
- let t = d.value + e;
216
+ let t = v.value + e;
217
217
  const u = f.value.filter(
218
218
  (o) => o.disabled
219
219
  ).length, h = r.value.length - u;
220
220
  for (t > h && (t = h + 1); ; ) {
221
221
  if (!f.value[t]?.disabled) {
222
- E.value = r.value[t], d.value = t;
222
+ E.value = r.value[t], v.value = t;
223
223
  return;
224
224
  }
225
- if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!De(d.value)) {
226
- E.value = r.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 = r.value[t], v.value = t;
227
227
  return;
228
228
  }
229
229
  }
@@ -260,15 +260,15 @@ const ll = (l, A, O) => {
260
260
  He(async () => {
261
261
  l.autoFocus && (await N(), setTimeout(() => {
262
262
  $.value.focus();
263
- })), s.goToOption(0), l.multi && !H && (l.groupOption ? D.value = U(
263
+ })), s.goToOption(0), l.multi && !H && (l.groupedOptions ? D.value = U(
264
264
  r,
265
265
  a
266
266
  ) : D.value = l.options.length === l.selected.length);
267
267
  });
268
268
  const le = () => {
269
- l.multi && (D.value = M.value, n.value = a.value, Array.isArray(n.value) && (v.value = P(n.value).slice())), A("apply", n.value), S(!1), Ke();
269
+ l.multi && (D.value = M.value, n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice())), A("apply", n.value), S(!1), Ke();
270
270
  }, te = () => {
271
- Z.value && Array.isArray(v.value) && (n.value = P(v.value).slice()), g.value = "", S(!1);
271
+ Z.value && Array.isArray(d.value) && (n.value = P(d.value).slice()), g.value = "", S(!1);
272
272
  }, Ce = (e) => {
273
273
  if (!l.disableKeyboardEvents)
274
274
  switch (e.key) {
@@ -318,7 +318,7 @@ const ll = (l, A, O) => {
318
318
  S(!0);
319
319
  return;
320
320
  }
321
- k(r.value[d.value], d.value), s.mode === T.Single && !l.keepOpen && S(!1), e.preventDefault();
321
+ k(r.value[v.value], v.value), s.mode === T.Single && !l.keepOpen && S(!1), e.preventDefault();
322
322
  break;
323
323
  }
324
324
  }
@@ -354,10 +354,10 @@ const ll = (l, A, O) => {
354
354
  virtualOptions: p,
355
355
  isSelected: ce,
356
356
  selectedOption: n,
357
- selectedOptionPrevious: v,
357
+ selectedOptionPrevious: d,
358
358
  selectedValue: Y,
359
359
  onSelect: k,
360
- activeIndex: d,
360
+ activeIndex: v,
361
361
  onCancel: te,
362
362
  onApply: le,
363
363
  scrollTo: C,
@@ -367,7 +367,7 @@ const ll = (l, A, O) => {
367
367
  apply: X,
368
368
  cancel: z,
369
369
  el: $,
370
- triggerRef: ve,
370
+ triggerRef: de,
371
371
  clearAll: W,
372
372
  onClearAllSelections: xe,
373
373
  isGroup: L
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_lang.css';
1
+ import './AppTrigger.vue_vue_type_style_index_0_scoped_121aac8b_lang.css';
2
2
  import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
3
3
  import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
4
  import { MenuItemTypes as po } from "./components/menuItem/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.11-rc.19",
3
+ "version": "2.1.11-rc.20",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"