@ironsource/shared-ui 2.1.12-rc.3 → 2.1.12-rc.5
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/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_e4c673e7_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_532f23bc_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_25d0e129_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_96c7507e_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +57 -39
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +97 -296
- package/components/chart/ChartHeader.vue.d.ts +20 -10
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +74 -52
- package/components/chart/ChartHeaderTrend.vue.d.ts +34 -0
- package/components/chart/ChartHeaderTrend.vue.js +7 -0
- package/components/chart/ChartHeaderTrend.vue2.js +32 -0
- package/components/chart/ChartLegend.vue.js +2 -2
- package/components/chart/ChartLegend.vue2.js +36 -35
- package/components/chart/ChartPlane.vue.d.ts +143 -0
- package/components/chart/ChartPlane.vue.js +7 -0
- package/components/chart/ChartPlane.vue2.js +306 -0
- package/components/chart/ChartStoryArgs.d.ts +135 -0
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +36 -35
- package/components/chart/composables/useChartHeight.d.ts +5 -0
- package/components/chart/composables/useChartHeight.js +22 -0
- package/components/chart/composables/useColorsMap.d.ts +10 -0
- package/components/chart/composables/useColorsMap.js +17 -0
- package/components/chart/composables/useTooltipPosition.d.ts +1 -1
- package/components/chart/composables/useTooltipPosition.js +11 -15
- package/components/chart/consts.d.ts +5 -0
- package/components/chart/consts.js +20 -15
- package/components/chart/index.d.ts +189 -113
- package/components/chart/mockData.d.ts +27 -1
- package/components/chart/types.d.ts +4 -0
- package/components/chart/utils/formatNumber.d.ts +0 -1
- package/components/chart/utils/utils.js +5 -5
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
- package/components/dropdown/common/Dropdown.common.js +20 -20
- 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 +26 -26
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/table/v4/DataGrid.vue.d.ts +3 -3
- package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
- package/components/table/v4/index.d.ts +14 -14
- package/composables/useFullPageHeight.d.ts +10 -0
- package/composables/useFullPageHeight.js +15 -0
- package/index.d.ts +42 -42
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +8 -9
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_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/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
- package/components/chart/utils/formatNumber.js +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.button-filter-dropdown-trigger[data-v-0198fee8]{border-radius:var(--border-radius-md);transition:all .2s ease;color:var(--text-primary);display:inline-flex;padding:5px 7px;align-items:center}.button-filter-dropdown-trigger.text[data-v-0198fee8]{padding:6px 8px}.button-filter-dropdown-trigger .content[data-v-0198fee8]{white-space:nowrap}.button-filter-dropdown-trigger[data-v-0198fee8]:hover{cursor:pointer;background:var(--action-hover)}.button-filter-dropdown-trigger.outlined[data-v-0198fee8]{border:1px solid var(--default-outlined-border)}.button-filter-dropdown-trigger.outlined[data-v-0198fee8]:hover{border:1px solid var(--action-active)}.button-filter-dropdown-trigger.outlined.disabled[data-v-0198fee8]{background:transparent;border:1px solid var(--default-outlined-border)}.button-filter-dropdown-trigger.open[data-v-0198fee8]{background:var(--action-selected);outline:2px solid var(--action-active);outline-offset:-2px;transition:outline 0s}.button-filter-dropdown-trigger.open[data-v-0198fee8]:hover{background:var(--action-selected)}.button-filter-dropdown-trigger.disabled[data-v-0198fee8]{cursor:default;color:var(--text-disabled)}.button-filter-dropdown-trigger.disabled[data-v-0198fee8]:hover{background:transparent}.start-icon[data-v-0198fee8]{color:var(--action-active);margin-right:var(--spacing-50)}.end-icon[data-v-0198fee8]{color:var(--action-active);margin-left:var(--spacing-50)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-78d3f5a8]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-78d3f5a8]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-78d3f5a8]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-78d3f5a8]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-78d3f5a8]{border-left:1px solid var(--common-divider)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-header[data-v-32001725]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.chart-header .subheader[data-v-32001725]{color:var(--text-secondary)}.chart-header--compact[data-v-32001725]{padding-top:22px}.chart-header--compact .header-texts[data-v-32001725]{flex-direction:row}.chart-header--compact .header-text[data-v-32001725]{color:var(--text-secondary)}.header-row[data-v-32001725]{display:flex;align-items:flex-end;gap:4px}.header-texts[data-v-32001725]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px;cursor:default}.type-switch[data-v-32001725]{display:flex;align-items:center;gap:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-trend[data-v-e4c673e7]{display:flex}.chart-trend--up[data-v-e4c673e7]{color:var(--success-contrast-text)}.chart-trend--up .trend-icon[data-v-e4c673e7]{color:var(--success-darker)}.chart-trend--down[data-v-e4c673e7]{color:var(--error-contrast-text)}.chart-trend--down .trend-icon[data-v-e4c673e7]{color:var(--error-dark)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.disabled-tooltip[data-v-532f23bc],.disabled-tooltip[data-v-532f23bc] .container{width:100%}.chart-legend[data-v-532f23bc]{display:flex;flex-direction:column;width:220px;height:100%;padding:0 8px 8px}.search-box[data-v-532f23bc]{padding:12px 0 4px}.legend[data-v-532f23bc]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-532f23bc]{list-style:none;padding:0}.legend__list>li[data-v-532f23bc]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-532f23bc]:hover{background-color:var(--action-hover);border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-532f23bc]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li.empty-list[data-v-532f23bc]{display:flex;align-items:center;justify-content:flex-start;height:32px;color:var(--text-disabled)}.legend__list>li.empty-list[data-v-532f23bc]:hover{background-color:transparent;cursor:default}.legend__list>li .item-wrapper[data-v-532f23bc]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-532f23bc]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-532f23bc]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-532f23bc]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-532f23bc]{color:var(--text-secondary)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-plane[data-v-4396faf6]{--headerHeight: var(--86c5ce4e);width:100%}.chart-plane[data-v-4396faf6],.chart-loading[data-v-4396faf6],.chart-empty[data-v-4396faf6]{height:var(--27543fc4)}.header-wrapper[data-v-4396faf6]{height:var(--headerHeight)}.chart[data-v-4396faf6]{width:100%;height:calc(100% - var(--headerHeight));position:relative}.chart__canvas[data-v-4396faf6]{width:100%;height:100%}.chart__tooltip[data-v-4396faf6]{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-25d0e129]{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-25d0e129]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .tooltip-sub-title[data-v-25d0e129]{color:var(--text-secondary)}.color-box[data-v-25d0e129]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-25d0e129]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-25d0e129]{list-style:none;margin:0;padding:0}.list__item[data-v-25d0e129]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-25d0e129]:last-child{margin-bottom:0}.platform-icon[data-v-25d0e129]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-25d0e129]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-25d0e129]{max-width:90%}.tooltip-footer[data-v-25d0e129]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-25d0e129]{flex-grow:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-list-area[data-v-96c7507e]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:20px 43px}.inline-search[data-v-96c7507e]{width:100%}.contain-accept[data-v-96c7507e]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-96c7507e]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-96c7507e]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.label[data-v-a849128a]{color:#41454d}.pop-up[data-v-a849128a]{width:668px;position:absolute;z-index:1000;top:32px;left:1px;overflow:hidden;border-radius:8px;border:1px solid var(--common-divider, #e4e4e4);background:var(--background-modelElevation, #fff);box-shadow:var(--elevation-lg)}.pop-up.open-on-top[data-v-a849128a]{top:0}.pop-up.hide-presets[data-v-a849128a],.pop-up.hide-presets .calendar-wrap[data-v-a849128a]{width:520px}.pop-up.hide-presets .date-picker-calendar[data-v-a849128a]{padding:15px 16px}.pop-up .date-picker-menu[data-v-a849128a]{width:164px;background:#ffffff;vertical-align:top;border-right:1px solid var(--common-divider-elevation-0, #e4e4e4);background:var(--background-paper, #fcfcfc)}.pop-up .date-picker-menu .preset-element[data-v-a849128a]{padding-left:8px;height:32px;border-radius:8px;color:var(--text-primary, #202020);line-height:32px}.pop-up .date-picker-menu .preset-element[data-v-a849128a]:hover{background:var(--action-hover, rgba(0, 0, 0, .05))}.pop-up .date-picker-menu .selected-preset[data-v-a849128a]{border-radius:8px;background:var(--action-selected, #ebebeb)}.pop-up .date-picker-menu li[data-v-a849128a]{cursor:pointer;margin-bottom:2px}.pop-up .left-box[data-v-a849128a]{left:-1px}.pop-up .date-picker-calendar[data-v-a849128a]{box-sizing:border-box;height:100%;padding:16px;display:grid;grid-template-columns:1fr 1fr;grid-gap:24px}.pop-up .calendars-wrapper[data-v-a849128a]{padding-left:6px}.pop-up .preset-dropdown ul[data-v-a849128a]{list-style:none;margin:0;padding:8px;line-height:32px}.pop-up .buttons-cover[data-v-a849128a]{height:48px;position:absolute;bottom:0;width:100%;right:0;box-sizing:border-box;border-top:1px solid var(--common-divider-elevation-0, #e4e4e4);background:var(--background-modelElevation, #fff);align-items:center;display:flex;justify-content:space-between;padding:12px 16px}.pop-up .buttons-cover .text-container[data-v-a849128a]{flex:1;color:var(--text-secondary, #646464)}.pop-up button[data-v-a849128a]{float:right;margin-left:8px}.pop-up .error[data-v-a849128a]{display:none;position:absolute;left:270px;top:22px}.pop-up .inline-block[data-v-a849128a]{display:inline-block}.pop-up.right[data-v-a849128a]{left:initial;right:1px}.calendar-wrap[data-v-a849128a]{width:504px;height:372px;position:relative;border-bottom-right-radius:8px;border-top-right-radius:8px;vertical-align:top}.type-picker[data-v-a849128a]{height:60px;line-height:60px;padding-left:15px;box-shadow:0 1px 3px #0000003b}.range-type[data-v-a849128a]{color:#8e959d;padding-left:15px;padding-right:15px;cursor:pointer}.selected-range-type[data-v-a849128a]{color:#fff;background-color:#3083ff;border-radius:20px;padding:6px 15px;cursor:default}.date-range-field[data-v-a849128a]{display:inline-block;width:100%;height:28px;position:relative;cursor:pointer;border-radius:3px}.date-range-field.selected-item-as-title[data-v-a849128a]{left:0;border:none;background-image:none;max-width:100%;height:22px;color:#3083ff;overflow:visible}.date-range-field.selected-item-as-title .small-triangle[data-v-a849128a]{right:-25px}.date-range-field.selected-item-as-title .small-triangle[data-v-a849128a]:after{border-top-color:currentColor}.date-range-field.selected-item-as-title span[data-v-a849128a]{padding-left:12px}.date-range-field.no-button-limit[data-v-a849128a]{overflow:visible}.date-range-field.no-button-limit span[data-v-a849128a]{width:100%;line-height:22px}.date-range-field span[data-v-a849128a]{line-height:26px;padding-left:15px;overflow:hidden;text-overflow:ellipsis;display:inline-block;width:calc(100% - 26px);white-space:nowrap;position:relative}.date-range-disabled .date-range-field[data-v-a849128a]{cursor:default;color:#8e959d;pointer-events:none}.date-range-disabled .small-triangle[data-v-a849128a]:after{border-top-color:#8e959d}.pop-up-content[data-v-a849128a]{margin-top:1px}.type-message[data-v-a849128a]{color:#8e959d;padding:10px 20px;line-height:1.5}.relative-wrap[data-v-a849128a]{position:relative}.space-right[data-v-a849128a]{margin-right:13px}.space-left[data-v-a849128a]{margin-left:9px}.top-date[data-v-a849128a]{line-height:13px}.flex[data-v-a849128a]{display:flex}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartDataSet,
|
|
1
|
+
import { ChartDataSet, ChartParsingConfig, ChartType, ValueFormat } from './types';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
dataSets: ChartDataSet[];
|
|
4
4
|
visibleIds: unknown[];
|
|
@@ -7,19 +7,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
7
7
|
xAxisFormat?: ValueFormat;
|
|
8
8
|
yAxisFormat?: ValueFormat;
|
|
9
9
|
tickCount?: number;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
withAnimation?: boolean;
|
|
12
|
+
totalsChart?: boolean;
|
|
10
13
|
header?: string;
|
|
11
14
|
subheader?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
minVisible?: number;
|
|
15
|
-
maxVisible?: number;
|
|
16
|
-
loading?: boolean;
|
|
15
|
+
trendValue?: string | number;
|
|
16
|
+
trendDirection?: "up" | "down";
|
|
17
17
|
noDataIcon?: string;
|
|
18
18
|
noDataTitle?: string;
|
|
19
19
|
noDataSubtitle?: string;
|
|
20
|
-
|
|
20
|
+
hideLegend?: boolean;
|
|
21
|
+
minVisible?: number;
|
|
22
|
+
maxVisible?: number;
|
|
21
23
|
maxLimitTooltipText?: string;
|
|
22
|
-
|
|
24
|
+
fullHeight?: boolean;
|
|
25
|
+
withSettingsHeader?: boolean;
|
|
26
|
+
extraCharts?: Record<string, unknown>[];
|
|
23
27
|
}>, {
|
|
24
28
|
chartType: ChartType;
|
|
25
29
|
dataSets: () => any[];
|
|
@@ -28,20 +32,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
32
|
yAxisFormat: string;
|
|
29
33
|
parsing: any;
|
|
30
34
|
tickCount: number;
|
|
35
|
+
loading: boolean;
|
|
36
|
+
withAnimation: boolean;
|
|
37
|
+
totalsChart: boolean;
|
|
31
38
|
header: string;
|
|
32
39
|
subheader: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
minVisible: number;
|
|
36
|
-
maxVisible: number;
|
|
37
|
-
loading: boolean;
|
|
40
|
+
trendValue: any;
|
|
41
|
+
trendDirection: string;
|
|
38
42
|
noDataIcon: string;
|
|
39
43
|
noDataTitle: string;
|
|
40
44
|
noDataSubtitle: string;
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
hideLegend: boolean;
|
|
46
|
+
minVisible: number;
|
|
47
|
+
maxVisible: number;
|
|
43
48
|
maxLimitTooltipText: string;
|
|
44
|
-
|
|
49
|
+
fullHeight: boolean;
|
|
50
|
+
withSettingsHeader: boolean;
|
|
51
|
+
extraCharts: () => any[];
|
|
45
52
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
53
|
"update:chartType": (chartType: ChartType) => void;
|
|
47
54
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
@@ -53,19 +60,23 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
53
60
|
xAxisFormat?: ValueFormat;
|
|
54
61
|
yAxisFormat?: ValueFormat;
|
|
55
62
|
tickCount?: number;
|
|
63
|
+
loading?: boolean;
|
|
64
|
+
withAnimation?: boolean;
|
|
65
|
+
totalsChart?: boolean;
|
|
56
66
|
header?: string;
|
|
57
67
|
subheader?: string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
minVisible?: number;
|
|
61
|
-
maxVisible?: number;
|
|
62
|
-
loading?: boolean;
|
|
68
|
+
trendValue?: string | number;
|
|
69
|
+
trendDirection?: "up" | "down";
|
|
63
70
|
noDataIcon?: string;
|
|
64
71
|
noDataTitle?: string;
|
|
65
72
|
noDataSubtitle?: string;
|
|
66
|
-
|
|
73
|
+
hideLegend?: boolean;
|
|
74
|
+
minVisible?: number;
|
|
75
|
+
maxVisible?: number;
|
|
67
76
|
maxLimitTooltipText?: string;
|
|
68
|
-
|
|
77
|
+
fullHeight?: boolean;
|
|
78
|
+
withSettingsHeader?: boolean;
|
|
79
|
+
extraCharts?: Record<string, unknown>[];
|
|
69
80
|
}>, {
|
|
70
81
|
chartType: ChartType;
|
|
71
82
|
dataSets: () => any[];
|
|
@@ -74,44 +85,51 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
74
85
|
yAxisFormat: string;
|
|
75
86
|
parsing: any;
|
|
76
87
|
tickCount: number;
|
|
88
|
+
loading: boolean;
|
|
89
|
+
withAnimation: boolean;
|
|
90
|
+
totalsChart: boolean;
|
|
77
91
|
header: string;
|
|
78
92
|
subheader: string;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
minVisible: number;
|
|
82
|
-
maxVisible: number;
|
|
83
|
-
loading: boolean;
|
|
93
|
+
trendValue: any;
|
|
94
|
+
trendDirection: string;
|
|
84
95
|
noDataIcon: string;
|
|
85
96
|
noDataTitle: string;
|
|
86
97
|
noDataSubtitle: string;
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
hideLegend: boolean;
|
|
99
|
+
minVisible: number;
|
|
100
|
+
maxVisible: number;
|
|
89
101
|
maxLimitTooltipText: string;
|
|
90
|
-
|
|
102
|
+
fullHeight: boolean;
|
|
103
|
+
withSettingsHeader: boolean;
|
|
104
|
+
extraCharts: () => any[];
|
|
91
105
|
}>>> & {
|
|
92
106
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
93
107
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
94
108
|
}, {
|
|
95
109
|
header: string;
|
|
96
110
|
loading: boolean;
|
|
97
|
-
xAxisFormat: ValueFormat;
|
|
98
|
-
yAxisFormat: ValueFormat;
|
|
99
|
-
parsing: ChartParsingConfig;
|
|
100
111
|
visibleIds: unknown[];
|
|
101
112
|
minVisible: number;
|
|
102
113
|
maxVisible: number;
|
|
103
114
|
maxLimitTooltipText: string;
|
|
104
115
|
chartType: ChartType;
|
|
105
|
-
withSettingsHeader: boolean;
|
|
106
|
-
subheader: string;
|
|
107
|
-
withSubheaderTooltip: boolean;
|
|
108
|
-
dataSets: ChartDataSet[];
|
|
109
116
|
hideLegend: boolean;
|
|
117
|
+
xAxisFormat: ValueFormat;
|
|
118
|
+
yAxisFormat: ValueFormat;
|
|
119
|
+
parsing: ChartParsingConfig;
|
|
120
|
+
dataSets: ChartDataSet[];
|
|
121
|
+
subheader: string;
|
|
122
|
+
trendValue: string | number;
|
|
123
|
+
trendDirection: "up" | "down";
|
|
110
124
|
tickCount: number;
|
|
125
|
+
withAnimation: boolean;
|
|
126
|
+
totalsChart: boolean;
|
|
111
127
|
noDataIcon: string;
|
|
112
128
|
noDataTitle: string;
|
|
113
129
|
noDataSubtitle: string;
|
|
114
|
-
|
|
130
|
+
fullHeight: boolean;
|
|
131
|
+
withSettingsHeader: boolean;
|
|
132
|
+
extraCharts: Record<string, unknown>[];
|
|
115
133
|
}>, {
|
|
116
134
|
metric?(_: {}): any;
|
|
117
135
|
breakdowns?(_: {}): any;
|
|
@@ -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.
|
|
4
|
-
const
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-78d3f5a8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,324 +1,125 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import Le from "./ChartHeader.vue.js";
|
|
12
|
-
import { hexColorToRgba as Se } from "../../utils/color.js";
|
|
13
|
-
import { useChartValues as we } from "./composables/useChartValues.js";
|
|
14
|
-
import Be from "./ChartLoader.vue.js";
|
|
15
|
-
import Ie from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
-
import Ae from "./SettingsHeader.vue.js";
|
|
17
|
-
const Ee = { class: "chart-container" }, Ve = { class: "header-wrapper" }, Re = { class: "chart" }, De = {
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css"; import { defineComponent as V, computed as n, openBlock as s, createElementBlock as d, Fragment as C, createBlock as x, unref as a, isRef as v, withCtx as u, renderSlot as c, createCommentVNode as T, createElementVNode as I, mergeProps as h, normalizeClass as H, createVNode as S, renderList as E } from "vue";
|
|
2
|
+
import { useVModel as U } from "@vueuse/core";
|
|
3
|
+
import N from "./ChartLegend.vue.js";
|
|
4
|
+
import P from "./SettingsHeader.vue.js";
|
|
5
|
+
import D from "./ChartPlane.vue.js";
|
|
6
|
+
import { useColorsMap as M } from "./composables/useColorsMap.js";
|
|
7
|
+
import { DEFAULT_TICK_COUNT as $, DEFAULT_MIN_VISIBLE as z, DEFAULT_MAX_VISIBLE as K } from "./consts.js";
|
|
8
|
+
import { ChartType as O } from "./types.js";
|
|
9
|
+
import { useChartHeight as R } from "./composables/useChartHeight.js";
|
|
10
|
+
const X = {
|
|
18
11
|
key: 0,
|
|
19
12
|
class: "chart-sidebar"
|
|
20
|
-
},
|
|
13
|
+
}, ee = /* @__PURE__ */ V({
|
|
21
14
|
__name: "Chart",
|
|
22
15
|
props: {
|
|
23
16
|
dataSets: { default: () => [] },
|
|
24
17
|
visibleIds: { default: () => [] },
|
|
25
|
-
chartType: { default:
|
|
18
|
+
chartType: { default: O.Line },
|
|
26
19
|
parsing: { default: void 0 },
|
|
27
20
|
xAxisFormat: { default: "string" },
|
|
28
21
|
yAxisFormat: { default: "number" },
|
|
29
|
-
tickCount: { default:
|
|
22
|
+
tickCount: { default: $ },
|
|
23
|
+
loading: { type: Boolean, default: !1 },
|
|
24
|
+
withAnimation: { type: Boolean, default: !0 },
|
|
25
|
+
totalsChart: { type: Boolean, default: !1 },
|
|
30
26
|
header: { default: "" },
|
|
31
27
|
subheader: { default: "" },
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
minVisible: { default: ye },
|
|
35
|
-
maxVisible: { default: be },
|
|
36
|
-
loading: { type: Boolean, default: !1 },
|
|
28
|
+
trendValue: { default: null },
|
|
29
|
+
trendDirection: { default: "up" },
|
|
37
30
|
noDataIcon: { default: "file-search" },
|
|
38
31
|
noDataTitle: { default: "No data to display" },
|
|
39
32
|
noDataSubtitle: { default: "Search again with different filters" },
|
|
40
|
-
|
|
33
|
+
hideLegend: { type: Boolean, default: !1 },
|
|
34
|
+
minVisible: { default: z },
|
|
35
|
+
maxVisible: { default: K },
|
|
41
36
|
maxLimitTooltipText: { default: "" },
|
|
42
|
-
|
|
37
|
+
fullHeight: { type: Boolean, default: !1 },
|
|
38
|
+
withSettingsHeader: { type: Boolean, default: !0 },
|
|
39
|
+
extraCharts: { default: () => [] }
|
|
43
40
|
},
|
|
44
41
|
emits: ["update:chartType", "update:visibleIds"],
|
|
45
|
-
setup(
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
80
|
-
), g = i(() => f.value.map((e, o) => {
|
|
81
|
-
const l = e.color || ge[o] || "#000000";
|
|
82
|
-
return {
|
|
83
|
-
...e,
|
|
84
|
-
fill: m.value ? "start" : void 0,
|
|
85
|
-
backgroundColor: Se(
|
|
86
|
-
l,
|
|
87
|
-
t.chartType === n.StackedLine ? 10 : 70
|
|
88
|
-
),
|
|
89
|
-
borderColor: l,
|
|
90
|
-
pointBackgroundColor: l,
|
|
91
|
-
pointHoverBorderColor: l,
|
|
92
|
-
maxBarThickness: 50,
|
|
93
|
-
clip: 5,
|
|
94
|
-
// draw a bit outside the chart area
|
|
95
|
-
icon: e.icon || null,
|
|
96
|
-
iconType: e.iconType || "branded"
|
|
97
|
-
};
|
|
98
|
-
})), A = i(
|
|
99
|
-
() => f.value.length && f.value.every(
|
|
100
|
-
(e) => e.data.length === 1
|
|
101
|
-
)
|
|
102
|
-
), E = i(
|
|
103
|
-
() => ({
|
|
104
|
-
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
105
|
-
// Chart Data
|
|
106
|
-
data: {
|
|
107
|
-
datasets: g.value
|
|
108
|
-
},
|
|
109
|
-
// Chart Options
|
|
110
|
-
options: {
|
|
111
|
-
parsing: t.parsing,
|
|
112
|
-
interaction: {
|
|
113
|
-
intersect: !1,
|
|
114
|
-
mode: "index",
|
|
115
|
-
axis: "x"
|
|
116
|
-
},
|
|
117
|
-
// plugins
|
|
118
|
-
plugins: {
|
|
119
|
-
legend: { display: !1 },
|
|
120
|
-
title: { display: !1 },
|
|
121
|
-
hoverVerticalLine: I.value,
|
|
122
|
-
// tooltip
|
|
123
|
-
tooltip: {
|
|
124
|
-
enabled: !1,
|
|
125
|
-
position: "average",
|
|
126
|
-
external: ({ tooltip: e }) => {
|
|
127
|
-
r.value = { ...e };
|
|
128
|
-
},
|
|
129
|
-
callbacks: {
|
|
130
|
-
footer: (e) => {
|
|
131
|
-
const o = e.reduce((l, q) => l + (q.parsed.y || 0), 0);
|
|
132
|
-
return ["Total", String(o)];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
// chart layout
|
|
138
|
-
responsive: !0,
|
|
139
|
-
maintainAspectRatio: !1,
|
|
140
|
-
layout: {
|
|
141
|
-
padding: {
|
|
142
|
-
left: 18,
|
|
143
|
-
top: 18,
|
|
144
|
-
bottom: 13
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
// basic styles
|
|
148
|
-
elements: {
|
|
149
|
-
line: {
|
|
150
|
-
borderWidth: 2,
|
|
151
|
-
tension: 0.3
|
|
152
|
-
},
|
|
153
|
-
point: {
|
|
154
|
-
radius: A.value ? 3 : 1,
|
|
155
|
-
hitRadius: 8,
|
|
156
|
-
borderWidth: 0,
|
|
157
|
-
hoverRadius: 4,
|
|
158
|
-
hoverBorderWidth: 2,
|
|
159
|
-
pointHoverBackgroundColor: Te
|
|
160
|
-
},
|
|
161
|
-
bar: {
|
|
162
|
-
borderRadius: 4
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
scales: {
|
|
166
|
-
// Horizontal Axis (X)
|
|
167
|
-
x: {
|
|
168
|
-
beginAtZero: !0,
|
|
169
|
-
offset: !I.value || A.value,
|
|
170
|
-
border: { display: !1 },
|
|
171
|
-
stacked: m.value,
|
|
172
|
-
// stack on top of each other
|
|
173
|
-
// ticks
|
|
174
|
-
ticks: {
|
|
175
|
-
color: z,
|
|
176
|
-
font: M,
|
|
177
|
-
padding: 4,
|
|
178
|
-
callback: function(e) {
|
|
179
|
-
return U(
|
|
180
|
-
this.getLabelForValue(e),
|
|
181
|
-
t.xAxisFormat
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
// grid lines
|
|
186
|
-
grid: {
|
|
187
|
-
color: $,
|
|
188
|
-
drawOnChartArea: !1,
|
|
189
|
-
drawTicks: !0,
|
|
190
|
-
drawBorder: !1,
|
|
191
|
-
tickLength: 7
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
// Vertical Axis (Y)
|
|
195
|
-
y: {
|
|
196
|
-
beginAtZero: !0,
|
|
197
|
-
border: { display: !1 },
|
|
198
|
-
// hide left borderline
|
|
199
|
-
stacked: m.value,
|
|
200
|
-
// stack on top of each other
|
|
201
|
-
// ticks
|
|
202
|
-
ticks: {
|
|
203
|
-
color: z,
|
|
204
|
-
font: M,
|
|
205
|
-
padding: 8,
|
|
206
|
-
stepSize: O.value,
|
|
207
|
-
min: D.value,
|
|
208
|
-
max: O.value * t.tickCount,
|
|
209
|
-
callback: (e) => U(e, t.yAxisFormat)
|
|
210
|
-
},
|
|
211
|
-
// grid lines
|
|
212
|
-
grid: {
|
|
213
|
-
color: $,
|
|
214
|
-
drawOnChartArea: !0,
|
|
215
|
-
drawTicks: !1
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
})
|
|
221
|
-
), Z = i(
|
|
222
|
-
() => g.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
223
|
-
), G = i(() => t.dataSets.map((e) => ({
|
|
224
|
-
id: e.id,
|
|
225
|
-
label: e.label,
|
|
226
|
-
caption: e.caption || null,
|
|
227
|
-
color: Z.value[e.id] || null,
|
|
228
|
-
icon: e.icon || null,
|
|
229
|
-
iconType: e.iconType || "branded"
|
|
230
|
-
}))), V = T(null), r = T(null), { position: R } = Ce(
|
|
231
|
-
h,
|
|
232
|
-
V,
|
|
233
|
-
r
|
|
234
|
-
), X = i(() => ({
|
|
235
|
-
left: `${R.value.left}px`,
|
|
236
|
-
top: `${R.value.top}px`,
|
|
237
|
-
opacity: r.value?.opacity || 0
|
|
238
|
-
})), { minValue: D, maxValue: j } = we({
|
|
239
|
-
parsingConfig: t.parsing,
|
|
240
|
-
dataSets: f,
|
|
241
|
-
isStacked: m
|
|
242
|
-
}), O = i(
|
|
243
|
-
() => fe(D.value, j.value, t.tickCount)
|
|
244
|
-
);
|
|
245
|
-
return (e, o) => (d(), k(F, null, [
|
|
246
|
-
a.withSettingsHeader ? (d(), v(Ae, {
|
|
42
|
+
setup(i, { emit: p }) {
|
|
43
|
+
const e = i, l = U(e, "chartType", p), m = n(() => ({
|
|
44
|
+
dataSets: e.dataSets,
|
|
45
|
+
visibleIds: e.visibleIds,
|
|
46
|
+
parsing: e.parsing,
|
|
47
|
+
xAxisFormat: e.xAxisFormat,
|
|
48
|
+
yAxisFormat: e.yAxisFormat,
|
|
49
|
+
tickCount: e.tickCount,
|
|
50
|
+
header: e.header,
|
|
51
|
+
subheader: e.subheader,
|
|
52
|
+
loading: e.loading,
|
|
53
|
+
noDataIcon: e.noDataIcon,
|
|
54
|
+
noDataTitle: e.noDataTitle,
|
|
55
|
+
noDataSubtitle: e.noDataSubtitle,
|
|
56
|
+
withAnimation: e.withAnimation,
|
|
57
|
+
typeSwitcher: !e.withSettingsHeader,
|
|
58
|
+
height: F.value,
|
|
59
|
+
compactHeader: y.value > 1,
|
|
60
|
+
trendValue: e.trendValue,
|
|
61
|
+
trendDirection: e.trendDirection,
|
|
62
|
+
totalsChart: e.totalsChart
|
|
63
|
+
})), L = n(() => e.dataSets), f = n(() => e.visibleIds), g = n(() => e.extraCharts.length), y = n(() => 1 + g.value), w = (t) => t === g.value - 1, { colorsMap: A } = M({ dataSets: L, visibleIds: f }), k = n(() => e.dataSets.map((t) => ({
|
|
64
|
+
id: t.id,
|
|
65
|
+
label: t.label,
|
|
66
|
+
caption: t.caption || null,
|
|
67
|
+
color: A.value[t.id] || null,
|
|
68
|
+
icon: t.icon || null,
|
|
69
|
+
iconType: t.iconType || "branded"
|
|
70
|
+
}))), { containerProps: B, eachPlaneHeight: F } = R({
|
|
71
|
+
chartPlanesCount: y,
|
|
72
|
+
useFullHeight: e.fullHeight
|
|
73
|
+
});
|
|
74
|
+
return (t, r) => (s(), d(C, null, [
|
|
75
|
+
i.withSettingsHeader ? (s(), x(P, {
|
|
247
76
|
key: 0,
|
|
248
|
-
"chart-type":
|
|
249
|
-
"onUpdate:chart-type":
|
|
250
|
-
"hide-legend":
|
|
77
|
+
"chart-type": a(l),
|
|
78
|
+
"onUpdate:chart-type": r[0] || (r[0] = (o) => v(l) ? l.value = o : null),
|
|
79
|
+
"hide-legend": i.hideLegend
|
|
251
80
|
}, {
|
|
252
|
-
metric:
|
|
253
|
-
|
|
81
|
+
metric: u(() => [
|
|
82
|
+
c(t.$slots, "metric", {}, void 0, !0)
|
|
254
83
|
]),
|
|
255
|
-
breakdowns:
|
|
256
|
-
|
|
84
|
+
breakdowns: u(() => [
|
|
85
|
+
c(t.$slots, "breakdowns", {}, void 0, !0)
|
|
257
86
|
]),
|
|
258
87
|
_: 3
|
|
259
|
-
}, 8, ["chart-type", "hide-legend"])) :
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
header: a.header,
|
|
271
|
-
subheader: a.subheader,
|
|
272
|
-
"with-subheader-tooltip": a.withSubheaderTooltip
|
|
273
|
-
}, {
|
|
274
|
-
"subheader-tooltip": x(() => [
|
|
275
|
-
L(e.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
276
|
-
]),
|
|
277
|
-
_: 3
|
|
278
|
-
}, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
|
|
88
|
+
}, 8, ["chart-type", "hide-legend"])) : T("", !0),
|
|
89
|
+
I("div", h({ class: "chart-container" }, a(B)), [
|
|
90
|
+
I("section", {
|
|
91
|
+
class: H(["chart-planes", [{ "with-legend": !i.hideLegend }]])
|
|
92
|
+
}, [
|
|
93
|
+
S(D, h({
|
|
94
|
+
"chart-type": a(l),
|
|
95
|
+
"onUpdate:chart-type": r[1] || (r[1] = (o) => v(l) ? l.value = o : null)
|
|
96
|
+
}, a(m)), {
|
|
97
|
+
"subheader-tooltip": u(() => [
|
|
98
|
+
c(t.$slots, "subheader-tooltip", {}, void 0, !0)
|
|
279
99
|
]),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : y("", !0)
|
|
301
|
-
], 4)
|
|
302
|
-
])
|
|
303
|
-
], 2),
|
|
304
|
-
a.hideLegend ? y("", !0) : (d(), k("section", De, [
|
|
305
|
-
H(xe, {
|
|
306
|
-
items: u(G),
|
|
307
|
-
"visible-ids": a.visibleIds,
|
|
308
|
-
"max-limit-tooltip-text": a.maxLimitTooltipText,
|
|
309
|
-
"onUpdate:visibleIds": o[2] || (o[2] = (l) => S("update:visibleIds", l))
|
|
310
|
-
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
311
|
-
]))
|
|
312
|
-
], 64)) : a.loading ? (d(), v(Be, { key: 1 })) : u(w) ? (d(), v(u(Ie), {
|
|
313
|
-
key: 2,
|
|
314
|
-
title: a.noDataTitle,
|
|
315
|
-
subtitle: a.noDataSubtitle,
|
|
316
|
-
"icon-name": a.noDataIcon
|
|
317
|
-
}, null, 8, ["title", "subtitle", "icon-name"])) : y("", !0)
|
|
318
|
-
])
|
|
100
|
+
_: 3
|
|
101
|
+
}, 16, ["chart-type"]),
|
|
102
|
+
(s(!0), d(C, null, E(i.extraCharts, (o, b) => (s(), x(D, h({
|
|
103
|
+
key: b,
|
|
104
|
+
class: "extra-chart-plane"
|
|
105
|
+
}, { ...a(m), ...o }, {
|
|
106
|
+
"chart-type": a(l),
|
|
107
|
+
"type-switcher": !1,
|
|
108
|
+
"tooltip-respects-top-edge": !w(b)
|
|
109
|
+
}), null, 16, ["chart-type", "tooltip-respects-top-edge"]))), 128))
|
|
110
|
+
], 2),
|
|
111
|
+
i.hideLegend ? T("", !0) : (s(), d("section", X, [
|
|
112
|
+
S(N, {
|
|
113
|
+
items: a(k),
|
|
114
|
+
"visible-ids": a(f),
|
|
115
|
+
"max-limit-tooltip-text": i.maxLimitTooltipText,
|
|
116
|
+
"onUpdate:visibleIds": r[2] || (r[2] = (o) => p("update:visibleIds", o))
|
|
117
|
+
}, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
|
|
118
|
+
]))
|
|
119
|
+
], 16)
|
|
319
120
|
], 64));
|
|
320
121
|
}
|
|
321
122
|
});
|
|
322
123
|
export {
|
|
323
|
-
|
|
124
|
+
ee as default
|
|
324
125
|
};
|