@adyen/lume 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts +1 -1
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-bar-group/lume-bar-group.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
- package/dist/@types/composables/tooltip.d.ts +3 -3
- package/dist/@types/composables/tooltip.d.ts.map +1 -1
- package/dist/@types/docs/storybook-data/base-data.d.ts +7 -0
- package/dist/@types/docs/storybook-data/base-data.d.ts.map +1 -1
- package/dist/@types/utils/constants.d.ts +2 -0
- package/dist/@types/utils/constants.d.ts.map +1 -1
- package/dist/@types/utils/helpers.d.ts +8 -0
- package/dist/@types/utils/helpers.d.ts.map +1 -1
- package/dist/index.js +444 -434
- 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
|
|
1
|
+
import { defineComponent as H, ref as O, isRef as mt, computed as v, watch as C, toRefs as B, inject as _e, reactive as be, onMounted as te, onBeforeUnmount as ht, watchEffect as gt, useSlots as M, provide as Oe, nextTick as Qe, defineAsyncComponent as Ie } from "vue";
|
|
2
2
|
import { format as Vt, ticks as Mt, scaleBand as de, scaleLinear as ve, link as zt, line as Wt, area as Zt } from "d3";
|
|
3
3
|
import { createPopper as Xt } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as Ut, sankey as Yt, sankeyJustify as Kt } from "d3-sankey";
|
|
5
|
-
const Jt = /* @__PURE__ */
|
|
5
|
+
const Jt = /* @__PURE__ */ H({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,7 +44,7 @@ const Jt = /* @__PURE__ */ N({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function w(t, e, r, n, o, a, 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), a && (u._scopeId = "data-v-" + a);
|
|
50
50
|
var c;
|
|
@@ -83,7 +83,7 @@ var Qt = function() {
|
|
|
83
83
|
}, click: function(o) {
|
|
84
84
|
return n.emit("click", o);
|
|
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
|
-
}, qt = [], en = /* @__PURE__ */
|
|
86
|
+
}, qt = [], en = /* @__PURE__ */ w(
|
|
87
87
|
Jt,
|
|
88
88
|
Qt,
|
|
89
89
|
qt,
|
|
@@ -101,10 +101,10 @@ const tn = en.exports, nn = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function yt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function bt(t) {
|
|
108
108
|
return (t == null ? void 0 : t.map(
|
|
109
109
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
110
110
|
).flat()) || [];
|
|
@@ -120,20 +120,20 @@ function rn(t) {
|
|
|
120
120
|
function Ee(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function kt(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, o]) => {
|
|
126
|
-
r[n] = Ee(t[n]) && Ee(o) ?
|
|
126
|
+
r[n] = Ee(t[n]) && Ee(o) ? kt(t[n], o) : o;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
129
|
function on(t) {
|
|
130
130
|
return t != null && Ee(t) && "value" in t;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Y(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
134
134
|
}
|
|
135
135
|
function an(t) {
|
|
136
|
-
return
|
|
136
|
+
return Y(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
138
|
const ln = (t, e) => {
|
|
139
139
|
if (!t)
|
|
@@ -142,7 +142,7 @@ const ln = (t, e) => {
|
|
|
142
142
|
throw new Error("Cannot get highest value from empty array");
|
|
143
143
|
t.some(
|
|
144
144
|
({ values: n }) => n.length - 1 >= e
|
|
145
|
-
) ||
|
|
145
|
+
) || ee(K.IndexExceedsLengthOfDataSets);
|
|
146
146
|
};
|
|
147
147
|
function un(t, e) {
|
|
148
148
|
var r;
|
|
@@ -154,7 +154,7 @@ function un(t, e) {
|
|
|
154
154
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
155
155
|
}
|
|
156
156
|
function we(t) {
|
|
157
|
-
const e =
|
|
157
|
+
const e = mt(t) ? t.value : t;
|
|
158
158
|
if (!e)
|
|
159
159
|
throw new Error("No empty array can be created from specified data value");
|
|
160
160
|
const r = Math.max(
|
|
@@ -164,7 +164,7 @@ function we(t) {
|
|
|
164
164
|
return Array(r).fill(null);
|
|
165
165
|
}
|
|
166
166
|
function sn(t) {
|
|
167
|
-
return
|
|
167
|
+
return Y(t) ? t.domain().length : Math.max(...t.domain());
|
|
168
168
|
}
|
|
169
169
|
function cn(t, e) {
|
|
170
170
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
@@ -195,11 +195,15 @@ const _n = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
|
195
195
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
196
196
|
""
|
|
197
197
|
);
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
function Ve(t, e) {
|
|
199
|
+
const r = e - t.length;
|
|
200
|
+
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
201
|
+
}
|
|
202
|
+
var K = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
203
|
+
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(K || {});
|
|
200
204
|
const pn = "[lume] ";
|
|
201
|
-
function
|
|
202
|
-
e &&
|
|
205
|
+
function ee(t, e = !0) {
|
|
206
|
+
e && yt() || console.warn(pn + "Warning: " + t);
|
|
203
207
|
}
|
|
204
208
|
const ye = (t) => {
|
|
205
209
|
let e = null;
|
|
@@ -208,7 +212,7 @@ const ye = (t) => {
|
|
|
208
212
|
try {
|
|
209
213
|
e = Vt(t);
|
|
210
214
|
} catch {
|
|
211
|
-
|
|
215
|
+
ee(K.InvalidFormat), e = null;
|
|
212
216
|
}
|
|
213
217
|
break;
|
|
214
218
|
case "function":
|
|
@@ -227,10 +231,10 @@ const ye = (t) => {
|
|
|
227
231
|
default: () => ({})
|
|
228
232
|
}
|
|
229
233
|
});
|
|
230
|
-
function
|
|
234
|
+
function J(t, e) {
|
|
231
235
|
return { allOptions: v(() => {
|
|
232
|
-
const n =
|
|
233
|
-
return n ?
|
|
236
|
+
const n = mt(e) ? e == null ? void 0 : e.value : e;
|
|
237
|
+
return n ? kt(n, t.value) : t.value;
|
|
234
238
|
}) };
|
|
235
239
|
}
|
|
236
240
|
const fn = 0.2;
|
|
@@ -254,9 +258,9 @@ function mn(t, e, r) {
|
|
|
254
258
|
const d = o.value / c, s = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / d);
|
|
255
259
|
return u % s === 0;
|
|
256
260
|
}
|
|
257
|
-
return
|
|
261
|
+
return C(e, l), { showTick: i };
|
|
258
262
|
}
|
|
259
|
-
var
|
|
263
|
+
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), xt = /* @__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))(xt || {}), Me = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Me || {}), ze = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(ze || {}), We = /* @__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))(We || {});
|
|
260
264
|
const L = {
|
|
261
265
|
HORIZONTAL: "horizontal",
|
|
262
266
|
VERTICAL: "vertical"
|
|
@@ -264,7 +268,7 @@ const L = {
|
|
|
264
268
|
SINGLE: "single",
|
|
265
269
|
GROUPED: "grouped",
|
|
266
270
|
STACKED: "stacked"
|
|
267
|
-
},
|
|
271
|
+
}, Tt = "No data", qe = 20, At = 0.33, Lt = 0.5, Ot = 12, fe = 8, gn = 1, yn = [
|
|
268
272
|
"auto",
|
|
269
273
|
"auto-start",
|
|
270
274
|
"auto-end",
|
|
@@ -282,9 +286,9 @@ const L = {
|
|
|
282
286
|
"left-end"
|
|
283
287
|
];
|
|
284
288
|
function ke(t) {
|
|
285
|
-
t != null && t.closest("svg") ||
|
|
289
|
+
t != null && t.closest("svg") || ee(K.NotContainedInSvg);
|
|
286
290
|
}
|
|
287
|
-
const
|
|
291
|
+
const It = {
|
|
288
292
|
/** Displays a line for each tick. */
|
|
289
293
|
gridLines: !1,
|
|
290
294
|
/** Displays the axis title. */
|
|
@@ -301,11 +305,11 @@ const Ot = {
|
|
|
301
305
|
/** Space between the tick label and the axis line. */
|
|
302
306
|
tickPadding: 8
|
|
303
307
|
}, bn = {
|
|
304
|
-
...
|
|
308
|
+
...It,
|
|
305
309
|
withTitle: !1,
|
|
306
310
|
skip: !0
|
|
307
311
|
}, kn = {
|
|
308
|
-
...
|
|
312
|
+
...It,
|
|
309
313
|
gridLines: !0
|
|
310
314
|
}, xn = function(t, e, r) {
|
|
311
315
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
@@ -323,7 +327,7 @@ const Ot = {
|
|
|
323
327
|
return {
|
|
324
328
|
x: -(c - t.value.step()) / 2,
|
|
325
329
|
width: c,
|
|
326
|
-
height: r.value.tickPadding +
|
|
330
|
+
height: r.value.tickPadding + Ot + fe
|
|
327
331
|
};
|
|
328
332
|
}
|
|
329
333
|
function l() {
|
|
@@ -399,7 +403,7 @@ const Ot = {
|
|
|
399
403
|
}
|
|
400
404
|
function a() {
|
|
401
405
|
return {
|
|
402
|
-
height: r.value.tickPadding +
|
|
406
|
+
height: r.value.tickPadding + Ot + fe,
|
|
403
407
|
width: n.value,
|
|
404
408
|
x: -(n.value / 2)
|
|
405
409
|
};
|
|
@@ -467,7 +471,7 @@ const Ot = {
|
|
|
467
471
|
"y-linear-scale-axis": Ln
|
|
468
472
|
};
|
|
469
473
|
var Ne = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Ne || {}), He = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(He || {}), ge = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(ge || {});
|
|
470
|
-
const In = /* @__PURE__ */
|
|
474
|
+
const In = /* @__PURE__ */ H({
|
|
471
475
|
__name: "lume-axis",
|
|
472
476
|
props: {
|
|
473
477
|
scale: {
|
|
@@ -506,31 +510,31 @@ const In = /* @__PURE__ */ N({
|
|
|
506
510
|
() => r.type || (f.value === "left" ? "y" : "x")
|
|
507
511
|
), y = v(
|
|
508
512
|
() => h.value === "x" && u.value === L.VERTICAL || h.value === "y" && u.value === L.HORIZONTAL
|
|
509
|
-
), { allOptions: p } =
|
|
513
|
+
), { allOptions: p } = J(
|
|
510
514
|
i,
|
|
511
515
|
h.value === "x" ? bn : kn
|
|
512
|
-
), { showTick:
|
|
513
|
-
var
|
|
514
|
-
return h.value === "y" && c.value ? `translate(0, ${((
|
|
515
|
-
}),
|
|
516
|
-
if (
|
|
516
|
+
), { showTick: k } = mn(o, s, p.value.skip), T = v(() => {
|
|
517
|
+
var $, E, g, N;
|
|
518
|
+
return h.value === "y" && c.value ? `translate(0, ${(($ = a.value) == null ? void 0 : $.height) / 2})` : h.value === "x" && c.value ? `translate(-${((E = a.value) == null ? void 0 : E.width) / 2}, ${(g = a.value) == null ? void 0 : g.height})` : `translate(0, ${h.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
519
|
+
}), x = v(() => {
|
|
520
|
+
if (Y(o.value))
|
|
517
521
|
return o.value.labels || o.value.domain();
|
|
518
|
-
const { tickCount:
|
|
519
|
-
return Mt(
|
|
520
|
-
}),
|
|
521
|
-
const { tickFormat:
|
|
522
|
-
return ye(
|
|
523
|
-
}),
|
|
522
|
+
const { tickCount: $ } = p.value, [E, g] = o.value.domain();
|
|
523
|
+
return Mt(E, g, $);
|
|
524
|
+
}), I = v(() => {
|
|
525
|
+
const { tickFormat: $ } = p.value;
|
|
526
|
+
return ye($);
|
|
527
|
+
}), A = v(
|
|
524
528
|
() => p.value.withHover && y.value && l.value > -1
|
|
525
|
-
),
|
|
529
|
+
), D = v(
|
|
526
530
|
() => p.value.tickPadding + fe || n
|
|
527
|
-
),
|
|
531
|
+
), F = v(() => h.value === "x" ? (
|
|
528
532
|
// If x axis, get the tick height
|
|
529
533
|
Math.max(
|
|
530
534
|
...(s.value || []).map(
|
|
531
|
-
(
|
|
532
|
-
var
|
|
533
|
-
return ((g = (
|
|
535
|
+
($) => {
|
|
536
|
+
var E, g;
|
|
537
|
+
return ((g = (E = $.ref).getBBox) == null ? void 0 : g.call(E).height) + D.value;
|
|
534
538
|
}
|
|
535
539
|
)
|
|
536
540
|
)
|
|
@@ -538,48 +542,48 @@ const In = /* @__PURE__ */ N({
|
|
|
538
542
|
// If y axis, get the tick width
|
|
539
543
|
Math.max(
|
|
540
544
|
...(s.value || []).map(
|
|
541
|
-
(
|
|
542
|
-
var
|
|
543
|
-
return ((g = (
|
|
545
|
+
($) => {
|
|
546
|
+
var E, g;
|
|
547
|
+
return ((g = (E = $.ref).getBBox) == null ? void 0 : g.call(E).width) + D.value;
|
|
544
548
|
}
|
|
545
549
|
)
|
|
546
550
|
)
|
|
547
551
|
));
|
|
548
|
-
function
|
|
549
|
-
const { showTicks:
|
|
550
|
-
return
|
|
552
|
+
function P($) {
|
|
553
|
+
const { showTicks: E } = p.value;
|
|
554
|
+
return E === !1 ? "" : I.value($);
|
|
551
555
|
}
|
|
552
|
-
function
|
|
553
|
-
e("mouseenter", { index: y.value ?
|
|
556
|
+
function G($, E, g) {
|
|
557
|
+
e("mouseenter", { index: y.value ? $ : null, value: E, event: g });
|
|
554
558
|
}
|
|
555
|
-
function
|
|
556
|
-
e("click", { index:
|
|
559
|
+
function j($, E, g) {
|
|
560
|
+
e("click", { index: $, value: E, event: g });
|
|
557
561
|
}
|
|
558
|
-
function
|
|
559
|
-
var
|
|
562
|
+
function W($) {
|
|
563
|
+
var E;
|
|
560
564
|
if (!(!s.value || !s.value.length))
|
|
561
|
-
return (
|
|
565
|
+
return (E = s.value[$]) == null ? void 0 : E.ref;
|
|
562
566
|
}
|
|
563
567
|
function ne() {
|
|
564
|
-
m.value =
|
|
565
|
-
(
|
|
566
|
-
value:
|
|
567
|
-
group: d.getTickGroupAttributes(
|
|
568
|
-
ghost: d.getTickGhostAttributes(
|
|
568
|
+
m.value = x.value.map(
|
|
569
|
+
($, E) => ({
|
|
570
|
+
value: P($),
|
|
571
|
+
group: d.getTickGroupAttributes($, E),
|
|
572
|
+
ghost: d.getTickGhostAttributes(W(E)),
|
|
569
573
|
label: d.getTickLabelAttributes(),
|
|
570
574
|
gridline: d.getGridLinesAttributes()
|
|
571
575
|
})
|
|
572
576
|
);
|
|
573
577
|
}
|
|
574
|
-
function
|
|
575
|
-
const
|
|
576
|
-
Object.entries(
|
|
577
|
-
([g,
|
|
578
|
-
d[g] =
|
|
578
|
+
function q() {
|
|
579
|
+
const $ = o.value.step ? "bandScale" : "linearScale", E = On[`${h.value}-${Ne[$]}`];
|
|
580
|
+
Object.entries(E(o, a, p) || []).forEach(
|
|
581
|
+
([g, N]) => {
|
|
582
|
+
d[g] = N;
|
|
579
583
|
}
|
|
580
584
|
);
|
|
581
585
|
}
|
|
582
|
-
return
|
|
586
|
+
return C(o, q, { flush: "sync", immediate: !0 }), C(o, ne, { immediate: !0 }), C(s, ne), C(F, ($) => e("lume__internal--axis-size", $)), te(() => ke(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ne, POSITIONS: He, TYPES: ge, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: f, computedType: h, shouldHover: y, allOptions: p, showTick: k, axisTransform: T, ticks: x, tickFormatter: I, isHovering: A, axisLabelOffset: D, axisSize: F, formatTick: P, handleTickMouseenter: G, handleTickClick: j, getTextNode: W, setTicks: ne, init: q, LumeTick: tn };
|
|
583
587
|
}
|
|
584
588
|
});
|
|
585
589
|
var $n = function() {
|
|
@@ -599,7 +603,7 @@ var $n = function() {
|
|
|
599
603
|
o
|
|
600
604
|
);
|
|
601
605
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
602
|
-
}, En = [], wn = /* @__PURE__ */
|
|
606
|
+
}, En = [], wn = /* @__PURE__ */ w(
|
|
603
607
|
In,
|
|
604
608
|
$n,
|
|
605
609
|
En,
|
|
@@ -624,11 +628,11 @@ function Hn(t, e, r, n) {
|
|
|
624
628
|
}
|
|
625
629
|
function Cn(t, e, r, n) {
|
|
626
630
|
const o = O(0), a = O(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
627
|
-
return
|
|
631
|
+
return te(() => {
|
|
628
632
|
o.value = r.value, a.value = n.value;
|
|
629
|
-
}),
|
|
633
|
+
}), C(r, (i) => o.value = i), C(n, (i) => a.value = i), { computedWidth: o, computedHeight: a, transformOrigin: l };
|
|
630
634
|
}
|
|
631
|
-
const Dn = /* @__PURE__ */
|
|
635
|
+
const Dn = /* @__PURE__ */ H({
|
|
632
636
|
__name: "lume-bar",
|
|
633
637
|
props: {
|
|
634
638
|
x: {
|
|
@@ -668,8 +672,8 @@ const Dn = /* @__PURE__ */ N({
|
|
|
668
672
|
setup(t, { emit: e }) {
|
|
669
673
|
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = B(r), c = O(null), d = v(
|
|
670
674
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
671
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: f, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = Hn(n, o, a, l),
|
|
672
|
-
return
|
|
675
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Cn(n, o, a, l), { computedX: f, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = Hn(n, o, a, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : a).value), T = v(() => p.value ? 1 : (_.value ? m.computedHeight : l).value), x = s.value || _.value ? m.transformOrigin : null;
|
|
676
|
+
return te(() => ke(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: f, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: p, computedWidth: k, computedHeight: T, transformOrigin: x };
|
|
673
677
|
}
|
|
674
678
|
});
|
|
675
679
|
var Rn = function() {
|
|
@@ -689,7 +693,7 @@ var Rn = function() {
|
|
|
689
693
|
}, mouseleave: function(o) {
|
|
690
694
|
return n.emit("mouseleave", o);
|
|
691
695
|
} } });
|
|
692
|
-
}, Pn = [], Sn = /* @__PURE__ */
|
|
696
|
+
}, Pn = [], Sn = /* @__PURE__ */ w(
|
|
693
697
|
Dn,
|
|
694
698
|
Rn,
|
|
695
699
|
Pn,
|
|
@@ -699,7 +703,7 @@ var Rn = function() {
|
|
|
699
703
|
null,
|
|
700
704
|
null
|
|
701
705
|
);
|
|
702
|
-
const
|
|
706
|
+
const Ze = Sn.exports;
|
|
703
707
|
function Bn() {
|
|
704
708
|
const t = O(), e = be({
|
|
705
709
|
dimensions: {}
|
|
@@ -708,13 +712,13 @@ function Bn() {
|
|
|
708
712
|
e.dimensions = o.contentRect;
|
|
709
713
|
});
|
|
710
714
|
});
|
|
711
|
-
return
|
|
715
|
+
return te(() => {
|
|
712
716
|
r.observe(t.value);
|
|
713
|
-
}),
|
|
717
|
+
}), ht(() => {
|
|
714
718
|
r.unobserve(t.value);
|
|
715
719
|
}), { resizeState: e, resizeRef: t };
|
|
716
720
|
}
|
|
717
|
-
const Fn = /* @__PURE__ */
|
|
721
|
+
const Fn = /* @__PURE__ */ H({
|
|
718
722
|
__name: "lume-chart-container",
|
|
719
723
|
props: {
|
|
720
724
|
margins: {
|
|
@@ -739,7 +743,7 @@ const Fn = /* @__PURE__ */ N({
|
|
|
739
743
|
const r = t, { margins: n, containerSize: o } = B(r), a = O(null), { resizeRef: l, resizeState: i } = Bn(), u = v(
|
|
740
744
|
() => o.value.height + n.value.top + n.value.bottom
|
|
741
745
|
);
|
|
742
|
-
return
|
|
746
|
+
return gt(() => {
|
|
743
747
|
if (!a.value)
|
|
744
748
|
return;
|
|
745
749
|
const { width: c } = i.dimensions, { height: d } = a.value.getBoundingClientRect();
|
|
@@ -768,7 +772,7 @@ var Gn = function() {
|
|
|
768
772
|
}, mouseleave: function(o) {
|
|
769
773
|
return n.emit("mouseleave", o);
|
|
770
774
|
} } }, [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);
|
|
771
|
-
}, jn = [], Vn = /* @__PURE__ */
|
|
775
|
+
}, jn = [], Vn = /* @__PURE__ */ w(
|
|
772
776
|
Fn,
|
|
773
777
|
Gn,
|
|
774
778
|
jn,
|
|
@@ -778,7 +782,7 @@ var Gn = function() {
|
|
|
778
782
|
null,
|
|
779
783
|
null
|
|
780
784
|
);
|
|
781
|
-
const Mn = Vn.exports, zn = /* @__PURE__ */
|
|
785
|
+
const Mn = Vn.exports, zn = /* @__PURE__ */ H({
|
|
782
786
|
__name: "lume-chart-legend",
|
|
783
787
|
props: {
|
|
784
788
|
data: {
|
|
@@ -804,7 +808,7 @@ var Wn = function() {
|
|
|
804
808
|
return n.emit("mouseenter", { index: a, dataset: o, event: l });
|
|
805
809
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${o.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(o.label || a) + " ")]);
|
|
806
810
|
}), 0);
|
|
807
|
-
}, Zn = [], Xn = /* @__PURE__ */
|
|
811
|
+
}, Zn = [], Xn = /* @__PURE__ */ w(
|
|
808
812
|
zn,
|
|
809
813
|
Wn,
|
|
810
814
|
Zn,
|
|
@@ -819,7 +823,7 @@ const Yn = {};
|
|
|
819
823
|
var Kn = function() {
|
|
820
824
|
var e = this, r = e._self._c;
|
|
821
825
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
822
|
-
}, Jn = [], Qn = /* @__PURE__ */
|
|
826
|
+
}, Jn = [], Qn = /* @__PURE__ */ w(
|
|
823
827
|
Yn,
|
|
824
828
|
Kn,
|
|
825
829
|
Jn,
|
|
@@ -834,7 +838,7 @@ const er = {};
|
|
|
834
838
|
var tr = function() {
|
|
835
839
|
var e = this, r = e._self._c;
|
|
836
840
|
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)]);
|
|
837
|
-
}, nr = [], rr = /* @__PURE__ */
|
|
841
|
+
}, nr = [], rr = /* @__PURE__ */ w(
|
|
838
842
|
er,
|
|
839
843
|
tr,
|
|
840
844
|
nr,
|
|
@@ -844,7 +848,7 @@ var tr = function() {
|
|
|
844
848
|
null,
|
|
845
849
|
null
|
|
846
850
|
);
|
|
847
|
-
const or = rr.exports, ar = /* @__PURE__ */
|
|
851
|
+
const or = rr.exports, ar = /* @__PURE__ */ H({
|
|
848
852
|
__name: "lume-tooltip-item",
|
|
849
853
|
props: {
|
|
850
854
|
color: {
|
|
@@ -859,7 +863,7 @@ const or = rr.exports, ar = /* @__PURE__ */ N({
|
|
|
859
863
|
var lr = function() {
|
|
860
864
|
var e = this, r = e._self._c;
|
|
861
865
|
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)]);
|
|
862
|
-
}, ur = [], ir = /* @__PURE__ */
|
|
866
|
+
}, ur = [], ir = /* @__PURE__ */ w(
|
|
863
867
|
ar,
|
|
864
868
|
lr,
|
|
865
869
|
ur,
|
|
@@ -869,7 +873,7 @@ var lr = function() {
|
|
|
869
873
|
null,
|
|
870
874
|
null
|
|
871
875
|
);
|
|
872
|
-
const sr = ir.exports, cr = /* @__PURE__ */
|
|
876
|
+
const sr = ir.exports, cr = /* @__PURE__ */ H({
|
|
873
877
|
__name: "lume-tooltip",
|
|
874
878
|
props: {
|
|
875
879
|
targetElement: {
|
|
@@ -905,7 +909,7 @@ const sr = ir.exports, cr = /* @__PURE__ */ N({
|
|
|
905
909
|
},
|
|
906
910
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
907
911
|
setup(t, { emit: e }) {
|
|
908
|
-
const r = t, n = O(null), { items: o, options: a } = B(r), l =
|
|
912
|
+
const r = t, n = O(null), { items: o, options: a } = B(r), l = M(), i = O(null), { allOptions: u } = J(a), c = v(
|
|
909
913
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
910
914
|
), d = v(
|
|
911
915
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -926,8 +930,8 @@ const sr = ir.exports, cr = /* @__PURE__ */ N({
|
|
|
926
930
|
() => u.value.showTitle !== !1 && r.title != null
|
|
927
931
|
), m = v(() => ye(u.value.valueFormat)), f = v(() => ye(u.value.titleFormat)), h = v(
|
|
928
932
|
() => {
|
|
929
|
-
var
|
|
930
|
-
return ((
|
|
933
|
+
var x;
|
|
934
|
+
return ((x = o.value) == null ? void 0 : x.find((I) => I.isSummary)) || {
|
|
931
935
|
label: u.value.summary ?? r.summary
|
|
932
936
|
};
|
|
933
937
|
}
|
|
@@ -939,20 +943,20 @@ const sr = ir.exports, cr = /* @__PURE__ */ N({
|
|
|
939
943
|
modifiers: s.value
|
|
940
944
|
}), e("opened", r.targetElement));
|
|
941
945
|
}
|
|
942
|
-
function
|
|
946
|
+
function k() {
|
|
943
947
|
i.value && (i.value.destroy(), e("closed"));
|
|
944
948
|
}
|
|
945
|
-
function
|
|
949
|
+
function T() {
|
|
946
950
|
i.value && (u.value.withAnimation !== !1 && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
947
951
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
948
|
-
}() :
|
|
952
|
+
}() : k());
|
|
949
953
|
}
|
|
950
|
-
return
|
|
954
|
+
return C(
|
|
951
955
|
() => r.targetElement,
|
|
952
|
-
(
|
|
953
|
-
!
|
|
956
|
+
(x, I) => {
|
|
957
|
+
!I && x ? p() : T();
|
|
954
958
|
}
|
|
955
|
-
),
|
|
959
|
+
), te(p), ht(k), { __sfc: !0, props: r, emit: e, root: n, items: o, options: a, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: f, summaryItem: h, hasSummary: y, initPopper: p, destroyPopper: k, updatePopper: T, LumeTooltipTitle: qn, LumeTooltipSummary: or, LumeTooltipItem: sr };
|
|
956
960
|
}
|
|
957
961
|
});
|
|
958
962
|
var dr = function() {
|
|
@@ -980,7 +984,7 @@ var dr = function() {
|
|
|
980
984
|
});
|
|
981
985
|
})], 2)];
|
|
982
986
|
})], 2);
|
|
983
|
-
}, vr = [], _r = /* @__PURE__ */
|
|
987
|
+
}, vr = [], _r = /* @__PURE__ */ w(
|
|
984
988
|
cr,
|
|
985
989
|
dr,
|
|
986
990
|
vr,
|
|
@@ -992,24 +996,24 @@ var dr = function() {
|
|
|
992
996
|
);
|
|
993
997
|
const pr = _r.exports;
|
|
994
998
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
995
|
-
const fr = re.Categorical, me =
|
|
999
|
+
const fr = re.Categorical, me = z.Skyblue, mr = Me.SkyTeal;
|
|
996
1000
|
function hr(t) {
|
|
997
1001
|
return t === re.Divergent ? mr : me;
|
|
998
1002
|
}
|
|
999
1003
|
function gr(t) {
|
|
1000
|
-
return Object.values(
|
|
1001
|
-
}
|
|
1002
|
-
function
|
|
1003
|
-
return e === re.Divergent ? Object.values(
|
|
1004
|
-
...
|
|
1005
|
-
...
|
|
1006
|
-
...
|
|
1007
|
-
...
|
|
1004
|
+
return Object.values(We).includes(t);
|
|
1005
|
+
}
|
|
1006
|
+
function et(t, e) {
|
|
1007
|
+
return e === re.Divergent ? Object.values(Me).includes(t) : Object.values({
|
|
1008
|
+
...z,
|
|
1009
|
+
...xt,
|
|
1010
|
+
...ze,
|
|
1011
|
+
...We
|
|
1008
1012
|
}).includes(t);
|
|
1009
1013
|
}
|
|
1010
1014
|
function yr(t, e) {
|
|
1011
|
-
const r = Object.values(
|
|
1012
|
-
return dn(Object.values(
|
|
1015
|
+
const r = Object.values(z).indexOf(t);
|
|
1016
|
+
return dn(Object.values(z), r > -1 ? r : 0)[e];
|
|
1013
1017
|
}
|
|
1014
1018
|
function br(t, e) {
|
|
1015
1019
|
const r = 50 + e * 10;
|
|
@@ -1019,7 +1023,7 @@ function kr(t, e) {
|
|
|
1019
1023
|
const r = (e + 1) * 10;
|
|
1020
1024
|
return `${t}-${r}`;
|
|
1021
1025
|
}
|
|
1022
|
-
function
|
|
1026
|
+
function tt(t, e, r) {
|
|
1023
1027
|
switch (e) {
|
|
1024
1028
|
default:
|
|
1025
1029
|
case re.Categorical:
|
|
@@ -1031,7 +1035,7 @@ function et(t, e, r) {
|
|
|
1031
1035
|
}
|
|
1032
1036
|
}
|
|
1033
1037
|
function xr(t, e, r = fr, n) {
|
|
1034
|
-
return
|
|
1038
|
+
return et(t, r) ? t : (n > 4 && (ee(K.ColorLoop), n = n % 5), et(e, r) ? tt(e, r, n) : tt(hr(r), r, n));
|
|
1035
1039
|
}
|
|
1036
1040
|
function Tr(t) {
|
|
1037
1041
|
return t.map((e) => on(e) ? e : { value: e });
|
|
@@ -1039,7 +1043,7 @@ function Tr(t) {
|
|
|
1039
1043
|
function Ar(t) {
|
|
1040
1044
|
return t.__internal === !0;
|
|
1041
1045
|
}
|
|
1042
|
-
const
|
|
1046
|
+
const Xe = (t = null) => ({
|
|
1043
1047
|
data: {
|
|
1044
1048
|
type: Array,
|
|
1045
1049
|
required: !0,
|
|
@@ -1051,20 +1055,20 @@ const Ze = (t = null) => ({
|
|
|
1051
1055
|
},
|
|
1052
1056
|
color: {
|
|
1053
1057
|
type: String,
|
|
1054
|
-
default:
|
|
1058
|
+
default: z.Skyblue
|
|
1055
1059
|
},
|
|
1056
1060
|
title: {
|
|
1057
1061
|
type: String,
|
|
1058
1062
|
default: null
|
|
1059
1063
|
}
|
|
1060
1064
|
});
|
|
1061
|
-
function
|
|
1065
|
+
function Ue(t, e, r, n, o) {
|
|
1062
1066
|
const a = be({
|
|
1063
1067
|
width: 0,
|
|
1064
1068
|
height: 0
|
|
1065
1069
|
}), l = _n(12), i = v(() => {
|
|
1066
1070
|
var d;
|
|
1067
|
-
return t.value.length > 5 &&
|
|
1071
|
+
return t.value.length > 5 && ee(K.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1068
1072
|
(s, _) => {
|
|
1069
1073
|
if (Ar(s))
|
|
1070
1074
|
return s;
|
|
@@ -1084,7 +1088,7 @@ function Xe(t, e, r, n, o) {
|
|
|
1084
1088
|
);
|
|
1085
1089
|
}), u = v(() => Array.isArray(e.value) ? e.value : we(t.value).map((d, s) => s));
|
|
1086
1090
|
function c(d) {
|
|
1087
|
-
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && we(t).length * (((n == null ? void 0 : n.value.barHeight) ||
|
|
1091
|
+
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && we(t).length * (((n == null ? void 0 : n.value.barHeight) || qe) * 2) + ((n == null ? void 0 : n.value.barHeight) || qe) || d.height;
|
|
1088
1092
|
a.width = d.width, a.height = s;
|
|
1089
1093
|
}
|
|
1090
1094
|
return {
|
|
@@ -1109,63 +1113,63 @@ function Or(t, e, r, n, o) {
|
|
|
1109
1113
|
const a = O(null), l = O(null);
|
|
1110
1114
|
function i() {
|
|
1111
1115
|
const { width: u, height: c } = r;
|
|
1112
|
-
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value =
|
|
1116
|
+
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value = rt(
|
|
1113
1117
|
t.value,
|
|
1114
1118
|
u,
|
|
1115
1119
|
n.value,
|
|
1116
1120
|
o.value.startOnZero
|
|
1117
|
-
), l.value =
|
|
1121
|
+
), l.value = nt(
|
|
1118
1122
|
e.value,
|
|
1119
1123
|
c,
|
|
1120
1124
|
n.value,
|
|
1121
1125
|
o.value
|
|
1122
|
-
)) : (a.value =
|
|
1126
|
+
)) : (a.value = nt(
|
|
1123
1127
|
e.value,
|
|
1124
1128
|
u,
|
|
1125
1129
|
n.value,
|
|
1126
1130
|
o.value
|
|
1127
|
-
), l.value =
|
|
1131
|
+
), l.value = rt(
|
|
1128
1132
|
t.value,
|
|
1129
1133
|
c,
|
|
1130
1134
|
n.value,
|
|
1131
1135
|
o.value.startOnZero
|
|
1132
1136
|
)));
|
|
1133
1137
|
}
|
|
1134
|
-
return
|
|
1138
|
+
return gt(i), { xScale: a, yScale: l };
|
|
1135
1139
|
}
|
|
1136
|
-
function
|
|
1137
|
-
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ?
|
|
1140
|
+
function nt(t, e, r, n) {
|
|
1141
|
+
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ? Lt : At);
|
|
1138
1142
|
return Object.assign(
|
|
1139
1143
|
de().range(o).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, d) => d)),
|
|
1140
1144
|
{ labels: t }
|
|
1141
1145
|
);
|
|
1142
1146
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const o =
|
|
1147
|
+
function rt(t, e, r, n) {
|
|
1148
|
+
const o = bt(t).filter((d) => d != null), a = [0, e];
|
|
1145
1149
|
if (o.length === 0)
|
|
1146
1150
|
return ve().range(a).domain([0, 0]).nice();
|
|
1147
1151
|
const l = Math.min(...o), i = n && l > 0 ? 0 : l, u = Math.max(...o), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1148
1152
|
return ve().range(a).domain(c).nice();
|
|
1149
1153
|
}
|
|
1150
|
-
function
|
|
1154
|
+
function ot(t) {
|
|
1151
1155
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1152
1156
|
}
|
|
1153
1157
|
function Ce(t, e) {
|
|
1154
|
-
return
|
|
1158
|
+
return Y(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1155
1159
|
}
|
|
1156
|
-
function
|
|
1160
|
+
function at(t, e, {
|
|
1157
1161
|
padding: r,
|
|
1158
1162
|
paddingInner: n,
|
|
1159
1163
|
paddingOuter: o
|
|
1160
1164
|
} = {}) {
|
|
1161
|
-
const a = r ?? (e === L.HORIZONTAL ?
|
|
1165
|
+
const a = r ?? (e === L.HORIZONTAL ? Lt : At);
|
|
1162
1166
|
return t.copy().paddingInner(n ?? a).paddingOuter(o ?? a);
|
|
1163
1167
|
}
|
|
1164
|
-
function
|
|
1168
|
+
function $t(t) {
|
|
1165
1169
|
return Object.values(L).includes(t);
|
|
1166
1170
|
}
|
|
1167
1171
|
const ue = (t, e = !0) => ({
|
|
1168
|
-
...
|
|
1172
|
+
...Xe(t),
|
|
1169
1173
|
...Lr(),
|
|
1170
1174
|
...pe(),
|
|
1171
1175
|
classList: {
|
|
@@ -1180,11 +1184,11 @@ const ue = (t, e = !0) => ({
|
|
|
1180
1184
|
orientation: {
|
|
1181
1185
|
type: String,
|
|
1182
1186
|
default: L.VERTICAL,
|
|
1183
|
-
validator:
|
|
1187
|
+
validator: $t
|
|
1184
1188
|
}
|
|
1185
1189
|
} : {}
|
|
1186
1190
|
}), Ir = (t) => ({
|
|
1187
|
-
...
|
|
1191
|
+
...Xe(t),
|
|
1188
1192
|
...pe(),
|
|
1189
1193
|
hoveredElement: {
|
|
1190
1194
|
type: [Number, String],
|
|
@@ -1206,7 +1210,7 @@ const ue = (t, e = !0) => ({
|
|
|
1206
1210
|
orientation: {
|
|
1207
1211
|
type: String,
|
|
1208
1212
|
default: L.VERTICAL,
|
|
1209
|
-
validator:
|
|
1213
|
+
validator: $t
|
|
1210
1214
|
},
|
|
1211
1215
|
xScale: {
|
|
1212
1216
|
type: Function,
|
|
@@ -1232,7 +1236,7 @@ const ue = (t, e = !0) => ({
|
|
|
1232
1236
|
type: [String, Array],
|
|
1233
1237
|
default: () => []
|
|
1234
1238
|
}
|
|
1235
|
-
}), $r = /* @__PURE__ */
|
|
1239
|
+
}), $r = /* @__PURE__ */ H({
|
|
1236
1240
|
__name: "lume-overlay-group",
|
|
1237
1241
|
props: {
|
|
1238
1242
|
...xe(),
|
|
@@ -1246,7 +1250,7 @@ const ue = (t, e = !0) => ({
|
|
|
1246
1250
|
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = B(r), i = v(() => we(n));
|
|
1247
1251
|
function u(c) {
|
|
1248
1252
|
var y;
|
|
1249
|
-
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, f = _ * m, h =
|
|
1253
|
+
const d = o.value === L.HORIZONTAL ? l.value : a.value, s = d.domain(), _ = an(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, f = _ * m, h = Y(d) ? d(s[c]) - f / 2 : d(c) - _ / 2;
|
|
1250
1254
|
return o.value === L.HORIZONTAL ? {
|
|
1251
1255
|
width: Math.max(...a.value.range()),
|
|
1252
1256
|
height: _,
|
|
@@ -1257,7 +1261,7 @@ const ue = (t, e = !0) => ({
|
|
|
1257
1261
|
transform: `translate(${h}, 0)`
|
|
1258
1262
|
};
|
|
1259
1263
|
}
|
|
1260
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1264
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ze };
|
|
1261
1265
|
}
|
|
1262
1266
|
});
|
|
1263
1267
|
var Er = function() {
|
|
@@ -1269,7 +1273,7 @@ var Er = function() {
|
|
|
1269
1273
|
return n.emit("click", { index: a, event: l });
|
|
1270
1274
|
} } }, "lume-bar", n.getOverlayBarAttributes(a), !1));
|
|
1271
1275
|
}), 1);
|
|
1272
|
-
}, wr = [], Nr = /* @__PURE__ */
|
|
1276
|
+
}, wr = [], Nr = /* @__PURE__ */ w(
|
|
1273
1277
|
$r,
|
|
1274
1278
|
Er,
|
|
1275
1279
|
wr,
|
|
@@ -1306,7 +1310,7 @@ const Hr = Nr.exports, Cr = [
|
|
|
1306
1310
|
"tooltip-moved",
|
|
1307
1311
|
"tooltip-closed",
|
|
1308
1312
|
"hovered-index-changed"
|
|
1309
|
-
],
|
|
1313
|
+
], Q = (t, e) => {
|
|
1310
1314
|
function r(a, ...l) {
|
|
1311
1315
|
document.dispatchEvent(
|
|
1312
1316
|
new CustomEvent(`${e}_${a}`, {
|
|
@@ -1324,7 +1328,7 @@ const Hr = Nr.exports, Cr = [
|
|
|
1324
1328
|
};
|
|
1325
1329
|
function Dr(t) {
|
|
1326
1330
|
return { hasNegativeValues: v(
|
|
1327
|
-
() =>
|
|
1331
|
+
() => bt(t.value).some((r) => r < 0)
|
|
1328
1332
|
) };
|
|
1329
1333
|
}
|
|
1330
1334
|
function Rr(t, e, r, n) {
|
|
@@ -1352,22 +1356,20 @@ function Rr(t, e, r, n) {
|
|
|
1352
1356
|
transform: i.value
|
|
1353
1357
|
})) };
|
|
1354
1358
|
}
|
|
1355
|
-
function $t(t, e) {
|
|
1356
|
-
const r = e - t.length;
|
|
1357
|
-
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
1358
|
-
}
|
|
1359
1359
|
function Pr(t, e) {
|
|
1360
|
-
return t.reduce((r, n) =>
|
|
1360
|
+
return t.reduce((r, n) => Ve(n.values, e).map(
|
|
1361
|
+
(o, a) => r[a] ? o.value > r[a] ? o.value : r[a] : o.value ?? 0
|
|
1362
|
+
), []);
|
|
1361
1363
|
}
|
|
1362
1364
|
function Sr(t, e) {
|
|
1363
|
-
return t.reduce((r, n) =>
|
|
1365
|
+
return t.reduce((r, n) => Ve(n.values, e).map(
|
|
1364
1366
|
(o, a) => {
|
|
1365
1367
|
const l = o.value == null || o.value < 0 ? 0 : o.value;
|
|
1366
1368
|
return r[a] ? r[a] + l : l;
|
|
1367
1369
|
}
|
|
1368
1370
|
), []);
|
|
1369
1371
|
}
|
|
1370
|
-
const
|
|
1372
|
+
const lt = {
|
|
1371
1373
|
"stacked-bar": Sr
|
|
1372
1374
|
};
|
|
1373
1375
|
function Et(t, e, r, n, o, a, l, i) {
|
|
@@ -1379,19 +1381,19 @@ function Et(t, e, r, n, o, a, l, i) {
|
|
|
1379
1381
|
);
|
|
1380
1382
|
function c(d) {
|
|
1381
1383
|
var m;
|
|
1382
|
-
const s = ((m =
|
|
1384
|
+
const s = ((m = o == null ? void 0 : o.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && lt[i.value] ? lt[i.value](
|
|
1383
1385
|
d,
|
|
1384
1386
|
s
|
|
1385
1387
|
) : Pr(d, s);
|
|
1386
1388
|
t.value = _.map((f, h) => ({
|
|
1387
|
-
cx: (
|
|
1388
|
-
cy: (
|
|
1389
|
+
cx: (a == null ? void 0 : a.value) === L.HORIZONTAL ? r.value(f) : Ce(r.value, h),
|
|
1390
|
+
cy: (a == null ? void 0 : a.value) === L.HORIZONTAL ? Ce(n.value, h) : n.value(f)
|
|
1389
1391
|
}));
|
|
1390
1392
|
}
|
|
1391
|
-
return
|
|
1393
|
+
return C(
|
|
1392
1394
|
[r, n],
|
|
1393
1395
|
() => {
|
|
1394
|
-
r.value && n.value && (
|
|
1396
|
+
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
1395
1397
|
},
|
|
1396
1398
|
{ immediate: !0 }
|
|
1397
1399
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
@@ -1414,7 +1416,7 @@ function Fr(t) {
|
|
|
1414
1416
|
return {
|
|
1415
1417
|
color: ((l = a[r]) == null ? void 0 : l.color) || n,
|
|
1416
1418
|
label: o,
|
|
1417
|
-
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ??
|
|
1419
|
+
value: ((i = a[r]) == null ? void 0 : i.label) ?? ((u = a[r]) == null ? void 0 : u.value) ?? Tt
|
|
1418
1420
|
};
|
|
1419
1421
|
})
|
|
1420
1422
|
) };
|
|
@@ -1445,7 +1447,7 @@ function Vr(t, e) {
|
|
|
1445
1447
|
function Mr(t, e) {
|
|
1446
1448
|
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Se : t.left;
|
|
1447
1449
|
}
|
|
1448
|
-
const zr = /* @__PURE__ */
|
|
1450
|
+
const zr = /* @__PURE__ */ H({
|
|
1449
1451
|
__name: "lume-chart",
|
|
1450
1452
|
props: {
|
|
1451
1453
|
...ue(),
|
|
@@ -1455,123 +1457,123 @@ const zr = /* @__PURE__ */ N({
|
|
|
1455
1457
|
}
|
|
1456
1458
|
},
|
|
1457
1459
|
setup(t, { emit: e }) {
|
|
1458
|
-
const r = t, n =
|
|
1459
|
-
|
|
1460
|
-
A,
|
|
1460
|
+
const r = t, n = M(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = B(r), d = O(-1), s = O(null), _ = O(null), m = O([]), f = O(null), h = O(0), y = O(0), { allOptions: p } = J(i), { internalData: k, computedLabels: T, containerSize: x, updateSize: I, chartID: A } = Ue(o, a, l, p, u), { listenInternalEvent: D } = Q(e, A), { xScale: F, yScale: P } = Or(
|
|
1461
|
+
k,
|
|
1461
1462
|
T,
|
|
1463
|
+
x,
|
|
1462
1464
|
u,
|
|
1463
1465
|
p
|
|
1464
|
-
),
|
|
1466
|
+
), G = v(() => ({
|
|
1465
1467
|
top: Gr(p.value.margins),
|
|
1466
1468
|
right: jr(p.value.margins),
|
|
1467
1469
|
bottom: Vr(p.value.margins, h.value),
|
|
1468
1470
|
left: Mr(p.value.margins, y.value)
|
|
1469
|
-
})),
|
|
1471
|
+
})), j = v(() => {
|
|
1470
1472
|
var b;
|
|
1471
|
-
return r.xScale ?
|
|
1472
|
-
}),
|
|
1473
|
+
return r.xScale ? ot(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, a.value, x) : F.value;
|
|
1474
|
+
}), W = v(() => {
|
|
1473
1475
|
var b;
|
|
1474
|
-
return r.yScale ?
|
|
1476
|
+
return r.yScale ? ot(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, a.value, x) : P.value;
|
|
1475
1477
|
}), ne = v(() => ({
|
|
1476
1478
|
...p.value.xAxisOptions,
|
|
1477
1479
|
withHover: u.value === L.VERTICAL
|
|
1478
|
-
})),
|
|
1480
|
+
})), q = v(() => ({
|
|
1479
1481
|
...p.value.yAxisOptions,
|
|
1480
1482
|
withHover: u.value === L.HORIZONTAL
|
|
1481
|
-
})),
|
|
1483
|
+
})), $ = v(() => {
|
|
1482
1484
|
var b;
|
|
1483
1485
|
return (b = p.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1484
|
-
}),
|
|
1486
|
+
}), E = v(() => {
|
|
1485
1487
|
var b;
|
|
1486
1488
|
return (b = p.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1487
1489
|
}), g = v(() => {
|
|
1488
1490
|
var b;
|
|
1489
|
-
return ((b = p.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 &&
|
|
1490
|
-
}),
|
|
1491
|
+
return ((b = p.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && $.value;
|
|
1492
|
+
}), N = v(() => {
|
|
1491
1493
|
var b;
|
|
1492
|
-
return ((b = p.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 &&
|
|
1493
|
-
}),
|
|
1494
|
+
return ((b = p.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && E.value;
|
|
1495
|
+
}), R = v(
|
|
1494
1496
|
() => o.value.every((b) => !b.values.length)
|
|
1495
|
-
),
|
|
1497
|
+
), Z = v(() => {
|
|
1496
1498
|
const b = [], { noBaseScales: S } = p.value;
|
|
1497
|
-
return S || b.push(() => !!(
|
|
1498
|
-
}), { hasNegativeValues:
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1499
|
+
return S || b.push(() => !!(j.value && W.value)), b.every((V) => V() === !0);
|
|
1500
|
+
}), { hasNegativeValues: X } = Dr(k), { negativeBarAttributes: U } = Rr(
|
|
1501
|
+
x,
|
|
1502
|
+
j,
|
|
1503
|
+
W,
|
|
1502
1504
|
u
|
|
1503
1505
|
), { shouldGenerateTooltipAnchors: Te } = Et(
|
|
1504
1506
|
m,
|
|
1505
1507
|
p,
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
+
j,
|
|
1509
|
+
W,
|
|
1510
|
+
a,
|
|
1508
1511
|
u,
|
|
1509
|
-
|
|
1510
|
-
c
|
|
1511
|
-
|
|
1512
|
-
), { tooltipConfig: se, showTooltip: ce, hideTooltip: Ye } = Br(), { getTooltipItems: Rt } = Fr(x), Pt = v(
|
|
1512
|
+
k,
|
|
1513
|
+
c
|
|
1514
|
+
), { tooltipConfig: se, showTooltip: ce, hideTooltip: Ke } = Br(), { getTooltipItems: Rt } = Fr(k), Pt = v(
|
|
1513
1515
|
() => p.value.withTooltip !== !1 && se.opened
|
|
1514
1516
|
), St = v(
|
|
1515
1517
|
() => {
|
|
1516
1518
|
var b;
|
|
1517
1519
|
return ((b = p.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1518
1520
|
}
|
|
1519
|
-
),
|
|
1521
|
+
), Je = v(() => {
|
|
1520
1522
|
var S;
|
|
1521
1523
|
const b = (S = p.value.tooltipOptions) == null ? void 0 : S.withPointerEvents;
|
|
1522
1524
|
return se.opened && (!b || b && f.value === !1);
|
|
1523
1525
|
});
|
|
1524
1526
|
function he(b) {
|
|
1525
|
-
var
|
|
1527
|
+
var V;
|
|
1526
1528
|
if (b === d.value)
|
|
1527
1529
|
return;
|
|
1528
1530
|
const S = d.value;
|
|
1529
1531
|
if (p.value.withHover !== !1 && (d.value = b), p.value.withTooltip !== !1) {
|
|
1530
|
-
const jt = (
|
|
1532
|
+
const jt = (V = p.value.tooltipOptions) != null && V.targetElement ? p.value.tooltipOptions.targetElement === "self" ? _.value.$el : p.value.tooltipOptions.targetElement : s.value[b];
|
|
1531
1533
|
ce(jt);
|
|
1532
1534
|
}
|
|
1533
1535
|
e("hovered-index-changed", { newIndex: b, oldIndex: S });
|
|
1534
1536
|
}
|
|
1535
1537
|
function Ae() {
|
|
1536
|
-
|
|
1538
|
+
Ke(), d.value = -1;
|
|
1537
1539
|
}
|
|
1538
1540
|
function Le(b) {
|
|
1539
1541
|
if (!o.value.some(
|
|
1540
|
-
({ values:
|
|
1542
|
+
({ values: V }) => b <= V.length - 1
|
|
1541
1543
|
)) {
|
|
1542
|
-
|
|
1544
|
+
ee(K.InvalidHoveredIndex);
|
|
1543
1545
|
return;
|
|
1544
1546
|
}
|
|
1545
1547
|
he(b);
|
|
1546
1548
|
}
|
|
1547
1549
|
function Bt() {
|
|
1548
1550
|
setTimeout(() => {
|
|
1549
|
-
|
|
1551
|
+
Je.value && Ae(), e("chart-mouseleave");
|
|
1550
1552
|
}, 0);
|
|
1551
1553
|
}
|
|
1552
|
-
function Ft({ index: b, value: S, event:
|
|
1553
|
-
b !== null && he(b), e("axis-mouseenter", { index: b, value: S, event:
|
|
1554
|
+
function Ft({ index: b, value: S, event: V }) {
|
|
1555
|
+
b !== null && he(b), e("axis-mouseenter", { index: b, value: S, event: V });
|
|
1554
1556
|
}
|
|
1555
|
-
function Gt({ index: b, value: S, event:
|
|
1556
|
-
e("axis-click", { index: b, value: S, event:
|
|
1557
|
+
function Gt({ index: b, value: S, event: V }) {
|
|
1558
|
+
e("axis-click", { index: b, value: S, event: V });
|
|
1557
1559
|
}
|
|
1558
|
-
return
|
|
1560
|
+
return C(
|
|
1559
1561
|
o,
|
|
1560
1562
|
(b, S) => e("data-changed", { newValue: b, oldValue: S })
|
|
1561
|
-
),
|
|
1563
|
+
), C(
|
|
1562
1564
|
a,
|
|
1563
1565
|
(b, S) => e("labels-changed", { newValue: b, oldValue: S })
|
|
1564
|
-
),
|
|
1566
|
+
), C(R, (b) => b && ee(K.Empty), { immediate: !0 }), C(() => r.hoveredIndex, Le), C(
|
|
1565
1567
|
m,
|
|
1566
1568
|
(b) => {
|
|
1567
1569
|
b && r.hoveredIndex != null && d.value === -1 && Le(r.hoveredIndex);
|
|
1568
1570
|
},
|
|
1569
1571
|
{ flush: "post" }
|
|
1570
|
-
),
|
|
1572
|
+
), C(f, (b) => {
|
|
1571
1573
|
b === !1 && se.opened && Ae();
|
|
1572
|
-
}),
|
|
1573
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1574
|
-
}), Oe("chartID",
|
|
1574
|
+
}), te(async () => {
|
|
1575
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", he);
|
|
1576
|
+
}), Oe("chartID", A), Oe("isEmpty", R), Oe("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: f, xAxisHeight: h, yAxisWidth: y, allOptions: p, internalData: k, computedLabels: T, containerSize: x, updateSize: I, chartID: A, listenInternalEvent: D, xScale: F, yScale: P, computedMargins: G, computedXScale: j, computedYScale: W, computedXAxisOptions: ne, computedYAxisOptions: q, xAxisTitle: $, yAxisTitle: E, showXAxisTitle: g, showYAxisTitle: N, isEmpty: R, isReady: Z, hasNegativeValues: X, negativeBarAttributes: U, shouldGenerateTooltipAnchors: Te, tooltipConfig: se, showTooltip: ce, hideTooltip: Ke, getTooltipItems: Rt, isTooltipOpened: Pt, tooltipPosition: St, shouldHideTooltip: Je, handleInternalHover: he, handleHideTooltip: Ae, handleExternalHover: Le, handleMouseleave: Bt, handleAxisMouseenter: Ft, handleAxisClick: Gt, LumeAxis: Nn, LumeBar: Ze, LumeChartContainer: Mn, LumeChartLegend: Un, LumeTooltip: pr, LumeOverlayGroup: Hr, TOOLTIP_ANCHOR_RADIUS: gn };
|
|
1575
1577
|
}
|
|
1576
1578
|
});
|
|
1577
1579
|
var Wr = function() {
|
|
@@ -1631,17 +1633,17 @@ var Wr = function() {
|
|
|
1631
1633
|
}, { 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(o, a) {
|
|
1632
1634
|
return r("circle", e._b({ key: `anchor_${a}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", o, !1));
|
|
1633
1635
|
}), 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);
|
|
1634
|
-
}, Zr = [], Xr = /* @__PURE__ */
|
|
1636
|
+
}, Zr = [], Xr = /* @__PURE__ */ w(
|
|
1635
1637
|
zr,
|
|
1636
1638
|
Wr,
|
|
1637
1639
|
Zr,
|
|
1638
1640
|
!1,
|
|
1639
1641
|
null,
|
|
1640
|
-
"
|
|
1642
|
+
"15099487",
|
|
1641
1643
|
null,
|
|
1642
1644
|
null
|
|
1643
1645
|
);
|
|
1644
|
-
const ie = Xr.exports,
|
|
1646
|
+
const ie = Xr.exports, ut = 8, Ur = 8, Yr = 20, $e = 2, it = 2, Kr = /* @__PURE__ */ H({
|
|
1645
1647
|
__name: "lume-alluvial-node-label",
|
|
1646
1648
|
props: {
|
|
1647
1649
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1651,25 +1653,25 @@ const ie = Xr.exports, lt = 8, Ur = 8, Yr = 20, $e = 2, ut = 2, Kr = /* @__PURE_
|
|
|
1651
1653
|
emits: ["lume__internal--node-resize"],
|
|
1652
1654
|
setup(t, { emit: e }) {
|
|
1653
1655
|
const r = t, n = O(null), o = O(r.maxWidth), a = O(1);
|
|
1654
|
-
return
|
|
1656
|
+
return C(
|
|
1655
1657
|
[n, () => r.maxWidth],
|
|
1656
1658
|
async ([l, i]) => {
|
|
1657
1659
|
if (l && i) {
|
|
1658
|
-
o.value = i, await
|
|
1660
|
+
o.value = i, await Qe();
|
|
1659
1661
|
const { width: u, height: c } = l.getBoundingClientRect();
|
|
1660
|
-
o.value = u +
|
|
1662
|
+
o.value = u + it > i ? i : u + it, a.value = Math.ceil(c);
|
|
1661
1663
|
}
|
|
1662
1664
|
},
|
|
1663
1665
|
{ immediate: !0 }
|
|
1664
|
-
),
|
|
1665
|
-
l !== r.maxWidth && (await
|
|
1666
|
+
), C(o, async (l) => {
|
|
1667
|
+
l !== r.maxWidth && (await Qe(), e("lume__internal--node-resize"));
|
|
1666
1668
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: o, foreignObjectHeight: a };
|
|
1667
1669
|
}
|
|
1668
1670
|
});
|
|
1669
1671
|
var Jr = function() {
|
|
1670
1672
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1671
1673
|
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);
|
|
1672
|
-
}, Qr = [], qr = /* @__PURE__ */
|
|
1674
|
+
}, Qr = [], qr = /* @__PURE__ */ w(
|
|
1673
1675
|
Kr,
|
|
1674
1676
|
Jr,
|
|
1675
1677
|
Qr,
|
|
@@ -1679,7 +1681,7 @@ var Jr = function() {
|
|
|
1679
1681
|
null,
|
|
1680
1682
|
null
|
|
1681
1683
|
);
|
|
1682
|
-
const eo = qr.exports, to = /* @__PURE__ */
|
|
1684
|
+
const eo = qr.exports, to = /* @__PURE__ */ H({
|
|
1683
1685
|
__name: "lume-alluvial-node-value",
|
|
1684
1686
|
props: {
|
|
1685
1687
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1691,7 +1693,7 @@ const eo = qr.exports, to = /* @__PURE__ */ N({
|
|
|
1691
1693
|
var no = function() {
|
|
1692
1694
|
var e = this, r = e._self._c;
|
|
1693
1695
|
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);
|
|
1694
|
-
}, ro = [], oo = /* @__PURE__ */
|
|
1696
|
+
}, ro = [], oo = /* @__PURE__ */ w(
|
|
1695
1697
|
to,
|
|
1696
1698
|
no,
|
|
1697
1699
|
ro,
|
|
@@ -1702,7 +1704,7 @@ var no = function() {
|
|
|
1702
1704
|
null
|
|
1703
1705
|
);
|
|
1704
1706
|
const ao = oo.exports;
|
|
1705
|
-
function
|
|
1707
|
+
function st(t, e) {
|
|
1706
1708
|
return {
|
|
1707
1709
|
x0: 0 + (e ? e.left : 0),
|
|
1708
1710
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1711,16 +1713,16 @@ function it(t, e) {
|
|
|
1711
1713
|
};
|
|
1712
1714
|
}
|
|
1713
1715
|
function lo(t) {
|
|
1714
|
-
const e = O(
|
|
1716
|
+
const e = O(st(t));
|
|
1715
1717
|
function r(n) {
|
|
1716
|
-
e.value =
|
|
1718
|
+
e.value = st(t, n);
|
|
1717
1719
|
}
|
|
1718
1720
|
return { extents: e, updateExtents: r };
|
|
1719
1721
|
}
|
|
1720
1722
|
var wt = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(wt || {});
|
|
1721
1723
|
const uo = "[lume] ";
|
|
1722
1724
|
function io(t, e, r = !0) {
|
|
1723
|
-
r &&
|
|
1725
|
+
r && yt() || console.error(uo + "Error: " + t, e);
|
|
1724
1726
|
}
|
|
1725
1727
|
const so = 200;
|
|
1726
1728
|
function le(t) {
|
|
@@ -1762,7 +1764,7 @@ function po(t) {
|
|
|
1762
1764
|
width: e.x1 - e.x0,
|
|
1763
1765
|
height: r ? $e : e.y1 - e.y0,
|
|
1764
1766
|
textTransform: {
|
|
1765
|
-
x: e.depth > 0 ? e.x1 +
|
|
1767
|
+
x: e.depth > 0 ? e.x1 + ut : e.x0 - ut,
|
|
1766
1768
|
y: (e.y1 + e.y0) / 2
|
|
1767
1769
|
},
|
|
1768
1770
|
node: e
|
|
@@ -1790,7 +1792,7 @@ function go(t) {
|
|
|
1790
1792
|
};
|
|
1791
1793
|
});
|
|
1792
1794
|
}
|
|
1793
|
-
function
|
|
1795
|
+
function ct(t, e, r, n, o) {
|
|
1794
1796
|
if (n === !1) {
|
|
1795
1797
|
t.node = {
|
|
1796
1798
|
...t.node,
|
|
@@ -1811,7 +1813,7 @@ const yo = {
|
|
|
1811
1813
|
nodes: [],
|
|
1812
1814
|
links: []
|
|
1813
1815
|
};
|
|
1814
|
-
function
|
|
1816
|
+
function dt(t, e) {
|
|
1815
1817
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1816
1818
|
}
|
|
1817
1819
|
function bo(t, e, r) {
|
|
@@ -1850,14 +1852,14 @@ function bo(t, e, r) {
|
|
|
1850
1852
|
var s;
|
|
1851
1853
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1852
1854
|
(_, m) => {
|
|
1853
|
-
const f =
|
|
1855
|
+
const f = dt(m, _);
|
|
1854
1856
|
return f ? (f.push(m), f.sort((h, y) => (h._y0 || h.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1855
1857
|
},
|
|
1856
1858
|
[]
|
|
1857
1859
|
);
|
|
1858
1860
|
});
|
|
1859
1861
|
function u(s) {
|
|
1860
|
-
const { offset: _ } = s, m =
|
|
1862
|
+
const { offset: _ } = s, m = dt(s, i.value);
|
|
1861
1863
|
if (!m)
|
|
1862
1864
|
return;
|
|
1863
1865
|
const f = m[m.findIndex((y) => y.id === s.id) - 1], h = f && m.length !== 1 ? f.y1 + _ : _;
|
|
@@ -1865,16 +1867,16 @@ function bo(t, e, r) {
|
|
|
1865
1867
|
}
|
|
1866
1868
|
function c(s, _) {
|
|
1867
1869
|
const { id: m, _y0: f, y0: h } = s, y = _.links.filter(
|
|
1868
|
-
(
|
|
1870
|
+
(T) => T.source.id === m
|
|
1869
1871
|
), p = _.links.filter(
|
|
1870
|
-
(
|
|
1871
|
-
),
|
|
1872
|
-
y.forEach((
|
|
1872
|
+
(T) => T.target.id === m
|
|
1873
|
+
), k = h - f;
|
|
1874
|
+
y.forEach((T) => T.y0 += k), p.forEach((T) => T.y1 += k);
|
|
1873
1875
|
}
|
|
1874
1876
|
const d = v(() => (n.value && o.value.forEach((s) => {
|
|
1875
|
-
s.value === 0 && (s.fallbackColor =
|
|
1877
|
+
s.value === 0 && (s.fallbackColor = ze.Grey), typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
1876
1878
|
}), n.value));
|
|
1877
|
-
return
|
|
1879
|
+
return C([l, r], () => {
|
|
1878
1880
|
try {
|
|
1879
1881
|
const { x0: s, y0: _, x1: m, y1: f } = r.value;
|
|
1880
1882
|
n.value = l.value.extent([
|
|
@@ -1943,10 +1945,10 @@ function Ao(t, e, r) {
|
|
|
1943
1945
|
n.value,
|
|
1944
1946
|
r.value
|
|
1945
1947
|
) : e.value.highlightedElements === "closest" ? To(n.value, r.value) : xo(n.value, r.value) : { nodes: {}, links: [] });
|
|
1946
|
-
return
|
|
1948
|
+
return C(o, (a, l) => {
|
|
1947
1949
|
if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
|
|
1948
1950
|
t.value.forEach((i) => {
|
|
1949
|
-
i.node.id in l.nodes &&
|
|
1951
|
+
i.node.id in l.nodes && ct(
|
|
1950
1952
|
i,
|
|
1951
1953
|
l.nodes[i.node.id],
|
|
1952
1954
|
i.node.value,
|
|
@@ -1957,7 +1959,7 @@ function Ao(t, e, r) {
|
|
|
1957
1959
|
return;
|
|
1958
1960
|
}
|
|
1959
1961
|
t.value.forEach((i) => {
|
|
1960
|
-
i.node.id in a.nodes &&
|
|
1962
|
+
i.node.id in a.nodes && ct(
|
|
1961
1963
|
i,
|
|
1962
1964
|
i.node.value,
|
|
1963
1965
|
a.nodes[i.node.id],
|
|
@@ -1966,7 +1968,7 @@ function Ao(t, e, r) {
|
|
|
1966
1968
|
});
|
|
1967
1969
|
}), { highlightedElements: o, hoveredElement: n };
|
|
1968
1970
|
}
|
|
1969
|
-
const Lo = /* @__PURE__ */
|
|
1971
|
+
const Lo = /* @__PURE__ */ H({
|
|
1970
1972
|
__name: "lume-alluvial-group",
|
|
1971
1973
|
props: {
|
|
1972
1974
|
...xe(),
|
|
@@ -1985,97 +1987,97 @@ const Lo = /* @__PURE__ */ N({
|
|
|
1985
1987
|
() => Object.keys(f.value.nodes)
|
|
1986
1988
|
), p = v(() => s.value ? s.value.map(
|
|
1987
1989
|
(g) => g[0].x0 + a.value.nodeWidth / 2
|
|
1988
|
-
) : []),
|
|
1990
|
+
) : []), k = v(() => {
|
|
1989
1991
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
1990
|
-
return a.value.nodeHeaders.slice(0, p.value.length).map((g,
|
|
1992
|
+
return a.value.nodeHeaders.slice(0, p.value.length).map((g, N) => ({
|
|
1991
1993
|
label: g,
|
|
1992
|
-
x: p.value[
|
|
1994
|
+
x: p.value[N]
|
|
1993
1995
|
}));
|
|
1994
|
-
}),
|
|
1996
|
+
}), T = v(
|
|
1995
1997
|
() => a.value.nodeHeaderPadding ?? Yr
|
|
1996
|
-
),
|
|
1998
|
+
), x = v(() => {
|
|
1997
1999
|
if (!(!a.value.gradient || !_.value))
|
|
1998
|
-
return _.value.links.reduce((g,
|
|
1999
|
-
const { source:
|
|
2000
|
-
return g[
|
|
2001
|
-
source:
|
|
2002
|
-
target:
|
|
2003
|
-
x1:
|
|
2004
|
-
x2:
|
|
2000
|
+
return _.value.links.reduce((g, N) => {
|
|
2001
|
+
const { source: R, target: Z } = N, X = R.color || R.fallbackColor, U = Z.deriveColorFromIncomingLinks ? X : Z.color || Z.fallbackColor;
|
|
2002
|
+
return g[N.id] = {
|
|
2003
|
+
source: X,
|
|
2004
|
+
target: U,
|
|
2005
|
+
x1: R.x1,
|
|
2006
|
+
x2: Z.x0
|
|
2005
2007
|
}, g;
|
|
2006
2008
|
}, {});
|
|
2007
|
-
}),
|
|
2009
|
+
}), I = v(() => {
|
|
2008
2010
|
const g = l.value.filter(
|
|
2009
|
-
(
|
|
2010
|
-
),
|
|
2011
|
-
return g.forEach((
|
|
2012
|
-
const
|
|
2013
|
-
i.value.filter(({ link:
|
|
2014
|
-
const Te =
|
|
2015
|
-
return
|
|
2016
|
-
x:
|
|
2017
|
-
y:
|
|
2011
|
+
(R) => j(R)
|
|
2012
|
+
), N = [];
|
|
2013
|
+
return g.forEach((R) => {
|
|
2014
|
+
const Z = [];
|
|
2015
|
+
i.value.filter(({ link: X }) => X.target.id === R.node.id).reverse().reduce((X, U) => {
|
|
2016
|
+
const Te = U.link.target.y1 - U.link.target.y0, ce = U.link.value / R.node.value * Te;
|
|
2017
|
+
return Z.push({
|
|
2018
|
+
x: R.x,
|
|
2019
|
+
y: R.y + X,
|
|
2018
2020
|
height: ce,
|
|
2019
|
-
width:
|
|
2020
|
-
key: `node-block-${
|
|
2021
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2022
|
-
}),
|
|
2023
|
-
}, 0),
|
|
2024
|
-
id:
|
|
2025
|
-
subNodes:
|
|
2021
|
+
width: R.width,
|
|
2022
|
+
key: `node-block-${R.node.id}-source-link-${U.link.source.id}`,
|
|
2023
|
+
class: `lume-alluvial-group__node-block lume-fill--${U.link.source.color || me}`
|
|
2024
|
+
}), X + ce;
|
|
2025
|
+
}, 0), N.push({
|
|
2026
|
+
id: R.node.id,
|
|
2027
|
+
subNodes: Z
|
|
2026
2028
|
});
|
|
2027
|
-
}),
|
|
2029
|
+
}), N;
|
|
2028
2030
|
});
|
|
2029
|
-
function
|
|
2031
|
+
function A(g) {
|
|
2030
2032
|
return a.value.gradient && `url('#${n}_${g.id}')`;
|
|
2031
2033
|
}
|
|
2032
|
-
function
|
|
2034
|
+
function D(g) {
|
|
2033
2035
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2034
2036
|
}
|
|
2035
|
-
function
|
|
2037
|
+
function F(g) {
|
|
2036
2038
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2037
2039
|
}
|
|
2038
|
-
function
|
|
2040
|
+
function P(g) {
|
|
2039
2041
|
return f.value.links.length > 0 && !f.value.links.includes(g);
|
|
2040
2042
|
}
|
|
2041
|
-
function
|
|
2043
|
+
function G(g) {
|
|
2042
2044
|
return f.value.links.length > 0 && f.value.links.includes(g);
|
|
2043
2045
|
}
|
|
2044
|
-
function
|
|
2046
|
+
function j(g) {
|
|
2045
2047
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
2046
2048
|
}
|
|
2047
|
-
function
|
|
2048
|
-
g !== m.value && (m.value = g, e("link-mouseenter", { link: g, event:
|
|
2049
|
+
function W(g, N) {
|
|
2050
|
+
g !== m.value && (m.value = g, e("link-mouseenter", { link: g, event: N }));
|
|
2049
2051
|
}
|
|
2050
2052
|
function ne(g) {
|
|
2051
|
-
const
|
|
2052
|
-
m.value = null, e("link-mouseleave", { link:
|
|
2053
|
+
const N = m.value;
|
|
2054
|
+
m.value = null, e("link-mouseleave", { link: N, event: g });
|
|
2053
2055
|
}
|
|
2054
|
-
function
|
|
2056
|
+
function q(g) {
|
|
2055
2057
|
if (g == null) {
|
|
2056
2058
|
m.value = null;
|
|
2057
2059
|
return;
|
|
2058
2060
|
}
|
|
2059
|
-
const
|
|
2060
|
-
if (!
|
|
2061
|
-
|
|
2061
|
+
const N = co(g, _.value) || vo(g, _.value);
|
|
2062
|
+
if (!N) {
|
|
2063
|
+
ee(K.InvalidHoveredElement);
|
|
2062
2064
|
return;
|
|
2063
2065
|
}
|
|
2064
|
-
m.value =
|
|
2066
|
+
m.value = N;
|
|
2065
2067
|
}
|
|
2066
|
-
function
|
|
2067
|
-
var
|
|
2068
|
-
return ((
|
|
2068
|
+
function $(g) {
|
|
2069
|
+
var N;
|
|
2070
|
+
return ((N = I.value.find(({ id: R }) => g === R)) == null ? void 0 : N.subNodes) ?? [];
|
|
2069
2071
|
}
|
|
2070
|
-
function
|
|
2072
|
+
function E() {
|
|
2071
2073
|
const g = _o(_.value, u.value);
|
|
2072
2074
|
d(g);
|
|
2073
2075
|
}
|
|
2074
|
-
return
|
|
2075
|
-
l.value = po(g.nodes), i.value = go(g.links).reverse(), m.value == null && r.hoveredElementId != null &&
|
|
2076
|
-
}),
|
|
2077
|
-
r.containerSize.width && r.containerSize.height &&
|
|
2078
|
-
}),
|
|
2076
|
+
return C(_, (g) => {
|
|
2077
|
+
l.value = po(g.nodes), i.value = go(g.links).reverse(), m.value == null && r.hoveredElementId != null && q(r.hoveredElementId);
|
|
2078
|
+
}), C([r.containerSize, u], () => {
|
|
2079
|
+
r.containerSize.width && r.containerSize.height && E();
|
|
2080
|
+
}), C(() => r.hoveredElementId, q), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: f, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders: k, computedNodeHeaderPadding: T, gradients: x, nodesDerivingColorFromIncomingLinks: I, getLinkStroke: A, isNodeFaded: D, isNodeFocused: F, isLinkFaded: P, isLinkFocused: G, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: ne, handleExternalHover: q, getSubNodesDerivingColorFromIncomingLinks: $, updateMargins: E, LumeAlluvialNodeLabel: eo, LumeAlluvialNodeValue: ao, GHOST_STROKE_WIDTH_OFFSET: Ur };
|
|
2079
2081
|
}
|
|
2080
2082
|
});
|
|
2081
2083
|
var Oo = function() {
|
|
@@ -2130,7 +2132,7 @@ var Oo = function() {
|
|
|
2130
2132
|
o.node.value
|
|
2131
2133
|
) })], 2)], 2)]);
|
|
2132
2134
|
})], 2);
|
|
2133
|
-
}, Io = [], $o = /* @__PURE__ */
|
|
2135
|
+
}, Io = [], $o = /* @__PURE__ */ w(
|
|
2134
2136
|
Lo,
|
|
2135
2137
|
Oo,
|
|
2136
2138
|
Io,
|
|
@@ -2159,13 +2161,13 @@ const Eo = $o.exports, wo = {
|
|
|
2159
2161
|
nodeAlign: Kt,
|
|
2160
2162
|
valueFormat: (t) => String(t),
|
|
2161
2163
|
iterations: 6
|
|
2162
|
-
}, No = /* @__PURE__ */
|
|
2164
|
+
}, No = /* @__PURE__ */ H({
|
|
2163
2165
|
__name: "lume-alluvial-diagram",
|
|
2164
2166
|
props: {
|
|
2165
2167
|
...Ir(je)
|
|
2166
2168
|
},
|
|
2167
2169
|
setup(t, { emit: e }) {
|
|
2168
|
-
const r = t, { componentEventPropagator: n } =
|
|
2170
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(M()), a = vn(M()), { options: l } = B(r), { allOptions: i } = J(l, wo);
|
|
2169
2171
|
function u(c) {
|
|
2170
2172
|
return {
|
|
2171
2173
|
...c,
|
|
@@ -2189,7 +2191,7 @@ var Ho = function() {
|
|
|
2189
2191
|
return [e._t(a, null, null, l || {})];
|
|
2190
2192
|
} };
|
|
2191
2193
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2192
|
-
}, Co = [], Do = /* @__PURE__ */
|
|
2194
|
+
}, Co = [], Do = /* @__PURE__ */ w(
|
|
2193
2195
|
No,
|
|
2194
2196
|
Ho,
|
|
2195
2197
|
Co,
|
|
@@ -2201,7 +2203,7 @@ var Ho = function() {
|
|
|
2201
2203
|
);
|
|
2202
2204
|
const Wa = Do.exports;
|
|
2203
2205
|
var Ge = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ge || {});
|
|
2204
|
-
const Ro = /* @__PURE__ */
|
|
2206
|
+
const Ro = /* @__PURE__ */ H({
|
|
2205
2207
|
__name: "lume-bar-chart",
|
|
2206
2208
|
props: {
|
|
2207
2209
|
...ue(),
|
|
@@ -2222,7 +2224,7 @@ const Ro = /* @__PURE__ */ N({
|
|
|
2222
2224
|
["single", n],
|
|
2223
2225
|
["grouped", o],
|
|
2224
2226
|
["stacked", a]
|
|
2225
|
-
]), { componentEventPropagator: i } =
|
|
2227
|
+
]), { componentEventPropagator: i } = Q(e), u = ae(M());
|
|
2226
2228
|
function c(s) {
|
|
2227
2229
|
return {
|
|
2228
2230
|
...s,
|
|
@@ -2253,7 +2255,7 @@ var Po = function() {
|
|
|
2253
2255
|
return [e._t(a, null, null, l || {})];
|
|
2254
2256
|
} };
|
|
2255
2257
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2256
|
-
}, So = [], Bo = /* @__PURE__ */
|
|
2258
|
+
}, So = [], Bo = /* @__PURE__ */ w(
|
|
2257
2259
|
Ro,
|
|
2258
2260
|
Po,
|
|
2259
2261
|
So,
|
|
@@ -2284,20 +2286,26 @@ const jo = (t = !1) => ({
|
|
|
2284
2286
|
}
|
|
2285
2287
|
} : {}
|
|
2286
2288
|
});
|
|
2287
|
-
function Ht(t) {
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2290
|
-
|
|
2289
|
+
function Ht(t, e) {
|
|
2290
|
+
const r = v(() => t.value.map((o) => {
|
|
2291
|
+
var a;
|
|
2292
|
+
return {
|
|
2291
2293
|
...o,
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2294
|
+
values: Ve(
|
|
2295
|
+
o.values,
|
|
2296
|
+
((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) ?? 0
|
|
2297
|
+
).map((l) => ({
|
|
2298
|
+
...l,
|
|
2299
|
+
value: (l == null ? void 0 : l.value) || 0
|
|
2300
|
+
}))
|
|
2301
|
+
};
|
|
2302
|
+
})), n = v(() => {
|
|
2303
|
+
var o;
|
|
2304
|
+
return (o = r.value) == null ? void 0 : o.reduce((a, l) => (l.values.forEach((i, u) => {
|
|
2305
|
+
a[u] ? a[u].push(i) : a[u] = [i];
|
|
2306
|
+
}), a), []);
|
|
2299
2307
|
});
|
|
2300
|
-
return { multiBarData:
|
|
2308
|
+
return { multiBarData: r, groupedData: n };
|
|
2301
2309
|
}
|
|
2302
2310
|
function Vo(t, e) {
|
|
2303
2311
|
return t.value.length === 1 ? "single" : e.value;
|
|
@@ -2327,13 +2335,13 @@ function zo(t, e, r, n, o, a) {
|
|
|
2327
2335
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2328
2336
|
}
|
|
2329
2337
|
function d(s, _, m) {
|
|
2330
|
-
const { value: f, color: h } = s, y = h ?? t.value[_].color ?? me, { x: p, y:
|
|
2338
|
+
const { value: f, color: h } = s, y = h ?? t.value[_].color ?? me, { x: p, y: k } = i(f, m), T = u(f), x = c(f);
|
|
2331
2339
|
return {
|
|
2332
2340
|
classList: [`lume-fill--${y}`, ...a],
|
|
2333
2341
|
x: p,
|
|
2334
|
-
y:
|
|
2335
|
-
width:
|
|
2336
|
-
height:
|
|
2342
|
+
y: k,
|
|
2343
|
+
width: T,
|
|
2344
|
+
height: x,
|
|
2337
2345
|
isFaded: o.value !== -1 && o.value !== m,
|
|
2338
2346
|
isNegative: f < 0
|
|
2339
2347
|
};
|
|
@@ -2364,13 +2372,13 @@ function Wo(t, e, r, n, o, a) {
|
|
|
2364
2372
|
return l.value ? u.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
|
|
2365
2373
|
}
|
|
2366
2374
|
function m(f, h, y) {
|
|
2367
|
-
const { value: p, color:
|
|
2375
|
+
const { value: p, color: k } = f, T = k ?? t.value[h].color ?? Object.values(z)[h], x = c(p, y, h), I = d(p, y, h), A = s(p), D = _(p);
|
|
2368
2376
|
return {
|
|
2369
|
-
classList: [`lume-fill--${
|
|
2370
|
-
x
|
|
2371
|
-
y:
|
|
2372
|
-
width:
|
|
2373
|
-
height:
|
|
2377
|
+
classList: [`lume-fill--${T}`, ...a],
|
|
2378
|
+
x,
|
|
2379
|
+
y: I,
|
|
2380
|
+
width: A,
|
|
2381
|
+
height: D,
|
|
2374
2382
|
isFaded: o.value !== -1 && o.value !== y,
|
|
2375
2383
|
isNegative: p < 0
|
|
2376
2384
|
};
|
|
@@ -2396,7 +2404,7 @@ function Zo(t, e, r) {
|
|
|
2396
2404
|
});
|
|
2397
2405
|
function l(u, c, d) {
|
|
2398
2406
|
return n.value ? ve().domain([o.value, a.value]).range([0, d.width]) : Object.assign(
|
|
2399
|
-
|
|
2407
|
+
at(
|
|
2400
2408
|
de().domain(c.map((s, _) => _)).range([0, d.width]),
|
|
2401
2409
|
e.value,
|
|
2402
2410
|
r.value
|
|
@@ -2406,7 +2414,7 @@ function Zo(t, e, r) {
|
|
|
2406
2414
|
}
|
|
2407
2415
|
function i(u, c, d) {
|
|
2408
2416
|
return n.value ? Object.assign(
|
|
2409
|
-
|
|
2417
|
+
at(
|
|
2410
2418
|
de().domain(c.map((s, _) => _)).range([0, d.height]),
|
|
2411
2419
|
e.value,
|
|
2412
2420
|
r.value
|
|
@@ -2422,11 +2430,11 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2422
2430
|
), i = v(
|
|
2423
2431
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2424
2432
|
), u = v(
|
|
2425
|
-
() => t.value.map((p) => p.values.map((
|
|
2433
|
+
() => t.value.map((p) => p.values.map((k) => k == null ? void 0 : k.value))
|
|
2426
2434
|
);
|
|
2427
|
-
function c(p,
|
|
2428
|
-
let
|
|
2429
|
-
return l.value ? (
|
|
2435
|
+
function c(p, k, T) {
|
|
2436
|
+
let x, I;
|
|
2437
|
+
return l.value ? (x = e.value(p >= 0 ? 0 + T : p + T), I = r.value(i.value[k])) : (x = e.value(i.value[k]), I = r.value(p >= 0 ? p + T : 0 + T)), { x, y: I };
|
|
2430
2438
|
}
|
|
2431
2439
|
function d(p) {
|
|
2432
2440
|
return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
|
|
@@ -2440,31 +2448,31 @@ function Xo(t, e, r, n, o, a) {
|
|
|
2440
2448
|
function m(p) {
|
|
2441
2449
|
return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
|
|
2442
2450
|
}
|
|
2443
|
-
function f(p,
|
|
2444
|
-
return p ? u.value.reduce((
|
|
2451
|
+
function f(p, k) {
|
|
2452
|
+
return p ? u.value.reduce((T, x, I) => (I < p && x[k] >= 0 && (T += x[k]), T), 0) : 0;
|
|
2445
2453
|
}
|
|
2446
|
-
function h(p,
|
|
2447
|
-
return p ? u.value.reduce((
|
|
2454
|
+
function h(p, k) {
|
|
2455
|
+
return p ? u.value.reduce((T, x, I) => (I < p && x[k] < 0 && (T += x[k]), T), 0) : 0;
|
|
2448
2456
|
}
|
|
2449
|
-
function y(p,
|
|
2450
|
-
const { value:
|
|
2457
|
+
function y(p, k, T) {
|
|
2458
|
+
const { value: x, color: I } = p, A = x >= 0 ? d(x) : s(x), D = x >= 0 ? _(x) : m(x), F = x >= 0 ? f(k, T) : h(k, T), { x: P, y: G } = c(x, T, F);
|
|
2451
2459
|
return {
|
|
2452
|
-
classList: [`lume-fill--${
|
|
2453
|
-
width:
|
|
2454
|
-
height:
|
|
2455
|
-
x:
|
|
2456
|
-
y:
|
|
2457
|
-
isFaded: o.value !== -1 && o.value !==
|
|
2458
|
-
isNegative:
|
|
2460
|
+
classList: [`lume-fill--${I ?? t.value[k].color ?? Object.values(z)[k]}`, ...a],
|
|
2461
|
+
width: A,
|
|
2462
|
+
height: D,
|
|
2463
|
+
x: P,
|
|
2464
|
+
y: G,
|
|
2465
|
+
isFaded: o.value !== -1 && o.value !== T,
|
|
2466
|
+
isNegative: x < 0
|
|
2459
2467
|
};
|
|
2460
2468
|
}
|
|
2461
2469
|
return { barAttributeGenerator: y };
|
|
2462
2470
|
}
|
|
2463
|
-
const
|
|
2471
|
+
const vt = {
|
|
2464
2472
|
single: zo,
|
|
2465
2473
|
grouped: Wo,
|
|
2466
2474
|
stacked: Xo
|
|
2467
|
-
}, Uo = /* @__PURE__ */
|
|
2475
|
+
}, Uo = /* @__PURE__ */ H({
|
|
2468
2476
|
__name: "lume-bar-group",
|
|
2469
2477
|
props: {
|
|
2470
2478
|
...xe(),
|
|
@@ -2488,25 +2496,26 @@ const dt = {
|
|
|
2488
2496
|
type: i,
|
|
2489
2497
|
xScale: u,
|
|
2490
2498
|
yScale: c,
|
|
2491
|
-
classList: d
|
|
2492
|
-
|
|
2493
|
-
|
|
2499
|
+
classList: d,
|
|
2500
|
+
labels: s
|
|
2501
|
+
} = B(r), _ = _e("chartID"), { emitInternalEvent: m } = Q(e, _), { groupedData: f } = Ht(n, s), { barXScale: h, barYScale: y } = Mo(u, c, a), p = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2502
|
+
const I = Vo(n, i), { barAttributeGenerator: A } = vt[I](
|
|
2494
2503
|
n,
|
|
2495
|
-
f,
|
|
2496
2504
|
h,
|
|
2505
|
+
y,
|
|
2497
2506
|
a,
|
|
2498
2507
|
o,
|
|
2499
|
-
|
|
2508
|
+
p.value
|
|
2500
2509
|
);
|
|
2501
|
-
return
|
|
2502
|
-
}),
|
|
2510
|
+
return A;
|
|
2511
|
+
}), T = v(() => {
|
|
2503
2512
|
if (l.value)
|
|
2504
2513
|
return a.value === L.HORIZONTAL ? "width" : "height";
|
|
2505
2514
|
});
|
|
2506
|
-
async function
|
|
2507
|
-
e("lume__internal--hover",
|
|
2515
|
+
async function x(I) {
|
|
2516
|
+
e("lume__internal--hover", I), m("lume__internal--hover", I);
|
|
2508
2517
|
}
|
|
2509
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2518
|
+
return { __sfc: !0, MIXIN_MAP: vt, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: f, barXScale: h, barYScale: y, computedClasses: p, getBarAttributes: k, computedTransition: T, handleInternalHover: x, LumeBar: Ze };
|
|
2510
2519
|
}
|
|
2511
2520
|
});
|
|
2512
2521
|
var Yo = function() {
|
|
@@ -2524,7 +2533,7 @@ var Yo = function() {
|
|
|
2524
2533
|
} } }, "lume-bar", n.getBarAttributes(l, i, a, o), !1));
|
|
2525
2534
|
}), 1);
|
|
2526
2535
|
}), 0);
|
|
2527
|
-
}, Ko = [], Jo = /* @__PURE__ */
|
|
2536
|
+
}, Ko = [], Jo = /* @__PURE__ */ w(
|
|
2528
2537
|
Uo,
|
|
2529
2538
|
Yo,
|
|
2530
2539
|
Ko,
|
|
@@ -2534,7 +2543,7 @@ var Yo = function() {
|
|
|
2534
2543
|
null,
|
|
2535
2544
|
null
|
|
2536
2545
|
);
|
|
2537
|
-
const
|
|
2546
|
+
const Ye = Jo.exports, Qo = {
|
|
2538
2547
|
[L.VERTICAL]: {
|
|
2539
2548
|
withTooltip: !0,
|
|
2540
2549
|
xAxisOptions: {},
|
|
@@ -2547,17 +2556,17 @@ const Ue = Jo.exports, Qo = {
|
|
|
2547
2556
|
yAxisOptions: { gridLines: !1 },
|
|
2548
2557
|
margins: oe.HORIZONTAL
|
|
2549
2558
|
}
|
|
2550
|
-
}, qo = /* @__PURE__ */
|
|
2559
|
+
}, qo = /* @__PURE__ */ H({
|
|
2551
2560
|
__name: "lume-single-bar-chart",
|
|
2552
2561
|
props: {
|
|
2553
2562
|
...ue(je)
|
|
2554
2563
|
},
|
|
2555
2564
|
setup(t, { emit: e }) {
|
|
2556
|
-
const r = t, { componentEventPropagator: n } =
|
|
2565
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(M()), { orientation: a, options: l } = B(r), i = v(
|
|
2557
2566
|
() => Qo[a.value || L.VERTICAL]
|
|
2558
2567
|
// needs to be computed so that default options are reactive
|
|
2559
|
-
), { allOptions: u } =
|
|
2560
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2568
|
+
), { allOptions: u } = J(l, i);
|
|
2569
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: Ye };
|
|
2561
2570
|
}
|
|
2562
2571
|
});
|
|
2563
2572
|
var ea = function() {
|
|
@@ -2569,7 +2578,7 @@ var ea = function() {
|
|
|
2569
2578
|
return [e._t(a, null, null, l || {})];
|
|
2570
2579
|
} };
|
|
2571
2580
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2572
|
-
}, ta = [], na = /* @__PURE__ */
|
|
2581
|
+
}, ta = [], na = /* @__PURE__ */ w(
|
|
2573
2582
|
qo,
|
|
2574
2583
|
ea,
|
|
2575
2584
|
ta,
|
|
@@ -2593,20 +2602,20 @@ const Xa = na.exports, ra = {
|
|
|
2593
2602
|
margins: oe.HORIZONTAL,
|
|
2594
2603
|
tooltipOptions: { position: "right" }
|
|
2595
2604
|
}
|
|
2596
|
-
}, oa = /* @__PURE__ */
|
|
2605
|
+
}, oa = /* @__PURE__ */ H({
|
|
2597
2606
|
__name: "lume-grouped-bar-chart",
|
|
2598
2607
|
props: {
|
|
2599
2608
|
...ue()
|
|
2600
2609
|
},
|
|
2601
2610
|
setup(t, { emit: e }) {
|
|
2602
|
-
const r = t, { componentEventPropagator: n } =
|
|
2611
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(M()), { orientation: a, options: l } = B(r), i = v(
|
|
2603
2612
|
() => ra[a.value || L.VERTICAL]
|
|
2604
2613
|
// needs to be computed so that default options are reactive
|
|
2605
|
-
), { allOptions: u } =
|
|
2614
|
+
), { allOptions: u } = J(
|
|
2606
2615
|
l,
|
|
2607
2616
|
i
|
|
2608
2617
|
);
|
|
2609
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2618
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: Ye };
|
|
2610
2619
|
}
|
|
2611
2620
|
});
|
|
2612
2621
|
var aa = function() {
|
|
@@ -2618,7 +2627,7 @@ var aa = function() {
|
|
|
2618
2627
|
return [e._t(a, null, null, l || {})];
|
|
2619
2628
|
} };
|
|
2620
2629
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2621
|
-
}, la = [], ua = /* @__PURE__ */
|
|
2630
|
+
}, la = [], ua = /* @__PURE__ */ w(
|
|
2622
2631
|
oa,
|
|
2623
2632
|
aa,
|
|
2624
2633
|
la,
|
|
@@ -2642,24 +2651,24 @@ const Ua = ua.exports, ia = {
|
|
|
2642
2651
|
margins: oe.HORIZONTAL,
|
|
2643
2652
|
tooltipOptions: { position: "right" }
|
|
2644
2653
|
}
|
|
2645
|
-
}, sa = /* @__PURE__ */
|
|
2654
|
+
}, sa = /* @__PURE__ */ H({
|
|
2646
2655
|
__name: "lume-stacked-bar-chart",
|
|
2647
2656
|
props: {
|
|
2648
2657
|
...ue()
|
|
2649
2658
|
},
|
|
2650
2659
|
setup(t, { emit: e }) {
|
|
2651
|
-
const r = t, { componentEventPropagator: n } =
|
|
2660
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(M()), { data: a, orientation: l, options: i, labels: u } = B(r), c = v(
|
|
2652
2661
|
() => ia[l.value || L.VERTICAL]
|
|
2653
2662
|
// needs to be computed so that default options are reactive
|
|
2654
|
-
), { allOptions:
|
|
2663
|
+
), { allOptions: d } = J(
|
|
2655
2664
|
i,
|
|
2656
|
-
|
|
2657
|
-
), { internalData:
|
|
2658
|
-
|
|
2665
|
+
c
|
|
2666
|
+
), { internalData: s } = Ue(a), { groupedData: _ } = Ht(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: f } = Zo(
|
|
2667
|
+
_,
|
|
2659
2668
|
l,
|
|
2660
2669
|
i
|
|
2661
2670
|
);
|
|
2662
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i,
|
|
2671
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: f, LumeChart: ie, LumeBarGroup: Ye };
|
|
2663
2672
|
}
|
|
2664
2673
|
});
|
|
2665
2674
|
var ca = function() {
|
|
@@ -2671,7 +2680,7 @@ var ca = function() {
|
|
|
2671
2680
|
return [e._t(a, null, null, l || {})];
|
|
2672
2681
|
} };
|
|
2673
2682
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2674
|
-
}, da = [], va = /* @__PURE__ */
|
|
2683
|
+
}, da = [], va = /* @__PURE__ */ w(
|
|
2675
2684
|
sa,
|
|
2676
2685
|
ca,
|
|
2677
2686
|
da,
|
|
@@ -2681,7 +2690,7 @@ var ca = function() {
|
|
|
2681
2690
|
null,
|
|
2682
2691
|
null
|
|
2683
2692
|
);
|
|
2684
|
-
const Ya = va.exports,
|
|
2693
|
+
const Ya = va.exports, _t = 2, _a = /* @__PURE__ */ H({
|
|
2685
2694
|
__name: "lume-line",
|
|
2686
2695
|
props: {
|
|
2687
2696
|
pathDefinition: {
|
|
@@ -2690,11 +2699,11 @@ const Ya = va.exports, vt = 2, _a = /* @__PURE__ */ N({
|
|
|
2690
2699
|
},
|
|
2691
2700
|
width: {
|
|
2692
2701
|
type: Number,
|
|
2693
|
-
default:
|
|
2702
|
+
default: _t
|
|
2694
2703
|
},
|
|
2695
2704
|
color: {
|
|
2696
2705
|
type: String,
|
|
2697
|
-
default:
|
|
2706
|
+
default: z.Skyblue
|
|
2698
2707
|
},
|
|
2699
2708
|
dashed: {
|
|
2700
2709
|
type: Boolean,
|
|
@@ -2716,7 +2725,7 @@ const Ya = va.exports, vt = 2, _a = /* @__PURE__ */ N({
|
|
|
2716
2725
|
emits: ["click"],
|
|
2717
2726
|
setup(t, { emit: e }) {
|
|
2718
2727
|
const r = O(null);
|
|
2719
|
-
return
|
|
2728
|
+
return te(() => ke(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: _t, emit: e, root: r };
|
|
2720
2729
|
}
|
|
2721
2730
|
});
|
|
2722
2731
|
var pa = function() {
|
|
@@ -2731,7 +2740,7 @@ var pa = function() {
|
|
|
2731
2740
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(o) {
|
|
2732
2741
|
return n.emit("click", o);
|
|
2733
2742
|
} } });
|
|
2734
|
-
}, fa = [], ma = /* @__PURE__ */
|
|
2743
|
+
}, fa = [], ma = /* @__PURE__ */ w(
|
|
2735
2744
|
_a,
|
|
2736
2745
|
pa,
|
|
2737
2746
|
fa,
|
|
@@ -2741,18 +2750,18 @@ var pa = function() {
|
|
|
2741
2750
|
null,
|
|
2742
2751
|
null
|
|
2743
2752
|
);
|
|
2744
|
-
const ha = ma.exports,
|
|
2753
|
+
const ha = ma.exports, pt = 4, ga = /* @__PURE__ */ H({
|
|
2745
2754
|
__name: "lume-point",
|
|
2746
2755
|
props: {
|
|
2747
2756
|
x: { type: Number, required: !0 },
|
|
2748
2757
|
y: { type: Number, required: !0 },
|
|
2749
2758
|
color: {
|
|
2750
2759
|
type: String,
|
|
2751
|
-
default:
|
|
2760
|
+
default: z.Skyblue
|
|
2752
2761
|
},
|
|
2753
2762
|
radius: {
|
|
2754
2763
|
type: Number,
|
|
2755
|
-
default:
|
|
2764
|
+
default: pt
|
|
2756
2765
|
},
|
|
2757
2766
|
active: {
|
|
2758
2767
|
type: Boolean,
|
|
@@ -2762,7 +2771,7 @@ const ha = ma.exports, _t = 4, ga = /* @__PURE__ */ N({
|
|
|
2762
2771
|
emits: ["click"],
|
|
2763
2772
|
setup(t, { emit: e }) {
|
|
2764
2773
|
const r = t, n = O(null), o = v(() => r.radius / 2);
|
|
2765
|
-
return
|
|
2774
|
+
return te(() => ke(n.value)), { __sfc: !0, DEFAULT_RADIUS: pt, props: r, emit: e, root: n, strokeWidth: o };
|
|
2766
2775
|
}
|
|
2767
2776
|
});
|
|
2768
2777
|
var ya = function() {
|
|
@@ -2770,7 +2779,7 @@ var ya = function() {
|
|
|
2770
2779
|
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(o) {
|
|
2771
2780
|
return n.emit("click", o);
|
|
2772
2781
|
} } });
|
|
2773
|
-
}, ba = [], ka = /* @__PURE__ */
|
|
2782
|
+
}, ba = [], ka = /* @__PURE__ */ w(
|
|
2774
2783
|
ga,
|
|
2775
2784
|
ya,
|
|
2776
2785
|
ba,
|
|
@@ -2817,7 +2826,7 @@ function Ct(t) {
|
|
|
2817
2826
|
c.length,
|
|
2818
2827
|
c.indexOf(u)
|
|
2819
2828
|
),
|
|
2820
|
-
label:
|
|
2829
|
+
label: Tt
|
|
2821
2830
|
};
|
|
2822
2831
|
}
|
|
2823
2832
|
return i;
|
|
@@ -2834,10 +2843,10 @@ function Aa(t, e) {
|
|
|
2834
2843
|
}
|
|
2835
2844
|
function La(t, e, r, n) {
|
|
2836
2845
|
return Wt().x(
|
|
2837
|
-
|
|
2846
|
+
Y(r) ? Ta(r, t) : Aa(r, t)
|
|
2838
2847
|
).y((a) => n(a))(e);
|
|
2839
2848
|
}
|
|
2840
|
-
const
|
|
2849
|
+
const ft = 1, Oa = /* @__PURE__ */ H({
|
|
2841
2850
|
__name: "lume-line-group",
|
|
2842
2851
|
props: {
|
|
2843
2852
|
...xe(),
|
|
@@ -2852,79 +2861,80 @@ const pt = 1, Oa = /* @__PURE__ */ N({
|
|
|
2852
2861
|
},
|
|
2853
2862
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2854
2863
|
setup(t, { emit: e }) {
|
|
2855
|
-
const r = t, { data: n, options: o, xScale: a, yScale: l } = B(r),
|
|
2864
|
+
const r = t, { data: n, options: o, xScale: a, yScale: l, labels: i } = B(r), u = _e(
|
|
2856
2865
|
"tooltipAnchorAttributes",
|
|
2857
2866
|
null
|
|
2858
|
-
), { updateTooltipAnchorAttributes:
|
|
2859
|
-
|
|
2867
|
+
), { updateTooltipAnchorAttributes: c } = Et(
|
|
2868
|
+
u,
|
|
2860
2869
|
o,
|
|
2861
2870
|
a,
|
|
2862
|
-
l
|
|
2863
|
-
|
|
2864
|
-
|
|
2871
|
+
l,
|
|
2872
|
+
i
|
|
2873
|
+
), d = v(() => {
|
|
2874
|
+
if (n.value.every((D) => D.isDashed))
|
|
2865
2875
|
return n.value;
|
|
2866
|
-
const { computedLineData:
|
|
2867
|
-
return o.value.withTooltip !== !1 && (
|
|
2868
|
-
}),
|
|
2876
|
+
const { computedLineData: A } = Ct(n);
|
|
2877
|
+
return o.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
|
|
2878
|
+
}), s = v(() => {
|
|
2869
2879
|
if (r.hoveredIndex === -1)
|
|
2870
2880
|
return;
|
|
2871
|
-
const
|
|
2872
|
-
|
|
2881
|
+
const A = un(
|
|
2882
|
+
d.value,
|
|
2873
2883
|
r.hoveredIndex
|
|
2874
2884
|
);
|
|
2875
2885
|
return {
|
|
2876
2886
|
d: `M ${Ce(a.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2877
|
-
V ${l.value(
|
|
2887
|
+
V ${l.value(A)}`
|
|
2878
2888
|
// Move to X index, Vertical line to the highest point
|
|
2879
2889
|
};
|
|
2880
|
-
}),
|
|
2881
|
-
() => a.value &&
|
|
2890
|
+
}), _ = v(
|
|
2891
|
+
() => a.value && ft / (sn(a.value) - 1)
|
|
2882
2892
|
// Subtracting the first line (read below)
|
|
2883
|
-
),
|
|
2893
|
+
), m = v(
|
|
2884
2894
|
() => {
|
|
2885
|
-
var
|
|
2886
|
-
return ((
|
|
2895
|
+
var A;
|
|
2896
|
+
return ((A = o.value) == null ? void 0 : A.lineWidth) * 2 || void 0;
|
|
2887
2897
|
}
|
|
2888
2898
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2889
|
-
),
|
|
2899
|
+
), f = v(
|
|
2890
2900
|
() => a.value.bandwidth() / 2
|
|
2891
|
-
),
|
|
2901
|
+
), h = v(() => a.value.domain()), y = v(
|
|
2892
2902
|
() => o.value.withPoints ?? r.withPoints
|
|
2893
2903
|
);
|
|
2894
|
-
function
|
|
2895
|
-
return
|
|
2896
|
-
}
|
|
2897
|
-
function
|
|
2898
|
-
var P,
|
|
2899
|
-
const
|
|
2900
|
-
(P =
|
|
2901
|
-
(
|
|
2904
|
+
function p(A) {
|
|
2905
|
+
return d.value[A].values;
|
|
2906
|
+
}
|
|
2907
|
+
function k(A, D) {
|
|
2908
|
+
var P, G;
|
|
2909
|
+
const F = A === 0 ? [] : [
|
|
2910
|
+
(P = p(D)[A - 1]) == null ? void 0 : P.value,
|
|
2911
|
+
(G = p(D)[A]) == null ? void 0 : G.value
|
|
2902
2912
|
];
|
|
2903
2913
|
return La(
|
|
2904
|
-
|
|
2905
|
-
|
|
2914
|
+
A,
|
|
2915
|
+
F,
|
|
2906
2916
|
a.value,
|
|
2907
2917
|
l.value
|
|
2908
2918
|
) || "";
|
|
2909
2919
|
}
|
|
2910
|
-
function
|
|
2920
|
+
function T(A) {
|
|
2911
2921
|
return {
|
|
2912
|
-
animationDelay:
|
|
2913
|
-
animationDuration:
|
|
2922
|
+
animationDelay: A < 2 ? 0 : (A - 1) * _.value,
|
|
2923
|
+
animationDuration: _.value
|
|
2914
2924
|
};
|
|
2915
2925
|
}
|
|
2916
|
-
function A
|
|
2926
|
+
function x(A, D) {
|
|
2917
2927
|
var P;
|
|
2918
|
-
const
|
|
2928
|
+
const F = (P = p(D)[A]) == null ? void 0 : P.value;
|
|
2919
2929
|
return {
|
|
2920
|
-
x:
|
|
2921
|
-
y: l.value(
|
|
2930
|
+
x: Y(a.value) ? r.xScale(h.value[A]) + f.value : r.xScale(A),
|
|
2931
|
+
y: l.value(F)
|
|
2922
2932
|
};
|
|
2923
2933
|
}
|
|
2924
|
-
function
|
|
2925
|
-
return r.hoveredIndex ===
|
|
2934
|
+
function I(A) {
|
|
2935
|
+
return r.hoveredIndex === A;
|
|
2926
2936
|
}
|
|
2927
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2937
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: ft, props: r, emit: e, data: n, options: o, xScale: a, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: f, domain: h, computedWithPoints: y, getValuesFromDataset: p, getPathDefinition: k, getLineTransitionParams: T, getPointPosition: x, isPointActive: I, LumeLine: ha, LumePoint: xa };
|
|
2928
2938
|
}
|
|
2929
2939
|
});
|
|
2930
2940
|
var Ia = function() {
|
|
@@ -2940,13 +2950,13 @@ var Ia = function() {
|
|
|
2940
2950
|
} } }, "lume-point", n.getPointPosition(i, a), !1));
|
|
2941
2951
|
}), 1) : e._e()]);
|
|
2942
2952
|
})], 2);
|
|
2943
|
-
}, $a = [], Ea = /* @__PURE__ */
|
|
2953
|
+
}, $a = [], Ea = /* @__PURE__ */ w(
|
|
2944
2954
|
Oa,
|
|
2945
2955
|
Ia,
|
|
2946
2956
|
$a,
|
|
2947
2957
|
!1,
|
|
2948
2958
|
null,
|
|
2949
|
-
"
|
|
2959
|
+
"649a5210",
|
|
2950
2960
|
null,
|
|
2951
2961
|
null
|
|
2952
2962
|
);
|
|
@@ -2956,13 +2966,13 @@ const Dt = Ea.exports, wa = {
|
|
|
2956
2966
|
withTooltip: !0,
|
|
2957
2967
|
xAxisOptions: {},
|
|
2958
2968
|
yAxisOptions: { gridLines: !0 }
|
|
2959
|
-
}, Na = /* @__PURE__ */
|
|
2969
|
+
}, Na = /* @__PURE__ */ H({
|
|
2960
2970
|
__name: "lume-line-chart",
|
|
2961
2971
|
props: {
|
|
2962
2972
|
...ue(null, !1)
|
|
2963
2973
|
},
|
|
2964
2974
|
setup(t, { emit: e }) {
|
|
2965
|
-
const r = t, { componentEventPropagator: n } =
|
|
2975
|
+
const r = t, { componentEventPropagator: n } = Q(e), o = ae(M()), { options: a } = B(r), { allOptions: l } = J(a, wa);
|
|
2966
2976
|
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ie, LumeLineGroup: Dt };
|
|
2967
2977
|
}
|
|
2968
2978
|
});
|
|
@@ -2975,7 +2985,7 @@ var Ha = function() {
|
|
|
2975
2985
|
return [e._t(a, null, null, l || {})];
|
|
2976
2986
|
} };
|
|
2977
2987
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2978
|
-
}, Ca = [], Da = /* @__PURE__ */
|
|
2988
|
+
}, Ca = [], Da = /* @__PURE__ */ w(
|
|
2979
2989
|
Na,
|
|
2980
2990
|
Ha,
|
|
2981
2991
|
Ca,
|
|
@@ -2989,7 +2999,7 @@ const Ka = Da.exports;
|
|
|
2989
2999
|
function Ra(t) {
|
|
2990
3000
|
return { areaPathDefinition: v(
|
|
2991
3001
|
() => function(r, n) {
|
|
2992
|
-
if (!r || !n ||
|
|
3002
|
+
if (!r || !n || Y(r) || Y(n))
|
|
2993
3003
|
return;
|
|
2994
3004
|
const o = t.value[0].values;
|
|
2995
3005
|
return Zt().x((a, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((a) => n(a.value))(o);
|
|
@@ -3010,14 +3020,14 @@ const Pa = {
|
|
|
3010
3020
|
tooltipOptions: {
|
|
3011
3021
|
showTitle: !1
|
|
3012
3022
|
}
|
|
3013
|
-
}, Sa = /* @__PURE__ */
|
|
3023
|
+
}, Sa = /* @__PURE__ */ H({
|
|
3014
3024
|
__name: "lume-sparkline-chart",
|
|
3015
3025
|
props: {
|
|
3016
|
-
...
|
|
3026
|
+
...Xe(null),
|
|
3017
3027
|
...pe()
|
|
3018
3028
|
},
|
|
3019
3029
|
setup(t, { expose: e, emit: r }) {
|
|
3020
|
-
const n = t, { componentEventPropagator: o } =
|
|
3030
|
+
const n = t, { componentEventPropagator: o } = Q(r), a = ae(M()), { data: l, options: i } = B(n), { internalData: u } = Ue(l), { allOptions: c } = J(i, Pa), { computedLineData: d } = Ct(u), { areaPathDefinition: s } = Ra(d), _ = v(() => u.value[0].color), m = v(
|
|
3021
3031
|
() => l.value[0].areaColor || _.value
|
|
3022
3032
|
);
|
|
3023
3033
|
function f(y) {
|
|
@@ -3026,8 +3036,8 @@ const Pa = {
|
|
|
3026
3036
|
noMinSize: !0
|
|
3027
3037
|
};
|
|
3028
3038
|
}
|
|
3029
|
-
function h(y, p,
|
|
3030
|
-
return ve().range([0,
|
|
3039
|
+
function h(y, p, k) {
|
|
3040
|
+
return ve().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3031
3041
|
}
|
|
3032
3042
|
return e({
|
|
3033
3043
|
areaPathDefinition: s
|
|
@@ -3048,7 +3058,7 @@ var Ba = function() {
|
|
|
3048
3058
|
return [e._t(a, null, null, l || {})];
|
|
3049
3059
|
} };
|
|
3050
3060
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3051
|
-
}, Fa = [], Ga = /* @__PURE__ */
|
|
3061
|
+
}, Fa = [], Ga = /* @__PURE__ */ w(
|
|
3052
3062
|
Sa,
|
|
3053
3063
|
Ba,
|
|
3054
3064
|
Fa,
|
|
@@ -3065,9 +3075,9 @@ export {
|
|
|
3065
3075
|
eo as LumeAlluvialNodeLabel,
|
|
3066
3076
|
ao as LumeAlluvialNodeValue,
|
|
3067
3077
|
Nn as LumeAxis,
|
|
3068
|
-
|
|
3078
|
+
Ze as LumeBar,
|
|
3069
3079
|
Za as LumeBarChart,
|
|
3070
|
-
|
|
3080
|
+
Ye as LumeBarGroup,
|
|
3071
3081
|
ie as LumeChart,
|
|
3072
3082
|
Mn as LumeChartContainer,
|
|
3073
3083
|
Un as LumeChartLegend,
|