@ironsource/shared-ui 2.1.12-rc.15 → 2.1.12-rc.16
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_4e9ce62f_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_64dcfb5d_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_81cdfd5e_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_40d98a66_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +7 -2
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +64 -59
- package/components/chart/ChartLegend.vue.d.ts +7 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +75 -68
- package/components/chart/ChartPlane.vue.d.ts +12 -2
- package/components/chart/ChartPlane.vue.js +5 -5
- package/components/chart/ChartPlane.vue2.js +182 -156
- package/components/chart/ChartStoryArgs.d.ts +6 -0
- package/components/chart/ChartTooltip.vue.d.ts +6 -1
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +48 -58
- package/components/chart/components/TooltipHeader.vue.d.ts +45 -0
- package/components/chart/components/TooltipHeader.vue.js +7 -0
- package/components/chart/components/TooltipHeader.vue2.js +59 -0
- package/components/chart/consts.d.ts +12 -6
- package/components/chart/consts.js +31 -21
- package/components/chart/index.d.ts +54 -35
- package/components/chart/mockData.d.ts +11 -0
- package/components/chart/types.d.ts +16 -5
- package/components/chart/utils/highlightUtils.d.ts +3 -0
- package/components/chart/utils/highlightUtils.js +18 -0
- package/components/chart/utils/utils.d.ts +2 -1
- package/components/chart/utils/utils.js +23 -8
- package/components/dropdown/v4/DropdownV4.vue.d.ts +5 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +102 -97
- package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +83 -64
- package/components/dropdown/v4/index.d.ts +40 -2
- package/composables/useFormValidation.js +21 -19
- 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 +80 -4
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/text.d.ts +3 -0
- package/utils/text.js +24 -5
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +4 -0
- package/Chart.vue_vue_type_style_index_0_scoped_de950ffe_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_ae87f435_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_25d0e129_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_4de6dfb8_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_8ba7e191_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-4e9ce62f]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;border-radius:0 0 6px 6px;width:100%}.chart-planes[data-v-4e9ce62f]{width:100%;height:100%;overflow-y:auto}.chart-planes.with-legend[data-v-4e9ce62f]{width:calc(100% - 221px)}.chart-planes .extra-chart-plane[data-v-4e9ce62f]{border-top:1px solid var(--common-divider)}.chart-sidebar[data-v-4e9ce62f]{border-left:1px solid var(--common-divider)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.disabled-tooltip[data-v-fd9e4ea2],.disabled-tooltip[data-v-fd9e4ea2] .container{width:100%}.chart-legend[data-v-fd9e4ea2]{display:flex;flex-direction:column;width:240px;height:100%;padding:0 8px 8px 12px}.search-box[data-v-fd9e4ea2]{padding:12px 0 4px;display:flex;align-items:center;gap:4px}.legend[data-v-fd9e4ea2]{overflow-y:auto;color:var(--text-primary);height:100%;overflow-x:hidden}.legend__list[data-v-fd9e4ea2]{list-style:none;padding:0}.legend__list>li[data-v-fd9e4ea2]{display:flex;align-items:center;gap:8px;padding:6px 8px}.legend__list>li[data-v-fd9e4ea2]:hover{background-color:var(--action-hover);border-radius:8px;cursor:pointer}.legend__list>li.disabled-item[data-v-fd9e4ea2]{cursor:not-allowed!important;opacity:.5;background:var(--background-paper)}.legend__list>li.empty-list[data-v-fd9e4ea2]{display:flex;align-items:center;justify-content:flex-start;height:32px;color:var(--text-disabled)}.legend__list>li.empty-list[data-v-fd9e4ea2]:hover{background-color:transparent;cursor:default}.legend__list>li .item-wrapper[data-v-fd9e4ea2]{display:flex;align-items:center;gap:8px;width:100%}.legend__list>li .item-wrapper .legend-label[data-v-fd9e4ea2]{width:80%}.legend__list>li .item-wrapper .icon-color[data-v-fd9e4ea2]{color:var(--action-active)}.legend__list>li .item-wrapper .label-container[data-v-fd9e4ea2]{display:flex;flex-direction:column;width:100%}.legend__list>li .item-wrapper .label-container .legend-caption[data-v-fd9e4ea2]{display:flex;color:var(--text-secondary)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-plane[data-v-64dcfb5d]{--headerHeight: var(--2e8f327a);width:100%}.chart-plane[data-v-64dcfb5d],.chart-loading[data-v-64dcfb5d],.chart-empty[data-v-64dcfb5d]{height:var(--f7b2eb36)}.header-wrapper[data-v-64dcfb5d]{height:var(--headerHeight)}.chart[data-v-64dcfb5d]{width:100%;height:calc(100% - var(--headerHeight));position:relative}.chart__canvas[data-v-64dcfb5d]{width:100%;height:100%}.chart__tooltip[data-v-64dcfb5d]{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-81cdfd5e]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);width:280px;padding:calc(var(--spacing-100) - 1px)}.color-box[data-v-81cdfd5e]{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-81cdfd5e]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-81cdfd5e]{list-style:none;margin:0;padding:0}.list__item[data-v-81cdfd5e]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-81cdfd5e]:last-child{margin-bottom:0}.platform-icon[data-v-81cdfd5e]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-81cdfd5e]{display:flex;width:200px;flex-grow:1}.truncated-label[data-v-81cdfd5e]{max-width:90%}.tooltip-footer[data-v-81cdfd5e]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-81cdfd5e]{flex-grow:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.v-enter-active[data-v-08cb822e],.v-leave-active[data-v-08cb822e]{transition:opacity .25s ease}ol[data-v-08cb822e],ul[data-v-08cb822e],menu[data-v-08cb822e]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-08cb822e],.dropdown.full-width .button__container[data-v-08cb822e]{width:100%}.dropdown-list-wrapper[data-v-08cb822e]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-08cb822e]{padding:.5rem}.list-container--multi[data-v-08cb822e]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-08cb822e]{display:flex;gap:4px;padding-bottom:.25rem}.inline-search .inline-search-wrapper .search-container[data-v-08cb822e]{width:100%}.inline-search .list-container[data-v-08cb822e]{padding-top:0}.no-result-container[data-v-08cb822e]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-08cb822e]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-08cb822e]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-08cb822e]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list--with-conditions[data-v-08cb822e]{min-height:0;margin-bottom:0}.image-slot[data-v-08cb822e]{margin-right:.5rem}.actions-wrapper[data-v-08cb822e]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between;margin-top:.25rem}.apply-button[data-v-08cb822e]{margin-left:.5rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.label[data-v-9cdf3a94]{color:#41454d}.item-container[data-v-9cdf3a94]{width:100%;display:flex;align-items:center;cursor:pointer;border-radius:var(--border-radius-lg);margin-bottom:.25rem;color:var(--text-primary);padding:6px 8px}.item-container--disabled[data-v-9cdf3a94]{cursor:initial;color:var(--text-disabled)}.item-container[data-v-9cdf3a94]:hover:not(.item-container--disabled){background-color:var(--action-hover)}.item-container--active[data-v-9cdf3a94],.item-container[data-v-9cdf3a94]:active{background-color:var(--action-selected)}.item-container:not(.item-container--multi).item-container--selected[data-v-9cdf3a94]{background-color:var(--action-selected)}.subtitle[data-v-9cdf3a94]{color:#7b838c;line-height:1rem}.clear-button[data-v-9cdf3a94]{display:flex;padding:0 4px;color:#7b838c;align-items:center;height:auto;background-image:none;min-width:auto;border:none;background-color:transparent}.clear-button[data-v-9cdf3a94]:hover{color:#3083ff}.item[data-v-9cdf3a94]{width:100%;display:flex;gap:.5rem;align-items:center}.item--with-icon[data-v-9cdf3a94],.item--multi[data-v-9cdf3a94]{display:flex;flex-direction:row;align-items:center;justify-content:start}.item .image[data-v-9cdf3a94]{width:20px;height:20px;flex:none}.item .image img[data-v-9cdf3a94]{width:20px;height:20px;border-radius:4px}.item .flag[data-v-9cdf3a94]{width:16px;height:16px}.item .flag img[data-v-9cdf3a94]{width:16px;height:16px;border-radius:50%}.item .start-icon[data-v-9cdf3a94],.item .end-icon[data-v-9cdf3a94]{display:flex;color:var(--action-active)}.item .end-text-icon[data-v-9cdf3a94]{display:inline-flex}.item .option-text[data-v-9cdf3a94]{line-height:1.1875rem}.text-container[data-v-9cdf3a94]{width:100%;text-overflow:ellipsis;overflow:hidden}.v4-tooltip.tooltip-option[data-v-9cdf3a94]{display:block}.tooltip-option[data-v-9cdf3a94] .container{width:100%}.app-trigger--icon[data-v-9cdf3a94]{color:var(--action-active);transform:rotate(-90deg);transition:transform .2s}.app-trigger--icon.expanded[data-v-9cdf3a94]{transform:rotate(0)}.option-warning[data-v-9cdf3a94]{display:flex}.option-warning__icon[data-v-9cdf3a94]{color:var(--warning-main)}.option-content[data-v-9cdf3a94]{display:flex}.option-content[data-v-9cdf3a94]:not(.option-content-vertical){gap:.5rem;align-items:center}.option-content-horizontal[data-v-9cdf3a94]{justify-content:space-between;gap:.5rem}.option-content-vertical[data-v-9cdf3a94]{flex-direction:column}.option-text .main-text[data-v-9cdf3a94]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left}.option-text .main-text .conditional-option-label[data-v-9cdf3a94]{color:var(--text-secondary);display:inline-flex}.option-text .main-text .conditional-option-value[data-v-9cdf3a94]{margin-left:4px;display:inline-flex;color:var(--primary-main)}.option-text .caption-text[data-v-9cdf3a94]{color:var(--text-secondary)}.multiline-tooltip[data-v-9cdf3a94]{display:flex;flex-direction:column}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tooltip-title-wrapper[data-v-40d98a66]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .main-title[data-v-40d98a66]{display:flex;align-items:center;gap:.25rem}.tooltip-title-wrapper .title-text[data-v-40d98a66]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tooltip-title-wrapper .title-image[data-v-40d98a66]{width:20px;height:20px;border-radius:4px}.tooltip-title-wrapper .tooltip-sub-title[data-v-40d98a66]{color:var(--text-secondary)}.tooltip-title-wrapper .platform-icon[data-v-40d98a66]{color:var(--action-active)}
|
|
@@ -8,6 +8,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
8
8
|
xAxisFormat?: ValueFormat;
|
|
9
9
|
yAxisFormat?: ValueFormat;
|
|
10
10
|
tickCount?: number;
|
|
11
|
+
truncateTickLabels?: boolean;
|
|
11
12
|
loading?: boolean;
|
|
12
13
|
withAnimation?: boolean;
|
|
13
14
|
totalsChart?: boolean;
|
|
@@ -47,6 +48,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
47
48
|
yAxisFormat: string;
|
|
48
49
|
parsing: any;
|
|
49
50
|
tickCount: number;
|
|
51
|
+
truncateTickLabels: boolean;
|
|
50
52
|
loading: boolean;
|
|
51
53
|
withAnimation: boolean;
|
|
52
54
|
totalsChart: boolean;
|
|
@@ -83,6 +85,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
83
85
|
xAxisFormat?: ValueFormat;
|
|
84
86
|
yAxisFormat?: ValueFormat;
|
|
85
87
|
tickCount?: number;
|
|
88
|
+
truncateTickLabels?: boolean;
|
|
86
89
|
loading?: boolean;
|
|
87
90
|
withAnimation?: boolean;
|
|
88
91
|
totalsChart?: boolean;
|
|
@@ -122,6 +125,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
122
125
|
yAxisFormat: string;
|
|
123
126
|
parsing: any;
|
|
124
127
|
tickCount: number;
|
|
128
|
+
truncateTickLabels: boolean;
|
|
125
129
|
loading: boolean;
|
|
126
130
|
withAnimation: boolean;
|
|
127
131
|
totalsChart: boolean;
|
|
@@ -163,8 +167,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
163
167
|
chartType: ChartType;
|
|
164
168
|
hideLegend: boolean;
|
|
165
169
|
xAxisFormat: ValueFormat;
|
|
166
|
-
|
|
170
|
+
totalsChart: boolean;
|
|
167
171
|
parsing: ChartParsingConfig;
|
|
172
|
+
yAxisFormat: ValueFormat;
|
|
168
173
|
dataSets: ChartDataSet[];
|
|
169
174
|
trendTooltip: any;
|
|
170
175
|
subheader: string;
|
|
@@ -172,13 +177,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
172
177
|
trendValue: string | number;
|
|
173
178
|
trendDirection: "up" | "down";
|
|
174
179
|
tickCount: number;
|
|
180
|
+
truncateTickLabels: boolean;
|
|
175
181
|
noDataIcon: string;
|
|
176
182
|
noDataTitle: string;
|
|
177
183
|
noDataSubtitle: string;
|
|
178
184
|
withAnimation: boolean;
|
|
179
185
|
tooltipTotalType: TotalType;
|
|
180
186
|
tooltipTotalCalcFn: (values: number[], totalType: TotalType) => number;
|
|
181
|
-
totalsChart: boolean;
|
|
182
187
|
fullHeight: boolean;
|
|
183
188
|
withSettingsHeader: boolean;
|
|
184
189
|
extraCharts: Record<string, unknown>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./Chart.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4e9ce62f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useColorsMap as
|
|
7
|
-
import { DEFAULT_TICK_COUNT as
|
|
8
|
-
import { ChartType as
|
|
9
|
-
import { useChartHeight as
|
|
10
|
-
import { TotalType as
|
|
11
|
-
const
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_4e9ce62f_lang.css"; import { defineComponent as E, ref as N, computed as n, openBlock as s, createElementBlock as f, Fragment as x, createBlock as I, unref as l, isRef as y, withCtx as d, renderSlot as u, createCommentVNode as L, createElementVNode as k, mergeProps as g, normalizeClass as M, createVNode as D, createSlots as P, renderList as O } from "vue";
|
|
2
|
+
import { useVModel as F } from "@vueuse/core";
|
|
3
|
+
import $ from "./ChartLegend.vue.js";
|
|
4
|
+
import K from "./SettingsHeader.vue.js";
|
|
5
|
+
import w from "./ChartPlane.vue.js";
|
|
6
|
+
import { useColorsMap as z } from "./composables/useColorsMap.js";
|
|
7
|
+
import { DEFAULT_TICK_COUNT as R, DEFAULT_MIN_VISIBLE as X, DEFAULT_MAX_VISIBLE as j } from "./consts.js";
|
|
8
|
+
import { ChartType as q } from "./types.js";
|
|
9
|
+
import { useChartHeight as G } from "./composables/useChartHeight.js";
|
|
10
|
+
import { TotalType as J, calculateTotal as Q } from "../../utils/totals.js";
|
|
11
|
+
const W = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "chart-sidebar"
|
|
14
|
-
},
|
|
14
|
+
}, nt = /* @__PURE__ */ E({
|
|
15
15
|
__name: "Chart",
|
|
16
16
|
props: {
|
|
17
17
|
dataSets: { default: () => [] },
|
|
18
18
|
visibleIds: { default: () => [] },
|
|
19
|
-
chartType: { default:
|
|
19
|
+
chartType: { default: q.Line },
|
|
20
20
|
parsing: { default: void 0 },
|
|
21
21
|
xAxisFormat: { default: "string" },
|
|
22
22
|
yAxisFormat: { default: "number" },
|
|
23
|
-
tickCount: { default:
|
|
23
|
+
tickCount: { default: R },
|
|
24
|
+
truncateTickLabels: { type: Boolean, default: !0 },
|
|
24
25
|
loading: { type: Boolean, default: !1 },
|
|
25
26
|
withAnimation: { type: Boolean, default: !0 },
|
|
26
27
|
totalsChart: { type: Boolean, default: !1 },
|
|
27
|
-
tooltipTotalType: { default:
|
|
28
|
-
tooltipTotalCalcFn: { type: Function, default:
|
|
28
|
+
tooltipTotalType: { default: J.Total },
|
|
29
|
+
tooltipTotalCalcFn: { type: Function, default: Q },
|
|
29
30
|
header: { default: "" },
|
|
30
31
|
subheader: { default: "" },
|
|
31
32
|
subheaderTooltip: { default: null },
|
|
@@ -36,8 +37,8 @@ const J = {
|
|
|
36
37
|
noDataTitle: { default: "No data to display" },
|
|
37
38
|
noDataSubtitle: { default: "Search again with different filters" },
|
|
38
39
|
hideLegend: { type: Boolean, default: !1 },
|
|
39
|
-
minVisible: { default:
|
|
40
|
-
maxVisible: { default:
|
|
40
|
+
minVisible: { default: X },
|
|
41
|
+
maxVisible: { default: j },
|
|
41
42
|
maxLimitTooltipText: { default: "" },
|
|
42
43
|
sortSelected: { default: null },
|
|
43
44
|
sortOptions: { default: () => [] },
|
|
@@ -47,14 +48,15 @@ const J = {
|
|
|
47
48
|
extraCharts: { default: () => [] }
|
|
48
49
|
},
|
|
49
50
|
emits: ["update:chartType", "update:visibleIds", "update:sortSelected"],
|
|
50
|
-
setup(
|
|
51
|
-
const t =
|
|
51
|
+
setup(i, { emit: p }) {
|
|
52
|
+
const t = i, r = F(t, "chartType", p), c = F(t, "sortSelected", p), h = N(null), T = n(() => ({
|
|
52
53
|
dataSets: t.dataSets,
|
|
53
54
|
visibleIds: t.visibleIds,
|
|
54
55
|
parsing: t.parsing,
|
|
55
56
|
xAxisFormat: t.xAxisFormat,
|
|
56
57
|
yAxisFormat: t.yAxisFormat,
|
|
57
58
|
tickCount: t.tickCount,
|
|
59
|
+
truncateTickLabels: t.truncateTickLabels,
|
|
58
60
|
header: t.header,
|
|
59
61
|
subheader: t.subheader,
|
|
60
62
|
loading: t.loading,
|
|
@@ -63,36 +65,37 @@ const J = {
|
|
|
63
65
|
noDataSubtitle: t.noDataSubtitle,
|
|
64
66
|
withAnimation: t.withAnimation,
|
|
65
67
|
typeSwitcher: !t.withSettingsHeader,
|
|
66
|
-
height:
|
|
68
|
+
height: U.value,
|
|
67
69
|
compactHeader: C.value > 1,
|
|
68
70
|
trendValue: t.trendValue,
|
|
69
71
|
trendDirection: t.trendDirection,
|
|
70
72
|
trendTooltip: t.trendTooltip,
|
|
71
73
|
totalsChart: t.totalsChart,
|
|
72
74
|
subheaderTooltip: t.subheaderTooltip,
|
|
73
|
-
colorsMap:
|
|
75
|
+
colorsMap: m.value,
|
|
74
76
|
tooltipTotalType: t.tooltipTotalType,
|
|
75
|
-
tooltipTotalCalcFn: t.tooltipTotalCalcFn
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
tooltipTotalCalcFn: t.tooltipTotalCalcFn,
|
|
78
|
+
highlightedId: h.value
|
|
79
|
+
})), A = n(() => t.dataSets), b = n(() => t.visibleIds), v = n(() => t.extraCharts.length), C = n(() => 1 + v.value), B = (e) => e === v.value - 1, { colorsMap: m } = z({
|
|
80
|
+
dataSets: A,
|
|
78
81
|
visibleIds: b
|
|
79
|
-
}),
|
|
82
|
+
}), V = n(() => t.dataSets.map((e) => ({
|
|
80
83
|
id: e.id,
|
|
81
84
|
label: e.label,
|
|
82
85
|
caption: e.caption || null,
|
|
83
|
-
color:
|
|
86
|
+
color: m.value[e.id] || null,
|
|
84
87
|
icon: e.icon || null,
|
|
85
88
|
iconType: e.iconType || "branded"
|
|
86
|
-
}))), { containerProps:
|
|
89
|
+
}))), { containerProps: H, eachPlaneHeight: U } = G({
|
|
87
90
|
chartPlanesCount: C,
|
|
88
91
|
useFullHeight: t.fullHeight
|
|
89
92
|
});
|
|
90
|
-
return (e,
|
|
91
|
-
|
|
93
|
+
return (e, o) => (s(), f(x, null, [
|
|
94
|
+
i.withSettingsHeader ? (s(), I(K, {
|
|
92
95
|
key: 0,
|
|
93
|
-
"chart-type":
|
|
94
|
-
"onUpdate:chart-type":
|
|
95
|
-
"hide-legend":
|
|
96
|
+
"chart-type": l(r),
|
|
97
|
+
"onUpdate:chart-type": o[0] || (o[0] = (a) => y(r) ? r.value = a : null),
|
|
98
|
+
"hide-legend": i.hideLegend
|
|
96
99
|
}, {
|
|
97
100
|
"before-chart-type": d(() => [
|
|
98
101
|
u(e.$slots, "before-chart-type", {}, void 0, !0)
|
|
@@ -104,15 +107,15 @@ const J = {
|
|
|
104
107
|
u(e.$slots, "breakdowns", {}, void 0, !0)
|
|
105
108
|
]),
|
|
106
109
|
_: 3
|
|
107
|
-
}, 8, ["chart-type", "hide-legend"])) :
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class:
|
|
110
|
+
}, 8, ["chart-type", "hide-legend"])) : L("", !0),
|
|
111
|
+
k("div", g({ class: "chart-container" }, l(H)), [
|
|
112
|
+
k("section", {
|
|
113
|
+
class: M(["chart-planes", [{ "with-legend": !i.hideLegend }]])
|
|
111
114
|
}, [
|
|
112
|
-
|
|
113
|
-
"chart-type":
|
|
114
|
-
"onUpdate:chart-type":
|
|
115
|
-
},
|
|
115
|
+
D(w, g({
|
|
116
|
+
"chart-type": l(r),
|
|
117
|
+
"onUpdate:chart-type": o[1] || (o[1] = (a) => y(r) ? r.value = a : null)
|
|
118
|
+
}, l(T)), P({ _: 2 }, [
|
|
116
119
|
e.$slots["subheader-tooltip"] ? {
|
|
117
120
|
name: "subheader-tooltip",
|
|
118
121
|
fn: d(() => [
|
|
@@ -121,32 +124,34 @@ const J = {
|
|
|
121
124
|
key: "0"
|
|
122
125
|
} : void 0
|
|
123
126
|
]), 1040, ["chart-type"]),
|
|
124
|
-
(s(!0),
|
|
125
|
-
key:
|
|
127
|
+
(s(!0), f(x, null, O(i.extraCharts, (a, S) => (s(), I(w, g({
|
|
128
|
+
key: S,
|
|
126
129
|
class: "extra-chart-plane"
|
|
127
|
-
}, { ...
|
|
128
|
-
"chart-type":
|
|
129
|
-
"colors-map":
|
|
130
|
+
}, { ...l(T), ...a }, {
|
|
131
|
+
"chart-type": l(r),
|
|
132
|
+
"colors-map": l(m),
|
|
130
133
|
"type-switcher": !1,
|
|
131
|
-
"tooltip-respects-top-edge": !
|
|
134
|
+
"tooltip-respects-top-edge": !B(S)
|
|
132
135
|
}), null, 16, ["chart-type", "colors-map", "tooltip-respects-top-edge"]))), 128))
|
|
133
136
|
], 2),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"sort-selected":
|
|
137
|
-
"onUpdate:sort-selected":
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
|
|
137
|
+
i.hideLegend ? L("", !0) : (s(), f("section", W, [
|
|
138
|
+
D($, {
|
|
139
|
+
"sort-selected": l(c),
|
|
140
|
+
"onUpdate:sort-selected": o[2] || (o[2] = (a) => y(c) ? c.value = a : null),
|
|
141
|
+
"highlighted-id": h.value,
|
|
142
|
+
"onUpdate:highlighted-id": o[3] || (o[3] = (a) => h.value = a),
|
|
143
|
+
items: l(V),
|
|
144
|
+
"visible-ids": l(b),
|
|
145
|
+
"max-limit-tooltip-text": i.maxLimitTooltipText,
|
|
146
|
+
"sort-options": i.sortOptions,
|
|
147
|
+
"sort-option-name-key": i.sortOptionNameKey,
|
|
148
|
+
"onUpdate:visibleIds": o[4] || (o[4] = (a) => p("update:visibleIds", a))
|
|
149
|
+
}, null, 8, ["sort-selected", "highlighted-id", "items", "visible-ids", "max-limit-tooltip-text", "sort-options", "sort-option-name-key"])
|
|
145
150
|
]))
|
|
146
151
|
], 16)
|
|
147
152
|
], 64));
|
|
148
153
|
}
|
|
149
154
|
});
|
|
150
155
|
export {
|
|
151
|
-
|
|
156
|
+
nt as default
|
|
152
157
|
};
|
|
@@ -2,6 +2,7 @@ import { LegendItem } from '@/components/chart/types';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
items: LegendItem[];
|
|
4
4
|
visibleIds: unknown[];
|
|
5
|
+
highlightedId?: string | number;
|
|
5
6
|
minVisible?: number;
|
|
6
7
|
maxVisible?: number;
|
|
7
8
|
maxLimitTooltipText?: string;
|
|
@@ -11,6 +12,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
11
12
|
}>, {
|
|
12
13
|
items: () => any[];
|
|
13
14
|
visibleIds: () => any[];
|
|
15
|
+
highlightedId: any;
|
|
14
16
|
minVisible: number;
|
|
15
17
|
maxVisible: number;
|
|
16
18
|
maxLimitTooltipText: string;
|
|
@@ -20,9 +22,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
20
22
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
23
|
"update:visibleIds": (visibleIds: unknown[]) => void;
|
|
22
24
|
"update:sortSelected": (sortOption: unknown) => void;
|
|
25
|
+
"update:highlightedId": (id: string | number) => void;
|
|
23
26
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
24
27
|
items: LegendItem[];
|
|
25
28
|
visibleIds: unknown[];
|
|
29
|
+
highlightedId?: string | number;
|
|
26
30
|
minVisible?: number;
|
|
27
31
|
maxVisible?: number;
|
|
28
32
|
maxLimitTooltipText?: string;
|
|
@@ -32,6 +36,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
32
36
|
}>, {
|
|
33
37
|
items: () => any[];
|
|
34
38
|
visibleIds: () => any[];
|
|
39
|
+
highlightedId: any;
|
|
35
40
|
minVisible: number;
|
|
36
41
|
maxVisible: number;
|
|
37
42
|
maxLimitTooltipText: string;
|
|
@@ -41,9 +46,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
41
46
|
}>>> & {
|
|
42
47
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
43
48
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
49
|
+
"onUpdate:highlightedId"?: (id: string | number) => any;
|
|
44
50
|
}, {
|
|
45
51
|
items: LegendItem[];
|
|
46
52
|
visibleIds: unknown[];
|
|
53
|
+
highlightedId: string | number;
|
|
47
54
|
minVisible: number;
|
|
48
55
|
maxVisible: number;
|
|
49
56
|
maxLimitTooltipText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartLegend.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartLegend.
|
|
4
|
-
const
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-fd9e4ea2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,144 +1,151 @@
|
|
|
1
|
-
import "../../ChartLegend.
|
|
2
|
-
import { useVModel as
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css"; import { defineComponent as F, ref as H, computed as v, openBlock as s, createElementBlock as u, createElementVNode as r, createVNode as c, unref as o, createBlock as g, isRef as R, createCommentVNode as x, mergeProps as T, withCtx as p, createTextVNode as I, Fragment as $, renderList as z, normalizeClass as K, withModifiers as q, toDisplayString as V } from "vue";
|
|
2
|
+
import { useVModel as C, useVirtualList as G } from "@vueuse/core";
|
|
3
3
|
import k from "../typography/v4/Typography.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { DEFAULT_MIN_VISIBLE as
|
|
7
|
-
import
|
|
4
|
+
import X from "../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
+
import j from "../search/v4/SearchV4.vue.js";
|
|
6
|
+
import { DEFAULT_MIN_VISIBLE as J, DEFAULT_MAX_VISIBLE as Q } from "./consts.js";
|
|
7
|
+
import W from "../icon/v4/IconV4.vue.js";
|
|
8
8
|
import "../icon/v4/IconFlag.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
9
|
+
import Y from "../tooltip/v4/TooltipV4.vue.js";
|
|
10
|
+
import Z from "./LegendSorting.vue.js";
|
|
11
|
+
const ee = { class: "chart-legend" }, te = { class: "search-box" }, oe = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "empty-list"
|
|
14
|
-
},
|
|
14
|
+
}, le = ["onMouseenter"], ie = ["onClick"], se = { class: "label-container" }, be = /* @__PURE__ */ F({
|
|
15
15
|
__name: "ChartLegend",
|
|
16
16
|
props: {
|
|
17
17
|
items: { default: () => [] },
|
|
18
18
|
visibleIds: { default: () => [] },
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
highlightedId: { default: null },
|
|
20
|
+
minVisible: { default: J },
|
|
21
|
+
maxVisible: { default: Q },
|
|
21
22
|
maxLimitTooltipText: { default: "" },
|
|
22
23
|
sortSelected: { default: null },
|
|
23
24
|
sortOptions: { default: () => [] },
|
|
24
25
|
sortOptionNameKey: { default: "" }
|
|
25
26
|
},
|
|
26
|
-
emits: ["update:visibleIds", "update:sortSelected"],
|
|
27
|
-
setup(a, { emit:
|
|
28
|
-
const
|
|
27
|
+
emits: ["update:visibleIds", "update:sortSelected", "update:highlightedId"],
|
|
28
|
+
setup(a, { emit: m }) {
|
|
29
|
+
const l = a, M = 32, h = C(l, "sortSelected", m), y = C(l, "highlightedId", m), w = (t) => {
|
|
30
|
+
y.value = n(t) ? t.id : null;
|
|
31
|
+
}, E = () => {
|
|
32
|
+
y.value = null;
|
|
33
|
+
}, f = H(""), S = v(() => {
|
|
29
34
|
const t = f.value.toLowerCase();
|
|
30
|
-
return
|
|
31
|
-
(
|
|
35
|
+
return l.items.filter(
|
|
36
|
+
(i) => i.label.toLowerCase().includes(t)
|
|
32
37
|
);
|
|
33
|
-
}), n = (t) =>
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
() =>
|
|
37
|
-
),
|
|
38
|
-
|
|
38
|
+
}), n = (t) => l.visibleIds.includes(t.id), L = v(
|
|
39
|
+
() => l.visibleIds.length >= l.maxVisible
|
|
40
|
+
), N = v(
|
|
41
|
+
() => l.visibleIds.length <= l.minVisible
|
|
42
|
+
), d = (t) => N.value && n(t) || L.value && !n(t), B = (t) => !l.maxLimitTooltipText || n(t) || !L.value, D = (t, i) => {
|
|
43
|
+
m(
|
|
39
44
|
"update:visibleIds",
|
|
40
|
-
t ? [...
|
|
45
|
+
t ? [...l.visibleIds, i.id] : l.visibleIds.filter((e) => e !== i.id)
|
|
41
46
|
);
|
|
42
|
-
}, { list:
|
|
43
|
-
itemHeight:
|
|
47
|
+
}, { list: _, containerProps: O, wrapperProps: P } = G(S, {
|
|
48
|
+
itemHeight: M,
|
|
44
49
|
overscan: 10
|
|
45
|
-
}),
|
|
46
|
-
|
|
50
|
+
}), U = (t) => {
|
|
51
|
+
d(t) || D(!n(t), t);
|
|
47
52
|
};
|
|
48
|
-
return (t,
|
|
49
|
-
|
|
50
|
-
c(o(
|
|
53
|
+
return (t, i) => (s(), u("div", ee, [
|
|
54
|
+
r("div", te, [
|
|
55
|
+
c(o(j), {
|
|
51
56
|
modelValue: f.value,
|
|
52
|
-
"onUpdate:modelValue":
|
|
57
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => f.value = e)
|
|
53
58
|
}, null, 8, ["modelValue"]),
|
|
54
|
-
a.sortOptions?.length > 0 ? (s(),
|
|
59
|
+
a.sortOptions?.length > 0 ? (s(), g(Z, {
|
|
55
60
|
key: 0,
|
|
56
|
-
selected: o(
|
|
57
|
-
"onUpdate:selected":
|
|
61
|
+
selected: o(h),
|
|
62
|
+
"onUpdate:selected": i[1] || (i[1] = (e) => R(h) ? h.value = e : null),
|
|
58
63
|
options: a.sortOptions,
|
|
59
64
|
"option-name-key": a.sortOptionNameKey
|
|
60
|
-
}, null, 8, ["selected", "options", "option-name-key"])) :
|
|
65
|
+
}, null, 8, ["selected", "options", "option-name-key"])) : x("", !0)
|
|
61
66
|
]),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
o(
|
|
67
|
+
r("div", T({ class: "legend" }, o(O)), [
|
|
68
|
+
r("ul", T({ class: "legend__list" }, o(P)), [
|
|
69
|
+
o(_).length === 0 ? (s(), u("li", oe, [
|
|
65
70
|
c(o(k), { variant: "body2" }, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
71
|
+
default: p(() => [
|
|
72
|
+
I("No results")
|
|
68
73
|
]),
|
|
69
74
|
_: 1
|
|
70
75
|
})
|
|
71
|
-
])) : (s(!0),
|
|
72
|
-
key:
|
|
73
|
-
class:
|
|
76
|
+
])) : (s(!0), u($, { key: 1 }, z(o(_), ({ data: e, index: A }) => (s(), u("li", {
|
|
77
|
+
key: A,
|
|
78
|
+
class: K({ "disabled-item": d(e) }),
|
|
79
|
+
onMouseenter: (b) => w(e),
|
|
80
|
+
onMouseleave: E
|
|
74
81
|
}, [
|
|
75
|
-
c(o(
|
|
82
|
+
c(o(Y), {
|
|
76
83
|
text: a.maxLimitTooltipText,
|
|
77
|
-
disabled:
|
|
84
|
+
disabled: B(e),
|
|
78
85
|
class: "disabled-tooltip"
|
|
79
86
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
87
|
+
default: p(() => [
|
|
88
|
+
r("div", {
|
|
82
89
|
class: "item-wrapper",
|
|
83
|
-
onClick: (
|
|
90
|
+
onClick: (b) => U(e)
|
|
84
91
|
}, [
|
|
85
|
-
c(o(
|
|
92
|
+
c(o(X), {
|
|
86
93
|
color: e.color,
|
|
87
94
|
"is-checked": n(e),
|
|
88
|
-
disabled:
|
|
89
|
-
onClick:
|
|
90
|
-
(
|
|
91
|
-
|
|
95
|
+
disabled: d(e),
|
|
96
|
+
onClick: i[2] || (i[2] = q(
|
|
97
|
+
(b) => {
|
|
98
|
+
b.stopPropagation();
|
|
92
99
|
},
|
|
93
100
|
["stop"]
|
|
94
101
|
))
|
|
95
102
|
}, null, 8, ["color", "is-checked", "disabled"]),
|
|
96
|
-
e.icon ? (s(),
|
|
103
|
+
e.icon ? (s(), g(o(W), {
|
|
97
104
|
key: 0,
|
|
98
105
|
class: "icon-color",
|
|
99
106
|
type: e.iconType,
|
|
100
107
|
name: e.icon,
|
|
101
108
|
size: "16px"
|
|
102
|
-
}, null, 8, ["type", "name"])) :
|
|
103
|
-
|
|
109
|
+
}, null, 8, ["type", "name"])) : x("", !0),
|
|
110
|
+
r("div", se, [
|
|
104
111
|
c(o(k), {
|
|
105
112
|
variant: "body2",
|
|
106
113
|
class: "legend-label",
|
|
107
114
|
"is-truncated": "",
|
|
108
|
-
"with-tooltip": !
|
|
115
|
+
"with-tooltip": !d(e),
|
|
109
116
|
"tooltip-text": e.label,
|
|
110
117
|
"tooltip-placement": "left"
|
|
111
118
|
}, {
|
|
112
|
-
default:
|
|
113
|
-
|
|
119
|
+
default: p(() => [
|
|
120
|
+
I(V(e.label), 1)
|
|
114
121
|
]),
|
|
115
122
|
_: 2
|
|
116
123
|
}, 1032, ["with-tooltip", "tooltip-text"]),
|
|
117
|
-
e.caption ? (s(),
|
|
124
|
+
e.caption ? (s(), g(o(k), {
|
|
118
125
|
key: 0,
|
|
119
126
|
variant: "caption",
|
|
120
127
|
class: "legend-caption legend-label",
|
|
121
128
|
"is-truncated": "",
|
|
122
|
-
"with-tooltip": !
|
|
129
|
+
"with-tooltip": !d(e),
|
|
123
130
|
"tooltip-text": e.caption,
|
|
124
131
|
"tooltip-placement": "left"
|
|
125
132
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
|
|
133
|
+
default: p(() => [
|
|
134
|
+
I(V(e.caption), 1)
|
|
128
135
|
]),
|
|
129
136
|
_: 2
|
|
130
|
-
}, 1032, ["with-tooltip", "tooltip-text"])) :
|
|
137
|
+
}, 1032, ["with-tooltip", "tooltip-text"])) : x("", !0)
|
|
131
138
|
])
|
|
132
|
-
], 8,
|
|
139
|
+
], 8, ie)
|
|
133
140
|
]),
|
|
134
141
|
_: 2
|
|
135
142
|
}, 1032, ["text", "disabled"])
|
|
136
|
-
],
|
|
143
|
+
], 42, le))), 128))
|
|
137
144
|
], 16)
|
|
138
145
|
], 16)
|
|
139
146
|
]));
|
|
140
147
|
}
|
|
141
148
|
});
|
|
142
149
|
export {
|
|
143
|
-
|
|
150
|
+
be as default
|
|
144
151
|
};
|