@ironsource/shared-ui 2.1.12-rc.12 → 2.1.12-rc.14

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 (105) hide show
  1. package/ButtonV4.vue_vue_type_style_index_0_scoped_d7948c77_lang.css +1 -0
  2. package/Chart.vue_vue_type_style_index_0_scoped_de950ffe_lang.css +1 -0
  3. package/ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css +1 -0
  4. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css +1 -0
  5. package/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css +1 -0
  6. package/ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css +1 -0
  7. package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
  8. package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
  9. package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
  10. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  11. package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
  12. package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
  13. package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
  14. package/components/appIcon/index.d.ts +3 -3
  15. package/components/banner/Banner.vue.d.ts +3 -3
  16. package/components/banner/index.d.ts +7 -7
  17. package/components/button/common/consts.d.ts +1 -0
  18. package/components/button/v3/Button.vue.d.ts +3 -3
  19. package/components/button/v3/ButtonBase.vue.d.ts +3 -3
  20. package/components/button/v3/IconButton.vue.d.ts +3 -3
  21. package/components/button/v3/index.d.ts +14 -14
  22. package/components/button/v4/ButtonV4.vue.d.ts +4 -3
  23. package/components/button/v4/ButtonV4.vue.js +3 -3
  24. package/components/button/v4/ButtonV4.vue2.js +1 -1
  25. package/components/chart/Chart.vue.d.ts +55 -2
  26. package/components/chart/Chart.vue.js +5 -5
  27. package/components/chart/Chart.vue2.js +109 -82
  28. package/components/chart/ChartHeader.vue.d.ts +24 -0
  29. package/components/chart/ChartHeader.vue.js +3 -3
  30. package/components/chart/ChartHeader.vue2.js +70 -50
  31. package/components/chart/ChartHeaderTrend.vue.d.ts +13 -0
  32. package/components/chart/ChartHeaderTrend.vue.js +2 -2
  33. package/components/chart/ChartHeaderTrend.vue2.js +80 -18
  34. package/components/chart/ChartLegend.vue.d.ts +17 -0
  35. package/components/chart/ChartLegend.vue.js +3 -3
  36. package/components/chart/ChartLegend.vue2.js +78 -67
  37. package/components/chart/ChartPlane.vue.d.ts +42 -4
  38. package/components/chart/ChartPlane.vue.js +4 -4
  39. package/components/chart/ChartPlane.vue2.js +159 -146
  40. package/components/chart/LegendSorting.vue.d.ts +37 -0
  41. package/components/chart/LegendSorting.vue.js +45 -0
  42. package/components/chart/LegendSorting.vue2.js +4 -0
  43. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  44. package/components/chart/SettingsHeader.vue.js +3 -3
  45. package/components/chart/SettingsHeader.vue2.js +17 -16
  46. package/components/chart/colorPalette.d.ts +4 -0
  47. package/components/chart/colorPalette.js +54 -0
  48. package/components/chart/composables/useColorsMap.d.ts +2 -2
  49. package/components/chart/composables/useColorsMap.js +41 -12
  50. package/components/chart/consts.d.ts +12 -1
  51. package/components/chart/consts.js +31 -26
  52. package/components/chart/index.d.ts +208 -40
  53. package/components/chart/mockData.d.ts +8 -14
  54. package/components/chart/types.d.ts +2 -1
  55. package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
  56. package/components/checkbox/v3/index.d.ts +7 -7
  57. package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
  58. package/components/dialog/v4/DialogV4.vue.js +4 -4
  59. package/components/dialog/v4/DialogV4.vue2.js +1 -1
  60. package/components/dialog/v4/index.d.ts +7 -7
  61. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  62. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  63. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  64. package/components/dropdown/v4/index.d.ts +18 -0
  65. package/components/forms/FormRow.vue.d.ts +9 -2
  66. package/components/forms/FormRow.vue.js +3 -3
  67. package/components/forms/FormRow.vue2.js +25 -14
  68. package/components/forms/index.d.ts +25 -5
  69. package/components/search/v3/index.d.ts +3 -3
  70. package/components/shared/FieldLabel.vue.d.ts +19 -7
  71. package/components/shared/FieldLabel.vue.js +3 -3
  72. package/components/shared/FieldLabel.vue2.js +50 -37
  73. package/components/tabs/v3/Tabs.vue.d.ts +3 -3
  74. package/components/tabs/v3/index.d.ts +7 -7
  75. package/components/tooltip/common/Tooltip.types.d.ts +1 -0
  76. package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
  77. package/components/tooltip/v3/Tooltip.vue.js +2 -2
  78. package/components/tooltip/v3/Tooltip.vue2.js +1 -1
  79. package/components/tooltip/v3/index.d.ts +7 -7
  80. package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
  81. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  82. package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
  83. package/components/tooltip/v4/index.d.ts +7 -7
  84. package/components/typography/Text.vue.d.ts +3 -3
  85. package/components/typography/index.d.ts +7 -7
  86. package/composables/useFormValidation.d.ts +1 -0
  87. package/composables/useFormValidation.js +29 -26
  88. package/index.d.ts +71 -35
  89. package/index.js +1 -1
  90. package/package.json +1 -1
  91. package/utils/totals.d.ts +5 -0
  92. package/utils/totals.js +9 -0
  93. package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
  94. package/Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css +0 -1
  95. package/ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css +0 -1
  96. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_e4c673e7_lang.css +0 -1
  97. package/ChartLegend.vue_vue_type_style_index_0_scoped_532f23bc_lang.css +0 -1
  98. package/ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_lang.css +0 -1
  99. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
  100. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
  101. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
  102. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  103. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
  104. package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
  105. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
