@adyen/lume 1.2.1 → 1.4.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/index.js +330 -324
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as w, ref as I, isRef as
|
|
2
|
-
import { format as Bt, ticks as Ft, scaleBand as
|
|
1
|
+
import { defineComponent as w, ref as I, isRef as dt, computed as d, watch as H, toRefs as P, inject as de, reactive as ge, onMounted as J, onBeforeUnmount as vt, watchEffect as _t, useSlots as V, provide as Ae, defineAsyncComponent as Le } from "vue";
|
|
2
|
+
import { format as Bt, ticks as Ft, scaleBand as se, scaleLinear as ce, link as Gt, line as Vt, area as jt } from "d3";
|
|
3
3
|
import { createPopper as Mt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as zt, sankey as Wt, sankeyJustify as Zt } from "d3-sankey";
|
|
5
5
|
const Xt = /* @__PURE__ */ w({
|
|
@@ -101,15 +101,15 @@ const Jt = Kt.exports, Qt = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function pt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ft(t) {
|
|
108
108
|
return (t == null ? void 0 : t.map(
|
|
109
109
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
110
110
|
).flat()) || [];
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Be(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
115
|
function qt(t) {
|
|
@@ -117,17 +117,17 @@ function qt(t) {
|
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Oe(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function mt(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, o]) => {
|
|
126
|
-
r[n] =
|
|
126
|
+
r[n] = Oe(t[n]) && Oe(o) ? mt(t[n], o) : o;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function en(t) {
|
|
130
|
-
return t != null &&
|
|
130
|
+
return t != null && Oe(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function oe(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
@@ -140,10 +140,10 @@ const nn = (t, e) => {
|
|
|
140
140
|
throw new Error("Data is not a valid array");
|
|
141
141
|
if (t.length === 0)
|
|
142
142
|
throw new Error("Cannot get highest value from empty array");
|
|
143
|
-
t.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
if (!t.some(
|
|
144
|
+
({ values: n }) => n.length - 1 >= e
|
|
145
|
+
))
|
|
146
|
+
throw new Error("Index exceeds length of all of the datasets");
|
|
147
147
|
};
|
|
148
148
|
function rn(t, e) {
|
|
149
149
|
var r;
|
|
@@ -154,8 +154,8 @@ function rn(t, e) {
|
|
|
154
154
|
}
|
|
155
155
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const e =
|
|
157
|
+
function $e(t) {
|
|
158
|
+
const e = dt(t) ? t.value : t;
|
|
159
159
|
if (!e)
|
|
160
160
|
throw new Error("No empty array can be created from specified data value");
|
|
161
161
|
const r = Math.max(
|
|
@@ -196,20 +196,20 @@ const sn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
|
196
196
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
197
197
|
""
|
|
198
198
|
);
|
|
199
|
-
var
|
|
200
|
-
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))(
|
|
199
|
+
var K = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
200
|
+
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))(K || {});
|
|
201
201
|
const cn = "[lume] ";
|
|
202
202
|
function ne(t, e = !0) {
|
|
203
|
-
e &&
|
|
203
|
+
e && pt() || console.warn(cn + "Warning: " + t);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const he = (t) => {
|
|
206
206
|
let e = null;
|
|
207
207
|
switch (typeof t) {
|
|
208
208
|
case "string":
|
|
209
209
|
try {
|
|
210
210
|
e = Bt(t);
|
|
211
211
|
} catch {
|
|
212
|
-
ne(
|
|
212
|
+
ne(K.InvalidFormat), e = null;
|
|
213
213
|
}
|
|
214
214
|
break;
|
|
215
215
|
case "function":
|
|
@@ -222,7 +222,7 @@ const ge = (t) => {
|
|
|
222
222
|
return e ? e(...n) : n[0];
|
|
223
223
|
}
|
|
224
224
|
return r;
|
|
225
|
-
},
|
|
225
|
+
}, ve = () => ({
|
|
226
226
|
options: {
|
|
227
227
|
type: Object,
|
|
228
228
|
default: () => ({})
|
|
@@ -230,8 +230,8 @@ const ge = (t) => {
|
|
|
230
230
|
});
|
|
231
231
|
function Z(t, e) {
|
|
232
232
|
return { allOptions: d(() => {
|
|
233
|
-
const n =
|
|
234
|
-
return n ?
|
|
233
|
+
const n = dt(e) ? e == null ? void 0 : e.value : e;
|
|
234
|
+
return n ? mt(n, t.value) : t.value;
|
|
235
235
|
}) };
|
|
236
236
|
}
|
|
237
237
|
const dn = 0.2;
|
|
@@ -257,7 +257,7 @@ function vn(t, e, r) {
|
|
|
257
257
|
}
|
|
258
258
|
return H(e, l), { showTick: i };
|
|
259
259
|
}
|
|
260
|
-
var j = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(j || {}),
|
|
260
|
+
var j = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(j || {}), ht = /* @__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))(ht || {}), Fe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Fe || {}), gt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(gt || {}), Ge = /* @__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))(Ge || {});
|
|
261
261
|
const L = {
|
|
262
262
|
HORIZONTAL: "horizontal",
|
|
263
263
|
VERTICAL: "vertical"
|
|
@@ -265,7 +265,7 @@ const L = {
|
|
|
265
265
|
SINGLE: "single",
|
|
266
266
|
GROUPED: "grouped",
|
|
267
267
|
STACKED: "stacked"
|
|
268
|
-
},
|
|
268
|
+
}, yt = "No data", Ye = 20, bt = 0.33, kt = 0.5, xt = 12, _e = 8, pn = 1, fn = [
|
|
269
269
|
"auto",
|
|
270
270
|
"auto-start",
|
|
271
271
|
"auto-end",
|
|
@@ -282,10 +282,10 @@ const L = {
|
|
|
282
282
|
"left-start",
|
|
283
283
|
"left-end"
|
|
284
284
|
];
|
|
285
|
-
function
|
|
286
|
-
t != null && t.closest("svg") || ne(
|
|
285
|
+
function ye(t) {
|
|
286
|
+
t != null && t.closest("svg") || ne(K.NotContainedInSvg);
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const Tt = {
|
|
289
289
|
/** Displays a line for each tick. */
|
|
290
290
|
gridLines: !1,
|
|
291
291
|
/** Displays the axis title. */
|
|
@@ -302,11 +302,11 @@ const At = {
|
|
|
302
302
|
/** Space between the tick label and the axis line. */
|
|
303
303
|
tickPadding: 8
|
|
304
304
|
}, mn = {
|
|
305
|
-
...
|
|
305
|
+
...Tt,
|
|
306
306
|
withTitle: !1,
|
|
307
307
|
skip: !0
|
|
308
308
|
}, hn = {
|
|
309
|
-
...
|
|
309
|
+
...Tt,
|
|
310
310
|
gridLines: !0
|
|
311
311
|
}, gn = function(t, e, r) {
|
|
312
312
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
@@ -324,7 +324,7 @@ const At = {
|
|
|
324
324
|
return {
|
|
325
325
|
x: -(c - t.value.step()) / 2,
|
|
326
326
|
width: c,
|
|
327
|
-
height: r.value.tickPadding + xt +
|
|
327
|
+
height: r.value.tickPadding + xt + _e
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function l() {
|
|
@@ -359,7 +359,7 @@ const At = {
|
|
|
359
359
|
}
|
|
360
360
|
function a(u) {
|
|
361
361
|
var v;
|
|
362
|
-
const c = (u ? (v = u.getComputedTextLength) == null ? void 0 : v.call(u) : 42) + r.value.tickPadding +
|
|
362
|
+
const c = (u ? (v = u.getComputedTextLength) == null ? void 0 : v.call(u) : 42) + r.value.tickPadding + _e;
|
|
363
363
|
return {
|
|
364
364
|
x: -c,
|
|
365
365
|
width: c,
|
|
@@ -400,7 +400,7 @@ const At = {
|
|
|
400
400
|
}
|
|
401
401
|
function a() {
|
|
402
402
|
return {
|
|
403
|
-
height: r.value.tickPadding + xt +
|
|
403
|
+
height: r.value.tickPadding + xt + _e,
|
|
404
404
|
width: n.value,
|
|
405
405
|
x: -(n.value / 2)
|
|
406
406
|
};
|
|
@@ -435,7 +435,7 @@ const At = {
|
|
|
435
435
|
}
|
|
436
436
|
function a(u) {
|
|
437
437
|
var v;
|
|
438
|
-
const c = (((v = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : v.call(u)) || 0) + r.value.tickPadding +
|
|
438
|
+
const c = (((v = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : v.call(u)) || 0) + r.value.tickPadding + _e;
|
|
439
439
|
return {
|
|
440
440
|
width: c,
|
|
441
441
|
height: n.value,
|
|
@@ -461,14 +461,14 @@ const At = {
|
|
|
461
461
|
getTickGroupAttributes: o,
|
|
462
462
|
getTickLabelAttributes: i
|
|
463
463
|
};
|
|
464
|
-
},
|
|
464
|
+
}, xn = {
|
|
465
465
|
"x-band-scale-axis": gn,
|
|
466
466
|
"y-band-scale-axis": yn,
|
|
467
467
|
"x-linear-scale-axis": bn,
|
|
468
468
|
"y-linear-scale-axis": kn
|
|
469
469
|
};
|
|
470
|
-
var
|
|
471
|
-
const
|
|
470
|
+
var Ie = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Ie || {}), Ee = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ee || {}), me = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(me || {});
|
|
471
|
+
const Tn = /* @__PURE__ */ w({
|
|
472
472
|
__name: "lume-axis",
|
|
473
473
|
props: {
|
|
474
474
|
scale: {
|
|
@@ -478,12 +478,12 @@ const xn = /* @__PURE__ */ w({
|
|
|
478
478
|
type: {
|
|
479
479
|
type: String,
|
|
480
480
|
default: void 0,
|
|
481
|
-
validator: (t) => t in
|
|
481
|
+
validator: (t) => t in me
|
|
482
482
|
},
|
|
483
483
|
position: {
|
|
484
484
|
type: String,
|
|
485
485
|
default: void 0,
|
|
486
|
-
validator: (t) => t in
|
|
486
|
+
validator: (t) => t in Ee
|
|
487
487
|
},
|
|
488
488
|
containerSize: {
|
|
489
489
|
type: Object,
|
|
@@ -497,12 +497,12 @@ const xn = /* @__PURE__ */ w({
|
|
|
497
497
|
type: String,
|
|
498
498
|
default: L.VERTICAL
|
|
499
499
|
},
|
|
500
|
-
...
|
|
500
|
+
...ve()
|
|
501
501
|
},
|
|
502
502
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
503
503
|
setup(t, { emit: e }) {
|
|
504
|
-
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } =
|
|
505
|
-
() => r.type ?
|
|
504
|
+
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = P(r), c = de("isEmpty", I(!1)), v = ge({}), s = I(null), _ = I(null), m = I(null), f = d(
|
|
505
|
+
() => r.type ? me[r.type] : r.position
|
|
506
506
|
), g = d(
|
|
507
507
|
() => r.type || (f.value === "left" ? "y" : "x")
|
|
508
508
|
), y = d(
|
|
@@ -510,21 +510,21 @@ const xn = /* @__PURE__ */ w({
|
|
|
510
510
|
), { allOptions: p } = Z(
|
|
511
511
|
i,
|
|
512
512
|
g.value === "x" ? mn : hn
|
|
513
|
-
), { showTick:
|
|
513
|
+
), { showTick: x } = vn(o, s, p.value.skip), A = d(() => {
|
|
514
514
|
var $, h, O, N;
|
|
515
515
|
return g.value === "y" && c.value ? `translate(0, ${(($ = a.value) == null ? void 0 : $.height) / 2})` : g.value === "x" && c.value ? `translate(-${((h = a.value) == null ? void 0 : h.width) / 2}, ${(O = a.value) == null ? void 0 : O.height})` : `translate(0, ${g.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
516
|
-
}),
|
|
516
|
+
}), T = d(() => {
|
|
517
517
|
if (oe(o.value))
|
|
518
518
|
return o.value.labels || o.value.domain();
|
|
519
519
|
const { tickCount: $ } = p.value, [h, O] = o.value.domain();
|
|
520
520
|
return Ft(h, O, $);
|
|
521
521
|
}), k = d(() => {
|
|
522
522
|
const { tickFormat: $ } = p.value;
|
|
523
|
-
return
|
|
523
|
+
return he($);
|
|
524
524
|
}), C = d(
|
|
525
525
|
() => p.value.withHover && y.value && l.value > -1
|
|
526
526
|
), D = d(
|
|
527
|
-
() => p.value.tickPadding +
|
|
527
|
+
() => p.value.tickPadding + _e || n
|
|
528
528
|
), R = d(() => g.value === "x" ? (
|
|
529
529
|
// If x axis, get the tick height
|
|
530
530
|
Math.max(
|
|
@@ -550,7 +550,7 @@ const xn = /* @__PURE__ */ w({
|
|
|
550
550
|
const { showTicks: h } = p.value;
|
|
551
551
|
return h === !1 ? "" : k.value($);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Q($, h, O) {
|
|
554
554
|
e("mouseenter", { index: y.value ? $ : null, value: h, event: O });
|
|
555
555
|
}
|
|
556
556
|
function G($, h, O) {
|
|
@@ -561,8 +561,8 @@ const xn = /* @__PURE__ */ w({
|
|
|
561
561
|
if (!(!s.value || !s.value.length))
|
|
562
562
|
return (h = s.value[$]) == null ? void 0 : h.ref;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
m.value =
|
|
564
|
+
function q() {
|
|
565
|
+
m.value = T.value.map(
|
|
566
566
|
($, h) => ({
|
|
567
567
|
value: B($),
|
|
568
568
|
group: v.getTickGroupAttributes($, h),
|
|
@@ -573,14 +573,14 @@ const xn = /* @__PURE__ */ w({
|
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
function U() {
|
|
576
|
-
const $ = o.value.step ? "bandScale" : "linearScale", h =
|
|
576
|
+
const $ = o.value.step ? "bandScale" : "linearScale", h = xn[`${g.value}-${Ie[$]}`];
|
|
577
577
|
Object.entries(h(o, a, p) || []).forEach(
|
|
578
578
|
([O, N]) => {
|
|
579
579
|
v[O] = N;
|
|
580
580
|
}
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
|
-
return H(o, U, { flush: "sync", immediate: !0 }), H(o,
|
|
583
|
+
return H(o, U, { flush: "sync", immediate: !0 }), H(o, q, { immediate: !0 }), H(s, q), H(R, ($) => e("lume__internal--axis-size", $)), J(() => ye(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ie, POSITIONS: Ee, TYPES: me, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: v, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: f, computedType: g, shouldHover: y, allOptions: p, showTick: x, axisTransform: A, ticks: T, tickFormatter: k, isHovering: C, axisLabelOffset: D, axisSize: R, formatTick: B, handleTickMouseenter: Q, handleTickClick: G, getTextNode: M, setTicks: q, init: U, LumeTick: Jt };
|
|
584
584
|
}
|
|
585
585
|
});
|
|
586
586
|
var An = function() {
|
|
@@ -601,7 +601,7 @@ var An = function() {
|
|
|
601
601
|
);
|
|
602
602
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
603
603
|
}, Ln = [], On = /* @__PURE__ */ E(
|
|
604
|
-
|
|
604
|
+
Tn,
|
|
605
605
|
An,
|
|
606
606
|
Ln,
|
|
607
607
|
!1,
|
|
@@ -625,7 +625,7 @@ function In(t, e, r, n) {
|
|
|
625
625
|
}
|
|
626
626
|
function En(t, e, r, n) {
|
|
627
627
|
const o = I(0), a = I(0), l = d(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
628
|
-
return
|
|
628
|
+
return J(() => {
|
|
629
629
|
o.value = r.value, a.value = n.value;
|
|
630
630
|
}), H(r, (i) => o.value = i), H(n, (i) => a.value = i), { computedWidth: o, computedHeight: a, transformOrigin: l };
|
|
631
631
|
}
|
|
@@ -667,10 +667,10 @@ const wn = /* @__PURE__ */ w({
|
|
|
667
667
|
},
|
|
668
668
|
emits: ["click", "mouseover", "mouseleave"],
|
|
669
669
|
setup(t, { emit: e }) {
|
|
670
|
-
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } =
|
|
670
|
+
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = P(r), c = I(null), v = d(
|
|
671
671
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
672
|
-
), s = d(() => i.value === "width"), _ = d(() => i.value === "height"), m = En(n, o, a, l), { computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = In(n, o, a, l),
|
|
673
|
-
return
|
|
672
|
+
), s = d(() => i.value === "width"), _ = d(() => i.value === "height"), m = En(n, o, a, l), { computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = In(n, o, a, l), x = d(() => y.value ? 1 : (s.value ? m.computedWidth : a).value), A = d(() => p.value ? 1 : (_.value ? m.computedHeight : l).value), T = s.value || _.value ? m.transformOrigin : null;
|
|
673
|
+
return J(() => ye(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: v, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p, computedWidth: x, computedHeight: A, transformOrigin: T };
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
676
|
var Nn = function() {
|
|
@@ -700,18 +700,18 @@ var Nn = function() {
|
|
|
700
700
|
null,
|
|
701
701
|
null
|
|
702
702
|
);
|
|
703
|
-
const
|
|
703
|
+
const Ve = Hn.exports;
|
|
704
704
|
function Dn() {
|
|
705
|
-
const t = I(), e =
|
|
705
|
+
const t = I(), e = ge({
|
|
706
706
|
dimensions: {}
|
|
707
707
|
}), r = new ResizeObserver((n) => {
|
|
708
708
|
n.forEach((o) => {
|
|
709
709
|
e.dimensions = o.contentRect;
|
|
710
710
|
});
|
|
711
711
|
});
|
|
712
|
-
return
|
|
712
|
+
return J(() => {
|
|
713
713
|
r.observe(t.value);
|
|
714
|
-
}),
|
|
714
|
+
}), vt(() => {
|
|
715
715
|
r.unobserve(t.value);
|
|
716
716
|
}), { resizeState: e, resizeRef: t };
|
|
717
717
|
}
|
|
@@ -737,10 +737,10 @@ const Rn = /* @__PURE__ */ w({
|
|
|
737
737
|
},
|
|
738
738
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
739
739
|
setup(t, { emit: e }) {
|
|
740
|
-
const r = t, { margins: n, containerSize: o } =
|
|
740
|
+
const r = t, { margins: n, containerSize: o } = P(r), a = I(null), { resizeRef: l, resizeState: i } = Dn(), u = d(
|
|
741
741
|
() => o.value.height + n.value.top + n.value.bottom
|
|
742
742
|
);
|
|
743
|
-
return
|
|
743
|
+
return _t(() => {
|
|
744
744
|
if (!a.value)
|
|
745
745
|
return;
|
|
746
746
|
const { width: c } = i.dimensions, { height: v } = a.value.getBoundingClientRect();
|
|
@@ -790,7 +790,7 @@ const Fn = Bn.exports, Gn = /* @__PURE__ */ w({
|
|
|
790
790
|
},
|
|
791
791
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
792
792
|
setup(t, { emit: e }) {
|
|
793
|
-
const r =
|
|
793
|
+
const r = de("isEmpty");
|
|
794
794
|
return { __sfc: !0, emit: e, isEmpty: r };
|
|
795
795
|
}
|
|
796
796
|
});
|
|
@@ -902,11 +902,11 @@ const ar = or.exports, lr = /* @__PURE__ */ w({
|
|
|
902
902
|
type: String,
|
|
903
903
|
default: null
|
|
904
904
|
},
|
|
905
|
-
...
|
|
905
|
+
...ve()
|
|
906
906
|
},
|
|
907
907
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
908
908
|
setup(t, { emit: e }) {
|
|
909
|
-
const r = t, n = I(null), { items: o, options: a } =
|
|
909
|
+
const r = t, n = I(null), { items: o, options: a } = P(r), l = V(), i = I(null), { allOptions: u } = Z(a), c = d(
|
|
910
910
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
911
911
|
), v = d(
|
|
912
912
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -925,10 +925,10 @@ const ar = or.exports, lr = /* @__PURE__ */ w({
|
|
|
925
925
|
...r.modifiers || []
|
|
926
926
|
]), _ = d(
|
|
927
927
|
() => u.value.showTitle !== !1 && r.title != null
|
|
928
|
-
), m = d(() =>
|
|
928
|
+
), m = d(() => he(u.value.valueFormat)), f = d(() => he(u.value.titleFormat)), g = d(
|
|
929
929
|
() => {
|
|
930
|
-
var
|
|
931
|
-
return ((
|
|
930
|
+
var T;
|
|
931
|
+
return ((T = o.value) == null ? void 0 : T.find((k) => k.isSummary)) || {
|
|
932
932
|
label: u.value.summary ?? r.summary
|
|
933
933
|
};
|
|
934
934
|
}
|
|
@@ -940,20 +940,20 @@ const ar = or.exports, lr = /* @__PURE__ */ w({
|
|
|
940
940
|
modifiers: s.value
|
|
941
941
|
}), e("opened", r.targetElement));
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function x() {
|
|
944
944
|
i.value && (i.value.destroy(), e("closed"));
|
|
945
945
|
}
|
|
946
946
|
function A() {
|
|
947
947
|
i.value && (u.value.withAnimation !== !1 && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
948
948
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
949
|
-
}() :
|
|
949
|
+
}() : x());
|
|
950
950
|
}
|
|
951
951
|
return H(
|
|
952
952
|
() => r.targetElement,
|
|
953
|
-
(
|
|
954
|
-
!k &&
|
|
953
|
+
(T, k) => {
|
|
954
|
+
!k && T ? p() : A();
|
|
955
955
|
}
|
|
956
|
-
),
|
|
956
|
+
), J(p), vt(x), { __sfc: !0, props: r, emit: e, root: n, items: o, options: a, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: v, allModifiers: s, showTitle: _, formatValue: m, formatTitle: f, summaryItem: g, hasSummary: y, initPopper: p, destroyPopper: x, updatePopper: A, LumeTooltipTitle: Yn, LumeTooltipSummary: er, LumeTooltipItem: ar };
|
|
957
957
|
}
|
|
958
958
|
});
|
|
959
959
|
var ur = function() {
|
|
@@ -993,19 +993,19 @@ var ur = function() {
|
|
|
993
993
|
);
|
|
994
994
|
const cr = sr.exports;
|
|
995
995
|
var te = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(te || {});
|
|
996
|
-
const dr = te.Categorical,
|
|
996
|
+
const dr = te.Categorical, pe = j.Skyblue, vr = Fe.SkyTeal;
|
|
997
997
|
function _r(t) {
|
|
998
|
-
return t === te.Divergent ? vr :
|
|
998
|
+
return t === te.Divergent ? vr : pe;
|
|
999
999
|
}
|
|
1000
1000
|
function pr(t) {
|
|
1001
|
-
return Object.values(
|
|
1001
|
+
return Object.values(Ge).includes(t);
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return e === te.Divergent ? Object.values(
|
|
1003
|
+
function Ke(t, e) {
|
|
1004
|
+
return e === te.Divergent ? Object.values(Fe).includes(t) : Object.values({
|
|
1005
1005
|
...j,
|
|
1006
|
+
...ht,
|
|
1006
1007
|
...gt,
|
|
1007
|
-
...
|
|
1008
|
-
...Ve
|
|
1008
|
+
...Ge
|
|
1009
1009
|
}).includes(t);
|
|
1010
1010
|
}
|
|
1011
1011
|
function fr(t, e) {
|
|
@@ -1020,7 +1020,7 @@ function hr(t, e) {
|
|
|
1020
1020
|
const r = (e + 1) * 10;
|
|
1021
1021
|
return `${t}-${r}`;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Je(t, e, r) {
|
|
1024
1024
|
switch (e) {
|
|
1025
1025
|
default:
|
|
1026
1026
|
case te.Categorical:
|
|
@@ -1032,7 +1032,7 @@ function Qe(t, e, r) {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
function gr(t, e, r = dr, n) {
|
|
1035
|
-
return
|
|
1035
|
+
return Ke(t, r) ? t : (n > 4 && (ne(K.ColorLoop), n = n % 5), Ke(e, r) ? Je(e, r, n) : Je(_r(r), r, n));
|
|
1036
1036
|
}
|
|
1037
1037
|
function yr(t) {
|
|
1038
1038
|
return t.map((e) => en(e) ? e : { value: e });
|
|
@@ -1040,7 +1040,7 @@ function yr(t) {
|
|
|
1040
1040
|
function br(t) {
|
|
1041
1041
|
return t.__internal === !0;
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1043
|
+
const je = (t = null) => ({
|
|
1044
1044
|
data: {
|
|
1045
1045
|
type: Array,
|
|
1046
1046
|
required: !0,
|
|
@@ -1059,13 +1059,13 @@ const Me = (t = null) => ({
|
|
|
1059
1059
|
default: null
|
|
1060
1060
|
}
|
|
1061
1061
|
});
|
|
1062
|
-
function
|
|
1063
|
-
const a =
|
|
1062
|
+
function Me(t, e, r, n, o) {
|
|
1063
|
+
const a = ge({
|
|
1064
1064
|
width: 0,
|
|
1065
1065
|
height: 0
|
|
1066
1066
|
}), l = sn(12), i = d(() => {
|
|
1067
1067
|
var v;
|
|
1068
|
-
return t.value.length > 5 && ne(
|
|
1068
|
+
return t.value.length > 5 && ne(K.DatasetLength), (v = t.value) == null ? void 0 : v.map(
|
|
1069
1069
|
(s, _) => {
|
|
1070
1070
|
if (br(s))
|
|
1071
1071
|
return s;
|
|
@@ -1083,9 +1083,9 @@ function ze(t, e, r, n, o) {
|
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
1085
|
);
|
|
1086
|
-
}), u = d(() => Array.isArray(e.value) ? e.value :
|
|
1086
|
+
}), u = d(() => Array.isArray(e.value) ? e.value : $e(t.value).map((v, s) => s));
|
|
1087
1087
|
function c(v) {
|
|
1088
|
-
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL &&
|
|
1088
|
+
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && $e(t).length * (((n == null ? void 0 : n.value.barHeight) || Ye) * 2) + ((n == null ? void 0 : n.value.barHeight) || Ye) || v.height;
|
|
1089
1089
|
a.width = v.width, a.height = s;
|
|
1090
1090
|
}
|
|
1091
1091
|
return {
|
|
@@ -1106,69 +1106,69 @@ const kr = () => ({
|
|
|
1106
1106
|
default: null
|
|
1107
1107
|
}
|
|
1108
1108
|
});
|
|
1109
|
-
function
|
|
1109
|
+
function xr(t, e, r, n, o) {
|
|
1110
1110
|
const a = I(null), l = I(null);
|
|
1111
1111
|
function i() {
|
|
1112
1112
|
const { width: u, height: c } = r;
|
|
1113
|
-
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value =
|
|
1113
|
+
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value = qe(
|
|
1114
1114
|
t.value,
|
|
1115
1115
|
u,
|
|
1116
1116
|
n.value,
|
|
1117
1117
|
o.value.startOnZero
|
|
1118
|
-
), l.value =
|
|
1118
|
+
), l.value = Qe(
|
|
1119
1119
|
e.value,
|
|
1120
1120
|
c,
|
|
1121
1121
|
n.value,
|
|
1122
1122
|
o.value
|
|
1123
|
-
)) : (a.value =
|
|
1123
|
+
)) : (a.value = Qe(
|
|
1124
1124
|
e.value,
|
|
1125
1125
|
u,
|
|
1126
1126
|
n.value,
|
|
1127
1127
|
o.value
|
|
1128
|
-
), l.value =
|
|
1128
|
+
), l.value = qe(
|
|
1129
1129
|
t.value,
|
|
1130
1130
|
c,
|
|
1131
1131
|
n.value,
|
|
1132
1132
|
o.value.startOnZero
|
|
1133
1133
|
)));
|
|
1134
1134
|
}
|
|
1135
|
-
return
|
|
1135
|
+
return _t(i), { xScale: a, yScale: l };
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1138
|
-
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ?
|
|
1137
|
+
function Qe(t, e, r, n) {
|
|
1138
|
+
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ? kt : bt);
|
|
1139
1139
|
return Object.assign(
|
|
1140
|
-
|
|
1140
|
+
se().range(o).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, v) => v)),
|
|
1141
1141
|
{ labels: t }
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const o =
|
|
1144
|
+
function qe(t, e, r, n) {
|
|
1145
|
+
const o = ft(t).filter((v) => v != null), a = [0, e];
|
|
1146
1146
|
if (o.length === 0)
|
|
1147
|
-
return
|
|
1147
|
+
return ce().range(a).domain([0, 0]).nice();
|
|
1148
1148
|
const l = Math.min(...o), i = n && l > 0 ? 0 : l, u = Math.max(...o), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1149
|
-
return
|
|
1149
|
+
return ce().range(a).domain(c).nice();
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function et(t) {
|
|
1152
1152
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function we(t, e) {
|
|
1155
1155
|
return oe(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function tt(t, e, {
|
|
1158
1158
|
padding: r,
|
|
1159
1159
|
paddingInner: n,
|
|
1160
1160
|
paddingOuter: o
|
|
1161
1161
|
} = {}) {
|
|
1162
|
-
const a = r ?? (e === L.HORIZONTAL ?
|
|
1162
|
+
const a = r ?? (e === L.HORIZONTAL ? kt : bt);
|
|
1163
1163
|
return t.copy().paddingInner(n ?? a).paddingOuter(o ?? a);
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function At(t) {
|
|
1166
1166
|
return Object.values(L).includes(t);
|
|
1167
1167
|
}
|
|
1168
1168
|
const ue = (t, e = !0) => ({
|
|
1169
|
-
...
|
|
1169
|
+
...je(t),
|
|
1170
1170
|
...kr(),
|
|
1171
|
-
...
|
|
1171
|
+
...ve(),
|
|
1172
1172
|
classList: {
|
|
1173
1173
|
type: [String, Array],
|
|
1174
1174
|
default: () => []
|
|
@@ -1181,17 +1181,17 @@ const ue = (t, e = !0) => ({
|
|
|
1181
1181
|
orientation: {
|
|
1182
1182
|
type: String,
|
|
1183
1183
|
default: L.VERTICAL,
|
|
1184
|
-
validator:
|
|
1184
|
+
validator: At
|
|
1185
1185
|
}
|
|
1186
1186
|
} : {}
|
|
1187
|
-
}),
|
|
1188
|
-
...
|
|
1189
|
-
...
|
|
1187
|
+
}), Tr = (t) => ({
|
|
1188
|
+
...je(t),
|
|
1189
|
+
...ve(),
|
|
1190
1190
|
hoveredElement: {
|
|
1191
1191
|
type: [Number, String],
|
|
1192
1192
|
default: null
|
|
1193
1193
|
}
|
|
1194
|
-
}),
|
|
1194
|
+
}), be = () => ({
|
|
1195
1195
|
data: {
|
|
1196
1196
|
type: Array,
|
|
1197
1197
|
required: !0
|
|
@@ -1207,7 +1207,7 @@ const ue = (t, e = !0) => ({
|
|
|
1207
1207
|
orientation: {
|
|
1208
1208
|
type: String,
|
|
1209
1209
|
default: L.VERTICAL,
|
|
1210
|
-
validator:
|
|
1210
|
+
validator: At
|
|
1211
1211
|
},
|
|
1212
1212
|
xScale: {
|
|
1213
1213
|
type: Function,
|
|
@@ -1236,7 +1236,7 @@ const ue = (t, e = !0) => ({
|
|
|
1236
1236
|
}), Ar = /* @__PURE__ */ w({
|
|
1237
1237
|
__name: "lume-overlay-group",
|
|
1238
1238
|
props: {
|
|
1239
|
-
...
|
|
1239
|
+
...be(),
|
|
1240
1240
|
orientation: {
|
|
1241
1241
|
type: String,
|
|
1242
1242
|
default: L.VERTICAL
|
|
@@ -1244,7 +1244,7 @@ const ue = (t, e = !0) => ({
|
|
|
1244
1244
|
},
|
|
1245
1245
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1246
1246
|
setup(t, { emit: e }) {
|
|
1247
|
-
const r = t, { data: n, orientation: o, xScale: a, yScale: l } =
|
|
1247
|
+
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = P(r), i = d(() => $e(n));
|
|
1248
1248
|
function u(c) {
|
|
1249
1249
|
var y;
|
|
1250
1250
|
const v = o.value === L.HORIZONTAL ? l.value : a.value, s = v.domain(), _ = tn(v), m = ((y = v.paddingInner) == null ? void 0 : y.call(v)) ?? 0, f = _ * m, g = oe(v) ? v(s[c]) - f / 2 : v(c) - _ / 2;
|
|
@@ -1258,7 +1258,7 @@ const ue = (t, e = !0) => ({
|
|
|
1258
1258
|
transform: `translate(${g}, 0)`
|
|
1259
1259
|
};
|
|
1260
1260
|
}
|
|
1261
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1261
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ve };
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
1264
|
var Lr = function() {
|
|
@@ -1305,25 +1305,27 @@ const Ir = $r.exports, Er = [
|
|
|
1305
1305
|
"link-mouseleave",
|
|
1306
1306
|
"tooltip-opened",
|
|
1307
1307
|
"tooltip-moved",
|
|
1308
|
-
"tooltip-closed"
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
se || await r(), se.$emit(`${e}_${l}`, ...i);
|
|
1308
|
+
"tooltip-closed",
|
|
1309
|
+
"hovered-index-changed"
|
|
1310
|
+
], X = (t, e) => {
|
|
1311
|
+
function r(a, ...l) {
|
|
1312
|
+
document.dispatchEvent(
|
|
1313
|
+
new CustomEvent(`${e}_${a}`, {
|
|
1314
|
+
detail: [...l]
|
|
1315
|
+
})
|
|
1316
|
+
);
|
|
1318
1317
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1318
|
+
function n(a, l) {
|
|
1319
|
+
document.addEventListener(
|
|
1320
|
+
`${e}_${a}`,
|
|
1321
|
+
(i) => l(...i.detail)
|
|
1322
|
+
);
|
|
1321
1323
|
}
|
|
1322
|
-
return { componentEventPropagator: Er.reduce((
|
|
1324
|
+
return { componentEventPropagator: Er.reduce((a, l) => (a[l] = (i) => t(l, i), a), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1323
1325
|
};
|
|
1324
1326
|
function wr(t) {
|
|
1325
1327
|
return { hasNegativeValues: d(
|
|
1326
|
-
() =>
|
|
1328
|
+
() => ft(t.value).some((r) => r < 0)
|
|
1327
1329
|
) };
|
|
1328
1330
|
}
|
|
1329
1331
|
function Nr(t, e, r, n) {
|
|
@@ -1360,10 +1362,10 @@ function Hr(t) {
|
|
|
1360
1362
|
return e[o] ? e[o] + a : a;
|
|
1361
1363
|
}), []);
|
|
1362
1364
|
}
|
|
1363
|
-
const
|
|
1365
|
+
const nt = {
|
|
1364
1366
|
"stacked-bar": Hr
|
|
1365
1367
|
};
|
|
1366
|
-
function
|
|
1368
|
+
function Lt(t, e, r, n, o, a, l) {
|
|
1367
1369
|
const i = d(
|
|
1368
1370
|
() => {
|
|
1369
1371
|
var c;
|
|
@@ -1371,10 +1373,10 @@ function Ot(t, e, r, n, o, a, l) {
|
|
|
1371
1373
|
}
|
|
1372
1374
|
);
|
|
1373
1375
|
function u(c) {
|
|
1374
|
-
const v = l != null && l.value &&
|
|
1376
|
+
const v = l != null && l.value && nt[l.value] ? nt[l.value](c) : Cr(c);
|
|
1375
1377
|
t.value = v.map((s, _) => ({
|
|
1376
|
-
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(s) :
|
|
1377
|
-
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ?
|
|
1378
|
+
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(s) : we(r.value, _),
|
|
1379
|
+
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? we(n.value, _) : n.value(s)
|
|
1378
1380
|
}));
|
|
1379
1381
|
}
|
|
1380
1382
|
return H(
|
|
@@ -1386,7 +1388,7 @@ function Ot(t, e, r, n, o, a, l) {
|
|
|
1386
1388
|
), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
|
|
1387
1389
|
}
|
|
1388
1390
|
function Dr() {
|
|
1389
|
-
const t =
|
|
1391
|
+
const t = ge({
|
|
1390
1392
|
opened: !1,
|
|
1391
1393
|
targetElement: null
|
|
1392
1394
|
});
|
|
@@ -1403,36 +1405,36 @@ function Rr(t) {
|
|
|
1403
1405
|
return {
|
|
1404
1406
|
color: ((l = a[r]) == null ? void 0 : l.color) || n,
|
|
1405
1407
|
label: o,
|
|
1406
|
-
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ??
|
|
1408
|
+
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ?? yt
|
|
1407
1409
|
};
|
|
1408
1410
|
})
|
|
1409
1411
|
) };
|
|
1410
1412
|
}
|
|
1411
|
-
const
|
|
1413
|
+
const Ne = 16, Ce = 8, He = 28, De = 24, re = {
|
|
1412
1414
|
VERTICAL: {
|
|
1413
|
-
top:
|
|
1414
|
-
right:
|
|
1415
|
-
bottom:
|
|
1416
|
-
left:
|
|
1415
|
+
top: Ne,
|
|
1416
|
+
right: Ce,
|
|
1417
|
+
bottom: He,
|
|
1418
|
+
left: De
|
|
1417
1419
|
},
|
|
1418
1420
|
HORIZONTAL: {
|
|
1419
|
-
top:
|
|
1420
|
-
right:
|
|
1421
|
-
bottom:
|
|
1422
|
-
left:
|
|
1421
|
+
top: Ne,
|
|
1422
|
+
right: Ce,
|
|
1423
|
+
bottom: He,
|
|
1424
|
+
left: De
|
|
1423
1425
|
}
|
|
1424
1426
|
};
|
|
1425
1427
|
function Pr(t) {
|
|
1426
|
-
return !t || t === "auto" || t.top == null || t.top === "auto" ?
|
|
1428
|
+
return !t || t === "auto" || t.top == null || t.top === "auto" ? Ne : t.top;
|
|
1427
1429
|
}
|
|
1428
1430
|
function Sr(t) {
|
|
1429
|
-
return !t || t === "auto" || t.right == null || t.right === "auto" ?
|
|
1431
|
+
return !t || t === "auto" || t.right == null || t.right === "auto" ? Ce : t.right;
|
|
1430
1432
|
}
|
|
1431
1433
|
function Br(t, e) {
|
|
1432
|
-
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e ||
|
|
1434
|
+
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || He : t.bottom;
|
|
1433
1435
|
}
|
|
1434
1436
|
function Fr(t, e) {
|
|
1435
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1437
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || De : t.left;
|
|
1436
1438
|
}
|
|
1437
1439
|
const Gr = /* @__PURE__ */ w({
|
|
1438
1440
|
__name: "lume-chart",
|
|
@@ -1444,24 +1446,24 @@ const Gr = /* @__PURE__ */ w({
|
|
|
1444
1446
|
}
|
|
1445
1447
|
},
|
|
1446
1448
|
setup(t, { emit: e }) {
|
|
1447
|
-
const r = t, n = V(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } =
|
|
1448
|
-
T,
|
|
1449
|
-
A,
|
|
1449
|
+
const r = t, n = V(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = P(r), v = I(-1), s = I(null), _ = I(null), m = I([]), f = I(null), g = I(0), y = I(0), { allOptions: p } = Z(i), { internalData: x, computedLabels: A, containerSize: T, updateSize: k, chartID: C } = Me(o, a, l, p, u), { listenInternalEvent: D } = X(e, C), { xScale: R, yScale: B } = xr(
|
|
1450
1450
|
x,
|
|
1451
|
+
A,
|
|
1452
|
+
T,
|
|
1451
1453
|
u,
|
|
1452
1454
|
p
|
|
1453
|
-
),
|
|
1455
|
+
), Q = d(() => ({
|
|
1454
1456
|
top: Pr(p.value.margins),
|
|
1455
1457
|
right: Sr(p.value.margins),
|
|
1456
1458
|
bottom: Br(p.value.margins, g.value),
|
|
1457
1459
|
left: Fr(p.value.margins, y.value)
|
|
1458
1460
|
})), G = d(() => {
|
|
1459
1461
|
var b;
|
|
1460
|
-
return r.xScale ?
|
|
1462
|
+
return r.xScale ? et(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, x.value, a.value, T) : R.value;
|
|
1461
1463
|
}), M = d(() => {
|
|
1462
1464
|
var b;
|
|
1463
|
-
return r.yScale ?
|
|
1464
|
-
}),
|
|
1465
|
+
return r.yScale ? et(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, x.value, a.value, T) : B.value;
|
|
1466
|
+
}), q = d(() => ({
|
|
1465
1467
|
...p.value.xAxisOptions,
|
|
1466
1468
|
withHover: u.value === L.VERTICAL
|
|
1467
1469
|
})), U = d(() => ({
|
|
@@ -1482,78 +1484,82 @@ const Gr = /* @__PURE__ */ w({
|
|
|
1482
1484
|
}), F = d(
|
|
1483
1485
|
() => o.value.every((b) => !b.values.length)
|
|
1484
1486
|
), z = d(() => {
|
|
1485
|
-
const b = [], { noBaseScales:
|
|
1486
|
-
return
|
|
1487
|
-
}), { hasNegativeValues: W } = wr(
|
|
1488
|
-
|
|
1487
|
+
const b = [], { noBaseScales: S } = p.value;
|
|
1488
|
+
return S || b.push(() => !!(G.value && M.value)), b.every((Y) => Y() === !0);
|
|
1489
|
+
}), { hasNegativeValues: W } = wr(x), { negativeBarAttributes: ke } = Nr(
|
|
1490
|
+
T,
|
|
1489
1491
|
G,
|
|
1490
1492
|
M,
|
|
1491
1493
|
u
|
|
1492
|
-
), { shouldGenerateTooltipAnchors:
|
|
1494
|
+
), { shouldGenerateTooltipAnchors: We } = Lt(
|
|
1493
1495
|
m,
|
|
1494
1496
|
p,
|
|
1495
1497
|
G,
|
|
1496
1498
|
M,
|
|
1497
1499
|
u,
|
|
1498
|
-
|
|
1500
|
+
x,
|
|
1499
1501
|
c
|
|
1500
|
-
), { tooltipConfig:
|
|
1501
|
-
() => p.value.withTooltip !== !1 &&
|
|
1502
|
-
),
|
|
1502
|
+
), { tooltipConfig: ee, showTooltip: Ze, hideTooltip: Xe } = Dr(), { getTooltipItems: Nt } = Rr(x), Ct = d(
|
|
1503
|
+
() => p.value.withTooltip !== !1 && ee.opened
|
|
1504
|
+
), Ht = d(
|
|
1503
1505
|
() => {
|
|
1504
1506
|
var b;
|
|
1505
1507
|
return ((b = p.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1506
1508
|
}
|
|
1507
|
-
),
|
|
1508
|
-
var
|
|
1509
|
-
const b = (
|
|
1510
|
-
return
|
|
1509
|
+
), Ue = d(() => {
|
|
1510
|
+
var S;
|
|
1511
|
+
const b = (S = p.value.tooltipOptions) == null ? void 0 : S.withPointerEvents;
|
|
1512
|
+
return ee.opened && (!b || b && f.value === !1);
|
|
1511
1513
|
});
|
|
1512
|
-
function
|
|
1513
|
-
var
|
|
1514
|
-
if (b
|
|
1515
|
-
|
|
1516
|
-
|
|
1514
|
+
function fe(b) {
|
|
1515
|
+
var Y;
|
|
1516
|
+
if (b === v.value)
|
|
1517
|
+
return;
|
|
1518
|
+
const S = v.value;
|
|
1519
|
+
if (p.value.withHover !== !1 && (v.value = b), p.value.withTooltip !== !1) {
|
|
1520
|
+
const St = (Y = p.value.tooltipOptions) != null && Y.targetElement ? p.value.tooltipOptions.targetElement === "self" ? _.value.$el : p.value.tooltipOptions.targetElement : s.value[b];
|
|
1521
|
+
Ze(St);
|
|
1517
1522
|
}
|
|
1523
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: S });
|
|
1518
1524
|
}
|
|
1519
1525
|
function xe() {
|
|
1520
|
-
|
|
1526
|
+
Xe(), v.value = -1;
|
|
1521
1527
|
}
|
|
1522
|
-
function
|
|
1528
|
+
function Te(b) {
|
|
1523
1529
|
if (b > o.value[0].values.length - 1) {
|
|
1524
|
-
ne(
|
|
1530
|
+
ne(K.InvalidHoveredIndex);
|
|
1525
1531
|
return;
|
|
1526
1532
|
}
|
|
1527
|
-
|
|
1533
|
+
fe(b);
|
|
1528
1534
|
}
|
|
1529
|
-
function
|
|
1535
|
+
function Dt() {
|
|
1530
1536
|
setTimeout(() => {
|
|
1531
|
-
|
|
1537
|
+
Ue.value && xe(), e("chart-mouseleave");
|
|
1532
1538
|
}, 0);
|
|
1533
1539
|
}
|
|
1534
|
-
function
|
|
1535
|
-
b !== null &&
|
|
1540
|
+
function Rt({ index: b, value: S, event: Y }) {
|
|
1541
|
+
b !== null && fe(b), e("axis-mouseenter", { index: b, value: S, event: Y });
|
|
1536
1542
|
}
|
|
1537
|
-
function
|
|
1538
|
-
e("axis-click", { index: b, value:
|
|
1543
|
+
function Pt({ index: b, value: S, event: Y }) {
|
|
1544
|
+
e("axis-click", { index: b, value: S, event: Y });
|
|
1539
1545
|
}
|
|
1540
1546
|
return H(
|
|
1541
1547
|
o,
|
|
1542
|
-
(b,
|
|
1548
|
+
(b, S) => e("data-changed", { newValue: b, oldValue: S })
|
|
1543
1549
|
), H(
|
|
1544
1550
|
a,
|
|
1545
|
-
(b,
|
|
1546
|
-
), H(F, (b) => b && ne(
|
|
1551
|
+
(b, S) => e("labels-changed", { newValue: b, oldValue: S })
|
|
1552
|
+
), H(F, (b) => b && ne(K.Empty), { immediate: !0 }), H(() => r.hoveredIndex, Te), H(
|
|
1547
1553
|
m,
|
|
1548
1554
|
(b) => {
|
|
1549
|
-
b && r.hoveredIndex != null && v.value === -1 &&
|
|
1555
|
+
b && r.hoveredIndex != null && v.value === -1 && Te(r.hoveredIndex);
|
|
1550
1556
|
},
|
|
1551
1557
|
{ flush: "post" }
|
|
1552
1558
|
), H(f, (b) => {
|
|
1553
|
-
b === !1 &&
|
|
1554
|
-
}),
|
|
1555
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1556
|
-
}),
|
|
1559
|
+
b === !1 && ee.opened && xe();
|
|
1560
|
+
}), J(async () => {
|
|
1561
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", fe);
|
|
1562
|
+
}), Ae("chartID", C), Ae("isEmpty", F), Ae("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: v, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: f, xAxisHeight: g, yAxisWidth: y, allOptions: p, internalData: x, computedLabels: A, containerSize: T, updateSize: k, chartID: C, listenInternalEvent: D, xScale: R, yScale: B, computedMargins: Q, computedXScale: G, computedYScale: M, computedXAxisOptions: q, computedYAxisOptions: U, xAxisTitle: $, yAxisTitle: h, showXAxisTitle: O, showYAxisTitle: N, isEmpty: F, isReady: z, hasNegativeValues: W, negativeBarAttributes: ke, shouldGenerateTooltipAnchors: We, tooltipConfig: ee, showTooltip: Ze, hideTooltip: Xe, getTooltipItems: Nt, isTooltipOpened: Ct, tooltipPosition: Ht, shouldHideTooltip: Ue, handleInternalHover: fe, handleHideTooltip: xe, handleExternalHover: Te, handleMouseleave: Dt, handleAxisMouseenter: Rt, handleAxisClick: Pt, LumeAxis: $n, LumeBar: Ve, LumeChartContainer: Fn, LumeChartLegend: zn, LumeTooltip: cr, LumeOverlayGroup: Ir, TOOLTIP_ANCHOR_RADIUS: pn };
|
|
1557
1563
|
}
|
|
1558
1564
|
});
|
|
1559
1565
|
var Vr = function() {
|
|
@@ -1619,7 +1625,7 @@ var Vr = function() {
|
|
|
1619
1625
|
jr,
|
|
1620
1626
|
!1,
|
|
1621
1627
|
null,
|
|
1622
|
-
"
|
|
1628
|
+
"dad8a6ee",
|
|
1623
1629
|
null,
|
|
1624
1630
|
null
|
|
1625
1631
|
);
|
|
@@ -1668,7 +1674,7 @@ var Kr = function() {
|
|
|
1668
1674
|
null
|
|
1669
1675
|
);
|
|
1670
1676
|
const qr = Qr.exports;
|
|
1671
|
-
function
|
|
1677
|
+
function rt(t, e) {
|
|
1672
1678
|
return {
|
|
1673
1679
|
x0: 0 + (e ? e.left : 0),
|
|
1674
1680
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1677,18 +1683,18 @@ function ot(t, e) {
|
|
|
1677
1683
|
};
|
|
1678
1684
|
}
|
|
1679
1685
|
function eo(t) {
|
|
1680
|
-
const e = I(
|
|
1686
|
+
const e = I(rt(t));
|
|
1681
1687
|
function r(n) {
|
|
1682
|
-
e.value =
|
|
1688
|
+
e.value = rt(t, n);
|
|
1683
1689
|
}
|
|
1684
1690
|
return { extents: e, updateExtents: r };
|
|
1685
1691
|
}
|
|
1686
|
-
var
|
|
1692
|
+
var Ot = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(Ot || {});
|
|
1687
1693
|
const to = "[lume] ";
|
|
1688
1694
|
function no(t, e, r = !0) {
|
|
1689
|
-
r &&
|
|
1695
|
+
r && pt() || console.error(to + "Error: " + t, e);
|
|
1690
1696
|
}
|
|
1691
|
-
const
|
|
1697
|
+
const ot = 8, ro = 8, oo = 20, ao = 200;
|
|
1692
1698
|
function le(t) {
|
|
1693
1699
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1694
1700
|
}
|
|
@@ -1698,7 +1704,7 @@ function lo(t, e) {
|
|
|
1698
1704
|
function uo(t, e) {
|
|
1699
1705
|
return e.links.find((r) => r.id === t);
|
|
1700
1706
|
}
|
|
1701
|
-
function
|
|
1707
|
+
function $t(t) {
|
|
1702
1708
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1703
1709
|
}
|
|
1704
1710
|
function io(t, e) {
|
|
@@ -1725,7 +1731,7 @@ function so(t) {
|
|
|
1725
1731
|
width: e.x1 - e.x0,
|
|
1726
1732
|
height: e.y1 - e.y0,
|
|
1727
1733
|
textTransform: {
|
|
1728
|
-
x: e.depth > 0 ? e.x1 +
|
|
1734
|
+
x: e.depth > 0 ? e.x1 + ot : e.x0 - ot,
|
|
1729
1735
|
y: (e.y1 + e.y0) / 2
|
|
1730
1736
|
},
|
|
1731
1737
|
node: e
|
|
@@ -1745,14 +1751,14 @@ function po(t) {
|
|
|
1745
1751
|
var r;
|
|
1746
1752
|
return {
|
|
1747
1753
|
id: e.id,
|
|
1748
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1754
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || pe,
|
|
1749
1755
|
d: _o(e)(e),
|
|
1750
1756
|
strokeWidth: Math.max(1, e.width),
|
|
1751
1757
|
link: e
|
|
1752
1758
|
};
|
|
1753
1759
|
});
|
|
1754
1760
|
}
|
|
1755
|
-
function
|
|
1761
|
+
function at(t, e, r, n, o) {
|
|
1756
1762
|
if (n === !1) {
|
|
1757
1763
|
t.node = {
|
|
1758
1764
|
...t.node,
|
|
@@ -1773,7 +1779,7 @@ const fo = {
|
|
|
1773
1779
|
nodes: [],
|
|
1774
1780
|
links: []
|
|
1775
1781
|
};
|
|
1776
|
-
function
|
|
1782
|
+
function lt(t, e) {
|
|
1777
1783
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1778
1784
|
}
|
|
1779
1785
|
function mo(t, e, r) {
|
|
@@ -1783,7 +1789,7 @@ function mo(t, e, r) {
|
|
|
1783
1789
|
({ label: _, color: m, value: f, deriveColorFromIncomingLinks: g, offset: y }) => ({
|
|
1784
1790
|
label: _ || f.toString(),
|
|
1785
1791
|
color: m,
|
|
1786
|
-
fallbackColor: m ||
|
|
1792
|
+
fallbackColor: m || pe,
|
|
1787
1793
|
id: f,
|
|
1788
1794
|
deriveColorFromIncomingLinks: g,
|
|
1789
1795
|
offset: y
|
|
@@ -1812,14 +1818,14 @@ function mo(t, e, r) {
|
|
|
1812
1818
|
var s;
|
|
1813
1819
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1814
1820
|
(_, m) => {
|
|
1815
|
-
const f =
|
|
1821
|
+
const f = lt(m, _);
|
|
1816
1822
|
return f ? (f.push(m), f.sort((g, y) => (g._y0 || g.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1817
1823
|
},
|
|
1818
1824
|
[]
|
|
1819
1825
|
);
|
|
1820
1826
|
});
|
|
1821
1827
|
function u(s) {
|
|
1822
|
-
const { offset: _ } = s, m =
|
|
1828
|
+
const { offset: _ } = s, m = lt(s, i.value);
|
|
1823
1829
|
if (!m)
|
|
1824
1830
|
return;
|
|
1825
1831
|
const f = m[m.findIndex((y) => y.id === s.id) - 1], g = f && m.length !== 1 ? f.y1 + _ : _;
|
|
@@ -1830,8 +1836,8 @@ function mo(t, e, r) {
|
|
|
1830
1836
|
(A) => A.source.id === m
|
|
1831
1837
|
), p = _.links.filter(
|
|
1832
1838
|
(A) => A.target.id === m
|
|
1833
|
-
),
|
|
1834
|
-
y.forEach((A) => A.y0 +=
|
|
1839
|
+
), x = g - f;
|
|
1840
|
+
y.forEach((A) => A.y0 += x), p.forEach((A) => A.y1 += x);
|
|
1835
1841
|
}
|
|
1836
1842
|
const v = d(() => (n.value && o.value.forEach((s) => {
|
|
1837
1843
|
typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
@@ -1844,21 +1850,21 @@ function mo(t, e, r) {
|
|
|
1844
1850
|
[m, f]
|
|
1845
1851
|
])({ nodes: o.value, links: a.value });
|
|
1846
1852
|
} catch (s) {
|
|
1847
|
-
no(
|
|
1853
|
+
no(Ot.GraphProblem, s), n.value = fo;
|
|
1848
1854
|
}
|
|
1849
1855
|
}), { columns: i, graph: v };
|
|
1850
1856
|
}
|
|
1851
|
-
function
|
|
1857
|
+
function Re(t, e) {
|
|
1852
1858
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1853
|
-
e[r.id] = n,
|
|
1859
|
+
e[r.id] = n, Re(
|
|
1854
1860
|
r,
|
|
1855
1861
|
e
|
|
1856
1862
|
);
|
|
1857
1863
|
}), e;
|
|
1858
1864
|
}
|
|
1859
|
-
function
|
|
1865
|
+
function Pe(t, e) {
|
|
1860
1866
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1861
|
-
e[r.id] = n,
|
|
1867
|
+
e[r.id] = n, Pe(
|
|
1862
1868
|
r,
|
|
1863
1869
|
e
|
|
1864
1870
|
);
|
|
@@ -1869,20 +1875,20 @@ function ho(t, e) {
|
|
|
1869
1875
|
}
|
|
1870
1876
|
const go = (t, e) => {
|
|
1871
1877
|
let r;
|
|
1872
|
-
|
|
1878
|
+
$t(t) ? r = {
|
|
1873
1879
|
[t.id]: t.value,
|
|
1874
|
-
...
|
|
1875
|
-
...
|
|
1880
|
+
...Re(t),
|
|
1881
|
+
...Pe(t)
|
|
1876
1882
|
} : r = {
|
|
1877
1883
|
[t.source.id]: t.source.value,
|
|
1878
1884
|
[t.target.id]: t.target.value,
|
|
1879
|
-
...
|
|
1880
|
-
...
|
|
1885
|
+
...Re(t.source),
|
|
1886
|
+
...Pe(t.target)
|
|
1881
1887
|
};
|
|
1882
1888
|
const n = ho(r, e);
|
|
1883
1889
|
return { nodes: r, links: n };
|
|
1884
1890
|
}, yo = (t) => {
|
|
1885
|
-
if (
|
|
1891
|
+
if ($t(t)) {
|
|
1886
1892
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1887
1893
|
return {
|
|
1888
1894
|
nodes: e.reduce(
|
|
@@ -1908,7 +1914,7 @@ function bo(t, e, r) {
|
|
|
1908
1914
|
return H(o, (a, l) => {
|
|
1909
1915
|
if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
|
|
1910
1916
|
t.value.forEach((i) => {
|
|
1911
|
-
i.node.id in l.nodes &&
|
|
1917
|
+
i.node.id in l.nodes && at(
|
|
1912
1918
|
i,
|
|
1913
1919
|
l.nodes[i.node.id],
|
|
1914
1920
|
i.node.value,
|
|
@@ -1919,7 +1925,7 @@ function bo(t, e, r) {
|
|
|
1919
1925
|
return;
|
|
1920
1926
|
}
|
|
1921
1927
|
t.value.forEach((i) => {
|
|
1922
|
-
i.node.id in a.nodes &&
|
|
1928
|
+
i.node.id in a.nodes && at(
|
|
1923
1929
|
i,
|
|
1924
1930
|
i.node.value,
|
|
1925
1931
|
a.nodes[i.node.id],
|
|
@@ -1931,7 +1937,7 @@ function bo(t, e, r) {
|
|
|
1931
1937
|
const ko = /* @__PURE__ */ w({
|
|
1932
1938
|
__name: "lume-alluvial-group",
|
|
1933
1939
|
props: {
|
|
1934
|
-
...
|
|
1940
|
+
...be(),
|
|
1935
1941
|
hoveredElementId: {
|
|
1936
1942
|
type: [Number, String],
|
|
1937
1943
|
default: null
|
|
@@ -1939,15 +1945,15 @@ const ko = /* @__PURE__ */ w({
|
|
|
1939
1945
|
},
|
|
1940
1946
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1941
1947
|
setup(t, { emit: e }) {
|
|
1942
|
-
const r = t, n =
|
|
1948
|
+
const r = t, n = de("chartID"), { data: o, options: a } = P(r), l = I([]), i = I([]), u = I(null), { extents: c, updateExtents: v } = eo(r.containerSize), { columns: s, graph: _ } = mo(o, a, c), { hoveredElement: m, highlightedElements: f } = bo(
|
|
1943
1949
|
l,
|
|
1944
1950
|
a,
|
|
1945
1951
|
_
|
|
1946
|
-
), g = d(() =>
|
|
1952
|
+
), g = d(() => he(a.value.valueFormat)), y = d(
|
|
1947
1953
|
() => Object.keys(f.value.nodes)
|
|
1948
1954
|
), p = d(() => s.value ? s.value.map(
|
|
1949
1955
|
(h) => h[0].x0 + a.value.nodeWidth / 2
|
|
1950
|
-
) : []),
|
|
1956
|
+
) : []), x = d(() => {
|
|
1951
1957
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
1952
1958
|
return a.value.nodeHeaders.slice(0, p.value.length).map((h, O) => ({
|
|
1953
1959
|
label: h,
|
|
@@ -1955,7 +1961,7 @@ const ko = /* @__PURE__ */ w({
|
|
|
1955
1961
|
}));
|
|
1956
1962
|
}), A = d(
|
|
1957
1963
|
() => a.value.nodeHeaderPadding ?? oo
|
|
1958
|
-
),
|
|
1964
|
+
), T = d(() => {
|
|
1959
1965
|
if (!(!a.value.gradient || !_.value))
|
|
1960
1966
|
return _.value.links.reduce((h, O) => {
|
|
1961
1967
|
const { source: N, target: F } = O, z = N.color || N.fallbackColor, W = F.deriveColorFromIncomingLinks ? z : F.color || F.fallbackColor;
|
|
@@ -1973,15 +1979,15 @@ const ko = /* @__PURE__ */ w({
|
|
|
1973
1979
|
return h.forEach((N) => {
|
|
1974
1980
|
const F = [];
|
|
1975
1981
|
i.value.filter(({ link: z }) => z.target.id === N.node.id).reverse().reduce((z, W) => {
|
|
1976
|
-
const
|
|
1982
|
+
const ke = W.link.target.y1 - W.link.target.y0, ee = W.link.value / N.node.value * ke;
|
|
1977
1983
|
return F.push({
|
|
1978
1984
|
x: N.x,
|
|
1979
1985
|
y: N.y + z,
|
|
1980
|
-
height:
|
|
1986
|
+
height: ee,
|
|
1981
1987
|
width: N.width,
|
|
1982
1988
|
key: `node-block-${N.node.id}-source-link-${W.link.source.id}`,
|
|
1983
|
-
class: `lume-alluvial-group__node-block lume-fill--${W.link.source.color ||
|
|
1984
|
-
}), z +
|
|
1989
|
+
class: `lume-alluvial-group__node-block lume-fill--${W.link.source.color || pe}`
|
|
1990
|
+
}), z + ee;
|
|
1985
1991
|
}, 0), O.push({
|
|
1986
1992
|
id: N.node.id,
|
|
1987
1993
|
subNodes: F
|
|
@@ -2000,7 +2006,7 @@ const ko = /* @__PURE__ */ w({
|
|
|
2000
2006
|
function B(h) {
|
|
2001
2007
|
return f.value.links.length > 0 && !f.value.links.includes(h);
|
|
2002
2008
|
}
|
|
2003
|
-
function
|
|
2009
|
+
function Q(h) {
|
|
2004
2010
|
return f.value.links.length > 0 && f.value.links.includes(h);
|
|
2005
2011
|
}
|
|
2006
2012
|
function G(h) {
|
|
@@ -2009,7 +2015,7 @@ const ko = /* @__PURE__ */ w({
|
|
|
2009
2015
|
function M(h, O) {
|
|
2010
2016
|
h !== m.value && (m.value = h, e("link-mouseenter", { link: h, event: O }));
|
|
2011
2017
|
}
|
|
2012
|
-
function
|
|
2018
|
+
function q(h) {
|
|
2013
2019
|
const O = m.value;
|
|
2014
2020
|
m.value = null, e("link-mouseleave", { link: O, event: h });
|
|
2015
2021
|
}
|
|
@@ -2020,7 +2026,7 @@ const ko = /* @__PURE__ */ w({
|
|
|
2020
2026
|
}
|
|
2021
2027
|
const O = lo(h, _.value) || uo(h, _.value);
|
|
2022
2028
|
if (!O) {
|
|
2023
|
-
ne(
|
|
2029
|
+
ne(K.InvalidHoveredElement);
|
|
2024
2030
|
return;
|
|
2025
2031
|
}
|
|
2026
2032
|
m.value = O;
|
|
@@ -2036,10 +2042,10 @@ const ko = /* @__PURE__ */ w({
|
|
|
2036
2042
|
const h = io(_.value, u.value);
|
|
2037
2043
|
v(h);
|
|
2038
2044
|
}
|
|
2039
|
-
}), H(() => r.hoveredElementId, U), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: v, columns: s, graph: _, hoveredElement: m, highlightedElements: f, formatValue: g, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders:
|
|
2045
|
+
}), H(() => r.hoveredElementId, U), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: v, columns: s, graph: _, hoveredElement: m, highlightedElements: f, formatValue: g, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders: x, computedNodeHeaderPadding: A, gradients: T, nodesDerivingColorFromIncomingLinks: k, getLinkStroke: C, isNodeFaded: D, isNodeFocused: R, isLinkFaded: B, isLinkFocused: Q, shouldDeriveNodeColorFromIncomingLinks: G, handleLinkMouseover: M, handleLinkMouseleave: q, handleExternalHover: U, getSubNodesDerivingColorFromIncomingLinks: $, LumeAlluvialNodeLabel: Ur, LumeAlluvialNodeValue: qr, GHOST_STROKE_WIDTH_OFFSET: ro };
|
|
2040
2046
|
}
|
|
2041
2047
|
});
|
|
2042
|
-
var
|
|
2048
|
+
var xo = function() {
|
|
2043
2049
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2044
2050
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(o) {
|
|
2045
2051
|
return r("text", { key: `header_${o.x}`, staticClass: "lume-alluvial-group__node-header lume-typography--caption", attrs: { x: o.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(o.label) + " ")]);
|
|
@@ -2091,10 +2097,10 @@ var To = function() {
|
|
|
2091
2097
|
o.node.value
|
|
2092
2098
|
) })], 2)], 2)]);
|
|
2093
2099
|
})], 2);
|
|
2094
|
-
},
|
|
2100
|
+
}, To = [], Ao = /* @__PURE__ */ E(
|
|
2095
2101
|
ko,
|
|
2096
|
-
To,
|
|
2097
2102
|
xo,
|
|
2103
|
+
To,
|
|
2098
2104
|
!1,
|
|
2099
2105
|
null,
|
|
2100
2106
|
"6fe8c153",
|
|
@@ -2123,10 +2129,10 @@ const Lo = Ao.exports, Oo = {
|
|
|
2123
2129
|
}, $o = /* @__PURE__ */ w({
|
|
2124
2130
|
__name: "lume-alluvial-diagram",
|
|
2125
2131
|
props: {
|
|
2126
|
-
...
|
|
2132
|
+
...Tr(Be)
|
|
2127
2133
|
},
|
|
2128
2134
|
setup(t, { emit: e }) {
|
|
2129
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), a = un(V()), { options: l } =
|
|
2135
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), a = un(V()), { options: l } = P(r), { allOptions: i } = Z(l, Oo);
|
|
2130
2136
|
function u(c) {
|
|
2131
2137
|
return {
|
|
2132
2138
|
...c,
|
|
@@ -2161,7 +2167,7 @@ var Io = function() {
|
|
|
2161
2167
|
null
|
|
2162
2168
|
);
|
|
2163
2169
|
const Va = wo.exports;
|
|
2164
|
-
var
|
|
2170
|
+
var Se = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Se || {});
|
|
2165
2171
|
const No = /* @__PURE__ */ w({
|
|
2166
2172
|
__name: "lume-bar-chart",
|
|
2167
2173
|
props: {
|
|
@@ -2169,15 +2175,15 @@ const No = /* @__PURE__ */ w({
|
|
|
2169
2175
|
type: {
|
|
2170
2176
|
type: String,
|
|
2171
2177
|
default: null,
|
|
2172
|
-
validator: (t) => t in
|
|
2178
|
+
validator: (t) => t in Se || t == null
|
|
2173
2179
|
}
|
|
2174
2180
|
},
|
|
2175
2181
|
setup(t, { emit: e }) {
|
|
2176
|
-
const r = t, n =
|
|
2182
|
+
const r = t, n = Le(
|
|
2177
2183
|
() => import("./common/42f5d2fc.js")
|
|
2178
|
-
), o =
|
|
2184
|
+
), o = Le(
|
|
2179
2185
|
() => import("./common/abc9d23d.js")
|
|
2180
|
-
), a =
|
|
2186
|
+
), a = Le(
|
|
2181
2187
|
() => import("./common/0664fd4d.js")
|
|
2182
2188
|
), l = /* @__PURE__ */ new Map([
|
|
2183
2189
|
["single", n],
|
|
@@ -2197,14 +2203,14 @@ const No = /* @__PURE__ */ w({
|
|
|
2197
2203
|
}
|
|
2198
2204
|
const v = d(() => {
|
|
2199
2205
|
if (r.data) {
|
|
2200
|
-
if (
|
|
2206
|
+
if (Be(r.data))
|
|
2201
2207
|
return l.get("single");
|
|
2202
2208
|
if (!r.type)
|
|
2203
2209
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2204
2210
|
return l.get(r.type);
|
|
2205
2211
|
}
|
|
2206
2212
|
});
|
|
2207
|
-
return { __sfc: !0, TYPES:
|
|
2213
|
+
return { __sfc: !0, TYPES: Se, LumeSingleBarChart: n, LumeGroupedBarChart: o, LumeStackedBarChart: a, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: v };
|
|
2208
2214
|
}
|
|
2209
2215
|
});
|
|
2210
2216
|
var Co = function() {
|
|
@@ -2245,7 +2251,7 @@ const So = (t = !1) => ({
|
|
|
2245
2251
|
}
|
|
2246
2252
|
} : {}
|
|
2247
2253
|
});
|
|
2248
|
-
function
|
|
2254
|
+
function It(t) {
|
|
2249
2255
|
const e = d(() => t.value.map((n) => ({
|
|
2250
2256
|
...n,
|
|
2251
2257
|
values: n.values.map((o) => ({
|
|
@@ -2288,13 +2294,13 @@ function Go(t, e, r, n, o, a) {
|
|
|
2288
2294
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2289
2295
|
}
|
|
2290
2296
|
function v(s, _, m) {
|
|
2291
|
-
const { value: f, color: g } = s, y = g ?? t.value[_].color ??
|
|
2297
|
+
const { value: f, color: g } = s, y = g ?? t.value[_].color ?? pe, { x: p, y: x } = i(f, m), A = u(f), T = c(f);
|
|
2292
2298
|
return {
|
|
2293
2299
|
classList: [`lume-fill--${y}`, ...a],
|
|
2294
2300
|
x: p,
|
|
2295
|
-
y:
|
|
2301
|
+
y: x,
|
|
2296
2302
|
width: A,
|
|
2297
|
-
height:
|
|
2303
|
+
height: T,
|
|
2298
2304
|
isFaded: o.value !== -1 && o.value !== m,
|
|
2299
2305
|
isNegative: f < 0
|
|
2300
2306
|
};
|
|
@@ -2304,7 +2310,7 @@ function Go(t, e, r, n, o, a) {
|
|
|
2304
2310
|
function Vo(t, e, r, n, o, a) {
|
|
2305
2311
|
const l = d(
|
|
2306
2312
|
() => n.value === L.HORIZONTAL
|
|
2307
|
-
), i = d(() =>
|
|
2313
|
+
), i = d(() => se().domain(t.value.map((f, g) => g)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => se().domain(t.value.map((f, g) => g)).range([0, r.value.bandwidth()]).padding(0));
|
|
2308
2314
|
function c(f, g, y) {
|
|
2309
2315
|
if (l.value)
|
|
2310
2316
|
return f >= 0 ? e.value(0) : e.value(f);
|
|
@@ -2325,10 +2331,10 @@ function Vo(t, e, r, n, o, a) {
|
|
|
2325
2331
|
return l.value ? u.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
|
|
2326
2332
|
}
|
|
2327
2333
|
function m(f, g, y) {
|
|
2328
|
-
const { value: p, color:
|
|
2334
|
+
const { value: p, color: x } = f, A = x ?? t.value[g].color ?? Object.values(j)[g], T = c(p, y, g), k = v(p, y, g), C = s(p), D = _(p);
|
|
2329
2335
|
return {
|
|
2330
2336
|
classList: [`lume-fill--${A}`, ...a],
|
|
2331
|
-
x,
|
|
2337
|
+
x: T,
|
|
2332
2338
|
y: k,
|
|
2333
2339
|
width: C,
|
|
2334
2340
|
height: D,
|
|
@@ -2356,9 +2362,9 @@ function jo(t, e, r) {
|
|
|
2356
2362
|
return Math.max(...u);
|
|
2357
2363
|
});
|
|
2358
2364
|
function l(u, c, v) {
|
|
2359
|
-
return n.value ?
|
|
2360
|
-
|
|
2361
|
-
|
|
2365
|
+
return n.value ? ce().domain([o.value, a.value]).range([0, v.width]) : Object.assign(
|
|
2366
|
+
tt(
|
|
2367
|
+
se().domain(c.map((s, _) => _)).range([0, v.width]),
|
|
2362
2368
|
e.value,
|
|
2363
2369
|
r.value
|
|
2364
2370
|
),
|
|
@@ -2367,13 +2373,13 @@ function jo(t, e, r) {
|
|
|
2367
2373
|
}
|
|
2368
2374
|
function i(u, c, v) {
|
|
2369
2375
|
return n.value ? Object.assign(
|
|
2370
|
-
|
|
2371
|
-
|
|
2376
|
+
tt(
|
|
2377
|
+
se().domain(c.map((s, _) => _)).range([0, v.height]),
|
|
2372
2378
|
e.value,
|
|
2373
2379
|
r.value
|
|
2374
2380
|
),
|
|
2375
2381
|
{ labels: c }
|
|
2376
|
-
) :
|
|
2382
|
+
) : ce().domain([a.value, o.value]).range([0, v.height]);
|
|
2377
2383
|
}
|
|
2378
2384
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2379
2385
|
}
|
|
@@ -2383,11 +2389,11 @@ function Mo(t, e, r, n, o, a) {
|
|
|
2383
2389
|
), i = d(
|
|
2384
2390
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2385
2391
|
), u = d(
|
|
2386
|
-
() => t.value.map((p) => p.values.map((
|
|
2392
|
+
() => t.value.map((p) => p.values.map((x) => x == null ? void 0 : x.value))
|
|
2387
2393
|
);
|
|
2388
|
-
function c(p,
|
|
2389
|
-
let
|
|
2390
|
-
return l.value ? (
|
|
2394
|
+
function c(p, x, A) {
|
|
2395
|
+
let T, k;
|
|
2396
|
+
return l.value ? (T = e.value(p >= 0 ? 0 + A : p + A), k = r.value(i.value[x])) : (T = e.value(i.value[x]), k = r.value(p >= 0 ? p + A : 0 + A)), { x: T, y: k };
|
|
2391
2397
|
}
|
|
2392
2398
|
function v(p) {
|
|
2393
2399
|
return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
|
|
@@ -2401,34 +2407,34 @@ function Mo(t, e, r, n, o, a) {
|
|
|
2401
2407
|
function m(p) {
|
|
2402
2408
|
return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
|
|
2403
2409
|
}
|
|
2404
|
-
function f(p,
|
|
2405
|
-
return p ? u.value.reduce((A,
|
|
2410
|
+
function f(p, x) {
|
|
2411
|
+
return p ? u.value.reduce((A, T, k) => (k < p && T[x] >= 0 && (A += T[x]), A), 0) : 0;
|
|
2406
2412
|
}
|
|
2407
|
-
function g(p,
|
|
2408
|
-
return p ? u.value.reduce((A,
|
|
2413
|
+
function g(p, x) {
|
|
2414
|
+
return p ? u.value.reduce((A, T, k) => (k < p && T[x] < 0 && (A += T[x]), A), 0) : 0;
|
|
2409
2415
|
}
|
|
2410
|
-
function y(p,
|
|
2411
|
-
const { value:
|
|
2416
|
+
function y(p, x, A) {
|
|
2417
|
+
const { value: T, color: k } = p, C = T >= 0 ? v(T) : s(T), D = T >= 0 ? _(T) : m(T), R = T >= 0 ? f(x, A) : g(x, A), { x: B, y: Q } = c(T, A, R);
|
|
2412
2418
|
return {
|
|
2413
|
-
classList: [`lume-fill--${k ?? t.value[
|
|
2419
|
+
classList: [`lume-fill--${k ?? t.value[x].color ?? Object.values(j)[x]}`, ...a],
|
|
2414
2420
|
width: C,
|
|
2415
2421
|
height: D,
|
|
2416
2422
|
x: B,
|
|
2417
|
-
y:
|
|
2423
|
+
y: Q,
|
|
2418
2424
|
isFaded: o.value !== -1 && o.value !== A,
|
|
2419
|
-
isNegative:
|
|
2425
|
+
isNegative: T < 0
|
|
2420
2426
|
};
|
|
2421
2427
|
}
|
|
2422
2428
|
return { barAttributeGenerator: y };
|
|
2423
2429
|
}
|
|
2424
|
-
const
|
|
2430
|
+
const ut = {
|
|
2425
2431
|
single: Go,
|
|
2426
2432
|
grouped: Vo,
|
|
2427
2433
|
stacked: Mo
|
|
2428
2434
|
}, zo = /* @__PURE__ */ w({
|
|
2429
2435
|
__name: "lume-bar-group",
|
|
2430
2436
|
props: {
|
|
2431
|
-
...
|
|
2437
|
+
...be(),
|
|
2432
2438
|
classList: {
|
|
2433
2439
|
type: [String, Array],
|
|
2434
2440
|
default: () => []
|
|
@@ -2450,8 +2456,8 @@ const it = {
|
|
|
2450
2456
|
xScale: u,
|
|
2451
2457
|
yScale: c,
|
|
2452
2458
|
classList: v
|
|
2453
|
-
} =
|
|
2454
|
-
const
|
|
2459
|
+
} = P(r), s = de("chartID"), { emitInternalEvent: _ } = X(e, s), { groupedData: m } = It(n), { barXScale: f, barYScale: g } = Fo(u, c, a), y = d(() => typeof v.value == "string" ? [v.value] : v.value), p = d(() => {
|
|
2460
|
+
const T = Bo(n, i), { barAttributeGenerator: k } = ut[T](
|
|
2455
2461
|
n,
|
|
2456
2462
|
f,
|
|
2457
2463
|
g,
|
|
@@ -2460,14 +2466,14 @@ const it = {
|
|
|
2460
2466
|
y.value
|
|
2461
2467
|
);
|
|
2462
2468
|
return k;
|
|
2463
|
-
}),
|
|
2469
|
+
}), x = d(() => {
|
|
2464
2470
|
if (l.value)
|
|
2465
2471
|
return a.value === L.HORIZONTAL ? "width" : "height";
|
|
2466
2472
|
});
|
|
2467
|
-
async function A(
|
|
2468
|
-
e("lume__internal--hover",
|
|
2473
|
+
async function A(T) {
|
|
2474
|
+
e("lume__internal--hover", T), _("lume__internal--hover", T);
|
|
2469
2475
|
}
|
|
2470
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2476
|
+
return { __sfc: !0, MIXIN_MAP: ut, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: v, chartID: s, emitInternalEvent: _, groupedData: m, barXScale: f, barYScale: g, computedClasses: y, getBarAttributes: p, computedTransition: x, handleInternalHover: A, LumeBar: Ve };
|
|
2471
2477
|
}
|
|
2472
2478
|
});
|
|
2473
2479
|
var Wo = function() {
|
|
@@ -2495,7 +2501,7 @@ var Wo = function() {
|
|
|
2495
2501
|
null,
|
|
2496
2502
|
null
|
|
2497
2503
|
);
|
|
2498
|
-
const
|
|
2504
|
+
const ze = Xo.exports, Uo = {
|
|
2499
2505
|
[L.VERTICAL]: {
|
|
2500
2506
|
withTooltip: !0,
|
|
2501
2507
|
xAxisOptions: {},
|
|
@@ -2511,14 +2517,14 @@ const We = Xo.exports, Uo = {
|
|
|
2511
2517
|
}, Yo = /* @__PURE__ */ w({
|
|
2512
2518
|
__name: "lume-single-bar-chart",
|
|
2513
2519
|
props: {
|
|
2514
|
-
...ue(
|
|
2520
|
+
...ue(Be)
|
|
2515
2521
|
},
|
|
2516
2522
|
setup(t, { emit: e }) {
|
|
2517
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } =
|
|
2523
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } = P(r), i = d(
|
|
2518
2524
|
() => Uo[a.value || L.VERTICAL]
|
|
2519
2525
|
// needs to be computed so that default options are reactive
|
|
2520
2526
|
), { allOptions: u } = Z(l, i);
|
|
2521
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2527
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: ze };
|
|
2522
2528
|
}
|
|
2523
2529
|
});
|
|
2524
2530
|
var Ko = function() {
|
|
@@ -2560,14 +2566,14 @@ const Ma = Qo.exports, qo = {
|
|
|
2560
2566
|
...ue()
|
|
2561
2567
|
},
|
|
2562
2568
|
setup(t, { emit: e }) {
|
|
2563
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } =
|
|
2569
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } = P(r), i = d(
|
|
2564
2570
|
() => qo[a.value || L.VERTICAL]
|
|
2565
2571
|
// needs to be computed so that default options are reactive
|
|
2566
2572
|
), { allOptions: u } = Z(
|
|
2567
2573
|
l,
|
|
2568
2574
|
i
|
|
2569
2575
|
);
|
|
2570
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2576
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: ze };
|
|
2571
2577
|
}
|
|
2572
2578
|
});
|
|
2573
2579
|
var ta = function() {
|
|
@@ -2609,18 +2615,18 @@ const za = ra.exports, oa = {
|
|
|
2609
2615
|
...ue()
|
|
2610
2616
|
},
|
|
2611
2617
|
setup(t, { emit: e }) {
|
|
2612
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { data: a, orientation: l, options: i } =
|
|
2618
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { data: a, orientation: l, options: i } = P(r), u = d(
|
|
2613
2619
|
() => oa[l.value || L.VERTICAL]
|
|
2614
2620
|
// needs to be computed so that default options are reactive
|
|
2615
2621
|
), { allOptions: c } = Z(
|
|
2616
2622
|
i,
|
|
2617
2623
|
u
|
|
2618
|
-
), { internalData: v } =
|
|
2624
|
+
), { internalData: v } = Me(a), { groupedData: s } = It(v), { stackedXScaleGenerator: _, stackedYScaleGenerator: m } = jo(
|
|
2619
2625
|
s,
|
|
2620
2626
|
l,
|
|
2621
2627
|
i
|
|
2622
2628
|
);
|
|
2623
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, baseOptions: u, allOptions: c, internalData: v, groupedData: s, stackedXScaleGenerator: _, stackedYScaleGenerator: m, LumeChart: ie, LumeBarGroup:
|
|
2629
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, baseOptions: u, allOptions: c, internalData: v, groupedData: s, stackedXScaleGenerator: _, stackedYScaleGenerator: m, LumeChart: ie, LumeBarGroup: ze };
|
|
2624
2630
|
}
|
|
2625
2631
|
});
|
|
2626
2632
|
var la = function() {
|
|
@@ -2642,7 +2648,7 @@ var la = function() {
|
|
|
2642
2648
|
null,
|
|
2643
2649
|
null
|
|
2644
2650
|
);
|
|
2645
|
-
const Wa = ia.exports,
|
|
2651
|
+
const Wa = ia.exports, it = 2, sa = /* @__PURE__ */ w({
|
|
2646
2652
|
__name: "lume-line",
|
|
2647
2653
|
props: {
|
|
2648
2654
|
pathDefinition: {
|
|
@@ -2651,7 +2657,7 @@ const Wa = ia.exports, st = 2, sa = /* @__PURE__ */ w({
|
|
|
2651
2657
|
},
|
|
2652
2658
|
width: {
|
|
2653
2659
|
type: Number,
|
|
2654
|
-
default:
|
|
2660
|
+
default: it
|
|
2655
2661
|
},
|
|
2656
2662
|
color: {
|
|
2657
2663
|
type: String,
|
|
@@ -2677,7 +2683,7 @@ const Wa = ia.exports, st = 2, sa = /* @__PURE__ */ w({
|
|
|
2677
2683
|
emits: ["click"],
|
|
2678
2684
|
setup(t, { emit: e }) {
|
|
2679
2685
|
const r = I(null);
|
|
2680
|
-
return
|
|
2686
|
+
return J(() => ye(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: it, emit: e, root: r };
|
|
2681
2687
|
}
|
|
2682
2688
|
});
|
|
2683
2689
|
var ca = function() {
|
|
@@ -2702,7 +2708,7 @@ var ca = function() {
|
|
|
2702
2708
|
null,
|
|
2703
2709
|
null
|
|
2704
2710
|
);
|
|
2705
|
-
const _a = va.exports,
|
|
2711
|
+
const _a = va.exports, st = 4, pa = /* @__PURE__ */ w({
|
|
2706
2712
|
__name: "lume-point",
|
|
2707
2713
|
props: {
|
|
2708
2714
|
x: { type: Number, required: !0 },
|
|
@@ -2713,7 +2719,7 @@ const _a = va.exports, ct = 4, pa = /* @__PURE__ */ w({
|
|
|
2713
2719
|
},
|
|
2714
2720
|
radius: {
|
|
2715
2721
|
type: Number,
|
|
2716
|
-
default:
|
|
2722
|
+
default: st
|
|
2717
2723
|
},
|
|
2718
2724
|
active: {
|
|
2719
2725
|
type: Boolean,
|
|
@@ -2723,7 +2729,7 @@ const _a = va.exports, ct = 4, pa = /* @__PURE__ */ w({
|
|
|
2723
2729
|
emits: ["click"],
|
|
2724
2730
|
setup(t, { emit: e }) {
|
|
2725
2731
|
const r = t, n = I(null), o = d(() => r.radius / 2);
|
|
2726
|
-
return
|
|
2732
|
+
return J(() => ye(n.value)), { __sfc: !0, DEFAULT_RADIUS: st, props: r, emit: e, root: n, strokeWidth: o };
|
|
2727
2733
|
}
|
|
2728
2734
|
});
|
|
2729
2735
|
var fa = function() {
|
|
@@ -2742,7 +2748,7 @@ var fa = function() {
|
|
|
2742
2748
|
null
|
|
2743
2749
|
);
|
|
2744
2750
|
const ga = ha.exports;
|
|
2745
|
-
function
|
|
2751
|
+
function Et(t) {
|
|
2746
2752
|
function e(a) {
|
|
2747
2753
|
let l = null;
|
|
2748
2754
|
return a == null ? void 0 : a.reduce((i, u, c) => (u == null || u.value == null ? (l ? l.push(c) : l = [c], c === (a == null ? void 0 : a.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
@@ -2778,7 +2784,7 @@ function wt(t) {
|
|
|
2778
2784
|
c.length,
|
|
2779
2785
|
c.indexOf(u)
|
|
2780
2786
|
),
|
|
2781
|
-
label:
|
|
2787
|
+
label: yt
|
|
2782
2788
|
};
|
|
2783
2789
|
}
|
|
2784
2790
|
return i;
|
|
@@ -2798,10 +2804,10 @@ function ka(t, e, r, n) {
|
|
|
2798
2804
|
oe(r) ? ya(r, t) : ba(r, t)
|
|
2799
2805
|
).y((a) => n(a))(e);
|
|
2800
2806
|
}
|
|
2801
|
-
const
|
|
2807
|
+
const ct = 1, xa = /* @__PURE__ */ w({
|
|
2802
2808
|
__name: "lume-line-group",
|
|
2803
2809
|
props: {
|
|
2804
|
-
...
|
|
2810
|
+
...be(),
|
|
2805
2811
|
withPoints: {
|
|
2806
2812
|
type: Boolean,
|
|
2807
2813
|
default: !0
|
|
@@ -2813,10 +2819,10 @@ const dt = 1, Ta = /* @__PURE__ */ w({
|
|
|
2813
2819
|
},
|
|
2814
2820
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2815
2821
|
setup(t, { emit: e }) {
|
|
2816
|
-
const r = t, { data: n, options: o, xScale: a, yScale: l } =
|
|
2822
|
+
const r = t, { data: n, options: o, xScale: a, yScale: l } = P(r), i = de(
|
|
2817
2823
|
"tooltipAnchorAttributes",
|
|
2818
2824
|
null
|
|
2819
|
-
), { updateTooltipAnchorAttributes: u } =
|
|
2825
|
+
), { updateTooltipAnchorAttributes: u } = Lt(
|
|
2820
2826
|
i,
|
|
2821
2827
|
o,
|
|
2822
2828
|
a,
|
|
@@ -2824,7 +2830,7 @@ const dt = 1, Ta = /* @__PURE__ */ w({
|
|
|
2824
2830
|
), c = d(() => {
|
|
2825
2831
|
if (n.value.every((C) => C.isDashed))
|
|
2826
2832
|
return n.value;
|
|
2827
|
-
const { computedLineData: k } =
|
|
2833
|
+
const { computedLineData: k } = Et(n);
|
|
2828
2834
|
return o.value.withTooltip !== !1 && (i != null && i.value) && u(k.value), k.value;
|
|
2829
2835
|
}), v = d(() => {
|
|
2830
2836
|
if (r.hoveredIndex === -1)
|
|
@@ -2834,12 +2840,12 @@ const dt = 1, Ta = /* @__PURE__ */ w({
|
|
|
2834
2840
|
r.hoveredIndex
|
|
2835
2841
|
);
|
|
2836
2842
|
return {
|
|
2837
|
-
d: `M ${
|
|
2843
|
+
d: `M ${we(a.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2838
2844
|
V ${l.value(k)}`
|
|
2839
2845
|
// Move to X index, Vertical line to the highest point
|
|
2840
2846
|
};
|
|
2841
2847
|
}), s = d(
|
|
2842
|
-
() => a.value &&
|
|
2848
|
+
() => a.value && ct / (on(a.value) - 1)
|
|
2843
2849
|
// Subtracting the first line (read below)
|
|
2844
2850
|
), _ = d(
|
|
2845
2851
|
() => {
|
|
@@ -2868,7 +2874,7 @@ const dt = 1, Ta = /* @__PURE__ */ w({
|
|
|
2868
2874
|
l.value
|
|
2869
2875
|
) || "";
|
|
2870
2876
|
}
|
|
2871
|
-
function
|
|
2877
|
+
function x(k) {
|
|
2872
2878
|
return {
|
|
2873
2879
|
animationDelay: k < 2 ? 0 : (k - 1) * s.value,
|
|
2874
2880
|
animationDuration: s.value
|
|
@@ -2882,13 +2888,13 @@ const dt = 1, Ta = /* @__PURE__ */ w({
|
|
|
2882
2888
|
y: l.value(D)
|
|
2883
2889
|
};
|
|
2884
2890
|
}
|
|
2885
|
-
function
|
|
2891
|
+
function T(k) {
|
|
2886
2892
|
return r.hoveredIndex === k;
|
|
2887
2893
|
}
|
|
2888
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2894
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: ct, props: r, emit: e, data: n, options: o, xScale: a, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: c, overlayLineAttributes: v, animationDuration: s, pointRadius: _, xAxisOffset: m, domain: f, computedWithPoints: g, getValuesFromDataset: y, getPathDefinition: p, getLineTransitionParams: x, getPointPosition: A, isPointActive: T, LumeLine: _a, LumePoint: ga };
|
|
2889
2895
|
}
|
|
2890
2896
|
});
|
|
2891
|
-
var
|
|
2897
|
+
var Ta = function() {
|
|
2892
2898
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2893
2899
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(o, a) {
|
|
2894
2900
|
return r("g", { key: o.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(o.values, function(l, i) {
|
|
@@ -2902,8 +2908,8 @@ var xa = function() {
|
|
|
2902
2908
|
}), 1) : e._e()]);
|
|
2903
2909
|
})], 2);
|
|
2904
2910
|
}, Aa = [], La = /* @__PURE__ */ E(
|
|
2905
|
-
Ta,
|
|
2906
2911
|
xa,
|
|
2912
|
+
Ta,
|
|
2907
2913
|
Aa,
|
|
2908
2914
|
!1,
|
|
2909
2915
|
null,
|
|
@@ -2911,7 +2917,7 @@ var xa = function() {
|
|
|
2911
2917
|
null,
|
|
2912
2918
|
null
|
|
2913
2919
|
);
|
|
2914
|
-
const
|
|
2920
|
+
const wt = La.exports, Oa = {
|
|
2915
2921
|
margins: re.VERTICAL,
|
|
2916
2922
|
startOnZero: !0,
|
|
2917
2923
|
withTooltip: !0,
|
|
@@ -2923,8 +2929,8 @@ const Nt = La.exports, Oa = {
|
|
|
2923
2929
|
...ue(null, !1)
|
|
2924
2930
|
},
|
|
2925
2931
|
setup(t, { emit: e }) {
|
|
2926
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { options: a } =
|
|
2927
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ie, LumeLineGroup:
|
|
2932
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { options: a } = P(r), { allOptions: l } = Z(a, Oa);
|
|
2933
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ie, LumeLineGroup: wt };
|
|
2928
2934
|
}
|
|
2929
2935
|
});
|
|
2930
2936
|
var Ia = function() {
|
|
@@ -2974,11 +2980,11 @@ const Ca = {
|
|
|
2974
2980
|
}, Ha = /* @__PURE__ */ w({
|
|
2975
2981
|
__name: "lume-sparkline-chart",
|
|
2976
2982
|
props: {
|
|
2977
|
-
...
|
|
2978
|
-
...
|
|
2983
|
+
...je(null),
|
|
2984
|
+
...ve()
|
|
2979
2985
|
},
|
|
2980
2986
|
setup(t, { expose: e, emit: r }) {
|
|
2981
|
-
const n = t, { componentEventPropagator: o } = X(r), a = ae(V()), { data: l, options: i } =
|
|
2987
|
+
const n = t, { componentEventPropagator: o } = X(r), a = ae(V()), { data: l, options: i } = P(n), { internalData: u } = Me(l), { allOptions: c } = Z(i, Ca), { computedLineData: v } = Et(u), { areaPathDefinition: s } = Na(v), _ = d(() => u.value[0].color), m = d(
|
|
2982
2988
|
() => l.value[0].areaColor || _.value
|
|
2983
2989
|
);
|
|
2984
2990
|
function f(y) {
|
|
@@ -2987,12 +2993,12 @@ const Ca = {
|
|
|
2987
2993
|
noMinSize: !0
|
|
2988
2994
|
};
|
|
2989
2995
|
}
|
|
2990
|
-
function g(y, p,
|
|
2991
|
-
return
|
|
2996
|
+
function g(y, p, x) {
|
|
2997
|
+
return ce().range([0, x.width]).domain([0, y[0].values.length - 1]);
|
|
2992
2998
|
}
|
|
2993
2999
|
return e({
|
|
2994
3000
|
areaPathDefinition: s
|
|
2995
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: v, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: f, xScaleGenerator: g, LumeChart: ie, LumeLineGroup:
|
|
3001
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: v, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: f, xScaleGenerator: g, LumeChart: ie, LumeLineGroup: wt };
|
|
2996
3002
|
}
|
|
2997
3003
|
});
|
|
2998
3004
|
var Da = function() {
|
|
@@ -3026,16 +3032,16 @@ export {
|
|
|
3026
3032
|
Ur as LumeAlluvialNodeLabel,
|
|
3027
3033
|
qr as LumeAlluvialNodeValue,
|
|
3028
3034
|
$n as LumeAxis,
|
|
3029
|
-
|
|
3035
|
+
Ve as LumeBar,
|
|
3030
3036
|
ja as LumeBarChart,
|
|
3031
|
-
|
|
3037
|
+
ze as LumeBarGroup,
|
|
3032
3038
|
ie as LumeChart,
|
|
3033
3039
|
Fn as LumeChartContainer,
|
|
3034
3040
|
zn as LumeChartLegend,
|
|
3035
3041
|
za as LumeGroupedBarChart,
|
|
3036
3042
|
_a as LumeLine,
|
|
3037
3043
|
Za as LumeLineChart,
|
|
3038
|
-
|
|
3044
|
+
wt as LumeLineGroup,
|
|
3039
3045
|
Ir as LumeOverlayGroup,
|
|
3040
3046
|
ga as LumePoint,
|
|
3041
3047
|
Ma as LumeSingleBarChart,
|