@adyen/lume 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -61,8 +61,8 @@ function w(t, e, r, n, o, a, l, i) {
|
|
|
61
61
|
if (u.functional) {
|
|
62
62
|
u._injectStyles = c;
|
|
63
63
|
var d = u.render;
|
|
64
|
-
u.render = function(m,
|
|
65
|
-
return c.call(
|
|
64
|
+
u.render = function(m, p) {
|
|
65
|
+
return c.call(p), d(m, p);
|
|
66
66
|
};
|
|
67
67
|
} else {
|
|
68
68
|
var s = u.beforeCreate;
|
|
@@ -201,9 +201,9 @@ function Ve(t, e) {
|
|
|
201
201
|
}
|
|
202
202
|
var K = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
203
203
|
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))(K || {});
|
|
204
|
-
const
|
|
204
|
+
const fn = "[lume] ";
|
|
205
205
|
function ee(t, e = !0) {
|
|
206
|
-
e && yt() || console.warn(
|
|
206
|
+
e && yt() || console.warn(fn + "Warning: " + t);
|
|
207
207
|
}
|
|
208
208
|
const ye = (t) => {
|
|
209
209
|
let e = null;
|
|
@@ -225,7 +225,7 @@ const ye = (t) => {
|
|
|
225
225
|
return e ? e(...n) : n[0];
|
|
226
226
|
}
|
|
227
227
|
return r;
|
|
228
|
-
},
|
|
228
|
+
}, fe = () => ({
|
|
229
229
|
options: {
|
|
230
230
|
type: Object,
|
|
231
231
|
default: () => ({})
|
|
@@ -237,7 +237,7 @@ function J(t, e) {
|
|
|
237
237
|
return n ? kt(n, t.value) : t.value;
|
|
238
238
|
}) };
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const pn = 0.2;
|
|
241
241
|
function mn(t, e, r) {
|
|
242
242
|
const n = O(), o = v(() => Math.max(...t.value.range())), a = v(() => e.value.length);
|
|
243
243
|
function l() {
|
|
@@ -247,7 +247,7 @@ function mn(t, e, r) {
|
|
|
247
247
|
(d, s) => d + s.ref.getBoundingClientRect().width,
|
|
248
248
|
0
|
|
249
249
|
), c = Math.ceil(u / a.value);
|
|
250
|
-
n.value = c + c *
|
|
250
|
+
n.value = c + c * pn;
|
|
251
251
|
}
|
|
252
252
|
function i(u) {
|
|
253
253
|
if (!e.value)
|
|
@@ -268,7 +268,7 @@ const L = {
|
|
|
268
268
|
SINGLE: "single",
|
|
269
269
|
GROUPED: "grouped",
|
|
270
270
|
STACKED: "stacked"
|
|
271
|
-
}, Tt = "No data", qe = 20, At = 0.33, Lt = 0.5, Ot = 12,
|
|
271
|
+
}, Tt = "No data", qe = 20, At = 0.33, Lt = 0.5, Ot = 12, pe = 8, gn = 1, yn = [
|
|
272
272
|
"auto",
|
|
273
273
|
"auto-start",
|
|
274
274
|
"auto-end",
|
|
@@ -327,7 +327,7 @@ const It = {
|
|
|
327
327
|
return {
|
|
328
328
|
x: -(c - t.value.step()) / 2,
|
|
329
329
|
width: c,
|
|
330
|
-
height: r.value.tickPadding + Ot +
|
|
330
|
+
height: r.value.tickPadding + Ot + pe
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function l() {
|
|
@@ -362,7 +362,7 @@ const It = {
|
|
|
362
362
|
}
|
|
363
363
|
function a(u) {
|
|
364
364
|
var d;
|
|
365
|
-
const c = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding +
|
|
365
|
+
const c = (u ? (d = u.getComputedTextLength) == null ? void 0 : d.call(u) : 42) + r.value.tickPadding + pe;
|
|
366
366
|
return {
|
|
367
367
|
x: -c,
|
|
368
368
|
width: c,
|
|
@@ -403,7 +403,7 @@ const It = {
|
|
|
403
403
|
}
|
|
404
404
|
function a() {
|
|
405
405
|
return {
|
|
406
|
-
height: r.value.tickPadding + Ot +
|
|
406
|
+
height: r.value.tickPadding + Ot + pe,
|
|
407
407
|
width: n.value,
|
|
408
408
|
x: -(n.value / 2)
|
|
409
409
|
};
|
|
@@ -438,7 +438,7 @@ const It = {
|
|
|
438
438
|
}
|
|
439
439
|
function a(u) {
|
|
440
440
|
var d;
|
|
441
|
-
const c = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding +
|
|
441
|
+
const c = (((d = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : d.call(u)) || 0) + r.value.tickPadding + pe;
|
|
442
442
|
return {
|
|
443
443
|
width: c,
|
|
444
444
|
height: n.value,
|
|
@@ -500,34 +500,34 @@ const In = /* @__PURE__ */ H({
|
|
|
500
500
|
type: String,
|
|
501
501
|
default: L.VERTICAL
|
|
502
502
|
},
|
|
503
|
-
...
|
|
503
|
+
...fe()
|
|
504
504
|
},
|
|
505
505
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
506
506
|
setup(t, { emit: e }) {
|
|
507
|
-
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = B(r), c = _e("isEmpty", O(!1)), d = be({}), s = O(null), _ = O(null), m = O(null),
|
|
507
|
+
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = B(r), c = _e("isEmpty", O(!1)), d = be({}), s = O(null), _ = O(null), m = O(null), p = v(
|
|
508
508
|
() => r.type ? ge[r.type] : r.position
|
|
509
509
|
), h = v(
|
|
510
|
-
() => r.type || (
|
|
510
|
+
() => r.type || (p.value === "left" ? "y" : "x")
|
|
511
511
|
), y = v(
|
|
512
512
|
() => h.value === "x" && u.value === L.VERTICAL || h.value === "y" && u.value === L.HORIZONTAL
|
|
513
|
-
), { allOptions:
|
|
513
|
+
), { allOptions: f } = J(
|
|
514
514
|
i,
|
|
515
515
|
h.value === "x" ? bn : kn
|
|
516
|
-
), { showTick: k } = mn(o, s,
|
|
516
|
+
), { showTick: k } = mn(o, s, f.value.skip), T = v(() => {
|
|
517
517
|
var $, E, g, N;
|
|
518
518
|
return h.value === "y" && c.value ? `translate(0, ${(($ = a.value) == null ? void 0 : $.height) / 2})` : h.value === "x" && c.value ? `translate(-${((E = a.value) == null ? void 0 : E.width) / 2}, ${(g = a.value) == null ? void 0 : g.height})` : `translate(0, ${h.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
519
519
|
}), x = v(() => {
|
|
520
520
|
if (Y(o.value))
|
|
521
521
|
return o.value.labels || o.value.domain();
|
|
522
|
-
const { tickCount: $ } =
|
|
522
|
+
const { tickCount: $ } = f.value, [E, g] = o.value.domain();
|
|
523
523
|
return Mt(E, g, $);
|
|
524
524
|
}), I = v(() => {
|
|
525
|
-
const { tickFormat: $ } =
|
|
525
|
+
const { tickFormat: $ } = f.value;
|
|
526
526
|
return ye($);
|
|
527
527
|
}), A = v(
|
|
528
|
-
() =>
|
|
528
|
+
() => f.value.withHover && y.value && l.value > -1
|
|
529
529
|
), D = v(
|
|
530
|
-
() =>
|
|
530
|
+
() => f.value.tickPadding + pe || n
|
|
531
531
|
), F = v(() => h.value === "x" ? (
|
|
532
532
|
// If x axis, get the tick height
|
|
533
533
|
Math.max(
|
|
@@ -550,7 +550,7 @@ const In = /* @__PURE__ */ H({
|
|
|
550
550
|
)
|
|
551
551
|
));
|
|
552
552
|
function P($) {
|
|
553
|
-
const { showTicks: E } =
|
|
553
|
+
const { showTicks: E } = f.value;
|
|
554
554
|
return E === !1 ? "" : I.value($);
|
|
555
555
|
}
|
|
556
556
|
function G($, E, g) {
|
|
@@ -577,13 +577,13 @@ const In = /* @__PURE__ */ H({
|
|
|
577
577
|
}
|
|
578
578
|
function q() {
|
|
579
579
|
const $ = o.value.step ? "bandScale" : "linearScale", E = On[`${h.value}-${Ne[$]}`];
|
|
580
|
-
Object.entries(E(o, a,
|
|
580
|
+
Object.entries(E(o, a, f) || []).forEach(
|
|
581
581
|
([g, N]) => {
|
|
582
582
|
d[g] = N;
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
585
|
}
|
|
586
|
-
return C(o, q, { flush: "sync", immediate: !0 }), C(o, ne, { immediate: !0 }), C(s, ne), C(F, ($) => e("lume__internal--axis-size", $)), te(() => ke(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ne, POSITIONS: He, TYPES: ge, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition:
|
|
586
|
+
return C(o, q, { flush: "sync", immediate: !0 }), C(o, ne, { immediate: !0 }), C(s, ne), C(F, ($) => e("lume__internal--axis-size", $)), te(() => ke(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ne, POSITIONS: He, TYPES: ge, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: T, ticks: x, tickFormatter: I, isHovering: A, axisLabelOffset: D, axisSize: F, formatTick: P, handleTickMouseenter: G, handleTickClick: j, getTextNode: W, setTicks: ne, init: q, LumeTick: tn };
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
var $n = function() {
|
|
@@ -672,8 +672,8 @@ const Dn = /* @__PURE__ */ H({
|
|
|
672
672
|
setup(t, { emit: e }) {
|
|
673
673
|
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = B(r), c = O(null), d = v(
|
|
674
674
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
675
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX:
|
|
676
|
-
return te(() => ke(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX:
|
|
675
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Hn(n, o, a, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : a).value), T = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), x = s.value || _.value ? m.transformOrigin : null;
|
|
676
|
+
return te(() => ke(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth: k, computedHeight: T, transformOrigin: x };
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
var Rn = function() {
|
|
@@ -793,7 +793,7 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ H({
|
|
|
793
793
|
},
|
|
794
794
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
795
795
|
setup(t, { emit: e }) {
|
|
796
|
-
const r = _e("isEmpty");
|
|
796
|
+
const r = _e("isEmpty", O(!1));
|
|
797
797
|
return { __sfc: !0, emit: e, isEmpty: r };
|
|
798
798
|
}
|
|
799
799
|
});
|
|
@@ -814,7 +814,7 @@ var Wn = function() {
|
|
|
814
814
|
Zn,
|
|
815
815
|
!1,
|
|
816
816
|
null,
|
|
817
|
-
"
|
|
817
|
+
"b298ddd7",
|
|
818
818
|
null,
|
|
819
819
|
null
|
|
820
820
|
);
|
|
@@ -905,7 +905,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
905
905
|
type: String,
|
|
906
906
|
default: null
|
|
907
907
|
},
|
|
908
|
-
...
|
|
908
|
+
...fe()
|
|
909
909
|
},
|
|
910
910
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
911
911
|
setup(t, { emit: e }) {
|
|
@@ -928,7 +928,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
928
928
|
...r.modifiers || []
|
|
929
929
|
]), _ = v(
|
|
930
930
|
() => u.value.showTitle !== !1 && r.title != null
|
|
931
|
-
), m = v(() => ye(u.value.valueFormat)),
|
|
931
|
+
), m = v(() => ye(u.value.valueFormat)), p = v(() => ye(u.value.titleFormat)), h = v(
|
|
932
932
|
() => {
|
|
933
933
|
var x;
|
|
934
934
|
return ((x = o.value) == null ? void 0 : x.find((I) => I.isSummary)) || {
|
|
@@ -936,7 +936,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
), y = v(() => l.summary || h.value.label);
|
|
939
|
-
function
|
|
939
|
+
function f() {
|
|
940
940
|
r.targetElement && n.value && (i.value = Xt(r.targetElement, n.value, {
|
|
941
941
|
placement: r.position,
|
|
942
942
|
strategy: d.value,
|
|
@@ -954,9 +954,9 @@ const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
|
954
954
|
return C(
|
|
955
955
|
() => r.targetElement,
|
|
956
956
|
(x, I) => {
|
|
957
|
-
!I && x ?
|
|
957
|
+
!I && x ? f() : T();
|
|
958
958
|
}
|
|
959
|
-
), te(
|
|
959
|
+
), te(f), ht(k), { __sfc: !0, props: r, emit: e, root: n, items: o, options: a, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, initPopper: f, destroyPopper: k, updatePopper: T, LumeTooltipTitle: qn, LumeTooltipSummary: or, LumeTooltipItem: sr };
|
|
960
960
|
}
|
|
961
961
|
});
|
|
962
962
|
var dr = function() {
|
|
@@ -994,9 +994,9 @@ var dr = function() {
|
|
|
994
994
|
null,
|
|
995
995
|
null
|
|
996
996
|
);
|
|
997
|
-
const
|
|
997
|
+
const fr = _r.exports;
|
|
998
998
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
999
|
-
const
|
|
999
|
+
const pr = re.Categorical, me = z.Skyblue, mr = Me.SkyTeal;
|
|
1000
1000
|
function hr(t) {
|
|
1001
1001
|
return t === re.Divergent ? mr : me;
|
|
1002
1002
|
}
|
|
@@ -1034,7 +1034,7 @@ function tt(t, e, r) {
|
|
|
1034
1034
|
return kr(t, r);
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
function xr(t, e, r =
|
|
1037
|
+
function xr(t, e, r = pr, n) {
|
|
1038
1038
|
return et(t, r) ? t : (n > 4 && (ee(K.ColorLoop), n = n % 5), et(e, r) ? tt(e, r, n) : tt(hr(r), r, n));
|
|
1039
1039
|
}
|
|
1040
1040
|
function Tr(t) {
|
|
@@ -1072,7 +1072,7 @@ function Ue(t, e, r, n, o) {
|
|
|
1072
1072
|
(s, _) => {
|
|
1073
1073
|
if (Ar(s))
|
|
1074
1074
|
return s;
|
|
1075
|
-
const m = Tr(s.values),
|
|
1075
|
+
const m = Tr(s.values), p = xr(
|
|
1076
1076
|
s.color,
|
|
1077
1077
|
r == null ? void 0 : r.value,
|
|
1078
1078
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -1081,7 +1081,7 @@ function Ue(t, e, r, n, o) {
|
|
|
1081
1081
|
return {
|
|
1082
1082
|
...s,
|
|
1083
1083
|
values: m,
|
|
1084
|
-
color:
|
|
1084
|
+
color: p,
|
|
1085
1085
|
__internal: !0
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
@@ -1171,7 +1171,7 @@ function $t(t) {
|
|
|
1171
1171
|
const ue = (t, e = !0) => ({
|
|
1172
1172
|
...Xe(t),
|
|
1173
1173
|
...Lr(),
|
|
1174
|
-
...
|
|
1174
|
+
...fe(),
|
|
1175
1175
|
classList: {
|
|
1176
1176
|
type: [String, Array],
|
|
1177
1177
|
default: () => []
|
|
@@ -1189,7 +1189,7 @@ const ue = (t, e = !0) => ({
|
|
|
1189
1189
|
} : {}
|
|
1190
1190
|
}), Ir = (t) => ({
|
|
1191
1191
|
...Xe(t),
|
|
1192
|
-
...
|
|
1192
|
+
...fe(),
|
|
1193
1193
|
hoveredElement: {
|
|
1194
1194
|
type: [Number, String],
|
|
1195
1195
|
default: null
|
|
@@ -1250,7 +1250,7 @@ const ue = (t, e = !0) => ({
|
|
|
1250
1250
|
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() => we(n));
|
|
1251
1251
|
function u(c) {
|
|
1252
1252
|
var y;
|
|
1253
|
-
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0,
|
|
1253
|
+
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = Y(d) ? d(s[c]) - p / 2 : d(c) - _ / 2;
|
|
1254
1254
|
return o.value === L.HORIZONTAL ? {
|
|
1255
1255
|
width: Math.max(...a.value.range()),
|
|
1256
1256
|
height: _,
|
|
@@ -1385,9 +1385,9 @@ function Et(t, e, r, n, o, a, l, i) {
|
|
|
1385
1385
|
d,
|
|
1386
1386
|
s
|
|
1387
1387
|
) : Pr(d, s);
|
|
1388
|
-
t.value = _.map((
|
|
1389
|
-
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(
|
|
1390
|
-
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(
|
|
1388
|
+
t.value = _.map((p, h) => ({
|
|
1389
|
+
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(p) : Ce(r.value, h),
|
|
1390
|
+
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(p)
|
|
1391
1391
|
}));
|
|
1392
1392
|
}
|
|
1393
1393
|
return C(
|
|
@@ -1457,17 +1457,17 @@ const zr = /* @__PURE__ */ H({
|
|
|
1457
1457
|
}
|
|
1458
1458
|
},
|
|
1459
1459
|
setup(t, { emit: e }) {
|
|
1460
|
-
const r = t, n = M(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = B(r), d = O(-1), s = O(null), _ = O(null), m = O([]),
|
|
1460
|
+
const r = t, n = M(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = B(r), d = O(-1), s = O(null), _ = O(null), m = O([]), p = O(null), h = O(0), y = O(0), { allOptions: f } = J(i), { internalData: k, computedLabels: T, containerSize: x, updateSize: I, chartID: A } = Ue(o, a, l, f, u), { listenInternalEvent: D } = Q(e, A), { xScale: F, yScale: P } = Or(
|
|
1461
1461
|
k,
|
|
1462
1462
|
T,
|
|
1463
1463
|
x,
|
|
1464
1464
|
u,
|
|
1465
|
-
|
|
1465
|
+
f
|
|
1466
1466
|
), G = v(() => ({
|
|
1467
|
-
top: Gr(
|
|
1468
|
-
right: jr(
|
|
1469
|
-
bottom: Vr(
|
|
1470
|
-
left: Mr(
|
|
1467
|
+
top: Gr(f.value.margins),
|
|
1468
|
+
right: jr(f.value.margins),
|
|
1469
|
+
bottom: Vr(f.value.margins, h.value),
|
|
1470
|
+
left: Mr(f.value.margins, y.value)
|
|
1471
1471
|
})), j = v(() => {
|
|
1472
1472
|
var b;
|
|
1473
1473
|
return r.xScale ? ot(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, a.value, x) : F.value;
|
|
@@ -1475,27 +1475,27 @@ const zr = /* @__PURE__ */ H({
|
|
|
1475
1475
|
var b;
|
|
1476
1476
|
return r.yScale ? ot(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, a.value, x) : P.value;
|
|
1477
1477
|
}), ne = v(() => ({
|
|
1478
|
-
...
|
|
1478
|
+
...f.value.xAxisOptions,
|
|
1479
1479
|
withHover: u.value === L.VERTICAL
|
|
1480
1480
|
})), q = v(() => ({
|
|
1481
|
-
...
|
|
1481
|
+
...f.value.yAxisOptions,
|
|
1482
1482
|
withHover: u.value === L.HORIZONTAL
|
|
1483
1483
|
})), $ = v(() => {
|
|
1484
1484
|
var b;
|
|
1485
|
-
return (b =
|
|
1485
|
+
return (b = f.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1486
1486
|
}), E = v(() => {
|
|
1487
1487
|
var b;
|
|
1488
|
-
return (b =
|
|
1488
|
+
return (b = f.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1489
1489
|
}), g = v(() => {
|
|
1490
1490
|
var b;
|
|
1491
|
-
return ((b =
|
|
1491
|
+
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && $.value;
|
|
1492
1492
|
}), N = v(() => {
|
|
1493
1493
|
var b;
|
|
1494
|
-
return ((b =
|
|
1494
|
+
return ((b = f.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && E.value;
|
|
1495
1495
|
}), R = v(
|
|
1496
1496
|
() => o.value.every((b) => !b.values.length)
|
|
1497
1497
|
), Z = v(() => {
|
|
1498
|
-
const b = [], { noBaseScales: S } =
|
|
1498
|
+
const b = [], { noBaseScales: S } = f.value;
|
|
1499
1499
|
return S || b.push(() => !!(j.value && W.value)), b.every((V) => V() === !0);
|
|
1500
1500
|
}), { hasNegativeValues: X } = Dr(k), { negativeBarAttributes: U } = Rr(
|
|
1501
1501
|
x,
|
|
@@ -1504,7 +1504,7 @@ const zr = /* @__PURE__ */ H({
|
|
|
1504
1504
|
u
|
|
1505
1505
|
), { shouldGenerateTooltipAnchors: Te } = Et(
|
|
1506
1506
|
m,
|
|
1507
|
-
|
|
1507
|
+
f,
|
|
1508
1508
|
j,
|
|
1509
1509
|
W,
|
|
1510
1510
|
a,
|
|
@@ -1512,24 +1512,24 @@ const zr = /* @__PURE__ */ H({
|
|
|
1512
1512
|
k,
|
|
1513
1513
|
c
|
|
1514
1514
|
), { tooltipConfig: se, showTooltip: ce, hideTooltip: Ke } = Br(), { getTooltipItems: Rt } = Fr(k), Pt = v(
|
|
1515
|
-
() =>
|
|
1515
|
+
() => f.value.withTooltip !== !1 && se.opened
|
|
1516
1516
|
), St = v(
|
|
1517
1517
|
() => {
|
|
1518
1518
|
var b;
|
|
1519
|
-
return ((b =
|
|
1519
|
+
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1520
1520
|
}
|
|
1521
1521
|
), Je = v(() => {
|
|
1522
1522
|
var S;
|
|
1523
|
-
const b = (S =
|
|
1524
|
-
return se.opened && (!b || b &&
|
|
1523
|
+
const b = (S = f.value.tooltipOptions) == null ? void 0 : S.withPointerEvents;
|
|
1524
|
+
return se.opened && (!b || b && p.value === !1);
|
|
1525
1525
|
});
|
|
1526
1526
|
function he(b) {
|
|
1527
1527
|
var V;
|
|
1528
1528
|
if (b === d.value)
|
|
1529
1529
|
return;
|
|
1530
1530
|
const S = d.value;
|
|
1531
|
-
if (
|
|
1532
|
-
const jt = (V =
|
|
1531
|
+
if (f.value.withHover !== !1 && (d.value = b), f.value.withTooltip !== !1) {
|
|
1532
|
+
const jt = (V = f.value.tooltipOptions) != null && V.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : s.value[b];
|
|
1533
1533
|
ce(jt);
|
|
1534
1534
|
}
|
|
1535
1535
|
e("hovered-index-changed", { newIndex: b, oldIndex: S });
|
|
@@ -1569,11 +1569,11 @@ const zr = /* @__PURE__ */ H({
|
|
|
1569
1569
|
b && r.hoveredIndex != null && d.value === -1 && Le(r.hoveredIndex);
|
|
1570
1570
|
},
|
|
1571
1571
|
{ flush: "post" }
|
|
1572
|
-
), C(
|
|
1572
|
+
), C(p, (b) => {
|
|
1573
1573
|
b === !1 && se.opened && Ae();
|
|
1574
1574
|
}), te(async () => {
|
|
1575
1575
|
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", he);
|
|
1576
|
-
}), Oe("chartID", A), Oe("isEmpty", R), Oe("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip:
|
|
1576
|
+
}), Oe("chartID", A), Oe("isEmpty", R), Oe("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: T, containerSize: x, updateSize: I, chartID: A, listenInternalEvent: D, xScale: F, yScale: P, computedMargins: G, computedXScale: j, computedYScale: W, computedXAxisOptions: ne, computedYAxisOptions: q, xAxisTitle: $, yAxisTitle: E, showXAxisTitle: g, showYAxisTitle: N, isEmpty: R, isReady: Z, hasNegativeValues: X, negativeBarAttributes: U, shouldGenerateTooltipAnchors: Te, tooltipConfig: se, showTooltip: ce, hideTooltip: Ke, getTooltipItems: Rt, isTooltipOpened: Pt, tooltipPosition: St, shouldHideTooltip: Je, handleInternalHover: he, handleHideTooltip: Ae, handleExternalHover: Le, handleMouseleave: Bt, handleAxisMouseenter: Ft, handleAxisClick: Gt, LumeAxis: Nn, LumeBar: Ze, LumeChartContainer: Mn, LumeChartLegend: Un, LumeTooltip: fr, LumeOverlayGroup: Hr, TOOLTIP_ANCHOR_RADIUS: gn };
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
1579
|
var Wr = function() {
|
|
@@ -1754,7 +1754,7 @@ function _o(t, e) {
|
|
|
1754
1754
|
bottom: 0
|
|
1755
1755
|
};
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function fo(t) {
|
|
1758
1758
|
return t.map((e) => {
|
|
1759
1759
|
const r = e.y1 - e.y0 < $e;
|
|
1760
1760
|
return {
|
|
@@ -1771,14 +1771,14 @@ function po(t) {
|
|
|
1771
1771
|
};
|
|
1772
1772
|
});
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function po(t) {
|
|
1775
1775
|
return [t.source.x1, t.y0];
|
|
1776
1776
|
}
|
|
1777
1777
|
function mo(t) {
|
|
1778
1778
|
return [t.target.x0, t.y1];
|
|
1779
1779
|
}
|
|
1780
1780
|
function ho(t) {
|
|
1781
|
-
return t.curveFunction ? zt(t.curveFunction).source(
|
|
1781
|
+
return t.curveFunction ? zt(t.curveFunction).source(po).target(mo) : Ut();
|
|
1782
1782
|
}
|
|
1783
1783
|
function go(t) {
|
|
1784
1784
|
return t.map((e) => {
|
|
@@ -1820,11 +1820,11 @@ function bo(t, e, r) {
|
|
|
1820
1820
|
const n = O(null), o = v(() => {
|
|
1821
1821
|
var s;
|
|
1822
1822
|
return (s = t.value) == null ? void 0 : s[0].values.map(
|
|
1823
|
-
({ label: _, color: m, value:
|
|
1824
|
-
label: _ ||
|
|
1823
|
+
({ label: _, color: m, value: p, deriveColorFromIncomingLinks: h, offset: y }) => ({
|
|
1824
|
+
label: _ || p.toString(),
|
|
1825
1825
|
color: m,
|
|
1826
1826
|
fallbackColor: m || me,
|
|
1827
|
-
id:
|
|
1827
|
+
id: p,
|
|
1828
1828
|
deriveColorFromIncomingLinks: h,
|
|
1829
1829
|
offset: y
|
|
1830
1830
|
})
|
|
@@ -1836,12 +1836,12 @@ function bo(t, e, r) {
|
|
|
1836
1836
|
(_) => {
|
|
1837
1837
|
var m;
|
|
1838
1838
|
return (m = _.targets) == null ? void 0 : m.map(
|
|
1839
|
-
({ node:
|
|
1840
|
-
id: `${_.value}:${
|
|
1839
|
+
({ node: p, value: h, color: y, curveFunction: f }) => ({
|
|
1840
|
+
id: `${_.value}:${p}`,
|
|
1841
1841
|
color: y,
|
|
1842
|
-
curveFunction:
|
|
1842
|
+
curveFunction: f,
|
|
1843
1843
|
source: _.value ?? _.label,
|
|
1844
|
-
target:
|
|
1844
|
+
target: p,
|
|
1845
1845
|
value: h
|
|
1846
1846
|
})
|
|
1847
1847
|
);
|
|
@@ -1852,8 +1852,8 @@ function bo(t, e, r) {
|
|
|
1852
1852
|
var s;
|
|
1853
1853
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1854
1854
|
(_, m) => {
|
|
1855
|
-
const
|
|
1856
|
-
return
|
|
1855
|
+
const p = dt(m, _);
|
|
1856
|
+
return p ? (p.push(m), p.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1857
1857
|
},
|
|
1858
1858
|
[]
|
|
1859
1859
|
);
|
|
@@ -1862,26 +1862,26 @@ function bo(t, e, r) {
|
|
|
1862
1862
|
const { offset: _ } = s, m = dt(s, i.value);
|
|
1863
1863
|
if (!m)
|
|
1864
1864
|
return;
|
|
1865
|
-
const
|
|
1865
|
+
const p = m[m.findIndex((y) => y.id === s.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
1866
1866
|
s._y0 = s.y0, s._y1 = s.y1, s.y0 = h, s.y1 = s.y0 + (s._y1 - s._y0);
|
|
1867
1867
|
}
|
|
1868
1868
|
function c(s, _) {
|
|
1869
|
-
const { id: m, _y0:
|
|
1869
|
+
const { id: m, _y0: p, y0: h } = s, y = _.links.filter(
|
|
1870
1870
|
(T) => T.source.id === m
|
|
1871
|
-
),
|
|
1871
|
+
), f = _.links.filter(
|
|
1872
1872
|
(T) => T.target.id === m
|
|
1873
|
-
), k = h -
|
|
1874
|
-
y.forEach((T) => T.y0 += k),
|
|
1873
|
+
), k = h - p;
|
|
1874
|
+
y.forEach((T) => T.y0 += k), f.forEach((T) => T.y1 += k);
|
|
1875
1875
|
}
|
|
1876
1876
|
const d = v(() => (n.value && o.value.forEach((s) => {
|
|
1877
1877
|
s.value === 0 && (s.fallbackColor = ze.Grey), typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
1878
1878
|
}), n.value));
|
|
1879
1879
|
return C([l, r], () => {
|
|
1880
1880
|
try {
|
|
1881
|
-
const { x0: s, y0: _, x1: m, y1:
|
|
1881
|
+
const { x0: s, y0: _, x1: m, y1: p } = r.value;
|
|
1882
1882
|
n.value = l.value.extent([
|
|
1883
1883
|
[s, _],
|
|
1884
|
-
[m,
|
|
1884
|
+
[m, p]
|
|
1885
1885
|
])({ nodes: o.value, links: a.value });
|
|
1886
1886
|
} catch (s) {
|
|
1887
1887
|
io(wt.GraphProblem, s), n.value = yo;
|
|
@@ -1979,19 +1979,19 @@ const Lo = /* @__PURE__ */ H({
|
|
|
1979
1979
|
},
|
|
1980
1980
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1981
1981
|
setup(t, { emit: e }) {
|
|
1982
|
-
const r = t, n = _e("chartID"), { data: o, options: a } = B(r), l = O([]), i = O([]), u = O(null), { extents: c, updateExtents: d } = lo(r.containerSize), { columns: s, graph: _ } = bo(o, a, c), { hoveredElement: m, highlightedElements:
|
|
1982
|
+
const r = t, n = _e("chartID"), { data: o, options: a } = B(r), l = O([]), i = O([]), u = O(null), { extents: c, updateExtents: d } = lo(r.containerSize), { columns: s, graph: _ } = bo(o, a, c), { hoveredElement: m, highlightedElements: p } = Ao(
|
|
1983
1983
|
l,
|
|
1984
1984
|
a,
|
|
1985
1985
|
_
|
|
1986
1986
|
), h = v(() => ye(a.value.valueFormat)), y = v(
|
|
1987
|
-
() => Object.keys(
|
|
1988
|
-
),
|
|
1987
|
+
() => Object.keys(p.value.nodes)
|
|
1988
|
+
), f = v(() => s.value ? s.value.map(
|
|
1989
1989
|
(g) => g[0].x0 + a.value.nodeWidth / 2
|
|
1990
1990
|
) : []), k = v(() => {
|
|
1991
1991
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
1992
|
-
return a.value.nodeHeaders.slice(0,
|
|
1992
|
+
return a.value.nodeHeaders.slice(0, f.value.length).map((g, N) => ({
|
|
1993
1993
|
label: g,
|
|
1994
|
-
x:
|
|
1994
|
+
x: f.value[N]
|
|
1995
1995
|
}));
|
|
1996
1996
|
}), T = v(
|
|
1997
1997
|
() => a.value.nodeHeaderPadding ?? Yr
|
|
@@ -2038,10 +2038,10 @@ const Lo = /* @__PURE__ */ H({
|
|
|
2038
2038
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2039
2039
|
}
|
|
2040
2040
|
function P(g) {
|
|
2041
|
-
return
|
|
2041
|
+
return p.value.links.length > 0 && !p.value.links.includes(g);
|
|
2042
2042
|
}
|
|
2043
2043
|
function G(g) {
|
|
2044
|
-
return
|
|
2044
|
+
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2045
2045
|
}
|
|
2046
2046
|
function j(g) {
|
|
2047
2047
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
@@ -2074,10 +2074,10 @@ const Lo = /* @__PURE__ */ H({
|
|
|
2074
2074
|
d(g);
|
|
2075
2075
|
}
|
|
2076
2076
|
return C(_, (g) => {
|
|
2077
|
-
l.value =
|
|
2077
|
+
l.value = fo(g.nodes), i.value = go(g.links).reverse(), m.value == null && r.hoveredElementId != null && q(r.hoveredElementId);
|
|
2078
2078
|
}), C([r.containerSize, u], () => {
|
|
2079
2079
|
r.containerSize.width && r.containerSize.height && E();
|
|
2080
|
-
}), C(() => r.hoveredElementId, q), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements:
|
|
2080
|
+
}), C(() => r.hoveredElementId, q), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: T, gradients: x, nodesDerivingColorFromIncomingLinks: I, getLinkStroke: A, isNodeFaded: D, isNodeFocused: F, isLinkFaded: P, isLinkFocused: G, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: ne, handleExternalHover: q, getSubNodesDerivingColorFromIncomingLinks: $, updateMargins: E, LumeAlluvialNodeLabel: eo, LumeAlluvialNodeValue: ao, GHOST_STROKE_WIDTH_OFFSET: Ur };
|
|
2081
2081
|
}
|
|
2082
2082
|
});
|
|
2083
2083
|
var Oo = function() {
|
|
@@ -2325,8 +2325,8 @@ function zo(t, e, r, n, o, a) {
|
|
|
2325
2325
|
() => n.value === L.HORIZONTAL
|
|
2326
2326
|
);
|
|
2327
2327
|
function i(s, _) {
|
|
2328
|
-
let m,
|
|
2329
|
-
return l.value ? (m = s >= 0 ? e.value(0) : e.value(s),
|
|
2328
|
+
let m, p;
|
|
2329
|
+
return l.value ? (m = s >= 0 ? e.value(0) : e.value(s), p = r.value(r.value.domain()[_])) : (m = e.value(e.value.domain()[_]), p = s < 0 ? r.value(0) : r.value(s)), { x: m, y: p };
|
|
2330
2330
|
}
|
|
2331
2331
|
function u(s) {
|
|
2332
2332
|
return l.value ? s < 0 ? e.value(0) - e.value(s) : e.value(s) - e.value(0) : e.value.bandwidth();
|
|
@@ -2335,15 +2335,15 @@ function zo(t, e, r, n, o, a) {
|
|
|
2335
2335
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2336
2336
|
}
|
|
2337
2337
|
function d(s, _, m) {
|
|
2338
|
-
const { value:
|
|
2338
|
+
const { value: p, color: h } = s, y = h ?? t.value[_].color ?? me, { x: f, y: k } = i(p, m), T = u(p), x = c(p);
|
|
2339
2339
|
return {
|
|
2340
2340
|
classList: [`lume-fill--${y}`, ...a],
|
|
2341
|
-
x:
|
|
2341
|
+
x: f,
|
|
2342
2342
|
y: k,
|
|
2343
2343
|
width: T,
|
|
2344
2344
|
height: x,
|
|
2345
2345
|
isFaded: o.value !== -1 && o.value !== m,
|
|
2346
|
-
isNegative:
|
|
2346
|
+
isNegative: p < 0
|
|
2347
2347
|
};
|
|
2348
2348
|
}
|
|
2349
2349
|
return { barAttributeGenerator: d };
|
|
@@ -2351,28 +2351,28 @@ function zo(t, e, r, n, o, a) {
|
|
|
2351
2351
|
function Wo(t, e, r, n, o, a) {
|
|
2352
2352
|
const l = v(
|
|
2353
2353
|
() => n.value === L.HORIZONTAL
|
|
2354
|
-
), i = v(() => de().domain(t.value.map((
|
|
2355
|
-
function c(
|
|
2354
|
+
), i = v(() => de().domain(t.value.map((p, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => de().domain(t.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
2355
|
+
function c(p, h, y) {
|
|
2356
2356
|
if (l.value)
|
|
2357
|
-
return
|
|
2358
|
-
const
|
|
2359
|
-
return e.value(
|
|
2357
|
+
return p >= 0 ? e.value(0) : e.value(p);
|
|
2358
|
+
const f = e.value.domain();
|
|
2359
|
+
return e.value(f[h]) + i.value(y);
|
|
2360
2360
|
}
|
|
2361
|
-
function d(
|
|
2361
|
+
function d(p, h, y) {
|
|
2362
2362
|
if (l.value) {
|
|
2363
|
-
const
|
|
2364
|
-
return r.value(
|
|
2363
|
+
const f = r.value.domain();
|
|
2364
|
+
return r.value(f[h]) + u.value(y);
|
|
2365
2365
|
}
|
|
2366
|
-
return
|
|
2366
|
+
return p < 0 ? r.value(0) : r.value(p);
|
|
2367
2367
|
}
|
|
2368
|
-
function s(
|
|
2369
|
-
return l.value ?
|
|
2368
|
+
function s(p) {
|
|
2369
|
+
return l.value ? p < 0 ? e.value(0) - e.value(p) : e.value(p) - e.value(0) : i.value.bandwidth();
|
|
2370
2370
|
}
|
|
2371
|
-
function _(
|
|
2372
|
-
return l.value ? u.value.bandwidth() :
|
|
2371
|
+
function _(p) {
|
|
2372
|
+
return l.value ? u.value.bandwidth() : p < 0 ? r.value(p) - r.value(0) : r.value(0) - r.value(p);
|
|
2373
2373
|
}
|
|
2374
|
-
function m(
|
|
2375
|
-
const { value:
|
|
2374
|
+
function m(p, h, y) {
|
|
2375
|
+
const { value: f, color: k } = p, T = k ?? t.value[h].color ?? Object.values(z)[h], x = c(f, y, h), I = d(f, y, h), A = s(f), D = _(f);
|
|
2376
2376
|
return {
|
|
2377
2377
|
classList: [`lume-fill--${T}`, ...a],
|
|
2378
2378
|
x,
|
|
@@ -2380,7 +2380,7 @@ function Wo(t, e, r, n, o, a) {
|
|
|
2380
2380
|
width: A,
|
|
2381
2381
|
height: D,
|
|
2382
2382
|
isFaded: o.value !== -1 && o.value !== y,
|
|
2383
|
-
isNegative:
|
|
2383
|
+
isNegative: f < 0
|
|
2384
2384
|
};
|
|
2385
2385
|
}
|
|
2386
2386
|
return { barAttributeGenerator: m };
|
|
@@ -2430,32 +2430,32 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2430
2430
|
), i = v(
|
|
2431
2431
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2432
2432
|
), u = v(
|
|
2433
|
-
() => t.value.map((
|
|
2433
|
+
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2434
2434
|
);
|
|
2435
|
-
function c(
|
|
2435
|
+
function c(f, k, T) {
|
|
2436
2436
|
let x, I;
|
|
2437
|
-
return l.value ? (x = e.value(
|
|
2437
|
+
return l.value ? (x = e.value(f >= 0 ? 0 + T : f + T), I = r.value(i.value[k])) : (x = e.value(i.value[k]), I = r.value(f >= 0 ? f + T : 0 + T)), { x, y: I };
|
|
2438
2438
|
}
|
|
2439
|
-
function d(
|
|
2440
|
-
return l.value ? e.value(
|
|
2439
|
+
function d(f) {
|
|
2440
|
+
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2441
2441
|
}
|
|
2442
|
-
function s(
|
|
2443
|
-
return l.value ? e.value(0) - e.value(
|
|
2442
|
+
function s(f) {
|
|
2443
|
+
return l.value ? e.value(0) - e.value(f) : e.value.bandwidth();
|
|
2444
2444
|
}
|
|
2445
|
-
function _(
|
|
2446
|
-
return l.value ? r.value.bandwidth() : r.value(0) - r.value(
|
|
2445
|
+
function _(f) {
|
|
2446
|
+
return l.value ? r.value.bandwidth() : r.value(0) - r.value(f);
|
|
2447
2447
|
}
|
|
2448
|
-
function m(
|
|
2449
|
-
return l.value ? r.value.bandwidth() : r.value(
|
|
2448
|
+
function m(f) {
|
|
2449
|
+
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2450
2450
|
}
|
|
2451
|
-
function f
|
|
2452
|
-
return
|
|
2451
|
+
function p(f, k) {
|
|
2452
|
+
return f ? u.value.reduce((T, x, I) => (I < f && x[k] >= 0 && (T += x[k]), T), 0) : 0;
|
|
2453
2453
|
}
|
|
2454
|
-
function h(
|
|
2455
|
-
return
|
|
2454
|
+
function h(f, k) {
|
|
2455
|
+
return f ? u.value.reduce((T, x, I) => (I < f && x[k] < 0 && (T += x[k]), T), 0) : 0;
|
|
2456
2456
|
}
|
|
2457
|
-
function y(
|
|
2458
|
-
const { value: x, color: I } =
|
|
2457
|
+
function y(f, k, T) {
|
|
2458
|
+
const { value: x, color: I } = f, A = x >= 0 ? d(x) : s(x), D = x >= 0 ? _(x) : m(x), F = x >= 0 ? p(k, T) : h(k, T), { x: P, y: G } = c(x, T, F);
|
|
2459
2459
|
return {
|
|
2460
2460
|
classList: [`lume-fill--${I ?? t.value[k].color ?? Object.values(z)[k]}`, ...a],
|
|
2461
2461
|
width: A,
|
|
@@ -2498,14 +2498,14 @@ const vt = {
|
|
|
2498
2498
|
yScale: c,
|
|
2499
2499
|
classList: d,
|
|
2500
2500
|
labels: s
|
|
2501
|
-
} = B(r), _ = _e("chartID"), { emitInternalEvent: m } = Q(e, _), { groupedData:
|
|
2501
|
+
} = B(r), _ = _e("chartID"), { emitInternalEvent: m } = Q(e, _), { groupedData: p } = Ht(n, s), { barXScale: h, barYScale: y } = Mo(u, c, a), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2502
2502
|
const I = Vo(n, i), { barAttributeGenerator: A } = vt[I](
|
|
2503
2503
|
n,
|
|
2504
2504
|
h,
|
|
2505
2505
|
y,
|
|
2506
2506
|
a,
|
|
2507
2507
|
o,
|
|
2508
|
-
|
|
2508
|
+
f.value
|
|
2509
2509
|
);
|
|
2510
2510
|
return A;
|
|
2511
2511
|
}), T = v(() => {
|
|
@@ -2515,7 +2515,7 @@ const vt = {
|
|
|
2515
2515
|
async function x(I) {
|
|
2516
2516
|
e("lume__internal--hover", I), m("lume__internal--hover", I);
|
|
2517
2517
|
}
|
|
2518
|
-
return { __sfc: !0, MIXIN_MAP: vt, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData:
|
|
2518
|
+
return { __sfc: !0, MIXIN_MAP: vt, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: T, handleInternalHover: x, LumeBar: Ze };
|
|
2519
2519
|
}
|
|
2520
2520
|
});
|
|
2521
2521
|
var Yo = function() {
|
|
@@ -2663,12 +2663,12 @@ const Ua = ua.exports, ia = {
|
|
|
2663
2663
|
), { allOptions: d } = J(
|
|
2664
2664
|
i,
|
|
2665
2665
|
c
|
|
2666
|
-
), { internalData: s } = Ue(a), { groupedData: _ } = Ht(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator:
|
|
2666
|
+
), { internalData: s } = Ue(a), { groupedData: _ } = Ht(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = Zo(
|
|
2667
2667
|
_,
|
|
2668
2668
|
l,
|
|
2669
2669
|
i
|
|
2670
2670
|
);
|
|
2671
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator:
|
|
2671
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, LumeChart: ie, LumeBarGroup: Ye };
|
|
2672
2672
|
}
|
|
2673
2673
|
});
|
|
2674
2674
|
var ca = function() {
|
|
@@ -2728,7 +2728,7 @@ const Ya = va.exports, _t = 2, _a = /* @__PURE__ */ H({
|
|
|
2728
2728
|
return te(() => ke(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: _t, emit: e, root: r };
|
|
2729
2729
|
}
|
|
2730
2730
|
});
|
|
2731
|
-
var
|
|
2731
|
+
var fa = function() {
|
|
2732
2732
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2733
2733
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2734
2734
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2740,17 +2740,17 @@ var pa = function() {
|
|
|
2740
2740
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(o) {
|
|
2741
2741
|
return n.emit("click", o);
|
|
2742
2742
|
} } });
|
|
2743
|
-
},
|
|
2743
|
+
}, pa = [], ma = /* @__PURE__ */ w(
|
|
2744
2744
|
_a,
|
|
2745
|
-
pa,
|
|
2746
2745
|
fa,
|
|
2746
|
+
pa,
|
|
2747
2747
|
!1,
|
|
2748
2748
|
null,
|
|
2749
2749
|
"08896455",
|
|
2750
2750
|
null,
|
|
2751
2751
|
null
|
|
2752
2752
|
);
|
|
2753
|
-
const ha = ma.exports,
|
|
2753
|
+
const ha = ma.exports, ft = 4, ga = /* @__PURE__ */ H({
|
|
2754
2754
|
__name: "lume-point",
|
|
2755
2755
|
props: {
|
|
2756
2756
|
x: { type: Number, required: !0 },
|
|
@@ -2761,7 +2761,7 @@ const ha = ma.exports, pt = 4, ga = /* @__PURE__ */ H({
|
|
|
2761
2761
|
},
|
|
2762
2762
|
radius: {
|
|
2763
2763
|
type: Number,
|
|
2764
|
-
default:
|
|
2764
|
+
default: ft
|
|
2765
2765
|
},
|
|
2766
2766
|
active: {
|
|
2767
2767
|
type: Boolean,
|
|
@@ -2771,7 +2771,7 @@ const ha = ma.exports, pt = 4, ga = /* @__PURE__ */ H({
|
|
|
2771
2771
|
emits: ["click"],
|
|
2772
2772
|
setup(t, { emit: e }) {
|
|
2773
2773
|
const r = t, n = O(null), o = v(() => r.radius / 2);
|
|
2774
|
-
return te(() => ke(n.value)), { __sfc: !0, DEFAULT_RADIUS:
|
|
2774
|
+
return te(() => ke(n.value)), { __sfc: !0, DEFAULT_RADIUS: ft, props: r, emit: e, root: n, strokeWidth: o };
|
|
2775
2775
|
}
|
|
2776
2776
|
});
|
|
2777
2777
|
var ya = function() {
|
|
@@ -2818,10 +2818,10 @@ function Ct(t) {
|
|
|
2818
2818
|
);
|
|
2819
2819
|
if (c) {
|
|
2820
2820
|
const _ = c[0] - 1, m = c[c.length - 1] + 1;
|
|
2821
|
-
let
|
|
2822
|
-
return
|
|
2821
|
+
let p = (d = a.values[_]) == null ? void 0 : d.value, h = (s = a.values[m]) == null ? void 0 : s.value;
|
|
2822
|
+
return p == null && (p = h), h == null && (h = p), {
|
|
2823
2823
|
value: r(
|
|
2824
|
-
|
|
2824
|
+
p,
|
|
2825
2825
|
h,
|
|
2826
2826
|
c.length,
|
|
2827
2827
|
c.indexOf(u)
|
|
@@ -2846,7 +2846,7 @@ function La(t, e, r, n) {
|
|
|
2846
2846
|
Y(r) ? Ta(r, t) : Aa(r, t)
|
|
2847
2847
|
).y((a) => n(a))(e);
|
|
2848
2848
|
}
|
|
2849
|
-
const
|
|
2849
|
+
const pt = 1, Oa = /* @__PURE__ */ H({
|
|
2850
2850
|
__name: "lume-line-group",
|
|
2851
2851
|
props: {
|
|
2852
2852
|
...xe(),
|
|
@@ -2888,7 +2888,7 @@ const ft = 1, Oa = /* @__PURE__ */ H({
|
|
|
2888
2888
|
// Move to X index, Vertical line to the highest point
|
|
2889
2889
|
};
|
|
2890
2890
|
}), _ = v(
|
|
2891
|
-
() => a.value &&
|
|
2891
|
+
() => a.value && pt / (sn(a.value) - 1)
|
|
2892
2892
|
// Subtracting the first line (read below)
|
|
2893
2893
|
), m = v(
|
|
2894
2894
|
() => {
|
|
@@ -2896,19 +2896,19 @@ const ft = 1, Oa = /* @__PURE__ */ H({
|
|
|
2896
2896
|
return ((A = o.value) == null ? void 0 : A.lineWidth) * 2 || void 0;
|
|
2897
2897
|
}
|
|
2898
2898
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2899
|
-
),
|
|
2899
|
+
), p = v(
|
|
2900
2900
|
() => a.value.bandwidth() / 2
|
|
2901
2901
|
), h = v(() => a.value.domain()), y = v(
|
|
2902
2902
|
() => o.value.withPoints ?? r.withPoints
|
|
2903
2903
|
);
|
|
2904
|
-
function
|
|
2904
|
+
function f(A) {
|
|
2905
2905
|
return d.value[A].values;
|
|
2906
2906
|
}
|
|
2907
2907
|
function k(A, D) {
|
|
2908
2908
|
var P, G;
|
|
2909
2909
|
const F = A === 0 ? [] : [
|
|
2910
|
-
(P =
|
|
2911
|
-
(G =
|
|
2910
|
+
(P = f(D)[A - 1]) == null ? void 0 : P.value,
|
|
2911
|
+
(G = f(D)[A]) == null ? void 0 : G.value
|
|
2912
2912
|
];
|
|
2913
2913
|
return La(
|
|
2914
2914
|
A,
|
|
@@ -2925,16 +2925,16 @@ const ft = 1, Oa = /* @__PURE__ */ H({
|
|
|
2925
2925
|
}
|
|
2926
2926
|
function x(A, D) {
|
|
2927
2927
|
var P;
|
|
2928
|
-
const F = (P =
|
|
2928
|
+
const F = (P = f(D)[A]) == null ? void 0 : P.value;
|
|
2929
2929
|
return {
|
|
2930
|
-
x: Y(a.value) ? r.xScale(h.value[A]) +
|
|
2930
|
+
x: Y(a.value) ? r.xScale(h.value[A]) + p.value : r.xScale(A),
|
|
2931
2931
|
y: l.value(F)
|
|
2932
2932
|
};
|
|
2933
2933
|
}
|
|
2934
2934
|
function I(A) {
|
|
2935
2935
|
return r.hoveredIndex === A;
|
|
2936
2936
|
}
|
|
2937
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2937
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: pt, props: r, emit: e, data: n, options: o, xScale: a, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: T, getPointPosition: x, isPointActive: I, LumeLine: ha, LumePoint: xa };
|
|
2938
2938
|
}
|
|
2939
2939
|
});
|
|
2940
2940
|
var Ia = function() {
|
|
@@ -3024,24 +3024,24 @@ const Pa = {
|
|
|
3024
3024
|
__name: "lume-sparkline-chart",
|
|
3025
3025
|
props: {
|
|
3026
3026
|
...Xe(null),
|
|
3027
|
-
...
|
|
3027
|
+
...fe()
|
|
3028
3028
|
},
|
|
3029
3029
|
setup(t, { expose: e, emit: r }) {
|
|
3030
3030
|
const n = t, { componentEventPropagator: o } = Q(r), a = ae(M()), { data: l, options: i } = B(n), { internalData: u } = Ue(l), { allOptions: c } = J(i, Pa), { computedLineData: d } = Ct(u), { areaPathDefinition: s } = Ra(d), _ = v(() => u.value[0].color), m = v(
|
|
3031
3031
|
() => l.value[0].areaColor || _.value
|
|
3032
3032
|
);
|
|
3033
|
-
function
|
|
3033
|
+
function p(y) {
|
|
3034
3034
|
return {
|
|
3035
3035
|
...y,
|
|
3036
3036
|
noMinSize: !0
|
|
3037
3037
|
};
|
|
3038
3038
|
}
|
|
3039
|
-
function h(y,
|
|
3039
|
+
function h(y, f, k) {
|
|
3040
3040
|
return ve().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3041
3041
|
}
|
|
3042
3042
|
return e({
|
|
3043
3043
|
areaPathDefinition: s
|
|
3044
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions:
|
|
3044
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart: ie, LumeLineGroup: Dt };
|
|
3045
3045
|
}
|
|
3046
3046
|
});
|
|
3047
3047
|
var Ba = function() {
|
|
@@ -3090,7 +3090,7 @@ export {
|
|
|
3090
3090
|
Xa as LumeSingleBarChart,
|
|
3091
3091
|
Ja as LumeSparklineChart,
|
|
3092
3092
|
Ya as LumeStackedBarChart,
|
|
3093
|
-
|
|
3093
|
+
fr as LumeTooltip,
|
|
3094
3094
|
sr as LumeTooltipItem,
|
|
3095
3095
|
or as LumeTooltipSummary,
|
|
3096
3096
|
qn as LumeTooltipTitle
|