@adyen/lume-vue3 1.14.0 → 1.15.0
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/charts/lume-alluvial-diagram/defaults.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -1
- package/dist/@types/types/alluvial.d.ts +1 -0
- package/dist/@types/types/alluvial.d.ts.map +1 -1
- package/dist/@types/types/options.d.ts +2 -1
- package/dist/@types/types/options.d.ts.map +1 -1
- package/dist/common/0W8x2hzC.js +5 -0
- package/dist/common/0W8x2hzC.js.map +1 -0
- package/dist/common/{BWERTAeM.js → Bksflyvk.js} +702 -686
- package/dist/common/Bksflyvk.js.map +1 -0
- package/dist/common/Cv9UKwcP.js +5 -0
- package/dist/common/Cv9UKwcP.js.map +1 -0
- package/dist/common/DAIy0MBF.js +5 -0
- package/dist/common/DAIy0MBF.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +13 -0
- package/dist/scss/main.scss +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
- package/dist/common/BCXeP0Sq.js +0 -5
- package/dist/common/BCXeP0Sq.js.map +0 -1
- package/dist/common/BWERTAeM.js.map +0 -1
- package/dist/common/BgK2FUMU.js +0 -5
- package/dist/common/BgK2FUMU.js.map +0 -1
- package/dist/common/CwUwobmG.js +0 -5
- package/dist/common/CwUwobmG.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Q, ref as S, openBlock as _, createElementBlock as O, mergeProps as V, createElementVNode as j, toDisplayString as re, createCommentVNode as Z, isRef as Ut, computed as m, watch as X, toRefs as le, inject as Ke, reactive as Je, onMounted as $e, unref as v, Fragment as te, renderList as J, createBlock as q, normalizeStyle as Zt, normalizeClass as ae, watchEffect as Xt, onBeforeUnmount as Yt, renderSlot as G, createTextVNode as pe, useSlots as de, nextTick as at, withCtx as U, createSlots as ge, pushScopeId as _n, popScopeId as kn, provide as nt, createVNode as ve, withKeys as xt, withModifiers as Ot, toHandlers as ie, normalizeProps as Le, guardReactiveProps as Ae, defineAsyncComponent as ot, resolveDynamicComponent as bn } from "vue";
|
|
2
2
|
import { sankeyLinkHorizontal as Ln, sankey as An, sankeyJustify as Tn } from "d3-sankey";
|
|
3
|
-
import { format as $n, ticks as In, scaleLinear as
|
|
3
|
+
import { format as $n, ticks as In, scaleLinear as Fe, scaleBand as je, link as xn, line as On, area as wn } from "d3";
|
|
4
4
|
import { createPopper as Nn } from "@popperjs/core";
|
|
5
5
|
const En = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
7
7
|
"pointer-events": "all",
|
|
8
8
|
"data-j-axis__tick-label": ""
|
|
9
|
-
}, Dn = /* @__PURE__ */
|
|
9
|
+
}, Dn = /* @__PURE__ */ Q({
|
|
10
10
|
__name: "lume-tick",
|
|
11
11
|
props: {
|
|
12
12
|
value: {
|
|
@@ -44,8 +44,8 @@ const En = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t, a =
|
|
48
|
-
return n({ ref: a }), (r, l) => (_(),
|
|
47
|
+
const o = t, a = S(null);
|
|
48
|
+
return n({ ref: a }), (r, l) => (_(), O("g", V(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -55,17 +55,17 @@ const En = {
|
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
57
|
j("g", En, [
|
|
58
|
-
j("rect",
|
|
58
|
+
j("rect", V(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
j("text",
|
|
62
|
+
j("text", V(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
66
|
-
}),
|
|
66
|
+
}), re(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (_(),
|
|
68
|
+
e.withGridlines ? (_(), O("line", V({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : Z("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
}), oe = (e, n) => {
|
|
@@ -73,7 +73,7 @@ const En = {
|
|
|
73
73
|
for (const [o, a] of n)
|
|
74
74
|
t[o] = a;
|
|
75
75
|
return t;
|
|
76
|
-
}, wt = /* @__PURE__ */ oe(Dn, [["__scopeId", "data-v-59ddc0a6"]]),
|
|
76
|
+
}, wt = /* @__PURE__ */ oe(Dn, [["__scopeId", "data-v-59ddc0a6"]]), Bn = [
|
|
77
77
|
"controls",
|
|
78
78
|
"legend",
|
|
79
79
|
"axes",
|
|
@@ -92,7 +92,7 @@ function Jt(e) {
|
|
|
92
92
|
function pt(e) {
|
|
93
93
|
return e.length === 1;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function Hn(e) {
|
|
96
96
|
return !!e && e.every(
|
|
97
97
|
(n) => "color" in n
|
|
98
98
|
);
|
|
@@ -150,10 +150,10 @@ function qt(e) {
|
|
|
150
150
|
function jn(e) {
|
|
151
151
|
return he(e) ? e.domain().length : Math.max(...e.domain());
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Cn(e, n) {
|
|
154
154
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Pn(e, n, t) {
|
|
157
157
|
const o = n, a = e.slice(0, o);
|
|
158
158
|
return e.slice(o).concat(a);
|
|
159
159
|
}
|
|
@@ -167,11 +167,11 @@ function Ee(e) {
|
|
|
167
167
|
}
|
|
168
168
|
return e;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Vn(e) {
|
|
171
171
|
return Object.assign(
|
|
172
172
|
{},
|
|
173
173
|
...Object.keys(e).map(
|
|
174
|
-
(n) =>
|
|
174
|
+
(n) => Bn.includes(n) ? {} : { [n]: e[n] }
|
|
175
175
|
)
|
|
176
176
|
);
|
|
177
177
|
}
|
|
@@ -185,7 +185,7 @@ const zn = "[lume] ";
|
|
|
185
185
|
function Te(e, n = !0) {
|
|
186
186
|
n && Kt() || console.warn(zn + "Warning: " + e);
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const Xe = (e) => {
|
|
189
189
|
let n = null;
|
|
190
190
|
switch (typeof e) {
|
|
191
191
|
case "string":
|
|
@@ -205,7 +205,7 @@ const Ze = (e) => {
|
|
|
205
205
|
return n ? n(...o) : o[0];
|
|
206
206
|
}
|
|
207
207
|
return t;
|
|
208
|
-
},
|
|
208
|
+
}, Ce = () => ({
|
|
209
209
|
options: {
|
|
210
210
|
type: Object,
|
|
211
211
|
default: () => ({})
|
|
@@ -219,7 +219,7 @@ function _e(e, n) {
|
|
|
219
219
|
}
|
|
220
220
|
const Wn = 0.2;
|
|
221
221
|
function Un(e, n, t) {
|
|
222
|
-
const o =
|
|
222
|
+
const o = S(), a = m(() => Math.max(...e.value.range())), r = m(() => n.value.length);
|
|
223
223
|
function l() {
|
|
224
224
|
if (!n.value) return;
|
|
225
225
|
const u = n.value.reduce(
|
|
@@ -237,7 +237,7 @@ function Un(e, n, t) {
|
|
|
237
237
|
}
|
|
238
238
|
return X(n, l), { showTick: i };
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const B = {
|
|
241
241
|
HORIZONTAL: "horizontal",
|
|
242
242
|
VERTICAL: "vertical"
|
|
243
243
|
}, Zn = {
|
|
@@ -261,7 +261,7 @@ const D = {
|
|
|
261
261
|
"left-start",
|
|
262
262
|
"left-end"
|
|
263
263
|
];
|
|
264
|
-
function
|
|
264
|
+
function Qe(e) {
|
|
265
265
|
e != null && e.closest("svg") || Te(ye.NotContainedInSvg);
|
|
266
266
|
}
|
|
267
267
|
const an = {
|
|
@@ -466,7 +466,7 @@ const an = {
|
|
|
466
466
|
lo
|
|
467
467
|
];
|
|
468
468
|
var ln = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(ln || {}), un = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(un || {}), ut = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(ut || {});
|
|
469
|
-
const Et = /* @__PURE__ */
|
|
469
|
+
const Et = /* @__PURE__ */ Q({
|
|
470
470
|
__name: "lume-axis",
|
|
471
471
|
props: {
|
|
472
472
|
scale: {
|
|
@@ -493,46 +493,46 @@ const Et = /* @__PURE__ */ J({
|
|
|
493
493
|
},
|
|
494
494
|
orientation: {
|
|
495
495
|
type: String,
|
|
496
|
-
default:
|
|
496
|
+
default: B.VERTICAL
|
|
497
497
|
},
|
|
498
|
-
...
|
|
498
|
+
...Ce()
|
|
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: u, orientation: s } = le(o), d =
|
|
502
|
+
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: u, orientation: s } = le(o), d = Ke("isEmpty", S(!1)), c = Je({}), p = S(null), b = S(null), k = S(null), L = m(
|
|
503
503
|
() => o.type ? ut[o.type] : o.position
|
|
504
504
|
), $ = m(
|
|
505
505
|
() => o.type || (L.value === "left" ? "y" : "x")
|
|
506
506
|
), g = m(
|
|
507
|
-
() => $.value === "x" && s.value ===
|
|
507
|
+
() => $.value === "x" && s.value === B.VERTICAL || $.value === "y" && s.value === B.HORIZONTAL
|
|
508
508
|
), { allOptions: f } = _e(
|
|
509
509
|
u,
|
|
510
510
|
$.value === "x" ? Kn : Jn
|
|
511
511
|
), { showTick: y } = Un(r, p, f), I = m(
|
|
512
512
|
() => d.value || !r.value || Rn(r.value)
|
|
513
|
-
),
|
|
514
|
-
var
|
|
515
|
-
return $.value === "y" && I.value ? `translate(0, ${((
|
|
516
|
-
}),
|
|
513
|
+
), E = m(() => {
|
|
514
|
+
var F, R, C, ue;
|
|
515
|
+
return $.value === "y" && I.value ? `translate(0, ${((F = l.value) == null ? void 0 : F.height) / 2})` : $.value === "x" && I.value ? `translate(-${((R = l.value) == null ? void 0 : R.width) / 2}, ${(C = l.value) == null ? void 0 : C.height})` : `translate(0, ${$.value === "x" ? (ue = l.value) == null ? void 0 : ue.height : 0})`;
|
|
516
|
+
}), D = m(() => {
|
|
517
517
|
if (!r.value) return [];
|
|
518
518
|
if (he(r.value))
|
|
519
519
|
return r.value.labels || r.value.domain();
|
|
520
|
-
const { tickCount:
|
|
521
|
-
return In(
|
|
520
|
+
const { tickCount: F } = f.value, [R, C] = r.value.domain();
|
|
521
|
+
return In(R, C, F);
|
|
522
522
|
}), H = m(() => {
|
|
523
|
-
const { tickFormat:
|
|
524
|
-
return
|
|
523
|
+
const { tickFormat: F } = f.value;
|
|
524
|
+
return Xe(F);
|
|
525
525
|
}), w = m(
|
|
526
526
|
() => f.value.withHover && g.value && i.value > -1
|
|
527
527
|
), P = m(
|
|
528
528
|
() => f.value.tickPadding + Pe || 16
|
|
529
|
-
),
|
|
529
|
+
), K = m(() => $.value === "x" ? (
|
|
530
530
|
// If x axis, get the tick height
|
|
531
531
|
Math.max(
|
|
532
532
|
...(p.value || []).map(
|
|
533
|
-
(
|
|
534
|
-
var
|
|
535
|
-
return ((
|
|
533
|
+
(F) => {
|
|
534
|
+
var R, C;
|
|
535
|
+
return ((C = (R = F.ref).getBBox) == null ? void 0 : C.call(R).height) + P.value;
|
|
536
536
|
}
|
|
537
537
|
)
|
|
538
538
|
)
|
|
@@ -540,79 +540,79 @@ const Et = /* @__PURE__ */ J({
|
|
|
540
540
|
// If y axis, get the tick width
|
|
541
541
|
Math.max(
|
|
542
542
|
...(p.value || []).map(
|
|
543
|
-
(
|
|
544
|
-
var
|
|
545
|
-
return ((
|
|
543
|
+
(F) => {
|
|
544
|
+
var R, C;
|
|
545
|
+
return ((C = (R = F.ref).getBBox) == null ? void 0 : C.call(R).width) + P.value;
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
)
|
|
549
549
|
));
|
|
550
|
-
function Y(
|
|
551
|
-
const { showTicks:
|
|
552
|
-
return
|
|
550
|
+
function Y(F) {
|
|
551
|
+
const { showTicks: R } = f.value;
|
|
552
|
+
return R === !1 ? "" : H.value(F);
|
|
553
553
|
}
|
|
554
|
-
function ne(
|
|
555
|
-
a("mouseenter", { index: g.value ?
|
|
554
|
+
function ne(F, R, C) {
|
|
555
|
+
a("mouseenter", { index: g.value ? F : null, value: R, event: C });
|
|
556
556
|
}
|
|
557
|
-
function ee(
|
|
558
|
-
a("click", { index:
|
|
557
|
+
function ee(F, R, C) {
|
|
558
|
+
a("click", { index: F, value: R, event: C });
|
|
559
559
|
}
|
|
560
|
-
function me(
|
|
561
|
-
var
|
|
560
|
+
function me(F) {
|
|
561
|
+
var R;
|
|
562
562
|
if (!(!p.value || !p.value.length))
|
|
563
|
-
return (
|
|
563
|
+
return (R = p.value[F]) == null ? void 0 : R.ref;
|
|
564
564
|
}
|
|
565
565
|
function xe() {
|
|
566
|
-
k.value =
|
|
567
|
-
(
|
|
568
|
-
value: Y(
|
|
569
|
-
group: c.getTickGroupAttributes(
|
|
570
|
-
ghost: c.getTickGhostAttributes(me(
|
|
566
|
+
k.value = D.value.map(
|
|
567
|
+
(F, R) => ({
|
|
568
|
+
value: Y(F),
|
|
569
|
+
group: c.getTickGroupAttributes(F, R),
|
|
570
|
+
ghost: c.getTickGhostAttributes(me(R)),
|
|
571
571
|
label: c.getTickLabelAttributes(),
|
|
572
572
|
gridline: c.getGridLinesAttributes()
|
|
573
573
|
})
|
|
574
574
|
);
|
|
575
575
|
}
|
|
576
576
|
function De() {
|
|
577
|
-
k.value && k.value.map((
|
|
577
|
+
k.value && k.value.map((F) => (F.gridline = c.getGridLinesAttributes(), F));
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Se() {
|
|
580
580
|
if (!r.value) return;
|
|
581
|
-
const
|
|
582
|
-
Object.entries(
|
|
583
|
-
([
|
|
584
|
-
c[
|
|
581
|
+
const F = r.value.step ? "bandScale" : "linearScale", R = no[`${$.value}-${ln[F]}`];
|
|
582
|
+
Object.entries(R(r, l, f) || []).forEach(
|
|
583
|
+
([C, ue]) => {
|
|
584
|
+
c[C] = ue;
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
587
|
}
|
|
588
|
-
return X(r,
|
|
588
|
+
return X(r, Se, { flush: "sync", immediate: !0 }), X(r, xe, { immediate: !0 }), X(p, xe), X(K, (F) => a("lume__internal--axis-size", F)), X(o.containerSize, De), $e(() => Qe(b.value)), (F, R) => v(r) ? (_(), O("g", {
|
|
589
589
|
key: 0,
|
|
590
590
|
ref_key: "root",
|
|
591
591
|
ref: b,
|
|
592
592
|
class: "axis",
|
|
593
|
-
transform:
|
|
593
|
+
transform: E.value,
|
|
594
594
|
"data-j-axis": "",
|
|
595
|
-
onMouseleave:
|
|
595
|
+
onMouseleave: R[1] || (R[1] = (C) => a("mouseleave", C))
|
|
596
596
|
}, [
|
|
597
|
-
$.value === "x" ? (_(),
|
|
598
|
-
(_(!0),
|
|
599
|
-
key: `${
|
|
597
|
+
$.value === "x" ? (_(), O("defs", ao, uo)) : Z("", !0),
|
|
598
|
+
(_(!0), O(te, null, J(k.value, (C, ue) => (_(), q(v(wt), V({
|
|
599
|
+
key: `${C.value}_${ue}`,
|
|
600
600
|
ref_for: !0,
|
|
601
601
|
ref_key: "tickRefs",
|
|
602
602
|
ref: p
|
|
603
|
-
},
|
|
604
|
-
"is-hidden": v(f).skip && !v(y)(
|
|
603
|
+
}, C, {
|
|
604
|
+
"is-hidden": v(f).skip && !v(y)(ue),
|
|
605
605
|
"with-gridlines": v(f).gridLines,
|
|
606
|
-
onMouseenter: (ke) => ne(
|
|
607
|
-
onClick: (ke) => ee(
|
|
606
|
+
onMouseenter: (ke) => ne(ue, C.value, ke),
|
|
607
|
+
onClick: (ke) => ee(ue, C.value, ke)
|
|
608
608
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
609
|
-
w.value ? (_(), q(v(wt),
|
|
609
|
+
w.value ? (_(), q(v(wt), V({ key: 1 }, k.value[v(i)], {
|
|
610
610
|
"with-gridlines": !1,
|
|
611
611
|
"is-hovered": "",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: R[0] || (R[0] = (C) => ee(
|
|
613
613
|
v(i),
|
|
614
614
|
k.value[v(i)].value,
|
|
615
|
-
|
|
615
|
+
C
|
|
616
616
|
))
|
|
617
617
|
}), null, 16)) : Z("", !0)
|
|
618
618
|
], 40, oo)) : Z("", !0);
|
|
@@ -631,12 +631,12 @@ function ro(e, n, t, o) {
|
|
|
631
631
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: r };
|
|
632
632
|
}
|
|
633
633
|
function io(e, n, t, o) {
|
|
634
|
-
const a =
|
|
634
|
+
const a = S(0), r = S(0), l = m(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
635
635
|
return $e(() => {
|
|
636
636
|
a.value = t.value, r.value = o.value;
|
|
637
637
|
}), X(t, (i) => a.value = i), X(o, (i) => r.value = i), { computedWidth: a, computedHeight: r, transformOrigin: l };
|
|
638
638
|
}
|
|
639
|
-
const so = ["x", "y", "width", "height"], co = /* @__PURE__ */
|
|
639
|
+
const so = ["x", "y", "width", "height"], co = /* @__PURE__ */ Q({
|
|
640
640
|
__name: "lume-bar",
|
|
641
641
|
props: {
|
|
642
642
|
x: {
|
|
@@ -674,10 +674,10 @@ const so = ["x", "y", "width", "height"], co = /* @__PURE__ */ J({
|
|
|
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: u, classList: s } = le(t), d =
|
|
677
|
+
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: u, classList: s } = le(t), d = S(null), c = m(
|
|
678
678
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
679
|
-
), p = m(() => u.value === "width"), b = m(() => u.value === "height"), k = io(a, r, l, i), { computedX: L, computedY: $, shouldHaveMinWidth: g, shouldHaveMinHeight: f } = ro(a, r, l, i), y = m(() => g.value ? 1 : (p.value ? k.computedWidth : l).value), I = m(() => f.value ? 1 : (b.value ? k.computedHeight : i).value),
|
|
680
|
-
return $e(() =>
|
|
679
|
+
), p = m(() => u.value === "width"), b = m(() => u.value === "height"), k = io(a, r, l, i), { computedX: L, computedY: $, shouldHaveMinWidth: g, shouldHaveMinHeight: f } = ro(a, r, l, i), y = m(() => g.value ? 1 : (p.value ? k.computedWidth : l).value), I = m(() => f.value ? 1 : (b.value ? k.computedHeight : i).value), E = p.value || b.value ? k.transformOrigin : null;
|
|
680
|
+
return $e(() => Qe(d.value)), (D, H) => (_(), O("rect", {
|
|
681
681
|
ref_key: "root",
|
|
682
682
|
ref: d,
|
|
683
683
|
class: ae(["lume-bar", [
|
|
@@ -689,7 +689,7 @@ const so = ["x", "y", "width", "height"], co = /* @__PURE__ */ J({
|
|
|
689
689
|
},
|
|
690
690
|
...c.value
|
|
691
691
|
]]),
|
|
692
|
-
style: Zt({ transformOrigin: v(
|
|
692
|
+
style: Zt({ transformOrigin: v(E) }),
|
|
693
693
|
x: v(L),
|
|
694
694
|
y: v($),
|
|
695
695
|
width: y.value,
|
|
@@ -719,7 +719,7 @@ function Dt(e, n) {
|
|
|
719
719
|
}
|
|
720
720
|
function go(e, n) {
|
|
721
721
|
const t = Object.values(fe).indexOf(e);
|
|
722
|
-
return
|
|
722
|
+
return Pn(Object.values(fe), t > -1 ? t : 0)[n];
|
|
723
723
|
}
|
|
724
724
|
function ho(e, n) {
|
|
725
725
|
const t = 50 + n * 10;
|
|
@@ -729,7 +729,7 @@ function yo(e, n) {
|
|
|
729
729
|
const t = (n + 1) * 10;
|
|
730
730
|
return `${e}-${t}`;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function Bt(e, n, t) {
|
|
733
733
|
switch (n) {
|
|
734
734
|
default:
|
|
735
735
|
case we.Categorical:
|
|
@@ -741,7 +741,7 @@ function Ht(e, n, t) {
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
function _o(e, n, t = vo, o) {
|
|
744
|
-
return Dt(e, t) ? e : (o > 4 && (Te(ye.ColorLoop), o = o % 5), Dt(n, t) ?
|
|
744
|
+
return Dt(e, t) ? e : (o > 4 && (Te(ye.ColorLoop), o = o % 5), Dt(n, t) ? Bt(n, t, o) : Bt(mo(t), t, o));
|
|
745
745
|
}
|
|
746
746
|
function ko(e) {
|
|
747
747
|
return e.map((n) => Mn(n) ? n : { value: n });
|
|
@@ -769,7 +769,7 @@ const bt = (e = null) => ({
|
|
|
769
769
|
}
|
|
770
770
|
});
|
|
771
771
|
function Lt(e, n, t, o, a) {
|
|
772
|
-
const r =
|
|
772
|
+
const r = Je({
|
|
773
773
|
width: 0,
|
|
774
774
|
height: 0
|
|
775
775
|
}), l = crypto.randomUUID(), i = m(() => {
|
|
@@ -793,7 +793,7 @@ function Lt(e, n, t, o, a) {
|
|
|
793
793
|
);
|
|
794
794
|
}), u = m(() => Array.isArray(n.value) ? n.value : qt(e.value).map((d, c) => c));
|
|
795
795
|
function s(d) {
|
|
796
|
-
const c = (a == null ? void 0 : a.value) ===
|
|
796
|
+
const c = (a == null ? void 0 : a.value) === B.HORIZONTAL && u.value.length * (((o == null ? void 0 : o.value.barHeight) || Nt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Nt) || d.height;
|
|
797
797
|
r.width = d.width, r.height = c;
|
|
798
798
|
}
|
|
799
799
|
return {
|
|
@@ -815,21 +815,21 @@ const Lo = () => ({
|
|
|
815
815
|
}
|
|
816
816
|
});
|
|
817
817
|
function Ao(e, n, t, o, a) {
|
|
818
|
-
const r =
|
|
818
|
+
const r = S(null), l = S(null);
|
|
819
819
|
function i() {
|
|
820
820
|
var d, c, p, b;
|
|
821
821
|
const { width: u, height: s } = t;
|
|
822
|
-
!u && !s || (o.value ===
|
|
822
|
+
!u && !s || (o.value === B.HORIZONTAL ? (r.value = (d = e.value) != null && d.length ? Mt(
|
|
823
823
|
e.value,
|
|
824
824
|
u,
|
|
825
825
|
o.value,
|
|
826
826
|
a.value.startOnZero
|
|
827
|
-
) : null, l.value = (c = n.value) != null && c.length ?
|
|
827
|
+
) : null, l.value = (c = n.value) != null && c.length ? Ht(
|
|
828
828
|
n.value,
|
|
829
829
|
s,
|
|
830
830
|
o.value,
|
|
831
831
|
a.value
|
|
832
|
-
) : null) : (r.value = (p = n.value) != null && p.length ?
|
|
832
|
+
) : null) : (r.value = (p = n.value) != null && p.length ? Ht(
|
|
833
833
|
n.value,
|
|
834
834
|
u,
|
|
835
835
|
o.value,
|
|
@@ -843,22 +843,22 @@ function Ao(e, n, t, o, a) {
|
|
|
843
843
|
}
|
|
844
844
|
return Xt(i), { xScale: r, yScale: l };
|
|
845
845
|
}
|
|
846
|
-
function
|
|
847
|
-
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, u = r ?? (t ===
|
|
846
|
+
function Ht(e, n, t, o) {
|
|
847
|
+
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, u = r ?? (t === B.HORIZONTAL ? nn : tn);
|
|
848
848
|
return Object.assign(
|
|
849
|
-
|
|
849
|
+
je().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(e.map((s, d) => d)),
|
|
850
850
|
{ labels: e }
|
|
851
851
|
);
|
|
852
852
|
}
|
|
853
853
|
function Mt(e, n, t, o) {
|
|
854
854
|
const a = Jt(e).filter((d) => d != null), r = [0, n];
|
|
855
855
|
if (a.length === 0)
|
|
856
|
-
return
|
|
856
|
+
return Fe().range(r).domain([0, 0]).nice();
|
|
857
857
|
const l = Math.min(...a), i = o && l > 0 ? 0 : l;
|
|
858
858
|
let u = Math.max(...a);
|
|
859
859
|
o && u < 0 && (u = 0);
|
|
860
|
-
const s = t ===
|
|
861
|
-
return
|
|
860
|
+
const s = t === B.HORIZONTAL ? [i, u] : [u, i];
|
|
861
|
+
return Fe().range(r).domain(s).nice();
|
|
862
862
|
}
|
|
863
863
|
function St(e) {
|
|
864
864
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
@@ -871,16 +871,16 @@ function Rt(e, n, {
|
|
|
871
871
|
paddingInner: o,
|
|
872
872
|
paddingOuter: a
|
|
873
873
|
} = {}) {
|
|
874
|
-
const r = t ?? (n ===
|
|
874
|
+
const r = t ?? (n === B.HORIZONTAL ? nn : tn);
|
|
875
875
|
return e.copy().paddingInner(o ?? r).paddingOuter(a ?? r);
|
|
876
876
|
}
|
|
877
877
|
function At(e) {
|
|
878
|
-
return Object.values(
|
|
878
|
+
return Object.values(B).includes(e);
|
|
879
879
|
}
|
|
880
|
-
const
|
|
880
|
+
const He = (e, n = !0) => ({
|
|
881
881
|
...bt(e),
|
|
882
882
|
...Lo(),
|
|
883
|
-
...
|
|
883
|
+
...Ce(),
|
|
884
884
|
classList: {
|
|
885
885
|
type: [String, Array],
|
|
886
886
|
default: () => []
|
|
@@ -892,20 +892,20 @@ const Be = (e, n = !0) => ({
|
|
|
892
892
|
...n ? {
|
|
893
893
|
orientation: {
|
|
894
894
|
type: String,
|
|
895
|
-
default:
|
|
895
|
+
default: B.VERTICAL,
|
|
896
896
|
validator: At
|
|
897
897
|
}
|
|
898
898
|
} : {}
|
|
899
899
|
}), To = (e) => ({
|
|
900
900
|
...bt(e),
|
|
901
|
-
...
|
|
901
|
+
...Ce(),
|
|
902
902
|
hoveredElement: {
|
|
903
903
|
type: [Number, String],
|
|
904
904
|
default: null
|
|
905
905
|
}
|
|
906
906
|
});
|
|
907
907
|
function $o() {
|
|
908
|
-
const e =
|
|
908
|
+
const e = S(), n = Je({
|
|
909
909
|
dimensions: {}
|
|
910
910
|
}), t = new ResizeObserver((o) => {
|
|
911
911
|
o.forEach((a) => {
|
|
@@ -918,7 +918,7 @@ function $o() {
|
|
|
918
918
|
t.unobserve(e.value);
|
|
919
919
|
}), { resizeState: n, resizeRef: e };
|
|
920
920
|
}
|
|
921
|
-
const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */
|
|
921
|
+
const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ Q({
|
|
922
922
|
__name: "lume-chart-container",
|
|
923
923
|
props: {
|
|
924
924
|
margins: {
|
|
@@ -939,19 +939,19 @@ const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ J({
|
|
|
939
939
|
},
|
|
940
940
|
orientation: {
|
|
941
941
|
type: String,
|
|
942
|
-
default:
|
|
942
|
+
default: B.VERTICAL,
|
|
943
943
|
validator: At
|
|
944
944
|
}
|
|
945
945
|
},
|
|
946
946
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
947
947
|
setup(e, { emit: n }) {
|
|
948
|
-
const t = e, o = n, { margins: a, containerSize: r } = le(t), l =
|
|
948
|
+
const t = e, o = n, { margins: a, containerSize: r } = le(t), l = S(null), { resizeRef: i, resizeState: u } = $o(), s = m(
|
|
949
949
|
() => r.value.height + a.value.top + a.value.bottom
|
|
950
950
|
);
|
|
951
951
|
return Xt(() => {
|
|
952
952
|
if (!l.value) return;
|
|
953
953
|
const { width: d } = u.dimensions, { height: c } = l.value.getBoundingClientRect();
|
|
954
|
-
if (!d || t.orientation ===
|
|
954
|
+
if (!d || t.orientation === B.VERTICAL && !c)
|
|
955
955
|
return;
|
|
956
956
|
const p = d - a.value.left - a.value.right, b = c - a.value.top - a.value.bottom, k = {
|
|
957
957
|
width: p > 0 ? p : 0,
|
|
@@ -960,7 +960,7 @@ const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ J({
|
|
|
960
960
|
outerHeight: c
|
|
961
961
|
};
|
|
962
962
|
o("resize", k);
|
|
963
|
-
}), (d, c) => (_(),
|
|
963
|
+
}), (d, c) => (_(), O("div", {
|
|
964
964
|
ref_key: "resizeRef",
|
|
965
965
|
ref: i,
|
|
966
966
|
class: ae(["lume-chart-container", {
|
|
@@ -968,8 +968,8 @@ const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ J({
|
|
|
968
968
|
}]),
|
|
969
969
|
"data-j-chart-container": ""
|
|
970
970
|
}, [
|
|
971
|
-
|
|
972
|
-
(_(),
|
|
971
|
+
G(d.$slots, "header", {}, void 0, !0),
|
|
972
|
+
(_(), O("svg", {
|
|
973
973
|
ref_key: "root",
|
|
974
974
|
ref: l,
|
|
975
975
|
class: ae(["lume-chart-container__svg", {
|
|
@@ -986,31 +986,31 @@ const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ J({
|
|
|
986
986
|
class: "lume-chart-container__group",
|
|
987
987
|
"data-j-chart-container__group": ""
|
|
988
988
|
}, [
|
|
989
|
-
|
|
989
|
+
G(d.$slots, "default", {}, void 0, !0)
|
|
990
990
|
], 8, xo)
|
|
991
991
|
], 42, Io)),
|
|
992
|
-
|
|
993
|
-
|
|
992
|
+
G(d.$slots, "footer", {}, void 0, !0),
|
|
993
|
+
G(d.$slots, "extra", {}, void 0, !0)
|
|
994
994
|
], 2));
|
|
995
995
|
}
|
|
996
|
-
}), wo = /* @__PURE__ */ oe(Oo, [["__scopeId", "data-v-d53cdc3e"]]), No = ["onClick", "onMouseenter"], Eo = /* @__PURE__ */
|
|
996
|
+
}), wo = /* @__PURE__ */ oe(Oo, [["__scopeId", "data-v-d53cdc3e"]]), No = ["onClick", "onMouseenter"], Eo = /* @__PURE__ */ Q({
|
|
997
997
|
__name: "lume-chart-legend",
|
|
998
998
|
props: {
|
|
999
999
|
data: {
|
|
1000
1000
|
type: Array,
|
|
1001
|
-
validator:
|
|
1001
|
+
validator: Hn,
|
|
1002
1002
|
required: !0
|
|
1003
1003
|
}
|
|
1004
1004
|
},
|
|
1005
1005
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
1006
1006
|
setup(e, { emit: n }) {
|
|
1007
1007
|
const t = n;
|
|
1008
|
-
return (o, a) => (_(),
|
|
1008
|
+
return (o, a) => (_(), O("div", {
|
|
1009
1009
|
class: "lume-chart-legend",
|
|
1010
1010
|
"data-j-chart-legend": "",
|
|
1011
1011
|
onMouseleave: a[0] || (a[0] = (r) => t("mouseleave"))
|
|
1012
1012
|
}, [
|
|
1013
|
-
(_(!0),
|
|
1013
|
+
(_(!0), O(te, null, J(e.data, (r, l) => (_(), O("div", {
|
|
1014
1014
|
key: `legend-item-${l}`,
|
|
1015
1015
|
class: "lume-chart-legend__item lume-typography--caption",
|
|
1016
1016
|
tabindex: "0",
|
|
@@ -1022,40 +1022,40 @@ const Io = ["height"], xo = ["transform"], Oo = /* @__PURE__ */ J({
|
|
|
1022
1022
|
class: ae(["lume-chart-legend__symbol", `lume-background-color--${r.color}`]),
|
|
1023
1023
|
"data-j-chart-legend__symbol": ""
|
|
1024
1024
|
}, null, 2),
|
|
1025
|
-
pe(" " +
|
|
1025
|
+
pe(" " + re(r.label || l), 1)
|
|
1026
1026
|
], 40, No))), 128))
|
|
1027
1027
|
], 32));
|
|
1028
1028
|
}
|
|
1029
|
-
}), Gt = /* @__PURE__ */ oe(Eo, [["__scopeId", "data-v-6f1d1c44"]]), Do = {},
|
|
1029
|
+
}), Gt = /* @__PURE__ */ oe(Eo, [["__scopeId", "data-v-6f1d1c44"]]), Do = {}, Bo = {
|
|
1030
1030
|
class: "lume-tooltip__title",
|
|
1031
1031
|
"data-j-tooltip__title": ""
|
|
1032
1032
|
};
|
|
1033
|
-
function
|
|
1034
|
-
return _(),
|
|
1035
|
-
|
|
1033
|
+
function Ho(e, n) {
|
|
1034
|
+
return _(), O("div", Bo, [
|
|
1035
|
+
G(e.$slots, "default", {}, void 0, !0)
|
|
1036
1036
|
]);
|
|
1037
1037
|
}
|
|
1038
|
-
const Mo = /* @__PURE__ */ oe(Do, [["render",
|
|
1038
|
+
const Mo = /* @__PURE__ */ oe(Do, [["render", Ho], ["__scopeId", "data-v-8af3fac6"]]), So = {}, Ro = {
|
|
1039
1039
|
class: "lume-tooltip__item",
|
|
1040
1040
|
"data-j-tooltip__summary-item": ""
|
|
1041
1041
|
}, Go = { class: "lume-tooltip__value" };
|
|
1042
1042
|
function Fo(e, n) {
|
|
1043
|
-
return _(),
|
|
1043
|
+
return _(), O("li", Ro, [
|
|
1044
1044
|
j("span", null, [
|
|
1045
|
-
|
|
1045
|
+
G(e.$slots, "default", {}, void 0, !0)
|
|
1046
1046
|
]),
|
|
1047
1047
|
j("strong", Go, [
|
|
1048
|
-
|
|
1048
|
+
G(e.$slots, "value", {}, void 0, !0)
|
|
1049
1049
|
])
|
|
1050
1050
|
]);
|
|
1051
1051
|
}
|
|
1052
|
-
const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1b"]]),
|
|
1052
|
+
const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1b"]]), Co = {
|
|
1053
1053
|
class: "lume-tooltip__item",
|
|
1054
1054
|
"data-j-tooltip__item": ""
|
|
1055
|
-
},
|
|
1055
|
+
}, Po = { "data-j-tooltip__item__label": "" }, Vo = {
|
|
1056
1056
|
class: "lume-tooltip__value",
|
|
1057
1057
|
"data-j-tooltip__item__value": ""
|
|
1058
|
-
}, zo = /* @__PURE__ */
|
|
1058
|
+
}, zo = /* @__PURE__ */ Q({
|
|
1059
1059
|
__name: "lume-tooltip-item",
|
|
1060
1060
|
props: {
|
|
1061
1061
|
color: {
|
|
@@ -1064,17 +1064,17 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1064
1064
|
}
|
|
1065
1065
|
},
|
|
1066
1066
|
setup(e) {
|
|
1067
|
-
return (n, t) => (_(),
|
|
1068
|
-
e.color ? (_(),
|
|
1067
|
+
return (n, t) => (_(), O("li", Co, [
|
|
1068
|
+
e.color ? (_(), O("span", {
|
|
1069
1069
|
key: 0,
|
|
1070
1070
|
class: ae([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
1071
1071
|
"data-j-tooltip__item__symbol": ""
|
|
1072
1072
|
}, null, 2)) : Z("", !0),
|
|
1073
|
-
j("span",
|
|
1074
|
-
|
|
1073
|
+
j("span", Po, [
|
|
1074
|
+
G(n.$slots, "label", {}, void 0, !0)
|
|
1075
1075
|
]),
|
|
1076
|
-
j("strong",
|
|
1077
|
-
|
|
1076
|
+
j("strong", Vo, [
|
|
1077
|
+
G(n.$slots, "value", {}, void 0, !0)
|
|
1078
1078
|
])
|
|
1079
1079
|
]));
|
|
1080
1080
|
}
|
|
@@ -1083,7 +1083,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1083
1083
|
class: "lume-tooltip__break"
|
|
1084
1084
|
}, Yo = /* @__PURE__ */ Uo(() => /* @__PURE__ */ j("hr", null, null, -1)), Ko = [
|
|
1085
1085
|
Yo
|
|
1086
|
-
], Jo = /* @__PURE__ */
|
|
1086
|
+
], Jo = /* @__PURE__ */ Q({
|
|
1087
1087
|
__name: "lume-tooltip",
|
|
1088
1088
|
props: {
|
|
1089
1089
|
opened: {
|
|
@@ -1123,11 +1123,11 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1123
1123
|
type: String,
|
|
1124
1124
|
default: null
|
|
1125
1125
|
},
|
|
1126
|
-
...
|
|
1126
|
+
...Ce()
|
|
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 =
|
|
1130
|
+
const t = e, o = n, a = S(null), { items: r, options: l } = le(t), i = de(), u = S(null), { allOptions: s } = _e(l), d = m(
|
|
1131
1131
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
1132
1132
|
), c = m(
|
|
1133
1133
|
() => d.value ? "fixed" : "absolute"
|
|
@@ -1146,10 +1146,10 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1146
1146
|
...t.modifiers || []
|
|
1147
1147
|
]), b = m(
|
|
1148
1148
|
() => s.value.showTitle !== !1 && t.title != null
|
|
1149
|
-
), k = m(() =>
|
|
1149
|
+
), k = m(() => Xe(s.value.valueFormat)), L = m(() => Xe(s.value.titleFormat)), $ = m(
|
|
1150
1150
|
() => {
|
|
1151
|
-
var
|
|
1152
|
-
return ((
|
|
1151
|
+
var D;
|
|
1152
|
+
return ((D = r.value) == null ? void 0 : D.find((H) => H.isSummary)) || {
|
|
1153
1153
|
label: s.value.summary ?? t.summary
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
@@ -1164,17 +1164,17 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1164
1164
|
function I() {
|
|
1165
1165
|
u.value && (u.value.destroy(), o("closed"), a.value && a.value.classList.remove("lume-tooltip--animated"));
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function E() {
|
|
1168
1168
|
u.value && (s.value.withAnimation !== !1 && a.value && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? (function() {
|
|
1169
1169
|
u.value.state.elements.reference = t.targetElement, u.value.update(), o("moved", t.targetElement);
|
|
1170
1170
|
})() : I());
|
|
1171
1171
|
}
|
|
1172
1172
|
return X(
|
|
1173
1173
|
() => t.targetElement,
|
|
1174
|
-
async (
|
|
1175
|
-
!H &&
|
|
1174
|
+
async (D, H) => {
|
|
1175
|
+
!H && D ? (await at(), y()) : E();
|
|
1176
1176
|
}
|
|
1177
|
-
), $e(y), Yt(I), (
|
|
1177
|
+
), $e(y), Yt(I), (D, H) => e.opened && e.targetElement ? (_(), O("div", {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
ref_key: "root",
|
|
1180
1180
|
ref: a,
|
|
@@ -1185,43 +1185,43 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1185
1185
|
onMouseenter: H[0] || (H[0] = (w) => o("tooltip-mouseenter")),
|
|
1186
1186
|
onMouseleave: H[1] || (H[1] = (w) => o("tooltip-mouseleave"))
|
|
1187
1187
|
}, [
|
|
1188
|
-
|
|
1189
|
-
|
|
1188
|
+
G(D.$slots, "default", {}, () => [
|
|
1189
|
+
G(D.$slots, "title", {}, () => [
|
|
1190
1190
|
b.value ? (_(), q(v(Mo), { key: 0 }, {
|
|
1191
|
-
default:
|
|
1192
|
-
pe(
|
|
1191
|
+
default: U(() => [
|
|
1192
|
+
pe(re(L.value(e.title)), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 1
|
|
1195
1195
|
})) : Z("", !0)
|
|
1196
1196
|
], !0),
|
|
1197
1197
|
j("ul", Zo, [
|
|
1198
|
-
|
|
1198
|
+
G(D.$slots, "summary", {}, () => [
|
|
1199
1199
|
g.value ? (_(), q(v(jo), { key: 0 }, ge({
|
|
1200
|
-
default:
|
|
1201
|
-
pe(
|
|
1200
|
+
default: U(() => [
|
|
1201
|
+
pe(re($.value.label) + " ", 1)
|
|
1202
1202
|
]),
|
|
1203
1203
|
_: 2
|
|
1204
1204
|
}, [
|
|
1205
1205
|
$.value.value ? {
|
|
1206
1206
|
name: "value",
|
|
1207
|
-
fn:
|
|
1208
|
-
pe(
|
|
1207
|
+
fn: U(() => [
|
|
1208
|
+
pe(re(k.value($.value.value)), 1)
|
|
1209
1209
|
]),
|
|
1210
1210
|
key: "0"
|
|
1211
1211
|
} : void 0
|
|
1212
1212
|
]), 1024)) : Z("", !0)
|
|
1213
1213
|
], !0),
|
|
1214
|
-
g.value ? (_(),
|
|
1215
|
-
|
|
1216
|
-
(_(!0),
|
|
1214
|
+
g.value ? (_(), O("li", Xo, Ko)) : Z("", !0),
|
|
1215
|
+
G(D.$slots, "items", {}, () => [
|
|
1216
|
+
(_(!0), O(te, null, J(f.value, (w) => (_(), q(v(Wo), {
|
|
1217
1217
|
key: w.label,
|
|
1218
1218
|
color: w.color
|
|
1219
1219
|
}, {
|
|
1220
|
-
label:
|
|
1221
|
-
pe(
|
|
1220
|
+
label: U(() => [
|
|
1221
|
+
pe(re(w.label), 1)
|
|
1222
1222
|
]),
|
|
1223
|
-
value:
|
|
1224
|
-
pe(
|
|
1223
|
+
value: U(() => [
|
|
1224
|
+
pe(re(k.value(w.value)), 1)
|
|
1225
1225
|
]),
|
|
1226
1226
|
_: 2
|
|
1227
1227
|
}, 1032, ["color"]))), 128))
|
|
@@ -1230,7 +1230,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1230
1230
|
], !0)
|
|
1231
1231
|
], 34)) : Z("", !0);
|
|
1232
1232
|
}
|
|
1233
|
-
}), Qo = /* @__PURE__ */ oe(Jo, [["__scopeId", "data-v-6f13599d"]]),
|
|
1233
|
+
}), Qo = /* @__PURE__ */ oe(Jo, [["__scopeId", "data-v-6f13599d"]]), qe = () => ({
|
|
1234
1234
|
data: {
|
|
1235
1235
|
type: Array,
|
|
1236
1236
|
required: !0
|
|
@@ -1245,7 +1245,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1245
1245
|
},
|
|
1246
1246
|
orientation: {
|
|
1247
1247
|
type: String,
|
|
1248
|
-
default:
|
|
1248
|
+
default: B.VERTICAL,
|
|
1249
1249
|
validator: At
|
|
1250
1250
|
},
|
|
1251
1251
|
xScale: {
|
|
@@ -1272,13 +1272,13 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1272
1272
|
type: [String, Array],
|
|
1273
1273
|
default: () => []
|
|
1274
1274
|
}
|
|
1275
|
-
}), qo = { class: "lume-overlay-group" }, ea = /* @__PURE__ */
|
|
1275
|
+
}), qo = { class: "lume-overlay-group" }, ea = /* @__PURE__ */ Q({
|
|
1276
1276
|
__name: "lume-overlay-group",
|
|
1277
1277
|
props: {
|
|
1278
|
-
...
|
|
1278
|
+
...qe(),
|
|
1279
1279
|
orientation: {
|
|
1280
1280
|
type: String,
|
|
1281
|
-
default:
|
|
1281
|
+
default: B.VERTICAL
|
|
1282
1282
|
}
|
|
1283
1283
|
},
|
|
1284
1284
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
@@ -1286,8 +1286,8 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1286
1286
|
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } = le(t), u = m(() => qt(a));
|
|
1287
1287
|
function s(d) {
|
|
1288
1288
|
var g;
|
|
1289
|
-
const c = r.value ===
|
|
1290
|
-
return r.value ===
|
|
1289
|
+
const c = r.value === B.HORIZONTAL ? i.value : l.value, p = c.domain(), b = Sn(c), k = ((g = c.paddingInner) == null ? void 0 : g.call(c)) ?? 0, L = b * k, $ = he(c) ? c(p[d]) - L / 2 : c(d) - b / 2;
|
|
1290
|
+
return r.value === B.HORIZONTAL ? {
|
|
1291
1291
|
width: Math.max(...l.value.range()),
|
|
1292
1292
|
height: b,
|
|
1293
1293
|
transform: `translate(0, ${$})`
|
|
@@ -1297,8 +1297,8 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1297
1297
|
transform: `translate(${$}, 0)`
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
return (d, c) => (_(),
|
|
1301
|
-
(_(!0),
|
|
1300
|
+
return (d, c) => (_(), O("g", qo, [
|
|
1301
|
+
(_(!0), O(te, null, J(u.value, (p, b) => (_(), q(v(ht), V(s(b), {
|
|
1302
1302
|
key: `overlay-${b}`,
|
|
1303
1303
|
"data-j-lume-overlay-group": b,
|
|
1304
1304
|
transition: !1,
|
|
@@ -1322,7 +1322,7 @@ function ta(e) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
function na(e, n, t, o) {
|
|
1324
1324
|
const a = m(
|
|
1325
|
-
() => o.value ===
|
|
1325
|
+
() => o.value === B.HORIZONTAL
|
|
1326
1326
|
), r = m(
|
|
1327
1327
|
() => {
|
|
1328
1328
|
var s;
|
|
@@ -1375,8 +1375,8 @@ function sn(e, n, t, o, a, r, l, i) {
|
|
|
1375
1375
|
c
|
|
1376
1376
|
) : oa(d, c);
|
|
1377
1377
|
e.value = p.map((k, L) => ({
|
|
1378
|
-
cx: (r == null ? void 0 : r.value) ===
|
|
1379
|
-
cy: (r == null ? void 0 : r.value) ===
|
|
1378
|
+
cx: (r == null ? void 0 : r.value) === B.HORIZONTAL ? t.value(k) : rt(t.value, L),
|
|
1379
|
+
cy: (r == null ? void 0 : r.value) === B.HORIZONTAL ? rt(o.value, L) : o.value(k)
|
|
1380
1380
|
}));
|
|
1381
1381
|
}
|
|
1382
1382
|
return X(
|
|
@@ -1388,7 +1388,7 @@ function sn(e, n, t, o, a, r, l, i) {
|
|
|
1388
1388
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: s };
|
|
1389
1389
|
}
|
|
1390
1390
|
function la() {
|
|
1391
|
-
const e =
|
|
1391
|
+
const e = Je({
|
|
1392
1392
|
opened: !1,
|
|
1393
1393
|
targetElement: null
|
|
1394
1394
|
});
|
|
@@ -1445,62 +1445,62 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1445
1445
|
}, ha = { key: 3 }, ya = ["r"], _a = {
|
|
1446
1446
|
key: 0,
|
|
1447
1447
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1448
|
-
}, ka = /* @__PURE__ */
|
|
1448
|
+
}, ka = /* @__PURE__ */ Q({
|
|
1449
1449
|
__name: "lume-chart",
|
|
1450
1450
|
props: {
|
|
1451
|
-
...
|
|
1451
|
+
...He(),
|
|
1452
1452
|
chartType: {
|
|
1453
1453
|
type: String,
|
|
1454
1454
|
default: null
|
|
1455
1455
|
}
|
|
1456
1456
|
},
|
|
1457
1457
|
setup(e, { emit: n }) {
|
|
1458
|
-
const t = e, o = de(), a = n, { data: r, labels: l, color: i, options: u, orientation: s, chartType: d } = le(t), c =
|
|
1458
|
+
const t = e, o = de(), a = n, { data: r, labels: l, color: i, options: u, orientation: s, chartType: d } = le(t), c = S(-1), p = S(null), b = S(null), k = S([]), L = S(null), $ = S(0), g = S(0), { allOptions: f } = _e(u), { internalData: y, computedLabels: I, containerSize: E, updateSize: D, chartID: H } = Lt(r, l, i, f, s), { xScale: w, yScale: P } = Ao(
|
|
1459
1459
|
y,
|
|
1460
1460
|
I,
|
|
1461
|
-
|
|
1461
|
+
E,
|
|
1462
1462
|
s,
|
|
1463
1463
|
f
|
|
1464
|
-
),
|
|
1464
|
+
), K = m(() => ({
|
|
1465
1465
|
top: ra(f.value.margins),
|
|
1466
1466
|
right: ia(f.value.margins),
|
|
1467
1467
|
bottom: sa(f.value.margins, $.value),
|
|
1468
1468
|
left: ca(f.value.margins, g.value)
|
|
1469
1469
|
})), Y = m(() => {
|
|
1470
|
-
var
|
|
1471
|
-
return t.xScale ? St(t.xScale) ? t.xScale : (
|
|
1470
|
+
var T;
|
|
1471
|
+
return t.xScale ? St(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, y.value, l.value, E) : w.value;
|
|
1472
1472
|
}), ne = m(() => {
|
|
1473
|
-
var
|
|
1474
|
-
return t.yScale ? St(t.yScale) ? t.yScale : (
|
|
1473
|
+
var T;
|
|
1474
|
+
return t.yScale ? St(t.yScale) ? t.yScale : (T = t.yScale) == null ? void 0 : T.call(t, y.value, l.value, E) : P.value;
|
|
1475
1475
|
}), ee = m(() => ({
|
|
1476
1476
|
...f.value.xAxisOptions,
|
|
1477
|
-
withHover: s.value ===
|
|
1477
|
+
withHover: s.value === B.VERTICAL
|
|
1478
1478
|
})), me = m(() => ({
|
|
1479
1479
|
...f.value.yAxisOptions,
|
|
1480
|
-
withHover: s.value ===
|
|
1480
|
+
withHover: s.value === B.HORIZONTAL
|
|
1481
1481
|
})), xe = m(() => {
|
|
1482
|
-
var
|
|
1483
|
-
return (
|
|
1482
|
+
var T;
|
|
1483
|
+
return (T = f.value.xAxisOptions) == null ? void 0 : T.title;
|
|
1484
1484
|
}), De = m(() => {
|
|
1485
|
-
var
|
|
1486
|
-
return (
|
|
1487
|
-
}),
|
|
1488
|
-
var
|
|
1489
|
-
return ((
|
|
1490
|
-
}),
|
|
1491
|
-
var
|
|
1492
|
-
return ((
|
|
1493
|
-
}),
|
|
1494
|
-
() => r.value.every((
|
|
1495
|
-
),
|
|
1496
|
-
const
|
|
1497
|
-
return
|
|
1498
|
-
}), { hasNegativeValues:
|
|
1499
|
-
|
|
1485
|
+
var T;
|
|
1486
|
+
return (T = f.value.yAxisOptions) == null ? void 0 : T.title;
|
|
1487
|
+
}), Se = m(() => {
|
|
1488
|
+
var T;
|
|
1489
|
+
return ((T = f.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && xe.value;
|
|
1490
|
+
}), F = m(() => {
|
|
1491
|
+
var T;
|
|
1492
|
+
return ((T = f.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 && De.value;
|
|
1493
|
+
}), R = m(
|
|
1494
|
+
() => r.value.every((T) => !T.values.length) || r.value.every((T) => T.values.every((A) => A === null))
|
|
1495
|
+
), C = m(() => {
|
|
1496
|
+
const T = [], { noBaseScales: A } = f.value;
|
|
1497
|
+
return A || T.push(() => !!(Y.value && ne.value)), T.every((N) => N() === !0);
|
|
1498
|
+
}), { hasNegativeValues: ue } = ta(y), { negativeBarAttributes: ke } = na(
|
|
1499
|
+
E,
|
|
1500
1500
|
Y,
|
|
1501
1501
|
ne,
|
|
1502
1502
|
s
|
|
1503
|
-
), { shouldGenerateTooltipAnchors:
|
|
1503
|
+
), { shouldGenerateTooltipAnchors: Re } = sn(
|
|
1504
1504
|
k,
|
|
1505
1505
|
f,
|
|
1506
1506
|
Y,
|
|
@@ -1509,152 +1509,152 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1509
1509
|
s,
|
|
1510
1510
|
y,
|
|
1511
1511
|
d
|
|
1512
|
-
), { tooltipConfig:
|
|
1512
|
+
), { tooltipConfig: Oe, showTooltip: et, hideTooltip: ze } = la(), { getTooltipItems: We } = ua(y), Be = m(
|
|
1513
1513
|
() => {
|
|
1514
|
-
var
|
|
1515
|
-
return ((
|
|
1514
|
+
var T;
|
|
1515
|
+
return ((T = f.value.tooltipOptions) == null ? void 0 : T.position) || "top";
|
|
1516
1516
|
}
|
|
1517
|
-
),
|
|
1518
|
-
var
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1517
|
+
), x = m(() => {
|
|
1518
|
+
var A;
|
|
1519
|
+
const T = (A = f.value.tooltipOptions) == null ? void 0 : A.withPointerEvents;
|
|
1520
|
+
return Oe.opened && (!T || T && L.value === !1);
|
|
1521
1521
|
});
|
|
1522
|
-
function
|
|
1522
|
+
function M(T) {
|
|
1523
1523
|
var N;
|
|
1524
|
-
if (f.value.withHover === !1 ||
|
|
1525
|
-
const
|
|
1526
|
-
if (c.value =
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1524
|
+
if (f.value.withHover === !1 || T === c.value) return;
|
|
1525
|
+
const A = c.value;
|
|
1526
|
+
if (c.value = T, f.value.withTooltip !== !1) {
|
|
1527
|
+
const be = (N = f.value.tooltipOptions) != null && N.targetElement ? f.value.tooltipOptions.targetElement === "self" ? b.value.$el : f.value.tooltipOptions.targetElement : p.value[T];
|
|
1528
|
+
et(be);
|
|
1529
1529
|
}
|
|
1530
|
-
a("hovered-index-changed", { newIndex:
|
|
1530
|
+
a("hovered-index-changed", { newIndex: T, oldIndex: A }), a("update:hoveredIndex", T);
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1533
|
-
|
|
1532
|
+
function h() {
|
|
1533
|
+
ze(), c.value = -1, a("update:hoveredIndex", -1);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function z(T) {
|
|
1536
1536
|
if (!r.value.some(
|
|
1537
|
-
({ values: N }) =>
|
|
1537
|
+
({ values: N }) => T <= N.length - 1
|
|
1538
1538
|
)) {
|
|
1539
1539
|
Te(ye.InvalidHoveredIndex);
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
1542
|
-
|
|
1542
|
+
T == null || T === -1 ? h() : M(T);
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function W() {
|
|
1545
1545
|
setTimeout(() => {
|
|
1546
|
-
|
|
1546
|
+
x.value && h(), a("chart-mouseleave");
|
|
1547
1547
|
}, 0);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
|
|
1549
|
+
function se(T) {
|
|
1550
|
+
D(T), a("resize", T);
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1553
|
-
|
|
1552
|
+
function tt({ index: T, value: A, event: N }) {
|
|
1553
|
+
T !== null && M(T), a("axis-mouseenter", { index: T, value: A, event: N });
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1556
|
-
a("axis-click", { index:
|
|
1555
|
+
function Ue({ index: T, value: A, event: N }) {
|
|
1556
|
+
a("axis-click", { index: T, value: A, event: N });
|
|
1557
1557
|
}
|
|
1558
1558
|
return X(
|
|
1559
1559
|
r,
|
|
1560
|
-
(
|
|
1560
|
+
(T, A) => a("data-changed", { newValue: T, oldValue: A })
|
|
1561
1561
|
), X(
|
|
1562
1562
|
l,
|
|
1563
|
-
(
|
|
1564
|
-
), X(
|
|
1563
|
+
(T, A) => a("labels-changed", { newValue: T, oldValue: A })
|
|
1564
|
+
), X(R, (T) => T && Te(ye.Empty), { immediate: !0 }), X(() => t.hoveredIndex, z), X(
|
|
1565
1565
|
k,
|
|
1566
|
-
(
|
|
1567
|
-
|
|
1566
|
+
(T) => {
|
|
1567
|
+
T && t.hoveredIndex != null && c.value === -1 && z(t.hoveredIndex);
|
|
1568
1568
|
},
|
|
1569
1569
|
{ flush: "post" }
|
|
1570
|
-
), X(L, (
|
|
1571
|
-
|
|
1570
|
+
), X(L, (T) => {
|
|
1571
|
+
T === !1 && Oe.opened && h();
|
|
1572
1572
|
}), $e(async () => {
|
|
1573
1573
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1574
|
-
}), nt("chartID", H), nt("isEmpty",
|
|
1574
|
+
}), nt("chartID", H), nt("isEmpty", R), nt("tooltipAnchorAttributes", k), (T, A) => (_(), q(v(wo), {
|
|
1575
1575
|
id: `lume-chart_${v(H)}`,
|
|
1576
1576
|
ref_key: "chartContainer",
|
|
1577
1577
|
ref: b,
|
|
1578
|
-
margins:
|
|
1579
|
-
"container-size": v(
|
|
1578
|
+
margins: K.value,
|
|
1579
|
+
"container-size": v(E),
|
|
1580
1580
|
"no-min-size": v(f).noMinSize,
|
|
1581
1581
|
"transparent-background": v(f).transparentBackground,
|
|
1582
1582
|
orientation: v(s),
|
|
1583
1583
|
"data-j-lume-chart": "",
|
|
1584
|
-
onResize:
|
|
1585
|
-
onClick:
|
|
1586
|
-
onMouseenter:
|
|
1587
|
-
onMouseleave:
|
|
1584
|
+
onResize: se,
|
|
1585
|
+
onClick: A[24] || (A[24] = (N) => a("chart-click", N)),
|
|
1586
|
+
onMouseenter: A[25] || (A[25] = (N) => a("chart-mouseenter", N)),
|
|
1587
|
+
onMouseleave: W
|
|
1588
1588
|
}, {
|
|
1589
|
-
header:
|
|
1589
|
+
header: U(() => [
|
|
1590
1590
|
j("div", da, [
|
|
1591
1591
|
j("div", va, [
|
|
1592
|
-
|
|
1592
|
+
T.title ? (_(), O("h1", fa, re(T.title), 1)) : Z("", !0),
|
|
1593
1593
|
j("div", ma, [
|
|
1594
|
-
|
|
1594
|
+
G(T.$slots, "controls", {}, void 0, !0)
|
|
1595
1595
|
])
|
|
1596
1596
|
]),
|
|
1597
1597
|
j("div", pa, [
|
|
1598
|
-
|
|
1599
|
-
|
|
1598
|
+
F.value ? (_(), O("h3", ga, re(De.value), 1)) : Z("", !0),
|
|
1599
|
+
G(T.$slots, "legend", { data: v(y) }, () => [
|
|
1600
1600
|
v(f).withLegend !== !1 && v(f).legendPosition !== "bottom" ? (_(), q(v(Gt), {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
data: v(y),
|
|
1603
1603
|
class: "lume-chart__legend",
|
|
1604
1604
|
"data-j-lume-chart__legend": "",
|
|
1605
|
-
onClick:
|
|
1606
|
-
onMouseenter:
|
|
1607
|
-
onMouseleave:
|
|
1605
|
+
onClick: A[0] || (A[0] = (N) => a("legend-click", N)),
|
|
1606
|
+
onMouseenter: A[1] || (A[1] = (N) => a("legend-mouseenter", N)),
|
|
1607
|
+
onMouseleave: A[2] || (A[2] = (N) => a("legend-mouseleave"))
|
|
1608
1608
|
}, null, 8, ["data"])) : Z("", !0)
|
|
1609
1609
|
], !0)
|
|
1610
1610
|
])
|
|
1611
1611
|
])
|
|
1612
1612
|
]),
|
|
1613
|
-
footer:
|
|
1614
|
-
|
|
1613
|
+
footer: U(() => [
|
|
1614
|
+
Se.value ? (_(), O("h3", _a, re(xe.value), 1)) : Z("", !0),
|
|
1615
1615
|
v(f).withLegend !== !1 && v(f).legendPosition == "bottom" ? (_(), q(v(Gt), {
|
|
1616
1616
|
key: 1,
|
|
1617
1617
|
data: v(y),
|
|
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: A[16] || (A[16] = (N) => a("legend-click", N)),
|
|
1621
|
+
onMouseenter: A[17] || (A[17] = (N) => a("legend-mouseenter", N)),
|
|
1622
|
+
onMouseleave: A[18] || (A[18] = (N) => a("legend-mouseleave"))
|
|
1623
1623
|
}, null, 8, ["data"])) : Z("", !0)
|
|
1624
1624
|
]),
|
|
1625
|
-
extra:
|
|
1626
|
-
|
|
1625
|
+
extra: U(() => [
|
|
1626
|
+
G(T.$slots, "tooltip", V(v(Oe), {
|
|
1627
1627
|
data: v(y),
|
|
1628
1628
|
labels: v(I),
|
|
1629
1629
|
title: v(I)[c.value],
|
|
1630
|
-
items: v(
|
|
1631
|
-
position:
|
|
1630
|
+
items: v(We)(c.value),
|
|
1631
|
+
position: Be.value,
|
|
1632
1632
|
withTooltip: v(f).withTooltip !== !1,
|
|
1633
1633
|
hoveredIndex: c.value,
|
|
1634
1634
|
handleMouseEnter: () => L.value = !0,
|
|
1635
1635
|
handleMouseLeave: () => L.value = !1,
|
|
1636
1636
|
options: v(f).tooltipOptions
|
|
1637
1637
|
}), () => [
|
|
1638
|
-
v(f).withTooltip !== !1 ? (_(), q(v(Qo),
|
|
1639
|
-
position:
|
|
1638
|
+
v(f).withTooltip !== !1 ? (_(), q(v(Qo), V({ key: 0 }, v(Oe), {
|
|
1639
|
+
position: Be.value,
|
|
1640
1640
|
title: v(I)[c.value],
|
|
1641
|
-
items: v(
|
|
1641
|
+
items: v(We)(c.value),
|
|
1642
1642
|
options: v(f).tooltipOptions,
|
|
1643
1643
|
"data-j-lume-chart__tooltip": "",
|
|
1644
|
-
onOpened:
|
|
1644
|
+
onOpened: A[19] || (A[19] = (N) => a("tooltip-opened", {
|
|
1645
1645
|
index: c.value,
|
|
1646
1646
|
targetElement: N
|
|
1647
1647
|
})),
|
|
1648
|
-
onMoved:
|
|
1648
|
+
onMoved: A[20] || (A[20] = (N) => a("tooltip-moved", {
|
|
1649
1649
|
index: c.value,
|
|
1650
1650
|
targetElement: N
|
|
1651
1651
|
})),
|
|
1652
|
-
onClosed:
|
|
1653
|
-
onTooltipMouseenter:
|
|
1654
|
-
onTooltipMouseleave:
|
|
1652
|
+
onClosed: A[21] || (A[21] = (N) => a("tooltip-closed")),
|
|
1653
|
+
onTooltipMouseenter: A[22] || (A[22] = (N) => L.value = !0),
|
|
1654
|
+
onTooltipMouseleave: A[23] || (A[23] = (N) => L.value = !1)
|
|
1655
1655
|
}), {
|
|
1656
|
-
default:
|
|
1657
|
-
|
|
1656
|
+
default: U(() => [
|
|
1657
|
+
G(T.$slots, "tooltip-content", {
|
|
1658
1658
|
data: v(y),
|
|
1659
1659
|
labels: v(I),
|
|
1660
1660
|
hoveredIndex: c.value
|
|
@@ -1664,46 +1664,46 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1664
1664
|
}, 16, ["position", "title", "items", "options"])) : Z("", !0)
|
|
1665
1665
|
], !0)
|
|
1666
1666
|
]),
|
|
1667
|
-
default:
|
|
1668
|
-
|
|
1669
|
-
v(
|
|
1667
|
+
default: U(() => [
|
|
1668
|
+
C.value ? (_(), O(te, { key: 0 }, [
|
|
1669
|
+
v(ue) ? (_(), q(v(ht), V({ key: 0 }, v(ke), {
|
|
1670
1670
|
"class-list": "lume-fill--negative",
|
|
1671
1671
|
transition: !1,
|
|
1672
1672
|
"data-j-lume-chart__negative-values": ""
|
|
1673
1673
|
}), null, 16)) : Z("", !0),
|
|
1674
|
-
v(f).withAxes !== !1 ?
|
|
1674
|
+
v(f).withAxes !== !1 ? G(T.$slots, "axes", {
|
|
1675
1675
|
key: 1,
|
|
1676
1676
|
xScale: Y.value,
|
|
1677
1677
|
yScale: ne.value,
|
|
1678
|
-
containerSize: v(
|
|
1678
|
+
containerSize: v(E),
|
|
1679
1679
|
options: v(f),
|
|
1680
1680
|
hoveredIndex: c.value
|
|
1681
1681
|
}, () => [
|
|
1682
1682
|
ve(v(Et), {
|
|
1683
1683
|
type: "x",
|
|
1684
1684
|
scale: Y.value,
|
|
1685
|
-
"container-size": v(
|
|
1685
|
+
"container-size": v(E),
|
|
1686
1686
|
options: ee.value,
|
|
1687
1687
|
"hovered-index": c.value,
|
|
1688
1688
|
orientation: v(s),
|
|
1689
1689
|
"data-j-lume-chart__x-axis": "",
|
|
1690
|
-
onClick:
|
|
1691
|
-
onMouseenter:
|
|
1692
|
-
onMouseleave:
|
|
1693
|
-
"onLume__internal-AxisSize":
|
|
1690
|
+
onClick: Ue,
|
|
1691
|
+
onMouseenter: tt,
|
|
1692
|
+
onMouseleave: A[3] || (A[3] = (N) => a("axis-mouseleave")),
|
|
1693
|
+
"onLume__internal-AxisSize": A[4] || (A[4] = (N) => $.value = N)
|
|
1694
1694
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1695
1695
|
ve(v(Et), {
|
|
1696
1696
|
type: "y",
|
|
1697
1697
|
scale: ne.value,
|
|
1698
|
-
"container-size": v(
|
|
1698
|
+
"container-size": v(E),
|
|
1699
1699
|
options: me.value,
|
|
1700
1700
|
"hovered-index": c.value,
|
|
1701
1701
|
orientation: v(s),
|
|
1702
1702
|
"data-j-lume-chart__y-axis": "",
|
|
1703
|
-
onClick:
|
|
1704
|
-
onMouseenter:
|
|
1705
|
-
onMouseleave:
|
|
1706
|
-
"onLume__internal-AxisSize":
|
|
1703
|
+
onClick: Ue,
|
|
1704
|
+
onMouseenter: tt,
|
|
1705
|
+
onMouseleave: A[5] || (A[5] = (N) => a("axis-mouseleave")),
|
|
1706
|
+
"onLume__internal-AxisSize": A[6] || (A[6] = (N) => g.value = N)
|
|
1707
1707
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1708
1708
|
], !0) : Z("", !0),
|
|
1709
1709
|
v(f).withHover !== !1 ? (_(), q(v(ea), {
|
|
@@ -1713,19 +1713,19 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1713
1713
|
"x-scale": Y.value,
|
|
1714
1714
|
"y-scale": ne.value,
|
|
1715
1715
|
"data-j-lume-chart__overlay-group": "",
|
|
1716
|
-
"onLume__internal-Hover":
|
|
1716
|
+
"onLume__internal-Hover": M
|
|
1717
1717
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : Z("", !0),
|
|
1718
|
-
v(
|
|
1719
|
-
(_(!0),
|
|
1718
|
+
v(Re) ? (_(), O("g", ha, [
|
|
1719
|
+
(_(!0), O(te, null, J(k.value, (N, be) => (_(), O("circle", V(N, {
|
|
1720
1720
|
ref_for: !0,
|
|
1721
1721
|
ref_key: "tooltipAnchor",
|
|
1722
1722
|
ref: p,
|
|
1723
|
-
key: `anchor_${
|
|
1723
|
+
key: `anchor_${be}`,
|
|
1724
1724
|
r: v(Xn),
|
|
1725
1725
|
class: "lume-fill--transparent"
|
|
1726
1726
|
}), null, 16, ya))), 128))
|
|
1727
1727
|
])) : Z("", !0),
|
|
1728
|
-
|
|
1728
|
+
G(T.$slots, "groups", {
|
|
1729
1729
|
data: v(y),
|
|
1730
1730
|
labels: v(I),
|
|
1731
1731
|
options: v(f),
|
|
@@ -1733,26 +1733,26 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1733
1733
|
xScale: Y.value,
|
|
1734
1734
|
yScale: ne.value,
|
|
1735
1735
|
hoveredIndex: c.value,
|
|
1736
|
-
containerSize: v(
|
|
1736
|
+
containerSize: v(E),
|
|
1737
1737
|
transition: v(f).withTransition !== !1,
|
|
1738
|
-
classList:
|
|
1739
|
-
onNodeClick:
|
|
1740
|
-
onNodeMouseenter:
|
|
1741
|
-
onNodeMouseleave:
|
|
1742
|
-
onLinkClick:
|
|
1743
|
-
onLinkMouseenter:
|
|
1744
|
-
onLinkMouseleave:
|
|
1745
|
-
onBarClick:
|
|
1746
|
-
onLineClick:
|
|
1747
|
-
onPointClick:
|
|
1748
|
-
"onLume__internal-Hover":
|
|
1738
|
+
classList: T.classList,
|
|
1739
|
+
onNodeClick: A[7] || (A[7] = (N) => a("node-click", N)),
|
|
1740
|
+
onNodeMouseenter: A[8] || (A[8] = (N) => a("node-mouseenter", N)),
|
|
1741
|
+
onNodeMouseleave: A[9] || (A[9] = (N) => a("node-mouseleave", N)),
|
|
1742
|
+
onLinkClick: A[10] || (A[10] = (N) => a("link-click", N)),
|
|
1743
|
+
onLinkMouseenter: A[11] || (A[11] = (N) => a("link-mouseenter", N)),
|
|
1744
|
+
onLinkMouseleave: A[12] || (A[12] = (N) => a("link-mouseleave", N)),
|
|
1745
|
+
onBarClick: A[13] || (A[13] = (N) => a("bar-click", N)),
|
|
1746
|
+
onLineClick: A[14] || (A[14] = (N) => a("line-click", N)),
|
|
1747
|
+
onPointClick: A[15] || (A[15] = (N) => a("point-click", N)),
|
|
1748
|
+
"onLume__internal-Hover": M
|
|
1749
1749
|
}, void 0, !0)
|
|
1750
1750
|
], 64)) : Z("", !0)
|
|
1751
1751
|
]),
|
|
1752
1752
|
_: 3
|
|
1753
1753
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "orientation"]));
|
|
1754
1754
|
}
|
|
1755
|
-
}), Me = /* @__PURE__ */ oe(ka, [["__scopeId", "data-v-17c48844"]]), jt = 8, ba = 8, La = 20,
|
|
1755
|
+
}), Me = /* @__PURE__ */ oe(ka, [["__scopeId", "data-v-17c48844"]]), jt = 8, ba = 8, La = 20, Ge = 2, Ze = 3, Aa = 4, Ct = 2, Ta = ["dy", "dominant-baseline"], $a = ["y", "x", "width", "height"], Ia = { class: "lume-alluvial-group__label-wrapper" }, xa = /* @__PURE__ */ Q({
|
|
1756
1756
|
__name: "lume-alluvial-node-label",
|
|
1757
1757
|
props: {
|
|
1758
1758
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1761,20 +1761,20 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1761
1761
|
},
|
|
1762
1762
|
emits: ["lume__internal--node-resize"],
|
|
1763
1763
|
setup(e, { emit: n }) {
|
|
1764
|
-
const t = e, o = n, a =
|
|
1764
|
+
const t = e, o = n, a = S(null), r = S(t.maxWidth), l = S(1);
|
|
1765
1765
|
return X(
|
|
1766
1766
|
[a, () => t.maxWidth],
|
|
1767
1767
|
async ([i, u]) => {
|
|
1768
1768
|
if (i && u) {
|
|
1769
1769
|
r.value = u, await at();
|
|
1770
1770
|
const { width: s, height: d } = i.getBoundingClientRect();
|
|
1771
|
-
r.value = s +
|
|
1771
|
+
r.value = s + Ct > u ? u : s + Ct, l.value = Math.ceil(d);
|
|
1772
1772
|
}
|
|
1773
1773
|
},
|
|
1774
1774
|
{ immediate: !0 }
|
|
1775
1775
|
), X(r, async (i) => {
|
|
1776
1776
|
i !== t.maxWidth && (await at(), o("lume__internal--node-resize"));
|
|
1777
|
-
}), (i, u) => e.maxWidth ? (_(),
|
|
1777
|
+
}), (i, u) => e.maxWidth ? (_(), O("foreignObject", {
|
|
1778
1778
|
key: 1,
|
|
1779
1779
|
class: "lume-alluvial-group__node-foreign",
|
|
1780
1780
|
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
@@ -1788,33 +1788,33 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1788
1788
|
ref: a,
|
|
1789
1789
|
class: "lume-alluvial-group__node-label"
|
|
1790
1790
|
}, [
|
|
1791
|
-
|
|
1791
|
+
G(i.$slots, "default", {}, void 0, !0)
|
|
1792
1792
|
], 512)
|
|
1793
1793
|
])
|
|
1794
|
-
], 8, $a)) : (_(),
|
|
1794
|
+
], 8, $a)) : (_(), O("text", {
|
|
1795
1795
|
key: 0,
|
|
1796
1796
|
class: "lume-alluvial-group__node-label",
|
|
1797
1797
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1798
1798
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1799
1799
|
}, [
|
|
1800
|
-
|
|
1800
|
+
G(i.$slots, "default", {}, void 0, !0)
|
|
1801
1801
|
], 8, Ta));
|
|
1802
1802
|
}
|
|
1803
|
-
}), Oa = /* @__PURE__ */ oe(xa, [["__scopeId", "data-v-7126dfdb"]]), wa = ["y", "dominant-baseline"], Na = /* @__PURE__ */
|
|
1803
|
+
}), Oa = /* @__PURE__ */ oe(xa, [["__scopeId", "data-v-7126dfdb"]]), wa = ["y", "dominant-baseline"], Na = /* @__PURE__ */ Q({
|
|
1804
1804
|
__name: "lume-alluvial-node-value",
|
|
1805
1805
|
props: {
|
|
1806
1806
|
bottom: { type: Boolean, default: !0 }
|
|
1807
1807
|
},
|
|
1808
1808
|
setup(e) {
|
|
1809
|
-
return (n, t) => (_(),
|
|
1809
|
+
return (n, t) => (_(), O("text", {
|
|
1810
1810
|
class: "lume-alluvial-group__node-value",
|
|
1811
1811
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1812
1812
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1813
1813
|
}, [
|
|
1814
|
-
|
|
1814
|
+
G(n.$slots, "default", {}, void 0, !0)
|
|
1815
1815
|
], 8, wa));
|
|
1816
1816
|
}
|
|
1817
|
-
}), Ea = /* @__PURE__ */ oe(Na, [["__scopeId", "data-v-b4fc758b"]]), Da = ["transform"],
|
|
1817
|
+
}), Ea = /* @__PURE__ */ oe(Na, [["__scopeId", "data-v-b4fc758b"]]), Da = ["transform"], Ba = ["transform"], Ha = ["transform"], Ma = /* @__PURE__ */ Q({
|
|
1818
1818
|
__name: "lume-alluvial-node-header",
|
|
1819
1819
|
props: {
|
|
1820
1820
|
align: {
|
|
@@ -1825,7 +1825,7 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1825
1825
|
y: { type: Number, required: !0 }
|
|
1826
1826
|
},
|
|
1827
1827
|
setup(e) {
|
|
1828
|
-
const n = e, t =
|
|
1828
|
+
const n = e, t = S(null), o = m(() => {
|
|
1829
1829
|
var i;
|
|
1830
1830
|
return ((i = t.value) == null ? void 0 : i.getBBox().width) ?? 0;
|
|
1831
1831
|
}), a = m(() => n.align === "left" ? 0 : n.align === "right" ? -o.value : -o.value / 2), r = m(
|
|
@@ -1833,12 +1833,12 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1833
1833
|
), l = m(
|
|
1834
1834
|
() => t.value && `translate(${a.value + o.value}, 0)`
|
|
1835
1835
|
);
|
|
1836
|
-
return (i, u) => (_(),
|
|
1836
|
+
return (i, u) => (_(), O("g", {
|
|
1837
1837
|
transform: `translate(${e.x}, ${e.y})`
|
|
1838
1838
|
}, [
|
|
1839
1839
|
j("g", { transform: r.value }, [
|
|
1840
|
-
|
|
1841
|
-
], 8,
|
|
1840
|
+
G(i.$slots, "before", {}, void 0, !0)
|
|
1841
|
+
], 8, Ba),
|
|
1842
1842
|
j("text", {
|
|
1843
1843
|
ref_key: "textRef",
|
|
1844
1844
|
ref: t,
|
|
@@ -1846,15 +1846,15 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1846
1846
|
[`lume-alluvial-group__node-header--${e.align}`]: e.align !== "center"
|
|
1847
1847
|
}])
|
|
1848
1848
|
}, [
|
|
1849
|
-
|
|
1849
|
+
G(i.$slots, "default", {}, void 0, !0)
|
|
1850
1850
|
], 2),
|
|
1851
1851
|
j("g", { transform: l.value }, [
|
|
1852
|
-
|
|
1853
|
-
], 8,
|
|
1852
|
+
G(i.$slots, "after", {}, void 0, !0)
|
|
1853
|
+
], 8, Ha)
|
|
1854
1854
|
], 8, Da));
|
|
1855
1855
|
}
|
|
1856
1856
|
}), Sa = /* @__PURE__ */ oe(Ma, [["__scopeId", "data-v-ee436a8d"]]);
|
|
1857
|
-
function
|
|
1857
|
+
function Pt(e, n) {
|
|
1858
1858
|
return {
|
|
1859
1859
|
x0: 0 + (n ? n.left : 0),
|
|
1860
1860
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1863,13 +1863,13 @@ function Vt(e, n) {
|
|
|
1863
1863
|
};
|
|
1864
1864
|
}
|
|
1865
1865
|
function Ra(e) {
|
|
1866
|
-
const n =
|
|
1866
|
+
const n = S(Pt(e));
|
|
1867
1867
|
function t(o) {
|
|
1868
|
-
n.value =
|
|
1868
|
+
n.value = Pt(e, o);
|
|
1869
1869
|
}
|
|
1870
1870
|
return { extents: n, updateExtents: t };
|
|
1871
1871
|
}
|
|
1872
|
-
var
|
|
1872
|
+
var Ye = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", e.BarScaleNull = "Bar linear scale cannot be `null`", e))(Ye || {});
|
|
1873
1873
|
const Ga = "[lume] ";
|
|
1874
1874
|
function vt(e, n, t = !0) {
|
|
1875
1875
|
t && Kt() || console.error(Ga + "Error: " + e, n);
|
|
@@ -1881,7 +1881,7 @@ function ce(e) {
|
|
|
1881
1881
|
function ja(e, n) {
|
|
1882
1882
|
return n.nodes.find((t) => t.id === e);
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Ca(e, n) {
|
|
1885
1885
|
return n.links.find((t) => t.id === e);
|
|
1886
1886
|
}
|
|
1887
1887
|
function cn(e) {
|
|
@@ -1901,7 +1901,7 @@ function vn(e, n) {
|
|
|
1901
1901
|
function fn(e, n, t) {
|
|
1902
1902
|
return dn(e) ? n.alignFirstNodeLabels !== "right" : vn(e, t) ? n.alignLastNodeLabels === "left" : !1;
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function Pa(e, n, t) {
|
|
1905
1905
|
if (!n) return;
|
|
1906
1906
|
const o = Tt(e.nodes), a = e.nodes.filter((u) => dn(u)).map((u) => `${u.id}`), r = e.nodes.filter((u) => vn(u, o)).map((u) => `${u.id}`), l = n.filter((u) => a.includes(u.dataset.id)).reduce(
|
|
1907
1907
|
(u, s) => Math.max(u, s.getBBox().width),
|
|
@@ -1917,16 +1917,16 @@ function Va(e, n, t) {
|
|
|
1917
1917
|
bottom: 0
|
|
1918
1918
|
};
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1920
|
+
function Va(e, n) {
|
|
1921
1921
|
const t = Tt(e);
|
|
1922
1922
|
return e.map((o) => {
|
|
1923
|
-
const a = o.y1 - o.y0 <
|
|
1923
|
+
const a = o.y1 - o.y0 < Ge;
|
|
1924
1924
|
return {
|
|
1925
1925
|
x: o.x0,
|
|
1926
|
-
y: o.y0 - (a ?
|
|
1926
|
+
y: o.y0 - (a ? Ge / 2 : 0),
|
|
1927
1927
|
// Negative offset to account for the min. height
|
|
1928
1928
|
width: o.x1 - o.x0,
|
|
1929
|
-
height: a ?
|
|
1929
|
+
height: a ? Ge : o.y1 - o.y0,
|
|
1930
1930
|
textTransform: {
|
|
1931
1931
|
x: fn(o, n, t) ? o.x0 - jt : o.x1 + jt,
|
|
1932
1932
|
y: (o.y1 + o.y0) / 2
|
|
@@ -1956,7 +1956,7 @@ function Za(e) {
|
|
|
1956
1956
|
};
|
|
1957
1957
|
});
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Vt(e, n, t, o, a) {
|
|
1960
1960
|
if (o === !1) {
|
|
1961
1961
|
e.node = {
|
|
1962
1962
|
...e.node,
|
|
@@ -1964,7 +1964,7 @@ function Ct(e, n, t, o, a) {
|
|
|
1964
1964
|
};
|
|
1965
1965
|
return;
|
|
1966
1966
|
}
|
|
1967
|
-
const r = Date.now(), l =
|
|
1967
|
+
const r = Date.now(), l = Cn(n, t), i = () => {
|
|
1968
1968
|
let s = (Date.now() - r) / Fa;
|
|
1969
1969
|
s > 1 && (s = 1), e.node = {
|
|
1970
1970
|
...e.node,
|
|
@@ -1975,7 +1975,7 @@ function Ct(e, n, t, o, a) {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
const Xa = ":aggregated";
|
|
1977
1977
|
function Ya(e) {
|
|
1978
|
-
const n =
|
|
1978
|
+
const n = S([]), t = m(() => {
|
|
1979
1979
|
var s, d;
|
|
1980
1980
|
const u = /* @__PURE__ */ new Map();
|
|
1981
1981
|
return (d = (s = e.value) == null ? void 0 : s[0]) == null || d.values.forEach(({ value: c, expandableNodes: p }) => {
|
|
@@ -2238,7 +2238,7 @@ function Wt(e, n) {
|
|
|
2238
2238
|
return n.find((t) => t.every((o) => o.layer === e.layer));
|
|
2239
2239
|
}
|
|
2240
2240
|
function sl(e, n, t) {
|
|
2241
|
-
const o =
|
|
2241
|
+
const o = S(null), {
|
|
2242
2242
|
childIdsByParentId: a,
|
|
2243
2243
|
expandedNodeIds: r,
|
|
2244
2244
|
isExpandableNode: l,
|
|
@@ -2251,16 +2251,16 @@ function sl(e, n, t) {
|
|
|
2251
2251
|
({
|
|
2252
2252
|
label: y,
|
|
2253
2253
|
color: I,
|
|
2254
|
-
value:
|
|
2255
|
-
deriveColorFromIncomingLinks:
|
|
2254
|
+
value: E,
|
|
2255
|
+
deriveColorFromIncomingLinks: D,
|
|
2256
2256
|
expandableNodes: H,
|
|
2257
2257
|
offset: w
|
|
2258
2258
|
}) => ({
|
|
2259
|
-
label: y ||
|
|
2259
|
+
label: y || E.toString(),
|
|
2260
2260
|
color: I,
|
|
2261
2261
|
fallbackColor: I || Ve,
|
|
2262
|
-
id:
|
|
2263
|
-
deriveColorFromIncomingLinks:
|
|
2262
|
+
id: E,
|
|
2263
|
+
deriveColorFromIncomingLinks: D,
|
|
2264
2264
|
expandableNodes: H,
|
|
2265
2265
|
offset: w
|
|
2266
2266
|
})
|
|
@@ -2272,13 +2272,13 @@ function sl(e, n, t) {
|
|
|
2272
2272
|
(y) => {
|
|
2273
2273
|
var I;
|
|
2274
2274
|
return (I = y.targets) == null ? void 0 : I.map(
|
|
2275
|
-
({ node:
|
|
2276
|
-
id: `${y.value}:${
|
|
2275
|
+
({ node: E, value: D, color: H, curveFunction: w }) => ({
|
|
2276
|
+
id: `${y.value}:${E}`,
|
|
2277
2277
|
color: H,
|
|
2278
2278
|
curveFunction: w,
|
|
2279
2279
|
source: y.value ?? y.label,
|
|
2280
|
-
target:
|
|
2281
|
-
value:
|
|
2280
|
+
target: E,
|
|
2281
|
+
value: D
|
|
2282
2282
|
})
|
|
2283
2283
|
);
|
|
2284
2284
|
}
|
|
@@ -2288,22 +2288,22 @@ function sl(e, n, t) {
|
|
|
2288
2288
|
var g;
|
|
2289
2289
|
return (g = o.value) == null ? void 0 : g.nodes.filter((f) => f.parentNodeId == null).reduce((f, y) => {
|
|
2290
2290
|
const I = Wt(y, f);
|
|
2291
|
-
return I ? (I.push(y), I.sort((
|
|
2291
|
+
return I ? (I.push(y), I.sort((E, D) => (E._y0 || E.y0) - (D._y0 || D.y0))) : f.push([y]), f;
|
|
2292
2292
|
}, []).sort((f, y) => f[0].layer - y[0].layer);
|
|
2293
2293
|
});
|
|
2294
2294
|
function k(g) {
|
|
2295
2295
|
const { offset: f } = g, y = Wt(g, b.value);
|
|
2296
2296
|
if (!y) return;
|
|
2297
|
-
const I = y[y.findIndex((
|
|
2298
|
-
g._y0 = g.y0, g._y1 = g.y1, g.y0 =
|
|
2297
|
+
const I = y[y.findIndex((D) => D.id === g.id) - 1], E = I && y.length !== 1 ? I.y1 + f : f;
|
|
2298
|
+
g._y0 = g.y0, g._y1 = g.y1, g.y0 = E, g.y1 = g.y0 + (g._y1 - g._y0);
|
|
2299
2299
|
}
|
|
2300
2300
|
function L(g, f) {
|
|
2301
|
-
const { id: y, _y0: I, y0:
|
|
2301
|
+
const { id: y, _y0: I, y0: E } = g, D = f.links.filter(
|
|
2302
2302
|
(P) => P.source.id === y
|
|
2303
2303
|
), H = f.links.filter(
|
|
2304
2304
|
(P) => P.target.id === y
|
|
2305
|
-
), w =
|
|
2306
|
-
|
|
2305
|
+
), w = E - I;
|
|
2306
|
+
D.forEach((P) => P.y0 += w), H.forEach((P) => P.y1 += w);
|
|
2307
2307
|
}
|
|
2308
2308
|
const $ = m(() => {
|
|
2309
2309
|
var g;
|
|
@@ -2313,7 +2313,7 @@ function sl(e, n, t) {
|
|
|
2313
2313
|
});
|
|
2314
2314
|
return X([p, t, r], () => {
|
|
2315
2315
|
try {
|
|
2316
|
-
const { x0: g, y0: f, x1: y, y1: I } = t.value,
|
|
2316
|
+
const { x0: g, y0: f, x1: y, y1: I } = t.value, E = p.value.extent([
|
|
2317
2317
|
[g, f],
|
|
2318
2318
|
[y, I]
|
|
2319
2319
|
])(
|
|
@@ -2325,16 +2325,16 @@ function sl(e, n, t) {
|
|
|
2325
2325
|
)
|
|
2326
2326
|
);
|
|
2327
2327
|
Ja({
|
|
2328
|
-
graph:
|
|
2328
|
+
graph: E,
|
|
2329
2329
|
nodes: d.value,
|
|
2330
2330
|
linkDefinitions: c.value,
|
|
2331
2331
|
expandedNodeIds: r.value,
|
|
2332
2332
|
childIdsByParentId: a.value,
|
|
2333
2333
|
options: n.value,
|
|
2334
2334
|
extents: t.value
|
|
2335
|
-
}), o.value =
|
|
2335
|
+
}), o.value = E;
|
|
2336
2336
|
} catch (g) {
|
|
2337
|
-
vt(
|
|
2337
|
+
vt(Ye.GraphProblem, g), o.value = il;
|
|
2338
2338
|
}
|
|
2339
2339
|
}), { columns: b, graph: $, isExpandableNode: l, toggleNodeExpansion: s };
|
|
2340
2340
|
}
|
|
@@ -2391,14 +2391,14 @@ const dl = (e, n) => {
|
|
|
2391
2391
|
};
|
|
2392
2392
|
};
|
|
2393
2393
|
function fl(e, n, t) {
|
|
2394
|
-
const o =
|
|
2394
|
+
const o = S(null), a = m(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2395
2395
|
o.value,
|
|
2396
2396
|
t.value
|
|
2397
2397
|
) : n.value.highlightedElements === "closest" ? vl(o.value, t.value) : dl(o.value, t.value) : { nodes: {}, links: [] });
|
|
2398
2398
|
return X(a, (r, l) => {
|
|
2399
2399
|
if (r.links.length === 0 && Object.keys(r.nodes).length === 0) {
|
|
2400
2400
|
e.value.forEach((i) => {
|
|
2401
|
-
i.node.id in l.nodes &&
|
|
2401
|
+
i.node.id in l.nodes && Vt(
|
|
2402
2402
|
i,
|
|
2403
2403
|
l.nodes[i.node.id],
|
|
2404
2404
|
i.node.value,
|
|
@@ -2409,7 +2409,7 @@ function fl(e, n, t) {
|
|
|
2409
2409
|
return;
|
|
2410
2410
|
}
|
|
2411
2411
|
e.value.forEach((i) => {
|
|
2412
|
-
i.node.id in r.nodes &&
|
|
2412
|
+
i.node.id in r.nodes && Vt(
|
|
2413
2413
|
i,
|
|
2414
2414
|
i.node.value,
|
|
2415
2415
|
r.nodes[i.node.id],
|
|
@@ -2421,10 +2421,10 @@ function fl(e, n, t) {
|
|
|
2421
2421
|
const ml = {
|
|
2422
2422
|
class: "lume-alluvial-group",
|
|
2423
2423
|
"data-j-alluvial-group": ""
|
|
2424
|
-
}, pl = { key: 0 }, gl = { key: 0 }, hl = ["id", "x1", "x2"], yl = ["stop-color"], _l = ["stop-color"], kl = ["d", "stroke-width", "onClick", "onMouseover"], bl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ll = ["tabindex", "onClick", "onKeydown", "onMouseenter", "onMouseleave", "onMouseover", "onFocus"], Al = ["x", "y", "height", "width"],
|
|
2424
|
+
}, pl = { key: 0 }, gl = { key: 0 }, hl = ["id", "x1", "x2"], yl = ["stop-color"], _l = ["stop-color"], kl = ["d", "stroke-width", "onClick", "onMouseover"], bl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ll = ["tabindex", "onClick", "onKeydown", "onMouseenter", "onMouseleave", "onMouseover", "onFocus"], Al = ["onClick"], Tl = ["x", "y", "height", "width", "onClick"], $l = ["x", "y", "height", "width", "rx", "onClick"], Il = ["transform", "data-id", "width"], xl = /* @__PURE__ */ Q({
|
|
2425
2425
|
__name: "lume-alluvial-group",
|
|
2426
2426
|
props: {
|
|
2427
|
-
...
|
|
2427
|
+
...qe(),
|
|
2428
2428
|
hoveredElementId: {
|
|
2429
2429
|
type: [Number, String],
|
|
2430
2430
|
default: null
|
|
@@ -2432,142 +2432,153 @@ const ml = {
|
|
|
2432
2432
|
},
|
|
2433
2433
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2434
2434
|
setup(e, { emit: n }) {
|
|
2435
|
-
const t = e, o = n, a =
|
|
2435
|
+
const t = e, o = n, a = Ke("chartID"), { data: r, options: l } = le(t), i = S([]), u = S([]), s = S(null), d = S(null), c = S(null), { extents: p, updateExtents: b } = Ra(t.containerSize), { columns: k, graph: L, isExpandableNode: $, toggleNodeExpansion: g } = sl(r, l, p), { hoveredElement: f, highlightedElements: y } = fl(
|
|
2436
2436
|
i,
|
|
2437
2437
|
l,
|
|
2438
2438
|
L
|
|
2439
|
-
), I = m(() =>
|
|
2439
|
+
), I = m(() => Xe(l.value.valueFormat)), E = m(
|
|
2440
|
+
() => l.value.nodeExpansionTrigger === "block"
|
|
2441
|
+
), D = m(
|
|
2440
2442
|
() => Object.keys(y.value.nodes)
|
|
2441
|
-
),
|
|
2443
|
+
), H = m(
|
|
2442
2444
|
() => {
|
|
2443
|
-
var
|
|
2444
|
-
return (
|
|
2445
|
+
var x, M;
|
|
2446
|
+
return (M = (x = L.value) == null ? void 0 : x.nodes) != null && M.length ? Tt(L.value.nodes) : 0;
|
|
2445
2447
|
}
|
|
2446
|
-
),
|
|
2448
|
+
), w = m(() => {
|
|
2447
2449
|
if (!k.value) return [];
|
|
2448
|
-
const
|
|
2449
|
-
return k.value.map(([{ x0:
|
|
2450
|
-
}),
|
|
2450
|
+
const x = k.value.length - 1;
|
|
2451
|
+
return k.value.map(([{ x0: M, x1: h }], z) => z === 0 && l.value.alignFirstNodeLabels === "right" ? { x: M, align: "left" } : z === x && l.value.alignLastNodeLabels === "left" ? { x: h, align: "right" } : { x: (M + h) / 2, align: "center" });
|
|
2452
|
+
}), P = m(() => {
|
|
2451
2453
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2452
|
-
return l.value.nodeHeaders.slice(0,
|
|
2453
|
-
label:
|
|
2454
|
-
...
|
|
2454
|
+
return l.value.nodeHeaders.slice(0, w.value.length).map((x, M) => ({
|
|
2455
|
+
label: x,
|
|
2456
|
+
...w.value[M]
|
|
2455
2457
|
}));
|
|
2456
|
-
}),
|
|
2458
|
+
}), K = m(
|
|
2457
2459
|
() => l.value.nodeHeaderPadding ?? La
|
|
2458
|
-
),
|
|
2460
|
+
), Y = m(() => {
|
|
2459
2461
|
if (!(!l.value.gradient || !L.value))
|
|
2460
|
-
return L.value.links.reduce((
|
|
2461
|
-
const { source: h, target: z } =
|
|
2462
|
-
return
|
|
2463
|
-
source:
|
|
2464
|
-
target:
|
|
2462
|
+
return L.value.links.reduce((x, M) => {
|
|
2463
|
+
const { source: h, target: z } = M, W = h.color || h.fallbackColor, se = z.deriveColorFromIncomingLinks ? W : z.color || z.fallbackColor;
|
|
2464
|
+
return x[M.id] = {
|
|
2465
|
+
source: W,
|
|
2466
|
+
target: se,
|
|
2465
2467
|
x1: h.x1,
|
|
2466
2468
|
x2: z.x0
|
|
2467
|
-
},
|
|
2469
|
+
}, x;
|
|
2468
2470
|
}, {});
|
|
2469
|
-
}),
|
|
2470
|
-
const
|
|
2471
|
-
(h) =>
|
|
2472
|
-
),
|
|
2473
|
-
return
|
|
2471
|
+
}), ne = m(() => {
|
|
2472
|
+
const x = i.value.filter(
|
|
2473
|
+
(h) => R(h)
|
|
2474
|
+
), M = [];
|
|
2475
|
+
return x.forEach((h) => {
|
|
2474
2476
|
const z = [];
|
|
2475
|
-
u.value.filter(({ link:
|
|
2476
|
-
const
|
|
2477
|
-
let
|
|
2478
|
-
return
|
|
2477
|
+
u.value.filter(({ link: W }) => W.target.id === h.node.id).reverse().reduce((W, se, tt, Ue) => {
|
|
2478
|
+
const T = se.link.target.y1 - se.link.target.y0 > Ge;
|
|
2479
|
+
let A, N, be;
|
|
2480
|
+
return T ? (A = se.link.target.y1 - se.link.target.y0, N = se.link.value / h.node.value, be = N * A) : be = Ge / Ue.length, z.push({
|
|
2479
2481
|
x: h.x,
|
|
2480
|
-
y: h.y +
|
|
2481
|
-
height:
|
|
2482
|
+
y: h.y + W,
|
|
2483
|
+
height: be,
|
|
2482
2484
|
width: h.width,
|
|
2483
|
-
key: `node-block-${h.node.id}-source-link-${
|
|
2484
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2485
|
-
}),
|
|
2486
|
-
}, 0),
|
|
2485
|
+
key: `node-block-${h.node.id}-source-link-${se.link.source.id}`,
|
|
2486
|
+
class: `lume-alluvial-group__node-block lume-fill--${se.link.source.color || Ve}`
|
|
2487
|
+
}), W + be;
|
|
2488
|
+
}, 0), M.push({
|
|
2487
2489
|
id: h.node.id,
|
|
2488
2490
|
subNodes: z
|
|
2489
2491
|
});
|
|
2490
|
-
}),
|
|
2492
|
+
}), M;
|
|
2491
2493
|
});
|
|
2492
|
-
function
|
|
2493
|
-
return l.value.gradient && `url('#${a}_${
|
|
2494
|
+
function ee(x) {
|
|
2495
|
+
return l.value.gradient && `url('#${a}_${x.id}')`;
|
|
2496
|
+
}
|
|
2497
|
+
function me(x) {
|
|
2498
|
+
return D.value.length > 0 && !D.value.includes(x.toString());
|
|
2499
|
+
}
|
|
2500
|
+
function xe(x) {
|
|
2501
|
+
return D.value.length > 0 && D.value.includes(x.toString());
|
|
2494
2502
|
}
|
|
2495
|
-
function
|
|
2496
|
-
return
|
|
2503
|
+
function De(x) {
|
|
2504
|
+
return y.value.links.length > 0 && !y.value.links.includes(x);
|
|
2497
2505
|
}
|
|
2498
|
-
function
|
|
2499
|
-
return
|
|
2506
|
+
function Se(x) {
|
|
2507
|
+
return y.value.links.length > 0 && y.value.links.includes(x);
|
|
2500
2508
|
}
|
|
2501
|
-
function
|
|
2502
|
-
return
|
|
2509
|
+
function F(x) {
|
|
2510
|
+
return fn(x, l.value, H.value);
|
|
2503
2511
|
}
|
|
2504
|
-
function
|
|
2505
|
-
return
|
|
2512
|
+
function R(x) {
|
|
2513
|
+
return !x.node.color && x.node.deriveColorFromIncomingLinks;
|
|
2506
2514
|
}
|
|
2507
|
-
function
|
|
2508
|
-
|
|
2515
|
+
function C(x) {
|
|
2516
|
+
$(x.id) && g(x.id);
|
|
2509
2517
|
}
|
|
2510
|
-
function
|
|
2511
|
-
|
|
2518
|
+
function ue(x, M) {
|
|
2519
|
+
E.value || C(x), o("node-click", { node: x, event: M });
|
|
2512
2520
|
}
|
|
2513
|
-
function
|
|
2514
|
-
|
|
2521
|
+
function ke(x, M) {
|
|
2522
|
+
C(x), o("node-click", { node: x, event: M });
|
|
2515
2523
|
}
|
|
2516
|
-
function
|
|
2517
|
-
E
|
|
2524
|
+
function Re(x) {
|
|
2525
|
+
E.value && C(x);
|
|
2518
2526
|
}
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2521
|
-
f.value = null, o("link-mouseleave", { link: F, event: E });
|
|
2527
|
+
function Oe(x, M) {
|
|
2528
|
+
x !== f.value && (f.value = x, o("link-mouseenter", { link: x, event: M }));
|
|
2522
2529
|
}
|
|
2523
|
-
function
|
|
2524
|
-
|
|
2530
|
+
function et(x) {
|
|
2531
|
+
const M = f.value;
|
|
2532
|
+
f.value = null, o("link-mouseleave", { link: M, event: x });
|
|
2533
|
+
}
|
|
2534
|
+
function ze(x) {
|
|
2535
|
+
if (x == null) {
|
|
2525
2536
|
f.value = null;
|
|
2526
2537
|
return;
|
|
2527
2538
|
}
|
|
2528
|
-
const
|
|
2529
|
-
if (!
|
|
2539
|
+
const M = ja(x, L.value) || Ca(x, L.value);
|
|
2540
|
+
if (!M) {
|
|
2530
2541
|
Te(ye.InvalidHoveredElement);
|
|
2531
2542
|
return;
|
|
2532
2543
|
}
|
|
2533
|
-
f.value =
|
|
2544
|
+
f.value = M;
|
|
2534
2545
|
}
|
|
2535
|
-
function
|
|
2536
|
-
var
|
|
2537
|
-
return ((
|
|
2546
|
+
function We(x) {
|
|
2547
|
+
var M;
|
|
2548
|
+
return ((M = ne.value.find(({ id: h }) => x === h)) == null ? void 0 : M.subNodes) ?? [];
|
|
2538
2549
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const
|
|
2550
|
+
function Be() {
|
|
2551
|
+
const x = Pa(
|
|
2541
2552
|
L.value,
|
|
2542
2553
|
s.value,
|
|
2543
2554
|
l.value
|
|
2544
2555
|
);
|
|
2545
|
-
b(
|
|
2556
|
+
b(x);
|
|
2546
2557
|
}
|
|
2547
|
-
return X(L, (
|
|
2548
|
-
i.value =
|
|
2558
|
+
return X(L, (x) => {
|
|
2559
|
+
i.value = Va(x.nodes, l.value), u.value = Za(x.links).reverse(), f.value == null && t.hoveredElementId != null && ze(t.hoveredElementId);
|
|
2549
2560
|
}), X([d, c], () => {
|
|
2550
2561
|
f.value = d.value ?? c.value;
|
|
2551
2562
|
}), X([t.containerSize, s], () => {
|
|
2552
|
-
t.containerSize.width && t.containerSize.height &&
|
|
2563
|
+
t.containerSize.width && t.containerSize.height && Be();
|
|
2553
2564
|
}), X(
|
|
2554
2565
|
() => [l.value.alignFirstNodeLabels, l.value.alignLastNodeLabels],
|
|
2555
|
-
|
|
2556
|
-
), X(() => t.hoveredElementId,
|
|
2557
|
-
|
|
2558
|
-
(_(!0),
|
|
2566
|
+
Be
|
|
2567
|
+
), X(() => t.hoveredElementId, ze), (x, M) => (_(), O("g", ml, [
|
|
2568
|
+
P.value ? (_(), O("g", pl, [
|
|
2569
|
+
(_(!0), O(te, null, J(P.value, (h, z) => G(x.$slots, `node-header-${z}`, {
|
|
2559
2570
|
align: h.align,
|
|
2560
2571
|
x: h.x,
|
|
2561
|
-
y: -
|
|
2572
|
+
y: -K.value
|
|
2562
2573
|
}, () => [
|
|
2563
2574
|
(_(), q(v(Sa), {
|
|
2564
2575
|
key: `header_${h.x}`,
|
|
2565
2576
|
align: h.align,
|
|
2566
2577
|
x: h.x,
|
|
2567
|
-
y: -
|
|
2578
|
+
y: -K.value
|
|
2568
2579
|
}, {
|
|
2569
|
-
default:
|
|
2570
|
-
pe(
|
|
2580
|
+
default: U(() => [
|
|
2581
|
+
pe(re(h.label), 1)
|
|
2571
2582
|
]),
|
|
2572
2583
|
_: 2
|
|
2573
2584
|
}, 1032, ["align", "x", "y"]))
|
|
@@ -2575,10 +2586,10 @@ const ml = {
|
|
|
2575
2586
|
])) : Z("", !0),
|
|
2576
2587
|
j("g", {
|
|
2577
2588
|
class: "lume-alluvial-link-group",
|
|
2578
|
-
onMouseleave:
|
|
2589
|
+
onMouseleave: et
|
|
2579
2590
|
}, [
|
|
2580
|
-
v(l).gradient ? (_(),
|
|
2581
|
-
(_(!0),
|
|
2591
|
+
v(l).gradient ? (_(), O("defs", gl, [
|
|
2592
|
+
(_(!0), O(te, null, J(Y.value, (h, z) => (_(), O("linearGradient", {
|
|
2582
2593
|
id: `${v(a)}_${z}`,
|
|
2583
2594
|
key: z,
|
|
2584
2595
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -2595,7 +2606,7 @@ const ml = {
|
|
|
2595
2606
|
}, null, 8, _l)
|
|
2596
2607
|
], 8, hl))), 128))
|
|
2597
2608
|
])) : Z("", !0),
|
|
2598
|
-
(_(!0),
|
|
2609
|
+
(_(!0), O(te, null, J(u.value, (h) => (_(), O("path", {
|
|
2599
2610
|
key: `link-ghost_${h.id}`,
|
|
2600
2611
|
class: ae(["lume-alluvial-group__link", [
|
|
2601
2612
|
"lume-stroke--transparent",
|
|
@@ -2605,80 +2616,84 @@ const ml = {
|
|
|
2605
2616
|
"stroke-width": h.strokeWidth + v(ba),
|
|
2606
2617
|
"data-j-alluvial-ghost": "",
|
|
2607
2618
|
onClick: (z) => o("link-click", { link: h.link, event: z }),
|
|
2608
|
-
onMouseover: (z) =>
|
|
2619
|
+
onMouseover: (z) => Oe(h.link, z)
|
|
2609
2620
|
}, null, 40, kl))), 128)),
|
|
2610
|
-
(_(!0),
|
|
2621
|
+
(_(!0), O(te, null, J(u.value, (h) => (_(), O("path", {
|
|
2611
2622
|
key: `link_${h.id}`,
|
|
2612
2623
|
class: ae(["lume-alluvial-group__link", {
|
|
2613
2624
|
[`lume-stroke--${h.color}`]: !v(l).gradient && h.color,
|
|
2614
|
-
"lume-alluvial-group__link--faded":
|
|
2615
|
-
"lume-alluvial-group__link--focused":
|
|
2625
|
+
"lume-alluvial-group__link--faded": De(h.id),
|
|
2626
|
+
"lume-alluvial-group__link--focused": Se(h.id)
|
|
2616
2627
|
}]),
|
|
2617
2628
|
d: h.d,
|
|
2618
|
-
stroke:
|
|
2619
|
-
"stroke-dasharray":
|
|
2620
|
-
"stroke-dashoffset":
|
|
2629
|
+
stroke: ee(h.link),
|
|
2630
|
+
"stroke-dasharray": x.containerSize.width,
|
|
2631
|
+
"stroke-dashoffset": x.containerSize.width,
|
|
2621
2632
|
"stroke-width": h.strokeWidth,
|
|
2622
2633
|
"data-j-alluvial-path": "",
|
|
2623
2634
|
"data-id": h.id,
|
|
2624
2635
|
onClick: (z) => o("link-click", { link: h.link, event: z }),
|
|
2625
|
-
onMouseover: (z) =>
|
|
2636
|
+
onMouseover: (z) => Oe(h.link, z)
|
|
2626
2637
|
}, null, 42, bl))), 128))
|
|
2627
2638
|
], 32),
|
|
2628
|
-
(_(!0),
|
|
2639
|
+
(_(!0), O(te, null, J(i.value, (h, z) => (_(), O("g", {
|
|
2629
2640
|
key: `node-block_${z}`,
|
|
2630
2641
|
class: ae(["lume-alluvial-group__node", {
|
|
2631
2642
|
"lume-alluvial-group__node--expandable": v($)(
|
|
2632
2643
|
h.node.id
|
|
2633
2644
|
),
|
|
2634
|
-
"lume-alluvial-group__node--
|
|
2635
|
-
"lume-alluvial-group__node--
|
|
2645
|
+
"lume-alluvial-group__node--expandable-block": v($)(h.node.id) && E.value,
|
|
2646
|
+
"lume-alluvial-group__node--faded": me(h.node.id),
|
|
2647
|
+
"lume-alluvial-group__node--focused": xe(h.node.id)
|
|
2636
2648
|
}]),
|
|
2637
2649
|
"data-j-alluvial-group__node-block": ""
|
|
2638
2650
|
}, [
|
|
2639
2651
|
j("g", {
|
|
2640
2652
|
tabindex: v($)(h.node.id) ? "0" : null,
|
|
2641
|
-
onClick: (
|
|
2653
|
+
onClick: (W) => ue(h.node, W),
|
|
2642
2654
|
onKeydown: [
|
|
2643
|
-
xt(Ot((
|
|
2644
|
-
xt(Ot((
|
|
2655
|
+
xt(Ot((W) => ke(h.node, W), ["prevent"]), ["enter"]),
|
|
2656
|
+
xt(Ot((W) => ke(h.node, W), ["prevent"]), ["space"])
|
|
2645
2657
|
],
|
|
2646
|
-
onMouseenter: (
|
|
2647
|
-
onMouseleave: (
|
|
2648
|
-
onMouseover: (
|
|
2649
|
-
onMouseout:
|
|
2650
|
-
onFocus: (
|
|
2651
|
-
onBlur:
|
|
2658
|
+
onMouseenter: (W) => o("node-mouseenter", { node: h.node, event: W }),
|
|
2659
|
+
onMouseleave: (W) => o("node-mouseleave", { node: h.node, event: W }),
|
|
2660
|
+
onMouseover: (W) => d.value = h.node,
|
|
2661
|
+
onMouseout: M[0] || (M[0] = (W) => d.value = null),
|
|
2662
|
+
onFocus: (W) => c.value = h.node,
|
|
2663
|
+
onBlur: M[1] || (M[1] = (W) => c.value = null)
|
|
2652
2664
|
}, [
|
|
2653
|
-
|
|
2665
|
+
R(h) ? (_(!0), O(te, { key: 0 }, J(We(
|
|
2654
2666
|
h.node.id
|
|
2655
|
-
), (
|
|
2656
|
-
key:
|
|
2657
|
-
"data-j-alluvial-sub-nodes": ""
|
|
2658
|
-
|
|
2667
|
+
), (W) => (_(), O("rect", V(W, {
|
|
2668
|
+
key: W.key,
|
|
2669
|
+
"data-j-alluvial-sub-nodes": "",
|
|
2670
|
+
onClick: (se) => Re(h.node)
|
|
2671
|
+
}), null, 16, Al))), 128)) : (_(), O("rect", {
|
|
2659
2672
|
key: 1,
|
|
2660
2673
|
class: ae(["lume-alluvial-group__node-block", `lume-fill--${h.node.color || h.node.fallbackColor}`]),
|
|
2661
2674
|
x: h.x,
|
|
2662
2675
|
y: h.y,
|
|
2663
2676
|
height: h.height,
|
|
2664
|
-
width: h.width
|
|
2665
|
-
|
|
2666
|
-
|
|
2677
|
+
width: h.width,
|
|
2678
|
+
onClick: (W) => Re(h.node)
|
|
2679
|
+
}, null, 10, Tl)),
|
|
2680
|
+
v($)(h.node.id) ? (_(), O("rect", {
|
|
2667
2681
|
key: 2,
|
|
2668
2682
|
class: ae(["lume-alluvial-group__node-outline", `lume-stroke--${h.node.color || h.node.fallbackColor}`]),
|
|
2669
|
-
x: h.x - v(
|
|
2670
|
-
y: h.y - v(
|
|
2671
|
-
height: h.height + v(
|
|
2672
|
-
width: h.width + v(
|
|
2683
|
+
x: h.x - v(Ze),
|
|
2684
|
+
y: h.y - v(Ze),
|
|
2685
|
+
height: h.height + v(Ze) * 2,
|
|
2686
|
+
width: h.width + v(Ze) * 2,
|
|
2673
2687
|
rx: v(Aa),
|
|
2674
|
-
"data-j-alluvial-node-outline": ""
|
|
2675
|
-
|
|
2688
|
+
"data-j-alluvial-node-outline": "",
|
|
2689
|
+
onClick: (W) => Re(h.node)
|
|
2690
|
+
}, null, 10, $l)) : Z("", !0),
|
|
2676
2691
|
j("g", {
|
|
2677
2692
|
ref_for: !0,
|
|
2678
2693
|
ref_key: "nodeTextRefs",
|
|
2679
2694
|
ref: s,
|
|
2680
2695
|
class: ae(["lume-alluvial-group__node-text lume-typography--caption", {
|
|
2681
|
-
"lume-alluvial-group__node-text--left":
|
|
2696
|
+
"lume-alluvial-group__node-text--left": F(
|
|
2682
2697
|
h.node
|
|
2683
2698
|
)
|
|
2684
2699
|
}]),
|
|
@@ -2686,7 +2701,7 @@ const ml = {
|
|
|
2686
2701
|
"data-id": h.node.id,
|
|
2687
2702
|
width: v(l).nodeLabelMaxWidth
|
|
2688
2703
|
}, [
|
|
2689
|
-
|
|
2704
|
+
G(x.$slots, `node-text-${h.node.id}`, {
|
|
2690
2705
|
node: h.node,
|
|
2691
2706
|
value: I.value(
|
|
2692
2707
|
h.node.transitionValue || h.node.value,
|
|
@@ -2695,20 +2710,20 @@ const ml = {
|
|
|
2695
2710
|
}, () => [
|
|
2696
2711
|
ve(v(Oa), {
|
|
2697
2712
|
bottom: v(l).switchText,
|
|
2698
|
-
left:
|
|
2713
|
+
left: F(h.node),
|
|
2699
2714
|
"max-width": v(l).nodeLabelMaxWidth,
|
|
2700
|
-
"onLume__internal-NodeResize":
|
|
2715
|
+
"onLume__internal-NodeResize": Be
|
|
2701
2716
|
}, {
|
|
2702
|
-
default:
|
|
2703
|
-
pe(
|
|
2717
|
+
default: U(() => [
|
|
2718
|
+
pe(re(h.node.label), 1)
|
|
2704
2719
|
]),
|
|
2705
2720
|
_: 2
|
|
2706
2721
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2707
2722
|
ve(v(Ea), {
|
|
2708
2723
|
bottom: !v(l).switchText
|
|
2709
2724
|
}, {
|
|
2710
|
-
default:
|
|
2711
|
-
pe(
|
|
2725
|
+
default: U(() => [
|
|
2726
|
+
pe(re(I.value(
|
|
2712
2727
|
h.node.transitionValue || h.node.value,
|
|
2713
2728
|
h.node.value
|
|
2714
2729
|
)), 1)
|
|
@@ -2716,12 +2731,12 @@ const ml = {
|
|
|
2716
2731
|
_: 2
|
|
2717
2732
|
}, 1032, ["bottom"])
|
|
2718
2733
|
], !0)
|
|
2719
|
-
], 10,
|
|
2734
|
+
], 10, Il)
|
|
2720
2735
|
], 40, Ll)
|
|
2721
2736
|
], 2))), 128))
|
|
2722
2737
|
]));
|
|
2723
2738
|
}
|
|
2724
|
-
}),
|
|
2739
|
+
}), Ol = /* @__PURE__ */ oe(xl, [["__scopeId", "data-v-0f56c6f5"]]), wl = {
|
|
2725
2740
|
margins: {
|
|
2726
2741
|
top: 0,
|
|
2727
2742
|
right: 0,
|
|
@@ -2740,15 +2755,16 @@ const ml = {
|
|
|
2740
2755
|
nodePadding: 16,
|
|
2741
2756
|
nodeWidth: 16,
|
|
2742
2757
|
nodeAlign: Tn,
|
|
2758
|
+
nodeExpansionTrigger: "node",
|
|
2743
2759
|
valueFormat: (e) => String(e),
|
|
2744
2760
|
iterations: 6
|
|
2745
|
-
},
|
|
2761
|
+
}, _u = /* @__PURE__ */ Q({
|
|
2746
2762
|
__name: "lume-alluvial-diagram",
|
|
2747
2763
|
props: {
|
|
2748
2764
|
...To(pt)
|
|
2749
2765
|
},
|
|
2750
2766
|
setup(e, { emit: n }) {
|
|
2751
|
-
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), r =
|
|
2767
|
+
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), r = Vn(de()), { options: l } = le(t), { allOptions: i } = _e(l, wl);
|
|
2752
2768
|
function u(s) {
|
|
2753
2769
|
return {
|
|
2754
2770
|
...s,
|
|
@@ -2756,36 +2772,36 @@ const ml = {
|
|
|
2756
2772
|
// Alluvial chart never uses base scales
|
|
2757
2773
|
};
|
|
2758
2774
|
}
|
|
2759
|
-
return (s, d) => (_(), q(v(Me),
|
|
2775
|
+
return (s, d) => (_(), q(v(Me), V({ ...t, ...s.$attrs }, {
|
|
2760
2776
|
options: u(v(i)),
|
|
2761
2777
|
"data-j-alluvial-diagram": ""
|
|
2762
|
-
},
|
|
2763
|
-
groups:
|
|
2764
|
-
ve(v(
|
|
2765
|
-
|
|
2778
|
+
}, ie(v(o))), ge({
|
|
2779
|
+
groups: U((c) => [
|
|
2780
|
+
ve(v(Ol), V(c, { "hovered-element-id": s.hoveredElement }, ie(v(o))), ge({ _: 2 }, [
|
|
2781
|
+
J(v(r), (p, b) => ({
|
|
2766
2782
|
name: b,
|
|
2767
|
-
fn:
|
|
2768
|
-
|
|
2783
|
+
fn: U((k) => [
|
|
2784
|
+
G(s.$slots, b, Le(Ae(k || {})))
|
|
2769
2785
|
])
|
|
2770
2786
|
}))
|
|
2771
2787
|
]), 1040, ["hovered-element-id"])
|
|
2772
2788
|
]),
|
|
2773
2789
|
_: 2
|
|
2774
2790
|
}, [
|
|
2775
|
-
|
|
2791
|
+
J(v(a), (c, p) => ({
|
|
2776
2792
|
name: p,
|
|
2777
|
-
fn:
|
|
2778
|
-
|
|
2793
|
+
fn: U((b) => [
|
|
2794
|
+
G(s.$slots, p, Le(Ae(b || {})))
|
|
2779
2795
|
])
|
|
2780
2796
|
}))
|
|
2781
2797
|
]), 1040, ["options"]));
|
|
2782
2798
|
}
|
|
2783
2799
|
});
|
|
2784
2800
|
var pn = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(pn || {});
|
|
2785
|
-
const
|
|
2801
|
+
const ku = /* @__PURE__ */ Q({
|
|
2786
2802
|
__name: "lume-bar-chart",
|
|
2787
2803
|
props: {
|
|
2788
|
-
...
|
|
2804
|
+
...He(),
|
|
2789
2805
|
type: {
|
|
2790
2806
|
type: String,
|
|
2791
2807
|
default: null,
|
|
@@ -2794,11 +2810,11 @@ const _u = /* @__PURE__ */ J({
|
|
|
2794
2810
|
},
|
|
2795
2811
|
setup(e, { emit: n }) {
|
|
2796
2812
|
const t = ot(
|
|
2797
|
-
() => import("./
|
|
2813
|
+
() => import("./0W8x2hzC.js")
|
|
2798
2814
|
), o = ot(
|
|
2799
|
-
() => import("./
|
|
2815
|
+
() => import("./Cv9UKwcP.js")
|
|
2800
2816
|
), a = ot(
|
|
2801
|
-
() => import("./
|
|
2817
|
+
() => import("./DAIy0MBF.js")
|
|
2802
2818
|
), r = /* @__PURE__ */ new Map([
|
|
2803
2819
|
["single", t],
|
|
2804
2820
|
["grouped", o],
|
|
@@ -2811,7 +2827,7 @@ const _u = /* @__PURE__ */ J({
|
|
|
2811
2827
|
// Bar chart always starts on zero,
|
|
2812
2828
|
tooltipOptions: {
|
|
2813
2829
|
...(c == null ? void 0 : c.tooltipOptions) || {},
|
|
2814
|
-
position: l.orientation ===
|
|
2830
|
+
position: l.orientation === B.HORIZONTAL ? "right" : void 0
|
|
2815
2831
|
}
|
|
2816
2832
|
};
|
|
2817
2833
|
}
|
|
@@ -2821,35 +2837,35 @@ const _u = /* @__PURE__ */ J({
|
|
|
2821
2837
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2822
2838
|
return r.get(l.type);
|
|
2823
2839
|
});
|
|
2824
|
-
return (c, p) => (_(), q(bn(d.value),
|
|
2840
|
+
return (c, p) => (_(), q(bn(d.value), V({ ...l, ...c.$attrs }, {
|
|
2825
2841
|
options: s(c.options)
|
|
2826
|
-
},
|
|
2827
|
-
|
|
2842
|
+
}, ie(v(i))), ge({ _: 2 }, [
|
|
2843
|
+
J(v(u), (b, k) => ({
|
|
2828
2844
|
name: k,
|
|
2829
|
-
fn:
|
|
2830
|
-
|
|
2845
|
+
fn: U((L) => [
|
|
2846
|
+
G(c.$slots, k, Le(Ae(L || {})))
|
|
2831
2847
|
])
|
|
2832
2848
|
}))
|
|
2833
2849
|
]), 1040, ["options"]));
|
|
2834
2850
|
}
|
|
2835
2851
|
});
|
|
2836
|
-
function
|
|
2852
|
+
function Nl(e) {
|
|
2837
2853
|
return Object.values(Zn).includes(e) || e == null;
|
|
2838
2854
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return Object.values(
|
|
2855
|
+
function El(e) {
|
|
2856
|
+
return Object.values(B).includes(e);
|
|
2841
2857
|
}
|
|
2842
|
-
const
|
|
2858
|
+
const Dl = (e = !1) => ({
|
|
2843
2859
|
type: {
|
|
2844
2860
|
type: String,
|
|
2845
2861
|
default: null,
|
|
2846
|
-
validator:
|
|
2862
|
+
validator: Nl
|
|
2847
2863
|
},
|
|
2848
2864
|
...e ? {
|
|
2849
2865
|
orientation: {
|
|
2850
2866
|
type: String,
|
|
2851
|
-
default:
|
|
2852
|
-
validator:
|
|
2867
|
+
default: B.VERTICAL,
|
|
2868
|
+
validator: El
|
|
2853
2869
|
}
|
|
2854
2870
|
} : {}
|
|
2855
2871
|
});
|
|
@@ -2874,28 +2890,28 @@ function gn(e, n) {
|
|
|
2874
2890
|
});
|
|
2875
2891
|
return { multiBarData: t, groupedData: o };
|
|
2876
2892
|
}
|
|
2877
|
-
function
|
|
2893
|
+
function Bl(e, n) {
|
|
2878
2894
|
return e.value.length === 1 ? "single" : n.value;
|
|
2879
2895
|
}
|
|
2880
2896
|
function Hl(e, n, t) {
|
|
2881
2897
|
const o = m(
|
|
2882
|
-
() => t.value ===
|
|
2898
|
+
() => t.value === B.HORIZONTAL
|
|
2883
2899
|
);
|
|
2884
2900
|
function a(i) {
|
|
2885
|
-
i || vt(
|
|
2901
|
+
i || vt(Ye.BarScaleNull), Math.min(...i.domain()) > 0 && vt(Ye.BarScaleDomainAbove0);
|
|
2886
2902
|
}
|
|
2887
2903
|
const r = m(() => o.value ? (a(e.value), e.value) : e.value), l = m(() => o.value ? n.value : (a(n.value), n.value));
|
|
2888
2904
|
return { barXScale: r, barYScale: l };
|
|
2889
2905
|
}
|
|
2890
|
-
const
|
|
2906
|
+
const Ml = {
|
|
2891
2907
|
x: 0,
|
|
2892
2908
|
y: 0,
|
|
2893
2909
|
width: 0,
|
|
2894
2910
|
height: 0
|
|
2895
2911
|
};
|
|
2896
|
-
function
|
|
2912
|
+
function Sl(e, n, t, o, a, r) {
|
|
2897
2913
|
const l = m(
|
|
2898
|
-
() => o.value ===
|
|
2914
|
+
() => o.value === B.HORIZONTAL
|
|
2899
2915
|
);
|
|
2900
2916
|
function i(c, p) {
|
|
2901
2917
|
let b, k;
|
|
@@ -2908,30 +2924,30 @@ function Ml(e, n, t, o, a, r) {
|
|
|
2908
2924
|
return l.value ? t.value.bandwidth() : c < 0 ? t.value(c) - t.value(0) : t.value(0) - t.value(c);
|
|
2909
2925
|
}
|
|
2910
2926
|
function d(c, p, b) {
|
|
2911
|
-
if (!(n.value && t.value)) return
|
|
2912
|
-
const { value: L, color: $ } = c, g = $ ?? e.value[p].color ?? Ve, { x: f, y } = i(L, b), I = u(L),
|
|
2927
|
+
if (!(n.value && t.value)) return Ml;
|
|
2928
|
+
const { value: L, color: $ } = c, g = $ ?? e.value[p].color ?? Ve, { x: f, y } = i(L, b), I = u(L), E = s(L);
|
|
2913
2929
|
return {
|
|
2914
2930
|
classList: [`lume-fill--${g}`, ...r],
|
|
2915
2931
|
x: f,
|
|
2916
2932
|
y,
|
|
2917
2933
|
width: I,
|
|
2918
|
-
height:
|
|
2934
|
+
height: E,
|
|
2919
2935
|
isFaded: a.value !== -1 && a.value !== b,
|
|
2920
2936
|
isNegative: L < 0
|
|
2921
2937
|
};
|
|
2922
2938
|
}
|
|
2923
2939
|
return { barAttributeGenerator: d };
|
|
2924
2940
|
}
|
|
2925
|
-
const
|
|
2941
|
+
const Rl = {
|
|
2926
2942
|
x: 0,
|
|
2927
2943
|
y: 0,
|
|
2928
2944
|
width: 0,
|
|
2929
2945
|
height: 0
|
|
2930
2946
|
};
|
|
2931
|
-
function
|
|
2947
|
+
function Gl(e, n, t, o, a, r) {
|
|
2932
2948
|
const l = m(
|
|
2933
|
-
() => o.value ===
|
|
2934
|
-
), i = m(() =>
|
|
2949
|
+
() => o.value === B.HORIZONTAL
|
|
2950
|
+
), i = m(() => je().domain(e.value.map((k, L) => L)).range([0, n.value.bandwidth()]).padding(0)), u = m(() => je().domain(e.value.map((k, L) => L)).range([0, t.value.bandwidth()]).padding(0));
|
|
2935
2951
|
function s(k, L, $) {
|
|
2936
2952
|
if (l.value)
|
|
2937
2953
|
return k >= 0 ? n.value(0) : n.value(k);
|
|
@@ -2952,12 +2968,12 @@ function Rl(e, n, t, o, a, r) {
|
|
|
2952
2968
|
return l.value ? u.value.bandwidth() : k < 0 ? t.value(k) - t.value(0) : t.value(0) - t.value(k);
|
|
2953
2969
|
}
|
|
2954
2970
|
function b(k, L, $) {
|
|
2955
|
-
if (!(n.value && t.value)) return
|
|
2956
|
-
const { value: f, color: y } = k, I = y ?? e.value[L].color ?? Object.values(fe)[L],
|
|
2971
|
+
if (!(n.value && t.value)) return Rl;
|
|
2972
|
+
const { value: f, color: y } = k, I = y ?? e.value[L].color ?? Object.values(fe)[L], E = s(f, $, L), D = d(f, $, L), H = c(f), w = p(f);
|
|
2957
2973
|
return {
|
|
2958
2974
|
classList: [`lume-fill--${I}`, ...r],
|
|
2959
|
-
x:
|
|
2960
|
-
y:
|
|
2975
|
+
x: E,
|
|
2976
|
+
y: D,
|
|
2961
2977
|
width: H,
|
|
2962
2978
|
height: w,
|
|
2963
2979
|
isFaded: a.value !== -1 && a.value !== $,
|
|
@@ -2966,9 +2982,9 @@ function Rl(e, n, t, o, a, r) {
|
|
|
2966
2982
|
}
|
|
2967
2983
|
return { barAttributeGenerator: b };
|
|
2968
2984
|
}
|
|
2969
|
-
function
|
|
2985
|
+
function Fl(e, n, t) {
|
|
2970
2986
|
const o = m(
|
|
2971
|
-
() => n.value ===
|
|
2987
|
+
() => n.value === B.HORIZONTAL
|
|
2972
2988
|
), a = m(() => {
|
|
2973
2989
|
const u = e.value.map(
|
|
2974
2990
|
(s) => s.filter((d) => d.value < 0).reduce((d, c) => d + c.value, 0)
|
|
@@ -2984,9 +3000,9 @@ function Gl(e, n, t) {
|
|
|
2984
3000
|
return Math.max(...u);
|
|
2985
3001
|
});
|
|
2986
3002
|
function l(u, s, d) {
|
|
2987
|
-
return s.length ? o.value ?
|
|
3003
|
+
return s.length ? o.value ? Fe().domain([a.value, r.value]).range([0, d.width]) : Object.assign(
|
|
2988
3004
|
Rt(
|
|
2989
|
-
|
|
3005
|
+
je().domain(s.map((c, p) => p)).range([0, d.width]),
|
|
2990
3006
|
n.value,
|
|
2991
3007
|
t.value
|
|
2992
3008
|
),
|
|
@@ -2996,26 +3012,26 @@ function Gl(e, n, t) {
|
|
|
2996
3012
|
function i(u, s, d) {
|
|
2997
3013
|
return s.length ? o.value ? Object.assign(
|
|
2998
3014
|
Rt(
|
|
2999
|
-
|
|
3015
|
+
je().domain(s.map((c, p) => p)).range([0, d.height]),
|
|
3000
3016
|
n.value,
|
|
3001
3017
|
t.value
|
|
3002
3018
|
),
|
|
3003
3019
|
{ labels: s }
|
|
3004
|
-
) :
|
|
3020
|
+
) : Fe().domain([r.value, a.value]).range([0, d.height]) : null;
|
|
3005
3021
|
}
|
|
3006
3022
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
3007
3023
|
}
|
|
3008
|
-
function
|
|
3024
|
+
function jl(e, n, t, o, a, r) {
|
|
3009
3025
|
const l = m(
|
|
3010
|
-
() => o.value ===
|
|
3026
|
+
() => o.value === B.HORIZONTAL
|
|
3011
3027
|
), i = m(
|
|
3012
3028
|
() => l.value ? t.value.domain() : n.value.domain()
|
|
3013
3029
|
), u = m(
|
|
3014
3030
|
() => e.value.map((g) => g.values.map((f) => f == null ? void 0 : f.value))
|
|
3015
3031
|
);
|
|
3016
3032
|
function s(g, f, y) {
|
|
3017
|
-
let I,
|
|
3018
|
-
return l.value ? (I = n.value(g >= 0 ? 0 + y : g + y),
|
|
3033
|
+
let I, E;
|
|
3034
|
+
return l.value ? (I = n.value(g >= 0 ? 0 + y : g + y), E = t.value(i.value[f])) : (I = n.value(i.value[f]), E = t.value(g >= 0 ? g + y : 0 + y)), { x: I, y: E };
|
|
3019
3035
|
}
|
|
3020
3036
|
function d(g) {
|
|
3021
3037
|
return l.value ? n.value(g) - n.value(0) : n.value.bandwidth();
|
|
@@ -3030,41 +3046,41 @@ function Fl(e, n, t, o, a, r) {
|
|
|
3030
3046
|
return l.value ? t.value.bandwidth() : t.value(g) - t.value(0);
|
|
3031
3047
|
}
|
|
3032
3048
|
function k(g, f) {
|
|
3033
|
-
return g ? u.value.reduce((y, I,
|
|
3049
|
+
return g ? u.value.reduce((y, I, E) => (E < g && I[f] >= 0 && (y += I[f]), y), 0) : 0;
|
|
3034
3050
|
}
|
|
3035
3051
|
function L(g, f) {
|
|
3036
|
-
return g ? u.value.reduce((y, I,
|
|
3052
|
+
return g ? u.value.reduce((y, I, E) => (E < g && I[f] < 0 && (y += I[f]), y), 0) : 0;
|
|
3037
3053
|
}
|
|
3038
3054
|
function $(g, f, y) {
|
|
3039
|
-
const { value: I, color:
|
|
3055
|
+
const { value: I, color: E } = g, D = I >= 0 ? d(I) : c(I), H = I >= 0 ? p(I) : b(I), w = I >= 0 ? k(f, y) : L(f, y), { x: P, y: K } = s(I, y, w);
|
|
3040
3056
|
return {
|
|
3041
|
-
classList: [`lume-fill--${
|
|
3042
|
-
width:
|
|
3057
|
+
classList: [`lume-fill--${E ?? e.value[f].color ?? Object.values(fe)[f]}`, ...r],
|
|
3058
|
+
width: D,
|
|
3043
3059
|
height: H,
|
|
3044
3060
|
x: P,
|
|
3045
|
-
y:
|
|
3061
|
+
y: K,
|
|
3046
3062
|
isFaded: a.value !== -1 && a.value !== y,
|
|
3047
3063
|
isNegative: I < 0
|
|
3048
3064
|
};
|
|
3049
3065
|
}
|
|
3050
3066
|
return { barAttributeGenerator: $ };
|
|
3051
3067
|
}
|
|
3052
|
-
const
|
|
3068
|
+
const Cl = {
|
|
3053
3069
|
class: "lume-bar-group",
|
|
3054
3070
|
"data-j-bars-group": ""
|
|
3055
3071
|
}, Pl = ["onMouseenter"], Vl = {
|
|
3056
|
-
single:
|
|
3057
|
-
grouped:
|
|
3058
|
-
stacked:
|
|
3059
|
-
}, It = /* @__PURE__ */
|
|
3072
|
+
single: Sl,
|
|
3073
|
+
grouped: Gl,
|
|
3074
|
+
stacked: jl
|
|
3075
|
+
}, It = /* @__PURE__ */ Q({
|
|
3060
3076
|
__name: "lume-bar-group",
|
|
3061
3077
|
props: {
|
|
3062
|
-
...
|
|
3078
|
+
...qe(),
|
|
3063
3079
|
classList: {
|
|
3064
3080
|
type: [String, Array],
|
|
3065
3081
|
default: () => []
|
|
3066
3082
|
},
|
|
3067
|
-
...
|
|
3083
|
+
...Dl(!0),
|
|
3068
3084
|
transition: {
|
|
3069
3085
|
type: Boolean,
|
|
3070
3086
|
default: !0
|
|
@@ -3083,9 +3099,9 @@ const jl = {
|
|
|
3083
3099
|
classList: c,
|
|
3084
3100
|
labels: p
|
|
3085
3101
|
} = le(t);
|
|
3086
|
-
|
|
3102
|
+
Ke("chartID");
|
|
3087
3103
|
const { emitInternalEvent: b } = Ie(), { groupedData: k } = gn(a, p), { barXScale: L, barYScale: $ } = Hl(s, d, l), g = m(() => typeof c.value == "string" ? [c.value] : c.value), f = m(() => {
|
|
3088
|
-
const
|
|
3104
|
+
const E = Bl(a, u), { barAttributeGenerator: D } = Vl[E](
|
|
3089
3105
|
a,
|
|
3090
3106
|
L,
|
|
3091
3107
|
$,
|
|
@@ -3093,171 +3109,171 @@ const jl = {
|
|
|
3093
3109
|
r,
|
|
3094
3110
|
g.value
|
|
3095
3111
|
);
|
|
3096
|
-
return
|
|
3112
|
+
return D;
|
|
3097
3113
|
}), y = m(() => {
|
|
3098
3114
|
if (i.value)
|
|
3099
|
-
return l.value ===
|
|
3115
|
+
return l.value === B.HORIZONTAL ? "width" : "height";
|
|
3100
3116
|
});
|
|
3101
|
-
async function I(
|
|
3102
|
-
o("lume__internal--hover",
|
|
3117
|
+
async function I(E) {
|
|
3118
|
+
o("lume__internal--hover", E), b("lume__internal--hover", E);
|
|
3103
3119
|
}
|
|
3104
|
-
return (
|
|
3105
|
-
(_(!0),
|
|
3120
|
+
return (E, D) => (_(), O("g", Cl, [
|
|
3121
|
+
(_(!0), O(te, null, J(v(k), (H, w) => (_(), O("g", {
|
|
3106
3122
|
key: w,
|
|
3107
3123
|
onMouseenter: (P) => I(w)
|
|
3108
3124
|
}, [
|
|
3109
|
-
(_(!0),
|
|
3110
|
-
key: `bar-${
|
|
3125
|
+
(_(!0), O(te, null, J(H, (P, K) => (_(), q(v(ht), V(f.value(P, K, w, H), {
|
|
3126
|
+
key: `bar-${K}`,
|
|
3111
3127
|
transition: y.value,
|
|
3112
3128
|
"data-j-lume-bar": "",
|
|
3113
3129
|
onClick: (Y) => o("bar-click", {
|
|
3114
3130
|
index: w,
|
|
3115
|
-
datasetIndex:
|
|
3131
|
+
datasetIndex: K,
|
|
3116
3132
|
event: Y
|
|
3117
3133
|
})
|
|
3118
3134
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
3119
3135
|
], 40, Pl))), 128))
|
|
3120
3136
|
]));
|
|
3121
3137
|
}
|
|
3122
|
-
}),
|
|
3123
|
-
[
|
|
3138
|
+
}), zl = {
|
|
3139
|
+
[B.VERTICAL]: {
|
|
3124
3140
|
withTooltip: !0,
|
|
3125
3141
|
xAxisOptions: {},
|
|
3126
3142
|
yAxisOptions: { gridLines: !0 },
|
|
3127
3143
|
margins: Ne.VERTICAL
|
|
3128
3144
|
},
|
|
3129
|
-
[
|
|
3145
|
+
[B.HORIZONTAL]: {
|
|
3130
3146
|
withTooltip: !0,
|
|
3131
3147
|
xAxisOptions: { gridLines: !0 },
|
|
3132
3148
|
yAxisOptions: { gridLines: !1 },
|
|
3133
3149
|
margins: Ne.HORIZONTAL
|
|
3134
3150
|
}
|
|
3135
|
-
},
|
|
3151
|
+
}, bu = /* @__PURE__ */ Q({
|
|
3136
3152
|
__name: "lume-single-bar-chart",
|
|
3137
3153
|
props: {
|
|
3138
|
-
...
|
|
3154
|
+
...He(pt)
|
|
3139
3155
|
},
|
|
3140
3156
|
setup(e, { emit: n }) {
|
|
3141
3157
|
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), { orientation: r, options: l } = le(t), i = m(
|
|
3142
|
-
() =>
|
|
3158
|
+
() => zl[r.value || B.VERTICAL]
|
|
3143
3159
|
// needs to be computed so that default options are reactive
|
|
3144
3160
|
), { allOptions: u } = _e(l, i);
|
|
3145
|
-
return (s, d) => (_(), q(v(Me),
|
|
3161
|
+
return (s, d) => (_(), q(v(Me), V({ ...t, ...s.$attrs }, {
|
|
3146
3162
|
"chart-type": "single-bar",
|
|
3147
3163
|
options: v(u),
|
|
3148
3164
|
"data-j-single-bar-chart": ""
|
|
3149
|
-
},
|
|
3150
|
-
groups:
|
|
3151
|
-
ve(v(It),
|
|
3165
|
+
}, ie(v(o))), ge({
|
|
3166
|
+
groups: U((c) => [
|
|
3167
|
+
ve(v(It), V(c, { orientation: v(r) }, ie(v(o))), null, 16, ["orientation"])
|
|
3152
3168
|
]),
|
|
3153
3169
|
_: 2
|
|
3154
3170
|
}, [
|
|
3155
|
-
|
|
3171
|
+
J(v(a), (c, p) => ({
|
|
3156
3172
|
name: p,
|
|
3157
|
-
fn:
|
|
3158
|
-
|
|
3173
|
+
fn: U((b) => [
|
|
3174
|
+
G(s.$slots, p, Le(Ae(b || {})))
|
|
3159
3175
|
])
|
|
3160
3176
|
}))
|
|
3161
3177
|
]), 1040, ["options"]));
|
|
3162
3178
|
}
|
|
3163
|
-
}),
|
|
3164
|
-
[
|
|
3179
|
+
}), Wl = {
|
|
3180
|
+
[B.VERTICAL]: {
|
|
3165
3181
|
withTooltip: !0,
|
|
3166
3182
|
xAxisOptions: {},
|
|
3167
3183
|
yAxisOptions: { gridLines: !0 },
|
|
3168
3184
|
margins: Ne.VERTICAL
|
|
3169
3185
|
},
|
|
3170
|
-
[
|
|
3186
|
+
[B.HORIZONTAL]: {
|
|
3171
3187
|
withTooltip: !0,
|
|
3172
3188
|
xAxisOptions: { gridLines: !0 },
|
|
3173
3189
|
yAxisOptions: { gridLines: !1 },
|
|
3174
3190
|
margins: Ne.HORIZONTAL,
|
|
3175
3191
|
tooltipOptions: { position: "right" }
|
|
3176
3192
|
}
|
|
3177
|
-
},
|
|
3193
|
+
}, Lu = /* @__PURE__ */ Q({
|
|
3178
3194
|
__name: "lume-grouped-bar-chart",
|
|
3179
3195
|
props: {
|
|
3180
|
-
...
|
|
3196
|
+
...He()
|
|
3181
3197
|
},
|
|
3182
3198
|
setup(e, { emit: n }) {
|
|
3183
3199
|
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), { orientation: r, options: l } = le(t), i = m(
|
|
3184
|
-
() =>
|
|
3200
|
+
() => Wl[r.value || B.VERTICAL]
|
|
3185
3201
|
// needs to be computed so that default options are reactive
|
|
3186
3202
|
), { allOptions: u } = _e(
|
|
3187
3203
|
l,
|
|
3188
3204
|
i
|
|
3189
3205
|
);
|
|
3190
|
-
return (s, d) => (_(), q(v(Me),
|
|
3206
|
+
return (s, d) => (_(), q(v(Me), V({ ...t, ...s.$attrs }, {
|
|
3191
3207
|
"chart-type": "grouped-bar",
|
|
3192
3208
|
options: v(u),
|
|
3193
3209
|
"data-j-grouped-bar-chart": ""
|
|
3194
|
-
},
|
|
3195
|
-
groups:
|
|
3196
|
-
ve(v(It),
|
|
3210
|
+
}, ie(v(o))), ge({
|
|
3211
|
+
groups: U((c) => [
|
|
3212
|
+
ve(v(It), V(c, { type: "grouped" }, ie(v(o))), null, 16)
|
|
3197
3213
|
]),
|
|
3198
3214
|
_: 2
|
|
3199
3215
|
}, [
|
|
3200
|
-
|
|
3216
|
+
J(v(a), (c, p) => ({
|
|
3201
3217
|
name: p,
|
|
3202
|
-
fn:
|
|
3203
|
-
|
|
3218
|
+
fn: U((b) => [
|
|
3219
|
+
G(s.$slots, p, Le(Ae(b || {})))
|
|
3204
3220
|
])
|
|
3205
3221
|
}))
|
|
3206
3222
|
]), 1040, ["options"]));
|
|
3207
3223
|
}
|
|
3208
|
-
}),
|
|
3209
|
-
[
|
|
3224
|
+
}), Ul = {
|
|
3225
|
+
[B.VERTICAL]: {
|
|
3210
3226
|
withTooltip: !0,
|
|
3211
3227
|
xAxisOptions: {},
|
|
3212
3228
|
yAxisOptions: { gridLines: !0 },
|
|
3213
3229
|
margins: Ne.VERTICAL,
|
|
3214
3230
|
tooltipOptions: { inverse: !0 }
|
|
3215
3231
|
},
|
|
3216
|
-
[
|
|
3232
|
+
[B.HORIZONTAL]: {
|
|
3217
3233
|
withTooltip: !0,
|
|
3218
3234
|
xAxisOptions: { gridLines: !0 },
|
|
3219
3235
|
yAxisOptions: { gridLines: !1 },
|
|
3220
3236
|
margins: Ne.HORIZONTAL,
|
|
3221
3237
|
tooltipOptions: { position: "right" }
|
|
3222
3238
|
}
|
|
3223
|
-
},
|
|
3239
|
+
}, Au = /* @__PURE__ */ Q({
|
|
3224
3240
|
__name: "lume-stacked-bar-chart",
|
|
3225
3241
|
props: {
|
|
3226
|
-
...
|
|
3242
|
+
...He()
|
|
3227
3243
|
},
|
|
3228
3244
|
setup(e, { emit: n }) {
|
|
3229
3245
|
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), { data: r, orientation: l, options: i, labels: u } = le(t), s = m(
|
|
3230
|
-
() =>
|
|
3246
|
+
() => Ul[l.value || B.VERTICAL]
|
|
3231
3247
|
// needs to be computed so that default options are reactive
|
|
3232
3248
|
), { allOptions: d } = _e(
|
|
3233
3249
|
i,
|
|
3234
3250
|
s
|
|
3235
|
-
), { internalData: c } = Lt(r), { groupedData: p } = gn(c, u), { stackedXScaleGenerator: b, stackedYScaleGenerator: k } =
|
|
3251
|
+
), { internalData: c } = Lt(r), { groupedData: p } = gn(c, u), { stackedXScaleGenerator: b, stackedYScaleGenerator: k } = Fl(
|
|
3236
3252
|
p,
|
|
3237
3253
|
l,
|
|
3238
3254
|
i
|
|
3239
3255
|
), L = m(() => t.xScale || b), $ = m(() => t.yScale || k);
|
|
3240
|
-
return (g, f) => (_(), q(v(Me),
|
|
3256
|
+
return (g, f) => (_(), q(v(Me), V({ ...t, ...g.$attrs }, {
|
|
3241
3257
|
"chart-type": "stacked-bar",
|
|
3242
3258
|
options: v(d),
|
|
3243
3259
|
"x-scale": L.value,
|
|
3244
3260
|
"y-scale": $.value,
|
|
3245
3261
|
"data-j-stacked-bar-chart": ""
|
|
3246
|
-
},
|
|
3247
|
-
groups:
|
|
3248
|
-
ve(v(It),
|
|
3262
|
+
}, ie(v(o))), ge({
|
|
3263
|
+
groups: U((y) => [
|
|
3264
|
+
ve(v(It), V(y, { type: "stacked" }, ie(v(o))), null, 16)
|
|
3249
3265
|
]),
|
|
3250
3266
|
_: 2
|
|
3251
3267
|
}, [
|
|
3252
|
-
|
|
3268
|
+
J(v(a), (y, I) => ({
|
|
3253
3269
|
name: I,
|
|
3254
|
-
fn:
|
|
3255
|
-
|
|
3270
|
+
fn: U((E) => [
|
|
3271
|
+
G(g.$slots, I, Le(Ae(E || {})))
|
|
3256
3272
|
])
|
|
3257
3273
|
}))
|
|
3258
3274
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
3259
3275
|
}
|
|
3260
|
-
}),
|
|
3276
|
+
}), Zl = ["d", "stroke-width"], Xl = 2, Yl = /* @__PURE__ */ Q({
|
|
3261
3277
|
__name: "lume-line",
|
|
3262
3278
|
props: {
|
|
3263
3279
|
pathDefinition: {
|
|
@@ -3266,7 +3282,7 @@ const jl = {
|
|
|
3266
3282
|
},
|
|
3267
3283
|
width: {
|
|
3268
3284
|
type: Number,
|
|
3269
|
-
default:
|
|
3285
|
+
default: Xl
|
|
3270
3286
|
},
|
|
3271
3287
|
color: {
|
|
3272
3288
|
type: String,
|
|
@@ -3291,8 +3307,8 @@ const jl = {
|
|
|
3291
3307
|
},
|
|
3292
3308
|
emits: ["click"],
|
|
3293
3309
|
setup(e, { emit: n }) {
|
|
3294
|
-
const t = n, o =
|
|
3295
|
-
return $e(() =>
|
|
3310
|
+
const t = n, o = S(null);
|
|
3311
|
+
return $e(() => Qe(o.value)), (a, r) => (_(), O("path", {
|
|
3296
3312
|
ref_key: "root",
|
|
3297
3313
|
ref: o,
|
|
3298
3314
|
class: ae(["lume-line", {
|
|
@@ -3308,22 +3324,22 @@ const jl = {
|
|
|
3308
3324
|
}),
|
|
3309
3325
|
"data-j-line": "",
|
|
3310
3326
|
onClick: r[0] || (r[0] = (l) => t("click", l))
|
|
3311
|
-
}, null, 14,
|
|
3327
|
+
}, null, 14, Zl));
|
|
3312
3328
|
}
|
|
3313
|
-
}),
|
|
3329
|
+
}), Kl = /* @__PURE__ */ oe(Yl, [["__scopeId", "data-v-59449838"]]), Jl = ["cx", "cy", "r", "stroke-width"], Ql = 4, ql = 3, eu = /* @__PURE__ */ Q({
|
|
3314
3330
|
__name: "lume-point",
|
|
3315
3331
|
props: {
|
|
3316
3332
|
x: {},
|
|
3317
3333
|
y: {},
|
|
3318
3334
|
color: { default: fe.Skyblue },
|
|
3319
|
-
radius: { default:
|
|
3335
|
+
radius: { default: Ql },
|
|
3320
3336
|
active: { type: Boolean, default: !1 },
|
|
3321
3337
|
visible: { type: Boolean, default: !1 }
|
|
3322
3338
|
},
|
|
3323
3339
|
emits: ["click"],
|
|
3324
3340
|
setup(e, { emit: n }) {
|
|
3325
|
-
const t = e, o = n, a =
|
|
3326
|
-
return $e(() =>
|
|
3341
|
+
const t = e, o = n, a = S(null), r = m(() => t.radius / 2), l = m(() => t.active ? t.radius : t.visible ? ql : 0);
|
|
3342
|
+
return $e(() => Qe(a.value)), (i, u) => (_(), O("circle", {
|
|
3327
3343
|
ref_key: "root",
|
|
3328
3344
|
ref: a,
|
|
3329
3345
|
class: ae(["lume-point", {
|
|
@@ -3337,9 +3353,9 @@ const jl = {
|
|
|
3337
3353
|
"stroke-width": r.value,
|
|
3338
3354
|
"data-j-point": "",
|
|
3339
3355
|
onClick: u[0] || (u[0] = (s) => o("click", s))
|
|
3340
|
-
}, null, 10,
|
|
3356
|
+
}, null, 10, Jl));
|
|
3341
3357
|
}
|
|
3342
|
-
}),
|
|
3358
|
+
}), tu = /* @__PURE__ */ oe(eu, [["__scopeId", "data-v-080270c0"]]);
|
|
3343
3359
|
function hn(e, n) {
|
|
3344
3360
|
function t(l) {
|
|
3345
3361
|
let i = null;
|
|
@@ -3391,30 +3407,30 @@ function hn(e, n) {
|
|
|
3391
3407
|
})
|
|
3392
3408
|
) };
|
|
3393
3409
|
}
|
|
3394
|
-
function
|
|
3410
|
+
function nu(e, n) {
|
|
3395
3411
|
const t = e.bandwidth() / 2;
|
|
3396
3412
|
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
3397
3413
|
}
|
|
3398
|
-
function
|
|
3414
|
+
function ou(e, n) {
|
|
3399
3415
|
return (t, o) => e(n + (o - 1));
|
|
3400
3416
|
}
|
|
3401
|
-
function
|
|
3417
|
+
function au(e, n, t, o) {
|
|
3402
3418
|
const a = On().x(
|
|
3403
|
-
he(t) ?
|
|
3419
|
+
he(t) ? nu(t, e) : ou(t, e)
|
|
3404
3420
|
).y((r) => o(r));
|
|
3405
3421
|
return n.every((r) => r == null) ? null : a(n);
|
|
3406
3422
|
}
|
|
3407
|
-
const
|
|
3423
|
+
const lu = {
|
|
3408
3424
|
class: "lume-line-group",
|
|
3409
3425
|
"data-j-lume-line-group": ""
|
|
3410
|
-
},
|
|
3426
|
+
}, uu = { class: "lume-line-group__lines" }, ru = {
|
|
3411
3427
|
key: 0,
|
|
3412
3428
|
class: "lume-line-group__points",
|
|
3413
3429
|
"data-j-lume-line-group__points": ""
|
|
3414
|
-
},
|
|
3430
|
+
}, iu = 1, su = /* @__PURE__ */ Q({
|
|
3415
3431
|
__name: "lume-line-group",
|
|
3416
3432
|
props: {
|
|
3417
|
-
...
|
|
3433
|
+
...qe(),
|
|
3418
3434
|
withPoints: {
|
|
3419
3435
|
type: [Boolean, String],
|
|
3420
3436
|
default: !0
|
|
@@ -3426,7 +3442,7 @@ const au = {
|
|
|
3426
3442
|
},
|
|
3427
3443
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3428
3444
|
setup(e, { emit: n }) {
|
|
3429
|
-
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: u } = le(t), s =
|
|
3445
|
+
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: u } = le(t), s = Ke(
|
|
3430
3446
|
"tooltipAnchorAttributes",
|
|
3431
3447
|
null
|
|
3432
3448
|
), { updateTooltipAnchorAttributes: d } = sn(
|
|
@@ -3455,7 +3471,7 @@ const au = {
|
|
|
3455
3471
|
// Move to X index, Vertical line to the highest point
|
|
3456
3472
|
};
|
|
3457
3473
|
}), b = m(
|
|
3458
|
-
() => l.value &&
|
|
3474
|
+
() => l.value && iu / (jn(l.value) - 1)
|
|
3459
3475
|
// Subtracting the first line (read below)
|
|
3460
3476
|
), k = m(
|
|
3461
3477
|
() => {
|
|
@@ -3475,61 +3491,61 @@ const au = {
|
|
|
3475
3491
|
}
|
|
3476
3492
|
function I(w, P) {
|
|
3477
3493
|
var Y, ne;
|
|
3478
|
-
const
|
|
3494
|
+
const K = w === 0 ? [] : [
|
|
3479
3495
|
(Y = y(P)[w - 1]) == null ? void 0 : Y.value,
|
|
3480
3496
|
(ne = y(P)[w]) == null ? void 0 : ne.value
|
|
3481
3497
|
];
|
|
3482
|
-
return
|
|
3498
|
+
return au(
|
|
3483
3499
|
w,
|
|
3484
|
-
|
|
3500
|
+
K,
|
|
3485
3501
|
l.value,
|
|
3486
3502
|
i.value
|
|
3487
3503
|
) || "";
|
|
3488
3504
|
}
|
|
3489
|
-
function
|
|
3505
|
+
function E(w) {
|
|
3490
3506
|
return {
|
|
3491
3507
|
animationDelay: w < 2 ? 0 : (w - 1) * b.value,
|
|
3492
3508
|
animationDuration: b.value
|
|
3493
3509
|
};
|
|
3494
3510
|
}
|
|
3495
|
-
function
|
|
3511
|
+
function D(w, P) {
|
|
3496
3512
|
var Y;
|
|
3497
|
-
const
|
|
3513
|
+
const K = (Y = y(P)[w]) == null ? void 0 : Y.value;
|
|
3498
3514
|
return {
|
|
3499
3515
|
x: he(l.value) ? t.xScale($.value[w]) + L.value : t.xScale(w),
|
|
3500
|
-
y:
|
|
3516
|
+
y: K === null ? i.value(i.value.domain()[1]) : i.value(K)
|
|
3501
3517
|
};
|
|
3502
3518
|
}
|
|
3503
3519
|
function H(w) {
|
|
3504
3520
|
return t.hoveredIndex === w;
|
|
3505
3521
|
}
|
|
3506
|
-
return (w, P) => (_(),
|
|
3507
|
-
j("path",
|
|
3522
|
+
return (w, P) => (_(), O("g", lu, [
|
|
3523
|
+
j("path", V(p.value, {
|
|
3508
3524
|
class: "lume-line-group__overlay-line",
|
|
3509
3525
|
"data-j-lume-line-group__overlay-line": ""
|
|
3510
3526
|
}), null, 16),
|
|
3511
|
-
(_(!0),
|
|
3512
|
-
key:
|
|
3527
|
+
(_(!0), O(te, null, J(c.value, (K, Y) => (_(), O("g", {
|
|
3528
|
+
key: K.label,
|
|
3513
3529
|
class: "lume-line-group__group"
|
|
3514
3530
|
}, [
|
|
3515
|
-
j("g",
|
|
3516
|
-
(_(!0),
|
|
3531
|
+
j("g", uu, [
|
|
3532
|
+
(_(!0), O(te, null, J(K.values, (ne, ee) => (_(), q(v(Kl), V(E(ee), {
|
|
3517
3533
|
key: `line-${ee}`,
|
|
3518
|
-
color:
|
|
3519
|
-
dashed:
|
|
3534
|
+
color: K.color,
|
|
3535
|
+
dashed: K.isDashed(ee),
|
|
3520
3536
|
"path-definition": I(ee, Y),
|
|
3521
3537
|
transition: e.transition,
|
|
3522
3538
|
width: v(r).lineWidth,
|
|
3523
3539
|
onClick: (me) => o("line-click", { index: ee, datasetIndex: Y, event: me })
|
|
3524
3540
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3525
3541
|
]),
|
|
3526
|
-
g.value ? (_(),
|
|
3527
|
-
(_(!0),
|
|
3542
|
+
g.value ? (_(), O("g", ru, [
|
|
3543
|
+
(_(!0), O(te, null, J(K.values, (ne, ee) => (_(), O(te, {
|
|
3528
3544
|
key: `point-${ee}`
|
|
3529
3545
|
}, [
|
|
3530
|
-
ne.isNull ? Z("", !0) : (_(), q(v(
|
|
3546
|
+
ne.isNull ? Z("", !0) : (_(), q(v(tu), V({ key: 0 }, D(ee, Y), {
|
|
3531
3547
|
active: H(ee),
|
|
3532
|
-
color:
|
|
3548
|
+
color: K.color,
|
|
3533
3549
|
index: ee,
|
|
3534
3550
|
radius: k.value,
|
|
3535
3551
|
visible: f.value,
|
|
@@ -3540,39 +3556,39 @@ const au = {
|
|
|
3540
3556
|
]))), 128))
|
|
3541
3557
|
]));
|
|
3542
3558
|
}
|
|
3543
|
-
}), yn = /* @__PURE__ */ oe(
|
|
3559
|
+
}), yn = /* @__PURE__ */ oe(su, [["__scopeId", "data-v-898c2e7a"]]), cu = {
|
|
3544
3560
|
margins: Ne.VERTICAL,
|
|
3545
3561
|
startOnZero: !0,
|
|
3546
3562
|
withTooltip: !0,
|
|
3547
3563
|
xAxisOptions: {},
|
|
3548
3564
|
yAxisOptions: { gridLines: !0 }
|
|
3549
|
-
},
|
|
3565
|
+
}, Tu = /* @__PURE__ */ Q({
|
|
3550
3566
|
__name: "lume-line-chart",
|
|
3551
3567
|
props: {
|
|
3552
|
-
...
|
|
3568
|
+
...He(null, !1)
|
|
3553
3569
|
},
|
|
3554
3570
|
setup(e, { emit: n }) {
|
|
3555
|
-
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), { options: r } = le(t), { allOptions: l } = _e(r,
|
|
3556
|
-
return (i, u) => (_(), q(v(Me),
|
|
3571
|
+
const t = e, { componentEventPropagator: o } = Ie(), a = Ee(de()), { options: r } = le(t), { allOptions: l } = _e(r, cu);
|
|
3572
|
+
return (i, u) => (_(), q(v(Me), V({ ...t, ...i.$attrs }, {
|
|
3557
3573
|
"chart-type": "line",
|
|
3558
3574
|
options: v(l),
|
|
3559
3575
|
"data-j-lume-line-chart": ""
|
|
3560
|
-
},
|
|
3561
|
-
groups:
|
|
3562
|
-
ve(v(yn),
|
|
3576
|
+
}, ie(v(o))), ge({
|
|
3577
|
+
groups: U((s) => [
|
|
3578
|
+
ve(v(yn), V(s, ie(v(o))), null, 16)
|
|
3563
3579
|
]),
|
|
3564
3580
|
_: 2
|
|
3565
3581
|
}, [
|
|
3566
|
-
|
|
3582
|
+
J(v(a), (s, d) => ({
|
|
3567
3583
|
name: d,
|
|
3568
|
-
fn:
|
|
3569
|
-
|
|
3584
|
+
fn: U((c) => [
|
|
3585
|
+
G(i.$slots, d, Le(Ae(c || {})))
|
|
3570
3586
|
])
|
|
3571
3587
|
}))
|
|
3572
3588
|
]), 1040, ["options"]));
|
|
3573
3589
|
}
|
|
3574
3590
|
});
|
|
3575
|
-
function
|
|
3591
|
+
function du(e) {
|
|
3576
3592
|
return { areaPathDefinition: m(
|
|
3577
3593
|
() => function(t, o) {
|
|
3578
3594
|
if (!t || !o || he(t) || he(o))
|
|
@@ -3582,7 +3598,7 @@ function cu(e) {
|
|
|
3582
3598
|
}
|
|
3583
3599
|
) };
|
|
3584
3600
|
}
|
|
3585
|
-
const
|
|
3601
|
+
const vu = {
|
|
3586
3602
|
margins: {
|
|
3587
3603
|
top: 0,
|
|
3588
3604
|
right: 0,
|
|
@@ -3596,14 +3612,14 @@ const du = {
|
|
|
3596
3612
|
tooltipOptions: {
|
|
3597
3613
|
showTitle: !1
|
|
3598
3614
|
}
|
|
3599
|
-
},
|
|
3615
|
+
}, fu = ["d"], mu = /* @__PURE__ */ Q({
|
|
3600
3616
|
__name: "lume-sparkline-chart",
|
|
3601
3617
|
props: {
|
|
3602
3618
|
...bt(null),
|
|
3603
|
-
...
|
|
3619
|
+
...Ce()
|
|
3604
3620
|
},
|
|
3605
3621
|
setup(e, { expose: n, emit: t }) {
|
|
3606
|
-
const o = e, { componentEventPropagator: a } = Ie(), r = Ee(de()), { data: l, options: i } = le(o), { internalData: u } = Lt(l), { allOptions: s } = _e(i,
|
|
3622
|
+
const o = e, { componentEventPropagator: a } = Ie(), r = Ee(de()), { data: l, options: i } = le(o), { internalData: u } = Lt(l), { allOptions: s } = _e(i, vu), { computedLineData: d } = hn(u), { areaPathDefinition: c } = du(d), p = m(() => {
|
|
3607
3623
|
var $, g;
|
|
3608
3624
|
return (g = ($ = u.value) == null ? void 0 : $[0]) == null ? void 0 : g.color;
|
|
3609
3625
|
}), b = m(
|
|
@@ -3620,17 +3636,17 @@ const du = {
|
|
|
3620
3636
|
}
|
|
3621
3637
|
function L($, g, f) {
|
|
3622
3638
|
if ($.length)
|
|
3623
|
-
return
|
|
3639
|
+
return Fe().range([0, f.width]).domain([0, $[0].values.length - 1]);
|
|
3624
3640
|
}
|
|
3625
3641
|
return n({
|
|
3626
3642
|
areaPathDefinition: c
|
|
3627
|
-
}), ($, g) => (_(), q(v(Me),
|
|
3643
|
+
}), ($, g) => (_(), q(v(Me), V(o, {
|
|
3628
3644
|
"chart-type": "line",
|
|
3629
3645
|
options: k(v(s)),
|
|
3630
3646
|
"x-scale": L
|
|
3631
|
-
},
|
|
3632
|
-
groups:
|
|
3633
|
-
v(s).showArea ? (_(),
|
|
3647
|
+
}, ie(v(a))), ge({
|
|
3648
|
+
groups: U((f) => [
|
|
3649
|
+
v(s).showArea ? (_(), O("path", {
|
|
3634
3650
|
key: 0,
|
|
3635
3651
|
class: ae([
|
|
3636
3652
|
"sparkline-chart__area",
|
|
@@ -3640,20 +3656,20 @@ const du = {
|
|
|
3640
3656
|
]),
|
|
3641
3657
|
d: v(c)(f.xScale, f.yScale),
|
|
3642
3658
|
"data-j-sparkline__area": ""
|
|
3643
|
-
}, null, 10,
|
|
3644
|
-
ve(v(yn),
|
|
3659
|
+
}, null, 10, fu)) : Z("", !0),
|
|
3660
|
+
ve(v(yn), V(f, { "with-points": !1 }, ie(v(a))), null, 16)
|
|
3645
3661
|
]),
|
|
3646
3662
|
_: 2
|
|
3647
3663
|
}, [
|
|
3648
|
-
|
|
3664
|
+
J(v(r), (f, y) => ({
|
|
3649
3665
|
name: y,
|
|
3650
|
-
fn:
|
|
3651
|
-
|
|
3666
|
+
fn: U((I) => [
|
|
3667
|
+
G($.$slots, y, Le(Ae(I || {})), void 0, !0)
|
|
3652
3668
|
])
|
|
3653
3669
|
}))
|
|
3654
3670
|
]), 1040, ["options"]));
|
|
3655
3671
|
}
|
|
3656
|
-
}),
|
|
3672
|
+
}), $u = /* @__PURE__ */ oe(mu, [["__scopeId", "data-v-579f7e32"]]);
|
|
3657
3673
|
export {
|
|
3658
3674
|
Rt as A,
|
|
3659
3675
|
rt as B,
|
|
@@ -3674,36 +3690,36 @@ export {
|
|
|
3674
3690
|
ua as Q,
|
|
3675
3691
|
bt as R,
|
|
3676
3692
|
rn as S,
|
|
3677
|
-
|
|
3693
|
+
He as T,
|
|
3678
3694
|
To as U,
|
|
3679
|
-
|
|
3695
|
+
Ce as V,
|
|
3680
3696
|
Lo as W,
|
|
3681
|
-
|
|
3697
|
+
_u as _,
|
|
3682
3698
|
fe as a,
|
|
3683
|
-
|
|
3699
|
+
Ol as b,
|
|
3684
3700
|
Sa as c,
|
|
3685
3701
|
Oa as d,
|
|
3686
3702
|
Ea as e,
|
|
3687
3703
|
Et as f,
|
|
3688
3704
|
ht as g,
|
|
3689
|
-
|
|
3705
|
+
ku as h,
|
|
3690
3706
|
It as i,
|
|
3691
3707
|
Me as j,
|
|
3692
3708
|
wo as k,
|
|
3693
3709
|
Gt as l,
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3710
|
+
Lu as m,
|
|
3711
|
+
Kl as n,
|
|
3712
|
+
Tu as o,
|
|
3697
3713
|
yn as p,
|
|
3698
3714
|
ea as q,
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3715
|
+
tu as r,
|
|
3716
|
+
bu as s,
|
|
3717
|
+
$u as t,
|
|
3718
|
+
Au as u,
|
|
3703
3719
|
Qo as v,
|
|
3704
3720
|
Wo as w,
|
|
3705
3721
|
jo as x,
|
|
3706
3722
|
Mo as y,
|
|
3707
3723
|
ta as z
|
|
3708
3724
|
};
|
|
3709
|
-
//# sourceMappingURL=
|
|
3725
|
+
//# sourceMappingURL=Bksflyvk.js.map
|