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

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.
@@ -0,0 +1 @@
1
+ .v-enter-active[data-v-5c7bcf85],.v-leave-active[data-v-5c7bcf85]{transition:opacity .25s ease}ol[data-v-5c7bcf85],ul[data-v-5c7bcf85],menu[data-v-5c7bcf85]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-5c7bcf85],.dropdown.full-width .button__container[data-v-5c7bcf85]{width:100%}.dropdown-list-wrapper[data-v-5c7bcf85]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-5c7bcf85]{padding:.5rem}.list-container--multi[data-v-5c7bcf85]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-5c7bcf85]{display:flex;gap:4px;padding-bottom:.25rem}.inline-search .inline-search-wrapper .search-container[data-v-5c7bcf85]{width:100%}.inline-search .list-container[data-v-5c7bcf85]{padding-top:0}.no-result-container[data-v-5c7bcf85]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-5c7bcf85]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-5c7bcf85]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-5c7bcf85]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list--with-conditions[data-v-5c7bcf85]{min-height:0;margin-bottom:0}.image-slot[data-v-5c7bcf85]{margin-right:.5rem}.actions-wrapper[data-v-5c7bcf85]{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-5c7bcf85]{margin-left:.5rem}
@@ -0,0 +1 @@
1
+ div[data-v-052bc376]{display:block}
@@ -1,45 +1,45 @@
1
1
  import { useToggle as Ve } from "../../../composables/useToggle.js";
2
- import { inject as ke, ref as i, computed as o, watch as b, useSlots as _e, toRaw as P, nextTick as C, provide as Ge, onMounted as He } from "vue";
3
- import { isObjectInArray as le } from "../../../utils/array.js";
2
+ import { inject as ke, ref as i, computed as c, watch as b, useSlots as _e, toRaw as P, nextTick as N, provide as Ge, onMounted as He } 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 te } from "@vueuse/core";
6
- import { Mode as T, Type as _, DropdownContext as qe } from "./DropdownContext.js";
5
+ import { useClamp as Le, useVirtualList as Ue, onClickOutside as ne } from "@vueuse/core";
6
+ import { Mode as T, Type as G, DropdownContext as qe } 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
9
  import { useGroupedOptions as Xe } from "./useGroupedOptions.js";
10
10
  const ll = (l, A, O) => {
11
- const ae = ke("isTreeDropdown", !1), {
12
- sortOutGroups: G,
13
- flattenAndMarkGroupOptions: ne,
14
- isGroup: H,
15
- selectAllWithGroups: ue,
16
- isIndeterminateGrouped: ie,
17
- allSelectedGrouped: re,
11
+ const H = ke("isTreeDropdown", !1), {
12
+ sortOutGroups: B,
13
+ flattenAndMarkGroupOptions: ue,
14
+ isGroup: L,
15
+ selectAllWithGroups: ie,
16
+ isIndeterminateGrouped: re,
17
+ allSelectedGrouped: U,
18
18
  areAllPreviousSelected: oe
19
19
  } = Xe(l), ce = (e, t) => l.multi && Array.isArray(e) ? l.comparingKey ? e?.findIndex(
20
20
  (u) => u[l.comparingKey] === t[l.comparingKey]
21
- ) > -1 : le(e, t) : l.comparingKey ? e?.[l.comparingKey] === t[l.comparingKey] : P(e) === t;
22
- let B;
21
+ ) > -1 : ae(e, t) : l.comparingKey ? e?.[l.comparingKey] === t[l.comparingKey] : e === t;
22
+ let q;
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 = {}));
25
+ })(q || (q = {}));
26
26
  const a = i(
27
27
  l.selected
28
- ), N = je(), n = o({
28
+ ), R = je(), n = c({
29
29
  get() {
30
- return N?.value?.value ?? a.value;
30
+ return R?.value?.value ?? a.value;
31
31
  },
32
32
  set(e) {
33
- N.onChange?.(e), N.onClose?.(), A("update:selected", e);
33
+ R.onChange?.(e), R.onClose?.(), A("update:selected", e);
34
34
  }
35
35
  });
36
36
  b(
37
37
  () => l.selected,
38
38
  () => {
39
- a.value = l.selected, d.value = l.selected;
39
+ a.value = l.selected, v.value = l.selected;
40
40
  }
41
41
  );
42
- const se = _e(), w = i(null), m = i(null), L = i(null), R = i(null), U = i(null), I = i(null), de = i(), q = i(null), $ = i(null), j = i(null), ve = 8, fe = o(() => I.value ? I.value.getBoundingClientRect().height + ve + l.distance : 0), X = i(!1), f = i([]), x = i(-1), g = i(""), d = i(l.selected || []), z = () => 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), 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({
43
43
  disabled: l.disabled,
44
44
  initialValue: l.defaultOpen
45
45
  });
