@adyen/lume 1.10.1 → 1.10.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/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts +13 -1
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts.map +1 -1
- package/dist/index.js +359 -354
- package/dist/index.js.map +1 -1
- package/dist/scss/main.scss +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as E, isRef as
|
|
1
|
+
import { defineComponent as H, ref as E, isRef as kt, computed as v, watch as D, toRefs as B, inject as Le, reactive as Oe, onMounted as ee, watchEffect as xt, onBeforeUnmount as At, useSlots as M, nextTick as He, provide as we, defineAsyncComponent as Ne } from "vue";
|
|
2
2
|
import { format as zt, ticks as Wt, scaleBand as _e, scaleLinear as fe, link as Zt, line as Ut, area as Xt } from "d3";
|
|
3
3
|
import { createPopper as Yt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as Kt, sankey as Jt, sankeyJustify as Qt } from "d3-sankey";
|
|
@@ -101,10 +101,10 @@ const rn = nn.exports, an = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function Tt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Lt(t) {
|
|
108
108
|
return (t == null ? void 0 : t.map(
|
|
109
109
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
110
110
|
).flat()) || [];
|
|
@@ -120,10 +120,10 @@ function on(t) {
|
|
|
120
120
|
function De(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ot(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, a]) => {
|
|
126
|
-
r[n] = De(t[n]) && De(a) ?
|
|
126
|
+
r[n] = De(t[n]) && De(a) ? Ot(t[n], a) : a;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function ln(t) {
|
|
@@ -135,7 +135,7 @@ function X(t) {
|
|
|
135
135
|
function un(t) {
|
|
136
136
|
return X(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function rt(t) {
|
|
139
139
|
const [e, r] = t.domain();
|
|
140
140
|
return e == null || r == null || e === 0 && r === 0;
|
|
141
141
|
}
|
|
@@ -157,8 +157,8 @@ function cn(t, e) {
|
|
|
157
157
|
}
|
|
158
158
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
const e =
|
|
160
|
+
function $t(t) {
|
|
161
|
+
const e = kt(t) ? t.value : t;
|
|
162
162
|
if (!e)
|
|
163
163
|
throw new Error("No empty array can be created from specified data value");
|
|
164
164
|
const r = Math.max(
|
|
@@ -207,7 +207,7 @@ var Y = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recomm
|
|
|
207
207
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(Y || {});
|
|
208
208
|
const mn = "[lume] ";
|
|
209
209
|
function q(t, e = !0) {
|
|
210
|
-
e &&
|
|
210
|
+
e && Tt() || console.warn(mn + "Warning: " + t);
|
|
211
211
|
}
|
|
212
212
|
const Ae = (t) => {
|
|
213
213
|
let e = null;
|
|
@@ -237,8 +237,8 @@ const Ae = (t) => {
|
|
|
237
237
|
});
|
|
238
238
|
function K(t, e) {
|
|
239
239
|
return { allOptions: v(() => {
|
|
240
|
-
const n =
|
|
241
|
-
return n ?
|
|
240
|
+
const n = kt(e) ? e == null ? void 0 : e.value : e;
|
|
241
|
+
return n ? Ot(n, t.value) : t.value;
|
|
242
242
|
}) };
|
|
243
243
|
}
|
|
244
244
|
const hn = 0.2;
|
|
@@ -271,7 +271,7 @@ const L = {
|
|
|
271
271
|
SINGLE: "single",
|
|
272
272
|
GROUPED: "grouped",
|
|
273
273
|
STACKED: "stacked"
|
|
274
|
-
},
|
|
274
|
+
}, It = "No data", at = 20, Et = 0.33, wt = 0.5, Nt = 12, me = 8, bn = 1, kn = [
|
|
275
275
|
"auto",
|
|
276
276
|
"auto-start",
|
|
277
277
|
"auto-end",
|
|
@@ -291,7 +291,7 @@ const L = {
|
|
|
291
291
|
function $e(t) {
|
|
292
292
|
t != null && t.closest("svg") || q(Y.NotContainedInSvg);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Ht = {
|
|
295
295
|
/** Displays a line for each tick. */
|
|
296
296
|
gridLines: !1,
|
|
297
297
|
/** Displays the axis title. */
|
|
@@ -308,11 +308,11 @@ const Nt = {
|
|
|
308
308
|
/** Space between the tick label and the axis line. */
|
|
309
309
|
tickPadding: 12
|
|
310
310
|
}, xn = {
|
|
311
|
-
...
|
|
311
|
+
...Ht,
|
|
312
312
|
withTitle: !1,
|
|
313
313
|
skip: !0
|
|
314
314
|
}, An = {
|
|
315
|
-
...
|
|
315
|
+
...Ht,
|
|
316
316
|
gridLines: !0
|
|
317
317
|
}, Tn = function(t, e, r) {
|
|
318
318
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
@@ -330,7 +330,7 @@ const Nt = {
|
|
|
330
330
|
return {
|
|
331
331
|
x: -(s - t.value.step()) / 2,
|
|
332
332
|
width: s,
|
|
333
|
-
height: r.value.tickPadding +
|
|
333
|
+
height: r.value.tickPadding + Nt + me
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
function l() {
|
|
@@ -406,7 +406,7 @@ const Nt = {
|
|
|
406
406
|
}
|
|
407
407
|
function o() {
|
|
408
408
|
return {
|
|
409
|
-
height: r.value.tickPadding +
|
|
409
|
+
height: r.value.tickPadding + Nt + me,
|
|
410
410
|
width: n.value,
|
|
411
411
|
x: -(n.value / 2)
|
|
412
412
|
};
|
|
@@ -518,7 +518,7 @@ const En = /* @__PURE__ */ H({
|
|
|
518
518
|
h.value === "x" ? xn : An
|
|
519
519
|
), { showTick: k } = gn(a, c, f), x = v(() => {
|
|
520
520
|
var I, g, O, N;
|
|
521
|
-
return h.value === "y" && s.value && (!a.value ||
|
|
521
|
+
return h.value === "y" && s.value && (!a.value || rt(a.value)) ? `translate(0, ${((I = o.value) == null ? void 0 : I.height) / 2})` : h.value === "x" && s.value && (!a.value || rt(a.value)) ? `translate(-${((g = o.value) == null ? void 0 : g.width) / 2}, ${(O = o.value) == null ? void 0 : O.height})` : `translate(0, ${h.value === "x" ? (N = o.value) == null ? void 0 : N.height : 0})`;
|
|
522
522
|
}), A = v(() => {
|
|
523
523
|
if (!a.value)
|
|
524
524
|
return [];
|
|
@@ -561,7 +561,7 @@ const En = /* @__PURE__ */ H({
|
|
|
561
561
|
function F(I, g, O) {
|
|
562
562
|
e("mouseenter", { index: y.value ? I : null, value: g, event: O });
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function V(I, g, O) {
|
|
565
565
|
e("click", { index: I, value: g, event: O });
|
|
566
566
|
}
|
|
567
567
|
function W(I) {
|
|
@@ -593,7 +593,7 @@ const En = /* @__PURE__ */ H({
|
|
|
593
593
|
}
|
|
594
594
|
);
|
|
595
595
|
}
|
|
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:
|
|
596
|
+
return D(a, ne, { flush: "sync", immediate: !0 }), D(a, te, { immediate: !0 }), D(c, te), D(R, (I) => e("lume__internal--axis-size", I)), D(r.containerSize, Q), ee(() => $e(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Se, POSITIONS: Re, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: s, mixins: d, tickRefs: c, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: x, ticks: A, tickFormatter: $, isHovering: T, axisLabelOffset: S, axisSize: R, formatTick: C, handleTickMouseenter: F, handleTickClick: V, getTextNode: W, setTicks: te, updateGridlines: Q, init: ne, LumeTick: rn };
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
599
|
var wn = function() {
|
|
@@ -719,7 +719,208 @@ var Pn = function() {
|
|
|
719
719
|
null
|
|
720
720
|
);
|
|
721
721
|
const Ue = Gn.exports;
|
|
722
|
-
|
|
722
|
+
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), Dt = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(Dt || {}), Xe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Xe || {}), Ye = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(Ye || {}), Ke = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(Ke || {});
|
|
723
|
+
const Fn = re.Categorical, he = z.Skyblue, Vn = Xe.SkyTeal;
|
|
724
|
+
function jn(t) {
|
|
725
|
+
return t === re.Divergent ? Vn : he;
|
|
726
|
+
}
|
|
727
|
+
function Mn(t) {
|
|
728
|
+
return Object.values(Ke).includes(t);
|
|
729
|
+
}
|
|
730
|
+
function ot(t, e) {
|
|
731
|
+
return e === re.Divergent ? Object.values(Xe).includes(t) : Object.values({
|
|
732
|
+
...z,
|
|
733
|
+
...Dt,
|
|
734
|
+
...Ye,
|
|
735
|
+
...Ke
|
|
736
|
+
}).includes(t);
|
|
737
|
+
}
|
|
738
|
+
function zn(t, e) {
|
|
739
|
+
const r = Object.values(z).indexOf(t);
|
|
740
|
+
return _n(Object.values(z), r > -1 ? r : 0)[e];
|
|
741
|
+
}
|
|
742
|
+
function Wn(t, e) {
|
|
743
|
+
const r = 50 + e * 10;
|
|
744
|
+
return `${t}-${r}`;
|
|
745
|
+
}
|
|
746
|
+
function Zn(t, e) {
|
|
747
|
+
const r = (e + 1) * 10;
|
|
748
|
+
return `${t}-${r}`;
|
|
749
|
+
}
|
|
750
|
+
function lt(t, e, r) {
|
|
751
|
+
switch (e) {
|
|
752
|
+
default:
|
|
753
|
+
case re.Categorical:
|
|
754
|
+
return Mn(t) ? t : zn(t, r);
|
|
755
|
+
case re.Sequential:
|
|
756
|
+
return Wn(t, r);
|
|
757
|
+
case re.Divergent:
|
|
758
|
+
return Zn(t, r);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
function Un(t, e, r = Fn, n) {
|
|
762
|
+
return ot(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), ot(e, r) ? lt(e, r, n) : lt(jn(r), r, n));
|
|
763
|
+
}
|
|
764
|
+
function Xn(t) {
|
|
765
|
+
return t.map((e) => ln(e) ? e : { value: e });
|
|
766
|
+
}
|
|
767
|
+
function Yn(t) {
|
|
768
|
+
return t.__internal === !0;
|
|
769
|
+
}
|
|
770
|
+
const Je = (t = null) => ({
|
|
771
|
+
data: {
|
|
772
|
+
type: Array,
|
|
773
|
+
required: !0,
|
|
774
|
+
validator: t || void 0
|
|
775
|
+
},
|
|
776
|
+
labels: {
|
|
777
|
+
type: Array,
|
|
778
|
+
default: void 0
|
|
779
|
+
},
|
|
780
|
+
color: {
|
|
781
|
+
type: String,
|
|
782
|
+
default: z.Skyblue
|
|
783
|
+
},
|
|
784
|
+
title: {
|
|
785
|
+
type: String,
|
|
786
|
+
default: null
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
function Qe(t, e, r, n, a) {
|
|
790
|
+
const o = Oe({
|
|
791
|
+
width: 0,
|
|
792
|
+
height: 0
|
|
793
|
+
}), l = pn(12), i = v(() => {
|
|
794
|
+
var d;
|
|
795
|
+
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
796
|
+
(c, _) => {
|
|
797
|
+
if (Yn(c))
|
|
798
|
+
return c;
|
|
799
|
+
const m = Xn(c.values), p = Un(
|
|
800
|
+
c.color,
|
|
801
|
+
r == null ? void 0 : r.value,
|
|
802
|
+
n == null ? void 0 : n.value.colorPalette,
|
|
803
|
+
_
|
|
804
|
+
);
|
|
805
|
+
return {
|
|
806
|
+
...c,
|
|
807
|
+
values: m,
|
|
808
|
+
color: p,
|
|
809
|
+
__internal: !0
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : $t(t.value).map((d, c) => c));
|
|
814
|
+
function s(d) {
|
|
815
|
+
const c = (a == null ? void 0 : a.value) === L.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || at) * 2) + ((n == null ? void 0 : n.value.barHeight) || at) || d.height;
|
|
816
|
+
o.width = d.width, o.height = c;
|
|
817
|
+
}
|
|
818
|
+
return {
|
|
819
|
+
chartID: l,
|
|
820
|
+
computedLabels: u,
|
|
821
|
+
containerSize: o,
|
|
822
|
+
internalData: i,
|
|
823
|
+
updateSize: s
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
const Kn = () => ({
|
|
827
|
+
xScale: {
|
|
828
|
+
type: Function,
|
|
829
|
+
default: null
|
|
830
|
+
},
|
|
831
|
+
yScale: {
|
|
832
|
+
type: Function,
|
|
833
|
+
default: null
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
function Jn(t, e, r, n, a) {
|
|
837
|
+
const o = E(null), l = E(null);
|
|
838
|
+
function i() {
|
|
839
|
+
var d, c, _, m;
|
|
840
|
+
const { width: u, height: s } = r;
|
|
841
|
+
!u && !s || (n.value === L.HORIZONTAL ? (o.value = (d = t.value) != null && d.length ? it(
|
|
842
|
+
t.value,
|
|
843
|
+
u,
|
|
844
|
+
n.value,
|
|
845
|
+
a.value.startOnZero
|
|
846
|
+
) : null, l.value = (c = e.value) != null && c.length ? ut(
|
|
847
|
+
e.value,
|
|
848
|
+
s,
|
|
849
|
+
n.value,
|
|
850
|
+
a.value
|
|
851
|
+
) : null) : (o.value = (_ = e.value) != null && _.length ? ut(
|
|
852
|
+
e.value,
|
|
853
|
+
u,
|
|
854
|
+
n.value,
|
|
855
|
+
a.value
|
|
856
|
+
) : null, l.value = (m = t.value) != null && m.length ? it(
|
|
857
|
+
t.value,
|
|
858
|
+
s,
|
|
859
|
+
n.value,
|
|
860
|
+
a.value.startOnZero
|
|
861
|
+
) : null));
|
|
862
|
+
}
|
|
863
|
+
return xt(i), { xScale: o, yScale: l };
|
|
864
|
+
}
|
|
865
|
+
function ut(t, e, r, n) {
|
|
866
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? wt : Et);
|
|
867
|
+
return Object.assign(
|
|
868
|
+
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
|
|
869
|
+
{ labels: t }
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
function it(t, e, r, n) {
|
|
873
|
+
const a = Lt(t).filter((d) => d != null), o = [0, e];
|
|
874
|
+
if (a.length === 0)
|
|
875
|
+
return fe().range(o).domain([0, 0]).nice();
|
|
876
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
877
|
+
return fe().range(o).domain(s).nice();
|
|
878
|
+
}
|
|
879
|
+
function st(t) {
|
|
880
|
+
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
881
|
+
}
|
|
882
|
+
function Ce(t, e) {
|
|
883
|
+
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
884
|
+
}
|
|
885
|
+
function ct(t, e, {
|
|
886
|
+
padding: r,
|
|
887
|
+
paddingInner: n,
|
|
888
|
+
paddingOuter: a
|
|
889
|
+
} = {}) {
|
|
890
|
+
const o = r ?? (e === L.HORIZONTAL ? wt : Et);
|
|
891
|
+
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
892
|
+
}
|
|
893
|
+
function qe(t) {
|
|
894
|
+
return Object.values(L).includes(t);
|
|
895
|
+
}
|
|
896
|
+
const ce = (t, e = !0) => ({
|
|
897
|
+
...Je(t),
|
|
898
|
+
...Kn(),
|
|
899
|
+
...pe(),
|
|
900
|
+
classList: {
|
|
901
|
+
type: [String, Array],
|
|
902
|
+
default: () => []
|
|
903
|
+
},
|
|
904
|
+
hoveredIndex: {
|
|
905
|
+
type: Number,
|
|
906
|
+
default: null
|
|
907
|
+
},
|
|
908
|
+
...e ? {
|
|
909
|
+
orientation: {
|
|
910
|
+
type: String,
|
|
911
|
+
default: L.VERTICAL,
|
|
912
|
+
validator: qe
|
|
913
|
+
}
|
|
914
|
+
} : {}
|
|
915
|
+
}), Qn = (t) => ({
|
|
916
|
+
...Je(t),
|
|
917
|
+
...pe(),
|
|
918
|
+
hoveredElement: {
|
|
919
|
+
type: [Number, String],
|
|
920
|
+
default: null
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
function qn() {
|
|
723
924
|
const t = E(), e = Oe({
|
|
724
925
|
dimensions: {}
|
|
725
926
|
}), r = new ResizeObserver((n) => {
|
|
@@ -729,11 +930,11 @@ function Fn() {
|
|
|
729
930
|
});
|
|
730
931
|
return ee(() => {
|
|
731
932
|
r.observe(t.value);
|
|
732
|
-
}),
|
|
933
|
+
}), At(() => {
|
|
733
934
|
r.unobserve(t.value);
|
|
734
935
|
}), { resizeState: e, resizeRef: t };
|
|
735
936
|
}
|
|
736
|
-
const
|
|
937
|
+
const er = /* @__PURE__ */ H({
|
|
737
938
|
__name: "lume-chart-container",
|
|
738
939
|
props: {
|
|
739
940
|
margins: {
|
|
@@ -751,18 +952,23 @@ const jn = /* @__PURE__ */ H({
|
|
|
751
952
|
noMinSize: {
|
|
752
953
|
type: Boolean,
|
|
753
954
|
default: !1
|
|
955
|
+
},
|
|
956
|
+
orientation: {
|
|
957
|
+
type: String,
|
|
958
|
+
default: L.VERTICAL,
|
|
959
|
+
validator: qe
|
|
754
960
|
}
|
|
755
961
|
},
|
|
756
962
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
757
963
|
setup(t, { emit: e }) {
|
|
758
|
-
const r = t, { margins: n, containerSize: a } = B(r), o = E(null), { resizeRef: l, resizeState: i } =
|
|
964
|
+
const r = t, { margins: n, containerSize: a } = B(r), o = E(null), { resizeRef: l, resizeState: i } = qn(), u = v(
|
|
759
965
|
() => a.value.height + n.value.top + n.value.bottom
|
|
760
966
|
);
|
|
761
967
|
return xt(() => {
|
|
762
968
|
if (!o.value)
|
|
763
969
|
return;
|
|
764
970
|
const { width: s } = i.dimensions, { height: d } = o.value.getBoundingClientRect();
|
|
765
|
-
if (!s || !d)
|
|
971
|
+
if (!s || r.orientation === L.VERTICAL && !d)
|
|
766
972
|
return;
|
|
767
973
|
const c = s - n.value.left - n.value.right, _ = d - n.value.top - n.value.bottom, m = {
|
|
768
974
|
width: c > 0 ? c : 0,
|
|
@@ -774,7 +980,7 @@ const jn = /* @__PURE__ */ H({
|
|
|
774
980
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
775
981
|
}
|
|
776
982
|
});
|
|
777
|
-
var
|
|
983
|
+
var tr = function() {
|
|
778
984
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
779
985
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
780
986
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -787,17 +993,17 @@ var Vn = function() {
|
|
|
787
993
|
}, mouseleave: function(a) {
|
|
788
994
|
return n.emit("mouseleave", a);
|
|
789
995
|
} } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.margins.left}, ${n.margins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
|
|
790
|
-
},
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
996
|
+
}, nr = [], rr = /* @__PURE__ */ w(
|
|
997
|
+
er,
|
|
998
|
+
tr,
|
|
999
|
+
nr,
|
|
794
1000
|
!1,
|
|
795
1001
|
null,
|
|
796
|
-
"
|
|
1002
|
+
"d53cdc3e",
|
|
797
1003
|
null,
|
|
798
1004
|
null
|
|
799
1005
|
);
|
|
800
|
-
const
|
|
1006
|
+
const ar = rr.exports, or = /* @__PURE__ */ H({
|
|
801
1007
|
__name: "lume-chart-legend",
|
|
802
1008
|
props: {
|
|
803
1009
|
data: {
|
|
@@ -811,7 +1017,7 @@ const Wn = zn.exports, Zn = /* @__PURE__ */ H({
|
|
|
811
1017
|
return { __sfc: !0, emit: e };
|
|
812
1018
|
}
|
|
813
1019
|
});
|
|
814
|
-
var
|
|
1020
|
+
var lr = function() {
|
|
815
1021
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
816
1022
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
817
1023
|
return n.emit("mouseleave");
|
|
@@ -822,47 +1028,47 @@ var Un = function() {
|
|
|
822
1028
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
823
1029
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
824
1030
|
}), 0);
|
|
825
|
-
},
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1031
|
+
}, ur = [], ir = /* @__PURE__ */ w(
|
|
1032
|
+
or,
|
|
1033
|
+
lr,
|
|
1034
|
+
ur,
|
|
829
1035
|
!1,
|
|
830
1036
|
null,
|
|
831
1037
|
"6f1d1c44",
|
|
832
1038
|
null,
|
|
833
1039
|
null
|
|
834
1040
|
);
|
|
835
|
-
const
|
|
836
|
-
const
|
|
837
|
-
var
|
|
1041
|
+
const sr = ir.exports;
|
|
1042
|
+
const cr = {};
|
|
1043
|
+
var dr = function() {
|
|
838
1044
|
var e = this, r = e._self._c;
|
|
839
1045
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
840
|
-
},
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
1046
|
+
}, vr = [], _r = /* @__PURE__ */ w(
|
|
1047
|
+
cr,
|
|
1048
|
+
dr,
|
|
1049
|
+
vr,
|
|
844
1050
|
!1,
|
|
845
1051
|
null,
|
|
846
1052
|
"8af3fac6",
|
|
847
1053
|
null,
|
|
848
1054
|
null
|
|
849
1055
|
);
|
|
850
|
-
const
|
|
851
|
-
const
|
|
852
|
-
var
|
|
1056
|
+
const fr = _r.exports;
|
|
1057
|
+
const pr = {};
|
|
1058
|
+
var mr = function() {
|
|
853
1059
|
var e = this, r = e._self._c;
|
|
854
1060
|
return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
|
|
855
|
-
},
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
1061
|
+
}, hr = [], gr = /* @__PURE__ */ w(
|
|
1062
|
+
pr,
|
|
1063
|
+
mr,
|
|
1064
|
+
hr,
|
|
859
1065
|
!1,
|
|
860
1066
|
null,
|
|
861
1067
|
"4ed7ec1b",
|
|
862
1068
|
null,
|
|
863
1069
|
null
|
|
864
1070
|
);
|
|
865
|
-
const
|
|
1071
|
+
const yr = gr.exports, br = /* @__PURE__ */ H({
|
|
866
1072
|
__name: "lume-tooltip-item",
|
|
867
1073
|
props: {
|
|
868
1074
|
color: {
|
|
@@ -874,20 +1080,20 @@ const lr = or.exports, ur = /* @__PURE__ */ H({
|
|
|
874
1080
|
return { __sfc: !0 };
|
|
875
1081
|
}
|
|
876
1082
|
});
|
|
877
|
-
var
|
|
1083
|
+
var kr = function() {
|
|
878
1084
|
var e = this, r = e._self._c;
|
|
879
1085
|
return e._self._setupProxy, r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [e.color ? r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${e.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }) : e._e(), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [e._t("label")], 2), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [e._t("value")], 2)]);
|
|
880
|
-
},
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
1086
|
+
}, xr = [], Ar = /* @__PURE__ */ w(
|
|
1087
|
+
br,
|
|
1088
|
+
kr,
|
|
1089
|
+
xr,
|
|
884
1090
|
!1,
|
|
885
1091
|
null,
|
|
886
1092
|
"4f995c3c",
|
|
887
1093
|
null,
|
|
888
1094
|
null
|
|
889
1095
|
);
|
|
890
|
-
const
|
|
1096
|
+
const Tr = Ar.exports, Lr = /* @__PURE__ */ H({
|
|
891
1097
|
__name: "lume-tooltip",
|
|
892
1098
|
props: {
|
|
893
1099
|
opened: {
|
|
@@ -978,10 +1184,10 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
978
1184
|
async ($, T) => {
|
|
979
1185
|
!T && $ ? (await He(), k()) : A();
|
|
980
1186
|
}
|
|
981
|
-
), ee(k),
|
|
1187
|
+
), ee(k), At(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: d, allModifiers: c, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, computedItems: f, initPopper: k, destroyPopper: x, updatePopper: A, LumeTooltipTitle: fr, LumeTooltipSummary: yr, LumeTooltipItem: Tr };
|
|
982
1188
|
}
|
|
983
1189
|
});
|
|
984
|
-
var
|
|
1190
|
+
var Or = function() {
|
|
985
1191
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
986
1192
|
return e.opened && e.targetElement ? r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
987
1193
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
@@ -1006,218 +1212,17 @@ var _r = function() {
|
|
|
1006
1212
|
});
|
|
1007
1213
|
})], 2)];
|
|
1008
1214
|
})], 2) : e._e();
|
|
1009
|
-
},
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1215
|
+
}, $r = [], Ir = /* @__PURE__ */ w(
|
|
1216
|
+
Lr,
|
|
1217
|
+
Or,
|
|
1218
|
+
$r,
|
|
1013
1219
|
!1,
|
|
1014
1220
|
null,
|
|
1015
1221
|
"e7c90551",
|
|
1016
1222
|
null,
|
|
1017
1223
|
null
|
|
1018
1224
|
);
|
|
1019
|
-
const
|
|
1020
|
-
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), Ht = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(Ht || {}), Xe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Xe || {}), Ye = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(Ye || {}), Ke = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(Ke || {});
|
|
1021
|
-
const hr = re.Categorical, he = z.Skyblue, gr = Xe.SkyTeal;
|
|
1022
|
-
function yr(t) {
|
|
1023
|
-
return t === re.Divergent ? gr : he;
|
|
1024
|
-
}
|
|
1025
|
-
function br(t) {
|
|
1026
|
-
return Object.values(Ke).includes(t);
|
|
1027
|
-
}
|
|
1028
|
-
function at(t, e) {
|
|
1029
|
-
return e === re.Divergent ? Object.values(Xe).includes(t) : Object.values({
|
|
1030
|
-
...z,
|
|
1031
|
-
...Ht,
|
|
1032
|
-
...Ye,
|
|
1033
|
-
...Ke
|
|
1034
|
-
}).includes(t);
|
|
1035
|
-
}
|
|
1036
|
-
function kr(t, e) {
|
|
1037
|
-
const r = Object.values(z).indexOf(t);
|
|
1038
|
-
return _n(Object.values(z), r > -1 ? r : 0)[e];
|
|
1039
|
-
}
|
|
1040
|
-
function xr(t, e) {
|
|
1041
|
-
const r = 50 + e * 10;
|
|
1042
|
-
return `${t}-${r}`;
|
|
1043
|
-
}
|
|
1044
|
-
function Ar(t, e) {
|
|
1045
|
-
const r = (e + 1) * 10;
|
|
1046
|
-
return `${t}-${r}`;
|
|
1047
|
-
}
|
|
1048
|
-
function ot(t, e, r) {
|
|
1049
|
-
switch (e) {
|
|
1050
|
-
default:
|
|
1051
|
-
case re.Categorical:
|
|
1052
|
-
return br(t) ? t : kr(t, r);
|
|
1053
|
-
case re.Sequential:
|
|
1054
|
-
return xr(t, r);
|
|
1055
|
-
case re.Divergent:
|
|
1056
|
-
return Ar(t, r);
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
function Tr(t, e, r = hr, n) {
|
|
1060
|
-
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(yr(r), r, n));
|
|
1061
|
-
}
|
|
1062
|
-
function Lr(t) {
|
|
1063
|
-
return t.map((e) => ln(e) ? e : { value: e });
|
|
1064
|
-
}
|
|
1065
|
-
function Or(t) {
|
|
1066
|
-
return t.__internal === !0;
|
|
1067
|
-
}
|
|
1068
|
-
const Je = (t = null) => ({
|
|
1069
|
-
data: {
|
|
1070
|
-
type: Array,
|
|
1071
|
-
required: !0,
|
|
1072
|
-
validator: t || void 0
|
|
1073
|
-
},
|
|
1074
|
-
labels: {
|
|
1075
|
-
type: Array,
|
|
1076
|
-
default: void 0
|
|
1077
|
-
},
|
|
1078
|
-
color: {
|
|
1079
|
-
type: String,
|
|
1080
|
-
default: z.Skyblue
|
|
1081
|
-
},
|
|
1082
|
-
title: {
|
|
1083
|
-
type: String,
|
|
1084
|
-
default: null
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
function Qe(t, e, r, n, a) {
|
|
1088
|
-
const o = Oe({
|
|
1089
|
-
width: 0,
|
|
1090
|
-
height: 0
|
|
1091
|
-
}), l = pn(12), i = v(() => {
|
|
1092
|
-
var d;
|
|
1093
|
-
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1094
|
-
(c, _) => {
|
|
1095
|
-
if (Or(c))
|
|
1096
|
-
return c;
|
|
1097
|
-
const m = Lr(c.values), p = Tr(
|
|
1098
|
-
c.color,
|
|
1099
|
-
r == null ? void 0 : r.value,
|
|
1100
|
-
n == null ? void 0 : n.value.colorPalette,
|
|
1101
|
-
_
|
|
1102
|
-
);
|
|
1103
|
-
return {
|
|
1104
|
-
...c,
|
|
1105
|
-
values: m,
|
|
1106
|
-
color: p,
|
|
1107
|
-
__internal: !0
|
|
1108
|
-
};
|
|
1109
|
-
}
|
|
1110
|
-
);
|
|
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;
|
|
1115
|
-
}
|
|
1116
|
-
return {
|
|
1117
|
-
chartID: l,
|
|
1118
|
-
computedLabels: u,
|
|
1119
|
-
containerSize: o,
|
|
1120
|
-
internalData: i,
|
|
1121
|
-
updateSize: s
|
|
1122
|
-
};
|
|
1123
|
-
}
|
|
1124
|
-
const $r = () => ({
|
|
1125
|
-
xScale: {
|
|
1126
|
-
type: Function,
|
|
1127
|
-
default: null
|
|
1128
|
-
},
|
|
1129
|
-
yScale: {
|
|
1130
|
-
type: Function,
|
|
1131
|
-
default: null
|
|
1132
|
-
}
|
|
1133
|
-
});
|
|
1134
|
-
function Ir(t, e, r, n, a) {
|
|
1135
|
-
const o = E(null), l = E(null);
|
|
1136
|
-
function i() {
|
|
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(
|
|
1140
|
-
t.value,
|
|
1141
|
-
u,
|
|
1142
|
-
n.value,
|
|
1143
|
-
a.value.startOnZero
|
|
1144
|
-
) : null, l.value = (c = e.value) != null && c.length ? lt(
|
|
1145
|
-
e.value,
|
|
1146
|
-
s,
|
|
1147
|
-
n.value,
|
|
1148
|
-
a.value
|
|
1149
|
-
) : null) : (o.value = (_ = e.value) != null && _.length ? lt(
|
|
1150
|
-
e.value,
|
|
1151
|
-
u,
|
|
1152
|
-
n.value,
|
|
1153
|
-
a.value
|
|
1154
|
-
) : null, l.value = (m = t.value) != null && m.length ? ut(
|
|
1155
|
-
t.value,
|
|
1156
|
-
s,
|
|
1157
|
-
n.value,
|
|
1158
|
-
a.value.startOnZero
|
|
1159
|
-
) : null));
|
|
1160
|
-
}
|
|
1161
|
-
return xt(i), { xScale: o, yScale: l };
|
|
1162
|
-
}
|
|
1163
|
-
function lt(t, e, r, n) {
|
|
1164
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? Et : It);
|
|
1165
|
-
return Object.assign(
|
|
1166
|
-
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, d) => d)),
|
|
1167
|
-
{ labels: t }
|
|
1168
|
-
);
|
|
1169
|
-
}
|
|
1170
|
-
function ut(t, e, r, n) {
|
|
1171
|
-
const a = Tt(t).filter((d) => d != null), o = [0, e];
|
|
1172
|
-
if (a.length === 0)
|
|
1173
|
-
return fe().range(o).domain([0, 0]).nice();
|
|
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();
|
|
1176
|
-
}
|
|
1177
|
-
function it(t) {
|
|
1178
|
-
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1179
|
-
}
|
|
1180
|
-
function Ce(t, e) {
|
|
1181
|
-
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1182
|
-
}
|
|
1183
|
-
function st(t, e, {
|
|
1184
|
-
padding: r,
|
|
1185
|
-
paddingInner: n,
|
|
1186
|
-
paddingOuter: a
|
|
1187
|
-
} = {}) {
|
|
1188
|
-
const o = r ?? (e === L.HORIZONTAL ? Et : It);
|
|
1189
|
-
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
1190
|
-
}
|
|
1191
|
-
function Dt(t) {
|
|
1192
|
-
return Object.values(L).includes(t);
|
|
1193
|
-
}
|
|
1194
|
-
const ce = (t, e = !0) => ({
|
|
1195
|
-
...Je(t),
|
|
1196
|
-
...$r(),
|
|
1197
|
-
...pe(),
|
|
1198
|
-
classList: {
|
|
1199
|
-
type: [String, Array],
|
|
1200
|
-
default: () => []
|
|
1201
|
-
},
|
|
1202
|
-
hoveredIndex: {
|
|
1203
|
-
type: Number,
|
|
1204
|
-
default: null
|
|
1205
|
-
},
|
|
1206
|
-
...e ? {
|
|
1207
|
-
orientation: {
|
|
1208
|
-
type: String,
|
|
1209
|
-
default: L.VERTICAL,
|
|
1210
|
-
validator: Dt
|
|
1211
|
-
}
|
|
1212
|
-
} : {}
|
|
1213
|
-
}), Er = (t) => ({
|
|
1214
|
-
...Je(t),
|
|
1215
|
-
...pe(),
|
|
1216
|
-
hoveredElement: {
|
|
1217
|
-
type: [Number, String],
|
|
1218
|
-
default: null
|
|
1219
|
-
}
|
|
1220
|
-
}), Ie = () => ({
|
|
1225
|
+
const Er = Ir.exports, Ie = () => ({
|
|
1221
1226
|
data: {
|
|
1222
1227
|
type: Array,
|
|
1223
1228
|
required: !0
|
|
@@ -1233,7 +1238,7 @@ const ce = (t, e = !0) => ({
|
|
|
1233
1238
|
orientation: {
|
|
1234
1239
|
type: String,
|
|
1235
1240
|
default: L.VERTICAL,
|
|
1236
|
-
validator:
|
|
1241
|
+
validator: qe
|
|
1237
1242
|
},
|
|
1238
1243
|
xScale: {
|
|
1239
1244
|
type: Function,
|
|
@@ -1270,7 +1275,7 @@ const ce = (t, e = !0) => ({
|
|
|
1270
1275
|
},
|
|
1271
1276
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1272
1277
|
setup(t, { emit: e }) {
|
|
1273
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() =>
|
|
1278
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() => $t(n));
|
|
1274
1279
|
function u(s) {
|
|
1275
1280
|
var y;
|
|
1276
1281
|
const d = a.value === L.HORIZONTAL ? l.value : o.value, c = d.domain(), _ = un(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = X(d) ? d(c[s]) - p / 2 : d(s) - _ / 2;
|
|
@@ -1352,7 +1357,7 @@ const Sr = Dr.exports, Rr = [
|
|
|
1352
1357
|
};
|
|
1353
1358
|
function Cr(t) {
|
|
1354
1359
|
return { hasNegativeValues: v(
|
|
1355
|
-
() =>
|
|
1360
|
+
() => Lt(t.value).some((r) => r < 0)
|
|
1356
1361
|
) };
|
|
1357
1362
|
}
|
|
1358
1363
|
function Pr(t, e, r, n) {
|
|
@@ -1393,7 +1398,7 @@ function Gr(t, e) {
|
|
|
1393
1398
|
}
|
|
1394
1399
|
), []);
|
|
1395
1400
|
}
|
|
1396
|
-
const
|
|
1401
|
+
const dt = {
|
|
1397
1402
|
"stacked-bar": Gr
|
|
1398
1403
|
};
|
|
1399
1404
|
function St(t, e, r, n, a, o, l, i) {
|
|
@@ -1405,7 +1410,7 @@ function St(t, e, r, n, a, o, l, i) {
|
|
|
1405
1410
|
);
|
|
1406
1411
|
function s(d) {
|
|
1407
1412
|
var m;
|
|
1408
|
-
const c = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value &&
|
|
1413
|
+
const c = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && dt[i.value] ? dt[i.value](
|
|
1409
1414
|
d,
|
|
1410
1415
|
c
|
|
1411
1416
|
) : Br(d, c);
|
|
@@ -1433,14 +1438,14 @@ function Fr() {
|
|
|
1433
1438
|
t.opened = !1, t.targetElement = null;
|
|
1434
1439
|
} };
|
|
1435
1440
|
}
|
|
1436
|
-
function
|
|
1441
|
+
function Vr(t) {
|
|
1437
1442
|
return { getTooltipItems: v(
|
|
1438
1443
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1439
1444
|
var l, i, u;
|
|
1440
1445
|
return {
|
|
1441
1446
|
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1442
1447
|
label: a,
|
|
1443
|
-
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ??
|
|
1448
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? It
|
|
1444
1449
|
};
|
|
1445
1450
|
})
|
|
1446
1451
|
) };
|
|
@@ -1459,7 +1464,7 @@ const Pe = 16, Be = 8, Ge = 28, Fe = 24, ae = {
|
|
|
1459
1464
|
left: Fe
|
|
1460
1465
|
}
|
|
1461
1466
|
};
|
|
1462
|
-
function
|
|
1467
|
+
function jr(t) {
|
|
1463
1468
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? Pe : t.top;
|
|
1464
1469
|
}
|
|
1465
1470
|
function Mr(t) {
|
|
@@ -1481,23 +1486,23 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1481
1486
|
}
|
|
1482
1487
|
},
|
|
1483
1488
|
setup(t, { emit: e }) {
|
|
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 } =
|
|
1489
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = B(r), d = E(-1), c = E(null), _ = E(null), m = E([]), p = E(null), h = E(0), y = E(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize: $, chartID: T } = Qe(a, o, l, f, u), { listenInternalEvent: S } = J(e, T), { xScale: R, yScale: C } = Jn(
|
|
1485
1490
|
k,
|
|
1486
1491
|
x,
|
|
1487
1492
|
A,
|
|
1488
1493
|
u,
|
|
1489
1494
|
f
|
|
1490
1495
|
), F = v(() => ({
|
|
1491
|
-
top:
|
|
1496
|
+
top: jr(f.value.margins),
|
|
1492
1497
|
right: Mr(f.value.margins),
|
|
1493
1498
|
bottom: zr(f.value.margins, h.value),
|
|
1494
1499
|
left: Wr(f.value.margins, y.value)
|
|
1495
|
-
})),
|
|
1500
|
+
})), V = v(() => {
|
|
1496
1501
|
var b;
|
|
1497
|
-
return r.xScale ?
|
|
1502
|
+
return r.xScale ? st(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
1498
1503
|
}), W = v(() => {
|
|
1499
1504
|
var b;
|
|
1500
|
-
return r.yScale ?
|
|
1505
|
+
return r.yScale ? st(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : C.value;
|
|
1501
1506
|
}), te = v(() => ({
|
|
1502
1507
|
...f.value.xAxisOptions,
|
|
1503
1508
|
withHover: u.value === L.VERTICAL
|
|
@@ -1520,38 +1525,38 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1520
1525
|
() => a.value.every((b) => !b.values.length)
|
|
1521
1526
|
), Z = v(() => {
|
|
1522
1527
|
const b = [], { noBaseScales: P } = f.value;
|
|
1523
|
-
return !P && !N.value && b.push(() => !!(
|
|
1528
|
+
return !P && !N.value && b.push(() => !!(V.value && W.value)), b.every((j) => j() === !0);
|
|
1524
1529
|
}), { hasNegativeValues: U } = Cr(k), { negativeBarAttributes: G } = Pr(
|
|
1525
1530
|
A,
|
|
1526
|
-
|
|
1531
|
+
V,
|
|
1527
1532
|
W,
|
|
1528
1533
|
u
|
|
1529
|
-
), { shouldGenerateTooltipAnchors:
|
|
1534
|
+
), { shouldGenerateTooltipAnchors: tt } = St(
|
|
1530
1535
|
m,
|
|
1531
1536
|
f,
|
|
1532
|
-
|
|
1537
|
+
V,
|
|
1533
1538
|
W,
|
|
1534
1539
|
o,
|
|
1535
1540
|
u,
|
|
1536
1541
|
k,
|
|
1537
1542
|
s
|
|
1538
|
-
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } =
|
|
1543
|
+
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } = Vr(k), ue = v(
|
|
1539
1544
|
() => {
|
|
1540
1545
|
var b;
|
|
1541
1546
|
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1542
1547
|
}
|
|
1543
|
-
),
|
|
1548
|
+
), nt = v(() => {
|
|
1544
1549
|
var P;
|
|
1545
1550
|
const b = (P = f.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1546
1551
|
return ve.opened && (!b || b && p.value === !1);
|
|
1547
1552
|
});
|
|
1548
1553
|
function be(b) {
|
|
1549
|
-
var
|
|
1554
|
+
var j;
|
|
1550
1555
|
if (f.value.withHover === !1 || b === d.value)
|
|
1551
1556
|
return;
|
|
1552
1557
|
const P = d.value;
|
|
1553
1558
|
if (d.value = b, f.value.withTooltip !== !1) {
|
|
1554
|
-
const Mt = (
|
|
1559
|
+
const Mt = (j = f.value.tooltipOptions) != null && j.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : c.value[b];
|
|
1555
1560
|
ge(Mt);
|
|
1556
1561
|
}
|
|
1557
1562
|
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
@@ -1561,7 +1566,7 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1561
1566
|
}
|
|
1562
1567
|
function Ee(b) {
|
|
1563
1568
|
if (!a.value.some(
|
|
1564
|
-
({ values:
|
|
1569
|
+
({ values: j }) => b <= j.length - 1
|
|
1565
1570
|
)) {
|
|
1566
1571
|
q(Y.InvalidHoveredIndex);
|
|
1567
1572
|
return;
|
|
@@ -1570,17 +1575,17 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1570
1575
|
}
|
|
1571
1576
|
function Gt() {
|
|
1572
1577
|
setTimeout(() => {
|
|
1573
|
-
|
|
1578
|
+
nt.value && ke(), e("chart-mouseleave");
|
|
1574
1579
|
}, 0);
|
|
1575
1580
|
}
|
|
1576
1581
|
function Ft(b) {
|
|
1577
1582
|
$(b), e("resize", b);
|
|
1578
1583
|
}
|
|
1579
|
-
function
|
|
1580
|
-
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event:
|
|
1584
|
+
function Vt({ index: b, value: P, event: j }) {
|
|
1585
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: j });
|
|
1581
1586
|
}
|
|
1582
|
-
function
|
|
1583
|
-
e("axis-click", { index: b, value: P, event:
|
|
1587
|
+
function jt({ index: b, value: P, event: j }) {
|
|
1588
|
+
e("axis-click", { index: b, value: P, event: j });
|
|
1584
1589
|
}
|
|
1585
1590
|
return D(
|
|
1586
1591
|
a,
|
|
@@ -1598,12 +1603,12 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1598
1603
|
b === !1 && ve.opened && ke();
|
|
1599
1604
|
}), ee(async () => {
|
|
1600
1605
|
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:
|
|
1606
|
+
}), we("chartID", T), we("isEmpty", N), we("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: d, tooltipAnchor: c, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: x, containerSize: A, updateSize: $, chartID: T, listenInternalEvent: S, xScale: R, yScale: C, computedMargins: F, computedXScale: V, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: I, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: tt, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: nt, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: Ee, handleMouseleave: Gt, handleResize: Ft, handleAxisMouseenter: Vt, handleAxisClick: jt, LumeAxis: Dn, LumeBar: Ue, LumeChartContainer: ar, LumeChartLegend: sr, LumeTooltip: Er, LumeOverlayGroup: Sr, TOOLTIP_ANCHOR_RADIUS: bn };
|
|
1602
1607
|
}
|
|
1603
1608
|
});
|
|
1604
1609
|
var Ur = function() {
|
|
1605
1610
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1606
|
-
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
|
|
1611
|
+
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, orientation: n.orientation, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
|
|
1607
1612
|
return n.emit("chart-click", a);
|
|
1608
1613
|
}, mouseenter: function(a) {
|
|
1609
1614
|
return n.emit("chart-mouseenter", a);
|
|
@@ -1664,11 +1669,11 @@ var Ur = function() {
|
|
|
1664
1669
|
Xr,
|
|
1665
1670
|
!1,
|
|
1666
1671
|
null,
|
|
1667
|
-
"
|
|
1672
|
+
"cffc1135",
|
|
1668
1673
|
null,
|
|
1669
1674
|
null
|
|
1670
1675
|
);
|
|
1671
|
-
const de = Yr.exports,
|
|
1676
|
+
const de = Yr.exports, vt = 8, Kr = 8, Jr = 20, se = 2, _t = 2, Qr = /* @__PURE__ */ H({
|
|
1672
1677
|
__name: "lume-alluvial-node-label",
|
|
1673
1678
|
props: {
|
|
1674
1679
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1684,7 +1689,7 @@ const de = Yr.exports, dt = 8, Kr = 8, Jr = 20, se = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1684
1689
|
if (l && i) {
|
|
1685
1690
|
a.value = i, await He();
|
|
1686
1691
|
const { width: u, height: s } = l.getBoundingClientRect();
|
|
1687
|
-
a.value = u +
|
|
1692
|
+
a.value = u + _t > i ? i : u + _t, o.value = Math.ceil(s);
|
|
1688
1693
|
}
|
|
1689
1694
|
},
|
|
1690
1695
|
{ immediate: !0 }
|
|
@@ -1757,7 +1762,7 @@ var sa = function() {
|
|
|
1757
1762
|
null
|
|
1758
1763
|
);
|
|
1759
1764
|
const va = da.exports;
|
|
1760
|
-
function
|
|
1765
|
+
function ft(t, e) {
|
|
1761
1766
|
return {
|
|
1762
1767
|
x0: 0 + (e ? e.left : 0),
|
|
1763
1768
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1766,16 +1771,16 @@ function _t(t, e) {
|
|
|
1766
1771
|
};
|
|
1767
1772
|
}
|
|
1768
1773
|
function _a(t) {
|
|
1769
|
-
const e = E(
|
|
1774
|
+
const e = E(ft(t));
|
|
1770
1775
|
function r(n) {
|
|
1771
|
-
e.value =
|
|
1776
|
+
e.value = ft(t, n);
|
|
1772
1777
|
}
|
|
1773
1778
|
return { extents: e, updateExtents: r };
|
|
1774
1779
|
}
|
|
1775
1780
|
var Te = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Te || {});
|
|
1776
1781
|
const fa = "[lume] ";
|
|
1777
|
-
function
|
|
1778
|
-
r &&
|
|
1782
|
+
function Ve(t, e, r = !0) {
|
|
1783
|
+
r && Tt() || console.error(fa + "Error: " + t, e);
|
|
1779
1784
|
}
|
|
1780
1785
|
const pa = 200;
|
|
1781
1786
|
function ie(t) {
|
|
@@ -1817,7 +1822,7 @@ function ya(t) {
|
|
|
1817
1822
|
width: e.x1 - e.x0,
|
|
1818
1823
|
height: r ? se : e.y1 - e.y0,
|
|
1819
1824
|
textTransform: {
|
|
1820
|
-
x: e.depth > 0 ? e.x1 +
|
|
1825
|
+
x: e.depth > 0 ? e.x1 + vt : e.x0 - vt,
|
|
1821
1826
|
y: (e.y1 + e.y0) / 2
|
|
1822
1827
|
},
|
|
1823
1828
|
node: e
|
|
@@ -1845,7 +1850,7 @@ function Aa(t) {
|
|
|
1845
1850
|
};
|
|
1846
1851
|
});
|
|
1847
1852
|
}
|
|
1848
|
-
function
|
|
1853
|
+
function pt(t, e, r, n, a) {
|
|
1849
1854
|
if (n === !1) {
|
|
1850
1855
|
t.node = {
|
|
1851
1856
|
...t.node,
|
|
@@ -1866,7 +1871,7 @@ const Ta = {
|
|
|
1866
1871
|
nodes: [],
|
|
1867
1872
|
links: []
|
|
1868
1873
|
};
|
|
1869
|
-
function
|
|
1874
|
+
function mt(t, e) {
|
|
1870
1875
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1871
1876
|
}
|
|
1872
1877
|
function La(t, e, r) {
|
|
@@ -1905,14 +1910,14 @@ function La(t, e, r) {
|
|
|
1905
1910
|
var c;
|
|
1906
1911
|
return (c = n.value) == null ? void 0 : c.nodes.reduce(
|
|
1907
1912
|
(_, m) => {
|
|
1908
|
-
const p =
|
|
1913
|
+
const p = mt(m, _);
|
|
1909
1914
|
return p ? (p.push(m), p.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1910
1915
|
},
|
|
1911
1916
|
[]
|
|
1912
1917
|
);
|
|
1913
1918
|
});
|
|
1914
1919
|
function u(c) {
|
|
1915
|
-
const { offset: _ } = c, m =
|
|
1920
|
+
const { offset: _ } = c, m = mt(c, i.value);
|
|
1916
1921
|
if (!m)
|
|
1917
1922
|
return;
|
|
1918
1923
|
const p = m[m.findIndex((y) => y.id === c.id) - 1], h = p && m.length !== 1 ? p.y1 + _ : _;
|
|
@@ -1940,13 +1945,13 @@ function La(t, e, r) {
|
|
|
1940
1945
|
[m, p]
|
|
1941
1946
|
])({ nodes: a.value, links: o.value });
|
|
1942
1947
|
} catch (c) {
|
|
1943
|
-
|
|
1948
|
+
Ve(Te.GraphProblem, c), n.value = Ta;
|
|
1944
1949
|
}
|
|
1945
1950
|
}), { columns: i, graph: d };
|
|
1946
1951
|
}
|
|
1947
|
-
function
|
|
1952
|
+
function je(t, e) {
|
|
1948
1953
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1949
|
-
e[r.id] = n,
|
|
1954
|
+
e[r.id] = n, je(
|
|
1950
1955
|
r,
|
|
1951
1956
|
e
|
|
1952
1957
|
);
|
|
@@ -1967,12 +1972,12 @@ const $a = (t, e) => {
|
|
|
1967
1972
|
let r;
|
|
1968
1973
|
Rt(t) ? r = {
|
|
1969
1974
|
[t.id]: t.value,
|
|
1970
|
-
...
|
|
1975
|
+
...je(t),
|
|
1971
1976
|
...Me(t)
|
|
1972
1977
|
} : r = {
|
|
1973
1978
|
[t.source.id]: t.source.value,
|
|
1974
1979
|
[t.target.id]: t.target.value,
|
|
1975
|
-
...
|
|
1980
|
+
...je(t.source),
|
|
1976
1981
|
...Me(t.target)
|
|
1977
1982
|
};
|
|
1978
1983
|
const n = Oa(r, e);
|
|
@@ -2004,7 +2009,7 @@ function Ea(t, e, r) {
|
|
|
2004
2009
|
return D(a, (o, l) => {
|
|
2005
2010
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
2006
2011
|
t.value.forEach((i) => {
|
|
2007
|
-
i.node.id in l.nodes &&
|
|
2012
|
+
i.node.id in l.nodes && pt(
|
|
2008
2013
|
i,
|
|
2009
2014
|
l.nodes[i.node.id],
|
|
2010
2015
|
i.node.value,
|
|
@@ -2015,7 +2020,7 @@ function Ea(t, e, r) {
|
|
|
2015
2020
|
return;
|
|
2016
2021
|
}
|
|
2017
2022
|
t.value.forEach((i) => {
|
|
2018
|
-
i.node.id in o.nodes &&
|
|
2023
|
+
i.node.id in o.nodes && pt(
|
|
2019
2024
|
i,
|
|
2020
2025
|
i.node.value,
|
|
2021
2026
|
o.nodes[i.node.id],
|
|
@@ -2064,11 +2069,11 @@ const wa = /* @__PURE__ */ H({
|
|
|
2064
2069
|
}, {});
|
|
2065
2070
|
}), $ = v(() => {
|
|
2066
2071
|
const g = l.value.filter(
|
|
2067
|
-
(N) =>
|
|
2072
|
+
(N) => V(N)
|
|
2068
2073
|
), O = [];
|
|
2069
2074
|
return g.forEach((N) => {
|
|
2070
2075
|
const Z = [];
|
|
2071
|
-
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G,
|
|
2076
|
+
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G, tt, ve) => {
|
|
2072
2077
|
const ge = G.link.target.y1 - G.link.target.y0 > se;
|
|
2073
2078
|
let le, ye, ue;
|
|
2074
2079
|
return ge ? (le = G.link.target.y1 - G.link.target.y0, ye = G.link.value / N.node.value, ue = ye * le) : (le = se, ue = se / ve.length), Z.push({
|
|
@@ -2100,7 +2105,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2100
2105
|
function F(g) {
|
|
2101
2106
|
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2102
2107
|
}
|
|
2103
|
-
function
|
|
2108
|
+
function V(g) {
|
|
2104
2109
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
2105
2110
|
}
|
|
2106
2111
|
function W(g, O) {
|
|
@@ -2134,7 +2139,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2134
2139
|
l.value = ya(g.nodes), i.value = Aa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2135
2140
|
}), D([r.containerSize, u], () => {
|
|
2136
2141
|
r.containerSize.width && r.containerSize.height && I();
|
|
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:
|
|
2142
|
+
}), D(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: s, updateExtents: d, columns: c, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: x, gradients: A, nodesDerivingColorFromIncomingLinks: $, getLinkStroke: T, isNodeFaded: S, isNodeFocused: R, isLinkFaded: C, isLinkFocused: F, shouldDeriveNodeColorFromIncomingLinks: V, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: I, LumeAlluvialNodeLabel: na, LumeAlluvialNodeValue: ua, LumeAlluvialNodeHeader: va, GHOST_STROKE_WIDTH_OFFSET: Kr };
|
|
2138
2143
|
}
|
|
2139
2144
|
});
|
|
2140
2145
|
var Na = function() {
|
|
@@ -2223,7 +2228,7 @@ const Sa = Da.exports, Ra = {
|
|
|
2223
2228
|
}, Ca = /* @__PURE__ */ H({
|
|
2224
2229
|
__name: "lume-alluvial-diagram",
|
|
2225
2230
|
props: {
|
|
2226
|
-
...
|
|
2231
|
+
...Qn(We)
|
|
2227
2232
|
},
|
|
2228
2233
|
setup(t, { emit: e }) {
|
|
2229
2234
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = fn(M()), { options: l } = B(r), { allOptions: i } = K(l, Ra);
|
|
@@ -2305,17 +2310,17 @@ const Fa = /* @__PURE__ */ H({
|
|
|
2305
2310
|
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: s, component: d };
|
|
2306
2311
|
}
|
|
2307
2312
|
});
|
|
2308
|
-
var
|
|
2313
|
+
var Va = function() {
|
|
2309
2314
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2310
2315
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2311
2316
|
return { key: o, fn: function(l) {
|
|
2312
2317
|
return [e._t(o, null, null, l || {})];
|
|
2313
2318
|
} };
|
|
2314
2319
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2315
|
-
},
|
|
2320
|
+
}, ja = [], Ma = /* @__PURE__ */ w(
|
|
2316
2321
|
Fa,
|
|
2317
|
-
ja,
|
|
2318
2322
|
Va,
|
|
2323
|
+
ja,
|
|
2319
2324
|
!1,
|
|
2320
2325
|
null,
|
|
2321
2326
|
null,
|
|
@@ -2372,7 +2377,7 @@ function Xa(t, e, r) {
|
|
|
2372
2377
|
() => r.value === L.HORIZONTAL
|
|
2373
2378
|
);
|
|
2374
2379
|
function a(i) {
|
|
2375
|
-
i ||
|
|
2380
|
+
i || Ve(Te.BarScaleNull), Math.min(...i.domain()) > 0 && Ve(Te.BarScaleDomainAbove0);
|
|
2376
2381
|
}
|
|
2377
2382
|
const o = v(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = v(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2378
2383
|
return { barXScale: o, barYScale: l };
|
|
@@ -2477,7 +2482,7 @@ function qa(t, e, r) {
|
|
|
2477
2482
|
});
|
|
2478
2483
|
function l(u, s, d) {
|
|
2479
2484
|
return s.length ? n.value ? fe().domain([a.value, o.value]).range([0, d.width]) : Object.assign(
|
|
2480
|
-
|
|
2485
|
+
ct(
|
|
2481
2486
|
_e().domain(s.map((c, _) => _)).range([0, d.width]),
|
|
2482
2487
|
e.value,
|
|
2483
2488
|
r.value
|
|
@@ -2487,7 +2492,7 @@ function qa(t, e, r) {
|
|
|
2487
2492
|
}
|
|
2488
2493
|
function i(u, s, d) {
|
|
2489
2494
|
return s.length ? n.value ? Object.assign(
|
|
2490
|
-
|
|
2495
|
+
ct(
|
|
2491
2496
|
_e().domain(s.map((c, _) => _)).range([0, d.height]),
|
|
2492
2497
|
e.value,
|
|
2493
2498
|
r.value
|
|
@@ -2541,7 +2546,7 @@ function eo(t, e, r, n, a, o) {
|
|
|
2541
2546
|
}
|
|
2542
2547
|
return { barAttributeGenerator: y };
|
|
2543
2548
|
}
|
|
2544
|
-
const
|
|
2549
|
+
const ht = {
|
|
2545
2550
|
single: Ka,
|
|
2546
2551
|
grouped: Qa,
|
|
2547
2552
|
stacked: eo
|
|
@@ -2572,7 +2577,7 @@ const mt = {
|
|
|
2572
2577
|
classList: d,
|
|
2573
2578
|
labels: c
|
|
2574
2579
|
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Ct(n, c), { barXScale: h, barYScale: y } = Xa(u, s, o), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2575
|
-
const $ = Ua(n, i), { barAttributeGenerator: T } =
|
|
2580
|
+
const $ = Ua(n, i), { barAttributeGenerator: T } = ht[$](
|
|
2576
2581
|
n,
|
|
2577
2582
|
h,
|
|
2578
2583
|
y,
|
|
@@ -2588,7 +2593,7 @@ const mt = {
|
|
|
2588
2593
|
async function A($) {
|
|
2589
2594
|
e("lume__internal--hover", $), m("lume__internal--hover", $);
|
|
2590
2595
|
}
|
|
2591
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2596
|
+
return { __sfc: !0, MIXIN_MAP: ht, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: d, labels: c, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: x, handleInternalHover: A, LumeBar: Ue };
|
|
2592
2597
|
}
|
|
2593
2598
|
});
|
|
2594
2599
|
var no = function() {
|
|
@@ -2616,7 +2621,7 @@ var no = function() {
|
|
|
2616
2621
|
null,
|
|
2617
2622
|
null
|
|
2618
2623
|
);
|
|
2619
|
-
const
|
|
2624
|
+
const et = ao.exports, oo = {
|
|
2620
2625
|
[L.VERTICAL]: {
|
|
2621
2626
|
withTooltip: !0,
|
|
2622
2627
|
xAxisOptions: {},
|
|
@@ -2639,7 +2644,7 @@ const qe = ao.exports, oo = {
|
|
|
2639
2644
|
() => oo[o.value || L.VERTICAL]
|
|
2640
2645
|
// needs to be computed so that default options are reactive
|
|
2641
2646
|
), { allOptions: u } = K(l, i);
|
|
2642
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup:
|
|
2647
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: et };
|
|
2643
2648
|
}
|
|
2644
2649
|
});
|
|
2645
2650
|
var uo = function() {
|
|
@@ -2688,7 +2693,7 @@ const tl = so.exports, co = {
|
|
|
2688
2693
|
l,
|
|
2689
2694
|
i
|
|
2690
2695
|
);
|
|
2691
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup:
|
|
2696
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: et };
|
|
2692
2697
|
}
|
|
2693
2698
|
});
|
|
2694
2699
|
var _o = function() {
|
|
@@ -2742,7 +2747,7 @@ const nl = po.exports, mo = {
|
|
|
2742
2747
|
l,
|
|
2743
2748
|
i
|
|
2744
2749
|
), h = v(() => r.xScale || m), y = v(() => r.yScale || p);
|
|
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:
|
|
2750
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: s, allOptions: d, internalData: c, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart: de, LumeBarGroup: et };
|
|
2746
2751
|
}
|
|
2747
2752
|
});
|
|
2748
2753
|
var go = function() {
|
|
@@ -2764,7 +2769,7 @@ var go = function() {
|
|
|
2764
2769
|
null,
|
|
2765
2770
|
null
|
|
2766
2771
|
);
|
|
2767
|
-
const rl = bo.exports,
|
|
2772
|
+
const rl = bo.exports, gt = 2, ko = /* @__PURE__ */ H({
|
|
2768
2773
|
__name: "lume-line",
|
|
2769
2774
|
props: {
|
|
2770
2775
|
pathDefinition: {
|
|
@@ -2773,7 +2778,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ H({
|
|
|
2773
2778
|
},
|
|
2774
2779
|
width: {
|
|
2775
2780
|
type: Number,
|
|
2776
|
-
default:
|
|
2781
|
+
default: gt
|
|
2777
2782
|
},
|
|
2778
2783
|
color: {
|
|
2779
2784
|
type: String,
|
|
@@ -2799,7 +2804,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ H({
|
|
|
2799
2804
|
emits: ["click"],
|
|
2800
2805
|
setup(t, { emit: e }) {
|
|
2801
2806
|
const r = E(null);
|
|
2802
|
-
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH:
|
|
2807
|
+
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: gt, emit: e, root: r };
|
|
2803
2808
|
}
|
|
2804
2809
|
});
|
|
2805
2810
|
var xo = function() {
|
|
@@ -2824,7 +2829,7 @@ var xo = function() {
|
|
|
2824
2829
|
null,
|
|
2825
2830
|
null
|
|
2826
2831
|
);
|
|
2827
|
-
const Lo = To.exports,
|
|
2832
|
+
const Lo = To.exports, yt = 4, Oo = /* @__PURE__ */ H({
|
|
2828
2833
|
__name: "lume-point",
|
|
2829
2834
|
props: {
|
|
2830
2835
|
x: { type: Number, required: !0 },
|
|
@@ -2835,7 +2840,7 @@ const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ H({
|
|
|
2835
2840
|
},
|
|
2836
2841
|
radius: {
|
|
2837
2842
|
type: Number,
|
|
2838
|
-
default:
|
|
2843
|
+
default: yt
|
|
2839
2844
|
},
|
|
2840
2845
|
active: {
|
|
2841
2846
|
type: Boolean,
|
|
@@ -2845,7 +2850,7 @@ const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ H({
|
|
|
2845
2850
|
emits: ["click"],
|
|
2846
2851
|
setup(t, { emit: e }) {
|
|
2847
2852
|
const r = t, n = E(null), a = v(() => r.radius / 2);
|
|
2848
|
-
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS:
|
|
2853
|
+
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS: yt, props: r, emit: e, root: n, strokeWidth: a };
|
|
2849
2854
|
}
|
|
2850
2855
|
});
|
|
2851
2856
|
var $o = function() {
|
|
@@ -2900,7 +2905,7 @@ function Pt(t) {
|
|
|
2900
2905
|
s.length,
|
|
2901
2906
|
s.indexOf(u)
|
|
2902
2907
|
),
|
|
2903
|
-
label:
|
|
2908
|
+
label: It
|
|
2904
2909
|
};
|
|
2905
2910
|
}
|
|
2906
2911
|
return i;
|
|
@@ -2921,7 +2926,7 @@ function Do(t, e, r, n) {
|
|
|
2921
2926
|
).y((o) => n(o));
|
|
2922
2927
|
return e.every((o) => o == null) ? null : a(e);
|
|
2923
2928
|
}
|
|
2924
|
-
const
|
|
2929
|
+
const bt = 1, So = /* @__PURE__ */ H({
|
|
2925
2930
|
__name: "lume-line-group",
|
|
2926
2931
|
props: {
|
|
2927
2932
|
...Ie(),
|
|
@@ -2963,7 +2968,7 @@ const yt = 1, So = /* @__PURE__ */ H({
|
|
|
2963
2968
|
// Move to X index, Vertical line to the highest point
|
|
2964
2969
|
};
|
|
2965
2970
|
}), _ = v(
|
|
2966
|
-
() => o.value &&
|
|
2971
|
+
() => o.value && bt / (dn(o.value) - 1)
|
|
2967
2972
|
// Subtracting the first line (read below)
|
|
2968
2973
|
), m = v(
|
|
2969
2974
|
() => {
|
|
@@ -3009,7 +3014,7 @@ const yt = 1, So = /* @__PURE__ */ H({
|
|
|
3009
3014
|
function $(T) {
|
|
3010
3015
|
return r.hoveredIndex === T;
|
|
3011
3016
|
}
|
|
3012
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
3017
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: bt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: s, computedGroupData: d, overlayLineAttributes: c, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive: $, LumeLine: Lo, LumePoint: wo };
|
|
3013
3018
|
}
|
|
3014
3019
|
});
|
|
3015
3020
|
var Ro = function() {
|
|
@@ -3060,17 +3065,17 @@ var Fo = function() {
|
|
|
3060
3065
|
return [e._t(o, null, null, l || {})];
|
|
3061
3066
|
} };
|
|
3062
3067
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3063
|
-
},
|
|
3068
|
+
}, Vo = [], jo = /* @__PURE__ */ w(
|
|
3064
3069
|
Go,
|
|
3065
3070
|
Fo,
|
|
3066
|
-
|
|
3071
|
+
Vo,
|
|
3067
3072
|
!1,
|
|
3068
3073
|
null,
|
|
3069
3074
|
null,
|
|
3070
3075
|
null,
|
|
3071
3076
|
null
|
|
3072
3077
|
);
|
|
3073
|
-
const al =
|
|
3078
|
+
const al = jo.exports;
|
|
3074
3079
|
function Mo(t) {
|
|
3075
3080
|
return { areaPathDefinition: v(
|
|
3076
3081
|
() => function(r, n) {
|
|
@@ -3164,10 +3169,10 @@ export {
|
|
|
3164
3169
|
Dn as LumeAxis,
|
|
3165
3170
|
Ue as LumeBar,
|
|
3166
3171
|
el as LumeBarChart,
|
|
3167
|
-
|
|
3172
|
+
et as LumeBarGroup,
|
|
3168
3173
|
de as LumeChart,
|
|
3169
|
-
|
|
3170
|
-
|
|
3174
|
+
ar as LumeChartContainer,
|
|
3175
|
+
sr as LumeChartLegend,
|
|
3171
3176
|
nl as LumeGroupedBarChart,
|
|
3172
3177
|
Lo as LumeLine,
|
|
3173
3178
|
al as LumeLineChart,
|
|
@@ -3177,11 +3182,11 @@ export {
|
|
|
3177
3182
|
tl as LumeSingleBarChart,
|
|
3178
3183
|
ol as LumeSparklineChart,
|
|
3179
3184
|
rl as LumeStackedBarChart,
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3185
|
+
Er as LumeTooltip,
|
|
3186
|
+
Tr as LumeTooltipItem,
|
|
3187
|
+
yr as LumeTooltipSummary,
|
|
3188
|
+
fr as LumeTooltipTitle,
|
|
3184
3189
|
Ye as OtherColors,
|
|
3185
|
-
|
|
3190
|
+
Dt as SequentialColors
|
|
3186
3191
|
};
|
|
3187
3192
|
//# sourceMappingURL=index.js.map
|