@ironsource/shared-ui 2.1.12-test.52 → 2.1.12-test.53

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 (153) hide show
  1. package/Chart.vue_vue_type_style_index_0_scoped_3da25a36_lang.css +1 -0
  2. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_2f916aeb_lang.css +1 -0
  3. package/ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css +1 -0
  4. package/ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css +1 -0
  5. package/ColumnPicker.vue_vue_type_style_index_0_scoped_ea8c7024_lang.css +1 -0
  6. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_bdd6ee48_lang.css +1 -0
  7. package/DataGrid.vue_vue_type_style_index_0_scoped_da7631e0_lang.css +1 -0
  8. package/DataGridHeader.vue_vue_type_style_index_0_scoped_840e700c_lang.css +1 -0
  9. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css +1 -0
  10. package/DialogFooter.vue_vue_type_style_index_0_scoped_8b7f64fe_lang.css +1 -0
  11. package/DialogHeader.vue_vue_type_style_index_0_scoped_9a814ec3_lang.css +1 -0
  12. package/DialogV4.vue_vue_type_style_index_0_scoped_cc99f1e3_lang.css +1 -0
  13. package/Link.vue_vue_type_style_index_0_scoped_b10e2439_lang.css +1 -0
  14. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css +1 -0
  15. package/OptionChip.vue_vue_type_style_index_0_scoped_538e4a21_lang.css +1 -0
  16. package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +1 -0
  17. package/RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css +1 -0
  18. package/RemoveButton.vue_vue_type_style_index_0_scoped_ca7fc11d_lang.css +1 -0
  19. package/SortableItem.vue_vue_type_style_index_0_scoped_800cd503_lang.css +1 -0
  20. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_a534c7af_lang.css +1 -0
  21. package/SortableList.vue_vue_type_style_index_0_scoped_84dc8525_lang.css +1 -0
  22. package/TextField.vue_vue_type_style_index_0_scoped_3b7a3661_lang.css +1 -0
  23. package/TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css +1 -0
  24. package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_lang.css +1 -0
  25. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  26. package/components/chart/Chart.vue.d.ts +16 -1
  27. package/components/chart/Chart.vue.js +4 -4
  28. package/components/chart/Chart.vue2.js +38 -32
  29. package/components/chart/ChartHeaderTrend.vue.js +2 -2
  30. package/components/chart/ChartHeaderTrend.vue2.js +34 -33
  31. package/components/chart/ChartPlane.vue.d.ts +10 -0
  32. package/components/chart/ChartPlane.vue.js +4 -4
  33. package/components/chart/ChartPlane.vue2.js +158 -147
  34. package/components/chart/ChartStoryArgs.d.ts +17 -0
  35. package/components/chart/ChartTooltip.vue.js +2 -2
  36. package/components/chart/ChartTooltip.vue2.js +6 -6
  37. package/components/chart/TooltipHeader.vue.js +3 -3
  38. package/components/chart/TooltipHeader.vue2.js +25 -26
  39. package/components/chart/colorPalette.d.ts +2 -1
  40. package/components/chart/colorPalette.js +47 -33
  41. package/components/chart/composables/useColorsMap.d.ts +3 -1
  42. package/components/chart/composables/useColorsMap.js +32 -30
  43. package/components/chart/consts.d.ts +5 -1
  44. package/components/chart/consts.js +30 -26
  45. package/components/chart/index.d.ts +58 -1
  46. package/components/chart/mockData.d.ts +15 -0
  47. package/components/chart/types.d.ts +3 -1
  48. package/components/chart/types.js +5 -5
  49. package/components/chart/utils/utils.d.ts +1 -1
  50. package/components/chart/utils/utils.js +18 -13
  51. package/components/columnPicker/ColumnPicker.vue.d.ts +119 -0
  52. package/components/columnPicker/ColumnPicker.vue.js +7 -0
  53. package/components/columnPicker/ColumnPicker.vue2.js +322 -0
  54. package/components/columnPicker/OptionChip.vue.d.ts +53 -0
  55. package/components/columnPicker/OptionChip.vue.js +7 -0
  56. package/components/columnPicker/OptionChip.vue2.js +46 -0
  57. package/components/columnPicker/RemoveButton.vue.d.ts +38 -0
  58. package/components/columnPicker/RemoveButton.vue.js +7 -0
  59. package/components/columnPicker/RemoveButton.vue2.js +35 -0
  60. package/components/columnPicker/index.d.ts +388 -0
  61. package/components/columnPicker/index.js +6 -0
  62. package/components/columnPicker/mockData.d.ts +8 -0
  63. package/components/dialog/v3/Dialog.vue.d.ts +3 -3
  64. package/components/dialog/v3/index.d.ts +46 -46
  65. package/components/dialog/v4/DialogFooter.vue.d.ts +78 -0
  66. package/components/dialog/v4/DialogFooter.vue.js +7 -0
  67. package/components/dialog/v4/DialogFooter.vue2.js +60 -0
  68. package/components/dialog/v4/DialogHeader.vue.d.ts +60 -0
  69. package/components/dialog/v4/DialogHeader.vue.js +7 -0
  70. package/components/dialog/v4/DialogHeader.vue2.js +58 -0
  71. package/components/dialog/v4/DialogV4.vue.d.ts +9 -9
  72. package/components/dialog/v4/DialogV4.vue.js +3 -3
  73. package/components/dialog/v4/DialogV4.vue2.js +65 -107
  74. package/components/dialog/v4/index.d.ts +157 -157
  75. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  76. package/components/dropdown/v3/index.d.ts +20 -20
  77. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  78. package/components/dropdown/v4/ConditionalDropdown.vue2.js +176 -171
  79. package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
  80. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  81. package/components/dropdown/v4/OptionV4.vue2.js +83 -70
  82. package/components/dropdown/v4/index.d.ts +20 -1
  83. package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
  84. package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
  85. package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +1 -1
  86. package/components/includeExclude/index.d.ts +70 -70
  87. package/components/input/v4/TextField.vue.d.ts +12 -0
  88. package/components/input/v4/TextField.vue.js +3 -3
  89. package/components/input/v4/TextField.vue2.js +129 -105
  90. package/components/input/v4/index.d.ts +46 -2
  91. package/components/link/Link.vue.d.ts +20 -0
  92. package/components/link/Link.vue.js +2 -2
  93. package/components/link/Link.vue2.js +35 -21
  94. package/components/link/index.d.ts +77 -1
  95. package/components/radioButton/v3/RadioButton.vue.d.ts +5 -0
  96. package/components/radioButton/v3/RadioButton.vue.js +3 -3
  97. package/components/radioButton/v3/RadioButton.vue2.js +42 -39
  98. package/components/radioButton/v3/index.d.ts +20 -1
  99. package/components/sortableList/SortableItem.vue.d.ts +17 -2
  100. package/components/sortableList/SortableItem.vue.js +3 -3
  101. package/components/sortableList/SortableItem.vue2.js +86 -70
  102. package/components/sortableList/SortableItemLabel.vue.js +3 -3
  103. package/components/sortableList/SortableItemLabel.vue2.js +26 -23
  104. package/components/sortableList/SortableList.types.d.ts +1 -0
  105. package/components/sortableList/SortableList.vue.d.ts +10 -0
  106. package/components/sortableList/SortableList.vue.js +3 -3
  107. package/components/sortableList/SortableList.vue2.js +104 -96
  108. package/components/sortableList/composables/useHoverEffect.js +1 -1
  109. package/components/sortableList/index.d.ts +39 -1
  110. package/components/table/v4/DataGrid.vue.d.ts +4 -4
  111. package/components/table/v4/DataGrid.vue.js +3 -3
  112. package/components/table/v4/DataGrid.vue2.js +237 -245
  113. package/components/table/v4/DataGridHeader.vue.d.ts +85 -0
  114. package/components/table/v4/DataGridHeader.vue.js +7 -0
  115. package/components/table/v4/DataGridHeader.vue2.js +82 -0
  116. package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
  117. package/components/table/v4/DataGridRowsCounter.vue2.js +12 -12
  118. package/components/table/v4/MultipleDataGrid.vue.d.ts +6 -5
  119. package/components/table/v4/MultipleDataGrid.vue.js +2 -2
  120. package/components/table/v4/MultipleDataGrid.vue2.js +91 -90
  121. package/components/table/v4/index.d.ts +552 -305
  122. package/components/table/v4/index.js +7 -4
  123. package/components/table/v4/storyUtils.d.ts +25 -0
  124. package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
  125. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  126. package/components/tooltip/v4/TooltipV4.vue2.js +18 -17
  127. package/components/tooltip/v4/index.d.ts +20 -1
  128. package/index.d.ts +2153 -1419
  129. package/index.js +99 -95
  130. package/package.json +5 -1
  131. package/testids/index.d.ts +7 -1
  132. package/testids/index.js +26 -25
  133. package/utils/date.js +3 -3
  134. package/utils/formatNumbers.d.ts +1 -1
  135. package/utils/formatNumbers.js +38 -21
  136. package/Chart.vue_vue_type_style_index_0_scoped_e8f25a03_lang.css +0 -1
  137. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +0 -1
  138. package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +0 -1
  139. package/ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css +0 -1
  140. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +0 -1
  141. package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +0 -1
  142. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
  143. package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +0 -1
  144. package/Link.vue_vue_type_style_index_0_scoped_ad98fe7b_lang.css +0 -1
  145. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_020a9896_lang.css +0 -1
  146. package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +0 -1
  147. package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +0 -1
  148. package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +0 -1
  149. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +0 -1
  150. package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +0 -1
  151. package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +0 -1
  152. package/TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css +0 -1
  153. package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +0 -1
