@ironsource/shared-ui 2.1.7-rc.1 → 2.1.7-rc.3
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/index.d.ts +0 -1
- package/package.json +1 -5
- package/src/index.js +69 -73
- package/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css +0 -1
- package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
- package/src/components/chart/Chart.vue.js +0 -7
- package/src/components/chart/Chart.vue2.js +0 -281
- package/src/components/chart/ChartHeader.vue.js +0 -7
- package/src/components/chart/ChartHeader.vue2.js +0 -51
- package/src/components/chart/ChartLegend.vue.js +0 -7
- package/src/components/chart/ChartLegend.vue2.js +0 -65
- package/src/components/chart/ChartLoader.vue.js +0 -25
- package/src/components/chart/ChartTooltip.vue.js +0 -7
- package/src/components/chart/ChartTooltip.vue2.js +0 -81
- package/src/components/chart/composables/useChartValues.js +0 -32
- package/src/components/chart/composables/useTooltipPosition.js +0 -22
- package/src/components/chart/consts.js +0 -21
- package/src/components/chart/index.js +0 -6
- package/src/components/chart/plugins/HoverVerticalLine.js +0 -12
- package/src/components/chart/types.js +0 -4
- package/src/components/chart/utils/formatNumber.js +0 -11
- package/src/components/chart/utils/utils.js +0 -12
package/index.d.ts
CHANGED
|
@@ -21395,4 +21395,3 @@ export * from '@/composables/useFormValidation';
|
|
|
21395
21395
|
export * from '@/components/banner';
|
|
21396
21396
|
export * from '@/components/alert';
|
|
21397
21397
|
export * from '@/components/autocomplete';
|
|
21398
|
-
export * from '@/components/chart';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ironsource/shared-ui",
|
|
3
|
-
"version": "2.1.7-rc.
|
|
3
|
+
"version": "2.1.7-rc.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"npm": ">=7.0.0",
|
|
6
6
|
"node": ">=16.0.0"
|
|
@@ -148,7 +148,6 @@
|
|
|
148
148
|
"./appTrigger": "./components/appTrigger/AppTrigger.vue.js",
|
|
149
149
|
"./autocompleteDropdown": "./components/autocompleteDropdown/AutocompleteDropdown.vue.js",
|
|
150
150
|
"./autocomplete": "./components/autocomplete/index.js",
|
|
151
|
-
"./chart": "./components/chart/index.js",
|
|
152
151
|
"./menuItem": "./components/menuItem/MenuItem.vue.js",
|
|
153
152
|
"./menu": "./components/menu/Menu.vue.js",
|
|
154
153
|
".": {
|
|
@@ -241,9 +240,6 @@
|
|
|
241
240
|
"autocomplete": [
|
|
242
241
|
"./components/autocomplete/index.d.ts"
|
|
243
242
|
],
|
|
244
|
-
"chart": [
|
|
245
|
-
"./components/chart/index.d.ts"
|
|
246
|
-
],
|
|
247
243
|
"menuItem": [
|
|
248
244
|
"./components/menuItem/MenuItem.vue.d.ts"
|
|
249
245
|
],
|
package/src/index.js
CHANGED
|
@@ -11,9 +11,9 @@ import { ID_INJECTION_KEY as $o, useId as To } from "./composables/useId.js";
|
|
|
11
11
|
import { FilterDropdownTypes as yo } from "./components/filterDropdown/index.js";
|
|
12
12
|
import { TypographyTypes as Fo } from "./components/typography/index.js";
|
|
13
13
|
import { TypographyTypesV4 as Ao } from "./components/typography/v4/index.js";
|
|
14
|
-
import { PopoverTypes as
|
|
14
|
+
import { PopoverTypes as Bo } from "./components/popover/index.js";
|
|
15
15
|
import { MultiBarTypes as Do } from "./components/multibar/index.js";
|
|
16
|
-
import { FoldableSectionTypes as
|
|
16
|
+
import { FoldableSectionTypes as bo } from "./components/layout/index.js";
|
|
17
17
|
import { FormCardTypes as wo, FormFieldTypes as vo } from "./components/forms/index.js";
|
|
18
18
|
import * as o from "./components/button/v3/index.js";
|
|
19
19
|
import * as r from "./components/button/v4/index.js";
|
|
@@ -39,12 +39,12 @@ import * as F from "./components/dialog/v3/index.js";
|
|
|
39
39
|
import * as I from "./components/dialog/v4/index.js";
|
|
40
40
|
import * as A from "./components/toggle/v3/index.js";
|
|
41
41
|
import * as E from "./components/toggle/v4/index.js";
|
|
42
|
-
import * as
|
|
43
|
-
import * as
|
|
42
|
+
import * as B from "./components/tooltip/v3/index.js";
|
|
43
|
+
import * as C from "./components/tooltip/v4/index.js";
|
|
44
44
|
import * as D from "./components/table/v3/index.js";
|
|
45
|
-
import * as
|
|
46
|
-
import * as
|
|
47
|
-
import * as
|
|
45
|
+
import * as M from "./components/table/v4/index.js";
|
|
46
|
+
import * as b from "./components/table-cells/v3/index.js";
|
|
47
|
+
import * as h from "./components/table-cells/v4/index.js";
|
|
48
48
|
import * as w from "./components/skeleton/v3/index.js";
|
|
49
49
|
import * as v from "./components/skeleton/v4/index.js";
|
|
50
50
|
import * as H from "./components/emptyState/v3/index.js";
|
|
@@ -70,37 +70,35 @@ import { scrollToElementByClass as Vo, scrollToFirstInvalidElement as Jo, useFor
|
|
|
70
70
|
import { BannerTypes as ko } from "./components/banner/index.js";
|
|
71
71
|
import { AlertTypes as zo } from "./components/alert/index.js";
|
|
72
72
|
import { AutocompleteTypes as Lo } from "./components/autocomplete/index.js";
|
|
73
|
-
import {
|
|
74
|
-
import { default as Uo } from "./components/
|
|
75
|
-
import { default as Xo } from "./components/
|
|
76
|
-
import { default as or } from "./components/
|
|
77
|
-
import { default as er } from "./components/
|
|
78
|
-
import { default as mr } from "./components/
|
|
79
|
-
import { default as ar } from "./components/
|
|
80
|
-
import { default as ir } from "./components/includeExclude/
|
|
81
|
-
import { default as sr } from "./components/includeExclude/
|
|
82
|
-
import { default as nr } from "./components/includeExclude/
|
|
83
|
-
import { default as ur } from "./components/includeExclude/
|
|
84
|
-
import { default as Tr } from "./components/includeExclude/
|
|
85
|
-
import { default as yr } from "./components/includeExclude/
|
|
86
|
-
import { default as Fr } from "./components/
|
|
87
|
-
import { default as Ar } from "./components/
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as Dr } from "./components/
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as wr } from "./components/typography/
|
|
92
|
-
import { default as Hr } from "./components/
|
|
93
|
-
import { default as Or } from "./components/
|
|
94
|
-
import { default as Sr } from "./components/
|
|
95
|
-
import { default as Jr } from "./components/
|
|
96
|
-
import { default as _r } from "./components/forms/
|
|
97
|
-
import { default as kr } from "./components/forms/
|
|
98
|
-
import { default as zr } from "./components/forms/
|
|
99
|
-
import { default as Lr } from "./components/
|
|
100
|
-
import { default as Yr } from "./components/
|
|
101
|
-
import { default as Ur } from "./components/
|
|
102
|
-
import { default as Xr } from "./components/autocomplete/Autocomplete.vue.js";
|
|
103
|
-
import { default as oe } from "./components/chart/Chart.vue.js";
|
|
73
|
+
import { default as Yo } from "./components/appTrigger/AppTrigger.vue.js";
|
|
74
|
+
import { default as Uo } from "./components/autocompleteDropdown/AutocompleteDropdown.vue.js";
|
|
75
|
+
import { default as Xo } from "./components/menuItem/MenuItem.vue.js";
|
|
76
|
+
import { default as or } from "./components/menu/Menu.vue.js";
|
|
77
|
+
import { default as er } from "./components/appIcon/AppIcon.vue.js";
|
|
78
|
+
import { default as mr } from "./components/floatingToolbar/FloatingToolbar.vue.js";
|
|
79
|
+
import { default as ar } from "./components/includeExclude/IncludeExclude.vue.js";
|
|
80
|
+
import { default as ir } from "./components/includeExclude/IncludeExcludeDragDrop.vue.js";
|
|
81
|
+
import { default as sr } from "./components/includeExclude/IncludeExcludeOption.vue.js";
|
|
82
|
+
import { default as nr } from "./components/includeExclude/IncludeExcludeOptionDraggable.vue.js";
|
|
83
|
+
import { default as ur } from "./components/includeExclude/IncludeExcludeAppTrigger.vue.js";
|
|
84
|
+
import { default as Tr } from "./components/includeExclude/IncludeExcludeAppHeader.vue.js";
|
|
85
|
+
import { default as yr } from "./components/includeExclude/IncludeExcludeChipFilter.vue.js";
|
|
86
|
+
import { default as Fr } from "./components/cssBaseline/CssBaseline.vue.js";
|
|
87
|
+
import { default as Ar } from "./components/filterDropdown/FilterDropdown.vue.js";
|
|
88
|
+
import { default as Br } from "./components/filterDropdown/AddFilterButton.vue.js";
|
|
89
|
+
import { default as Dr } from "./components/typography/Heading.vue.js";
|
|
90
|
+
import { default as br } from "./components/typography/Text.vue.js";
|
|
91
|
+
import { default as wr } from "./components/typography/v4/Typography.vue.js";
|
|
92
|
+
import { default as Hr } from "./components/popover/Popover.vue.js";
|
|
93
|
+
import { default as Or } from "./components/multibar/MultiBar.vue.js";
|
|
94
|
+
import { default as Sr } from "./components/layout/FoldableSection.vue.js";
|
|
95
|
+
import { default as Jr } from "./components/forms/FormRow.vue.js";
|
|
96
|
+
import { default as _r } from "./components/forms/FormCard.vue.js";
|
|
97
|
+
import { default as kr } from "./components/forms/CardPanel.vue.js";
|
|
98
|
+
import { default as zr } from "./components/forms/FormField.vue.js";
|
|
99
|
+
import { default as Lr } from "./components/banner/Banner.vue.js";
|
|
100
|
+
import { default as Yr } from "./components/alert/Alert.vue.js";
|
|
101
|
+
import { default as Ur } from "./components/autocomplete/Autocomplete.vue.js";
|
|
104
102
|
const Q = {
|
|
105
103
|
...e,
|
|
106
104
|
...t,
|
|
@@ -122,14 +120,14 @@ const Q = {
|
|
|
122
120
|
...g,
|
|
123
121
|
...F,
|
|
124
122
|
...I,
|
|
125
|
-
...C,
|
|
126
123
|
...B,
|
|
124
|
+
...C,
|
|
127
125
|
...A,
|
|
128
126
|
...E,
|
|
129
127
|
...D,
|
|
130
|
-
...h,
|
|
131
128
|
...M,
|
|
132
129
|
...b,
|
|
130
|
+
...h,
|
|
133
131
|
...H,
|
|
134
132
|
...N,
|
|
135
133
|
...w,
|
|
@@ -153,55 +151,53 @@ const Q = {
|
|
|
153
151
|
...Y
|
|
154
152
|
};
|
|
155
153
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
Br as AddFilterButton,
|
|
155
|
+
Yr as Alert,
|
|
158
156
|
zo as AlertTypes,
|
|
159
|
-
|
|
157
|
+
er as AppIcon,
|
|
160
158
|
ao as AppIconTypes,
|
|
161
|
-
|
|
159
|
+
Yo as AppTrigger,
|
|
162
160
|
X as AppTriggerTypes,
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
Ur as Autocomplete,
|
|
162
|
+
Uo as AutocompleteDropdown,
|
|
165
163
|
oo as AutocompleteDropdownTypes,
|
|
166
164
|
Lo as AutocompleteTypes,
|
|
167
|
-
|
|
165
|
+
Lr as Banner,
|
|
168
166
|
ko as BannerTypes,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Yo as ChartTypes,
|
|
172
|
-
Ar as CssBaseline,
|
|
167
|
+
kr as CardPanel,
|
|
168
|
+
Fr as CssBaseline,
|
|
173
169
|
lo as CssBaselineTypes,
|
|
174
|
-
|
|
170
|
+
Ar as FilterDropdown,
|
|
175
171
|
yo as FilterDropdownTypes,
|
|
176
|
-
|
|
172
|
+
mr as FloatingToolbar,
|
|
177
173
|
io as FloatingToolbarTypes,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
Sr as FoldableSection,
|
|
175
|
+
bo as FoldableSectionTypes,
|
|
176
|
+
_r as FormCard,
|
|
181
177
|
wo as FormCardTypes,
|
|
182
|
-
|
|
178
|
+
zr as FormField,
|
|
183
179
|
vo as FormFieldTypes,
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
Jr as FormRow,
|
|
181
|
+
Dr as Heading,
|
|
186
182
|
$o as ID_INJECTION_KEY,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
183
|
+
ar as IncludeExclude,
|
|
184
|
+
Tr as IncludeExcludeAppHeader,
|
|
185
|
+
ur as IncludeExcludeAppTrigger,
|
|
186
|
+
yr as IncludeExcludeChipFilter,
|
|
187
|
+
ir as IncludeExcludeDragDrop,
|
|
188
|
+
sr as IncludeExcludeOption,
|
|
189
|
+
nr as IncludeExcludeOptionDraggable,
|
|
194
190
|
xo as IncludeExcludeTypes,
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
or as Menu,
|
|
192
|
+
Xo as MenuItem,
|
|
197
193
|
eo as MenuItemTypes,
|
|
198
194
|
mo as MenuTypes,
|
|
199
|
-
|
|
195
|
+
Or as MultiBar,
|
|
200
196
|
Do as MultiBarTypes,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
Hr as Popover,
|
|
198
|
+
Bo as PopoverTypes,
|
|
199
|
+
br as Text,
|
|
200
|
+
wr as Typography,
|
|
205
201
|
Fo as TypographyTypes,
|
|
206
202
|
Ao as TypographyTypesV4,
|
|
207
203
|
Q as default,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-f06a4764]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px}.header-wrapper[data-v-f06a4764]{height:76px}.chart-content[data-v-f06a4764]{flex:1}.chart-sidebar[data-v-f06a4764]{border-left:1px solid var(--common-divider)}.chart[data-v-f06a4764]{width:100%;height:312px;position:relative}.chart__canvas[data-v-f06a4764]{width:100%;height:100%}.chart__tooltip[data-v-f06a4764]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-header[data-v-88d4532f]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.header-texts[data-v-88d4532f]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px}.type-switch[data-v-88d4532f]{display:flex;align-items:center;gap:4px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-legend[data-v-efc608f9]{display:flex;flex-direction:column;width:220px;height:100%;padding-bottom:8px}.search-box[data-v-efc608f9]{padding:12px 12px 4px}.legend[data-v-efc608f9]{overflow-y:auto;color:var(--text-primary)}.legend__list[data-v-efc608f9]{list-style:none;padding:0 12px 0 20px}.legend__list>li[data-v-efc608f9]{display:flex;align-items:center;gap:8px;height:32px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.label[data-v-142c444a]{color:#41454d}.chart-loader[data-v-142c444a]{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:80px 31px 31px}.chart-loader[data-v-142c444a]:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0));animation:shimmer-142c444a 2s infinite;content:""}@keyframes shimmer-142c444a{to{transform:translate(100%)}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-tooltip[data-v-ec636f18]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);padding:calc(var(--spacing-100) - 1px)}.tooltip-title[data-v-ec636f18]{color:var(--text-primary);margin-bottom:var(--spacing-100)}.color-box[data-v-ec636f18]{width:var(--spacing-150);height:var(--spacing-150);border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.list[data-v-ec636f18]{list-style:none;margin:0;padding:0}.list__item[data-v-ec636f18]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-ec636f18]:last-child{margin-bottom:0}.tooltip-footer[data-v-ec636f18]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-ec636f18]{flex-grow:1}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import o from "./Chart.vue2.js";
|
|
2
|
-
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
console.log('scoped// import "../../Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css"; //*');
|
|
4
|
-
const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-f06a4764"]]);
|
|
5
|
-
export {
|
|
6
|
-
a as default
|
|
7
|
-
};
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
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 "../../../node_modules/chart.js/dist/chart.js";
|
|
4
|
-
import { HoverVerticalLine as de } from "./plugins/HoverVerticalLine.js";
|
|
5
|
-
import { formatValue as _, 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 D, TICK_LABEL_FONT as F, 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 xe from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
-
const Le = { 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 x = r(() => e.dataSets.length === 0), L = r(() => !e.loading && !x.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(L, 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: D,
|
|
162
|
-
font: F,
|
|
163
|
-
padding: 4,
|
|
164
|
-
callback: function(t) {
|
|
165
|
-
return _(
|
|
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: D,
|
|
190
|
-
font: F,
|
|
191
|
-
padding: 8,
|
|
192
|
-
stepSize: R.value,
|
|
193
|
-
min: E.value,
|
|
194
|
-
max: R.value * e.tickCount,
|
|
195
|
-
callback: (t) => _(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", Le, [
|
|
229
|
-
c(L) ? (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(x) ? (d(), g(c(xe), {
|
|
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "./ChartHeader.vue2.js";
|
|
2
|
-
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
console.log('scoped// 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
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from "./ChartLegend.vue2.js";
|
|
2
|
-
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
console.log('scoped// 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
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
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
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import o from "./ChartTooltip.vue2.js";
|
|
2
|
-
/* empty css */import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
console.log('scoped// 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
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
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
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|