@ironsource/shared-ui 2.1.7-test.1 → 2.1.7-test.10
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/Autocomplete.vue_vue_type_style_index_0_scoped_e361f9fd_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css +1 -0
- package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_0ce71f73_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_00ccab6b_lang.css +1 -0
- package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +1 -0
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +1 -0
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_cc2adbf5_lang.css +1 -0
- package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_bd6145ce_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_82ba0e12_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_77509f61_lang.css +1 -0
- package/Popover.vue_vue_type_style_index_0_scoped_c607b770_lang.css +1 -0
- package/PopoverV4.vue_vue_type_style_index_0_scoped_c54cd089_lang.css +1 -0
- package/PopoverV4.vue_vue_type_style_index_1_lang.css +1 -0
- package/README.md +1 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +1 -0
- package/TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css +1 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_0_scoped_66bd448a_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_dbd80d49_lang.css +1 -0
- package/components/ThemeWrapper/ThemeWrapper.vue.js +2 -2
- package/components/ThemeWrapper/ThemeWrapper.vue2.js +5 -5
- package/components/appHeader/AppHeader.vue.d.ts +1 -1
- package/components/appHeader/index.d.ts +9 -9
- package/components/autocomplete/Autocomplete.vue.d.ts +5 -0
- package/components/autocomplete/Autocomplete.vue.js +2 -2
- package/components/autocomplete/Autocomplete.vue2.js +57 -45
- package/components/autocomplete/index.d.ts +20 -1
- package/components/chart/Chart.vue.js +7 -0
- package/components/chart/Chart.vue2.js +281 -0
- package/components/chart/ChartHeader.vue.js +7 -0
- package/components/chart/ChartHeader.vue2.js +51 -0
- package/components/chart/ChartLegend.vue.js +7 -0
- package/components/chart/ChartLegend.vue2.js +65 -0
- package/components/chart/ChartLoader.vue.js +25 -0
- package/components/chart/ChartLoader.vue2.js +0 -0
- package/components/chart/ChartTooltip.vue.js +7 -0
- package/components/chart/ChartTooltip.vue2.js +81 -0
- package/components/chart/composables/useChartValues.js +32 -0
- package/components/chart/composables/useTooltipPosition.js +22 -0
- package/components/chart/consts.js +21 -0
- package/components/chart/index.js +6 -0
- package/components/chart/plugins/HoverVerticalLine.js +12 -0
- package/components/chart/types.js +4 -0
- package/components/chart/utils/formatNumber.js +11 -0
- package/components/chart/utils/utils.js +12 -0
- package/components/dropdown/common/Dropdown.common.js +89 -89
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +1 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +32 -29
- package/components/dropdown/v4/DropdownV4.vue.d.ts +39 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +256 -224
- package/components/dropdown/v4/OptionV4.vue.d.ts +36 -2
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +99 -59
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +21 -16
- package/components/dropdown/v4/TreeDropdown.vue.js +3 -3
- package/components/dropdown/v4/TreeDropdown.vue2.js +170 -74
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +14 -0
- package/components/dropdown/v4/index.d.ts +528 -83
- package/components/icon/v4/IconV4.vue.d.ts +5 -0
- package/components/icon/v4/IconV4.vue.js +4 -4
- package/components/icon/v4/IconV4.vue2.js +29 -26
- package/components/icon/v4/index.d.ts +20 -1
- package/components/includeExclude/IncludeExclude.vue.js +4 -4
- package/components/includeExclude/IncludeExclude.vue2.js +2 -2
- package/components/includeExclude/IncludeExcludeDragDrop.vue.js +4 -4
- package/components/includeExclude/IncludeExcludeDragDrop.vue2.js +2 -2
- package/components/input/v4/TextField.vue.d.ts +6 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +95 -90
- package/components/input/v4/index.d.ts +20 -1
- package/components/popover/common/Popover.common.d.ts +6 -0
- package/components/popover/common/Popover.common.js +17 -0
- package/components/popover/v3/Popover.vue.js +8 -0
- package/components/popover/{Popover.vue2.js → v3/Popover.vue2.js} +1 -1
- package/components/popover/v4/PopoverV4.vue.d.ts +73 -0
- package/components/popover/v4/PopoverV4.vue.js +7 -0
- package/components/popover/v4/PopoverV4.vue2.js +54 -0
- package/components/popover/v4/index.d.ts +209 -0
- package/components/popover/v4/index.js +6 -0
- package/components/shared/FieldMaxLength.vue.js +3 -3
- package/components/shared/FieldMaxLength.vue2.js +2 -2
- package/components/shared/commonTypes.d.ts +2 -0
- package/components/sortableList/SortableItem.vue.js +7 -0
- package/components/sortableList/SortableItem.vue2.js +140 -0
- package/components/sortableList/SortableItemLabel.vue.js +7 -0
- package/components/sortableList/SortableItemLabel.vue2.js +60 -0
- package/components/sortableList/SortableList.vue.d.ts +25 -0
- package/components/sortableList/SortableList.vue.js +7 -0
- package/components/sortableList/SortableList.vue2.js +160 -0
- package/components/sortableList/composables/useHoverEffect.js +19 -0
- package/components/sortableList/consts.js +4 -0
- package/components/sortableList/index.d.ts +88 -2
- package/components/sortableList/index.js +6 -0
- package/components/table/v3/Table.vue.d.ts +2 -2
- package/components/table/v3/index.d.ts +39 -39
- package/components/table/v4/DataGrid.vue.d.ts +6 -2
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +131 -122
- package/components/table/v4/DataGridRowsCounter.vue.d.ts +5 -0
- package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
- package/components/table/v4/DataGridRowsCounter.vue2.js +29 -22
- package/components/table/v4/MultipleDataGrid.vue.d.ts +16 -3
- package/components/table/v4/MultipleDataGrid.vue.js +4 -4
- package/components/table/v4/MultipleDataGrid.vue2.js +114 -66
- package/components/table/v4/index.d.ts +101 -75
- package/components/table-cells/common/Editable.common.js +37 -26
- 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 +5 -5
- package/components/table-cells/v4/EditableV4.vue2.js +18 -17
- package/components/table-cells/v4/index.d.ts +20 -1
- package/components/tabs/v4/TabsV4.vue.js +4 -4
- package/components/tabs/v4/TabsV4.vue2.js +37 -40
- package/components/textArea/v4/TextAreaV4.vue.d.ts +6 -1
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +18 -12
- package/components/textArea/v4/index.d.ts +9 -0
- package/design-foundation.stories/icons/iconsData.d.ts +6 -2
- package/index.d.ts +9608 -7356
- package/index.js +136 -131
- package/mocks/options.d.ts +12 -0
- package/package.json +15 -3
- package/testids/index.d.ts +5 -0
- package/testids/index.js +27 -25
- package/utils/search.js +4 -0
- package/Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_63aaf3be_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_06751538_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css +0 -1
- package/EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css +0 -1
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_1eea7671_lang.css +0 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_fb054d88_lang.css +0 -1
- package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_5764fd61_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_260b9cdc_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +0 -1
- package/Popover.vue_vue_type_style_index_0_scoped_25eb53db_lang.css +0 -1
- package/TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +0 -1
- package/ThemeWrapper.vue_vue_type_style_index_0_scoped_b62ee695_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +0 -1
- package/components/popover/Popover.vue.js +0 -8
- /package/components/popover/{Popover.vue.d.ts → v3/Popover.vue.d.ts} +0 -0
- /package/components/popover/{index.d.ts → v3/index.d.ts} +0 -0
- /package/components/popover/{index.js → v3/index.js} +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css"; import { defineComponent as W, ref as y, computed as r, onMounted as Z, watch as b, nextTick as $, openBlock as d, createElementBlock as C, unref as c, Fragment as G, createElementVNode as u, createVNode as V, isRef as X, normalizeStyle as j, createBlock as g, createCommentVNode as T } from "vue";
|
|
2
|
+
import { useVModel as q } from "@vueuse/core";
|
|
3
|
+
import { Chart as O, ArcElement as J, LineElement as Q, BarElement as Y, PointElement as ee, LineController as te, BarController as ae, PieController as oe, ScatterController as re, CategoryScale as ie, LinearScale as le, Filler as ne, Tooltip as se } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as de } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as D, calcStepSize as ce } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as ue, DEFAULT_MIN_VISIBLE as pe, DEFAULT_MAX_VISIBLE as fe, COLOR_PALETTE as me, POINT_BORDER_COLOR as he, TICK_LABEL_COLOR as F, TICK_LABEL_FONT as _, GRID_LINE_COLOR as w } from "./consts.js";
|
|
7
|
+
import { ChartType as n } from "./types.js";
|
|
8
|
+
import { useTooltipPosition as ve } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import ye from "./ChartTooltip.vue.js";
|
|
10
|
+
import be from "./ChartLegend.vue.js";
|
|
11
|
+
import Ce from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as ge } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as Te } from "./composables/useChartValues.js";
|
|
14
|
+
import ke from "./ChartLoader.vue.js";
|
|
15
|
+
import Le from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = { class: "header-wrapper" }, Be = { class: "chart" }, Ae = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "chart-sidebar"
|
|
19
|
+
}, We = /* @__PURE__ */ W({
|
|
20
|
+
__name: "Chart",
|
|
21
|
+
props: {
|
|
22
|
+
dataSets: { default: () => [] },
|
|
23
|
+
visibleIds: { default: () => [] },
|
|
24
|
+
chartType: { default: n.Line },
|
|
25
|
+
parsing: { default: void 0 },
|
|
26
|
+
xAxisFormat: { default: "string" },
|
|
27
|
+
yAxisFormat: { default: "number" },
|
|
28
|
+
tickCount: { default: ue },
|
|
29
|
+
header: { default: "" },
|
|
30
|
+
subheader: { default: "" },
|
|
31
|
+
hideLegend: { type: Boolean, default: !1 },
|
|
32
|
+
minVisible: { default: pe },
|
|
33
|
+
maxVisible: { default: fe },
|
|
34
|
+
loading: { type: Boolean, default: !1 },
|
|
35
|
+
noDataIcon: { default: "file-x" },
|
|
36
|
+
noDataTitle: { default: "No data to display" },
|
|
37
|
+
noDataSubtitle: { default: "Search again with different filters" }
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:chartType", "update:visibleIds"],
|
|
40
|
+
setup(a, { emit: k }) {
|
|
41
|
+
const e = a;
|
|
42
|
+
O.register(
|
|
43
|
+
J,
|
|
44
|
+
Q,
|
|
45
|
+
Y,
|
|
46
|
+
ee,
|
|
47
|
+
te,
|
|
48
|
+
ae,
|
|
49
|
+
oe,
|
|
50
|
+
re,
|
|
51
|
+
ie,
|
|
52
|
+
le,
|
|
53
|
+
ne,
|
|
54
|
+
se,
|
|
55
|
+
de
|
|
56
|
+
);
|
|
57
|
+
const m = q(e, "chartType", k), p = y(null);
|
|
58
|
+
let s = null;
|
|
59
|
+
const L = r(() => e.dataSets.length === 0), x = r(() => !e.loading && !L.value), h = () => {
|
|
60
|
+
p.value && (s && s.destroy(), s = new O(p.value, I.value));
|
|
61
|
+
}, N = () => {
|
|
62
|
+
s && (s.data.datasets = v.value, s.options = I.value.options, s.update());
|
|
63
|
+
};
|
|
64
|
+
Z(h), b(() => e.chartType, h), b(x, async (t) => {
|
|
65
|
+
t && (await $(), h());
|
|
66
|
+
}), b([() => e.visibleIds, () => e.dataSets], N);
|
|
67
|
+
const f = r(
|
|
68
|
+
() => e.chartType === n.StackedLine || e.chartType === n.StackedBar
|
|
69
|
+
), P = r(
|
|
70
|
+
() => e.chartType === n.Line || e.chartType === n.StackedLine
|
|
71
|
+
), S = r(
|
|
72
|
+
() => e.dataSets.filter((t) => e.visibleIds.includes(t.id))
|
|
73
|
+
), v = r(() => S.value.map((t, o) => {
|
|
74
|
+
const i = t.color || me[o] || "#000000";
|
|
75
|
+
return {
|
|
76
|
+
...t,
|
|
77
|
+
fill: f.value ? "start" : void 0,
|
|
78
|
+
backgroundColor: ge(
|
|
79
|
+
i,
|
|
80
|
+
e.chartType === n.StackedLine ? 10 : 70
|
|
81
|
+
),
|
|
82
|
+
borderColor: i,
|
|
83
|
+
pointBackgroundColor: i,
|
|
84
|
+
pointHoverBorderColor: i,
|
|
85
|
+
maxBarThickness: 50,
|
|
86
|
+
clip: 5
|
|
87
|
+
// draw a bit outside the chart area
|
|
88
|
+
};
|
|
89
|
+
})), I = r(
|
|
90
|
+
() => ({
|
|
91
|
+
type: e.chartType == n.Bar || e.chartType === n.StackedBar ? "bar" : "line",
|
|
92
|
+
// Chart Data
|
|
93
|
+
data: {
|
|
94
|
+
datasets: v.value
|
|
95
|
+
},
|
|
96
|
+
// Chart Options
|
|
97
|
+
options: {
|
|
98
|
+
parsing: e.parsing,
|
|
99
|
+
interaction: {
|
|
100
|
+
intersect: !1,
|
|
101
|
+
mode: "index",
|
|
102
|
+
axis: "x"
|
|
103
|
+
},
|
|
104
|
+
// plugins
|
|
105
|
+
plugins: {
|
|
106
|
+
legend: { display: !1 },
|
|
107
|
+
title: { display: !1 },
|
|
108
|
+
hoverVerticalLine: P.value,
|
|
109
|
+
// tooltip
|
|
110
|
+
tooltip: {
|
|
111
|
+
enabled: !1,
|
|
112
|
+
position: "average",
|
|
113
|
+
external: ({ tooltip: t }) => {
|
|
114
|
+
l.value = { ...t };
|
|
115
|
+
},
|
|
116
|
+
callbacks: {
|
|
117
|
+
footer: (t) => {
|
|
118
|
+
const o = t.reduce((i, K) => i + (K.parsed.y || 0), 0);
|
|
119
|
+
return ["Total", String(o)];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
// chart layout
|
|
125
|
+
responsive: !0,
|
|
126
|
+
maintainAspectRatio: !1,
|
|
127
|
+
layout: {
|
|
128
|
+
padding: {
|
|
129
|
+
left: 18,
|
|
130
|
+
top: 18,
|
|
131
|
+
bottom: 13
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
// basic styles
|
|
135
|
+
elements: {
|
|
136
|
+
line: {
|
|
137
|
+
borderWidth: 2,
|
|
138
|
+
tension: 0.3
|
|
139
|
+
},
|
|
140
|
+
point: {
|
|
141
|
+
radius: 1,
|
|
142
|
+
hitRadius: 8,
|
|
143
|
+
borderWidth: 0,
|
|
144
|
+
hoverRadius: 4,
|
|
145
|
+
hoverBorderWidth: 2,
|
|
146
|
+
pointHoverBackgroundColor: he
|
|
147
|
+
},
|
|
148
|
+
bar: {
|
|
149
|
+
borderRadius: 4
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
scales: {
|
|
153
|
+
// Horizontal Axis (X)
|
|
154
|
+
x: {
|
|
155
|
+
beginAtZero: !0,
|
|
156
|
+
border: { display: !1 },
|
|
157
|
+
stacked: f.value,
|
|
158
|
+
// stack on top of each other
|
|
159
|
+
// ticks
|
|
160
|
+
ticks: {
|
|
161
|
+
color: F,
|
|
162
|
+
font: _,
|
|
163
|
+
padding: 4,
|
|
164
|
+
callback: function(t) {
|
|
165
|
+
return D(
|
|
166
|
+
this.getLabelForValue(t),
|
|
167
|
+
e.xAxisFormat
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
// grid lines
|
|
172
|
+
grid: {
|
|
173
|
+
color: w,
|
|
174
|
+
drawOnChartArea: !1,
|
|
175
|
+
drawTicks: !0,
|
|
176
|
+
drawBorder: !1,
|
|
177
|
+
tickLength: 7
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
// Vertical Axis (Y)
|
|
181
|
+
y: {
|
|
182
|
+
beginAtZero: !0,
|
|
183
|
+
border: { display: !1 },
|
|
184
|
+
// hide left borderline
|
|
185
|
+
stacked: f.value,
|
|
186
|
+
// stack on top of each other
|
|
187
|
+
// ticks
|
|
188
|
+
ticks: {
|
|
189
|
+
color: F,
|
|
190
|
+
font: _,
|
|
191
|
+
padding: 8,
|
|
192
|
+
stepSize: R.value,
|
|
193
|
+
min: E.value,
|
|
194
|
+
max: R.value * e.tickCount,
|
|
195
|
+
callback: (t) => D(t, e.yAxisFormat)
|
|
196
|
+
},
|
|
197
|
+
// grid lines
|
|
198
|
+
grid: {
|
|
199
|
+
color: w,
|
|
200
|
+
drawOnChartArea: !0,
|
|
201
|
+
drawTicks: !1
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
), M = r(
|
|
208
|
+
() => v.value.reduce((t, o) => (t[o.id] = o.borderColor, t), {})
|
|
209
|
+
), U = r(() => e.dataSets.map((t) => ({
|
|
210
|
+
id: t.id,
|
|
211
|
+
label: t.label,
|
|
212
|
+
color: M.value[t.id] || null
|
|
213
|
+
}))), B = y(null), l = y(null), { position: A } = ve(
|
|
214
|
+
p,
|
|
215
|
+
B,
|
|
216
|
+
l
|
|
217
|
+
), z = r(() => ({
|
|
218
|
+
left: `${A.value.left}px`,
|
|
219
|
+
top: `${A.value.top}px`,
|
|
220
|
+
opacity: l.value?.opacity || 0
|
|
221
|
+
})), { minValue: E, maxValue: H } = Te({
|
|
222
|
+
parsingConfig: e.parsing,
|
|
223
|
+
dataSets: S,
|
|
224
|
+
isStacked: f
|
|
225
|
+
}), R = r(
|
|
226
|
+
() => ce(E.value, H.value, e.tickCount)
|
|
227
|
+
);
|
|
228
|
+
return (t, o) => (d(), C("div", xe, [
|
|
229
|
+
c(x) ? (d(), C(G, { key: 0 }, [
|
|
230
|
+
u("section", Se, [
|
|
231
|
+
u("div", Ie, [
|
|
232
|
+
V(Ce, {
|
|
233
|
+
"chart-type": c(m),
|
|
234
|
+
"onUpdate:chart-type": o[0] || (o[0] = (i) => X(m) ? m.value = i : null),
|
|
235
|
+
header: a.header,
|
|
236
|
+
subheader: a.subheader
|
|
237
|
+
}, null, 8, ["chart-type", "header", "subheader"])
|
|
238
|
+
]),
|
|
239
|
+
u("div", Be, [
|
|
240
|
+
u("canvas", {
|
|
241
|
+
ref_key: "chartRef",
|
|
242
|
+
ref: p,
|
|
243
|
+
class: "chart__canvas"
|
|
244
|
+
}, null, 512),
|
|
245
|
+
u("div", {
|
|
246
|
+
ref_key: "tooltipRef",
|
|
247
|
+
ref: B,
|
|
248
|
+
class: "chart__tooltip",
|
|
249
|
+
style: j(c(z))
|
|
250
|
+
}, [
|
|
251
|
+
l.value ? (d(), g(ye, {
|
|
252
|
+
key: 0,
|
|
253
|
+
title: String(l.value.title),
|
|
254
|
+
"data-points": l.value.dataPoints,
|
|
255
|
+
"x-axis-format": a.xAxisFormat,
|
|
256
|
+
"y-axis-format": a.yAxisFormat,
|
|
257
|
+
"total-label": l.value.footer[0],
|
|
258
|
+
"total-value": Number(l.value.footer[1])
|
|
259
|
+
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : T("", !0)
|
|
260
|
+
], 4)
|
|
261
|
+
])
|
|
262
|
+
]),
|
|
263
|
+
a.hideLegend ? T("", !0) : (d(), C("section", Ae, [
|
|
264
|
+
V(be, {
|
|
265
|
+
items: c(U),
|
|
266
|
+
"visible-ids": a.visibleIds,
|
|
267
|
+
"onUpdate:visibleIds": o[1] || (o[1] = (i) => k("update:visibleIds", i))
|
|
268
|
+
}, null, 8, ["items", "visible-ids"])
|
|
269
|
+
]))
|
|
270
|
+
], 64)) : a.loading ? (d(), g(ke, { key: 1 })) : c(L) ? (d(), g(c(Le), {
|
|
271
|
+
key: 2,
|
|
272
|
+
title: a.noDataTitle,
|
|
273
|
+
subtitle: a.noDataSubtitle,
|
|
274
|
+
"icon-name": a.noDataIcon
|
|
275
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : T("", !0)
|
|
276
|
+
]));
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
export {
|
|
280
|
+
We as default
|
|
281
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./ChartHeader.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-88d4532f"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css"; import { defineComponent as f, computed as y, openBlock as T, createElementBlock as V, createElementVNode as _, createVNode as n, unref as t, withCtx as c, createTextVNode as l, toDisplayString as p, isRef as v } from "vue";
|
|
2
|
+
import s from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import x from "../switch/v4/SwitchV4.vue.js";
|
|
4
|
+
import { ChartType as a } from "./types.js";
|
|
5
|
+
const C = { class: "chart-header" }, b = { class: "header-texts" }, N = /* @__PURE__ */ f({
|
|
6
|
+
__name: "ChartHeader",
|
|
7
|
+
props: {
|
|
8
|
+
chartType: { default: a.Line },
|
|
9
|
+
header: { default: "" },
|
|
10
|
+
subheader: { default: "" }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:chartType"],
|
|
13
|
+
setup(r, { emit: u }) {
|
|
14
|
+
const h = r, d = [
|
|
15
|
+
{ id: a.Line, icon: "chart-line-up" },
|
|
16
|
+
{ id: a.Bar, icon: "chart-bar" },
|
|
17
|
+
{ id: a.StackedLine, icon: "chart-line" }
|
|
18
|
+
], o = y({
|
|
19
|
+
get() {
|
|
20
|
+
return d.find(({ id: e }) => e === h.chartType);
|
|
21
|
+
},
|
|
22
|
+
set(e) {
|
|
23
|
+
u("update:chartType", e.id);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return (e, i) => (T(), V("div", C, [
|
|
27
|
+
_("div", b, [
|
|
28
|
+
n(t(s), { variant: "chart2" }, {
|
|
29
|
+
default: c(() => [
|
|
30
|
+
l(p(r.header), 1)
|
|
31
|
+
]),
|
|
32
|
+
_: 1
|
|
33
|
+
}),
|
|
34
|
+
n(t(s), { variant: "caption" }, {
|
|
35
|
+
default: c(() => [
|
|
36
|
+
l(p(r.subheader), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})
|
|
40
|
+
]),
|
|
41
|
+
n(t(x), {
|
|
42
|
+
modelValue: t(o),
|
|
43
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => v(o) ? o.value = m : null),
|
|
44
|
+
options: d
|
|
45
|
+
}, null, 8, ["modelValue"])
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
N as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./ChartLegend.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-efc608f9"]]);
|
|
5
|
+
export {
|
|
6
|
+
c as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css"; import { defineComponent as E, ref as T, computed as a, openBlock as d, createElementBlock as n, createElementVNode as c, createVNode as u, unref as l, mergeProps as m, Fragment as y, renderList as S, withCtx as U, createTextVNode as w, toDisplayString as B } from "vue";
|
|
2
|
+
import { useVirtualList as D } from "@vueuse/core";
|
|
3
|
+
import N from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import A from "../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
+
import F from "../search/v4/SearchV4.vue.js";
|
|
6
|
+
import { DEFAULT_MIN_VISIBLE as H, DEFAULT_MAX_VISIBLE as M } from "./consts.js";
|
|
7
|
+
const P = { class: "chart-legend" }, R = { class: "search-box" }, K = /* @__PURE__ */ E({
|
|
8
|
+
__name: "ChartLegend",
|
|
9
|
+
props: {
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
visibleIds: { default: () => [] },
|
|
12
|
+
minVisible: { default: H },
|
|
13
|
+
maxVisible: { default: M }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:visibleIds"],
|
|
16
|
+
setup(p, { emit: b }) {
|
|
17
|
+
const t = p, h = 32, o = T(""), f = a(() => {
|
|
18
|
+
const e = o.value.toLowerCase();
|
|
19
|
+
return t.items.filter(
|
|
20
|
+
(i) => i.label.toLowerCase().includes(e)
|
|
21
|
+
);
|
|
22
|
+
}), r = (e) => t.visibleIds.includes(e.id), v = a(
|
|
23
|
+
() => t.visibleIds.length >= t.maxVisible
|
|
24
|
+
), I = a(
|
|
25
|
+
() => t.visibleIds.length <= t.minVisible
|
|
26
|
+
), _ = (e) => I.value && r(e) || v.value && !r(e), V = (e, i) => {
|
|
27
|
+
b(
|
|
28
|
+
"update:visibleIds",
|
|
29
|
+
e ? [...t.visibleIds, i.id] : t.visibleIds.filter((s) => s !== i.id)
|
|
30
|
+
);
|
|
31
|
+
}, { list: L, containerProps: g, wrapperProps: k } = D(f, {
|
|
32
|
+
itemHeight: h,
|
|
33
|
+
overscan: 10
|
|
34
|
+
});
|
|
35
|
+
return (e, i) => (d(), n("div", P, [
|
|
36
|
+
c("div", R, [
|
|
37
|
+
u(l(F), {
|
|
38
|
+
modelValue: o.value,
|
|
39
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s)
|
|
40
|
+
}, null, 8, ["modelValue"])
|
|
41
|
+
]),
|
|
42
|
+
c("div", m({ class: "legend" }, l(g)), [
|
|
43
|
+
c("ul", m({ class: "legend__list" }, l(k)), [
|
|
44
|
+
(d(!0), n(y, null, S(l(L), ({ data: s, index: C }) => (d(), n("li", { key: C }, [
|
|
45
|
+
u(l(A), {
|
|
46
|
+
color: s.color,
|
|
47
|
+
"is-checked": r(s),
|
|
48
|
+
disabled: _(s),
|
|
49
|
+
"onUpdate:isChecked": (x) => V(x, s)
|
|
50
|
+
}, null, 8, ["color", "is-checked", "disabled", "onUpdate:isChecked"]),
|
|
51
|
+
u(l(N), { variant: "body2" }, {
|
|
52
|
+
default: U(() => [
|
|
53
|
+
w(B(s.label), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1024)
|
|
57
|
+
]))), 128))
|
|
58
|
+
], 16)
|
|
59
|
+
], 16)
|
|
60
|
+
]));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
K as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as c, pushScopeId as r, popScopeId as s, createElementVNode as t } from "vue";
|
|
2
|
+
/* empty css */import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const d = {}, i = (e) => (r("data-v-142c444a"), e = e(), s(), e), n = { class: "chart-loader" }, p = /* @__PURE__ */ i(() => /* @__PURE__ */ t("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
viewBox: "0 0 1072 275",
|
|
6
|
+
preserveAspectRatio: "none",
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%",
|
|
9
|
+
fill: "none"
|
|
10
|
+
}, [
|
|
11
|
+
/* @__PURE__ */ t("path", {
|
|
12
|
+
d: "M499.744 87.7024L499 87.4816C399.137 70.0475 293 138.418 218 173.72C120 219.848 87 235.892 0 275L1072 275C979 -57.3526 836.258 -31.5829 732 59.404C648.885 131.939 570.549 108.704 499.744 87.7024Z",
|
|
13
|
+
fill: "black",
|
|
14
|
+
"fill-opacity": "0.05"
|
|
15
|
+
})
|
|
16
|
+
], -1)), _ = [
|
|
17
|
+
p
|
|
18
|
+
];
|
|
19
|
+
function l(e, h) {
|
|
20
|
+
return o(), c("div", n, _);
|
|
21
|
+
}
|
|
22
|
+
const w = /* @__PURE__ */ a(d, [["render", l], ["__scopeId", "data-v-142c444a"]]);
|
|
23
|
+
export {
|
|
24
|
+
w as default
|
|
25
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./ChartTooltip.vue2.js";
|
|
2
|
+
/* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ec636f18"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css"; import { defineComponent as y, computed as b, openBlock as a, createElementBlock as s, createElementVNode as u, createBlock as g, unref as e, withCtx as l, createTextVNode as o, toDisplayString as r, createCommentVNode as f, Fragment as h, renderList as k, normalizeStyle as v, createVNode as d } from "vue";
|
|
2
|
+
import i from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import { formatValue as c } from "./utils/utils.js";
|
|
4
|
+
const F = { class: "chart-tooltip" }, V = { class: "tooltip-title" }, p = { class: "list" }, A = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "tooltip-footer"
|
|
7
|
+
}, T = /* @__PURE__ */ y({
|
|
8
|
+
__name: "ChartTooltip",
|
|
9
|
+
props: {
|
|
10
|
+
title: { default: "" },
|
|
11
|
+
dataPoints: { default: () => [] },
|
|
12
|
+
xAxisFormat: { default: null },
|
|
13
|
+
yAxisFormat: { default: null },
|
|
14
|
+
totalLabel: { default: "Total" },
|
|
15
|
+
totalValue: { default: null }
|
|
16
|
+
},
|
|
17
|
+
setup(t) {
|
|
18
|
+
const m = t, x = b(() => m.xAxisFormat === "date" ? "dateLong" : m.xAxisFormat);
|
|
19
|
+
return (C, _) => (a(), s("div", F, [
|
|
20
|
+
u("div", V, [
|
|
21
|
+
t.title ? (a(), g(e(i), {
|
|
22
|
+
key: 0,
|
|
23
|
+
variant: "subtitle2"
|
|
24
|
+
}, {
|
|
25
|
+
default: l(() => [
|
|
26
|
+
o(r(e(c)(t.title, e(x))), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
})) : f("", !0)
|
|
30
|
+
]),
|
|
31
|
+
u("ul", p, [
|
|
32
|
+
(a(!0), s(h, null, k(t.dataPoints, (n) => (a(), s("li", {
|
|
33
|
+
key: n.datasetIndex,
|
|
34
|
+
class: "list__item"
|
|
35
|
+
}, [
|
|
36
|
+
u("span", {
|
|
37
|
+
class: "color-box",
|
|
38
|
+
style: v({
|
|
39
|
+
backgroundColor: String(n.dataset.pointBackgroundColor)
|
|
40
|
+
})
|
|
41
|
+
}, null, 4),
|
|
42
|
+
d(e(i), {
|
|
43
|
+
variant: "body2",
|
|
44
|
+
class: "flex-grow"
|
|
45
|
+
}, {
|
|
46
|
+
default: l(() => [
|
|
47
|
+
o(r(n.dataset.label), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1024),
|
|
51
|
+
d(e(i), { variant: "body2" }, {
|
|
52
|
+
default: l(() => [
|
|
53
|
+
o(r(e(c)(n.parsed.y, t.yAxisFormat)), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1024)
|
|
57
|
+
]))), 128))
|
|
58
|
+
]),
|
|
59
|
+
t.totalValue !== null ? (a(), s("div", A, [
|
|
60
|
+
d(e(i), {
|
|
61
|
+
variant: "body2",
|
|
62
|
+
class: "flex-grow"
|
|
63
|
+
}, {
|
|
64
|
+
default: l(() => [
|
|
65
|
+
o(r(t.totalLabel), 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}),
|
|
69
|
+
d(e(i), { variant: "body2" }, {
|
|
70
|
+
default: l(() => [
|
|
71
|
+
o(r(e(c)(t.totalValue, t.yAxisFormat)), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
])) : f("", !0)
|
|
76
|
+
]));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
T as default
|
|
81
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { computed as t } from "vue";
|
|
2
|
+
const V = ({
|
|
3
|
+
parsingConfig: s,
|
|
4
|
+
dataSets: m,
|
|
5
|
+
isStacked: v
|
|
6
|
+
}) => {
|
|
7
|
+
const l = (e) => e ? e[s?.yAxisKey] : null, r = (e) => e ? e[s?.xAxisKey] : null, o = t(
|
|
8
|
+
() => m.value.flatMap(
|
|
9
|
+
(e) => e.data.map(l)
|
|
10
|
+
)
|
|
11
|
+
), p = t(() => m.value.reduce((e, n) => (n.data.forEach((a) => {
|
|
12
|
+
const u = String(r(a));
|
|
13
|
+
e[u] || (e[u] = []), e[u].push(l(a));
|
|
14
|
+
}), e), {})), x = t(() => Math.min(0, ...o.value.map(Number))), h = t(() => {
|
|
15
|
+
if (v.value) {
|
|
16
|
+
const e = Object.values(p.value).map(
|
|
17
|
+
(n) => n.reduce((a, u) => a + u, 0)
|
|
18
|
+
);
|
|
19
|
+
return Math.max(...e);
|
|
20
|
+
}
|
|
21
|
+
return Math.max(...o.value.map(Number));
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
getXValue: r,
|
|
25
|
+
getYValue: l,
|
|
26
|
+
minValue: x,
|
|
27
|
+
maxValue: h
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
V as useChartValues
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { computed as c } from "vue";
|
|
2
|
+
import { useElementSize as u } from "@vueuse/core";
|
|
3
|
+
const a = (o, s, n) => {
|
|
4
|
+
const t = u(s);
|
|
5
|
+
return {
|
|
6
|
+
position: c(() => {
|
|
7
|
+
if (!o.value || !n.value)
|
|
8
|
+
return { top: 0, left: 0 };
|
|
9
|
+
const i = o.value.getBoundingClientRect(), { caretX: F, caretY: e } = n.value, E = F + t.width.value + 20 >= i.width, _ = e + t.height.value + -20 >= i.height;
|
|
10
|
+
return {
|
|
11
|
+
left: F + (E ? -(t.width.value + 20) : 20),
|
|
12
|
+
top: e + (_ ? -1 * Math.min(
|
|
13
|
+
e - 8,
|
|
14
|
+
t.height.value + 8
|
|
15
|
+
) : -20)
|
|
16
|
+
};
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
a as useTooltipPosition
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const E = "#fcfcfc", L = "#E4E4E4", _ = "#646464", C = {
|
|
2
|
+
size: 12,
|
|
3
|
+
weight: 400,
|
|
4
|
+
family: "Inter"
|
|
5
|
+
}, I = [
|
|
6
|
+
"#80BCFE",
|
|
7
|
+
"#9999FF",
|
|
8
|
+
"#5883E4",
|
|
9
|
+
"#80CBC4",
|
|
10
|
+
"#FFC670"
|
|
11
|
+
], O = 4, c = 1, t = 5;
|
|
12
|
+
export {
|
|
13
|
+
I as COLOR_PALETTE,
|
|
14
|
+
t as DEFAULT_MAX_VISIBLE,
|
|
15
|
+
c as DEFAULT_MIN_VISIBLE,
|
|
16
|
+
O as DEFAULT_TICK_COUNT,
|
|
17
|
+
L as GRID_LINE_COLOR,
|
|
18
|
+
E as POINT_BORDER_COLOR,
|
|
19
|
+
_ as TICK_LABEL_COLOR,
|
|
20
|
+
C as TICK_LABEL_FONT
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
id: "hoverVerticalLine",
|
|
3
|
+
beforeDraw: (t) => {
|
|
4
|
+
if (t.getActiveElements().length) {
|
|
5
|
+
const o = t.getActiveElements()[0], n = t.chartArea, e = t.ctx;
|
|
6
|
+
e.save(), e.beginPath(), e.moveTo(o.element.x, n.top), e.lineTo(o.element.x, n.bottom), e.lineWidth = 1, e.strokeStyle = "rgba(0,0,0, 0.1)", e.stroke(), e.restore();
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
i as HoverVerticalLine
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const s = "N/A", r = (n, e, t) => n.toLocaleString("en", {
|
|
2
|
+
minimumFractionDigits: e,
|
|
3
|
+
maximumFractionDigits: t
|
|
4
|
+
}), u = (n, e = s) => {
|
|
5
|
+
const t = Number(n), a = t % 1 !== 0;
|
|
6
|
+
return isNaN(t) && e ? e : Math.abs(t) >= 1e12 ? "∞" : Math.abs(t) >= 1e9 ? `${r(t / 1e9, 0, 1)}B` : Math.abs(t) >= 1e6 ? `${r(t / 1e6, 0, 1)}M` : Math.abs(t) >= 1e3 ? `${r(t / 1e3, 0, 1)}K` : a && Math.abs(t) >= 100 ? r(t, 0, 0) : a && Math.abs(t) >= 10 ? r(t, 0, 1) : a ? r(t, 2, 2) : r(t, 0, 0);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
s as DEFAULT_FALLBACK,
|
|
10
|
+
u as formatNumber
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { format as f } from "date-fns";
|
|
2
|
+
import { formatNumber as m } from "./formatNumber.js";
|
|
3
|
+
const p = (r, t, e) => {
|
|
4
|
+
if (e === 0)
|
|
5
|
+
return 0;
|
|
6
|
+
const n = t - r, o = n / e * 0.4;
|
|
7
|
+
return (n + o) / e;
|
|
8
|
+
}, M = (r, t) => t === "number" ? m(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "dd MMM yyyy") : String(r);
|
|
9
|
+
export {
|
|
10
|
+
p as calcStepSize,
|
|
11
|
+
M as formatValue
|
|
12
|
+
};
|