@@ -1,4 +1,5 @@
1
1
  import { ChartDataSet, ChartParsingConfig, ChartType, ValueFormat } from './types';
2
+ import { TotalType } from '@/utils/totals';
2
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
4
  dataSets: ChartDataSet[];
4
5
  visibleIds: unknown[];
@@ -10,10 +11,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
10
11
  loading?: boolean;
11
12
  withAnimation?: boolean;
12
13
  totalsChart?: boolean;
14
+ tooltipTotalType?: TotalType;
15
+ tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
13
16
  header?: string;
14
17
  subheader?: string;
18
+ subheaderTooltip?: {
19
+ header?: string;
20
+ text?: string;
21
+ };
15
22
  trendValue?: string | number;
16
23
  trendDirection?: "up" | "down";
24
+ trendTooltip?: {
25
+ header?: string;
26
+ rangeCurrent?: string;
27
+ rangePrevious?: string;
28
+ };
17
29
  noDataIcon?: string;
18
30
  noDataTitle?: string;
19
31
  noDataSubtitle?: string;
@@ -21,6 +33,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
21
33
  minVisible?: number;
22
34
  maxVisible?: number;
23
35
  maxLimitTooltipText?: string;
36
+ sortSelected?: unknown;
37
+ sortOptions?: unknown[];
38
+ sortOptionNameKey?: string;
24
39
  fullHeight?: boolean;
25
40
  withSettingsHeader?: boolean;
26
41
  extraCharts?: Record<string, unknown>[];
@@ -35,10 +50,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
35
50
  loading: boolean;
36
51
  withAnimation: boolean;
37
52
  totalsChart: boolean;
53
+ tooltipTotalType: TotalType;
54
+ tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
38
55
  header: string;
39
56
  subheader: string;
57
+ subheaderTooltip: any;
40
58
  trendValue: any;
41
59
  trendDirection: string;
60
+ trendTooltip: any;
42
61
  noDataIcon: string;
43
62
  noDataTitle: string;
44
63
  noDataSubtitle: string;
@@ -46,12 +65,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
46
65
  minVisible: number;
47
66
  maxVisible: number;
48
67
  maxLimitTooltipText: string;
68
+ sortSelected: any;
69
+ sortOptions: () => any[];
70
+ sortOptionNameKey: string;
49
71
  fullHeight: boolean;
50
72
  withSettingsHeader: boolean;
51
73
  extraCharts: () => any[];
52
74
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
75
  "update:chartType": (chartType: ChartType) => void;
54
76
  "update:visibleIds": (visibleIds: unknown[]) => void;
77
+ "update:sortSelected": (sortOption: unknown) => void;
55
78
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
56
79
  dataSets: ChartDataSet[];
