@ironsource/shared-ui 2.1.12-test.79 → 2.1.12-test.80
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/ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css +1 -0
- package/components/chart/ChartPlane.vue.js +2 -2
- package/components/chart/ChartPlane.vue2.js +37 -37
- package/index.js +1 -1
- package/package.json +1 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_c6aaec38_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-plane-container[data-v-e2c0c2af]{--headerHeight: var(--1ade29c0);width:100%;height:var(--0866490b);position:relative}.header-wrapper[data-v-e2c0c2af]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-e2c0c2af]{padding-top:var(--headerHeight);height:100%}.chart[data-v-e2c0c2af]{width:100%;height:100%;position:relative}.chart__canvas[data-v-e2c0c2af]{width:100%;height:100%}.chart__tooltip[data-v-e2c0c2af]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./ChartPlane.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../ChartPlane.
|
|
4
|
-
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e2c0c2af"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../ChartPlane.
|
|
2
|
-
import { Chart as F, ArcElement as ve, LineElement as me, BarElement as ye, PointElement as Te, LineController as Ce, BarController as
|
|
1
|
+
import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as l, ref as A, onMounted as ne, watch as T, nextTick as se, openBlock as f, createElementBlock as L, createVNode as ue, isRef as ce, createSlots as de, withCtx as pe, renderSlot as fe, createCommentVNode as E, createElementVNode as R, normalizeStyle as he, createBlock as B } from "vue";
|
|
2
|
+
import { Chart as F, ArcElement as ve, LineElement as me, BarElement as ye, PointElement as Te, LineController as Ce, BarController as ge, PieController as be, ScatterController as xe, CategoryScale as ke, LinearScale as Se, Filler as Ae, Tooltip as Le } from "chart.js";
|
|
3
3
|
import { HoverVerticalLine as Ee } from "./plugins/HoverVerticalLine.js";
|
|
4
4
|
import { prepareTickLabel as Re, formatValue as Be, calcStepSize as De } from "./utils/utils.js";
|
|
5
|
-
import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as K, BASE_COLOR_KEY as M, CHART_PADDING as Ie, POINT_BORDER_COLOR as He, TICK_LABEL_COLOR as
|
|
5
|
+
import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as K, BASE_COLOR_KEY as M, CHART_PADDING as Ie, POINT_BORDER_COLOR as He, TICK_LABEL_COLOR as z, TICK_LABEL_FONT as U, TICKS_EXTRA_PADDING as Pe, GRID_LINE_COLOR as Y, HEADER_HEIGHT as Ve, COMPACT_HEADER_HEIGHT as Ne, HOVER_AREA_TRANSPARENCY as we, HOVER_TRANSPARENCY as C } from "./consts.js";
|
|
6
6
|
import { ChartType as u, DateInterval as Fe, TooltipOrder as _, TrendDirection as Ke } from "./types.js";
|
|
7
7
|
import { useTooltipPosition as Me } from "./composables/useTooltipPosition.js";
|
|
8
|
-
import
|
|
8
|
+
import ze from "./ChartTooltip.vue.js";
|
|
9
9
|
import { hexColorToRgba as h } from "../../utils/color.js";
|
|
10
|
-
import { useChartValues as
|
|
10
|
+
import { useChartValues as Ue } from "./composables/useChartValues.js";
|
|
11
11
|
import Ye from "./ChartHeader.vue.js";
|
|
12
12
|
import { useMemoize as _e, useVModel as Ge } from "@vueuse/core";
|
|
13
13
|
import $e from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
@@ -22,7 +22,7 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
22
22
|
}, tt = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "chart-plane"
|
|
25
|
-
}, at = { class: "chart" },
|
|
25
|
+
}, at = { class: "chart" }, bt = /* @__PURE__ */ re({
|
|
26
26
|
__name: "ChartPlane",
|
|
27
27
|
props: {
|
|
28
28
|
dataSets: { default: () => [] },
|
|
@@ -64,8 +64,8 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
64
64
|
setup(o, { emit: $ }) {
|
|
65
65
|
const e = o;
|
|
66
66
|
ie((t) => ({
|
|
67
|
-
"
|
|
68
|
-
|
|
67
|
+
"1ade29c0": s(ee),
|
|
68
|
+
"0866490b": o.height
|
|
69
69
|
}));
|
|
70
70
|
const W = _e(Re);
|
|
71
71
|
F.register(
|
|
@@ -74,8 +74,8 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
74
74
|
ye,
|
|
75
75
|
Te,
|
|
76
76
|
Ce,
|
|
77
|
-
be,
|
|
78
77
|
ge,
|
|
78
|
+
be,
|
|
79
79
|
xe,
|
|
80
80
|
ke,
|
|
81
81
|
Se,
|
|
@@ -87,26 +87,25 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
87
87
|
() => e.withAnimation ? "" : "none"
|
|
88
88
|
), v = A(null);
|
|
89
89
|
let n = null;
|
|
90
|
-
const D = l(() => e.empty || e.dataSets.length === 0), d = l(() => !e.loading && !D.value),
|
|
90
|
+
const D = l(() => e.empty || e.dataSets.length === 0), d = l(() => !e.loading && !D.value), b = () => {
|
|
91
91
|
v.value && (n && n.destroy(), n = new F(v.value, P.value));
|
|
92
92
|
}, X = () => {
|
|
93
93
|
n && (n.data.datasets = H.value, n.options = P.value.options, n.update(Z.value));
|
|
94
94
|
};
|
|
95
|
-
ne(
|
|
96
|
-
t && (await se(),
|
|
97
|
-
}),
|
|
95
|
+
ne(b), T(() => e.chartType, b), T(d, async (t) => {
|
|
96
|
+
t && (await se(), b());
|
|
97
|
+
}), T(
|
|
98
98
|
[
|
|
99
99
|
() => e.visibleIds,
|
|
100
100
|
() => e.dataSets,
|
|
101
101
|
() => e.valuePrefix,
|
|
102
|
-
() => e.valueSuffix
|
|
103
|
-
() => T.value
|
|
102
|
+
() => e.valueSuffix
|
|
104
103
|
],
|
|
105
104
|
X
|
|
106
105
|
);
|
|
107
106
|
const p = l(() => e.totalsChart), m = l(
|
|
108
107
|
() => e.chartType === u.StackedLine || e.chartType === u.StackedBar || p.value
|
|
109
|
-
),
|
|
108
|
+
), x = l(
|
|
110
109
|
() => e.chartType === u.Line || e.chartType === u.StackedLine
|
|
111
110
|
), O = l(() => p.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: K } : e.parsing), j = l(() => p.value ? e.dataSets.map((t) => ({
|
|
112
111
|
...t,
|
|
@@ -160,7 +159,7 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
160
159
|
plugins: {
|
|
161
160
|
legend: { display: !1 },
|
|
162
161
|
title: { display: !1 },
|
|
163
|
-
hoverVerticalLine:
|
|
162
|
+
hoverVerticalLine: x.value,
|
|
164
163
|
// tooltip
|
|
165
164
|
tooltip: {
|
|
166
165
|
enabled: !1,
|
|
@@ -214,20 +213,20 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
214
213
|
// Horizontal Axis (X)
|
|
215
214
|
x: {
|
|
216
215
|
beginAtZero: !0,
|
|
217
|
-
offset: !
|
|
216
|
+
offset: !x.value || I.value,
|
|
218
217
|
border: { display: !1 },
|
|
219
218
|
stacked: m.value,
|
|
220
219
|
// stack on top of each other
|
|
221
220
|
// ticks
|
|
222
221
|
ticks: {
|
|
223
|
-
color:
|
|
224
|
-
font:
|
|
222
|
+
color: z,
|
|
223
|
+
font: U,
|
|
225
224
|
padding: 4,
|
|
226
225
|
maxRotation: 0,
|
|
227
226
|
autoSkip: !e.truncateTickLabels,
|
|
228
227
|
autoSkipPadding: 8,
|
|
229
228
|
callback: function(t, i, a) {
|
|
230
|
-
const r = this.getLabelForValue(t), oe =
|
|
229
|
+
const r = this.getLabelForValue(t), oe = x.value && !p.value ? a.length - 1 : a.length, le = this.chart.scales?.x?.width / oe - Pe;
|
|
231
230
|
return W({
|
|
232
231
|
label: r,
|
|
233
232
|
format: e.xAxisFormat,
|
|
@@ -254,13 +253,13 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
254
253
|
// stack on top of each other
|
|
255
254
|
// ticks
|
|
256
255
|
ticks: {
|
|
257
|
-
color:
|
|
258
|
-
font:
|
|
256
|
+
color: z,
|
|
257
|
+
font: U,
|
|
259
258
|
padding: 8,
|
|
260
|
-
stepSize:
|
|
261
|
-
min:
|
|
262
|
-
max:
|
|
263
|
-
callback: (t) => e.valuePrefix + Be(t, e.yAxisFormat,
|
|
259
|
+
stepSize: S.value,
|
|
260
|
+
min: k.value,
|
|
261
|
+
max: S.value * e.tickCount,
|
|
262
|
+
callback: (t) => e.valuePrefix + Be(t, e.yAxisFormat, S.value < 1) + e.valueSuffix
|
|
264
263
|
},
|
|
265
264
|
// grid lines
|
|
266
265
|
grid: {
|
|
@@ -280,20 +279,21 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
280
279
|
left: `${N.value.left}px`,
|
|
281
280
|
top: `${N.value.top}px`,
|
|
282
281
|
opacity: c.value?.opacity || 0
|
|
283
|
-
})), { minValue:
|
|
282
|
+
})), { minValue: k, maxValue: w } = Ue({
|
|
284
283
|
parsingConfig: O.value,
|
|
285
284
|
dataSets: y,
|
|
286
285
|
isStacked: m
|
|
287
|
-
}),
|
|
288
|
-
|
|
289
|
-
isNaN(
|
|
286
|
+
}), S = l(() => {
|
|
287
|
+
const t = De(
|
|
288
|
+
isNaN(k.value) ? 0 : k.value,
|
|
290
289
|
isNaN(w.value) ? 0 : w.value,
|
|
291
290
|
e.tickCount
|
|
292
|
-
)
|
|
293
|
-
|
|
291
|
+
);
|
|
292
|
+
return console.log("stepSize", t), t;
|
|
293
|
+
}), ee = l(
|
|
294
294
|
() => (e.compactHeader ? Ne : Ve) + "px"
|
|
295
295
|
);
|
|
296
|
-
|
|
296
|
+
T(
|
|
297
297
|
() => e.highlightedId,
|
|
298
298
|
(t) => {
|
|
299
299
|
n && (je(t) ? ae() : te(t), n.update());
|
|
@@ -306,7 +306,7 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
306
306
|
a.id === t ? e.chartType === u.StackedLine && (a.backgroundColor = h(
|
|
307
307
|
r,
|
|
308
308
|
we
|
|
309
|
-
)) : (a.backgroundColor = h(r,
|
|
309
|
+
)) : (a.backgroundColor = h(r, C), a.borderColor = h(r, C), a.pointBackgroundColor = h(r, C), a.pointHoverBorderColor = h(r, C));
|
|
310
310
|
});
|
|
311
311
|
}, ae = () => {
|
|
312
312
|
(n?.data.datasets || []).forEach(Je);
|
|
@@ -347,7 +347,7 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
347
347
|
class: "chart__tooltip",
|
|
348
348
|
style: he(s(Q))
|
|
349
349
|
}, [
|
|
350
|
-
c.value ? (f(), B(
|
|
350
|
+
c.value ? (f(), B(ze, {
|
|
351
351
|
key: 0,
|
|
352
352
|
"totals-chart": s(p),
|
|
353
353
|
title: String(c.value.title),
|
|
@@ -377,5 +377,5 @@ const Qe = { class: "chart-plane-container" }, et = {
|
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
export {
|
|
380
|
-
|
|
380
|
+
bt as default
|
|
381
381
|
};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
|
|
2
2
|
import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as ao } from "./components/menuItem/index.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-plane-container[data-v-c6aaec38]{--headerHeight: var(--1b72bc70);width:100%;height:var(--e61db09a);position:relative}.header-wrapper[data-v-c6aaec38]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-c6aaec38]{padding-top:var(--headerHeight);height:100%}.chart[data-v-c6aaec38]{width:100%;height:100%;position:relative}.chart__canvas[data-v-c6aaec38]{width:100%;height:100%}.chart__tooltip[data-v-c6aaec38]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
|