@ironsource/shared-ui 2.1.8-rc.7 → 2.1.8-rc.9
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/Chart.vue_vue_type_style_index_0_scoped_df85e0af_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_2e3de9c5_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_d27e1304_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_fd7a490e_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_cfedf78b_lang.css +1 -0
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_1791e4fe_lang.css +1 -0
- package/Table.vue_vue_type_style_index_0_scoped_9375215d_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +15 -2
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +160 -141
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +31 -29
- package/components/chart/SettingsHeader.vue.d.ts +30 -0
- package/components/chart/SettingsHeader.vue.js +7 -0
- package/components/chart/SettingsHeader.vue2.js +57 -0
- package/components/chart/consts.d.ts +2 -0
- package/components/chart/consts.js +17 -11
- package/components/chart/index.d.ts +320 -74
- package/components/chart/types.d.ts +4 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +1 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +33 -31
- package/components/dropdown/v4/index.d.ts +1 -0
- package/components/loader/v4/index.js +6 -0
- package/components/table/common/Table.types.d.ts +6 -0
- package/components/table/v3/Table.vue.d.ts +3 -13
- package/components/table/v3/Table.vue.js +5 -5
- package/components/table/v3/Table.vue2.js +2 -2
- package/components/table/v3/index.d.ts +7 -42
- package/components/table/v4/DataGrid.vue.d.ts +3 -13
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +5 -5
- package/components/table/v4/MultipleDataGrid.vue.d.ts +7 -1
- package/components/table/v4/MultipleDataGrid.vue.js +3 -3
- package/components/table/v4/MultipleDataGrid.vue2.js +76 -75
- package/components/table/v4/index.d.ts +28 -43
- package/index.d.ts +332 -170
- package/index.js +128 -126
- package/package.json +4 -1
- package/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_2f666594_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_1726ad49_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_82ba0e12_lang.css +0 -1
- package/Table.vue_vue_type_style_index_0_scoped_76fef9bd_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-df85e0af]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px}.header-wrapper[data-v-df85e0af]{height:76px}.chart-content[data-v-df85e0af]{flex:1}.chart-sidebar[data-v-df85e0af]{border-left:1px solid var(--common-divider)}.chart[data-v-df85e0af]{width:100%;height:312px;position:relative}.chart__canvas[data-v-df85e0af]{width:100%;height:100%}.chart__tooltip[data-v-df85e0af]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-header[data-v-2e3de9c5]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.header-texts[data-v-2e3de9c5]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px}.type-switch[data-v-2e3de9c5]{display:flex;align-items:center;gap:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sticky[data-v-d27e1304]{position:sticky}.table-container[data-v-d27e1304]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-d27e1304]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-d27e1304]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-d27e1304]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-d27e1304]{width:13.75rem}.table-header.isStickyHeader[data-v-d27e1304]{z-index:calc(var(--189e28e1) + 3);top:0}.table-head-container[data-v-d27e1304]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-d27e1304]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-d27e1304]{display:inline-table}.table-header-actions[data-v-d27e1304]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-d27e1304]{position:relative}.table-row.loading[data-v-d27e1304]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-d27e1304]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-d27e1304]{border-bottom:none}.expanded-row[data-v-d27e1304]{grid-column:var(--ac6022d6);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-d27e1304]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md);border-collapse:collapse;border-spacing:0}table.hasFooter[data-v-d27e1304]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-d27e1304],table th[data-v-d27e1304]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-d27e1304]:first-of-type,table th[data-v-d27e1304]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-d27e1304]:last-of-type,table th[data-v-d27e1304]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-d27e1304],table th.expand-toggle-cell[data-v-d27e1304]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-d27e1304]{border-bottom:none;z-index:calc(var(--189e28e1) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-d27e1304]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--3d5ab04e)}table>thead>tr>th[data-v-d27e1304]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-d27e1304]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-d27e1304]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-d27e1304]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-d27e1304]{cursor:pointer}table>thead.sticky[data-v-d27e1304]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-d27e1304]{z-index:calc(var(--189e28e1) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-d27e1304]{display:block}table>tbody>*>tr[data-v-d27e1304]{background-color:var(--background-default);min-height:var(--633cd456);height:auto;display:grid;align-items:center;grid-template-columns:var(--3d5ab04e)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-d27e1304]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-d27e1304],table>tbody>*>tr.activeMenu>td[data-v-d27e1304]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-d27e1304]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--633cd456);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-d27e1304]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-d27e1304]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-d27e1304]{justify-content:flex-end;text-align:right}.section-container[data-v-d27e1304]{left:0}.sections[data-v-d27e1304]{display:flex}.section[data-v-d27e1304]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-d27e1304]{width:100%}.empty-state[data-v-d27e1304]{min-height:250px}.floating-row[data-v-d27e1304]{display:flex;inset:0;pointer-events:none;position:absolute;z-index:calc(var(--189e28e1) + 1)}.floating-row *[data-v-d27e1304-s]{pointer-events:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.default-dropdown-wrapper[data-v-fd7a490e]{position:relative}.dropdown-trigger[data-v-fd7a490e]{width:100%;padding:.3125rem .4375rem;display:flex;column-gap:.25rem;max-width:100%;box-sizing:border-box;border-radius:var(--border-radius-md);border:1px solid var(--action-outlined-border);background:var(--default-main);cursor:pointer;user-select:none;position:relative}.dropdown-trigger[data-v-fd7a490e]:hover{border:1px solid var(--action-active);background:var(--action-hover)}.dropdown-trigger.small[data-v-fd7a490e]{padding:.1875rem .4375rem}.dropdown-trigger.large[data-v-fd7a490e]{padding:.5625rem .4375rem}.dropdown-trigger.disabled[data-v-fd7a490e]{border:1px solid var(--action-outlined-border, #bbb);background:var(--action-disabled-background, #f1f1f1);cursor:not-allowed}.dropdown-trigger.disabled .displayed-value[data-v-fd7a490e],.dropdown-trigger.disabled .caret-down[data-v-fd7a490e]{color:var(--text-disabled)}.dropdown-trigger.open[data-v-fd7a490e]{padding:.25rem .375rem;border:2px solid var(--primary-main)}.dropdown-trigger.open.small[data-v-fd7a490e]{padding:.125rem .375rem}.dropdown-trigger.open.large[data-v-fd7a490e]{padding:.5rem .375rem}.dropdown-trigger.state-error[data-v-fd7a490e],.dropdown-trigger.state-success[data-v-fd7a490e],.dropdown-trigger.state-warning[data-v-fd7a490e]{padding:4px 6px}.dropdown-trigger.state-error.small[data-v-fd7a490e],.dropdown-trigger.state-success.small[data-v-fd7a490e],.dropdown-trigger.state-warning.small[data-v-fd7a490e]{padding:.1875rem .4375rem}.dropdown-trigger.state-error.large[data-v-fd7a490e],.dropdown-trigger.state-success.large[data-v-fd7a490e],.dropdown-trigger.state-warning.large[data-v-fd7a490e]{padding:.5625rem .4375rem}.dropdown-trigger.state-error[data-v-fd7a490e]{border:2px solid var(--error-main)}.dropdown-trigger.state-success[data-v-fd7a490e]{border:2px solid var(--success-main)}.dropdown-trigger.state-warning[data-v-fd7a490e]{border:2px solid var(--warning-dark)}.dropdown-trigger .caret-down[data-v-fd7a490e]{color:var(--action-active)}.content[data-v-fd7a490e]{display:flex;flex:1;gap:.25rem;align-items:center;color:var(--text-primary)}.content .displayed-value[data-v-fd7a490e]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content .image[data-v-fd7a490e]{width:20px;height:20px;flex:none}.content .image img[data-v-fd7a490e]{border-radius:4px;width:100%;height:100%}.content .start-icon[data-v-fd7a490e]{display:flex;color:var(--action-active)}.content .status-dot[data-v-fd7a490e]{padding-right:.25rem}.content .status-dot>div[data-v-fd7a490e]{position:relative;top:-1px}.dropdown-field-label[data-v-fd7a490e]{color:var(--text-primary)}.dropdown-field-help-text[data-v-fd7a490e]{margin-top:4px;position:absolute}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.multi-table-container[data-v-cfedf78b]{border-radius:var(--border-radius-md);border:1px solid var(--common-divider);display:flex;flex-direction:column;overflow-y:auto;width:100%}.multi-table-container .table-header-container[data-v-cfedf78b]{align-items:center;background-color:var(--background-paper-elevation-0);display:flex;height:calc(var(--spacing-800) - 2px);justify-content:space-between;padding:var(--spacing-300);width:100%}.multi-table-container .table-header-container.sticky[data-v-cfedf78b]{position:sticky;top:0;z-index:calc(var(--6083f45c) + 3)}.multi-table-container[data-v-cfedf78b] table{display:table;border:unset;border-radius:unset}.multi-table-container[data-v-cfedf78b] thead{border-top:1px solid var(--common-divider)}.multi-table-container .tables-container[data-v-cfedf78b] thead.sticky{top:62px}.multi-table-container .empty-state[data-v-cfedf78b]{min-height:250px}.multi-table-container .table-header-right[data-v-cfedf78b]{align-items:center;display:flex;height:100%}.multi-table-container .table-header-right .table-header-actions[data-v-cfedf78b]{align-items:center;display:flex;margin-left:var(--spacing-100)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.settings-header-container[data-v-1791e4fe]{display:flex;border:.0625rem solid var(--common-divider);border-radius:.375rem .375rem 0 0;border-bottom:none;background-color:var(--background-paper-elevation-0, #f9f9f9);justify-content:space-between}.settings-header-container .settings[data-v-1791e4fe]{display:flex;flex-direction:row;justify-content:space-between;height:4rem;padding:.75rem 0 .75rem 1.5rem;align-items:center;gap:.75rem;flex:1}.settings-header-container .settings .chart-type-selection[data-v-1791e4fe]{display:flex;height:1.75rem;max-width:8.125rem}.settings-header-container .settings .chart-type-selection[data-v-1791e4fe] .displayed-value{font-weight:600}.settings-header-container .settings-spacer[data-v-1791e4fe]{padding:.75rem 1.5rem}.settings-header-container .breakdowns[data-v-1791e4fe]{display:flex;width:13.8125rem;height:4rem;padding:0 .75rem;flex-direction:column;justify-content:center;align-items:flex-start;gap:.75rem}.settings-header-container .breakdowns-border[data-v-1791e4fe]{border-left:.0625rem solid var(--common-divider)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.label[data-v-9375215d]{color:#41454d}.sticky[data-v-9375215d]{position:sticky}.table-container[data-v-9375215d]{width:100%;position:relative}.last.floating[data-v-9375215d]{max-width:100%}.table-header[data-v-9375215d]{display:flex;align-items:center;height:55px;border-bottom:1px solid #dddfe1;background-color:#fff;position:sticky;left:0}.table-header .table-title[data-v-9375215d]{display:flex;align-items:center;justify-content:center;height:100%;padding:1.25rem 1.5rem}.table-header .table-header-right[data-v-9375215d]{display:flex;align-items:center;height:100%}.table-header .table-header-right.border-search[data-v-9375215d]{border-left:1px solid #dddfe1}.table-header.isStickyHeader[data-v-9375215d]{z-index:199;top:0}.table-head-container[data-v-9375215d]{display:flex;align-items:center;white-space:nowrap}.table-body-wrapper[data-v-9375215d]{display:inline-table}.table-header-actions[data-v-9375215d]{margin-left:auto;margin-right:1rem;display:flex;align-items:center}.table-row[data-v-9375215d]{position:relative}.table-row.loading[data-v-9375215d]{opacity:.7}.floating-actions[data-v-9375215d]{position:absolute;z-index:10;max-width:max-content;transform:translateY(-50%) translate(calc(-100% - 12px));top:50%;left:0}table[data-v-9375215d]{position:relative;display:block;overflow:auto;background:#ffffff;border:1px solid #dddfe1;color:#53575b;text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:1rem}table td[data-v-9375215d],table th[data-v-9375215d]{padding:0 1.5rem;line-height:normal}table thead[data-v-9375215d]{border-bottom:none;z-index:101;display:inline-table;min-width:100%}table thead tr[data-v-9375215d]{color:#626970;border-bottom:2px solid #dddfe1;height:2.5rem;display:grid;grid-template-columns:var(--0c2c9e92)}table thead tr th[data-v-9375215d]{background:#ffffff;width:100%;display:flex;align-items:center;cursor:default}table thead tr th.bordered[data-v-9375215d]{border-right:1px solid #dddfe1}table thead tr th.isTextRight[data-v-9375215d]{justify-content:flex-end}table thead tr th.isSortable[data-v-9375215d]{cursor:pointer}table thead.sticky[data-v-9375215d]{position:sticky;top:0;background:white}table thead.isStickyHeader[data-v-9375215d]{z-index:198px;top:55px}table tbody[data-v-9375215d]{height:100%;display:block}table tbody tr[data-v-9375215d]{background-color:#fff;min-height:3rem;height:auto;display:grid;align-items:center;grid-template-columns:var(--0c2c9e92)}table tbody tr:nth-of-type(2n) td[data-v-9375215d]{background-color:#fff}table tbody tr:hover:not(.loading) td[data-v-9375215d]{background-color:#f7f8f9}table tbody td[data-v-9375215d]{background-color:#fff;border:none;min-width:0;display:flex;height:100%;width:100%;place-items:center;border-bottom:1px solid #dddfe1;justify-content:start}table tbody td.bordered[data-v-9375215d]{border-right:1px solid #dddfe1}table tbody td.isTextRight[data-v-9375215d]{justify-content:flex-end}table tfoot[data-v-9375215d]{display:block;height:4.5rem;background-color:#fff;border:none}.section-container[data-v-9375215d]{left:0}.sections[data-v-9375215d]{display:flex}.section[data-v-9375215d]{padding:0 1.5rem;background:#ffffff;left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid #dddfe1}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartDataSet, ChartType, ChartParsingConfig, ValueFormat } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
dataSets: ChartDataSet[];
|
|
4
4
|
visibleIds: unknown[];
|
|
5
5
|
chartType?: ChartType;
|
|
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
16
16
|
noDataIcon?: string;
|
|
17
17
|
noDataTitle?: string;
|
|
18
18
|
noDataSubtitle?: string;
|
|
19
|
+
withSettingsHeader?: boolean;
|
|
19
20
|
}>, {
|
|
20
21
|
chartType: ChartType;
|
|
21
22
|
dataSets: () => any[];
|
|
@@ -33,6 +34,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
33
34
|
noDataIcon: string;
|
|
34
35
|
noDataTitle: string;
|
|
35
36
|
noDataSubtitle: string;
|
|
37
|
+
withSettingsHeader: boolean;
|
|
36
38
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
39
|
"update:chartType": (chartType: ChartType) => void;
|
|
38
40
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
@@ -53,6 +55,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
53
55
|
noDataIcon?: string;
|
|
54
56
|
noDataTitle?: string;
|
|
55
57
|
noDataSubtitle?: string;
|
|
58
|
+
withSettingsHeader?: boolean;
|
|
56
59
|
}>, {
|
|
57
60
|
chartType: ChartType;
|
|
58
61
|
dataSets: () => any[];
|
|
@@ -70,6 +73,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
70
73
|
noDataIcon: string;
|
|
71
74
|
noDataTitle: string;
|
|
72
75
|
noDataSubtitle: string;
|
|
76
|
+
withSettingsHeader: boolean;
|
|
73
77
|
}>>> & {
|
|
74
78
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
75
79
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
@@ -83,13 +87,17 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
83
87
|
minVisible: number;
|
|
84
88
|
maxVisible: number;
|
|
85
89
|
chartType: ChartType;
|
|
90
|
+
withSettingsHeader: boolean;
|
|
86
91
|
subheader: string;
|
|
87
92
|
dataSets: ChartDataSet[];
|
|
88
|
-
tickCount: number;
|
|
89
93
|
hideLegend: boolean;
|
|
94
|
+
tickCount: number;
|
|
90
95
|
noDataIcon: string;
|
|
91
96
|
noDataTitle: string;
|
|
92
97
|
noDataSubtitle: string;
|
|
98
|
+
}>, {
|
|
99
|
+
metric?(_: {}): any;
|
|
100
|
+
breakdowns?(_: {}): any;
|
|
93
101
|
}>;
|
|
94
102
|
export default _default;
|
|
95
103
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -109,3 +117,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
109
117
|
type __VLS_Prettify<T> = {
|
|
110
118
|
[K in keyof T]: T[K];
|
|
111
119
|
} & {};
|
|
120
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
121
|
+
new (): {
|
|
122
|
+
$slots: S;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Chart.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const a = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_df85e0af_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-df85e0af"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import { Chart as
|
|
4
|
-
import { HoverVerticalLine as
|
|
5
|
-
import { formatValue as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_df85e0af_lang.css"; import { defineComponent as X, ref as g, computed as i, onMounted as j, watch as C, nextTick as q, openBlock as d, createElementBlock as k, Fragment as R, createBlock as h, unref as c, isRef as V, withCtx as O, renderSlot as D, createCommentVNode as v, createElementVNode as f, createVNode as F, normalizeStyle as J } from "vue";
|
|
2
|
+
import { useVModel as Q } from "@vueuse/core";
|
|
3
|
+
import { Chart as N, ArcElement as Y, LineElement as ee, BarElement as te, PointElement as ae, LineController as oe, BarController as re, PieController as ie, ScatterController as le, CategoryScale as ne, LinearScale as se, Filler as de, Tooltip as ce } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as ue } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as H, calcStepSize as fe } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as pe, DEFAULT_MIN_VISIBLE as me, DEFAULT_MAX_VISIBLE as he, COLOR_PALETTE as ve, POINT_BORDER_COLOR as ye, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as M } from "./consts.js";
|
|
7
7
|
import { ChartType as n } from "./types.js";
|
|
8
|
-
import { useTooltipPosition as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { hexColorToRgba as
|
|
8
|
+
import { useTooltipPosition as be } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import ge from "./ChartTooltip.vue.js";
|
|
10
|
+
import Ce from "./ChartLegend.vue.js";
|
|
11
|
+
import ke from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as Se } from "../../utils/color.js";
|
|
13
13
|
import { useChartValues as Te } from "./composables/useChartValues.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
14
|
+
import Le from "./ChartLoader.vue.js";
|
|
15
|
+
import xe from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Be from "./SettingsHeader.vue.js";
|
|
17
|
+
const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "chart-sidebar"
|
|
19
|
-
},
|
|
20
|
+
}, Xe = /* @__PURE__ */ X({
|
|
20
21
|
__name: "Chart",
|
|
21
22
|
props: {
|
|
22
23
|
dataSets: { default: () => [] },
|
|
@@ -25,23 +26,22 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
25
26
|
parsing: { default: void 0 },
|
|
26
27
|
xAxisFormat: { default: "string" },
|
|
27
28
|
yAxisFormat: { default: "number" },
|
|
28
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: pe },
|
|
29
30
|
header: { default: "" },
|
|
30
31
|
subheader: { default: "" },
|
|
31
32
|
hideLegend: { type: Boolean, default: !1 },
|
|
32
|
-
minVisible: { default:
|
|
33
|
-
maxVisible: { default:
|
|
33
|
+
minVisible: { default: me },
|
|
34
|
+
maxVisible: { default: he },
|
|
34
35
|
loading: { type: Boolean, default: !1 },
|
|
35
36
|
noDataIcon: { default: "file-x" },
|
|
36
37
|
noDataTitle: { default: "No data to display" },
|
|
37
|
-
noDataSubtitle: { default: "Search again with different filters" }
|
|
38
|
+
noDataSubtitle: { default: "Search again with different filters" },
|
|
39
|
+
withSettingsHeader: { type: Boolean, default: !0 }
|
|
38
40
|
},
|
|
39
41
|
emits: ["update:chartType", "update:visibleIds"],
|
|
40
|
-
setup(a, { emit:
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
J,
|
|
44
|
-
Q,
|
|
42
|
+
setup(a, { emit: S }) {
|
|
43
|
+
const t = a;
|
|
44
|
+
N.register(
|
|
45
45
|
Y,
|
|
46
46
|
ee,
|
|
47
47
|
te,
|
|
@@ -52,50 +52,52 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
52
52
|
le,
|
|
53
53
|
ne,
|
|
54
54
|
se,
|
|
55
|
-
de
|
|
55
|
+
de,
|
|
56
|
+
ce,
|
|
57
|
+
ue
|
|
56
58
|
);
|
|
57
|
-
const
|
|
59
|
+
const u = Q(t, "chartType", S), p = g(null);
|
|
58
60
|
let s = null;
|
|
59
|
-
const
|
|
60
|
-
p.value && (s && s.destroy(), s = new
|
|
61
|
-
},
|
|
62
|
-
s && (s.data.datasets =
|
|
61
|
+
const T = i(() => t.dataSets.length === 0), L = i(() => !t.loading && !T.value), y = () => {
|
|
62
|
+
p.value && (s && s.destroy(), s = new N(p.value, B.value));
|
|
63
|
+
}, z = () => {
|
|
64
|
+
s && (s.data.datasets = b.value, s.options = B.value.options, s.update());
|
|
63
65
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
const
|
|
68
|
-
() =>
|
|
69
|
-
),
|
|
70
|
-
() =>
|
|
71
|
-
),
|
|
72
|
-
() =>
|
|
73
|
-
),
|
|
74
|
-
const
|
|
66
|
+
j(y), C(() => t.chartType, y), C(L, async (e) => {
|
|
67
|
+
e && (await q(), y());
|
|
68
|
+
}), C([() => t.visibleIds, () => t.dataSets], z);
|
|
69
|
+
const m = i(
|
|
70
|
+
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
71
|
+
), _ = i(
|
|
72
|
+
() => t.chartType === n.Line || t.chartType === n.StackedLine
|
|
73
|
+
), x = i(
|
|
74
|
+
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
75
|
+
), b = i(() => x.value.map((e, o) => {
|
|
76
|
+
const r = e.color || ve[o] || "#000000";
|
|
75
77
|
return {
|
|
76
|
-
...
|
|
77
|
-
fill:
|
|
78
|
-
backgroundColor:
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
...e,
|
|
79
|
+
fill: m.value ? "start" : void 0,
|
|
80
|
+
backgroundColor: Se(
|
|
81
|
+
r,
|
|
82
|
+
t.chartType === n.StackedLine ? 10 : 70
|
|
81
83
|
),
|
|
82
|
-
borderColor:
|
|
83
|
-
pointBackgroundColor:
|
|
84
|
-
pointHoverBorderColor:
|
|
84
|
+
borderColor: r,
|
|
85
|
+
pointBackgroundColor: r,
|
|
86
|
+
pointHoverBorderColor: r,
|
|
85
87
|
maxBarThickness: 50,
|
|
86
88
|
clip: 5
|
|
87
89
|
// draw a bit outside the chart area
|
|
88
90
|
};
|
|
89
|
-
})),
|
|
91
|
+
})), B = i(
|
|
90
92
|
() => ({
|
|
91
|
-
type:
|
|
93
|
+
type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
|
|
92
94
|
// Chart Data
|
|
93
95
|
data: {
|
|
94
|
-
datasets:
|
|
96
|
+
datasets: b.value
|
|
95
97
|
},
|
|
96
98
|
// Chart Options
|
|
97
99
|
options: {
|
|
98
|
-
parsing:
|
|
100
|
+
parsing: t.parsing,
|
|
99
101
|
interaction: {
|
|
100
102
|
intersect: !1,
|
|
101
103
|
mode: "index",
|
|
@@ -105,17 +107,17 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
105
107
|
plugins: {
|
|
106
108
|
legend: { display: !1 },
|
|
107
109
|
title: { display: !1 },
|
|
108
|
-
hoverVerticalLine:
|
|
110
|
+
hoverVerticalLine: _.value,
|
|
109
111
|
// tooltip
|
|
110
112
|
tooltip: {
|
|
111
113
|
enabled: !1,
|
|
112
114
|
position: "average",
|
|
113
|
-
external: ({ tooltip:
|
|
114
|
-
l.value = { ...
|
|
115
|
+
external: ({ tooltip: e }) => {
|
|
116
|
+
l.value = { ...e };
|
|
115
117
|
},
|
|
116
118
|
callbacks: {
|
|
117
|
-
footer: (
|
|
118
|
-
const o =
|
|
119
|
+
footer: (e) => {
|
|
120
|
+
const o = e.reduce((r, G) => r + (G.parsed.y || 0), 0);
|
|
119
121
|
return ["Total", String(o)];
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -143,7 +145,7 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
143
145
|
borderWidth: 0,
|
|
144
146
|
hoverRadius: 4,
|
|
145
147
|
hoverBorderWidth: 2,
|
|
146
|
-
pointHoverBackgroundColor:
|
|
148
|
+
pointHoverBackgroundColor: ye
|
|
147
149
|
},
|
|
148
150
|
bar: {
|
|
149
151
|
borderRadius: 4
|
|
@@ -154,23 +156,23 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
154
156
|
x: {
|
|
155
157
|
beginAtZero: !0,
|
|
156
158
|
border: { display: !1 },
|
|
157
|
-
stacked:
|
|
159
|
+
stacked: m.value,
|
|
158
160
|
// stack on top of each other
|
|
159
161
|
// ticks
|
|
160
162
|
ticks: {
|
|
161
|
-
color:
|
|
162
|
-
font:
|
|
163
|
+
color: P,
|
|
164
|
+
font: U,
|
|
163
165
|
padding: 4,
|
|
164
|
-
callback: function(
|
|
165
|
-
return
|
|
166
|
-
this.getLabelForValue(
|
|
167
|
-
|
|
166
|
+
callback: function(e) {
|
|
167
|
+
return H(
|
|
168
|
+
this.getLabelForValue(e),
|
|
169
|
+
t.xAxisFormat
|
|
168
170
|
);
|
|
169
171
|
}
|
|
170
172
|
},
|
|
171
173
|
// grid lines
|
|
172
174
|
grid: {
|
|
173
|
-
color:
|
|
175
|
+
color: M,
|
|
174
176
|
drawOnChartArea: !1,
|
|
175
177
|
drawTicks: !0,
|
|
176
178
|
drawBorder: !1,
|
|
@@ -182,21 +184,21 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
182
184
|
beginAtZero: !0,
|
|
183
185
|
border: { display: !1 },
|
|
184
186
|
// hide left borderline
|
|
185
|
-
stacked:
|
|
187
|
+
stacked: m.value,
|
|
186
188
|
// stack on top of each other
|
|
187
189
|
// ticks
|
|
188
190
|
ticks: {
|
|
189
|
-
color:
|
|
190
|
-
font:
|
|
191
|
+
color: P,
|
|
192
|
+
font: U,
|
|
191
193
|
padding: 8,
|
|
192
|
-
stepSize:
|
|
193
|
-
min:
|
|
194
|
-
max:
|
|
195
|
-
callback: (
|
|
194
|
+
stepSize: E.value,
|
|
195
|
+
min: A.value,
|
|
196
|
+
max: E.value * t.tickCount,
|
|
197
|
+
callback: (e) => H(e, t.yAxisFormat)
|
|
196
198
|
},
|
|
197
199
|
// grid lines
|
|
198
200
|
grid: {
|
|
199
|
-
color:
|
|
201
|
+
color: M,
|
|
200
202
|
drawOnChartArea: !0,
|
|
201
203
|
drawTicks: !1
|
|
202
204
|
}
|
|
@@ -204,78 +206,95 @@ const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = {
|
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
})
|
|
207
|
-
),
|
|
208
|
-
() =>
|
|
209
|
-
),
|
|
210
|
-
id:
|
|
211
|
-
label:
|
|
212
|
-
color:
|
|
213
|
-
}))),
|
|
209
|
+
), $ = i(
|
|
210
|
+
() => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
|
|
211
|
+
), K = i(() => t.dataSets.map((e) => ({
|
|
212
|
+
id: e.id,
|
|
213
|
+
label: e.label,
|
|
214
|
+
color: $.value[e.id] || null
|
|
215
|
+
}))), I = g(null), l = g(null), { position: w } = be(
|
|
214
216
|
p,
|
|
215
|
-
|
|
217
|
+
I,
|
|
216
218
|
l
|
|
217
|
-
),
|
|
218
|
-
left: `${
|
|
219
|
-
top: `${
|
|
219
|
+
), W = i(() => ({
|
|
220
|
+
left: `${w.value.left}px`,
|
|
221
|
+
top: `${w.value.top}px`,
|
|
220
222
|
opacity: l.value?.opacity || 0
|
|
221
|
-
})), { minValue:
|
|
222
|
-
parsingConfig:
|
|
223
|
-
dataSets:
|
|
224
|
-
isStacked:
|
|
225
|
-
}),
|
|
226
|
-
() =>
|
|
223
|
+
})), { minValue: A, maxValue: Z } = Te({
|
|
224
|
+
parsingConfig: t.parsing,
|
|
225
|
+
dataSets: x,
|
|
226
|
+
isStacked: m
|
|
227
|
+
}), E = i(
|
|
228
|
+
() => fe(A.value, Z.value, t.tickCount)
|
|
227
229
|
);
|
|
228
|
-
return (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
u("canvas", {
|
|
241
|
-
ref_key: "chartRef",
|
|
242
|
-
ref: p,
|
|
243
|
-
class: "chart__canvas"
|
|
244
|
-
}, null, 512),
|
|
245
|
-
u("div", {
|
|
246
|
-
ref_key: "tooltipRef",
|
|
247
|
-
ref: B,
|
|
248
|
-
class: "chart__tooltip",
|
|
249
|
-
style: j(c(z))
|
|
250
|
-
}, [
|
|
251
|
-
l.value ? (d(), g(ye, {
|
|
252
|
-
key: 0,
|
|
253
|
-
title: String(l.value.title),
|
|
254
|
-
"data-points": l.value.dataPoints,
|
|
255
|
-
"x-axis-format": a.xAxisFormat,
|
|
256
|
-
"y-axis-format": a.yAxisFormat,
|
|
257
|
-
"total-label": l.value.footer[0],
|
|
258
|
-
"total-value": Number(l.value.footer[1])
|
|
259
|
-
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : T("", !0)
|
|
260
|
-
], 4)
|
|
261
|
-
])
|
|
230
|
+
return (e, o) => (d(), k(R, null, [
|
|
231
|
+
a.withSettingsHeader ? (d(), h(Be, {
|
|
232
|
+
key: 0,
|
|
233
|
+
"chart-type": c(u),
|
|
234
|
+
"onUpdate:chart-type": o[0] || (o[0] = (r) => V(u) ? u.value = r : null),
|
|
235
|
+
"hide-legend": a.hideLegend
|
|
236
|
+
}, {
|
|
237
|
+
metric: O(() => [
|
|
238
|
+
D(e.$slots, "metric", {}, void 0, !0)
|
|
239
|
+
]),
|
|
240
|
+
breakdowns: O(() => [
|
|
241
|
+
D(e.$slots, "breakdowns", {}, void 0, !0)
|
|
262
242
|
]),
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
243
|
+
_: 3
|
|
244
|
+
}, 8, ["chart-type", "hide-legend"])) : v("", !0),
|
|
245
|
+
f("div", Ie, [
|
|
246
|
+
c(L) ? (d(), k(R, { key: 0 }, [
|
|
247
|
+
f("section", we, [
|
|
248
|
+
f("div", Ae, [
|
|
249
|
+
F(ke, {
|
|
250
|
+
"chart-type": c(u),
|
|
251
|
+
"onUpdate:chart-type": o[1] || (o[1] = (r) => V(u) ? u.value = r : null),
|
|
252
|
+
"with-settings-header": a.withSettingsHeader,
|
|
253
|
+
header: a.header,
|
|
254
|
+
subheader: a.subheader
|
|
255
|
+
}, null, 8, ["chart-type", "with-settings-header", "header", "subheader"])
|
|
256
|
+
]),
|
|
257
|
+
f("div", Ee, [
|
|
258
|
+
f("canvas", {
|
|
259
|
+
ref_key: "chartRef",
|
|
260
|
+
ref: p,
|
|
261
|
+
class: "chart__canvas"
|
|
262
|
+
}, null, 512),
|
|
263
|
+
f("div", {
|
|
264
|
+
ref_key: "tooltipRef",
|
|
265
|
+
ref: I,
|
|
266
|
+
class: "chart__tooltip",
|
|
267
|
+
style: J(c(W))
|
|
268
|
+
}, [
|
|
269
|
+
l.value ? (d(), h(ge, {
|
|
270
|
+
key: 0,
|
|
271
|
+
title: String(l.value.title),
|
|
272
|
+
"data-points": l.value.dataPoints,
|
|
273
|
+
"x-axis-format": a.xAxisFormat,
|
|
274
|
+
"y-axis-format": a.yAxisFormat,
|
|
275
|
+
"total-label": l.value.footer[0],
|
|
276
|
+
"total-value": Number(l.value.footer[1])
|
|
277
|
+
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
|
|
278
|
+
], 4)
|
|
279
|
+
])
|
|
280
|
+
]),
|
|
281
|
+
a.hideLegend ? v("", !0) : (d(), k("section", Re, [
|
|
282
|
+
F(Ce, {
|
|
283
|
+
items: c(K),
|
|
284
|
+
"visible-ids": a.visibleIds,
|
|
285
|
+
"onUpdate:visibleIds": o[2] || (o[2] = (r) => S("update:visibleIds", r))
|
|
286
|
+
}, null, 8, ["items", "visible-ids"])
|
|
287
|
+
]))
|
|
288
|
+
], 64)) : a.loading ? (d(), h(Le, { key: 1 })) : c(T) ? (d(), h(c(xe), {
|
|
289
|
+
key: 2,
|
|
290
|
+
title: a.noDataTitle,
|
|
291
|
+
subtitle: a.noDataSubtitle,
|
|
292
|
+
"icon-name": a.noDataIcon
|
|
293
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : v("", !0)
|
|
294
|
+
])
|
|
295
|
+
], 64));
|
|
277
296
|
}
|
|
278
297
|
});
|
|
279
298
|
export {
|
|
280
|
-
|
|
299
|
+
Xe as default
|
|
281
300
|
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { ChartType } from '@/components/chart/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
chartType: ChartType;
|
|
4
|
+
withSettingsHeader: boolean;
|
|
4
5
|
header?: string;
|
|
5
6
|
subheader?: string;
|
|
6
7
|
}>, {
|
|
7
8
|
chartType: ChartType;
|
|
9
|
+
withSettingsHeader: boolean;
|
|
8
10
|
header: string;
|
|
9
11
|
subheader: string;
|
|
10
12
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
13
|
"update:chartType": (type: ChartType) => void;
|
|
12
14
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
15
|
chartType: ChartType;
|
|
16
|
+
withSettingsHeader: boolean;
|
|
14
17
|
header?: string;
|
|
15
18
|
subheader?: string;
|
|
16
19
|
}>, {
|
|
17
20
|
chartType: ChartType;
|
|
21
|
+
withSettingsHeader: boolean;
|
|
18
22
|
header: string;
|
|
19
23
|
subheader: string;
|
|
20
24
|
}>>> & {
|
|
@@ -22,6 +26,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
22
26
|
}, {
|
|
23
27
|
header: string;
|
|
24
28
|
chartType: ChartType;
|
|
29
|
+
withSettingsHeader: boolean;
|
|
25
30
|
subheader: string;
|
|
26
31
|
}>;
|
|
27
32
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartHeader.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartHeader.
|
|
4
|
-
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_2e3de9c5_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-2e3de9c5"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|