@ironsource/shared-ui 2.1.11-test.9 → 2.1.11-test.92
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/Chart.vue_vue_type_style_index_0_scoped_277fde76_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_e43ac1c9_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2ba23450_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
- package/EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css +1 -0
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
- package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
- package/IconFlag.vue_vue_type_style_index_0_scoped_be9dc7bb_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/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_2ca7b24c_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
- package/Typography.vue_vue_type_style_index_0_scoped_5714d43e_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +16 -3
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +127 -110
- 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.vue2.js +1 -1
- package/components/chart/index.d.ts +55 -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 +1 -1
- package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
- package/components/dialog/v4/DialogV4.vue.d.ts +15 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +80 -73
- package/components/dialog/v4/index.d.ts +58 -1
- package/components/dropdown/common/Dropdown.common.js +180 -169
- package/components/dropdown/v3/index.d.ts +12 -12
- 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/ChipDropdownTrigger.vue.d.ts +10 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +59 -40
- package/components/dropdown/v4/{ConditionalDroprown.vue.d.ts → ConditionalDropdown.vue.d.ts} +60 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +239 -0
- package/components/dropdown/v4/DropdownV4.vue.d.ts +18 -5
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +52 -50
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +87 -87
- package/components/dropdown/v4/index.d.ts +205 -35
- package/components/dropdown/v4/index.js +3 -3
- package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
- package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +2 -2
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
- package/components/forms/FormCard.vue.js +3 -3
- package/components/forms/FormCard.vue2.js +1 -1
- package/components/icon/v4/IconFlag.vue.js +3 -3
- package/components/icon/v4/IconFlag.vue2.js +1 -1
- package/components/icon/v4/consts.d.ts +1 -1
- package/components/icon/v4/consts.js +1 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +185 -165
- package/components/multibar/MultiBarMenu.vue2.js +1 -1
- package/components/popover/v4/PopoverV4.vue.d.ts +11 -1
- package/components/popover/v4/PopoverV4.vue.js +2 -2
- package/components/popover/v4/PopoverV4.vue2.js +40 -26
- package/components/popover/v4/index.d.ts +46 -8
- 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/SortableItem.vue.d.ts +5 -0
- package/components/sortableList/SortableItem.vue.js +2 -2
- package/components/sortableList/SortableItem.vue2.js +86 -70
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +20 -23
- package/components/sortableList/SortableList.vue.d.ts +17 -1
- package/components/sortableList/SortableList.vue.js +4 -4
- package/components/sortableList/SortableList.vue2.js +113 -94
- package/components/sortableList/index.d.ts +63 -5
- package/components/table/common/Table.common.d.ts +1 -1
- package/components/table/common/Table.common.js +82 -74
- package/components/table/common/Table.types.d.ts +1 -1
- package/components/table/common/consts.d.ts +4 -0
- package/components/table/common/consts.js +7 -0
- 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 +12 -2
- package/components/table/v4/DataGrid.vue.js +2 -2
- package/components/table/v4/DataGrid.vue2.js +164 -155
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +2 -2
- package/components/table/v4/MultipleDataGrid.vue.d.ts +1 -1
- package/components/table/v4/index.d.ts +84 -46
- package/components/table-cells/common/Editable.common.js +29 -23
- package/components/table-cells/common/EditableContext.d.ts +1 -0
- package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
- package/components/table-cells/v4/EditableV4.vue.js +3 -3
- package/components/table-cells/v4/EditableV4.vue2.js +11 -10
- package/components/table-cells/v4/index.d.ts +20 -1
- package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
- package/components/tooltip/v4/TooltipV4.vue.js +3 -3
- package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
- package/components/tooltip/v4/index.d.ts +39 -1
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +24 -18
- package/design-foundation.stories/icons/iconsData.d.ts +1 -1
- package/index.d.ts +1097 -204
- package/index.js +1 -1
- package/mocks/words.d.ts +1 -1
- package/package.json +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/style/v4/spacings.scss +1 -0
- package/testids/index.d.ts +2 -0
- package/testids/index.js +13 -13
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_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_ba28c717_lang.css +0 -1
- package/ConditionalDroprown.vue_vue_type_style_index_0_scoped_546e19a9_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_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_f88a132e_lang.css +0 -1
- package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
- package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
- package/IconFlag.vue_vue_type_style_index_0_scoped_7b09cc85_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_df830bf5_lang.css +0 -1
- package/PopoverV4.vue_vue_type_style_index_0_scoped_43b5cba4_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_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_bdfb0aef_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
- package/components/dropdown/v4/ConditionalDroprown.vue.js +0 -7
- package/components/dropdown/v4/ConditionalDroprown.vue2.js +0 -157
|
@@ -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_277fde76_lang.css"; import { defineComponent as q, computed as l, ref as g, onMounted as J, watch as T, nextTick as Q, openBlock as d, createElementBlock as C, Fragment as O, createBlock as f, unref as u, isRef as D, withCtx as k, renderSlot as x, createCommentVNode as v, createElementVNode as p, normalizeClass as Y, createVNode as F, normalizeStyle as _ } from "vue";
|
|
2
|
+
import { useVModel as ee } from "@vueuse/core";
|
|
3
|
+
import { Chart as N, ArcElement as te, LineElement as ae, BarElement as oe, PointElement as ie, LineController as le, BarController as re, PieController as ne, ScatterController as se, CategoryScale as de, LinearScale as ue, Filler as ce, Tooltip as pe } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as me } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as H, calcStepSize as he } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as ve, DEFAULT_MAX_VISIBLE as ye, COLOR_PALETTE as be, POINT_BORDER_COLOR as ge, TICK_LABEL_COLOR as U, TICK_LABEL_FONT as P, GRID_LINE_COLOR as z } from "./consts.js";
|
|
7
7
|
import { ChartType as n } from "./types.js";
|
|
8
|
-
import { useTooltipPosition as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { hexColorToRgba as
|
|
8
|
+
import { useTooltipPosition as Te } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import Ce from "./ChartTooltip.vue.js";
|
|
10
|
+
import ke from "./ChartLegend.vue.js";
|
|
11
|
+
import xe from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as Le } from "../../utils/color.js";
|
|
13
13
|
import { useChartValues as Se } from "./composables/useChartValues.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
14
|
+
import we from "./ChartLoader.vue.js";
|
|
15
|
+
import Be from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Ie from "./SettingsHeader.vue.js";
|
|
17
|
+
const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve = { class: "chart" }, Re = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-sidebar"
|
|
20
|
-
},
|
|
20
|
+
}, qe = /* @__PURE__ */ q({
|
|
21
21
|
__name: "Chart",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -26,75 +26,81 @@ 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
|
-
minVisible: { default:
|
|
35
|
-
maxVisible: { default:
|
|
34
|
+
minVisible: { default: ve },
|
|
35
|
+
maxVisible: { default: ye },
|
|
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: "" },
|
|
42
|
+
withAnimation: { type: Boolean, default: !0 }
|
|
41
43
|
},
|
|
42
44
|
emits: ["update:chartType", "update:visibleIds"],
|
|
43
|
-
setup(a, { emit:
|
|
45
|
+
setup(a, { emit: L }) {
|
|
44
46
|
const t = a;
|
|
45
47
|
N.register(
|
|
46
|
-
Y,
|
|
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,
|
|
60
|
+
me
|
|
59
61
|
);
|
|
60
|
-
const c =
|
|
62
|
+
const c = ee(t, "chartType", L), M = l(
|
|
63
|
+
() => t.withAnimation ? "" : "none"
|
|
64
|
+
), m = g(null);
|
|
61
65
|
let s = null;
|
|
62
|
-
const S =
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
s && (s.data.datasets =
|
|
66
|
+
const S = l(() => t.dataSets.length === 0), w = l(() => !t.loading && !S.value), y = () => {
|
|
67
|
+
m.value && (s && s.destroy(), s = new N(m.value, I.value));
|
|
68
|
+
}, $ = () => {
|
|
69
|
+
s && (s.data.datasets = b.value, s.options = I.value.options, s.update(M.value));
|
|
66
70
|
};
|
|
67
|
-
|
|
68
|
-
e && (await
|
|
69
|
-
}),
|
|
70
|
-
const h =
|
|
71
|
+
J(y), T(() => t.chartType, y), T(w, async (e) => {
|
|
72
|
+
e && (await Q(), y());
|
|
73
|
+
}), T([() => t.visibleIds, () => t.dataSets], $);
|
|
74
|
+
const h = l(
|
|
71
75
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
72
|
-
),
|
|
76
|
+
), K = l(
|
|
73
77
|
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
74
|
-
),
|
|
78
|
+
), B = l(
|
|
75
79
|
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
76
|
-
),
|
|
77
|
-
const
|
|
80
|
+
), b = l(() => B.value.map((e, o) => {
|
|
81
|
+
const i = e.color || be[o] || "#000000";
|
|
78
82
|
return {
|
|
79
83
|
...e,
|
|
80
84
|
fill: h.value ? "start" : void 0,
|
|
81
|
-
backgroundColor:
|
|
82
|
-
|
|
85
|
+
backgroundColor: Le(
|
|
86
|
+
i,
|
|
83
87
|
t.chartType === n.StackedLine ? 10 : 70
|
|
84
88
|
),
|
|
85
|
-
borderColor:
|
|
86
|
-
pointBackgroundColor:
|
|
87
|
-
pointHoverBorderColor:
|
|
89
|
+
borderColor: i,
|
|
90
|
+
pointBackgroundColor: i,
|
|
91
|
+
pointHoverBorderColor: i,
|
|
88
92
|
maxBarThickness: 50,
|
|
89
|
-
clip: 5
|
|
93
|
+
clip: 5,
|
|
90
94
|
// draw a bit outside the chart area
|
|
95
|
+
icon: e.icon || null,
|
|
96
|
+
iconType: e.iconType || "branded"
|
|
91
97
|
};
|
|
92
|
-
})),
|
|
98
|
+
})), I = l(
|
|
93
99
|
() => ({
|
|
94
100
|
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
95
101
|
// Chart Data
|
|
96
102
|
data: {
|
|
97
|
-
datasets:
|
|
103
|
+
datasets: b.value
|
|
98
104
|
},
|
|
99
105
|
// Chart Options
|
|
100
106
|
options: {
|
|
@@ -108,17 +114,17 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
108
114
|
plugins: {
|
|
109
115
|
legend: { display: !1 },
|
|
110
116
|
title: { display: !1 },
|
|
111
|
-
hoverVerticalLine:
|
|
117
|
+
hoverVerticalLine: K.value,
|
|
112
118
|
// tooltip
|
|
113
119
|
tooltip: {
|
|
114
120
|
enabled: !1,
|
|
115
121
|
position: "average",
|
|
116
122
|
external: ({ tooltip: e }) => {
|
|
117
|
-
|
|
123
|
+
r.value = { ...e };
|
|
118
124
|
},
|
|
119
125
|
callbacks: {
|
|
120
126
|
footer: (e) => {
|
|
121
|
-
const o = e.reduce((
|
|
127
|
+
const o = e.reduce((i, j) => i + (j.parsed.y || 0), 0);
|
|
122
128
|
return ["Total", String(o)];
|
|
123
129
|
}
|
|
124
130
|
}
|
|
@@ -146,7 +152,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
146
152
|
borderWidth: 0,
|
|
147
153
|
hoverRadius: 4,
|
|
148
154
|
hoverBorderWidth: 2,
|
|
149
|
-
pointHoverBackgroundColor:
|
|
155
|
+
pointHoverBackgroundColor: ge
|
|
150
156
|
},
|
|
151
157
|
bar: {
|
|
152
158
|
borderRadius: 4
|
|
@@ -161,8 +167,8 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
161
167
|
// stack on top of each other
|
|
162
168
|
// ticks
|
|
163
169
|
ticks: {
|
|
164
|
-
color:
|
|
165
|
-
font:
|
|
170
|
+
color: U,
|
|
171
|
+
font: P,
|
|
166
172
|
padding: 4,
|
|
167
173
|
callback: function(e) {
|
|
168
174
|
return H(
|
|
@@ -173,7 +179,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
173
179
|
},
|
|
174
180
|
// grid lines
|
|
175
181
|
grid: {
|
|
176
|
-
color:
|
|
182
|
+
color: z,
|
|
177
183
|
drawOnChartArea: !1,
|
|
178
184
|
drawTicks: !0,
|
|
179
185
|
drawBorder: !1,
|
|
@@ -189,17 +195,17 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
189
195
|
// stack on top of each other
|
|
190
196
|
// ticks
|
|
191
197
|
ticks: {
|
|
192
|
-
color:
|
|
193
|
-
font:
|
|
198
|
+
color: U,
|
|
199
|
+
font: P,
|
|
194
200
|
padding: 8,
|
|
195
|
-
stepSize:
|
|
196
|
-
min:
|
|
197
|
-
max:
|
|
201
|
+
stepSize: R.value,
|
|
202
|
+
min: V.value,
|
|
203
|
+
max: R.value * t.tickCount,
|
|
198
204
|
callback: (e) => H(e, t.yAxisFormat)
|
|
199
205
|
},
|
|
200
206
|
// grid lines
|
|
201
207
|
grid: {
|
|
202
|
-
color:
|
|
208
|
+
color: z,
|
|
203
209
|
drawOnChartArea: !0,
|
|
204
210
|
drawTicks: !1
|
|
205
211
|
}
|
|
@@ -207,87 +213,98 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
207
213
|
}
|
|
208
214
|
}
|
|
209
215
|
})
|
|
210
|
-
),
|
|
211
|
-
() =>
|
|
212
|
-
),
|
|
216
|
+
), W = l(
|
|
217
|
+
() => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
218
|
+
), Z = l(() => t.dataSets.map((e) => ({
|
|
213
219
|
id: e.id,
|
|
214
220
|
label: e.label,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
caption: e.caption || null,
|
|
222
|
+
color: W.value[e.id] || null,
|
|
223
|
+
icon: e.icon || null,
|
|
224
|
+
iconType: e.iconType || "branded"
|
|
225
|
+
}))), A = g(null), r = g(null), { position: E } = Te(
|
|
226
|
+
m,
|
|
227
|
+
A,
|
|
228
|
+
r
|
|
229
|
+
), G = l(() => ({
|
|
230
|
+
left: `${E.value.left}px`,
|
|
231
|
+
top: `${E.value.top}px`,
|
|
232
|
+
opacity: r.value?.opacity || 0
|
|
233
|
+
})), { minValue: V, maxValue: X } = Se({
|
|
225
234
|
parsingConfig: t.parsing,
|
|
226
|
-
dataSets:
|
|
235
|
+
dataSets: B,
|
|
227
236
|
isStacked: h
|
|
228
|
-
}),
|
|
229
|
-
() =>
|
|
237
|
+
}), R = l(
|
|
238
|
+
() => he(V.value, X.value, t.tickCount)
|
|
230
239
|
);
|
|
231
|
-
return (e, o) => (d(),
|
|
232
|
-
a.withSettingsHeader ? (d(),
|
|
240
|
+
return (e, o) => (d(), C(O, null, [
|
|
241
|
+
a.withSettingsHeader ? (d(), f(Ie, {
|
|
233
242
|
key: 0,
|
|
234
243
|
"chart-type": u(c),
|
|
235
|
-
"onUpdate:chart-type": o[0] || (o[0] = (
|
|
244
|
+
"onUpdate:chart-type": o[0] || (o[0] = (i) => D(c) ? c.value = i : null),
|
|
236
245
|
"hide-legend": a.hideLegend
|
|
237
246
|
}, {
|
|
238
|
-
metric:
|
|
239
|
-
|
|
247
|
+
metric: k(() => [
|
|
248
|
+
x(e.$slots, "metric", {}, void 0, !0)
|
|
240
249
|
]),
|
|
241
|
-
breakdowns:
|
|
242
|
-
|
|
250
|
+
breakdowns: k(() => [
|
|
251
|
+
x(e.$slots, "breakdowns", {}, void 0, !0)
|
|
243
252
|
]),
|
|
244
253
|
_: 3
|
|
245
254
|
}, 8, ["chart-type", "hide-legend"])) : v("", !0),
|
|
246
|
-
|
|
247
|
-
u(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
255
|
+
p("div", Ae, [
|
|
256
|
+
u(w) ? (d(), C(O, { key: 0 }, [
|
|
257
|
+
p("section", {
|
|
258
|
+
class: Y(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
259
|
+
}, [
|
|
260
|
+
p("div", Ee, [
|
|
261
|
+
F(xe, {
|
|
251
262
|
"chart-type": u(c),
|
|
252
|
-
"onUpdate:chart-type": o[1] || (o[1] = (
|
|
263
|
+
"onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
|
|
253
264
|
"with-settings-header": a.withSettingsHeader,
|
|
254
265
|
header: a.header,
|
|
255
266
|
subheader: a.subheader,
|
|
256
|
-
"subheader-tooltip": a.
|
|
257
|
-
},
|
|
267
|
+
"with-subheader-tooltip": a.withSubheaderTooltip
|
|
268
|
+
}, {
|
|
269
|
+
"subheader-tooltip": k(() => [
|
|
270
|
+
x(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
271
|
+
]),
|
|
272
|
+
_: 3
|
|
273
|
+
}, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
|
|
258
274
|
]),
|
|
259
|
-
|
|
260
|
-
|
|
275
|
+
p("div", Ve, [
|
|
276
|
+
p("canvas", {
|
|
261
277
|
ref_key: "chartRef",
|
|
262
|
-
ref:
|
|
278
|
+
ref: m,
|
|
263
279
|
class: "chart__canvas"
|
|
264
280
|
}, null, 512),
|
|
265
|
-
|
|
281
|
+
p("div", {
|
|
266
282
|
ref_key: "tooltipRef",
|
|
267
|
-
ref:
|
|
283
|
+
ref: A,
|
|
268
284
|
class: "chart__tooltip",
|
|
269
|
-
style:
|
|
285
|
+
style: _(u(G))
|
|
270
286
|
}, [
|
|
271
|
-
|
|
287
|
+
r.value ? (d(), f(Ce, {
|
|
272
288
|
key: 0,
|
|
273
|
-
title: String(
|
|
274
|
-
"data-points":
|
|
289
|
+
title: String(r.value.title),
|
|
290
|
+
"data-points": r.value.dataPoints,
|
|
275
291
|
"x-axis-format": a.xAxisFormat,
|
|
276
292
|
"y-axis-format": a.yAxisFormat,
|
|
277
|
-
"total-label":
|
|
278
|
-
"total-value": Number(
|
|
293
|
+
"total-label": r.value.footer[0],
|
|
294
|
+
"total-value": Number(r.value.footer[1])
|
|
279
295
|
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
|
|
280
296
|
], 4)
|
|
281
297
|
])
|
|
282
|
-
]),
|
|
283
|
-
a.hideLegend ? v("", !0) : (d(),
|
|
284
|
-
F(
|
|
285
|
-
items: u(
|
|
298
|
+
], 2),
|
|
299
|
+
a.hideLegend ? v("", !0) : (d(), C("section", Re, [
|
|
300
|
+
F(ke, {
|
|
301
|
+
items: u(Z),
|
|
286
302
|
"visible-ids": a.visibleIds,
|
|
287
|
-
"
|
|
288
|
-
|
|
303
|
+
"max-limit-tooltip-text": a.maxLimitTooltipText,
|
|
304
|
+
"onUpdate:visibleIds": o[2] || (o[2] = (i) => L("update:visibleIds", i))
|
|
305
|
+
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
289
306
|
]))
|
|
290
|
-
], 64)) : a.loading ? (d(),
|
|
307
|
+
], 64)) : a.loading ? (d(), f(we, { key: 1 })) : u(S) ? (d(), f(u(Be), {
|
|
291
308
|
key: 2,
|
|
292
309
|
title: a.noDataTitle,
|
|
293
310
|
subtitle: a.noDataSubtitle,
|
|
@@ -298,5 +315,5 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
298
315
|
}
|
|
299
316
|
});
|
|
300
317
|
export {
|
|
301
|
-
|
|
318
|
+
qe as default
|
|
302
319
|
};
|
|
@@ -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
|
};
|