@ironsource/shared-ui 2.1.11-test.27 → 2.1.11-test.41

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 (47) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +1 -0
  2. package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +1 -0
  3. package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +1 -0
  4. package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +1 -0
  5. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
  6. package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
  7. package/DialogV4.vue_vue_type_style_index_0_scoped_c65df8d7_lang.css +1 -0
  8. package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
  9. package/components/chart/Chart.vue.d.ts +11 -3
  10. package/components/chart/Chart.vue.js +2 -2
  11. package/components/chart/Chart.vue2.js +108 -96
  12. package/components/chart/ChartHeader.vue.d.ts +13 -6
  13. package/components/chart/ChartHeader.vue.js +2 -2
  14. package/components/chart/ChartHeader.vue2.js +32 -29
  15. package/components/chart/ChartLegend.vue.d.ts +5 -0
  16. package/components/chart/ChartLegend.vue.js +3 -3
  17. package/components/chart/ChartLegend.vue2.js +99 -49
  18. package/components/chart/ChartTooltip.vue.d.ts +4 -5
  19. package/components/chart/ChartTooltip.vue.js +2 -2
  20. package/components/chart/ChartTooltip.vue2.js +64 -43
  21. package/components/chart/index.d.ts +36 -16
  22. package/components/chart/mockData.d.ts +15 -2
  23. package/components/chart/types.d.ts +15 -1
  24. package/components/chart/utils/utils.js +5 -5
  25. package/components/checkbox/v4/CheckboxV4.vue.js +3 -3
  26. package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
  27. package/components/dialog/v4/DialogV4.vue.d.ts +10 -0
  28. package/components/dialog/v4/DialogV4.vue.js +3 -3
  29. package/components/dialog/v4/DialogV4.vue2.js +64 -60
  30. package/components/dialog/v4/index.d.ts +39 -1
  31. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
  32. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
  33. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
  34. package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
  35. package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
  36. package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
  37. package/index.d.ts +136 -3
  38. package/index.js +1 -1
  39. package/package.json +1 -1
  40. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css +0 -1
  41. package/Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css +0 -1
  42. package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
  43. package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
  44. package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
  45. package/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
  46. package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
  47. package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
