@ironsource/shared-ui 2.2.0-test.2 → 2.2.0-test.4
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/AppHeader.vue_vue_type_style_index_0_scoped_4c813f30_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_a59af1ad_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_22477735_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_9a603520_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_3673e156_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_9fa1921a_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_35c79635_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/components/appHeader/AppHeader.vue.js +2 -2
- package/components/appHeader/AppHeader.vue2.js +1 -1
- package/components/button/v3/Button.vue.d.ts +6 -6
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/button/v4/IconButtonV4.vue2.js +1 -46
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +5 -0
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +10 -8
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +73 -49
- package/components/chart/ChartPlane.vue.d.ts +5 -0
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +33 -31
- package/components/chart/ChartStoryArgs.d.ts +6 -0
- package/components/chart/index.d.ts +20 -1
- package/components/chip/v4/ChipV4.vue2.js +1 -1
- package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
- package/components/emptyState/v3/index.d.ts +7 -7
- package/components/includeExclude/index.d.ts +16 -16
- package/components/inlineCopy/InlineCopy.vue.d.ts +15 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +80 -51
- package/components/inlineCopy/index.d.ts +27 -0
- package/components/popover/v3/Popover.vue2.js +1 -38
- package/components/radioButton/v3/RadioButton.vue2.js +1 -82
- package/components/radioButton/v3/RadioGroup.vue2.js +1 -29
- package/components/radioButton/v4/RadioButtonV4.vue2.js +1 -80
- package/components/radioButton/v4/RadioGroupV4.vue2.js +1 -29
- package/components/snackbar/common/notify.js +25 -25
- package/components/snackbar/common/snackbar.common.js +19 -19
- package/components/snackbar/common/snackbar.types.d.ts +2 -1
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +8 -1
- package/components/snackbar/v4/SnackbarV4.vue.js +2 -2
- package/components/snackbar/v4/SnackbarV4.vue2.js +85 -64
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +59 -59
- package/components/table-cells/v3/Editable.vue.d.ts +1 -1
- package/components/table-cells/v3/index.d.ts +20 -20
- package/components/table-cells/v4/EditableV4.vue.d.ts +1 -1
- package/components/table-cells/v4/EditableV4.vue2.js +1 -57
- package/components/table-cells/v4/index.d.ts +20 -20
- package/design-foundation.stories/colors/ColorsData.d.ts +1 -0
- package/index.d.ts +94 -40
- package/index.js +1 -1
- package/package.json +1 -1
- package/style/v4/colors.scss +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/AppHeader.vue_vue_type_style_index_0_scoped_9202b5db_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_afe44a65_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_lang.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../Chart.
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_22477735_lang.css"; import { defineComponent as P, ref as U, computed as d, openBlock as n, createElementBlock as b, Fragment as S, createBlock as D, unref as l, isRef as y, withCtx as s, renderSlot as u, createCommentVNode as A, createElementVNode as L, mergeProps as g, normalizeClass as $, createVNode as k, createSlots as M, renderList as R } from "vue";
|
|
2
2
|
import { useVModel as B } from "@vueuse/core";
|
|
3
3
|
import K from "./ChartLegend.vue.js";
|
|
4
4
|
import X from "./SettingsHeader.vue.js";
|
|
@@ -30,6 +30,7 @@ const at = {
|
|
|
30
30
|
withAnimation: { type: Boolean, default: !0 },
|
|
31
31
|
totalsChart: { type: Boolean, default: !1 },
|
|
32
32
|
tooltipTotalType: { default: _.Total },
|
|
33
|
+
headerTooltip: { default: null },
|
|
33
34
|
tooltipTotalCalcFn: { type: Function, default: tt },
|
|
34
35
|
tooltipOrder: { default: Q.Legend },
|
|
35
36
|
valueSuffix: { default: "" },
|
|
@@ -63,7 +64,7 @@ const at = {
|
|
|
63
64
|
},
|
|
64
65
|
emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
|
|
65
66
|
setup(e, { emit: c }) {
|
|
66
|
-
const t = e, r = B(t, "chartType", c), f = B(t, "sortSelected", c), h = U(null), v =
|
|
67
|
+
const t = e, r = B(t, "chartType", c), f = B(t, "sortSelected", c), h = U(null), v = d(() => ({
|
|
67
68
|
dataSets: t.dataSets,
|
|
68
69
|
visibleIds: t.visibleIds,
|
|
69
70
|
parsing: t.parsing,
|
|
@@ -99,12 +100,13 @@ const at = {
|
|
|
99
100
|
valuePrefix: t.valuePrefix,
|
|
100
101
|
indicateIncompleteData: t.indicateIncompleteData,
|
|
101
102
|
tooltipExcludeTotalItem: t.tooltipExcludeTotalItem,
|
|
103
|
+
headerTooltip: t.headerTooltip,
|
|
102
104
|
testId: t.testId
|
|
103
|
-
})), E =
|
|
105
|
+
})), E = d(() => t.dataSets), I = d(() => t.visibleIds), x = d(() => t.extraCharts.length), C = d(() => 1 + x.value), F = (a) => a === x.value - 1, { colorsMap: m } = z({
|
|
104
106
|
dataSets: E,
|
|
105
107
|
visibleIds: I,
|
|
106
108
|
variant: t.colorVariant
|
|
107
|
-
}), w =
|
|
109
|
+
}), w = d(() => t.dataSets.map((a) => ({
|
|
108
110
|
id: a.id,
|
|
109
111
|
label: a.label,
|
|
110
112
|
caption: a.caption || null,
|
|
@@ -116,8 +118,8 @@ const at = {
|
|
|
116
118
|
useFullHeight: t.fullHeight,
|
|
117
119
|
bottomSpacing: t.fullHeightBottomSpacing
|
|
118
120
|
}), O = et(t.testId, p);
|
|
119
|
-
return (a, i) => (
|
|
120
|
-
e.withSettingsHeader ? (
|
|
121
|
+
return (a, i) => (n(), b(S, null, [
|
|
122
|
+
e.withSettingsHeader ? (n(), D(X, {
|
|
121
123
|
key: 0,
|
|
122
124
|
"chart-type": l(r),
|
|
123
125
|
"onUpdate:chart-type": i[0] || (i[0] = (o) => y(r) ? r.value = o : null),
|
|
@@ -154,7 +156,7 @@ const at = {
|
|
|
154
156
|
key: "0"
|
|
155
157
|
} : void 0
|
|
156
158
|
]), 1040, ["chart-type"]),
|
|
157
|
-
(
|
|
159
|
+
(n(!0), b(S, null, R(e.extraCharts, (o, T) => (n(), D(V, g({
|
|
158
160
|
key: T,
|
|
159
161
|
class: "extra-chart-plane"
|
|
160
162
|
}, { ...l(v), ...o }, {
|
|
@@ -165,7 +167,7 @@ const at = {
|
|
|
165
167
|
"test-id": `${e.testId}-${l(p).EXTRA_CHART}-${T}`
|
|
166
168
|
}), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge", "test-id"]))), 128))
|
|
167
169
|
], 2),
|
|
168
|
-
e.hideLegend ? A("", !0) : (
|
|
170
|
+
e.hideLegend ? A("", !0) : (n(), b("section", at, [
|
|
169
171
|
k(K, {
|
|
170
172
|
"sort-selected": l(f),
|
|
171
173
|
"onUpdate:sort-selected": i[2] || (i[2] = (o) => y(f) ? f.value = o : null),
|
|
@@ -3,6 +3,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
3
3
|
chartType: ChartType;
|
|
4
4
|
typeSwitcher: boolean;
|
|
5
5
|
header?: string;
|
|
6
|
+
headerTooltip?: string;
|
|
6
7
|
subheader?: string;
|
|
7
8
|
subheaderTooltip?: {
|
|
8
9
|
header?: string;
|
|
@@ -24,6 +25,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
24
25
|
header: string;
|
|
25
26
|
subheader: string;
|
|
26
27
|
subheaderTooltip: any;
|
|
28
|
+
headerTooltip: any;
|
|
27
29
|
trendTooltip: any;
|
|
28
30
|
compact: boolean;
|
|
29
31
|
trendValue: any;
|
|
@@ -36,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
36
38
|
chartType: ChartType;
|
|
37
39
|
typeSwitcher: boolean;
|
|
38
40
|
header?: string;
|
|
41
|
+
headerTooltip?: string;
|
|
39
42
|
subheader?: string;
|
|
40
43
|
subheaderTooltip?: {
|
|
41
44
|
header?: string;
|
|
@@ -57,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
57
60
|
header: string;
|
|
58
61
|
subheader: string;
|
|
59
62
|
subheaderTooltip: any;
|
|
63
|
+
headerTooltip: any;
|
|
60
64
|
trendTooltip: any;
|
|
61
65
|
compact: boolean;
|
|
62
66
|
trendValue: any;
|
|
@@ -74,6 +78,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
74
78
|
subheader: string;
|
|
75
79
|
subheaderTooltip: any;
|
|
76
80
|
typeSwitcher: boolean;
|
|
81
|
+
headerTooltip: string;
|
|
77
82
|
trendValue: string | number;
|
|
78
83
|
trendDirection: TrendDirection;
|
|
79
84
|
noteText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartHeader.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartHeader.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_9a603520_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-9a603520"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,93 +1,117 @@
|
|
|
1
|
-
import "../../ChartHeader.
|
|
2
|
-
import
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_9a603520_lang.css"; import { defineComponent as g, computed as c, openBlock as r, createElementBlock as B, mergeProps as h, unref as t, createElementVNode as n, createVNode as m, createSlots as E, withCtx as d, renderSlot as H, createBlock as l, createTextVNode as b, toDisplayString as v, createCommentVNode as i, normalizeProps as V, isRef as D } from "vue";
|
|
2
|
+
import k from "../typography/v4/Typography.vue.js";
|
|
3
3
|
import N from "../switch/v4/SwitchV4.vue.js";
|
|
4
|
-
import P from "../
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
4
|
+
import P from "../tooltip/v4/TooltipV4.vue.js";
|
|
5
|
+
import $ from "../chip/v4/ChipV4.vue.js";
|
|
6
|
+
import { ChartType as u, TrendDirection as A } from "./types.js";
|
|
7
|
+
import C from "./ChartHeaderTrend.vue.js";
|
|
8
|
+
import L from "./SubHeader.vue.js";
|
|
9
|
+
import { useTestIdAttrs as R } from "../../utils/testIds.js";
|
|
10
|
+
import { ChartTestIdModifiers as p } from "../../testids/index.js";
|
|
11
|
+
const U = { class: "header-texts" }, z = { class: "header-row" }, M = { class: "header-tooltip" }, O = { class: "header-actions" }, Z = /* @__PURE__ */ g({
|
|
11
12
|
__name: "ChartHeader",
|
|
12
13
|
props: {
|
|
13
|
-
chartType: { default:
|
|
14
|
+
chartType: { default: u.Line },
|
|
14
15
|
typeSwitcher: { type: Boolean, default: !0 },
|
|
15
16
|
header: { default: "" },
|
|
17
|
+
headerTooltip: { default: null },
|
|
16
18
|
subheader: { default: "" },
|
|
17
19
|
subheaderTooltip: { default: null },
|
|
18
20
|
trendTooltip: { default: null },
|
|
19
21
|
compact: { type: Boolean, default: !1 },
|
|
20
22
|
trendValue: { default: null },
|
|
21
|
-
trendDirection: { default:
|
|
23
|
+
trendDirection: { default: A.UP },
|
|
22
24
|
noteText: { default: "" },
|
|
23
25
|
testId: { default: "" }
|
|
24
26
|
},
|
|
25
27
|
emits: ["update:chartType"],
|
|
26
|
-
setup(e, { emit:
|
|
27
|
-
const a = e,
|
|
28
|
-
{ id:
|
|
29
|
-
{ id:
|
|
30
|
-
{ id:
|
|
31
|
-
],
|
|
28
|
+
setup(e, { emit: I }) {
|
|
29
|
+
const a = e, f = [
|
|
30
|
+
{ id: u.Line, icon: "chart-line-up" },
|
|
31
|
+
{ id: u.Bar, icon: "chart-bar" },
|
|
32
|
+
{ id: u.StackedLine, icon: "chart-line" }
|
|
33
|
+
], S = c(() => a.headerTooltip?.length > 0), s = c({
|
|
32
34
|
get() {
|
|
33
|
-
return
|
|
35
|
+
return f.find(({ id: o }) => o === a.chartType);
|
|
34
36
|
},
|
|
35
|
-
set(
|
|
36
|
-
|
|
37
|
+
set(o) {
|
|
38
|
+
I("update:chartType", o.id);
|
|
37
39
|
}
|
|
38
|
-
}),
|
|
40
|
+
}), T = c(() => ({
|
|
39
41
|
value: a.trendValue,
|
|
40
42
|
direction: a.trendDirection,
|
|
41
43
|
trendTooltip: a.trendTooltip,
|
|
42
44
|
testId: a.testId
|
|
43
|
-
})),
|
|
44
|
-
return (
|
|
45
|
+
})), x = R(a.testId, p);
|
|
46
|
+
return (o, y) => (r(), B("div", h({
|
|
45
47
|
class: ["chart-header", { "chart-header--compact": e.compact }]
|
|
46
|
-
}, t(
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
}, t(x)[t(p).HEADER]), [
|
|
49
|
+
n("div", U, [
|
|
50
|
+
m(L, {
|
|
49
51
|
subheader: e.subheader,
|
|
50
52
|
"subheader-tooltip": e.subheaderTooltip,
|
|
51
53
|
"show-separator": e.compact && (!!e.header || !!e.trendValue)
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
+
}, E({ _: 2 }, [
|
|
55
|
+
o.$slots["subheader-tooltip"] ? {
|
|
54
56
|
name: "subheader-tooltip",
|
|
55
|
-
fn:
|
|
56
|
-
|
|
57
|
+
fn: d(() => [
|
|
58
|
+
H(o.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
57
59
|
]),
|
|
58
60
|
key: "0"
|
|
59
61
|
} : void 0
|
|
60
62
|
]), 1032, ["subheader", "subheader-tooltip", "show-separator"]),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
n("div", z, [
|
|
64
|
+
m(t(P), {
|
|
65
|
+
placement: "right",
|
|
66
|
+
disabled: !t(S)
|
|
65
67
|
}, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
tooltip: d(() => [
|
|
69
|
+
n("div", M, [
|
|
70
|
+
e.headerTooltip ? (r(), l(t(k), {
|
|
71
|
+
key: 0,
|
|
72
|
+
variant: "body2",
|
|
73
|
+
class: "header-tooltip__text"
|
|
74
|
+
}, {
|
|
75
|
+
default: d(() => [
|
|
76
|
+
b(v(e.headerTooltip), 1)
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
})) : i("", !0)
|
|
80
|
+
])
|
|
81
|
+
]),
|
|
82
|
+
default: d(() => [
|
|
83
|
+
m(t(k), {
|
|
84
|
+
class: "header-text",
|
|
85
|
+
variant: e.compact ? "h5" : "chart2"
|
|
86
|
+
}, {
|
|
87
|
+
default: d(() => [
|
|
88
|
+
b(v(e.header), 1)
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, ["variant"])
|
|
68
92
|
]),
|
|
69
93
|
_: 1
|
|
70
|
-
}, 8, ["
|
|
71
|
-
!e.compact && e.trendValue !== null ? (
|
|
94
|
+
}, 8, ["disabled"]),
|
|
95
|
+
!e.compact && e.trendValue !== null ? (r(), l(C, V(h({ key: 0 }, t(T))), null, 16)) : i("", !0)
|
|
72
96
|
]),
|
|
73
|
-
e.compact && e.trendValue !== null ? (
|
|
97
|
+
e.compact && e.trendValue !== null ? (r(), l(C, V(h({ key: 0 }, t(T))), null, 16)) : i("", !0)
|
|
74
98
|
]),
|
|
75
|
-
|
|
76
|
-
e.noteText ? (
|
|
99
|
+
n("div", O, [
|
|
100
|
+
e.noteText ? (r(), l(t($), {
|
|
77
101
|
key: 0,
|
|
78
102
|
label: `Note: ${e.noteText}`
|
|
79
|
-
}, null, 8, ["label"])) :
|
|
80
|
-
e.typeSwitcher ? (
|
|
103
|
+
}, null, 8, ["label"])) : i("", !0),
|
|
104
|
+
e.typeSwitcher ? (r(), l(t(N), {
|
|
81
105
|
key: 1,
|
|
82
|
-
modelValue: t(
|
|
83
|
-
"onUpdate:modelValue":
|
|
84
|
-
options:
|
|
85
|
-
"test-id": `${e.testId}-${t(
|
|
86
|
-
}, null, 8, ["modelValue", "test-id"])) :
|
|
106
|
+
modelValue: t(s),
|
|
107
|
+
"onUpdate:modelValue": y[0] || (y[0] = (w) => D(s) ? s.value = w : null),
|
|
108
|
+
options: f,
|
|
109
|
+
"test-id": `${e.testId}-${t(p).TYPE_SWITCHER}`
|
|
110
|
+
}, null, 8, ["modelValue", "test-id"])) : i("", !0)
|
|
87
111
|
])
|
|
88
112
|
], 16));
|
|
89
113
|
}
|
|
90
114
|
});
|
|
91
115
|
export {
|
|
92
|
-
|
|
116
|
+
Z as default
|
|
93
117
|
};
|
|
@@ -12,6 +12,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
12
|
tickCount?: number;
|
|
13
13
|
truncateTickLabels?: boolean;
|
|
14
14
|
header?: string;
|
|
15
|
+
headerTooltip?: string;
|
|
15
16
|
subheader?: string;
|
|
16
17
|
subheaderTooltip?: {
|
|
17
18
|
header?: string;
|
|
@@ -58,6 +59,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
58
59
|
tickCount: number;
|
|
59
60
|
truncateTickLabels: boolean;
|
|
60
61
|
header: string;
|
|
62
|
+
headerTooltip: any;
|
|
61
63
|
subheader: string;
|
|
62
64
|
subheaderTooltip: any;
|
|
63
65
|
keepSubheaderVisible: boolean;
|
|
@@ -99,6 +101,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
99
101
|
tickCount?: number;
|
|
100
102
|
truncateTickLabels?: boolean;
|
|
101
103
|
header?: string;
|
|
104
|
+
headerTooltip?: string;
|
|
102
105
|
subheader?: string;
|
|
103
106
|
subheaderTooltip?: {
|
|
104
107
|
header?: string;
|
|
@@ -145,6 +148,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
145
148
|
tickCount: number;
|
|
146
149
|
truncateTickLabels: boolean;
|
|
147
150
|
header: string;
|
|
151
|
+
headerTooltip: any;
|
|
148
152
|
subheader: string;
|
|
149
153
|
subheaderTooltip: any;
|
|
150
154
|
keepSubheaderVisible: boolean;
|
|
@@ -193,6 +197,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
193
197
|
subheader: string;
|
|
194
198
|
subheaderTooltip: any;
|
|
195
199
|
typeSwitcher: boolean;
|
|
200
|
+
headerTooltip: string;
|
|
196
201
|
trendValue: string | number;
|
|
197
202
|
trendDirection: TrendDirection;
|
|
198
203
|
noteText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartPlane.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartPlane.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-6de5cddb"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
1
|
+
import "../../ChartPlane.vue_vue_type_style_index_0_scoped_6de5cddb_lang.css"; import { defineComponent as ne, useCssVars as se, unref as n, computed as i, ref as E, onMounted as de, watch as v, nextTick as ue, openBlock as p, createElementBlock as S, createVNode as ce, isRef as fe, createSlots as pe, withCtx as he, renderSlot as me, createCommentVNode as L, createElementVNode as R, normalizeStyle as Te, createBlock as I, mergeProps as ve } from "vue";
|
|
2
2
|
import { Chart as V, ArcElement as ye, LineElement as Ce, BarElement as ge, PointElement as be, LineController as xe, BarController as Ae, PieController as ke, ScatterController as Ee, CategoryScale as Se, LinearScale as Le, Filler as Re, Tooltip as Ie } from "chart.js";
|
|
3
3
|
import { HoverVerticalLine as De } from "./plugins/HoverVerticalLine.js";
|
|
4
4
|
import { prepareTickLabel as Be, formatValue as Oe } from "./utils/utils.js";
|
|
5
|
-
import { DEFAULT_TICK_COUNT as Pe, TOTALS_HELPER_KEY as F, LINE_DASH_STYLE as Ne, BASE_COLOR_KEY as M, CHART_PADDING as He, POINT_BORDER_COLOR as we, TICK_LABEL_COLOR as Y, TICK_LABEL_FONT as K, TICKS_EXTRA_PADDING as Ve, GRID_LINE_COLOR as U, HEADER_HEIGHT as Fe, COMPACT_HEADER_HEIGHT as Me, HOVER_AREA_TRANSPARENCY as Ye, HOVER_TRANSPARENCY as y, CHART_ITEM_TRANSPARENCY as Ke, INCOMPLETE_DATA_BAR_TRANSPARENCY as Ue, STACKED_LINE_TRANSPARENCY as
|
|
6
|
-
import { ChartType as d, DateInterval as
|
|
5
|
+
import { DEFAULT_TICK_COUNT as Pe, TOTALS_HELPER_KEY as F, LINE_DASH_STYLE as Ne, BASE_COLOR_KEY as M, CHART_PADDING as He, POINT_BORDER_COLOR as we, TICK_LABEL_COLOR as Y, TICK_LABEL_FONT as K, TICKS_EXTRA_PADDING as Ve, GRID_LINE_COLOR as U, HEADER_HEIGHT as Fe, COMPACT_HEADER_HEIGHT as Me, HOVER_AREA_TRANSPARENCY as Ye, HOVER_TRANSPARENCY as y, CHART_ITEM_TRANSPARENCY as Ke, INCOMPLETE_DATA_BAR_TRANSPARENCY as Ue, STACKED_LINE_TRANSPARENCY as Ge } from "./consts.js";
|
|
6
|
+
import { ChartType as d, DateInterval as _e, TooltipOrder as G, TrendDirection as $e } from "./types.js";
|
|
7
7
|
import { useTooltipPosition as ze } from "./composables/useTooltipPosition.js";
|
|
8
8
|
import We from "./ChartTooltip.vue.js";
|
|
9
9
|
import { hexColorToRgba as h } from "../../utils/color.js";
|
|
@@ -12,7 +12,7 @@ import { useMemoize as Xe, useVModel as je } from "@vueuse/core";
|
|
|
12
12
|
import qe from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
13
13
|
import Je from "./ChartLoader.vue.js";
|
|
14
14
|
import { DEFAULT_CHART_COLOR as Qe } from "./colorPalette.js";
|
|
15
|
-
import { TotalType as
|
|
15
|
+
import { TotalType as _, calculateTotal as et } from "../../utils/totals.js";
|
|
16
16
|
import { isNullOrUndefined as tt } from "../../utils/utils.js";
|
|
17
17
|
import { storeOriginalDatasetColors as at, restoreOriginalDatasetColors as ot } from "./utils/highlightUtils.js";
|
|
18
18
|
import { useTestIdAttrs as lt } from "../../utils/testIds.js";
|
|
@@ -33,10 +33,11 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
33
33
|
parsing: { default: void 0 },
|
|
34
34
|
xAxisFormat: { default: "string" },
|
|
35
35
|
yAxisFormat: { default: "number" },
|
|
36
|
-
xAxisDateInterval: { default:
|
|
36
|
+
xAxisDateInterval: { default: _e.DAILY },
|
|
37
37
|
tickCount: { default: Pe },
|
|
38
38
|
truncateTickLabels: { type: Boolean, default: !1 },
|
|
39
39
|
header: { default: "" },
|
|
40
|
+
headerTooltip: { default: null },
|
|
40
41
|
subheader: { default: "" },
|
|
41
42
|
subheaderTooltip: { default: null },
|
|
42
43
|
keepSubheaderVisible: { type: Boolean, default: !1 },
|
|
@@ -51,9 +52,9 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
51
52
|
compactHeader: { type: Boolean, default: !1 },
|
|
52
53
|
noteText: { default: "" },
|
|
53
54
|
tooltipRespectsTopEdge: { type: Boolean, default: !0 },
|
|
54
|
-
tooltipTotalType: { default:
|
|
55
|
+
tooltipTotalType: { default: _.Total },
|
|
55
56
|
tooltipTotalCalcFn: { type: Function, default: et },
|
|
56
|
-
tooltipOrder: { default:
|
|
57
|
+
tooltipOrder: { default: G.Legend },
|
|
57
58
|
trendValue: { default: null },
|
|
58
59
|
trendDirection: { default: $e.UP },
|
|
59
60
|
trendTooltip: { default: null },
|
|
@@ -69,8 +70,8 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
69
70
|
setup(o, { emit: z }) {
|
|
70
71
|
const e = o;
|
|
71
72
|
se((t) => ({
|
|
72
|
-
|
|
73
|
-
"
|
|
73
|
+
f01f0522: n(oe),
|
|
74
|
+
"77889a5a": o.height
|
|
74
75
|
}));
|
|
75
76
|
const W = Xe(Be);
|
|
76
77
|
V.register(
|
|
@@ -92,13 +93,13 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
92
93
|
() => e.withAnimation ? "" : "none"
|
|
93
94
|
), T = E(null);
|
|
94
95
|
let s = null;
|
|
95
|
-
const D = i(() => e.empty || e.dataSets.length === 0),
|
|
96
|
+
const D = i(() => e.empty || e.dataSets.length === 0), c = i(() => !e.loading && !D.value), g = () => {
|
|
96
97
|
T.value && (s && s.destroy(), s = new V(T.value, P.value));
|
|
97
98
|
}, X = () => {
|
|
98
99
|
s && (s.data.datasets = O.value, s.options = P.value.options, s.update(Z.value));
|
|
99
100
|
};
|
|
100
|
-
de(g), v(() => e.chartType, g), v(
|
|
101
|
-
t && (await
|
|
101
|
+
de(g), v(() => e.chartType, g), v(c, async (t) => {
|
|
102
|
+
t && (await ue(), g());
|
|
102
103
|
}), v(
|
|
103
104
|
[
|
|
104
105
|
() => e.visibleIds,
|
|
@@ -127,7 +128,7 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
127
128
|
), Q = (t) => (r) => {
|
|
128
129
|
const a = r.chart.data.labels.length - 1;
|
|
129
130
|
let l = Ke;
|
|
130
|
-
return e.chartType === d.Bar && e.indicateIncompleteData && r.index === a ? l = Ue : e.chartType === d.StackedLine && (l =
|
|
131
|
+
return e.chartType === d.Bar && e.indicateIncompleteData && r.index === a ? l = Ue : e.chartType === d.StackedLine && (l = Ge), h(t, l);
|
|
131
132
|
}, O = i(() => A.value.map((t, r) => {
|
|
132
133
|
const a = J(t.id), l = b.value ? r !== 0 ? "-1" : "start" : void 0, m = e.indicateIncompleteData ? {
|
|
133
134
|
borderDash: (w) => {
|
|
@@ -152,7 +153,7 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
152
153
|
// store base color for later use
|
|
153
154
|
};
|
|
154
155
|
})), ee = i(
|
|
155
|
-
() => e.tooltipTotalType ===
|
|
156
|
+
() => e.tooltipTotalType === _.Total ? "Total" : "Mean"
|
|
156
157
|
), te = (t) => t.filter(
|
|
157
158
|
(r) => !r.dataset.isTotal
|
|
158
159
|
), P = i(() => ({
|
|
@@ -179,7 +180,7 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
179
180
|
enabled: !1,
|
|
180
181
|
position: "average",
|
|
181
182
|
external: ({ tooltip: t }) => {
|
|
182
|
-
|
|
183
|
+
u.value = { ...t };
|
|
183
184
|
},
|
|
184
185
|
callbacks: {
|
|
185
186
|
footer: (t) => {
|
|
@@ -191,7 +192,7 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
191
192
|
}
|
|
192
193
|
},
|
|
193
194
|
itemSort: (t, r) => {
|
|
194
|
-
if (e.tooltipOrder ===
|
|
195
|
+
if (e.tooltipOrder === G.YAxis) {
|
|
195
196
|
const a = t.parsed.y || 0, l = r.parsed.y || 0;
|
|
196
197
|
return a === l ? 0 : a > l ? -1 : 1;
|
|
197
198
|
}
|
|
@@ -283,15 +284,15 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
|
-
})), N = E(null),
|
|
287
|
+
})), N = E(null), u = E(null), { position: H } = ze(
|
|
287
288
|
T,
|
|
288
289
|
N,
|
|
289
|
-
|
|
290
|
+
u,
|
|
290
291
|
e.tooltipRespectsTopEdge
|
|
291
292
|
), ae = i(() => ({
|
|
292
293
|
left: `${H.value.left}px`,
|
|
293
294
|
top: `${H.value.top}px`,
|
|
294
|
-
opacity:
|
|
295
|
+
opacity: u.value?.opacity || 0
|
|
295
296
|
})), oe = i(
|
|
296
297
|
() => (e.compactHeader ? Me : Fe) + "px"
|
|
297
298
|
);
|
|
@@ -314,17 +315,18 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
314
315
|
(s?.data.datasets || []).forEach(ot);
|
|
315
316
|
}, ie = lt(e.testId, $);
|
|
316
317
|
return (t, r) => (p(), S("div", rt, [
|
|
317
|
-
n(
|
|
318
|
-
|
|
318
|
+
n(c) || o.keepSubheaderVisible ? (p(), S("div", it, [
|
|
319
|
+
ce(Ze, {
|
|
319
320
|
"chart-type": n(C),
|
|
320
321
|
"onUpdate:chart-type": r[0] || (r[0] = (a) => fe(C) ? C.value = a : null),
|
|
321
|
-
"type-switcher": n(
|
|
322
|
-
header: n(
|
|
322
|
+
"type-switcher": n(c) ? o.typeSwitcher : !1,
|
|
323
|
+
header: n(c) ? o.header : null,
|
|
323
324
|
subheader: o.subheader,
|
|
324
325
|
"subheader-tooltip": o.subheaderTooltip,
|
|
326
|
+
"header-tooltip": o.headerTooltip,
|
|
325
327
|
"trend-tooltip": o.trendTooltip,
|
|
326
328
|
compact: o.compactHeader,
|
|
327
|
-
"trend-value": n(
|
|
329
|
+
"trend-value": n(c) ? o.trendValue : null,
|
|
328
330
|
"trend-direction": o.trendDirection,
|
|
329
331
|
"note-text": o.noteText,
|
|
330
332
|
"test-id": o.testId
|
|
@@ -336,9 +338,9 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
336
338
|
]),
|
|
337
339
|
key: "0"
|
|
338
340
|
} : void 0
|
|
339
|
-
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction", "note-text", "test-id"])
|
|
341
|
+
]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "header-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction", "note-text", "test-id"])
|
|
340
342
|
])) : L("", !0),
|
|
341
|
-
n(
|
|
343
|
+
n(c) ? (p(), S("section", nt, [
|
|
342
344
|
R("div", st, [
|
|
343
345
|
R("canvas", {
|
|
344
346
|
ref_key: "chartRef",
|
|
@@ -351,16 +353,16 @@ const rt = { class: "chart-plane-container" }, it = {
|
|
|
351
353
|
class: "chart__tooltip",
|
|
352
354
|
style: Te(n(ae))
|
|
353
355
|
}, [
|
|
354
|
-
|
|
356
|
+
u.value ? (p(), I(We, {
|
|
355
357
|
key: 0,
|
|
356
358
|
"totals-chart": n(f),
|
|
357
|
-
title: String(
|
|
358
|
-
"data-points":
|
|
359
|
+
title: String(u.value.title),
|
|
360
|
+
"data-points": u.value.dataPoints,
|
|
359
361
|
"x-axis-format": o.xAxisFormat,
|
|
360
362
|
"y-axis-format": o.yAxisFormat,
|
|
361
363
|
"x-axis-date-interval": o.xAxisDateInterval,
|
|
362
|
-
"total-label":
|
|
363
|
-
"total-value": Number(
|
|
364
|
+
"total-label": u.value.footer?.[0],
|
|
365
|
+
"total-value": Number(u.value.footer?.[1]),
|
|
364
366
|
"value-suffix": o.valueSuffix,
|
|
365
367
|
"value-prefix": o.valuePrefix,
|
|
366
368
|
"test-id": o.testId
|
|
@@ -27,6 +27,7 @@ declare const ChartTypes: () => ({
|
|
|
27
27
|
trendTooltip: any;
|
|
28
28
|
subheader: string;
|
|
29
29
|
subheaderTooltip: any;
|
|
30
|
+
headerTooltip: string;
|
|
30
31
|
trendValue: string | number;
|
|
31
32
|
trendDirection: TrendDirection;
|
|
32
33
|
noteText: string;
|
|
@@ -146,6 +147,10 @@ declare const ChartTypes: () => ({
|
|
|
146
147
|
}>;
|
|
147
148
|
default: any;
|
|
148
149
|
};
|
|
150
|
+
headerTooltip: {
|
|
151
|
+
type: import("vue").PropType<string>;
|
|
152
|
+
default: any;
|
|
153
|
+
};
|
|
149
154
|
trendValue: {
|
|
150
155
|
type: import("vue").PropType<string | number>;
|
|
151
156
|
default: any;
|
|
@@ -239,7 +244,7 @@ declare const ChartTypes: () => ({
|
|
|
239
244
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
240
245
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
241
246
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
242
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "testId" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "noteText" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "indicateIncompleteData" | "tooltipExcludeTotalItem" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts" | "colorVariant">;
|
|
247
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "testId" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "headerTooltip" | "trendValue" | "trendDirection" | "noteText" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "indicateIncompleteData" | "tooltipExcludeTotalItem" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts" | "colorVariant">;
|
|
243
248
|
$attrs: {
|
|
244
249
|
[x: string]: unknown;
|
|
245
250
|
};
|
|
@@ -350,6 +355,10 @@ declare const ChartTypes: () => ({
|
|
|
350
355
|
}>;
|
|
351
356
|
default: any;
|
|
352
357
|
};
|
|
358
|
+
headerTooltip: {
|
|
359
|
+
type: import("vue").PropType<string>;
|
|
360
|
+
default: any;
|
|
361
|
+
};
|
|
353
362
|
trendValue: {
|
|
354
363
|
type: import("vue").PropType<string | number>;
|
|
355
364
|
default: any;
|
|
@@ -470,6 +479,7 @@ declare const ChartTypes: () => ({
|
|
|
470
479
|
trendTooltip: any;
|
|
471
480
|
subheader: string;
|
|
472
481
|
subheaderTooltip: any;
|
|
482
|
+
headerTooltip: string;
|
|
473
483
|
trendValue: string | number;
|
|
474
484
|
trendDirection: TrendDirection;
|
|
475
485
|
noteText: string;
|
|
@@ -609,6 +619,10 @@ declare const ChartTypes: () => ({
|
|
|
609
619
|
}>;
|
|
610
620
|
default: any;
|
|
611
621
|
};
|
|
622
|
+
headerTooltip: {
|
|
623
|
+
type: import("vue").PropType<string>;
|
|
624
|
+
default: any;
|
|
625
|
+
};
|
|
612
626
|
trendValue: {
|
|
613
627
|
type: import("vue").PropType<string | number>;
|
|
614
628
|
default: any;
|
|
@@ -803,6 +817,10 @@ declare const ChartTypes: () => ({
|
|
|
803
817
|
}>;
|
|
804
818
|
default: any;
|
|
805
819
|
};
|
|
820
|
+
headerTooltip: {
|
|
821
|
+
type: import("vue").PropType<string>;
|
|
822
|
+
default: any;
|
|
823
|
+
};
|
|
806
824
|
trendValue: {
|
|
807
825
|
type: import("vue").PropType<string | number>;
|
|
808
826
|
default: any;
|
|
@@ -923,6 +941,7 @@ declare const ChartTypes: () => ({
|
|
|
923
941
|
trendTooltip: any;
|
|
924
942
|
subheader: string;
|
|
925
943
|
subheaderTooltip: any;
|
|
944
|
+
headerTooltip: string;
|
|
926
945
|
trendValue: string | number;
|
|
927
946
|
trendDirection: TrendDirection;
|
|
928
947
|
noteText: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../ChipV4.vue_vue_type_style_index_0_scoped_a221c649_lang.css"; import { defineComponent as i, openBlock as o, createElementBlock as d, mergeProps as s, unref as t, renderSlot as c, createVNode as f, withCtx as n, createTextVNode as p, toDisplayString as u } from "vue";
|
|
1
|
+
import "../../../ChipV4.vue_vue_type_style_index_0_scoped_a221c649_lang.css"; import "../../../ChipV4.vue_vue_type_style_index_0_scoped_a221c649_lang.css"; import { defineComponent as i, openBlock as o, createElementBlock as d, mergeProps as s, unref as t, renderSlot as c, createVNode as f, withCtx as n, createTextVNode as p, toDisplayString as u } from "vue";
|
|
2
2
|
import { ChipTestIdModifiers as a } from "../../../testids/index.js";
|
|
3
3
|
import { useTestIdAttrs as m } from "../../../utils/testIds.js";
|
|
4
4
|
import h from "../../typography/v4/Typography.vue.js";
|