@ironsource/shared-ui 2.1.12-rc.17 → 2.1.12-rc.19
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_53316c89_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +21 -1
- package/components/chart/Chart.vue.js +4 -4
- package/components/chart/Chart.vue2.js +64 -54
- package/components/chart/ChartPlane.vue.d.ts +21 -1
- package/components/chart/ChartPlane.vue.js +4 -4
- package/components/chart/ChartPlane.vue2.js +152 -141
- package/components/chart/ChartStoryArgs.d.ts +11 -1
- package/components/chart/ChartTooltip.vue.d.ts +16 -1
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +33 -29
- package/components/chart/TooltipHeader.vue.d.ts +6 -1
- package/components/chart/TooltipHeader.vue.js +2 -2
- package/components/chart/TooltipHeader.vue2.js +37 -27
- package/components/chart/consts.d.ts +3 -2
- package/components/chart/consts.js +13 -12
- package/components/chart/index.d.ts +77 -1
- package/components/chart/mockData.d.ts +8 -0
- package/components/chart/types.d.ts +5 -0
- package/components/chart/types.js +4 -3
- package/components/chart/utils/utils.d.ts +1 -1
- package/components/chart/utils/utils.js +10 -10
- package/index.js +1 -1
- package/package.json +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_82f5b24e_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_5c80d8cd_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_9e521454_lang.css +0 -1
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_9f6cf389_lang.css +0 -1
|
@@ -1,86 +1,90 @@
|
|
|
1
|
-
import "../../ChartTooltip.
|
|
2
|
-
import
|
|
1
|
+
import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css"; import { defineComponent as m, openBlock as a, createElementBlock as o, createBlock as c, createCommentVNode as r, Fragment as y, renderList as v, createElementVNode as f, normalizeStyle as h, unref as l, createVNode as i, withCtx as n, createTextVNode as s, toDisplayString as u } from "vue";
|
|
2
|
+
import d from "../typography/v4/Typography.vue.js";
|
|
3
3
|
import b from "../icon/v4/IconV4.vue.js";
|
|
4
4
|
import "../icon/v4/IconFlag.vue.js";
|
|
5
|
-
import { formatValue as
|
|
5
|
+
import { formatValue as x } from "./utils/utils.js";
|
|
6
6
|
import k from "./TooltipHeader.vue.js";
|
|
7
7
|
const C = { class: "chart-tooltip" }, g = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "list"
|
|
10
|
-
},
|
|
10
|
+
}, V = { class: "popover-label-wrapper" }, A = {
|
|
11
11
|
key: 2,
|
|
12
12
|
class: "tooltip-footer"
|
|
13
|
-
},
|
|
13
|
+
}, L = /* @__PURE__ */ m({
|
|
14
14
|
__name: "ChartTooltip",
|
|
15
15
|
props: {
|
|
16
16
|
title: { default: "" },
|
|
17
17
|
dataPoints: { default: () => [] },
|
|
18
18
|
xAxisFormat: { default: null },
|
|
19
19
|
yAxisFormat: { default: null },
|
|
20
|
+
xAxisDateInterval: { default: null },
|
|
20
21
|
totalLabel: { default: "Total" },
|
|
21
22
|
totalValue: { default: null },
|
|
22
|
-
totalsChart: { type: Boolean, default: !1 }
|
|
23
|
+
totalsChart: { type: Boolean, default: !1 },
|
|
24
|
+
valueSuffix: { default: "" },
|
|
25
|
+
valuePrefix: { default: "" }
|
|
23
26
|
},
|
|
24
27
|
setup(t) {
|
|
25
|
-
return (F,
|
|
26
|
-
t.title ? (a(),
|
|
28
|
+
return (F, S) => (a(), o("div", C, [
|
|
29
|
+
t.title ? (a(), c(k, {
|
|
27
30
|
key: 0,
|
|
28
31
|
title: t.title,
|
|
29
32
|
"data-points": t.dataPoints,
|
|
30
33
|
"totals-chart": t.totalsChart,
|
|
31
|
-
"x-axis-format": t.xAxisFormat
|
|
32
|
-
|
|
34
|
+
"x-axis-format": t.xAxisFormat,
|
|
35
|
+
"x-axis-date-interval": t.xAxisDateInterval
|
|
36
|
+
}, null, 8, ["title", "data-points", "totals-chart", "x-axis-format", "x-axis-date-interval"])) : r("", !0),
|
|
33
37
|
t.totalsChart ? r("", !0) : (a(), o("ul", g, [
|
|
34
|
-
(a(!0), o(
|
|
38
|
+
(a(!0), o(y, null, v(t.dataPoints, (e) => (a(), o("li", {
|
|
35
39
|
key: e.datasetIndex,
|
|
36
40
|
class: "list__item"
|
|
37
41
|
}, [
|
|
38
|
-
|
|
42
|
+
f("span", {
|
|
39
43
|
class: "color-box",
|
|
40
|
-
style:
|
|
44
|
+
style: h({
|
|
41
45
|
backgroundColor: String(e.dataset.pointBackgroundColor)
|
|
42
46
|
})
|
|
43
47
|
}, null, 4),
|
|
44
|
-
e.dataset.icon ? (a(),
|
|
48
|
+
e.dataset.icon ? (a(), c(l(b), {
|
|
45
49
|
key: 0,
|
|
46
50
|
class: "platform-icon",
|
|
47
51
|
type: e.dataset.iconType,
|
|
48
52
|
name: e.dataset.icon,
|
|
49
53
|
size: "16px"
|
|
50
54
|
}, null, 8, ["type", "name"])) : r("", !0),
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
f("div", V, [
|
|
56
|
+
i(l(d), {
|
|
53
57
|
variant: "body2",
|
|
54
58
|
class: "flex-grow truncated-label",
|
|
55
59
|
"is-truncated": ""
|
|
56
60
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
61
|
+
default: n(() => [
|
|
62
|
+
s(u(e.dataset.label), 1)
|
|
59
63
|
]),
|
|
60
64
|
_: 2
|
|
61
65
|
}, 1024)
|
|
62
66
|
]),
|
|
63
|
-
|
|
64
|
-
default:
|
|
65
|
-
|
|
67
|
+
i(l(d), { variant: "body2" }, {
|
|
68
|
+
default: n(() => [
|
|
69
|
+
s(u(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat) + t.valueSuffix), 1)
|
|
66
70
|
]),
|
|
67
71
|
_: 2
|
|
68
72
|
}, 1024)
|
|
69
73
|
]))), 128))
|
|
70
74
|
])),
|
|
71
|
-
t.totalValue !== null ? (a(), o("div",
|
|
72
|
-
|
|
75
|
+
t.totalValue !== null ? (a(), o("div", A, [
|
|
76
|
+
i(l(d), {
|
|
73
77
|
variant: "body2",
|
|
74
78
|
class: "flex-grow"
|
|
75
79
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
|
|
80
|
+
default: n(() => [
|
|
81
|
+
s(u(t.totalLabel), 1)
|
|
78
82
|
]),
|
|
79
83
|
_: 1
|
|
80
84
|
}),
|
|
81
|
-
|
|
82
|
-
default:
|
|
83
|
-
|
|
85
|
+
i(l(d), { variant: "body2" }, {
|
|
86
|
+
default: n(() => [
|
|
87
|
+
s(u(t.valuePrefix + l(x)(t.totalValue, t.yAxisFormat) + t.valueSuffix), 1)
|
|
84
88
|
]),
|
|
85
89
|
_: 1
|
|
86
90
|
})
|
|
@@ -89,5 +93,5 @@ const C = { class: "chart-tooltip" }, g = {
|
|
|
89
93
|
}
|
|
90
94
|
});
|
|
91
95
|
export {
|
|
92
|
-
|
|
96
|
+
L as default
|
|
93
97
|
};
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { MyTooltipItem, ValueFormat } from '@/components/chart/types';
|
|
1
|
+
import { DateInterval, MyTooltipItem, ValueFormat } from '@/components/chart/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
title?: string;
|
|
4
4
|
xAxisFormat?: ValueFormat;
|
|
5
|
+
xAxisDateInterval?: DateInterval;
|
|
5
6
|
dataPoints: MyTooltipItem<'line'>[];
|
|
6
7
|
totalsChart?: boolean;
|
|
7
8
|
}>, {
|
|
8
9
|
title: string;
|
|
9
10
|
xAxisFormat: any;
|
|
11
|
+
xAxisDateInterval: any;
|
|
10
12
|
dataPoints: () => any[];
|
|
11
13
|
totalsChart: boolean;
|
|
12
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
15
|
title?: string;
|
|
14
16
|
xAxisFormat?: ValueFormat;
|
|
17
|
+
xAxisDateInterval?: DateInterval;
|
|
15
18
|
dataPoints: MyTooltipItem<'line'>[];
|
|
16
19
|
totalsChart?: boolean;
|
|
17
20
|
}>, {
|
|
18
21
|
title: string;
|
|
19
22
|
xAxisFormat: any;
|
|
23
|
+
xAxisDateInterval: any;
|
|
20
24
|
dataPoints: () => any[];
|
|
21
25
|
totalsChart: boolean;
|
|
22
26
|
}>>>, {
|
|
23
27
|
title: string;
|
|
24
28
|
xAxisFormat: ValueFormat;
|
|
29
|
+
xAxisDateInterval: DateInterval;
|
|
25
30
|
dataPoints: MyTooltipItem<'line'>[];
|
|
26
31
|
totalsChart: boolean;
|
|
27
32
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TooltipHeader.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../TooltipHeader.
|
|
4
|
-
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-3b15c693"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,59 +1,69 @@
|
|
|
1
|
-
import "../../TooltipHeader.
|
|
2
|
-
import { formatValue as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css"; import { defineComponent as v, computed as m, openBlock as n, createElementBlock as f, createElementVNode as A, unref as t, createCommentVNode as s, createBlock as u, createVNode as D, withCtx as d, createTextVNode as x, toDisplayString as p } from "vue";
|
|
2
|
+
import { formatValue as r } from "./utils/utils.js";
|
|
3
|
+
import y from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import { DateInterval as c } from "./types.js";
|
|
5
|
+
import T from "../icon/v4/IconV4.vue.js";
|
|
5
6
|
import k from "../icon/v4/IconFlag.vue.js";
|
|
6
|
-
|
|
7
|
+
import { startOfWeek as C, endOfWeek as F, startOfMonth as I, endOfMonth as O } from "date-fns";
|
|
8
|
+
import { LONG_DATE_FORMAT as i } from "./consts.js";
|
|
9
|
+
const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = ["src"], P = /* @__PURE__ */ v({
|
|
7
10
|
__name: "TooltipHeader",
|
|
8
11
|
props: {
|
|
9
12
|
title: { default: "" },
|
|
10
13
|
xAxisFormat: { default: null },
|
|
14
|
+
xAxisDateInterval: { default: null },
|
|
11
15
|
dataPoints: { default: () => [] },
|
|
12
16
|
totalsChart: { type: Boolean, default: !1 }
|
|
13
17
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const e =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
setup(a) {
|
|
19
|
+
const e = a, o = m(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), h = m(() => e.totalsChart ? o.value?.label || e.title : e.xAxisFormat === "date" ? g(new Date(e.title)) : r(e.title, e.xAxisFormat)), g = (l) => e.xAxisDateInterval === c.WEEKLY ? `
|
|
20
|
+
${r(C(l), i)} -
|
|
21
|
+
${r(F(l), i)}
|
|
22
|
+
` : e.xAxisDateInterval === c.MONTHLY ? `
|
|
23
|
+
${r(I(l), i)} -
|
|
24
|
+
${r(O(l), i)}
|
|
25
|
+
` : r(l, i);
|
|
26
|
+
return (l, M) => (n(), f("div", E, [
|
|
27
|
+
A("div", N, [
|
|
28
|
+
a.totalsChart && t(o)?.image ? (n(), f("img", {
|
|
19
29
|
key: 0,
|
|
20
30
|
class: "title-image",
|
|
21
|
-
src: t(
|
|
22
|
-
}, null, 8,
|
|
23
|
-
|
|
31
|
+
src: t(o)?.image
|
|
32
|
+
}, null, 8, L)) : s("", !0),
|
|
33
|
+
a.totalsChart && t(o)?.countryFlag ? (n(), u(t(k), {
|
|
24
34
|
key: 1,
|
|
25
|
-
"country-code": t(
|
|
26
|
-
}, null, 8, ["country-code"])) :
|
|
27
|
-
|
|
35
|
+
"country-code": t(o).countryFlag
|
|
36
|
+
}, null, 8, ["country-code"])) : s("", !0),
|
|
37
|
+
a.totalsChart && t(o)?.icon ? (n(), u(t(T), {
|
|
28
38
|
key: 2,
|
|
29
39
|
class: "platform-icon",
|
|
30
|
-
type: t(
|
|
31
|
-
name: t(
|
|
40
|
+
type: t(o)?.iconType,
|
|
41
|
+
name: t(o)?.icon,
|
|
32
42
|
size: "16px"
|
|
33
|
-
}, null, 8, ["type", "name"])) :
|
|
34
|
-
|
|
43
|
+
}, null, 8, ["type", "name"])) : s("", !0),
|
|
44
|
+
D(t(y), {
|
|
35
45
|
class: "title-text",
|
|
36
46
|
variant: "subtitle2"
|
|
37
47
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
48
|
+
default: d(() => [
|
|
49
|
+
x(p(t(h)), 1)
|
|
40
50
|
]),
|
|
41
51
|
_: 1
|
|
42
52
|
})
|
|
43
53
|
]),
|
|
44
|
-
|
|
54
|
+
a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (n(), u(t(y), {
|
|
45
55
|
key: 0,
|
|
46
56
|
class: "tooltip-sub-title",
|
|
47
57
|
variant: "caption"
|
|
48
58
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
59
|
+
default: d(() => [
|
|
60
|
+
x(p(t(r)(a.title, "day")), 1)
|
|
51
61
|
]),
|
|
52
62
|
_: 1
|
|
53
|
-
})) :
|
|
63
|
+
})) : s("", !0)
|
|
54
64
|
]));
|
|
55
65
|
}
|
|
56
66
|
});
|
|
57
67
|
export {
|
|
58
|
-
|
|
68
|
+
P as default
|
|
59
69
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DropdownTypeOption, Font } from './types';
|
|
1
|
+
import { DropdownTypeOption, Font, ValueFormat } from './types';
|
|
2
2
|
export declare const POINT_BORDER_COLOR = "#fcfcfc";
|
|
3
3
|
export declare const GRID_LINE_COLOR = "#E4E4E4";
|
|
4
4
|
export declare const TICK_LABEL_COLOR = "#646464";
|
|
@@ -32,4 +32,5 @@ export declare const CHART_PADDING: {
|
|
|
32
32
|
top: number;
|
|
33
33
|
bottom: number;
|
|
34
34
|
};
|
|
35
|
-
export declare const TICKS_EXTRA_PADDING =
|
|
35
|
+
export declare const TICKS_EXTRA_PADDING = 6;
|
|
36
|
+
export declare const LONG_DATE_FORMAT: ValueFormat;
|
|
@@ -7,17 +7,17 @@ const t = "#fcfcfc", n = "#E4E4E4", T = "#646464", o = {
|
|
|
7
7
|
{ id: _.Line, name: "Line" },
|
|
8
8
|
{ id: _.StackedLine, name: "Stack" },
|
|
9
9
|
{ id: _.Bar, name: "Bar" }
|
|
10
|
-
], N = 76,
|
|
10
|
+
], N = 76, L = 43, s = 312, I = 187, e = "__TOTALS_HELPER_KEY__", D = "___BASE_COLOR__", i = "Bidding", C = "ironSource", K = "UnityAds", P = "Meta", H = "Google", S = "Mintegral", a = "AppLovin", B = "InMobi", G = "DT Exchange", M = "Pangle", r = "Liftoff Monetize", F = 10, W = 70, f = {
|
|
11
11
|
left: 18,
|
|
12
12
|
right: 18,
|
|
13
13
|
top: 18,
|
|
14
14
|
bottom: 11
|
|
15
|
-
},
|
|
15
|
+
}, d = 6, g = "dateLong";
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
D as BASE_COLOR_KEY,
|
|
18
|
+
i as BIDDING_PREFIX,
|
|
19
19
|
f as CHART_PADDING,
|
|
20
|
-
|
|
20
|
+
L as COMPACT_HEADER_HEIGHT,
|
|
21
21
|
s as DEFAULT_CHART_PLANE_HEIGHT,
|
|
22
22
|
R as DEFAULT_MAX_VISIBLE,
|
|
23
23
|
A as DEFAULT_MIN_VISIBLE,
|
|
@@ -25,21 +25,22 @@ export {
|
|
|
25
25
|
c as DROPDOWN_TYPE_OPTIONS,
|
|
26
26
|
n as GRID_LINE_COLOR,
|
|
27
27
|
N as HEADER_HEIGHT,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
W as HOVER_AREA_TRANSPARENCY,
|
|
29
|
+
F as HOVER_TRANSPARENCY,
|
|
30
|
+
g as LONG_DATE_FORMAT,
|
|
31
|
+
I as MIN_PLANE_HEIGHT,
|
|
31
32
|
H as NETWORK_AD_MOB,
|
|
32
|
-
|
|
33
|
+
a as NETWORK_APPLOVIN,
|
|
33
34
|
G as NETWORK_DT_EXCHANGE,
|
|
34
35
|
P as NETWORK_FACEBOOK_META,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
B as NETWORK_INMOBI,
|
|
37
|
+
C as NETWORK_IRON_SOURCE,
|
|
37
38
|
r as NETWORK_LIFTOFF,
|
|
38
39
|
S as NETWORK_MINTEGRAL,
|
|
39
40
|
M as NETWORK_PANGLE,
|
|
40
41
|
K as NETWORK_UNITY_ADS,
|
|
41
42
|
t as POINT_BORDER_COLOR,
|
|
42
|
-
|
|
43
|
+
d as TICKS_EXTRA_PADDING,
|
|
43
44
|
T as TICK_LABEL_COLOR,
|
|
44
45
|
o as TICK_LABEL_FONT,
|
|
45
46
|
e as TOTALS_HELPER_KEY
|
|
@@ -17,9 +17,12 @@ declare const ChartTypes: () => ({
|
|
|
17
17
|
chartType: ChartType;
|
|
18
18
|
hideLegend: boolean;
|
|
19
19
|
xAxisFormat: import("./types").ValueFormat;
|
|
20
|
+
xAxisDateInterval: import("./types").DateInterval;
|
|
20
21
|
totalsChart: boolean;
|
|
21
22
|
parsing: import("./types").ChartParsingConfig;
|
|
22
23
|
yAxisFormat: import("./types").ValueFormat;
|
|
24
|
+
valueSuffix: string;
|
|
25
|
+
valuePrefix: string;
|
|
23
26
|
dataSets: import("./types").ChartDataSet[];
|
|
24
27
|
trendTooltip: any;
|
|
25
28
|
subheader: string;
|
|
@@ -29,6 +32,7 @@ declare const ChartTypes: () => ({
|
|
|
29
32
|
tickCount: number;
|
|
30
33
|
truncateTickLabels: boolean;
|
|
31
34
|
keepSubheaderVisible: boolean;
|
|
35
|
+
empty: boolean;
|
|
32
36
|
noDataIcon: string;
|
|
33
37
|
noDataTitle: string;
|
|
34
38
|
noDataSubtitle: string;
|
|
@@ -89,6 +93,10 @@ declare const ChartTypes: () => ({
|
|
|
89
93
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
90
94
|
default: string;
|
|
91
95
|
};
|
|
96
|
+
xAxisDateInterval: {
|
|
97
|
+
type: import("vue").PropType<import("./types").DateInterval>;
|
|
98
|
+
default: import("./types").DateInterval;
|
|
99
|
+
};
|
|
92
100
|
totalsChart: {
|
|
93
101
|
type: import("vue").PropType<boolean>;
|
|
94
102
|
default: boolean;
|
|
@@ -101,6 +109,14 @@ declare const ChartTypes: () => ({
|
|
|
101
109
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
102
110
|
default: string;
|
|
103
111
|
};
|
|
112
|
+
valueSuffix: {
|
|
113
|
+
type: import("vue").PropType<string>;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
valuePrefix: {
|
|
117
|
+
type: import("vue").PropType<string>;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
104
120
|
dataSets: {
|
|
105
121
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
106
122
|
required: true;
|
|
@@ -145,6 +161,10 @@ declare const ChartTypes: () => ({
|
|
|
145
161
|
type: import("vue").PropType<boolean>;
|
|
146
162
|
default: boolean;
|
|
147
163
|
};
|
|
164
|
+
empty: {
|
|
165
|
+
type: import("vue").PropType<boolean>;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
148
168
|
noDataIcon: {
|
|
149
169
|
type: import("vue").PropType<string>;
|
|
150
170
|
default: string;
|
|
@@ -189,7 +209,7 @@ declare const ChartTypes: () => ({
|
|
|
189
209
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
190
210
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
191
211
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
192
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "totalsChart" | "parsing" | "yAxisFormat" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "withSettingsHeader" | "extraCharts">;
|
|
212
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "withSettingsHeader" | "extraCharts">;
|
|
193
213
|
$attrs: {
|
|
194
214
|
[x: string]: unknown;
|
|
195
215
|
};
|
|
@@ -253,6 +273,10 @@ declare const ChartTypes: () => ({
|
|
|
253
273
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
254
274
|
default: string;
|
|
255
275
|
};
|
|
276
|
+
xAxisDateInterval: {
|
|
277
|
+
type: import("vue").PropType<import("./types").DateInterval>;
|
|
278
|
+
default: import("./types").DateInterval;
|
|
279
|
+
};
|
|
256
280
|
totalsChart: {
|
|
257
281
|
type: import("vue").PropType<boolean>;
|
|
258
282
|
default: boolean;
|
|
@@ -265,6 +289,14 @@ declare const ChartTypes: () => ({
|
|
|
265
289
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
266
290
|
default: string;
|
|
267
291
|
};
|
|
292
|
+
valueSuffix: {
|
|
293
|
+
type: import("vue").PropType<string>;
|
|
294
|
+
default: string;
|
|
295
|
+
};
|
|
296
|
+
valuePrefix: {
|
|
297
|
+
type: import("vue").PropType<string>;
|
|
298
|
+
default: string;
|
|
299
|
+
};
|
|
268
300
|
dataSets: {
|
|
269
301
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
270
302
|
required: true;
|
|
@@ -309,6 +341,10 @@ declare const ChartTypes: () => ({
|
|
|
309
341
|
type: import("vue").PropType<boolean>;
|
|
310
342
|
default: boolean;
|
|
311
343
|
};
|
|
344
|
+
empty: {
|
|
345
|
+
type: import("vue").PropType<boolean>;
|
|
346
|
+
default: boolean;
|
|
347
|
+
};
|
|
312
348
|
noDataIcon: {
|
|
313
349
|
type: import("vue").PropType<string>;
|
|
314
350
|
default: string;
|
|
@@ -370,9 +406,12 @@ declare const ChartTypes: () => ({
|
|
|
370
406
|
chartType: ChartType;
|
|
371
407
|
hideLegend: boolean;
|
|
372
408
|
xAxisFormat: import("./types").ValueFormat;
|
|
409
|
+
xAxisDateInterval: import("./types").DateInterval;
|
|
373
410
|
totalsChart: boolean;
|
|
374
411
|
parsing: import("./types").ChartParsingConfig;
|
|
375
412
|
yAxisFormat: import("./types").ValueFormat;
|
|
413
|
+
valueSuffix: string;
|
|
414
|
+
valuePrefix: string;
|
|
376
415
|
dataSets: import("./types").ChartDataSet[];
|
|
377
416
|
trendTooltip: any;
|
|
378
417
|
subheader: string;
|
|
@@ -382,6 +421,7 @@ declare const ChartTypes: () => ({
|
|
|
382
421
|
tickCount: number;
|
|
383
422
|
truncateTickLabels: boolean;
|
|
384
423
|
keepSubheaderVisible: boolean;
|
|
424
|
+
empty: boolean;
|
|
385
425
|
noDataIcon: string;
|
|
386
426
|
noDataTitle: string;
|
|
387
427
|
noDataSubtitle: string;
|
|
@@ -462,6 +502,10 @@ declare const ChartTypes: () => ({
|
|
|
462
502
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
463
503
|
default: string;
|
|
464
504
|
};
|
|
505
|
+
xAxisDateInterval: {
|
|
506
|
+
type: import("vue").PropType<import("./types").DateInterval>;
|
|
507
|
+
default: import("./types").DateInterval;
|
|
508
|
+
};
|
|
465
509
|
totalsChart: {
|
|
466
510
|
type: import("vue").PropType<boolean>;
|
|
467
511
|
default: boolean;
|
|
@@ -474,6 +518,14 @@ declare const ChartTypes: () => ({
|
|
|
474
518
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
475
519
|
default: string;
|
|
476
520
|
};
|
|
521
|
+
valueSuffix: {
|
|
522
|
+
type: import("vue").PropType<string>;
|
|
523
|
+
default: string;
|
|
524
|
+
};
|
|
525
|
+
valuePrefix: {
|
|
526
|
+
type: import("vue").PropType<string>;
|
|
527
|
+
default: string;
|
|
528
|
+
};
|
|
477
529
|
dataSets: {
|
|
478
530
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
479
531
|
required: true;
|
|
@@ -518,6 +570,10 @@ declare const ChartTypes: () => ({
|
|
|
518
570
|
type: import("vue").PropType<boolean>;
|
|
519
571
|
default: boolean;
|
|
520
572
|
};
|
|
573
|
+
empty: {
|
|
574
|
+
type: import("vue").PropType<boolean>;
|
|
575
|
+
default: boolean;
|
|
576
|
+
};
|
|
521
577
|
noDataIcon: {
|
|
522
578
|
type: import("vue").PropType<string>;
|
|
523
579
|
default: string;
|
|
@@ -616,6 +672,10 @@ declare const ChartTypes: () => ({
|
|
|
616
672
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
617
673
|
default: string;
|
|
618
674
|
};
|
|
675
|
+
xAxisDateInterval: {
|
|
676
|
+
type: import("vue").PropType<import("./types").DateInterval>;
|
|
677
|
+
default: import("./types").DateInterval;
|
|
678
|
+
};
|
|
619
679
|
totalsChart: {
|
|
620
680
|
type: import("vue").PropType<boolean>;
|
|
621
681
|
default: boolean;
|
|
@@ -628,6 +688,14 @@ declare const ChartTypes: () => ({
|
|
|
628
688
|
type: import("vue").PropType<import("./types").ValueFormat>;
|
|
629
689
|
default: string;
|
|
630
690
|
};
|
|
691
|
+
valueSuffix: {
|
|
692
|
+
type: import("vue").PropType<string>;
|
|
693
|
+
default: string;
|
|
694
|
+
};
|
|
695
|
+
valuePrefix: {
|
|
696
|
+
type: import("vue").PropType<string>;
|
|
697
|
+
default: string;
|
|
698
|
+
};
|
|
631
699
|
dataSets: {
|
|
632
700
|
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
633
701
|
required: true;
|
|
@@ -672,6 +740,10 @@ declare const ChartTypes: () => ({
|
|
|
672
740
|
type: import("vue").PropType<boolean>;
|
|
673
741
|
default: boolean;
|
|
674
742
|
};
|
|
743
|
+
empty: {
|
|
744
|
+
type: import("vue").PropType<boolean>;
|
|
745
|
+
default: boolean;
|
|
746
|
+
};
|
|
675
747
|
noDataIcon: {
|
|
676
748
|
type: import("vue").PropType<string>;
|
|
677
749
|
default: string;
|
|
@@ -733,9 +805,12 @@ declare const ChartTypes: () => ({
|
|
|
733
805
|
chartType: ChartType;
|
|
734
806
|
hideLegend: boolean;
|
|
735
807
|
xAxisFormat: import("./types").ValueFormat;
|
|
808
|
+
xAxisDateInterval: import("./types").DateInterval;
|
|
736
809
|
totalsChart: boolean;
|
|
737
810
|
parsing: import("./types").ChartParsingConfig;
|
|
738
811
|
yAxisFormat: import("./types").ValueFormat;
|
|
812
|
+
valueSuffix: string;
|
|
813
|
+
valuePrefix: string;
|
|
739
814
|
dataSets: import("./types").ChartDataSet[];
|
|
740
815
|
trendTooltip: any;
|
|
741
816
|
subheader: string;
|
|
@@ -745,6 +820,7 @@ declare const ChartTypes: () => ({
|
|
|
745
820
|
tickCount: number;
|
|
746
821
|
truncateTickLabels: boolean;
|
|
747
822
|
keepSubheaderVisible: boolean;
|
|
823
|
+
empty: boolean;
|
|
748
824
|
noDataIcon: string;
|
|
749
825
|
noDataTitle: string;
|
|
750
826
|
noDataSubtitle: string;
|
|
@@ -6,6 +6,14 @@ export declare const SINGLE_DATASET_DATE: {
|
|
|
6
6
|
value: number;
|
|
7
7
|
}[];
|
|
8
8
|
}[];
|
|
9
|
+
export declare const SINGLE_DATASET_DATE_MONTHLY: {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
data: {
|
|
13
|
+
date: string;
|
|
14
|
+
value: number;
|
|
15
|
+
}[];
|
|
16
|
+
}[];
|
|
9
17
|
export declare const SINGLE_DATASET_COUNTRY: {
|
|
10
18
|
id: string;
|
|
11
19
|
countryFlag: string;
|
|
@@ -8,6 +8,11 @@ export declare enum ChartType {
|
|
|
8
8
|
StackedLine = "stackedLine",
|
|
9
9
|
StackedBar = "stackedBar"
|
|
10
10
|
}
|
|
11
|
+
export declare enum DateInterval {
|
|
12
|
+
DAILY = "daily",
|
|
13
|
+
WEEKLY = "weekly",
|
|
14
|
+
MONTHLY = "monthly"
|
|
15
|
+
}
|
|
11
16
|
export type ChartDataRecord = Record<string, unknown>;
|
|
12
17
|
export type ChartDataSet = {
|
|
13
18
|
id: string | number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((
|
|
1
|
+
var e = /* @__PURE__ */ ((L) => (L.Line = "line", L.Bar = "bar", L.StackedLine = "stackedLine", L.StackedBar = "stackedBar", L))(e || {}), r = /* @__PURE__ */ ((L) => (L.DAILY = "daily", L.WEEKLY = "weekly", L.MONTHLY = "monthly", L))(r || {}), a = /* @__PURE__ */ ((L) => (L.Legend = "legend", L.YAxis = "yAxis", L))(a || {}), n = /* @__PURE__ */ ((L) => (L.UP = "up", L.DOWN = "down", L.NEUTRAL = "right", L))(n || {});
|
|
2
2
|
export {
|
|
3
3
|
e as ChartType,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
r as DateInterval,
|
|
5
|
+
a as TooltipOrder,
|
|
6
|
+
n as TrendDirection
|
|
6
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
|
|
2
2
|
export declare const calcStepSize: (min: number, max: number, tickCount: number) => number;
|
|
3
|
-
export declare const formatValue: (value: number | string, valueFormat: ValueFormat) => string;
|
|
3
|
+
export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat) => string;
|
|
4
4
|
export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { format as f } from "date-fns";
|
|
2
|
-
import { TICK_LABEL_FONT as
|
|
3
|
-
import { nFormatter as
|
|
4
|
-
import { truncateTextToFit as
|
|
5
|
-
import { REGEX_LINEBREAK as
|
|
2
|
+
import { TICK_LABEL_FONT as c } from "../consts.js";
|
|
3
|
+
import { nFormatter as d } from "../../../utils/formatNumbers.js";
|
|
4
|
+
import { truncateTextToFit as E } from "../../../utils/text.js";
|
|
5
|
+
import { REGEX_LINEBREAK as i } from "../../../consts/regex.js";
|
|
6
6
|
const g = (r, t, e) => {
|
|
7
7
|
if (e === 0)
|
|
8
8
|
return 0;
|
|
9
9
|
const n = t - r, o = n / e * 0.4;
|
|
10
10
|
return (n + o) / e;
|
|
11
|
-
},
|
|
11
|
+
}, a = (r, t) => t === "day" ? f(new Date(r), "EEEE") : t === "number" ? d(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "MMM dd, yyyy") : String(r), w = ({
|
|
12
12
|
label: r,
|
|
13
13
|
format: t,
|
|
14
14
|
availableSpace: e,
|
|
15
15
|
truncate: n = !1
|
|
16
16
|
}) => {
|
|
17
|
-
const s =
|
|
18
|
-
const
|
|
19
|
-
return n ?
|
|
17
|
+
const s = i.test(r), o = (p) => {
|
|
18
|
+
const m = a(p, t);
|
|
19
|
+
return n && e > 0 ? E(m, c, e) : m;
|
|
20
20
|
};
|
|
21
|
-
return s ? r.split(
|
|
21
|
+
return s ? r.split(i).map(o) : o(r);
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
g as calcStepSize,
|
|
25
|
-
|
|
25
|
+
a as formatValue,
|
|
26
26
|
w as prepareTickLabel
|
|
27
27
|
};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './IncludeExcludeOption.vue_vue_type_style_index_0_scoped_91bc7787_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";
|