@@ -0,0 +1 @@
1
+ .button-trigger.open[data-v-604dfc6f]{background:var(--action-selected);outline:2px solid var(--action-active);outline-offset:-2px;transition:outline 0s}.button-trigger.open[data-v-604dfc6f]:hover{background:var(--action-selected)}.button-trigger .label-wrapper[data-v-604dfc6f]{display:block;width:100%}.button-trigger .label-wrapper .label-text[data-v-604dfc6f]{white-space:nowrap}
@@ -0,0 +1 @@
1
+ .chart-container[data-v-04b9d6b3]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px;width:100%}.header-wrapper[data-v-04b9d6b3]{height:76px}.chart-content[data-v-04b9d6b3]{width:100%}.chart-content.with-legend[data-v-04b9d6b3]{width:calc(100% - 221px)}.chart-sidebar[data-v-04b9d6b3]{border-left:1px solid var(--common-divider)}.chart[data-v-04b9d6b3]{width:100%;height:312px;position:relative}.chart__canvas[data-v-04b9d6b3]{width:100%;height:100%}.chart__tooltip[data-v-04b9d6b3]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
@@ -0,0 +1 @@
1
+ .chart-header[data-v-b8213498]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.chart-header .subheader[data-v-b8213498]{color:var(--text-secondary)}.header-texts[data-v-b8213498]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px;cursor:default}.type-switch[data-v-b8213498]{display:flex;align-items:center;gap:4px}
@@ -0,0 +1 @@
1
+ .disabled-tooltip[data-v-a1c626cd],.disabled-tooltip[data-v-a1c626cd] .container{width:100%}.chart-legend[data-v-a1c626cd]{display:flex;flex-direction:column;width:220px;height:100%;padding:0 8px 8px}.search-box[data-v-a1c626cd]{padding:12px 0 4px}.legend[data-v-a1c626cd]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-a1c626cd]{list-style:none;padding:0}.legend__list>li[data-v-a1c626cd]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-a1c626cd]:hover{background-color:var(--action-hover, rgba(0, 0, 0, .05));border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-a1c626cd]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li .item-wrapper[data-v-a1c626cd]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-a1c626cd]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-a1c626cd]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-a1c626cd]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-a1c626cd]{color:var(--text-secondary, #646464)}
@@ -0,0 +1 @@
1
+ .chart-tooltip[data-v-6744325c]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);width:280px;padding:calc(var(--spacing-100) - 1px)}.tooltip-title-wrapper[data-v-6744325c]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .tooltip-sub-title[data-v-6744325c]{color:var(--text-secondary)}.color-box[data-v-6744325c]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-6744325c]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-6744325c]{list-style:none;margin:0;padding:0}.list__item[data-v-6744325c]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-6744325c]:last-child{margin-bottom:0}.platform-icon[data-v-6744325c]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-6744325c]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-6744325c]{max-width:90%}.tooltip-footer[data-v-6744325c]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-6744325c]{flex-grow:1}
@@ -0,0 +1 @@
1
+ .checkbox[data-v-af4ae3c3]{color:var(--primary-light);position:relative;cursor:pointer;display:flex;align-items:center;user-select:none;line-height:0}.checkbox.focus-visible .checkbox__inner[data-v-af4ae3c3]{outline:solid;border-radius:4px}.icon.unchecked[data-v-af4ae3c3]{color:var(--default-outlined-border)}.checkbox:hover .icon.unchecked[data-v-af4ae3c3]{color:var(--action-active)}.checkboxes[data-v-af4ae3c3]{display:inline-flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;background-color:transparent;outline:0;border:0;line-height:0;margin:0;user-select:none;vertical-align:middle;appearance:none;text-decoration:none;border-radius:50%}.input[data-v-af4ae3c3]{z-index:-1;cursor:inherit;position:absolute;opacity:0;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.checkbox__inner[data-v-af4ae3c3]{overflow:hidden;pointer-events:none;position:absolute;z-index:0;inset:0}.states[data-v-af4ae3c3]{width:var(--spacing-200);height:var(--spacing-200)}.disabled[data-v-af4ae3c3]{cursor:not-allowed}.disabled .checkbox-label[data-v-af4ae3c3]{color:var(--text-disabled)}.checkbox-label[data-v-af4ae3c3]{margin-left:var(--spacing-100);color:var(--text-primary)}
@@ -0,0 +1 @@
1
+ .container[data-v-c65df8d7]{position:fixed;z-index:1300;display:flex;align-items:center;justify-content:center;inset:0;padding:0 var(--spacing-300)}.dialog[data-v-c65df8d7]{min-height:7rem;overflow-y:auto;box-shadow:var(--elevation-xl);max-height:calc(100% - var(--spacing-800));background:var(--background-model-elevation);border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-lg)}.dialog--medium[data-v-c65df8d7]{width:56.25rem}.dialog--small[data-v-c65df8d7]{width:37.5rem}.dialog--extraSmall[data-v-c65df8d7]{width:27.75rem}.header[data-v-c65df8d7]{position:relative;display:flex;align-items:flex-start;width:100%;padding:calc(var(--spacing-200) - 1px) var(--spacing-300);border-bottom:1px solid var(--common-divider);color:var(--text-primary)}.title[data-v-c65df8d7]{display:block;min-height:var(--spacing-300);margin-right:var(--spacing-300)}.subtitle[data-v-c65df8d7]{display:block;margin-top:var(--spacing-50);color:var(--text-secondary)}.close-button[data-v-c65df8d7]{color:var(--text-secondary);position:absolute;right:var(--spacing-250);top:calc(var(--spacing-200) - 3px)}.content[data-v-c65df8d7]{color:var(--text-primary);padding:var(--spacing-300);display:flex;overflow-y:auto;flex-direction:column;justify-content:center}.footer[data-v-c65df8d7]{height:30%;width:100%;border-top:1px solid var(--common-divider);display:flex;align-items:center}.action-buttons[data-v-c65df8d7]{margin-left:auto;padding:calc(var(--spacing-150) - 1px) var(--spacing-300);display:flex}.action-buttons[data-v-c65df8d7] .button-wrap:first-child{margin-right:var(--spacing-100)}.dialog-backdrop[data-v-c65df8d7]{position:fixed;z-index:-1;display:flex;background-color:var(--background-backdrop);align-items:center;justify-content:center;inset:0}.v-enter-active[data-v-c65df8d7],.v-leave-active[data-v-c65df8d7]{transition:opacity .25s ease}.v-enter-from[data-v-c65df8d7],.v-leave-to[data-v-c65df8d7]{opacity:0}
@@ -0,0 +1 @@
1
+ .container[data-v-89fe8aa1]{width:100%;display:flex;max-width:22.5rem;background-color:var(--common-white);padding:.75rem 1rem}.texts[data-v-89fe8aa1]{width:calc(100% - 20px);display:flex;justify-content:center;flex-direction:column}.message[data-v-89fe8aa1]{margin-top:12px;margin-left:32px;width:calc(100% - 52px);color:var(--text-secondary)}.title[data-v-89fe8aa1]{display:flex;align-items:center;gap:8px;color:var(--text-primary)}.snackbar[data-v-89fe8aa1]{display:flex;width:22.5rem;box-sizing:border-box;position:fixed;transition:opacity .25s,transform .25s,left .25s,right .25s,top .4s,bottom .25s;overflow-wrap:anywhere;overflow:hidden;z-index:9999;border-radius:12px;border:1px solid var(--common-divider-elevation-0);box-shadow:var(--elevation-lg)}.snackbar.right[data-v-89fe8aa1]{right:1rem}.snackbar.left[data-v-89fe8aa1]{left:1rem}.close-button-wrapper[data-v-89fe8aa1]{width:20px}.snackbar-enter-from.right[data-v-89fe8aa1]{right:0;transform:translate(100%)}.snackbar-enter-from.left[data-v-89fe8aa1]{left:0;transform:translate(-100%)}.snackbar-leave-to[data-v-89fe8aa1]{opacity:0}.snackbar-leave-to.right[data-v-89fe8aa1]{right:0;transform:translate(100%)}.snackbar-leave-to.left[data-v-89fe8aa1]{left:0;transform:translate(-100%)}.icon-container.snackbar-icon-info[data-v-89fe8aa1]{color:var(--action-active)}.icon-container.snackbar-icon-error[data-v-89fe8aa1]{color:var(--error-main)}.icon-container.snackbar-icon-success[data-v-89fe8aa1]{color:var(--success-main)}.action-wrapper[data-v-89fe8aa1]{margin-left:32px;width:calc(100% - 52px)}.action-wrapper .actions[data-v-89fe8aa1]{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap}
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
9
9
  tickCount?: number;
