@ironsource/shared-ui 2.1.12-rc.5 → 2.1.12-rc.7

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-8d5521da]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 10px}.inline-search[data-v-8d5521da]{width:100%}.contain-accept[data-v-8d5521da]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-8d5521da]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-8d5521da]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
@@ -1,7 +1,7 @@
1
1
  import o from "./ConditionalDropdown.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_96c7507e_lang.css"; //*');
4
- const n = /* @__PURE__ */ e(o, [["__scopeId", "data-v-96c7507e"]]);
2
+ /* empty css */import d from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_lang.css"; //*');
4
+ const p = /* @__PURE__ */ d(o, [["__scopeId", "data-v-8d5521da"]]);
5
5
  export {
6
- n as default
6
+ p as default
7
7
  };
@@ -1,4 +1,4 @@
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";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_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";
@@ -15,7 +15,7 @@ import { useDebounceFn as ue } from "@vueuse/core";
15
15
  const re = { class: "conditional-container" }, se = {
16
16
  key: 0,
17
17
  class: "custom-list-area"
18
- }, we = /* @__PURE__ */ W({
18
+ }, Te = /* @__PURE__ */ W({
19
19
  __name: "ConditionalDropdown",
20
20
  props: {
21
21
  selectedCondition: null,
@@ -55,114 +55,114 @@ 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), 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;
58
+ }, T = s(null), p = s(!0), t = s([]), n = s(L()), A = 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) && !t.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
59
+ const l = p.value ? 4 : 4.5, o = t.value.length > 4 ? t.value.length : l;
60
60
  if (e.groupedOptions) {
61
- let o = 0;
62
- return a.value.forEach((y) => {
63
- y.options && (o = o + y.options.length);
64
- }), o > 4 ? o : l;
61
+ let a = 0;
62
+ return t.value.forEach((y) => {
63
+ y.options && (a = a + y.options.length);
64
+ }), a > 4 ? a : l;
65
65
  }
66
- return t > l ? t : l;
67
- }), M = (l, t) => {
68
- if (e.infiniteLoading && i.value.multi && Array.isArray(n.value) && n.value.length && l && t.length) {
69
- const o = [], y = n.value.filter(
66
+ return o > l ? o : l;
67
+ }), M = (l, o) => {
68
+ if (e.infiniteLoading && i.value.multi && Array.isArray(n.value) && n.value.length && l && o.length) {
69
+ const a = [], y = n.value.filter(
70
70
  (v) => v[e.optionNameKey].includes(l)
71
71
  );
72
- return t.forEach((v) => {
72
+ return o.forEach((v) => {
73
73
  y.find(
74
74
  (j) => j[e.comparingKey] === v[e.comparingKey]
75
- ) && o.push(v[e.comparingKey]);
75
+ ) && a.push(v[e.comparingKey]);
76
76
  }), y.filter(
77
- (v) => !o.includes(v[e.comparingKey])
77
+ (v) => !a.includes(v[e.comparingKey])
78
78
  );
79
79
  }
80
80
  return [];
81
- }, A = async (l) => {
81
+ }, w = async (l) => {
82
82
  try {
83
83
  d.value = !0;
84
- const t = await e.fetchFnCallback(l), o = M(
84
+ const o = await e.fetchFnCallback(l), a = M(
85
85
  l,
86
- t
86
+ o
87
87
  );
88
- a.value = [...o, ...t], d.value = !1;
89
- } catch (t) {
90
- d.value = !1, console.error("Error fetching data:", t);
88
+ t.value = [...a, ...o], d.value = !1;
89
+ } catch (o) {
90
+ d.value = !1, console.error("Error fetching data:", o);
91
91
  }
92
92
  }, E = async () => {
93
93
  if (e.infiniteLoading)
94
94
  try {
95
95
  C.value = !0;
96
96
  const l = await e.loadMoreFn();
97
- C.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
97
+ C.value = !1, Array.isArray(l) && (t.value = [...t.value, ...l]);
98
98
  } catch (l) {
99
99
  C.value = !1, console.error("Error fetching data:", l);
100
100
  }
101
- }, V = ue(
102
- A,
101
+ }, x = ue(
102
+ w,
103
103
  e.fetchDataDebounceTime
104
104
  ), b = (l) => {
105
- l.length >= e.minCharsToStart ? (V(l), w.value?.scrollTo(0)) : e.infiniteLoading && i.value.multi ? a.value = k.value || [] : a.value = [];
106
- }, x = () => {
107
- u.value && a.value.length && !d.value && !i.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
105
+ l.length >= e.minCharsToStart ? (x(l), T.value?.scrollTo(0)) : e.infiniteLoading && i.value.multi ? t.value = k.value || [] : t.value = [];
106
+ }, P = () => {
107
+ u.value && t.value.length && !d.value && !i.value.multi ? t.value[0].conditionalOptions ? t.value[0] = {
108
108
  [e.optionNameKey]: u.value,
109
109
  conditionalOptions: !0,
110
110
  conditionalName: i.value.label,
111
111
  [e.comparingKey]: u.value
112
- } : a.value = [
112
+ } : t.value = [
113
113
  {
114
114
  [e.optionNameKey]: u.value,
115
115
  conditionalOptions: !0,
116
116
  conditionalName: i.value.label,
117
117
  [e.comparingKey]: u.value
118
118
  },
119
- ...a.value
120
- ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
119
+ ...t.value
120
+ ] : t.value.length && t.value[0].conditionalOptions && t.value.shift();
121
121
  }, N = () => {
122
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);
126
- }), K([i, a], () => {
127
- x();
126
+ }), K([i, t], () => {
127
+ P();
128
128
  }), K(
129
129
  () => e.loadingOverride,
130
- (l, t) => {
131
- !l && t && !e.infiniteLoading && A(e.searchQuery);
130
+ (l, o) => {
131
+ !l && o && !e.infiniteLoading && w(e.searchQuery);
132
132
  }
133
133
  );
134
- const P = () => {
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();
134
+ const Q = () => {
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 }, A.value = p.value), N();
136
136
  };
137
- K(i, (l, t) => {
138
- i.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
137
+ K(i, (l, o) => {
138
+ i.value.multi ? (d.value = !0, !o.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
139
139
  d.value = !1, p.value = !0;
140
- }, 100)) : (d.value = !0, setTimeout(() => {
141
- d.value = !1, p.value = !1;
140
+ }, 100)) : (!o.multi && !l.multi && (d.value = !0), setTimeout(() => {
141
+ !o.multi && !l.multi && (d.value = !1), p.value = !1;
142
142
  }, 100));
143
143
  });
144
- const Q = (l) => {
144
+ const R = (l) => {
145
145
  k.value = l;
146
- }, R = () => {
146
+ }, z = () => {
147
147
  n.value = [], S.value = [], i.value = null, m.value = e.label, u.value = "", h("clear");
148
- }, z = (l) => {
149
- l && i.value.multi && e.infiniteLoading && n.value && (a.value = n.value, u.value && b(u.value));
148
+ }, V = (l) => {
149
+ l && i.value.multi && e.infiniteLoading && n.value && (t.value = n.value, u.value && b(u.value));
150
150
  };
151
151
  q(() => {
152
- (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, n.value = e.appliedSelections, k.value = e.appliedSelections), N();
152
+ (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (t.value = e.appliedSelections, n.value = e.appliedSelections, k.value = e.appliedSelections), N();
153
153
  });
154
154
  const $ = () => {
155
155
  h("closed");
156
156
  };
157
- return (l, t) => (D(), G(c(F), {
157
+ return (l, o) => (D(), G(c(F), {
158
158
  ref_key: "dropdownRef",
159
- ref: w,
159
+ ref: T,
160
160
  selected: n.value,
161
- "onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
161
+ "onUpdate:selected": o[2] || (o[2] = (a) => n.value = a),
162
162
  "predefined-trigger": "chip",
163
- "display-value": (o) => o?.[r.optionNameKey],
163
+ "display-value": (a) => a?.[r.optionNameKey],
164
164
  multi: p.value,
165
- options: a.value,
165
+ options: t.value,
166
166
  placeholder: m.value,
167
167
  "search-placeholder": "Search",
168
168
  "option-name-key": r.optionNameKey,
@@ -181,36 +181,36 @@ const re = { class: "conditional-container" }, se = {
181
181
  "option-image-key": r.optionImageKey,
182
182
  "option-icon-key": r.optionIconKey,
183
183
  "option-icon-type": r.optionIconType,
184
- "onUpdate:isOpen": z,
184
+ "onUpdate:isOpen": V,
185
185
  onOnsearch: b,
186
- onApply: P,
186
+ onApply: Q,
187
187
  onLoadMore: E,
188
- onUnsavedSelectionUpdate: Q,
188
+ onUnsavedSelectionUpdate: R,
189
189
  onClosed: $
190
190
  }, {
191
- "dropdown-trigger": f(({ defaultTriggerProps: o }) => [
192
- g(c(ae), H(o, {
191
+ "dropdown-trigger": f(({ defaultTriggerProps: a }) => [
192
+ g(c(ae), H(a, {
193
193
  label: m.value,
194
194
  "selected-option": c(S),
195
- multi: T.value,
195
+ multi: A.value,
196
196
  "cancel-all-selected-display": "",
197
197
  "display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
198
- onClear: R
198
+ onClear: z
199
199
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
200
200
  ]),
201
201
  "dropdown-conditions": f(() => [
202
202
  J("div", re, [
203
203
  g(c(F), {
204
204
  selected: c(i),
205
- "onUpdate:selected": t[0] || (t[0] = (o) => X(i) ? i.value = o : null),
205
+ "onUpdate:selected": o[0] || (o[0] = (a) => X(i) ? i.value = a : null),
206
206
  options: r.conditionalOptions,
207
207
  "option-name-key": "label",
208
- "display-value": (o) => o?.label,
208
+ "display-value": (a) => a?.label,
209
209
  container: ".conditional-container",
210
210
  size: "small"
211
211
  }, {
212
- "dropdown-trigger": f(({ buttonTriggerProps: o }) => [
213
- g(c(te), Y(Z(o)), null, 16)
212
+ "dropdown-trigger": f(({ buttonTriggerProps: a }) => [
213
+ g(c(te), Y(Z(a)), null, 16)
214
214
  ]),
215
215
  _: 1
216
216
  }, 8, ["selected", "options", "display-value"])
@@ -219,7 +219,7 @@ const re = { class: "conditional-container" }, se = {
219
219
  "inline-search": f(() => [
220
220
  g(c(ne), {
221
221
  modelValue: u.value,
222
- "onUpdate:modelValue": t[1] || (t[1] = (o) => u.value = o),
222
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => u.value = a),
223
223
  class: "inline-search",
224
224
  placeholder: "Search",
225
225
  variant: "transparent",
@@ -228,7 +228,7 @@ 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 && !d.value ? (D(), _("div", se, [
231
+ !t.value.length && !d.value ? (D(), _("div", se, [
232
232
  g(ie, { variant: "body1" }, {
233
233
  default: f(() => [
234
234
  ee(le(c(U)), 1)
@@ -242,5 +242,5 @@ const re = { class: "conditional-container" }, se = {
242
242
  }
243
243
  });
244
244
  export {
245
- we as default
245
+ Te as default
246
246
  };
package/index.d.ts CHANGED
@@ -19,6 +19,10 @@ 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;
23
+ DEFAULT_FALLBACK: "N/A";
24
+ diffInPersentage: (valueA: string | number, valueB: string | number, fallback?: string) => string | number;
25
+ formatNumberWithCommas: (num: string | number, fallback?: string) => string;
22
26
  Popover: {
23
27
  new (...args: any[]): {
24
28
  $: import("vue").ComponentInternalInstance;
package/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import './AppTrigger.vue_vue_type_style_index_0_scoped_121aac8b_lang.css';
2
- import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
3
- import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
- import { MenuItemTypes as po } from "./components/menuItem/index.js";
1
+ import './AppIcon.vue_vue_type_style_index_0_scoped_56ba337c_lang.css';
2
+ import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
3
+ import { AutocompleteDropdownTypes as to } from "./components/autocompleteDropdown/index.js";
4
+ import { MenuItemTypes as ao } from "./components/menuItem/index.js";
5
5
  import { MenuTypes as fo } from "./components/menu/index.js";
6
- import { AppIconTypes as xo } from "./components/appIcon/index.js";
7
- import { FloatingToolbarTypes as no } from "./components/floatingToolbar/index.js";
8
- import { IncludeExcludeTypes as uo } from "./components/includeExclude/index.js";
9
- import { ID_INJECTION_KEY as To, useId as co } from "./composables/useId.js";
10
- import { FilterDropdownTypes as go } from "./components/filterDropdown/index.js";
11
- import { TypographyTypes as Io } from "./components/typography/index.js";
12
- import { TypographyTypesV4 as Eo } from "./components/typography/v4/index.js";
13
- import { MultiBarTypes as Do } from "./components/multibar/index.js";
14
- import { FoldableSectionTypes as Bo } from "./components/layout/index.js";
15
- import { FormCardTypes as bo, FormFieldTypes as wo } from "./components/forms/index.js";
6
+ import { AppIconTypes as so } from "./components/appIcon/index.js";
7
+ import { FloatingToolbarTypes as lo } from "./components/floatingToolbar/index.js";
8
+ import { IncludeExcludeTypes as $o } from "./components/includeExclude/index.js";
9
+ import { ID_INJECTION_KEY as co, useId as yo } from "./composables/useId.js";
10
+ import { FilterDropdownTypes as Fo } from "./components/filterDropdown/index.js";
11
+ import { TypographyTypes as Ao } from "./components/typography/index.js";
12
+ import { TypographyTypesV4 as Co } from "./components/typography/v4/index.js";
13
+ import { MultiBarTypes as ho } from "./components/multibar/index.js";
14
+ import { FoldableSectionTypes as Mo } from "./components/layout/index.js";
15
+ import { FormCardTypes as wo, FormFieldTypes as Oo } from "./components/forms/index.js";
16
16
  import * as o from "./components/button/v3/index.js";
17
17
  import * as r from "./components/button/v4/index.js";
18
18
  import * as e from "./components/chip/v3/index.js";
@@ -20,8 +20,8 @@ import * as m from "./components/chip/v4/index.js";
20
20
  import * as t from "./components/switch/v3/index.js";
21
21
  import * as p from "./components/switch/v4/index.js";
22
22
  import * as a from "./components/dropdown/v3/index.js";
23
- import * as f from "./components/dropdown/v4/index.js";
24
- import * as i from "./components/search/v3/index.js";
23
+ import * as i from "./components/dropdown/v4/index.js";
24
+ import * as f from "./components/search/v3/index.js";
25
25
  import * as d from "./components/search/v4/index.js";
26
26
  import * as x from "./components/filtersPanel/v3/index.js";
27
27
  import * as s from "./components/filtersPanel/v4/index.js";
@@ -53,54 +53,55 @@ import * as v from "./components/snackbar/v4/index.js";
53
53
  import * as J from "./components/radioButton/v3/index.js";
54
54
  import * as K from "./components/radioButton/v4/index.js";
55
55
  import * as P from "./components/textArea/v3/index.js";
56
- import * as _ from "./components/textArea/v4/index.js";
57
- import * as j from "./components/ThemeWrapper/index.js";
58
- import * as k from "./components/appHeader/index.js";
59
- import * as q from "./components/inlineCopy/index.js";
60
- import * as z from "./components/statusDot/index.js";
61
- import * as G from "./components/sortableList/index.js";
62
- import * as L from "./components/datePicker/v3/index.js";
63
- import * as Q from "./components/datePicker/v4/index.js";
64
- import * as R from "./components/dateRange/v3/index.js";
56
+ import * as R from "./components/textArea/v4/index.js";
57
+ import * as _ from "./components/ThemeWrapper/index.js";
58
+ import * as j from "./components/appHeader/index.js";
59
+ import * as k from "./components/inlineCopy/index.js";
60
+ import * as q from "./components/statusDot/index.js";
61
+ import * as z from "./components/sortableList/index.js";
62
+ import * as G from "./components/datePicker/v3/index.js";
63
+ import * as L from "./components/datePicker/v4/index.js";
64
+ import * as Q from "./components/dateRange/v3/index.js";
65
65
  import * as Y from "./components/dateRange/v4/index.js";
66
66
  import * as U from "./components/popover/v3/index.js";
67
67
  import * as W from "./components/popover/v4/index.js";
68
- import { useToggle as Ho } from "./composables/useToggle.js";
69
- import { useSearch as So } from "./composables/useSearch.js";
70
- import { scrollToElementByClass as vo, scrollToFirstInvalidElement as Jo, useFormValidation as Ko, yupValidation as Po } from "./composables/useFormValidation.js";
68
+ import * as X from "./utils/index.js";
69
+ import { useToggle as No } from "./composables/useToggle.js";
70
+ import { useSearch as Vo } from "./composables/useSearch.js";
71
+ import { scrollToElementByClass as Jo, scrollToFirstInvalidElement as Ko, useFormValidation as Po, yupValidation as Ro } from "./composables/useFormValidation.js";
71
72
  import { BannerTypes as jo } from "./components/banner/index.js";
72
73
  import { AlertTypes as qo } from "./components/alert/index.js";
73
74
  import { AutocompleteTypes as Go } from "./components/autocomplete/index.js";
74
75
  import { ChartTypes as Qo } from "./components/chart/index.js";
75
- import { default as Yo } from "./components/appTrigger/AppTrigger.vue.js";
76
- import { default as Wo } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
77
- import { default as Zo } from "./components/menuItem/MenuItem.vue.js";
78
- import { default as rr } from "./components/menu/Menu.vue.js";
79
- import { default as mr } from "./components/appIcon/AppIcon.vue.js";
80
- import { default as pr } from "./components/floatingToolbar/FloatingToolbar.vue.js";
76
+ import { default as Uo } from "./components/appTrigger/AppTrigger.vue.js";
77
+ import { default as Xo } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
78
+ import { default as or } from "./components/menuItem/MenuItem.vue.js";
79
+ import { default as er } from "./components/menu/Menu.vue.js";
80
+ import { default as tr } from "./components/appIcon/AppIcon.vue.js";
81
+ import { default as ar } from "./components/floatingToolbar/FloatingToolbar.vue.js";
81
82
  import { default as fr } from "./components/includeExclude/IncludeExclude.vue.js";
82
- import { default as dr } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
83
- import { default as sr } from "./components/includeExclude/IncludeExcludeOption.vue.js";
84
- import { default as lr } from "./components/includeExclude/IncludeExcludeOptionDraggable.vue.js";
85
- import { default as $r } from "./components/includeExclude/IncludeExcludeAppTrigger.vue.js";
86
- import { default as cr } from "./components/includeExclude/IncludeExcludeAppHeader.vue.js";
87
- import { default as gr } from "./components/includeExclude/IncludeExcludeChipFilter.vue.js";
88
- import { default as Ir } from "./components/filterDropdown/FilterDropdown.vue.js";
89
- import { default as Er } from "./components/filterDropdown/AddFilterButton.vue.js";
90
- import { default as Dr } from "./components/typography/Heading.vue.js";
91
- import { default as Br } from "./components/typography/Text.vue.js";
92
- import { default as br } from "./components/typography/v4/Typography.vue.js";
93
- import { default as Or } from "./components/multibar/MultiBar.vue.js";
94
- import { default as Nr } from "./components/layout/FoldableSection.vue.js";
95
- import { default as Vr } from "./components/forms/FormRow.vue.js";
96
- import { default as Jr } from "./components/forms/FormCard.vue.js";
97
- import { default as Pr } from "./components/forms/CardPanel.vue.js";
83
+ import { default as xr } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
84
+ import { default as nr } from "./components/includeExclude/IncludeExcludeOption.vue.js";
85
+ import { default as ur } from "./components/includeExclude/IncludeExcludeOptionDraggable.vue.js";
86
+ import { default as Tr } from "./components/includeExclude/IncludeExcludeAppTrigger.vue.js";
87
+ import { default as yr } from "./components/includeExclude/IncludeExcludeAppHeader.vue.js";
88
+ import { default as Fr } from "./components/includeExclude/IncludeExcludeChipFilter.vue.js";
89
+ import { default as Ar } from "./components/filterDropdown/FilterDropdown.vue.js";
90
+ import { default as Cr } from "./components/filterDropdown/AddFilterButton.vue.js";
91
+ import { default as hr } from "./components/typography/Heading.vue.js";
92
+ import { default as Mr } from "./components/typography/Text.vue.js";
93
+ import { default as wr } from "./components/typography/v4/Typography.vue.js";
94
+ import { default as Hr } from "./components/multibar/MultiBar.vue.js";
95
+ import { default as Sr } from "./components/layout/FoldableSection.vue.js";
96
+ import { default as vr } from "./components/forms/FormRow.vue.js";
97
+ import { default as Kr } from "./components/forms/FormCard.vue.js";
98
+ import { default as Rr } from "./components/forms/CardPanel.vue.js";
98
99
  import { default as jr } from "./components/forms/FormField.vue.js";
99
100
  import { default as qr } from "./components/banner/Banner.vue.js";
100
101
  import { default as Gr } from "./components/alert/Alert.vue.js";
101
102
  import { default as Qr } from "./components/autocomplete/Autocomplete.vue.js";
102
- import { default as Yr } from "./components/chart/Chart.vue.js";
103
- const X = {
103
+ import { default as Ur } from "./components/chart/Chart.vue.js";
104
+ const Z = {
104
105
  ...e,
105
106
  ...m,
106
107
  ...t,
@@ -108,8 +109,8 @@ const X = {
108
109
  ...o,
109
110
  ...r,
110
111
  ...a,
111
- ...f,
112
112
  ...i,
113
+ ...f,
113
114
  ...d,
114
115
  ...x,
115
116
  ...s,
@@ -139,9 +140,10 @@ const X = {
139
140
  ...n,
140
141
  ...l,
141
142
  ...P,
142
- ..._,
143
+ ...R,
143
144
  ...J,
144
145
  ...K,
146
+ ..._,
145
147
  ...j,
146
148
  ...k,
147
149
  ...q,
@@ -149,65 +151,65 @@ const X = {
149
151
  ...G,
150
152
  ...L,
151
153
  ...Q,
152
- ...R,
153
154
  ...Y,
154
155
  ...U,
155
- ...W
156
+ ...W,
157
+ ...X
156
158
  };
157
159
  export {
158
- Er as AddFilterButton,
160
+ Cr as AddFilterButton,
159
161
  Gr as Alert,
160
162
  qo as AlertTypes,
161
- mr as AppIcon,
162
- xo as AppIconTypes,
163
- Yo as AppTrigger,
164
- ro as AppTriggerTypes,
163
+ tr as AppIcon,
164
+ so as AppIconTypes,
165
+ Uo as AppTrigger,
166
+ eo as AppTriggerTypes,
165
167
  Qr as Autocomplete,
166
- Wo as AutocompleteDropdown,
167
- mo as AutocompleteDropdownTypes,
168
+ Xo as AutocompleteDropdown,
169
+ to as AutocompleteDropdownTypes,
168
170
  Go as AutocompleteTypes,
169
171
  qr as Banner,
170
172
  jo as BannerTypes,
171
- Pr as CardPanel,
172
- Yr as Chart,
173
+ Rr as CardPanel,
174
+ Ur as Chart,
173
175
  Qo as ChartTypes,
174
- Ir as FilterDropdown,
175
- go as FilterDropdownTypes,
176
- pr as FloatingToolbar,
177
- no as FloatingToolbarTypes,
178
- Nr as FoldableSection,
179
- Bo as FoldableSectionTypes,
180
- Jr as FormCard,
181
- bo as FormCardTypes,
176
+ Ar as FilterDropdown,
177
+ Fo as FilterDropdownTypes,
178
+ ar as FloatingToolbar,
179
+ lo as FloatingToolbarTypes,
180
+ Sr as FoldableSection,
181
+ Mo as FoldableSectionTypes,
182
+ Kr as FormCard,
183
+ wo as FormCardTypes,
182
184
  jr as FormField,
183
- wo as FormFieldTypes,
184
- Vr as FormRow,
185
- Dr as Heading,
186
- To as ID_INJECTION_KEY,
185
+ Oo as FormFieldTypes,
186
+ vr as FormRow,
187
+ hr as Heading,
188
+ co as ID_INJECTION_KEY,
187
189
  fr as IncludeExclude,
188
- cr as IncludeExcludeAppHeader,
189
- $r as IncludeExcludeAppTrigger,
190
- gr as IncludeExcludeChipFilter,
191
- dr as IncludeExcludeDragDrop,
192
- sr as IncludeExcludeOption,
193
- lr as IncludeExcludeOptionDraggable,
194
- uo as IncludeExcludeTypes,
195
- rr as Menu,
196
- Zo as MenuItem,
197
- po as MenuItemTypes,
190
+ yr as IncludeExcludeAppHeader,
191
+ Tr as IncludeExcludeAppTrigger,
192
+ Fr as IncludeExcludeChipFilter,
193
+ xr as IncludeExcludeDragDrop,
194
+ nr as IncludeExcludeOption,
195
+ ur as IncludeExcludeOptionDraggable,
196
+ $o as IncludeExcludeTypes,
197
+ er as Menu,
198
+ or as MenuItem,
199
+ ao as MenuItemTypes,
198
200
  fo as MenuTypes,
199
- Or as MultiBar,
200
- Do as MultiBarTypes,
201
- Br as Text,
202
- br as Typography,
203
- Io as TypographyTypes,
204
- Eo as TypographyTypesV4,
205
- X as default,
206
- vo as scrollToElementByClass,
207
- Jo as scrollToFirstInvalidElement,
208
- Ko as useFormValidation,
209
- co as useId,
210
- So as useSearch,
211
- Ho as useToggle,
212
- Po as yupValidation
201
+ Hr as MultiBar,
202
+ ho as MultiBarTypes,
203
+ Mr as Text,
204
+ wr as Typography,
205
+ Ao as TypographyTypes,
206
+ Co as TypographyTypesV4,
207
+ Z as default,
208
+ Jo as scrollToElementByClass,
209
+ Ko as scrollToFirstInvalidElement,
210
+ Po as useFormValidation,
211
+ yo as useId,
212
+ Vo as useSearch,
213
+ No as useToggle,
214
+ Ro as yupValidation
213
215
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.12-rc.5",
3
+ "version": "2.1.12-rc.7",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1,10 +1,24 @@
1
- function f(e) {
2
- return e >= 1e12 ? "∞" : e >= 1e9 ? i(e, 1e9, "B") : e >= 1e6 ? i(e, 1e6, "M") : e >= 1e3 ? i(e, 1e3, "K") : (e >= 100 || e >= 10, e.toFixed(0));
1
+ const s = "N/A", f = (e, i, t) => e.toLocaleString("en", {
2
+ minimumFractionDigits: i,
3
+ maximumFractionDigits: t
4
+ });
5
+ function u(e) {
6
+ return e >= 1e12 ? "∞" : e >= 1e9 ? n(e, 1e9, "B") : e >= 1e6 ? n(e, 1e6, "M") : e >= 1e3 ? n(e, 1e3, "K") : (e >= 100 || e >= 10, e.toFixed(0));
3
7
  }
4
- function i(e, o, t) {
5
- const r = e / o;
8
+ function n(e, i, t) {
9
+ const r = e / i;
6
10
  return r >= 100 ? r.toFixed(0) + t : r >= 10 ? r.toFixed(1) + t : r.toFixed(2) + t;
7
11
  }
12
+ const N = (e, i, t = s) => {
13
+ const r = Number(e), o = Number(i);
14
+ return t && (isNaN(r) || isNaN(o)) ? t : r >= o ? (o - r) / r * 100 : (r - o) / r * -100;
15
+ }, c = (e, i = s) => {
16
+ const t = Number(e);
17
+ return isNaN(t) && i ? i : f(t, 0, 2);
18
+ };
8
19
  export {
9
- f as nFormatter
20
+ s as DEFAULT_FALLBACK,
21
+ N as diffInPersentage,
22
+ c as formatNumberWithCommas,
23
+ u as nFormatter
10
24
  };
package/utils/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import { DEFAULT_FALLBACK as m, diffInPersentage as t, formatNumberWithCommas as o, nFormatter as a } from "./formatNumbers.js";
2
+ export {
3
+ m as DEFAULT_FALLBACK,
4
+ t as diffInPersentage,
5
+ o as formatNumberWithCommas,
6
+ a as nFormatter
7
+ };
@@ -1 +0,0 @@
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)}