@@ -43,6 +43,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
43
43
  colorsMap: Record<string, string>;
44
44
  valueSuffix?: string;
45
45
  valuePrefix?: string;
46
+ indicateIncompleteData?: boolean;
47
+ tooltipExcludeTotalItem?: boolean;
46
48
  }>, {
47
49
  chartType: ChartType;
48
50
  dataSets: () => any[];
@@ -79,6 +81,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
79
81
  colorsMap: () => {};
80
82
  valueSuffix: string;
81
83
  valuePrefix: string;
84
+ indicateIncompleteData: boolean;
85
+ tooltipExcludeTotalItem: boolean;
82
86
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
87
  "update:chartType": (chartType: ChartType) => void;
84
88
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -124,6 +128,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
124
128
  colorsMap: Record<string, string>;
125
129
  valueSuffix?: string;
126
130
  valuePrefix?: string;
131
+ indicateIncompleteData?: boolean;
132
+ tooltipExcludeTotalItem?: boolean;
127
133
  }>, {
128
134
  chartType: ChartType;
129
135
  dataSets: () => any[];
@@ -160,6 +166,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
160
166
  colorsMap: () => {};
161
167
  valueSuffix: string;
162
168
  valuePrefix: string;
169
+ indicateIncompleteData: boolean;
170
+ tooltipExcludeTotalItem: boolean;
163
171
  }>>> & {
164
172
  "onUpdate:chartType"?: (chartType: ChartType) => any;
165
173
  }, {
@@ -198,6 +206,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
198
206
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
199
207
  tooltipOrder: TooltipOrder;
200
208
  colorsMap: Record<string, string>;
209
+ indicateIncompleteData: boolean;
210
+ tooltipExcludeTotalItem: boolean;
201
211
  }>, {
202
212
  "subheader-tooltip"?(_: {}): any;
203
213
  }>;