10
10
  header?: string;
11
11
  subheader?: string;
12
- subheaderTooltip?: string;
12
+ withSubheaderTooltip?: boolean;
13
13
  hideLegend?: boolean;
14
14
  minVisible?: number;
15
15
  maxVisible?: number;
@@ -18,6 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
18
  noDataTitle?: string;
19
19
  noDataSubtitle?: string;
20
20
  withSettingsHeader?: boolean;
21
+ maxLimitTooltipText?: string;
21
22
  }>, {
22
23
  chartType: ChartType;
23
24
  dataSets: () => any[];
@@ -37,6 +38,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
37
38
  noDataTitle: string;
38
39
  noDataSubtitle: string;
39
40
  withSettingsHeader: boolean;
41
+ withSubheaderTooltip: boolean;
42
+ maxLimitTooltipText: string;
40
43
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
44
  "update:chartType": (chartType: ChartType) => void;
42
45
  "update:visibleIds": (visibleIds: unknown[]) => void;
@@ -50,7 +53,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
50
53
  tickCount?: number;
51
54
  header?: string;
52
55
  subheader?: string;
53
- subheaderTooltip?: string;
56
+ withSubheaderTooltip?: boolean;
54
57
  hideLegend?: boolean;
55
58
  minVisible?: number;
56
59
  maxVisible?: number;
@@ -59,6 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
59
62
  noDataTitle?: string;
60
63
  noDataSubtitle?: string;
61
64
  withSettingsHeader?: boolean;
65
+ maxLimitTooltipText?: string;
62
66
  }>, {
63
67
  chartType: ChartType;
64
68
  dataSets: () => any[];
@@ -78,6 +82,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
78
82
  noDataTitle: string;
79
83
  noDataSubtitle: string;
80
84
  withSettingsHeader: boolean;
85
+ withSubheaderTooltip: boolean;
86
+ maxLimitTooltipText: string;
81
87
  }>>> & {
82
88
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
83
89
  "onUpdate:chartType"?: (chartType: ChartType) => any;
@@ -90,10 +96,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
90
96
  visibleIds: unknown[];
91
97
  minVisible: number;
92
98
  maxVisible: number;
99
+ maxLimitTooltipText: string;
93
100
  chartType: ChartType;
94
101
  withSettingsHeader: boolean;
95
102
  subheader: string;
96
- subheaderTooltip: string;
103
+ withSubheaderTooltip: boolean;
97
104
  dataSets: ChartDataSet[];
98
105
  hideLegend: boolean;
99
106
  tickCount: number;
@@ -103,6 +110,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
103
110
  }>, {
104
111
  metric?(_: {}): any;
105
112
  breakdowns?(_: {}): any;
113
+ "subheader-tooltip"?(_: {}): any;
106
114
  }>;
107
115
  export default _default;
