@adyen/lume 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts +3 -2
- package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart-legend/lume-chart-legend.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-bar-group/composables/stacked-mixin.d.ts.map +1 -1
- package/dist/@types/composables/scales.d.ts.map +1 -1
- package/dist/@types/docs/storybook-data/alluvial-data.d.ts +1 -3
- package/dist/@types/docs/storybook-data/alluvial-data.d.ts.map +1 -1
- package/dist/@types/docs/storybook-data/base-data.d.ts +1 -3
- package/dist/@types/docs/storybook-data/base-data.d.ts.map +1 -1
- package/dist/@types/docs/storybook-data/sparkline-data.d.ts +1 -3
- package/dist/@types/docs/storybook-data/sparkline-data.d.ts.map +1 -1
- package/dist/index.js +356 -341
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as O, isRef as
|
|
1
|
+
import { defineComponent as H, ref as O, isRef as ht, computed as v, watch as C, toRefs as B, inject as Ae, reactive as Le, onMounted as te, onBeforeUnmount as gt, watchEffect as yt, useSlots as z, provide as Ee, nextTick as qe, defineAsyncComponent as we } from "vue";
|
|
2
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";
|
|
@@ -101,15 +101,15 @@ const tn = en.exports, nn = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function bt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function kt(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 Ve(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
115
|
function rn(t) {
|
|
@@ -120,10 +120,10 @@ function rn(t) {
|
|
|
120
120
|
function Ne(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function xt(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, o]) => {
|
|
126
|
-
r[n] = Ne(t[n]) && Ne(o) ?
|
|
126
|
+
r[n] = Ne(t[n]) && Ne(o) ? xt(t[n], o) : o;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function on(t) {
|
|
@@ -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 Tt(t) {
|
|
157
|
+
const e = ht(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 Me(t, e) {
|
|
199
199
|
const r = e - t.length;
|
|
200
200
|
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
201
201
|
}
|
|
@@ -203,7 +203,7 @@ 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 && bt() || console.warn(fn + "Warning: " + t);
|
|
207
207
|
}
|
|
208
208
|
const Te = (t) => {
|
|
209
209
|
let e = null;
|
|
@@ -225,7 +225,7 @@ const Te = (t) => {
|
|
|
225
225
|
return e ? e(...n) : n[0];
|
|
226
226
|
}
|
|
227
227
|
return r;
|
|
228
|
-
},
|
|
228
|
+
}, pe = () => ({
|
|
229
229
|
options: {
|
|
230
230
|
type: Object,
|
|
231
231
|
default: () => ({})
|
|
@@ -233,8 +233,8 @@ const Te = (t) => {
|
|
|
233
233
|
});
|
|
234
234
|
function J(t, e) {
|
|
235
235
|
return { allOptions: v(() => {
|
|
236
|
-
const n =
|
|
237
|
-
return n ?
|
|
236
|
+
const n = ht(e) ? e == null ? void 0 : e.value : e;
|
|
237
|
+
return n ? xt(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 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 || {}),
|
|
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 || {}), ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(ze || {}), We = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(We || {}), Ze = /* @__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))(Ze || {});
|
|
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
|
-
}, Lt = "No data",
|
|
271
|
+
}, Lt = "No data", et = 20, Ot = 0.33, $t = 0.5, It = 12, me = 8, gn = 1, yn = [
|
|
272
272
|
"auto",
|
|
273
273
|
"auto-start",
|
|
274
274
|
"auto-end",
|
|
@@ -285,7 +285,7 @@ const L = {
|
|
|
285
285
|
"left-start",
|
|
286
286
|
"left-end"
|
|
287
287
|
];
|
|
288
|
-
function
|
|
288
|
+
function Oe(t) {
|
|
289
289
|
t != null && t.closest("svg") || ee(K.NotContainedInSvg);
|
|
290
290
|
}
|
|
291
291
|
const Et = {
|
|
@@ -327,7 +327,7 @@ const Et = {
|
|
|
327
327
|
return {
|
|
328
328
|
x: -(c - t.value.step()) / 2,
|
|
329
329
|
width: c,
|
|
330
|
-
height: r.value.tickPadding + It +
|
|
330
|
+
height: r.value.tickPadding + It + me
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function l() {
|
|
@@ -362,7 +362,7 @@ const Et = {
|
|
|
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 + me;
|
|
366
366
|
return {
|
|
367
367
|
x: -c,
|
|
368
368
|
width: c,
|
|
@@ -403,7 +403,7 @@ const Et = {
|
|
|
403
403
|
}
|
|
404
404
|
function a() {
|
|
405
405
|
return {
|
|
406
|
-
height: r.value.tickPadding + It +
|
|
406
|
+
height: r.value.tickPadding + It + me,
|
|
407
407
|
width: n.value,
|
|
408
408
|
x: -(n.value / 2)
|
|
409
409
|
};
|
|
@@ -438,7 +438,7 @@ const Et = {
|
|
|
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 + me;
|
|
442
442
|
return {
|
|
443
443
|
width: c,
|
|
444
444
|
height: n.value,
|
|
@@ -470,13 +470,13 @@ const Et = {
|
|
|
470
470
|
"x-linear-scale-axis": An,
|
|
471
471
|
"y-linear-scale-axis": Ln
|
|
472
472
|
};
|
|
473
|
-
var
|
|
473
|
+
var He = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(He || {}), Ce = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ce || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
474
474
|
const $n = /* @__PURE__ */ H({
|
|
475
475
|
__name: "lume-axis",
|
|
476
476
|
props: {
|
|
477
477
|
scale: {
|
|
478
478
|
type: Function,
|
|
479
|
-
|
|
479
|
+
default: null
|
|
480
480
|
},
|
|
481
481
|
type: {
|
|
482
482
|
type: String,
|
|
@@ -486,7 +486,7 @@ const $n = /* @__PURE__ */ H({
|
|
|
486
486
|
position: {
|
|
487
487
|
type: String,
|
|
488
488
|
default: void 0,
|
|
489
|
-
validator: (t) => t in
|
|
489
|
+
validator: (t) => t in Ce
|
|
490
490
|
},
|
|
491
491
|
containerSize: {
|
|
492
492
|
type: Object,
|
|
@@ -500,41 +500,43 @@ const $n = /* @__PURE__ */ H({
|
|
|
500
500
|
type: String,
|
|
501
501
|
default: L.VERTICAL
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...pe()
|
|
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 =
|
|
507
|
+
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = B(r), c = Ae("isEmpty", O(!1)), d = Le({}), s = O(null), _ = O(null), m = O(null), p = v(
|
|
508
508
|
() => r.type ? xe[r.type] : r.position
|
|
509
509
|
), h = v(
|
|
510
510
|
() => r.type || (p.value === "left" ? "y" : "x")
|
|
511
|
-
),
|
|
511
|
+
), g = v(
|
|
512
512
|
() => h.value === "x" && u.value === L.VERTICAL || h.value === "y" && u.value === L.HORIZONTAL
|
|
513
513
|
), { allOptions: f } = J(
|
|
514
514
|
i,
|
|
515
515
|
h.value === "x" ? bn : kn
|
|
516
516
|
), { showTick: k } = mn(o, s, f), T = v(() => {
|
|
517
|
-
var I, E,
|
|
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}, ${(
|
|
517
|
+
var I, E, y, N;
|
|
518
|
+
return h.value === "y" && c.value && !o.value ? `translate(0, ${((I = a.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && c.value && !o.value ? `translate(-${((E = a.value) == null ? void 0 : E.width) / 2}, ${(y = a.value) == null ? void 0 : y.height})` : `translate(0, ${h.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
519
519
|
}), x = v(() => {
|
|
520
|
+
if (!o.value)
|
|
521
|
+
return [];
|
|
520
522
|
if (Y(o.value))
|
|
521
523
|
return o.value.labels || o.value.domain();
|
|
522
|
-
const { tickCount: I } = f.value, [E,
|
|
523
|
-
return Mt(E,
|
|
524
|
+
const { tickCount: I } = f.value, [E, y] = o.value.domain();
|
|
525
|
+
return Mt(E, y, I);
|
|
524
526
|
}), $ = v(() => {
|
|
525
527
|
const { tickFormat: I } = f.value;
|
|
526
528
|
return Te(I);
|
|
527
529
|
}), A = v(
|
|
528
|
-
() => f.value.withHover &&
|
|
530
|
+
() => f.value.withHover && g.value && l.value > -1
|
|
529
531
|
), D = v(
|
|
530
|
-
() => f.value.tickPadding +
|
|
532
|
+
() => f.value.tickPadding + me || n
|
|
531
533
|
), F = v(() => h.value === "x" ? (
|
|
532
534
|
// If x axis, get the tick height
|
|
533
535
|
Math.max(
|
|
534
536
|
...(s.value || []).map(
|
|
535
537
|
(I) => {
|
|
536
|
-
var E,
|
|
537
|
-
return ((
|
|
538
|
+
var E, y;
|
|
539
|
+
return ((y = (E = I.ref).getBBox) == null ? void 0 : y.call(E).height) + D.value;
|
|
538
540
|
}
|
|
539
541
|
)
|
|
540
542
|
)
|
|
@@ -543,21 +545,21 @@ const $n = /* @__PURE__ */ H({
|
|
|
543
545
|
Math.max(
|
|
544
546
|
...(s.value || []).map(
|
|
545
547
|
(I) => {
|
|
546
|
-
var E,
|
|
547
|
-
return ((
|
|
548
|
+
var E, y;
|
|
549
|
+
return ((y = (E = I.ref).getBBox) == null ? void 0 : y.call(E).width) + D.value;
|
|
548
550
|
}
|
|
549
551
|
)
|
|
550
552
|
)
|
|
551
553
|
));
|
|
552
|
-
function
|
|
554
|
+
function R(I) {
|
|
553
555
|
const { showTicks: E } = f.value;
|
|
554
556
|
return E === !1 ? "" : $.value(I);
|
|
555
557
|
}
|
|
556
|
-
function j(I, E,
|
|
557
|
-
e("mouseenter", { index:
|
|
558
|
+
function j(I, E, y) {
|
|
559
|
+
e("mouseenter", { index: g.value ? I : null, value: E, event: y });
|
|
558
560
|
}
|
|
559
|
-
function V(I, E,
|
|
560
|
-
e("click", { index: I, value: E, event:
|
|
561
|
+
function V(I, E, y) {
|
|
562
|
+
e("click", { index: I, value: E, event: y });
|
|
561
563
|
}
|
|
562
564
|
function Z(I) {
|
|
563
565
|
var E;
|
|
@@ -567,7 +569,7 @@ const $n = /* @__PURE__ */ H({
|
|
|
567
569
|
function ne() {
|
|
568
570
|
m.value = x.value.map(
|
|
569
571
|
(I, E) => ({
|
|
570
|
-
value:
|
|
572
|
+
value: R(I),
|
|
571
573
|
group: d.getTickGroupAttributes(I, E),
|
|
572
574
|
ghost: d.getTickGhostAttributes(Z(E)),
|
|
573
575
|
label: d.getTickLabelAttributes(),
|
|
@@ -576,14 +578,16 @@ const $n = /* @__PURE__ */ H({
|
|
|
576
578
|
);
|
|
577
579
|
}
|
|
578
580
|
function q() {
|
|
579
|
-
|
|
581
|
+
if (!o.value)
|
|
582
|
+
return;
|
|
583
|
+
const I = o.value.step ? "bandScale" : "linearScale", E = On[`${h.value}-${He[I]}`];
|
|
580
584
|
Object.entries(E(o, a, f) || []).forEach(
|
|
581
|
-
([
|
|
582
|
-
d[
|
|
585
|
+
([y, N]) => {
|
|
586
|
+
d[y] = N;
|
|
583
587
|
}
|
|
584
588
|
);
|
|
585
589
|
}
|
|
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(() =>
|
|
590
|
+
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(() => Oe(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: He, POSITIONS: Ce, 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: g, allOptions: f, showTick: k, axisTransform: T, ticks: x, tickFormatter: $, isHovering: A, axisLabelOffset: D, axisSize: F, formatTick: R, handleTickMouseenter: j, handleTickClick: V, getTextNode: Z, setTicks: ne, init: q, LumeTick: tn };
|
|
587
591
|
}
|
|
588
592
|
});
|
|
589
593
|
var In = function() {
|
|
@@ -672,11 +676,11 @@ const Dn = /* @__PURE__ */ H({
|
|
|
672
676
|
setup(t, { emit: e }) {
|
|
673
677
|
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = B(r), c = O(null), d = v(
|
|
674
678
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
675
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: p, computedY: h, shouldHaveMinWidth:
|
|
676
|
-
return te(() =>
|
|
679
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: p, computedY: h, shouldHaveMinWidth: g, shouldHaveMinHeight: f } = Hn(n, o, a, l), k = v(() => g.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;
|
|
680
|
+
return te(() => Oe(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: g, shouldHaveMinHeight: f, computedWidth: k, computedHeight: T, transformOrigin: x };
|
|
677
681
|
}
|
|
678
682
|
});
|
|
679
|
-
var
|
|
683
|
+
var Sn = function() {
|
|
680
684
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
681
685
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
682
686
|
{
|
|
@@ -693,19 +697,19 @@ var Rn = function() {
|
|
|
693
697
|
}, mouseleave: function(o) {
|
|
694
698
|
return n.emit("mouseleave", o);
|
|
695
699
|
} } });
|
|
696
|
-
},
|
|
700
|
+
}, Rn = [], Pn = /* @__PURE__ */ w(
|
|
697
701
|
Dn,
|
|
702
|
+
Sn,
|
|
698
703
|
Rn,
|
|
699
|
-
Pn,
|
|
700
704
|
!1,
|
|
701
705
|
null,
|
|
702
706
|
"8e8f732a",
|
|
703
707
|
null,
|
|
704
708
|
null
|
|
705
709
|
);
|
|
706
|
-
const
|
|
710
|
+
const Xe = Pn.exports;
|
|
707
711
|
function Bn() {
|
|
708
|
-
const t = O(), e =
|
|
712
|
+
const t = O(), e = Le({
|
|
709
713
|
dimensions: {}
|
|
710
714
|
}), r = new ResizeObserver((n) => {
|
|
711
715
|
n.forEach((o) => {
|
|
@@ -714,7 +718,7 @@ function Bn() {
|
|
|
714
718
|
});
|
|
715
719
|
return te(() => {
|
|
716
720
|
r.observe(t.value);
|
|
717
|
-
}),
|
|
721
|
+
}), gt(() => {
|
|
718
722
|
r.unobserve(t.value);
|
|
719
723
|
}), { resizeState: e, resizeRef: t };
|
|
720
724
|
}
|
|
@@ -743,7 +747,7 @@ const Fn = /* @__PURE__ */ H({
|
|
|
743
747
|
const r = t, { margins: n, containerSize: o } = B(r), a = O(null), { resizeRef: l, resizeState: i } = Bn(), u = v(
|
|
744
748
|
() => o.value.height + n.value.top + n.value.bottom
|
|
745
749
|
);
|
|
746
|
-
return
|
|
750
|
+
return yt(() => {
|
|
747
751
|
if (!a.value)
|
|
748
752
|
return;
|
|
749
753
|
const { width: c } = i.dimensions, { height: d } = a.value.getBoundingClientRect();
|
|
@@ -793,13 +797,12 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ H({
|
|
|
793
797
|
},
|
|
794
798
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
795
799
|
setup(t, { emit: e }) {
|
|
796
|
-
|
|
797
|
-
return { __sfc: !0, emit: e, isEmpty: r };
|
|
800
|
+
return { __sfc: !0, emit: e };
|
|
798
801
|
}
|
|
799
802
|
});
|
|
800
803
|
var Wn = function() {
|
|
801
804
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
802
|
-
return
|
|
805
|
+
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(o) {
|
|
803
806
|
return n.emit("mouseleave");
|
|
804
807
|
} } }, e._l(e.data, function(o, a) {
|
|
805
808
|
return r("div", { key: `legend-item-${a}`, staticClass: "lume-chart-legend__item lume-typography--body", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(l) {
|
|
@@ -814,7 +817,7 @@ var Wn = function() {
|
|
|
814
817
|
Zn,
|
|
815
818
|
!1,
|
|
816
819
|
null,
|
|
817
|
-
"
|
|
820
|
+
"f8ebd3b9",
|
|
818
821
|
null,
|
|
819
822
|
null
|
|
820
823
|
);
|
|
@@ -905,7 +908,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
905
908
|
type: String,
|
|
906
909
|
default: null
|
|
907
910
|
},
|
|
908
|
-
...
|
|
911
|
+
...pe()
|
|
909
912
|
},
|
|
910
913
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
911
914
|
setup(t, { emit: e }) {
|
|
@@ -935,7 +938,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
935
938
|
label: u.value.summary ?? r.summary
|
|
936
939
|
};
|
|
937
940
|
}
|
|
938
|
-
),
|
|
941
|
+
), g = v(() => l.summary || h.value.label);
|
|
939
942
|
function f() {
|
|
940
943
|
r.targetElement && n.value && (i.value = Xt(r.targetElement, n.value, {
|
|
941
944
|
placement: r.position,
|
|
@@ -956,7 +959,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
956
959
|
(x, $) => {
|
|
957
960
|
!$ && x ? f() : T();
|
|
958
961
|
}
|
|
959
|
-
), te(f),
|
|
962
|
+
), te(f), gt(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: g, initPopper: f, destroyPopper: k, updatePopper: T, LumeTooltipTitle: qn, LumeTooltipSummary: or, LumeTooltipItem: sr };
|
|
960
963
|
}
|
|
961
964
|
});
|
|
962
965
|
var dr = function() {
|
|
@@ -996,19 +999,19 @@ var dr = function() {
|
|
|
996
999
|
);
|
|
997
1000
|
const fr = _r.exports;
|
|
998
1001
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
999
|
-
const pr = re.Categorical,
|
|
1002
|
+
const pr = re.Categorical, he = W.Skyblue, mr = ze.SkyTeal;
|
|
1000
1003
|
function hr(t) {
|
|
1001
|
-
return t === re.Divergent ? mr :
|
|
1004
|
+
return t === re.Divergent ? mr : he;
|
|
1002
1005
|
}
|
|
1003
1006
|
function gr(t) {
|
|
1004
|
-
return Object.values(
|
|
1007
|
+
return Object.values(Ze).includes(t);
|
|
1005
1008
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return e === re.Divergent ? Object.values(
|
|
1009
|
+
function tt(t, e) {
|
|
1010
|
+
return e === re.Divergent ? Object.values(ze).includes(t) : Object.values({
|
|
1008
1011
|
...W,
|
|
1009
1012
|
...At,
|
|
1010
|
-
...
|
|
1011
|
-
...
|
|
1013
|
+
...We,
|
|
1014
|
+
...Ze
|
|
1012
1015
|
}).includes(t);
|
|
1013
1016
|
}
|
|
1014
1017
|
function yr(t, e) {
|
|
@@ -1023,7 +1026,7 @@ function kr(t, e) {
|
|
|
1023
1026
|
const r = (e + 1) * 10;
|
|
1024
1027
|
return `${t}-${r}`;
|
|
1025
1028
|
}
|
|
1026
|
-
function
|
|
1029
|
+
function nt(t, e, r) {
|
|
1027
1030
|
switch (e) {
|
|
1028
1031
|
default:
|
|
1029
1032
|
case re.Categorical:
|
|
@@ -1035,7 +1038,7 @@ function rt(t, e, r) {
|
|
|
1035
1038
|
}
|
|
1036
1039
|
}
|
|
1037
1040
|
function xr(t, e, r = pr, n) {
|
|
1038
|
-
return
|
|
1041
|
+
return tt(t, r) ? t : (n > 4 && (ee(K.ColorLoop), n = n % 5), tt(e, r) ? nt(e, r, n) : nt(hr(r), r, n));
|
|
1039
1042
|
}
|
|
1040
1043
|
function Tr(t) {
|
|
1041
1044
|
return t.map((e) => on(e) ? e : { value: e });
|
|
@@ -1043,7 +1046,7 @@ function Tr(t) {
|
|
|
1043
1046
|
function Ar(t) {
|
|
1044
1047
|
return t.__internal === !0;
|
|
1045
1048
|
}
|
|
1046
|
-
const
|
|
1049
|
+
const Ue = (t = null) => ({
|
|
1047
1050
|
data: {
|
|
1048
1051
|
type: Array,
|
|
1049
1052
|
required: !0,
|
|
@@ -1062,8 +1065,8 @@ const Ye = (t = null) => ({
|
|
|
1062
1065
|
default: null
|
|
1063
1066
|
}
|
|
1064
1067
|
});
|
|
1065
|
-
function
|
|
1066
|
-
const a =
|
|
1068
|
+
function Ye(t, e, r, n, o) {
|
|
1069
|
+
const a = Le({
|
|
1067
1070
|
width: 0,
|
|
1068
1071
|
height: 0
|
|
1069
1072
|
}), l = _n(12), i = v(() => {
|
|
@@ -1086,9 +1089,9 @@ function Ke(t, e, r, n, o) {
|
|
|
1086
1089
|
};
|
|
1087
1090
|
}
|
|
1088
1091
|
);
|
|
1089
|
-
}), u = v(() => Array.isArray(e.value) ? e.value :
|
|
1092
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : Tt(t.value).map((d, s) => s));
|
|
1090
1093
|
function c(d) {
|
|
1091
|
-
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL &&
|
|
1094
|
+
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || et) * 2) + ((n == null ? void 0 : n.value.barHeight) || et) || d.height;
|
|
1092
1095
|
a.width = d.width, a.height = s;
|
|
1093
1096
|
}
|
|
1094
1097
|
return {
|
|
@@ -1112,52 +1115,53 @@ const Lr = () => ({
|
|
|
1112
1115
|
function Or(t, e, r, n, o) {
|
|
1113
1116
|
const a = O(null), l = O(null);
|
|
1114
1117
|
function i() {
|
|
1118
|
+
var d, s, _, m;
|
|
1115
1119
|
const { width: u, height: c } = r;
|
|
1116
|
-
!u && !c ||
|
|
1120
|
+
!u && !c || (n.value === L.HORIZONTAL ? (a.value = (d = t.value) != null && d.length ? ot(
|
|
1117
1121
|
t.value,
|
|
1118
1122
|
u,
|
|
1119
1123
|
n.value,
|
|
1120
1124
|
o.value.startOnZero
|
|
1121
|
-
), l.value =
|
|
1125
|
+
) : null, l.value = (s = e.value) != null && s.length ? rt(
|
|
1122
1126
|
e.value,
|
|
1123
1127
|
c,
|
|
1124
1128
|
n.value,
|
|
1125
1129
|
o.value
|
|
1126
|
-
)) : (a.value =
|
|
1130
|
+
) : null) : (a.value = (_ = e.value) != null && _.length ? rt(
|
|
1127
1131
|
e.value,
|
|
1128
1132
|
u,
|
|
1129
1133
|
n.value,
|
|
1130
1134
|
o.value
|
|
1131
|
-
), l.value =
|
|
1135
|
+
) : null, l.value = (m = t.value) != null && m.length ? ot(
|
|
1132
1136
|
t.value,
|
|
1133
1137
|
c,
|
|
1134
1138
|
n.value,
|
|
1135
1139
|
o.value.startOnZero
|
|
1136
|
-
)));
|
|
1140
|
+
) : null));
|
|
1137
1141
|
}
|
|
1138
|
-
return
|
|
1142
|
+
return yt(i), { xScale: a, yScale: l };
|
|
1139
1143
|
}
|
|
1140
|
-
function
|
|
1144
|
+
function rt(t, e, r, n) {
|
|
1141
1145
|
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ? $t : Ot);
|
|
1142
1146
|
return Object.assign(
|
|
1143
1147
|
_e().range(o).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1144
1148
|
{ labels: t }
|
|
1145
1149
|
);
|
|
1146
1150
|
}
|
|
1147
|
-
function
|
|
1148
|
-
const o =
|
|
1151
|
+
function ot(t, e, r, n) {
|
|
1152
|
+
const o = kt(t).filter((d) => d != null), a = [0, e];
|
|
1149
1153
|
if (o.length === 0)
|
|
1150
1154
|
return fe().range(a).domain([0, 0]).nice();
|
|
1151
1155
|
const l = Math.min(...o), i = n && l > 0 ? 0 : l, u = Math.max(...o), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1152
1156
|
return fe().range(a).domain(c).nice();
|
|
1153
1157
|
}
|
|
1154
|
-
function
|
|
1158
|
+
function at(t) {
|
|
1155
1159
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1156
1160
|
}
|
|
1157
|
-
function
|
|
1161
|
+
function De(t, e) {
|
|
1158
1162
|
return Y(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1159
1163
|
}
|
|
1160
|
-
function
|
|
1164
|
+
function lt(t, e, {
|
|
1161
1165
|
padding: r,
|
|
1162
1166
|
paddingInner: n,
|
|
1163
1167
|
paddingOuter: o
|
|
@@ -1169,9 +1173,9 @@ function wt(t) {
|
|
|
1169
1173
|
return Object.values(L).includes(t);
|
|
1170
1174
|
}
|
|
1171
1175
|
const de = (t, e = !0) => ({
|
|
1172
|
-
...
|
|
1176
|
+
...Ue(t),
|
|
1173
1177
|
...Lr(),
|
|
1174
|
-
...
|
|
1178
|
+
...pe(),
|
|
1175
1179
|
classList: {
|
|
1176
1180
|
type: [String, Array],
|
|
1177
1181
|
default: () => []
|
|
@@ -1188,13 +1192,13 @@ const de = (t, e = !0) => ({
|
|
|
1188
1192
|
}
|
|
1189
1193
|
} : {}
|
|
1190
1194
|
}), $r = (t) => ({
|
|
1191
|
-
...
|
|
1192
|
-
...
|
|
1195
|
+
...Ue(t),
|
|
1196
|
+
...pe(),
|
|
1193
1197
|
hoveredElement: {
|
|
1194
1198
|
type: [Number, String],
|
|
1195
1199
|
default: null
|
|
1196
1200
|
}
|
|
1197
|
-
}),
|
|
1201
|
+
}), $e = () => ({
|
|
1198
1202
|
data: {
|
|
1199
1203
|
type: Array,
|
|
1200
1204
|
required: !0
|
|
@@ -1239,7 +1243,7 @@ const de = (t, e = !0) => ({
|
|
|
1239
1243
|
}), Ir = /* @__PURE__ */ H({
|
|
1240
1244
|
__name: "lume-overlay-group",
|
|
1241
1245
|
props: {
|
|
1242
|
-
|
|
1246
|
+
...$e(),
|
|
1243
1247
|
orientation: {
|
|
1244
1248
|
type: String,
|
|
1245
1249
|
default: L.VERTICAL
|
|
@@ -1247,10 +1251,10 @@ const de = (t, e = !0) => ({
|
|
|
1247
1251
|
},
|
|
1248
1252
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1249
1253
|
setup(t, { emit: e }) {
|
|
1250
|
-
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() =>
|
|
1254
|
+
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() => Tt(n));
|
|
1251
1255
|
function u(c) {
|
|
1252
|
-
var
|
|
1253
|
-
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((
|
|
1256
|
+
var g;
|
|
1257
|
+
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((g = d.paddingInner) == null ? void 0 : g.call(d)) ?? 0, p = _ * m, h = Y(d) ? d(s[c]) - p / 2 : d(c) - _ / 2;
|
|
1254
1258
|
return o.value === L.HORIZONTAL ? {
|
|
1255
1259
|
width: Math.max(...a.value.range()),
|
|
1256
1260
|
height: _,
|
|
@@ -1261,7 +1265,7 @@ const de = (t, e = !0) => ({
|
|
|
1261
1265
|
transform: `translate(${h}, 0)`
|
|
1262
1266
|
};
|
|
1263
1267
|
}
|
|
1264
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1268
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Xe };
|
|
1265
1269
|
}
|
|
1266
1270
|
});
|
|
1267
1271
|
var Er = function() {
|
|
@@ -1328,10 +1332,10 @@ const Hr = Nr.exports, Cr = [
|
|
|
1328
1332
|
};
|
|
1329
1333
|
function Dr(t) {
|
|
1330
1334
|
return { hasNegativeValues: v(
|
|
1331
|
-
() =>
|
|
1335
|
+
() => kt(t.value).some((r) => r < 0)
|
|
1332
1336
|
) };
|
|
1333
1337
|
}
|
|
1334
|
-
function
|
|
1338
|
+
function Sr(t, e, r, n) {
|
|
1335
1339
|
const o = v(
|
|
1336
1340
|
() => n.value === L.HORIZONTAL
|
|
1337
1341
|
), a = v(
|
|
@@ -1356,21 +1360,21 @@ function Rr(t, e, r, n) {
|
|
|
1356
1360
|
transform: i.value
|
|
1357
1361
|
})) };
|
|
1358
1362
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return t.reduce((r, n) =>
|
|
1363
|
+
function Rr(t, e) {
|
|
1364
|
+
return t.reduce((r, n) => Me(n.values, e).map(
|
|
1361
1365
|
(o, a) => r[a] ? o.value > r[a] ? o.value : r[a] : o.value ?? 0
|
|
1362
1366
|
), []);
|
|
1363
1367
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return t.reduce((r, n) =>
|
|
1368
|
+
function Pr(t, e) {
|
|
1369
|
+
return t.reduce((r, n) => Me(n.values, e).map(
|
|
1366
1370
|
(o, a) => {
|
|
1367
1371
|
const l = o.value == null || o.value < 0 ? 0 : o.value;
|
|
1368
1372
|
return r[a] ? r[a] + l : l;
|
|
1369
1373
|
}
|
|
1370
1374
|
), []);
|
|
1371
1375
|
}
|
|
1372
|
-
const
|
|
1373
|
-
"stacked-bar":
|
|
1376
|
+
const ut = {
|
|
1377
|
+
"stacked-bar": Pr
|
|
1374
1378
|
};
|
|
1375
1379
|
function Nt(t, e, r, n, o, a, l, i) {
|
|
1376
1380
|
const u = v(
|
|
@@ -1381,13 +1385,13 @@ function Nt(t, e, r, n, o, a, l, i) {
|
|
|
1381
1385
|
);
|
|
1382
1386
|
function c(d) {
|
|
1383
1387
|
var m;
|
|
1384
|
-
const s = ((m = o == null ? void 0 : o.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value &&
|
|
1388
|
+
const s = ((m = o == null ? void 0 : o.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && ut[i.value] ? ut[i.value](
|
|
1385
1389
|
d,
|
|
1386
1390
|
s
|
|
1387
|
-
) :
|
|
1391
|
+
) : Rr(d, s);
|
|
1388
1392
|
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 ?
|
|
1393
|
+
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(p) : De(r.value, h),
|
|
1394
|
+
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? De(n.value, h) : n.value(p)
|
|
1391
1395
|
}));
|
|
1392
1396
|
}
|
|
1393
1397
|
return C(
|
|
@@ -1399,7 +1403,7 @@ function Nt(t, e, r, n, o, a, l, i) {
|
|
|
1399
1403
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1400
1404
|
}
|
|
1401
1405
|
function Br() {
|
|
1402
|
-
const t =
|
|
1406
|
+
const t = Le({
|
|
1403
1407
|
opened: !1,
|
|
1404
1408
|
targetElement: null
|
|
1405
1409
|
});
|
|
@@ -1421,31 +1425,31 @@ function Fr(t) {
|
|
|
1421
1425
|
})
|
|
1422
1426
|
) };
|
|
1423
1427
|
}
|
|
1424
|
-
const
|
|
1428
|
+
const Se = 16, Re = 8, Pe = 28, Be = 24, oe = {
|
|
1425
1429
|
VERTICAL: {
|
|
1426
|
-
top:
|
|
1427
|
-
right:
|
|
1428
|
-
bottom:
|
|
1429
|
-
left:
|
|
1430
|
+
top: Se,
|
|
1431
|
+
right: Re,
|
|
1432
|
+
bottom: Pe,
|
|
1433
|
+
left: Be
|
|
1430
1434
|
},
|
|
1431
1435
|
HORIZONTAL: {
|
|
1432
|
-
top:
|
|
1433
|
-
right:
|
|
1434
|
-
bottom:
|
|
1435
|
-
left:
|
|
1436
|
+
top: Se,
|
|
1437
|
+
right: Re,
|
|
1438
|
+
bottom: Pe,
|
|
1439
|
+
left: Be
|
|
1436
1440
|
}
|
|
1437
1441
|
};
|
|
1438
1442
|
function Gr(t) {
|
|
1439
|
-
return !t || t === "auto" || t.top == null || t.top === "auto" ?
|
|
1443
|
+
return !t || t === "auto" || t.top == null || t.top === "auto" ? Se : t.top;
|
|
1440
1444
|
}
|
|
1441
1445
|
function jr(t) {
|
|
1442
|
-
return !t || t === "auto" || t.right == null || t.right === "auto" ?
|
|
1446
|
+
return !t || t === "auto" || t.right == null || t.right === "auto" ? Re : t.right;
|
|
1443
1447
|
}
|
|
1444
1448
|
function Vr(t, e) {
|
|
1445
|
-
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e ||
|
|
1449
|
+
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Pe : t.bottom;
|
|
1446
1450
|
}
|
|
1447
1451
|
function Mr(t, e) {
|
|
1448
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1452
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Be : t.left;
|
|
1449
1453
|
}
|
|
1450
1454
|
const zr = /* @__PURE__ */ H({
|
|
1451
1455
|
__name: "lume-chart",
|
|
@@ -1457,7 +1461,7 @@ const zr = /* @__PURE__ */ H({
|
|
|
1457
1461
|
}
|
|
1458
1462
|
},
|
|
1459
1463
|
setup(t, { emit: e }) {
|
|
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),
|
|
1464
|
+
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), g = O(0), { allOptions: f } = J(i), { internalData: k, computedLabels: T, containerSize: x, updateSize: $, chartID: A } = Ye(o, a, l, f, u), { listenInternalEvent: D } = Q(e, A), { xScale: F, yScale: R } = Or(
|
|
1461
1465
|
k,
|
|
1462
1466
|
T,
|
|
1463
1467
|
x,
|
|
@@ -1467,13 +1471,13 @@ const zr = /* @__PURE__ */ H({
|
|
|
1467
1471
|
top: Gr(f.value.margins),
|
|
1468
1472
|
right: jr(f.value.margins),
|
|
1469
1473
|
bottom: Vr(f.value.margins, h.value),
|
|
1470
|
-
left: Mr(f.value.margins,
|
|
1474
|
+
left: Mr(f.value.margins, g.value)
|
|
1471
1475
|
})), V = v(() => {
|
|
1472
1476
|
var b;
|
|
1473
|
-
return r.xScale ?
|
|
1477
|
+
return r.xScale ? at(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, a.value, x) : F.value;
|
|
1474
1478
|
}), Z = v(() => {
|
|
1475
1479
|
var b;
|
|
1476
|
-
return r.yScale ?
|
|
1480
|
+
return r.yScale ? at(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, a.value, x) : R.value;
|
|
1477
1481
|
}), ne = v(() => ({
|
|
1478
1482
|
...f.value.xAxisOptions,
|
|
1479
1483
|
withHover: u.value === L.VERTICAL
|
|
@@ -1486,23 +1490,23 @@ const zr = /* @__PURE__ */ H({
|
|
|
1486
1490
|
}), E = v(() => {
|
|
1487
1491
|
var b;
|
|
1488
1492
|
return (b = f.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1489
|
-
}),
|
|
1493
|
+
}), y = v(() => {
|
|
1490
1494
|
var b;
|
|
1491
1495
|
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && I.value;
|
|
1492
1496
|
}), N = v(() => {
|
|
1493
1497
|
var b;
|
|
1494
1498
|
return ((b = f.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && E.value;
|
|
1495
|
-
}),
|
|
1499
|
+
}), S = v(
|
|
1496
1500
|
() => o.value.every((b) => !b.values.length)
|
|
1497
1501
|
), X = v(() => {
|
|
1498
|
-
const b = [], { noBaseScales:
|
|
1499
|
-
return S
|
|
1500
|
-
}), { hasNegativeValues: U } = Dr(k), { negativeBarAttributes: G } =
|
|
1502
|
+
const b = [], { noBaseScales: P } = f.value;
|
|
1503
|
+
return !P && !S.value && b.push(() => !!(V.value && Z.value)), b.every((M) => M() === !0);
|
|
1504
|
+
}), { hasNegativeValues: U } = Dr(k), { negativeBarAttributes: G } = Sr(
|
|
1501
1505
|
x,
|
|
1502
1506
|
V,
|
|
1503
1507
|
Z,
|
|
1504
1508
|
u
|
|
1505
|
-
), { shouldGenerateTooltipAnchors:
|
|
1509
|
+
), { shouldGenerateTooltipAnchors: Je } = Nt(
|
|
1506
1510
|
m,
|
|
1507
1511
|
f,
|
|
1508
1512
|
V,
|
|
@@ -1511,30 +1515,30 @@ const zr = /* @__PURE__ */ H({
|
|
|
1511
1515
|
u,
|
|
1512
1516
|
k,
|
|
1513
1517
|
c
|
|
1514
|
-
), { tooltipConfig: le, showTooltip:
|
|
1518
|
+
), { tooltipConfig: le, showTooltip: ge, hideTooltip: ue } = Br(), { getTooltipItems: ye } = Fr(k), ie = v(
|
|
1515
1519
|
() => f.value.withTooltip !== !1 && le.opened
|
|
1516
|
-
),
|
|
1520
|
+
), Pt = v(
|
|
1517
1521
|
() => {
|
|
1518
1522
|
var b;
|
|
1519
1523
|
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1520
1524
|
}
|
|
1521
|
-
),
|
|
1522
|
-
var
|
|
1523
|
-
const b = (
|
|
1525
|
+
), Qe = v(() => {
|
|
1526
|
+
var P;
|
|
1527
|
+
const b = (P = f.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1524
1528
|
return le.opened && (!b || b && p.value === !1);
|
|
1525
1529
|
});
|
|
1526
|
-
function
|
|
1530
|
+
function be(b) {
|
|
1527
1531
|
var M;
|
|
1528
1532
|
if (b === d.value)
|
|
1529
1533
|
return;
|
|
1530
|
-
const
|
|
1534
|
+
const P = d.value;
|
|
1531
1535
|
if (f.value.withHover !== !1 && (d.value = b), f.value.withTooltip !== !1) {
|
|
1532
1536
|
const jt = (M = f.value.tooltipOptions) != null && M.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : s.value[b];
|
|
1533
|
-
|
|
1537
|
+
ge(jt);
|
|
1534
1538
|
}
|
|
1535
|
-
e("hovered-index-changed", { newIndex: b, oldIndex:
|
|
1539
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: P });
|
|
1536
1540
|
}
|
|
1537
|
-
function
|
|
1541
|
+
function ke() {
|
|
1538
1542
|
ue(), d.value = -1;
|
|
1539
1543
|
}
|
|
1540
1544
|
function Ie(b) {
|
|
@@ -1544,36 +1548,36 @@ const zr = /* @__PURE__ */ H({
|
|
|
1544
1548
|
ee(K.InvalidHoveredIndex);
|
|
1545
1549
|
return;
|
|
1546
1550
|
}
|
|
1547
|
-
ke(b);
|
|
1551
|
+
b == null || b === -1 ? ke() : be(b);
|
|
1548
1552
|
}
|
|
1549
1553
|
function Bt() {
|
|
1550
1554
|
setTimeout(() => {
|
|
1551
|
-
|
|
1555
|
+
Qe.value && ke(), e("chart-mouseleave");
|
|
1552
1556
|
}, 0);
|
|
1553
1557
|
}
|
|
1554
|
-
function Ft({ index: b, value:
|
|
1555
|
-
b !== null &&
|
|
1558
|
+
function Ft({ index: b, value: P, event: M }) {
|
|
1559
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: M });
|
|
1556
1560
|
}
|
|
1557
|
-
function Gt({ index: b, value:
|
|
1558
|
-
e("axis-click", { index: b, value:
|
|
1561
|
+
function Gt({ index: b, value: P, event: M }) {
|
|
1562
|
+
e("axis-click", { index: b, value: P, event: M });
|
|
1559
1563
|
}
|
|
1560
1564
|
return C(
|
|
1561
1565
|
o,
|
|
1562
|
-
(b,
|
|
1566
|
+
(b, P) => e("data-changed", { newValue: b, oldValue: P })
|
|
1563
1567
|
), C(
|
|
1564
1568
|
a,
|
|
1565
|
-
(b,
|
|
1566
|
-
), C(
|
|
1569
|
+
(b, P) => e("labels-changed", { newValue: b, oldValue: P })
|
|
1570
|
+
), C(S, (b) => b && ee(K.Empty), { immediate: !0 }), C(() => r.hoveredIndex, Ie), C(
|
|
1567
1571
|
m,
|
|
1568
1572
|
(b) => {
|
|
1569
1573
|
b && r.hoveredIndex != null && d.value === -1 && Ie(r.hoveredIndex);
|
|
1570
1574
|
},
|
|
1571
1575
|
{ flush: "post" }
|
|
1572
1576
|
), C(p, (b) => {
|
|
1573
|
-
b === !1 && le.opened &&
|
|
1577
|
+
b === !1 && le.opened && ke();
|
|
1574
1578
|
}), te(async () => {
|
|
1575
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover",
|
|
1576
|
-
}), Ee("chartID", A), Ee("isEmpty",
|
|
1579
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", be);
|
|
1580
|
+
}), Ee("chartID", A), Ee("isEmpty", S), 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: g, allOptions: f, internalData: k, computedLabels: T, containerSize: x, updateSize: $, chartID: A, listenInternalEvent: D, xScale: F, yScale: R, computedMargins: j, computedXScale: V, computedYScale: Z, computedXAxisOptions: ne, computedYAxisOptions: q, xAxisTitle: I, yAxisTitle: E, showXAxisTitle: y, showYAxisTitle: N, isEmpty: S, isReady: X, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: Je, tooltipConfig: le, showTooltip: ge, hideTooltip: ue, getTooltipItems: ye, isTooltipOpened: ie, tooltipPosition: Pt, shouldHideTooltip: Qe, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: Ie, handleMouseleave: Bt, handleAxisMouseenter: Ft, handleAxisClick: Gt, LumeAxis: Nn, LumeBar: Xe, LumeChartContainer: Mn, LumeChartLegend: Un, LumeTooltip: fr, LumeOverlayGroup: Hr, TOOLTIP_ANCHOR_RADIUS: gn };
|
|
1577
1581
|
}
|
|
1578
1582
|
});
|
|
1579
1583
|
var Wr = function() {
|
|
@@ -1639,11 +1643,11 @@ var Wr = function() {
|
|
|
1639
1643
|
Zr,
|
|
1640
1644
|
!1,
|
|
1641
1645
|
null,
|
|
1642
|
-
"
|
|
1646
|
+
"84133075",
|
|
1643
1647
|
null,
|
|
1644
1648
|
null
|
|
1645
1649
|
);
|
|
1646
|
-
const ve = Xr.exports,
|
|
1650
|
+
const ve = Xr.exports, it = 8, Ur = 8, Yr = 20, ce = 2, st = 2, Kr = /* @__PURE__ */ H({
|
|
1647
1651
|
__name: "lume-alluvial-node-label",
|
|
1648
1652
|
props: {
|
|
1649
1653
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1657,14 +1661,14 @@ const ve = Xr.exports, st = 8, Ur = 8, Yr = 20, ce = 2, ct = 2, Kr = /* @__PURE_
|
|
|
1657
1661
|
[n, () => r.maxWidth],
|
|
1658
1662
|
async ([l, i]) => {
|
|
1659
1663
|
if (l && i) {
|
|
1660
|
-
o.value = i, await
|
|
1664
|
+
o.value = i, await qe();
|
|
1661
1665
|
const { width: u, height: c } = l.getBoundingClientRect();
|
|
1662
|
-
o.value = u +
|
|
1666
|
+
o.value = u + st > i ? i : u + st, a.value = Math.ceil(c);
|
|
1663
1667
|
}
|
|
1664
1668
|
},
|
|
1665
1669
|
{ immediate: !0 }
|
|
1666
1670
|
), C(o, async (l) => {
|
|
1667
|
-
l !== r.maxWidth && (await
|
|
1671
|
+
l !== r.maxWidth && (await qe(), e("lume__internal--node-resize"));
|
|
1668
1672
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: o, foreignObjectHeight: a };
|
|
1669
1673
|
}
|
|
1670
1674
|
});
|
|
@@ -1704,7 +1708,7 @@ var no = function() {
|
|
|
1704
1708
|
null
|
|
1705
1709
|
);
|
|
1706
1710
|
const ao = oo.exports;
|
|
1707
|
-
function
|
|
1711
|
+
function ct(t, e) {
|
|
1708
1712
|
return {
|
|
1709
1713
|
x0: 0 + (e ? e.left : 0),
|
|
1710
1714
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1713,16 +1717,16 @@ function dt(t, e) {
|
|
|
1713
1717
|
};
|
|
1714
1718
|
}
|
|
1715
1719
|
function lo(t) {
|
|
1716
|
-
const e = O(
|
|
1720
|
+
const e = O(ct(t));
|
|
1717
1721
|
function r(n) {
|
|
1718
|
-
e.value =
|
|
1722
|
+
e.value = ct(t, n);
|
|
1719
1723
|
}
|
|
1720
1724
|
return { extents: e, updateExtents: r };
|
|
1721
1725
|
}
|
|
1722
1726
|
var Ht = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(Ht || {});
|
|
1723
1727
|
const uo = "[lume] ";
|
|
1724
1728
|
function io(t, e, r = !0) {
|
|
1725
|
-
r &&
|
|
1729
|
+
r && bt() || console.error(uo + "Error: " + t, e);
|
|
1726
1730
|
}
|
|
1727
1731
|
const so = 200;
|
|
1728
1732
|
function se(t) {
|
|
@@ -1764,7 +1768,7 @@ function fo(t) {
|
|
|
1764
1768
|
width: e.x1 - e.x0,
|
|
1765
1769
|
height: r ? ce : e.y1 - e.y0,
|
|
1766
1770
|
textTransform: {
|
|
1767
|
-
x: e.depth > 0 ? e.x1 +
|
|
1771
|
+
x: e.depth > 0 ? e.x1 + it : e.x0 - it,
|
|
1768
1772
|
y: (e.y1 + e.y0) / 2
|
|
1769
1773
|
},
|
|
1770
1774
|
node: e
|
|
@@ -1785,14 +1789,14 @@ function go(t) {
|
|
|
1785
1789
|
var r;
|
|
1786
1790
|
return {
|
|
1787
1791
|
id: e.id,
|
|
1788
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1792
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || he,
|
|
1789
1793
|
d: ho(e)(e),
|
|
1790
1794
|
strokeWidth: Math.max(1, e.width),
|
|
1791
1795
|
link: e
|
|
1792
1796
|
};
|
|
1793
1797
|
});
|
|
1794
1798
|
}
|
|
1795
|
-
function
|
|
1799
|
+
function dt(t, e, r, n, o) {
|
|
1796
1800
|
if (n === !1) {
|
|
1797
1801
|
t.node = {
|
|
1798
1802
|
...t.node,
|
|
@@ -1813,36 +1817,36 @@ const yo = {
|
|
|
1813
1817
|
nodes: [],
|
|
1814
1818
|
links: []
|
|
1815
1819
|
};
|
|
1816
|
-
function
|
|
1820
|
+
function vt(t, e) {
|
|
1817
1821
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1818
1822
|
}
|
|
1819
1823
|
function bo(t, e, r) {
|
|
1820
1824
|
const n = O(null), o = v(() => {
|
|
1821
|
-
var s;
|
|
1822
|
-
return (s = t.value) == null ? void 0 : s[0].values.map(
|
|
1823
|
-
({ label:
|
|
1824
|
-
label:
|
|
1825
|
-
color:
|
|
1826
|
-
fallbackColor:
|
|
1827
|
-
id:
|
|
1828
|
-
deriveColorFromIncomingLinks:
|
|
1829
|
-
offset:
|
|
1825
|
+
var s, _;
|
|
1826
|
+
return (_ = (s = t.value) == null ? void 0 : s[0]) == null ? void 0 : _.values.map(
|
|
1827
|
+
({ label: m, color: p, value: h, deriveColorFromIncomingLinks: g, offset: f }) => ({
|
|
1828
|
+
label: m || h.toString(),
|
|
1829
|
+
color: p,
|
|
1830
|
+
fallbackColor: p || he,
|
|
1831
|
+
id: h,
|
|
1832
|
+
deriveColorFromIncomingLinks: g,
|
|
1833
|
+
offset: f
|
|
1830
1834
|
})
|
|
1831
1835
|
);
|
|
1832
1836
|
}), a = v(
|
|
1833
1837
|
() => {
|
|
1834
|
-
var s;
|
|
1835
|
-
return (s = t.value) == null ? void 0 : s[0].values.map(
|
|
1836
|
-
(
|
|
1837
|
-
var
|
|
1838
|
-
return (
|
|
1839
|
-
({ node:
|
|
1840
|
-
id: `${
|
|
1841
|
-
color:
|
|
1842
|
-
curveFunction:
|
|
1843
|
-
source:
|
|
1844
|
-
target:
|
|
1845
|
-
value:
|
|
1838
|
+
var s, _;
|
|
1839
|
+
return (_ = (s = t.value) == null ? void 0 : s[0]) == null ? void 0 : _.values.map(
|
|
1840
|
+
(m) => {
|
|
1841
|
+
var p;
|
|
1842
|
+
return (p = m.targets) == null ? void 0 : p.map(
|
|
1843
|
+
({ node: h, value: g, color: f, curveFunction: k }) => ({
|
|
1844
|
+
id: `${m.value}:${h}`,
|
|
1845
|
+
color: f,
|
|
1846
|
+
curveFunction: k,
|
|
1847
|
+
source: m.value ?? m.label,
|
|
1848
|
+
target: h,
|
|
1849
|
+
value: g
|
|
1846
1850
|
})
|
|
1847
1851
|
);
|
|
1848
1852
|
}
|
|
@@ -1852,30 +1856,33 @@ function bo(t, e, r) {
|
|
|
1852
1856
|
var s;
|
|
1853
1857
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1854
1858
|
(_, m) => {
|
|
1855
|
-
const p =
|
|
1856
|
-
return p ? (p.push(m), p.sort((h,
|
|
1859
|
+
const p = vt(m, _);
|
|
1860
|
+
return p ? (p.push(m), p.sort((h, g) => (h._y0 || h.y0) - (g._y0 || g.y0))) : _.push([m]), _;
|
|
1857
1861
|
},
|
|
1858
1862
|
[]
|
|
1859
1863
|
);
|
|
1860
1864
|
});
|
|
1861
1865
|
function u(s) {
|
|
1862
|
-
const { offset: _ } = s, m =
|
|
1866
|
+
const { offset: _ } = s, m = vt(s, i.value);
|
|
1863
1867
|
if (!m)
|
|
1864
1868
|
return;
|
|
1865
|
-
const p = m[m.findIndex((
|
|
1869
|
+
const p = m[m.findIndex((g) => g.id === s.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
1866
1870
|
s._y0 = s.y0, s._y1 = s.y1, s.y0 = h, s.y1 = s.y0 + (s._y1 - s._y0);
|
|
1867
1871
|
}
|
|
1868
1872
|
function c(s, _) {
|
|
1869
|
-
const { id: m, _y0: p, y0: h } = s,
|
|
1873
|
+
const { id: m, _y0: p, y0: h } = s, g = _.links.filter(
|
|
1870
1874
|
(T) => T.source.id === m
|
|
1871
1875
|
), f = _.links.filter(
|
|
1872
1876
|
(T) => T.target.id === m
|
|
1873
1877
|
), k = h - p;
|
|
1874
|
-
|
|
1878
|
+
g.forEach((T) => T.y0 += k), f.forEach((T) => T.y1 += k);
|
|
1875
1879
|
}
|
|
1876
|
-
const d = v(() =>
|
|
1877
|
-
|
|
1878
|
-
|
|
1880
|
+
const d = v(() => {
|
|
1881
|
+
var s;
|
|
1882
|
+
return n.value && ((s = o.value) == null || s.forEach((_) => {
|
|
1883
|
+
_.value === 0 && (_.fallbackColor = We.Grey), typeof _.offset == "number" && (u(_), c(_, n.value));
|
|
1884
|
+
})), n.value;
|
|
1885
|
+
});
|
|
1879
1886
|
return C([l, r], () => {
|
|
1880
1887
|
try {
|
|
1881
1888
|
const { x0: s, y0: _, x1: m, y1: p } = r.value;
|
|
@@ -1888,17 +1895,17 @@ function bo(t, e, r) {
|
|
|
1888
1895
|
}
|
|
1889
1896
|
}), { columns: i, graph: d };
|
|
1890
1897
|
}
|
|
1891
|
-
function
|
|
1898
|
+
function Fe(t, e) {
|
|
1892
1899
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1893
|
-
e[r.id] = n,
|
|
1900
|
+
e[r.id] = n, Fe(
|
|
1894
1901
|
r,
|
|
1895
1902
|
e
|
|
1896
1903
|
);
|
|
1897
1904
|
}), e;
|
|
1898
1905
|
}
|
|
1899
|
-
function
|
|
1906
|
+
function Ge(t, e) {
|
|
1900
1907
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1901
|
-
e[r.id] = n,
|
|
1908
|
+
e[r.id] = n, Ge(
|
|
1902
1909
|
r,
|
|
1903
1910
|
e
|
|
1904
1911
|
);
|
|
@@ -1911,13 +1918,13 @@ const xo = (t, e) => {
|
|
|
1911
1918
|
let r;
|
|
1912
1919
|
Ct(t) ? r = {
|
|
1913
1920
|
[t.id]: t.value,
|
|
1914
|
-
...
|
|
1915
|
-
...
|
|
1921
|
+
...Fe(t),
|
|
1922
|
+
...Ge(t)
|
|
1916
1923
|
} : r = {
|
|
1917
1924
|
[t.source.id]: t.source.value,
|
|
1918
1925
|
[t.target.id]: t.target.value,
|
|
1919
|
-
...
|
|
1920
|
-
...
|
|
1926
|
+
...Fe(t.source),
|
|
1927
|
+
...Ge(t.target)
|
|
1921
1928
|
};
|
|
1922
1929
|
const n = ko(r, e);
|
|
1923
1930
|
return { nodes: r, links: n };
|
|
@@ -1948,7 +1955,7 @@ function Ao(t, e, r) {
|
|
|
1948
1955
|
return C(o, (a, l) => {
|
|
1949
1956
|
if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
|
|
1950
1957
|
t.value.forEach((i) => {
|
|
1951
|
-
i.node.id in l.nodes &&
|
|
1958
|
+
i.node.id in l.nodes && dt(
|
|
1952
1959
|
i,
|
|
1953
1960
|
l.nodes[i.node.id],
|
|
1954
1961
|
i.node.value,
|
|
@@ -1959,7 +1966,7 @@ function Ao(t, e, r) {
|
|
|
1959
1966
|
return;
|
|
1960
1967
|
}
|
|
1961
1968
|
t.value.forEach((i) => {
|
|
1962
|
-
i.node.id in a.nodes &&
|
|
1969
|
+
i.node.id in a.nodes && dt(
|
|
1963
1970
|
i,
|
|
1964
1971
|
i.node.value,
|
|
1965
1972
|
a.nodes[i.node.id],
|
|
@@ -1971,7 +1978,7 @@ function Ao(t, e, r) {
|
|
|
1971
1978
|
const Lo = /* @__PURE__ */ H({
|
|
1972
1979
|
__name: "lume-alluvial-group",
|
|
1973
1980
|
props: {
|
|
1974
|
-
|
|
1981
|
+
...$e(),
|
|
1975
1982
|
hoveredElementId: {
|
|
1976
1983
|
type: [Number, String],
|
|
1977
1984
|
default: null
|
|
@@ -1979,106 +1986,106 @@ const Lo = /* @__PURE__ */ H({
|
|
|
1979
1986
|
},
|
|
1980
1987
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1981
1988
|
setup(t, { emit: e }) {
|
|
1982
|
-
const r = t, n =
|
|
1989
|
+
const r = t, n = Ae("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
1990
|
l,
|
|
1984
1991
|
a,
|
|
1985
1992
|
_
|
|
1986
|
-
), h = v(() => Te(a.value.valueFormat)),
|
|
1993
|
+
), h = v(() => Te(a.value.valueFormat)), g = v(
|
|
1987
1994
|
() => Object.keys(p.value.nodes)
|
|
1988
1995
|
), f = v(() => s.value ? s.value.map(
|
|
1989
|
-
(
|
|
1996
|
+
(y) => y[0].x0 + a.value.nodeWidth / 2
|
|
1990
1997
|
) : []), k = v(() => {
|
|
1991
1998
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
1992
|
-
return a.value.nodeHeaders.slice(0, f.value.length).map((
|
|
1993
|
-
label:
|
|
1999
|
+
return a.value.nodeHeaders.slice(0, f.value.length).map((y, N) => ({
|
|
2000
|
+
label: y,
|
|
1994
2001
|
x: f.value[N]
|
|
1995
2002
|
}));
|
|
1996
2003
|
}), T = v(
|
|
1997
2004
|
() => a.value.nodeHeaderPadding ?? Yr
|
|
1998
2005
|
), x = v(() => {
|
|
1999
2006
|
if (!(!a.value.gradient || !_.value))
|
|
2000
|
-
return _.value.links.reduce((
|
|
2001
|
-
const { source:
|
|
2002
|
-
return
|
|
2007
|
+
return _.value.links.reduce((y, N) => {
|
|
2008
|
+
const { source: S, target: X } = N, U = S.color || S.fallbackColor, G = X.deriveColorFromIncomingLinks ? U : X.color || X.fallbackColor;
|
|
2009
|
+
return y[N.id] = {
|
|
2003
2010
|
source: U,
|
|
2004
2011
|
target: G,
|
|
2005
|
-
x1:
|
|
2012
|
+
x1: S.x1,
|
|
2006
2013
|
x2: X.x0
|
|
2007
|
-
},
|
|
2014
|
+
}, y;
|
|
2008
2015
|
}, {});
|
|
2009
2016
|
}), $ = v(() => {
|
|
2010
|
-
const
|
|
2011
|
-
(
|
|
2017
|
+
const y = l.value.filter(
|
|
2018
|
+
(S) => V(S)
|
|
2012
2019
|
), N = [];
|
|
2013
|
-
return
|
|
2020
|
+
return y.forEach((S) => {
|
|
2014
2021
|
const X = [];
|
|
2015
|
-
i.value.filter(({ link: U }) => U.target.id ===
|
|
2016
|
-
const
|
|
2017
|
-
let ue,
|
|
2018
|
-
return
|
|
2019
|
-
x:
|
|
2020
|
-
y:
|
|
2022
|
+
i.value.filter(({ link: U }) => U.target.id === S.node.id).reverse().reduce((U, G, Je, le) => {
|
|
2023
|
+
const ge = G.link.target.y1 - G.link.target.y0 > ce;
|
|
2024
|
+
let ue, ye, ie;
|
|
2025
|
+
return ge ? (ue = G.link.target.y1 - G.link.target.y0, ye = G.link.value / S.node.value, ie = ye * ue) : (ue = ce, ie = ce / le.length), X.push({
|
|
2026
|
+
x: S.x,
|
|
2027
|
+
y: S.y + U,
|
|
2021
2028
|
height: ie,
|
|
2022
|
-
width:
|
|
2023
|
-
key: `node-block-${
|
|
2024
|
-
class: `lume-alluvial-group__node-block lume-fill--${G.link.source.color ||
|
|
2029
|
+
width: S.width,
|
|
2030
|
+
key: `node-block-${S.node.id}-source-link-${G.link.source.id}`,
|
|
2031
|
+
class: `lume-alluvial-group__node-block lume-fill--${G.link.source.color || he}`
|
|
2025
2032
|
}), U + ie;
|
|
2026
2033
|
}, 0), N.push({
|
|
2027
|
-
id:
|
|
2034
|
+
id: S.node.id,
|
|
2028
2035
|
subNodes: X
|
|
2029
2036
|
});
|
|
2030
2037
|
}), N;
|
|
2031
2038
|
});
|
|
2032
|
-
function A(
|
|
2033
|
-
return a.value.gradient && `url('#${n}_${
|
|
2039
|
+
function A(y) {
|
|
2040
|
+
return a.value.gradient && `url('#${n}_${y.id}')`;
|
|
2034
2041
|
}
|
|
2035
|
-
function D(
|
|
2036
|
-
return
|
|
2042
|
+
function D(y) {
|
|
2043
|
+
return g.value.length > 0 && !g.value.includes(y.toString());
|
|
2037
2044
|
}
|
|
2038
|
-
function F(
|
|
2039
|
-
return
|
|
2045
|
+
function F(y) {
|
|
2046
|
+
return g.value.length > 0 && g.value.includes(y.toString());
|
|
2040
2047
|
}
|
|
2041
|
-
function
|
|
2042
|
-
return p.value.links.length > 0 && !p.value.links.includes(
|
|
2048
|
+
function R(y) {
|
|
2049
|
+
return p.value.links.length > 0 && !p.value.links.includes(y);
|
|
2043
2050
|
}
|
|
2044
|
-
function j(
|
|
2045
|
-
return p.value.links.length > 0 && p.value.links.includes(
|
|
2051
|
+
function j(y) {
|
|
2052
|
+
return p.value.links.length > 0 && p.value.links.includes(y);
|
|
2046
2053
|
}
|
|
2047
|
-
function V(
|
|
2048
|
-
return !
|
|
2054
|
+
function V(y) {
|
|
2055
|
+
return !y.node.color && y.node.deriveColorFromIncomingLinks;
|
|
2049
2056
|
}
|
|
2050
|
-
function Z(
|
|
2051
|
-
|
|
2057
|
+
function Z(y, N) {
|
|
2058
|
+
y !== m.value && (m.value = y, e("link-mouseenter", { link: y, event: N }));
|
|
2052
2059
|
}
|
|
2053
|
-
function ne(
|
|
2060
|
+
function ne(y) {
|
|
2054
2061
|
const N = m.value;
|
|
2055
|
-
m.value = null, e("link-mouseleave", { link: N, event:
|
|
2062
|
+
m.value = null, e("link-mouseleave", { link: N, event: y });
|
|
2056
2063
|
}
|
|
2057
|
-
function q(
|
|
2058
|
-
if (
|
|
2064
|
+
function q(y) {
|
|
2065
|
+
if (y == null) {
|
|
2059
2066
|
m.value = null;
|
|
2060
2067
|
return;
|
|
2061
2068
|
}
|
|
2062
|
-
const N = co(
|
|
2069
|
+
const N = co(y, _.value) || vo(y, _.value);
|
|
2063
2070
|
if (!N) {
|
|
2064
2071
|
ee(K.InvalidHoveredElement);
|
|
2065
2072
|
return;
|
|
2066
2073
|
}
|
|
2067
2074
|
m.value = N;
|
|
2068
2075
|
}
|
|
2069
|
-
function I(
|
|
2076
|
+
function I(y) {
|
|
2070
2077
|
var N;
|
|
2071
|
-
return ((N = $.value.find(({ id:
|
|
2078
|
+
return ((N = $.value.find(({ id: S }) => y === S)) == null ? void 0 : N.subNodes) ?? [];
|
|
2072
2079
|
}
|
|
2073
2080
|
function E() {
|
|
2074
|
-
const
|
|
2075
|
-
d(
|
|
2081
|
+
const y = _o(_.value, u.value);
|
|
2082
|
+
d(y);
|
|
2076
2083
|
}
|
|
2077
|
-
return C(_, (
|
|
2078
|
-
l.value = fo(
|
|
2084
|
+
return C(_, (y) => {
|
|
2085
|
+
l.value = fo(y.nodes), i.value = go(y.links).reverse(), m.value == null && r.hoveredElementId != null && q(r.hoveredElementId);
|
|
2079
2086
|
}), C([r.containerSize, u], () => {
|
|
2080
2087
|
r.containerSize.width && r.containerSize.height && E();
|
|
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:
|
|
2088
|
+
}), 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: g, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: T, gradients: x, nodesDerivingColorFromIncomingLinks: $, getLinkStroke: A, isNodeFaded: D, isNodeFocused: F, isLinkFaded: R, isLinkFocused: j, shouldDeriveNodeColorFromIncomingLinks: V, handleLinkMouseover: Z, handleLinkMouseleave: ne, handleExternalHover: q, getSubNodesDerivingColorFromIncomingLinks: I, updateMargins: E, LumeAlluvialNodeLabel: eo, LumeAlluvialNodeValue: ao, GHOST_STROKE_WIDTH_OFFSET: Ur };
|
|
2082
2089
|
}
|
|
2083
2090
|
});
|
|
2084
2091
|
var Oo = function() {
|
|
@@ -2165,7 +2172,7 @@ const Eo = Io.exports, wo = {
|
|
|
2165
2172
|
}, No = /* @__PURE__ */ H({
|
|
2166
2173
|
__name: "lume-alluvial-diagram",
|
|
2167
2174
|
props: {
|
|
2168
|
-
...$r(
|
|
2175
|
+
...$r(Ve)
|
|
2169
2176
|
},
|
|
2170
2177
|
setup(t, { emit: e }) {
|
|
2171
2178
|
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), a = vn(z()), { options: l } = B(r), { allOptions: i } = J(l, wo);
|
|
@@ -2203,15 +2210,15 @@ var Ho = function() {
|
|
|
2203
2210
|
null
|
|
2204
2211
|
);
|
|
2205
2212
|
const Wa = Do.exports;
|
|
2206
|
-
var
|
|
2207
|
-
const
|
|
2213
|
+
var je = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(je || {});
|
|
2214
|
+
const So = /* @__PURE__ */ H({
|
|
2208
2215
|
__name: "lume-bar-chart",
|
|
2209
2216
|
props: {
|
|
2210
2217
|
...de(),
|
|
2211
2218
|
type: {
|
|
2212
2219
|
type: String,
|
|
2213
2220
|
default: null,
|
|
2214
|
-
validator: (t) => t in
|
|
2221
|
+
validator: (t) => t in je || t == null
|
|
2215
2222
|
}
|
|
2216
2223
|
},
|
|
2217
2224
|
setup(t, { emit: e }) {
|
|
@@ -2238,28 +2245,29 @@ const Ro = /* @__PURE__ */ H({
|
|
|
2238
2245
|
};
|
|
2239
2246
|
}
|
|
2240
2247
|
const d = v(() => {
|
|
2241
|
-
|
|
2242
|
-
|
|
2248
|
+
var s;
|
|
2249
|
+
if ((s = r.data) != null && s.length) {
|
|
2250
|
+
if (Ve(r.data))
|
|
2243
2251
|
return l.get("single");
|
|
2244
2252
|
if (!r.type)
|
|
2245
2253
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2246
2254
|
return l.get(r.type);
|
|
2247
2255
|
}
|
|
2248
2256
|
});
|
|
2249
|
-
return { __sfc: !0, TYPES:
|
|
2257
|
+
return { __sfc: !0, TYPES: je, LumeSingleBarChart: n, LumeGroupedBarChart: o, LumeStackedBarChart: a, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: d };
|
|
2250
2258
|
}
|
|
2251
2259
|
});
|
|
2252
|
-
var
|
|
2260
|
+
var Ro = function() {
|
|
2253
2261
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2254
2262
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(o, a) {
|
|
2255
2263
|
return { key: a, fn: function(l) {
|
|
2256
2264
|
return [e._t(a, null, null, l || {})];
|
|
2257
2265
|
} };
|
|
2258
2266
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2259
|
-
},
|
|
2267
|
+
}, Po = [], Bo = /* @__PURE__ */ w(
|
|
2268
|
+
So,
|
|
2260
2269
|
Ro,
|
|
2261
2270
|
Po,
|
|
2262
|
-
So,
|
|
2263
2271
|
!1,
|
|
2264
2272
|
null,
|
|
2265
2273
|
null,
|
|
@@ -2292,7 +2300,7 @@ function Dt(t, e) {
|
|
|
2292
2300
|
var a;
|
|
2293
2301
|
return {
|
|
2294
2302
|
...o,
|
|
2295
|
-
values:
|
|
2303
|
+
values: Me(
|
|
2296
2304
|
o.values,
|
|
2297
2305
|
((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) ?? 0
|
|
2298
2306
|
).map((l) => ({
|
|
@@ -2336,9 +2344,9 @@ function zo(t, e, r, n, o, a) {
|
|
|
2336
2344
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2337
2345
|
}
|
|
2338
2346
|
function d(s, _, m) {
|
|
2339
|
-
const { value: p, color: h } = s,
|
|
2347
|
+
const { value: p, color: h } = s, g = h ?? t.value[_].color ?? he, { x: f, y: k } = i(p, m), T = u(p), x = c(p);
|
|
2340
2348
|
return {
|
|
2341
|
-
classList: [`lume-fill--${
|
|
2349
|
+
classList: [`lume-fill--${g}`, ...a],
|
|
2342
2350
|
x: f,
|
|
2343
2351
|
y: k,
|
|
2344
2352
|
width: T,
|
|
@@ -2353,16 +2361,16 @@ function Wo(t, e, r, n, o, a) {
|
|
|
2353
2361
|
const l = v(
|
|
2354
2362
|
() => n.value === L.HORIZONTAL
|
|
2355
2363
|
), 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));
|
|
2356
|
-
function c(p, h,
|
|
2364
|
+
function c(p, h, g) {
|
|
2357
2365
|
if (l.value)
|
|
2358
2366
|
return p >= 0 ? e.value(0) : e.value(p);
|
|
2359
2367
|
const f = e.value.domain();
|
|
2360
|
-
return e.value(f[h]) + i.value(
|
|
2368
|
+
return e.value(f[h]) + i.value(g);
|
|
2361
2369
|
}
|
|
2362
|
-
function d(p, h,
|
|
2370
|
+
function d(p, h, g) {
|
|
2363
2371
|
if (l.value) {
|
|
2364
2372
|
const f = r.value.domain();
|
|
2365
|
-
return r.value(f[h]) + u.value(
|
|
2373
|
+
return r.value(f[h]) + u.value(g);
|
|
2366
2374
|
}
|
|
2367
2375
|
return p < 0 ? r.value(0) : r.value(p);
|
|
2368
2376
|
}
|
|
@@ -2372,15 +2380,15 @@ function Wo(t, e, r, n, o, a) {
|
|
|
2372
2380
|
function _(p) {
|
|
2373
2381
|
return l.value ? u.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
|
|
2374
2382
|
}
|
|
2375
|
-
function m(p, h,
|
|
2376
|
-
const { value: f, color: k } = p, T = k ?? t.value[h].color ?? Object.values(W)[h], x = c(f,
|
|
2383
|
+
function m(p, h, g) {
|
|
2384
|
+
const { value: f, color: k } = p, T = k ?? t.value[h].color ?? Object.values(W)[h], x = c(f, g, h), $ = d(f, g, h), A = s(f), D = _(f);
|
|
2377
2385
|
return {
|
|
2378
2386
|
classList: [`lume-fill--${T}`, ...a],
|
|
2379
2387
|
x,
|
|
2380
2388
|
y: $,
|
|
2381
2389
|
width: A,
|
|
2382
2390
|
height: D,
|
|
2383
|
-
isFaded: o.value !== -1 && o.value !==
|
|
2391
|
+
isFaded: o.value !== -1 && o.value !== g,
|
|
2384
2392
|
isNegative: f < 0
|
|
2385
2393
|
};
|
|
2386
2394
|
}
|
|
@@ -2404,24 +2412,24 @@ function Zo(t, e, r) {
|
|
|
2404
2412
|
return Math.max(...u);
|
|
2405
2413
|
});
|
|
2406
2414
|
function l(u, c, d) {
|
|
2407
|
-
return n.value ? fe().domain([o.value, a.value]).range([0, d.width]) : Object.assign(
|
|
2408
|
-
|
|
2415
|
+
return c.length ? n.value ? fe().domain([o.value, a.value]).range([0, d.width]) : Object.assign(
|
|
2416
|
+
lt(
|
|
2409
2417
|
_e().domain(c.map((s, _) => _)).range([0, d.width]),
|
|
2410
2418
|
e.value,
|
|
2411
2419
|
r.value
|
|
2412
2420
|
),
|
|
2413
2421
|
{ labels: c }
|
|
2414
|
-
);
|
|
2422
|
+
) : null;
|
|
2415
2423
|
}
|
|
2416
2424
|
function i(u, c, d) {
|
|
2417
|
-
return n.value ? Object.assign(
|
|
2418
|
-
|
|
2425
|
+
return c.length ? n.value ? Object.assign(
|
|
2426
|
+
lt(
|
|
2419
2427
|
_e().domain(c.map((s, _) => _)).range([0, d.height]),
|
|
2420
2428
|
e.value,
|
|
2421
2429
|
r.value
|
|
2422
2430
|
),
|
|
2423
2431
|
{ labels: c }
|
|
2424
|
-
) : fe().domain([a.value, o.value]).range([0, d.height]);
|
|
2432
|
+
) : fe().domain([a.value, o.value]).range([0, d.height]) : null;
|
|
2425
2433
|
}
|
|
2426
2434
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2427
2435
|
}
|
|
@@ -2455,28 +2463,28 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2455
2463
|
function h(f, k) {
|
|
2456
2464
|
return f ? u.value.reduce((T, x, $) => ($ < f && x[k] < 0 && (T += x[k]), T), 0) : 0;
|
|
2457
2465
|
}
|
|
2458
|
-
function
|
|
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:
|
|
2466
|
+
function g(f, k, T) {
|
|
2467
|
+
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: R, y: j } = c(x, T, F);
|
|
2460
2468
|
return {
|
|
2461
2469
|
classList: [`lume-fill--${$ ?? t.value[k].color ?? Object.values(W)[k]}`, ...a],
|
|
2462
2470
|
width: A,
|
|
2463
2471
|
height: D,
|
|
2464
|
-
x:
|
|
2472
|
+
x: R,
|
|
2465
2473
|
y: j,
|
|
2466
2474
|
isFaded: o.value !== -1 && o.value !== T,
|
|
2467
2475
|
isNegative: x < 0
|
|
2468
2476
|
};
|
|
2469
2477
|
}
|
|
2470
|
-
return { barAttributeGenerator:
|
|
2478
|
+
return { barAttributeGenerator: g };
|
|
2471
2479
|
}
|
|
2472
|
-
const
|
|
2480
|
+
const _t = {
|
|
2473
2481
|
single: zo,
|
|
2474
2482
|
grouped: Wo,
|
|
2475
2483
|
stacked: Xo
|
|
2476
2484
|
}, Uo = /* @__PURE__ */ H({
|
|
2477
2485
|
__name: "lume-bar-group",
|
|
2478
2486
|
props: {
|
|
2479
|
-
|
|
2487
|
+
...$e(),
|
|
2480
2488
|
classList: {
|
|
2481
2489
|
type: [String, Array],
|
|
2482
2490
|
default: () => []
|
|
@@ -2499,11 +2507,11 @@ const ft = {
|
|
|
2499
2507
|
yScale: c,
|
|
2500
2508
|
classList: d,
|
|
2501
2509
|
labels: s
|
|
2502
|
-
} = B(r), _ =
|
|
2503
|
-
const $ = Vo(n, i), { barAttributeGenerator: A } =
|
|
2510
|
+
} = B(r), _ = Ae("chartID"), { emitInternalEvent: m } = Q(e, _), { groupedData: p } = Dt(n, s), { barXScale: h, barYScale: g } = Mo(u, c, a), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2511
|
+
const $ = Vo(n, i), { barAttributeGenerator: A } = _t[$](
|
|
2504
2512
|
n,
|
|
2505
2513
|
h,
|
|
2506
|
-
|
|
2514
|
+
g,
|
|
2507
2515
|
a,
|
|
2508
2516
|
o,
|
|
2509
2517
|
f.value
|
|
@@ -2516,7 +2524,7 @@ const ft = {
|
|
|
2516
2524
|
async function x($) {
|
|
2517
2525
|
e("lume__internal--hover", $), m("lume__internal--hover", $);
|
|
2518
2526
|
}
|
|
2519
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2527
|
+
return { __sfc: !0, MIXIN_MAP: _t, 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: g, computedClasses: f, getBarAttributes: k, computedTransition: T, handleInternalHover: x, LumeBar: Xe };
|
|
2520
2528
|
}
|
|
2521
2529
|
});
|
|
2522
2530
|
var Yo = function() {
|
|
@@ -2544,7 +2552,7 @@ var Yo = function() {
|
|
|
2544
2552
|
null,
|
|
2545
2553
|
null
|
|
2546
2554
|
);
|
|
2547
|
-
const
|
|
2555
|
+
const Ke = Jo.exports, Qo = {
|
|
2548
2556
|
[L.VERTICAL]: {
|
|
2549
2557
|
withTooltip: !0,
|
|
2550
2558
|
xAxisOptions: {},
|
|
@@ -2560,14 +2568,14 @@ const Je = Jo.exports, Qo = {
|
|
|
2560
2568
|
}, qo = /* @__PURE__ */ H({
|
|
2561
2569
|
__name: "lume-single-bar-chart",
|
|
2562
2570
|
props: {
|
|
2563
|
-
...de(
|
|
2571
|
+
...de(Ve)
|
|
2564
2572
|
},
|
|
2565
2573
|
setup(t, { emit: e }) {
|
|
2566
2574
|
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { orientation: a, options: l } = B(r), i = v(
|
|
2567
2575
|
() => Qo[a.value || L.VERTICAL]
|
|
2568
2576
|
// needs to be computed so that default options are reactive
|
|
2569
2577
|
), { allOptions: u } = J(l, i);
|
|
2570
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup:
|
|
2578
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup: Ke };
|
|
2571
2579
|
}
|
|
2572
2580
|
});
|
|
2573
2581
|
var ea = function() {
|
|
@@ -2616,7 +2624,7 @@ const Xa = na.exports, ra = {
|
|
|
2616
2624
|
l,
|
|
2617
2625
|
i
|
|
2618
2626
|
);
|
|
2619
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup:
|
|
2627
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ve, LumeBarGroup: Ke };
|
|
2620
2628
|
}
|
|
2621
2629
|
});
|
|
2622
2630
|
var aa = function() {
|
|
@@ -2664,17 +2672,17 @@ const Ua = ua.exports, ia = {
|
|
|
2664
2672
|
), { allOptions: d } = J(
|
|
2665
2673
|
i,
|
|
2666
2674
|
c
|
|
2667
|
-
), { internalData: s } =
|
|
2675
|
+
), { internalData: s } = Ye(a), { groupedData: _ } = Dt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = Zo(
|
|
2668
2676
|
_,
|
|
2669
2677
|
l,
|
|
2670
2678
|
i
|
|
2671
|
-
);
|
|
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:
|
|
2679
|
+
), h = v(() => r.xScale || m), g = v(() => r.yScale || p);
|
|
2680
|
+
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, xScale: h, yScale: g, LumeChart: ve, LumeBarGroup: Ke };
|
|
2673
2681
|
}
|
|
2674
2682
|
});
|
|
2675
2683
|
var ca = function() {
|
|
2676
2684
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2677
|
-
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.
|
|
2685
|
+
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
2678
2686
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", o, !1), n.componentEventPropagator))];
|
|
2679
2687
|
} }, e._l(n.slots, function(o, a) {
|
|
2680
2688
|
return { key: a, fn: function(l) {
|
|
@@ -2691,7 +2699,7 @@ var ca = function() {
|
|
|
2691
2699
|
null,
|
|
2692
2700
|
null
|
|
2693
2701
|
);
|
|
2694
|
-
const Ya = va.exports,
|
|
2702
|
+
const Ya = va.exports, ft = 2, _a = /* @__PURE__ */ H({
|
|
2695
2703
|
__name: "lume-line",
|
|
2696
2704
|
props: {
|
|
2697
2705
|
pathDefinition: {
|
|
@@ -2700,7 +2708,7 @@ const Ya = va.exports, pt = 2, _a = /* @__PURE__ */ H({
|
|
|
2700
2708
|
},
|
|
2701
2709
|
width: {
|
|
2702
2710
|
type: Number,
|
|
2703
|
-
default:
|
|
2711
|
+
default: ft
|
|
2704
2712
|
},
|
|
2705
2713
|
color: {
|
|
2706
2714
|
type: String,
|
|
@@ -2726,7 +2734,7 @@ const Ya = va.exports, pt = 2, _a = /* @__PURE__ */ H({
|
|
|
2726
2734
|
emits: ["click"],
|
|
2727
2735
|
setup(t, { emit: e }) {
|
|
2728
2736
|
const r = O(null);
|
|
2729
|
-
return te(() =>
|
|
2737
|
+
return te(() => Oe(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: ft, emit: e, root: r };
|
|
2730
2738
|
}
|
|
2731
2739
|
});
|
|
2732
2740
|
var fa = function() {
|
|
@@ -2751,7 +2759,7 @@ var fa = function() {
|
|
|
2751
2759
|
null,
|
|
2752
2760
|
null
|
|
2753
2761
|
);
|
|
2754
|
-
const ha = ma.exports,
|
|
2762
|
+
const ha = ma.exports, pt = 4, ga = /* @__PURE__ */ H({
|
|
2755
2763
|
__name: "lume-point",
|
|
2756
2764
|
props: {
|
|
2757
2765
|
x: { type: Number, required: !0 },
|
|
@@ -2762,7 +2770,7 @@ const ha = ma.exports, mt = 4, ga = /* @__PURE__ */ H({
|
|
|
2762
2770
|
},
|
|
2763
2771
|
radius: {
|
|
2764
2772
|
type: Number,
|
|
2765
|
-
default:
|
|
2773
|
+
default: pt
|
|
2766
2774
|
},
|
|
2767
2775
|
active: {
|
|
2768
2776
|
type: Boolean,
|
|
@@ -2772,7 +2780,7 @@ const ha = ma.exports, mt = 4, ga = /* @__PURE__ */ H({
|
|
|
2772
2780
|
emits: ["click"],
|
|
2773
2781
|
setup(t, { emit: e }) {
|
|
2774
2782
|
const r = t, n = O(null), o = v(() => r.radius / 2);
|
|
2775
|
-
return te(() =>
|
|
2783
|
+
return te(() => Oe(n.value)), { __sfc: !0, DEFAULT_RADIUS: pt, props: r, emit: e, root: n, strokeWidth: o };
|
|
2776
2784
|
}
|
|
2777
2785
|
});
|
|
2778
2786
|
var ya = function() {
|
|
@@ -2791,7 +2799,7 @@ var ya = function() {
|
|
|
2791
2799
|
null
|
|
2792
2800
|
);
|
|
2793
2801
|
const xa = ka.exports;
|
|
2794
|
-
function
|
|
2802
|
+
function St(t) {
|
|
2795
2803
|
function e(a) {
|
|
2796
2804
|
let l = null;
|
|
2797
2805
|
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), []);
|
|
@@ -2848,10 +2856,10 @@ function La(t, e, r, n) {
|
|
|
2848
2856
|
).y((a) => n(a));
|
|
2849
2857
|
return e.every((a) => a == null) ? null : o(e);
|
|
2850
2858
|
}
|
|
2851
|
-
const
|
|
2859
|
+
const mt = 1, Oa = /* @__PURE__ */ H({
|
|
2852
2860
|
__name: "lume-line-group",
|
|
2853
2861
|
props: {
|
|
2854
|
-
|
|
2862
|
+
...$e(),
|
|
2855
2863
|
withPoints: {
|
|
2856
2864
|
type: Boolean,
|
|
2857
2865
|
default: !0
|
|
@@ -2863,7 +2871,7 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2863
2871
|
},
|
|
2864
2872
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2865
2873
|
setup(t, { emit: e }) {
|
|
2866
|
-
const r = t, { data: n, options: o, xScale: a, yScale: l, labels: i } = B(r), u =
|
|
2874
|
+
const r = t, { data: n, options: o, xScale: a, yScale: l, labels: i } = B(r), u = Ae(
|
|
2867
2875
|
"tooltipAnchorAttributes",
|
|
2868
2876
|
null
|
|
2869
2877
|
), { updateTooltipAnchorAttributes: c } = Nt(
|
|
@@ -2875,7 +2883,7 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2875
2883
|
), d = v(() => {
|
|
2876
2884
|
if (n.value.every((D) => D.isDashed))
|
|
2877
2885
|
return n.value;
|
|
2878
|
-
const { computedLineData: A } =
|
|
2886
|
+
const { computedLineData: A } = St(n);
|
|
2879
2887
|
return o.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
|
|
2880
2888
|
}), s = v(() => {
|
|
2881
2889
|
if (r.hoveredIndex === -1)
|
|
@@ -2885,12 +2893,12 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2885
2893
|
r.hoveredIndex
|
|
2886
2894
|
);
|
|
2887
2895
|
return {
|
|
2888
|
-
d: `M ${
|
|
2896
|
+
d: `M ${De(a.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2889
2897
|
V ${l.value(A)}`
|
|
2890
2898
|
// Move to X index, Vertical line to the highest point
|
|
2891
2899
|
};
|
|
2892
2900
|
}), _ = v(
|
|
2893
|
-
() => a.value &&
|
|
2901
|
+
() => a.value && mt / (sn(a.value) - 1)
|
|
2894
2902
|
// Subtracting the first line (read below)
|
|
2895
2903
|
), m = v(
|
|
2896
2904
|
() => {
|
|
@@ -2900,16 +2908,16 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2900
2908
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2901
2909
|
), p = v(
|
|
2902
2910
|
() => a.value.bandwidth() / 2
|
|
2903
|
-
), h = v(() => a.value.domain()),
|
|
2911
|
+
), h = v(() => a.value.domain()), g = v(
|
|
2904
2912
|
() => o.value.withPoints ?? r.withPoints
|
|
2905
2913
|
);
|
|
2906
2914
|
function f(A) {
|
|
2907
2915
|
return d.value[A].values;
|
|
2908
2916
|
}
|
|
2909
2917
|
function k(A, D) {
|
|
2910
|
-
var
|
|
2918
|
+
var R, j;
|
|
2911
2919
|
const F = A === 0 ? [] : [
|
|
2912
|
-
(
|
|
2920
|
+
(R = f(D)[A - 1]) == null ? void 0 : R.value,
|
|
2913
2921
|
(j = f(D)[A]) == null ? void 0 : j.value
|
|
2914
2922
|
];
|
|
2915
2923
|
return La(
|
|
@@ -2926,8 +2934,8 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2926
2934
|
};
|
|
2927
2935
|
}
|
|
2928
2936
|
function x(A, D) {
|
|
2929
|
-
var
|
|
2930
|
-
const F = (
|
|
2937
|
+
var R;
|
|
2938
|
+
const F = (R = f(D)[A]) == null ? void 0 : R.value;
|
|
2931
2939
|
return {
|
|
2932
2940
|
x: Y(a.value) ? r.xScale(h.value[A]) + p.value : r.xScale(A),
|
|
2933
2941
|
y: F === null ? l.value(l.value.domain()[1]) : l.value(F)
|
|
@@ -2936,7 +2944,7 @@ const ht = 1, Oa = /* @__PURE__ */ H({
|
|
|
2936
2944
|
function $(A) {
|
|
2937
2945
|
return r.hoveredIndex === A;
|
|
2938
2946
|
}
|
|
2939
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2947
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: mt, 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: g, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: T, getPointPosition: x, isPointActive: $, LumeLine: ha, LumePoint: xa };
|
|
2940
2948
|
}
|
|
2941
2949
|
});
|
|
2942
2950
|
var $a = function() {
|
|
@@ -2962,7 +2970,7 @@ var $a = function() {
|
|
|
2962
2970
|
null,
|
|
2963
2971
|
null
|
|
2964
2972
|
);
|
|
2965
|
-
const
|
|
2973
|
+
const Rt = Ea.exports, wa = {
|
|
2966
2974
|
margins: oe.VERTICAL,
|
|
2967
2975
|
startOnZero: !0,
|
|
2968
2976
|
withTooltip: !0,
|
|
@@ -2975,7 +2983,7 @@ const Pt = Ea.exports, wa = {
|
|
|
2975
2983
|
},
|
|
2976
2984
|
setup(t, { emit: e }) {
|
|
2977
2985
|
const r = t, { componentEventPropagator: n } = Q(e), o = ae(z()), { options: a } = B(r), { allOptions: l } = J(a, wa);
|
|
2978
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ve, LumeLineGroup:
|
|
2986
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ve, LumeLineGroup: Rt };
|
|
2979
2987
|
}
|
|
2980
2988
|
});
|
|
2981
2989
|
var Ha = function() {
|
|
@@ -2998,7 +3006,7 @@ var Ha = function() {
|
|
|
2998
3006
|
null
|
|
2999
3007
|
);
|
|
3000
3008
|
const Ka = Da.exports;
|
|
3001
|
-
function
|
|
3009
|
+
function Sa(t) {
|
|
3002
3010
|
return { areaPathDefinition: v(
|
|
3003
3011
|
() => function(r, n) {
|
|
3004
3012
|
if (!r || !n || Y(r) || Y(n))
|
|
@@ -3008,7 +3016,7 @@ function Ra(t) {
|
|
|
3008
3016
|
}
|
|
3009
3017
|
) };
|
|
3010
3018
|
}
|
|
3011
|
-
const
|
|
3019
|
+
const Ra = {
|
|
3012
3020
|
margins: {
|
|
3013
3021
|
top: 0,
|
|
3014
3022
|
right: 0,
|
|
@@ -3022,28 +3030,35 @@ const Pa = {
|
|
|
3022
3030
|
tooltipOptions: {
|
|
3023
3031
|
showTitle: !1
|
|
3024
3032
|
}
|
|
3025
|
-
},
|
|
3033
|
+
}, Pa = /* @__PURE__ */ H({
|
|
3026
3034
|
__name: "lume-sparkline-chart",
|
|
3027
3035
|
props: {
|
|
3028
|
-
...
|
|
3029
|
-
...
|
|
3036
|
+
...Ue(null),
|
|
3037
|
+
...pe()
|
|
3030
3038
|
},
|
|
3031
3039
|
setup(t, { expose: e, emit: r }) {
|
|
3032
|
-
const n = t, { componentEventPropagator: o } = Q(r), a = ae(z()), { data: l, options: i } = B(n), { internalData: u } =
|
|
3033
|
-
|
|
3040
|
+
const n = t, { componentEventPropagator: o } = Q(r), a = ae(z()), { data: l, options: i } = B(n), { internalData: u } = Ye(l), { allOptions: c } = J(i, Ra), { computedLineData: d } = St(u), { areaPathDefinition: s } = Sa(d), _ = v(() => {
|
|
3041
|
+
var g, f;
|
|
3042
|
+
return (f = (g = u.value) == null ? void 0 : g[0]) == null ? void 0 : f.color;
|
|
3043
|
+
}), m = v(
|
|
3044
|
+
() => {
|
|
3045
|
+
var g, f;
|
|
3046
|
+
return ((f = (g = l.value) == null ? void 0 : g[0]) == null ? void 0 : f.areaColor) || _.value;
|
|
3047
|
+
}
|
|
3034
3048
|
);
|
|
3035
|
-
function p(
|
|
3049
|
+
function p(g) {
|
|
3036
3050
|
return {
|
|
3037
|
-
...
|
|
3051
|
+
...g,
|
|
3038
3052
|
noMinSize: !0
|
|
3039
3053
|
};
|
|
3040
3054
|
}
|
|
3041
|
-
function h(
|
|
3042
|
-
|
|
3055
|
+
function h(g, f, k) {
|
|
3056
|
+
if (g.length)
|
|
3057
|
+
return fe().range([0, k.width]).domain([0, g[0].values.length - 1]);
|
|
3043
3058
|
}
|
|
3044
3059
|
return e({
|
|
3045
3060
|
areaPathDefinition: s
|
|
3046
|
-
}), { __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:
|
|
3061
|
+
}), { __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: Rt };
|
|
3047
3062
|
}
|
|
3048
3063
|
});
|
|
3049
3064
|
var Ba = function() {
|
|
@@ -3061,12 +3076,12 @@ var Ba = function() {
|
|
|
3061
3076
|
} };
|
|
3062
3077
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3063
3078
|
}, Fa = [], Ga = /* @__PURE__ */ w(
|
|
3064
|
-
|
|
3079
|
+
Pa,
|
|
3065
3080
|
Ba,
|
|
3066
3081
|
Fa,
|
|
3067
3082
|
!1,
|
|
3068
3083
|
null,
|
|
3069
|
-
"
|
|
3084
|
+
"bda226a1",
|
|
3070
3085
|
null,
|
|
3071
3086
|
null
|
|
3072
3087
|
);
|
|
@@ -3077,16 +3092,16 @@ export {
|
|
|
3077
3092
|
eo as LumeAlluvialNodeLabel,
|
|
3078
3093
|
ao as LumeAlluvialNodeValue,
|
|
3079
3094
|
Nn as LumeAxis,
|
|
3080
|
-
|
|
3095
|
+
Xe as LumeBar,
|
|
3081
3096
|
Za as LumeBarChart,
|
|
3082
|
-
|
|
3097
|
+
Ke as LumeBarGroup,
|
|
3083
3098
|
ve as LumeChart,
|
|
3084
3099
|
Mn as LumeChartContainer,
|
|
3085
3100
|
Un as LumeChartLegend,
|
|
3086
3101
|
Ua as LumeGroupedBarChart,
|
|
3087
3102
|
ha as LumeLine,
|
|
3088
3103
|
Ka as LumeLineChart,
|
|
3089
|
-
|
|
3104
|
+
Rt as LumeLineGroup,
|
|
3090
3105
|
Hr as LumeOverlayGroup,
|
|
3091
3106
|
xa as LumePoint,
|
|
3092
3107
|
Xa as LumeSingleBarChart,
|