@@ -1,7 +1,7 @@
1
- import o from "./ChartPlane.vue2.js";
2
- /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css"; //*');
4
- const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-4f67d41d"]]);
1
+ import e from "./ChartPlane.vue2.js";
2
+ /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css"; //*');
4
+ const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-dd60ff0e"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,38 +1,38 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css"; import { defineComponent as ae, useCssVars as oe, unref as s, computed as l, ref as k, onMounted as le, watch as v, nextTick as re, openBlock as p, createElementBlock as A, createVNode as ie, isRef as ne, createSlots as se, withCtx as ue, renderSlot as de, createCommentVNode as S, createElementVNode as L, normalizeStyle as ce, createBlock as E } from "vue";
2
- import { Chart as P, ArcElement as fe, LineElement as pe, BarElement as he, PointElement as me, LineController as ve, BarController as ye, PieController as Te, ScatterController as Ce, CategoryScale as be, LinearScale as ge, Filler as xe, Tooltip as ke } from "chart.js";
3
- import { HoverVerticalLine as Ae } from "./plugins/HoverVerticalLine.js";
4
- import { prepareTickLabel as Se, formatValue as Le } from "./utils/utils.js";
5
- import { DEFAULT_TICK_COUNT as Ee, TOTALS_HELPER_KEY as w, BASE_COLOR_KEY as V, CHART_PADDING as Re, POINT_BORDER_COLOR as Be, TICK_LABEL_COLOR as N, TICK_LABEL_FONT as F, TICKS_EXTRA_PADDING as De, GRID_LINE_COLOR as K, HEADER_HEIGHT as Oe, COMPACT_HEADER_HEIGHT as Ie, HOVER_AREA_TRANSPARENCY as He, HOVER_TRANSPARENCY as y } from "./consts.js";
6
- import { ChartType as u, DateInterval as Pe, TooltipOrder as M, TrendDirection as we } from "./types.js";
7
- import { useTooltipPosition as Ve } from "./composables/useTooltipPosition.js";
8
- import Ne from "./ChartTooltip.vue.js";
1
+ import "../../ChartPlane.vue_vue_type_style_index_0_scoped_dd60ff0e_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as i, ref as S, onMounted as ne, watch as T, nextTick as se, openBlock as p, createElementBlock as E, createVNode as de, isRef as ce, createSlots as ue, withCtx as fe, renderSlot as pe, createCommentVNode as L, createElementVNode as R, normalizeStyle as he, createBlock as D } from "vue";
2
+ import { Chart as V, ArcElement as me, LineElement as ve, BarElement as Te, PointElement as ye, LineController as Ce, BarController as ge, PieController as be, ScatterController as xe, CategoryScale as Ae, LinearScale as ke, Filler as Se, Tooltip as Ee } from "chart.js";
3
+ import { HoverVerticalLine as Le } from "./plugins/HoverVerticalLine.js";
4
+ import { prepareTickLabel as Re, formatValue as De } from "./utils/utils.js";
5
+ import { DEFAULT_TICK_COUNT as Be, TOTALS_HELPER_KEY as F, LINE_DASH_STYLE as Ie, BASE_COLOR_KEY as _, CHART_PADDING as Oe, POINT_BORDER_COLOR as Ne, TICK_LABEL_COLOR as M, TICK_LABEL_FONT as Y, TICKS_EXTRA_PADDING as Pe, GRID_LINE_COLOR as K, HEADER_HEIGHT as He, COMPACT_HEADER_HEIGHT as we, HOVER_AREA_TRANSPARENCY as Ve, HOVER_TRANSPARENCY as y, CHART_ITEM_TRANSPARENCY as Fe, INCOMPLETE_DATA_BAR_TRANSPARENCY as _e, STACKED_LINE_TRANSPARENCY as Me } from "./consts.js";
6
+ import { ChartType as d, DateInterval as Ye, TooltipOrder as U, TrendDirection as Ke } from "./types.js";
7
+ import { useTooltipPosition as Ue } from "./composables/useTooltipPosition.js";
8
+ import Ge from "./ChartTooltip.vue.js";
9
9
  import { hexColorToRgba as h } from "../../utils/color.js";