108
116
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./Chart.vue2.js";
2
2
  /* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css"; //*');
4
- const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-8f471697"]]);
3
+ // import "../../Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css"; //*');
4
+ const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-04b9d6b3"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,20 +1,20 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css"; import { defineComponent as j, ref as g, computed as i, onMounted as q, watch as C, nextTick as J, openBlock as d, createElementBlock as k, Fragment as R, createBlock as m, unref as u, isRef as V, withCtx as O, renderSlot as D, createCommentVNode as v, createElementVNode as f, normalizeClass as Q, createVNode as F, normalizeStyle as Y } from "vue";
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css"; import { defineComponent as j, ref as g, computed as l, onMounted as q, watch as T, nextTick as J, openBlock as d, createElementBlock as C, Fragment as O, createBlock as h, unref as u, isRef as D, withCtx as k, renderSlot as x, createCommentVNode as v, createElementVNode as p, normalizeClass as Q, createVNode as F, normalizeStyle as Y } from "vue";
2
2
  import { useVModel as _ } from "@vueuse/core";
3
- import { Chart as N, ArcElement as ee, LineElement as te, BarElement as ae, PointElement as oe, LineController as re, BarController as ie, PieController as le, ScatterController as ne, CategoryScale as se, LinearScale as de, Filler as ue, Tooltip as ce } from "chart.js";
4
- import { HoverVerticalLine as fe } from "./plugins/HoverVerticalLine.js";
5
- import { formatValue as H, calcStepSize as pe } from "./utils/utils.js";
6
- import { DEFAULT_TICK_COUNT as he, DEFAULT_MIN_VISIBLE as me, DEFAULT_MAX_VISIBLE as ve, COLOR_PALETTE as be, POINT_BORDER_COLOR as ye, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as z } from "./consts.js";
3
+ import { Chart as N, ArcElement as ee, LineElement as te, BarElement as ae, PointElement as oe, LineController as ie, BarController as le, PieController as re, ScatterController as ne, CategoryScale as se, LinearScale as de, Filler as ue, Tooltip as ce } from "chart.js";
4
+ import { HoverVerticalLine as pe } from "./plugins/HoverVerticalLine.js";
5
+ import { formatValue as H, calcStepSize as me } from "./utils/utils.js";
6
+ import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as he, DEFAULT_MAX_VISIBLE as ve, COLOR_PALETTE as ye, POINT_BORDER_COLOR as be, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as z } from "./consts.js";
7
7
  import { ChartType as n } from "./types.js";
8
8
  import { useTooltipPosition as ge } from "./composables/useTooltipPosition.js";
9
- import Ce from "./ChartTooltip.vue.js";
10
- import ke from "./ChartLegend.vue.js";
11
- import Te from "./ChartHeader.vue.js";
12
- import { hexColorToRgba as Se } from "../../utils/color.js";
9
+ import Te from "./ChartTooltip.vue.js";
10
+ import Ce from "./ChartLegend.vue.js";
11
+ import ke from "./ChartHeader.vue.js";
12
+ import { hexColorToRgba as xe } from "../../utils/color.js";
13
13
  import { useChartValues as Le } from "./composables/useChartValues.js";
14
- import xe from "./ChartLoader.vue.js";
15
- import Be from "../emptyState/v4/EmptyStateV4.vue.js";
16
- import Ie from "./SettingsHeader.vue.js";
17
- const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
14
+ import Se from "./ChartLoader.vue.js";
15
+ import we from "../emptyState/v4/EmptyStateV4.vue.js";
16
+ import Be from "./SettingsHeader.vue.js";
17
+ const Ie = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
18
18
  key: 0,
19
19
  class: "chart-sidebar"
20
20
  }, je = /* @__PURE__ */ j({
@@ -26,75 +26,78 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
26
26
  parsing: { default: void 0 },
27
27
  xAxisFormat: { default: "string" },
28
28
  yAxisFormat: { default: "number" },
29
- tickCount: { default: he },
29
+ tickCount: { default: fe },
30
30
  header: { default: "" },
31
31
  subheader: { default: "" },
32
- subheaderTooltip: { default: "" },
32
+ withSubheaderTooltip: { type: Boolean, default: !1 },
33
33
  hideLegend: { type: Boolean, default: !1 },
34
- minVisible: { default: me },
34
+ minVisible: { default: he },
35
35
  maxVisible: { default: ve },
36
36
  loading: { type: Boolean, default: !1 },
37
37
  noDataIcon: { default: "file-x" },
38
38
  noDataTitle: { default: "No data to display" },
39
39
  noDataSubtitle: { default: "Search again with different filters" },
40
- withSettingsHeader: { type: Boolean, default: !0 }
40
+ withSettingsHeader: { type: Boolean, default: !0 },
41
+ maxLimitTooltipText: { default: "" }
41
42
  },
42
43
  emits: ["update:chartType", "update:visibleIds"],
43
- setup(a, { emit: T }) {
44
+ setup(a, { emit: L }) {
44
45
  const t = a;
45
46
  N.register(
46
47
  ee,
47
48
  te,
48
49
  ae,
49
50
  oe,
50
- re,
51
51
  ie,
52
52
  le,
53
+ re,
53
54
  ne,
54
55
  se,
55
56
  de,
56
57
  ue,
57
58
  ce,
58
- fe
59
+ pe
59
60
  );
60
- const c = _(t, "chartType", T), p = g(null);
61
+ const c = _(t, "chartType", L), m = g(null);
61
62
  let s = null;
62
- const S = i(() => t.dataSets.length === 0), L = i(() => !t.loading && !S.value), b = () => {
63
- p.value && (s && s.destroy(), s = new N(p.value, B.value));
63
+ const S = l(() => t.dataSets.length === 0), w = l(() => !t.loading && !S.value), y = () => {
64
+ m.value && (s && s.destroy(), s = new N(m.value, I.value));
64
65
  }, M = () => {
65
- s && (s.data.datasets = y.value, s.options = B.value.options, s.update());
66
+ s && (s.data.datasets = b.value, s.options = I.value.options, s.update());
66
67
  };
67
- q(b), C(() => t.chartType, b), C(L, async (e) => {
68
- e && (await J(), b());
69
- }), C([() => t.visibleIds, () => t.dataSets], M);
70
- const h = i(
68
+ q(y), T(() => t.chartType, y), T(w, async (e) => {
69
+ e && (await J(), y());
70
+ }), T([() => t.visibleIds, () => t.dataSets], M);
71
+ const f = l(
71
72
  () => t.chartType === n.StackedLine || t.chartType === n.StackedBar
72
- ), $ = i(
73
+ ), $ = l(
73
74
  () => t.chartType === n.Line || t.chartType === n.StackedLine
74
- ), x = i(
75
+ ), B = l(
75
76
  () => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
76
- ), y = i(() => x.value.map((e, o) => {
77
- const r = e.color || be[o] || "#000000";
77
+ ), b = l(() => B.value.map((e, o) => {
78
+ const i = e.color || ye[o] || "#000000";
78
79
  return {
79
80
  ...e,
80
- fill: h.value ? "start" : void 0,
81
- backgroundColor: Se(
82
- r,
81
+ fill: f.value ? "start" : void 0,
82
+ backgroundColor: xe(
83
+ i,
83
84
  t.chartType === n.StackedLine ? 10 : 70
84
85
  ),
85
- borderColor: r,
86
- pointBackgroundColor: r,
87
- pointHoverBorderColor: r,
86
+ borderColor: i,
87
+ pointBackgroundColor: i,
88
+ pointHoverBorderColor: i,
88
89
  maxBarThickness: 50,
89
- clip: 5
90
+ clip: 5,
90
91
  // draw a bit outside the chart area
92
+ icon: e.icon || null,
93
+ iconType: e.iconType || "branded"
91
94
  };
92
- })), B = i(
95
+ })), I = l(
93
96
  () => ({
94
97
  type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
95
98
  // Chart Data
96
99
  data: {
97
- datasets: y.value
100
+ datasets: b.value
98
101
  },
99
102
  // Chart Options
100
103
  options: {
@@ -114,11 +117,11 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
114
117
  enabled: !1,
115
118
  position: "average",
116
119
  external: ({ tooltip: e }) => {
117
- l.value = { ...e };
120
+ r.value = { ...e };
118
121
  },
119
122
  callbacks: {
120
123
  footer: (e) => {
121
- const o = e.reduce((r, X) => r + (X.parsed.y || 0), 0);
124
+ const o = e.reduce((i, X) => i + (X.parsed.y || 0), 0);
122
125
  return ["Total", String(o)];
123
126
  }
124
127
  }
@@ -146,7 +149,7 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
146
149
  borderWidth: 0,
147
150
  hoverRadius: 4,
148
151
  hoverBorderWidth: 2,
149
- pointHoverBackgroundColor: ye
152
+ pointHoverBackgroundColor: be
150
153
  },
151
154
  bar: {
152
155
  borderRadius: 4
@@ -157,7 +160,7 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
157
160
  x: {
158
161
  beginAtZero: !0,
159
162
  border: { display: !1 },
160
- stacked: h.value,
163
+ stacked: f.value,
161
164
  // stack on top of each other
162
165
  // ticks
163
166
  ticks: {
@@ -185,16 +188,16 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
185
188
  beginAtZero: !0,
186
189
  border: { display: !1 },
187
190
  // hide left borderline
188
- stacked: h.value,
191
+ stacked: f.value,
189
192
  // stack on top of each other
190
193
  // ticks
191
194
  ticks: {
192
195
  color: P,
193
196
  font: U,
194
197
  padding: 8,
195
- stepSize: E.value,
196
- min: A.value,
197
- max: E.value * t.tickCount,
198
+ stepSize: V.value,
199
+ min: R.value,
200
+ max: V.value * t.tickCount,
198
201
  callback: (e) => H(e, t.yAxisFormat)
199
202
  },
200
203
  // grid lines
@@ -207,89 +210,98 @@ const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee =
207
210
  }
208
211
  }
209
212
  })
210
- ), K = i(
211
- () => y.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
212
- ), W = i(() => t.dataSets.map((e) => ({
213
+ ), K = l(
214
+ () => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
215
+ ), W = l(() => t.dataSets.map((e) => ({
213
216
  id: e.id,
214
217
  label: e.label,
215
- color: K.value[e.id] || null
216
- }))), I = g(null), l = g(null), { position: w } = ge(
217
- p,
218
- I,
219
- l
220
- ), Z = i(() => ({
221
- left: `${w.value.left}px`,
222
- top: `${w.value.top}px`,
223
- opacity: l.value?.opacity || 0
224
- })), { minValue: A, maxValue: G } = Le({
218
+ caption: e.caption || null,
219
+ color: K.value[e.id] || null,
220
+ icon: e.icon || null,
221
+ iconType: e.iconType || "branded"
222
+ }))), A = g(null), r = g(null), { position: E } = ge(
223
+ m,
224
+ A,
225
+ r
226
+ ), Z = l(() => ({
227
+ left: `${E.value.left}px`,
228
+ top: `${E.value.top}px`,
229
+ opacity: r.value?.opacity || 0
230
+ })), { minValue: R, maxValue: G } = Le({
225
231
  parsingConfig: t.parsing,
226
- dataSets: x,
227
- isStacked: h
228
- }), E = i(
229
- () => pe(A.value, G.value, t.tickCount)
232
+ dataSets: B,
233
+ isStacked: f
234
+ }), V = l(
235
+ () => me(R.value, G.value, t.tickCount)
230
236
  );
231
- return (e, o) => (d(), k(R, null, [
232
- a.withSettingsHeader ? (d(), m(Ie, {
237
+ return (e, o) => (d(), C(O, null, [
238
+ a.withSettingsHeader ? (d(), h(Be, {
233
239
  key: 0,
234
240
  "chart-type": u(c),
235
- "onUpdate:chart-type": o[0] || (o[0] = (r) => V(c) ? c.value = r : null),
241
+ "onUpdate:chart-type": o[0] || (o[0] = (i) => D(c) ? c.value = i : null),
236
242
  "hide-legend": a.hideLegend
237
243
  }, {
238
- metric: O(() => [
239
- D(e.$slots, "metric", {}, void 0, !0)
244
+ metric: k(() => [
245
+ x(e.$slots, "metric", {}, void 0, !0)
240
246
  ]),
241
- breakdowns: O(() => [
242
- D(e.$slots, "breakdowns", {}, void 0, !0)
247
+ breakdowns: k(() => [
248
+ x(e.$slots, "breakdowns", {}, void 0, !0)
243
249
  ]),
244
250
  _: 3
245
251
  }, 8, ["chart-type", "hide-legend"])) : v("", !0),
246
- f("div", we, [
247
- u(L) ? (d(), k(R, { key: 0 }, [
248
- f("section", {
252
+ p("div", Ie, [
253
+ u(w) ? (d(), C(O, { key: 0 }, [
254
+ p("section", {
249
255
  class: Q(["chart-content", [{ "with-legend": !a.hideLegend }]])
250
256
  }, [
251
- f("div", Ae, [
252
- F(Te, {
257
+ p("div", Ae, [
258
+ F(ke, {
253
259
  "chart-type": u(c),
254
- "onUpdate:chart-type": o[1] || (o[1] = (r) => V(c) ? c.value = r : null),
260
+ "onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
255
261
  "with-settings-header": a.withSettingsHeader,
256
262
  header: a.header,
257
263
  subheader: a.subheader,
258
- "subheader-tooltip": a.subheaderTooltip
259
- }, null, 8, ["chart-type", "with-settings-header", "header", "subheader", "subheader-tooltip"])
264
+ "with-subheader-tooltip": a.withSubheaderTooltip
265
+ }, {
266
+ "subheader-tooltip": k(() => [
267
+ x(e.$slots, "subheader-tooltip", {}, void 0, !0)
268
+ ]),
269
+ _: 3
270
+ }, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
260
271
  ]),
261
- f("div", Ee, [
262
- f("canvas", {
272
+ p("div", Ee, [
273
+ p("canvas", {
263
274
  ref_key: "chartRef",
264
- ref: p,
275
+ ref: m,
265
276
  class: "chart__canvas"
266
277
  }, null, 512),
267
- f("div", {
278
+ p("div", {
268
279
  ref_key: "tooltipRef",
269
- ref: I,
280
+ ref: A,
270
281
  class: "chart__tooltip",
271
282
  style: Y(u(Z))
272
283
  }, [
273
- l.value ? (d(), m(Ce, {
284
+ r.value ? (d(), h(Te, {
274
285
  key: 0,
275
- title: String(l.value.title),
276
- "data-points": l.value.dataPoints,
286
+ title: String(r.value.title),
287
+ "data-points": r.value.dataPoints,
277
288
  "x-axis-format": a.xAxisFormat,
278
289
  "y-axis-format": a.yAxisFormat,
279
- "total-label": l.value.footer[0],
280
- "total-value": Number(l.value.footer[1])
290
+ "total-label": r.value.footer[0],
291
+ "total-value": Number(r.value.footer[1])
281
292
  }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
282
293
  ], 4)
283
294
  ])
284
295
  ], 2),
285
- a.hideLegend ? v("", !0) : (d(), k("section", Re, [
286
- F(ke, {
296
+ a.hideLegend ? v("", !0) : (d(), C("section", Re, [
297
+ F(Ce, {
287
298
  items: u(W),
288
299
  "visible-ids": a.visibleIds,
289
- "onUpdate:visibleIds": o[2] || (o[2] = (r) => T("update:visibleIds", r))
290
- }, null, 8, ["items", "visible-ids"])
300
+ "max-limit-tooltip-text": a.maxLimitTooltipText,
301
+ "onUpdate:visibleIds": o[2] || (o[2] = (i) => L("update:visibleIds", i))
302
+ }, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
291
303
  ]))
292
- ], 64)) : a.loading ? (d(), m(xe, { key: 1 })) : u(S) ? (d(), m(u(Be), {
304
+ ], 64)) : a.loading ? (d(), h(Se, { key: 1 })) : u(S) ? (d(), h(u(we), {
293
305
  key: 2,
294
306
  title: a.noDataTitle,
295
307
  subtitle: a.noDataSubtitle,
@@ -1,16 +1,16 @@
1
1
  import { ChartType } from '@/components/chart/types';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
3
  chartType: ChartType;
4
4
  withSettingsHeader: boolean;
5
5
  header?: string;
6
6
  subheader?: string;
7
- subheaderTooltip?: string;
7
+ withSubheaderTooltip?: boolean;
8
8
  }>, {
9
9
  chartType: ChartType;
10
10
  withSettingsHeader: boolean;
11
11
  header: string;
12
12
  subheader: string;
13
- subheaderTooltip: string;
13
+ withSubheaderTooltip: boolean;
14
14
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
15
  "update:chartType": (type: ChartType) => void;
16
16
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -18,13 +18,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
18
18
  withSettingsHeader: boolean;
19
19
  header?: string;
20
20
  subheader?: string;
21
- subheaderTooltip?: string;
21
+ withSubheaderTooltip?: boolean;
22
22
  }>, {
23
23
  chartType: ChartType;
24
24
  withSettingsHeader: boolean;
25
25
  header: string;
26
26
  subheader: string;
27
- subheaderTooltip: string;
27
+ withSubheaderTooltip: boolean;
28
28
  }>>> & {
29
29
  "onUpdate:chartType"?: (type: ChartType) => any;
30
30
  }, {
@@ -32,7 +32,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
32
32
  chartType: ChartType;
33
33
  withSettingsHeader: boolean;
34
34
  subheader: string;
35
- subheaderTooltip: string;
35
+ withSubheaderTooltip: boolean;
36
+ }>, {
37
+ "subheader-tooltip"?(_: {}): any;
36
38
  }>;
37
39
  export default _default;
38
40
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -52,3 +54,8 @@ type __VLS_WithDefaults<P, D> = {
52
54
  type __VLS_Prettify<T> = {
53
55
  [K in keyof T]: T[K];
54
56
  } & {};
57
+ type __VLS_WithTemplateSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -1,7 +1,7 @@
1
1
  import e from "./ChartHeader.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css"; //*');
4
- const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4c37736e"]]);
3
+ // import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-b8213498"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,66 +1,69 @@
1
- import "../../ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css"; import { defineComponent as y, computed as T, openBlock as c, createElementBlock as x, createElementVNode as V, createVNode as d, unref as t, withCtx as i, createTextVNode as u, toDisplayString as s, createBlock as b, isRef as g, createCommentVNode as k } from "vue";
1
+ import "../../ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css"; import { defineComponent as y, computed as T, openBlock as c, createElementBlock as b, createElementVNode as S, createVNode as i, unref as a, withCtx as o, renderSlot as V, createTextVNode as s, toDisplayString as u, createBlock as g, isRef as v, createCommentVNode as w } from "vue";
2
2
  import h from "../typography/v4/Typography.vue.js";
3
- import v from "../switch/v4/SwitchV4.vue.js";
3
+ import B from "../switch/v4/SwitchV4.vue.js";
4
4
  import { ChartType as r } from "./types.js";
5
- import B from "../tooltip/v4/TooltipV4.vue.js";
6
- const C = { class: "chart-header" }, S = { class: "header-texts" }, E = /* @__PURE__ */ y({
5
+ import k from "../tooltip/v4/TooltipV4.vue.js";
6
+ const C = { class: "chart-header" }, x = { class: "header-texts" }, D = /* @__PURE__ */ y({
7
7
  __name: "ChartHeader",
8
8
  props: {
9
9
  chartType: { default: r.Line },
10
10
  withSettingsHeader: { type: Boolean, default: !0 },
11
11
  header: { default: "" },
12
12
  subheader: { default: "" },
13
- subheaderTooltip: { default: "" }
13
+ withSubheaderTooltip: { type: Boolean, default: !1 }
14
14
  },
15
15
  emits: ["update:chartType"],
16
16
  setup(e, { emit: p }) {
17
- const m = e, n = [
17
+ const m = e, l = [
18
18
  { id: r.Line, icon: "chart-line-up" },
19
19
  { id: r.Bar, icon: "chart-bar" },
20
20
  { id: r.StackedLine, icon: "chart-line" }
21
- ], o = T({
21
+ ], d = T({
22
22
  get() {
23
- return n.find(({ id: a }) => a === m.chartType);
23
+ return l.find(({ id: t }) => t === m.chartType);
24
24
  },
25
- set(a) {
26
- p("update:chartType", a.id);
25
+ set(t) {
26
+ p("update:chartType", t.id);
27
27
  }
28
28
  });
29
- return (a, l) => (c(), x("div", C, [
30
- V("div", S, [
31
- d(t(B), {
32
- text: e.subheaderTooltip,
33
- placement: "right"
29
+ return (t, n) => (c(), b("div", C, [
30
+ S("div", x, [
31
+ i(a(k), {
32
+ placement: "right",
33
+ disabled: !e.withSubheaderTooltip
34
34
  }, {
35
- default: i(() => [
36
- d(t(h), {
35
+ tooltip: o(() => [
36
+ V(t.$slots, "subheader-tooltip", {}, void 0, !0)
37
+ ]),
38
+ default: o(() => [
39
+ i(a(h), {
37
40
  class: "subheader",
38
41
  variant: "h5"
39
42
  }, {
40
- default: i(() => [
41
- u(s(e.subheader), 1)
43
+ default: o(() => [
44
+ s(u(e.subheader), 1)
42
45
  ]),
43
46
  _: 1
44
47
  })
45
48
  ]),
46
- _: 1
47
- }, 8, ["text"]),
48
- d(t(h), { variant: "chart2" }, {
49
- default: i(() => [
50
- u(s(e.header), 1)
49
+ _: 3
50
+ }, 8, ["disabled"]),
51
+ i(a(h), { variant: "chart2" }, {
52
+ default: o(() => [
53
+ s(u(e.header), 1)
51
54
  ]),
52
55
  _: 1
53
56
  })
54
57
  ]),
55
- e.withSettingsHeader ? k("", !0) : (c(), b(t(v), {
58
+ e.withSettingsHeader ? w("", !0) : (c(), g(a(B), {
56
59
  key: 0,
57
- modelValue: t(o),
58
- "onUpdate:modelValue": l[0] || (l[0] = (f) => g(o) ? o.value = f : null),
59
- options: n
60
+ modelValue: a(d),
61
+ "onUpdate:modelValue": n[0] || (n[0] = (f) => v(d) ? d.value = f : null),
62
+ options: l
60
63
  }, null, 8, ["modelValue"]))
61
64
  ]));
62
65
  }
63
66
  });
64
67
  export {
65
- E as default
68
+ D as default
66
69
  };