@ironsource/shared-ui 2.1.12-test.74 → 2.1.12-test.76

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 (25) hide show
  1. package/ChartPlane.vue_vue_type_style_index_0_scoped_a4130027_lang.css +1 -0
  2. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css +1 -0
  3. package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +1 -0
  4. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_2076b5ab_lang.css +1 -0
  5. package/components/button/v4/ToggleButtonGroupAB.vue.js +3 -3
  6. package/components/button/v4/ToggleButtonGroupAB.vue2.js +40 -44
  7. package/components/chart/ChartPlane.vue.js +4 -4
  8. package/components/chart/ChartPlane.vue2.js +25 -17
  9. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  10. package/components/dropdown/v3/index.d.ts +20 -20
  11. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +17 -9
  12. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  13. package/components/dropdown/v4/ConditionalDropdown.vue2.js +133 -123
  14. package/components/dropdown/v4/DropdownV4.vue.d.ts +1 -1
  15. package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
  16. package/components/dropdown/v4/index.d.ts +474 -148
  17. package/components/table/v4/DataGrid.vue.js +4 -4
  18. package/components/table/v4/DataGrid.vue2.js +5 -5
  19. package/index.d.ts +1617 -965
  20. package/index.js +1 -1
  21. package/package.json +1 -1
  22. package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +0 -1
  23. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css +0 -1
  24. package/DataGrid.vue_vue_type_style_index_0_scoped_086c5b0d_lang.css +0 -1
  25. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +0 -1
@@ -1,21 +1,21 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css"; import { defineComponent as W, computed as w, ref as s, watch as O, onMounted as q, openBlock as D, createBlock as G, unref as c, withCtx as f, createVNode as y, 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
- import F from "./DropdownV4.vue.js";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as h, onMounted as q, openBlock as F, createBlock as G, unref as c, createSlots as H, withCtx as v, createVNode as S, mergeProps as J, createElementVNode as X, isRef as Y, normalizeProps as Z, guardReactiveProps as _, createElementBlock as ee, createTextVNode as le, toDisplayString as oe, createCommentVNode as te, renderSlot as ae } from "vue";
2
+ import L from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
- import te from "./ChipDropdownTrigger.vue.js";
5
+ import ne from "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
7
7
  import "./ButtonDropdownTrigger.vue.js";
8
- import ae from "./ButtonFilterDropdownTrigger.vue.js";
8
+ import ie from "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import "./OptionV4.vue.js";
11
11
  import "./ConditionalDropdown.vue.js";
