@adyen/lume 1.9.5 → 1.10.1
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/lume-chart.vue.d.ts.map +1 -1
- package/dist/index.js +222 -217
- package/dist/index.js.map +1 -1
- package/dist/scss/_titles.scss +2 -2
- package/dist/scss/_typography.scss +2 -2
- package/dist/scss/_utilities.scss +1 -1
- package/dist/scss/_variables.scss +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +1 -1
- package/dist/scss/components/lume-chart-legend.scss +3 -3
- package/dist/scss/components/lume-chart.scss +1 -1
- package/dist/scss/components/lume-line-group.scss +1 -1
- package/dist/scss/components/lume-tick.scss +3 -3
- package/dist/scss/components/lume-tooltip.scss +13 -10
- package/dist/scss/main.scss +2 -2
- package/dist/scss/variables/_colors.scss +14 -0
- package/dist/scss/variables/_spacing.scss +1 -0
- package/dist/scss/variables/_typography.scss +5 -4
- package/dist/styles/font.css +1 -1
- package/dist/styles/main.css +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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,
|
|
@@ -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 };
|
|
@@ -306,7 +306,7 @@ const Nt = {
|
|
|
306
306
|
/** Formatting string/function for the tick label. */
|
|
307
307
|
tickFormat: null,
|
|
308
308
|
/** Space between the tick label and the axis line. */
|
|
309
|
-
tickPadding:
|
|
309
|
+
tickPadding: 12
|
|
310
310
|
}, xn = {
|
|
311
311
|
...Nt,
|
|
312
312
|
withTitle: !1,
|
|
@@ -316,20 +316,20 @@ const Nt = {
|
|
|
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:
|
|
331
|
+
x: -(s - t.value.step()) / 2,
|
|
332
|
+
width: s,
|
|
333
333
|
height: r.value.tickPadding + wt + me
|
|
334
334
|
};
|
|
335
335
|
}
|
|
@@ -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
|
}
|
|
@@ -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 || nt(a.value)) ? `translate(0, ${((I = o.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && s.value && (!a.value || nt(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
|
)
|
|
@@ -566,8 +566,8 @@ const En = /* @__PURE__ */ H({
|
|
|
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: j, 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() {
|
|
@@ -756,13 +761,13 @@ const jn = /* @__PURE__ */ H({
|
|
|
756
761
|
return xt(() => {
|
|
757
762
|
if (!o.value)
|
|
758
763
|
return;
|
|
759
|
-
const { width:
|
|
760
|
-
if (!
|
|
764
|
+
const { width: s } = i.dimensions, { height: d } = o.value.getBoundingClientRect();
|
|
765
|
+
if (!s || !d)
|
|
761
766
|
return;
|
|
762
|
-
const
|
|
763
|
-
width:
|
|
767
|
+
const c = s - n.value.left - n.value.right, _ = d - n.value.top - n.value.bottom, m = {
|
|
768
|
+
width: c > 0 ? c : 0,
|
|
764
769
|
height: _ > 0 ? _ : 0,
|
|
765
|
-
outerWidth:
|
|
770
|
+
outerWidth: s,
|
|
766
771
|
outerHeight: d
|
|
767
772
|
};
|
|
768
773
|
e("resize", m);
|
|
@@ -811,7 +816,7 @@ var Un = function() {
|
|
|
811
816
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
812
817
|
return n.emit("mouseleave");
|
|
813
818
|
} } }, e._l(e.data, function(a, o) {
|
|
814
|
-
return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--
|
|
819
|
+
return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--caption", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(l) {
|
|
815
820
|
return n.emit("click", { index: o, dataset: a, event: l });
|
|
816
821
|
}, mouseenter: function(l) {
|
|
817
822
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
@@ -823,7 +828,7 @@ var Un = function() {
|
|
|
823
828
|
Xn,
|
|
824
829
|
!1,
|
|
825
830
|
null,
|
|
826
|
-
"
|
|
831
|
+
"6f1d1c44",
|
|
827
832
|
null,
|
|
828
833
|
null
|
|
829
834
|
);
|
|
@@ -926,11 +931,11 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
926
931
|
},
|
|
927
932
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
928
933
|
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),
|
|
934
|
+
const r = t, n = E(null), { items: a, options: o } = B(r), l = M(), i = E(null), { allOptions: u } = K(o), s = v(
|
|
930
935
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
931
936
|
), d = v(
|
|
932
|
-
() =>
|
|
933
|
-
),
|
|
937
|
+
() => s.value ? "fixed" : "absolute"
|
|
938
|
+
), c = v(() => [
|
|
934
939
|
{
|
|
935
940
|
name: "computeStyles",
|
|
936
941
|
options: {
|
|
@@ -957,7 +962,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
957
962
|
r.targetElement && n.value && (i.value = Yt(r.targetElement, n.value, {
|
|
958
963
|
placement: r.position,
|
|
959
964
|
strategy: d.value,
|
|
960
|
-
modifiers:
|
|
965
|
+
modifiers: c.value
|
|
961
966
|
}), e("opened", r.targetElement));
|
|
962
967
|
}
|
|
963
968
|
function x() {
|
|
@@ -973,7 +978,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
973
978
|
async ($, T) => {
|
|
974
979
|
!T && $ ? (await He(), k()) : A();
|
|
975
980
|
}
|
|
976
|
-
), ee(k), kt(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning:
|
|
981
|
+
), ee(k), kt(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: tr, LumeTooltipSummary: lr, LumeTooltipItem: dr };
|
|
977
982
|
}
|
|
978
983
|
});
|
|
979
984
|
var _r = function() {
|
|
@@ -1086,34 +1091,34 @@ function Qe(t, e, r, n, a) {
|
|
|
1086
1091
|
}), l = pn(12), i = v(() => {
|
|
1087
1092
|
var d;
|
|
1088
1093
|
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1089
|
-
(
|
|
1090
|
-
if (Or(
|
|
1091
|
-
return
|
|
1092
|
-
const m = Lr(
|
|
1093
|
-
|
|
1094
|
+
(c, _) => {
|
|
1095
|
+
if (Or(c))
|
|
1096
|
+
return c;
|
|
1097
|
+
const m = Lr(c.values), p = Tr(
|
|
1098
|
+
c.color,
|
|
1094
1099
|
r == null ? void 0 : r.value,
|
|
1095
1100
|
n == null ? void 0 : n.value.colorPalette,
|
|
1096
1101
|
_
|
|
1097
1102
|
);
|
|
1098
1103
|
return {
|
|
1099
|
-
...
|
|
1104
|
+
...c,
|
|
1100
1105
|
values: m,
|
|
1101
1106
|
color: p,
|
|
1102
1107
|
__internal: !0
|
|
1103
1108
|
};
|
|
1104
1109
|
}
|
|
1105
1110
|
);
|
|
1106
|
-
}), u = v(() => Array.isArray(e.value) ? e.value : Ot(t.value).map((d,
|
|
1107
|
-
function
|
|
1108
|
-
const
|
|
1109
|
-
o.width = d.width, o.height =
|
|
1111
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : Ot(t.value).map((d, c) => c));
|
|
1112
|
+
function s(d) {
|
|
1113
|
+
const c = (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;
|
|
1114
|
+
o.width = d.width, o.height = c;
|
|
1110
1115
|
}
|
|
1111
1116
|
return {
|
|
1112
1117
|
chartID: l,
|
|
1113
1118
|
computedLabels: u,
|
|
1114
1119
|
containerSize: o,
|
|
1115
1120
|
internalData: i,
|
|
1116
|
-
updateSize:
|
|
1121
|
+
updateSize: s
|
|
1117
1122
|
};
|
|
1118
1123
|
}
|
|
1119
1124
|
const $r = () => ({
|
|
@@ -1129,16 +1134,16 @@ const $r = () => ({
|
|
|
1129
1134
|
function Ir(t, e, r, n, a) {
|
|
1130
1135
|
const o = E(null), l = E(null);
|
|
1131
1136
|
function i() {
|
|
1132
|
-
var d,
|
|
1133
|
-
const { width: u, height:
|
|
1134
|
-
!u && !
|
|
1137
|
+
var d, c, _, m;
|
|
1138
|
+
const { width: u, height: s } = r;
|
|
1139
|
+
!u && !s || (n.value === L.HORIZONTAL ? (o.value = (d = t.value) != null && d.length ? ut(
|
|
1135
1140
|
t.value,
|
|
1136
1141
|
u,
|
|
1137
1142
|
n.value,
|
|
1138
1143
|
a.value.startOnZero
|
|
1139
|
-
) : null, l.value = (
|
|
1144
|
+
) : null, l.value = (c = e.value) != null && c.length ? lt(
|
|
1140
1145
|
e.value,
|
|
1141
|
-
|
|
1146
|
+
s,
|
|
1142
1147
|
n.value,
|
|
1143
1148
|
a.value
|
|
1144
1149
|
) : null) : (o.value = (_ = e.value) != null && _.length ? lt(
|
|
@@ -1148,7 +1153,7 @@ function Ir(t, e, r, n, a) {
|
|
|
1148
1153
|
a.value
|
|
1149
1154
|
) : null, l.value = (m = t.value) != null && m.length ? ut(
|
|
1150
1155
|
t.value,
|
|
1151
|
-
|
|
1156
|
+
s,
|
|
1152
1157
|
n.value,
|
|
1153
1158
|
a.value.startOnZero
|
|
1154
1159
|
) : null));
|
|
@@ -1158,7 +1163,7 @@ function Ir(t, e, r, n, a) {
|
|
|
1158
1163
|
function lt(t, e, r, n) {
|
|
1159
1164
|
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? Et : It);
|
|
1160
1165
|
return Object.assign(
|
|
1161
|
-
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((
|
|
1166
|
+
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
|
|
1162
1167
|
{ labels: t }
|
|
1163
1168
|
);
|
|
1164
1169
|
}
|
|
@@ -1166,8 +1171,8 @@ function ut(t, e, r, n) {
|
|
|
1166
1171
|
const a = Tt(t).filter((d) => d != null), o = [0, e];
|
|
1167
1172
|
if (a.length === 0)
|
|
1168
1173
|
return fe().range(o).domain([0, 0]).nice();
|
|
1169
|
-
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a),
|
|
1170
|
-
return fe().range(o).domain(
|
|
1174
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1175
|
+
return fe().range(o).domain(s).nice();
|
|
1171
1176
|
}
|
|
1172
1177
|
function it(t) {
|
|
1173
1178
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
@@ -1266,9 +1271,9 @@ const ce = (t, e = !0) => ({
|
|
|
1266
1271
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1267
1272
|
setup(t, { emit: e }) {
|
|
1268
1273
|
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() => Ot(n));
|
|
1269
|
-
function u(
|
|
1274
|
+
function u(s) {
|
|
1270
1275
|
var y;
|
|
1271
|
-
const d = a.value === L.HORIZONTAL ? l.value : o.value,
|
|
1276
|
+
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
1277
|
return a.value === L.HORIZONTAL ? {
|
|
1273
1278
|
width: Math.max(...o.value.range()),
|
|
1274
1279
|
height: _,
|
|
@@ -1301,7 +1306,7 @@ var Nr = function() {
|
|
|
1301
1306
|
null,
|
|
1302
1307
|
null
|
|
1303
1308
|
);
|
|
1304
|
-
const
|
|
1309
|
+
const Sr = Dr.exports, Rr = [
|
|
1305
1310
|
"axis-click",
|
|
1306
1311
|
"axis-mouseenter",
|
|
1307
1312
|
"axis-mouseleave",
|
|
@@ -1343,7 +1348,7 @@ const Rr = Dr.exports, Sr = [
|
|
|
1343
1348
|
(i) => l(...i.detail)
|
|
1344
1349
|
);
|
|
1345
1350
|
}
|
|
1346
|
-
return { componentEventPropagator:
|
|
1351
|
+
return { componentEventPropagator: Rr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1347
1352
|
};
|
|
1348
1353
|
function Cr(t) {
|
|
1349
1354
|
return { hasNegativeValues: v(
|
|
@@ -1355,18 +1360,18 @@ function Pr(t, e, r, n) {
|
|
|
1355
1360
|
() => n.value === L.HORIZONTAL
|
|
1356
1361
|
), o = v(
|
|
1357
1362
|
() => {
|
|
1358
|
-
var
|
|
1359
|
-
return t.height - (a != null && a.value ? 0 : ((
|
|
1363
|
+
var s;
|
|
1364
|
+
return t.height - (a != null && a.value ? 0 : ((s = r.value) == null ? void 0 : s.call(r, 0)) || 0);
|
|
1360
1365
|
}
|
|
1361
1366
|
), l = v(
|
|
1362
1367
|
() => {
|
|
1363
|
-
var
|
|
1364
|
-
return a != null && a.value ? ((
|
|
1368
|
+
var s;
|
|
1369
|
+
return a != null && a.value ? ((s = e.value) == null ? void 0 : s.call(e, 0)) || 0 : t.width;
|
|
1365
1370
|
}
|
|
1366
1371
|
), i = v(
|
|
1367
1372
|
() => {
|
|
1368
|
-
var
|
|
1369
|
-
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((
|
|
1373
|
+
var s;
|
|
1374
|
+
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = r.value) == null ? void 0 : s.call(r, 0)) || 0})`;
|
|
1370
1375
|
}
|
|
1371
1376
|
);
|
|
1372
1377
|
return { negativeBarAttributes: v(() => ({
|
|
@@ -1391,19 +1396,19 @@ function Gr(t, e) {
|
|
|
1391
1396
|
const ct = {
|
|
1392
1397
|
"stacked-bar": Gr
|
|
1393
1398
|
};
|
|
1394
|
-
function
|
|
1399
|
+
function St(t, e, r, n, a, o, l, i) {
|
|
1395
1400
|
const u = v(
|
|
1396
1401
|
() => {
|
|
1397
1402
|
var d;
|
|
1398
1403
|
return e.value.withTooltip !== !1 && !((d = e.value.tooltipOptions) != null && d.targetElement);
|
|
1399
1404
|
}
|
|
1400
1405
|
);
|
|
1401
|
-
function
|
|
1406
|
+
function s(d) {
|
|
1402
1407
|
var m;
|
|
1403
|
-
const
|
|
1408
|
+
const c = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && ct[i.value] ? ct[i.value](
|
|
1404
1409
|
d,
|
|
1405
|
-
|
|
1406
|
-
) : Br(d,
|
|
1410
|
+
c
|
|
1411
|
+
) : Br(d, c);
|
|
1407
1412
|
t.value = _.map((p, h) => ({
|
|
1408
1413
|
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) : Ce(r.value, h),
|
|
1409
1414
|
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(p)
|
|
@@ -1412,10 +1417,10 @@ function Rt(t, e, r, n, a, o, l, i) {
|
|
|
1412
1417
|
return D(
|
|
1413
1418
|
[r, n],
|
|
1414
1419
|
() => {
|
|
1415
|
-
r.value && n.value && (l != null && l.value) && u.value &&
|
|
1420
|
+
r.value && n.value && (l != null && l.value) && u.value && s(l.value);
|
|
1416
1421
|
},
|
|
1417
1422
|
{ immediate: !0 }
|
|
1418
|
-
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes:
|
|
1423
|
+
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: s };
|
|
1419
1424
|
}
|
|
1420
1425
|
function Fr() {
|
|
1421
1426
|
const t = Oe({
|
|
@@ -1476,7 +1481,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1476
1481
|
}
|
|
1477
1482
|
},
|
|
1478
1483
|
setup(t, { emit: e }) {
|
|
1479
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType:
|
|
1484
|
+
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 } = Ir(
|
|
1480
1485
|
k,
|
|
1481
1486
|
x,
|
|
1482
1487
|
A,
|
|
@@ -1489,7 +1494,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1489
1494
|
left: Wr(f.value.margins, y.value)
|
|
1490
1495
|
})), j = v(() => {
|
|
1491
1496
|
var b;
|
|
1492
|
-
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) :
|
|
1497
|
+
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
1493
1498
|
}), W = v(() => {
|
|
1494
1499
|
var b;
|
|
1495
1500
|
return r.yScale ? it(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : C.value;
|
|
@@ -1521,7 +1526,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1521
1526
|
j,
|
|
1522
1527
|
W,
|
|
1523
1528
|
u
|
|
1524
|
-
), { shouldGenerateTooltipAnchors: et } =
|
|
1529
|
+
), { shouldGenerateTooltipAnchors: et } = St(
|
|
1525
1530
|
m,
|
|
1526
1531
|
f,
|
|
1527
1532
|
j,
|
|
@@ -1529,7 +1534,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1529
1534
|
o,
|
|
1530
1535
|
u,
|
|
1531
1536
|
k,
|
|
1532
|
-
|
|
1537
|
+
s
|
|
1533
1538
|
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } = jr(k), ue = v(
|
|
1534
1539
|
() => {
|
|
1535
1540
|
var b;
|
|
@@ -1542,11 +1547,11 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1542
1547
|
});
|
|
1543
1548
|
function be(b) {
|
|
1544
1549
|
var V;
|
|
1545
|
-
if (b === d.value)
|
|
1550
|
+
if (f.value.withHover === !1 || b === d.value)
|
|
1546
1551
|
return;
|
|
1547
1552
|
const P = d.value;
|
|
1548
|
-
if (
|
|
1549
|
-
const Mt = (V = f.value.tooltipOptions) != null && V.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement :
|
|
1553
|
+
if (d.value = b, f.value.withTooltip !== !1) {
|
|
1554
|
+
const Mt = (V = f.value.tooltipOptions) != null && V.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : c.value[b];
|
|
1550
1555
|
ge(Mt);
|
|
1551
1556
|
}
|
|
1552
1557
|
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
@@ -1592,8 +1597,8 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1592
1597
|
), D(p, (b) => {
|
|
1593
1598
|
b === !1 && ve.opened && ke();
|
|
1594
1599
|
}), 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:
|
|
1600
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), S("lume__internal--hover", be);
|
|
1601
|
+
}), 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: j, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: I, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: et, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: tt, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: Ee, handleMouseleave: Gt, handleResize: Ft, handleAxisMouseenter: jt, handleAxisClick: Vt, LumeAxis: Dn, LumeBar: Ue, LumeChartContainer: Wn, LumeChartLegend: Kn, LumeTooltip: mr, LumeOverlayGroup: Sr, TOOLTIP_ANCHOR_RADIUS: bn };
|
|
1597
1602
|
}
|
|
1598
1603
|
});
|
|
1599
1604
|
var Ur = function() {
|
|
@@ -1603,7 +1608,7 @@ var Ur = function() {
|
|
|
1603
1608
|
}, mouseenter: function(a) {
|
|
1604
1609
|
return n.emit("chart-mouseenter", a);
|
|
1605
1610
|
}, mouseleave: n.handleMouseleave }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
1606
|
-
return [r("div", { staticClass: "lume-chart__header" }, [r("div", { staticClass: "lume-chart__header-section" }, [e.title ? r("h1", { staticClass: "lume-chart__title lume-chart-title lume-typography--display" }, [e._v(" " + e._s(e.title) + " ")]) : e._e(), r("div", { staticClass: "lume-chart__controls" }, [e._t("controls")], 2)]), r("div", { staticClass: "lume-chart__header-section" }, [n.showYAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-axis-title lume-typography--
|
|
1611
|
+
return [r("div", { staticClass: "lume-chart__header" }, [r("div", { staticClass: "lume-chart__header-section" }, [e.title ? r("h1", { staticClass: "lume-chart__title lume-chart-title lume-typography--display" }, [e._v(" " + e._s(e.title) + " ")]) : e._e(), r("div", { staticClass: "lume-chart__controls" }, [e._t("controls")], 2)]), r("div", { staticClass: "lume-chart__header-section" }, [n.showYAxisTitle ? r("h3", { staticClass: "lume-chart__axis-title lume-axis-title lume-typography--caption" }, [e._v(" " + e._s(n.yAxisTitle) + " ")]) : e._e(), e._t("legend", function() {
|
|
1607
1612
|
return [n.allOptions.withLegend !== !1 && n.allOptions.legendPosition !== "bottom" ? r(n.LumeChartLegend, { staticClass: "lume-chart__legend", attrs: { data: n.internalData, "data-j-lume-chart__legend": "" }, on: { click: function(a) {
|
|
1608
1613
|
return n.emit("legend-click", a);
|
|
1609
1614
|
}, mouseenter: function(a) {
|
|
@@ -1659,7 +1664,7 @@ var Ur = function() {
|
|
|
1659
1664
|
Xr,
|
|
1660
1665
|
!1,
|
|
1661
1666
|
null,
|
|
1662
|
-
"
|
|
1667
|
+
"4eac6847",
|
|
1663
1668
|
null,
|
|
1664
1669
|
null
|
|
1665
1670
|
);
|
|
@@ -1678,8 +1683,8 @@ const de = Yr.exports, dt = 8, Kr = 8, Jr = 20, se = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1678
1683
|
async ([l, i]) => {
|
|
1679
1684
|
if (l && i) {
|
|
1680
1685
|
a.value = i, await He();
|
|
1681
|
-
const { width: u, height:
|
|
1682
|
-
a.value = u + vt > i ? i : u + vt, o.value = Math.ceil(
|
|
1686
|
+
const { width: u, height: s } = l.getBoundingClientRect();
|
|
1687
|
+
a.value = u + vt > i ? i : u + vt, o.value = Math.ceil(s);
|
|
1683
1688
|
}
|
|
1684
1689
|
},
|
|
1685
1690
|
{ immediate: !0 }
|
|
@@ -1782,7 +1787,7 @@ function ma(t, e) {
|
|
|
1782
1787
|
function ha(t, e) {
|
|
1783
1788
|
return e.links.find((r) => r.id === t);
|
|
1784
1789
|
}
|
|
1785
|
-
function
|
|
1790
|
+
function Rt(t) {
|
|
1786
1791
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1787
1792
|
}
|
|
1788
1793
|
function ga(t, e) {
|
|
@@ -1849,11 +1854,11 @@ function ft(t, e, r, n, a) {
|
|
|
1849
1854
|
return;
|
|
1850
1855
|
}
|
|
1851
1856
|
const o = Date.now(), l = vn(e, r), i = () => {
|
|
1852
|
-
let
|
|
1853
|
-
|
|
1857
|
+
let s = (Date.now() - o) / pa;
|
|
1858
|
+
s > 1 && (s = 1), t.node = {
|
|
1854
1859
|
...t.node,
|
|
1855
|
-
transitionValue: a &&
|
|
1856
|
-
},
|
|
1860
|
+
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
1861
|
+
}, s < 1 && requestAnimationFrame(i);
|
|
1857
1862
|
};
|
|
1858
1863
|
requestAnimationFrame(i);
|
|
1859
1864
|
}
|
|
@@ -1866,8 +1871,8 @@ function pt(t, e) {
|
|
|
1866
1871
|
}
|
|
1867
1872
|
function La(t, e, r) {
|
|
1868
1873
|
const n = E(null), a = v(() => {
|
|
1869
|
-
var
|
|
1870
|
-
return (_ = (
|
|
1874
|
+
var c, _;
|
|
1875
|
+
return (_ = (c = t.value) == null ? void 0 : c[0]) == null ? void 0 : _.values.map(
|
|
1871
1876
|
({ label: m, color: p, value: h, deriveColorFromIncomingLinks: y, offset: f }) => ({
|
|
1872
1877
|
label: m || h.toString(),
|
|
1873
1878
|
color: p,
|
|
@@ -1879,8 +1884,8 @@ function La(t, e, r) {
|
|
|
1879
1884
|
);
|
|
1880
1885
|
}), o = v(
|
|
1881
1886
|
() => {
|
|
1882
|
-
var
|
|
1883
|
-
return (_ = (
|
|
1887
|
+
var c, _;
|
|
1888
|
+
return (_ = (c = t.value) == null ? void 0 : c[0]) == null ? void 0 : _.values.map(
|
|
1884
1889
|
(m) => {
|
|
1885
1890
|
var p;
|
|
1886
1891
|
return (p = m.targets) == null ? void 0 : p.map(
|
|
@@ -1897,8 +1902,8 @@ function La(t, e, r) {
|
|
|
1897
1902
|
).filter(Boolean).flat();
|
|
1898
1903
|
}
|
|
1899
1904
|
), 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 (
|
|
1905
|
+
var c;
|
|
1906
|
+
return (c = n.value) == null ? void 0 : c.nodes.reduce(
|
|
1902
1907
|
(_, m) => {
|
|
1903
1908
|
const p = pt(m, _);
|
|
1904
1909
|
return p ? (p.push(m), p.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
@@ -1906,15 +1911,15 @@ function La(t, e, r) {
|
|
|
1906
1911
|
[]
|
|
1907
1912
|
);
|
|
1908
1913
|
});
|
|
1909
|
-
function u(
|
|
1910
|
-
const { offset: _ } =
|
|
1914
|
+
function u(c) {
|
|
1915
|
+
const { offset: _ } = c, m = pt(c, i.value);
|
|
1911
1916
|
if (!m)
|
|
1912
1917
|
return;
|
|
1913
|
-
const p = m[m.findIndex((y) => y.id ===
|
|
1914
|
-
|
|
1918
|
+
const p = m[m.findIndex((y) => y.id === c.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
1919
|
+
c._y0 = c.y0, c._y1 = c.y1, c.y0 = h, c.y1 = c.y0 + (c._y1 - c._y0);
|
|
1915
1920
|
}
|
|
1916
|
-
function c
|
|
1917
|
-
const { id: m, _y0: p, y0: h } =
|
|
1921
|
+
function s(c, _) {
|
|
1922
|
+
const { id: m, _y0: p, y0: h } = c, y = _.links.filter(
|
|
1918
1923
|
(x) => x.source.id === m
|
|
1919
1924
|
), f = _.links.filter(
|
|
1920
1925
|
(x) => x.target.id === m
|
|
@@ -1922,20 +1927,20 @@ function La(t, e, r) {
|
|
|
1922
1927
|
y.forEach((x) => x.y0 += k), f.forEach((x) => x.y1 += k);
|
|
1923
1928
|
}
|
|
1924
1929
|
const d = v(() => {
|
|
1925
|
-
var
|
|
1926
|
-
return n.value && ((
|
|
1927
|
-
_.value === 0 && (_.fallbackColor = Ye.Grey), typeof _.offset == "number" && (u(_),
|
|
1930
|
+
var c;
|
|
1931
|
+
return n.value && ((c = a.value) == null || c.forEach((_) => {
|
|
1932
|
+
_.value === 0 && (_.fallbackColor = Ye.Grey), typeof _.offset == "number" && (u(_), s(_, n.value));
|
|
1928
1933
|
})), n.value;
|
|
1929
1934
|
});
|
|
1930
1935
|
return D([l, r], () => {
|
|
1931
1936
|
try {
|
|
1932
|
-
const { x0:
|
|
1937
|
+
const { x0: c, y0: _, x1: m, y1: p } = r.value;
|
|
1933
1938
|
n.value = l.value.extent([
|
|
1934
|
-
[
|
|
1939
|
+
[c, _],
|
|
1935
1940
|
[m, p]
|
|
1936
1941
|
])({ nodes: a.value, links: o.value });
|
|
1937
|
-
} catch (
|
|
1938
|
-
je(Te.GraphProblem,
|
|
1942
|
+
} catch (c) {
|
|
1943
|
+
je(Te.GraphProblem, c), n.value = Ta;
|
|
1939
1944
|
}
|
|
1940
1945
|
}), { columns: i, graph: d };
|
|
1941
1946
|
}
|
|
@@ -1960,7 +1965,7 @@ function Oa(t, e) {
|
|
|
1960
1965
|
}
|
|
1961
1966
|
const $a = (t, e) => {
|
|
1962
1967
|
let r;
|
|
1963
|
-
|
|
1968
|
+
Rt(t) ? r = {
|
|
1964
1969
|
[t.id]: t.value,
|
|
1965
1970
|
...Ve(t),
|
|
1966
1971
|
...Me(t)
|
|
@@ -1973,7 +1978,7 @@ const $a = (t, e) => {
|
|
|
1973
1978
|
const n = Oa(r, e);
|
|
1974
1979
|
return { nodes: r, links: n };
|
|
1975
1980
|
}, Ia = (t) => {
|
|
1976
|
-
if (
|
|
1981
|
+
if (Rt(t)) {
|
|
1977
1982
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1978
1983
|
return {
|
|
1979
1984
|
nodes: e.reduce(
|
|
@@ -2030,13 +2035,13 @@ const wa = /* @__PURE__ */ H({
|
|
|
2030
2035
|
},
|
|
2031
2036
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2032
2037
|
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:
|
|
2038
|
+
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
2039
|
l,
|
|
2035
2040
|
o,
|
|
2036
2041
|
_
|
|
2037
2042
|
), h = v(() => Ae(o.value.valueFormat)), y = v(
|
|
2038
2043
|
() => Object.keys(p.value.nodes)
|
|
2039
|
-
), f = v(() =>
|
|
2044
|
+
), f = v(() => c.value ? c.value.map(
|
|
2040
2045
|
(g) => g[0].x0 + o.value.nodeWidth / 2
|
|
2041
2046
|
) : []), k = v(() => {
|
|
2042
2047
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
@@ -2083,10 +2088,10 @@ const wa = /* @__PURE__ */ H({
|
|
|
2083
2088
|
function T(g) {
|
|
2084
2089
|
return o.value.gradient && `url('#${n}_${g.id}')`;
|
|
2085
2090
|
}
|
|
2086
|
-
function
|
|
2091
|
+
function S(g) {
|
|
2087
2092
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2088
2093
|
}
|
|
2089
|
-
function
|
|
2094
|
+
function R(g) {
|
|
2090
2095
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2091
2096
|
}
|
|
2092
2097
|
function C(g) {
|
|
@@ -2129,7 +2134,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2129
2134
|
l.value = ya(g.nodes), i.value = Aa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2130
2135
|
}), D([r.containerSize, u], () => {
|
|
2131
2136
|
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:
|
|
2137
|
+
}), 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: j, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: I, LumeAlluvialNodeLabel: na, LumeAlluvialNodeValue: ua, LumeAlluvialNodeHeader: va, GHOST_STROKE_WIDTH_OFFSET: Kr };
|
|
2133
2138
|
}
|
|
2134
2139
|
});
|
|
2135
2140
|
var Na = function() {
|
|
@@ -2196,7 +2201,7 @@ var Na = function() {
|
|
|
2196
2201
|
null,
|
|
2197
2202
|
null
|
|
2198
2203
|
);
|
|
2199
|
-
const
|
|
2204
|
+
const Sa = Da.exports, Ra = {
|
|
2200
2205
|
margins: {
|
|
2201
2206
|
top: 0,
|
|
2202
2207
|
right: 0,
|
|
@@ -2221,15 +2226,15 @@ const Ra = Da.exports, Sa = {
|
|
|
2221
2226
|
...Er(We)
|
|
2222
2227
|
},
|
|
2223
2228
|
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(
|
|
2229
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = fn(M()), { options: l } = B(r), { allOptions: i } = K(l, Ra);
|
|
2230
|
+
function u(s) {
|
|
2226
2231
|
return {
|
|
2227
|
-
...
|
|
2232
|
+
...s,
|
|
2228
2233
|
noBaseScales: !0
|
|
2229
2234
|
// Alluvial chart never uses base scales
|
|
2230
2235
|
};
|
|
2231
2236
|
}
|
|
2232
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup:
|
|
2237
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup: Sa };
|
|
2233
2238
|
}
|
|
2234
2239
|
});
|
|
2235
2240
|
var Pa = function() {
|
|
@@ -2279,13 +2284,13 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2279
2284
|
["grouped", a],
|
|
2280
2285
|
["stacked", o]
|
|
2281
2286
|
]), { componentEventPropagator: i } = J(e), u = oe(M());
|
|
2282
|
-
function c
|
|
2287
|
+
function s(c) {
|
|
2283
2288
|
return {
|
|
2284
|
-
...
|
|
2289
|
+
...c,
|
|
2285
2290
|
startOnZero: !0,
|
|
2286
2291
|
// Bar chart always starts on zero,
|
|
2287
2292
|
tooltipOptions: {
|
|
2288
|
-
...(
|
|
2293
|
+
...(c == null ? void 0 : c.tooltipOptions) || {},
|
|
2289
2294
|
position: r.orientation === L.HORIZONTAL ? "right" : void 0
|
|
2290
2295
|
}
|
|
2291
2296
|
};
|
|
@@ -2297,7 +2302,7 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2297
2302
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2298
2303
|
return l.get(r.type);
|
|
2299
2304
|
});
|
|
2300
|
-
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions:
|
|
2305
|
+
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
2306
|
}
|
|
2302
2307
|
});
|
|
2303
2308
|
var ja = function() {
|
|
@@ -2382,20 +2387,20 @@ function Ka(t, e, r, n, a, o) {
|
|
|
2382
2387
|
const l = v(
|
|
2383
2388
|
() => n.value === L.HORIZONTAL
|
|
2384
2389
|
);
|
|
2385
|
-
function i(
|
|
2390
|
+
function i(c, _) {
|
|
2386
2391
|
let m, p;
|
|
2387
|
-
return l.value ? (m =
|
|
2392
|
+
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
2393
|
}
|
|
2389
|
-
function u(
|
|
2390
|
-
return l.value ?
|
|
2394
|
+
function u(c) {
|
|
2395
|
+
return l.value ? c < 0 ? e.value(0) - e.value(c) : e.value(c) - e.value(0) : e.value.bandwidth();
|
|
2391
2396
|
}
|
|
2392
|
-
function c
|
|
2393
|
-
return l.value ? r.value.bandwidth() :
|
|
2397
|
+
function s(c) {
|
|
2398
|
+
return l.value ? r.value.bandwidth() : c < 0 ? r.value(c) - r.value(0) : r.value(0) - r.value(c);
|
|
2394
2399
|
}
|
|
2395
|
-
function d(
|
|
2400
|
+
function d(c, _, m) {
|
|
2396
2401
|
if (!(e.value && r.value))
|
|
2397
2402
|
return Ya;
|
|
2398
|
-
const { value: h, color: y } =
|
|
2403
|
+
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
2404
|
return {
|
|
2400
2405
|
classList: [`lume-fill--${f}`, ...o],
|
|
2401
2406
|
x: k,
|
|
@@ -2418,7 +2423,7 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2418
2423
|
const l = v(
|
|
2419
2424
|
() => n.value === L.HORIZONTAL
|
|
2420
2425
|
), 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
|
|
2426
|
+
function s(p, h, y) {
|
|
2422
2427
|
if (l.value)
|
|
2423
2428
|
return p >= 0 ? e.value(0) : e.value(p);
|
|
2424
2429
|
const f = e.value.domain();
|
|
@@ -2431,7 +2436,7 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2431
2436
|
}
|
|
2432
2437
|
return p < 0 ? r.value(0) : r.value(p);
|
|
2433
2438
|
}
|
|
2434
|
-
function
|
|
2439
|
+
function c(p) {
|
|
2435
2440
|
return l.value ? p < 0 ? e.value(0) - e.value(p) : e.value(p) - e.value(0) : i.value.bandwidth();
|
|
2436
2441
|
}
|
|
2437
2442
|
function _(p) {
|
|
@@ -2440,13 +2445,13 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2440
2445
|
function m(p, h, y) {
|
|
2441
2446
|
if (!(e.value && r.value))
|
|
2442
2447
|
return Ja;
|
|
2443
|
-
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], $ =
|
|
2448
|
+
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
2449
|
return {
|
|
2445
2450
|
classList: [`lume-fill--${A}`, ...o],
|
|
2446
2451
|
x: $,
|
|
2447
2452
|
y: T,
|
|
2448
|
-
width:
|
|
2449
|
-
height:
|
|
2453
|
+
width: S,
|
|
2454
|
+
height: R,
|
|
2450
2455
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2451
2456
|
isNegative: k < 0
|
|
2452
2457
|
};
|
|
@@ -2458,36 +2463,36 @@ function qa(t, e, r) {
|
|
|
2458
2463
|
() => e.value === L.HORIZONTAL
|
|
2459
2464
|
), a = v(() => {
|
|
2460
2465
|
const u = t.value.map(
|
|
2461
|
-
(
|
|
2466
|
+
(s) => s.filter((d) => d.value < 0).reduce((d, c) => d + c.value, 0)
|
|
2462
2467
|
);
|
|
2463
2468
|
return Math.min(...u);
|
|
2464
2469
|
}), o = v(() => {
|
|
2465
2470
|
const u = t.value.map(
|
|
2466
|
-
(
|
|
2467
|
-
(d,
|
|
2471
|
+
(s) => s.reduce(
|
|
2472
|
+
(d, c) => c.value >= 0 ? d + c.value : d,
|
|
2468
2473
|
0
|
|
2469
2474
|
)
|
|
2470
2475
|
);
|
|
2471
2476
|
return Math.max(...u);
|
|
2472
2477
|
});
|
|
2473
|
-
function l(u,
|
|
2474
|
-
return
|
|
2478
|
+
function l(u, s, d) {
|
|
2479
|
+
return s.length ? n.value ? fe().domain([a.value, o.value]).range([0, d.width]) : Object.assign(
|
|
2475
2480
|
st(
|
|
2476
|
-
_e().domain(
|
|
2481
|
+
_e().domain(s.map((c, _) => _)).range([0, d.width]),
|
|
2477
2482
|
e.value,
|
|
2478
2483
|
r.value
|
|
2479
2484
|
),
|
|
2480
|
-
{ labels:
|
|
2485
|
+
{ labels: s }
|
|
2481
2486
|
) : null;
|
|
2482
2487
|
}
|
|
2483
|
-
function i(u,
|
|
2484
|
-
return
|
|
2488
|
+
function i(u, s, d) {
|
|
2489
|
+
return s.length ? n.value ? Object.assign(
|
|
2485
2490
|
st(
|
|
2486
|
-
_e().domain(
|
|
2491
|
+
_e().domain(s.map((c, _) => _)).range([0, d.height]),
|
|
2487
2492
|
e.value,
|
|
2488
2493
|
r.value
|
|
2489
2494
|
),
|
|
2490
|
-
{ labels:
|
|
2495
|
+
{ labels: s }
|
|
2491
2496
|
) : fe().domain([o.value, a.value]).range([0, d.height]) : null;
|
|
2492
2497
|
}
|
|
2493
2498
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
@@ -2500,14 +2505,14 @@ function eo(t, e, r, n, a, o) {
|
|
|
2500
2505
|
), u = v(
|
|
2501
2506
|
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2502
2507
|
);
|
|
2503
|
-
function
|
|
2508
|
+
function s(f, k, x) {
|
|
2504
2509
|
let A, $;
|
|
2505
2510
|
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
2511
|
}
|
|
2507
2512
|
function d(f) {
|
|
2508
2513
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2509
2514
|
}
|
|
2510
|
-
function
|
|
2515
|
+
function c(f) {
|
|
2511
2516
|
return l.value ? e.value(0) - e.value(f) : e.value.bandwidth();
|
|
2512
2517
|
}
|
|
2513
2518
|
function _(f) {
|
|
@@ -2523,11 +2528,11 @@ function eo(t, e, r, n, a, o) {
|
|
|
2523
2528
|
return f ? u.value.reduce((x, A, $) => ($ < f && A[k] < 0 && (x += A[k]), x), 0) : 0;
|
|
2524
2529
|
}
|
|
2525
2530
|
function y(f, k, x) {
|
|
2526
|
-
const { value: A, color: $ } = f, T = A >= 0 ? d(A) :
|
|
2531
|
+
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
2532
|
return {
|
|
2528
2533
|
classList: [`lume-fill--${$ ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2529
2534
|
width: T,
|
|
2530
|
-
height:
|
|
2535
|
+
height: S,
|
|
2531
2536
|
x: C,
|
|
2532
2537
|
y: F,
|
|
2533
2538
|
isFaded: a.value !== -1 && a.value !== x,
|
|
@@ -2563,10 +2568,10 @@ const mt = {
|
|
|
2563
2568
|
transition: l,
|
|
2564
2569
|
type: i,
|
|
2565
2570
|
xScale: u,
|
|
2566
|
-
yScale:
|
|
2571
|
+
yScale: s,
|
|
2567
2572
|
classList: d,
|
|
2568
|
-
labels:
|
|
2569
|
-
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Ct(n,
|
|
2573
|
+
labels: c
|
|
2574
|
+
} = 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(() => {
|
|
2570
2575
|
const $ = Ua(n, i), { barAttributeGenerator: T } = mt[$](
|
|
2571
2576
|
n,
|
|
2572
2577
|
h,
|
|
@@ -2583,7 +2588,7 @@ const mt = {
|
|
|
2583
2588
|
async function A($) {
|
|
2584
2589
|
e("lume__internal--hover", $), m("lume__internal--hover", $);
|
|
2585
2590
|
}
|
|
2586
|
-
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale:
|
|
2591
|
+
return { __sfc: !0, MIXIN_MAP: mt, 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
2592
|
}
|
|
2588
2593
|
});
|
|
2589
2594
|
var no = function() {
|
|
@@ -2726,18 +2731,18 @@ const nl = po.exports, mo = {
|
|
|
2726
2731
|
...ce()
|
|
2727
2732
|
},
|
|
2728
2733
|
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),
|
|
2734
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { data: o, orientation: l, options: i, labels: u } = B(r), s = v(
|
|
2730
2735
|
() => mo[l.value || L.VERTICAL]
|
|
2731
2736
|
// needs to be computed so that default options are reactive
|
|
2732
2737
|
), { allOptions: d } = K(
|
|
2733
2738
|
i,
|
|
2734
|
-
|
|
2735
|
-
), { internalData:
|
|
2739
|
+
s
|
|
2740
|
+
), { internalData: c } = Qe(o), { groupedData: _ } = Ct(c, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = qa(
|
|
2736
2741
|
_,
|
|
2737
2742
|
l,
|
|
2738
2743
|
i
|
|
2739
2744
|
), 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:
|
|
2745
|
+
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: qe };
|
|
2741
2746
|
}
|
|
2742
2747
|
});
|
|
2743
2748
|
var go = function() {
|
|
@@ -2862,11 +2867,11 @@ const wo = Eo.exports;
|
|
|
2862
2867
|
function Pt(t) {
|
|
2863
2868
|
function e(o) {
|
|
2864
2869
|
let l = null;
|
|
2865
|
-
return o == null ? void 0 : o.reduce((i, u,
|
|
2870
|
+
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
2871
|
}
|
|
2867
2872
|
function r(o, l, i, u) {
|
|
2868
|
-
const
|
|
2869
|
-
return o == null && l == null ? null : o > l ? o -
|
|
2873
|
+
const c = Math.abs(o - l) / (i + 1) * (u + 1);
|
|
2874
|
+
return o == null && l == null ? null : o > l ? o - c : o + c;
|
|
2870
2875
|
}
|
|
2871
2876
|
function n(o) {
|
|
2872
2877
|
return function(i) {
|
|
@@ -2881,19 +2886,19 @@ function Pt(t) {
|
|
|
2881
2886
|
...o,
|
|
2882
2887
|
isDashed: n(l),
|
|
2883
2888
|
values: o.values.map((i, u) => {
|
|
2884
|
-
var d,
|
|
2885
|
-
const
|
|
2889
|
+
var d, c;
|
|
2890
|
+
const s = l.find(
|
|
2886
2891
|
(_) => _.includes(u)
|
|
2887
2892
|
);
|
|
2888
|
-
if (
|
|
2889
|
-
const _ =
|
|
2890
|
-
let p = (d = o.values[_]) == null ? void 0 : d.value, h = (
|
|
2893
|
+
if (s) {
|
|
2894
|
+
const _ = s[0] - 1, m = s[s.length - 1] + 1;
|
|
2895
|
+
let p = (d = o.values[_]) == null ? void 0 : d.value, h = (c = o.values[m]) == null ? void 0 : c.value;
|
|
2891
2896
|
return p == null && (p = h), h == null && (h = p), {
|
|
2892
2897
|
value: r(
|
|
2893
2898
|
p,
|
|
2894
2899
|
h,
|
|
2895
|
-
|
|
2896
|
-
|
|
2900
|
+
s.length,
|
|
2901
|
+
s.indexOf(u)
|
|
2897
2902
|
),
|
|
2898
2903
|
label: $t
|
|
2899
2904
|
};
|
|
@@ -2916,7 +2921,7 @@ function Do(t, e, r, n) {
|
|
|
2916
2921
|
).y((o) => n(o));
|
|
2917
2922
|
return e.every((o) => o == null) ? null : a(e);
|
|
2918
2923
|
}
|
|
2919
|
-
const yt = 1,
|
|
2924
|
+
const yt = 1, So = /* @__PURE__ */ H({
|
|
2920
2925
|
__name: "lume-line-group",
|
|
2921
2926
|
props: {
|
|
2922
2927
|
...Ie(),
|
|
@@ -2934,18 +2939,18 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2934
2939
|
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = B(r), u = Le(
|
|
2935
2940
|
"tooltipAnchorAttributes",
|
|
2936
2941
|
null
|
|
2937
|
-
), { updateTooltipAnchorAttributes:
|
|
2942
|
+
), { updateTooltipAnchorAttributes: s } = St(
|
|
2938
2943
|
u,
|
|
2939
2944
|
a,
|
|
2940
2945
|
o,
|
|
2941
2946
|
l,
|
|
2942
2947
|
i
|
|
2943
2948
|
), d = v(() => {
|
|
2944
|
-
if (n.value.every((
|
|
2949
|
+
if (n.value.every((S) => S.isDashed))
|
|
2945
2950
|
return n.value;
|
|
2946
2951
|
const { computedLineData: T } = Pt(n);
|
|
2947
|
-
return a.value.withTooltip !== !1 && (u != null && u.value) &&
|
|
2948
|
-
}),
|
|
2952
|
+
return a.value.withTooltip !== !1 && (u != null && u.value) && s(T.value), T.value;
|
|
2953
|
+
}), c = v(() => {
|
|
2949
2954
|
if (r.hoveredIndex === -1)
|
|
2950
2955
|
return;
|
|
2951
2956
|
const T = cn(
|
|
@@ -2974,15 +2979,15 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2974
2979
|
function f(T) {
|
|
2975
2980
|
return d.value[T].values;
|
|
2976
2981
|
}
|
|
2977
|
-
function k(T,
|
|
2982
|
+
function k(T, S) {
|
|
2978
2983
|
var C, F;
|
|
2979
|
-
const
|
|
2980
|
-
(C = f(
|
|
2981
|
-
(F = f(
|
|
2984
|
+
const R = T === 0 ? [] : [
|
|
2985
|
+
(C = f(S)[T - 1]) == null ? void 0 : C.value,
|
|
2986
|
+
(F = f(S)[T]) == null ? void 0 : F.value
|
|
2982
2987
|
];
|
|
2983
2988
|
return Do(
|
|
2984
2989
|
T,
|
|
2985
|
-
|
|
2990
|
+
R,
|
|
2986
2991
|
o.value,
|
|
2987
2992
|
l.value
|
|
2988
2993
|
) || "";
|
|
@@ -2993,21 +2998,21 @@ const yt = 1, Ro = /* @__PURE__ */ H({
|
|
|
2993
2998
|
animationDuration: _.value
|
|
2994
2999
|
};
|
|
2995
3000
|
}
|
|
2996
|
-
function A(T,
|
|
3001
|
+
function A(T, S) {
|
|
2997
3002
|
var C;
|
|
2998
|
-
const
|
|
3003
|
+
const R = (C = f(S)[T]) == null ? void 0 : C.value;
|
|
2999
3004
|
return {
|
|
3000
3005
|
x: X(o.value) ? r.xScale(h.value[T]) + p.value : r.xScale(T),
|
|
3001
|
-
y:
|
|
3006
|
+
y: R === null ? l.value(l.value.domain()[1]) : l.value(R)
|
|
3002
3007
|
};
|
|
3003
3008
|
}
|
|
3004
3009
|
function $(T) {
|
|
3005
3010
|
return r.hoveredIndex === T;
|
|
3006
3011
|
}
|
|
3007
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes:
|
|
3012
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, 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
3013
|
}
|
|
3009
3014
|
});
|
|
3010
|
-
var
|
|
3015
|
+
var Ro = function() {
|
|
3011
3016
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3012
3017
|
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
3018
|
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 +3026,8 @@ var So = function() {
|
|
|
3021
3026
|
}), 1) : e._e()]);
|
|
3022
3027
|
})], 2);
|
|
3023
3028
|
}, Co = [], Po = /* @__PURE__ */ w(
|
|
3024
|
-
Ro,
|
|
3025
3029
|
So,
|
|
3030
|
+
Ro,
|
|
3026
3031
|
Co,
|
|
3027
3032
|
!1,
|
|
3028
3033
|
null,
|
|
@@ -3097,7 +3102,7 @@ const zo = {
|
|
|
3097
3102
|
...pe()
|
|
3098
3103
|
},
|
|
3099
3104
|
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:
|
|
3105
|
+
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
3106
|
var y, f;
|
|
3102
3107
|
return (f = (y = u.value) == null ? void 0 : y[0]) == null ? void 0 : f.color;
|
|
3103
3108
|
}), m = v(
|
|
@@ -3117,8 +3122,8 @@ const zo = {
|
|
|
3117
3122
|
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3118
3123
|
}
|
|
3119
3124
|
return e({
|
|
3120
|
-
areaPathDefinition:
|
|
3121
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions:
|
|
3125
|
+
areaPathDefinition: c
|
|
3126
|
+
}), { __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
3127
|
}
|
|
3123
3128
|
});
|
|
3124
3129
|
var Zo = function() {
|
|
@@ -3152,7 +3157,7 @@ export {
|
|
|
3152
3157
|
Xe as DivergentColors,
|
|
3153
3158
|
Ke as LegacyColors,
|
|
3154
3159
|
qo as LumeAlluvialDiagram,
|
|
3155
|
-
|
|
3160
|
+
Sa as LumeAlluvialGroup,
|
|
3156
3161
|
va as LumeAlluvialNodeHeader,
|
|
3157
3162
|
na as LumeAlluvialNodeLabel,
|
|
3158
3163
|
ua as LumeAlluvialNodeValue,
|
|
@@ -3167,7 +3172,7 @@ export {
|
|
|
3167
3172
|
Lo as LumeLine,
|
|
3168
3173
|
al as LumeLineChart,
|
|
3169
3174
|
Bt as LumeLineGroup,
|
|
3170
|
-
|
|
3175
|
+
Sr as LumeOverlayGroup,
|
|
3171
3176
|
wo as LumePoint,
|
|
3172
3177
|
tl as LumeSingleBarChart,
|
|
3173
3178
|
ol as LumeSparklineChart,
|