@ironsource/shared-ui 2.1.11-rc.22 → 2.1.11-rc.23
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_8f471697_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +1 -0
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +48 -46
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
- package/index.js +1 -1
- package/package.json +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-8f471697]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px;width:100%}.header-wrapper[data-v-8f471697]{height:76px}.chart-content[data-v-8f471697]{width:100%}.chart-content.with-legend[data-v-8f471697]{width:calc(100% - 222px)}.chart-sidebar[data-v-8f471697]{border-left:1px solid var(--common-divider)}.chart[data-v-8f471697]{width:100%;height:312px;position:relative}.chart__canvas[data-v-8f471697]{width:100%;height:100%}.chart__tooltip[data-v-8f471697]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.filters-panel[data-v-111b200a]{display:flex;flex-wrap:wrap;gap:var(--spacing-50)}.filters-panel[data-v-111b200a] .dropdown{padding:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../Chart.
|
|
4
|
-
const
|
|
1
|
+
import o from "./Chart.vue2.js";
|
|
2
|
+
/* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-8f471697"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import "../../Chart.
|
|
2
|
-
import { useVModel as
|
|
3
|
-
import { Chart as N, ArcElement as
|
|
4
|
-
import { HoverVerticalLine as
|
|
5
|
-
import { formatValue as H, calcStepSize as
|
|
6
|
-
import { DEFAULT_TICK_COUNT as
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css"; import { defineComponent as j, ref as g, computed as i, onMounted as q, watch as C, nextTick as J, openBlock as d, createElementBlock as k, Fragment as R, createBlock as m, unref as u, isRef as V, withCtx as O, renderSlot as D, createCommentVNode as v, createElementVNode as f, normalizeClass as Q, createVNode as F, normalizeStyle as Y } from "vue";
|
|
2
|
+
import { useVModel as _ } from "@vueuse/core";
|
|
3
|
+
import { Chart as N, ArcElement as ee, LineElement as te, BarElement as ae, PointElement as oe, LineController as re, BarController as ie, PieController as le, ScatterController as ne, CategoryScale as se, LinearScale as de, Filler as ue, Tooltip as ce } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as fe } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as H, calcStepSize as pe } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as he, DEFAULT_MIN_VISIBLE as me, DEFAULT_MAX_VISIBLE as ve, COLOR_PALETTE as be, POINT_BORDER_COLOR as ye, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as z } 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
|
|
13
|
-
import { useChartValues as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
8
|
+
import { useTooltipPosition as ge } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import Ce from "./ChartTooltip.vue.js";
|
|
10
|
+
import ke from "./ChartLegend.vue.js";
|
|
11
|
+
import Te from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as Se } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as Le } from "./composables/useChartValues.js";
|
|
14
|
+
import xe from "./ChartLoader.vue.js";
|
|
15
|
+
import Be from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
import Ie from "./SettingsHeader.vue.js";
|
|
17
|
+
const we = { class: "chart-container" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "chart-sidebar"
|
|
20
|
-
},
|
|
20
|
+
}, je = /* @__PURE__ */ j({
|
|
21
21
|
__name: "Chart",
|
|
22
22
|
props: {
|
|
23
23
|
dataSets: { default: () => [] },
|
|
@@ -26,13 +26,13 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
26
26
|
parsing: { default: void 0 },
|
|
27
27
|
xAxisFormat: { default: "string" },
|
|
28
28
|
yAxisFormat: { default: "number" },
|
|
29
|
-
tickCount: { default:
|
|
29
|
+
tickCount: { default: he },
|
|
30
30
|
header: { default: "" },
|
|
31
31
|
subheader: { default: "" },
|
|
32
32
|
subheaderTooltip: { default: "" },
|
|
33
33
|
hideLegend: { type: Boolean, default: !1 },
|
|
34
|
-
minVisible: { default:
|
|
35
|
-
maxVisible: { default:
|
|
34
|
+
minVisible: { default: me },
|
|
35
|
+
maxVisible: { default: ve },
|
|
36
36
|
loading: { type: Boolean, default: !1 },
|
|
37
37
|
noDataIcon: { default: "file-x" },
|
|
38
38
|
noDataTitle: { default: "No data to display" },
|
|
@@ -43,7 +43,6 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
43
43
|
setup(a, { emit: T }) {
|
|
44
44
|
const t = a;
|
|
45
45
|
N.register(
|
|
46
|
-
Y,
|
|
47
46
|
ee,
|
|
48
47
|
te,
|
|
49
48
|
ae,
|
|
@@ -55,18 +54,19 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
55
54
|
se,
|
|
56
55
|
de,
|
|
57
56
|
ue,
|
|
58
|
-
ce
|
|
57
|
+
ce,
|
|
58
|
+
fe
|
|
59
59
|
);
|
|
60
|
-
const c =
|
|
60
|
+
const c = _(t, "chartType", T), p = g(null);
|
|
61
61
|
let s = null;
|
|
62
62
|
const S = i(() => t.dataSets.length === 0), L = i(() => !t.loading && !S.value), b = () => {
|
|
63
63
|
p.value && (s && s.destroy(), s = new N(p.value, B.value));
|
|
64
|
-
},
|
|
64
|
+
}, M = () => {
|
|
65
65
|
s && (s.data.datasets = y.value, s.options = B.value.options, s.update());
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
e && (await
|
|
69
|
-
}), C([() => t.visibleIds, () => t.dataSets],
|
|
67
|
+
q(b), C(() => t.chartType, b), C(L, async (e) => {
|
|
68
|
+
e && (await J(), b());
|
|
69
|
+
}), C([() => t.visibleIds, () => t.dataSets], M);
|
|
70
70
|
const h = i(
|
|
71
71
|
() => t.chartType === n.StackedLine || t.chartType === n.StackedBar
|
|
72
72
|
), $ = i(
|
|
@@ -74,11 +74,11 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
74
74
|
), x = i(
|
|
75
75
|
() => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
|
|
76
76
|
), y = i(() => x.value.map((e, o) => {
|
|
77
|
-
const r = e.color ||
|
|
77
|
+
const r = e.color || be[o] || "#000000";
|
|
78
78
|
return {
|
|
79
79
|
...e,
|
|
80
80
|
fill: h.value ? "start" : void 0,
|
|
81
|
-
backgroundColor:
|
|
81
|
+
backgroundColor: Se(
|
|
82
82
|
r,
|
|
83
83
|
t.chartType === n.StackedLine ? 10 : 70
|
|
84
84
|
),
|
|
@@ -118,7 +118,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
118
118
|
},
|
|
119
119
|
callbacks: {
|
|
120
120
|
footer: (e) => {
|
|
121
|
-
const o = e.reduce((r,
|
|
121
|
+
const o = e.reduce((r, X) => r + (X.parsed.y || 0), 0);
|
|
122
122
|
return ["Total", String(o)];
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -146,7 +146,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
146
146
|
borderWidth: 0,
|
|
147
147
|
hoverRadius: 4,
|
|
148
148
|
hoverBorderWidth: 2,
|
|
149
|
-
pointHoverBackgroundColor:
|
|
149
|
+
pointHoverBackgroundColor: ye
|
|
150
150
|
},
|
|
151
151
|
bar: {
|
|
152
152
|
borderRadius: 4
|
|
@@ -173,7 +173,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
173
173
|
},
|
|
174
174
|
// grid lines
|
|
175
175
|
grid: {
|
|
176
|
-
color:
|
|
176
|
+
color: z,
|
|
177
177
|
drawOnChartArea: !1,
|
|
178
178
|
drawTicks: !0,
|
|
179
179
|
drawBorder: !1,
|
|
@@ -199,7 +199,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
199
199
|
},
|
|
200
200
|
// grid lines
|
|
201
201
|
grid: {
|
|
202
|
-
color:
|
|
202
|
+
color: z,
|
|
203
203
|
drawOnChartArea: !0,
|
|
204
204
|
drawTicks: !1
|
|
205
205
|
}
|
|
@@ -213,7 +213,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
213
213
|
id: e.id,
|
|
214
214
|
label: e.label,
|
|
215
215
|
color: K.value[e.id] || null
|
|
216
|
-
}))), I = g(null), l = g(null), { position: w } =
|
|
216
|
+
}))), I = g(null), l = g(null), { position: w } = ge(
|
|
217
217
|
p,
|
|
218
218
|
I,
|
|
219
219
|
l
|
|
@@ -221,15 +221,15 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
221
221
|
left: `${w.value.left}px`,
|
|
222
222
|
top: `${w.value.top}px`,
|
|
223
223
|
opacity: l.value?.opacity || 0
|
|
224
|
-
})), { minValue: A, maxValue:
|
|
224
|
+
})), { minValue: A, maxValue: G } = Le({
|
|
225
225
|
parsingConfig: t.parsing,
|
|
226
226
|
dataSets: x,
|
|
227
227
|
isStacked: h
|
|
228
228
|
}), E = i(
|
|
229
|
-
() =>
|
|
229
|
+
() => pe(A.value, G.value, t.tickCount)
|
|
230
230
|
);
|
|
231
231
|
return (e, o) => (d(), k(R, null, [
|
|
232
|
-
a.withSettingsHeader ? (d(), m(
|
|
232
|
+
a.withSettingsHeader ? (d(), m(Ie, {
|
|
233
233
|
key: 0,
|
|
234
234
|
"chart-type": u(c),
|
|
235
235
|
"onUpdate:chart-type": o[0] || (o[0] = (r) => V(c) ? c.value = r : null),
|
|
@@ -243,11 +243,13 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
243
243
|
]),
|
|
244
244
|
_: 3
|
|
245
245
|
}, 8, ["chart-type", "hide-legend"])) : v("", !0),
|
|
246
|
-
f("div",
|
|
246
|
+
f("div", we, [
|
|
247
247
|
u(L) ? (d(), k(R, { key: 0 }, [
|
|
248
|
-
f("section",
|
|
248
|
+
f("section", {
|
|
249
|
+
class: Q(["chart-content", [{ "with-legend": !a.hideLegend }]])
|
|
250
|
+
}, [
|
|
249
251
|
f("div", Ae, [
|
|
250
|
-
F(
|
|
252
|
+
F(Te, {
|
|
251
253
|
"chart-type": u(c),
|
|
252
254
|
"onUpdate:chart-type": o[1] || (o[1] = (r) => V(c) ? c.value = r : null),
|
|
253
255
|
"with-settings-header": a.withSettingsHeader,
|
|
@@ -266,9 +268,9 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
266
268
|
ref_key: "tooltipRef",
|
|
267
269
|
ref: I,
|
|
268
270
|
class: "chart__tooltip",
|
|
269
|
-
style:
|
|
271
|
+
style: Y(u(Z))
|
|
270
272
|
}, [
|
|
271
|
-
l.value ? (d(), m(
|
|
273
|
+
l.value ? (d(), m(Ce, {
|
|
272
274
|
key: 0,
|
|
273
275
|
title: String(l.value.title),
|
|
274
276
|
"data-points": l.value.dataPoints,
|
|
@@ -279,15 +281,15 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
279
281
|
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
|
|
280
282
|
], 4)
|
|
281
283
|
])
|
|
282
|
-
]),
|
|
284
|
+
], 2),
|
|
283
285
|
a.hideLegend ? v("", !0) : (d(), k("section", Re, [
|
|
284
|
-
F(
|
|
286
|
+
F(ke, {
|
|
285
287
|
items: u(W),
|
|
286
288
|
"visible-ids": a.visibleIds,
|
|
287
289
|
"onUpdate:visibleIds": o[2] || (o[2] = (r) => T("update:visibleIds", r))
|
|
288
290
|
}, null, 8, ["items", "visible-ids"])
|
|
289
291
|
]))
|
|
290
|
-
], 64)) : a.loading ? (d(), m(
|
|
292
|
+
], 64)) : a.loading ? (d(), m(xe, { key: 1 })) : u(S) ? (d(), m(u(Be), {
|
|
291
293
|
key: 2,
|
|
292
294
|
title: a.noDataTitle,
|
|
293
295
|
subtitle: a.noDataSubtitle,
|
|
@@ -298,5 +300,5 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
|
|
|
298
300
|
}
|
|
299
301
|
});
|
|
300
302
|
export {
|
|
301
|
-
|
|
303
|
+
je as default
|
|
302
304
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./FiltersPanelV4.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../FiltersPanelV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-111b200a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import "../../../FiltersPanelV4.
|
|
2
|
-
const
|
|
1
|
+
import "../../../FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css"; import { defineComponent as d, openBlock as t, createElementBlock as s, Fragment as a, renderList as i, renderSlot as l, normalizeProps as c, guardReactiveProps as u } from "vue";
|
|
2
|
+
const p = { class: "filters-panel" }, m = ["data-testid"], v = /* @__PURE__ */ d({
|
|
3
3
|
__name: "FiltersPanelV4",
|
|
4
4
|
props: {
|
|
5
5
|
filters: null,
|
|
6
6
|
testId: { default: "" }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const n =
|
|
10
|
-
return (o,
|
|
11
|
-
(t(!0),
|
|
8
|
+
setup(r) {
|
|
9
|
+
const n = r;
|
|
10
|
+
return (o, _) => (t(), s("div", p, [
|
|
11
|
+
(t(!0), s(a, null, i(r.filters, (e) => (t(), s("div", {
|
|
12
12
|
key: e.id,
|
|
13
|
-
class: "filter-chip-wrapper",
|
|
14
13
|
"data-testid": `${n.testId}-filter-${e.id}`
|
|
15
14
|
}, [
|
|
16
|
-
l(o.$slots, e.id, c(
|
|
15
|
+
l(o.$slots, e.id, c(u({ filter: e })), void 0, !0)
|
|
17
16
|
], 8, m))), 128))
|
|
18
17
|
]));
|
|
19
18
|
}
|
|
20
19
|
});
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
v as default
|
|
23
22
|
};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_lang.css';
|
|
2
2
|
import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as po } from "./components/menuItem/index.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chart-container[data-v-ea1e5c3e]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px;border-radius:0 0 6px 6px}.header-wrapper[data-v-ea1e5c3e]{height:76px}.chart-content[data-v-ea1e5c3e]{flex:1}.chart-sidebar[data-v-ea1e5c3e]{border-left:1px solid var(--common-divider)}.chart[data-v-ea1e5c3e]{width:100%;height:312px;position:relative}.chart__canvas[data-v-ea1e5c3e]{width:100%;height:100%}.chart__tooltip[data-v-ea1e5c3e]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.filters-panel[data-v-39061862]{display:flex}.filters-panel[data-v-39061862] .dropdown{padding:0}.filter-chip-wrapper[data-v-39061862]{margin-right:var(--spacing-50)}
|