@adyen/lume 1.10.0 → 1.10.2
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/core/lume-bar/composables/bar-transition.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts +13 -1
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts.map +1 -1
- package/dist/index.js +536 -526
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as E, isRef as
|
|
1
|
+
import { defineComponent as H, ref as E, isRef as kt, computed as v, watch as D, toRefs as B, inject as Le, reactive as Oe, onMounted as ee, watchEffect as xt, onBeforeUnmount as At, useSlots as M, nextTick as He, provide as we, defineAsyncComponent as Ne } from "vue";
|
|
2
2
|
import { format as zt, ticks as Wt, scaleBand as _e, scaleLinear as fe, link as Zt, line as Ut, area as Xt } from "d3";
|
|
3
3
|
import { createPopper as Yt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as Kt, sankey as Jt, sankeyJustify as Qt } from "d3-sankey";
|
|
@@ -47,26 +47,26 @@ const qt = /* @__PURE__ */ H({
|
|
|
47
47
|
function w(t, e, r, n, a, o, l, i) {
|
|
48
48
|
var u = typeof t == "function" ? t.options : t;
|
|
49
49
|
e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), n && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
|
|
50
|
-
var
|
|
51
|
-
if (l ? (
|
|
50
|
+
var s;
|
|
51
|
+
if (l ? (s = function(_) {
|
|
52
52
|
_ = _ || // cached call
|
|
53
53
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
54
54
|
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < "u" && (_ = __VUE_SSR_CONTEXT__), a && a.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(l);
|
|
55
|
-
}, u._ssrRegister =
|
|
55
|
+
}, u._ssrRegister = s) : a && (s = i ? function() {
|
|
56
56
|
a.call(
|
|
57
57
|
this,
|
|
58
58
|
(u.functional ? this.parent : this).$root.$options.shadowRoot
|
|
59
59
|
);
|
|
60
|
-
} : a),
|
|
60
|
+
} : a), s)
|
|
61
61
|
if (u.functional) {
|
|
62
|
-
u._injectStyles =
|
|
62
|
+
u._injectStyles = s;
|
|
63
63
|
var d = u.render;
|
|
64
64
|
u.render = function(m, p) {
|
|
65
|
-
return
|
|
65
|
+
return s.call(p), d(m, p);
|
|
66
66
|
};
|
|
67
67
|
} else {
|
|
68
|
-
var
|
|
69
|
-
u.beforeCreate =
|
|
68
|
+
var c = u.beforeCreate;
|
|
69
|
+
u.beforeCreate = c ? [].concat(c, s) : [s];
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
72
|
exports: t,
|
|
@@ -101,10 +101,10 @@ const rn = nn.exports, an = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function Tt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Lt(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()) || [];
|
|
@@ -120,10 +120,10 @@ function on(t) {
|
|
|
120
120
|
function De(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ot(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, a]) => {
|
|
126
|
-
r[n] = De(t[n]) && De(a) ?
|
|
126
|
+
r[n] = De(t[n]) && De(a) ? Ot(t[n], a) : a;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function ln(t) {
|
|
@@ -135,7 +135,7 @@ function X(t) {
|
|
|
135
135
|
function un(t) {
|
|
136
136
|
return X(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function rt(t) {
|
|
139
139
|
const [e, r] = t.domain();
|
|
140
140
|
return e == null || r == null || e === 0 && r === 0;
|
|
141
141
|
}
|
|
@@ -157,8 +157,8 @@ function cn(t, e) {
|
|
|
157
157
|
}
|
|
158
158
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
const e =
|
|
160
|
+
function $t(t) {
|
|
161
|
+
const e = kt(t) ? t.value : t;
|
|
162
162
|
if (!e)
|
|
163
163
|
throw new Error("No empty array can be created from specified data value");
|
|
164
164
|
const r = Math.max(
|
|
@@ -207,7 +207,7 @@ var Y = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recomm
|
|
|
207
207
|
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))(Y || {});
|
|
208
208
|
const mn = "[lume] ";
|
|
209
209
|
function q(t, e = !0) {
|
|
210
|
-
e &&
|
|
210
|
+
e && Tt() || console.warn(mn + "Warning: " + t);
|
|
211
211
|
}
|
|
212
212
|
const Ae = (t) => {
|
|
213
213
|
let e = null;
|
|
@@ -237,8 +237,8 @@ const Ae = (t) => {
|
|
|
237
237
|
});
|
|
238
238
|
function K(t, e) {
|
|
239
239
|
return { allOptions: v(() => {
|
|
240
|
-
const n =
|
|
241
|
-
return n ?
|
|
240
|
+
const n = kt(e) ? e == null ? void 0 : e.value : e;
|
|
241
|
+
return n ? Ot(n, t.value) : t.value;
|
|
242
242
|
}) };
|
|
243
243
|
}
|
|
244
244
|
const hn = 0.2;
|
|
@@ -248,18 +248,18 @@ function gn(t, e, r) {
|
|
|
248
248
|
if (!e.value)
|
|
249
249
|
return;
|
|
250
250
|
const u = e.value.reduce(
|
|
251
|
-
(d,
|
|
251
|
+
(d, c) => d + c.ref.getBoundingClientRect().width,
|
|
252
252
|
0
|
|
253
|
-
),
|
|
254
|
-
n.value =
|
|
253
|
+
), s = Math.ceil(u / o.value);
|
|
254
|
+
n.value = s + s * hn;
|
|
255
255
|
}
|
|
256
256
|
function i(u) {
|
|
257
257
|
if (!e.value)
|
|
258
258
|
return !0;
|
|
259
|
-
const
|
|
259
|
+
const s = r.value.skip, d = e.value.length;
|
|
260
260
|
if (u === 0)
|
|
261
261
|
return !0;
|
|
262
|
-
const
|
|
262
|
+
const c = a.value / d, _ = typeof s == "number" && s > 0 && s + 1 || Math.ceil(n.value / c);
|
|
263
263
|
return u % _ === 0;
|
|
264
264
|
}
|
|
265
265
|
return D(e, l), { showTick: i };
|
|
@@ -271,7 +271,7 @@ const L = {
|
|
|
271
271
|
SINGLE: "single",
|
|
272
272
|
GROUPED: "grouped",
|
|
273
273
|
STACKED: "stacked"
|
|
274
|
-
},
|
|
274
|
+
}, It = "No data", at = 20, Et = 0.33, wt = 0.5, Nt = 12, me = 8, bn = 1, kn = [
|
|
275
275
|
"auto",
|
|
276
276
|
"auto-start",
|
|
277
277
|
"auto-end",
|
|
@@ -291,7 +291,7 @@ const L = {
|
|
|
291
291
|
function $e(t) {
|
|
292
292
|
t != null && t.closest("svg") || q(Y.NotContainedInSvg);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Ht = {
|
|
295
295
|
/** Displays a line for each tick. */
|
|
296
296
|
gridLines: !1,
|
|
297
297
|
/** Displays the axis title. */
|
|
@@ -308,29 +308,29 @@ const Nt = {
|
|
|
308
308
|
/** Space between the tick label and the axis line. */
|
|
309
309
|
tickPadding: 12
|
|
310
310
|
}, xn = {
|
|
311
|
-
...
|
|
311
|
+
...Ht,
|
|
312
312
|
withTitle: !1,
|
|
313
313
|
skip: !0
|
|
314
314
|
}, An = {
|
|
315
|
-
...
|
|
315
|
+
...Ht,
|
|
316
316
|
gridLines: !0
|
|
317
317
|
}, Tn = function(t, e, r) {
|
|
318
318
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
319
|
-
function a(u,
|
|
319
|
+
function a(u, s) {
|
|
320
320
|
return {
|
|
321
|
-
transform: `translate(${(t.value(
|
|
321
|
+
transform: `translate(${(t.value(s) ?? t.value(u)) - n.value}, 0)`
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
function o(u) {
|
|
325
325
|
var d;
|
|
326
|
-
const
|
|
326
|
+
const s = Math.max(
|
|
327
327
|
t.value.step(),
|
|
328
328
|
(u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : t.value.step()) + 20
|
|
329
329
|
);
|
|
330
330
|
return {
|
|
331
|
-
x: -(
|
|
332
|
-
width:
|
|
333
|
-
height: r.value.tickPadding +
|
|
331
|
+
x: -(s - t.value.step()) / 2,
|
|
332
|
+
width: s,
|
|
333
|
+
height: r.value.tickPadding + Nt + me
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
function l() {
|
|
@@ -358,17 +358,17 @@ const Nt = {
|
|
|
358
358
|
};
|
|
359
359
|
}, Ln = function(t, e, r) {
|
|
360
360
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
361
|
-
function a(u,
|
|
361
|
+
function a(u, s) {
|
|
362
362
|
return {
|
|
363
|
-
transform: `translate(0, ${(t.value(
|
|
363
|
+
transform: `translate(0, ${(t.value(s) ?? t.value(u)) - n.value})`
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function o(u) {
|
|
367
367
|
var d;
|
|
368
|
-
const
|
|
368
|
+
const s = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding + me;
|
|
369
369
|
return {
|
|
370
|
-
x: -
|
|
371
|
-
width:
|
|
370
|
+
x: -s,
|
|
371
|
+
width: s,
|
|
372
372
|
height: t.value.step()
|
|
373
373
|
};
|
|
374
374
|
}
|
|
@@ -406,7 +406,7 @@ const Nt = {
|
|
|
406
406
|
}
|
|
407
407
|
function o() {
|
|
408
408
|
return {
|
|
409
|
-
height: r.value.tickPadding +
|
|
409
|
+
height: r.value.tickPadding + Nt + me,
|
|
410
410
|
width: n.value,
|
|
411
411
|
x: -(n.value / 2)
|
|
412
412
|
};
|
|
@@ -441,11 +441,11 @@ const Nt = {
|
|
|
441
441
|
}
|
|
442
442
|
function o(u) {
|
|
443
443
|
var d;
|
|
444
|
-
const
|
|
444
|
+
const s = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding + me;
|
|
445
445
|
return {
|
|
446
|
-
width:
|
|
446
|
+
width: s,
|
|
447
447
|
height: n.value,
|
|
448
|
-
x: -
|
|
448
|
+
x: -s,
|
|
449
449
|
y: -(n.value / 2)
|
|
450
450
|
};
|
|
451
451
|
}
|
|
@@ -473,7 +473,7 @@ const Nt = {
|
|
|
473
473
|
"x-linear-scale-axis": On,
|
|
474
474
|
"y-linear-scale-axis": $n
|
|
475
475
|
};
|
|
476
|
-
var
|
|
476
|
+
var Se = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Se || {}), Re = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Re || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
477
477
|
const En = /* @__PURE__ */ H({
|
|
478
478
|
__name: "lume-axis",
|
|
479
479
|
props: {
|
|
@@ -489,7 +489,7 @@ const En = /* @__PURE__ */ H({
|
|
|
489
489
|
position: {
|
|
490
490
|
type: String,
|
|
491
491
|
default: void 0,
|
|
492
|
-
validator: (t) => t in
|
|
492
|
+
validator: (t) => t in Re
|
|
493
493
|
},
|
|
494
494
|
containerSize: {
|
|
495
495
|
type: Object,
|
|
@@ -507,7 +507,7 @@ const En = /* @__PURE__ */ H({
|
|
|
507
507
|
},
|
|
508
508
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
509
509
|
setup(t, { emit: e }) {
|
|
510
|
-
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = B(r),
|
|
510
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = B(r), s = Le("isEmpty", E(!1)), d = Oe({}), c = E(null), _ = E(null), m = E(null), p = v(
|
|
511
511
|
() => r.type ? xe[r.type] : r.position
|
|
512
512
|
), h = v(
|
|
513
513
|
() => r.type || (p.value === "left" ? "y" : "x")
|
|
@@ -516,9 +516,9 @@ const En = /* @__PURE__ */ H({
|
|
|
516
516
|
), { allOptions: f } = K(
|
|
517
517
|
i,
|
|
518
518
|
h.value === "x" ? xn : An
|
|
519
|
-
), { showTick: k } = gn(a,
|
|
519
|
+
), { showTick: k } = gn(a, c, f), x = v(() => {
|
|
520
520
|
var I, g, O, N;
|
|
521
|
-
return h.value === "y" &&
|
|
521
|
+
return h.value === "y" && s.value && (!a.value || rt(a.value)) ? `translate(0, ${((I = o.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && s.value && (!a.value || rt(a.value)) ? `translate(-${((g = o.value) == null ? void 0 : g.width) / 2}, ${(O = o.value) == null ? void 0 : O.height})` : `translate(0, ${h.value === "x" ? (N = o.value) == null ? void 0 : N.height : 0})`;
|
|
522
522
|
}), A = v(() => {
|
|
523
523
|
if (!a.value)
|
|
524
524
|
return [];
|
|
@@ -531,25 +531,25 @@ const En = /* @__PURE__ */ H({
|
|
|
531
531
|
return Ae(I);
|
|
532
532
|
}), T = v(
|
|
533
533
|
() => f.value.withHover && y.value && l.value > -1
|
|
534
|
-
),
|
|
534
|
+
), S = v(
|
|
535
535
|
() => f.value.tickPadding + me || n
|
|
536
|
-
),
|
|
536
|
+
), R = v(() => h.value === "x" ? (
|
|
537
537
|
// If x axis, get the tick height
|
|
538
538
|
Math.max(
|
|
539
|
-
...(
|
|
539
|
+
...(c.value || []).map(
|
|
540
540
|
(I) => {
|
|
541
541
|
var g, O;
|
|
542
|
-
return ((O = (g = I.ref).getBBox) == null ? void 0 : O.call(g).height) +
|
|
542
|
+
return ((O = (g = I.ref).getBBox) == null ? void 0 : O.call(g).height) + S.value;
|
|
543
543
|
}
|
|
544
544
|
)
|
|
545
545
|
)
|
|
546
546
|
) : (
|
|
547
547
|
// If y axis, get the tick width
|
|
548
548
|
Math.max(
|
|
549
|
-
...(
|
|
549
|
+
...(c.value || []).map(
|
|
550
550
|
(I) => {
|
|
551
551
|
var g, O;
|
|
552
|
-
return ((O = (g = I.ref).getBBox) == null ? void 0 : O.call(g).width) +
|
|
552
|
+
return ((O = (g = I.ref).getBBox) == null ? void 0 : O.call(g).width) + S.value;
|
|
553
553
|
}
|
|
554
554
|
)
|
|
555
555
|
)
|
|
@@ -561,13 +561,13 @@ const En = /* @__PURE__ */ H({
|
|
|
561
561
|
function F(I, g, O) {
|
|
562
562
|
e("mouseenter", { index: y.value ? I : null, value: g, event: O });
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function V(I, g, O) {
|
|
565
565
|
e("click", { index: I, value: g, event: O });
|
|
566
566
|
}
|
|
567
567
|
function W(I) {
|
|
568
568
|
var g;
|
|
569
|
-
if (!(!
|
|
570
|
-
return (g =
|
|
569
|
+
if (!(!c.value || !c.value.length))
|
|
570
|
+
return (g = c.value[I]) == null ? void 0 : g.ref;
|
|
571
571
|
}
|
|
572
572
|
function te() {
|
|
573
573
|
m.value = A.value.map(
|
|
@@ -586,14 +586,14 @@ const En = /* @__PURE__ */ H({
|
|
|
586
586
|
function ne() {
|
|
587
587
|
if (!a.value)
|
|
588
588
|
return;
|
|
589
|
-
const I = a.value.step ? "bandScale" : "linearScale", g = In[`${h.value}-${
|
|
589
|
+
const I = a.value.step ? "bandScale" : "linearScale", g = In[`${h.value}-${Se[I]}`];
|
|
590
590
|
Object.entries(g(a, o, f) || []).forEach(
|
|
591
591
|
([O, N]) => {
|
|
592
592
|
d[O] = N;
|
|
593
593
|
}
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
|
-
return D(a, ne, { flush: "sync", immediate: !0 }), D(a, te, { immediate: !0 }), D(
|
|
596
|
+
return D(a, ne, { flush: "sync", immediate: !0 }), D(a, te, { immediate: !0 }), D(c, te), D(R, (I) => e("lume__internal--axis-size", I)), D(r.containerSize, Q), ee(() => $e(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Se, POSITIONS: Re, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: s, mixins: d, tickRefs: c, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: x, ticks: A, tickFormatter: $, isHovering: T, axisLabelOffset: S, axisSize: R, formatTick: C, handleTickMouseenter: F, handleTickClick: V, getTextNode: W, setTicks: te, updateGridlines: Q, init: ne, LumeTick: rn };
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
599
|
var wn = function() {
|
|
@@ -624,7 +624,7 @@ var wn = function() {
|
|
|
624
624
|
null
|
|
625
625
|
);
|
|
626
626
|
const Dn = Hn.exports;
|
|
627
|
-
function
|
|
627
|
+
function Sn(t, e, r, n) {
|
|
628
628
|
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
629
629
|
() => n.value > 0 && n.value < 1
|
|
630
630
|
), l = v(
|
|
@@ -636,8 +636,13 @@ function Rn(t, e, r, n) {
|
|
|
636
636
|
);
|
|
637
637
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
638
638
|
}
|
|
639
|
-
function
|
|
640
|
-
const a = E(0), o = E(0), l = v(() =>
|
|
639
|
+
function Rn(t, e, r, n) {
|
|
640
|
+
const a = E(0), o = E(0), l = v(() => {
|
|
641
|
+
const i = parseFloat(
|
|
642
|
+
getComputedStyle(document.documentElement).fontSize
|
|
643
|
+
), u = (t.value + r.value / 2) / i, s = (e.value + n.value / 2) / i;
|
|
644
|
+
return `${u}rem ${s}rem`;
|
|
645
|
+
});
|
|
641
646
|
return ee(() => {
|
|
642
647
|
a.value = r.value, o.value = n.value;
|
|
643
648
|
}), D(r, (i) => a.value = i), D(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
@@ -680,10 +685,10 @@ const Cn = /* @__PURE__ */ H({
|
|
|
680
685
|
},
|
|
681
686
|
emits: ["click", "mouseover", "mouseleave"],
|
|
682
687
|
setup(t, { emit: e }) {
|
|
683
|
-
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r),
|
|
688
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), s = E(null), d = v(
|
|
684
689
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
685
|
-
),
|
|
686
|
-
return ee(() => $e(
|
|
690
|
+
), c = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Rn(n, a, o, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Sn(n, a, o, l), k = v(() => y.value ? 1 : (c.value ? m.computedWidth : o).value), x = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), A = c.value || _.value ? m.transformOrigin : null;
|
|
691
|
+
return ee(() => $e(s.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: s, computedClasses: d, shouldTransitionWidth: c, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth: k, computedHeight: x, transformOrigin: A };
|
|
687
692
|
}
|
|
688
693
|
});
|
|
689
694
|
var Pn = function() {
|
|
@@ -714,7 +719,208 @@ var Pn = function() {
|
|
|
714
719
|
null
|
|
715
720
|
);
|
|
716
721
|
const Ue = Gn.exports;
|
|
717
|
-
|
|
722
|
+
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), Dt = /* @__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))(Dt || {}), Xe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Xe || {}), Ye = /* @__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))(Ye || {}), Ke = /* @__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))(Ke || {});
|
|
723
|
+
const Fn = re.Categorical, he = z.Skyblue, Vn = Xe.SkyTeal;
|
|
724
|
+
function jn(t) {
|
|
725
|
+
return t === re.Divergent ? Vn : he;
|
|
726
|
+
}
|
|
727
|
+
function Mn(t) {
|
|
728
|
+
return Object.values(Ke).includes(t);
|
|
729
|
+
}
|
|
730
|
+
function ot(t, e) {
|
|
731
|
+
return e === re.Divergent ? Object.values(Xe).includes(t) : Object.values({
|
|
732
|
+
...z,
|
|
733
|
+
...Dt,
|
|
734
|
+
...Ye,
|
|
735
|
+
...Ke
|
|
736
|
+
}).includes(t);
|
|
737
|
+
}
|
|
738
|
+
function zn(t, e) {
|
|
739
|
+
const r = Object.values(z).indexOf(t);
|
|
740
|
+
return _n(Object.values(z), r > -1 ? r : 0)[e];
|
|
741
|
+
}
|
|
742
|
+
function Wn(t, e) {
|
|
743
|
+
const r = 50 + e * 10;
|
|
744
|
+
return `${t}-${r}`;
|
|
745
|
+
}
|
|
746
|
+
function Zn(t, e) {
|
|
747
|
+
const r = (e + 1) * 10;
|
|
748
|
+
return `${t}-${r}`;
|
|
749
|
+
}
|
|
750
|
+
function lt(t, e, r) {
|
|
751
|
+
switch (e) {
|
|
752
|
+
default:
|
|
753
|
+
case re.Categorical:
|
|
754
|
+
return Mn(t) ? t : zn(t, r);
|
|
755
|
+
case re.Sequential:
|
|
756
|
+
return Wn(t, r);
|
|
757
|
+
case re.Divergent:
|
|
758
|
+
return Zn(t, r);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
function Un(t, e, r = Fn, n) {
|
|
762
|
+
return ot(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), ot(e, r) ? lt(e, r, n) : lt(jn(r), r, n));
|
|
763
|
+
}
|
|
764
|
+
function Xn(t) {
|
|
765
|
+
return t.map((e) => ln(e) ? e : { value: e });
|
|
766
|
+
}
|
|
767
|
+
function Yn(t) {
|
|
768
|
+
return t.__internal === !0;
|
|
769
|
+
}
|
|
770
|
+
const Je = (t = null) => ({
|
|
771
|
+
data: {
|
|
772
|
+
type: Array,
|
|
773
|
+
required: !0,
|
|
774
|
+
validator: t || void 0
|
|
775
|
+
},
|
|
776
|
+
labels: {
|
|
777
|
+
type: Array,
|
|
778
|
+
default: void 0
|
|
779
|
+
},
|
|
780
|
+
color: {
|
|
781
|
+
type: String,
|
|
782
|
+
default: z.Skyblue
|
|
783
|
+
},
|
|
784
|
+
title: {
|
|
785
|
+
type: String,
|
|
786
|
+
default: null
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
function Qe(t, e, r, n, a) {
|
|
790
|
+
const o = Oe({
|
|
791
|
+
width: 0,
|
|
792
|
+
height: 0
|
|
793
|
+
}), l = pn(12), i = v(() => {
|
|
794
|
+
var d;
|
|
795
|
+
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
796
|
+
(c, _) => {
|
|
797
|
+
if (Yn(c))
|
|
798
|
+
return c;
|
|
799
|
+
const m = Xn(c.values), p = Un(
|
|
800
|
+
c.color,
|
|
801
|
+
r == null ? void 0 : r.value,
|
|
802
|
+
n == null ? void 0 : n.value.colorPalette,
|
|
803
|
+
_
|
|
804
|
+
);
|
|
805
|
+
return {
|
|
806
|
+
...c,
|
|
807
|
+
values: m,
|
|
808
|
+
color: p,
|
|
809
|
+
__internal: !0
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : $t(t.value).map((d, c) => c));
|
|
814
|
+
function s(d) {
|
|
815
|
+
const c = (a == null ? void 0 : a.value) === L.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || at) * 2) + ((n == null ? void 0 : n.value.barHeight) || at) || d.height;
|
|
816
|
+
o.width = d.width, o.height = c;
|
|
817
|
+
}
|
|
818
|
+
return {
|
|
819
|
+
chartID: l,
|
|
820
|
+
computedLabels: u,
|
|
821
|
+
containerSize: o,
|
|
822
|
+
internalData: i,
|
|
823
|
+
updateSize: s
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
const Kn = () => ({
|
|
827
|
+
xScale: {
|
|
828
|
+
type: Function,
|
|
829
|
+
default: null
|
|
830
|
+
},
|
|
831
|
+
yScale: {
|
|
832
|
+
type: Function,
|
|
833
|
+
default: null
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
function Jn(t, e, r, n, a) {
|
|
837
|
+
const o = E(null), l = E(null);
|
|
838
|
+
function i() {
|
|
839
|
+
var d, c, _, m;
|
|
840
|
+
const { width: u, height: s } = r;
|
|
841
|
+
!u && !s || (n.value === L.HORIZONTAL ? (o.value = (d = t.value) != null && d.length ? it(
|
|
842
|
+
t.value,
|
|
843
|
+
u,
|
|
844
|
+
n.value,
|
|
845
|
+
a.value.startOnZero
|
|
846
|
+
) : null, l.value = (c = e.value) != null && c.length ? ut(
|
|
847
|
+
e.value,
|
|
848
|
+
s,
|
|
849
|
+
n.value,
|
|
850
|
+
a.value
|
|
851
|
+
) : null) : (o.value = (_ = e.value) != null && _.length ? ut(
|
|
852
|
+
e.value,
|
|
853
|
+
u,
|
|
854
|
+
n.value,
|
|
855
|
+
a.value
|
|
856
|
+
) : null, l.value = (m = t.value) != null && m.length ? it(
|
|
857
|
+
t.value,
|
|
858
|
+
s,
|
|
859
|
+
n.value,
|
|
860
|
+
a.value.startOnZero
|
|
861
|
+
) : null));
|
|
862
|
+
}
|
|
863
|
+
return xt(i), { xScale: o, yScale: l };
|
|
864
|
+
}
|
|
865
|
+
function ut(t, e, r, n) {
|
|
866
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? wt : Et);
|
|
867
|
+
return Object.assign(
|
|
868
|
+
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
|
|
869
|
+
{ labels: t }
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
function it(t, e, r, n) {
|
|
873
|
+
const a = Lt(t).filter((d) => d != null), o = [0, e];
|
|
874
|
+
if (a.length === 0)
|
|
875
|
+
return fe().range(o).domain([0, 0]).nice();
|
|
876
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
877
|
+
return fe().range(o).domain(s).nice();
|
|
878
|
+
}
|
|
879
|
+
function st(t) {
|
|
880
|
+
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
881
|
+
}
|
|
882
|
+
function Ce(t, e) {
|
|
883
|
+
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
884
|
+
}
|
|
885
|
+
function ct(t, e, {
|
|
886
|
+
padding: r,
|
|
887
|
+
paddingInner: n,
|
|
888
|
+
paddingOuter: a
|
|
889
|
+
} = {}) {
|
|
890
|
+
const o = r ?? (e === L.HORIZONTAL ? wt : Et);
|
|
891
|
+
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
892
|
+
}
|
|
893
|
+
function qe(t) {
|
|
894
|
+
return Object.values(L).includes(t);
|
|
895
|
+
}
|
|
896
|
+
const ce = (t, e = !0) => ({
|
|
897
|
+
...Je(t),
|
|
898
|
+
...Kn(),
|
|
899
|
+
...pe(),
|
|
900
|
+
classList: {
|
|
901
|
+
type: [String, Array],
|
|
902
|
+
default: () => []
|
|
903
|
+
},
|
|
904
|
+
hoveredIndex: {
|
|
905
|
+
type: Number,
|
|
906
|
+
default: null
|
|
907
|
+
},
|
|
908
|
+
...e ? {
|
|
909
|
+
orientation: {
|
|
910
|
+
type: String,
|
|
911
|
+
default: L.VERTICAL,
|
|
912
|
+
validator: qe
|
|
913
|
+
}
|
|
914
|
+
} : {}
|
|
915
|
+
}), Qn = (t) => ({
|
|
916
|
+
...Je(t),
|
|
917
|
+
...pe(),
|
|
918
|
+
hoveredElement: {
|
|
919
|
+
type: [Number, String],
|
|
920
|
+
default: null
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
function qn() {
|
|
718
924
|
const t = E(), e = Oe({
|
|
719
925
|
dimensions: {}
|
|
720
926
|
}), r = new ResizeObserver((n) => {
|
|
@@ -724,11 +930,11 @@ function Fn() {
|
|
|
724
930
|
});
|
|
725
931
|
return ee(() => {
|
|
726
932
|
r.observe(t.value);
|
|
727
|
-
}),
|
|
933
|
+
}), At(() => {
|
|
728
934
|
r.unobserve(t.value);
|
|
729
935
|
}), { resizeState: e, resizeRef: t };
|
|
730
936
|
}
|
|
731
|
-
const
|
|
937
|
+
const er = /* @__PURE__ */ H({
|
|
732
938
|
__name: "lume-chart-container",
|
|
733
939
|
props: {
|
|
734
940
|
margins: {
|
|
@@ -746,30 +952,35 @@ const jn = /* @__PURE__ */ H({
|
|
|
746
952
|
noMinSize: {
|
|
747
953
|
type: Boolean,
|
|
748
954
|
default: !1
|
|
955
|
+
},
|
|
956
|
+
orientation: {
|
|
957
|
+
type: String,
|
|
958
|
+
default: L.VERTICAL,
|
|
959
|
+
validator: qe
|
|
749
960
|
}
|
|
750
961
|
},
|
|
751
962
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
752
963
|
setup(t, { emit: e }) {
|
|
753
|
-
const r = t, { margins: n, containerSize: a } = B(r), o = E(null), { resizeRef: l, resizeState: i } =
|
|
964
|
+
const r = t, { margins: n, containerSize: a } = B(r), o = E(null), { resizeRef: l, resizeState: i } = qn(), u = v(
|
|
754
965
|
() => a.value.height + n.value.top + n.value.bottom
|
|
755
966
|
);
|
|
756
967
|
return xt(() => {
|
|
757
968
|
if (!o.value)
|
|
758
969
|
return;
|
|
759
|
-
const { width:
|
|
760
|
-
if (!
|
|
970
|
+
const { width: s } = i.dimensions, { height: d } = o.value.getBoundingClientRect();
|
|
971
|
+
if (!s || r.orientation === L.VERTICAL && !d)
|
|
761
972
|
return;
|
|
762
|
-
const
|
|
763
|
-
width:
|
|
973
|
+
const c = s - n.value.left - n.value.right, _ = d - n.value.top - n.value.bottom, m = {
|
|
974
|
+
width: c > 0 ? c : 0,
|
|
764
975
|
height: _ > 0 ? _ : 0,
|
|
765
|
-
outerWidth:
|
|
976
|
+
outerWidth: s,
|
|
766
977
|
outerHeight: d
|
|
767
978
|
};
|
|
768
979
|
e("resize", m);
|
|
769
980
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
770
981
|
}
|
|
771
982
|
});
|
|
772
|
-
var
|
|
983
|
+
var tr = function() {
|
|
773
984
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
774
985
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
775
986
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -782,17 +993,17 @@ var Vn = function() {
|
|
|
782
993
|
}, mouseleave: function(a) {
|
|
783
994
|
return n.emit("mouseleave", a);
|
|
784
995
|
} } }, [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);
|
|
785
|
-
},
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
996
|
+
}, nr = [], rr = /* @__PURE__ */ w(
|
|
997
|
+
er,
|
|
998
|
+
tr,
|
|
999
|
+
nr,
|
|
789
1000
|
!1,
|
|
790
1001
|
null,
|
|
791
|
-
"
|
|
1002
|
+
"d53cdc3e",
|
|
792
1003
|
null,
|
|
793
1004
|
null
|
|
794
1005
|
);
|
|
795
|
-
const
|
|
1006
|
+
const ar = rr.exports, or = /* @__PURE__ */ H({
|
|
796
1007
|
__name: "lume-chart-legend",
|
|
797
1008
|
props: {
|
|
798
1009
|
data: {
|
|
@@ -806,7 +1017,7 @@ const Wn = zn.exports, Zn = /* @__PURE__ */ H({
|
|
|
806
1017
|
return { __sfc: !0, emit: e };
|
|
807
1018
|
}
|
|
808
1019
|
});
|
|
809
|
-
var
|
|
1020
|
+
var lr = function() {
|
|
810
1021
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
811
1022
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
812
1023
|
return n.emit("mouseleave");
|
|
@@ -817,47 +1028,47 @@ var Un = function() {
|
|
|
817
1028
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
818
1029
|
} } }, [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) + " ")]);
|
|
819
1030
|
}), 0);
|
|
820
|
-
},
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1031
|
+
}, ur = [], ir = /* @__PURE__ */ w(
|
|
1032
|
+
or,
|
|
1033
|
+
lr,
|
|
1034
|
+
ur,
|
|
824
1035
|
!1,
|
|
825
1036
|
null,
|
|
826
1037
|
"6f1d1c44",
|
|
827
1038
|
null,
|
|
828
1039
|
null
|
|
829
1040
|
);
|
|
830
|
-
const
|
|
831
|
-
const
|
|
832
|
-
var
|
|
1041
|
+
const sr = ir.exports;
|
|
1042
|
+
const cr = {};
|
|
1043
|
+
var dr = function() {
|
|
833
1044
|
var e = this, r = e._self._c;
|
|
834
1045
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
835
|
-
},
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1046
|
+
}, vr = [], _r = /* @__PURE__ */ w(
|
|
1047
|
+
cr,
|
|
1048
|
+
dr,
|
|
1049
|
+
vr,
|
|
839
1050
|
!1,
|
|
840
1051
|
null,
|
|
841
1052
|
"8af3fac6",
|
|
842
1053
|
null,
|
|
843
1054
|
null
|
|
844
1055
|
);
|
|
845
|
-
const
|
|
846
|
-
const
|
|
847
|
-
var
|
|
1056
|
+
const fr = _r.exports;
|
|
1057
|
+
const pr = {};
|
|
1058
|
+
var mr = function() {
|
|
848
1059
|
var e = this, r = e._self._c;
|
|
849
1060
|
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)]);
|
|
850
|
-
},
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1061
|
+
}, hr = [], gr = /* @__PURE__ */ w(
|
|
1062
|
+
pr,
|
|
1063
|
+
mr,
|
|
1064
|
+
hr,
|
|
854
1065
|
!1,
|
|
855
1066
|
null,
|
|
856
1067
|
"4ed7ec1b",
|
|
857
1068
|
null,
|
|
858
1069
|
null
|
|
859
1070
|
);
|
|
860
|
-
const
|
|
1071
|
+
const yr = gr.exports, br = /* @__PURE__ */ H({
|
|
861
1072
|
__name: "lume-tooltip-item",
|
|
862
1073
|
props: {
|
|
863
1074
|
color: {
|
|
@@ -869,20 +1080,20 @@ const lr = or.exports, ur = /* @__PURE__ */ H({
|
|
|
869
1080
|
return { __sfc: !0 };
|
|
870
1081
|
}
|
|
871
1082
|
});
|
|
872
|
-
var
|
|
1083
|
+
var kr = function() {
|
|
873
1084
|
var e = this, r = e._self._c;
|
|
874
1085
|
return e._self._setupProxy, r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [e.color ? r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${e.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }) : e._e(), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [e._t("label")], 2), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [e._t("value")], 2)]);
|
|
875
|
-
},
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1086
|
+
}, xr = [], Ar = /* @__PURE__ */ w(
|
|
1087
|
+
br,
|
|
1088
|
+
kr,
|
|
1089
|
+
xr,
|
|
879
1090
|
!1,
|
|
880
1091
|
null,
|
|
881
1092
|
"4f995c3c",
|
|
882
1093
|
null,
|
|
883
1094
|
null
|
|
884
1095
|
);
|
|
885
|
-
const
|
|
1096
|
+
const Tr = Ar.exports, Lr = /* @__PURE__ */ H({
|
|
886
1097
|
__name: "lume-tooltip",
|
|
887
1098
|
props: {
|
|
888
1099
|
opened: {
|
|
@@ -926,11 +1137,11 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
926
1137
|
},
|
|
927
1138
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
928
1139
|
setup(t, { emit: e }) {
|
|
929
|
-
const r = t, n = E(null), { items: a, options: o } = B(r), l = M(), i = E(null), { allOptions: u } = K(o),
|
|
1140
|
+
const r = t, n = E(null), { items: a, options: o } = B(r), l = M(), i = E(null), { allOptions: u } = K(o), s = v(
|
|
930
1141
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
931
1142
|
), d = v(
|
|
932
|
-
() =>
|
|
933
|
-
),
|
|
1143
|
+
() => s.value ? "fixed" : "absolute"
|
|
1144
|
+
), c = v(() => [
|
|
934
1145
|
{
|
|
935
1146
|
name: "computeStyles",
|
|
936
1147
|
options: {
|
|
@@ -957,7 +1168,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
957
1168
|
r.targetElement && n.value && (i.value = Yt(r.targetElement, n.value, {
|
|
958
1169
|
placement: r.position,
|
|
959
1170
|
strategy: d.value,
|
|
960
|
-
modifiers:
|
|
1171
|
+
modifiers: c.value
|
|
961
1172
|
}), e("opened", r.targetElement));
|
|
962
1173
|
}
|
|
963
1174
|
function x() {
|
|
@@ -973,10 +1184,10 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
973
1184
|
async ($, T) => {
|
|
974
1185
|
!T && $ ? (await He(), k()) : A();
|
|
975
1186
|
}
|
|
976
|
-
), ee(k),
|
|
1187
|
+
), ee(k), At(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: d, allModifiers: c, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, computedItems: f, initPopper: k, destroyPopper: x, updatePopper: A, LumeTooltipTitle: fr, LumeTooltipSummary: yr, LumeTooltipItem: Tr };
|
|
977
1188
|
}
|
|
978
1189
|
});
|
|
979
|
-
var
|
|
1190
|
+
var Or = function() {
|
|
980
1191
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
981
1192
|
return e.opened && e.targetElement ? r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
982
1193
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
@@ -1001,218 +1212,17 @@ var _r = function() {
|
|
|
1001
1212
|
});
|
|
1002
1213
|
})], 2)];
|
|
1003
1214
|
})], 2) : e._e();
|
|
1004
|
-
},
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1215
|
+
}, $r = [], Ir = /* @__PURE__ */ w(
|
|
1216
|
+
Lr,
|
|
1217
|
+
Or,
|
|
1218
|
+
$r,
|
|
1008
1219
|
!1,
|
|
1009
1220
|
null,
|
|
1010
1221
|
"e7c90551",
|
|
1011
1222
|
null,
|
|
1012
1223
|
null
|
|
1013
1224
|
);
|
|
1014
|
-
const
|
|
1015
|
-
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), 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 || {}), Xe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Xe || {}), Ye = /* @__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))(Ye || {}), Ke = /* @__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))(Ke || {});
|
|
1016
|
-
const hr = re.Categorical, he = z.Skyblue, gr = Xe.SkyTeal;
|
|
1017
|
-
function yr(t) {
|
|
1018
|
-
return t === re.Divergent ? gr : he;
|
|
1019
|
-
}
|
|
1020
|
-
function br(t) {
|
|
1021
|
-
return Object.values(Ke).includes(t);
|
|
1022
|
-
}
|
|
1023
|
-
function at(t, e) {
|
|
1024
|
-
return e === re.Divergent ? Object.values(Xe).includes(t) : Object.values({
|
|
1025
|
-
...z,
|
|
1026
|
-
...Ht,
|
|
1027
|
-
...Ye,
|
|
1028
|
-
...Ke
|
|
1029
|
-
}).includes(t);
|
|
1030
|
-
}
|
|
1031
|
-
function kr(t, e) {
|
|
1032
|
-
const r = Object.values(z).indexOf(t);
|
|
1033
|
-
return _n(Object.values(z), r > -1 ? r : 0)[e];
|
|
1034
|
-
}
|
|
1035
|
-
function xr(t, e) {
|
|
1036
|
-
const r = 50 + e * 10;
|
|
1037
|
-
return `${t}-${r}`;
|
|
1038
|
-
}
|
|
1039
|
-
function Ar(t, e) {
|
|
1040
|
-
const r = (e + 1) * 10;
|
|
1041
|
-
return `${t}-${r}`;
|
|
1042
|
-
}
|
|
1043
|
-
function ot(t, e, r) {
|
|
1044
|
-
switch (e) {
|
|
1045
|
-
default:
|
|
1046
|
-
case re.Categorical:
|
|
1047
|
-
return br(t) ? t : kr(t, r);
|
|
1048
|
-
case re.Sequential:
|
|
1049
|
-
return xr(t, r);
|
|
1050
|
-
case re.Divergent:
|
|
1051
|
-
return Ar(t, r);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
function Tr(t, e, r = hr, n) {
|
|
1055
|
-
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(yr(r), r, n));
|
|
1056
|
-
}
|
|
1057
|
-
function Lr(t) {
|
|
1058
|
-
return t.map((e) => ln(e) ? e : { value: e });
|
|
1059
|
-
}
|
|
1060
|
-
function Or(t) {
|
|
1061
|
-
return t.__internal === !0;
|
|
1062
|
-
}
|
|
1063
|
-
const Je = (t = null) => ({
|
|
1064
|
-
data: {
|
|
1065
|
-
type: Array,
|
|
1066
|
-
required: !0,
|
|
1067
|
-
validator: t || void 0
|
|
1068
|
-
},
|
|
1069
|
-
labels: {
|
|
1070
|
-
type: Array,
|
|
1071
|
-
default: void 0
|
|
1072
|
-
},
|
|
1073
|
-
color: {
|
|
1074
|
-
type: String,
|
|
1075
|
-
default: z.Skyblue
|
|
1076
|
-
},
|
|
1077
|
-
title: {
|
|
1078
|
-
type: String,
|
|
1079
|
-
default: null
|
|
1080
|
-
}
|
|
1081
|
-
});
|
|
1082
|
-
function Qe(t, e, r, n, a) {
|
|
1083
|
-
const o = Oe({
|
|
1084
|
-
width: 0,
|
|
1085
|
-
height: 0
|
|
1086
|
-
}), l = pn(12), i = v(() => {
|
|
1087
|
-
var d;
|
|
1088
|
-
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1089
|
-
(s, _) => {
|
|
1090
|
-
if (Or(s))
|
|
1091
|
-
return s;
|
|
1092
|
-
const m = Lr(s.values), p = Tr(
|
|
1093
|
-
s.color,
|
|
1094
|
-
r == null ? void 0 : r.value,
|
|
1095
|
-
n == null ? void 0 : n.value.colorPalette,
|
|
1096
|
-
_
|
|
1097
|
-
);
|
|
1098
|
-
return {
|
|
1099
|
-
...s,
|
|
1100
|
-
values: m,
|
|
1101
|
-
color: p,
|
|
1102
|
-
__internal: !0
|
|
1103
|
-
};
|
|
1104
|
-
}
|
|
1105
|
-
);
|
|
1106
|
-
}), u = v(() => Array.isArray(e.value) ? e.value : Ot(t.value).map((d, s) => s));
|
|
1107
|
-
function c(d) {
|
|
1108
|
-
const s = (a == null ? void 0 : a.value) === L.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || rt) * 2) + ((n == null ? void 0 : n.value.barHeight) || rt) || d.height;
|
|
1109
|
-
o.width = d.width, o.height = s;
|
|
1110
|
-
}
|
|
1111
|
-
return {
|
|
1112
|
-
chartID: l,
|
|
1113
|
-
computedLabels: u,
|
|
1114
|
-
containerSize: o,
|
|
1115
|
-
internalData: i,
|
|
1116
|
-
updateSize: c
|
|
1117
|
-
};
|
|
1118
|
-
}
|
|
1119
|
-
const $r = () => ({
|
|
1120
|
-
xScale: {
|
|
1121
|
-
type: Function,
|
|
1122
|
-
default: null
|
|
1123
|
-
},
|
|
1124
|
-
yScale: {
|
|
1125
|
-
type: Function,
|
|
1126
|
-
default: null
|
|
1127
|
-
}
|
|
1128
|
-
});
|
|
1129
|
-
function Ir(t, e, r, n, a) {
|
|
1130
|
-
const o = E(null), l = E(null);
|
|
1131
|
-
function i() {
|
|
1132
|
-
var d, s, _, m;
|
|
1133
|
-
const { width: u, height: c } = r;
|
|
1134
|
-
!u && !c || (n.value === L.HORIZONTAL ? (o.value = (d = t.value) != null && d.length ? ut(
|
|
1135
|
-
t.value,
|
|
1136
|
-
u,
|
|
1137
|
-
n.value,
|
|
1138
|
-
a.value.startOnZero
|
|
1139
|
-
) : null, l.value = (s = e.value) != null && s.length ? lt(
|
|
1140
|
-
e.value,
|
|
1141
|
-
c,
|
|
1142
|
-
n.value,
|
|
1143
|
-
a.value
|
|
1144
|
-
) : null) : (o.value = (_ = e.value) != null && _.length ? lt(
|
|
1145
|
-
e.value,
|
|
1146
|
-
u,
|
|
1147
|
-
n.value,
|
|
1148
|
-
a.value
|
|
1149
|
-
) : null, l.value = (m = t.value) != null && m.length ? ut(
|
|
1150
|
-
t.value,
|
|
1151
|
-
c,
|
|
1152
|
-
n.value,
|
|
1153
|
-
a.value.startOnZero
|
|
1154
|
-
) : null));
|
|
1155
|
-
}
|
|
1156
|
-
return xt(i), { xScale: o, yScale: l };
|
|
1157
|
-
}
|
|
1158
|
-
function lt(t, e, r, n) {
|
|
1159
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? Et : It);
|
|
1160
|
-
return Object.assign(
|
|
1161
|
-
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1162
|
-
{ labels: t }
|
|
1163
|
-
);
|
|
1164
|
-
}
|
|
1165
|
-
function ut(t, e, r, n) {
|
|
1166
|
-
const a = Tt(t).filter((d) => d != null), o = [0, e];
|
|
1167
|
-
if (a.length === 0)
|
|
1168
|
-
return fe().range(o).domain([0, 0]).nice();
|
|
1169
|
-
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1170
|
-
return fe().range(o).domain(c).nice();
|
|
1171
|
-
}
|
|
1172
|
-
function it(t) {
|
|
1173
|
-
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1174
|
-
}
|
|
1175
|
-
function Ce(t, e) {
|
|
1176
|
-
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1177
|
-
}
|
|
1178
|
-
function st(t, e, {
|
|
1179
|
-
padding: r,
|
|
1180
|
-
paddingInner: n,
|
|
1181
|
-
paddingOuter: a
|
|
1182
|
-
} = {}) {
|
|
1183
|
-
const o = r ?? (e === L.HORIZONTAL ? Et : It);
|
|
1184
|
-
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
1185
|
-
}
|
|
1186
|
-
function Dt(t) {
|
|
1187
|
-
return Object.values(L).includes(t);
|
|
1188
|
-
}
|
|
1189
|
-
const ce = (t, e = !0) => ({
|
|
1190
|
-
...Je(t),
|
|
1191
|
-
...$r(),
|
|
1192
|
-
...pe(),
|
|
1193
|
-
classList: {
|
|
1194
|
-
type: [String, Array],
|
|
1195
|
-
default: () => []
|
|
1196
|
-
},
|
|
1197
|
-
hoveredIndex: {
|
|
1198
|
-
type: Number,
|
|
1199
|
-
default: null
|
|
1200
|
-
},
|
|
1201
|
-
...e ? {
|
|
1202
|
-
orientation: {
|
|
1203
|
-
type: String,
|
|
1204
|
-
default: L.VERTICAL,
|
|
1205
|
-
validator: Dt
|
|
1206
|
-
}
|
|
1207
|
-
} : {}
|
|
1208
|
-
}), Er = (t) => ({
|
|
1209
|
-
...Je(t),
|
|
1210
|
-
...pe(),
|
|
1211
|
-
hoveredElement: {
|
|
1212
|
-
type: [Number, String],
|
|
1213
|
-
default: null
|
|
1214
|
-
}
|
|
1215
|
-
}), Ie = () => ({
|
|
1225
|
+
const Er = Ir.exports, Ie = () => ({
|
|
1216
1226
|
data: {
|
|
1217
1227
|
type: Array,
|
|
1218
1228
|
required: !0
|
|
@@ -1228,7 +1238,7 @@ const ce = (t, e = !0) => ({
|
|
|
1228
1238
|
orientation: {
|
|
1229
1239
|
type: String,
|
|
1230
1240
|
default: L.VERTICAL,
|
|
1231
|
-
validator:
|
|
1241
|
+
validator: qe
|
|
1232
1242
|
},
|
|
1233
1243
|
xScale: {
|
|
1234
1244
|
type: Function,
|
|
@@ -1265,10 +1275,10 @@ const ce = (t, e = !0) => ({
|
|
|
1265
1275
|
},
|
|
1266
1276
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1267
1277
|
setup(t, { emit: e }) {
|
|
1268
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() =>
|
|
1269
|
-
function u(
|
|
1278
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() => $t(n));
|
|
1279
|
+
function u(s) {
|
|
1270
1280
|
var y;
|
|
1271
|
-
const d = a.value === L.HORIZONTAL ? l.value : o.value,
|
|
1281
|
+
const d = a.value === L.HORIZONTAL ? l.value : o.value, c = d.domain(), _ = un(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = X(d) ? d(c[s]) - p / 2 : d(s) - _ / 2;
|
|
1272
1282
|
return a.value === L.HORIZONTAL ? {
|
|
1273
1283
|
width: Math.max(...o.value.range()),
|
|
1274
1284
|
height: _,
|
|
@@ -1301,7 +1311,7 @@ var Nr = function() {
|
|
|
1301
1311
|
null,
|
|
1302
1312
|
null
|
|
1303
1313
|
);
|
|
1304
|
-
const
|
|
1314
|
+
const Sr = Dr.exports, Rr = [
|
|
1305
1315
|
"axis-click",
|
|
1306
1316
|
"axis-mouseenter",
|
|
1307
1317
|
"axis-mouseleave",
|
|
@@ -1343,11 +1353,11 @@ const Rr = Dr.exports, Sr = [
|
|
|
1343
1353
|
(i) => l(...i.detail)
|
|
1344
1354
|
);
|
|
1345
1355
|
}
|
|
1346
|
-
return { componentEventPropagator:
|
|
1356
|
+
return { componentEventPropagator: Rr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1347
1357
|
};
|
|
1348
1358
|
function Cr(t) {
|
|
1349
1359
|
return { hasNegativeValues: v(
|
|
1350
|
-
() =>
|
|
1360
|
+
() => Lt(t.value).some((r) => r < 0)
|
|
1351
1361
|
) };
|
|
1352
1362
|
}
|
|
1353
1363
|
function Pr(t, e, r, n) {
|
|
@@ -1355,18 +1365,18 @@ function Pr(t, e, r, n) {
|
|
|
1355
1365
|
() => n.value === L.HORIZONTAL
|
|
1356
1366
|
), o = v(
|
|
1357
1367
|
() => {
|
|
1358
|
-
var
|
|
1359
|
-
return t.height - (a != null && a.value ? 0 : ((
|
|
1368
|
+
var s;
|
|
1369
|
+
return t.height - (a != null && a.value ? 0 : ((s = r.value) == null ? void 0 : s.call(r, 0)) || 0);
|
|
1360
1370
|
}
|
|
1361
1371
|
), l = v(
|
|
1362
1372
|
() => {
|
|
1363
|
-
var
|
|
1364
|
-
return a != null && a.value ? ((
|
|
1373
|
+
var s;
|
|
1374
|
+
return a != null && a.value ? ((s = e.value) == null ? void 0 : s.call(e, 0)) || 0 : t.width;
|
|
1365
1375
|
}
|
|
1366
1376
|
), i = v(
|
|
1367
1377
|
() => {
|
|
1368
|
-
var
|
|
1369
|
-
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((
|
|
1378
|
+
var s;
|
|
1379
|
+
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = r.value) == null ? void 0 : s.call(r, 0)) || 0})`;
|
|
1370
1380
|
}
|
|
1371
1381
|
);
|
|
1372
1382
|
return { negativeBarAttributes: v(() => ({
|
|
@@ -1388,22 +1398,22 @@ function Gr(t, e) {
|
|
|
1388
1398
|
}
|
|
1389
1399
|
), []);
|
|
1390
1400
|
}
|
|
1391
|
-
const
|
|
1401
|
+
const dt = {
|
|
1392
1402
|
"stacked-bar": Gr
|
|
1393
1403
|
};
|
|
1394
|
-
function
|
|
1404
|
+
function St(t, e, r, n, a, o, l, i) {
|
|
1395
1405
|
const u = v(
|
|
1396
1406
|
() => {
|
|
1397
1407
|
var d;
|
|
1398
1408
|
return e.value.withTooltip !== !1 && !((d = e.value.tooltipOptions) != null && d.targetElement);
|
|
1399
1409
|
}
|
|
1400
1410
|
);
|
|
1401
|
-
function
|
|
1411
|
+
function s(d) {
|
|
1402
1412
|
var m;
|
|
1403
|
-
const
|
|
1413
|
+
const c = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && dt[i.value] ? dt[i.value](
|
|
1404
1414
|
d,
|
|
1405
|
-
|
|
1406
|
-
) : Br(d,
|
|
1415
|
+
c
|
|
1416
|
+
) : Br(d, c);
|
|
1407
1417
|
t.value = _.map((p, h) => ({
|
|
1408
1418
|
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) : Ce(r.value, h),
|
|
1409
1419
|
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(p)
|
|
@@ -1412,10 +1422,10 @@ function Rt(t, e, r, n, a, o, l, i) {
|
|
|
1412
1422
|
return D(
|
|
1413
1423
|
[r, n],
|
|
1414
1424
|
() => {
|
|
1415
|
-
r.value && n.value && (l != null && l.value) && u.value &&
|
|
1425
|
+
r.value && n.value && (l != null && l.value) && u.value && s(l.value);
|
|
1416
1426
|
},
|
|
1417
1427
|
{ immediate: !0 }
|
|
1418
|
-
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes:
|
|
1428
|
+
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: s };
|
|
1419
1429
|
}
|
|
1420
1430
|
function Fr() {
|
|
1421
1431
|
const t = Oe({
|
|
@@ -1428,14 +1438,14 @@ function Fr() {
|
|
|
1428
1438
|
t.opened = !1, t.targetElement = null;
|
|
1429
1439
|
} };
|
|
1430
1440
|
}
|
|
1431
|
-
function
|
|
1441
|
+
function Vr(t) {
|
|
1432
1442
|
return { getTooltipItems: v(
|
|
1433
1443
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1434
1444
|
var l, i, u;
|
|
1435
1445
|
return {
|
|
1436
1446
|
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1437
1447
|
label: a,
|
|
1438
|
-
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ??
|
|
1448
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? It
|
|
1439
1449
|
};
|
|
1440
1450
|
})
|
|
1441
1451
|
) };
|
|
@@ -1454,7 +1464,7 @@ const Pe = 16, Be = 8, Ge = 28, Fe = 24, ae = {
|
|
|
1454
1464
|
left: Fe
|
|
1455
1465
|
}
|
|
1456
1466
|
};
|
|
1457
|
-
function
|
|
1467
|
+
function jr(t) {
|
|
1458
1468
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? Pe : t.top;
|
|
1459
1469
|
}
|
|
1460
1470
|
function Mr(t) {
|
|
@@ -1476,23 +1486,23 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1476
1486
|
}
|
|
1477
1487
|
},
|
|
1478
1488
|
setup(t, { emit: e }) {
|
|
1479
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType:
|
|
1489
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = B(r), d = E(-1), c = E(null), _ = E(null), m = E([]), p = E(null), h = E(0), y = E(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize: $, chartID: T } = Qe(a, o, l, f, u), { listenInternalEvent: S } = J(e, T), { xScale: R, yScale: C } = Jn(
|
|
1480
1490
|
k,
|
|
1481
1491
|
x,
|
|
1482
1492
|
A,
|
|
1483
1493
|
u,
|
|
1484
1494
|
f
|
|
1485
1495
|
), F = v(() => ({
|
|
1486
|
-
top:
|
|
1496
|
+
top: jr(f.value.margins),
|
|
1487
1497
|
right: Mr(f.value.margins),
|
|
1488
1498
|
bottom: zr(f.value.margins, h.value),
|
|
1489
1499
|
left: Wr(f.value.margins, y.value)
|
|
1490
|
-
})),
|
|
1500
|
+
})), V = v(() => {
|
|
1491
1501
|
var b;
|
|
1492
|
-
return r.xScale ?
|
|
1502
|
+
return r.xScale ? st(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
1493
1503
|
}), W = v(() => {
|
|
1494
1504
|
var b;
|
|
1495
|
-
return r.yScale ?
|
|
1505
|
+
return r.yScale ? st(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : C.value;
|
|
1496
1506
|
}), te = v(() => ({
|
|
1497
1507
|
...f.value.xAxisOptions,
|
|
1498
1508
|
withHover: u.value === L.VERTICAL
|
|
@@ -1515,38 +1525,38 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1515
1525
|
() => a.value.every((b) => !b.values.length)
|
|
1516
1526
|
), Z = v(() => {
|
|
1517
1527
|
const b = [], { noBaseScales: P } = f.value;
|
|
1518
|
-
return !P && !N.value && b.push(() => !!(
|
|
1528
|
+
return !P && !N.value && b.push(() => !!(V.value && W.value)), b.every((j) => j() === !0);
|
|
1519
1529
|
}), { hasNegativeValues: U } = Cr(k), { negativeBarAttributes: G } = Pr(
|
|
1520
1530
|
A,
|
|
1521
|
-
|
|
1531
|
+
V,
|
|
1522
1532
|
W,
|
|
1523
1533
|
u
|
|
1524
|
-
), { shouldGenerateTooltipAnchors:
|
|
1534
|
+
), { shouldGenerateTooltipAnchors: tt } = St(
|
|
1525
1535
|
m,
|
|
1526
1536
|
f,
|
|
1527
|
-
|
|
1537
|
+
V,
|
|
1528
1538
|
W,
|
|
1529
1539
|
o,
|
|
1530
1540
|
u,
|
|
1531
1541
|
k,
|
|
1532
|
-
|
|
1533
|
-
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } =
|
|
1542
|
+
s
|
|
1543
|
+
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } = Vr(k), ue = v(
|
|
1534
1544
|
() => {
|
|
1535
1545
|
var b;
|
|
1536
1546
|
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1537
1547
|
}
|
|
1538
|
-
),
|
|
1548
|
+
), nt = v(() => {
|
|
1539
1549
|
var P;
|
|
1540
1550
|
const b = (P = f.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1541
1551
|
return ve.opened && (!b || b && p.value === !1);
|
|
1542
1552
|
});
|
|
1543
1553
|
function be(b) {
|
|
1544
|
-
var
|
|
1554
|
+
var j;
|
|
1545
1555
|
if (f.value.withHover === !1 || b === d.value)
|
|
1546
1556
|
return;
|
|
1547
1557
|
const P = d.value;
|
|
1548
1558
|
if (d.value = b, f.value.withTooltip !== !1) {
|
|
1549
|
-
const Mt = (
|
|
1559
|
+
const Mt = (j = f.value.tooltipOptions) != null && j.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : c.value[b];
|
|
1550
1560
|
ge(Mt);
|
|
1551
1561
|
}
|
|
1552
1562
|
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
@@ -1556,7 +1566,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1556
1566
|
}
|
|
1557
1567
|
function Ee(b) {
|
|
1558
1568
|
if (!a.value.some(
|
|
1559
|
-
({ values:
|
|
1569
|
+
({ values: j }) => b <= j.length - 1
|
|
1560
1570
|
)) {
|
|
1561
1571
|
q(Y.InvalidHoveredIndex);
|
|
1562
1572
|
return;
|
|
@@ -1565,17 +1575,17 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1565
1575
|
}
|
|
1566
1576
|
function Gt() {
|
|
1567
1577
|
setTimeout(() => {
|
|
1568
|
-
|
|
1578
|
+
nt.value && ke(), e("chart-mouseleave");
|
|
1569
1579
|
}, 0);
|
|
1570
1580
|
}
|
|
1571
1581
|
function Ft(b) {
|
|
1572
1582
|
$(b), e("resize", b);
|
|
1573
1583
|
}
|
|
1574
|
-
function
|
|
1575
|
-
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event:
|
|
1584
|
+
function Vt({ index: b, value: P, event: j }) {
|
|
1585
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: j });
|
|
1576
1586
|
}
|
|
1577
|
-
function
|
|
1578
|
-
e("axis-click", { index: b, value: P, event:
|
|
1587
|
+
function jt({ index: b, value: P, event: j }) {
|
|
1588
|
+
e("axis-click", { index: b, value: P, event: j });
|
|
1579
1589
|
}
|
|
1580
1590
|
return D(
|
|
1581
1591
|
a,
|
|
@@ -1592,13 +1602,13 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1592
1602
|
), D(p, (b) => {
|
|
1593
1603
|
b === !1 && ve.opened && ke();
|
|
1594
1604
|
}), ee(async () => {
|
|
1595
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1596
|
-
}), we("chartID", T), we("isEmpty", N), we("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType:
|
|
1605
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), S("lume__internal--hover", be);
|
|
1606
|
+
}), we("chartID", T), we("isEmpty", N), we("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: d, tooltipAnchor: c, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: x, containerSize: A, updateSize: $, chartID: T, listenInternalEvent: S, xScale: R, yScale: C, computedMargins: F, computedXScale: V, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: I, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: tt, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: nt, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: Ee, handleMouseleave: Gt, handleResize: Ft, handleAxisMouseenter: Vt, handleAxisClick: jt, LumeAxis: Dn, LumeBar: Ue, LumeChartContainer: ar, LumeChartLegend: sr, LumeTooltip: Er, LumeOverlayGroup: Sr, TOOLTIP_ANCHOR_RADIUS: bn };
|
|
1597
1607
|
}
|
|
1598
1608
|
});
|
|
1599
1609
|
var Ur = function() {
|
|
1600
1610
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1601
|
-
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
|
|
1611
|
+
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, orientation: n.orientation, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
|
|
1602
1612
|
return n.emit("chart-click", a);
|
|
1603
1613
|
}, mouseenter: function(a) {
|
|
1604
1614
|
return n.emit("chart-mouseenter", a);
|
|
@@ -1659,11 +1669,11 @@ var Ur = function() {
|
|
|
1659
1669
|
Xr,
|
|
1660
1670
|
!1,
|
|
1661
1671
|
null,
|
|
1662
|
-
"
|
|
1672
|
+
"cffc1135",
|
|
1663
1673
|
null,
|
|
1664
1674
|
null
|
|
1665
1675
|
);
|
|
1666
|
-
const de = Yr.exports,
|
|
1676
|
+
const de = Yr.exports, vt = 8, Kr = 8, Jr = 20, se = 2, _t = 2, Qr = /* @__PURE__ */ H({
|
|
1667
1677
|
__name: "lume-alluvial-node-label",
|
|
1668
1678
|
props: {
|
|
1669
1679
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1678,8 +1688,8 @@ const de = Yr.exports, dt = 8, Kr = 8, Jr = 20, se = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1678
1688
|
async ([l, i]) => {
|
|
1679
1689
|
if (l && i) {
|
|
1680
1690
|
a.value = i, await He();
|
|
1681
|
-
const { width: u, height:
|
|
1682
|
-
a.value = u +
|
|
1691
|
+
const { width: u, height: s } = l.getBoundingClientRect();
|
|
1692
|
+
a.value = u + _t > i ? i : u + _t, o.value = Math.ceil(s);
|
|
1683
1693
|
}
|
|
1684
1694
|
},
|
|
1685
1695
|
{ immediate: !0 }
|
|
@@ -1752,7 +1762,7 @@ var sa = function() {
|
|
|
1752
1762
|
null
|
|
1753
1763
|
);
|
|
1754
1764
|
const va = da.exports;
|
|
1755
|
-
function
|
|
1765
|
+
function ft(t, e) {
|
|
1756
1766
|
return {
|
|
1757
1767
|
x0: 0 + (e ? e.left : 0),
|
|
1758
1768
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1761,16 +1771,16 @@ function _t(t, e) {
|
|
|
1761
1771
|
};
|
|
1762
1772
|
}
|
|
1763
1773
|
function _a(t) {
|
|
1764
|
-
const e = E(
|
|
1774
|
+
const e = E(ft(t));
|
|
1765
1775
|
function r(n) {
|
|
1766
|
-
e.value =
|
|
1776
|
+
e.value = ft(t, n);
|
|
1767
1777
|
}
|
|
1768
1778
|
return { extents: e, updateExtents: r };
|
|
1769
1779
|
}
|
|
1770
1780
|
var Te = /* @__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))(Te || {});
|
|
1771
1781
|
const fa = "[lume] ";
|
|
1772
|
-
function
|
|
1773
|
-
r &&
|
|
1782
|
+
function Ve(t, e, r = !0) {
|
|
1783
|
+
r && Tt() || console.error(fa + "Error: " + t, e);
|
|
1774
1784
|
}
|
|
1775
1785
|
const pa = 200;
|
|
1776
1786
|
function ie(t) {
|
|
@@ -1782,7 +1792,7 @@ function ma(t, e) {
|
|
|
1782
1792
|
function ha(t, e) {
|
|
1783
1793
|
return e.links.find((r) => r.id === t);
|
|
1784
1794
|
}
|
|
1785
|
-
function
|
|
1795
|
+
function Rt(t) {
|
|
1786
1796
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1787
1797
|
}
|
|
1788
1798
|
function ga(t, e) {
|
|
@@ -1812,7 +1822,7 @@ function ya(t) {
|
|
|
1812
1822
|
width: e.x1 - e.x0,
|
|
1813
1823
|
height: r ? se : e.y1 - e.y0,
|
|
1814
1824
|
textTransform: {
|
|
1815
|
-
x: e.depth > 0 ? e.x1 +
|
|
1825
|
+
x: e.depth > 0 ? e.x1 + vt : e.x0 - vt,
|
|
1816
1826
|
y: (e.y1 + e.y0) / 2
|
|
1817
1827
|
},
|
|
1818
1828
|
node: e
|
|
@@ -1840,7 +1850,7 @@ function Aa(t) {
|
|
|
1840
1850
|
};
|
|
1841
1851
|
});
|
|
1842
1852
|
}
|
|
1843
|
-
function
|
|
1853
|
+
function pt(t, e, r, n, a) {
|
|
1844
1854
|
if (n === !1) {
|
|
1845
1855
|
t.node = {
|
|
1846
1856
|
...t.node,
|
|
@@ -1849,11 +1859,11 @@ function ft(t, e, r, n, a) {
|
|
|
1849
1859
|
return;
|
|
1850
1860
|
}
|
|
1851
1861
|
const o = Date.now(), l = vn(e, r), i = () => {
|
|
1852
|
-
let
|
|
1853
|
-
|
|
1862
|
+
let s = (Date.now() - o) / pa;
|
|
1863
|
+
s > 1 && (s = 1), t.node = {
|
|
1854
1864
|
...t.node,
|
|
1855
|
-
transitionValue: a &&
|
|
1856
|
-
},
|
|
1865
|
+
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
1866
|
+
}, s < 1 && requestAnimationFrame(i);
|
|
1857
1867
|
};
|
|
1858
1868
|
requestAnimationFrame(i);
|
|
1859
1869
|
}
|
|
@@ -1861,13 +1871,13 @@ const Ta = {
|
|
|
1861
1871
|
nodes: [],
|
|
1862
1872
|
links: []
|
|
1863
1873
|
};
|
|
1864
|
-
function
|
|
1874
|
+
function mt(t, e) {
|
|
1865
1875
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1866
1876
|
}
|
|
1867
1877
|
function La(t, e, r) {
|
|
1868
1878
|
const n = E(null), a = v(() => {
|
|
1869
|
-
var
|
|
1870
|
-
return (_ = (
|
|
1879
|
+
var c, _;
|
|
1880
|
+
return (_ = (c = t.value) == null ? void 0 : c[0]) == null ? void 0 : _.values.map(
|
|
1871
1881
|
({ label: m, color: p, value: h, deriveColorFromIncomingLinks: y, offset: f }) => ({
|
|
1872
1882
|
label: m || h.toString(),
|
|
1873
1883
|
color: p,
|
|
@@ -1879,8 +1889,8 @@ function La(t, e, r) {
|
|
|
1879
1889
|
);
|
|
1880
1890
|
}), o = v(
|
|
1881
1891
|
() => {
|
|
1882
|
-
var
|
|
1883
|
-
return (_ = (
|
|
1892
|
+
var c, _;
|
|
1893
|
+
return (_ = (c = t.value) == null ? void 0 : c[0]) == null ? void 0 : _.values.map(
|
|
1884
1894
|
(m) => {
|
|
1885
1895
|
var p;
|
|
1886
1896
|
return (p = m.targets) == null ? void 0 : p.map(
|
|
@@ -1897,24 +1907,24 @@ function La(t, e, r) {
|
|
|
1897
1907
|
).filter(Boolean).flat();
|
|
1898
1908
|
}
|
|
1899
1909
|
), l = v(() => Jt().nodeId(ie).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), i = v(() => {
|
|
1900
|
-
var
|
|
1901
|
-
return (
|
|
1910
|
+
var c;
|
|
1911
|
+
return (c = n.value) == null ? void 0 : c.nodes.reduce(
|
|
1902
1912
|
(_, m) => {
|
|
1903
|
-
const p =
|
|
1913
|
+
const p = mt(m, _);
|
|
1904
1914
|
return p ? (p.push(m), p.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1905
1915
|
},
|
|
1906
1916
|
[]
|
|
1907
1917
|
);
|
|
1908
1918
|
});
|
|
1909
|
-
function u(
|
|
1910
|
-
const { offset: _ } =
|
|
1919
|
+
function u(c) {
|
|
1920
|
+
const { offset: _ } = c, m = mt(c, i.value);
|
|
1911
1921
|
if (!m)
|
|
1912
1922
|
return;
|
|
1913
|
-
const p = m[m.findIndex((y) => y.id ===
|
|
1914
|
-
|
|
1923
|
+
const p = m[m.findIndex((y) => y.id === c.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
1924
|
+
c._y0 = c.y0, c._y1 = c.y1, c.y0 = h, c.y1 = c.y0 + (c._y1 - c._y0);
|
|
1915
1925
|
}
|
|
1916
|
-
function c
|
|
1917
|
-
const { id: m, _y0: p, y0: h } =
|
|
1926
|
+
function s(c, _) {
|
|
1927
|
+
const { id: m, _y0: p, y0: h } = c, y = _.links.filter(
|
|
1918
1928
|
(x) => x.source.id === m
|
|
1919
1929
|
), f = _.links.filter(
|
|
1920
1930
|
(x) => x.target.id === m
|
|
@@ -1922,26 +1932,26 @@ function La(t, e, r) {
|
|
|
1922
1932
|
y.forEach((x) => x.y0 += k), f.forEach((x) => x.y1 += k);
|
|
1923
1933
|
}
|
|
1924
1934
|
const d = v(() => {
|
|
1925
|
-
var
|
|
1926
|
-
return n.value && ((
|
|
1927
|
-
_.value === 0 && (_.fallbackColor = Ye.Grey), typeof _.offset == "number" && (u(_),
|
|
1935
|
+
var c;
|
|
1936
|
+
return n.value && ((c = a.value) == null || c.forEach((_) => {
|
|
1937
|
+
_.value === 0 && (_.fallbackColor = Ye.Grey), typeof _.offset == "number" && (u(_), s(_, n.value));
|
|
1928
1938
|
})), n.value;
|
|
1929
1939
|
});
|
|
1930
1940
|
return D([l, r], () => {
|
|
1931
1941
|
try {
|
|
1932
|
-
const { x0:
|
|
1942
|
+
const { x0: c, y0: _, x1: m, y1: p } = r.value;
|
|
1933
1943
|
n.value = l.value.extent([
|
|
1934
|
-
[
|
|
1944
|
+
[c, _],
|
|
1935
1945
|
[m, p]
|
|
1936
1946
|
])({ nodes: a.value, links: o.value });
|
|
1937
|
-
} catch (
|
|
1938
|
-
|
|
1947
|
+
} catch (c) {
|
|
1948
|
+
Ve(Te.GraphProblem, c), n.value = Ta;
|
|
1939
1949
|
}
|
|
1940
1950
|
}), { columns: i, graph: d };
|
|
1941
1951
|
}
|
|
1942
|
-
function
|
|
1952
|
+
function je(t, e) {
|
|
1943
1953
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1944
|
-
e[r.id] = n,
|
|
1954
|
+
e[r.id] = n, je(
|
|
1945
1955
|
r,
|
|
1946
1956
|
e
|
|
1947
1957
|
);
|
|
@@ -1960,20 +1970,20 @@ function Oa(t, e) {
|
|
|
1960
1970
|
}
|
|
1961
1971
|
const $a = (t, e) => {
|
|
1962
1972
|
let r;
|
|
1963
|
-
|
|
1973
|
+
Rt(t) ? r = {
|
|
1964
1974
|
[t.id]: t.value,
|
|
1965
|
-
...
|
|
1975
|
+
...je(t),
|
|
1966
1976
|
...Me(t)
|
|
1967
1977
|
} : r = {
|
|
1968
1978
|
[t.source.id]: t.source.value,
|
|
1969
1979
|
[t.target.id]: t.target.value,
|
|
1970
|
-
...
|
|
1980
|
+
...je(t.source),
|
|
1971
1981
|
...Me(t.target)
|
|
1972
1982
|
};
|
|
1973
1983
|
const n = Oa(r, e);
|
|
1974
1984
|
return { nodes: r, links: n };
|
|
1975
1985
|
}, Ia = (t) => {
|
|
1976
|
-
if (
|
|
1986
|
+
if (Rt(t)) {
|
|
1977
1987
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1978
1988
|
return {
|
|
1979
1989
|
nodes: e.reduce(
|
|
@@ -1999,7 +2009,7 @@ function Ea(t, e, r) {
|
|
|
1999
2009
|
return D(a, (o, l) => {
|
|
2000
2010
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
2001
2011
|
t.value.forEach((i) => {
|
|
2002
|
-
i.node.id in l.nodes &&
|
|
2012
|
+
i.node.id in l.nodes && pt(
|
|
2003
2013
|
i,
|
|
2004
2014
|
l.nodes[i.node.id],
|
|
2005
2015
|
i.node.value,
|
|
@@ -2010,7 +2020,7 @@ function Ea(t, e, r) {
|
|
|
2010
2020
|
return;
|
|
2011
2021
|
}
|
|
2012
2022
|
t.value.forEach((i) => {
|
|
2013
|
-
i.node.id in o.nodes &&
|
|
2023
|
+
i.node.id in o.nodes && pt(
|
|
2014
2024
|
i,
|
|
2015
2025
|
i.node.value,
|
|
2016
2026
|
o.nodes[i.node.id],
|
|
@@ -2030,13 +2040,13 @@ const wa = /* @__PURE__ */ H({
|
|
|
2030
2040
|
},
|
|
2031
2041
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2032
2042
|
setup(t, { emit: e }) {
|
|
2033
|
-
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l = E([]), i = E([]), u = E(null), { extents:
|
|
2043
|
+
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l = E([]), i = E([]), u = E(null), { extents: s, updateExtents: d } = _a(r.containerSize), { columns: c, graph: _ } = La(a, o, s), { hoveredElement: m, highlightedElements: p } = Ea(
|
|
2034
2044
|
l,
|
|
2035
2045
|
o,
|
|
2036
2046
|
_
|
|
2037
2047
|
), h = v(() => Ae(o.value.valueFormat)), y = v(
|
|
2038
2048
|
() => Object.keys(p.value.nodes)
|
|
2039
|
-
), f = v(() =>
|
|
2049
|
+
), f = v(() => c.value ? c.value.map(
|
|
2040
2050
|
(g) => g[0].x0 + o.value.nodeWidth / 2
|
|
2041
2051
|
) : []), k = v(() => {
|
|
2042
2052
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
@@ -2059,11 +2069,11 @@ const wa = /* @__PURE__ */ H({
|
|
|
2059
2069
|
}, {});
|
|
2060
2070
|
}), $ = v(() => {
|
|
2061
2071
|
const g = l.value.filter(
|
|
2062
|
-
(N) =>
|
|
2072
|
+
(N) => V(N)
|
|
2063
2073
|
), O = [];
|
|
2064
2074
|
return g.forEach((N) => {
|
|
2065
2075
|
const Z = [];
|
|
2066
|
-
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G,
|
|
2076
|
+
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G, tt, ve) => {
|
|
2067
2077
|
const ge = G.link.target.y1 - G.link.target.y0 > se;
|
|
2068
2078
|
let le, ye, ue;
|
|
2069
2079
|
return ge ? (le = G.link.target.y1 - G.link.target.y0, ye = G.link.value / N.node.value, ue = ye * le) : (le = se, ue = se / ve.length), Z.push({
|
|
@@ -2083,10 +2093,10 @@ const wa = /* @__PURE__ */ H({
|
|
|
2083
2093
|
function T(g) {
|
|
2084
2094
|
return o.value.gradient && `url('#${n}_${g.id}')`;
|
|
2085
2095
|
}
|
|
2086
|
-
function
|
|
2096
|
+
function S(g) {
|
|
2087
2097
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2088
2098
|
}
|
|
2089
|
-
function
|
|
2099
|
+
function R(g) {
|
|
2090
2100
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2091
2101
|
}
|
|
2092
2102
|
function C(g) {
|
|
@@ -2095,7 +2105,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2095
2105
|
function F(g) {
|
|
2096
2106
|
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2097
2107
|
}
|
|
2098
|
-
function
|
|
2108
|
+
function V(g) {
|
|
2099
2109
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
2100
2110
|
}
|
|
2101
2111
|
function W(g, O) {
|
|
@@ -2129,7 +2139,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2129
2139
|
l.value = ya(g.nodes), i.value = Aa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2130
2140
|
}), D([r.containerSize, u], () => {
|
|
2131
2141
|
r.containerSize.width && r.containerSize.height && I();
|
|
2132
|
-
}), D(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents:
|
|
2142
|
+
}), D(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: s, updateExtents: d, columns: c, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: x, gradients: A, nodesDerivingColorFromIncomingLinks: $, getLinkStroke: T, isNodeFaded: S, isNodeFocused: R, isLinkFaded: C, isLinkFocused: F, shouldDeriveNodeColorFromIncomingLinks: V, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: I, LumeAlluvialNodeLabel: na, LumeAlluvialNodeValue: ua, LumeAlluvialNodeHeader: va, GHOST_STROKE_WIDTH_OFFSET: Kr };
|
|
2133
2143
|
}
|
|
2134
2144
|
});
|
|
2135
2145
|
var Na = function() {
|
|
@@ -2196,7 +2206,7 @@ var Na = function() {
|
|
|
2196
2206
|
null,
|
|
2197
2207
|
null
|
|
2198
2208
|
);
|
|
2199
|
-
const
|
|
2209
|
+
const Sa = Da.exports, Ra = {
|
|
2200
2210
|
margins: {
|
|
2201
2211
|
top: 0,
|
|
2202
2212
|
right: 0,
|
|
@@ -2218,18 +2228,18 @@ const Ra = Da.exports, Sa = {
|
|
|
2218
2228
|
}, Ca = /* @__PURE__ */ H({
|
|
2219
2229
|
__name: "lume-alluvial-diagram",
|
|
2220
2230
|
props: {
|
|
2221
|
-
...
|
|
2231
|
+
...Qn(We)
|
|
2222
2232
|
},
|
|
2223
2233
|
setup(t, { emit: e }) {
|
|
2224
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = fn(M()), { options: l } = B(r), { allOptions: i } = K(l,
|
|
2225
|
-
function u(
|
|
2234
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = fn(M()), { options: l } = B(r), { allOptions: i } = K(l, Ra);
|
|
2235
|
+
function u(s) {
|
|
2226
2236
|
return {
|
|
2227
|
-
...
|
|
2237
|
+
...s,
|
|
2228
2238
|
noBaseScales: !0
|
|
2229
2239
|
// Alluvial chart never uses base scales
|
|
2230
2240
|
};
|
|
2231
2241
|
}
|
|
2232
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup:
|
|
2242
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup: Sa };
|
|
2233
2243
|
}
|
|
2234
2244
|
});
|
|
2235
2245
|
var Pa = function() {
|
|
@@ -2279,13 +2289,13 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2279
2289
|
["grouped", a],
|
|
2280
2290
|
["stacked", o]
|
|
2281
2291
|
]), { componentEventPropagator: i } = J(e), u = oe(M());
|
|
2282
|
-
function c
|
|
2292
|
+
function s(c) {
|
|
2283
2293
|
return {
|
|
2284
|
-
...
|
|
2294
|
+
...c,
|
|
2285
2295
|
startOnZero: !0,
|
|
2286
2296
|
// Bar chart always starts on zero,
|
|
2287
2297
|
tooltipOptions: {
|
|
2288
|
-
...(
|
|
2298
|
+
...(c == null ? void 0 : c.tooltipOptions) || {},
|
|
2289
2299
|
position: r.orientation === L.HORIZONTAL ? "right" : void 0
|
|
2290
2300
|
}
|
|
2291
2301
|
};
|
|
@@ -2297,20 +2307,20 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2297
2307
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2298
2308
|
return l.get(r.type);
|
|
2299
2309
|
});
|
|
2300
|
-
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions:
|
|
2310
|
+
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: s, component: d };
|
|
2301
2311
|
}
|
|
2302
2312
|
});
|
|
2303
|
-
var
|
|
2313
|
+
var Va = function() {
|
|
2304
2314
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2305
2315
|
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) {
|
|
2306
2316
|
return { key: o, fn: function(l) {
|
|
2307
2317
|
return [e._t(o, null, null, l || {})];
|
|
2308
2318
|
} };
|
|
2309
2319
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2310
|
-
},
|
|
2320
|
+
}, ja = [], Ma = /* @__PURE__ */ w(
|
|
2311
2321
|
Fa,
|
|
2312
|
-
ja,
|
|
2313
2322
|
Va,
|
|
2323
|
+
ja,
|
|
2314
2324
|
!1,
|
|
2315
2325
|
null,
|
|
2316
2326
|
null,
|
|
@@ -2367,7 +2377,7 @@ function Xa(t, e, r) {
|
|
|
2367
2377
|
() => r.value === L.HORIZONTAL
|
|
2368
2378
|
);
|
|
2369
2379
|
function a(i) {
|
|
2370
|
-
i ||
|
|
2380
|
+
i || Ve(Te.BarScaleNull), Math.min(...i.domain()) > 0 && Ve(Te.BarScaleDomainAbove0);
|
|
2371
2381
|
}
|
|
2372
2382
|
const o = v(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = v(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2373
2383
|
return { barXScale: o, barYScale: l };
|
|
@@ -2382,20 +2392,20 @@ function Ka(t, e, r, n, a, o) {
|
|
|
2382
2392
|
const l = v(
|
|
2383
2393
|
() => n.value === L.HORIZONTAL
|
|
2384
2394
|
);
|
|
2385
|
-
function i(
|
|
2395
|
+
function i(c, _) {
|
|
2386
2396
|
let m, p;
|
|
2387
|
-
return l.value ? (m =
|
|
2397
|
+
return l.value ? (m = c >= 0 ? e.value(0) : e.value(c), p = r.value(r.value.domain()[_])) : (m = e.value(e.value.domain()[_]), p = c < 0 ? r.value(0) : r.value(c)), { x: m, y: p };
|
|
2388
2398
|
}
|
|
2389
|
-
function u(
|
|
2390
|
-
return l.value ?
|
|
2399
|
+
function u(c) {
|
|
2400
|
+
return l.value ? c < 0 ? e.value(0) - e.value(c) : e.value(c) - e.value(0) : e.value.bandwidth();
|
|
2391
2401
|
}
|
|
2392
|
-
function c
|
|
2393
|
-
return l.value ? r.value.bandwidth() :
|
|
2402
|
+
function s(c) {
|
|
2403
|
+
return l.value ? r.value.bandwidth() : c < 0 ? r.value(c) - r.value(0) : r.value(0) - r.value(c);
|
|
2394
2404
|
}
|
|
2395
|
-
function d(
|
|
2405
|
+
function d(c, _, m) {
|
|
2396
2406
|
if (!(e.value && r.value))
|
|
2397
2407
|
return Ya;
|
|
2398
|
-
const { value: h, color: y } =
|
|
2408
|
+
const { value: h, color: y } = c, f = y ?? t.value[_].color ?? he, { x: k, y: x } = i(h, m), A = u(h), $ = s(h);
|
|
2399
2409
|
return {
|
|
2400
2410
|
classList: [`lume-fill--${f}`, ...o],
|
|
2401
2411
|
x: k,
|
|
@@ -2418,7 +2428,7 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2418
2428
|
const l = v(
|
|
2419
2429
|
() => n.value === L.HORIZONTAL
|
|
2420
2430
|
), i = v(() => _e().domain(t.value.map((p, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => _e().domain(t.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
2421
|
-
function
|
|
2431
|
+
function s(p, h, y) {
|
|
2422
2432
|
if (l.value)
|
|
2423
2433
|
return p >= 0 ? e.value(0) : e.value(p);
|
|
2424
2434
|
const f = e.value.domain();
|
|
@@ -2431,7 +2441,7 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2431
2441
|
}
|
|
2432
2442
|
return p < 0 ? r.value(0) : r.value(p);
|
|
2433
2443
|
}
|
|
2434
|
-
function
|
|
2444
|
+
function c(p) {
|
|
2435
2445
|
return l.value ? p < 0 ? e.value(0) - e.value(p) : e.value(p) - e.value(0) : i.value.bandwidth();
|
|
2436
2446
|
}
|
|
2437
2447
|
function _(p) {
|
|
@@ -2440,13 +2450,13 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2440
2450
|
function m(p, h, y) {
|
|
2441
2451
|
if (!(e.value && r.value))
|
|
2442
2452
|
return Ja;
|
|
2443
|
-
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], $ =
|
|
2453
|
+
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], $ = s(k, y, h), T = d(k, y, h), S = c(k), R = _(k);
|
|
2444
2454
|
return {
|
|
2445
2455
|
classList: [`lume-fill--${A}`, ...o],
|
|
2446
2456
|
x: $,
|
|
2447
2457
|
y: T,
|
|
2448
|
-
width:
|
|
2449
|
-
height:
|
|
2458
|
+
width: S,
|
|
2459
|
+
height: R,
|
|
2450
2460
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2451
2461
|
isNegative: k < 0
|
|
2452
2462
|
};
|
|
@@ -2458,36 +2468,36 @@ function qa(t, e, r) {
|
|
|
2458
2468
|
() => e.value === L.HORIZONTAL
|
|
2459
2469
|
), a = v(() => {
|
|
2460
2470
|
const u = t.value.map(
|
|
2461
|
-
(
|
|
2471
|
+
(s) => s.filter((d) => d.value < 0).reduce((d, c) => d + c.value, 0)
|
|
2462
2472
|
);
|
|
2463
2473
|
return Math.min(...u);
|
|
2464
2474
|
}), o = v(() => {
|
|
2465
2475
|
const u = t.value.map(
|
|
2466
|
-
(
|
|
2467
|
-
(d,
|
|
2476
|
+
(s) => s.reduce(
|
|
2477
|
+
(d, c) => c.value >= 0 ? d + c.value : d,
|
|
2468
2478
|
0
|
|
2469
2479
|
)
|
|
2470
2480
|
);
|
|
2471
2481
|
return Math.max(...u);
|
|
2472
2482
|
});
|
|
2473
|
-
function l(u,
|
|
2474
|
-
return
|
|
2475
|
-
|
|
2476
|
-
_e().domain(
|
|
2483
|
+
function l(u, s, d) {
|
|
2484
|
+
return s.length ? n.value ? fe().domain([a.value, o.value]).range([0, d.width]) : Object.assign(
|
|
2485
|
+
ct(
|
|
2486
|
+
_e().domain(s.map((c, _) => _)).range([0, d.width]),
|
|
2477
2487
|
e.value,
|
|
2478
2488
|
r.value
|
|
2479
2489
|
),
|
|
2480
|
-
{ labels:
|
|
2490
|
+
{ labels: s }
|
|
2481
2491
|
) : null;
|
|
2482
2492
|
}
|
|
2483
|
-
function i(u,
|
|
2484
|
-
return
|
|
2485
|
-
|
|
2486
|
-
_e().domain(
|
|
2493
|
+
function i(u, s, d) {
|
|
2494
|
+
return s.length ? n.value ? Object.assign(
|
|
2495
|
+
ct(
|
|
2496
|
+
_e().domain(s.map((c, _) => _)).range([0, d.height]),
|
|
2487
2497
|
e.value,
|
|
2488
2498
|
r.value
|
|
2489
2499
|
),
|
|
2490
|
-
{ labels:
|
|
2500
|
+
{ labels: s }
|
|
2491
2501
|
) : fe().domain([o.value, a.value]).range([0, d.height]) : null;
|
|
2492
2502
|
}
|
|
2493
2503
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
@@ -2500,14 +2510,14 @@ function eo(t, e, r, n, a, o) {
|
|
|
2500
2510
|
), u = v(
|
|
2501
2511
|
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2502
2512
|
);
|
|
2503
|
-
function
|
|
2513
|
+
function s(f, k, x) {
|
|
2504
2514
|
let A, $;
|
|
2505
2515
|
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x), $ = r.value(i.value[k])) : (A = e.value(i.value[k]), $ = r.value(f >= 0 ? f + x : 0 + x)), { x: A, y: $ };
|
|
2506
2516
|
}
|
|
2507
2517
|
function d(f) {
|
|
2508
2518
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2509
2519
|
}
|
|
2510
|
-
function
|
|
2520
|
+
function c(f) {
|
|
2511
2521
|
return l.value ? e.value(0) - e.value(f) : e.value.bandwidth();
|
|
2512
2522
|
}
|
|
2513
2523
|
function _(f) {
|
|
@@ -2523,11 +2533,11 @@ function eo(t, e, r, n, a, o) {
|
|
|
2523
2533
|
return f ? u.value.reduce((x, A, $) => ($ < f && A[k] < 0 && (x += A[k]), x), 0) : 0;
|
|
2524
2534
|
}
|
|
2525
2535
|
function y(f, k, x) {
|
|
2526
|
-
const { value: A, color: $ } = f, T = A >= 0 ? d(A) :
|
|
2536
|
+
const { value: A, color: $ } = f, T = A >= 0 ? d(A) : c(A), S = A >= 0 ? _(A) : m(A), R = A >= 0 ? p(k, x) : h(k, x), { x: C, y: F } = s(A, x, R);
|
|
2527
2537
|
return {
|
|
2528
2538
|
classList: [`lume-fill--${$ ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2529
2539
|
width: T,
|
|
2530
|
-
height:
|
|
2540
|
+
height: S,
|
|
2531
2541
|
x: C,
|
|
2532
2542
|
y: F,
|
|
2533
2543
|
isFaded: a.value !== -1 && a.value !== x,
|
|
@@ -2536,7 +2546,7 @@ function eo(t, e, r, n, a, o) {
|
|
|
2536
2546
|
}
|
|
2537
2547
|
return { barAttributeGenerator: y };
|
|
2538
2548
|
}
|
|
2539
|
-
const
|
|
2549
|
+
const ht = {
|
|
2540
2550
|
single: Ka,
|
|
2541
2551
|
grouped: Qa,
|
|
2542
2552
|
stacked: eo
|
|
@@ -2563,11 +2573,11 @@ const mt = {
|
|
|
2563
2573
|
transition: l,
|
|
2564
2574
|
type: i,
|
|
2565
2575
|
xScale: u,
|
|
2566
|
-
yScale:
|
|
2576
|
+
yScale: s,
|
|
2567
2577
|
classList: d,
|
|
2568
|
-
labels:
|
|
2569
|
-
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Ct(n,
|
|
2570
|
-
const $ = Ua(n, i), { barAttributeGenerator: T } =
|
|
2578
|
+
labels: c
|
|
2579
|
+
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Ct(n, c), { barXScale: h, barYScale: y } = Xa(u, s, o), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2580
|
+
const $ = Ua(n, i), { barAttributeGenerator: T } = ht[$](
|
|
2571
2581
|
n,
|
|
2572
2582
|
h,
|
|
2573
2583
|
y,
|
|
@@ -2583,7 +2593,7 @@ const mt = {
|
|
|
2583
2593
|
async function A($) {
|
|
2584
2594
|
e("lume__internal--hover", $), m("lume__internal--hover", $);
|
|
2585
2595
|
}
|
|
2586
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2596
|
+
return { __sfc: !0, MIXIN_MAP: ht, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: d, labels: c, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: x, handleInternalHover: A, LumeBar: Ue };
|
|
2587
2597
|
}
|
|
2588
2598
|
});
|
|
2589
2599
|
var no = function() {
|
|
@@ -2611,7 +2621,7 @@ var no = function() {
|
|
|
2611
2621
|
null,
|
|
2612
2622
|
null
|
|
2613
2623
|
);
|
|
2614
|
-
const
|
|
2624
|
+
const et = ao.exports, oo = {
|
|
2615
2625
|
[L.VERTICAL]: {
|
|
2616
2626
|
withTooltip: !0,
|
|
2617
2627
|
xAxisOptions: {},
|
|
@@ -2634,7 +2644,7 @@ const qe = ao.exports, oo = {
|
|
|
2634
2644
|
() => oo[o.value || L.VERTICAL]
|
|
2635
2645
|
// needs to be computed so that default options are reactive
|
|
2636
2646
|
), { allOptions: u } = K(l, i);
|
|
2637
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup:
|
|
2647
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: et };
|
|
2638
2648
|
}
|
|
2639
2649
|
});
|
|
2640
2650
|
var uo = function() {
|
|
@@ -2683,7 +2693,7 @@ const tl = so.exports, co = {
|
|
|
2683
2693
|
l,
|
|
2684
2694
|
i
|
|
2685
2695
|
);
|
|
2686
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup:
|
|
2696
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: et };
|
|
2687
2697
|
}
|
|
2688
2698
|
});
|
|
2689
2699
|
var _o = function() {
|
|
@@ -2726,18 +2736,18 @@ const nl = po.exports, mo = {
|
|
|
2726
2736
|
...ce()
|
|
2727
2737
|
},
|
|
2728
2738
|
setup(t, { emit: e }) {
|
|
2729
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { data: o, orientation: l, options: i, labels: u } = B(r),
|
|
2739
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { data: o, orientation: l, options: i, labels: u } = B(r), s = v(
|
|
2730
2740
|
() => mo[l.value || L.VERTICAL]
|
|
2731
2741
|
// needs to be computed so that default options are reactive
|
|
2732
2742
|
), { allOptions: d } = K(
|
|
2733
2743
|
i,
|
|
2734
|
-
|
|
2735
|
-
), { internalData:
|
|
2744
|
+
s
|
|
2745
|
+
), { internalData: c } = Qe(o), { groupedData: _ } = Ct(c, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = qa(
|
|
2736
2746
|
_,
|
|
2737
2747
|
l,
|
|
2738
2748
|
i
|
|
2739
2749
|
), h = v(() => r.xScale || m), y = v(() => r.yScale || p);
|
|
2740
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions:
|
|
2750
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: s, allOptions: d, internalData: c, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart: de, LumeBarGroup: et };
|
|
2741
2751
|
}
|
|
2742
2752
|
});
|
|
2743
2753
|
var go = function() {
|
|
@@ -2759,7 +2769,7 @@ var go = function() {
|
|
|
2759
2769
|
null,
|
|
2760
2770
|
null
|
|
2761
2771
|
);
|
|
2762
|
-
const rl = bo.exports,
|
|
2772
|
+
const rl = bo.exports, gt = 2, ko = /* @__PURE__ */ H({
|
|
2763
2773
|
__name: "lume-line",
|
|
2764
2774
|
props: {
|
|
2765
2775
|
pathDefinition: {
|
|
@@ -2768,7 +2778,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ H({
|
|
|
2768
2778
|
},
|
|
2769
2779
|
width: {
|
|
2770
2780
|
type: Number,
|
|
2771
|
-
default:
|
|
2781
|
+
default: gt
|
|
2772
2782
|
},
|
|
2773
2783
|
color: {
|
|
2774
2784
|
type: String,
|
|
@@ -2794,7 +2804,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ H({
|
|
|
2794
2804
|
emits: ["click"],
|
|
2795
2805
|
setup(t, { emit: e }) {
|
|
2796
2806
|
const r = E(null);
|
|
2797
|
-
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH:
|
|
2807
|
+
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: gt, emit: e, root: r };
|
|
2798
2808
|
}
|
|
2799
2809
|
});
|
|
2800
2810
|
var xo = function() {
|
|
@@ -2819,7 +2829,7 @@ var xo = function() {
|
|
|
2819
2829
|
null,
|
|
2820
2830
|
null
|
|
2821
2831
|
);
|
|
2822
|
-
const Lo = To.exports,
|
|
2832
|
+
const Lo = To.exports, yt = 4, Oo = /* @__PURE__ */ H({
|
|
2823
2833
|
__name: "lume-point",
|
|
2824
2834
|
props: {
|
|
2825
2835
|
x: { type: Number, required: !0 },
|
|
@@ -2830,7 +2840,7 @@ const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ H({
|
|
|
2830
2840
|
},
|
|
2831
2841
|
radius: {
|
|
2832
2842
|
type: Number,
|
|
2833
|
-
default:
|
|
2843
|
+
default: yt
|
|
2834
2844
|
},
|
|
2835
2845
|
active: {
|
|
2836
2846
|
type: Boolean,
|
|
@@ -2840,7 +2850,7 @@ const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ H({
|
|
|
2840
2850
|
emits: ["click"],
|
|
2841
2851
|
setup(t, { emit: e }) {
|
|
2842
2852
|
const r = t, n = E(null), a = v(() => r.radius / 2);
|
|
2843
|
-
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS:
|
|
2853
|
+
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS: yt, props: r, emit: e, root: n, strokeWidth: a };
|
|
2844
2854
|
}
|
|
2845
2855
|
});
|
|
2846
2856
|
var $o = function() {
|
|
@@ -2862,11 +2872,11 @@ const wo = Eo.exports;
|
|
|
2862
2872
|
function Pt(t) {
|
|
2863
2873
|
function e(o) {
|
|
2864
2874
|
let l = null;
|
|
2865
|
-
return o == null ? void 0 : o.reduce((i, u,
|
|
2875
|
+
return o == null ? void 0 : o.reduce((i, u, s) => (u == null || u.value == null ? (l ? l.push(s) : l = [s], s === (o == null ? void 0 : o.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2866
2876
|
}
|
|
2867
2877
|
function r(o, l, i, u) {
|
|
2868
|
-
const
|
|
2869
|
-
return o == null && l == null ? null : o > l ? o -
|
|
2878
|
+
const c = Math.abs(o - l) / (i + 1) * (u + 1);
|
|
2879
|
+
return o == null && l == null ? null : o > l ? o - c : o + c;
|
|
2870
2880
|
}
|
|
2871
2881
|
function n(o) {
|
|
2872
2882
|
return function(i) {
|
|
@@ -2881,21 +2891,21 @@ function Pt(t) {
|
|
|
2881
2891
|
...o,
|
|
2882
2892
|
isDashed: n(l),
|
|
2883
2893
|
values: o.values.map((i, u) => {
|
|
2884
|
-
var d,
|
|
2885
|
-
const
|
|
2894
|
+
var d, c;
|
|
2895
|
+
const s = l.find(
|
|
2886
2896
|
(_) => _.includes(u)
|
|
2887
2897
|
);
|
|
2888
|
-
if (
|
|
2889
|
-
const _ =
|
|
2890
|
-
let p = (d = o.values[_]) == null ? void 0 : d.value, h = (
|
|
2898
|
+
if (s) {
|
|
2899
|
+
const _ = s[0] - 1, m = s[s.length - 1] + 1;
|
|
2900
|
+
let p = (d = o.values[_]) == null ? void 0 : d.value, h = (c = o.values[m]) == null ? void 0 : c.value;
|
|
2891
2901
|
return p == null && (p = h), h == null && (h = p), {
|
|
2892
2902
|
value: r(
|
|
2893
2903
|
p,
|
|
2894
2904
|
h,
|
|
2895
|
-
|
|
2896
|
-
|
|
2905
|
+
s.length,
|
|
2906
|
+
s.indexOf(u)
|
|
2897
2907
|
),
|
|
2898
|
-
label:
|
|
2908
|
+
label: It
|
|
2899
2909
|
};
|
|
2900
2910
|
}
|
|
2901
2911
|
return i;
|
|
@@ -2916,7 +2926,7 @@ function Do(t, e, r, n) {
|
|
|
2916
2926
|
).y((o) => n(o));
|
|
2917
2927
|
return e.every((o) => o == null) ? null : a(e);
|
|
2918
2928
|
}
|
|
2919
|
-
const
|
|
2929
|
+
const bt = 1, So = /* @__PURE__ */ H({
|
|
2920
2930
|
__name: "lume-line-group",
|
|
2921
2931
|
props: {
|
|
2922
2932
|
...Ie(),
|
|
@@ -2934,18 +2944,18 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2934
2944
|
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = B(r), u = Le(
|
|
2935
2945
|
"tooltipAnchorAttributes",
|
|
2936
2946
|
null
|
|
2937
|
-
), { updateTooltipAnchorAttributes:
|
|
2947
|
+
), { updateTooltipAnchorAttributes: s } = St(
|
|
2938
2948
|
u,
|
|
2939
2949
|
a,
|
|
2940
2950
|
o,
|
|
2941
2951
|
l,
|
|
2942
2952
|
i
|
|
2943
2953
|
), d = v(() => {
|
|
2944
|
-
if (n.value.every((
|
|
2954
|
+
if (n.value.every((S) => S.isDashed))
|
|
2945
2955
|
return n.value;
|
|
2946
2956
|
const { computedLineData: T } = Pt(n);
|
|
2947
|
-
return a.value.withTooltip !== !1 && (u != null && u.value) &&
|
|
2948
|
-
}),
|
|
2957
|
+
return a.value.withTooltip !== !1 && (u != null && u.value) && s(T.value), T.value;
|
|
2958
|
+
}), c = v(() => {
|
|
2949
2959
|
if (r.hoveredIndex === -1)
|
|
2950
2960
|
return;
|
|
2951
2961
|
const T = cn(
|
|
@@ -2958,7 +2968,7 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2958
2968
|
// Move to X index, Vertical line to the highest point
|
|
2959
2969
|
};
|
|
2960
2970
|
}), _ = v(
|
|
2961
|
-
() => o.value &&
|
|
2971
|
+
() => o.value && bt / (dn(o.value) - 1)
|
|
2962
2972
|
// Subtracting the first line (read below)
|
|
2963
2973
|
), m = v(
|
|
2964
2974
|
() => {
|
|
@@ -2974,15 +2984,15 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2974
2984
|
function f(T) {
|
|
2975
2985
|
return d.value[T].values;
|
|
2976
2986
|
}
|
|
2977
|
-
function k(T,
|
|
2987
|
+
function k(T, S) {
|
|
2978
2988
|
var C, F;
|
|
2979
|
-
const
|
|
2980
|
-
(C = f(
|
|
2981
|
-
(F = f(
|
|
2989
|
+
const R = T === 0 ? [] : [
|
|
2990
|
+
(C = f(S)[T - 1]) == null ? void 0 : C.value,
|
|
2991
|
+
(F = f(S)[T]) == null ? void 0 : F.value
|
|
2982
2992
|
];
|
|
2983
2993
|
return Do(
|
|
2984
2994
|
T,
|
|
2985
|
-
|
|
2995
|
+
R,
|
|
2986
2996
|
o.value,
|
|
2987
2997
|
l.value
|
|
2988
2998
|
) || "";
|
|
@@ -2993,21 +3003,21 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2993
3003
|
animationDuration: _.value
|
|
2994
3004
|
};
|
|
2995
3005
|
}
|
|
2996
|
-
function A(T,
|
|
3006
|
+
function A(T, S) {
|
|
2997
3007
|
var C;
|
|
2998
|
-
const
|
|
3008
|
+
const R = (C = f(S)[T]) == null ? void 0 : C.value;
|
|
2999
3009
|
return {
|
|
3000
3010
|
x: X(o.value) ? r.xScale(h.value[T]) + p.value : r.xScale(T),
|
|
3001
|
-
y:
|
|
3011
|
+
y: R === null ? l.value(l.value.domain()[1]) : l.value(R)
|
|
3002
3012
|
};
|
|
3003
3013
|
}
|
|
3004
3014
|
function $(T) {
|
|
3005
3015
|
return r.hoveredIndex === T;
|
|
3006
3016
|
}
|
|
3007
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
3017
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: bt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: s, computedGroupData: d, overlayLineAttributes: c, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive: $, LumeLine: Lo, LumePoint: wo };
|
|
3008
3018
|
}
|
|
3009
3019
|
});
|
|
3010
|
-
var
|
|
3020
|
+
var Ro = function() {
|
|
3011
3021
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3012
3022
|
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) {
|
|
3013
3023
|
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) {
|
|
@@ -3021,8 +3031,8 @@ var So = function() {
|
|
|
3021
3031
|
}), 1) : e._e()]);
|
|
3022
3032
|
})], 2);
|
|
3023
3033
|
}, Co = [], Po = /* @__PURE__ */ w(
|
|
3024
|
-
Ro,
|
|
3025
3034
|
So,
|
|
3035
|
+
Ro,
|
|
3026
3036
|
Co,
|
|
3027
3037
|
!1,
|
|
3028
3038
|
null,
|
|
@@ -3055,17 +3065,17 @@ var Fo = function() {
|
|
|
3055
3065
|
return [e._t(o, null, null, l || {})];
|
|
3056
3066
|
} };
|
|
3057
3067
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3058
|
-
},
|
|
3068
|
+
}, Vo = [], jo = /* @__PURE__ */ w(
|
|
3059
3069
|
Go,
|
|
3060
3070
|
Fo,
|
|
3061
|
-
|
|
3071
|
+
Vo,
|
|
3062
3072
|
!1,
|
|
3063
3073
|
null,
|
|
3064
3074
|
null,
|
|
3065
3075
|
null,
|
|
3066
3076
|
null
|
|
3067
3077
|
);
|
|
3068
|
-
const al =
|
|
3078
|
+
const al = jo.exports;
|
|
3069
3079
|
function Mo(t) {
|
|
3070
3080
|
return { areaPathDefinition: v(
|
|
3071
3081
|
() => function(r, n) {
|
|
@@ -3097,7 +3107,7 @@ const zo = {
|
|
|
3097
3107
|
...pe()
|
|
3098
3108
|
},
|
|
3099
3109
|
setup(t, { expose: e, emit: r }) {
|
|
3100
|
-
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Qe(l), { allOptions:
|
|
3110
|
+
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Qe(l), { allOptions: s } = K(i, zo), { computedLineData: d } = Pt(u), { areaPathDefinition: c } = Mo(d), _ = v(() => {
|
|
3101
3111
|
var y, f;
|
|
3102
3112
|
return (f = (y = u.value) == null ? void 0 : y[0]) == null ? void 0 : f.color;
|
|
3103
3113
|
}), m = v(
|
|
@@ -3117,8 +3127,8 @@ const zo = {
|
|
|
3117
3127
|
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3118
3128
|
}
|
|
3119
3129
|
return e({
|
|
3120
|
-
areaPathDefinition:
|
|
3121
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions:
|
|
3130
|
+
areaPathDefinition: c
|
|
3131
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: s, computedLineData: d, areaPathDefinition: c, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart: de, LumeLineGroup: Bt };
|
|
3122
3132
|
}
|
|
3123
3133
|
});
|
|
3124
3134
|
var Zo = function() {
|
|
@@ -3152,31 +3162,31 @@ export {
|
|
|
3152
3162
|
Xe as DivergentColors,
|
|
3153
3163
|
Ke as LegacyColors,
|
|
3154
3164
|
qo as LumeAlluvialDiagram,
|
|
3155
|
-
|
|
3165
|
+
Sa as LumeAlluvialGroup,
|
|
3156
3166
|
va as LumeAlluvialNodeHeader,
|
|
3157
3167
|
na as LumeAlluvialNodeLabel,
|
|
3158
3168
|
ua as LumeAlluvialNodeValue,
|
|
3159
3169
|
Dn as LumeAxis,
|
|
3160
3170
|
Ue as LumeBar,
|
|
3161
3171
|
el as LumeBarChart,
|
|
3162
|
-
|
|
3172
|
+
et as LumeBarGroup,
|
|
3163
3173
|
de as LumeChart,
|
|
3164
|
-
|
|
3165
|
-
|
|
3174
|
+
ar as LumeChartContainer,
|
|
3175
|
+
sr as LumeChartLegend,
|
|
3166
3176
|
nl as LumeGroupedBarChart,
|
|
3167
3177
|
Lo as LumeLine,
|
|
3168
3178
|
al as LumeLineChart,
|
|
3169
3179
|
Bt as LumeLineGroup,
|
|
3170
|
-
|
|
3180
|
+
Sr as LumeOverlayGroup,
|
|
3171
3181
|
wo as LumePoint,
|
|
3172
3182
|
tl as LumeSingleBarChart,
|
|
3173
3183
|
ol as LumeSparklineChart,
|
|
3174
3184
|
rl as LumeStackedBarChart,
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3185
|
+
Er as LumeTooltip,
|
|
3186
|
+
Tr as LumeTooltipItem,
|
|
3187
|
+
yr as LumeTooltipSummary,
|
|
3188
|
+
fr as LumeTooltipTitle,
|
|
3179
3189
|
Ye as OtherColors,
|
|
3180
|
-
|
|
3190
|
+
Dt as SequentialColors
|
|
3181
3191
|
};
|
|
3182
3192
|
//# sourceMappingURL=index.js.map
|