@ironsource/shared-ui 2.1.12-rc.16 → 2.1.12-rc.18

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.
Files changed (50) hide show
  1. package/Chart.vue_vue_type_style_index_0_scoped_5525b3bc_lang.css +1 -0
  2. package/ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css +1 -0
  3. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css +1 -0
  4. package/ChartPlane.vue_vue_type_style_index_0_scoped_fc79a730_lang.css +1 -0
  5. package/ChartTooltip.vue_vue_type_style_index_0_scoped_cb98e9e3_lang.css +1 -0
  6. package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
  7. package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
  8. package/components/chart/Chart.vue.d.ts +26 -6
  9. package/components/chart/Chart.vue.js +4 -4
  10. package/components/chart/Chart.vue2.js +84 -76
  11. package/components/chart/ChartHeader.vue.d.ts +7 -7
  12. package/components/chart/ChartHeader.vue.js +3 -3
  13. package/components/chart/ChartHeader.vue2.js +48 -79
  14. package/components/chart/ChartHeaderTrend.vue.d.ts +6 -5
  15. package/components/chart/ChartHeaderTrend.vue.js +3 -3
  16. package/components/chart/ChartHeaderTrend.vue2.js +15 -14
  17. package/components/chart/ChartPlane.vue.d.ts +27 -7
  18. package/components/chart/ChartPlane.vue.js +3 -3
  19. package/components/chart/ChartPlane.vue2.js +282 -267
  20. package/components/chart/ChartStoryArgs.d.ts +31 -2
  21. package/components/chart/ChartTooltip.vue.d.ts +6 -1
  22. package/components/chart/ChartTooltip.vue.js +3 -3
  23. package/components/chart/ChartTooltip.vue2.js +26 -24
  24. package/components/chart/SubHeader.vue.d.ts +52 -0
  25. package/components/chart/SubHeader.vue.js +7 -0
  26. package/components/chart/SubHeader.vue2.js +61 -0
  27. package/components/chart/{components/TooltipHeader.vue.d.ts → TooltipHeader.vue.d.ts} +6 -1
  28. package/components/chart/TooltipHeader.vue.js +7 -0
  29. package/components/chart/TooltipHeader.vue2.js +69 -0
  30. package/components/chart/colorPalette.d.ts +1 -1
  31. package/components/chart/colorPalette.js +23 -23
  32. package/components/chart/composables/useChartHeight.d.ts +1 -1
  33. package/components/chart/consts.d.ts +12 -12
  34. package/components/chart/consts.js +32 -32
  35. package/components/chart/index.d.ts +109 -32
  36. package/components/chart/mockData.d.ts +8 -0
  37. package/components/chart/types.d.ts +14 -0
  38. package/components/chart/types.js +5 -2
  39. package/components/chart/utils/highlightUtils.d.ts +1 -1
  40. package/components/chart/utils/utils.d.ts +1 -1
  41. package/index.js +12 -8
  42. package/package.json +1 -1
  43. package/Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css +0 -1
  44. package/ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css +0 -1
  45. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css +0 -1
  46. package/ChartPlane.vue_vue_type_style_index_0_scoped_64dcfb5d_lang.css +0 -1
  47. package/ChartTooltip.vue_vue_type_style_index_0_scoped_81cdfd5e_lang.css +0 -1
  48. package/TooltipHeader.vue_vue_type_style_index_0_scoped_40d98a66_lang.css +0 -1
  49. package/components/chart/components/TooltipHeader.vue.js +0 -7
  50. package/components/chart/components/TooltipHeader.vue2.js +0 -59
