@ironsource/shared-ui 2.1.12-test.59 → 2.1.12-test.60

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 (87) 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/ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css +1 -0
  6. package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
  7. package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_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/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
  11. package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
  12. package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
  13. package/components/appIcon/index.d.ts +3 -3
  14. package/components/banner/Banner.vue.d.ts +3 -3
  15. package/components/banner/index.d.ts +7 -7
  16. package/components/button/common/consts.d.ts +1 -0
  17. package/components/button/v3/Button.vue.d.ts +3 -3
  18. package/components/button/v3/ButtonBase.vue.d.ts +3 -3
  19. package/components/button/v3/IconButton.vue.d.ts +3 -3
  20. package/components/button/v3/index.d.ts +14 -14
  21. package/components/button/v4/ButtonV4.vue.d.ts +4 -3
  22. package/components/button/v4/ButtonV4.vue.js +3 -3
  23. package/components/button/v4/ButtonV4.vue2.js +1 -1
  24. package/components/chart/Chart.vue.d.ts +24 -25
  25. package/components/chart/Chart.vue.js +4 -4
  26. package/components/chart/Chart.vue2.js +82 -88
  27. package/components/chart/ChartHeader.vue.d.ts +24 -25
  28. package/components/chart/ChartHeader.vue.js +3 -3
  29. package/components/chart/ChartHeader.vue2.js +30 -35
  30. package/components/chart/ChartHeaderTrend.vue.d.ts +13 -15
  31. package/components/chart/ChartHeaderTrend.vue.js +3 -3
  32. package/components/chart/ChartHeaderTrend.vue2.js +32 -34
  33. package/components/chart/ChartPlane.vue.d.ts +24 -25
  34. package/components/chart/ChartPlane.vue.js +5 -5
  35. package/components/chart/ChartPlane.vue2.js +122 -128
  36. package/components/chart/index.d.ts +59 -88
  37. package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
  38. package/components/checkbox/v3/index.d.ts +7 -7
  39. package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
  40. package/components/dialog/v4/DialogV4.vue.js +4 -4
  41. package/components/dialog/v4/DialogV4.vue2.js +1 -1
  42. package/components/dialog/v4/index.d.ts +7 -7
  43. package/components/dropdown/v4/DropdownV4.vue.d.ts +8 -0
  44. package/components/dropdown/v4/DropdownV4.vue.js +4 -4
  45. package/components/dropdown/v4/DropdownV4.vue2.js +105 -95
  46. package/components/dropdown/v4/OptionV4.vue.d.ts +8 -0
  47. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  48. package/components/dropdown/v4/OptionV4.vue2.js +91 -69
  49. package/components/dropdown/v4/index.d.ts +46 -2
  50. package/components/forms/FormRow.vue.d.ts +9 -2
  51. package/components/forms/FormRow.vue.js +3 -3
  52. package/components/forms/FormRow.vue2.js +25 -14
  53. package/components/forms/index.d.ts +25 -5
  54. package/components/search/v3/index.d.ts +3 -3
  55. package/components/shared/FieldLabel.vue.d.ts +19 -7
  56. package/components/shared/FieldLabel.vue.js +3 -3
  57. package/components/shared/FieldLabel.vue2.js +50 -37
  58. package/components/tabs/v3/Tabs.vue.d.ts +3 -3
  59. package/components/tabs/v3/index.d.ts +7 -7
  60. package/components/tooltip/common/Tooltip.types.d.ts +1 -0
  61. package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
  62. package/components/tooltip/v3/Tooltip.vue.js +2 -2
  63. package/components/tooltip/v3/Tooltip.vue2.js +1 -1
  64. package/components/tooltip/v3/index.d.ts +7 -7
  65. package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
  66. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  67. package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
  68. package/components/tooltip/v4/index.d.ts +7 -7
  69. package/components/typography/Text.vue.d.ts +3 -3
  70. package/components/typography/index.d.ts +7 -7
  71. package/composables/useFormValidation.d.ts +1 -0
  72. package/composables/useFormValidation.js +32 -27
  73. package/index.d.ts +127 -39
  74. package/index.js +1 -1
  75. package/package.json +1 -1
  76. package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
  77. package/Chart.vue_vue_type_style_index_0_scoped_757e7752_lang.css +0 -1
  78. package/ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css +0 -1
  79. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css +0 -1
  80. package/ChartPlane.vue_vue_type_style_index_0_scoped_bb382dc4_lang.css +0 -1
  81. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
  82. package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
  83. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
  84. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
  85. package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
  86. package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
  87. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