57
80
  visibleIds: unknown[];
@@ -63,10 +86,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
63
86
  loading?: boolean;
64
87
  withAnimation?: boolean;
65
88
  totalsChart?: boolean;
89
+ tooltipTotalType?: TotalType;
90
+ tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
66
91
  header?: string;
67
92
  subheader?: string;
93
+ subheaderTooltip?: {
94
+ header?: string;
95
+ text?: string;
96
+ };
68
97
  trendValue?: string | number;
69
98
  trendDirection?: "up" | "down";
99
+ trendTooltip?: {
100
+ header?: string;
101
+ rangeCurrent?: string;
102
+ rangePrevious?: string;
103
+ };
70
104
  noDataIcon?: string;
71
105
  noDataTitle?: string;
72
106
  noDataSubtitle?: string;
@@ -74,6 +108,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
74
108
  minVisible?: number;
75
109
  maxVisible?: number;
76
110
  maxLimitTooltipText?: string;
111
+ sortSelected?: unknown;
112
+ sortOptions?: unknown[];
113
+ sortOptionNameKey?: string;
77
114
  fullHeight?: boolean;
78
115
  withSettingsHeader?: boolean;
79
116
  extraCharts?: Record<string, unknown>[];
@@ -88,10 +125,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
88
125
  loading: boolean;
89
126
  withAnimation: boolean;
90
127
  totalsChart: boolean;
128
+ tooltipTotalType: TotalType;
129
+ tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
91
130
  header: string;
92
131
  subheader: string;
132
+ subheaderTooltip: any;
93
133
  trendValue: any;
94
134
  trendDirection: string;
135
+ trendTooltip: any;
95
136
  noDataIcon: string;
96
137
  noDataTitle: string;
97
138
  noDataSubtitle: string;
@@ -99,11 +140,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
99
140
  minVisible: number;
100
141
  maxVisible: number;
101
142
  maxLimitTooltipText: string;
143
+ sortSelected: any;
144
+ sortOptions: () => any[];
145
+ sortOptionNameKey: string;
102
146
  fullHeight: boolean;
103
147
  withSettingsHeader: boolean;
104
148
  extraCharts: () => any[];