12
- import ne from "../../search/v4/SearchV4.vue.js";
13
- import ie from "../../typography/v4/Typography.vue.js";
14
- import { useDebounceFn as ue } from "@vueuse/core";
15
- const re = { class: "conditional-container" }, se = {
12
+ import ue from "../../search/v4/SearchV4.vue.js";
13
+ import re from "../../typography/v4/Typography.vue.js";
14
+ import { useDebounceFn as se } from "@vueuse/core";
15
+ const de = { class: "conditional-container" }, ce = {
16
16
  key: 0,
17
17
  class: "custom-list-area"
18
- }, ke = /* @__PURE__ */ W({
18
+ }, Ae = /* @__PURE__ */ W({
19
19
  __name: "ConditionalDropdown",
20
20
  props: {
21
21
  selectedCondition: null,
@@ -42,69 +42,69 @@ const re = { class: "conditional-container" }, se = {
42
42
  triggerShownValuesCount: { default: 1 }
43
43
  },
44
44
  emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
45
- setup(n, { emit: h }) {
46
- const e = n, S = w({
45
+ setup(i, { emit: C }) {
46
+ const e = i, m = O({
47
47
  get: () => e.appliedSelections,
48
48
  set: (l) => {
49
- h("update:appliedSelections", l);
49
+ C("update:appliedSelections", l);
50
50
  }
51
- }), u = w({
51
+ }), u = O({
52
52
  get: () => e.selectedCondition || e.conditionalOptions[0],
53
53
  set: (l) => {
54
- h("update:selectedCondition", l);
54
+ C("update:selectedCondition", l);
55
55
  }
56
- }), L = () => {
56
+ }), k = () => {
57
57
  const { appliedSelections: l } = e;
58
58
  return l ? Array.isArray(l) ? l : [l] : [];
59
- }, k = s(null), p = s(!0), a = s([]), i = s(L()), T = s(!0), d = s(!1), C = s(!1), r = s(e.searchQuery), B = s(""), m = s(e.label), K = s([]), U = w(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = w(() => {
60
- const l = p.value ? 4 : 4.5, o = a.value.length > 4 ? a.value.length : l;
59
+ }, T = s(null), p = s(!0), a = s([]), n = s(k()), A = s(!0), d = s(!1), b = s(!1), r = s(e.searchQuery), B = s(""), g = s(e.label), K = s([]), U = O(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
60
+ const l = p.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
61
61
  if (e.groupedOptions) {
62
- let t = 0;
63
- return a.value.forEach((g) => {
64
- g.options && (t = t + g.options.length);
65
- }), t > 4 ? t : l;
62
+ let o = 0;
63
+ return a.value.forEach((y) => {
64
+ y.options && (o = o + y.options.length);
65
+ }), o > 4 ? o : l;
66
66
  }
67
- return o > l ? o : l;
68
- }), M = (l, o) => {
69
- if (e.infiniteLoading && u.value.multi && Array.isArray(i.value) && i.value.length && l && o.length) {
70
- const t = [], g = i.value.filter(
71
- (v) => v[e.optionNameKey].includes(l)
67
+ return t > l ? t : l;
68
+ }), M = (l, t) => {
69
+ if (e.infiniteLoading && u.value.multi && Array.isArray(n.value) && n.value.length && l && t.length) {
70
+ const o = [], y = n.value.filter(
71
+ (f) => f[e.optionNameKey].includes(l)
72
72
  );
73
- return o.forEach((v) => {
74
- g.find(
75
- (j) => j[e.comparingKey] === v[e.comparingKey]
76
- ) && t.push(v[e.comparingKey]);
77
- }), g.filter(
78
- (v) => !t.includes(v[e.comparingKey])
73
+ return t.forEach((f) => {
74
+ y.find(
75
+ (j) => j[e.comparingKey] === f[e.comparingKey]
76
+ ) && o.push(f[e.comparingKey]);
77
+ }), y.filter(
78
+ (f) => !o.includes(f[e.comparingKey])
79
79
  );
80
80
  }
81
81
  return [];
82
- }, A = async (l) => {
82
+ }, N = async (l) => {
83
83
  try {
84
84
  d.value = !0;
85
- const o = await e.fetchFnCallback(l), t = M(
85
+ const t = await e.fetchFnCallback(l), o = M(
86
86
  l,
87
- o
87
+ t
88
88
  );
89
- a.value = [...t, ...o], d.value = !1;
90
- } catch (o) {
91
- d.value = !1, console.error("Error fetching data:", o);
89
+ a.value = [...o, ...t], d.value = !1;
90
+ } catch (t) {
91
+ d.value = !1, console.error("Error fetching data:", t);
92
92
  }
93
93
  }, E = async () => {
94
94
  if (e.infiniteLoading)
95
95
  try {
96
- C.value = !0;
96
+ b.value = !0;
97
97
  const l = await e.loadMoreFn();
98
- C.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
98
+ b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
99
99
  } catch (l) {
100
- C.value = !1, console.error("Error fetching data:", l);
100
+ b.value = !1, console.error("Error fetching data:", l);
101
101
  }
102
- }, x = ue(
103
- A,
102
+ }, P = se(
103
+ N,
104
104
  e.fetchDataDebounceTime
105
- ), b = (l) => {
106
- l.length >= e.minCharsToStart ? (x(l), k.value?.scrollTo(0)) : e.infiniteLoading && u.value.multi ? a.value = K.value || [] : a.value = [];
107
- }, P = () => {
105
+ ), w = (l) => {
106
+ l.length >= e.minCharsToStart ? (P(l), T.value?.scrollTo(0)) : e.infiniteLoading && u.value.multi ? a.value = K.value || [] : a.value = [];
107
+ }, Q = () => {
108
108
  r.value && a.value.length && !d.value && !u.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
109
109
  [e.optionNameKey]: r.value,
110
110
  conditionalOptions: !0,
@@ -119,131 +119,141 @@ const re = { class: "conditional-container" }, se = {
119
119
  },
120
120
  ...a.value
121
121
  ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
122
- }, N = () => {
123
- p.value && i.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${u.value.label.toLowerCase()}`;
122
+ }, D = () => {
123
+ p.value && n.value.length === 0 ? g.value = e.label : g.value = `${e.label} ${u.value.label.toLowerCase()}`;
124
124
  };
125
- O(r, () => {
126
- b(r.value);
127
- }), O([u, a], () => {
128
- P();
129
- }), O(
125
+ h(r, () => {
126
+ w(r.value);
127
+ }), h([u, a], () => {
128
+ Q();
129
+ }), h(
130
130
  () => e.loadingOverride,
131
- (l, o) => {
132
- !l && o && !e.infiniteLoading && A(e.searchQuery);
131
+ (l, t) => {
132
+ !l && t && !e.infiniteLoading && N(e.searchQuery);
133
133
  }
134
134
  );
135
- const Q = () => {
136
- p.value && i.value.length === 0 ? (u.value = null, S.value = [], u.value = null) : (B.value = r.value, S.value = p.value ? [...i.value] : { ...i.value }, T.value = p.value), N();
135
+ const V = () => {
136
+ p.value && n.value.length === 0 ? (u.value = null, m.value = [], u.value = null) : (B.value = r.value, m.value = p.value ? [...n.value] : { ...n.value }, A.value = p.value), D();
137
137
  };
138
- O(u, (l, o) => {
139
- u.value.multi ? (d.value = !0, !o.multi && l.multi && (Array.isArray(e.appliedSelections) ? i.value = e.appliedSelections : i.value = [e.appliedSelections]), setTimeout(() => {
138
+ h(u, (l, t) => {
139
+ u.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
140
140
  d.value = !1, p.value = !0;
141
- }, 100)) : (!o.multi && !l.multi && (d.value = !0), setTimeout(() => {
142
- !o.multi && !l.multi && (d.value = !1), p.value = !1;
141
+ }, 100)) : (!t.multi && !l.multi && (d.value = !0), setTimeout(() => {
142
+ !t.multi && !l.multi && (d.value = !1), p.value = !1;
143
143
  }, 100));
144
+ }), h(m, () => {
145
+ n.value = k();
144
146
  });
145
- const V = (l) => {
147
+ const $ = (l) => {
146
148
  K.value = l;
147
- }, R = () => {
148
- i.value = [], S.value = [], u.value = null, m.value = e.label, r.value = "", h("clear");
149
- }, z = (l) => {
150
- l && u.value.multi && e.infiniteLoading && i.value && (a.value = i.value, r.value && b(r.value));
149
+ }, x = () => {
150
+ n.value = [], m.value = [], u.value = null, g.value = e.label, r.value = "", C("clear");
151
+ }, R = (l) => {
152
+ l && u.value.multi && e.infiniteLoading && n.value && (a.value = n.value, r.value && w(r.value));
151
153
  };
152
154
  q(() => {
153
- (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, i.value = e.appliedSelections, K.value = e.appliedSelections), N();
155
+ (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && w(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, n.value = e.appliedSelections, K.value = e.appliedSelections), D();
154
156
  });
155
- const $ = () => {
156
- h("closed");
157
+ const z = () => {
158
+ C("closed");
157
159
  };
158
- return (l, o) => (D(), G(c(F), {
160
+ return (l, t) => (F(), G(c(L), {
159
161
  ref_key: "dropdownRef",
160
- ref: k,
161
- selected: i.value,
162
- "onUpdate:selected": o[2] || (o[2] = (t) => i.value = t),
162
+ ref: T,
163
+ selected: n.value,
164
+ "onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
163
165
  "predefined-trigger": "chip",
164
- "display-value": (t) => t?.[n.optionNameKey],
166
+ "display-value": (o) => o?.[i.optionNameKey],
165
167
  multi: p.value,
166
168
  options: a.value,
167
- placeholder: m.value,
169
+ placeholder: g.value,
168
170
  "search-placeholder": "Search",
169
- "option-name-key": n.optionNameKey,
171
+ "option-name-key": i.optionNameKey,
170
172
  "with-conditions": "",
171
173
  "inline-search": "",
172
174
  "custom-number-of-displayed-options": c(I),
173
175
  "options-list-width": "330px",
174
- loading: d.value || n.loadingOverride,
175
- "load-more-loading": C.value,
176
- "comparing-key": n.comparingKey,
177
- "is-open": n.isOpen,
178
- "infinite-loading": n.infiniteLoading,
179
- "show-select-all": !n.infiniteLoading && !r.value,
180
- "grouped-options": n.groupedOptions,
181
- "option-flag-key": n.optionFlagKey,
182
- "option-image-key": n.optionImageKey,
183
- "option-icon-key": n.optionIconKey,
184
- "option-icon-type": n.optionIconType,
185
- "trigger-shown-values-count": n.triggerShownValuesCount,
186
- "onUpdate:isOpen": z,
187
- onOnsearch: b,
188
- onApply: Q,
176
+ loading: d.value || i.loadingOverride,
177
+ "load-more-loading": b.value,
178
+ "comparing-key": i.comparingKey,
179
+ "is-open": i.isOpen,
180
+ "infinite-loading": i.infiniteLoading,
181
+ "show-select-all": !i.infiniteLoading && !r.value,
182
+ "grouped-options": i.groupedOptions,
183
+ "option-flag-key": i.optionFlagKey,
184
+ "option-image-key": i.optionImageKey,
185
+ "option-icon-key": i.optionIconKey,
186
+ "option-icon-type": i.optionIconType,
187
+ "trigger-shown-values-count": i.triggerShownValuesCount,
188
+ "onUpdate:isOpen": R,
189
+ onOnsearch: w,
190
+ onApply: V,
189
191
  onLoadMore: E,
190
- onUnsavedSelectionUpdate: V,
191
- onClosed: $
192
- }, {
193
- "dropdown-trigger": f(({ defaultTriggerProps: t }) => [
194
- y(c(te), H(t, {
195
- label: m.value,
196
- "selected-option": c(S),
197
- multi: T.value,
192
+ onUnsavedSelectionUpdate: $,
193
+ onClosed: z
194
+ }, H({
195
+ "dropdown-trigger": v(({ defaultTriggerProps: o }) => [
196
+ S(c(ne), J(o, {
197
+ label: g.value,
198
+ "selected-option": c(m),
199
+ multi: A.value,
198
200
  "cancel-all-selected-display": "",
199
- "display-value-in-quotes": !Array.isArray(i.value) && i.value.conditionalOptions,
200
- "shown-values-count": n.triggerShownValuesCount,
201
- onClear: R
201
+ "display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
202
+ "shown-values-count": i.triggerShownValuesCount,
203
+ onClear: x
202
204
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes", "shown-values-count"])
203
205
  ]),
204
- "dropdown-conditions": f(() => [
205
- J("div", re, [
206
- y(c(F), {
206
+ "dropdown-conditions": v(() => [
207
+ X("div", de, [
208
+ S(c(L), {
207
209
  selected: c(u),
208
- "onUpdate:selected": o[0] || (o[0] = (t) => X(u) ? u.value = t : null),
209
- options: n.conditionalOptions,
210
+ "onUpdate:selected": t[0] || (t[0] = (o) => Y(u) ? u.value = o : null),
211
+ options: i.conditionalOptions,
210
212
  "option-name-key": "label",
211
- "display-value": (t) => t?.label,
213
+ "display-value": (o) => o?.label,
212
214
  container: ".conditional-container",
213
215
  size: "small"
214
216
  }, {
215
- "dropdown-trigger": f(({ buttonTriggerProps: t }) => [
216
- y(c(ae), Y(Z(t)), null, 16)
217
+ "dropdown-trigger": v(({ buttonTriggerProps: o }) => [
218
+ S(c(ie), Z(_(o)), null, 16)
217
219
  ]),
218
220
  _: 1
219
221
  }, 8, ["selected", "options", "display-value"])
220
222
  ])
221
223
  ]),
222
- "inline-search": f(() => [
223
- y(c(ne), {
224
+ "inline-search": v(() => [
225
+ S(c(ue), {
224
226
  modelValue: r.value,
225
- "onUpdate:modelValue": o[1] || (o[1] = (t) => r.value = t),
227
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
226
228
  class: "inline-search",
227
229
  placeholder: "Search",
228
230
  variant: "transparent",
229
231
  size: "md",
230
- "auto-focus": n.autoFocusSearch
232
+ "auto-focus": i.autoFocusSearch
231
233
  }, null, 8, ["modelValue", "auto-focus"])
232
234
  ]),
233
- "custom-list-area": f(() => [
234
- !a.value.length && !d.value ? (D(), _("div", se, [
235
- y(ie, { variant: "body1" }, {
236
- default: f(() => [
237
- ee(le(c(U)), 1)
235
+ "custom-list-area": v(() => [
236
+ !a.value.length && !d.value ? (F(), ee("div", ce, [
237
+ S(re, { variant: "body1" }, {
238
+ default: v(() => [
239
+ le(oe(c(U)), 1)
238
240
  ]),
239
241
  _: 1
240
242
  })
241
- ])) : oe("", !0)
243
+ ])) : te("", !0)
242
244
  ]),
243
- _: 1
244
- }, 8, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading", "show-select-all", "grouped-options", "option-flag-key", "option-image-key", "option-icon-key", "option-icon-type", "trigger-shown-values-count"]));
245
+ _: 2
246
+ }, [
247
+ l.$slots["option-end"] ? {
248
+ name: "option-end",
249
+ fn: v(({ option: o }) => [
250
+ ae(l.$slots, "option-end", { option: o }, void 0, !0)
251
+ ]),
252
+ key: "0"
253
+ } : void 0
254
+ ]), 1032, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading", "show-select-all", "grouped-options", "option-flag-key", "option-image-key", "option-icon-key", "option-icon-type", "trigger-shown-values-count"]));
245
255
  }
246
256
  });
247
257
  export {
248
- ke as default
258
+ Ae as default
249
259
  };
@@ -301,8 +301,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
301
301
  mandatory: boolean;
302
302
  skidding: number;
303
303
  modelValue: any;
304
- selected: any;
305
304
  valueToCopy: string;
305
+ selected: any;
306
306
  placeholder: string;
307
307
  multi: boolean;
308
308
  infiniteLoading: boolean;
@@ -84,8 +84,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
84
84
  testId: string;
85
85
  disabled: boolean;
86
86
  size: "small" | "medium" | "large";
87
- selected: unknown[];
88
87
  valueToCopy: string;
88
+ selected: unknown[];
89
89
  placeholder: string;
90
90
  inlineSearchPlaceholder: string;
91
91
  optionNameKey: string;