@adyen/lume-vue3 1.16.0 → 1.16.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/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
- package/dist/common/BxeOEeXh.js +5 -0
- package/dist/common/BxeOEeXh.js.map +1 -0
- package/dist/common/CBkk5ZOK.js +5 -0
- package/dist/common/CBkk5ZOK.js.map +1 -0
- package/dist/common/CEUcfWjc.js +5 -0
- package/dist/common/CEUcfWjc.js.map +1 -0
- package/dist/common/{BYhjdB9y.js → D6rOemQf.js} +647 -641
- package/dist/common/{BYhjdB9y.js.map → D6rOemQf.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/main.scss +5 -5
- package/dist/styles/main.css +1 -1
- package/package.json +3 -3
- package/dist/common/BgaIG7xN.js +0 -5
- package/dist/common/BgaIG7xN.js.map +0 -1
- package/dist/common/Cd2sV3nh.js +0 -5
- package/dist/common/Cd2sV3nh.js.map +0 -1
- package/dist/common/DQ1wPLy9.js +0 -5
- package/dist/common/DQ1wPLy9.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as
|
|
1
|
+
import { defineComponent as Q, ref as R, openBlock as _, createElementBlock as O, mergeProps as z, createElementVNode as C, toDisplayString as se, createCommentVNode as K, isRef as Ut, computed as m, watch as X, toRefs as re, inject as Ke, reactive as Je, onMounted as we, unref as v, Fragment as ne, renderList as J, createBlock as q, normalizeStyle as Zt, normalizeClass as ue, watchEffect as Xt, onBeforeUnmount as Yt, renderSlot as F, createTextVNode as ge, useSlots as fe, nextTick as at, withCtx as Z, createSlots as he, pushScopeId as _n, popScopeId as kn, provide as nt, createVNode as me, withKeys as wt, withModifiers as xt, toHandlers as ce, normalizeProps as Te, guardReactiveProps as $e, defineAsyncComponent as ot, resolveDynamicComponent as bn } from "vue";
|
|
2
2
|
import { sankeyLinkHorizontal as Ln, sankey as An, sankeyJustify as Tn } from "d3-sankey";
|
|
3
|
-
import { format as $n, ticks as In, scaleLinear as Fe, scaleBand as je, link as
|
|
4
|
-
import { createPopper as
|
|
3
|
+
import { format as $n, ticks as In, scaleLinear as Fe, scaleBand as je, link as wn, line as xn, area as Nn } from "d3";
|
|
4
|
+
import { createPopper as On } from "@popperjs/core";
|
|
5
5
|
const En = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
7
7
|
"pointer-events": "all",
|
|
@@ -44,8 +44,8 @@ const En = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t, a =
|
|
48
|
-
return n({ ref: a }), (r, l) => (_(),
|
|
47
|
+
const o = t, a = R(null);
|
|
48
|
+
return n({ ref: a }), (r, l) => (_(), O("g", z(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -54,18 +54,18 @@ const En = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
C("g", En, [
|
|
58
|
+
C("rect", z(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
|
|
62
|
+
C("text", z(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
66
|
-
}),
|
|
66
|
+
}), se(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (_(),
|
|
68
|
+
e.withGridlines ? (_(), O("line", z({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : K("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
}), oe = (e, n) => {
|
|
@@ -73,7 +73,7 @@ const En = {
|
|
|
73
73
|
for (const [o, a] of n)
|
|
74
74
|
t[o] = a;
|
|
75
75
|
return t;
|
|
76
|
-
},
|
|
76
|
+
}, Nt = /* @__PURE__ */ oe(Dn, [["__scopeId", "data-v-59ddc0a6"]]), Bn = [
|
|
77
77
|
"controls",
|
|
78
78
|
"legend",
|
|
79
79
|
"axes",
|
|
@@ -109,11 +109,11 @@ function Qt(e, n) {
|
|
|
109
109
|
function Mn(e) {
|
|
110
110
|
return e != null && lt(e) && "value" in e;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ye(e) {
|
|
113
113
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
114
114
|
}
|
|
115
115
|
function Sn(e) {
|
|
116
|
-
return
|
|
116
|
+
return ye(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
117
117
|
}
|
|
118
118
|
function Rn(e) {
|
|
119
119
|
const [n, t] = e.domain();
|
|
@@ -126,7 +126,7 @@ const Gn = (e, n) => {
|
|
|
126
126
|
throw new Error("Cannot get highest value from empty array");
|
|
127
127
|
e.some(
|
|
128
128
|
({ values: o }) => o.length - 1 >= n
|
|
129
|
-
) ||
|
|
129
|
+
) || Ie(_e.IndexExceedsLengthOfDataSets);
|
|
130
130
|
};
|
|
131
131
|
function Fn(e, n) {
|
|
132
132
|
var t;
|
|
@@ -148,7 +148,7 @@ function qt(e) {
|
|
|
148
148
|
return Array(t).fill(null);
|
|
149
149
|
}
|
|
150
150
|
function jn(e) {
|
|
151
|
-
return
|
|
151
|
+
return ye(e) ? e.domain().length : Math.max(...e.domain());
|
|
152
152
|
}
|
|
153
153
|
function Cn(e, n) {
|
|
154
154
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
@@ -157,7 +157,7 @@ function Pn(e, n, t) {
|
|
|
157
157
|
const o = n, a = e.slice(0, o);
|
|
158
158
|
return e.slice(o).concat(a);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function De(e) {
|
|
161
161
|
if (e.groups) {
|
|
162
162
|
const n = Object.keys(e);
|
|
163
163
|
return Object.assign(
|
|
@@ -179,10 +179,10 @@ function gt(e, n) {
|
|
|
179
179
|
const t = n - e.length;
|
|
180
180
|
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(
|
|
182
|
+
var _e = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
183
|
+
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(_e || {});
|
|
184
184
|
const zn = "[lume] ";
|
|
185
|
-
function
|
|
185
|
+
function Ie(e, n = !0) {
|
|
186
186
|
n && Kt() || console.warn(zn + "Warning: " + e);
|
|
187
187
|
}
|
|
188
188
|
const Xe = (e) => {
|
|
@@ -192,7 +192,7 @@ const Xe = (e) => {
|
|
|
192
192
|
try {
|
|
193
193
|
n = $n(e);
|
|
194
194
|
} catch {
|
|
195
|
-
|
|
195
|
+
Ie(_e.InvalidFormat), n = null;
|
|
196
196
|
}
|
|
197
197
|
break;
|
|
198
198
|
case "function":
|
|
@@ -211,7 +211,7 @@ const Xe = (e) => {
|
|
|
211
211
|
default: () => ({})
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
|
-
function
|
|
214
|
+
function ke(e, n) {
|
|
215
215
|
return { allOptions: m(() => {
|
|
216
216
|
const o = Ut(n) ? n == null ? void 0 : n.value : n;
|
|
217
217
|
return o ? Qt(o, e.value) : e.value;
|
|
@@ -219,7 +219,7 @@ function _e(e, n) {
|
|
|
219
219
|
}
|
|
220
220
|
const Wn = 0.2;
|
|
221
221
|
function Un(e, n, t) {
|
|
222
|
-
const o =
|
|
222
|
+
const o = R(), a = m(() => Math.max(...e.value.range())), r = m(() => n.value.length);
|
|
223
223
|
function l() {
|
|
224
224
|
if (!n.value) return;
|
|
225
225
|
const u = n.value.reduce(
|
|
@@ -244,7 +244,7 @@ const B = {
|
|
|
244
244
|
SINGLE: "single",
|
|
245
245
|
GROUPED: "grouped",
|
|
246
246
|
STACKED: "stacked"
|
|
247
|
-
}, en = "No data",
|
|
247
|
+
}, en = "No data", Ot = 20, tn = 0.33, nn = 0.5, on = 12, Pe = 8, Xn = 1, Yn = [
|
|
248
248
|
"auto",
|
|
249
249
|
"auto-start",
|
|
250
250
|
"auto-end",
|
|
@@ -262,7 +262,7 @@ const B = {
|
|
|
262
262
|
"left-end"
|
|
263
263
|
];
|
|
264
264
|
function Qe(e) {
|
|
265
|
-
e != null && e.closest("svg") ||
|
|
265
|
+
e != null && e.closest("svg") || Ie(_e.NotContainedInSvg);
|
|
266
266
|
}
|
|
267
267
|
const an = {
|
|
268
268
|
/** Displays a line for each tick. */
|
|
@@ -445,20 +445,20 @@ const an = {
|
|
|
445
445
|
"y-band-scale-axis": qn,
|
|
446
446
|
"x-linear-scale-axis": eo,
|
|
447
447
|
"y-linear-scale-axis": to
|
|
448
|
-
}, oo = ["transform"], ao = { key: 0 }, lo = /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
448
|
+
}, oo = ["transform"], ao = { key: 0 }, lo = /* @__PURE__ */ C("linearGradient", { id: "lume-tick-gradient" }, [
|
|
449
|
+
/* @__PURE__ */ C("stop", {
|
|
450
450
|
offset: "0%",
|
|
451
451
|
"stop-color": "rgba(255,255,255,0)"
|
|
452
452
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ C("stop", {
|
|
454
454
|
offset: "10%",
|
|
455
455
|
"stop-color": "var(--lume-chart-background-color)"
|
|
456
456
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ C("stop", {
|
|
458
458
|
offset: "90%",
|
|
459
459
|
"stop-color": "var(--lume-chart-background-color)"
|
|
460
460
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ C("stop", {
|
|
462
462
|
offset: "100%",
|
|
463
463
|
"stop-color": "rgba(255,255,255,0)"
|
|
464
464
|
})
|
|
@@ -499,40 +499,40 @@ const Et = /* @__PURE__ */ Q({
|
|
|
499
499
|
},
|
|
500
500
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
501
501
|
setup(e, { emit: n }) {
|
|
502
|
-
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: u, orientation: s } =
|
|
502
|
+
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: u, orientation: s } = re(o), d = Ke("isEmpty", R(!1)), c = Je({}), p = R(null), b = R(null), k = R(null), L = m(
|
|
503
503
|
() => o.type ? ut[o.type] : o.position
|
|
504
504
|
), $ = m(
|
|
505
505
|
() => o.type || (L.value === "left" ? "y" : "x")
|
|
506
506
|
), g = m(
|
|
507
507
|
() => $.value === "x" && s.value === B.VERTICAL || $.value === "y" && s.value === B.HORIZONTAL
|
|
508
|
-
), { allOptions: f } =
|
|
508
|
+
), { allOptions: f } = ke(
|
|
509
509
|
u,
|
|
510
510
|
$.value === "x" ? Kn : Jn
|
|
511
511
|
), { showTick: y } = Un(r, p, f), I = m(
|
|
512
512
|
() => d.value || !r.value || Rn(r.value)
|
|
513
|
-
),
|
|
514
|
-
var
|
|
515
|
-
return $.value === "y" && I.value ? `translate(0, ${((
|
|
513
|
+
), x = m(() => {
|
|
514
|
+
var j, G, P, ie;
|
|
515
|
+
return $.value === "y" && I.value ? `translate(0, ${((j = l.value) == null ? void 0 : j.height) / 2})` : $.value === "x" && I.value ? `translate(-${((G = l.value) == null ? void 0 : G.width) / 2}, ${(P = l.value) == null ? void 0 : P.height})` : `translate(0, ${$.value === "x" ? (ie = l.value) == null ? void 0 : ie.height : 0})`;
|
|
516
516
|
}), D = m(() => {
|
|
517
517
|
if (!r.value) return [];
|
|
518
|
-
if (
|
|
518
|
+
if (ye(r.value))
|
|
519
519
|
return r.value.labels || r.value.domain();
|
|
520
|
-
const { tickCount:
|
|
521
|
-
return In(
|
|
520
|
+
const { tickCount: j } = f.value, [G, P] = r.value.domain();
|
|
521
|
+
return In(G, P, j);
|
|
522
522
|
}), H = m(() => {
|
|
523
|
-
const { tickFormat:
|
|
524
|
-
return Xe(
|
|
525
|
-
}),
|
|
523
|
+
const { tickFormat: j } = f.value;
|
|
524
|
+
return Xe(j);
|
|
525
|
+
}), M = m(
|
|
526
526
|
() => f.value.withHover && g.value && i.value > -1
|
|
527
|
-
),
|
|
527
|
+
), ee = m(
|
|
528
528
|
() => f.value.tickPadding + Pe || 16
|
|
529
|
-
),
|
|
529
|
+
), E = m(() => $.value === "x" ? (
|
|
530
530
|
// If x axis, get the tick height
|
|
531
531
|
Math.max(
|
|
532
532
|
...(p.value || []).map(
|
|
533
|
-
(
|
|
534
|
-
var
|
|
535
|
-
return ((
|
|
533
|
+
(j) => {
|
|
534
|
+
var G, P;
|
|
535
|
+
return ((P = (G = j.ref).getBBox) == null ? void 0 : P.call(G).height) + ee.value;
|
|
536
536
|
}
|
|
537
537
|
)
|
|
538
538
|
)
|
|
@@ -540,82 +540,82 @@ const Et = /* @__PURE__ */ Q({
|
|
|
540
540
|
// If y axis, get the tick width
|
|
541
541
|
Math.max(
|
|
542
542
|
...(p.value || []).map(
|
|
543
|
-
(
|
|
544
|
-
var
|
|
545
|
-
return ((
|
|
543
|
+
(j) => {
|
|
544
|
+
var G, P;
|
|
545
|
+
return ((P = (G = j.ref).getBBox) == null ? void 0 : P.call(G).width) + ee.value;
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
)
|
|
549
549
|
));
|
|
550
|
-
function
|
|
551
|
-
const { showTicks:
|
|
552
|
-
return
|
|
550
|
+
function V(j) {
|
|
551
|
+
const { showTicks: G } = f.value;
|
|
552
|
+
return G === !1 ? "" : H.value(j);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
a("mouseenter", { index: g.value ?
|
|
554
|
+
function Y(j, G, P) {
|
|
555
|
+
a("mouseenter", { index: g.value ? j : null, value: G, event: P });
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
a("click", { index:
|
|
557
|
+
function te(j, G, P) {
|
|
558
|
+
a("click", { index: j, value: G, event: P });
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
var
|
|
560
|
+
function ae(j) {
|
|
561
|
+
var G;
|
|
562
562
|
if (!(!p.value || !p.value.length))
|
|
563
|
-
return (
|
|
563
|
+
return (G = p.value[j]) == null ? void 0 : G.ref;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function le() {
|
|
566
566
|
k.value = D.value.map(
|
|
567
|
-
(
|
|
568
|
-
value:
|
|
569
|
-
group: c.getTickGroupAttributes(
|
|
570
|
-
ghost: c.getTickGhostAttributes(
|
|
567
|
+
(j, G) => ({
|
|
568
|
+
value: V(j),
|
|
569
|
+
group: c.getTickGroupAttributes(j, G),
|
|
570
|
+
ghost: c.getTickGhostAttributes(ae(G)),
|
|
571
571
|
label: c.getTickLabelAttributes(),
|
|
572
572
|
gridline: c.getGridLinesAttributes()
|
|
573
573
|
})
|
|
574
574
|
);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
k.value && k.value.map((
|
|
576
|
+
function be() {
|
|
577
|
+
k.value && k.value.map((j) => (j.gridline = c.getGridLinesAttributes(), j));
|
|
578
578
|
}
|
|
579
579
|
function Se() {
|
|
580
580
|
if (!r.value) return;
|
|
581
|
-
const
|
|
582
|
-
Object.entries(
|
|
583
|
-
([
|
|
584
|
-
c[
|
|
581
|
+
const j = r.value.step ? "bandScale" : "linearScale", G = no[`${$.value}-${ln[j]}`];
|
|
582
|
+
Object.entries(G(r, l, f) || []).forEach(
|
|
583
|
+
([P, ie]) => {
|
|
584
|
+
c[P] = ie;
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
587
|
}
|
|
588
|
-
return X(r, Se, { flush: "sync", immediate: !0 }), X(r,
|
|
588
|
+
return X(r, Se, { flush: "sync", immediate: !0 }), X(r, le, { immediate: !0 }), X(p, le), X(E, (j) => a("lume__internal--axis-size", j)), X(o.containerSize, be), we(() => Qe(b.value)), (j, G) => v(r) ? (_(), O("g", {
|
|
589
589
|
key: 0,
|
|
590
590
|
ref_key: "root",
|
|
591
591
|
ref: b,
|
|
592
592
|
class: "axis",
|
|
593
|
-
transform:
|
|
593
|
+
transform: x.value,
|
|
594
594
|
"data-j-axis": "",
|
|
595
|
-
onMouseleave:
|
|
595
|
+
onMouseleave: G[1] || (G[1] = (P) => a("mouseleave", P))
|
|
596
596
|
}, [
|
|
597
|
-
$.value === "x" ? (_(),
|
|
598
|
-
(_(!0),
|
|
599
|
-
key: `${
|
|
597
|
+
$.value === "x" ? (_(), O("defs", ao, uo)) : K("", !0),
|
|
598
|
+
(_(!0), O(ne, null, J(k.value, (P, ie) => (_(), q(v(Nt), z({
|
|
599
|
+
key: `${P.value}_${ie}`,
|
|
600
600
|
ref_for: !0,
|
|
601
601
|
ref_key: "tickRefs",
|
|
602
602
|
ref: p
|
|
603
|
-
},
|
|
604
|
-
"is-hidden": v(f).skip && !v(y)(
|
|
603
|
+
}, P, {
|
|
604
|
+
"is-hidden": v(f).skip && !v(y)(ie),
|
|
605
605
|
"with-gridlines": v(f).gridLines,
|
|
606
|
-
onMouseenter: (
|
|
607
|
-
onClick: (
|
|
606
|
+
onMouseenter: (Le) => Y(ie, P.value, Le),
|
|
607
|
+
onClick: (Le) => te(ie, P.value, Le)
|
|
608
608
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
609
|
-
|
|
609
|
+
M.value ? (_(), q(v(Nt), z({ key: 1 }, k.value[v(i)], {
|
|
610
610
|
"with-gridlines": !1,
|
|
611
611
|
"is-hovered": "",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: G[0] || (G[0] = (P) => te(
|
|
613
613
|
v(i),
|
|
614
614
|
k.value[v(i)].value,
|
|
615
|
-
|
|
615
|
+
P
|
|
616
616
|
))
|
|
617
|
-
}), null, 16)) :
|
|
618
|
-
], 40, oo)) :
|
|
617
|
+
}), null, 16)) : K("", !0)
|
|
618
|
+
], 40, oo)) : K("", !0);
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
621
|
function ro(e, n, t, o) {
|
|
@@ -631,8 +631,8 @@ function ro(e, n, t, o) {
|
|
|
631
631
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: r };
|
|
632
632
|
}
|
|
633
633
|
function io(e, n, t, o) {
|
|
634
|
-
const a =
|
|
635
|
-
return
|
|
634
|
+
const a = R(0), r = R(0), l = m(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
635
|
+
return we(() => {
|
|
636
636
|
a.value = t.value, r.value = o.value;
|
|
637
637
|
}), X(t, (i) => a.value = i), X(o, (i) => r.value = i), { computedWidth: a, computedHeight: r, transformOrigin: l };
|
|
638
638
|
}
|
|
@@ -674,13 +674,13 @@ const so = ["x", "y", "width", "height"], co = /* @__PURE__ */ Q({
|
|
|
674
674
|
},
|
|
675
675
|
emits: ["click", "mouseover", "mouseleave"],
|
|
676
676
|
setup(e, { emit: n }) {
|
|
677
|
-
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: u, classList: s } =
|
|
677
|
+
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: u, classList: s } = re(t), d = R(null), c = m(
|
|
678
678
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
679
|
-
), p = m(() => u.value === "width"), b = m(() => u.value === "height"), k = io(a, r, l, i), { computedX: L, computedY: $, shouldHaveMinWidth: g, shouldHaveMinHeight: f } = ro(a, r, l, i), y = m(() => g.value ? 1 : (p.value ? k.computedWidth : l).value), I = m(() => f.value ? 1 : (b.value ? k.computedHeight : i).value),
|
|
680
|
-
return
|
|
679
|
+
), p = m(() => u.value === "width"), b = m(() => u.value === "height"), k = io(a, r, l, i), { computedX: L, computedY: $, shouldHaveMinWidth: g, shouldHaveMinHeight: f } = ro(a, r, l, i), y = m(() => g.value ? 1 : (p.value ? k.computedWidth : l).value), I = m(() => f.value ? 1 : (b.value ? k.computedHeight : i).value), x = p.value || b.value ? k.transformOrigin : null;
|
|
680
|
+
return we(() => Qe(d.value)), (D, H) => (_(), O("rect", {
|
|
681
681
|
ref_key: "root",
|
|
682
682
|
ref: d,
|
|
683
|
-
class:
|
|
683
|
+
class: ue(["lume-bar", [
|
|
684
684
|
{
|
|
685
685
|
"lume-fill--faded": e.isFaded,
|
|
686
686
|
"lume-bar--negative": e.isNegative,
|
|
@@ -689,20 +689,20 @@ const so = ["x", "y", "width", "height"], co = /* @__PURE__ */ Q({
|
|
|
689
689
|
},
|
|
690
690
|
...c.value
|
|
691
691
|
]]),
|
|
692
|
-
style: Zt({ transformOrigin: v(
|
|
692
|
+
style: Zt({ transformOrigin: v(x) }),
|
|
693
693
|
x: v(L),
|
|
694
694
|
y: v($),
|
|
695
695
|
width: y.value,
|
|
696
696
|
height: I.value,
|
|
697
697
|
"data-j-bar": "",
|
|
698
|
-
onClick: H[0] || (H[0] = (
|
|
699
|
-
onMouseover: H[1] || (H[1] = (
|
|
700
|
-
onMouseleave: H[2] || (H[2] = (
|
|
698
|
+
onClick: H[0] || (H[0] = (M) => o("click", M)),
|
|
699
|
+
onMouseover: H[1] || (H[1] = (M) => o("mouseover", M)),
|
|
700
|
+
onMouseleave: H[2] || (H[2] = (M) => o("mouseleave", M))
|
|
701
701
|
}, null, 46, so));
|
|
702
702
|
}
|
|
703
703
|
}), ht = /* @__PURE__ */ oe(co, [["__scopeId", "data-v-8e8f732a"]]);
|
|
704
|
-
var Oe = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Oe || {}),
|
|
705
|
-
const vo = Oe.Categorical, Ve =
|
|
704
|
+
var Oe = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Oe || {}), pe = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(pe || {}), rn = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(rn || {}), yt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(yt || {}), _t = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Yellow = "yellow", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(_t || {}), kt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(kt || {});
|
|
705
|
+
const vo = Oe.Categorical, Ve = pe.Skyblue, fo = yt.SkyTeal;
|
|
706
706
|
function mo(e) {
|
|
707
707
|
return e === Oe.Divergent ? fo : Ve;
|
|
708
708
|
}
|
|
@@ -711,15 +711,15 @@ function po(e) {
|
|
|
711
711
|
}
|
|
712
712
|
function Dt(e, n) {
|
|
713
713
|
return n === Oe.Divergent ? Object.values(yt).includes(e) : Object.values({
|
|
714
|
-
...
|
|
714
|
+
...pe,
|
|
715
715
|
...rn,
|
|
716
716
|
..._t,
|
|
717
717
|
...kt
|
|
718
718
|
}).includes(e);
|
|
719
719
|
}
|
|
720
720
|
function go(e, n) {
|
|
721
|
-
const t = Object.values(
|
|
722
|
-
return Pn(Object.values(
|
|
721
|
+
const t = Object.values(pe).indexOf(e);
|
|
722
|
+
return Pn(Object.values(pe), t > -1 ? t : 0)[n];
|
|
723
723
|
}
|
|
724
724
|
function ho(e, n) {
|
|
725
725
|
const t = 50 + n * 10;
|
|
@@ -741,7 +741,7 @@ function Bt(e, n, t) {
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
function _o(e, n, t = vo, o) {
|
|
744
|
-
return Dt(e, t) ? e : (o > 4 && (
|
|
744
|
+
return Dt(e, t) ? e : (o > 4 && (Ie(_e.ColorLoop), o = o % 5), Dt(n, t) ? Bt(n, t, o) : Bt(mo(t), t, o));
|
|
745
745
|
}
|
|
746
746
|
function ko(e) {
|
|
747
747
|
return e.map((n) => Mn(n) ? n : { value: n });
|
|
@@ -761,7 +761,7 @@ const bt = (e = null) => ({
|
|
|
761
761
|
},
|
|
762
762
|
color: {
|
|
763
763
|
type: String,
|
|
764
|
-
default:
|
|
764
|
+
default: pe.Skyblue
|
|
765
765
|
},
|
|
766
766
|
title: {
|
|
767
767
|
type: String,
|
|
@@ -774,7 +774,7 @@ function Lt(e, n, t, o, a) {
|
|
|
774
774
|
height: 0
|
|
775
775
|
}), l = crypto.randomUUID(), i = m(() => {
|
|
776
776
|
var d;
|
|
777
|
-
return e.value.length > 5 &&
|
|
777
|
+
return e.value.length > 5 && Ie(_e.DatasetLength), (d = e.value) == null ? void 0 : d.map(
|
|
778
778
|
(c, p) => {
|
|
779
779
|
if (bo(c)) return c;
|
|
780
780
|
const b = ko(c.values), k = _o(
|
|
@@ -793,7 +793,7 @@ function Lt(e, n, t, o, a) {
|
|
|
793
793
|
);
|
|
794
794
|
}), u = m(() => Array.isArray(n.value) ? n.value : qt(e.value).map((d, c) => c));
|
|
795
795
|
function s(d) {
|
|
796
|
-
const c = (a == null ? void 0 : a.value) === B.HORIZONTAL && u.value.length * (((o == null ? void 0 : o.value.barHeight) ||
|
|
796
|
+
const c = (a == null ? void 0 : a.value) === B.HORIZONTAL && u.value.length * (((o == null ? void 0 : o.value.barHeight) || Ot) * 2) + ((o == null ? void 0 : o.value.barHeight) || Ot) || d.height;
|
|
797
797
|
r.width = d.width, r.height = c;
|
|
798
798
|
}
|
|
799
799
|
return {
|
|
@@ -815,7 +815,7 @@ const Lo = () => ({
|
|
|
815
815
|
}
|
|
816
816
|
});
|
|
817
817
|
function Ao(e, n, t, o, a) {
|
|
818
|
-
const r =
|
|
818
|
+
const r = R(null), l = R(null);
|
|
819
819
|
function i() {
|
|
820
820
|
var d, c, p, b;
|
|
821
821
|
const { width: u, height: s } = t;
|
|
@@ -864,7 +864,7 @@ function St(e) {
|
|
|
864
864
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
865
865
|
}
|
|
866
866
|
function rt(e, n) {
|
|
867
|
-
return
|
|
867
|
+
return ye(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
868
868
|
}
|
|
869
869
|
function Rt(e, n, {
|
|
870
870
|
padding: t,
|
|
@@ -905,20 +905,20 @@ const He = (e, n = !0) => ({
|
|
|
905
905
|
}
|
|
906
906
|
});
|
|
907
907
|
function $o() {
|
|
908
|
-
const e =
|
|
908
|
+
const e = R(), n = Je({
|
|
909
909
|
dimensions: {}
|
|
910
910
|
}), t = new ResizeObserver((o) => {
|
|
911
911
|
o.forEach((a) => {
|
|
912
912
|
n.dimensions = a.contentRect;
|
|
913
913
|
});
|
|
914
914
|
});
|
|
915
|
-
return
|
|
915
|
+
return we(() => {
|
|
916
916
|
t.observe(e.value);
|
|
917
917
|
}), Yt(() => {
|
|
918
918
|
t.unobserve(e.value);
|
|
919
919
|
}), { resizeState: n, resizeRef: e };
|
|
920
920
|
}
|
|
921
|
-
const Io = ["height"],
|
|
921
|
+
const Io = ["height"], wo = ["transform"], xo = /* @__PURE__ */ Q({
|
|
922
922
|
__name: "lume-chart-container",
|
|
923
923
|
props: {
|
|
924
924
|
margins: {
|
|
@@ -945,7 +945,7 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
945
945
|
},
|
|
946
946
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
947
947
|
setup(e, { emit: n }) {
|
|
948
|
-
const t = e, o = n, { margins: a, containerSize: r } =
|
|
948
|
+
const t = e, o = n, { margins: a, containerSize: r } = re(t), l = R(null), { resizeRef: i, resizeState: u } = $o(), s = m(
|
|
949
949
|
() => r.value.height + a.value.top + a.value.bottom
|
|
950
950
|
);
|
|
951
951
|
return Xt(() => {
|
|
@@ -960,19 +960,19 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
960
960
|
outerHeight: c
|
|
961
961
|
};
|
|
962
962
|
o("resize", k);
|
|
963
|
-
}), (d, c) => (_(),
|
|
963
|
+
}), (d, c) => (_(), O("div", {
|
|
964
964
|
ref_key: "resizeRef",
|
|
965
965
|
ref: i,
|
|
966
|
-
class:
|
|
966
|
+
class: ue(["lume-chart-container", {
|
|
967
967
|
"lume-chart-container--minimum": !e.noMinSize
|
|
968
968
|
}]),
|
|
969
969
|
"data-j-chart-container": ""
|
|
970
970
|
}, [
|
|
971
|
-
|
|
972
|
-
(_(),
|
|
971
|
+
F(d.$slots, "header", {}, void 0, !0),
|
|
972
|
+
(_(), O("svg", {
|
|
973
973
|
ref_key: "root",
|
|
974
974
|
ref: l,
|
|
975
|
-
class:
|
|
975
|
+
class: ue(["lume-chart-container__svg", {
|
|
976
976
|
"lume-chart-container__svg--transparent": e.transparentBackground
|
|
977
977
|
}]),
|
|
978
978
|
height: s.value,
|
|
@@ -981,19 +981,19 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
981
981
|
onMouseenter: c[1] || (c[1] = (p) => o("mouseenter", p)),
|
|
982
982
|
onMouseleave: c[2] || (c[2] = (p) => o("mouseleave", p))
|
|
983
983
|
}, [
|
|
984
|
-
|
|
984
|
+
C("g", {
|
|
985
985
|
transform: `translate(${v(a).left}, ${v(a).top})`,
|
|
986
986
|
class: "lume-chart-container__group",
|
|
987
987
|
"data-j-chart-container__group": ""
|
|
988
988
|
}, [
|
|
989
|
-
|
|
990
|
-
], 8,
|
|
989
|
+
F(d.$slots, "default", {}, void 0, !0)
|
|
990
|
+
], 8, wo)
|
|
991
991
|
], 42, Io)),
|
|
992
|
-
|
|
993
|
-
|
|
992
|
+
F(d.$slots, "footer", {}, void 0, !0),
|
|
993
|
+
F(d.$slots, "extra", {}, void 0, !0)
|
|
994
994
|
], 2));
|
|
995
995
|
}
|
|
996
|
-
}),
|
|
996
|
+
}), No = /* @__PURE__ */ oe(xo, [["__scopeId", "data-v-d53cdc3e"]]), Oo = ["onClick", "onMouseenter"], Eo = /* @__PURE__ */ Q({
|
|
997
997
|
__name: "lume-chart-legend",
|
|
998
998
|
props: {
|
|
999
999
|
data: {
|
|
@@ -1005,12 +1005,12 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
1005
1005
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
1006
1006
|
setup(e, { emit: n }) {
|
|
1007
1007
|
const t = n;
|
|
1008
|
-
return (o, a) => (_(),
|
|
1008
|
+
return (o, a) => (_(), O("div", {
|
|
1009
1009
|
class: "lume-chart-legend",
|
|
1010
1010
|
"data-j-chart-legend": "",
|
|
1011
1011
|
onMouseleave: a[0] || (a[0] = (r) => t("mouseleave"))
|
|
1012
1012
|
}, [
|
|
1013
|
-
(_(!0),
|
|
1013
|
+
(_(!0), O(ne, null, J(e.data, (r, l) => (_(), O("div", {
|
|
1014
1014
|
key: `legend-item-${l}`,
|
|
1015
1015
|
class: "lume-chart-legend__item lume-typography--caption",
|
|
1016
1016
|
tabindex: "0",
|
|
@@ -1018,12 +1018,12 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
1018
1018
|
onClick: (i) => t("click", { index: l, dataset: r, event: i }),
|
|
1019
1019
|
onMouseenter: (i) => t("mouseenter", { index: l, dataset: r, event: i })
|
|
1020
1020
|
}, [
|
|
1021
|
-
|
|
1022
|
-
class:
|
|
1021
|
+
C("span", {
|
|
1022
|
+
class: ue(["lume-chart-legend__symbol", `lume-background-color--${r.color}`]),
|
|
1023
1023
|
"data-j-chart-legend__symbol": ""
|
|
1024
1024
|
}, null, 2),
|
|
1025
|
-
|
|
1026
|
-
], 40,
|
|
1025
|
+
ge(" " + se(r.label || l), 1)
|
|
1026
|
+
], 40, Oo))), 128))
|
|
1027
1027
|
], 32));
|
|
1028
1028
|
}
|
|
1029
1029
|
}), Gt = /* @__PURE__ */ oe(Eo, [["__scopeId", "data-v-6f1d1c44"]]), Do = {}, Bo = {
|
|
@@ -1031,8 +1031,8 @@ const Io = ["height"], xo = ["transform"], wo = /* @__PURE__ */ Q({
|
|
|
1031
1031
|
"data-j-tooltip__title": ""
|
|
1032
1032
|
};
|
|
1033
1033
|
function Ho(e, n) {
|
|
1034
|
-
return _(),
|
|
1035
|
-
|
|
1034
|
+
return _(), O("div", Bo, [
|
|
1035
|
+
F(e.$slots, "default", {}, void 0, !0)
|
|
1036
1036
|
]);
|
|
1037
1037
|
}
|
|
1038
1038
|
const Mo = /* @__PURE__ */ oe(Do, [["render", Ho], ["__scopeId", "data-v-8af3fac6"]]), So = {}, Ro = {
|
|
@@ -1040,12 +1040,12 @@ const Mo = /* @__PURE__ */ oe(Do, [["render", Ho], ["__scopeId", "data-v-8af3fac
|
|
|
1040
1040
|
"data-j-tooltip__summary-item": ""
|
|
1041
1041
|
}, Go = { class: "lume-tooltip__value" };
|
|
1042
1042
|
function Fo(e, n) {
|
|
1043
|
-
return _(),
|
|
1044
|
-
|
|
1045
|
-
|
|
1043
|
+
return _(), O("li", Ro, [
|
|
1044
|
+
C("span", null, [
|
|
1045
|
+
F(e.$slots, "default", {}, void 0, !0)
|
|
1046
1046
|
]),
|
|
1047
|
-
|
|
1048
|
-
|
|
1047
|
+
C("strong", Go, [
|
|
1048
|
+
F(e.$slots, "value", {}, void 0, !0)
|
|
1049
1049
|
])
|
|
1050
1050
|
]);
|
|
1051
1051
|
}
|
|
@@ -1064,24 +1064,24 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1064
1064
|
}
|
|
1065
1065
|
},
|
|
1066
1066
|
setup(e) {
|
|
1067
|
-
return (n, t) => (_(),
|
|
1068
|
-
e.color ? (_(),
|
|
1067
|
+
return (n, t) => (_(), O("li", Co, [
|
|
1068
|
+
e.color ? (_(), O("span", {
|
|
1069
1069
|
key: 0,
|
|
1070
|
-
class:
|
|
1070
|
+
class: ue([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
1071
1071
|
"data-j-tooltip__item__symbol": ""
|
|
1072
|
-
}, null, 2)) :
|
|
1073
|
-
|
|
1074
|
-
|
|
1072
|
+
}, null, 2)) : K("", !0),
|
|
1073
|
+
C("span", Po, [
|
|
1074
|
+
F(n.$slots, "label", {}, void 0, !0)
|
|
1075
1075
|
]),
|
|
1076
|
-
|
|
1077
|
-
|
|
1076
|
+
C("strong", Vo, [
|
|
1077
|
+
F(n.$slots, "value", {}, void 0, !0)
|
|
1078
1078
|
])
|
|
1079
1079
|
]));
|
|
1080
1080
|
}
|
|
1081
1081
|
}), Wo = /* @__PURE__ */ oe(zo, [["__scopeId", "data-v-4f995c3c"]]), Uo = (e) => (_n("data-v-6f13599d"), e = e(), kn(), e), Zo = { class: "lume-tooltip__items" }, Xo = {
|
|
1082
1082
|
key: 0,
|
|
1083
1083
|
class: "lume-tooltip__break"
|
|
1084
|
-
}, Yo = /* @__PURE__ */ Uo(() => /* @__PURE__ */
|
|
1084
|
+
}, Yo = /* @__PURE__ */ Uo(() => /* @__PURE__ */ C("hr", null, null, -1)), Ko = [
|
|
1085
1085
|
Yo
|
|
1086
1086
|
], Jo = /* @__PURE__ */ Q({
|
|
1087
1087
|
__name: "lume-tooltip",
|
|
@@ -1127,7 +1127,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1127
1127
|
},
|
|
1128
1128
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1129
1129
|
setup(e, { emit: n }) {
|
|
1130
|
-
const t = e, o = n, a =
|
|
1130
|
+
const t = e, o = n, a = R(null), { items: r, options: l } = re(t), i = fe(), u = R(null), { allOptions: s } = ke(l), d = m(
|
|
1131
1131
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
1132
1132
|
), c = m(
|
|
1133
1133
|
() => d.value ? "fixed" : "absolute"
|
|
@@ -1155,7 +1155,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1155
1155
|
}
|
|
1156
1156
|
), g = m(() => i.summary || $.value.label), f = m(() => t.inverse || s.value.inverse ? [...r.value].reverse() : r.value);
|
|
1157
1157
|
function y() {
|
|
1158
|
-
t.targetElement && a.value && (u.value =
|
|
1158
|
+
t.targetElement && a.value && (u.value = On(t.targetElement, a.value, {
|
|
1159
1159
|
placement: t.position,
|
|
1160
1160
|
strategy: c.value,
|
|
1161
1161
|
modifiers: p.value
|
|
@@ -1164,7 +1164,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1164
1164
|
function I() {
|
|
1165
1165
|
u.value && (u.value.destroy(), o("closed"), a.value && a.value.classList.remove("lume-tooltip--animated"));
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function x() {
|
|
1168
1168
|
u.value && (s.value.withAnimation !== !1 && a.value && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? (function() {
|
|
1169
1169
|
u.value.state.elements.reference = t.targetElement, u.value.update(), o("moved", t.targetElement);
|
|
1170
1170
|
})() : I());
|
|
@@ -1172,63 +1172,63 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1172
1172
|
return X(
|
|
1173
1173
|
() => t.targetElement,
|
|
1174
1174
|
async (D, H) => {
|
|
1175
|
-
!H && D ? (await at(), y()) :
|
|
1175
|
+
!H && D ? (await at(), y()) : x();
|
|
1176
1176
|
}
|
|
1177
|
-
),
|
|
1177
|
+
), we(y), Yt(I), (D, H) => e.opened && e.targetElement ? (_(), O("div", {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
ref_key: "root",
|
|
1180
1180
|
ref: a,
|
|
1181
|
-
class:
|
|
1181
|
+
class: ue(["lume-tooltip lume-typography--caption", {
|
|
1182
1182
|
"lume-tooltip--pointer-events": v(l).withPointerEvents
|
|
1183
1183
|
}]),
|
|
1184
1184
|
"data-j-tooltip": "",
|
|
1185
|
-
onMouseenter: H[0] || (H[0] = (
|
|
1186
|
-
onMouseleave: H[1] || (H[1] = (
|
|
1185
|
+
onMouseenter: H[0] || (H[0] = (M) => o("tooltip-mouseenter")),
|
|
1186
|
+
onMouseleave: H[1] || (H[1] = (M) => o("tooltip-mouseleave"))
|
|
1187
1187
|
}, [
|
|
1188
|
-
|
|
1189
|
-
|
|
1188
|
+
F(D.$slots, "default", {}, () => [
|
|
1189
|
+
F(D.$slots, "title", {}, () => [
|
|
1190
1190
|
b.value ? (_(), q(v(Mo), { key: 0 }, {
|
|
1191
|
-
default:
|
|
1192
|
-
|
|
1191
|
+
default: Z(() => [
|
|
1192
|
+
ge(se(L.value(e.title)), 1)
|
|
1193
1193
|
]),
|
|
1194
1194
|
_: 1
|
|
1195
|
-
})) :
|
|
1195
|
+
})) : K("", !0)
|
|
1196
1196
|
], !0),
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
g.value ? (_(), q(v(jo), { key: 0 },
|
|
1200
|
-
default:
|
|
1201
|
-
|
|
1197
|
+
C("ul", Zo, [
|
|
1198
|
+
F(D.$slots, "summary", {}, () => [
|
|
1199
|
+
g.value ? (_(), q(v(jo), { key: 0 }, he({
|
|
1200
|
+
default: Z(() => [
|
|
1201
|
+
ge(se($.value.label) + " ", 1)
|
|
1202
1202
|
]),
|
|
1203
1203
|
_: 2
|
|
1204
1204
|
}, [
|
|
1205
1205
|
$.value.value ? {
|
|
1206
1206
|
name: "value",
|
|
1207
|
-
fn:
|
|
1208
|
-
|
|
1207
|
+
fn: Z(() => [
|
|
1208
|
+
ge(se(k.value($.value.value)), 1)
|
|
1209
1209
|
]),
|
|
1210
1210
|
key: "0"
|
|
1211
1211
|
} : void 0
|
|
1212
|
-
]), 1024)) :
|
|
1212
|
+
]), 1024)) : K("", !0)
|
|
1213
1213
|
], !0),
|
|
1214
|
-
g.value ? (_(),
|
|
1215
|
-
|
|
1216
|
-
(_(!0),
|
|
1217
|
-
key:
|
|
1218
|
-
color:
|
|
1214
|
+
g.value ? (_(), O("li", Xo, Ko)) : K("", !0),
|
|
1215
|
+
F(D.$slots, "items", {}, () => [
|
|
1216
|
+
(_(!0), O(ne, null, J(f.value, (M) => (_(), q(v(Wo), {
|
|
1217
|
+
key: M.label,
|
|
1218
|
+
color: M.color
|
|
1219
1219
|
}, {
|
|
1220
|
-
label:
|
|
1221
|
-
|
|
1220
|
+
label: Z(() => [
|
|
1221
|
+
ge(se(M.label), 1)
|
|
1222
1222
|
]),
|
|
1223
|
-
value:
|
|
1224
|
-
|
|
1223
|
+
value: Z(() => [
|
|
1224
|
+
ge(se(k.value(M.value)), 1)
|
|
1225
1225
|
]),
|
|
1226
1226
|
_: 2
|
|
1227
1227
|
}, 1032, ["color"]))), 128))
|
|
1228
1228
|
], !0)
|
|
1229
1229
|
])
|
|
1230
1230
|
], !0)
|
|
1231
|
-
], 34)) :
|
|
1231
|
+
], 34)) : K("", !0);
|
|
1232
1232
|
}
|
|
1233
1233
|
}), Qo = /* @__PURE__ */ oe(Jo, [["__scopeId", "data-v-6f13599d"]]), qe = () => ({
|
|
1234
1234
|
data: {
|
|
@@ -1283,10 +1283,10 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1283
1283
|
},
|
|
1284
1284
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1285
1285
|
setup(e, { emit: n }) {
|
|
1286
|
-
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } =
|
|
1286
|
+
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } = re(t), u = m(() => qt(a));
|
|
1287
1287
|
function s(d) {
|
|
1288
1288
|
var g;
|
|
1289
|
-
const c = r.value === B.HORIZONTAL ? i.value : l.value, p = c.domain(), b = Sn(c), k = ((g = c.paddingInner) == null ? void 0 : g.call(c)) ?? 0, L = b * k, $ =
|
|
1289
|
+
const c = r.value === B.HORIZONTAL ? i.value : l.value, p = c.domain(), b = Sn(c), k = ((g = c.paddingInner) == null ? void 0 : g.call(c)) ?? 0, L = b * k, $ = ye(c) ? c(p[d]) - L / 2 : c(d) - b / 2;
|
|
1290
1290
|
return r.value === B.HORIZONTAL ? {
|
|
1291
1291
|
width: Math.max(...l.value.range()),
|
|
1292
1292
|
height: b,
|
|
@@ -1297,8 +1297,8 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1297
1297
|
transform: `translate(${$}, 0)`
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
return (d, c) => (_(),
|
|
1301
|
-
(_(!0),
|
|
1300
|
+
return (d, c) => (_(), O("g", qo, [
|
|
1301
|
+
(_(!0), O(ne, null, J(u.value, (p, b) => (_(), q(v(ht), z(s(b), {
|
|
1302
1302
|
key: `overlay-${b}`,
|
|
1303
1303
|
"data-j-lume-overlay-group": b,
|
|
1304
1304
|
transition: !1,
|
|
@@ -1308,7 +1308,7 @@ const jo = /* @__PURE__ */ oe(So, [["render", Fo], ["__scopeId", "data-v-4ed7ec1
|
|
|
1308
1308
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1309
1309
|
]));
|
|
1310
1310
|
}
|
|
1311
|
-
}),
|
|
1311
|
+
}), xe = (e, n) => {
|
|
1312
1312
|
function t(r, ...l) {
|
|
1313
1313
|
}
|
|
1314
1314
|
function o(r, l) {
|
|
@@ -1410,7 +1410,7 @@ function ua(e) {
|
|
|
1410
1410
|
})
|
|
1411
1411
|
) };
|
|
1412
1412
|
}
|
|
1413
|
-
const it = 16, st = 8, ct = 28, dt = 24,
|
|
1413
|
+
const it = 16, st = 8, ct = 28, dt = 24, Ee = {
|
|
1414
1414
|
VERTICAL: {
|
|
1415
1415
|
top: it,
|
|
1416
1416
|
right: st,
|
|
@@ -1455,102 +1455,102 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1455
1455
|
}
|
|
1456
1456
|
},
|
|
1457
1457
|
setup(e, { emit: n }) {
|
|
1458
|
-
const t = e, o =
|
|
1458
|
+
const t = e, o = fe(), a = n, { data: r, labels: l, color: i, options: u, orientation: s, chartType: d } = re(t), c = R(-1), p = R(null), b = R(null), k = R([]), L = R(null), $ = R(0), g = R(0), { allOptions: f } = ke(u), { internalData: y, computedLabels: I, containerSize: x, updateSize: D, chartID: H } = Lt(r, l, i, f, s), { xScale: M, yScale: ee } = Ao(
|
|
1459
1459
|
y,
|
|
1460
1460
|
I,
|
|
1461
|
-
|
|
1461
|
+
x,
|
|
1462
1462
|
s,
|
|
1463
1463
|
f
|
|
1464
|
-
),
|
|
1464
|
+
), E = m(() => ({
|
|
1465
1465
|
top: ra(f.value.margins),
|
|
1466
1466
|
right: ia(f.value.margins),
|
|
1467
1467
|
bottom: sa(f.value.margins, $.value),
|
|
1468
1468
|
left: ca(f.value.margins, g.value)
|
|
1469
|
-
})),
|
|
1469
|
+
})), V = m(() => {
|
|
1470
1470
|
var T;
|
|
1471
|
-
return t.xScale ? St(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, y.value, l.value,
|
|
1472
|
-
}),
|
|
1471
|
+
return t.xScale ? St(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, y.value, l.value, x) : M.value;
|
|
1472
|
+
}), Y = m(() => {
|
|
1473
1473
|
var T;
|
|
1474
|
-
return t.yScale ? St(t.yScale) ? t.yScale : (T = t.yScale) == null ? void 0 : T.call(t, y.value, l.value,
|
|
1475
|
-
}),
|
|
1474
|
+
return t.yScale ? St(t.yScale) ? t.yScale : (T = t.yScale) == null ? void 0 : T.call(t, y.value, l.value, x) : ee.value;
|
|
1475
|
+
}), te = m(() => ({
|
|
1476
1476
|
...f.value.xAxisOptions,
|
|
1477
1477
|
withHover: s.value === B.VERTICAL
|
|
1478
|
-
})),
|
|
1478
|
+
})), ae = m(() => ({
|
|
1479
1479
|
...f.value.yAxisOptions,
|
|
1480
1480
|
withHover: s.value === B.HORIZONTAL
|
|
1481
|
-
})),
|
|
1481
|
+
})), le = m(() => {
|
|
1482
1482
|
var T;
|
|
1483
1483
|
return (T = f.value.xAxisOptions) == null ? void 0 : T.title;
|
|
1484
|
-
}),
|
|
1484
|
+
}), be = m(() => {
|
|
1485
1485
|
var T;
|
|
1486
1486
|
return (T = f.value.yAxisOptions) == null ? void 0 : T.title;
|
|
1487
1487
|
}), Se = m(() => {
|
|
1488
1488
|
var T;
|
|
1489
|
-
return ((T = f.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 &&
|
|
1490
|
-
}),
|
|
1489
|
+
return ((T = f.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && le.value;
|
|
1490
|
+
}), j = m(() => {
|
|
1491
1491
|
var T;
|
|
1492
|
-
return ((T = f.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 &&
|
|
1493
|
-
}),
|
|
1492
|
+
return ((T = f.value.yAxisOptions) == null ? void 0 : T.withTitle) !== !1 && be.value;
|
|
1493
|
+
}), G = m(
|
|
1494
1494
|
() => r.value.every((T) => !T.values.length) || r.value.every((T) => T.values.every((A) => A === null))
|
|
1495
|
-
),
|
|
1495
|
+
), P = m(() => {
|
|
1496
1496
|
const T = [], { noBaseScales: A } = f.value;
|
|
1497
|
-
return A || T.push(() => !!(
|
|
1498
|
-
}), { hasNegativeValues:
|
|
1499
|
-
|
|
1497
|
+
return A || T.push(() => !!(V.value && Y.value)), T.every((N) => N() === !0);
|
|
1498
|
+
}), { hasNegativeValues: ie } = ta(y), { negativeBarAttributes: Le } = na(
|
|
1499
|
+
x,
|
|
1500
|
+
V,
|
|
1500
1501
|
Y,
|
|
1501
|
-
ne,
|
|
1502
1502
|
s
|
|
1503
1503
|
), { shouldGenerateTooltipAnchors: Re } = sn(
|
|
1504
1504
|
k,
|
|
1505
1505
|
f,
|
|
1506
|
+
V,
|
|
1506
1507
|
Y,
|
|
1507
|
-
ne,
|
|
1508
1508
|
l,
|
|
1509
1509
|
s,
|
|
1510
1510
|
y,
|
|
1511
1511
|
d
|
|
1512
|
-
), { tooltipConfig:
|
|
1512
|
+
), { tooltipConfig: Ne, showTooltip: et, hideTooltip: ze } = la(), { getTooltipItems: We } = ua(y), Be = m(
|
|
1513
1513
|
() => {
|
|
1514
1514
|
var T;
|
|
1515
1515
|
return ((T = f.value.tooltipOptions) == null ? void 0 : T.position) || "top";
|
|
1516
1516
|
}
|
|
1517
|
-
),
|
|
1517
|
+
), w = m(() => {
|
|
1518
1518
|
var A;
|
|
1519
1519
|
const T = (A = f.value.tooltipOptions) == null ? void 0 : A.withPointerEvents;
|
|
1520
|
-
return
|
|
1520
|
+
return Ne.opened && (!T || T && L.value === !1);
|
|
1521
1521
|
});
|
|
1522
|
-
function
|
|
1522
|
+
function S(T) {
|
|
1523
1523
|
var N;
|
|
1524
1524
|
if (f.value.withHover === !1 || T === c.value) return;
|
|
1525
1525
|
const A = c.value;
|
|
1526
1526
|
if (c.value = T, f.value.withTooltip !== !1) {
|
|
1527
|
-
const
|
|
1528
|
-
et(
|
|
1527
|
+
const Ae = (N = f.value.tooltipOptions) != null && N.targetElement ? f.value.tooltipOptions.targetElement === "self" ? b.value.$el : f.value.tooltipOptions.targetElement : p.value[T];
|
|
1528
|
+
et(Ae);
|
|
1529
1529
|
}
|
|
1530
1530
|
a("hovered-index-changed", { newIndex: T, oldIndex: A }), a("update:hoveredIndex", T);
|
|
1531
1531
|
}
|
|
1532
1532
|
function h() {
|
|
1533
1533
|
ze(), c.value = -1, a("update:hoveredIndex", -1);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function W(T) {
|
|
1536
1536
|
if (!r.value.some(
|
|
1537
1537
|
({ values: N }) => T <= N.length - 1
|
|
1538
1538
|
)) {
|
|
1539
|
-
|
|
1539
|
+
Ie(_e.InvalidHoveredIndex);
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
1542
|
-
T == null || T === -1 ? h() :
|
|
1542
|
+
T == null || T === -1 ? h() : S(T);
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function U() {
|
|
1545
1545
|
setTimeout(() => {
|
|
1546
|
-
|
|
1546
|
+
w.value && h(), a("chart-mouseleave");
|
|
1547
1547
|
}, 0);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function de(T) {
|
|
1550
1550
|
D(T), a("resize", T);
|
|
1551
1551
|
}
|
|
1552
1552
|
function tt({ index: T, value: A, event: N }) {
|
|
1553
|
-
T !== null &&
|
|
1553
|
+
T !== null && S(T), a("axis-mouseenter", { index: T, value: A, event: N });
|
|
1554
1554
|
}
|
|
1555
1555
|
function Ue({ index: T, value: A, event: N }) {
|
|
1556
1556
|
a("axis-click", { index: T, value: A, event: N });
|
|
@@ -1561,42 +1561,42 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1561
1561
|
), X(
|
|
1562
1562
|
l,
|
|
1563
1563
|
(T, A) => a("labels-changed", { newValue: T, oldValue: A })
|
|
1564
|
-
), X(
|
|
1564
|
+
), X(G, (T) => T && Ie(_e.Empty), { immediate: !0 }), X(() => t.hoveredIndex, W), X(
|
|
1565
1565
|
k,
|
|
1566
1566
|
(T) => {
|
|
1567
|
-
T && t.hoveredIndex != null && c.value === -1 &&
|
|
1567
|
+
T && t.hoveredIndex != null && c.value === -1 && W(t.hoveredIndex);
|
|
1568
1568
|
},
|
|
1569
1569
|
{ flush: "post" }
|
|
1570
1570
|
), X(L, (T) => {
|
|
1571
|
-
T === !1 &&
|
|
1572
|
-
}),
|
|
1571
|
+
T === !1 && Ne.opened && h();
|
|
1572
|
+
}), we(async () => {
|
|
1573
1573
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1574
|
-
}), nt("chartID", H), nt("isEmpty",
|
|
1574
|
+
}), nt("chartID", H), nt("isEmpty", G), nt("tooltipAnchorAttributes", k), (T, A) => (_(), q(v(No), {
|
|
1575
1575
|
id: `lume-chart_${v(H)}`,
|
|
1576
1576
|
ref_key: "chartContainer",
|
|
1577
1577
|
ref: b,
|
|
1578
|
-
margins:
|
|
1579
|
-
"container-size": v(
|
|
1578
|
+
margins: E.value,
|
|
1579
|
+
"container-size": v(x),
|
|
1580
1580
|
"no-min-size": v(f).noMinSize,
|
|
1581
1581
|
"transparent-background": v(f).transparentBackground,
|
|
1582
1582
|
orientation: v(s),
|
|
1583
1583
|
"data-j-lume-chart": "",
|
|
1584
|
-
onResize:
|
|
1584
|
+
onResize: de,
|
|
1585
1585
|
onClick: A[24] || (A[24] = (N) => a("chart-click", N)),
|
|
1586
1586
|
onMouseenter: A[25] || (A[25] = (N) => a("chart-mouseenter", N)),
|
|
1587
|
-
onMouseleave:
|
|
1587
|
+
onMouseleave: U
|
|
1588
1588
|
}, {
|
|
1589
|
-
header:
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
T.title ? (_(),
|
|
1593
|
-
|
|
1594
|
-
|
|
1589
|
+
header: Z(() => [
|
|
1590
|
+
C("div", da, [
|
|
1591
|
+
C("div", va, [
|
|
1592
|
+
T.title ? (_(), O("h1", fa, se(T.title), 1)) : K("", !0),
|
|
1593
|
+
C("div", ma, [
|
|
1594
|
+
F(T.$slots, "controls", {}, void 0, !0)
|
|
1595
1595
|
])
|
|
1596
1596
|
]),
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1597
|
+
C("div", pa, [
|
|
1598
|
+
j.value ? (_(), O("h3", ga, se(be.value), 1)) : K("", !0),
|
|
1599
|
+
F(T.$slots, "legend", { data: v(y) }, () => [
|
|
1600
1600
|
v(f).withLegend !== !1 && v(f).legendPosition !== "bottom" ? (_(), q(v(Gt), {
|
|
1601
1601
|
key: 0,
|
|
1602
1602
|
data: v(y),
|
|
@@ -1605,13 +1605,13 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1605
1605
|
onClick: A[0] || (A[0] = (N) => a("legend-click", N)),
|
|
1606
1606
|
onMouseenter: A[1] || (A[1] = (N) => a("legend-mouseenter", N)),
|
|
1607
1607
|
onMouseleave: A[2] || (A[2] = (N) => a("legend-mouseleave"))
|
|
1608
|
-
}, null, 8, ["data"])) :
|
|
1608
|
+
}, null, 8, ["data"])) : K("", !0)
|
|
1609
1609
|
], !0)
|
|
1610
1610
|
])
|
|
1611
1611
|
])
|
|
1612
1612
|
]),
|
|
1613
|
-
footer:
|
|
1614
|
-
Se.value ? (_(),
|
|
1613
|
+
footer: Z(() => [
|
|
1614
|
+
Se.value ? (_(), O("h3", _a, se(le.value), 1)) : K("", !0),
|
|
1615
1615
|
v(f).withLegend !== !1 && v(f).legendPosition == "bottom" ? (_(), q(v(Gt), {
|
|
1616
1616
|
key: 1,
|
|
1617
1617
|
data: v(y),
|
|
@@ -1620,10 +1620,10 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1620
1620
|
onClick: A[16] || (A[16] = (N) => a("legend-click", N)),
|
|
1621
1621
|
onMouseenter: A[17] || (A[17] = (N) => a("legend-mouseenter", N)),
|
|
1622
1622
|
onMouseleave: A[18] || (A[18] = (N) => a("legend-mouseleave"))
|
|
1623
|
-
}, null, 8, ["data"])) :
|
|
1623
|
+
}, null, 8, ["data"])) : K("", !0)
|
|
1624
1624
|
]),
|
|
1625
|
-
extra:
|
|
1626
|
-
|
|
1625
|
+
extra: Z(() => [
|
|
1626
|
+
F(T.$slots, "tooltip", z(v(Ne), {
|
|
1627
1627
|
data: v(y),
|
|
1628
1628
|
labels: v(I),
|
|
1629
1629
|
title: v(I)[c.value],
|
|
@@ -1635,7 +1635,7 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1635
1635
|
handleMouseLeave: () => L.value = !1,
|
|
1636
1636
|
options: v(f).tooltipOptions
|
|
1637
1637
|
}), () => [
|
|
1638
|
-
v(f).withTooltip !== !1 ? (_(), q(v(Qo),
|
|
1638
|
+
v(f).withTooltip !== !1 ? (_(), q(v(Qo), z({ key: 0 }, v(Ne), {
|
|
1639
1639
|
position: Be.value,
|
|
1640
1640
|
title: v(I)[c.value],
|
|
1641
1641
|
items: v(We)(c.value),
|
|
@@ -1653,37 +1653,37 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1653
1653
|
onTooltipMouseenter: A[22] || (A[22] = (N) => L.value = !0),
|
|
1654
1654
|
onTooltipMouseleave: A[23] || (A[23] = (N) => L.value = !1)
|
|
1655
1655
|
}), {
|
|
1656
|
-
default:
|
|
1657
|
-
|
|
1656
|
+
default: Z(() => [
|
|
1657
|
+
F(T.$slots, "tooltip-content", {
|
|
1658
1658
|
data: v(y),
|
|
1659
1659
|
labels: v(I),
|
|
1660
1660
|
hoveredIndex: c.value
|
|
1661
1661
|
}, void 0, !0)
|
|
1662
1662
|
]),
|
|
1663
1663
|
_: 3
|
|
1664
|
-
}, 16, ["position", "title", "items", "options"])) :
|
|
1664
|
+
}, 16, ["position", "title", "items", "options"])) : K("", !0)
|
|
1665
1665
|
], !0)
|
|
1666
1666
|
]),
|
|
1667
|
-
default:
|
|
1668
|
-
|
|
1669
|
-
v(
|
|
1667
|
+
default: Z(() => [
|
|
1668
|
+
P.value ? (_(), O(ne, { key: 0 }, [
|
|
1669
|
+
v(ie) ? (_(), q(v(ht), z({ key: 0 }, v(Le), {
|
|
1670
1670
|
"class-list": "lume-fill--negative",
|
|
1671
1671
|
transition: !1,
|
|
1672
1672
|
"data-j-lume-chart__negative-values": ""
|
|
1673
|
-
}), null, 16)) :
|
|
1674
|
-
v(f).withAxes !== !1 ?
|
|
1673
|
+
}), null, 16)) : K("", !0),
|
|
1674
|
+
v(f).withAxes !== !1 ? F(T.$slots, "axes", {
|
|
1675
1675
|
key: 1,
|
|
1676
|
-
xScale:
|
|
1677
|
-
yScale:
|
|
1678
|
-
containerSize: v(
|
|
1676
|
+
xScale: V.value,
|
|
1677
|
+
yScale: Y.value,
|
|
1678
|
+
containerSize: v(x),
|
|
1679
1679
|
options: v(f),
|
|
1680
1680
|
hoveredIndex: c.value
|
|
1681
1681
|
}, () => [
|
|
1682
|
-
|
|
1682
|
+
me(v(Et), {
|
|
1683
1683
|
type: "x",
|
|
1684
|
-
scale:
|
|
1685
|
-
"container-size": v(
|
|
1686
|
-
options:
|
|
1684
|
+
scale: V.value,
|
|
1685
|
+
"container-size": v(x),
|
|
1686
|
+
options: te.value,
|
|
1687
1687
|
"hovered-index": c.value,
|
|
1688
1688
|
orientation: v(s),
|
|
1689
1689
|
"data-j-lume-chart__x-axis": "",
|
|
@@ -1692,11 +1692,11 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1692
1692
|
onMouseleave: A[3] || (A[3] = (N) => a("axis-mouseleave")),
|
|
1693
1693
|
"onLume__internal-AxisSize": A[4] || (A[4] = (N) => $.value = N)
|
|
1694
1694
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1695
|
-
|
|
1695
|
+
me(v(Et), {
|
|
1696
1696
|
type: "y",
|
|
1697
|
-
scale:
|
|
1698
|
-
"container-size": v(
|
|
1699
|
-
options:
|
|
1697
|
+
scale: Y.value,
|
|
1698
|
+
"container-size": v(x),
|
|
1699
|
+
options: ae.value,
|
|
1700
1700
|
"hovered-index": c.value,
|
|
1701
1701
|
orientation: v(s),
|
|
1702
1702
|
"data-j-lume-chart__y-axis": "",
|
|
@@ -1705,35 +1705,35 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1705
1705
|
onMouseleave: A[5] || (A[5] = (N) => a("axis-mouseleave")),
|
|
1706
1706
|
"onLume__internal-AxisSize": A[6] || (A[6] = (N) => g.value = N)
|
|
1707
1707
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1708
|
-
], !0) :
|
|
1708
|
+
], !0) : K("", !0),
|
|
1709
1709
|
v(f).withHover !== !1 ? (_(), q(v(ea), {
|
|
1710
1710
|
key: 2,
|
|
1711
1711
|
data: v(y),
|
|
1712
1712
|
orientation: v(s),
|
|
1713
|
-
"x-scale":
|
|
1714
|
-
"y-scale":
|
|
1713
|
+
"x-scale": V.value,
|
|
1714
|
+
"y-scale": Y.value,
|
|
1715
1715
|
"data-j-lume-chart__overlay-group": "",
|
|
1716
|
-
"onLume__internal-Hover":
|
|
1717
|
-
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) :
|
|
1718
|
-
v(Re) ? (_(),
|
|
1719
|
-
(_(!0),
|
|
1716
|
+
"onLume__internal-Hover": S
|
|
1717
|
+
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : K("", !0),
|
|
1718
|
+
v(Re) ? (_(), O("g", ha, [
|
|
1719
|
+
(_(!0), O(ne, null, J(k.value, (N, Ae) => (_(), O("circle", z(N, {
|
|
1720
1720
|
ref_for: !0,
|
|
1721
1721
|
ref_key: "tooltipAnchor",
|
|
1722
1722
|
ref: p,
|
|
1723
|
-
key: `anchor_${
|
|
1723
|
+
key: `anchor_${Ae}`,
|
|
1724
1724
|
r: v(Xn),
|
|
1725
1725
|
class: "lume-fill--transparent"
|
|
1726
1726
|
}), null, 16, ya))), 128))
|
|
1727
|
-
])) :
|
|
1728
|
-
|
|
1727
|
+
])) : K("", !0),
|
|
1728
|
+
F(T.$slots, "groups", {
|
|
1729
1729
|
data: v(y),
|
|
1730
1730
|
labels: v(I),
|
|
1731
1731
|
options: v(f),
|
|
1732
1732
|
orientation: v(s),
|
|
1733
|
-
xScale:
|
|
1734
|
-
yScale:
|
|
1733
|
+
xScale: V.value,
|
|
1734
|
+
yScale: Y.value,
|
|
1735
1735
|
hoveredIndex: c.value,
|
|
1736
|
-
containerSize: v(
|
|
1736
|
+
containerSize: v(x),
|
|
1737
1737
|
transition: v(f).withTransition !== !1,
|
|
1738
1738
|
classList: T.classList,
|
|
1739
1739
|
onNodeClick: A[7] || (A[7] = (N) => a("node-click", N)),
|
|
@@ -1745,14 +1745,14 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1745
1745
|
onBarClick: A[13] || (A[13] = (N) => a("bar-click", N)),
|
|
1746
1746
|
onLineClick: A[14] || (A[14] = (N) => a("line-click", N)),
|
|
1747
1747
|
onPointClick: A[15] || (A[15] = (N) => a("point-click", N)),
|
|
1748
|
-
"onLume__internal-Hover":
|
|
1748
|
+
"onLume__internal-Hover": S
|
|
1749
1749
|
}, void 0, !0)
|
|
1750
|
-
], 64)) :
|
|
1750
|
+
], 64)) : K("", !0)
|
|
1751
1751
|
]),
|
|
1752
1752
|
_: 3
|
|
1753
1753
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "orientation"]));
|
|
1754
1754
|
}
|
|
1755
|
-
}), Me = /* @__PURE__ */ oe(ka, [["__scopeId", "data-v-17c48844"]]), jt = 8, ba = 8, La = 20, Ge = 2, Ze = 3, Aa = 4, Ct = 2, Ta = ["dy", "dominant-baseline"], $a = ["y", "x", "width", "height"], Ia = { class: "lume-alluvial-group__label-wrapper" },
|
|
1755
|
+
}), Me = /* @__PURE__ */ oe(ka, [["__scopeId", "data-v-17c48844"]]), jt = 8, ba = 8, La = 20, Ge = 2, Ze = 3, Aa = 4, Ct = 2, Ta = ["dy", "dominant-baseline"], $a = ["y", "x", "width", "height"], Ia = { class: "lume-alluvial-group__label-wrapper" }, wa = /* @__PURE__ */ Q({
|
|
1756
1756
|
__name: "lume-alluvial-node-label",
|
|
1757
1757
|
props: {
|
|
1758
1758
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1761,7 +1761,7 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1761
1761
|
},
|
|
1762
1762
|
emits: ["lume__internal--node-resize"],
|
|
1763
1763
|
setup(e, { emit: n }) {
|
|
1764
|
-
const t = e, o = n, a =
|
|
1764
|
+
const t = e, o = n, a = R(null), r = R(t.maxWidth), l = R(1);
|
|
1765
1765
|
return X(
|
|
1766
1766
|
[a, () => t.maxWidth],
|
|
1767
1767
|
async ([i, u]) => {
|
|
@@ -1774,7 +1774,7 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1774
1774
|
{ immediate: !0 }
|
|
1775
1775
|
), X(r, async (i) => {
|
|
1776
1776
|
i !== t.maxWidth && (await at(), o("lume__internal--node-resize"));
|
|
1777
|
-
}), (i, u) => e.maxWidth ? (_(),
|
|
1777
|
+
}), (i, u) => e.maxWidth ? (_(), O("foreignObject", {
|
|
1778
1778
|
key: 1,
|
|
1779
1779
|
class: "lume-alluvial-group__node-foreign",
|
|
1780
1780
|
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
@@ -1782,39 +1782,39 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1782
1782
|
width: r.value,
|
|
1783
1783
|
height: l.value
|
|
1784
1784
|
}, [
|
|
1785
|
-
|
|
1786
|
-
|
|
1785
|
+
C("div", Ia, [
|
|
1786
|
+
C("span", {
|
|
1787
1787
|
ref_key: "text",
|
|
1788
1788
|
ref: a,
|
|
1789
1789
|
class: "lume-alluvial-group__node-label"
|
|
1790
1790
|
}, [
|
|
1791
|
-
|
|
1791
|
+
F(i.$slots, "default", {}, void 0, !0)
|
|
1792
1792
|
], 512)
|
|
1793
1793
|
])
|
|
1794
|
-
], 8, $a)) : (_(),
|
|
1794
|
+
], 8, $a)) : (_(), O("text", {
|
|
1795
1795
|
key: 0,
|
|
1796
1796
|
class: "lume-alluvial-group__node-label",
|
|
1797
1797
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1798
1798
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1799
1799
|
}, [
|
|
1800
|
-
|
|
1800
|
+
F(i.$slots, "default", {}, void 0, !0)
|
|
1801
1801
|
], 8, Ta));
|
|
1802
1802
|
}
|
|
1803
|
-
}),
|
|
1803
|
+
}), xa = /* @__PURE__ */ oe(wa, [["__scopeId", "data-v-7126dfdb"]]), Na = ["y", "dominant-baseline"], Oa = /* @__PURE__ */ Q({
|
|
1804
1804
|
__name: "lume-alluvial-node-value",
|
|
1805
1805
|
props: {
|
|
1806
1806
|
bottom: { type: Boolean, default: !0 }
|
|
1807
1807
|
},
|
|
1808
1808
|
setup(e) {
|
|
1809
|
-
return (n, t) => (_(),
|
|
1809
|
+
return (n, t) => (_(), O("text", {
|
|
1810
1810
|
class: "lume-alluvial-group__node-value",
|
|
1811
1811
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1812
1812
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1813
1813
|
}, [
|
|
1814
|
-
|
|
1815
|
-
], 8,
|
|
1814
|
+
F(n.$slots, "default", {}, void 0, !0)
|
|
1815
|
+
], 8, Na));
|
|
1816
1816
|
}
|
|
1817
|
-
}), Ea = /* @__PURE__ */ oe(
|
|
1817
|
+
}), Ea = /* @__PURE__ */ oe(Oa, [["__scopeId", "data-v-b4fc758b"]]), Da = ["transform"], Ba = ["transform"], Ha = ["transform"], Ma = /* @__PURE__ */ Q({
|
|
1818
1818
|
__name: "lume-alluvial-node-header",
|
|
1819
1819
|
props: {
|
|
1820
1820
|
align: {
|
|
@@ -1825,7 +1825,7 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1825
1825
|
y: { type: Number, required: !0 }
|
|
1826
1826
|
},
|
|
1827
1827
|
setup(e) {
|
|
1828
|
-
const n = e, t =
|
|
1828
|
+
const n = e, t = R(null), o = m(() => {
|
|
1829
1829
|
var i;
|
|
1830
1830
|
return ((i = t.value) == null ? void 0 : i.getBBox().width) ?? 0;
|
|
1831
1831
|
}), a = m(() => n.align === "left" ? 0 : n.align === "right" ? -o.value : -o.value / 2), r = m(
|
|
@@ -1833,23 +1833,23 @@ const da = { class: "lume-chart__header" }, va = { class: "lume-chart__header-se
|
|
|
1833
1833
|
), l = m(
|
|
1834
1834
|
() => t.value && `translate(${a.value + o.value}, 0)`
|
|
1835
1835
|
);
|
|
1836
|
-
return (i, u) => (_(),
|
|
1836
|
+
return (i, u) => (_(), O("g", {
|
|
1837
1837
|
transform: `translate(${e.x}, ${e.y})`
|
|
1838
1838
|
}, [
|
|
1839
|
-
|
|
1840
|
-
|
|
1839
|
+
C("g", { transform: r.value }, [
|
|
1840
|
+
F(i.$slots, "before", {}, void 0, !0)
|
|
1841
1841
|
], 8, Ba),
|
|
1842
|
-
|
|
1842
|
+
C("text", {
|
|
1843
1843
|
ref_key: "textRef",
|
|
1844
1844
|
ref: t,
|
|
1845
|
-
class:
|
|
1845
|
+
class: ue(["lume-alluvial-group__node-header lume-typography--caption", {
|
|
1846
1846
|
[`lume-alluvial-group__node-header--${e.align}`]: e.align !== "center"
|
|
1847
1847
|
}])
|
|
1848
1848
|
}, [
|
|
1849
|
-
|
|
1849
|
+
F(i.$slots, "default", {}, void 0, !0)
|
|
1850
1850
|
], 2),
|
|
1851
|
-
|
|
1852
|
-
|
|
1851
|
+
C("g", { transform: l.value }, [
|
|
1852
|
+
F(i.$slots, "after", {}, void 0, !0)
|
|
1853
1853
|
], 8, Ha)
|
|
1854
1854
|
], 8, Da));
|
|
1855
1855
|
}
|
|
@@ -1863,7 +1863,7 @@ function Pt(e, n) {
|
|
|
1863
1863
|
};
|
|
1864
1864
|
}
|
|
1865
1865
|
function Ra(e) {
|
|
1866
|
-
const n =
|
|
1866
|
+
const n = R(Pt(e));
|
|
1867
1867
|
function t(o) {
|
|
1868
1868
|
n.value = Pt(e, o);
|
|
1869
1869
|
}
|
|
@@ -1875,7 +1875,7 @@ function vt(e, n, t = !0) {
|
|
|
1875
1875
|
t && Kt() || console.error(Ga + "Error: " + e, n);
|
|
1876
1876
|
}
|
|
1877
1877
|
const Fa = 200;
|
|
1878
|
-
function
|
|
1878
|
+
function ve(e) {
|
|
1879
1879
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1880
1880
|
}
|
|
1881
1881
|
function ja(e, n) {
|
|
@@ -1942,7 +1942,7 @@ function Wa(e) {
|
|
|
1942
1942
|
return [e.target.x0, e.y1];
|
|
1943
1943
|
}
|
|
1944
1944
|
function Ua(e) {
|
|
1945
|
-
return e.curveFunction ?
|
|
1945
|
+
return e.curveFunction ? wn(e.curveFunction).source(za).target(Wa) : Ln();
|
|
1946
1946
|
}
|
|
1947
1947
|
function Za(e) {
|
|
1948
1948
|
return e.map((n) => {
|
|
@@ -1975,7 +1975,7 @@ function Vt(e, n, t, o, a) {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
const Xa = ":aggregated";
|
|
1977
1977
|
function Ya(e) {
|
|
1978
|
-
const n =
|
|
1978
|
+
const n = R([]), t = m(() => {
|
|
1979
1979
|
var s, d;
|
|
1980
1980
|
const u = /* @__PURE__ */ new Map();
|
|
1981
1981
|
return (d = (s = e.value) == null ? void 0 : s[0]) == null || d.values.forEach(({ value: c, expandableNodes: p }) => {
|
|
@@ -2015,13 +2015,13 @@ function Ka(e, n, t, o) {
|
|
|
2015
2015
|
if (!e || !n || o.size === 0)
|
|
2016
2016
|
return { nodes: e, links: n };
|
|
2017
2017
|
const a = n.filter(
|
|
2018
|
-
(l) => !o.has(
|
|
2018
|
+
(l) => !o.has(ve(l.source)) && !o.has(ve(l.target))
|
|
2019
2019
|
), r = new Set(a.map(({ id: l }) => l));
|
|
2020
2020
|
return t.forEach((l, i) => {
|
|
2021
2021
|
const u = /* @__PURE__ */ new Map();
|
|
2022
2022
|
l.forEach((s) => {
|
|
2023
2023
|
mn(n, s).forEach((d) => {
|
|
2024
|
-
const c =
|
|
2024
|
+
const c = ve(d.target), p = u.get(c);
|
|
2025
2025
|
if (p) {
|
|
2026
2026
|
p.value += d.value;
|
|
2027
2027
|
return;
|
|
@@ -2198,12 +2198,12 @@ function al(e, n) {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
function mn(e, n) {
|
|
2200
2200
|
return e.filter(
|
|
2201
|
-
(t) =>
|
|
2201
|
+
(t) => ve(t.source) === n
|
|
2202
2202
|
);
|
|
2203
2203
|
}
|
|
2204
2204
|
function $t(e, n, t) {
|
|
2205
2205
|
return e.find(
|
|
2206
|
-
(o) =>
|
|
2206
|
+
(o) => ve(o.source) === n && ve(o.target) === t
|
|
2207
2207
|
);
|
|
2208
2208
|
}
|
|
2209
2209
|
function ll(e, n, t) {
|
|
@@ -2238,7 +2238,7 @@ function Wt(e, n) {
|
|
|
2238
2238
|
return n.find((t) => t.every((o) => o.layer === e.layer));
|
|
2239
2239
|
}
|
|
2240
2240
|
function sl(e, n, t) {
|
|
2241
|
-
const o =
|
|
2241
|
+
const o = R(null), {
|
|
2242
2242
|
childIdsByParentId: a,
|
|
2243
2243
|
expandedNodeIds: r,
|
|
2244
2244
|
isExpandableNode: l,
|
|
@@ -2251,18 +2251,18 @@ function sl(e, n, t) {
|
|
|
2251
2251
|
({
|
|
2252
2252
|
label: y,
|
|
2253
2253
|
color: I,
|
|
2254
|
-
value:
|
|
2254
|
+
value: x,
|
|
2255
2255
|
deriveColorFromIncomingLinks: D,
|
|
2256
2256
|
expandableNodes: H,
|
|
2257
|
-
offset:
|
|
2257
|
+
offset: M
|
|
2258
2258
|
}) => ({
|
|
2259
|
-
label: y ||
|
|
2259
|
+
label: y || x.toString(),
|
|
2260
2260
|
color: I,
|
|
2261
2261
|
fallbackColor: I || Ve,
|
|
2262
|
-
id:
|
|
2262
|
+
id: x,
|
|
2263
2263
|
deriveColorFromIncomingLinks: D,
|
|
2264
2264
|
expandableNodes: H,
|
|
2265
|
-
offset:
|
|
2265
|
+
offset: M
|
|
2266
2266
|
})
|
|
2267
2267
|
);
|
|
2268
2268
|
}), c = m(
|
|
@@ -2272,38 +2272,38 @@ function sl(e, n, t) {
|
|
|
2272
2272
|
(y) => {
|
|
2273
2273
|
var I;
|
|
2274
2274
|
return (I = y.targets) == null ? void 0 : I.map(
|
|
2275
|
-
({ node:
|
|
2276
|
-
id: `${y.value}:${
|
|
2275
|
+
({ node: x, value: D, color: H, curveFunction: M }) => ({
|
|
2276
|
+
id: `${y.value}:${x}`,
|
|
2277
2277
|
color: H,
|
|
2278
|
-
curveFunction:
|
|
2278
|
+
curveFunction: M,
|
|
2279
2279
|
source: y.value ?? y.label,
|
|
2280
|
-
target:
|
|
2280
|
+
target: x,
|
|
2281
2281
|
value: D
|
|
2282
2282
|
})
|
|
2283
2283
|
);
|
|
2284
2284
|
}
|
|
2285
2285
|
).filter(Boolean).flat();
|
|
2286
2286
|
}
|
|
2287
|
-
), p = m(() => An().nodeId(
|
|
2287
|
+
), p = m(() => An().nodeId(ve).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), b = m(() => {
|
|
2288
2288
|
var g;
|
|
2289
2289
|
return (g = o.value) == null ? void 0 : g.nodes.filter((f) => f.parentNodeId == null).reduce((f, y) => {
|
|
2290
2290
|
const I = Wt(y, f);
|
|
2291
|
-
return I ? (I.push(y), I.sort((
|
|
2291
|
+
return I ? (I.push(y), I.sort((x, D) => (x._y0 || x.y0) - (D._y0 || D.y0))) : f.push([y]), f;
|
|
2292
2292
|
}, []).sort((f, y) => f[0].layer - y[0].layer);
|
|
2293
2293
|
});
|
|
2294
2294
|
function k(g) {
|
|
2295
2295
|
const { offset: f } = g, y = Wt(g, b.value);
|
|
2296
2296
|
if (!y) return;
|
|
2297
|
-
const I = y[y.findIndex((D) => D.id === g.id) - 1],
|
|
2298
|
-
g._y0 = g.y0, g._y1 = g.y1, g.y0 =
|
|
2297
|
+
const I = y[y.findIndex((D) => D.id === g.id) - 1], x = I && y.length !== 1 ? I.y1 + f : f;
|
|
2298
|
+
g._y0 = g.y0, g._y1 = g.y1, g.y0 = x, g.y1 = g.y0 + (g._y1 - g._y0);
|
|
2299
2299
|
}
|
|
2300
2300
|
function L(g, f) {
|
|
2301
|
-
const { id: y, _y0: I, y0:
|
|
2302
|
-
(
|
|
2301
|
+
const { id: y, _y0: I, y0: x } = g, D = f.links.filter(
|
|
2302
|
+
(ee) => ee.source.id === y
|
|
2303
2303
|
), H = f.links.filter(
|
|
2304
|
-
(
|
|
2305
|
-
),
|
|
2306
|
-
D.forEach((
|
|
2304
|
+
(ee) => ee.target.id === y
|
|
2305
|
+
), M = x - I;
|
|
2306
|
+
D.forEach((ee) => ee.y0 += M), H.forEach((ee) => ee.y1 += M);
|
|
2307
2307
|
}
|
|
2308
2308
|
const $ = m(() => {
|
|
2309
2309
|
var g;
|
|
@@ -2313,7 +2313,7 @@ function sl(e, n, t) {
|
|
|
2313
2313
|
});
|
|
2314
2314
|
return X([p, t, r], () => {
|
|
2315
2315
|
try {
|
|
2316
|
-
const { x0: g, y0: f, x1: y, y1: I } = t.value,
|
|
2316
|
+
const { x0: g, y0: f, x1: y, y1: I } = t.value, x = p.value.extent([
|
|
2317
2317
|
[g, f],
|
|
2318
2318
|
[y, I]
|
|
2319
2319
|
])(
|
|
@@ -2325,14 +2325,14 @@ function sl(e, n, t) {
|
|
|
2325
2325
|
)
|
|
2326
2326
|
);
|
|
2327
2327
|
Ja({
|
|
2328
|
-
graph:
|
|
2328
|
+
graph: x,
|
|
2329
2329
|
nodes: d.value,
|
|
2330
2330
|
linkDefinitions: c.value,
|
|
2331
2331
|
expandedNodeIds: r.value,
|
|
2332
2332
|
childIdsByParentId: a.value,
|
|
2333
2333
|
options: n.value,
|
|
2334
2334
|
extents: t.value
|
|
2335
|
-
}), o.value =
|
|
2335
|
+
}), o.value = x;
|
|
2336
2336
|
} catch (g) {
|
|
2337
2337
|
vt(Ye.GraphProblem, g), o.value = il;
|
|
2338
2338
|
}
|
|
@@ -2376,22 +2376,22 @@ const dl = (e, n) => {
|
|
|
2376
2376
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2377
2377
|
return {
|
|
2378
2378
|
nodes: n.reduce(
|
|
2379
|
-
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [
|
|
2380
|
-
{ [
|
|
2379
|
+
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [ve(a)]: r } : { ...t, [ve(o)]: r },
|
|
2380
|
+
{ [ve(e)]: e.value }
|
|
2381
2381
|
),
|
|
2382
2382
|
links: n.map(({ id: t }) => t)
|
|
2383
2383
|
};
|
|
2384
2384
|
}
|
|
2385
2385
|
return {
|
|
2386
2386
|
nodes: {
|
|
2387
|
-
[
|
|
2388
|
-
[
|
|
2387
|
+
[ve(e.target)]: e.value,
|
|
2388
|
+
[ve(e.source)]: e.source.value
|
|
2389
2389
|
},
|
|
2390
2390
|
links: [e.id]
|
|
2391
2391
|
};
|
|
2392
2392
|
};
|
|
2393
2393
|
function fl(e, n, t) {
|
|
2394
|
-
const o =
|
|
2394
|
+
const o = R(null), a = m(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2395
2395
|
o.value,
|
|
2396
2396
|
t.value
|
|
2397
2397
|
) : n.value.highlightedElements === "closest" ? vl(o.value, t.value) : dl(o.value, t.value) : { nodes: {}, links: [] });
|
|
@@ -2421,7 +2421,7 @@ function fl(e, n, t) {
|
|
|
2421
2421
|
const ml = {
|
|
2422
2422
|
class: "lume-alluvial-group",
|
|
2423
2423
|
"data-j-alluvial-group": ""
|
|
2424
|
-
}, pl = { key: 0 }, gl = { key: 0 }, hl = ["id", "x1", "x2"], yl = ["stop-color"], _l = ["stop-color"], kl = ["d", "stroke-width", "onClick", "onMouseover"], bl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ll = ["tabindex", "onClick", "onKeydown", "onMouseenter", "onMouseleave", "onMouseover", "onFocus"], Al = ["onClick"], Tl = ["x", "y", "height", "width", "onClick"], $l = ["x", "y", "height", "width", "rx", "onClick"], Il = ["transform", "data-id", "width"],
|
|
2424
|
+
}, pl = { key: 0 }, gl = { key: 0 }, hl = ["id", "x1", "x2"], yl = ["stop-color"], _l = ["stop-color"], kl = ["d", "stroke-width", "onClick", "onMouseover"], bl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ll = ["tabindex", "onClick", "onKeydown", "onMouseenter", "onMouseleave", "onMouseover", "onFocus"], Al = ["onClick"], Tl = ["x", "y", "height", "width", "onClick"], $l = ["x", "y", "height", "width", "rx", "onClick"], Il = ["transform", "data-id", "width"], wl = /* @__PURE__ */ Q({
|
|
2425
2425
|
__name: "lume-alluvial-group",
|
|
2426
2426
|
props: {
|
|
2427
2427
|
...qe(),
|
|
@@ -2432,131 +2432,131 @@ const ml = {
|
|
|
2432
2432
|
},
|
|
2433
2433
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2434
2434
|
setup(e, { emit: n }) {
|
|
2435
|
-
const t = e, o = n, a = Ke("chartID"), { data: r, options: l } =
|
|
2435
|
+
const t = e, o = n, a = Ke("chartID"), { data: r, options: l } = re(t), i = R([]), u = R([]), s = R(null), d = R(null), c = R(null), { extents: p, updateExtents: b } = Ra(t.containerSize), { columns: k, graph: L, isExpandableNode: $, toggleNodeExpansion: g } = sl(r, l, p), { hoveredElement: f, highlightedElements: y } = fl(
|
|
2436
2436
|
i,
|
|
2437
2437
|
l,
|
|
2438
2438
|
L
|
|
2439
|
-
), I = m(() => Xe(l.value.valueFormat)),
|
|
2439
|
+
), I = m(() => Xe(l.value.valueFormat)), x = m(
|
|
2440
2440
|
() => l.value.nodeExpansionTrigger === "block"
|
|
2441
2441
|
), D = m(
|
|
2442
2442
|
() => Object.keys(y.value.nodes)
|
|
2443
2443
|
), H = m(
|
|
2444
2444
|
() => {
|
|
2445
|
-
var
|
|
2446
|
-
return (
|
|
2445
|
+
var w, S;
|
|
2446
|
+
return (S = (w = L.value) == null ? void 0 : w.nodes) != null && S.length ? Tt(L.value.nodes) : 0;
|
|
2447
2447
|
}
|
|
2448
|
-
),
|
|
2448
|
+
), M = m(() => {
|
|
2449
2449
|
if (!k.value) return [];
|
|
2450
|
-
const
|
|
2451
|
-
return k.value.map(([{ x0:
|
|
2452
|
-
}),
|
|
2450
|
+
const w = k.value.length - 1;
|
|
2451
|
+
return k.value.map(([{ x0: S, x1: h }], W) => W === 0 && l.value.alignFirstNodeLabels === "right" ? { x: S, align: "left" } : W === w && l.value.alignLastNodeLabels === "left" ? { x: h, align: "right" } : { x: (S + h) / 2, align: "center" });
|
|
2452
|
+
}), ee = m(() => {
|
|
2453
2453
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2454
|
-
return l.value.nodeHeaders.slice(0,
|
|
2455
|
-
label:
|
|
2456
|
-
...
|
|
2454
|
+
return l.value.nodeHeaders.slice(0, M.value.length).map((w, S) => ({
|
|
2455
|
+
label: w,
|
|
2456
|
+
...M.value[S]
|
|
2457
2457
|
}));
|
|
2458
|
-
}),
|
|
2458
|
+
}), E = m(
|
|
2459
2459
|
() => l.value.nodeHeaderPadding ?? La
|
|
2460
|
-
),
|
|
2460
|
+
), V = m(() => {
|
|
2461
2461
|
if (!(!l.value.gradient || !L.value))
|
|
2462
|
-
return L.value.links.reduce((
|
|
2463
|
-
const { source: h, target:
|
|
2464
|
-
return
|
|
2465
|
-
source:
|
|
2466
|
-
target:
|
|
2462
|
+
return L.value.links.reduce((w, S) => {
|
|
2463
|
+
const { source: h, target: W } = S, U = h.color || h.fallbackColor, de = W.deriveColorFromIncomingLinks ? U : W.color || W.fallbackColor;
|
|
2464
|
+
return w[S.id] = {
|
|
2465
|
+
source: U,
|
|
2466
|
+
target: de,
|
|
2467
2467
|
x1: h.x1,
|
|
2468
|
-
x2:
|
|
2469
|
-
},
|
|
2468
|
+
x2: W.x0
|
|
2469
|
+
}, w;
|
|
2470
2470
|
}, {});
|
|
2471
|
-
}),
|
|
2472
|
-
const
|
|
2473
|
-
(h) =>
|
|
2474
|
-
),
|
|
2475
|
-
return
|
|
2476
|
-
const
|
|
2477
|
-
u.value.filter(({ link:
|
|
2478
|
-
const T =
|
|
2479
|
-
let A, N,
|
|
2480
|
-
return T ? (A =
|
|
2471
|
+
}), Y = m(() => {
|
|
2472
|
+
const w = i.value.filter(
|
|
2473
|
+
(h) => G(h)
|
|
2474
|
+
), S = [];
|
|
2475
|
+
return w.forEach((h) => {
|
|
2476
|
+
const W = [];
|
|
2477
|
+
u.value.filter(({ link: U }) => U.target.id === h.node.id).reverse().reduce((U, de, tt, Ue) => {
|
|
2478
|
+
const T = de.link.target.y1 - de.link.target.y0 > Ge;
|
|
2479
|
+
let A, N, Ae;
|
|
2480
|
+
return T ? (A = de.link.target.y1 - de.link.target.y0, N = de.link.value / h.node.value, Ae = N * A) : Ae = Ge / Ue.length, W.push({
|
|
2481
2481
|
x: h.x,
|
|
2482
|
-
y: h.y +
|
|
2483
|
-
height:
|
|
2482
|
+
y: h.y + U,
|
|
2483
|
+
height: Ae,
|
|
2484
2484
|
width: h.width,
|
|
2485
|
-
key: `node-block-${h.node.id}-source-link-${
|
|
2486
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2487
|
-
}),
|
|
2488
|
-
}, 0),
|
|
2485
|
+
key: `node-block-${h.node.id}-source-link-${de.link.source.id}`,
|
|
2486
|
+
class: `lume-alluvial-group__node-block lume-fill--${de.link.source.color || Ve}`
|
|
2487
|
+
}), U + Ae;
|
|
2488
|
+
}, 0), S.push({
|
|
2489
2489
|
id: h.node.id,
|
|
2490
|
-
subNodes:
|
|
2490
|
+
subNodes: W
|
|
2491
2491
|
});
|
|
2492
|
-
}),
|
|
2492
|
+
}), S;
|
|
2493
2493
|
});
|
|
2494
|
-
function
|
|
2495
|
-
return l.value.gradient && `url('#${a}_${
|
|
2494
|
+
function te(w) {
|
|
2495
|
+
return l.value.gradient && `url('#${a}_${w.id}')`;
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2498
|
-
return D.value.length > 0 && !D.value.includes(
|
|
2497
|
+
function ae(w) {
|
|
2498
|
+
return D.value.length > 0 && !D.value.includes(w.toString());
|
|
2499
2499
|
}
|
|
2500
|
-
function
|
|
2501
|
-
return D.value.length > 0 && D.value.includes(
|
|
2500
|
+
function le(w) {
|
|
2501
|
+
return D.value.length > 0 && D.value.includes(w.toString());
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2504
|
-
return y.value.links.length > 0 && !y.value.links.includes(
|
|
2503
|
+
function be(w) {
|
|
2504
|
+
return y.value.links.length > 0 && !y.value.links.includes(w);
|
|
2505
2505
|
}
|
|
2506
|
-
function Se(
|
|
2507
|
-
return y.value.links.length > 0 && y.value.links.includes(
|
|
2506
|
+
function Se(w) {
|
|
2507
|
+
return y.value.links.length > 0 && y.value.links.includes(w);
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2510
|
-
return fn(
|
|
2509
|
+
function j(w) {
|
|
2510
|
+
return fn(w, l.value, H.value);
|
|
2511
2511
|
}
|
|
2512
|
-
function
|
|
2513
|
-
return !
|
|
2512
|
+
function G(w) {
|
|
2513
|
+
return !w.node.color && w.node.deriveColorFromIncomingLinks;
|
|
2514
2514
|
}
|
|
2515
|
-
function
|
|
2516
|
-
$(
|
|
2515
|
+
function P(w) {
|
|
2516
|
+
$(w.id) && g(w.id);
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2519
|
-
|
|
2518
|
+
function ie(w, S) {
|
|
2519
|
+
x.value || P(w), o("node-click", { node: w, event: S });
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2522
|
-
|
|
2521
|
+
function Le(w, S) {
|
|
2522
|
+
P(w), o("node-click", { node: w, event: S });
|
|
2523
2523
|
}
|
|
2524
|
-
function Re(
|
|
2525
|
-
|
|
2524
|
+
function Re(w) {
|
|
2525
|
+
x.value && P(w);
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2528
|
-
|
|
2527
|
+
function Ne(w, S) {
|
|
2528
|
+
w !== f.value && (f.value = w, o("link-mouseenter", { link: w, event: S }));
|
|
2529
2529
|
}
|
|
2530
|
-
function et(
|
|
2531
|
-
const
|
|
2532
|
-
f.value = null, o("link-mouseleave", { link:
|
|
2530
|
+
function et(w) {
|
|
2531
|
+
const S = f.value;
|
|
2532
|
+
f.value = null, o("link-mouseleave", { link: S, event: w });
|
|
2533
2533
|
}
|
|
2534
|
-
function ze(
|
|
2535
|
-
if (
|
|
2534
|
+
function ze(w) {
|
|
2535
|
+
if (w == null) {
|
|
2536
2536
|
f.value = null;
|
|
2537
2537
|
return;
|
|
2538
2538
|
}
|
|
2539
|
-
const
|
|
2540
|
-
if (!
|
|
2541
|
-
|
|
2539
|
+
const S = ja(w, L.value) || Ca(w, L.value);
|
|
2540
|
+
if (!S) {
|
|
2541
|
+
Ie(_e.InvalidHoveredElement);
|
|
2542
2542
|
return;
|
|
2543
2543
|
}
|
|
2544
|
-
f.value =
|
|
2544
|
+
f.value = S;
|
|
2545
2545
|
}
|
|
2546
|
-
function We(
|
|
2547
|
-
var
|
|
2548
|
-
return ((
|
|
2546
|
+
function We(w) {
|
|
2547
|
+
var S;
|
|
2548
|
+
return ((S = Y.value.find(({ id: h }) => w === h)) == null ? void 0 : S.subNodes) ?? [];
|
|
2549
2549
|
}
|
|
2550
2550
|
function Be() {
|
|
2551
|
-
const
|
|
2551
|
+
const w = Pa(
|
|
2552
2552
|
L.value,
|
|
2553
2553
|
s.value,
|
|
2554
2554
|
l.value
|
|
2555
2555
|
);
|
|
2556
|
-
b(
|
|
2556
|
+
b(w);
|
|
2557
2557
|
}
|
|
2558
|
-
return X(L, (
|
|
2559
|
-
i.value = Va(
|
|
2558
|
+
return X(L, (w) => {
|
|
2559
|
+
i.value = Va(w.nodes, l.value), u.value = Za(w.links).reverse(), f.value == null && t.hoveredElementId != null && ze(t.hoveredElementId);
|
|
2560
2560
|
}), X([d, c], () => {
|
|
2561
2561
|
f.value = d.value ?? c.value;
|
|
2562
2562
|
}), X([t.containerSize, s], () => {
|
|
@@ -2564,136 +2564,136 @@ const ml = {
|
|
|
2564
2564
|
}), X(
|
|
2565
2565
|
() => [l.value.alignFirstNodeLabels, l.value.alignLastNodeLabels],
|
|
2566
2566
|
Be
|
|
2567
|
-
), X(() => t.hoveredElementId, ze), (
|
|
2568
|
-
|
|
2569
|
-
(_(!0),
|
|
2567
|
+
), X(() => t.hoveredElementId, ze), (w, S) => (_(), O("g", ml, [
|
|
2568
|
+
ee.value ? (_(), O("g", pl, [
|
|
2569
|
+
(_(!0), O(ne, null, J(ee.value, (h, W) => F(w.$slots, `node-header-${W}`, {
|
|
2570
2570
|
align: h.align,
|
|
2571
2571
|
x: h.x,
|
|
2572
|
-
y: -
|
|
2572
|
+
y: -E.value
|
|
2573
2573
|
}, () => [
|
|
2574
2574
|
(_(), q(v(Sa), {
|
|
2575
2575
|
key: `header_${h.x}`,
|
|
2576
2576
|
align: h.align,
|
|
2577
2577
|
x: h.x,
|
|
2578
|
-
y: -
|
|
2578
|
+
y: -E.value
|
|
2579
2579
|
}, {
|
|
2580
|
-
default:
|
|
2581
|
-
|
|
2580
|
+
default: Z(() => [
|
|
2581
|
+
ge(se(h.label), 1)
|
|
2582
2582
|
]),
|
|
2583
2583
|
_: 2
|
|
2584
2584
|
}, 1032, ["align", "x", "y"]))
|
|
2585
2585
|
], !0)), 256))
|
|
2586
|
-
])) :
|
|
2587
|
-
|
|
2586
|
+
])) : K("", !0),
|
|
2587
|
+
C("g", {
|
|
2588
2588
|
class: "lume-alluvial-link-group",
|
|
2589
2589
|
onMouseleave: et
|
|
2590
2590
|
}, [
|
|
2591
|
-
v(l).gradient ? (_(),
|
|
2592
|
-
(_(!0),
|
|
2593
|
-
id: `${v(a)}_${
|
|
2594
|
-
key:
|
|
2591
|
+
v(l).gradient ? (_(), O("defs", gl, [
|
|
2592
|
+
(_(!0), O(ne, null, J(V.value, (h, W) => (_(), O("linearGradient", {
|
|
2593
|
+
id: `${v(a)}_${W}`,
|
|
2594
|
+
key: W,
|
|
2595
2595
|
gradientUnits: "userSpaceOnUse",
|
|
2596
2596
|
x1: h.x1,
|
|
2597
2597
|
x2: h.x2
|
|
2598
2598
|
}, [
|
|
2599
|
-
|
|
2599
|
+
C("stop", {
|
|
2600
2600
|
offset: "0%",
|
|
2601
2601
|
"stop-color": `var(--lume-color--${h.source})`
|
|
2602
2602
|
}, null, 8, yl),
|
|
2603
|
-
|
|
2603
|
+
C("stop", {
|
|
2604
2604
|
offset: "100%",
|
|
2605
2605
|
"stop-color": `var(--lume-color--${h.target})`
|
|
2606
2606
|
}, null, 8, _l)
|
|
2607
2607
|
], 8, hl))), 128))
|
|
2608
|
-
])) :
|
|
2609
|
-
(_(!0),
|
|
2608
|
+
])) : K("", !0),
|
|
2609
|
+
(_(!0), O(ne, null, J(u.value, (h) => (_(), O("path", {
|
|
2610
2610
|
key: `link-ghost_${h.id}`,
|
|
2611
|
-
class:
|
|
2611
|
+
class: ue(["lume-alluvial-group__link", [
|
|
2612
2612
|
"lume-stroke--transparent",
|
|
2613
2613
|
"lume-alluvial-group__link--ghost"
|
|
2614
2614
|
]]),
|
|
2615
2615
|
d: h.d,
|
|
2616
2616
|
"stroke-width": h.strokeWidth + v(ba),
|
|
2617
2617
|
"data-j-alluvial-ghost": "",
|
|
2618
|
-
onClick: (
|
|
2619
|
-
onMouseover: (
|
|
2618
|
+
onClick: (W) => o("link-click", { link: h.link, event: W }),
|
|
2619
|
+
onMouseover: (W) => Ne(h.link, W)
|
|
2620
2620
|
}, null, 40, kl))), 128)),
|
|
2621
|
-
(_(!0),
|
|
2621
|
+
(_(!0), O(ne, null, J(u.value, (h) => (_(), O("path", {
|
|
2622
2622
|
key: `link_${h.id}`,
|
|
2623
|
-
class:
|
|
2623
|
+
class: ue(["lume-alluvial-group__link", {
|
|
2624
2624
|
[`lume-stroke--${h.color}`]: !v(l).gradient && h.color,
|
|
2625
|
-
"lume-alluvial-group__link--faded":
|
|
2625
|
+
"lume-alluvial-group__link--faded": be(h.id),
|
|
2626
2626
|
"lume-alluvial-group__link--focused": Se(h.id)
|
|
2627
2627
|
}]),
|
|
2628
2628
|
d: h.d,
|
|
2629
|
-
stroke:
|
|
2630
|
-
"stroke-dasharray":
|
|
2631
|
-
"stroke-dashoffset":
|
|
2629
|
+
stroke: te(h.link),
|
|
2630
|
+
"stroke-dasharray": w.containerSize.width,
|
|
2631
|
+
"stroke-dashoffset": w.containerSize.width,
|
|
2632
2632
|
"stroke-width": h.strokeWidth,
|
|
2633
2633
|
"data-j-alluvial-path": "",
|
|
2634
2634
|
"data-id": h.id,
|
|
2635
|
-
onClick: (
|
|
2636
|
-
onMouseover: (
|
|
2635
|
+
onClick: (W) => o("link-click", { link: h.link, event: W }),
|
|
2636
|
+
onMouseover: (W) => Ne(h.link, W)
|
|
2637
2637
|
}, null, 42, bl))), 128))
|
|
2638
2638
|
], 32),
|
|
2639
|
-
(_(!0),
|
|
2640
|
-
key: `node-block_${
|
|
2641
|
-
class:
|
|
2639
|
+
(_(!0), O(ne, null, J(i.value, (h, W) => (_(), O("g", {
|
|
2640
|
+
key: `node-block_${W}`,
|
|
2641
|
+
class: ue(["lume-alluvial-group__node", {
|
|
2642
2642
|
"lume-alluvial-group__node--expandable": v($)(
|
|
2643
2643
|
h.node.id
|
|
2644
2644
|
),
|
|
2645
|
-
"lume-alluvial-group__node--expandable-block": v($)(h.node.id) &&
|
|
2646
|
-
"lume-alluvial-group__node--faded":
|
|
2647
|
-
"lume-alluvial-group__node--focused":
|
|
2645
|
+
"lume-alluvial-group__node--expandable-block": v($)(h.node.id) && x.value,
|
|
2646
|
+
"lume-alluvial-group__node--faded": ae(h.node.id),
|
|
2647
|
+
"lume-alluvial-group__node--focused": le(h.node.id)
|
|
2648
2648
|
}]),
|
|
2649
2649
|
"data-j-alluvial-group__node-block": ""
|
|
2650
2650
|
}, [
|
|
2651
|
-
|
|
2651
|
+
C("g", {
|
|
2652
2652
|
tabindex: v($)(h.node.id) ? "0" : null,
|
|
2653
|
-
onClick: (
|
|
2653
|
+
onClick: (U) => ie(h.node, U),
|
|
2654
2654
|
onKeydown: [
|
|
2655
|
-
xt(
|
|
2656
|
-
xt(
|
|
2655
|
+
wt(xt((U) => Le(h.node, U), ["prevent"]), ["enter"]),
|
|
2656
|
+
wt(xt((U) => Le(h.node, U), ["prevent"]), ["space"])
|
|
2657
2657
|
],
|
|
2658
|
-
onMouseenter: (
|
|
2659
|
-
onMouseleave: (
|
|
2660
|
-
onMouseover: (
|
|
2661
|
-
onMouseout:
|
|
2662
|
-
onFocus: (
|
|
2663
|
-
onBlur:
|
|
2658
|
+
onMouseenter: (U) => o("node-mouseenter", { node: h.node, event: U }),
|
|
2659
|
+
onMouseleave: (U) => o("node-mouseleave", { node: h.node, event: U }),
|
|
2660
|
+
onMouseover: (U) => d.value = h.node,
|
|
2661
|
+
onMouseout: S[0] || (S[0] = (U) => d.value = null),
|
|
2662
|
+
onFocus: (U) => c.value = h.node,
|
|
2663
|
+
onBlur: S[1] || (S[1] = (U) => c.value = null)
|
|
2664
2664
|
}, [
|
|
2665
|
-
|
|
2665
|
+
G(h) ? (_(!0), O(ne, { key: 0 }, J(We(
|
|
2666
2666
|
h.node.id
|
|
2667
|
-
), (
|
|
2668
|
-
key:
|
|
2667
|
+
), (U) => (_(), O("rect", z(U, {
|
|
2668
|
+
key: U.key,
|
|
2669
2669
|
"data-j-alluvial-sub-nodes": "",
|
|
2670
|
-
onClick: (
|
|
2671
|
-
}), null, 16, Al))), 128)) : (_(),
|
|
2670
|
+
onClick: (de) => Re(h.node)
|
|
2671
|
+
}), null, 16, Al))), 128)) : (_(), O("rect", {
|
|
2672
2672
|
key: 1,
|
|
2673
|
-
class:
|
|
2673
|
+
class: ue(["lume-alluvial-group__node-block", `lume-fill--${h.node.color || h.node.fallbackColor}`]),
|
|
2674
2674
|
x: h.x,
|
|
2675
2675
|
y: h.y,
|
|
2676
2676
|
height: h.height,
|
|
2677
2677
|
width: h.width,
|
|
2678
|
-
onClick: (
|
|
2678
|
+
onClick: (U) => Re(h.node)
|
|
2679
2679
|
}, null, 10, Tl)),
|
|
2680
|
-
v($)(h.node.id) ? (_(),
|
|
2680
|
+
v($)(h.node.id) ? (_(), O("rect", {
|
|
2681
2681
|
key: 2,
|
|
2682
|
-
class:
|
|
2682
|
+
class: ue(["lume-alluvial-group__node-outline", `lume-stroke--${h.node.color || h.node.fallbackColor}`]),
|
|
2683
2683
|
x: h.x - v(Ze),
|
|
2684
2684
|
y: h.y - v(Ze),
|
|
2685
2685
|
height: h.height + v(Ze) * 2,
|
|
2686
2686
|
width: h.width + v(Ze) * 2,
|
|
2687
2687
|
rx: v(Aa),
|
|
2688
2688
|
"data-j-alluvial-node-outline": "",
|
|
2689
|
-
onClick: (
|
|
2690
|
-
}, null, 10, $l)) :
|
|
2691
|
-
|
|
2689
|
+
onClick: (U) => Re(h.node)
|
|
2690
|
+
}, null, 10, $l)) : K("", !0),
|
|
2691
|
+
C("g", {
|
|
2692
2692
|
ref_for: !0,
|
|
2693
2693
|
ref_key: "nodeTextRefs",
|
|
2694
2694
|
ref: s,
|
|
2695
|
-
class:
|
|
2696
|
-
"lume-alluvial-group__node-text--left":
|
|
2695
|
+
class: ue(["lume-alluvial-group__node-text lume-typography--caption", {
|
|
2696
|
+
"lume-alluvial-group__node-text--left": j(
|
|
2697
2697
|
h.node
|
|
2698
2698
|
)
|
|
2699
2699
|
}]),
|
|
@@ -2701,29 +2701,29 @@ const ml = {
|
|
|
2701
2701
|
"data-id": h.node.id,
|
|
2702
2702
|
width: v(l).nodeLabelMaxWidth
|
|
2703
2703
|
}, [
|
|
2704
|
-
|
|
2704
|
+
F(w.$slots, `node-text-${h.node.id}`, {
|
|
2705
2705
|
node: h.node,
|
|
2706
2706
|
value: I.value(
|
|
2707
2707
|
h.node.transitionValue || h.node.value,
|
|
2708
2708
|
h.node.value
|
|
2709
2709
|
)
|
|
2710
2710
|
}, () => [
|
|
2711
|
-
|
|
2711
|
+
me(v(xa), {
|
|
2712
2712
|
bottom: v(l).switchText,
|
|
2713
|
-
left:
|
|
2713
|
+
left: j(h.node),
|
|
2714
2714
|
"max-width": v(l).nodeLabelMaxWidth,
|
|
2715
2715
|
"onLume__internal-NodeResize": Be
|
|
2716
2716
|
}, {
|
|
2717
|
-
default:
|
|
2718
|
-
|
|
2717
|
+
default: Z(() => [
|
|
2718
|
+
ge(se(h.node.label), 1)
|
|
2719
2719
|
]),
|
|
2720
2720
|
_: 2
|
|
2721
2721
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2722
|
-
|
|
2722
|
+
me(v(Ea), {
|
|
2723
2723
|
bottom: !v(l).switchText
|
|
2724
2724
|
}, {
|
|
2725
|
-
default:
|
|
2726
|
-
|
|
2725
|
+
default: Z(() => [
|
|
2726
|
+
ge(se(I.value(
|
|
2727
2727
|
h.node.transitionValue || h.node.value,
|
|
2728
2728
|
h.node.value
|
|
2729
2729
|
)), 1)
|
|
@@ -2736,7 +2736,7 @@ const ml = {
|
|
|
2736
2736
|
], 2))), 128))
|
|
2737
2737
|
]));
|
|
2738
2738
|
}
|
|
2739
|
-
}),
|
|
2739
|
+
}), xl = /* @__PURE__ */ oe(wl, [["__scopeId", "data-v-0f56c6f5"]]), Nl = {
|
|
2740
2740
|
margins: {
|
|
2741
2741
|
top: 0,
|
|
2742
2742
|
right: 0,
|
|
@@ -2764,7 +2764,7 @@ const ml = {
|
|
|
2764
2764
|
...To(pt)
|
|
2765
2765
|
},
|
|
2766
2766
|
setup(e, { emit: n }) {
|
|
2767
|
-
const t = e, { componentEventPropagator: o } =
|
|
2767
|
+
const t = e, { componentEventPropagator: o } = xe(), a = De(fe()), r = Vn(fe()), { options: l } = re(t), { allOptions: i } = ke(l, Nl);
|
|
2768
2768
|
function u(s) {
|
|
2769
2769
|
return {
|
|
2770
2770
|
...s,
|
|
@@ -2772,16 +2772,16 @@ const ml = {
|
|
|
2772
2772
|
// Alluvial chart never uses base scales
|
|
2773
2773
|
};
|
|
2774
2774
|
}
|
|
2775
|
-
return (s, d) => (_(), q(v(Me),
|
|
2775
|
+
return (s, d) => (_(), q(v(Me), z({ ...t, ...s.$attrs }, {
|
|
2776
2776
|
options: u(v(i)),
|
|
2777
2777
|
"data-j-alluvial-diagram": ""
|
|
2778
|
-
},
|
|
2779
|
-
groups:
|
|
2780
|
-
|
|
2778
|
+
}, ce(v(o))), he({
|
|
2779
|
+
groups: Z((c) => [
|
|
2780
|
+
me(v(xl), z(c, { "hovered-element-id": s.hoveredElement }, ce(v(o))), he({ _: 2 }, [
|
|
2781
2781
|
J(v(r), (p, b) => ({
|
|
2782
2782
|
name: b,
|
|
2783
|
-
fn:
|
|
2784
|
-
|
|
2783
|
+
fn: Z((k) => [
|
|
2784
|
+
F(s.$slots, b, Te($e(k || {})))
|
|
2785
2785
|
])
|
|
2786
2786
|
}))
|
|
2787
2787
|
]), 1040, ["hovered-element-id"])
|
|
@@ -2790,8 +2790,8 @@ const ml = {
|
|
|
2790
2790
|
}, [
|
|
2791
2791
|
J(v(a), (c, p) => ({
|
|
2792
2792
|
name: p,
|
|
2793
|
-
fn:
|
|
2794
|
-
|
|
2793
|
+
fn: Z((b) => [
|
|
2794
|
+
F(s.$slots, p, Te($e(b || {})))
|
|
2795
2795
|
])
|
|
2796
2796
|
}))
|
|
2797
2797
|
]), 1040, ["options"]));
|
|
@@ -2810,16 +2810,16 @@ const ku = /* @__PURE__ */ Q({
|
|
|
2810
2810
|
},
|
|
2811
2811
|
setup(e, { emit: n }) {
|
|
2812
2812
|
const t = ot(
|
|
2813
|
-
() => import("./
|
|
2813
|
+
() => import("./CEUcfWjc.js")
|
|
2814
2814
|
), o = ot(
|
|
2815
|
-
() => import("./
|
|
2815
|
+
() => import("./BxeOEeXh.js")
|
|
2816
2816
|
), a = ot(
|
|
2817
|
-
() => import("./
|
|
2817
|
+
() => import("./CBkk5ZOK.js")
|
|
2818
2818
|
), r = /* @__PURE__ */ new Map([
|
|
2819
2819
|
["single", t],
|
|
2820
2820
|
["grouped", o],
|
|
2821
2821
|
["stacked", a]
|
|
2822
|
-
]), l = e, { componentEventPropagator: i } =
|
|
2822
|
+
]), l = e, { componentEventPropagator: i } = xe(), u = De(fe());
|
|
2823
2823
|
function s(c) {
|
|
2824
2824
|
return {
|
|
2825
2825
|
...c,
|
|
@@ -2837,19 +2837,19 @@ const ku = /* @__PURE__ */ Q({
|
|
|
2837
2837
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2838
2838
|
return r.get(l.type);
|
|
2839
2839
|
});
|
|
2840
|
-
return (c, p) => (_(), q(bn(d.value),
|
|
2840
|
+
return (c, p) => (_(), q(bn(d.value), z({ ...l, ...c.$attrs }, {
|
|
2841
2841
|
options: s(c.options)
|
|
2842
|
-
},
|
|
2842
|
+
}, ce(v(i))), he({ _: 2 }, [
|
|
2843
2843
|
J(v(u), (b, k) => ({
|
|
2844
2844
|
name: k,
|
|
2845
|
-
fn:
|
|
2846
|
-
|
|
2845
|
+
fn: Z((L) => [
|
|
2846
|
+
F(c.$slots, k, Te($e(L || {})))
|
|
2847
2847
|
])
|
|
2848
2848
|
}))
|
|
2849
2849
|
]), 1040, ["options"]));
|
|
2850
2850
|
}
|
|
2851
2851
|
});
|
|
2852
|
-
function
|
|
2852
|
+
function Ol(e) {
|
|
2853
2853
|
return Object.values(Zn).includes(e) || e == null;
|
|
2854
2854
|
}
|
|
2855
2855
|
function El(e) {
|
|
@@ -2859,7 +2859,7 @@ const Dl = (e = !1) => ({
|
|
|
2859
2859
|
type: {
|
|
2860
2860
|
type: String,
|
|
2861
2861
|
default: null,
|
|
2862
|
-
validator:
|
|
2862
|
+
validator: Ol
|
|
2863
2863
|
},
|
|
2864
2864
|
...e ? {
|
|
2865
2865
|
orientation: {
|
|
@@ -2925,13 +2925,13 @@ function Sl(e, n, t, o, a, r) {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
function d(c, p, b) {
|
|
2927
2927
|
if (!(n.value && t.value)) return Ml;
|
|
2928
|
-
const { value: L, color: $ } = c, g = $ ?? e.value[p].color ?? Ve, { x: f, y } = i(L, b), I = u(L),
|
|
2928
|
+
const { value: L, color: $ } = c, g = $ ?? e.value[p].color ?? Ve, { x: f, y } = i(L, b), I = u(L), x = s(L);
|
|
2929
2929
|
return {
|
|
2930
2930
|
classList: [`lume-fill--${g}`, ...r],
|
|
2931
2931
|
x: f,
|
|
2932
2932
|
y,
|
|
2933
2933
|
width: I,
|
|
2934
|
-
height:
|
|
2934
|
+
height: x,
|
|
2935
2935
|
isFaded: a.value !== -1 && a.value !== b,
|
|
2936
2936
|
isNegative: L < 0
|
|
2937
2937
|
};
|
|
@@ -2969,13 +2969,13 @@ function Gl(e, n, t, o, a, r) {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
function b(k, L, $) {
|
|
2971
2971
|
if (!(n.value && t.value)) return Rl;
|
|
2972
|
-
const { value: f, color: y } = k, I = y ?? e.value[L].color ?? Object.values(
|
|
2972
|
+
const { value: f, color: y } = k, I = y ?? e.value[L].color ?? Object.values(pe)[L], x = s(f, $, L), D = d(f, $, L), H = c(f), M = p(f);
|
|
2973
2973
|
return {
|
|
2974
2974
|
classList: [`lume-fill--${I}`, ...r],
|
|
2975
|
-
x
|
|
2975
|
+
x,
|
|
2976
2976
|
y: D,
|
|
2977
2977
|
width: H,
|
|
2978
|
-
height:
|
|
2978
|
+
height: M,
|
|
2979
2979
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2980
2980
|
isNegative: f < 0
|
|
2981
2981
|
};
|
|
@@ -3030,8 +3030,8 @@ function jl(e, n, t, o, a, r) {
|
|
|
3030
3030
|
() => e.value.map((g) => g.values.map((f) => f == null ? void 0 : f.value))
|
|
3031
3031
|
);
|
|
3032
3032
|
function s(g, f, y) {
|
|
3033
|
-
let I,
|
|
3034
|
-
return l.value ? (I = n.value(g >= 0 ? 0 + y : g + y),
|
|
3033
|
+
let I, x;
|
|
3034
|
+
return l.value ? (I = n.value(g >= 0 ? 0 + y : g + y), x = t.value(i.value[f])) : (I = n.value(i.value[f]), x = t.value(g >= 0 ? g + y : 0 + y)), { x: I, y: x };
|
|
3035
3035
|
}
|
|
3036
3036
|
function d(g) {
|
|
3037
3037
|
return l.value ? n.value(g) - n.value(0) : n.value.bandwidth();
|
|
@@ -3046,19 +3046,19 @@ function jl(e, n, t, o, a, r) {
|
|
|
3046
3046
|
return l.value ? t.value.bandwidth() : t.value(g) - t.value(0);
|
|
3047
3047
|
}
|
|
3048
3048
|
function k(g, f) {
|
|
3049
|
-
return g ? u.value.reduce((y, I,
|
|
3049
|
+
return g ? u.value.reduce((y, I, x) => (x < g && I[f] >= 0 && (y += I[f]), y), 0) : 0;
|
|
3050
3050
|
}
|
|
3051
3051
|
function L(g, f) {
|
|
3052
|
-
return g ? u.value.reduce((y, I,
|
|
3052
|
+
return g ? u.value.reduce((y, I, x) => (x < g && I[f] < 0 && (y += I[f]), y), 0) : 0;
|
|
3053
3053
|
}
|
|
3054
3054
|
function $(g, f, y) {
|
|
3055
|
-
const { value: I, color:
|
|
3055
|
+
const { value: I, color: x } = g, D = I >= 0 ? d(I) : c(I), H = I >= 0 ? p(I) : b(I), M = I >= 0 ? k(f, y) : L(f, y), { x: ee, y: E } = s(I, y, M);
|
|
3056
3056
|
return {
|
|
3057
|
-
classList: [`lume-fill--${
|
|
3057
|
+
classList: [`lume-fill--${x ?? e.value[f].color ?? Object.values(pe)[f]}`, ...r],
|
|
3058
3058
|
width: D,
|
|
3059
3059
|
height: H,
|
|
3060
|
-
x:
|
|
3061
|
-
y:
|
|
3060
|
+
x: ee,
|
|
3061
|
+
y: E,
|
|
3062
3062
|
isFaded: a.value !== -1 && a.value !== y,
|
|
3063
3063
|
isNegative: I < 0
|
|
3064
3064
|
};
|
|
@@ -3098,10 +3098,10 @@ const Cl = {
|
|
|
3098
3098
|
yScale: d,
|
|
3099
3099
|
classList: c,
|
|
3100
3100
|
labels: p
|
|
3101
|
-
} =
|
|
3101
|
+
} = re(t);
|
|
3102
3102
|
Ke("chartID");
|
|
3103
|
-
const { emitInternalEvent: b } =
|
|
3104
|
-
const
|
|
3103
|
+
const { emitInternalEvent: b } = xe(), { groupedData: k } = gn(a, p), { barXScale: L, barYScale: $ } = Hl(s, d, l), g = m(() => typeof c.value == "string" ? [c.value] : c.value), f = m(() => {
|
|
3104
|
+
const x = Bl(a, u), { barAttributeGenerator: D } = Vl[x](
|
|
3105
3105
|
a,
|
|
3106
3106
|
L,
|
|
3107
3107
|
$,
|
|
@@ -3114,22 +3114,22 @@ const Cl = {
|
|
|
3114
3114
|
if (i.value)
|
|
3115
3115
|
return l.value === B.HORIZONTAL ? "width" : "height";
|
|
3116
3116
|
});
|
|
3117
|
-
async function I(
|
|
3118
|
-
o("lume__internal--hover",
|
|
3117
|
+
async function I(x) {
|
|
3118
|
+
o("lume__internal--hover", x), b("lume__internal--hover", x);
|
|
3119
3119
|
}
|
|
3120
|
-
return (
|
|
3121
|
-
(_(!0),
|
|
3122
|
-
key:
|
|
3123
|
-
onMouseenter: (
|
|
3120
|
+
return (x, D) => (_(), O("g", Cl, [
|
|
3121
|
+
(_(!0), O(ne, null, J(v(k), (H, M) => (_(), O("g", {
|
|
3122
|
+
key: M,
|
|
3123
|
+
onMouseenter: (ee) => I(M)
|
|
3124
3124
|
}, [
|
|
3125
|
-
(_(!0),
|
|
3126
|
-
key: `bar-${
|
|
3125
|
+
(_(!0), O(ne, null, J(H, (ee, E) => (_(), q(v(ht), z(f.value(ee, E, M, H), {
|
|
3126
|
+
key: `bar-${E}`,
|
|
3127
3127
|
transition: y.value,
|
|
3128
3128
|
"data-j-lume-bar": "",
|
|
3129
|
-
onClick: (
|
|
3130
|
-
index:
|
|
3131
|
-
datasetIndex:
|
|
3132
|
-
event:
|
|
3129
|
+
onClick: (V) => o("bar-click", {
|
|
3130
|
+
index: M,
|
|
3131
|
+
datasetIndex: E,
|
|
3132
|
+
event: V
|
|
3133
3133
|
})
|
|
3134
3134
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
3135
3135
|
], 40, Pl))), 128))
|
|
@@ -3140,13 +3140,13 @@ const Cl = {
|
|
|
3140
3140
|
withTooltip: !0,
|
|
3141
3141
|
xAxisOptions: {},
|
|
3142
3142
|
yAxisOptions: { gridLines: !0 },
|
|
3143
|
-
margins:
|
|
3143
|
+
margins: Ee.VERTICAL
|
|
3144
3144
|
},
|
|
3145
3145
|
[B.HORIZONTAL]: {
|
|
3146
3146
|
withTooltip: !0,
|
|
3147
3147
|
xAxisOptions: { gridLines: !0 },
|
|
3148
3148
|
yAxisOptions: { gridLines: !1 },
|
|
3149
|
-
margins:
|
|
3149
|
+
margins: Ee.HORIZONTAL
|
|
3150
3150
|
}
|
|
3151
3151
|
}, bu = /* @__PURE__ */ Q({
|
|
3152
3152
|
__name: "lume-single-bar-chart",
|
|
@@ -3154,24 +3154,24 @@ const Cl = {
|
|
|
3154
3154
|
...He(pt)
|
|
3155
3155
|
},
|
|
3156
3156
|
setup(e, { emit: n }) {
|
|
3157
|
-
const t = e, { componentEventPropagator: o } =
|
|
3157
|
+
const t = e, { componentEventPropagator: o } = xe(), a = De(fe()), { orientation: r, options: l } = re(t), i = m(
|
|
3158
3158
|
() => zl[r.value || B.VERTICAL]
|
|
3159
3159
|
// needs to be computed so that default options are reactive
|
|
3160
|
-
), { allOptions: u } =
|
|
3161
|
-
return (s, d) => (_(), q(v(Me),
|
|
3160
|
+
), { allOptions: u } = ke(l, i);
|
|
3161
|
+
return (s, d) => (_(), q(v(Me), z({ ...t, ...s.$attrs }, {
|
|
3162
3162
|
"chart-type": "single-bar",
|
|
3163
3163
|
options: v(u),
|
|
3164
3164
|
"data-j-single-bar-chart": ""
|
|
3165
|
-
},
|
|
3166
|
-
groups:
|
|
3167
|
-
|
|
3165
|
+
}, ce(v(o))), he({
|
|
3166
|
+
groups: Z((c) => [
|
|
3167
|
+
me(v(It), z(c, { orientation: v(r) }, ce(v(o))), null, 16, ["orientation"])
|
|
3168
3168
|
]),
|
|
3169
3169
|
_: 2
|
|
3170
3170
|
}, [
|
|
3171
3171
|
J(v(a), (c, p) => ({
|
|
3172
3172
|
name: p,
|
|
3173
|
-
fn:
|
|
3174
|
-
|
|
3173
|
+
fn: Z((b) => [
|
|
3174
|
+
F(s.$slots, p, Te($e(b || {})))
|
|
3175
3175
|
])
|
|
3176
3176
|
}))
|
|
3177
3177
|
]), 1040, ["options"]));
|
|
@@ -3181,13 +3181,13 @@ const Cl = {
|
|
|
3181
3181
|
withTooltip: !0,
|
|
3182
3182
|
xAxisOptions: {},
|
|
3183
3183
|
yAxisOptions: { gridLines: !0 },
|
|
3184
|
-
margins:
|
|
3184
|
+
margins: Ee.VERTICAL
|
|
3185
3185
|
},
|
|
3186
3186
|
[B.HORIZONTAL]: {
|
|
3187
3187
|
withTooltip: !0,
|
|
3188
3188
|
xAxisOptions: { gridLines: !0 },
|
|
3189
3189
|
yAxisOptions: { gridLines: !1 },
|
|
3190
|
-
margins:
|
|
3190
|
+
margins: Ee.HORIZONTAL,
|
|
3191
3191
|
tooltipOptions: { position: "right" }
|
|
3192
3192
|
}
|
|
3193
3193
|
}, Lu = /* @__PURE__ */ Q({
|
|
@@ -3196,27 +3196,27 @@ const Cl = {
|
|
|
3196
3196
|
...He()
|
|
3197
3197
|
},
|
|
3198
3198
|
setup(e, { emit: n }) {
|
|
3199
|
-
const t = e, { componentEventPropagator: o } =
|
|
3199
|
+
const t = e, { componentEventPropagator: o } = xe(), a = De(fe()), { orientation: r, options: l } = re(t), i = m(
|
|
3200
3200
|
() => Wl[r.value || B.VERTICAL]
|
|
3201
3201
|
// needs to be computed so that default options are reactive
|
|
3202
|
-
), { allOptions: u } =
|
|
3202
|
+
), { allOptions: u } = ke(
|
|
3203
3203
|
l,
|
|
3204
3204
|
i
|
|
3205
3205
|
);
|
|
3206
|
-
return (s, d) => (_(), q(v(Me),
|
|
3206
|
+
return (s, d) => (_(), q(v(Me), z({ ...t, ...s.$attrs }, {
|
|
3207
3207
|
"chart-type": "grouped-bar",
|
|
3208
3208
|
options: v(u),
|
|
3209
3209
|
"data-j-grouped-bar-chart": ""
|
|
3210
|
-
},
|
|
3211
|
-
groups:
|
|
3212
|
-
|
|
3210
|
+
}, ce(v(o))), he({
|
|
3211
|
+
groups: Z((c) => [
|
|
3212
|
+
me(v(It), z(c, { type: "grouped" }, ce(v(o))), null, 16)
|
|
3213
3213
|
]),
|
|
3214
3214
|
_: 2
|
|
3215
3215
|
}, [
|
|
3216
3216
|
J(v(a), (c, p) => ({
|
|
3217
3217
|
name: p,
|
|
3218
|
-
fn:
|
|
3219
|
-
|
|
3218
|
+
fn: Z((b) => [
|
|
3219
|
+
F(s.$slots, p, Te($e(b || {})))
|
|
3220
3220
|
])
|
|
3221
3221
|
}))
|
|
3222
3222
|
]), 1040, ["options"]));
|
|
@@ -3226,14 +3226,14 @@ const Cl = {
|
|
|
3226
3226
|
withTooltip: !0,
|
|
3227
3227
|
xAxisOptions: {},
|
|
3228
3228
|
yAxisOptions: { gridLines: !0 },
|
|
3229
|
-
margins:
|
|
3229
|
+
margins: Ee.VERTICAL,
|
|
3230
3230
|
tooltipOptions: { inverse: !0 }
|
|
3231
3231
|
},
|
|
3232
3232
|
[B.HORIZONTAL]: {
|
|
3233
3233
|
withTooltip: !0,
|
|
3234
3234
|
xAxisOptions: { gridLines: !0 },
|
|
3235
3235
|
yAxisOptions: { gridLines: !1 },
|
|
3236
|
-
margins:
|
|
3236
|
+
margins: Ee.HORIZONTAL,
|
|
3237
3237
|
tooltipOptions: { position: "right" }
|
|
3238
3238
|
}
|
|
3239
3239
|
}, Au = /* @__PURE__ */ Q({
|
|
@@ -3242,10 +3242,10 @@ const Cl = {
|
|
|
3242
3242
|
...He()
|
|
3243
3243
|
},
|
|
3244
3244
|
setup(e, { emit: n }) {
|
|
3245
|
-
const t = e, { componentEventPropagator: o } =
|
|
3245
|
+
const t = e, { componentEventPropagator: o } = xe(), a = De(fe()), { data: r, orientation: l, options: i, labels: u } = re(t), s = m(
|
|
3246
3246
|
() => Ul[l.value || B.VERTICAL]
|
|
3247
3247
|
// needs to be computed so that default options are reactive
|
|
3248
|
-
), { allOptions: d } =
|
|
3248
|
+
), { allOptions: d } = ke(
|
|
3249
3249
|
i,
|
|
3250
3250
|
s
|
|
3251
3251
|
), { internalData: c } = Lt(r), { groupedData: p } = gn(c, u), { stackedXScaleGenerator: b, stackedYScaleGenerator: k } = Fl(
|
|
@@ -3253,22 +3253,22 @@ const Cl = {
|
|
|
3253
3253
|
l,
|
|
3254
3254
|
i
|
|
3255
3255
|
), L = m(() => t.xScale || b), $ = m(() => t.yScale || k);
|
|
3256
|
-
return (g, f) => (_(), q(v(Me),
|
|
3256
|
+
return (g, f) => (_(), q(v(Me), z({ ...t, ...g.$attrs }, {
|
|
3257
3257
|
"chart-type": "stacked-bar",
|
|
3258
3258
|
options: v(d),
|
|
3259
3259
|
"x-scale": L.value,
|
|
3260
3260
|
"y-scale": $.value,
|
|
3261
3261
|
"data-j-stacked-bar-chart": ""
|
|
3262
|
-
},
|
|
3263
|
-
groups:
|
|
3264
|
-
|
|
3262
|
+
}, ce(v(o))), he({
|
|
3263
|
+
groups: Z((y) => [
|
|
3264
|
+
me(v(It), z(y, { type: "stacked" }, ce(v(o))), null, 16)
|
|
3265
3265
|
]),
|
|
3266
3266
|
_: 2
|
|
3267
3267
|
}, [
|
|
3268
3268
|
J(v(a), (y, I) => ({
|
|
3269
3269
|
name: I,
|
|
3270
|
-
fn:
|
|
3271
|
-
|
|
3270
|
+
fn: Z((x) => [
|
|
3271
|
+
F(g.$slots, I, Te($e(x || {})))
|
|
3272
3272
|
])
|
|
3273
3273
|
}))
|
|
3274
3274
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
@@ -3286,7 +3286,7 @@ const Cl = {
|
|
|
3286
3286
|
},
|
|
3287
3287
|
color: {
|
|
3288
3288
|
type: String,
|
|
3289
|
-
default:
|
|
3289
|
+
default: pe.Skyblue
|
|
3290
3290
|
},
|
|
3291
3291
|
dashed: {
|
|
3292
3292
|
type: Boolean,
|
|
@@ -3307,11 +3307,11 @@ const Cl = {
|
|
|
3307
3307
|
},
|
|
3308
3308
|
emits: ["click"],
|
|
3309
3309
|
setup(e, { emit: n }) {
|
|
3310
|
-
const t = n, o =
|
|
3311
|
-
return
|
|
3310
|
+
const t = n, o = R(null);
|
|
3311
|
+
return we(() => Qe(o.value)), (a, r) => (_(), O("path", {
|
|
3312
3312
|
ref_key: "root",
|
|
3313
3313
|
ref: o,
|
|
3314
|
-
class:
|
|
3314
|
+
class: ue(["lume-line", {
|
|
3315
3315
|
[`lume-stroke--${e.color}`]: !0,
|
|
3316
3316
|
"lume-line--dashed": e.dashed,
|
|
3317
3317
|
"lume-line--transition": e.transition
|
|
@@ -3331,18 +3331,18 @@ const Cl = {
|
|
|
3331
3331
|
props: {
|
|
3332
3332
|
x: {},
|
|
3333
3333
|
y: {},
|
|
3334
|
-
color: { default:
|
|
3334
|
+
color: { default: pe.Skyblue },
|
|
3335
3335
|
radius: { default: Ql },
|
|
3336
3336
|
active: { type: Boolean, default: !1 },
|
|
3337
3337
|
visible: { type: Boolean, default: !1 }
|
|
3338
3338
|
},
|
|
3339
3339
|
emits: ["click"],
|
|
3340
3340
|
setup(e, { emit: n }) {
|
|
3341
|
-
const t = e, o = n, a =
|
|
3342
|
-
return
|
|
3341
|
+
const t = e, o = n, a = R(null), r = m(() => t.radius / 2), l = m(() => t.active ? t.radius : t.visible ? ql : 0);
|
|
3342
|
+
return we(() => Qe(a.value)), (i, u) => (_(), O("circle", {
|
|
3343
3343
|
ref_key: "root",
|
|
3344
3344
|
ref: a,
|
|
3345
|
-
class:
|
|
3345
|
+
class: ue(["lume-point", {
|
|
3346
3346
|
[`lume-stroke--${i.color}`]: !0,
|
|
3347
3347
|
"lume-point--active": i.active,
|
|
3348
3348
|
[`lume-point--visible lume-fill--${i.color}`]: i.visible
|
|
@@ -3415,8 +3415,8 @@ function ou(e, n) {
|
|
|
3415
3415
|
return (t, o) => e(n + (o - 1));
|
|
3416
3416
|
}
|
|
3417
3417
|
function au(e, n, t, o) {
|
|
3418
|
-
const a =
|
|
3419
|
-
|
|
3418
|
+
const a = xn().x(
|
|
3419
|
+
ye(t) ? nu(t, e) : ou(t, e)
|
|
3420
3420
|
).y((r) => o(r));
|
|
3421
3421
|
return n.every((r) => r == null) ? null : a(n);
|
|
3422
3422
|
}
|
|
@@ -3442,7 +3442,7 @@ const lu = {
|
|
|
3442
3442
|
},
|
|
3443
3443
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3444
3444
|
setup(e, { emit: n }) {
|
|
3445
|
-
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: u } =
|
|
3445
|
+
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: u } = re(t), s = Ke(
|
|
3446
3446
|
"tooltipAnchorAttributes",
|
|
3447
3447
|
null
|
|
3448
3448
|
), { updateTooltipAnchorAttributes: d } = sn(
|
|
@@ -3452,22 +3452,22 @@ const lu = {
|
|
|
3452
3452
|
i,
|
|
3453
3453
|
u
|
|
3454
3454
|
), c = m(() => {
|
|
3455
|
-
if (a.value.every((
|
|
3455
|
+
if (a.value.every((V) => V.isDashed))
|
|
3456
3456
|
return a.value;
|
|
3457
|
-
const { computedLineData:
|
|
3457
|
+
const { computedLineData: E } = hn(
|
|
3458
3458
|
a,
|
|
3459
3459
|
i
|
|
3460
3460
|
);
|
|
3461
|
-
return r.value.withTooltip !== !1 && (s != null && s.value) && d(
|
|
3461
|
+
return r.value.withTooltip !== !1 && (s != null && s.value) && d(E.value), E.value;
|
|
3462
3462
|
}), p = m(() => {
|
|
3463
3463
|
if (t.hoveredIndex === -1) return;
|
|
3464
|
-
const
|
|
3464
|
+
const E = Fn(
|
|
3465
3465
|
c.value,
|
|
3466
3466
|
t.hoveredIndex
|
|
3467
3467
|
);
|
|
3468
3468
|
return {
|
|
3469
3469
|
d: `M ${rt(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3470
|
-
V ${i.value(
|
|
3470
|
+
V ${i.value(E)}`
|
|
3471
3471
|
// Move to X index, Vertical line to the highest point
|
|
3472
3472
|
};
|
|
3473
3473
|
}), b = m(
|
|
@@ -3475,8 +3475,8 @@ const lu = {
|
|
|
3475
3475
|
// Subtracting the first line (read below)
|
|
3476
3476
|
), k = m(
|
|
3477
3477
|
() => {
|
|
3478
|
-
var
|
|
3479
|
-
return ((
|
|
3478
|
+
var E;
|
|
3479
|
+
return ((E = r.value) == null ? void 0 : E.lineWidth) * 2 || void 0;
|
|
3480
3480
|
}
|
|
3481
3481
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3482
3482
|
), L = m(
|
|
@@ -3486,78 +3486,84 @@ const lu = {
|
|
|
3486
3486
|
), f = m(
|
|
3487
3487
|
() => r.value.withPoints === "visible" || t.withPoints === "visible"
|
|
3488
3488
|
);
|
|
3489
|
-
function y(
|
|
3490
|
-
return c.value[
|
|
3491
|
-
}
|
|
3492
|
-
function I(
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3489
|
+
function y(E) {
|
|
3490
|
+
return c.value[E].values;
|
|
3491
|
+
}
|
|
3492
|
+
function I(E) {
|
|
3493
|
+
return y(E).flatMap(
|
|
3494
|
+
(V, Y) => V.isNull ? [] : [Y]
|
|
3495
|
+
);
|
|
3496
|
+
}
|
|
3497
|
+
function x(E, V) {
|
|
3498
|
+
var Y;
|
|
3499
|
+
return ((Y = y(V)[E]) == null ? void 0 : Y.color) ?? c.value[V].color;
|
|
3500
|
+
}
|
|
3501
|
+
function D(E, V) {
|
|
3502
|
+
var te, ae;
|
|
3503
|
+
const Y = E === 0 ? [] : [
|
|
3504
|
+
(te = y(V)[E - 1]) == null ? void 0 : te.value,
|
|
3505
|
+
(ae = y(V)[E]) == null ? void 0 : ae.value
|
|
3497
3506
|
];
|
|
3498
3507
|
return au(
|
|
3499
|
-
|
|
3500
|
-
|
|
3508
|
+
E,
|
|
3509
|
+
Y,
|
|
3501
3510
|
l.value,
|
|
3502
3511
|
i.value
|
|
3503
3512
|
) || "";
|
|
3504
3513
|
}
|
|
3505
|
-
function E
|
|
3514
|
+
function H(E) {
|
|
3506
3515
|
return {
|
|
3507
|
-
animationDelay:
|
|
3516
|
+
animationDelay: E < 2 ? 0 : (E - 1) * b.value,
|
|
3508
3517
|
animationDuration: b.value
|
|
3509
3518
|
};
|
|
3510
3519
|
}
|
|
3511
|
-
function
|
|
3512
|
-
var
|
|
3513
|
-
const
|
|
3520
|
+
function M(E, V) {
|
|
3521
|
+
var te;
|
|
3522
|
+
const Y = (te = y(V)[E]) == null ? void 0 : te.value;
|
|
3514
3523
|
return {
|
|
3515
|
-
x:
|
|
3516
|
-
y:
|
|
3524
|
+
x: ye(l.value) ? t.xScale($.value[E]) + L.value : t.xScale(E),
|
|
3525
|
+
y: Y === null ? i.value(i.value.domain()[1]) : i.value(Y)
|
|
3517
3526
|
};
|
|
3518
3527
|
}
|
|
3519
|
-
function
|
|
3520
|
-
return t.hoveredIndex ===
|
|
3528
|
+
function ee(E) {
|
|
3529
|
+
return t.hoveredIndex === E;
|
|
3521
3530
|
}
|
|
3522
|
-
return (
|
|
3523
|
-
|
|
3531
|
+
return (E, V) => (_(), O("g", lu, [
|
|
3532
|
+
C("path", z(p.value, {
|
|
3524
3533
|
class: "lume-line-group__overlay-line",
|
|
3525
3534
|
"data-j-lume-line-group__overlay-line": ""
|
|
3526
3535
|
}), null, 16),
|
|
3527
|
-
(_(!0),
|
|
3528
|
-
key:
|
|
3536
|
+
(_(!0), O(ne, null, J(c.value, (Y, te) => (_(), O("g", {
|
|
3537
|
+
key: Y.label,
|
|
3529
3538
|
class: "lume-line-group__group"
|
|
3530
3539
|
}, [
|
|
3531
|
-
|
|
3532
|
-
(_(!0),
|
|
3533
|
-
key: `line-${
|
|
3534
|
-
color:
|
|
3535
|
-
dashed:
|
|
3536
|
-
"path-definition":
|
|
3540
|
+
C("g", uu, [
|
|
3541
|
+
(_(!0), O(ne, null, J(Y.values, (ae, le) => (_(), q(v(Kl), z(H(le), {
|
|
3542
|
+
key: `line-${le}`,
|
|
3543
|
+
color: x(le, te),
|
|
3544
|
+
dashed: Y.isDashed(le),
|
|
3545
|
+
"path-definition": D(le, te),
|
|
3537
3546
|
transition: e.transition,
|
|
3538
3547
|
width: v(r).lineWidth,
|
|
3539
|
-
onClick: (
|
|
3548
|
+
onClick: (be) => o("line-click", { index: le, datasetIndex: te, event: be })
|
|
3540
3549
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3541
3550
|
]),
|
|
3542
|
-
g.value ? (_(),
|
|
3543
|
-
(_(!0),
|
|
3544
|
-
key: `point-${
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
}), null, 16, ["active", "color", "index", "radius", "visible", "onClick"]))
|
|
3554
|
-
], 64))), 128))
|
|
3555
|
-
])) : Z("", !0)
|
|
3551
|
+
g.value ? (_(), O("g", ru, [
|
|
3552
|
+
(_(!0), O(ne, null, J(I(te), (ae) => (_(), q(v(tu), z(M(ae, te), {
|
|
3553
|
+
key: `point-${ae}`,
|
|
3554
|
+
active: ee(ae),
|
|
3555
|
+
color: x(ae, te),
|
|
3556
|
+
index: ae,
|
|
3557
|
+
radius: k.value,
|
|
3558
|
+
visible: f.value,
|
|
3559
|
+
onClick: (le) => o("point-click", { index: ae, datasetIndex: te, event: le })
|
|
3560
|
+
}), null, 16, ["active", "color", "index", "radius", "visible", "onClick"]))), 128))
|
|
3561
|
+
])) : K("", !0)
|
|
3556
3562
|
]))), 128))
|
|
3557
3563
|
]));
|
|
3558
3564
|
}
|
|
3559
|
-
}), yn = /* @__PURE__ */ oe(su, [["__scopeId", "data-v-
|
|
3560
|
-
margins:
|
|
3565
|
+
}), yn = /* @__PURE__ */ oe(su, [["__scopeId", "data-v-8c8a77a0"]]), cu = {
|
|
3566
|
+
margins: Ee.VERTICAL,
|
|
3561
3567
|
startOnZero: !0,
|
|
3562
3568
|
withTooltip: !0,
|
|
3563
3569
|
xAxisOptions: {},
|
|
@@ -3568,21 +3574,21 @@ const lu = {
|
|
|
3568
3574
|
...He(null, !1)
|
|
3569
3575
|
},
|
|
3570
3576
|
setup(e, { emit: n }) {
|
|
3571
|
-
const t = e, { componentEventPropagator: o } =
|
|
3572
|
-
return (i, u) => (_(), q(v(Me),
|
|
3577
|
+
const t = e, { componentEventPropagator: o } = xe(), a = De(fe()), { options: r } = re(t), { allOptions: l } = ke(r, cu);
|
|
3578
|
+
return (i, u) => (_(), q(v(Me), z({ ...t, ...i.$attrs }, {
|
|
3573
3579
|
"chart-type": "line",
|
|
3574
3580
|
options: v(l),
|
|
3575
3581
|
"data-j-lume-line-chart": ""
|
|
3576
|
-
},
|
|
3577
|
-
groups:
|
|
3578
|
-
|
|
3582
|
+
}, ce(v(o))), he({
|
|
3583
|
+
groups: Z((s) => [
|
|
3584
|
+
me(v(yn), z(s, ce(v(o))), null, 16)
|
|
3579
3585
|
]),
|
|
3580
3586
|
_: 2
|
|
3581
3587
|
}, [
|
|
3582
3588
|
J(v(a), (s, d) => ({
|
|
3583
3589
|
name: d,
|
|
3584
|
-
fn:
|
|
3585
|
-
|
|
3590
|
+
fn: Z((c) => [
|
|
3591
|
+
F(i.$slots, d, Te($e(c || {})))
|
|
3586
3592
|
])
|
|
3587
3593
|
}))
|
|
3588
3594
|
]), 1040, ["options"]));
|
|
@@ -3591,10 +3597,10 @@ const lu = {
|
|
|
3591
3597
|
function du(e) {
|
|
3592
3598
|
return { areaPathDefinition: m(
|
|
3593
3599
|
() => function(t, o) {
|
|
3594
|
-
if (!t || !o ||
|
|
3600
|
+
if (!t || !o || ye(t) || ye(o))
|
|
3595
3601
|
return;
|
|
3596
3602
|
const a = e.value[0].values;
|
|
3597
|
-
return
|
|
3603
|
+
return Nn().x((r, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((r) => o(r.value))(a);
|
|
3598
3604
|
}
|
|
3599
3605
|
) };
|
|
3600
3606
|
}
|
|
@@ -3619,7 +3625,7 @@ const vu = {
|
|
|
3619
3625
|
...Ce()
|
|
3620
3626
|
},
|
|
3621
3627
|
setup(e, { expose: n, emit: t }) {
|
|
3622
|
-
const o = e, { componentEventPropagator: a } =
|
|
3628
|
+
const o = e, { componentEventPropagator: a } = xe(), r = De(fe()), { data: l, options: i } = re(o), { internalData: u } = Lt(l), { allOptions: s } = ke(i, vu), { computedLineData: d } = hn(u), { areaPathDefinition: c } = du(d), p = m(() => {
|
|
3623
3629
|
var $, g;
|
|
3624
3630
|
return (g = ($ = u.value) == null ? void 0 : $[0]) == null ? void 0 : g.color;
|
|
3625
3631
|
}), b = m(
|
|
@@ -3640,15 +3646,15 @@ const vu = {
|
|
|
3640
3646
|
}
|
|
3641
3647
|
return n({
|
|
3642
3648
|
areaPathDefinition: c
|
|
3643
|
-
}), ($, g) => (_(), q(v(Me),
|
|
3649
|
+
}), ($, g) => (_(), q(v(Me), z(o, {
|
|
3644
3650
|
"chart-type": "line",
|
|
3645
3651
|
options: k(v(s)),
|
|
3646
3652
|
"x-scale": L
|
|
3647
|
-
},
|
|
3648
|
-
groups:
|
|
3649
|
-
v(s).showArea ? (_(),
|
|
3653
|
+
}, ce(v(a))), he({
|
|
3654
|
+
groups: Z((f) => [
|
|
3655
|
+
v(s).showArea ? (_(), O("path", {
|
|
3650
3656
|
key: 0,
|
|
3651
|
-
class:
|
|
3657
|
+
class: ue([
|
|
3652
3658
|
"sparkline-chart__area",
|
|
3653
3659
|
v(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3654
3660
|
`lume-fill--${b.value || p.value}`,
|
|
@@ -3656,15 +3662,15 @@ const vu = {
|
|
|
3656
3662
|
]),
|
|
3657
3663
|
d: v(c)(f.xScale, f.yScale),
|
|
3658
3664
|
"data-j-sparkline__area": ""
|
|
3659
|
-
}, null, 10, fu)) :
|
|
3660
|
-
|
|
3665
|
+
}, null, 10, fu)) : K("", !0),
|
|
3666
|
+
me(v(yn), z(f, { "with-points": !1 }, ce(v(a))), null, 16)
|
|
3661
3667
|
]),
|
|
3662
3668
|
_: 2
|
|
3663
3669
|
}, [
|
|
3664
3670
|
J(v(r), (f, y) => ({
|
|
3665
3671
|
name: y,
|
|
3666
|
-
fn:
|
|
3667
|
-
|
|
3672
|
+
fn: Z((I) => [
|
|
3673
|
+
F($.$slots, y, Te($e(I || {})), void 0, !0)
|
|
3668
3674
|
])
|
|
3669
3675
|
}))
|
|
3670
3676
|
]), 1040, ["options"]));
|
|
@@ -3681,7 +3687,7 @@ export {
|
|
|
3681
3687
|
Ao as H,
|
|
3682
3688
|
hn as I,
|
|
3683
3689
|
na as J,
|
|
3684
|
-
|
|
3690
|
+
ke as K,
|
|
3685
3691
|
kt as L,
|
|
3686
3692
|
$o as M,
|
|
3687
3693
|
la as N,
|
|
@@ -3695,17 +3701,17 @@ export {
|
|
|
3695
3701
|
Ce as V,
|
|
3696
3702
|
Lo as W,
|
|
3697
3703
|
_u as _,
|
|
3698
|
-
|
|
3699
|
-
|
|
3704
|
+
pe as a,
|
|
3705
|
+
xl as b,
|
|
3700
3706
|
Sa as c,
|
|
3701
|
-
|
|
3707
|
+
xa as d,
|
|
3702
3708
|
Ea as e,
|
|
3703
3709
|
Et as f,
|
|
3704
3710
|
ht as g,
|
|
3705
3711
|
ku as h,
|
|
3706
3712
|
It as i,
|
|
3707
3713
|
Me as j,
|
|
3708
|
-
|
|
3714
|
+
No as k,
|
|
3709
3715
|
Gt as l,
|
|
3710
3716
|
Lu as m,
|
|
3711
3717
|
Kl as n,
|
|
@@ -3722,4 +3728,4 @@ export {
|
|
|
3722
3728
|
Mo as y,
|
|
3723
3729
|
ta as z
|
|
3724
3730
|
};
|
|
3725
|
-
//# sourceMappingURL=
|
|
3731
|
+
//# sourceMappingURL=D6rOemQf.js.map
|