@adyen/lume-vue3 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as M, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as ae, createCommentVNode as z, isRef as
|
|
2
|
-
import { format as mn, ticks as pn, scaleBand as
|
|
1
|
+
import { defineComponent as Z, ref as M, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as ae, createCommentVNode as z, isRef as Rt, computed as v, watch as Y, toRefs as ne, inject as Be, reactive as Pe, onMounted as ye, unref as d, Fragment as ee, renderList as W, createBlock as K, normalizeClass as oe, normalizeStyle as St, onBeforeUnmount as Ct, watchEffect as Gt, renderSlot as S, createTextVNode as fe, useSlots as ie, withDirectives as rn, withCtx as V, createSlots as de, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Xe, createVNode as se, nextTick as yt, toHandlers as le, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Ye, resolveDynamicComponent as vn } from "vue";
|
|
2
|
+
import { format as mn, ticks as pn, scaleBand as He, scaleLinear as Me, link as fn, line as hn, area as gn } from "d3";
|
|
3
3
|
import { createPopper as _n } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
|
|
5
5
|
const An = {
|
|
@@ -74,7 +74,7 @@ const te = (e, n) => {
|
|
|
74
74
|
for (const [o, l] of n)
|
|
75
75
|
t[o] = l;
|
|
76
76
|
return t;
|
|
77
|
-
},
|
|
77
|
+
}, kt = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -82,15 +82,15 @@ const te = (e, n) => {
|
|
|
82
82
|
"tooltip",
|
|
83
83
|
"tooltip-content"
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function jt() {
|
|
86
86
|
return process.env.NODE_ENV === "production";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Vt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
90
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ut(e) {
|
|
94
94
|
return e.length === 1;
|
|
95
95
|
}
|
|
96
96
|
function On(e) {
|
|
@@ -98,17 +98,17 @@ function On(e) {
|
|
|
98
98
|
(n) => "color" in n
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ke(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Pt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
106
|
return Object.entries(n).forEach(([o, l]) => {
|
|
107
|
-
t[o] =
|
|
107
|
+
t[o] = Ke(e[o]) && Ke(l) ? Pt(e[o], l) : l;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
110
|
function xn(e) {
|
|
111
|
-
return e != null &&
|
|
111
|
+
return e != null && Ke(e) && "value" in e;
|
|
112
112
|
}
|
|
113
113
|
function ve(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
@@ -134,8 +134,8 @@ function wn(e, n) {
|
|
|
134
134
|
}
|
|
135
135
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const n =
|
|
137
|
+
function Je(e) {
|
|
138
|
+
const n = Rt(e) ? e.value : e;
|
|
139
139
|
if (!n)
|
|
140
140
|
throw new Error("No empty array can be created from specified data value");
|
|
141
141
|
const t = Math.max(
|
|
@@ -176,7 +176,7 @@ const Mn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
|
176
176
|
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
177
177
|
""
|
|
178
178
|
);
|
|
179
|
-
function
|
|
179
|
+
function rt(e, n) {
|
|
180
180
|
const t = n - e.length;
|
|
181
181
|
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
182
182
|
}
|
|
@@ -184,9 +184,9 @@ var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recom
|
|
|
184
184
|
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))(me || {});
|
|
185
185
|
const Bn = "[lume] ";
|
|
186
186
|
function _e(e, n = !0) {
|
|
187
|
-
n &&
|
|
187
|
+
n && jt() || console.warn(Bn + "Warning: " + e);
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const Ve = (e) => {
|
|
190
190
|
let n = null;
|
|
191
191
|
switch (typeof e) {
|
|
192
192
|
case "string":
|
|
@@ -206,7 +206,7 @@ const Ce = (e) => {
|
|
|
206
206
|
return n ? n(...o) : o[0];
|
|
207
207
|
}
|
|
208
208
|
return t;
|
|
209
|
-
},
|
|
209
|
+
}, Re = () => ({
|
|
210
210
|
options: {
|
|
211
211
|
type: Object,
|
|
212
212
|
default: () => ({})
|
|
@@ -214,8 +214,8 @@ const Ce = (e) => {
|
|
|
214
214
|
});
|
|
215
215
|
function pe(e, n) {
|
|
216
216
|
return { allOptions: v(() => {
|
|
217
|
-
const o =
|
|
218
|
-
return o ?
|
|
217
|
+
const o = Rt(n) ? n == null ? void 0 : n.value : n;
|
|
218
|
+
return o ? Pt(o, e.value) : e.value;
|
|
219
219
|
}) };
|
|
220
220
|
}
|
|
221
221
|
const Rn = 0.2;
|
|
@@ -241,7 +241,7 @@ function Sn(e, n, t) {
|
|
|
241
241
|
}
|
|
242
242
|
return Y(n, a), { showTick: i };
|
|
243
243
|
}
|
|
244
|
-
var
|
|
244
|
+
var ce = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ce || {}), Ft = /* @__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))(Ft || {}), it = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(it || {}), st = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(st || {}), ct = /* @__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))(ct || {});
|
|
245
245
|
const D = {
|
|
246
246
|
HORIZONTAL: "horizontal",
|
|
247
247
|
VERTICAL: "vertical"
|
|
@@ -249,7 +249,7 @@ const D = {
|
|
|
249
249
|
SINGLE: "single",
|
|
250
250
|
GROUPED: "grouped",
|
|
251
251
|
STACKED: "stacked"
|
|
252
|
-
},
|
|
252
|
+
}, zt = "No data", bt = 20, Wt = 0.33, Zt = 0.5, Ut = 12, Se = 8, Gn = 1, jn = [
|
|
253
253
|
"auto",
|
|
254
254
|
"auto-start",
|
|
255
255
|
"auto-end",
|
|
@@ -266,10 +266,10 @@ const D = {
|
|
|
266
266
|
"left-start",
|
|
267
267
|
"left-end"
|
|
268
268
|
];
|
|
269
|
-
function
|
|
269
|
+
function Fe(e) {
|
|
270
270
|
e != null && e.closest("svg") || _e(me.NotContainedInSvg);
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const Xt = {
|
|
273
273
|
/** Displays a line for each tick. */
|
|
274
274
|
gridLines: !1,
|
|
275
275
|
/** Displays the axis title. */
|
|
@@ -286,11 +286,11 @@ const Ut = {
|
|
|
286
286
|
/** Space between the tick label and the axis line. */
|
|
287
287
|
tickPadding: 8
|
|
288
288
|
}, Vn = {
|
|
289
|
-
...
|
|
289
|
+
...Xt,
|
|
290
290
|
withTitle: !1,
|
|
291
291
|
skip: !0
|
|
292
292
|
}, Pn = {
|
|
293
|
-
...
|
|
293
|
+
...Xt,
|
|
294
294
|
gridLines: !0
|
|
295
295
|
}, Fn = function(e, n, t) {
|
|
296
296
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
@@ -308,7 +308,7 @@ const Ut = {
|
|
|
308
308
|
return {
|
|
309
309
|
x: -(c - e.value.step()) / 2,
|
|
310
310
|
width: c,
|
|
311
|
-
height: t.value.tickPadding +
|
|
311
|
+
height: t.value.tickPadding + Ut + Se
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
function a() {
|
|
@@ -343,7 +343,7 @@ const Ut = {
|
|
|
343
343
|
}
|
|
344
344
|
function u(s) {
|
|
345
345
|
var p;
|
|
346
|
-
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding +
|
|
346
|
+
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + Se;
|
|
347
347
|
return {
|
|
348
348
|
x: -c,
|
|
349
349
|
width: c,
|
|
@@ -384,7 +384,7 @@ const Ut = {
|
|
|
384
384
|
}
|
|
385
385
|
function u() {
|
|
386
386
|
return {
|
|
387
|
-
height: t.value.tickPadding +
|
|
387
|
+
height: t.value.tickPadding + Ut + Se,
|
|
388
388
|
width: o.value,
|
|
389
389
|
x: -(o.value / 2)
|
|
390
390
|
};
|
|
@@ -419,7 +419,7 @@ const Ut = {
|
|
|
419
419
|
}
|
|
420
420
|
function u(s) {
|
|
421
421
|
var p;
|
|
422
|
-
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding +
|
|
422
|
+
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + Se;
|
|
423
423
|
return {
|
|
424
424
|
width: c,
|
|
425
425
|
height: o.value,
|
|
@@ -470,8 +470,8 @@ const Ut = {
|
|
|
470
470
|
], -1), Jn = [
|
|
471
471
|
Kn
|
|
472
472
|
];
|
|
473
|
-
var
|
|
474
|
-
const
|
|
473
|
+
var Yt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Yt || {}), Kt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Kt || {}), Qe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Qe || {});
|
|
474
|
+
const At = /* @__PURE__ */ Z({
|
|
475
475
|
__name: "lume-axis",
|
|
476
476
|
props: {
|
|
477
477
|
scale: {
|
|
@@ -481,12 +481,12 @@ const bt = /* @__PURE__ */ Z({
|
|
|
481
481
|
type: {
|
|
482
482
|
type: String,
|
|
483
483
|
default: void 0,
|
|
484
|
-
validator: (e) => e in
|
|
484
|
+
validator: (e) => e in Qe
|
|
485
485
|
},
|
|
486
486
|
position: {
|
|
487
487
|
type: String,
|
|
488
488
|
default: void 0,
|
|
489
|
-
validator: (e) => e in
|
|
489
|
+
validator: (e) => e in Kt
|
|
490
490
|
},
|
|
491
491
|
containerSize: {
|
|
492
492
|
type: Object,
|
|
@@ -500,12 +500,12 @@ const bt = /* @__PURE__ */ Z({
|
|
|
500
500
|
type: String,
|
|
501
501
|
default: D.VERTICAL
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...Re()
|
|
504
504
|
},
|
|
505
505
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
506
506
|
setup(e, { emit: n }) {
|
|
507
|
-
const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p =
|
|
508
|
-
() => o.type ?
|
|
507
|
+
const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p = Be("isEmpty", M(!1)), r = Pe({}), h = M(null), g = M(null), m = M(null), A = v(
|
|
508
|
+
() => o.type ? Qe[o.type] : o.position
|
|
509
509
|
), x = v(
|
|
510
510
|
() => o.type || (A.value === "left" ? "y" : "x")
|
|
511
511
|
), T = v(
|
|
@@ -523,11 +523,11 @@ const bt = /* @__PURE__ */ Z({
|
|
|
523
523
|
return pn(H, k, R);
|
|
524
524
|
}), F = v(() => {
|
|
525
525
|
const { tickFormat: R } = f.value;
|
|
526
|
-
return
|
|
526
|
+
return Ve(R);
|
|
527
527
|
}), w = v(
|
|
528
528
|
() => f.value.withHover && T.value && i.value > -1
|
|
529
529
|
), C = v(
|
|
530
|
-
() => f.value.tickPadding +
|
|
530
|
+
() => f.value.tickPadding + Se || 16
|
|
531
531
|
), J = v(() => x.value === "x" ? (
|
|
532
532
|
// If x axis, get the tick height
|
|
533
533
|
Math.max(
|
|
@@ -559,7 +559,7 @@ const bt = /* @__PURE__ */ Z({
|
|
|
559
559
|
function P(R, H, k) {
|
|
560
560
|
l("click", { index: R, value: H, event: k });
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function re(R) {
|
|
563
563
|
var H;
|
|
564
564
|
if (!(!h.value || !h.value.length))
|
|
565
565
|
return (H = h.value[R]) == null ? void 0 : H.ref;
|
|
@@ -569,21 +569,21 @@ const bt = /* @__PURE__ */ Z({
|
|
|
569
569
|
(R, H) => ({
|
|
570
570
|
value: U(R),
|
|
571
571
|
group: r.getTickGroupAttributes(R, H),
|
|
572
|
-
ghost: r.getTickGhostAttributes(
|
|
572
|
+
ghost: r.getTickGhostAttributes(re(H)),
|
|
573
573
|
label: r.getTickLabelAttributes(),
|
|
574
574
|
gridline: r.getGridLinesAttributes()
|
|
575
575
|
})
|
|
576
576
|
);
|
|
577
577
|
}
|
|
578
578
|
function be() {
|
|
579
|
-
const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${x.value}-${
|
|
579
|
+
const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${x.value}-${Yt[R]}`];
|
|
580
580
|
Object.entries(H(u, a, f) || []).forEach(
|
|
581
581
|
([k, B]) => {
|
|
582
582
|
r[k] = B;
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
585
|
}
|
|
586
|
-
return Y(u, be, { flush: "sync", immediate: !0 }), Y(u, xe, { immediate: !0 }), Y(h, xe), Y(J, (R) => l("lume__internal--axis-size", R)), ye(() =>
|
|
586
|
+
return Y(u, be, { flush: "sync", immediate: !0 }), Y(u, xe, { immediate: !0 }), Y(h, xe), Y(J, (R) => l("lume__internal--axis-size", R)), ye(() => Fe(g.value)), (R, H) => d(u) ? (_(), $("g", {
|
|
587
587
|
key: 0,
|
|
588
588
|
ref_key: "root",
|
|
589
589
|
ref: g,
|
|
@@ -593,7 +593,7 @@ const bt = /* @__PURE__ */ Z({
|
|
|
593
593
|
onMouseleave: H[1] || (H[1] = (k) => l("mouseleave", k))
|
|
594
594
|
}, [
|
|
595
595
|
x.value === "x" ? (_(), $("defs", Yn, Jn)) : z("", !0),
|
|
596
|
-
(_(!0), $(ee, null, W(m.value, (k, B) => (_(), K(d(
|
|
596
|
+
(_(!0), $(ee, null, W(m.value, (k, B) => (_(), K(d(kt), j({
|
|
597
597
|
key: `${k.value}_${B}`,
|
|
598
598
|
ref_for: !0,
|
|
599
599
|
ref_key: "tickRefs",
|
|
@@ -604,7 +604,7 @@ const bt = /* @__PURE__ */ Z({
|
|
|
604
604
|
onMouseenter: (y) => q(B, k.value, y),
|
|
605
605
|
onClick: (y) => P(B, k.value, y)
|
|
606
606
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
607
|
-
w.value ? (_(), K(d(
|
|
607
|
+
w.value ? (_(), K(d(kt), j({ key: 1 }, m.value[d(i)], {
|
|
608
608
|
"with-gridlines": !1,
|
|
609
609
|
"is-hovered": "",
|
|
610
610
|
onClick: H[0] || (H[0] = (k) => P(
|
|
@@ -675,7 +675,7 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
675
675
|
const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p = M(null), r = v(
|
|
676
676
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
677
677
|
), h = v(() => s.value === "width"), g = v(() => s.value === "height"), m = qn(l, u, a, i), { computedX: A, computedY: x, shouldHaveMinWidth: T, shouldHaveMinHeight: f } = Qn(l, u, a, i), O = v(() => T.value ? 1 : (h.value ? m.computedWidth : a).value), N = v(() => f.value ? 1 : (g.value ? m.computedHeight : i).value), E = h.value || g.value ? m.transformOrigin : null;
|
|
678
|
-
return ye(() =>
|
|
678
|
+
return ye(() => Fe(p.value)), (F, w) => (_(), $("rect", {
|
|
679
679
|
ref_key: "root",
|
|
680
680
|
ref: p,
|
|
681
681
|
class: oe(["lume-bar", [
|
|
@@ -687,7 +687,7 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
687
687
|
},
|
|
688
688
|
...r.value
|
|
689
689
|
]]),
|
|
690
|
-
style:
|
|
690
|
+
style: St({ transformOrigin: d(E) }),
|
|
691
691
|
x: d(A),
|
|
692
692
|
y: d(x),
|
|
693
693
|
width: O.value,
|
|
@@ -699,9 +699,9 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
699
699
|
}, null, 46, eo));
|
|
700
700
|
}
|
|
701
701
|
});
|
|
702
|
-
const
|
|
702
|
+
const dt = /* @__PURE__ */ te(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
703
703
|
function no() {
|
|
704
|
-
const e = M(), n =
|
|
704
|
+
const e = M(), n = Pe({
|
|
705
705
|
dimensions: {}
|
|
706
706
|
}), t = new ResizeObserver((o) => {
|
|
707
707
|
o.forEach((l) => {
|
|
@@ -710,7 +710,7 @@ function no() {
|
|
|
710
710
|
});
|
|
711
711
|
return ye(() => {
|
|
712
712
|
t.observe(e.value);
|
|
713
|
-
}),
|
|
713
|
+
}), Ct(() => {
|
|
714
714
|
t.unobserve(e.value);
|
|
715
715
|
}), { resizeState: n, resizeRef: e };
|
|
716
716
|
}
|
|
@@ -739,7 +739,7 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
739
739
|
const t = e, o = n, { margins: l, containerSize: u } = ne(t), a = M(null), { resizeRef: i, resizeState: s } = no(), c = v(
|
|
740
740
|
() => u.value.height + l.value.top + l.value.bottom
|
|
741
741
|
);
|
|
742
|
-
return
|
|
742
|
+
return Gt(() => {
|
|
743
743
|
if (!a.value)
|
|
744
744
|
return;
|
|
745
745
|
const { width: p } = s.dimensions, { height: r } = a.value.getBoundingClientRect();
|
|
@@ -797,7 +797,7 @@ const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["on
|
|
|
797
797
|
},
|
|
798
798
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
799
799
|
setup(e, { emit: n }) {
|
|
800
|
-
const t = n, o =
|
|
800
|
+
const t = n, o = Be("isEmpty", M(!1));
|
|
801
801
|
return (l, u) => d(o) ? z("", !0) : (_(), $("div", {
|
|
802
802
|
key: 0,
|
|
803
803
|
class: "lume-chart-legend",
|
|
@@ -821,7 +821,7 @@ const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["on
|
|
|
821
821
|
], 32));
|
|
822
822
|
}
|
|
823
823
|
});
|
|
824
|
-
const
|
|
824
|
+
const Tt = /* @__PURE__ */ te(io, [["__scopeId", "data-v-b298ddd7"]]);
|
|
825
825
|
const so = {}, co = {
|
|
826
826
|
class: "lume-tooltip__title",
|
|
827
827
|
"data-j-tooltip__title": ""
|
|
@@ -913,11 +913,11 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
913
913
|
type: String,
|
|
914
914
|
default: null
|
|
915
915
|
},
|
|
916
|
-
...
|
|
916
|
+
...Re()
|
|
917
917
|
},
|
|
918
918
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
919
919
|
setup(e, { emit: n }) {
|
|
920
|
-
const t = e, o = n, l = M(null), { items: u, options: a } = ne(t), i =
|
|
920
|
+
const t = e, o = n, l = M(null), { items: u, options: a } = ne(t), i = ie(), s = M(null), { allOptions: c } = pe(a), p = v(
|
|
921
921
|
() => c.value.fixedPositioning ?? t.fixedPositioning
|
|
922
922
|
), r = v(
|
|
923
923
|
() => p.value ? "fixed" : "absolute"
|
|
@@ -936,7 +936,7 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
936
936
|
...t.modifiers || []
|
|
937
937
|
]), g = v(
|
|
938
938
|
() => c.value.showTitle !== !1 && t.title != null
|
|
939
|
-
), m = v(() =>
|
|
939
|
+
), m = v(() => Ve(c.value.valueFormat)), A = v(() => Ve(c.value.titleFormat)), x = v(
|
|
940
940
|
() => {
|
|
941
941
|
var E;
|
|
942
942
|
return ((E = u.value) == null ? void 0 : E.find((F) => F.isSummary)) || {
|
|
@@ -964,7 +964,7 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
964
964
|
(E, F) => {
|
|
965
965
|
!F && E ? f() : N();
|
|
966
966
|
}
|
|
967
|
-
), ye(f),
|
|
967
|
+
), ye(f), Ct(O), (E, F) => rn((_(), $("div", {
|
|
968
968
|
ref_key: "root",
|
|
969
969
|
ref: l,
|
|
970
970
|
class: oe(["lume-tooltip lume-typography--caption", {
|
|
@@ -1024,24 +1024,24 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
1024
1024
|
});
|
|
1025
1025
|
const Eo = /* @__PURE__ */ te(wo, [["__scopeId", "data-v-8ec11304"]]);
|
|
1026
1026
|
var Te = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Te || {});
|
|
1027
|
-
const No = Te.Categorical,
|
|
1027
|
+
const No = Te.Categorical, Ce = ce.Skyblue, Do = it.SkyTeal;
|
|
1028
1028
|
function Ho(e) {
|
|
1029
|
-
return e === Te.Divergent ? Do :
|
|
1029
|
+
return e === Te.Divergent ? Do : Ce;
|
|
1030
1030
|
}
|
|
1031
1031
|
function Mo(e) {
|
|
1032
|
-
return Object.values(
|
|
1033
|
-
}
|
|
1034
|
-
function
|
|
1035
|
-
return n === Te.Divergent ? Object.values(
|
|
1036
|
-
...
|
|
1037
|
-
...
|
|
1038
|
-
...
|
|
1039
|
-
...
|
|
1032
|
+
return Object.values(ct).includes(e);
|
|
1033
|
+
}
|
|
1034
|
+
function Lt(e, n) {
|
|
1035
|
+
return n === Te.Divergent ? Object.values(it).includes(e) : Object.values({
|
|
1036
|
+
...ce,
|
|
1037
|
+
...Ft,
|
|
1038
|
+
...st,
|
|
1039
|
+
...ct
|
|
1040
1040
|
}).includes(e);
|
|
1041
1041
|
}
|
|
1042
1042
|
function Bo(e, n) {
|
|
1043
|
-
const t = Object.values(
|
|
1044
|
-
return Dn(Object.values(
|
|
1043
|
+
const t = Object.values(ce).indexOf(e);
|
|
1044
|
+
return Dn(Object.values(ce), t > -1 ? t : 0)[n];
|
|
1045
1045
|
}
|
|
1046
1046
|
function Ro(e, n) {
|
|
1047
1047
|
const t = 50 + n * 10;
|
|
@@ -1051,7 +1051,7 @@ function So(e, n) {
|
|
|
1051
1051
|
const t = (n + 1) * 10;
|
|
1052
1052
|
return `${e}-${t}`;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function Ot(e, n, t) {
|
|
1055
1055
|
switch (n) {
|
|
1056
1056
|
default:
|
|
1057
1057
|
case Te.Categorical:
|
|
@@ -1063,7 +1063,7 @@ function Lt(e, n, t) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
function Co(e, n, t = No, o) {
|
|
1066
|
-
return
|
|
1066
|
+
return Lt(e, t) ? e : (o > 4 && (_e(me.ColorLoop), o = o % 5), Lt(n, t) ? Ot(n, t, o) : Ot(Ho(t), t, o));
|
|
1067
1067
|
}
|
|
1068
1068
|
function Go(e) {
|
|
1069
1069
|
return e.map((n) => xn(n) ? n : { value: n });
|
|
@@ -1071,7 +1071,7 @@ function Go(e) {
|
|
|
1071
1071
|
function jo(e) {
|
|
1072
1072
|
return e.__internal === !0;
|
|
1073
1073
|
}
|
|
1074
|
-
const
|
|
1074
|
+
const vt = (e = null) => ({
|
|
1075
1075
|
data: {
|
|
1076
1076
|
type: Array,
|
|
1077
1077
|
required: !0,
|
|
@@ -1083,15 +1083,15 @@ const it = (e = null) => ({
|
|
|
1083
1083
|
},
|
|
1084
1084
|
color: {
|
|
1085
1085
|
type: String,
|
|
1086
|
-
default:
|
|
1086
|
+
default: ce.Skyblue
|
|
1087
1087
|
},
|
|
1088
1088
|
title: {
|
|
1089
1089
|
type: String,
|
|
1090
1090
|
default: null
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
1093
|
-
function
|
|
1094
|
-
const u =
|
|
1093
|
+
function mt(e, n, t, o, l) {
|
|
1094
|
+
const u = Pe({
|
|
1095
1095
|
width: 0,
|
|
1096
1096
|
height: 0
|
|
1097
1097
|
}), a = Mn(12), i = v(() => {
|
|
@@ -1114,9 +1114,9 @@ function st(e, n, t, o, l) {
|
|
|
1114
1114
|
};
|
|
1115
1115
|
}
|
|
1116
1116
|
);
|
|
1117
|
-
}), s = v(() => Array.isArray(n.value) ? n.value :
|
|
1117
|
+
}), s = v(() => Array.isArray(n.value) ? n.value : Je(e.value).map((p, r) => r));
|
|
1118
1118
|
function c(p) {
|
|
1119
|
-
const r = (l == null ? void 0 : l.value) === D.HORIZONTAL &&
|
|
1119
|
+
const r = (l == null ? void 0 : l.value) === D.HORIZONTAL && Je(e).length * (((o == null ? void 0 : o.value.barHeight) || bt) * 2) + ((o == null ? void 0 : o.value.barHeight) || bt) || p.height;
|
|
1120
1120
|
u.width = p.width, u.height = r;
|
|
1121
1121
|
}
|
|
1122
1122
|
return {
|
|
@@ -1141,65 +1141,65 @@ function Po(e, n, t, o, l) {
|
|
|
1141
1141
|
const u = M(null), a = M(null);
|
|
1142
1142
|
function i() {
|
|
1143
1143
|
const { width: s, height: c } = t;
|
|
1144
|
-
!s && !c || !n.value || !e.value || (o.value === D.HORIZONTAL ? (u.value =
|
|
1144
|
+
!s && !c || !n.value || !e.value || (o.value === D.HORIZONTAL ? (u.value = $t(
|
|
1145
1145
|
e.value,
|
|
1146
1146
|
s,
|
|
1147
1147
|
o.value,
|
|
1148
1148
|
l.value.startOnZero
|
|
1149
|
-
), a.value =
|
|
1149
|
+
), a.value = xt(
|
|
1150
1150
|
n.value,
|
|
1151
1151
|
c,
|
|
1152
1152
|
o.value,
|
|
1153
1153
|
l.value
|
|
1154
|
-
)) : (u.value =
|
|
1154
|
+
)) : (u.value = xt(
|
|
1155
1155
|
n.value,
|
|
1156
1156
|
s,
|
|
1157
1157
|
o.value,
|
|
1158
1158
|
l.value
|
|
1159
|
-
), a.value =
|
|
1159
|
+
), a.value = $t(
|
|
1160
1160
|
e.value,
|
|
1161
1161
|
c,
|
|
1162
1162
|
o.value,
|
|
1163
1163
|
l.value.startOnZero
|
|
1164
1164
|
)));
|
|
1165
1165
|
}
|
|
1166
|
-
return
|
|
1166
|
+
return Gt(i), { xScale: u, yScale: a };
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const l = [0, n], { padding: u, paddingInner: a, paddingOuter: i } = o, s = u ?? (t === D.HORIZONTAL ?
|
|
1168
|
+
function xt(e, n, t, o) {
|
|
1169
|
+
const l = [0, n], { padding: u, paddingInner: a, paddingOuter: i } = o, s = u ?? (t === D.HORIZONTAL ? Zt : Wt);
|
|
1170
1170
|
return Object.assign(
|
|
1171
|
-
|
|
1171
|
+
He().range(l).paddingInner(a ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1172
1172
|
{ labels: e }
|
|
1173
1173
|
);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
const l =
|
|
1175
|
+
function $t(e, n, t, o) {
|
|
1176
|
+
const l = Vt(e).filter((p) => p != null), u = [0, n];
|
|
1177
1177
|
if (l.length === 0)
|
|
1178
|
-
return
|
|
1178
|
+
return Me().range(u).domain([0, 0]).nice();
|
|
1179
1179
|
const a = Math.min(...l), i = o && a > 0 ? 0 : a, s = Math.max(...l), c = t === D.HORIZONTAL ? [i, s] : [s, i];
|
|
1180
|
-
return
|
|
1180
|
+
return Me().range(u).domain(c).nice();
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function It(e) {
|
|
1183
1183
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function qe(e, n) {
|
|
1186
1186
|
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function wt(e, n, {
|
|
1189
1189
|
padding: t,
|
|
1190
1190
|
paddingInner: o,
|
|
1191
1191
|
paddingOuter: l
|
|
1192
1192
|
} = {}) {
|
|
1193
|
-
const u = t ?? (n === D.HORIZONTAL ?
|
|
1193
|
+
const u = t ?? (n === D.HORIZONTAL ? Zt : Wt);
|
|
1194
1194
|
return e.copy().paddingInner(o ?? u).paddingOuter(l ?? u);
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Jt(e) {
|
|
1197
1197
|
return Object.values(D).includes(e);
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1200
|
-
...
|
|
1199
|
+
const Ne = (e, n = !0) => ({
|
|
1200
|
+
...vt(e),
|
|
1201
1201
|
...Vo(),
|
|
1202
|
-
...
|
|
1202
|
+
...Re(),
|
|
1203
1203
|
classList: {
|
|
1204
1204
|
type: [String, Array],
|
|
1205
1205
|
default: () => []
|
|
@@ -1212,17 +1212,17 @@ const Ie = (e, n = !0) => ({
|
|
|
1212
1212
|
orientation: {
|
|
1213
1213
|
type: String,
|
|
1214
1214
|
default: D.VERTICAL,
|
|
1215
|
-
validator:
|
|
1215
|
+
validator: Jt
|
|
1216
1216
|
}
|
|
1217
1217
|
} : {}
|
|
1218
1218
|
}), Fo = (e) => ({
|
|
1219
|
-
...
|
|
1220
|
-
...
|
|
1219
|
+
...vt(e),
|
|
1220
|
+
...Re(),
|
|
1221
1221
|
hoveredElement: {
|
|
1222
1222
|
type: [Number, String],
|
|
1223
1223
|
default: null
|
|
1224
1224
|
}
|
|
1225
|
-
}),
|
|
1225
|
+
}), ze = () => ({
|
|
1226
1226
|
data: {
|
|
1227
1227
|
type: Array,
|
|
1228
1228
|
required: !0
|
|
@@ -1238,7 +1238,7 @@ const Ie = (e, n = !0) => ({
|
|
|
1238
1238
|
orientation: {
|
|
1239
1239
|
type: String,
|
|
1240
1240
|
default: D.VERTICAL,
|
|
1241
|
-
validator:
|
|
1241
|
+
validator: Jt
|
|
1242
1242
|
},
|
|
1243
1243
|
xScale: {
|
|
1244
1244
|
type: Function,
|
|
@@ -1267,7 +1267,7 @@ const Ie = (e, n = !0) => ({
|
|
|
1267
1267
|
}), zo = { class: "lume-overlay-group" }, Wo = /* @__PURE__ */ Z({
|
|
1268
1268
|
__name: "lume-overlay-group",
|
|
1269
1269
|
props: {
|
|
1270
|
-
...
|
|
1270
|
+
...ze(),
|
|
1271
1271
|
orientation: {
|
|
1272
1272
|
type: String,
|
|
1273
1273
|
default: D.VERTICAL
|
|
@@ -1275,7 +1275,7 @@ const Ie = (e, n = !0) => ({
|
|
|
1275
1275
|
},
|
|
1276
1276
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1277
1277
|
setup(e, { emit: n }) {
|
|
1278
|
-
const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() =>
|
|
1278
|
+
const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() => Je(l));
|
|
1279
1279
|
function c(p) {
|
|
1280
1280
|
var T;
|
|
1281
1281
|
const r = u.value === D.HORIZONTAL ? i.value : a.value, h = r.domain(), g = $n(r), m = ((T = r.paddingInner) == null ? void 0 : T.call(r)) ?? 0, A = g * m, x = ve(r) ? r(h[p]) - A / 2 : r(p) - g / 2;
|
|
@@ -1290,7 +1290,7 @@ const Ie = (e, n = !0) => ({
|
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
1292
|
return (p, r) => (_(), $("g", zo, [
|
|
1293
|
-
(_(!0), $(ee, null, W(s.value, (h, g) => (_(), K(d(
|
|
1293
|
+
(_(!0), $(ee, null, W(s.value, (h, g) => (_(), K(d(dt), j(c(g), {
|
|
1294
1294
|
key: `overlay-${g}`,
|
|
1295
1295
|
"data-j-lume-overlay-group": g,
|
|
1296
1296
|
transition: !1,
|
|
@@ -1309,7 +1309,7 @@ const Ie = (e, n = !0) => ({
|
|
|
1309
1309
|
};
|
|
1310
1310
|
function Zo(e) {
|
|
1311
1311
|
return { hasNegativeValues: v(
|
|
1312
|
-
() =>
|
|
1312
|
+
() => Vt(e.value).some((t) => t < 0)
|
|
1313
1313
|
) };
|
|
1314
1314
|
}
|
|
1315
1315
|
function Uo(e, n, t, o) {
|
|
@@ -1338,22 +1338,22 @@ function Uo(e, n, t, o) {
|
|
|
1338
1338
|
})) };
|
|
1339
1339
|
}
|
|
1340
1340
|
function Xo(e, n) {
|
|
1341
|
-
return e.reduce((t, o) =>
|
|
1341
|
+
return e.reduce((t, o) => rt(o.values, n).map(
|
|
1342
1342
|
(l, u) => t[u] ? l.value > t[u] ? l.value : t[u] : l.value ?? 0
|
|
1343
1343
|
), []);
|
|
1344
1344
|
}
|
|
1345
1345
|
function Yo(e, n) {
|
|
1346
|
-
return e.reduce((t, o) =>
|
|
1346
|
+
return e.reduce((t, o) => rt(o.values, n).map(
|
|
1347
1347
|
(l, u) => {
|
|
1348
1348
|
const a = l.value == null || l.value < 0 ? 0 : l.value;
|
|
1349
1349
|
return t[u] ? t[u] + a : a;
|
|
1350
1350
|
}
|
|
1351
1351
|
), []);
|
|
1352
1352
|
}
|
|
1353
|
-
const
|
|
1353
|
+
const Et = {
|
|
1354
1354
|
"stacked-bar": Yo
|
|
1355
1355
|
};
|
|
1356
|
-
function
|
|
1356
|
+
function Qt(e, n, t, o, l, u, a, i) {
|
|
1357
1357
|
const s = v(
|
|
1358
1358
|
() => {
|
|
1359
1359
|
var p;
|
|
@@ -1362,13 +1362,13 @@ function Jt(e, n, t, o, l, u, a, i) {
|
|
|
1362
1362
|
);
|
|
1363
1363
|
function c(p) {
|
|
1364
1364
|
var g;
|
|
1365
|
-
const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, h = i != null && i.value &&
|
|
1365
|
+
const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, h = i != null && i.value && Et[i.value] ? Et[i.value](
|
|
1366
1366
|
p,
|
|
1367
1367
|
r
|
|
1368
1368
|
) : Xo(p, r);
|
|
1369
1369
|
e.value = h.map((m, A) => ({
|
|
1370
|
-
cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(m) :
|
|
1371
|
-
cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ?
|
|
1370
|
+
cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(m) : qe(t.value, A),
|
|
1371
|
+
cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? qe(o.value, A) : o.value(m)
|
|
1372
1372
|
}));
|
|
1373
1373
|
}
|
|
1374
1374
|
return Y(
|
|
@@ -1380,7 +1380,7 @@ function Jt(e, n, t, o, l, u, a, i) {
|
|
|
1380
1380
|
), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: c };
|
|
1381
1381
|
}
|
|
1382
1382
|
function Ko() {
|
|
1383
|
-
const e =
|
|
1383
|
+
const e = Pe({
|
|
1384
1384
|
opened: !1,
|
|
1385
1385
|
targetElement: null
|
|
1386
1386
|
});
|
|
@@ -1397,36 +1397,36 @@ function Jo(e) {
|
|
|
1397
1397
|
return {
|
|
1398
1398
|
color: ((a = u[t]) == null ? void 0 : a.color) || o,
|
|
1399
1399
|
label: l,
|
|
1400
|
-
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((s = u[t]) == null ? void 0 : s.value) ??
|
|
1400
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((s = u[t]) == null ? void 0 : s.value) ?? zt
|
|
1401
1401
|
};
|
|
1402
1402
|
})
|
|
1403
1403
|
) };
|
|
1404
1404
|
}
|
|
1405
|
-
const
|
|
1405
|
+
const et = 16, tt = 8, nt = 28, ot = 24, Le = {
|
|
1406
1406
|
VERTICAL: {
|
|
1407
|
-
top:
|
|
1408
|
-
right:
|
|
1409
|
-
bottom:
|
|
1410
|
-
left:
|
|
1407
|
+
top: et,
|
|
1408
|
+
right: tt,
|
|
1409
|
+
bottom: nt,
|
|
1410
|
+
left: ot
|
|
1411
1411
|
},
|
|
1412
1412
|
HORIZONTAL: {
|
|
1413
|
-
top:
|
|
1414
|
-
right:
|
|
1415
|
-
bottom:
|
|
1416
|
-
left:
|
|
1413
|
+
top: et,
|
|
1414
|
+
right: tt,
|
|
1415
|
+
bottom: nt,
|
|
1416
|
+
left: ot
|
|
1417
1417
|
}
|
|
1418
1418
|
};
|
|
1419
1419
|
function Qo(e) {
|
|
1420
|
-
return !e || e === "auto" || e.top == null || e.top === "auto" ?
|
|
1420
|
+
return !e || e === "auto" || e.top == null || e.top === "auto" ? et : e.top;
|
|
1421
1421
|
}
|
|
1422
1422
|
function qo(e) {
|
|
1423
|
-
return !e || e === "auto" || e.right == null || e.right === "auto" ?
|
|
1423
|
+
return !e || e === "auto" || e.right == null || e.right === "auto" ? tt : e.right;
|
|
1424
1424
|
}
|
|
1425
1425
|
function ea(e, n) {
|
|
1426
|
-
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n ||
|
|
1426
|
+
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || nt : e.bottom;
|
|
1427
1427
|
}
|
|
1428
1428
|
function ta(e, n) {
|
|
1429
|
-
return !e || e === "auto" || e.left == null || e.left === "auto" ? n ||
|
|
1429
|
+
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || ot : e.left;
|
|
1430
1430
|
}
|
|
1431
1431
|
const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-section" }, aa = {
|
|
1432
1432
|
key: 0,
|
|
@@ -1440,14 +1440,14 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1440
1440
|
}, da = /* @__PURE__ */ Z({
|
|
1441
1441
|
__name: "lume-chart",
|
|
1442
1442
|
props: {
|
|
1443
|
-
...
|
|
1443
|
+
...Ne(),
|
|
1444
1444
|
chartType: {
|
|
1445
1445
|
type: String,
|
|
1446
1446
|
default: null
|
|
1447
1447
|
}
|
|
1448
1448
|
},
|
|
1449
1449
|
setup(e, { emit: n }) {
|
|
1450
|
-
const t = e, o =
|
|
1450
|
+
const t = e, o = ie(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r = M(-1), h = M(null), g = M(null), m = M([]), A = M(null), x = M(0), T = M(0), { allOptions: f } = pe(s), { internalData: O, computedLabels: N, containerSize: E, updateSize: F, chartID: w } = mt(u, a, i, f, c), { xScale: C, yScale: J } = Po(
|
|
1451
1451
|
O,
|
|
1452
1452
|
N,
|
|
1453
1453
|
E,
|
|
@@ -1460,11 +1460,11 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1460
1460
|
left: ta(f.value.margins, T.value)
|
|
1461
1461
|
})), q = v(() => {
|
|
1462
1462
|
var L;
|
|
1463
|
-
return t.xScale ?
|
|
1463
|
+
return t.xScale ? It(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, O.value, a.value, E) : C.value;
|
|
1464
1464
|
}), P = v(() => {
|
|
1465
1465
|
var L;
|
|
1466
|
-
return t.yScale ?
|
|
1467
|
-
}),
|
|
1466
|
+
return t.yScale ? It(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, O.value, a.value, E) : J.value;
|
|
1467
|
+
}), re = v(() => ({
|
|
1468
1468
|
...f.value.xAxisOptions,
|
|
1469
1469
|
withHover: c.value === D.VERTICAL
|
|
1470
1470
|
})), xe = v(() => ({
|
|
@@ -1492,7 +1492,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1492
1492
|
q,
|
|
1493
1493
|
P,
|
|
1494
1494
|
c
|
|
1495
|
-
), { shouldGenerateTooltipAnchors:
|
|
1495
|
+
), { shouldGenerateTooltipAnchors: ue } = Qt(
|
|
1496
1496
|
m,
|
|
1497
1497
|
f,
|
|
1498
1498
|
q,
|
|
@@ -1501,9 +1501,9 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1501
1501
|
c,
|
|
1502
1502
|
O,
|
|
1503
1503
|
p
|
|
1504
|
-
), { tooltipConfig:
|
|
1505
|
-
() => f.value.withTooltip !== !1 &&
|
|
1506
|
-
),
|
|
1504
|
+
), { tooltipConfig: $e, showTooltip: We, hideTooltip: Ze } = Ko(), { getTooltipItems: Ie } = Jo(O), Ge = v(
|
|
1505
|
+
() => f.value.withTooltip !== !1 && $e.opened
|
|
1506
|
+
), Ae = v(
|
|
1507
1507
|
() => {
|
|
1508
1508
|
var L;
|
|
1509
1509
|
return ((L = f.value.tooltipOptions) == null ? void 0 : L.position) || "top";
|
|
@@ -1511,40 +1511,40 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1511
1511
|
), ln = v(() => {
|
|
1512
1512
|
var b;
|
|
1513
1513
|
const L = (b = f.value.tooltipOptions) == null ? void 0 : b.withPointerEvents;
|
|
1514
|
-
return
|
|
1514
|
+
return $e.opened && (!L || L && A.value === !1);
|
|
1515
1515
|
});
|
|
1516
|
-
function
|
|
1516
|
+
function je(L) {
|
|
1517
1517
|
var I;
|
|
1518
1518
|
if (L === r.value)
|
|
1519
1519
|
return;
|
|
1520
1520
|
const b = r.value;
|
|
1521
1521
|
if (f.value.withHover !== !1 && (r.value = L), f.value.withTooltip !== !1) {
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1522
|
+
const Ue = (I = f.value.tooltipOptions) != null && I.targetElement ? f.value.tooltipOptions.targetElement === "self" ? g.value.$el : f.value.tooltipOptions.targetElement : h.value[L];
|
|
1523
|
+
We(Ue);
|
|
1524
1524
|
}
|
|
1525
1525
|
l("hovered-index-changed", { newIndex: L, oldIndex: b });
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1528
|
-
|
|
1527
|
+
function ft() {
|
|
1528
|
+
Ze(), r.value = -1;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function ht(L) {
|
|
1531
1531
|
if (!u.value.some(
|
|
1532
1532
|
({ values: I }) => L <= I.length - 1
|
|
1533
1533
|
)) {
|
|
1534
1534
|
_e(me.InvalidHoveredIndex);
|
|
1535
1535
|
return;
|
|
1536
1536
|
}
|
|
1537
|
-
|
|
1537
|
+
je(L);
|
|
1538
1538
|
}
|
|
1539
1539
|
function un() {
|
|
1540
1540
|
setTimeout(() => {
|
|
1541
|
-
ln.value &&
|
|
1541
|
+
ln.value && ft(), l("chart-mouseleave");
|
|
1542
1542
|
}, 0);
|
|
1543
1543
|
}
|
|
1544
|
-
function ht({ index: L, value: b, event: I }) {
|
|
1545
|
-
L !== null && Se(L), l("axis-mouseenter", { index: L, value: b, event: I });
|
|
1546
|
-
}
|
|
1547
1544
|
function gt({ index: L, value: b, event: I }) {
|
|
1545
|
+
L !== null && je(L), l("axis-mouseenter", { index: L, value: b, event: I });
|
|
1546
|
+
}
|
|
1547
|
+
function _t({ index: L, value: b, event: I }) {
|
|
1548
1548
|
l("axis-click", { index: L, value: b, event: I });
|
|
1549
1549
|
}
|
|
1550
1550
|
return Y(
|
|
@@ -1553,17 +1553,17 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1553
1553
|
), Y(
|
|
1554
1554
|
a,
|
|
1555
1555
|
(L, b) => l("labels-changed", { newValue: L, oldValue: b })
|
|
1556
|
-
), Y(B, (L) => L && _e(me.Empty), { immediate: !0 }), Y(() => t.hoveredIndex,
|
|
1556
|
+
), Y(B, (L) => L && _e(me.Empty), { immediate: !0 }), Y(() => t.hoveredIndex, ht), Y(
|
|
1557
1557
|
m,
|
|
1558
1558
|
(L) => {
|
|
1559
|
-
L && t.hoveredIndex != null && r.value === -1 &&
|
|
1559
|
+
L && t.hoveredIndex != null && r.value === -1 && ht(t.hoveredIndex);
|
|
1560
1560
|
},
|
|
1561
1561
|
{ flush: "post" }
|
|
1562
1562
|
), Y(A, (L) => {
|
|
1563
|
-
L === !1 &&
|
|
1563
|
+
L === !1 && $e.opened && ft();
|
|
1564
1564
|
}), ye(async () => {
|
|
1565
1565
|
l("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1566
|
-
}),
|
|
1566
|
+
}), Xe("chartID", w), Xe("isEmpty", B), Xe("tooltipAnchorAttributes", m), (L, b) => (_(), K(d(uo), {
|
|
1567
1567
|
id: `lume-chart_${d(w)}`,
|
|
1568
1568
|
ref_key: "chartContainer",
|
|
1569
1569
|
ref: g,
|
|
@@ -1588,7 +1588,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1588
1588
|
G("div", ua, [
|
|
1589
1589
|
k.value ? (_(), $("h3", ra, ae(R.value), 1)) : z("", !0),
|
|
1590
1590
|
S(L.$slots, "legend", { data: d(O) }, () => [
|
|
1591
|
-
d(f).withLegend !== !1 && d(f).legendPosition !== "bottom" ? (_(), K(d(
|
|
1591
|
+
d(f).withLegend !== !1 && d(f).legendPosition !== "bottom" ? (_(), K(d(Tt), {
|
|
1592
1592
|
key: 0,
|
|
1593
1593
|
data: d(O),
|
|
1594
1594
|
class: "lume-chart__legend",
|
|
@@ -1603,7 +1603,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1603
1603
|
]),
|
|
1604
1604
|
footer: V(() => [
|
|
1605
1605
|
H.value ? (_(), $("h3", ca, ae(be.value), 1)) : z("", !0),
|
|
1606
|
-
d(f).withLegend !== !1 && d(f).legendPosition == "bottom" ? (_(), K(d(
|
|
1606
|
+
d(f).withLegend !== !1 && d(f).legendPosition == "bottom" ? (_(), K(d(Tt), {
|
|
1607
1607
|
key: 1,
|
|
1608
1608
|
data: d(O),
|
|
1609
1609
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
@@ -1614,22 +1614,22 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1614
1614
|
}, null, 8, ["data"])) : z("", !0)
|
|
1615
1615
|
]),
|
|
1616
1616
|
extra: V(() => [
|
|
1617
|
-
S(L.$slots, "tooltip", j(d(
|
|
1617
|
+
S(L.$slots, "tooltip", j(d($e), {
|
|
1618
1618
|
data: d(O),
|
|
1619
1619
|
labels: d(N),
|
|
1620
1620
|
title: d(N)[r.value],
|
|
1621
|
-
items: d(
|
|
1622
|
-
position:
|
|
1621
|
+
items: d(Ie)(r.value),
|
|
1622
|
+
position: Ae.value,
|
|
1623
1623
|
withTooltip: d(f).withTooltip !== !1,
|
|
1624
1624
|
hoveredIndex: r.value,
|
|
1625
1625
|
handleMouseEnter: () => A.value = !0,
|
|
1626
1626
|
handleMouseLeave: () => A.value = !1,
|
|
1627
1627
|
options: d(f).tooltipOptions
|
|
1628
1628
|
}), () => [
|
|
1629
|
-
|
|
1630
|
-
position:
|
|
1629
|
+
Ge.value ? (_(), K(d(Eo), j({ key: 0 }, d($e), {
|
|
1630
|
+
position: Ae.value,
|
|
1631
1631
|
title: d(N)[r.value],
|
|
1632
|
-
items: d(
|
|
1632
|
+
items: d(Ie)(r.value),
|
|
1633
1633
|
options: d(f).tooltipOptions,
|
|
1634
1634
|
"data-j-lume-chart__tooltip": "",
|
|
1635
1635
|
onOpened: b[19] || (b[19] = (I) => l("tooltip-opened", {
|
|
@@ -1657,7 +1657,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1657
1657
|
]),
|
|
1658
1658
|
default: V(() => [
|
|
1659
1659
|
y.value ? (_(), $(ee, { key: 0 }, [
|
|
1660
|
-
d(X) ? (_(), K(d(
|
|
1660
|
+
d(X) ? (_(), K(d(dt), j({ key: 0 }, d(Q), {
|
|
1661
1661
|
"class-list": "lume-fill--negative",
|
|
1662
1662
|
transition: !1,
|
|
1663
1663
|
"data-j-lume-chart__negative-values": ""
|
|
@@ -1670,20 +1670,20 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1670
1670
|
options: d(f),
|
|
1671
1671
|
hoveredIndex: r.value
|
|
1672
1672
|
}, () => [
|
|
1673
|
-
|
|
1673
|
+
se(d(At), {
|
|
1674
1674
|
type: "x",
|
|
1675
1675
|
scale: q.value,
|
|
1676
1676
|
"container-size": d(E),
|
|
1677
|
-
options:
|
|
1677
|
+
options: re.value,
|
|
1678
1678
|
"hovered-index": r.value,
|
|
1679
1679
|
orientation: d(c),
|
|
1680
1680
|
"data-j-lume-chart__x-axis": "",
|
|
1681
|
-
onClick:
|
|
1682
|
-
onMouseenter:
|
|
1681
|
+
onClick: _t,
|
|
1682
|
+
onMouseenter: gt,
|
|
1683
1683
|
onMouseleave: b[3] || (b[3] = (I) => l("axis-mouseleave")),
|
|
1684
1684
|
"onLume__internal-AxisSize": b[4] || (b[4] = (I) => x.value = I)
|
|
1685
1685
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1686
|
-
|
|
1686
|
+
se(d(At), {
|
|
1687
1687
|
type: "y",
|
|
1688
1688
|
scale: P.value,
|
|
1689
1689
|
"container-size": d(E),
|
|
@@ -1691,8 +1691,8 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1691
1691
|
"hovered-index": r.value,
|
|
1692
1692
|
orientation: d(c),
|
|
1693
1693
|
"data-j-lume-chart__y-axis": "",
|
|
1694
|
-
onClick:
|
|
1695
|
-
onMouseenter:
|
|
1694
|
+
onClick: _t,
|
|
1695
|
+
onMouseenter: gt,
|
|
1696
1696
|
onMouseleave: b[5] || (b[5] = (I) => l("axis-mouseleave")),
|
|
1697
1697
|
"onLume__internal-AxisSize": b[6] || (b[6] = (I) => T.value = I)
|
|
1698
1698
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
@@ -1704,14 +1704,14 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1704
1704
|
"x-scale": q.value,
|
|
1705
1705
|
"y-scale": P.value,
|
|
1706
1706
|
"data-j-lume-chart__overlay-group": "",
|
|
1707
|
-
"onLume__internal-Hover":
|
|
1707
|
+
"onLume__internal-Hover": je
|
|
1708
1708
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1709
|
-
d(
|
|
1710
|
-
(_(!0), $(ee, null, W(m.value, (I,
|
|
1709
|
+
d(ue) ? (_(), $("g", ia, [
|
|
1710
|
+
(_(!0), $(ee, null, W(m.value, (I, Ue) => (_(), $("circle", j(I, {
|
|
1711
1711
|
ref_for: !0,
|
|
1712
1712
|
ref_key: "tooltipAnchor",
|
|
1713
1713
|
ref: h,
|
|
1714
|
-
key: `anchor_${
|
|
1714
|
+
key: `anchor_${Ue}`,
|
|
1715
1715
|
r: d(Gn),
|
|
1716
1716
|
class: "lume-fill--transparent"
|
|
1717
1717
|
}), null, 16, sa))), 128))
|
|
@@ -1736,7 +1736,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1736
1736
|
onBarClick: b[13] || (b[13] = (I) => l("bar-click", I)),
|
|
1737
1737
|
onLineClick: b[14] || (b[14] = (I) => l("line-click", I)),
|
|
1738
1738
|
onPointClick: b[15] || (b[15] = (I) => l("point-click", I)),
|
|
1739
|
-
"onLume__internal-Hover":
|
|
1739
|
+
"onLume__internal-Hover": je
|
|
1740
1740
|
}, void 0, !0)
|
|
1741
1741
|
], 64)) : z("", !0)
|
|
1742
1742
|
]),
|
|
@@ -1744,7 +1744,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1744
1744
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1745
1745
|
}
|
|
1746
1746
|
});
|
|
1747
|
-
const
|
|
1747
|
+
const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, va = 8, ma = 20, Ee = 2, Dt = 2, pa = ["dy", "dominant-baseline"], fa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
|
|
1748
1748
|
__name: "lume-alluvial-node-label",
|
|
1749
1749
|
props: {
|
|
1750
1750
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1758,14 +1758,14 @@ const we = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Et = 8, v
|
|
|
1758
1758
|
[l, () => t.maxWidth],
|
|
1759
1759
|
async ([i, s]) => {
|
|
1760
1760
|
if (i && s) {
|
|
1761
|
-
u.value = s, await
|
|
1761
|
+
u.value = s, await yt();
|
|
1762
1762
|
const { width: c, height: p } = i.getBoundingClientRect();
|
|
1763
|
-
u.value = c +
|
|
1763
|
+
u.value = c + Dt > s ? s : c + Dt, a.value = Math.ceil(p);
|
|
1764
1764
|
}
|
|
1765
1765
|
},
|
|
1766
1766
|
{ immediate: !0 }
|
|
1767
1767
|
), Y(u, async (i) => {
|
|
1768
|
-
i !== t.maxWidth && (await
|
|
1768
|
+
i !== t.maxWidth && (await yt(), o("lume__internal--node-resize"));
|
|
1769
1769
|
}), (i, s) => e.maxWidth ? (_(), $("foreignObject", {
|
|
1770
1770
|
key: 1,
|
|
1771
1771
|
class: "lume-alluvial-group__node-foreign",
|
|
@@ -1809,7 +1809,7 @@ const _a = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y"
|
|
|
1809
1809
|
}
|
|
1810
1810
|
});
|
|
1811
1811
|
const ba = /* @__PURE__ */ te(ka, [["__scopeId", "data-v-b4fc758b"]]);
|
|
1812
|
-
function
|
|
1812
|
+
function Ht(e, n) {
|
|
1813
1813
|
return {
|
|
1814
1814
|
x0: 0 + (n ? n.left : 0),
|
|
1815
1815
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1818,19 +1818,19 @@ function Dt(e, n) {
|
|
|
1818
1818
|
};
|
|
1819
1819
|
}
|
|
1820
1820
|
function Aa(e) {
|
|
1821
|
-
const n = M(
|
|
1821
|
+
const n = M(Ht(e));
|
|
1822
1822
|
function t(o) {
|
|
1823
|
-
n.value =
|
|
1823
|
+
n.value = Ht(e, o);
|
|
1824
1824
|
}
|
|
1825
1825
|
return { extents: n, updateExtents: t };
|
|
1826
1826
|
}
|
|
1827
|
-
var
|
|
1827
|
+
var qt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(qt || {});
|
|
1828
1828
|
const Ta = "[lume] ";
|
|
1829
1829
|
function La(e, n, t = !0) {
|
|
1830
|
-
t &&
|
|
1830
|
+
t && jt() || console.error(Ta + "Error: " + e, n);
|
|
1831
1831
|
}
|
|
1832
1832
|
const Oa = 200;
|
|
1833
|
-
function
|
|
1833
|
+
function we(e) {
|
|
1834
1834
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1835
1835
|
}
|
|
1836
1836
|
function xa(e, n) {
|
|
@@ -1839,7 +1839,7 @@ function xa(e, n) {
|
|
|
1839
1839
|
function $a(e, n) {
|
|
1840
1840
|
return n.links.find((t) => t.id === e);
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function en(e) {
|
|
1843
1843
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1844
1844
|
}
|
|
1845
1845
|
function Ia(e, n) {
|
|
@@ -1861,15 +1861,15 @@ function Ia(e, n) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
function wa(e) {
|
|
1863
1863
|
return e.map((n) => {
|
|
1864
|
-
const t = n.y1 - n.y0 <
|
|
1864
|
+
const t = n.y1 - n.y0 < Ee;
|
|
1865
1865
|
return {
|
|
1866
1866
|
x: n.x0,
|
|
1867
|
-
y: n.y0 - (t ?
|
|
1867
|
+
y: n.y0 - (t ? Ee / 2 : 0),
|
|
1868
1868
|
// Negative offset to account for the min. height
|
|
1869
1869
|
width: n.x1 - n.x0,
|
|
1870
|
-
height: t ?
|
|
1870
|
+
height: t ? Ee : n.y1 - n.y0,
|
|
1871
1871
|
textTransform: {
|
|
1872
|
-
x: n.depth > 0 ? n.x1 +
|
|
1872
|
+
x: n.depth > 0 ? n.x1 + Nt : n.x0 - Nt,
|
|
1873
1873
|
y: (n.y1 + n.y0) / 2
|
|
1874
1874
|
},
|
|
1875
1875
|
node: n
|
|
@@ -1890,14 +1890,14 @@ function Ha(e) {
|
|
|
1890
1890
|
var t;
|
|
1891
1891
|
return {
|
|
1892
1892
|
id: n.id,
|
|
1893
|
-
color: n.color || ((t = n.source) == null ? void 0 : t.color) ||
|
|
1893
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Ce,
|
|
1894
1894
|
d: Da(n)(n),
|
|
1895
1895
|
strokeWidth: Math.max(1, n.width),
|
|
1896
1896
|
link: n
|
|
1897
1897
|
};
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function Mt(e, n, t, o, l) {
|
|
1901
1901
|
if (o === !1) {
|
|
1902
1902
|
e.node = {
|
|
1903
1903
|
...e.node,
|
|
@@ -1918,7 +1918,7 @@ const Ma = {
|
|
|
1918
1918
|
nodes: [],
|
|
1919
1919
|
links: []
|
|
1920
1920
|
};
|
|
1921
|
-
function
|
|
1921
|
+
function Bt(e, n) {
|
|
1922
1922
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1923
1923
|
}
|
|
1924
1924
|
function Ba(e, n, t) {
|
|
@@ -1928,7 +1928,7 @@ function Ba(e, n, t) {
|
|
|
1928
1928
|
({ label: h, color: g, value: m, deriveColorFromIncomingLinks: A, offset: x }) => ({
|
|
1929
1929
|
label: h || m.toString(),
|
|
1930
1930
|
color: g,
|
|
1931
|
-
fallbackColor: g ||
|
|
1931
|
+
fallbackColor: g || Ce,
|
|
1932
1932
|
id: m,
|
|
1933
1933
|
deriveColorFromIncomingLinks: A,
|
|
1934
1934
|
offset: x
|
|
@@ -1953,18 +1953,18 @@ function Ba(e, n, t) {
|
|
|
1953
1953
|
}
|
|
1954
1954
|
).filter(Boolean).flat();
|
|
1955
1955
|
}
|
|
1956
|
-
), a = v(() => kn().nodeId(
|
|
1956
|
+
), a = v(() => kn().nodeId(we).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1957
1957
|
var r;
|
|
1958
1958
|
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1959
1959
|
(h, g) => {
|
|
1960
|
-
const m =
|
|
1960
|
+
const m = Bt(g, h);
|
|
1961
1961
|
return m ? (m.push(g), m.sort((A, x) => (A._y0 || A.y0) - (x._y0 || x.y0))) : h.push([g]), h;
|
|
1962
1962
|
},
|
|
1963
1963
|
[]
|
|
1964
1964
|
);
|
|
1965
1965
|
});
|
|
1966
1966
|
function s(r) {
|
|
1967
|
-
const { offset: h } = r, g =
|
|
1967
|
+
const { offset: h } = r, g = Bt(r, i.value);
|
|
1968
1968
|
if (!g)
|
|
1969
1969
|
return;
|
|
1970
1970
|
const m = g[g.findIndex((x) => x.id === r.id) - 1], A = m && g.length !== 1 ? m.y1 + h : h;
|
|
@@ -1979,7 +1979,7 @@ function Ba(e, n, t) {
|
|
|
1979
1979
|
x.forEach((O) => O.y0 += f), T.forEach((O) => O.y1 += f);
|
|
1980
1980
|
}
|
|
1981
1981
|
const p = v(() => (o.value && l.value.forEach((r) => {
|
|
1982
|
-
r.value === 0 && (r.fallbackColor =
|
|
1982
|
+
r.value === 0 && (r.fallbackColor = st.Grey), typeof r.offset == "number" && (s(r), c(r, o.value));
|
|
1983
1983
|
}), o.value));
|
|
1984
1984
|
return Y([a, t], () => {
|
|
1985
1985
|
try {
|
|
@@ -1989,21 +1989,21 @@ function Ba(e, n, t) {
|
|
|
1989
1989
|
[g, m]
|
|
1990
1990
|
])({ nodes: l.value, links: u.value });
|
|
1991
1991
|
} catch (r) {
|
|
1992
|
-
La(
|
|
1992
|
+
La(qt.GraphProblem, r), o.value = Ma;
|
|
1993
1993
|
}
|
|
1994
1994
|
}), { columns: i, graph: p };
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function at(e, n) {
|
|
1997
1997
|
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
1998
|
-
n[t.id] = o,
|
|
1998
|
+
n[t.id] = o, at(
|
|
1999
1999
|
t,
|
|
2000
2000
|
n
|
|
2001
2001
|
);
|
|
2002
2002
|
}), n;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function lt(e, n) {
|
|
2005
2005
|
return n || (n = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: t, value: o }) => {
|
|
2006
|
-
n[t.id] = o,
|
|
2006
|
+
n[t.id] = o, lt(
|
|
2007
2007
|
t,
|
|
2008
2008
|
n
|
|
2009
2009
|
);
|
|
@@ -2014,33 +2014,33 @@ function Ra(e, n) {
|
|
|
2014
2014
|
}
|
|
2015
2015
|
const Sa = (e, n) => {
|
|
2016
2016
|
let t;
|
|
2017
|
-
|
|
2017
|
+
en(e) ? t = {
|
|
2018
2018
|
[e.id]: e.value,
|
|
2019
|
-
...
|
|
2020
|
-
...
|
|
2019
|
+
...at(e),
|
|
2020
|
+
...lt(e)
|
|
2021
2021
|
} : t = {
|
|
2022
2022
|
[e.source.id]: e.source.value,
|
|
2023
2023
|
[e.target.id]: e.target.value,
|
|
2024
|
-
...
|
|
2025
|
-
...
|
|
2024
|
+
...at(e.source),
|
|
2025
|
+
...lt(e.target)
|
|
2026
2026
|
};
|
|
2027
2027
|
const o = Ra(t, n);
|
|
2028
2028
|
return { nodes: t, links: o };
|
|
2029
2029
|
}, Ca = (e) => {
|
|
2030
|
-
if (
|
|
2030
|
+
if (en(e)) {
|
|
2031
2031
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2032
2032
|
return {
|
|
2033
2033
|
nodes: n.reduce(
|
|
2034
|
-
(t, { source: o, target: l, value: u }) => o === e ? { ...t, [
|
|
2035
|
-
{ [
|
|
2034
|
+
(t, { source: o, target: l, value: u }) => o === e ? { ...t, [we(l)]: u } : { ...t, [we(o)]: u },
|
|
2035
|
+
{ [we(e)]: e.value }
|
|
2036
2036
|
),
|
|
2037
2037
|
links: n.map(({ id: t }) => t)
|
|
2038
2038
|
};
|
|
2039
2039
|
}
|
|
2040
2040
|
return {
|
|
2041
2041
|
nodes: {
|
|
2042
|
-
[
|
|
2043
|
-
[
|
|
2042
|
+
[we(e.target)]: e.value,
|
|
2043
|
+
[we(e.source)]: e.source.value
|
|
2044
2044
|
},
|
|
2045
2045
|
links: [e.id]
|
|
2046
2046
|
};
|
|
@@ -2053,7 +2053,7 @@ function Ga(e, n, t) {
|
|
|
2053
2053
|
return Y(l, (u, a) => {
|
|
2054
2054
|
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2055
2055
|
e.value.forEach((i) => {
|
|
2056
|
-
i.node.id in a.nodes &&
|
|
2056
|
+
i.node.id in a.nodes && Mt(
|
|
2057
2057
|
i,
|
|
2058
2058
|
a.nodes[i.node.id],
|
|
2059
2059
|
i.node.value,
|
|
@@ -2064,7 +2064,7 @@ function Ga(e, n, t) {
|
|
|
2064
2064
|
return;
|
|
2065
2065
|
}
|
|
2066
2066
|
e.value.forEach((i) => {
|
|
2067
|
-
i.node.id in u.nodes &&
|
|
2067
|
+
i.node.id in u.nodes && Mt(
|
|
2068
2068
|
i,
|
|
2069
2069
|
i.node.value,
|
|
2070
2070
|
u.nodes[i.node.id],
|
|
@@ -2079,7 +2079,7 @@ const ja = {
|
|
|
2079
2079
|
}, Va = { key: 0 }, Pa = ["x", "y"], Fa = { key: 0 }, za = ["id", "x1", "x2"], Wa = ["stop-color"], Za = ["stop-color"], Ua = ["d", "stroke-width", "onClick", "onMouseover"], Xa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ya = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Ka = ["x", "y", "height", "width"], Ja = ["transform", "data-id", "width"], Qa = /* @__PURE__ */ Z({
|
|
2080
2080
|
__name: "lume-alluvial-group",
|
|
2081
2081
|
props: {
|
|
2082
|
-
...
|
|
2082
|
+
...ze(),
|
|
2083
2083
|
hoveredElementId: {
|
|
2084
2084
|
type: [Number, String],
|
|
2085
2085
|
default: null
|
|
@@ -2087,11 +2087,11 @@ const ja = {
|
|
|
2087
2087
|
},
|
|
2088
2088
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2089
2089
|
setup(e, { emit: n }) {
|
|
2090
|
-
const t = e, o = n, l =
|
|
2090
|
+
const t = e, o = n, l = Be("chartID"), { data: u, options: a } = ne(t), i = M([]), s = M([]), c = M(null), { extents: p, updateExtents: r } = Aa(t.containerSize), { columns: h, graph: g } = Ba(u, a, p), { hoveredElement: m, highlightedElements: A } = Ga(
|
|
2091
2091
|
i,
|
|
2092
2092
|
a,
|
|
2093
2093
|
g
|
|
2094
|
-
), x = v(() =>
|
|
2094
|
+
), x = v(() => Ve(a.value.valueFormat)), T = v(
|
|
2095
2095
|
() => Object.keys(A.value.nodes)
|
|
2096
2096
|
), f = v(() => h.value ? h.value.map(
|
|
2097
2097
|
(k) => k[0].x0 + a.value.nodeWidth / 2
|
|
@@ -2106,10 +2106,10 @@ const ja = {
|
|
|
2106
2106
|
), E = v(() => {
|
|
2107
2107
|
if (!(!a.value.gradient || !g.value))
|
|
2108
2108
|
return g.value.links.reduce((k, B) => {
|
|
2109
|
-
const { source: y, target: X } = B, Q = y.color || y.fallbackColor,
|
|
2109
|
+
const { source: y, target: X } = B, Q = y.color || y.fallbackColor, ue = X.deriveColorFromIncomingLinks ? Q : X.color || X.fallbackColor;
|
|
2110
2110
|
return k[B.id] = {
|
|
2111
2111
|
source: Q,
|
|
2112
|
-
target:
|
|
2112
|
+
target: ue,
|
|
2113
2113
|
x1: y.x1,
|
|
2114
2114
|
x2: X.x0
|
|
2115
2115
|
}, k;
|
|
@@ -2120,16 +2120,17 @@ const ja = {
|
|
|
2120
2120
|
), B = [];
|
|
2121
2121
|
return k.forEach((y) => {
|
|
2122
2122
|
const X = [];
|
|
2123
|
-
s.value.filter(({ link: Q }) => Q.target.id === y.node.id).reverse().reduce((Q,
|
|
2124
|
-
const
|
|
2125
|
-
|
|
2123
|
+
s.value.filter(({ link: Q }) => Q.target.id === y.node.id).reverse().reduce((Q, ue, $e, We) => {
|
|
2124
|
+
const Ze = ue.link.target.y1 - ue.link.target.y0 > Ee;
|
|
2125
|
+
let Ie, Ge, Ae;
|
|
2126
|
+
return Ze ? (Ie = ue.link.target.y1 - ue.link.target.y0, Ge = ue.link.value / y.node.value, Ae = Ge * Ie) : (Ie = Ee, Ae = Ee / We.length), X.push({
|
|
2126
2127
|
x: y.x,
|
|
2127
2128
|
y: y.y + Q,
|
|
2128
|
-
height:
|
|
2129
|
+
height: Ae,
|
|
2129
2130
|
width: y.width,
|
|
2130
|
-
key: `node-block-${y.node.id}-source-link-${
|
|
2131
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2132
|
-
}), Q +
|
|
2131
|
+
key: `node-block-${y.node.id}-source-link-${ue.link.source.id}`,
|
|
2132
|
+
class: `lume-alluvial-group__node-block lume-fill--${ue.link.source.color || Ce}`
|
|
2133
|
+
}), Q + Ae;
|
|
2133
2134
|
}, 0), B.push({
|
|
2134
2135
|
id: y.node.id,
|
|
2135
2136
|
subNodes: X
|
|
@@ -2154,7 +2155,7 @@ const ja = {
|
|
|
2154
2155
|
function P(k) {
|
|
2155
2156
|
return !k.node.color && k.node.deriveColorFromIncomingLinks;
|
|
2156
2157
|
}
|
|
2157
|
-
function
|
|
2158
|
+
function re(k, B) {
|
|
2158
2159
|
k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event: B }));
|
|
2159
2160
|
}
|
|
2160
2161
|
function xe(k) {
|
|
@@ -2226,7 +2227,7 @@ const ja = {
|
|
|
2226
2227
|
"stroke-width": y.strokeWidth + d(va),
|
|
2227
2228
|
"data-j-alluvial-ghost": "",
|
|
2228
2229
|
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2229
|
-
onMouseover: (X) =>
|
|
2230
|
+
onMouseover: (X) => re(y.link, X)
|
|
2230
2231
|
}, null, 40, Ua))), 128)),
|
|
2231
2232
|
(_(!0), $(ee, null, W(s.value, (y) => (_(), $("path", {
|
|
2232
2233
|
key: `link_${y.id}`,
|
|
@@ -2243,7 +2244,7 @@ const ja = {
|
|
|
2243
2244
|
"data-j-alluvial-path": "",
|
|
2244
2245
|
"data-id": y.id,
|
|
2245
2246
|
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2246
|
-
onMouseover: (X) =>
|
|
2247
|
+
onMouseover: (X) => re(y.link, X)
|
|
2247
2248
|
}, null, 42, Xa))), 128))
|
|
2248
2249
|
], 32),
|
|
2249
2250
|
(_(!0), $(ee, null, W(i.value, (y, X) => (_(), $("g", {
|
|
@@ -2292,7 +2293,7 @@ const ja = {
|
|
|
2292
2293
|
y.node.value
|
|
2293
2294
|
)
|
|
2294
2295
|
}, () => [
|
|
2295
|
-
|
|
2296
|
+
se(d(_a), {
|
|
2296
2297
|
bottom: d(a).switchText,
|
|
2297
2298
|
left: y.node.depth === 0,
|
|
2298
2299
|
"max-width": d(a).nodeLabelMaxWidth,
|
|
@@ -2303,7 +2304,7 @@ const ja = {
|
|
|
2303
2304
|
]),
|
|
2304
2305
|
_: 2
|
|
2305
2306
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2306
|
-
|
|
2307
|
+
se(d(ba), {
|
|
2307
2308
|
bottom: !d(a).switchText
|
|
2308
2309
|
}, {
|
|
2309
2310
|
default: V(() => [
|
|
@@ -2321,7 +2322,7 @@ const ja = {
|
|
|
2321
2322
|
]));
|
|
2322
2323
|
}
|
|
2323
2324
|
});
|
|
2324
|
-
const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-
|
|
2325
|
+
const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
|
|
2325
2326
|
margins: {
|
|
2326
2327
|
top: 0,
|
|
2327
2328
|
right: 0,
|
|
@@ -2343,10 +2344,10 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
|
2343
2344
|
}, Vl = /* @__PURE__ */ Z({
|
|
2344
2345
|
__name: "lume-alluvial-diagram",
|
|
2345
2346
|
props: {
|
|
2346
|
-
...Fo(
|
|
2347
|
+
...Fo(ut)
|
|
2347
2348
|
},
|
|
2348
2349
|
setup(e, { emit: n }) {
|
|
2349
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(
|
|
2350
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), u = Hn(ie()), { options: a } = ne(t), { allOptions: i } = pe(a, el);
|
|
2350
2351
|
function s(c) {
|
|
2351
2352
|
return {
|
|
2352
2353
|
...c,
|
|
@@ -2354,12 +2355,12 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
|
2354
2355
|
// Alluvial chart never uses base scales
|
|
2355
2356
|
};
|
|
2356
2357
|
}
|
|
2357
|
-
return (c, p) => (_(), K(d(
|
|
2358
|
+
return (c, p) => (_(), K(d(De), j(t, {
|
|
2358
2359
|
options: s(d(i)),
|
|
2359
2360
|
"data-j-alluvial-diagram": ""
|
|
2360
2361
|
}, le(d(o))), de({
|
|
2361
2362
|
groups: V((r) => [
|
|
2362
|
-
|
|
2363
|
+
se(d(qa), j(r, { "hovered-element-id": c.hoveredElement }, le(d(o))), de({ _: 2 }, [
|
|
2363
2364
|
W(d(u), (h, g) => ({
|
|
2364
2365
|
name: g,
|
|
2365
2366
|
fn: V((m) => [
|
|
@@ -2379,29 +2380,29 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
|
2379
2380
|
]), 1040, ["options"]));
|
|
2380
2381
|
}
|
|
2381
2382
|
});
|
|
2382
|
-
var
|
|
2383
|
+
var tn = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(tn || {});
|
|
2383
2384
|
const Pl = /* @__PURE__ */ Z({
|
|
2384
2385
|
__name: "lume-bar-chart",
|
|
2385
2386
|
props: {
|
|
2386
|
-
...
|
|
2387
|
+
...Ne(),
|
|
2387
2388
|
type: {
|
|
2388
2389
|
type: String,
|
|
2389
2390
|
default: null,
|
|
2390
|
-
validator: (e) => e in
|
|
2391
|
+
validator: (e) => e in tn || e == null
|
|
2391
2392
|
}
|
|
2392
2393
|
},
|
|
2393
2394
|
setup(e, { emit: n }) {
|
|
2394
|
-
const t =
|
|
2395
|
+
const t = Ye(
|
|
2395
2396
|
() => import("./common/42f5d2fc.js")
|
|
2396
|
-
), o =
|
|
2397
|
+
), o = Ye(
|
|
2397
2398
|
() => import("./common/abc9d23d.js")
|
|
2398
|
-
), l =
|
|
2399
|
+
), l = Ye(
|
|
2399
2400
|
() => import("./common/0664fd4d.js")
|
|
2400
2401
|
), u = /* @__PURE__ */ new Map([
|
|
2401
2402
|
["single", t],
|
|
2402
2403
|
["grouped", o],
|
|
2403
2404
|
["stacked", l]
|
|
2404
|
-
]), a = e, { componentEventPropagator: i } = ke(), s = Oe(
|
|
2405
|
+
]), a = e, { componentEventPropagator: i } = ke(), s = Oe(ie());
|
|
2405
2406
|
function c(r) {
|
|
2406
2407
|
return {
|
|
2407
2408
|
...r,
|
|
@@ -2415,7 +2416,7 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2415
2416
|
}
|
|
2416
2417
|
const p = v(() => {
|
|
2417
2418
|
if (a.data) {
|
|
2418
|
-
if (
|
|
2419
|
+
if (ut(a.data))
|
|
2419
2420
|
return u.get("single");
|
|
2420
2421
|
if (!a.type)
|
|
2421
2422
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
@@ -2454,12 +2455,12 @@ const ol = (e = !1) => ({
|
|
|
2454
2455
|
}
|
|
2455
2456
|
} : {}
|
|
2456
2457
|
});
|
|
2457
|
-
function
|
|
2458
|
+
function nn(e, n) {
|
|
2458
2459
|
const t = v(() => e.value.map((l) => {
|
|
2459
2460
|
var u;
|
|
2460
2461
|
return {
|
|
2461
2462
|
...l,
|
|
2462
|
-
values:
|
|
2463
|
+
values: rt(
|
|
2463
2464
|
l.values,
|
|
2464
2465
|
((u = n == null ? void 0 : n.value) == null ? void 0 : u.length) ?? 0
|
|
2465
2466
|
).map((a) => ({
|
|
@@ -2503,7 +2504,7 @@ function ul(e, n, t, o, l, u) {
|
|
|
2503
2504
|
return a.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2504
2505
|
}
|
|
2505
2506
|
function p(r, h, g) {
|
|
2506
|
-
const { value: m, color: A } = r, x = A ?? e.value[h].color ??
|
|
2507
|
+
const { value: m, color: A } = r, x = A ?? e.value[h].color ?? Ce, { x: T, y: f } = i(m, g), O = s(m), N = c(m);
|
|
2507
2508
|
return {
|
|
2508
2509
|
classList: [`lume-fill--${x}`, ...u],
|
|
2509
2510
|
x: T,
|
|
@@ -2519,7 +2520,7 @@ function ul(e, n, t, o, l, u) {
|
|
|
2519
2520
|
function rl(e, n, t, o, l, u) {
|
|
2520
2521
|
const a = v(
|
|
2521
2522
|
() => o.value === D.HORIZONTAL
|
|
2522
|
-
), i = v(() =>
|
|
2523
|
+
), i = v(() => He().domain(e.value.map((m, A) => A)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => He().domain(e.value.map((m, A) => A)).range([0, t.value.bandwidth()]).padding(0));
|
|
2523
2524
|
function c(m, A, x) {
|
|
2524
2525
|
if (a.value)
|
|
2525
2526
|
return m >= 0 ? n.value(0) : n.value(m);
|
|
@@ -2540,7 +2541,7 @@ function rl(e, n, t, o, l, u) {
|
|
|
2540
2541
|
return a.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2541
2542
|
}
|
|
2542
2543
|
function g(m, A, x) {
|
|
2543
|
-
const { value: T, color: f } = m, O = f ?? e.value[A].color ?? Object.values(
|
|
2544
|
+
const { value: T, color: f } = m, O = f ?? e.value[A].color ?? Object.values(ce)[A], N = c(T, x, A), E = p(T, x, A), F = r(T), w = h(T);
|
|
2544
2545
|
return {
|
|
2545
2546
|
classList: [`lume-fill--${O}`, ...u],
|
|
2546
2547
|
x: N,
|
|
@@ -2571,9 +2572,9 @@ function il(e, n, t) {
|
|
|
2571
2572
|
return Math.max(...s);
|
|
2572
2573
|
});
|
|
2573
2574
|
function a(s, c, p) {
|
|
2574
|
-
return o.value ?
|
|
2575
|
-
|
|
2576
|
-
|
|
2575
|
+
return o.value ? Me().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
|
|
2576
|
+
wt(
|
|
2577
|
+
He().domain(c.map((r, h) => h)).range([0, p.width]),
|
|
2577
2578
|
n.value,
|
|
2578
2579
|
t.value
|
|
2579
2580
|
),
|
|
@@ -2582,13 +2583,13 @@ function il(e, n, t) {
|
|
|
2582
2583
|
}
|
|
2583
2584
|
function i(s, c, p) {
|
|
2584
2585
|
return o.value ? Object.assign(
|
|
2585
|
-
|
|
2586
|
-
|
|
2586
|
+
wt(
|
|
2587
|
+
He().domain(c.map((r, h) => h)).range([0, p.height]),
|
|
2587
2588
|
n.value,
|
|
2588
2589
|
t.value
|
|
2589
2590
|
),
|
|
2590
2591
|
{ labels: c }
|
|
2591
|
-
) :
|
|
2592
|
+
) : Me().domain([u.value, l.value]).range([0, p.height]);
|
|
2592
2593
|
}
|
|
2593
2594
|
return { stackedXScaleGenerator: a, stackedYScaleGenerator: i };
|
|
2594
2595
|
}
|
|
@@ -2625,7 +2626,7 @@ function sl(e, n, t, o, l, u) {
|
|
|
2625
2626
|
function x(T, f, O) {
|
|
2626
2627
|
const { value: N, color: E } = T, F = N >= 0 ? p(N) : r(N), w = N >= 0 ? h(N) : g(N), C = N >= 0 ? m(f, O) : A(f, O), { x: J, y: U } = c(N, O, C);
|
|
2627
2628
|
return {
|
|
2628
|
-
classList: [`lume-fill--${E ?? e.value[f].color ?? Object.values(
|
|
2629
|
+
classList: [`lume-fill--${E ?? e.value[f].color ?? Object.values(ce)[f]}`, ...u],
|
|
2629
2630
|
width: F,
|
|
2630
2631
|
height: w,
|
|
2631
2632
|
x: J,
|
|
@@ -2643,10 +2644,10 @@ const cl = {
|
|
|
2643
2644
|
single: ul,
|
|
2644
2645
|
grouped: rl,
|
|
2645
2646
|
stacked: sl
|
|
2646
|
-
},
|
|
2647
|
+
}, pt = /* @__PURE__ */ Z({
|
|
2647
2648
|
__name: "lume-bar-group",
|
|
2648
2649
|
props: {
|
|
2649
|
-
...
|
|
2650
|
+
...ze(),
|
|
2650
2651
|
classList: {
|
|
2651
2652
|
type: [String, Array],
|
|
2652
2653
|
default: () => []
|
|
@@ -2670,8 +2671,8 @@ const cl = {
|
|
|
2670
2671
|
classList: r,
|
|
2671
2672
|
labels: h
|
|
2672
2673
|
} = ne(t);
|
|
2673
|
-
|
|
2674
|
-
const { emitInternalEvent: g } = ke(), { groupedData: m } =
|
|
2674
|
+
Be("chartID");
|
|
2675
|
+
const { emitInternalEvent: g } = ke(), { groupedData: m } = nn(l, h), { barXScale: A, barYScale: x } = ll(c, p, a), T = v(() => typeof r.value == "string" ? [r.value] : r.value), f = v(() => {
|
|
2675
2676
|
const E = al(l, s), { barAttributeGenerator: F } = vl[E](
|
|
2676
2677
|
l,
|
|
2677
2678
|
A,
|
|
@@ -2693,7 +2694,7 @@ const cl = {
|
|
|
2693
2694
|
key: C,
|
|
2694
2695
|
onMouseenter: (J) => N(C)
|
|
2695
2696
|
}, [
|
|
2696
|
-
(_(!0), $(ee, null, W(w, (J, U) => (_(), K(d(
|
|
2697
|
+
(_(!0), $(ee, null, W(w, (J, U) => (_(), K(d(dt), j(f.value(J, U, C, w), {
|
|
2697
2698
|
key: `bar-${U}`,
|
|
2698
2699
|
transition: O.value,
|
|
2699
2700
|
"data-j-lume-bar": "",
|
|
@@ -2722,20 +2723,20 @@ const cl = {
|
|
|
2722
2723
|
}, Fl = /* @__PURE__ */ Z({
|
|
2723
2724
|
__name: "lume-single-bar-chart",
|
|
2724
2725
|
props: {
|
|
2725
|
-
...
|
|
2726
|
+
...Ne(ut)
|
|
2726
2727
|
},
|
|
2727
2728
|
setup(e, { emit: n }) {
|
|
2728
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(
|
|
2729
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
|
|
2729
2730
|
() => ml[u.value || D.VERTICAL]
|
|
2730
2731
|
// needs to be computed so that default options are reactive
|
|
2731
2732
|
), { allOptions: s } = pe(a, i);
|
|
2732
|
-
return (c, p) => (_(), K(d(
|
|
2733
|
+
return (c, p) => (_(), K(d(De), j(t, {
|
|
2733
2734
|
"chart-type": "single-bar",
|
|
2734
2735
|
options: d(s),
|
|
2735
2736
|
"data-j-single-bar-chart": ""
|
|
2736
2737
|
}, le(d(o))), de({
|
|
2737
2738
|
groups: V((r) => [
|
|
2738
|
-
|
|
2739
|
+
se(d(pt), j(r, { orientation: d(u) }, le(d(o))), null, 16, ["orientation"])
|
|
2739
2740
|
]),
|
|
2740
2741
|
_: 2
|
|
2741
2742
|
}, [
|
|
@@ -2764,23 +2765,23 @@ const cl = {
|
|
|
2764
2765
|
}, zl = /* @__PURE__ */ Z({
|
|
2765
2766
|
__name: "lume-grouped-bar-chart",
|
|
2766
2767
|
props: {
|
|
2767
|
-
...
|
|
2768
|
+
...Ne()
|
|
2768
2769
|
},
|
|
2769
2770
|
setup(e, { emit: n }) {
|
|
2770
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(
|
|
2771
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
|
|
2771
2772
|
() => pl[u.value || D.VERTICAL]
|
|
2772
2773
|
// needs to be computed so that default options are reactive
|
|
2773
2774
|
), { allOptions: s } = pe(
|
|
2774
2775
|
a,
|
|
2775
2776
|
i
|
|
2776
2777
|
);
|
|
2777
|
-
return (c, p) => (_(), K(d(
|
|
2778
|
+
return (c, p) => (_(), K(d(De), j(t, {
|
|
2778
2779
|
"chart-type": "grouped-bar",
|
|
2779
2780
|
options: d(s),
|
|
2780
2781
|
"data-j-grouped-bar-chart": ""
|
|
2781
2782
|
}, le(d(o))), de({
|
|
2782
2783
|
groups: V((r) => [
|
|
2783
|
-
|
|
2784
|
+
se(d(pt), j(r, { type: "grouped" }, le(d(o))), null, 16)
|
|
2784
2785
|
]),
|
|
2785
2786
|
_: 2
|
|
2786
2787
|
}, [
|
|
@@ -2809,21 +2810,21 @@ const cl = {
|
|
|
2809
2810
|
}, Wl = /* @__PURE__ */ Z({
|
|
2810
2811
|
__name: "lume-stacked-bar-chart",
|
|
2811
2812
|
props: {
|
|
2812
|
-
...
|
|
2813
|
+
...Ne()
|
|
2813
2814
|
},
|
|
2814
2815
|
setup(e, { emit: n }) {
|
|
2815
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(
|
|
2816
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { data: u, orientation: a, options: i, labels: s } = ne(t), c = v(
|
|
2816
2817
|
() => fl[a.value || D.VERTICAL]
|
|
2817
2818
|
// needs to be computed so that default options are reactive
|
|
2818
2819
|
), { allOptions: p } = pe(
|
|
2819
2820
|
i,
|
|
2820
2821
|
c
|
|
2821
|
-
), { internalData: r } =
|
|
2822
|
+
), { internalData: r } = mt(u), { groupedData: h } = nn(r, s), { stackedXScaleGenerator: g, stackedYScaleGenerator: m } = il(
|
|
2822
2823
|
h,
|
|
2823
2824
|
a,
|
|
2824
2825
|
i
|
|
2825
2826
|
);
|
|
2826
|
-
return (A, x) => (_(), K(d(
|
|
2827
|
+
return (A, x) => (_(), K(d(De), j(t, {
|
|
2827
2828
|
"chart-type": "stacked-bar",
|
|
2828
2829
|
options: d(p),
|
|
2829
2830
|
"x-scale": d(g),
|
|
@@ -2831,7 +2832,7 @@ const cl = {
|
|
|
2831
2832
|
"data-j-stacked-bar-chart": ""
|
|
2832
2833
|
}, le(d(o))), de({
|
|
2833
2834
|
groups: V((T) => [
|
|
2834
|
-
|
|
2835
|
+
se(d(pt), j(T, { type: "stacked" }, le(d(o))), null, 16)
|
|
2835
2836
|
]),
|
|
2836
2837
|
_: 2
|
|
2837
2838
|
}, [
|
|
@@ -2856,7 +2857,7 @@ const cl = {
|
|
|
2856
2857
|
},
|
|
2857
2858
|
color: {
|
|
2858
2859
|
type: String,
|
|
2859
|
-
default:
|
|
2860
|
+
default: ce.Skyblue
|
|
2860
2861
|
},
|
|
2861
2862
|
dashed: {
|
|
2862
2863
|
type: Boolean,
|
|
@@ -2878,7 +2879,7 @@ const cl = {
|
|
|
2878
2879
|
emits: ["click"],
|
|
2879
2880
|
setup(e, { emit: n }) {
|
|
2880
2881
|
const t = n, o = M(null);
|
|
2881
|
-
return ye(() =>
|
|
2882
|
+
return ye(() => Fe(o.value)), (l, u) => (_(), $("path", {
|
|
2882
2883
|
ref_key: "root",
|
|
2883
2884
|
ref: o,
|
|
2884
2885
|
class: oe(["lume-line", {
|
|
@@ -2888,7 +2889,7 @@ const cl = {
|
|
|
2888
2889
|
}]),
|
|
2889
2890
|
d: e.pathDefinition,
|
|
2890
2891
|
"stroke-width": e.width,
|
|
2891
|
-
style:
|
|
2892
|
+
style: St({
|
|
2892
2893
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2893
2894
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2894
2895
|
}),
|
|
@@ -2904,7 +2905,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2904
2905
|
y: { type: Number, required: !0 },
|
|
2905
2906
|
color: {
|
|
2906
2907
|
type: String,
|
|
2907
|
-
default:
|
|
2908
|
+
default: ce.Skyblue
|
|
2908
2909
|
},
|
|
2909
2910
|
radius: {
|
|
2910
2911
|
type: Number,
|
|
@@ -2918,7 +2919,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2918
2919
|
emits: ["click"],
|
|
2919
2920
|
setup(e, { emit: n }) {
|
|
2920
2921
|
const t = e, o = n, l = M(null), u = v(() => t.radius / 2);
|
|
2921
|
-
return ye(() =>
|
|
2922
|
+
return ye(() => Fe(l.value)), (a, i) => (_(), $("circle", {
|
|
2922
2923
|
ref_key: "root",
|
|
2923
2924
|
ref: l,
|
|
2924
2925
|
class: oe(["lume-point", `lume-stroke--${e.color}`]),
|
|
@@ -2932,7 +2933,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2932
2933
|
}
|
|
2933
2934
|
});
|
|
2934
2935
|
const Tl = /* @__PURE__ */ te(Al, [["__scopeId", "data-v-b6745177"]]);
|
|
2935
|
-
function
|
|
2936
|
+
function on(e) {
|
|
2936
2937
|
function n(u) {
|
|
2937
2938
|
let a = null;
|
|
2938
2939
|
return u == null ? void 0 : u.reduce((i, s, c) => (s == null || s.value == null ? (a ? a.push(c) : a = [c], c === (u == null ? void 0 : u.length) - 1 && i.push(a)) : a && (i.push(a), a = null), i), []);
|
|
@@ -2968,7 +2969,7 @@ function nn(e) {
|
|
|
2968
2969
|
c.length,
|
|
2969
2970
|
c.indexOf(s)
|
|
2970
2971
|
),
|
|
2971
|
-
label:
|
|
2972
|
+
label: zt
|
|
2972
2973
|
};
|
|
2973
2974
|
}
|
|
2974
2975
|
return i;
|
|
@@ -2998,7 +2999,7 @@ const $l = {
|
|
|
2998
2999
|
}, El = 1, Nl = /* @__PURE__ */ Z({
|
|
2999
3000
|
__name: "lume-line-group",
|
|
3000
3001
|
props: {
|
|
3001
|
-
...
|
|
3002
|
+
...ze(),
|
|
3002
3003
|
withPoints: {
|
|
3003
3004
|
type: Boolean,
|
|
3004
3005
|
default: !0
|
|
@@ -3010,10 +3011,10 @@ const $l = {
|
|
|
3010
3011
|
},
|
|
3011
3012
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3012
3013
|
setup(e, { emit: n }) {
|
|
3013
|
-
const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c =
|
|
3014
|
+
const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c = Be(
|
|
3014
3015
|
"tooltipAnchorAttributes",
|
|
3015
3016
|
null
|
|
3016
|
-
), { updateTooltipAnchorAttributes: p } =
|
|
3017
|
+
), { updateTooltipAnchorAttributes: p } = Qt(
|
|
3017
3018
|
c,
|
|
3018
3019
|
u,
|
|
3019
3020
|
a,
|
|
@@ -3022,7 +3023,7 @@ const $l = {
|
|
|
3022
3023
|
), r = v(() => {
|
|
3023
3024
|
if (l.value.every((C) => C.isDashed))
|
|
3024
3025
|
return l.value;
|
|
3025
|
-
const { computedLineData: w } =
|
|
3026
|
+
const { computedLineData: w } = on(l);
|
|
3026
3027
|
return u.value.withTooltip !== !1 && (c != null && c.value) && p(w.value), w.value;
|
|
3027
3028
|
}), h = v(() => {
|
|
3028
3029
|
if (t.hoveredIndex === -1)
|
|
@@ -3032,7 +3033,7 @@ const $l = {
|
|
|
3032
3033
|
t.hoveredIndex
|
|
3033
3034
|
);
|
|
3034
3035
|
return {
|
|
3035
|
-
d: `M ${
|
|
3036
|
+
d: `M ${qe(a.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3036
3037
|
V ${i.value(w)}`
|
|
3037
3038
|
// Move to X index, Vertical line to the highest point
|
|
3038
3039
|
};
|
|
@@ -3100,7 +3101,7 @@ const $l = {
|
|
|
3100
3101
|
"path-definition": O(P, U),
|
|
3101
3102
|
transition: e.transition,
|
|
3102
3103
|
width: d(u).lineWidth,
|
|
3103
|
-
onClick: (
|
|
3104
|
+
onClick: (re) => o("line-click", { index: P, datasetIndex: U, event: re })
|
|
3104
3105
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3105
3106
|
]),
|
|
3106
3107
|
T.value ? (_(), $("g", wl, [
|
|
@@ -3110,14 +3111,14 @@ const $l = {
|
|
|
3110
3111
|
color: J.color,
|
|
3111
3112
|
index: P,
|
|
3112
3113
|
radius: m.value,
|
|
3113
|
-
onClick: (
|
|
3114
|
+
onClick: (re) => o("point-click", { index: P, datasetIndex: U, event: re })
|
|
3114
3115
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3115
3116
|
])) : z("", !0)
|
|
3116
3117
|
]))), 128))
|
|
3117
3118
|
]));
|
|
3118
3119
|
}
|
|
3119
3120
|
});
|
|
3120
|
-
const
|
|
3121
|
+
const an = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-649a5210"]]), Dl = {
|
|
3121
3122
|
margins: Le.VERTICAL,
|
|
3122
3123
|
startOnZero: !0,
|
|
3123
3124
|
withTooltip: !0,
|
|
@@ -3126,17 +3127,17 @@ const on = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-649a5210"]]), Dl = {
|
|
|
3126
3127
|
}, Zl = /* @__PURE__ */ Z({
|
|
3127
3128
|
__name: "lume-line-chart",
|
|
3128
3129
|
props: {
|
|
3129
|
-
...
|
|
3130
|
+
...Ne(null, !1)
|
|
3130
3131
|
},
|
|
3131
3132
|
setup(e, { emit: n }) {
|
|
3132
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(
|
|
3133
|
-
return (i, s) => (_(), K(d(
|
|
3133
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { options: u } = ne(t), { allOptions: a } = pe(u, Dl);
|
|
3134
|
+
return (i, s) => (_(), K(d(De), j(t, {
|
|
3134
3135
|
"chart-type": "line",
|
|
3135
3136
|
options: d(a),
|
|
3136
3137
|
"data-j-lume-line-chart": ""
|
|
3137
3138
|
}, le(d(o))), de({
|
|
3138
3139
|
groups: V((c) => [
|
|
3139
|
-
|
|
3140
|
+
se(d(an), j(c, le(d(o))), null, 16)
|
|
3140
3141
|
]),
|
|
3141
3142
|
_: 2
|
|
3142
3143
|
}, [
|
|
@@ -3176,11 +3177,11 @@ const Ml = {
|
|
|
3176
3177
|
}, Bl = ["d"], Rl = /* @__PURE__ */ Z({
|
|
3177
3178
|
__name: "lume-sparkline-chart",
|
|
3178
3179
|
props: {
|
|
3179
|
-
...
|
|
3180
|
-
...
|
|
3180
|
+
...vt(null),
|
|
3181
|
+
...Re()
|
|
3181
3182
|
},
|
|
3182
3183
|
setup(e, { expose: n, emit: t }) {
|
|
3183
|
-
const o = e, { componentEventPropagator: l } = ke(), u = Oe(
|
|
3184
|
+
const o = e, { componentEventPropagator: l } = ke(), u = Oe(ie()), { data: a, options: i } = ne(o), { internalData: s } = mt(a), { allOptions: c } = pe(i, Ml), { computedLineData: p } = on(s), { areaPathDefinition: r } = Hl(p), h = v(() => s.value[0].color), g = v(
|
|
3184
3185
|
() => a.value[0].areaColor || h.value
|
|
3185
3186
|
);
|
|
3186
3187
|
function m(x) {
|
|
@@ -3190,11 +3191,11 @@ const Ml = {
|
|
|
3190
3191
|
};
|
|
3191
3192
|
}
|
|
3192
3193
|
function A(x, T, f) {
|
|
3193
|
-
return
|
|
3194
|
+
return Me().range([0, f.width]).domain([0, x[0].values.length - 1]);
|
|
3194
3195
|
}
|
|
3195
3196
|
return n({
|
|
3196
3197
|
areaPathDefinition: r
|
|
3197
|
-
}), (x, T) => (_(), K(d(
|
|
3198
|
+
}), (x, T) => (_(), K(d(De), j(o, {
|
|
3198
3199
|
"chart-type": "line",
|
|
3199
3200
|
options: m(d(c)),
|
|
3200
3201
|
"x-scale": A
|
|
@@ -3211,7 +3212,7 @@ const Ml = {
|
|
|
3211
3212
|
d: d(r)(f.xScale, f.yScale),
|
|
3212
3213
|
"data-j-sparkline__area": ""
|
|
3213
3214
|
}, null, 10, Bl)) : z("", !0),
|
|
3214
|
-
|
|
3215
|
+
se(d(an), j(f, { "with-points": !1 }, le(d(l))), null, 16)
|
|
3215
3216
|
]),
|
|
3216
3217
|
_: 2
|
|
3217
3218
|
}, [
|
|
@@ -3230,17 +3231,17 @@ export {
|
|
|
3230
3231
|
qa as LumeAlluvialGroup,
|
|
3231
3232
|
_a as LumeAlluvialNodeLabel,
|
|
3232
3233
|
ba as LumeAlluvialNodeValue,
|
|
3233
|
-
|
|
3234
|
-
|
|
3234
|
+
At as LumeAxis,
|
|
3235
|
+
dt as LumeBar,
|
|
3235
3236
|
Pl as LumeBarChart,
|
|
3236
|
-
|
|
3237
|
-
|
|
3237
|
+
pt as LumeBarGroup,
|
|
3238
|
+
De as LumeChart,
|
|
3238
3239
|
uo as LumeChartContainer,
|
|
3239
|
-
|
|
3240
|
+
Tt as LumeChartLegend,
|
|
3240
3241
|
zl as LumeGroupedBarChart,
|
|
3241
3242
|
yl as LumeLine,
|
|
3242
3243
|
Zl as LumeLineChart,
|
|
3243
|
-
|
|
3244
|
+
an as LumeLineGroup,
|
|
3244
3245
|
Wo as LumeOverlayGroup,
|
|
3245
3246
|
Tl as LumePoint,
|
|
3246
3247
|
Fl as LumeSingleBarChart,
|