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