105
149
  }>>> & {
106
150
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
151
+ "onUpdate:sortSelected"?: (sortOption: unknown) => any;
107
152
  "onUpdate:chartType"?: (chartType: ChartType) => any;
108
153
  }, {
109
154
  header: string;
@@ -112,25 +157,33 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
112
157
  minVisible: number;
113
158
  maxVisible: number;
114
159
  maxLimitTooltipText: string;
160
+ sortSelected: any;
161
+ sortOptions: unknown[];
162
+ sortOptionNameKey: string;
115
163
  chartType: ChartType;
116
164
  hideLegend: boolean;
117
165
  xAxisFormat: ValueFormat;
118
166
  yAxisFormat: ValueFormat;
119
167
  parsing: ChartParsingConfig;
120
168
  dataSets: ChartDataSet[];
169
+ trendTooltip: any;
121
170
  subheader: string;
171
+ subheaderTooltip: any;
122
172
  trendValue: string | number;
123
173
  trendDirection: "up" | "down";
124
174
  tickCount: number;
125
- withAnimation: boolean;
126
- totalsChart: boolean;
127
175
  noDataIcon: string;
128
176
  noDataTitle: string;
129
177
  noDataSubtitle: string;
178
+ withAnimation: boolean;
179
+ tooltipTotalType: TotalType;
180
+ tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
181
+ totalsChart: boolean;
130
182
  fullHeight: boolean;
131
183
  withSettingsHeader: boolean;
132
184
  extraCharts: Record<string, unknown>[];
133
185
  }>, {
186
+ "before-chart-type"?(_: {}): any;
134
187
  metric?(_: {}): any;
135
188
  breakdowns?(_: {}): any;
136
189
  "subheader-tooltip"?(_: {}): any;
@@ -1,7 +1,7 @@
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_78d3f5a8_lang.css"; //*');
4
- const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-78d3f5a8"]]);
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_de950ffe_lang.css"; //*');
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-de950ffe"]]);
5
5
  export {
6
- a as default
6
+ p as default
7
7
  };
@@ -1,125 +1,152 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css"; import { defineComponent as V, computed as n, openBlock as s, createElementBlock as d, Fragment as C, createBlock as x, unref as a, isRef as v, withCtx as u, renderSlot as c, createCommentVNode as T, createElementVNode as I, mergeProps as h, normalizeClass as H, createVNode as S, renderList as E } from "vue";
2
- import { useVModel as U } from "@vueuse/core";
3
- import N from "./ChartLegend.vue.js";
4
- import P from "./SettingsHeader.vue.js";
5
- import D from "./ChartPlane.vue.js";
6
- import { useColorsMap as M } from "./composables/useColorsMap.js";
7
- import { DEFAULT_TICK_COUNT as $, DEFAULT_MIN_VISIBLE as z, DEFAULT_MAX_VISIBLE as K } from "./consts.js";
8
- import { ChartType as O } from "./types.js";
9
- import { useChartHeight as R } from "./composables/useChartHeight.js";
10
- const X = {
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_de950ffe_lang.css"; import { defineComponent as E, computed as n, openBlock as s, createElementBlock as m, Fragment as S, createBlock as x, unref as a, isRef as f, withCtx as d, renderSlot as u, createCommentVNode as I, createElementVNode as D, mergeProps as y, normalizeClass as N, createVNode as F, createSlots as U, renderList as M } from "vue";
2
+ import { useVModel as L } from "@vueuse/core";
3
+ import P from "./ChartLegend.vue.js";
4
+ import O from "./SettingsHeader.vue.js";
5
+ import k from "./ChartPlane.vue.js";
6
+ import { useColorsMap as $ } from "./composables/useColorsMap.js";
7
+ import { DEFAULT_TICK_COUNT as K, DEFAULT_MIN_VISIBLE as z, DEFAULT_MAX_VISIBLE as R } from "./consts.js";
8
+ import { ChartType as X } from "./types.js";
9
+ import { useChartHeight as j } from "./composables/useChartHeight.js";
10
+ import { TotalType as q, calculateTotal as G } from "../../utils/totals.js";
11
+ const J = {
11
12
  key: 0,
12
13
  class: "chart-sidebar"
13
- }, ee = /* @__PURE__ */ V({
14
+ }, it = /* @__PURE__ */ E({
14
15
  __name: "Chart",
15
16
  props: {
16
17
  dataSets: { default: () => [] },
17
18
  visibleIds: { default: () => [] },
18
- chartType: { default: O.Line },
19
+ chartType: { default: X.Line },
19
20
  parsing: { default: void 0 },
20
21
  xAxisFormat: { default: "string" },
21
22
  yAxisFormat: { default: "number" },
22
- tickCount: { default: $ },
23
+ tickCount: { default: K },
23
24
  loading: { type: Boolean, default: !1 },
24
25
  withAnimation: { type: Boolean, default: !0 },
25
26
  totalsChart: { type: Boolean, default: !1 },
27
+ tooltipTotalType: { default: q.Total },
28
+ tooltipTotalCalcFn: { type: Function, default: G },
26
29
  header: { default: "" },
27
30
  subheader: { default: "" },
31
+ subheaderTooltip: { default: null },
28
32
  trendValue: { default: null },
29
33
  trendDirection: { default: "up" },
34
+ trendTooltip: { default: null },
30
35
  noDataIcon: { default: "file-search" },
31
36
  noDataTitle: { default: "No data to display" },
32
37
  noDataSubtitle: { default: "Search again with different filters" },
33
38
  hideLegend: { type: Boolean, default: !1 },
34
39
  minVisible: { default: z },
35
- maxVisible: { default: K },
40
+ maxVisible: { default: R },
36
41
  maxLimitTooltipText: { default: "" },
42
+ sortSelected: { default: null },
43
+ sortOptions: { default: () => [] },
44
+ sortOptionNameKey: { default: "" },
37
45
  fullHeight: { type: Boolean, default: !1 },
38
46
  withSettingsHeader: { type: Boolean, default: !0 },
39
47
  extraCharts: { default: () => [] }
40
48
  },
41
- emits: ["update:chartType", "update:visibleIds"],
42
- setup(i, { emit: p }) {
43
- const e = i, l = U(e, "chartType", p), m = n(() => ({
44
- dataSets: e.dataSets,
45
- visibleIds: e.visibleIds,
46
- parsing: e.parsing,
47
- xAxisFormat: e.xAxisFormat,
48
- yAxisFormat: e.yAxisFormat,
49
- tickCount: e.tickCount,
50
- header: e.header,
51
- subheader: e.subheader,
52
- loading: e.loading,
53
- noDataIcon: e.noDataIcon,
54
- noDataTitle: e.noDataTitle,
55
- noDataSubtitle: e.noDataSubtitle,
56
- withAnimation: e.withAnimation,
57
- typeSwitcher: !e.withSettingsHeader,
58
- height: F.value,
59
- compactHeader: y.value > 1,
60
- trendValue: e.trendValue,
61
- trendDirection: e.trendDirection,
62
- totalsChart: e.totalsChart
63
- })), L = n(() => e.dataSets), f = n(() => e.visibleIds), g = n(() => e.extraCharts.length), y = n(() => 1 + g.value), w = (t) => t === g.value - 1, { colorsMap: A } = M({ dataSets: L, visibleIds: f }), k = n(() => e.dataSets.map((t) => ({
64
- id: t.id,
65
- label: t.label,
66
- caption: t.caption || null,
67
- color: A.value[t.id] || null,
68
- icon: t.icon || null,
69
- iconType: t.iconType || "branded"
70
- }))), { containerProps: B, eachPlaneHeight: F } = R({
71
- chartPlanesCount: y,
72
- useFullHeight: e.fullHeight
49
+ emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
50
+ setup(o, { emit: p }) {
51
+ const t = o, r = L(t, "chartType", p), c = L(t, "sortSelected", p), T = n(() => ({
52
+ dataSets: t.dataSets,
53
+ visibleIds: t.visibleIds,
54
+ parsing: t.parsing,
55
+ xAxisFormat: t.xAxisFormat,
56
+ yAxisFormat: t.yAxisFormat,
57
+ tickCount: t.tickCount,
58
+ header: t.header,
59
+ subheader: t.subheader,
60
+ loading: t.loading,
61
+ noDataIcon: t.noDataIcon,
62
+ noDataTitle: t.noDataTitle,
63
+ noDataSubtitle: t.noDataSubtitle,
64
+ withAnimation: t.withAnimation,
65
+ typeSwitcher: !t.withSettingsHeader,
66
+ height: H.value,
67
+ compactHeader: C.value > 1,
68
+ trendValue: t.trendValue,
69
+ trendDirection: t.trendDirection,
70
+ trendTooltip: t.trendTooltip,
71
+ totalsChart: t.totalsChart,
72
+ subheaderTooltip: t.subheaderTooltip,
73
+ colorsMap: h.value,
74
+ tooltipTotalType: t.tooltipTotalType,
75
+ tooltipTotalCalcFn: t.tooltipTotalCalcFn
76
+ })), w = n(() => t.dataSets), b = n(() => t.visibleIds), g = n(() => t.extraCharts.length), C = n(() => 1 + g.value), A = (e) => e === g.value - 1, { colorsMap: h } = $({
77
+ dataSets: w,
78
+ visibleIds: b
79
+ }), B = n(() => t.dataSets.map((e) => ({
80
+ id: e.id,
81
+ label: e.label,
82
+ caption: e.caption || null,
83
+ color: h.value[e.id] || null,
84
+ icon: e.icon || null,
85
+ iconType: e.iconType || "branded"
86
+ }))), { containerProps: V, eachPlaneHeight: H } = j({
87
+ chartPlanesCount: C,
88
+ useFullHeight: t.fullHeight
73
89
  });
74
- return (t, r) => (s(), d(C, null, [
75
- i.withSettingsHeader ? (s(), x(P, {
90
+ return (e, i) => (s(), m(S, null, [
91
+ o.withSettingsHeader ? (s(), x(O, {
76
92
  key: 0,
77
- "chart-type": a(l),
78
- "onUpdate:chart-type": r[0] || (r[0] = (o) => v(l) ? l.value = o : null),
79
- "hide-legend": i.hideLegend
93
+ "chart-type": a(r),
94
+ "onUpdate:chart-type": i[0] || (i[0] = (l) => f(r) ? r.value = l : null),
95
+ "hide-legend": o.hideLegend
80
96
  }, {
81
- metric: u(() => [
82
- c(t.$slots, "metric", {}, void 0, !0)
97
+ "before-chart-type": d(() => [
98
+ u(e.$slots, "before-chart-type", {}, void 0, !0)
83
99
  ]),
84
- breakdowns: u(() => [
85
- c(t.$slots, "breakdowns", {}, void 0, !0)
100
+ metric: d(() => [
101
+ u(e.$slots, "metric", {}, void 0, !0)
102
+ ]),
103
+ breakdowns: d(() => [
104
+ u(e.$slots, "breakdowns", {}, void 0, !0)
86
105
  ]),
87
106
  _: 3
88
- }, 8, ["chart-type", "hide-legend"])) : T("", !0),
89
- I("div", h({ class: "chart-container" }, a(B)), [
90
- I("section", {
91
- class: H(["chart-planes", [{ "with-legend": !i.hideLegend }]])
107
+ }, 8, ["chart-type", "hide-legend"])) : I("", !0),
108
+ D("div", y({ class: "chart-container" }, a(V)), [
109
+ D("section", {
110
+ class: N(["chart-planes", [{ "with-legend": !o.hideLegend }]])
92
111
  }, [
93
- S(D, h({
94
- "chart-type": a(l),
95
- "onUpdate:chart-type": r[1] || (r[1] = (o) => v(l) ? l.value = o : null)
96
- }, a(m)), {
97
- "subheader-tooltip": u(() => [
98
- c(t.$slots, "subheader-tooltip", {}, void 0, !0)
99
- ]),
100
- _: 3
101
- }, 16, ["chart-type"]),
102
- (s(!0), d(C, null, E(i.extraCharts, (o, b) => (s(), x(D, h({
103
- key: b,
112
+ F(k, y({
113
+ "chart-type": a(r),
114
+ "onUpdate:chart-type": i[1] || (i[1] = (l) => f(r) ? r.value = l : null)
115
+ }, a(T)), U({ _: 2 }, [
116
+ e.$slots["subheader-tooltip"] ? {
117
+ name: "subheader-tooltip",
118
+ fn: d(() => [
119
+ u(e.$slots, "subheader-tooltip", {}, void 0, !0)
120
+ ]),
121
+ key: "0"
122
+ } : void 0
123
+ ]), 1040, ["chart-type"]),
124
+ (s(!0), m(S, null, M(o.extraCharts, (l, v) => (s(), x(k, y({
125
+ key: v,
104
126
  class: "extra-chart-plane"
105
- }, { ...a(m), ...o }, {
106
- "chart-type": a(l),
127
+ }, { ...a(T), ...l }, {
128
+ "chart-type": a(r),
129
+ "colors-map": a(h),
107
130
  "type-switcher": !1,
108
- "tooltip-respects-top-edge": !w(b)
109
- }), null, 16, ["chart-type", "tooltip-respects-top-edge"]))), 128))
131
+ "tooltip-respects-top-edge": !A(v)
132
+ }), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
110
133
  ], 2),
111
- i.hideLegend ? T("", !0) : (s(), d("section", X, [
112
- S(N, {
113
- items: a(k),
114
- "visible-ids": a(f),
115
- "max-limit-tooltip-text": i.maxLimitTooltipText,
116
- "onUpdate:visibleIds": r[2] || (r[2] = (o) => p("update:visibleIds", o))
117
- }, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
134
+ o.hideLegend ? I("", !0) : (s(), m("section", J, [
135
+ F(P, {
136
+ "sort-selected": a(c),
137
+ "onUpdate:sort-selected": i[2] || (i[2] = (l) => f(c) ? c.value = l : null),
138
+ items: a(B),
139
+ "visible-ids": a(b),
140
+ "max-limit-tooltip-text": o.maxLimitTooltipText,
141
+ "sort-options": o.sortOptions,
142
+ "sort-option-name-key": o.sortOptionNameKey,
143
+ "onUpdate:visibleIds": i[3] || (i[3] = (l) => p("update:visibleIds", l))
144
+ }, null, 8, ["sort-selected", "items", "visible-ids", "max-limit-tooltip-text", "sort-options", "sort-option-name-key"])
118
145
  ]))
119
146
  ], 16)
120
147
  ], 64));
121
148
  }
122
149
  });
123
150
  export {
124
- ee as default
151
+ it as default
125
152
  };
@@ -4,6 +4,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
4
4
  typeSwitcher: boolean;
5
5
  header?: string;
6
6
  subheader?: string;
7
+ subheaderTooltip?: {
8
+ header?: string;
9
+ text?: string;
10
+ };
11
+ trendTooltip?: {
12
+ header?: string;
13
+ rangeCurrent?: string;
14
+ rangePrevious?: string;
15
+ };
7
16
  compact: boolean;
8
17
  trendValue?: string | number;
9
18
  trendDirection?: "up" | "down";
@@ -12,6 +21,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
12
21
  typeSwitcher: boolean;
13
22
  header: string;
14
23
  subheader: string;
24
+ subheaderTooltip: any;
25
+ trendTooltip: any;
15
26
  compact: boolean;
16
27
  trendValue: any;
17
28
  trendDirection: string;
@@ -22,6 +33,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
22
33
  typeSwitcher: boolean;
23
34
  header?: string;
24
35
  subheader?: string;
36
+ subheaderTooltip?: {
37
+ header?: string;
38
+ text?: string;
39
+ };
40
+ trendTooltip?: {
41
+ header?: string;
42
+ rangeCurrent?: string;
43
+ rangePrevious?: string;
44
+ };
25
45
  compact: boolean;
26
46
  trendValue?: string | number;
27
47
  trendDirection?: "up" | "down";
@@ -30,6 +50,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
30
50
  typeSwitcher: boolean;
31
51
  header: string;
32
52
  subheader: string;
53
+ subheaderTooltip: any;
54
+ trendTooltip: any;
33
55
  compact: boolean;
34
56
  trendValue: any;
35
57
  trendDirection: string;
@@ -39,8 +61,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
39
61
  header: string;
40
62
  compact: boolean;
41
63
  chartType: ChartType;
64
+ trendTooltip: any;
42
65
  typeSwitcher: boolean;
43
66
  subheader: string;
67
+ subheaderTooltip: any;
44
68
  trendValue: string | number;
45
69
  trendDirection: "up" | "down";
46
70
  }>, {
@@ -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_32001725_lang.css"; //*');
4
- const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-32001725"]]);
3
+ // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_1ff0e54f_lang.css"; //*');
4
+ const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1ff0e54f"]]);
5
5
  export {
6
- s as default
6
+ f as default
7
7
  };
@@ -1,53 +1,81 @@
1
- import "../../ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css"; import { defineComponent as b, computed as k, openBlock as r, createElementBlock as C, normalizeClass as w, createElementVNode as i, createVNode as n, unref as a, withCtx as d, renderSlot as B, createTextVNode as m, toDisplayString as f, createBlock as c, createCommentVNode as u, isRef as S } from "vue";
2
- import p from "../typography/v4/Typography.vue.js";
3
- import g from "../switch/v4/SwitchV4.vue.js";
4
- import { ChartType as l } from "./types.js";
5
- import x from "../tooltip/v4/TooltipV4.vue.js";
6
- import y from "./ChartHeaderTrend.vue.js";
7
- const D = { class: "header-texts" }, N = { class: "header-row" }, L = { class: "header-row" }, U = /* @__PURE__ */ b({
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({
8
8
  __name: "ChartHeader",
9
9
  props: {
10
- chartType: { default: l.Line },
10
+ chartType: { default: h.Line },
11
11
  typeSwitcher: { type: Boolean, default: !0 },
12
12
  header: { default: "" },
13
13
  subheader: { default: "" },
14
+ subheaderTooltip: { default: null },
15
+ trendTooltip: { default: null },
14
16
  compact: { type: Boolean, default: !1 },
15
17
  trendValue: { default: null },
16
18
  trendDirection: { default: "up" }
17
19
  },
18
20
  emits: ["update:chartType"],
19
- setup(e, { emit: v }) {
20
- const V = e, h = [
21
- { id: l.Line, icon: "chart-line-up" },
22
- { id: l.Bar, icon: "chart-bar" },
23
- { id: l.StackedLine, icon: "chart-line" }
24
- ], o = k({
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({
25
27
  get() {
26
- return h.find(({ id: t }) => t === V.chartType);
28
+ return T.find(({ id: l }) => l === a.chartType);
27
29
  },
28
- set(t) {
29
- v("update:chartType", t.id);
30
+ set(l) {
31
+ x("update:chartType", l.id);
30
32
  }
31
- });
32
- return (t, s) => (r(), C("div", {
33
- class: w(["chart-header", { "chart-header--compact": e.compact }])
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
37
+ }));
38
+ return (l, b) => (r(), N("div", {
39
+ class: D(["chart-header", { "chart-header--compact": e.compact }])
34
40
  }, [
35
- i("div", D, [
36
- i("div", N, [
37
- n(a(x), {
41
+ n("div", H, [
42
+ n("div", O, [
43
+ f(t(E), {
38
44
  placement: "right",
39
- disabled: !t.$slots["subheader-tooltip"]
45
+ disabled: !t(C)
40
46
  }, {
41
- tooltip: d(() => [
42
- B(t.$slots, "subheader-tooltip", {}, void 0, !0)
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)
43
71
  ]),
44
- default: d(() => [
45
- n(a(p), {
72
+ default: o(() => [
73
+ f(t(s), {
46
74
  class: "subheader",
47
75
  variant: "h5"
48
76
  }, {
49
- default: d(() => [
50
- m(f(e.subheader + (e.compact ? ":" : "")), 1)
77
+ default: o(() => [
78
+ u(c(e.subheader + (e.compact ? ":" : "")), 1)
51
79
  ]),
52
80
  _: 1
53
81
  })
@@ -55,37 +83,29 @@ const D = { class: "header-texts" }, N = { class: "header-row" }, L = { class: "
55
83
  _: 3
56
84
  }, 8, ["disabled"])
57
85
  ]),
58
- i("div", L, [
59
- n(a(p), {
86
+ n("div", U, [
87
+ f(t(s), {
60
88
  class: "header-text",
61
89
  variant: e.compact ? "h5" : "chart2"
62
90
  }, {
63
- default: d(() => [
64
- m(f(e.header), 1)
91
+ default: o(() => [
92
+ u(c(e.header), 1)
65
93
  ]),
66
94
  _: 1
67
95
  }, 8, ["variant"]),
68
- !e.compact && e.trendValue !== null ? (r(), c(y, {
69
- key: 0,
70
- value: e.trendValue,
71
- direction: e.trendDirection
72
- }, null, 8, ["value", "direction"])) : u("", !0)
96
+ !e.compact && e.trendValue !== null ? (r(), d(k, v(V({ key: 0 }, t(y))), null, 16)) : i("", !0)
73
97
  ]),
74
- e.compact && e.trendValue !== null ? (r(), c(y, {
75
- key: 0,
76
- value: e.trendValue,
77
- direction: e.trendDirection
78
- }, null, 8, ["value", "direction"])) : u("", !0)
98
+ e.compact && e.trendValue !== null ? (r(), d(k, v(V({ key: 0 }, t(y))), null, 16)) : i("", !0)
79
99
  ]),
80
- e.typeSwitcher ? (r(), c(a(g), {
100
+ e.typeSwitcher ? (r(), d(t(z), {
81
101
  key: 0,
82
- modelValue: a(o),
83
- "onUpdate:modelValue": s[0] || (s[0] = (T) => S(o) ? o.value = T : null),
84
- options: h
85
- }, null, 8, ["modelValue"])) : u("", !0)
102
+ modelValue: t(p),
103
+ "onUpdate:modelValue": b[0] || (b[0] = (w) => P(p) ? p.value = w : null),
104
+ options: T
105
+ }, null, 8, ["modelValue"])) : i("", !0)
86
106
  ], 2));
87
107
  }
88
108
  });
89
109
  export {
90
- U as default
110
+ I as default
91
111
  };