@ironsource/shared-ui 2.1.8-rc.9 → 2.1.8-test.1
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 +1 -0
- package/index.js +116 -111
- package/package.json +1 -1
- package/utils/formatNumbers.js +15 -7
package/index.d.ts
CHANGED
|
@@ -23466,3 +23466,4 @@ export * from '@/components/banner';
|
|
|
23466
23466
|
export * from '@/components/alert';
|
|
23467
23467
|
export * from '@/components/autocomplete';
|
|
23468
23468
|
export * from '@/components/chart';
|
|
23469
|
+
export * from '@/utils';
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
|
|
2
2
|
import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as po } from "./components/menuItem/index.js";
|
|
@@ -7,12 +7,12 @@ import { AppIconTypes as xo } from "./components/appIcon/index.js";
|
|
|
7
7
|
import { FloatingToolbarTypes as no } from "./components/floatingToolbar/index.js";
|
|
8
8
|
import { IncludeExcludeTypes as uo } from "./components/includeExclude/index.js";
|
|
9
9
|
import { ID_INJECTION_KEY as To, useId as co } from "./composables/useId.js";
|
|
10
|
-
import { FilterDropdownTypes as
|
|
10
|
+
import { FilterDropdownTypes as Fo } from "./components/filterDropdown/index.js";
|
|
11
11
|
import { TypographyTypes as Io } from "./components/typography/index.js";
|
|
12
12
|
import { TypographyTypesV4 as Eo } from "./components/typography/v4/index.js";
|
|
13
13
|
import { MultiBarTypes as Do } from "./components/multibar/index.js";
|
|
14
14
|
import { FoldableSectionTypes as Bo } from "./components/layout/index.js";
|
|
15
|
-
import { FormCardTypes as
|
|
15
|
+
import { FormCardTypes as Mo, FormFieldTypes as wo } 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";
|
|
@@ -32,8 +32,8 @@ import * as $ from "./components/icon/v4/index.js";
|
|
|
32
32
|
import * as T from "./components/input/v3/index.js";
|
|
33
33
|
import * as c from "./components/input/v4/index.js";
|
|
34
34
|
import * as y from "./components/tabs/v3/index.js";
|
|
35
|
-
import * as
|
|
36
|
-
import * as
|
|
35
|
+
import * as F from "./components/tabs/v4/index.js";
|
|
36
|
+
import * as g from "./components/dialog/v3/index.js";
|
|
37
37
|
import * as I from "./components/dialog/v4/index.js";
|
|
38
38
|
import * as A from "./components/toggle/v3/index.js";
|
|
39
39
|
import * as E from "./components/toggle/v4/index.js";
|
|
@@ -41,65 +41,66 @@ import * as C from "./components/tooltip/v3/index.js";
|
|
|
41
41
|
import * as D from "./components/tooltip/v4/index.js";
|
|
42
42
|
import * as h from "./components/table/v3/index.js";
|
|
43
43
|
import * as B from "./components/table/v4/index.js";
|
|
44
|
-
import * as
|
|
45
|
-
import * as
|
|
44
|
+
import * as b from "./components/table-cells/v3/index.js";
|
|
45
|
+
import * as M from "./components/table-cells/v4/index.js";
|
|
46
46
|
import * as w from "./components/skeleton/v3/index.js";
|
|
47
|
-
import * as
|
|
48
|
-
import * as
|
|
49
|
-
import * as
|
|
50
|
-
import * as
|
|
51
|
-
import * as
|
|
52
|
-
import * as
|
|
53
|
-
import * as
|
|
54
|
-
import * as
|
|
55
|
-
import * as
|
|
56
|
-
import * as
|
|
57
|
-
import * as
|
|
58
|
-
import * as
|
|
59
|
-
import * as
|
|
60
|
-
import * as
|
|
61
|
-
import * as
|
|
62
|
-
import * as
|
|
47
|
+
import * as L from "./components/skeleton/v4/index.js";
|
|
48
|
+
import * as N from "./components/loader/v4/index.js";
|
|
49
|
+
import * as O from "./components/emptyState/v3/index.js";
|
|
50
|
+
import * as H from "./components/emptyState/v4/index.js";
|
|
51
|
+
import * as K from "./components/snackbar/v3/index.js";
|
|
52
|
+
import * as P from "./components/snackbar/v4/index.js";
|
|
53
|
+
import * as S from "./components/radioButton/v3/index.js";
|
|
54
|
+
import * as V from "./components/radioButton/v4/index.js";
|
|
55
|
+
import * as _ from "./components/textArea/v3/index.js";
|
|
56
|
+
import * as v from "./components/textArea/v4/index.js";
|
|
57
|
+
import * as J 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
63
|
import * as Q from "./components/datePicker/v4/index.js";
|
|
64
64
|
import * as R from "./components/dateRange/v3/index.js";
|
|
65
|
-
import * as
|
|
66
|
-
import * as
|
|
67
|
-
import * as
|
|
68
|
-
import { useToggle as
|
|
69
|
-
import { useSearch as
|
|
70
|
-
import { scrollToElementByClass as
|
|
71
|
-
import { BannerTypes as
|
|
72
|
-
import { AlertTypes as
|
|
73
|
-
import { AutocompleteTypes as
|
|
65
|
+
import * as U from "./components/dateRange/v4/index.js";
|
|
66
|
+
import * as W from "./components/popover/v3/index.js";
|
|
67
|
+
import * as Y from "./components/popover/v4/index.js";
|
|
68
|
+
import { useToggle as No } from "./composables/useToggle.js";
|
|
69
|
+
import { useSearch as Ho } from "./composables/useSearch.js";
|
|
70
|
+
import { scrollToElementByClass as Po, scrollToFirstInvalidElement as So, useFormValidation as Vo, yupValidation as _o } from "./composables/useFormValidation.js";
|
|
71
|
+
import { BannerTypes as Jo } from "./components/banner/index.js";
|
|
72
|
+
import { AlertTypes as ko } from "./components/alert/index.js";
|
|
73
|
+
import { AutocompleteTypes as zo } from "./components/autocomplete/index.js";
|
|
74
74
|
import { ChartTypes as Qo } from "./components/chart/index.js";
|
|
75
|
-
import {
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
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 Vr } from "./components/
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
98
|
-
import { default as
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
101
|
-
import { default as
|
|
102
|
-
import { default as
|
|
75
|
+
import { DEFAULT_FALLBACK as Uo, diffInPersentage as Wo, formatNumberWithCommas as Yo, nFormatter as Xo } from "./utils/formatNumbers.js";
|
|
76
|
+
import { default as or } from "./components/appTrigger/AppTrigger.vue.js";
|
|
77
|
+
import { default as er } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
|
|
78
|
+
import { default as tr } from "./components/menuItem/MenuItem.vue.js";
|
|
79
|
+
import { default as ar } from "./components/menu/Menu.vue.js";
|
|
80
|
+
import { default as ir } from "./components/appIcon/AppIcon.vue.js";
|
|
81
|
+
import { default as xr } from "./components/floatingToolbar/FloatingToolbar.vue.js";
|
|
82
|
+
import { default as nr } from "./components/includeExclude/IncludeExclude.vue.js";
|
|
83
|
+
import { default as ur } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
|
|
84
|
+
import { default as Tr } from "./components/includeExclude/IncludeExcludeOption.vue.js";
|
|
85
|
+
import { default as yr } from "./components/includeExclude/IncludeExcludeOptionDraggable.vue.js";
|
|
86
|
+
import { default as gr } from "./components/includeExclude/IncludeExcludeAppTrigger.vue.js";
|
|
87
|
+
import { default as Ar } from "./components/includeExclude/IncludeExcludeAppHeader.vue.js";
|
|
88
|
+
import { default as Cr } from "./components/includeExclude/IncludeExcludeChipFilter.vue.js";
|
|
89
|
+
import { default as hr } from "./components/filterDropdown/FilterDropdown.vue.js";
|
|
90
|
+
import { default as br } from "./components/filterDropdown/AddFilterButton.vue.js";
|
|
91
|
+
import { default as wr } from "./components/typography/Heading.vue.js";
|
|
92
|
+
import { default as Nr } from "./components/typography/Text.vue.js";
|
|
93
|
+
import { default as Hr } from "./components/typography/v4/Typography.vue.js";
|
|
94
|
+
import { default as Pr } from "./components/multibar/MultiBar.vue.js";
|
|
95
|
+
import { default as Vr } from "./components/layout/FoldableSection.vue.js";
|
|
96
|
+
import { default as vr } from "./components/forms/FormRow.vue.js";
|
|
97
|
+
import { default as jr } from "./components/forms/FormCard.vue.js";
|
|
98
|
+
import { default as qr } from "./components/forms/CardPanel.vue.js";
|
|
99
|
+
import { default as Gr } from "./components/forms/FormField.vue.js";
|
|
100
|
+
import { default as Rr } from "./components/banner/Banner.vue.js";
|
|
101
|
+
import { default as Wr } from "./components/alert/Alert.vue.js";
|
|
102
|
+
import { default as Xr } from "./components/autocomplete/Autocomplete.vue.js";
|
|
103
|
+
import { default as oe } from "./components/chart/Chart.vue.js";
|
|
103
104
|
const X = {
|
|
104
105
|
...e,
|
|
105
106
|
...m,
|
|
@@ -118,8 +119,8 @@ const X = {
|
|
|
118
119
|
...u,
|
|
119
120
|
...$,
|
|
120
121
|
...y,
|
|
121
|
-
...g,
|
|
122
122
|
...F,
|
|
123
|
+
...g,
|
|
123
124
|
...I,
|
|
124
125
|
...C,
|
|
125
126
|
...D,
|
|
@@ -127,87 +128,91 @@ const X = {
|
|
|
127
128
|
...E,
|
|
128
129
|
...h,
|
|
129
130
|
...B,
|
|
130
|
-
...M,
|
|
131
131
|
...b,
|
|
132
|
-
...
|
|
133
|
-
...S,
|
|
134
|
-
...w,
|
|
132
|
+
...M,
|
|
135
133
|
...O,
|
|
136
134
|
...H,
|
|
137
|
-
...
|
|
138
|
-
...
|
|
135
|
+
...w,
|
|
136
|
+
...L,
|
|
137
|
+
...N,
|
|
138
|
+
...K,
|
|
139
|
+
...P,
|
|
139
140
|
...n,
|
|
140
141
|
...l,
|
|
141
|
-
...P,
|
|
142
142
|
..._,
|
|
143
|
+
...v,
|
|
144
|
+
...S,
|
|
145
|
+
...V,
|
|
143
146
|
...J,
|
|
144
|
-
...K,
|
|
145
147
|
...j,
|
|
146
148
|
...k,
|
|
147
149
|
...q,
|
|
148
150
|
...z,
|
|
149
151
|
...G,
|
|
150
|
-
...L,
|
|
151
152
|
...Q,
|
|
152
153
|
...R,
|
|
153
|
-
...Y,
|
|
154
154
|
...U,
|
|
155
|
-
...W
|
|
155
|
+
...W,
|
|
156
|
+
...Y
|
|
156
157
|
};
|
|
157
158
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
br as AddFilterButton,
|
|
160
|
+
Wr as Alert,
|
|
161
|
+
ko as AlertTypes,
|
|
162
|
+
ir as AppIcon,
|
|
162
163
|
xo as AppIconTypes,
|
|
163
|
-
|
|
164
|
+
or as AppTrigger,
|
|
164
165
|
ro as AppTriggerTypes,
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
Xr as Autocomplete,
|
|
167
|
+
er as AutocompleteDropdown,
|
|
167
168
|
mo as AutocompleteDropdownTypes,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
zo as AutocompleteTypes,
|
|
170
|
+
Rr as Banner,
|
|
171
|
+
Jo as BannerTypes,
|
|
172
|
+
qr as CardPanel,
|
|
173
|
+
oe as Chart,
|
|
173
174
|
Qo as ChartTypes,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
Uo as DEFAULT_FALLBACK,
|
|
176
|
+
hr as FilterDropdown,
|
|
177
|
+
Fo as FilterDropdownTypes,
|
|
178
|
+
xr as FloatingToolbar,
|
|
177
179
|
no as FloatingToolbarTypes,
|
|
178
|
-
|
|
180
|
+
Vr as FoldableSection,
|
|
179
181
|
Bo as FoldableSectionTypes,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
jr as FormCard,
|
|
183
|
+
Mo as FormCardTypes,
|
|
184
|
+
Gr as FormField,
|
|
183
185
|
wo as FormFieldTypes,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
+
vr as FormRow,
|
|
187
|
+
wr as Heading,
|
|
186
188
|
To as ID_INJECTION_KEY,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
nr as IncludeExclude,
|
|
190
|
+
Ar as IncludeExcludeAppHeader,
|
|
191
|
+
gr as IncludeExcludeAppTrigger,
|
|
192
|
+
Cr as IncludeExcludeChipFilter,
|
|
193
|
+
ur as IncludeExcludeDragDrop,
|
|
194
|
+
Tr as IncludeExcludeOption,
|
|
195
|
+
yr as IncludeExcludeOptionDraggable,
|
|
194
196
|
uo as IncludeExcludeTypes,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
ar as Menu,
|
|
198
|
+
tr as MenuItem,
|
|
197
199
|
po as MenuItemTypes,
|
|
198
200
|
fo as MenuTypes,
|
|
199
|
-
|
|
201
|
+
Pr as MultiBar,
|
|
200
202
|
Do as MultiBarTypes,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
Nr as Text,
|
|
204
|
+
Hr as Typography,
|
|
203
205
|
Io as TypographyTypes,
|
|
204
206
|
Eo as TypographyTypesV4,
|
|
205
207
|
X as default,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
Wo as diffInPersentage,
|
|
209
|
+
Yo as formatNumberWithCommas,
|
|
210
|
+
Xo as nFormatter,
|
|
211
|
+
Po as scrollToElementByClass,
|
|
212
|
+
So as scrollToFirstInvalidElement,
|
|
213
|
+
Vo as useFormValidation,
|
|
209
214
|
co as useId,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
Ho as useSearch,
|
|
216
|
+
No as useToggle,
|
|
217
|
+
_o as yupValidation
|
|
213
218
|
};
|
package/package.json
CHANGED
package/utils/formatNumbers.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = "N/A", n = (s, e, r) => s.toLocaleString("en", {
|
|
2
2
|
minimumFractionDigits: e,
|
|
3
|
-
maximumFractionDigits:
|
|
4
|
-
}),
|
|
5
|
-
const
|
|
6
|
-
return isNaN(
|
|
3
|
+
maximumFractionDigits: r
|
|
4
|
+
}), a = (s, e = i) => {
|
|
5
|
+
const r = Number(s), t = r % 1 !== 0;
|
|
6
|
+
return isNaN(r) && e ? e : Math.abs(r) >= 1e12 ? "∞" : Math.abs(r) >= 1e9 ? `${n(r / 1e9, 0, 1)}B` : Math.abs(r) >= 1e6 ? `${n(r / 1e6, 0, 1)}M` : Math.abs(r) >= 1e3 ? `${n(r / 1e3, 0, 1)}K` : t && Math.abs(r) >= 100 ? n(r, 0, 0) : t && Math.abs(r) >= 10 ? n(r, 0, 1) : t ? n(r, 2, 2) : n(r, 0, 0);
|
|
7
|
+
}, o = (s, e, r = i) => {
|
|
8
|
+
const t = Number(s), u = Number(e);
|
|
9
|
+
return r && (isNaN(t) || isNaN(u)) ? r : t >= u ? (u - t) / t * 100 : (t - u) / t * -100;
|
|
10
|
+
}, N = (s, e = i) => {
|
|
11
|
+
const r = Number(s);
|
|
12
|
+
return isNaN(r) && e ? e : n(r, 0, 2);
|
|
7
13
|
};
|
|
8
14
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
i as DEFAULT_FALLBACK,
|
|
16
|
+
o as diffInPersentage,
|
|
17
|
+
N as formatNumberWithCommas,
|
|
18
|
+
a as nFormatter
|
|
11
19
|
};
|