@ironsource/shared-ui 2.1.11-rc.29 → 2.1.11-rc.32
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_b6e14d9b_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_088fa9b9_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_f00a9b1f_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +11 -3
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +108 -96
- package/components/chart/ChartHeader.vue.d.ts +13 -6
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +32 -29
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +2 -2
- package/components/chart/ChartLegend.vue2.js +93 -50
- package/components/chart/ChartTooltip.vue.d.ts +4 -5
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +64 -43
- package/components/chart/index.d.ts +36 -16
- package/components/chart/mockData.d.ts +15 -2
- package/components/chart/types.d.ts +15 -1
- package/components/chart/utils/utils.js +5 -5
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +0 -10
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +69 -74
- package/components/dropdown/v4/index.d.ts +0 -18
- package/index.d.ts +0 -36
- package/index.js +1 -1
- package/package.json +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_4a67037a_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-b6e14d9b]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px;width:100%}.header-wrapper[data-v-b6e14d9b]{height:76px}.chart-content[data-v-b6e14d9b]{width:100%}.chart-content.with-legend[data-v-b6e14d9b]{width:calc(100% - 222px)}.chart-sidebar[data-v-b6e14d9b]{border-left:1px solid var(--common-divider)}.chart[data-v-b6e14d9b]{width:100%;height:312px;position:relative}.chart__canvas[data-v-b6e14d9b]{width:100%;height:100%}.chart__tooltip[data-v-b6e14d9b]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-header[data-v-088fa9b9]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.chart-header .subheader[data-v-088fa9b9]{color:var(--text-secondary)}.header-texts[data-v-088fa9b9]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px}.type-switch[data-v-088fa9b9]{display:flex;align-items:center;gap:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.disabled-tooltip[data-v-f00a9b1f],.disabled-tooltip[data-v-f00a9b1f] .container{width:100%}.chart-legend[data-v-f00a9b1f]{display:flex;flex-direction:column;width:220px;height:100%;padding:0 8px 8px}.search-box[data-v-f00a9b1f]{padding:12px 0 4px}.legend[data-v-f00a9b1f]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-f00a9b1f]{list-style:none;padding:0}.legend__list>li[data-v-f00a9b1f]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-f00a9b1f]:hover{background-color:var(--action-hover, rgba(0, 0, 0, .05));border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-f00a9b1f]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li .item-wrapper[data-v-f00a9b1f]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-f00a9b1f]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-f00a9b1f]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-f00a9b1f]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-f00a9b1f]{color:var(--text-secondary, #646464)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-tooltip[data-v-6744325c]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);width:280px;padding:calc(var(--spacing-100) - 1px)}.tooltip-title-wrapper[data-v-6744325c]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .tooltip-sub-title[data-v-6744325c]{color:var(--text-secondary)}.color-box[data-v-6744325c]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-6744325c]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-6744325c]{list-style:none;margin:0;padding:0}.list__item[data-v-6744325c]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-6744325c]:last-child{margin-bottom:0}.platform-icon[data-v-6744325c]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-6744325c]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-6744325c]{max-width:90%}.tooltip-footer[data-v-6744325c]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-6744325c]{flex-grow:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-list-area[data-v-2aee12ad]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-2aee12ad]{width:100%}.contain-accept[data-v-2aee12ad]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-2aee12ad]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-2aee12ad]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
|
|
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
tickCount?: number;
|
|
10
10
|
header?: string;
|
|
11
11
|
subheader?: string;
|
|
12
|
-
|
|
12
|
+
withSubheaderTooltip?: boolean;
|
|
13
13
|
hideLegend?: boolean;
|
|
14
14
|
minVisible?: number;
|
|
15
15
|
maxVisible?: number;
|
|
@@ -18,6 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
18
|
noDataTitle?: string;
|
|
19
19
|
noDataSubtitle?: string;
|
|
20
20
|
withSettingsHeader?: boolean;
|
|
21
|
+
maxLimitTooltipText?: string;
|
|
21
22
|
}>, {
|
|
22
23
|
chartType: ChartType;
|
|
23
24
|
dataSets: () => any[];
|
|
@@ -37,6 +38,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
37
38
|
noDataTitle: string;
|
|
38
39
|
noDataSubtitle: string;
|
|
39
40
|
withSettingsHeader: boolean;
|
|
41
|
+
withSubheaderTooltip: boolean;
|
|
42
|
+
maxLimitTooltipText: string;
|
|
40
43
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
41
44
|
"update:chartType": (chartType: ChartType) => void;
|
|
42
45
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
@@ -50,7 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
50
53
|
tickCount?: number;
|
|
51
54
|
header?: string;
|
|
52
55
|
subheader?: string;
|
|
53
|
-
|
|
56
|
+
withSubheaderTooltip?: boolean;
|
|
54
57
|
hideLegend?: boolean;
|
|
55
58
|
minVisible?: number;
|
|
56
59
|
maxVisible?: number;
|
|
@@ -59,6 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
59
62
|
noDataTitle?: string;
|
|
60
63
|
noDataSubtitle?: string;
|
|
61
64
|
withSettingsHeader?: boolean;
|
|
65
|
+
maxLimitTooltipText?: string;
|
|
62
66
|
}>, {
|
|
63
67
|
chartType: ChartType;
|
|
64
68
|
dataSets: () => any[];
|
|
@@ -78,6 +82,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
78
82
|
noDataTitle: string;
|
|
79
83
|
noDataSubtitle: string;
|
|
80
84
|
withSettingsHeader: boolean;
|
|
85
|
+
withSubheaderTooltip: boolean;
|
|
86
|
+
maxLimitTooltipText: string;
|
|
81
87
|
}>>> & {
|
|
82
88
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
83
89
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
@@ -90,10 +96,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
90
96
|
visibleIds: unknown[];
|
|
91
97
|
minVisible: number;
|
|
92
98
|
maxVisible: number;
|
|
99
|
+
maxLimitTooltipText: string;
|
|
93
100
|
chartType: ChartType;
|
|
94
101
|
withSettingsHeader: boolean;
|
|
95
102
|
subheader: string;
|
|
96
|
-
|
|
103
|
+
withSubheaderTooltip: boolean;
|
|
97
104
|
dataSets: ChartDataSet[];
|
|
98
105
|
hideLegend: boolean;
|
|
99
106
|
tickCount: number;
|
|
@@ -103,6 +110,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
103
110
|
}>, {
|
|
104
111
|
metric?(_: {}): any;
|
|
105
112
|
breakdowns?(_: {}): any;
|
|
113
|
+
"subheader-tooltip"?(_: {}): any;
|
|
106
114
|
}>;
|
|
107
115
|
export default _default;
|
|
108
116
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Chart.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const p = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_b6e14d9b_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-b6e14d9b"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "../../Chart.
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_b6e14d9b_lang.css"; import { defineComponent as j, ref as g, computed as l, onMounted as q, watch as T, nextTick as J, openBlock as d, createElementBlock as C, Fragment as O, createBlock as h, unref as u, isRef as D, withCtx as k, renderSlot as x, createCommentVNode as v, createElementVNode as p, normalizeClass as Q, createVNode as F, normalizeStyle as Y } from "vue";
|
|
2
2
|
import { useVModel as _ } from "@vueuse/core";
|
|
3
|
-
import { Chart as N, ArcElement as ee, LineElement as te, BarElement as ae, PointElement as oe, LineController as
|
|
4
|
-
import { HoverVerticalLine as
|
|
5
|
-
import { formatValue as H, calcStepSize as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as
|
|
3
|
+
import { Chart as N, ArcElement as ee, LineElement as te, BarElement as ae, PointElement as oe, LineController as ie, BarController as le, PieController as re, ScatterController as ne, CategoryScale as se, LinearScale as de, Filler as ue, Tooltip as ce } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as pe } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as H, calcStepSize as me } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as he, DEFAULT_MAX_VISIBLE as ve, COLOR_PALETTE as ye, POINT_BORDER_COLOR as be, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as z } from "./consts.js";
|
|
7
7
|
import { ChartType as n } from "./types.js";
|
|
8
8
|
import { useTooltipPosition as ge } from "./composables/useTooltipPosition.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { hexColorToRgba as
|
|
9
|
+
import Te from "./ChartTooltip.vue.js";
|
|
10
|
+
import Ce from "./ChartLegend.vue.js";
|
|
11
|
+
import ke from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as xe } from "../../utils/color.js";
|
|
13
13
|
import { useChartValues as Le } from "./composables/useChartValues.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
14
|
+
import Se from "./ChartLoader.vue.js";
|
|
15
|
+
import we from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Be from "./SettingsHeader.vue.js";
|
|
17
|
+
const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-sidebar"
|
|
20
20
|
}, je = /* @__PURE__ */ j({
|
|
@@ -26,75 +26,78 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
26
26
|
parsing: { default: void 0 },
|
|
27
27
|
xAxisFormat: { default: "string" },
|
|
28
28
|
yAxisFormat: { default: "number" },
|
|
29
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: fe },
|
|
30
30
|
header: { default: "" },
|
|
31
31
|
subheader: { default: "" },
|
|
32
|
-
|
|
32
|
+
withSubheaderTooltip: { type: Boolean, default: !1 },
|
|
33
33
|
hideLegend: { type: Boolean, default: !1 },
|
|
34
|
-
minVisible: { default:
|
|
34
|
+
minVisible: { default: he },
|
|
35
35
|
maxVisible: { default: ve },
|
|
36
36
|
loading: { type: Boolean, default: !1 },
|
|
37
37
|
noDataIcon: { default: "file-x" },
|
|
38
38
|
noDataTitle: { default: "No data to display" },
|
|
39
39
|
noDataSubtitle: { default: "Search again with different filters" },
|
|
40
|
-
withSettingsHeader: { type: Boolean, default: !0 }
|
|
40
|
+
withSettingsHeader: { type: Boolean, default: !0 },
|
|
41
|
+
maxLimitTooltipText: { default: "" }
|
|
41
42
|
},
|
|
42
43
|
emits: ["update:chartType", "update:visibleIds"],
|
|
43
|
-
setup(a, { emit:
|
|
44
|
+
setup(a, { emit: L }) {
|
|
44
45
|
const t = a;
|
|
45
46
|
N.register(
|
|
46
47
|
ee,
|
|
47
48
|
te,
|
|
48
49
|
ae,
|
|
49
50
|
oe,
|
|
50
|
-
re,
|
|
51
51
|
ie,
|
|
52
52
|
le,
|
|
53
|
+
re,
|
|
53
54
|
ne,
|
|
54
55
|
se,
|
|
55
56
|
de,
|
|
56
57
|
ue,
|
|
57
58
|
ce,
|
|
58
|
-
|
|
59
|
+
pe
|
|
59
60
|
);
|
|
60
|
-
const c = _(t, "chartType",
|
|
61
|
+
const c = _(t, "chartType", L), m = g(null);
|
|
61
62
|
let s = null;
|
|
62
|
-
const S =
|
|
63
|
-
|
|
63
|
+
const S = l(() => t.dataSets.length === 0), w = l(() => !t.loading && !S.value), y = () => {
|
|
64
|
+
m.value && (s && s.destroy(), s = new N(m.value, I.value));
|
|
64
65
|
}, M = () => {
|
|
65
|
-
s && (s.data.datasets =
|
|
66
|
+
s && (s.data.datasets = b.value, s.options = I.value.options, s.update());
|
|
66
67
|
};
|
|
67
|
-
q(
|
|
68
|
-
e && (await J(),
|
|
69
|
-
}),
|
|
70
|
-
const
|
|
68
|
+
q(y), T(() => t.chartType, y), T(w, async (e) => {
|
|
69
|
+
e && (await J(), y());
|
|
70
|
+
}), T([() => t.visibleIds, () => t.dataSets], M);
|
|
71
|
+
const f = l(
|
|
71
72
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
72
|
-
), $ =
|
|
73
|
+
), $ = l(
|
|
73
74
|
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
74
|
-
),
|
|
75
|
+
), B = l(
|
|
75
76
|
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
76
|
-
),
|
|
77
|
-
const
|
|
77
|
+
), b = l(() => B.value.map((e, o) => {
|
|
78
|
+
const i = e.color || ye[o] || "#000000";
|
|
78
79
|
return {
|
|
79
80
|
...e,
|
|
80
|
-
fill:
|
|
81
|
-
backgroundColor:
|
|
82
|
-
|
|
81
|
+
fill: f.value ? "start" : void 0,
|
|
82
|
+
backgroundColor: xe(
|
|
83
|
+
i,
|
|
83
84
|
t.chartType === n.StackedLine ? 10 : 70
|
|
84
85
|
),
|
|
85
|
-
borderColor:
|
|
86
|
-
pointBackgroundColor:
|
|
87
|
-
pointHoverBorderColor:
|
|
86
|
+
borderColor: i,
|
|
87
|
+
pointBackgroundColor: i,
|
|
88
|
+
pointHoverBorderColor: i,
|
|
88
89
|
maxBarThickness: 50,
|
|
89
|
-
clip: 5
|
|
90
|
+
clip: 5,
|
|
90
91
|
// draw a bit outside the chart area
|
|
92
|
+
icon: e.icon || null,
|
|
93
|
+
iconType: e.iconType || "branded"
|
|
91
94
|
};
|
|
92
|
-
})),
|
|
95
|
+
})), I = l(
|
|
93
96
|
() => ({
|
|
94
97
|
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
95
98
|
// Chart Data
|
|
96
99
|
data: {
|
|
97
|
-
datasets:
|
|
100
|
+
datasets: b.value
|
|
98
101
|
},
|
|
99
102
|
// Chart Options
|
|
100
103
|
options: {
|
|
@@ -114,11 +117,11 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
114
117
|
enabled: !1,
|
|
115
118
|
position: "average",
|
|
116
119
|
external: ({ tooltip: e }) => {
|
|
117
|
-
|
|
120
|
+
r.value = { ...e };
|
|
118
121
|
},
|
|
119
122
|
callbacks: {
|
|
120
123
|
footer: (e) => {
|
|
121
|
-
const o = e.reduce((
|
|
124
|
+
const o = e.reduce((i, X) => i + (X.parsed.y || 0), 0);
|
|
122
125
|
return ["Total", String(o)];
|
|
123
126
|
}
|
|
124
127
|
}
|
|
@@ -146,7 +149,7 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
146
149
|
borderWidth: 0,
|
|
147
150
|
hoverRadius: 4,
|
|
148
151
|
hoverBorderWidth: 2,
|
|
149
|
-
pointHoverBackgroundColor:
|
|
152
|
+
pointHoverBackgroundColor: be
|
|
150
153
|
},
|
|
151
154
|
bar: {
|
|
152
155
|
borderRadius: 4
|
|
@@ -157,7 +160,7 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
157
160
|
x: {
|
|
158
161
|
beginAtZero: !0,
|
|
159
162
|
border: { display: !1 },
|
|
160
|
-
stacked:
|
|
163
|
+
stacked: f.value,
|
|
161
164
|
// stack on top of each other
|
|
162
165
|
// ticks
|
|
163
166
|
ticks: {
|
|
@@ -185,16 +188,16 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
185
188
|
beginAtZero: !0,
|
|
186
189
|
border: { display: !1 },
|
|
187
190
|
// hide left borderline
|
|
188
|
-
stacked:
|
|
191
|
+
stacked: f.value,
|
|
189
192
|
// stack on top of each other
|
|
190
193
|
// ticks
|
|
191
194
|
ticks: {
|
|
192
195
|
color: P,
|
|
193
196
|
font: U,
|
|
194
197
|
padding: 8,
|
|
195
|
-
stepSize:
|
|
196
|
-
min:
|
|
197
|
-
max:
|
|
198
|
+
stepSize: V.value,
|
|
199
|
+
min: R.value,
|
|
200
|
+
max: V.value * t.tickCount,
|
|
198
201
|
callback: (e) => H(e, t.yAxisFormat)
|
|
199
202
|
},
|
|
200
203
|
// grid lines
|
|
@@ -207,89 +210,98 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
|
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
})
|
|
210
|
-
), K =
|
|
211
|
-
() =>
|
|
212
|
-
), W =
|
|
213
|
+
), K = l(
|
|
214
|
+
() => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
215
|
+
), W = l(() => t.dataSets.map((e) => ({
|
|
213
216
|
id: e.id,
|
|
214
217
|
label: e.label,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
caption: e.caption || null,
|
|
219
|
+
color: K.value[e.id] || null,
|
|
220
|
+
icon: e.icon || null,
|
|
221
|
+
iconType: e.iconType || "branded"
|
|
222
|
+
}))), A = g(null), r = g(null), { position: E } = ge(
|
|
223
|
+
m,
|
|
224
|
+
A,
|
|
225
|
+
r
|
|
226
|
+
), Z = l(() => ({
|
|
227
|
+
left: `${E.value.left}px`,
|
|
228
|
+
top: `${E.value.top}px`,
|
|
229
|
+
opacity: r.value?.opacity || 0
|
|
230
|
+
})), { minValue: R, maxValue: G } = Le({
|
|
225
231
|
parsingConfig: t.parsing,
|
|
226
|
-
dataSets:
|
|
227
|
-
isStacked:
|
|
228
|
-
}),
|
|
229
|
-
() =>
|
|
232
|
+
dataSets: B,
|
|
233
|
+
isStacked: f
|
|
234
|
+
}), V = l(
|
|
235
|
+
() => me(R.value, G.value, t.tickCount)
|
|
230
236
|
);
|
|
231
|
-
return (e, o) => (d(),
|
|
232
|
-
a.withSettingsHeader ? (d(),
|
|
237
|
+
return (e, o) => (d(), C(O, null, [
|
|
238
|
+
a.withSettingsHeader ? (d(), h(Be, {
|
|
233
239
|
key: 0,
|
|
234
240
|
"chart-type": u(c),
|
|
235
|
-
"onUpdate:chart-type": o[0] || (o[0] = (
|
|
241
|
+
"onUpdate:chart-type": o[0] || (o[0] = (i) => D(c) ? c.value = i : null),
|
|
236
242
|
"hide-legend": a.hideLegend
|
|
237
243
|
}, {
|
|
238
|
-
metric:
|
|
239
|
-
|
|
244
|
+
metric: k(() => [
|
|
245
|
+
x(e.$slots, "metric", {}, void 0, !0)
|
|
240
246
|
]),
|
|
241
|
-
breakdowns:
|
|
242
|
-
|
|
247
|
+
breakdowns: k(() => [
|
|
248
|
+
x(e.$slots, "breakdowns", {}, void 0, !0)
|
|
243
249
|
]),
|
|
244
250
|
_: 3
|
|
245
251
|
}, 8, ["chart-type", "hide-legend"])) : v("", !0),
|
|
246
|
-
|
|
247
|
-
u(
|
|
248
|
-
|
|
252
|
+
p("div", Ie, [
|
|
253
|
+
u(w) ? (d(), C(O, { key: 0 }, [
|
|
254
|
+
p("section", {
|
|
249
255
|
class: Q(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
250
256
|
}, [
|
|
251
|
-
|
|
252
|
-
F(
|
|
257
|
+
p("div", Ae, [
|
|
258
|
+
F(ke, {
|
|
253
259
|
"chart-type": u(c),
|
|
254
|
-
"onUpdate:chart-type": o[1] || (o[1] = (
|
|
260
|
+
"onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
|
|
255
261
|
"with-settings-header": a.withSettingsHeader,
|
|
256
262
|
header: a.header,
|
|
257
263
|
subheader: a.subheader,
|
|
258
|
-
"subheader-tooltip": a.
|
|
259
|
-
},
|
|
264
|
+
"with-subheader-tooltip": a.withSubheaderTooltip
|
|
265
|
+
}, {
|
|
266
|
+
"subheader-tooltip": k(() => [
|
|
267
|
+
x(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
268
|
+
]),
|
|
269
|
+
_: 3
|
|
270
|
+
}, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
|
|
260
271
|
]),
|
|
261
|
-
|
|
262
|
-
|
|
272
|
+
p("div", Ee, [
|
|
273
|
+
p("canvas", {
|
|
263
274
|
ref_key: "chartRef",
|
|
264
|
-
ref:
|
|
275
|
+
ref: m,
|
|
265
276
|
class: "chart__canvas"
|
|
266
277
|
}, null, 512),
|
|
267
|
-
|
|
278
|
+
p("div", {
|
|
268
279
|
ref_key: "tooltipRef",
|
|
269
|
-
ref:
|
|
280
|
+
ref: A,
|
|
270
281
|
class: "chart__tooltip",
|
|
271
282
|
style: Y(u(Z))
|
|
272
283
|
}, [
|
|
273
|
-
|
|
284
|
+
r.value ? (d(), h(Te, {
|
|
274
285
|
key: 0,
|
|
275
|
-
title: String(
|
|
276
|
-
"data-points":
|
|
286
|
+
title: String(r.value.title),
|
|
287
|
+
"data-points": r.value.dataPoints,
|
|
277
288
|
"x-axis-format": a.xAxisFormat,
|
|
278
289
|
"y-axis-format": a.yAxisFormat,
|
|
279
|
-
"total-label":
|
|
280
|
-
"total-value": Number(
|
|
290
|
+
"total-label": r.value.footer[0],
|
|
291
|
+
"total-value": Number(r.value.footer[1])
|
|
281
292
|
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
|
|
282
293
|
], 4)
|
|
283
294
|
])
|
|
284
295
|
], 2),
|
|
285
|
-
a.hideLegend ? v("", !0) : (d(),
|
|
286
|
-
F(
|
|
296
|
+
a.hideLegend ? v("", !0) : (d(), C("section", Re, [
|
|
297
|
+
F(Ce, {
|
|
287
298
|
items: u(W),
|
|
288
299
|
"visible-ids": a.visibleIds,
|
|
289
|
-
"
|
|
290
|
-
|
|
300
|
+
"max-limit-tooltip-text": a.maxLimitTooltipText,
|
|
301
|
+
"onUpdate:visibleIds": o[2] || (o[2] = (i) => L("update:visibleIds", i))
|
|
302
|
+
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
291
303
|
]))
|
|
292
|
-
], 64)) : a.loading ? (d(),
|
|
304
|
+
], 64)) : a.loading ? (d(), h(Se, { key: 1 })) : u(S) ? (d(), h(u(we), {
|
|
293
305
|
key: 2,
|
|
294
306
|
title: a.noDataTitle,
|
|
295
307
|
subtitle: a.noDataSubtitle,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ChartType } from '@/components/chart/types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
chartType: ChartType;
|
|
4
4
|
withSettingsHeader: boolean;
|
|
5
5
|
header?: string;
|
|
6
6
|
subheader?: string;
|
|
7
|
-
|
|
7
|
+
withSubheaderTooltip?: boolean;
|
|
8
8
|
}>, {
|
|
9
9
|
chartType: ChartType;
|
|
10
10
|
withSettingsHeader: boolean;
|
|
11
11
|
header: string;
|
|
12
12
|
subheader: string;
|
|
13
|
-
|
|
13
|
+
withSubheaderTooltip: boolean;
|
|
14
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
15
|
"update:chartType": (type: ChartType) => void;
|
|
16
16
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -18,13 +18,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
18
18
|
withSettingsHeader: boolean;
|
|
19
19
|
header?: string;
|
|
20
20
|
subheader?: string;
|
|
21
|
-
|
|
21
|
+
withSubheaderTooltip?: boolean;
|
|
22
22
|
}>, {
|
|
23
23
|
chartType: ChartType;
|
|
24
24
|
withSettingsHeader: boolean;
|
|
25
25
|
header: string;
|
|
26
26
|
subheader: string;
|
|
27
|
-
|
|
27
|
+
withSubheaderTooltip: boolean;
|
|
28
28
|
}>>> & {
|
|
29
29
|
"onUpdate:chartType"?: (type: ChartType) => any;
|
|
30
30
|
}, {
|
|
@@ -32,7 +32,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
32
32
|
chartType: ChartType;
|
|
33
33
|
withSettingsHeader: boolean;
|
|
34
34
|
subheader: string;
|
|
35
|
-
|
|
35
|
+
withSubheaderTooltip: boolean;
|
|
36
|
+
}>, {
|
|
37
|
+
"subheader-tooltip"?(_: {}): any;
|
|
36
38
|
}>;
|
|
37
39
|
export default _default;
|
|
38
40
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -52,3 +54,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
52
54
|
type __VLS_Prettify<T> = {
|
|
53
55
|
[K in keyof T]: T[K];
|
|
54
56
|
} & {};
|
|
57
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartHeader.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartHeader.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_088fa9b9_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-088fa9b9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import "../../ChartHeader.
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_088fa9b9_lang.css"; import { defineComponent as y, computed as T, openBlock as c, createElementBlock as b, createElementVNode as S, createVNode as i, unref as a, withCtx as o, renderSlot as V, createTextVNode as s, toDisplayString as u, createBlock as g, isRef as v, createCommentVNode as w } from "vue";
|
|
2
2
|
import h from "../typography/v4/Typography.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import B from "../switch/v4/SwitchV4.vue.js";
|
|
4
4
|
import { ChartType as r } from "./types.js";
|
|
5
|
-
import
|
|
6
|
-
const C = { class: "chart-header" },
|
|
5
|
+
import k from "../tooltip/v4/TooltipV4.vue.js";
|
|
6
|
+
const C = { class: "chart-header" }, x = { class: "header-texts" }, D = /* @__PURE__ */ y({
|
|
7
7
|
__name: "ChartHeader",
|
|
8
8
|
props: {
|
|
9
9
|
chartType: { default: r.Line },
|
|
10
10
|
withSettingsHeader: { type: Boolean, default: !0 },
|
|
11
11
|
header: { default: "" },
|
|
12
12
|
subheader: { default: "" },
|
|
13
|
-
|
|
13
|
+
withSubheaderTooltip: { type: Boolean, default: !1 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:chartType"],
|
|
16
16
|
setup(e, { emit: p }) {
|
|
17
|
-
const m = e,
|
|
17
|
+
const m = e, l = [
|
|
18
18
|
{ id: r.Line, icon: "chart-line-up" },
|
|
19
19
|
{ id: r.Bar, icon: "chart-bar" },
|
|
20
20
|
{ id: r.StackedLine, icon: "chart-line" }
|
|
21
|
-
],
|
|
21
|
+
], d = T({
|
|
22
22
|
get() {
|
|
23
|
-
return
|
|
23
|
+
return l.find(({ id: t }) => t === m.chartType);
|
|
24
24
|
},
|
|
25
|
-
set(
|
|
26
|
-
p("update:chartType",
|
|
25
|
+
set(t) {
|
|
26
|
+
p("update:chartType", t.id);
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
return (t, n) => (c(), b("div", C, [
|
|
30
|
+
S("div", x, [
|
|
31
|
+
i(a(k), {
|
|
32
|
+
placement: "right",
|
|
33
|
+
disabled: !e.withSubheaderTooltip
|
|
34
34
|
}, {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
tooltip: o(() => [
|
|
36
|
+
V(t.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
37
|
+
]),
|
|
38
|
+
default: o(() => [
|
|
39
|
+
i(a(h), {
|
|
37
40
|
class: "subheader",
|
|
38
41
|
variant: "h5"
|
|
39
42
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
u(
|
|
43
|
+
default: o(() => [
|
|
44
|
+
s(u(e.subheader), 1)
|
|
42
45
|
]),
|
|
43
46
|
_: 1
|
|
44
47
|
})
|
|
45
48
|
]),
|
|
46
|
-
_:
|
|
47
|
-
}, 8, ["
|
|
48
|
-
|
|
49
|
-
default:
|
|
50
|
-
u(
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, ["disabled"]),
|
|
51
|
+
i(a(h), { variant: "chart2" }, {
|
|
52
|
+
default: o(() => [
|
|
53
|
+
s(u(e.header), 1)
|
|
51
54
|
]),
|
|
52
55
|
_: 1
|
|
53
56
|
})
|
|
54
57
|
]),
|
|
55
|
-
e.withSettingsHeader ?
|
|
58
|
+
e.withSettingsHeader ? w("", !0) : (c(), g(a(B), {
|
|
56
59
|
key: 0,
|
|
57
|
-
modelValue:
|
|
58
|
-
"onUpdate:modelValue":
|
|
59
|
-
options:
|
|
60
|
+
modelValue: a(d),
|
|
61
|
+
"onUpdate:modelValue": n[0] || (n[0] = (f) => v(d) ? d.value = f : null),
|
|
62
|
+
options: l
|
|
60
63
|
}, null, 8, ["modelValue"]))
|
|
61
64
|
]));
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
export {
|
|
65
|
-
|
|
68
|
+
D as default
|
|
66
69
|
};
|
|
@@ -4,11 +4,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
4
4
|
visibleIds: unknown[];
|
|
5
5
|
minVisible?: number;
|
|
6
6
|
maxVisible?: number;
|
|
7
|
+
maxLimitTooltipText?: string;
|
|
7
8
|
}>, {
|
|
8
9
|
items: () => any[];
|
|
9
10
|
visibleIds: () => any[];
|
|
10
11
|
minVisible: number;
|
|
11
12
|
maxVisible: number;
|
|
13
|
+
maxLimitTooltipText: string;
|
|
12
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
15
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
14
16
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -16,11 +18,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
16
18
|
visibleIds: unknown[];
|
|
17
19
|
minVisible?: number;
|
|
18
20
|
maxVisible?: number;
|
|
21
|
+
maxLimitTooltipText?: string;
|
|
19
22
|
}>, {
|
|
20
23
|
items: () => any[];
|
|
21
24
|
visibleIds: () => any[];
|
|
22
25
|
minVisible: number;
|
|
23
26
|
maxVisible: number;
|
|
27
|
+
maxLimitTooltipText: string;
|
|
24
28
|
}>>> & {
|
|
25
29
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
26
30
|
}, {
|
|
@@ -28,6 +32,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
28
32
|
visibleIds: unknown[];
|
|
29
33
|
minVisible: number;
|
|
30
34
|
maxVisible: number;
|
|
35
|
+
maxLimitTooltipText: string;
|
|
31
36
|
}>;
|
|
32
37
|
export default _default;
|
|
33
38
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|