@@ -49,181 +49,181 @@ const ll = (l, A, O) => {
49
49
  e !== void 0 && ye(e);
50
50
  }
51
51
  );
52
- const W = (e) => {
52
+ const Q = (e) => {
53
53
  he.value = ge(e);
54
- }, he = o({
54
+ }, he = c({
55
55
  get() {
56
56
  return l.isOpen;
57
57
  },
58
58
  set(e) {
59
59
  A("update:isOpen", e);
60
60
  }
61
- }), Oe = o(() => c.value.length - 1), v = Le(0, 0, Oe), J = o(() => n.value ? l.displayValue(n.value) : ""), me = (e) => {
61
+ }), Oe = c(() => r.value.length - 1), d = 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 ?? ""}`;
65
65
  return e.value.length == 1 && l.displayValue ? l.displayValue(e.value[0]) : t;
66
- }, Se = o(() => {
66
+ }, Se = 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
70
  return me(a);
71
- }), E = o(() => {
71
+ }), M = c(() => {
72
72
  if (Array.isArray(a.value))
73
- return l.groupedOptions ? re(c, a) : a.value.length === c.value.length;
74
- }), Ae = o(() => !l.multi || !Array.isArray(a.value) ? !1 : l.groupedOptions ? ie(
75
- c,
73
+ return l.groupedOptions ? U(r, a) : a.value.length === r.value.length;
74
+ }), Ae = c(() => !l.multi || !Array.isArray(a.value) ? !1 : l.groupedOptions ? re(
75
+ r,
76
76
  a
77
- ) : a.value.length > 0 && a.value.length < c.value.length), M = (e) => {
77
+ ) : a.value.length > 0 && a.value.length < r.value.length), V = (e) => {
78
78
  g.value = e;
79
- }, D = o(() => l.groupedOptions ? ne(l.options) : l.options), be = o(() => {
79
+ }, K = c(() => l.groupedOptions ? ue(l.options) : l.options), be = c(() => {
80
80
  if (oe(
81
- D,
82
- d
81
+ K,
82
+ v
83
83
  ))
84
- return D.value;
84
+ return K.value;
85
85
  const e = {
86
86
  selected: [],
87
87
  notSelected: []
88
88
  };
89
- P(D).value.forEach((u) => {
90
- const r = (l.comparingKey ? d.value.findIndex(
91
- (k) => k[l.comparingKey] === u[l.comparingKey]
92
- ) > -1 : d.value.includes(u)) ? "selected" : "notSelected";
93
- e[r].push(u);
89
+ P(K).value.forEach((u) => {
90
+ const o = (l.comparingKey ? v.value.findIndex(
91
+ (_) => _[l.comparingKey] === u[l.comparingKey]
92
+ ) > -1 : v.value.includes(u)) ? "selected" : "notSelected";
93
+ e[o].push(u);
94
94
  });
95
- const t = l.groupedOptions ? G(e.notSelected) : e.notSelected;
95
+ const t = l.groupedOptions ? B(e.notSelected) : e.notSelected;
96
96
  return [].concat(e.selected, t);
97
- }), c = o(() => {
98
- const e = Array.isArray(d.value) && l.multi && O.VERSION === 4 && !ae ? be.value : D.value;
97
+ }), r = c(() => {
98
+ const e = Array.isArray(v.value) && l.multi && O.VERSION === 4 && !H ? be.value : K.value;
99
99
  if (l.onSearch) {
100
- const t = e.filter((u) => l.groupedOptions && H(u) ? u : l.onSearch(u, g.value));
101
- return l.groupedOptions ? G(t) : t;
100
+ const t = e.filter((u) => l.groupedOptions && L(u) ? u : l.onSearch(u, g.value));
101
+ return l.groupedOptions ? B(t) : t;
102
102
  } else
103
103
  return e;
104
- }), Pe = o(() => f.value[0]?.hasSubtitle), Q = o(() => s.mode === T.Multi), Y = o(
104
+ }), Pe = c(() => f.value[0]?.hasSubtitle), Z = c(() => s.mode === T.Multi), F = c(
105
105
  () => Pe.value ? O.MULTILINE_LIST_HEIGHT : O.LIST_HEIGHT
106
106
  ), {
107
- list: Z,
108
- containerProps: F,
107
+ list: p,
108
+ containerProps: ee,
109
109
  wrapperProps: Te,
110
- scrollTo: K
111
- } = Ue(c, {
112
- itemHeight: Y.value,
110
+ scrollTo: C
111
+ } = Ue(r, {
112
+ itemHeight: F.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
+ Q(e);
119
119
  }
120
120
  ), b([x], async () => {
121
- await C();
121
+ await N();
122
122
  }), b(
123
- [y, v, x],
123
+ [y, d, x],
124
124
  async ([e], [t]) => {
125
- y.value && (await C(), x.value !== -1 && e !== t && setTimeout(() => {
126
- l.multi && O.VERSION === 4 || K(x.value);
127
- }), v.value && setTimeout(() => {
128
- K(v.value);
125
+ y.value && (await N(), x.value !== -1 && e !== t && setTimeout(() => {
126
+ l.multi && O.VERSION === 4 || C(x.value);
127
+ }), d.value && setTimeout(() => {
128
+ C(d.value);
129
129
  }));
130
130
  }
131
131
  ), b(g, () => {
132
- A("onsearch", g.value), K(0);
132
+ A("onsearch", g.value), C(0);
133
133
  });
134
134
  const S = (e, t = !1) => {
135
- l.disabled || (W(e), C(() => {
135
+ l.disabled || (Q(e), N(() => {
136
136
  y.value && A("opened"), y.value || A("closed"), w.value && t && w.value.focus();
137
137
  }));
138
138
  };
139
139
  b(y, (e) => {
140
140
  if (e) {
141
- g.value = "", Q.value && Array.isArray(n.value) && (d.value = P(n.value).slice());
141
+ g.value = "", Z.value && Array.isArray(n.value) && (v.value = P(n.value).slice());
142
142
  return;
143
143
  }
144
- z();
144
+ J();
145
145
  });
146
146
  const we = () => {
147
- if (E.value) {
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
- ue(c, a);
153
+ ie(r, a);
154
154
  else {
155
- if (a.value.length === c.value.length) {
155
+ if (a.value.length === r.value.length) {
156
156
  a.value = [];
157
157
  return;
158
158
  }
159
- a.value = c.value;
159
+ a.value = r.value;
160
160
  }
161
161
  A("selectAll");
162
162
  }
163
163
  }, Ie = () => {
164
164
  we(), O.VERSION !== 4 && (n.value = a.value);
165
165
  }, xe = (e = !0) => {
166
- a.value = [], e && (n.value = [], d.value = []), A("clear");
167
- }, V = (e, t) => {
166
+ a.value = [], e && (n.value = [], v.value = []), A("clear");
167
+ }, k = (e, t) => {
168
168
  if (e = P(e), O.VERSION === 4 ? e[l.disabledOptionKey] : f.value[t]?.disabled)
169
169
  return;
170
170
  if (x.value = t, !l.multi) {
171
171
  l.keepOpen || S(!1), s.goToOption(
172
172
  0
173
173
  /* None */
174
- ), n.value = e, M(""), z(), s.type === _.Search && m.value && (m.value.value = l.displayValue(e)), p();
174
+ ), n.value = e, V(""), J(), s.type === G.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
179
  m.value?.focus();
180
180
  const h = P(a.value);
181
- if (le(h, e) || l.comparingKey && h.findIndex(
182
- (r) => r[l.comparingKey] === e[l.comparingKey]
181
+ if (ae(h, e) || l.comparingKey && h.findIndex(
182
+ (o) => o[l.comparingKey] === e[l.comparingKey]
183
183
  ) > -1) {
184
- a.value = h.filter((r) => l.comparingKey ? r[l.comparingKey] !== e[l.comparingKey] : !Be(r, e));
184
+ a.value = h.filter((o) => l.comparingKey ? o[l.comparingKey] !== e[l.comparingKey] : !Be(o, e));
185
185
  return;
186
186
  } else {
187
187
  a.value = [...h, e];
188
188
  return;
189
189
  }
190
190
  }, De = (e) => f.value[e]?.disabled, s = {
191
- activeIndex: v,
191
+ activeIndex: d,
192
192
  options: f,
193
193
  selectedOption: n,
194
- labelRef: U,
195
- activeOption: R,
194
+ labelRef: j,
195
+ activeOption: E,
196
196
  listRef: w,
197
197
  clearable: l.clearable,
198
- type: se.input ? _.Search : _.Dropdown,
198
+ type: se.input ? G.Search : G.Dropdown,
199
199
  mode: l.multi ? T.Multi : T.Single,
200
200
  query: g,
201
- selectedValue: J,
201
+ selectedValue: Y,
202
202
  toggle: S,
203
203
  disabled: l.disabled,
204
204
  open: y,
205
205
  mandatory: l.mandatory,
206
206
  size: l.size,
207
207
  placeholder: l.placeholder,
208
- select: V,
208
+ select: k,
209
209
  clearSelection: () => {
210
- M(""), n.value = s.mode === T.Single ? null : [], d.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
210
+ V(""), n.value = s.mode === T.Single ? null : [], v.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
211
211
  },
212
- search: M,
212
+ search: V,
213
213
  goToOption: async (e) => {
214
214
  if (!y.value)
215
215
  return;
216
- let t = v.value + e;
216
+ let t = d.value + e;
217
217
  const u = f.value.filter(
218
- (r) => r.disabled
219
- ).length, h = c.value.length - u;
218
+ (o) => o.disabled
219
+ ).length, h = r.value.length - u;
220
220
  for (t > h && (t = h + 1); ; ) {
221
221
  if (!f.value[t]?.disabled) {
222
- R.value = c.value[t], v.value = t;
222
+ E.value = r.value[t], d.value = t;
223
223
  return;
224
224
  }
225
- if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!De(v.value)) {
226
- R.value = c.value[t], v.value = t;
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;
227
227
  return;
228
228
  }
229
229
  }
@@ -238,19 +238,19 @@ const ll = (l, A, O) => {
238
238
  f.value = f.value.filter((t) => t.id !== e);
239
239
  }
240
240
  };
241
- Ge(qe, s), te(
241
+ Ge(qe, s), ne(
242
242
  w,
243
243
  () => {
244
- y.value && ee();
244
+ y.value && te();
245
245
  },
246
246
  {
247
247
  ignore: [
248
248
  I,
249
- q,
250
- $,
251
- j,
249
+ X,
250
+ z,
251
+ W,
252
252
  m,
253
- F.ref
253
+ ee.ref
254
254
  ]
255
255
  }
256
256
  );
@@ -258,14 +258,17 @@ const ll = (l, A, O) => {
258
258
  m.value && (m.value.value = s.query.value = "");
259
259
  };
260
260
  He(async () => {
261
- l.autoFocus && (await C(), setTimeout(() => {
262
- L.value.focus();
263
- })), s.goToOption(0);
261
+ l.autoFocus && (await N(), setTimeout(() => {
262
+ $.value.focus();
263
+ })), s.goToOption(0), l.multi && !H && (l.groupOption ? D.value = U(
264
+ r,
265
+ a
266
+ ) : D.value = l.options.length === l.selected.length);
264
267
  });
265
- const p = () => {
266
- l.multi && (X.value = E.value, n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice())), A("apply", n.value), S(!1), Ke();
267
- }, ee = () => {
268
- Q.value && Array.isArray(d.value) && (n.value = P(d.value).slice()), g.value = "", S(!1);
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();
270
+ }, te = () => {
271
+ Z.value && Array.isArray(v.value) && (n.value = P(v.value).slice()), g.value = "", S(!1);
269
272
  }, Ce = (e) => {
270
273
  if (!l.disableKeyboardEvents)
271
274
  switch (e.key) {
@@ -315,20 +318,20 @@ const ll = (l, A, O) => {
315
318
  S(!0);
316
319
  return;
317
320
  }
318
- V(c.value[v.value], v.value), s.mode === T.Single && !l.keepOpen && S(!1), e.preventDefault();
321
+ k(r.value[d.value], d.value), s.mode === T.Single && !l.keepOpen && S(!1), e.preventDefault();
319
322
  break;
320
323
  }
321
324
  }
322
- }, Re = o(() => {
325
+ }, Re = c(() => {
323
326
  if (l.loading)
324
327
  return 8.5;
325
- const e = l.customNumberOfDisplayedOptions || Z.value.reduce((k, Ee) => {
328
+ const e = l.customNumberOfDisplayedOptions || p.value.reduce((_, Ee) => {
326
329
  const Me = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Ee.data) : 1;
327
- return k + Me;
330
+ return _ + Me;
328
331
  }, 0), t = l.multi && l.showSelectAll && !g.value ? 1 : 0, u = e > O.MAX_NUMBER_OF_OPTIONS, h = e + t;
329
- let r = u ? O.MAX_NUMBER_OF_OPTIONS + 0.1 : h;
330
- return l.noResultsText && r === 0 && (r = r + 1), l.withConditions && g.value && (r = r + 1), $e(
331
- r * Y.value + O.PADDING_PX
332
+ let o = u ? O.MAX_NUMBER_OF_OPTIONS + 0.1 : h;
333
+ return l.noResultsText && o === 0 && (o = o + 1), l.withConditions && g.value && (o = o + 1), $e(
334
+ o * F.value + O.PADDING_PX
332
335
  );
333
336
  });
334
337
  return {
@@ -338,36 +341,36 @@ const ll = (l, A, O) => {
338
341
  toggleMenu: S,
339
342
  onButtonKeydown: Ce,
340
343
  displayedValue: Se,
341
- labelRef: U,
344
+ labelRef: j,
342
345
  query: g,
343
- containerProps: F,
346
+ containerProps: ee,
344
347
  calculateTableHeight: Re,
345
348
  wrapperProps: Te,
346
- filteredOptions: c,
347
- allSelected: E,
348
- allSelectedApplied: X,
349
+ filteredOptions: r,
350
+ allSelected: M,
351
+ allSelectedApplied: D,
349
352
  isIndeterminate: Ae,
350
353
  onSelectAll: Ie,
351
- virtualOptions: Z,
354
+ virtualOptions: p,
352
355
  isSelected: ce,
353
356
  selectedOption: n,
354
- selectedOptionPrevious: d,
355
- selectedValue: J,
356
- onSelect: V,
357
- activeIndex: v,
358
- onCancel: ee,
359
- onApply: p,
360
- scrollTo: K,
361
- onClickOutside: te,
357
+ selectedOptionPrevious: v,
358
+ selectedValue: Y,
359
+ onSelect: k,
360
+ activeIndex: d,
361
+ onCancel: te,
362
+ onApply: le,
363
+ scrollTo: C,
364
+ onClickOutside: ne,
362
365
  listRef: w,
363
366
  buttonRef: I,
364
- apply: q,
365
- cancel: $,
366
- el: L,
367
- triggerRef: de,
368
- clearAll: j,
367
+ apply: X,
368
+ cancel: z,
369
+ el: $,
370
+ triggerRef: ve,
371
+ clearAll: W,
369
372
  onClearAllSelections: xe,
370
- isGroup: H
373
+ isGroup: L
371
374
  };
372
375
  };
373
376
  export {
@@ -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_f88a132e_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_5c7bcf85_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-f88a132e"]]);
5
+ const c = /* @__PURE__ */ _(o, [["__scopeId", "data-v-5c7bcf85"]]);
6
6
  export {
7
- r as default
7
+ c as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_f88a132e_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as fe, computed as U, openBlock as n, createElementBlock as r, mergeProps as y, unref as t, renderSlot as f, createElementVNode as m, createVNode as i, withCtx as u, Transition as me, normalizeClass as O, normalizeStyle as pe, createTextVNode as T, createCommentVNode as a, isRef as ge, toDisplayString as W, withModifiers as M, Fragment as Te, renderList as ke, toRaw as I, createBlock as X, resolveDynamicComponent as be } from "vue";
1
+ import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_5c7bcf85_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as fe, computed as U, openBlock as n, createElementBlock as r, mergeProps as y, unref as t, renderSlot as f, createElementVNode as m, createVNode as i, withCtx as u, Transition as me, normalizeClass as O, normalizeStyle as pe, createTextVNode as T, createCommentVNode as a, isRef as ge, toDisplayString as W, withModifiers as M, Fragment as Te, renderList as ke, toRaw as C, createBlock as X, resolveDynamicComponent as be } from "vue";
2
2
  import L from "../../button/v4/ButtonV4.vue.js";
3
3
  import "../../button/v4/IconButtonV4.vue.js";
4
4
  import "../../button/v4/ButtonGroup.vue.js";
@@ -111,9 +111,9 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
111
111
  }, {
112
112
  onKeydown: h,
113
113
  open: s,
114
- toggleMenu: v,
114
+ toggleMenu: I,
115
115
  onButtonKeydown: N,
116
- query: C,
116
+ query: v,
117
117
  containerProps: J,
118
118
  calculateTableHeight: Q,
119
119
  wrapperProps: Z,
@@ -141,7 +141,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
141
141
  clearAll: ue,
142
142
  isGroup: ce
143
143
  } = Ke(d, B, F), g = Ae(d.testId, p), $ = U(() => !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT ? he : d.predefinedTrigger === k.APP ? ve : null), { width: H } = Ee(R), ye = U(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT || d.predefinedTrigger === k.APP ? H.value - 2 > 240 ? `${H.value - 2}px` : `${F.DROPLIST_MIN_WIDTH}px` : "auto"), G = () => {
144
- v();
144
+ I();
145
145
  };
146
146
  return j({
147
147
  selectItem: D,
@@ -207,9 +207,9 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
207
207
  ], !0) : a("", !0),
208
208
  f(c.$slots, "inline-search", {}, () => [
209
209
  i(t(Ce), {
210
- modelValue: t(C),
210
+ modelValue: t(v),
211
211
  "onUpdate:modelValue": [
212
- l[4] || (l[4] = (o) => ge(C) ? C.value = o : null),
212
+ l[4] || (l[4] = (o) => ge(v) ? v.value = o : null),
213
213
  e.onClear
214
214
  ],
215
215
  placeholder: e.inlineSearchPlaceholder,
@@ -251,7 +251,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
251
251
  i(t(S), { round: "" }),
252
252
  i(t(S), { round: "" })
253
253
  ])) : a("", !0),
254
- e.showSelectAll !== !1 && e.multi && !t(C) && !e.loading && e.options.length ? f(c.$slots, "select-all", { key: 2 }, () => [
254
+ e.showSelectAll !== !1 && e.multi && !t(v) && !e.loading && e.options.length ? f(c.$slots, "select-all", { key: 2 }, () => [
255
255
  m("li", null, [
256
256
  i(t(q), y(
257
257
  {
@@ -276,7 +276,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
276
276
  ], !0) : a("", !0),
277
277
  t(x).length && !e.loading ? (n(!0), r(Te, { key: 3 }, ke(t(x), ({ data: o, index: w }) => (n(), r("li", {
278
278
  key: w,
279
- "aria-selected": t(A)(I(t(b)), o),
279
+ "aria-selected": t(A)(C(t(b)), o),
280
280
  "aria-disabled": !!e.disabled,
281
281
  onClick: M(() => t(D)(o, w), ["stop"])
282
282
  }, [
@@ -291,14 +291,14 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
291
291
  key: 1,
292
292
  option: o,
293
293
  index: w,
294
- selected: t(A)(I(t(b)), o),
295
- active: I(t(P)) === w,
294
+ selected: t(A)(C(t(b)), o),
295
+ active: C(t(P)) === w,
296
296
  disabled: o[d.disabledOptionKey]
297
297
  }, () => [
298
298
  i(t(q), {
299
299
  option: o,
300
- "selected-prop": t(A)(I(t(b)), o),
301
- active: I(t(P)) === w,
300
+ "selected-prop": t(A)(t(b), o),
301
+ active: C(t(P)) === w,
302
302
  disabled: o[d.disabledOptionKey],
303
303
  "name-key": e.optionNameKey,
304
304
  "image-key": e.optionImageKey,
@@ -391,7 +391,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
391
391
  open: t(s),
392
392
  disabled: e.disabled,
393
393
  label: t(oe) || e.placeholder,
394
- onClick: () => t(v)()
394
+ onClick: () => t(I)()
395
395
  },
396
396
  defaultTriggerProps: {
397
397
  placeholder: e.placeholder,
@@ -457,7 +457,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
457
457
  ])) : a("", !0),
458
458
  e.predefinedTrigger === t(k).ICON_BUTTON ? (n(), r("div", Ve, [
459
459
  i(t(we), {
460
- onClick: l[1] || (l[1] = (o) => t(v)())
460
+ onClick: l[1] || (l[1] = (o) => t(I)())
461
461
  })
462
462
  ])) : a("", !0),
463
463
  e.predefinedTrigger === t(k).CHIP ? (n(), r("div", xe, [
@@ -470,7 +470,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
470
470
  "display-value": e.displayValue,
471
471
  multi: e.multi,
472
472
  "all-selected": t(K),
473
- onClick: l[2] || (l[2] = (o) => t(v)()),
473
+ onClick: l[2] || (l[2] = (o) => t(I)()),
474
474
  onClear: l[3] || (l[3] = (o) => t(z)())
475
475
  }, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi", "all-selected"])
476
476
  ])) : a("", !0)
@@ -1,8 +1,8 @@
1
1
  import o from "./PopoverV4.vue2.js";
2
2
  /* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../PopoverV4.vue_vue_type_style_index_0_scoped_68002589_lang.css"; //*');
3
+ // import "../../../PopoverV4.vue_vue_type_style_index_0_scoped_052bc376_lang.css"; //*');
4
4
  // import "../../../PopoverV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-68002589"]]);
5
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-052bc376"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,7 +1,7 @@
1
- import "../../../PopoverV4.vue_vue_type_style_index_0_scoped_68002589_lang.css"; import "../../../PopoverV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as g, watch as d, openBlock as i, createBlock as k, unref as o, withCtx as s, createElementBlock as v, renderSlot as p, createCommentVNode as h, createElementVNode as C } from "vue";
2
- import { Dropdown as y } from "floating-vue";
3
- import { popoverCommon as B } from "../common/Popover.common.js";
4
- const w = ["data-testid"], E = /* @__PURE__ */ g({
1
+ import "../../../PopoverV4.vue_vue_type_style_index_0_scoped_052bc376_lang.css"; import "../../../PopoverV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as k, watch as l, openBlock as p, createBlock as h, unref as i, withCtx as u, createElementBlock as y, renderSlot as g, createCommentVNode as B, createElementVNode as C } from "vue";
2
+ import { Dropdown as w } from "floating-vue";
3
+ import { popoverCommon as $ } from "../common/Popover.common.js";
4
+ const O = ["data-testid"], H = /* @__PURE__ */ k({
5
5
  __name: "PopoverV4",
6
6
  props: {
7
7
  isOpen: { type: Boolean, default: !1 },
@@ -15,51 +15,57 @@ const w = ["data-testid"], E = /* @__PURE__ */ g({
15
15
  popperClass: { default: "" }
16
16
  },
17
17
  emits: ["isOpen"],
18
- setup(e, { expose: l, emit: u }) {
19
- const c = e, { popup: f, open: t, toggle: n, triggerRef: m } = B();
20
- return d(t, () => {
21
- u("isOpen", t.value);
22
- }), d(
23
- () => c.isOpen,
24
- (a) => {
25
- n(a);
18
+ setup(e, { expose: f, emit: m }) {
19
+ const a = e, { popup: c, open: t, toggle: d, triggerRef: v } = $();
20
+ l(t, () => {
21
+ m("isOpen", t.value);
22
+ }), l(
23
+ () => a.isOpen,
24
+ (o) => {
25
+ d(o);
26
26
  }
27
- ), l({
28
- toggle: n
29
- }), (a, r) => (i(), k(o(y), {
27
+ );
28
+ const n = (o) => {
29
+ a.trigger === o && (t.value = !t.value);
30
+ };
31
+ return f({
32
+ toggle: d
33
+ }), (o, r) => (p(), h(i(w), {
30
34
  theme: "custom-popover",
31
35
  placement: e.placement,
32
- shown: !!o(t),
36
+ shown: !!i(t),
33
37
  triggers: e.trigger === "managed" ? [] : [e.trigger],
34
38
  "auto-hide": e.autoHide,
35
39
  distance: e.distance,
36
40
  skidding: e.skidding,
37
41
  "popper-class": [e.popperClass, "v4-popover__popper light-theme-v4"]
38
42
  }, {
39
- popper: s(() => [
40
- o(t) ? (i(), v("div", {
43
+ popper: u(() => [
44
+ i(t) ? (p(), y("div", {
41
45
  key: 0,
42
46
  ref_key: "popup",
43
- ref: f,
47
+ ref: c,
44
48
  class: "menu-popup",
45
49
  "data-testid": e.testId
46
50
  }, [
47
- p(a.$slots, "content", {}, void 0, !0)
48
- ], 8, w)) : h("", !0)
51
+ g(o.$slots, "content", {}, void 0, !0)
52
+ ], 8, O)) : B("", !0)
49
53
  ]),
50
- default: s(() => [
54
+ default: u(() => [
51
55
  C("div", {
52
56
  ref_key: "triggerRef",
53
- ref: m,
54
- onClick: r[0] || (r[0] = (O) => o(n)(!o(t)))
57
+ ref: v,
58
+ onClick: r[0] || (r[0] = (s) => n("click")),
59
+ onMouseenter: r[1] || (r[1] = (s) => n("hover")),
60
+ onMouseleave: r[2] || (r[2] = (s) => n("hover"))
55
61
  }, [
56
- p(a.$slots, "trigger", {}, void 0, !0)
57
- ], 512)
62
+ g(o.$slots, "trigger", {}, void 0, !0)
63
+ ], 544)
58
64
  ]),
59
65
  _: 3
60
66
  }, 8, ["placement", "shown", "triggers", "auto-hide", "distance", "skidding", "popper-class"]));
61
67
  }
62
68
  });
63
69
  export {
64
- E as default
70
+ H as default
65
71
  };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './FloatingToolbar.vue_vue_type_style_index_0_scoped_04d485be_lang.css';
1
+ import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_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.17",
3
+ "version": "2.1.11-rc.19",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .v-enter-active[data-v-f88a132e],.v-leave-active[data-v-f88a132e]{transition:opacity .25s ease}ol[data-v-f88a132e],ul[data-v-f88a132e],menu[data-v-f88a132e]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-f88a132e],.dropdown.full-width .button__container[data-v-f88a132e]{width:100%}.dropdown-list-wrapper[data-v-f88a132e]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-f88a132e]{padding:.5rem}.list-container--multi[data-v-f88a132e]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-f88a132e]{display:flex;gap:4px;padding-bottom:.25rem}.inline-search .inline-search-wrapper .search-container[data-v-f88a132e]{width:100%}.inline-search .list-container[data-v-f88a132e]{padding-top:0}.no-result-container[data-v-f88a132e]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-f88a132e]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-f88a132e]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-f88a132e]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list--with-conditions[data-v-f88a132e]{min-height:0;margin-bottom:0}.image-slot[data-v-f88a132e]{margin-right:.5rem}.actions-wrapper[data-v-f88a132e]{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-f88a132e]{margin-left:.5rem}
@@ -1 +0,0 @@
1
- div[data-v-68002589]{display:block}