@ironsource/shared-ui 2.1.11-rc.4 → 2.1.11-rc.41
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/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +1 -0
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_1aa6df01_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
- package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_c65df8d7_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +1 -0
- package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +1 -0
- package/README.md +4 -15
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +1 -0
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +3 -2
- package/components/button/v4/ToggleButtonGroupAB.vue.d.ts +3 -1
- package/components/button/v4/ToggleButtonGroupAB.vue.js +2 -2
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +44 -39
- package/components/button/v4/index.d.ts +9 -3
- package/components/chart/Chart.vue.d.ts +11 -3
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +115 -101
- package/components/chart/ChartHeader.vue.d.ts +13 -6
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +32 -29
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +99 -49
- 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/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +34 -26
- 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/checkbox/v4/CheckboxV4.vue.js +3 -3
- package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
- package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
- package/components/dialog/v4/DialogV4.vue.d.ts +10 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +64 -60
- package/components/dialog/v4/index.d.ts +39 -1
- package/components/dropdown/common/Dropdown.common.js +194 -185
- package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
- package/components/dropdown/v3/index.d.ts +39 -39
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
- package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +73 -47
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +90 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +185 -0
- package/components/dropdown/v4/DropdownV4.vue.d.ts +31 -6
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +224 -198
- package/components/dropdown/v4/OptionV4.vue.d.ts +10 -0
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +135 -98
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +6 -1
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +161 -116
- package/components/dropdown/v4/index.d.ts +402 -87
- package/components/dropdown/v4/index.js +6 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
- package/components/icon/v4/consts.d.ts +1 -1
- package/components/icon/v4/consts.js +1 -1
- package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +24 -22
- package/components/inlineCopy/index.d.ts +9 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +12 -12
- package/components/multibar/MultiBarMenu.vue2.js +3 -2
- package/components/popover/v4/PopoverV4.vue.d.ts +14 -2
- package/components/popover/v4/PopoverV4.vue.js +4 -3
- package/components/popover/v4/PopoverV4.vue2.js +40 -24
- package/components/popover/v4/index.d.ts +55 -11
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
- package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
- package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
- package/components/sortableList/SortableList.vue.d.ts +1 -1
- package/components/sortableList/index.d.ts +4 -4
- package/components/table/common/Table.common.js +69 -71
- package/components/table/common/Table.types.d.ts +1 -1
- package/components/table/v3/Table.vue.d.ts +1 -1
- package/components/table/v3/index.d.ts +5 -5
- package/components/table/v4/DataGrid.vue.d.ts +6 -1
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +124 -117
- package/components/table/v4/DataGridMenu.vue2.js +3 -2
- package/components/table/v4/index.d.ts +26 -7
- package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
- package/components/tooltip/v4/index.d.ts +39 -1
- package/design-foundation.stories/icons/iconsData.d.ts +1 -1
- package/index.d.ts +1234 -240
- package/index.js +1 -1
- package/mocks/options.d.ts +48 -2
- package/mocks/words.d.ts +1 -1
- package/package.json +2 -1
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_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/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_991a7aad_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css +0 -1
- package/PopoverV4.vue_vue_type_style_index_0_scoped_74bbce13_lang.css +0 -1
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_1791e4fe_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_6ac5f602_lang.css +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import { Chart as N, ArcElement as
|
|
4
|
-
import { HoverVerticalLine as
|
|
5
|
-
import { formatValue as H, calcStepSize as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_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
|
+
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 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
|
-
import { useTooltipPosition as
|
|
9
|
-
import
|
|
8
|
+
import { useTooltipPosition as ge } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import Te from "./ChartTooltip.vue.js";
|
|
10
10
|
import Ce from "./ChartLegend.vue.js";
|
|
11
11
|
import ke from "./ChartHeader.vue.js";
|
|
12
|
-
import { hexColorToRgba as
|
|
13
|
-
import { useChartValues as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
12
|
+
import { hexColorToRgba as xe } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as Le } from "./composables/useChartValues.js";
|
|
14
|
+
import Se from "./ChartLoader.vue.js";
|
|
15
|
+
import we from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
16
|
import Be from "./SettingsHeader.vue.js";
|
|
17
|
-
const Ie = { class: "chart-container" },
|
|
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({
|
|
21
21
|
__name: "Chart",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -26,75 +26,78 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
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
34
|
minVisible: { default: he },
|
|
35
|
-
maxVisible: { default:
|
|
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
|
-
Y,
|
|
47
47
|
ee,
|
|
48
48
|
te,
|
|
49
49
|
ae,
|
|
50
50
|
oe,
|
|
51
|
-
re,
|
|
52
51
|
ie,
|
|
53
52
|
le,
|
|
53
|
+
re,
|
|
54
54
|
ne,
|
|
55
55
|
se,
|
|
56
56
|
de,
|
|
57
57
|
ue,
|
|
58
|
-
ce
|
|
58
|
+
ce,
|
|
59
|
+
pe
|
|
59
60
|
);
|
|
60
|
-
const c =
|
|
61
|
+
const c = _(t, "chartType", L), m = g(null);
|
|
61
62
|
let s = null;
|
|
62
|
-
const S =
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
s && (s.data.datasets =
|
|
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));
|
|
65
|
+
}, M = () => {
|
|
66
|
+
s && (s.data.datasets = b.value, s.options = I.value.options, s.update());
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
-
e && (await
|
|
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 Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
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
|
}
|
|
@@ -157,7 +160,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
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: {
|
|
@@ -173,7 +176,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
173
176
|
},
|
|
174
177
|
// grid lines
|
|
175
178
|
grid: {
|
|
176
|
-
color:
|
|
179
|
+
color: z,
|
|
177
180
|
drawOnChartArea: !1,
|
|
178
181
|
drawTicks: !0,
|
|
179
182
|
drawBorder: !1,
|
|
@@ -185,21 +188,21 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
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
|
|
201
204
|
grid: {
|
|
202
|
-
color:
|
|
205
|
+
color: z,
|
|
203
206
|
drawOnChartArea: !0,
|
|
204
207
|
drawTicks: !1
|
|
205
208
|
}
|
|
@@ -207,87 +210,98 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
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
|
-
|
|
249
|
-
|
|
252
|
+
p("div", Ie, [
|
|
253
|
+
u(w) ? (d(), C(O, { key: 0 }, [
|
|
254
|
+
p("section", {
|
|
255
|
+
class: Q(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
256
|
+
}, [
|
|
257
|
+
p("div", Ae, [
|
|
250
258
|
F(ke, {
|
|
251
259
|
"chart-type": u(c),
|
|
252
|
-
"onUpdate:chart-type": o[1] || (o[1] = (
|
|
260
|
+
"onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
|
|
253
261
|
"with-settings-header": a.withSettingsHeader,
|
|
254
262
|
header: a.header,
|
|
255
263
|
subheader: a.subheader,
|
|
256
|
-
"subheader-tooltip": a.
|
|
257
|
-
},
|
|
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"])
|
|
258
271
|
]),
|
|
259
|
-
|
|
260
|
-
|
|
272
|
+
p("div", Ee, [
|
|
273
|
+
p("canvas", {
|
|
261
274
|
ref_key: "chartRef",
|
|
262
|
-
ref:
|
|
275
|
+
ref: m,
|
|
263
276
|
class: "chart__canvas"
|
|
264
277
|
}, null, 512),
|
|
265
|
-
|
|
278
|
+
p("div", {
|
|
266
279
|
ref_key: "tooltipRef",
|
|
267
|
-
ref:
|
|
280
|
+
ref: A,
|
|
268
281
|
class: "chart__tooltip",
|
|
269
|
-
style:
|
|
282
|
+
style: Y(u(Z))
|
|
270
283
|
}, [
|
|
271
|
-
|
|
284
|
+
r.value ? (d(), h(Te, {
|
|
272
285
|
key: 0,
|
|
273
|
-
title: String(
|
|
274
|
-
"data-points":
|
|
286
|
+
title: String(r.value.title),
|
|
287
|
+
"data-points": r.value.dataPoints,
|
|
275
288
|
"x-axis-format": a.xAxisFormat,
|
|
276
289
|
"y-axis-format": a.yAxisFormat,
|
|
277
|
-
"total-label":
|
|
278
|
-
"total-value": Number(
|
|
290
|
+
"total-label": r.value.footer[0],
|
|
291
|
+
"total-value": Number(r.value.footer[1])
|
|
279
292
|
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
|
|
280
293
|
], 4)
|
|
281
294
|
])
|
|
282
|
-
]),
|
|
283
|
-
a.hideLegend ? v("", !0) : (d(),
|
|
295
|
+
], 2),
|
|
296
|
+
a.hideLegend ? v("", !0) : (d(), C("section", Re, [
|
|
284
297
|
F(Ce, {
|
|
285
298
|
items: u(W),
|
|
286
299
|
"visible-ids": a.visibleIds,
|
|
287
|
-
"
|
|
288
|
-
|
|
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"])
|
|
289
303
|
]))
|
|
290
|
-
], 64)) : a.loading ? (d(),
|
|
304
|
+
], 64)) : a.loading ? (d(), h(Se, { key: 1 })) : u(S) ? (d(), h(u(we), {
|
|
291
305
|
key: 2,
|
|
292
306
|
title: a.noDataTitle,
|
|
293
307
|
subtitle: a.noDataSubtitle,
|
|
@@ -298,5 +312,5 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
298
312
|
}
|
|
299
313
|
});
|
|
300
314
|
export {
|
|
301
|
-
|
|
315
|
+
je as default
|
|
302
316
|
};
|
|
@@ -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 s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-b8213498"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import "../../ChartHeader.
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartLegend.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartLegend.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-a1c626cd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|