@adyen/lume-vue3 1.11.2 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/core/lume-bar/composables/bar-transition.d.ts.map +1 -1
- package/dist/common/D3C1hTl9.js +5 -0
- package/dist/common/D3C1hTl9.js.map +1 -0
- package/dist/common/DI0JiGP5.js +5 -0
- package/dist/common/DI0JiGP5.js.map +1 -0
- package/dist/common/DgbGPOnI.js +5 -0
- package/dist/common/DgbGPOnI.js.map +1 -0
- package/dist/common/{_87XKFtI.js → o-3UCjl8.js} +513 -518
- package/dist/common/o-3UCjl8.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/main.scss +1 -1
- package/package.json +2 -2
- package/dist/common/C65Yk4mi.js +0 -5
- package/dist/common/C65Yk4mi.js.map +0 -1
- package/dist/common/Q4X11bG0.js +0 -5
- package/dist/common/Q4X11bG0.js.map +0 -1
- package/dist/common/_87XKFtI.js.map +0 -1
- package/dist/common/ttsUF_VP.js +0 -5
- package/dist/common/ttsUF_VP.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as S, openBlock as _, createElementBlock as I, mergeProps as j, createElementVNode as G, toDisplayString as ne, createCommentVNode as z, isRef as Gt, computed as v, watch as X, toRefs as ee, inject as Ce, reactive as Fe, onMounted as ye, unref as d, Fragment as Q, renderList as W, createBlock as Y, normalizeClass as te, normalizeStyle as jt, watchEffect as Vt, onBeforeUnmount as Pt, renderSlot as M, createTextVNode as se, useSlots as
|
|
2
|
-
import { sankeyLinkHorizontal as vn, sankey as
|
|
1
|
+
import { defineComponent as Z, ref as S, openBlock as _, createElementBlock as I, mergeProps as j, createElementVNode as G, toDisplayString as ne, createCommentVNode as z, isRef as Gt, computed as v, watch as X, toRefs as ee, inject as Ce, reactive as Fe, onMounted as ye, unref as d, Fragment as Q, renderList as W, createBlock as Y, normalizeClass as te, normalizeStyle as jt, watchEffect as Vt, onBeforeUnmount as Pt, renderSlot as M, createTextVNode as se, useSlots as ue, nextTick as Qe, withCtx as V, createSlots as ce, pushScopeId as sn, popScopeId as cn, provide as Ke, createVNode as re, toHandlers as oe, normalizeProps as pe, guardReactiveProps as he, defineAsyncComponent as Je, resolveDynamicComponent as dn } from "vue";
|
|
2
|
+
import { sankeyLinkHorizontal as vn, sankey as fn, sankeyJustify as mn } from "d3-sankey";
|
|
3
3
|
import { format as pn, ticks as hn, scaleBand as Be, scaleLinear as Me, link as gn, line as yn, area as _n } from "d3";
|
|
4
4
|
import { createPopper as kn } from "@popperjs/core";
|
|
5
5
|
const bn = {
|
|
@@ -45,7 +45,7 @@ const bn = {
|
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
47
|
const o = t, a = S(null);
|
|
48
|
-
return n({ ref: a }), (
|
|
48
|
+
return n({ ref: a }), (u, l) => (_(), I("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -119,7 +119,7 @@ function In(e) {
|
|
|
119
119
|
const [n, t] = e.domain();
|
|
120
120
|
return n == null || t == null || n === 0 && t === 0;
|
|
121
121
|
}
|
|
122
|
-
const
|
|
122
|
+
const xn = (e, n) => {
|
|
123
123
|
if (!e)
|
|
124
124
|
throw new Error("Data is not a valid array");
|
|
125
125
|
if (e.length === 0)
|
|
@@ -128,12 +128,12 @@ const wn = (e, n) => {
|
|
|
128
128
|
({ values: o }) => o.length - 1 >= n
|
|
129
129
|
) || ge(ve.IndexExceedsLengthOfDataSets);
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function wn(e, n) {
|
|
132
132
|
var t;
|
|
133
|
-
return
|
|
133
|
+
return xn(e, n), ((t = e.reduce(
|
|
134
134
|
(o, a) => {
|
|
135
|
-
var
|
|
136
|
-
return (((
|
|
135
|
+
var u, l;
|
|
136
|
+
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
137
137
|
}
|
|
138
138
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
139
139
|
}
|
|
@@ -215,7 +215,7 @@ const Ve = (e) => {
|
|
|
215
215
|
default: () => ({})
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
|
-
function
|
|
218
|
+
function fe(e, n) {
|
|
219
219
|
return { allOptions: v(() => {
|
|
220
220
|
const o = Gt(n) ? n == null ? void 0 : n.value : n;
|
|
221
221
|
return o ? zt(o, e.value) : e.value;
|
|
@@ -223,21 +223,21 @@ function me(e, n) {
|
|
|
223
223
|
}
|
|
224
224
|
const Rn = 0.2;
|
|
225
225
|
function Sn(e, n, t) {
|
|
226
|
-
const o = S(), a = v(() => Math.max(...e.value.range())),
|
|
226
|
+
const o = S(), a = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
227
227
|
function l() {
|
|
228
228
|
if (!n.value) return;
|
|
229
229
|
const c = n.value.reduce(
|
|
230
|
-
(
|
|
230
|
+
(m, r) => m + r.ref.getBoundingClientRect().width,
|
|
231
231
|
0
|
|
232
|
-
), s = Math.ceil(c /
|
|
232
|
+
), s = Math.ceil(c / u.value);
|
|
233
233
|
o.value = s + s * Rn;
|
|
234
234
|
}
|
|
235
235
|
function i(c) {
|
|
236
236
|
if (!n.value) return !0;
|
|
237
|
-
const s = t.value.skip,
|
|
237
|
+
const s = t.value.skip, m = n.value.length;
|
|
238
238
|
if (c === 0) return !0;
|
|
239
|
-
const
|
|
240
|
-
return c %
|
|
239
|
+
const r = a.value / m, f = typeof s == "number" && s > 0 && s + 1 || Math.ceil(o.value / r);
|
|
240
|
+
return c % f === 0;
|
|
241
241
|
}
|
|
242
242
|
return X(n, l), { showTick: i };
|
|
243
243
|
}
|
|
@@ -298,11 +298,11 @@ const Kt = {
|
|
|
298
298
|
transform: `translate(${(e.value(s) ?? e.value(c)) - o.value}, 0)`
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
var
|
|
301
|
+
function u(c) {
|
|
302
|
+
var m;
|
|
303
303
|
const s = Math.max(
|
|
304
304
|
e.value.step(),
|
|
305
|
-
(c ? (
|
|
305
|
+
(c ? (m = c.getComputedTextLength) == null ? void 0 : m.call(c) : e.value.step()) + 20
|
|
306
306
|
);
|
|
307
307
|
return {
|
|
308
308
|
x: -(s - e.value.step()) / 2,
|
|
@@ -329,7 +329,7 @@ const Kt = {
|
|
|
329
329
|
}
|
|
330
330
|
return {
|
|
331
331
|
getGridLinesAttributes: l,
|
|
332
|
-
getTickGhostAttributes:
|
|
332
|
+
getTickGhostAttributes: u,
|
|
333
333
|
getTickGroupAttributes: a,
|
|
334
334
|
getTickLabelAttributes: i
|
|
335
335
|
};
|
|
@@ -340,9 +340,9 @@ const Kt = {
|
|
|
340
340
|
transform: `translate(0, ${(e.value(s) ?? e.value(c)) - o.value})`
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
var
|
|
345
|
-
const s = (c ? (
|
|
343
|
+
function u(c) {
|
|
344
|
+
var m;
|
|
345
|
+
const s = (c ? (m = c.getComputedTextLength) == null ? void 0 : m.call(c) : 42) + t.value.tickPadding + Se;
|
|
346
346
|
return {
|
|
347
347
|
x: -s,
|
|
348
348
|
width: s,
|
|
@@ -367,7 +367,7 @@ const Kt = {
|
|
|
367
367
|
}
|
|
368
368
|
return {
|
|
369
369
|
getGridLinesAttributes: l,
|
|
370
|
-
getTickGhostAttributes:
|
|
370
|
+
getTickGhostAttributes: u,
|
|
371
371
|
getTickGroupAttributes: a,
|
|
372
372
|
getTickLabelAttributes: i
|
|
373
373
|
};
|
|
@@ -381,7 +381,7 @@ const Kt = {
|
|
|
381
381
|
transform: `translate(${e.value(c)}, 0)`
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function u() {
|
|
385
385
|
return {
|
|
386
386
|
height: t.value.tickPadding + Yt + Se,
|
|
387
387
|
width: o.value,
|
|
@@ -402,7 +402,7 @@ const Kt = {
|
|
|
402
402
|
}
|
|
403
403
|
return {
|
|
404
404
|
getGridLinesAttributes: l,
|
|
405
|
-
getTickGhostAttributes:
|
|
405
|
+
getTickGhostAttributes: u,
|
|
406
406
|
getTickGroupAttributes: a,
|
|
407
407
|
getTickLabelAttributes: i
|
|
408
408
|
};
|
|
@@ -416,9 +416,9 @@ const Kt = {
|
|
|
416
416
|
transform: `translate(0, ${e.value(c)})`
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
var
|
|
421
|
-
const s = (((
|
|
419
|
+
function u(c) {
|
|
420
|
+
var m;
|
|
421
|
+
const s = (((m = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : m.call(c)) || 0) + t.value.tickPadding + Se;
|
|
422
422
|
return {
|
|
423
423
|
width: s,
|
|
424
424
|
height: o.value,
|
|
@@ -440,7 +440,7 @@ const Kt = {
|
|
|
440
440
|
}
|
|
441
441
|
return {
|
|
442
442
|
getGridLinesAttributes: l,
|
|
443
|
-
getTickGhostAttributes:
|
|
443
|
+
getTickGhostAttributes: u,
|
|
444
444
|
getTickGroupAttributes: a,
|
|
445
445
|
getTickLabelAttributes: i
|
|
446
446
|
};
|
|
@@ -503,27 +503,27 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
503
503
|
},
|
|
504
504
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
505
505
|
setup(e, { emit: n }) {
|
|
506
|
-
const o = e, a = n, { scale:
|
|
506
|
+
const o = e, a = n, { scale: u, containerSize: l, hoveredIndex: i, options: c, orientation: s } = ee(o), m = Ce("isEmpty", S(!1)), r = Fe({}), f = S(null), y = S(null), p = S(null), b = v(
|
|
507
507
|
() => o.type ? et[o.type] : o.position
|
|
508
508
|
), $ = v(
|
|
509
509
|
() => o.type || (b.value === "left" ? "y" : "x")
|
|
510
510
|
), L = v(
|
|
511
511
|
() => $.value === "x" && s.value === H.VERTICAL || $.value === "y" && s.value === H.HORIZONTAL
|
|
512
|
-
), { allOptions: g } =
|
|
512
|
+
), { allOptions: g } = fe(
|
|
513
513
|
c,
|
|
514
514
|
$.value === "x" ? Pn : Cn
|
|
515
|
-
), { showTick: O } = Sn(
|
|
516
|
-
() =>
|
|
515
|
+
), { showTick: O } = Sn(u, f, g), N = v(
|
|
516
|
+
() => m.value || !u.value || In(u.value)
|
|
517
517
|
), D = v(() => {
|
|
518
518
|
var k, E, h, R;
|
|
519
519
|
return $.value === "y" && N.value ? `translate(0, ${((k = l.value) == null ? void 0 : k.height) / 2})` : $.value === "x" && N.value ? `translate(-${((E = l.value) == null ? void 0 : E.width) / 2}, ${(h = l.value) == null ? void 0 : h.height})` : `translate(0, ${$.value === "x" ? (R = l.value) == null ? void 0 : R.height : 0})`;
|
|
520
520
|
}), P = v(() => {
|
|
521
|
-
if (!
|
|
522
|
-
if (de(
|
|
523
|
-
return
|
|
524
|
-
const { tickCount: k } = g.value, [E, h] =
|
|
521
|
+
if (!u.value) return [];
|
|
522
|
+
if (de(u.value))
|
|
523
|
+
return u.value.labels || u.value.domain();
|
|
524
|
+
const { tickCount: k } = g.value, [E, h] = u.value.domain();
|
|
525
525
|
return hn(E, h, k);
|
|
526
|
-
}),
|
|
526
|
+
}), w = v(() => {
|
|
527
527
|
const { tickFormat: k } = g.value;
|
|
528
528
|
return Ve(k);
|
|
529
529
|
}), B = v(
|
|
@@ -533,7 +533,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
533
533
|
), K = v(() => $.value === "x" ? (
|
|
534
534
|
// If x axis, get the tick height
|
|
535
535
|
Math.max(
|
|
536
|
-
...(
|
|
536
|
+
...(f.value || []).map(
|
|
537
537
|
(k) => {
|
|
538
538
|
var E, h;
|
|
539
539
|
return ((h = (E = k.ref).getBBox) == null ? void 0 : h.call(E).height) + U.value;
|
|
@@ -543,7 +543,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
543
543
|
) : (
|
|
544
544
|
// If y axis, get the tick width
|
|
545
545
|
Math.max(
|
|
546
|
-
...(
|
|
546
|
+
...(f.value || []).map(
|
|
547
547
|
(k) => {
|
|
548
548
|
var E, h;
|
|
549
549
|
return ((h = (E = k.ref).getBBox) == null ? void 0 : h.call(E).width) + U.value;
|
|
@@ -553,7 +553,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
553
553
|
));
|
|
554
554
|
function J(k) {
|
|
555
555
|
const { showTicks: E } = g.value;
|
|
556
|
-
return E === !1 ? "" :
|
|
556
|
+
return E === !1 ? "" : w.value(k);
|
|
557
557
|
}
|
|
558
558
|
function C(k, E, h) {
|
|
559
559
|
a("mouseenter", { index: L.value ? k : null, value: E, event: h });
|
|
@@ -563,33 +563,33 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
563
563
|
}
|
|
564
564
|
function Ne(k) {
|
|
565
565
|
var E;
|
|
566
|
-
if (!(!
|
|
567
|
-
return (E =
|
|
566
|
+
if (!(!f.value || !f.value.length))
|
|
567
|
+
return (E = f.value[k]) == null ? void 0 : E.ref;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function me() {
|
|
570
570
|
p.value = P.value.map(
|
|
571
571
|
(k, E) => ({
|
|
572
572
|
value: J(k),
|
|
573
|
-
group:
|
|
574
|
-
ghost:
|
|
575
|
-
label:
|
|
576
|
-
gridline:
|
|
573
|
+
group: r.getTickGroupAttributes(k, E),
|
|
574
|
+
ghost: r.getTickGhostAttributes(Ne(E)),
|
|
575
|
+
label: r.getTickLabelAttributes(),
|
|
576
|
+
gridline: r.getGridLinesAttributes()
|
|
577
577
|
})
|
|
578
578
|
);
|
|
579
579
|
}
|
|
580
580
|
function Te() {
|
|
581
|
-
p.value && p.value.map((k) => (k.gridline =
|
|
581
|
+
p.value && p.value.map((k) => (k.gridline = r.getGridLinesAttributes(), k));
|
|
582
582
|
}
|
|
583
583
|
function Le() {
|
|
584
|
-
if (!
|
|
585
|
-
const k =
|
|
586
|
-
Object.entries(E(
|
|
584
|
+
if (!u.value) return;
|
|
585
|
+
const k = u.value.step ? "bandScale" : "linearScale", E = Un[`${$.value}-${Jt[k]}`];
|
|
586
|
+
Object.entries(E(u, l, g) || []).forEach(
|
|
587
587
|
([h, R]) => {
|
|
588
|
-
|
|
588
|
+
r[h] = R;
|
|
589
589
|
}
|
|
590
590
|
);
|
|
591
591
|
}
|
|
592
|
-
return X(
|
|
592
|
+
return X(u, Le, { flush: "sync", immediate: !0 }), X(u, me, { immediate: !0 }), X(f, me), X(K, (k) => a("lume__internal--axis-size", k)), X(o.containerSize, Te), ye(() => ze(y.value)), (k, E) => d(u) ? (_(), I("g", {
|
|
593
593
|
key: 0,
|
|
594
594
|
ref_key: "root",
|
|
595
595
|
ref: y,
|
|
@@ -603,7 +603,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
603
603
|
key: `${h.value}_${R}`,
|
|
604
604
|
ref_for: !0,
|
|
605
605
|
ref_key: "tickRefs",
|
|
606
|
-
ref:
|
|
606
|
+
ref: f
|
|
607
607
|
}, h, {
|
|
608
608
|
"is-hidden": d(g).skip && !d(O)(R),
|
|
609
609
|
"with-gridlines": d(g).gridLines,
|
|
@@ -623,27 +623,22 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
623
623
|
}
|
|
624
624
|
});
|
|
625
625
|
function Qn(e, n, t, o) {
|
|
626
|
-
const a = v(() => t.value > 0 && t.value < 1),
|
|
626
|
+
const a = v(() => t.value > 0 && t.value < 1), u = v(
|
|
627
627
|
() => o.value > 0 && o.value < 1
|
|
628
628
|
), l = v(
|
|
629
629
|
() => a.value ? e.value - 0.5 : e.value
|
|
630
630
|
// draws the 1px bar closer to the axis
|
|
631
631
|
), i = v(
|
|
632
|
-
() =>
|
|
632
|
+
() => u.value ? n.value - 0.5 : n.value
|
|
633
633
|
// draws the 1px bar closer to the axis
|
|
634
634
|
);
|
|
635
|
-
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight:
|
|
635
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: u };
|
|
636
636
|
}
|
|
637
637
|
function qn(e, n, t, o) {
|
|
638
|
-
const a = S(0),
|
|
639
|
-
const i = parseFloat(
|
|
640
|
-
getComputedStyle(document.documentElement).fontSize
|
|
641
|
-
), c = (e.value + t.value / 2) / i, s = (n.value + o.value / 2) / i;
|
|
642
|
-
return `${c}rem ${s}rem`;
|
|
643
|
-
});
|
|
638
|
+
const a = S(0), u = S(0), l = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
644
639
|
return ye(() => {
|
|
645
|
-
a.value = t.value,
|
|
646
|
-
}), X(t, (i) => a.value = i), X(o, (i) =>
|
|
640
|
+
a.value = t.value, u.value = o.value;
|
|
641
|
+
}), X(t, (i) => a.value = i), X(o, (i) => u.value = i), { computedWidth: a, computedHeight: u, transformOrigin: l };
|
|
647
642
|
}
|
|
648
643
|
const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
649
644
|
__name: "lume-bar",
|
|
@@ -683,20 +678,20 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
683
678
|
},
|
|
684
679
|
emits: ["click", "mouseover", "mouseleave"],
|
|
685
680
|
setup(e, { emit: n }) {
|
|
686
|
-
const t = e, o = n, { x: a, y:
|
|
681
|
+
const t = e, o = n, { x: a, y: u, width: l, height: i, transition: c, classList: s } = ee(t), m = S(null), r = v(
|
|
687
682
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
688
|
-
),
|
|
689
|
-
return ye(() => ze(
|
|
683
|
+
), f = v(() => c.value === "width"), y = v(() => c.value === "height"), p = qn(a, u, l, i), { computedX: b, computedY: $, shouldHaveMinWidth: L, shouldHaveMinHeight: g } = Qn(a, u, l, i), O = v(() => L.value ? 1 : (f.value ? p.computedWidth : l).value), N = v(() => g.value ? 1 : (y.value ? p.computedHeight : i).value), D = f.value || y.value ? p.transformOrigin : null;
|
|
684
|
+
return ye(() => ze(m.value)), (P, w) => (_(), I("rect", {
|
|
690
685
|
ref_key: "root",
|
|
691
|
-
ref:
|
|
686
|
+
ref: m,
|
|
692
687
|
class: te(["lume-bar", [
|
|
693
688
|
{
|
|
694
689
|
"lume-fill--faded": e.isFaded,
|
|
695
690
|
"lume-bar--negative": e.isNegative,
|
|
696
|
-
"lume-bar--transition-width":
|
|
691
|
+
"lume-bar--transition-width": f.value,
|
|
697
692
|
"lume-bar--transition-height": y.value
|
|
698
693
|
},
|
|
699
|
-
...
|
|
694
|
+
...r.value
|
|
700
695
|
]]),
|
|
701
696
|
style: jt({ transformOrigin: d(D) }),
|
|
702
697
|
x: d(b),
|
|
@@ -704,33 +699,33 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
704
699
|
width: O.value,
|
|
705
700
|
height: N.value,
|
|
706
701
|
"data-j-bar": "",
|
|
707
|
-
onClick:
|
|
708
|
-
onMouseover:
|
|
709
|
-
onMouseleave:
|
|
702
|
+
onClick: w[0] || (w[0] = (B) => o("click", B)),
|
|
703
|
+
onMouseover: w[1] || (w[1] = (B) => o("mouseover", B)),
|
|
704
|
+
onMouseleave: w[2] || (w[2] = (B) => o("mouseleave", B))
|
|
710
705
|
}, null, 46, eo));
|
|
711
706
|
}
|
|
712
707
|
}), dt = /* @__PURE__ */ q(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
713
|
-
var ke = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(ke || {}), ie = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ie || {}), qt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(qt || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}),
|
|
708
|
+
var ke = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(ke || {}), ie = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ie || {}), qt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(qt || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}), ft = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(ft || {}), mt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(mt || {});
|
|
714
709
|
const no = ke.Categorical, Ge = ie.Skyblue, oo = vt.SkyTeal;
|
|
715
710
|
function ao(e) {
|
|
716
711
|
return e === ke.Divergent ? oo : Ge;
|
|
717
712
|
}
|
|
718
713
|
function lo(e) {
|
|
719
|
-
return Object.values(
|
|
714
|
+
return Object.values(mt).includes(e);
|
|
720
715
|
}
|
|
721
716
|
function $t(e, n) {
|
|
722
717
|
return n === ke.Divergent ? Object.values(vt).includes(e) : Object.values({
|
|
723
718
|
...ie,
|
|
724
719
|
...qt,
|
|
725
|
-
...
|
|
726
|
-
...
|
|
720
|
+
...ft,
|
|
721
|
+
...mt
|
|
727
722
|
}).includes(e);
|
|
728
723
|
}
|
|
729
|
-
function
|
|
724
|
+
function uo(e, n) {
|
|
730
725
|
const t = Object.values(ie).indexOf(e);
|
|
731
726
|
return Dn(Object.values(ie), t > -1 ? t : 0)[n];
|
|
732
727
|
}
|
|
733
|
-
function
|
|
728
|
+
function ro(e, n) {
|
|
734
729
|
const t = 50 + n * 10;
|
|
735
730
|
return `${e}-${t}`;
|
|
736
731
|
}
|
|
@@ -742,9 +737,9 @@ function Ot(e, n, t) {
|
|
|
742
737
|
switch (n) {
|
|
743
738
|
default:
|
|
744
739
|
case ke.Categorical:
|
|
745
|
-
return lo(e) ? e :
|
|
740
|
+
return lo(e) ? e : uo(e, t);
|
|
746
741
|
case ke.Sequential:
|
|
747
|
-
return
|
|
742
|
+
return ro(e, t);
|
|
748
743
|
case ke.Divergent:
|
|
749
744
|
return io(e, t);
|
|
750
745
|
}
|
|
@@ -778,42 +773,42 @@ const pt = (e = null) => ({
|
|
|
778
773
|
}
|
|
779
774
|
});
|
|
780
775
|
function ht(e, n, t, o, a) {
|
|
781
|
-
const
|
|
776
|
+
const u = Fe({
|
|
782
777
|
width: 0,
|
|
783
778
|
height: 0
|
|
784
779
|
}), l = Bn(12), i = v(() => {
|
|
785
|
-
var
|
|
786
|
-
return e.value.length > 5 && ge(ve.DatasetLength), (
|
|
787
|
-
(
|
|
788
|
-
if (vo(
|
|
789
|
-
const y = co(
|
|
790
|
-
|
|
780
|
+
var m;
|
|
781
|
+
return e.value.length > 5 && ge(ve.DatasetLength), (m = e.value) == null ? void 0 : m.map(
|
|
782
|
+
(r, f) => {
|
|
783
|
+
if (vo(r)) return r;
|
|
784
|
+
const y = co(r.values), p = so(
|
|
785
|
+
r.color,
|
|
791
786
|
t == null ? void 0 : t.value,
|
|
792
787
|
o == null ? void 0 : o.value.colorPalette,
|
|
793
|
-
|
|
788
|
+
f
|
|
794
789
|
);
|
|
795
790
|
return {
|
|
796
|
-
...
|
|
791
|
+
...r,
|
|
797
792
|
values: y,
|
|
798
793
|
color: p,
|
|
799
794
|
__internal: !0
|
|
800
795
|
};
|
|
801
796
|
}
|
|
802
797
|
);
|
|
803
|
-
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((
|
|
804
|
-
function s(
|
|
805
|
-
const
|
|
806
|
-
|
|
798
|
+
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((m, r) => r));
|
|
799
|
+
function s(m) {
|
|
800
|
+
const r = (a == null ? void 0 : a.value) === H.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) || m.height;
|
|
801
|
+
u.width = m.width, u.height = r;
|
|
807
802
|
}
|
|
808
803
|
return {
|
|
809
804
|
chartID: l,
|
|
810
805
|
computedLabels: c,
|
|
811
|
-
containerSize:
|
|
806
|
+
containerSize: u,
|
|
812
807
|
internalData: i,
|
|
813
808
|
updateSize: s
|
|
814
809
|
};
|
|
815
810
|
}
|
|
816
|
-
const
|
|
811
|
+
const fo = () => ({
|
|
817
812
|
xScale: {
|
|
818
813
|
type: Function,
|
|
819
814
|
default: null
|
|
@@ -823,50 +818,50 @@ const mo = () => ({
|
|
|
823
818
|
default: null
|
|
824
819
|
}
|
|
825
820
|
});
|
|
826
|
-
function
|
|
827
|
-
const
|
|
821
|
+
function mo(e, n, t, o, a) {
|
|
822
|
+
const u = S(null), l = S(null);
|
|
828
823
|
function i() {
|
|
829
|
-
var
|
|
824
|
+
var m, r, f, y;
|
|
830
825
|
const { width: c, height: s } = t;
|
|
831
|
-
!c && !s || (o.value === H.HORIZONTAL ? (
|
|
826
|
+
!c && !s || (o.value === H.HORIZONTAL ? (u.value = (m = e.value) != null && m.length ? xt(
|
|
832
827
|
e.value,
|
|
833
828
|
c,
|
|
834
829
|
o.value,
|
|
835
830
|
a.value.startOnZero
|
|
836
|
-
) : null, l.value = (
|
|
831
|
+
) : null, l.value = (r = n.value) != null && r.length ? It(
|
|
837
832
|
n.value,
|
|
838
833
|
s,
|
|
839
834
|
o.value,
|
|
840
835
|
a.value
|
|
841
|
-
) : null) : (
|
|
836
|
+
) : null) : (u.value = (f = n.value) != null && f.length ? It(
|
|
842
837
|
n.value,
|
|
843
838
|
c,
|
|
844
839
|
o.value,
|
|
845
840
|
a.value
|
|
846
|
-
) : null, l.value = (y = e.value) != null && y.length ?
|
|
841
|
+
) : null, l.value = (y = e.value) != null && y.length ? xt(
|
|
847
842
|
e.value,
|
|
848
843
|
s,
|
|
849
844
|
o.value,
|
|
850
845
|
a.value.startOnZero
|
|
851
846
|
) : null));
|
|
852
847
|
}
|
|
853
|
-
return Vt(i), { xScale:
|
|
848
|
+
return Vt(i), { xScale: u, yScale: l };
|
|
854
849
|
}
|
|
855
850
|
function It(e, n, t, o) {
|
|
856
|
-
const a = [0, n], { padding:
|
|
851
|
+
const a = [0, n], { padding: u, paddingInner: l, paddingOuter: i } = o, c = u ?? (t === H.HORIZONTAL ? Xt : Ut);
|
|
857
852
|
return Object.assign(
|
|
858
|
-
Be().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s,
|
|
853
|
+
Be().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, m) => m)),
|
|
859
854
|
{ labels: e }
|
|
860
855
|
);
|
|
861
856
|
}
|
|
862
|
-
function
|
|
863
|
-
const a = Ft(e).filter((
|
|
857
|
+
function xt(e, n, t, o) {
|
|
858
|
+
const a = Ft(e).filter((m) => m != null), u = [0, n];
|
|
864
859
|
if (a.length === 0)
|
|
865
|
-
return Me().range(
|
|
860
|
+
return Me().range(u).domain([0, 0]).nice();
|
|
866
861
|
const l = Math.min(...a), i = o && l > 0 ? 0 : l, c = Math.max(...a), s = t === H.HORIZONTAL ? [i, c] : [c, i];
|
|
867
|
-
return Me().range(
|
|
862
|
+
return Me().range(u).domain(s).nice();
|
|
868
863
|
}
|
|
869
|
-
function
|
|
864
|
+
function wt(e) {
|
|
870
865
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
871
866
|
}
|
|
872
867
|
function tt(e, n) {
|
|
@@ -877,15 +872,15 @@ function Et(e, n, {
|
|
|
877
872
|
paddingInner: o,
|
|
878
873
|
paddingOuter: a
|
|
879
874
|
} = {}) {
|
|
880
|
-
const
|
|
881
|
-
return e.copy().paddingInner(o ??
|
|
875
|
+
const u = t ?? (n === H.HORIZONTAL ? Xt : Ut);
|
|
876
|
+
return e.copy().paddingInner(o ?? u).paddingOuter(a ?? u);
|
|
882
877
|
}
|
|
883
878
|
function gt(e) {
|
|
884
879
|
return Object.values(H).includes(e);
|
|
885
880
|
}
|
|
886
|
-
const
|
|
881
|
+
const we = (e, n = !0) => ({
|
|
887
882
|
...pt(e),
|
|
888
|
-
...
|
|
883
|
+
...fo(),
|
|
889
884
|
...Re(),
|
|
890
885
|
classList: {
|
|
891
886
|
type: [String, Array],
|
|
@@ -951,22 +946,22 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
951
946
|
},
|
|
952
947
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
953
948
|
setup(e, { emit: n }) {
|
|
954
|
-
const t = e, o = n, { margins: a, containerSize:
|
|
955
|
-
() =>
|
|
949
|
+
const t = e, o = n, { margins: a, containerSize: u } = ee(t), l = S(null), { resizeRef: i, resizeState: c } = ho(), s = v(
|
|
950
|
+
() => u.value.height + a.value.top + a.value.bottom
|
|
956
951
|
);
|
|
957
952
|
return Vt(() => {
|
|
958
953
|
if (!l.value) return;
|
|
959
|
-
const { width:
|
|
960
|
-
if (!
|
|
954
|
+
const { width: m } = c.dimensions, { height: r } = l.value.getBoundingClientRect();
|
|
955
|
+
if (!m || t.orientation === H.VERTICAL && !r)
|
|
961
956
|
return;
|
|
962
|
-
const
|
|
963
|
-
width:
|
|
957
|
+
const f = m - a.value.left - a.value.right, y = r - a.value.top - a.value.bottom, p = {
|
|
958
|
+
width: f > 0 ? f : 0,
|
|
964
959
|
height: y > 0 ? y : 0,
|
|
965
|
-
outerWidth:
|
|
966
|
-
outerHeight:
|
|
960
|
+
outerWidth: m,
|
|
961
|
+
outerHeight: r
|
|
967
962
|
};
|
|
968
963
|
o("resize", p);
|
|
969
|
-
}), (
|
|
964
|
+
}), (m, r) => (_(), I("div", {
|
|
970
965
|
ref_key: "resizeRef",
|
|
971
966
|
ref: i,
|
|
972
967
|
class: te(["lume-chart-container", {
|
|
@@ -974,7 +969,7 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
974
969
|
}]),
|
|
975
970
|
"data-j-chart-container": ""
|
|
976
971
|
}, [
|
|
977
|
-
M(
|
|
972
|
+
M(m.$slots, "header", {}, void 0, !0),
|
|
978
973
|
(_(), I("svg", {
|
|
979
974
|
ref_key: "root",
|
|
980
975
|
ref: l,
|
|
@@ -983,20 +978,20 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
983
978
|
}]),
|
|
984
979
|
height: s.value,
|
|
985
980
|
"data-j-chart-container__root": "",
|
|
986
|
-
onClick:
|
|
987
|
-
onMouseenter:
|
|
988
|
-
onMouseleave:
|
|
981
|
+
onClick: r[0] || (r[0] = (f) => o("click", f)),
|
|
982
|
+
onMouseenter: r[1] || (r[1] = (f) => o("mouseenter", f)),
|
|
983
|
+
onMouseleave: r[2] || (r[2] = (f) => o("mouseleave", f))
|
|
989
984
|
}, [
|
|
990
985
|
G("g", {
|
|
991
986
|
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
992
987
|
class: "lume-chart-container__group",
|
|
993
988
|
"data-j-chart-container__group": ""
|
|
994
989
|
}, [
|
|
995
|
-
M(
|
|
990
|
+
M(m.$slots, "default", {}, void 0, !0)
|
|
996
991
|
], 8, yo)
|
|
997
992
|
], 42, go)),
|
|
998
|
-
M(
|
|
999
|
-
M(
|
|
993
|
+
M(m.$slots, "footer", {}, void 0, !0),
|
|
994
|
+
M(m.$slots, "extra", {}, void 0, !0)
|
|
1000
995
|
], 2));
|
|
1001
996
|
}
|
|
1002
997
|
}), ko = /* @__PURE__ */ q(_o, [["__scopeId", "data-v-d53cdc3e"]]), bo = ["onClick", "onMouseenter"], Ao = /* @__PURE__ */ Z({
|
|
@@ -1014,21 +1009,21 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
1014
1009
|
return (o, a) => (_(), I("div", {
|
|
1015
1010
|
class: "lume-chart-legend",
|
|
1016
1011
|
"data-j-chart-legend": "",
|
|
1017
|
-
onMouseleave: a[0] || (a[0] = (
|
|
1012
|
+
onMouseleave: a[0] || (a[0] = (u) => t("mouseleave"))
|
|
1018
1013
|
}, [
|
|
1019
|
-
(_(!0), I(Q, null, W(e.data, (
|
|
1014
|
+
(_(!0), I(Q, null, W(e.data, (u, l) => (_(), I("div", {
|
|
1020
1015
|
key: `legend-item-${l}`,
|
|
1021
1016
|
class: "lume-chart-legend__item lume-typography--caption",
|
|
1022
1017
|
tabindex: "0",
|
|
1023
1018
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
1024
|
-
onClick: (i) => t("click", { index: l, dataset:
|
|
1025
|
-
onMouseenter: (i) => t("mouseenter", { index: l, dataset:
|
|
1019
|
+
onClick: (i) => t("click", { index: l, dataset: u, event: i }),
|
|
1020
|
+
onMouseenter: (i) => t("mouseenter", { index: l, dataset: u, event: i })
|
|
1026
1021
|
}, [
|
|
1027
1022
|
G("span", {
|
|
1028
|
-
class: te(["lume-chart-legend__symbol", `lume-background-color--${
|
|
1023
|
+
class: te(["lume-chart-legend__symbol", `lume-background-color--${u.color}`]),
|
|
1029
1024
|
"data-j-chart-legend__symbol": ""
|
|
1030
1025
|
}, null, 2),
|
|
1031
|
-
se(" " + ne(
|
|
1026
|
+
se(" " + ne(u.label || l), 1)
|
|
1032
1027
|
], 40, bo))), 128))
|
|
1033
1028
|
], 32));
|
|
1034
1029
|
}
|
|
@@ -1041,16 +1036,16 @@ function $o(e, n) {
|
|
|
1041
1036
|
M(e.$slots, "default", {}, void 0, !0)
|
|
1042
1037
|
]);
|
|
1043
1038
|
}
|
|
1044
|
-
const Oo = /* @__PURE__ */ q(To, [["render", $o], ["__scopeId", "data-v-8af3fac6"]]), Io = {},
|
|
1039
|
+
const Oo = /* @__PURE__ */ q(To, [["render", $o], ["__scopeId", "data-v-8af3fac6"]]), Io = {}, xo = {
|
|
1045
1040
|
class: "lume-tooltip__item",
|
|
1046
1041
|
"data-j-tooltip__summary-item": ""
|
|
1047
|
-
},
|
|
1042
|
+
}, wo = { class: "lume-tooltip__value" };
|
|
1048
1043
|
function Eo(e, n) {
|
|
1049
|
-
return _(), I("li",
|
|
1044
|
+
return _(), I("li", xo, [
|
|
1050
1045
|
G("span", null, [
|
|
1051
1046
|
M(e.$slots, "default", {}, void 0, !0)
|
|
1052
1047
|
]),
|
|
1053
|
-
G("strong",
|
|
1048
|
+
G("strong", wo, [
|
|
1054
1049
|
M(e.$slots, "value", {}, void 0, !0)
|
|
1055
1050
|
])
|
|
1056
1051
|
]);
|
|
@@ -1133,11 +1128,11 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1133
1128
|
},
|
|
1134
1129
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1135
1130
|
setup(e, { emit: n }) {
|
|
1136
|
-
const t = e, o = n, a = S(null), { items:
|
|
1131
|
+
const t = e, o = n, a = S(null), { items: u, options: l } = ee(t), i = ue(), c = S(null), { allOptions: s } = fe(l), m = v(
|
|
1137
1132
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
1138
|
-
),
|
|
1139
|
-
() =>
|
|
1140
|
-
),
|
|
1133
|
+
), r = v(
|
|
1134
|
+
() => m.value ? "fixed" : "absolute"
|
|
1135
|
+
), f = v(() => [
|
|
1141
1136
|
{
|
|
1142
1137
|
name: "computeStyles",
|
|
1143
1138
|
options: {
|
|
@@ -1155,16 +1150,16 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1155
1150
|
), p = v(() => Ve(s.value.valueFormat)), b = v(() => Ve(s.value.titleFormat)), $ = v(
|
|
1156
1151
|
() => {
|
|
1157
1152
|
var P;
|
|
1158
|
-
return ((P =
|
|
1153
|
+
return ((P = u.value) == null ? void 0 : P.find((w) => w.isSummary)) || {
|
|
1159
1154
|
label: s.value.summary ?? t.summary
|
|
1160
1155
|
};
|
|
1161
1156
|
}
|
|
1162
|
-
), L = v(() => i.summary || $.value.label), g = v(() => t.inverse || s.value.inverse ? [...
|
|
1157
|
+
), L = v(() => i.summary || $.value.label), g = v(() => t.inverse || s.value.inverse ? [...u.value].reverse() : u.value);
|
|
1163
1158
|
function O() {
|
|
1164
1159
|
t.targetElement && a.value && (c.value = kn(t.targetElement, a.value, {
|
|
1165
1160
|
placement: t.position,
|
|
1166
|
-
strategy:
|
|
1167
|
-
modifiers:
|
|
1161
|
+
strategy: r.value,
|
|
1162
|
+
modifiers: f.value
|
|
1168
1163
|
}), o("opened", t.targetElement));
|
|
1169
1164
|
}
|
|
1170
1165
|
function N() {
|
|
@@ -1177,10 +1172,10 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1177
1172
|
}
|
|
1178
1173
|
return X(
|
|
1179
1174
|
() => t.targetElement,
|
|
1180
|
-
async (P,
|
|
1181
|
-
!
|
|
1175
|
+
async (P, w) => {
|
|
1176
|
+
!w && P ? (await Qe(), O()) : D();
|
|
1182
1177
|
}
|
|
1183
|
-
), ye(O), Pt(N), (P,
|
|
1178
|
+
), ye(O), Pt(N), (P, w) => e.opened && e.targetElement ? (_(), I("div", {
|
|
1184
1179
|
key: 0,
|
|
1185
1180
|
ref_key: "root",
|
|
1186
1181
|
ref: a,
|
|
@@ -1188,8 +1183,8 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1188
1183
|
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
1189
1184
|
}]),
|
|
1190
1185
|
"data-j-tooltip": "",
|
|
1191
|
-
onMouseenter:
|
|
1192
|
-
onMouseleave:
|
|
1186
|
+
onMouseenter: w[0] || (w[0] = (B) => o("tooltip-mouseenter")),
|
|
1187
|
+
onMouseleave: w[1] || (w[1] = (B) => o("tooltip-mouseleave"))
|
|
1193
1188
|
}, [
|
|
1194
1189
|
M(P.$slots, "default", {}, () => [
|
|
1195
1190
|
M(P.$slots, "title", {}, () => [
|
|
@@ -1289,11 +1284,11 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1289
1284
|
},
|
|
1290
1285
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1291
1286
|
setup(e, { emit: n }) {
|
|
1292
|
-
const t = e, o = n, { data: a, orientation:
|
|
1293
|
-
function s(
|
|
1287
|
+
const t = e, o = n, { data: a, orientation: u, xScale: l, yScale: i } = ee(t), c = v(() => Wt(a));
|
|
1288
|
+
function s(m) {
|
|
1294
1289
|
var L;
|
|
1295
|
-
const
|
|
1296
|
-
return
|
|
1290
|
+
const r = u.value === H.HORIZONTAL ? i.value : l.value, f = r.domain(), y = On(r), p = ((L = r.paddingInner) == null ? void 0 : L.call(r)) ?? 0, b = y * p, $ = de(r) ? r(f[m]) - b / 2 : r(m) - y / 2;
|
|
1291
|
+
return u.value === H.HORIZONTAL ? {
|
|
1297
1292
|
width: Math.max(...l.value.range()),
|
|
1298
1293
|
height: y,
|
|
1299
1294
|
transform: `translate(0, ${$})`
|
|
@@ -1303,8 +1298,8 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1303
1298
|
transform: `translate(${$}, 0)`
|
|
1304
1299
|
};
|
|
1305
1300
|
}
|
|
1306
|
-
return (
|
|
1307
|
-
(_(!0), I(Q, null, W(c.value, (
|
|
1301
|
+
return (m, r) => (_(), I("g", zo, [
|
|
1302
|
+
(_(!0), I(Q, null, W(c.value, (f, y) => (_(), Y(d(dt), j(s(y), {
|
|
1308
1303
|
key: `overlay-${y}`,
|
|
1309
1304
|
"data-j-lume-overlay-group": y,
|
|
1310
1305
|
transition: !1,
|
|
@@ -1315,9 +1310,9 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1315
1310
|
]));
|
|
1316
1311
|
}
|
|
1317
1312
|
}), _e = (e, n) => {
|
|
1318
|
-
function t(
|
|
1313
|
+
function t(u, ...l) {
|
|
1319
1314
|
}
|
|
1320
|
-
function o(
|
|
1315
|
+
function o(u, l) {
|
|
1321
1316
|
}
|
|
1322
1317
|
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1323
1318
|
};
|
|
@@ -1329,7 +1324,7 @@ function Zo(e) {
|
|
|
1329
1324
|
function Uo(e, n, t, o) {
|
|
1330
1325
|
const a = v(
|
|
1331
1326
|
() => o.value === H.HORIZONTAL
|
|
1332
|
-
),
|
|
1327
|
+
), u = v(
|
|
1333
1328
|
() => {
|
|
1334
1329
|
var s;
|
|
1335
1330
|
return e.height - (a != null && a.value ? 0 : ((s = t.value) == null ? void 0 : s.call(t, 0)) || 0);
|
|
@@ -1347,42 +1342,42 @@ function Uo(e, n, t, o) {
|
|
|
1347
1342
|
);
|
|
1348
1343
|
return { negativeBarAttributes: v(() => ({
|
|
1349
1344
|
width: l.value,
|
|
1350
|
-
height:
|
|
1345
|
+
height: u.value,
|
|
1351
1346
|
transform: i.value
|
|
1352
1347
|
})) };
|
|
1353
1348
|
}
|
|
1354
1349
|
function Xo(e, n) {
|
|
1355
1350
|
return e.reduce((t, o) => ct(o.values, n).map(
|
|
1356
|
-
(a,
|
|
1351
|
+
(a, u) => t[u] ? a.value > t[u] ? a.value : t[u] : a.value ?? 0
|
|
1357
1352
|
), []);
|
|
1358
1353
|
}
|
|
1359
1354
|
function Yo(e, n) {
|
|
1360
1355
|
return e.reduce((t, o) => ct(o.values, n).map(
|
|
1361
|
-
(a,
|
|
1356
|
+
(a, u) => {
|
|
1362
1357
|
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1363
|
-
return t[
|
|
1358
|
+
return t[u] ? t[u] + l : l;
|
|
1364
1359
|
}
|
|
1365
1360
|
), []);
|
|
1366
1361
|
}
|
|
1367
1362
|
const Dt = {
|
|
1368
1363
|
"stacked-bar": Yo
|
|
1369
1364
|
};
|
|
1370
|
-
function en(e, n, t, o, a,
|
|
1365
|
+
function en(e, n, t, o, a, u, l, i) {
|
|
1371
1366
|
const c = v(
|
|
1372
1367
|
() => {
|
|
1373
|
-
var
|
|
1374
|
-
return n.value.withTooltip !== !1 && !((
|
|
1368
|
+
var m;
|
|
1369
|
+
return n.value.withTooltip !== !1 && !((m = n.value.tooltipOptions) != null && m.targetElement);
|
|
1375
1370
|
}
|
|
1376
1371
|
);
|
|
1377
|
-
function s(
|
|
1372
|
+
function s(m) {
|
|
1378
1373
|
var y;
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
) : Xo(
|
|
1383
|
-
e.value =
|
|
1384
|
-
cx: (
|
|
1385
|
-
cy: (
|
|
1374
|
+
const r = ((y = a == null ? void 0 : a.value) == null ? void 0 : y.length) ?? 0, f = i != null && i.value && Dt[i.value] ? Dt[i.value](
|
|
1375
|
+
m,
|
|
1376
|
+
r
|
|
1377
|
+
) : Xo(m, r);
|
|
1378
|
+
e.value = f.map((p, b) => ({
|
|
1379
|
+
cx: (u == null ? void 0 : u.value) === H.HORIZONTAL ? t.value(p) : tt(t.value, b),
|
|
1380
|
+
cy: (u == null ? void 0 : u.value) === H.HORIZONTAL ? tt(o.value, b) : o.value(p)
|
|
1386
1381
|
}));
|
|
1387
1382
|
}
|
|
1388
1383
|
return X(
|
|
@@ -1406,12 +1401,12 @@ function Ko() {
|
|
|
1406
1401
|
}
|
|
1407
1402
|
function Jo(e) {
|
|
1408
1403
|
return { getTooltipItems: v(
|
|
1409
|
-
() => (t) => e.value.map(({ color: o, label: a, values:
|
|
1404
|
+
() => (t) => e.value.map(({ color: o, label: a, values: u }) => {
|
|
1410
1405
|
var l, i, c;
|
|
1411
1406
|
return {
|
|
1412
|
-
color: ((l =
|
|
1407
|
+
color: ((l = u[t]) == null ? void 0 : l.color) || o,
|
|
1413
1408
|
label: a,
|
|
1414
|
-
value: ((i =
|
|
1409
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((c = u[t]) == null ? void 0 : c.value) ?? Zt
|
|
1415
1410
|
};
|
|
1416
1411
|
})
|
|
1417
1412
|
) };
|
|
@@ -1445,7 +1440,7 @@ function ta(e, n) {
|
|
|
1445
1440
|
const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-section" }, aa = {
|
|
1446
1441
|
key: 0,
|
|
1447
1442
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1448
|
-
}, la = { class: "lume-chart__controls" },
|
|
1443
|
+
}, la = { class: "lume-chart__controls" }, ua = { class: "lume-chart__header-section" }, ra = {
|
|
1449
1444
|
key: 0,
|
|
1450
1445
|
class: "lume-chart__axis-title lume-axis-title lume-typography--caption"
|
|
1451
1446
|
}, ia = { key: 3 }, sa = ["r"], ca = {
|
|
@@ -1454,14 +1449,14 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1454
1449
|
}, da = /* @__PURE__ */ Z({
|
|
1455
1450
|
__name: "lume-chart",
|
|
1456
1451
|
props: {
|
|
1457
|
-
...
|
|
1452
|
+
...we(),
|
|
1458
1453
|
chartType: {
|
|
1459
1454
|
type: String,
|
|
1460
1455
|
default: null
|
|
1461
1456
|
}
|
|
1462
1457
|
},
|
|
1463
1458
|
setup(e, { emit: n }) {
|
|
1464
|
-
const t = e, o =
|
|
1459
|
+
const t = e, o = ue(), a = n, { data: u, labels: l, color: i, options: c, orientation: s, chartType: m } = ee(t), r = S(-1), f = S(null), y = S(null), p = S([]), b = S(null), $ = S(0), L = S(0), { allOptions: g } = fe(c), { internalData: O, computedLabels: N, containerSize: D, updateSize: P, chartID: w } = ht(u, l, i, g, s), { xScale: B, yScale: U } = mo(
|
|
1465
1460
|
O,
|
|
1466
1461
|
N,
|
|
1467
1462
|
D,
|
|
@@ -1474,17 +1469,17 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1474
1469
|
left: ta(g.value.margins, L.value)
|
|
1475
1470
|
})), J = v(() => {
|
|
1476
1471
|
var A;
|
|
1477
|
-
return t.xScale ?
|
|
1472
|
+
return t.xScale ? wt(t.xScale) ? t.xScale : (A = t.xScale) == null ? void 0 : A.call(t, O.value, l.value, D) : B.value;
|
|
1478
1473
|
}), C = v(() => {
|
|
1479
1474
|
var A;
|
|
1480
|
-
return t.yScale ?
|
|
1475
|
+
return t.yScale ? wt(t.yScale) ? t.yScale : (A = t.yScale) == null ? void 0 : A.call(t, O.value, l.value, D) : U.value;
|
|
1481
1476
|
}), ae = v(() => ({
|
|
1482
1477
|
...g.value.xAxisOptions,
|
|
1483
1478
|
withHover: s.value === H.VERTICAL
|
|
1484
1479
|
})), Ne = v(() => ({
|
|
1485
1480
|
...g.value.yAxisOptions,
|
|
1486
1481
|
withHover: s.value === H.HORIZONTAL
|
|
1487
|
-
})),
|
|
1482
|
+
})), me = v(() => {
|
|
1488
1483
|
var A;
|
|
1489
1484
|
return (A = g.value.xAxisOptions) == null ? void 0 : A.title;
|
|
1490
1485
|
}), Te = v(() => {
|
|
@@ -1492,15 +1487,15 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1492
1487
|
return (A = g.value.yAxisOptions) == null ? void 0 : A.title;
|
|
1493
1488
|
}), Le = v(() => {
|
|
1494
1489
|
var A;
|
|
1495
|
-
return ((A = g.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 &&
|
|
1490
|
+
return ((A = g.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 && me.value;
|
|
1496
1491
|
}), k = v(() => {
|
|
1497
1492
|
var A;
|
|
1498
1493
|
return ((A = g.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 && Te.value;
|
|
1499
1494
|
}), E = v(
|
|
1500
|
-
() =>
|
|
1495
|
+
() => u.value.every((A) => !A.values.length) || u.value.every((A) => A.values.every((T) => T === null))
|
|
1501
1496
|
), h = v(() => {
|
|
1502
1497
|
const A = [], { noBaseScales: T } = g.value;
|
|
1503
|
-
return T || A.push(() => !!(J.value && C.value)), A.every((
|
|
1498
|
+
return T || A.push(() => !!(J.value && C.value)), A.every((x) => x() === !0);
|
|
1504
1499
|
}), { hasNegativeValues: R } = Zo(O), { negativeBarAttributes: F } = Uo(
|
|
1505
1500
|
D,
|
|
1506
1501
|
J,
|
|
@@ -1514,7 +1509,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1514
1509
|
l,
|
|
1515
1510
|
s,
|
|
1516
1511
|
O,
|
|
1517
|
-
|
|
1512
|
+
m
|
|
1518
1513
|
), { tooltipConfig: De, showTooltip: Ze, hideTooltip: Ue } = Ko(), { getTooltipItems: $e } = Jo(O), He = v(
|
|
1519
1514
|
() => {
|
|
1520
1515
|
var A;
|
|
@@ -1526,43 +1521,43 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1526
1521
|
return De.opened && (!A || A && b.value === !1);
|
|
1527
1522
|
});
|
|
1528
1523
|
function je(A) {
|
|
1529
|
-
var
|
|
1530
|
-
if (g.value.withHover === !1 || A ===
|
|
1531
|
-
const T =
|
|
1532
|
-
if (
|
|
1533
|
-
const Ye = (
|
|
1524
|
+
var x;
|
|
1525
|
+
if (g.value.withHover === !1 || A === r.value) return;
|
|
1526
|
+
const T = r.value;
|
|
1527
|
+
if (r.value = A, g.value.withTooltip !== !1) {
|
|
1528
|
+
const Ye = (x = g.value.tooltipOptions) != null && x.targetElement ? g.value.tooltipOptions.targetElement === "self" ? y.value.$el : g.value.tooltipOptions.targetElement : f.value[A];
|
|
1534
1529
|
Ze(Ye);
|
|
1535
1530
|
}
|
|
1536
1531
|
a("hovered-index-changed", { newIndex: A, oldIndex: T }), a("update:hoveredIndex", A);
|
|
1537
1532
|
}
|
|
1538
1533
|
function Xe() {
|
|
1539
|
-
Ue(),
|
|
1534
|
+
Ue(), r.value = -1, a("update:hoveredIndex", -1);
|
|
1540
1535
|
}
|
|
1541
1536
|
function _t(A) {
|
|
1542
|
-
if (!
|
|
1543
|
-
({ values:
|
|
1537
|
+
if (!u.value.some(
|
|
1538
|
+
({ values: x }) => A <= x.length - 1
|
|
1544
1539
|
)) {
|
|
1545
1540
|
ge(ve.InvalidHoveredIndex);
|
|
1546
1541
|
return;
|
|
1547
1542
|
}
|
|
1548
1543
|
A == null || A === -1 ? Xe() : je(A);
|
|
1549
1544
|
}
|
|
1550
|
-
function
|
|
1545
|
+
function un() {
|
|
1551
1546
|
setTimeout(() => {
|
|
1552
1547
|
Oe.value && Xe(), a("chart-mouseleave");
|
|
1553
1548
|
}, 0);
|
|
1554
1549
|
}
|
|
1555
|
-
function
|
|
1550
|
+
function rn(A) {
|
|
1556
1551
|
P(A), a("resize", A);
|
|
1557
1552
|
}
|
|
1558
|
-
function kt({ index: A, value: T, event:
|
|
1559
|
-
A !== null && je(A), a("axis-mouseenter", { index: A, value: T, event:
|
|
1553
|
+
function kt({ index: A, value: T, event: x }) {
|
|
1554
|
+
A !== null && je(A), a("axis-mouseenter", { index: A, value: T, event: x });
|
|
1560
1555
|
}
|
|
1561
|
-
function bt({ index: A, value: T, event:
|
|
1562
|
-
a("axis-click", { index: A, value: T, event:
|
|
1556
|
+
function bt({ index: A, value: T, event: x }) {
|
|
1557
|
+
a("axis-click", { index: A, value: T, event: x });
|
|
1563
1558
|
}
|
|
1564
1559
|
return X(
|
|
1565
|
-
|
|
1560
|
+
u,
|
|
1566
1561
|
(A, T) => a("data-changed", { newValue: A, oldValue: T })
|
|
1567
1562
|
), X(
|
|
1568
1563
|
l,
|
|
@@ -1570,15 +1565,15 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1570
1565
|
), X(E, (A) => A && ge(ve.Empty), { immediate: !0 }), X(() => t.hoveredIndex, _t), X(
|
|
1571
1566
|
p,
|
|
1572
1567
|
(A) => {
|
|
1573
|
-
A && t.hoveredIndex != null &&
|
|
1568
|
+
A && t.hoveredIndex != null && r.value === -1 && _t(t.hoveredIndex);
|
|
1574
1569
|
},
|
|
1575
1570
|
{ flush: "post" }
|
|
1576
1571
|
), X(b, (A) => {
|
|
1577
1572
|
A === !1 && De.opened && Xe();
|
|
1578
1573
|
}), ye(async () => {
|
|
1579
1574
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1580
|
-
}), Ke("chartID",
|
|
1581
|
-
id: `lume-chart_${d(
|
|
1575
|
+
}), Ke("chartID", w), Ke("isEmpty", E), Ke("tooltipAnchorAttributes", p), (A, T) => (_(), Y(d(ko), {
|
|
1576
|
+
id: `lume-chart_${d(w)}`,
|
|
1582
1577
|
ref_key: "chartContainer",
|
|
1583
1578
|
ref: y,
|
|
1584
1579
|
margins: K.value,
|
|
@@ -1587,10 +1582,10 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1587
1582
|
"transparent-background": d(g).transparentBackground,
|
|
1588
1583
|
orientation: d(s),
|
|
1589
1584
|
"data-j-lume-chart": "",
|
|
1590
|
-
onResize:
|
|
1591
|
-
onClick: T[24] || (T[24] = (
|
|
1592
|
-
onMouseenter: T[25] || (T[25] = (
|
|
1593
|
-
onMouseleave:
|
|
1585
|
+
onResize: rn,
|
|
1586
|
+
onClick: T[24] || (T[24] = (x) => a("chart-click", x)),
|
|
1587
|
+
onMouseenter: T[25] || (T[25] = (x) => a("chart-mouseenter", x)),
|
|
1588
|
+
onMouseleave: un
|
|
1594
1589
|
}, {
|
|
1595
1590
|
header: V(() => [
|
|
1596
1591
|
G("div", na, [
|
|
@@ -1600,70 +1595,70 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1600
1595
|
M(A.$slots, "controls", {}, void 0, !0)
|
|
1601
1596
|
])
|
|
1602
1597
|
]),
|
|
1603
|
-
G("div",
|
|
1604
|
-
k.value ? (_(), I("h3",
|
|
1598
|
+
G("div", ua, [
|
|
1599
|
+
k.value ? (_(), I("h3", ra, ne(Te.value), 1)) : z("", !0),
|
|
1605
1600
|
M(A.$slots, "legend", { data: d(O) }, () => [
|
|
1606
1601
|
d(g).withLegend !== !1 && d(g).legendPosition !== "bottom" ? (_(), Y(d(Nt), {
|
|
1607
1602
|
key: 0,
|
|
1608
1603
|
data: d(O),
|
|
1609
1604
|
class: "lume-chart__legend",
|
|
1610
1605
|
"data-j-lume-chart__legend": "",
|
|
1611
|
-
onClick: T[0] || (T[0] = (
|
|
1612
|
-
onMouseenter: T[1] || (T[1] = (
|
|
1613
|
-
onMouseleave: T[2] || (T[2] = (
|
|
1606
|
+
onClick: T[0] || (T[0] = (x) => a("legend-click", x)),
|
|
1607
|
+
onMouseenter: T[1] || (T[1] = (x) => a("legend-mouseenter", x)),
|
|
1608
|
+
onMouseleave: T[2] || (T[2] = (x) => a("legend-mouseleave"))
|
|
1614
1609
|
}, null, 8, ["data"])) : z("", !0)
|
|
1615
1610
|
], !0)
|
|
1616
1611
|
])
|
|
1617
1612
|
])
|
|
1618
1613
|
]),
|
|
1619
1614
|
footer: V(() => [
|
|
1620
|
-
Le.value ? (_(), I("h3", ca, ne(
|
|
1615
|
+
Le.value ? (_(), I("h3", ca, ne(me.value), 1)) : z("", !0),
|
|
1621
1616
|
d(g).withLegend !== !1 && d(g).legendPosition == "bottom" ? (_(), Y(d(Nt), {
|
|
1622
1617
|
key: 1,
|
|
1623
1618
|
data: d(O),
|
|
1624
1619
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1625
1620
|
"data-j-lume-chart__legend": "",
|
|
1626
|
-
onClick: T[16] || (T[16] = (
|
|
1627
|
-
onMouseenter: T[17] || (T[17] = (
|
|
1628
|
-
onMouseleave: T[18] || (T[18] = (
|
|
1621
|
+
onClick: T[16] || (T[16] = (x) => a("legend-click", x)),
|
|
1622
|
+
onMouseenter: T[17] || (T[17] = (x) => a("legend-mouseenter", x)),
|
|
1623
|
+
onMouseleave: T[18] || (T[18] = (x) => a("legend-mouseleave"))
|
|
1629
1624
|
}, null, 8, ["data"])) : z("", !0)
|
|
1630
1625
|
]),
|
|
1631
1626
|
extra: V(() => [
|
|
1632
1627
|
M(A.$slots, "tooltip", j(d(De), {
|
|
1633
1628
|
data: d(O),
|
|
1634
1629
|
labels: d(N),
|
|
1635
|
-
title: d(N)[
|
|
1636
|
-
items: d($e)(
|
|
1630
|
+
title: d(N)[r.value],
|
|
1631
|
+
items: d($e)(r.value),
|
|
1637
1632
|
position: He.value,
|
|
1638
1633
|
withTooltip: d(g).withTooltip !== !1,
|
|
1639
|
-
hoveredIndex:
|
|
1634
|
+
hoveredIndex: r.value,
|
|
1640
1635
|
handleMouseEnter: () => b.value = !0,
|
|
1641
1636
|
handleMouseLeave: () => b.value = !1,
|
|
1642
1637
|
options: d(g).tooltipOptions
|
|
1643
1638
|
}), () => [
|
|
1644
1639
|
d(g).withTooltip !== !1 ? (_(), Y(d(Fo), j({ key: 0 }, d(De), {
|
|
1645
1640
|
position: He.value,
|
|
1646
|
-
title: d(N)[
|
|
1647
|
-
items: d($e)(
|
|
1641
|
+
title: d(N)[r.value],
|
|
1642
|
+
items: d($e)(r.value),
|
|
1648
1643
|
options: d(g).tooltipOptions,
|
|
1649
1644
|
"data-j-lume-chart__tooltip": "",
|
|
1650
|
-
onOpened: T[19] || (T[19] = (
|
|
1651
|
-
index:
|
|
1652
|
-
targetElement:
|
|
1645
|
+
onOpened: T[19] || (T[19] = (x) => a("tooltip-opened", {
|
|
1646
|
+
index: r.value,
|
|
1647
|
+
targetElement: x
|
|
1653
1648
|
})),
|
|
1654
|
-
onMoved: T[20] || (T[20] = (
|
|
1655
|
-
index:
|
|
1656
|
-
targetElement:
|
|
1649
|
+
onMoved: T[20] || (T[20] = (x) => a("tooltip-moved", {
|
|
1650
|
+
index: r.value,
|
|
1651
|
+
targetElement: x
|
|
1657
1652
|
})),
|
|
1658
|
-
onClosed: T[21] || (T[21] = (
|
|
1659
|
-
onTooltipMouseenter: T[22] || (T[22] = (
|
|
1660
|
-
onTooltipMouseleave: T[23] || (T[23] = (
|
|
1653
|
+
onClosed: T[21] || (T[21] = (x) => a("tooltip-closed")),
|
|
1654
|
+
onTooltipMouseenter: T[22] || (T[22] = (x) => b.value = !0),
|
|
1655
|
+
onTooltipMouseleave: T[23] || (T[23] = (x) => b.value = !1)
|
|
1661
1656
|
}), {
|
|
1662
1657
|
default: V(() => [
|
|
1663
1658
|
M(A.$slots, "tooltip-content", {
|
|
1664
1659
|
data: d(O),
|
|
1665
1660
|
labels: d(N),
|
|
1666
|
-
hoveredIndex:
|
|
1661
|
+
hoveredIndex: r.value
|
|
1667
1662
|
}, void 0, !0)
|
|
1668
1663
|
]),
|
|
1669
1664
|
_: 3
|
|
@@ -1683,33 +1678,33 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1683
1678
|
yScale: C.value,
|
|
1684
1679
|
containerSize: d(D),
|
|
1685
1680
|
options: d(g),
|
|
1686
|
-
hoveredIndex:
|
|
1681
|
+
hoveredIndex: r.value
|
|
1687
1682
|
}, () => [
|
|
1688
|
-
|
|
1683
|
+
re(d(Lt), {
|
|
1689
1684
|
type: "x",
|
|
1690
1685
|
scale: J.value,
|
|
1691
1686
|
"container-size": d(D),
|
|
1692
1687
|
options: ae.value,
|
|
1693
|
-
"hovered-index":
|
|
1688
|
+
"hovered-index": r.value,
|
|
1694
1689
|
orientation: d(s),
|
|
1695
1690
|
"data-j-lume-chart__x-axis": "",
|
|
1696
1691
|
onClick: bt,
|
|
1697
1692
|
onMouseenter: kt,
|
|
1698
|
-
onMouseleave: T[3] || (T[3] = (
|
|
1699
|
-
"onLume__internal-AxisSize": T[4] || (T[4] = (
|
|
1693
|
+
onMouseleave: T[3] || (T[3] = (x) => a("axis-mouseleave")),
|
|
1694
|
+
"onLume__internal-AxisSize": T[4] || (T[4] = (x) => $.value = x)
|
|
1700
1695
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1701
|
-
|
|
1696
|
+
re(d(Lt), {
|
|
1702
1697
|
type: "y",
|
|
1703
1698
|
scale: C.value,
|
|
1704
1699
|
"container-size": d(D),
|
|
1705
1700
|
options: Ne.value,
|
|
1706
|
-
"hovered-index":
|
|
1701
|
+
"hovered-index": r.value,
|
|
1707
1702
|
orientation: d(s),
|
|
1708
1703
|
"data-j-lume-chart__y-axis": "",
|
|
1709
1704
|
onClick: bt,
|
|
1710
1705
|
onMouseenter: kt,
|
|
1711
|
-
onMouseleave: T[5] || (T[5] = (
|
|
1712
|
-
"onLume__internal-AxisSize": T[6] || (T[6] = (
|
|
1706
|
+
onMouseleave: T[5] || (T[5] = (x) => a("axis-mouseleave")),
|
|
1707
|
+
"onLume__internal-AxisSize": T[6] || (T[6] = (x) => L.value = x)
|
|
1713
1708
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1714
1709
|
], !0) : z("", !0),
|
|
1715
1710
|
d(g).withHover !== !1 ? (_(), Y(d(Wo), {
|
|
@@ -1722,10 +1717,10 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1722
1717
|
"onLume__internal-Hover": je
|
|
1723
1718
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1724
1719
|
d(le) ? (_(), I("g", ia, [
|
|
1725
|
-
(_(!0), I(Q, null, W(p.value, (
|
|
1720
|
+
(_(!0), I(Q, null, W(p.value, (x, Ye) => (_(), I("circle", j(x, {
|
|
1726
1721
|
ref_for: !0,
|
|
1727
1722
|
ref_key: "tooltipAnchor",
|
|
1728
|
-
ref:
|
|
1723
|
+
ref: f,
|
|
1729
1724
|
key: `anchor_${Ye}`,
|
|
1730
1725
|
r: d(jn),
|
|
1731
1726
|
class: "lume-fill--transparent"
|
|
@@ -1738,19 +1733,19 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1738
1733
|
orientation: d(s),
|
|
1739
1734
|
xScale: J.value,
|
|
1740
1735
|
yScale: C.value,
|
|
1741
|
-
hoveredIndex:
|
|
1736
|
+
hoveredIndex: r.value,
|
|
1742
1737
|
containerSize: d(D),
|
|
1743
1738
|
transition: d(g).withTransition !== !1,
|
|
1744
1739
|
classList: A.classList,
|
|
1745
|
-
onNodeClick: T[7] || (T[7] = (
|
|
1746
|
-
onNodeMouseenter: T[8] || (T[8] = (
|
|
1747
|
-
onNodeMouseleave: T[9] || (T[9] = (
|
|
1748
|
-
onLinkClick: T[10] || (T[10] = (
|
|
1749
|
-
onLinkMouseenter: T[11] || (T[11] = (
|
|
1750
|
-
onLinkMouseleave: T[12] || (T[12] = (
|
|
1751
|
-
onBarClick: T[13] || (T[13] = (
|
|
1752
|
-
onLineClick: T[14] || (T[14] = (
|
|
1753
|
-
onPointClick: T[15] || (T[15] = (
|
|
1740
|
+
onNodeClick: T[7] || (T[7] = (x) => a("node-click", x)),
|
|
1741
|
+
onNodeMouseenter: T[8] || (T[8] = (x) => a("node-mouseenter", x)),
|
|
1742
|
+
onNodeMouseleave: T[9] || (T[9] = (x) => a("node-mouseleave", x)),
|
|
1743
|
+
onLinkClick: T[10] || (T[10] = (x) => a("link-click", x)),
|
|
1744
|
+
onLinkMouseenter: T[11] || (T[11] = (x) => a("link-mouseenter", x)),
|
|
1745
|
+
onLinkMouseleave: T[12] || (T[12] = (x) => a("link-mouseleave", x)),
|
|
1746
|
+
onBarClick: T[13] || (T[13] = (x) => a("bar-click", x)),
|
|
1747
|
+
onLineClick: T[14] || (T[14] = (x) => a("line-click", x)),
|
|
1748
|
+
onPointClick: T[15] || (T[15] = (x) => a("point-click", x)),
|
|
1754
1749
|
"onLume__internal-Hover": je
|
|
1755
1750
|
}, void 0, !0)
|
|
1756
1751
|
], 64)) : z("", !0)
|
|
@@ -1758,7 +1753,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1758
1753
|
_: 3
|
|
1759
1754
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "orientation"]));
|
|
1760
1755
|
}
|
|
1761
|
-
}), Ee = /* @__PURE__ */ q(da, [["__scopeId", "data-v-5aa3d9ab"]]), Ht = 8, va = 8,
|
|
1756
|
+
}), Ee = /* @__PURE__ */ q(da, [["__scopeId", "data-v-5aa3d9ab"]]), Ht = 8, va = 8, fa = 20, xe = 2, Bt = 2, ma = ["dy", "dominant-baseline"], pa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
|
|
1762
1757
|
__name: "lume-alluvial-node-label",
|
|
1763
1758
|
props: {
|
|
1764
1759
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1767,25 +1762,25 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1767
1762
|
},
|
|
1768
1763
|
emits: ["lume__internal--node-resize"],
|
|
1769
1764
|
setup(e, { emit: n }) {
|
|
1770
|
-
const t = e, o = n, a = S(null),
|
|
1765
|
+
const t = e, o = n, a = S(null), u = S(t.maxWidth), l = S(1);
|
|
1771
1766
|
return X(
|
|
1772
1767
|
[a, () => t.maxWidth],
|
|
1773
1768
|
async ([i, c]) => {
|
|
1774
1769
|
if (i && c) {
|
|
1775
|
-
|
|
1776
|
-
const { width: s, height:
|
|
1777
|
-
|
|
1770
|
+
u.value = c, await Qe();
|
|
1771
|
+
const { width: s, height: m } = i.getBoundingClientRect();
|
|
1772
|
+
u.value = s + Bt > c ? c : s + Bt, l.value = Math.ceil(m);
|
|
1778
1773
|
}
|
|
1779
1774
|
},
|
|
1780
1775
|
{ immediate: !0 }
|
|
1781
|
-
), X(
|
|
1776
|
+
), X(u, async (i) => {
|
|
1782
1777
|
i !== t.maxWidth && (await Qe(), o("lume__internal--node-resize"));
|
|
1783
1778
|
}), (i, c) => e.maxWidth ? (_(), I("foreignObject", {
|
|
1784
1779
|
key: 1,
|
|
1785
1780
|
class: "lume-alluvial-group__node-foreign",
|
|
1786
1781
|
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
1787
|
-
x: e.left ? -
|
|
1788
|
-
width:
|
|
1782
|
+
x: e.left ? -u.value : 0,
|
|
1783
|
+
width: u.value,
|
|
1789
1784
|
height: l.value
|
|
1790
1785
|
}, [
|
|
1791
1786
|
G("div", ha, [
|
|
@@ -1804,7 +1799,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1804
1799
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1805
1800
|
}, [
|
|
1806
1801
|
M(i.$slots, "default", {}, void 0, !0)
|
|
1807
|
-
], 8,
|
|
1802
|
+
], 8, ma));
|
|
1808
1803
|
}
|
|
1809
1804
|
}), ya = /* @__PURE__ */ q(ga, [["__scopeId", "data-v-7126dfdb"]]), _a = ["y", "dominant-baseline"], ka = /* @__PURE__ */ Z({
|
|
1810
1805
|
__name: "lume-alluvial-node-value",
|
|
@@ -1832,7 +1827,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1832
1827
|
), o = v(
|
|
1833
1828
|
() => n.value && `translate(${n.value.getBBox().width / 2}, 0)`
|
|
1834
1829
|
);
|
|
1835
|
-
return (a,
|
|
1830
|
+
return (a, u) => (_(), I("g", {
|
|
1836
1831
|
transform: `translate(${e.x}, ${e.y})`
|
|
1837
1832
|
}, [
|
|
1838
1833
|
G("g", { transform: t.value }, [
|
|
@@ -1867,11 +1862,11 @@ function Ia(e) {
|
|
|
1867
1862
|
return { extents: n, updateExtents: t };
|
|
1868
1863
|
}
|
|
1869
1864
|
var Pe = /* @__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))(Pe || {});
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1872
|
-
t && Ct() || console.error(
|
|
1865
|
+
const xa = "[lume] ";
|
|
1866
|
+
function ut(e, n, t = !0) {
|
|
1867
|
+
t && Ct() || console.error(xa + "Error: " + e, n);
|
|
1873
1868
|
}
|
|
1874
|
-
const
|
|
1869
|
+
const wa = 200;
|
|
1875
1870
|
function Ie(e) {
|
|
1876
1871
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1877
1872
|
}
|
|
@@ -1889,26 +1884,26 @@ function Da(e, n) {
|
|
|
1889
1884
|
const t = e.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), o = e.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = n.filter((l) => t.includes(l.dataset.id)).reduce(
|
|
1890
1885
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1891
1886
|
-1 / 0
|
|
1892
|
-
),
|
|
1887
|
+
), u = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1893
1888
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1894
1889
|
-1 / 0
|
|
1895
1890
|
);
|
|
1896
1891
|
return {
|
|
1897
1892
|
left: a,
|
|
1898
1893
|
top: 0,
|
|
1899
|
-
right:
|
|
1894
|
+
right: u,
|
|
1900
1895
|
bottom: 0
|
|
1901
1896
|
};
|
|
1902
1897
|
}
|
|
1903
1898
|
function Ha(e) {
|
|
1904
1899
|
return e.map((n) => {
|
|
1905
|
-
const t = n.y1 - n.y0 <
|
|
1900
|
+
const t = n.y1 - n.y0 < xe;
|
|
1906
1901
|
return {
|
|
1907
1902
|
x: n.x0,
|
|
1908
|
-
y: n.y0 - (t ?
|
|
1903
|
+
y: n.y0 - (t ? xe / 2 : 0),
|
|
1909
1904
|
// Negative offset to account for the min. height
|
|
1910
1905
|
width: n.x1 - n.x0,
|
|
1911
|
-
height: t ?
|
|
1906
|
+
height: t ? xe : n.y1 - n.y0,
|
|
1912
1907
|
textTransform: {
|
|
1913
1908
|
x: n.depth > 0 ? n.x1 + Ht : n.x0 - Ht,
|
|
1914
1909
|
y: (n.y1 + n.y0) / 2
|
|
@@ -1946,8 +1941,8 @@ function Rt(e, n, t, o, a) {
|
|
|
1946
1941
|
};
|
|
1947
1942
|
return;
|
|
1948
1943
|
}
|
|
1949
|
-
const
|
|
1950
|
-
let s = (Date.now() -
|
|
1944
|
+
const u = Date.now(), l = Nn(n, t), i = () => {
|
|
1945
|
+
let s = (Date.now() - u) / wa;
|
|
1951
1946
|
s > 1 && (s = 1), e.node = {
|
|
1952
1947
|
...e.node,
|
|
1953
1948
|
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
@@ -1964,8 +1959,8 @@ function St(e, n) {
|
|
|
1964
1959
|
}
|
|
1965
1960
|
function ja(e, n, t) {
|
|
1966
1961
|
const o = S(null), a = v(() => {
|
|
1967
|
-
var
|
|
1968
|
-
return (
|
|
1962
|
+
var r, f;
|
|
1963
|
+
return (f = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : f.values.map(
|
|
1969
1964
|
({ label: y, color: p, value: b, deriveColorFromIncomingLinks: $, offset: L }) => ({
|
|
1970
1965
|
label: y || b.toString(),
|
|
1971
1966
|
color: p,
|
|
@@ -1975,10 +1970,10 @@ function ja(e, n, t) {
|
|
|
1975
1970
|
offset: L
|
|
1976
1971
|
})
|
|
1977
1972
|
);
|
|
1978
|
-
}),
|
|
1973
|
+
}), u = v(
|
|
1979
1974
|
() => {
|
|
1980
|
-
var
|
|
1981
|
-
return (
|
|
1975
|
+
var r, f;
|
|
1976
|
+
return (f = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : f.values.map(
|
|
1982
1977
|
(y) => {
|
|
1983
1978
|
var p;
|
|
1984
1979
|
return (p = y.targets) == null ? void 0 : p.map(
|
|
@@ -1994,51 +1989,51 @@ function ja(e, n, t) {
|
|
|
1994
1989
|
}
|
|
1995
1990
|
).filter(Boolean).flat();
|
|
1996
1991
|
}
|
|
1997
|
-
), l = v(() =>
|
|
1998
|
-
var
|
|
1999
|
-
return (
|
|
2000
|
-
(
|
|
2001
|
-
const p = St(y,
|
|
2002
|
-
return p ? (p.push(y), p.sort((b, $) => (b._y0 || b.y0) - ($._y0 || $.y0))) :
|
|
1992
|
+
), l = v(() => fn().nodeId(Ie).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1993
|
+
var r;
|
|
1994
|
+
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1995
|
+
(f, y) => {
|
|
1996
|
+
const p = St(y, f);
|
|
1997
|
+
return p ? (p.push(y), p.sort((b, $) => (b._y0 || b.y0) - ($._y0 || $.y0))) : f.push([y]), f;
|
|
2003
1998
|
},
|
|
2004
1999
|
[]
|
|
2005
2000
|
);
|
|
2006
2001
|
});
|
|
2007
|
-
function c(
|
|
2008
|
-
const { offset:
|
|
2002
|
+
function c(r) {
|
|
2003
|
+
const { offset: f } = r, y = St(r, i.value);
|
|
2009
2004
|
if (!y) return;
|
|
2010
|
-
const p = y[y.findIndex(($) => $.id ===
|
|
2011
|
-
|
|
2005
|
+
const p = y[y.findIndex(($) => $.id === r.id) - 1], b = p && y.length !== 1 ? p.y1 + f : f;
|
|
2006
|
+
r._y0 = r.y0, r._y1 = r.y1, r.y0 = b, r.y1 = r.y0 + (r._y1 - r._y0);
|
|
2012
2007
|
}
|
|
2013
|
-
function s(
|
|
2014
|
-
const { id: y, _y0: p, y0: b } =
|
|
2008
|
+
function s(r, f) {
|
|
2009
|
+
const { id: y, _y0: p, y0: b } = r, $ = f.links.filter(
|
|
2015
2010
|
(O) => O.source.id === y
|
|
2016
|
-
), L =
|
|
2011
|
+
), L = f.links.filter(
|
|
2017
2012
|
(O) => O.target.id === y
|
|
2018
2013
|
), g = b - p;
|
|
2019
2014
|
$.forEach((O) => O.y0 += g), L.forEach((O) => O.y1 += g);
|
|
2020
2015
|
}
|
|
2021
|
-
const
|
|
2022
|
-
var
|
|
2023
|
-
return o.value && ((
|
|
2024
|
-
|
|
2016
|
+
const m = v(() => {
|
|
2017
|
+
var r;
|
|
2018
|
+
return o.value && ((r = a.value) == null || r.forEach((f) => {
|
|
2019
|
+
f.value === 0 && (f.fallbackColor = ft.Grey), typeof f.offset == "number" && (c(f), s(f, o.value));
|
|
2025
2020
|
})), o.value;
|
|
2026
2021
|
});
|
|
2027
2022
|
return X([l, t], () => {
|
|
2028
2023
|
try {
|
|
2029
|
-
const { x0:
|
|
2024
|
+
const { x0: r, y0: f, x1: y, y1: p } = t.value;
|
|
2030
2025
|
o.value = l.value.extent([
|
|
2031
|
-
[
|
|
2026
|
+
[r, f],
|
|
2032
2027
|
[y, p]
|
|
2033
|
-
])({ nodes: a.value, links:
|
|
2034
|
-
} catch (
|
|
2035
|
-
|
|
2028
|
+
])({ nodes: a.value, links: u.value });
|
|
2029
|
+
} catch (r) {
|
|
2030
|
+
ut(Pe.GraphProblem, r), o.value = Ga;
|
|
2036
2031
|
}
|
|
2037
|
-
}), { columns: i, graph:
|
|
2032
|
+
}), { columns: i, graph: m };
|
|
2038
2033
|
}
|
|
2039
|
-
function
|
|
2034
|
+
function rt(e, n) {
|
|
2040
2035
|
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
2041
|
-
n[t.id] = o,
|
|
2036
|
+
n[t.id] = o, rt(
|
|
2042
2037
|
t,
|
|
2043
2038
|
n
|
|
2044
2039
|
);
|
|
@@ -2059,12 +2054,12 @@ const Pa = (e, n) => {
|
|
|
2059
2054
|
let t;
|
|
2060
2055
|
tn(e) ? t = {
|
|
2061
2056
|
[e.id]: e.value,
|
|
2062
|
-
...
|
|
2057
|
+
...rt(e),
|
|
2063
2058
|
...it(e)
|
|
2064
2059
|
} : t = {
|
|
2065
2060
|
[e.source.id]: e.source.value,
|
|
2066
2061
|
[e.target.id]: e.target.value,
|
|
2067
|
-
...
|
|
2062
|
+
...rt(e.source),
|
|
2068
2063
|
...it(e.target)
|
|
2069
2064
|
};
|
|
2070
2065
|
const o = Va(t, n);
|
|
@@ -2074,7 +2069,7 @@ const Pa = (e, n) => {
|
|
|
2074
2069
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2075
2070
|
return {
|
|
2076
2071
|
nodes: n.reduce(
|
|
2077
|
-
(t, { source: o, target: a, value:
|
|
2072
|
+
(t, { source: o, target: a, value: u }) => o === e ? { ...t, [Ie(a)]: u } : { ...t, [Ie(o)]: u },
|
|
2078
2073
|
{ [Ie(e)]: e.value }
|
|
2079
2074
|
),
|
|
2080
2075
|
links: n.map(({ id: t }) => t)
|
|
@@ -2093,8 +2088,8 @@ function Fa(e, n, t) {
|
|
|
2093
2088
|
o.value,
|
|
2094
2089
|
t.value
|
|
2095
2090
|
) : n.value.highlightedElements === "closest" ? Ca(o.value, t.value) : Pa(o.value, t.value) : { nodes: {}, links: [] });
|
|
2096
|
-
return X(a, (
|
|
2097
|
-
if (
|
|
2091
|
+
return X(a, (u, l) => {
|
|
2092
|
+
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2098
2093
|
e.value.forEach((i) => {
|
|
2099
2094
|
i.node.id in l.nodes && Rt(
|
|
2100
2095
|
i,
|
|
@@ -2107,10 +2102,10 @@ function Fa(e, n, t) {
|
|
|
2107
2102
|
return;
|
|
2108
2103
|
}
|
|
2109
2104
|
e.value.forEach((i) => {
|
|
2110
|
-
i.node.id in
|
|
2105
|
+
i.node.id in u.nodes && Rt(
|
|
2111
2106
|
i,
|
|
2112
2107
|
i.node.value,
|
|
2113
|
-
|
|
2108
|
+
u.nodes[i.node.id],
|
|
2114
2109
|
n.value.withTransition
|
|
2115
2110
|
);
|
|
2116
2111
|
});
|
|
@@ -2130,13 +2125,13 @@ const za = {
|
|
|
2130
2125
|
},
|
|
2131
2126
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2132
2127
|
setup(e, { emit: n }) {
|
|
2133
|
-
const t = e, o = n, a = Ce("chartID"), { data:
|
|
2128
|
+
const t = e, o = n, a = Ce("chartID"), { data: u, options: l } = ee(t), i = S([]), c = S([]), s = S(null), { extents: m, updateExtents: r } = Ia(t.containerSize), { columns: f, graph: y } = ja(u, l, m), { hoveredElement: p, highlightedElements: b } = Fa(
|
|
2134
2129
|
i,
|
|
2135
2130
|
l,
|
|
2136
2131
|
y
|
|
2137
2132
|
), $ = v(() => Ve(l.value.valueFormat)), L = v(
|
|
2138
2133
|
() => Object.keys(b.value.nodes)
|
|
2139
|
-
), g = v(() =>
|
|
2134
|
+
), g = v(() => f.value ? f.value.map(
|
|
2140
2135
|
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2141
2136
|
) : []), O = v(() => {
|
|
2142
2137
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
@@ -2145,7 +2140,7 @@ const za = {
|
|
|
2145
2140
|
x: g.value[E]
|
|
2146
2141
|
}));
|
|
2147
2142
|
}), N = v(
|
|
2148
|
-
() => l.value.nodeHeaderPadding ??
|
|
2143
|
+
() => l.value.nodeHeaderPadding ?? fa
|
|
2149
2144
|
), D = v(() => {
|
|
2150
2145
|
if (!(!l.value.gradient || !y.value))
|
|
2151
2146
|
return y.value.links.reduce((k, E) => {
|
|
@@ -2164,9 +2159,9 @@ const za = {
|
|
|
2164
2159
|
return k.forEach((h) => {
|
|
2165
2160
|
const R = [];
|
|
2166
2161
|
c.value.filter(({ link: F }) => F.target.id === h.node.id).reverse().reduce((F, le, De, Ze) => {
|
|
2167
|
-
const Ue = le.link.target.y1 - le.link.target.y0 >
|
|
2162
|
+
const Ue = le.link.target.y1 - le.link.target.y0 > xe;
|
|
2168
2163
|
let $e, He, Oe;
|
|
2169
|
-
return Ue ? ($e = le.link.target.y1 - le.link.target.y0, He = le.link.value / h.node.value, Oe = He * $e) : ($e =
|
|
2164
|
+
return Ue ? ($e = le.link.target.y1 - le.link.target.y0, He = le.link.value / h.node.value, Oe = He * $e) : ($e = xe, Oe = xe / Ze.length), R.push({
|
|
2170
2165
|
x: h.x,
|
|
2171
2166
|
y: h.y + F,
|
|
2172
2167
|
height: Oe,
|
|
@@ -2180,7 +2175,7 @@ const za = {
|
|
|
2180
2175
|
});
|
|
2181
2176
|
}), E;
|
|
2182
2177
|
});
|
|
2183
|
-
function
|
|
2178
|
+
function w(k) {
|
|
2184
2179
|
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2185
2180
|
}
|
|
2186
2181
|
function B(k) {
|
|
@@ -2205,7 +2200,7 @@ const za = {
|
|
|
2205
2200
|
const E = p.value;
|
|
2206
2201
|
p.value = null, o("link-mouseleave", { link: E, event: k });
|
|
2207
2202
|
}
|
|
2208
|
-
function
|
|
2203
|
+
function me(k) {
|
|
2209
2204
|
if (k == null) {
|
|
2210
2205
|
p.value = null;
|
|
2211
2206
|
return;
|
|
@@ -2223,13 +2218,13 @@ const za = {
|
|
|
2223
2218
|
}
|
|
2224
2219
|
function Le() {
|
|
2225
2220
|
const k = Da(y.value, s.value);
|
|
2226
|
-
|
|
2221
|
+
r(k);
|
|
2227
2222
|
}
|
|
2228
2223
|
return X(y, (k) => {
|
|
2229
|
-
i.value = Ha(k.nodes), c.value = Sa(k.links).reverse(), p.value == null && t.hoveredElementId != null &&
|
|
2224
|
+
i.value = Ha(k.nodes), c.value = Sa(k.links).reverse(), p.value == null && t.hoveredElementId != null && me(t.hoveredElementId);
|
|
2230
2225
|
}), X([t.containerSize, s], () => {
|
|
2231
2226
|
t.containerSize.width && t.containerSize.height && Le();
|
|
2232
|
-
}), X(() => t.hoveredElementId,
|
|
2227
|
+
}), X(() => t.hoveredElementId, me), (k, E) => (_(), I("g", za, [
|
|
2233
2228
|
O.value ? (_(), I("g", Wa, [
|
|
2234
2229
|
(_(!0), I(Q, null, W(O.value, (h, R) => M(k.$slots, `node-header-${R}`, {
|
|
2235
2230
|
x: h.x,
|
|
@@ -2289,7 +2284,7 @@ const za = {
|
|
|
2289
2284
|
"lume-alluvial-group__link--focused": J(h.id)
|
|
2290
2285
|
}]),
|
|
2291
2286
|
d: h.d,
|
|
2292
|
-
stroke:
|
|
2287
|
+
stroke: w(h.link),
|
|
2293
2288
|
"stroke-dasharray": k.containerSize.width,
|
|
2294
2289
|
"stroke-dashoffset": k.containerSize.width,
|
|
2295
2290
|
"stroke-width": h.strokeWidth,
|
|
@@ -2345,7 +2340,7 @@ const za = {
|
|
|
2345
2340
|
h.node.value
|
|
2346
2341
|
)
|
|
2347
2342
|
}, () => [
|
|
2348
|
-
|
|
2343
|
+
re(d(ya), {
|
|
2349
2344
|
bottom: d(l).switchText,
|
|
2350
2345
|
left: h.node.depth === 0,
|
|
2351
2346
|
"max-width": d(l).nodeLabelMaxWidth,
|
|
@@ -2356,7 +2351,7 @@ const za = {
|
|
|
2356
2351
|
]),
|
|
2357
2352
|
_: 2
|
|
2358
2353
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2359
|
-
|
|
2354
|
+
re(d(ba), {
|
|
2360
2355
|
bottom: !d(l).switchText
|
|
2361
2356
|
}, {
|
|
2362
2357
|
default: V(() => [
|
|
@@ -2389,7 +2384,7 @@ const za = {
|
|
|
2389
2384
|
highlightedElements: "closest",
|
|
2390
2385
|
nodePadding: 16,
|
|
2391
2386
|
nodeWidth: 16,
|
|
2392
|
-
nodeAlign:
|
|
2387
|
+
nodeAlign: mn,
|
|
2393
2388
|
valueFormat: (e) => String(e),
|
|
2394
2389
|
iterations: 6
|
|
2395
2390
|
}, Zl = /* @__PURE__ */ Z({
|
|
@@ -2398,7 +2393,7 @@ const za = {
|
|
|
2398
2393
|
...po(st)
|
|
2399
2394
|
},
|
|
2400
2395
|
setup(e, { emit: n }) {
|
|
2401
|
-
const t = e, { componentEventPropagator: o } = _e(), a = Ae(
|
|
2396
|
+
const t = e, { componentEventPropagator: o } = _e(), a = Ae(ue()), u = Hn(ue()), { options: l } = ee(t), { allOptions: i } = fe(l, ol);
|
|
2402
2397
|
function c(s) {
|
|
2403
2398
|
return {
|
|
2404
2399
|
...s,
|
|
@@ -2406,13 +2401,13 @@ const za = {
|
|
|
2406
2401
|
// Alluvial chart never uses base scales
|
|
2407
2402
|
};
|
|
2408
2403
|
}
|
|
2409
|
-
return (s,
|
|
2404
|
+
return (s, m) => (_(), Y(d(Ee), j({ ...t, ...s.$attrs }, {
|
|
2410
2405
|
options: c(d(i)),
|
|
2411
2406
|
"data-j-alluvial-diagram": ""
|
|
2412
2407
|
}, oe(d(o))), ce({
|
|
2413
|
-
groups: V((
|
|
2414
|
-
|
|
2415
|
-
W(d(
|
|
2408
|
+
groups: V((r) => [
|
|
2409
|
+
re(d(nl), j(r, { "hovered-element-id": s.hoveredElement }, oe(d(o))), ce({ _: 2 }, [
|
|
2410
|
+
W(d(u), (f, y) => ({
|
|
2416
2411
|
name: y,
|
|
2417
2412
|
fn: V((p) => [
|
|
2418
2413
|
M(s.$slots, y, pe(he(p || {})))
|
|
@@ -2422,10 +2417,10 @@ const za = {
|
|
|
2422
2417
|
]),
|
|
2423
2418
|
_: 2
|
|
2424
2419
|
}, [
|
|
2425
|
-
W(d(a), (
|
|
2426
|
-
name:
|
|
2420
|
+
W(d(a), (r, f) => ({
|
|
2421
|
+
name: f,
|
|
2427
2422
|
fn: V((y) => [
|
|
2428
|
-
M(s.$slots,
|
|
2423
|
+
M(s.$slots, f, pe(he(y || {})))
|
|
2429
2424
|
])
|
|
2430
2425
|
}))
|
|
2431
2426
|
]), 1040, ["options"]));
|
|
@@ -2435,7 +2430,7 @@ var nn = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked",
|
|
|
2435
2430
|
const Ul = /* @__PURE__ */ Z({
|
|
2436
2431
|
__name: "lume-bar-chart",
|
|
2437
2432
|
props: {
|
|
2438
|
-
...
|
|
2433
|
+
...we(),
|
|
2439
2434
|
type: {
|
|
2440
2435
|
type: String,
|
|
2441
2436
|
default: null,
|
|
@@ -2444,40 +2439,40 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2444
2439
|
},
|
|
2445
2440
|
setup(e, { emit: n }) {
|
|
2446
2441
|
const t = Je(
|
|
2447
|
-
() => import("./
|
|
2442
|
+
() => import("./DI0JiGP5.js")
|
|
2448
2443
|
), o = Je(
|
|
2449
|
-
() => import("./
|
|
2444
|
+
() => import("./DgbGPOnI.js")
|
|
2450
2445
|
), a = Je(
|
|
2451
|
-
() => import("./
|
|
2452
|
-
),
|
|
2446
|
+
() => import("./D3C1hTl9.js")
|
|
2447
|
+
), u = /* @__PURE__ */ new Map([
|
|
2453
2448
|
["single", t],
|
|
2454
2449
|
["grouped", o],
|
|
2455
2450
|
["stacked", a]
|
|
2456
|
-
]), l = e, { componentEventPropagator: i } = _e(), c = Ae(
|
|
2457
|
-
function s(
|
|
2451
|
+
]), l = e, { componentEventPropagator: i } = _e(), c = Ae(ue());
|
|
2452
|
+
function s(r) {
|
|
2458
2453
|
return {
|
|
2459
|
-
...
|
|
2454
|
+
...r,
|
|
2460
2455
|
startOnZero: !0,
|
|
2461
2456
|
// Bar chart always starts on zero,
|
|
2462
2457
|
tooltipOptions: {
|
|
2463
|
-
...(
|
|
2458
|
+
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2464
2459
|
position: l.orientation === H.HORIZONTAL ? "right" : void 0
|
|
2465
2460
|
}
|
|
2466
2461
|
};
|
|
2467
2462
|
}
|
|
2468
|
-
const
|
|
2469
|
-
if (st(l.data)) return
|
|
2463
|
+
const m = v(() => {
|
|
2464
|
+
if (st(l.data)) return u.get("single");
|
|
2470
2465
|
if (!l.type)
|
|
2471
2466
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2472
|
-
return
|
|
2467
|
+
return u.get(l.type);
|
|
2473
2468
|
});
|
|
2474
|
-
return (
|
|
2475
|
-
options: s(
|
|
2469
|
+
return (r, f) => (_(), Y(dn(m.value), j({ ...l, ...r.$attrs }, {
|
|
2470
|
+
options: s(r.options)
|
|
2476
2471
|
}, oe(d(i))), ce({ _: 2 }, [
|
|
2477
2472
|
W(d(c), (y, p) => ({
|
|
2478
2473
|
name: p,
|
|
2479
2474
|
fn: V((b) => [
|
|
2480
|
-
M(
|
|
2475
|
+
M(r.$slots, p, pe(he(b || {})))
|
|
2481
2476
|
])
|
|
2482
2477
|
}))
|
|
2483
2478
|
]), 1040, ["options"]));
|
|
@@ -2489,7 +2484,7 @@ function al(e) {
|
|
|
2489
2484
|
function ll(e) {
|
|
2490
2485
|
return Object.values(H).includes(e);
|
|
2491
2486
|
}
|
|
2492
|
-
const
|
|
2487
|
+
const ul = (e = !1) => ({
|
|
2493
2488
|
type: {
|
|
2494
2489
|
type: String,
|
|
2495
2490
|
default: null,
|
|
@@ -2505,12 +2500,12 @@ const rl = (e = !1) => ({
|
|
|
2505
2500
|
});
|
|
2506
2501
|
function on(e, n) {
|
|
2507
2502
|
const t = v(() => e.value.map((a) => {
|
|
2508
|
-
var
|
|
2503
|
+
var u;
|
|
2509
2504
|
return {
|
|
2510
2505
|
...a,
|
|
2511
2506
|
values: ct(
|
|
2512
2507
|
a.values,
|
|
2513
|
-
((
|
|
2508
|
+
((u = n == null ? void 0 : n.value) == null ? void 0 : u.length) ?? 0
|
|
2514
2509
|
).map((l) => ({
|
|
2515
2510
|
...l,
|
|
2516
2511
|
value: (l == null ? void 0 : l.value) || 0
|
|
@@ -2518,13 +2513,13 @@ function on(e, n) {
|
|
|
2518
2513
|
};
|
|
2519
2514
|
})), o = v(() => {
|
|
2520
2515
|
var a;
|
|
2521
|
-
return (a = t.value) == null ? void 0 : a.reduce((
|
|
2522
|
-
|
|
2523
|
-
}),
|
|
2516
|
+
return (a = t.value) == null ? void 0 : a.reduce((u, l) => (l.values.forEach((i, c) => {
|
|
2517
|
+
u[c] ? u[c].push(i) : u[c] = [i];
|
|
2518
|
+
}), u), []);
|
|
2524
2519
|
});
|
|
2525
2520
|
return { multiBarData: t, groupedData: o };
|
|
2526
2521
|
}
|
|
2527
|
-
function
|
|
2522
|
+
function rl(e, n) {
|
|
2528
2523
|
return e.value.length === 1 ? "single" : n.value;
|
|
2529
2524
|
}
|
|
2530
2525
|
function il(e, n, t) {
|
|
@@ -2532,10 +2527,10 @@ function il(e, n, t) {
|
|
|
2532
2527
|
() => t.value === H.HORIZONTAL
|
|
2533
2528
|
);
|
|
2534
2529
|
function a(i) {
|
|
2535
|
-
i ||
|
|
2530
|
+
i || ut(Pe.BarScaleNull), Math.min(...i.domain()) > 0 && ut(Pe.BarScaleDomainAbove0);
|
|
2536
2531
|
}
|
|
2537
|
-
const
|
|
2538
|
-
return { barXScale:
|
|
2532
|
+
const u = v(() => o.value ? (a(e.value), e.value) : e.value), l = v(() => o.value ? n.value : (a(n.value), n.value));
|
|
2533
|
+
return { barXScale: u, barYScale: l };
|
|
2539
2534
|
}
|
|
2540
2535
|
const sl = {
|
|
2541
2536
|
x: 0,
|
|
@@ -2543,25 +2538,25 @@ const sl = {
|
|
|
2543
2538
|
width: 0,
|
|
2544
2539
|
height: 0
|
|
2545
2540
|
};
|
|
2546
|
-
function cl(e, n, t, o, a,
|
|
2541
|
+
function cl(e, n, t, o, a, u) {
|
|
2547
2542
|
const l = v(
|
|
2548
2543
|
() => o.value === H.HORIZONTAL
|
|
2549
2544
|
);
|
|
2550
|
-
function i(
|
|
2545
|
+
function i(r, f) {
|
|
2551
2546
|
let y, p;
|
|
2552
|
-
return l.value ? (y =
|
|
2547
|
+
return l.value ? (y = r >= 0 ? n.value(0) : n.value(r), p = t.value(t.value.domain()[f])) : (y = n.value(n.value.domain()[f]), p = r < 0 ? t.value(0) : t.value(r)), { x: y, y: p };
|
|
2553
2548
|
}
|
|
2554
|
-
function c(
|
|
2555
|
-
return l.value ?
|
|
2549
|
+
function c(r) {
|
|
2550
|
+
return l.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
2556
2551
|
}
|
|
2557
|
-
function s(
|
|
2558
|
-
return l.value ? t.value.bandwidth() :
|
|
2552
|
+
function s(r) {
|
|
2553
|
+
return l.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2559
2554
|
}
|
|
2560
|
-
function
|
|
2555
|
+
function m(r, f, y) {
|
|
2561
2556
|
if (!(n.value && t.value)) return sl;
|
|
2562
|
-
const { value: b, color: $ } =
|
|
2557
|
+
const { value: b, color: $ } = r, L = $ ?? e.value[f].color ?? Ge, { x: g, y: O } = i(b, y), N = c(b), D = s(b);
|
|
2563
2558
|
return {
|
|
2564
|
-
classList: [`lume-fill--${L}`, ...
|
|
2559
|
+
classList: [`lume-fill--${L}`, ...u],
|
|
2565
2560
|
x: g,
|
|
2566
2561
|
y: O,
|
|
2567
2562
|
width: N,
|
|
@@ -2570,7 +2565,7 @@ function cl(e, n, t, o, a, r) {
|
|
|
2570
2565
|
isNegative: b < 0
|
|
2571
2566
|
};
|
|
2572
2567
|
}
|
|
2573
|
-
return { barAttributeGenerator:
|
|
2568
|
+
return { barAttributeGenerator: m };
|
|
2574
2569
|
}
|
|
2575
2570
|
const dl = {
|
|
2576
2571
|
x: 0,
|
|
@@ -2578,7 +2573,7 @@ const dl = {
|
|
|
2578
2573
|
width: 0,
|
|
2579
2574
|
height: 0
|
|
2580
2575
|
};
|
|
2581
|
-
function vl(e, n, t, o, a,
|
|
2576
|
+
function vl(e, n, t, o, a, u) {
|
|
2582
2577
|
const l = v(
|
|
2583
2578
|
() => o.value === H.HORIZONTAL
|
|
2584
2579
|
), i = v(() => Be().domain(e.value.map((p, b) => b)).range([0, n.value.bandwidth()]).padding(0)), c = v(() => Be().domain(e.value.map((p, b) => b)).range([0, t.value.bandwidth()]).padding(0));
|
|
@@ -2588,27 +2583,27 @@ function vl(e, n, t, o, a, r) {
|
|
|
2588
2583
|
const L = n.value.domain();
|
|
2589
2584
|
return n.value(L[b]) + i.value($);
|
|
2590
2585
|
}
|
|
2591
|
-
function
|
|
2586
|
+
function m(p, b, $) {
|
|
2592
2587
|
if (l.value) {
|
|
2593
2588
|
const L = t.value.domain();
|
|
2594
2589
|
return t.value(L[b]) + c.value($);
|
|
2595
2590
|
}
|
|
2596
2591
|
return p < 0 ? t.value(0) : t.value(p);
|
|
2597
2592
|
}
|
|
2598
|
-
function
|
|
2593
|
+
function r(p) {
|
|
2599
2594
|
return l.value ? p < 0 ? n.value(0) - n.value(p) : n.value(p) - n.value(0) : i.value.bandwidth();
|
|
2600
2595
|
}
|
|
2601
|
-
function
|
|
2596
|
+
function f(p) {
|
|
2602
2597
|
return l.value ? c.value.bandwidth() : p < 0 ? t.value(p) - t.value(0) : t.value(0) - t.value(p);
|
|
2603
2598
|
}
|
|
2604
2599
|
function y(p, b, $) {
|
|
2605
2600
|
if (!(n.value && t.value)) return dl;
|
|
2606
|
-
const { value: g, color: O } = p, N = O ?? e.value[b].color ?? Object.values(ie)[b], D = s(g, $, b), P =
|
|
2601
|
+
const { value: g, color: O } = p, N = O ?? e.value[b].color ?? Object.values(ie)[b], D = s(g, $, b), P = m(g, $, b), w = r(g), B = f(g);
|
|
2607
2602
|
return {
|
|
2608
|
-
classList: [`lume-fill--${N}`, ...
|
|
2603
|
+
classList: [`lume-fill--${N}`, ...u],
|
|
2609
2604
|
x: D,
|
|
2610
2605
|
y: P,
|
|
2611
|
-
width:
|
|
2606
|
+
width: w,
|
|
2612
2607
|
height: B,
|
|
2613
2608
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2614
2609
|
isNegative: g < 0
|
|
@@ -2616,46 +2611,46 @@ function vl(e, n, t, o, a, r) {
|
|
|
2616
2611
|
}
|
|
2617
2612
|
return { barAttributeGenerator: y };
|
|
2618
2613
|
}
|
|
2619
|
-
function
|
|
2614
|
+
function fl(e, n, t) {
|
|
2620
2615
|
const o = v(
|
|
2621
2616
|
() => n.value === H.HORIZONTAL
|
|
2622
2617
|
), a = v(() => {
|
|
2623
2618
|
const c = e.value.map(
|
|
2624
|
-
(s) => s.filter((
|
|
2619
|
+
(s) => s.filter((m) => m.value < 0).reduce((m, r) => m + r.value, 0)
|
|
2625
2620
|
);
|
|
2626
2621
|
return Math.min(...c);
|
|
2627
|
-
}),
|
|
2622
|
+
}), u = v(() => {
|
|
2628
2623
|
const c = e.value.map(
|
|
2629
2624
|
(s) => s.reduce(
|
|
2630
|
-
(
|
|
2625
|
+
(m, r) => r.value >= 0 ? m + r.value : m,
|
|
2631
2626
|
0
|
|
2632
2627
|
)
|
|
2633
2628
|
);
|
|
2634
2629
|
return Math.max(...c);
|
|
2635
2630
|
});
|
|
2636
|
-
function l(c, s,
|
|
2637
|
-
return s.length ? o.value ? Me().domain([a.value,
|
|
2631
|
+
function l(c, s, m) {
|
|
2632
|
+
return s.length ? o.value ? Me().domain([a.value, u.value]).range([0, m.width]) : Object.assign(
|
|
2638
2633
|
Et(
|
|
2639
|
-
Be().domain(s.map((
|
|
2634
|
+
Be().domain(s.map((r, f) => f)).range([0, m.width]),
|
|
2640
2635
|
n.value,
|
|
2641
2636
|
t.value
|
|
2642
2637
|
),
|
|
2643
2638
|
{ labels: s }
|
|
2644
2639
|
) : null;
|
|
2645
2640
|
}
|
|
2646
|
-
function i(c, s,
|
|
2641
|
+
function i(c, s, m) {
|
|
2647
2642
|
return s.length ? o.value ? Object.assign(
|
|
2648
2643
|
Et(
|
|
2649
|
-
Be().domain(s.map((
|
|
2644
|
+
Be().domain(s.map((r, f) => f)).range([0, m.height]),
|
|
2650
2645
|
n.value,
|
|
2651
2646
|
t.value
|
|
2652
2647
|
),
|
|
2653
2648
|
{ labels: s }
|
|
2654
|
-
) : Me().domain([
|
|
2649
|
+
) : Me().domain([u.value, a.value]).range([0, m.height]) : null;
|
|
2655
2650
|
}
|
|
2656
2651
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2657
2652
|
}
|
|
2658
|
-
function
|
|
2653
|
+
function ml(e, n, t, o, a, u) {
|
|
2659
2654
|
const l = v(
|
|
2660
2655
|
() => o.value === H.HORIZONTAL
|
|
2661
2656
|
), i = v(
|
|
@@ -2667,13 +2662,13 @@ function fl(e, n, t, o, a, r) {
|
|
|
2667
2662
|
let N, D;
|
|
2668
2663
|
return l.value ? (N = n.value(L >= 0 ? 0 + O : L + O), D = t.value(i.value[g])) : (N = n.value(i.value[g]), D = t.value(L >= 0 ? L + O : 0 + O)), { x: N, y: D };
|
|
2669
2664
|
}
|
|
2670
|
-
function
|
|
2665
|
+
function m(L) {
|
|
2671
2666
|
return l.value ? n.value(L) - n.value(0) : n.value.bandwidth();
|
|
2672
2667
|
}
|
|
2673
|
-
function
|
|
2668
|
+
function r(L) {
|
|
2674
2669
|
return l.value ? n.value(0) - n.value(L) : n.value.bandwidth();
|
|
2675
2670
|
}
|
|
2676
|
-
function
|
|
2671
|
+
function f(L) {
|
|
2677
2672
|
return l.value ? t.value.bandwidth() : t.value(0) - t.value(L);
|
|
2678
2673
|
}
|
|
2679
2674
|
function y(L) {
|
|
@@ -2686,11 +2681,11 @@ function fl(e, n, t, o, a, r) {
|
|
|
2686
2681
|
return L ? c.value.reduce((O, N, D) => (D < L && N[g] < 0 && (O += N[g]), O), 0) : 0;
|
|
2687
2682
|
}
|
|
2688
2683
|
function $(L, g, O) {
|
|
2689
|
-
const { value: N, color: D } = L, P = N >= 0 ?
|
|
2684
|
+
const { value: N, color: D } = L, P = N >= 0 ? m(N) : r(N), w = N >= 0 ? f(N) : y(N), B = N >= 0 ? p(g, O) : b(g, O), { x: U, y: K } = s(N, O, B);
|
|
2690
2685
|
return {
|
|
2691
|
-
classList: [`lume-fill--${D ?? e.value[g].color ?? Object.values(ie)[g]}`, ...
|
|
2686
|
+
classList: [`lume-fill--${D ?? e.value[g].color ?? Object.values(ie)[g]}`, ...u],
|
|
2692
2687
|
width: P,
|
|
2693
|
-
height:
|
|
2688
|
+
height: w,
|
|
2694
2689
|
x: U,
|
|
2695
2690
|
y: K,
|
|
2696
2691
|
isFaded: a.value !== -1 && a.value !== O,
|
|
@@ -2705,7 +2700,7 @@ const pl = {
|
|
|
2705
2700
|
}, hl = ["onMouseenter"], gl = {
|
|
2706
2701
|
single: cl,
|
|
2707
2702
|
grouped: vl,
|
|
2708
|
-
stacked:
|
|
2703
|
+
stacked: ml
|
|
2709
2704
|
}, yt = /* @__PURE__ */ Z({
|
|
2710
2705
|
__name: "lume-bar-group",
|
|
2711
2706
|
props: {
|
|
@@ -2714,7 +2709,7 @@ const pl = {
|
|
|
2714
2709
|
type: [String, Array],
|
|
2715
2710
|
default: () => []
|
|
2716
2711
|
},
|
|
2717
|
-
...
|
|
2712
|
+
...ul(!0),
|
|
2718
2713
|
transition: {
|
|
2719
2714
|
type: Boolean,
|
|
2720
2715
|
default: !0
|
|
@@ -2724,23 +2719,23 @@ const pl = {
|
|
|
2724
2719
|
setup(e, { emit: n }) {
|
|
2725
2720
|
const t = e, o = n, {
|
|
2726
2721
|
data: a,
|
|
2727
|
-
hoveredIndex:
|
|
2722
|
+
hoveredIndex: u,
|
|
2728
2723
|
orientation: l,
|
|
2729
2724
|
transition: i,
|
|
2730
2725
|
type: c,
|
|
2731
2726
|
xScale: s,
|
|
2732
|
-
yScale:
|
|
2733
|
-
classList:
|
|
2734
|
-
labels:
|
|
2727
|
+
yScale: m,
|
|
2728
|
+
classList: r,
|
|
2729
|
+
labels: f
|
|
2735
2730
|
} = ee(t);
|
|
2736
2731
|
Ce("chartID");
|
|
2737
|
-
const { emitInternalEvent: y } = _e(), { groupedData: p } = on(a,
|
|
2738
|
-
const D =
|
|
2732
|
+
const { emitInternalEvent: y } = _e(), { groupedData: p } = on(a, f), { barXScale: b, barYScale: $ } = il(s, m, l), L = v(() => typeof r.value == "string" ? [r.value] : r.value), g = v(() => {
|
|
2733
|
+
const D = rl(a, c), { barAttributeGenerator: P } = gl[D](
|
|
2739
2734
|
a,
|
|
2740
2735
|
b,
|
|
2741
2736
|
$,
|
|
2742
2737
|
l,
|
|
2743
|
-
|
|
2738
|
+
u,
|
|
2744
2739
|
L.value
|
|
2745
2740
|
);
|
|
2746
2741
|
return P;
|
|
@@ -2752,11 +2747,11 @@ const pl = {
|
|
|
2752
2747
|
o("lume__internal--hover", D), y("lume__internal--hover", D);
|
|
2753
2748
|
}
|
|
2754
2749
|
return (D, P) => (_(), I("g", pl, [
|
|
2755
|
-
(_(!0), I(Q, null, W(d(p), (
|
|
2750
|
+
(_(!0), I(Q, null, W(d(p), (w, B) => (_(), I("g", {
|
|
2756
2751
|
key: B,
|
|
2757
2752
|
onMouseenter: (U) => N(B)
|
|
2758
2753
|
}, [
|
|
2759
|
-
(_(!0), I(Q, null, W(
|
|
2754
|
+
(_(!0), I(Q, null, W(w, (U, K) => (_(), Y(d(dt), j(g.value(U, K, B, w), {
|
|
2760
2755
|
key: `bar-${K}`,
|
|
2761
2756
|
transition: O.value,
|
|
2762
2757
|
"data-j-lume-bar": "",
|
|
@@ -2785,27 +2780,27 @@ const pl = {
|
|
|
2785
2780
|
}, Xl = /* @__PURE__ */ Z({
|
|
2786
2781
|
__name: "lume-single-bar-chart",
|
|
2787
2782
|
props: {
|
|
2788
|
-
...
|
|
2783
|
+
...we(st)
|
|
2789
2784
|
},
|
|
2790
2785
|
setup(e, { emit: n }) {
|
|
2791
|
-
const t = e, { componentEventPropagator: o } = _e(), a = Ae(
|
|
2792
|
-
() => yl[
|
|
2786
|
+
const t = e, { componentEventPropagator: o } = _e(), a = Ae(ue()), { orientation: u, options: l } = ee(t), i = v(
|
|
2787
|
+
() => yl[u.value || H.VERTICAL]
|
|
2793
2788
|
// needs to be computed so that default options are reactive
|
|
2794
|
-
), { allOptions: c } =
|
|
2795
|
-
return (s,
|
|
2789
|
+
), { allOptions: c } = fe(l, i);
|
|
2790
|
+
return (s, m) => (_(), Y(d(Ee), j({ ...t, ...s.$attrs }, {
|
|
2796
2791
|
"chart-type": "single-bar",
|
|
2797
2792
|
options: d(c),
|
|
2798
2793
|
"data-j-single-bar-chart": ""
|
|
2799
2794
|
}, oe(d(o))), ce({
|
|
2800
|
-
groups: V((
|
|
2801
|
-
|
|
2795
|
+
groups: V((r) => [
|
|
2796
|
+
re(d(yt), j(r, { orientation: d(u) }, oe(d(o))), null, 16, ["orientation"])
|
|
2802
2797
|
]),
|
|
2803
2798
|
_: 2
|
|
2804
2799
|
}, [
|
|
2805
|
-
W(d(a), (
|
|
2806
|
-
name:
|
|
2800
|
+
W(d(a), (r, f) => ({
|
|
2801
|
+
name: f,
|
|
2807
2802
|
fn: V((y) => [
|
|
2808
|
-
M(s.$slots,
|
|
2803
|
+
M(s.$slots, f, pe(he(y || {})))
|
|
2809
2804
|
])
|
|
2810
2805
|
}))
|
|
2811
2806
|
]), 1040, ["options"]));
|
|
@@ -2827,30 +2822,30 @@ const pl = {
|
|
|
2827
2822
|
}, Yl = /* @__PURE__ */ Z({
|
|
2828
2823
|
__name: "lume-grouped-bar-chart",
|
|
2829
2824
|
props: {
|
|
2830
|
-
...
|
|
2825
|
+
...we()
|
|
2831
2826
|
},
|
|
2832
2827
|
setup(e, { emit: n }) {
|
|
2833
|
-
const t = e, { componentEventPropagator: o } = _e(), a = Ae(
|
|
2834
|
-
() => _l[
|
|
2828
|
+
const t = e, { componentEventPropagator: o } = _e(), a = Ae(ue()), { orientation: u, options: l } = ee(t), i = v(
|
|
2829
|
+
() => _l[u.value || H.VERTICAL]
|
|
2835
2830
|
// needs to be computed so that default options are reactive
|
|
2836
|
-
), { allOptions: c } =
|
|
2831
|
+
), { allOptions: c } = fe(
|
|
2837
2832
|
l,
|
|
2838
2833
|
i
|
|
2839
2834
|
);
|
|
2840
|
-
return (s,
|
|
2835
|
+
return (s, m) => (_(), Y(d(Ee), j({ ...t, ...s.$attrs }, {
|
|
2841
2836
|
"chart-type": "grouped-bar",
|
|
2842
2837
|
options: d(c),
|
|
2843
2838
|
"data-j-grouped-bar-chart": ""
|
|
2844
2839
|
}, oe(d(o))), ce({
|
|
2845
|
-
groups: V((
|
|
2846
|
-
|
|
2840
|
+
groups: V((r) => [
|
|
2841
|
+
re(d(yt), j(r, { type: "grouped" }, oe(d(o))), null, 16)
|
|
2847
2842
|
]),
|
|
2848
2843
|
_: 2
|
|
2849
2844
|
}, [
|
|
2850
|
-
W(d(a), (
|
|
2851
|
-
name:
|
|
2845
|
+
W(d(a), (r, f) => ({
|
|
2846
|
+
name: f,
|
|
2852
2847
|
fn: V((y) => [
|
|
2853
|
-
M(s.$slots,
|
|
2848
|
+
M(s.$slots, f, pe(he(y || {})))
|
|
2854
2849
|
])
|
|
2855
2850
|
}))
|
|
2856
2851
|
]), 1040, ["options"]));
|
|
@@ -2873,29 +2868,29 @@ const pl = {
|
|
|
2873
2868
|
}, Kl = /* @__PURE__ */ Z({
|
|
2874
2869
|
__name: "lume-stacked-bar-chart",
|
|
2875
2870
|
props: {
|
|
2876
|
-
...
|
|
2871
|
+
...we()
|
|
2877
2872
|
},
|
|
2878
2873
|
setup(e, { emit: n }) {
|
|
2879
|
-
const t = e, { componentEventPropagator: o } = _e(), a = Ae(
|
|
2874
|
+
const t = e, { componentEventPropagator: o } = _e(), a = Ae(ue()), { data: u, orientation: l, options: i, labels: c } = ee(t), s = v(
|
|
2880
2875
|
() => kl[l.value || H.VERTICAL]
|
|
2881
2876
|
// needs to be computed so that default options are reactive
|
|
2882
|
-
), { allOptions:
|
|
2877
|
+
), { allOptions: m } = fe(
|
|
2883
2878
|
i,
|
|
2884
2879
|
s
|
|
2885
|
-
), { internalData:
|
|
2886
|
-
|
|
2880
|
+
), { internalData: r } = ht(u), { groupedData: f } = on(r, c), { stackedXScaleGenerator: y, stackedYScaleGenerator: p } = fl(
|
|
2881
|
+
f,
|
|
2887
2882
|
l,
|
|
2888
2883
|
i
|
|
2889
2884
|
), b = v(() => t.xScale || y), $ = v(() => t.yScale || p);
|
|
2890
2885
|
return (L, g) => (_(), Y(d(Ee), j({ ...t, ...L.$attrs }, {
|
|
2891
2886
|
"chart-type": "stacked-bar",
|
|
2892
|
-
options: d(
|
|
2887
|
+
options: d(m),
|
|
2893
2888
|
"x-scale": b.value,
|
|
2894
2889
|
"y-scale": $.value,
|
|
2895
2890
|
"data-j-stacked-bar-chart": ""
|
|
2896
2891
|
}, oe(d(o))), ce({
|
|
2897
2892
|
groups: V((O) => [
|
|
2898
|
-
|
|
2893
|
+
re(d(yt), j(O, { type: "stacked" }, oe(d(o))), null, 16)
|
|
2899
2894
|
]),
|
|
2900
2895
|
_: 2
|
|
2901
2896
|
}, [
|
|
@@ -2942,7 +2937,7 @@ const pl = {
|
|
|
2942
2937
|
emits: ["click"],
|
|
2943
2938
|
setup(e, { emit: n }) {
|
|
2944
2939
|
const t = n, o = S(null);
|
|
2945
|
-
return ye(() => ze(o.value)), (a,
|
|
2940
|
+
return ye(() => ze(o.value)), (a, u) => (_(), I("path", {
|
|
2946
2941
|
ref_key: "root",
|
|
2947
2942
|
ref: o,
|
|
2948
2943
|
class: te(["lume-line", {
|
|
@@ -2957,7 +2952,7 @@ const pl = {
|
|
|
2957
2952
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2958
2953
|
}),
|
|
2959
2954
|
"data-j-line": "",
|
|
2960
|
-
onClick:
|
|
2955
|
+
onClick: u[0] || (u[0] = (l) => t("click", l))
|
|
2961
2956
|
}, null, 14, bl));
|
|
2962
2957
|
}
|
|
2963
2958
|
}), Ll = /* @__PURE__ */ q(Tl, [["__scopeId", "data-v-59449838"]]), $l = ["cx", "cy", "r", "stroke-width"], Ol = 4, Il = /* @__PURE__ */ Z({
|
|
@@ -2980,7 +2975,7 @@ const pl = {
|
|
|
2980
2975
|
},
|
|
2981
2976
|
emits: ["click"],
|
|
2982
2977
|
setup(e, { emit: n }) {
|
|
2983
|
-
const t = e, o = n, a = S(null),
|
|
2978
|
+
const t = e, o = n, a = S(null), u = v(() => t.radius / 2);
|
|
2984
2979
|
return ye(() => ze(a.value)), (l, i) => (_(), I("circle", {
|
|
2985
2980
|
ref_key: "root",
|
|
2986
2981
|
ref: a,
|
|
@@ -2988,41 +2983,41 @@ const pl = {
|
|
|
2988
2983
|
cx: e.x,
|
|
2989
2984
|
cy: e.y,
|
|
2990
2985
|
r: e.active ? e.radius : 0,
|
|
2991
|
-
"stroke-width":
|
|
2986
|
+
"stroke-width": u.value,
|
|
2992
2987
|
"data-j-point": "",
|
|
2993
2988
|
onClick: i[0] || (i[0] = (c) => o("click", c))
|
|
2994
2989
|
}, null, 10, $l));
|
|
2995
2990
|
}
|
|
2996
|
-
}),
|
|
2991
|
+
}), xl = /* @__PURE__ */ q(Il, [["__scopeId", "data-v-436fef87"]]);
|
|
2997
2992
|
function an(e) {
|
|
2998
|
-
function n(
|
|
2993
|
+
function n(u) {
|
|
2999
2994
|
let l = null;
|
|
3000
|
-
return
|
|
2995
|
+
return u == null ? void 0 : u.reduce((i, c, s) => (c == null || c.value == null ? (l ? l.push(s) : l = [s], s === (u == null ? void 0 : u.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
3001
2996
|
}
|
|
3002
|
-
function t(
|
|
3003
|
-
const
|
|
3004
|
-
return
|
|
2997
|
+
function t(u, l, i, c) {
|
|
2998
|
+
const r = Math.abs(u - l) / (i + 1) * (c + 1);
|
|
2999
|
+
return u == null && l == null ? null : u > l ? u - r : u + r;
|
|
3005
3000
|
}
|
|
3006
|
-
function o(
|
|
3001
|
+
function o(u) {
|
|
3007
3002
|
return function(i) {
|
|
3008
|
-
return !!
|
|
3003
|
+
return !!u.find(
|
|
3009
3004
|
(c) => c.includes(i) || c.includes(i - 1)
|
|
3010
3005
|
);
|
|
3011
3006
|
};
|
|
3012
3007
|
}
|
|
3013
|
-
return { computedLineData: v(() => e.value.map((
|
|
3014
|
-
const l = n(
|
|
3008
|
+
return { computedLineData: v(() => e.value.map((u) => {
|
|
3009
|
+
const l = n(u.values);
|
|
3015
3010
|
return {
|
|
3016
|
-
...
|
|
3011
|
+
...u,
|
|
3017
3012
|
isDashed: o(l),
|
|
3018
|
-
values:
|
|
3019
|
-
var
|
|
3013
|
+
values: u.values.map((i, c) => {
|
|
3014
|
+
var m, r;
|
|
3020
3015
|
const s = l.find(
|
|
3021
|
-
(
|
|
3016
|
+
(f) => f.includes(c)
|
|
3022
3017
|
);
|
|
3023
3018
|
if (s) {
|
|
3024
|
-
const
|
|
3025
|
-
let p = (
|
|
3019
|
+
const f = s[0] - 1, y = s[s.length - 1] + 1;
|
|
3020
|
+
let p = (m = u.values[f]) == null ? void 0 : m.value, b = (r = u.values[y]) == null ? void 0 : r.value;
|
|
3026
3021
|
return p == null && (p = b), b == null && (b = p), {
|
|
3027
3022
|
value: t(
|
|
3028
3023
|
p,
|
|
@@ -3038,7 +3033,7 @@ function an(e) {
|
|
|
3038
3033
|
};
|
|
3039
3034
|
})) };
|
|
3040
3035
|
}
|
|
3041
|
-
function
|
|
3036
|
+
function wl(e, n) {
|
|
3042
3037
|
const t = e.bandwidth() / 2;
|
|
3043
3038
|
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
3044
3039
|
}
|
|
@@ -3047,9 +3042,9 @@ function El(e, n) {
|
|
|
3047
3042
|
}
|
|
3048
3043
|
function Nl(e, n, t, o) {
|
|
3049
3044
|
const a = yn().x(
|
|
3050
|
-
de(t) ?
|
|
3051
|
-
).y((
|
|
3052
|
-
return n.every((
|
|
3045
|
+
de(t) ? wl(t, e) : El(t, e)
|
|
3046
|
+
).y((u) => o(u));
|
|
3047
|
+
return n.every((u) => u == null) ? null : a(n);
|
|
3053
3048
|
}
|
|
3054
3049
|
const Dl = {
|
|
3055
3050
|
class: "lume-line-group",
|
|
@@ -3073,29 +3068,29 @@ const Dl = {
|
|
|
3073
3068
|
},
|
|
3074
3069
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3075
3070
|
setup(e, { emit: n }) {
|
|
3076
|
-
const t = e, o = n, { data: a, options:
|
|
3071
|
+
const t = e, o = n, { data: a, options: u, xScale: l, yScale: i, labels: c } = ee(t), s = Ce(
|
|
3077
3072
|
"tooltipAnchorAttributes",
|
|
3078
3073
|
null
|
|
3079
|
-
), { updateTooltipAnchorAttributes:
|
|
3074
|
+
), { updateTooltipAnchorAttributes: m } = en(
|
|
3080
3075
|
s,
|
|
3081
|
-
|
|
3076
|
+
u,
|
|
3082
3077
|
l,
|
|
3083
3078
|
i,
|
|
3084
3079
|
c
|
|
3085
|
-
),
|
|
3080
|
+
), r = v(() => {
|
|
3086
3081
|
if (a.value.every((B) => B.isDashed))
|
|
3087
3082
|
return a.value;
|
|
3088
|
-
const { computedLineData:
|
|
3089
|
-
return
|
|
3090
|
-
}),
|
|
3083
|
+
const { computedLineData: w } = an(a);
|
|
3084
|
+
return u.value.withTooltip !== !1 && (s != null && s.value) && m(w.value), w.value;
|
|
3085
|
+
}), f = v(() => {
|
|
3091
3086
|
if (t.hoveredIndex === -1) return;
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3087
|
+
const w = wn(
|
|
3088
|
+
r.value,
|
|
3094
3089
|
t.hoveredIndex
|
|
3095
3090
|
);
|
|
3096
3091
|
return {
|
|
3097
3092
|
d: `M ${tt(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3098
|
-
V ${i.value(
|
|
3093
|
+
V ${i.value(w)}`
|
|
3099
3094
|
// Move to X index, Vertical line to the highest point
|
|
3100
3095
|
};
|
|
3101
3096
|
}), y = v(
|
|
@@ -3103,54 +3098,54 @@ const Dl = {
|
|
|
3103
3098
|
// Subtracting the first line (read below)
|
|
3104
3099
|
), p = v(
|
|
3105
3100
|
() => {
|
|
3106
|
-
var
|
|
3107
|
-
return ((
|
|
3101
|
+
var w;
|
|
3102
|
+
return ((w = u.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
|
|
3108
3103
|
}
|
|
3109
3104
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3110
3105
|
), b = v(
|
|
3111
3106
|
() => l.value.bandwidth() / 2
|
|
3112
3107
|
), $ = v(() => l.value.domain()), L = v(
|
|
3113
|
-
() =>
|
|
3108
|
+
() => u.value.withPoints ?? t.withPoints
|
|
3114
3109
|
);
|
|
3115
|
-
function g(
|
|
3116
|
-
return
|
|
3110
|
+
function g(w) {
|
|
3111
|
+
return r.value[w].values;
|
|
3117
3112
|
}
|
|
3118
|
-
function O(
|
|
3113
|
+
function O(w, B) {
|
|
3119
3114
|
var K, J;
|
|
3120
|
-
const U =
|
|
3121
|
-
(K = g(B)[
|
|
3122
|
-
(J = g(B)[
|
|
3115
|
+
const U = w === 0 ? [] : [
|
|
3116
|
+
(K = g(B)[w - 1]) == null ? void 0 : K.value,
|
|
3117
|
+
(J = g(B)[w]) == null ? void 0 : J.value
|
|
3123
3118
|
];
|
|
3124
3119
|
return Nl(
|
|
3125
|
-
|
|
3120
|
+
w,
|
|
3126
3121
|
U,
|
|
3127
3122
|
l.value,
|
|
3128
3123
|
i.value
|
|
3129
3124
|
) || "";
|
|
3130
3125
|
}
|
|
3131
|
-
function N(
|
|
3126
|
+
function N(w) {
|
|
3132
3127
|
return {
|
|
3133
|
-
animationDelay:
|
|
3128
|
+
animationDelay: w < 2 ? 0 : (w - 1) * y.value,
|
|
3134
3129
|
animationDuration: y.value
|
|
3135
3130
|
};
|
|
3136
3131
|
}
|
|
3137
|
-
function D(
|
|
3132
|
+
function D(w, B) {
|
|
3138
3133
|
var K;
|
|
3139
|
-
const U = (K = g(B)[
|
|
3134
|
+
const U = (K = g(B)[w]) == null ? void 0 : K.value;
|
|
3140
3135
|
return {
|
|
3141
|
-
x: de(l.value) ? t.xScale($.value[
|
|
3136
|
+
x: de(l.value) ? t.xScale($.value[w]) + b.value : t.xScale(w),
|
|
3142
3137
|
y: U === null ? i.value(i.value.domain()[1]) : i.value(U)
|
|
3143
3138
|
};
|
|
3144
3139
|
}
|
|
3145
|
-
function P(
|
|
3146
|
-
return t.hoveredIndex ===
|
|
3140
|
+
function P(w) {
|
|
3141
|
+
return t.hoveredIndex === w;
|
|
3147
3142
|
}
|
|
3148
|
-
return (
|
|
3149
|
-
G("path", j(
|
|
3143
|
+
return (w, B) => (_(), I("g", Dl, [
|
|
3144
|
+
G("path", j(f.value, {
|
|
3150
3145
|
class: "lume-line-group__overlay-line",
|
|
3151
3146
|
"data-j-lume-line-group__overlay-line": ""
|
|
3152
3147
|
}), null, 16),
|
|
3153
|
-
(_(!0), I(Q, null, W(
|
|
3148
|
+
(_(!0), I(Q, null, W(r.value, (U, K) => (_(), I("g", {
|
|
3154
3149
|
key: U.label,
|
|
3155
3150
|
class: "lume-line-group__group"
|
|
3156
3151
|
}, [
|
|
@@ -3161,12 +3156,12 @@ const Dl = {
|
|
|
3161
3156
|
dashed: U.isDashed(C),
|
|
3162
3157
|
"path-definition": O(C, K),
|
|
3163
3158
|
transition: e.transition,
|
|
3164
|
-
width: d(
|
|
3159
|
+
width: d(u).lineWidth,
|
|
3165
3160
|
onClick: (ae) => o("line-click", { index: C, datasetIndex: K, event: ae })
|
|
3166
3161
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3167
3162
|
]),
|
|
3168
3163
|
L.value ? (_(), I("g", Bl, [
|
|
3169
|
-
(_(!0), I(Q, null, W(U.values, (J, C) => (_(), Y(d(
|
|
3164
|
+
(_(!0), I(Q, null, W(U.values, (J, C) => (_(), Y(d(xl), j(D(C, K), {
|
|
3170
3165
|
key: `point-${C}`,
|
|
3171
3166
|
active: P(C),
|
|
3172
3167
|
color: U.color,
|
|
@@ -3187,24 +3182,24 @@ const Dl = {
|
|
|
3187
3182
|
}, Jl = /* @__PURE__ */ Z({
|
|
3188
3183
|
__name: "lume-line-chart",
|
|
3189
3184
|
props: {
|
|
3190
|
-
...
|
|
3185
|
+
...we(null, !1)
|
|
3191
3186
|
},
|
|
3192
3187
|
setup(e, { emit: n }) {
|
|
3193
|
-
const t = e, { componentEventPropagator: o } = _e(), a = Ae(
|
|
3188
|
+
const t = e, { componentEventPropagator: o } = _e(), a = Ae(ue()), { options: u } = ee(t), { allOptions: l } = fe(u, Sl);
|
|
3194
3189
|
return (i, c) => (_(), Y(d(Ee), j({ ...t, ...i.$attrs }, {
|
|
3195
3190
|
"chart-type": "line",
|
|
3196
3191
|
options: d(l),
|
|
3197
3192
|
"data-j-lume-line-chart": ""
|
|
3198
3193
|
}, oe(d(o))), ce({
|
|
3199
3194
|
groups: V((s) => [
|
|
3200
|
-
|
|
3195
|
+
re(d(ln), j(s, oe(d(o))), null, 16)
|
|
3201
3196
|
]),
|
|
3202
3197
|
_: 2
|
|
3203
3198
|
}, [
|
|
3204
|
-
W(d(a), (s,
|
|
3205
|
-
name:
|
|
3206
|
-
fn: V((
|
|
3207
|
-
M(i.$slots,
|
|
3199
|
+
W(d(a), (s, m) => ({
|
|
3200
|
+
name: m,
|
|
3201
|
+
fn: V((r) => [
|
|
3202
|
+
M(i.$slots, m, pe(he(r || {})))
|
|
3208
3203
|
])
|
|
3209
3204
|
}))
|
|
3210
3205
|
]), 1040, ["options"]));
|
|
@@ -3216,7 +3211,7 @@ function Gl(e) {
|
|
|
3216
3211
|
if (!t || !o || de(t) || de(o))
|
|
3217
3212
|
return;
|
|
3218
3213
|
const a = e.value[0].values;
|
|
3219
|
-
return _n().x((
|
|
3214
|
+
return _n().x((u, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((u) => o(u.value))(a);
|
|
3220
3215
|
}
|
|
3221
3216
|
) };
|
|
3222
3217
|
}
|
|
@@ -3241,13 +3236,13 @@ const jl = {
|
|
|
3241
3236
|
...Re()
|
|
3242
3237
|
},
|
|
3243
3238
|
setup(e, { expose: n, emit: t }) {
|
|
3244
|
-
const o = e, { componentEventPropagator: a } = _e(),
|
|
3239
|
+
const o = e, { componentEventPropagator: a } = _e(), u = Ae(ue()), { data: l, options: i } = ee(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData: m } = an(c), { areaPathDefinition: r } = Gl(m), f = v(() => {
|
|
3245
3240
|
var $, L;
|
|
3246
3241
|
return (L = ($ = c.value) == null ? void 0 : $[0]) == null ? void 0 : L.color;
|
|
3247
3242
|
}), y = v(
|
|
3248
3243
|
() => {
|
|
3249
3244
|
var $, L;
|
|
3250
|
-
return ((L = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : L.areaColor) ||
|
|
3245
|
+
return ((L = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : L.areaColor) || f.value;
|
|
3251
3246
|
}
|
|
3252
3247
|
);
|
|
3253
3248
|
function p($) {
|
|
@@ -3261,7 +3256,7 @@ const jl = {
|
|
|
3261
3256
|
return Me().range([0, g.width]).domain([0, $[0].values.length - 1]);
|
|
3262
3257
|
}
|
|
3263
3258
|
return n({
|
|
3264
|
-
areaPathDefinition:
|
|
3259
|
+
areaPathDefinition: r
|
|
3265
3260
|
}), ($, L) => (_(), Y(d(Ee), j(o, {
|
|
3266
3261
|
"chart-type": "line",
|
|
3267
3262
|
options: p(d(s)),
|
|
@@ -3273,17 +3268,17 @@ const jl = {
|
|
|
3273
3268
|
class: te([
|
|
3274
3269
|
"sparkline-chart__area",
|
|
3275
3270
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3276
|
-
`lume-fill--${y.value ||
|
|
3271
|
+
`lume-fill--${y.value || f.value}`,
|
|
3277
3272
|
"lume-fill--faded"
|
|
3278
3273
|
]),
|
|
3279
|
-
d: d(
|
|
3274
|
+
d: d(r)(g.xScale, g.yScale),
|
|
3280
3275
|
"data-j-sparkline__area": ""
|
|
3281
3276
|
}, null, 10, Vl)) : z("", !0),
|
|
3282
|
-
|
|
3277
|
+
re(d(ln), j(g, { "with-points": !1 }, oe(d(a))), null, 16)
|
|
3283
3278
|
]),
|
|
3284
3279
|
_: 2
|
|
3285
3280
|
}, [
|
|
3286
|
-
W(d(
|
|
3281
|
+
W(d(u), (g, O) => ({
|
|
3287
3282
|
name: O,
|
|
3288
3283
|
fn: V((N) => [
|
|
3289
3284
|
M($.$slots, O, pe(he(N || {})), void 0, !0)
|
|
@@ -3296,14 +3291,14 @@ export {
|
|
|
3296
3291
|
Zo as A,
|
|
3297
3292
|
Uo as B,
|
|
3298
3293
|
Re as C,
|
|
3299
|
-
|
|
3294
|
+
fe as D,
|
|
3300
3295
|
gt as E,
|
|
3301
|
-
|
|
3296
|
+
we as F,
|
|
3302
3297
|
po as G,
|
|
3303
3298
|
ho as H,
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3299
|
+
fo as I,
|
|
3300
|
+
mo as J,
|
|
3301
|
+
wt as K,
|
|
3307
3302
|
Ee as L,
|
|
3308
3303
|
tt as M,
|
|
3309
3304
|
Et as N,
|
|
@@ -3313,8 +3308,8 @@ export {
|
|
|
3313
3308
|
ie as R,
|
|
3314
3309
|
qt as S,
|
|
3315
3310
|
vt as T,
|
|
3316
|
-
|
|
3317
|
-
|
|
3311
|
+
ft as U,
|
|
3312
|
+
mt as V,
|
|
3318
3313
|
ke as W,
|
|
3319
3314
|
Zl as _,
|
|
3320
3315
|
Ul as a,
|
|
@@ -3332,7 +3327,7 @@ export {
|
|
|
3332
3327
|
Oo as m,
|
|
3333
3328
|
dt as n,
|
|
3334
3329
|
Ll as o,
|
|
3335
|
-
|
|
3330
|
+
xl as p,
|
|
3336
3331
|
nl as q,
|
|
3337
3332
|
ya as r,
|
|
3338
3333
|
ba as s,
|
|
@@ -3344,4 +3339,4 @@ export {
|
|
|
3344
3339
|
ht as y,
|
|
3345
3340
|
an as z
|
|
3346
3341
|
};
|
|
3347
|
-
//# sourceMappingURL=
|
|
3342
|
+
//# sourceMappingURL=o-3UCjl8.js.map
|