@ironsource/shared-ui 2.1.12-rc.16 → 2.1.12-rc.17
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_82f5b24e_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_5c80d8cd_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_9e521454_lang.css +1 -0
- package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_9f6cf389_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +16 -6
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +76 -72
- package/components/chart/ChartHeader.vue.d.ts +7 -7
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +48 -79
- package/components/chart/ChartHeaderTrend.vue.d.ts +6 -5
- package/components/chart/ChartHeaderTrend.vue.js +3 -3
- package/components/chart/ChartHeaderTrend.vue2.js +15 -14
- package/components/chart/ChartPlane.vue.d.ts +17 -7
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +270 -258
- package/components/chart/ChartStoryArgs.d.ts +21 -2
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +2 -2
- package/components/chart/SubHeader.vue.d.ts +52 -0
- package/components/chart/SubHeader.vue.js +7 -0
- package/components/chart/SubHeader.vue2.js +61 -0
- package/components/chart/TooltipHeader.vue.js +7 -0
- package/components/chart/{components/TooltipHeader.vue2.js → TooltipHeader.vue2.js} +5 -5
- package/components/chart/colorPalette.d.ts +1 -1
- package/components/chart/colorPalette.js +23 -23
- package/components/chart/composables/useChartHeight.d.ts +1 -1
- package/components/chart/consts.d.ts +10 -11
- package/components/chart/consts.js +29 -30
- package/components/chart/index.d.ts +71 -32
- package/components/chart/types.d.ts +9 -0
- package/components/chart/types.js +4 -2
- package/components/chart/utils/highlightUtils.d.ts +1 -1
- package/index.js +12 -8
- package/package.json +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_64dcfb5d_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_81cdfd5e_lang.css +0 -1
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_40d98a66_lang.css +0 -1
- package/components/chart/components/TooltipHeader.vue.js +0 -7
- /package/components/chart/{components/TooltipHeader.vue.d.ts → TooltipHeader.vue.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-82f5b24e]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-82f5b24e]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-82f5b24e]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-82f5b24e]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-82f5b24e]{border-left:1px solid var(--common-divider)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-header[data-v-da34b108]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.chart-header--compact[data-v-da34b108]{padding-top:22px}.chart-header--compact .header-texts[data-v-da34b108]{flex-direction:row}.chart-header--compact .header-text[data-v-da34b108]{color:var(--text-secondary)}.header-row[data-v-da34b108]{display:flex;align-items:flex-end;gap:4px}.header-texts[data-v-da34b108]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px;cursor:default}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-trend[data-v-79dc2883]{display:flex}.chart-trend--up[data-v-79dc2883]{color:var(--success-contrast-text)}.chart-trend--up .trend-icon[data-v-79dc2883]{color:var(--success-darker)}.chart-trend--down[data-v-79dc2883]{color:var(--error-contrast-text)}.chart-trend--down .trend-icon[data-v-79dc2883]{color:var(--error-dark)}.chart-trend--right[data-v-79dc2883]{color:var(--warning-contrast-text)}.chart-trend--right .trend-icon[data-v-79dc2883]{color:var(--warning-dark)}.trend-icon[data-v-79dc2883]{display:flex;align-self:normal}.chart-trend-tooltip[data-v-79dc2883]{align-items:normal}.trend-tooltip[data-v-79dc2883]{display:flex;flex-direction:column}.trend-tooltip__header[data-v-79dc2883]{margin-bottom:.375rem}.trend-tooltip__text[data-v-79dc2883]{color:var(--text-secondary)}.separator[data-v-79dc2883]{display:flex;align-items:center;gap:.5rem;justify-content:center;height:1.1875rem}.separator__text[data-v-79dc2883]{display:block;color:var(--text-secondary)}.separator hr[data-v-79dc2883]{width:100%;height:1px;border:0;background:var(--common-divider)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-plane-container[data-v-5c80d8cd]{--headerHeight: var(--1ae03326);width:100%;height:var(--42303d50);position:relative}.header-wrapper[data-v-5c80d8cd]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-5c80d8cd]{padding-top:var(--headerHeight);height:100%}.chart[data-v-5c80d8cd]{width:100%;height:100%;position:relative}.chart__canvas[data-v-5c80d8cd]{width:100%;height:100%}.chart__tooltip[data-v-5c80d8cd]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-tooltip[data-v-9e521454]{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)}.color-box[data-v-9e521454]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-9e521454]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-9e521454]{list-style:none;margin:0;padding:0}.list__item[data-v-9e521454]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-9e521454]:last-child{margin-bottom:0}.platform-icon[data-v-9e521454]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-9e521454]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-9e521454]{max-width:90%}.tooltip-footer[data-v-9e521454]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-9e521454]{flex-grow:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.header-row[data-v-e6008b6c]{display:flex;align-items:flex-end;gap:4px}.subheader[data-v-e6008b6c]{color:var(--text-secondary)}.subheader-tooltip[data-v-e6008b6c]{display:flex;flex-direction:column;gap:.25rem}.subheader-tooltip__text[data-v-e6008b6c]{color:var(--text-secondary)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tooltip-title-wrapper[data-v-9f6cf389]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .main-title[data-v-9f6cf389]{display:flex;align-items:center;gap:.25rem}.tooltip-title-wrapper .title-text[data-v-9f6cf389]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tooltip-title-wrapper .title-image[data-v-9f6cf389]{width:20px;height:20px;border-radius:4px}.tooltip-title-wrapper .tooltip-sub-title[data-v-9f6cf389]{color:var(--text-secondary)}.tooltip-title-wrapper .platform-icon[data-v-9f6cf389]{color:var(--action-active)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartDataSet, ChartParsingConfig, ChartType, ValueFormat } from './types';
|
|
1
|
+
import { ChartDataSet, ChartParsingConfig, ChartType, TooltipOrder, TrendDirection, ValueFormat } from './types';
|
|
2
2
|
import { TotalType } from '@/utils/totals';
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
4
|
dataSets: ChartDataSet[];
|
|
@@ -14,14 +14,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
14
14
|
totalsChart?: boolean;
|
|
15
15
|
tooltipTotalType?: TotalType;
|
|
16
16
|
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
17
|
+
tooltipOrder?: TooltipOrder;
|
|
17
18
|
header?: string;
|
|
18
19
|
subheader?: string;
|
|
19
20
|
subheaderTooltip?: {
|
|
20
21
|
header?: string;
|
|
21
22
|
text?: string;
|
|
22
23
|
};
|
|
24
|
+
keepSubheaderVisible?: boolean;
|
|
23
25
|
trendValue?: string | number;
|
|
24
|
-
trendDirection?:
|
|
26
|
+
trendDirection?: TrendDirection;
|
|
25
27
|
trendTooltip?: {
|
|
26
28
|
header?: string;
|
|
27
29
|
rangeCurrent?: string;
|
|
@@ -54,11 +56,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
54
56
|
totalsChart: boolean;
|
|
55
57
|
tooltipTotalType: TotalType;
|
|
56
58
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
59
|
+
tooltipOrder: TooltipOrder;
|
|
57
60
|
header: string;
|
|
58
61
|
subheader: string;
|
|
59
62
|
subheaderTooltip: any;
|
|
63
|
+
keepSubheaderVisible: boolean;
|
|
60
64
|
trendValue: any;
|
|
61
|
-
trendDirection:
|
|
65
|
+
trendDirection: TrendDirection;
|
|
62
66
|
trendTooltip: any;
|
|
63
67
|
noDataIcon: string;
|
|
64
68
|
noDataTitle: string;
|
|
@@ -91,14 +95,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
91
95
|
totalsChart?: boolean;
|
|
92
96
|
tooltipTotalType?: TotalType;
|
|
93
97
|
tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
|
|
98
|
+
tooltipOrder?: TooltipOrder;
|
|
94
99
|
header?: string;
|
|
95
100
|
subheader?: string;
|
|
96
101
|
subheaderTooltip?: {
|
|
97
102
|
header?: string;
|
|
98
103
|
text?: string;
|
|
99
104
|
};
|
|
105
|
+
keepSubheaderVisible?: boolean;
|
|
100
106
|
trendValue?: string | number;
|
|
101
|
-
trendDirection?:
|
|
107
|
+
trendDirection?: TrendDirection;
|
|
102
108
|
trendTooltip?: {
|
|
103
109
|
header?: string;
|
|
104
110
|
rangeCurrent?: string;
|
|
@@ -131,11 +137,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
131
137
|
totalsChart: boolean;
|
|
132
138
|
tooltipTotalType: TotalType;
|
|
133
139
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
140
|
+
tooltipOrder: TooltipOrder;
|
|
134
141
|
header: string;
|
|
135
142
|
subheader: string;
|
|
136
143
|
subheaderTooltip: any;
|
|
144
|
+
keepSubheaderVisible: boolean;
|
|
137
145
|
trendValue: any;
|
|
138
|
-
trendDirection:
|
|
146
|
+
trendDirection: TrendDirection;
|
|
139
147
|
trendTooltip: any;
|
|
140
148
|
noDataIcon: string;
|
|
141
149
|
noDataTitle: string;
|
|
@@ -175,15 +183,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
175
183
|
subheader: string;
|
|
176
184
|
subheaderTooltip: any;
|
|
177
185
|
trendValue: string | number;
|
|
178
|
-
trendDirection:
|
|
186
|
+
trendDirection: TrendDirection;
|
|
179
187
|
tickCount: number;
|
|
180
188
|
truncateTickLabels: boolean;
|
|
189
|
+
keepSubheaderVisible: boolean;
|
|
181
190
|
noDataIcon: string;
|
|
182
191
|
noDataTitle: string;
|
|
183
192
|
noDataSubtitle: string;
|
|
184
193
|
withAnimation: boolean;
|
|
185
194
|
tooltipTotalType: TotalType;
|
|
186
195
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
196
|
+
tooltipOrder: TooltipOrder;
|
|
187
197
|
fullHeight: boolean;
|
|
188
198
|
withSettingsHeader: boolean;
|
|
189
199
|
extraCharts: Record<string, unknown>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const
|
|
1
|
+
import o from "./Chart.vue2.js";
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_82f5b24e_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-82f5b24e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import "../../Chart.
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_82f5b24e_lang.css"; import { defineComponent as O, ref as E, computed as n, openBlock as s, createElementBlock as m, Fragment as x, createBlock as k, unref as l, isRef as y, withCtx as d, renderSlot as u, createCommentVNode as I, createElementVNode as L, mergeProps as b, normalizeClass as N, createVNode as D, createSlots as P, renderList as M } from "vue";
|
|
2
2
|
import { useVModel as F } from "@vueuse/core";
|
|
3
3
|
import $ from "./ChartLegend.vue.js";
|
|
4
4
|
import K from "./SettingsHeader.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import V from "./ChartPlane.vue.js";
|
|
6
6
|
import { useColorsMap as z } from "./composables/useColorsMap.js";
|
|
7
7
|
import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as j } from "./consts.js";
|
|
8
|
-
import { ChartType as q } from "./types.js";
|
|
9
|
-
import { useChartHeight as
|
|
10
|
-
import { TotalType as
|
|
11
|
-
const
|
|
8
|
+
import { ChartType as q, TooltipOrder as G, TrendDirection as J } from "./types.js";
|
|
9
|
+
import { useChartHeight as Q } from "./composables/useChartHeight.js";
|
|
10
|
+
import { TotalType as W, calculateTotal as Y } from "../../utils/totals.js";
|
|
11
|
+
const Z = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "chart-sidebar"
|
|
14
|
-
},
|
|
14
|
+
}, de = /* @__PURE__ */ O({
|
|
15
15
|
__name: "Chart",
|
|
16
16
|
props: {
|
|
17
17
|
dataSets: { default: () => [] },
|
|
@@ -25,13 +25,15 @@ const W = {
|
|
|
25
25
|
loading: { type: Boolean, default: !1 },
|
|
26
26
|
withAnimation: { type: Boolean, default: !0 },
|
|
27
27
|
totalsChart: { type: Boolean, default: !1 },
|
|
28
|
-
tooltipTotalType: { default:
|
|
29
|
-
tooltipTotalCalcFn: { type: Function, default:
|
|
28
|
+
tooltipTotalType: { default: W.Total },
|
|
29
|
+
tooltipTotalCalcFn: { type: Function, default: Y },
|
|
30
|
+
tooltipOrder: { default: G.Legend },
|
|
30
31
|
header: { default: "" },
|
|
31
32
|
subheader: { default: "" },
|
|
32
33
|
subheaderTooltip: { default: null },
|
|
34
|
+
keepSubheaderVisible: { type: Boolean, default: !1 },
|
|
33
35
|
trendValue: { default: null },
|
|
34
|
-
trendDirection: { default:
|
|
36
|
+
trendDirection: { default: J.UP },
|
|
35
37
|
trendTooltip: { default: null },
|
|
36
38
|
noDataIcon: { default: "file-search" },
|
|
37
39
|
noDataTitle: { default: "No data to display" },
|
|
@@ -49,99 +51,101 @@ const W = {
|
|
|
49
51
|
},
|
|
50
52
|
emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
|
|
51
53
|
setup(i, { emit: p }) {
|
|
52
|
-
const
|
|
53
|
-
dataSets:
|
|
54
|
-
visibleIds:
|
|
55
|
-
parsing:
|
|
56
|
-
xAxisFormat:
|
|
57
|
-
yAxisFormat:
|
|
58
|
-
tickCount:
|
|
59
|
-
truncateTickLabels:
|
|
60
|
-
header:
|
|
61
|
-
subheader:
|
|
62
|
-
loading:
|
|
63
|
-
noDataIcon:
|
|
64
|
-
noDataTitle:
|
|
65
|
-
noDataSubtitle:
|
|
66
|
-
withAnimation:
|
|
67
|
-
typeSwitcher: !
|
|
54
|
+
const e = i, r = F(e, "chartType", p), h = F(e, "sortSelected", p), c = E(null), g = n(() => ({
|
|
55
|
+
dataSets: e.dataSets,
|
|
56
|
+
visibleIds: e.visibleIds,
|
|
57
|
+
parsing: e.parsing,
|
|
58
|
+
xAxisFormat: e.xAxisFormat,
|
|
59
|
+
yAxisFormat: e.yAxisFormat,
|
|
60
|
+
tickCount: e.tickCount,
|
|
61
|
+
truncateTickLabels: e.truncateTickLabels,
|
|
62
|
+
header: e.header,
|
|
63
|
+
subheader: e.subheader,
|
|
64
|
+
loading: e.loading,
|
|
65
|
+
noDataIcon: e.noDataIcon,
|
|
66
|
+
noDataTitle: e.noDataTitle,
|
|
67
|
+
noDataSubtitle: e.noDataSubtitle,
|
|
68
|
+
withAnimation: e.withAnimation,
|
|
69
|
+
typeSwitcher: !e.withSettingsHeader,
|
|
68
70
|
height: U.value,
|
|
69
71
|
compactHeader: C.value > 1,
|
|
70
|
-
trendValue:
|
|
71
|
-
trendDirection:
|
|
72
|
-
trendTooltip:
|
|
73
|
-
totalsChart:
|
|
74
|
-
subheaderTooltip:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
trendValue: e.trendValue,
|
|
73
|
+
trendDirection: e.trendDirection,
|
|
74
|
+
trendTooltip: e.trendTooltip,
|
|
75
|
+
totalsChart: e.totalsChart,
|
|
76
|
+
subheaderTooltip: e.subheaderTooltip,
|
|
77
|
+
keepSubheaderVisible: e.keepSubheaderVisible,
|
|
78
|
+
colorsMap: f.value,
|
|
79
|
+
tooltipTotalType: e.tooltipTotalType,
|
|
80
|
+
tooltipTotalCalcFn: e.tooltipTotalCalcFn,
|
|
81
|
+
tooltipOrder: e.tooltipOrder,
|
|
82
|
+
highlightedId: c.value
|
|
83
|
+
})), w = n(() => e.dataSets), T = n(() => e.visibleIds), v = n(() => e.extraCharts.length), C = n(() => 1 + v.value), A = (t) => t === v.value - 1, { colorsMap: f } = z({
|
|
84
|
+
dataSets: w,
|
|
85
|
+
visibleIds: T
|
|
86
|
+
}), B = n(() => e.dataSets.map((t) => ({
|
|
87
|
+
id: t.id,
|
|
88
|
+
label: t.label,
|
|
89
|
+
caption: t.caption || null,
|
|
90
|
+
color: f.value[t.id] || null,
|
|
91
|
+
icon: t.icon || null,
|
|
92
|
+
iconType: t.iconType || "branded"
|
|
93
|
+
}))), { containerProps: H, eachPlaneHeight: U } = Q({
|
|
90
94
|
chartPlanesCount: C,
|
|
91
|
-
useFullHeight:
|
|
95
|
+
useFullHeight: e.fullHeight
|
|
92
96
|
});
|
|
93
|
-
return (
|
|
94
|
-
i.withSettingsHeader ? (s(),
|
|
97
|
+
return (t, o) => (s(), m(x, null, [
|
|
98
|
+
i.withSettingsHeader ? (s(), k(K, {
|
|
95
99
|
key: 0,
|
|
96
100
|
"chart-type": l(r),
|
|
97
101
|
"onUpdate:chart-type": o[0] || (o[0] = (a) => y(r) ? r.value = a : null),
|
|
98
102
|
"hide-legend": i.hideLegend
|
|
99
103
|
}, {
|
|
100
104
|
"before-chart-type": d(() => [
|
|
101
|
-
u(
|
|
105
|
+
u(t.$slots, "before-chart-type", {}, void 0, !0)
|
|
102
106
|
]),
|
|
103
107
|
metric: d(() => [
|
|
104
|
-
u(
|
|
108
|
+
u(t.$slots, "metric", {}, void 0, !0)
|
|
105
109
|
]),
|
|
106
110
|
breakdowns: d(() => [
|
|
107
|
-
u(
|
|
111
|
+
u(t.$slots, "breakdowns", {}, void 0, !0)
|
|
108
112
|
]),
|
|
109
113
|
_: 3
|
|
110
|
-
}, 8, ["chart-type", "hide-legend"])) :
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class:
|
|
114
|
+
}, 8, ["chart-type", "hide-legend"])) : I("", !0),
|
|
115
|
+
L("div", b({ class: "chart-container" }, l(H)), [
|
|
116
|
+
L("section", {
|
|
117
|
+
class: N(["chart-planes", [{ "with-legend": !i.hideLegend }]])
|
|
114
118
|
}, [
|
|
115
|
-
D(
|
|
119
|
+
D(V, b({
|
|
116
120
|
"chart-type": l(r),
|
|
117
121
|
"onUpdate:chart-type": o[1] || (o[1] = (a) => y(r) ? r.value = a : null)
|
|
118
|
-
}, l(
|
|
119
|
-
|
|
122
|
+
}, l(g)), P({ _: 2 }, [
|
|
123
|
+
t.$slots["subheader-tooltip"] ? {
|
|
120
124
|
name: "subheader-tooltip",
|
|
121
125
|
fn: d(() => [
|
|
122
|
-
u(
|
|
126
|
+
u(t.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
123
127
|
]),
|
|
124
128
|
key: "0"
|
|
125
129
|
} : void 0
|
|
126
130
|
]), 1040, ["chart-type"]),
|
|
127
|
-
(s(!0),
|
|
131
|
+
(s(!0), m(x, null, M(i.extraCharts, (a, S) => (s(), k(V, b({
|
|
128
132
|
key: S,
|
|
129
133
|
class: "extra-chart-plane"
|
|
130
|
-
}, { ...l(
|
|
134
|
+
}, { ...l(g), ...a }, {
|
|
131
135
|
"chart-type": l(r),
|
|
132
|
-
"colors-map": l(
|
|
136
|
+
"colors-map": l(f),
|
|
133
137
|
"type-switcher": !1,
|
|
134
|
-
"tooltip-respects-top-edge": !
|
|
138
|
+
"tooltip-respects-top-edge": !A(S)
|
|
135
139
|
}), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
|
|
136
140
|
], 2),
|
|
137
|
-
i.hideLegend ?
|
|
141
|
+
i.hideLegend ? I("", !0) : (s(), m("section", Z, [
|
|
138
142
|
D($, {
|
|
139
|
-
"sort-selected": l(
|
|
140
|
-
"onUpdate:sort-selected": o[2] || (o[2] = (a) => y(
|
|
141
|
-
"highlighted-id":
|
|
142
|
-
"onUpdate:highlighted-id": o[3] || (o[3] = (a) =>
|
|
143
|
-
items: l(
|
|
144
|
-
"visible-ids": l(
|
|
143
|
+
"sort-selected": l(h),
|
|
144
|
+
"onUpdate:sort-selected": o[2] || (o[2] = (a) => y(h) ? h.value = a : null),
|
|
145
|
+
"highlighted-id": c.value,
|
|
146
|
+
"onUpdate:highlighted-id": o[3] || (o[3] = (a) => c.value = a),
|
|
147
|
+
items: l(B),
|
|
148
|
+
"visible-ids": l(T),
|
|
145
149
|
"max-limit-tooltip-text": i.maxLimitTooltipText,
|
|
146
150
|
"sort-options": i.sortOptions,
|
|
147
151
|
"sort-option-name-key": i.sortOptionNameKey,
|
|
@@ -153,5 +157,5 @@ const W = {
|
|
|
153
157
|
}
|
|
154
158
|
});
|
|
155
159
|
export {
|
|
156
|
-
|
|
160
|
+
de as default
|
|
157
161
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartType } from '@/components/chart/types';
|
|
1
|
+
import { ChartType, TrendDirection } from '@/components/chart/types';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
chartType: ChartType;
|
|
4
4
|
typeSwitcher: boolean;
|
|
@@ -15,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
15
15
|
};
|
|
16
16
|
compact: boolean;
|
|
17
17
|
trendValue?: string | number;
|
|
18
|
-
trendDirection?:
|
|
18
|
+
trendDirection?: TrendDirection;
|
|
19
19
|
}>, {
|
|
20
20
|
chartType: ChartType;
|
|
21
21
|
typeSwitcher: boolean;
|
|
@@ -25,7 +25,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
25
|
trendTooltip: any;
|
|
26
26
|
compact: boolean;
|
|
27
27
|
trendValue: any;
|
|
28
|
-
trendDirection:
|
|
28
|
+
trendDirection: TrendDirection;
|
|
29
29
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
30
|
"update:chartType": (type: ChartType) => void;
|
|
31
31
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -44,7 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
44
44
|
};
|
|
45
45
|
compact: boolean;
|
|
46
46
|
trendValue?: string | number;
|
|
47
|
-
trendDirection?:
|
|
47
|
+
trendDirection?: TrendDirection;
|
|
48
48
|
}>, {
|
|
49
49
|
chartType: ChartType;
|
|
50
50
|
typeSwitcher: boolean;
|
|
@@ -54,7 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
54
54
|
trendTooltip: any;
|
|
55
55
|
compact: boolean;
|
|
56
56
|
trendValue: any;
|
|
57
|
-
trendDirection:
|
|
57
|
+
trendDirection: TrendDirection;
|
|
58
58
|
}>>> & {
|
|
59
59
|
"onUpdate:chartType"?: (type: ChartType) => any;
|
|
60
60
|
}, {
|
|
@@ -62,11 +62,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
62
62
|
compact: boolean;
|
|
63
63
|
chartType: ChartType;
|
|
64
64
|
trendTooltip: any;
|
|
65
|
-
typeSwitcher: boolean;
|
|
66
65
|
subheader: string;
|
|
67
66
|
subheaderTooltip: any;
|
|
67
|
+
typeSwitcher: boolean;
|
|
68
68
|
trendValue: string | number;
|
|
69
|
-
trendDirection:
|
|
69
|
+
trendDirection: TrendDirection;
|
|
70
70
|
}>, {
|
|
71
71
|
"subheader-tooltip"?(_: {}): any;
|
|
72
72
|
}>;
|
|
@@ -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_da34b108_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-da34b108"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../ChartHeader.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ChartType as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css"; import { defineComponent as k, computed as h, openBlock as o, createElementBlock as S, normalizeClass as w, createElementVNode as m, createVNode as p, createSlots as C, withCtx as f, renderSlot as B, unref as a, createTextVNode as g, toDisplayString as x, createBlock as n, normalizeProps as y, mergeProps as T, createCommentVNode as i, isRef as D } from "vue";
|
|
2
|
+
import N from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import P from "../switch/v4/SwitchV4.vue.js";
|
|
4
|
+
import { ChartType as d, TrendDirection as H } from "./types.js";
|
|
5
|
+
import b from "./ChartHeaderTrend.vue.js";
|
|
6
|
+
import L from "./SubHeader.vue.js";
|
|
7
|
+
const z = { class: "header-texts" }, E = { class: "header-row" }, A = /* @__PURE__ */ k({
|
|
8
8
|
__name: "ChartHeader",
|
|
9
9
|
props: {
|
|
10
|
-
chartType: { default:
|
|
10
|
+
chartType: { default: d.Line },
|
|
11
11
|
typeSwitcher: { type: Boolean, default: !0 },
|
|
12
12
|
header: { default: "" },
|
|
13
13
|
subheader: { default: "" },
|
|
@@ -15,97 +15,66 @@ const H = { class: "header-texts" }, O = { class: "header-row" }, R = { class: "
|
|
|
15
15
|
trendTooltip: { default: null },
|
|
16
16
|
compact: { type: Boolean, default: !1 },
|
|
17
17
|
trendValue: { default: null },
|
|
18
|
-
trendDirection: { default:
|
|
18
|
+
trendDirection: { default: H.UP }
|
|
19
19
|
},
|
|
20
20
|
emits: ["update:chartType"],
|
|
21
|
-
setup(e, { emit:
|
|
22
|
-
const
|
|
23
|
-
{ id:
|
|
24
|
-
{ id:
|
|
25
|
-
{ id:
|
|
26
|
-
],
|
|
21
|
+
setup(e, { emit: V }) {
|
|
22
|
+
const r = e, c = [
|
|
23
|
+
{ id: d.Line, icon: "chart-line-up" },
|
|
24
|
+
{ id: d.Bar, icon: "chart-bar" },
|
|
25
|
+
{ id: d.StackedLine, icon: "chart-line" }
|
|
26
|
+
], l = h({
|
|
27
27
|
get() {
|
|
28
|
-
return
|
|
28
|
+
return c.find(({ id: t }) => t === r.chartType);
|
|
29
29
|
},
|
|
30
|
-
set(
|
|
31
|
-
|
|
30
|
+
set(t) {
|
|
31
|
+
V("update:chartType", t.id);
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
34
|
-
value:
|
|
35
|
-
direction:
|
|
36
|
-
trendTooltip:
|
|
33
|
+
}), u = h(() => ({
|
|
34
|
+
value: r.trendValue,
|
|
35
|
+
direction: r.trendDirection,
|
|
36
|
+
trendTooltip: r.trendTooltip
|
|
37
37
|
}));
|
|
38
|
-
return (
|
|
39
|
-
class:
|
|
38
|
+
return (t, s) => (o(), S("div", {
|
|
39
|
+
class: w(["chart-header", { "chart-header--compact": e.compact }])
|
|
40
40
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
key: 0,
|
|
52
|
-
variant: "h5"
|
|
53
|
-
}, {
|
|
54
|
-
default: o(() => [
|
|
55
|
-
u(c(e.subheaderTooltip.header), 1)
|
|
56
|
-
]),
|
|
57
|
-
_: 1
|
|
58
|
-
})) : i("", !0),
|
|
59
|
-
e.subheaderTooltip?.text ? (r(), d(t(s), {
|
|
60
|
-
key: 1,
|
|
61
|
-
variant: "body2",
|
|
62
|
-
class: "subheader-tooltip__text"
|
|
63
|
-
}, {
|
|
64
|
-
default: o(() => [
|
|
65
|
-
u(c(e.subheaderTooltip.text), 1)
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
})) : i("", !0)
|
|
69
|
-
])
|
|
70
|
-
], !0)
|
|
71
|
-
]),
|
|
72
|
-
default: o(() => [
|
|
73
|
-
f(t(s), {
|
|
74
|
-
class: "subheader",
|
|
75
|
-
variant: "h5"
|
|
76
|
-
}, {
|
|
77
|
-
default: o(() => [
|
|
78
|
-
u(c(e.subheader + (e.compact ? ":" : "")), 1)
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
})
|
|
41
|
+
m("div", z, [
|
|
42
|
+
p(L, {
|
|
43
|
+
subheader: e.subheader,
|
|
44
|
+
"subheader-tooltip": e.subheaderTooltip,
|
|
45
|
+
"show-separator": e.compact && (!!e.header || !!e.trendValue)
|
|
46
|
+
}, C({ _: 2 }, [
|
|
47
|
+
t.$slots["subheader-tooltip"] ? {
|
|
48
|
+
name: "subheader-tooltip",
|
|
49
|
+
fn: f(() => [
|
|
50
|
+
B(t.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
82
51
|
]),
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
]),
|
|
86
|
-
|
|
87
|
-
|
|
52
|
+
key: "0"
|
|
53
|
+
} : void 0
|
|
54
|
+
]), 1032, ["subheader", "subheader-tooltip", "show-separator"]),
|
|
55
|
+
m("div", E, [
|
|
56
|
+
p(a(N), {
|
|
88
57
|
class: "header-text",
|
|
89
58
|
variant: e.compact ? "h5" : "chart2"
|
|
90
59
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
|
|
60
|
+
default: f(() => [
|
|
61
|
+
g(x(e.header), 1)
|
|
93
62
|
]),
|
|
94
63
|
_: 1
|
|
95
64
|
}, 8, ["variant"]),
|
|
96
|
-
!e.compact && e.trendValue !== null ? (
|
|
65
|
+
!e.compact && e.trendValue !== null ? (o(), n(b, y(T({ key: 0 }, a(u))), null, 16)) : i("", !0)
|
|
97
66
|
]),
|
|
98
|
-
e.compact && e.trendValue !== null ? (
|
|
67
|
+
e.compact && e.trendValue !== null ? (o(), n(b, y(T({ key: 0 }, a(u))), null, 16)) : i("", !0)
|
|
99
68
|
]),
|
|
100
|
-
e.typeSwitcher ? (
|
|
69
|
+
e.typeSwitcher ? (o(), n(a(P), {
|
|
101
70
|
key: 0,
|
|
102
|
-
modelValue:
|
|
103
|
-
"onUpdate:modelValue":
|
|
104
|
-
options:
|
|
71
|
+
modelValue: a(l),
|
|
72
|
+
"onUpdate:modelValue": s[0] || (s[0] = (v) => D(l) ? l.value = v : null),
|
|
73
|
+
options: c
|
|
105
74
|
}, null, 8, ["modelValue"])) : i("", !0)
|
|
106
75
|
], 2));
|
|
107
76
|
}
|
|
108
77
|
});
|
|
109
78
|
export {
|
|
110
|
-
|
|
79
|
+
A as default
|
|
111
80
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TrendDirection } from '@/components/chart/types';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
3
|
value?: number | string;
|
|
3
|
-
direction?:
|
|
4
|
+
direction?: TrendDirection;
|
|
4
5
|
trendTooltip?: {
|
|
5
6
|
header?: string;
|
|
6
7
|
rangeCurrent?: string;
|
|
@@ -8,11 +9,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
8
9
|
};
|
|
9
10
|
}>, {
|
|
10
11
|
value: any;
|
|
11
|
-
direction:
|
|
12
|
+
direction: TrendDirection;
|
|
12
13
|
trendTooltip: any;
|
|
13
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<{
|
|
14
15
|
value?: number | string;
|
|
15
|
-
direction?:
|
|
16
|
+
direction?: TrendDirection;
|
|
16
17
|
trendTooltip?: {
|
|
17
18
|
header?: string;
|
|
18
19
|
rangeCurrent?: string;
|
|
@@ -20,11 +21,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
20
21
|
};
|
|
21
22
|
}>, {
|
|
22
23
|
value: any;
|
|
23
|
-
direction:
|
|
24
|
+
direction: TrendDirection;
|
|
24
25
|
trendTooltip: any;
|
|
25
26
|
}>>>, {
|
|
26
27
|
value: number | string;
|
|
27
|
-
direction:
|
|
28
|
+
direction: TrendDirection;
|
|
28
29
|
trendTooltip: any;
|
|
29
30
|
}>;
|
|
30
31
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartHeaderTrend.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartHeaderTrend.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css"; //*');
|
|
4
|
+
const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-79dc2883"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|