@ironsource/shared-ui 2.2.0-test.20 → 2.2.0-test.23
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/Chart.vue_vue_type_style_index_0_scoped_a4d7b67a_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +5 -0
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +15 -13
- package/components/chart/composables/useChartHeight.d.ts +1 -1
- package/components/chart/composables/useChartHeight.js +16 -15
- package/components/chart/index.d.ts +20 -1
- package/components/chart/types.d.ts +1 -0
- package/index.js +1 -1
- package/package.json +12 -3
- package/Chart.vue_vue_type_style_index_0_scoped_3ed9f4bc_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-a4d7b67a]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%;overflow:hidden}.chart-planes[data-v-a4d7b67a]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-a4d7b67a]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-a4d7b67a]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-a4d7b67a]{border-left:1px solid var(--common-divider)}
|
|
@@ -53,6 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
53
53
|
withSettingsHeader?: boolean;
|
|
54
54
|
extraCharts?: Record<string, unknown>[];
|
|
55
55
|
colorVariant?: ColorVariant;
|
|
56
|
+
height?: string;
|
|
56
57
|
}>, {
|
|
57
58
|
chartType: ChartType;
|
|
58
59
|
dataSets: () => any[];
|
|
@@ -99,6 +100,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
99
100
|
withSettingsHeader: boolean;
|
|
100
101
|
extraCharts: () => any[];
|
|
101
102
|
colorVariant: string;
|
|
103
|
+
height: any;
|
|
102
104
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
103
105
|
"update:chartType": (chartType: ChartType) => void;
|
|
104
106
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
@@ -156,6 +158,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
156
158
|
withSettingsHeader?: boolean;
|
|
157
159
|
extraCharts?: Record<string, unknown>[];
|
|
158
160
|
colorVariant?: ColorVariant;
|
|
161
|
+
height?: string;
|
|
159
162
|
}>, {
|
|
160
163
|
chartType: ChartType;
|
|
161
164
|
dataSets: () => any[];
|
|
@@ -202,6 +205,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
202
205
|
withSettingsHeader: boolean;
|
|
203
206
|
extraCharts: () => any[];
|
|
204
207
|
colorVariant: string;
|
|
208
|
+
height: any;
|
|
205
209
|
}>>> & {
|
|
206
210
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
207
211
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
@@ -209,6 +213,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
209
213
|
}, {
|
|
210
214
|
header: string;
|
|
211
215
|
testId: string;
|
|
216
|
+
height: string;
|
|
212
217
|
loading: boolean;
|
|
213
218
|
visibleIds: unknown[];
|
|
214
219
|
minVisible: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Chart.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_a4d7b67a_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-a4d7b67a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../Chart.
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_a4d7b67a_lang.css"; import { defineComponent as P, ref as U, computed as d, openBlock as n, createElementBlock as g, Fragment as S, createBlock as D, unref as l, isRef as b, withCtx as s, renderSlot as u, createCommentVNode as A, createElementVNode as L, mergeProps as y, normalizeClass as $, createVNode as k, createSlots as M, renderList as R } from "vue";
|
|
2
2
|
import { useVModel as B } from "@vueuse/core";
|
|
3
3
|
import K from "./ChartLegend.vue.js";
|
|
4
4
|
import X from "./SettingsHeader.vue.js";
|
|
@@ -60,7 +60,8 @@ const at = {
|
|
|
60
60
|
fullHeightBottomSpacing: { default: 50 },
|
|
61
61
|
withSettingsHeader: { type: Boolean, default: !0 },
|
|
62
62
|
extraCharts: { default: () => [] },
|
|
63
|
-
colorVariant: { default: "default" }
|
|
63
|
+
colorVariant: { default: "default" },
|
|
64
|
+
height: { default: void 0 }
|
|
64
65
|
},
|
|
65
66
|
emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
|
|
66
67
|
setup(e, { emit: c }) {
|
|
@@ -106,19 +107,20 @@ const at = {
|
|
|
106
107
|
dataSets: E,
|
|
107
108
|
visibleIds: I,
|
|
108
109
|
variant: t.colorVariant
|
|
109
|
-
}),
|
|
110
|
+
}), H = d(() => t.dataSets.map((a) => ({
|
|
110
111
|
id: a.id,
|
|
111
112
|
label: a.label,
|
|
112
113
|
caption: a.caption || null,
|
|
113
114
|
color: m.value[a.id] || null,
|
|
114
115
|
icon: a.icon || null,
|
|
115
116
|
iconType: a.iconType || "branded"
|
|
116
|
-
}))), { containerProps:
|
|
117
|
+
}))), { containerProps: w, eachPlaneHeight: N } = Z({
|
|
117
118
|
chartPlanesCount: C,
|
|
118
119
|
useFullHeight: t.fullHeight,
|
|
119
|
-
bottomSpacing: t.fullHeightBottomSpacing
|
|
120
|
+
bottomSpacing: t.fullHeightBottomSpacing,
|
|
121
|
+
customHeight: t.height
|
|
120
122
|
}), O = et(t.testId, p);
|
|
121
|
-
return (a, i) => (n(),
|
|
123
|
+
return (a, i) => (n(), g(S, null, [
|
|
122
124
|
e.withSettingsHeader ? (n(), D(X, {
|
|
123
125
|
key: 0,
|
|
124
126
|
"chart-type": l(r),
|
|
@@ -137,14 +139,14 @@ const at = {
|
|
|
137
139
|
]),
|
|
138
140
|
_: 3
|
|
139
141
|
}, 8, ["chart-type", "hide-legend", "test-id"])) : A("", !0),
|
|
140
|
-
L("div",
|
|
141
|
-
...l(
|
|
142
|
+
L("div", y({ class: "chart-container" }, {
|
|
143
|
+
...l(w),
|
|
142
144
|
...l(O)[l(p).CONTAINER]
|
|
143
|
-
}
|
|
145
|
+
}), [
|
|
144
146
|
L("section", {
|
|
145
147
|
class: $(["chart-planes", [{ "with-legend": !e.hideLegend }]])
|
|
146
148
|
}, [
|
|
147
|
-
k(V,
|
|
149
|
+
k(V, y({
|
|
148
150
|
"chart-type": l(r),
|
|
149
151
|
"onUpdate:chart-type": i[1] || (i[1] = (o) => b(r) ? r.value = o : null)
|
|
150
152
|
}, l(v)), M({ _: 2 }, [
|
|
@@ -156,7 +158,7 @@ const at = {
|
|
|
156
158
|
key: "0"
|
|
157
159
|
} : void 0
|
|
158
160
|
]), 1040, ["chart-type"]),
|
|
159
|
-
(n(!0),
|
|
161
|
+
(n(!0), g(S, null, R(e.extraCharts, (o, T) => (n(), D(V, y({
|
|
160
162
|
key: T,
|
|
161
163
|
class: "extra-chart-plane"
|
|
162
164
|
}, { ...l(v), ...o }, {
|
|
@@ -167,13 +169,13 @@ const at = {
|
|
|
167
169
|
"test-id": `${e.testId}-${l(p).EXTRA_CHART}-${T}`
|
|
168
170
|
}), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge", "test-id"]))), 128))
|
|
169
171
|
], 2),
|
|
170
|
-
e.hideLegend ? A("", !0) : (n(),
|
|
172
|
+
e.hideLegend ? A("", !0) : (n(), g("section", at, [
|
|
171
173
|
k(K, {
|
|
172
174
|
"sort-selected": l(f),
|
|
173
175
|
"onUpdate:sort-selected": i[2] || (i[2] = (o) => b(f) ? f.value = o : null),
|
|
174
176
|
"highlighted-id": h.value,
|
|
175
177
|
"onUpdate:highlighted-id": i[3] || (i[3] = (o) => h.value = o),
|
|
176
|
-
items: l(
|
|
178
|
+
items: l(H),
|
|
177
179
|
"visible-ids": l(I),
|
|
178
180
|
"max-limit-tooltip-text": e.maxLimitTooltipText,
|
|
179
181
|
"sort-options": e.sortOptions,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseChartHeightArgs } from '@/components/chart/types';
|
|
2
|
-
export declare const useChartHeight: ({ chartPlanesCount, useFullHeight, bottomSpacing, }: UseChartHeightArgs) => {
|
|
2
|
+
export declare const useChartHeight: ({ chartPlanesCount, useFullHeight, bottomSpacing, customHeight, }: UseChartHeightArgs) => {
|
|
3
3
|
containerProps: import("vue").ComputedRef<Record<string, unknown>>;
|
|
4
4
|
eachPlaneHeight: import("vue").ComputedRef<string>;
|
|
5
5
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useElementBounding as m, useWindowScroll as
|
|
3
|
-
import { useFullPageHeight as
|
|
4
|
-
import { DEFAULT_CHART_PLANE_HEIGHT as
|
|
5
|
-
const
|
|
1
|
+
import { ref as f, computed as r } from "vue";
|
|
2
|
+
import { useElementBounding as m, useWindowScroll as p } from "@vueuse/core";
|
|
3
|
+
import { useFullPageHeight as E } from "../../../composables/useFullPageHeight.js";
|
|
4
|
+
import { DEFAULT_CHART_PLANE_HEIGHT as v, HEADER_HEIGHT as d, MIN_PLANE_HEIGHT as n } from "../consts.js";
|
|
5
|
+
const I = ({
|
|
6
6
|
chartPlanesCount: e,
|
|
7
|
-
useFullHeight:
|
|
8
|
-
bottomSpacing:
|
|
7
|
+
useFullHeight: i,
|
|
8
|
+
bottomSpacing: c = 50,
|
|
9
|
+
customHeight: o
|
|
9
10
|
}) => {
|
|
10
|
-
const t =
|
|
11
|
+
const t = f(), { height: l } = m(t), { cssHeightValue: u } = E({
|
|
11
12
|
elem: t,
|
|
12
|
-
bottomSpacing:
|
|
13
|
-
}), { y: s } =
|
|
13
|
+
bottomSpacing: c
|
|
14
|
+
}), { y: s } = p(), h = r(() => o || (i && !s.value ? u.value : v + d + "px")), a = r(() => ({
|
|
14
15
|
ref: t,
|
|
15
|
-
style: { height:
|
|
16
|
-
})),
|
|
16
|
+
style: { height: h.value }
|
|
17
|
+
})), H = r(() => e.value === 1 ? "100%" : l.value / e.value < n ? `${n}px` : 100 / e.value + "%");
|
|
17
18
|
return {
|
|
18
|
-
containerProps:
|
|
19
|
-
eachPlaneHeight:
|
|
19
|
+
containerProps: a,
|
|
20
|
+
eachPlaneHeight: H
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
I as useChartHeight
|
|
24
25
|
};
|
|
@@ -7,6 +7,7 @@ declare const ChartTypes: () => ({
|
|
|
7
7
|
$props: Partial<{
|
|
8
8
|
header: string;
|
|
9
9
|
testId: string;
|
|
10
|
+
height: string;
|
|
10
11
|
loading: boolean;
|
|
11
12
|
visibleIds: unknown[];
|
|
12
13
|
minVisible: number;
|
|
@@ -59,6 +60,10 @@ declare const ChartTypes: () => ({
|
|
|
59
60
|
type: import("vue").PropType<string>;
|
|
60
61
|
default: string;
|
|
61
62
|
};
|
|
63
|
+
height: {
|
|
64
|
+
type: import("vue").PropType<string>;
|
|
65
|
+
default: any;
|
|
66
|
+
};
|
|
62
67
|
loading: {
|
|
63
68
|
type: import("vue").PropType<boolean>;
|
|
64
69
|
default: boolean;
|
|
@@ -244,7 +249,7 @@ declare const ChartTypes: () => ({
|
|
|
244
249
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
245
250
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
246
251
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
247
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "testId" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "headerTooltip" | "trendValue" | "trendDirection" | "noteText" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "indicateIncompleteData" | "tooltipExcludeTotalItem" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts" | "colorVariant">;
|
|
252
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "testId" | "height" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "headerTooltip" | "trendValue" | "trendDirection" | "noteText" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "indicateIncompleteData" | "tooltipExcludeTotalItem" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts" | "colorVariant">;
|
|
248
253
|
$attrs: {
|
|
249
254
|
[x: string]: unknown;
|
|
250
255
|
};
|
|
@@ -267,6 +272,10 @@ declare const ChartTypes: () => ({
|
|
|
267
272
|
type: import("vue").PropType<string>;
|
|
268
273
|
default: string;
|
|
269
274
|
};
|
|
275
|
+
height: {
|
|
276
|
+
type: import("vue").PropType<string>;
|
|
277
|
+
default: any;
|
|
278
|
+
};
|
|
270
279
|
loading: {
|
|
271
280
|
type: import("vue").PropType<boolean>;
|
|
272
281
|
default: boolean;
|
|
@@ -459,6 +468,7 @@ declare const ChartTypes: () => ({
|
|
|
459
468
|
}, string, {
|
|
460
469
|
header: string;
|
|
461
470
|
testId: string;
|
|
471
|
+
height: string;
|
|
462
472
|
loading: boolean;
|
|
463
473
|
visibleIds: unknown[];
|
|
464
474
|
minVisible: number;
|
|
@@ -531,6 +541,10 @@ declare const ChartTypes: () => ({
|
|
|
531
541
|
type: import("vue").PropType<string>;
|
|
532
542
|
default: string;
|
|
533
543
|
};
|
|
544
|
+
height: {
|
|
545
|
+
type: import("vue").PropType<string>;
|
|
546
|
+
default: any;
|
|
547
|
+
};
|
|
534
548
|
loading: {
|
|
535
549
|
type: import("vue").PropType<boolean>;
|
|
536
550
|
default: boolean;
|
|
@@ -729,6 +743,10 @@ declare const ChartTypes: () => ({
|
|
|
729
743
|
type: import("vue").PropType<string>;
|
|
730
744
|
default: string;
|
|
731
745
|
};
|
|
746
|
+
height: {
|
|
747
|
+
type: import("vue").PropType<string>;
|
|
748
|
+
default: any;
|
|
749
|
+
};
|
|
732
750
|
loading: {
|
|
733
751
|
type: import("vue").PropType<boolean>;
|
|
734
752
|
default: boolean;
|
|
@@ -921,6 +939,7 @@ declare const ChartTypes: () => ({
|
|
|
921
939
|
}, string, {
|
|
922
940
|
header: string;
|
|
923
941
|
testId: string;
|
|
942
|
+
height: string;
|
|
924
943
|
loading: boolean;
|
|
925
944
|
visibleIds: unknown[];
|
|
926
945
|
minVisible: number;
|
|
@@ -64,6 +64,7 @@ export type UseChartHeightArgs = {
|
|
|
64
64
|
chartPlanesCount: Ref<number>;
|
|
65
65
|
useFullHeight: boolean;
|
|
66
66
|
bottomSpacing?: number;
|
|
67
|
+
customHeight?: string;
|
|
67
68
|
};
|
|
68
69
|
export type HexColor = `#${string}`;
|
|
69
70
|
export type DataSetConfig = ChartDataset<'line'> & ChartDataSet;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './Heading.vue_vue_type_style_index_0_scoped_19878c4b_lang.css';
|
|
2
2
|
import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as ao } from "./components/menuItem/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ironsource/shared-ui",
|
|
3
|
-
"version": "2.2.0-test.
|
|
3
|
+
"version": "2.2.0-test.23",
|
|
4
4
|
"engines": {
|
|
5
5
|
"npm": ">=7.0.0",
|
|
6
6
|
"node": ">=16.0.0"
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"upload:visual": "aws s3 cp ./visual-tests s3://mobile-shared-ui-platform/visual-tests/$FOLDER --recursive --exclude '.gitkeep' ",
|
|
48
48
|
"release": "commit-and-tag-version",
|
|
49
49
|
"pw:ci": "cd e2e/playwright && BASE_URL=http://localhost:6006/ npx playwright test --reporter=list --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}",
|
|
50
|
-
"test-storybook-pw": "concurrently 'npm run storybook:dist:pw --silent' 'npx wait-on http://localhost:6006 && npm run pw:ci' --kill-others --success first"
|
|
50
|
+
"test-storybook-pw": "concurrently 'npm run storybook:dist:pw --silent' 'npx wait-on http://localhost:6006 && npm run pw:ci' --kill-others --success first",
|
|
51
|
+
"migrate-colors": "node scripts/migrate-colors.mjs"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@phosphor-icons/vue": "^2.1.6",
|
|
@@ -227,6 +228,7 @@
|
|
|
227
228
|
"./banner": "./components/banner/Banner.vue.js",
|
|
228
229
|
"./alert": "./components/alert/index.js",
|
|
229
230
|
"./link": "./components/link/index.js",
|
|
231
|
+
"./helpText": "./components/helpText/index.js",
|
|
230
232
|
"./multibar": "./components/multibar/index.js",
|
|
231
233
|
"./typography": "./components/typography/v4/index.js",
|
|
232
234
|
"./themeWrapper": "./components/ThemeWrapper/index.js",
|
|
@@ -237,7 +239,8 @@
|
|
|
237
239
|
"./sortableList": "./components/sortableList/index.js",
|
|
238
240
|
"./composables/useFormValidation": "./composables/useFormValidation.js",
|
|
239
241
|
"./composables/useDateService": "./composables/useDateService.js",
|
|
240
|
-
"./utils/": "./utils/index.ts"
|
|
242
|
+
"./utils/": "./utils/index.ts",
|
|
243
|
+
"./tag": "./components/tag/index.js"
|
|
241
244
|
},
|
|
242
245
|
"typesVersions": {
|
|
243
246
|
"*": {
|
|
@@ -454,6 +457,9 @@
|
|
|
454
457
|
"link": [
|
|
455
458
|
"./components/link/index.d.ts"
|
|
456
459
|
],
|
|
460
|
+
"helpText": [
|
|
461
|
+
"./components/helpText/index.d.ts"
|
|
462
|
+
],
|
|
457
463
|
"multibar": [
|
|
458
464
|
"./components/multibar/index.d.ts"
|
|
459
465
|
],
|
|
@@ -489,6 +495,9 @@
|
|
|
489
495
|
],
|
|
490
496
|
"composables/useDateService": [
|
|
491
497
|
"./composables/useDateService.d.ts"
|
|
498
|
+
],
|
|
499
|
+
"tag": [
|
|
500
|
+
"./components/tag/index.d.ts"
|
|
492
501
|
]
|
|
493
502
|
}
|
|
494
503
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-3ed9f4bc]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%;overflow:hidden}.chart-planes[data-v-3ed9f4bc]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-3ed9f4bc]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-3ed9f4bc]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-3ed9f4bc]{border-left:1px solid var(--common-divider)}
|