@ironsource/shared-ui 2.1.12-rc.3 → 2.1.12-rc.4

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
+ .custom-list-area[data-v-96c7507e]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:20px 43px}.inline-search[data-v-96c7507e]{width:100%}.contain-accept[data-v-96c7507e]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-96c7507e]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-96c7507e]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
@@ -7,7 +7,7 @@ import { Mode as T, Type as U, DropdownContext as $e } from "./DropdownContext.j
7
7
  import { pxToRem as je } from "../../../utils/style.js";
8
8
  import { useEditableContext as ze } from "../../table-cells/common/EditableContext.js";
9
9
  import { useGroupedOptions as We } from "./useGroupedOptions.js";
10
- const al = (e, v, g) => {
10
+ const al = (e, d, g) => {
11
11
  const B = ke("isTreeDropdown", !1), {
12
12
  sortOutGroups: H,
13
13
  flattenAndMarkGroupOptions: ue,
@@ -31,16 +31,16 @@ const al = (e, v, g) => {
31
31
  return K?.value?.value ?? a.value;
32
32
  },
33
33
  set(l) {
34
- K.onChange?.(l), K.onClose?.(), v("update:selected", l);
34
+ K.onChange?.(l), K.onClose?.(), d("update:selected", l);
35
35
  }
36
36
  });
37
37
  b(
38
38
  () => e.selected,
39
39
  () => {
40
- a.value = e.selected, d.value = e.selected;
40
+ a.value = e.selected, v.value = e.selected;
41
41
  }
42
42
  );
43
- const de = Ge(), w = r(null), m = r(null), j = r(null), R = r(null), z = r(null), I = r(null), ve = r(), W = r(null), J = r(null), Q = r(null), fe = 8, ge = c(() => I.value ? I.value.getBoundingClientRect().height + fe + e.distance : 0), D = r(!1), y = r([]), x = r(-1), h = r(""), d = r(e.selected || []), Y = () => I.value?.focus(), [O, ye, he] = Ve({
43
+ const de = Ge(), w = r(null), m = r(null), j = r(null), R = r(null), z = r(null), I = r(null), ve = r(), W = r(null), J = r(null), Q = r(null), fe = 8, ge = c(() => I.value ? I.value.getBoundingClientRect().height + fe + e.distance : 0), D = r(!1), y = r([]), x = r(-1), h = r(""), v = r(e.selected || []), Y = () => I.value?.focus(), [O, ye, he] = Ve({
44
44
  disabled: e.disabled,
45
45
  initialValue: e.defaultOpen
46
46
  });
@@ -57,7 +57,7 @@ const al = (e, v, g) => {
57
57
  return e.isOpen;
58
58
  },
59
59
  set(l) {
60
- v("update:isOpen", l);
60
+ d("update:isOpen", l);
61
61
  }
62
62
  }), Se = c(() => o.value.length - 1), f = He(0, 0, Se), F = c(() => n.value ? e.displayValue(n.value) : ""), me = (l) => {
63
63
  if (!l.value.length && !e.multiOptionsPlaceholderPrefix && !e.multiOptionsPlaceholderSuffix)
@@ -80,7 +80,7 @@ const al = (e, v, g) => {
80
80
  }, M = c(() => e.groupedOptions ? ue(e.options) : e.options), Pe = c(() => {
81
81
  if (oe(
82
82
  M,
83
- d
83
+ v
84
84
  ))
85
85
  return M.value;
86
86
  const l = {
@@ -88,15 +88,15 @@ const al = (e, v, g) => {
88
88
  notSelected: []
89
89
  };
90
90
  P(M).value.forEach((i) => {
91
- const u = (e.comparingKey ? d.value.findIndex(
91
+ const u = (e.comparingKey ? v.value.findIndex(
92
92
  (L) => L[e.comparingKey] === i[e.comparingKey]
93
- ) > -1 : d.value.includes(i)) ? "selected" : "notSelected";
93
+ ) > -1 : v.value.includes(i)) ? "selected" : "notSelected";
94
94
  l[u].push(i);
95
95
  });
96
96
  const t = e.groupedOptions ? H(l.notSelected) : l.notSelected;
97
97
  return [].concat(l.selected, t);
98
98
  }), o = c(() => {
99
- const l = Array.isArray(d.value) && e.multi && g.VERSION === 4 && !B ? Pe.value : M.value;
99
+ const l = Array.isArray(v.value) && e.multi && g.VERSION === 4 && !B ? Pe.value : M.value;
100
100
  if (e.onSearch) {
101
101
  const t = l.filter((i) => e.groupedOptions && q(i) ? i : e.onSearch(i, h.value));
102
102
  return e.groupedOptions ? H(t) : t;
@@ -130,16 +130,16 @@ const al = (e, v, g) => {
130
130
  }));
131
131
  }
132
132
  ), b(h, () => {
133
- v("onsearch", h.value), C(0);
133
+ d("onsearch", h.value), C(0);
134
134
  });
135
135
  const A = (l, t = !1) => {
136
136
  e.disabled || (Z(l), N(() => {
137
- O.value && v("opened"), O.value || v("closed"), w.value && t && w.value.focus();
137
+ O.value && d("opened"), O.value || d("closed"), w.value && t && w.value.focus();
138
138
  }));
139
139
  };
140
140
  b(O, (l) => {
141
141
  if (l) {
142
- h.value = "", p.value && Array.isArray(n.value) && (d.value = P(n.value).slice());
142
+ h.value = "", p.value && Array.isArray(n.value) && (v.value = P(n.value).slice());
143
143
  return;
144
144
  }
145
145
  Y();
@@ -159,12 +159,12 @@ const al = (e, v, g) => {
159
159
  }
160
160
  a.value = o.value;
161
161
  }
162
- v("selectAll");
162
+ d("selectAll");
163
163
  }
164
164
  }, xe = () => {
165
165
  Ie(), g.VERSION !== 4 && (n.value = a.value);
166
166
  }, De = (l = !0) => {
167
- a.value = [], l && (n.value = [], d.value = []), e.dynamicFilterMode || v("clear-all");
167
+ a.value = [], l ? (n.value = [], v.value = [], d("clear")) : e.dynamicFilterMode || d("clear");
168
168
  }, G = (l, t) => {
169
169
  if (l = P(l), g.VERSION === 4 ? l[e.disabledOptionKey] : y.value[t]?.disabled)
170
170
  return;
@@ -208,7 +208,7 @@ const al = (e, v, g) => {
208
208
  placeholder: e.placeholder,
209
209
  select: G,
210
210
  clearSelection: () => {
211
- _(""), n.value = s.mode === T.Single ? null : [], d.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
211
+ _(""), n.value = s.mode === T.Single ? null : [], v.value = s.mode === T.Single ? null : [], m.value && (m.value.value = "");
212
212
  },
213
213
  search: _,
214
214
  goToOption: async (l) => {
@@ -267,9 +267,9 @@ const al = (e, v, g) => {
267
267
  ) : D.value = e.options.length === e.selected.length);
268
268
  });
269
269
  const le = () => {
270
- e.multi && (n.value = a.value, Array.isArray(n.value) && (d.value = P(n.value).slice(), D.value = e.groupedOptions ? ce(e.options) === n.value.length : e.options.length === n.value.length)), v("apply", n.value), v("allSelectedChanged", E.value), A(!1), Ce();
270
+ e.multi && (n.value = a.value, Array.isArray(n.value) && (v.value = P(n.value).slice(), D.value = e.groupedOptions ? ce(e.options) === n.value.length : e.options.length === n.value.length)), d("apply", n.value), d("allSelectedChanged", E.value), A(!1), Ce();
271
271
  }, te = () => {
272
- p.value && Array.isArray(d.value) && (n.value = P(d.value).slice()), h.value = "", A(!1);
272
+ p.value && Array.isArray(v.value) && (n.value = P(v.value).slice()), h.value = "", A(!1);
273
273
  }, Ne = (l) => {
274
274
  if (!e.disableKeyboardEvents)
275
275
  switch (l.key) {
@@ -338,11 +338,11 @@ const al = (e, v, g) => {
338
338
  return Xe(
339
339
  k.ref,
340
340
  () => {
341
- !e.loadMoreLoading && e.infiniteLoading && v("loadMore");
341
+ !e.loadMoreLoading && e.infiniteLoading && d("loadMore");
342
342
  },
343
343
  { distance: e.infiniteScrollThreshold }
344
344
  ), b(a, () => {
345
- v("unsavedSelectionUpdate", a.value);
345
+ d("unsavedSelectionUpdate", a.value);
346
346
  }), {
347
347
  onKeydown: Ke,
348
348
  location: ge,
@@ -363,7 +363,7 @@ const al = (e, v, g) => {
363
363
  virtualOptions: V,
364
364
  isSelected: se,
365
365
  selectedOption: n,
366
- selectedOptionPrevious: d,
366
+ selectedOptionPrevious: v,
367
367
  selectedValue: F,
368
368
  onSelect: G,
369
369
  activeIndex: f,
@@ -1,7 +1,7 @@
1
1
  import o from "./ConditionalDropdown.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-3a2aeea3"]]);
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_96c7507e_lang.css"; //*');
4
+ const n = /* @__PURE__ */ e(o, [["__scopeId", "data-v-96c7507e"]]);
5
5
  export {
6
- p as default
6
+ n as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as K, onMounted as q, openBlock as D, createBlock as G, unref as d, withCtx as f, createVNode as g, mergeProps as H, createElementVNode as J, isRef as X, normalizeProps as Y, guardReactiveProps as Z, createElementBlock as _, createTextVNode as ee, toDisplayString as le, createCommentVNode as oe } from "vue";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_96c7507e_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as K, onMounted as q, openBlock as D, createBlock as G, unref as c, withCtx as f, createVNode as g, mergeProps as H, createElementVNode as J, isRef as X, normalizeProps as Y, guardReactiveProps as Z, createElementBlock as _, createTextVNode as ee, toDisplayString as le, createCommentVNode as oe } from "vue";
2
2
  import F from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
@@ -55,8 +55,8 @@ const re = { class: "conditional-container" }, se = {
55
55
  }), L = () => {
56
56
  const { appliedSelections: l } = e;
57
57
  return l ? Array.isArray(l) ? l : [l] : [];
58
- }, w = s(null), c = s(!0), a = s([]), n = s(L()), T = s(!0), p = s(!1), C = s(!1), u = s(e.searchQuery), B = s(""), m = s(e.label), k = s([]), U = O(() => (!u.value || u.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
59
- const l = c.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
58
+ }, w = s(null), p = s(!0), a = s([]), n = s(L()), T = s(!0), d = s(!1), C = s(!1), u = s(e.searchQuery), B = s(""), m = s(e.label), k = s([]), U = O(() => (!u.value || u.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
59
+ const l = p.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
60
60
  if (e.groupedOptions) {
61
61
  let o = 0;
62
62
  return a.value.forEach((y) => {
@@ -80,14 +80,14 @@ const re = { class: "conditional-container" }, se = {
80
80
  return [];
81
81
  }, A = async (l) => {
82
82
  try {
83
- p.value = !0;
83
+ d.value = !0;
84
84
  const t = await e.fetchFnCallback(l), o = M(
85
85
  l,
86
86
  t
87
87
  );
88
- a.value = [...o, ...t], p.value = !1;
88
+ a.value = [...o, ...t], d.value = !1;
89
89
  } catch (t) {
90
- p.value = !1, console.error("Error fetching data:", t);
90
+ d.value = !1, console.error("Error fetching data:", t);
91
91
  }
92
92
  }, E = async () => {
93
93
  if (e.infiniteLoading)
@@ -104,7 +104,7 @@ const re = { class: "conditional-container" }, se = {
104
104
  ), b = (l) => {
105
105
  l.length >= e.minCharsToStart ? (V(l), w.value?.scrollTo(0)) : e.infiniteLoading && i.value.multi ? a.value = k.value || [] : a.value = [];
106
106
  }, x = () => {
107
- u.value && a.value.length && !p.value && !i.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
107
+ u.value && a.value.length && !d.value && !i.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
108
108
  [e.optionNameKey]: u.value,
109
109
  conditionalOptions: !0,
110
110
  conditionalName: i.value.label,
@@ -119,7 +119,7 @@ const re = { class: "conditional-container" }, se = {
119
119
  ...a.value
120
120
  ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
121
121
  }, N = () => {
122
- c.value && n.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${i.value.label.toLowerCase()}`;
122
+ p.value && n.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${i.value.label.toLowerCase()}`;
123
123
  };
124
124
  K(u, () => {
125
125
  b(u.value);
@@ -132,14 +132,14 @@ const re = { class: "conditional-container" }, se = {
132
132
  }
133
133
  );
134
134
  const P = () => {
135
- c.value && n.value.length === 0 ? (i.value = null, S.value = [], i.value = null) : (B.value = u.value, S.value = c.value ? [...n.value] : { ...n.value }, T.value = c.value), N();
135
+ p.value && n.value.length === 0 ? (i.value = null, S.value = [], i.value = null) : (B.value = u.value, S.value = p.value ? [...n.value] : { ...n.value }, T.value = p.value), N();
136
136
  };
137
137
  K(i, (l, t) => {
138
- i.value.multi ? (p.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
139
- p.value = !1, c.value = !0;
140
- }, 100)) : setTimeout(() => {
141
- c.value = !1;
142
- }, 100);
138
+ i.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
139
+ d.value = !1, p.value = !0;
140
+ }, 100)) : (d.value = !0, setTimeout(() => {
141
+ d.value = !1, p.value = !1;
142
+ }, 100));
143
143
  });
144
144
  const Q = (l) => {
145
145
  k.value = l;
@@ -154,23 +154,23 @@ const re = { class: "conditional-container" }, se = {
154
154
  const $ = () => {
155
155
  h("closed");
156
156
  };
157
- return (l, t) => (D(), G(d(F), {
157
+ return (l, t) => (D(), G(c(F), {
158
158
  ref_key: "dropdownRef",
159
159
  ref: w,
160
160
  selected: n.value,
161
161
  "onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
162
162
  "predefined-trigger": "chip",
163
163
  "display-value": (o) => o?.[r.optionNameKey],
164
- multi: c.value,
164
+ multi: p.value,
165
165
  options: a.value,
166
166
  placeholder: m.value,
167
167
  "search-placeholder": "Search",
168
168
  "option-name-key": r.optionNameKey,
169
169
  "with-conditions": "",
170
170
  "inline-search": "",
171
- "custom-number-of-displayed-options": d(I),
171
+ "custom-number-of-displayed-options": c(I),
172
172
  "options-list-width": "330px",
173
- loading: p.value || r.loadingOverride,
173
+ loading: d.value || r.loadingOverride,
174
174
  "load-more-loading": C.value,
175
175
  "comparing-key": r.comparingKey,
176
176
  "is-open": r.isOpen,
@@ -189,9 +189,9 @@ const re = { class: "conditional-container" }, se = {
189
189
  onClosed: $
190
190
  }, {
191
191
  "dropdown-trigger": f(({ defaultTriggerProps: o }) => [
192
- g(d(ae), H(o, {
192
+ g(c(ae), H(o, {
193
193
  label: m.value,
194
- "selected-option": d(S),
194
+ "selected-option": c(S),
195
195
  multi: T.value,
196
196
  "cancel-all-selected-display": "",
197
197
  "display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
@@ -200,8 +200,8 @@ const re = { class: "conditional-container" }, se = {
200
200
  ]),
201
201
  "dropdown-conditions": f(() => [
202
202
  J("div", re, [
203
- g(d(F), {
204
- selected: d(i),
203
+ g(c(F), {
204
+ selected: c(i),
205
205
  "onUpdate:selected": t[0] || (t[0] = (o) => X(i) ? i.value = o : null),
206
206
  options: r.conditionalOptions,
207
207
  "option-name-key": "label",
@@ -210,14 +210,14 @@ const re = { class: "conditional-container" }, se = {
210
210
  size: "small"
211
211
  }, {
212
212
  "dropdown-trigger": f(({ buttonTriggerProps: o }) => [
213
- g(d(te), Y(Z(o)), null, 16)
213
+ g(c(te), Y(Z(o)), null, 16)
214
214
  ]),
215
215
  _: 1
216
216
  }, 8, ["selected", "options", "display-value"])
217
217
  ])
218
218
  ]),
219
219
  "inline-search": f(() => [
220
- g(d(ne), {
220
+ g(c(ne), {
221
221
  modelValue: u.value,
222
222
  "onUpdate:modelValue": t[1] || (t[1] = (o) => u.value = o),
223
223
  class: "inline-search",
@@ -228,10 +228,10 @@ const re = { class: "conditional-container" }, se = {
228
228
  }, null, 8, ["modelValue", "auto-focus"])
229
229
  ]),
230
230
  "custom-list-area": f(() => [
231
- !a.value.length && !p.value ? (D(), _("div", se, [
231
+ !a.value.length && !d.value ? (D(), _("div", se, [
232
232
  g(ie, { variant: "body1" }, {
233
233
  default: f(() => [
234
- ee(le(d(U)), 1)
234
+ ee(le(c(U)), 1)
235
235
  ]),
236
236
  _: 1
237
237
  })
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_lang.css';
1
+ import './Typography.vue_vue_type_style_index_0_scoped_07b259bf_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.12-rc.3",
3
+ "version": "2.1.12-rc.4",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .custom-list-area[data-v-3a2aeea3]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:20px 43px}.inline-search[data-v-3a2aeea3]{width:100%}.contain-accept[data-v-3a2aeea3]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-3a2aeea3]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-3a2aeea3]{margin-left:4px;display:inline-flex;color:var(--primary-main)}