@ironsource/shared-ui 2.1.12-rc.8 → 2.1.12-test.57

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 (67) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css +1 -0
  2. package/Chart.vue_vue_type_style_index_0_scoped_757e7752_lang.css +1 -0
  3. package/ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css +1 -0
  4. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css +1 -0
  5. package/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css +1 -0
  6. package/ChartPlane.vue_vue_type_style_index_0_scoped_bb382dc4_lang.css +1 -0
  7. package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css +1 -0
  8. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  9. package/SettingsHeader.vue_vue_type_style_index_0_scoped_fba2eaa4_lang.css +1 -0
  10. package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
  11. package/components/chart/Chart.vue.d.ts +56 -2
  12. package/components/chart/Chart.vue.js +4 -4
  13. package/components/chart/Chart.vue2.js +93 -60
  14. package/components/chart/ChartHeader.vue.d.ts +25 -0
  15. package/components/chart/ChartHeader.vue.js +2 -2
  16. package/components/chart/ChartHeader.vue2.js +75 -50
  17. package/components/chart/ChartHeaderTrend.vue.d.ts +15 -0
  18. package/components/chart/ChartHeaderTrend.vue.js +3 -3
  19. package/components/chart/ChartHeaderTrend.vue2.js +83 -19
  20. package/components/chart/ChartLegend.vue.d.ts +17 -0
  21. package/components/chart/ChartLegend.vue.js +3 -3
  22. package/components/chart/ChartLegend.vue2.js +78 -67
  23. package/components/chart/ChartPlane.vue.d.ts +43 -4
  24. package/components/chart/ChartPlane.vue.js +3 -3
  25. package/components/chart/ChartPlane.vue2.js +137 -118
  26. package/components/chart/LegendSorting.vue.d.ts +37 -0
  27. package/components/chart/LegendSorting.vue.js +45 -0
  28. package/components/chart/LegendSorting.vue2.js +4 -0
  29. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  30. package/components/chart/SettingsHeader.vue.js +3 -3
  31. package/components/chart/SettingsHeader.vue2.js +17 -16
  32. package/components/chart/colorPalette.d.ts +4 -0
  33. package/components/chart/colorPalette.js +54 -0
  34. package/components/chart/composables/useColorsMap.d.ts +2 -2
  35. package/components/chart/composables/useColorsMap.js +41 -12
  36. package/components/chart/consts.d.ts +12 -1
  37. package/components/chart/consts.js +31 -26
  38. package/components/chart/index.d.ts +237 -40
  39. package/components/chart/mockData.d.ts +8 -14
  40. package/components/chart/types.d.ts +2 -1
  41. package/components/dropdown/common/Dropdown.common.js +81 -74
  42. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
  43. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
  44. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  45. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  46. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  47. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  48. package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
  49. package/components/dropdown/v4/index.d.ts +18 -0
  50. package/components/table/v4/DataGrid.vue.js +3 -3
  51. package/components/table/v4/DataGrid.vue2.js +35 -35
  52. package/index.d.ts +37 -1
  53. package/package.json +1 -1
  54. package/utils/formatNumbers.d.ts +1 -1
  55. package/utils/formatNumbers.js +14 -14
  56. package/utils/totals.d.ts +5 -0
  57. package/utils/totals.js +9 -0
  58. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
  59. package/Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css +0 -1
  60. package/ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css +0 -1
  61. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_e4c673e7_lang.css +0 -1
  62. package/ChartLegend.vue_vue_type_style_index_0_scoped_532f23bc_lang.css +0 -1
  63. package/ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_lang.css +0 -1
  64. package/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css +0 -1
  65. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  66. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
  67. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
@@ -1,6 +1,6 @@
1
- import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; import { defineComponent as ee, provide as ne, ref as c, computed as K, onMounted as le, watch as g, openBlock as C, createBlock as D, unref as d, withCtx as f, createVNode as I, mergeProps as z, createSlots as te, renderSlot as oe, createElementVNode as M, withModifiers as S, createTextVNode as ie, createElementBlock as B, withDirectives as de, Fragment as ae, renderList as re, vShow as se, createCommentVNode as ce } from "vue";
2
- import ue from "./DropdownV4.vue.js";
3
- import pe from "./DefaultDropdownTrigger.vue.js";
1
+ import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; import { defineComponent as ne, provide as le, ref as c, computed as K, onMounted as te, watch as E, openBlock as g, createBlock as D, unref as d, withCtx as h, createVNode as C, mergeProps as z, createSlots as oe, renderSlot as ie, createElementVNode as M, withModifiers as S, createTextVNode as de, createElementBlock as B, withDirectives as ae, Fragment as se, renderList as re, vShow as ce, createCommentVNode as ue } from "vue";
2
+ import pe from "./DropdownV4.vue.js";
3
+ import ye from "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
5
  import "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
