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

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