@ironsource/shared-ui 2.1.12-rc.6 → 2.1.12-rc.8
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.
- package/index.d.ts +4 -0
- package/index.js +103 -101
- package/package.json +1 -1
- package/utils/formatNumbers.js +19 -5
- package/utils/index.js +7 -0
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 './
|
|
2
|
-
import { AppTriggerTypes as
|
|
3
|
-
import { AutocompleteDropdownTypes as
|
|
4
|
-
import { MenuItemTypes as
|
|
1
|
+
import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_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
|
|
7
|
-
import { FloatingToolbarTypes as
|
|
8
|
-
import { IncludeExcludeTypes as
|
|
9
|
-
import { ID_INJECTION_KEY as
|
|
10
|
-
import { FilterDropdownTypes as
|
|
11
|
-
import { TypographyTypes as
|
|
12
|
-
import { TypographyTypesV4 as
|
|
13
|
-
import { MultiBarTypes as
|
|
14
|
-
import { FoldableSectionTypes as
|
|
15
|
-
import { FormCardTypes as
|
|
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
|
|
24
|
-
import * as
|
|
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
|
|
57
|
-
import * as
|
|
58
|
-
import * as
|
|
59
|
-
import * as
|
|
60
|
-
import * as
|
|
61
|
-
import * as
|
|
62
|
-
import * as
|
|
63
|
-
import * as
|
|
64
|
-
import * as
|
|
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
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
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
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
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
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
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
|
|
103
|
-
const
|
|
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
|
-
|
|
160
|
+
Cr as AddFilterButton,
|
|
159
161
|
Gr as Alert,
|
|
160
162
|
qo as AlertTypes,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
tr as AppIcon,
|
|
164
|
+
so as AppIconTypes,
|
|
165
|
+
Uo as AppTrigger,
|
|
166
|
+
eo as AppTriggerTypes,
|
|
165
167
|
Qr as Autocomplete,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
Xo as AutocompleteDropdown,
|
|
169
|
+
to as AutocompleteDropdownTypes,
|
|
168
170
|
Go as AutocompleteTypes,
|
|
169
171
|
qr as Banner,
|
|
170
172
|
jo as BannerTypes,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
Rr as CardPanel,
|
|
174
|
+
Ur as Chart,
|
|
173
175
|
Qo as ChartTypes,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
Oo as FormFieldTypes,
|
|
186
|
+
vr as FormRow,
|
|
187
|
+
hr as Heading,
|
|
188
|
+
co as ID_INJECTION_KEY,
|
|
187
189
|
fr as IncludeExclude,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
package/utils/formatNumbers.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
5
|
-
const r = e /
|
|
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
|
-
|
|
20
|
+
s as DEFAULT_FALLBACK,
|
|
21
|
+
N as diffInPersentage,
|
|
22
|
+
c as formatNumberWithCommas,
|
|
23
|
+
u as nFormatter
|
|
10
24
|
};
|
package/utils/index.js
ADDED