@@ -9,14 +9,14 @@ import "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import w from "./OptionV4.vue.js";
11
11
  import "./ConditionalDropdown.vue.js";
12
- import { useChildOptions as ye } from "../composables/useChildOptions.js";
12
+ import { useChildOptions as he } from "../composables/useChildOptions.js";
13
13
  import fe from "../../search/v4/SearchV4.vue.js";
14
- import { useTestIdAttrs as he } from "../../../utils/testIds.js";
14
+ import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
15
15
  import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
16
- const ve = {
16
+ const me = {
17
17
  key: 0,
18
18
  class: "child-options"
19
- }, qe = /* @__PURE__ */ ee({
19
+ }, Ae = /* @__PURE__ */ ne({
20
20
  __name: "TreeDropdown",
21
21
  props: {
22
22
  options: null,
@@ -44,7 +44,7 @@ const ve = {
44
44
  emits: ["update:selected", "update:isOpen"],
45
45
  setup(t, { emit: b }) {
46
46
  const n = t;
47
- ne("isTreeDropdown", !0);
47
+ le("isTreeDropdown", !0);
48
48
  const m = c([]), u = c([]), T = c({}), O = c(!1), i = c([...n.selected]), p = c(""), x = c(!0), N = K(() => u.value.reduce((e, o) => (o[n.optionChildrenKey] && o[n.optionChildrenKey].length && o[n.optionChildrenKey].forEach(() => {
49
49
  e = e + 1;
50
50
  }), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
@@ -53,9 +53,9 @@ const ve = {
53
53
  ...e[n.optionChildrenKey]
54
54
  ]);
55
55
  }), m.value = [...n.options], u.value = [...n.options];
56
- }, { hasChildren: h, getChildren: v, allChildrenSelected: k, someChildrenSelected: P } = ye(i, n.optionChildrenKey), q = (e) => {
57
- if (h(e)) {
58
- k(e) ? i.value = i.value.filter(
56
+ }, { hasChildren: f, getChildren: v, allChildrenSelected: I, someChildrenSelected: P } = he(i, n.optionChildrenKey), q = (e) => {
57
+ if (f(e)) {
58
+ I(e) ? i.value = i.value.filter(
59
59
  (o) => !v(e).includes(o)
60
60
  ) : i.value = [
61
61
  ...i.value.filter((o) => !v(e).includes(o)),
@@ -66,7 +66,7 @@ const ve = {
66
66
  i.value.includes(e) ? i.value = i.value.filter(
67
67
  (o) => o !== e
68
68
  ) : i.value = [...i.value, e];
69
- }, A = (e) => i.value.includes(e), J = (e) => 1 + (h(e) ? v(e).length : 0), j = () => {
69
+ }, A = (e) => i.value.includes(e), J = (e) => 1 + (f(e) ? v(e).length : 0), j = () => {
70
70
  b("update:selected", i.value), L.value = y.value;
71
71
  }, F = () => {
72
72
  i.value = [];
@@ -76,8 +76,8 @@ const ve = {
76
76
  if (n.selected?.includes(l))
77
77
  e.add(l);
78
78
  else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
79
- for (const r of l[n.optionChildrenKey])
80
- if (n.selected?.includes(r)) {
79
+ for (const s of l[n.optionChildrenKey])
80
+ if (n.selected?.includes(s)) {
81
81
  e.add(l);
82
82
  break;
83
83
  }
@@ -88,61 +88,56 @@ const ve = {
88
88
  !n.selected.includes(l) && !e.has(l) && o.push(l);
89
89
  }), o;
90
90
  };
91
- le(() => {
91
+ te(() => {
92
92
  O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
93
93
  a.value[e] = 1;
94
94
  }));
95
- }), g(
95
+ }), E(
96
96
  () => n.options,
97
97
  () => {
98
98
  U();
99
99
  }
100
- ), g(
100
+ ), E(
101
101
  () => n.selected,
102
102
  (e, o) => {
103
103
  JSON.stringify(e) !== JSON.stringify(o) && (i.value = [...n.selected]);
104
104
  }
105
105
  );
106
- const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value);
107
- g(
108
- () => n.isOpen,
109
- () => {
110
- n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
111
- }
112
- );
113
- const a = c({}), Q = (e) => {
106
+ const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value), Q = (e) => {
107
+ b("update:isOpen", e), n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
108
+ }, a = c({}), R = (e) => {
114
109
  a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
115
110
  };
116
- function R(e, o) {
117
- const l = e.toLowerCase(), r = [];
118
- return o.value.forEach((s) => {
119
- const E = s[n.optionNameKey].toLowerCase().includes(l), V = T.value[s[n.optionUniqueIdKey]]?.filter(
120
- (_) => _[n.optionNameKey].toLowerCase().includes(l)
111
+ function W(e, o) {
112
+ const l = e.toLowerCase(), s = [];
113
+ return o.value.forEach((r) => {
114
+ const k = r[n.optionNameKey].toLowerCase().includes(l), V = T.value[r[n.optionUniqueIdKey]]?.filter(
115
+ (ee) => ee[n.optionNameKey].toLowerCase().includes(l)
121
116
  ) || [];
122
- (E || V.length > 0) && (s[n.optionChildrenKey] = V, r.push(s));
123
- }), r;
117
+ (k || V.length > 0) && (r[n.optionChildrenKey] = V, s.push(r));
118
+ }), s;
124
119
  }
125
- const W = (e) => {
126
- const o = R(e, u);
120
+ const X = (e) => {
121
+ const o = W(e, u);
127
122
  e && (Object.keys(a.value).forEach((l) => {
128
123
  delete a.value[l];
129
124
  }), o.forEach((l) => {
130
125
  Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
131
126
  })), m.value = o;
132
- }, X = K(() => {
127
+ }, Y = K(() => {
133
128
  const e = n.options.length, o = n.options.reduce(
134
- (l, r) => (a.value[r[n.optionUniqueIdKey]] && (l = l + r[n.optionChildrenKey].length), l),
129
+ (l, s) => (a.value[s[n.optionUniqueIdKey]] && (l = l + s[n.optionChildrenKey].length), l),
135
130
  0
136
131
  );
137
132
  return e + o;
138
133
  });
139
- g(
134
+ E(
140
135
  () => p.value,
141
136
  () => {
142
- W(p.value), x.value = !p.value;
137
+ X(p.value), x.value = !p.value;
143
138
  }
144
139
  );
145
- const Y = () => {
140
+ const Z = () => {
146
141
  y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
147
142
  if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
148
143
  for (const o of e[n.optionChildrenKey])
@@ -150,8 +145,8 @@ const ve = {
150
145
  else
151
146
  i.value = [e, ...i.value];
152
147
  }));
153
- }, Z = he(n.testId, $);
154
- return (e, o) => (C(), D(d(ue), {
148
+ }, _ = ve(n.testId, $);
149
+ return (e, o) => (g(), D(d(pe), {
155
150
  multi: "",
156
151
  class: "tree-dropdown",
157
152
  "show-select-all": x.value,
@@ -170,27 +165,27 @@ const ve = {
170
165
  "override-option-count-calculation": J,
171
166
  "trigger-show-all-selected-text": !1,
172
167
  "predefined-trigger": "default",
173
- "custom-number-of-displayed-options": d(X),
174
- "onUpdate:isOpen": o[2] || (o[2] = (l) => b("update:isOpen", l)),
168
+ "custom-number-of-displayed-options": d(Y),
169
+ "onUpdate:isOpen": Q,
175
170
  onApply: j,
176
171
  onClear: F
177
172
  }, {
178
- "dropdown-trigger": f(({ defaultTriggerProps: l }) => [
179
- I(d(pe), z(l, {
173
+ "dropdown-trigger": h(({ defaultTriggerProps: l }) => [
174
+ C(d(ye), z(l, {
180
175
  "all-selected": L.value,
181
176
  "show-all-selected-text": ""
182
- }), te({ _: 2 }, [
177
+ }), oe({ _: 2 }, [
183
178
  e.$slots["trigger-end-icon"] ? {
184
179
  name: "end-icon",
185
- fn: f(() => [
186
- oe(e.$slots, "trigger-end-icon", {}, void 0, !0)
180
+ fn: h(() => [
181
+ ie(e.$slots, "trigger-end-icon", {}, void 0, !0)
187
182
  ]),
188
183
  key: "0"
189
184
  } : void 0
190
185
  ]), 1040, ["all-selected"])
191
186
  ]),
192
- "inline-search": f(() => [
193
- I(d(fe), {
187
+ "inline-search": h(() => [
188
+ C(d(fe), {
194
189
  modelValue: p.value,
195
190
  "onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
196
191
  class: "tree-search",
@@ -201,30 +196,30 @@ const ve = {
201
196
  "test-id": t.testId
202
197
  }, null, 8, ["modelValue", "placeholder", "test-id"])
203
198
  ]),
204
- "select-all": f(() => [
199
+ "select-all": h(() => [
205
200
  M("li", null, [
206
- I(d(w), z({
201
+ C(d(w), z({
207
202
  "aria-selected": d(y),
208
203
  "aria-disabled": !!t.disabled,
209
204
  "selected-prop": d(y),
210
205
  "is-indeterminate": d(H),
211
206
  "is-multi": "",
212
207
  "select-all-option": ""
213
- }, d(Z)[d($).SELECT_ALL], {
214
- onClick: o[1] || (o[1] = S((l) => Y(), ["stop"]))
208
+ }, d(_)[d($).SELECT_ALL], {
209
+ onClick: o[1] || (o[1] = S((l) => Z(), ["stop"]))
215
210
  }), {
216
- default: f(() => [
217
- ie(" Select all ")
211
+ default: h(() => [
212
+ de(" Select all ")
218
213
  ]),
219
214
  _: 1
220
215
  }, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
221
216
  ])
222
217
  ]),
223
- default: f(({ option: l, index: r }) => [
224
- I(d(w), {
218
+ default: h(({ option: l, index: s }) => [
219
+ C(d(w), {
225
220
  option: l,
226
- "selected-prop": d(h)(l) ? d(k)(l) : A(l),
227
- "is-indeterminate": !d(k)(l) && d(P)(l),
221
+ "selected-prop": d(f)(l) ? d(I)(l) : A(l),
222
+ "is-indeterminate": !d(I)(l) && d(P)(l),
228
223
  disabled: l[t.disabledOptionKey],
229
224
  "name-key": t.optionNameKey,
230
225
  "image-key": t.optionImageKey,
@@ -233,20 +228,20 @@ const ve = {
233
228
  "end-icon-key": t.optionEndIconKey,
234
229
  "end-icon-type": t.optionEndIconType,
235
230
  "end-text-icon-key": t.optionEndTextIconKey,
236
- "tree-main-option": d(h)(l),
231
+ "tree-main-option": d(f)(l),
237
232
  "tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
238
233
  "stop-option-click-event-propagation": "",
239
234
  "is-multi": "",
240
235
  onClick: S(() => q(l), ["stop"]),
241
- onToggleTreeCollapse: Q
236
+ onToggleTreeCollapse: R
242
237
  }, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-main-option", "tree-main-option-expanded", "onClick"]),
243
- d(h)(l) ? (C(), B("div", ve, [
244
- de(M("div", null, [
245
- (C(!0), B(ae, null, re(d(v)(l), (s, E) => (C(), D(d(w), {
246
- key: `${r}-${E}`,
247
- option: s,
248
- "selected-prop": A(s),
249
- disabled: s[t.disabledOptionKey],
238
+ d(f)(l) ? (g(), B("div", me, [
239
+ ae(M("div", null, [
240
+ (g(!0), B(se, null, re(d(v)(l), (r, k) => (g(), D(d(w), {
241
+ key: `${s}-${k}`,
242
+ option: r,
243
+ "selected-prop": A(r),
244
+ disabled: r[t.disabledOptionKey],
250
245
  "name-key": t.optionNameKey,
251
246
  "image-key": t.optionImageKey,
252
247
  "icon-key": t.optionIconKey,
@@ -257,17 +252,17 @@ const ve = {
257
252
  "tree-child-shown": a.value[l[t.optionUniqueIdKey]],
258
253
  "stop-option-click-event-propagation": "",
259
254
  "is-multi": "",
260
- onClick: S(() => q(s), ["stop"])
255
+ onClick: S(() => q(r), ["stop"])
261
256
  }, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-child-shown", "onClick"]))), 128))
262
257
  ], 512), [
263
- [se, a.value[l[t.optionUniqueIdKey]]]
258
+ [ce, a.value[l[t.optionUniqueIdKey]]]
264
259
  ])
265
- ])) : ce("", !0)
260
+ ])) : ue("", !0)
266
261
  ]),
267
262
  _: 3
268
263
  }, 8, ["show-select-all", "is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]));
269
264
  }
270
265
  });
271
266
  export {
272
- qe as default
267
+ Ae as default
273
268
  };
@@ -1576,13 +1576,31 @@ declare const DropdownTypes: () => (({
1576
1576
  type: import("vue").PropType<string>;
1577
1577
  default: string;
1578
1578
  };
1579
+ iconName: {
1580
+ type: import("vue").PropType<string>;
1581
+ default: string;
1582
+ };
1583
+ iconType: {
1584
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
1585
+ default: string;
1586
+ };
1579
1587
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1580
1588
  testId: {
1581
1589
  type: import("vue").PropType<string>;
1582
1590
  default: string;
1583
1591
  };
1592
+ iconName: {
1593
+ type: import("vue").PropType<string>;
1594
+ default: string;
1595
+ };
1596
+ iconType: {
1597
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
1598
+ default: string;
1599
+ };
1584
1600
  }>>, {
1585
1601
  testId: string;
1602
+ iconName: string;
1603
+ iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
1586
1604
  }> | import("vue").DefineComponent<{
1587
1605
  label: {
1588
1606
  type: import("vue").PropType<string>;
@@ -1,7 +1,7 @@
1
1
  import o from "./DataGrid.vue2.js";
2
- /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css"; //*');
4
- const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-6b54ac22"]]);
2
+ /* empty css */import a from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css"; //*');
4
+ const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-86ea5d2a"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css"; import { defineComponent as ce, useCssVars as re, unref as t, useSlots as ue, computed as m, openBlock as i, createElementBlock as o, createElementVNode as u, normalizeStyle as T, normalizeClass as S, renderSlot as c, createVNode as h, withCtx as w, createTextVNode as E, toDisplayString as B, createCommentVNode as r, isRef as he, Fragment as p, renderList as I, mergeProps as M, createBlock as z } from "vue";
1
+ import "../../../DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css"; import { defineComponent as ce, useCssVars as re, unref as t, useSlots as ue, computed as m, openBlock as i, createElementBlock as d, createElementVNode as u, normalizeStyle as T, normalizeClass as S, renderSlot as c, createVNode as h, withCtx as w, createTextVNode as E, toDisplayString as B, createCommentVNode as r, isRef as he, Fragment as p, renderList as I, mergeProps as M, createBlock as z } from "vue";
2
2
  import A from "../../typography/v4/Typography.vue.js";
3
3
  import ye from "../../skeleton/v4/SkeletonV4.vue.js";
4
4
  import fe from "../../emptyState/v4/EmptyStateV4.vue.js";
@@ -64,10 +64,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
64
64
  setup(s, { expose: k, emit: f }) {
65
65
  const l = s;
66
66
  re((a) => ({
67
- "3041fee8": s.zIndexBase,
68
- "8ac5cc00": t(_),
69
- "4f8aacf9": t(N),
70
- "65a66d41": t(Z)
67
+ "1d1d1477": s.zIndexBase,
68
+ "2f1951ab": t(_),
69
+ d450b438: t(N),
70
+ "43af326c": t(Z)
71
71
  }));
72
72
  const g = ue(), Y = (a) => l.rowCustomClassKey && l.rows[a] ? l.rows[a][l.rowCustomClassKey] : "", {
73
73
  list: V,
@@ -90,26 +90,26 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
90
90
  activeMenuRow: ee,
91
91
  scrollTo: te
92
92
  } = Se(l, f), K = m(() => !!g.footer), se = m(
93
- () => l.title || g.title || j || g["table-header-actions"] || g["table-header-pre-search"]
93
+ () => l.title || g.title || j.value || g["table-header-actions"] || g["table-header-pre-search"]
94
94
  ), b = be(l, "search", f), ae = m(() => l.selection.length || 0), L = m(() => {
95
- const a = l.rows.map((d, e) => l.getRowId(d, e));
96
- return !!a.length && a.every((d) => C(d));
97
- }), C = (a) => l.selection.findIndex((d) => l.selectedMatcher(a, d)) !== -1, le = (a) => {
95
+ const a = l.rows.map((o, e) => l.getRowId(o, e));
96
+ return !!a.length && a.every((o) => C(o));
97
+ }), C = (a) => l.selection.findIndex((o) => l.selectedMatcher(a, o)) !== -1, le = (a) => {
98
98
  C(a) ? (x(
99
99
  l.selection.filter(
100
- (d) => !l.selectedMatcher(a, d)
100
+ (o) => !l.selectedMatcher(a, o)
101
101
  )
102
102
  ), f("selectRow", !1)) : (x([...l.selection, a]), f("selectRow", !0));
103
103
  }, ie = () => {
104
104
  if (L.value)
105
105
  x([]), f("selectAll", !1);
106
106
  else {
107
- const a = l.rows.map((d, e) => l.getRowId(d, e)).filter((d) => !C(d));
107
+ const a = l.rows.map((o, e) => l.getRowId(o, e)).filter((o) => !C(o));
108
108
  x([...l.selection, ...a]), f("selectAll", !0);
109
109
  }
110
110
  }, x = (a) => {
111
111
  f("update:selection", a);
112
- }, oe = (a) => !l.isLoading && $.value === a, de = m(
112
+ }, de = (a) => !l.isLoading && $.value === a, oe = m(
113
113
  () => l.emptyStateVariant ?? (b.value ? "no-results" : "no-data")
114
114
  ), ne = m(
115
115
  () => l.emptyStateSubtitle ? l.emptyStateSubtitle : b.value ? "Search again with different filters" : void 0
@@ -122,10 +122,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
122
122
  }));
123
123
  return k({
124
124
  scrollTo: te
125
- }), (a, d) => (i(), o("div", {
125
+ }), (a, o) => (i(), d("div", {
126
126
  class: "table-container",
127
127
  "data-testid": `${s.testId}-${t(y).CONTAINER}`,
128
- onMouseleave: d[3] || (d[3] = (e) => $.value = null)
128
+ onMouseleave: o[3] || (o[3] = (e) => $.value = null)
129
129
  }, [
130
130
  u("table", {
131
131
  ref: t(Q).ref,
@@ -134,10 +134,10 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
134
134
  hasFooter: t(K)
135
135
  }),
136
136
  "data-testid": `${s.testId}-${t(y).TABLE}`,
137
- onScrollPassive: d[2] || (d[2] = //@ts-ignore
137
+ onScrollPassive: o[2] || (o[2] = //@ts-ignore
138
138
  (...e) => t(F) && t(F)(...e))
139
139
  }, [
140
- t(se) ? (i(), o("div", {
140
+ t(se) ? (i(), d("div", {
141
141
  key: 0,
142
142
  class: S(["table-header", { isStickyHeader: s.isStickyHeader }]),
143
143
  "data-testid": `${s.testId}-${t(y).HEADER}`
@@ -155,7 +155,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
155
155
  })
156
156
  ])
157
157
  ], 8, Te),
158
- t(g)["table-header-pre-search"] ? (i(), o("div", {
158
+ t(g)["table-header-pre-search"] ? (i(), d("div", {
159
159
  key: 0,
160
160
  class: "table-header-pre-search-content",
161
161
  "data-testid": `${s.testId}-${t(y).PRE_SEARCH_HEADER}`
@@ -170,16 +170,16 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
170
170
  u("div", Be, [
171
171
  h(t(ve), {
172
172
  modelValue: t(b),
173
- "onUpdate:modelValue": d[0] || (d[0] = (e) => he(b) ? b.value = e : null),
173
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => he(b) ? b.value = e : null),
174
174
  placeholder: s.searchPlaceholder,
175
175
  "auto-focus": s.searchAutoFocus,
176
176
  "test-id": s.testId,
177
- onOnClear: d[1] || (d[1] = (e) => f("onClearSearch"))
177
+ onOnClear: o[1] || (o[1] = (e) => f("onClearSearch"))
178
178
  }, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
179
179
  ])
180
180
  ]) : r("", !0)
181
181
  ], 8, Ee),
182
- t(g)["table-header-actions"] ? (i(), o("div", {
182
+ t(g)["table-header-actions"] ? (i(), d("div", {
183
183
  key: 1,
184
184
  class: "table-header-actions",
185
185
  "data-testid": `${s.testId}-${t(y).ACTIONS}`
@@ -194,7 +194,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
194
194
  class: "sections",
195
195
  "data-testid": `${s.testId}-${t(y).SECTIONS}`
196
196
  }, [
197
- (i(!0), o(p, null, I(s.sections, (e) => (i(), o("div", {
197
+ (i(!0), d(p, null, I(s.sections, (e) => (i(), d("div", {
198
198
  key: e.id,
199
199
  class: S(["section-container", { sticky: e.isSticky }])
200
200
  }, [
@@ -214,7 +214,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
214
214
  ], 2))), 128))
215
215
  ], 8, Ie),
216
216
  u("tr", null, [
217
- t(D) ? (i(), o("th", M({
217
+ t(D) ? (i(), d("th", M({
218
218
  key: 0,
219
219
  class: "checkbox-cell"
220
220
  }, t(U)), [
@@ -227,8 +227,8 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
227
227
  }, null, 8, ["disabled", "is-checked", "is-indeterminate"])
228
228
  ])
229
229
  ], 16)) : r("", !0),
230
- t(R) ? (i(), o("th", Ae)) : r("", !0),
231
- (i(!0), o(p, null, I(s.columns, (e) => (i(), o("th", {
230
+ t(R) ? (i(), d("th", Ae)) : r("", !0),
231
+ (i(!0), d(p, null, I(s.columns, (e) => (i(), d("th", {
232
232
  key: e.id,
233
233
  class: S({
234
234
  sticky: e.isSticky,
@@ -264,12 +264,12 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
264
264
  ])
265
265
  ], 2),
266
266
  u("tbody", null, [
267
- t(V).length > 0 ? (i(), o("div", M({
267
+ t(V).length > 0 ? (i(), d("div", M({
268
268
  key: 0,
269
269
  class: "table-body-wrapper",
270
270
  "data-testid": `${s.testId}-${t(y).BODY_WRAPPER}`
271
271
  }, t(W)), [
272
- (i(!0), o(p, null, I(t(V), (e) => (i(), o("tr", {
272
+ (i(!0), d(p, null, I(t(V), (e) => (i(), d("tr", {
273
273
  key: s.getRowKey(e.data, e.index),
274
274
  class: S(["table-row", {
275
275
  loading: s.isLoading || s.isLoading && !e.data || t(O).includes(e.index),
@@ -281,7 +281,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
281
281
  onMouseenter: (v) => $.value = e.index,
282
282
  onClick: (v) => f("clickRow", e.index)
283
283
  }, [
284
- t(D) ? (i(), o("td", M({
284
+ t(D) ? (i(), d("td", M({
285
285
  key: 0,
286
286
  class: "checkbox-cell"
287
287
  }, t(U)), [
@@ -290,13 +290,13 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
290
290
  "onUpdate:isChecked": (v) => le(s.getRowId(e.data, e.index))
291
291
  }, null, 8, ["is-checked", "onUpdate:isChecked"])
292
292
  ], 16)) : r("", !0),
293
- t(R) ? (i(), o("td", Ve, [
293
+ t(R) ? (i(), d("td", Ve, [
294
294
  h(ge, {
295
295
  expanded: t(P)(e.index),
296
296
  onClick: (v) => t(J)(e.index, v)
297
297
  }, null, 8, ["expanded", "onClick"])
298
298
  ])) : r("", !0),
299
- (i(!0), o(p, null, I(s.columns, (v, n) => (i(), o("td", {
299
+ (i(!0), d(p, null, I(s.columns, (v, n) => (i(), d("td", {
300
300
  key: n,
301
301
  class: S({
302
302
  sticky: s.columns[n].isSticky,
@@ -309,7 +309,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
309
309
  s.columns[n].isSticky ? t(H)[s.columns[n].id] : null
310
310
  )
311
311
  }, [
312
- !s.isLoading || s.isLoading && e.data[n] ? (i(), o("div", {
312
+ !s.isLoading || s.isLoading && e.data[n] ? (i(), d("div", {
313
313
  key: 0,
314
314
  class: S(["table-cell", { last: n === e.data.length - 1 }])
315
315
  }, [
@@ -331,26 +331,26 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
331
331
  h(t(ye), { round: "" })
332
332
  ])
333
333
  ], 6))), 128)),
334
- t(R) && t(P)(e.index) ? (i(), o("div", Ne, [
334
+ t(R) && t(P)(e.index) ? (i(), d("div", Ne, [
335
335
  c(a.$slots, "expanded", {
336
336
  row: e,
337
337
  gridColumnTemplate: t(N)
338
338
  })
339
339
  ])) : r("", !0),
340
- oe(e.index) ? (i(), o("div", Fe, [
340
+ de(e.index) ? (i(), d("div", Fe, [
341
341
  c(a.$slots, "floating-row", {
342
342
  row: e,
343
343
  rowIndex: e.index
344
344
  })
345
345
  ])) : r("", !0)
346
346
  ], 42, Me))), 128))
347
- ], 16, Le)) : (i(), o("div", Oe, [
347
+ ], 16, Le)) : (i(), d("div", Oe, [
348
348
  c(a.$slots, "empty-state", {}, () => [
349
349
  h(t(fe), {
350
350
  class: "empty-state",
351
351
  title: s.emptyStateTitle,
352
352
  subtitle: t(ne),
353
- variant: t(de),
353
+ variant: t(oe),
354
354
  "icon-name": "file-search",
355
355
  "test-id": `${s.testId}-${t(y).EMPTY_STATE}`
356
356
  }, null, 8, ["title", "subtitle", "variant", "test-id"])
@@ -358,7 +358,7 @@ const Re = ["data-testid"], Ce = ["data-testid"], xe = ["data-testid"], Te = ["d
358
358
  ]))
359
359
  ])
360
360
  ], 46, Ce),
361
- t(K) ? (i(), o("div", De, [
361
+ t(K) ? (i(), d("div", De, [
362
362
  c(a.$slots, "footer")
363
363
  ])) : r("", !0)
364
364
  ], 40, Re));
package/index.d.ts CHANGED
@@ -19,7 +19,7 @@ import * as tableV4 from '@/components/table/v4';
19
19
  import * as tableCellsV3 from '@/components/table-cells/v3';
20
20
  import * as snackbarV3 from '@/components/snackbar/v3';
21
21
  declare const _default: {
22
- nFormatter(num: number): string;
22
+ nFormatter(num: number, formatLowDigits?: boolean): string;
23
23
  DEFAULT_FALLBACK: "N/A";
24
24
  diffInPersentage: (valueA: string | number, valueB: string | number, fallback?: string) => string | number;
25
25
  formatNumberWithCommas: (num: string | number, fallback?: string) => string;
@@ -18216,13 +18216,31 @@ declare const _default: {
18216
18216
  type: import("vue").PropType<string>;
18217
18217
  default: string;
18218
18218
  };
18219
+ iconName: {
18220
+ type: import("vue").PropType<string>;
18221
+ default: string;
18222
+ };
18223
+ iconType: {
18224
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
18225
+ default: string;
18226
+ };
18219
18227
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18220
18228
  testId: {
18221
18229
  type: import("vue").PropType<string>;
18222
18230
  default: string;
18223
18231
  };
18232
+ iconName: {
18233
+ type: import("vue").PropType<string>;
18234
+ default: string;
18235
+ };
18236
+ iconType: {
18237
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
18238
+ default: string;
18239
+ };
18224
18240
  }>>, {
18225
18241
  testId: string;
18242
+ iconName: string;
18243
+ iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
18226
18244
  }>;
18227
18245
  ChipDropdownTrigger: import("vue").DefineComponent<{
18228
18246
  label: {
@@ -20767,13 +20785,31 @@ declare const _default: {
20767
20785
  type: import("vue").PropType<string>;
20768
20786
  default: string;
20769
20787
  };
20788
+ iconName: {
20789
+ type: import("vue").PropType<string>;
20790
+ default: string;
20791
+ };
20792
+ iconType: {
20793
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
20794
+ default: string;
20795
+ };
20770
20796
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20771
20797
  testId: {
20772
20798
  type: import("vue").PropType<string>;
20773
20799
  default: string;
20774
20800
  };
20801
+ iconName: {
20802
+ type: import("vue").PropType<string>;
20803
+ default: string;
20804
+ };
20805
+ iconType: {
20806
+ type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate">;
20807
+ default: string;
20808
+ };
20775
20809
  }>>, {
20776
20810
  testId: string;
20811
+ iconName: string;
20812
+ iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
20777
20813
  }> | import("vue").DefineComponent<{
20778
20814
  label: {
20779
20815
  type: import("vue").PropType<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.12-rc.8",
3
+ "version": "2.1.12-test.57",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1,4 +1,4 @@
1
1
  export declare const DEFAULT_FALLBACK = "N/A";
2
- export declare function nFormatter(num: number): string;
2
+ export declare function nFormatter(num: number, formatLowDigits?: boolean): string;
3
3
  export declare const diffInPersentage: (valueA: number | string, valueB: number | string, fallback?: string | null) => string | number;
4
4
  export declare const formatNumberWithCommas: (num: number | string, fallback?: string | null) => string;