@@ -0,0 +1 @@
1
+ .chart-container[data-v-5525b3bc]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-5525b3bc]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-5525b3bc]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-5525b3bc]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-5525b3bc]{border-left:1px solid var(--common-divider)}
@@ -0,0 +1 @@
1
+ .chart-header[data-v-da34b108]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.chart-header--compact[data-v-da34b108]{padding-top:22px}.chart-header--compact .header-texts[data-v-da34b108]{flex-direction:row}.chart-header--compact .header-text[data-v-da34b108]{color:var(--text-secondary)}.header-row[data-v-da34b108]{display:flex;align-items:flex-end;gap:4px}.header-texts[data-v-da34b108]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px;cursor:default}
@@ -0,0 +1 @@
1
+ .chart-trend[data-v-79dc2883]{display:flex}.chart-trend--up[data-v-79dc2883]{color:var(--success-contrast-text)}.chart-trend--up .trend-icon[data-v-79dc2883]{color:var(--success-darker)}.chart-trend--down[data-v-79dc2883]{color:var(--error-contrast-text)}.chart-trend--down .trend-icon[data-v-79dc2883]{color:var(--error-dark)}.chart-trend--right[data-v-79dc2883]{color:var(--warning-contrast-text)}.chart-trend--right .trend-icon[data-v-79dc2883]{color:var(--warning-dark)}.trend-icon[data-v-79dc2883]{display:flex;align-self:normal}.chart-trend-tooltip[data-v-79dc2883]{align-items:normal}.trend-tooltip[data-v-79dc2883]{display:flex;flex-direction:column}.trend-tooltip__header[data-v-79dc2883]{margin-bottom:.375rem}.trend-tooltip__text[data-v-79dc2883]{color:var(--text-secondary)}.separator[data-v-79dc2883]{display:flex;align-items:center;gap:.5rem;justify-content:center;height:1.1875rem}.separator__text[data-v-79dc2883]{display:block;color:var(--text-secondary)}.separator hr[data-v-79dc2883]{width:100%;height:1px;border:0;background:var(--common-divider)}
@@ -0,0 +1 @@
1
+ .chart-plane-container[data-v-fc79a730]{--headerHeight: var(--498cf638);width:100%;height:var(--b6d23262);position:relative}.header-wrapper[data-v-fc79a730]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-fc79a730]{padding-top:var(--headerHeight);height:100%}.chart[data-v-fc79a730]{width:100%;height:100%;position:relative}.chart__canvas[data-v-fc79a730]{width:100%;height:100%}.chart__tooltip[data-v-fc79a730]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
@@ -0,0 +1 @@
1
+ .chart-tooltip[data-v-cb98e9e3]{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);width:280px;padding:calc(var(--spacing-100) - 1px)}.color-box[data-v-cb98e9e3]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-cb98e9e3]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-cb98e9e3]{list-style:none;margin:0;padding:0}.list__item[data-v-cb98e9e3]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-cb98e9e3]:last-child{margin-bottom:0}.platform-icon[data-v-cb98e9e3]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-cb98e9e3]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-cb98e9e3]{max-width:90%}.tooltip-footer[data-v-cb98e9e3]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-cb98e9e3]{flex-grow:1}
@@ -0,0 +1 @@
1
+ .header-row[data-v-e6008b6c]{display:flex;align-items:flex-end;gap:4px}.subheader[data-v-e6008b6c]{color:var(--text-secondary)}.subheader-tooltip[data-v-e6008b6c]{display:flex;flex-direction:column;gap:.25rem}.subheader-tooltip__text[data-v-e6008b6c]{color:var(--text-secondary)}
@@ -0,0 +1 @@
1
+ .tooltip-title-wrapper[data-v-3b15c693]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .main-title[data-v-3b15c693]{display:flex;align-items:center;gap:.25rem}.tooltip-title-wrapper .title-text[data-v-3b15c693]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tooltip-title-wrapper .title-image[data-v-3b15c693]{width:20px;height:20px;border-radius:4px}.tooltip-title-wrapper .tooltip-sub-title[data-v-3b15c693]{color:var(--text-secondary)}.tooltip-title-wrapper .platform-icon[data-v-3b15c693]{color:var(--action-active)}
@@ -1,4 +1,4 @@
1
- import { ChartDataSet, ChartParsingConfig, ChartType, ValueFormat } from './types';
1
+ import { ChartDataSet, ChartParsingConfig, ChartType, DateInterval, TooltipOrder, TrendDirection, ValueFormat } from './types';
2
2
  import { TotalType } from '@/utils/totals';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
4
  dataSets: ChartDataSet[];
@@ -7,21 +7,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
7
7
  parsing?: ChartParsingConfig;
8
8
  xAxisFormat?: ValueFormat;
9
9
  yAxisFormat?: ValueFormat;
10
+ xAxisDateInterval?: DateInterval;
10
11
  tickCount?: number;
11
12
  truncateTickLabels?: boolean;
12
13
  loading?: boolean;
14
+ empty?: boolean;
13
15
  withAnimation?: boolean;
14
16
  totalsChart?: boolean;
15
17
  tooltipTotalType?: TotalType;
16
18
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
19
+ tooltipOrder?: TooltipOrder;
17
20
  header?: string;
18
21
  subheader?: string;
19
22
  subheaderTooltip?: {
20
23
  header?: string;
21
24
  text?: string;
22
25
  };
26
+ keepSubheaderVisible?: boolean;
23
27
  trendValue?: string | number;
