@adyen/lume-vue3 1.5.2 → 1.5.3
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/index.js +191 -189
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, ref as R, openBlock as y, createElementBlock as
|
|
1
|
+
import { defineComponent as W, ref as R, openBlock as y, createElementBlock as $, mergeProps as C, createElementVNode as j, toDisplayString as oe, createCommentVNode as z, isRef as Nt, computed as v, watch as K, toRefs as ee, inject as Ne, reactive as Ce, onMounted as fe, unref as d, Fragment as Q, renderList as Z, createBlock as X, normalizeClass as ne, normalizeStyle as Dt, onBeforeUnmount as Ht, watchEffect as Bt, renderSlot as S, createTextVNode as de, useSlots as le, withDirectives as ln, withCtx as P, createSlots as se, vShow as rn, pushScopeId as un, popScopeId as sn, provide as Fe, createVNode as re, toHandlers as ae, normalizeProps as ve, guardReactiveProps as me, defineAsyncComponent as ze, resolveDynamicComponent as cn } from "vue";
|
|
2
2
|
import { format as dn, ticks as vn, scaleBand as we, scaleLinear as Ee, link as mn, line as pn, area as fn } from "d3";
|
|
3
3
|
import { createPopper as hn } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as gn, sankey as _n, sankeyJustify as yn } from "d3-sankey";
|
|
@@ -45,7 +45,7 @@ const kn = {
|
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
47
|
const o = t, a = R(null);
|
|
48
|
-
return n({ ref: a }), (r, l) => (y(),
|
|
48
|
+
return n({ ref: a }), (r, l) => (y(), $("g", C(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -65,7 +65,7 @@ const kn = {
|
|
|
65
65
|
class: "axis__label"
|
|
66
66
|
}), oe(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (y(),
|
|
68
|
+
e.withGridlines ? (y(), $("line", C({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : z("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
@@ -116,7 +116,7 @@ function be(e) {
|
|
|
116
116
|
function On(e) {
|
|
117
117
|
return be(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const xn = (e, n) => {
|
|
120
120
|
if (!e)
|
|
121
121
|
throw new Error("Data is not a valid array");
|
|
122
122
|
if (e.length === 0)
|
|
@@ -126,9 +126,9 @@ const $n = (e, n) => {
|
|
|
126
126
|
))
|
|
127
127
|
throw new Error("Index exceeds length of all of the datasets");
|
|
128
128
|
};
|
|
129
|
-
function
|
|
129
|
+
function $n(e, n) {
|
|
130
130
|
var t;
|
|
131
|
-
return
|
|
131
|
+
return xn(e, n), ((t = e.reduce(
|
|
132
132
|
(o, a) => {
|
|
133
133
|
var r, l;
|
|
134
134
|
return (((r = o.values[n]) == null ? void 0 : r.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
@@ -246,7 +246,7 @@ const B = {
|
|
|
246
246
|
SINGLE: "single",
|
|
247
247
|
GROUPED: "grouped",
|
|
248
248
|
STACKED: "stacked"
|
|
249
|
-
}, Gt = "No data", gt = 20, jt = 0.33,
|
|
249
|
+
}, Gt = "No data", gt = 20, jt = 0.33, Vt = 0.5, Pt = 12, He = 8, Sn = 1, Cn = [
|
|
250
250
|
"auto",
|
|
251
251
|
"auto-start",
|
|
252
252
|
"auto-end",
|
|
@@ -289,7 +289,7 @@ const Ft = {
|
|
|
289
289
|
}, jn = {
|
|
290
290
|
...Ft,
|
|
291
291
|
gridLines: !0
|
|
292
|
-
},
|
|
292
|
+
}, Vn = function(e, n, t) {
|
|
293
293
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
294
294
|
function a(s, c) {
|
|
295
295
|
return {
|
|
@@ -305,7 +305,7 @@ const Ft = {
|
|
|
305
305
|
return {
|
|
306
306
|
x: -(c - e.value.step()) / 2,
|
|
307
307
|
width: c,
|
|
308
|
-
height: t.value.tickPadding +
|
|
308
|
+
height: t.value.tickPadding + Pt + He
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
function l() {
|
|
@@ -331,7 +331,7 @@ const Ft = {
|
|
|
331
331
|
getTickGroupAttributes: a,
|
|
332
332
|
getTickLabelAttributes: i
|
|
333
333
|
};
|
|
334
|
-
},
|
|
334
|
+
}, Pn = function(e, n, t) {
|
|
335
335
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
336
336
|
function a(s, c) {
|
|
337
337
|
return {
|
|
@@ -381,7 +381,7 @@ const Ft = {
|
|
|
381
381
|
}
|
|
382
382
|
function r() {
|
|
383
383
|
return {
|
|
384
|
-
height: t.value.tickPadding +
|
|
384
|
+
height: t.value.tickPadding + Pt + He,
|
|
385
385
|
width: o.value,
|
|
386
386
|
x: -(o.value / 2)
|
|
387
387
|
};
|
|
@@ -443,8 +443,8 @@ const Ft = {
|
|
|
443
443
|
getTickLabelAttributes: i
|
|
444
444
|
};
|
|
445
445
|
}, Zn = {
|
|
446
|
-
"x-band-scale-axis":
|
|
447
|
-
"y-band-scale-axis":
|
|
446
|
+
"x-band-scale-axis": Vn,
|
|
447
|
+
"y-band-scale-axis": Pn,
|
|
448
448
|
"x-linear-scale-axis": Fn,
|
|
449
449
|
"y-linear-scale-axis": zn
|
|
450
450
|
}, Wn = ["transform"], Un = { key: 0 }, Xn = /* @__PURE__ */ j("linearGradient", { id: "lume-tick-gradient" }, [
|
|
@@ -510,7 +510,7 @@ const _t = /* @__PURE__ */ W({
|
|
|
510
510
|
), { allOptions: h } = ce(
|
|
511
511
|
s,
|
|
512
512
|
O.value === "x" ? Gn : jn
|
|
513
|
-
), { showTick:
|
|
513
|
+
), { showTick: x } = Mn(r, f, h.value.skip), w = v(() => {
|
|
514
514
|
var M, k, E, _;
|
|
515
515
|
return O.value === "y" && p.value ? `translate(0, ${((M = l.value) == null ? void 0 : M.height) / 2})` : O.value === "x" && p.value ? `translate(-${((k = l.value) == null ? void 0 : k.width) / 2}, ${(E = l.value) == null ? void 0 : E.height})` : `translate(0, ${O.value === "x" ? (_ = l.value) == null ? void 0 : _.height : 0})`;
|
|
516
516
|
}), D = v(() => {
|
|
@@ -580,7 +580,7 @@ const _t = /* @__PURE__ */ W({
|
|
|
580
580
|
}
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
|
-
return K(r, ge, { flush: "sync", immediate: !0 }), K(r, Le, { immediate: !0 }), K(f, Le), K(U, (M) => a("lume__internal--axis-size", M)), fe(() => Ge(g.value)), (M, k) => d(r) ? (y(),
|
|
583
|
+
return K(r, ge, { flush: "sync", immediate: !0 }), K(r, Le, { immediate: !0 }), K(f, Le), K(U, (M) => a("lume__internal--axis-size", M)), fe(() => Ge(g.value)), (M, k) => d(r) ? (y(), $("g", {
|
|
584
584
|
key: 0,
|
|
585
585
|
ref_key: "root",
|
|
586
586
|
ref: g,
|
|
@@ -589,17 +589,17 @@ const _t = /* @__PURE__ */ W({
|
|
|
589
589
|
"data-j-axis": "",
|
|
590
590
|
onMouseleave: k[1] || (k[1] = (E) => a("mouseleave", E))
|
|
591
591
|
}, [
|
|
592
|
-
O.value === "x" ? (y(),
|
|
593
|
-
(y(!0),
|
|
592
|
+
O.value === "x" ? (y(), $("defs", Un, Yn)) : z("", !0),
|
|
593
|
+
(y(!0), $(Q, null, Z(m.value, (E, _) => (y(), X(d(ht), C({
|
|
594
594
|
key: `${E.value}_${_}`,
|
|
595
595
|
ref_for: !0,
|
|
596
596
|
ref_key: "tickRefs",
|
|
597
597
|
ref: f
|
|
598
598
|
}, E, {
|
|
599
|
-
"is-hidden": d(h).skip && !d(
|
|
599
|
+
"is-hidden": d(h).skip && !d(x)(_),
|
|
600
600
|
"with-gridlines": d(h).gridLines,
|
|
601
|
-
onMouseenter: (
|
|
602
|
-
onClick: (
|
|
601
|
+
onMouseenter: (V) => F(_, E.value, V),
|
|
602
|
+
onClick: (V) => J(_, E.value, V)
|
|
603
603
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
604
604
|
H.value ? (y(), X(d(ht), C({ key: 1 }, m.value[d(i)], {
|
|
605
605
|
"with-gridlines": !1,
|
|
@@ -671,8 +671,8 @@ const Qn = ["x", "y", "width", "height"], qn = /* @__PURE__ */ W({
|
|
|
671
671
|
setup(e, { emit: n }) {
|
|
672
672
|
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: s, classList: c } = ee(t), p = R(null), u = v(
|
|
673
673
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
674
|
-
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m = Jn(a, r, l, i), { computedX: T, computedY: O, shouldHaveMinWidth: b, shouldHaveMinHeight: h } = Kn(a, r, l, i),
|
|
675
|
-
return fe(() => Ge(p.value)), (N, H) => (y(),
|
|
674
|
+
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m = Jn(a, r, l, i), { computedX: T, computedY: O, shouldHaveMinWidth: b, shouldHaveMinHeight: h } = Kn(a, r, l, i), x = v(() => b.value ? 1 : (f.value ? m.computedWidth : l).value), w = v(() => h.value ? 1 : (g.value ? m.computedHeight : i).value), D = f.value || g.value ? m.transformOrigin : null;
|
|
675
|
+
return fe(() => Ge(p.value)), (N, H) => (y(), $("rect", {
|
|
676
676
|
ref_key: "root",
|
|
677
677
|
ref: p,
|
|
678
678
|
class: ne(["lume-bar", [
|
|
@@ -687,7 +687,7 @@ const Qn = ["x", "y", "width", "height"], qn = /* @__PURE__ */ W({
|
|
|
687
687
|
style: Dt({ transformOrigin: d(D) }),
|
|
688
688
|
x: d(T),
|
|
689
689
|
y: d(O),
|
|
690
|
-
width:
|
|
690
|
+
width: x.value,
|
|
691
691
|
height: w.value,
|
|
692
692
|
"data-j-bar": "",
|
|
693
693
|
onClick: H[0] || (H[0] = (G) => o("click", G)),
|
|
@@ -749,7 +749,7 @@ const to = ["height"], no = ["transform"], oo = /* @__PURE__ */ W({
|
|
|
749
749
|
outerHeight: u
|
|
750
750
|
};
|
|
751
751
|
o("resize", m);
|
|
752
|
-
}), (p, u) => (y(),
|
|
752
|
+
}), (p, u) => (y(), $("div", {
|
|
753
753
|
ref_key: "resizeRef",
|
|
754
754
|
ref: i,
|
|
755
755
|
class: ne(["lume-chart-container", {
|
|
@@ -758,7 +758,7 @@ const to = ["height"], no = ["transform"], oo = /* @__PURE__ */ W({
|
|
|
758
758
|
"data-j-chart-container": ""
|
|
759
759
|
}, [
|
|
760
760
|
S(p.$slots, "header", {}, void 0, !0),
|
|
761
|
-
(y(),
|
|
761
|
+
(y(), $("svg", {
|
|
762
762
|
ref_key: "root",
|
|
763
763
|
ref: l,
|
|
764
764
|
class: ne(["lume-chart-container__svg", {
|
|
@@ -795,13 +795,13 @@ const ao = /* @__PURE__ */ q(oo, [["__scopeId", "data-v-36870bc4"]]), lo = ["onC
|
|
|
795
795
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
796
796
|
setup(e, { emit: n }) {
|
|
797
797
|
const t = n, o = Ne("isEmpty");
|
|
798
|
-
return (a, r) => d(o) ? z("", !0) : (y(),
|
|
798
|
+
return (a, r) => d(o) ? z("", !0) : (y(), $("div", {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "lume-chart-legend",
|
|
801
801
|
"data-j-chart-legend": "",
|
|
802
802
|
onMouseleave: r[0] || (r[0] = (l) => t("mouseleave"))
|
|
803
803
|
}, [
|
|
804
|
-
(y(!0),
|
|
804
|
+
(y(!0), $(Q, null, Z(e.data, (l, i) => (y(), $("div", {
|
|
805
805
|
key: `legend-item-${i}`,
|
|
806
806
|
class: "lume-chart-legend__item lume-typography--body",
|
|
807
807
|
tabindex: "0",
|
|
@@ -824,7 +824,7 @@ const uo = {}, io = {
|
|
|
824
824
|
"data-j-tooltip__title": ""
|
|
825
825
|
};
|
|
826
826
|
function so(e, n) {
|
|
827
|
-
return y(),
|
|
827
|
+
return y(), $("div", io, [
|
|
828
828
|
S(e.$slots, "default", {}, void 0, !0)
|
|
829
829
|
]);
|
|
830
830
|
}
|
|
@@ -834,7 +834,7 @@ const vo = {}, mo = {
|
|
|
834
834
|
"data-j-tooltip__summary-item": ""
|
|
835
835
|
}, po = { class: "lume-tooltip__value" };
|
|
836
836
|
function fo(e, n) {
|
|
837
|
-
return y(),
|
|
837
|
+
return y(), $("li", mo, [
|
|
838
838
|
j("span", null, [
|
|
839
839
|
S(e.$slots, "default", {}, void 0, !0)
|
|
840
840
|
]),
|
|
@@ -858,8 +858,8 @@ const ho = /* @__PURE__ */ q(vo, [["render", fo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
858
858
|
}
|
|
859
859
|
},
|
|
860
860
|
setup(e) {
|
|
861
|
-
return (n, t) => (y(),
|
|
862
|
-
e.color ? (y(),
|
|
861
|
+
return (n, t) => (y(), $("li", go, [
|
|
862
|
+
e.color ? (y(), $("span", {
|
|
863
863
|
key: 0,
|
|
864
864
|
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
865
865
|
"data-j-tooltip__item__symbol": ""
|
|
@@ -876,9 +876,9 @@ const ho = /* @__PURE__ */ q(vo, [["render", fo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
876
876
|
const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) => (un("data-v-8ec11304"), e = e(), sn(), e), To = { class: "lume-tooltip__items" }, Lo = {
|
|
877
877
|
key: 0,
|
|
878
878
|
class: "lume-tooltip__break"
|
|
879
|
-
}, Oo = /* @__PURE__ */ Ao(() => /* @__PURE__ */ j("hr", null, null, -1)),
|
|
879
|
+
}, Oo = /* @__PURE__ */ Ao(() => /* @__PURE__ */ j("hr", null, null, -1)), xo = [
|
|
880
880
|
Oo
|
|
881
|
-
],
|
|
881
|
+
], $o = /* @__PURE__ */ W({
|
|
882
882
|
__name: "lume-tooltip",
|
|
883
883
|
props: {
|
|
884
884
|
targetElement: {
|
|
@@ -948,20 +948,20 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
948
948
|
modifiers: f.value
|
|
949
949
|
}), o("opened", t.targetElement));
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function x() {
|
|
952
952
|
s.value && (s.value.destroy(), o("closed"));
|
|
953
953
|
}
|
|
954
954
|
function w() {
|
|
955
955
|
s.value && (c.value.withAnimation !== !1 && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
956
956
|
s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
|
|
957
|
-
}() :
|
|
957
|
+
}() : x());
|
|
958
958
|
}
|
|
959
959
|
return K(
|
|
960
960
|
() => t.targetElement,
|
|
961
961
|
(D, N) => {
|
|
962
962
|
!N && D ? h() : w();
|
|
963
963
|
}
|
|
964
|
-
), fe(h), Ht(
|
|
964
|
+
), fe(h), Ht(x), (D, N) => ln((y(), $("div", {
|
|
965
965
|
ref_key: "root",
|
|
966
966
|
ref: a,
|
|
967
967
|
class: ne(["lume-tooltip lume-typography--caption", {
|
|
@@ -974,7 +974,7 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
974
974
|
S(D.$slots, "default", {}, () => [
|
|
975
975
|
S(D.$slots, "title", {}, () => [
|
|
976
976
|
g.value ? (y(), X(d(co), { key: 0 }, {
|
|
977
|
-
default:
|
|
977
|
+
default: P(() => [
|
|
978
978
|
de(oe(T.value(e.title)), 1)
|
|
979
979
|
]),
|
|
980
980
|
_: 1
|
|
@@ -983,30 +983,30 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
983
983
|
j("ul", To, [
|
|
984
984
|
S(D.$slots, "summary", {}, () => [
|
|
985
985
|
b.value ? (y(), X(d(ho), { key: 0 }, se({
|
|
986
|
-
default:
|
|
986
|
+
default: P(() => [
|
|
987
987
|
de(oe(O.value.label) + " ", 1)
|
|
988
988
|
]),
|
|
989
989
|
_: 2
|
|
990
990
|
}, [
|
|
991
991
|
O.value.value ? {
|
|
992
992
|
name: "value",
|
|
993
|
-
fn:
|
|
993
|
+
fn: P(() => [
|
|
994
994
|
de(oe(m.value(O.value.value)), 1)
|
|
995
995
|
]),
|
|
996
996
|
key: "0"
|
|
997
997
|
} : void 0
|
|
998
998
|
]), 1024)) : z("", !0)
|
|
999
999
|
], !0),
|
|
1000
|
-
b.value ? (y(),
|
|
1000
|
+
b.value ? (y(), $("li", Lo, xo)) : z("", !0),
|
|
1001
1001
|
S(D.$slots, "items", {}, () => [
|
|
1002
|
-
(y(!0),
|
|
1002
|
+
(y(!0), $(Q, null, Z(d(r), (H) => (y(), X(d(bo), {
|
|
1003
1003
|
key: H.label,
|
|
1004
1004
|
color: H.color
|
|
1005
1005
|
}, {
|
|
1006
|
-
label:
|
|
1006
|
+
label: P(() => [
|
|
1007
1007
|
de(oe(H.label), 1)
|
|
1008
1008
|
]),
|
|
1009
|
-
value:
|
|
1009
|
+
value: P(() => [
|
|
1010
1010
|
de(oe(m.value(H.value)), 1)
|
|
1011
1011
|
]),
|
|
1012
1012
|
_: 2
|
|
@@ -1019,7 +1019,7 @@ const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) =
|
|
|
1019
1019
|
]);
|
|
1020
1020
|
}
|
|
1021
1021
|
});
|
|
1022
|
-
const Io = /* @__PURE__ */ q(
|
|
1022
|
+
const Io = /* @__PURE__ */ q($o, [["__scopeId", "data-v-8ec11304"]]);
|
|
1023
1023
|
var _e = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(_e || {});
|
|
1024
1024
|
const wo = _e.Categorical, Be = ue.Skyblue, Eo = ot.SkyTeal;
|
|
1025
1025
|
function No(e) {
|
|
@@ -1163,7 +1163,7 @@ function jo(e, n, t, o, a) {
|
|
|
1163
1163
|
return Bt(i), { xScale: r, yScale: l };
|
|
1164
1164
|
}
|
|
1165
1165
|
function At(e, n, t, o) {
|
|
1166
|
-
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, s = r ?? (t === B.HORIZONTAL ?
|
|
1166
|
+
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, s = r ?? (t === B.HORIZONTAL ? Vt : jt);
|
|
1167
1167
|
return Object.assign(
|
|
1168
1168
|
we().range(a).paddingInner(l ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1169
1169
|
{ labels: e }
|
|
@@ -1187,13 +1187,13 @@ function Ot(e, n, {
|
|
|
1187
1187
|
paddingInner: o,
|
|
1188
1188
|
paddingOuter: a
|
|
1189
1189
|
} = {}) {
|
|
1190
|
-
const r = t ?? (n === B.HORIZONTAL ?
|
|
1190
|
+
const r = t ?? (n === B.HORIZONTAL ? Vt : jt);
|
|
1191
1191
|
return e.copy().paddingInner(o ?? r).paddingOuter(a ?? r);
|
|
1192
1192
|
}
|
|
1193
1193
|
function Wt(e) {
|
|
1194
1194
|
return Object.values(B).includes(e);
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1196
|
+
const $e = (e, n = !0) => ({
|
|
1197
1197
|
...ut(e),
|
|
1198
1198
|
...Go(),
|
|
1199
1199
|
...De(),
|
|
@@ -1212,7 +1212,7 @@ const xe = (e, n = !0) => ({
|
|
|
1212
1212
|
validator: Wt
|
|
1213
1213
|
}
|
|
1214
1214
|
} : {}
|
|
1215
|
-
}),
|
|
1215
|
+
}), Vo = (e) => ({
|
|
1216
1216
|
...ut(e),
|
|
1217
1217
|
...De(),
|
|
1218
1218
|
hoveredElement: {
|
|
@@ -1261,7 +1261,7 @@ const xe = (e, n = !0) => ({
|
|
|
1261
1261
|
type: [String, Array],
|
|
1262
1262
|
default: () => []
|
|
1263
1263
|
}
|
|
1264
|
-
}),
|
|
1264
|
+
}), Po = { class: "lume-overlay-group" }, Fo = /* @__PURE__ */ W({
|
|
1265
1265
|
__name: "lume-overlay-group",
|
|
1266
1266
|
props: {
|
|
1267
1267
|
...je(),
|
|
@@ -1286,8 +1286,8 @@ const xe = (e, n = !0) => ({
|
|
|
1286
1286
|
transform: `translate(${O}, 0)`
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
|
-
return (p, u) => (y(),
|
|
1290
|
-
(y(!0),
|
|
1289
|
+
return (p, u) => (y(), $("g", Po, [
|
|
1290
|
+
(y(!0), $(Q, null, Z(s.value, (f, g) => (y(), X(d(rt), C(c(g), {
|
|
1291
1291
|
key: `overlay-${g}`,
|
|
1292
1292
|
"data-j-lume-overlay-group": g,
|
|
1293
1293
|
transition: !1,
|
|
@@ -1349,7 +1349,7 @@ function Uo(e, n) {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
), []);
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1352
|
+
const xt = {
|
|
1353
1353
|
"stacked-bar": Uo
|
|
1354
1354
|
};
|
|
1355
1355
|
function Xt(e, n, t, o, a, r, l, i) {
|
|
@@ -1361,7 +1361,7 @@ function Xt(e, n, t, o, a, r, l, i) {
|
|
|
1361
1361
|
);
|
|
1362
1362
|
function c(p) {
|
|
1363
1363
|
var g;
|
|
1364
|
-
const u = ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length) ?? 0, f = l != null && l.value &&
|
|
1364
|
+
const u = ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length) ?? 0, f = l != null && l.value && xt[l.value] ? xt[l.value](
|
|
1365
1365
|
p,
|
|
1366
1366
|
u
|
|
1367
1367
|
) : Wo(p, u);
|
|
@@ -1439,15 +1439,15 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1439
1439
|
}, sa = /* @__PURE__ */ W({
|
|
1440
1440
|
__name: "lume-chart",
|
|
1441
1441
|
props: {
|
|
1442
|
-
|
|
1442
|
+
...$e(),
|
|
1443
1443
|
chartType: {
|
|
1444
1444
|
type: String,
|
|
1445
1445
|
default: null
|
|
1446
1446
|
}
|
|
1447
1447
|
},
|
|
1448
1448
|
setup(e, { emit: n }) {
|
|
1449
|
-
const t = e, o = le(), a = n, { data: r, labels: l, color: i, options: s, orientation: c, chartType: p } = ee(t), u = R(-1), f = R(null), g = R(null), m = R([]), T = R(null), O = R(0), b = R(0), { allOptions: h } = ce(s), { internalData:
|
|
1450
|
-
|
|
1449
|
+
const t = e, o = le(), a = n, { data: r, labels: l, color: i, options: s, orientation: c, chartType: p } = ee(t), u = R(-1), f = R(null), g = R(null), m = R([]), T = R(null), O = R(0), b = R(0), { allOptions: h } = ce(s), { internalData: x, computedLabels: w, containerSize: D, updateSize: N, chartID: H } = it(r, l, i, h, c), { xScale: G, yScale: U } = jo(
|
|
1450
|
+
x,
|
|
1451
1451
|
w,
|
|
1452
1452
|
D,
|
|
1453
1453
|
c,
|
|
@@ -1459,10 +1459,10 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1459
1459
|
left: qo(h.value.margins, b.value)
|
|
1460
1460
|
})), F = v(() => {
|
|
1461
1461
|
var L;
|
|
1462
|
-
return t.xScale ? Lt(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t,
|
|
1462
|
+
return t.xScale ? Lt(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, x.value, l.value, D) : G.value;
|
|
1463
1463
|
}), J = v(() => {
|
|
1464
1464
|
var L;
|
|
1465
|
-
return t.yScale ? Lt(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t,
|
|
1465
|
+
return t.yScale ? Lt(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, x.value, l.value, D) : U.value;
|
|
1466
1466
|
}), Te = v(() => ({
|
|
1467
1467
|
...h.value.xAxisOptions,
|
|
1468
1468
|
withHover: c.value === B.VERTICAL
|
|
@@ -1483,24 +1483,24 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1483
1483
|
return ((L = h.value.yAxisOptions) == null ? void 0 : L.withTitle) !== !1 && M.value;
|
|
1484
1484
|
}), _ = v(
|
|
1485
1485
|
() => r.value.every((L) => !L.values.length)
|
|
1486
|
-
),
|
|
1486
|
+
), V = v(() => {
|
|
1487
1487
|
const L = [], { noBaseScales: A } = h.value;
|
|
1488
1488
|
return A || L.push(() => !!(F.value && J.value)), L.every((I) => I() === !0);
|
|
1489
|
-
}), { hasNegativeValues: Y } = zo(
|
|
1489
|
+
}), { hasNegativeValues: Y } = zo(x), { negativeBarAttributes: ie } = Zo(
|
|
1490
1490
|
D,
|
|
1491
1491
|
F,
|
|
1492
1492
|
J,
|
|
1493
1493
|
c
|
|
1494
|
-
), { shouldGenerateTooltipAnchors:
|
|
1494
|
+
), { shouldGenerateTooltipAnchors: Ve } = Xt(
|
|
1495
1495
|
m,
|
|
1496
1496
|
h,
|
|
1497
1497
|
F,
|
|
1498
1498
|
J,
|
|
1499
1499
|
c,
|
|
1500
|
-
|
|
1500
|
+
x,
|
|
1501
1501
|
p,
|
|
1502
1502
|
l
|
|
1503
|
-
), { tooltipConfig: Oe, showTooltip: Me, hideTooltip: tn } = Xo(), { getTooltipItems: ct } = Yo(
|
|
1503
|
+
), { tooltipConfig: Oe, showTooltip: Me, hideTooltip: tn } = Xo(), { getTooltipItems: ct } = Yo(x), nn = v(
|
|
1504
1504
|
() => h.value.withTooltip !== !1 && Oe.opened
|
|
1505
1505
|
), dt = v(
|
|
1506
1506
|
() => {
|
|
@@ -1518,8 +1518,8 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1518
1518
|
return;
|
|
1519
1519
|
const A = u.value;
|
|
1520
1520
|
if (h.value.withHover !== !1 && (u.value = L), h.value.withTooltip !== !1) {
|
|
1521
|
-
const
|
|
1522
|
-
Me(
|
|
1521
|
+
const Pe = (I = h.value.tooltipOptions) != null && I.targetElement ? h.value.tooltipOptions.targetElement === "self" ? g.value.$el : h.value.tooltipOptions.targetElement : f.value[L];
|
|
1522
|
+
Me(Pe);
|
|
1523
1523
|
}
|
|
1524
1524
|
a("hovered-index-changed", { newIndex: L, oldIndex: A });
|
|
1525
1525
|
}
|
|
@@ -1527,7 +1527,9 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1527
1527
|
tn(), u.value = -1;
|
|
1528
1528
|
}
|
|
1529
1529
|
function mt(L) {
|
|
1530
|
-
if (
|
|
1530
|
+
if (!r.value.some(
|
|
1531
|
+
({ values: I }) => L <= I.length - 1
|
|
1532
|
+
)) {
|
|
1531
1533
|
ye(pe.InvalidHoveredIndex);
|
|
1532
1534
|
return;
|
|
1533
1535
|
}
|
|
@@ -1574,20 +1576,20 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1574
1576
|
onMouseenter: A[25] || (A[25] = (I) => a("chart-mouseenter", I)),
|
|
1575
1577
|
onMouseleave: an
|
|
1576
1578
|
}, {
|
|
1577
|
-
header:
|
|
1579
|
+
header: P(() => [
|
|
1578
1580
|
j("div", ea, [
|
|
1579
1581
|
j("div", ta, [
|
|
1580
|
-
L.title ? (y(),
|
|
1582
|
+
L.title ? (y(), $("h1", na, oe(L.title), 1)) : z("", !0),
|
|
1581
1583
|
j("div", oa, [
|
|
1582
1584
|
S(L.$slots, "controls", {}, void 0, !0)
|
|
1583
1585
|
])
|
|
1584
1586
|
]),
|
|
1585
1587
|
j("div", aa, [
|
|
1586
|
-
E.value ? (y(),
|
|
1587
|
-
S(L.$slots, "legend", { data: d(
|
|
1588
|
+
E.value ? (y(), $("h3", la, oe(M.value), 1)) : z("", !0),
|
|
1589
|
+
S(L.$slots, "legend", { data: d(x) }, () => [
|
|
1588
1590
|
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(), X(d(yt), {
|
|
1589
1591
|
key: 0,
|
|
1590
|
-
data: d(
|
|
1592
|
+
data: d(x),
|
|
1591
1593
|
class: "lume-chart__legend",
|
|
1592
1594
|
"data-j-lume-chart__legend": "",
|
|
1593
1595
|
onClick: A[0] || (A[0] = (I) => a("legend-click", I)),
|
|
@@ -1598,11 +1600,11 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1598
1600
|
])
|
|
1599
1601
|
])
|
|
1600
1602
|
]),
|
|
1601
|
-
footer:
|
|
1602
|
-
k.value ? (y(),
|
|
1603
|
+
footer: P(() => [
|
|
1604
|
+
k.value ? (y(), $("h3", ia, oe(ge.value), 1)) : z("", !0),
|
|
1603
1605
|
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(), X(d(yt), {
|
|
1604
1606
|
key: 1,
|
|
1605
|
-
data: d(
|
|
1607
|
+
data: d(x),
|
|
1606
1608
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1607
1609
|
"data-j-lume-chart__legend": "",
|
|
1608
1610
|
onClick: A[16] || (A[16] = (I) => a("legend-click", I)),
|
|
@@ -1610,9 +1612,9 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1610
1612
|
onMouseleave: A[18] || (A[18] = (I) => a("legend-mouseleave"))
|
|
1611
1613
|
}, null, 8, ["data"])) : z("", !0)
|
|
1612
1614
|
]),
|
|
1613
|
-
extra:
|
|
1615
|
+
extra: P(() => [
|
|
1614
1616
|
S(L.$slots, "tooltip", C(d(Oe), {
|
|
1615
|
-
data: d(
|
|
1617
|
+
data: d(x),
|
|
1616
1618
|
labels: d(w),
|
|
1617
1619
|
title: d(w)[u.value],
|
|
1618
1620
|
items: d(ct)(u.value),
|
|
@@ -1641,9 +1643,9 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1641
1643
|
onTooltipMouseenter: A[22] || (A[22] = (I) => T.value = !0),
|
|
1642
1644
|
onTooltipMouseleave: A[23] || (A[23] = (I) => T.value = !1)
|
|
1643
1645
|
}), {
|
|
1644
|
-
default:
|
|
1646
|
+
default: P(() => [
|
|
1645
1647
|
S(L.$slots, "tooltip-content", {
|
|
1646
|
-
data: d(
|
|
1648
|
+
data: d(x),
|
|
1647
1649
|
labels: d(w),
|
|
1648
1650
|
hoveredIndex: u.value
|
|
1649
1651
|
}, void 0, !0)
|
|
@@ -1652,8 +1654,8 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1652
1654
|
}, 16, ["position", "title", "items", "options"])) : z("", !0)
|
|
1653
1655
|
], !0)
|
|
1654
1656
|
]),
|
|
1655
|
-
default:
|
|
1656
|
-
|
|
1657
|
+
default: P(() => [
|
|
1658
|
+
V.value ? (y(), $(Q, { key: 0 }, [
|
|
1657
1659
|
d(Y) ? (y(), X(d(rt), C({ key: 0 }, d(ie), {
|
|
1658
1660
|
"class-list": "lume-fill--negative",
|
|
1659
1661
|
transition: !1,
|
|
@@ -1696,25 +1698,25 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1696
1698
|
], !0) : z("", !0),
|
|
1697
1699
|
d(h).withHover !== !1 ? (y(), X(d(Fo), {
|
|
1698
1700
|
key: 2,
|
|
1699
|
-
data: d(
|
|
1701
|
+
data: d(x),
|
|
1700
1702
|
orientation: d(c),
|
|
1701
1703
|
"x-scale": F.value,
|
|
1702
1704
|
"y-scale": J.value,
|
|
1703
1705
|
"data-j-lume-chart__overlay-group": "",
|
|
1704
1706
|
"onLume__internal-Hover": Re
|
|
1705
1707
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1706
|
-
d(
|
|
1707
|
-
(y(!0),
|
|
1708
|
+
d(Ve) ? (y(), $("g", ra, [
|
|
1709
|
+
(y(!0), $(Q, null, Z(m.value, (I, Pe) => (y(), $("circle", C(I, {
|
|
1708
1710
|
ref_for: !0,
|
|
1709
1711
|
ref_key: "tooltipAnchor",
|
|
1710
1712
|
ref: f,
|
|
1711
|
-
key: `anchor_${
|
|
1713
|
+
key: `anchor_${Pe}`,
|
|
1712
1714
|
r: d(Sn),
|
|
1713
1715
|
class: "lume-fill--transparent"
|
|
1714
1716
|
}), null, 16, ua))), 128))
|
|
1715
1717
|
])) : z("", !0),
|
|
1716
1718
|
S(L.$slots, "groups", {
|
|
1717
|
-
data: d(
|
|
1719
|
+
data: d(x),
|
|
1718
1720
|
labels: d(w),
|
|
1719
1721
|
options: d(h),
|
|
1720
1722
|
orientation: d(c),
|
|
@@ -1741,13 +1743,13 @@ const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-se
|
|
|
1741
1743
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1742
1744
|
}
|
|
1743
1745
|
});
|
|
1744
|
-
const Ie = /* @__PURE__ */ q(sa, [["__scopeId", "data-v-
|
|
1746
|
+
const Ie = /* @__PURE__ */ q(sa, [["__scopeId", "data-v-2d7c3049"]]), ca = ["dy"], da = /* @__PURE__ */ W({
|
|
1745
1747
|
__name: "lume-alluvial-node-label",
|
|
1746
1748
|
props: {
|
|
1747
1749
|
bottom: { type: Boolean, default: !1 }
|
|
1748
1750
|
},
|
|
1749
1751
|
setup(e) {
|
|
1750
|
-
return (n, t) => (y(),
|
|
1752
|
+
return (n, t) => (y(), $("text", {
|
|
1751
1753
|
class: "lume-alluvial-group__node-label",
|
|
1752
1754
|
dy: e.bottom ? "1.2em" : ""
|
|
1753
1755
|
}, [
|
|
@@ -1761,7 +1763,7 @@ const va = /* @__PURE__ */ q(da, [["__scopeId", "data-v-d2a7cb8e"]]), ma = ["dy"
|
|
|
1761
1763
|
bottom: { type: Boolean, default: !0 }
|
|
1762
1764
|
},
|
|
1763
1765
|
setup(e) {
|
|
1764
|
-
return (n, t) => (y(),
|
|
1766
|
+
return (n, t) => (y(), $("text", {
|
|
1765
1767
|
class: "lume-alluvial-group__node-value",
|
|
1766
1768
|
dy: e.bottom ? "1.2em" : ""
|
|
1767
1769
|
}, [
|
|
@@ -1770,7 +1772,7 @@ const va = /* @__PURE__ */ q(da, [["__scopeId", "data-v-d2a7cb8e"]]), ma = ["dy"
|
|
|
1770
1772
|
}
|
|
1771
1773
|
});
|
|
1772
1774
|
const fa = /* @__PURE__ */ q(pa, [["__scopeId", "data-v-002e2887"]]);
|
|
1773
|
-
function
|
|
1775
|
+
function $t(e, n) {
|
|
1774
1776
|
return {
|
|
1775
1777
|
x0: 0 + (n ? n.left : 0),
|
|
1776
1778
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1779,9 +1781,9 @@ function xt(e, n) {
|
|
|
1779
1781
|
};
|
|
1780
1782
|
}
|
|
1781
1783
|
function ha(e) {
|
|
1782
|
-
const n = R(
|
|
1784
|
+
const n = R($t(e));
|
|
1783
1785
|
function t(o) {
|
|
1784
|
-
n.value =
|
|
1786
|
+
n.value = $t(e, o);
|
|
1785
1787
|
}
|
|
1786
1788
|
return { extents: n, updateExtents: t };
|
|
1787
1789
|
}
|
|
@@ -1791,7 +1793,7 @@ function _a(e, n, t = !0) {
|
|
|
1791
1793
|
t && Mt() || console.error(ga + "Error: " + e, n);
|
|
1792
1794
|
}
|
|
1793
1795
|
const It = 8, ya = 8, ka = 20, Ze = 2, ba = 200;
|
|
1794
|
-
function
|
|
1796
|
+
function xe(e) {
|
|
1795
1797
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1796
1798
|
}
|
|
1797
1799
|
function Aa(e, n) {
|
|
@@ -1837,14 +1839,14 @@ function Oa(e) {
|
|
|
1837
1839
|
};
|
|
1838
1840
|
});
|
|
1839
1841
|
}
|
|
1840
|
-
function
|
|
1842
|
+
function xa(e) {
|
|
1841
1843
|
return [e.source.x1, e.y0];
|
|
1842
1844
|
}
|
|
1843
|
-
function
|
|
1845
|
+
function $a(e) {
|
|
1844
1846
|
return [e.target.x0, e.y1];
|
|
1845
1847
|
}
|
|
1846
1848
|
function Ia(e) {
|
|
1847
|
-
return e.curveFunction ? mn(e.curveFunction).source(
|
|
1849
|
+
return e.curveFunction ? mn(e.curveFunction).source(xa).target($a) : gn();
|
|
1848
1850
|
}
|
|
1849
1851
|
function wa(e) {
|
|
1850
1852
|
return e.map((n) => {
|
|
@@ -1914,7 +1916,7 @@ function Na(e, n, t) {
|
|
|
1914
1916
|
}
|
|
1915
1917
|
).filter(Boolean).flat();
|
|
1916
1918
|
}
|
|
1917
|
-
), l = v(() => _n().nodeId(
|
|
1919
|
+
), l = v(() => _n().nodeId(xe).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(() => {
|
|
1918
1920
|
var u;
|
|
1919
1921
|
return (u = o.value) == null ? void 0 : u.nodes.reduce(
|
|
1920
1922
|
(f, g) => {
|
|
@@ -1933,11 +1935,11 @@ function Na(e, n, t) {
|
|
|
1933
1935
|
}
|
|
1934
1936
|
function c(u, f) {
|
|
1935
1937
|
const { id: g, _y0: m, y0: T } = u, O = f.links.filter(
|
|
1936
|
-
(
|
|
1938
|
+
(x) => x.source.id === g
|
|
1937
1939
|
), b = f.links.filter(
|
|
1938
|
-
(
|
|
1940
|
+
(x) => x.target.id === g
|
|
1939
1941
|
), h = T - m;
|
|
1940
|
-
O.forEach((
|
|
1942
|
+
O.forEach((x) => x.y0 += h), b.forEach((x) => x.y1 += h);
|
|
1941
1943
|
}
|
|
1942
1944
|
const p = v(() => (o.value && a.value.forEach((u) => {
|
|
1943
1945
|
u.value === 0 && (u.fallbackColor = at.Grey), typeof u.offset == "number" && (s(u), c(u, o.value));
|
|
@@ -1992,16 +1994,16 @@ const Ha = (e, n) => {
|
|
|
1992
1994
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
1993
1995
|
return {
|
|
1994
1996
|
nodes: n.reduce(
|
|
1995
|
-
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [
|
|
1996
|
-
{ [
|
|
1997
|
+
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [xe(a)]: r } : { ...t, [xe(o)]: r },
|
|
1998
|
+
{ [xe(e)]: e.value }
|
|
1997
1999
|
),
|
|
1998
2000
|
links: n.map(({ id: t }) => t)
|
|
1999
2001
|
};
|
|
2000
2002
|
}
|
|
2001
2003
|
return {
|
|
2002
2004
|
nodes: {
|
|
2003
|
-
[
|
|
2004
|
-
[
|
|
2005
|
+
[xe(e.target)]: e.value,
|
|
2006
|
+
[xe(e.source)]: e.source.value
|
|
2005
2007
|
},
|
|
2006
2008
|
links: [e.id]
|
|
2007
2009
|
};
|
|
@@ -2037,7 +2039,7 @@ function Ma(e, n, t) {
|
|
|
2037
2039
|
const Ra = {
|
|
2038
2040
|
class: "lume-alluvial-group",
|
|
2039
2041
|
"data-j-alluvial-group": ""
|
|
2040
|
-
}, Sa = { key: 0 }, Ca = ["x", "y"], Ga = { key: 0 }, ja = ["id", "x1", "x2"],
|
|
2042
|
+
}, Sa = { key: 0 }, Ca = ["x", "y"], Ga = { key: 0 }, ja = ["id", "x1", "x2"], Va = ["stop-color"], Pa = ["stop-color"], Fa = ["d", "stroke-width", "onClick", "onMouseover"], za = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Za = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Wa = ["x", "y", "height", "width"], Ua = ["transform", "data-id"], Xa = /* @__PURE__ */ W({
|
|
2041
2043
|
__name: "lume-alluvial-group",
|
|
2042
2044
|
props: {
|
|
2043
2045
|
...je(),
|
|
@@ -2056,7 +2058,7 @@ const Ra = {
|
|
|
2056
2058
|
() => Object.keys(T.value.nodes)
|
|
2057
2059
|
), h = v(() => f.value ? f.value.map(
|
|
2058
2060
|
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2059
|
-
) : []),
|
|
2061
|
+
) : []), x = v(() => {
|
|
2060
2062
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2061
2063
|
return l.value.nodeHeaders.slice(0, h.value.length).map((k, E) => ({
|
|
2062
2064
|
label: k,
|
|
@@ -2067,12 +2069,12 @@ const Ra = {
|
|
|
2067
2069
|
), D = v(() => {
|
|
2068
2070
|
if (!(!l.value.gradient || !g.value))
|
|
2069
2071
|
return g.value.links.reduce((k, E) => {
|
|
2070
|
-
const { source: _, target:
|
|
2072
|
+
const { source: _, target: V } = E, Y = _.color || _.fallbackColor, ie = V.deriveColorFromIncomingLinks ? Y : V.color || V.fallbackColor;
|
|
2071
2073
|
return k[E.id] = {
|
|
2072
2074
|
source: Y,
|
|
2073
2075
|
target: ie,
|
|
2074
2076
|
x1: _.x1,
|
|
2075
|
-
x2:
|
|
2077
|
+
x2: V.x0
|
|
2076
2078
|
}, k;
|
|
2077
2079
|
}, {});
|
|
2078
2080
|
}), N = v(() => {
|
|
@@ -2080,10 +2082,10 @@ const Ra = {
|
|
|
2080
2082
|
(_) => J(_)
|
|
2081
2083
|
), E = [];
|
|
2082
2084
|
return k.forEach((_) => {
|
|
2083
|
-
const
|
|
2085
|
+
const V = [];
|
|
2084
2086
|
s.value.filter(({ link: Y }) => Y.target.id === _.node.id).reverse().reduce((Y, ie) => {
|
|
2085
|
-
const
|
|
2086
|
-
return
|
|
2087
|
+
const Ve = ie.link.target.y1 - ie.link.target.y0, Me = ie.link.value / _.node.value * Ve;
|
|
2088
|
+
return V.push({
|
|
2087
2089
|
x: _.x,
|
|
2088
2090
|
y: _.y + Y,
|
|
2089
2091
|
height: Me,
|
|
@@ -2093,7 +2095,7 @@ const Ra = {
|
|
|
2093
2095
|
}), Y + Me;
|
|
2094
2096
|
}, 0), E.push({
|
|
2095
2097
|
id: _.node.id,
|
|
2096
|
-
subNodes:
|
|
2098
|
+
subNodes: V
|
|
2097
2099
|
});
|
|
2098
2100
|
}), E;
|
|
2099
2101
|
});
|
|
@@ -2145,9 +2147,9 @@ const Ra = {
|
|
|
2145
2147
|
const k = La(g.value, c.value);
|
|
2146
2148
|
u(k);
|
|
2147
2149
|
}
|
|
2148
|
-
}), K(() => t.hoveredElementId, ge), (k, E) => (y(),
|
|
2149
|
-
|
|
2150
|
-
(y(!0),
|
|
2150
|
+
}), K(() => t.hoveredElementId, ge), (k, E) => (y(), $("g", Ra, [
|
|
2151
|
+
x.value ? (y(), $("g", Sa, [
|
|
2152
|
+
(y(!0), $(Q, null, Z(x.value, (_) => (y(), $("text", {
|
|
2151
2153
|
key: `header_${_.x}`,
|
|
2152
2154
|
x: _.x,
|
|
2153
2155
|
y: -w.value,
|
|
@@ -2158,10 +2160,10 @@ const Ra = {
|
|
|
2158
2160
|
class: "lume-alluvial-link-group",
|
|
2159
2161
|
onMouseleave: Le
|
|
2160
2162
|
}, [
|
|
2161
|
-
d(l).gradient ? (y(),
|
|
2162
|
-
(y(!0),
|
|
2163
|
-
id: `${d(a)}_${
|
|
2164
|
-
key:
|
|
2163
|
+
d(l).gradient ? (y(), $("defs", Ga, [
|
|
2164
|
+
(y(!0), $(Q, null, Z(D.value, (_, V) => (y(), $("linearGradient", {
|
|
2165
|
+
id: `${d(a)}_${V}`,
|
|
2166
|
+
key: V,
|
|
2165
2167
|
gradientUnits: "userSpaceOnUse",
|
|
2166
2168
|
x1: _.x1,
|
|
2167
2169
|
x2: _.x2
|
|
@@ -2169,14 +2171,14 @@ const Ra = {
|
|
|
2169
2171
|
j("stop", {
|
|
2170
2172
|
offset: "0%",
|
|
2171
2173
|
"stop-color": `var(--lume-color--${_.source})`
|
|
2172
|
-
}, null, 8,
|
|
2174
|
+
}, null, 8, Va),
|
|
2173
2175
|
j("stop", {
|
|
2174
2176
|
offset: "100%",
|
|
2175
2177
|
"stop-color": `var(--lume-color--${_.target})`
|
|
2176
|
-
}, null, 8,
|
|
2178
|
+
}, null, 8, Pa)
|
|
2177
2179
|
], 8, ja))), 128))
|
|
2178
2180
|
])) : z("", !0),
|
|
2179
|
-
(y(!0),
|
|
2181
|
+
(y(!0), $(Q, null, Z(s.value, (_) => (y(), $("path", {
|
|
2180
2182
|
key: `link-ghost_${_.id}`,
|
|
2181
2183
|
class: ne(["lume-alluvial-group__link", [
|
|
2182
2184
|
"lume-stroke--transparent",
|
|
@@ -2185,10 +2187,10 @@ const Ra = {
|
|
|
2185
2187
|
d: _.d,
|
|
2186
2188
|
"stroke-width": _.strokeWidth + d(ya),
|
|
2187
2189
|
"data-j-alluvial-ghost": "",
|
|
2188
|
-
onClick: (
|
|
2189
|
-
onMouseover: (
|
|
2190
|
+
onClick: (V) => o("link-click", { link: _.link, event: V }),
|
|
2191
|
+
onMouseover: (V) => Te(_.link, V)
|
|
2190
2192
|
}, null, 40, Fa))), 128)),
|
|
2191
|
-
(y(!0),
|
|
2193
|
+
(y(!0), $(Q, null, Z(s.value, (_) => (y(), $("path", {
|
|
2192
2194
|
key: `link_${_.id}`,
|
|
2193
2195
|
class: ne(["lume-alluvial-group__link", {
|
|
2194
2196
|
[`lume-stroke--${_.color}`]: !d(l).gradient && _.color,
|
|
@@ -2202,12 +2204,12 @@ const Ra = {
|
|
|
2202
2204
|
"stroke-width": _.strokeWidth,
|
|
2203
2205
|
"data-j-alluvial-path": "",
|
|
2204
2206
|
"data-id": _.id,
|
|
2205
|
-
onClick: (
|
|
2206
|
-
onMouseover: (
|
|
2207
|
+
onClick: (V) => o("link-click", { link: _.link, event: V }),
|
|
2208
|
+
onMouseover: (V) => Te(_.link, V)
|
|
2207
2209
|
}, null, 42, za))), 128))
|
|
2208
2210
|
], 32),
|
|
2209
|
-
(y(!0),
|
|
2210
|
-
key: `node-block_${
|
|
2211
|
+
(y(!0), $(Q, null, Z(i.value, (_, V) => (y(), $("g", {
|
|
2212
|
+
key: `node-block_${V}`,
|
|
2211
2213
|
class: ne(["lume-alluvial-group__node", {
|
|
2212
2214
|
"lume-alluvial-group__node--faded": G(_.node.id),
|
|
2213
2215
|
"lume-alluvial-group__node--focused": U(_.node.id)
|
|
@@ -2221,12 +2223,12 @@ const Ra = {
|
|
|
2221
2223
|
onMouseover: (Y) => m.value = _.node,
|
|
2222
2224
|
onMouseout: E[0] || (E[0] = (Y) => m.value = null)
|
|
2223
2225
|
}, [
|
|
2224
|
-
J(_) ? (y(!0),
|
|
2226
|
+
J(_) ? (y(!0), $(Q, { key: 0 }, Z(M(
|
|
2225
2227
|
_.node.id
|
|
2226
|
-
), (Y) => (y(),
|
|
2228
|
+
), (Y) => (y(), $("rect", C(Y, {
|
|
2227
2229
|
key: Y.key,
|
|
2228
2230
|
"data-j-alluvial-sub-nodes": ""
|
|
2229
|
-
}), null, 16))), 128)) : (y(),
|
|
2231
|
+
}), null, 16))), 128)) : (y(), $("rect", {
|
|
2230
2232
|
key: 1,
|
|
2231
2233
|
class: ne(["lume-alluvial-group__node-block", `lume-fill--${_.node.color || _.node.fallbackColor}`]),
|
|
2232
2234
|
x: _.x,
|
|
@@ -2254,7 +2256,7 @@ const Ra = {
|
|
|
2254
2256
|
re(d(va), {
|
|
2255
2257
|
bottom: d(l).switchText
|
|
2256
2258
|
}, {
|
|
2257
|
-
default:
|
|
2259
|
+
default: P(() => [
|
|
2258
2260
|
de(oe(_.node.label), 1)
|
|
2259
2261
|
]),
|
|
2260
2262
|
_: 2
|
|
@@ -2262,7 +2264,7 @@ const Ra = {
|
|
|
2262
2264
|
re(d(fa), {
|
|
2263
2265
|
bottom: !d(l).switchText
|
|
2264
2266
|
}, {
|
|
2265
|
-
default:
|
|
2267
|
+
default: P(() => [
|
|
2266
2268
|
de(oe(O.value(
|
|
2267
2269
|
_.node.transitionValue || _.node.value,
|
|
2268
2270
|
_.node.value
|
|
@@ -2299,7 +2301,7 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2299
2301
|
}, Sl = /* @__PURE__ */ W({
|
|
2300
2302
|
__name: "lume-alluvial-diagram",
|
|
2301
2303
|
props: {
|
|
2302
|
-
...
|
|
2304
|
+
...Vo(nt)
|
|
2303
2305
|
},
|
|
2304
2306
|
setup(e, { emit: n }) {
|
|
2305
2307
|
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), r = Nn(le()), { options: l } = ee(t), { allOptions: i } = ce(l, Ka);
|
|
@@ -2314,11 +2316,11 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2314
2316
|
options: s(d(i)),
|
|
2315
2317
|
"data-j-alluvial-diagram": ""
|
|
2316
2318
|
}, ae(d(o))), se({
|
|
2317
|
-
groups:
|
|
2319
|
+
groups: P((u) => [
|
|
2318
2320
|
re(d(Ya), C(u, { "hovered-element-id": c.hoveredElement }, ae(d(o))), se({ _: 2 }, [
|
|
2319
2321
|
Z(d(r), (f, g) => ({
|
|
2320
2322
|
name: g,
|
|
2321
|
-
fn:
|
|
2323
|
+
fn: P((m) => [
|
|
2322
2324
|
S(c.$slots, g, ve(me(m || {})))
|
|
2323
2325
|
])
|
|
2324
2326
|
}))
|
|
@@ -2328,7 +2330,7 @@ const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
|
2328
2330
|
}, [
|
|
2329
2331
|
Z(d(a), (u, f) => ({
|
|
2330
2332
|
name: f,
|
|
2331
|
-
fn:
|
|
2333
|
+
fn: P((g) => [
|
|
2332
2334
|
S(c.$slots, f, ve(me(g || {})))
|
|
2333
2335
|
])
|
|
2334
2336
|
}))
|
|
@@ -2339,7 +2341,7 @@ var Jt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked",
|
|
|
2339
2341
|
const Cl = /* @__PURE__ */ W({
|
|
2340
2342
|
__name: "lume-bar-chart",
|
|
2341
2343
|
props: {
|
|
2342
|
-
|
|
2344
|
+
...$e(),
|
|
2343
2345
|
type: {
|
|
2344
2346
|
type: String,
|
|
2345
2347
|
default: null,
|
|
@@ -2383,7 +2385,7 @@ const Cl = /* @__PURE__ */ W({
|
|
|
2383
2385
|
}, ae(d(i))), se({ _: 2 }, [
|
|
2384
2386
|
Z(d(s), (g, m) => ({
|
|
2385
2387
|
name: m,
|
|
2386
|
-
fn:
|
|
2388
|
+
fn: P((T) => [
|
|
2387
2389
|
S(u.$slots, m, ve(me(T || {})))
|
|
2388
2390
|
])
|
|
2389
2391
|
}))
|
|
@@ -2453,12 +2455,12 @@ function nl(e, n, t, o, a, r) {
|
|
|
2453
2455
|
return l.value ? t.value.bandwidth() : u < 0 ? t.value(u) - t.value(0) : t.value(0) - t.value(u);
|
|
2454
2456
|
}
|
|
2455
2457
|
function p(u, f, g) {
|
|
2456
|
-
const { value: m, color: T } = u, O = T ?? e.value[f].color ?? Be, { x: b, y: h } = i(m, g),
|
|
2458
|
+
const { value: m, color: T } = u, O = T ?? e.value[f].color ?? Be, { x: b, y: h } = i(m, g), x = s(m), w = c(m);
|
|
2457
2459
|
return {
|
|
2458
2460
|
classList: [`lume-fill--${O}`, ...r],
|
|
2459
2461
|
x: b,
|
|
2460
2462
|
y: h,
|
|
2461
|
-
width:
|
|
2463
|
+
width: x,
|
|
2462
2464
|
height: w,
|
|
2463
2465
|
isFaded: a.value !== -1 && a.value !== g,
|
|
2464
2466
|
isNegative: m < 0
|
|
@@ -2490,9 +2492,9 @@ function ol(e, n, t, o, a, r) {
|
|
|
2490
2492
|
return l.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2491
2493
|
}
|
|
2492
2494
|
function g(m, T, O) {
|
|
2493
|
-
const { value: b, color: h } = m,
|
|
2495
|
+
const { value: b, color: h } = m, x = h ?? e.value[T].color ?? Object.values(ue)[T], w = c(b, O, T), D = p(b, O, T), N = u(b), H = f(b);
|
|
2494
2496
|
return {
|
|
2495
|
-
classList: [`lume-fill--${
|
|
2497
|
+
classList: [`lume-fill--${x}`, ...r],
|
|
2496
2498
|
x: w,
|
|
2497
2499
|
y: D,
|
|
2498
2500
|
width: N,
|
|
@@ -2550,9 +2552,9 @@ function ll(e, n, t, o, a, r) {
|
|
|
2550
2552
|
), s = v(
|
|
2551
2553
|
() => e.value.map((b) => b.values.map((h) => h == null ? void 0 : h.value))
|
|
2552
2554
|
);
|
|
2553
|
-
function c(b, h,
|
|
2555
|
+
function c(b, h, x) {
|
|
2554
2556
|
let w, D;
|
|
2555
|
-
return l.value ? (w = n.value(b >= 0 ? 0 +
|
|
2557
|
+
return l.value ? (w = n.value(b >= 0 ? 0 + x : b + x), D = t.value(i.value[h])) : (w = n.value(i.value[h]), D = t.value(b >= 0 ? b + x : 0 + x)), { x: w, y: D };
|
|
2556
2558
|
}
|
|
2557
2559
|
function p(b) {
|
|
2558
2560
|
return l.value ? n.value(b) - n.value(0) : n.value.bandwidth();
|
|
@@ -2567,20 +2569,20 @@ function ll(e, n, t, o, a, r) {
|
|
|
2567
2569
|
return l.value ? t.value.bandwidth() : t.value(b) - t.value(0);
|
|
2568
2570
|
}
|
|
2569
2571
|
function m(b, h) {
|
|
2570
|
-
return b ? s.value.reduce((
|
|
2572
|
+
return b ? s.value.reduce((x, w, D) => (D < b && w[h] >= 0 && (x += w[h]), x), 0) : 0;
|
|
2571
2573
|
}
|
|
2572
2574
|
function T(b, h) {
|
|
2573
|
-
return b ? s.value.reduce((
|
|
2575
|
+
return b ? s.value.reduce((x, w, D) => (D < b && w[h] < 0 && (x += w[h]), x), 0) : 0;
|
|
2574
2576
|
}
|
|
2575
|
-
function O(b, h,
|
|
2576
|
-
const { value: w, color: D } = b, N = w >= 0 ? p(w) : u(w), H = w >= 0 ? f(w) : g(w), G = w >= 0 ? m(h,
|
|
2577
|
+
function O(b, h, x) {
|
|
2578
|
+
const { value: w, color: D } = b, N = w >= 0 ? p(w) : u(w), H = w >= 0 ? f(w) : g(w), G = w >= 0 ? m(h, x) : T(h, x), { x: U, y: te } = c(w, x, G);
|
|
2577
2579
|
return {
|
|
2578
2580
|
classList: [`lume-fill--${D ?? e.value[h].color ?? Object.values(ue)[h]}`, ...r],
|
|
2579
2581
|
width: N,
|
|
2580
2582
|
height: H,
|
|
2581
2583
|
x: U,
|
|
2582
2584
|
y: te,
|
|
2583
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2585
|
+
isFaded: a.value !== -1 && a.value !== x,
|
|
2584
2586
|
isNegative: w < 0
|
|
2585
2587
|
};
|
|
2586
2588
|
}
|
|
@@ -2634,15 +2636,15 @@ const rl = {
|
|
|
2634
2636
|
if (i.value)
|
|
2635
2637
|
return l.value === B.HORIZONTAL ? "width" : "height";
|
|
2636
2638
|
});
|
|
2637
|
-
async function
|
|
2639
|
+
async function x(w) {
|
|
2638
2640
|
o("lume__internal--hover", w), f("lume__internal--hover", w);
|
|
2639
2641
|
}
|
|
2640
|
-
return (w, D) => (y(),
|
|
2641
|
-
(y(!0),
|
|
2642
|
+
return (w, D) => (y(), $("g", rl, [
|
|
2643
|
+
(y(!0), $(Q, null, Z(d(g), (N, H) => (y(), $("g", {
|
|
2642
2644
|
key: H,
|
|
2643
|
-
onMouseenter: (G) =>
|
|
2645
|
+
onMouseenter: (G) => x(H)
|
|
2644
2646
|
}, [
|
|
2645
|
-
(y(!0),
|
|
2647
|
+
(y(!0), $(Q, null, Z(N, (G, U) => (y(), X(d(rt), C(b.value(G, U, H, N), {
|
|
2646
2648
|
key: `bar-${U}`,
|
|
2647
2649
|
transition: h.value,
|
|
2648
2650
|
"data-j-lume-bar": "",
|
|
@@ -2671,7 +2673,7 @@ const rl = {
|
|
|
2671
2673
|
}, Gl = /* @__PURE__ */ W({
|
|
2672
2674
|
__name: "lume-single-bar-chart",
|
|
2673
2675
|
props: {
|
|
2674
|
-
|
|
2676
|
+
...$e(nt)
|
|
2675
2677
|
},
|
|
2676
2678
|
setup(e, { emit: n }) {
|
|
2677
2679
|
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { orientation: r, options: l } = ee(t), i = v(
|
|
@@ -2683,14 +2685,14 @@ const rl = {
|
|
|
2683
2685
|
options: d(s),
|
|
2684
2686
|
"data-j-single-bar-chart": ""
|
|
2685
2687
|
}, ae(d(o))), se({
|
|
2686
|
-
groups:
|
|
2688
|
+
groups: P((u) => [
|
|
2687
2689
|
re(d(st), C(u, { orientation: d(r) }, ae(d(o))), null, 16, ["orientation"])
|
|
2688
2690
|
]),
|
|
2689
2691
|
_: 2
|
|
2690
2692
|
}, [
|
|
2691
2693
|
Z(d(a), (u, f) => ({
|
|
2692
2694
|
name: f,
|
|
2693
|
-
fn:
|
|
2695
|
+
fn: P((g) => [
|
|
2694
2696
|
S(c.$slots, f, ve(me(g || {})))
|
|
2695
2697
|
])
|
|
2696
2698
|
}))
|
|
@@ -2713,7 +2715,7 @@ const rl = {
|
|
|
2713
2715
|
}, jl = /* @__PURE__ */ W({
|
|
2714
2716
|
__name: "lume-grouped-bar-chart",
|
|
2715
2717
|
props: {
|
|
2716
|
-
|
|
2718
|
+
...$e()
|
|
2717
2719
|
},
|
|
2718
2720
|
setup(e, { emit: n }) {
|
|
2719
2721
|
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { orientation: r, options: l } = ee(t), i = v(
|
|
@@ -2728,14 +2730,14 @@ const rl = {
|
|
|
2728
2730
|
options: d(s),
|
|
2729
2731
|
"data-j-grouped-bar-chart": ""
|
|
2730
2732
|
}, ae(d(o))), se({
|
|
2731
|
-
groups:
|
|
2733
|
+
groups: P((u) => [
|
|
2732
2734
|
re(d(st), C(u, { type: "grouped" }, ae(d(o))), null, 16)
|
|
2733
2735
|
]),
|
|
2734
2736
|
_: 2
|
|
2735
2737
|
}, [
|
|
2736
2738
|
Z(d(a), (u, f) => ({
|
|
2737
2739
|
name: f,
|
|
2738
|
-
fn:
|
|
2740
|
+
fn: P((g) => [
|
|
2739
2741
|
S(c.$slots, f, ve(me(g || {})))
|
|
2740
2742
|
])
|
|
2741
2743
|
}))
|
|
@@ -2755,10 +2757,10 @@ const rl = {
|
|
|
2755
2757
|
margins: ke.HORIZONTAL,
|
|
2756
2758
|
tooltipOptions: { position: "right" }
|
|
2757
2759
|
}
|
|
2758
|
-
},
|
|
2760
|
+
}, Vl = /* @__PURE__ */ W({
|
|
2759
2761
|
__name: "lume-stacked-bar-chart",
|
|
2760
2762
|
props: {
|
|
2761
|
-
|
|
2763
|
+
...$e()
|
|
2762
2764
|
},
|
|
2763
2765
|
setup(e, { emit: n }) {
|
|
2764
2766
|
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { data: r, orientation: l, options: i } = ee(t), s = v(
|
|
@@ -2779,14 +2781,14 @@ const rl = {
|
|
|
2779
2781
|
"y-scale": d(g),
|
|
2780
2782
|
"data-j-stacked-bar-chart": ""
|
|
2781
2783
|
}, ae(d(o))), se({
|
|
2782
|
-
groups:
|
|
2784
|
+
groups: P((O) => [
|
|
2783
2785
|
re(d(st), C(O, { type: "stacked" }, ae(d(o))), null, 16)
|
|
2784
2786
|
]),
|
|
2785
2787
|
_: 2
|
|
2786
2788
|
}, [
|
|
2787
2789
|
Z(d(a), (O, b) => ({
|
|
2788
2790
|
name: b,
|
|
2789
|
-
fn:
|
|
2791
|
+
fn: P((h) => [
|
|
2790
2792
|
S(m.$slots, b, ve(me(h || {})))
|
|
2791
2793
|
])
|
|
2792
2794
|
}))
|
|
@@ -2827,7 +2829,7 @@ const rl = {
|
|
|
2827
2829
|
emits: ["click"],
|
|
2828
2830
|
setup(e, { emit: n }) {
|
|
2829
2831
|
const t = n, o = R(null);
|
|
2830
|
-
return fe(() => Ge(o.value)), (a, r) => (y(),
|
|
2832
|
+
return fe(() => Ge(o.value)), (a, r) => (y(), $("path", {
|
|
2831
2833
|
ref_key: "root",
|
|
2832
2834
|
ref: o,
|
|
2833
2835
|
class: ne(["lume-line", {
|
|
@@ -2867,7 +2869,7 @@ const fl = /* @__PURE__ */ q(pl, [["__scopeId", "data-v-08896455"]]), hl = ["cx"
|
|
|
2867
2869
|
emits: ["click"],
|
|
2868
2870
|
setup(e, { emit: n }) {
|
|
2869
2871
|
const t = e, o = n, a = R(null), r = v(() => t.radius / 2);
|
|
2870
|
-
return fe(() => Ge(a.value)), (l, i) => (y(),
|
|
2872
|
+
return fe(() => Ge(a.value)), (l, i) => (y(), $("circle", {
|
|
2871
2873
|
ref_key: "root",
|
|
2872
2874
|
ref: a,
|
|
2873
2875
|
class: ne(["lume-point", `lume-stroke--${e.color}`]),
|
|
@@ -2944,7 +2946,7 @@ const Tl = {
|
|
|
2944
2946
|
key: 0,
|
|
2945
2947
|
class: "lume-line-group__points",
|
|
2946
2948
|
"data-j-lume-line-group__points": ""
|
|
2947
|
-
},
|
|
2949
|
+
}, xl = 1, $l = /* @__PURE__ */ W({
|
|
2948
2950
|
__name: "lume-line-group",
|
|
2949
2951
|
props: {
|
|
2950
2952
|
...je(),
|
|
@@ -2975,7 +2977,7 @@ const Tl = {
|
|
|
2975
2977
|
}), u = v(() => {
|
|
2976
2978
|
if (t.hoveredIndex === -1)
|
|
2977
2979
|
return;
|
|
2978
|
-
const N =
|
|
2980
|
+
const N = $n(
|
|
2979
2981
|
p.value,
|
|
2980
2982
|
t.hoveredIndex
|
|
2981
2983
|
);
|
|
@@ -2985,7 +2987,7 @@ const Tl = {
|
|
|
2985
2987
|
// Move to X index, Vertical line to the highest point
|
|
2986
2988
|
};
|
|
2987
2989
|
}), f = v(
|
|
2988
|
-
() => l.value &&
|
|
2990
|
+
() => l.value && xl / (In(l.value) - 1)
|
|
2989
2991
|
// Subtracting the first line (read below)
|
|
2990
2992
|
), g = v(
|
|
2991
2993
|
() => {
|
|
@@ -3014,7 +3016,7 @@ const Tl = {
|
|
|
3014
3016
|
i.value
|
|
3015
3017
|
) || "";
|
|
3016
3018
|
}
|
|
3017
|
-
function
|
|
3019
|
+
function x(N) {
|
|
3018
3020
|
return {
|
|
3019
3021
|
animationDelay: N < 2 ? 0 : (N - 1) * f.value,
|
|
3020
3022
|
animationDuration: f.value
|
|
@@ -3031,17 +3033,17 @@ const Tl = {
|
|
|
3031
3033
|
function D(N) {
|
|
3032
3034
|
return t.hoveredIndex === N;
|
|
3033
3035
|
}
|
|
3034
|
-
return (N, H) => (y(),
|
|
3036
|
+
return (N, H) => (y(), $("g", Tl, [
|
|
3035
3037
|
j("path", C(u.value, {
|
|
3036
3038
|
class: "lume-line-group__overlay-line",
|
|
3037
3039
|
"data-j-lume-line-group__overlay-line": ""
|
|
3038
3040
|
}), null, 16),
|
|
3039
|
-
(y(!0),
|
|
3041
|
+
(y(!0), $(Q, null, Z(p.value, (G, U) => (y(), $("g", {
|
|
3040
3042
|
key: G.label,
|
|
3041
3043
|
class: "lume-line-group__group"
|
|
3042
3044
|
}, [
|
|
3043
3045
|
j("g", Ll, [
|
|
3044
|
-
(y(!0),
|
|
3046
|
+
(y(!0), $(Q, null, Z(G.values, (te, F) => (y(), X(d(fl), C(x(F), {
|
|
3045
3047
|
key: `line-${F}`,
|
|
3046
3048
|
color: G.color,
|
|
3047
3049
|
dashed: G.isDashed(F),
|
|
@@ -3051,8 +3053,8 @@ const Tl = {
|
|
|
3051
3053
|
onClick: (J) => o("line-click", { index: F, datasetIndex: U, event: J })
|
|
3052
3054
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3053
3055
|
]),
|
|
3054
|
-
O.value ? (y(),
|
|
3055
|
-
(y(!0),
|
|
3056
|
+
O.value ? (y(), $("g", Ol, [
|
|
3057
|
+
(y(!0), $(Q, null, Z(G.values, (te, F) => (y(), X(d(yl), C(w(F, U), {
|
|
3056
3058
|
key: `point-${F}`,
|
|
3057
3059
|
active: D(F),
|
|
3058
3060
|
color: G.color,
|
|
@@ -3065,16 +3067,16 @@ const Tl = {
|
|
|
3065
3067
|
]));
|
|
3066
3068
|
}
|
|
3067
3069
|
});
|
|
3068
|
-
const en = /* @__PURE__ */ q(
|
|
3070
|
+
const en = /* @__PURE__ */ q($l, [["__scopeId", "data-v-c4d7f0ca"]]), Il = {
|
|
3069
3071
|
margins: ke.VERTICAL,
|
|
3070
3072
|
startOnZero: !0,
|
|
3071
3073
|
withTooltip: !0,
|
|
3072
3074
|
xAxisOptions: {},
|
|
3073
3075
|
yAxisOptions: { gridLines: !0 }
|
|
3074
|
-
},
|
|
3076
|
+
}, Pl = /* @__PURE__ */ W({
|
|
3075
3077
|
__name: "lume-line-chart",
|
|
3076
3078
|
props: {
|
|
3077
|
-
|
|
3079
|
+
...$e(null, !1)
|
|
3078
3080
|
},
|
|
3079
3081
|
setup(e, { emit: n }) {
|
|
3080
3082
|
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { options: r } = ee(t), { allOptions: l } = ce(r, Il);
|
|
@@ -3083,14 +3085,14 @@ const en = /* @__PURE__ */ q(xl, [["__scopeId", "data-v-c4d7f0ca"]]), Il = {
|
|
|
3083
3085
|
options: d(l),
|
|
3084
3086
|
"data-j-lume-line-chart": ""
|
|
3085
3087
|
}, ae(d(o))), se({
|
|
3086
|
-
groups:
|
|
3088
|
+
groups: P((c) => [
|
|
3087
3089
|
re(d(en), C(c, ae(d(o))), null, 16)
|
|
3088
3090
|
]),
|
|
3089
3091
|
_: 2
|
|
3090
3092
|
}, [
|
|
3091
3093
|
Z(d(a), (c, p) => ({
|
|
3092
3094
|
name: p,
|
|
3093
|
-
fn:
|
|
3095
|
+
fn: P((u) => [
|
|
3094
3096
|
S(i.$slots, p, ve(me(u || {})))
|
|
3095
3097
|
])
|
|
3096
3098
|
}))
|
|
@@ -3147,8 +3149,8 @@ const El = {
|
|
|
3147
3149
|
options: m(d(c)),
|
|
3148
3150
|
"x-scale": T
|
|
3149
3151
|
}, ae(d(a))), se({
|
|
3150
|
-
groups:
|
|
3151
|
-
d(c).showArea ? (y(),
|
|
3152
|
+
groups: P((h) => [
|
|
3153
|
+
d(c).showArea ? (y(), $("path", {
|
|
3152
3154
|
key: 0,
|
|
3153
3155
|
class: ne([
|
|
3154
3156
|
"sparkline-chart__area",
|
|
@@ -3163,10 +3165,10 @@ const El = {
|
|
|
3163
3165
|
]),
|
|
3164
3166
|
_: 2
|
|
3165
3167
|
}, [
|
|
3166
|
-
Z(d(r), (h,
|
|
3167
|
-
name:
|
|
3168
|
-
fn:
|
|
3169
|
-
S(O.$slots,
|
|
3168
|
+
Z(d(r), (h, x) => ({
|
|
3169
|
+
name: x,
|
|
3170
|
+
fn: P((w) => [
|
|
3171
|
+
S(O.$slots, x, ve(me(w || {})), void 0, !0)
|
|
3170
3172
|
])
|
|
3171
3173
|
}))
|
|
3172
3174
|
]), 1040, ["options"]));
|
|
@@ -3187,13 +3189,13 @@ export {
|
|
|
3187
3189
|
yt as LumeChartLegend,
|
|
3188
3190
|
jl as LumeGroupedBarChart,
|
|
3189
3191
|
fl as LumeLine,
|
|
3190
|
-
|
|
3192
|
+
Pl as LumeLineChart,
|
|
3191
3193
|
en as LumeLineGroup,
|
|
3192
3194
|
Fo as LumeOverlayGroup,
|
|
3193
3195
|
yl as LumePoint,
|
|
3194
3196
|
Gl as LumeSingleBarChart,
|
|
3195
3197
|
Fl as LumeSparklineChart,
|
|
3196
|
-
|
|
3198
|
+
Vl as LumeStackedBarChart,
|
|
3197
3199
|
Io as LumeTooltip,
|
|
3198
3200
|
bo as LumeTooltipItem,
|
|
3199
3201
|
ho as LumeTooltipSummary,
|