@ironsource/shared-ui 2.1.12-rc.2 → 2.1.12-rc.21
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.
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css +1 -0
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_d7948c77_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_03771fa3_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
- package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
- package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
- package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
- package/components/appIcon/index.d.ts +3 -3
- package/components/banner/Banner.vue.d.ts +3 -3
- package/components/banner/index.d.ts +7 -7
- package/components/button/common/consts.d.ts +1 -0
- package/components/button/v3/Button.vue.d.ts +3 -3
- package/components/button/v3/ButtonBase.vue.d.ts +3 -3
- package/components/button/v3/IconButton.vue.d.ts +3 -3
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.d.ts +4 -3
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +149 -38
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +146 -297
- package/components/chart/ChartHeader.vue.d.ts +45 -11
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +64 -53
- package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
- package/components/chart/ChartHeaderTrend.vue.js +7 -0
- package/components/chart/ChartHeaderTrend.vue2.js +95 -0
- package/components/chart/ChartLegend.vue.d.ts +24 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +82 -63
- package/components/chart/ChartPlane.vue.d.ts +221 -0
- package/components/chart/ChartPlane.vue.js +7 -0
- package/components/chart/ChartPlane.vue2.js +368 -0
- package/components/chart/ChartStoryArgs.d.ts +179 -0
- package/components/chart/ChartTooltip.vue.d.ts +22 -2
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +50 -55
- package/components/chart/LegendSorting.vue.d.ts +37 -0
- package/components/chart/LegendSorting.vue.js +45 -0
- package/components/chart/LegendSorting.vue2.js +4 -0
- package/components/chart/SettingsHeader.vue.d.ts +1 -0
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +17 -16
- package/components/chart/SubHeader.vue.d.ts +52 -0
- package/components/chart/SubHeader.vue.js +7 -0
- package/components/chart/SubHeader.vue2.js +61 -0
- package/components/chart/TooltipHeader.vue.d.ts +50 -0
- package/components/chart/TooltipHeader.vue.js +7 -0
- package/components/chart/TooltipHeader.vue2.js +69 -0
- package/components/chart/colorPalette.d.ts +4 -0
- package/components/chart/colorPalette.js +54 -0
- package/components/chart/composables/useChartHeight.d.ts +5 -0
- package/components/chart/composables/useChartHeight.js +24 -0
- package/components/chart/composables/useColorsMap.d.ts +10 -0
- package/components/chart/composables/useColorsMap.js +46 -0
- package/components/chart/composables/useTooltipPosition.d.ts +1 -1
- package/components/chart/composables/useTooltipPosition.js +11 -15
- package/components/chart/consts.d.ts +29 -7
- package/components/chart/consts.js +41 -21
- package/components/chart/index.d.ts +515 -118
- package/components/chart/mockData.d.ts +44 -5
- package/components/chart/types.d.ts +37 -6
- package/components/chart/types.js +5 -2
- package/components/chart/utils/formatNumber.d.ts +0 -1
- package/components/chart/utils/highlightUtils.d.ts +3 -0
- package/components/chart/utils/highlightUtils.js +18 -0
- package/components/chart/utils/utils.d.ts +3 -2
- package/components/chart/utils/utils.js +23 -8
- package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
- package/components/checkbox/v3/index.d.ts +7 -7
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
- package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
- package/components/dialog/v4/DialogV4.vue.js +4 -4
- package/components/dialog/v4/DialogV4.vue2.js +1 -1
- package/components/dialog/v4/index.d.ts +7 -7
- package/components/dropdown/common/Dropdown.common.js +92 -85
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +76 -76
- package/components/dropdown/v4/DropdownV4.vue.d.ts +8 -0
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +105 -95
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
- package/components/dropdown/v4/OptionV4.vue.d.ts +8 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +91 -69
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
- package/components/dropdown/v4/index.d.ts +64 -2
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/forms/FormRow.vue.d.ts +9 -2
- package/components/forms/FormRow.vue.js +3 -3
- package/components/forms/FormRow.vue2.js +25 -14
- package/components/forms/index.d.ts +25 -5
- package/components/search/v3/index.d.ts +3 -3
- package/components/shared/FieldLabel.vue.d.ts +19 -7
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +50 -37
- package/components/table/v4/DataGrid.vue.d.ts +4 -3
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +151 -142
- package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
- package/components/table/v4/index.d.ts +15 -14
- package/components/tabs/v3/Tabs.vue.d.ts +3 -3
- package/components/tabs/v3/index.d.ts +7 -7
- package/components/tooltip/common/Tooltip.types.d.ts +1 -0
- package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
- package/components/tooltip/v3/Tooltip.vue.js +2 -2
- package/components/tooltip/v3/Tooltip.vue2.js +1 -1
- package/components/tooltip/v3/index.d.ts +7 -7
- package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
- package/components/tooltip/v4/index.d.ts +7 -7
- package/components/typography/Text.vue.d.ts +3 -3
- package/components/typography/index.d.ts +7 -7
- package/composables/useFormValidation.d.ts +1 -0
- package/composables/useFormValidation.js +32 -27
- package/composables/useFullPageHeight.d.ts +10 -0
- package/composables/useFullPageHeight.js +15 -0
- package/consts/common.d.ts +1 -0
- package/consts/common.js +4 -0
- package/consts/regex.d.ts +1 -0
- package/consts/regex.js +2 -1
- package/index.d.ts +211 -81
- package/index.js +106 -100
- package/package.json +1 -1
- package/testids/index.d.ts +2 -1
- package/testids/index.js +10 -10
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +19 -6
- package/utils/index.js +7 -0
- package/utils/text.d.ts +3 -0
- package/utils/text.js +24 -5
- package/utils/totals.d.ts +5 -0
- package/utils/totals.js +9 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +4 -0
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_020072b0_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
- package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
- package/components/chart/utils/formatNumber.js +0 -11
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "../../SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css"; import { defineComponent as b, useSlots as f, computed as m, openBlock as a, createElementBlock as T, createVNode as u, unref as t, withCtx as o, renderSlot as x, createElementVNode as y, createBlock as i, createTextVNode as r, toDisplayString as d, createCommentVNode as h } from "vue";
|
|
2
|
+
import l from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import S from "../tooltip/v4/TooltipV4.vue.js";
|
|
4
|
+
const k = { class: "header-row" }, v = { class: "subheader-tooltip" }, g = /* @__PURE__ */ b({
|
|
5
|
+
__name: "SubHeader",
|
|
6
|
+
props: {
|
|
7
|
+
subheader: { default: "" },
|
|
8
|
+
subheaderTooltip: { default: null },
|
|
9
|
+
showSeparator: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const s = e, n = f(), c = m(() => n["subheader-tooltip"] || s.subheaderTooltip?.text || s.subheaderTooltip?.header);
|
|
13
|
+
return (p, w) => (a(), T("div", k, [
|
|
14
|
+
u(t(S), {
|
|
15
|
+
placement: "right",
|
|
16
|
+
disabled: !t(c)
|
|
17
|
+
}, {
|
|
18
|
+
tooltip: o(() => [
|
|
19
|
+
x(p.$slots, "subheader-tooltip", {}, () => [
|
|
20
|
+
y("div", v, [
|
|
21
|
+
e.subheaderTooltip?.header ? (a(), i(t(l), {
|
|
22
|
+
key: 0,
|
|
23
|
+
variant: "h5"
|
|
24
|
+
}, {
|
|
25
|
+
default: o(() => [
|
|
26
|
+
r(d(e.subheaderTooltip.header), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
})) : h("", !0),
|
|
30
|
+
e.subheaderTooltip?.text ? (a(), i(t(l), {
|
|
31
|
+
key: 1,
|
|
32
|
+
variant: "body2",
|
|
33
|
+
class: "subheader-tooltip__text"
|
|
34
|
+
}, {
|
|
35
|
+
default: o(() => [
|
|
36
|
+
r(d(e.subheaderTooltip.text), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})) : h("", !0)
|
|
40
|
+
])
|
|
41
|
+
], !0)
|
|
42
|
+
]),
|
|
43
|
+
default: o(() => [
|
|
44
|
+
u(t(l), {
|
|
45
|
+
class: "subheader",
|
|
46
|
+
variant: "h5"
|
|
47
|
+
}, {
|
|
48
|
+
default: o(() => [
|
|
49
|
+
r(d(e.subheader + (e.showSeparator ? ":" : "")), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
})
|
|
53
|
+
]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, ["disabled"])
|
|
56
|
+
]));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
g as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DateInterval, MyTooltipItem, ValueFormat } from '@/components/chart/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
title?: string;
|
|
4
|
+
xAxisFormat?: ValueFormat;
|
|
5
|
+
xAxisDateInterval?: DateInterval;
|
|
6
|
+
dataPoints: MyTooltipItem<'line'>[];
|
|
7
|
+
totalsChart?: boolean;
|
|
8
|
+
}>, {
|
|
9
|
+
title: string;
|
|
10
|
+
xAxisFormat: any;
|
|
11
|
+
xAxisDateInterval: any;
|
|
12
|
+
dataPoints: () => any[];
|
|
13
|
+
totalsChart: boolean;
|
|
14
|
+
}>, {}, 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<{
|
|
15
|
+
title?: string;
|
|
16
|
+
xAxisFormat?: ValueFormat;
|
|
17
|
+
xAxisDateInterval?: DateInterval;
|
|
18
|
+
dataPoints: MyTooltipItem<'line'>[];
|
|
19
|
+
totalsChart?: boolean;
|
|
20
|
+
}>, {
|
|
21
|
+
title: string;
|
|
22
|
+
xAxisFormat: any;
|
|
23
|
+
xAxisDateInterval: any;
|
|
24
|
+
dataPoints: () => any[];
|
|
25
|
+
totalsChart: boolean;
|
|
26
|
+
}>>>, {
|
|
27
|
+
title: string;
|
|
28
|
+
xAxisFormat: ValueFormat;
|
|
29
|
+
xAxisDateInterval: DateInterval;
|
|
30
|
+
dataPoints: MyTooltipItem<'line'>[];
|
|
31
|
+
totalsChart: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
36
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
+
} : {
|
|
39
|
+
type: import('vue').PropType<T[K]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
45
|
+
default: D[K];
|
|
46
|
+
}> : P[K];
|
|
47
|
+
};
|
|
48
|
+
type __VLS_Prettify<T> = {
|
|
49
|
+
[K in keyof T]: T[K];
|
|
50
|
+
} & {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./TooltipHeader.vue2.js";
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-3b15c693"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css"; import { defineComponent as v, computed as m, openBlock as n, createElementBlock as f, createElementVNode as A, unref as t, createCommentVNode as s, createBlock as u, createVNode as D, withCtx as d, createTextVNode as x, toDisplayString as p } from "vue";
|
|
2
|
+
import { formatValue as r } from "./utils/utils.js";
|
|
3
|
+
import y from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import { DateInterval as c } from "./types.js";
|
|
5
|
+
import T from "../icon/v4/IconV4.vue.js";
|
|
6
|
+
import k from "../icon/v4/IconFlag.vue.js";
|
|
7
|
+
import { startOfWeek as C, endOfWeek as F, startOfMonth as I, endOfMonth as O } from "date-fns";
|
|
8
|
+
import { LONG_DATE_FORMAT as i } from "./consts.js";
|
|
9
|
+
const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = ["src"], P = /* @__PURE__ */ v({
|
|
10
|
+
__name: "TooltipHeader",
|
|
11
|
+
props: {
|
|
12
|
+
title: { default: "" },
|
|
13
|
+
xAxisFormat: { default: null },
|
|
14
|
+
xAxisDateInterval: { default: null },
|
|
15
|
+
dataPoints: { default: () => [] },
|
|
16
|
+
totalsChart: { type: Boolean, default: !1 }
|
|
17
|
+
},
|
|
18
|
+
setup(a) {
|
|
19
|
+
const e = a, o = m(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), h = m(() => e.totalsChart ? o.value?.label || e.title : e.xAxisFormat === "date" ? g(new Date(e.title)) : r(e.title, e.xAxisFormat)), g = (l) => e.xAxisDateInterval === c.WEEKLY ? `
|
|
20
|
+
${r(C(l), i)} -
|
|
21
|
+
${r(F(l), i)}
|
|
22
|
+
` : e.xAxisDateInterval === c.MONTHLY ? `
|
|
23
|
+
${r(I(l), i)} -
|
|
24
|
+
${r(O(l), i)}
|
|
25
|
+
` : r(l, i);
|
|
26
|
+
return (l, M) => (n(), f("div", E, [
|
|
27
|
+
A("div", N, [
|
|
28
|
+
a.totalsChart && t(o)?.image ? (n(), f("img", {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "title-image",
|
|
31
|
+
src: t(o)?.image
|
|
32
|
+
}, null, 8, L)) : s("", !0),
|
|
33
|
+
a.totalsChart && t(o)?.countryFlag ? (n(), u(t(k), {
|
|
34
|
+
key: 1,
|
|
35
|
+
"country-code": t(o).countryFlag
|
|
36
|
+
}, null, 8, ["country-code"])) : s("", !0),
|
|
37
|
+
a.totalsChart && t(o)?.icon ? (n(), u(t(T), {
|
|
38
|
+
key: 2,
|
|
39
|
+
class: "platform-icon",
|
|
40
|
+
type: t(o)?.iconType,
|
|
41
|
+
name: t(o)?.icon,
|
|
42
|
+
size: "16px"
|
|
43
|
+
}, null, 8, ["type", "name"])) : s("", !0),
|
|
44
|
+
D(t(y), {
|
|
45
|
+
class: "title-text",
|
|
46
|
+
variant: "subtitle2"
|
|
47
|
+
}, {
|
|
48
|
+
default: d(() => [
|
|
49
|
+
x(p(t(h)), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
})
|
|
53
|
+
]),
|
|
54
|
+
a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (n(), u(t(y), {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "tooltip-sub-title",
|
|
57
|
+
variant: "caption"
|
|
58
|
+
}, {
|
|
59
|
+
default: d(() => [
|
|
60
|
+
x(p(t(r)(a.title, "day")), 1)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})) : s("", !0)
|
|
64
|
+
]));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
P as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { NETWORK_UNITY_ADS as _, BIDDING_PREFIX as F, NETWORK_AD_MOB as N, NETWORK_IRON_SOURCE as E, NETWORK_MINTEGRAL as T, NETWORK_APPLOVIN as A, NETWORK_FACEBOOK_META as $, NETWORK_LIFTOFF as O, NETWORK_PANGLE as C, NETWORK_INMOBI as R, NETWORK_DT_EXCHANGE as B } from "./consts.js";
|
|
2
|
+
const I = "#c9c9c9", K = [
|
|
3
|
+
"#80BCFE",
|
|
4
|
+
"#9999FF",
|
|
5
|
+
"#5883E4",
|
|
6
|
+
"#80CBC4",
|
|
7
|
+
"#FFC670",
|
|
8
|
+
"#FF7557",
|
|
9
|
+
"#0D7EA0",
|
|
10
|
+
"#673AFF",
|
|
11
|
+
"#CA80DC",
|
|
12
|
+
"#FEBBB2"
|
|
13
|
+
], t = {
|
|
14
|
+
Total: "#646464",
|
|
15
|
+
// AB tests
|
|
16
|
+
A: "#FFC134",
|
|
17
|
+
B: "#4F4FF5",
|
|
18
|
+
// Countries
|
|
19
|
+
US: "#272EC4",
|
|
20
|
+
CN: "#F52E1E",
|
|
21
|
+
GB: "#0082FF",
|
|
22
|
+
DE: "#FFD600",
|
|
23
|
+
JP: "#BA0029",
|
|
24
|
+
AU: "#009BCB",
|
|
25
|
+
FR: "#34A853",
|
|
26
|
+
// Ad formats
|
|
27
|
+
Rewarded: "#0082FF",
|
|
28
|
+
Interstitial: "#009BCB",
|
|
29
|
+
Banner: "#9668FF",
|
|
30
|
+
Native: "#FF35A2",
|
|
31
|
+
// Ad sources
|
|
32
|
+
[`${_} ${F}`]: "#9668FF",
|
|
33
|
+
[`${N} ${F}`]: "#34A853",
|
|
34
|
+
[`${E} ${F}`]: "#272EC4",
|
|
35
|
+
[`${E}`]: "#5C63E7",
|
|
36
|
+
[`${T} ${F}`]: "#00D8B2",
|
|
37
|
+
[`${A} ${F}`]: "#009BCB",
|
|
38
|
+
[`${A}`]: "#80CDE5",
|
|
39
|
+
[`${$} ${F}`]: "#0082FF",
|
|
40
|
+
[`${$}`]: "#52AAFF",
|
|
41
|
+
[`${O} ${F}`]: "#FF35A2",
|
|
42
|
+
[`${O}`]: "#FF9AD1",
|
|
43
|
+
[`${C} ${F}`]: "#F52E1E",
|
|
44
|
+
[`${C}`]: "#FA9F97",
|
|
45
|
+
[`${R} ${F}`]: "#FFD600",
|
|
46
|
+
[`${R}`]: "#FFEC8A",
|
|
47
|
+
[`${B} ${F}`]: "#BA0029",
|
|
48
|
+
[`${B}`]: "#DD8094"
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
K as COLOR_PALETTE,
|
|
52
|
+
I as DEFAULT_CHART_COLOR,
|
|
53
|
+
t as RESERVED_COLORS_MAP
|
|
54
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseChartHeightArgs } from '@/components/chart/types';
|
|
2
|
+
export declare const useChartHeight: ({ chartPlanesCount, useFullHeight, bottomSpacing, }: UseChartHeightArgs) => {
|
|
3
|
+
containerProps: import("vue").ComputedRef<Record<string, unknown>>;
|
|
4
|
+
eachPlaneHeight: import("vue").ComputedRef<string>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ref as g, computed as o } from "vue";
|
|
2
|
+
import { useElementBounding as m, useWindowScroll as f } from "@vueuse/core";
|
|
3
|
+
import { useFullPageHeight as p } from "../../../composables/useFullPageHeight.js";
|
|
4
|
+
import { DEFAULT_CHART_PLANE_HEIGHT as E, HEADER_HEIGHT as v, MIN_PLANE_HEIGHT as r } from "../consts.js";
|
|
5
|
+
const T = ({
|
|
6
|
+
chartPlanesCount: e,
|
|
7
|
+
useFullHeight: n,
|
|
8
|
+
bottomSpacing: i = 50
|
|
9
|
+
}) => {
|
|
10
|
+
const t = g(), { height: c } = m(t), { cssHeightValue: l } = p({
|
|
11
|
+
elem: t,
|
|
12
|
+
bottomSpacing: i
|
|
13
|
+
}), { y: s } = f(), u = o(() => n && !s.value ? l.value : E + v + "px"), h = o(() => ({
|
|
14
|
+
ref: t,
|
|
15
|
+
style: { height: u.value }
|
|
16
|
+
})), a = o(() => e.value === 1 ? "100%" : c.value / e.value < r ? `${r}px` : 100 / e.value + "%");
|
|
17
|
+
return {
|
|
18
|
+
containerProps: h,
|
|
19
|
+
eachPlaneHeight: a
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
T as useChartHeight
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ChartDataSet } from '@/components/chart';
|
|
3
|
+
type UseColorsMapArgs = {
|
|
4
|
+
dataSets: Ref<ChartDataSet[]>;
|
|
5
|
+
visibleIds: Ref<unknown[]>;
|
|
6
|
+
};
|
|
7
|
+
export declare const useColorsMap: ({ dataSets, visibleIds }: UseColorsMapArgs) => {
|
|
8
|
+
colorsMap: Ref<Record<string, `#${string}`>>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { computed as n, ref as r, watch as E } from "vue";
|
|
2
|
+
import { RESERVED_COLORS_MAP as c, COLOR_PALETTE as O, DEFAULT_CHART_COLOR as R } from "../colorPalette.js";
|
|
3
|
+
const T = ({ dataSets: u, visibleIds: i }) => {
|
|
4
|
+
const a = n(
|
|
5
|
+
() => u.value.filter(
|
|
6
|
+
(o) => i.value.includes(o.id)
|
|
7
|
+
)
|
|
8
|
+
), l = r({
|
|
9
|
+
...c
|
|
10
|
+
// destructuring is important to avoid mutating the reserved colors object
|
|
11
|
+
}), s = r([]), v = n(
|
|
12
|
+
() => O.filter((o) => !s.value.includes(o))
|
|
13
|
+
), d = () => {
|
|
14
|
+
a.value.forEach((o) => {
|
|
15
|
+
const e = String(o.id);
|
|
16
|
+
if (!l.value[e]) {
|
|
17
|
+
const t = o.color || v.value[0] || R;
|
|
18
|
+
C(e, t);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}, f = () => {
|
|
22
|
+
Object.keys(l.value).forEach((o) => {
|
|
23
|
+
const e = a.value.find((m) => String(m.id) === o), t = !!c[o];
|
|
24
|
+
!e && !t && p(o);
|
|
25
|
+
});
|
|
26
|
+
}, C = (o, e) => {
|
|
27
|
+
l.value[String(o)] = e, s.value.push(e);
|
|
28
|
+
}, p = (o) => {
|
|
29
|
+
const e = l.value[o];
|
|
30
|
+
delete l.value[o];
|
|
31
|
+
const t = s.value.indexOf(e);
|
|
32
|
+
t > -1 && s.value.splice(t, 1);
|
|
33
|
+
};
|
|
34
|
+
return E(
|
|
35
|
+
a,
|
|
36
|
+
() => {
|
|
37
|
+
f(), d();
|
|
38
|
+
},
|
|
39
|
+
{ immediate: !0 }
|
|
40
|
+
), {
|
|
41
|
+
colorsMap: l
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
T as useColorsMap
|
|
46
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { TooltipModel } from 'chart.js';
|
|
3
|
-
export declare const useTooltipPosition: (chartRef: Ref<HTMLCanvasElement | null>, tooltipRef: Ref<HTMLDivElement | null>, tooltipModel: Ref<TooltipModel<'line' | 'bar'
|
|
3
|
+
export declare const useTooltipPosition: (chartRef: Ref<HTMLCanvasElement | null>, tooltipRef: Ref<HTMLDivElement | null>, tooltipModel: Ref<TooltipModel<'line' | 'bar'>>, respectTop?: boolean) => {
|
|
4
4
|
position: import("vue").ComputedRef<{
|
|
5
5
|
top: number;
|
|
6
6
|
left: number;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useElementSize as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { computed as h } from "vue";
|
|
2
|
+
import { useElementSize as T } from "@vueuse/core";
|
|
3
|
+
import { COMPACT_HEADER_HEIGHT as l } from "../consts.js";
|
|
4
|
+
const D = (n, s, E, _ = !0) => {
|
|
5
|
+
const t = T(s);
|
|
5
6
|
return {
|
|
6
|
-
position:
|
|
7
|
-
if (!
|
|
7
|
+
position: h(() => {
|
|
8
|
+
if (!n.value || !E.value)
|
|
8
9
|
return { top: 0, left: 0 };
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
top: e + (_ ? -1 * Math.min(
|
|
13
|
-
e - 8,
|
|
14
|
-
t.height.value + 8
|
|
15
|
-
) : -20)
|
|
16
|
-
};
|
|
10
|
+
const e = n.value.getBoundingClientRect(), { caretX: F, caretY: o } = E.value, c = F + t.width.value + 20 >= e.width, r = o + t.height.value + -30 >= e.height, u = F + (c ? -(t.width.value + 20) : 20);
|
|
11
|
+
let i = o + (r ? -1 * (o + t.height.value + 8 - e.height) : -30);
|
|
12
|
+
return _ && (i = Math.max(i, -l + 8)), { left: u, top: i };
|
|
17
13
|
})
|
|
18
14
|
};
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
|
-
|
|
17
|
+
D as useTooltipPosition
|
|
22
18
|
};
|
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
import { DropdownTypeOption } from './types';
|
|
1
|
+
import { DropdownTypeOption, Font, ValueFormat } from './types';
|
|
2
2
|
export declare const POINT_BORDER_COLOR = "#fcfcfc";
|
|
3
3
|
export declare const GRID_LINE_COLOR = "#E4E4E4";
|
|
4
4
|
export declare const TICK_LABEL_COLOR = "#646464";
|
|
5
|
-
export declare const TICK_LABEL_FONT:
|
|
6
|
-
size: number;
|
|
7
|
-
weight: number;
|
|
8
|
-
family: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const COLOR_PALETTE: string[];
|
|
5
|
+
export declare const TICK_LABEL_FONT: Font;
|
|
11
6
|
export declare const DEFAULT_TICK_COUNT = 4;
|
|
12
7
|
export declare const DEFAULT_MIN_VISIBLE = 1;
|
|
13
8
|
export declare const DEFAULT_MAX_VISIBLE = 5;
|
|
14
9
|
export declare const DROPDOWN_TYPE_OPTIONS: DropdownTypeOption[];
|
|
10
|
+
export declare const HEADER_HEIGHT = 76;
|
|
11
|
+
export declare const COMPACT_HEADER_HEIGHT = 43;
|
|
12
|
+
export declare const DEFAULT_CHART_PLANE_HEIGHT = 312;
|
|
13
|
+
export declare const MIN_PLANE_HEIGHT = 187;
|
|
14
|
+
export declare const TOTALS_HELPER_KEY = "__TOTALS_HELPER_KEY__";
|
|
15
|
+
export declare const BASE_COLOR_KEY = "___BASE_COLOR__";
|
|
16
|
+
export declare const BIDDING_PREFIX = "Bidding";
|
|
17
|
+
export declare const NETWORK_IRON_SOURCE = "ironSource";
|
|
18
|
+
export declare const NETWORK_UNITY_ADS = "UnityAds";
|
|
19
|
+
export declare const NETWORK_FACEBOOK_META = "Meta";
|
|
20
|
+
export declare const NETWORK_AD_MOB = "Google";
|
|
21
|
+
export declare const NETWORK_MINTEGRAL = "Mintegral";
|
|
22
|
+
export declare const NETWORK_APPLOVIN = "AppLovin";
|
|
23
|
+
export declare const NETWORK_INMOBI = "InMobi";
|
|
24
|
+
export declare const NETWORK_DT_EXCHANGE = "DT Exchange";
|
|
25
|
+
export declare const NETWORK_PANGLE = "Pangle";
|
|
26
|
+
export declare const NETWORK_LIFTOFF = "Liftoff Monetize";
|
|
27
|
+
export declare const HOVER_TRANSPARENCY = 10;
|
|
28
|
+
export declare const HOVER_AREA_TRANSPARENCY = 70;
|
|
29
|
+
export declare const CHART_PADDING: {
|
|
30
|
+
left: number;
|
|
31
|
+
right: number;
|
|
32
|
+
top: number;
|
|
33
|
+
bottom: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const TICKS_EXTRA_PADDING = 6;
|
|
36
|
+
export declare const LONG_DATE_FORMAT: ValueFormat;
|
|
@@ -1,27 +1,47 @@
|
|
|
1
|
-
import { ChartType as
|
|
2
|
-
const
|
|
1
|
+
import { ChartType as _ } from "./types.js";
|
|
2
|
+
const t = "#fcfcfc", n = "#E4E4E4", T = "#646464", o = {
|
|
3
3
|
size: 12,
|
|
4
4
|
weight: 400,
|
|
5
5
|
family: "Inter"
|
|
6
|
-
}, c = [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
];
|
|
6
|
+
}, O = 4, A = 1, R = 5, c = [
|
|
7
|
+
{ id: _.Line, name: "Line" },
|
|
8
|
+
{ id: _.StackedLine, name: "Stack" },
|
|
9
|
+
{ id: _.Bar, name: "Bar" }
|
|
10
|
+
], N = 76, L = 43, s = 312, I = 187, e = "__TOTALS_HELPER_KEY__", D = "___BASE_COLOR__", i = "Bidding", C = "ironSource", K = "UnityAds", P = "Meta", H = "Google", S = "Mintegral", a = "AppLovin", B = "InMobi", G = "DT Exchange", M = "Pangle", r = "Liftoff Monetize", F = 10, W = 70, f = {
|
|
11
|
+
left: 18,
|
|
12
|
+
right: 18,
|
|
13
|
+
top: 18,
|
|
14
|
+
bottom: 11
|
|
15
|
+
}, d = 6, g = "dateLong";
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
D as BASE_COLOR_KEY,
|
|
18
|
+
i as BIDDING_PREFIX,
|
|
19
|
+
f as CHART_PADDING,
|
|
20
|
+
L as COMPACT_HEADER_HEIGHT,
|
|
21
|
+
s as DEFAULT_CHART_PLANE_HEIGHT,
|
|
22
|
+
R as DEFAULT_MAX_VISIBLE,
|
|
23
|
+
A as DEFAULT_MIN_VISIBLE,
|
|
24
|
+
O as DEFAULT_TICK_COUNT,
|
|
25
|
+
c as DROPDOWN_TYPE_OPTIONS,
|
|
23
26
|
n as GRID_LINE_COLOR,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
N as HEADER_HEIGHT,
|
|
28
|
+
W as HOVER_AREA_TRANSPARENCY,
|
|
29
|
+
F as HOVER_TRANSPARENCY,
|
|
30
|
+
g as LONG_DATE_FORMAT,
|
|
31
|
+
I as MIN_PLANE_HEIGHT,
|
|
32
|
+
H as NETWORK_AD_MOB,
|
|
33
|
+
a as NETWORK_APPLOVIN,
|
|
34
|
+
G as NETWORK_DT_EXCHANGE,
|
|
35
|
+
P as NETWORK_FACEBOOK_META,
|
|
36
|
+
B as NETWORK_INMOBI,
|
|
37
|
+
C as NETWORK_IRON_SOURCE,
|
|
38
|
+
r as NETWORK_LIFTOFF,
|
|
39
|
+
S as NETWORK_MINTEGRAL,
|
|
40
|
+
M as NETWORK_PANGLE,
|
|
41
|
+
K as NETWORK_UNITY_ADS,
|
|
42
|
+
t as POINT_BORDER_COLOR,
|
|
43
|
+
d as TICKS_EXTRA_PADDING,
|
|
44
|
+
T as TICK_LABEL_COLOR,
|
|
45
|
+
o as TICK_LABEL_FONT,
|
|
46
|
+
e as TOTALS_HELPER_KEY
|
|
27
47
|
};
|