@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,33 +1,35 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_lang.css"; import { defineComponent as j, useCssVars as q, unref as s, computed as a, ref as C, onMounted as J, watch as g, nextTick as Q, openBlock as f, createElementBlock as X, createElementVNode as h, createVNode as ee, isRef as te, createSlots as ae, withCtx as oe, renderSlot as re, normalizeStyle as le, createBlock as b, createCommentVNode as I } from "vue";
2
- import { Chart as H, ArcElement as ie, LineElement as ne, BarElement as se, PointElement as ce, LineController as de, BarController as ue, PieController as pe, ScatterController as fe, CategoryScale as he, LinearScale as me, Filler as ve, Tooltip as ye } from "chart.js";
3
- import { HoverVerticalLine as Ce } from "./plugins/HoverVerticalLine.js";
4
- import { formatValue as O, calcStepSize as ge } from "./utils/utils.js";
5
- import { DEFAULT_TICK_COUNT as be, TOTALS_HELPER_KEY as P, POINT_BORDER_COLOR as Te, TICK_LABEL_COLOR as F, TICK_LABEL_FONT as N, GRID_LINE_COLOR as M, HEADER_HEIGHT as ke, COMPACT_HEADER_HEIGHT as xe } from "./consts.js";
6
- import { ChartType as i } from "./types.js";
7
- import { useTooltipPosition as Se } from "./composables/useTooltipPosition.js";
8
- import Le from "./ChartTooltip.vue.js";
9
- import { hexColorToRgba as Ee } from "../../utils/color.js";
10
- import { useChartValues as Be } from "./composables/useChartValues.js";
11
- import Ae from "./ChartHeader.vue.js";
12
- import { useVModel as Re } from "@vueuse/core";
13
- import we from "../emptyState/v4/EmptyStateV4.vue.js";
14
- import Ve from "./ChartLoader.vue.js";
15
- import { useColorsMap as De } from "./composables/useColorsMap.js";
16
- const Ie = {
1
+ import "../../ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css"; import { defineComponent as q, useCssVars as J, unref as c, computed as o, ref as C, onMounted as Q, watch as b, nextTick as X, openBlock as h, createElementBlock as tt, createElementVNode as m, createVNode as et, isRef as at, createSlots as ot, withCtx as lt, renderSlot as rt, normalizeStyle as it, createBlock as g, createCommentVNode as H } from "vue";
2
+ import { Chart as O, ArcElement as nt, LineElement as st, BarElement as ct, PointElement as dt, LineController as ut, BarController as pt, PieController as ft, ScatterController as ht, CategoryScale as mt, LinearScale as vt, Filler as yt, Tooltip as Tt } from "chart.js";
3
+ import { HoverVerticalLine as Ct } from "./plugins/HoverVerticalLine.js";
4
+ import { formatValue as F, calcStepSize as bt } from "./utils/utils.js";
5
+ import { DEFAULT_TICK_COUNT as gt, TOTALS_HELPER_KEY as I, POINT_BORDER_COLOR as kt, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as N, GRID_LINE_COLOR as M, HEADER_HEIGHT as xt, COMPACT_HEADER_HEIGHT as St } from "./consts.js";
6
+ import { ChartType as n } from "./types.js";
7
+ import { useTooltipPosition as Lt } from "./composables/useTooltipPosition.js";
8
+ import Et from "./ChartTooltip.vue.js";
9
+ import { hexColorToRgba as At } from "../../utils/color.js";
10
+ import { useChartValues as Bt } from "./composables/useChartValues.js";
11
+ import Rt from "./ChartHeader.vue.js";
12
+ import { useVModel as wt } from "@vueuse/core";
13
+ import Dt from "../emptyState/v4/EmptyStateV4.vue.js";
14
+ import Vt from "./ChartLoader.vue.js";
15
+ import { DEFAULT_CHART_COLOR as Ht } from "./colorPalette.js";
16
+ import { TotalType as z, calculateTotal as Ot } from "../../utils/totals.js";
17
+ const Ft = {
17
18
  key: 0,
18
19
  class: "chart-plane"
19
- }, He = { class: "header-wrapper" }, Oe = { class: "chart" }, Je = /* @__PURE__ */ j({
20
+ }, It = { class: "header-wrapper" }, Pt = { class: "chart" }, te = /* @__PURE__ */ q({
20
21
  __name: "ChartPlane",
21
22
  props: {
22
23
  dataSets: { default: () => [] },
23
24
  visibleIds: { default: () => [] },
24
- chartType: { default: i.Line },
25
+ chartType: { default: n.Line },
25
26
  parsing: { default: void 0 },
26
27
  xAxisFormat: { default: "string" },
27
28
  yAxisFormat: { default: "number" },
28
- tickCount: { default: be },
29
+ tickCount: { default: gt },
29
30
  header: { default: "" },
30
31
  subheader: { default: "" },
32
+ subheaderTooltip: { default: null },
31
33
  loading: { type: Boolean, default: !1 },
32
34
  noDataIcon: { default: "file-search" },
33
35
  noDataTitle: { default: "No data to display" },
@@ -37,108 +39,117 @@ const Ie = {
37
39
  height: { default: "100%" },
38
40
  compactHeader: { type: Boolean, default: !1 },
39
41
  tooltipRespectsTopEdge: { type: Boolean, default: !0 },
42
+ tooltipTotalType: { default: z.Total },
43
+ tooltipTotalCalcFn: { type: Function, default: Ot },
40
44
  trendValue: { default: null },
41
45
  trendDirection: { default: "up" },
42
- totalsChart: { type: Boolean, default: !1 }
46
+ trendTooltip: { default: null },
47
+ totalsChart: { type: Boolean, default: !1 },
48
+ colorsMap: { default: () => ({}) }
43
49
  },
44
50
  emits: ["update:chartType"],
45
- setup(o, { emit: z }) {
46
- const e = o;
47
- q((t) => ({
48
- "86c5ce4e": s(Z),
49
- "27543fc4": o.height
50
- })), H.register(
51
- ie,
52
- ne,
53
- se,
54
- ce,
55
- de,
56
- ue,
57
- pe,
58
- fe,
59
- he,
60
- me,
61
- ve,
62
- ye,
63
- Ce
51
+ setup(a, { emit: K }) {
52
+ const t = a;
53
+ J((e) => ({
54
+ "4640c185": c(j),
55
+ "07515470": a.height
56
+ })), O.register(
57
+ nt,
58
+ st,
59
+ ct,
60
+ dt,
61
+ ut,
62
+ pt,
63
+ ft,
64
+ ht,
65
+ mt,
66
+ vt,
67
+ yt,
68
+ Tt,
69
+ Ct
64
70
  );
65
- const m = Re(e, "chartType", z), K = a(
66
- () => e.withAnimation ? "" : "none"
67
- ), c = C(null);
68
- let n = null;
69
- const T = a(() => e.dataSets.length === 0), k = a(() => !e.loading && !T.value), v = () => {
70
- c.value && (n && n.destroy(), n = new H(c.value, A.value));
71
- }, _ = () => {
72
- n && (n.data.datasets = E.value, n.options = A.value.options, n.update(K.value));
71
+ const v = wt(t, "chartType", K), U = o(
72
+ () => t.withAnimation ? "" : "none"
73
+ ), d = C(null);
74
+ let s = null;
75
+ const k = o(() => t.dataSets.length === 0), x = o(() => !t.loading && !k.value), y = () => {
76
+ d.value && (s && s.destroy(), s = new O(d.value, B.value));
77
+ }, $ = () => {
78
+ s && (s.data.datasets = A.value, s.options = B.value.options, s.update(U.value));
73
79
  };
74
- J(v), g(() => e.chartType, v), g(k, async (t) => {
75
- t && (await Q(), v());
76
- }), g([() => e.visibleIds, () => e.dataSets], _);
77
- const d = a(() => e.totalsChart), u = a(
78
- () => e.chartType === i.StackedLine || e.chartType === i.StackedBar || d.value
79
- ), x = a(
80
- () => e.chartType === i.Line || e.chartType === i.StackedLine
81
- ), S = a(() => d.value ? { ...e.parsing, xAxisKey: P } : e.parsing), L = a(() => d.value ? e.dataSets.map((t) => ({
82
- ...t,
83
- data: t.data.map((r) => ({
80
+ Q(y), b(() => t.chartType, y), b(x, async (e) => {
81
+ e && (await X(), y());
82
+ }), b([() => t.visibleIds, () => t.dataSets], $);
83
+ const u = o(() => t.totalsChart), p = o(
84
+ () => t.chartType === n.StackedLine || t.chartType === n.StackedBar || u.value
85
+ ), S = o(
86
+ () => t.chartType === n.Line || t.chartType === n.StackedLine
87
+ ), L = o(() => u.value ? { ...t.parsing, xAxisKey: I } : t.parsing), G = o(() => u.value ? t.dataSets.map((e) => ({
88
+ ...e,
89
+ data: e.data.map((r) => ({
84
90
  ...r,
85
- [P]: t.label
91
+ [I]: e.label
86
92
  }))
87
- })) : e.dataSets), U = a(() => e.visibleIds || []), p = a(
88
- () => L.value.filter((t) => e.visibleIds.includes(t.id))
89
- ), { colorsMap: $ } = De({ dataSets: L, visibleIds: U }), E = a(() => p.value.map((t) => {
90
- const r = $.value[t.id];
93
+ })) : t.dataSets), f = o(
94
+ () => G.value.filter((e) => t.visibleIds.includes(e.id))
95
+ ), W = (e) => t.colorsMap[e] || Ht, E = o(
96
+ () => f.value.length && f.value.every(
97
+ (e) => e.data.length === 1
98
+ )
99
+ ), A = o(() => f.value.map((e, r) => {
100
+ const i = W(e.id), T = p.value ? r !== 0 ? "-1" : "start" : void 0;
91
101
  return {
92
- ...t,
93
- fill: u.value ? "start" : void 0,
94
- backgroundColor: Ee(
95
- r,
96
- e.chartType === i.StackedLine ? 10 : 70
102
+ ...e,
103
+ fill: T,
104
+ backgroundColor: At(
105
+ i,
106
+ t.chartType === n.StackedLine ? 10 : 70
97
107
  ),
98
- borderColor: r,
99
- pointBackgroundColor: r,
100
- pointHoverBorderColor: r,
108
+ borderColor: i,
109
+ pointBackgroundColor: i,
110
+ pointHoverBorderColor: i,
101
111
  maxBarThickness: 50,
102
112
  clip: 5,
103
113
  // draw a bit outside the chart area
104
- icon: t.icon || null,
105
- iconType: t.iconType || "branded"
114
+ icon: e.icon || null,
115
+ iconType: e.iconType || "branded"
106
116
  };
107
- })), B = a(
108
- () => p.value.length && p.value.every(
109
- (t) => t.data.length === 1
110
- )
111
- ), A = a(
117
+ })), _ = o(
118
+ () => t.tooltipTotalType === z.Total ? "Total" : "Mean"
119
+ ), B = o(
112
120
  () => ({
113
- type: e.chartType == i.Bar || e.chartType === i.StackedBar ? "bar" : "line",
121
+ type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
114
122
  // Chart Data
115
123
  data: {
116
- datasets: E.value
124
+ datasets: A.value
117
125
  },
118
126
  // Chart Options
119
127
  options: {
120
- parsing: S.value,
128
+ parsing: L.value,
121
129
  interaction: {
122
130
  intersect: !1,
123
- mode: d.value ? "point" : "index",
131
+ mode: u.value ? "point" : "index",
124
132
  axis: "x"
125
133
  },
126
134
  // plugins
127
135
  plugins: {
128
136
  legend: { display: !1 },
129
137
  title: { display: !1 },
130
- hoverVerticalLine: x.value,
138
+ hoverVerticalLine: S.value,
131
139
  // tooltip
132
140
  tooltip: {
133
141
  enabled: !1,
134
142
  position: "average",
135
- external: ({ tooltip: t }) => {
136
- l.value = { ...t };
143
+ external: ({ tooltip: e }) => {
144
+ l.value = { ...e };
137
145
  },
138
146
  callbacks: {
139
- footer: (t) => {
140
- const r = t.reduce((y, Y) => y + (Y.parsed.y || 0), 0);
141
- return ["Total", String(r)];
147
+ footer: (e) => {
148
+ const r = e.map((T) => T.parsed.y || 0), i = t.tooltipTotalCalcFn(
149
+ r,
150
+ t.tooltipTotalType
151
+ );
152
+ return [_.value, String(i)];
142
153
  }
143
154
  }
144
155
  }
@@ -160,12 +171,12 @@ const Ie = {
160
171
  tension: 0.3
161
172
  },
162
173
  point: {
163
- radius: B.value ? 3 : 1,
174
+ radius: E.value ? 3 : 1,
164
175
  hitRadius: 8,
165
176
  borderWidth: 0,
166
177
  hoverRadius: 4,
167
178
  hoverBorderWidth: 2,
168
- pointHoverBackgroundColor: Te
179
+ pointHoverBackgroundColor: kt
169
180
  },
170
181
  bar: {
171
182
  borderRadius: 4
@@ -175,19 +186,19 @@ const Ie = {
175
186
  // Horizontal Axis (X)
176
187
  x: {
177
188
  beginAtZero: !0,
178
- offset: !x.value || B.value,
189
+ offset: !S.value || E.value,
179
190
  border: { display: !1 },
180
- stacked: u.value,
191
+ stacked: p.value,
181
192
  // stack on top of each other
182
193
  // ticks
183
194
  ticks: {
184
- color: F,
195
+ color: P,
185
196
  font: N,
186
197
  padding: 4,
187
- callback: function(t) {
188
- return O(
189
- this.getLabelForValue(t),
190
- e.xAxisFormat
198
+ callback: function(e) {
199
+ return F(
200
+ this.getLabelForValue(e),
201
+ t.xAxisFormat
191
202
  );
192
203
  }
193
204
  },
@@ -205,17 +216,17 @@ const Ie = {
205
216
  beginAtZero: !0,
206
217
  border: { display: !1 },
207
218
  // hide left borderline
208
- stacked: u.value,
219
+ stacked: p.value,
209
220
  // stack on top of each other
210
221
  // ticks
211
222
  ticks: {
212
- color: F,
223
+ color: P,
213
224
  font: N,
214
225
  padding: 8,
215
- stepSize: D.value,
216
- min: V.value,
217
- max: D.value * e.tickCount,
218
- callback: (t) => O(t, e.yAxisFormat)
226
+ stepSize: V.value,
227
+ min: D.value,
228
+ max: V.value * t.tickCount,
229
+ callback: (e) => F(e, t.yAxisFormat)
219
230
  },
220
231
  // grid lines
221
232
  grid: {
@@ -227,80 +238,82 @@ const Ie = {
227
238
  }
228
239
  }
229
240
  })
230
- ), R = C(null), l = C(null), { position: w } = Se(
231
- c,
241
+ ), R = C(null), l = C(null), { position: w } = Lt(
242
+ d,
232
243
  R,
233
244
  l,
234
- e.tooltipRespectsTopEdge
235
- ), G = a(() => ({
245
+ t.tooltipRespectsTopEdge
246
+ ), Z = o(() => ({
236
247
  left: `${w.value.left}px`,
237
248
  top: `${w.value.top}px`,
238
249
  opacity: l.value?.opacity || 0
239
- })), { minValue: V, maxValue: W } = Be({
240
- parsingConfig: S.value,
241
- dataSets: p,
242
- isStacked: u
243
- }), D = a(
244
- () => ge(V.value, W.value, e.tickCount)
245
- ), Z = a(
246
- () => (e.compactHeader ? xe : ke) + "px"
250
+ })), { minValue: D, maxValue: Y } = Bt({
251
+ parsingConfig: L.value,
252
+ dataSets: f,
253
+ isStacked: p
254
+ }), V = o(
255
+ () => bt(D.value, Y.value, t.tickCount)
256
+ ), j = o(
257
+ () => (t.compactHeader ? St : xt) + "px"
247
258
  );
248
- return (t, r) => s(k) ? (f(), X("section", Ie, [
249
- h("div", He, [
250
- ee(Ae, {
251
- "chart-type": s(m),
252
- "onUpdate:chart-type": r[0] || (r[0] = (y) => te(m) ? m.value = y : null),
253
- "type-switcher": o.typeSwitcher,
254
- header: o.header,
255
- subheader: o.subheader,
256
- compact: o.compactHeader,
257
- "trend-value": o.trendValue,
258
- "trend-direction": o.trendDirection
259
- }, ae({ _: 2 }, [
260
- t.$slots["subheader-tooltip"] ? {
259
+ return (e, r) => c(x) ? (h(), tt("section", Ft, [
260
+ m("div", It, [
261
+ et(Rt, {
262
+ "chart-type": c(v),
263
+ "onUpdate:chart-type": r[0] || (r[0] = (i) => at(v) ? v.value = i : null),
264
+ "type-switcher": a.typeSwitcher,
265
+ header: a.header,
266
+ subheader: a.subheader,
267
+ "subheader-tooltip": a.subheaderTooltip,
268
+ "trend-tooltip": a.trendTooltip,
269
+ compact: a.compactHeader,
270
+ "trend-value": a.trendValue,
271
+ "trend-direction": a.trendDirection
272
+ }, ot({ _: 2 }, [
273
+ e.$slots["subheader-tooltip"] ? {
261
274
  name: "subheader-tooltip",
262
- fn: oe(() => [
263
- re(t.$slots, "subheader-tooltip", {}, void 0, !0)
275
+ fn: lt(() => [
276
+ rt(e.$slots, "subheader-tooltip", {}, void 0, !0)
264
277
  ]),
265
278
  key: "0"
266
279
  } : void 0
267
- ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "compact", "trend-value", "trend-direction"])
280
+ ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
268
281
  ]),
269
- h("div", Oe, [
270
- h("canvas", {
282
+ m("div", Pt, [
283
+ m("canvas", {
271
284
  ref_key: "chartRef",
272
- ref: c,
285
+ ref: d,
273
286
  class: "chart__canvas"
274
287
  }, null, 512),
275
- h("div", {
288
+ m("div", {
276
289
  ref_key: "tooltipRef",
277
290
  ref: R,
278
291
  class: "chart__tooltip",
279
- style: le(s(G))
292
+ style: it(c(Z))
280
293
  }, [
281
- l.value ? (f(), b(Le, {
294
+ l.value ? (h(), g(Et, {
282
295
  key: 0,
283
296
  title: String(l.value.title),
284
297
  "data-points": l.value.dataPoints,
285
- "x-axis-format": o.xAxisFormat,
286
- "y-axis-format": o.yAxisFormat,
298
+ "x-axis-format": a.xAxisFormat,
299
+ "y-axis-format": a.yAxisFormat,
287
300
  "total-label": l.value.footer[0],
288
301
  "total-value": Number(l.value.footer[1])
289
- }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : I("", !0)
302
+ }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : H("", !0)
290
303
  ], 4)
291
304
  ])
292
- ])) : o.loading ? (f(), b(Ve, {
305
+ ])) : a.loading ? (h(), g(Vt, {
293
306
  key: 1,
294
307
  class: "chart-loading"
295
- })) : s(T) ? (f(), b(s(we), {
308
+ })) : c(k) ? (h(), g(c(Dt), {
296
309
  key: 2,
297
310
  class: "chart-empty",
298
- title: o.noDataTitle,
299
- subtitle: o.noDataSubtitle,
300
- "icon-name": o.noDataIcon
301
- }, null, 8, ["title", "subtitle", "icon-name"])) : I("", !0);
311
+ title: a.noDataTitle,
312
+ subtitle: a.noDataSubtitle,
313
+ "icon-name": a.noDataIcon
314
+ }, null, 8, ["title", "subtitle", "icon-name"])) : H("", !0);
302
315
  }
303
316
  });
304
317
  export {
305
- Je as default
318
+ te as default
306
319
  };
@@ -0,0 +1,37 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ selected: unknown;
3
+ options: unknown[];
4
+ optionNameKey: string;
5
+ }>, {
6
+ options: () => any[];
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:selected": (option: unknown) => void;
9
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
+ selected: unknown;
11
+ options: unknown[];
12
+ optionNameKey: string;
13
+ }>, {
14
+ options: () => any[];
15
+ }>>> & {
16
+ "onUpdate:selected"?: (option: unknown) => any;
17
+ }, {
18
+ options: unknown[];
19
+ }>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
@@ -0,0 +1,45 @@
1
+ import { defineComponent as l, openBlock as m, createElementBlock as s, createVNode as r, unref as n, isRef as d, withCtx as a, mergeProps as c } from "vue";
2
+ import u from "../dropdown/v4/DropdownV4.vue.js";
3
+ import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
+ import f from "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
+ import "../dropdown/v4/ChipDropdownTrigger.vue.js";
6
+ import "../dropdown/v4/AppDropdownTrigger.vue.js";
7
+ import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
8
+ import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
9
+ import "../dropdown/v4/TreeDropdown.vue.js";
10
+ import "../dropdown/v4/OptionV4.vue.js";
11
+ import "../dropdown/v4/ConditionalDropdown.vue.js";
12
+ import { useVModel as g } from "@vueuse/core";
13
+ const y = { class: "legend-sorting" }, L = /* @__PURE__ */ l({
14
+ __name: "LegendSorting",
15
+ props: {
16
+ selected: null,
17
+ options: { default: () => [] },
18
+ optionNameKey: null
19
+ },
20
+ emits: ["update:selected"],
21
+ setup(o, { emit: p }) {
22
+ const t = g(o, "selected", p);
23
+ return (v, i) => (m(), s("div", y, [
24
+ r(n(u), {
25
+ selected: n(t),
26
+ "onUpdate:selected": i[0] || (i[0] = (e) => d(t) ? t.value = e : null),
27
+ "display-value": (e) => e[o.optionNameKey],
28
+ options: o.options,
29
+ "option-name-key": o.optionNameKey,
30
+ placement: "bottom-end"
31
+ }, {
32
+ "dropdown-trigger": a(({ buttonTriggerProps: e }) => [
33
+ r(n(f), c(e, {
34
+ "icon-name": "funnel-simple",
35
+ "icon-type": "regular"
36
+ }), null, 16)
37
+ ]),
38
+ _: 1
39
+ }, 8, ["selected", "display-value", "options", "option-name-key"])
40
+ ]));
41
+ }
42
+ });
43
+ export {
44
+ L as default
45
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./LegendSorting.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -10,6 +10,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
10
10
  }>>> & {
11
11
  "onUpdate:chartType"?: (type: ChartType) => any;
12
12
  }, {}>, {
13
+ "before-chart-type"?(_: {}): any;
13
14
  metric?(_: {}): any;
14
15
  breakdowns?(_: {}): any;
15
16
  }>;
@@ -1,7 +1,7 @@
1
1
  import e from "./SettingsHeader.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css"; //*');
4
- const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-9b6cd9d9"]]);
3
+ // import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css"; //*');
4
+ const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-01f78cd7"]]);
5
5
  export {
6
- d as default
6
+ c as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css"; import { defineComponent as h, computed as g, openBlock as y, createElementBlock as f, createElementVNode as r, normalizeClass as a, createVNode as l, unref as t, isRef as v, withCtx as T, mergeProps as w, renderSlot as p } from "vue";
2
- import b from "../dropdown/v4/DropdownV4.vue.js";
1
+ import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css"; import { defineComponent as h, computed as g, openBlock as y, createElementBlock as f, createElementVNode as r, normalizeClass as l, renderSlot as i, createVNode as p, unref as t, isRef as v, withCtx as T, mergeProps as b } from "vue";
2
+ import w from "../dropdown/v4/DropdownV4.vue.js";
3
3
  import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
4
  import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
5
  import "../dropdown/v4/ChipDropdownTrigger.vue.js";
@@ -10,7 +10,7 @@ import "../dropdown/v4/TreeDropdown.vue.js";
10
10
  import "../dropdown/v4/OptionV4.vue.js";
11
11
  import "../dropdown/v4/ConditionalDropdown.vue.js";
12
12
  import { DROPDOWN_TYPE_OPTIONS as c } from "./consts.js";
13
- const _ = { class: "settings-header-container" }, B = { class: "chart-type-selection" }, x = /* @__PURE__ */ h({
13
+ const B = { class: "settings-header-container" }, C = { class: "chart-type-selection" }, H = /* @__PURE__ */ h({
14
14
  __name: "SettingsHeader",
15
15
  props: {
16
16
  chartType: null,
@@ -25,41 +25,42 @@ const _ = { class: "settings-header-container" }, B = { class: "chart-type-selec
25
25
  set(e) {
26
26
  m("update:chartType", e.id);
27
27
  }
28
- }), i = (e) => `Chart: ${e.name}`;
29
- return (e, d) => (y(), f("div", _, [
28
+ }), d = (e) => `Chart: ${e.name}`;
29
+ return (e, a) => (y(), f("div", B, [
30
30
  r("div", {
31
- class: a(["settings", { "settings-spacer": !s.hideLegend }])
31
+ class: l(["settings", { "settings-spacer": !s.hideLegend }])
32
32
  }, [
33
- r("div", B, [
34
- l(t(b), {
33
+ i(e.$slots, "before-chart-type", {}, void 0, !0),
34
+ r("div", C, [
35
+ p(t(w), {
35
36
  selected: t(o),
36
- "onUpdate:selected": d[0] || (d[0] = (n) => v(o) ? o.value = n : null),
37
+ "onUpdate:selected": a[0] || (a[0] = (n) => v(o) ? o.value = n : null),
37
38
  options: t(c),
38
39
  "option-name-key": "name",
39
- "display-value": i,
40
+ "display-value": d,
40
41
  placeholder: "Select chart type",
41
42
  size: "small"
42
43
  }, {
43
44
  "dropdown-trigger": T(({ buttonTriggerProps: n }) => [
44
- l(t(k), w(n, {
45
- label: i(t(o))
45
+ p(t(k), b(n, {
46
+ label: d(t(o))
46
47
  }), null, 16, ["label"])
47
48
  ]),
48
49
  _: 1
49
50
  }, 8, ["selected", "options"])
50
51
  ]),
51
52
  r("div", null, [
52
- p(e.$slots, "metric", {}, void 0, !0)
53
+ i(e.$slots, "metric", {}, void 0, !0)
53
54
  ])
54
55
  ], 2),
55
56
  r("div", {
56
- class: a(["breakdowns", { "breakdowns-border": !s.hideLegend }])
57
+ class: l(["breakdowns", { "breakdowns-border": !s.hideLegend }])
57
58
  }, [
58
- p(e.$slots, "breakdowns", {}, void 0, !0)
59
+ i(e.$slots, "breakdowns", {}, void 0, !0)
59
60
  ], 2)
60
61
  ]));
61
62
  }
62
63
  });
63
64
  export {
64
- x as default
65
+ H as default
65
66
  };
@@ -0,0 +1,4 @@
1
+ import { HexColor } from '@is-ssp/chart/types';
2
+ export declare const DEFAULT_CHART_COLOR: HexColor;
3
+ export declare const COLOR_PALETTE: HexColor[];
4
+ export declare const RESERVED_COLORS_MAP: Record<string, HexColor>;