@adyen/lume-vue3 1.6.4 → 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/composables/lume-skip.d.ts +3 -2
- package/dist/@types/components/core/lume-axis/composables/lume-skip.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/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
- package/dist/@types/composables/line-null-values.d.ts.map +1 -1
- package/dist/@types/composables/line-values.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 +839 -823
- 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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
2
|
-
import { format as mn, ticks as
|
|
1
|
+
import { defineComponent as Z, ref as B, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as le, createCommentVNode as W, isRef as Bt, computed as v, watch as K, toRefs as ne, inject as Ve, reactive as Pe, onMounted as ye, unref as d, Fragment as ee, renderList as z, createBlock as J, normalizeClass as oe, normalizeStyle as Rt, onBeforeUnmount as St, watchEffect as Ct, renderSlot as S, createTextVNode as pe, useSlots as ie, withDirectives as rn, withCtx as V, createSlots as de, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Ye, createVNode as se, nextTick as _t, toHandlers as ae, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Ke, resolveDynamicComponent as vn } from "vue";
|
|
2
|
+
import { format as mn, ticks as fn, scaleBand as He, scaleLinear as Me, link as pn, line as hn, area as gn } from "d3";
|
|
3
3
|
import { createPopper as _n } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
|
|
5
5
|
const An = {
|
|
@@ -44,7 +44,7 @@ const An = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t, l =
|
|
47
|
+
const o = t, l = B(null);
|
|
48
48
|
return n({ ref: l }), (u, a) => (_(), $("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -63,9 +63,9 @@ const An = {
|
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: l,
|
|
65
65
|
class: "axis__label"
|
|
66
|
-
}),
|
|
66
|
+
}), le(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (_(), $("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) :
|
|
68
|
+
e.withGridlines ? (_(), $("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : W("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
@@ -74,7 +74,7 @@ const te = (e, n) => {
|
|
|
74
74
|
for (const [o, l] of n)
|
|
75
75
|
t[o] = l;
|
|
76
76
|
return t;
|
|
77
|
-
},
|
|
77
|
+
}, yt = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -82,10 +82,10 @@ const te = (e, n) => {
|
|
|
82
82
|
"tooltip",
|
|
83
83
|
"tooltip-content"
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function Gt() {
|
|
86
86
|
return process.env.NODE_ENV === "production";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function jt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
90
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
@@ -98,17 +98,17 @@ function On(e) {
|
|
|
98
98
|
(n) => "color" in n
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Je(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Vt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
106
|
return Object.entries(n).forEach(([o, l]) => {
|
|
107
|
-
t[o] =
|
|
107
|
+
t[o] = Je(e[o]) && Je(l) ? Vt(e[o], l) : l;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
110
|
function xn(e) {
|
|
111
|
-
return e != null &&
|
|
111
|
+
return e != null && Je(e) && "value" in e;
|
|
112
112
|
}
|
|
113
113
|
function ve(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
@@ -134,8 +134,8 @@ function wn(e, n) {
|
|
|
134
134
|
}
|
|
135
135
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const n =
|
|
137
|
+
function Pt(e) {
|
|
138
|
+
const n = Bt(e) ? e.value : e;
|
|
139
139
|
if (!n)
|
|
140
140
|
throw new Error("No empty array can be created from specified data value");
|
|
141
141
|
const t = Math.max(
|
|
@@ -184,9 +184,9 @@ var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recom
|
|
|
184
184
|
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
|
|
185
185
|
const Bn = "[lume] ";
|
|
186
186
|
function _e(e, n = !0) {
|
|
187
|
-
n &&
|
|
187
|
+
n && Gt() || console.warn(Bn + "Warning: " + e);
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const je = (e) => {
|
|
190
190
|
let n = null;
|
|
191
191
|
switch (typeof e) {
|
|
192
192
|
case "string":
|
|
@@ -206,21 +206,21 @@ const Ve = (e) => {
|
|
|
206
206
|
return n ? n(...o) : o[0];
|
|
207
207
|
}
|
|
208
208
|
return t;
|
|
209
|
-
},
|
|
209
|
+
}, Be = () => ({
|
|
210
210
|
options: {
|
|
211
211
|
type: Object,
|
|
212
212
|
default: () => ({})
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
|
-
function
|
|
215
|
+
function fe(e, n) {
|
|
216
216
|
return { allOptions: v(() => {
|
|
217
|
-
const o =
|
|
218
|
-
return o ?
|
|
217
|
+
const o = Bt(n) ? n == null ? void 0 : n.value : n;
|
|
218
|
+
return o ? Vt(o, e.value) : e.value;
|
|
219
219
|
}) };
|
|
220
220
|
}
|
|
221
221
|
const Rn = 0.2;
|
|
222
222
|
function Sn(e, n, t) {
|
|
223
|
-
const o =
|
|
223
|
+
const o = B(), l = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
224
224
|
function a() {
|
|
225
225
|
if (!n.value)
|
|
226
226
|
return;
|
|
@@ -233,13 +233,13 @@ function Sn(e, n, t) {
|
|
|
233
233
|
function i(s) {
|
|
234
234
|
if (!n.value)
|
|
235
235
|
return !0;
|
|
236
|
-
const c = n.value.length;
|
|
236
|
+
const c = t.value.skip, p = n.value.length;
|
|
237
237
|
if (s === 0)
|
|
238
238
|
return !0;
|
|
239
|
-
const
|
|
240
|
-
return s %
|
|
239
|
+
const r = l.value / p, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(o.value / r);
|
|
240
|
+
return s % m === 0;
|
|
241
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return K(n, a), { showTick: i };
|
|
243
243
|
}
|
|
244
244
|
var ce = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ce || {}), Ft = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Ft || {}), it = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(it || {}), st = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(st || {}), ct = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ct || {});
|
|
245
245
|
const D = {
|
|
@@ -249,7 +249,7 @@ const D = {
|
|
|
249
249
|
SINGLE: "single",
|
|
250
250
|
GROUPED: "grouped",
|
|
251
251
|
STACKED: "stacked"
|
|
252
|
-
}, zt = "No data",
|
|
252
|
+
}, zt = "No data", kt = 20, Wt = 0.33, Zt = 0.5, Ut = 12, Re = 8, Gn = 1, jn = [
|
|
253
253
|
"auto",
|
|
254
254
|
"auto-start",
|
|
255
255
|
"auto-end",
|
|
@@ -308,7 +308,7 @@ const Xt = {
|
|
|
308
308
|
return {
|
|
309
309
|
x: -(c - e.value.step()) / 2,
|
|
310
310
|
width: c,
|
|
311
|
-
height: t.value.tickPadding + Ut +
|
|
311
|
+
height: t.value.tickPadding + Ut + Re
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
function a() {
|
|
@@ -343,7 +343,7 @@ const Xt = {
|
|
|
343
343
|
}
|
|
344
344
|
function u(s) {
|
|
345
345
|
var p;
|
|
346
|
-
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding +
|
|
346
|
+
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + Re;
|
|
347
347
|
return {
|
|
348
348
|
x: -c,
|
|
349
349
|
width: c,
|
|
@@ -384,7 +384,7 @@ const Xt = {
|
|
|
384
384
|
}
|
|
385
385
|
function u() {
|
|
386
386
|
return {
|
|
387
|
-
height: t.value.tickPadding + Ut +
|
|
387
|
+
height: t.value.tickPadding + Ut + Re,
|
|
388
388
|
width: o.value,
|
|
389
389
|
x: -(o.value / 2)
|
|
390
390
|
};
|
|
@@ -419,7 +419,7 @@ const Xt = {
|
|
|
419
419
|
}
|
|
420
420
|
function u(s) {
|
|
421
421
|
var p;
|
|
422
|
-
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding +
|
|
422
|
+
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + Re;
|
|
423
423
|
return {
|
|
424
424
|
width: c,
|
|
425
425
|
height: o.value,
|
|
@@ -471,12 +471,12 @@ const Xt = {
|
|
|
471
471
|
Kn
|
|
472
472
|
];
|
|
473
473
|
var Yt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Yt || {}), Kt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Kt || {}), Qe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Qe || {});
|
|
474
|
-
const
|
|
474
|
+
const bt = /* @__PURE__ */ Z({
|
|
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,
|
|
@@ -500,74 +500,76 @@ const At = /* @__PURE__ */ Z({
|
|
|
500
500
|
type: String,
|
|
501
501
|
default: D.VERTICAL
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...Be()
|
|
504
504
|
},
|
|
505
505
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
506
506
|
setup(e, { emit: n }) {
|
|
507
|
-
const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p =
|
|
507
|
+
const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p = Ve("isEmpty", B(!1)), r = Pe({}), m = B(null), g = B(null), f = B(null), A = v(
|
|
508
508
|
() => o.type ? Qe[o.type] : o.position
|
|
509
|
-
),
|
|
509
|
+
), L = v(
|
|
510
510
|
() => o.type || (A.value === "left" ? "y" : "x")
|
|
511
|
-
),
|
|
512
|
-
() =>
|
|
513
|
-
), { allOptions:
|
|
511
|
+
), k = v(
|
|
512
|
+
() => L.value === "x" && c.value === D.VERTICAL || L.value === "y" && c.value === D.HORIZONTAL
|
|
513
|
+
), { allOptions: h } = fe(
|
|
514
514
|
s,
|
|
515
|
-
|
|
516
|
-
), { showTick:
|
|
517
|
-
var R, H,
|
|
518
|
-
return
|
|
519
|
-
}),
|
|
515
|
+
L.value === "x" ? Vn : Pn
|
|
516
|
+
), { showTick: x } = Sn(u, m, h), E = v(() => {
|
|
517
|
+
var R, H, b, M;
|
|
518
|
+
return L.value === "y" && p.value && !u.value ? `translate(0, ${((R = a.value) == null ? void 0 : R.height) / 2})` : L.value === "x" && p.value && !u.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(b = a.value) == null ? void 0 : b.height})` : `translate(0, ${L.value === "x" ? (M = a.value) == null ? void 0 : M.height : 0})`;
|
|
519
|
+
}), N = v(() => {
|
|
520
|
+
if (!u.value)
|
|
521
|
+
return [];
|
|
520
522
|
if (ve(u.value))
|
|
521
523
|
return u.value.labels || u.value.domain();
|
|
522
|
-
const { tickCount: R } =
|
|
523
|
-
return
|
|
524
|
+
const { tickCount: R } = h.value, [H, b] = u.value.domain();
|
|
525
|
+
return fn(H, b, R);
|
|
524
526
|
}), F = v(() => {
|
|
525
|
-
const { tickFormat: R } =
|
|
526
|
-
return
|
|
527
|
+
const { tickFormat: R } = h.value;
|
|
528
|
+
return je(R);
|
|
527
529
|
}), w = v(
|
|
528
|
-
() =>
|
|
530
|
+
() => h.value.withHover && k.value && i.value > -1
|
|
529
531
|
), C = v(
|
|
530
|
-
() =>
|
|
531
|
-
),
|
|
532
|
+
() => h.value.tickPadding + Re || 16
|
|
533
|
+
), U = v(() => L.value === "x" ? (
|
|
532
534
|
// If x axis, get the tick height
|
|
533
535
|
Math.max(
|
|
534
|
-
...(
|
|
536
|
+
...(m.value || []).map(
|
|
535
537
|
(R) => {
|
|
536
|
-
var H,
|
|
537
|
-
return ((
|
|
538
|
+
var H, b;
|
|
539
|
+
return ((b = (H = R.ref).getBBox) == null ? void 0 : b.call(H).height) + C.value;
|
|
538
540
|
}
|
|
539
541
|
)
|
|
540
542
|
)
|
|
541
543
|
) : (
|
|
542
544
|
// If y axis, get the tick width
|
|
543
545
|
Math.max(
|
|
544
|
-
...(
|
|
546
|
+
...(m.value || []).map(
|
|
545
547
|
(R) => {
|
|
546
|
-
var H,
|
|
547
|
-
return ((
|
|
548
|
+
var H, b;
|
|
549
|
+
return ((b = (H = R.ref).getBBox) == null ? void 0 : b.call(H).width) + C.value;
|
|
548
550
|
}
|
|
549
551
|
)
|
|
550
552
|
)
|
|
551
553
|
));
|
|
552
|
-
function
|
|
553
|
-
const { showTicks: H } =
|
|
554
|
+
function X(R) {
|
|
555
|
+
const { showTicks: H } = h.value;
|
|
554
556
|
return H === !1 ? "" : F.value(R);
|
|
555
557
|
}
|
|
556
|
-
function q(R, H,
|
|
557
|
-
l("mouseenter", { index:
|
|
558
|
+
function q(R, H, b) {
|
|
559
|
+
l("mouseenter", { index: k.value ? R : null, value: H, event: b });
|
|
558
560
|
}
|
|
559
|
-
function P(R, H,
|
|
560
|
-
l("click", { index: R, value: H, event:
|
|
561
|
+
function P(R, H, b) {
|
|
562
|
+
l("click", { index: R, value: H, event: b });
|
|
561
563
|
}
|
|
562
564
|
function re(R) {
|
|
563
565
|
var H;
|
|
564
|
-
if (!(!
|
|
565
|
-
return (H =
|
|
566
|
+
if (!(!m.value || !m.value.length))
|
|
567
|
+
return (H = m.value[R]) == null ? void 0 : H.ref;
|
|
566
568
|
}
|
|
567
569
|
function xe() {
|
|
568
|
-
|
|
570
|
+
f.value = N.value.map(
|
|
569
571
|
(R, H) => ({
|
|
570
|
-
value:
|
|
572
|
+
value: X(R),
|
|
571
573
|
group: r.getTickGroupAttributes(R, H),
|
|
572
574
|
ghost: r.getTickGhostAttributes(re(H)),
|
|
573
575
|
label: r.getTickLabelAttributes(),
|
|
@@ -576,44 +578,46 @@ const At = /* @__PURE__ */ Z({
|
|
|
576
578
|
);
|
|
577
579
|
}
|
|
578
580
|
function be() {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
if (!u.value)
|
|
582
|
+
return;
|
|
583
|
+
const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${L.value}-${Yt[R]}`];
|
|
584
|
+
Object.entries(H(u, a, h) || []).forEach(
|
|
585
|
+
([b, M]) => {
|
|
586
|
+
r[b] = M;
|
|
583
587
|
}
|
|
584
588
|
);
|
|
585
589
|
}
|
|
586
|
-
return
|
|
590
|
+
return K(u, be, { flush: "sync", immediate: !0 }), K(u, xe, { immediate: !0 }), K(m, xe), K(U, (R) => l("lume__internal--axis-size", R)), ye(() => Fe(g.value)), (R, H) => d(u) ? (_(), $("g", {
|
|
587
591
|
key: 0,
|
|
588
592
|
ref_key: "root",
|
|
589
593
|
ref: g,
|
|
590
594
|
class: "axis",
|
|
591
|
-
transform:
|
|
595
|
+
transform: E.value,
|
|
592
596
|
"data-j-axis": "",
|
|
593
|
-
onMouseleave: H[1] || (H[1] = (
|
|
597
|
+
onMouseleave: H[1] || (H[1] = (b) => l("mouseleave", b))
|
|
594
598
|
}, [
|
|
595
|
-
|
|
596
|
-
(_(!0), $(ee, null,
|
|
597
|
-
key: `${
|
|
599
|
+
L.value === "x" ? (_(), $("defs", Yn, Jn)) : W("", !0),
|
|
600
|
+
(_(!0), $(ee, null, z(f.value, (b, M) => (_(), J(d(yt), j({
|
|
601
|
+
key: `${b.value}_${M}`,
|
|
598
602
|
ref_for: !0,
|
|
599
603
|
ref_key: "tickRefs",
|
|
600
|
-
ref:
|
|
601
|
-
},
|
|
602
|
-
"is-hidden": d(
|
|
603
|
-
"with-gridlines": d(
|
|
604
|
-
onMouseenter: (y) => q(
|
|
605
|
-
onClick: (y) => P(
|
|
604
|
+
ref: m
|
|
605
|
+
}, b, {
|
|
606
|
+
"is-hidden": d(h).skip && !d(x)(M),
|
|
607
|
+
"with-gridlines": d(h).gridLines,
|
|
608
|
+
onMouseenter: (y) => q(M, b.value, y),
|
|
609
|
+
onClick: (y) => P(M, b.value, y)
|
|
606
610
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
607
|
-
w.value ? (_(),
|
|
611
|
+
w.value ? (_(), J(d(yt), j({ key: 1 }, f.value[d(i)], {
|
|
608
612
|
"with-gridlines": !1,
|
|
609
613
|
"is-hovered": "",
|
|
610
|
-
onClick: H[0] || (H[0] = (
|
|
614
|
+
onClick: H[0] || (H[0] = (b) => P(
|
|
611
615
|
d(i),
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
f.value[d(i)].value,
|
|
617
|
+
b
|
|
614
618
|
))
|
|
615
|
-
}), null, 16)) :
|
|
616
|
-
], 40, Xn)) :
|
|
619
|
+
}), null, 16)) : W("", !0)
|
|
620
|
+
], 40, Xn)) : W("", !0);
|
|
617
621
|
}
|
|
618
622
|
});
|
|
619
623
|
function Qn(e, n, t, o) {
|
|
@@ -629,10 +633,10 @@ function Qn(e, n, t, o) {
|
|
|
629
633
|
return { computedX: a, computedY: i, shouldHaveMinWidth: l, shouldHaveMinHeight: u };
|
|
630
634
|
}
|
|
631
635
|
function qn(e, n, t, o) {
|
|
632
|
-
const l =
|
|
636
|
+
const l = B(0), u = B(0), a = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
633
637
|
return ye(() => {
|
|
634
638
|
l.value = t.value, u.value = o.value;
|
|
635
|
-
}),
|
|
639
|
+
}), K(t, (i) => l.value = i), K(o, (i) => u.value = i), { computedWidth: l, computedHeight: u, transformOrigin: a };
|
|
636
640
|
}
|
|
637
641
|
const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
638
642
|
__name: "lume-bar",
|
|
@@ -672,9 +676,9 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
672
676
|
},
|
|
673
677
|
emits: ["click", "mouseover", "mouseleave"],
|
|
674
678
|
setup(e, { emit: n }) {
|
|
675
|
-
const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p =
|
|
679
|
+
const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p = B(null), r = v(
|
|
676
680
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
677
|
-
),
|
|
681
|
+
), m = v(() => s.value === "width"), g = v(() => s.value === "height"), f = qn(l, u, a, i), { computedX: A, computedY: L, shouldHaveMinWidth: k, shouldHaveMinHeight: h } = Qn(l, u, a, i), x = v(() => k.value ? 1 : (m.value ? f.computedWidth : a).value), E = v(() => h.value ? 1 : (g.value ? f.computedHeight : i).value), N = m.value || g.value ? f.transformOrigin : null;
|
|
678
682
|
return ye(() => Fe(p.value)), (F, w) => (_(), $("rect", {
|
|
679
683
|
ref_key: "root",
|
|
680
684
|
ref: p,
|
|
@@ -682,16 +686,16 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
682
686
|
{
|
|
683
687
|
"lume-fill--faded": e.isFaded,
|
|
684
688
|
"lume-bar--negative": e.isNegative,
|
|
685
|
-
"lume-bar--transition-width":
|
|
689
|
+
"lume-bar--transition-width": m.value,
|
|
686
690
|
"lume-bar--transition-height": g.value
|
|
687
691
|
},
|
|
688
692
|
...r.value
|
|
689
693
|
]]),
|
|
690
|
-
style:
|
|
694
|
+
style: Rt({ transformOrigin: d(N) }),
|
|
691
695
|
x: d(A),
|
|
692
|
-
y: d(
|
|
693
|
-
width:
|
|
694
|
-
height:
|
|
696
|
+
y: d(L),
|
|
697
|
+
width: x.value,
|
|
698
|
+
height: E.value,
|
|
695
699
|
"data-j-bar": "",
|
|
696
700
|
onClick: w[0] || (w[0] = (C) => o("click", C)),
|
|
697
701
|
onMouseover: w[1] || (w[1] = (C) => o("mouseover", C)),
|
|
@@ -701,7 +705,7 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
701
705
|
});
|
|
702
706
|
const dt = /* @__PURE__ */ te(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
703
707
|
function no() {
|
|
704
|
-
const e =
|
|
708
|
+
const e = B(), n = Pe({
|
|
705
709
|
dimensions: {}
|
|
706
710
|
}), t = new ResizeObserver((o) => {
|
|
707
711
|
o.forEach((l) => {
|
|
@@ -710,11 +714,11 @@ function no() {
|
|
|
710
714
|
});
|
|
711
715
|
return ye(() => {
|
|
712
716
|
t.observe(e.value);
|
|
713
|
-
}),
|
|
717
|
+
}), St(() => {
|
|
714
718
|
t.unobserve(e.value);
|
|
715
719
|
}), { resizeState: n, resizeRef: e };
|
|
716
720
|
}
|
|
717
|
-
const oo = ["height"],
|
|
721
|
+
const oo = ["height"], lo = ["transform"], ao = /* @__PURE__ */ Z({
|
|
718
722
|
__name: "lume-chart-container",
|
|
719
723
|
props: {
|
|
720
724
|
margins: {
|
|
@@ -736,22 +740,22 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
736
740
|
},
|
|
737
741
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
738
742
|
setup(e, { emit: n }) {
|
|
739
|
-
const t = e, o = n, { margins: l, containerSize: u } = ne(t), a =
|
|
743
|
+
const t = e, o = n, { margins: l, containerSize: u } = ne(t), a = B(null), { resizeRef: i, resizeState: s } = no(), c = v(
|
|
740
744
|
() => u.value.height + l.value.top + l.value.bottom
|
|
741
745
|
);
|
|
742
|
-
return
|
|
746
|
+
return Ct(() => {
|
|
743
747
|
if (!a.value)
|
|
744
748
|
return;
|
|
745
749
|
const { width: p } = s.dimensions, { height: r } = a.value.getBoundingClientRect();
|
|
746
750
|
if (!p || !r)
|
|
747
751
|
return;
|
|
748
|
-
const
|
|
749
|
-
width:
|
|
752
|
+
const m = p - l.value.left - l.value.right, g = r - l.value.top - l.value.bottom, f = {
|
|
753
|
+
width: m > 0 ? m : 0,
|
|
750
754
|
height: g > 0 ? g : 0,
|
|
751
755
|
outerWidth: p,
|
|
752
756
|
outerHeight: r
|
|
753
757
|
};
|
|
754
|
-
o("resize",
|
|
758
|
+
o("resize", f);
|
|
755
759
|
}), (p, r) => (_(), $("div", {
|
|
756
760
|
ref_key: "resizeRef",
|
|
757
761
|
ref: i,
|
|
@@ -769,9 +773,9 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
769
773
|
}]),
|
|
770
774
|
height: c.value,
|
|
771
775
|
"data-j-chart-container__root": "",
|
|
772
|
-
onClick: r[0] || (r[0] = (
|
|
773
|
-
onMouseenter: r[1] || (r[1] = (
|
|
774
|
-
onMouseleave: r[2] || (r[2] = (
|
|
776
|
+
onClick: r[0] || (r[0] = (m) => o("click", m)),
|
|
777
|
+
onMouseenter: r[1] || (r[1] = (m) => o("mouseenter", m)),
|
|
778
|
+
onMouseleave: r[2] || (r[2] = (m) => o("mouseleave", m))
|
|
775
779
|
}, [
|
|
776
780
|
G("g", {
|
|
777
781
|
transform: `translate(${d(l).left}, ${d(l).top})`,
|
|
@@ -779,14 +783,14 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
779
783
|
"data-j-chart-container__group": ""
|
|
780
784
|
}, [
|
|
781
785
|
S(p.$slots, "default", {}, void 0, !0)
|
|
782
|
-
], 8,
|
|
786
|
+
], 8, lo)
|
|
783
787
|
], 42, oo)),
|
|
784
788
|
S(p.$slots, "footer", {}, void 0, !0),
|
|
785
789
|
S(p.$slots, "extra", {}, void 0, !0)
|
|
786
790
|
], 2));
|
|
787
791
|
}
|
|
788
792
|
});
|
|
789
|
-
const uo = /* @__PURE__ */ te(
|
|
793
|
+
const uo = /* @__PURE__ */ te(ao, [["__scopeId", "data-v-2c7d0302"]]), ro = ["onClick", "onMouseenter"], io = /* @__PURE__ */ Z({
|
|
790
794
|
__name: "lume-chart-legend",
|
|
791
795
|
props: {
|
|
792
796
|
data: {
|
|
@@ -797,31 +801,30 @@ const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["on
|
|
|
797
801
|
},
|
|
798
802
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
799
803
|
setup(e, { emit: n }) {
|
|
800
|
-
const t = n
|
|
801
|
-
return (
|
|
802
|
-
key: 0,
|
|
804
|
+
const t = n;
|
|
805
|
+
return (o, l) => (_(), $("div", {
|
|
803
806
|
class: "lume-chart-legend",
|
|
804
807
|
"data-j-chart-legend": "",
|
|
805
|
-
onMouseleave:
|
|
808
|
+
onMouseleave: l[0] || (l[0] = (u) => t("mouseleave"))
|
|
806
809
|
}, [
|
|
807
|
-
(_(!0), $(ee, null,
|
|
808
|
-
key: `legend-item-${
|
|
810
|
+
(_(!0), $(ee, null, z(e.data, (u, a) => (_(), $("div", {
|
|
811
|
+
key: `legend-item-${a}`,
|
|
809
812
|
class: "lume-chart-legend__item lume-typography--body",
|
|
810
813
|
tabindex: "0",
|
|
811
814
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
812
|
-
onClick: (
|
|
813
|
-
onMouseenter: (
|
|
815
|
+
onClick: (i) => t("click", { index: a, dataset: u, event: i }),
|
|
816
|
+
onMouseenter: (i) => t("mouseenter", { index: a, dataset: u, event: i })
|
|
814
817
|
}, [
|
|
815
818
|
G("span", {
|
|
816
|
-
class: oe(["lume-chart-legend__symbol", `lume-background-color--${
|
|
819
|
+
class: oe(["lume-chart-legend__symbol", `lume-background-color--${u.color}`]),
|
|
817
820
|
"data-j-chart-legend__symbol": ""
|
|
818
821
|
}, null, 2),
|
|
819
|
-
|
|
822
|
+
pe(" " + le(u.label || a), 1)
|
|
820
823
|
], 40, ro))), 128))
|
|
821
824
|
], 32));
|
|
822
825
|
}
|
|
823
826
|
});
|
|
824
|
-
const
|
|
827
|
+
const At = /* @__PURE__ */ te(io, [["__scopeId", "data-v-f8ebd3b9"]]);
|
|
825
828
|
const so = {}, co = {
|
|
826
829
|
class: "lume-tooltip__title",
|
|
827
830
|
"data-j-tooltip__title": ""
|
|
@@ -832,12 +835,12 @@ function vo(e, n) {
|
|
|
832
835
|
]);
|
|
833
836
|
}
|
|
834
837
|
const mo = /* @__PURE__ */ te(so, [["render", vo], ["__scopeId", "data-v-8af3fac6"]]);
|
|
835
|
-
const
|
|
838
|
+
const fo = {}, po = {
|
|
836
839
|
class: "lume-tooltip__item",
|
|
837
840
|
"data-j-tooltip__summary-item": ""
|
|
838
841
|
}, ho = { class: "lume-tooltip__value" };
|
|
839
842
|
function go(e, n) {
|
|
840
|
-
return _(), $("li",
|
|
843
|
+
return _(), $("li", po, [
|
|
841
844
|
G("span", null, [
|
|
842
845
|
S(e.$slots, "default", {}, void 0, !0)
|
|
843
846
|
]),
|
|
@@ -846,7 +849,7 @@ function go(e, n) {
|
|
|
846
849
|
])
|
|
847
850
|
]);
|
|
848
851
|
}
|
|
849
|
-
const _o = /* @__PURE__ */ te(
|
|
852
|
+
const _o = /* @__PURE__ */ te(fo, [["render", go], ["__scopeId", "data-v-4ed7ec1b"]]), yo = {
|
|
850
853
|
class: "lume-tooltip__item",
|
|
851
854
|
"data-j-tooltip__item": ""
|
|
852
855
|
}, ko = { "data-j-tooltip__item__label": "" }, bo = {
|
|
@@ -866,7 +869,7 @@ const _o = /* @__PURE__ */ te(po, [["render", go], ["__scopeId", "data-v-4ed7ec1
|
|
|
866
869
|
key: 0,
|
|
867
870
|
class: oe([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
868
871
|
"data-j-tooltip__item__symbol": ""
|
|
869
|
-
}, null, 2)) :
|
|
872
|
+
}, null, 2)) : W("", !0),
|
|
870
873
|
G("span", ko, [
|
|
871
874
|
S(n.$slots, "label", {}, void 0, !0)
|
|
872
875
|
]),
|
|
@@ -913,15 +916,15 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
913
916
|
type: String,
|
|
914
917
|
default: null
|
|
915
918
|
},
|
|
916
|
-
...
|
|
919
|
+
...Be()
|
|
917
920
|
},
|
|
918
921
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
919
922
|
setup(e, { emit: n }) {
|
|
920
|
-
const t = e, o = n, l =
|
|
923
|
+
const t = e, o = n, l = B(null), { items: u, options: a } = ne(t), i = ie(), s = B(null), { allOptions: c } = fe(a), p = v(
|
|
921
924
|
() => c.value.fixedPositioning ?? t.fixedPositioning
|
|
922
925
|
), r = v(
|
|
923
926
|
() => p.value ? "fixed" : "absolute"
|
|
924
|
-
),
|
|
927
|
+
), m = v(() => [
|
|
925
928
|
{
|
|
926
929
|
name: "computeStyles",
|
|
927
930
|
options: {
|
|
@@ -936,35 +939,35 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
936
939
|
...t.modifiers || []
|
|
937
940
|
]), g = v(
|
|
938
941
|
() => c.value.showTitle !== !1 && t.title != null
|
|
939
|
-
),
|
|
942
|
+
), f = v(() => je(c.value.valueFormat)), A = v(() => je(c.value.titleFormat)), L = v(
|
|
940
943
|
() => {
|
|
941
|
-
var
|
|
942
|
-
return ((
|
|
944
|
+
var N;
|
|
945
|
+
return ((N = u.value) == null ? void 0 : N.find((F) => F.isSummary)) || {
|
|
943
946
|
label: c.value.summary ?? t.summary
|
|
944
947
|
};
|
|
945
948
|
}
|
|
946
|
-
),
|
|
947
|
-
function
|
|
949
|
+
), k = v(() => i.summary || L.value.label);
|
|
950
|
+
function h() {
|
|
948
951
|
t.targetElement && l.value && (s.value = _n(t.targetElement, l.value, {
|
|
949
952
|
placement: t.position,
|
|
950
953
|
strategy: r.value,
|
|
951
|
-
modifiers:
|
|
954
|
+
modifiers: m.value
|
|
952
955
|
}), o("opened", t.targetElement));
|
|
953
956
|
}
|
|
954
|
-
function
|
|
957
|
+
function x() {
|
|
955
958
|
s.value && (s.value.destroy(), o("closed"));
|
|
956
959
|
}
|
|
957
|
-
function
|
|
960
|
+
function E() {
|
|
958
961
|
s.value && (c.value.withAnimation !== !1 && l.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
959
962
|
s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
|
|
960
|
-
}() :
|
|
963
|
+
}() : x());
|
|
961
964
|
}
|
|
962
|
-
return
|
|
965
|
+
return K(
|
|
963
966
|
() => t.targetElement,
|
|
964
|
-
(
|
|
965
|
-
!F &&
|
|
967
|
+
(N, F) => {
|
|
968
|
+
!F && N ? h() : E();
|
|
966
969
|
}
|
|
967
|
-
), ye(
|
|
970
|
+
), ye(h), St(x), (N, F) => rn((_(), $("div", {
|
|
968
971
|
ref_key: "root",
|
|
969
972
|
ref: l,
|
|
970
973
|
class: oe(["lume-tooltip lume-typography--caption", {
|
|
@@ -974,43 +977,43 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
974
977
|
onMouseenter: F[0] || (F[0] = (w) => o("tooltip-mouseenter")),
|
|
975
978
|
onMouseleave: F[1] || (F[1] = (w) => o("tooltip-mouseleave"))
|
|
976
979
|
}, [
|
|
977
|
-
S(
|
|
978
|
-
S(
|
|
979
|
-
g.value ? (_(),
|
|
980
|
+
S(N.$slots, "default", {}, () => [
|
|
981
|
+
S(N.$slots, "title", {}, () => [
|
|
982
|
+
g.value ? (_(), J(d(mo), { key: 0 }, {
|
|
980
983
|
default: V(() => [
|
|
981
|
-
|
|
984
|
+
pe(le(A.value(e.title)), 1)
|
|
982
985
|
]),
|
|
983
986
|
_: 1
|
|
984
|
-
})) :
|
|
987
|
+
})) : W("", !0)
|
|
985
988
|
], !0),
|
|
986
989
|
G("ul", Oo, [
|
|
987
|
-
S(
|
|
988
|
-
|
|
990
|
+
S(N.$slots, "summary", {}, () => [
|
|
991
|
+
k.value ? (_(), J(d(_o), { key: 0 }, de({
|
|
989
992
|
default: V(() => [
|
|
990
|
-
|
|
993
|
+
pe(le(L.value.label) + " ", 1)
|
|
991
994
|
]),
|
|
992
995
|
_: 2
|
|
993
996
|
}, [
|
|
994
|
-
|
|
997
|
+
L.value.value ? {
|
|
995
998
|
name: "value",
|
|
996
999
|
fn: V(() => [
|
|
997
|
-
|
|
1000
|
+
pe(le(f.value(L.value.value)), 1)
|
|
998
1001
|
]),
|
|
999
1002
|
key: "0"
|
|
1000
1003
|
} : void 0
|
|
1001
|
-
]), 1024)) :
|
|
1004
|
+
]), 1024)) : W("", !0)
|
|
1002
1005
|
], !0),
|
|
1003
|
-
|
|
1004
|
-
S(
|
|
1005
|
-
(_(!0), $(ee, null,
|
|
1006
|
+
k.value ? (_(), $("li", xo, Io)) : W("", !0),
|
|
1007
|
+
S(N.$slots, "items", {}, () => [
|
|
1008
|
+
(_(!0), $(ee, null, z(d(u), (w) => (_(), J(d(To), {
|
|
1006
1009
|
key: w.label,
|
|
1007
1010
|
color: w.color
|
|
1008
1011
|
}, {
|
|
1009
1012
|
label: V(() => [
|
|
1010
|
-
|
|
1013
|
+
pe(le(w.label), 1)
|
|
1011
1014
|
]),
|
|
1012
1015
|
value: V(() => [
|
|
1013
|
-
|
|
1016
|
+
pe(le(f.value(w.value)), 1)
|
|
1014
1017
|
]),
|
|
1015
1018
|
_: 2
|
|
1016
1019
|
}, 1032, ["color"]))), 128))
|
|
@@ -1024,14 +1027,14 @@ const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
1024
1027
|
});
|
|
1025
1028
|
const Eo = /* @__PURE__ */ te(wo, [["__scopeId", "data-v-8ec11304"]]);
|
|
1026
1029
|
var Te = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Te || {});
|
|
1027
|
-
const No = Te.Categorical,
|
|
1030
|
+
const No = Te.Categorical, Se = ce.Skyblue, Do = it.SkyTeal;
|
|
1028
1031
|
function Ho(e) {
|
|
1029
|
-
return e === Te.Divergent ? Do :
|
|
1032
|
+
return e === Te.Divergent ? Do : Se;
|
|
1030
1033
|
}
|
|
1031
1034
|
function Mo(e) {
|
|
1032
1035
|
return Object.values(ct).includes(e);
|
|
1033
1036
|
}
|
|
1034
|
-
function
|
|
1037
|
+
function Tt(e, n) {
|
|
1035
1038
|
return n === Te.Divergent ? Object.values(it).includes(e) : Object.values({
|
|
1036
1039
|
...ce,
|
|
1037
1040
|
...Ft,
|
|
@@ -1051,7 +1054,7 @@ function So(e, n) {
|
|
|
1051
1054
|
const t = (n + 1) * 10;
|
|
1052
1055
|
return `${e}-${t}`;
|
|
1053
1056
|
}
|
|
1054
|
-
function
|
|
1057
|
+
function Lt(e, n, t) {
|
|
1055
1058
|
switch (n) {
|
|
1056
1059
|
default:
|
|
1057
1060
|
case Te.Categorical:
|
|
@@ -1063,7 +1066,7 @@ function Ot(e, n, t) {
|
|
|
1063
1066
|
}
|
|
1064
1067
|
}
|
|
1065
1068
|
function Co(e, n, t = No, o) {
|
|
1066
|
-
return
|
|
1069
|
+
return Tt(e, t) ? e : (o > 4 && (_e(me.ColorLoop), o = o % 5), Tt(n, t) ? Lt(n, t, o) : Lt(Ho(t), t, o));
|
|
1067
1070
|
}
|
|
1068
1071
|
function Go(e) {
|
|
1069
1072
|
return e.map((n) => xn(n) ? n : { value: n });
|
|
@@ -1097,26 +1100,26 @@ function mt(e, n, t, o, l) {
|
|
|
1097
1100
|
}), a = Mn(12), i = v(() => {
|
|
1098
1101
|
var p;
|
|
1099
1102
|
return e.value.length > 5 && _e(me.DatasetLength), (p = e.value) == null ? void 0 : p.map(
|
|
1100
|
-
(r,
|
|
1103
|
+
(r, m) => {
|
|
1101
1104
|
if (jo(r))
|
|
1102
1105
|
return r;
|
|
1103
|
-
const g = Go(r.values),
|
|
1106
|
+
const g = Go(r.values), f = Co(
|
|
1104
1107
|
r.color,
|
|
1105
1108
|
t == null ? void 0 : t.value,
|
|
1106
1109
|
o == null ? void 0 : o.value.colorPalette,
|
|
1107
|
-
|
|
1110
|
+
m
|
|
1108
1111
|
);
|
|
1109
1112
|
return {
|
|
1110
1113
|
...r,
|
|
1111
1114
|
values: g,
|
|
1112
|
-
color:
|
|
1115
|
+
color: f,
|
|
1113
1116
|
__internal: !0
|
|
1114
1117
|
};
|
|
1115
1118
|
}
|
|
1116
1119
|
);
|
|
1117
|
-
}), s = v(() => Array.isArray(n.value) ? n.value :
|
|
1120
|
+
}), s = v(() => Array.isArray(n.value) ? n.value : Pt(e.value).map((p, r) => r));
|
|
1118
1121
|
function c(p) {
|
|
1119
|
-
const r = (l == null ? void 0 : l.value) === D.HORIZONTAL &&
|
|
1122
|
+
const r = (l == null ? void 0 : l.value) === D.HORIZONTAL && s.value.length * (((o == null ? void 0 : o.value.barHeight) || kt) * 2) + ((o == null ? void 0 : o.value.barHeight) || kt) || p.height;
|
|
1120
1123
|
u.width = p.width, u.height = r;
|
|
1121
1124
|
}
|
|
1122
1125
|
return {
|
|
@@ -1138,54 +1141,55 @@ const Vo = () => ({
|
|
|
1138
1141
|
}
|
|
1139
1142
|
});
|
|
1140
1143
|
function Po(e, n, t, o, l) {
|
|
1141
|
-
const u =
|
|
1144
|
+
const u = B(null), a = B(null);
|
|
1142
1145
|
function i() {
|
|
1146
|
+
var p, r, m, g;
|
|
1143
1147
|
const { width: s, height: c } = t;
|
|
1144
|
-
!s && !c ||
|
|
1148
|
+
!s && !c || (o.value === D.HORIZONTAL ? (u.value = (p = e.value) != null && p.length ? xt(
|
|
1145
1149
|
e.value,
|
|
1146
1150
|
s,
|
|
1147
1151
|
o.value,
|
|
1148
1152
|
l.value.startOnZero
|
|
1149
|
-
), a.value =
|
|
1153
|
+
) : null, a.value = (r = n.value) != null && r.length ? Ot(
|
|
1150
1154
|
n.value,
|
|
1151
1155
|
c,
|
|
1152
1156
|
o.value,
|
|
1153
1157
|
l.value
|
|
1154
|
-
)) : (u.value =
|
|
1158
|
+
) : null) : (u.value = (m = n.value) != null && m.length ? Ot(
|
|
1155
1159
|
n.value,
|
|
1156
1160
|
s,
|
|
1157
1161
|
o.value,
|
|
1158
1162
|
l.value
|
|
1159
|
-
), a.value =
|
|
1163
|
+
) : null, a.value = (g = e.value) != null && g.length ? xt(
|
|
1160
1164
|
e.value,
|
|
1161
1165
|
c,
|
|
1162
1166
|
o.value,
|
|
1163
1167
|
l.value.startOnZero
|
|
1164
|
-
)));
|
|
1168
|
+
) : null));
|
|
1165
1169
|
}
|
|
1166
|
-
return
|
|
1170
|
+
return Ct(i), { xScale: u, yScale: a };
|
|
1167
1171
|
}
|
|
1168
|
-
function
|
|
1172
|
+
function Ot(e, n, t, o) {
|
|
1169
1173
|
const l = [0, n], { padding: u, paddingInner: a, paddingOuter: i } = o, s = u ?? (t === D.HORIZONTAL ? Zt : Wt);
|
|
1170
1174
|
return Object.assign(
|
|
1171
1175
|
He().range(l).paddingInner(a ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1172
1176
|
{ labels: e }
|
|
1173
1177
|
);
|
|
1174
1178
|
}
|
|
1175
|
-
function
|
|
1176
|
-
const l =
|
|
1179
|
+
function xt(e, n, t, o) {
|
|
1180
|
+
const l = jt(e).filter((p) => p != null), u = [0, n];
|
|
1177
1181
|
if (l.length === 0)
|
|
1178
1182
|
return Me().range(u).domain([0, 0]).nice();
|
|
1179
1183
|
const a = Math.min(...l), i = o && a > 0 ? 0 : a, s = Math.max(...l), c = t === D.HORIZONTAL ? [i, s] : [s, i];
|
|
1180
1184
|
return Me().range(u).domain(c).nice();
|
|
1181
1185
|
}
|
|
1182
|
-
function
|
|
1186
|
+
function $t(e) {
|
|
1183
1187
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1184
1188
|
}
|
|
1185
1189
|
function qe(e, n) {
|
|
1186
1190
|
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1187
1191
|
}
|
|
1188
|
-
function
|
|
1192
|
+
function It(e, n, {
|
|
1189
1193
|
padding: t,
|
|
1190
1194
|
paddingInner: o,
|
|
1191
1195
|
paddingOuter: l
|
|
@@ -1199,7 +1203,7 @@ function Jt(e) {
|
|
|
1199
1203
|
const Ne = (e, n = !0) => ({
|
|
1200
1204
|
...vt(e),
|
|
1201
1205
|
...Vo(),
|
|
1202
|
-
...
|
|
1206
|
+
...Be(),
|
|
1203
1207
|
classList: {
|
|
1204
1208
|
type: [String, Array],
|
|
1205
1209
|
default: () => []
|
|
@@ -1217,7 +1221,7 @@ const Ne = (e, n = !0) => ({
|
|
|
1217
1221
|
} : {}
|
|
1218
1222
|
}), Fo = (e) => ({
|
|
1219
1223
|
...vt(e),
|
|
1220
|
-
...
|
|
1224
|
+
...Be(),
|
|
1221
1225
|
hoveredElement: {
|
|
1222
1226
|
type: [Number, String],
|
|
1223
1227
|
default: null
|
|
@@ -1275,28 +1279,28 @@ const Ne = (e, n = !0) => ({
|
|
|
1275
1279
|
},
|
|
1276
1280
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1277
1281
|
setup(e, { emit: n }) {
|
|
1278
|
-
const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() =>
|
|
1282
|
+
const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() => Pt(l));
|
|
1279
1283
|
function c(p) {
|
|
1280
|
-
var
|
|
1281
|
-
const r = u.value === D.HORIZONTAL ? i.value : a.value,
|
|
1284
|
+
var k;
|
|
1285
|
+
const r = u.value === D.HORIZONTAL ? i.value : a.value, m = r.domain(), g = $n(r), f = ((k = r.paddingInner) == null ? void 0 : k.call(r)) ?? 0, A = g * f, L = ve(r) ? r(m[p]) - A / 2 : r(p) - g / 2;
|
|
1282
1286
|
return u.value === D.HORIZONTAL ? {
|
|
1283
1287
|
width: Math.max(...a.value.range()),
|
|
1284
1288
|
height: g,
|
|
1285
|
-
transform: `translate(0, ${
|
|
1289
|
+
transform: `translate(0, ${L})`
|
|
1286
1290
|
} : {
|
|
1287
1291
|
width: g,
|
|
1288
1292
|
height: Math.max(...i.value.range()),
|
|
1289
|
-
transform: `translate(${
|
|
1293
|
+
transform: `translate(${L}, 0)`
|
|
1290
1294
|
};
|
|
1291
1295
|
}
|
|
1292
1296
|
return (p, r) => (_(), $("g", zo, [
|
|
1293
|
-
(_(!0), $(ee, null,
|
|
1297
|
+
(_(!0), $(ee, null, z(s.value, (m, g) => (_(), J(d(dt), j(c(g), {
|
|
1294
1298
|
key: `overlay-${g}`,
|
|
1295
1299
|
"data-j-lume-overlay-group": g,
|
|
1296
1300
|
transition: !1,
|
|
1297
1301
|
"class-list": "lume-fill--transparent",
|
|
1298
|
-
onMouseover: (
|
|
1299
|
-
onClick: (
|
|
1302
|
+
onMouseover: (f) => o("lume__internal--hover", g),
|
|
1303
|
+
onClick: (f) => o("click", { index: g, event: f })
|
|
1300
1304
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1301
1305
|
]));
|
|
1302
1306
|
}
|
|
@@ -1309,7 +1313,7 @@ const Ne = (e, n = !0) => ({
|
|
|
1309
1313
|
};
|
|
1310
1314
|
function Zo(e) {
|
|
1311
1315
|
return { hasNegativeValues: v(
|
|
1312
|
-
() =>
|
|
1316
|
+
() => jt(e.value).some((t) => t < 0)
|
|
1313
1317
|
) };
|
|
1314
1318
|
}
|
|
1315
1319
|
function Uo(e, n, t, o) {
|
|
@@ -1350,7 +1354,7 @@ function Yo(e, n) {
|
|
|
1350
1354
|
}
|
|
1351
1355
|
), []);
|
|
1352
1356
|
}
|
|
1353
|
-
const
|
|
1357
|
+
const wt = {
|
|
1354
1358
|
"stacked-bar": Yo
|
|
1355
1359
|
};
|
|
1356
1360
|
function Qt(e, n, t, o, l, u, a, i) {
|
|
@@ -1362,16 +1366,16 @@ function Qt(e, n, t, o, l, u, a, i) {
|
|
|
1362
1366
|
);
|
|
1363
1367
|
function c(p) {
|
|
1364
1368
|
var g;
|
|
1365
|
-
const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0,
|
|
1369
|
+
const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, m = i != null && i.value && wt[i.value] ? wt[i.value](
|
|
1366
1370
|
p,
|
|
1367
1371
|
r
|
|
1368
1372
|
) : Xo(p, r);
|
|
1369
|
-
e.value =
|
|
1370
|
-
cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(
|
|
1371
|
-
cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? qe(o.value, A) : o.value(
|
|
1373
|
+
e.value = m.map((f, A) => ({
|
|
1374
|
+
cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(f) : qe(t.value, A),
|
|
1375
|
+
cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? qe(o.value, A) : o.value(f)
|
|
1372
1376
|
}));
|
|
1373
1377
|
}
|
|
1374
|
-
return
|
|
1378
|
+
return K(
|
|
1375
1379
|
[t, o],
|
|
1376
1380
|
() => {
|
|
1377
1381
|
t.value && o.value && (a != null && a.value) && s.value && c(a.value);
|
|
@@ -1422,22 +1426,22 @@ function Qo(e) {
|
|
|
1422
1426
|
function qo(e) {
|
|
1423
1427
|
return !e || e === "auto" || e.right == null || e.right === "auto" ? tt : e.right;
|
|
1424
1428
|
}
|
|
1425
|
-
function
|
|
1429
|
+
function el(e, n) {
|
|
1426
1430
|
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || nt : e.bottom;
|
|
1427
1431
|
}
|
|
1428
|
-
function
|
|
1432
|
+
function tl(e, n) {
|
|
1429
1433
|
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || ot : e.left;
|
|
1430
1434
|
}
|
|
1431
|
-
const
|
|
1435
|
+
const nl = { class: "lume-chart__header" }, ol = { class: "lume-chart__header-section" }, ll = {
|
|
1432
1436
|
key: 0,
|
|
1433
1437
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1434
|
-
},
|
|
1438
|
+
}, al = { class: "lume-chart__controls" }, ul = { class: "lume-chart__header-section" }, rl = {
|
|
1435
1439
|
key: 0,
|
|
1436
1440
|
class: "lume-chart__axis-title lume-axis-title lume-typography--body"
|
|
1437
|
-
},
|
|
1441
|
+
}, il = { key: 3 }, sl = ["r"], cl = {
|
|
1438
1442
|
key: 0,
|
|
1439
1443
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1440
|
-
},
|
|
1444
|
+
}, dl = /* @__PURE__ */ Z({
|
|
1441
1445
|
__name: "lume-chart",
|
|
1442
1446
|
props: {
|
|
1443
1447
|
...Ne(),
|
|
@@ -1447,304 +1451,304 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1447
1451
|
}
|
|
1448
1452
|
},
|
|
1449
1453
|
setup(e, { emit: n }) {
|
|
1450
|
-
const t = e, o = ie(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r =
|
|
1451
|
-
|
|
1452
|
-
N,
|
|
1454
|
+
const t = e, o = ie(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r = B(-1), m = B(null), g = B(null), f = B([]), A = B(null), L = B(0), k = B(0), { allOptions: h } = fe(s), { internalData: x, computedLabels: E, containerSize: N, updateSize: F, chartID: w } = mt(u, a, i, h, c), { xScale: C, yScale: U } = Po(
|
|
1455
|
+
x,
|
|
1453
1456
|
E,
|
|
1457
|
+
N,
|
|
1454
1458
|
c,
|
|
1455
|
-
|
|
1456
|
-
),
|
|
1457
|
-
top: Qo(
|
|
1458
|
-
right: qo(
|
|
1459
|
-
bottom:
|
|
1460
|
-
left:
|
|
1459
|
+
h
|
|
1460
|
+
), X = v(() => ({
|
|
1461
|
+
top: Qo(h.value.margins),
|
|
1462
|
+
right: qo(h.value.margins),
|
|
1463
|
+
bottom: el(h.value.margins, L.value),
|
|
1464
|
+
left: tl(h.value.margins, k.value)
|
|
1461
1465
|
})), q = v(() => {
|
|
1462
|
-
var
|
|
1463
|
-
return t.xScale ?
|
|
1466
|
+
var O;
|
|
1467
|
+
return t.xScale ? $t(t.xScale) ? t.xScale : (O = t.xScale) == null ? void 0 : O.call(t, x.value, a.value, N) : C.value;
|
|
1464
1468
|
}), P = v(() => {
|
|
1465
|
-
var
|
|
1466
|
-
return t.yScale ?
|
|
1469
|
+
var O;
|
|
1470
|
+
return t.yScale ? $t(t.yScale) ? t.yScale : (O = t.yScale) == null ? void 0 : O.call(t, x.value, a.value, N) : U.value;
|
|
1467
1471
|
}), re = v(() => ({
|
|
1468
|
-
...
|
|
1472
|
+
...h.value.xAxisOptions,
|
|
1469
1473
|
withHover: c.value === D.VERTICAL
|
|
1470
1474
|
})), xe = v(() => ({
|
|
1471
|
-
...
|
|
1475
|
+
...h.value.yAxisOptions,
|
|
1472
1476
|
withHover: c.value === D.HORIZONTAL
|
|
1473
1477
|
})), be = v(() => {
|
|
1474
|
-
var
|
|
1475
|
-
return (
|
|
1478
|
+
var O;
|
|
1479
|
+
return (O = h.value.xAxisOptions) == null ? void 0 : O.title;
|
|
1476
1480
|
}), R = v(() => {
|
|
1477
|
-
var
|
|
1478
|
-
return (
|
|
1481
|
+
var O;
|
|
1482
|
+
return (O = h.value.yAxisOptions) == null ? void 0 : O.title;
|
|
1479
1483
|
}), H = v(() => {
|
|
1480
|
-
var
|
|
1481
|
-
return ((
|
|
1482
|
-
}),
|
|
1483
|
-
var
|
|
1484
|
-
return ((
|
|
1485
|
-
}),
|
|
1486
|
-
() => u.value.every((
|
|
1484
|
+
var O;
|
|
1485
|
+
return ((O = h.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && be.value;
|
|
1486
|
+
}), b = v(() => {
|
|
1487
|
+
var O;
|
|
1488
|
+
return ((O = h.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && R.value;
|
|
1489
|
+
}), M = v(
|
|
1490
|
+
() => u.value.every((O) => !O.values.length)
|
|
1487
1491
|
), y = v(() => {
|
|
1488
|
-
const
|
|
1489
|
-
return
|
|
1490
|
-
}), { hasNegativeValues:
|
|
1491
|
-
|
|
1492
|
+
const O = [], { noBaseScales: T } = h.value;
|
|
1493
|
+
return !T && !M.value && O.push(() => !!(q.value && P.value)), O.every((I) => I() === !0);
|
|
1494
|
+
}), { hasNegativeValues: Y } = Zo(x), { negativeBarAttributes: Q } = Uo(
|
|
1495
|
+
N,
|
|
1492
1496
|
q,
|
|
1493
1497
|
P,
|
|
1494
1498
|
c
|
|
1495
1499
|
), { shouldGenerateTooltipAnchors: ue } = Qt(
|
|
1496
|
-
m,
|
|
1497
1500
|
f,
|
|
1501
|
+
h,
|
|
1498
1502
|
q,
|
|
1499
1503
|
P,
|
|
1500
1504
|
a,
|
|
1501
1505
|
c,
|
|
1502
|
-
|
|
1506
|
+
x,
|
|
1503
1507
|
p
|
|
1504
|
-
), { tooltipConfig: $e, showTooltip: We, hideTooltip: Ze } = Ko(), { getTooltipItems: Ie } = Jo(
|
|
1505
|
-
() =>
|
|
1508
|
+
), { tooltipConfig: $e, showTooltip: We, hideTooltip: Ze } = Ko(), { getTooltipItems: Ie } = Jo(x), Ce = v(
|
|
1509
|
+
() => h.value.withTooltip !== !1 && $e.opened
|
|
1506
1510
|
), Ae = v(
|
|
1507
1511
|
() => {
|
|
1508
|
-
var
|
|
1509
|
-
return ((
|
|
1512
|
+
var O;
|
|
1513
|
+
return ((O = h.value.tooltipOptions) == null ? void 0 : O.position) || "top";
|
|
1510
1514
|
}
|
|
1511
|
-
),
|
|
1512
|
-
var
|
|
1513
|
-
const
|
|
1514
|
-
return $e.opened && (!
|
|
1515
|
+
), an = v(() => {
|
|
1516
|
+
var T;
|
|
1517
|
+
const O = (T = h.value.tooltipOptions) == null ? void 0 : T.withPointerEvents;
|
|
1518
|
+
return $e.opened && (!O || O && A.value === !1);
|
|
1515
1519
|
});
|
|
1516
|
-
function
|
|
1520
|
+
function Ge(O) {
|
|
1517
1521
|
var I;
|
|
1518
|
-
if (
|
|
1522
|
+
if (O === r.value)
|
|
1519
1523
|
return;
|
|
1520
|
-
const
|
|
1521
|
-
if (
|
|
1522
|
-
const
|
|
1523
|
-
We(
|
|
1524
|
+
const T = r.value;
|
|
1525
|
+
if (h.value.withHover !== !1 && (r.value = O), h.value.withTooltip !== !1) {
|
|
1526
|
+
const Xe = (I = h.value.tooltipOptions) != null && I.targetElement ? h.value.tooltipOptions.targetElement === "self" ? g.value.$el : h.value.tooltipOptions.targetElement : m.value[O];
|
|
1527
|
+
We(Xe);
|
|
1524
1528
|
}
|
|
1525
|
-
l("hovered-index-changed", { newIndex:
|
|
1529
|
+
l("hovered-index-changed", { newIndex: O, oldIndex: T });
|
|
1526
1530
|
}
|
|
1527
|
-
function
|
|
1531
|
+
function Ue() {
|
|
1528
1532
|
Ze(), r.value = -1;
|
|
1529
1533
|
}
|
|
1530
|
-
function
|
|
1534
|
+
function pt(O) {
|
|
1531
1535
|
if (!u.value.some(
|
|
1532
|
-
({ values: I }) =>
|
|
1536
|
+
({ values: I }) => O <= I.length - 1
|
|
1533
1537
|
)) {
|
|
1534
1538
|
_e(me.InvalidHoveredIndex);
|
|
1535
1539
|
return;
|
|
1536
1540
|
}
|
|
1537
|
-
|
|
1541
|
+
O == null || O === -1 ? Ue() : Ge(O);
|
|
1538
1542
|
}
|
|
1539
1543
|
function un() {
|
|
1540
1544
|
setTimeout(() => {
|
|
1541
|
-
|
|
1545
|
+
an.value && Ue(), l("chart-mouseleave");
|
|
1542
1546
|
}, 0);
|
|
1543
1547
|
}
|
|
1544
|
-
function
|
|
1545
|
-
|
|
1548
|
+
function ht({ index: O, value: T, event: I }) {
|
|
1549
|
+
O !== null && Ge(O), l("axis-mouseenter", { index: O, value: T, event: I });
|
|
1546
1550
|
}
|
|
1547
|
-
function
|
|
1548
|
-
l("axis-click", { index:
|
|
1551
|
+
function gt({ index: O, value: T, event: I }) {
|
|
1552
|
+
l("axis-click", { index: O, value: T, event: I });
|
|
1549
1553
|
}
|
|
1550
|
-
return
|
|
1554
|
+
return K(
|
|
1551
1555
|
u,
|
|
1552
|
-
(
|
|
1553
|
-
),
|
|
1556
|
+
(O, T) => l("data-changed", { newValue: O, oldValue: T })
|
|
1557
|
+
), K(
|
|
1554
1558
|
a,
|
|
1555
|
-
(
|
|
1556
|
-
),
|
|
1557
|
-
|
|
1558
|
-
(
|
|
1559
|
-
|
|
1559
|
+
(O, T) => l("labels-changed", { newValue: O, oldValue: T })
|
|
1560
|
+
), K(M, (O) => O && _e(me.Empty), { immediate: !0 }), K(() => t.hoveredIndex, pt), K(
|
|
1561
|
+
f,
|
|
1562
|
+
(O) => {
|
|
1563
|
+
O && t.hoveredIndex != null && r.value === -1 && pt(t.hoveredIndex);
|
|
1560
1564
|
},
|
|
1561
1565
|
{ flush: "post" }
|
|
1562
|
-
),
|
|
1563
|
-
|
|
1566
|
+
), K(A, (O) => {
|
|
1567
|
+
O === !1 && $e.opened && Ue();
|
|
1564
1568
|
}), ye(async () => {
|
|
1565
1569
|
l("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1566
|
-
}),
|
|
1570
|
+
}), Ye("chartID", w), Ye("isEmpty", M), Ye("tooltipAnchorAttributes", f), (O, T) => (_(), J(d(uo), {
|
|
1567
1571
|
id: `lume-chart_${d(w)}`,
|
|
1568
1572
|
ref_key: "chartContainer",
|
|
1569
1573
|
ref: g,
|
|
1570
|
-
margins:
|
|
1571
|
-
"container-size": d(
|
|
1572
|
-
"no-min-size": d(
|
|
1573
|
-
"transparent-background": d(
|
|
1574
|
+
margins: X.value,
|
|
1575
|
+
"container-size": d(N),
|
|
1576
|
+
"no-min-size": d(h).noMinSize,
|
|
1577
|
+
"transparent-background": d(h).transparentBackground,
|
|
1574
1578
|
"data-j-lume-chart": "",
|
|
1575
1579
|
onResize: d(F),
|
|
1576
|
-
onClick:
|
|
1577
|
-
onMouseenter:
|
|
1580
|
+
onClick: T[24] || (T[24] = (I) => l("chart-click", I)),
|
|
1581
|
+
onMouseenter: T[25] || (T[25] = (I) => l("chart-mouseenter", I)),
|
|
1578
1582
|
onMouseleave: un
|
|
1579
1583
|
}, {
|
|
1580
1584
|
header: V(() => [
|
|
1581
|
-
G("div",
|
|
1582
|
-
G("div",
|
|
1583
|
-
|
|
1584
|
-
G("div",
|
|
1585
|
-
S(
|
|
1585
|
+
G("div", nl, [
|
|
1586
|
+
G("div", ol, [
|
|
1587
|
+
O.title ? (_(), $("h1", ll, le(O.title), 1)) : W("", !0),
|
|
1588
|
+
G("div", al, [
|
|
1589
|
+
S(O.$slots, "controls", {}, void 0, !0)
|
|
1586
1590
|
])
|
|
1587
1591
|
]),
|
|
1588
|
-
G("div",
|
|
1589
|
-
|
|
1590
|
-
S(
|
|
1591
|
-
d(
|
|
1592
|
+
G("div", ul, [
|
|
1593
|
+
b.value ? (_(), $("h3", rl, le(R.value), 1)) : W("", !0),
|
|
1594
|
+
S(O.$slots, "legend", { data: d(x) }, () => [
|
|
1595
|
+
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (_(), J(d(At), {
|
|
1592
1596
|
key: 0,
|
|
1593
|
-
data: d(
|
|
1597
|
+
data: d(x),
|
|
1594
1598
|
class: "lume-chart__legend",
|
|
1595
1599
|
"data-j-lume-chart__legend": "",
|
|
1596
|
-
onClick:
|
|
1597
|
-
onMouseenter:
|
|
1598
|
-
onMouseleave:
|
|
1599
|
-
}, null, 8, ["data"])) :
|
|
1600
|
+
onClick: T[0] || (T[0] = (I) => l("legend-click", I)),
|
|
1601
|
+
onMouseenter: T[1] || (T[1] = (I) => l("legend-mouseenter", I)),
|
|
1602
|
+
onMouseleave: T[2] || (T[2] = (I) => l("legend-mouseleave"))
|
|
1603
|
+
}, null, 8, ["data"])) : W("", !0)
|
|
1600
1604
|
], !0)
|
|
1601
1605
|
])
|
|
1602
1606
|
])
|
|
1603
1607
|
]),
|
|
1604
1608
|
footer: V(() => [
|
|
1605
|
-
H.value ? (_(), $("h3",
|
|
1606
|
-
d(
|
|
1609
|
+
H.value ? (_(), $("h3", cl, le(be.value), 1)) : W("", !0),
|
|
1610
|
+
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (_(), J(d(At), {
|
|
1607
1611
|
key: 1,
|
|
1608
|
-
data: d(
|
|
1612
|
+
data: d(x),
|
|
1609
1613
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1610
1614
|
"data-j-lume-chart__legend": "",
|
|
1611
|
-
onClick:
|
|
1612
|
-
onMouseenter:
|
|
1613
|
-
onMouseleave:
|
|
1614
|
-
}, null, 8, ["data"])) :
|
|
1615
|
+
onClick: T[16] || (T[16] = (I) => l("legend-click", I)),
|
|
1616
|
+
onMouseenter: T[17] || (T[17] = (I) => l("legend-mouseenter", I)),
|
|
1617
|
+
onMouseleave: T[18] || (T[18] = (I) => l("legend-mouseleave"))
|
|
1618
|
+
}, null, 8, ["data"])) : W("", !0)
|
|
1615
1619
|
]),
|
|
1616
1620
|
extra: V(() => [
|
|
1617
|
-
S(
|
|
1618
|
-
data: d(
|
|
1619
|
-
labels: d(
|
|
1620
|
-
title: d(
|
|
1621
|
+
S(O.$slots, "tooltip", j(d($e), {
|
|
1622
|
+
data: d(x),
|
|
1623
|
+
labels: d(E),
|
|
1624
|
+
title: d(E)[r.value],
|
|
1621
1625
|
items: d(Ie)(r.value),
|
|
1622
1626
|
position: Ae.value,
|
|
1623
|
-
withTooltip: d(
|
|
1627
|
+
withTooltip: d(h).withTooltip !== !1,
|
|
1624
1628
|
hoveredIndex: r.value,
|
|
1625
1629
|
handleMouseEnter: () => A.value = !0,
|
|
1626
1630
|
handleMouseLeave: () => A.value = !1,
|
|
1627
|
-
options: d(
|
|
1631
|
+
options: d(h).tooltipOptions
|
|
1628
1632
|
}), () => [
|
|
1629
|
-
|
|
1633
|
+
Ce.value ? (_(), J(d(Eo), j({ key: 0 }, d($e), {
|
|
1630
1634
|
position: Ae.value,
|
|
1631
|
-
title: d(
|
|
1635
|
+
title: d(E)[r.value],
|
|
1632
1636
|
items: d(Ie)(r.value),
|
|
1633
|
-
options: d(
|
|
1637
|
+
options: d(h).tooltipOptions,
|
|
1634
1638
|
"data-j-lume-chart__tooltip": "",
|
|
1635
|
-
onOpened:
|
|
1639
|
+
onOpened: T[19] || (T[19] = (I) => l("tooltip-opened", {
|
|
1636
1640
|
index: r.value,
|
|
1637
1641
|
targetElement: I
|
|
1638
1642
|
})),
|
|
1639
|
-
onMoved:
|
|
1643
|
+
onMoved: T[20] || (T[20] = (I) => l("tooltip-moved", {
|
|
1640
1644
|
index: r.value,
|
|
1641
1645
|
targetElement: I
|
|
1642
1646
|
})),
|
|
1643
|
-
onClosed:
|
|
1644
|
-
onTooltipMouseenter:
|
|
1645
|
-
onTooltipMouseleave:
|
|
1647
|
+
onClosed: T[21] || (T[21] = (I) => l("tooltip-closed")),
|
|
1648
|
+
onTooltipMouseenter: T[22] || (T[22] = (I) => A.value = !0),
|
|
1649
|
+
onTooltipMouseleave: T[23] || (T[23] = (I) => A.value = !1)
|
|
1646
1650
|
}), {
|
|
1647
1651
|
default: V(() => [
|
|
1648
|
-
S(
|
|
1649
|
-
data: d(
|
|
1650
|
-
labels: d(
|
|
1652
|
+
S(O.$slots, "tooltip-content", {
|
|
1653
|
+
data: d(x),
|
|
1654
|
+
labels: d(E),
|
|
1651
1655
|
hoveredIndex: r.value
|
|
1652
1656
|
}, void 0, !0)
|
|
1653
1657
|
]),
|
|
1654
1658
|
_: 3
|
|
1655
|
-
}, 16, ["position", "title", "items", "options"])) :
|
|
1659
|
+
}, 16, ["position", "title", "items", "options"])) : W("", !0)
|
|
1656
1660
|
], !0)
|
|
1657
1661
|
]),
|
|
1658
1662
|
default: V(() => [
|
|
1659
1663
|
y.value ? (_(), $(ee, { key: 0 }, [
|
|
1660
|
-
d(
|
|
1664
|
+
d(Y) ? (_(), J(d(dt), j({ key: 0 }, d(Q), {
|
|
1661
1665
|
"class-list": "lume-fill--negative",
|
|
1662
1666
|
transition: !1,
|
|
1663
1667
|
"data-j-lume-chart__negative-values": ""
|
|
1664
|
-
}), null, 16)) :
|
|
1665
|
-
d(
|
|
1668
|
+
}), null, 16)) : W("", !0),
|
|
1669
|
+
d(h).withAxes !== !1 ? S(O.$slots, "axes", {
|
|
1666
1670
|
key: 1,
|
|
1667
1671
|
xScale: q.value,
|
|
1668
1672
|
yScale: P.value,
|
|
1669
|
-
containerSize: d(
|
|
1670
|
-
options: d(
|
|
1673
|
+
containerSize: d(N),
|
|
1674
|
+
options: d(h),
|
|
1671
1675
|
hoveredIndex: r.value
|
|
1672
1676
|
}, () => [
|
|
1673
|
-
se(d(
|
|
1677
|
+
se(d(bt), {
|
|
1674
1678
|
type: "x",
|
|
1675
1679
|
scale: q.value,
|
|
1676
|
-
"container-size": d(
|
|
1680
|
+
"container-size": d(N),
|
|
1677
1681
|
options: re.value,
|
|
1678
1682
|
"hovered-index": r.value,
|
|
1679
1683
|
orientation: d(c),
|
|
1680
1684
|
"data-j-lume-chart__x-axis": "",
|
|
1681
|
-
onClick:
|
|
1682
|
-
onMouseenter:
|
|
1683
|
-
onMouseleave:
|
|
1684
|
-
"onLume__internal-AxisSize":
|
|
1685
|
+
onClick: gt,
|
|
1686
|
+
onMouseenter: ht,
|
|
1687
|
+
onMouseleave: T[3] || (T[3] = (I) => l("axis-mouseleave")),
|
|
1688
|
+
"onLume__internal-AxisSize": T[4] || (T[4] = (I) => L.value = I)
|
|
1685
1689
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1686
|
-
se(d(
|
|
1690
|
+
se(d(bt), {
|
|
1687
1691
|
type: "y",
|
|
1688
1692
|
scale: P.value,
|
|
1689
|
-
"container-size": d(
|
|
1693
|
+
"container-size": d(N),
|
|
1690
1694
|
options: xe.value,
|
|
1691
1695
|
"hovered-index": r.value,
|
|
1692
1696
|
orientation: d(c),
|
|
1693
1697
|
"data-j-lume-chart__y-axis": "",
|
|
1694
|
-
onClick:
|
|
1695
|
-
onMouseenter:
|
|
1696
|
-
onMouseleave:
|
|
1697
|
-
"onLume__internal-AxisSize":
|
|
1698
|
+
onClick: gt,
|
|
1699
|
+
onMouseenter: ht,
|
|
1700
|
+
onMouseleave: T[5] || (T[5] = (I) => l("axis-mouseleave")),
|
|
1701
|
+
"onLume__internal-AxisSize": T[6] || (T[6] = (I) => k.value = I)
|
|
1698
1702
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1699
|
-
], !0) :
|
|
1700
|
-
d(
|
|
1703
|
+
], !0) : W("", !0),
|
|
1704
|
+
d(h).withHover !== !1 ? (_(), J(d(Wo), {
|
|
1701
1705
|
key: 2,
|
|
1702
|
-
data: d(
|
|
1706
|
+
data: d(x),
|
|
1703
1707
|
orientation: d(c),
|
|
1704
1708
|
"x-scale": q.value,
|
|
1705
1709
|
"y-scale": P.value,
|
|
1706
1710
|
"data-j-lume-chart__overlay-group": "",
|
|
1707
|
-
"onLume__internal-Hover":
|
|
1708
|
-
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) :
|
|
1709
|
-
d(ue) ? (_(), $("g",
|
|
1710
|
-
(_(!0), $(ee, null,
|
|
1711
|
+
"onLume__internal-Hover": Ge
|
|
1712
|
+
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : W("", !0),
|
|
1713
|
+
d(ue) ? (_(), $("g", il, [
|
|
1714
|
+
(_(!0), $(ee, null, z(f.value, (I, Xe) => (_(), $("circle", j(I, {
|
|
1711
1715
|
ref_for: !0,
|
|
1712
1716
|
ref_key: "tooltipAnchor",
|
|
1713
|
-
ref:
|
|
1714
|
-
key: `anchor_${
|
|
1717
|
+
ref: m,
|
|
1718
|
+
key: `anchor_${Xe}`,
|
|
1715
1719
|
r: d(Gn),
|
|
1716
1720
|
class: "lume-fill--transparent"
|
|
1717
|
-
}), null, 16,
|
|
1718
|
-
])) :
|
|
1719
|
-
S(
|
|
1720
|
-
data: d(
|
|
1721
|
-
labels: d(
|
|
1722
|
-
options: d(
|
|
1721
|
+
}), null, 16, sl))), 128))
|
|
1722
|
+
])) : W("", !0),
|
|
1723
|
+
S(O.$slots, "groups", {
|
|
1724
|
+
data: d(x),
|
|
1725
|
+
labels: d(E),
|
|
1726
|
+
options: d(h),
|
|
1723
1727
|
orientation: d(c),
|
|
1724
1728
|
xScale: q.value,
|
|
1725
1729
|
yScale: P.value,
|
|
1726
1730
|
hoveredIndex: r.value,
|
|
1727
|
-
containerSize: d(
|
|
1728
|
-
transition: d(
|
|
1729
|
-
classList:
|
|
1730
|
-
onNodeClick:
|
|
1731
|
-
onNodeMouseenter:
|
|
1732
|
-
onNodeMouseleave:
|
|
1733
|
-
onLinkClick:
|
|
1734
|
-
onLinkMouseenter:
|
|
1735
|
-
onLinkMouseleave:
|
|
1736
|
-
onBarClick:
|
|
1737
|
-
onLineClick:
|
|
1738
|
-
onPointClick:
|
|
1739
|
-
"onLume__internal-Hover":
|
|
1731
|
+
containerSize: d(N),
|
|
1732
|
+
transition: d(h).withTransition !== !1,
|
|
1733
|
+
classList: O.classList,
|
|
1734
|
+
onNodeClick: T[7] || (T[7] = (I) => l("node-click", I)),
|
|
1735
|
+
onNodeMouseenter: T[8] || (T[8] = (I) => l("node-mouseenter", I)),
|
|
1736
|
+
onNodeMouseleave: T[9] || (T[9] = (I) => l("node-mouseleave", I)),
|
|
1737
|
+
onLinkClick: T[10] || (T[10] = (I) => l("link-click", I)),
|
|
1738
|
+
onLinkMouseenter: T[11] || (T[11] = (I) => l("link-mouseenter", I)),
|
|
1739
|
+
onLinkMouseleave: T[12] || (T[12] = (I) => l("link-mouseleave", I)),
|
|
1740
|
+
onBarClick: T[13] || (T[13] = (I) => l("bar-click", I)),
|
|
1741
|
+
onLineClick: T[14] || (T[14] = (I) => l("line-click", I)),
|
|
1742
|
+
onPointClick: T[15] || (T[15] = (I) => l("point-click", I)),
|
|
1743
|
+
"onLume__internal-Hover": Ge
|
|
1740
1744
|
}, void 0, !0)
|
|
1741
|
-
], 64)) :
|
|
1745
|
+
], 64)) : W("", !0)
|
|
1742
1746
|
]),
|
|
1743
1747
|
_: 3
|
|
1744
1748
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1745
1749
|
}
|
|
1746
1750
|
});
|
|
1747
|
-
const De = /* @__PURE__ */ te(
|
|
1751
|
+
const De = /* @__PURE__ */ te(dl, [["__scopeId", "data-v-84133075"]]), Et = 8, vl = 8, ml = 20, Ee = 2, Nt = 2, fl = ["dy", "dominant-baseline"], pl = ["y", "x", "width", "height"], hl = { class: "lume-alluvial-group__label-wrapper" }, gl = /* @__PURE__ */ Z({
|
|
1748
1752
|
__name: "lume-alluvial-node-label",
|
|
1749
1753
|
props: {
|
|
1750
1754
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1753,19 +1757,19 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
|
|
|
1753
1757
|
},
|
|
1754
1758
|
emits: ["lume__internal--node-resize"],
|
|
1755
1759
|
setup(e, { emit: n }) {
|
|
1756
|
-
const t = e, o = n, l =
|
|
1757
|
-
return
|
|
1760
|
+
const t = e, o = n, l = B(null), u = B(t.maxWidth), a = B(1);
|
|
1761
|
+
return K(
|
|
1758
1762
|
[l, () => t.maxWidth],
|
|
1759
1763
|
async ([i, s]) => {
|
|
1760
1764
|
if (i && s) {
|
|
1761
|
-
u.value = s, await
|
|
1765
|
+
u.value = s, await _t();
|
|
1762
1766
|
const { width: c, height: p } = i.getBoundingClientRect();
|
|
1763
|
-
u.value = c +
|
|
1767
|
+
u.value = c + Nt > s ? s : c + Nt, a.value = Math.ceil(p);
|
|
1764
1768
|
}
|
|
1765
1769
|
},
|
|
1766
1770
|
{ immediate: !0 }
|
|
1767
|
-
),
|
|
1768
|
-
i !== t.maxWidth && (await
|
|
1771
|
+
), K(u, async (i) => {
|
|
1772
|
+
i !== t.maxWidth && (await _t(), o("lume__internal--node-resize"));
|
|
1769
1773
|
}), (i, s) => e.maxWidth ? (_(), $("foreignObject", {
|
|
1770
1774
|
key: 1,
|
|
1771
1775
|
class: "lume-alluvial-group__node-foreign",
|
|
@@ -1774,7 +1778,7 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
|
|
|
1774
1778
|
width: u.value,
|
|
1775
1779
|
height: a.value
|
|
1776
1780
|
}, [
|
|
1777
|
-
G("div",
|
|
1781
|
+
G("div", hl, [
|
|
1778
1782
|
G("span", {
|
|
1779
1783
|
ref_key: "text",
|
|
1780
1784
|
ref: l,
|
|
@@ -1783,17 +1787,17 @@ const De = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Nt = 8, v
|
|
|
1783
1787
|
S(i.$slots, "default", {}, void 0, !0)
|
|
1784
1788
|
], 512)
|
|
1785
1789
|
])
|
|
1786
|
-
], 8,
|
|
1790
|
+
], 8, pl)) : (_(), $("text", {
|
|
1787
1791
|
key: 0,
|
|
1788
1792
|
class: "lume-alluvial-group__node-label",
|
|
1789
1793
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1790
1794
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1791
1795
|
}, [
|
|
1792
1796
|
S(i.$slots, "default", {}, void 0, !0)
|
|
1793
|
-
], 8,
|
|
1797
|
+
], 8, fl));
|
|
1794
1798
|
}
|
|
1795
1799
|
});
|
|
1796
|
-
const
|
|
1800
|
+
const _l = /* @__PURE__ */ te(gl, [["__scopeId", "data-v-7126dfdb"]]), yl = ["y", "dominant-baseline"], kl = /* @__PURE__ */ Z({
|
|
1797
1801
|
__name: "lume-alluvial-node-value",
|
|
1798
1802
|
props: {
|
|
1799
1803
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1805,11 +1809,11 @@ const _a = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y"
|
|
|
1805
1809
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1806
1810
|
}, [
|
|
1807
1811
|
S(n.$slots, "default", {}, void 0, !0)
|
|
1808
|
-
], 8,
|
|
1812
|
+
], 8, yl));
|
|
1809
1813
|
}
|
|
1810
1814
|
});
|
|
1811
|
-
const
|
|
1812
|
-
function
|
|
1815
|
+
const bl = /* @__PURE__ */ te(kl, [["__scopeId", "data-v-b4fc758b"]]);
|
|
1816
|
+
function Dt(e, n) {
|
|
1813
1817
|
return {
|
|
1814
1818
|
x0: 0 + (n ? n.left : 0),
|
|
1815
1819
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1817,32 +1821,32 @@ function Ht(e, n) {
|
|
|
1817
1821
|
y1: e.height - (n ? n.bottom : 0)
|
|
1818
1822
|
};
|
|
1819
1823
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const n =
|
|
1824
|
+
function Al(e) {
|
|
1825
|
+
const n = B(Dt(e));
|
|
1822
1826
|
function t(o) {
|
|
1823
|
-
n.value =
|
|
1827
|
+
n.value = Dt(e, o);
|
|
1824
1828
|
}
|
|
1825
1829
|
return { extents: n, updateExtents: t };
|
|
1826
1830
|
}
|
|
1827
1831
|
var qt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(qt || {});
|
|
1828
|
-
const
|
|
1829
|
-
function
|
|
1830
|
-
t &&
|
|
1832
|
+
const Tl = "[lume] ";
|
|
1833
|
+
function Ll(e, n, t = !0) {
|
|
1834
|
+
t && Gt() || console.error(Tl + "Error: " + e, n);
|
|
1831
1835
|
}
|
|
1832
|
-
const
|
|
1836
|
+
const Ol = 200;
|
|
1833
1837
|
function we(e) {
|
|
1834
1838
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1835
1839
|
}
|
|
1836
|
-
function
|
|
1840
|
+
function xl(e, n) {
|
|
1837
1841
|
return n.nodes.find((t) => t.id === e);
|
|
1838
1842
|
}
|
|
1839
|
-
function $
|
|
1843
|
+
function $l(e, n) {
|
|
1840
1844
|
return n.links.find((t) => t.id === e);
|
|
1841
1845
|
}
|
|
1842
1846
|
function en(e) {
|
|
1843
1847
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1844
1848
|
}
|
|
1845
|
-
function
|
|
1849
|
+
function Il(e, n) {
|
|
1846
1850
|
if (!n)
|
|
1847
1851
|
return;
|
|
1848
1852
|
const t = e.nodes.filter((a) => a.targetLinks.length === 0).map((a) => `${a.id}`), o = e.nodes.filter((a) => a.sourceLinks.length === 0).map((a) => `${a.id}`), l = n.filter((a) => t.includes(a.dataset.id)).reduce(
|
|
@@ -1859,7 +1863,7 @@ function Ia(e, n) {
|
|
|
1859
1863
|
bottom: 0
|
|
1860
1864
|
};
|
|
1861
1865
|
}
|
|
1862
|
-
function
|
|
1866
|
+
function wl(e) {
|
|
1863
1867
|
return e.map((n) => {
|
|
1864
1868
|
const t = n.y1 - n.y0 < Ee;
|
|
1865
1869
|
return {
|
|
@@ -1869,35 +1873,35 @@ function wa(e) {
|
|
|
1869
1873
|
width: n.x1 - n.x0,
|
|
1870
1874
|
height: t ? Ee : n.y1 - n.y0,
|
|
1871
1875
|
textTransform: {
|
|
1872
|
-
x: n.depth > 0 ? n.x1 +
|
|
1876
|
+
x: n.depth > 0 ? n.x1 + Et : n.x0 - Et,
|
|
1873
1877
|
y: (n.y1 + n.y0) / 2
|
|
1874
1878
|
},
|
|
1875
1879
|
node: n
|
|
1876
1880
|
};
|
|
1877
1881
|
});
|
|
1878
1882
|
}
|
|
1879
|
-
function
|
|
1883
|
+
function El(e) {
|
|
1880
1884
|
return [e.source.x1, e.y0];
|
|
1881
1885
|
}
|
|
1882
|
-
function
|
|
1886
|
+
function Nl(e) {
|
|
1883
1887
|
return [e.target.x0, e.y1];
|
|
1884
1888
|
}
|
|
1885
|
-
function
|
|
1886
|
-
return e.curveFunction ?
|
|
1889
|
+
function Dl(e) {
|
|
1890
|
+
return e.curveFunction ? pn(e.curveFunction).source(El).target(Nl) : yn();
|
|
1887
1891
|
}
|
|
1888
|
-
function
|
|
1892
|
+
function Hl(e) {
|
|
1889
1893
|
return e.map((n) => {
|
|
1890
1894
|
var t;
|
|
1891
1895
|
return {
|
|
1892
1896
|
id: n.id,
|
|
1893
|
-
color: n.color || ((t = n.source) == null ? void 0 : t.color) ||
|
|
1894
|
-
d:
|
|
1897
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Se,
|
|
1898
|
+
d: Dl(n)(n),
|
|
1895
1899
|
strokeWidth: Math.max(1, n.width),
|
|
1896
1900
|
link: n
|
|
1897
1901
|
};
|
|
1898
1902
|
});
|
|
1899
1903
|
}
|
|
1900
|
-
function
|
|
1904
|
+
function Ht(e, n, t, o, l) {
|
|
1901
1905
|
if (o === !1) {
|
|
1902
1906
|
e.node = {
|
|
1903
1907
|
...e.node,
|
|
@@ -1906,7 +1910,7 @@ function Mt(e, n, t, o, l) {
|
|
|
1906
1910
|
return;
|
|
1907
1911
|
}
|
|
1908
1912
|
const u = Date.now(), a = Nn(n, t), i = () => {
|
|
1909
|
-
let c = (Date.now() - u) /
|
|
1913
|
+
let c = (Date.now() - u) / Ol;
|
|
1910
1914
|
c > 1 && (c = 1), e.node = {
|
|
1911
1915
|
...e.node,
|
|
1912
1916
|
transitionValue: l && c === 1 ? void 0 : a(c)
|
|
@@ -1914,40 +1918,40 @@ function Mt(e, n, t, o, l) {
|
|
|
1914
1918
|
};
|
|
1915
1919
|
requestAnimationFrame(i);
|
|
1916
1920
|
}
|
|
1917
|
-
const
|
|
1921
|
+
const Ml = {
|
|
1918
1922
|
nodes: [],
|
|
1919
1923
|
links: []
|
|
1920
1924
|
};
|
|
1921
|
-
function
|
|
1925
|
+
function Mt(e, n) {
|
|
1922
1926
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1923
1927
|
}
|
|
1924
|
-
function
|
|
1925
|
-
const o =
|
|
1926
|
-
var r;
|
|
1927
|
-
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1928
|
-
({ label:
|
|
1929
|
-
label:
|
|
1930
|
-
color:
|
|
1931
|
-
fallbackColor:
|
|
1932
|
-
id:
|
|
1933
|
-
deriveColorFromIncomingLinks:
|
|
1934
|
-
offset:
|
|
1928
|
+
function Bl(e, n, t) {
|
|
1929
|
+
const o = B(null), l = v(() => {
|
|
1930
|
+
var r, m;
|
|
1931
|
+
return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
|
|
1932
|
+
({ label: g, color: f, value: A, deriveColorFromIncomingLinks: L, offset: k }) => ({
|
|
1933
|
+
label: g || A.toString(),
|
|
1934
|
+
color: f,
|
|
1935
|
+
fallbackColor: f || Se,
|
|
1936
|
+
id: A,
|
|
1937
|
+
deriveColorFromIncomingLinks: L,
|
|
1938
|
+
offset: k
|
|
1935
1939
|
})
|
|
1936
1940
|
);
|
|
1937
1941
|
}), u = v(
|
|
1938
1942
|
() => {
|
|
1939
|
-
var r;
|
|
1940
|
-
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1941
|
-
(
|
|
1942
|
-
var
|
|
1943
|
-
return (
|
|
1944
|
-
({ node:
|
|
1945
|
-
id: `${
|
|
1946
|
-
color:
|
|
1947
|
-
curveFunction:
|
|
1948
|
-
source:
|
|
1949
|
-
target:
|
|
1950
|
-
value:
|
|
1943
|
+
var r, m;
|
|
1944
|
+
return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
|
|
1945
|
+
(g) => {
|
|
1946
|
+
var f;
|
|
1947
|
+
return (f = g.targets) == null ? void 0 : f.map(
|
|
1948
|
+
({ node: A, value: L, color: k, curveFunction: h }) => ({
|
|
1949
|
+
id: `${g.value}:${A}`,
|
|
1950
|
+
color: k,
|
|
1951
|
+
curveFunction: h,
|
|
1952
|
+
source: g.value ?? g.label,
|
|
1953
|
+
target: A,
|
|
1954
|
+
value: L
|
|
1951
1955
|
})
|
|
1952
1956
|
);
|
|
1953
1957
|
}
|
|
@@ -1956,77 +1960,80 @@ function Ba(e, n, t) {
|
|
|
1956
1960
|
), a = v(() => kn().nodeId(we).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1957
1961
|
var r;
|
|
1958
1962
|
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1959
|
-
(
|
|
1960
|
-
const
|
|
1961
|
-
return
|
|
1963
|
+
(m, g) => {
|
|
1964
|
+
const f = Mt(g, m);
|
|
1965
|
+
return f ? (f.push(g), f.sort((A, L) => (A._y0 || A.y0) - (L._y0 || L.y0))) : m.push([g]), m;
|
|
1962
1966
|
},
|
|
1963
1967
|
[]
|
|
1964
1968
|
);
|
|
1965
1969
|
});
|
|
1966
1970
|
function s(r) {
|
|
1967
|
-
const { offset:
|
|
1971
|
+
const { offset: m } = r, g = Mt(r, i.value);
|
|
1968
1972
|
if (!g)
|
|
1969
1973
|
return;
|
|
1970
|
-
const
|
|
1974
|
+
const f = g[g.findIndex((L) => L.id === r.id) - 1], A = f && g.length !== 1 ? f.y1 + m : m;
|
|
1971
1975
|
r._y0 = r.y0, r._y1 = r.y1, r.y0 = A, r.y1 = r.y0 + (r._y1 - r._y0);
|
|
1972
1976
|
}
|
|
1973
|
-
function c(r,
|
|
1974
|
-
const { id: g, _y0:
|
|
1975
|
-
(
|
|
1976
|
-
),
|
|
1977
|
-
(
|
|
1978
|
-
),
|
|
1979
|
-
|
|
1980
|
-
}
|
|
1981
|
-
const p = v(() =>
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1977
|
+
function c(r, m) {
|
|
1978
|
+
const { id: g, _y0: f, y0: A } = r, L = m.links.filter(
|
|
1979
|
+
(x) => x.source.id === g
|
|
1980
|
+
), k = m.links.filter(
|
|
1981
|
+
(x) => x.target.id === g
|
|
1982
|
+
), h = A - f;
|
|
1983
|
+
L.forEach((x) => x.y0 += h), k.forEach((x) => x.y1 += h);
|
|
1984
|
+
}
|
|
1985
|
+
const p = v(() => {
|
|
1986
|
+
var r;
|
|
1987
|
+
return o.value && ((r = l.value) == null || r.forEach((m) => {
|
|
1988
|
+
m.value === 0 && (m.fallbackColor = st.Grey), typeof m.offset == "number" && (s(m), c(m, o.value));
|
|
1989
|
+
})), o.value;
|
|
1990
|
+
});
|
|
1991
|
+
return K([a, t], () => {
|
|
1985
1992
|
try {
|
|
1986
|
-
const { x0: r, y0:
|
|
1993
|
+
const { x0: r, y0: m, x1: g, y1: f } = t.value;
|
|
1987
1994
|
o.value = a.value.extent([
|
|
1988
|
-
[r,
|
|
1989
|
-
[g,
|
|
1995
|
+
[r, m],
|
|
1996
|
+
[g, f]
|
|
1990
1997
|
])({ nodes: l.value, links: u.value });
|
|
1991
1998
|
} catch (r) {
|
|
1992
|
-
|
|
1999
|
+
Ll(qt.GraphProblem, r), o.value = Ml;
|
|
1993
2000
|
}
|
|
1994
2001
|
}), { columns: i, graph: p };
|
|
1995
2002
|
}
|
|
1996
|
-
function
|
|
2003
|
+
function lt(e, n) {
|
|
1997
2004
|
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
1998
|
-
n[t.id] = o,
|
|
2005
|
+
n[t.id] = o, lt(
|
|
1999
2006
|
t,
|
|
2000
2007
|
n
|
|
2001
2008
|
);
|
|
2002
2009
|
}), n;
|
|
2003
2010
|
}
|
|
2004
|
-
function
|
|
2011
|
+
function at(e, n) {
|
|
2005
2012
|
return n || (n = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: t, value: o }) => {
|
|
2006
|
-
n[t.id] = o,
|
|
2013
|
+
n[t.id] = o, at(
|
|
2007
2014
|
t,
|
|
2008
2015
|
n
|
|
2009
2016
|
);
|
|
2010
2017
|
}), n;
|
|
2011
2018
|
}
|
|
2012
|
-
function
|
|
2019
|
+
function Rl(e, n) {
|
|
2013
2020
|
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
2014
2021
|
}
|
|
2015
|
-
const
|
|
2022
|
+
const Sl = (e, n) => {
|
|
2016
2023
|
let t;
|
|
2017
2024
|
en(e) ? t = {
|
|
2018
2025
|
[e.id]: e.value,
|
|
2019
|
-
...
|
|
2020
|
-
...
|
|
2026
|
+
...lt(e),
|
|
2027
|
+
...at(e)
|
|
2021
2028
|
} : t = {
|
|
2022
2029
|
[e.source.id]: e.source.value,
|
|
2023
2030
|
[e.target.id]: e.target.value,
|
|
2024
|
-
...
|
|
2025
|
-
...
|
|
2031
|
+
...lt(e.source),
|
|
2032
|
+
...at(e.target)
|
|
2026
2033
|
};
|
|
2027
|
-
const o =
|
|
2034
|
+
const o = Rl(t, n);
|
|
2028
2035
|
return { nodes: t, links: o };
|
|
2029
|
-
},
|
|
2036
|
+
}, Cl = (e) => {
|
|
2030
2037
|
if (en(e)) {
|
|
2031
2038
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2032
2039
|
return {
|
|
@@ -2045,15 +2052,15 @@ const Sa = (e, n) => {
|
|
|
2045
2052
|
links: [e.id]
|
|
2046
2053
|
};
|
|
2047
2054
|
};
|
|
2048
|
-
function
|
|
2049
|
-
const o =
|
|
2055
|
+
function Gl(e, n, t) {
|
|
2056
|
+
const o = B(null), l = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2050
2057
|
o.value,
|
|
2051
2058
|
t.value
|
|
2052
|
-
) : n.value.highlightedElements === "closest" ?
|
|
2053
|
-
return
|
|
2059
|
+
) : n.value.highlightedElements === "closest" ? Cl(o.value, t.value) : Sl(o.value, t.value) : { nodes: {}, links: [] });
|
|
2060
|
+
return K(l, (u, a) => {
|
|
2054
2061
|
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2055
2062
|
e.value.forEach((i) => {
|
|
2056
|
-
i.node.id in a.nodes &&
|
|
2063
|
+
i.node.id in a.nodes && Ht(
|
|
2057
2064
|
i,
|
|
2058
2065
|
a.nodes[i.node.id],
|
|
2059
2066
|
i.node.value,
|
|
@@ -2064,7 +2071,7 @@ function Ga(e, n, t) {
|
|
|
2064
2071
|
return;
|
|
2065
2072
|
}
|
|
2066
2073
|
e.value.forEach((i) => {
|
|
2067
|
-
i.node.id in u.nodes &&
|
|
2074
|
+
i.node.id in u.nodes && Ht(
|
|
2068
2075
|
i,
|
|
2069
2076
|
i.node.value,
|
|
2070
2077
|
u.nodes[i.node.id],
|
|
@@ -2073,10 +2080,10 @@ function Ga(e, n, t) {
|
|
|
2073
2080
|
});
|
|
2074
2081
|
}), { highlightedElements: l, hoveredElement: o };
|
|
2075
2082
|
}
|
|
2076
|
-
const
|
|
2083
|
+
const jl = {
|
|
2077
2084
|
class: "lume-alluvial-group",
|
|
2078
2085
|
"data-j-alluvial-group": ""
|
|
2079
|
-
},
|
|
2086
|
+
}, Vl = { key: 0 }, Pl = ["x", "y"], Fl = { key: 0 }, zl = ["id", "x1", "x2"], Wl = ["stop-color"], Zl = ["stop-color"], Ul = ["d", "stroke-width", "onClick", "onMouseover"], Xl = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Yl = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Kl = ["x", "y", "height", "width"], Jl = ["transform", "data-id", "width"], Ql = /* @__PURE__ */ Z({
|
|
2080
2087
|
__name: "lume-alluvial-group",
|
|
2081
2088
|
props: {
|
|
2082
2089
|
...ze(),
|
|
@@ -2087,122 +2094,122 @@ const ja = {
|
|
|
2087
2094
|
},
|
|
2088
2095
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2089
2096
|
setup(e, { emit: n }) {
|
|
2090
|
-
const t = e, o = n, l =
|
|
2097
|
+
const t = e, o = n, l = Ve("chartID"), { data: u, options: a } = ne(t), i = B([]), s = B([]), c = B(null), { extents: p, updateExtents: r } = Al(t.containerSize), { columns: m, graph: g } = Bl(u, a, p), { hoveredElement: f, highlightedElements: A } = Gl(
|
|
2091
2098
|
i,
|
|
2092
2099
|
a,
|
|
2093
2100
|
g
|
|
2094
|
-
),
|
|
2101
|
+
), L = v(() => je(a.value.valueFormat)), k = v(
|
|
2095
2102
|
() => Object.keys(A.value.nodes)
|
|
2096
|
-
),
|
|
2097
|
-
(
|
|
2098
|
-
) : []),
|
|
2103
|
+
), h = v(() => m.value ? m.value.map(
|
|
2104
|
+
(b) => b[0].x0 + a.value.nodeWidth / 2
|
|
2105
|
+
) : []), x = v(() => {
|
|
2099
2106
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
2100
|
-
return a.value.nodeHeaders.slice(0,
|
|
2101
|
-
label:
|
|
2102
|
-
x:
|
|
2107
|
+
return a.value.nodeHeaders.slice(0, h.value.length).map((b, M) => ({
|
|
2108
|
+
label: b,
|
|
2109
|
+
x: h.value[M]
|
|
2103
2110
|
}));
|
|
2104
|
-
}),
|
|
2105
|
-
() => a.value.nodeHeaderPadding ??
|
|
2106
|
-
),
|
|
2111
|
+
}), E = v(
|
|
2112
|
+
() => a.value.nodeHeaderPadding ?? ml
|
|
2113
|
+
), N = v(() => {
|
|
2107
2114
|
if (!(!a.value.gradient || !g.value))
|
|
2108
|
-
return g.value.links.reduce((
|
|
2109
|
-
const { source: y, target:
|
|
2110
|
-
return
|
|
2115
|
+
return g.value.links.reduce((b, M) => {
|
|
2116
|
+
const { source: y, target: Y } = M, Q = y.color || y.fallbackColor, ue = Y.deriveColorFromIncomingLinks ? Q : Y.color || Y.fallbackColor;
|
|
2117
|
+
return b[M.id] = {
|
|
2111
2118
|
source: Q,
|
|
2112
2119
|
target: ue,
|
|
2113
2120
|
x1: y.x1,
|
|
2114
|
-
x2:
|
|
2115
|
-
},
|
|
2121
|
+
x2: Y.x0
|
|
2122
|
+
}, b;
|
|
2116
2123
|
}, {});
|
|
2117
2124
|
}), F = v(() => {
|
|
2118
|
-
const
|
|
2125
|
+
const b = i.value.filter(
|
|
2119
2126
|
(y) => P(y)
|
|
2120
|
-
),
|
|
2121
|
-
return
|
|
2122
|
-
const
|
|
2127
|
+
), M = [];
|
|
2128
|
+
return b.forEach((y) => {
|
|
2129
|
+
const Y = [];
|
|
2123
2130
|
s.value.filter(({ link: Q }) => Q.target.id === y.node.id).reverse().reduce((Q, ue, $e, We) => {
|
|
2124
2131
|
const Ze = ue.link.target.y1 - ue.link.target.y0 > Ee;
|
|
2125
|
-
let Ie,
|
|
2126
|
-
return Ze ? (Ie = ue.link.target.y1 - ue.link.target.y0,
|
|
2132
|
+
let Ie, Ce, Ae;
|
|
2133
|
+
return Ze ? (Ie = ue.link.target.y1 - ue.link.target.y0, Ce = ue.link.value / y.node.value, Ae = Ce * Ie) : (Ie = Ee, Ae = Ee / We.length), Y.push({
|
|
2127
2134
|
x: y.x,
|
|
2128
2135
|
y: y.y + Q,
|
|
2129
2136
|
height: Ae,
|
|
2130
2137
|
width: y.width,
|
|
2131
2138
|
key: `node-block-${y.node.id}-source-link-${ue.link.source.id}`,
|
|
2132
|
-
class: `lume-alluvial-group__node-block lume-fill--${ue.link.source.color ||
|
|
2139
|
+
class: `lume-alluvial-group__node-block lume-fill--${ue.link.source.color || Se}`
|
|
2133
2140
|
}), Q + Ae;
|
|
2134
|
-
}, 0),
|
|
2141
|
+
}, 0), M.push({
|
|
2135
2142
|
id: y.node.id,
|
|
2136
|
-
subNodes:
|
|
2143
|
+
subNodes: Y
|
|
2137
2144
|
});
|
|
2138
|
-
}),
|
|
2145
|
+
}), M;
|
|
2139
2146
|
});
|
|
2140
|
-
function w(
|
|
2141
|
-
return a.value.gradient && `url('#${l}_${
|
|
2147
|
+
function w(b) {
|
|
2148
|
+
return a.value.gradient && `url('#${l}_${b.id}')`;
|
|
2142
2149
|
}
|
|
2143
|
-
function C(
|
|
2144
|
-
return
|
|
2150
|
+
function C(b) {
|
|
2151
|
+
return k.value.length > 0 && !k.value.includes(b.toString());
|
|
2145
2152
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2153
|
+
function U(b) {
|
|
2154
|
+
return k.value.length > 0 && k.value.includes(b.toString());
|
|
2148
2155
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return A.value.links.length > 0 && !A.value.links.includes(
|
|
2156
|
+
function X(b) {
|
|
2157
|
+
return A.value.links.length > 0 && !A.value.links.includes(b);
|
|
2151
2158
|
}
|
|
2152
|
-
function q(
|
|
2153
|
-
return A.value.links.length > 0 && A.value.links.includes(
|
|
2159
|
+
function q(b) {
|
|
2160
|
+
return A.value.links.length > 0 && A.value.links.includes(b);
|
|
2154
2161
|
}
|
|
2155
|
-
function P(
|
|
2156
|
-
return !
|
|
2162
|
+
function P(b) {
|
|
2163
|
+
return !b.node.color && b.node.deriveColorFromIncomingLinks;
|
|
2157
2164
|
}
|
|
2158
|
-
function re(
|
|
2159
|
-
|
|
2165
|
+
function re(b, M) {
|
|
2166
|
+
b !== f.value && (f.value = b, o("link-mouseenter", { link: b, event: M }));
|
|
2160
2167
|
}
|
|
2161
|
-
function xe(
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2168
|
+
function xe(b) {
|
|
2169
|
+
const M = f.value;
|
|
2170
|
+
f.value = null, o("link-mouseleave", { link: M, event: b });
|
|
2164
2171
|
}
|
|
2165
|
-
function be(
|
|
2166
|
-
if (
|
|
2167
|
-
|
|
2172
|
+
function be(b) {
|
|
2173
|
+
if (b == null) {
|
|
2174
|
+
f.value = null;
|
|
2168
2175
|
return;
|
|
2169
2176
|
}
|
|
2170
|
-
const
|
|
2171
|
-
if (!
|
|
2177
|
+
const M = xl(b, g.value) || $l(b, g.value);
|
|
2178
|
+
if (!M) {
|
|
2172
2179
|
_e(me.InvalidHoveredElement);
|
|
2173
2180
|
return;
|
|
2174
2181
|
}
|
|
2175
|
-
|
|
2182
|
+
f.value = M;
|
|
2176
2183
|
}
|
|
2177
|
-
function R(
|
|
2178
|
-
var
|
|
2179
|
-
return ((
|
|
2184
|
+
function R(b) {
|
|
2185
|
+
var M;
|
|
2186
|
+
return ((M = F.value.find(({ id: y }) => b === y)) == null ? void 0 : M.subNodes) ?? [];
|
|
2180
2187
|
}
|
|
2181
2188
|
function H() {
|
|
2182
|
-
const
|
|
2183
|
-
r(
|
|
2189
|
+
const b = Il(g.value, c.value);
|
|
2190
|
+
r(b);
|
|
2184
2191
|
}
|
|
2185
|
-
return
|
|
2186
|
-
i.value =
|
|
2187
|
-
}),
|
|
2192
|
+
return K(g, (b) => {
|
|
2193
|
+
i.value = wl(b.nodes), s.value = Hl(b.links).reverse(), f.value == null && t.hoveredElementId != null && be(t.hoveredElementId);
|
|
2194
|
+
}), K([t.containerSize, c], () => {
|
|
2188
2195
|
t.containerSize.width && t.containerSize.height && H();
|
|
2189
|
-
}),
|
|
2190
|
-
|
|
2191
|
-
(_(!0), $(ee, null,
|
|
2196
|
+
}), K(() => t.hoveredElementId, be), (b, M) => (_(), $("g", jl, [
|
|
2197
|
+
x.value ? (_(), $("g", Vl, [
|
|
2198
|
+
(_(!0), $(ee, null, z(x.value, (y) => (_(), $("text", {
|
|
2192
2199
|
key: `header_${y.x}`,
|
|
2193
2200
|
x: y.x,
|
|
2194
|
-
y: -
|
|
2201
|
+
y: -E.value,
|
|
2195
2202
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
2196
|
-
},
|
|
2197
|
-
])) :
|
|
2203
|
+
}, le(y.label), 9, Pl))), 128))
|
|
2204
|
+
])) : W("", !0),
|
|
2198
2205
|
G("g", {
|
|
2199
2206
|
class: "lume-alluvial-link-group",
|
|
2200
2207
|
onMouseleave: xe
|
|
2201
2208
|
}, [
|
|
2202
|
-
d(a).gradient ? (_(), $("defs",
|
|
2203
|
-
(_(!0), $(ee, null,
|
|
2204
|
-
id: `${d(l)}_${
|
|
2205
|
-
key:
|
|
2209
|
+
d(a).gradient ? (_(), $("defs", Fl, [
|
|
2210
|
+
(_(!0), $(ee, null, z(N.value, (y, Y) => (_(), $("linearGradient", {
|
|
2211
|
+
id: `${d(l)}_${Y}`,
|
|
2212
|
+
key: Y,
|
|
2206
2213
|
gradientUnits: "userSpaceOnUse",
|
|
2207
2214
|
x1: y.x1,
|
|
2208
2215
|
x2: y.x2
|
|
@@ -2210,48 +2217,48 @@ const ja = {
|
|
|
2210
2217
|
G("stop", {
|
|
2211
2218
|
offset: "0%",
|
|
2212
2219
|
"stop-color": `var(--lume-color--${y.source})`
|
|
2213
|
-
}, null, 8,
|
|
2220
|
+
}, null, 8, Wl),
|
|
2214
2221
|
G("stop", {
|
|
2215
2222
|
offset: "100%",
|
|
2216
2223
|
"stop-color": `var(--lume-color--${y.target})`
|
|
2217
|
-
}, null, 8,
|
|
2218
|
-
], 8,
|
|
2219
|
-
])) :
|
|
2220
|
-
(_(!0), $(ee, null,
|
|
2224
|
+
}, null, 8, Zl)
|
|
2225
|
+
], 8, zl))), 128))
|
|
2226
|
+
])) : W("", !0),
|
|
2227
|
+
(_(!0), $(ee, null, z(s.value, (y) => (_(), $("path", {
|
|
2221
2228
|
key: `link-ghost_${y.id}`,
|
|
2222
2229
|
class: oe(["lume-alluvial-group__link", [
|
|
2223
2230
|
"lume-stroke--transparent",
|
|
2224
2231
|
"lume-alluvial-group__link--ghost"
|
|
2225
2232
|
]]),
|
|
2226
2233
|
d: y.d,
|
|
2227
|
-
"stroke-width": y.strokeWidth + d(
|
|
2234
|
+
"stroke-width": y.strokeWidth + d(vl),
|
|
2228
2235
|
"data-j-alluvial-ghost": "",
|
|
2229
|
-
onClick: (
|
|
2230
|
-
onMouseover: (
|
|
2231
|
-
}, null, 40,
|
|
2232
|
-
(_(!0), $(ee, null,
|
|
2236
|
+
onClick: (Y) => o("link-click", { link: y.link, event: Y }),
|
|
2237
|
+
onMouseover: (Y) => re(y.link, Y)
|
|
2238
|
+
}, null, 40, Ul))), 128)),
|
|
2239
|
+
(_(!0), $(ee, null, z(s.value, (y) => (_(), $("path", {
|
|
2233
2240
|
key: `link_${y.id}`,
|
|
2234
2241
|
class: oe(["lume-alluvial-group__link", {
|
|
2235
2242
|
[`lume-stroke--${y.color}`]: !d(a).gradient && y.color,
|
|
2236
|
-
"lume-alluvial-group__link--faded":
|
|
2243
|
+
"lume-alluvial-group__link--faded": X(y.id),
|
|
2237
2244
|
"lume-alluvial-group__link--focused": q(y.id)
|
|
2238
2245
|
}]),
|
|
2239
2246
|
d: y.d,
|
|
2240
2247
|
stroke: w(y.link),
|
|
2241
|
-
"stroke-dasharray":
|
|
2242
|
-
"stroke-dashoffset":
|
|
2248
|
+
"stroke-dasharray": b.containerSize.width,
|
|
2249
|
+
"stroke-dashoffset": b.containerSize.width,
|
|
2243
2250
|
"stroke-width": y.strokeWidth,
|
|
2244
2251
|
"data-j-alluvial-path": "",
|
|
2245
2252
|
"data-id": y.id,
|
|
2246
|
-
onClick: (
|
|
2247
|
-
onMouseover: (
|
|
2248
|
-
}, null, 42,
|
|
2253
|
+
onClick: (Y) => o("link-click", { link: y.link, event: Y }),
|
|
2254
|
+
onMouseover: (Y) => re(y.link, Y)
|
|
2255
|
+
}, null, 42, Xl))), 128))
|
|
2249
2256
|
], 32),
|
|
2250
|
-
(_(!0), $(ee, null,
|
|
2251
|
-
key: `node-block_${
|
|
2257
|
+
(_(!0), $(ee, null, z(i.value, (y, Y) => (_(), $("g", {
|
|
2258
|
+
key: `node-block_${Y}`,
|
|
2252
2259
|
class: oe(["lume-alluvial-group__node", {
|
|
2253
2260
|
"lume-alluvial-group__node--faded": C(y.node.id),
|
|
2254
|
-
"lume-alluvial-group__node--focused":
|
|
2261
|
+
"lume-alluvial-group__node--focused": U(y.node.id)
|
|
2255
2262
|
}]),
|
|
2256
2263
|
"data-j-alluvial-group__node-block": ""
|
|
2257
2264
|
}, [
|
|
@@ -2259,10 +2266,10 @@ const ja = {
|
|
|
2259
2266
|
onClick: (Q) => o("node-click", { node: y.node, event: Q }),
|
|
2260
2267
|
onMouseenter: (Q) => o("node-mouseenter", { node: y.node, event: Q }),
|
|
2261
2268
|
onMouseleave: (Q) => o("node-mouseleave", { node: y.node, event: Q }),
|
|
2262
|
-
onMouseover: (Q) =>
|
|
2263
|
-
onMouseout:
|
|
2269
|
+
onMouseover: (Q) => f.value = y.node,
|
|
2270
|
+
onMouseout: M[0] || (M[0] = (Q) => f.value = null)
|
|
2264
2271
|
}, [
|
|
2265
|
-
P(y) ? (_(!0), $(ee, { key: 0 },
|
|
2272
|
+
P(y) ? (_(!0), $(ee, { key: 0 }, z(R(
|
|
2266
2273
|
y.node.id
|
|
2267
2274
|
), (Q) => (_(), $("rect", j(Q, {
|
|
2268
2275
|
key: Q.key,
|
|
@@ -2274,7 +2281,7 @@ const ja = {
|
|
|
2274
2281
|
y: y.y,
|
|
2275
2282
|
height: y.height,
|
|
2276
2283
|
width: y.width
|
|
2277
|
-
}, null, 10,
|
|
2284
|
+
}, null, 10, Kl)),
|
|
2278
2285
|
G("g", {
|
|
2279
2286
|
ref_for: !0,
|
|
2280
2287
|
ref_key: "nodeTextRefs",
|
|
@@ -2286,29 +2293,29 @@ const ja = {
|
|
|
2286
2293
|
"data-id": y.node.id,
|
|
2287
2294
|
width: d(a).nodeLabelMaxWidth
|
|
2288
2295
|
}, [
|
|
2289
|
-
S(
|
|
2296
|
+
S(b.$slots, `node-text-${y.node.id}`, {
|
|
2290
2297
|
node: y.node,
|
|
2291
|
-
value:
|
|
2298
|
+
value: L.value(
|
|
2292
2299
|
y.node.transitionValue || y.node.value,
|
|
2293
2300
|
y.node.value
|
|
2294
2301
|
)
|
|
2295
2302
|
}, () => [
|
|
2296
|
-
se(d(
|
|
2303
|
+
se(d(_l), {
|
|
2297
2304
|
bottom: d(a).switchText,
|
|
2298
2305
|
left: y.node.depth === 0,
|
|
2299
2306
|
"max-width": d(a).nodeLabelMaxWidth,
|
|
2300
2307
|
"onLume__internal-NodeResize": H
|
|
2301
2308
|
}, {
|
|
2302
2309
|
default: V(() => [
|
|
2303
|
-
|
|
2310
|
+
pe(le(y.node.label), 1)
|
|
2304
2311
|
]),
|
|
2305
2312
|
_: 2
|
|
2306
2313
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2307
|
-
se(d(
|
|
2314
|
+
se(d(bl), {
|
|
2308
2315
|
bottom: !d(a).switchText
|
|
2309
2316
|
}, {
|
|
2310
2317
|
default: V(() => [
|
|
2311
|
-
|
|
2318
|
+
pe(le(L.value(
|
|
2312
2319
|
y.node.transitionValue || y.node.value,
|
|
2313
2320
|
y.node.value
|
|
2314
2321
|
)), 1)
|
|
@@ -2316,13 +2323,13 @@ const ja = {
|
|
|
2316
2323
|
_: 2
|
|
2317
2324
|
}, 1032, ["bottom"])
|
|
2318
2325
|
], !0)
|
|
2319
|
-
], 10,
|
|
2320
|
-
], 40,
|
|
2326
|
+
], 10, Jl)
|
|
2327
|
+
], 40, Yl)
|
|
2321
2328
|
], 2))), 128))
|
|
2322
2329
|
]));
|
|
2323
2330
|
}
|
|
2324
2331
|
});
|
|
2325
|
-
const
|
|
2332
|
+
const ql = /* @__PURE__ */ te(Ql, [["__scopeId", "data-v-f004e5fb"]]), ea = {
|
|
2326
2333
|
margins: {
|
|
2327
2334
|
top: 0,
|
|
2328
2335
|
right: 0,
|
|
@@ -2341,13 +2348,13 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
|
|
|
2341
2348
|
nodeAlign: bn,
|
|
2342
2349
|
valueFormat: (e) => String(e),
|
|
2343
2350
|
iterations: 6
|
|
2344
|
-
},
|
|
2351
|
+
}, Va = /* @__PURE__ */ Z({
|
|
2345
2352
|
__name: "lume-alluvial-diagram",
|
|
2346
2353
|
props: {
|
|
2347
2354
|
...Fo(ut)
|
|
2348
2355
|
},
|
|
2349
2356
|
setup(e, { emit: n }) {
|
|
2350
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), u = Hn(ie()), { options: a } = ne(t), { allOptions: i } =
|
|
2357
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), u = Hn(ie()), { options: a } = ne(t), { allOptions: i } = fe(a, ea);
|
|
2351
2358
|
function s(c) {
|
|
2352
2359
|
return {
|
|
2353
2360
|
...c,
|
|
@@ -2355,33 +2362,33 @@ const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-f004e5fb"]]), el = {
|
|
|
2355
2362
|
// Alluvial chart never uses base scales
|
|
2356
2363
|
};
|
|
2357
2364
|
}
|
|
2358
|
-
return (c, p) => (_(),
|
|
2365
|
+
return (c, p) => (_(), J(d(De), j(t, {
|
|
2359
2366
|
options: s(d(i)),
|
|
2360
2367
|
"data-j-alluvial-diagram": ""
|
|
2361
|
-
},
|
|
2368
|
+
}, ae(d(o))), de({
|
|
2362
2369
|
groups: V((r) => [
|
|
2363
|
-
se(d(
|
|
2364
|
-
|
|
2370
|
+
se(d(ql), j(r, { "hovered-element-id": c.hoveredElement }, ae(d(o))), de({ _: 2 }, [
|
|
2371
|
+
z(d(u), (m, g) => ({
|
|
2365
2372
|
name: g,
|
|
2366
|
-
fn: V((
|
|
2367
|
-
S(c.$slots, g, he(ge(
|
|
2373
|
+
fn: V((f) => [
|
|
2374
|
+
S(c.$slots, g, he(ge(f || {})))
|
|
2368
2375
|
])
|
|
2369
2376
|
}))
|
|
2370
2377
|
]), 1040, ["hovered-element-id"])
|
|
2371
2378
|
]),
|
|
2372
2379
|
_: 2
|
|
2373
2380
|
}, [
|
|
2374
|
-
|
|
2375
|
-
name:
|
|
2381
|
+
z(d(l), (r, m) => ({
|
|
2382
|
+
name: m,
|
|
2376
2383
|
fn: V((g) => [
|
|
2377
|
-
S(c.$slots,
|
|
2384
|
+
S(c.$slots, m, he(ge(g || {})))
|
|
2378
2385
|
])
|
|
2379
2386
|
}))
|
|
2380
2387
|
]), 1040, ["options"]));
|
|
2381
2388
|
}
|
|
2382
2389
|
});
|
|
2383
2390
|
var tn = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(tn || {});
|
|
2384
|
-
const
|
|
2391
|
+
const Pa = /* @__PURE__ */ Z({
|
|
2385
2392
|
__name: "lume-bar-chart",
|
|
2386
2393
|
props: {
|
|
2387
2394
|
...Ne(),
|
|
@@ -2392,11 +2399,11 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2392
2399
|
}
|
|
2393
2400
|
},
|
|
2394
2401
|
setup(e, { emit: n }) {
|
|
2395
|
-
const t =
|
|
2402
|
+
const t = Ke(
|
|
2396
2403
|
() => import("./common/42f5d2fc.js")
|
|
2397
|
-
), o =
|
|
2404
|
+
), o = Ke(
|
|
2398
2405
|
() => import("./common/abc9d23d.js")
|
|
2399
|
-
), l =
|
|
2406
|
+
), l = Ke(
|
|
2400
2407
|
() => import("./common/0664fd4d.js")
|
|
2401
2408
|
), u = /* @__PURE__ */ new Map([
|
|
2402
2409
|
["single", t],
|
|
@@ -2415,7 +2422,8 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2415
2422
|
};
|
|
2416
2423
|
}
|
|
2417
2424
|
const p = v(() => {
|
|
2418
|
-
|
|
2425
|
+
var r;
|
|
2426
|
+
if ((r = a.data) != null && r.length) {
|
|
2419
2427
|
if (ut(a.data))
|
|
2420
2428
|
return u.get("single");
|
|
2421
2429
|
if (!a.type)
|
|
@@ -2423,35 +2431,35 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2423
2431
|
return u.get(a.type);
|
|
2424
2432
|
}
|
|
2425
2433
|
});
|
|
2426
|
-
return (r,
|
|
2434
|
+
return (r, m) => (_(), J(vn(p.value), j({ ...a, ...r.$attrs }, {
|
|
2427
2435
|
options: c(r.options)
|
|
2428
|
-
},
|
|
2429
|
-
|
|
2430
|
-
name:
|
|
2436
|
+
}, ae(d(i))), de({ _: 2 }, [
|
|
2437
|
+
z(d(s), (g, f) => ({
|
|
2438
|
+
name: f,
|
|
2431
2439
|
fn: V((A) => [
|
|
2432
|
-
S(r.$slots,
|
|
2440
|
+
S(r.$slots, f, he(ge(A || {})))
|
|
2433
2441
|
])
|
|
2434
2442
|
}))
|
|
2435
2443
|
]), 1040, ["options"]));
|
|
2436
2444
|
}
|
|
2437
2445
|
});
|
|
2438
|
-
function
|
|
2446
|
+
function ta(e) {
|
|
2439
2447
|
return Object.values(Cn).includes(e) || e == null;
|
|
2440
2448
|
}
|
|
2441
|
-
function
|
|
2449
|
+
function na(e) {
|
|
2442
2450
|
return Object.values(D).includes(e);
|
|
2443
2451
|
}
|
|
2444
|
-
const
|
|
2452
|
+
const oa = (e = !1) => ({
|
|
2445
2453
|
type: {
|
|
2446
2454
|
type: String,
|
|
2447
2455
|
default: null,
|
|
2448
|
-
validator:
|
|
2456
|
+
validator: ta
|
|
2449
2457
|
},
|
|
2450
2458
|
...e ? {
|
|
2451
2459
|
orientation: {
|
|
2452
2460
|
type: String,
|
|
2453
2461
|
default: D.VERTICAL,
|
|
2454
|
-
validator:
|
|
2462
|
+
validator: na
|
|
2455
2463
|
}
|
|
2456
2464
|
} : {}
|
|
2457
2465
|
});
|
|
@@ -2476,10 +2484,10 @@ function nn(e, n) {
|
|
|
2476
2484
|
});
|
|
2477
2485
|
return { multiBarData: t, groupedData: o };
|
|
2478
2486
|
}
|
|
2479
|
-
function
|
|
2487
|
+
function la(e, n) {
|
|
2480
2488
|
return e.value.length === 1 ? "single" : n.value;
|
|
2481
2489
|
}
|
|
2482
|
-
function
|
|
2490
|
+
function aa(e, n, t) {
|
|
2483
2491
|
const o = v(
|
|
2484
2492
|
() => t.value === D.HORIZONTAL
|
|
2485
2493
|
);
|
|
@@ -2489,13 +2497,13 @@ function ll(e, n, t) {
|
|
|
2489
2497
|
const u = v(() => o.value ? (() => (l(e.value), e.value))() : e.value), a = v(() => o.value ? n.value : (() => (l(n.value), n.value))());
|
|
2490
2498
|
return { barXScale: u, barYScale: a };
|
|
2491
2499
|
}
|
|
2492
|
-
function
|
|
2500
|
+
function ua(e, n, t, o, l, u) {
|
|
2493
2501
|
const a = v(
|
|
2494
2502
|
() => o.value === D.HORIZONTAL
|
|
2495
2503
|
);
|
|
2496
|
-
function i(r,
|
|
2497
|
-
let g,
|
|
2498
|
-
return a.value ? (g = r >= 0 ? n.value(0) : n.value(r),
|
|
2504
|
+
function i(r, m) {
|
|
2505
|
+
let g, f;
|
|
2506
|
+
return a.value ? (g = r >= 0 ? n.value(0) : n.value(r), f = t.value(t.value.domain()[m])) : (g = n.value(n.value.domain()[m]), f = r < 0 ? t.value(0) : t.value(r)), { x: g, y: f };
|
|
2499
2507
|
}
|
|
2500
2508
|
function s(r) {
|
|
2501
2509
|
return a.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
@@ -2503,58 +2511,58 @@ function ul(e, n, t, o, l, u) {
|
|
|
2503
2511
|
function c(r) {
|
|
2504
2512
|
return a.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2505
2513
|
}
|
|
2506
|
-
function p(r,
|
|
2507
|
-
const { value:
|
|
2514
|
+
function p(r, m, g) {
|
|
2515
|
+
const { value: f, color: A } = r, L = A ?? e.value[m].color ?? Se, { x: k, y: h } = i(f, g), x = s(f), E = c(f);
|
|
2508
2516
|
return {
|
|
2509
|
-
classList: [`lume-fill--${
|
|
2510
|
-
x:
|
|
2511
|
-
y:
|
|
2512
|
-
width:
|
|
2513
|
-
height:
|
|
2517
|
+
classList: [`lume-fill--${L}`, ...u],
|
|
2518
|
+
x: k,
|
|
2519
|
+
y: h,
|
|
2520
|
+
width: x,
|
|
2521
|
+
height: E,
|
|
2514
2522
|
isFaded: l.value !== -1 && l.value !== g,
|
|
2515
|
-
isNegative:
|
|
2523
|
+
isNegative: f < 0
|
|
2516
2524
|
};
|
|
2517
2525
|
}
|
|
2518
2526
|
return { barAttributeGenerator: p };
|
|
2519
2527
|
}
|
|
2520
|
-
function
|
|
2528
|
+
function ra(e, n, t, o, l, u) {
|
|
2521
2529
|
const a = v(
|
|
2522
2530
|
() => o.value === D.HORIZONTAL
|
|
2523
|
-
), i = v(() => He().domain(e.value.map((
|
|
2524
|
-
function c(
|
|
2531
|
+
), i = v(() => He().domain(e.value.map((f, A) => A)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => He().domain(e.value.map((f, A) => A)).range([0, t.value.bandwidth()]).padding(0));
|
|
2532
|
+
function c(f, A, L) {
|
|
2525
2533
|
if (a.value)
|
|
2526
|
-
return
|
|
2527
|
-
const
|
|
2528
|
-
return n.value(
|
|
2534
|
+
return f >= 0 ? n.value(0) : n.value(f);
|
|
2535
|
+
const k = n.value.domain();
|
|
2536
|
+
return n.value(k[A]) + i.value(L);
|
|
2529
2537
|
}
|
|
2530
|
-
function p(
|
|
2538
|
+
function p(f, A, L) {
|
|
2531
2539
|
if (a.value) {
|
|
2532
|
-
const
|
|
2533
|
-
return t.value(
|
|
2540
|
+
const k = t.value.domain();
|
|
2541
|
+
return t.value(k[A]) + s.value(L);
|
|
2534
2542
|
}
|
|
2535
|
-
return
|
|
2543
|
+
return f < 0 ? t.value(0) : t.value(f);
|
|
2536
2544
|
}
|
|
2537
|
-
function r(
|
|
2538
|
-
return a.value ?
|
|
2545
|
+
function r(f) {
|
|
2546
|
+
return a.value ? f < 0 ? n.value(0) - n.value(f) : n.value(f) - n.value(0) : i.value.bandwidth();
|
|
2539
2547
|
}
|
|
2540
|
-
function
|
|
2541
|
-
return a.value ? s.value.bandwidth() :
|
|
2548
|
+
function m(f) {
|
|
2549
|
+
return a.value ? s.value.bandwidth() : f < 0 ? t.value(f) - t.value(0) : t.value(0) - t.value(f);
|
|
2542
2550
|
}
|
|
2543
|
-
function g(
|
|
2544
|
-
const { value:
|
|
2551
|
+
function g(f, A, L) {
|
|
2552
|
+
const { value: k, color: h } = f, x = h ?? e.value[A].color ?? Object.values(ce)[A], E = c(k, L, A), N = p(k, L, A), F = r(k), w = m(k);
|
|
2545
2553
|
return {
|
|
2546
|
-
classList: [`lume-fill--${
|
|
2547
|
-
x:
|
|
2548
|
-
y:
|
|
2554
|
+
classList: [`lume-fill--${x}`, ...u],
|
|
2555
|
+
x: E,
|
|
2556
|
+
y: N,
|
|
2549
2557
|
width: F,
|
|
2550
2558
|
height: w,
|
|
2551
|
-
isFaded: l.value !== -1 && l.value !==
|
|
2552
|
-
isNegative:
|
|
2559
|
+
isFaded: l.value !== -1 && l.value !== L,
|
|
2560
|
+
isNegative: k < 0
|
|
2553
2561
|
};
|
|
2554
2562
|
}
|
|
2555
2563
|
return { barAttributeGenerator: g };
|
|
2556
2564
|
}
|
|
2557
|
-
function
|
|
2565
|
+
function ia(e, n, t) {
|
|
2558
2566
|
const o = v(
|
|
2559
2567
|
() => n.value === D.HORIZONTAL
|
|
2560
2568
|
), l = v(() => {
|
|
@@ -2572,79 +2580,79 @@ function il(e, n, t) {
|
|
|
2572
2580
|
return Math.max(...s);
|
|
2573
2581
|
});
|
|
2574
2582
|
function a(s, c, p) {
|
|
2575
|
-
return o.value ? Me().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
|
|
2576
|
-
|
|
2577
|
-
He().domain(c.map((r,
|
|
2583
|
+
return c.length ? o.value ? Me().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
|
|
2584
|
+
It(
|
|
2585
|
+
He().domain(c.map((r, m) => m)).range([0, p.width]),
|
|
2578
2586
|
n.value,
|
|
2579
2587
|
t.value
|
|
2580
2588
|
),
|
|
2581
2589
|
{ labels: c }
|
|
2582
|
-
);
|
|
2590
|
+
) : null;
|
|
2583
2591
|
}
|
|
2584
2592
|
function i(s, c, p) {
|
|
2585
|
-
return o.value ? Object.assign(
|
|
2586
|
-
|
|
2587
|
-
He().domain(c.map((r,
|
|
2593
|
+
return c.length ? o.value ? Object.assign(
|
|
2594
|
+
It(
|
|
2595
|
+
He().domain(c.map((r, m) => m)).range([0, p.height]),
|
|
2588
2596
|
n.value,
|
|
2589
2597
|
t.value
|
|
2590
2598
|
),
|
|
2591
2599
|
{ labels: c }
|
|
2592
|
-
) : Me().domain([u.value, l.value]).range([0, p.height]);
|
|
2600
|
+
) : Me().domain([u.value, l.value]).range([0, p.height]) : null;
|
|
2593
2601
|
}
|
|
2594
2602
|
return { stackedXScaleGenerator: a, stackedYScaleGenerator: i };
|
|
2595
2603
|
}
|
|
2596
|
-
function
|
|
2604
|
+
function sa(e, n, t, o, l, u) {
|
|
2597
2605
|
const a = v(
|
|
2598
2606
|
() => o.value === D.HORIZONTAL
|
|
2599
2607
|
), i = v(
|
|
2600
2608
|
() => a.value ? t.value.domain() : n.value.domain()
|
|
2601
2609
|
), s = v(
|
|
2602
|
-
() => e.value.map((
|
|
2610
|
+
() => e.value.map((k) => k.values.map((h) => h == null ? void 0 : h.value))
|
|
2603
2611
|
);
|
|
2604
|
-
function c(
|
|
2605
|
-
let
|
|
2606
|
-
return a.value ? (
|
|
2612
|
+
function c(k, h, x) {
|
|
2613
|
+
let E, N;
|
|
2614
|
+
return a.value ? (E = n.value(k >= 0 ? 0 + x : k + x), N = t.value(i.value[h])) : (E = n.value(i.value[h]), N = t.value(k >= 0 ? k + x : 0 + x)), { x: E, y: N };
|
|
2607
2615
|
}
|
|
2608
|
-
function p(
|
|
2609
|
-
return a.value ? n.value(
|
|
2616
|
+
function p(k) {
|
|
2617
|
+
return a.value ? n.value(k) - n.value(0) : n.value.bandwidth();
|
|
2610
2618
|
}
|
|
2611
|
-
function r(
|
|
2612
|
-
return a.value ? n.value(0) - n.value(
|
|
2619
|
+
function r(k) {
|
|
2620
|
+
return a.value ? n.value(0) - n.value(k) : n.value.bandwidth();
|
|
2613
2621
|
}
|
|
2614
|
-
function
|
|
2615
|
-
return a.value ? t.value.bandwidth() : t.value(0) - t.value(
|
|
2622
|
+
function m(k) {
|
|
2623
|
+
return a.value ? t.value.bandwidth() : t.value(0) - t.value(k);
|
|
2616
2624
|
}
|
|
2617
|
-
function g(
|
|
2618
|
-
return a.value ? t.value.bandwidth() : t.value(
|
|
2625
|
+
function g(k) {
|
|
2626
|
+
return a.value ? t.value.bandwidth() : t.value(k) - t.value(0);
|
|
2619
2627
|
}
|
|
2620
|
-
function
|
|
2621
|
-
return
|
|
2628
|
+
function f(k, h) {
|
|
2629
|
+
return k ? s.value.reduce((x, E, N) => (N < k && E[h] >= 0 && (x += E[h]), x), 0) : 0;
|
|
2622
2630
|
}
|
|
2623
|
-
function A(
|
|
2624
|
-
return
|
|
2631
|
+
function A(k, h) {
|
|
2632
|
+
return k ? s.value.reduce((x, E, N) => (N < k && E[h] < 0 && (x += E[h]), x), 0) : 0;
|
|
2625
2633
|
}
|
|
2626
|
-
function
|
|
2627
|
-
const { value:
|
|
2634
|
+
function L(k, h, x) {
|
|
2635
|
+
const { value: E, color: N } = k, F = E >= 0 ? p(E) : r(E), w = E >= 0 ? m(E) : g(E), C = E >= 0 ? f(h, x) : A(h, x), { x: U, y: X } = c(E, x, C);
|
|
2628
2636
|
return {
|
|
2629
|
-
classList: [`lume-fill--${
|
|
2637
|
+
classList: [`lume-fill--${N ?? e.value[h].color ?? Object.values(ce)[h]}`, ...u],
|
|
2630
2638
|
width: F,
|
|
2631
2639
|
height: w,
|
|
2632
|
-
x:
|
|
2633
|
-
y:
|
|
2634
|
-
isFaded: l.value !== -1 && l.value !==
|
|
2635
|
-
isNegative:
|
|
2640
|
+
x: U,
|
|
2641
|
+
y: X,
|
|
2642
|
+
isFaded: l.value !== -1 && l.value !== x,
|
|
2643
|
+
isNegative: E < 0
|
|
2636
2644
|
};
|
|
2637
2645
|
}
|
|
2638
|
-
return { barAttributeGenerator:
|
|
2646
|
+
return { barAttributeGenerator: L };
|
|
2639
2647
|
}
|
|
2640
|
-
const
|
|
2648
|
+
const ca = {
|
|
2641
2649
|
class: "lume-bar-group",
|
|
2642
2650
|
"data-j-bars-group": ""
|
|
2643
|
-
},
|
|
2644
|
-
single:
|
|
2645
|
-
grouped:
|
|
2646
|
-
stacked:
|
|
2647
|
-
},
|
|
2651
|
+
}, da = ["onMouseenter"], va = {
|
|
2652
|
+
single: ua,
|
|
2653
|
+
grouped: ra,
|
|
2654
|
+
stacked: sa
|
|
2655
|
+
}, ft = /* @__PURE__ */ Z({
|
|
2648
2656
|
__name: "lume-bar-group",
|
|
2649
2657
|
props: {
|
|
2650
2658
|
...ze(),
|
|
@@ -2652,7 +2660,7 @@ const cl = {
|
|
|
2652
2660
|
type: [String, Array],
|
|
2653
2661
|
default: () => []
|
|
2654
2662
|
},
|
|
2655
|
-
...
|
|
2663
|
+
...oa(!0),
|
|
2656
2664
|
transition: {
|
|
2657
2665
|
type: Boolean,
|
|
2658
2666
|
default: !0
|
|
@@ -2669,45 +2677,45 @@ const cl = {
|
|
|
2669
2677
|
xScale: c,
|
|
2670
2678
|
yScale: p,
|
|
2671
2679
|
classList: r,
|
|
2672
|
-
labels:
|
|
2680
|
+
labels: m
|
|
2673
2681
|
} = ne(t);
|
|
2674
|
-
|
|
2675
|
-
const { emitInternalEvent: g } = ke(), { groupedData:
|
|
2676
|
-
const
|
|
2682
|
+
Ve("chartID");
|
|
2683
|
+
const { emitInternalEvent: g } = ke(), { groupedData: f } = nn(l, m), { barXScale: A, barYScale: L } = aa(c, p, a), k = v(() => typeof r.value == "string" ? [r.value] : r.value), h = v(() => {
|
|
2684
|
+
const N = la(l, s), { barAttributeGenerator: F } = va[N](
|
|
2677
2685
|
l,
|
|
2678
2686
|
A,
|
|
2679
|
-
|
|
2687
|
+
L,
|
|
2680
2688
|
a,
|
|
2681
2689
|
u,
|
|
2682
|
-
|
|
2690
|
+
k.value
|
|
2683
2691
|
);
|
|
2684
2692
|
return F;
|
|
2685
|
-
}),
|
|
2693
|
+
}), x = v(() => {
|
|
2686
2694
|
if (i.value)
|
|
2687
2695
|
return a.value === D.HORIZONTAL ? "width" : "height";
|
|
2688
2696
|
});
|
|
2689
|
-
async function N
|
|
2690
|
-
o("lume__internal--hover",
|
|
2697
|
+
async function E(N) {
|
|
2698
|
+
o("lume__internal--hover", N), g("lume__internal--hover", N);
|
|
2691
2699
|
}
|
|
2692
|
-
return (
|
|
2693
|
-
(_(!0), $(ee, null,
|
|
2700
|
+
return (N, F) => (_(), $("g", ca, [
|
|
2701
|
+
(_(!0), $(ee, null, z(d(f), (w, C) => (_(), $("g", {
|
|
2694
2702
|
key: C,
|
|
2695
|
-
onMouseenter: (
|
|
2703
|
+
onMouseenter: (U) => E(C)
|
|
2696
2704
|
}, [
|
|
2697
|
-
(_(!0), $(ee, null,
|
|
2698
|
-
key: `bar-${
|
|
2699
|
-
transition:
|
|
2705
|
+
(_(!0), $(ee, null, z(w, (U, X) => (_(), J(d(dt), j(h.value(U, X, C, w), {
|
|
2706
|
+
key: `bar-${X}`,
|
|
2707
|
+
transition: x.value,
|
|
2700
2708
|
"data-j-lume-bar": "",
|
|
2701
2709
|
onClick: (q) => o("bar-click", {
|
|
2702
2710
|
index: C,
|
|
2703
|
-
datasetIndex:
|
|
2711
|
+
datasetIndex: X,
|
|
2704
2712
|
event: q
|
|
2705
2713
|
})
|
|
2706
2714
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2707
|
-
], 40,
|
|
2715
|
+
], 40, da))), 128))
|
|
2708
2716
|
]));
|
|
2709
2717
|
}
|
|
2710
|
-
}),
|
|
2718
|
+
}), ma = {
|
|
2711
2719
|
[D.VERTICAL]: {
|
|
2712
2720
|
withTooltip: !0,
|
|
2713
2721
|
xAxisOptions: {},
|
|
@@ -2720,35 +2728,35 @@ const cl = {
|
|
|
2720
2728
|
yAxisOptions: { gridLines: !1 },
|
|
2721
2729
|
margins: Le.HORIZONTAL
|
|
2722
2730
|
}
|
|
2723
|
-
},
|
|
2731
|
+
}, Fa = /* @__PURE__ */ Z({
|
|
2724
2732
|
__name: "lume-single-bar-chart",
|
|
2725
2733
|
props: {
|
|
2726
2734
|
...Ne(ut)
|
|
2727
2735
|
},
|
|
2728
2736
|
setup(e, { emit: n }) {
|
|
2729
2737
|
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
|
|
2730
|
-
() =>
|
|
2738
|
+
() => ma[u.value || D.VERTICAL]
|
|
2731
2739
|
// needs to be computed so that default options are reactive
|
|
2732
|
-
), { allOptions: s } =
|
|
2733
|
-
return (c, p) => (_(),
|
|
2740
|
+
), { allOptions: s } = fe(a, i);
|
|
2741
|
+
return (c, p) => (_(), J(d(De), j(t, {
|
|
2734
2742
|
"chart-type": "single-bar",
|
|
2735
2743
|
options: d(s),
|
|
2736
2744
|
"data-j-single-bar-chart": ""
|
|
2737
|
-
},
|
|
2745
|
+
}, ae(d(o))), de({
|
|
2738
2746
|
groups: V((r) => [
|
|
2739
|
-
se(d(
|
|
2747
|
+
se(d(ft), j(r, { orientation: d(u) }, ae(d(o))), null, 16, ["orientation"])
|
|
2740
2748
|
]),
|
|
2741
2749
|
_: 2
|
|
2742
2750
|
}, [
|
|
2743
|
-
|
|
2744
|
-
name:
|
|
2751
|
+
z(d(l), (r, m) => ({
|
|
2752
|
+
name: m,
|
|
2745
2753
|
fn: V((g) => [
|
|
2746
|
-
S(c.$slots,
|
|
2754
|
+
S(c.$slots, m, he(ge(g || {})))
|
|
2747
2755
|
])
|
|
2748
2756
|
}))
|
|
2749
2757
|
]), 1040, ["options"]));
|
|
2750
2758
|
}
|
|
2751
|
-
}),
|
|
2759
|
+
}), fa = {
|
|
2752
2760
|
[D.VERTICAL]: {
|
|
2753
2761
|
withTooltip: !0,
|
|
2754
2762
|
xAxisOptions: {},
|
|
@@ -2762,38 +2770,38 @@ const cl = {
|
|
|
2762
2770
|
margins: Le.HORIZONTAL,
|
|
2763
2771
|
tooltipOptions: { position: "right" }
|
|
2764
2772
|
}
|
|
2765
|
-
},
|
|
2773
|
+
}, za = /* @__PURE__ */ Z({
|
|
2766
2774
|
__name: "lume-grouped-bar-chart",
|
|
2767
2775
|
props: {
|
|
2768
2776
|
...Ne()
|
|
2769
2777
|
},
|
|
2770
2778
|
setup(e, { emit: n }) {
|
|
2771
2779
|
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { orientation: u, options: a } = ne(t), i = v(
|
|
2772
|
-
() =>
|
|
2780
|
+
() => fa[u.value || D.VERTICAL]
|
|
2773
2781
|
// needs to be computed so that default options are reactive
|
|
2774
|
-
), { allOptions: s } =
|
|
2782
|
+
), { allOptions: s } = fe(
|
|
2775
2783
|
a,
|
|
2776
2784
|
i
|
|
2777
2785
|
);
|
|
2778
|
-
return (c, p) => (_(),
|
|
2786
|
+
return (c, p) => (_(), J(d(De), j(t, {
|
|
2779
2787
|
"chart-type": "grouped-bar",
|
|
2780
2788
|
options: d(s),
|
|
2781
2789
|
"data-j-grouped-bar-chart": ""
|
|
2782
|
-
},
|
|
2790
|
+
}, ae(d(o))), de({
|
|
2783
2791
|
groups: V((r) => [
|
|
2784
|
-
se(d(
|
|
2792
|
+
se(d(ft), j(r, { type: "grouped" }, ae(d(o))), null, 16)
|
|
2785
2793
|
]),
|
|
2786
2794
|
_: 2
|
|
2787
2795
|
}, [
|
|
2788
|
-
|
|
2789
|
-
name:
|
|
2796
|
+
z(d(l), (r, m) => ({
|
|
2797
|
+
name: m,
|
|
2790
2798
|
fn: V((g) => [
|
|
2791
|
-
S(c.$slots,
|
|
2799
|
+
S(c.$slots, m, he(ge(g || {})))
|
|
2792
2800
|
])
|
|
2793
2801
|
}))
|
|
2794
2802
|
]), 1040, ["options"]));
|
|
2795
2803
|
}
|
|
2796
|
-
}),
|
|
2804
|
+
}), pa = {
|
|
2797
2805
|
[D.VERTICAL]: {
|
|
2798
2806
|
withTooltip: !0,
|
|
2799
2807
|
xAxisOptions: {},
|
|
@@ -2807,44 +2815,44 @@ const cl = {
|
|
|
2807
2815
|
margins: Le.HORIZONTAL,
|
|
2808
2816
|
tooltipOptions: { position: "right" }
|
|
2809
2817
|
}
|
|
2810
|
-
},
|
|
2818
|
+
}, Wa = /* @__PURE__ */ Z({
|
|
2811
2819
|
__name: "lume-stacked-bar-chart",
|
|
2812
2820
|
props: {
|
|
2813
2821
|
...Ne()
|
|
2814
2822
|
},
|
|
2815
2823
|
setup(e, { emit: n }) {
|
|
2816
2824
|
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { data: u, orientation: a, options: i, labels: s } = ne(t), c = v(
|
|
2817
|
-
() =>
|
|
2825
|
+
() => pa[a.value || D.VERTICAL]
|
|
2818
2826
|
// needs to be computed so that default options are reactive
|
|
2819
|
-
), { allOptions: p } =
|
|
2827
|
+
), { allOptions: p } = fe(
|
|
2820
2828
|
i,
|
|
2821
2829
|
c
|
|
2822
|
-
), { internalData: r } = mt(u), { groupedData:
|
|
2823
|
-
|
|
2830
|
+
), { internalData: r } = mt(u), { groupedData: m } = nn(r, s), { stackedXScaleGenerator: g, stackedYScaleGenerator: f } = ia(
|
|
2831
|
+
m,
|
|
2824
2832
|
a,
|
|
2825
2833
|
i
|
|
2826
|
-
);
|
|
2827
|
-
return (
|
|
2834
|
+
), A = v(() => t.xScale || g), L = v(() => t.yScale || f);
|
|
2835
|
+
return (k, h) => (_(), J(d(De), j(t, {
|
|
2828
2836
|
"chart-type": "stacked-bar",
|
|
2829
2837
|
options: d(p),
|
|
2830
|
-
"x-scale":
|
|
2831
|
-
"y-scale":
|
|
2838
|
+
"x-scale": A.value,
|
|
2839
|
+
"y-scale": L.value,
|
|
2832
2840
|
"data-j-stacked-bar-chart": ""
|
|
2833
|
-
},
|
|
2834
|
-
groups: V((
|
|
2835
|
-
se(d(
|
|
2841
|
+
}, ae(d(o))), de({
|
|
2842
|
+
groups: V((x) => [
|
|
2843
|
+
se(d(ft), j(x, { type: "stacked" }, ae(d(o))), null, 16)
|
|
2836
2844
|
]),
|
|
2837
2845
|
_: 2
|
|
2838
2846
|
}, [
|
|
2839
|
-
|
|
2840
|
-
name:
|
|
2841
|
-
fn: V((
|
|
2842
|
-
S(
|
|
2847
|
+
z(d(l), (x, E) => ({
|
|
2848
|
+
name: E,
|
|
2849
|
+
fn: V((N) => [
|
|
2850
|
+
S(k.$slots, E, he(ge(N || {})))
|
|
2843
2851
|
])
|
|
2844
2852
|
}))
|
|
2845
2853
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2846
2854
|
}
|
|
2847
|
-
}),
|
|
2855
|
+
}), ha = ["d", "stroke-width"], ga = 2, _a = /* @__PURE__ */ Z({
|
|
2848
2856
|
__name: "lume-line",
|
|
2849
2857
|
props: {
|
|
2850
2858
|
pathDefinition: {
|
|
@@ -2853,7 +2861,7 @@ const cl = {
|
|
|
2853
2861
|
},
|
|
2854
2862
|
width: {
|
|
2855
2863
|
type: Number,
|
|
2856
|
-
default:
|
|
2864
|
+
default: ga
|
|
2857
2865
|
},
|
|
2858
2866
|
color: {
|
|
2859
2867
|
type: String,
|
|
@@ -2878,7 +2886,7 @@ const cl = {
|
|
|
2878
2886
|
},
|
|
2879
2887
|
emits: ["click"],
|
|
2880
2888
|
setup(e, { emit: n }) {
|
|
2881
|
-
const t = n, o =
|
|
2889
|
+
const t = n, o = B(null);
|
|
2882
2890
|
return ye(() => Fe(o.value)), (l, u) => (_(), $("path", {
|
|
2883
2891
|
ref_key: "root",
|
|
2884
2892
|
ref: o,
|
|
@@ -2889,16 +2897,16 @@ const cl = {
|
|
|
2889
2897
|
}]),
|
|
2890
2898
|
d: e.pathDefinition,
|
|
2891
2899
|
"stroke-width": e.width,
|
|
2892
|
-
style:
|
|
2900
|
+
style: Rt({
|
|
2893
2901
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2894
2902
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2895
2903
|
}),
|
|
2896
2904
|
"data-j-line": "",
|
|
2897
2905
|
onClick: u[0] || (u[0] = (a) => t("click", a))
|
|
2898
|
-
}, null, 14,
|
|
2906
|
+
}, null, 14, ha));
|
|
2899
2907
|
}
|
|
2900
2908
|
});
|
|
2901
|
-
const
|
|
2909
|
+
const ya = /* @__PURE__ */ te(_a, [["__scopeId", "data-v-08896455"]]), ka = ["cx", "cy", "r", "stroke-width"], ba = 4, Aa = /* @__PURE__ */ Z({
|
|
2902
2910
|
__name: "lume-point",
|
|
2903
2911
|
props: {
|
|
2904
2912
|
x: { type: Number, required: !0 },
|
|
@@ -2909,7 +2917,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2909
2917
|
},
|
|
2910
2918
|
radius: {
|
|
2911
2919
|
type: Number,
|
|
2912
|
-
default:
|
|
2920
|
+
default: ba
|
|
2913
2921
|
},
|
|
2914
2922
|
active: {
|
|
2915
2923
|
type: Boolean,
|
|
@@ -2918,7 +2926,7 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2918
2926
|
},
|
|
2919
2927
|
emits: ["click"],
|
|
2920
2928
|
setup(e, { emit: n }) {
|
|
2921
|
-
const t = e, o = n, l =
|
|
2929
|
+
const t = e, o = n, l = B(null), u = v(() => t.radius / 2);
|
|
2922
2930
|
return ye(() => Fe(l.value)), (a, i) => (_(), $("circle", {
|
|
2923
2931
|
ref_key: "root",
|
|
2924
2932
|
ref: l,
|
|
@@ -2929,10 +2937,10 @@ const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2929
2937
|
"stroke-width": u.value,
|
|
2930
2938
|
"data-j-point": "",
|
|
2931
2939
|
onClick: i[0] || (i[0] = (s) => o("click", s))
|
|
2932
|
-
}, null, 10,
|
|
2940
|
+
}, null, 10, ka));
|
|
2933
2941
|
}
|
|
2934
2942
|
});
|
|
2935
|
-
const
|
|
2943
|
+
const Ta = /* @__PURE__ */ te(Aa, [["__scopeId", "data-v-b6745177"]]);
|
|
2936
2944
|
function on(e) {
|
|
2937
2945
|
function n(u) {
|
|
2938
2946
|
let a = null;
|
|
@@ -2940,7 +2948,7 @@ function on(e) {
|
|
|
2940
2948
|
}
|
|
2941
2949
|
function t(u, a, i, s) {
|
|
2942
2950
|
const r = Math.abs(u - a) / (i + 1) * (s + 1);
|
|
2943
|
-
return u > a ? u - r : u + r;
|
|
2951
|
+
return u == null && a == null ? null : u > a ? u - r : u + r;
|
|
2944
2952
|
}
|
|
2945
2953
|
function o(u) {
|
|
2946
2954
|
return function(i) {
|
|
@@ -2957,14 +2965,14 @@ function on(e) {
|
|
|
2957
2965
|
values: u.values.map((i, s) => {
|
|
2958
2966
|
var p, r;
|
|
2959
2967
|
const c = a.find(
|
|
2960
|
-
(
|
|
2968
|
+
(m) => m.includes(s)
|
|
2961
2969
|
);
|
|
2962
2970
|
if (c) {
|
|
2963
|
-
const
|
|
2964
|
-
let
|
|
2965
|
-
return
|
|
2971
|
+
const m = c[0] - 1, g = c[c.length - 1] + 1;
|
|
2972
|
+
let f = (p = u.values[m]) == null ? void 0 : p.value, A = (r = u.values[g]) == null ? void 0 : r.value;
|
|
2973
|
+
return f == null && (f = A), A == null && (A = f), {
|
|
2966
2974
|
value: t(
|
|
2967
|
-
|
|
2975
|
+
f,
|
|
2968
2976
|
A,
|
|
2969
2977
|
c.length,
|
|
2970
2978
|
c.indexOf(s)
|
|
@@ -2977,26 +2985,27 @@ function on(e) {
|
|
|
2977
2985
|
};
|
|
2978
2986
|
})) };
|
|
2979
2987
|
}
|
|
2980
|
-
function
|
|
2988
|
+
function La(e, n) {
|
|
2981
2989
|
const t = e.bandwidth() / 2;
|
|
2982
2990
|
return (o, l) => e(e.domain()[n + (l - 1)]) + t;
|
|
2983
2991
|
}
|
|
2984
|
-
function
|
|
2992
|
+
function Oa(e, n) {
|
|
2985
2993
|
return (t, o) => e(n + (o - 1));
|
|
2986
2994
|
}
|
|
2987
|
-
function
|
|
2988
|
-
|
|
2989
|
-
ve(t) ?
|
|
2990
|
-
).y((u) => o(u))
|
|
2995
|
+
function xa(e, n, t, o) {
|
|
2996
|
+
const l = hn().x(
|
|
2997
|
+
ve(t) ? La(t, e) : Oa(t, e)
|
|
2998
|
+
).y((u) => o(u));
|
|
2999
|
+
return n.every((u) => u == null) ? null : l(n);
|
|
2991
3000
|
}
|
|
2992
|
-
const $
|
|
3001
|
+
const $a = {
|
|
2993
3002
|
class: "lume-line-group",
|
|
2994
3003
|
"data-j-lume-line-group": ""
|
|
2995
|
-
},
|
|
3004
|
+
}, Ia = { class: "lume-line-group__lines" }, wa = {
|
|
2996
3005
|
key: 0,
|
|
2997
3006
|
class: "lume-line-group__points",
|
|
2998
3007
|
"data-j-lume-line-group__points": ""
|
|
2999
|
-
},
|
|
3008
|
+
}, Ea = 1, Na = /* @__PURE__ */ Z({
|
|
3000
3009
|
__name: "lume-line-group",
|
|
3001
3010
|
props: {
|
|
3002
3011
|
...ze(),
|
|
@@ -3011,7 +3020,7 @@ const $l = {
|
|
|
3011
3020
|
},
|
|
3012
3021
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3013
3022
|
setup(e, { emit: n }) {
|
|
3014
|
-
const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c =
|
|
3023
|
+
const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c = Ve(
|
|
3015
3024
|
"tooltipAnchorAttributes",
|
|
3016
3025
|
null
|
|
3017
3026
|
), { updateTooltipAnchorAttributes: p } = Qt(
|
|
@@ -3025,7 +3034,7 @@ const $l = {
|
|
|
3025
3034
|
return l.value;
|
|
3026
3035
|
const { computedLineData: w } = on(l);
|
|
3027
3036
|
return u.value.withTooltip !== !1 && (c != null && c.value) && p(w.value), w.value;
|
|
3028
|
-
}),
|
|
3037
|
+
}), m = v(() => {
|
|
3029
3038
|
if (t.hoveredIndex === -1)
|
|
3030
3039
|
return;
|
|
3031
3040
|
const w = wn(
|
|
@@ -3038,9 +3047,9 @@ const $l = {
|
|
|
3038
3047
|
// Move to X index, Vertical line to the highest point
|
|
3039
3048
|
};
|
|
3040
3049
|
}), g = v(
|
|
3041
|
-
() => a.value &&
|
|
3050
|
+
() => a.value && Ea / (En(a.value) - 1)
|
|
3042
3051
|
// Subtracting the first line (read below)
|
|
3043
|
-
),
|
|
3052
|
+
), f = v(
|
|
3044
3053
|
() => {
|
|
3045
3054
|
var w;
|
|
3046
3055
|
return ((w = u.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
|
|
@@ -3048,100 +3057,100 @@ const $l = {
|
|
|
3048
3057
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3049
3058
|
), A = v(
|
|
3050
3059
|
() => a.value.bandwidth() / 2
|
|
3051
|
-
),
|
|
3060
|
+
), L = v(() => a.value.domain()), k = v(
|
|
3052
3061
|
() => u.value.withPoints ?? t.withPoints
|
|
3053
3062
|
);
|
|
3054
|
-
function
|
|
3063
|
+
function h(w) {
|
|
3055
3064
|
return r.value[w].values;
|
|
3056
3065
|
}
|
|
3057
|
-
function
|
|
3058
|
-
var
|
|
3059
|
-
const
|
|
3060
|
-
(
|
|
3061
|
-
(q =
|
|
3066
|
+
function x(w, C) {
|
|
3067
|
+
var X, q;
|
|
3068
|
+
const U = w === 0 ? [] : [
|
|
3069
|
+
(X = h(C)[w - 1]) == null ? void 0 : X.value,
|
|
3070
|
+
(q = h(C)[w]) == null ? void 0 : q.value
|
|
3062
3071
|
];
|
|
3063
|
-
return
|
|
3072
|
+
return xa(
|
|
3064
3073
|
w,
|
|
3065
|
-
|
|
3074
|
+
U,
|
|
3066
3075
|
a.value,
|
|
3067
3076
|
i.value
|
|
3068
3077
|
) || "";
|
|
3069
3078
|
}
|
|
3070
|
-
function
|
|
3079
|
+
function E(w) {
|
|
3071
3080
|
return {
|
|
3072
3081
|
animationDelay: w < 2 ? 0 : (w - 1) * g.value,
|
|
3073
3082
|
animationDuration: g.value
|
|
3074
3083
|
};
|
|
3075
3084
|
}
|
|
3076
|
-
function
|
|
3077
|
-
var
|
|
3078
|
-
const
|
|
3085
|
+
function N(w, C) {
|
|
3086
|
+
var X;
|
|
3087
|
+
const U = (X = h(C)[w]) == null ? void 0 : X.value;
|
|
3079
3088
|
return {
|
|
3080
|
-
x: ve(a.value) ? t.xScale(
|
|
3081
|
-
y: i.value(
|
|
3089
|
+
x: ve(a.value) ? t.xScale(L.value[w]) + A.value : t.xScale(w),
|
|
3090
|
+
y: U === null ? i.value(i.value.domain()[1]) : i.value(U)
|
|
3082
3091
|
};
|
|
3083
3092
|
}
|
|
3084
3093
|
function F(w) {
|
|
3085
3094
|
return t.hoveredIndex === w;
|
|
3086
3095
|
}
|
|
3087
|
-
return (w, C) => (_(), $("g", $
|
|
3088
|
-
G("path", j(
|
|
3096
|
+
return (w, C) => (_(), $("g", $a, [
|
|
3097
|
+
G("path", j(m.value, {
|
|
3089
3098
|
class: "lume-line-group__overlay-line",
|
|
3090
3099
|
"data-j-lume-line-group__overlay-line": ""
|
|
3091
3100
|
}), null, 16),
|
|
3092
|
-
(_(!0), $(ee, null,
|
|
3093
|
-
key:
|
|
3101
|
+
(_(!0), $(ee, null, z(r.value, (U, X) => (_(), $("g", {
|
|
3102
|
+
key: U.label,
|
|
3094
3103
|
class: "lume-line-group__group"
|
|
3095
3104
|
}, [
|
|
3096
|
-
G("g",
|
|
3097
|
-
(_(!0), $(ee, null,
|
|
3105
|
+
G("g", Ia, [
|
|
3106
|
+
(_(!0), $(ee, null, z(U.values, (q, P) => (_(), J(d(ya), j(E(P), {
|
|
3098
3107
|
key: `line-${P}`,
|
|
3099
|
-
color:
|
|
3100
|
-
dashed:
|
|
3101
|
-
"path-definition":
|
|
3108
|
+
color: U.color,
|
|
3109
|
+
dashed: U.isDashed(P),
|
|
3110
|
+
"path-definition": x(P, X),
|
|
3102
3111
|
transition: e.transition,
|
|
3103
3112
|
width: d(u).lineWidth,
|
|
3104
|
-
onClick: (re) => o("line-click", { index: P, datasetIndex:
|
|
3113
|
+
onClick: (re) => o("line-click", { index: P, datasetIndex: X, event: re })
|
|
3105
3114
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3106
3115
|
]),
|
|
3107
|
-
|
|
3108
|
-
(_(!0), $(ee, null,
|
|
3116
|
+
k.value ? (_(), $("g", wa, [
|
|
3117
|
+
(_(!0), $(ee, null, z(U.values, (q, P) => (_(), J(d(Ta), j(N(P, X), {
|
|
3109
3118
|
key: `point-${P}`,
|
|
3110
3119
|
active: F(P),
|
|
3111
|
-
color:
|
|
3120
|
+
color: U.color,
|
|
3112
3121
|
index: P,
|
|
3113
|
-
radius:
|
|
3114
|
-
onClick: (re) => o("point-click", { index: P, datasetIndex:
|
|
3122
|
+
radius: f.value,
|
|
3123
|
+
onClick: (re) => o("point-click", { index: P, datasetIndex: X, event: re })
|
|
3115
3124
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3116
|
-
])) :
|
|
3125
|
+
])) : W("", !0)
|
|
3117
3126
|
]))), 128))
|
|
3118
3127
|
]));
|
|
3119
3128
|
}
|
|
3120
3129
|
});
|
|
3121
|
-
const
|
|
3130
|
+
const ln = /* @__PURE__ */ te(Na, [["__scopeId", "data-v-44ba7be1"]]), Da = {
|
|
3122
3131
|
margins: Le.VERTICAL,
|
|
3123
3132
|
startOnZero: !0,
|
|
3124
3133
|
withTooltip: !0,
|
|
3125
3134
|
xAxisOptions: {},
|
|
3126
3135
|
yAxisOptions: { gridLines: !0 }
|
|
3127
|
-
},
|
|
3136
|
+
}, Za = /* @__PURE__ */ Z({
|
|
3128
3137
|
__name: "lume-line-chart",
|
|
3129
3138
|
props: {
|
|
3130
3139
|
...Ne(null, !1)
|
|
3131
3140
|
},
|
|
3132
3141
|
setup(e, { emit: n }) {
|
|
3133
|
-
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { options: u } = ne(t), { allOptions: a } =
|
|
3134
|
-
return (i, s) => (_(),
|
|
3142
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(ie()), { options: u } = ne(t), { allOptions: a } = fe(u, Da);
|
|
3143
|
+
return (i, s) => (_(), J(d(De), j(t, {
|
|
3135
3144
|
"chart-type": "line",
|
|
3136
3145
|
options: d(a),
|
|
3137
3146
|
"data-j-lume-line-chart": ""
|
|
3138
|
-
},
|
|
3147
|
+
}, ae(d(o))), de({
|
|
3139
3148
|
groups: V((c) => [
|
|
3140
|
-
se(d(
|
|
3149
|
+
se(d(ln), j(c, ae(d(o))), null, 16)
|
|
3141
3150
|
]),
|
|
3142
3151
|
_: 2
|
|
3143
3152
|
}, [
|
|
3144
|
-
|
|
3153
|
+
z(d(l), (c, p) => ({
|
|
3145
3154
|
name: p,
|
|
3146
3155
|
fn: V((r) => [
|
|
3147
3156
|
S(i.$slots, p, he(ge(r || {})))
|
|
@@ -3150,7 +3159,7 @@ const an = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-649a5210"]]), Dl = {
|
|
|
3150
3159
|
]), 1040, ["options"]));
|
|
3151
3160
|
}
|
|
3152
3161
|
});
|
|
3153
|
-
function
|
|
3162
|
+
function Ha(e) {
|
|
3154
3163
|
return { areaPathDefinition: v(
|
|
3155
3164
|
() => function(t, o) {
|
|
3156
3165
|
if (!t || !o || ve(t) || ve(o))
|
|
@@ -3160,7 +3169,7 @@ function Hl(e) {
|
|
|
3160
3169
|
}
|
|
3161
3170
|
) };
|
|
3162
3171
|
}
|
|
3163
|
-
const
|
|
3172
|
+
const Ma = {
|
|
3164
3173
|
margins: {
|
|
3165
3174
|
top: 0,
|
|
3166
3175
|
right: 0,
|
|
@@ -3174,79 +3183,86 @@ const Ml = {
|
|
|
3174
3183
|
tooltipOptions: {
|
|
3175
3184
|
showTitle: !1
|
|
3176
3185
|
}
|
|
3177
|
-
},
|
|
3186
|
+
}, Ba = ["d"], Ra = /* @__PURE__ */ Z({
|
|
3178
3187
|
__name: "lume-sparkline-chart",
|
|
3179
3188
|
props: {
|
|
3180
3189
|
...vt(null),
|
|
3181
|
-
...
|
|
3190
|
+
...Be()
|
|
3182
3191
|
},
|
|
3183
3192
|
setup(e, { expose: n, emit: t }) {
|
|
3184
|
-
const o = e, { componentEventPropagator: l } = ke(), u = Oe(ie()), { data: a, options: i } = ne(o), { internalData: s } = mt(a), { allOptions: c } =
|
|
3185
|
-
|
|
3193
|
+
const o = e, { componentEventPropagator: l } = ke(), u = Oe(ie()), { data: a, options: i } = ne(o), { internalData: s } = mt(a), { allOptions: c } = fe(i, Ma), { computedLineData: p } = on(s), { areaPathDefinition: r } = Ha(p), m = v(() => {
|
|
3194
|
+
var L, k;
|
|
3195
|
+
return (k = (L = s.value) == null ? void 0 : L[0]) == null ? void 0 : k.color;
|
|
3196
|
+
}), g = v(
|
|
3197
|
+
() => {
|
|
3198
|
+
var L, k;
|
|
3199
|
+
return ((k = (L = a.value) == null ? void 0 : L[0]) == null ? void 0 : k.areaColor) || m.value;
|
|
3200
|
+
}
|
|
3186
3201
|
);
|
|
3187
|
-
function
|
|
3202
|
+
function f(L) {
|
|
3188
3203
|
return {
|
|
3189
|
-
...
|
|
3204
|
+
...L,
|
|
3190
3205
|
noMinSize: !0
|
|
3191
3206
|
};
|
|
3192
3207
|
}
|
|
3193
|
-
function A(
|
|
3194
|
-
|
|
3208
|
+
function A(L, k, h) {
|
|
3209
|
+
if (L.length)
|
|
3210
|
+
return Me().range([0, h.width]).domain([0, L[0].values.length - 1]);
|
|
3195
3211
|
}
|
|
3196
3212
|
return n({
|
|
3197
3213
|
areaPathDefinition: r
|
|
3198
|
-
}), (
|
|
3214
|
+
}), (L, k) => (_(), J(d(De), j(o, {
|
|
3199
3215
|
"chart-type": "line",
|
|
3200
|
-
options:
|
|
3216
|
+
options: f(d(c)),
|
|
3201
3217
|
"x-scale": A
|
|
3202
|
-
},
|
|
3203
|
-
groups: V((
|
|
3218
|
+
}, ae(d(l))), de({
|
|
3219
|
+
groups: V((h) => [
|
|
3204
3220
|
d(c).showArea ? (_(), $("path", {
|
|
3205
3221
|
key: 0,
|
|
3206
3222
|
class: oe([
|
|
3207
3223
|
"sparkline-chart__area",
|
|
3208
3224
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3209
|
-
`lume-fill--${g.value ||
|
|
3225
|
+
`lume-fill--${g.value || m.value}`,
|
|
3210
3226
|
"lume-fill--faded"
|
|
3211
3227
|
]),
|
|
3212
|
-
d: d(r)(
|
|
3228
|
+
d: d(r)(h.xScale, h.yScale),
|
|
3213
3229
|
"data-j-sparkline__area": ""
|
|
3214
|
-
}, null, 10,
|
|
3215
|
-
se(d(
|
|
3230
|
+
}, null, 10, Ba)) : W("", !0),
|
|
3231
|
+
se(d(ln), j(h, { "with-points": !1 }, ae(d(l))), null, 16)
|
|
3216
3232
|
]),
|
|
3217
3233
|
_: 2
|
|
3218
3234
|
}, [
|
|
3219
|
-
|
|
3220
|
-
name:
|
|
3221
|
-
fn: V((
|
|
3222
|
-
S(
|
|
3235
|
+
z(d(u), (h, x) => ({
|
|
3236
|
+
name: x,
|
|
3237
|
+
fn: V((E) => [
|
|
3238
|
+
S(L.$slots, x, he(ge(E || {})), void 0, !0)
|
|
3223
3239
|
])
|
|
3224
3240
|
}))
|
|
3225
3241
|
]), 1040, ["options"]));
|
|
3226
3242
|
}
|
|
3227
3243
|
});
|
|
3228
|
-
const
|
|
3244
|
+
const Ua = /* @__PURE__ */ te(Ra, [["__scopeId", "data-v-bda226a1"]]);
|
|
3229
3245
|
export {
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3246
|
+
Va as LumeAlluvialDiagram,
|
|
3247
|
+
ql as LumeAlluvialGroup,
|
|
3248
|
+
_l as LumeAlluvialNodeLabel,
|
|
3249
|
+
bl as LumeAlluvialNodeValue,
|
|
3250
|
+
bt as LumeAxis,
|
|
3235
3251
|
dt as LumeBar,
|
|
3236
|
-
|
|
3237
|
-
|
|
3252
|
+
Pa as LumeBarChart,
|
|
3253
|
+
ft as LumeBarGroup,
|
|
3238
3254
|
De as LumeChart,
|
|
3239
3255
|
uo as LumeChartContainer,
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3256
|
+
At as LumeChartLegend,
|
|
3257
|
+
za as LumeGroupedBarChart,
|
|
3258
|
+
ya as LumeLine,
|
|
3259
|
+
Za as LumeLineChart,
|
|
3260
|
+
ln as LumeLineGroup,
|
|
3245
3261
|
Wo as LumeOverlayGroup,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3262
|
+
Ta as LumePoint,
|
|
3263
|
+
Fa as LumeSingleBarChart,
|
|
3264
|
+
Ua as LumeSparklineChart,
|
|
3265
|
+
Wa as LumeStackedBarChart,
|
|
3250
3266
|
Eo as LumeTooltip,
|
|
3251
3267
|
To as LumeTooltipItem,
|
|
3252
3268
|
_o as LumeTooltipSummary,
|