@adyen/lume 1.14.0 → 1.15.0
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-alluvial-diagram/defaults.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -1
- package/dist/@types/types/alluvial.d.ts +1 -0
- package/dist/@types/types/alluvial.d.ts.map +1 -1
- package/dist/@types/types/options.d.ts +2 -1
- package/dist/@types/types/options.d.ts.map +1 -1
- package/dist/common/BSSy21i7.js +5 -0
- package/dist/common/BSSy21i7.js.map +1 -0
- package/dist/common/asrcm8__.js +5 -0
- package/dist/common/asrcm8__.js.map +1 -0
- package/dist/common/es6xM4zX.js +5 -0
- package/dist/common/es6xM4zX.js.map +1 -0
- package/dist/common/{BvvJadxi.js → h4DBladZ.js} +919 -900
- package/dist/common/h4DBladZ.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +13 -0
- package/dist/scss/main.scss +4 -4
- package/dist/styles/main.css +1 -1
- package/package.json +3 -3
- package/dist/common/BvvJadxi.js.map +0 -1
- package/dist/common/DHB3p6kw.js +0 -5
- package/dist/common/DHB3p6kw.js.map +0 -1
- package/dist/common/DWtV4D8X.js +0 -5
- package/dist/common/DWtV4D8X.js.map +0 -1
- package/dist/common/DiDq9ch9.js +0 -5
- package/dist/common/DiDq9ch9.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as R, ref as I, isRef as Nt, computed as v, watch as H, toRefs as V, inject as Oe, reactive as Ie, onMounted as re, watchEffect as Et, onBeforeUnmount as $t, useSlots as X, nextTick as Be, provide as Pe, defineAsyncComponent as Re } from "vue";
|
|
2
2
|
import { sankeyLinkHorizontal as Jt, sankey as Qt, sankeyJustify as qt } from "d3-sankey";
|
|
3
|
-
import { format as en, ticks as tn, scaleLinear as
|
|
3
|
+
import { format as en, ticks as tn, scaleLinear as ge, scaleBand as he, link as nn, line as rn, area as an } from "d3";
|
|
4
4
|
import { createPopper as on } from "@popperjs/core";
|
|
5
|
-
const
|
|
5
|
+
const ln = /* @__PURE__ */ R({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,14 +44,14 @@ const un = /* @__PURE__ */ P({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function S(t, e, r, n, a, o,
|
|
48
|
-
var
|
|
49
|
-
return e && (
|
|
47
|
+
function S(t, e, r, n, a, o, l, i) {
|
|
48
|
+
var u = typeof t == "function" ? t.options : t;
|
|
49
|
+
return e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), o && (u._scopeId = "data-v-" + o), {
|
|
50
50
|
exports: t,
|
|
51
|
-
options:
|
|
51
|
+
options: u
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var un = function() {
|
|
55
55
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
56
56
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
57
57
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -62,8 +62,8 @@ var ln = function() {
|
|
|
62
62
|
return n.emit("click", a);
|
|
63
63
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
64
64
|
}, sn = [], cn = /* @__PURE__ */ S(
|
|
65
|
-
un,
|
|
66
65
|
ln,
|
|
66
|
+
un,
|
|
67
67
|
sn,
|
|
68
68
|
!1,
|
|
69
69
|
null,
|
|
@@ -77,10 +77,10 @@ const dn = cn.exports, vn = [
|
|
|
77
77
|
"tooltip",
|
|
78
78
|
"tooltip-content"
|
|
79
79
|
];
|
|
80
|
-
function
|
|
80
|
+
function wt() {
|
|
81
81
|
return process.env.NODE_ENV === "production";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Dt(t) {
|
|
84
84
|
return (t == null ? void 0 : t.map(
|
|
85
85
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
86
86
|
).flat()) || [];
|
|
@@ -93,17 +93,17 @@ function fn(t) {
|
|
|
93
93
|
(e) => "color" in e
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Ce(t) {
|
|
97
97
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ht(t, e) {
|
|
100
100
|
const r = { ...t };
|
|
101
101
|
return Object.entries(e).forEach(([n, a]) => {
|
|
102
|
-
r[n] =
|
|
102
|
+
r[n] = Ce(t[n]) && Ce(a) ? Ht(t[n], a) : a;
|
|
103
103
|
}), r;
|
|
104
104
|
}
|
|
105
105
|
function pn(t) {
|
|
106
|
-
return t != null &&
|
|
106
|
+
return t != null && Ce(t) && "value" in t;
|
|
107
107
|
}
|
|
108
108
|
function K(t) {
|
|
109
109
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
@@ -128,13 +128,13 @@ function hn(t, e) {
|
|
|
128
128
|
var r;
|
|
129
129
|
return gn(t, e), ((r = t.reduce(
|
|
130
130
|
(n, a) => {
|
|
131
|
-
var o,
|
|
132
|
-
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((
|
|
131
|
+
var o, l;
|
|
132
|
+
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
133
133
|
}
|
|
134
134
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const e =
|
|
136
|
+
function St(t) {
|
|
137
|
+
const e = Nt(t) ? t.value : t;
|
|
138
138
|
if (!e)
|
|
139
139
|
throw new Error("No empty array can be created from specified data value");
|
|
140
140
|
const r = Math.max(
|
|
@@ -179,9 +179,9 @@ var J = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recomm
|
|
|
179
179
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(J || {});
|
|
180
180
|
const Ln = "[lume] ";
|
|
181
181
|
function ne(t, e = !0) {
|
|
182
|
-
e &&
|
|
182
|
+
e && wt() || console.warn(Ln + "Warning: " + t);
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Te = (t) => {
|
|
185
185
|
let e = null;
|
|
186
186
|
switch (typeof t) {
|
|
187
187
|
case "string":
|
|
@@ -201,37 +201,37 @@ const Ne = (t) => {
|
|
|
201
201
|
return e ? e(...n) : n[0];
|
|
202
202
|
}
|
|
203
203
|
return r;
|
|
204
|
-
},
|
|
204
|
+
}, ye = () => ({
|
|
205
205
|
options: {
|
|
206
206
|
type: Object,
|
|
207
207
|
default: () => ({})
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
function Q(t, e) {
|
|
211
|
-
return { allOptions:
|
|
212
|
-
const n =
|
|
213
|
-
return n ?
|
|
211
|
+
return { allOptions: v(() => {
|
|
212
|
+
const n = Nt(e) ? e == null ? void 0 : e.value : e;
|
|
213
|
+
return n ? Ht(n, t.value) : t.value;
|
|
214
214
|
}) };
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
function
|
|
218
|
-
const n = I(), a =
|
|
219
|
-
function
|
|
216
|
+
const Tn = 0.2;
|
|
217
|
+
function An(t, e, r) {
|
|
218
|
+
const n = I(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
|
|
219
|
+
function l() {
|
|
220
220
|
if (!e.value) return;
|
|
221
|
-
const
|
|
222
|
-
(s,
|
|
221
|
+
const u = e.value.reduce(
|
|
222
|
+
(s, f) => s + f.ref.getBoundingClientRect().width,
|
|
223
223
|
0
|
|
224
|
-
), c = Math.ceil(
|
|
225
|
-
n.value = c + c *
|
|
224
|
+
), c = Math.ceil(u / o.value);
|
|
225
|
+
n.value = c + c * Tn;
|
|
226
226
|
}
|
|
227
|
-
function i(
|
|
227
|
+
function i(u) {
|
|
228
228
|
if (!e.value) return !0;
|
|
229
229
|
const c = r.value.skip, s = e.value.length;
|
|
230
|
-
if (
|
|
231
|
-
const
|
|
232
|
-
return
|
|
230
|
+
if (u === 0) return !0;
|
|
231
|
+
const f = a.value / s, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / f);
|
|
232
|
+
return u % m === 0;
|
|
233
233
|
}
|
|
234
|
-
return H(e,
|
|
234
|
+
return H(e, l), { showTick: i };
|
|
235
235
|
}
|
|
236
236
|
const O = {
|
|
237
237
|
HORIZONTAL: "horizontal",
|
|
@@ -240,7 +240,7 @@ const O = {
|
|
|
240
240
|
SINGLE: "single",
|
|
241
241
|
GROUPED: "grouped",
|
|
242
242
|
STACKED: "stacked"
|
|
243
|
-
},
|
|
243
|
+
}, Pt = "No data", st = 20, Rt = 0.33, Bt = 0.5, Ct = 12, be = 8, In = 1, Nn = [
|
|
244
244
|
"auto",
|
|
245
245
|
"auto-start",
|
|
246
246
|
"auto-end",
|
|
@@ -257,10 +257,10 @@ const O = {
|
|
|
257
257
|
"left-start",
|
|
258
258
|
"left-end"
|
|
259
259
|
];
|
|
260
|
-
function
|
|
260
|
+
function Ne(t) {
|
|
261
261
|
t != null && t.closest("svg") || ne(J.NotContainedInSvg);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const Ft = {
|
|
264
264
|
/** Displays a line for each tick. */
|
|
265
265
|
gridLines: !1,
|
|
266
266
|
/** Displays the axis title. */
|
|
@@ -277,36 +277,36 @@ const Bt = {
|
|
|
277
277
|
/** Space between the tick label and the axis line. */
|
|
278
278
|
tickPadding: 12
|
|
279
279
|
}, En = {
|
|
280
|
-
...
|
|
280
|
+
...Ft,
|
|
281
281
|
withTitle: !1,
|
|
282
282
|
skip: !0
|
|
283
283
|
}, $n = {
|
|
284
|
-
...
|
|
284
|
+
...Ft,
|
|
285
285
|
gridLines: !0
|
|
286
286
|
}, wn = function(t, e, r) {
|
|
287
|
-
const n =
|
|
288
|
-
function a(
|
|
287
|
+
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
288
|
+
function a(u, c) {
|
|
289
289
|
return {
|
|
290
|
-
transform: `translate(${(t.value(c) ?? t.value(
|
|
290
|
+
transform: `translate(${(t.value(c) ?? t.value(u)) - n.value}, 0)`
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function o(
|
|
293
|
+
function o(u) {
|
|
294
294
|
var s;
|
|
295
295
|
const c = Math.max(
|
|
296
296
|
t.value.step(),
|
|
297
|
-
(
|
|
297
|
+
(u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : t.value.step()) + 20
|
|
298
298
|
);
|
|
299
299
|
return {
|
|
300
300
|
x: -(c - t.value.step()) / 2,
|
|
301
301
|
width: c,
|
|
302
|
-
height: r.value.tickPadding + Ct +
|
|
302
|
+
height: r.value.tickPadding + Ct + be
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const
|
|
305
|
+
function l() {
|
|
306
|
+
const u = t.value.step() / 2;
|
|
307
307
|
return {
|
|
308
|
-
x1:
|
|
309
|
-
x2:
|
|
308
|
+
x1: u,
|
|
309
|
+
x2: u,
|
|
310
310
|
y1: -e.value.height
|
|
311
311
|
// Negative height means it goes from bottom to top
|
|
312
312
|
};
|
|
@@ -320,32 +320,32 @@ const Bt = {
|
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
323
|
-
getGridLinesAttributes:
|
|
323
|
+
getGridLinesAttributes: l,
|
|
324
324
|
getTickGhostAttributes: o,
|
|
325
325
|
getTickGroupAttributes: a,
|
|
326
326
|
getTickLabelAttributes: i
|
|
327
327
|
};
|
|
328
328
|
}, Dn = function(t, e, r) {
|
|
329
|
-
const n =
|
|
330
|
-
function a(
|
|
329
|
+
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
330
|
+
function a(u, c) {
|
|
331
331
|
return {
|
|
332
|
-
transform: `translate(0, ${(t.value(c) ?? t.value(
|
|
332
|
+
transform: `translate(0, ${(t.value(c) ?? t.value(u)) - n.value})`
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function o(
|
|
335
|
+
function o(u) {
|
|
336
336
|
var s;
|
|
337
|
-
const c = (
|
|
337
|
+
const c = (u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : 42) + r.value.tickPadding + be;
|
|
338
338
|
return {
|
|
339
339
|
x: -c,
|
|
340
340
|
width: c,
|
|
341
341
|
height: t.value.step()
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
const
|
|
344
|
+
function l() {
|
|
345
|
+
const u = t.value.step() / 2;
|
|
346
346
|
return {
|
|
347
|
-
y1:
|
|
348
|
-
y2:
|
|
347
|
+
y1: u,
|
|
348
|
+
y2: u,
|
|
349
349
|
x1: e.value.width
|
|
350
350
|
};
|
|
351
351
|
}
|
|
@@ -358,29 +358,29 @@ const Bt = {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
return {
|
|
361
|
-
getGridLinesAttributes:
|
|
361
|
+
getGridLinesAttributes: l,
|
|
362
362
|
getTickGhostAttributes: o,
|
|
363
363
|
getTickGroupAttributes: a,
|
|
364
364
|
getTickLabelAttributes: i
|
|
365
365
|
};
|
|
366
366
|
}, Hn = function(t, e, r) {
|
|
367
|
-
const n =
|
|
368
|
-
const
|
|
369
|
-
return
|
|
367
|
+
const n = v(() => {
|
|
368
|
+
const u = t.value.ticks();
|
|
369
|
+
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
370
370
|
});
|
|
371
|
-
function a(
|
|
371
|
+
function a(u) {
|
|
372
372
|
return {
|
|
373
|
-
transform: `translate(${t.value(
|
|
373
|
+
transform: `translate(${t.value(u)}, 0)`
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function o() {
|
|
377
377
|
return {
|
|
378
|
-
height: r.value.tickPadding + Ct +
|
|
378
|
+
height: r.value.tickPadding + Ct + be,
|
|
379
379
|
width: n.value,
|
|
380
380
|
x: -(n.value / 2)
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function l() {
|
|
384
384
|
return {
|
|
385
385
|
y1: -e.value.height
|
|
386
386
|
};
|
|
@@ -393,24 +393,24 @@ const Bt = {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
return {
|
|
396
|
-
getGridLinesAttributes:
|
|
396
|
+
getGridLinesAttributes: l,
|
|
397
397
|
getTickGhostAttributes: o,
|
|
398
398
|
getTickGroupAttributes: a,
|
|
399
399
|
getTickLabelAttributes: i
|
|
400
400
|
};
|
|
401
401
|
}, Sn = function(t, e, r) {
|
|
402
|
-
const n =
|
|
403
|
-
const
|
|
404
|
-
return
|
|
402
|
+
const n = v(() => {
|
|
403
|
+
const u = t.value.ticks();
|
|
404
|
+
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
405
405
|
});
|
|
406
|
-
function a(
|
|
406
|
+
function a(u) {
|
|
407
407
|
return {
|
|
408
|
-
transform: `translate(0, ${t.value(
|
|
408
|
+
transform: `translate(0, ${t.value(u)})`
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function o(
|
|
411
|
+
function o(u) {
|
|
412
412
|
var s;
|
|
413
|
-
const c = (((s =
|
|
413
|
+
const c = (((s = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : s.call(u)) || 0) + r.value.tickPadding + be;
|
|
414
414
|
return {
|
|
415
415
|
width: c,
|
|
416
416
|
height: n.value,
|
|
@@ -418,7 +418,7 @@ const Bt = {
|
|
|
418
418
|
y: -(n.value / 2)
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function l() {
|
|
422
422
|
return {
|
|
423
423
|
x1: e.value.width
|
|
424
424
|
};
|
|
@@ -431,7 +431,7 @@ const Bt = {
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
return {
|
|
434
|
-
getGridLinesAttributes:
|
|
434
|
+
getGridLinesAttributes: l,
|
|
435
435
|
getTickGhostAttributes: o,
|
|
436
436
|
getTickGroupAttributes: a,
|
|
437
437
|
getTickLabelAttributes: i
|
|
@@ -442,8 +442,8 @@ const Bt = {
|
|
|
442
442
|
"x-linear-scale-axis": Hn,
|
|
443
443
|
"y-linear-scale-axis": Sn
|
|
444
444
|
};
|
|
445
|
-
var Fe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Fe || {}), Ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ge || {}),
|
|
446
|
-
const Rn = /* @__PURE__ */
|
|
445
|
+
var Fe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Fe || {}), Ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ge || {}), Le = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(Le || {});
|
|
446
|
+
const Rn = /* @__PURE__ */ R({
|
|
447
447
|
__name: "lume-axis",
|
|
448
448
|
props: {
|
|
449
449
|
scale: {
|
|
@@ -453,7 +453,7 @@ const Rn = /* @__PURE__ */ P({
|
|
|
453
453
|
type: {
|
|
454
454
|
type: String,
|
|
455
455
|
default: void 0,
|
|
456
|
-
validator: (t) => t in
|
|
456
|
+
validator: (t) => t in Le
|
|
457
457
|
},
|
|
458
458
|
position: {
|
|
459
459
|
type: String,
|
|
@@ -472,77 +472,77 @@ const Rn = /* @__PURE__ */ P({
|
|
|
472
472
|
type: String,
|
|
473
473
|
default: O.VERTICAL
|
|
474
474
|
},
|
|
475
|
-
...
|
|
475
|
+
...ye()
|
|
476
476
|
},
|
|
477
477
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
478
478
|
setup(t, { emit: e }) {
|
|
479
|
-
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex:
|
|
480
|
-
() => r.type ?
|
|
481
|
-
), _ =
|
|
479
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = V(r), c = Oe("isEmpty", I(!1)), s = Ie({}), f = I(null), m = I(null), h = I(null), g = v(
|
|
480
|
+
() => r.type ? Le[r.type] : r.position
|
|
481
|
+
), _ = v(
|
|
482
482
|
() => r.type || (g.value === "left" ? "y" : "x")
|
|
483
|
-
), x =
|
|
484
|
-
() => _.value === "x" &&
|
|
483
|
+
), x = v(
|
|
484
|
+
() => _.value === "x" && u.value === O.VERTICAL || _.value === "y" && u.value === O.HORIZONTAL
|
|
485
485
|
), { allOptions: d } = Q(
|
|
486
486
|
i,
|
|
487
487
|
_.value === "x" ? En : $n
|
|
488
|
-
), { showTick: p } =
|
|
488
|
+
), { showTick: p } = An(a, f, d), y = v(
|
|
489
489
|
() => c.value || !a.value || _n(a.value)
|
|
490
|
-
),
|
|
491
|
-
var E, w,
|
|
492
|
-
return _.value === "y" && y.value ? `translate(0, ${((E = o.value) == null ? void 0 : E.height) / 2})` : _.value === "x" && y.value ? `translate(-${((w = o.value) == null ? void 0 : w.width) / 2}, ${(
|
|
493
|
-
}),
|
|
490
|
+
), k = v(() => {
|
|
491
|
+
var E, w, P, te;
|
|
492
|
+
return _.value === "y" && y.value ? `translate(0, ${((E = o.value) == null ? void 0 : E.height) / 2})` : _.value === "x" && y.value ? `translate(-${((w = o.value) == null ? void 0 : w.width) / 2}, ${(P = o.value) == null ? void 0 : P.height})` : `translate(0, ${_.value === "x" ? (te = o.value) == null ? void 0 : te.height : 0})`;
|
|
493
|
+
}), T = v(() => {
|
|
494
494
|
if (!a.value) return [];
|
|
495
495
|
if (K(a.value))
|
|
496
496
|
return a.value.labels || a.value.domain();
|
|
497
|
-
const { tickCount: E } = d.value, [w,
|
|
498
|
-
return tn(w,
|
|
499
|
-
}), N =
|
|
497
|
+
const { tickCount: E } = d.value, [w, P] = a.value.domain();
|
|
498
|
+
return tn(w, P, E);
|
|
499
|
+
}), N = v(() => {
|
|
500
500
|
const { tickFormat: E } = d.value;
|
|
501
|
-
return
|
|
502
|
-
}),
|
|
503
|
-
() => d.value.withHover && x.value &&
|
|
504
|
-
),
|
|
505
|
-
() => d.value.tickPadding +
|
|
506
|
-
),
|
|
501
|
+
return Te(E);
|
|
502
|
+
}), A = v(
|
|
503
|
+
() => d.value.withHover && x.value && l.value > -1
|
|
504
|
+
), D = v(
|
|
505
|
+
() => d.value.tickPadding + be || n
|
|
506
|
+
), C = v(() => _.value === "x" ? (
|
|
507
507
|
// If x axis, get the tick height
|
|
508
508
|
Math.max(
|
|
509
|
-
...(
|
|
509
|
+
...(f.value || []).map(
|
|
510
510
|
(E) => {
|
|
511
|
-
var w,
|
|
512
|
-
return ((
|
|
511
|
+
var w, P;
|
|
512
|
+
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).height) + D.value;
|
|
513
513
|
}
|
|
514
514
|
)
|
|
515
515
|
)
|
|
516
516
|
) : (
|
|
517
517
|
// If y axis, get the tick width
|
|
518
518
|
Math.max(
|
|
519
|
-
...(
|
|
519
|
+
...(f.value || []).map(
|
|
520
520
|
(E) => {
|
|
521
|
-
var w,
|
|
522
|
-
return ((
|
|
521
|
+
var w, P;
|
|
522
|
+
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).width) + D.value;
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
525
|
)
|
|
526
526
|
));
|
|
527
|
-
function
|
|
527
|
+
function M(E) {
|
|
528
528
|
const { showTicks: w } = d.value;
|
|
529
529
|
return w === !1 ? "" : N.value(E);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
e("mouseenter", { index: x.value ? E : null, value: w, event:
|
|
531
|
+
function z(E, w, P) {
|
|
532
|
+
e("mouseenter", { index: x.value ? E : null, value: w, event: P });
|
|
533
533
|
}
|
|
534
|
-
function ee(E, w,
|
|
535
|
-
e("click", { index: E, value: w, event:
|
|
534
|
+
function ee(E, w, P) {
|
|
535
|
+
e("click", { index: E, value: w, event: P });
|
|
536
536
|
}
|
|
537
537
|
function ce(E) {
|
|
538
538
|
var w;
|
|
539
|
-
if (!(!
|
|
540
|
-
return (w =
|
|
539
|
+
if (!(!f.value || !f.value.length))
|
|
540
|
+
return (w = f.value[E]) == null ? void 0 : w.ref;
|
|
541
541
|
}
|
|
542
542
|
function ae() {
|
|
543
|
-
h.value =
|
|
543
|
+
h.value = T.value.map(
|
|
544
544
|
(E, w) => ({
|
|
545
|
-
value:
|
|
545
|
+
value: M(E),
|
|
546
546
|
group: s.getTickGroupAttributes(E, w),
|
|
547
547
|
ghost: s.getTickGhostAttributes(ce(w)),
|
|
548
548
|
label: s.getTickLabelAttributes(),
|
|
@@ -553,27 +553,27 @@ const Rn = /* @__PURE__ */ P({
|
|
|
553
553
|
function oe() {
|
|
554
554
|
h.value && h.value.map((E) => (E.gridline = s.getGridLinesAttributes(), E));
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function le() {
|
|
557
557
|
if (!a.value) return;
|
|
558
558
|
const E = a.value.step ? "bandScale" : "linearScale", w = Pn[`${_.value}-${Fe[E]}`];
|
|
559
559
|
Object.entries(w(a, o, d) || []).forEach(
|
|
560
|
-
([
|
|
561
|
-
s[
|
|
560
|
+
([P, te]) => {
|
|
561
|
+
s[P] = te;
|
|
562
562
|
}
|
|
563
563
|
);
|
|
564
564
|
}
|
|
565
|
-
return H(a,
|
|
565
|
+
return H(a, le, { flush: "sync", immediate: !0 }), H(a, ae, { immediate: !0 }), H(f, ae), H(C, (E) => e("lume__internal--axis-size", E)), H(r.containerSize, oe), re(() => Ne(m.value)), { __sfc: !0, SCALE_MIXIN_MAP: Fe, POSITIONS: Ge, TYPES: Le, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: s, tickRefs: f, root: m, ticksWithAttributes: h, computedPosition: g, computedType: _, shouldHover: x, allOptions: d, showTick: p, alignAxisBaseline: y, axisTransform: k, ticks: T, tickFormatter: N, isHovering: A, axisLabelOffset: D, axisSize: C, formatTick: M, handleTickMouseenter: z, handleTickClick: ee, getTextNode: ce, setTicks: ae, updateGridlines: oe, init: le, LumeTick: dn };
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
|
-
var
|
|
568
|
+
var Bn = function() {
|
|
569
569
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
570
570
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
|
|
571
571
|
return n.emit("mouseleave", a);
|
|
572
572
|
} } }, [n.computedType === "x" ? r("defs", [r("linearGradient", { attrs: { id: "lume-tick-gradient" } }, [r("stop", { attrs: { offset: "0%", "stop-color": "rgba(255,255,255,0)" } }), r("stop", { attrs: { offset: "10%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "90%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "100%", "stop-color": "rgba(255,255,255,0)" } })], 1)], 1) : e._e(), e._l(n.ticksWithAttributes, function(a, o) {
|
|
573
|
-
return r(n.LumeTick, e._b({ key: `${a.value}_${o}`, ref: "tickRefs", refInFor: !0, attrs: { "is-hidden": n.allOptions.skip && !n.showTick(o), "with-gridlines": n.allOptions.gridLines }, on: { mouseenter: function(
|
|
574
|
-
return n.handleTickMouseenter(o, a.value,
|
|
575
|
-
}, click: function(
|
|
576
|
-
return n.handleTickClick(o, a.value,
|
|
573
|
+
return r(n.LumeTick, e._b({ key: `${a.value}_${o}`, ref: "tickRefs", refInFor: !0, attrs: { "is-hidden": n.allOptions.skip && !n.showTick(o), "with-gridlines": n.allOptions.gridLines }, on: { mouseenter: function(l) {
|
|
574
|
+
return n.handleTickMouseenter(o, a.value, l);
|
|
575
|
+
}, click: function(l) {
|
|
576
|
+
return n.handleTickClick(o, a.value, l);
|
|
577
577
|
} } }, "lume-tick", a, !1));
|
|
578
578
|
}), n.isHovering ? r(n.LumeTick, e._b({ attrs: { "with-gridlines": !1, "is-hovered": "" }, on: { click: function(a) {
|
|
579
579
|
return n.handleTickClick(
|
|
@@ -582,34 +582,34 @@ var Cn = function() {
|
|
|
582
582
|
a
|
|
583
583
|
);
|
|
584
584
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
585
|
-
},
|
|
585
|
+
}, Cn = [], Fn = /* @__PURE__ */ S(
|
|
586
586
|
Rn,
|
|
587
|
-
Cn,
|
|
588
587
|
Bn,
|
|
588
|
+
Cn,
|
|
589
589
|
!1,
|
|
590
590
|
null,
|
|
591
591
|
null
|
|
592
592
|
);
|
|
593
593
|
const Gn = Fn.exports;
|
|
594
594
|
function jn(t, e, r, n) {
|
|
595
|
-
const a =
|
|
595
|
+
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
596
596
|
() => n.value > 0 && n.value < 1
|
|
597
|
-
),
|
|
597
|
+
), l = v(
|
|
598
598
|
() => a.value ? t.value - 0.5 : t.value
|
|
599
599
|
// draws the 1px bar closer to the axis
|
|
600
|
-
), i =
|
|
600
|
+
), i = v(
|
|
601
601
|
() => o.value ? e.value - 0.5 : e.value
|
|
602
602
|
// draws the 1px bar closer to the axis
|
|
603
603
|
);
|
|
604
|
-
return { computedX:
|
|
604
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
605
605
|
}
|
|
606
606
|
function Vn(t, e, r, n) {
|
|
607
|
-
const a = I(0), o = I(0),
|
|
607
|
+
const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
608
608
|
return re(() => {
|
|
609
609
|
a.value = r.value, o.value = n.value;
|
|
610
|
-
}), H(r, (i) => a.value = i), H(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin:
|
|
610
|
+
}), H(r, (i) => a.value = i), H(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
611
611
|
}
|
|
612
|
-
const Mn = /* @__PURE__ */
|
|
612
|
+
const Mn = /* @__PURE__ */ R({
|
|
613
613
|
__name: "lume-bar",
|
|
614
614
|
props: {
|
|
615
615
|
x: {
|
|
@@ -647,10 +647,10 @@ const Mn = /* @__PURE__ */ P({
|
|
|
647
647
|
},
|
|
648
648
|
emits: ["click", "mouseover", "mouseleave"],
|
|
649
649
|
setup(t, { emit: e }) {
|
|
650
|
-
const r = t, { x: n, y: a, width: o, height:
|
|
651
|
-
() => typeof
|
|
652
|
-
),
|
|
653
|
-
return re(() =>
|
|
650
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = V(r), c = I(null), s = v(
|
|
651
|
+
() => typeof u.value == "string" ? [u.value] : u.value
|
|
652
|
+
), f = v(() => i.value === "width"), m = v(() => i.value === "height"), h = Vn(n, a, o, l), { computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d } = jn(n, a, o, l), p = v(() => x.value ? 1 : (f.value ? h.computedWidth : o).value), y = v(() => d.value ? 1 : (m.value ? h.computedHeight : l).value), k = f.value || m.value ? h.transformOrigin : null;
|
|
653
|
+
return re(() => Ne(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: s, shouldTransitionWidth: f, shouldTransitionHeight: m, transitionProps: h, computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d, computedWidth: p, computedHeight: y, transformOrigin: k };
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
656
|
var zn = function() {
|
|
@@ -679,25 +679,25 @@ var zn = function() {
|
|
|
679
679
|
"8e8f732a"
|
|
680
680
|
);
|
|
681
681
|
const Qe = Un.exports;
|
|
682
|
-
var
|
|
683
|
-
const Zn =
|
|
682
|
+
var ue = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(ue || {}), Y = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(Y || {}), Gt = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(Gt || {}), qe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(qe || {}), et = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(tt || {});
|
|
683
|
+
const Zn = ue.Categorical, ke = Y.Skyblue, Xn = qe.SkyTeal;
|
|
684
684
|
function Yn(t) {
|
|
685
|
-
return t ===
|
|
685
|
+
return t === ue.Divergent ? Xn : ke;
|
|
686
686
|
}
|
|
687
687
|
function Kn(t) {
|
|
688
688
|
return Object.values(tt).includes(t);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
return e ===
|
|
692
|
-
...
|
|
693
|
-
...
|
|
690
|
+
function ct(t, e) {
|
|
691
|
+
return e === ue.Divergent ? Object.values(qe).includes(t) : Object.values({
|
|
692
|
+
...Y,
|
|
693
|
+
...Gt,
|
|
694
694
|
...et,
|
|
695
695
|
...tt
|
|
696
696
|
}).includes(t);
|
|
697
697
|
}
|
|
698
698
|
function Jn(t, e) {
|
|
699
|
-
const r = Object.values(
|
|
700
|
-
return kn(Object.values(
|
|
699
|
+
const r = Object.values(Y).indexOf(t);
|
|
700
|
+
return kn(Object.values(Y), r > -1 ? r : 0)[e];
|
|
701
701
|
}
|
|
702
702
|
function Qn(t, e) {
|
|
703
703
|
const r = 50 + e * 10;
|
|
@@ -707,19 +707,19 @@ function qn(t, e) {
|
|
|
707
707
|
const r = (e + 1) * 10;
|
|
708
708
|
return `${t}-${r}`;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function dt(t, e, r) {
|
|
711
711
|
switch (e) {
|
|
712
712
|
default:
|
|
713
|
-
case
|
|
713
|
+
case ue.Categorical:
|
|
714
714
|
return Kn(t) ? t : Jn(t, r);
|
|
715
|
-
case
|
|
715
|
+
case ue.Sequential:
|
|
716
716
|
return Qn(t, r);
|
|
717
|
-
case
|
|
717
|
+
case ue.Divergent:
|
|
718
718
|
return qn(t, r);
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
function er(t, e, r = Zn, n) {
|
|
722
|
-
return
|
|
722
|
+
return ct(t, r) ? t : (n > 4 && (ne(J.ColorLoop), n = n % 5), ct(e, r) ? dt(e, r, n) : dt(Yn(r), r, n));
|
|
723
723
|
}
|
|
724
724
|
function tr(t) {
|
|
725
725
|
return t.map((e) => pn(e) ? e : { value: e });
|
|
@@ -739,7 +739,7 @@ const nt = (t = null) => ({
|
|
|
739
739
|
},
|
|
740
740
|
color: {
|
|
741
741
|
type: String,
|
|
742
|
-
default:
|
|
742
|
+
default: Y.Skyblue
|
|
743
743
|
},
|
|
744
744
|
title: {
|
|
745
745
|
type: String,
|
|
@@ -747,36 +747,36 @@ const nt = (t = null) => ({
|
|
|
747
747
|
}
|
|
748
748
|
});
|
|
749
749
|
function rt(t, e, r, n, a) {
|
|
750
|
-
const o =
|
|
750
|
+
const o = Ie({
|
|
751
751
|
width: 0,
|
|
752
752
|
height: 0
|
|
753
|
-
}),
|
|
753
|
+
}), l = crypto.randomUUID(), i = v(() => {
|
|
754
754
|
var s;
|
|
755
755
|
return t.value.length > 5 && ne(J.DatasetLength), (s = t.value) == null ? void 0 : s.map(
|
|
756
|
-
(
|
|
757
|
-
if (nr(
|
|
758
|
-
const h = tr(
|
|
759
|
-
|
|
756
|
+
(f, m) => {
|
|
757
|
+
if (nr(f)) return f;
|
|
758
|
+
const h = tr(f.values), g = er(
|
|
759
|
+
f.color,
|
|
760
760
|
r == null ? void 0 : r.value,
|
|
761
761
|
n == null ? void 0 : n.value.colorPalette,
|
|
762
762
|
m
|
|
763
763
|
);
|
|
764
764
|
return {
|
|
765
|
-
...
|
|
765
|
+
...f,
|
|
766
766
|
values: h,
|
|
767
767
|
color: g,
|
|
768
768
|
__internal: !0
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
}),
|
|
772
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : St(t.value).map((s, f) => f));
|
|
773
773
|
function c(s) {
|
|
774
|
-
const
|
|
775
|
-
o.width = s.width, o.height =
|
|
774
|
+
const f = (a == null ? void 0 : a.value) === O.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || st) * 2) + ((n == null ? void 0 : n.value.barHeight) || st) || s.height;
|
|
775
|
+
o.width = s.width, o.height = f;
|
|
776
776
|
}
|
|
777
777
|
return {
|
|
778
|
-
chartID:
|
|
779
|
-
computedLabels:
|
|
778
|
+
chartID: l,
|
|
779
|
+
computedLabels: u,
|
|
780
780
|
containerSize: o,
|
|
781
781
|
internalData: i,
|
|
782
782
|
updateSize: c
|
|
@@ -793,72 +793,72 @@ const rr = () => ({
|
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
795
|
function ar(t, e, r, n, a) {
|
|
796
|
-
const o = I(null),
|
|
796
|
+
const o = I(null), l = I(null);
|
|
797
797
|
function i() {
|
|
798
|
-
var s,
|
|
799
|
-
const { width:
|
|
800
|
-
!
|
|
798
|
+
var s, f, m, h;
|
|
799
|
+
const { width: u, height: c } = r;
|
|
800
|
+
!u && !c || (n.value === O.HORIZONTAL ? (o.value = (s = t.value) != null && s.length ? ft(
|
|
801
801
|
t.value,
|
|
802
|
-
|
|
802
|
+
u,
|
|
803
803
|
n.value,
|
|
804
804
|
a.value.startOnZero
|
|
805
|
-
) : null,
|
|
805
|
+
) : null, l.value = (f = e.value) != null && f.length ? vt(
|
|
806
806
|
e.value,
|
|
807
807
|
c,
|
|
808
808
|
n.value,
|
|
809
809
|
a.value
|
|
810
|
-
) : null) : (o.value = (m = e.value) != null && m.length ?
|
|
810
|
+
) : null) : (o.value = (m = e.value) != null && m.length ? vt(
|
|
811
811
|
e.value,
|
|
812
|
-
|
|
812
|
+
u,
|
|
813
813
|
n.value,
|
|
814
814
|
a.value
|
|
815
|
-
) : null,
|
|
815
|
+
) : null, l.value = (h = t.value) != null && h.length ? ft(
|
|
816
816
|
t.value,
|
|
817
817
|
c,
|
|
818
818
|
n.value,
|
|
819
819
|
a.value.startOnZero
|
|
820
820
|
) : null));
|
|
821
821
|
}
|
|
822
|
-
return
|
|
822
|
+
return Et(i), { xScale: o, yScale: l };
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
const a = [0, e], { padding: o, paddingInner:
|
|
824
|
+
function vt(t, e, r, n) {
|
|
825
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? Bt : Rt);
|
|
826
826
|
return Object.assign(
|
|
827
|
-
|
|
827
|
+
he().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, s) => s)),
|
|
828
828
|
{ labels: t }
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
const a =
|
|
831
|
+
function ft(t, e, r, n) {
|
|
832
|
+
const a = Dt(t).filter((s) => s != null), o = [0, e];
|
|
833
833
|
if (a.length === 0)
|
|
834
|
-
return
|
|
835
|
-
const
|
|
836
|
-
let
|
|
837
|
-
n &&
|
|
838
|
-
const c = r === O.HORIZONTAL ? [i,
|
|
839
|
-
return
|
|
840
|
-
}
|
|
841
|
-
function
|
|
834
|
+
return ge().range(o).domain([0, 0]).nice();
|
|
835
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l;
|
|
836
|
+
let u = Math.max(...a);
|
|
837
|
+
n && u < 0 && (u = 0);
|
|
838
|
+
const c = r === O.HORIZONTAL ? [i, u] : [u, i];
|
|
839
|
+
return ge().range(o).domain(c).nice();
|
|
840
|
+
}
|
|
841
|
+
function pt(t) {
|
|
842
842
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
843
843
|
}
|
|
844
844
|
function je(t, e) {
|
|
845
845
|
return K(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function mt(t, e, {
|
|
848
848
|
padding: r,
|
|
849
849
|
paddingInner: n,
|
|
850
850
|
paddingOuter: a
|
|
851
851
|
} = {}) {
|
|
852
|
-
const o = r ?? (e === O.HORIZONTAL ?
|
|
852
|
+
const o = r ?? (e === O.HORIZONTAL ? Bt : Rt);
|
|
853
853
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
854
854
|
}
|
|
855
855
|
function at(t) {
|
|
856
856
|
return Object.values(O).includes(t);
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const ve = (t, e = !0) => ({
|
|
859
859
|
...nt(t),
|
|
860
860
|
...rr(),
|
|
861
|
-
...
|
|
861
|
+
...ye(),
|
|
862
862
|
classList: {
|
|
863
863
|
type: [String, Array],
|
|
864
864
|
default: () => []
|
|
@@ -876,14 +876,14 @@ const fe = (t, e = !0) => ({
|
|
|
876
876
|
} : {}
|
|
877
877
|
}), or = (t) => ({
|
|
878
878
|
...nt(t),
|
|
879
|
-
...
|
|
879
|
+
...ye(),
|
|
880
880
|
hoveredElement: {
|
|
881
881
|
type: [Number, String],
|
|
882
882
|
default: null
|
|
883
883
|
}
|
|
884
884
|
});
|
|
885
|
-
function
|
|
886
|
-
const t = I(), e =
|
|
885
|
+
function lr() {
|
|
886
|
+
const t = I(), e = Ie({
|
|
887
887
|
dimensions: {}
|
|
888
888
|
}), r = new ResizeObserver((n) => {
|
|
889
889
|
n.forEach((a) => {
|
|
@@ -892,11 +892,11 @@ function ur() {
|
|
|
892
892
|
});
|
|
893
893
|
return re(() => {
|
|
894
894
|
r.observe(t.value);
|
|
895
|
-
}),
|
|
895
|
+
}), $t(() => {
|
|
896
896
|
r.unobserve(t.value);
|
|
897
897
|
}), { resizeState: e, resizeRef: t };
|
|
898
898
|
}
|
|
899
|
-
const
|
|
899
|
+
const ur = /* @__PURE__ */ R({
|
|
900
900
|
__name: "lume-chart-container",
|
|
901
901
|
props: {
|
|
902
902
|
margins: {
|
|
@@ -923,22 +923,22 @@ const lr = /* @__PURE__ */ P({
|
|
|
923
923
|
},
|
|
924
924
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
925
925
|
setup(t, { emit: e }) {
|
|
926
|
-
const r = t, { margins: n, containerSize: a } =
|
|
926
|
+
const r = t, { margins: n, containerSize: a } = V(r), o = I(null), { resizeRef: l, resizeState: i } = lr(), u = v(
|
|
927
927
|
() => a.value.height + n.value.top + n.value.bottom
|
|
928
928
|
);
|
|
929
|
-
return
|
|
929
|
+
return Et(() => {
|
|
930
930
|
if (!o.value) return;
|
|
931
931
|
const { width: c } = i.dimensions, { height: s } = o.value.getBoundingClientRect();
|
|
932
932
|
if (!c || r.orientation === O.VERTICAL && !s)
|
|
933
933
|
return;
|
|
934
|
-
const
|
|
935
|
-
width:
|
|
934
|
+
const f = c - n.value.left - n.value.right, m = s - n.value.top - n.value.bottom, h = {
|
|
935
|
+
width: f > 0 ? f : 0,
|
|
936
936
|
height: m > 0 ? m : 0,
|
|
937
937
|
outerWidth: c,
|
|
938
938
|
outerHeight: s
|
|
939
939
|
};
|
|
940
940
|
e("resize", h);
|
|
941
|
-
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef:
|
|
941
|
+
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
944
|
var ir = function() {
|
|
@@ -955,14 +955,14 @@ var ir = function() {
|
|
|
955
955
|
return n.emit("mouseleave", a);
|
|
956
956
|
} } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.margins.left}, ${n.margins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
|
|
957
957
|
}, sr = [], cr = /* @__PURE__ */ S(
|
|
958
|
-
|
|
958
|
+
ur,
|
|
959
959
|
ir,
|
|
960
960
|
sr,
|
|
961
961
|
!1,
|
|
962
962
|
null,
|
|
963
963
|
"d53cdc3e"
|
|
964
964
|
);
|
|
965
|
-
const dr = cr.exports, vr = /* @__PURE__ */
|
|
965
|
+
const dr = cr.exports, vr = /* @__PURE__ */ R({
|
|
966
966
|
__name: "lume-chart-legend",
|
|
967
967
|
props: {
|
|
968
968
|
data: {
|
|
@@ -981,10 +981,10 @@ var fr = function() {
|
|
|
981
981
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
982
982
|
return n.emit("mouseleave");
|
|
983
983
|
} } }, e._l(e.data, function(a, o) {
|
|
984
|
-
return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--caption", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(
|
|
985
|
-
return n.emit("click", { index: o, dataset: a, event:
|
|
986
|
-
}, mouseenter: function(
|
|
987
|
-
return n.emit("mouseenter", { index: o, dataset: a, event:
|
|
984
|
+
return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--caption", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(l) {
|
|
985
|
+
return n.emit("click", { index: o, dataset: a, event: l });
|
|
986
|
+
}, mouseenter: function(l) {
|
|
987
|
+
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
988
988
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
989
989
|
}), 0);
|
|
990
990
|
}, pr = [], mr = /* @__PURE__ */ S(
|
|
@@ -1011,15 +1011,15 @@ const kr = br.exports, xr = {};
|
|
|
1011
1011
|
var Lr = function() {
|
|
1012
1012
|
var e = this, r = e._self._c;
|
|
1013
1013
|
return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
|
|
1014
|
-
},
|
|
1014
|
+
}, Tr = [], Ar = /* @__PURE__ */ S(
|
|
1015
1015
|
xr,
|
|
1016
1016
|
Lr,
|
|
1017
|
-
|
|
1017
|
+
Tr,
|
|
1018
1018
|
!1,
|
|
1019
1019
|
null,
|
|
1020
1020
|
"4ed7ec1b"
|
|
1021
1021
|
);
|
|
1022
|
-
const Or =
|
|
1022
|
+
const Or = Ar.exports, Ir = /* @__PURE__ */ R({
|
|
1023
1023
|
__name: "lume-tooltip-item",
|
|
1024
1024
|
props: {
|
|
1025
1025
|
color: {
|
|
@@ -1042,7 +1042,7 @@ var Nr = function() {
|
|
|
1042
1042
|
null,
|
|
1043
1043
|
"4f995c3c"
|
|
1044
1044
|
);
|
|
1045
|
-
const wr = $r.exports, Dr = /* @__PURE__ */
|
|
1045
|
+
const wr = $r.exports, Dr = /* @__PURE__ */ R({
|
|
1046
1046
|
__name: "lume-tooltip",
|
|
1047
1047
|
props: {
|
|
1048
1048
|
opened: {
|
|
@@ -1082,15 +1082,15 @@ const wr = $r.exports, Dr = /* @__PURE__ */ P({
|
|
|
1082
1082
|
type: String,
|
|
1083
1083
|
default: null
|
|
1084
1084
|
},
|
|
1085
|
-
...
|
|
1085
|
+
...ye()
|
|
1086
1086
|
},
|
|
1087
1087
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1088
1088
|
setup(t, { emit: e }) {
|
|
1089
|
-
const r = t, n = I(null), { items: a, options: o } =
|
|
1090
|
-
() =>
|
|
1091
|
-
), s =
|
|
1089
|
+
const r = t, n = I(null), { items: a, options: o } = V(r), l = X(), i = I(null), { allOptions: u } = Q(o), c = v(
|
|
1090
|
+
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
1091
|
+
), s = v(
|
|
1092
1092
|
() => c.value ? "fixed" : "absolute"
|
|
1093
|
-
),
|
|
1093
|
+
), f = v(() => [
|
|
1094
1094
|
{
|
|
1095
1095
|
name: "computeStyles",
|
|
1096
1096
|
options: {
|
|
@@ -1100,40 +1100,40 @@ const wr = $r.exports, Dr = /* @__PURE__ */ P({
|
|
|
1100
1100
|
},
|
|
1101
1101
|
{
|
|
1102
1102
|
name: "offset",
|
|
1103
|
-
options: { offset: [0,
|
|
1103
|
+
options: { offset: [0, u.value.offset || 8] }
|
|
1104
1104
|
},
|
|
1105
1105
|
...r.modifiers || []
|
|
1106
|
-
]), m =
|
|
1107
|
-
() =>
|
|
1108
|
-
), h =
|
|
1106
|
+
]), m = v(
|
|
1107
|
+
() => u.value.showTitle !== !1 && r.title != null
|
|
1108
|
+
), h = v(() => Te(u.value.valueFormat)), g = v(() => Te(u.value.titleFormat)), _ = v(
|
|
1109
1109
|
() => {
|
|
1110
|
-
var
|
|
1111
|
-
return ((
|
|
1112
|
-
label:
|
|
1110
|
+
var T;
|
|
1111
|
+
return ((T = a.value) == null ? void 0 : T.find((N) => N.isSummary)) || {
|
|
1112
|
+
label: u.value.summary ?? r.summary
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
), x =
|
|
1115
|
+
), x = v(() => l.summary || _.value.label), d = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
|
|
1116
1116
|
function p() {
|
|
1117
1117
|
r.targetElement && n.value && (i.value = on(r.targetElement, n.value, {
|
|
1118
1118
|
placement: r.position,
|
|
1119
1119
|
strategy: s.value,
|
|
1120
|
-
modifiers:
|
|
1120
|
+
modifiers: f.value
|
|
1121
1121
|
}), e("opened", r.targetElement));
|
|
1122
1122
|
}
|
|
1123
1123
|
function y() {
|
|
1124
1124
|
i.value && (i.value.destroy(), e("closed"), n.value && n.value.classList.remove("lume-tooltip--animated"));
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1127
|
-
i.value && (
|
|
1126
|
+
function k() {
|
|
1127
|
+
i.value && (u.value.withAnimation !== !1 && n.value && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? (function() {
|
|
1128
1128
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
1129
1129
|
})() : y());
|
|
1130
1130
|
}
|
|
1131
1131
|
return H(
|
|
1132
1132
|
() => r.targetElement,
|
|
1133
|
-
async (
|
|
1134
|
-
!N &&
|
|
1133
|
+
async (T, N) => {
|
|
1134
|
+
!N && T ? (await Be(), p()) : k();
|
|
1135
1135
|
}
|
|
1136
|
-
), re(p),
|
|
1136
|
+
), re(p), $t(y), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: s, allModifiers: f, showTitle: m, formatValue: h, formatTitle: g, summaryItem: _, hasSummary: x, computedItems: d, initPopper: p, destroyPopper: y, updatePopper: k, LumeTooltipTitle: kr, LumeTooltipSummary: Or, LumeTooltipItem: wr };
|
|
1137
1137
|
}
|
|
1138
1138
|
});
|
|
1139
1139
|
var Hr = function() {
|
|
@@ -1169,7 +1169,7 @@ var Hr = function() {
|
|
|
1169
1169
|
null,
|
|
1170
1170
|
"6f13599d"
|
|
1171
1171
|
);
|
|
1172
|
-
const Rr = Pr.exports,
|
|
1172
|
+
const Rr = Pr.exports, Ee = () => ({
|
|
1173
1173
|
data: {
|
|
1174
1174
|
type: Array,
|
|
1175
1175
|
required: !0
|
|
@@ -1211,10 +1211,10 @@ const Rr = Pr.exports, He = () => ({
|
|
|
1211
1211
|
type: [String, Array],
|
|
1212
1212
|
default: () => []
|
|
1213
1213
|
}
|
|
1214
|
-
}),
|
|
1214
|
+
}), Br = /* @__PURE__ */ R({
|
|
1215
1215
|
__name: "lume-overlay-group",
|
|
1216
1216
|
props: {
|
|
1217
|
-
...
|
|
1217
|
+
...Ee(),
|
|
1218
1218
|
orientation: {
|
|
1219
1219
|
type: String,
|
|
1220
1220
|
default: O.VERTICAL
|
|
@@ -1222,35 +1222,35 @@ const Rr = Pr.exports, He = () => ({
|
|
|
1222
1222
|
},
|
|
1223
1223
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1224
1224
|
setup(t, { emit: e }) {
|
|
1225
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale:
|
|
1226
|
-
function
|
|
1225
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = V(r), i = v(() => St(n));
|
|
1226
|
+
function u(c) {
|
|
1227
1227
|
var x;
|
|
1228
|
-
const s = a.value === O.HORIZONTAL ?
|
|
1228
|
+
const s = a.value === O.HORIZONTAL ? l.value : o.value, f = s.domain(), m = mn(s), h = ((x = s.paddingInner) == null ? void 0 : x.call(s)) ?? 0, g = m * h, _ = K(s) ? s(f[c]) - g / 2 : s(c) - m / 2;
|
|
1229
1229
|
return a.value === O.HORIZONTAL ? {
|
|
1230
1230
|
width: Math.max(...o.value.range()),
|
|
1231
1231
|
height: m,
|
|
1232
1232
|
transform: `translate(0, ${_})`
|
|
1233
1233
|
} : {
|
|
1234
1234
|
width: m,
|
|
1235
|
-
height: Math.max(...
|
|
1235
|
+
height: Math.max(...l.value.range()),
|
|
1236
1236
|
transform: `translate(${_}, 0)`
|
|
1237
1237
|
};
|
|
1238
1238
|
}
|
|
1239
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale:
|
|
1239
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Qe };
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
1242
|
-
var
|
|
1242
|
+
var Cr = function() {
|
|
1243
1243
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1244
1244
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1245
|
-
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(
|
|
1245
|
+
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
1246
1246
|
return n.emit("lume__internal--hover", o);
|
|
1247
|
-
}, click: function(
|
|
1248
|
-
return n.emit("click", { index: o, event:
|
|
1247
|
+
}, click: function(l) {
|
|
1248
|
+
return n.emit("click", { index: o, event: l });
|
|
1249
1249
|
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1250
1250
|
}), 1);
|
|
1251
1251
|
}, Fr = [], Gr = /* @__PURE__ */ S(
|
|
1252
|
-
Cr,
|
|
1253
1252
|
Br,
|
|
1253
|
+
Cr,
|
|
1254
1254
|
Fr,
|
|
1255
1255
|
!1,
|
|
1256
1256
|
null,
|
|
@@ -1285,47 +1285,47 @@ const jr = Gr.exports, Vr = [
|
|
|
1285
1285
|
"hovered-index-changed",
|
|
1286
1286
|
"update:hoveredIndex"
|
|
1287
1287
|
], q = (t, e) => {
|
|
1288
|
-
function r(o, ...
|
|
1288
|
+
function r(o, ...l) {
|
|
1289
1289
|
document.dispatchEvent(
|
|
1290
1290
|
new CustomEvent(`${e}_${o}`, {
|
|
1291
|
-
detail: [...
|
|
1291
|
+
detail: [...l]
|
|
1292
1292
|
})
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
|
-
function n(o,
|
|
1295
|
+
function n(o, l) {
|
|
1296
1296
|
document.addEventListener(
|
|
1297
1297
|
`${e}_${o}`,
|
|
1298
|
-
(i) =>
|
|
1298
|
+
(i) => l(...i.detail)
|
|
1299
1299
|
);
|
|
1300
1300
|
}
|
|
1301
|
-
return { componentEventPropagator: Vr.reduce((o,
|
|
1301
|
+
return { componentEventPropagator: Vr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1302
1302
|
};
|
|
1303
1303
|
function Mr(t) {
|
|
1304
|
-
return { hasNegativeValues:
|
|
1305
|
-
() =>
|
|
1304
|
+
return { hasNegativeValues: v(
|
|
1305
|
+
() => Dt(t.value).some((r) => r < 0)
|
|
1306
1306
|
) };
|
|
1307
1307
|
}
|
|
1308
1308
|
function zr(t, e, r, n) {
|
|
1309
|
-
const a =
|
|
1309
|
+
const a = v(
|
|
1310
1310
|
() => n.value === O.HORIZONTAL
|
|
1311
|
-
), o =
|
|
1311
|
+
), o = v(
|
|
1312
1312
|
() => {
|
|
1313
1313
|
var c;
|
|
1314
1314
|
return t.height - (a != null && a.value ? 0 : ((c = r.value) == null ? void 0 : c.call(r, 0)) || 0);
|
|
1315
1315
|
}
|
|
1316
|
-
),
|
|
1316
|
+
), l = v(
|
|
1317
1317
|
() => {
|
|
1318
1318
|
var c;
|
|
1319
1319
|
return a != null && a.value ? ((c = e.value) == null ? void 0 : c.call(e, 0)) || 0 : t.width;
|
|
1320
1320
|
}
|
|
1321
|
-
), i =
|
|
1321
|
+
), i = v(
|
|
1322
1322
|
() => {
|
|
1323
1323
|
var c;
|
|
1324
1324
|
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c = r.value) == null ? void 0 : c.call(r, 0)) || 0})`;
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
1327
|
-
return { negativeBarAttributes:
|
|
1328
|
-
width:
|
|
1327
|
+
return { negativeBarAttributes: v(() => ({
|
|
1328
|
+
width: l.value,
|
|
1329
1329
|
height: o.value,
|
|
1330
1330
|
transform: i.value
|
|
1331
1331
|
})) };
|
|
@@ -1338,16 +1338,16 @@ function Wr(t, e) {
|
|
|
1338
1338
|
function Ur(t, e) {
|
|
1339
1339
|
return t.reduce((r, n) => Je(n.values, e).map(
|
|
1340
1340
|
(a, o) => {
|
|
1341
|
-
const
|
|
1342
|
-
return r[o] ? r[o] +
|
|
1341
|
+
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1342
|
+
return r[o] ? r[o] + l : l;
|
|
1343
1343
|
}
|
|
1344
1344
|
), []);
|
|
1345
1345
|
}
|
|
1346
|
-
const
|
|
1346
|
+
const _t = {
|
|
1347
1347
|
"stacked-bar": Ur
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1350
|
-
const
|
|
1349
|
+
function jt(t, e, r, n, a, o, l, i) {
|
|
1350
|
+
const u = v(
|
|
1351
1351
|
() => {
|
|
1352
1352
|
var s;
|
|
1353
1353
|
return e.value.withTooltip !== !1 && !((s = e.value.tooltipOptions) != null && s.targetElement);
|
|
@@ -1355,10 +1355,10 @@ function Gt(t, e, r, n, a, o, u, i) {
|
|
|
1355
1355
|
);
|
|
1356
1356
|
function c(s) {
|
|
1357
1357
|
var h;
|
|
1358
|
-
const
|
|
1358
|
+
const f = ((h = a == null ? void 0 : a.value) == null ? void 0 : h.length) ?? 0, m = i != null && i.value && _t[i.value] ? _t[i.value](
|
|
1359
1359
|
s,
|
|
1360
|
-
|
|
1361
|
-
) : Wr(s,
|
|
1360
|
+
f
|
|
1361
|
+
) : Wr(s, f);
|
|
1362
1362
|
t.value = m.map((g, _) => ({
|
|
1363
1363
|
cx: (o == null ? void 0 : o.value) === O.HORIZONTAL ? r.value(g) : je(r.value, _),
|
|
1364
1364
|
cy: (o == null ? void 0 : o.value) === O.HORIZONTAL ? je(n.value, _) : n.value(g)
|
|
@@ -1367,13 +1367,13 @@ function Gt(t, e, r, n, a, o, u, i) {
|
|
|
1367
1367
|
return H(
|
|
1368
1368
|
[r, n],
|
|
1369
1369
|
() => {
|
|
1370
|
-
r.value && n.value && (
|
|
1370
|
+
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
1371
1371
|
},
|
|
1372
1372
|
{ immediate: !0 }
|
|
1373
|
-
), { shouldGenerateTooltipAnchors:
|
|
1373
|
+
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1374
1374
|
}
|
|
1375
1375
|
function Zr() {
|
|
1376
|
-
const t =
|
|
1376
|
+
const t = Ie({
|
|
1377
1377
|
opened: !1,
|
|
1378
1378
|
targetElement: null
|
|
1379
1379
|
});
|
|
@@ -1384,13 +1384,13 @@ function Zr() {
|
|
|
1384
1384
|
} };
|
|
1385
1385
|
}
|
|
1386
1386
|
function Xr(t) {
|
|
1387
|
-
return { getTooltipItems:
|
|
1387
|
+
return { getTooltipItems: v(
|
|
1388
1388
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1389
|
-
var
|
|
1389
|
+
var l, i, u;
|
|
1390
1390
|
return {
|
|
1391
|
-
color: ((
|
|
1391
|
+
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1392
1392
|
label: a,
|
|
1393
|
-
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((
|
|
1393
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? Pt
|
|
1394
1394
|
};
|
|
1395
1395
|
})
|
|
1396
1396
|
) };
|
|
@@ -1421,133 +1421,133 @@ function Jr(t, e) {
|
|
|
1421
1421
|
function Qr(t, e) {
|
|
1422
1422
|
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || We : t.left;
|
|
1423
1423
|
}
|
|
1424
|
-
const qr = /* @__PURE__ */
|
|
1424
|
+
const qr = /* @__PURE__ */ R({
|
|
1425
1425
|
__name: "lume-chart",
|
|
1426
1426
|
props: {
|
|
1427
|
-
...
|
|
1427
|
+
...ve(),
|
|
1428
1428
|
chartType: {
|
|
1429
1429
|
type: String,
|
|
1430
1430
|
default: null
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
1433
|
setup(t, { emit: e }) {
|
|
1434
|
-
const r = t, n =
|
|
1434
|
+
const r = t, n = X(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = V(r), s = I(-1), f = I(null), m = I(null), h = I([]), g = I(null), _ = I(0), x = I(0), { allOptions: d } = Q(i), { internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N } = rt(a, o, l, d, u), { listenInternalEvent: A } = q(e, N), { xScale: D, yScale: C } = ar(
|
|
1435
1435
|
p,
|
|
1436
1436
|
y,
|
|
1437
|
-
|
|
1438
|
-
|
|
1437
|
+
k,
|
|
1438
|
+
u,
|
|
1439
1439
|
d
|
|
1440
|
-
),
|
|
1440
|
+
), M = v(() => ({
|
|
1441
1441
|
top: Yr(d.value.margins),
|
|
1442
1442
|
right: Kr(d.value.margins),
|
|
1443
1443
|
bottom: Jr(d.value.margins, _.value),
|
|
1444
1444
|
left: Qr(d.value.margins, x.value)
|
|
1445
|
-
})),
|
|
1446
|
-
var
|
|
1447
|
-
return r.xScale ?
|
|
1448
|
-
}), ee =
|
|
1449
|
-
var
|
|
1450
|
-
return r.yScale ?
|
|
1451
|
-
}), ce =
|
|
1445
|
+
})), z = v(() => {
|
|
1446
|
+
var b;
|
|
1447
|
+
return r.xScale ? pt(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, p.value, o.value, k) : D.value;
|
|
1448
|
+
}), ee = v(() => {
|
|
1449
|
+
var b;
|
|
1450
|
+
return r.yScale ? pt(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, p.value, o.value, k) : C.value;
|
|
1451
|
+
}), ce = v(() => ({
|
|
1452
1452
|
...d.value.xAxisOptions,
|
|
1453
|
-
withHover:
|
|
1454
|
-
})), ae =
|
|
1453
|
+
withHover: u.value === O.VERTICAL
|
|
1454
|
+
})), ae = v(() => ({
|
|
1455
1455
|
...d.value.yAxisOptions,
|
|
1456
|
-
withHover:
|
|
1457
|
-
})), oe =
|
|
1458
|
-
var
|
|
1459
|
-
return (
|
|
1460
|
-
}),
|
|
1461
|
-
var
|
|
1462
|
-
return (
|
|
1463
|
-
}), E =
|
|
1464
|
-
var
|
|
1465
|
-
return ((
|
|
1466
|
-
}), w =
|
|
1467
|
-
var
|
|
1468
|
-
return ((
|
|
1469
|
-
}),
|
|
1470
|
-
() => a.value.every((
|
|
1471
|
-
), te =
|
|
1472
|
-
const
|
|
1473
|
-
return F ||
|
|
1474
|
-
}), { hasNegativeValues:
|
|
1475
|
-
|
|
1476
|
-
|
|
1456
|
+
withHover: u.value === O.HORIZONTAL
|
|
1457
|
+
})), oe = v(() => {
|
|
1458
|
+
var b;
|
|
1459
|
+
return (b = d.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1460
|
+
}), le = v(() => {
|
|
1461
|
+
var b;
|
|
1462
|
+
return (b = d.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1463
|
+
}), E = v(() => {
|
|
1464
|
+
var b;
|
|
1465
|
+
return ((b = d.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && oe.value;
|
|
1466
|
+
}), w = v(() => {
|
|
1467
|
+
var b;
|
|
1468
|
+
return ((b = d.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && le.value;
|
|
1469
|
+
}), P = v(
|
|
1470
|
+
() => a.value.every((b) => !b.values.length) || a.value.every((b) => b.values.every((F) => F === null))
|
|
1471
|
+
), te = v(() => {
|
|
1472
|
+
const b = [], { noBaseScales: F } = d.value;
|
|
1473
|
+
return F || b.push(() => !!(z.value && ee.value)), b.every((j) => j() === !0);
|
|
1474
|
+
}), { hasNegativeValues: $e } = Mr(p), { negativeBarAttributes: we } = zr(
|
|
1475
|
+
k,
|
|
1476
|
+
z,
|
|
1477
1477
|
ee,
|
|
1478
|
-
|
|
1479
|
-
), { shouldGenerateTooltipAnchors:
|
|
1478
|
+
u
|
|
1479
|
+
), { shouldGenerateTooltipAnchors: De } = jt(
|
|
1480
1480
|
h,
|
|
1481
1481
|
d,
|
|
1482
|
-
|
|
1482
|
+
z,
|
|
1483
1483
|
ee,
|
|
1484
1484
|
o,
|
|
1485
|
-
|
|
1485
|
+
u,
|
|
1486
1486
|
p,
|
|
1487
1487
|
c
|
|
1488
|
-
), { tooltipConfig:
|
|
1488
|
+
), { tooltipConfig: pe, showTooltip: de, hideTooltip: xe } = Zr(), { getTooltipItems: me } = Xr(p), L = v(
|
|
1489
1489
|
() => {
|
|
1490
|
-
var
|
|
1491
|
-
return ((
|
|
1490
|
+
var b;
|
|
1491
|
+
return ((b = d.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1492
1492
|
}
|
|
1493
|
-
),
|
|
1493
|
+
), $ = v(() => {
|
|
1494
1494
|
var F;
|
|
1495
|
-
const
|
|
1496
|
-
return
|
|
1495
|
+
const b = (F = d.value.tooltipOptions) == null ? void 0 : F.withPointerEvents;
|
|
1496
|
+
return pe.opened && (!b || b && g.value === !1);
|
|
1497
1497
|
});
|
|
1498
|
-
function
|
|
1499
|
-
var
|
|
1500
|
-
if (d.value.withHover === !1 ||
|
|
1498
|
+
function B(b) {
|
|
1499
|
+
var j;
|
|
1500
|
+
if (d.value.withHover === !1 || b === s.value) return;
|
|
1501
1501
|
const F = s.value;
|
|
1502
|
-
if (s.value =
|
|
1503
|
-
const Kt = (
|
|
1504
|
-
|
|
1502
|
+
if (s.value = b, d.value.withTooltip !== !1) {
|
|
1503
|
+
const Kt = (j = d.value.tooltipOptions) != null && j.targetElement ? d.value.tooltipOptions.targetElement === "self" ? m.value.$el : d.value.tooltipOptions.targetElement : f.value[b];
|
|
1504
|
+
de(Kt);
|
|
1505
1505
|
}
|
|
1506
|
-
e("hovered-index-changed", { newIndex:
|
|
1506
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: F }), e("update:hoveredIndex", b);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1508
|
+
function G() {
|
|
1509
|
+
xe(), s.value = -1, e("update:hoveredIndex", -1);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function U(b) {
|
|
1512
1512
|
if (!a.value.some(
|
|
1513
|
-
({ values:
|
|
1513
|
+
({ values: j }) => b <= j.length - 1
|
|
1514
1514
|
)) {
|
|
1515
1515
|
ne(J.InvalidHoveredIndex);
|
|
1516
1516
|
return;
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1518
|
+
b == null || b === -1 ? G() : B(b);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function Z() {
|
|
1521
1521
|
setTimeout(() => {
|
|
1522
|
-
|
|
1522
|
+
$.value && G(), e("chart-mouseleave");
|
|
1523
1523
|
}, 0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
|
|
1525
|
+
function it(b) {
|
|
1526
|
+
T(b), e("resize", b);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
|
|
1528
|
+
function He({ index: b, value: F, event: j }) {
|
|
1529
|
+
b !== null && B(b), e("axis-mouseenter", { index: b, value: F, event: j });
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1532
|
-
e("axis-click", { index:
|
|
1531
|
+
function Se({ index: b, value: F, event: j }) {
|
|
1532
|
+
e("axis-click", { index: b, value: F, event: j });
|
|
1533
1533
|
}
|
|
1534
1534
|
return H(
|
|
1535
1535
|
a,
|
|
1536
|
-
(
|
|
1536
|
+
(b, F) => e("data-changed", { newValue: b, oldValue: F })
|
|
1537
1537
|
), H(
|
|
1538
1538
|
o,
|
|
1539
|
-
(
|
|
1540
|
-
), H(
|
|
1539
|
+
(b, F) => e("labels-changed", { newValue: b, oldValue: F })
|
|
1540
|
+
), H(P, (b) => b && ne(J.Empty), { immediate: !0 }), H(() => r.hoveredIndex, U), H(
|
|
1541
1541
|
h,
|
|
1542
|
-
(
|
|
1543
|
-
|
|
1542
|
+
(b) => {
|
|
1543
|
+
b && r.hoveredIndex != null && s.value === -1 && U(r.hoveredIndex);
|
|
1544
1544
|
},
|
|
1545
1545
|
{ flush: "post" }
|
|
1546
|
-
), H(g, (
|
|
1547
|
-
|
|
1546
|
+
), H(g, (b) => {
|
|
1547
|
+
b === !1 && pe.opened && G();
|
|
1548
1548
|
}), re(async () => {
|
|
1549
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1550
|
-
}), Pe("chartID", N), Pe("isEmpty",
|
|
1549
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), A("lume__internal--hover", B);
|
|
1550
|
+
}), Pe("chartID", N), Pe("isEmpty", P), Pe("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: s, tooltipAnchor: f, chartContainer: m, tooltipAnchorAttributes: h, isHoveringTooltip: g, xAxisHeight: _, yAxisWidth: x, allOptions: d, internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N, listenInternalEvent: A, xScale: D, yScale: C, computedMargins: M, computedXScale: z, computedYScale: ee, computedXAxisOptions: ce, computedYAxisOptions: ae, xAxisTitle: oe, yAxisTitle: le, showXAxisTitle: E, showYAxisTitle: w, isEmpty: P, isReady: te, hasNegativeValues: $e, negativeBarAttributes: we, shouldGenerateTooltipAnchors: De, tooltipConfig: pe, showTooltip: de, hideTooltip: xe, getTooltipItems: me, tooltipPosition: L, shouldHideTooltip: $, handleInternalHover: B, handleHideTooltip: G, handleExternalHover: U, handleMouseleave: Z, handleResize: it, handleAxisMouseenter: He, handleAxisClick: Se, LumeAxis: Gn, LumeBar: Qe, LumeChartContainer: dr, LumeChartLegend: _r, LumeTooltip: Rr, LumeOverlayGroup: jr, TOOLTIP_ANCHOR_RADIUS: In };
|
|
1551
1551
|
}
|
|
1552
1552
|
});
|
|
1553
1553
|
var ea = function() {
|
|
@@ -1615,7 +1615,7 @@ var ea = function() {
|
|
|
1615
1615
|
null,
|
|
1616
1616
|
"17c48844"
|
|
1617
1617
|
);
|
|
1618
|
-
const
|
|
1618
|
+
const fe = na.exports, gt = 8, ra = 8, aa = 20, _e = 2, oa = 3, la = 4, ht = 2, ua = /* @__PURE__ */ R({
|
|
1619
1619
|
__name: "lume-alluvial-node-label",
|
|
1620
1620
|
props: {
|
|
1621
1621
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1627,16 +1627,16 @@ const pe = na.exports, _t = 8, ra = 8, aa = 20, ye = 2, oa = 3, ua = 4, gt = 2,
|
|
|
1627
1627
|
const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
|
|
1628
1628
|
return H(
|
|
1629
1629
|
[n, () => r.maxWidth],
|
|
1630
|
-
async ([
|
|
1631
|
-
if (
|
|
1632
|
-
a.value = i, await
|
|
1633
|
-
const { width:
|
|
1634
|
-
a.value =
|
|
1630
|
+
async ([l, i]) => {
|
|
1631
|
+
if (l && i) {
|
|
1632
|
+
a.value = i, await Be();
|
|
1633
|
+
const { width: u, height: c } = l.getBoundingClientRect();
|
|
1634
|
+
a.value = u + ht > i ? i : u + ht, o.value = Math.ceil(c);
|
|
1635
1635
|
}
|
|
1636
1636
|
},
|
|
1637
1637
|
{ immediate: !0 }
|
|
1638
|
-
), H(a, async (
|
|
1639
|
-
|
|
1638
|
+
), H(a, async (l) => {
|
|
1639
|
+
l !== r.maxWidth && (await Be(), e("lume__internal--node-resize"));
|
|
1640
1640
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
|
|
1641
1641
|
}
|
|
1642
1642
|
});
|
|
@@ -1644,14 +1644,14 @@ var ia = function() {
|
|
|
1644
1644
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1645
1645
|
return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1646
1646
|
}, sa = [], ca = /* @__PURE__ */ S(
|
|
1647
|
-
|
|
1647
|
+
ua,
|
|
1648
1648
|
ia,
|
|
1649
1649
|
sa,
|
|
1650
1650
|
!1,
|
|
1651
1651
|
null,
|
|
1652
1652
|
"7126dfdb"
|
|
1653
1653
|
);
|
|
1654
|
-
const da = ca.exports, va = /* @__PURE__ */
|
|
1654
|
+
const da = ca.exports, va = /* @__PURE__ */ R({
|
|
1655
1655
|
__name: "lume-alluvial-node-value",
|
|
1656
1656
|
props: {
|
|
1657
1657
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1671,7 +1671,7 @@ var fa = function() {
|
|
|
1671
1671
|
null,
|
|
1672
1672
|
"b4fc758b"
|
|
1673
1673
|
);
|
|
1674
|
-
const _a = ma.exports, ga = /* @__PURE__ */
|
|
1674
|
+
const _a = ma.exports, ga = /* @__PURE__ */ R({
|
|
1675
1675
|
__name: "lume-alluvial-node-header",
|
|
1676
1676
|
props: {
|
|
1677
1677
|
align: {
|
|
@@ -1682,15 +1682,15 @@ const _a = ma.exports, ga = /* @__PURE__ */ P({
|
|
|
1682
1682
|
y: { type: Number, required: !0 }
|
|
1683
1683
|
},
|
|
1684
1684
|
setup(t) {
|
|
1685
|
-
const e = t, r = I(null), n =
|
|
1685
|
+
const e = t, r = I(null), n = v(() => {
|
|
1686
1686
|
var i;
|
|
1687
1687
|
return ((i = r.value) == null ? void 0 : i.getBBox().width) ?? 0;
|
|
1688
|
-
}), a =
|
|
1688
|
+
}), a = v(() => e.align === "left" ? 0 : e.align === "right" ? -n.value : -n.value / 2), o = v(
|
|
1689
1689
|
() => r.value && `translate(${a.value}, 0)`
|
|
1690
|
-
),
|
|
1690
|
+
), l = v(
|
|
1691
1691
|
() => r.value && `translate(${a.value + n.value}, 0)`
|
|
1692
1692
|
);
|
|
1693
|
-
return { __sfc: !0, props: e, textRef: r, textWidth: n, textStart: a, beforeTransform: o, afterTransform:
|
|
1693
|
+
return { __sfc: !0, props: e, textRef: r, textWidth: n, textStart: a, beforeTransform: o, afterTransform: l };
|
|
1694
1694
|
}
|
|
1695
1695
|
});
|
|
1696
1696
|
var ha = function() {
|
|
@@ -1707,7 +1707,7 @@ var ha = function() {
|
|
|
1707
1707
|
"ee436a8d"
|
|
1708
1708
|
);
|
|
1709
1709
|
const ka = ba.exports;
|
|
1710
|
-
function
|
|
1710
|
+
function yt(t, e) {
|
|
1711
1711
|
return {
|
|
1712
1712
|
x0: 0 + (e ? e.left : 0),
|
|
1713
1713
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1716,28 +1716,28 @@ function ht(t, e) {
|
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
function xa(t) {
|
|
1719
|
-
const e = I(
|
|
1719
|
+
const e = I(yt(t));
|
|
1720
1720
|
function r(n) {
|
|
1721
|
-
e.value =
|
|
1721
|
+
e.value = yt(t, n);
|
|
1722
1722
|
}
|
|
1723
1723
|
return { extents: e, updateExtents: r };
|
|
1724
1724
|
}
|
|
1725
|
-
var
|
|
1725
|
+
var Ae = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Ae || {});
|
|
1726
1726
|
const La = "[lume] ";
|
|
1727
1727
|
function Ue(t, e, r = !0) {
|
|
1728
|
-
r &&
|
|
1728
|
+
r && wt() || console.error(La + "Error: " + t, e);
|
|
1729
1729
|
}
|
|
1730
|
-
const
|
|
1730
|
+
const Ta = 200;
|
|
1731
1731
|
function W(t) {
|
|
1732
1732
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function Aa(t, e) {
|
|
1735
1735
|
return e.nodes.find((r) => r.id === t);
|
|
1736
1736
|
}
|
|
1737
1737
|
function Oa(t, e) {
|
|
1738
1738
|
return e.links.find((r) => r.id === t);
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function Vt(t) {
|
|
1741
1741
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1742
1742
|
}
|
|
1743
1743
|
function ot(t) {
|
|
@@ -1745,26 +1745,26 @@ function ot(t) {
|
|
|
1745
1745
|
...t.filter((e) => e.parentNodeId == null).map(({ layer: e }) => e)
|
|
1746
1746
|
);
|
|
1747
1747
|
}
|
|
1748
|
-
function
|
|
1748
|
+
function Mt(t) {
|
|
1749
1749
|
return t.layer === 0;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function zt(t, e) {
|
|
1752
1752
|
return t.parentNodeId == null && t.layer === e;
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1755
|
-
return
|
|
1754
|
+
function Wt(t, e, r) {
|
|
1755
|
+
return Mt(t) ? e.alignFirstNodeLabels !== "right" : zt(t, r) ? e.alignLastNodeLabels === "left" : !1;
|
|
1756
1756
|
}
|
|
1757
1757
|
function Ia(t, e, r) {
|
|
1758
1758
|
if (!e) return;
|
|
1759
|
-
const n = ot(t.nodes), a = t.nodes.filter((
|
|
1760
|
-
(
|
|
1759
|
+
const n = ot(t.nodes), a = t.nodes.filter((u) => Mt(u)).map((u) => `${u.id}`), o = t.nodes.filter((u) => zt(u, n)).map((u) => `${u.id}`), l = e.filter((u) => a.includes(u.dataset.id)).reduce(
|
|
1760
|
+
(u, c) => Math.max(u, c.getBBox().width),
|
|
1761
1761
|
-1 / 0
|
|
1762
|
-
), i = e.filter((
|
|
1763
|
-
(
|
|
1762
|
+
), i = e.filter((u) => o.includes(u.dataset.id)).reduce(
|
|
1763
|
+
(u, c) => Math.max(u, c.getBBox().width),
|
|
1764
1764
|
-1 / 0
|
|
1765
1765
|
);
|
|
1766
1766
|
return {
|
|
1767
|
-
left: r.alignFirstNodeLabels === "right" ? 0 :
|
|
1767
|
+
left: r.alignFirstNodeLabels === "right" ? 0 : l,
|
|
1768
1768
|
top: 0,
|
|
1769
1769
|
right: r.alignLastNodeLabels === "left" ? 0 : i,
|
|
1770
1770
|
bottom: 0
|
|
@@ -1773,15 +1773,15 @@ function Ia(t, e, r) {
|
|
|
1773
1773
|
function Na(t, e) {
|
|
1774
1774
|
const r = ot(t);
|
|
1775
1775
|
return t.map((n) => {
|
|
1776
|
-
const a = n.y1 - n.y0 <
|
|
1776
|
+
const a = n.y1 - n.y0 < _e;
|
|
1777
1777
|
return {
|
|
1778
1778
|
x: n.x0,
|
|
1779
|
-
y: n.y0 - (a ?
|
|
1779
|
+
y: n.y0 - (a ? _e / 2 : 0),
|
|
1780
1780
|
// Negative offset to account for the min. height
|
|
1781
1781
|
width: n.x1 - n.x0,
|
|
1782
|
-
height: a ?
|
|
1782
|
+
height: a ? _e : n.y1 - n.y0,
|
|
1783
1783
|
textTransform: {
|
|
1784
|
-
x:
|
|
1784
|
+
x: Wt(n, e, r) ? n.x0 - gt : n.x1 + gt,
|
|
1785
1785
|
y: (n.y1 + n.y0) / 2
|
|
1786
1786
|
},
|
|
1787
1787
|
node: n
|
|
@@ -1802,14 +1802,14 @@ function Da(t) {
|
|
|
1802
1802
|
var r;
|
|
1803
1803
|
return {
|
|
1804
1804
|
id: e.id,
|
|
1805
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1805
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || ke,
|
|
1806
1806
|
d: wa(e)(e),
|
|
1807
1807
|
strokeWidth: Math.max(1, e.width),
|
|
1808
1808
|
link: e
|
|
1809
1809
|
};
|
|
1810
1810
|
});
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function bt(t, e, r, n, a) {
|
|
1813
1813
|
if (n === !1) {
|
|
1814
1814
|
t.node = {
|
|
1815
1815
|
...t.node,
|
|
@@ -1817,48 +1817,48 @@ function yt(t, e, r, n, a) {
|
|
|
1817
1817
|
};
|
|
1818
1818
|
return;
|
|
1819
1819
|
}
|
|
1820
|
-
const o = Date.now(),
|
|
1821
|
-
let c = (Date.now() - o) /
|
|
1820
|
+
const o = Date.now(), l = bn(e, r), i = () => {
|
|
1821
|
+
let c = (Date.now() - o) / Ta;
|
|
1822
1822
|
c > 1 && (c = 1), t.node = {
|
|
1823
1823
|
...t.node,
|
|
1824
|
-
transitionValue: a && c === 1 ? void 0 :
|
|
1824
|
+
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
1825
1825
|
}, c < 1 && requestAnimationFrame(i);
|
|
1826
1826
|
};
|
|
1827
1827
|
requestAnimationFrame(i);
|
|
1828
1828
|
}
|
|
1829
1829
|
const Ha = ":aggregated";
|
|
1830
1830
|
function Sa(t) {
|
|
1831
|
-
const e = I([]), r =
|
|
1831
|
+
const e = I([]), r = v(() => {
|
|
1832
1832
|
var c, s;
|
|
1833
|
-
const
|
|
1834
|
-
return (s = (c = t.value) == null ? void 0 : c[0]) == null || s.values.forEach(({ value:
|
|
1835
|
-
m != null && m.length &&
|
|
1836
|
-
}),
|
|
1837
|
-
}), n =
|
|
1833
|
+
const u = /* @__PURE__ */ new Map();
|
|
1834
|
+
return (s = (c = t.value) == null ? void 0 : c[0]) == null || s.values.forEach(({ value: f, expandableNodes: m }) => {
|
|
1835
|
+
m != null && m.length && u.set(f, [...m]);
|
|
1836
|
+
}), u;
|
|
1837
|
+
}), n = v(
|
|
1838
1838
|
() => {
|
|
1839
|
-
const
|
|
1839
|
+
const u = /* @__PURE__ */ new Map();
|
|
1840
1840
|
return r.value.forEach((c, s) => {
|
|
1841
|
-
c.forEach((
|
|
1842
|
-
}),
|
|
1841
|
+
c.forEach((f) => u.set(f, s));
|
|
1842
|
+
}), u;
|
|
1843
1843
|
}
|
|
1844
1844
|
);
|
|
1845
|
-
function a(
|
|
1846
|
-
return r.value.has(
|
|
1845
|
+
function a(u) {
|
|
1846
|
+
return r.value.has(u);
|
|
1847
1847
|
}
|
|
1848
|
-
function o(
|
|
1849
|
-
return n.value.has(
|
|
1848
|
+
function o(u) {
|
|
1849
|
+
return n.value.has(u);
|
|
1850
1850
|
}
|
|
1851
|
-
function u
|
|
1852
|
-
return e.value.includes(
|
|
1851
|
+
function l(u) {
|
|
1852
|
+
return e.value.includes(u);
|
|
1853
1853
|
}
|
|
1854
|
-
function i(
|
|
1855
|
-
a(
|
|
1854
|
+
function i(u) {
|
|
1855
|
+
a(u) && (e.value = l(u) ? e.value.filter((c) => c !== u) : [...e.value, u]);
|
|
1856
1856
|
}
|
|
1857
1857
|
return H(t, () => e.value = []), {
|
|
1858
1858
|
childIdsByParentId: r,
|
|
1859
1859
|
expandedNodeIds: e,
|
|
1860
1860
|
isExpandableNode: a,
|
|
1861
|
-
isExpandedNode:
|
|
1861
|
+
isExpandedNode: l,
|
|
1862
1862
|
isSubNode: o,
|
|
1863
1863
|
parentIdByChildId: n,
|
|
1864
1864
|
toggleNodeExpansion: i
|
|
@@ -1868,31 +1868,31 @@ function Pa(t, e, r, n) {
|
|
|
1868
1868
|
if (!t || !e || n.size === 0)
|
|
1869
1869
|
return { nodes: t, links: e };
|
|
1870
1870
|
const a = e.filter(
|
|
1871
|
-
(
|
|
1872
|
-
), o = new Set(a.map(({ id:
|
|
1873
|
-
return r.forEach((
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
const
|
|
1871
|
+
(l) => !n.has(W(l.source)) && !n.has(W(l.target))
|
|
1872
|
+
), o = new Set(a.map(({ id: l }) => l));
|
|
1873
|
+
return r.forEach((l, i) => {
|
|
1874
|
+
const u = /* @__PURE__ */ new Map();
|
|
1875
|
+
l.forEach((c) => {
|
|
1876
|
+
Ut(e, c).forEach((s) => {
|
|
1877
|
+
const f = W(s.target), m = u.get(f);
|
|
1878
1878
|
if (m) {
|
|
1879
1879
|
m.value += s.value;
|
|
1880
1880
|
return;
|
|
1881
1881
|
}
|
|
1882
|
-
const h = `${i}:${
|
|
1883
|
-
|
|
1882
|
+
const h = `${i}:${f}`;
|
|
1883
|
+
u.set(f, {
|
|
1884
1884
|
id: o.has(h) ? `${h}${Ha}` : h,
|
|
1885
1885
|
aggregatedFrom: i,
|
|
1886
1886
|
color: s.color,
|
|
1887
1887
|
curveFunction: s.curveFunction,
|
|
1888
1888
|
source: i,
|
|
1889
|
-
target:
|
|
1889
|
+
target: f,
|
|
1890
1890
|
value: s.value
|
|
1891
1891
|
});
|
|
1892
1892
|
});
|
|
1893
|
-
}), a.push(...
|
|
1893
|
+
}), a.push(...u.values());
|
|
1894
1894
|
}), {
|
|
1895
|
-
nodes: t.filter((
|
|
1895
|
+
nodes: t.filter((l) => !n.has(l.id)),
|
|
1896
1896
|
links: a
|
|
1897
1897
|
};
|
|
1898
1898
|
}
|
|
@@ -1903,15 +1903,15 @@ function Ra({
|
|
|
1903
1903
|
expandedNodeIds: n,
|
|
1904
1904
|
childIdsByParentId: a,
|
|
1905
1905
|
options: o,
|
|
1906
|
-
extents:
|
|
1906
|
+
extents: l
|
|
1907
1907
|
}) {
|
|
1908
1908
|
var i;
|
|
1909
|
-
(i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((
|
|
1910
|
-
const c = t.nodes.find((
|
|
1911
|
-
!c || !s.length ||
|
|
1909
|
+
(i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((u) => {
|
|
1910
|
+
const c = t.nodes.find((f) => f.id === u), s = (a.get(u) ?? []).map((f) => e.find((m) => m.id === f)).filter(Boolean);
|
|
1911
|
+
!c || !s.length || Ba({ graph: t, parent: c, children: s, linkDefinitions: r, options: o, extents: l });
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Ba({
|
|
1915
1915
|
graph: t,
|
|
1916
1916
|
parent: e,
|
|
1917
1917
|
children: r,
|
|
@@ -1919,16 +1919,16 @@ function Ca({
|
|
|
1919
1919
|
options: a,
|
|
1920
1920
|
extents: o
|
|
1921
1921
|
}) {
|
|
1922
|
-
const
|
|
1922
|
+
const l = r.map(
|
|
1923
1923
|
(s) => za(n, e, s)
|
|
1924
|
-
), i =
|
|
1924
|
+
), i = l.reduce((s, f) => s + f, 0);
|
|
1925
1925
|
if (!i) return;
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1926
|
+
const u = (e.y1 - e.y0) / i;
|
|
1927
|
+
Ca({
|
|
1928
1928
|
parent: e,
|
|
1929
1929
|
children: r,
|
|
1930
|
-
childValues:
|
|
1931
|
-
scale:
|
|
1930
|
+
childValues: l,
|
|
1931
|
+
scale: u,
|
|
1932
1932
|
graph: t,
|
|
1933
1933
|
options: a,
|
|
1934
1934
|
extents: o
|
|
@@ -1936,21 +1936,21 @@ function Ca({
|
|
|
1936
1936
|
const c = ja({
|
|
1937
1937
|
parent: e,
|
|
1938
1938
|
children: r,
|
|
1939
|
-
childValues:
|
|
1940
|
-
scale:
|
|
1939
|
+
childValues: l,
|
|
1940
|
+
scale: u,
|
|
1941
1941
|
linkDefinitions: n
|
|
1942
1942
|
});
|
|
1943
1943
|
Ma(t, e).forEach((s) => {
|
|
1944
|
-
const
|
|
1944
|
+
const f = Va({
|
|
1945
1945
|
children: r,
|
|
1946
1946
|
aggregatedLink: s,
|
|
1947
|
-
scale:
|
|
1947
|
+
scale: u,
|
|
1948
1948
|
linkDefinitions: n
|
|
1949
1949
|
});
|
|
1950
|
-
|
|
1950
|
+
kt(t.links, s, f), kt(
|
|
1951
1951
|
s.target.targetLinks,
|
|
1952
1952
|
s,
|
|
1953
|
-
|
|
1953
|
+
f
|
|
1954
1954
|
);
|
|
1955
1955
|
}), e.sourceLinks = [
|
|
1956
1956
|
...e.sourceLinks.filter(
|
|
@@ -1959,22 +1959,22 @@ function Ca({
|
|
|
1959
1959
|
...c
|
|
1960
1960
|
], t.links.push(...c), t.nodes.push(...r);
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function Ca({
|
|
1963
1963
|
parent: t,
|
|
1964
1964
|
children: e,
|
|
1965
1965
|
childValues: r,
|
|
1966
1966
|
scale: n,
|
|
1967
1967
|
graph: a,
|
|
1968
1968
|
options: o,
|
|
1969
|
-
extents:
|
|
1969
|
+
extents: l
|
|
1970
1970
|
}) {
|
|
1971
|
-
const i = t.x1 - t.x0,
|
|
1971
|
+
const i = t.x1 - t.x0, u = t.x1, c = Wa(a, t) ?? l.x1, s = Math.max(u, u + (c - u - i) / 2), f = r.map((_) => _ * n), m = Fa(e, o.nodePadding ?? 0), h = [...f, ...m].reduce(
|
|
1972
1972
|
(_, x) => _ + x,
|
|
1973
1973
|
0
|
|
1974
1974
|
);
|
|
1975
|
-
let g = Ga({ parent: t, children: e, totalHeight: h, extents:
|
|
1975
|
+
let g = Ga({ parent: t, children: e, totalHeight: h, extents: l });
|
|
1976
1976
|
e.forEach((_, x) => {
|
|
1977
|
-
g += m[x], _.x0 = s, _.x1 = s + i, _.y0 = g, _.y1 = g +
|
|
1977
|
+
g += m[x], _.x0 = s, _.x1 = s + i, _.y0 = g, _.y1 = g + f[x], _.depth = t.depth + 0.5, _.layer = t.layer + 0.5, _.parentNodeId = t.id, _.value = r[x], _.sourceLinks = [], _.targetLinks = [], g = _.y1;
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
1980
|
function Fa(t, e) {
|
|
@@ -2001,19 +2001,19 @@ function ja({
|
|
|
2001
2001
|
linkDefinitions: a
|
|
2002
2002
|
}) {
|
|
2003
2003
|
let o = t.y0;
|
|
2004
|
-
return e.map((
|
|
2005
|
-
const
|
|
2006
|
-
id: (
|
|
2007
|
-
color:
|
|
2008
|
-
curveFunction:
|
|
2004
|
+
return e.map((l, i) => {
|
|
2005
|
+
const u = lt(a, t.id, l.id), c = r[i] * n, s = {
|
|
2006
|
+
id: (u == null ? void 0 : u.id) ?? `${t.id}:${l.id}`,
|
|
2007
|
+
color: u == null ? void 0 : u.color,
|
|
2008
|
+
curveFunction: u == null ? void 0 : u.curveFunction,
|
|
2009
2009
|
source: t,
|
|
2010
|
-
target:
|
|
2010
|
+
target: l,
|
|
2011
2011
|
value: r[i],
|
|
2012
2012
|
width: c,
|
|
2013
2013
|
y0: o + c / 2,
|
|
2014
|
-
y1: (
|
|
2014
|
+
y1: (l.y0 + l.y1) / 2
|
|
2015
2015
|
};
|
|
2016
|
-
return o += c,
|
|
2016
|
+
return o += c, l.targetLinks.push(s), s;
|
|
2017
2017
|
});
|
|
2018
2018
|
}
|
|
2019
2019
|
function Va({
|
|
@@ -2024,24 +2024,24 @@ function Va({
|
|
|
2024
2024
|
}) {
|
|
2025
2025
|
const a = e.target;
|
|
2026
2026
|
let o = e.y1 - e.width / 2;
|
|
2027
|
-
return t.reduce((
|
|
2028
|
-
const
|
|
2029
|
-
if (!
|
|
2030
|
-
const c =
|
|
2027
|
+
return t.reduce((l, i) => {
|
|
2028
|
+
const u = lt(n, i.id, a.id);
|
|
2029
|
+
if (!u) return l;
|
|
2030
|
+
const c = u.value * r, s = i.sourceLinks.reduce(
|
|
2031
2031
|
(m, { width: h }) => m + h,
|
|
2032
2032
|
i.y0
|
|
2033
|
-
),
|
|
2034
|
-
id:
|
|
2035
|
-
color:
|
|
2036
|
-
curveFunction:
|
|
2033
|
+
), f = {
|
|
2034
|
+
id: u.id,
|
|
2035
|
+
color: u.color,
|
|
2036
|
+
curveFunction: u.curveFunction,
|
|
2037
2037
|
source: i,
|
|
2038
2038
|
target: a,
|
|
2039
|
-
value:
|
|
2039
|
+
value: u.value,
|
|
2040
2040
|
width: c,
|
|
2041
2041
|
y0: s + c / 2,
|
|
2042
2042
|
y1: o + c / 2
|
|
2043
2043
|
};
|
|
2044
|
-
return o += c, i.sourceLinks.push(
|
|
2044
|
+
return o += c, i.sourceLinks.push(f), l.push(f), l;
|
|
2045
2045
|
}, []);
|
|
2046
2046
|
}
|
|
2047
2047
|
function Ma(t, e) {
|
|
@@ -2049,19 +2049,19 @@ function Ma(t, e) {
|
|
|
2049
2049
|
(r) => r.aggregatedFrom === e.id
|
|
2050
2050
|
);
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function Ut(t, e) {
|
|
2053
2053
|
return t.filter(
|
|
2054
2054
|
(r) => W(r.source) === e
|
|
2055
2055
|
);
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function lt(t, e, r) {
|
|
2058
2058
|
return t.find(
|
|
2059
2059
|
(n) => W(n.source) === e && W(n.target) === r
|
|
2060
2060
|
);
|
|
2061
2061
|
}
|
|
2062
2062
|
function za(t, e, r) {
|
|
2063
|
-
const n =
|
|
2064
|
-
return n ? n.value :
|
|
2063
|
+
const n = lt(t, e.id, r.id);
|
|
2064
|
+
return n ? n.value : Ut(t, r.id).reduce(
|
|
2065
2065
|
(a, { value: o }) => a + o,
|
|
2066
2066
|
0
|
|
2067
2067
|
);
|
|
@@ -2072,7 +2072,7 @@ function Wa(t, e) {
|
|
|
2072
2072
|
);
|
|
2073
2073
|
return r.length ? Math.min(...r.map(({ x0: n }) => n)) : null;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function kt(t, e, r) {
|
|
2076
2076
|
const n = t.indexOf(e);
|
|
2077
2077
|
if (n === -1) {
|
|
2078
2078
|
t.push(...r);
|
|
@@ -2087,78 +2087,78 @@ const Za = {
|
|
|
2087
2087
|
nodes: [],
|
|
2088
2088
|
links: []
|
|
2089
2089
|
};
|
|
2090
|
-
function
|
|
2090
|
+
function xt(t, e) {
|
|
2091
2091
|
return e.find((r) => r.every((n) => n.layer === t.layer));
|
|
2092
2092
|
}
|
|
2093
2093
|
function Xa(t, e, r) {
|
|
2094
2094
|
const n = I(null), {
|
|
2095
2095
|
childIdsByParentId: a,
|
|
2096
2096
|
expandedNodeIds: o,
|
|
2097
|
-
isExpandableNode:
|
|
2097
|
+
isExpandableNode: l,
|
|
2098
2098
|
isSubNode: i,
|
|
2099
|
-
parentIdByChildId:
|
|
2099
|
+
parentIdByChildId: u,
|
|
2100
2100
|
toggleNodeExpansion: c
|
|
2101
|
-
} = Sa(t), s =
|
|
2101
|
+
} = Sa(t), s = v(() => {
|
|
2102
2102
|
var d, p;
|
|
2103
2103
|
return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
|
|
2104
2104
|
({
|
|
2105
2105
|
label: y,
|
|
2106
|
-
color:
|
|
2107
|
-
value:
|
|
2106
|
+
color: k,
|
|
2107
|
+
value: T,
|
|
2108
2108
|
deriveColorFromIncomingLinks: N,
|
|
2109
|
-
expandableNodes:
|
|
2110
|
-
offset:
|
|
2109
|
+
expandableNodes: A,
|
|
2110
|
+
offset: D
|
|
2111
2111
|
}) => ({
|
|
2112
|
-
label: y ||
|
|
2113
|
-
color:
|
|
2114
|
-
fallbackColor:
|
|
2115
|
-
id:
|
|
2112
|
+
label: y || T.toString(),
|
|
2113
|
+
color: k,
|
|
2114
|
+
fallbackColor: k || ke,
|
|
2115
|
+
id: T,
|
|
2116
2116
|
deriveColorFromIncomingLinks: N,
|
|
2117
|
-
expandableNodes:
|
|
2118
|
-
offset:
|
|
2117
|
+
expandableNodes: A,
|
|
2118
|
+
offset: D
|
|
2119
2119
|
})
|
|
2120
2120
|
);
|
|
2121
|
-
}),
|
|
2121
|
+
}), f = v(
|
|
2122
2122
|
() => {
|
|
2123
2123
|
var d, p;
|
|
2124
2124
|
return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
|
|
2125
2125
|
(y) => {
|
|
2126
|
-
var
|
|
2127
|
-
return (
|
|
2128
|
-
({ node:
|
|
2129
|
-
id: `${y.value}:${
|
|
2130
|
-
color:
|
|
2131
|
-
curveFunction:
|
|
2126
|
+
var k;
|
|
2127
|
+
return (k = y.targets) == null ? void 0 : k.map(
|
|
2128
|
+
({ node: T, value: N, color: A, curveFunction: D }) => ({
|
|
2129
|
+
id: `${y.value}:${T}`,
|
|
2130
|
+
color: A,
|
|
2131
|
+
curveFunction: D,
|
|
2132
2132
|
source: y.value ?? y.label,
|
|
2133
|
-
target:
|
|
2133
|
+
target: T,
|
|
2134
2134
|
value: N
|
|
2135
2135
|
})
|
|
2136
2136
|
);
|
|
2137
2137
|
}
|
|
2138
2138
|
).filter(Boolean).flat();
|
|
2139
2139
|
}
|
|
2140
|
-
), m =
|
|
2140
|
+
), m = v(() => Qt().nodeId(W).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), h = v(() => {
|
|
2141
2141
|
var d;
|
|
2142
2142
|
return (d = n.value) == null ? void 0 : d.nodes.filter((p) => p.parentNodeId == null).reduce((p, y) => {
|
|
2143
|
-
const
|
|
2144
|
-
return
|
|
2143
|
+
const k = xt(y, p);
|
|
2144
|
+
return k ? (k.push(y), k.sort((T, N) => (T._y0 || T.y0) - (N._y0 || N.y0))) : p.push([y]), p;
|
|
2145
2145
|
}, []).sort((p, y) => p[0].layer - y[0].layer);
|
|
2146
2146
|
});
|
|
2147
2147
|
function g(d) {
|
|
2148
|
-
const { offset: p } = d, y =
|
|
2148
|
+
const { offset: p } = d, y = xt(d, h.value);
|
|
2149
2149
|
if (!y) return;
|
|
2150
|
-
const
|
|
2151
|
-
d._y0 = d.y0, d._y1 = d.y1, d.y0 =
|
|
2150
|
+
const k = y[y.findIndex((N) => N.id === d.id) - 1], T = k && y.length !== 1 ? k.y1 + p : p;
|
|
2151
|
+
d._y0 = d.y0, d._y1 = d.y1, d.y0 = T, d.y1 = d.y0 + (d._y1 - d._y0);
|
|
2152
2152
|
}
|
|
2153
2153
|
function _(d, p) {
|
|
2154
|
-
const { id: y, _y0:
|
|
2155
|
-
(
|
|
2156
|
-
),
|
|
2157
|
-
(
|
|
2158
|
-
),
|
|
2159
|
-
N.forEach((
|
|
2160
|
-
}
|
|
2161
|
-
const x =
|
|
2154
|
+
const { id: y, _y0: k, y0: T } = d, N = p.links.filter(
|
|
2155
|
+
(C) => C.source.id === y
|
|
2156
|
+
), A = p.links.filter(
|
|
2157
|
+
(C) => C.target.id === y
|
|
2158
|
+
), D = T - k;
|
|
2159
|
+
N.forEach((C) => C.y0 += D), A.forEach((C) => C.y1 += D);
|
|
2160
|
+
}
|
|
2161
|
+
const x = v(() => {
|
|
2162
2162
|
var d;
|
|
2163
2163
|
return n.value && ((d = s.value) == null || d.forEach((p) => {
|
|
2164
2164
|
p.value === 0 && (p.fallbackColor = et.Grey), typeof p.offset == "number" && !i(p.id) && (g(p), _(p, n.value));
|
|
@@ -2166,30 +2166,30 @@ function Xa(t, e, r) {
|
|
|
2166
2166
|
});
|
|
2167
2167
|
return H([m, r, o], () => {
|
|
2168
2168
|
try {
|
|
2169
|
-
const { x0: d, y0: p, x1: y, y1:
|
|
2169
|
+
const { x0: d, y0: p, x1: y, y1: k } = r.value, T = m.value.extent([
|
|
2170
2170
|
[d, p],
|
|
2171
|
-
[y,
|
|
2171
|
+
[y, k]
|
|
2172
2172
|
])(
|
|
2173
2173
|
Pa(
|
|
2174
2174
|
s.value,
|
|
2175
|
-
|
|
2175
|
+
f.value,
|
|
2176
2176
|
a.value,
|
|
2177
|
-
|
|
2177
|
+
u.value
|
|
2178
2178
|
)
|
|
2179
2179
|
);
|
|
2180
2180
|
Ra({
|
|
2181
|
-
graph:
|
|
2181
|
+
graph: T,
|
|
2182
2182
|
nodes: s.value,
|
|
2183
|
-
linkDefinitions:
|
|
2183
|
+
linkDefinitions: f.value,
|
|
2184
2184
|
expandedNodeIds: o.value,
|
|
2185
2185
|
childIdsByParentId: a.value,
|
|
2186
2186
|
options: e.value,
|
|
2187
2187
|
extents: r.value
|
|
2188
|
-
}), n.value =
|
|
2188
|
+
}), n.value = T;
|
|
2189
2189
|
} catch (d) {
|
|
2190
|
-
Ue(
|
|
2190
|
+
Ue(Ae.GraphProblem, d), n.value = Za;
|
|
2191
2191
|
}
|
|
2192
|
-
}), { columns: h, graph: x, isExpandableNode:
|
|
2192
|
+
}), { columns: h, graph: x, isExpandableNode: l, toggleNodeExpansion: c };
|
|
2193
2193
|
}
|
|
2194
2194
|
function Ze(t, e) {
|
|
2195
2195
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
@@ -2212,7 +2212,7 @@ function Ya(t, e) {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
const Ka = (t, e) => {
|
|
2214
2214
|
let r;
|
|
2215
|
-
|
|
2215
|
+
Vt(t) ? r = {
|
|
2216
2216
|
[t.id]: t.value,
|
|
2217
2217
|
...Ze(t),
|
|
2218
2218
|
...Xe(t)
|
|
@@ -2225,7 +2225,7 @@ const Ka = (t, e) => {
|
|
|
2225
2225
|
const n = Ya(r, e);
|
|
2226
2226
|
return { nodes: r, links: n };
|
|
2227
2227
|
}, Ja = (t) => {
|
|
2228
|
-
if (
|
|
2228
|
+
if (Vt(t)) {
|
|
2229
2229
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
2230
2230
|
return {
|
|
2231
2231
|
nodes: e.reduce(
|
|
@@ -2244,16 +2244,16 @@ const Ka = (t, e) => {
|
|
|
2244
2244
|
};
|
|
2245
2245
|
};
|
|
2246
2246
|
function Qa(t, e, r) {
|
|
2247
|
-
const n = I(null), a =
|
|
2247
|
+
const n = I(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
2248
2248
|
n.value,
|
|
2249
2249
|
r.value
|
|
2250
2250
|
) : e.value.highlightedElements === "closest" ? Ja(n.value, r.value) : Ka(n.value, r.value) : { nodes: {}, links: [] });
|
|
2251
|
-
return H(a, (o,
|
|
2251
|
+
return H(a, (o, l) => {
|
|
2252
2252
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
2253
2253
|
t.value.forEach((i) => {
|
|
2254
|
-
i.node.id in
|
|
2254
|
+
i.node.id in l.nodes && bt(
|
|
2255
2255
|
i,
|
|
2256
|
-
|
|
2256
|
+
l.nodes[i.node.id],
|
|
2257
2257
|
i.node.value,
|
|
2258
2258
|
e.value.withTransition,
|
|
2259
2259
|
!0
|
|
@@ -2262,7 +2262,7 @@ function Qa(t, e, r) {
|
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
2264
2264
|
t.value.forEach((i) => {
|
|
2265
|
-
i.node.id in o.nodes &&
|
|
2265
|
+
i.node.id in o.nodes && bt(
|
|
2266
2266
|
i,
|
|
2267
2267
|
i.node.value,
|
|
2268
2268
|
o.nodes[i.node.id],
|
|
@@ -2271,10 +2271,10 @@ function Qa(t, e, r) {
|
|
|
2271
2271
|
});
|
|
2272
2272
|
}), { highlightedElements: a, hoveredElement: n };
|
|
2273
2273
|
}
|
|
2274
|
-
const qa = /* @__PURE__ */
|
|
2274
|
+
const qa = /* @__PURE__ */ R({
|
|
2275
2275
|
__name: "lume-alluvial-group",
|
|
2276
2276
|
props: {
|
|
2277
|
-
...
|
|
2277
|
+
...Ee(),
|
|
2278
2278
|
hoveredElementId: {
|
|
2279
2279
|
type: [Number, String],
|
|
2280
2280
|
default: null
|
|
@@ -2282,128 +2282,139 @@ const qa = /* @__PURE__ */ P({
|
|
|
2282
2282
|
},
|
|
2283
2283
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2284
2284
|
setup(t, { emit: e }) {
|
|
2285
|
-
const r = t, n =
|
|
2286
|
-
|
|
2285
|
+
const r = t, n = Oe("chartID"), { data: a, options: o } = V(r), l = I([]), i = I([]), u = I(null), c = I(null), s = I(null), { extents: f, updateExtents: m } = xa(r.containerSize), { columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x } = Xa(a, o, f), { hoveredElement: d, highlightedElements: p } = Qa(
|
|
2286
|
+
l,
|
|
2287
2287
|
o,
|
|
2288
2288
|
g
|
|
2289
|
-
), y =
|
|
2289
|
+
), y = v(() => Te(o.value.valueFormat)), k = v(
|
|
2290
|
+
() => o.value.nodeExpansionTrigger === "block"
|
|
2291
|
+
), T = v(
|
|
2290
2292
|
() => Object.keys(p.value.nodes)
|
|
2291
|
-
),
|
|
2293
|
+
), N = v(
|
|
2292
2294
|
() => {
|
|
2293
|
-
var L,
|
|
2294
|
-
return (
|
|
2295
|
+
var L, $;
|
|
2296
|
+
return ($ = (L = g.value) == null ? void 0 : L.nodes) != null && $.length ? ot(g.value.nodes) : 0;
|
|
2295
2297
|
}
|
|
2296
|
-
),
|
|
2298
|
+
), A = v(() => {
|
|
2297
2299
|
if (!h.value) return [];
|
|
2298
2300
|
const L = h.value.length - 1;
|
|
2299
|
-
return h.value.map(([{ x0:
|
|
2300
|
-
}),
|
|
2301
|
+
return h.value.map(([{ x0: $, x1: B }], G) => G === 0 && o.value.alignFirstNodeLabels === "right" ? { x: $, align: "left" } : G === L && o.value.alignLastNodeLabels === "left" ? { x: B, align: "right" } : { x: ($ + B) / 2, align: "center" });
|
|
2302
|
+
}), D = v(() => {
|
|
2301
2303
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
2302
|
-
return o.value.nodeHeaders.slice(0,
|
|
2304
|
+
return o.value.nodeHeaders.slice(0, A.value.length).map((L, $) => ({
|
|
2303
2305
|
label: L,
|
|
2304
|
-
...
|
|
2306
|
+
...A.value[$]
|
|
2305
2307
|
}));
|
|
2306
|
-
}),
|
|
2308
|
+
}), C = v(
|
|
2307
2309
|
() => o.value.nodeHeaderPadding ?? aa
|
|
2308
|
-
),
|
|
2310
|
+
), M = v(() => {
|
|
2309
2311
|
if (!(!o.value.gradient || !g.value))
|
|
2310
|
-
return g.value.links.reduce((L,
|
|
2311
|
-
const { source: B, target:
|
|
2312
|
-
return L[
|
|
2313
|
-
source:
|
|
2314
|
-
target:
|
|
2312
|
+
return g.value.links.reduce((L, $) => {
|
|
2313
|
+
const { source: B, target: G } = $, U = B.color || B.fallbackColor, Z = G.deriveColorFromIncomingLinks ? U : G.color || G.fallbackColor;
|
|
2314
|
+
return L[$.id] = {
|
|
2315
|
+
source: U,
|
|
2316
|
+
target: Z,
|
|
2315
2317
|
x1: B.x1,
|
|
2316
|
-
x2:
|
|
2318
|
+
x2: G.x0
|
|
2317
2319
|
}, L;
|
|
2318
2320
|
}, {});
|
|
2319
|
-
}),
|
|
2320
|
-
const L =
|
|
2321
|
-
(B) =>
|
|
2322
|
-
),
|
|
2321
|
+
}), z = v(() => {
|
|
2322
|
+
const L = l.value.filter(
|
|
2323
|
+
(B) => w(B)
|
|
2324
|
+
), $ = [];
|
|
2323
2325
|
return L.forEach((B) => {
|
|
2324
|
-
const
|
|
2325
|
-
i.value.filter(({ link:
|
|
2326
|
-
const
|
|
2327
|
-
let
|
|
2328
|
-
return
|
|
2326
|
+
const G = [];
|
|
2327
|
+
i.value.filter(({ link: U }) => U.target.id === B.node.id).reverse().reduce((U, Z, it, He) => {
|
|
2328
|
+
const Se = Z.link.target.y1 - Z.link.target.y0 > _e;
|
|
2329
|
+
let b, F, j;
|
|
2330
|
+
return Se ? (b = Z.link.target.y1 - Z.link.target.y0, F = Z.link.value / B.node.value, j = F * b) : j = _e / He.length, G.push({
|
|
2329
2331
|
x: B.x,
|
|
2330
|
-
y: B.y +
|
|
2331
|
-
height:
|
|
2332
|
+
y: B.y + U,
|
|
2333
|
+
height: j,
|
|
2332
2334
|
width: B.width,
|
|
2333
|
-
key: `node-block-${B.node.id}-source-link-${
|
|
2334
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2335
|
-
}),
|
|
2336
|
-
}, 0),
|
|
2335
|
+
key: `node-block-${B.node.id}-source-link-${Z.link.source.id}`,
|
|
2336
|
+
class: `lume-alluvial-group__node-block lume-fill--${Z.link.source.color || ke}`
|
|
2337
|
+
}), U + j;
|
|
2338
|
+
}, 0), $.push({
|
|
2337
2339
|
id: B.node.id,
|
|
2338
|
-
subNodes:
|
|
2340
|
+
subNodes: G
|
|
2339
2341
|
});
|
|
2340
|
-
}),
|
|
2342
|
+
}), $;
|
|
2341
2343
|
});
|
|
2342
|
-
function V(L) {
|
|
2343
|
-
return o.value.gradient && `url('#${n}_${L.id}')`;
|
|
2344
|
-
}
|
|
2345
2344
|
function ee(L) {
|
|
2346
|
-
return
|
|
2345
|
+
return o.value.gradient && `url('#${n}_${L.id}')`;
|
|
2347
2346
|
}
|
|
2348
2347
|
function ce(L) {
|
|
2349
|
-
return
|
|
2348
|
+
return T.value.length > 0 && !T.value.includes(L.toString());
|
|
2350
2349
|
}
|
|
2351
2350
|
function ae(L) {
|
|
2352
|
-
return
|
|
2351
|
+
return T.value.length > 0 && T.value.includes(L.toString());
|
|
2353
2352
|
}
|
|
2354
2353
|
function oe(L) {
|
|
2355
|
-
return p.value.links.length > 0 && p.value.links.includes(L);
|
|
2354
|
+
return p.value.links.length > 0 && !p.value.links.includes(L);
|
|
2356
2355
|
}
|
|
2357
|
-
function
|
|
2358
|
-
return
|
|
2356
|
+
function le(L) {
|
|
2357
|
+
return p.value.links.length > 0 && p.value.links.includes(L);
|
|
2359
2358
|
}
|
|
2360
2359
|
function E(L) {
|
|
2360
|
+
return Wt(L, o.value, N.value);
|
|
2361
|
+
}
|
|
2362
|
+
function w(L) {
|
|
2361
2363
|
return !L.node.color && L.node.deriveColorFromIncomingLinks;
|
|
2362
2364
|
}
|
|
2363
|
-
function
|
|
2364
|
-
_(L.id) && x(L.id)
|
|
2365
|
+
function P(L) {
|
|
2366
|
+
_(L.id) && x(L.id);
|
|
2365
2367
|
}
|
|
2366
|
-
function
|
|
2367
|
-
|
|
2368
|
+
function te(L, $) {
|
|
2369
|
+
k.value || P(L), e("node-click", { node: L, event: $ });
|
|
2368
2370
|
}
|
|
2369
|
-
function
|
|
2370
|
-
|
|
2371
|
-
d.value = null, e("link-mouseleave", { link: D, event: L });
|
|
2371
|
+
function $e(L, $) {
|
|
2372
|
+
P(L), e("node-click", { node: L, event: $ });
|
|
2372
2373
|
}
|
|
2373
|
-
function
|
|
2374
|
+
function we(L) {
|
|
2375
|
+
k.value && P(L);
|
|
2376
|
+
}
|
|
2377
|
+
function De(L, $) {
|
|
2378
|
+
L !== d.value && (d.value = L, e("link-mouseenter", { link: L, event: $ }));
|
|
2379
|
+
}
|
|
2380
|
+
function pe(L) {
|
|
2381
|
+
const $ = d.value;
|
|
2382
|
+
d.value = null, e("link-mouseleave", { link: $, event: L });
|
|
2383
|
+
}
|
|
2384
|
+
function de(L) {
|
|
2374
2385
|
if (L == null) {
|
|
2375
2386
|
d.value = null;
|
|
2376
2387
|
return;
|
|
2377
2388
|
}
|
|
2378
|
-
const
|
|
2379
|
-
if (
|
|
2389
|
+
const $ = Aa(L, g.value) || Oa(L, g.value);
|
|
2390
|
+
if (!$) {
|
|
2380
2391
|
ne(J.InvalidHoveredElement);
|
|
2381
2392
|
return;
|
|
2382
2393
|
}
|
|
2383
|
-
d.value =
|
|
2394
|
+
d.value = $;
|
|
2384
2395
|
}
|
|
2385
|
-
function
|
|
2386
|
-
var
|
|
2387
|
-
return ((
|
|
2396
|
+
function xe(L) {
|
|
2397
|
+
var $;
|
|
2398
|
+
return (($ = z.value.find(({ id: B }) => L === B)) == null ? void 0 : $.subNodes) ?? [];
|
|
2388
2399
|
}
|
|
2389
|
-
function
|
|
2400
|
+
function me() {
|
|
2390
2401
|
const L = Ia(
|
|
2391
2402
|
g.value,
|
|
2392
|
-
|
|
2403
|
+
u.value,
|
|
2393
2404
|
o.value
|
|
2394
2405
|
);
|
|
2395
2406
|
m(L);
|
|
2396
2407
|
}
|
|
2397
2408
|
return H(g, (L) => {
|
|
2398
|
-
|
|
2409
|
+
l.value = Na(L.nodes, o.value), i.value = Da(L.links).reverse(), d.value == null && r.hoveredElementId != null && de(r.hoveredElementId);
|
|
2399
2410
|
}), H([c, s], () => {
|
|
2400
2411
|
d.value = c.value ?? s.value;
|
|
2401
|
-
}), H([r.containerSize,
|
|
2402
|
-
r.containerSize.width && r.containerSize.height &&
|
|
2412
|
+
}), H([r.containerSize, u], () => {
|
|
2413
|
+
r.containerSize.width && r.containerSize.height && me();
|
|
2403
2414
|
}), H(
|
|
2404
2415
|
() => [o.value.alignFirstNodeLabels, o.value.alignLastNodeLabels],
|
|
2405
|
-
|
|
2406
|
-
), H(() => r.hoveredElementId,
|
|
2416
|
+
me
|
|
2417
|
+
), H(() => r.hoveredElementId, de), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, pointedNode: c, focusedNode: s, extents: f, updateExtents: m, columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x, hoveredElement: d, highlightedElements: p, formatValue: y, isBlockExpansionTrigger: k, hoveredNodeIds: T, lastNodeLayer: N, nodeColumnPositions: A, nodeHeaders: D, computedNodeHeaderPadding: C, gradients: M, nodesDerivingColorFromIncomingLinks: z, getLinkStroke: ee, isNodeFaded: ce, isNodeFocused: ae, isLinkFaded: oe, isLinkFocused: le, isLabelBeforeNode: E, shouldDeriveNodeColorFromIncomingLinks: w, toggleExpansion: P, handleNodeClick: te, handleNodeKeydown: $e, handleNodeBlockClick: we, handleLinkMouseover: De, handleLinkMouseleave: pe, handleExternalHover: de, getSubNodesDerivingColorFromIncomingLinks: xe, updateMargins: me, LumeAlluvialNodeLabel: da, LumeAlluvialNodeValue: _a, LumeAlluvialNodeHeader: ka, GHOST_STROKE_WIDTH_OFFSET: ra, NODE_OUTLINE_PADDING: oa, NODE_OUTLINE_RADIUS: la };
|
|
2407
2418
|
}
|
|
2408
2419
|
});
|
|
2409
2420
|
var eo = function() {
|
|
@@ -2438,31 +2449,38 @@ var eo = function() {
|
|
|
2438
2449
|
"lume-alluvial-group__node--expandable": n.isExpandableNode(
|
|
2439
2450
|
a.node.id
|
|
2440
2451
|
),
|
|
2452
|
+
"lume-alluvial-group__node--expandable-block": n.isExpandableNode(a.node.id) && n.isBlockExpansionTrigger,
|
|
2441
2453
|
"lume-alluvial-group__node--faded": n.isNodeFaded(a.node.id),
|
|
2442
2454
|
"lume-alluvial-group__node--focused": n.isNodeFocused(a.node.id)
|
|
2443
|
-
}, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { attrs: { tabindex: n.isExpandableNode(a.node.id) ? "0" : null }, on: { click: function(
|
|
2444
|
-
return n.handleNodeClick(a.node,
|
|
2445
|
-
}, keydown: [function(
|
|
2446
|
-
return !
|
|
2447
|
-
}, function(
|
|
2448
|
-
return !
|
|
2449
|
-
}], mouseenter: function(
|
|
2450
|
-
return n.emit("node-mouseenter", { node: a.node, event:
|
|
2451
|
-
}, mouseleave: function(
|
|
2452
|
-
return n.emit("node-mouseleave", { node: a.node, event:
|
|
2453
|
-
}, mouseover: function(
|
|
2455
|
+
}, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { attrs: { tabindex: n.isExpandableNode(a.node.id) ? "0" : null }, on: { click: function(l) {
|
|
2456
|
+
return n.handleNodeClick(a.node, l);
|
|
2457
|
+
}, keydown: [function(l) {
|
|
2458
|
+
return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : (l.preventDefault(), n.handleNodeKeydown(a.node, l));
|
|
2459
|
+
}, function(l) {
|
|
2460
|
+
return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : (l.preventDefault(), n.handleNodeKeydown(a.node, l));
|
|
2461
|
+
}], mouseenter: function(l) {
|
|
2462
|
+
return n.emit("node-mouseenter", { node: a.node, event: l });
|
|
2463
|
+
}, mouseleave: function(l) {
|
|
2464
|
+
return n.emit("node-mouseleave", { node: a.node, event: l });
|
|
2465
|
+
}, mouseover: function(l) {
|
|
2454
2466
|
n.pointedNode = a.node;
|
|
2455
|
-
}, mouseout: function(
|
|
2467
|
+
}, mouseout: function(l) {
|
|
2456
2468
|
n.pointedNode = null;
|
|
2457
|
-
}, focus: function(
|
|
2469
|
+
}, focus: function(l) {
|
|
2458
2470
|
n.focusedNode = a.node;
|
|
2459
|
-
}, blur: function(
|
|
2471
|
+
}, blur: function(l) {
|
|
2460
2472
|
n.focusedNode = null;
|
|
2461
2473
|
} } }, [n.shouldDeriveNodeColorFromIncomingLinks(a) ? e._l(n.getSubNodesDerivingColorFromIncomingLinks(
|
|
2462
2474
|
a.node.id
|
|
2463
|
-
), function(
|
|
2464
|
-
return r("rect", e._b({ key:
|
|
2465
|
-
|
|
2475
|
+
), function(l) {
|
|
2476
|
+
return r("rect", e._b({ key: l.key, attrs: { "data-j-alluvial-sub-nodes": "" }, on: { click: function(i) {
|
|
2477
|
+
return n.handleNodeBlockClick(a.node);
|
|
2478
|
+
} } }, "rect", l, !1));
|
|
2479
|
+
}) : r("rect", { staticClass: "lume-alluvial-group__node-block", class: `lume-fill--${a.node.color || a.node.fallbackColor}`, attrs: { x: a.x, y: a.y, height: a.height, width: a.width }, on: { click: function(l) {
|
|
2480
|
+
return n.handleNodeBlockClick(a.node);
|
|
2481
|
+
} } }), n.isExpandableNode(a.node.id) ? r("rect", { staticClass: "lume-alluvial-group__node-outline", class: `lume-stroke--${a.node.color || a.node.fallbackColor}`, attrs: { x: a.x - n.NODE_OUTLINE_PADDING, y: a.y - n.NODE_OUTLINE_PADDING, height: a.height + n.NODE_OUTLINE_PADDING * 2, width: a.width + n.NODE_OUTLINE_PADDING * 2, rx: n.NODE_OUTLINE_RADIUS, "data-j-alluvial-node-outline": "" }, on: { click: function(l) {
|
|
2482
|
+
return n.handleNodeBlockClick(a.node);
|
|
2483
|
+
} } }) : e._e(), r("g", { ref: "nodeTextRefs", refInFor: !0, staticClass: "lume-alluvial-group__node-text lume-typography--caption", class: {
|
|
2466
2484
|
"lume-alluvial-group__node-text--left": n.isLabelBeforeNode(
|
|
2467
2485
|
a.node
|
|
2468
2486
|
)
|
|
@@ -2479,7 +2497,7 @@ var eo = function() {
|
|
|
2479
2497
|
to,
|
|
2480
2498
|
!1,
|
|
2481
2499
|
null,
|
|
2482
|
-
"
|
|
2500
|
+
"0f56c6f5"
|
|
2483
2501
|
);
|
|
2484
2502
|
const ro = no.exports, ao = {
|
|
2485
2503
|
margins: {
|
|
@@ -2500,52 +2518,53 @@ const ro = no.exports, ao = {
|
|
|
2500
2518
|
nodePadding: 16,
|
|
2501
2519
|
nodeWidth: 16,
|
|
2502
2520
|
nodeAlign: qt,
|
|
2521
|
+
nodeExpansionTrigger: "node",
|
|
2503
2522
|
valueFormat: (t) => String(t),
|
|
2504
2523
|
iterations: 6
|
|
2505
|
-
}, oo = /* @__PURE__ */
|
|
2524
|
+
}, oo = /* @__PURE__ */ R({
|
|
2506
2525
|
__name: "lume-alluvial-diagram",
|
|
2507
2526
|
props: {
|
|
2508
2527
|
...or(Ke)
|
|
2509
2528
|
},
|
|
2510
2529
|
setup(t, { emit: e }) {
|
|
2511
|
-
const r = t, { componentEventPropagator: n } = q(e), a = se(
|
|
2512
|
-
function
|
|
2530
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), o = xn(X()), { options: l } = V(r), { allOptions: i } = Q(l, ao);
|
|
2531
|
+
function u(c) {
|
|
2513
2532
|
return {
|
|
2514
2533
|
...c,
|
|
2515
2534
|
noBaseScales: !0
|
|
2516
2535
|
// Alluvial chart never uses base scales
|
|
2517
2536
|
};
|
|
2518
2537
|
}
|
|
2519
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options:
|
|
2538
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: fe, LumeAlluvialGroup: ro };
|
|
2520
2539
|
}
|
|
2521
2540
|
});
|
|
2522
|
-
var
|
|
2541
|
+
var lo = function() {
|
|
2523
2542
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2524
2543
|
return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2525
|
-
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o,
|
|
2526
|
-
return { key:
|
|
2527
|
-
return [e._t(
|
|
2544
|
+
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
2545
|
+
return { key: l, fn: function(i) {
|
|
2546
|
+
return [e._t(l, null, null, i || {})];
|
|
2528
2547
|
} };
|
|
2529
2548
|
})], null, !0) }, "lume-alluvial-group", a, !1), n.componentEventPropagator))];
|
|
2530
2549
|
} }, e._l(n.slots, function(a, o) {
|
|
2531
|
-
return { key: o, fn: function(
|
|
2532
|
-
return [e._t(o, null, null,
|
|
2550
|
+
return { key: o, fn: function(l) {
|
|
2551
|
+
return [e._t(o, null, null, l || {})];
|
|
2533
2552
|
} };
|
|
2534
2553
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2535
|
-
},
|
|
2554
|
+
}, uo = [], io = /* @__PURE__ */ S(
|
|
2536
2555
|
oo,
|
|
2537
|
-
uo,
|
|
2538
2556
|
lo,
|
|
2557
|
+
uo,
|
|
2539
2558
|
!1,
|
|
2540
2559
|
null,
|
|
2541
2560
|
null
|
|
2542
2561
|
);
|
|
2543
|
-
const
|
|
2562
|
+
const xl = io.exports;
|
|
2544
2563
|
var Ye = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ye || {});
|
|
2545
|
-
const so = /* @__PURE__ */
|
|
2564
|
+
const so = /* @__PURE__ */ R({
|
|
2546
2565
|
__name: "lume-bar-chart",
|
|
2547
2566
|
props: {
|
|
2548
|
-
...
|
|
2567
|
+
...ve(),
|
|
2549
2568
|
type: {
|
|
2550
2569
|
type: String,
|
|
2551
2570
|
default: null,
|
|
@@ -2554,41 +2573,41 @@ const so = /* @__PURE__ */ P({
|
|
|
2554
2573
|
},
|
|
2555
2574
|
setup(t, { emit: e }) {
|
|
2556
2575
|
const r = t, n = Re(
|
|
2557
|
-
() => import("./
|
|
2576
|
+
() => import("./asrcm8__.js")
|
|
2558
2577
|
), a = Re(
|
|
2559
|
-
() => import("./
|
|
2578
|
+
() => import("./BSSy21i7.js")
|
|
2560
2579
|
), o = Re(
|
|
2561
|
-
() => import("./
|
|
2562
|
-
),
|
|
2580
|
+
() => import("./es6xM4zX.js")
|
|
2581
|
+
), l = /* @__PURE__ */ new Map([
|
|
2563
2582
|
["single", n],
|
|
2564
2583
|
["grouped", a],
|
|
2565
2584
|
["stacked", o]
|
|
2566
|
-
]), { componentEventPropagator: i } = q(e),
|
|
2567
|
-
function c(
|
|
2585
|
+
]), { componentEventPropagator: i } = q(e), u = se(X());
|
|
2586
|
+
function c(f) {
|
|
2568
2587
|
return {
|
|
2569
|
-
...
|
|
2588
|
+
...f,
|
|
2570
2589
|
startOnZero: !0,
|
|
2571
2590
|
// Bar chart always starts on zero,
|
|
2572
2591
|
tooltipOptions: {
|
|
2573
|
-
...(
|
|
2592
|
+
...(f == null ? void 0 : f.tooltipOptions) || {},
|
|
2574
2593
|
position: r.orientation === O.HORIZONTAL ? "right" : void 0
|
|
2575
2594
|
}
|
|
2576
2595
|
};
|
|
2577
2596
|
}
|
|
2578
|
-
const s =
|
|
2579
|
-
if (Ke(r.data)) return
|
|
2597
|
+
const s = v(() => {
|
|
2598
|
+
if (Ke(r.data)) return l.get("single");
|
|
2580
2599
|
if (!r.type)
|
|
2581
2600
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2582
|
-
return
|
|
2601
|
+
return l.get(r.type);
|
|
2583
2602
|
});
|
|
2584
|
-
return { __sfc: !0, TYPES: Ye, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP:
|
|
2603
|
+
return { __sfc: !0, TYPES: Ye, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: s };
|
|
2585
2604
|
}
|
|
2586
2605
|
});
|
|
2587
2606
|
var co = function() {
|
|
2588
2607
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2589
2608
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2590
|
-
return { key: o, fn: function(
|
|
2591
|
-
return [e._t(o, null, null,
|
|
2609
|
+
return { key: o, fn: function(l) {
|
|
2610
|
+
return [e._t(o, null, null, l || {})];
|
|
2592
2611
|
} };
|
|
2593
2612
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2594
2613
|
}, vo = [], fo = /* @__PURE__ */ S(
|
|
@@ -2599,7 +2618,7 @@ var co = function() {
|
|
|
2599
2618
|
null,
|
|
2600
2619
|
null
|
|
2601
2620
|
);
|
|
2602
|
-
const
|
|
2621
|
+
const Ll = fo.exports;
|
|
2603
2622
|
function po(t) {
|
|
2604
2623
|
return Object.values(On).includes(t) || t == null;
|
|
2605
2624
|
}
|
|
@@ -2620,23 +2639,23 @@ const _o = (t = !1) => ({
|
|
|
2620
2639
|
}
|
|
2621
2640
|
} : {}
|
|
2622
2641
|
});
|
|
2623
|
-
function
|
|
2624
|
-
const r =
|
|
2642
|
+
function Zt(t, e) {
|
|
2643
|
+
const r = v(() => t.value.map((a) => {
|
|
2625
2644
|
var o;
|
|
2626
2645
|
return {
|
|
2627
2646
|
...a,
|
|
2628
2647
|
values: Je(
|
|
2629
2648
|
a.values,
|
|
2630
2649
|
((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) ?? 0
|
|
2631
|
-
).map((
|
|
2632
|
-
...
|
|
2633
|
-
value: (
|
|
2650
|
+
).map((l) => ({
|
|
2651
|
+
...l,
|
|
2652
|
+
value: (l == null ? void 0 : l.value) || 0
|
|
2634
2653
|
}))
|
|
2635
2654
|
};
|
|
2636
|
-
})), n =
|
|
2655
|
+
})), n = v(() => {
|
|
2637
2656
|
var a;
|
|
2638
|
-
return (a = r.value) == null ? void 0 : a.reduce((o,
|
|
2639
|
-
o[
|
|
2657
|
+
return (a = r.value) == null ? void 0 : a.reduce((o, l) => (l.values.forEach((i, u) => {
|
|
2658
|
+
o[u] ? o[u].push(i) : o[u] = [i];
|
|
2640
2659
|
}), o), []);
|
|
2641
2660
|
});
|
|
2642
2661
|
return { multiBarData: r, groupedData: n };
|
|
@@ -2645,14 +2664,14 @@ function go(t, e) {
|
|
|
2645
2664
|
return t.value.length === 1 ? "single" : e.value;
|
|
2646
2665
|
}
|
|
2647
2666
|
function ho(t, e, r) {
|
|
2648
|
-
const n =
|
|
2667
|
+
const n = v(
|
|
2649
2668
|
() => r.value === O.HORIZONTAL
|
|
2650
2669
|
);
|
|
2651
2670
|
function a(i) {
|
|
2652
|
-
i || Ue(
|
|
2671
|
+
i || Ue(Ae.BarScaleNull), Math.min(...i.domain()) > 0 && Ue(Ae.BarScaleDomainAbove0);
|
|
2653
2672
|
}
|
|
2654
|
-
const o =
|
|
2655
|
-
return { barXScale: o, barYScale:
|
|
2673
|
+
const o = v(() => n.value ? (a(t.value), t.value) : t.value), l = v(() => n.value ? e.value : (a(e.value), e.value));
|
|
2674
|
+
return { barXScale: o, barYScale: l };
|
|
2656
2675
|
}
|
|
2657
2676
|
const yo = {
|
|
2658
2677
|
x: 0,
|
|
@@ -2661,28 +2680,28 @@ const yo = {
|
|
|
2661
2680
|
height: 0
|
|
2662
2681
|
};
|
|
2663
2682
|
function bo(t, e, r, n, a, o) {
|
|
2664
|
-
const
|
|
2683
|
+
const l = v(
|
|
2665
2684
|
() => n.value === O.HORIZONTAL
|
|
2666
2685
|
);
|
|
2667
|
-
function i(
|
|
2686
|
+
function i(f, m) {
|
|
2668
2687
|
let h, g;
|
|
2669
|
-
return
|
|
2688
|
+
return l.value ? (h = f >= 0 ? e.value(0) : e.value(f), g = r.value(r.value.domain()[m])) : (h = e.value(e.value.domain()[m]), g = f < 0 ? r.value(0) : r.value(f)), { x: h, y: g };
|
|
2670
2689
|
}
|
|
2671
|
-
function
|
|
2672
|
-
return
|
|
2690
|
+
function u(f) {
|
|
2691
|
+
return l.value ? f < 0 ? e.value(0) - e.value(f) : e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2673
2692
|
}
|
|
2674
|
-
function c(
|
|
2675
|
-
return
|
|
2693
|
+
function c(f) {
|
|
2694
|
+
return l.value ? r.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
|
|
2676
2695
|
}
|
|
2677
|
-
function s(
|
|
2696
|
+
function s(f, m, h) {
|
|
2678
2697
|
if (!(e.value && r.value)) return yo;
|
|
2679
|
-
const { value: _, color: x } =
|
|
2698
|
+
const { value: _, color: x } = f, d = x ?? t.value[m].color ?? ke, { x: p, y } = i(_, h), k = u(_), T = c(_);
|
|
2680
2699
|
return {
|
|
2681
2700
|
classList: [`lume-fill--${d}`, ...o],
|
|
2682
2701
|
x: p,
|
|
2683
2702
|
y,
|
|
2684
|
-
width:
|
|
2685
|
-
height:
|
|
2703
|
+
width: k,
|
|
2704
|
+
height: T,
|
|
2686
2705
|
isFaded: a.value !== -1 && a.value !== h,
|
|
2687
2706
|
isNegative: _ < 0
|
|
2688
2707
|
};
|
|
@@ -2696,37 +2715,37 @@ const ko = {
|
|
|
2696
2715
|
height: 0
|
|
2697
2716
|
};
|
|
2698
2717
|
function xo(t, e, r, n, a, o) {
|
|
2699
|
-
const
|
|
2718
|
+
const l = v(
|
|
2700
2719
|
() => n.value === O.HORIZONTAL
|
|
2701
|
-
), i =
|
|
2720
|
+
), i = v(() => he().domain(t.value.map((g, _) => _)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => he().domain(t.value.map((g, _) => _)).range([0, r.value.bandwidth()]).padding(0));
|
|
2702
2721
|
function c(g, _, x) {
|
|
2703
|
-
if (
|
|
2722
|
+
if (l.value)
|
|
2704
2723
|
return g >= 0 ? e.value(0) : e.value(g);
|
|
2705
2724
|
const d = e.value.domain();
|
|
2706
2725
|
return e.value(d[_]) + i.value(x);
|
|
2707
2726
|
}
|
|
2708
2727
|
function s(g, _, x) {
|
|
2709
|
-
if (
|
|
2728
|
+
if (l.value) {
|
|
2710
2729
|
const d = r.value.domain();
|
|
2711
|
-
return r.value(d[_]) +
|
|
2730
|
+
return r.value(d[_]) + u.value(x);
|
|
2712
2731
|
}
|
|
2713
2732
|
return g < 0 ? r.value(0) : r.value(g);
|
|
2714
2733
|
}
|
|
2715
|
-
function
|
|
2716
|
-
return
|
|
2734
|
+
function f(g) {
|
|
2735
|
+
return l.value ? g < 0 ? e.value(0) - e.value(g) : e.value(g) - e.value(0) : i.value.bandwidth();
|
|
2717
2736
|
}
|
|
2718
2737
|
function m(g) {
|
|
2719
|
-
return
|
|
2738
|
+
return l.value ? u.value.bandwidth() : g < 0 ? r.value(g) - r.value(0) : r.value(0) - r.value(g);
|
|
2720
2739
|
}
|
|
2721
2740
|
function h(g, _, x) {
|
|
2722
2741
|
if (!(e.value && r.value)) return ko;
|
|
2723
|
-
const { value: p, color: y } = g,
|
|
2742
|
+
const { value: p, color: y } = g, k = y ?? t.value[_].color ?? Object.values(Y)[_], T = c(p, x, _), N = s(p, x, _), A = f(p), D = m(p);
|
|
2724
2743
|
return {
|
|
2725
|
-
classList: [`lume-fill--${
|
|
2726
|
-
x:
|
|
2744
|
+
classList: [`lume-fill--${k}`, ...o],
|
|
2745
|
+
x: T,
|
|
2727
2746
|
y: N,
|
|
2728
|
-
width:
|
|
2729
|
-
height:
|
|
2747
|
+
width: A,
|
|
2748
|
+
height: D,
|
|
2730
2749
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2731
2750
|
isNegative: p < 0
|
|
2732
2751
|
};
|
|
@@ -2734,96 +2753,96 @@ function xo(t, e, r, n, a, o) {
|
|
|
2734
2753
|
return { barAttributeGenerator: h };
|
|
2735
2754
|
}
|
|
2736
2755
|
function Lo(t, e, r) {
|
|
2737
|
-
const n =
|
|
2756
|
+
const n = v(
|
|
2738
2757
|
() => e.value === O.HORIZONTAL
|
|
2739
|
-
), a =
|
|
2740
|
-
const
|
|
2741
|
-
(c) => c.filter((s) => s.value < 0).reduce((s,
|
|
2758
|
+
), a = v(() => {
|
|
2759
|
+
const u = t.value.map(
|
|
2760
|
+
(c) => c.filter((s) => s.value < 0).reduce((s, f) => s + f.value, 0)
|
|
2742
2761
|
);
|
|
2743
|
-
return Math.min(...
|
|
2744
|
-
}), o =
|
|
2745
|
-
const
|
|
2762
|
+
return Math.min(...u);
|
|
2763
|
+
}), o = v(() => {
|
|
2764
|
+
const u = t.value.map(
|
|
2746
2765
|
(c) => c.reduce(
|
|
2747
|
-
(s,
|
|
2766
|
+
(s, f) => f.value >= 0 ? s + f.value : s,
|
|
2748
2767
|
0
|
|
2749
2768
|
)
|
|
2750
2769
|
);
|
|
2751
|
-
return Math.max(...
|
|
2770
|
+
return Math.max(...u);
|
|
2752
2771
|
});
|
|
2753
|
-
function u
|
|
2754
|
-
return c.length ? n.value ?
|
|
2755
|
-
|
|
2756
|
-
|
|
2772
|
+
function l(u, c, s) {
|
|
2773
|
+
return c.length ? n.value ? ge().domain([a.value, o.value]).range([0, s.width]) : Object.assign(
|
|
2774
|
+
mt(
|
|
2775
|
+
he().domain(c.map((f, m) => m)).range([0, s.width]),
|
|
2757
2776
|
e.value,
|
|
2758
2777
|
r.value
|
|
2759
2778
|
),
|
|
2760
2779
|
{ labels: c }
|
|
2761
2780
|
) : null;
|
|
2762
2781
|
}
|
|
2763
|
-
function i(
|
|
2782
|
+
function i(u, c, s) {
|
|
2764
2783
|
return c.length ? n.value ? Object.assign(
|
|
2765
|
-
|
|
2766
|
-
|
|
2784
|
+
mt(
|
|
2785
|
+
he().domain(c.map((f, m) => m)).range([0, s.height]),
|
|
2767
2786
|
e.value,
|
|
2768
2787
|
r.value
|
|
2769
2788
|
),
|
|
2770
2789
|
{ labels: c }
|
|
2771
|
-
) :
|
|
2790
|
+
) : ge().domain([o.value, a.value]).range([0, s.height]) : null;
|
|
2772
2791
|
}
|
|
2773
|
-
return { stackedXScaleGenerator:
|
|
2792
|
+
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2774
2793
|
}
|
|
2775
|
-
function
|
|
2776
|
-
const
|
|
2794
|
+
function To(t, e, r, n, a, o) {
|
|
2795
|
+
const l = v(
|
|
2777
2796
|
() => n.value === O.HORIZONTAL
|
|
2778
|
-
), i =
|
|
2779
|
-
() =>
|
|
2780
|
-
),
|
|
2797
|
+
), i = v(
|
|
2798
|
+
() => l.value ? r.value.domain() : e.value.domain()
|
|
2799
|
+
), u = v(
|
|
2781
2800
|
() => t.value.map((d) => d.values.map((p) => p == null ? void 0 : p.value))
|
|
2782
2801
|
);
|
|
2783
2802
|
function c(d, p, y) {
|
|
2784
|
-
let
|
|
2785
|
-
return
|
|
2803
|
+
let k, T;
|
|
2804
|
+
return l.value ? (k = e.value(d >= 0 ? 0 + y : d + y), T = r.value(i.value[p])) : (k = e.value(i.value[p]), T = r.value(d >= 0 ? d + y : 0 + y)), { x: k, y: T };
|
|
2786
2805
|
}
|
|
2787
2806
|
function s(d) {
|
|
2788
|
-
return
|
|
2807
|
+
return l.value ? e.value(d) - e.value(0) : e.value.bandwidth();
|
|
2789
2808
|
}
|
|
2790
|
-
function
|
|
2791
|
-
return
|
|
2809
|
+
function f(d) {
|
|
2810
|
+
return l.value ? e.value(0) - e.value(d) : e.value.bandwidth();
|
|
2792
2811
|
}
|
|
2793
2812
|
function m(d) {
|
|
2794
|
-
return
|
|
2813
|
+
return l.value ? r.value.bandwidth() : r.value(0) - r.value(d);
|
|
2795
2814
|
}
|
|
2796
2815
|
function h(d) {
|
|
2797
|
-
return
|
|
2816
|
+
return l.value ? r.value.bandwidth() : r.value(d) - r.value(0);
|
|
2798
2817
|
}
|
|
2799
2818
|
function g(d, p) {
|
|
2800
|
-
return d ?
|
|
2819
|
+
return d ? u.value.reduce((y, k, T) => (T < d && k[p] >= 0 && (y += k[p]), y), 0) : 0;
|
|
2801
2820
|
}
|
|
2802
2821
|
function _(d, p) {
|
|
2803
|
-
return d ?
|
|
2822
|
+
return d ? u.value.reduce((y, k, T) => (T < d && k[p] < 0 && (y += k[p]), y), 0) : 0;
|
|
2804
2823
|
}
|
|
2805
2824
|
function x(d, p, y) {
|
|
2806
|
-
const { value:
|
|
2825
|
+
const { value: k, color: T } = d, N = k >= 0 ? s(k) : f(k), A = k >= 0 ? m(k) : h(k), D = k >= 0 ? g(p, y) : _(p, y), { x: C, y: M } = c(k, y, D);
|
|
2807
2826
|
return {
|
|
2808
|
-
classList: [`lume-fill--${
|
|
2827
|
+
classList: [`lume-fill--${T ?? t.value[p].color ?? Object.values(Y)[p]}`, ...o],
|
|
2809
2828
|
width: N,
|
|
2810
|
-
height:
|
|
2811
|
-
x:
|
|
2812
|
-
y:
|
|
2829
|
+
height: A,
|
|
2830
|
+
x: C,
|
|
2831
|
+
y: M,
|
|
2813
2832
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2814
|
-
isNegative:
|
|
2833
|
+
isNegative: k < 0
|
|
2815
2834
|
};
|
|
2816
2835
|
}
|
|
2817
2836
|
return { barAttributeGenerator: x };
|
|
2818
2837
|
}
|
|
2819
|
-
const
|
|
2838
|
+
const Lt = {
|
|
2820
2839
|
single: bo,
|
|
2821
2840
|
grouped: xo,
|
|
2822
|
-
stacked:
|
|
2823
|
-
},
|
|
2841
|
+
stacked: To
|
|
2842
|
+
}, Ao = /* @__PURE__ */ R({
|
|
2824
2843
|
__name: "lume-bar-group",
|
|
2825
2844
|
props: {
|
|
2826
|
-
...
|
|
2845
|
+
...Ee(),
|
|
2827
2846
|
classList: {
|
|
2828
2847
|
type: [String, Array],
|
|
2829
2848
|
default: () => []
|
|
@@ -2840,14 +2859,14 @@ const xt = {
|
|
|
2840
2859
|
data: n,
|
|
2841
2860
|
hoveredIndex: a,
|
|
2842
2861
|
orientation: o,
|
|
2843
|
-
transition:
|
|
2862
|
+
transition: l,
|
|
2844
2863
|
type: i,
|
|
2845
|
-
xScale:
|
|
2864
|
+
xScale: u,
|
|
2846
2865
|
yScale: c,
|
|
2847
2866
|
classList: s,
|
|
2848
|
-
labels:
|
|
2849
|
-
} =
|
|
2850
|
-
const
|
|
2867
|
+
labels: f
|
|
2868
|
+
} = V(r), m = Oe("chartID"), { emitInternalEvent: h } = q(e, m), { groupedData: g } = Zt(n, f), { barXScale: _, barYScale: x } = ho(u, c, o), d = v(() => typeof s.value == "string" ? [s.value] : s.value), p = v(() => {
|
|
2869
|
+
const T = go(n, i), { barAttributeGenerator: N } = Lt[T](
|
|
2851
2870
|
n,
|
|
2852
2871
|
_,
|
|
2853
2872
|
x,
|
|
@@ -2856,40 +2875,40 @@ const xt = {
|
|
|
2856
2875
|
d.value
|
|
2857
2876
|
);
|
|
2858
2877
|
return N;
|
|
2859
|
-
}), y =
|
|
2860
|
-
if (
|
|
2878
|
+
}), y = v(() => {
|
|
2879
|
+
if (l.value)
|
|
2861
2880
|
return o.value === O.HORIZONTAL ? "width" : "height";
|
|
2862
2881
|
});
|
|
2863
|
-
async function
|
|
2864
|
-
e("lume__internal--hover",
|
|
2882
|
+
async function k(T) {
|
|
2883
|
+
e("lume__internal--hover", T), h("lume__internal--hover", T);
|
|
2865
2884
|
}
|
|
2866
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2885
|
+
return { __sfc: !0, MIXIN_MAP: Lt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: s, labels: f, chartID: m, emitInternalEvent: h, groupedData: g, barXScale: _, barYScale: x, computedClasses: d, getBarAttributes: p, computedTransition: y, handleInternalHover: k, LumeBar: Qe };
|
|
2867
2886
|
}
|
|
2868
2887
|
});
|
|
2869
2888
|
var Oo = function() {
|
|
2870
2889
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2871
2890
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2872
|
-
return r("g", { key: o, on: { mouseenter: function(
|
|
2891
|
+
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
2873
2892
|
return n.handleInternalHover(o);
|
|
2874
|
-
} } }, e._l(a, function(
|
|
2875
|
-
return r(n.LumeBar, e._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(
|
|
2893
|
+
} } }, e._l(a, function(l, i) {
|
|
2894
|
+
return r(n.LumeBar, e._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(u) {
|
|
2876
2895
|
return n.emit("bar-click", {
|
|
2877
2896
|
index: o,
|
|
2878
2897
|
datasetIndex: i,
|
|
2879
|
-
event:
|
|
2898
|
+
event: u
|
|
2880
2899
|
});
|
|
2881
|
-
} } }, "lume-bar", n.getBarAttributes(
|
|
2900
|
+
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2882
2901
|
}), 1);
|
|
2883
2902
|
}), 0);
|
|
2884
2903
|
}, Io = [], No = /* @__PURE__ */ S(
|
|
2885
|
-
|
|
2904
|
+
Ao,
|
|
2886
2905
|
Oo,
|
|
2887
2906
|
Io,
|
|
2888
2907
|
!1,
|
|
2889
2908
|
null,
|
|
2890
2909
|
null
|
|
2891
2910
|
);
|
|
2892
|
-
const
|
|
2911
|
+
const ut = No.exports, Eo = {
|
|
2893
2912
|
[O.VERTICAL]: {
|
|
2894
2913
|
withTooltip: !0,
|
|
2895
2914
|
xAxisOptions: {},
|
|
@@ -2902,17 +2921,17 @@ const lt = No.exports, Eo = {
|
|
|
2902
2921
|
yAxisOptions: { gridLines: !1 },
|
|
2903
2922
|
margins: ie.HORIZONTAL
|
|
2904
2923
|
}
|
|
2905
|
-
}, $o = /* @__PURE__ */
|
|
2924
|
+
}, $o = /* @__PURE__ */ R({
|
|
2906
2925
|
__name: "lume-single-bar-chart",
|
|
2907
2926
|
props: {
|
|
2908
|
-
...
|
|
2927
|
+
...ve(Ke)
|
|
2909
2928
|
},
|
|
2910
2929
|
setup(t, { emit: e }) {
|
|
2911
|
-
const r = t, { componentEventPropagator: n } = q(e), a = se(
|
|
2930
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
|
|
2912
2931
|
() => Eo[o.value || O.VERTICAL]
|
|
2913
2932
|
// needs to be computed so that default options are reactive
|
|
2914
|
-
), { allOptions:
|
|
2915
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options:
|
|
2933
|
+
), { allOptions: u } = Q(l, i);
|
|
2934
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
|
|
2916
2935
|
}
|
|
2917
2936
|
});
|
|
2918
2937
|
var wo = function() {
|
|
@@ -2920,8 +2939,8 @@ var wo = function() {
|
|
|
2920
2939
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2921
2940
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
2922
2941
|
} }, e._l(n.slots, function(a, o) {
|
|
2923
|
-
return { key: o, fn: function(
|
|
2924
|
-
return [e._t(o, null, null,
|
|
2942
|
+
return { key: o, fn: function(l) {
|
|
2943
|
+
return [e._t(o, null, null, l || {})];
|
|
2925
2944
|
} };
|
|
2926
2945
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2927
2946
|
}, Do = [], Ho = /* @__PURE__ */ S(
|
|
@@ -2932,7 +2951,7 @@ var wo = function() {
|
|
|
2932
2951
|
null,
|
|
2933
2952
|
null
|
|
2934
2953
|
);
|
|
2935
|
-
const
|
|
2954
|
+
const Tl = Ho.exports, So = {
|
|
2936
2955
|
[O.VERTICAL]: {
|
|
2937
2956
|
withTooltip: !0,
|
|
2938
2957
|
xAxisOptions: {},
|
|
@@ -2946,20 +2965,20 @@ const Au = Ho.exports, So = {
|
|
|
2946
2965
|
margins: ie.HORIZONTAL,
|
|
2947
2966
|
tooltipOptions: { position: "right" }
|
|
2948
2967
|
}
|
|
2949
|
-
}, Po = /* @__PURE__ */
|
|
2968
|
+
}, Po = /* @__PURE__ */ R({
|
|
2950
2969
|
__name: "lume-grouped-bar-chart",
|
|
2951
2970
|
props: {
|
|
2952
|
-
...
|
|
2971
|
+
...ve()
|
|
2953
2972
|
},
|
|
2954
2973
|
setup(t, { emit: e }) {
|
|
2955
|
-
const r = t, { componentEventPropagator: n } = q(e), a = se(
|
|
2974
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
|
|
2956
2975
|
() => So[o.value || O.VERTICAL]
|
|
2957
2976
|
// needs to be computed so that default options are reactive
|
|
2958
|
-
), { allOptions:
|
|
2959
|
-
|
|
2977
|
+
), { allOptions: u } = Q(
|
|
2978
|
+
l,
|
|
2960
2979
|
i
|
|
2961
2980
|
);
|
|
2962
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options:
|
|
2981
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
|
|
2963
2982
|
}
|
|
2964
2983
|
});
|
|
2965
2984
|
var Ro = function() {
|
|
@@ -2967,19 +2986,19 @@ var Ro = function() {
|
|
|
2967
2986
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2968
2987
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
2969
2988
|
} }, e._l(n.slots, function(a, o) {
|
|
2970
|
-
return { key: o, fn: function(
|
|
2971
|
-
return [e._t(o, null, null,
|
|
2989
|
+
return { key: o, fn: function(l) {
|
|
2990
|
+
return [e._t(o, null, null, l || {})];
|
|
2972
2991
|
} };
|
|
2973
2992
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2974
|
-
},
|
|
2993
|
+
}, Bo = [], Co = /* @__PURE__ */ S(
|
|
2975
2994
|
Po,
|
|
2976
2995
|
Ro,
|
|
2977
|
-
|
|
2996
|
+
Bo,
|
|
2978
2997
|
!1,
|
|
2979
2998
|
null,
|
|
2980
2999
|
null
|
|
2981
3000
|
);
|
|
2982
|
-
const
|
|
3001
|
+
const Al = Co.exports, Fo = {
|
|
2983
3002
|
[O.VERTICAL]: {
|
|
2984
3003
|
withTooltip: !0,
|
|
2985
3004
|
xAxisOptions: {},
|
|
@@ -2994,24 +3013,24 @@ const Tu = Bo.exports, Fo = {
|
|
|
2994
3013
|
margins: ie.HORIZONTAL,
|
|
2995
3014
|
tooltipOptions: { position: "right" }
|
|
2996
3015
|
}
|
|
2997
|
-
}, Go = /* @__PURE__ */
|
|
3016
|
+
}, Go = /* @__PURE__ */ R({
|
|
2998
3017
|
__name: "lume-stacked-bar-chart",
|
|
2999
3018
|
props: {
|
|
3000
|
-
...
|
|
3019
|
+
...ve()
|
|
3001
3020
|
},
|
|
3002
3021
|
setup(t, { emit: e }) {
|
|
3003
|
-
const r = t, { componentEventPropagator: n } = q(e), a = se(
|
|
3004
|
-
() => Fo[
|
|
3022
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { data: o, orientation: l, options: i, labels: u } = V(r), c = v(
|
|
3023
|
+
() => Fo[l.value || O.VERTICAL]
|
|
3005
3024
|
// needs to be computed so that default options are reactive
|
|
3006
3025
|
), { allOptions: s } = Q(
|
|
3007
3026
|
i,
|
|
3008
3027
|
c
|
|
3009
|
-
), { internalData:
|
|
3028
|
+
), { internalData: f } = rt(o), { groupedData: m } = Zt(f, u), { stackedXScaleGenerator: h, stackedYScaleGenerator: g } = Lo(
|
|
3010
3029
|
m,
|
|
3011
|
-
|
|
3030
|
+
l,
|
|
3012
3031
|
i
|
|
3013
|
-
), _ =
|
|
3014
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation:
|
|
3032
|
+
), _ = v(() => r.xScale || h), x = v(() => r.yScale || g);
|
|
3033
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: s, internalData: f, groupedData: m, stackedXScaleGenerator: h, stackedYScaleGenerator: g, xScale: _, yScale: x, LumeChart: fe, LumeBarGroup: ut };
|
|
3015
3034
|
}
|
|
3016
3035
|
});
|
|
3017
3036
|
var jo = function() {
|
|
@@ -3019,8 +3038,8 @@ var jo = function() {
|
|
|
3019
3038
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3020
3039
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
3021
3040
|
} }, e._l(n.slots, function(a, o) {
|
|
3022
|
-
return { key: o, fn: function(
|
|
3023
|
-
return [e._t(o, null, null,
|
|
3041
|
+
return { key: o, fn: function(l) {
|
|
3042
|
+
return [e._t(o, null, null, l || {})];
|
|
3024
3043
|
} };
|
|
3025
3044
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3026
3045
|
}, Vo = [], Mo = /* @__PURE__ */ S(
|
|
@@ -3031,7 +3050,7 @@ var jo = function() {
|
|
|
3031
3050
|
null,
|
|
3032
3051
|
null
|
|
3033
3052
|
);
|
|
3034
|
-
const
|
|
3053
|
+
const Ol = Mo.exports, Tt = 2, zo = /* @__PURE__ */ R({
|
|
3035
3054
|
__name: "lume-line",
|
|
3036
3055
|
props: {
|
|
3037
3056
|
pathDefinition: {
|
|
@@ -3040,11 +3059,11 @@ const Ou = Mo.exports, Lt = 2, zo = /* @__PURE__ */ P({
|
|
|
3040
3059
|
},
|
|
3041
3060
|
width: {
|
|
3042
3061
|
type: Number,
|
|
3043
|
-
default:
|
|
3062
|
+
default: Tt
|
|
3044
3063
|
},
|
|
3045
3064
|
color: {
|
|
3046
3065
|
type: String,
|
|
3047
|
-
default:
|
|
3066
|
+
default: Y.Skyblue
|
|
3048
3067
|
},
|
|
3049
3068
|
dashed: {
|
|
3050
3069
|
type: Boolean,
|
|
@@ -3066,7 +3085,7 @@ const Ou = Mo.exports, Lt = 2, zo = /* @__PURE__ */ P({
|
|
|
3066
3085
|
emits: ["click"],
|
|
3067
3086
|
setup(t, { emit: e }) {
|
|
3068
3087
|
const r = I(null);
|
|
3069
|
-
return re(() =>
|
|
3088
|
+
return re(() => Ne(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Tt, emit: e, root: r };
|
|
3070
3089
|
}
|
|
3071
3090
|
});
|
|
3072
3091
|
var Wo = function() {
|
|
@@ -3089,20 +3108,20 @@ var Wo = function() {
|
|
|
3089
3108
|
null,
|
|
3090
3109
|
"59449838"
|
|
3091
3110
|
);
|
|
3092
|
-
const Xo = Zo.exports, At = 4,
|
|
3111
|
+
const Xo = Zo.exports, At = 4, Ot = 3, Yo = /* @__PURE__ */ R({
|
|
3093
3112
|
__name: "lume-point",
|
|
3094
3113
|
props: {
|
|
3095
3114
|
x: null,
|
|
3096
3115
|
y: null,
|
|
3097
|
-
color: { default:
|
|
3116
|
+
color: { default: Y.Skyblue },
|
|
3098
3117
|
radius: { default: At },
|
|
3099
3118
|
active: { type: Boolean, default: !1 },
|
|
3100
3119
|
visible: { type: Boolean, default: !1 }
|
|
3101
3120
|
},
|
|
3102
3121
|
emits: ["click"],
|
|
3103
3122
|
setup(t, { emit: e }) {
|
|
3104
|
-
const r = t, n = I(null), a =
|
|
3105
|
-
return re(() =>
|
|
3123
|
+
const r = t, n = I(null), a = v(() => r.radius / 2), o = v(() => r.active ? r.radius : r.visible ? Ot : 0);
|
|
3124
|
+
return re(() => Ne(n.value)), { __sfc: !0, DEFAULT_RADIUS: At, DEFAULT_VISIBLE_RADIUS: Ot, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
|
|
3106
3125
|
}
|
|
3107
3126
|
});
|
|
3108
3127
|
var Ko = function() {
|
|
@@ -3123,36 +3142,36 @@ var Ko = function() {
|
|
|
3123
3142
|
"080270c0"
|
|
3124
3143
|
);
|
|
3125
3144
|
const qo = Qo.exports;
|
|
3126
|
-
function
|
|
3127
|
-
function r(
|
|
3145
|
+
function Xt(t, e) {
|
|
3146
|
+
function r(l) {
|
|
3128
3147
|
let i = null;
|
|
3129
|
-
return
|
|
3148
|
+
return l == null ? void 0 : l.reduce((u, c, s) => (c == null || c.value == null ? (i ? i.push(s) : i = [s], s === (l == null ? void 0 : l.length) - 1 && u.push(i)) : i && (u.push(i), i = null), u), []);
|
|
3130
3149
|
}
|
|
3131
|
-
function n(
|
|
3132
|
-
const m = Math.abs(
|
|
3133
|
-
return
|
|
3150
|
+
function n(l, i, u, c) {
|
|
3151
|
+
const m = Math.abs(l - i) / (u + 1) * (c + 1);
|
|
3152
|
+
return l == null && i == null ? null : l > i ? l - m : l + m;
|
|
3134
3153
|
}
|
|
3135
|
-
function a(
|
|
3136
|
-
return function(
|
|
3137
|
-
return !!
|
|
3138
|
-
(c) => c.includes(
|
|
3154
|
+
function a(l) {
|
|
3155
|
+
return function(u) {
|
|
3156
|
+
return !!l.find(
|
|
3157
|
+
(c) => c.includes(u) || c.includes(u - 1)
|
|
3139
3158
|
);
|
|
3140
3159
|
};
|
|
3141
3160
|
}
|
|
3142
|
-
return { computedLineData:
|
|
3143
|
-
() => t.value.map((
|
|
3144
|
-
const i = r(
|
|
3161
|
+
return { computedLineData: v(
|
|
3162
|
+
() => t.value.map((l) => {
|
|
3163
|
+
const i = r(l.values);
|
|
3145
3164
|
return {
|
|
3146
|
-
...
|
|
3165
|
+
...l,
|
|
3147
3166
|
isDashed: a(i),
|
|
3148
|
-
values:
|
|
3149
|
-
var
|
|
3167
|
+
values: l.values.map((u, c) => {
|
|
3168
|
+
var f, m, h, g;
|
|
3150
3169
|
const s = i.find(
|
|
3151
3170
|
(_) => _.includes(c)
|
|
3152
3171
|
);
|
|
3153
3172
|
if (s) {
|
|
3154
3173
|
const _ = s[0] - 1, x = s[s.length - 1] + 1;
|
|
3155
|
-
let d = (
|
|
3174
|
+
let d = (f = l.values[_]) == null ? void 0 : f.value, p = (m = l.values[x]) == null ? void 0 : m.value;
|
|
3156
3175
|
if (d == null) {
|
|
3157
3176
|
const y = (g = (h = e == null ? void 0 : e.value) == null ? void 0 : h.domain) == null ? void 0 : g.call(h);
|
|
3158
3177
|
d = (y == null ? void 0 : y[1]) ?? 0, p = d;
|
|
@@ -3164,33 +3183,33 @@ function Zt(t, e) {
|
|
|
3164
3183
|
s.length,
|
|
3165
3184
|
s.indexOf(c)
|
|
3166
3185
|
),
|
|
3167
|
-
label:
|
|
3186
|
+
label: Pt,
|
|
3168
3187
|
isNull: !0
|
|
3169
3188
|
};
|
|
3170
3189
|
}
|
|
3171
|
-
return
|
|
3190
|
+
return u;
|
|
3172
3191
|
})
|
|
3173
3192
|
};
|
|
3174
3193
|
})
|
|
3175
3194
|
) };
|
|
3176
3195
|
}
|
|
3177
|
-
function
|
|
3196
|
+
function el(t, e) {
|
|
3178
3197
|
const r = t.bandwidth() / 2;
|
|
3179
3198
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
3180
3199
|
}
|
|
3181
|
-
function
|
|
3200
|
+
function tl(t, e) {
|
|
3182
3201
|
return (r, n) => t(e + (n - 1));
|
|
3183
3202
|
}
|
|
3184
|
-
function
|
|
3203
|
+
function nl(t, e, r, n) {
|
|
3185
3204
|
const a = rn().x(
|
|
3186
|
-
K(r) ?
|
|
3205
|
+
K(r) ? el(r, t) : tl(r, t)
|
|
3187
3206
|
).y((o) => n(o));
|
|
3188
3207
|
return e.every((o) => o == null) ? null : a(e);
|
|
3189
3208
|
}
|
|
3190
|
-
const
|
|
3209
|
+
const It = 1, rl = /* @__PURE__ */ R({
|
|
3191
3210
|
__name: "lume-line-group",
|
|
3192
3211
|
props: {
|
|
3193
|
-
...
|
|
3212
|
+
...Ee(),
|
|
3194
3213
|
withPoints: {
|
|
3195
3214
|
type: [Boolean, String],
|
|
3196
3215
|
default: !0
|
|
@@ -3202,152 +3221,152 @@ const Ot = 1, ru = /* @__PURE__ */ P({
|
|
|
3202
3221
|
},
|
|
3203
3222
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3204
3223
|
setup(t, { emit: e }) {
|
|
3205
|
-
const r = t, { data: n, options: a, xScale: o, yScale:
|
|
3224
|
+
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = V(r), u = Oe(
|
|
3206
3225
|
"tooltipAnchorAttributes",
|
|
3207
3226
|
null
|
|
3208
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
3209
|
-
|
|
3227
|
+
), { updateTooltipAnchorAttributes: c } = jt(
|
|
3228
|
+
u,
|
|
3210
3229
|
a,
|
|
3211
3230
|
o,
|
|
3212
|
-
|
|
3231
|
+
l,
|
|
3213
3232
|
i
|
|
3214
|
-
), s =
|
|
3215
|
-
if (n.value.every((
|
|
3233
|
+
), s = v(() => {
|
|
3234
|
+
if (n.value.every((D) => D.isDashed))
|
|
3216
3235
|
return n.value;
|
|
3217
|
-
const { computedLineData:
|
|
3236
|
+
const { computedLineData: A } = Xt(
|
|
3218
3237
|
n,
|
|
3219
|
-
|
|
3238
|
+
l
|
|
3220
3239
|
);
|
|
3221
|
-
return a.value.withTooltip !== !1 && (
|
|
3222
|
-
}),
|
|
3240
|
+
return a.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
|
|
3241
|
+
}), f = v(() => {
|
|
3223
3242
|
if (r.hoveredIndex === -1) return;
|
|
3224
|
-
const
|
|
3243
|
+
const A = hn(
|
|
3225
3244
|
s.value,
|
|
3226
3245
|
r.hoveredIndex
|
|
3227
3246
|
);
|
|
3228
3247
|
return {
|
|
3229
|
-
d: `M ${je(o.value, r.hoveredIndex)},${
|
|
3230
|
-
V ${
|
|
3248
|
+
d: `M ${je(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
3249
|
+
V ${l.value(A)}`
|
|
3231
3250
|
// Move to X index, Vertical line to the highest point
|
|
3232
3251
|
};
|
|
3233
|
-
}), m =
|
|
3234
|
-
() => o.value &&
|
|
3252
|
+
}), m = v(
|
|
3253
|
+
() => o.value && It / (yn(o.value) - 1)
|
|
3235
3254
|
// Subtracting the first line (read below)
|
|
3236
|
-
), h =
|
|
3255
|
+
), h = v(
|
|
3237
3256
|
() => {
|
|
3238
|
-
var
|
|
3239
|
-
return ((
|
|
3257
|
+
var A;
|
|
3258
|
+
return ((A = a.value) == null ? void 0 : A.lineWidth) * 2 || void 0;
|
|
3240
3259
|
}
|
|
3241
3260
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3242
|
-
), g =
|
|
3261
|
+
), g = v(
|
|
3243
3262
|
() => o.value.bandwidth() / 2
|
|
3244
|
-
), _ =
|
|
3263
|
+
), _ = v(() => o.value.domain()), x = v(
|
|
3245
3264
|
() => a.value.withPoints ?? r.withPoints
|
|
3246
|
-
), d =
|
|
3265
|
+
), d = v(
|
|
3247
3266
|
() => a.value.withPoints === "visible" || r.withPoints === "visible"
|
|
3248
3267
|
);
|
|
3249
|
-
function p(
|
|
3250
|
-
return s.value[
|
|
3251
|
-
}
|
|
3252
|
-
function y(
|
|
3253
|
-
var
|
|
3254
|
-
const
|
|
3255
|
-
(
|
|
3256
|
-
(
|
|
3268
|
+
function p(A) {
|
|
3269
|
+
return s.value[A].values;
|
|
3270
|
+
}
|
|
3271
|
+
function y(A, D) {
|
|
3272
|
+
var M, z;
|
|
3273
|
+
const C = A === 0 ? [] : [
|
|
3274
|
+
(M = p(D)[A - 1]) == null ? void 0 : M.value,
|
|
3275
|
+
(z = p(D)[A]) == null ? void 0 : z.value
|
|
3257
3276
|
];
|
|
3258
|
-
return
|
|
3259
|
-
|
|
3260
|
-
|
|
3277
|
+
return nl(
|
|
3278
|
+
A,
|
|
3279
|
+
C,
|
|
3261
3280
|
o.value,
|
|
3262
|
-
|
|
3281
|
+
l.value
|
|
3263
3282
|
) || "";
|
|
3264
3283
|
}
|
|
3265
|
-
function
|
|
3284
|
+
function k(A) {
|
|
3266
3285
|
return {
|
|
3267
|
-
animationDelay:
|
|
3286
|
+
animationDelay: A < 2 ? 0 : (A - 1) * m.value,
|
|
3268
3287
|
animationDuration: m.value
|
|
3269
3288
|
};
|
|
3270
3289
|
}
|
|
3271
|
-
function A
|
|
3272
|
-
var
|
|
3273
|
-
const
|
|
3290
|
+
function T(A, D) {
|
|
3291
|
+
var M;
|
|
3292
|
+
const C = (M = p(D)[A]) == null ? void 0 : M.value;
|
|
3274
3293
|
return {
|
|
3275
|
-
x: K(o.value) ? r.xScale(_.value[
|
|
3276
|
-
y:
|
|
3294
|
+
x: K(o.value) ? r.xScale(_.value[A]) + g.value : r.xScale(A),
|
|
3295
|
+
y: C === null ? l.value(l.value.domain()[1]) : l.value(C)
|
|
3277
3296
|
};
|
|
3278
3297
|
}
|
|
3279
|
-
function N(
|
|
3280
|
-
return r.hoveredIndex ===
|
|
3298
|
+
function N(A) {
|
|
3299
|
+
return r.hoveredIndex === A;
|
|
3281
3300
|
}
|
|
3282
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
3301
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: It, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: s, overlayLineAttributes: f, animationDuration: m, pointRadius: h, xAxisOffset: g, domain: _, computedWithPoints: x, computedVisiblePoints: d, getValuesFromDataset: p, getPathDefinition: y, getLineTransitionParams: k, getPointPosition: T, isPointActive: N, LumeLine: Xo, LumePoint: qo };
|
|
3283
3302
|
}
|
|
3284
3303
|
});
|
|
3285
|
-
var
|
|
3304
|
+
var al = function() {
|
|
3286
3305
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3287
3306
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
3288
|
-
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(
|
|
3289
|
-
return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: a.color, dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(
|
|
3290
|
-
return n.emit("line-click", { index: i, datasetIndex: o, event:
|
|
3307
|
+
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
|
|
3308
|
+
return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: a.color, dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(u) {
|
|
3309
|
+
return n.emit("line-click", { index: i, datasetIndex: o, event: u });
|
|
3291
3310
|
} } }, "lume-line", n.getLineTransitionParams(i), !1));
|
|
3292
|
-
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(
|
|
3293
|
-
return [
|
|
3294
|
-
return n.emit("point-click", { index: i, datasetIndex: o, event:
|
|
3311
|
+
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(l, i) {
|
|
3312
|
+
return [l.isNull ? e._e() : r(n.LumePoint, e._b({ attrs: { active: n.isPointActive(i), color: a.color, index: i, radius: n.pointRadius, visible: n.computedVisiblePoints }, on: { click: function(u) {
|
|
3313
|
+
return n.emit("point-click", { index: i, datasetIndex: o, event: u });
|
|
3295
3314
|
} } }, "lume-point", n.getPointPosition(i, o), !1))];
|
|
3296
3315
|
})], 2) : e._e()]);
|
|
3297
3316
|
})], 2);
|
|
3298
|
-
},
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3317
|
+
}, ol = [], ll = /* @__PURE__ */ S(
|
|
3318
|
+
rl,
|
|
3319
|
+
al,
|
|
3320
|
+
ol,
|
|
3302
3321
|
!1,
|
|
3303
3322
|
null,
|
|
3304
3323
|
"898c2e7a"
|
|
3305
3324
|
);
|
|
3306
|
-
const
|
|
3325
|
+
const Yt = ll.exports, ul = {
|
|
3307
3326
|
margins: ie.VERTICAL,
|
|
3308
3327
|
startOnZero: !0,
|
|
3309
3328
|
withTooltip: !0,
|
|
3310
3329
|
xAxisOptions: {},
|
|
3311
3330
|
yAxisOptions: { gridLines: !0 }
|
|
3312
|
-
},
|
|
3331
|
+
}, il = /* @__PURE__ */ R({
|
|
3313
3332
|
__name: "lume-line-chart",
|
|
3314
3333
|
props: {
|
|
3315
|
-
...
|
|
3334
|
+
...ve(null, !1)
|
|
3316
3335
|
},
|
|
3317
3336
|
setup(t, { emit: e }) {
|
|
3318
|
-
const r = t, { componentEventPropagator: n } = q(e), a = se(
|
|
3319
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions:
|
|
3337
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { options: o } = V(r), { allOptions: l } = Q(o, ul);
|
|
3338
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: fe, LumeLineGroup: Yt };
|
|
3320
3339
|
}
|
|
3321
3340
|
});
|
|
3322
|
-
var
|
|
3341
|
+
var sl = function() {
|
|
3323
3342
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3324
3343
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3325
3344
|
return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
3326
3345
|
} }, e._l(n.slots, function(a, o) {
|
|
3327
|
-
return { key: o, fn: function(
|
|
3328
|
-
return [e._t(o, null, null,
|
|
3346
|
+
return { key: o, fn: function(l) {
|
|
3347
|
+
return [e._t(o, null, null, l || {})];
|
|
3329
3348
|
} };
|
|
3330
3349
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3331
|
-
},
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3350
|
+
}, cl = [], dl = /* @__PURE__ */ S(
|
|
3351
|
+
il,
|
|
3352
|
+
sl,
|
|
3353
|
+
cl,
|
|
3335
3354
|
!1,
|
|
3336
3355
|
null,
|
|
3337
3356
|
null
|
|
3338
3357
|
);
|
|
3339
|
-
const
|
|
3340
|
-
function
|
|
3341
|
-
return { areaPathDefinition:
|
|
3358
|
+
const Il = dl.exports;
|
|
3359
|
+
function vl(t) {
|
|
3360
|
+
return { areaPathDefinition: v(
|
|
3342
3361
|
() => function(r, n) {
|
|
3343
3362
|
if (!r || !n || K(r) || K(n))
|
|
3344
3363
|
return;
|
|
3345
3364
|
const a = t.value[0].values;
|
|
3346
|
-
return an().x((o,
|
|
3365
|
+
return an().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
3347
3366
|
}
|
|
3348
3367
|
) };
|
|
3349
3368
|
}
|
|
3350
|
-
const
|
|
3369
|
+
const fl = {
|
|
3351
3370
|
margins: {
|
|
3352
3371
|
top: 0,
|
|
3353
3372
|
right: 0,
|
|
@@ -3361,20 +3380,20 @@ const fu = {
|
|
|
3361
3380
|
tooltipOptions: {
|
|
3362
3381
|
showTitle: !1
|
|
3363
3382
|
}
|
|
3364
|
-
},
|
|
3383
|
+
}, pl = /* @__PURE__ */ R({
|
|
3365
3384
|
__name: "lume-sparkline-chart",
|
|
3366
3385
|
props: {
|
|
3367
3386
|
...nt(null),
|
|
3368
|
-
...
|
|
3387
|
+
...ye()
|
|
3369
3388
|
},
|
|
3370
3389
|
setup(t, { expose: e, emit: r }) {
|
|
3371
|
-
const n = t, { componentEventPropagator: a } = q(r), o = se(
|
|
3390
|
+
const n = t, { componentEventPropagator: a } = q(r), o = se(X()), { data: l, options: i } = V(n), { internalData: u } = rt(l), { allOptions: c } = Q(i, fl), { computedLineData: s } = Xt(u), { areaPathDefinition: f } = vl(s), m = v(() => {
|
|
3372
3391
|
var x, d;
|
|
3373
|
-
return (d = (x =
|
|
3374
|
-
}), h =
|
|
3392
|
+
return (d = (x = u.value) == null ? void 0 : x[0]) == null ? void 0 : d.color;
|
|
3393
|
+
}), h = v(
|
|
3375
3394
|
() => {
|
|
3376
3395
|
var x, d;
|
|
3377
|
-
return ((d = (x =
|
|
3396
|
+
return ((d = (x = l.value) == null ? void 0 : x[0]) == null ? void 0 : d.areaColor) || m.value;
|
|
3378
3397
|
}
|
|
3379
3398
|
);
|
|
3380
3399
|
function g(x) {
|
|
@@ -3385,14 +3404,14 @@ const fu = {
|
|
|
3385
3404
|
}
|
|
3386
3405
|
function _(x, d, p) {
|
|
3387
3406
|
if (x.length)
|
|
3388
|
-
return
|
|
3407
|
+
return ge().range([0, p.width]).domain([0, x[0].values.length - 1]);
|
|
3389
3408
|
}
|
|
3390
3409
|
return e({
|
|
3391
|
-
areaPathDefinition:
|
|
3392
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data:
|
|
3410
|
+
areaPathDefinition: f
|
|
3411
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: s, areaPathDefinition: f, computedColor: m, areaColor: h, getSparklineOptions: g, xScaleGenerator: _, LumeChart: fe, LumeLineGroup: Yt };
|
|
3393
3412
|
}
|
|
3394
3413
|
});
|
|
3395
|
-
var
|
|
3414
|
+
var ml = function() {
|
|
3396
3415
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3397
3416
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3398
3417
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3402,69 +3421,69 @@ var mu = function() {
|
|
|
3402
3421
|
"lume-fill--faded"
|
|
3403
3422
|
], attrs: { d: n.areaPathDefinition(a.xScale, a.yScale), "data-j-sparkline__area": "" } }) : e._e(), r(n.LumeLineGroup, e._g(e._b({ attrs: { "with-points": !1 } }, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
3404
3423
|
} }, e._l(n.slots, function(a, o) {
|
|
3405
|
-
return { key: o, fn: function(
|
|
3406
|
-
return [e._t(o, null, null,
|
|
3424
|
+
return { key: o, fn: function(l) {
|
|
3425
|
+
return [e._t(o, null, null, l || {})];
|
|
3407
3426
|
} };
|
|
3408
3427
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3409
|
-
},
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3428
|
+
}, _l = [], gl = /* @__PURE__ */ S(
|
|
3429
|
+
pl,
|
|
3430
|
+
ml,
|
|
3431
|
+
_l,
|
|
3413
3432
|
!1,
|
|
3414
3433
|
null,
|
|
3415
3434
|
"579f7e32"
|
|
3416
3435
|
);
|
|
3417
|
-
const
|
|
3436
|
+
const Nl = gl.exports;
|
|
3418
3437
|
export {
|
|
3419
3438
|
Mr as A,
|
|
3420
|
-
|
|
3421
|
-
|
|
3439
|
+
mt as B,
|
|
3440
|
+
ue as C,
|
|
3422
3441
|
qe as D,
|
|
3423
3442
|
je as E,
|
|
3424
|
-
|
|
3443
|
+
pt as F,
|
|
3425
3444
|
at as G,
|
|
3426
3445
|
rt as H,
|
|
3427
3446
|
ar as I,
|
|
3428
|
-
|
|
3447
|
+
Xt as J,
|
|
3429
3448
|
zr as K,
|
|
3430
3449
|
tt as L,
|
|
3431
3450
|
Q as M,
|
|
3432
|
-
|
|
3451
|
+
lr as N,
|
|
3433
3452
|
et as O,
|
|
3434
3453
|
Zr as P,
|
|
3435
|
-
|
|
3454
|
+
jt as Q,
|
|
3436
3455
|
Xr as R,
|
|
3437
|
-
|
|
3456
|
+
Gt as S,
|
|
3438
3457
|
nt as T,
|
|
3439
|
-
|
|
3458
|
+
ve as U,
|
|
3440
3459
|
or as V,
|
|
3441
|
-
|
|
3460
|
+
ye as W,
|
|
3442
3461
|
rr as X,
|
|
3443
|
-
|
|
3462
|
+
Y as a,
|
|
3444
3463
|
ro as b,
|
|
3445
3464
|
ka as c,
|
|
3446
3465
|
da as d,
|
|
3447
3466
|
_a as e,
|
|
3448
3467
|
Gn as f,
|
|
3449
3468
|
Qe as g,
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3469
|
+
Ll as h,
|
|
3470
|
+
ut as i,
|
|
3471
|
+
fe as j,
|
|
3453
3472
|
dr as k,
|
|
3454
|
-
|
|
3473
|
+
xl as l,
|
|
3455
3474
|
_r as m,
|
|
3456
|
-
|
|
3475
|
+
Al as n,
|
|
3457
3476
|
Xo as o,
|
|
3458
|
-
|
|
3459
|
-
|
|
3477
|
+
Il as p,
|
|
3478
|
+
Yt as q,
|
|
3460
3479
|
jr as r,
|
|
3461
3480
|
qo as s,
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3481
|
+
Tl as t,
|
|
3482
|
+
Nl as u,
|
|
3483
|
+
Ol as v,
|
|
3465
3484
|
Rr as w,
|
|
3466
3485
|
wr as x,
|
|
3467
3486
|
Or as y,
|
|
3468
3487
|
kr as z
|
|
3469
3488
|
};
|
|
3470
|
-
//# sourceMappingURL=
|
|
3489
|
+
//# sourceMappingURL=h4DBladZ.js.map
|