@adyen/lume 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 H, ref as O, isRef as
|
|
2
|
-
import { format as Vt, ticks as Mt, scaleBand as
|
|
1
|
+
import { defineComponent as H, ref as O, isRef as gt, computed as v, watch as C, toRefs as B, inject as pe, reactive as Ae, onMounted as te, onBeforeUnmount as yt, watchEffect as bt, useSlots as z, provide as Ee, nextTick as et, defineAsyncComponent as we } from "vue";
|
|
2
|
+
import { format as Vt, ticks as Mt, scaleBand as _e, scaleLinear as fe, link as zt, line as Wt, area as Zt } from "d3";
|
|
3
3
|
import { createPopper as Xt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as Ut, sankey as Yt, sankeyJustify as Kt } from "d3-sankey";
|
|
5
5
|
const Jt = /* @__PURE__ */ H({
|
|
@@ -101,15 +101,15 @@ const tn = en.exports, nn = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function kt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function xt(t) {
|
|
108
108
|
return (t == null ? void 0 : t.map(
|
|
109
109
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
110
110
|
).flat()) || [];
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Me(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
115
|
function rn(t) {
|
|
@@ -117,17 +117,17 @@ function rn(t) {
|
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Ne(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Tt(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, o]) => {
|
|
126
|
-
r[n] =
|
|
126
|
+
r[n] = Ne(t[n]) && Ne(o) ? Tt(t[n], o) : o;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function on(t) {
|
|
130
|
-
return t != null &&
|
|
130
|
+
return t != null && Ne(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function Y(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
@@ -153,8 +153,8 @@ function un(t, e) {
|
|
|
153
153
|
}
|
|
154
154
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
const e =
|
|
156
|
+
function He(t) {
|
|
157
|
+
const e = gt(t) ? t.value : t;
|
|
158
158
|
if (!e)
|
|
159
159
|
throw new Error("No empty array can be created from specified data value");
|
|
160
160
|
const r = Math.max(
|
|
@@ -195,7 +195,7 @@ const _n = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
|
195
195
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
196
196
|
""
|
|
197
197
|
);
|
|
198
|
-
function
|
|
198
|
+
function ze(t, e) {
|
|
199
199
|
const r = e - t.length;
|
|
200
200
|
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
201
201
|
}
|
|
@@ -203,9 +203,9 @@ var K = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recomm
|
|
|
203
203
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(K || {});
|
|
204
204
|
const fn = "[lume] ";
|
|
205
205
|
function ee(t, e = !0) {
|
|
206
|
-
e &&
|
|
206
|
+
e && kt() || console.warn(fn + "Warning: " + t);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const Te = (t) => {
|
|
209
209
|
let e = null;
|
|
210
210
|
switch (typeof t) {
|
|
211
211
|
case "string":
|
|
@@ -225,7 +225,7 @@ const ye = (t) => {
|
|
|
225
225
|
return e ? e(...n) : n[0];
|
|
226
226
|
}
|
|
227
227
|
return r;
|
|
228
|
-
},
|
|
228
|
+
}, me = () => ({
|
|
229
229
|
options: {
|
|
230
230
|
type: Object,
|
|
231
231
|
default: () => ({})
|
|
@@ -233,8 +233,8 @@ const ye = (t) => {
|
|
|
233
233
|
});
|
|
234
234
|
function J(t, e) {
|
|
235
235
|
return { allOptions: v(() => {
|
|
236
|
-
const n =
|
|
237
|
-
return n ?
|
|
236
|
+
const n = gt(e) ? e == null ? void 0 : e.value : e;
|
|
237
|
+
return n ? Tt(n, t.value) : t.value;
|
|
238
238
|
}) };
|
|
239
239
|
}
|
|
240
240
|
const pn = 0.2;
|
|
@@ -260,7 +260,7 @@ function mn(t, e, r) {
|
|
|
260
260
|
}
|
|
261
261
|
return C(e, l), { showTick: i };
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var W = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(W || {}), At = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(At || {}), We = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(We || {}), Ze = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(Ze || {}), Xe = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(Xe || {});
|
|
264
264
|
const L = {
|
|
265
265
|
HORIZONTAL: "horizontal",
|
|
266
266
|
VERTICAL: "vertical"
|
|
@@ -268,7 +268,7 @@ const L = {
|
|
|
268
268
|
SINGLE: "single",
|
|
269
269
|
GROUPED: "grouped",
|
|
270
270
|
STACKED: "stacked"
|
|
271
|
-
},
|
|
271
|
+
}, Lt = "No data", tt = 20, Ot = 0.33, $t = 0.5, It = 12, he = 8, gn = 1, yn = [
|
|
272
272
|
"auto",
|
|
273
273
|
"auto-start",
|
|
274
274
|
"auto-end",
|
|
@@ -285,10 +285,10 @@ const L = {
|
|
|
285
285
|
"left-start",
|
|
286
286
|
"left-end"
|
|
287
287
|
];
|
|
288
|
-
function
|
|
288
|
+
function Le(t) {
|
|
289
289
|
t != null && t.closest("svg") || ee(K.NotContainedInSvg);
|
|
290
290
|
}
|
|
291
|
-
const
|
|
291
|
+
const Et = {
|
|
292
292
|
/** Displays a line for each tick. */
|
|
293
293
|
gridLines: !1,
|
|
294
294
|
/** Displays the axis title. */
|
|
@@ -305,11 +305,11 @@ const It = {
|
|
|
305
305
|
/** Space between the tick label and the axis line. */
|
|
306
306
|
tickPadding: 8
|
|
307
307
|
}, bn = {
|
|
308
|
-
...
|
|
308
|
+
...Et,
|
|
309
309
|
withTitle: !1,
|
|
310
310
|
skip: !0
|
|
311
311
|
}, kn = {
|
|
312
|
-
...
|
|
312
|
+
...Et,
|
|
313
313
|
gridLines: !0
|
|
314
314
|
}, xn = function(t, e, r) {
|
|
315
315
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
@@ -327,7 +327,7 @@ const It = {
|
|
|
327
327
|
return {
|
|
328
328
|
x: -(c - t.value.step()) / 2,
|
|
329
329
|
width: c,
|
|
330
|
-
height: r.value.tickPadding +
|
|
330
|
+
height: r.value.tickPadding + It + he
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function l() {
|
|
@@ -362,7 +362,7 @@ const It = {
|
|
|
362
362
|
}
|
|
363
363
|
function a(u) {
|
|
364
364
|
var d;
|
|
365
|
-
const c = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding +
|
|
365
|
+
const c = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding + he;
|
|
366
366
|
return {
|
|
367
367
|
x: -c,
|
|
368
368
|
width: c,
|
|
@@ -403,7 +403,7 @@ const It = {
|
|
|
403
403
|
}
|
|
404
404
|
function a() {
|
|
405
405
|
return {
|
|
406
|
-
height: r.value.tickPadding +
|
|
406
|
+
height: r.value.tickPadding + It + he,
|
|
407
407
|
width: n.value,
|
|
408
408
|
x: -(n.value / 2)
|
|
409
409
|
};
|
|
@@ -438,7 +438,7 @@ const It = {
|
|
|
438
438
|
}
|
|
439
439
|
function a(u) {
|
|
440
440
|
var d;
|
|
441
|
-
const c = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding +
|
|
441
|
+
const c = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding + he;
|
|
442
442
|
return {
|
|
443
443
|
width: c,
|
|
444
444
|
height: n.value,
|
|
@@ -470,8 +470,8 @@ const It = {
|
|
|
470
470
|
"x-linear-scale-axis": An,
|
|
471
471
|
"y-linear-scale-axis": Ln
|
|
472
472
|
};
|
|
473
|
-
var
|
|
474
|
-
const
|
|
473
|
+
var Ce = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Ce || {}), De = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(De || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
474
|
+
const $n = /* @__PURE__ */ H({
|
|
475
475
|
__name: "lume-axis",
|
|
476
476
|
props: {
|
|
477
477
|
scale: {
|
|
@@ -481,12 +481,12 @@ const In = /* @__PURE__ */ H({
|
|
|
481
481
|
type: {
|
|
482
482
|
type: String,
|
|
483
483
|
default: void 0,
|
|
484
|
-
validator: (t) => t in
|
|
484
|
+
validator: (t) => t in xe
|
|
485
485
|
},
|
|
486
486
|
position: {
|
|
487
487
|
type: String,
|
|
488
488
|
default: void 0,
|
|
489
|
-
validator: (t) => t in
|
|
489
|
+
validator: (t) => t in De
|
|
490
490
|
},
|
|
491
491
|
containerSize: {
|
|
492
492
|
type: Object,
|
|
@@ -500,12 +500,12 @@ const In = /* @__PURE__ */ H({
|
|
|
500
500
|
type: String,
|
|
501
501
|
default: L.VERTICAL
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...me()
|
|
504
504
|
},
|
|
505
505
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
506
506
|
setup(t, { emit: e }) {
|
|
507
|
-
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = B(r), c =
|
|
508
|
-
() => r.type ?
|
|
507
|
+
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = B(r), c = pe("isEmpty", O(!1)), d = Ae({}), s = O(null), _ = O(null), m = O(null), p = v(
|
|
508
|
+
() => r.type ? xe[r.type] : r.position
|
|
509
509
|
), h = v(
|
|
510
510
|
() => r.type || (p.value === "left" ? "y" : "x")
|
|
511
511
|
), y = v(
|
|
@@ -514,27 +514,27 @@ const In = /* @__PURE__ */ H({
|
|
|
514
514
|
i,
|
|
515
515
|
h.value === "x" ? bn : kn
|
|
516
516
|
), { showTick: k } = mn(o, s, f.value.skip), T = v(() => {
|
|
517
|
-
var
|
|
518
|
-
return h.value === "y" && c.value ? `translate(0, ${((
|
|
517
|
+
var I, E, g, N;
|
|
518
|
+
return h.value === "y" && c.value ? `translate(0, ${((I = a.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && c.value ? `translate(-${((E = a.value) == null ? void 0 : E.width) / 2}, ${(g = a.value) == null ? void 0 : g.height})` : `translate(0, ${h.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
519
519
|
}), x = v(() => {
|
|
520
520
|
if (Y(o.value))
|
|
521
521
|
return o.value.labels || o.value.domain();
|
|
522
|
-
const { tickCount:
|
|
523
|
-
return Mt(E, g,
|
|
524
|
-
}),
|
|
525
|
-
const { tickFormat:
|
|
526
|
-
return
|
|
522
|
+
const { tickCount: I } = f.value, [E, g] = o.value.domain();
|
|
523
|
+
return Mt(E, g, I);
|
|
524
|
+
}), $ = v(() => {
|
|
525
|
+
const { tickFormat: I } = f.value;
|
|
526
|
+
return Te(I);
|
|
527
527
|
}), A = v(
|
|
528
528
|
() => f.value.withHover && y.value && l.value > -1
|
|
529
529
|
), D = v(
|
|
530
|
-
() => f.value.tickPadding +
|
|
530
|
+
() => f.value.tickPadding + he || n
|
|
531
531
|
), F = v(() => h.value === "x" ? (
|
|
532
532
|
// If x axis, get the tick height
|
|
533
533
|
Math.max(
|
|
534
534
|
...(s.value || []).map(
|
|
535
|
-
(
|
|
535
|
+
(I) => {
|
|
536
536
|
var E, g;
|
|
537
|
-
return ((g = (E =
|
|
537
|
+
return ((g = (E = I.ref).getBBox) == null ? void 0 : g.call(E).height) + D.value;
|
|
538
538
|
}
|
|
539
539
|
)
|
|
540
540
|
)
|
|
@@ -542,51 +542,51 @@ const In = /* @__PURE__ */ H({
|
|
|
542
542
|
// If y axis, get the tick width
|
|
543
543
|
Math.max(
|
|
544
544
|
...(s.value || []).map(
|
|
545
|
-
(
|
|
545
|
+
(I) => {
|
|
546
546
|
var E, g;
|
|
547
|
-
return ((g = (E =
|
|
547
|
+
return ((g = (E = I.ref).getBBox) == null ? void 0 : g.call(E).width) + D.value;
|
|
548
548
|
}
|
|
549
549
|
)
|
|
550
550
|
)
|
|
551
551
|
));
|
|
552
|
-
function P(
|
|
552
|
+
function P(I) {
|
|
553
553
|
const { showTicks: E } = f.value;
|
|
554
|
-
return E === !1 ? "" :
|
|
554
|
+
return E === !1 ? "" : $.value(I);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
e("mouseenter", { index: y.value ?
|
|
556
|
+
function j(I, E, g) {
|
|
557
|
+
e("mouseenter", { index: y.value ? I : null, value: E, event: g });
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
e("click", { index:
|
|
559
|
+
function V(I, E, g) {
|
|
560
|
+
e("click", { index: I, value: E, event: g });
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Z(I) {
|
|
563
563
|
var E;
|
|
564
564
|
if (!(!s.value || !s.value.length))
|
|
565
|
-
return (E = s.value[
|
|
565
|
+
return (E = s.value[I]) == null ? void 0 : E.ref;
|
|
566
566
|
}
|
|
567
567
|
function ne() {
|
|
568
568
|
m.value = x.value.map(
|
|
569
|
-
(
|
|
570
|
-
value: P(
|
|
571
|
-
group: d.getTickGroupAttributes(
|
|
572
|
-
ghost: d.getTickGhostAttributes(
|
|
569
|
+
(I, E) => ({
|
|
570
|
+
value: P(I),
|
|
571
|
+
group: d.getTickGroupAttributes(I, E),
|
|
572
|
+
ghost: d.getTickGhostAttributes(Z(E)),
|
|
573
573
|
label: d.getTickLabelAttributes(),
|
|
574
574
|
gridline: d.getGridLinesAttributes()
|
|
575
575
|
})
|
|
576
576
|
);
|
|
577
577
|
}
|
|
578
578
|
function q() {
|
|
579
|
-
const
|
|
579
|
+
const I = o.value.step ? "bandScale" : "linearScale", E = On[`${h.value}-${Ce[I]}`];
|
|
580
580
|
Object.entries(E(o, a, f) || []).forEach(
|
|
581
581
|
([g, N]) => {
|
|
582
582
|
d[g] = N;
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
585
|
}
|
|
586
|
-
return C(o, q, { flush: "sync", immediate: !0 }), C(o, ne, { immediate: !0 }), C(s, ne), C(F, (
|
|
586
|
+
return C(o, q, { flush: "sync", immediate: !0 }), C(o, ne, { immediate: !0 }), C(s, ne), C(F, (I) => e("lume__internal--axis-size", I)), te(() => Le(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ce, POSITIONS: De, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: T, ticks: x, tickFormatter: $, isHovering: A, axisLabelOffset: D, axisSize: F, formatTick: P, handleTickMouseenter: j, handleTickClick: V, getTextNode: Z, setTicks: ne, init: q, LumeTick: tn };
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
|
-
var
|
|
589
|
+
var In = function() {
|
|
590
590
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
591
591
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(o) {
|
|
592
592
|
return n.emit("mouseleave", o);
|
|
@@ -604,8 +604,8 @@ var $n = function() {
|
|
|
604
604
|
);
|
|
605
605
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
606
606
|
}, En = [], wn = /* @__PURE__ */ w(
|
|
607
|
-
In,
|
|
608
607
|
$n,
|
|
608
|
+
In,
|
|
609
609
|
En,
|
|
610
610
|
!1,
|
|
611
611
|
null,
|
|
@@ -673,7 +673,7 @@ const Dn = /* @__PURE__ */ H({
|
|
|
673
673
|
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = B(r), c = O(null), d = v(
|
|
674
674
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
675
675
|
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Hn(n, o, a, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : a).value), T = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), x = s.value || _.value ? m.transformOrigin : null;
|
|
676
|
-
return te(() =>
|
|
676
|
+
return te(() => Le(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth: k, computedHeight: T, transformOrigin: x };
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
var Rn = function() {
|
|
@@ -703,9 +703,9 @@ var Rn = function() {
|
|
|
703
703
|
null,
|
|
704
704
|
null
|
|
705
705
|
);
|
|
706
|
-
const
|
|
706
|
+
const Ue = Sn.exports;
|
|
707
707
|
function Bn() {
|
|
708
|
-
const t = O(), e =
|
|
708
|
+
const t = O(), e = Ae({
|
|
709
709
|
dimensions: {}
|
|
710
710
|
}), r = new ResizeObserver((n) => {
|
|
711
711
|
n.forEach((o) => {
|
|
@@ -714,7 +714,7 @@ function Bn() {
|
|
|
714
714
|
});
|
|
715
715
|
return te(() => {
|
|
716
716
|
r.observe(t.value);
|
|
717
|
-
}),
|
|
717
|
+
}), yt(() => {
|
|
718
718
|
r.unobserve(t.value);
|
|
719
719
|
}), { resizeState: e, resizeRef: t };
|
|
720
720
|
}
|
|
@@ -743,7 +743,7 @@ const Fn = /* @__PURE__ */ H({
|
|
|
743
743
|
const r = t, { margins: n, containerSize: o } = B(r), a = O(null), { resizeRef: l, resizeState: i } = Bn(), u = v(
|
|
744
744
|
() => o.value.height + n.value.top + n.value.bottom
|
|
745
745
|
);
|
|
746
|
-
return
|
|
746
|
+
return bt(() => {
|
|
747
747
|
if (!a.value)
|
|
748
748
|
return;
|
|
749
749
|
const { width: c } = i.dimensions, { height: d } = a.value.getBoundingClientRect();
|
|
@@ -793,7 +793,7 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ H({
|
|
|
793
793
|
},
|
|
794
794
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
795
795
|
setup(t, { emit: e }) {
|
|
796
|
-
const r =
|
|
796
|
+
const r = pe("isEmpty", O(!1));
|
|
797
797
|
return { __sfc: !0, emit: e, isEmpty: r };
|
|
798
798
|
}
|
|
799
799
|
});
|
|
@@ -905,11 +905,11 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
905
905
|
type: String,
|
|
906
906
|
default: null
|
|
907
907
|
},
|
|
908
|
-
...
|
|
908
|
+
...me()
|
|
909
909
|
},
|
|
910
910
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
911
911
|
setup(t, { emit: e }) {
|
|
912
|
-
const r = t, n = O(null), { items: o, options: a } = B(r), l =
|
|
912
|
+
const r = t, n = O(null), { items: o, options: a } = B(r), l = z(), i = O(null), { allOptions: u } = J(a), c = v(
|
|
913
913
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
914
914
|
), d = v(
|
|
915
915
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -928,10 +928,10 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
928
928
|
...r.modifiers || []
|
|
929
929
|
]), _ = v(
|
|
930
930
|
() => u.value.showTitle !== !1 && r.title != null
|
|
931
|
-
), m = v(() =>
|
|
931
|
+
), m = v(() => Te(u.value.valueFormat)), p = v(() => Te(u.value.titleFormat)), h = v(
|
|
932
932
|
() => {
|
|
933
933
|
var x;
|
|
934
|
-
return ((x = o.value) == null ? void 0 : x.find((
|
|
934
|
+
return ((x = o.value) == null ? void 0 : x.find(($) => $.isSummary)) || {
|
|
935
935
|
label: u.value.summary ?? r.summary
|
|
936
936
|
};
|
|
937
937
|
}
|
|
@@ -953,10 +953,10 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
953
953
|
}
|
|
954
954
|
return C(
|
|
955
955
|
() => r.targetElement,
|
|
956
|
-
(x,
|
|
957
|
-
|
|
956
|
+
(x, $) => {
|
|
957
|
+
!$ && x ? f() : T();
|
|
958
958
|
}
|
|
959
|
-
), te(f),
|
|
959
|
+
), te(f), yt(k), { __sfc: !0, props: r, emit: e, root: n, items: o, options: a, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, initPopper: f, destroyPopper: k, updatePopper: T, LumeTooltipTitle: qn, LumeTooltipSummary: or, LumeTooltipItem: sr };
|
|
960
960
|
}
|
|
961
961
|
});
|
|
962
962
|
var dr = function() {
|
|
@@ -996,24 +996,24 @@ var dr = function() {
|
|
|
996
996
|
);
|
|
997
997
|
const fr = _r.exports;
|
|
998
998
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
999
|
-
const pr = re.Categorical,
|
|
999
|
+
const pr = re.Categorical, ge = W.Skyblue, mr = We.SkyTeal;
|
|
1000
1000
|
function hr(t) {
|
|
1001
|
-
return t === re.Divergent ? mr :
|
|
1001
|
+
return t === re.Divergent ? mr : ge;
|
|
1002
1002
|
}
|
|
1003
1003
|
function gr(t) {
|
|
1004
|
-
return Object.values(
|
|
1005
|
-
}
|
|
1006
|
-
function
|
|
1007
|
-
return e === re.Divergent ? Object.values(
|
|
1008
|
-
...
|
|
1009
|
-
...
|
|
1010
|
-
...
|
|
1011
|
-
...
|
|
1004
|
+
return Object.values(Xe).includes(t);
|
|
1005
|
+
}
|
|
1006
|
+
function nt(t, e) {
|
|
1007
|
+
return e === re.Divergent ? Object.values(We).includes(t) : Object.values({
|
|
1008
|
+
...W,
|
|
1009
|
+
...At,
|
|
1010
|
+
...Ze,
|
|
1011
|
+
...Xe
|
|
1012
1012
|
}).includes(t);
|
|
1013
1013
|
}
|
|
1014
1014
|
function yr(t, e) {
|
|
1015
|
-
const r = Object.values(
|
|
1016
|
-
return dn(Object.values(
|
|
1015
|
+
const r = Object.values(W).indexOf(t);
|
|
1016
|
+
return dn(Object.values(W), r > -1 ? r : 0)[e];
|
|
1017
1017
|
}
|
|
1018
1018
|
function br(t, e) {
|
|
1019
1019
|
const r = 50 + e * 10;
|
|
@@ -1023,7 +1023,7 @@ function kr(t, e) {
|
|
|
1023
1023
|
const r = (e + 1) * 10;
|
|
1024
1024
|
return `${t}-${r}`;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function rt(t, e, r) {
|
|
1027
1027
|
switch (e) {
|
|
1028
1028
|
default:
|
|
1029
1029
|
case re.Categorical:
|
|
@@ -1035,7 +1035,7 @@ function tt(t, e, r) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
function xr(t, e, r = pr, n) {
|
|
1038
|
-
return
|
|
1038
|
+
return nt(t, r) ? t : (n > 4 && (ee(K.ColorLoop), n = n % 5), nt(e, r) ? rt(e, r, n) : rt(hr(r), r, n));
|
|
1039
1039
|
}
|
|
1040
1040
|
function Tr(t) {
|
|
1041
1041
|
return t.map((e) => on(e) ? e : { value: e });
|
|
@@ -1043,7 +1043,7 @@ function Tr(t) {
|
|
|
1043
1043
|
function Ar(t) {
|
|
1044
1044
|
return t.__internal === !0;
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1046
|
+
const Ye = (t = null) => ({
|
|
1047
1047
|
data: {
|
|
1048
1048
|
type: Array,
|
|
1049
1049
|
required: !0,
|
|
@@ -1055,15 +1055,15 @@ const Xe = (t = null) => ({
|
|
|
1055
1055
|
},
|
|
1056
1056
|
color: {
|
|
1057
1057
|
type: String,
|
|
1058
|
-
default:
|
|
1058
|
+
default: W.Skyblue
|
|
1059
1059
|
},
|
|
1060
1060
|
title: {
|
|
1061
1061
|
type: String,
|
|
1062
1062
|
default: null
|
|
1063
1063
|
}
|
|
1064
1064
|
});
|
|
1065
|
-
function
|
|
1066
|
-
const a =
|
|
1065
|
+
function Ke(t, e, r, n, o) {
|
|
1066
|
+
const a = Ae({
|
|
1067
1067
|
width: 0,
|
|
1068
1068
|
height: 0
|
|
1069
1069
|
}), l = _n(12), i = v(() => {
|
|
@@ -1086,9 +1086,9 @@ function Ue(t, e, r, n, o) {
|
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
1088
|
);
|
|
1089
|
-
}), u = v(() => Array.isArray(e.value) ? e.value :
|
|
1089
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : He(t.value).map((d, s) => s));
|
|
1090
1090
|
function c(d) {
|
|
1091
|
-
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL &&
|
|
1091
|
+
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && He(t).length * (((n == null ? void 0 : n.value.barHeight) || tt) * 2) + ((n == null ? void 0 : n.value.barHeight) || tt) || d.height;
|
|
1092
1092
|
a.width = d.width, a.height = s;
|
|
1093
1093
|
}
|
|
1094
1094
|
return {
|
|
@@ -1113,65 +1113,65 @@ function Or(t, e, r, n, o) {
|
|
|
1113
1113
|
const a = O(null), l = O(null);
|
|
1114
1114
|
function i() {
|
|
1115
1115
|
const { width: u, height: c } = r;
|
|
1116
|
-
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value =
|
|
1116
|
+
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value = at(
|
|
1117
1117
|
t.value,
|
|
1118
1118
|
u,
|
|
1119
1119
|
n.value,
|
|
1120
1120
|
o.value.startOnZero
|
|
1121
|
-
), l.value =
|
|
1121
|
+
), l.value = ot(
|
|
1122
1122
|
e.value,
|
|
1123
1123
|
c,
|
|
1124
1124
|
n.value,
|
|
1125
1125
|
o.value
|
|
1126
|
-
)) : (a.value =
|
|
1126
|
+
)) : (a.value = ot(
|
|
1127
1127
|
e.value,
|
|
1128
1128
|
u,
|
|
1129
1129
|
n.value,
|
|
1130
1130
|
o.value
|
|
1131
|
-
), l.value =
|
|
1131
|
+
), l.value = at(
|
|
1132
1132
|
t.value,
|
|
1133
1133
|
c,
|
|
1134
1134
|
n.value,
|
|
1135
1135
|
o.value.startOnZero
|
|
1136
1136
|
)));
|
|
1137
1137
|
}
|
|
1138
|
-
return
|
|
1138
|
+
return bt(i), { xScale: a, yScale: l };
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ?
|
|
1140
|
+
function ot(t, e, r, n) {
|
|
1141
|
+
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ? $t : Ot);
|
|
1142
1142
|
return Object.assign(
|
|
1143
|
-
|
|
1143
|
+
_e().range(o).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1144
1144
|
{ labels: t }
|
|
1145
1145
|
);
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1148
|
-
const o =
|
|
1147
|
+
function at(t, e, r, n) {
|
|
1148
|
+
const o = xt(t).filter((d) => d != null), a = [0, e];
|
|
1149
1149
|
if (o.length === 0)
|
|
1150
|
-
return
|
|
1150
|
+
return fe().range(a).domain([0, 0]).nice();
|
|
1151
1151
|
const l = Math.min(...o), i = n && l > 0 ? 0 : l, u = Math.max(...o), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1152
|
-
return
|
|
1152
|
+
return fe().range(a).domain(c).nice();
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function lt(t) {
|
|
1155
1155
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function Re(t, e) {
|
|
1158
1158
|
return Y(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function ut(t, e, {
|
|
1161
1161
|
padding: r,
|
|
1162
1162
|
paddingInner: n,
|
|
1163
1163
|
paddingOuter: o
|
|
1164
1164
|
} = {}) {
|
|
1165
|
-
const a = r ?? (e === L.HORIZONTAL ?
|
|
1165
|
+
const a = r ?? (e === L.HORIZONTAL ? $t : Ot);
|
|
1166
1166
|
return t.copy().paddingInner(n ?? a).paddingOuter(o ?? a);
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function wt(t) {
|
|
1169
1169
|
return Object.values(L).includes(t);
|
|
1170
1170
|
}
|
|
1171
|
-
const
|
|
1172
|
-
...
|
|
1171
|
+
const de = (t, e = !0) => ({
|
|
1172
|
+
...Ye(t),
|
|
1173
1173
|
...Lr(),
|
|
1174
|
-
...
|
|
1174
|
+
...me(),
|
|
1175
1175
|
classList: {
|
|
1176
1176
|
type: [String, Array],
|
|
1177
1177
|
default: () => []
|
|
@@ -1184,17 +1184,17 @@ const ue = (t, e = !0) => ({
|
|
|
1184
1184
|
orientation: {
|
|
1185
1185
|
type: String,
|
|
1186
1186
|
default: L.VERTICAL,
|
|
1187
|
-
validator:
|
|
1187
|
+
validator: wt
|
|
1188
1188
|
}
|
|
1189
1189
|
} : {}
|
|
1190
|
-
}),
|
|
1191
|
-
...
|
|
1192
|
-
...
|
|
1190
|
+
}), $r = (t) => ({
|
|
1191
|
+
...Ye(t),
|
|
1192
|
+
...me(),
|
|
1193
1193
|
hoveredElement: {
|
|
1194
1194
|
type: [Number, String],
|
|
1195
1195
|
default: null
|
|
1196
1196
|
}
|
|
1197
|
-
}),
|
|
1197
|
+
}), Oe = () => ({
|
|
1198
1198
|
data: {
|
|
1199
1199
|
type: Array,
|
|
1200
1200
|
required: !0
|
|
@@ -1210,7 +1210,7 @@ const ue = (t, e = !0) => ({
|
|
|
1210
1210
|
orientation: {
|
|
1211
1211
|
type: String,
|
|
1212
1212
|
default: L.VERTICAL,
|
|
1213
|
-
validator:
|
|
1213
|
+
validator: wt
|
|
1214
1214
|
},
|
|
1215
1215
|
xScale: {
|
|
1216
1216
|
type: Function,
|
|
@@ -1236,10 +1236,10 @@ const ue = (t, e = !0) => ({
|
|
|
1236
1236
|
type: [String, Array],
|
|
1237
1237
|
default: () => []
|
|
1238
1238
|
}
|
|
1239
|
-
}),
|
|
1239
|
+
}), Ir = /* @__PURE__ */ H({
|
|
1240
1240
|
__name: "lume-overlay-group",
|
|
1241
1241
|
props: {
|
|
1242
|
-
...
|
|
1242
|
+
...Oe(),
|
|
1243
1243
|
orientation: {
|
|
1244
1244
|
type: String,
|
|
1245
1245
|
default: L.VERTICAL
|
|
@@ -1247,7 +1247,7 @@ const ue = (t, e = !0) => ({
|
|
|
1247
1247
|
},
|
|
1248
1248
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1249
1249
|
setup(t, { emit: e }) {
|
|
1250
|
-
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() =>
|
|
1250
|
+
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() => He(n));
|
|
1251
1251
|
function u(c) {
|
|
1252
1252
|
var y;
|
|
1253
1253
|
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = Y(d) ? d(s[c]) - p / 2 : d(c) - _ / 2;
|
|
@@ -1261,7 +1261,7 @@ const ue = (t, e = !0) => ({
|
|
|
1261
1261
|
transform: `translate(${h}, 0)`
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1264
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ue };
|
|
1265
1265
|
}
|
|
1266
1266
|
});
|
|
1267
1267
|
var Er = function() {
|
|
@@ -1274,7 +1274,7 @@ var Er = function() {
|
|
|
1274
1274
|
} } }, "lume-bar", n.getOverlayBarAttributes(a), !1));
|
|
1275
1275
|
}), 1);
|
|
1276
1276
|
}, wr = [], Nr = /* @__PURE__ */ w(
|
|
1277
|
-
|
|
1277
|
+
Ir,
|
|
1278
1278
|
Er,
|
|
1279
1279
|
wr,
|
|
1280
1280
|
!1,
|
|
@@ -1328,7 +1328,7 @@ const Hr = Nr.exports, Cr = [
|
|
|
1328
1328
|
};
|
|
1329
1329
|
function Dr(t) {
|
|
1330
1330
|
return { hasNegativeValues: v(
|
|
1331
|
-
() =>
|
|
1331
|
+
() => xt(t.value).some((r) => r < 0)
|
|
1332
1332
|
) };
|
|
1333
1333
|
}
|
|
1334
1334
|
function Rr(t, e, r, n) {
|
|
@@ -1357,22 +1357,22 @@ function Rr(t, e, r, n) {
|
|
|
1357
1357
|
})) };
|
|
1358
1358
|
}
|
|
1359
1359
|
function Pr(t, e) {
|
|
1360
|
-
return t.reduce((r, n) =>
|
|
1360
|
+
return t.reduce((r, n) => ze(n.values, e).map(
|
|
1361
1361
|
(o, a) => r[a] ? o.value > r[a] ? o.value : r[a] : o.value ?? 0
|
|
1362
1362
|
), []);
|
|
1363
1363
|
}
|
|
1364
1364
|
function Sr(t, e) {
|
|
1365
|
-
return t.reduce((r, n) =>
|
|
1365
|
+
return t.reduce((r, n) => ze(n.values, e).map(
|
|
1366
1366
|
(o, a) => {
|
|
1367
1367
|
const l = o.value == null || o.value < 0 ? 0 : o.value;
|
|
1368
1368
|
return r[a] ? r[a] + l : l;
|
|
1369
1369
|
}
|
|
1370
1370
|
), []);
|
|
1371
1371
|
}
|
|
1372
|
-
const
|
|
1372
|
+
const it = {
|
|
1373
1373
|
"stacked-bar": Sr
|
|
1374
1374
|
};
|
|
1375
|
-
function
|
|
1375
|
+
function Nt(t, e, r, n, o, a, l, i) {
|
|
1376
1376
|
const u = v(
|
|
1377
1377
|
() => {
|
|
1378
1378
|
var d;
|
|
@@ -1381,13 +1381,13 @@ function Et(t, e, r, n, o, a, l, i) {
|
|
|
1381
1381
|
);
|
|
1382
1382
|
function c(d) {
|
|
1383
1383
|
var m;
|
|
1384
|
-
const s = ((m = o == null ? void 0 : o.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value &&
|
|
1384
|
+
const s = ((m = o == null ? void 0 : o.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && it[i.value] ? it[i.value](
|
|
1385
1385
|
d,
|
|
1386
1386
|
s
|
|
1387
1387
|
) : Pr(d, s);
|
|
1388
1388
|
t.value = _.map((p, h) => ({
|
|
1389
|
-
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(p) :
|
|
1390
|
-
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ?
|
|
1389
|
+
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(p) : Re(r.value, h),
|
|
1390
|
+
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? Re(n.value, h) : n.value(p)
|
|
1391
1391
|
}));
|
|
1392
1392
|
}
|
|
1393
1393
|
return C(
|
|
@@ -1399,7 +1399,7 @@ function Et(t, e, r, n, o, a, l, i) {
|
|
|
1399
1399
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1400
1400
|
}
|
|
1401
1401
|
function Br() {
|
|
1402
|
-
const t =
|
|
1402
|
+
const t = Ae({
|
|
1403
1403
|
opened: !1,
|
|
1404
1404
|
targetElement: null
|
|
1405
1405
|
});
|
|
@@ -1416,71 +1416,71 @@ function Fr(t) {
|
|
|
1416
1416
|
return {
|
|
1417
1417
|
color: ((l = a[r]) == null ? void 0 : l.color) || n,
|
|
1418
1418
|
label: o,
|
|
1419
|
-
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ??
|
|
1419
|
+
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ?? Lt
|
|
1420
1420
|
};
|
|
1421
1421
|
})
|
|
1422
1422
|
) };
|
|
1423
1423
|
}
|
|
1424
|
-
const
|
|
1424
|
+
const Pe = 16, Se = 8, Be = 28, Fe = 24, oe = {
|
|
1425
1425
|
VERTICAL: {
|
|
1426
|
-
top:
|
|
1427
|
-
right:
|
|
1428
|
-
bottom:
|
|
1429
|
-
left:
|
|
1426
|
+
top: Pe,
|
|
1427
|
+
right: Se,
|
|
1428
|
+
bottom: Be,
|
|
1429
|
+
left: Fe
|
|
1430
1430
|
},
|
|
1431
1431
|
HORIZONTAL: {
|
|
1432
|
-
top:
|
|
1433
|
-
right:
|
|
1434
|
-
bottom:
|
|
1435
|
-
left:
|
|
1432
|
+
top: Pe,
|
|
1433
|
+
right: Se,
|
|
1434
|
+
bottom: Be,
|
|
1435
|
+
left: Fe
|
|
1436
1436
|
}
|
|
1437
1437
|
};
|
|
1438
1438
|
function Gr(t) {
|
|
1439
|
-
return !t || t === "auto" || t.top == null || t.top === "auto" ?
|
|
1439
|
+
return !t || t === "auto" || t.top == null || t.top === "auto" ? Pe : t.top;
|
|
1440
1440
|
}
|
|
1441
1441
|
function jr(t) {
|
|
1442
|
-
return !t || t === "auto" || t.right == null || t.right === "auto" ?
|
|
1442
|
+
return !t || t === "auto" || t.right == null || t.right === "auto" ? Se : t.right;
|
|
1443
1443
|
}
|
|
1444
1444
|
function Vr(t, e) {
|
|
1445
|
-
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e ||
|
|
1445
|
+
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Be : t.bottom;
|
|
1446
1446
|
}
|
|
1447
1447
|
function Mr(t, e) {
|
|
1448
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1448
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Fe : t.left;
|
|
1449
1449
|
}
|
|
1450
1450
|
const zr = /* @__PURE__ */ H({
|
|
1451
1451
|
__name: "lume-chart",
|
|
1452
1452
|
props: {
|
|
1453
|
-
...
|
|
1453
|
+
...de(),
|
|
1454
1454
|
chartType: {
|
|
1455
1455
|
type: String,
|
|
1456
1456
|
default: null
|
|
1457
1457
|
}
|
|
1458
1458
|
},
|
|
1459
1459
|
setup(t, { emit: e }) {
|
|
1460
|
-
const r = t, n =
|
|
1460
|
+
const r = t, n = z(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = B(r), d = O(-1), s = O(null), _ = O(null), m = O([]), p = O(null), h = O(0), y = O(0), { allOptions: f } = J(i), { internalData: k, computedLabels: T, containerSize: x, updateSize: $, chartID: A } = Ke(o, a, l, f, u), { listenInternalEvent: D } = Q(e, A), { xScale: F, yScale: P } = Or(
|
|
1461
1461
|
k,
|
|
1462
1462
|
T,
|
|
1463
1463
|
x,
|
|
1464
1464
|
u,
|
|
1465
1465
|
f
|
|
1466
|
-
),
|
|
1466
|
+
), j = v(() => ({
|
|
1467
1467
|
top: Gr(f.value.margins),
|
|
1468
1468
|
right: jr(f.value.margins),
|
|
1469
1469
|
bottom: Vr(f.value.margins, h.value),
|
|
1470
1470
|
left: Mr(f.value.margins, y.value)
|
|
1471
|
-
})),
|
|
1471
|
+
})), V = v(() => {
|
|
1472
1472
|
var b;
|
|
1473
|
-
return r.xScale ?
|
|
1474
|
-
}),
|
|
1473
|
+
return r.xScale ? lt(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, a.value, x) : F.value;
|
|
1474
|
+
}), Z = v(() => {
|
|
1475
1475
|
var b;
|
|
1476
|
-
return r.yScale ?
|
|
1476
|
+
return r.yScale ? lt(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, a.value, x) : P.value;
|
|
1477
1477
|
}), ne = v(() => ({
|
|
1478
1478
|
...f.value.xAxisOptions,
|
|
1479
1479
|
withHover: u.value === L.VERTICAL
|
|
1480
1480
|
})), q = v(() => ({
|
|
1481
1481
|
...f.value.yAxisOptions,
|
|
1482
1482
|
withHover: u.value === L.HORIZONTAL
|
|
1483
|
-
})),
|
|
1483
|
+
})), I = v(() => {
|
|
1484
1484
|
var b;
|
|
1485
1485
|
return (b = f.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1486
1486
|
}), E = v(() => {
|
|
@@ -1488,74 +1488,74 @@ const zr = /* @__PURE__ */ H({
|
|
|
1488
1488
|
return (b = f.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1489
1489
|
}), g = v(() => {
|
|
1490
1490
|
var b;
|
|
1491
|
-
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 &&
|
|
1491
|
+
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && I.value;
|
|
1492
1492
|
}), N = v(() => {
|
|
1493
1493
|
var b;
|
|
1494
1494
|
return ((b = f.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && E.value;
|
|
1495
1495
|
}), R = v(
|
|
1496
1496
|
() => o.value.every((b) => !b.values.length)
|
|
1497
|
-
),
|
|
1497
|
+
), X = v(() => {
|
|
1498
1498
|
const b = [], { noBaseScales: S } = f.value;
|
|
1499
|
-
return S || b.push(() => !!(
|
|
1500
|
-
}), { hasNegativeValues:
|
|
1499
|
+
return S || b.push(() => !!(V.value && Z.value)), b.every((M) => M() === !0);
|
|
1500
|
+
}), { hasNegativeValues: U } = Dr(k), { negativeBarAttributes: G } = Rr(
|
|
1501
1501
|
x,
|
|
1502
|
-
|
|
1503
|
-
|
|
1502
|
+
V,
|
|
1503
|
+
Z,
|
|
1504
1504
|
u
|
|
1505
|
-
), { shouldGenerateTooltipAnchors:
|
|
1505
|
+
), { shouldGenerateTooltipAnchors: Qe } = Nt(
|
|
1506
1506
|
m,
|
|
1507
1507
|
f,
|
|
1508
|
-
|
|
1509
|
-
|
|
1508
|
+
V,
|
|
1509
|
+
Z,
|
|
1510
1510
|
a,
|
|
1511
1511
|
u,
|
|
1512
1512
|
k,
|
|
1513
1513
|
c
|
|
1514
|
-
), { tooltipConfig:
|
|
1515
|
-
() => f.value.withTooltip !== !1 &&
|
|
1514
|
+
), { tooltipConfig: le, showTooltip: ye, hideTooltip: ue } = Br(), { getTooltipItems: be } = Fr(k), ie = v(
|
|
1515
|
+
() => f.value.withTooltip !== !1 && le.opened
|
|
1516
1516
|
), St = v(
|
|
1517
1517
|
() => {
|
|
1518
1518
|
var b;
|
|
1519
1519
|
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1520
1520
|
}
|
|
1521
|
-
),
|
|
1521
|
+
), qe = v(() => {
|
|
1522
1522
|
var S;
|
|
1523
1523
|
const b = (S = f.value.tooltipOptions) == null ? void 0 : S.withPointerEvents;
|
|
1524
|
-
return
|
|
1524
|
+
return le.opened && (!b || b && p.value === !1);
|
|
1525
1525
|
});
|
|
1526
|
-
function
|
|
1527
|
-
var
|
|
1526
|
+
function ke(b) {
|
|
1527
|
+
var M;
|
|
1528
1528
|
if (b === d.value)
|
|
1529
1529
|
return;
|
|
1530
1530
|
const S = d.value;
|
|
1531
1531
|
if (f.value.withHover !== !1 && (d.value = b), f.value.withTooltip !== !1) {
|
|
1532
|
-
const jt = (
|
|
1533
|
-
|
|
1532
|
+
const jt = (M = f.value.tooltipOptions) != null && M.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : s.value[b];
|
|
1533
|
+
ye(jt);
|
|
1534
1534
|
}
|
|
1535
1535
|
e("hovered-index-changed", { newIndex: b, oldIndex: S });
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
|
|
1537
|
+
function $e() {
|
|
1538
|
+
ue(), d.value = -1;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function Ie(b) {
|
|
1541
1541
|
if (!o.value.some(
|
|
1542
|
-
({ values:
|
|
1542
|
+
({ values: M }) => b <= M.length - 1
|
|
1543
1543
|
)) {
|
|
1544
1544
|
ee(K.InvalidHoveredIndex);
|
|
1545
1545
|
return;
|
|
1546
1546
|
}
|
|
1547
|
-
|
|
1547
|
+
ke(b);
|
|
1548
1548
|
}
|
|
1549
1549
|
function Bt() {
|
|
1550
1550
|
setTimeout(() => {
|
|
1551
|
-
|
|
1551
|
+
qe.value && $e(), e("chart-mouseleave");
|
|
1552
1552
|
}, 0);
|
|
1553
1553
|
}
|
|
1554
|
-
function Ft({ index: b, value: S, event:
|
|
1555
|
-
b !== null &&
|
|
1554
|
+
function Ft({ index: b, value: S, event: M }) {
|
|
1555
|
+
b !== null && ke(b), e("axis-mouseenter", { index: b, value: S, event: M });
|
|
1556
1556
|
}
|
|
1557
|
-
function Gt({ index: b, value: S, event:
|
|
1558
|
-
e("axis-click", { index: b, value: S, event:
|
|
1557
|
+
function Gt({ index: b, value: S, event: M }) {
|
|
1558
|
+
e("axis-click", { index: b, value: S, event: M });
|
|
1559
1559
|
}
|
|
1560
1560
|
return C(
|
|
1561
1561
|
o,
|
|
@@ -1563,17 +1563,17 @@ const zr = /* @__PURE__ */ H({
|
|
|
1563
1563
|
), C(
|
|
1564
1564
|
a,
|
|
1565
1565
|
(b, S) => e("labels-changed", { newValue: b, oldValue: S })
|
|
1566
|
-
), C(R, (b) => b && ee(K.Empty), { immediate: !0 }), C(() => r.hoveredIndex,
|
|
1566
|
+
), C(R, (b) => b && ee(K.Empty), { immediate: !0 }), C(() => r.hoveredIndex, Ie), C(
|
|
1567
1567
|
m,
|
|
1568
1568
|
(b) => {
|
|
1569
|
-
b && r.hoveredIndex != null && d.value === -1 &&
|
|
1569
|
+
b && r.hoveredIndex != null && d.value === -1 && Ie(r.hoveredIndex);
|
|
1570
1570
|
},
|
|
1571
1571
|
{ flush: "post" }
|
|
1572
1572
|
), C(p, (b) => {
|
|
1573
|
-
b === !1 &&
|
|
1573
|
+
b === !1 && le.opened && $e();
|
|
1574
1574
|
}), te(async () => {
|
|
1575
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover",
|
|
1576
|
-
}),
|
|
1575
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", ke);
|
|
1576
|
+
}), Ee("chartID", A), Ee("isEmpty", R), Ee("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: T, containerSize: x, updateSize: $, chartID: A, listenInternalEvent: D, xScale: F, yScale: P, computedMargins: j, computedXScale: V, computedYScale: Z, computedXAxisOptions: ne, computedYAxisOptions: q, xAxisTitle: I, yAxisTitle: E, showXAxisTitle: g, showYAxisTitle: N, isEmpty: R, isReady: X, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: Qe, tooltipConfig: le, showTooltip: ye, hideTooltip: ue, getTooltipItems: be, isTooltipOpened: ie, tooltipPosition: St, shouldHideTooltip: qe, handleInternalHover: ke, handleHideTooltip: $e, handleExternalHover: Ie, handleMouseleave: Bt, handleAxisMouseenter: Ft, handleAxisClick: Gt, LumeAxis: Nn, LumeBar: Ue, LumeChartContainer: Mn, LumeChartLegend: Un, LumeTooltip: fr, LumeOverlayGroup: Hr, TOOLTIP_ANCHOR_RADIUS: gn };
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
1579
|
var Wr = function() {
|
|
@@ -1643,7 +1643,7 @@ var Wr = function() {
|
|
|
1643
1643
|
null,
|
|
1644
1644
|
null
|
|
1645
1645
|
);
|
|
1646
|
-
const
|
|
1646
|
+
const ve = Xr.exports, st = 8, Ur = 8, Yr = 20, ce = 2, ct = 2, Kr = /* @__PURE__ */ H({
|
|
1647
1647
|
__name: "lume-alluvial-node-label",
|
|
1648
1648
|
props: {
|
|
1649
1649
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1657,14 +1657,14 @@ const ie = Xr.exports, ut = 8, Ur = 8, Yr = 20, $e = 2, it = 2, Kr = /* @__PURE_
|
|
|
1657
1657
|
[n, () => r.maxWidth],
|
|
1658
1658
|
async ([l, i]) => {
|
|
1659
1659
|
if (l && i) {
|
|
1660
|
-
o.value = i, await
|
|
1660
|
+
o.value = i, await et();
|
|
1661
1661
|
const { width: u, height: c } = l.getBoundingClientRect();
|
|
1662
|
-
o.value = u +
|
|
1662
|
+
o.value = u + ct > i ? i : u + ct, a.value = Math.ceil(c);
|
|
1663
1663
|
}
|
|
1664
1664
|
},
|
|
1665
1665
|
{ immediate: !0 }
|
|
1666
1666
|
), C(o, async (l) => {
|
|
1667
|
-
l !== r.maxWidth && (await
|
|
1667
|
+
l !== r.maxWidth && (await et(), e("lume__internal--node-resize"));
|
|
1668
1668
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: o, foreignObjectHeight: a };
|
|
1669
1669
|
}
|
|
1670
1670
|
});
|
|
@@ -1704,7 +1704,7 @@ var no = function() {
|
|
|
1704
1704
|
null
|
|
1705
1705
|
);
|
|
1706
1706
|
const ao = oo.exports;
|
|
1707
|
-
function
|
|
1707
|
+
function dt(t, e) {
|
|
1708
1708
|
return {
|
|
1709
1709
|
x0: 0 + (e ? e.left : 0),
|
|
1710
1710
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1713,19 +1713,19 @@ function st(t, e) {
|
|
|
1713
1713
|
};
|
|
1714
1714
|
}
|
|
1715
1715
|
function lo(t) {
|
|
1716
|
-
const e = O(
|
|
1716
|
+
const e = O(dt(t));
|
|
1717
1717
|
function r(n) {
|
|
1718
|
-
e.value =
|
|
1718
|
+
e.value = dt(t, n);
|
|
1719
1719
|
}
|
|
1720
1720
|
return { extents: e, updateExtents: r };
|
|
1721
1721
|
}
|
|
1722
|
-
var
|
|
1722
|
+
var Ht = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(Ht || {});
|
|
1723
1723
|
const uo = "[lume] ";
|
|
1724
1724
|
function io(t, e, r = !0) {
|
|
1725
|
-
r &&
|
|
1725
|
+
r && kt() || console.error(uo + "Error: " + t, e);
|
|
1726
1726
|
}
|
|
1727
1727
|
const so = 200;
|
|
1728
|
-
function
|
|
1728
|
+
function se(t) {
|
|
1729
1729
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1730
1730
|
}
|
|
1731
1731
|
function co(t, e) {
|
|
@@ -1734,7 +1734,7 @@ function co(t, e) {
|
|
|
1734
1734
|
function vo(t, e) {
|
|
1735
1735
|
return e.links.find((r) => r.id === t);
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function Ct(t) {
|
|
1738
1738
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1739
1739
|
}
|
|
1740
1740
|
function _o(t, e) {
|
|
@@ -1756,15 +1756,15 @@ function _o(t, e) {
|
|
|
1756
1756
|
}
|
|
1757
1757
|
function fo(t) {
|
|
1758
1758
|
return t.map((e) => {
|
|
1759
|
-
const r = e.y1 - e.y0 <
|
|
1759
|
+
const r = e.y1 - e.y0 < ce;
|
|
1760
1760
|
return {
|
|
1761
1761
|
x: e.x0,
|
|
1762
|
-
y: e.y0 - (r ?
|
|
1762
|
+
y: e.y0 - (r ? ce / 2 : 0),
|
|
1763
1763
|
// Negative offset to account for the min. height
|
|
1764
1764
|
width: e.x1 - e.x0,
|
|
1765
|
-
height: r ?
|
|
1765
|
+
height: r ? ce : e.y1 - e.y0,
|
|
1766
1766
|
textTransform: {
|
|
1767
|
-
x: e.depth > 0 ? e.x1 +
|
|
1767
|
+
x: e.depth > 0 ? e.x1 + st : e.x0 - st,
|
|
1768
1768
|
y: (e.y1 + e.y0) / 2
|
|
1769
1769
|
},
|
|
1770
1770
|
node: e
|
|
@@ -1785,14 +1785,14 @@ function go(t) {
|
|
|
1785
1785
|
var r;
|
|
1786
1786
|
return {
|
|
1787
1787
|
id: e.id,
|
|
1788
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1788
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || ge,
|
|
1789
1789
|
d: ho(e)(e),
|
|
1790
1790
|
strokeWidth: Math.max(1, e.width),
|
|
1791
1791
|
link: e
|
|
1792
1792
|
};
|
|
1793
1793
|
});
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function vt(t, e, r, n, o) {
|
|
1796
1796
|
if (n === !1) {
|
|
1797
1797
|
t.node = {
|
|
1798
1798
|
...t.node,
|
|
@@ -1813,7 +1813,7 @@ const yo = {
|
|
|
1813
1813
|
nodes: [],
|
|
1814
1814
|
links: []
|
|
1815
1815
|
};
|
|
1816
|
-
function
|
|
1816
|
+
function _t(t, e) {
|
|
1817
1817
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1818
1818
|
}
|
|
1819
1819
|
function bo(t, e, r) {
|
|
@@ -1823,7 +1823,7 @@ function bo(t, e, r) {
|
|
|
1823
1823
|
({ label: _, color: m, value: p, deriveColorFromIncomingLinks: h, offset: y }) => ({
|
|
1824
1824
|
label: _ || p.toString(),
|
|
1825
1825
|
color: m,
|
|
1826
|
-
fallbackColor: m ||
|
|
1826
|
+
fallbackColor: m || ge,
|
|
1827
1827
|
id: p,
|
|
1828
1828
|
deriveColorFromIncomingLinks: h,
|
|
1829
1829
|
offset: y
|
|
@@ -1848,18 +1848,18 @@ function bo(t, e, r) {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
).filter(Boolean).flat();
|
|
1850
1850
|
}
|
|
1851
|
-
), l = v(() => Yt().nodeId(
|
|
1851
|
+
), l = v(() => Yt().nodeId(se).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), i = v(() => {
|
|
1852
1852
|
var s;
|
|
1853
1853
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1854
1854
|
(_, m) => {
|
|
1855
|
-
const p =
|
|
1855
|
+
const p = _t(m, _);
|
|
1856
1856
|
return p ? (p.push(m), p.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1857
1857
|
},
|
|
1858
1858
|
[]
|
|
1859
1859
|
);
|
|
1860
1860
|
});
|
|
1861
1861
|
function u(s) {
|
|
1862
|
-
const { offset: _ } = s, m =
|
|
1862
|
+
const { offset: _ } = s, m = _t(s, i.value);
|
|
1863
1863
|
if (!m)
|
|
1864
1864
|
return;
|
|
1865
1865
|
const p = m[m.findIndex((y) => y.id === s.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
@@ -1874,7 +1874,7 @@ function bo(t, e, r) {
|
|
|
1874
1874
|
y.forEach((T) => T.y0 += k), f.forEach((T) => T.y1 += k);
|
|
1875
1875
|
}
|
|
1876
1876
|
const d = v(() => (n.value && o.value.forEach((s) => {
|
|
1877
|
-
s.value === 0 && (s.fallbackColor =
|
|
1877
|
+
s.value === 0 && (s.fallbackColor = Ze.Grey), typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
1878
1878
|
}), n.value));
|
|
1879
1879
|
return C([l, r], () => {
|
|
1880
1880
|
try {
|
|
@@ -1884,21 +1884,21 @@ function bo(t, e, r) {
|
|
|
1884
1884
|
[m, p]
|
|
1885
1885
|
])({ nodes: o.value, links: a.value });
|
|
1886
1886
|
} catch (s) {
|
|
1887
|
-
io(
|
|
1887
|
+
io(Ht.GraphProblem, s), n.value = yo;
|
|
1888
1888
|
}
|
|
1889
1889
|
}), { columns: i, graph: d };
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function Ge(t, e) {
|
|
1892
1892
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1893
|
-
e[r.id] = n,
|
|
1893
|
+
e[r.id] = n, Ge(
|
|
1894
1894
|
r,
|
|
1895
1895
|
e
|
|
1896
1896
|
);
|
|
1897
1897
|
}), e;
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function je(t, e) {
|
|
1900
1900
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1901
|
-
e[r.id] = n,
|
|
1901
|
+
e[r.id] = n, je(
|
|
1902
1902
|
r,
|
|
1903
1903
|
e
|
|
1904
1904
|
);
|
|
@@ -1909,33 +1909,33 @@ function ko(t, e) {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
const xo = (t, e) => {
|
|
1911
1911
|
let r;
|
|
1912
|
-
|
|
1912
|
+
Ct(t) ? r = {
|
|
1913
1913
|
[t.id]: t.value,
|
|
1914
|
-
...
|
|
1915
|
-
...
|
|
1914
|
+
...Ge(t),
|
|
1915
|
+
...je(t)
|
|
1916
1916
|
} : r = {
|
|
1917
1917
|
[t.source.id]: t.source.value,
|
|
1918
1918
|
[t.target.id]: t.target.value,
|
|
1919
|
-
...
|
|
1920
|
-
...
|
|
1919
|
+
...Ge(t.source),
|
|
1920
|
+
...je(t.target)
|
|
1921
1921
|
};
|
|
1922
1922
|
const n = ko(r, e);
|
|
1923
1923
|
return { nodes: r, links: n };
|
|
1924
1924
|
}, To = (t) => {
|
|
1925
|
-
if (
|
|
1925
|
+
if (Ct(t)) {
|
|
1926
1926
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1927
1927
|
return {
|
|
1928
1928
|
nodes: e.reduce(
|
|
1929
|
-
(r, { source: n, target: o, value: a }) => n === t ? { ...r, [
|
|
1930
|
-
{ [
|
|
1929
|
+
(r, { source: n, target: o, value: a }) => n === t ? { ...r, [se(o)]: a } : { ...r, [se(n)]: a },
|
|
1930
|
+
{ [se(t)]: t.value }
|
|
1931
1931
|
),
|
|
1932
1932
|
links: e.map(({ id: r }) => r)
|
|
1933
1933
|
};
|
|
1934
1934
|
}
|
|
1935
1935
|
return {
|
|
1936
1936
|
nodes: {
|
|
1937
|
-
[
|
|
1938
|
-
[
|
|
1937
|
+
[se(t.target)]: t.value,
|
|
1938
|
+
[se(t.source)]: t.source.value
|
|
1939
1939
|
},
|
|
1940
1940
|
links: [t.id]
|
|
1941
1941
|
};
|
|
@@ -1948,7 +1948,7 @@ function Ao(t, e, r) {
|
|
|
1948
1948
|
return C(o, (a, l) => {
|
|
1949
1949
|
if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
|
|
1950
1950
|
t.value.forEach((i) => {
|
|
1951
|
-
i.node.id in l.nodes &&
|
|
1951
|
+
i.node.id in l.nodes && vt(
|
|
1952
1952
|
i,
|
|
1953
1953
|
l.nodes[i.node.id],
|
|
1954
1954
|
i.node.value,
|
|
@@ -1959,7 +1959,7 @@ function Ao(t, e, r) {
|
|
|
1959
1959
|
return;
|
|
1960
1960
|
}
|
|
1961
1961
|
t.value.forEach((i) => {
|
|
1962
|
-
i.node.id in a.nodes &&
|
|
1962
|
+
i.node.id in a.nodes && vt(
|
|
1963
1963
|
i,
|
|
1964
1964
|
i.node.value,
|
|
1965
1965
|
a.nodes[i.node.id],
|
|
@@ -1971,7 +1971,7 @@ function Ao(t, e, r) {
|
|
|
1971
1971
|
const Lo = /* @__PURE__ */ H({
|
|
1972
1972
|
__name: "lume-alluvial-group",
|
|
1973
1973
|
props: {
|
|
1974
|
-
...
|
|
1974
|
+
...Oe(),
|
|
1975
1975
|
hoveredElementId: {
|
|
1976
1976
|
type: [Number, String],
|
|
1977
1977
|
default: null
|
|
@@ -1979,11 +1979,11 @@ const Lo = /* @__PURE__ */ H({
|
|
|
1979
1979
|
},
|
|
1980
1980
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1981
1981
|
setup(t, { emit: e }) {
|
|
1982
|
-
const r = t, n =
|
|
1982
|
+
const r = t, n = pe("chartID"), { data: o, options: a } = B(r), l = O([]), i = O([]), u = O(null), { extents: c, updateExtents: d } = lo(r.containerSize), { columns: s, graph: _ } = bo(o, a, c), { hoveredElement: m, highlightedElements: p } = Ao(
|
|
1983
1983
|
l,
|
|
1984
1984
|
a,
|
|
1985
1985
|
_
|
|
1986
|
-
), h = v(() =>
|
|
1986
|
+
), h = v(() => Te(a.value.valueFormat)), y = v(
|
|
1987
1987
|
() => Object.keys(p.value.nodes)
|
|
1988
1988
|
), f = v(() => s.value ? s.value.map(
|
|
1989
1989
|
(g) => g[0].x0 + a.value.nodeWidth / 2
|
|
@@ -1998,33 +1998,34 @@ const Lo = /* @__PURE__ */ H({
|
|
|
1998
1998
|
), x = v(() => {
|
|
1999
1999
|
if (!(!a.value.gradient || !_.value))
|
|
2000
2000
|
return _.value.links.reduce((g, N) => {
|
|
2001
|
-
const { source: R, target:
|
|
2001
|
+
const { source: R, target: X } = N, U = R.color || R.fallbackColor, G = X.deriveColorFromIncomingLinks ? U : X.color || X.fallbackColor;
|
|
2002
2002
|
return g[N.id] = {
|
|
2003
|
-
source:
|
|
2004
|
-
target:
|
|
2003
|
+
source: U,
|
|
2004
|
+
target: G,
|
|
2005
2005
|
x1: R.x1,
|
|
2006
|
-
x2:
|
|
2006
|
+
x2: X.x0
|
|
2007
2007
|
}, g;
|
|
2008
2008
|
}, {});
|
|
2009
|
-
}),
|
|
2009
|
+
}), $ = v(() => {
|
|
2010
2010
|
const g = l.value.filter(
|
|
2011
|
-
(R) =>
|
|
2011
|
+
(R) => V(R)
|
|
2012
2012
|
), N = [];
|
|
2013
2013
|
return g.forEach((R) => {
|
|
2014
|
-
const
|
|
2015
|
-
i.value.filter(({ link:
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2014
|
+
const X = [];
|
|
2015
|
+
i.value.filter(({ link: U }) => U.target.id === R.node.id).reverse().reduce((U, G, Qe, le) => {
|
|
2016
|
+
const ye = G.link.target.y1 - G.link.target.y0 > ce;
|
|
2017
|
+
let ue, be, ie;
|
|
2018
|
+
return ye ? (ue = G.link.target.y1 - G.link.target.y0, be = G.link.value / R.node.value, ie = be * ue) : (ue = ce, ie = ce / le.length), X.push({
|
|
2018
2019
|
x: R.x,
|
|
2019
|
-
y: R.y +
|
|
2020
|
-
height:
|
|
2020
|
+
y: R.y + U,
|
|
2021
|
+
height: ie,
|
|
2021
2022
|
width: R.width,
|
|
2022
|
-
key: `node-block-${R.node.id}-source-link-${
|
|
2023
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2024
|
-
}),
|
|
2023
|
+
key: `node-block-${R.node.id}-source-link-${G.link.source.id}`,
|
|
2024
|
+
class: `lume-alluvial-group__node-block lume-fill--${G.link.source.color || ge}`
|
|
2025
|
+
}), U + ie;
|
|
2025
2026
|
}, 0), N.push({
|
|
2026
2027
|
id: R.node.id,
|
|
2027
|
-
subNodes:
|
|
2028
|
+
subNodes: X
|
|
2028
2029
|
});
|
|
2029
2030
|
}), N;
|
|
2030
2031
|
});
|
|
@@ -2040,13 +2041,13 @@ const Lo = /* @__PURE__ */ H({
|
|
|
2040
2041
|
function P(g) {
|
|
2041
2042
|
return p.value.links.length > 0 && !p.value.links.includes(g);
|
|
2042
2043
|
}
|
|
2043
|
-
function
|
|
2044
|
+
function j(g) {
|
|
2044
2045
|
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2045
2046
|
}
|
|
2046
|
-
function
|
|
2047
|
+
function V(g) {
|
|
2047
2048
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
2048
2049
|
}
|
|
2049
|
-
function
|
|
2050
|
+
function Z(g, N) {
|
|
2050
2051
|
g !== m.value && (m.value = g, e("link-mouseenter", { link: g, event: N }));
|
|
2051
2052
|
}
|
|
2052
2053
|
function ne(g) {
|
|
@@ -2065,9 +2066,9 @@ const Lo = /* @__PURE__ */ H({
|
|
|
2065
2066
|
}
|
|
2066
2067
|
m.value = N;
|
|
2067
2068
|
}
|
|
2068
|
-
function
|
|
2069
|
+
function I(g) {
|
|
2069
2070
|
var N;
|
|
2070
|
-
return ((N =
|
|
2071
|
+
return ((N = $.value.find(({ id: R }) => g === R)) == null ? void 0 : N.subNodes) ?? [];
|
|
2071
2072
|
}
|
|
2072
2073
|
function E() {
|
|
2073
2074
|
const g = _o(_.value, u.value);
|
|
@@ -2077,7 +2078,7 @@ const Lo = /* @__PURE__ */ H({
|
|
|
2077
2078
|
l.value = fo(g.nodes), i.value = go(g.links).reverse(), m.value == null && r.hoveredElementId != null && q(r.hoveredElementId);
|
|
2078
2079
|
}), C([r.containerSize, u], () => {
|
|
2079
2080
|
r.containerSize.width && r.containerSize.height && E();
|
|
2080
|
-
}), C(() => r.hoveredElementId, q), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: T, gradients: x, nodesDerivingColorFromIncomingLinks:
|
|
2081
|
+
}), C(() => r.hoveredElementId, q), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: T, gradients: x, nodesDerivingColorFromIncomingLinks: $, getLinkStroke: A, isNodeFaded: D, isNodeFocused: F, isLinkFaded: P, isLinkFocused: j, shouldDeriveNodeColorFromIncomingLinks: V, handleLinkMouseover: Z, handleLinkMouseleave: ne, handleExternalHover: q, getSubNodesDerivingColorFromIncomingLinks: I, updateMargins: E, LumeAlluvialNodeLabel: eo, LumeAlluvialNodeValue: ao, GHOST_STROKE_WIDTH_OFFSET: Ur };
|
|
2081
2082
|
}
|
|
2082
2083
|
});
|
|
2083
2084
|
var Oo = function() {
|
|
@@ -2132,17 +2133,17 @@ var Oo = function() {
|
|
|
2132
2133
|
o.node.value
|
|
2133
2134
|
) })], 2)], 2)]);
|
|
2134
2135
|
})], 2);
|
|
2135
|
-
},
|
|
2136
|
+
}, $o = [], Io = /* @__PURE__ */ w(
|
|
2136
2137
|
Lo,
|
|
2137
2138
|
Oo,
|
|
2138
|
-
|
|
2139
|
+
$o,
|
|
2139
2140
|
!1,
|
|
2140
2141
|
null,
|
|
2141
|
-
"
|
|
2142
|
+
"f004e5fb",
|
|
2142
2143
|
null,
|
|
2143
2144
|
null
|
|
2144
2145
|
);
|
|
2145
|
-
const Eo =
|
|
2146
|
+
const Eo = Io.exports, wo = {
|
|
2146
2147
|
margins: {
|
|
2147
2148
|
top: 0,
|
|
2148
2149
|
right: 0,
|
|
@@ -2164,10 +2165,10 @@ const Eo = $o.exports, wo = {
|
|
|
2164
2165
|
}, No = /* @__PURE__ */ H({
|
|
2165
2166
|
__name: "lume-alluvial-diagram",
|
|
2166
2167
|
props: {
|
|
2167
|
-
|
|
2168
|
+
...$r(Me)
|
|
2168
2169
|
},
|
|
2169
2170
|
setup(t, { emit: e }) {
|
|
2170
|
-
const r = t, { componentEventPropagator: n } = Q(e), o = ae(
|
|
2171
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), a = vn(z()), { options: l } = B(r), { allOptions: i } = J(l, wo);
|
|
2171
2172
|
function u(c) {
|
|
2172
2173
|
return {
|
|
2173
2174
|
...c,
|
|
@@ -2175,7 +2176,7 @@ const Eo = $o.exports, wo = {
|
|
|
2175
2176
|
// Alluvial chart never uses base scales
|
|
2176
2177
|
};
|
|
2177
2178
|
}
|
|
2178
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, groupSlots: a, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart:
|
|
2179
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, groupSlots: a, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: ve, LumeAlluvialGroup: Eo };
|
|
2179
2180
|
}
|
|
2180
2181
|
});
|
|
2181
2182
|
var Ho = function() {
|
|
@@ -2202,29 +2203,29 @@ var Ho = function() {
|
|
|
2202
2203
|
null
|
|
2203
2204
|
);
|
|
2204
2205
|
const Wa = Do.exports;
|
|
2205
|
-
var
|
|
2206
|
+
var Ve = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ve || {});
|
|
2206
2207
|
const Ro = /* @__PURE__ */ H({
|
|
2207
2208
|
__name: "lume-bar-chart",
|
|
2208
2209
|
props: {
|
|
2209
|
-
...
|
|
2210
|
+
...de(),
|
|
2210
2211
|
type: {
|
|
2211
2212
|
type: String,
|
|
2212
2213
|
default: null,
|
|
2213
|
-
validator: (t) => t in
|
|
2214
|
+
validator: (t) => t in Ve || t == null
|
|
2214
2215
|
}
|
|
2215
2216
|
},
|
|
2216
2217
|
setup(t, { emit: e }) {
|
|
2217
|
-
const r = t, n =
|
|
2218
|
+
const r = t, n = we(
|
|
2218
2219
|
() => import("./common/42f5d2fc.js")
|
|
2219
|
-
), o =
|
|
2220
|
+
), o = we(
|
|
2220
2221
|
() => import("./common/abc9d23d.js")
|
|
2221
|
-
), a =
|
|
2222
|
+
), a = we(
|
|
2222
2223
|
() => import("./common/0664fd4d.js")
|
|
2223
2224
|
), l = /* @__PURE__ */ new Map([
|
|
2224
2225
|
["single", n],
|
|
2225
2226
|
["grouped", o],
|
|
2226
2227
|
["stacked", a]
|
|
2227
|
-
]), { componentEventPropagator: i } = Q(e), u = ae(
|
|
2228
|
+
]), { componentEventPropagator: i } = Q(e), u = ae(z());
|
|
2228
2229
|
function c(s) {
|
|
2229
2230
|
return {
|
|
2230
2231
|
...s,
|
|
@@ -2238,14 +2239,14 @@ const Ro = /* @__PURE__ */ H({
|
|
|
2238
2239
|
}
|
|
2239
2240
|
const d = v(() => {
|
|
2240
2241
|
if (r.data) {
|
|
2241
|
-
if (
|
|
2242
|
+
if (Me(r.data))
|
|
2242
2243
|
return l.get("single");
|
|
2243
2244
|
if (!r.type)
|
|
2244
2245
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2245
2246
|
return l.get(r.type);
|
|
2246
2247
|
}
|
|
2247
2248
|
});
|
|
2248
|
-
return { __sfc: !0, TYPES:
|
|
2249
|
+
return { __sfc: !0, TYPES: Ve, LumeSingleBarChart: n, LumeGroupedBarChart: o, LumeStackedBarChart: a, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: d };
|
|
2249
2250
|
}
|
|
2250
2251
|
});
|
|
2251
2252
|
var Po = function() {
|
|
@@ -2286,12 +2287,12 @@ const jo = (t = !1) => ({
|
|
|
2286
2287
|
}
|
|
2287
2288
|
} : {}
|
|
2288
2289
|
});
|
|
2289
|
-
function
|
|
2290
|
+
function Dt(t, e) {
|
|
2290
2291
|
const r = v(() => t.value.map((o) => {
|
|
2291
2292
|
var a;
|
|
2292
2293
|
return {
|
|
2293
2294
|
...o,
|
|
2294
|
-
values:
|
|
2295
|
+
values: ze(
|
|
2295
2296
|
o.values,
|
|
2296
2297
|
((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) ?? 0
|
|
2297
2298
|
).map((l) => ({
|
|
@@ -2335,7 +2336,7 @@ function zo(t, e, r, n, o, a) {
|
|
|
2335
2336
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2336
2337
|
}
|
|
2337
2338
|
function d(s, _, m) {
|
|
2338
|
-
const { value: p, color: h } = s, y = h ?? t.value[_].color ??
|
|
2339
|
+
const { value: p, color: h } = s, y = h ?? t.value[_].color ?? ge, { x: f, y: k } = i(p, m), T = u(p), x = c(p);
|
|
2339
2340
|
return {
|
|
2340
2341
|
classList: [`lume-fill--${y}`, ...a],
|
|
2341
2342
|
x: f,
|
|
@@ -2351,7 +2352,7 @@ function zo(t, e, r, n, o, a) {
|
|
|
2351
2352
|
function Wo(t, e, r, n, o, a) {
|
|
2352
2353
|
const l = v(
|
|
2353
2354
|
() => n.value === L.HORIZONTAL
|
|
2354
|
-
), i = v(() =>
|
|
2355
|
+
), i = v(() => _e().domain(t.value.map((p, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => _e().domain(t.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
2355
2356
|
function c(p, h, y) {
|
|
2356
2357
|
if (l.value)
|
|
2357
2358
|
return p >= 0 ? e.value(0) : e.value(p);
|
|
@@ -2372,11 +2373,11 @@ function Wo(t, e, r, n, o, a) {
|
|
|
2372
2373
|
return l.value ? u.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
|
|
2373
2374
|
}
|
|
2374
2375
|
function m(p, h, y) {
|
|
2375
|
-
const { value: f, color: k } = p, T = k ?? t.value[h].color ?? Object.values(
|
|
2376
|
+
const { value: f, color: k } = p, T = k ?? t.value[h].color ?? Object.values(W)[h], x = c(f, y, h), $ = d(f, y, h), A = s(f), D = _(f);
|
|
2376
2377
|
return {
|
|
2377
2378
|
classList: [`lume-fill--${T}`, ...a],
|
|
2378
2379
|
x,
|
|
2379
|
-
y:
|
|
2380
|
+
y: $,
|
|
2380
2381
|
width: A,
|
|
2381
2382
|
height: D,
|
|
2382
2383
|
isFaded: o.value !== -1 && o.value !== y,
|
|
@@ -2403,9 +2404,9 @@ function Zo(t, e, r) {
|
|
|
2403
2404
|
return Math.max(...u);
|
|
2404
2405
|
});
|
|
2405
2406
|
function l(u, c, d) {
|
|
2406
|
-
return n.value ?
|
|
2407
|
-
|
|
2408
|
-
|
|
2407
|
+
return n.value ? fe().domain([o.value, a.value]).range([0, d.width]) : Object.assign(
|
|
2408
|
+
ut(
|
|
2409
|
+
_e().domain(c.map((s, _) => _)).range([0, d.width]),
|
|
2409
2410
|
e.value,
|
|
2410
2411
|
r.value
|
|
2411
2412
|
),
|
|
@@ -2414,13 +2415,13 @@ function Zo(t, e, r) {
|
|
|
2414
2415
|
}
|
|
2415
2416
|
function i(u, c, d) {
|
|
2416
2417
|
return n.value ? Object.assign(
|
|
2417
|
-
|
|
2418
|
-
|
|
2418
|
+
ut(
|
|
2419
|
+
_e().domain(c.map((s, _) => _)).range([0, d.height]),
|
|
2419
2420
|
e.value,
|
|
2420
2421
|
r.value
|
|
2421
2422
|
),
|
|
2422
2423
|
{ labels: c }
|
|
2423
|
-
) :
|
|
2424
|
+
) : fe().domain([a.value, o.value]).range([0, d.height]);
|
|
2424
2425
|
}
|
|
2425
2426
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2426
2427
|
}
|
|
@@ -2433,8 +2434,8 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2433
2434
|
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2434
2435
|
);
|
|
2435
2436
|
function c(f, k, T) {
|
|
2436
|
-
let x,
|
|
2437
|
-
return l.value ? (x = e.value(f >= 0 ? 0 + T : f + T),
|
|
2437
|
+
let x, $;
|
|
2438
|
+
return l.value ? (x = e.value(f >= 0 ? 0 + T : f + T), $ = r.value(i.value[k])) : (x = e.value(i.value[k]), $ = r.value(f >= 0 ? f + T : 0 + T)), { x, y: $ };
|
|
2438
2439
|
}
|
|
2439
2440
|
function d(f) {
|
|
2440
2441
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
@@ -2449,33 +2450,33 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2449
2450
|
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2450
2451
|
}
|
|
2451
2452
|
function p(f, k) {
|
|
2452
|
-
return f ? u.value.reduce((T, x,
|
|
2453
|
+
return f ? u.value.reduce((T, x, $) => ($ < f && x[k] >= 0 && (T += x[k]), T), 0) : 0;
|
|
2453
2454
|
}
|
|
2454
2455
|
function h(f, k) {
|
|
2455
|
-
return f ? u.value.reduce((T, x,
|
|
2456
|
+
return f ? u.value.reduce((T, x, $) => ($ < f && x[k] < 0 && (T += x[k]), T), 0) : 0;
|
|
2456
2457
|
}
|
|
2457
2458
|
function y(f, k, T) {
|
|
2458
|
-
const { value: x, color:
|
|
2459
|
+
const { value: x, color: $ } = f, A = x >= 0 ? d(x) : s(x), D = x >= 0 ? _(x) : m(x), F = x >= 0 ? p(k, T) : h(k, T), { x: P, y: j } = c(x, T, F);
|
|
2459
2460
|
return {
|
|
2460
|
-
classList: [`lume-fill--${
|
|
2461
|
+
classList: [`lume-fill--${$ ?? t.value[k].color ?? Object.values(W)[k]}`, ...a],
|
|
2461
2462
|
width: A,
|
|
2462
2463
|
height: D,
|
|
2463
2464
|
x: P,
|
|
2464
|
-
y:
|
|
2465
|
+
y: j,
|
|
2465
2466
|
isFaded: o.value !== -1 && o.value !== T,
|
|
2466
2467
|
isNegative: x < 0
|
|
2467
2468
|
};
|
|
2468
2469
|
}
|
|
2469
2470
|
return { barAttributeGenerator: y };
|
|
2470
2471
|
}
|
|
2471
|
-
const
|
|
2472
|
+
const ft = {
|
|
2472
2473
|
single: zo,
|
|
2473
2474
|
grouped: Wo,
|
|
2474
2475
|
stacked: Xo
|
|
2475
2476
|
}, Uo = /* @__PURE__ */ H({
|
|
2476
2477
|
__name: "lume-bar-group",
|
|
2477
2478
|
props: {
|
|
2478
|
-
...
|
|
2479
|
+
...Oe(),
|
|
2479
2480
|
classList: {
|
|
2480
2481
|
type: [String, Array],
|
|
2481
2482
|
default: () => []
|
|
@@ -2498,8 +2499,8 @@ const vt = {
|
|
|
2498
2499
|
yScale: c,
|
|
2499
2500
|
classList: d,
|
|
2500
2501
|
labels: s
|
|
2501
|
-
} = B(r), _ =
|
|
2502
|
-
const
|
|
2502
|
+
} = B(r), _ = pe("chartID"), { emitInternalEvent: m } = Q(e, _), { groupedData: p } = Dt(n, s), { barXScale: h, barYScale: y } = Mo(u, c, a), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2503
|
+
const $ = Vo(n, i), { barAttributeGenerator: A } = ft[$](
|
|
2503
2504
|
n,
|
|
2504
2505
|
h,
|
|
2505
2506
|
y,
|
|
@@ -2512,10 +2513,10 @@ const vt = {
|
|
|
2512
2513
|
if (l.value)
|
|
2513
2514
|
return a.value === L.HORIZONTAL ? "width" : "height";
|
|
2514
2515
|
});
|
|
2515
|
-
async function x(
|
|
2516
|
-
e("lume__internal--hover",
|
|
2516
|
+
async function x($) {
|
|
2517
|
+
e("lume__internal--hover", $), m("lume__internal--hover", $);
|
|
2517
2518
|
}
|
|
2518
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2519
|
+
return { __sfc: !0, MIXIN_MAP: ft, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: T, handleInternalHover: x, LumeBar: Ue };
|
|
2519
2520
|
}
|
|
2520
2521
|
});
|
|
2521
2522
|
var Yo = function() {
|
|
@@ -2543,7 +2544,7 @@ var Yo = function() {
|
|
|
2543
2544
|
null,
|
|
2544
2545
|
null
|
|
2545
2546
|
);
|
|
2546
|
-
const
|
|
2547
|
+
const Je = Jo.exports, Qo = {
|
|
2547
2548
|
[L.VERTICAL]: {
|
|
2548
2549
|
withTooltip: !0,
|
|
2549
2550
|
xAxisOptions: {},
|
|
@@ -2559,14 +2560,14 @@ const Ye = Jo.exports, Qo = {
|
|
|
2559
2560
|
}, qo = /* @__PURE__ */ H({
|
|
2560
2561
|
__name: "lume-single-bar-chart",
|
|
2561
2562
|
props: {
|
|
2562
|
-
...
|
|
2563
|
+
...de(Me)
|
|
2563
2564
|
},
|
|
2564
2565
|
setup(t, { emit: e }) {
|
|
2565
|
-
const r = t, { componentEventPropagator: n } = Q(e), o = ae(
|
|
2566
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { orientation: a, options: l } = B(r), i = v(
|
|
2566
2567
|
() => Qo[a.value || L.VERTICAL]
|
|
2567
2568
|
// needs to be computed so that default options are reactive
|
|
2568
2569
|
), { allOptions: u } = J(l, i);
|
|
2569
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2570
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup: Je };
|
|
2570
2571
|
}
|
|
2571
2572
|
});
|
|
2572
2573
|
var ea = function() {
|
|
@@ -2605,17 +2606,17 @@ const Xa = na.exports, ra = {
|
|
|
2605
2606
|
}, oa = /* @__PURE__ */ H({
|
|
2606
2607
|
__name: "lume-grouped-bar-chart",
|
|
2607
2608
|
props: {
|
|
2608
|
-
...
|
|
2609
|
+
...de()
|
|
2609
2610
|
},
|
|
2610
2611
|
setup(t, { emit: e }) {
|
|
2611
|
-
const r = t, { componentEventPropagator: n } = Q(e), o = ae(
|
|
2612
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { orientation: a, options: l } = B(r), i = v(
|
|
2612
2613
|
() => ra[a.value || L.VERTICAL]
|
|
2613
2614
|
// needs to be computed so that default options are reactive
|
|
2614
2615
|
), { allOptions: u } = J(
|
|
2615
2616
|
l,
|
|
2616
2617
|
i
|
|
2617
2618
|
);
|
|
2618
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2619
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup: Je };
|
|
2619
2620
|
}
|
|
2620
2621
|
});
|
|
2621
2622
|
var aa = function() {
|
|
@@ -2654,21 +2655,21 @@ const Ua = ua.exports, ia = {
|
|
|
2654
2655
|
}, sa = /* @__PURE__ */ H({
|
|
2655
2656
|
__name: "lume-stacked-bar-chart",
|
|
2656
2657
|
props: {
|
|
2657
|
-
...
|
|
2658
|
+
...de()
|
|
2658
2659
|
},
|
|
2659
2660
|
setup(t, { emit: e }) {
|
|
2660
|
-
const r = t, { componentEventPropagator: n } = Q(e), o = ae(
|
|
2661
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { data: a, orientation: l, options: i, labels: u } = B(r), c = v(
|
|
2661
2662
|
() => ia[l.value || L.VERTICAL]
|
|
2662
2663
|
// needs to be computed so that default options are reactive
|
|
2663
2664
|
), { allOptions: d } = J(
|
|
2664
2665
|
i,
|
|
2665
2666
|
c
|
|
2666
|
-
), { internalData: s } =
|
|
2667
|
+
), { internalData: s } = Ke(a), { groupedData: _ } = Dt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = Zo(
|
|
2667
2668
|
_,
|
|
2668
2669
|
l,
|
|
2669
2670
|
i
|
|
2670
2671
|
);
|
|
2671
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, LumeChart:
|
|
2672
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, LumeChart: ve, LumeBarGroup: Je };
|
|
2672
2673
|
}
|
|
2673
2674
|
});
|
|
2674
2675
|
var ca = function() {
|
|
@@ -2690,7 +2691,7 @@ var ca = function() {
|
|
|
2690
2691
|
null,
|
|
2691
2692
|
null
|
|
2692
2693
|
);
|
|
2693
|
-
const Ya = va.exports,
|
|
2694
|
+
const Ya = va.exports, pt = 2, _a = /* @__PURE__ */ H({
|
|
2694
2695
|
__name: "lume-line",
|
|
2695
2696
|
props: {
|
|
2696
2697
|
pathDefinition: {
|
|
@@ -2699,11 +2700,11 @@ const Ya = va.exports, _t = 2, _a = /* @__PURE__ */ H({
|
|
|
2699
2700
|
},
|
|
2700
2701
|
width: {
|
|
2701
2702
|
type: Number,
|
|
2702
|
-
default:
|
|
2703
|
+
default: pt
|
|
2703
2704
|
},
|
|
2704
2705
|
color: {
|
|
2705
2706
|
type: String,
|
|
2706
|
-
default:
|
|
2707
|
+
default: W.Skyblue
|
|
2707
2708
|
},
|
|
2708
2709
|
dashed: {
|
|
2709
2710
|
type: Boolean,
|
|
@@ -2725,7 +2726,7 @@ const Ya = va.exports, _t = 2, _a = /* @__PURE__ */ H({
|
|
|
2725
2726
|
emits: ["click"],
|
|
2726
2727
|
setup(t, { emit: e }) {
|
|
2727
2728
|
const r = O(null);
|
|
2728
|
-
return te(() =>
|
|
2729
|
+
return te(() => Le(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: pt, emit: e, root: r };
|
|
2729
2730
|
}
|
|
2730
2731
|
});
|
|
2731
2732
|
var fa = function() {
|
|
@@ -2750,18 +2751,18 @@ var fa = function() {
|
|
|
2750
2751
|
null,
|
|
2751
2752
|
null
|
|
2752
2753
|
);
|
|
2753
|
-
const ha = ma.exports,
|
|
2754
|
+
const ha = ma.exports, mt = 4, ga = /* @__PURE__ */ H({
|
|
2754
2755
|
__name: "lume-point",
|
|
2755
2756
|
props: {
|
|
2756
2757
|
x: { type: Number, required: !0 },
|
|
2757
2758
|
y: { type: Number, required: !0 },
|
|
2758
2759
|
color: {
|
|
2759
2760
|
type: String,
|
|
2760
|
-
default:
|
|
2761
|
+
default: W.Skyblue
|
|
2761
2762
|
},
|
|
2762
2763
|
radius: {
|
|
2763
2764
|
type: Number,
|
|
2764
|
-
default:
|
|
2765
|
+
default: mt
|
|
2765
2766
|
},
|
|
2766
2767
|
active: {
|
|
2767
2768
|
type: Boolean,
|
|
@@ -2771,7 +2772,7 @@ const ha = ma.exports, ft = 4, ga = /* @__PURE__ */ H({
|
|
|
2771
2772
|
emits: ["click"],
|
|
2772
2773
|
setup(t, { emit: e }) {
|
|
2773
2774
|
const r = t, n = O(null), o = v(() => r.radius / 2);
|
|
2774
|
-
return te(() =>
|
|
2775
|
+
return te(() => Le(n.value)), { __sfc: !0, DEFAULT_RADIUS: mt, props: r, emit: e, root: n, strokeWidth: o };
|
|
2775
2776
|
}
|
|
2776
2777
|
});
|
|
2777
2778
|
var ya = function() {
|
|
@@ -2790,7 +2791,7 @@ var ya = function() {
|
|
|
2790
2791
|
null
|
|
2791
2792
|
);
|
|
2792
2793
|
const xa = ka.exports;
|
|
2793
|
-
function
|
|
2794
|
+
function Rt(t) {
|
|
2794
2795
|
function e(a) {
|
|
2795
2796
|
let l = null;
|
|
2796
2797
|
return a == null ? void 0 : a.reduce((i, u, c) => (u == null || u.value == null ? (l ? l.push(c) : l = [c], c === (a == null ? void 0 : a.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
@@ -2826,7 +2827,7 @@ function Ct(t) {
|
|
|
2826
2827
|
c.length,
|
|
2827
2828
|
c.indexOf(u)
|
|
2828
2829
|
),
|
|
2829
|
-
label:
|
|
2830
|
+
label: Lt
|
|
2830
2831
|
};
|
|
2831
2832
|
}
|
|
2832
2833
|
return i;
|
|
@@ -2846,10 +2847,10 @@ function La(t, e, r, n) {
|
|
|
2846
2847
|
Y(r) ? Ta(r, t) : Aa(r, t)
|
|
2847
2848
|
).y((a) => n(a))(e);
|
|
2848
2849
|
}
|
|
2849
|
-
const
|
|
2850
|
+
const ht = 1, Oa = /* @__PURE__ */ H({
|
|
2850
2851
|
__name: "lume-line-group",
|
|
2851
2852
|
props: {
|
|
2852
|
-
...
|
|
2853
|
+
...Oe(),
|
|
2853
2854
|
withPoints: {
|
|
2854
2855
|
type: Boolean,
|
|
2855
2856
|
default: !0
|
|
@@ -2861,10 +2862,10 @@ const pt = 1, Oa = /* @__PURE__ */ H({
|
|
|
2861
2862
|
},
|
|
2862
2863
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2863
2864
|
setup(t, { emit: e }) {
|
|
2864
|
-
const r = t, { data: n, options: o, xScale: a, yScale: l, labels: i } = B(r), u =
|
|
2865
|
+
const r = t, { data: n, options: o, xScale: a, yScale: l, labels: i } = B(r), u = pe(
|
|
2865
2866
|
"tooltipAnchorAttributes",
|
|
2866
2867
|
null
|
|
2867
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
2868
|
+
), { updateTooltipAnchorAttributes: c } = Nt(
|
|
2868
2869
|
u,
|
|
2869
2870
|
o,
|
|
2870
2871
|
a,
|
|
@@ -2873,7 +2874,7 @@ const pt = 1, Oa = /* @__PURE__ */ H({
|
|
|
2873
2874
|
), d = v(() => {
|
|
2874
2875
|
if (n.value.every((D) => D.isDashed))
|
|
2875
2876
|
return n.value;
|
|
2876
|
-
const { computedLineData: A } =
|
|
2877
|
+
const { computedLineData: A } = Rt(n);
|
|
2877
2878
|
return o.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
|
|
2878
2879
|
}), s = v(() => {
|
|
2879
2880
|
if (r.hoveredIndex === -1)
|
|
@@ -2883,12 +2884,12 @@ const pt = 1, Oa = /* @__PURE__ */ H({
|
|
|
2883
2884
|
r.hoveredIndex
|
|
2884
2885
|
);
|
|
2885
2886
|
return {
|
|
2886
|
-
d: `M ${
|
|
2887
|
+
d: `M ${Re(a.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2887
2888
|
V ${l.value(A)}`
|
|
2888
2889
|
// Move to X index, Vertical line to the highest point
|
|
2889
2890
|
};
|
|
2890
2891
|
}), _ = v(
|
|
2891
|
-
() => a.value &&
|
|
2892
|
+
() => a.value && ht / (sn(a.value) - 1)
|
|
2892
2893
|
// Subtracting the first line (read below)
|
|
2893
2894
|
), m = v(
|
|
2894
2895
|
() => {
|
|
@@ -2905,10 +2906,10 @@ const pt = 1, Oa = /* @__PURE__ */ H({
|
|
|
2905
2906
|
return d.value[A].values;
|
|
2906
2907
|
}
|
|
2907
2908
|
function k(A, D) {
|
|
2908
|
-
var P,
|
|
2909
|
+
var P, j;
|
|
2909
2910
|
const F = A === 0 ? [] : [
|
|
2910
2911
|
(P = f(D)[A - 1]) == null ? void 0 : P.value,
|
|
2911
|
-
(
|
|
2912
|
+
(j = f(D)[A]) == null ? void 0 : j.value
|
|
2912
2913
|
];
|
|
2913
2914
|
return La(
|
|
2914
2915
|
A,
|
|
@@ -2931,13 +2932,13 @@ const pt = 1, Oa = /* @__PURE__ */ H({
|
|
|
2931
2932
|
y: l.value(F)
|
|
2932
2933
|
};
|
|
2933
2934
|
}
|
|
2934
|
-
function
|
|
2935
|
+
function $(A) {
|
|
2935
2936
|
return r.hoveredIndex === A;
|
|
2936
2937
|
}
|
|
2937
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2938
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: ht, props: r, emit: e, data: n, options: o, xScale: a, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: T, getPointPosition: x, isPointActive: $, LumeLine: ha, LumePoint: xa };
|
|
2938
2939
|
}
|
|
2939
2940
|
});
|
|
2940
|
-
var
|
|
2941
|
+
var $a = function() {
|
|
2941
2942
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2942
2943
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(o, a) {
|
|
2943
2944
|
return r("g", { key: o.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(o.values, function(l, i) {
|
|
@@ -2950,17 +2951,17 @@ var Ia = function() {
|
|
|
2950
2951
|
} } }, "lume-point", n.getPointPosition(i, a), !1));
|
|
2951
2952
|
}), 1) : e._e()]);
|
|
2952
2953
|
})], 2);
|
|
2953
|
-
},
|
|
2954
|
+
}, Ia = [], Ea = /* @__PURE__ */ w(
|
|
2954
2955
|
Oa,
|
|
2955
|
-
Ia,
|
|
2956
2956
|
$a,
|
|
2957
|
+
Ia,
|
|
2957
2958
|
!1,
|
|
2958
2959
|
null,
|
|
2959
2960
|
"649a5210",
|
|
2960
2961
|
null,
|
|
2961
2962
|
null
|
|
2962
2963
|
);
|
|
2963
|
-
const
|
|
2964
|
+
const Pt = Ea.exports, wa = {
|
|
2964
2965
|
margins: oe.VERTICAL,
|
|
2965
2966
|
startOnZero: !0,
|
|
2966
2967
|
withTooltip: !0,
|
|
@@ -2969,11 +2970,11 @@ const Dt = Ea.exports, wa = {
|
|
|
2969
2970
|
}, Na = /* @__PURE__ */ H({
|
|
2970
2971
|
__name: "lume-line-chart",
|
|
2971
2972
|
props: {
|
|
2972
|
-
...
|
|
2973
|
+
...de(null, !1)
|
|
2973
2974
|
},
|
|
2974
2975
|
setup(t, { emit: e }) {
|
|
2975
|
-
const r = t, { componentEventPropagator: n } = Q(e), o = ae(
|
|
2976
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart:
|
|
2976
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { options: a } = B(r), { allOptions: l } = J(a, wa);
|
|
2977
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ve, LumeLineGroup: Pt };
|
|
2977
2978
|
}
|
|
2978
2979
|
});
|
|
2979
2980
|
var Ha = function() {
|
|
@@ -3023,11 +3024,11 @@ const Pa = {
|
|
|
3023
3024
|
}, Sa = /* @__PURE__ */ H({
|
|
3024
3025
|
__name: "lume-sparkline-chart",
|
|
3025
3026
|
props: {
|
|
3026
|
-
...
|
|
3027
|
-
...
|
|
3027
|
+
...Ye(null),
|
|
3028
|
+
...me()
|
|
3028
3029
|
},
|
|
3029
3030
|
setup(t, { expose: e, emit: r }) {
|
|
3030
|
-
const n = t, { componentEventPropagator: o } = Q(r), a = ae(
|
|
3031
|
+
const n = t, { componentEventPropagator: o } = Q(r), a = ae(z()), { data: l, options: i } = B(n), { internalData: u } = Ke(l), { allOptions: c } = J(i, Pa), { computedLineData: d } = Rt(u), { areaPathDefinition: s } = Ra(d), _ = v(() => u.value[0].color), m = v(
|
|
3031
3032
|
() => l.value[0].areaColor || _.value
|
|
3032
3033
|
);
|
|
3033
3034
|
function p(y) {
|
|
@@ -3037,11 +3038,11 @@ const Pa = {
|
|
|
3037
3038
|
};
|
|
3038
3039
|
}
|
|
3039
3040
|
function h(y, f, k) {
|
|
3040
|
-
return
|
|
3041
|
+
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3041
3042
|
}
|
|
3042
3043
|
return e({
|
|
3043
3044
|
areaPathDefinition: s
|
|
3044
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart:
|
|
3045
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart: ve, LumeLineGroup: Pt };
|
|
3045
3046
|
}
|
|
3046
3047
|
});
|
|
3047
3048
|
var Ba = function() {
|
|
@@ -3075,16 +3076,16 @@ export {
|
|
|
3075
3076
|
eo as LumeAlluvialNodeLabel,
|
|
3076
3077
|
ao as LumeAlluvialNodeValue,
|
|
3077
3078
|
Nn as LumeAxis,
|
|
3078
|
-
|
|
3079
|
+
Ue as LumeBar,
|
|
3079
3080
|
Za as LumeBarChart,
|
|
3080
|
-
|
|
3081
|
-
|
|
3081
|
+
Je as LumeBarGroup,
|
|
3082
|
+
ve as LumeChart,
|
|
3082
3083
|
Mn as LumeChartContainer,
|
|
3083
3084
|
Un as LumeChartLegend,
|
|
3084
3085
|
Ua as LumeGroupedBarChart,
|
|
3085
3086
|
ha as LumeLine,
|
|
3086
3087
|
Ka as LumeLineChart,
|
|
3087
|
-
|
|
3088
|
+
Pt as LumeLineGroup,
|
|
3088
3089
|
Hr as LumeOverlayGroup,
|
|
3089
3090
|
xa as LumePoint,
|
|
3090
3091
|
Xa as LumeSingleBarChart,
|