@adyen/lume-vue3 1.12.2 → 1.12.4
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/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
- package/dist/@types/composables/line-null-values.d.ts +2 -1
- package/dist/@types/composables/line-null-values.d.ts.map +1 -1
- package/dist/common/DXlW7kpB.js +5 -0
- package/dist/common/DXlW7kpB.js.map +1 -0
- package/dist/common/Dwk4pJH7.js +5 -0
- package/dist/common/Dwk4pJH7.js.map +1 -0
- package/dist/common/DxeNzuOu.js +5 -0
- package/dist/common/DxeNzuOu.js.map +1 -0
- package/dist/common/{D9bPWPFG.js → GemUpYsK.js} +538 -531
- package/dist/common/{D9bPWPFG.js.map → GemUpYsK.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/_utilities.scss +2 -2
- package/dist/scss/main.scss +4 -4
- package/dist/styles/main.css +1 -1
- package/package.json +2 -2
- package/dist/common/BXh4DXt6.js +0 -5
- package/dist/common/BXh4DXt6.js.map +0 -1
- package/dist/common/C69oCyZi.js +0 -5
- package/dist/common/C69oCyZi.js.map +0 -1
- package/dist/common/CWE1PQAf.js +0 -5
- package/dist/common/CWE1PQAf.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as R, openBlock as _, createElementBlock as I, mergeProps as j, createElementVNode as
|
|
1
|
+
import { defineComponent as Z, ref as R, openBlock as _, createElementBlock as I, mergeProps as j, createElementVNode as G, toDisplayString as oe, createCommentVNode as C, isRef as St, computed as v, watch as X, toRefs as te, inject as Fe, reactive as Ce, onMounted as _e, unref as d, Fragment as q, renderList as W, createBlock as Y, normalizeStyle as jt, normalizeClass as ne, watchEffect as Vt, onBeforeUnmount as Pt, renderSlot as B, createTextVNode as ce, useSlots as re, nextTick as Qe, withCtx as V, createSlots as de, pushScopeId as sn, popScopeId as cn, provide as Ke, createVNode as ue, toHandlers as ae, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Je, resolveDynamicComponent as dn } from "vue";
|
|
2
2
|
import { sankeyLinkHorizontal as vn, sankey as mn, sankeyJustify as fn } from "d3-sankey";
|
|
3
3
|
import { format as pn, ticks as hn, scaleLinear as Be, scaleBand as Me, link as gn, line as yn, area as _n } from "d3";
|
|
4
4
|
import { createPopper as kn } from "@popperjs/core";
|
|
@@ -54,12 +54,12 @@ const bn = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
G("g", bn, [
|
|
58
|
+
G("rect", j(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
|
|
62
|
+
G("text", j(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
@@ -138,7 +138,7 @@ function xn(e, n) {
|
|
|
138
138
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
139
139
|
}
|
|
140
140
|
function Wt(e) {
|
|
141
|
-
const n =
|
|
141
|
+
const n = St(e) ? e.value : e;
|
|
142
142
|
if (!n)
|
|
143
143
|
throw new Error("No empty array can be created from specified data value");
|
|
144
144
|
const t = Math.max(
|
|
@@ -213,7 +213,7 @@ const Ve = (e) => {
|
|
|
213
213
|
});
|
|
214
214
|
function fe(e, n) {
|
|
215
215
|
return { allOptions: v(() => {
|
|
216
|
-
const o =
|
|
216
|
+
const o = St(n) ? n == null ? void 0 : n.value : n;
|
|
217
217
|
return o ? zt(o, e.value) : e.value;
|
|
218
218
|
}) };
|
|
219
219
|
}
|
|
@@ -223,28 +223,28 @@ function Rn(e, n, t) {
|
|
|
223
223
|
function l() {
|
|
224
224
|
if (!n.value) return;
|
|
225
225
|
const c = n.value.reduce(
|
|
226
|
-
(
|
|
226
|
+
(m, u) => m + u.ref.getBoundingClientRect().width,
|
|
227
227
|
0
|
|
228
228
|
), s = Math.ceil(c / r.value);
|
|
229
229
|
o.value = s + s * Mn;
|
|
230
230
|
}
|
|
231
231
|
function i(c) {
|
|
232
232
|
if (!n.value) return !0;
|
|
233
|
-
const s = t.value.skip,
|
|
233
|
+
const s = t.value.skip, m = n.value.length;
|
|
234
234
|
if (c === 0) return !0;
|
|
235
|
-
const u = a.value /
|
|
236
|
-
return c %
|
|
235
|
+
const u = a.value / m, f = typeof s == "number" && s > 0 && s + 1 || Math.ceil(o.value / u);
|
|
236
|
+
return c % f === 0;
|
|
237
237
|
}
|
|
238
238
|
return X(n, l), { showTick: i };
|
|
239
239
|
}
|
|
240
240
|
const H = {
|
|
241
241
|
HORIZONTAL: "horizontal",
|
|
242
242
|
VERTICAL: "vertical"
|
|
243
|
-
},
|
|
243
|
+
}, Gn = {
|
|
244
244
|
SINGLE: "single",
|
|
245
245
|
GROUPED: "grouped",
|
|
246
246
|
STACKED: "stacked"
|
|
247
|
-
}, Zt = "No data", Tt = 20, Ut = 0.33, Xt = 0.5, Yt = 12,
|
|
247
|
+
}, Zt = "No data", Tt = 20, Ut = 0.33, Xt = 0.5, Yt = 12, Ge = 8, Sn = 1, jn = [
|
|
248
248
|
"auto",
|
|
249
249
|
"auto-start",
|
|
250
250
|
"auto-end",
|
|
@@ -295,15 +295,15 @@ const Kt = {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
function r(c) {
|
|
298
|
-
var
|
|
298
|
+
var m;
|
|
299
299
|
const s = Math.max(
|
|
300
300
|
e.value.step(),
|
|
301
|
-
(c ? (
|
|
301
|
+
(c ? (m = c.getComputedTextLength) == null ? void 0 : m.call(c) : e.value.step()) + 20
|
|
302
302
|
);
|
|
303
303
|
return {
|
|
304
304
|
x: -(s - e.value.step()) / 2,
|
|
305
305
|
width: s,
|
|
306
|
-
height: t.value.tickPadding + Yt +
|
|
306
|
+
height: t.value.tickPadding + Yt + Ge
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
function l() {
|
|
@@ -337,8 +337,8 @@ const Kt = {
|
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
function r(c) {
|
|
340
|
-
var
|
|
341
|
-
const s = (c ? (
|
|
340
|
+
var m;
|
|
341
|
+
const s = (c ? (m = c.getComputedTextLength) == null ? void 0 : m.call(c) : 42) + t.value.tickPadding + Ge;
|
|
342
342
|
return {
|
|
343
343
|
x: -s,
|
|
344
344
|
width: s,
|
|
@@ -379,7 +379,7 @@ const Kt = {
|
|
|
379
379
|
}
|
|
380
380
|
function r() {
|
|
381
381
|
return {
|
|
382
|
-
height: t.value.tickPadding + Yt +
|
|
382
|
+
height: t.value.tickPadding + Yt + Ge,
|
|
383
383
|
width: o.value,
|
|
384
384
|
x: -(o.value / 2)
|
|
385
385
|
};
|
|
@@ -413,8 +413,8 @@ const Kt = {
|
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
function r(c) {
|
|
416
|
-
var
|
|
417
|
-
const s = (((
|
|
416
|
+
var m;
|
|
417
|
+
const s = (((m = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : m.call(c)) || 0) + t.value.tickPadding + Ge;
|
|
418
418
|
return {
|
|
419
419
|
width: s,
|
|
420
420
|
height: o.value,
|
|
@@ -445,20 +445,20 @@ const Kt = {
|
|
|
445
445
|
"y-band-scale-axis": Cn,
|
|
446
446
|
"x-linear-scale-axis": zn,
|
|
447
447
|
"y-linear-scale-axis": Wn
|
|
448
|
-
}, Un = ["transform"], Xn = { key: 0 }, Yn = /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
448
|
+
}, Un = ["transform"], Xn = { key: 0 }, Yn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
|
|
449
|
+
/* @__PURE__ */ G("stop", {
|
|
450
450
|
offset: "0%",
|
|
451
451
|
"stop-color": "rgba(255,255,255,0)"
|
|
452
452
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ G("stop", {
|
|
454
454
|
offset: "10%",
|
|
455
455
|
"stop-color": "var(--lume-chart-background-color)"
|
|
456
456
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ G("stop", {
|
|
458
458
|
offset: "90%",
|
|
459
459
|
"stop-color": "var(--lume-chart-background-color)"
|
|
460
460
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ G("stop", {
|
|
462
462
|
offset: "100%",
|
|
463
463
|
"stop-color": "rgba(255,255,255,0)"
|
|
464
464
|
})
|
|
@@ -499,74 +499,74 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
499
499
|
},
|
|
500
500
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
501
501
|
setup(e, { emit: n }) {
|
|
502
|
-
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o),
|
|
502
|
+
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o), m = Fe("isEmpty", R(!1)), u = Ce({}), f = R(null), y = R(null), g = R(null), A = v(
|
|
503
503
|
() => o.type ? et[o.type] : o.position
|
|
504
504
|
), $ = v(
|
|
505
|
-
() => o.type || (
|
|
506
|
-
),
|
|
505
|
+
() => o.type || (A.value === "left" ? "y" : "x")
|
|
506
|
+
), k = v(
|
|
507
507
|
() => $.value === "x" && s.value === H.VERTICAL || $.value === "y" && s.value === H.HORIZONTAL
|
|
508
|
-
), { allOptions:
|
|
508
|
+
), { allOptions: p } = fe(
|
|
509
509
|
c,
|
|
510
510
|
$.value === "x" ? Vn : Pn
|
|
511
|
-
), { showTick: O } = Rn(r,
|
|
512
|
-
() =>
|
|
511
|
+
), { showTick: O } = Rn(r, f, p), N = v(
|
|
512
|
+
() => m.value || !r.value || In(r.value)
|
|
513
513
|
), D = v(() => {
|
|
514
|
-
var
|
|
515
|
-
return $.value === "y" && N.value ? `translate(0, ${((
|
|
514
|
+
var b, x, h, M;
|
|
515
|
+
return $.value === "y" && N.value ? `translate(0, ${((b = l.value) == null ? void 0 : b.height) / 2})` : $.value === "x" && N.value ? `translate(-${((x = l.value) == null ? void 0 : x.width) / 2}, ${(h = l.value) == null ? void 0 : h.height})` : `translate(0, ${$.value === "x" ? (M = l.value) == null ? void 0 : M.height : 0})`;
|
|
516
516
|
}), P = v(() => {
|
|
517
517
|
if (!r.value) return [];
|
|
518
518
|
if (ve(r.value))
|
|
519
519
|
return r.value.labels || r.value.domain();
|
|
520
|
-
const { tickCount:
|
|
521
|
-
return hn(x, h,
|
|
522
|
-
}),
|
|
523
|
-
const { tickFormat:
|
|
524
|
-
return Ve(
|
|
520
|
+
const { tickCount: b } = p.value, [x, h] = r.value.domain();
|
|
521
|
+
return hn(x, h, b);
|
|
522
|
+
}), S = v(() => {
|
|
523
|
+
const { tickFormat: b } = p.value;
|
|
524
|
+
return Ve(b);
|
|
525
525
|
}), E = v(
|
|
526
|
-
() =>
|
|
526
|
+
() => p.value.withHover && k.value && i.value > -1
|
|
527
527
|
), K = v(
|
|
528
|
-
() =>
|
|
528
|
+
() => p.value.tickPadding + Ge || 16
|
|
529
529
|
), U = v(() => $.value === "x" ? (
|
|
530
530
|
// If x axis, get the tick height
|
|
531
531
|
Math.max(
|
|
532
|
-
...(
|
|
533
|
-
(
|
|
532
|
+
...(f.value || []).map(
|
|
533
|
+
(b) => {
|
|
534
534
|
var x, h;
|
|
535
|
-
return ((h = (x =
|
|
535
|
+
return ((h = (x = b.ref).getBBox) == null ? void 0 : h.call(x).height) + K.value;
|
|
536
536
|
}
|
|
537
537
|
)
|
|
538
538
|
)
|
|
539
539
|
) : (
|
|
540
540
|
// If y axis, get the tick width
|
|
541
541
|
Math.max(
|
|
542
|
-
...(
|
|
543
|
-
(
|
|
542
|
+
...(f.value || []).map(
|
|
543
|
+
(b) => {
|
|
544
544
|
var x, h;
|
|
545
|
-
return ((h = (x =
|
|
545
|
+
return ((h = (x = b.ref).getBBox) == null ? void 0 : h.call(x).width) + K.value;
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
)
|
|
549
549
|
));
|
|
550
|
-
function F(
|
|
551
|
-
const { showTicks: x } =
|
|
552
|
-
return x === !1 ? "" :
|
|
550
|
+
function F(b) {
|
|
551
|
+
const { showTicks: x } = p.value;
|
|
552
|
+
return x === !1 ? "" : S.value(b);
|
|
553
553
|
}
|
|
554
|
-
function Q(
|
|
555
|
-
a("mouseenter", { index:
|
|
554
|
+
function Q(b, x, h) {
|
|
555
|
+
a("mouseenter", { index: k.value ? b : null, value: x, event: h });
|
|
556
556
|
}
|
|
557
|
-
function J(
|
|
558
|
-
a("click", { index:
|
|
557
|
+
function J(b, x, h) {
|
|
558
|
+
a("click", { index: b, value: x, event: h });
|
|
559
559
|
}
|
|
560
|
-
function se(
|
|
560
|
+
function se(b) {
|
|
561
561
|
var x;
|
|
562
|
-
if (!(!
|
|
563
|
-
return (x =
|
|
562
|
+
if (!(!f.value || !f.value.length))
|
|
563
|
+
return (x = f.value[b]) == null ? void 0 : x.ref;
|
|
564
564
|
}
|
|
565
565
|
function pe() {
|
|
566
|
-
|
|
567
|
-
(
|
|
568
|
-
value: F(
|
|
569
|
-
group: u.getTickGroupAttributes(
|
|
566
|
+
g.value = P.value.map(
|
|
567
|
+
(b, x) => ({
|
|
568
|
+
value: F(b),
|
|
569
|
+
group: u.getTickGroupAttributes(b, x),
|
|
570
570
|
ghost: u.getTickGhostAttributes(se(x)),
|
|
571
571
|
label: u.getTickLabelAttributes(),
|
|
572
572
|
gridline: u.getGridLinesAttributes()
|
|
@@ -574,18 +574,18 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
574
574
|
);
|
|
575
575
|
}
|
|
576
576
|
function Le() {
|
|
577
|
-
|
|
577
|
+
g.value && g.value.map((b) => (b.gridline = u.getGridLinesAttributes(), b));
|
|
578
578
|
}
|
|
579
579
|
function $e() {
|
|
580
580
|
if (!r.value) return;
|
|
581
|
-
const
|
|
582
|
-
Object.entries(x(r, l,
|
|
581
|
+
const b = r.value.step ? "bandScale" : "linearScale", x = Zn[`${$.value}-${Jt[b]}`];
|
|
582
|
+
Object.entries(x(r, l, p) || []).forEach(
|
|
583
583
|
([h, M]) => {
|
|
584
584
|
u[h] = M;
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
587
|
}
|
|
588
|
-
return X(r, $e, { flush: "sync", immediate: !0 }), X(r, pe, { immediate: !0 }), X(
|
|
588
|
+
return X(r, $e, { flush: "sync", immediate: !0 }), X(r, pe, { immediate: !0 }), X(f, pe), X(U, (b) => a("lume__internal--axis-size", b)), X(o.containerSize, Le), _e(() => ze(y.value)), (b, x) => d(r) ? (_(), I("g", {
|
|
589
589
|
key: 0,
|
|
590
590
|
ref_key: "root",
|
|
591
591
|
ref: y,
|
|
@@ -595,23 +595,23 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
595
595
|
onMouseleave: x[1] || (x[1] = (h) => a("mouseleave", h))
|
|
596
596
|
}, [
|
|
597
597
|
$.value === "x" ? (_(), I("defs", Xn, Kn)) : C("", !0),
|
|
598
|
-
(_(!0), I(q, null, W(
|
|
598
|
+
(_(!0), I(q, null, W(g.value, (h, M) => (_(), Y(d(At), j({
|
|
599
599
|
key: `${h.value}_${M}`,
|
|
600
600
|
ref_for: !0,
|
|
601
601
|
ref_key: "tickRefs",
|
|
602
|
-
ref:
|
|
602
|
+
ref: f
|
|
603
603
|
}, h, {
|
|
604
|
-
"is-hidden": d(
|
|
605
|
-
"with-gridlines": d(
|
|
604
|
+
"is-hidden": d(p).skip && !d(O)(M),
|
|
605
|
+
"with-gridlines": d(p).gridLines,
|
|
606
606
|
onMouseenter: (z) => Q(M, h.value, z),
|
|
607
607
|
onClick: (z) => J(M, h.value, z)
|
|
608
608
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
609
|
-
E.value ? (_(), Y(d(At), j({ key: 1 },
|
|
609
|
+
E.value ? (_(), Y(d(At), j({ key: 1 }, g.value[d(i)], {
|
|
610
610
|
"with-gridlines": !1,
|
|
611
611
|
"is-hovered": "",
|
|
612
612
|
onClick: x[0] || (x[0] = (h) => J(
|
|
613
613
|
d(i),
|
|
614
|
-
|
|
614
|
+
g.value[d(i)].value,
|
|
615
615
|
h
|
|
616
616
|
))
|
|
617
617
|
}), null, 16)) : C("", !0)
|
|
@@ -674,37 +674,37 @@ const qn = ["x", "y", "width", "height"], eo = /* @__PURE__ */ Z({
|
|
|
674
674
|
},
|
|
675
675
|
emits: ["click", "mouseover", "mouseleave"],
|
|
676
676
|
setup(e, { emit: n }) {
|
|
677
|
-
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: c, classList: s } = te(t),
|
|
677
|
+
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: c, classList: s } = te(t), m = R(null), u = v(
|
|
678
678
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
679
|
-
),
|
|
680
|
-
return _e(() => ze(
|
|
679
|
+
), f = v(() => c.value === "width"), y = v(() => c.value === "height"), g = Qn(a, r, l, i), { computedX: A, computedY: $, shouldHaveMinWidth: k, shouldHaveMinHeight: p } = Jn(a, r, l, i), O = v(() => k.value ? 1 : (f.value ? g.computedWidth : l).value), N = v(() => p.value ? 1 : (y.value ? g.computedHeight : i).value), D = f.value || y.value ? g.transformOrigin : null;
|
|
680
|
+
return _e(() => ze(m.value)), (P, S) => (_(), I("rect", {
|
|
681
681
|
ref_key: "root",
|
|
682
|
-
ref:
|
|
682
|
+
ref: m,
|
|
683
683
|
class: ne(["lume-bar", [
|
|
684
684
|
{
|
|
685
685
|
"lume-fill--faded": e.isFaded,
|
|
686
686
|
"lume-bar--negative": e.isNegative,
|
|
687
|
-
"lume-bar--transition-width":
|
|
687
|
+
"lume-bar--transition-width": f.value,
|
|
688
688
|
"lume-bar--transition-height": y.value
|
|
689
689
|
},
|
|
690
690
|
...u.value
|
|
691
691
|
]]),
|
|
692
692
|
style: jt({ transformOrigin: d(D) }),
|
|
693
|
-
x: d(
|
|
693
|
+
x: d(A),
|
|
694
694
|
y: d($),
|
|
695
695
|
width: O.value,
|
|
696
696
|
height: N.value,
|
|
697
697
|
"data-j-bar": "",
|
|
698
|
-
onClick:
|
|
699
|
-
onMouseover:
|
|
700
|
-
onMouseleave:
|
|
698
|
+
onClick: S[0] || (S[0] = (E) => o("click", E)),
|
|
699
|
+
onMouseover: S[1] || (S[1] = (E) => o("mouseover", E)),
|
|
700
|
+
onMouseleave: S[2] || (S[2] = (E) => o("mouseleave", E))
|
|
701
701
|
}, null, 46, qn));
|
|
702
702
|
}
|
|
703
703
|
}), dt = /* @__PURE__ */ ee(eo, [["__scopeId", "data-v-8e8f732a"]]);
|
|
704
704
|
var be = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(be || {}), ie = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ie || {}), qt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(qt || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}), mt = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(mt || {}), ft = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ft || {});
|
|
705
|
-
const to = be.Categorical,
|
|
705
|
+
const to = be.Categorical, Se = ie.Skyblue, no = vt.SkyTeal;
|
|
706
706
|
function oo(e) {
|
|
707
|
-
return e === be.Divergent ? no :
|
|
707
|
+
return e === be.Divergent ? no : Se;
|
|
708
708
|
}
|
|
709
709
|
function ao(e) {
|
|
710
710
|
return Object.values(ft).includes(e);
|
|
@@ -773,28 +773,28 @@ function ht(e, n, t, o, a) {
|
|
|
773
773
|
width: 0,
|
|
774
774
|
height: 0
|
|
775
775
|
}), l = crypto.randomUUID(), i = v(() => {
|
|
776
|
-
var
|
|
777
|
-
return e.value.length > 5 && ye(me.DatasetLength), (
|
|
778
|
-
(u,
|
|
776
|
+
var m;
|
|
777
|
+
return e.value.length > 5 && ye(me.DatasetLength), (m = e.value) == null ? void 0 : m.map(
|
|
778
|
+
(u, f) => {
|
|
779
779
|
if (co(u)) return u;
|
|
780
|
-
const y = so(u.values),
|
|
780
|
+
const y = so(u.values), g = io(
|
|
781
781
|
u.color,
|
|
782
782
|
t == null ? void 0 : t.value,
|
|
783
783
|
o == null ? void 0 : o.value.colorPalette,
|
|
784
|
-
|
|
784
|
+
f
|
|
785
785
|
);
|
|
786
786
|
return {
|
|
787
787
|
...u,
|
|
788
788
|
values: y,
|
|
789
|
-
color:
|
|
789
|
+
color: g,
|
|
790
790
|
__internal: !0
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
793
|
);
|
|
794
|
-
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((
|
|
795
|
-
function s(
|
|
796
|
-
const u = (a == null ? void 0 : a.value) === H.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) ||
|
|
797
|
-
r.width =
|
|
794
|
+
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((m, u) => u));
|
|
795
|
+
function s(m) {
|
|
796
|
+
const u = (a == null ? void 0 : a.value) === H.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) || m.height;
|
|
797
|
+
r.width = m.width, r.height = u;
|
|
798
798
|
}
|
|
799
799
|
return {
|
|
800
800
|
chartID: l,
|
|
@@ -817,9 +817,9 @@ const vo = () => ({
|
|
|
817
817
|
function mo(e, n, t, o, a) {
|
|
818
818
|
const r = R(null), l = R(null);
|
|
819
819
|
function i() {
|
|
820
|
-
var
|
|
820
|
+
var m, u, f, y;
|
|
821
821
|
const { width: c, height: s } = t;
|
|
822
|
-
!c && !s || (o.value === H.HORIZONTAL ? (r.value = (
|
|
822
|
+
!c && !s || (o.value === H.HORIZONTAL ? (r.value = (m = e.value) != null && m.length ? wt(
|
|
823
823
|
e.value,
|
|
824
824
|
c,
|
|
825
825
|
o.value,
|
|
@@ -829,7 +829,7 @@ function mo(e, n, t, o, a) {
|
|
|
829
829
|
s,
|
|
830
830
|
o.value,
|
|
831
831
|
a.value
|
|
832
|
-
) : null) : (r.value = (
|
|
832
|
+
) : null) : (r.value = (f = n.value) != null && f.length ? It(
|
|
833
833
|
n.value,
|
|
834
834
|
c,
|
|
835
835
|
o.value,
|
|
@@ -846,12 +846,12 @@ function mo(e, n, t, o, a) {
|
|
|
846
846
|
function It(e, n, t, o) {
|
|
847
847
|
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, c = r ?? (t === H.HORIZONTAL ? Xt : Ut);
|
|
848
848
|
return Object.assign(
|
|
849
|
-
Me().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s,
|
|
849
|
+
Me().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, m) => m)),
|
|
850
850
|
{ labels: e }
|
|
851
851
|
);
|
|
852
852
|
}
|
|
853
853
|
function wt(e, n, t, o) {
|
|
854
|
-
const a = Ct(e).filter((
|
|
854
|
+
const a = Ct(e).filter((m) => m != null), r = [0, n];
|
|
855
855
|
if (a.length === 0)
|
|
856
856
|
return Be().range(r).domain([0, 0]).nice();
|
|
857
857
|
const l = Math.min(...a), i = o && l > 0 ? 0 : l;
|
|
@@ -950,17 +950,17 @@ const ho = ["height"], go = ["transform"], yo = /* @__PURE__ */ Z({
|
|
|
950
950
|
);
|
|
951
951
|
return Vt(() => {
|
|
952
952
|
if (!l.value) return;
|
|
953
|
-
const { width:
|
|
954
|
-
if (!
|
|
953
|
+
const { width: m } = c.dimensions, { height: u } = l.value.getBoundingClientRect();
|
|
954
|
+
if (!m || t.orientation === H.VERTICAL && !u)
|
|
955
955
|
return;
|
|
956
|
-
const
|
|
957
|
-
width:
|
|
956
|
+
const f = m - a.value.left - a.value.right, y = u - a.value.top - a.value.bottom, g = {
|
|
957
|
+
width: f > 0 ? f : 0,
|
|
958
958
|
height: y > 0 ? y : 0,
|
|
959
|
-
outerWidth:
|
|
959
|
+
outerWidth: m,
|
|
960
960
|
outerHeight: u
|
|
961
961
|
};
|
|
962
|
-
o("resize",
|
|
963
|
-
}), (
|
|
962
|
+
o("resize", g);
|
|
963
|
+
}), (m, u) => (_(), I("div", {
|
|
964
964
|
ref_key: "resizeRef",
|
|
965
965
|
ref: i,
|
|
966
966
|
class: ne(["lume-chart-container", {
|
|
@@ -968,7 +968,7 @@ const ho = ["height"], go = ["transform"], yo = /* @__PURE__ */ Z({
|
|
|
968
968
|
}]),
|
|
969
969
|
"data-j-chart-container": ""
|
|
970
970
|
}, [
|
|
971
|
-
B(
|
|
971
|
+
B(m.$slots, "header", {}, void 0, !0),
|
|
972
972
|
(_(), I("svg", {
|
|
973
973
|
ref_key: "root",
|
|
974
974
|
ref: l,
|
|
@@ -977,20 +977,20 @@ const ho = ["height"], go = ["transform"], yo = /* @__PURE__ */ Z({
|
|
|
977
977
|
}]),
|
|
978
978
|
height: s.value,
|
|
979
979
|
"data-j-chart-container__root": "",
|
|
980
|
-
onClick: u[0] || (u[0] = (
|
|
981
|
-
onMouseenter: u[1] || (u[1] = (
|
|
982
|
-
onMouseleave: u[2] || (u[2] = (
|
|
980
|
+
onClick: u[0] || (u[0] = (f) => o("click", f)),
|
|
981
|
+
onMouseenter: u[1] || (u[1] = (f) => o("mouseenter", f)),
|
|
982
|
+
onMouseleave: u[2] || (u[2] = (f) => o("mouseleave", f))
|
|
983
983
|
}, [
|
|
984
|
-
|
|
984
|
+
G("g", {
|
|
985
985
|
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
986
986
|
class: "lume-chart-container__group",
|
|
987
987
|
"data-j-chart-container__group": ""
|
|
988
988
|
}, [
|
|
989
|
-
B(
|
|
989
|
+
B(m.$slots, "default", {}, void 0, !0)
|
|
990
990
|
], 8, go)
|
|
991
991
|
], 42, ho)),
|
|
992
|
-
B(
|
|
993
|
-
B(
|
|
992
|
+
B(m.$slots, "footer", {}, void 0, !0),
|
|
993
|
+
B(m.$slots, "extra", {}, void 0, !0)
|
|
994
994
|
], 2));
|
|
995
995
|
}
|
|
996
996
|
}), _o = /* @__PURE__ */ ee(yo, [["__scopeId", "data-v-d53cdc3e"]]), ko = ["onClick", "onMouseenter"], bo = /* @__PURE__ */ Z({
|
|
@@ -1018,7 +1018,7 @@ const ho = ["height"], go = ["transform"], yo = /* @__PURE__ */ Z({
|
|
|
1018
1018
|
onClick: (i) => t("click", { index: l, dataset: r, event: i }),
|
|
1019
1019
|
onMouseenter: (i) => t("mouseenter", { index: l, dataset: r, event: i })
|
|
1020
1020
|
}, [
|
|
1021
|
-
|
|
1021
|
+
G("span", {
|
|
1022
1022
|
class: ne(["lume-chart-legend__symbol", `lume-background-color--${r.color}`]),
|
|
1023
1023
|
"data-j-chart-legend__symbol": ""
|
|
1024
1024
|
}, null, 2),
|
|
@@ -1041,10 +1041,10 @@ const $o = /* @__PURE__ */ ee(Ao, [["render", Lo], ["__scopeId", "data-v-8af3fac
|
|
|
1041
1041
|
}, wo = { class: "lume-tooltip__value" };
|
|
1042
1042
|
function xo(e, n) {
|
|
1043
1043
|
return _(), I("li", Io, [
|
|
1044
|
-
|
|
1044
|
+
G("span", null, [
|
|
1045
1045
|
B(e.$slots, "default", {}, void 0, !0)
|
|
1046
1046
|
]),
|
|
1047
|
-
|
|
1047
|
+
G("strong", wo, [
|
|
1048
1048
|
B(e.$slots, "value", {}, void 0, !0)
|
|
1049
1049
|
])
|
|
1050
1050
|
]);
|
|
@@ -1070,18 +1070,18 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1070
1070
|
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
1071
1071
|
"data-j-tooltip__item__symbol": ""
|
|
1072
1072
|
}, null, 2)) : C("", !0),
|
|
1073
|
-
|
|
1073
|
+
G("span", Do, [
|
|
1074
1074
|
B(n.$slots, "label", {}, void 0, !0)
|
|
1075
1075
|
]),
|
|
1076
|
-
|
|
1076
|
+
G("strong", Ho, [
|
|
1077
1077
|
B(n.$slots, "value", {}, void 0, !0)
|
|
1078
1078
|
])
|
|
1079
1079
|
]));
|
|
1080
1080
|
}
|
|
1081
|
-
}), Mo = /* @__PURE__ */ ee(Bo, [["__scopeId", "data-v-4f995c3c"]]), Ro = (e) => (sn("data-v-6f13599d"), e = e(), cn(), e),
|
|
1081
|
+
}), Mo = /* @__PURE__ */ ee(Bo, [["__scopeId", "data-v-4f995c3c"]]), Ro = (e) => (sn("data-v-6f13599d"), e = e(), cn(), e), Go = { class: "lume-tooltip__items" }, So = {
|
|
1082
1082
|
key: 0,
|
|
1083
1083
|
class: "lume-tooltip__break"
|
|
1084
|
-
}, jo = /* @__PURE__ */ Ro(() => /* @__PURE__ */
|
|
1084
|
+
}, jo = /* @__PURE__ */ Ro(() => /* @__PURE__ */ G("hr", null, null, -1)), Vo = [
|
|
1085
1085
|
jo
|
|
1086
1086
|
], Po = /* @__PURE__ */ Z({
|
|
1087
1087
|
__name: "lume-tooltip",
|
|
@@ -1127,11 +1127,11 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1127
1127
|
},
|
|
1128
1128
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1129
1129
|
setup(e, { emit: n }) {
|
|
1130
|
-
const t = e, o = n, a = R(null), { items: r, options: l } = te(t), i = re(), c = R(null), { allOptions: s } = fe(l),
|
|
1130
|
+
const t = e, o = n, a = R(null), { items: r, options: l } = te(t), i = re(), c = R(null), { allOptions: s } = fe(l), m = v(
|
|
1131
1131
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
1132
1132
|
), u = v(
|
|
1133
|
-
() =>
|
|
1134
|
-
),
|
|
1133
|
+
() => m.value ? "fixed" : "absolute"
|
|
1134
|
+
), f = v(() => [
|
|
1135
1135
|
{
|
|
1136
1136
|
name: "computeStyles",
|
|
1137
1137
|
options: {
|
|
@@ -1146,35 +1146,35 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1146
1146
|
...t.modifiers || []
|
|
1147
1147
|
]), y = v(
|
|
1148
1148
|
() => s.value.showTitle !== !1 && t.title != null
|
|
1149
|
-
),
|
|
1149
|
+
), g = v(() => Ve(s.value.valueFormat)), A = v(() => Ve(s.value.titleFormat)), $ = v(
|
|
1150
1150
|
() => {
|
|
1151
1151
|
var P;
|
|
1152
|
-
return ((P = r.value) == null ? void 0 : P.find((
|
|
1152
|
+
return ((P = r.value) == null ? void 0 : P.find((S) => S.isSummary)) || {
|
|
1153
1153
|
label: s.value.summary ?? t.summary
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
|
-
),
|
|
1156
|
+
), k = v(() => i.summary || $.value.label), p = v(() => t.inverse || s.value.inverse ? [...r.value].reverse() : r.value);
|
|
1157
1157
|
function O() {
|
|
1158
1158
|
t.targetElement && a.value && (c.value = kn(t.targetElement, a.value, {
|
|
1159
1159
|
placement: t.position,
|
|
1160
1160
|
strategy: u.value,
|
|
1161
|
-
modifiers:
|
|
1161
|
+
modifiers: f.value
|
|
1162
1162
|
}), o("opened", t.targetElement));
|
|
1163
1163
|
}
|
|
1164
1164
|
function N() {
|
|
1165
1165
|
c.value && (c.value.destroy(), o("closed"), a.value && a.value.classList.remove("lume-tooltip--animated"));
|
|
1166
1166
|
}
|
|
1167
1167
|
function D() {
|
|
1168
|
-
c.value && (s.value.withAnimation !== !1 && a.value && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
1168
|
+
c.value && (s.value.withAnimation !== !1 && a.value && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? (function() {
|
|
1169
1169
|
c.value.state.elements.reference = t.targetElement, c.value.update(), o("moved", t.targetElement);
|
|
1170
|
-
}() : N());
|
|
1170
|
+
})() : N());
|
|
1171
1171
|
}
|
|
1172
1172
|
return X(
|
|
1173
1173
|
() => t.targetElement,
|
|
1174
|
-
async (P,
|
|
1175
|
-
!
|
|
1174
|
+
async (P, S) => {
|
|
1175
|
+
!S && P ? (await Qe(), O()) : D();
|
|
1176
1176
|
}
|
|
1177
|
-
), _e(O), Pt(N), (P,
|
|
1177
|
+
), _e(O), Pt(N), (P, S) => e.opened && e.targetElement ? (_(), I("div", {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
ref_key: "root",
|
|
1180
1180
|
ref: a,
|
|
@@ -1182,21 +1182,21 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1182
1182
|
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
1183
1183
|
}]),
|
|
1184
1184
|
"data-j-tooltip": "",
|
|
1185
|
-
onMouseenter:
|
|
1186
|
-
onMouseleave:
|
|
1185
|
+
onMouseenter: S[0] || (S[0] = (E) => o("tooltip-mouseenter")),
|
|
1186
|
+
onMouseleave: S[1] || (S[1] = (E) => o("tooltip-mouseleave"))
|
|
1187
1187
|
}, [
|
|
1188
1188
|
B(P.$slots, "default", {}, () => [
|
|
1189
1189
|
B(P.$slots, "title", {}, () => [
|
|
1190
1190
|
y.value ? (_(), Y(d($o), { key: 0 }, {
|
|
1191
1191
|
default: V(() => [
|
|
1192
|
-
ce(oe(
|
|
1192
|
+
ce(oe(A.value(e.title)), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 1
|
|
1195
1195
|
})) : C("", !0)
|
|
1196
1196
|
], !0),
|
|
1197
|
-
|
|
1197
|
+
G("ul", Go, [
|
|
1198
1198
|
B(P.$slots, "summary", {}, () => [
|
|
1199
|
-
|
|
1199
|
+
k.value ? (_(), Y(d(Eo), { key: 0 }, de({
|
|
1200
1200
|
default: V(() => [
|
|
1201
1201
|
ce(oe($.value.label) + " ", 1)
|
|
1202
1202
|
]),
|
|
@@ -1205,15 +1205,15 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1205
1205
|
$.value.value ? {
|
|
1206
1206
|
name: "value",
|
|
1207
1207
|
fn: V(() => [
|
|
1208
|
-
ce(oe(
|
|
1208
|
+
ce(oe(g.value($.value.value)), 1)
|
|
1209
1209
|
]),
|
|
1210
1210
|
key: "0"
|
|
1211
1211
|
} : void 0
|
|
1212
1212
|
]), 1024)) : C("", !0)
|
|
1213
1213
|
], !0),
|
|
1214
|
-
|
|
1214
|
+
k.value ? (_(), I("li", So, Vo)) : C("", !0),
|
|
1215
1215
|
B(P.$slots, "items", {}, () => [
|
|
1216
|
-
(_(!0), I(q, null, W(
|
|
1216
|
+
(_(!0), I(q, null, W(p.value, (E) => (_(), Y(d(Mo), {
|
|
1217
1217
|
key: E.label,
|
|
1218
1218
|
color: E.color
|
|
1219
1219
|
}, {
|
|
@@ -1221,7 +1221,7 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1221
1221
|
ce(oe(E.label), 1)
|
|
1222
1222
|
]),
|
|
1223
1223
|
value: V(() => [
|
|
1224
|
-
ce(oe(
|
|
1224
|
+
ce(oe(g.value(E.value)), 1)
|
|
1225
1225
|
]),
|
|
1226
1226
|
_: 2
|
|
1227
1227
|
}, 1032, ["color"]))), 128))
|
|
@@ -1284,9 +1284,9 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1284
1284
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1285
1285
|
setup(e, { emit: n }) {
|
|
1286
1286
|
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } = te(t), c = v(() => Wt(a));
|
|
1287
|
-
function s(
|
|
1288
|
-
var
|
|
1289
|
-
const u = r.value === H.HORIZONTAL ? i.value : l.value,
|
|
1287
|
+
function s(m) {
|
|
1288
|
+
var k;
|
|
1289
|
+
const u = r.value === H.HORIZONTAL ? i.value : l.value, f = u.domain(), y = On(u), g = ((k = u.paddingInner) == null ? void 0 : k.call(u)) ?? 0, A = y * g, $ = ve(u) ? u(f[m]) - A / 2 : u(m) - y / 2;
|
|
1290
1290
|
return r.value === H.HORIZONTAL ? {
|
|
1291
1291
|
width: Math.max(...l.value.range()),
|
|
1292
1292
|
height: y,
|
|
@@ -1297,14 +1297,14 @@ const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1297
1297
|
transform: `translate(${$}, 0)`
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
return (
|
|
1301
|
-
(_(!0), I(q, null, W(c.value, (
|
|
1300
|
+
return (m, u) => (_(), I("g", Co, [
|
|
1301
|
+
(_(!0), I(q, null, W(c.value, (f, y) => (_(), Y(d(dt), j(s(y), {
|
|
1302
1302
|
key: `overlay-${y}`,
|
|
1303
1303
|
"data-j-lume-overlay-group": y,
|
|
1304
1304
|
transition: !1,
|
|
1305
1305
|
"class-list": "lume-fill--transparent",
|
|
1306
|
-
onMouseover: (
|
|
1307
|
-
onClick: (
|
|
1306
|
+
onMouseover: (g) => o("lume__internal--hover", y),
|
|
1307
|
+
onClick: (g) => o("click", { index: y, event: g })
|
|
1308
1308
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1309
1309
|
]));
|
|
1310
1310
|
}
|
|
@@ -1364,19 +1364,19 @@ const Dt = {
|
|
|
1364
1364
|
function en(e, n, t, o, a, r, l, i) {
|
|
1365
1365
|
const c = v(
|
|
1366
1366
|
() => {
|
|
1367
|
-
var
|
|
1368
|
-
return n.value.withTooltip !== !1 && !((
|
|
1367
|
+
var m;
|
|
1368
|
+
return n.value.withTooltip !== !1 && !((m = n.value.tooltipOptions) != null && m.targetElement);
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
|
-
function s(
|
|
1371
|
+
function s(m) {
|
|
1372
1372
|
var y;
|
|
1373
|
-
const u = ((y = a == null ? void 0 : a.value) == null ? void 0 : y.length) ?? 0,
|
|
1374
|
-
|
|
1373
|
+
const u = ((y = a == null ? void 0 : a.value) == null ? void 0 : y.length) ?? 0, f = i != null && i.value && Dt[i.value] ? Dt[i.value](
|
|
1374
|
+
m,
|
|
1375
1375
|
u
|
|
1376
|
-
) : Uo(
|
|
1377
|
-
e.value =
|
|
1378
|
-
cx: (r == null ? void 0 : r.value) === H.HORIZONTAL ? t.value(
|
|
1379
|
-
cy: (r == null ? void 0 : r.value) === H.HORIZONTAL ? tt(o.value,
|
|
1376
|
+
) : Uo(m, u);
|
|
1377
|
+
e.value = f.map((g, A) => ({
|
|
1378
|
+
cx: (r == null ? void 0 : r.value) === H.HORIZONTAL ? t.value(g) : tt(t.value, A),
|
|
1379
|
+
cy: (r == null ? void 0 : r.value) === H.HORIZONTAL ? tt(o.value, A) : o.value(g)
|
|
1380
1380
|
}));
|
|
1381
1381
|
}
|
|
1382
1382
|
return X(
|
|
@@ -1455,156 +1455,156 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1455
1455
|
}
|
|
1456
1456
|
},
|
|
1457
1457
|
setup(e, { emit: n }) {
|
|
1458
|
-
const t = e, o = re(), a = n, { data: r, labels: l, color: i, options: c, orientation: s, chartType:
|
|
1458
|
+
const t = e, o = re(), a = n, { data: r, labels: l, color: i, options: c, orientation: s, chartType: m } = te(t), u = R(-1), f = R(null), y = R(null), g = R([]), A = R(null), $ = R(0), k = R(0), { allOptions: p } = fe(c), { internalData: O, computedLabels: N, containerSize: D, updateSize: P, chartID: S } = ht(r, l, i, p, s), { xScale: E, yScale: K } = mo(
|
|
1459
1459
|
O,
|
|
1460
1460
|
N,
|
|
1461
1461
|
D,
|
|
1462
1462
|
s,
|
|
1463
|
-
|
|
1463
|
+
p
|
|
1464
1464
|
), U = v(() => ({
|
|
1465
|
-
top: Jo(
|
|
1466
|
-
right: Qo(
|
|
1467
|
-
bottom: qo(
|
|
1468
|
-
left: ea(
|
|
1465
|
+
top: Jo(p.value.margins),
|
|
1466
|
+
right: Qo(p.value.margins),
|
|
1467
|
+
bottom: qo(p.value.margins, $.value),
|
|
1468
|
+
left: ea(p.value.margins, k.value)
|
|
1469
1469
|
})), F = v(() => {
|
|
1470
|
-
var
|
|
1471
|
-
return t.xScale ? xt(t.xScale) ? t.xScale : (
|
|
1470
|
+
var T;
|
|
1471
|
+
return t.xScale ? xt(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, O.value, l.value, D) : E.value;
|
|
1472
1472
|
}), Q = v(() => {
|
|
1473
|
-
var
|
|
1474
|
-
return t.yScale ? xt(t.yScale) ? t.yScale : (
|
|
1473
|
+
var T;
|
|
1474
|
+
return t.yScale ? xt(t.yScale) ? t.yScale : (T = t.yScale) == null ? void 0 : T.call(t, O.value, l.value, D) : K.value;
|
|
1475
1475
|
}), J = v(() => ({
|
|
1476
|
-
...
|
|
1476
|
+
...p.value.xAxisOptions,
|
|
1477
1477
|
withHover: s.value === H.VERTICAL
|
|
1478
1478
|
})), se = v(() => ({
|
|
1479
|
-
...
|
|
1479
|
+
...p.value.yAxisOptions,
|
|
1480
1480
|
withHover: s.value === H.HORIZONTAL
|
|
1481
1481
|
})), pe = v(() => {
|
|
1482
|
-
var
|
|
1483
|
-
return (
|
|
1482
|
+
var T;
|
|
1483
|
+
return (T = p.value.xAxisOptions) == null ? void 0 : T.title;
|
|
1484
1484
|
}), Le = v(() => {
|
|
1485
|
-
var
|
|
1486
|
-
return (
|
|
1485
|
+
var T;
|
|
1486
|
+
return (T = p.value.yAxisOptions) == null ? void 0 : T.title;
|
|
1487
1487
|
}), $e = v(() => {
|
|
1488
|
-
var
|
|
1489
|
-
return ((
|
|
1490
|
-
}),
|
|
1491
|
-
var
|
|
1492
|
-
return ((
|
|
1488
|
+
var T;
|
|
1489
|
+
return ((T = p.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && pe.value;
|
|
1490
|
+
}), b = v(() => {
|
|
1491
|
+
var T;
|
|
1492
|
+
return ((T = p.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 && Le.value;
|
|
1493
1493
|
}), x = v(
|
|
1494
|
-
() => r.value.every((
|
|
1494
|
+
() => r.value.every((T) => !T.values.length) || r.value.every((T) => T.values.every((L) => L === null))
|
|
1495
1495
|
), h = v(() => {
|
|
1496
|
-
const
|
|
1497
|
-
return
|
|
1496
|
+
const T = [], { noBaseScales: L } = p.value;
|
|
1497
|
+
return L || T.push(() => !!(F.value && Q.value)), T.every((w) => w() === !0);
|
|
1498
1498
|
}), { hasNegativeValues: M } = Wo(O), { negativeBarAttributes: z } = Zo(
|
|
1499
1499
|
D,
|
|
1500
1500
|
F,
|
|
1501
1501
|
Q,
|
|
1502
1502
|
s
|
|
1503
1503
|
), { shouldGenerateTooltipAnchors: le } = en(
|
|
1504
|
-
p,
|
|
1505
1504
|
g,
|
|
1505
|
+
p,
|
|
1506
1506
|
F,
|
|
1507
1507
|
Q,
|
|
1508
1508
|
l,
|
|
1509
1509
|
s,
|
|
1510
1510
|
O,
|
|
1511
|
-
|
|
1511
|
+
m
|
|
1512
1512
|
), { tooltipConfig: Ee, showTooltip: Ze, hideTooltip: Ue } = Yo(), { getTooltipItems: Ne } = Ko(O), De = v(
|
|
1513
1513
|
() => {
|
|
1514
|
-
var
|
|
1515
|
-
return ((
|
|
1514
|
+
var T;
|
|
1515
|
+
return ((T = p.value.tooltipOptions) == null ? void 0 : T.position) || "top";
|
|
1516
1516
|
}
|
|
1517
1517
|
), Oe = v(() => {
|
|
1518
|
-
var
|
|
1519
|
-
const
|
|
1520
|
-
return Ee.opened && (!
|
|
1518
|
+
var L;
|
|
1519
|
+
const T = (L = p.value.tooltipOptions) == null ? void 0 : L.withPointerEvents;
|
|
1520
|
+
return Ee.opened && (!T || T && A.value === !1);
|
|
1521
1521
|
});
|
|
1522
|
-
function je(
|
|
1522
|
+
function je(T) {
|
|
1523
1523
|
var w;
|
|
1524
|
-
if (
|
|
1525
|
-
const
|
|
1526
|
-
if (u.value =
|
|
1527
|
-
const Ye = (w =
|
|
1524
|
+
if (p.value.withHover === !1 || T === u.value) return;
|
|
1525
|
+
const L = u.value;
|
|
1526
|
+
if (u.value = T, p.value.withTooltip !== !1) {
|
|
1527
|
+
const Ye = (w = p.value.tooltipOptions) != null && w.targetElement ? p.value.tooltipOptions.targetElement === "self" ? y.value.$el : p.value.tooltipOptions.targetElement : f.value[T];
|
|
1528
1528
|
Ze(Ye);
|
|
1529
1529
|
}
|
|
1530
|
-
a("hovered-index-changed", { newIndex:
|
|
1530
|
+
a("hovered-index-changed", { newIndex: T, oldIndex: L }), a("update:hoveredIndex", T);
|
|
1531
1531
|
}
|
|
1532
1532
|
function Xe() {
|
|
1533
1533
|
Ue(), u.value = -1, a("update:hoveredIndex", -1);
|
|
1534
1534
|
}
|
|
1535
|
-
function _t(
|
|
1535
|
+
function _t(T) {
|
|
1536
1536
|
if (!r.value.some(
|
|
1537
|
-
({ values: w }) =>
|
|
1537
|
+
({ values: w }) => T <= w.length - 1
|
|
1538
1538
|
)) {
|
|
1539
1539
|
ye(me.InvalidHoveredIndex);
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
1542
|
-
|
|
1542
|
+
T == null || T === -1 ? Xe() : je(T);
|
|
1543
1543
|
}
|
|
1544
1544
|
function rn() {
|
|
1545
1545
|
setTimeout(() => {
|
|
1546
1546
|
Oe.value && Xe(), a("chart-mouseleave");
|
|
1547
1547
|
}, 0);
|
|
1548
1548
|
}
|
|
1549
|
-
function un(
|
|
1550
|
-
P(
|
|
1549
|
+
function un(T) {
|
|
1550
|
+
P(T), a("resize", T);
|
|
1551
1551
|
}
|
|
1552
|
-
function kt({ index:
|
|
1553
|
-
|
|
1552
|
+
function kt({ index: T, value: L, event: w }) {
|
|
1553
|
+
T !== null && je(T), a("axis-mouseenter", { index: T, value: L, event: w });
|
|
1554
1554
|
}
|
|
1555
|
-
function bt({ index:
|
|
1556
|
-
a("axis-click", { index:
|
|
1555
|
+
function bt({ index: T, value: L, event: w }) {
|
|
1556
|
+
a("axis-click", { index: T, value: L, event: w });
|
|
1557
1557
|
}
|
|
1558
1558
|
return X(
|
|
1559
1559
|
r,
|
|
1560
|
-
(
|
|
1560
|
+
(T, L) => a("data-changed", { newValue: T, oldValue: L })
|
|
1561
1561
|
), X(
|
|
1562
1562
|
l,
|
|
1563
|
-
(
|
|
1564
|
-
), X(x, (
|
|
1565
|
-
|
|
1566
|
-
(
|
|
1567
|
-
|
|
1563
|
+
(T, L) => a("labels-changed", { newValue: T, oldValue: L })
|
|
1564
|
+
), X(x, (T) => T && ye(me.Empty), { immediate: !0 }), X(() => t.hoveredIndex, _t), X(
|
|
1565
|
+
g,
|
|
1566
|
+
(T) => {
|
|
1567
|
+
T && t.hoveredIndex != null && u.value === -1 && _t(t.hoveredIndex);
|
|
1568
1568
|
},
|
|
1569
1569
|
{ flush: "post" }
|
|
1570
|
-
), X(
|
|
1571
|
-
|
|
1570
|
+
), X(A, (T) => {
|
|
1571
|
+
T === !1 && Ee.opened && Xe();
|
|
1572
1572
|
}), _e(async () => {
|
|
1573
1573
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1574
|
-
}), Ke("chartID",
|
|
1575
|
-
id: `lume-chart_${d(
|
|
1574
|
+
}), Ke("chartID", S), Ke("isEmpty", x), Ke("tooltipAnchorAttributes", g), (T, L) => (_(), Y(d(_o), {
|
|
1575
|
+
id: `lume-chart_${d(S)}`,
|
|
1576
1576
|
ref_key: "chartContainer",
|
|
1577
1577
|
ref: y,
|
|
1578
1578
|
margins: U.value,
|
|
1579
1579
|
"container-size": d(D),
|
|
1580
|
-
"no-min-size": d(
|
|
1581
|
-
"transparent-background": d(
|
|
1580
|
+
"no-min-size": d(p).noMinSize,
|
|
1581
|
+
"transparent-background": d(p).transparentBackground,
|
|
1582
1582
|
orientation: d(s),
|
|
1583
1583
|
"data-j-lume-chart": "",
|
|
1584
1584
|
onResize: un,
|
|
1585
|
-
onClick:
|
|
1586
|
-
onMouseenter:
|
|
1585
|
+
onClick: L[24] || (L[24] = (w) => a("chart-click", w)),
|
|
1586
|
+
onMouseenter: L[25] || (L[25] = (w) => a("chart-mouseenter", w)),
|
|
1587
1587
|
onMouseleave: rn
|
|
1588
1588
|
}, {
|
|
1589
1589
|
header: V(() => [
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
B(
|
|
1590
|
+
G("div", ta, [
|
|
1591
|
+
G("div", na, [
|
|
1592
|
+
T.title ? (_(), I("h1", oa, oe(T.title), 1)) : C("", !0),
|
|
1593
|
+
G("div", aa, [
|
|
1594
|
+
B(T.$slots, "controls", {}, void 0, !0)
|
|
1595
1595
|
])
|
|
1596
1596
|
]),
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
B(
|
|
1600
|
-
d(
|
|
1597
|
+
G("div", la, [
|
|
1598
|
+
b.value ? (_(), I("h3", ra, oe(Le.value), 1)) : C("", !0),
|
|
1599
|
+
B(T.$slots, "legend", { data: d(O) }, () => [
|
|
1600
|
+
d(p).withLegend !== !1 && d(p).legendPosition !== "bottom" ? (_(), Y(d(Nt), {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
data: d(O),
|
|
1603
1603
|
class: "lume-chart__legend",
|
|
1604
1604
|
"data-j-lume-chart__legend": "",
|
|
1605
|
-
onClick:
|
|
1606
|
-
onMouseenter:
|
|
1607
|
-
onMouseleave:
|
|
1605
|
+
onClick: L[0] || (L[0] = (w) => a("legend-click", w)),
|
|
1606
|
+
onMouseenter: L[1] || (L[1] = (w) => a("legend-mouseenter", w)),
|
|
1607
|
+
onMouseleave: L[2] || (L[2] = (w) => a("legend-mouseleave"))
|
|
1608
1608
|
}, null, 8, ["data"])) : C("", !0)
|
|
1609
1609
|
], !0)
|
|
1610
1610
|
])
|
|
@@ -1612,49 +1612,49 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1612
1612
|
]),
|
|
1613
1613
|
footer: V(() => [
|
|
1614
1614
|
$e.value ? (_(), I("h3", sa, oe(pe.value), 1)) : C("", !0),
|
|
1615
|
-
d(
|
|
1615
|
+
d(p).withLegend !== !1 && d(p).legendPosition == "bottom" ? (_(), Y(d(Nt), {
|
|
1616
1616
|
key: 1,
|
|
1617
1617
|
data: d(O),
|
|
1618
1618
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1619
1619
|
"data-j-lume-chart__legend": "",
|
|
1620
|
-
onClick:
|
|
1621
|
-
onMouseenter:
|
|
1622
|
-
onMouseleave:
|
|
1620
|
+
onClick: L[16] || (L[16] = (w) => a("legend-click", w)),
|
|
1621
|
+
onMouseenter: L[17] || (L[17] = (w) => a("legend-mouseenter", w)),
|
|
1622
|
+
onMouseleave: L[18] || (L[18] = (w) => a("legend-mouseleave"))
|
|
1623
1623
|
}, null, 8, ["data"])) : C("", !0)
|
|
1624
1624
|
]),
|
|
1625
1625
|
extra: V(() => [
|
|
1626
|
-
B(
|
|
1626
|
+
B(T.$slots, "tooltip", j(d(Ee), {
|
|
1627
1627
|
data: d(O),
|
|
1628
1628
|
labels: d(N),
|
|
1629
1629
|
title: d(N)[u.value],
|
|
1630
1630
|
items: d(Ne)(u.value),
|
|
1631
1631
|
position: De.value,
|
|
1632
|
-
withTooltip: d(
|
|
1632
|
+
withTooltip: d(p).withTooltip !== !1,
|
|
1633
1633
|
hoveredIndex: u.value,
|
|
1634
|
-
handleMouseEnter: () =>
|
|
1635
|
-
handleMouseLeave: () =>
|
|
1636
|
-
options: d(
|
|
1634
|
+
handleMouseEnter: () => A.value = !0,
|
|
1635
|
+
handleMouseLeave: () => A.value = !1,
|
|
1636
|
+
options: d(p).tooltipOptions
|
|
1637
1637
|
}), () => [
|
|
1638
|
-
d(
|
|
1638
|
+
d(p).withTooltip !== !1 ? (_(), Y(d(Fo), j({ key: 0 }, d(Ee), {
|
|
1639
1639
|
position: De.value,
|
|
1640
1640
|
title: d(N)[u.value],
|
|
1641
1641
|
items: d(Ne)(u.value),
|
|
1642
|
-
options: d(
|
|
1642
|
+
options: d(p).tooltipOptions,
|
|
1643
1643
|
"data-j-lume-chart__tooltip": "",
|
|
1644
|
-
onOpened:
|
|
1644
|
+
onOpened: L[19] || (L[19] = (w) => a("tooltip-opened", {
|
|
1645
1645
|
index: u.value,
|
|
1646
1646
|
targetElement: w
|
|
1647
1647
|
})),
|
|
1648
|
-
onMoved:
|
|
1648
|
+
onMoved: L[20] || (L[20] = (w) => a("tooltip-moved", {
|
|
1649
1649
|
index: u.value,
|
|
1650
1650
|
targetElement: w
|
|
1651
1651
|
})),
|
|
1652
|
-
onClosed:
|
|
1653
|
-
onTooltipMouseenter:
|
|
1654
|
-
onTooltipMouseleave:
|
|
1652
|
+
onClosed: L[21] || (L[21] = (w) => a("tooltip-closed")),
|
|
1653
|
+
onTooltipMouseenter: L[22] || (L[22] = (w) => A.value = !0),
|
|
1654
|
+
onTooltipMouseleave: L[23] || (L[23] = (w) => A.value = !1)
|
|
1655
1655
|
}), {
|
|
1656
1656
|
default: V(() => [
|
|
1657
|
-
B(
|
|
1657
|
+
B(T.$slots, "tooltip-content", {
|
|
1658
1658
|
data: d(O),
|
|
1659
1659
|
labels: d(N),
|
|
1660
1660
|
hoveredIndex: u.value
|
|
@@ -1671,12 +1671,12 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1671
1671
|
transition: !1,
|
|
1672
1672
|
"data-j-lume-chart__negative-values": ""
|
|
1673
1673
|
}), null, 16)) : C("", !0),
|
|
1674
|
-
d(
|
|
1674
|
+
d(p).withAxes !== !1 ? B(T.$slots, "axes", {
|
|
1675
1675
|
key: 1,
|
|
1676
1676
|
xScale: F.value,
|
|
1677
1677
|
yScale: Q.value,
|
|
1678
1678
|
containerSize: d(D),
|
|
1679
|
-
options: d(
|
|
1679
|
+
options: d(p),
|
|
1680
1680
|
hoveredIndex: u.value
|
|
1681
1681
|
}, () => [
|
|
1682
1682
|
ue(d(Lt), {
|
|
@@ -1689,8 +1689,8 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1689
1689
|
"data-j-lume-chart__x-axis": "",
|
|
1690
1690
|
onClick: bt,
|
|
1691
1691
|
onMouseenter: kt,
|
|
1692
|
-
onMouseleave:
|
|
1693
|
-
"onLume__internal-AxisSize":
|
|
1692
|
+
onMouseleave: L[3] || (L[3] = (w) => a("axis-mouseleave")),
|
|
1693
|
+
"onLume__internal-AxisSize": L[4] || (L[4] = (w) => $.value = w)
|
|
1694
1694
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1695
1695
|
ue(d(Lt), {
|
|
1696
1696
|
type: "y",
|
|
@@ -1702,11 +1702,11 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1702
1702
|
"data-j-lume-chart__y-axis": "",
|
|
1703
1703
|
onClick: bt,
|
|
1704
1704
|
onMouseenter: kt,
|
|
1705
|
-
onMouseleave:
|
|
1706
|
-
"onLume__internal-AxisSize":
|
|
1705
|
+
onMouseleave: L[5] || (L[5] = (w) => a("axis-mouseleave")),
|
|
1706
|
+
"onLume__internal-AxisSize": L[6] || (L[6] = (w) => k.value = w)
|
|
1707
1707
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1708
1708
|
], !0) : C("", !0),
|
|
1709
|
-
d(
|
|
1709
|
+
d(p).withHover !== !1 ? (_(), Y(d(zo), {
|
|
1710
1710
|
key: 2,
|
|
1711
1711
|
data: d(O),
|
|
1712
1712
|
orientation: d(s),
|
|
@@ -1716,35 +1716,35 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1716
1716
|
"onLume__internal-Hover": je
|
|
1717
1717
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : C("", !0),
|
|
1718
1718
|
d(le) ? (_(), I("g", ua, [
|
|
1719
|
-
(_(!0), I(q, null, W(
|
|
1719
|
+
(_(!0), I(q, null, W(g.value, (w, Ye) => (_(), I("circle", j(w, {
|
|
1720
1720
|
ref_for: !0,
|
|
1721
1721
|
ref_key: "tooltipAnchor",
|
|
1722
|
-
ref:
|
|
1722
|
+
ref: f,
|
|
1723
1723
|
key: `anchor_${Ye}`,
|
|
1724
|
-
r: d(
|
|
1724
|
+
r: d(Sn),
|
|
1725
1725
|
class: "lume-fill--transparent"
|
|
1726
1726
|
}), null, 16, ia))), 128))
|
|
1727
1727
|
])) : C("", !0),
|
|
1728
|
-
B(
|
|
1728
|
+
B(T.$slots, "groups", {
|
|
1729
1729
|
data: d(O),
|
|
1730
1730
|
labels: d(N),
|
|
1731
|
-
options: d(
|
|
1731
|
+
options: d(p),
|
|
1732
1732
|
orientation: d(s),
|
|
1733
1733
|
xScale: F.value,
|
|
1734
1734
|
yScale: Q.value,
|
|
1735
1735
|
hoveredIndex: u.value,
|
|
1736
1736
|
containerSize: d(D),
|
|
1737
|
-
transition: d(
|
|
1738
|
-
classList:
|
|
1739
|
-
onNodeClick:
|
|
1740
|
-
onNodeMouseenter:
|
|
1741
|
-
onNodeMouseleave:
|
|
1742
|
-
onLinkClick:
|
|
1743
|
-
onLinkMouseenter:
|
|
1744
|
-
onLinkMouseleave:
|
|
1745
|
-
onBarClick:
|
|
1746
|
-
onLineClick:
|
|
1747
|
-
onPointClick:
|
|
1737
|
+
transition: d(p).withTransition !== !1,
|
|
1738
|
+
classList: T.classList,
|
|
1739
|
+
onNodeClick: L[7] || (L[7] = (w) => a("node-click", w)),
|
|
1740
|
+
onNodeMouseenter: L[8] || (L[8] = (w) => a("node-mouseenter", w)),
|
|
1741
|
+
onNodeMouseleave: L[9] || (L[9] = (w) => a("node-mouseleave", w)),
|
|
1742
|
+
onLinkClick: L[10] || (L[10] = (w) => a("link-click", w)),
|
|
1743
|
+
onLinkMouseenter: L[11] || (L[11] = (w) => a("link-mouseenter", w)),
|
|
1744
|
+
onLinkMouseleave: L[12] || (L[12] = (w) => a("link-mouseleave", w)),
|
|
1745
|
+
onBarClick: L[13] || (L[13] = (w) => a("bar-click", w)),
|
|
1746
|
+
onLineClick: L[14] || (L[14] = (w) => a("line-click", w)),
|
|
1747
|
+
onPointClick: L[15] || (L[15] = (w) => a("point-click", w)),
|
|
1748
1748
|
"onLume__internal-Hover": je
|
|
1749
1749
|
}, void 0, !0)
|
|
1750
1750
|
], 64)) : C("", !0)
|
|
@@ -1767,8 +1767,8 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1767
1767
|
async ([i, c]) => {
|
|
1768
1768
|
if (i && c) {
|
|
1769
1769
|
r.value = c, await Qe();
|
|
1770
|
-
const { width: s, height:
|
|
1771
|
-
r.value = s + Bt > c ? c : s + Bt, l.value = Math.ceil(
|
|
1770
|
+
const { width: s, height: m } = i.getBoundingClientRect();
|
|
1771
|
+
r.value = s + Bt > c ? c : s + Bt, l.value = Math.ceil(m);
|
|
1772
1772
|
}
|
|
1773
1773
|
},
|
|
1774
1774
|
{ immediate: !0 }
|
|
@@ -1782,8 +1782,8 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1782
1782
|
width: r.value,
|
|
1783
1783
|
height: l.value
|
|
1784
1784
|
}, [
|
|
1785
|
-
|
|
1786
|
-
|
|
1785
|
+
G("div", pa, [
|
|
1786
|
+
G("span", {
|
|
1787
1787
|
ref_key: "text",
|
|
1788
1788
|
ref: a,
|
|
1789
1789
|
class: "lume-alluvial-group__node-label"
|
|
@@ -1829,17 +1829,17 @@ const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-se
|
|
|
1829
1829
|
return (a, r) => (_(), I("g", {
|
|
1830
1830
|
transform: `translate(${e.x}, ${e.y})`
|
|
1831
1831
|
}, [
|
|
1832
|
-
|
|
1832
|
+
G("g", { transform: t.value }, [
|
|
1833
1833
|
B(a.$slots, "before", {}, void 0, !0)
|
|
1834
1834
|
], 8, Aa),
|
|
1835
|
-
|
|
1835
|
+
G("text", {
|
|
1836
1836
|
ref_key: "textRef",
|
|
1837
1837
|
ref: n,
|
|
1838
1838
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
1839
1839
|
}, [
|
|
1840
1840
|
B(a.$slots, "default", {}, void 0, !0)
|
|
1841
1841
|
], 512),
|
|
1842
|
-
|
|
1842
|
+
G("g", { transform: o.value }, [
|
|
1843
1843
|
B(a.$slots, "after", {}, void 0, !0)
|
|
1844
1844
|
], 8, Ta)
|
|
1845
1845
|
], 8, ba));
|
|
@@ -1925,7 +1925,7 @@ function Ra(e) {
|
|
|
1925
1925
|
var t;
|
|
1926
1926
|
return {
|
|
1927
1927
|
id: n.id,
|
|
1928
|
-
color: n.color || ((t = n.source) == null ? void 0 : t.color) ||
|
|
1928
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Se,
|
|
1929
1929
|
d: Ma(n)(n),
|
|
1930
1930
|
strokeWidth: Math.max(1, n.width),
|
|
1931
1931
|
link: n
|
|
@@ -1949,39 +1949,39 @@ function Rt(e, n, t, o, a) {
|
|
|
1949
1949
|
};
|
|
1950
1950
|
requestAnimationFrame(i);
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1952
|
+
const Ga = {
|
|
1953
1953
|
nodes: [],
|
|
1954
1954
|
links: []
|
|
1955
1955
|
};
|
|
1956
|
-
function
|
|
1956
|
+
function Gt(e, n) {
|
|
1957
1957
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Sa(e, n, t) {
|
|
1960
1960
|
const o = R(null), a = v(() => {
|
|
1961
|
-
var u,
|
|
1962
|
-
return (
|
|
1963
|
-
({ label: y, color:
|
|
1964
|
-
label: y ||
|
|
1965
|
-
color:
|
|
1966
|
-
fallbackColor:
|
|
1967
|
-
id:
|
|
1961
|
+
var u, f;
|
|
1962
|
+
return (f = (u = e.value) == null ? void 0 : u[0]) == null ? void 0 : f.values.map(
|
|
1963
|
+
({ label: y, color: g, value: A, deriveColorFromIncomingLinks: $, offset: k }) => ({
|
|
1964
|
+
label: y || A.toString(),
|
|
1965
|
+
color: g,
|
|
1966
|
+
fallbackColor: g || Se,
|
|
1967
|
+
id: A,
|
|
1968
1968
|
deriveColorFromIncomingLinks: $,
|
|
1969
|
-
offset:
|
|
1969
|
+
offset: k
|
|
1970
1970
|
})
|
|
1971
1971
|
);
|
|
1972
1972
|
}), r = v(
|
|
1973
1973
|
() => {
|
|
1974
|
-
var u,
|
|
1975
|
-
return (
|
|
1974
|
+
var u, f;
|
|
1975
|
+
return (f = (u = e.value) == null ? void 0 : u[0]) == null ? void 0 : f.values.map(
|
|
1976
1976
|
(y) => {
|
|
1977
|
-
var
|
|
1978
|
-
return (
|
|
1979
|
-
({ node:
|
|
1980
|
-
id: `${y.value}:${
|
|
1981
|
-
color:
|
|
1982
|
-
curveFunction:
|
|
1977
|
+
var g;
|
|
1978
|
+
return (g = y.targets) == null ? void 0 : g.map(
|
|
1979
|
+
({ node: A, value: $, color: k, curveFunction: p }) => ({
|
|
1980
|
+
id: `${y.value}:${A}`,
|
|
1981
|
+
color: k,
|
|
1982
|
+
curveFunction: p,
|
|
1983
1983
|
source: y.value ?? y.label,
|
|
1984
|
-
target:
|
|
1984
|
+
target: A,
|
|
1985
1985
|
value: $
|
|
1986
1986
|
})
|
|
1987
1987
|
);
|
|
@@ -1991,44 +1991,44 @@ function Ga(e, n, t) {
|
|
|
1991
1991
|
), l = v(() => mn().nodeId(Ie).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1992
1992
|
var u;
|
|
1993
1993
|
return (u = o.value) == null ? void 0 : u.nodes.reduce(
|
|
1994
|
-
(
|
|
1995
|
-
const
|
|
1996
|
-
return
|
|
1994
|
+
(f, y) => {
|
|
1995
|
+
const g = Gt(y, f);
|
|
1996
|
+
return g ? (g.push(y), g.sort((A, $) => (A._y0 || A.y0) - ($._y0 || $.y0))) : f.push([y]), f;
|
|
1997
1997
|
},
|
|
1998
1998
|
[]
|
|
1999
1999
|
);
|
|
2000
2000
|
});
|
|
2001
2001
|
function c(u) {
|
|
2002
|
-
const { offset:
|
|
2002
|
+
const { offset: f } = u, y = Gt(u, i.value);
|
|
2003
2003
|
if (!y) return;
|
|
2004
|
-
const
|
|
2005
|
-
u._y0 = u.y0, u._y1 = u.y1, u.y0 =
|
|
2004
|
+
const g = y[y.findIndex(($) => $.id === u.id) - 1], A = g && y.length !== 1 ? g.y1 + f : f;
|
|
2005
|
+
u._y0 = u.y0, u._y1 = u.y1, u.y0 = A, u.y1 = u.y0 + (u._y1 - u._y0);
|
|
2006
2006
|
}
|
|
2007
|
-
function s(u,
|
|
2008
|
-
const { id: y, _y0:
|
|
2007
|
+
function s(u, f) {
|
|
2008
|
+
const { id: y, _y0: g, y0: A } = u, $ = f.links.filter(
|
|
2009
2009
|
(O) => O.source.id === y
|
|
2010
|
-
),
|
|
2010
|
+
), k = f.links.filter(
|
|
2011
2011
|
(O) => O.target.id === y
|
|
2012
|
-
),
|
|
2013
|
-
$.forEach((O) => O.y0 +=
|
|
2012
|
+
), p = A - g;
|
|
2013
|
+
$.forEach((O) => O.y0 += p), k.forEach((O) => O.y1 += p);
|
|
2014
2014
|
}
|
|
2015
|
-
const
|
|
2015
|
+
const m = v(() => {
|
|
2016
2016
|
var u;
|
|
2017
|
-
return o.value && ((u = a.value) == null || u.forEach((
|
|
2018
|
-
|
|
2017
|
+
return o.value && ((u = a.value) == null || u.forEach((f) => {
|
|
2018
|
+
f.value === 0 && (f.fallbackColor = mt.Grey), typeof f.offset == "number" && (c(f), s(f, o.value));
|
|
2019
2019
|
})), o.value;
|
|
2020
2020
|
});
|
|
2021
2021
|
return X([l, t], () => {
|
|
2022
2022
|
try {
|
|
2023
|
-
const { x0: u, y0:
|
|
2023
|
+
const { x0: u, y0: f, x1: y, y1: g } = t.value;
|
|
2024
2024
|
o.value = l.value.extent([
|
|
2025
|
-
[u,
|
|
2026
|
-
[y,
|
|
2025
|
+
[u, f],
|
|
2026
|
+
[y, g]
|
|
2027
2027
|
])({ nodes: a.value, links: r.value });
|
|
2028
2028
|
} catch (u) {
|
|
2029
|
-
rt(Pe.GraphProblem, u), o.value =
|
|
2029
|
+
rt(Pe.GraphProblem, u), o.value = Ga;
|
|
2030
2030
|
}
|
|
2031
|
-
}), { columns: i, graph:
|
|
2031
|
+
}), { columns: i, graph: m };
|
|
2032
2032
|
}
|
|
2033
2033
|
function ut(e, n) {
|
|
2034
2034
|
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
@@ -2124,38 +2124,38 @@ const Ca = {
|
|
|
2124
2124
|
},
|
|
2125
2125
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2126
2126
|
setup(e, { emit: n }) {
|
|
2127
|
-
const t = e, o = n, a = Fe("chartID"), { data: r, options: l } = te(t), i = R([]), c = R([]), s = R(null), { extents:
|
|
2127
|
+
const t = e, o = n, a = Fe("chartID"), { data: r, options: l } = te(t), i = R([]), c = R([]), s = R(null), { extents: m, updateExtents: u } = Oa(t.containerSize), { columns: f, graph: y } = Sa(r, l, m), { hoveredElement: g, highlightedElements: A } = Fa(
|
|
2128
2128
|
i,
|
|
2129
2129
|
l,
|
|
2130
2130
|
y
|
|
2131
|
-
), $ = v(() => Ve(l.value.valueFormat)),
|
|
2132
|
-
() => Object.keys(
|
|
2133
|
-
),
|
|
2134
|
-
(
|
|
2131
|
+
), $ = v(() => Ve(l.value.valueFormat)), k = v(
|
|
2132
|
+
() => Object.keys(A.value.nodes)
|
|
2133
|
+
), p = v(() => f.value ? f.value.map(
|
|
2134
|
+
(b) => b[0].x0 + l.value.nodeWidth / 2
|
|
2135
2135
|
) : []), O = v(() => {
|
|
2136
2136
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2137
|
-
return l.value.nodeHeaders.slice(0,
|
|
2138
|
-
label:
|
|
2139
|
-
x:
|
|
2137
|
+
return l.value.nodeHeaders.slice(0, p.value.length).map((b, x) => ({
|
|
2138
|
+
label: b,
|
|
2139
|
+
x: p.value[x]
|
|
2140
2140
|
}));
|
|
2141
2141
|
}), N = v(
|
|
2142
2142
|
() => l.value.nodeHeaderPadding ?? va
|
|
2143
2143
|
), D = v(() => {
|
|
2144
2144
|
if (!(!l.value.gradient || !y.value))
|
|
2145
|
-
return y.value.links.reduce((
|
|
2145
|
+
return y.value.links.reduce((b, x) => {
|
|
2146
2146
|
const { source: h, target: M } = x, z = h.color || h.fallbackColor, le = M.deriveColorFromIncomingLinks ? z : M.color || M.fallbackColor;
|
|
2147
|
-
return
|
|
2147
|
+
return b[x.id] = {
|
|
2148
2148
|
source: z,
|
|
2149
2149
|
target: le,
|
|
2150
2150
|
x1: h.x1,
|
|
2151
2151
|
x2: M.x0
|
|
2152
|
-
},
|
|
2152
|
+
}, b;
|
|
2153
2153
|
}, {});
|
|
2154
2154
|
}), P = v(() => {
|
|
2155
|
-
const
|
|
2155
|
+
const b = i.value.filter(
|
|
2156
2156
|
(h) => Q(h)
|
|
2157
2157
|
), x = [];
|
|
2158
|
-
return
|
|
2158
|
+
return b.forEach((h) => {
|
|
2159
2159
|
const M = [];
|
|
2160
2160
|
c.value.filter(({ link: z }) => z.target.id === h.node.id).reverse().reduce((z, le, Ee, Ze) => {
|
|
2161
2161
|
const Ue = le.link.target.y1 - le.link.target.y0 > He;
|
|
@@ -2166,7 +2166,7 @@ const Ca = {
|
|
|
2166
2166
|
height: Oe,
|
|
2167
2167
|
width: h.width,
|
|
2168
2168
|
key: `node-block-${h.node.id}-source-link-${le.link.source.id}`,
|
|
2169
|
-
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color ||
|
|
2169
|
+
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Se}`
|
|
2170
2170
|
}), z + Oe;
|
|
2171
2171
|
}, 0), x.push({
|
|
2172
2172
|
id: h.node.id,
|
|
@@ -2174,58 +2174,58 @@ const Ca = {
|
|
|
2174
2174
|
});
|
|
2175
2175
|
}), x;
|
|
2176
2176
|
});
|
|
2177
|
-
function
|
|
2178
|
-
return l.value.gradient && `url('#${a}_${
|
|
2177
|
+
function S(b) {
|
|
2178
|
+
return l.value.gradient && `url('#${a}_${b.id}')`;
|
|
2179
2179
|
}
|
|
2180
|
-
function E(
|
|
2181
|
-
return
|
|
2180
|
+
function E(b) {
|
|
2181
|
+
return k.value.length > 0 && !k.value.includes(b.toString());
|
|
2182
2182
|
}
|
|
2183
|
-
function K(
|
|
2184
|
-
return
|
|
2183
|
+
function K(b) {
|
|
2184
|
+
return k.value.length > 0 && k.value.includes(b.toString());
|
|
2185
2185
|
}
|
|
2186
|
-
function U(
|
|
2187
|
-
return
|
|
2186
|
+
function U(b) {
|
|
2187
|
+
return A.value.links.length > 0 && !A.value.links.includes(b);
|
|
2188
2188
|
}
|
|
2189
|
-
function F(
|
|
2190
|
-
return
|
|
2189
|
+
function F(b) {
|
|
2190
|
+
return A.value.links.length > 0 && A.value.links.includes(b);
|
|
2191
2191
|
}
|
|
2192
|
-
function Q(
|
|
2193
|
-
return !
|
|
2192
|
+
function Q(b) {
|
|
2193
|
+
return !b.node.color && b.node.deriveColorFromIncomingLinks;
|
|
2194
2194
|
}
|
|
2195
|
-
function J(
|
|
2196
|
-
|
|
2195
|
+
function J(b, x) {
|
|
2196
|
+
b !== g.value && (g.value = b, o("link-mouseenter", { link: b, event: x }));
|
|
2197
2197
|
}
|
|
2198
|
-
function se(
|
|
2199
|
-
const x =
|
|
2200
|
-
|
|
2198
|
+
function se(b) {
|
|
2199
|
+
const x = g.value;
|
|
2200
|
+
g.value = null, o("link-mouseleave", { link: x, event: b });
|
|
2201
2201
|
}
|
|
2202
|
-
function pe(
|
|
2203
|
-
if (
|
|
2204
|
-
|
|
2202
|
+
function pe(b) {
|
|
2203
|
+
if (b == null) {
|
|
2204
|
+
g.value = null;
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
2207
|
-
const x = xa(
|
|
2207
|
+
const x = xa(b, y.value) || Ea(b, y.value);
|
|
2208
2208
|
if (!x) {
|
|
2209
2209
|
ye(me.InvalidHoveredElement);
|
|
2210
2210
|
return;
|
|
2211
2211
|
}
|
|
2212
|
-
|
|
2212
|
+
g.value = x;
|
|
2213
2213
|
}
|
|
2214
|
-
function Le(
|
|
2214
|
+
function Le(b) {
|
|
2215
2215
|
var x;
|
|
2216
|
-
return ((x = P.value.find(({ id: h }) =>
|
|
2216
|
+
return ((x = P.value.find(({ id: h }) => b === h)) == null ? void 0 : x.subNodes) ?? [];
|
|
2217
2217
|
}
|
|
2218
2218
|
function $e() {
|
|
2219
|
-
const
|
|
2220
|
-
u(
|
|
2219
|
+
const b = Na(y.value, s.value);
|
|
2220
|
+
u(b);
|
|
2221
2221
|
}
|
|
2222
|
-
return X(y, (
|
|
2223
|
-
i.value = Da(
|
|
2222
|
+
return X(y, (b) => {
|
|
2223
|
+
i.value = Da(b.nodes), c.value = Ra(b.links).reverse(), g.value == null && t.hoveredElementId != null && pe(t.hoveredElementId);
|
|
2224
2224
|
}), X([t.containerSize, s], () => {
|
|
2225
2225
|
t.containerSize.width && t.containerSize.height && $e();
|
|
2226
|
-
}), X(() => t.hoveredElementId, pe), (
|
|
2226
|
+
}), X(() => t.hoveredElementId, pe), (b, x) => (_(), I("g", Ca, [
|
|
2227
2227
|
O.value ? (_(), I("g", za, [
|
|
2228
|
-
(_(!0), I(q, null, W(O.value, (h, M) => B(
|
|
2228
|
+
(_(!0), I(q, null, W(O.value, (h, M) => B(b.$slots, `node-header-${M}`, {
|
|
2229
2229
|
x: h.x,
|
|
2230
2230
|
y: -N.value
|
|
2231
2231
|
}, () => [
|
|
@@ -2241,7 +2241,7 @@ const Ca = {
|
|
|
2241
2241
|
}, 1032, ["x", "y"]))
|
|
2242
2242
|
], !0)), 256))
|
|
2243
2243
|
])) : C("", !0),
|
|
2244
|
-
|
|
2244
|
+
G("g", {
|
|
2245
2245
|
class: "lume-alluvial-link-group",
|
|
2246
2246
|
onMouseleave: se
|
|
2247
2247
|
}, [
|
|
@@ -2253,11 +2253,11 @@ const Ca = {
|
|
|
2253
2253
|
x1: h.x1,
|
|
2254
2254
|
x2: h.x2
|
|
2255
2255
|
}, [
|
|
2256
|
-
|
|
2256
|
+
G("stop", {
|
|
2257
2257
|
offset: "0%",
|
|
2258
2258
|
"stop-color": `var(--lume-color--${h.source})`
|
|
2259
2259
|
}, null, 8, Ua),
|
|
2260
|
-
|
|
2260
|
+
G("stop", {
|
|
2261
2261
|
offset: "100%",
|
|
2262
2262
|
"stop-color": `var(--lume-color--${h.target})`
|
|
2263
2263
|
}, null, 8, Xa)
|
|
@@ -2283,9 +2283,9 @@ const Ca = {
|
|
|
2283
2283
|
"lume-alluvial-group__link--focused": F(h.id)
|
|
2284
2284
|
}]),
|
|
2285
2285
|
d: h.d,
|
|
2286
|
-
stroke:
|
|
2287
|
-
"stroke-dasharray":
|
|
2288
|
-
"stroke-dashoffset":
|
|
2286
|
+
stroke: S(h.link),
|
|
2287
|
+
"stroke-dasharray": b.containerSize.width,
|
|
2288
|
+
"stroke-dashoffset": b.containerSize.width,
|
|
2289
2289
|
"stroke-width": h.strokeWidth,
|
|
2290
2290
|
"data-j-alluvial-path": "",
|
|
2291
2291
|
"data-id": h.id,
|
|
@@ -2301,12 +2301,12 @@ const Ca = {
|
|
|
2301
2301
|
}]),
|
|
2302
2302
|
"data-j-alluvial-group__node-block": ""
|
|
2303
2303
|
}, [
|
|
2304
|
-
|
|
2304
|
+
G("g", {
|
|
2305
2305
|
onClick: (z) => o("node-click", { node: h.node, event: z }),
|
|
2306
2306
|
onMouseenter: (z) => o("node-mouseenter", { node: h.node, event: z }),
|
|
2307
2307
|
onMouseleave: (z) => o("node-mouseleave", { node: h.node, event: z }),
|
|
2308
|
-
onMouseover: (z) =>
|
|
2309
|
-
onMouseout: x[0] || (x[0] = (z) =>
|
|
2308
|
+
onMouseover: (z) => g.value = h.node,
|
|
2309
|
+
onMouseout: x[0] || (x[0] = (z) => g.value = null)
|
|
2310
2310
|
}, [
|
|
2311
2311
|
Q(h) ? (_(!0), I(q, { key: 0 }, W(Le(
|
|
2312
2312
|
h.node.id
|
|
@@ -2321,7 +2321,7 @@ const Ca = {
|
|
|
2321
2321
|
height: h.height,
|
|
2322
2322
|
width: h.width
|
|
2323
2323
|
}, null, 10, Qa)),
|
|
2324
|
-
|
|
2324
|
+
G("g", {
|
|
2325
2325
|
ref_for: !0,
|
|
2326
2326
|
ref_key: "nodeTextRefs",
|
|
2327
2327
|
ref: s,
|
|
@@ -2332,7 +2332,7 @@ const Ca = {
|
|
|
2332
2332
|
"data-id": h.node.id,
|
|
2333
2333
|
width: d(l).nodeLabelMaxWidth
|
|
2334
2334
|
}, [
|
|
2335
|
-
B(
|
|
2335
|
+
B(b.$slots, `node-text-${h.node.id}`, {
|
|
2336
2336
|
node: h.node,
|
|
2337
2337
|
value: $.value(
|
|
2338
2338
|
h.node.transitionValue || h.node.value,
|
|
@@ -2400,26 +2400,26 @@ const Ca = {
|
|
|
2400
2400
|
// Alluvial chart never uses base scales
|
|
2401
2401
|
};
|
|
2402
2402
|
}
|
|
2403
|
-
return (s,
|
|
2403
|
+
return (s, m) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2404
2404
|
options: c(d(i)),
|
|
2405
2405
|
"data-j-alluvial-diagram": ""
|
|
2406
2406
|
}, ae(d(o))), de({
|
|
2407
2407
|
groups: V((u) => [
|
|
2408
2408
|
ue(d(tl), j(u, { "hovered-element-id": s.hoveredElement }, ae(d(o))), de({ _: 2 }, [
|
|
2409
|
-
W(d(r), (
|
|
2409
|
+
W(d(r), (f, y) => ({
|
|
2410
2410
|
name: y,
|
|
2411
|
-
fn: V((
|
|
2412
|
-
B(s.$slots, y, he(ge(
|
|
2411
|
+
fn: V((g) => [
|
|
2412
|
+
B(s.$slots, y, he(ge(g || {})))
|
|
2413
2413
|
])
|
|
2414
2414
|
}))
|
|
2415
2415
|
]), 1040, ["hovered-element-id"])
|
|
2416
2416
|
]),
|
|
2417
2417
|
_: 2
|
|
2418
2418
|
}, [
|
|
2419
|
-
W(d(a), (u,
|
|
2420
|
-
name:
|
|
2419
|
+
W(d(a), (u, f) => ({
|
|
2420
|
+
name: f,
|
|
2421
2421
|
fn: V((y) => [
|
|
2422
|
-
B(s.$slots,
|
|
2422
|
+
B(s.$slots, f, he(ge(y || {})))
|
|
2423
2423
|
])
|
|
2424
2424
|
}))
|
|
2425
2425
|
]), 1040, ["options"]));
|
|
@@ -2438,11 +2438,11 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2438
2438
|
},
|
|
2439
2439
|
setup(e, { emit: n }) {
|
|
2440
2440
|
const t = Je(
|
|
2441
|
-
() => import("./
|
|
2441
|
+
() => import("./DxeNzuOu.js")
|
|
2442
2442
|
), o = Je(
|
|
2443
|
-
() => import("./
|
|
2443
|
+
() => import("./Dwk4pJH7.js")
|
|
2444
2444
|
), a = Je(
|
|
2445
|
-
() => import("./
|
|
2445
|
+
() => import("./DXlW7kpB.js")
|
|
2446
2446
|
), r = /* @__PURE__ */ new Map([
|
|
2447
2447
|
["single", t],
|
|
2448
2448
|
["grouped", o],
|
|
@@ -2459,26 +2459,26 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2459
2459
|
}
|
|
2460
2460
|
};
|
|
2461
2461
|
}
|
|
2462
|
-
const
|
|
2462
|
+
const m = v(() => {
|
|
2463
2463
|
if (st(l.data)) return r.get("single");
|
|
2464
2464
|
if (!l.type)
|
|
2465
2465
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2466
2466
|
return r.get(l.type);
|
|
2467
2467
|
});
|
|
2468
|
-
return (u,
|
|
2468
|
+
return (u, f) => (_(), Y(dn(m.value), j({ ...l, ...u.$attrs }, {
|
|
2469
2469
|
options: s(u.options)
|
|
2470
2470
|
}, ae(d(i))), de({ _: 2 }, [
|
|
2471
|
-
W(d(c), (y,
|
|
2472
|
-
name:
|
|
2473
|
-
fn: V((
|
|
2474
|
-
B(u.$slots,
|
|
2471
|
+
W(d(c), (y, g) => ({
|
|
2472
|
+
name: g,
|
|
2473
|
+
fn: V((A) => [
|
|
2474
|
+
B(u.$slots, g, he(ge(A || {})))
|
|
2475
2475
|
])
|
|
2476
2476
|
}))
|
|
2477
2477
|
]), 1040, ["options"]));
|
|
2478
2478
|
}
|
|
2479
2479
|
});
|
|
2480
2480
|
function ol(e) {
|
|
2481
|
-
return Object.values(
|
|
2481
|
+
return Object.values(Gn).includes(e) || e == null;
|
|
2482
2482
|
}
|
|
2483
2483
|
function al(e) {
|
|
2484
2484
|
return Object.values(H).includes(e);
|
|
@@ -2541,9 +2541,9 @@ function sl(e, n, t, o, a, r) {
|
|
|
2541
2541
|
const l = v(
|
|
2542
2542
|
() => o.value === H.HORIZONTAL
|
|
2543
2543
|
);
|
|
2544
|
-
function i(u,
|
|
2545
|
-
let y,
|
|
2546
|
-
return l.value ? (y = u >= 0 ? n.value(0) : n.value(u),
|
|
2544
|
+
function i(u, f) {
|
|
2545
|
+
let y, g;
|
|
2546
|
+
return l.value ? (y = u >= 0 ? n.value(0) : n.value(u), g = t.value(t.value.domain()[f])) : (y = n.value(n.value.domain()[f]), g = u < 0 ? t.value(0) : t.value(u)), { x: y, y: g };
|
|
2547
2547
|
}
|
|
2548
2548
|
function c(u) {
|
|
2549
2549
|
return l.value ? u < 0 ? n.value(0) - n.value(u) : n.value(u) - n.value(0) : n.value.bandwidth();
|
|
@@ -2551,20 +2551,20 @@ function sl(e, n, t, o, a, r) {
|
|
|
2551
2551
|
function s(u) {
|
|
2552
2552
|
return l.value ? t.value.bandwidth() : u < 0 ? t.value(u) - t.value(0) : t.value(0) - t.value(u);
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2554
|
+
function m(u, f, y) {
|
|
2555
2555
|
if (!(n.value && t.value)) return il;
|
|
2556
|
-
const { value:
|
|
2556
|
+
const { value: A, color: $ } = u, k = $ ?? e.value[f].color ?? Se, { x: p, y: O } = i(A, y), N = c(A), D = s(A);
|
|
2557
2557
|
return {
|
|
2558
|
-
classList: [`lume-fill--${
|
|
2559
|
-
x:
|
|
2558
|
+
classList: [`lume-fill--${k}`, ...r],
|
|
2559
|
+
x: p,
|
|
2560
2560
|
y: O,
|
|
2561
2561
|
width: N,
|
|
2562
2562
|
height: D,
|
|
2563
2563
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2564
|
-
isNegative:
|
|
2564
|
+
isNegative: A < 0
|
|
2565
2565
|
};
|
|
2566
2566
|
}
|
|
2567
|
-
return { barAttributeGenerator:
|
|
2567
|
+
return { barAttributeGenerator: m };
|
|
2568
2568
|
}
|
|
2569
2569
|
const cl = {
|
|
2570
2570
|
x: 0,
|
|
@@ -2575,37 +2575,37 @@ const cl = {
|
|
|
2575
2575
|
function dl(e, n, t, o, a, r) {
|
|
2576
2576
|
const l = v(
|
|
2577
2577
|
() => o.value === H.HORIZONTAL
|
|
2578
|
-
), i = v(() => Me().domain(e.value.map((
|
|
2579
|
-
function s(
|
|
2578
|
+
), i = v(() => Me().domain(e.value.map((g, A) => A)).range([0, n.value.bandwidth()]).padding(0)), c = v(() => Me().domain(e.value.map((g, A) => A)).range([0, t.value.bandwidth()]).padding(0));
|
|
2579
|
+
function s(g, A, $) {
|
|
2580
2580
|
if (l.value)
|
|
2581
|
-
return
|
|
2582
|
-
const
|
|
2583
|
-
return n.value(
|
|
2581
|
+
return g >= 0 ? n.value(0) : n.value(g);
|
|
2582
|
+
const k = n.value.domain();
|
|
2583
|
+
return n.value(k[A]) + i.value($);
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function m(g, A, $) {
|
|
2586
2586
|
if (l.value) {
|
|
2587
|
-
const
|
|
2588
|
-
return t.value(
|
|
2587
|
+
const k = t.value.domain();
|
|
2588
|
+
return t.value(k[A]) + c.value($);
|
|
2589
2589
|
}
|
|
2590
|
-
return
|
|
2590
|
+
return g < 0 ? t.value(0) : t.value(g);
|
|
2591
2591
|
}
|
|
2592
|
-
function u(
|
|
2593
|
-
return l.value ?
|
|
2592
|
+
function u(g) {
|
|
2593
|
+
return l.value ? g < 0 ? n.value(0) - n.value(g) : n.value(g) - n.value(0) : i.value.bandwidth();
|
|
2594
2594
|
}
|
|
2595
|
-
function
|
|
2596
|
-
return l.value ? c.value.bandwidth() :
|
|
2595
|
+
function f(g) {
|
|
2596
|
+
return l.value ? c.value.bandwidth() : g < 0 ? t.value(g) - t.value(0) : t.value(0) - t.value(g);
|
|
2597
2597
|
}
|
|
2598
|
-
function y(
|
|
2598
|
+
function y(g, A, $) {
|
|
2599
2599
|
if (!(n.value && t.value)) return cl;
|
|
2600
|
-
const { value:
|
|
2600
|
+
const { value: p, color: O } = g, N = O ?? e.value[A].color ?? Object.values(ie)[A], D = s(p, $, A), P = m(p, $, A), S = u(p), E = f(p);
|
|
2601
2601
|
return {
|
|
2602
2602
|
classList: [`lume-fill--${N}`, ...r],
|
|
2603
2603
|
x: D,
|
|
2604
2604
|
y: P,
|
|
2605
|
-
width:
|
|
2605
|
+
width: S,
|
|
2606
2606
|
height: E,
|
|
2607
2607
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2608
|
-
isNegative:
|
|
2608
|
+
isNegative: p < 0
|
|
2609
2609
|
};
|
|
2610
2610
|
}
|
|
2611
2611
|
return { barAttributeGenerator: y };
|
|
@@ -2615,37 +2615,37 @@ function vl(e, n, t) {
|
|
|
2615
2615
|
() => n.value === H.HORIZONTAL
|
|
2616
2616
|
), a = v(() => {
|
|
2617
2617
|
const c = e.value.map(
|
|
2618
|
-
(s) => s.filter((
|
|
2618
|
+
(s) => s.filter((m) => m.value < 0).reduce((m, u) => m + u.value, 0)
|
|
2619
2619
|
);
|
|
2620
2620
|
return Math.min(...c);
|
|
2621
2621
|
}), r = v(() => {
|
|
2622
2622
|
const c = e.value.map(
|
|
2623
2623
|
(s) => s.reduce(
|
|
2624
|
-
(
|
|
2624
|
+
(m, u) => u.value >= 0 ? m + u.value : m,
|
|
2625
2625
|
0
|
|
2626
2626
|
)
|
|
2627
2627
|
);
|
|
2628
2628
|
return Math.max(...c);
|
|
2629
2629
|
});
|
|
2630
|
-
function l(c, s,
|
|
2631
|
-
return s.length ? o.value ? Be().domain([a.value, r.value]).range([0,
|
|
2630
|
+
function l(c, s, m) {
|
|
2631
|
+
return s.length ? o.value ? Be().domain([a.value, r.value]).range([0, m.width]) : Object.assign(
|
|
2632
2632
|
Et(
|
|
2633
|
-
Me().domain(s.map((u,
|
|
2633
|
+
Me().domain(s.map((u, f) => f)).range([0, m.width]),
|
|
2634
2634
|
n.value,
|
|
2635
2635
|
t.value
|
|
2636
2636
|
),
|
|
2637
2637
|
{ labels: s }
|
|
2638
2638
|
) : null;
|
|
2639
2639
|
}
|
|
2640
|
-
function i(c, s,
|
|
2640
|
+
function i(c, s, m) {
|
|
2641
2641
|
return s.length ? o.value ? Object.assign(
|
|
2642
2642
|
Et(
|
|
2643
|
-
Me().domain(s.map((u,
|
|
2643
|
+
Me().domain(s.map((u, f) => f)).range([0, m.height]),
|
|
2644
2644
|
n.value,
|
|
2645
2645
|
t.value
|
|
2646
2646
|
),
|
|
2647
2647
|
{ labels: s }
|
|
2648
|
-
) : Be().domain([r.value, a.value]).range([0,
|
|
2648
|
+
) : Be().domain([r.value, a.value]).range([0, m.height]) : null;
|
|
2649
2649
|
}
|
|
2650
2650
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2651
2651
|
}
|
|
@@ -2655,36 +2655,36 @@ function ml(e, n, t, o, a, r) {
|
|
|
2655
2655
|
), i = v(
|
|
2656
2656
|
() => l.value ? t.value.domain() : n.value.domain()
|
|
2657
2657
|
), c = v(
|
|
2658
|
-
() => e.value.map((
|
|
2658
|
+
() => e.value.map((k) => k.values.map((p) => p == null ? void 0 : p.value))
|
|
2659
2659
|
);
|
|
2660
|
-
function s(
|
|
2660
|
+
function s(k, p, O) {
|
|
2661
2661
|
let N, D;
|
|
2662
|
-
return l.value ? (N = n.value(
|
|
2662
|
+
return l.value ? (N = n.value(k >= 0 ? 0 + O : k + O), D = t.value(i.value[p])) : (N = n.value(i.value[p]), D = t.value(k >= 0 ? k + O : 0 + O)), { x: N, y: D };
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2665
|
-
return l.value ? n.value(
|
|
2664
|
+
function m(k) {
|
|
2665
|
+
return l.value ? n.value(k) - n.value(0) : n.value.bandwidth();
|
|
2666
2666
|
}
|
|
2667
|
-
function u(
|
|
2668
|
-
return l.value ? n.value(0) - n.value(
|
|
2667
|
+
function u(k) {
|
|
2668
|
+
return l.value ? n.value(0) - n.value(k) : n.value.bandwidth();
|
|
2669
2669
|
}
|
|
2670
|
-
function
|
|
2671
|
-
return l.value ? t.value.bandwidth() : t.value(0) - t.value(
|
|
2670
|
+
function f(k) {
|
|
2671
|
+
return l.value ? t.value.bandwidth() : t.value(0) - t.value(k);
|
|
2672
2672
|
}
|
|
2673
|
-
function y(
|
|
2674
|
-
return l.value ? t.value.bandwidth() : t.value(
|
|
2673
|
+
function y(k) {
|
|
2674
|
+
return l.value ? t.value.bandwidth() : t.value(k) - t.value(0);
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return
|
|
2676
|
+
function g(k, p) {
|
|
2677
|
+
return k ? c.value.reduce((O, N, D) => (D < k && N[p] >= 0 && (O += N[p]), O), 0) : 0;
|
|
2678
2678
|
}
|
|
2679
|
-
function
|
|
2680
|
-
return
|
|
2679
|
+
function A(k, p) {
|
|
2680
|
+
return k ? c.value.reduce((O, N, D) => (D < k && N[p] < 0 && (O += N[p]), O), 0) : 0;
|
|
2681
2681
|
}
|
|
2682
|
-
function $(
|
|
2683
|
-
const { value: N, color: D } =
|
|
2682
|
+
function $(k, p, O) {
|
|
2683
|
+
const { value: N, color: D } = k, P = N >= 0 ? m(N) : u(N), S = N >= 0 ? f(N) : y(N), E = N >= 0 ? g(p, O) : A(p, O), { x: K, y: U } = s(N, O, E);
|
|
2684
2684
|
return {
|
|
2685
|
-
classList: [`lume-fill--${D ?? e.value[
|
|
2685
|
+
classList: [`lume-fill--${D ?? e.value[p].color ?? Object.values(ie)[p]}`, ...r],
|
|
2686
2686
|
width: P,
|
|
2687
|
-
height:
|
|
2687
|
+
height: S,
|
|
2688
2688
|
x: K,
|
|
2689
2689
|
y: U,
|
|
2690
2690
|
isFaded: a.value !== -1 && a.value !== O,
|
|
@@ -2723,19 +2723,19 @@ const fl = {
|
|
|
2723
2723
|
transition: i,
|
|
2724
2724
|
type: c,
|
|
2725
2725
|
xScale: s,
|
|
2726
|
-
yScale:
|
|
2726
|
+
yScale: m,
|
|
2727
2727
|
classList: u,
|
|
2728
|
-
labels:
|
|
2728
|
+
labels: f
|
|
2729
2729
|
} = te(t);
|
|
2730
2730
|
Fe("chartID");
|
|
2731
|
-
const { emitInternalEvent: y } = ke(), { groupedData:
|
|
2731
|
+
const { emitInternalEvent: y } = ke(), { groupedData: g } = on(a, f), { barXScale: A, barYScale: $ } = ul(s, m, l), k = v(() => typeof u.value == "string" ? [u.value] : u.value), p = v(() => {
|
|
2732
2732
|
const D = rl(a, c), { barAttributeGenerator: P } = hl[D](
|
|
2733
2733
|
a,
|
|
2734
|
-
|
|
2734
|
+
A,
|
|
2735
2735
|
$,
|
|
2736
2736
|
l,
|
|
2737
2737
|
r,
|
|
2738
|
-
|
|
2738
|
+
k.value
|
|
2739
2739
|
);
|
|
2740
2740
|
return P;
|
|
2741
2741
|
}), O = v(() => {
|
|
@@ -2746,11 +2746,11 @@ const fl = {
|
|
|
2746
2746
|
o("lume__internal--hover", D), y("lume__internal--hover", D);
|
|
2747
2747
|
}
|
|
2748
2748
|
return (D, P) => (_(), I("g", fl, [
|
|
2749
|
-
(_(!0), I(q, null, W(d(
|
|
2749
|
+
(_(!0), I(q, null, W(d(g), (S, E) => (_(), I("g", {
|
|
2750
2750
|
key: E,
|
|
2751
2751
|
onMouseenter: (K) => N(E)
|
|
2752
2752
|
}, [
|
|
2753
|
-
(_(!0), I(q, null, W(
|
|
2753
|
+
(_(!0), I(q, null, W(S, (K, U) => (_(), Y(d(dt), j(p.value(K, U, E, S), {
|
|
2754
2754
|
key: `bar-${U}`,
|
|
2755
2755
|
transition: O.value,
|
|
2756
2756
|
"data-j-lume-bar": "",
|
|
@@ -2786,7 +2786,7 @@ const fl = {
|
|
|
2786
2786
|
() => gl[r.value || H.VERTICAL]
|
|
2787
2787
|
// needs to be computed so that default options are reactive
|
|
2788
2788
|
), { allOptions: c } = fe(l, i);
|
|
2789
|
-
return (s,
|
|
2789
|
+
return (s, m) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2790
2790
|
"chart-type": "single-bar",
|
|
2791
2791
|
options: d(c),
|
|
2792
2792
|
"data-j-single-bar-chart": ""
|
|
@@ -2796,10 +2796,10 @@ const fl = {
|
|
|
2796
2796
|
]),
|
|
2797
2797
|
_: 2
|
|
2798
2798
|
}, [
|
|
2799
|
-
W(d(a), (u,
|
|
2800
|
-
name:
|
|
2799
|
+
W(d(a), (u, f) => ({
|
|
2800
|
+
name: f,
|
|
2801
2801
|
fn: V((y) => [
|
|
2802
|
-
B(s.$slots,
|
|
2802
|
+
B(s.$slots, f, he(ge(y || {})))
|
|
2803
2803
|
])
|
|
2804
2804
|
}))
|
|
2805
2805
|
]), 1040, ["options"]));
|
|
@@ -2831,7 +2831,7 @@ const fl = {
|
|
|
2831
2831
|
l,
|
|
2832
2832
|
i
|
|
2833
2833
|
);
|
|
2834
|
-
return (s,
|
|
2834
|
+
return (s, m) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2835
2835
|
"chart-type": "grouped-bar",
|
|
2836
2836
|
options: d(c),
|
|
2837
2837
|
"data-j-grouped-bar-chart": ""
|
|
@@ -2841,10 +2841,10 @@ const fl = {
|
|
|
2841
2841
|
]),
|
|
2842
2842
|
_: 2
|
|
2843
2843
|
}, [
|
|
2844
|
-
W(d(a), (u,
|
|
2845
|
-
name:
|
|
2844
|
+
W(d(a), (u, f) => ({
|
|
2845
|
+
name: f,
|
|
2846
2846
|
fn: V((y) => [
|
|
2847
|
-
B(s.$slots,
|
|
2847
|
+
B(s.$slots, f, he(ge(y || {})))
|
|
2848
2848
|
])
|
|
2849
2849
|
}))
|
|
2850
2850
|
]), 1040, ["options"]));
|
|
@@ -2873,18 +2873,18 @@ const fl = {
|
|
|
2873
2873
|
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { data: r, orientation: l, options: i, labels: c } = te(t), s = v(
|
|
2874
2874
|
() => _l[l.value || H.VERTICAL]
|
|
2875
2875
|
// needs to be computed so that default options are reactive
|
|
2876
|
-
), { allOptions:
|
|
2876
|
+
), { allOptions: m } = fe(
|
|
2877
2877
|
i,
|
|
2878
2878
|
s
|
|
2879
|
-
), { internalData: u } = ht(r), { groupedData:
|
|
2880
|
-
|
|
2879
|
+
), { internalData: u } = ht(r), { groupedData: f } = on(u, c), { stackedXScaleGenerator: y, stackedYScaleGenerator: g } = vl(
|
|
2880
|
+
f,
|
|
2881
2881
|
l,
|
|
2882
2882
|
i
|
|
2883
|
-
),
|
|
2884
|
-
return (
|
|
2883
|
+
), A = v(() => t.xScale || y), $ = v(() => t.yScale || g);
|
|
2884
|
+
return (k, p) => (_(), Y(d(xe), j({ ...t, ...k.$attrs }, {
|
|
2885
2885
|
"chart-type": "stacked-bar",
|
|
2886
|
-
options: d(
|
|
2887
|
-
"x-scale":
|
|
2886
|
+
options: d(m),
|
|
2887
|
+
"x-scale": A.value,
|
|
2888
2888
|
"y-scale": $.value,
|
|
2889
2889
|
"data-j-stacked-bar-chart": ""
|
|
2890
2890
|
}, ae(d(o))), de({
|
|
@@ -2896,7 +2896,7 @@ const fl = {
|
|
|
2896
2896
|
W(d(a), (O, N) => ({
|
|
2897
2897
|
name: N,
|
|
2898
2898
|
fn: V((D) => [
|
|
2899
|
-
B(
|
|
2899
|
+
B(k.$slots, N, he(ge(D || {})))
|
|
2900
2900
|
])
|
|
2901
2901
|
}))
|
|
2902
2902
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
@@ -2984,48 +2984,52 @@ const fl = {
|
|
|
2984
2984
|
}, null, 10, Ll));
|
|
2985
2985
|
}
|
|
2986
2986
|
}), wl = /* @__PURE__ */ ee(Il, [["__scopeId", "data-v-080270c0"]]);
|
|
2987
|
-
function an(e) {
|
|
2988
|
-
function
|
|
2989
|
-
let
|
|
2990
|
-
return
|
|
2991
|
-
}
|
|
2992
|
-
function
|
|
2993
|
-
const
|
|
2994
|
-
return
|
|
2995
|
-
}
|
|
2996
|
-
function
|
|
2997
|
-
return function(
|
|
2998
|
-
return !!
|
|
2999
|
-
(
|
|
2987
|
+
function an(e, n) {
|
|
2988
|
+
function t(l) {
|
|
2989
|
+
let i = null;
|
|
2990
|
+
return l == null ? void 0 : l.reduce((c, s, m) => (s == null || s.value == null ? (i ? i.push(m) : i = [m], m === (l == null ? void 0 : l.length) - 1 && c.push(i)) : i && (c.push(i), i = null), c), []);
|
|
2991
|
+
}
|
|
2992
|
+
function o(l, i, c, s) {
|
|
2993
|
+
const f = Math.abs(l - i) / (c + 1) * (s + 1);
|
|
2994
|
+
return l == null && i == null ? null : l > i ? l - f : l + f;
|
|
2995
|
+
}
|
|
2996
|
+
function a(l) {
|
|
2997
|
+
return function(c) {
|
|
2998
|
+
return !!l.find(
|
|
2999
|
+
(s) => s.includes(c) || s.includes(c - 1)
|
|
3000
3000
|
);
|
|
3001
3001
|
};
|
|
3002
3002
|
}
|
|
3003
3003
|
return { computedLineData: v(
|
|
3004
|
-
() => e.value.map((
|
|
3005
|
-
const
|
|
3004
|
+
() => e.value.map((l) => {
|
|
3005
|
+
const i = t(l.values);
|
|
3006
3006
|
return {
|
|
3007
|
-
...
|
|
3008
|
-
isDashed:
|
|
3009
|
-
values:
|
|
3010
|
-
var f,
|
|
3011
|
-
const
|
|
3012
|
-
(
|
|
3007
|
+
...l,
|
|
3008
|
+
isDashed: a(i),
|
|
3009
|
+
values: l.values.map((c, s) => {
|
|
3010
|
+
var u, f, y, g;
|
|
3011
|
+
const m = i.find(
|
|
3012
|
+
(A) => A.includes(s)
|
|
3013
3013
|
);
|
|
3014
|
-
if (
|
|
3015
|
-
const
|
|
3016
|
-
let
|
|
3017
|
-
|
|
3018
|
-
value:
|
|
3014
|
+
if (m) {
|
|
3015
|
+
const A = m[0] - 1, $ = m[m.length - 1] + 1;
|
|
3016
|
+
let k = (u = l.values[A]) == null ? void 0 : u.value, p = (f = l.values[$]) == null ? void 0 : f.value;
|
|
3017
|
+
if (k == null) {
|
|
3018
|
+
const O = (g = (y = n == null ? void 0 : n.value) == null ? void 0 : y.domain) == null ? void 0 : g.call(y);
|
|
3019
|
+
k = (O == null ? void 0 : O[1]) ?? 0, p = k;
|
|
3020
|
+
} else p == null && (p = k);
|
|
3021
|
+
return {
|
|
3022
|
+
value: o(
|
|
3023
|
+
k,
|
|
3019
3024
|
p,
|
|
3020
|
-
|
|
3021
|
-
s
|
|
3022
|
-
s.indexOf(c)
|
|
3025
|
+
m.length,
|
|
3026
|
+
m.indexOf(s)
|
|
3023
3027
|
),
|
|
3024
3028
|
label: Zt,
|
|
3025
3029
|
isNull: !0
|
|
3026
3030
|
};
|
|
3027
3031
|
}
|
|
3028
|
-
return
|
|
3032
|
+
return c;
|
|
3029
3033
|
})
|
|
3030
3034
|
};
|
|
3031
3035
|
})
|
|
@@ -3069,7 +3073,7 @@ const Dl = {
|
|
|
3069
3073
|
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: c } = te(t), s = Fe(
|
|
3070
3074
|
"tooltipAnchorAttributes",
|
|
3071
3075
|
null
|
|
3072
|
-
), { updateTooltipAnchorAttributes:
|
|
3076
|
+
), { updateTooltipAnchorAttributes: m } = en(
|
|
3073
3077
|
s,
|
|
3074
3078
|
r,
|
|
3075
3079
|
l,
|
|
@@ -3078,9 +3082,12 @@ const Dl = {
|
|
|
3078
3082
|
), u = v(() => {
|
|
3079
3083
|
if (a.value.every((K) => K.isDashed))
|
|
3080
3084
|
return a.value;
|
|
3081
|
-
const { computedLineData: E } = an(
|
|
3082
|
-
|
|
3083
|
-
|
|
3085
|
+
const { computedLineData: E } = an(
|
|
3086
|
+
a,
|
|
3087
|
+
i
|
|
3088
|
+
);
|
|
3089
|
+
return r.value.withTooltip !== !1 && (s != null && s.value) && m(E.value), E.value;
|
|
3090
|
+
}), f = v(() => {
|
|
3084
3091
|
if (t.hoveredIndex === -1) return;
|
|
3085
3092
|
const E = xn(
|
|
3086
3093
|
u.value,
|
|
@@ -3094,17 +3101,17 @@ const Dl = {
|
|
|
3094
3101
|
}), y = v(
|
|
3095
3102
|
() => l.value && Ml / (En(l.value) - 1)
|
|
3096
3103
|
// Subtracting the first line (read below)
|
|
3097
|
-
),
|
|
3104
|
+
), g = v(
|
|
3098
3105
|
() => {
|
|
3099
3106
|
var E;
|
|
3100
3107
|
return ((E = r.value) == null ? void 0 : E.lineWidth) * 2 || void 0;
|
|
3101
3108
|
}
|
|
3102
3109
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3103
|
-
),
|
|
3110
|
+
), A = v(
|
|
3104
3111
|
() => l.value.bandwidth() / 2
|
|
3105
|
-
), $ = v(() => l.value.domain()),
|
|
3112
|
+
), $ = v(() => l.value.domain()), k = v(
|
|
3106
3113
|
() => r.value.withPoints ?? t.withPoints
|
|
3107
|
-
),
|
|
3114
|
+
), p = v(
|
|
3108
3115
|
() => r.value.withPoints === "visible" || t.withPoints === "visible"
|
|
3109
3116
|
);
|
|
3110
3117
|
function O(E) {
|
|
@@ -3133,15 +3140,15 @@ const Dl = {
|
|
|
3133
3140
|
var F;
|
|
3134
3141
|
const U = (F = O(K)[E]) == null ? void 0 : F.value;
|
|
3135
3142
|
return {
|
|
3136
|
-
x: ve(l.value) ? t.xScale($.value[E]) +
|
|
3143
|
+
x: ve(l.value) ? t.xScale($.value[E]) + A.value : t.xScale(E),
|
|
3137
3144
|
y: U === null ? i.value(i.value.domain()[1]) : i.value(U)
|
|
3138
3145
|
};
|
|
3139
3146
|
}
|
|
3140
|
-
function
|
|
3147
|
+
function S(E) {
|
|
3141
3148
|
return t.hoveredIndex === E;
|
|
3142
3149
|
}
|
|
3143
3150
|
return (E, K) => (_(), I("g", Dl, [
|
|
3144
|
-
|
|
3151
|
+
G("path", j(f.value, {
|
|
3145
3152
|
class: "lume-line-group__overlay-line",
|
|
3146
3153
|
"data-j-lume-line-group__overlay-line": ""
|
|
3147
3154
|
}), null, 16),
|
|
@@ -3149,7 +3156,7 @@ const Dl = {
|
|
|
3149
3156
|
key: U.label,
|
|
3150
3157
|
class: "lume-line-group__group"
|
|
3151
3158
|
}, [
|
|
3152
|
-
|
|
3159
|
+
G("g", Hl, [
|
|
3153
3160
|
(_(!0), I(q, null, W(U.values, (Q, J) => (_(), Y(d(Tl), j(D(J), {
|
|
3154
3161
|
key: `line-${J}`,
|
|
3155
3162
|
color: U.color,
|
|
@@ -3160,16 +3167,16 @@ const Dl = {
|
|
|
3160
3167
|
onClick: (se) => o("line-click", { index: J, datasetIndex: F, event: se })
|
|
3161
3168
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3162
3169
|
]),
|
|
3163
|
-
|
|
3170
|
+
k.value ? (_(), I("g", Bl, [
|
|
3164
3171
|
(_(!0), I(q, null, W(U.values, (Q, J) => (_(), I(q, {
|
|
3165
3172
|
key: `point-${J}`
|
|
3166
3173
|
}, [
|
|
3167
3174
|
Q.isNull ? C("", !0) : (_(), Y(d(wl), j({ key: 0 }, P(J, F), {
|
|
3168
|
-
active:
|
|
3175
|
+
active: S(J),
|
|
3169
3176
|
color: U.color,
|
|
3170
3177
|
index: J,
|
|
3171
|
-
radius:
|
|
3172
|
-
visible:
|
|
3178
|
+
radius: g.value,
|
|
3179
|
+
visible: p.value,
|
|
3173
3180
|
onClick: (se) => o("point-click", { index: J, datasetIndex: F, event: se })
|
|
3174
3181
|
}), null, 16, ["active", "color", "index", "radius", "visible", "onClick"]))
|
|
3175
3182
|
], 64))), 128))
|
|
@@ -3177,7 +3184,7 @@ const Dl = {
|
|
|
3177
3184
|
]))), 128))
|
|
3178
3185
|
]));
|
|
3179
3186
|
}
|
|
3180
|
-
}), ln = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-
|
|
3187
|
+
}), ln = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-898c2e7a"]]), Gl = {
|
|
3181
3188
|
margins: Ae.VERTICAL,
|
|
3182
3189
|
startOnZero: !0,
|
|
3183
3190
|
withTooltip: !0,
|
|
@@ -3189,7 +3196,7 @@ const Dl = {
|
|
|
3189
3196
|
...we(null, !1)
|
|
3190
3197
|
},
|
|
3191
3198
|
setup(e, { emit: n }) {
|
|
3192
|
-
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { options: r } = te(t), { allOptions: l } = fe(r,
|
|
3199
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { options: r } = te(t), { allOptions: l } = fe(r, Gl);
|
|
3193
3200
|
return (i, c) => (_(), Y(d(xe), j({ ...t, ...i.$attrs }, {
|
|
3194
3201
|
"chart-type": "line",
|
|
3195
3202
|
options: d(l),
|
|
@@ -3200,16 +3207,16 @@ const Dl = {
|
|
|
3200
3207
|
]),
|
|
3201
3208
|
_: 2
|
|
3202
3209
|
}, [
|
|
3203
|
-
W(d(a), (s,
|
|
3204
|
-
name:
|
|
3210
|
+
W(d(a), (s, m) => ({
|
|
3211
|
+
name: m,
|
|
3205
3212
|
fn: V((u) => [
|
|
3206
|
-
B(i.$slots,
|
|
3213
|
+
B(i.$slots, m, he(ge(u || {})))
|
|
3207
3214
|
])
|
|
3208
3215
|
}))
|
|
3209
3216
|
]), 1040, ["options"]));
|
|
3210
3217
|
}
|
|
3211
3218
|
});
|
|
3212
|
-
function
|
|
3219
|
+
function Sl(e) {
|
|
3213
3220
|
return { areaPathDefinition: v(
|
|
3214
3221
|
() => function(t, o) {
|
|
3215
3222
|
if (!t || !o || ve(t) || ve(o))
|
|
@@ -3240,49 +3247,49 @@ const jl = {
|
|
|
3240
3247
|
...Re()
|
|
3241
3248
|
},
|
|
3242
3249
|
setup(e, { expose: n, emit: t }) {
|
|
3243
|
-
const o = e, { componentEventPropagator: a } = ke(), r = Te(re()), { data: l, options: i } = te(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData:
|
|
3244
|
-
var $,
|
|
3245
|
-
return (
|
|
3250
|
+
const o = e, { componentEventPropagator: a } = ke(), r = Te(re()), { data: l, options: i } = te(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData: m } = an(c), { areaPathDefinition: u } = Sl(m), f = v(() => {
|
|
3251
|
+
var $, k;
|
|
3252
|
+
return (k = ($ = c.value) == null ? void 0 : $[0]) == null ? void 0 : k.color;
|
|
3246
3253
|
}), y = v(
|
|
3247
3254
|
() => {
|
|
3248
|
-
var $,
|
|
3249
|
-
return ((
|
|
3255
|
+
var $, k;
|
|
3256
|
+
return ((k = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : k.areaColor) || f.value;
|
|
3250
3257
|
}
|
|
3251
3258
|
);
|
|
3252
|
-
function
|
|
3259
|
+
function g($) {
|
|
3253
3260
|
return {
|
|
3254
3261
|
...$,
|
|
3255
3262
|
noMinSize: !0
|
|
3256
3263
|
};
|
|
3257
3264
|
}
|
|
3258
|
-
function
|
|
3265
|
+
function A($, k, p) {
|
|
3259
3266
|
if ($.length)
|
|
3260
|
-
return Be().range([0,
|
|
3267
|
+
return Be().range([0, p.width]).domain([0, $[0].values.length - 1]);
|
|
3261
3268
|
}
|
|
3262
3269
|
return n({
|
|
3263
3270
|
areaPathDefinition: u
|
|
3264
|
-
}), ($,
|
|
3271
|
+
}), ($, k) => (_(), Y(d(xe), j(o, {
|
|
3265
3272
|
"chart-type": "line",
|
|
3266
|
-
options:
|
|
3267
|
-
"x-scale":
|
|
3273
|
+
options: g(d(s)),
|
|
3274
|
+
"x-scale": A
|
|
3268
3275
|
}, ae(d(a))), de({
|
|
3269
|
-
groups: V((
|
|
3276
|
+
groups: V((p) => [
|
|
3270
3277
|
d(s).showArea ? (_(), I("path", {
|
|
3271
3278
|
key: 0,
|
|
3272
3279
|
class: ne([
|
|
3273
3280
|
"sparkline-chart__area",
|
|
3274
3281
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3275
|
-
`lume-fill--${y.value ||
|
|
3282
|
+
`lume-fill--${y.value || f.value}`,
|
|
3276
3283
|
"lume-fill--faded"
|
|
3277
3284
|
]),
|
|
3278
|
-
d: d(u)(
|
|
3285
|
+
d: d(u)(p.xScale, p.yScale),
|
|
3279
3286
|
"data-j-sparkline__area": ""
|
|
3280
3287
|
}, null, 10, Vl)) : C("", !0),
|
|
3281
|
-
ue(d(ln), j(
|
|
3288
|
+
ue(d(ln), j(p, { "with-points": !1 }, ae(d(a))), null, 16)
|
|
3282
3289
|
]),
|
|
3283
3290
|
_: 2
|
|
3284
3291
|
}, [
|
|
3285
|
-
W(d(r), (
|
|
3292
|
+
W(d(r), (p, O) => ({
|
|
3286
3293
|
name: O,
|
|
3287
3294
|
fn: V((N) => [
|
|
3288
3295
|
B($.$slots, O, he(ge(N || {})), void 0, !0)
|
|
@@ -3343,4 +3350,4 @@ export {
|
|
|
3343
3350
|
$o as y,
|
|
3344
3351
|
Wo as z
|
|
3345
3352
|
};
|
|
3346
|
-
//# sourceMappingURL=
|
|
3353
|
+
//# sourceMappingURL=GemUpYsK.js.map
|