@ironsource/shared-ui 2.1.12-rc.18 → 2.1.12-rc.19

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.
@@ -0,0 +1 @@
1
+ .chart-container[data-v-53316c89]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-53316c89]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-53316c89]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-53316c89]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-53316c89]{border-left:1px solid var(--common-divider)}
@@ -0,0 +1 @@
1
+ .chart-plane-container[data-v-903fc6ae]{--headerHeight: var(--d271311a);width:100%;height:var(--6c5bc85e);position:relative}.header-wrapper[data-v-903fc6ae]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-903fc6ae]{padding-top:var(--headerHeight);height:100%}.chart[data-v-903fc6ae]{width:100%;height:100%;position:relative}.chart__canvas[data-v-903fc6ae]{width:100%;height:100%}.chart__tooltip[data-v-903fc6ae]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
@@ -0,0 +1 @@
1
+ .chart-tooltip[data-v-e53c6287]{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)}.color-box[data-v-e53c6287]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-e53c6287]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-e53c6287]{list-style:none;margin:0;padding:0}.list__item[data-v-e53c6287]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-e53c6287]:last-child{margin-bottom:0}.platform-icon[data-v-e53c6287]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-e53c6287]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-e53c6287]{max-width:90%}.tooltip-footer[data-v-e53c6287]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-e53c6287]{flex-grow:1}
@@ -17,6 +17,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
17
17
  tooltipTotalType?: TotalType;
18
18
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
19
19
  tooltipOrder?: TooltipOrder;
20
+ valueSuffix?: string;
21
+ valuePrefix?: string;
20
22
  header?: string;
21
23
  subheader?: string;