10
- import Fe from "./ChartHeader.vue.js";
11
- import { useMemoize as Ke, useVModel as Me } from "@vueuse/core";
12
- import Ue from "../emptyState/v4/EmptyStateV4.vue.js";
13
- import Ye from "./ChartLoader.vue.js";
14
- import { DEFAULT_CHART_COLOR as Ge } from "./colorPalette.js";
15
- import { TotalType as U, calculateTotal as _e } from "../../utils/totals.js";
16
- import { isNullOrUndefined as $e } from "../../utils/utils.js";
17
- import { storeOriginalDatasetColors as ze, restoreOriginalDatasetColors as We } from "./utils/highlightUtils.js";
18
- const Ze = { class: "chart-plane-container" }, Xe = {
10
+ import $e from "./ChartHeader.vue.js";
11
+ import { useMemoize as ze, useVModel as We } from "@vueuse/core";
12
+ import Ze from "../emptyState/v4/EmptyStateV4.vue.js";
13
+ import Xe from "./ChartLoader.vue.js";
14
+ import { DEFAULT_CHART_COLOR as je } from "./colorPalette.js";
15
+ import { TotalType as G, calculateTotal as qe } from "../../utils/totals.js";
16
+ import { isNullOrUndefined as Je } from "../../utils/utils.js";
17
+ import { storeOriginalDatasetColors as Qe, restoreOriginalDatasetColors as et } from "./utils/highlightUtils.js";
18
+ const tt = { class: "chart-plane-container" }, at = {
19
19
  key: 0,
20
20
  class: "header-wrapper"
21
- }, je = {
21
+ }, ot = {
22
22
  key: 1,
23
23
  class: "chart-plane"
24
- }, qe = { class: "chart" }, mt = /* @__PURE__ */ ae({
24
+ }, lt = { class: "chart" }, xt = /* @__PURE__ */ re({
25
25
  __name: "ChartPlane",
26
26
  props: {
27
27
  dataSets: { default: () => [] },
28
28
  visibleIds: { default: () => [] },
29
29
  highlightedId: { default: null },
30
- chartType: { default: u.Line },
30
+ chartType: { default: d.Line },
31
31
  parsing: { default: void 0 },
32
32
  xAxisFormat: { default: "string" },
33
33
  yAxisFormat: { default: "number" },
34
- xAxisDateInterval: { default: Pe.DAILY },
35
- tickCount: { default: Ee },
34
+ xAxisDateInterval: { default: Ye.DAILY },
35
+ tickCount: { default: Be },
36
36
  truncateTickLabels: { type: Boolean, default: !1 },
37
37
  header: { default: "" },
38
38
  subheader: { default: "" },
@@ -49,85 +49,94 @@ const Ze = { class: "chart-plane-container" }, Xe = {
49
49
  compactHeader: { type: Boolean, default: !1 },
50
50
  noteText: { default: "" },
51
51
  tooltipRespectsTopEdge: { type: Boolean, default: !0 },
52
- tooltipTotalType: { default: U.Total },
53
- tooltipTotalCalcFn: { type: Function, default: _e },
54
- tooltipOrder: { default: M.Legend },
52
+ tooltipTotalType: { default: G.Total },
53
+ tooltipTotalCalcFn: { type: Function, default: qe },
54
+ tooltipOrder: { default: U.Legend },
55
55
  trendValue: { default: null },
56
- trendDirection: { default: we.UP },
56
+ trendDirection: { default: Ke.UP },
57
57
  trendTooltip: { default: null },
58
58
  totalsChart: { type: Boolean, default: !1 },
59
59
  colorsMap: { default: () => ({}) },
60
60
  valueSuffix: { default: "" },
61
- valuePrefix: { default: "" }
61
+ valuePrefix: { default: "" },
62
+ indicateIncompleteData: { type: Boolean, default: !1 },
63
+ tooltipExcludeTotalItem: { type: Boolean, default: !1 }
62
64
  },
63
65
  emits: ["update:chartType"],
64
- setup(o, { emit: Y }) {
66
+ setup(o, { emit: $ }) {
65
67
  const e = o;
66
- oe((t) => ({
67
- "11153e48": s(q),
68
- 30644433: o.height
68
+ ie((t) => ({
69
+ "53e851a1": s(ae),
70
+ "45a8c08c": o.height
69
71
  }));
70
- const G = Ke(Se);
71
- P.register(
72
- fe,
73
- pe,
74
- he,
72
+ const z = ze(Re);
73
+ V.register(
75
74
  me,
76
75
  ve,
77
- ye,
78
76
  Te,
77
+ ye,
79
78
  Ce,
80
- be,
81
79
  ge,
80
+ be,
82
81
  xe,
82
+ Ae,
83
83
  ke,
84
- Ae
84
+ Se,
85
+ Ee,
86
+ Le
85
87
  );
86
- const T = Me(e, "chartType", Y), _ = l(
88
+ const C = We(e, "chartType", $), W = i(
87
89
  () => e.withAnimation ? "" : "none"
88
- ), m = k(null);
90
+ ), v = S(null);
89
91
  let n = null;
90
- const R = l(() => e.empty || e.dataSets.length === 0), c = l(() => !e.loading && !R.value), C = () => {
91
- m.value && (n && n.destroy(), n = new P(m.value, O.value));
92
- }, $ = () => {
93
- n && (n.data.datasets = D.value, n.options = O.value.options, n.update(_.value));
92
+ const B = i(() => e.empty || e.dataSets.length === 0), u = i(() => !e.loading && !B.value), g = () => {
93
+ v.value && (n && n.destroy(), n = new V(v.value, N.value));
94
+ }, Z = () => {
95
+ n && (n.data.datasets = O.value, n.options = N.value.options, n.update(W.value));
94
96
  };
95
- le(C), v(() => e.chartType, C), v(c, async (t) => {
96
- t && (await re(), C());
97
- }), v(
97
+ ne(g), T(() => e.chartType, g), T(u, async (t) => {
98
+ t && (await se(), g());
99
+ }), T(
98
100
  [
99
101
  () => e.visibleIds,
100
102
  () => e.dataSets,
101
103
  () => e.valuePrefix,
102
104
  () => e.valueSuffix
103
105
  ],
104
- $
106
+ Z
105
107
  );
106
- const f = l(() => e.totalsChart), b = l(
107
- () => e.chartType === u.StackedLine || e.chartType === u.StackedBar || f.value
108
- ), g = l(
109
- () => e.chartType === u.Line || e.chartType === u.StackedLine
110
- ), z = l(() => f.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: w } : e.parsing), W = l(() => f.value ? e.dataSets.map((t) => ({
108
+ const f = i(() => e.totalsChart), b = i(
109
+ () => e.chartType === d.StackedLine || e.chartType === d.StackedBar || f.value
110
+ ), x = i(
111
+ () => e.chartType === d.Line || e.chartType === d.StackedLine
112
+ ), X = i(() => f.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: F } : e.parsing), j = i(() => f.value ? e.dataSets.map((t) => ({
111
113
  ...t,
112
- data: t.data.map((i) => ({
113
- ...i,
114
- [w]: t.label
114
+ data: t.data.map((r) => ({
115
+ ...r,
116
+ [F]: t.label
115
117
  }))
116
- })) : e.dataSets), x = l(
117
- () => W.value.filter((t) => e.visibleIds.includes(t.id))
118
- ), Z = (t) => e.colorsMap[t] || Ge, B = l(
119
- () => x.value.length && x.value.every(
118
+ })) : e.dataSets), A = i(
119
+ () => j.value.filter((t) => e.visibleIds.includes(t.id))
120
+ ), q = (t) => e.colorsMap[t] || je, I = i(
121
+ () => A.value.length && A.value.every(
120
122
  (t) => t.data.length === 1
121
123
  )
122
- ), D = l(() => x.value.map((t, i) => {
123
- const a = Z(t.id), r = b.value ? i !== 0 ? "-1" : "start" : void 0;
124
+ ), J = (t) => (r) => {
125
+ const a = r.chart.data.labels.length - 1;
126
+ let l = Fe;
127
+ return e.chartType === d.Bar && e.indicateIncompleteData && r.index === a ? l = _e : e.chartType === d.StackedLine && (l = Me), h(t, l);
128
+ }, O = i(() => A.value.map((t, r) => {
129
+ const a = q(t.id), l = b.value ? r !== 0 ? "-1" : "start" : void 0, m = e.indicateIncompleteData ? {
130
+ borderDash: (w) => {
131
+ if (w.p1DataIndex === w.chart.data.labels.length - 1)
132
+ return Ie;
133
+ }
134
+ } : void 0, k = J(a);
124
135
  return {
125
136
  ...t,
126
- fill: r,
127
- backgroundColor: h(
128
- a,
129
- e.chartType === u.StackedLine ? 10 : 70
130
- ),
137
+ fill: l,
138
+ segment: m,
139
+ backgroundColor: k,
131
140
  borderColor: a,
132
141
  pointBackgroundColor: a,
133
142
  pointHoverBorderColor: a,
@@ -136,20 +145,22 @@ const Ze = { class: "chart-plane-container" }, Xe = {
136
145
  // draw a bit outside the chart area
137
146
  icon: t.icon || null,
138
147
  iconType: t.iconType || "branded",
139
- [V]: a
148
+ [_]: a
140
149
  // store base color for later use
141
150
  };
142
- })), X = l(
143
- () => e.tooltipTotalType === U.Total ? "Total" : "Mean"
144
- ), O = l(() => ({
145
- type: e.chartType == u.Bar || e.chartType === u.StackedBar ? "bar" : "line",
151
+ })), Q = i(
152
+ () => e.tooltipTotalType === G.Total ? "Total" : "Mean"
153
+ ), ee = (t) => t.filter(
154
+ (r) => !r.dataset.isTotal
155
+ ), N = i(() => ({
156
+ type: e.chartType == d.Bar || e.chartType === d.StackedBar ? "bar" : "line",
146
157
  // Chart Data
147
158
  data: {
148
- datasets: D.value
159
+ datasets: O.value
149
160
  },
150
161
  // Chart Options
151
162
  options: {
152
- parsing: z.value,
163
+ parsing: X.value,
153
164
  interaction: {
154
165
  intersect: !1,
155
166
  mode: f.value ? "point" : "index",
@@ -159,27 +170,27 @@ const Ze = { class: "chart-plane-container" }, Xe = {
159
170
  plugins: {
160
171
  legend: { display: !1 },
161
172
  title: { display: !1 },
162
- hoverVerticalLine: g.value,
173
+ hoverVerticalLine: x.value,
163
174
  // tooltip
164
175
  tooltip: {
165
176
  enabled: !1,
166
177
  position: "average",
167
178
  external: ({ tooltip: t }) => {
168
- d.value = { ...t };
179
+ c.value = { ...t };
169
180
  },
170
181
  callbacks: {
171
182
  footer: (t) => {
172
- const i = t.map((r) => r.parsed.y || 0), a = e.tooltipTotalCalcFn(
173
- i,
183
+ const a = (e.tooltipExcludeTotalItem && t.length > 1 ? ee(t) : t).map((m) => m.parsed.y || 0), l = e.tooltipTotalCalcFn(
184
+ a,
174
185
  e.tooltipTotalType
175
186
  );
176
- return [X.value, String(a)];
187
+ return [Q.value, String(l)];
177
188
  }
178
189
  },
179
- itemSort: (t, i) => {
180
- if (e.tooltipOrder === M.YAxis) {
181
- const a = t.parsed.y || 0, r = i.parsed.y || 0;
182
- return a === r ? 0 : a > r ? -1 : 1;
190
+ itemSort: (t, r) => {
191
+ if (e.tooltipOrder === U.YAxis) {
192
+ const a = t.parsed.y || 0, l = r.parsed.y || 0;
193
+ return a === l ? 0 : a > l ? -1 : 1;
183
194
  }
184
195
  return 0;
185
196
  }
@@ -189,21 +200,21 @@ const Ze = { class: "chart-plane-container" }, Xe = {
189
200
  responsive: !0,
190
201
  maintainAspectRatio: !1,
191
202
  layout: {
192
- padding: Re
203
+ padding: Oe
193
204
  },
194
205
  // basic styles
195
206
  elements: {
196
207
  line: {
197
208
  borderWidth: 2,
198
- tension: 0.3
209
+ tension: 0
199
210
  },
200
211
  point: {
201
- radius: B.value ? 3 : 1,
212
+ radius: I.value ? 3 : 1,
202
213
  hitRadius: 8,
203
214
  borderWidth: 0,
204
215
  hoverRadius: 4,
205
216
  hoverBorderWidth: 2,
206
- pointHoverBackgroundColor: Be
217
+ pointHoverBackgroundColor: Ne
207
218
  },
208
219
  bar: {
209
220
  borderRadius: 4
@@ -213,24 +224,24 @@ const Ze = { class: "chart-plane-container" }, Xe = {
213
224
  // Horizontal Axis (X)
214
225
  x: {
215
226
  beginAtZero: !0,
216
- offset: !g.value || B.value,
227
+ offset: !x.value || I.value,
217
228
  border: { display: !1 },
218
229
  stacked: b.value,
219
230
  // stack on top of each other
220
231
  // ticks
221
232
  ticks: {
222
- color: N,
223
- font: F,
233
+ color: M,
234
+ font: Y,
224
235
  padding: 4,
225
236
  maxRotation: 0,
226
237
  autoSkip: !e.truncateTickLabels,
227
238
  autoSkipPadding: 8,
228
- callback: function(t, i, a) {
229
- const r = this.getLabelForValue(t), ee = g.value && !f.value ? a.length - 1 : a.length, te = this.chart.scales?.x?.width / ee - De;
230
- return G({
231
- label: r,
239
+ callback: function(t, r, a) {
240
+ const l = this.getLabelForValue(t), m = x.value && !f.value ? a.length - 1 : a.length, k = this.chart.scales?.x?.width / m - Pe;
241
+ return z({
242
+ label: l,
232
243
  format: e.xAxisFormat,
233
- availableSpace: te,
244
+ availableSpace: k,
234
245
  truncate: e.truncateTickLabels
235
246
  });
236
247
  }
@@ -253,12 +264,12 @@ const Ze = { class: "chart-plane-container" }, Xe = {
253
264
  // stack on top of each other
254
265
  // ticks
255
266
  ticks: {
256
- color: N,
257
- font: F,
267
+ color: M,
268
+ font: Y,
258
269
  count: e.tickCount + 1,
259
270
  padding: 8,
260
271
  min: 0,
261
- callback: (t) => e.valuePrefix + Le(t, e.yAxisFormat) + e.valueSuffix
272
+ callback: (t) => e.valuePrefix + De(t, e.yAxisFormat) + e.valueSuffix
262
273
  },
263
274
  // grid lines
264
275
  grid: {
@@ -269,102 +280,102 @@ const Ze = { class: "chart-plane-container" }, Xe = {
269
280
  }
270
281
  }
271
282
  }
272
- })), I = k(null), d = k(null), { position: H } = Ve(
273
- m,
274
- I,
275
- d,
283
+ })), P = S(null), c = S(null), { position: H } = Ue(
284
+ v,
285
+ P,
286
+ c,
276
287
  e.tooltipRespectsTopEdge
277
- ), j = l(() => ({
288
+ ), te = i(() => ({
278
289
  left: `${H.value.left}px`,
279
290
  top: `${H.value.top}px`,
280
- opacity: d.value?.opacity || 0
281
- })), q = l(
282
- () => (e.compactHeader ? Ie : Oe) + "px"
291
+ opacity: c.value?.opacity || 0
292
+ })), ae = i(
293
+ () => (e.compactHeader ? we : He) + "px"
283
294
  );
284
- v(
295
+ T(
285
296
  () => e.highlightedId,
286
297
  (t) => {
287
- n && ($e(t) ? Q() : J(t), n.update());
298
+ n && (Je(t) ? le() : oe(t), n.update());
288
299
  }
289
300
  );
290
- const J = (t) => {
301
+ const oe = (t) => {
291
302
  (n?.data.datasets || []).forEach((a) => {
292
- ze(a);
293
- const r = a[V];
294
- a.id === t ? e.chartType === u.StackedLine && (a.backgroundColor = h(
295
- r,
296
- He
297
- )) : (a.backgroundColor = h(r, y), a.borderColor = h(r, y), a.pointBackgroundColor = h(r, y), a.pointHoverBorderColor = h(r, y));
303
+ Qe(a);
304
+ const l = a[_];
305
+ a.id === t ? e.chartType === d.StackedLine && (a.backgroundColor = h(
306
+ l,
307
+ Ve
308
+ )) : (a.backgroundColor = h(l, y), a.borderColor = h(l, y), a.pointBackgroundColor = h(l, y), a.pointHoverBorderColor = h(l, y));
298
309
  });
299
- }, Q = () => {
300
- (n?.data.datasets || []).forEach(We);
310
+ }, le = () => {
311
+ (n?.data.datasets || []).forEach(et);
301
312
  };
302
- return (t, i) => (p(), A("div", Ze, [
303
- s(c) || o.keepSubheaderVisible ? (p(), A("div", Xe, [
304
- ie(Fe, {
305
- "chart-type": s(T),
306
- "onUpdate:chart-type": i[0] || (i[0] = (a) => ne(T) ? T.value = a : null),
307
- "type-switcher": s(c) ? o.typeSwitcher : !1,
308
- header: s(c) ? o.header : null,
313
+ return (t, r) => (p(), E("div", tt, [
314
+ s(u) || o.keepSubheaderVisible ? (p(), E("div", at, [
315
+ de($e, {
316
+ "chart-type": s(C),
317
+ "onUpdate:chart-type": r[0] || (r[0] = (a) => ce(C) ? C.value = a : null),
318
+ "type-switcher": s(u) ? o.typeSwitcher : !1,
319
+ header: s(u) ? o.header : null,
309
320
  subheader: o.subheader,
310
321
  "subheader-tooltip": o.subheaderTooltip,
311
322
  "trend-tooltip": o.trendTooltip,
312
323
  compact: o.compactHeader,
313
- "trend-value": s(c) ? o.trendValue : null,
324
+ "trend-value": s(u) ? o.trendValue : null,
314
325
  "trend-direction": o.trendDirection,
315
326
  "note-text": o.noteText
316
- }, se({ _: 2 }, [
327
+ }, ue({ _: 2 }, [
317
328
  t.$slots["subheader-tooltip"] ? {
318
329
  name: "subheader-tooltip",
319
- fn: ue(() => [
320
- de(t.$slots, "subheader-tooltip", {}, void 0, !0)
330
+ fn: fe(() => [
331
+ pe(t.$slots, "subheader-tooltip", {}, void 0, !0)
321
332
  ]),
322
333
  key: "0"
323
334
  } : void 0
324
335
  ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction", "note-text"])
325
- ])) : S("", !0),
326
- s(c) ? (p(), A("section", je, [
327
- L("div", qe, [
328
- L("canvas", {
336
+ ])) : L("", !0),
337
+ s(u) ? (p(), E("section", ot, [
338
+ R("div", lt, [
339
+ R("canvas", {
329
340
  ref_key: "chartRef",
330
- ref: m,
341
+ ref: v,
331
342
  class: "chart__canvas"
332
343
  }, null, 512),
333
- L("div", {
344
+ R("div", {
334
345
  ref_key: "tooltipRef",
335
- ref: I,
346
+ ref: P,
336
347
  class: "chart__tooltip",
337
- style: ce(s(j))
348
+ style: he(s(te))
338
349
  }, [
339
- d.value ? (p(), E(Ne, {
350
+ c.value ? (p(), D(Ge, {
340
351
  key: 0,
341
352
  "totals-chart": s(f),
342
- title: String(d.value.title),
343
- "data-points": d.value.dataPoints,
353
+ title: String(c.value.title),
354
+ "data-points": c.value.dataPoints,
344
355
  "x-axis-format": o.xAxisFormat,
345
356
  "y-axis-format": o.yAxisFormat,
346
357
  "x-axis-date-interval": o.xAxisDateInterval,
347
- "total-label": d.value.footer?.[0],
348
- "total-value": Number(d.value.footer?.[1]),
358
+ "total-label": c.value.footer?.[0],
359
+ "total-value": Number(c.value.footer?.[1]),
349
360
  "value-suffix": o.valueSuffix,
350
361
  "value-prefix": o.valuePrefix
351
- }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : S("", !0)
362
+ }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : L("", !0)
352
363
  ], 4)
353
364
  ])
354
- ])) : o.loading ? (p(), E(Ye, {
365
+ ])) : o.loading ? (p(), D(Xe, {
355
366
  key: 2,
356
367
  class: "chart-loading"
357
- })) : s(R) ? (p(), E(s(Ue), {
368
+ })) : s(B) ? (p(), D(s(Ze), {
358
369
  key: 3,
359
370
  class: "chart-empty",
360
371
  variant: null,
361
372
  title: o.noDataTitle,
362
373
  subtitle: o.noDataSubtitle,
363
374
  "icon-name": o.noDataIcon
364
- }, null, 8, ["title", "subtitle", "icon-name"])) : S("", !0)
375
+ }, null, 8, ["title", "subtitle", "icon-name"])) : L("", !0)
365
376
  ]));
366
377
  }
367
378
  });
368
379
  export {
369
- mt as default
380
+ xt as default
370
381
  };
@@ -176,4 +176,21 @@ export declare const chartStoryArgs: {
176
176
  };
177
177
  options: TooltipOrder[];
178
178
  };
179
+ colorVariant: {
180
+ description: string;
181
+ control: string;
182
+ options: string[];
183
+ };
184
+ indicateIncompleteData: {
185
+ description: string;
186
+ control: {
187
+ type: string;
188
+ };
189
+ };
190
+ tooltipExcludeTotalItem: {
191
+ description: string;
192
+ control: {
193
+ type: string;
194
+ };
195
+ };
179
196
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ChartTooltip.vue2.js";
2
2
  /* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css"; //*');
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3315b68f"]]);
3
+ // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css"; //*');
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3d0780bb"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3315b68f_lang.css"; import { defineComponent as m, openBlock as a, createElementBlock as o, createBlock as c, createCommentVNode as r, Fragment as y, renderList as v, createElementVNode as f, normalizeStyle as h, unref as l, createVNode as i, withCtx as n, createTextVNode as u, toDisplayString as s } from "vue";
1
+ import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_3d0780bb_lang.css"; import { defineComponent as m, openBlock as a, createElementBlock as o, createBlock as f, createCommentVNode as r, Fragment as y, renderList as v, createElementVNode as c, normalizeStyle as h, unref as l, createVNode as i, withCtx as n, createTextVNode as u, toDisplayString as s } from "vue";
2
2
  import d from "../typography/v4/Typography.vue.js";
3
3
  import b from "../icon/v4/IconV4.vue.js";
4
4
  import "../icon/v4/IconFlag.vue.js";
@@ -26,7 +26,7 @@ const C = { class: "chart-tooltip" }, g = {
26
26
  },
27
27
  setup(t) {
28
28
  return (F, S) => (a(), o("div", C, [
29
- t.title ? (a(), c(k, {
29
+ t.title ? (a(), f(k, {
30
30
  key: 0,
31
31
  title: t.title,
32
32
  "data-points": t.dataPoints,
@@ -39,20 +39,20 @@ const C = { class: "chart-tooltip" }, g = {
39
39
  key: e.datasetIndex,
40
40
  class: "list__item"
41
41
  }, [
42
- f("span", {
42
+ c("span", {
43
43
  class: "color-box",
44
44
  style: h({
45
45
  backgroundColor: String(e.dataset.pointBackgroundColor)
46
46
  })
47
47
  }, null, 4),
48
- e.dataset.icon ? (a(), c(l(b), {
48
+ e.dataset.icon ? (a(), f(l(b), {
49
49
  key: 0,
50
50
  class: "platform-icon",
51
51
  type: e.dataset.iconType,
52
52
  name: e.dataset.icon,
53
53
  size: "16px"
54
54
  }, null, 8, ["type", "name"])) : r("", !0),
55
- f("div", V, [
55
+ c("div", V, [
56
56
  i(l(d), {
57
57
  variant: "body2",
58
58
  class: "flex-grow truncated-label",
@@ -66,7 +66,7 @@ const C = { class: "chart-tooltip" }, g = {
66
66
  ]),
67
67
  i(l(d), { variant: "body2" }, {
68
68
  default: n(() => [
69
- u(s(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat, !0) + t.valueSuffix), 1)
69
+ u(s(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat, !0, !1) + t.valueSuffix), 1)
70
70
  ]),
71
71
  _: 2
72
72
  }, 1024)
@@ -1,7 +1,7 @@
1
1
  import o from "./TooltipHeader.vue2.js";
2
2
  /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-5160f12d"]]);
3
+ // import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-da3532aa"]]);
5
5
  export {
6
- s as default
6
+ p as default
7
7
  };