@@ -1,87 +1,85 @@
1
- import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css"; import { defineComponent as h, computed as v, openBlock as a, createElementBlock as p, normalizeClass as g, createVNode as n, unref as e, withCtx as o, createElementVNode as s, createBlock as c, createTextVNode as l, toDisplayString as i, createCommentVNode as d, pushScopeId as y, popScopeId as C } from "vue";
2
- import r from "../typography/v4/Typography.vue.js";
3
- import R from "../icon/v4/IconV4.vue.js";
1
+ import "../../ChartHeaderTrend.vue_vue_type_style_index_0_scoped_21ce0774_lang.css"; import { defineComponent as f, computed as T, openBlock as r, createElementBlock as p, normalizeClass as v, createVNode as l, unref as t, withCtx as o, createElementVNode as s, createBlock as u, createTextVNode as a, toDisplayString as d, createCommentVNode as i, pushScopeId as g, popScopeId as y } from "vue";
2
+ import n from "../typography/v4/Typography.vue.js";
3
+ import C from "../icon/v4/IconV4.vue.js";
4
4
  import "../icon/v4/IconFlag.vue.js";
5
5
  import x from "../tooltip/v4/TooltipV4.vue.js";
6
- const m = (t) => (y("data-v-d61ed404"), t = t(), C(), t), b = { class: "trend-tooltip" }, k = {
6
+ const h = (e) => (g("data-v-21ce0774"), e = e(), y(), e), b = { class: "trend-tooltip" }, k = {
7
7
  key: 2,
8
8
  class: "separator"
9
- }, _ = /* @__PURE__ */ m(() => /* @__PURE__ */ s("hr", null, null, -1)), H = /* @__PURE__ */ m(() => /* @__PURE__ */ s("hr", null, null, -1)), B = /* @__PURE__ */ h({
9
+ }, _ = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), I = /* @__PURE__ */ h(() => /* @__PURE__ */ s("hr", null, null, -1)), E = /* @__PURE__ */ f({
10
10
  __name: "ChartHeaderTrend",
11
11
  props: {
12
12
  value: { default: null },
13
13
  direction: { default: "up" },
14
- tooltipHeader: { default: null },
15
- tooltipRangeCurrent: { default: null },
16
- tooltipRangePrevious: { default: null }
14
+ trendTooltip: { default: null }
17
15
  },
18
- setup(t) {
19
- const u = t, f = v(
20
- () => u.tooltipHeader || u.tooltipRangeCurrent || u.tooltipRangePrevious
16
+ setup(e) {
17
+ const c = e, m = T(
18
+ () => c.trendTooltip?.header || c.trendTooltip?.rangeCurrent || c.trendTooltip?.rangePrevious
21
19
  );
22
- return (P, T) => (a(), p("div", {
23
- class: g(["chart-trend", [`chart-trend--${t.direction}`]])
20
+ return (N, P) => (r(), p("div", {
21
+ class: v(["chart-trend", [`chart-trend--${e.direction}`]])
24
22
  }, [
25
- n(e(x), {
26
- disabled: !e(f)
23
+ l(t(x), {
24
+ disabled: !t(m)
27
25
  }, {
28
26
  tooltip: o(() => [
29
27
  s("div", b, [
30
- t.tooltipHeader ? (a(), c(e(r), {
28
+ e.trendTooltip?.header ? (r(), u(t(n), {
31
29
  key: 0,
32
30
  class: "trend-tooltip__header",
33
31
  variant: "subtitle2"
34
32
  }, {
35
33
  default: o(() => [
36
- l(i(t.tooltipHeader), 1)
34
+ a(d(e.trendTooltip.header), 1)
37
35
  ]),
38
36
  _: 1
39
- })) : d("", !0),
40
- t.tooltipRangeCurrent ? (a(), c(e(r), {
37
+ })) : i("", !0),
38
+ e.trendTooltip?.rangeCurrent ? (r(), u(t(n), {
41
39
  key: 1,
42
40
  variant: "body2",
43
41
  class: "trend-tooltip__text"
44
42
  }, {
45
43
  default: o(() => [
46
- l(i(t.tooltipRangeCurrent), 1)
44
+ a(d(e.trendTooltip.rangeCurrent), 1)
47
45
  ]),
48
46
  _: 1
49
- })) : d("", !0),
50
- t.tooltipRangeCurrent && t.tooltipRangePrevious ? (a(), p("div", k, [
47
+ })) : i("", !0),
48
+ e.trendTooltip?.rangeCurrent && e.trendTooltip?.rangePrevious ? (r(), p("div", k, [
51
49
  _,
52
- n(e(r), {
50
+ l(t(n), {
53
51
  class: "separator__text",
54
52
  variant: "caption"
55
53
  }, {
56
54
  default: o(() => [
57
- l(" vs. ")
55
+ a(" vs. ")
58
56
  ]),
59
57
  _: 1
60
58
  }),
61
- H
62
- ])) : d("", !0),
63
- t.tooltipRangePrevious ? (a(), c(e(r), {
59
+ I
60
+ ])) : i("", !0),
61
+ e.trendTooltip?.rangePrevious ? (r(), u(t(n), {
64
62
  key: 3,
65
63
  variant: "body2",
66
64
  class: "trend-tooltip__text"
67
65
  }, {
68
66
  default: o(() => [
69
- l(i(t.tooltipRangePrevious), 1)
67
+ a(d(e.trendTooltip.rangePrevious), 1)
70
68
  ]),
71
69
  _: 1
72
- })) : d("", !0)
70
+ })) : i("", !0)
73
71
  ])
74
72
  ]),
75
73
  default: o(() => [
76
- n(e(R), {
74
+ l(t(C), {
77
75
  class: "trend-icon",
78
76
  type: "bold",
79
- name: `arrow-${t.direction}`,
77
+ name: `arrow-${e.direction}`,
80
78
  size: "13px"
81
79
  }, null, 8, ["name"]),
82
- n(e(r), { variant: "chipLabel" }, {
80
+ l(t(n), { variant: "chipLabel" }, {
83
81
  default: o(() => [
84
- l(i(t.value), 1)
82
+ a(d(e.value), 1)
85
83
  ]),
86
84
  _: 1
87
85
  })
@@ -92,5 +90,5 @@ const m = (t) => (y("data-v-d61ed404"), t = t(), C(), t), b = { class: "trend-to
92
90
  }
93
91
  });
94
92
  export {
95
- B as default
93
+ E as default
96
94
  };
@@ -10,8 +10,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
10
10
  tickCount?: number;
11
11
  header?: string;
12
12
  subheader?: string;
13
- subheaderTooltipHeader?: string;
14
- subheaderTooltipText?: string;
13
+ subheaderTooltip?: {
14
+ header?: string;
15
+ text?: string;
16
+ };
15
17
  loading?: boolean;
16
18
  noDataIcon?: string;
17
19
  noDataTitle?: string;
@@ -25,9 +27,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
25
27
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
26
28
  trendValue?: string | number;
27
29
  trendDirection?: "up" | "down";
28
- trendTooltipHeader?: string;
29
- trendTooltipRangeCurrent?: string;
30
- trendTooltipRangePrevious?: string;
30
+ trendTooltip?: {
31
+ header?: string;
32
+ rangeCurrent?: string;
33
+ rangePrevious?: string;
34
+ };
31
35
  totalsChart?: boolean;
32
36
  colorsMap: Record<string, string>;
33
37
  }>, {
@@ -40,8 +44,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
44
  tickCount: number;
41
45
  header: string;
42
46
  subheader: string;
43
- subheaderTooltipHeader: any;
44
- subheaderTooltipText: any;
47
+ subheaderTooltip: any;
45
48
  loading: boolean;
46
49
  noDataIcon: string;
47
50
  noDataTitle: string;
@@ -55,9 +58,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
55
58
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
56
59
  trendValue: any;
57
60
  trendDirection: string;
58
- trendTooltipHeader: any;
59
- trendTooltipRangeCurrent: any;
60
- trendTooltipRangePrevious: any;
61
+ trendTooltip: any;
61
62
  totalsChart: boolean;
62
63
  colorsMap: () => {};
63
64
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -72,8 +73,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
72
73
  tickCount?: number;
73
74
  header?: string;
74
75
  subheader?: string;
75
- subheaderTooltipHeader?: string;
76
- subheaderTooltipText?: string;
76
+ subheaderTooltip?: {
77
+ header?: string;
78
+ text?: string;
79
+ };
77
80
  loading?: boolean;
78
81
  noDataIcon?: string;
79
82
  noDataTitle?: string;
@@ -87,9 +90,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
87
90
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
88
91
  trendValue?: string | number;
89
92
  trendDirection?: "up" | "down";
90
- trendTooltipHeader?: string;
91
- trendTooltipRangeCurrent?: string;
92
- trendTooltipRangePrevious?: string;
93
+ trendTooltip?: {
94
+ header?: string;
95
+ rangeCurrent?: string;
96
+ rangePrevious?: string;
97
+ };
93
98
  totalsChart?: boolean;
94
99
  colorsMap: Record<string, string>;
95
100
  }>, {
@@ -102,8 +107,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
102
107
  tickCount: number;
103
108
  header: string;
104
109
  subheader: string;
105
- subheaderTooltipHeader: any;
106
- subheaderTooltipText: any;
110
+ subheaderTooltip: any;
107
111
  loading: boolean;
108
112
  noDataIcon: string;
109
113
  noDataTitle: string;
@@ -117,9 +121,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
117
121
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
118
122
  trendValue: any;
119
123
  trendDirection: string;
120
- trendTooltipHeader: any;
121
- trendTooltipRangeCurrent: any;
122
- trendTooltipRangePrevious: any;
124
+ trendTooltip: any;
123
125
  totalsChart: boolean;
124
126
  colorsMap: () => {};
125
127
  }>>> & {
@@ -134,13 +136,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
134
136
  yAxisFormat: ValueFormat;
135
137
  parsing: ChartParsingConfig;
136
138
  dataSets: ChartDataSet[];
139
+ trendTooltip: any;
137
140
  typeSwitcher: boolean;
138
141
  subheader: string;
139
- subheaderTooltipHeader: string;
140
- subheaderTooltipText: string;
141
- trendTooltipHeader: string;
142
- trendTooltipRangeCurrent: string;
143
- trendTooltipRangePrevious: string;
142
+ subheaderTooltip: any;
144
143
  trendValue: string | number;
145
144
  trendDirection: "up" | "down";
146
145
  tickCount: number;
@@ -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_bb382dc4_lang.css"; //*');
4
- const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-bb382dc4"]]);
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_ae87f435_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ae87f435"]]);
5
5
  export {
6
- a as default
6
+ s as default
7
7
  };
@@ -1,23 +1,23 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_bb382dc4_lang.css"; import { defineComponent as J, useCssVars as Q, unref as d, computed as o, ref as g, onMounted as X, watch as C, nextTick as _, openBlock as h, createElementBlock as ee, createElementVNode as m, createVNode as te, isRef as ae, createSlots as oe, withCtx as le, renderSlot as re, normalizeStyle as ie, createBlock as b, createCommentVNode as V } from "vue";
2
- import { Chart as O, ArcElement as ne, LineElement as se, BarElement as de, PointElement as ue, LineController as ce, BarController as pe, PieController as fe, ScatterController as he, CategoryScale as me, LinearScale as ve, Filler as Te, Tooltip as ye } from "chart.js";
3
- import { HoverVerticalLine as ge } from "./plugins/HoverVerticalLine.js";
4
- import { formatValue as F, calcStepSize as Ce } from "./utils/utils.js";
5
- import { DEFAULT_TICK_COUNT as be, TOTALS_HELPER_KEY as I, POINT_BORDER_COLOR as xe, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as N, GRID_LINE_COLOR as M, HEADER_HEIGHT as ke, COMPACT_HEADER_HEIGHT as Se } from "./consts.js";
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
6
  import { ChartType as n } from "./types.js";
7
- import { useTooltipPosition as Le } from "./composables/useTooltipPosition.js";
8
- import Re from "./ChartTooltip.vue.js";
9
- import { hexColorToRgba as Ee } from "../../utils/color.js";
10
- import { useChartValues as Ae } from "./composables/useChartValues.js";
11
- import Be from "./ChartHeader.vue.js";
12
- import { useVModel as He } from "@vueuse/core";
13
- import we from "../emptyState/v4/EmptyStateV4.vue.js";
14
- import De from "./ChartLoader.vue.js";
15
- import { DEFAULT_CHART_COLOR as Ve } from "./colorPalette.js";
16
- import { TotalType as z, calculateTotal as Oe } from "../../utils/totals.js";
17
- const Fe = {
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 = {
18
18
  key: 0,
19
19
  class: "chart-plane"
20
- }, Ie = { class: "header-wrapper" }, Pe = { class: "chart" }, et = /* @__PURE__ */ J({
20
+ }, It = { class: "header-wrapper" }, Pt = { class: "chart" }, te = /* @__PURE__ */ q({
21
21
  __name: "ChartPlane",
22
22
  props: {
23
23
  dataSets: { default: () => [] },
@@ -26,11 +26,10 @@ const Fe = {
26
26
  parsing: { default: void 0 },
27
27
  xAxisFormat: { default: "string" },
28
28
  yAxisFormat: { default: "number" },
29
- tickCount: { default: be },
29
+ tickCount: { default: gt },
30
30
  header: { default: "" },
31
31
  subheader: { default: "" },
32
- subheaderTooltipHeader: { default: null },
33
- subheaderTooltipText: { default: null },
32
+ subheaderTooltip: { default: null },
34
33
  loading: { type: Boolean, default: !1 },
35
34
  noDataIcon: { default: "file-search" },
36
35
  noDataTitle: { default: "No data to display" },
@@ -41,72 +40,70 @@ const Fe = {
41
40
  compactHeader: { type: Boolean, default: !1 },
42
41
  tooltipRespectsTopEdge: { type: Boolean, default: !0 },
43
42
  tooltipTotalType: { default: z.Total },
44
- tooltipTotalCalcFn: { type: Function, default: Oe },
43
+ tooltipTotalCalcFn: { type: Function, default: Ot },
45
44
  trendValue: { default: null },
46
45
  trendDirection: { default: "up" },
47
- trendTooltipHeader: { default: null },
48
- trendTooltipRangeCurrent: { default: null },
49
- trendTooltipRangePrevious: { default: null },
46
+ trendTooltip: { default: null },
50
47
  totalsChart: { type: Boolean, default: !1 },
51
48
  colorsMap: { default: () => ({}) }
52
49
  },
53
50
  emits: ["update:chartType"],
54
51
  setup(a, { emit: K }) {
55
- const e = a;
56
- Q((t) => ({
57
- "1232aefa": d(q),
58
- "0162f236": a.height
52
+ const t = a;
53
+ J((e) => ({
54
+ "4640c185": c(j),
55
+ "07515470": a.height
59
56
  })), O.register(
60
- ne,
61
- se,
62
- de,
63
- ue,
64
- ce,
65
- pe,
66
- fe,
67
- he,
68
- me,
69
- ve,
70
- Te,
71
- ye,
72
- ge
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
73
70
  );
74
- const v = He(e, "chartType", K), U = o(
75
- () => e.withAnimation ? "" : "none"
76
- ), u = g(null);
71
+ const v = wt(t, "chartType", K), U = o(
72
+ () => t.withAnimation ? "" : "none"
73
+ ), d = C(null);
77
74
  let s = null;
78
- const x = o(() => e.dataSets.length === 0), k = o(() => !e.loading && !x.value), T = () => {
79
- u.value && (s && s.destroy(), s = new O(u.value, A.value));
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));
80
77
  }, $ = () => {
81
- s && (s.data.datasets = E.value, s.options = A.value.options, s.update(U.value));
78
+ s && (s.data.datasets = A.value, s.options = B.value.options, s.update(U.value));
82
79
  };
83
- X(T), C(() => e.chartType, T), C(k, async (t) => {
84
- t && (await _(), T());
85
- }), C([() => e.visibleIds, () => e.dataSets], $);
86
- const c = o(() => e.totalsChart), p = o(
87
- () => e.chartType === n.StackedLine || e.chartType === n.StackedBar || c.value
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
88
85
  ), S = o(
89
- () => e.chartType === n.Line || e.chartType === n.StackedLine
90
- ), L = o(() => c.value ? { ...e.parsing, xAxisKey: I } : e.parsing), G = o(() => c.value ? e.dataSets.map((t) => ({
91
- ...t,
92
- data: t.data.map((r) => ({
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) => ({
93
90
  ...r,
94
- [I]: t.label
91
+ [I]: e.label
95
92
  }))
96
- })) : e.dataSets), f = o(
97
- () => G.value.filter((t) => e.visibleIds.includes(t.id))
98
- ), W = (t) => e.colorsMap[t] || Ve, R = o(
93
+ })) : t.dataSets), f = o(
94
+ () => G.value.filter((e) => t.visibleIds.includes(e.id))
95
+ ), W = (e) => t.colorsMap[e] || Ht, E = o(
99
96
  () => f.value.length && f.value.every(
100
- (t) => t.data.length === 1
97
+ (e) => e.data.length === 1
101
98
  )
102
- ), E = o(() => f.value.map((t, r) => {
103
- const i = W(t.id), y = p.value ? r !== 0 ? "-1" : "start" : void 0;
99
+ ), A = o(() => f.value.map((e, r) => {
100
+ const i = W(e.id), T = p.value ? r !== 0 ? "-1" : "start" : void 0;
104
101
  return {
105
- ...t,
106
- fill: y,
107
- backgroundColor: Ee(
102
+ ...e,
103
+ fill: T,
104
+ backgroundColor: At(
108
105
  i,
109
- e.chartType === n.StackedLine ? 10 : 70
106
+ t.chartType === n.StackedLine ? 10 : 70
110
107
  ),
111
108
  borderColor: i,
112
109
  pointBackgroundColor: i,
@@ -114,24 +111,24 @@ const Fe = {
114
111
  maxBarThickness: 50,
115
112
  clip: 5,
116
113
  // draw a bit outside the chart area
117
- icon: t.icon || null,
118
- iconType: t.iconType || "branded"
114
+ icon: e.icon || null,
115
+ iconType: e.iconType || "branded"
119
116
  };
120
- })), Z = o(
121
- () => e.tooltipTotalType === z.Total ? "Total" : "Mean"
122
- ), A = o(
117
+ })), _ = o(
118
+ () => t.tooltipTotalType === z.Total ? "Total" : "Mean"
119
+ ), B = o(
123
120
  () => ({
124
- type: e.chartType == n.Bar || e.chartType === n.StackedBar ? "bar" : "line",
121
+ type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
125
122
  // Chart Data
126
123
  data: {
127
- datasets: E.value
124
+ datasets: A.value
128
125
  },
129
126
  // Chart Options
130
127
  options: {
131
128
  parsing: L.value,
132
129
  interaction: {
133
130
  intersect: !1,
134
- mode: c.value ? "point" : "index",
131
+ mode: u.value ? "point" : "index",
135
132
  axis: "x"
136
133
  },
137
134
  // plugins
@@ -143,16 +140,16 @@ const Fe = {
143
140
  tooltip: {
144
141
  enabled: !1,
145
142
  position: "average",
146
- external: ({ tooltip: t }) => {
147
- l.value = { ...t };
143
+ external: ({ tooltip: e }) => {
144
+ l.value = { ...e };
148
145
  },
149
146
  callbacks: {
150
- footer: (t) => {
151
- const r = t.map((y) => y.parsed.y || 0), i = e.tooltipTotalCalcFn(
147
+ footer: (e) => {
148
+ const r = e.map((T) => T.parsed.y || 0), i = t.tooltipTotalCalcFn(
152
149
  r,
153
- e.tooltipTotalType
150
+ t.tooltipTotalType
154
151
  );
155
- return [Z.value, String(i)];
152
+ return [_.value, String(i)];
156
153
  }
157
154
  }
158
155
  }
@@ -174,12 +171,12 @@ const Fe = {
174
171
  tension: 0.3
175
172
  },
176
173
  point: {
177
- radius: R.value ? 3 : 1,
174
+ radius: E.value ? 3 : 1,
178
175
  hitRadius: 8,
179
176
  borderWidth: 0,
180
177
  hoverRadius: 4,
181
178
  hoverBorderWidth: 2,
182
- pointHoverBackgroundColor: xe
179
+ pointHoverBackgroundColor: kt
183
180
  },
184
181
  bar: {
185
182
  borderRadius: 4
@@ -189,7 +186,7 @@ const Fe = {
189
186
  // Horizontal Axis (X)
190
187
  x: {
191
188
  beginAtZero: !0,
192
- offset: !S.value || R.value,
189
+ offset: !S.value || E.value,
193
190
  border: { display: !1 },
194
191
  stacked: p.value,
195
192
  // stack on top of each other
@@ -198,10 +195,10 @@ const Fe = {
198
195
  color: P,
199
196
  font: N,
200
197
  padding: 4,
201
- callback: function(t) {
198
+ callback: function(e) {
202
199
  return F(
203
- this.getLabelForValue(t),
204
- e.xAxisFormat
200
+ this.getLabelForValue(e),
201
+ t.xAxisFormat
205
202
  );
206
203
  }
207
204
  },
@@ -226,10 +223,10 @@ const Fe = {
226
223
  color: P,
227
224
  font: N,
228
225
  padding: 8,
229
- stepSize: D.value,
230
- min: w.value,
231
- max: D.value * e.tickCount,
232
- callback: (t) => F(t, e.yAxisFormat)
226
+ stepSize: V.value,
227
+ min: D.value,
228
+ max: V.value * t.tickCount,
229
+ callback: (e) => F(e, t.yAxisFormat)
233
230
  },
234
231
  // grid lines
235
232
  grid: {
@@ -241,63 +238,60 @@ const Fe = {
241
238
  }
242
239
  }
243
240
  })
244
- ), B = g(null), l = g(null), { position: H } = Le(
245
- u,
246
- B,
241
+ ), R = C(null), l = C(null), { position: w } = Lt(
242
+ d,
243
+ R,
247
244
  l,
248
- e.tooltipRespectsTopEdge
249
- ), Y = o(() => ({
250
- left: `${H.value.left}px`,
251
- top: `${H.value.top}px`,
245
+ t.tooltipRespectsTopEdge
246
+ ), Z = o(() => ({
247
+ left: `${w.value.left}px`,
248
+ top: `${w.value.top}px`,
252
249
  opacity: l.value?.opacity || 0
253
- })), { minValue: w, maxValue: j } = Ae({
250
+ })), { minValue: D, maxValue: Y } = Bt({
254
251
  parsingConfig: L.value,
255
252
  dataSets: f,
256
253
  isStacked: p
257
- }), D = o(
258
- () => Ce(w.value, j.value, e.tickCount)
259
- ), q = o(
260
- () => (e.compactHeader ? Se : ke) + "px"
254
+ }), V = o(
255
+ () => bt(D.value, Y.value, t.tickCount)
256
+ ), j = o(
257
+ () => (t.compactHeader ? St : xt) + "px"
261
258
  );
262
- return (t, r) => d(k) ? (h(), ee("section", Fe, [
263
- m("div", Ie, [
264
- te(Be, {
265
- "chart-type": d(v),
266
- "onUpdate:chart-type": r[0] || (r[0] = (i) => ae(v) ? v.value = i : null),
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),
267
264
  "type-switcher": a.typeSwitcher,
268
265
  header: a.header,
269
266
  subheader: a.subheader,
270
- "subheader-tooltip-header": a.subheaderTooltipHeader,
271
- "subheader-tooltip-text": a.subheaderTooltipText,
272
- "trend-tooltip-header": a.trendTooltipHeader,
273
- "trend-tooltip-range-current": a.trendTooltipRangeCurrent,
274
- "trend-tooltip-range-previous": a.trendTooltipRangePrevious,
267
+ "subheader-tooltip": a.subheaderTooltip,
268
+ "trend-tooltip": a.trendTooltip,
275
269
  compact: a.compactHeader,
276
270
  "trend-value": a.trendValue,
277
271
  "trend-direction": a.trendDirection
278
- }, oe({ _: 2 }, [
279
- t.$slots["subheader-tooltip"] ? {
272
+ }, ot({ _: 2 }, [
273
+ e.$slots["subheader-tooltip"] ? {
280
274
  name: "subheader-tooltip",
281
- fn: le(() => [
282
- re(t.$slots, "subheader-tooltip", {}, void 0, !0)
275
+ fn: lt(() => [
276
+ rt(e.$slots, "subheader-tooltip", {}, void 0, !0)
283
277
  ]),
284
278
  key: "0"
285
279
  } : void 0
286
- ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip-header", "subheader-tooltip-text", "trend-tooltip-header", "trend-tooltip-range-current", "trend-tooltip-range-previous", "compact", "trend-value", "trend-direction"])
280
+ ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
287
281
  ]),
288
- m("div", Pe, [
282
+ m("div", Pt, [
289
283
  m("canvas", {
290
284
  ref_key: "chartRef",
291
- ref: u,
285
+ ref: d,
292
286
  class: "chart__canvas"
293
287
  }, null, 512),
294
288
  m("div", {
295
289
  ref_key: "tooltipRef",
296
- ref: B,
290
+ ref: R,
297
291
  class: "chart__tooltip",
298
- style: ie(d(Y))
292
+ style: it(c(Z))
299
293
  }, [
300
- l.value ? (h(), b(Re, {
294
+ l.value ? (h(), g(Et, {
301
295
  key: 0,
302
296
  title: String(l.value.title),
303
297
  "data-points": l.value.dataPoints,
@@ -305,21 +299,21 @@ const Fe = {
305
299
  "y-axis-format": a.yAxisFormat,
306
300
  "total-label": l.value.footer[0],
307
301
  "total-value": Number(l.value.footer[1])
308
- }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : V("", !0)
302
+ }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : H("", !0)
309
303
  ], 4)
310
304
  ])
311
- ])) : a.loading ? (h(), b(De, {
305
+ ])) : a.loading ? (h(), g(Vt, {
312
306
  key: 1,
313
307
  class: "chart-loading"
314
- })) : d(x) ? (h(), b(d(we), {
308
+ })) : c(k) ? (h(), g(c(Dt), {
315
309
  key: 2,
316
310
  class: "chart-empty",
317
311
  title: a.noDataTitle,
318
312
  subtitle: a.noDataSubtitle,
319
313
  "icon-name": a.noDataIcon
320
- }, null, 8, ["title", "subtitle", "icon-name"])) : V("", !0);
314
+ }, null, 8, ["title", "subtitle", "icon-name"])) : H("", !0);
321
315
  }
322
316
  });
323
317
  export {
324
- et as default
318
+ te as default
325
319
  };