22
24
  subheaderTooltip?: {
@@ -61,6 +63,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
61
63
  tooltipTotalType: TotalType;
62
64
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
63
65
  tooltipOrder: TooltipOrder;
66
+ valueSuffix: string;
67
+ valuePrefix: string;
64
68
  header: string;
65
69
  subheader: string;
66
70
  subheaderTooltip: any;
@@ -102,6 +106,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
102
106
  tooltipTotalType?: TotalType;
103
107
  tooltipTotalCalcFn?: (values: number[], totalType: TotalType) => number;
104
108
  tooltipOrder?: TooltipOrder;
109
+ valueSuffix?: string;
110
+ valuePrefix?: string;
105
111
  header?: string;
106
112
  subheader?: string;
107
113
  subheaderTooltip?: {
@@ -146,6 +152,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
146
152
  tooltipTotalType: TotalType;
147
153
  tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
148
154
  tooltipOrder: TooltipOrder;
155
+ valueSuffix: string;
156
+ valuePrefix: string;
149
157
  header: string;
150
158
  subheader: string;
151
159
  subheaderTooltip: any;
@@ -187,6 +195,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
187
195
  totalsChart: boolean;
188
196
  parsing: ChartParsingConfig;
189
197
  yAxisFormat: ValueFormat;
198
+ valueSuffix: string;
199
+ valuePrefix: string;
190
200
  dataSets: ChartDataSet[];
191
201
  trendTooltip: any;
192
202
  subheader: string;
@@ -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_5525b3bc_lang.css"; //*');
4
- const c = /* @__PURE__ */ _(o, [["__scopeId", "data-v-5525b3bc"]]);
3
+ // import "../../Chart.vue_vue_type_style_index_0_scoped_53316c89_lang.css"; //*');
4
+ const c = /* @__PURE__ */ _(o, [["__scopeId", "data-v-53316c89"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_5525b3bc_lang.css"; import { defineComponent as O, ref as E, computed as n, openBlock as s, createElementBlock as m, Fragment as S, createBlock as I, unref as l, isRef as y, withCtx as d, renderSlot as u, createCommentVNode as D, createElementVNode as k, mergeProps as b, normalizeClass as N, createVNode as L, createSlots as P, renderList as M } from "vue";
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_53316c89_lang.css"; import { defineComponent as U, ref as O, computed as n, openBlock as s, createElementBlock as m, Fragment as S, createBlock as I, unref as i, isRef as b, withCtx as d, renderSlot as u, createCommentVNode as D, createElementVNode as k, mergeProps as y, normalizeClass as E, createVNode as L, createSlots as N, renderList as M } from "vue";
2
2
  import { useVModel as A } from "@vueuse/core";
3
3
  import $ from "./ChartLegend.vue.js";
4
4
  import K from "./SettingsHeader.vue.js";
5
- import F from "./ChartPlane.vue.js";
5
+ import V from "./ChartPlane.vue.js";
6
6
  import { useColorsMap as z } from "./composables/useColorsMap.js";
7
7
  import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as Y } from "./consts.js";
8
8
  import { ChartType as j, DateInterval as q, TooltipOrder as G, TrendDirection as J } from "./types.js";
@@ -11,7 +11,7 @@ import { TotalType as W, calculateTotal as Z } from "../../utils/totals.js";
11
11
  const _ = {
12
12
  key: 0,
13
13
  class: "chart-sidebar"
14
- }, ue = /* @__PURE__ */ O({
14
+ }, ue = /* @__PURE__ */ U({
15
15
  __name: "Chart",
16
16
  props: {
17
17
  dataSets: { default: () => [] },
@@ -22,7 +22,7 @@ const _ = {
22
22
  yAxisFormat: { default: "number" },
23
23
  xAxisDateInterval: { default: q.DAILY },
24
24
  tickCount: { default: R },
25
- truncateTickLabels: { type: Boolean, default: !0 },
25
+ truncateTickLabels: { type: Boolean, default: !1 },
26
26
  loading: { type: Boolean, default: !1 },
27
27
  empty: { type: Boolean, default: !1 },
28
28
  withAnimation: { type: Boolean, default: !0 },
@@ -30,6 +30,8 @@ const _ = {
30
30
  tooltipTotalType: { default: W.Total },
31
31
  tooltipTotalCalcFn: { type: Function, default: Z },
32
32
  tooltipOrder: { default: G.Legend },
33
+ valueSuffix: { default: "" },
34
+ valuePrefix: { default: "" },
33
35
  header: { default: "" },
34
36
  subheader: { default: "" },
35
37
  subheaderTooltip: { default: null },
@@ -52,8 +54,8 @@ const _ = {
52
54
  extraCharts: { default: () => [] }
53
55
  },
54
56
  emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
55
- setup(i, { emit: p }) {
56
- const e = i, r = A(e, "chartType", p), h = A(e, "sortSelected", p), c = E(null), g = n(() => ({
57
+ setup(a, { emit: p }) {
58
+ const e = a, r = A(e, "chartType", p), h = A(e, "sortSelected", p), c = O(null), g = n(() => ({
57
59
  dataSets: e.dataSets,
58
60
  visibleIds: e.visibleIds,
59
61
  parsing: e.parsing,
@@ -71,8 +73,8 @@ const _ = {
71
73
  noDataSubtitle: e.noDataSubtitle,
72
74
  withAnimation: e.withAnimation,
73
75
  typeSwitcher: !e.withSettingsHeader,
74
- height: U.value,
75
- compactHeader: C.value > 1,
76
+ height: P.value,
77
+ compactHeader: x.value > 1,
76
78
  trendValue: e.trendValue,
77
79
  trendDirection: e.trendDirection,
78
80
  trendTooltip: e.trendTooltip,
@@ -83,10 +85,12 @@ const _ = {
83
85
  tooltipTotalType: e.tooltipTotalType,
84
86
  tooltipTotalCalcFn: e.tooltipTotalCalcFn,
85
87
  tooltipOrder: e.tooltipOrder,
86
- highlightedId: c.value
87
- })), B = n(() => e.dataSets), T = n(() => e.visibleIds), v = n(() => e.extraCharts.length), C = n(() => 1 + v.value), V = (t) => t === v.value - 1, { colorsMap: f } = z({
88
- dataSets: B,
89
- visibleIds: T
88
+ highlightedId: c.value,
89
+ valueSuffix: e.valueSuffix,
90
+ valuePrefix: e.valuePrefix
91
+ })), F = n(() => e.dataSets), v = n(() => e.visibleIds), T = n(() => e.extraCharts.length), x = n(() => 1 + T.value), B = (t) => t === T.value - 1, { colorsMap: f } = z({
92
+ dataSets: F,
93
+ visibleIds: v
90
94
  }), w = n(() => e.dataSets.map((t) => ({
91
95
  id: t.id,
92
96
  label: t.label,
@@ -94,16 +98,16 @@ const _ = {
94
98
  color: f.value[t.id] || null,
95
99
  icon: t.icon || null,
96
100
  iconType: t.iconType || "branded"
97
- }))), { containerProps: H, eachPlaneHeight: U } = Q({
98
- chartPlanesCount: C,
101
+ }))), { containerProps: H, eachPlaneHeight: P } = Q({
102
+ chartPlanesCount: x,
99
103
  useFullHeight: e.fullHeight
100
104
  });
101
105
  return (t, o) => (s(), m(S, null, [
102
- i.withSettingsHeader ? (s(), I(K, {
106
+ a.withSettingsHeader ? (s(), I(K, {
103
107
  key: 0,
104
- "chart-type": l(r),
105
- "onUpdate:chart-type": o[0] || (o[0] = (a) => y(r) ? r.value = a : null),
106
- "hide-legend": i.hideLegend
108
+ "chart-type": i(r),
109
+ "onUpdate:chart-type": o[0] || (o[0] = (l) => b(r) ? r.value = l : null),
110
+ "hide-legend": a.hideLegend
107
111
  }, {
108
112
  "before-chart-type": d(() => [
109
113
  u(t.$slots, "before-chart-type", {}, void 0, !0)
@@ -116,14 +120,14 @@ const _ = {
116
120
  ]),
117
121
  _: 3
118
122
  }, 8, ["chart-type", "hide-legend"])) : D("", !0),
119
- k("div", b({ class: "chart-container" }, l(H)), [
123
+ k("div", y({ class: "chart-container" }, i(H)), [
120
124
  k("section", {
121
- class: N(["chart-planes", [{ "with-legend": !i.hideLegend }]])
125
+ class: E(["chart-planes", [{ "with-legend": !a.hideLegend }]])
122
126
  }, [
123
- L(F, b({
124
- "chart-type": l(r),
125
- "onUpdate:chart-type": o[1] || (o[1] = (a) => y(r) ? r.value = a : null)
126
- }, l(g)), P({ _: 2 }, [
127
+ L(V, y({
128
+ "chart-type": i(r),
129
+ "onUpdate:chart-type": o[1] || (o[1] = (l) => b(r) ? r.value = l : null)
130
+ }, i(g)), N({ _: 2 }, [
127
131
  t.$slots["subheader-tooltip"] ? {
128
132
  name: "subheader-tooltip",
129
133
  fn: d(() => [
@@ -132,29 +136,31 @@ const _ = {
132
136
  key: "0"
133
137
  } : void 0
134
138
  ]), 1040, ["chart-type"]),
135
- (s(!0), m(S, null, M(i.extraCharts, (a, x) => (s(), I(F, b({
136
- key: x,
139
+ (s(!0), m(S, null, M(a.extraCharts, (l, C) => (s(), I(V, y({
140
+ key: C,
137
141
  class: "extra-chart-plane"
138
- }, { ...l(g), ...a }, {
139
- "chart-type": l(r),
140
- "colors-map": l(f),
142
+ }, { ...i(g), ...l }, {
143
+ "chart-type": i(r),
144
+ "colors-map": i(f),
141
145
  "type-switcher": !1,
142
- "tooltip-respects-top-edge": !V(x)
146
+ "tooltip-respects-top-edge": !B(C)
143
147
  }), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
144
148
  ], 2),
145
- i.hideLegend ? D("", !0) : (s(), m("section", _, [
149
+ a.hideLegend ? D("", !0) : (s(), m("section", _, [
146
150
  L($, {
147
- "sort-selected": l(h),
148
- "onUpdate:sort-selected": o[2] || (o[2] = (a) => y(h) ? h.value = a : null),
151
+ "sort-selected": i(h),
152
+ "onUpdate:sort-selected": o[2] || (o[2] = (l) => b(h) ? h.value = l : null),
149
153
  "highlighted-id": c.value,
150
- "onUpdate:highlighted-id": o[3] || (o[3] = (a) => c.value = a),
151
- items: l(w),
152
- "visible-ids": l(T),
153
- "max-limit-tooltip-text": i.maxLimitTooltipText,
154
- "sort-options": i.sortOptions,
155
- "sort-option-name-key": i.sortOptionNameKey,
156
- "onUpdate:visibleIds": o[4] || (o[4] = (a) => p("update:visibleIds", a))
157
- }, null, 8, ["sort-selected", "highlighted-id", "items", "visible-ids", "max-limit-tooltip-text", "sort-options", "sort-option-name-key"])
154
+ "onUpdate:highlighted-id": o[3] || (o[3] = (l) => c.value = l),
155
+ items: i(w),
156
+ "visible-ids": i(v),
157
+ "max-limit-tooltip-text": a.maxLimitTooltipText,
158
+ "sort-options": a.sortOptions,
159
+ "sort-option-name-key": a.sortOptionNameKey,
160
+ "min-visible": a.minVisible,
161
+ "max-visible": a.maxVisible,
162
+ "onUpdate:visibleIds": o[4] || (o[4] = (l) => p("update:visibleIds", l))
163
+ }, null, 8, ["sort-selected", "highlighted-id", "items", "visible-ids", "max-limit-tooltip-text", "sort-options", "sort-option-name-key", "min-visible", "max-visible"])
158
164
  ]))
159
165
  ], 16)
160
166
  ], 64));
@@ -40,6 +40,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
40
  };
41
41
  totalsChart?: boolean;
42
42
  colorsMap: Record<string, string>;
43
+ valueSuffix?: string;
44
+ valuePrefix?: string;
43
45
  }>, {
44
46
  chartType: ChartType;
45
47
  dataSets: () => any[];
@@ -73,6 +75,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
73
75
  trendTooltip: any;
74
76
  totalsChart: boolean;
75
77
  colorsMap: () => {};
78
+ valueSuffix: string;
79
+ valuePrefix: string;
76
80
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
81
  "update:chartType": (chartType: ChartType) => void;
78
82
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -115,6 +119,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
115
119
  };
116
120
  totalsChart?: boolean;
117
121
  colorsMap: Record<string, string>;
122
+ valueSuffix?: string;
123
+ valuePrefix?: string;
118
124
  }>, {
119
125
  chartType: ChartType;
120
126
  dataSets: () => any[];
@@ -148,6 +154,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
148
154
  trendTooltip: any;
149
155
  totalsChart: boolean;
150
156
  colorsMap: () => {};
157
+ valueSuffix: string;
158
+ valuePrefix: string;
151
159
  }>>> & {
152
160
  "onUpdate:chartType"?: (chartType: ChartType) => any;
153
161
  }, {
@@ -162,6 +170,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
162
170
  totalsChart: boolean;
163
171
  parsing: ChartParsingConfig;
164
172
  yAxisFormat: ValueFormat;
173
+ valueSuffix: string;
174
+ valuePrefix: string;
165
175
  dataSets: ChartDataSet[];
166
176
  trendTooltip: any;
167
177
  subheader: string;
@@ -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_fc79a730_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fc79a730"]]);
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_903fc6ae_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-903fc6ae"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,40 +1,40 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_fc79a730_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as l, ref as k, onMounted as ne, watch as T, nextTick as se, openBlock as p, createElementBlock as x, createVNode as ce, isRef as de, createSlots as ue, withCtx as pe, renderSlot as fe, createCommentVNode as A, createElementVNode as S, normalizeStyle as he, createBlock as L } from "vue";
2
- import { Chart as F, ArcElement as me, LineElement as ve, BarElement as ye, PointElement as Te, LineController as Ce, BarController as ge, PieController as be, ScatterController as ke, CategoryScale as xe, LinearScale as Ae, Filler as Se, Tooltip as Le } from "chart.js";
1
+ import "../../ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as l, ref as k, onMounted as ne, watch as T, nextTick as se, openBlock as f, createElementBlock as S, createVNode as ue, isRef as ce, createSlots as de, withCtx as pe, renderSlot as fe, createCommentVNode as A, createElementVNode as L, normalizeStyle as he, createBlock as E } from "vue";
2
+ import { Chart as N, ArcElement as me, LineElement as ve, BarElement as ye, PointElement as Te, LineController as Ce, BarController as be, PieController as ge, ScatterController as xe, CategoryScale as ke, LinearScale as Se, Filler as Ae, Tooltip as Le } from "chart.js";
3
3
  import { HoverVerticalLine as Ee } from "./plugins/HoverVerticalLine.js";
4
4
  import { prepareTickLabel as Re, formatValue as Be, calcStepSize as De } from "./utils/utils.js";
5
- import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as _, BASE_COLOR_KEY as K, CHART_PADDING as E, POINT_BORDER_COLOR as Ie, TICK_LABEL_COLOR as M, TICK_LABEL_FONT as U, TICKS_EXTRA_PADDING as He, GRID_LINE_COLOR as z, HEADER_HEIGHT as Ve, COMPACT_HEADER_HEIGHT as we, HOVER_AREA_TRANSPARENCY as Ne, HOVER_TRANSPARENCY as C } from "./consts.js";
6
- import { ChartType as c, DateInterval as Pe, TooltipOrder as Y, TrendDirection as Fe } from "./types.js";
7
- import { useTooltipPosition as _e } from "./composables/useTooltipPosition.js";
8
- import Ke from "./ChartTooltip.vue.js";
9
- import { hexColorToRgba as f } from "../../utils/color.js";
10
- import { useChartValues as Me } from "./composables/useChartValues.js";
11
- import Ue from "./ChartHeader.vue.js";
12
- import { useMemoize as ze, useVModel as Ye } from "@vueuse/core";
13
- import Ge from "../emptyState/v4/EmptyStateV4.vue.js";
14
- import $e from "./ChartLoader.vue.js";
15
- import { DEFAULT_CHART_COLOR as We } from "./colorPalette.js";
16
- import { TotalType as G, calculateTotal as Ze } from "../../utils/totals.js";
17
- import { isNullOrUndefined as Xe } from "../../utils/utils.js";
18
- import { storeOriginalDatasetColors as je, restoreOriginalDatasetColors as qe } from "./utils/highlightUtils.js";
19
- const Je = { class: "chart-plane-container" }, Qe = {
5
+ import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as F, BASE_COLOR_KEY as K, CHART_PADDING as Ie, POINT_BORDER_COLOR as He, TICK_LABEL_COLOR as M, TICK_LABEL_FONT as U, TICKS_EXTRA_PADDING as Ve, GRID_LINE_COLOR as z, HEADER_HEIGHT as we, COMPACT_HEADER_HEIGHT as Pe, HOVER_AREA_TRANSPARENCY as Ne, HOVER_TRANSPARENCY as C } from "./consts.js";
6
+ import { ChartType as u, DateInterval as Fe, TooltipOrder as Y, TrendDirection as Ke } from "./types.js";
7
+ import { useTooltipPosition as Me } from "./composables/useTooltipPosition.js";
8
+ import Ue from "./ChartTooltip.vue.js";
9
+ import { hexColorToRgba as h } from "../../utils/color.js";
10
+ import { useChartValues as ze } from "./composables/useChartValues.js";
11
+ import Ye from "./ChartHeader.vue.js";
12
+ import { useMemoize as _e, useVModel as Ge } from "@vueuse/core";
13
+ import $e from "../emptyState/v4/EmptyStateV4.vue.js";
14
+ import We from "./ChartLoader.vue.js";
15
+ import { DEFAULT_CHART_COLOR as Ze } from "./colorPalette.js";
16
+ import { TotalType as _, calculateTotal as Xe } from "../../utils/totals.js";
17
+ import { isNullOrUndefined as je } from "../../utils/utils.js";
18
+ import { storeOriginalDatasetColors as qe, restoreOriginalDatasetColors as Je } from "./utils/highlightUtils.js";
19
+ const Qe = { class: "chart-plane-container" }, et = {
20
20
  key: 0,
21
21
  class: "header-wrapper"
22
- }, et = {
22
+ }, tt = {
23
23
  key: 1,
24
24
  class: "chart-plane"
25
- }, tt = { class: "chart" }, gt = /* @__PURE__ */ re({
25
+ }, at = { class: "chart" }, gt = /* @__PURE__ */ re({
26
26
  __name: "ChartPlane",
27
27
  props: {
28
28
  dataSets: { default: () => [] },
29
29
  visibleIds: { default: () => [] },
30
30
  highlightedId: { default: null },
31
- chartType: { default: c.Line },
31
+ chartType: { default: u.Line },
32
32
  parsing: { default: void 0 },
33
33
  xAxisFormat: { default: "string" },
34
34
  yAxisFormat: { default: "number" },
35
- xAxisDateInterval: { default: Pe.DAILY },
35
+ xAxisDateInterval: { default: Fe.DAILY },
36
36
  tickCount: { default: Oe },
37
- truncateTickLabels: { type: Boolean, default: !0 },
37
+ truncateTickLabels: { type: Boolean, default: !1 },
38
38
  header: { default: "" },
39
39
  subheader: { default: "" },
40
40
  subheaderTooltip: { default: null },
@@ -49,74 +49,76 @@ const Je = { class: "chart-plane-container" }, Qe = {
49
49
  height: { default: "100%" },
50
50
  compactHeader: { type: Boolean, default: !1 },
51
51
  tooltipRespectsTopEdge: { type: Boolean, default: !0 },
52
- tooltipTotalType: { default: G.Total },
53
- tooltipTotalCalcFn: { type: Function, default: Ze },
52
+ tooltipTotalType: { default: _.Total },
53
+ tooltipTotalCalcFn: { type: Function, default: Xe },
54
54
  tooltipOrder: { default: Y.Legend },
55
55
  trendValue: { default: null },
56
- trendDirection: { default: Fe.UP },
56
+ trendDirection: { default: Ke.UP },
57
57
  trendTooltip: { default: null },
58
58
  totalsChart: { type: Boolean, default: !1 },
59
- colorsMap: { default: () => ({}) }
59
+ colorsMap: { default: () => ({}) },
60
+ valueSuffix: { default: "" },
61
+ valuePrefix: { default: "" }
60
62
  },
61
63
  emits: ["update:chartType"],
62
- setup(o, { emit: $ }) {
64
+ setup(o, { emit: G }) {
63
65
  const e = o;
64
66
  ie((t) => ({
65
- "498cf638": s(te),
66
- b6d23262: o.height
67
+ d271311a: s(ee),
68
+ "6c5bc85e": o.height
67
69
  }));
68
- const W = ze(Re);
69
- F.register(
70
+ const $ = _e(Re);
71
+ N.register(
70
72
  me,
71
73
  ve,
72
74
  ye,
73
75
  Te,
74
76
  Ce,
75
- ge,
76
77
  be,
77
- ke,
78
+ ge,
78
79
  xe,
79
- Ae,
80
+ ke,
80
81
  Se,
82
+ Ae,
81
83
  Le,
82
84
  Ee
83
85
  );
84
- const g = Ye(e, "chartType", $), Z = l(
86
+ const b = Ge(e, "chartType", G), W = l(
85
87
  () => e.withAnimation ? "" : "none"
86
88
  ), m = k(null);
87
89
  let n = null;
88
- const R = l(() => e.empty || e.dataSets.length === 0), u = l(() => !e.loading && !R.value), b = () => {
89
- m.value && (n && n.destroy(), n = new F(m.value, H.value));
90
- }, X = () => {
91
- n && (n.data.datasets = I.value, n.options = H.value.options, n.update(Z.value));
90
+ const R = l(() => e.empty || e.dataSets.length === 0), d = l(() => !e.loading && !R.value), g = () => {
91
+ m.value && (n && n.destroy(), n = new N(m.value, I.value));
92
+ }, Z = () => {
93
+ n && (n.data.datasets = O.value, n.options = I.value.options, n.update(W.value));
92
94
  };
93
- ne(b), T(() => e.chartType, b), T(u, async (t) => {
94
- t && (await se(), b());
95
- }), T([() => e.visibleIds, () => e.dataSets], X);
96
- const h = l(() => e.totalsChart), v = l(
97
- () => e.chartType === c.StackedLine || e.chartType === c.StackedBar || h.value
98
- ), B = l(
99
- () => e.chartType === c.Line || e.chartType === c.StackedLine
100
- ), D = l(() => h.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: _ } : e.parsing), j = l(() => h.value ? e.dataSets.map((t) => ({
95
+ ne(g), T(() => e.chartType, g), T(d, async (t) => {
96
+ t && (await se(), g());
97
+ }), T([() => e.visibleIds, () => e.dataSets], Z);
98
+ const p = l(() => e.totalsChart), v = l(
99
+ () => e.chartType === u.StackedLine || e.chartType === u.StackedBar || p.value
100
+ ), x = l(
101
+ () => e.chartType === u.Line || e.chartType === u.StackedLine
102
+ ), B = l(() => p.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: F } : e.parsing), X = l(() => p.value ? e.dataSets.map((t) => ({
101
103
  ...t,
102
104
  data: t.data.map((i) => ({
103
105
  ...i,
104
- [_]: t.label
106
+ [F]: t.label
105
107
  }))
106
108
  })) : e.dataSets), y = l(
107
- () => j.value.filter((t) => e.visibleIds.includes(t.id))
108
- ), q = (t) => e.colorsMap[t] || We, O = l(
109
+ () => X.value.filter((t) => e.visibleIds.includes(t.id))
110
+ ), j = (t) => e.colorsMap[t] || Ze, D = l(
109
111
  () => y.value.length && y.value.every(
110
112
  (t) => t.data.length === 1
111
113
  )
112
- ), I = l(() => y.value.map((t, i) => {
113
- const a = q(t.id), r = v.value ? i !== 0 ? "-1" : "start" : void 0;
114
+ ), O = l(() => y.value.map((t, i) => {
115
+ const a = j(t.id), r = v.value ? i !== 0 ? "-1" : "start" : void 0;
114
116
  return {
115
117
  ...t,
116
118
  fill: r,
117
- backgroundColor: f(
119
+ backgroundColor: h(
118
120
  a,
119
- e.chartType === c.StackedLine ? 10 : 70
121
+ e.chartType === u.StackedLine ? 10 : 70
120
122
  ),
121
123
  borderColor: a,
122
124
  pointBackgroundColor: a,
@@ -129,33 +131,33 @@ const Je = { class: "chart-plane-container" }, Qe = {
129
131
  [K]: a
130
132
  // store base color for later use
131
133
  };
132
- })), J = l(
133
- () => e.tooltipTotalType === G.Total ? "Total" : "Mean"
134
- ), H = l(() => ({
135
- type: e.chartType == c.Bar || e.chartType === c.StackedBar ? "bar" : "line",
134
+ })), q = l(
135
+ () => e.tooltipTotalType === _.Total ? "Total" : "Mean"
136
+ ), I = l(() => ({
137
+ type: e.chartType == u.Bar || e.chartType === u.StackedBar ? "bar" : "line",
136
138
  // Chart Data
137
139
  data: {
138
- datasets: I.value
140
+ datasets: O.value
139
141
  },
140
142
  // Chart Options
141
143
  options: {
142
- parsing: D.value,
144
+ parsing: B.value,
143
145
  interaction: {
144
146
  intersect: !1,
145
- mode: h.value ? "point" : "index",
147
+ mode: p.value ? "point" : "index",
146
148
  axis: "x"
147
149
  },
148
150
  // plugins
149
151
  plugins: {
150
152
  legend: { display: !1 },
151
153
  title: { display: !1 },
152
- hoverVerticalLine: B.value,
154
+ hoverVerticalLine: x.value,
153
155
  // tooltip
154
156
  tooltip: {
155
157
  enabled: !1,
156
158
  position: "average",
157
159
  external: ({ tooltip: t }) => {
158
- d.value = { ...t };
160
+ c.value = { ...t };
159
161
  },
160
162
  callbacks: {
161
163
  footer: (t) => {
@@ -163,7 +165,7 @@ const Je = { class: "chart-plane-container" }, Qe = {
163
165
  i,
164
166
  e.tooltipTotalType
165
167
  );
166
- return [J.value, String(a)];
168
+ return [q.value, String(a)];
167
169
  }
168
170
  },
169
171
  itemSort: (t, i) => {
@@ -179,7 +181,7 @@ const Je = { class: "chart-plane-container" }, Qe = {
179
181
  responsive: !0,
180
182
  maintainAspectRatio: !1,
181
183
  layout: {
182
- padding: E
184
+ padding: Ie
183
185
  },
184
186
  // basic styles
185
187
  elements: {
@@ -188,12 +190,12 @@ const Je = { class: "chart-plane-container" }, Qe = {
188
190
  tension: 0.3
189
191
  },
190
192
  point: {
191
- radius: O.value ? 3 : 1,
193
+ radius: D.value ? 3 : 1,
192
194
  hitRadius: 8,
193
195
  borderWidth: 0,
194
196
  hoverRadius: 4,
195
197
  hoverBorderWidth: 2,
196
- pointHoverBackgroundColor: Ie
198
+ pointHoverBackgroundColor: He
197
199
  },
198
200
  bar: {
199
201
  borderRadius: 4
@@ -203,7 +205,7 @@ const Je = { class: "chart-plane-container" }, Qe = {
203
205
  // Horizontal Axis (X)
204
206
  x: {
205
207
  beginAtZero: !0,
206
- offset: !B.value || O.value,
208
+ offset: !x.value || D.value,
207
209
  border: { display: !1 },
208
210
  stacked: v.value,
209
211
  // stack on top of each other
@@ -212,9 +214,12 @@ const Je = { class: "chart-plane-container" }, Qe = {
212
214
  color: M,
213
215
  font: U,
214
216
  padding: 4,
217
+ maxRotation: 0,
218
+ autoSkip: !e.truncateTickLabels,
219
+ autoSkipPadding: 8,
215
220
  callback: function(t, i, a) {
216
- const r = this.getLabelForValue(t), le = this.chart.width / a.length - (E.left + E.right + He);
217
- return W({
221
+ const r = this.getLabelForValue(t), oe = x.value && !p.value ? a.length - 1 : a.length, le = this.chart.scales?.x?.width / oe - Ve;
222
+ return $({
218
223
  label: r,
219
224
  format: e.xAxisFormat,
220
225
  availableSpace: le,
@@ -244,7 +249,7 @@ const Je = { class: "chart-plane-container" }, Qe = {
244
249
  font: U,
245
250
  padding: 8,
246
251
  stepSize: P.value,
247
- min: N.value,
252
+ min: w.value,
248
253
  max: P.value * e.tickCount,
249
254
  callback: (t) => Be(t, e.yAxisFormat)
250
255
  },
@@ -257,56 +262,56 @@ const Je = { class: "chart-plane-container" }, Qe = {
257
262
  }
258
263
  }
259
264
  }
260
- })), V = k(null), d = k(null), { position: w } = _e(
265
+ })), H = k(null), c = k(null), { position: V } = Me(
261
266
  m,
262
- V,
263
- d,
267
+ H,
268
+ c,
264
269
  e.tooltipRespectsTopEdge
265
- ), Q = l(() => ({
266
- left: `${w.value.left}px`,
267
- top: `${w.value.top}px`,
268
- opacity: d.value?.opacity || 0
269
- })), { minValue: N, maxValue: ee } = Me({
270
- parsingConfig: D.value,
270
+ ), J = l(() => ({
271
+ left: `${V.value.left}px`,
272
+ top: `${V.value.top}px`,
273
+ opacity: c.value?.opacity || 0
274
+ })), { minValue: w, maxValue: Q } = ze({
275
+ parsingConfig: B.value,
271
276
  dataSets: y,
272
277
  isStacked: v
273
278
  }), P = l(
274
- () => De(N.value, ee.value, e.tickCount)
275
- ), te = l(
276
- () => (e.compactHeader ? we : Ve) + "px"
279
+ () => De(w.value, Q.value, e.tickCount)
280
+ ), ee = l(
281
+ () => (e.compactHeader ? Pe : we) + "px"
277
282
  );
278
283
  T(
279
284
  () => e.highlightedId,
280
285
  (t) => {
281
- n && (Xe(t) ? oe() : ae(t), n.update());
286
+ n && (je(t) ? ae() : te(t), n.update());
282
287
  }
283
288
  );
284
- const ae = (t) => {
289
+ const te = (t) => {
285
290
  (n?.data.datasets || []).forEach((a) => {
286
- je(a);
291
+ qe(a);
287
292
  const r = a[K];
288
- a.id === t ? e.chartType === c.StackedLine && (a.backgroundColor = f(
293
+ a.id === t ? e.chartType === u.StackedLine && (a.backgroundColor = h(
289
294
  r,
290
295
  Ne
291
- )) : (a.backgroundColor = f(r, C), a.borderColor = f(r, C), a.pointBackgroundColor = f(r, C), a.pointHoverBorderColor = f(r, C));
296
+ )) : (a.backgroundColor = h(r, C), a.borderColor = h(r, C), a.pointBackgroundColor = h(r, C), a.pointHoverBorderColor = h(r, C));
292
297
  });
293
- }, oe = () => {
294
- (n?.data.datasets || []).forEach(qe);
298
+ }, ae = () => {
299
+ (n?.data.datasets || []).forEach(Je);
295
300
  };
296
- return (t, i) => (p(), x("div", Je, [
297
- s(u) || o.keepSubheaderVisible ? (p(), x("div", Qe, [
298
- ce(Ue, {
299
- "chart-type": s(g),
300
- "onUpdate:chart-type": i[0] || (i[0] = (a) => de(g) ? g.value = a : null),
301
- "type-switcher": s(u) ? o.typeSwitcher : !1,
302
- header: s(u) ? o.header : null,
301
+ return (t, i) => (f(), S("div", Qe, [
302
+ s(d) || o.keepSubheaderVisible ? (f(), S("div", et, [
303
+ ue(Ye, {
304
+ "chart-type": s(b),
305
+ "onUpdate:chart-type": i[0] || (i[0] = (a) => ce(b) ? b.value = a : null),
306
+ "type-switcher": s(d) ? o.typeSwitcher : !1,
307
+ header: s(d) ? o.header : null,
303
308
  subheader: o.subheader,
304
309
  "subheader-tooltip": o.subheaderTooltip,
305
310
  "trend-tooltip": o.trendTooltip,
306
311
  compact: o.compactHeader,
307
- "trend-value": s(u) ? o.trendValue : null,
312
+ "trend-value": s(d) ? o.trendValue : null,
308
313
  "trend-direction": o.trendDirection
309
- }, ue({ _: 2 }, [
314
+ }, de({ _: 2 }, [
310
315
  t.$slots["subheader-tooltip"] ? {
311
316
  name: "subheader-tooltip",
312
317
  fn: pe(() => [
@@ -316,38 +321,41 @@ const Je = { class: "chart-plane-container" }, Qe = {
316
321
  } : void 0
317
322
  ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
318
323
  ])) : A("", !0),
319
- s(u) ? (p(), x("section", et, [
320
- S("div", tt, [
321
- S("canvas", {
324
+ s(d) ? (f(), S("section", tt, [
325
+ L("div", at, [
326
+ L("canvas", {
322
327
  ref_key: "chartRef",
323
328
  ref: m,
324
329
  class: "chart__canvas"
325
330
  }, null, 512),
326
- S("div", {
331
+ L("div", {
327
332
  ref_key: "tooltipRef",
328
- ref: V,
333
+ ref: H,
329
334
  class: "chart__tooltip",
330
- style: he(s(Q))
335
+ style: he(s(J))
331
336
  }, [
332
- d.value ? (p(), L(Ke, {
337
+ c.value ? (f(), E(Ue, {
333
338
  key: 0,
334
- "totals-chart": s(h),
335
- title: String(d.value.title),
336
- "data-points": d.value.dataPoints,
339
+ "totals-chart": s(p),
340
+ title: String(c.value.title),
341
+ "data-points": c.value.dataPoints,
337
342
  "x-axis-format": o.xAxisFormat,
338
343
  "y-axis-format": o.yAxisFormat,
339
344
  "x-axis-date-interval": o.xAxisDateInterval,
340
- "total-label": d.value.footer?.[0],
341
- "total-value": Number(d.value.footer?.[1])
342
- }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value"])) : A("", !0)
345
+ "total-label": c.value.footer?.[0],
346
+ "total-value": Number(c.value.footer?.[1]),
347
+ "value-suffix": o.valueSuffix,
348
+ "value-prefix": o.valuePrefix
349
+ }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : A("", !0)
343
350
  ], 4)
344
351
  ])
345
- ])) : o.loading ? (p(), L($e, {
352
+ ])) : o.loading ? (f(), E(We, {
346
353
  key: 2,
347
354
  class: "chart-loading"
348
- })) : s(R) ? (p(), L(s(Ge), {
355
+ })) : s(R) ? (f(), E(s($e), {
349
356
  key: 3,
350
357
  class: "chart-empty",
358
+ variant: null,
351
359
  title: o.noDataTitle,
352
360
  subtitle: o.noDataSubtitle,
353
361
  "icon-name": o.noDataIcon
@@ -8,6 +8,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
8
8
  totalLabel?: string;
9
9
  totalValue?: number;
10
10
  totalsChart?: boolean;
11
+ valueSuffix?: string;
12
+ valuePrefix?: string;
11
13
  }>, {
12
14
  title: string;
13
15
  dataPoints: () => any[];
@@ -17,6 +19,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
19
  totalLabel: string;
18
20
  totalValue: any;
19
21
  totalsChart: boolean;
22
+ valueSuffix: string;
23
+ valuePrefix: string;
20
24
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
21
25
  title?: string;
22
26
  dataPoints: MyTooltipItem<'line'>[];
@@ -26,6 +30,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
26
30
  totalLabel?: string;
27
31
  totalValue?: number;
28
32
  totalsChart?: boolean;
33
+ valueSuffix?: string;
34
+ valuePrefix?: string;
29
35
  }>, {
30
36
  title: string;
31
37
  dataPoints: () => any[];
@@ -35,6 +41,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
35
41
  totalLabel: string;
36
42
  totalValue: any;
37
43
  totalsChart: boolean;
44
+ valueSuffix: string;
45
+ valuePrefix: string;
38
46
  }>>>, {
39
47
  title: string;
40
48
  xAxisFormat: ValueFormat;
@@ -44,6 +52,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
44
52
  yAxisFormat: ValueFormat;
45
53
  totalLabel: string;
46
54
  totalValue: number;
55
+ valueSuffix: string;
56
+ valuePrefix: string;
47
57
  }>;
48
58
  export default _default;
49
59
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./ChartTooltip.vue2.js";
2
- /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_cb98e9e3_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cb98e9e3"]]);
2
+ /* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css"; //*');
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e53c6287"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,16 +1,16 @@
1
- import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_cb98e9e3_lang.css"; import { defineComponent as x, openBlock as a, createElementBlock as o, createBlock as c, createCommentVNode as r, Fragment as y, renderList as h, createElementVNode as m, normalizeStyle as v, unref as l, createVNode as i, withCtx as s, createTextVNode as n, toDisplayString as d } from "vue";
2
- import u from "../typography/v4/Typography.vue.js";
1
+ import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css"; import { defineComponent as m, openBlock as a, createElementBlock as o, createBlock as c, createCommentVNode as r, Fragment as y, renderList as v, createElementVNode as f, normalizeStyle as h, unref as l, createVNode as i, withCtx as n, createTextVNode as s, toDisplayString as u } from "vue";
2
+ import d from "../typography/v4/Typography.vue.js";
3
3
  import b from "../icon/v4/IconV4.vue.js";
4
4
  import "../icon/v4/IconFlag.vue.js";
5
- import { formatValue as f } from "./utils/utils.js";
5
+ import { formatValue as x } from "./utils/utils.js";
6
6
  import k from "./TooltipHeader.vue.js";
7
- const p = { class: "chart-tooltip" }, C = {
7
+ const C = { class: "chart-tooltip" }, g = {
8
8
  key: 1,
9
9
  class: "list"
10
- }, g = { class: "popover-label-wrapper" }, V = {
10
+ }, V = { class: "popover-label-wrapper" }, A = {
11
11
  key: 2,
12
12
  class: "tooltip-footer"
13
- }, L = /* @__PURE__ */ x({
13
+ }, L = /* @__PURE__ */ m({
14
14
  __name: "ChartTooltip",
15
15
  props: {
16
16
  title: { default: "" },
@@ -20,10 +20,12 @@ const p = { class: "chart-tooltip" }, C = {
20
20
  xAxisDateInterval: { default: null },
21
21
  totalLabel: { default: "Total" },
22
22
  totalValue: { default: null },
23
- totalsChart: { type: Boolean, default: !1 }
23
+ totalsChart: { type: Boolean, default: !1 },
24
+ valueSuffix: { default: "" },
25
+ valuePrefix: { default: "" }
24
26
  },
25
27
  setup(t) {
26
- return (A, F) => (a(), o("div", p, [
28
+ return (F, S) => (a(), o("div", C, [
27
29
  t.title ? (a(), c(k, {
28
30
  key: 0,
29
31
  title: t.title,
@@ -32,14 +34,14 @@ const p = { class: "chart-tooltip" }, C = {
32
34
  "x-axis-format": t.xAxisFormat,
33
35
  "x-axis-date-interval": t.xAxisDateInterval
34
36
  }, null, 8, ["title", "data-points", "totals-chart", "x-axis-format", "x-axis-date-interval"])) : r("", !0),
35
- t.totalsChart ? r("", !0) : (a(), o("ul", C, [
36
- (a(!0), o(y, null, h(t.dataPoints, (e) => (a(), o("li", {
37
+ t.totalsChart ? r("", !0) : (a(), o("ul", g, [
38
+ (a(!0), o(y, null, v(t.dataPoints, (e) => (a(), o("li", {
37
39
  key: e.datasetIndex,
38
40
  class: "list__item"
39
41
  }, [
40
- m("span", {
42
+ f("span", {
41
43
  class: "color-box",
42
- style: v({
44
+ style: h({
43
45
  backgroundColor: String(e.dataset.pointBackgroundColor)
44
46
  })
45
47
  }, null, 4),
@@ -50,39 +52,39 @@ const p = { class: "chart-tooltip" }, C = {
50
52
  name: e.dataset.icon,
51
53
  size: "16px"
52
54
  }, null, 8, ["type", "name"])) : r("", !0),
53
- m("div", g, [
54
- i(l(u), {
55
+ f("div", V, [
56
+ i(l(d), {
55
57
  variant: "body2",
56
58
  class: "flex-grow truncated-label",
57
59
  "is-truncated": ""
58
60
  }, {
59
- default: s(() => [
60
- n(d(e.dataset.label), 1)
61
+ default: n(() => [
62
+ s(u(e.dataset.label), 1)
61
63
  ]),
62
64
  _: 2
63
65
  }, 1024)
64
66
  ]),
65
- i(l(u), { variant: "body2" }, {
66
- default: s(() => [
67
- n(d(l(f)(e.parsed.y, t.yAxisFormat)), 1)
67
+ i(l(d), { variant: "body2" }, {
68
+ default: n(() => [
69
+ s(u(t.valuePrefix + l(x)(e.parsed.y, t.yAxisFormat) + t.valueSuffix), 1)
68
70
  ]),
69
71
  _: 2
70
72
  }, 1024)
71
73
  ]))), 128))
72
74
  ])),
73
- t.totalValue !== null ? (a(), o("div", V, [
74
- i(l(u), {
75
+ t.totalValue !== null ? (a(), o("div", A, [
76
+ i(l(d), {
75
77
  variant: "body2",
76
78
  class: "flex-grow"
77
79
  }, {
78
- default: s(() => [
79
- n(d(t.totalLabel), 1)
80
+ default: n(() => [
81
+ s(u(t.totalLabel), 1)
80
82
  ]),
81
83
  _: 1
82
84
  }),
83
- i(l(u), { variant: "body2" }, {
84
- default: s(() => [
85
- n(d(l(f)(t.totalValue, t.yAxisFormat)), 1)
85
+ i(l(d), { variant: "body2" }, {
86
+ default: n(() => [
87
+ s(u(t.valuePrefix + l(x)(t.totalValue, t.yAxisFormat) + t.valueSuffix), 1)
86
88
  ]),
87
89
  _: 1
88
90
  })
@@ -32,5 +32,5 @@ export declare const CHART_PADDING: {
32
32
  top: number;
33
33
  bottom: number;
34
34
  };
35
- export declare const TICKS_EXTRA_PADDING = 10;
35
+ export declare const TICKS_EXTRA_PADDING = 6;
36
36
  export declare const LONG_DATE_FORMAT: ValueFormat;
@@ -12,7 +12,7 @@ const t = "#fcfcfc", n = "#E4E4E4", T = "#646464", o = {
12
12
  right: 18,
13
13
  top: 18,
14
14
  bottom: 11
15
- }, d = 10, g = "dateLong";
15
+ }, d = 6, g = "dateLong";
16
16
  export {
17
17
  D as BASE_COLOR_KEY,
18
18
  i as BIDDING_PREFIX,
@@ -21,6 +21,8 @@ declare const ChartTypes: () => ({
21
21
  totalsChart: boolean;
22
22
  parsing: import("./types").ChartParsingConfig;
23
23
  yAxisFormat: import("./types").ValueFormat;
24
+ valueSuffix: string;
25
+ valuePrefix: string;
24
26
  dataSets: import("./types").ChartDataSet[];
25
27
  trendTooltip: any;
26
28
  subheader: string;
@@ -107,6 +109,14 @@ declare const ChartTypes: () => ({
107
109
  type: import("vue").PropType<import("./types").ValueFormat>;
108
110
  default: string;
109
111
  };
112
+ valueSuffix: {
113
+ type: import("vue").PropType<string>;
114
+ default: string;
115
+ };
116
+ valuePrefix: {
117
+ type: import("vue").PropType<string>;
118
+ default: string;
119
+ };
110
120
  dataSets: {
111
121
  type: import("vue").PropType<import("./types").ChartDataSet[]>;
112
122
  required: true;
@@ -199,7 +209,7 @@ declare const ChartTypes: () => ({
199
209
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
200
210
  "onUpdate:sortSelected"?: (sortOption: unknown) => any;
201
211
  "onUpdate:chartType"?: (chartType: ChartType) => any;
202
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "withSettingsHeader" | "extraCharts">;
212
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "withSettingsHeader" | "extraCharts">;
203
213
  $attrs: {
204
214
  [x: string]: unknown;
205
215
  };
@@ -279,6 +289,14 @@ declare const ChartTypes: () => ({
279
289
  type: import("vue").PropType<import("./types").ValueFormat>;
280
290
  default: string;
281
291
  };
292
+ valueSuffix: {
293
+ type: import("vue").PropType<string>;
294
+ default: string;
295
+ };
296
+ valuePrefix: {
297
+ type: import("vue").PropType<string>;
298
+ default: string;
299
+ };
282
300
  dataSets: {
283
301
  type: import("vue").PropType<import("./types").ChartDataSet[]>;
284
302
  required: true;
@@ -392,6 +410,8 @@ declare const ChartTypes: () => ({
392
410
  totalsChart: boolean;
393
411
  parsing: import("./types").ChartParsingConfig;
394
412
  yAxisFormat: import("./types").ValueFormat;
413
+ valueSuffix: string;
414
+ valuePrefix: string;
395
415
  dataSets: import("./types").ChartDataSet[];
396
416
  trendTooltip: any;
397
417
  subheader: string;
@@ -498,6 +518,14 @@ declare const ChartTypes: () => ({
498
518
  type: import("vue").PropType<import("./types").ValueFormat>;
499
519
  default: string;
500
520
  };
521
+ valueSuffix: {
522
+ type: import("vue").PropType<string>;
523
+ default: string;
524
+ };
525
+ valuePrefix: {
526
+ type: import("vue").PropType<string>;
527
+ default: string;
528
+ };
501
529
  dataSets: {
502
530
  type: import("vue").PropType<import("./types").ChartDataSet[]>;
503
531
  required: true;
@@ -660,6 +688,14 @@ declare const ChartTypes: () => ({
660
688
  type: import("vue").PropType<import("./types").ValueFormat>;
661
689
  default: string;
662
690
  };
691
+ valueSuffix: {
692
+ type: import("vue").PropType<string>;
693
+ default: string;
694
+ };
695
+ valuePrefix: {
696
+ type: import("vue").PropType<string>;
697
+ default: string;
698
+ };
663
699
  dataSets: {
664
700
  type: import("vue").PropType<import("./types").ChartDataSet[]>;
665
701
  required: true;
@@ -773,6 +809,8 @@ declare const ChartTypes: () => ({
773
809
  totalsChart: boolean;
774
810
  parsing: import("./types").ChartParsingConfig;
775
811
  yAxisFormat: import("./types").ValueFormat;
812
+ valueSuffix: string;
813
+ valuePrefix: string;
776
814
  dataSets: import("./types").ChartDataSet[];
777
815
  trendTooltip: any;
778
816
  subheader: string;
@@ -1,27 +1,27 @@
1
1
  import { format as f } from "date-fns";
2
- import { TICK_LABEL_FONT as a } from "../consts.js";
3
- import { nFormatter as c } from "../../../utils/formatNumbers.js";
4
- import { truncateTextToFit as d } from "../../../utils/text.js";
5
- import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
2
+ import { TICK_LABEL_FONT as c } from "../consts.js";
3
+ import { nFormatter as d } from "../../../utils/formatNumbers.js";
4
+ import { truncateTextToFit as E } from "../../../utils/text.js";
5
+ import { REGEX_LINEBREAK as i } from "../../../consts/regex.js";
6
6
  const g = (r, t, e) => {
7
7
  if (e === 0)
8
8
  return 0;
9
9
  const n = t - r, o = n / e * 0.4;
10
10
  return (n + o) / e;
11
- }, E = (r, t) => t === "day" ? f(new Date(r), "EEEE") : t === "number" ? c(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "MMM dd, yyyy") : String(r), w = ({
11
+ }, a = (r, t) => t === "day" ? f(new Date(r), "EEEE") : t === "number" ? d(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "MMM dd, yyyy") : String(r), w = ({
12
12
  label: r,
13
13
  format: t,
14
14
  availableSpace: e,
15
15
  truncate: n = !1
16
16
  }) => {
17
- const s = m.test(r), o = (p) => {
18
- const i = E(p, t);
19
- return n ? d(i, a, e) : i;
17
+ const s = i.test(r), o = (p) => {
18
+ const m = a(p, t);
19
+ return n && e > 0 ? E(m, c, e) : m;
20
20
  };
21
- return s ? r.split(m).map(o) : o(r);
21
+ return s ? r.split(i).map(o) : o(r);
22
22
  };
23
23
  export {
24
24
  g as calcStepSize,
25
- E as formatValue,
25
+ a as formatValue,
26
26
  w as prepareTickLabel
27
27
  };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './AppIcon.vue_vue_type_style_index_0_scoped_56ba337c_lang.css';
1
+ import './IncludeExcludeOption.vue_vue_type_style_index_0_scoped_91bc7787_lang.css';
2
2
  import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
3
3
  import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
4
  import { MenuItemTypes as ao } from "./components/menuItem/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.12-rc.18",
3
+ "version": "2.1.12-rc.19",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .chart-container[data-v-5525b3bc]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-5525b3bc]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-5525b3bc]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-5525b3bc]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-5525b3bc]{border-left:1px solid var(--common-divider)}
@@ -1 +0,0 @@
1
- .chart-plane-container[data-v-fc79a730]{--headerHeight: var(--498cf638);width:100%;height:var(--b6d23262);position:relative}.header-wrapper[data-v-fc79a730]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-fc79a730]{padding-top:var(--headerHeight);height:100%}.chart[data-v-fc79a730]{width:100%;height:100%;position:relative}.chart__canvas[data-v-fc79a730]{width:100%;height:100%}.chart__tooltip[data-v-fc79a730]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
@@ -1 +0,0 @@
1
- .chart-tooltip[data-v-cb98e9e3]{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)}.color-box[data-v-cb98e9e3]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-cb98e9e3]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-cb98e9e3]{list-style:none;margin:0;padding:0}.list__item[data-v-cb98e9e3]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-cb98e9e3]:last-child{margin-bottom:0}.platform-icon[data-v-cb98e9e3]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-cb98e9e3]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-cb98e9e3]{max-width:90%}.tooltip-footer[data-v-cb98e9e3]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-cb98e9e3]{flex-grow:1}