@adyen/lume 1.8.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts +2 -0
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts +9 -0
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts.map +1 -1
- package/dist/@types/composables/events.d.ts.map +1 -1
- package/dist/@types/docs/storybook-helpers.d.ts.map +1 -1
- package/dist/@types/types/events.d.ts +1 -0
- package/dist/@types/types/events.d.ts.map +1 -1
- package/dist/@types/utils/constants.d.ts +14 -2
- package/dist/@types/utils/constants.d.ts.map +1 -1
- package/dist/index.js +487 -484
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as H, ref as I, isRef as bt, computed as v, watch as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as H, ref as I, isRef as bt, computed as v, watch as D, toRefs as B, inject as Le, reactive as Oe, onMounted as ee, onBeforeUnmount as kt, watchEffect as xt, useSlots as M, provide as Ee, nextTick as tt, defineAsyncComponent as Ne } from "vue";
|
|
2
|
+
import { format as Mt, ticks as zt, scaleBand as _e, scaleLinear as fe, link as Wt, line as Zt, area as Ut } from "d3";
|
|
3
|
+
import { createPopper as Xt } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as Yt, sankey as Kt, sankeyJustify as Jt } from "d3-sankey";
|
|
5
|
+
const Qt = /* @__PURE__ */ H({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,7 +44,7 @@ const qt = /* @__PURE__ */ H({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function E(t, e, r, n, a, o, l, i) {
|
|
48
48
|
var u = typeof t == "function" ? t.options : t;
|
|
49
49
|
e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), n && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
|
|
50
50
|
var c;
|
|
@@ -73,7 +73,7 @@ function w(t, e, r, n, a, o, l, i) {
|
|
|
73
73
|
options: u
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var qt = function() {
|
|
77
77
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
78
78
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
79
79
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -83,17 +83,17 @@ var en = function() {
|
|
|
83
83
|
}, click: function(a) {
|
|
84
84
|
return n.emit("click", a);
|
|
85
85
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
86
|
-
},
|
|
86
|
+
}, en = [], tn = /* @__PURE__ */ E(
|
|
87
|
+
Qt,
|
|
87
88
|
qt,
|
|
88
89
|
en,
|
|
89
|
-
tn,
|
|
90
90
|
!1,
|
|
91
91
|
null,
|
|
92
92
|
"59ddc0a6",
|
|
93
93
|
null,
|
|
94
94
|
null
|
|
95
95
|
);
|
|
96
|
-
const
|
|
96
|
+
const nn = tn.exports, rn = [
|
|
97
97
|
"controls",
|
|
98
98
|
"legend",
|
|
99
99
|
"axes",
|
|
@@ -112,7 +112,7 @@ function Tt(t) {
|
|
|
112
112
|
function ze(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function an(t) {
|
|
116
116
|
return !!t && t.every(
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
@@ -126,20 +126,20 @@ function Lt(t, e) {
|
|
|
126
126
|
r[n] = He(t[n]) && He(a) ? Lt(t[n], a) : a;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function on(t) {
|
|
130
130
|
return t != null && He(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function X(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ln(t) {
|
|
136
136
|
return X(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
138
|
function nt(t) {
|
|
139
139
|
const [e, r] = t.domain();
|
|
140
140
|
return e == null || r == null || e === 0 && r === 0;
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const un = (t, e) => {
|
|
143
143
|
if (!t)
|
|
144
144
|
throw new Error("Data is not a valid array");
|
|
145
145
|
if (t.length === 0)
|
|
@@ -148,9 +148,9 @@ const sn = (t, e) => {
|
|
|
148
148
|
({ values: n }) => n.length - 1 >= e
|
|
149
149
|
) || q(Y.IndexExceedsLengthOfDataSets);
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function sn(t, e) {
|
|
152
152
|
var r;
|
|
153
|
-
return
|
|
153
|
+
return un(t, e), ((r = t.reduce(
|
|
154
154
|
(n, a) => {
|
|
155
155
|
var o, l;
|
|
156
156
|
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
@@ -167,13 +167,13 @@ function Ot(t) {
|
|
|
167
167
|
);
|
|
168
168
|
return Array(r).fill(null);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function cn(t) {
|
|
171
171
|
return X(t) ? t.domain().length : Math.max(...t.domain());
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function dn(t, e) {
|
|
174
174
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function vn(t, e, r) {
|
|
177
177
|
const n = r ? t.length - e : e, a = t.slice(0, n);
|
|
178
178
|
return t.slice(n).concat(a);
|
|
179
179
|
}
|
|
@@ -187,15 +187,15 @@ function oe(t) {
|
|
|
187
187
|
}
|
|
188
188
|
return t;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function _n(t) {
|
|
191
191
|
return Object.assign(
|
|
192
192
|
{},
|
|
193
193
|
...Object.keys(t).map(
|
|
194
|
-
(e) =>
|
|
194
|
+
(e) => rn.includes(e) ? {} : { [e]: t[e] }
|
|
195
195
|
)
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const fn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
199
199
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
200
200
|
""
|
|
201
201
|
);
|
|
@@ -205,16 +205,16 @@ function We(t, e) {
|
|
|
205
205
|
}
|
|
206
206
|
var Y = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
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
|
-
const
|
|
208
|
+
const pn = "[lume] ";
|
|
209
209
|
function q(t, e = !0) {
|
|
210
|
-
e && At() || console.warn(
|
|
210
|
+
e && At() || console.warn(pn + "Warning: " + t);
|
|
211
211
|
}
|
|
212
212
|
const Ae = (t) => {
|
|
213
213
|
let e = null;
|
|
214
214
|
switch (typeof t) {
|
|
215
215
|
case "string":
|
|
216
216
|
try {
|
|
217
|
-
e =
|
|
217
|
+
e = Mt(t);
|
|
218
218
|
} catch {
|
|
219
219
|
q(Y.InvalidFormat), e = null;
|
|
220
220
|
}
|
|
@@ -241,8 +241,8 @@ function K(t, e) {
|
|
|
241
241
|
return n ? Lt(n, t.value) : t.value;
|
|
242
242
|
}) };
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
244
|
+
const mn = 0.2;
|
|
245
|
+
function hn(t, e, r) {
|
|
246
246
|
const n = I(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
|
|
247
247
|
function l() {
|
|
248
248
|
if (!e.value)
|
|
@@ -251,7 +251,7 @@ function gn(t, e, r) {
|
|
|
251
251
|
(d, s) => d + s.ref.getBoundingClientRect().width,
|
|
252
252
|
0
|
|
253
253
|
), c = Math.ceil(u / o.value);
|
|
254
|
-
n.value = c + c *
|
|
254
|
+
n.value = c + c * mn;
|
|
255
255
|
}
|
|
256
256
|
function i(u) {
|
|
257
257
|
if (!e.value)
|
|
@@ -262,17 +262,17 @@ function gn(t, e, r) {
|
|
|
262
262
|
const s = a.value / d, _ = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / s);
|
|
263
263
|
return u % _ === 0;
|
|
264
264
|
}
|
|
265
|
-
return
|
|
265
|
+
return D(e, l), { showTick: i };
|
|
266
266
|
}
|
|
267
|
-
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), $t = /* @__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))($t || {}), Ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ze || {}), Ue = /* @__PURE__ */ ((t) => (t.
|
|
267
|
+
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), $t = /* @__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))($t || {}), Ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ze || {}), Ue = /* @__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))(Ue || {}), Xe = /* @__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))(Xe || {});
|
|
268
268
|
const L = {
|
|
269
269
|
HORIZONTAL: "horizontal",
|
|
270
270
|
VERTICAL: "vertical"
|
|
271
|
-
},
|
|
271
|
+
}, gn = {
|
|
272
272
|
SINGLE: "single",
|
|
273
273
|
GROUPED: "grouped",
|
|
274
274
|
STACKED: "stacked"
|
|
275
|
-
}, It = "No data", rt = 20,
|
|
275
|
+
}, It = "No data", rt = 20, wt = 0.33, Et = 0.5, Nt = 12, me = 8, yn = 1, bn = [
|
|
276
276
|
"auto",
|
|
277
277
|
"auto-start",
|
|
278
278
|
"auto-end",
|
|
@@ -308,14 +308,14 @@ const Ht = {
|
|
|
308
308
|
tickFormat: null,
|
|
309
309
|
/** Space between the tick label and the axis line. */
|
|
310
310
|
tickPadding: 8
|
|
311
|
-
},
|
|
311
|
+
}, kn = {
|
|
312
312
|
...Ht,
|
|
313
313
|
withTitle: !1,
|
|
314
314
|
skip: !0
|
|
315
|
-
},
|
|
315
|
+
}, xn = {
|
|
316
316
|
...Ht,
|
|
317
317
|
gridLines: !0
|
|
318
|
-
},
|
|
318
|
+
}, An = function(t, e, r) {
|
|
319
319
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
320
320
|
function a(u, c) {
|
|
321
321
|
return {
|
|
@@ -357,7 +357,7 @@ const Ht = {
|
|
|
357
357
|
getTickGroupAttributes: a,
|
|
358
358
|
getTickLabelAttributes: i
|
|
359
359
|
};
|
|
360
|
-
},
|
|
360
|
+
}, Tn = function(t, e, r) {
|
|
361
361
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
362
362
|
function a(u, c) {
|
|
363
363
|
return {
|
|
@@ -395,7 +395,7 @@ const Ht = {
|
|
|
395
395
|
getTickGroupAttributes: a,
|
|
396
396
|
getTickLabelAttributes: i
|
|
397
397
|
};
|
|
398
|
-
},
|
|
398
|
+
}, Ln = function(t, e, r) {
|
|
399
399
|
const n = v(() => {
|
|
400
400
|
const u = t.value.ticks();
|
|
401
401
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -430,7 +430,7 @@ const Ht = {
|
|
|
430
430
|
getTickGroupAttributes: a,
|
|
431
431
|
getTickLabelAttributes: i
|
|
432
432
|
};
|
|
433
|
-
},
|
|
433
|
+
}, On = function(t, e, r) {
|
|
434
434
|
const n = v(() => {
|
|
435
435
|
const u = t.value.ticks();
|
|
436
436
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -468,14 +468,14 @@ const Ht = {
|
|
|
468
468
|
getTickGroupAttributes: a,
|
|
469
469
|
getTickLabelAttributes: i
|
|
470
470
|
};
|
|
471
|
-
},
|
|
472
|
-
"x-band-scale-axis":
|
|
473
|
-
"y-band-scale-axis":
|
|
474
|
-
"x-linear-scale-axis":
|
|
475
|
-
"y-linear-scale-axis":
|
|
471
|
+
}, $n = {
|
|
472
|
+
"x-band-scale-axis": An,
|
|
473
|
+
"y-band-scale-axis": Tn,
|
|
474
|
+
"x-linear-scale-axis": Ln,
|
|
475
|
+
"y-linear-scale-axis": On
|
|
476
476
|
};
|
|
477
|
-
var
|
|
478
|
-
const
|
|
477
|
+
var De = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(De || {}), Se = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Se || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
478
|
+
const In = /* @__PURE__ */ H({
|
|
479
479
|
__name: "lume-axis",
|
|
480
480
|
props: {
|
|
481
481
|
scale: {
|
|
@@ -490,7 +490,7 @@ const En = /* @__PURE__ */ H({
|
|
|
490
490
|
position: {
|
|
491
491
|
type: String,
|
|
492
492
|
default: void 0,
|
|
493
|
-
validator: (t) => t in
|
|
493
|
+
validator: (t) => t in Se
|
|
494
494
|
},
|
|
495
495
|
containerSize: {
|
|
496
496
|
type: Object,
|
|
@@ -516,8 +516,8 @@ const En = /* @__PURE__ */ H({
|
|
|
516
516
|
() => h.value === "x" && u.value === L.VERTICAL || h.value === "y" && u.value === L.HORIZONTAL
|
|
517
517
|
), { allOptions: f } = K(
|
|
518
518
|
i,
|
|
519
|
-
h.value === "x" ?
|
|
520
|
-
), { showTick:
|
|
519
|
+
h.value === "x" ? kn : xn
|
|
520
|
+
), { showTick: k } = hn(a, s, f), x = v(() => {
|
|
521
521
|
var $, g, O, N;
|
|
522
522
|
return h.value === "y" && c.value && (!a.value || nt(a.value)) ? `translate(0, ${(($ = o.value) == null ? void 0 : $.height) / 2})` : h.value === "x" && c.value && (!a.value || nt(a.value)) ? `translate(-${((g = o.value) == null ? void 0 : g.width) / 2}, ${(O = o.value) == null ? void 0 : O.height})` : `translate(0, ${h.value === "x" ? (N = o.value) == null ? void 0 : N.height : 0})`;
|
|
523
523
|
}), A = v(() => {
|
|
@@ -526,21 +526,21 @@ const En = /* @__PURE__ */ H({
|
|
|
526
526
|
if (X(a.value))
|
|
527
527
|
return a.value.labels || a.value.domain();
|
|
528
528
|
const { tickCount: $ } = f.value, [g, O] = a.value.domain();
|
|
529
|
-
return
|
|
530
|
-
}),
|
|
529
|
+
return zt(g, O, $);
|
|
530
|
+
}), w = v(() => {
|
|
531
531
|
const { tickFormat: $ } = f.value;
|
|
532
532
|
return Ae($);
|
|
533
533
|
}), T = v(
|
|
534
534
|
() => f.value.withHover && y.value && l.value > -1
|
|
535
|
-
),
|
|
535
|
+
), S = v(
|
|
536
536
|
() => f.value.tickPadding + me || n
|
|
537
|
-
),
|
|
537
|
+
), C = v(() => h.value === "x" ? (
|
|
538
538
|
// If x axis, get the tick height
|
|
539
539
|
Math.max(
|
|
540
540
|
...(s.value || []).map(
|
|
541
541
|
($) => {
|
|
542
542
|
var g, O;
|
|
543
|
-
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).height) +
|
|
543
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).height) + S.value;
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
)
|
|
@@ -550,16 +550,16 @@ const En = /* @__PURE__ */ H({
|
|
|
550
550
|
...(s.value || []).map(
|
|
551
551
|
($) => {
|
|
552
552
|
var g, O;
|
|
553
|
-
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).width) +
|
|
553
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).width) + S.value;
|
|
554
554
|
}
|
|
555
555
|
)
|
|
556
556
|
)
|
|
557
557
|
));
|
|
558
558
|
function R($) {
|
|
559
559
|
const { showTicks: g } = f.value;
|
|
560
|
-
return g === !1 ? "" :
|
|
560
|
+
return g === !1 ? "" : w.value($);
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function F($, g, O) {
|
|
563
563
|
e("mouseenter", { index: y.value ? $ : null, value: g, event: O });
|
|
564
564
|
}
|
|
565
565
|
function j($, g, O) {
|
|
@@ -587,14 +587,14 @@ const En = /* @__PURE__ */ H({
|
|
|
587
587
|
function ne() {
|
|
588
588
|
if (!a.value)
|
|
589
589
|
return;
|
|
590
|
-
const $ = a.value.step ? "bandScale" : "linearScale", g =
|
|
590
|
+
const $ = a.value.step ? "bandScale" : "linearScale", g = $n[`${h.value}-${De[$]}`];
|
|
591
591
|
Object.entries(g(a, o, f) || []).forEach(
|
|
592
592
|
([O, N]) => {
|
|
593
593
|
d[O] = N;
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return D(a, ne, { flush: "sync", immediate: !0 }), D(a, te, { immediate: !0 }), D(s, te), D(C, ($) => e("lume__internal--axis-size", $)), D(r.containerSize, Q), ee(() => $e(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: De, POSITIONS: Se, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, 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: x, ticks: A, tickFormatter: w, isHovering: T, axisLabelOffset: S, axisSize: C, formatTick: R, handleTickMouseenter: F, handleTickClick: j, getTextNode: W, setTicks: te, updateGridlines: Q, init: ne, LumeTick: nn };
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
var wn = function() {
|
|
@@ -614,17 +614,17 @@ var wn = function() {
|
|
|
614
614
|
a
|
|
615
615
|
);
|
|
616
616
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
617
|
-
},
|
|
618
|
-
|
|
617
|
+
}, En = [], Nn = /* @__PURE__ */ E(
|
|
618
|
+
In,
|
|
619
619
|
wn,
|
|
620
|
-
|
|
620
|
+
En,
|
|
621
621
|
!1,
|
|
622
622
|
null,
|
|
623
623
|
null,
|
|
624
624
|
null,
|
|
625
625
|
null
|
|
626
626
|
);
|
|
627
|
-
const
|
|
627
|
+
const Hn = Nn.exports;
|
|
628
628
|
function Dn(t, e, r, n) {
|
|
629
629
|
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
630
630
|
() => n.value > 0 && n.value < 1
|
|
@@ -641,9 +641,9 @@ function Sn(t, e, r, n) {
|
|
|
641
641
|
const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
642
642
|
return ee(() => {
|
|
643
643
|
a.value = r.value, o.value = n.value;
|
|
644
|
-
}),
|
|
644
|
+
}), D(r, (i) => a.value = i), D(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
645
645
|
}
|
|
646
|
-
const
|
|
646
|
+
const Cn = /* @__PURE__ */ H({
|
|
647
647
|
__name: "lume-bar",
|
|
648
648
|
props: {
|
|
649
649
|
x: {
|
|
@@ -683,11 +683,11 @@ const Rn = /* @__PURE__ */ H({
|
|
|
683
683
|
setup(t, { emit: e }) {
|
|
684
684
|
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), c = I(null), d = v(
|
|
685
685
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
686
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Sn(n, a, o, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Dn(n, a, o, l),
|
|
687
|
-
return ee(() => $e(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth:
|
|
686
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Sn(n, a, o, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Dn(n, a, o, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : o).value), x = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), A = s.value || _.value ? m.transformOrigin : null;
|
|
687
|
+
return ee(() => $e(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, 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: x, transformOrigin: A };
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
|
-
var
|
|
690
|
+
var Rn = function() {
|
|
691
691
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
692
692
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
693
693
|
{
|
|
@@ -704,17 +704,17 @@ var Pn = function() {
|
|
|
704
704
|
}, mouseleave: function(a) {
|
|
705
705
|
return n.emit("mouseleave", a);
|
|
706
706
|
} } });
|
|
707
|
-
},
|
|
707
|
+
}, Pn = [], Bn = /* @__PURE__ */ E(
|
|
708
|
+
Cn,
|
|
708
709
|
Rn,
|
|
709
710
|
Pn,
|
|
710
|
-
Bn,
|
|
711
711
|
!1,
|
|
712
712
|
null,
|
|
713
713
|
"8e8f732a",
|
|
714
714
|
null,
|
|
715
715
|
null
|
|
716
716
|
);
|
|
717
|
-
const Ye =
|
|
717
|
+
const Ye = Bn.exports;
|
|
718
718
|
function Gn() {
|
|
719
719
|
const t = I(), e = Oe({
|
|
720
720
|
dimensions: {}
|
|
@@ -729,7 +729,7 @@ function Gn() {
|
|
|
729
729
|
r.unobserve(t.value);
|
|
730
730
|
}), { resizeState: e, resizeRef: t };
|
|
731
731
|
}
|
|
732
|
-
const
|
|
732
|
+
const Fn = /* @__PURE__ */ H({
|
|
733
733
|
__name: "lume-chart-container",
|
|
734
734
|
props: {
|
|
735
735
|
margins: {
|
|
@@ -770,7 +770,7 @@ const jn = /* @__PURE__ */ H({
|
|
|
770
770
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
771
771
|
}
|
|
772
772
|
});
|
|
773
|
-
var
|
|
773
|
+
var jn = function() {
|
|
774
774
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
775
775
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
776
776
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -783,22 +783,22 @@ var Vn = function() {
|
|
|
783
783
|
}, mouseleave: function(a) {
|
|
784
784
|
return n.emit("mouseleave", a);
|
|
785
785
|
} } }, [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);
|
|
786
|
-
},
|
|
786
|
+
}, Vn = [], Mn = /* @__PURE__ */ E(
|
|
787
|
+
Fn,
|
|
787
788
|
jn,
|
|
788
789
|
Vn,
|
|
789
|
-
Mn,
|
|
790
790
|
!1,
|
|
791
791
|
null,
|
|
792
792
|
"2c7d0302",
|
|
793
793
|
null,
|
|
794
794
|
null
|
|
795
795
|
);
|
|
796
|
-
const
|
|
796
|
+
const zn = Mn.exports, Wn = /* @__PURE__ */ H({
|
|
797
797
|
__name: "lume-chart-legend",
|
|
798
798
|
props: {
|
|
799
799
|
data: {
|
|
800
800
|
type: Array,
|
|
801
|
-
validator:
|
|
801
|
+
validator: an,
|
|
802
802
|
required: !0
|
|
803
803
|
}
|
|
804
804
|
},
|
|
@@ -807,7 +807,7 @@ const Wn = zn.exports, Zn = /* @__PURE__ */ H({
|
|
|
807
807
|
return { __sfc: !0, emit: e };
|
|
808
808
|
}
|
|
809
809
|
});
|
|
810
|
-
var
|
|
810
|
+
var Zn = function() {
|
|
811
811
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
812
812
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
813
813
|
return n.emit("mouseleave");
|
|
@@ -818,47 +818,47 @@ var Un = function() {
|
|
|
818
818
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
819
819
|
} } }, [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) + " ")]);
|
|
820
820
|
}), 0);
|
|
821
|
-
},
|
|
821
|
+
}, Un = [], Xn = /* @__PURE__ */ E(
|
|
822
|
+
Wn,
|
|
822
823
|
Zn,
|
|
823
824
|
Un,
|
|
824
|
-
Xn,
|
|
825
825
|
!1,
|
|
826
826
|
null,
|
|
827
827
|
"f8ebd3b9",
|
|
828
828
|
null,
|
|
829
829
|
null
|
|
830
830
|
);
|
|
831
|
-
const
|
|
832
|
-
const
|
|
833
|
-
var
|
|
831
|
+
const Yn = Xn.exports;
|
|
832
|
+
const Kn = {};
|
|
833
|
+
var Jn = function() {
|
|
834
834
|
var e = this, r = e._self._c;
|
|
835
835
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
836
|
-
},
|
|
836
|
+
}, Qn = [], qn = /* @__PURE__ */ E(
|
|
837
|
+
Kn,
|
|
837
838
|
Jn,
|
|
838
839
|
Qn,
|
|
839
|
-
qn,
|
|
840
840
|
!1,
|
|
841
841
|
null,
|
|
842
842
|
"8af3fac6",
|
|
843
843
|
null,
|
|
844
844
|
null
|
|
845
845
|
);
|
|
846
|
-
const
|
|
847
|
-
const
|
|
848
|
-
var
|
|
846
|
+
const er = qn.exports;
|
|
847
|
+
const tr = {};
|
|
848
|
+
var nr = function() {
|
|
849
849
|
var e = this, r = e._self._c;
|
|
850
850
|
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)]);
|
|
851
|
-
},
|
|
851
|
+
}, rr = [], ar = /* @__PURE__ */ E(
|
|
852
|
+
tr,
|
|
852
853
|
nr,
|
|
853
854
|
rr,
|
|
854
|
-
ar,
|
|
855
855
|
!1,
|
|
856
856
|
null,
|
|
857
857
|
"4ed7ec1b",
|
|
858
858
|
null,
|
|
859
859
|
null
|
|
860
860
|
);
|
|
861
|
-
const
|
|
861
|
+
const or = ar.exports, lr = /* @__PURE__ */ H({
|
|
862
862
|
__name: "lume-tooltip-item",
|
|
863
863
|
props: {
|
|
864
864
|
color: {
|
|
@@ -870,22 +870,26 @@ const lr = or.exports, ur = /* @__PURE__ */ H({
|
|
|
870
870
|
return { __sfc: !0 };
|
|
871
871
|
}
|
|
872
872
|
});
|
|
873
|
-
var
|
|
873
|
+
var ur = function() {
|
|
874
874
|
var e = this, r = e._self._c;
|
|
875
875
|
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)]);
|
|
876
|
-
},
|
|
876
|
+
}, ir = [], sr = /* @__PURE__ */ E(
|
|
877
|
+
lr,
|
|
877
878
|
ur,
|
|
878
879
|
ir,
|
|
879
|
-
sr,
|
|
880
880
|
!1,
|
|
881
881
|
null,
|
|
882
882
|
"4f995c3c",
|
|
883
883
|
null,
|
|
884
884
|
null
|
|
885
885
|
);
|
|
886
|
-
const
|
|
886
|
+
const cr = sr.exports, dr = /* @__PURE__ */ H({
|
|
887
887
|
__name: "lume-tooltip",
|
|
888
888
|
props: {
|
|
889
|
+
opened: {
|
|
890
|
+
type: Boolean,
|
|
891
|
+
default: !1
|
|
892
|
+
},
|
|
889
893
|
targetElement: {
|
|
890
894
|
type: Element,
|
|
891
895
|
default: null
|
|
@@ -897,7 +901,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
897
901
|
position: {
|
|
898
902
|
type: String,
|
|
899
903
|
default: "auto",
|
|
900
|
-
validator: (t) =>
|
|
904
|
+
validator: (t) => bn.includes(t)
|
|
901
905
|
},
|
|
902
906
|
fixedPositioning: {
|
|
903
907
|
type: Boolean,
|
|
@@ -944,38 +948,38 @@ const dr = cr.exports, vr = /* @__PURE__ */ H({
|
|
|
944
948
|
() => u.value.showTitle !== !1 && r.title != null
|
|
945
949
|
), m = v(() => Ae(u.value.valueFormat)), p = v(() => Ae(u.value.titleFormat)), h = v(
|
|
946
950
|
() => {
|
|
947
|
-
var
|
|
948
|
-
return ((
|
|
951
|
+
var w;
|
|
952
|
+
return ((w = a.value) == null ? void 0 : w.find((T) => T.isSummary)) || {
|
|
949
953
|
label: u.value.summary ?? r.summary
|
|
950
954
|
};
|
|
951
955
|
}
|
|
952
956
|
), y = v(() => l.summary || h.value.label), f = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
|
|
953
|
-
function
|
|
954
|
-
r.targetElement && n.value && (i.value =
|
|
957
|
+
function k() {
|
|
958
|
+
r.targetElement && n.value && (i.value = Xt(r.targetElement, n.value, {
|
|
955
959
|
placement: r.position,
|
|
956
960
|
strategy: d.value,
|
|
957
961
|
modifiers: s.value
|
|
958
962
|
}), e("opened", r.targetElement));
|
|
959
963
|
}
|
|
960
964
|
function x() {
|
|
961
|
-
i.value && (i.value.destroy(), e("closed"));
|
|
965
|
+
i.value && (i.value.destroy(), e("closed"), n.value.classList.remove("lume-tooltip--animated"));
|
|
962
966
|
}
|
|
963
967
|
function A() {
|
|
964
968
|
i.value && (u.value.withAnimation !== !1 && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
965
969
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
966
970
|
}() : x());
|
|
967
971
|
}
|
|
968
|
-
return
|
|
972
|
+
return D(
|
|
969
973
|
() => r.targetElement,
|
|
970
|
-
(
|
|
971
|
-
!T &&
|
|
974
|
+
(w, T) => {
|
|
975
|
+
!T && w ? k() : A();
|
|
972
976
|
}
|
|
973
|
-
), ee(
|
|
977
|
+
), ee(k), kt(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, computedItems: f, initPopper: k, destroyPopper: x, updatePopper: A, LumeTooltipTitle: er, LumeTooltipSummary: or, LumeTooltipItem: cr };
|
|
974
978
|
}
|
|
975
979
|
});
|
|
976
|
-
var
|
|
980
|
+
var vr = function() {
|
|
977
981
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
978
|
-
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.targetElement, expression: "targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
982
|
+
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.opened && e.targetElement, expression: "opened && targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
979
983
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
980
984
|
}, attrs: { "data-j-tooltip": "" }, on: { mouseenter: function(a) {
|
|
981
985
|
return n.emit("tooltip-mouseenter");
|
|
@@ -998,23 +1002,23 @@ var _r = function() {
|
|
|
998
1002
|
});
|
|
999
1003
|
})], 2)];
|
|
1000
1004
|
})], 2);
|
|
1001
|
-
},
|
|
1005
|
+
}, _r = [], fr = /* @__PURE__ */ E(
|
|
1006
|
+
dr,
|
|
1002
1007
|
vr,
|
|
1003
1008
|
_r,
|
|
1004
|
-
fr,
|
|
1005
1009
|
!1,
|
|
1006
1010
|
null,
|
|
1007
|
-
"
|
|
1011
|
+
"e0426df7",
|
|
1008
1012
|
null,
|
|
1009
1013
|
null
|
|
1010
1014
|
);
|
|
1011
|
-
const
|
|
1015
|
+
const pr = fr.exports;
|
|
1012
1016
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1015
|
-
return t === re.Divergent ?
|
|
1017
|
+
const mr = re.Categorical, he = z.Skyblue, hr = Ze.SkyTeal;
|
|
1018
|
+
function gr(t) {
|
|
1019
|
+
return t === re.Divergent ? hr : he;
|
|
1016
1020
|
}
|
|
1017
|
-
function
|
|
1021
|
+
function yr(t) {
|
|
1018
1022
|
return Object.values(Xe).includes(t);
|
|
1019
1023
|
}
|
|
1020
1024
|
function at(t, e) {
|
|
@@ -1025,15 +1029,15 @@ function at(t, e) {
|
|
|
1025
1029
|
...Xe
|
|
1026
1030
|
}).includes(t);
|
|
1027
1031
|
}
|
|
1028
|
-
function
|
|
1032
|
+
function br(t, e) {
|
|
1029
1033
|
const r = Object.values(z).indexOf(t);
|
|
1030
|
-
return
|
|
1034
|
+
return vn(Object.values(z), r > -1 ? r : 0)[e];
|
|
1031
1035
|
}
|
|
1032
|
-
function
|
|
1036
|
+
function kr(t, e) {
|
|
1033
1037
|
const r = 50 + e * 10;
|
|
1034
1038
|
return `${t}-${r}`;
|
|
1035
1039
|
}
|
|
1036
|
-
function
|
|
1040
|
+
function xr(t, e) {
|
|
1037
1041
|
const r = (e + 1) * 10;
|
|
1038
1042
|
return `${t}-${r}`;
|
|
1039
1043
|
}
|
|
@@ -1041,20 +1045,20 @@ function ot(t, e, r) {
|
|
|
1041
1045
|
switch (e) {
|
|
1042
1046
|
default:
|
|
1043
1047
|
case re.Categorical:
|
|
1044
|
-
return
|
|
1048
|
+
return yr(t) ? t : br(t, r);
|
|
1045
1049
|
case re.Sequential:
|
|
1046
|
-
return
|
|
1050
|
+
return kr(t, r);
|
|
1047
1051
|
case re.Divergent:
|
|
1048
|
-
return
|
|
1052
|
+
return xr(t, r);
|
|
1049
1053
|
}
|
|
1050
1054
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(
|
|
1055
|
+
function Ar(t, e, r = mr, n) {
|
|
1056
|
+
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(gr(r), r, n));
|
|
1053
1057
|
}
|
|
1054
|
-
function
|
|
1055
|
-
return t.map((e) =>
|
|
1058
|
+
function Tr(t) {
|
|
1059
|
+
return t.map((e) => on(e) ? e : { value: e });
|
|
1056
1060
|
}
|
|
1057
|
-
function
|
|
1061
|
+
function Lr(t) {
|
|
1058
1062
|
return t.__internal === !0;
|
|
1059
1063
|
}
|
|
1060
1064
|
const Ke = (t = null) => ({
|
|
@@ -1080,13 +1084,13 @@ function Je(t, e, r, n, a) {
|
|
|
1080
1084
|
const o = Oe({
|
|
1081
1085
|
width: 0,
|
|
1082
1086
|
height: 0
|
|
1083
|
-
}), l =
|
|
1087
|
+
}), l = fn(12), i = v(() => {
|
|
1084
1088
|
var d;
|
|
1085
1089
|
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1086
1090
|
(s, _) => {
|
|
1087
|
-
if (
|
|
1091
|
+
if (Lr(s))
|
|
1088
1092
|
return s;
|
|
1089
|
-
const m =
|
|
1093
|
+
const m = Tr(s.values), p = Ar(
|
|
1090
1094
|
s.color,
|
|
1091
1095
|
r == null ? void 0 : r.value,
|
|
1092
1096
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -1113,7 +1117,7 @@ function Je(t, e, r, n, a) {
|
|
|
1113
1117
|
updateSize: c
|
|
1114
1118
|
};
|
|
1115
1119
|
}
|
|
1116
|
-
const
|
|
1120
|
+
const Or = () => ({
|
|
1117
1121
|
xScale: {
|
|
1118
1122
|
type: Function,
|
|
1119
1123
|
default: null
|
|
@@ -1123,7 +1127,7 @@ const $r = () => ({
|
|
|
1123
1127
|
default: null
|
|
1124
1128
|
}
|
|
1125
1129
|
});
|
|
1126
|
-
function
|
|
1130
|
+
function $r(t, e, r, n, a) {
|
|
1127
1131
|
const o = I(null), l = I(null);
|
|
1128
1132
|
function i() {
|
|
1129
1133
|
var d, s, _, m;
|
|
@@ -1153,7 +1157,7 @@ function Ir(t, e, r, n, a) {
|
|
|
1153
1157
|
return xt(i), { xScale: o, yScale: l };
|
|
1154
1158
|
}
|
|
1155
1159
|
function lt(t, e, r, n) {
|
|
1156
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ?
|
|
1160
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === L.HORIZONTAL ? Et : wt);
|
|
1157
1161
|
return Object.assign(
|
|
1158
1162
|
_e().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1159
1163
|
{ labels: t }
|
|
@@ -1169,7 +1173,7 @@ function ut(t, e, r, n) {
|
|
|
1169
1173
|
function it(t) {
|
|
1170
1174
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1171
1175
|
}
|
|
1172
|
-
function
|
|
1176
|
+
function Ce(t, e) {
|
|
1173
1177
|
return X(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1174
1178
|
}
|
|
1175
1179
|
function st(t, e, {
|
|
@@ -1177,15 +1181,15 @@ function st(t, e, {
|
|
|
1177
1181
|
paddingInner: n,
|
|
1178
1182
|
paddingOuter: a
|
|
1179
1183
|
} = {}) {
|
|
1180
|
-
const o = r ?? (e === L.HORIZONTAL ?
|
|
1184
|
+
const o = r ?? (e === L.HORIZONTAL ? Et : wt);
|
|
1181
1185
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
1182
1186
|
}
|
|
1183
|
-
function
|
|
1187
|
+
function Dt(t) {
|
|
1184
1188
|
return Object.values(L).includes(t);
|
|
1185
1189
|
}
|
|
1186
|
-
const
|
|
1190
|
+
const ce = (t, e = !0) => ({
|
|
1187
1191
|
...Ke(t),
|
|
1188
|
-
|
|
1192
|
+
...Or(),
|
|
1189
1193
|
...pe(),
|
|
1190
1194
|
classList: {
|
|
1191
1195
|
type: [String, Array],
|
|
@@ -1199,10 +1203,10 @@ const de = (t, e = !0) => ({
|
|
|
1199
1203
|
orientation: {
|
|
1200
1204
|
type: String,
|
|
1201
1205
|
default: L.VERTICAL,
|
|
1202
|
-
validator:
|
|
1206
|
+
validator: Dt
|
|
1203
1207
|
}
|
|
1204
1208
|
} : {}
|
|
1205
|
-
}),
|
|
1209
|
+
}), Ir = (t) => ({
|
|
1206
1210
|
...Ke(t),
|
|
1207
1211
|
...pe(),
|
|
1208
1212
|
hoveredElement: {
|
|
@@ -1225,7 +1229,7 @@ const de = (t, e = !0) => ({
|
|
|
1225
1229
|
orientation: {
|
|
1226
1230
|
type: String,
|
|
1227
1231
|
default: L.VERTICAL,
|
|
1228
|
-
validator:
|
|
1232
|
+
validator: Dt
|
|
1229
1233
|
},
|
|
1230
1234
|
xScale: {
|
|
1231
1235
|
type: Function,
|
|
@@ -1265,7 +1269,7 @@ const de = (t, e = !0) => ({
|
|
|
1265
1269
|
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() => Ot(n));
|
|
1266
1270
|
function u(c) {
|
|
1267
1271
|
var y;
|
|
1268
|
-
const d = a.value === L.HORIZONTAL ? l.value : o.value, s = d.domain(), _ =
|
|
1272
|
+
const d = a.value === L.HORIZONTAL ? l.value : o.value, s = d.domain(), _ = ln(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = X(d) ? d(s[c]) - p / 2 : d(c) - _ / 2;
|
|
1269
1273
|
return a.value === L.HORIZONTAL ? {
|
|
1270
1274
|
width: Math.max(...o.value.range()),
|
|
1271
1275
|
height: _,
|
|
@@ -1279,7 +1283,7 @@ const de = (t, e = !0) => ({
|
|
|
1279
1283
|
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ye };
|
|
1280
1284
|
}
|
|
1281
1285
|
});
|
|
1282
|
-
var
|
|
1286
|
+
var Er = function() {
|
|
1283
1287
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1284
1288
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1285
1289
|
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
@@ -1288,17 +1292,17 @@ var Nr = function() {
|
|
|
1288
1292
|
return n.emit("click", { index: o, event: l });
|
|
1289
1293
|
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1290
1294
|
}), 1);
|
|
1291
|
-
},
|
|
1295
|
+
}, Nr = [], Hr = /* @__PURE__ */ E(
|
|
1292
1296
|
wr,
|
|
1297
|
+
Er,
|
|
1293
1298
|
Nr,
|
|
1294
|
-
Hr,
|
|
1295
1299
|
!1,
|
|
1296
1300
|
null,
|
|
1297
1301
|
null,
|
|
1298
1302
|
null,
|
|
1299
1303
|
null
|
|
1300
1304
|
);
|
|
1301
|
-
const Dr =
|
|
1305
|
+
const Dr = Hr.exports, Sr = [
|
|
1302
1306
|
"axis-click",
|
|
1303
1307
|
"axis-mouseenter",
|
|
1304
1308
|
"axis-mouseleave",
|
|
@@ -1324,7 +1328,8 @@ const Dr = Cr.exports, Sr = [
|
|
|
1324
1328
|
"tooltip-opened",
|
|
1325
1329
|
"tooltip-moved",
|
|
1326
1330
|
"tooltip-closed",
|
|
1327
|
-
"hovered-index-changed"
|
|
1331
|
+
"hovered-index-changed",
|
|
1332
|
+
"update:hoveredIndex"
|
|
1328
1333
|
], J = (t, e) => {
|
|
1329
1334
|
function r(o, ...l) {
|
|
1330
1335
|
document.dispatchEvent(
|
|
@@ -1341,12 +1346,12 @@ const Dr = Cr.exports, Sr = [
|
|
|
1341
1346
|
}
|
|
1342
1347
|
return { componentEventPropagator: Sr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1343
1348
|
};
|
|
1344
|
-
function
|
|
1349
|
+
function Cr(t) {
|
|
1345
1350
|
return { hasNegativeValues: v(
|
|
1346
1351
|
() => Tt(t.value).some((r) => r < 0)
|
|
1347
1352
|
) };
|
|
1348
1353
|
}
|
|
1349
|
-
function
|
|
1354
|
+
function Rr(t, e, r, n) {
|
|
1350
1355
|
const a = v(
|
|
1351
1356
|
() => n.value === L.HORIZONTAL
|
|
1352
1357
|
), o = v(
|
|
@@ -1371,12 +1376,12 @@ function Pr(t, e, r, n) {
|
|
|
1371
1376
|
transform: i.value
|
|
1372
1377
|
})) };
|
|
1373
1378
|
}
|
|
1374
|
-
function
|
|
1379
|
+
function Pr(t, e) {
|
|
1375
1380
|
return t.reduce((r, n) => We(n.values, e).map(
|
|
1376
1381
|
(a, o) => r[o] ? a.value > r[o] ? a.value : r[o] : a.value ?? 0
|
|
1377
1382
|
), []);
|
|
1378
1383
|
}
|
|
1379
|
-
function
|
|
1384
|
+
function Br(t, e) {
|
|
1380
1385
|
return t.reduce((r, n) => We(n.values, e).map(
|
|
1381
1386
|
(a, o) => {
|
|
1382
1387
|
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
@@ -1385,9 +1390,9 @@ function Fr(t, e) {
|
|
|
1385
1390
|
), []);
|
|
1386
1391
|
}
|
|
1387
1392
|
const ct = {
|
|
1388
|
-
"stacked-bar":
|
|
1393
|
+
"stacked-bar": Br
|
|
1389
1394
|
};
|
|
1390
|
-
function
|
|
1395
|
+
function St(t, e, r, n, a, o, l, i) {
|
|
1391
1396
|
const u = v(
|
|
1392
1397
|
() => {
|
|
1393
1398
|
var d;
|
|
@@ -1399,13 +1404,13 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1399
1404
|
const s = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && ct[i.value] ? ct[i.value](
|
|
1400
1405
|
d,
|
|
1401
1406
|
s
|
|
1402
|
-
) :
|
|
1407
|
+
) : Pr(d, s);
|
|
1403
1408
|
t.value = _.map((p, h) => ({
|
|
1404
|
-
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) :
|
|
1405
|
-
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ?
|
|
1409
|
+
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) : Ce(r.value, h),
|
|
1410
|
+
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(p)
|
|
1406
1411
|
}));
|
|
1407
1412
|
}
|
|
1408
|
-
return
|
|
1413
|
+
return D(
|
|
1409
1414
|
[r, n],
|
|
1410
1415
|
() => {
|
|
1411
1416
|
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
@@ -1424,7 +1429,7 @@ function Gr() {
|
|
|
1424
1429
|
t.opened = !1, t.targetElement = null;
|
|
1425
1430
|
} };
|
|
1426
1431
|
}
|
|
1427
|
-
function
|
|
1432
|
+
function Fr(t) {
|
|
1428
1433
|
return { getTooltipItems: v(
|
|
1429
1434
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1430
1435
|
var l, i, u;
|
|
@@ -1436,59 +1441,59 @@ function jr(t) {
|
|
|
1436
1441
|
})
|
|
1437
1442
|
) };
|
|
1438
1443
|
}
|
|
1439
|
-
const Re = 16, Pe = 8, Be = 28,
|
|
1444
|
+
const Re = 16, Pe = 8, Be = 28, Ge = 24, ae = {
|
|
1440
1445
|
VERTICAL: {
|
|
1441
1446
|
top: Re,
|
|
1442
1447
|
right: Pe,
|
|
1443
1448
|
bottom: Be,
|
|
1444
|
-
left:
|
|
1449
|
+
left: Ge
|
|
1445
1450
|
},
|
|
1446
1451
|
HORIZONTAL: {
|
|
1447
1452
|
top: Re,
|
|
1448
1453
|
right: Pe,
|
|
1449
1454
|
bottom: Be,
|
|
1450
|
-
left:
|
|
1455
|
+
left: Ge
|
|
1451
1456
|
}
|
|
1452
1457
|
};
|
|
1453
|
-
function
|
|
1458
|
+
function jr(t) {
|
|
1454
1459
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? Re : t.top;
|
|
1455
1460
|
}
|
|
1456
|
-
function
|
|
1461
|
+
function Vr(t) {
|
|
1457
1462
|
return !t || t === "auto" || t.right == null || t.right === "auto" ? Pe : t.right;
|
|
1458
1463
|
}
|
|
1459
|
-
function
|
|
1464
|
+
function Mr(t, e) {
|
|
1460
1465
|
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Be : t.bottom;
|
|
1461
1466
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1467
|
+
function zr(t, e) {
|
|
1468
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Ge : t.left;
|
|
1464
1469
|
}
|
|
1465
|
-
const
|
|
1470
|
+
const Wr = /* @__PURE__ */ H({
|
|
1466
1471
|
__name: "lume-chart",
|
|
1467
1472
|
props: {
|
|
1468
|
-
...
|
|
1473
|
+
...ce(),
|
|
1469
1474
|
chartType: {
|
|
1470
1475
|
type: String,
|
|
1471
1476
|
default: null
|
|
1472
1477
|
}
|
|
1473
1478
|
},
|
|
1474
1479
|
setup(t, { emit: e }) {
|
|
1475
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d = I(-1), s = I(null), _ = I(null), m = I([]), p = I(null), h = I(0), y = I(0), { allOptions: f } = K(i), { internalData:
|
|
1476
|
-
|
|
1480
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d = I(-1), s = I(null), _ = I(null), m = I([]), p = I(null), h = I(0), y = I(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize: w, chartID: T } = Je(a, o, l, f, u), { listenInternalEvent: S } = J(e, T), { xScale: C, yScale: R } = $r(
|
|
1481
|
+
k,
|
|
1477
1482
|
x,
|
|
1478
1483
|
A,
|
|
1479
1484
|
u,
|
|
1480
1485
|
f
|
|
1481
|
-
),
|
|
1482
|
-
top:
|
|
1483
|
-
right:
|
|
1484
|
-
bottom:
|
|
1485
|
-
left:
|
|
1486
|
+
), F = v(() => ({
|
|
1487
|
+
top: jr(f.value.margins),
|
|
1488
|
+
right: Vr(f.value.margins),
|
|
1489
|
+
bottom: Mr(f.value.margins, h.value),
|
|
1490
|
+
left: zr(f.value.margins, y.value)
|
|
1486
1491
|
})), j = v(() => {
|
|
1487
|
-
var
|
|
1488
|
-
return r.xScale ? it(r.xScale) ? r.xScale : (
|
|
1492
|
+
var b;
|
|
1493
|
+
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : C.value;
|
|
1489
1494
|
}), W = v(() => {
|
|
1490
|
-
var
|
|
1491
|
-
return r.yScale ? it(r.yScale) ? r.yScale : (
|
|
1495
|
+
var b;
|
|
1496
|
+
return r.yScale ? it(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
1492
1497
|
}), te = v(() => ({
|
|
1493
1498
|
...f.value.xAxisOptions,
|
|
1494
1499
|
withHover: u.value === L.VERTICAL
|
|
@@ -1496,102 +1501,100 @@ const Zr = /* @__PURE__ */ H({
|
|
|
1496
1501
|
...f.value.yAxisOptions,
|
|
1497
1502
|
withHover: u.value === L.HORIZONTAL
|
|
1498
1503
|
})), ne = v(() => {
|
|
1499
|
-
var
|
|
1500
|
-
return (
|
|
1504
|
+
var b;
|
|
1505
|
+
return (b = f.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1501
1506
|
}), $ = v(() => {
|
|
1502
|
-
var
|
|
1503
|
-
return (
|
|
1507
|
+
var b;
|
|
1508
|
+
return (b = f.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1504
1509
|
}), g = v(() => {
|
|
1505
|
-
var
|
|
1506
|
-
return ((
|
|
1510
|
+
var b;
|
|
1511
|
+
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && ne.value;
|
|
1507
1512
|
}), O = v(() => {
|
|
1508
|
-
var
|
|
1509
|
-
return ((
|
|
1513
|
+
var b;
|
|
1514
|
+
return ((b = f.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && $.value;
|
|
1510
1515
|
}), N = v(
|
|
1511
|
-
() => a.value.every((
|
|
1516
|
+
() => a.value.every((b) => !b.values.length)
|
|
1512
1517
|
), Z = v(() => {
|
|
1513
|
-
const
|
|
1514
|
-
return !P && !N.value &&
|
|
1515
|
-
}), { hasNegativeValues: U } =
|
|
1518
|
+
const b = [], { noBaseScales: P } = f.value;
|
|
1519
|
+
return !P && !N.value && b.push(() => !!(j.value && W.value)), b.every((V) => V() === !0);
|
|
1520
|
+
}), { hasNegativeValues: U } = Cr(k), { negativeBarAttributes: G } = Rr(
|
|
1516
1521
|
A,
|
|
1517
1522
|
j,
|
|
1518
1523
|
W,
|
|
1519
1524
|
u
|
|
1520
|
-
), { shouldGenerateTooltipAnchors: qe } =
|
|
1525
|
+
), { shouldGenerateTooltipAnchors: qe } = St(
|
|
1521
1526
|
m,
|
|
1522
1527
|
f,
|
|
1523
1528
|
j,
|
|
1524
1529
|
W,
|
|
1525
1530
|
o,
|
|
1526
1531
|
u,
|
|
1527
|
-
|
|
1532
|
+
k,
|
|
1528
1533
|
c
|
|
1529
|
-
), { tooltipConfig:
|
|
1530
|
-
() => f.value.withTooltip !== !1 && le.opened
|
|
1531
|
-
), Ft = v(
|
|
1534
|
+
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Gr(), { getTooltipItems: ye } = Fr(k), ue = v(
|
|
1532
1535
|
() => {
|
|
1533
|
-
var
|
|
1534
|
-
return ((
|
|
1536
|
+
var b;
|
|
1537
|
+
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1535
1538
|
}
|
|
1536
1539
|
), et = v(() => {
|
|
1537
1540
|
var P;
|
|
1538
|
-
const
|
|
1539
|
-
return
|
|
1541
|
+
const b = (P = f.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1542
|
+
return ve.opened && (!b || b && p.value === !1);
|
|
1540
1543
|
});
|
|
1541
|
-
function be(
|
|
1544
|
+
function be(b) {
|
|
1542
1545
|
var V;
|
|
1543
|
-
if (
|
|
1546
|
+
if (b === d.value)
|
|
1544
1547
|
return;
|
|
1545
1548
|
const P = d.value;
|
|
1546
|
-
if (f.value.withHover !== !1 && (d.value =
|
|
1547
|
-
const
|
|
1548
|
-
ge(
|
|
1549
|
+
if (f.value.withHover !== !1 && (d.value = b), f.value.withTooltip !== !1) {
|
|
1550
|
+
const Vt = (V = f.value.tooltipOptions) != null && V.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : s.value[b];
|
|
1551
|
+
ge(Vt);
|
|
1549
1552
|
}
|
|
1550
|
-
e("hovered-index-changed", { newIndex:
|
|
1553
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
1551
1554
|
}
|
|
1552
1555
|
function ke() {
|
|
1553
|
-
|
|
1556
|
+
le(), d.value = -1, e("update:hoveredIndex", -1);
|
|
1554
1557
|
}
|
|
1555
|
-
function
|
|
1558
|
+
function we(b) {
|
|
1556
1559
|
if (!a.value.some(
|
|
1557
|
-
({ values: V }) =>
|
|
1560
|
+
({ values: V }) => b <= V.length - 1
|
|
1558
1561
|
)) {
|
|
1559
1562
|
q(Y.InvalidHoveredIndex);
|
|
1560
1563
|
return;
|
|
1561
1564
|
}
|
|
1562
|
-
|
|
1565
|
+
b == null || b === -1 ? ke() : be(b);
|
|
1563
1566
|
}
|
|
1564
1567
|
function Gt() {
|
|
1565
1568
|
setTimeout(() => {
|
|
1566
1569
|
et.value && ke(), e("chart-mouseleave");
|
|
1567
1570
|
}, 0);
|
|
1568
1571
|
}
|
|
1569
|
-
function
|
|
1570
|
-
|
|
1572
|
+
function Ft({ index: b, value: P, event: V }) {
|
|
1573
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: V });
|
|
1571
1574
|
}
|
|
1572
|
-
function
|
|
1573
|
-
e("axis-click", { index:
|
|
1575
|
+
function jt({ index: b, value: P, event: V }) {
|
|
1576
|
+
e("axis-click", { index: b, value: P, event: V });
|
|
1574
1577
|
}
|
|
1575
|
-
return
|
|
1578
|
+
return D(
|
|
1576
1579
|
a,
|
|
1577
|
-
(
|
|
1578
|
-
),
|
|
1580
|
+
(b, P) => e("data-changed", { newValue: b, oldValue: P })
|
|
1581
|
+
), D(
|
|
1579
1582
|
o,
|
|
1580
|
-
(
|
|
1581
|
-
),
|
|
1583
|
+
(b, P) => e("labels-changed", { newValue: b, oldValue: P })
|
|
1584
|
+
), D(N, (b) => b && q(Y.Empty), { immediate: !0 }), D(() => r.hoveredIndex, we), D(
|
|
1582
1585
|
m,
|
|
1583
|
-
(
|
|
1584
|
-
|
|
1586
|
+
(b) => {
|
|
1587
|
+
b && r.hoveredIndex != null && d.value === -1 && we(r.hoveredIndex);
|
|
1585
1588
|
},
|
|
1586
1589
|
{ flush: "post" }
|
|
1587
|
-
),
|
|
1588
|
-
|
|
1590
|
+
), D(p, (b) => {
|
|
1591
|
+
b === !1 && ve.opened && ke();
|
|
1589
1592
|
}), ee(async () => {
|
|
1590
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1591
|
-
}),
|
|
1593
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), S("lume__internal--hover", be);
|
|
1594
|
+
}), Ee("chartID", T), Ee("isEmpty", N), Ee("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, 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: x, containerSize: A, updateSize: w, chartID: T, listenInternalEvent: S, xScale: C, yScale: R, computedMargins: F, computedXScale: j, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: $, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: G, shouldGenerateTooltipAnchors: qe, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: et, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: we, handleMouseleave: Gt, handleAxisMouseenter: Ft, handleAxisClick: jt, LumeAxis: Hn, LumeBar: Ye, LumeChartContainer: zn, LumeChartLegend: Yn, LumeTooltip: pr, LumeOverlayGroup: Dr, TOOLTIP_ANCHOR_RADIUS: yn };
|
|
1592
1595
|
}
|
|
1593
1596
|
});
|
|
1594
|
-
var
|
|
1597
|
+
var Zr = function() {
|
|
1595
1598
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1596
1599
|
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.updateSize, click: function(a) {
|
|
1597
1600
|
return n.emit("chart-click", a);
|
|
@@ -1617,7 +1620,7 @@ var Ur = function() {
|
|
|
1617
1620
|
} } }) : e._e()];
|
|
1618
1621
|
}, proxy: !0 }, { key: "extra", fn: function() {
|
|
1619
1622
|
return [e._t("tooltip", function() {
|
|
1620
|
-
return [n.
|
|
1623
|
+
return [n.allOptions.withTooltip !== !1 ? r(n.LumeTooltip, e._b({ attrs: { position: n.tooltipPosition, title: n.computedLabels[n.internalHoveredIndex], items: n.getTooltipItems(n.internalHoveredIndex), options: n.allOptions.tooltipOptions, "data-j-lume-chart__tooltip": "" }, on: { opened: function(a) {
|
|
1621
1624
|
return n.emit("tooltip-opened", {
|
|
1622
1625
|
index: n.internalHoveredIndex,
|
|
1623
1626
|
targetElement: a
|
|
@@ -1648,17 +1651,17 @@ var Ur = function() {
|
|
|
1648
1651
|
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
|
|
1649
1652
|
return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
|
|
1650
1653
|
}), 0) : e._e(), e._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.internalHoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: e.classList })] : e._e()], 2);
|
|
1651
|
-
},
|
|
1654
|
+
}, Ur = [], Xr = /* @__PURE__ */ E(
|
|
1655
|
+
Wr,
|
|
1652
1656
|
Zr,
|
|
1653
1657
|
Ur,
|
|
1654
|
-
Xr,
|
|
1655
1658
|
!1,
|
|
1656
1659
|
null,
|
|
1657
|
-
"
|
|
1660
|
+
"14e6a8a3",
|
|
1658
1661
|
null,
|
|
1659
1662
|
null
|
|
1660
1663
|
);
|
|
1661
|
-
const
|
|
1664
|
+
const de = Xr.exports, dt = 8, Yr = 8, Kr = 20, se = 2, vt = 2, Jr = /* @__PURE__ */ H({
|
|
1662
1665
|
__name: "lume-alluvial-node-label",
|
|
1663
1666
|
props: {
|
|
1664
1667
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1668,7 +1671,7 @@ const ve = Yr.exports, dt = 8, Kr = 8, Jr = 20, ce = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1668
1671
|
emits: ["lume__internal--node-resize"],
|
|
1669
1672
|
setup(t, { emit: e }) {
|
|
1670
1673
|
const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
|
|
1671
|
-
return
|
|
1674
|
+
return D(
|
|
1672
1675
|
[n, () => r.maxWidth],
|
|
1673
1676
|
async ([l, i]) => {
|
|
1674
1677
|
if (l && i) {
|
|
@@ -1678,25 +1681,25 @@ const ve = Yr.exports, dt = 8, Kr = 8, Jr = 20, ce = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1678
1681
|
}
|
|
1679
1682
|
},
|
|
1680
1683
|
{ immediate: !0 }
|
|
1681
|
-
),
|
|
1684
|
+
), D(a, async (l) => {
|
|
1682
1685
|
l !== r.maxWidth && (await tt(), e("lume__internal--node-resize"));
|
|
1683
1686
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
|
|
1684
1687
|
}
|
|
1685
1688
|
});
|
|
1686
|
-
var
|
|
1689
|
+
var Qr = function() {
|
|
1687
1690
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1688
1691
|
return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1689
|
-
},
|
|
1692
|
+
}, qr = [], ea = /* @__PURE__ */ E(
|
|
1693
|
+
Jr,
|
|
1690
1694
|
Qr,
|
|
1691
1695
|
qr,
|
|
1692
|
-
ea,
|
|
1693
1696
|
!1,
|
|
1694
1697
|
null,
|
|
1695
1698
|
"7126dfdb",
|
|
1696
1699
|
null,
|
|
1697
1700
|
null
|
|
1698
1701
|
);
|
|
1699
|
-
const
|
|
1702
|
+
const ta = ea.exports, na = /* @__PURE__ */ H({
|
|
1700
1703
|
__name: "lume-alluvial-node-value",
|
|
1701
1704
|
props: {
|
|
1702
1705
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1705,20 +1708,20 @@ const na = ta.exports, ra = /* @__PURE__ */ H({
|
|
|
1705
1708
|
return { __sfc: !0 };
|
|
1706
1709
|
}
|
|
1707
1710
|
});
|
|
1708
|
-
var
|
|
1711
|
+
var ra = function() {
|
|
1709
1712
|
var e = this, r = e._self._c;
|
|
1710
1713
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { y: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1711
|
-
},
|
|
1714
|
+
}, aa = [], oa = /* @__PURE__ */ E(
|
|
1715
|
+
na,
|
|
1712
1716
|
ra,
|
|
1713
1717
|
aa,
|
|
1714
|
-
oa,
|
|
1715
1718
|
!1,
|
|
1716
1719
|
null,
|
|
1717
1720
|
"b4fc758b",
|
|
1718
1721
|
null,
|
|
1719
1722
|
null
|
|
1720
1723
|
);
|
|
1721
|
-
const
|
|
1724
|
+
const la = oa.exports, ua = /* @__PURE__ */ H({
|
|
1722
1725
|
__name: "lume-alluvial-node-header",
|
|
1723
1726
|
props: {
|
|
1724
1727
|
x: { type: Number, required: !0 },
|
|
@@ -1733,20 +1736,20 @@ const ua = la.exports, ia = /* @__PURE__ */ H({
|
|
|
1733
1736
|
return { __sfc: !0, textRef: e, beforeTransform: r, afterTransform: n };
|
|
1734
1737
|
}
|
|
1735
1738
|
});
|
|
1736
|
-
var
|
|
1739
|
+
var ia = function() {
|
|
1737
1740
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1738
1741
|
return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption" }, [e._t("default")], 2), r("g", { attrs: { transform: n.afterTransform } }, [e._t("after")], 2)]);
|
|
1739
|
-
},
|
|
1742
|
+
}, sa = [], ca = /* @__PURE__ */ E(
|
|
1743
|
+
ua,
|
|
1740
1744
|
ia,
|
|
1741
1745
|
sa,
|
|
1742
|
-
ca,
|
|
1743
1746
|
!1,
|
|
1744
1747
|
null,
|
|
1745
1748
|
"0e483453",
|
|
1746
1749
|
null,
|
|
1747
1750
|
null
|
|
1748
1751
|
);
|
|
1749
|
-
const
|
|
1752
|
+
const da = ca.exports;
|
|
1750
1753
|
function _t(t, e) {
|
|
1751
1754
|
return {
|
|
1752
1755
|
x0: 0 + (e ? e.left : 0),
|
|
@@ -1755,7 +1758,7 @@ function _t(t, e) {
|
|
|
1755
1758
|
y1: t.height - (e ? e.bottom : 0)
|
|
1756
1759
|
};
|
|
1757
1760
|
}
|
|
1758
|
-
function
|
|
1761
|
+
function va(t) {
|
|
1759
1762
|
const e = I(_t(t));
|
|
1760
1763
|
function r(n) {
|
|
1761
1764
|
e.value = _t(t, n);
|
|
@@ -1763,24 +1766,24 @@ function _a(t) {
|
|
|
1763
1766
|
return { extents: e, updateExtents: r };
|
|
1764
1767
|
}
|
|
1765
1768
|
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 || {});
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
r && At() || console.error(
|
|
1769
|
+
const _a = "[lume] ";
|
|
1770
|
+
function Fe(t, e, r = !0) {
|
|
1771
|
+
r && At() || console.error(_a + "Error: " + t, e);
|
|
1769
1772
|
}
|
|
1770
|
-
const
|
|
1771
|
-
function
|
|
1773
|
+
const fa = 200;
|
|
1774
|
+
function ie(t) {
|
|
1772
1775
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1773
1776
|
}
|
|
1774
|
-
function
|
|
1777
|
+
function pa(t, e) {
|
|
1775
1778
|
return e.nodes.find((r) => r.id === t);
|
|
1776
1779
|
}
|
|
1777
|
-
function
|
|
1780
|
+
function ma(t, e) {
|
|
1778
1781
|
return e.links.find((r) => r.id === t);
|
|
1779
1782
|
}
|
|
1780
|
-
function
|
|
1783
|
+
function Ct(t) {
|
|
1781
1784
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1782
1785
|
}
|
|
1783
|
-
function
|
|
1786
|
+
function ha(t, e) {
|
|
1784
1787
|
if (!e)
|
|
1785
1788
|
return;
|
|
1786
1789
|
const r = t.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), n = t.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = e.filter((l) => r.includes(l.dataset.id)).reduce(
|
|
@@ -1797,15 +1800,15 @@ function ga(t, e) {
|
|
|
1797
1800
|
bottom: 0
|
|
1798
1801
|
};
|
|
1799
1802
|
}
|
|
1800
|
-
function
|
|
1803
|
+
function ga(t) {
|
|
1801
1804
|
return t.map((e) => {
|
|
1802
|
-
const r = e.y1 - e.y0 <
|
|
1805
|
+
const r = e.y1 - e.y0 < se;
|
|
1803
1806
|
return {
|
|
1804
1807
|
x: e.x0,
|
|
1805
|
-
y: e.y0 - (r ?
|
|
1808
|
+
y: e.y0 - (r ? se / 2 : 0),
|
|
1806
1809
|
// Negative offset to account for the min. height
|
|
1807
1810
|
width: e.x1 - e.x0,
|
|
1808
|
-
height: r ?
|
|
1811
|
+
height: r ? se : e.y1 - e.y0,
|
|
1809
1812
|
textTransform: {
|
|
1810
1813
|
x: e.depth > 0 ? e.x1 + dt : e.x0 - dt,
|
|
1811
1814
|
y: (e.y1 + e.y0) / 2
|
|
@@ -1814,22 +1817,22 @@ function ya(t) {
|
|
|
1814
1817
|
};
|
|
1815
1818
|
});
|
|
1816
1819
|
}
|
|
1817
|
-
function
|
|
1820
|
+
function ya(t) {
|
|
1818
1821
|
return [t.source.x1, t.y0];
|
|
1819
1822
|
}
|
|
1820
|
-
function
|
|
1823
|
+
function ba(t) {
|
|
1821
1824
|
return [t.target.x0, t.y1];
|
|
1822
1825
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return t.curveFunction ?
|
|
1826
|
+
function ka(t) {
|
|
1827
|
+
return t.curveFunction ? Wt(t.curveFunction).source(ya).target(ba) : Yt();
|
|
1825
1828
|
}
|
|
1826
|
-
function
|
|
1829
|
+
function xa(t) {
|
|
1827
1830
|
return t.map((e) => {
|
|
1828
1831
|
var r;
|
|
1829
1832
|
return {
|
|
1830
1833
|
id: e.id,
|
|
1831
1834
|
color: e.color || ((r = e.source) == null ? void 0 : r.color) || he,
|
|
1832
|
-
d:
|
|
1835
|
+
d: ka(e)(e),
|
|
1833
1836
|
strokeWidth: Math.max(1, e.width),
|
|
1834
1837
|
link: e
|
|
1835
1838
|
};
|
|
@@ -1843,8 +1846,8 @@ function ft(t, e, r, n, a) {
|
|
|
1843
1846
|
};
|
|
1844
1847
|
return;
|
|
1845
1848
|
}
|
|
1846
|
-
const o = Date.now(), l =
|
|
1847
|
-
let c = (Date.now() - o) /
|
|
1849
|
+
const o = Date.now(), l = dn(e, r), i = () => {
|
|
1850
|
+
let c = (Date.now() - o) / fa;
|
|
1848
1851
|
c > 1 && (c = 1), t.node = {
|
|
1849
1852
|
...t.node,
|
|
1850
1853
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
@@ -1852,14 +1855,14 @@ function ft(t, e, r, n, a) {
|
|
|
1852
1855
|
};
|
|
1853
1856
|
requestAnimationFrame(i);
|
|
1854
1857
|
}
|
|
1855
|
-
const
|
|
1858
|
+
const Aa = {
|
|
1856
1859
|
nodes: [],
|
|
1857
1860
|
links: []
|
|
1858
1861
|
};
|
|
1859
1862
|
function pt(t, e) {
|
|
1860
1863
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1861
1864
|
}
|
|
1862
|
-
function
|
|
1865
|
+
function Ta(t, e, r) {
|
|
1863
1866
|
const n = I(null), a = v(() => {
|
|
1864
1867
|
var s, _;
|
|
1865
1868
|
return (_ = (s = t.value) == null ? void 0 : s[0]) == null ? void 0 : _.values.map(
|
|
@@ -1879,10 +1882,10 @@ function La(t, e, r) {
|
|
|
1879
1882
|
(m) => {
|
|
1880
1883
|
var p;
|
|
1881
1884
|
return (p = m.targets) == null ? void 0 : p.map(
|
|
1882
|
-
({ node: h, value: y, color: f, curveFunction:
|
|
1885
|
+
({ node: h, value: y, color: f, curveFunction: k }) => ({
|
|
1883
1886
|
id: `${m.value}:${h}`,
|
|
1884
1887
|
color: f,
|
|
1885
|
-
curveFunction:
|
|
1888
|
+
curveFunction: k,
|
|
1886
1889
|
source: m.value ?? m.label,
|
|
1887
1890
|
target: h,
|
|
1888
1891
|
value: y
|
|
@@ -1891,7 +1894,7 @@ function La(t, e, r) {
|
|
|
1891
1894
|
}
|
|
1892
1895
|
).filter(Boolean).flat();
|
|
1893
1896
|
}
|
|
1894
|
-
), l = v(() =>
|
|
1897
|
+
), l = v(() => Kt().nodeId(ie).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), i = v(() => {
|
|
1895
1898
|
var s;
|
|
1896
1899
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1897
1900
|
(_, m) => {
|
|
@@ -1913,8 +1916,8 @@ function La(t, e, r) {
|
|
|
1913
1916
|
(x) => x.source.id === m
|
|
1914
1917
|
), f = _.links.filter(
|
|
1915
1918
|
(x) => x.target.id === m
|
|
1916
|
-
),
|
|
1917
|
-
y.forEach((x) => x.y0 +=
|
|
1919
|
+
), k = h - p;
|
|
1920
|
+
y.forEach((x) => x.y0 += k), f.forEach((x) => x.y1 += k);
|
|
1918
1921
|
}
|
|
1919
1922
|
const d = v(() => {
|
|
1920
1923
|
var s;
|
|
@@ -1922,7 +1925,7 @@ function La(t, e, r) {
|
|
|
1922
1925
|
_.value === 0 && (_.fallbackColor = Ue.Grey), typeof _.offset == "number" && (u(_), c(_, n.value));
|
|
1923
1926
|
})), n.value;
|
|
1924
1927
|
});
|
|
1925
|
-
return
|
|
1928
|
+
return D([l, r], () => {
|
|
1926
1929
|
try {
|
|
1927
1930
|
const { x0: s, y0: _, x1: m, y1: p } = r.value;
|
|
1928
1931
|
n.value = l.value.extent([
|
|
@@ -1930,7 +1933,7 @@ function La(t, e, r) {
|
|
|
1930
1933
|
[m, p]
|
|
1931
1934
|
])({ nodes: a.value, links: o.value });
|
|
1932
1935
|
} catch (s) {
|
|
1933
|
-
|
|
1936
|
+
Fe(Te.GraphProblem, s), n.value = Aa;
|
|
1934
1937
|
}
|
|
1935
1938
|
}), { columns: i, graph: d };
|
|
1936
1939
|
}
|
|
@@ -1950,12 +1953,12 @@ function Ve(t, e) {
|
|
|
1950
1953
|
);
|
|
1951
1954
|
}), e;
|
|
1952
1955
|
}
|
|
1953
|
-
function
|
|
1956
|
+
function La(t, e) {
|
|
1954
1957
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
1955
1958
|
}
|
|
1956
|
-
const
|
|
1959
|
+
const Oa = (t, e) => {
|
|
1957
1960
|
let r;
|
|
1958
|
-
|
|
1961
|
+
Ct(t) ? r = {
|
|
1959
1962
|
[t.id]: t.value,
|
|
1960
1963
|
...je(t),
|
|
1961
1964
|
...Ve(t)
|
|
@@ -1965,33 +1968,33 @@ const $a = (t, e) => {
|
|
|
1965
1968
|
...je(t.source),
|
|
1966
1969
|
...Ve(t.target)
|
|
1967
1970
|
};
|
|
1968
|
-
const n =
|
|
1971
|
+
const n = La(r, e);
|
|
1969
1972
|
return { nodes: r, links: n };
|
|
1970
|
-
},
|
|
1971
|
-
if (
|
|
1973
|
+
}, $a = (t) => {
|
|
1974
|
+
if (Ct(t)) {
|
|
1972
1975
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1973
1976
|
return {
|
|
1974
1977
|
nodes: e.reduce(
|
|
1975
|
-
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [
|
|
1976
|
-
{ [
|
|
1978
|
+
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [ie(a)]: o } : { ...r, [ie(n)]: o },
|
|
1979
|
+
{ [ie(t)]: t.value }
|
|
1977
1980
|
),
|
|
1978
1981
|
links: e.map(({ id: r }) => r)
|
|
1979
1982
|
};
|
|
1980
1983
|
}
|
|
1981
1984
|
return {
|
|
1982
1985
|
nodes: {
|
|
1983
|
-
[
|
|
1984
|
-
[
|
|
1986
|
+
[ie(t.target)]: t.value,
|
|
1987
|
+
[ie(t.source)]: t.source.value
|
|
1985
1988
|
},
|
|
1986
1989
|
links: [t.id]
|
|
1987
1990
|
};
|
|
1988
1991
|
};
|
|
1989
|
-
function
|
|
1992
|
+
function Ia(t, e, r) {
|
|
1990
1993
|
const n = I(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1991
1994
|
n.value,
|
|
1992
1995
|
r.value
|
|
1993
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1994
|
-
return
|
|
1996
|
+
) : e.value.highlightedElements === "closest" ? $a(n.value, r.value) : Oa(n.value, r.value) : { nodes: {}, links: [] });
|
|
1997
|
+
return D(a, (o, l) => {
|
|
1995
1998
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1996
1999
|
t.value.forEach((i) => {
|
|
1997
2000
|
i.node.id in l.nodes && ft(
|
|
@@ -2025,7 +2028,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2025
2028
|
},
|
|
2026
2029
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2027
2030
|
setup(t, { emit: e }) {
|
|
2028
|
-
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l = I([]), i = I([]), u = I(null), { extents: c, updateExtents: d } =
|
|
2031
|
+
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l = I([]), i = I([]), u = I(null), { extents: c, updateExtents: d } = va(r.containerSize), { columns: s, graph: _ } = Ta(a, o, c), { hoveredElement: m, highlightedElements: p } = Ia(
|
|
2029
2032
|
l,
|
|
2030
2033
|
o,
|
|
2031
2034
|
_
|
|
@@ -2033,42 +2036,42 @@ const wa = /* @__PURE__ */ H({
|
|
|
2033
2036
|
() => Object.keys(p.value.nodes)
|
|
2034
2037
|
), f = v(() => s.value ? s.value.map(
|
|
2035
2038
|
(g) => g[0].x0 + o.value.nodeWidth / 2
|
|
2036
|
-
) : []),
|
|
2039
|
+
) : []), k = v(() => {
|
|
2037
2040
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
2038
2041
|
return o.value.nodeHeaders.slice(0, f.value.length).map((g, O) => ({
|
|
2039
2042
|
label: g,
|
|
2040
2043
|
x: f.value[O]
|
|
2041
2044
|
}));
|
|
2042
2045
|
}), x = v(
|
|
2043
|
-
() => o.value.nodeHeaderPadding ??
|
|
2046
|
+
() => o.value.nodeHeaderPadding ?? Kr
|
|
2044
2047
|
), A = v(() => {
|
|
2045
2048
|
if (!(!o.value.gradient || !_.value))
|
|
2046
2049
|
return _.value.links.reduce((g, O) => {
|
|
2047
|
-
const { source: N, target: Z } = O, U = N.color || N.fallbackColor,
|
|
2050
|
+
const { source: N, target: Z } = O, U = N.color || N.fallbackColor, G = Z.deriveColorFromIncomingLinks ? U : Z.color || Z.fallbackColor;
|
|
2048
2051
|
return g[O.id] = {
|
|
2049
2052
|
source: U,
|
|
2050
|
-
target:
|
|
2053
|
+
target: G,
|
|
2051
2054
|
x1: N.x1,
|
|
2052
2055
|
x2: Z.x0
|
|
2053
2056
|
}, g;
|
|
2054
2057
|
}, {});
|
|
2055
|
-
}),
|
|
2058
|
+
}), w = v(() => {
|
|
2056
2059
|
const g = l.value.filter(
|
|
2057
2060
|
(N) => j(N)
|
|
2058
2061
|
), O = [];
|
|
2059
2062
|
return g.forEach((N) => {
|
|
2060
2063
|
const Z = [];
|
|
2061
|
-
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U,
|
|
2062
|
-
const ge =
|
|
2063
|
-
let
|
|
2064
|
-
return ge ? (
|
|
2064
|
+
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, G, qe, ve) => {
|
|
2065
|
+
const ge = G.link.target.y1 - G.link.target.y0 > se;
|
|
2066
|
+
let le, ye, ue;
|
|
2067
|
+
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({
|
|
2065
2068
|
x: N.x,
|
|
2066
2069
|
y: N.y + U,
|
|
2067
|
-
height:
|
|
2070
|
+
height: ue,
|
|
2068
2071
|
width: N.width,
|
|
2069
|
-
key: `node-block-${N.node.id}-source-link-${
|
|
2070
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2071
|
-
}), U +
|
|
2072
|
+
key: `node-block-${N.node.id}-source-link-${G.link.source.id}`,
|
|
2073
|
+
class: `lume-alluvial-group__node-block lume-fill--${G.link.source.color || he}`
|
|
2074
|
+
}), U + ue;
|
|
2072
2075
|
}, 0), O.push({
|
|
2073
2076
|
id: N.node.id,
|
|
2074
2077
|
subNodes: Z
|
|
@@ -2078,16 +2081,16 @@ const wa = /* @__PURE__ */ H({
|
|
|
2078
2081
|
function T(g) {
|
|
2079
2082
|
return o.value.gradient && `url('#${n}_${g.id}')`;
|
|
2080
2083
|
}
|
|
2081
|
-
function
|
|
2084
|
+
function S(g) {
|
|
2082
2085
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2083
2086
|
}
|
|
2084
|
-
function
|
|
2087
|
+
function C(g) {
|
|
2085
2088
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2086
2089
|
}
|
|
2087
2090
|
function R(g) {
|
|
2088
2091
|
return p.value.links.length > 0 && !p.value.links.includes(g);
|
|
2089
2092
|
}
|
|
2090
|
-
function
|
|
2093
|
+
function F(g) {
|
|
2091
2094
|
return p.value.links.length > 0 && p.value.links.includes(g);
|
|
2092
2095
|
}
|
|
2093
2096
|
function j(g) {
|
|
@@ -2105,7 +2108,7 @@ const wa = /* @__PURE__ */ H({
|
|
|
2105
2108
|
m.value = null;
|
|
2106
2109
|
return;
|
|
2107
2110
|
}
|
|
2108
|
-
const O =
|
|
2111
|
+
const O = pa(g, _.value) || ma(g, _.value);
|
|
2109
2112
|
if (!O) {
|
|
2110
2113
|
q(Y.InvalidHoveredElement);
|
|
2111
2114
|
return;
|
|
@@ -2114,20 +2117,20 @@ const wa = /* @__PURE__ */ H({
|
|
|
2114
2117
|
}
|
|
2115
2118
|
function ne(g) {
|
|
2116
2119
|
var O;
|
|
2117
|
-
return ((O =
|
|
2120
|
+
return ((O = w.value.find(({ id: N }) => g === N)) == null ? void 0 : O.subNodes) ?? [];
|
|
2118
2121
|
}
|
|
2119
2122
|
function $() {
|
|
2120
|
-
const g =
|
|
2123
|
+
const g = ha(_.value, u.value);
|
|
2121
2124
|
d(g);
|
|
2122
2125
|
}
|
|
2123
|
-
return
|
|
2124
|
-
l.value =
|
|
2125
|
-
}),
|
|
2126
|
+
return D(_, (g) => {
|
|
2127
|
+
l.value = ga(g.nodes), i.value = xa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2128
|
+
}), D([r.containerSize, u], () => {
|
|
2126
2129
|
r.containerSize.width && r.containerSize.height && $();
|
|
2127
|
-
}),
|
|
2130
|
+
}), D(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, 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: x, gradients: A, nodesDerivingColorFromIncomingLinks: w, getLinkStroke: T, isNodeFaded: S, isNodeFocused: C, isLinkFaded: R, isLinkFocused: F, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: $, LumeAlluvialNodeLabel: ta, LumeAlluvialNodeValue: la, LumeAlluvialNodeHeader: da, GHOST_STROKE_WIDTH_OFFSET: Yr };
|
|
2128
2131
|
}
|
|
2129
2132
|
});
|
|
2130
|
-
var
|
|
2133
|
+
var Ea = function() {
|
|
2131
2134
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2132
2135
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
|
|
2133
2136
|
return [e._t(`node-header-${o}`, function() {
|
|
@@ -2181,17 +2184,17 @@ var Na = function() {
|
|
|
2181
2184
|
a.node.value
|
|
2182
2185
|
) })], 2)], 2)]);
|
|
2183
2186
|
})], 2);
|
|
2184
|
-
},
|
|
2187
|
+
}, Na = [], Ha = /* @__PURE__ */ E(
|
|
2185
2188
|
wa,
|
|
2189
|
+
Ea,
|
|
2186
2190
|
Na,
|
|
2187
|
-
Ha,
|
|
2188
2191
|
!1,
|
|
2189
2192
|
null,
|
|
2190
2193
|
"02af69f2",
|
|
2191
2194
|
null,
|
|
2192
2195
|
null
|
|
2193
2196
|
);
|
|
2194
|
-
const Da =
|
|
2197
|
+
const Da = Ha.exports, Sa = {
|
|
2195
2198
|
margins: {
|
|
2196
2199
|
top: 0,
|
|
2197
2200
|
right: 0,
|
|
@@ -2207,16 +2210,16 @@ const Da = Ca.exports, Sa = {
|
|
|
2207
2210
|
highlightedElements: "closest",
|
|
2208
2211
|
nodePadding: 16,
|
|
2209
2212
|
nodeWidth: 16,
|
|
2210
|
-
nodeAlign:
|
|
2213
|
+
nodeAlign: Jt,
|
|
2211
2214
|
valueFormat: (t) => String(t),
|
|
2212
2215
|
iterations: 6
|
|
2213
|
-
},
|
|
2216
|
+
}, Ca = /* @__PURE__ */ H({
|
|
2214
2217
|
__name: "lume-alluvial-diagram",
|
|
2215
2218
|
props: {
|
|
2216
|
-
...
|
|
2219
|
+
...Ir(ze)
|
|
2217
2220
|
},
|
|
2218
2221
|
setup(t, { emit: e }) {
|
|
2219
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o =
|
|
2222
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = _n(M()), { options: l } = B(r), { allOptions: i } = K(l, Sa);
|
|
2220
2223
|
function u(c) {
|
|
2221
2224
|
return {
|
|
2222
2225
|
...c,
|
|
@@ -2224,10 +2227,10 @@ const Da = Ca.exports, Sa = {
|
|
|
2224
2227
|
// Alluvial chart never uses base scales
|
|
2225
2228
|
};
|
|
2226
2229
|
}
|
|
2227
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart:
|
|
2230
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup: Da };
|
|
2228
2231
|
}
|
|
2229
2232
|
});
|
|
2230
|
-
var
|
|
2233
|
+
var Ra = function() {
|
|
2231
2234
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2232
2235
|
return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2233
2236
|
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
@@ -2239,23 +2242,23 @@ var Pa = function() {
|
|
|
2239
2242
|
return { key: o, fn: function(l) {
|
|
2240
2243
|
return [e._t(o, null, null, l || {})];
|
|
2241
2244
|
} };
|
|
2242
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2243
|
-
},
|
|
2245
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2246
|
+
}, Pa = [], Ba = /* @__PURE__ */ E(
|
|
2247
|
+
Ca,
|
|
2244
2248
|
Ra,
|
|
2245
2249
|
Pa,
|
|
2246
|
-
Ba,
|
|
2247
2250
|
!1,
|
|
2248
2251
|
null,
|
|
2249
2252
|
null,
|
|
2250
2253
|
null,
|
|
2251
2254
|
null
|
|
2252
2255
|
);
|
|
2253
|
-
const
|
|
2256
|
+
const Qo = Ba.exports;
|
|
2254
2257
|
var Me = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Me || {});
|
|
2255
2258
|
const Ga = /* @__PURE__ */ H({
|
|
2256
2259
|
__name: "lume-bar-chart",
|
|
2257
2260
|
props: {
|
|
2258
|
-
...
|
|
2261
|
+
...ce(),
|
|
2259
2262
|
type: {
|
|
2260
2263
|
type: String,
|
|
2261
2264
|
default: null,
|
|
@@ -2295,41 +2298,41 @@ const Ga = /* @__PURE__ */ H({
|
|
|
2295
2298
|
return { __sfc: !0, TYPES: Me, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: d };
|
|
2296
2299
|
}
|
|
2297
2300
|
});
|
|
2298
|
-
var
|
|
2301
|
+
var Fa = function() {
|
|
2299
2302
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2300
2303
|
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) {
|
|
2301
2304
|
return { key: o, fn: function(l) {
|
|
2302
2305
|
return [e._t(o, null, null, l || {})];
|
|
2303
2306
|
} };
|
|
2304
2307
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2305
|
-
},
|
|
2308
|
+
}, ja = [], Va = /* @__PURE__ */ E(
|
|
2306
2309
|
Ga,
|
|
2310
|
+
Fa,
|
|
2307
2311
|
ja,
|
|
2308
|
-
Va,
|
|
2309
2312
|
!1,
|
|
2310
2313
|
null,
|
|
2311
2314
|
null,
|
|
2312
2315
|
null,
|
|
2313
2316
|
null
|
|
2314
2317
|
);
|
|
2315
|
-
const
|
|
2316
|
-
function
|
|
2317
|
-
return Object.values(
|
|
2318
|
+
const qo = Va.exports;
|
|
2319
|
+
function Ma(t) {
|
|
2320
|
+
return Object.values(gn).includes(t) || t == null;
|
|
2318
2321
|
}
|
|
2319
|
-
function
|
|
2322
|
+
function za(t) {
|
|
2320
2323
|
return Object.values(L).includes(t);
|
|
2321
2324
|
}
|
|
2322
|
-
const
|
|
2325
|
+
const Wa = (t = !1) => ({
|
|
2323
2326
|
type: {
|
|
2324
2327
|
type: String,
|
|
2325
2328
|
default: null,
|
|
2326
|
-
validator:
|
|
2329
|
+
validator: Ma
|
|
2327
2330
|
},
|
|
2328
2331
|
...t ? {
|
|
2329
2332
|
orientation: {
|
|
2330
2333
|
type: String,
|
|
2331
2334
|
default: L.VERTICAL,
|
|
2332
|
-
validator:
|
|
2335
|
+
validator: za
|
|
2333
2336
|
}
|
|
2334
2337
|
} : {}
|
|
2335
2338
|
});
|
|
@@ -2354,26 +2357,26 @@ function Rt(t, e) {
|
|
|
2354
2357
|
});
|
|
2355
2358
|
return { multiBarData: r, groupedData: n };
|
|
2356
2359
|
}
|
|
2357
|
-
function
|
|
2360
|
+
function Za(t, e) {
|
|
2358
2361
|
return t.value.length === 1 ? "single" : e.value;
|
|
2359
2362
|
}
|
|
2360
|
-
function
|
|
2363
|
+
function Ua(t, e, r) {
|
|
2361
2364
|
const n = v(
|
|
2362
2365
|
() => r.value === L.HORIZONTAL
|
|
2363
2366
|
);
|
|
2364
2367
|
function a(i) {
|
|
2365
|
-
i ||
|
|
2368
|
+
i || Fe(Te.BarScaleNull), Math.min(...i.domain()) > 0 && Fe(Te.BarScaleDomainAbove0);
|
|
2366
2369
|
}
|
|
2367
2370
|
const o = v(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = v(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2368
2371
|
return { barXScale: o, barYScale: l };
|
|
2369
2372
|
}
|
|
2370
|
-
const
|
|
2373
|
+
const Xa = {
|
|
2371
2374
|
x: 0,
|
|
2372
2375
|
y: 0,
|
|
2373
2376
|
width: 0,
|
|
2374
2377
|
height: 0
|
|
2375
2378
|
};
|
|
2376
|
-
function
|
|
2379
|
+
function Ya(t, e, r, n, a, o) {
|
|
2377
2380
|
const l = v(
|
|
2378
2381
|
() => n.value === L.HORIZONTAL
|
|
2379
2382
|
);
|
|
@@ -2389,27 +2392,27 @@ function Ka(t, e, r, n, a, o) {
|
|
|
2389
2392
|
}
|
|
2390
2393
|
function d(s, _, m) {
|
|
2391
2394
|
if (!(e.value && r.value))
|
|
2392
|
-
return
|
|
2393
|
-
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x:
|
|
2395
|
+
return Xa;
|
|
2396
|
+
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x: k, y: x } = i(h, m), A = u(h), w = c(h);
|
|
2394
2397
|
return {
|
|
2395
2398
|
classList: [`lume-fill--${f}`, ...o],
|
|
2396
|
-
x:
|
|
2399
|
+
x: k,
|
|
2397
2400
|
y: x,
|
|
2398
2401
|
width: A,
|
|
2399
|
-
height:
|
|
2402
|
+
height: w,
|
|
2400
2403
|
isFaded: a.value !== -1 && a.value !== m,
|
|
2401
2404
|
isNegative: h < 0
|
|
2402
2405
|
};
|
|
2403
2406
|
}
|
|
2404
2407
|
return { barAttributeGenerator: d };
|
|
2405
2408
|
}
|
|
2406
|
-
const
|
|
2409
|
+
const Ka = {
|
|
2407
2410
|
x: 0,
|
|
2408
2411
|
y: 0,
|
|
2409
2412
|
width: 0,
|
|
2410
2413
|
height: 0
|
|
2411
2414
|
};
|
|
2412
|
-
function
|
|
2415
|
+
function Ja(t, e, r, n, a, o) {
|
|
2413
2416
|
const l = v(
|
|
2414
2417
|
() => n.value === L.HORIZONTAL
|
|
2415
2418
|
), i = v(() => _e().domain(t.value.map((p, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => _e().domain(t.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
@@ -2434,21 +2437,21 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2434
2437
|
}
|
|
2435
2438
|
function m(p, h, y) {
|
|
2436
2439
|
if (!(e.value && r.value))
|
|
2437
|
-
return
|
|
2438
|
-
const { value:
|
|
2440
|
+
return Ka;
|
|
2441
|
+
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], w = c(k, y, h), T = d(k, y, h), S = s(k), C = _(k);
|
|
2439
2442
|
return {
|
|
2440
2443
|
classList: [`lume-fill--${A}`, ...o],
|
|
2441
|
-
x:
|
|
2444
|
+
x: w,
|
|
2442
2445
|
y: T,
|
|
2443
|
-
width:
|
|
2444
|
-
height:
|
|
2446
|
+
width: S,
|
|
2447
|
+
height: C,
|
|
2445
2448
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2446
|
-
isNegative:
|
|
2449
|
+
isNegative: k < 0
|
|
2447
2450
|
};
|
|
2448
2451
|
}
|
|
2449
2452
|
return { barAttributeGenerator: m };
|
|
2450
2453
|
}
|
|
2451
|
-
function
|
|
2454
|
+
function Qa(t, e, r) {
|
|
2452
2455
|
const n = v(
|
|
2453
2456
|
() => e.value === L.HORIZONTAL
|
|
2454
2457
|
), a = v(() => {
|
|
@@ -2487,17 +2490,17 @@ function qa(t, e, r) {
|
|
|
2487
2490
|
}
|
|
2488
2491
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2489
2492
|
}
|
|
2490
|
-
function
|
|
2493
|
+
function qa(t, e, r, n, a, o) {
|
|
2491
2494
|
const l = v(
|
|
2492
2495
|
() => n.value === L.HORIZONTAL
|
|
2493
2496
|
), i = v(
|
|
2494
2497
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2495
2498
|
), u = v(
|
|
2496
|
-
() => t.value.map((f) => f.values.map((
|
|
2499
|
+
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2497
2500
|
);
|
|
2498
|
-
function c(f,
|
|
2499
|
-
let A,
|
|
2500
|
-
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x),
|
|
2501
|
+
function c(f, k, x) {
|
|
2502
|
+
let A, w;
|
|
2503
|
+
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x), w = r.value(i.value[k])) : (A = e.value(i.value[k]), w = r.value(f >= 0 ? f + x : 0 + x)), { x: A, y: w };
|
|
2501
2504
|
}
|
|
2502
2505
|
function d(f) {
|
|
2503
2506
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
@@ -2511,20 +2514,20 @@ function eo(t, e, r, n, a, o) {
|
|
|
2511
2514
|
function m(f) {
|
|
2512
2515
|
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2513
2516
|
}
|
|
2514
|
-
function p(f,
|
|
2515
|
-
return f ? u.value.reduce((x, A,
|
|
2517
|
+
function p(f, k) {
|
|
2518
|
+
return f ? u.value.reduce((x, A, w) => (w < f && A[k] >= 0 && (x += A[k]), x), 0) : 0;
|
|
2516
2519
|
}
|
|
2517
|
-
function h(f,
|
|
2518
|
-
return f ? u.value.reduce((x, A,
|
|
2520
|
+
function h(f, k) {
|
|
2521
|
+
return f ? u.value.reduce((x, A, w) => (w < f && A[k] < 0 && (x += A[k]), x), 0) : 0;
|
|
2519
2522
|
}
|
|
2520
|
-
function y(f,
|
|
2521
|
-
const { value: A, color:
|
|
2523
|
+
function y(f, k, x) {
|
|
2524
|
+
const { value: A, color: w } = f, T = A >= 0 ? d(A) : s(A), S = A >= 0 ? _(A) : m(A), C = A >= 0 ? p(k, x) : h(k, x), { x: R, y: F } = c(A, x, C);
|
|
2522
2525
|
return {
|
|
2523
|
-
classList: [`lume-fill--${
|
|
2526
|
+
classList: [`lume-fill--${w ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2524
2527
|
width: T,
|
|
2525
|
-
height:
|
|
2528
|
+
height: S,
|
|
2526
2529
|
x: R,
|
|
2527
|
-
y:
|
|
2530
|
+
y: F,
|
|
2528
2531
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2529
2532
|
isNegative: A < 0
|
|
2530
2533
|
};
|
|
@@ -2532,10 +2535,10 @@ function eo(t, e, r, n, a, o) {
|
|
|
2532
2535
|
return { barAttributeGenerator: y };
|
|
2533
2536
|
}
|
|
2534
2537
|
const mt = {
|
|
2535
|
-
single:
|
|
2536
|
-
grouped:
|
|
2537
|
-
stacked:
|
|
2538
|
-
},
|
|
2538
|
+
single: Ya,
|
|
2539
|
+
grouped: Ja,
|
|
2540
|
+
stacked: qa
|
|
2541
|
+
}, eo = /* @__PURE__ */ H({
|
|
2539
2542
|
__name: "lume-bar-group",
|
|
2540
2543
|
props: {
|
|
2541
2544
|
...Ie(),
|
|
@@ -2543,7 +2546,7 @@ const mt = {
|
|
|
2543
2546
|
type: [String, Array],
|
|
2544
2547
|
default: () => []
|
|
2545
2548
|
},
|
|
2546
|
-
...
|
|
2549
|
+
...Wa(!0),
|
|
2547
2550
|
transition: {
|
|
2548
2551
|
type: Boolean,
|
|
2549
2552
|
default: !0
|
|
@@ -2561,8 +2564,8 @@ const mt = {
|
|
|
2561
2564
|
yScale: c,
|
|
2562
2565
|
classList: d,
|
|
2563
2566
|
labels: s
|
|
2564
|
-
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Rt(n, s), { barXScale: h, barYScale: y } =
|
|
2565
|
-
const
|
|
2567
|
+
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Rt(n, s), { barXScale: h, barYScale: y } = Ua(u, c, o), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2568
|
+
const w = Za(n, i), { barAttributeGenerator: T } = mt[w](
|
|
2566
2569
|
n,
|
|
2567
2570
|
h,
|
|
2568
2571
|
y,
|
|
@@ -2575,13 +2578,13 @@ const mt = {
|
|
|
2575
2578
|
if (l.value)
|
|
2576
2579
|
return o.value === L.HORIZONTAL ? "width" : "height";
|
|
2577
2580
|
});
|
|
2578
|
-
async function A(
|
|
2579
|
-
e("lume__internal--hover",
|
|
2581
|
+
async function A(w) {
|
|
2582
|
+
e("lume__internal--hover", w), m("lume__internal--hover", w);
|
|
2580
2583
|
}
|
|
2581
|
-
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes:
|
|
2584
|
+
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, 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: x, handleInternalHover: A, LumeBar: Ye };
|
|
2582
2585
|
}
|
|
2583
2586
|
});
|
|
2584
|
-
var
|
|
2587
|
+
var to = function() {
|
|
2585
2588
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2586
2589
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2587
2590
|
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
@@ -2596,17 +2599,17 @@ var no = function() {
|
|
|
2596
2599
|
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2597
2600
|
}), 1);
|
|
2598
2601
|
}), 0);
|
|
2599
|
-
},
|
|
2602
|
+
}, no = [], ro = /* @__PURE__ */ E(
|
|
2603
|
+
eo,
|
|
2600
2604
|
to,
|
|
2601
2605
|
no,
|
|
2602
|
-
ro,
|
|
2603
2606
|
!1,
|
|
2604
2607
|
null,
|
|
2605
2608
|
null,
|
|
2606
2609
|
null,
|
|
2607
2610
|
null
|
|
2608
2611
|
);
|
|
2609
|
-
const Qe =
|
|
2612
|
+
const Qe = ro.exports, ao = {
|
|
2610
2613
|
[L.VERTICAL]: {
|
|
2611
2614
|
withTooltip: !0,
|
|
2612
2615
|
xAxisOptions: {},
|
|
@@ -2619,20 +2622,20 @@ const Qe = ao.exports, oo = {
|
|
|
2619
2622
|
yAxisOptions: { gridLines: !1 },
|
|
2620
2623
|
margins: ae.HORIZONTAL
|
|
2621
2624
|
}
|
|
2622
|
-
},
|
|
2625
|
+
}, oo = /* @__PURE__ */ H({
|
|
2623
2626
|
__name: "lume-single-bar-chart",
|
|
2624
2627
|
props: {
|
|
2625
|
-
...
|
|
2628
|
+
...ce(ze)
|
|
2626
2629
|
},
|
|
2627
2630
|
setup(t, { emit: e }) {
|
|
2628
2631
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { orientation: o, options: l } = B(r), i = v(
|
|
2629
|
-
() =>
|
|
2632
|
+
() => ao[o.value || L.VERTICAL]
|
|
2630
2633
|
// needs to be computed so that default options are reactive
|
|
2631
2634
|
), { allOptions: u } = K(l, i);
|
|
2632
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2635
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: Qe };
|
|
2633
2636
|
}
|
|
2634
2637
|
});
|
|
2635
|
-
var
|
|
2638
|
+
var lo = function() {
|
|
2636
2639
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2637
2640
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2638
2641
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2640,18 +2643,18 @@ var uo = function() {
|
|
|
2640
2643
|
return { key: o, fn: function(l) {
|
|
2641
2644
|
return [e._t(o, null, null, l || {})];
|
|
2642
2645
|
} };
|
|
2643
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2644
|
-
},
|
|
2646
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2647
|
+
}, uo = [], io = /* @__PURE__ */ E(
|
|
2648
|
+
oo,
|
|
2645
2649
|
lo,
|
|
2646
2650
|
uo,
|
|
2647
|
-
io,
|
|
2648
2651
|
!1,
|
|
2649
2652
|
null,
|
|
2650
2653
|
null,
|
|
2651
2654
|
null,
|
|
2652
2655
|
null
|
|
2653
2656
|
);
|
|
2654
|
-
const
|
|
2657
|
+
const el = io.exports, so = {
|
|
2655
2658
|
[L.VERTICAL]: {
|
|
2656
2659
|
withTooltip: !0,
|
|
2657
2660
|
xAxisOptions: {},
|
|
@@ -2665,23 +2668,23 @@ const tl = so.exports, co = {
|
|
|
2665
2668
|
margins: ae.HORIZONTAL,
|
|
2666
2669
|
tooltipOptions: { position: "right" }
|
|
2667
2670
|
}
|
|
2668
|
-
},
|
|
2671
|
+
}, co = /* @__PURE__ */ H({
|
|
2669
2672
|
__name: "lume-grouped-bar-chart",
|
|
2670
2673
|
props: {
|
|
2671
|
-
...
|
|
2674
|
+
...ce()
|
|
2672
2675
|
},
|
|
2673
2676
|
setup(t, { emit: e }) {
|
|
2674
2677
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { orientation: o, options: l } = B(r), i = v(
|
|
2675
|
-
() =>
|
|
2678
|
+
() => so[o.value || L.VERTICAL]
|
|
2676
2679
|
// needs to be computed so that default options are reactive
|
|
2677
2680
|
), { allOptions: u } = K(
|
|
2678
2681
|
l,
|
|
2679
2682
|
i
|
|
2680
2683
|
);
|
|
2681
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2684
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: Qe };
|
|
2682
2685
|
}
|
|
2683
2686
|
});
|
|
2684
|
-
var
|
|
2687
|
+
var vo = function() {
|
|
2685
2688
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2686
2689
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2687
2690
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2689,18 +2692,18 @@ var _o = function() {
|
|
|
2689
2692
|
return { key: o, fn: function(l) {
|
|
2690
2693
|
return [e._t(o, null, null, l || {})];
|
|
2691
2694
|
} };
|
|
2692
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2693
|
-
},
|
|
2695
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2696
|
+
}, _o = [], fo = /* @__PURE__ */ E(
|
|
2697
|
+
co,
|
|
2694
2698
|
vo,
|
|
2695
2699
|
_o,
|
|
2696
|
-
fo,
|
|
2697
2700
|
!1,
|
|
2698
2701
|
null,
|
|
2699
2702
|
null,
|
|
2700
2703
|
null,
|
|
2701
2704
|
null
|
|
2702
2705
|
);
|
|
2703
|
-
const
|
|
2706
|
+
const tl = fo.exports, po = {
|
|
2704
2707
|
[L.VERTICAL]: {
|
|
2705
2708
|
withTooltip: !0,
|
|
2706
2709
|
xAxisOptions: {},
|
|
@@ -2715,27 +2718,27 @@ const nl = po.exports, mo = {
|
|
|
2715
2718
|
margins: ae.HORIZONTAL,
|
|
2716
2719
|
tooltipOptions: { position: "right" }
|
|
2717
2720
|
}
|
|
2718
|
-
},
|
|
2721
|
+
}, mo = /* @__PURE__ */ H({
|
|
2719
2722
|
__name: "lume-stacked-bar-chart",
|
|
2720
2723
|
props: {
|
|
2721
|
-
...
|
|
2724
|
+
...ce()
|
|
2722
2725
|
},
|
|
2723
2726
|
setup(t, { emit: e }) {
|
|
2724
2727
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { data: o, orientation: l, options: i, labels: u } = B(r), c = v(
|
|
2725
|
-
() =>
|
|
2728
|
+
() => po[l.value || L.VERTICAL]
|
|
2726
2729
|
// needs to be computed so that default options are reactive
|
|
2727
2730
|
), { allOptions: d } = K(
|
|
2728
2731
|
i,
|
|
2729
2732
|
c
|
|
2730
|
-
), { internalData: s } = Je(o), { groupedData: _ } = Rt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } =
|
|
2733
|
+
), { internalData: s } = Je(o), { groupedData: _ } = Rt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = Qa(
|
|
2731
2734
|
_,
|
|
2732
2735
|
l,
|
|
2733
2736
|
i
|
|
2734
2737
|
), h = v(() => r.xScale || m), y = v(() => r.yScale || p);
|
|
2735
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart:
|
|
2738
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart: de, LumeBarGroup: Qe };
|
|
2736
2739
|
}
|
|
2737
2740
|
});
|
|
2738
|
-
var
|
|
2741
|
+
var ho = function() {
|
|
2739
2742
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2740
2743
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2741
2744
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2743,18 +2746,18 @@ var go = function() {
|
|
|
2743
2746
|
return { key: o, fn: function(l) {
|
|
2744
2747
|
return [e._t(o, null, null, l || {})];
|
|
2745
2748
|
} };
|
|
2746
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2747
|
-
},
|
|
2749
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2750
|
+
}, go = [], yo = /* @__PURE__ */ E(
|
|
2751
|
+
mo,
|
|
2748
2752
|
ho,
|
|
2749
2753
|
go,
|
|
2750
|
-
yo,
|
|
2751
2754
|
!1,
|
|
2752
2755
|
null,
|
|
2753
2756
|
null,
|
|
2754
2757
|
null,
|
|
2755
2758
|
null
|
|
2756
2759
|
);
|
|
2757
|
-
const
|
|
2760
|
+
const nl = yo.exports, ht = 2, bo = /* @__PURE__ */ H({
|
|
2758
2761
|
__name: "lume-line",
|
|
2759
2762
|
props: {
|
|
2760
2763
|
pathDefinition: {
|
|
@@ -2792,7 +2795,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ H({
|
|
|
2792
2795
|
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: ht, emit: e, root: r };
|
|
2793
2796
|
}
|
|
2794
2797
|
});
|
|
2795
|
-
var
|
|
2798
|
+
var ko = function() {
|
|
2796
2799
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2797
2800
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2798
2801
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2804,17 +2807,17 @@ var xo = function() {
|
|
|
2804
2807
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
2805
2808
|
return n.emit("click", a);
|
|
2806
2809
|
} } });
|
|
2807
|
-
},
|
|
2810
|
+
}, xo = [], Ao = /* @__PURE__ */ E(
|
|
2811
|
+
bo,
|
|
2808
2812
|
ko,
|
|
2809
2813
|
xo,
|
|
2810
|
-
Ao,
|
|
2811
2814
|
!1,
|
|
2812
2815
|
null,
|
|
2813
2816
|
"08896455",
|
|
2814
2817
|
null,
|
|
2815
2818
|
null
|
|
2816
2819
|
);
|
|
2817
|
-
const
|
|
2820
|
+
const To = Ao.exports, gt = 4, Lo = /* @__PURE__ */ H({
|
|
2818
2821
|
__name: "lume-point",
|
|
2819
2822
|
props: {
|
|
2820
2823
|
x: { type: Number, required: !0 },
|
|
@@ -2838,22 +2841,22 @@ const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ H({
|
|
|
2838
2841
|
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS: gt, props: r, emit: e, root: n, strokeWidth: a };
|
|
2839
2842
|
}
|
|
2840
2843
|
});
|
|
2841
|
-
var
|
|
2844
|
+
var Oo = function() {
|
|
2842
2845
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2843
2846
|
return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2844
2847
|
return n.emit("click", a);
|
|
2845
2848
|
} } });
|
|
2846
|
-
},
|
|
2849
|
+
}, $o = [], Io = /* @__PURE__ */ E(
|
|
2850
|
+
Lo,
|
|
2847
2851
|
Oo,
|
|
2848
2852
|
$o,
|
|
2849
|
-
Io,
|
|
2850
2853
|
!1,
|
|
2851
2854
|
null,
|
|
2852
2855
|
"b6745177",
|
|
2853
2856
|
null,
|
|
2854
2857
|
null
|
|
2855
2858
|
);
|
|
2856
|
-
const wo =
|
|
2859
|
+
const wo = Io.exports;
|
|
2857
2860
|
function Pt(t) {
|
|
2858
2861
|
function e(o) {
|
|
2859
2862
|
let l = null;
|
|
@@ -2898,16 +2901,16 @@ function Pt(t) {
|
|
|
2898
2901
|
};
|
|
2899
2902
|
})) };
|
|
2900
2903
|
}
|
|
2901
|
-
function
|
|
2904
|
+
function Eo(t, e) {
|
|
2902
2905
|
const r = t.bandwidth() / 2;
|
|
2903
2906
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2904
2907
|
}
|
|
2905
|
-
function
|
|
2908
|
+
function No(t, e) {
|
|
2906
2909
|
return (r, n) => t(e + (n - 1));
|
|
2907
2910
|
}
|
|
2908
|
-
function
|
|
2909
|
-
const a =
|
|
2910
|
-
X(r) ?
|
|
2911
|
+
function Ho(t, e, r, n) {
|
|
2912
|
+
const a = Zt().x(
|
|
2913
|
+
X(r) ? Eo(r, t) : No(r, t)
|
|
2911
2914
|
).y((o) => n(o));
|
|
2912
2915
|
return e.every((o) => o == null) ? null : a(e);
|
|
2913
2916
|
}
|
|
@@ -2929,31 +2932,31 @@ const yt = 1, Do = /* @__PURE__ */ H({
|
|
|
2929
2932
|
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = B(r), u = Le(
|
|
2930
2933
|
"tooltipAnchorAttributes",
|
|
2931
2934
|
null
|
|
2932
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
2935
|
+
), { updateTooltipAnchorAttributes: c } = St(
|
|
2933
2936
|
u,
|
|
2934
2937
|
a,
|
|
2935
2938
|
o,
|
|
2936
2939
|
l,
|
|
2937
2940
|
i
|
|
2938
2941
|
), d = v(() => {
|
|
2939
|
-
if (n.value.every((
|
|
2942
|
+
if (n.value.every((S) => S.isDashed))
|
|
2940
2943
|
return n.value;
|
|
2941
2944
|
const { computedLineData: T } = Pt(n);
|
|
2942
2945
|
return a.value.withTooltip !== !1 && (u != null && u.value) && c(T.value), T.value;
|
|
2943
2946
|
}), s = v(() => {
|
|
2944
2947
|
if (r.hoveredIndex === -1)
|
|
2945
2948
|
return;
|
|
2946
|
-
const T =
|
|
2949
|
+
const T = sn(
|
|
2947
2950
|
d.value,
|
|
2948
2951
|
r.hoveredIndex
|
|
2949
2952
|
);
|
|
2950
2953
|
return {
|
|
2951
|
-
d: `M ${
|
|
2954
|
+
d: `M ${Ce(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2952
2955
|
V ${l.value(T)}`
|
|
2953
2956
|
// Move to X index, Vertical line to the highest point
|
|
2954
2957
|
};
|
|
2955
2958
|
}), _ = v(
|
|
2956
|
-
() => o.value && yt / (
|
|
2959
|
+
() => o.value && yt / (cn(o.value) - 1)
|
|
2957
2960
|
// Subtracting the first line (read below)
|
|
2958
2961
|
), m = v(
|
|
2959
2962
|
() => {
|
|
@@ -2969,15 +2972,15 @@ const yt = 1, Do = /* @__PURE__ */ H({
|
|
|
2969
2972
|
function f(T) {
|
|
2970
2973
|
return d.value[T].values;
|
|
2971
2974
|
}
|
|
2972
|
-
function
|
|
2973
|
-
var R,
|
|
2974
|
-
const
|
|
2975
|
-
(R = f(
|
|
2976
|
-
(
|
|
2975
|
+
function k(T, S) {
|
|
2976
|
+
var R, F;
|
|
2977
|
+
const C = T === 0 ? [] : [
|
|
2978
|
+
(R = f(S)[T - 1]) == null ? void 0 : R.value,
|
|
2979
|
+
(F = f(S)[T]) == null ? void 0 : F.value
|
|
2977
2980
|
];
|
|
2978
|
-
return
|
|
2981
|
+
return Ho(
|
|
2979
2982
|
T,
|
|
2980
|
-
|
|
2983
|
+
C,
|
|
2981
2984
|
o.value,
|
|
2982
2985
|
l.value
|
|
2983
2986
|
) || "";
|
|
@@ -2988,18 +2991,18 @@ const yt = 1, Do = /* @__PURE__ */ H({
|
|
|
2988
2991
|
animationDuration: _.value
|
|
2989
2992
|
};
|
|
2990
2993
|
}
|
|
2991
|
-
function A(T,
|
|
2994
|
+
function A(T, S) {
|
|
2992
2995
|
var R;
|
|
2993
|
-
const
|
|
2996
|
+
const C = (R = f(S)[T]) == null ? void 0 : R.value;
|
|
2994
2997
|
return {
|
|
2995
2998
|
x: X(o.value) ? r.xScale(h.value[T]) + p.value : r.xScale(T),
|
|
2996
|
-
y:
|
|
2999
|
+
y: C === null ? l.value(l.value.domain()[1]) : l.value(C)
|
|
2997
3000
|
};
|
|
2998
3001
|
}
|
|
2999
|
-
function
|
|
3002
|
+
function w(T) {
|
|
3000
3003
|
return r.hoveredIndex === T;
|
|
3001
3004
|
}
|
|
3002
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition:
|
|
3005
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive: w, LumeLine: To, LumePoint: wo };
|
|
3003
3006
|
}
|
|
3004
3007
|
});
|
|
3005
3008
|
var So = function() {
|
|
@@ -3015,30 +3018,30 @@ var So = function() {
|
|
|
3015
3018
|
} } }, "lume-point", n.getPointPosition(i, o), !1));
|
|
3016
3019
|
}), 1) : e._e()]);
|
|
3017
3020
|
})], 2);
|
|
3018
|
-
},
|
|
3021
|
+
}, Co = [], Ro = /* @__PURE__ */ E(
|
|
3019
3022
|
Do,
|
|
3020
3023
|
So,
|
|
3021
|
-
|
|
3024
|
+
Co,
|
|
3022
3025
|
!1,
|
|
3023
3026
|
null,
|
|
3024
3027
|
"44ba7be1",
|
|
3025
3028
|
null,
|
|
3026
3029
|
null
|
|
3027
3030
|
);
|
|
3028
|
-
const Bt =
|
|
3031
|
+
const Bt = Ro.exports, Po = {
|
|
3029
3032
|
margins: ae.VERTICAL,
|
|
3030
3033
|
startOnZero: !0,
|
|
3031
3034
|
withTooltip: !0,
|
|
3032
3035
|
xAxisOptions: {},
|
|
3033
3036
|
yAxisOptions: { gridLines: !0 }
|
|
3034
|
-
},
|
|
3037
|
+
}, Bo = /* @__PURE__ */ H({
|
|
3035
3038
|
__name: "lume-line-chart",
|
|
3036
3039
|
props: {
|
|
3037
|
-
...
|
|
3040
|
+
...ce(null, !1)
|
|
3038
3041
|
},
|
|
3039
3042
|
setup(t, { emit: e }) {
|
|
3040
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { options: o } = B(r), { allOptions: l } = K(o,
|
|
3041
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart:
|
|
3043
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { options: o } = B(r), { allOptions: l } = K(o, Po);
|
|
3044
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: de, LumeLineGroup: Bt };
|
|
3042
3045
|
}
|
|
3043
3046
|
});
|
|
3044
3047
|
var Go = function() {
|
|
@@ -3049,29 +3052,29 @@ var Go = function() {
|
|
|
3049
3052
|
return { key: o, fn: function(l) {
|
|
3050
3053
|
return [e._t(o, null, null, l || {})];
|
|
3051
3054
|
} };
|
|
3052
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3053
|
-
},
|
|
3054
|
-
|
|
3055
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3056
|
+
}, Fo = [], jo = /* @__PURE__ */ E(
|
|
3057
|
+
Bo,
|
|
3055
3058
|
Go,
|
|
3056
|
-
|
|
3059
|
+
Fo,
|
|
3057
3060
|
!1,
|
|
3058
3061
|
null,
|
|
3059
3062
|
null,
|
|
3060
3063
|
null,
|
|
3061
3064
|
null
|
|
3062
3065
|
);
|
|
3063
|
-
const
|
|
3064
|
-
function
|
|
3066
|
+
const rl = jo.exports;
|
|
3067
|
+
function Vo(t) {
|
|
3065
3068
|
return { areaPathDefinition: v(
|
|
3066
3069
|
() => function(r, n) {
|
|
3067
3070
|
if (!r || !n || X(r) || X(n))
|
|
3068
3071
|
return;
|
|
3069
3072
|
const a = t.value[0].values;
|
|
3070
|
-
return
|
|
3073
|
+
return Ut().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
3071
3074
|
}
|
|
3072
3075
|
) };
|
|
3073
3076
|
}
|
|
3074
|
-
const
|
|
3077
|
+
const Mo = {
|
|
3075
3078
|
margins: {
|
|
3076
3079
|
top: 0,
|
|
3077
3080
|
right: 0,
|
|
@@ -3085,14 +3088,14 @@ const zo = {
|
|
|
3085
3088
|
tooltipOptions: {
|
|
3086
3089
|
showTitle: !1
|
|
3087
3090
|
}
|
|
3088
|
-
},
|
|
3091
|
+
}, zo = /* @__PURE__ */ H({
|
|
3089
3092
|
__name: "lume-sparkline-chart",
|
|
3090
3093
|
props: {
|
|
3091
3094
|
...Ke(null),
|
|
3092
3095
|
...pe()
|
|
3093
3096
|
},
|
|
3094
3097
|
setup(t, { expose: e, emit: r }) {
|
|
3095
|
-
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Je(l), { allOptions: c } = K(i,
|
|
3098
|
+
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Je(l), { allOptions: c } = K(i, Mo), { computedLineData: d } = Pt(u), { areaPathDefinition: s } = Vo(d), _ = v(() => {
|
|
3096
3099
|
var y, f;
|
|
3097
3100
|
return (f = (y = u.value) == null ? void 0 : y[0]) == null ? void 0 : f.color;
|
|
3098
3101
|
}), m = v(
|
|
@@ -3107,16 +3110,16 @@ const zo = {
|
|
|
3107
3110
|
noMinSize: !0
|
|
3108
3111
|
};
|
|
3109
3112
|
}
|
|
3110
|
-
function h(y, f,
|
|
3113
|
+
function h(y, f, k) {
|
|
3111
3114
|
if (y.length)
|
|
3112
|
-
return fe().range([0,
|
|
3115
|
+
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3113
3116
|
}
|
|
3114
3117
|
return e({
|
|
3115
3118
|
areaPathDefinition: s
|
|
3116
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart:
|
|
3119
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart: de, LumeLineGroup: Bt };
|
|
3117
3120
|
}
|
|
3118
3121
|
});
|
|
3119
|
-
var
|
|
3122
|
+
var Wo = function() {
|
|
3120
3123
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3121
3124
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3122
3125
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3130,42 +3133,42 @@ var Zo = function() {
|
|
|
3130
3133
|
return [e._t(o, null, null, l || {})];
|
|
3131
3134
|
} };
|
|
3132
3135
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3133
|
-
},
|
|
3136
|
+
}, Zo = [], Uo = /* @__PURE__ */ E(
|
|
3137
|
+
zo,
|
|
3134
3138
|
Wo,
|
|
3135
3139
|
Zo,
|
|
3136
|
-
Uo,
|
|
3137
3140
|
!1,
|
|
3138
3141
|
null,
|
|
3139
3142
|
"bda226a1",
|
|
3140
3143
|
null,
|
|
3141
3144
|
null
|
|
3142
3145
|
);
|
|
3143
|
-
const
|
|
3146
|
+
const al = Uo.exports;
|
|
3144
3147
|
export {
|
|
3145
|
-
|
|
3148
|
+
Qo as LumeAlluvialDiagram,
|
|
3146
3149
|
Da as LumeAlluvialGroup,
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3150
|
+
da as LumeAlluvialNodeHeader,
|
|
3151
|
+
ta as LumeAlluvialNodeLabel,
|
|
3152
|
+
la as LumeAlluvialNodeValue,
|
|
3153
|
+
Hn as LumeAxis,
|
|
3151
3154
|
Ye as LumeBar,
|
|
3152
|
-
|
|
3155
|
+
qo as LumeBarChart,
|
|
3153
3156
|
Qe as LumeBarGroup,
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3157
|
+
de as LumeChart,
|
|
3158
|
+
zn as LumeChartContainer,
|
|
3159
|
+
Yn as LumeChartLegend,
|
|
3160
|
+
tl as LumeGroupedBarChart,
|
|
3161
|
+
To as LumeLine,
|
|
3162
|
+
rl as LumeLineChart,
|
|
3160
3163
|
Bt as LumeLineGroup,
|
|
3161
3164
|
Dr as LumeOverlayGroup,
|
|
3162
3165
|
wo as LumePoint,
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3166
|
+
el as LumeSingleBarChart,
|
|
3167
|
+
al as LumeSparklineChart,
|
|
3168
|
+
nl as LumeStackedBarChart,
|
|
3169
|
+
pr as LumeTooltip,
|
|
3170
|
+
cr as LumeTooltipItem,
|
|
3171
|
+
or as LumeTooltipSummary,
|
|
3172
|
+
er as LumeTooltipTitle
|
|
3170
3173
|
};
|
|
3171
3174
|
//# sourceMappingURL=index.js.map
|