24
- trendDirection?: "up" | "down";
28
+ trendDirection?: TrendDirection;
25
29
  trendTooltip?: {
26
30
  header?: string;
27
31
  rangeCurrent?: string;
@@ -46,19 +50,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
46
50
  visibleIds: () => any[];
47
51
  xAxisFormat: string;
48
52
  yAxisFormat: string;
53
+ xAxisDateInterval: DateInterval;
49
54
  parsing: any;
50
55
  tickCount: number;
51
56
  truncateTickLabels: boolean;
52
57
  loading: boolean;
58
+ empty: boolean;
53
59
  withAnimation: boolean;
54
60
  totalsChart: boolean;
55
61
  tooltipTotalType: TotalType;
56
62
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
63
+ tooltipOrder: TooltipOrder;
57
64
  header: string;
58
65
  subheader: string;
59
66
  subheaderTooltip: any;
67
+ keepSubheaderVisible: boolean;
60
68
  trendValue: any;
61
- trendDirection: string;
69
+ trendDirection: TrendDirection;
62
70
  trendTooltip: any;
63
71
  noDataIcon: string;
64
72
  noDataTitle: string;
@@ -84,21 +92,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
84
92
  parsing?: ChartParsingConfig;
85
93
  xAxisFormat?: ValueFormat;
86
94
  yAxisFormat?: ValueFormat;
95
+ xAxisDateInterval?: DateInterval;
87
96
  tickCount?: number;
88
97
  truncateTickLabels?: boolean;
89
98
  loading?: boolean;
99
+ empty?: boolean;
90
100
  withAnimation?: boolean;
91
101
  totalsChart?: boolean;
92
102
  tooltipTotalType?: TotalType;
93
103
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
104
+ tooltipOrder?: TooltipOrder;
94
105
  header?: string;
95
106
  subheader?: string;
96
107
  subheaderTooltip?: {
97
108
  header?: string;
98
109
  text?: string;
99
110
  };
111
+ keepSubheaderVisible?: boolean;
100
112
  trendValue?: string | number;
101
- trendDirection?: "up" | "down";
113
+ trendDirection?: TrendDirection;
102
114
  trendTooltip?: {
103
115
  header?: string;
104
116
  rangeCurrent?: string;
@@ -123,19 +135,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
123
135
  visibleIds: () => any[];
124
136
  xAxisFormat: string;
125
137
  yAxisFormat: string;
138
+ xAxisDateInterval: DateInterval;
126
139
  parsing: any;
127
140
  tickCount: number;
128
141
  truncateTickLabels: boolean;
129
142
  loading: boolean;
143
+ empty: boolean;
130
144
  withAnimation: boolean;
131
145
  totalsChart: boolean;
132
146
  tooltipTotalType: TotalType;
133
147
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
148
+ tooltipOrder: TooltipOrder;
134
149
  header: string;
135
150
  subheader: string;
136
151
  subheaderTooltip: any;
152
+ keepSubheaderVisible: boolean;
137
153
  trendValue: any;
138
- trendDirection: string;
154
+ trendDirection: TrendDirection;
139
155
  trendTooltip: any;
140
156
  noDataIcon: string;
141
157
  noDataTitle: string;
@@ -167,6 +183,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
167
183
  chartType: ChartType;
168
184
  hideLegend: boolean;
169
185
  xAxisFormat: ValueFormat;
186
+ xAxisDateInterval: DateInterval;
170
187
  totalsChart: boolean;
171
188
  parsing: ChartParsingConfig;
172
189
  yAxisFormat: ValueFormat;
@@ -175,15 +192,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
175
192
  subheader: string;
176
193
  subheaderTooltip: any;
177
194
  trendValue: string | number;
178
- trendDirection: "up" | "down";
195
+ trendDirection: TrendDirection;
179
196
  tickCount: number;
180
197
  truncateTickLabels: boolean;
198
+ keepSubheaderVisible: boolean;
199
+ empty: boolean;
181
200
  noDataIcon: string;
182
201
  noDataTitle: string;
183
202
  noDataSubtitle: string;
184
203
  withAnimation: boolean;
185
204
  tooltipTotalType: TotalType;
186
205
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
206
+ tooltipOrder: TooltipOrder;
187
207
  fullHeight: boolean;
188
208
  withSettingsHeader: boolean;
189
209
  extraCharts: Record<string, unknown>[];
@@ -1,7 +1,7 @@
1
- import e from "./Chart.vue2.js";
2
- /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css"; //*');
4
- const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4e9ce62f"]]);
1
+ import o from "./Chart.vue2.js";
2
+ /* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../Chart.vue_vue_type_style_index_0_scoped_5525b3bc_lang.css"; //*');
4
+ const c = /* @__PURE__ */ _(o, [["__scopeId", "data-v-5525b3bc"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -1,44 +1,48 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css"; import { defineComponent as E, ref as N, computed as n, openBlock as s, createElementBlock as f, Fragment as x, createBlock as I, unref as l, isRef as y, withCtx as d, renderSlot as u, createCommentVNode as L, createElementVNode as k, mergeProps as g, normalizeClass as M, createVNode as D, createSlots as P, renderList as O } from "vue";
2
- import { useVModel as F } from "@vueuse/core";
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_5525b3bc_lang.css"; import { defineComponent as O, ref as E, computed as n, openBlock as s, createElementBlock as m, Fragment as S, createBlock as I, unref as l, isRef as y, withCtx as d, renderSlot as u, createCommentVNode as D, createElementVNode as k, mergeProps as b, normalizeClass as N, createVNode as L, createSlots as P, renderList as M } from "vue";
2
+ import { useVModel as A } from "@vueuse/core";
3
3
  import $ from "./ChartLegend.vue.js";
4
4
  import K from "./SettingsHeader.vue.js";
5
- import w from "./ChartPlane.vue.js";
5
+ import F from "./ChartPlane.vue.js";
6
6
  import { useColorsMap as z } from "./composables/useColorsMap.js";
7
- import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as j } from "./consts.js";
8
- import { ChartType as q } from "./types.js";
9
- import { useChartHeight as G } from "./composables/useChartHeight.js";
10
- import { TotalType as J, calculateTotal as Q } from "../../utils/totals.js";
11
- const W = {
7
+ import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as Y } from "./consts.js";
8
+ import { ChartType as j, DateInterval as q, TooltipOrder as G, TrendDirection as J } from "./types.js";
9
+ import { useChartHeight as Q } from "./composables/useChartHeight.js";
10
+ import { TotalType as W, calculateTotal as Z } from "../../utils/totals.js";
11
+ const _ = {
12
12
  key: 0,
13
13
  class: "chart-sidebar"
14
- }, nt = /* @__PURE__ */ E({
14
+ }, ue = /* @__PURE__ */ O({
15
15
  __name: "Chart",
16
16
  props: {
17
17
  dataSets: { default: () => [] },
18
18
  visibleIds: { default: () => [] },
19
- chartType: { default: q.Line },
19
+ chartType: { default: j.Line },
20
20
  parsing: { default: void 0 },
21
21
  xAxisFormat: { default: "string" },
22
22
  yAxisFormat: { default: "number" },
23
+ xAxisDateInterval: { default: q.DAILY },
23
24
  tickCount: { default: R },
24
25
  truncateTickLabels: { type: Boolean, default: !0 },
25
26
  loading: { type: Boolean, default: !1 },
27
+ empty: { type: Boolean, default: !1 },
26
28
  withAnimation: { type: Boolean, default: !0 },
27
29
  totalsChart: { type: Boolean, default: !1 },
28
- tooltipTotalType: { default: J.Total },
29
- tooltipTotalCalcFn: { type: Function, default: Q },
30
+ tooltipTotalType: { default: W.Total },
31
+ tooltipTotalCalcFn: { type: Function, default: Z },
32
+ tooltipOrder: { default: G.Legend },
30
33
  header: { default: "" },
31
34
  subheader: { default: "" },
32
35
  subheaderTooltip: { default: null },
36
+ keepSubheaderVisible: { type: Boolean, default: !1 },
33
37
  trendValue: { default: null },
34
- trendDirection: { default: "up" },
38
+ trendDirection: { default: J.UP },
35
39
  trendTooltip: { default: null },
36
40
  noDataIcon: { default: "file-search" },
37
41
  noDataTitle: { default: "No data to display" },
38
42
  noDataSubtitle: { default: "Search again with different filters" },
39
43
  hideLegend: { type: Boolean, default: !1 },
40
44
  minVisible: { default: X },
41
- maxVisible: { default: j },
45
+ maxVisible: { default: Y },
42
46
  maxLimitTooltipText: { default: "" },
43
47
  sortSelected: { default: null },
44
48
  sortOptions: { default: () => [] },
@@ -49,48 +53,52 @@ const W = {
49
53
  },
50
54
  emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
51
55
  setup(i, { emit: p }) {
52
- const t = i, r = F(t, "chartType", p), c = F(t, "sortSelected", p), h = N(null), T = n(() => ({
53
- dataSets: t.dataSets,
54
- visibleIds: t.visibleIds,
55
- parsing: t.parsing,
56
- xAxisFormat: t.xAxisFormat,
57
- yAxisFormat: t.yAxisFormat,
58
- tickCount: t.tickCount,
59
- truncateTickLabels: t.truncateTickLabels,
60
- header: t.header,
61
- subheader: t.subheader,
62
- loading: t.loading,
63
- noDataIcon: t.noDataIcon,
64
- noDataTitle: t.noDataTitle,
65
- noDataSubtitle: t.noDataSubtitle,
66
- withAnimation: t.withAnimation,
67
- typeSwitcher: !t.withSettingsHeader,
56
+ const e = i, r = A(e, "chartType", p), h = A(e, "sortSelected", p), c = E(null), g = n(() => ({
57
+ dataSets: e.dataSets,
58
+ visibleIds: e.visibleIds,
59
+ parsing: e.parsing,
60
+ xAxisFormat: e.xAxisFormat,
61
+ yAxisFormat: e.yAxisFormat,
62
+ xAxisDateInterval: e.xAxisDateInterval,
63
+ tickCount: e.tickCount,
64
+ truncateTickLabels: e.truncateTickLabels,
65
+ header: e.header,
66
+ subheader: e.subheader,
67
+ loading: e.loading,
68
+ empty: e.empty,
69
+ noDataIcon: e.noDataIcon,
70
+ noDataTitle: e.noDataTitle,
71
+ noDataSubtitle: e.noDataSubtitle,
72
+ withAnimation: e.withAnimation,
73
+ typeSwitcher: !e.withSettingsHeader,
68
74
  height: U.value,
69
75
  compactHeader: C.value > 1,
70
- trendValue: t.trendValue,
71
- trendDirection: t.trendDirection,
72
- trendTooltip: t.trendTooltip,
73
- totalsChart: t.totalsChart,
74
- subheaderTooltip: t.subheaderTooltip,
75
- colorsMap: m.value,
76
- tooltipTotalType: t.tooltipTotalType,
77
- tooltipTotalCalcFn: t.tooltipTotalCalcFn,
78
- highlightedId: h.value
79
- })), A = n(() => t.dataSets), b = n(() => t.visibleIds), v = n(() => t.extraCharts.length), C = n(() => 1 + v.value), B = (e) => e === v.value - 1, { colorsMap: m } = z({
80
- dataSets: A,
81
- visibleIds: b
82
- }), V = n(() => t.dataSets.map((e) => ({
83
- id: e.id,
84
- label: e.label,
85
- caption: e.caption || null,
86
- color: m.value[e.id] || null,
87
- icon: e.icon || null,
88
- iconType: e.iconType || "branded"
89
- }))), { containerProps: H, eachPlaneHeight: U } = G({
76
+ trendValue: e.trendValue,
77
+ trendDirection: e.trendDirection,
78
+ trendTooltip: e.trendTooltip,
79
+ totalsChart: e.totalsChart,
80
+ subheaderTooltip: e.subheaderTooltip,
81
+ keepSubheaderVisible: e.keepSubheaderVisible,
82
+ colorsMap: f.value,
83
+ tooltipTotalType: e.tooltipTotalType,
84
+ tooltipTotalCalcFn: e.tooltipTotalCalcFn,
85
+ tooltipOrder: e.tooltipOrder,
86
+ highlightedId: c.value
87
+ })), B = n(() => e.dataSets), T = n(() => e.visibleIds), v = n(() => e.extraCharts.length), C = n(() => 1 + v.value), V = (t) => t === v.value - 1, { colorsMap: f } = z({
88
+ dataSets: B,
89
+ visibleIds: T
90
+ }), w = n(() => e.dataSets.map((t) => ({
91
+ id: t.id,
92
+ label: t.label,
93
+ caption: t.caption || null,
94
+ color: f.value[t.id] || null,
95
+ icon: t.icon || null,
96
+ iconType: t.iconType || "branded"
97
+ }))), { containerProps: H, eachPlaneHeight: U } = Q({
90
98
  chartPlanesCount: C,
91
- useFullHeight: t.fullHeight
99
+ useFullHeight: e.fullHeight
92
100
  });
93
- return (e, o) => (s(), f(x, null, [
101
+ return (t, o) => (s(), m(S, null, [
94
102
  i.withSettingsHeader ? (s(), I(K, {
95
103
  key: 0,
96
104
  "chart-type": l(r),
@@ -98,50 +106,50 @@ const W = {
98
106
  "hide-legend": i.hideLegend
99
107
  }, {
100
108
  "before-chart-type": d(() => [
101
- u(e.$slots, "before-chart-type", {}, void 0, !0)
109
+ u(t.$slots, "before-chart-type", {}, void 0, !0)
102
110
  ]),
103
111
  metric: d(() => [
104
- u(e.$slots, "metric", {}, void 0, !0)
112
+ u(t.$slots, "metric", {}, void 0, !0)
105
113
  ]),
106
114
  breakdowns: d(() => [
107
- u(e.$slots, "breakdowns", {}, void 0, !0)
115
+ u(t.$slots, "breakdowns", {}, void 0, !0)
108
116
  ]),
109
117
  _: 3
110
- }, 8, ["chart-type", "hide-legend"])) : L("", !0),
111
- k("div", g({ class: "chart-container" }, l(H)), [
118
+ }, 8, ["chart-type", "hide-legend"])) : D("", !0),
119
+ k("div", b({ class: "chart-container" }, l(H)), [
112
120
  k("section", {
113
- class: M(["chart-planes", [{ "with-legend": !i.hideLegend }]])
121
+ class: N(["chart-planes", [{ "with-legend": !i.hideLegend }]])
114
122
  }, [
115
- D(w, g({
123
+ L(F, b({
116
124
  "chart-type": l(r),
117
125
  "onUpdate:chart-type": o[1] || (o[1] = (a) => y(r) ? r.value = a : null)
118
- }, l(T)), P({ _: 2 }, [
119
- e.$slots["subheader-tooltip"] ? {
126
+ }, l(g)), P({ _: 2 }, [
127
+ t.$slots["subheader-tooltip"] ? {
120
128
  name: "subheader-tooltip",
121
129
  fn: d(() => [
122
- u(e.$slots, "subheader-tooltip", {}, void 0, !0)
130
+ u(t.$slots, "subheader-tooltip", {}, void 0, !0)
123
131
  ]),
124
132
  key: "0"
125
133
  } : void 0
126
134
  ]), 1040, ["chart-type"]),
127
- (s(!0), f(x, null, O(i.extraCharts, (a, S) => (s(), I(w, g({
128
- key: S,
135
+ (s(!0), m(S, null, M(i.extraCharts, (a, x) => (s(), I(F, b({
136
+ key: x,
129
137
  class: "extra-chart-plane"
130
- }, { ...l(T), ...a }, {
138
+ }, { ...l(g), ...a }, {
131
139
  "chart-type": l(r),
132
- "colors-map": l(m),
140
+ "colors-map": l(f),
133
141
  "type-switcher": !1,
134
- "tooltip-respects-top-edge": !B(S)
142
+ "tooltip-respects-top-edge": !V(x)
135
143
  }), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
136
144
  ], 2),
137
- i.hideLegend ? L("", !0) : (s(), f("section", W, [
138
- D($, {
139
- "sort-selected": l(c),
140
- "onUpdate:sort-selected": o[2] || (o[2] = (a) => y(c) ? c.value = a : null),
141
- "highlighted-id": h.value,
142
- "onUpdate:highlighted-id": o[3] || (o[3] = (a) => h.value = a),
143
- items: l(V),
144
- "visible-ids": l(b),
145
+ i.hideLegend ? D("", !0) : (s(), m("section", _, [
146
+ L($, {
147
+ "sort-selected": l(h),
148
+ "onUpdate:sort-selected": o[2] || (o[2] = (a) => y(h) ? h.value = a : null),
149
+ "highlighted-id": c.value,
150
+ "onUpdate:highlighted-id": o[3] || (o[3] = (a) => c.value = a),
151
+ items: l(w),
152
+ "visible-ids": l(T),
145
153
  "max-limit-tooltip-text": i.maxLimitTooltipText,
146
154
  "sort-options": i.sortOptions,
147
155
  "sort-option-name-key": i.sortOptionNameKey,
@@ -153,5 +161,5 @@ const W = {
153
161
  }
154
162
  });
155
163
  export {
156
- nt as default
164
+ ue as default
157
165
  };
@@ -1,4 +1,4 @@
1
- import { ChartType } from '@/components/chart/types';
1
+ import { ChartType, TrendDirection } from '@/components/chart/types';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
3
  chartType: ChartType;
4
4
  typeSwitcher: boolean;
@@ -15,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
15
15
  };
16
16
  compact: boolean;
17
17
  trendValue?: string | number;
18
- trendDirection?: "up" | "down";
18
+ trendDirection?: TrendDirection;
19
19
  }>, {
20
20
  chartType: ChartType;
21
21
  typeSwitcher: boolean;
@@ -25,7 +25,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
25
25
  trendTooltip: any;
26
26
  compact: boolean;
27
27
  trendValue: any;
28
- trendDirection: string;
28
+ trendDirection: TrendDirection;
29
29
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
30
  "update:chartType": (type: ChartType) => void;
31
31
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -44,7 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
44
44
  };
45
45
  compact: boolean;
46
46
  trendValue?: string | number;
47
- trendDirection?: "up" | "down";
47
+ trendDirection?: TrendDirection;
48
48
  }>, {
49
49
  chartType: ChartType;
50
50
  typeSwitcher: boolean;
@@ -54,7 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
54
54
  trendTooltip: any;
55
55
  compact: boolean;
56
56
  trendValue: any;
57
- trendDirection: string;
57
+ trendDirection: TrendDirection;
58
58
  }>>> & {
59
59
  "onUpdate:chartType"?: (type: ChartType) => any;
60
60
  }, {
@@ -62,11 +62,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
62
62
  compact: boolean;
63
63
  chartType: ChartType;
64
64
  trendTooltip: any;
65
- typeSwitcher: boolean;
66
65
  subheader: string;
67
66
  subheaderTooltip: any;
67
+ typeSwitcher: boolean;
68
68
  trendValue: string | number;
69
- trendDirection: "up" | "down";
69
+ trendDirection: TrendDirection;
70
70
  }>, {
71
71
  "subheader-tooltip"?(_: {}): any;
72
72
  }>;
@@ -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.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css"; //*');
4
- const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1ff0e54f"]]);
3
+ // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css"; //*');
4
+ const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-da34b108"]]);
5
5
  export {
6
- f as default
6
+ r as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import "../../ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css"; import { defineComponent as B, useSlots as g, computed as m, openBlock as r, createElementBlock as N, normalizeClass as D, createElementVNode as n, createVNode as f, unref as t, withCtx as o, renderSlot as L, createBlock as d, createTextVNode as u, toDisplayString as c, createCommentVNode as i, normalizeProps as v, mergeProps as V, isRef as P } from "vue";
2
- import s from "../typography/v4/Typography.vue.js";
3
- import z from "../switch/v4/SwitchV4.vue.js";
4
- import { ChartType as h } from "./types.js";
5
- import E from "../tooltip/v4/TooltipV4.vue.js";
6
- import k from "./ChartHeaderTrend.vue.js";
7
- const H = { class: "header-texts" }, O = { class: "header-row" }, R = { class: "subheader-tooltip" }, U = { class: "header-row" }, I = /* @__PURE__ */ B({
1
+ import "../../ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css"; import { defineComponent as k, computed as h, openBlock as o, createElementBlock as S, normalizeClass as w, createElementVNode as m, createVNode as p, createSlots as C, withCtx as f, renderSlot as B, unref as a, createTextVNode as g, toDisplayString as x, createBlock as n, normalizeProps as y, mergeProps as T, createCommentVNode as i, isRef as D } from "vue";
2
+ import N from "../typography/v4/Typography.vue.js";
3
+ import P from "../switch/v4/SwitchV4.vue.js";
4
+ import { ChartType as d, TrendDirection as H } from "./types.js";
5
+ import b from "./ChartHeaderTrend.vue.js";
6
+ import L from "./SubHeader.vue.js";
7
+ const z = { class: "header-texts" }, E = { class: "header-row" }, A = /* @__PURE__ */ k({
8
8
  __name: "ChartHeader",
9
9
  props: {
10
- chartType: { default: h.Line },
10
+ chartType: { default: d.Line },
11
11
  typeSwitcher: { type: Boolean, default: !0 },
12
12
  header: { default: "" },
13
13
  subheader: { default: "" },
@@ -15,97 +15,66 @@ const H = { class: "header-texts" }, O = { class: "header-row" }, R = { class: "
15
15
  trendTooltip: { default: null },
16
16
  compact: { type: Boolean, default: !1 },
17
17
  trendValue: { default: null },
18
- trendDirection: { default: "up" }
18
+ trendDirection: { default: H.UP }
19
19
  },
20
20
  emits: ["update:chartType"],
21
- setup(e, { emit: x }) {
22
- const a = e, S = g(), T = [
23
- { id: h.Line, icon: "chart-line-up" },
24
- { id: h.Bar, icon: "chart-bar" },
25
- { id: h.StackedLine, icon: "chart-line" }
26
- ], p = m({
21
+ setup(e, { emit: V }) {
22
+ const r = e, c = [
23
+ { id: d.Line, icon: "chart-line-up" },
24
+ { id: d.Bar, icon: "chart-bar" },
25
+ { id: d.StackedLine, icon: "chart-line" }
26
+ ], l = h({
27
27
  get() {
28
- return T.find(({ id: l }) => l === a.chartType);
28
+ return c.find(({ id: t }) => t === r.chartType);
29
29
  },
30
- set(l) {
31
- x("update:chartType", l.id);
30
+ set(t) {
31
+ V("update:chartType", t.id);
32
32
  }
33
- }), C = m(() => S["subheader-tooltip"] || a.subheaderTooltip?.text || a.subheaderTooltip?.header), y = m(() => ({
34
- value: a.trendValue,
35
- direction: a.trendDirection,
36
- trendTooltip: a.trendTooltip
33
+ }), u = h(() => ({
34
+ value: r.trendValue,
35
+ direction: r.trendDirection,
36
+ trendTooltip: r.trendTooltip
37
37
  }));
38
- return (l, b) => (r(), N("div", {
39
- class: D(["chart-header", { "chart-header--compact": e.compact }])
38
+ return (t, s) => (o(), S("div", {
39
+ class: w(["chart-header", { "chart-header--compact": e.compact }])
40
40
  }, [
41
- n("div", H, [
42
- n("div", O, [
43
- f(t(E), {
44
- placement: "right",
45
- disabled: !t(C)
46
- }, {
47
- tooltip: o(() => [
48
- L(l.$slots, "subheader-tooltip", {}, () => [
49
- n("div", R, [
50
- e.subheaderTooltip?.header ? (r(), d(t(s), {
51
- key: 0,
52
- variant: "h5"
53
- }, {
54
- default: o(() => [
55
- u(c(e.subheaderTooltip.header), 1)
56
- ]),
57
- _: 1
58
- })) : i("", !0),
59
- e.subheaderTooltip?.text ? (r(), d(t(s), {
60
- key: 1,
61
- variant: "body2",
62
- class: "subheader-tooltip__text"
63
- }, {
64
- default: o(() => [
65
- u(c(e.subheaderTooltip.text), 1)
66
- ]),
67
- _: 1
68
- })) : i("", !0)
69
- ])
70
- ], !0)
71
- ]),
72
- default: o(() => [
73
- f(t(s), {
74
- class: "subheader",
75
- variant: "h5"
76
- }, {
77
- default: o(() => [
78
- u(c(e.subheader + (e.compact ? ":" : "")), 1)
79
- ]),
80
- _: 1
81
- })
41
+ m("div", z, [
42
+ p(L, {
43
+ subheader: e.subheader,
44
+ "subheader-tooltip": e.subheaderTooltip,
45
+ "show-separator": e.compact && (!!e.header || !!e.trendValue)
46
+ }, C({ _: 2 }, [
47
+ t.$slots["subheader-tooltip"] ? {
48
+ name: "subheader-tooltip",
49
+ fn: f(() => [
50
+ B(t.$slots, "subheader-tooltip", {}, void 0, !0)
82
51
  ]),
83
- _: 3
84
- }, 8, ["disabled"])
85
- ]),
86
- n("div", U, [
87
- f(t(s), {
52
+ key: "0"
53
+ } : void 0
54
+ ]), 1032, ["subheader", "subheader-tooltip", "show-separator"]),
55
+ m("div", E, [
56
+ p(a(N), {
88
57
  class: "header-text",
89
58
  variant: e.compact ? "h5" : "chart2"
90
59
  }, {
91
- default: o(() => [
92
- u(c(e.header), 1)
60
+ default: f(() => [
61
+ g(x(e.header), 1)
93
62
  ]),
94
63
  _: 1
95
64
  }, 8, ["variant"]),
96
- !e.compact && e.trendValue !== null ? (r(), d(k, v(V({ key: 0 }, t(y))), null, 16)) : i("", !0)
65
+ !e.compact && e.trendValue !== null ? (o(), n(b, y(T({ key: 0 }, a(u))), null, 16)) : i("", !0)
97
66
  ]),
98
- e.compact && e.trendValue !== null ? (r(), d(k, v(V({ key: 0 }, t(y))), null, 16)) : i("", !0)
67
+ e.compact && e.trendValue !== null ? (o(), n(b, y(T({ key: 0 }, a(u))), null, 16)) : i("", !0)
99
68
  ]),
100
- e.typeSwitcher ? (r(), d(t(z), {
69
+ e.typeSwitcher ? (o(), n(a(P), {
101
70
  key: 0,
102
- modelValue: t(p),
103
- "onUpdate:modelValue": b[0] || (b[0] = (w) => P(p) ? p.value = w : null),
104
- options: T
71
+ modelValue: a(l),
72
+ "onUpdate:modelValue": s[0] || (s[0] = (v) => D(l) ? l.value = v : null),
73
+ options: c
105
74
  }, null, 8, ["modelValue"])) : i("", !0)
106
75
  ], 2));
107
76
  }
108
77
  });
109
78
  export {
110
- I as default
79
+ A as default
111
80
  };