@adyen/lume 1.9.0 → 1.9.1
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/utils/constants.d.ts +14 -2
- package/dist/@types/utils/constants.d.ts.map +1 -1
- package/dist/index.js +175 -175
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as I, isRef as bt, computed as v, watch as
|
|
1
|
+
import { defineComponent as H, ref as I, isRef as bt, computed as v, watch as D, toRefs as B, inject as Le, reactive as Oe, onMounted as ee, onBeforeUnmount as kt, watchEffect as xt, useSlots as M, provide as Ee, nextTick as tt, defineAsyncComponent as Ne } from "vue";
|
|
2
2
|
import { format as Mt, ticks as zt, scaleBand as _e, scaleLinear as fe, link as Wt, line as Zt, area as Ut } from "d3";
|
|
3
3
|
import { createPopper as Xt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as Yt, sankey as Kt, sankeyJustify as Jt } from "d3-sankey";
|
|
@@ -44,7 +44,7 @@ const Qt = /* @__PURE__ */ H({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function E(t, e, r, n, a, o, l, i) {
|
|
48
48
|
var u = typeof t == "function" ? t.options : t;
|
|
49
49
|
e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), n && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
|
|
50
50
|
var c;
|
|
@@ -83,7 +83,7 @@ var qt = function() {
|
|
|
83
83
|
}, click: function(a) {
|
|
84
84
|
return n.emit("click", a);
|
|
85
85
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
86
|
-
}, en = [], tn = /* @__PURE__ */
|
|
86
|
+
}, en = [], tn = /* @__PURE__ */ E(
|
|
87
87
|
Qt,
|
|
88
88
|
qt,
|
|
89
89
|
en,
|
|
@@ -262,9 +262,9 @@ function hn(t, e, r) {
|
|
|
262
262
|
const s = a.value / d, _ = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / s);
|
|
263
263
|
return u % _ === 0;
|
|
264
264
|
}
|
|
265
|
-
return
|
|
265
|
+
return D(e, l), { showTick: i };
|
|
266
266
|
}
|
|
267
|
-
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), $t = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))($t || {}), Ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ze || {}), Ue = /* @__PURE__ */ ((t) => (t.
|
|
267
|
+
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), $t = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))($t || {}), Ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ze || {}), Ue = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(Ue || {}), Xe = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(Xe || {});
|
|
268
268
|
const L = {
|
|
269
269
|
HORIZONTAL: "horizontal",
|
|
270
270
|
VERTICAL: "vertical"
|
|
@@ -272,7 +272,7 @@ const L = {
|
|
|
272
272
|
SINGLE: "single",
|
|
273
273
|
GROUPED: "grouped",
|
|
274
274
|
STACKED: "stacked"
|
|
275
|
-
}, It = "No data", rt = 20,
|
|
275
|
+
}, It = "No data", rt = 20, wt = 0.33, Et = 0.5, Nt = 12, me = 8, yn = 1, bn = [
|
|
276
276
|
"auto",
|
|
277
277
|
"auto-start",
|
|
278
278
|
"auto-end",
|
|
@@ -474,7 +474,7 @@ const Ht = {
|
|
|
474
474
|
"x-linear-scale-axis": Ln,
|
|
475
475
|
"y-linear-scale-axis": On
|
|
476
476
|
};
|
|
477
|
-
var
|
|
477
|
+
var De = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(De || {}), Se = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Se || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
478
478
|
const In = /* @__PURE__ */ H({
|
|
479
479
|
__name: "lume-axis",
|
|
480
480
|
props: {
|
|
@@ -490,7 +490,7 @@ const In = /* @__PURE__ */ H({
|
|
|
490
490
|
position: {
|
|
491
491
|
type: String,
|
|
492
492
|
default: void 0,
|
|
493
|
-
validator: (t) => t in
|
|
493
|
+
validator: (t) => t in Se
|
|
494
494
|
},
|
|
495
495
|
containerSize: {
|
|
496
496
|
type: Object,
|
|
@@ -527,20 +527,20 @@ const In = /* @__PURE__ */ H({
|
|
|
527
527
|
return a.value.labels || a.value.domain();
|
|
528
528
|
const { tickCount: $ } = f.value, [g, O] = a.value.domain();
|
|
529
529
|
return zt(g, O, $);
|
|
530
|
-
}),
|
|
530
|
+
}), w = v(() => {
|
|
531
531
|
const { tickFormat: $ } = f.value;
|
|
532
532
|
return Ae($);
|
|
533
533
|
}), T = v(
|
|
534
534
|
() => f.value.withHover && y.value && l.value > -1
|
|
535
|
-
),
|
|
535
|
+
), S = v(
|
|
536
536
|
() => f.value.tickPadding + me || n
|
|
537
|
-
),
|
|
537
|
+
), C = v(() => h.value === "x" ? (
|
|
538
538
|
// If x axis, get the tick height
|
|
539
539
|
Math.max(
|
|
540
540
|
...(s.value || []).map(
|
|
541
541
|
($) => {
|
|
542
542
|
var g, O;
|
|
543
|
-
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).height) +
|
|
543
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).height) + S.value;
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
)
|
|
@@ -550,16 +550,16 @@ const In = /* @__PURE__ */ H({
|
|
|
550
550
|
...(s.value || []).map(
|
|
551
551
|
($) => {
|
|
552
552
|
var g, O;
|
|
553
|
-
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).width) +
|
|
553
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).width) + S.value;
|
|
554
554
|
}
|
|
555
555
|
)
|
|
556
556
|
)
|
|
557
557
|
));
|
|
558
558
|
function R($) {
|
|
559
559
|
const { showTicks: g } = f.value;
|
|
560
|
-
return g === !1 ? "" :
|
|
560
|
+
return g === !1 ? "" : w.value($);
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function F($, g, O) {
|
|
563
563
|
e("mouseenter", { index: y.value ? $ : null, value: g, event: O });
|
|
564
564
|
}
|
|
565
565
|
function j($, g, O) {
|
|
@@ -587,17 +587,17 @@ const In = /* @__PURE__ */ H({
|
|
|
587
587
|
function ne() {
|
|
588
588
|
if (!a.value)
|
|
589
589
|
return;
|
|
590
|
-
const $ = a.value.step ? "bandScale" : "linearScale", g = $n[`${h.value}-${
|
|
590
|
+
const $ = a.value.step ? "bandScale" : "linearScale", g = $n[`${h.value}-${De[$]}`];
|
|
591
591
|
Object.entries(g(a, o, f) || []).forEach(
|
|
592
592
|
([O, N]) => {
|
|
593
593
|
d[O] = N;
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return D(a, ne, { flush: "sync", immediate: !0 }), D(a, te, { immediate: !0 }), D(s, te), D(C, ($) => e("lume__internal--axis-size", $)), D(r.containerSize, Q), ee(() => $e(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: De, POSITIONS: Se, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: x, ticks: A, tickFormatter: w, isHovering: T, axisLabelOffset: S, axisSize: C, formatTick: R, handleTickMouseenter: F, handleTickClick: j, getTextNode: W, setTicks: te, updateGridlines: Q, init: ne, LumeTick: nn };
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
|
-
var
|
|
600
|
+
var wn = function() {
|
|
601
601
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
602
602
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
|
|
603
603
|
return n.emit("mouseleave", a);
|
|
@@ -614,10 +614,10 @@ var En = function() {
|
|
|
614
614
|
a
|
|
615
615
|
);
|
|
616
616
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
617
|
-
},
|
|
617
|
+
}, En = [], Nn = /* @__PURE__ */ E(
|
|
618
618
|
In,
|
|
619
|
-
En,
|
|
620
619
|
wn,
|
|
620
|
+
En,
|
|
621
621
|
!1,
|
|
622
622
|
null,
|
|
623
623
|
null,
|
|
@@ -625,7 +625,7 @@ var En = function() {
|
|
|
625
625
|
null
|
|
626
626
|
);
|
|
627
627
|
const Hn = Nn.exports;
|
|
628
|
-
function
|
|
628
|
+
function Dn(t, e, r, n) {
|
|
629
629
|
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
630
630
|
() => n.value > 0 && n.value < 1
|
|
631
631
|
), l = v(
|
|
@@ -637,13 +637,13 @@ function Cn(t, e, r, n) {
|
|
|
637
637
|
);
|
|
638
638
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Sn(t, e, r, n) {
|
|
641
641
|
const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
642
642
|
return ee(() => {
|
|
643
643
|
a.value = r.value, o.value = n.value;
|
|
644
|
-
}),
|
|
644
|
+
}), D(r, (i) => a.value = i), D(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
645
645
|
}
|
|
646
|
-
const
|
|
646
|
+
const Cn = /* @__PURE__ */ H({
|
|
647
647
|
__name: "lume-bar",
|
|
648
648
|
props: {
|
|
649
649
|
x: {
|
|
@@ -683,7 +683,7 @@ const Sn = /* @__PURE__ */ H({
|
|
|
683
683
|
setup(t, { emit: e }) {
|
|
684
684
|
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), c = I(null), d = v(
|
|
685
685
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
686
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m =
|
|
686
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Sn(n, a, o, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Dn(n, a, o, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : o).value), x = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), A = s.value || _.value ? m.transformOrigin : null;
|
|
687
687
|
return ee(() => $e(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth: k, computedHeight: x, transformOrigin: A };
|
|
688
688
|
}
|
|
689
689
|
});
|
|
@@ -704,8 +704,8 @@ var Rn = function() {
|
|
|
704
704
|
}, mouseleave: function(a) {
|
|
705
705
|
return n.emit("mouseleave", a);
|
|
706
706
|
} } });
|
|
707
|
-
}, Pn = [], Bn = /* @__PURE__ */
|
|
708
|
-
|
|
707
|
+
}, Pn = [], Bn = /* @__PURE__ */ E(
|
|
708
|
+
Cn,
|
|
709
709
|
Rn,
|
|
710
710
|
Pn,
|
|
711
711
|
!1,
|
|
@@ -715,7 +715,7 @@ var Rn = function() {
|
|
|
715
715
|
null
|
|
716
716
|
);
|
|
717
717
|
const Ye = Bn.exports;
|
|
718
|
-
function
|
|
718
|
+
function Gn() {
|
|
719
719
|
const t = I(), e = Oe({
|
|
720
720
|
dimensions: {}
|
|
721
721
|
}), r = new ResizeObserver((n) => {
|
|
@@ -729,7 +729,7 @@ function Fn() {
|
|
|
729
729
|
r.unobserve(t.value);
|
|
730
730
|
}), { resizeState: e, resizeRef: t };
|
|
731
731
|
}
|
|
732
|
-
const
|
|
732
|
+
const Fn = /* @__PURE__ */ H({
|
|
733
733
|
__name: "lume-chart-container",
|
|
734
734
|
props: {
|
|
735
735
|
margins: {
|
|
@@ -751,7 +751,7 @@ const Gn = /* @__PURE__ */ H({
|
|
|
751
751
|
},
|
|
752
752
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
753
753
|
setup(t, { emit: e }) {
|
|
754
|
-
const r = t, { margins: n, containerSize: a } = B(r), o = I(null), { resizeRef: l, resizeState: i } =
|
|
754
|
+
const r = t, { margins: n, containerSize: a } = B(r), o = I(null), { resizeRef: l, resizeState: i } = Gn(), u = v(
|
|
755
755
|
() => a.value.height + n.value.top + n.value.bottom
|
|
756
756
|
);
|
|
757
757
|
return xt(() => {
|
|
@@ -783,8 +783,8 @@ var jn = function() {
|
|
|
783
783
|
}, mouseleave: function(a) {
|
|
784
784
|
return n.emit("mouseleave", a);
|
|
785
785
|
} } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.margins.left}, ${n.margins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
|
|
786
|
-
}, Vn = [], Mn = /* @__PURE__ */
|
|
787
|
-
|
|
786
|
+
}, Vn = [], Mn = /* @__PURE__ */ E(
|
|
787
|
+
Fn,
|
|
788
788
|
jn,
|
|
789
789
|
Vn,
|
|
790
790
|
!1,
|
|
@@ -818,7 +818,7 @@ var Zn = function() {
|
|
|
818
818
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
819
819
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
820
820
|
}), 0);
|
|
821
|
-
}, Un = [], Xn = /* @__PURE__ */
|
|
821
|
+
}, Un = [], Xn = /* @__PURE__ */ E(
|
|
822
822
|
Wn,
|
|
823
823
|
Zn,
|
|
824
824
|
Un,
|
|
@@ -833,7 +833,7 @@ const Kn = {};
|
|
|
833
833
|
var Jn = function() {
|
|
834
834
|
var e = this, r = e._self._c;
|
|
835
835
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
836
|
-
}, Qn = [], qn = /* @__PURE__ */
|
|
836
|
+
}, Qn = [], qn = /* @__PURE__ */ E(
|
|
837
837
|
Kn,
|
|
838
838
|
Jn,
|
|
839
839
|
Qn,
|
|
@@ -848,7 +848,7 @@ const tr = {};
|
|
|
848
848
|
var nr = function() {
|
|
849
849
|
var e = this, r = e._self._c;
|
|
850
850
|
return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
|
|
851
|
-
}, rr = [], ar = /* @__PURE__ */
|
|
851
|
+
}, rr = [], ar = /* @__PURE__ */ E(
|
|
852
852
|
tr,
|
|
853
853
|
nr,
|
|
854
854
|
rr,
|
|
@@ -873,7 +873,7 @@ const or = ar.exports, lr = /* @__PURE__ */ H({
|
|
|
873
873
|
var ur = function() {
|
|
874
874
|
var e = this, r = e._self._c;
|
|
875
875
|
return e._self._setupProxy, r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [e.color ? r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${e.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }) : e._e(), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [e._t("label")], 2), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [e._t("value")], 2)]);
|
|
876
|
-
}, ir = [], sr = /* @__PURE__ */
|
|
876
|
+
}, ir = [], sr = /* @__PURE__ */ E(
|
|
877
877
|
lr,
|
|
878
878
|
ur,
|
|
879
879
|
ir,
|
|
@@ -948,8 +948,8 @@ const cr = sr.exports, dr = /* @__PURE__ */ H({
|
|
|
948
948
|
() => u.value.showTitle !== !1 && r.title != null
|
|
949
949
|
), m = v(() => Ae(u.value.valueFormat)), p = v(() => Ae(u.value.titleFormat)), h = v(
|
|
950
950
|
() => {
|
|
951
|
-
var
|
|
952
|
-
return ((
|
|
951
|
+
var w;
|
|
952
|
+
return ((w = a.value) == null ? void 0 : w.find((T) => T.isSummary)) || {
|
|
953
953
|
label: u.value.summary ?? r.summary
|
|
954
954
|
};
|
|
955
955
|
}
|
|
@@ -969,10 +969,10 @@ const cr = sr.exports, dr = /* @__PURE__ */ H({
|
|
|
969
969
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
970
970
|
}() : x());
|
|
971
971
|
}
|
|
972
|
-
return
|
|
972
|
+
return D(
|
|
973
973
|
() => r.targetElement,
|
|
974
|
-
(
|
|
975
|
-
!T &&
|
|
974
|
+
(w, T) => {
|
|
975
|
+
!T && w ? k() : A();
|
|
976
976
|
}
|
|
977
977
|
), ee(k), kt(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, computedItems: f, initPopper: k, destroyPopper: x, updatePopper: A, LumeTooltipTitle: er, LumeTooltipSummary: or, LumeTooltipItem: cr };
|
|
978
978
|
}
|
|
@@ -1002,7 +1002,7 @@ var vr = function() {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
})], 2)];
|
|
1004
1004
|
})], 2);
|
|
1005
|
-
}, _r = [], fr = /* @__PURE__ */
|
|
1005
|
+
}, _r = [], fr = /* @__PURE__ */ E(
|
|
1006
1006
|
dr,
|
|
1007
1007
|
vr,
|
|
1008
1008
|
_r,
|
|
@@ -1157,7 +1157,7 @@ function $r(t, e, r, n, a) {
|
|
|
1157
1157
|
return xt(i), { xScale: o, yScale: l };
|
|
1158
1158
|
}
|
|
1159
1159
|
function lt(t, e, r, n) {
|
|
1160
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ?
|
|
1160
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? Et : wt);
|
|
1161
1161
|
return Object.assign(
|
|
1162
1162
|
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1163
1163
|
{ labels: t }
|
|
@@ -1173,7 +1173,7 @@ function ut(t, e, r, n) {
|
|
|
1173
1173
|
function it(t) {
|
|
1174
1174
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function Ce(t, e) {
|
|
1177
1177
|
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1178
1178
|
}
|
|
1179
1179
|
function st(t, e, {
|
|
@@ -1181,10 +1181,10 @@ function st(t, e, {
|
|
|
1181
1181
|
paddingInner: n,
|
|
1182
1182
|
paddingOuter: a
|
|
1183
1183
|
} = {}) {
|
|
1184
|
-
const o = r ?? (e === L.HORIZONTAL ?
|
|
1184
|
+
const o = r ?? (e === L.HORIZONTAL ? Et : wt);
|
|
1185
1185
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Dt(t) {
|
|
1188
1188
|
return Object.values(L).includes(t);
|
|
1189
1189
|
}
|
|
1190
1190
|
const ce = (t, e = !0) => ({
|
|
@@ -1203,7 +1203,7 @@ const ce = (t, e = !0) => ({
|
|
|
1203
1203
|
orientation: {
|
|
1204
1204
|
type: String,
|
|
1205
1205
|
default: L.VERTICAL,
|
|
1206
|
-
validator:
|
|
1206
|
+
validator: Dt
|
|
1207
1207
|
}
|
|
1208
1208
|
} : {}
|
|
1209
1209
|
}), Ir = (t) => ({
|
|
@@ -1229,7 +1229,7 @@ const ce = (t, e = !0) => ({
|
|
|
1229
1229
|
orientation: {
|
|
1230
1230
|
type: String,
|
|
1231
1231
|
default: L.VERTICAL,
|
|
1232
|
-
validator:
|
|
1232
|
+
validator: Dt
|
|
1233
1233
|
},
|
|
1234
1234
|
xScale: {
|
|
1235
1235
|
type: Function,
|
|
@@ -1255,7 +1255,7 @@ const ce = (t, e = !0) => ({
|
|
|
1255
1255
|
type: [String, Array],
|
|
1256
1256
|
default: () => []
|
|
1257
1257
|
}
|
|
1258
|
-
}),
|
|
1258
|
+
}), wr = /* @__PURE__ */ H({
|
|
1259
1259
|
__name: "lume-overlay-group",
|
|
1260
1260
|
props: {
|
|
1261
1261
|
...Ie(),
|
|
@@ -1283,7 +1283,7 @@ const ce = (t, e = !0) => ({
|
|
|
1283
1283
|
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ye };
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
|
-
var
|
|
1286
|
+
var Er = function() {
|
|
1287
1287
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1288
1288
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1289
1289
|
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
@@ -1292,9 +1292,9 @@ var wr = function() {
|
|
|
1292
1292
|
return n.emit("click", { index: o, event: l });
|
|
1293
1293
|
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1294
1294
|
}), 1);
|
|
1295
|
-
}, Nr = [], Hr = /* @__PURE__ */
|
|
1296
|
-
Er,
|
|
1295
|
+
}, Nr = [], Hr = /* @__PURE__ */ E(
|
|
1297
1296
|
wr,
|
|
1297
|
+
Er,
|
|
1298
1298
|
Nr,
|
|
1299
1299
|
!1,
|
|
1300
1300
|
null,
|
|
@@ -1302,7 +1302,7 @@ var wr = function() {
|
|
|
1302
1302
|
null,
|
|
1303
1303
|
null
|
|
1304
1304
|
);
|
|
1305
|
-
const
|
|
1305
|
+
const Dr = Hr.exports, Sr = [
|
|
1306
1306
|
"axis-click",
|
|
1307
1307
|
"axis-mouseenter",
|
|
1308
1308
|
"axis-mouseleave",
|
|
@@ -1344,9 +1344,9 @@ const Cr = Hr.exports, Dr = [
|
|
|
1344
1344
|
(i) => l(...i.detail)
|
|
1345
1345
|
);
|
|
1346
1346
|
}
|
|
1347
|
-
return { componentEventPropagator:
|
|
1347
|
+
return { componentEventPropagator: Sr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1349
|
+
function Cr(t) {
|
|
1350
1350
|
return { hasNegativeValues: v(
|
|
1351
1351
|
() => Tt(t.value).some((r) => r < 0)
|
|
1352
1352
|
) };
|
|
@@ -1392,7 +1392,7 @@ function Br(t, e) {
|
|
|
1392
1392
|
const ct = {
|
|
1393
1393
|
"stacked-bar": Br
|
|
1394
1394
|
};
|
|
1395
|
-
function
|
|
1395
|
+
function St(t, e, r, n, a, o, l, i) {
|
|
1396
1396
|
const u = v(
|
|
1397
1397
|
() => {
|
|
1398
1398
|
var d;
|
|
@@ -1406,11 +1406,11 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1406
1406
|
s
|
|
1407
1407
|
) : Pr(d, s);
|
|
1408
1408
|
t.value = _.map((p, h) => ({
|
|
1409
|
-
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) :
|
|
1410
|
-
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ?
|
|
1409
|
+
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) : Ce(r.value, h),
|
|
1410
|
+
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(p)
|
|
1411
1411
|
}));
|
|
1412
1412
|
}
|
|
1413
|
-
return
|
|
1413
|
+
return D(
|
|
1414
1414
|
[r, n],
|
|
1415
1415
|
() => {
|
|
1416
1416
|
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
@@ -1418,7 +1418,7 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1418
1418
|
{ immediate: !0 }
|
|
1419
1419
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function Gr() {
|
|
1422
1422
|
const t = Oe({
|
|
1423
1423
|
opened: !1,
|
|
1424
1424
|
targetElement: null
|
|
@@ -1429,7 +1429,7 @@ function Fr() {
|
|
|
1429
1429
|
t.opened = !1, t.targetElement = null;
|
|
1430
1430
|
} };
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function Fr(t) {
|
|
1433
1433
|
return { getTooltipItems: v(
|
|
1434
1434
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1435
1435
|
var l, i, u;
|
|
@@ -1441,18 +1441,18 @@ function Gr(t) {
|
|
|
1441
1441
|
})
|
|
1442
1442
|
) };
|
|
1443
1443
|
}
|
|
1444
|
-
const Re = 16, Pe = 8, Be = 28,
|
|
1444
|
+
const Re = 16, Pe = 8, Be = 28, Ge = 24, ae = {
|
|
1445
1445
|
VERTICAL: {
|
|
1446
1446
|
top: Re,
|
|
1447
1447
|
right: Pe,
|
|
1448
1448
|
bottom: Be,
|
|
1449
|
-
left:
|
|
1449
|
+
left: Ge
|
|
1450
1450
|
},
|
|
1451
1451
|
HORIZONTAL: {
|
|
1452
1452
|
top: Re,
|
|
1453
1453
|
right: Pe,
|
|
1454
1454
|
bottom: Be,
|
|
1455
|
-
left:
|
|
1455
|
+
left: Ge
|
|
1456
1456
|
}
|
|
1457
1457
|
};
|
|
1458
1458
|
function jr(t) {
|
|
@@ -1465,7 +1465,7 @@ function Mr(t, e) {
|
|
|
1465
1465
|
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Be : t.bottom;
|
|
1466
1466
|
}
|
|
1467
1467
|
function zr(t, e) {
|
|
1468
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1468
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Ge : t.left;
|
|
1469
1469
|
}
|
|
1470
1470
|
const Wr = /* @__PURE__ */ H({
|
|
1471
1471
|
__name: "lume-chart",
|
|
@@ -1477,20 +1477,20 @@ const Wr = /* @__PURE__ */ H({
|
|
|
1477
1477
|
}
|
|
1478
1478
|
},
|
|
1479
1479
|
setup(t, { emit: e }) {
|
|
1480
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d = I(-1), s = I(null), _ = I(null), m = I([]), p = I(null), h = I(0), y = I(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize:
|
|
1480
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d = I(-1), s = I(null), _ = I(null), m = I([]), p = I(null), h = I(0), y = I(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize: w, chartID: T } = Je(a, o, l, f, u), { listenInternalEvent: S } = J(e, T), { xScale: C, yScale: R } = $r(
|
|
1481
1481
|
k,
|
|
1482
1482
|
x,
|
|
1483
1483
|
A,
|
|
1484
1484
|
u,
|
|
1485
1485
|
f
|
|
1486
|
-
),
|
|
1486
|
+
), F = v(() => ({
|
|
1487
1487
|
top: jr(f.value.margins),
|
|
1488
1488
|
right: Vr(f.value.margins),
|
|
1489
1489
|
bottom: Mr(f.value.margins, h.value),
|
|
1490
1490
|
left: zr(f.value.margins, y.value)
|
|
1491
1491
|
})), j = v(() => {
|
|
1492
1492
|
var b;
|
|
1493
|
-
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) :
|
|
1493
|
+
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : C.value;
|
|
1494
1494
|
}), W = v(() => {
|
|
1495
1495
|
var b;
|
|
1496
1496
|
return r.yScale ? it(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
@@ -1517,12 +1517,12 @@ const Wr = /* @__PURE__ */ H({
|
|
|
1517
1517
|
), Z = v(() => {
|
|
1518
1518
|
const b = [], { noBaseScales: P } = f.value;
|
|
1519
1519
|
return !P && !N.value && b.push(() => !!(j.value && W.value)), b.every((V) => V() === !0);
|
|
1520
|
-
}), { hasNegativeValues: U } =
|
|
1520
|
+
}), { hasNegativeValues: U } = Cr(k), { negativeBarAttributes: G } = Rr(
|
|
1521
1521
|
A,
|
|
1522
1522
|
j,
|
|
1523
1523
|
W,
|
|
1524
1524
|
u
|
|
1525
|
-
), { shouldGenerateTooltipAnchors: qe } =
|
|
1525
|
+
), { shouldGenerateTooltipAnchors: qe } = St(
|
|
1526
1526
|
m,
|
|
1527
1527
|
f,
|
|
1528
1528
|
j,
|
|
@@ -1531,7 +1531,7 @@ const Wr = /* @__PURE__ */ H({
|
|
|
1531
1531
|
u,
|
|
1532
1532
|
k,
|
|
1533
1533
|
c
|
|
1534
|
-
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } =
|
|
1534
|
+
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Gr(), { getTooltipItems: ye } = Fr(k), ue = v(
|
|
1535
1535
|
() => {
|
|
1536
1536
|
var b;
|
|
1537
1537
|
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
@@ -1555,7 +1555,7 @@ const Wr = /* @__PURE__ */ H({
|
|
|
1555
1555
|
function ke() {
|
|
1556
1556
|
le(), d.value = -1, e("update:hoveredIndex", -1);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function we(b) {
|
|
1559
1559
|
if (!a.value.some(
|
|
1560
1560
|
({ values: V }) => b <= V.length - 1
|
|
1561
1561
|
)) {
|
|
@@ -1564,34 +1564,34 @@ const Wr = /* @__PURE__ */ H({
|
|
|
1564
1564
|
}
|
|
1565
1565
|
b == null || b === -1 ? ke() : be(b);
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function Gt() {
|
|
1568
1568
|
setTimeout(() => {
|
|
1569
1569
|
et.value && ke(), e("chart-mouseleave");
|
|
1570
1570
|
}, 0);
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1572
|
+
function Ft({ index: b, value: P, event: V }) {
|
|
1573
1573
|
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: V });
|
|
1574
1574
|
}
|
|
1575
1575
|
function jt({ index: b, value: P, event: V }) {
|
|
1576
1576
|
e("axis-click", { index: b, value: P, event: V });
|
|
1577
1577
|
}
|
|
1578
|
-
return
|
|
1578
|
+
return D(
|
|
1579
1579
|
a,
|
|
1580
1580
|
(b, P) => e("data-changed", { newValue: b, oldValue: P })
|
|
1581
|
-
),
|
|
1581
|
+
), D(
|
|
1582
1582
|
o,
|
|
1583
1583
|
(b, P) => e("labels-changed", { newValue: b, oldValue: P })
|
|
1584
|
-
),
|
|
1584
|
+
), D(N, (b) => b && q(Y.Empty), { immediate: !0 }), D(() => r.hoveredIndex, we), D(
|
|
1585
1585
|
m,
|
|
1586
1586
|
(b) => {
|
|
1587
|
-
b && r.hoveredIndex != null && d.value === -1 &&
|
|
1587
|
+
b && r.hoveredIndex != null && d.value === -1 && we(r.hoveredIndex);
|
|
1588
1588
|
},
|
|
1589
1589
|
{ flush: "post" }
|
|
1590
|
-
),
|
|
1590
|
+
), D(p, (b) => {
|
|
1591
1591
|
b === !1 && ve.opened && ke();
|
|
1592
1592
|
}), ee(async () => {
|
|
1593
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1594
|
-
}),
|
|
1593
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), S("lume__internal--hover", be);
|
|
1594
|
+
}), Ee("chartID", T), Ee("isEmpty", N), Ee("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: x, containerSize: A, updateSize: w, chartID: T, listenInternalEvent: S, xScale: C, yScale: R, computedMargins: F, computedXScale: j, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: $, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: qe, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: et, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: we, handleMouseleave: Gt, handleAxisMouseenter: Ft, handleAxisClick: jt, LumeAxis: Hn, LumeBar: Ye, LumeChartContainer: zn, LumeChartLegend: Yn, LumeTooltip: pr, LumeOverlayGroup: Dr, TOOLTIP_ANCHOR_RADIUS: yn };
|
|
1595
1595
|
}
|
|
1596
1596
|
});
|
|
1597
1597
|
var Zr = function() {
|
|
@@ -1651,7 +1651,7 @@ var Zr = function() {
|
|
|
1651
1651
|
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
|
|
1652
1652
|
return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
|
|
1653
1653
|
}), 0) : e._e(), e._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.internalHoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: e.classList })] : e._e()], 2);
|
|
1654
|
-
}, Ur = [], Xr = /* @__PURE__ */
|
|
1654
|
+
}, Ur = [], Xr = /* @__PURE__ */ E(
|
|
1655
1655
|
Wr,
|
|
1656
1656
|
Zr,
|
|
1657
1657
|
Ur,
|
|
@@ -1671,7 +1671,7 @@ const de = Xr.exports, dt = 8, Yr = 8, Kr = 20, se = 2, vt = 2, Jr = /* @__PURE_
|
|
|
1671
1671
|
emits: ["lume__internal--node-resize"],
|
|
1672
1672
|
setup(t, { emit: e }) {
|
|
1673
1673
|
const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
|
|
1674
|
-
return
|
|
1674
|
+
return D(
|
|
1675
1675
|
[n, () => r.maxWidth],
|
|
1676
1676
|
async ([l, i]) => {
|
|
1677
1677
|
if (l && i) {
|
|
@@ -1681,7 +1681,7 @@ const de = Xr.exports, dt = 8, Yr = 8, Kr = 20, se = 2, vt = 2, Jr = /* @__PURE_
|
|
|
1681
1681
|
}
|
|
1682
1682
|
},
|
|
1683
1683
|
{ immediate: !0 }
|
|
1684
|
-
),
|
|
1684
|
+
), D(a, async (l) => {
|
|
1685
1685
|
l !== r.maxWidth && (await tt(), e("lume__internal--node-resize"));
|
|
1686
1686
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
|
|
1687
1687
|
}
|
|
@@ -1689,7 +1689,7 @@ const de = Xr.exports, dt = 8, Yr = 8, Kr = 20, se = 2, vt = 2, Jr = /* @__PURE_
|
|
|
1689
1689
|
var Qr = function() {
|
|
1690
1690
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1691
1691
|
return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1692
|
-
}, qr = [], ea = /* @__PURE__ */
|
|
1692
|
+
}, qr = [], ea = /* @__PURE__ */ E(
|
|
1693
1693
|
Jr,
|
|
1694
1694
|
Qr,
|
|
1695
1695
|
qr,
|
|
@@ -1711,7 +1711,7 @@ const ta = ea.exports, na = /* @__PURE__ */ H({
|
|
|
1711
1711
|
var ra = function() {
|
|
1712
1712
|
var e = this, r = e._self._c;
|
|
1713
1713
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { y: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1714
|
-
}, aa = [], oa = /* @__PURE__ */
|
|
1714
|
+
}, aa = [], oa = /* @__PURE__ */ E(
|
|
1715
1715
|
na,
|
|
1716
1716
|
ra,
|
|
1717
1717
|
aa,
|
|
@@ -1739,7 +1739,7 @@ const la = oa.exports, ua = /* @__PURE__ */ H({
|
|
|
1739
1739
|
var ia = function() {
|
|
1740
1740
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1741
1741
|
return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption" }, [e._t("default")], 2), r("g", { attrs: { transform: n.afterTransform } }, [e._t("after")], 2)]);
|
|
1742
|
-
}, sa = [], ca = /* @__PURE__ */
|
|
1742
|
+
}, sa = [], ca = /* @__PURE__ */ E(
|
|
1743
1743
|
ua,
|
|
1744
1744
|
ia,
|
|
1745
1745
|
sa,
|
|
@@ -1767,7 +1767,7 @@ function va(t) {
|
|
|
1767
1767
|
}
|
|
1768
1768
|
var Te = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Te || {});
|
|
1769
1769
|
const _a = "[lume] ";
|
|
1770
|
-
function
|
|
1770
|
+
function Fe(t, e, r = !0) {
|
|
1771
1771
|
r && At() || console.error(_a + "Error: " + t, e);
|
|
1772
1772
|
}
|
|
1773
1773
|
const fa = 200;
|
|
@@ -1780,7 +1780,7 @@ function pa(t, e) {
|
|
|
1780
1780
|
function ma(t, e) {
|
|
1781
1781
|
return e.links.find((r) => r.id === t);
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function Ct(t) {
|
|
1784
1784
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1785
1785
|
}
|
|
1786
1786
|
function ha(t, e) {
|
|
@@ -1925,7 +1925,7 @@ function Ta(t, e, r) {
|
|
|
1925
1925
|
_.value === 0 && (_.fallbackColor = Ue.Grey), typeof _.offset == "number" && (u(_), c(_, n.value));
|
|
1926
1926
|
})), n.value;
|
|
1927
1927
|
});
|
|
1928
|
-
return
|
|
1928
|
+
return D([l, r], () => {
|
|
1929
1929
|
try {
|
|
1930
1930
|
const { x0: s, y0: _, x1: m, y1: p } = r.value;
|
|
1931
1931
|
n.value = l.value.extent([
|
|
@@ -1933,7 +1933,7 @@ function Ta(t, e, r) {
|
|
|
1933
1933
|
[m, p]
|
|
1934
1934
|
])({ nodes: a.value, links: o.value });
|
|
1935
1935
|
} catch (s) {
|
|
1936
|
-
|
|
1936
|
+
Fe(Te.GraphProblem, s), n.value = Aa;
|
|
1937
1937
|
}
|
|
1938
1938
|
}), { columns: i, graph: d };
|
|
1939
1939
|
}
|
|
@@ -1958,7 +1958,7 @@ function La(t, e) {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
const Oa = (t, e) => {
|
|
1960
1960
|
let r;
|
|
1961
|
-
|
|
1961
|
+
Ct(t) ? r = {
|
|
1962
1962
|
[t.id]: t.value,
|
|
1963
1963
|
...je(t),
|
|
1964
1964
|
...Ve(t)
|
|
@@ -1971,7 +1971,7 @@ const Oa = (t, e) => {
|
|
|
1971
1971
|
const n = La(r, e);
|
|
1972
1972
|
return { nodes: r, links: n };
|
|
1973
1973
|
}, $a = (t) => {
|
|
1974
|
-
if (
|
|
1974
|
+
if (Ct(t)) {
|
|
1975
1975
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1976
1976
|
return {
|
|
1977
1977
|
nodes: e.reduce(
|
|
@@ -1994,7 +1994,7 @@ function Ia(t, e, r) {
|
|
|
1994
1994
|
n.value,
|
|
1995
1995
|
r.value
|
|
1996
1996
|
) : e.value.highlightedElements === "closest" ? $a(n.value, r.value) : Oa(n.value, r.value) : { nodes: {}, links: [] });
|
|
1997
|
-
return
|
|
1997
|
+
return D(a, (o, l) => {
|
|
1998
1998
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1999
1999
|
t.value.forEach((i) => {
|
|
2000
2000
|
i.node.id in l.nodes && ft(
|
|
@@ -2017,7 +2017,7 @@ function Ia(t, e, r) {
|
|
|
2017
2017
|
});
|
|
2018
2018
|
}), { highlightedElements: a, hoveredElement: n };
|
|
2019
2019
|
}
|
|
2020
|
-
const
|
|
2020
|
+
const wa = /* @__PURE__ */ H({
|
|
2021
2021
|
__name: "lume-alluvial-group",
|
|
2022
2022
|
props: {
|
|
2023
2023
|
...Ie(),
|
|
@@ -2047,30 +2047,30 @@ const Ea = /* @__PURE__ */ H({
|
|
|
2047
2047
|
), A = v(() => {
|
|
2048
2048
|
if (!(!o.value.gradient || !_.value))
|
|
2049
2049
|
return _.value.links.reduce((g, O) => {
|
|
2050
|
-
const { source: N, target: Z } = O, U = N.color || N.fallbackColor,
|
|
2050
|
+
const { source: N, target: Z } = O, U = N.color || N.fallbackColor, G = Z.deriveColorFromIncomingLinks ? U : Z.color || Z.fallbackColor;
|
|
2051
2051
|
return g[O.id] = {
|
|
2052
2052
|
source: U,
|
|
2053
|
-
target:
|
|
2053
|
+
target: G,
|
|
2054
2054
|
x1: N.x1,
|
|
2055
2055
|
x2: Z.x0
|
|
2056
2056
|
}, g;
|
|
2057
2057
|
}, {});
|
|
2058
|
-
}),
|
|
2058
|
+
}), w = v(() => {
|
|
2059
2059
|
const g = l.value.filter(
|
|
2060
2060
|
(N) => j(N)
|
|
2061
2061
|
), O = [];
|
|
2062
2062
|
return g.forEach((N) => {
|
|
2063
2063
|
const Z = [];
|
|
2064
|
-
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U,
|
|
2065
|
-
const ge =
|
|
2064
|
+
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G, qe, ve) => {
|
|
2065
|
+
const ge = G.link.target.y1 - G.link.target.y0 > se;
|
|
2066
2066
|
let le, ye, ue;
|
|
2067
|
-
return ge ? (le =
|
|
2067
|
+
return ge ? (le = G.link.target.y1 - G.link.target.y0, ye = G.link.value / N.node.value, ue = ye * le) : (le = se, ue = se / ve.length), Z.push({
|
|
2068
2068
|
x: N.x,
|
|
2069
2069
|
y: N.y + U,
|
|
2070
2070
|
height: ue,
|
|
2071
2071
|
width: N.width,
|
|
2072
|
-
key: `node-block-${N.node.id}-source-link-${
|
|
2073
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2072
|
+
key: `node-block-${N.node.id}-source-link-${G.link.source.id}`,
|
|
2073
|
+
class: `lume-alluvial-group__node-block lume-fill--${G.link.source.color || he}`
|
|
2074
2074
|
}), U + ue;
|
|
2075
2075
|
}, 0), O.push({
|
|
2076
2076
|
id: N.node.id,
|
|
@@ -2081,16 +2081,16 @@ const Ea = /* @__PURE__ */ H({
|
|
|
2081
2081
|
function T(g) {
|
|
2082
2082
|
return o.value.gradient && `url('#${n}_${g.id}')`;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function S(g) {
|
|
2085
2085
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function C(g) {
|
|
2088
2088
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2089
2089
|
}
|
|
2090
2090
|
function R(g) {
|
|
2091
2091
|
return p.value.links.length > 0 && !p.value.links.includes(g);
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function F(g) {
|
|
2094
2094
|
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2095
2095
|
}
|
|
2096
2096
|
function j(g) {
|
|
@@ -2117,20 +2117,20 @@ const Ea = /* @__PURE__ */ H({
|
|
|
2117
2117
|
}
|
|
2118
2118
|
function ne(g) {
|
|
2119
2119
|
var O;
|
|
2120
|
-
return ((O =
|
|
2120
|
+
return ((O = w.value.find(({ id: N }) => g === N)) == null ? void 0 : O.subNodes) ?? [];
|
|
2121
2121
|
}
|
|
2122
2122
|
function $() {
|
|
2123
2123
|
const g = ha(_.value, u.value);
|
|
2124
2124
|
d(g);
|
|
2125
2125
|
}
|
|
2126
|
-
return
|
|
2126
|
+
return D(_, (g) => {
|
|
2127
2127
|
l.value = ga(g.nodes), i.value = xa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2128
|
-
}),
|
|
2128
|
+
}), D([r.containerSize, u], () => {
|
|
2129
2129
|
r.containerSize.width && r.containerSize.height && $();
|
|
2130
|
-
}),
|
|
2130
|
+
}), D(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: x, gradients: A, nodesDerivingColorFromIncomingLinks: w, getLinkStroke: T, isNodeFaded: S, isNodeFocused: C, isLinkFaded: R, isLinkFocused: F, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: $, LumeAlluvialNodeLabel: ta, LumeAlluvialNodeValue: la, LumeAlluvialNodeHeader: da, GHOST_STROKE_WIDTH_OFFSET: Yr };
|
|
2131
2131
|
}
|
|
2132
2132
|
});
|
|
2133
|
-
var
|
|
2133
|
+
var Ea = function() {
|
|
2134
2134
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2135
2135
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
|
|
2136
2136
|
return [e._t(`node-header-${o}`, function() {
|
|
@@ -2184,9 +2184,9 @@ var wa = function() {
|
|
|
2184
2184
|
a.node.value
|
|
2185
2185
|
) })], 2)], 2)]);
|
|
2186
2186
|
})], 2);
|
|
2187
|
-
}, Na = [], Ha = /* @__PURE__ */
|
|
2188
|
-
Ea,
|
|
2187
|
+
}, Na = [], Ha = /* @__PURE__ */ E(
|
|
2189
2188
|
wa,
|
|
2189
|
+
Ea,
|
|
2190
2190
|
Na,
|
|
2191
2191
|
!1,
|
|
2192
2192
|
null,
|
|
@@ -2194,7 +2194,7 @@ var wa = function() {
|
|
|
2194
2194
|
null,
|
|
2195
2195
|
null
|
|
2196
2196
|
);
|
|
2197
|
-
const
|
|
2197
|
+
const Da = Ha.exports, Sa = {
|
|
2198
2198
|
margins: {
|
|
2199
2199
|
top: 0,
|
|
2200
2200
|
right: 0,
|
|
@@ -2213,13 +2213,13 @@ const Ca = Ha.exports, Da = {
|
|
|
2213
2213
|
nodeAlign: Jt,
|
|
2214
2214
|
valueFormat: (t) => String(t),
|
|
2215
2215
|
iterations: 6
|
|
2216
|
-
},
|
|
2216
|
+
}, Ca = /* @__PURE__ */ H({
|
|
2217
2217
|
__name: "lume-alluvial-diagram",
|
|
2218
2218
|
props: {
|
|
2219
2219
|
...Ir(ze)
|
|
2220
2220
|
},
|
|
2221
2221
|
setup(t, { emit: e }) {
|
|
2222
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = _n(M()), { options: l } = B(r), { allOptions: i } = K(l,
|
|
2222
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = _n(M()), { options: l } = B(r), { allOptions: i } = K(l, Sa);
|
|
2223
2223
|
function u(c) {
|
|
2224
2224
|
return {
|
|
2225
2225
|
...c,
|
|
@@ -2227,7 +2227,7 @@ const Ca = Ha.exports, Da = {
|
|
|
2227
2227
|
// Alluvial chart never uses base scales
|
|
2228
2228
|
};
|
|
2229
2229
|
}
|
|
2230
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup:
|
|
2230
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup: Da };
|
|
2231
2231
|
}
|
|
2232
2232
|
});
|
|
2233
2233
|
var Ra = function() {
|
|
@@ -2243,8 +2243,8 @@ var Ra = function() {
|
|
|
2243
2243
|
return [e._t(o, null, null, l || {})];
|
|
2244
2244
|
} };
|
|
2245
2245
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2246
|
-
}, Pa = [], Ba = /* @__PURE__ */
|
|
2247
|
-
|
|
2246
|
+
}, Pa = [], Ba = /* @__PURE__ */ E(
|
|
2247
|
+
Ca,
|
|
2248
2248
|
Ra,
|
|
2249
2249
|
Pa,
|
|
2250
2250
|
!1,
|
|
@@ -2255,7 +2255,7 @@ var Ra = function() {
|
|
|
2255
2255
|
);
|
|
2256
2256
|
const Qo = Ba.exports;
|
|
2257
2257
|
var Me = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Me || {});
|
|
2258
|
-
const
|
|
2258
|
+
const Ga = /* @__PURE__ */ H({
|
|
2259
2259
|
__name: "lume-bar-chart",
|
|
2260
2260
|
props: {
|
|
2261
2261
|
...ce(),
|
|
@@ -2298,16 +2298,16 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2298
2298
|
return { __sfc: !0, TYPES: Me, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: d };
|
|
2299
2299
|
}
|
|
2300
2300
|
});
|
|
2301
|
-
var
|
|
2301
|
+
var Fa = function() {
|
|
2302
2302
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2303
2303
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2304
2304
|
return { key: o, fn: function(l) {
|
|
2305
2305
|
return [e._t(o, null, null, l || {})];
|
|
2306
2306
|
} };
|
|
2307
2307
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2308
|
-
}, ja = [], Va = /* @__PURE__ */
|
|
2309
|
-
Fa,
|
|
2308
|
+
}, ja = [], Va = /* @__PURE__ */ E(
|
|
2310
2309
|
Ga,
|
|
2310
|
+
Fa,
|
|
2311
2311
|
ja,
|
|
2312
2312
|
!1,
|
|
2313
2313
|
null,
|
|
@@ -2365,7 +2365,7 @@ function Ua(t, e, r) {
|
|
|
2365
2365
|
() => r.value === L.HORIZONTAL
|
|
2366
2366
|
);
|
|
2367
2367
|
function a(i) {
|
|
2368
|
-
i ||
|
|
2368
|
+
i || Fe(Te.BarScaleNull), Math.min(...i.domain()) > 0 && Fe(Te.BarScaleDomainAbove0);
|
|
2369
2369
|
}
|
|
2370
2370
|
const o = v(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = v(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2371
2371
|
return { barXScale: o, barYScale: l };
|
|
@@ -2393,13 +2393,13 @@ function Ya(t, e, r, n, a, o) {
|
|
|
2393
2393
|
function d(s, _, m) {
|
|
2394
2394
|
if (!(e.value && r.value))
|
|
2395
2395
|
return Xa;
|
|
2396
|
-
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x: k, y: x } = i(h, m), A = u(h),
|
|
2396
|
+
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x: k, y: x } = i(h, m), A = u(h), w = c(h);
|
|
2397
2397
|
return {
|
|
2398
2398
|
classList: [`lume-fill--${f}`, ...o],
|
|
2399
2399
|
x: k,
|
|
2400
2400
|
y: x,
|
|
2401
2401
|
width: A,
|
|
2402
|
-
height:
|
|
2402
|
+
height: w,
|
|
2403
2403
|
isFaded: a.value !== -1 && a.value !== m,
|
|
2404
2404
|
isNegative: h < 0
|
|
2405
2405
|
};
|
|
@@ -2438,13 +2438,13 @@ function Ja(t, e, r, n, a, o) {
|
|
|
2438
2438
|
function m(p, h, y) {
|
|
2439
2439
|
if (!(e.value && r.value))
|
|
2440
2440
|
return Ka;
|
|
2441
|
-
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h],
|
|
2441
|
+
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], w = c(k, y, h), T = d(k, y, h), S = s(k), C = _(k);
|
|
2442
2442
|
return {
|
|
2443
2443
|
classList: [`lume-fill--${A}`, ...o],
|
|
2444
|
-
x:
|
|
2444
|
+
x: w,
|
|
2445
2445
|
y: T,
|
|
2446
|
-
width:
|
|
2447
|
-
height:
|
|
2446
|
+
width: S,
|
|
2447
|
+
height: C,
|
|
2448
2448
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2449
2449
|
isNegative: k < 0
|
|
2450
2450
|
};
|
|
@@ -2499,8 +2499,8 @@ function qa(t, e, r, n, a, o) {
|
|
|
2499
2499
|
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2500
2500
|
);
|
|
2501
2501
|
function c(f, k, x) {
|
|
2502
|
-
let A,
|
|
2503
|
-
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x),
|
|
2502
|
+
let A, w;
|
|
2503
|
+
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x), w = r.value(i.value[k])) : (A = e.value(i.value[k]), w = r.value(f >= 0 ? f + x : 0 + x)), { x: A, y: w };
|
|
2504
2504
|
}
|
|
2505
2505
|
function d(f) {
|
|
2506
2506
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
@@ -2515,19 +2515,19 @@ function qa(t, e, r, n, a, o) {
|
|
|
2515
2515
|
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2516
2516
|
}
|
|
2517
2517
|
function p(f, k) {
|
|
2518
|
-
return f ? u.value.reduce((x, A,
|
|
2518
|
+
return f ? u.value.reduce((x, A, w) => (w < f && A[k] >= 0 && (x += A[k]), x), 0) : 0;
|
|
2519
2519
|
}
|
|
2520
2520
|
function h(f, k) {
|
|
2521
|
-
return f ? u.value.reduce((x, A,
|
|
2521
|
+
return f ? u.value.reduce((x, A, w) => (w < f && A[k] < 0 && (x += A[k]), x), 0) : 0;
|
|
2522
2522
|
}
|
|
2523
2523
|
function y(f, k, x) {
|
|
2524
|
-
const { value: A, color:
|
|
2524
|
+
const { value: A, color: w } = f, T = A >= 0 ? d(A) : s(A), S = A >= 0 ? _(A) : m(A), C = A >= 0 ? p(k, x) : h(k, x), { x: R, y: F } = c(A, x, C);
|
|
2525
2525
|
return {
|
|
2526
|
-
classList: [`lume-fill--${
|
|
2526
|
+
classList: [`lume-fill--${w ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2527
2527
|
width: T,
|
|
2528
|
-
height:
|
|
2528
|
+
height: S,
|
|
2529
2529
|
x: R,
|
|
2530
|
-
y:
|
|
2530
|
+
y: F,
|
|
2531
2531
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2532
2532
|
isNegative: A < 0
|
|
2533
2533
|
};
|
|
@@ -2565,7 +2565,7 @@ const mt = {
|
|
|
2565
2565
|
classList: d,
|
|
2566
2566
|
labels: s
|
|
2567
2567
|
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Rt(n, s), { barXScale: h, barYScale: y } = Ua(u, c, o), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2568
|
-
const
|
|
2568
|
+
const w = Za(n, i), { barAttributeGenerator: T } = mt[w](
|
|
2569
2569
|
n,
|
|
2570
2570
|
h,
|
|
2571
2571
|
y,
|
|
@@ -2578,8 +2578,8 @@ const mt = {
|
|
|
2578
2578
|
if (l.value)
|
|
2579
2579
|
return o.value === L.HORIZONTAL ? "width" : "height";
|
|
2580
2580
|
});
|
|
2581
|
-
async function A(
|
|
2582
|
-
e("lume__internal--hover",
|
|
2581
|
+
async function A(w) {
|
|
2582
|
+
e("lume__internal--hover", w), m("lume__internal--hover", w);
|
|
2583
2583
|
}
|
|
2584
2584
|
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: x, handleInternalHover: A, LumeBar: Ye };
|
|
2585
2585
|
}
|
|
@@ -2599,7 +2599,7 @@ var to = function() {
|
|
|
2599
2599
|
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2600
2600
|
}), 1);
|
|
2601
2601
|
}), 0);
|
|
2602
|
-
}, no = [], ro = /* @__PURE__ */
|
|
2602
|
+
}, no = [], ro = /* @__PURE__ */ E(
|
|
2603
2603
|
eo,
|
|
2604
2604
|
to,
|
|
2605
2605
|
no,
|
|
@@ -2644,7 +2644,7 @@ var lo = function() {
|
|
|
2644
2644
|
return [e._t(o, null, null, l || {})];
|
|
2645
2645
|
} };
|
|
2646
2646
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2647
|
-
}, uo = [], io = /* @__PURE__ */
|
|
2647
|
+
}, uo = [], io = /* @__PURE__ */ E(
|
|
2648
2648
|
oo,
|
|
2649
2649
|
lo,
|
|
2650
2650
|
uo,
|
|
@@ -2693,7 +2693,7 @@ var vo = function() {
|
|
|
2693
2693
|
return [e._t(o, null, null, l || {})];
|
|
2694
2694
|
} };
|
|
2695
2695
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2696
|
-
}, _o = [], fo = /* @__PURE__ */
|
|
2696
|
+
}, _o = [], fo = /* @__PURE__ */ E(
|
|
2697
2697
|
co,
|
|
2698
2698
|
vo,
|
|
2699
2699
|
_o,
|
|
@@ -2747,7 +2747,7 @@ var ho = function() {
|
|
|
2747
2747
|
return [e._t(o, null, null, l || {})];
|
|
2748
2748
|
} };
|
|
2749
2749
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2750
|
-
}, go = [], yo = /* @__PURE__ */
|
|
2750
|
+
}, go = [], yo = /* @__PURE__ */ E(
|
|
2751
2751
|
mo,
|
|
2752
2752
|
ho,
|
|
2753
2753
|
go,
|
|
@@ -2807,7 +2807,7 @@ var ko = function() {
|
|
|
2807
2807
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
2808
2808
|
return n.emit("click", a);
|
|
2809
2809
|
} } });
|
|
2810
|
-
}, xo = [], Ao = /* @__PURE__ */
|
|
2810
|
+
}, xo = [], Ao = /* @__PURE__ */ E(
|
|
2811
2811
|
bo,
|
|
2812
2812
|
ko,
|
|
2813
2813
|
xo,
|
|
@@ -2846,7 +2846,7 @@ var Oo = function() {
|
|
|
2846
2846
|
return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2847
2847
|
return n.emit("click", a);
|
|
2848
2848
|
} } });
|
|
2849
|
-
}, $o = [], Io = /* @__PURE__ */
|
|
2849
|
+
}, $o = [], Io = /* @__PURE__ */ E(
|
|
2850
2850
|
Lo,
|
|
2851
2851
|
Oo,
|
|
2852
2852
|
$o,
|
|
@@ -2856,7 +2856,7 @@ var Oo = function() {
|
|
|
2856
2856
|
null,
|
|
2857
2857
|
null
|
|
2858
2858
|
);
|
|
2859
|
-
const
|
|
2859
|
+
const wo = Io.exports;
|
|
2860
2860
|
function Pt(t) {
|
|
2861
2861
|
function e(o) {
|
|
2862
2862
|
let l = null;
|
|
@@ -2901,7 +2901,7 @@ function Pt(t) {
|
|
|
2901
2901
|
};
|
|
2902
2902
|
})) };
|
|
2903
2903
|
}
|
|
2904
|
-
function
|
|
2904
|
+
function Eo(t, e) {
|
|
2905
2905
|
const r = t.bandwidth() / 2;
|
|
2906
2906
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2907
2907
|
}
|
|
@@ -2910,11 +2910,11 @@ function No(t, e) {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
function Ho(t, e, r, n) {
|
|
2912
2912
|
const a = Zt().x(
|
|
2913
|
-
X(r) ?
|
|
2913
|
+
X(r) ? Eo(r, t) : No(r, t)
|
|
2914
2914
|
).y((o) => n(o));
|
|
2915
2915
|
return e.every((o) => o == null) ? null : a(e);
|
|
2916
2916
|
}
|
|
2917
|
-
const yt = 1,
|
|
2917
|
+
const yt = 1, Do = /* @__PURE__ */ H({
|
|
2918
2918
|
__name: "lume-line-group",
|
|
2919
2919
|
props: {
|
|
2920
2920
|
...Ie(),
|
|
@@ -2932,14 +2932,14 @@ const yt = 1, Co = /* @__PURE__ */ H({
|
|
|
2932
2932
|
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = B(r), u = Le(
|
|
2933
2933
|
"tooltipAnchorAttributes",
|
|
2934
2934
|
null
|
|
2935
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
2935
|
+
), { updateTooltipAnchorAttributes: c } = St(
|
|
2936
2936
|
u,
|
|
2937
2937
|
a,
|
|
2938
2938
|
o,
|
|
2939
2939
|
l,
|
|
2940
2940
|
i
|
|
2941
2941
|
), d = v(() => {
|
|
2942
|
-
if (n.value.every((
|
|
2942
|
+
if (n.value.every((S) => S.isDashed))
|
|
2943
2943
|
return n.value;
|
|
2944
2944
|
const { computedLineData: T } = Pt(n);
|
|
2945
2945
|
return a.value.withTooltip !== !1 && (u != null && u.value) && c(T.value), T.value;
|
|
@@ -2951,7 +2951,7 @@ const yt = 1, Co = /* @__PURE__ */ H({
|
|
|
2951
2951
|
r.hoveredIndex
|
|
2952
2952
|
);
|
|
2953
2953
|
return {
|
|
2954
|
-
d: `M ${
|
|
2954
|
+
d: `M ${Ce(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2955
2955
|
V ${l.value(T)}`
|
|
2956
2956
|
// Move to X index, Vertical line to the highest point
|
|
2957
2957
|
};
|
|
@@ -2972,15 +2972,15 @@ const yt = 1, Co = /* @__PURE__ */ H({
|
|
|
2972
2972
|
function f(T) {
|
|
2973
2973
|
return d.value[T].values;
|
|
2974
2974
|
}
|
|
2975
|
-
function k(T,
|
|
2976
|
-
var R,
|
|
2977
|
-
const
|
|
2978
|
-
(R = f(
|
|
2979
|
-
(
|
|
2975
|
+
function k(T, S) {
|
|
2976
|
+
var R, F;
|
|
2977
|
+
const C = T === 0 ? [] : [
|
|
2978
|
+
(R = f(S)[T - 1]) == null ? void 0 : R.value,
|
|
2979
|
+
(F = f(S)[T]) == null ? void 0 : F.value
|
|
2980
2980
|
];
|
|
2981
2981
|
return Ho(
|
|
2982
2982
|
T,
|
|
2983
|
-
|
|
2983
|
+
C,
|
|
2984
2984
|
o.value,
|
|
2985
2985
|
l.value
|
|
2986
2986
|
) || "";
|
|
@@ -2991,21 +2991,21 @@ const yt = 1, Co = /* @__PURE__ */ H({
|
|
|
2991
2991
|
animationDuration: _.value
|
|
2992
2992
|
};
|
|
2993
2993
|
}
|
|
2994
|
-
function A(T,
|
|
2994
|
+
function A(T, S) {
|
|
2995
2995
|
var R;
|
|
2996
|
-
const
|
|
2996
|
+
const C = (R = f(S)[T]) == null ? void 0 : R.value;
|
|
2997
2997
|
return {
|
|
2998
2998
|
x: X(o.value) ? r.xScale(h.value[T]) + p.value : r.xScale(T),
|
|
2999
|
-
y:
|
|
2999
|
+
y: C === null ? l.value(l.value.domain()[1]) : l.value(C)
|
|
3000
3000
|
};
|
|
3001
3001
|
}
|
|
3002
|
-
function
|
|
3002
|
+
function w(T) {
|
|
3003
3003
|
return r.hoveredIndex === T;
|
|
3004
3004
|
}
|
|
3005
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive:
|
|
3005
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive: w, LumeLine: To, LumePoint: wo };
|
|
3006
3006
|
}
|
|
3007
3007
|
});
|
|
3008
|
-
var
|
|
3008
|
+
var So = function() {
|
|
3009
3009
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3010
3010
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
3011
3011
|
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
|
|
@@ -3018,10 +3018,10 @@ var Do = function() {
|
|
|
3018
3018
|
} } }, "lume-point", n.getPointPosition(i, o), !1));
|
|
3019
3019
|
}), 1) : e._e()]);
|
|
3020
3020
|
})], 2);
|
|
3021
|
-
},
|
|
3022
|
-
Co,
|
|
3021
|
+
}, Co = [], Ro = /* @__PURE__ */ E(
|
|
3023
3022
|
Do,
|
|
3024
3023
|
So,
|
|
3024
|
+
Co,
|
|
3025
3025
|
!1,
|
|
3026
3026
|
null,
|
|
3027
3027
|
"44ba7be1",
|
|
@@ -3044,7 +3044,7 @@ const Bt = Ro.exports, Po = {
|
|
|
3044
3044
|
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: de, LumeLineGroup: Bt };
|
|
3045
3045
|
}
|
|
3046
3046
|
});
|
|
3047
|
-
var
|
|
3047
|
+
var Go = function() {
|
|
3048
3048
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3049
3049
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3050
3050
|
return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
@@ -3053,10 +3053,10 @@ var Fo = function() {
|
|
|
3053
3053
|
return [e._t(o, null, null, l || {})];
|
|
3054
3054
|
} };
|
|
3055
3055
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3056
|
-
},
|
|
3056
|
+
}, Fo = [], jo = /* @__PURE__ */ E(
|
|
3057
3057
|
Bo,
|
|
3058
|
-
Fo,
|
|
3059
3058
|
Go,
|
|
3059
|
+
Fo,
|
|
3060
3060
|
!1,
|
|
3061
3061
|
null,
|
|
3062
3062
|
null,
|
|
@@ -3133,7 +3133,7 @@ var Wo = function() {
|
|
|
3133
3133
|
return [e._t(o, null, null, l || {})];
|
|
3134
3134
|
} };
|
|
3135
3135
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3136
|
-
}, Zo = [], Uo = /* @__PURE__ */
|
|
3136
|
+
}, Zo = [], Uo = /* @__PURE__ */ E(
|
|
3137
3137
|
zo,
|
|
3138
3138
|
Wo,
|
|
3139
3139
|
Zo,
|
|
@@ -3146,7 +3146,7 @@ var Wo = function() {
|
|
|
3146
3146
|
const al = Uo.exports;
|
|
3147
3147
|
export {
|
|
3148
3148
|
Qo as LumeAlluvialDiagram,
|
|
3149
|
-
|
|
3149
|
+
Da as LumeAlluvialGroup,
|
|
3150
3150
|
da as LumeAlluvialNodeHeader,
|
|
3151
3151
|
ta as LumeAlluvialNodeLabel,
|
|
3152
3152
|
la as LumeAlluvialNodeValue,
|
|
@@ -3161,8 +3161,8 @@ export {
|
|
|
3161
3161
|
To as LumeLine,
|
|
3162
3162
|
rl as LumeLineChart,
|
|
3163
3163
|
Bt as LumeLineGroup,
|
|
3164
|
-
|
|
3165
|
-
|
|
3164
|
+
Dr as LumeOverlayGroup,
|
|
3165
|
+
wo as LumePoint,
|
|
3166
3166
|
el as LumeSingleBarChart,
|
|
3167
3167
|
al as LumeSparklineChart,
|
|
3168
3168
|
nl as LumeStackedBarChart,
|