@adyen/lume 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +603 -592
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +18 -18
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as E, ref as I, isRef as ot, computed as d, watch as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as E, ref as I, isRef as ot, computed as d, watch as C, toRefs as H, inject as fe, reactive as pe, onMounted as X, onBeforeUnmount as lt, watchEffect as ut, useSlots as V, provide as Ae, defineAsyncComponent as Te } from "vue";
|
|
2
|
+
import { format as Nt, ticks as Ct, scaleBand as ue, scaleLinear as ie, link as Dt, line as Ht, area as Rt } from "d3";
|
|
3
|
+
import { createPopper as St } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as Bt, sankey as Ft, sankeyJustify as Pt } from "d3-sankey";
|
|
5
|
+
const Gt = /* @__PURE__ */ E({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -73,7 +73,7 @@ function w(t, e, r, n, a, o, l, i) {
|
|
|
73
73
|
options: u
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var Vt = function() {
|
|
77
77
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
78
78
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
79
79
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -83,17 +83,17 @@ var jt = function() {
|
|
|
83
83
|
}, click: function(a) {
|
|
84
84
|
return n.emit("click", a);
|
|
85
85
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
86
|
-
},
|
|
86
|
+
}, jt = [], Mt = /* @__PURE__ */ w(
|
|
87
|
+
Gt,
|
|
87
88
|
Vt,
|
|
88
89
|
jt,
|
|
89
|
-
Mt,
|
|
90
90
|
!1,
|
|
91
91
|
null,
|
|
92
92
|
"59ddc0a6",
|
|
93
93
|
null,
|
|
94
94
|
null
|
|
95
95
|
);
|
|
96
|
-
const
|
|
96
|
+
const zt = Mt.exports, Wt = [
|
|
97
97
|
"controls",
|
|
98
98
|
"legend",
|
|
99
99
|
"axes",
|
|
@@ -112,7 +112,7 @@ function st(t) {
|
|
|
112
112
|
function Se(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Zt(t) {
|
|
116
116
|
return !!t && t.every(
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
@@ -126,16 +126,16 @@ function ct(t, e) {
|
|
|
126
126
|
r[n] = xe(t[n]) && xe(a) ? ct(t[n], a) : a;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Xt(t) {
|
|
130
130
|
return t != null && xe(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function q(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ut(t) {
|
|
136
136
|
return q(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const Yt = (t, e) => {
|
|
139
139
|
if (!t)
|
|
140
140
|
throw new Error("Data is not a valid array");
|
|
141
141
|
if (t.length === 0)
|
|
@@ -145,9 +145,9 @@ const Kt = (t, e) => {
|
|
|
145
145
|
throw new Error("Index exceeds length of at least one of the datasets");
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
function
|
|
148
|
+
function Kt(t, e) {
|
|
149
149
|
var r;
|
|
150
|
-
return
|
|
150
|
+
return Yt(t, e), ((r = t.reduce(
|
|
151
151
|
(n, a) => {
|
|
152
152
|
var o, l;
|
|
153
153
|
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
@@ -164,13 +164,13 @@ function Le(t) {
|
|
|
164
164
|
);
|
|
165
165
|
return Array(r).fill(null);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Jt(t) {
|
|
168
168
|
return q(t) ? t.domain().length : Math.max(...t.domain());
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Qt(t, e) {
|
|
171
171
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function qt(t, e, r) {
|
|
174
174
|
const n = r ? t.length - e : e, a = t.slice(0, n);
|
|
175
175
|
return t.slice(n).concat(a);
|
|
176
176
|
}
|
|
@@ -184,32 +184,32 @@ function ee(t) {
|
|
|
184
184
|
}
|
|
185
185
|
return t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function en(t) {
|
|
188
188
|
return Object.assign(
|
|
189
189
|
{},
|
|
190
190
|
...Object.keys(t).map(
|
|
191
|
-
(e) =>
|
|
191
|
+
(e) => Wt.includes(e) ? {} : { [e]: t[e] }
|
|
192
192
|
)
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const tn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
196
196
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
197
197
|
""
|
|
198
198
|
);
|
|
199
|
-
var
|
|
200
|
-
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))(
|
|
201
|
-
const
|
|
202
|
-
function
|
|
203
|
-
e && it() || console.warn(
|
|
199
|
+
var Z = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
200
|
+
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))(Z || {});
|
|
201
|
+
const nn = "[lume] ";
|
|
202
|
+
function J(t, e = !0) {
|
|
203
|
+
e && it() || console.warn(nn + "Warning: " + t);
|
|
204
204
|
}
|
|
205
205
|
const _e = (t) => {
|
|
206
206
|
let e = null;
|
|
207
207
|
switch (typeof t) {
|
|
208
208
|
case "string":
|
|
209
209
|
try {
|
|
210
|
-
e =
|
|
210
|
+
e = Nt(t);
|
|
211
211
|
} catch {
|
|
212
|
-
|
|
212
|
+
J(Z.InvalidFormat), e = null;
|
|
213
213
|
}
|
|
214
214
|
break;
|
|
215
215
|
case "function":
|
|
@@ -222,20 +222,20 @@ const _e = (t) => {
|
|
|
222
222
|
return e ? e(...n) : n[0];
|
|
223
223
|
}
|
|
224
224
|
return r;
|
|
225
|
-
},
|
|
225
|
+
}, se = () => ({
|
|
226
226
|
options: {
|
|
227
227
|
type: Object,
|
|
228
228
|
default: () => ({})
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
|
-
function
|
|
231
|
+
function W(t, e) {
|
|
232
232
|
return { allOptions: d(() => {
|
|
233
233
|
const n = ot(e) ? e == null ? void 0 : e.value : e;
|
|
234
234
|
return n ? ct(n, t.value) : t.value;
|
|
235
235
|
}) };
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
function
|
|
237
|
+
const rn = 0.15;
|
|
238
|
+
function an(t, e, r) {
|
|
239
239
|
const n = I(), a = d(() => Math.max(...t.value.range())), o = d(() => e.value.length);
|
|
240
240
|
function l() {
|
|
241
241
|
if (!e.value)
|
|
@@ -244,7 +244,7 @@ function on(t, e, r) {
|
|
|
244
244
|
(c, v) => c + v.ref.getBoundingClientRect().width,
|
|
245
245
|
0
|
|
246
246
|
), s = Math.ceil(u / o.value);
|
|
247
|
-
n.value = s + s *
|
|
247
|
+
n.value = s + s * rn;
|
|
248
248
|
}
|
|
249
249
|
function i(u) {
|
|
250
250
|
if (!e.value)
|
|
@@ -255,17 +255,17 @@ function on(t, e, r) {
|
|
|
255
255
|
const c = a.value / s, v = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
|
|
256
256
|
return u % v === 0;
|
|
257
257
|
}
|
|
258
|
-
return
|
|
258
|
+
return C(e, l), { showTick: i };
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
const
|
|
260
|
+
var j = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(j || {}), dt = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(dt || {}), Be = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Be || {}), vt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(vt || {}), Fe = /* @__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))(Fe || {});
|
|
261
|
+
const O = {
|
|
262
262
|
HORIZONTAL: "horizontal",
|
|
263
263
|
VERTICAL: "vertical"
|
|
264
|
-
},
|
|
264
|
+
}, on = {
|
|
265
265
|
SINGLE: "single",
|
|
266
266
|
GROUPED: "grouped",
|
|
267
267
|
STACKED: "stacked"
|
|
268
|
-
}, _t = "No data", ze = 20, ft = 0.33, pt = 0.5, mt = 12,
|
|
268
|
+
}, _t = "No data", ze = 20, ft = 0.33, pt = 0.5, mt = 12, ce = 8, ln = 1, un = [
|
|
269
269
|
"auto",
|
|
270
270
|
"auto-start",
|
|
271
271
|
"auto-end",
|
|
@@ -283,9 +283,9 @@ const L = {
|
|
|
283
283
|
"left-end"
|
|
284
284
|
];
|
|
285
285
|
function me(t) {
|
|
286
|
-
t != null && t.closest("svg") ||
|
|
286
|
+
t != null && t.closest("svg") || J(Z.NotContainedInSvg);
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const ht = {
|
|
289
289
|
/** Displays a line for each tick. */
|
|
290
290
|
gridLines: !1,
|
|
291
291
|
/** Displays the axis title. */
|
|
@@ -301,14 +301,14 @@ const gt = {
|
|
|
301
301
|
tickFormat: null,
|
|
302
302
|
/** Space between the tick label and the axis line. */
|
|
303
303
|
tickPadding: 8
|
|
304
|
-
},
|
|
305
|
-
...
|
|
304
|
+
}, sn = {
|
|
305
|
+
...ht,
|
|
306
306
|
withTitle: !1,
|
|
307
307
|
skip: !0
|
|
308
|
-
},
|
|
309
|
-
...
|
|
308
|
+
}, cn = {
|
|
309
|
+
...ht,
|
|
310
310
|
gridLines: !0
|
|
311
|
-
},
|
|
311
|
+
}, dn = function(t, e, r) {
|
|
312
312
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
313
313
|
function a(u, s) {
|
|
314
314
|
return {
|
|
@@ -324,7 +324,7 @@ const gt = {
|
|
|
324
324
|
return {
|
|
325
325
|
x: -(s - t.value.step()) / 2,
|
|
326
326
|
width: s,
|
|
327
|
-
height: r.value.tickPadding + mt +
|
|
327
|
+
height: r.value.tickPadding + mt + ce
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function l() {
|
|
@@ -350,7 +350,7 @@ const gt = {
|
|
|
350
350
|
getTickGroupAttributes: a,
|
|
351
351
|
getTickLabelAttributes: i
|
|
352
352
|
};
|
|
353
|
-
},
|
|
353
|
+
}, vn = function(t, e, r) {
|
|
354
354
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
355
355
|
function a(u, s) {
|
|
356
356
|
return {
|
|
@@ -359,7 +359,7 @@ const gt = {
|
|
|
359
359
|
}
|
|
360
360
|
function o(u) {
|
|
361
361
|
var c;
|
|
362
|
-
const s = (u ? (c = u.getComputedTextLength) == null ? void 0 : c.call(u) : 42) + r.value.tickPadding
|
|
362
|
+
const s = (u ? (c = u.getComputedTextLength) == null ? void 0 : c.call(u) : 42) + r.value.tickPadding + ce;
|
|
363
363
|
return {
|
|
364
364
|
x: -s,
|
|
365
365
|
width: s,
|
|
@@ -388,7 +388,7 @@ const gt = {
|
|
|
388
388
|
getTickGroupAttributes: a,
|
|
389
389
|
getTickLabelAttributes: i
|
|
390
390
|
};
|
|
391
|
-
},
|
|
391
|
+
}, _n = function(t, e, r) {
|
|
392
392
|
const n = d(() => {
|
|
393
393
|
const u = t.value.ticks();
|
|
394
394
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -400,7 +400,7 @@ const gt = {
|
|
|
400
400
|
}
|
|
401
401
|
function o() {
|
|
402
402
|
return {
|
|
403
|
-
height: r.value.tickPadding + mt +
|
|
403
|
+
height: r.value.tickPadding + mt + ce,
|
|
404
404
|
width: n.value,
|
|
405
405
|
x: -(n.value / 2)
|
|
406
406
|
};
|
|
@@ -423,7 +423,7 @@ const gt = {
|
|
|
423
423
|
getTickGroupAttributes: a,
|
|
424
424
|
getTickLabelAttributes: i
|
|
425
425
|
};
|
|
426
|
-
},
|
|
426
|
+
}, fn = function(t, e, r) {
|
|
427
427
|
const n = d(() => {
|
|
428
428
|
const u = t.value.ticks();
|
|
429
429
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -435,7 +435,7 @@ const gt = {
|
|
|
435
435
|
}
|
|
436
436
|
function o(u) {
|
|
437
437
|
var c;
|
|
438
|
-
const s = (((c = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : c.call(u)) || 0) + r.value.tickPadding
|
|
438
|
+
const s = (((c = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : c.call(u)) || 0) + r.value.tickPadding + ce;
|
|
439
439
|
return {
|
|
440
440
|
width: s,
|
|
441
441
|
height: n.value,
|
|
@@ -461,14 +461,14 @@ const gt = {
|
|
|
461
461
|
getTickGroupAttributes: a,
|
|
462
462
|
getTickLabelAttributes: i
|
|
463
463
|
};
|
|
464
|
-
},
|
|
465
|
-
"x-band-scale-axis":
|
|
466
|
-
"y-band-scale-axis":
|
|
467
|
-
"x-linear-scale-axis":
|
|
468
|
-
"y-linear-scale-axis":
|
|
464
|
+
}, pn = {
|
|
465
|
+
"x-band-scale-axis": dn,
|
|
466
|
+
"y-band-scale-axis": vn,
|
|
467
|
+
"x-linear-scale-axis": _n,
|
|
468
|
+
"y-linear-scale-axis": fn
|
|
469
469
|
};
|
|
470
470
|
var Oe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Oe || {}), $e = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))($e || {}), ve = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(ve || {});
|
|
471
|
-
const
|
|
471
|
+
const mn = /* @__PURE__ */ E({
|
|
472
472
|
__name: "lume-axis",
|
|
473
473
|
props: {
|
|
474
474
|
scale: {
|
|
@@ -495,43 +495,43 @@ const hn = /* @__PURE__ */ E({
|
|
|
495
495
|
},
|
|
496
496
|
orientation: {
|
|
497
497
|
type: String,
|
|
498
|
-
default:
|
|
498
|
+
default: O.VERTICAL
|
|
499
499
|
},
|
|
500
|
-
...
|
|
500
|
+
...se()
|
|
501
501
|
},
|
|
502
502
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
503
503
|
setup(t, { emit: e }) {
|
|
504
|
-
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } =
|
|
504
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = H(r), s = fe("isEmpty", I(!1)), c = pe({}), v = I(null), f = I(null), y = I(null), m = d(
|
|
505
505
|
() => r.type ? ve[r.type] : r.position
|
|
506
506
|
), g = d(
|
|
507
507
|
() => r.type || (m.value === "left" ? "y" : "x")
|
|
508
508
|
), h = d(
|
|
509
|
-
() => g.value === "x" && u.value ===
|
|
510
|
-
), { allOptions: p } =
|
|
509
|
+
() => g.value === "x" && u.value === O.VERTICAL || g.value === "y" && u.value === O.HORIZONTAL
|
|
510
|
+
), { allOptions: p } = W(
|
|
511
511
|
i,
|
|
512
|
-
g.value === "x" ?
|
|
513
|
-
), { showTick:
|
|
514
|
-
var _, b,
|
|
515
|
-
return g.value === "y" && s.value ? `translate(0, ${((_ = o.value) == null ? void 0 : _.height) / 2})` : g.value === "x" && s.value ? `translate(-${((b = o.value) == null ? void 0 : b.width) / 2}, ${(
|
|
512
|
+
g.value === "x" ? sn : cn
|
|
513
|
+
), { showTick: L } = an(a, v, p.value.skip), $ = d(() => {
|
|
514
|
+
var _, b, x, B;
|
|
515
|
+
return g.value === "y" && s.value ? `translate(0, ${((_ = o.value) == null ? void 0 : _.height) / 2})` : g.value === "x" && s.value ? `translate(-${((b = o.value) == null ? void 0 : b.width) / 2}, ${(x = o.value) == null ? void 0 : x.height})` : `translate(0, ${g.value === "x" ? (B = o.value) == null ? void 0 : B.height : 0})`;
|
|
516
516
|
}), T = d(() => {
|
|
517
517
|
if (q(a.value))
|
|
518
518
|
return a.value.labels || a.value.domain();
|
|
519
|
-
const { tickCount: _ } = p.value, [b,
|
|
520
|
-
return Ct(b,
|
|
519
|
+
const { tickCount: _ } = p.value, [b, x] = a.value.domain();
|
|
520
|
+
return Ct(b, x, _);
|
|
521
521
|
}), k = d(() => {
|
|
522
522
|
const { tickFormat: _ } = p.value;
|
|
523
523
|
return _e(_);
|
|
524
524
|
}), N = d(
|
|
525
525
|
() => p.value.withHover && h.value && l.value > -1
|
|
526
|
-
),
|
|
527
|
-
() => p.value.tickPadding
|
|
528
|
-
),
|
|
526
|
+
), D = d(
|
|
527
|
+
() => p.value.tickPadding + ce || n
|
|
528
|
+
), R = d(() => g.value === "x" ? (
|
|
529
529
|
// If x axis, get the tick height
|
|
530
530
|
Math.max(
|
|
531
531
|
...(v.value || []).map(
|
|
532
532
|
(_) => {
|
|
533
|
-
var b,
|
|
534
|
-
return ((
|
|
533
|
+
var b, x;
|
|
534
|
+
return ((x = (b = _.ref).getBBox) == null ? void 0 : x.call(b).height) + D.value;
|
|
535
535
|
}
|
|
536
536
|
)
|
|
537
537
|
)
|
|
@@ -540,8 +540,8 @@ const hn = /* @__PURE__ */ E({
|
|
|
540
540
|
Math.max(
|
|
541
541
|
...(v.value || []).map(
|
|
542
542
|
(_) => {
|
|
543
|
-
var b,
|
|
544
|
-
return ((
|
|
543
|
+
var b, x;
|
|
544
|
+
return ((x = (b = _.ref).getBBox) == null ? void 0 : x.call(b).width) + D.value;
|
|
545
545
|
}
|
|
546
546
|
)
|
|
547
547
|
)
|
|
@@ -550,17 +550,18 @@ const hn = /* @__PURE__ */ E({
|
|
|
550
550
|
const { showTicks: b } = p.value;
|
|
551
551
|
return b === !1 ? "" : k.value(_);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
e("mouseenter", { index: h.value ? _ : null, value: b, event:
|
|
553
|
+
function P(_, b, x) {
|
|
554
|
+
e("mouseenter", { index: h.value ? _ : null, value: b, event: x });
|
|
555
555
|
}
|
|
556
|
-
function te(_, b,
|
|
557
|
-
e("click", { index: _, value: b, event:
|
|
556
|
+
function te(_, b, x) {
|
|
557
|
+
e("click", { index: _, value: b, event: x });
|
|
558
558
|
}
|
|
559
559
|
function ne(_) {
|
|
560
|
+
var b;
|
|
560
561
|
if (!(!v.value || !v.value.length))
|
|
561
|
-
return v.value[_].ref;
|
|
562
|
+
return (b = v.value[_]) == null ? void 0 : b.ref;
|
|
562
563
|
}
|
|
563
|
-
function
|
|
564
|
+
function G() {
|
|
564
565
|
y.value = T.value.map(
|
|
565
566
|
(_, b) => ({
|
|
566
567
|
value: S(_),
|
|
@@ -571,18 +572,18 @@ const hn = /* @__PURE__ */ E({
|
|
|
571
572
|
})
|
|
572
573
|
);
|
|
573
574
|
}
|
|
574
|
-
function
|
|
575
|
-
const _ = a.value.step ? "bandScale" : "linearScale", b =
|
|
575
|
+
function U() {
|
|
576
|
+
const _ = a.value.step ? "bandScale" : "linearScale", b = pn[`${g.value}-${Oe[_]}`];
|
|
576
577
|
Object.entries(b(a, o, p) || []).forEach(
|
|
577
|
-
([
|
|
578
|
-
c[
|
|
578
|
+
([x, B]) => {
|
|
579
|
+
c[x] = B;
|
|
579
580
|
}
|
|
580
581
|
);
|
|
581
582
|
}
|
|
582
|
-
return
|
|
583
|
+
return C(a, U, { flush: "sync", immediate: !0 }), C(a, G, { immediate: !0 }), C(v, G), C(R, (_) => e("lume__internal--axis-size", _)), X(() => me(f.value)), { __sfc: !0, SCALE_MIXIN_MAP: Oe, POSITIONS: $e, TYPES: ve, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: s, mixins: c, tickRefs: v, root: f, ticksWithAttributes: y, computedPosition: m, computedType: g, shouldHover: h, allOptions: p, showTick: L, axisTransform: $, ticks: T, tickFormatter: k, isHovering: N, axisLabelOffset: D, axisSize: R, formatTick: S, handleTickMouseenter: P, handleTickClick: te, getTextNode: ne, setTicks: G, init: U, LumeTick: zt };
|
|
583
584
|
}
|
|
584
585
|
});
|
|
585
|
-
var
|
|
586
|
+
var hn = function() {
|
|
586
587
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
587
588
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
|
|
588
589
|
return n.emit("mouseleave", a);
|
|
@@ -599,18 +600,18 @@ var gn = function() {
|
|
|
599
600
|
a
|
|
600
601
|
);
|
|
601
602
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
602
|
-
},
|
|
603
|
+
}, gn = [], yn = /* @__PURE__ */ w(
|
|
604
|
+
mn,
|
|
603
605
|
hn,
|
|
604
606
|
gn,
|
|
605
|
-
yn,
|
|
606
607
|
!1,
|
|
607
608
|
null,
|
|
608
609
|
null,
|
|
609
610
|
null,
|
|
610
611
|
null
|
|
611
612
|
);
|
|
612
|
-
const
|
|
613
|
-
function
|
|
613
|
+
const bn = yn.exports;
|
|
614
|
+
function kn(t, e, r, n) {
|
|
614
615
|
const a = d(() => r.value > 0 && r.value < 1), o = d(
|
|
615
616
|
() => n.value > 0 && n.value < 1
|
|
616
617
|
), l = d(
|
|
@@ -622,13 +623,13 @@ function An(t, e, r, n) {
|
|
|
622
623
|
);
|
|
623
624
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
624
625
|
}
|
|
625
|
-
function
|
|
626
|
+
function An(t, e, r, n) {
|
|
626
627
|
const a = I(0), o = I(0), l = d(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
627
|
-
return
|
|
628
|
+
return X(() => {
|
|
628
629
|
a.value = r.value, o.value = n.value;
|
|
629
|
-
}),
|
|
630
|
+
}), C(r, (i) => a.value = i), C(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
630
631
|
}
|
|
631
|
-
const
|
|
632
|
+
const Tn = /* @__PURE__ */ E({
|
|
632
633
|
__name: "lume-bar",
|
|
633
634
|
props: {
|
|
634
635
|
x: {
|
|
@@ -666,13 +667,13 @@ const xn = /* @__PURE__ */ E({
|
|
|
666
667
|
},
|
|
667
668
|
emits: ["click", "mouseover", "mouseleave"],
|
|
668
669
|
setup(t, { emit: e }) {
|
|
669
|
-
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } =
|
|
670
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = H(r), s = I(null), c = d(
|
|
670
671
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
671
|
-
), v = d(() => i.value === "width"), f = d(() => i.value === "height"), y =
|
|
672
|
-
return
|
|
672
|
+
), v = d(() => i.value === "width"), f = d(() => i.value === "height"), y = An(n, a, o, l), { computedX: m, computedY: g, shouldHaveMinWidth: h, shouldHaveMinHeight: p } = kn(n, a, o, l), L = d(() => h.value ? 1 : (v.value ? y.computedWidth : o).value), $ = d(() => p.value ? 1 : (f.value ? y.computedHeight : l).value), T = v.value || f.value ? y.transformOrigin : null;
|
|
673
|
+
return X(() => me(s.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: s, computedClasses: c, shouldTransitionWidth: v, shouldTransitionHeight: f, transitionProps: y, computedX: m, computedY: g, shouldHaveMinWidth: h, shouldHaveMinHeight: p, computedWidth: L, computedHeight: $, transformOrigin: T };
|
|
673
674
|
}
|
|
674
675
|
});
|
|
675
|
-
var
|
|
676
|
+
var xn = function() {
|
|
676
677
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
677
678
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
678
679
|
{
|
|
@@ -689,18 +690,18 @@ var Ln = function() {
|
|
|
689
690
|
}, mouseleave: function(a) {
|
|
690
691
|
return n.emit("mouseleave", a);
|
|
691
692
|
} } });
|
|
692
|
-
},
|
|
693
|
+
}, Ln = [], On = /* @__PURE__ */ w(
|
|
694
|
+
Tn,
|
|
693
695
|
xn,
|
|
694
696
|
Ln,
|
|
695
|
-
On,
|
|
696
697
|
!1,
|
|
697
698
|
null,
|
|
698
699
|
"8e8f732a",
|
|
699
700
|
null,
|
|
700
701
|
null
|
|
701
702
|
);
|
|
702
|
-
const Pe =
|
|
703
|
-
function
|
|
703
|
+
const Pe = On.exports;
|
|
704
|
+
function $n() {
|
|
704
705
|
const t = I(), e = pe({
|
|
705
706
|
dimensions: {}
|
|
706
707
|
}), r = new ResizeObserver((n) => {
|
|
@@ -708,13 +709,13 @@ function In() {
|
|
|
708
709
|
e.dimensions = a.contentRect;
|
|
709
710
|
});
|
|
710
711
|
});
|
|
711
|
-
return
|
|
712
|
+
return X(() => {
|
|
712
713
|
r.observe(t.value);
|
|
713
714
|
}), lt(() => {
|
|
714
715
|
r.unobserve(t.value);
|
|
715
716
|
}), { resizeState: e, resizeRef: t };
|
|
716
717
|
}
|
|
717
|
-
const
|
|
718
|
+
const In = /* @__PURE__ */ E({
|
|
718
719
|
__name: "lume-chart-container",
|
|
719
720
|
props: {
|
|
720
721
|
margins: {
|
|
@@ -736,7 +737,7 @@ const wn = /* @__PURE__ */ E({
|
|
|
736
737
|
},
|
|
737
738
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
738
739
|
setup(t, { emit: e }) {
|
|
739
|
-
const r = t, { margins: n, containerSize: a } =
|
|
740
|
+
const r = t, { margins: n, containerSize: a } = H(r), o = I(null), { resizeRef: l, resizeState: i } = $n(), u = d(
|
|
740
741
|
() => a.value.height + n.value.top + n.value.bottom
|
|
741
742
|
);
|
|
742
743
|
return ut(() => {
|
|
@@ -755,7 +756,7 @@ const wn = /* @__PURE__ */ E({
|
|
|
755
756
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
756
757
|
}
|
|
757
758
|
});
|
|
758
|
-
var
|
|
759
|
+
var wn = function() {
|
|
759
760
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
760
761
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
761
762
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -768,22 +769,22 @@ var En = function() {
|
|
|
768
769
|
}, mouseleave: function(a) {
|
|
769
770
|
return n.emit("mouseleave", a);
|
|
770
771
|
} } }, [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
|
-
},
|
|
772
|
+
}, En = [], Nn = /* @__PURE__ */ w(
|
|
773
|
+
In,
|
|
772
774
|
wn,
|
|
773
775
|
En,
|
|
774
|
-
Nn,
|
|
775
776
|
!1,
|
|
776
777
|
null,
|
|
777
778
|
"36870bc4",
|
|
778
779
|
null,
|
|
779
780
|
null
|
|
780
781
|
);
|
|
781
|
-
const Cn =
|
|
782
|
+
const Cn = Nn.exports, Dn = /* @__PURE__ */ E({
|
|
782
783
|
__name: "lume-chart-legend",
|
|
783
784
|
props: {
|
|
784
785
|
data: {
|
|
785
786
|
type: Array,
|
|
786
|
-
validator:
|
|
787
|
+
validator: Zt,
|
|
787
788
|
required: !0
|
|
788
789
|
}
|
|
789
790
|
},
|
|
@@ -804,47 +805,47 @@ var Hn = function() {
|
|
|
804
805
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
805
806
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
806
807
|
}), 0);
|
|
807
|
-
},
|
|
808
|
-
|
|
808
|
+
}, Rn = [], Sn = /* @__PURE__ */ w(
|
|
809
|
+
Dn,
|
|
809
810
|
Hn,
|
|
810
|
-
|
|
811
|
+
Rn,
|
|
811
812
|
!1,
|
|
812
813
|
null,
|
|
813
814
|
"4710298b",
|
|
814
815
|
null,
|
|
815
816
|
null
|
|
816
817
|
);
|
|
817
|
-
const
|
|
818
|
-
const
|
|
819
|
-
var
|
|
818
|
+
const Bn = Sn.exports;
|
|
819
|
+
const Fn = {};
|
|
820
|
+
var Pn = function() {
|
|
820
821
|
var e = this, r = e._self._c;
|
|
821
822
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
822
|
-
},
|
|
823
|
+
}, Gn = [], Vn = /* @__PURE__ */ w(
|
|
824
|
+
Fn,
|
|
823
825
|
Pn,
|
|
824
826
|
Gn,
|
|
825
|
-
Vn,
|
|
826
827
|
!1,
|
|
827
828
|
null,
|
|
828
829
|
"8af3fac6",
|
|
829
830
|
null,
|
|
830
831
|
null
|
|
831
832
|
);
|
|
832
|
-
const
|
|
833
|
-
const
|
|
834
|
-
var
|
|
833
|
+
const jn = Vn.exports;
|
|
834
|
+
const Mn = {};
|
|
835
|
+
var zn = function() {
|
|
835
836
|
var e = this, r = e._self._c;
|
|
836
837
|
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
|
-
},
|
|
838
|
+
}, Wn = [], Zn = /* @__PURE__ */ w(
|
|
839
|
+
Mn,
|
|
838
840
|
zn,
|
|
839
841
|
Wn,
|
|
840
|
-
Zn,
|
|
841
842
|
!1,
|
|
842
843
|
null,
|
|
843
844
|
"4ed7ec1b",
|
|
844
845
|
null,
|
|
845
846
|
null
|
|
846
847
|
);
|
|
847
|
-
const
|
|
848
|
+
const Xn = Zn.exports, Un = /* @__PURE__ */ E({
|
|
848
849
|
__name: "lume-tooltip-item",
|
|
849
850
|
props: {
|
|
850
851
|
color: {
|
|
@@ -856,20 +857,20 @@ const Un = Xn.exports, Yn = /* @__PURE__ */ E({
|
|
|
856
857
|
return { __sfc: !0 };
|
|
857
858
|
}
|
|
858
859
|
});
|
|
859
|
-
var
|
|
860
|
+
var Yn = function() {
|
|
860
861
|
var e = this, r = e._self._c;
|
|
861
862
|
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
|
-
},
|
|
863
|
+
}, Kn = [], Jn = /* @__PURE__ */ w(
|
|
864
|
+
Un,
|
|
863
865
|
Yn,
|
|
864
866
|
Kn,
|
|
865
|
-
Jn,
|
|
866
867
|
!1,
|
|
867
868
|
null,
|
|
868
869
|
"4f995c3c",
|
|
869
870
|
null,
|
|
870
871
|
null
|
|
871
872
|
);
|
|
872
|
-
const
|
|
873
|
+
const Qn = Jn.exports, qn = /* @__PURE__ */ E({
|
|
873
874
|
__name: "lume-tooltip",
|
|
874
875
|
props: {
|
|
875
876
|
targetElement: {
|
|
@@ -883,7 +884,7 @@ const qn = Qn.exports, er = /* @__PURE__ */ E({
|
|
|
883
884
|
position: {
|
|
884
885
|
type: String,
|
|
885
886
|
default: "auto",
|
|
886
|
-
validator: (t) =>
|
|
887
|
+
validator: (t) => un.includes(t)
|
|
887
888
|
},
|
|
888
889
|
fixedPositioning: {
|
|
889
890
|
type: Boolean,
|
|
@@ -901,11 +902,11 @@ const qn = Qn.exports, er = /* @__PURE__ */ E({
|
|
|
901
902
|
type: String,
|
|
902
903
|
default: null
|
|
903
904
|
},
|
|
904
|
-
...
|
|
905
|
+
...se()
|
|
905
906
|
},
|
|
906
907
|
emits: ["opened", "moved", "closed"],
|
|
907
908
|
setup(t, { emit: e }) {
|
|
908
|
-
const r = t, n = I(null), { items: a, options: o } =
|
|
909
|
+
const r = t, n = I(null), { items: a, options: o } = H(r), l = V(), i = I(null), { allOptions: u } = W(o), s = d(
|
|
909
910
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
910
911
|
), c = d(
|
|
911
912
|
() => s.value ? "fixed" : "absolute"
|
|
@@ -933,29 +934,29 @@ const qn = Qn.exports, er = /* @__PURE__ */ E({
|
|
|
933
934
|
}
|
|
934
935
|
), h = d(() => l.summary || g.value.label);
|
|
935
936
|
function p() {
|
|
936
|
-
r.targetElement && n.value && (i.value =
|
|
937
|
+
r.targetElement && n.value && (i.value = St(r.targetElement, n.value, {
|
|
937
938
|
placement: r.position,
|
|
938
939
|
strategy: c.value,
|
|
939
940
|
modifiers: v.value
|
|
940
941
|
}), e("opened", r.targetElement));
|
|
941
942
|
}
|
|
942
|
-
function
|
|
943
|
+
function L() {
|
|
943
944
|
i.value && (i.value.destroy(), e("closed"));
|
|
944
945
|
}
|
|
945
|
-
function
|
|
946
|
+
function $() {
|
|
946
947
|
i.value && (n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
947
948
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
948
|
-
}() :
|
|
949
|
+
}() : L());
|
|
949
950
|
}
|
|
950
|
-
return
|
|
951
|
+
return C(
|
|
951
952
|
() => r.targetElement,
|
|
952
953
|
(T, k) => {
|
|
953
|
-
!k && T ? p() :
|
|
954
|
+
!k && T ? p() : $();
|
|
954
955
|
}
|
|
955
|
-
),
|
|
956
|
+
), X(p), lt(L), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: c, allModifiers: v, showTitle: f, formatValue: y, formatTitle: m, summaryItem: g, hasSummary: h, initPopper: p, destroyPopper: L, updatePopper: $, LumeTooltipTitle: jn, LumeTooltipSummary: Xn, LumeTooltipItem: Qn };
|
|
956
957
|
}
|
|
957
958
|
});
|
|
958
|
-
var
|
|
959
|
+
var er = function() {
|
|
959
960
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
960
961
|
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.targetElement, expression: "targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", attrs: { "data-j-tooltip": "" } }, [e._t("default", function() {
|
|
961
962
|
return [e._t("title", function() {
|
|
@@ -974,63 +975,63 @@ var tr = function() {
|
|
|
974
975
|
});
|
|
975
976
|
})], 2)];
|
|
976
977
|
})], 2);
|
|
977
|
-
},
|
|
978
|
+
}, tr = [], nr = /* @__PURE__ */ w(
|
|
979
|
+
qn,
|
|
978
980
|
er,
|
|
979
981
|
tr,
|
|
980
|
-
nr,
|
|
981
982
|
!1,
|
|
982
983
|
null,
|
|
983
984
|
"57f370fa",
|
|
984
985
|
null,
|
|
985
986
|
null
|
|
986
987
|
);
|
|
987
|
-
const
|
|
988
|
-
var
|
|
989
|
-
const
|
|
990
|
-
function
|
|
991
|
-
return t ===
|
|
988
|
+
const rr = nr.exports;
|
|
989
|
+
var K = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(K || {});
|
|
990
|
+
const ar = K.Categorical, de = j.Skyblue, or = Be.SkyTeal;
|
|
991
|
+
function lr(t) {
|
|
992
|
+
return t === K.Divergent ? or : de;
|
|
992
993
|
}
|
|
993
|
-
function
|
|
994
|
+
function ur(t) {
|
|
994
995
|
return Object.values(Fe).includes(t);
|
|
995
996
|
}
|
|
996
997
|
function We(t, e) {
|
|
997
|
-
return e ===
|
|
998
|
-
...
|
|
998
|
+
return e === K.Divergent ? Object.values(Be).includes(t) : Object.values({
|
|
999
|
+
...j,
|
|
999
1000
|
...dt,
|
|
1000
1001
|
...vt,
|
|
1001
1002
|
...Fe
|
|
1002
1003
|
}).includes(t);
|
|
1003
1004
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const r = Object.values(
|
|
1006
|
-
return
|
|
1005
|
+
function ir(t, e) {
|
|
1006
|
+
const r = Object.values(j).indexOf(t);
|
|
1007
|
+
return qt(Object.values(j), r > -1 ? r : 0)[e];
|
|
1007
1008
|
}
|
|
1008
|
-
function
|
|
1009
|
+
function sr(t, e) {
|
|
1009
1010
|
const r = 50 + e * 10;
|
|
1010
1011
|
return `${t}-${r}`;
|
|
1011
1012
|
}
|
|
1012
|
-
function
|
|
1013
|
+
function cr(t, e) {
|
|
1013
1014
|
const r = (e + 1) * 10;
|
|
1014
1015
|
return `${t}-${r}`;
|
|
1015
1016
|
}
|
|
1016
1017
|
function Ze(t, e, r) {
|
|
1017
1018
|
switch (e) {
|
|
1018
1019
|
default:
|
|
1019
|
-
case
|
|
1020
|
-
return
|
|
1021
|
-
case
|
|
1020
|
+
case K.Categorical:
|
|
1021
|
+
return ur(t) ? t : ir(t, r);
|
|
1022
|
+
case K.Sequential:
|
|
1023
|
+
return sr(t, r);
|
|
1024
|
+
case K.Divergent:
|
|
1022
1025
|
return cr(t, r);
|
|
1023
|
-
case Y.Divergent:
|
|
1024
|
-
return dr(t, r);
|
|
1025
1026
|
}
|
|
1026
1027
|
}
|
|
1027
|
-
function
|
|
1028
|
-
return We(t, r) ? t : (n > 4 && (
|
|
1028
|
+
function dr(t, e, r = ar, n) {
|
|
1029
|
+
return We(t, r) ? t : (n > 4 && (J(Z.ColorLoop), n = n % 5), We(e, r) ? Ze(e, r, n) : Ze(lr(r), r, n));
|
|
1029
1030
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return t.map((e) =>
|
|
1031
|
+
function vr(t) {
|
|
1032
|
+
return t.map((e) => Xt(e) ? e : { value: e });
|
|
1032
1033
|
}
|
|
1033
|
-
function
|
|
1034
|
+
function _r(t) {
|
|
1034
1035
|
return t.__internal === !0;
|
|
1035
1036
|
}
|
|
1036
1037
|
const Ge = (t = null) => ({
|
|
@@ -1045,7 +1046,7 @@ const Ge = (t = null) => ({
|
|
|
1045
1046
|
},
|
|
1046
1047
|
color: {
|
|
1047
1048
|
type: String,
|
|
1048
|
-
default:
|
|
1049
|
+
default: j.Skyblue
|
|
1049
1050
|
},
|
|
1050
1051
|
title: {
|
|
1051
1052
|
type: String,
|
|
@@ -1056,13 +1057,13 @@ function Ve(t, e, r, n, a) {
|
|
|
1056
1057
|
const o = pe({
|
|
1057
1058
|
width: 0,
|
|
1058
1059
|
height: 0
|
|
1059
|
-
}), l =
|
|
1060
|
+
}), l = tn(12), i = d(() => {
|
|
1060
1061
|
var c;
|
|
1061
|
-
return t.value.length > 5 &&
|
|
1062
|
+
return t.value.length > 5 && J(Z.DatasetLength), (c = t.value) == null ? void 0 : c.map(
|
|
1062
1063
|
(v, f) => {
|
|
1063
|
-
if (
|
|
1064
|
+
if (_r(v))
|
|
1064
1065
|
return v;
|
|
1065
|
-
const y =
|
|
1066
|
+
const y = vr(v.values), m = dr(
|
|
1066
1067
|
v.color,
|
|
1067
1068
|
r == null ? void 0 : r.value,
|
|
1068
1069
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -1078,7 +1079,7 @@ function Ve(t, e, r, n, a) {
|
|
|
1078
1079
|
);
|
|
1079
1080
|
}), u = d(() => Array.isArray(e.value) ? e.value : Le(t.value).map((c, v) => v));
|
|
1080
1081
|
function s(c) {
|
|
1081
|
-
const v = (a == null ? void 0 : a.value) ===
|
|
1082
|
+
const v = (a == null ? void 0 : a.value) === O.HORIZONTAL && Le(t).length * (((n == null ? void 0 : n.value.barHeight) || ze) * 2) + ((n == null ? void 0 : n.value.barHeight) || ze) || c.height;
|
|
1082
1083
|
o.width = c.width, o.height = v;
|
|
1083
1084
|
}
|
|
1084
1085
|
return {
|
|
@@ -1089,7 +1090,7 @@ function Ve(t, e, r, n, a) {
|
|
|
1089
1090
|
updateSize: s
|
|
1090
1091
|
};
|
|
1091
1092
|
}
|
|
1092
|
-
const
|
|
1093
|
+
const fr = () => ({
|
|
1093
1094
|
xScale: {
|
|
1094
1095
|
type: Function,
|
|
1095
1096
|
default: null
|
|
@@ -1099,11 +1100,11 @@ const pr = () => ({
|
|
|
1099
1100
|
default: null
|
|
1100
1101
|
}
|
|
1101
1102
|
});
|
|
1102
|
-
function
|
|
1103
|
+
function pr(t, e, r, n, a) {
|
|
1103
1104
|
const o = I(null), l = I(null);
|
|
1104
1105
|
function i() {
|
|
1105
1106
|
const { width: u, height: s } = r;
|
|
1106
|
-
!u && !s || !e.value || !t.value || (n.value ===
|
|
1107
|
+
!u && !s || !e.value || !t.value || (n.value === O.HORIZONTAL ? (o.value = Ue(
|
|
1107
1108
|
t.value,
|
|
1108
1109
|
u,
|
|
1109
1110
|
n.value,
|
|
@@ -1128,18 +1129,18 @@ function mr(t, e, r, n, a) {
|
|
|
1128
1129
|
return ut(i), { xScale: o, yScale: l };
|
|
1129
1130
|
}
|
|
1130
1131
|
function Xe(t, e, r, n) {
|
|
1131
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r ===
|
|
1132
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? pt : ft);
|
|
1132
1133
|
return Object.assign(
|
|
1133
|
-
|
|
1134
|
+
ue().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, c) => c)),
|
|
1134
1135
|
{ labels: t }
|
|
1135
1136
|
);
|
|
1136
1137
|
}
|
|
1137
1138
|
function Ue(t, e, r, n) {
|
|
1138
1139
|
const a = st(t).filter((c) => c != null), o = [0, e];
|
|
1139
1140
|
if (a.length === 0)
|
|
1140
|
-
return
|
|
1141
|
-
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r ===
|
|
1142
|
-
return
|
|
1141
|
+
return ie().range(o).domain([0, 0]).nice();
|
|
1142
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === O.HORIZONTAL ? [i, u] : [u, i];
|
|
1143
|
+
return ie().range(o).domain(s).nice();
|
|
1143
1144
|
}
|
|
1144
1145
|
function Ye(t) {
|
|
1145
1146
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
@@ -1152,16 +1153,16 @@ function Ke(t, e, {
|
|
|
1152
1153
|
paddingInner: n,
|
|
1153
1154
|
paddingOuter: a
|
|
1154
1155
|
} = {}) {
|
|
1155
|
-
const o = r ?? (e ===
|
|
1156
|
+
const o = r ?? (e === O.HORIZONTAL ? pt : ft);
|
|
1156
1157
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
1157
1158
|
}
|
|
1158
|
-
function
|
|
1159
|
-
return Object.values(
|
|
1159
|
+
function gt(t) {
|
|
1160
|
+
return Object.values(O).includes(t);
|
|
1160
1161
|
}
|
|
1161
|
-
const
|
|
1162
|
+
const ae = (t, e = !0) => ({
|
|
1162
1163
|
...Ge(t),
|
|
1163
|
-
...
|
|
1164
|
-
...
|
|
1164
|
+
...fr(),
|
|
1165
|
+
...se(),
|
|
1165
1166
|
classList: {
|
|
1166
1167
|
type: [String, Array],
|
|
1167
1168
|
default: () => []
|
|
@@ -1173,13 +1174,13 @@ const oe = (t, e = !0) => ({
|
|
|
1173
1174
|
...e ? {
|
|
1174
1175
|
orientation: {
|
|
1175
1176
|
type: String,
|
|
1176
|
-
default:
|
|
1177
|
-
validator:
|
|
1177
|
+
default: O.VERTICAL,
|
|
1178
|
+
validator: gt
|
|
1178
1179
|
}
|
|
1179
1180
|
} : {}
|
|
1180
|
-
}),
|
|
1181
|
+
}), mr = (t) => ({
|
|
1181
1182
|
...Ge(t),
|
|
1182
|
-
...
|
|
1183
|
+
...se(),
|
|
1183
1184
|
hoveredElement: {
|
|
1184
1185
|
type: [Number, String],
|
|
1185
1186
|
default: null
|
|
@@ -1199,8 +1200,8 @@ const oe = (t, e = !0) => ({
|
|
|
1199
1200
|
},
|
|
1200
1201
|
orientation: {
|
|
1201
1202
|
type: String,
|
|
1202
|
-
default:
|
|
1203
|
-
validator:
|
|
1203
|
+
default: O.VERTICAL,
|
|
1204
|
+
validator: gt
|
|
1204
1205
|
},
|
|
1205
1206
|
xScale: {
|
|
1206
1207
|
type: Function,
|
|
@@ -1226,22 +1227,22 @@ const oe = (t, e = !0) => ({
|
|
|
1226
1227
|
type: [String, Array],
|
|
1227
1228
|
default: () => []
|
|
1228
1229
|
}
|
|
1229
|
-
}),
|
|
1230
|
+
}), hr = /* @__PURE__ */ E({
|
|
1230
1231
|
__name: "lume-overlay-group",
|
|
1231
1232
|
props: {
|
|
1232
1233
|
...he(),
|
|
1233
1234
|
orientation: {
|
|
1234
1235
|
type: String,
|
|
1235
|
-
default:
|
|
1236
|
+
default: O.VERTICAL
|
|
1236
1237
|
}
|
|
1237
1238
|
},
|
|
1238
1239
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1239
1240
|
setup(t, { emit: e }) {
|
|
1240
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale: l } =
|
|
1241
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = H(r), i = d(() => Le(n));
|
|
1241
1242
|
function u(s) {
|
|
1242
1243
|
var h;
|
|
1243
|
-
const c = a.value ===
|
|
1244
|
-
return a.value ===
|
|
1244
|
+
const c = a.value === O.HORIZONTAL ? l.value : o.value, v = c.domain(), f = Ut(c), y = ((h = c.paddingInner) == null ? void 0 : h.call(c)) ?? 0, m = f * y, g = q(c) ? c(v[s]) - m / 2 : c(s) - f / 2;
|
|
1245
|
+
return a.value === O.HORIZONTAL ? {
|
|
1245
1246
|
width: Math.max(...o.value.range()),
|
|
1246
1247
|
height: f,
|
|
1247
1248
|
transform: `translate(0, ${g})`
|
|
@@ -1254,7 +1255,7 @@ const oe = (t, e = !0) => ({
|
|
|
1254
1255
|
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Pe };
|
|
1255
1256
|
}
|
|
1256
1257
|
});
|
|
1257
|
-
var
|
|
1258
|
+
var gr = function() {
|
|
1258
1259
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1259
1260
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1260
1261
|
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
@@ -1263,25 +1264,25 @@ var yr = function() {
|
|
|
1263
1264
|
return n.emit("click", { index: o, event: l });
|
|
1264
1265
|
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1265
1266
|
}), 1);
|
|
1266
|
-
},
|
|
1267
|
+
}, yr = [], br = /* @__PURE__ */ w(
|
|
1268
|
+
hr,
|
|
1267
1269
|
gr,
|
|
1268
1270
|
yr,
|
|
1269
|
-
br,
|
|
1270
1271
|
!1,
|
|
1271
1272
|
null,
|
|
1272
1273
|
null,
|
|
1273
1274
|
null,
|
|
1274
1275
|
null
|
|
1275
1276
|
);
|
|
1276
|
-
const
|
|
1277
|
-
function
|
|
1277
|
+
const kr = br.exports;
|
|
1278
|
+
function Ar(t) {
|
|
1278
1279
|
return { hasNegativeValues: d(
|
|
1279
1280
|
() => st(t.value).some((r) => r < 0)
|
|
1280
1281
|
) };
|
|
1281
1282
|
}
|
|
1282
|
-
function
|
|
1283
|
+
function Tr(t, e, r, n) {
|
|
1283
1284
|
const a = d(
|
|
1284
|
-
() => n.value ===
|
|
1285
|
+
() => n.value === O.HORIZONTAL
|
|
1285
1286
|
), o = d(
|
|
1286
1287
|
() => {
|
|
1287
1288
|
var s;
|
|
@@ -1304,19 +1305,19 @@ function xr(t, e, r, n) {
|
|
|
1304
1305
|
transform: i.value
|
|
1305
1306
|
})) };
|
|
1306
1307
|
}
|
|
1307
|
-
function
|
|
1308
|
+
function xr(t) {
|
|
1308
1309
|
return t.reduce((e, r) => r.values.map((n, a) => e[a] ? n.value > e[a] ? n.value : e[a] : n.value ?? 0), []);
|
|
1309
1310
|
}
|
|
1310
|
-
function
|
|
1311
|
+
function Lr(t) {
|
|
1311
1312
|
return t.reduce((e, r) => r.values.map((n, a) => {
|
|
1312
1313
|
const o = n.value == null || n.value < 0 ? 0 : n.value;
|
|
1313
1314
|
return e[a] ? e[a] + o : o;
|
|
1314
1315
|
}), []);
|
|
1315
1316
|
}
|
|
1316
1317
|
const Je = {
|
|
1317
|
-
"stacked-bar":
|
|
1318
|
+
"stacked-bar": Lr
|
|
1318
1319
|
};
|
|
1319
|
-
function
|
|
1320
|
+
function yt(t, e, r, n, a, o, l) {
|
|
1320
1321
|
const i = d(
|
|
1321
1322
|
() => {
|
|
1322
1323
|
var s;
|
|
@@ -1324,13 +1325,13 @@ function bt(t, e, r, n, a, o, l) {
|
|
|
1324
1325
|
}
|
|
1325
1326
|
);
|
|
1326
1327
|
function u(s) {
|
|
1327
|
-
const c = l != null && l.value && Je[l.value] ? Je[l.value](s) :
|
|
1328
|
+
const c = l != null && l.value && Je[l.value] ? Je[l.value](s) : xr(s);
|
|
1328
1329
|
t.value = c.map((v, f) => ({
|
|
1329
|
-
cx: (a == null ? void 0 : a.value) ===
|
|
1330
|
-
cy: (a == null ? void 0 : a.value) ===
|
|
1330
|
+
cx: (a == null ? void 0 : a.value) === O.HORIZONTAL ? r.value(v) : Ie(r.value, f),
|
|
1331
|
+
cy: (a == null ? void 0 : a.value) === O.HORIZONTAL ? Ie(n.value, f) : n.value(v)
|
|
1331
1332
|
}));
|
|
1332
1333
|
}
|
|
1333
|
-
return
|
|
1334
|
+
return C(
|
|
1334
1335
|
[r, n],
|
|
1335
1336
|
() => {
|
|
1336
1337
|
r.value && n.value && (o != null && o.value) && i.value && u(o.value);
|
|
@@ -1338,7 +1339,7 @@ function bt(t, e, r, n, a, o, l) {
|
|
|
1338
1339
|
{ immediate: !0 }
|
|
1339
1340
|
), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
|
|
1340
1341
|
}
|
|
1341
|
-
function
|
|
1342
|
+
function Or() {
|
|
1342
1343
|
const t = pe({
|
|
1343
1344
|
opened: !1,
|
|
1344
1345
|
targetElement: null
|
|
@@ -1349,7 +1350,7 @@ function $r() {
|
|
|
1349
1350
|
t.opened = !1, t.targetElement = null;
|
|
1350
1351
|
} };
|
|
1351
1352
|
}
|
|
1352
|
-
function
|
|
1353
|
+
function $r(t) {
|
|
1353
1354
|
return { getTooltipItems: d(
|
|
1354
1355
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1355
1356
|
var l, i, u;
|
|
@@ -1361,144 +1362,144 @@ function Ir(t) {
|
|
|
1361
1362
|
})
|
|
1362
1363
|
) };
|
|
1363
1364
|
}
|
|
1364
|
-
const we = 16, Ee = 8, Ne = 28,
|
|
1365
|
+
const we = 16, Ee = 8, Ne = 28, Ce = 24, Q = {
|
|
1365
1366
|
VERTICAL: {
|
|
1366
1367
|
top: we,
|
|
1367
1368
|
right: Ee,
|
|
1368
1369
|
bottom: Ne,
|
|
1369
|
-
left:
|
|
1370
|
+
left: Ce
|
|
1370
1371
|
},
|
|
1371
1372
|
HORIZONTAL: {
|
|
1372
1373
|
top: we,
|
|
1373
1374
|
right: Ee,
|
|
1374
1375
|
bottom: Ne,
|
|
1375
|
-
left:
|
|
1376
|
+
left: Ce
|
|
1376
1377
|
}
|
|
1377
1378
|
};
|
|
1378
|
-
function
|
|
1379
|
+
function Ir(t) {
|
|
1379
1380
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? we : t.top;
|
|
1380
1381
|
}
|
|
1381
|
-
function
|
|
1382
|
+
function wr(t) {
|
|
1382
1383
|
return !t || t === "auto" || t.right == null || t.right === "auto" ? Ee : t.right;
|
|
1383
1384
|
}
|
|
1384
|
-
function
|
|
1385
|
+
function Er(t, e) {
|
|
1385
1386
|
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Ne : t.bottom;
|
|
1386
1387
|
}
|
|
1387
|
-
function
|
|
1388
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1388
|
+
function Nr(t, e) {
|
|
1389
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Ce : t.left;
|
|
1389
1390
|
}
|
|
1390
1391
|
const Cr = /* @__PURE__ */ E({
|
|
1391
1392
|
__name: "lume-chart",
|
|
1392
1393
|
props: {
|
|
1393
|
-
...
|
|
1394
|
+
...ae(),
|
|
1394
1395
|
chartType: {
|
|
1395
1396
|
type: String,
|
|
1396
1397
|
default: null
|
|
1397
1398
|
}
|
|
1398
1399
|
},
|
|
1399
1400
|
setup(t, { emit: e }) {
|
|
1400
|
-
const r = t, n =
|
|
1401
|
+
const r = t, n = V(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = H(r), c = I(-1), v = I(null), f = I(null), y = I([]), m = I(0), g = I(0), { allOptions: h } = W(i), { internalData: p, computedLabels: L, containerSize: $, updateSize: T, chartID: k } = Ve(a, o, l, h, u), { xScale: N, yScale: D } = pr(
|
|
1401
1402
|
p,
|
|
1402
|
-
|
|
1403
|
-
|
|
1403
|
+
L,
|
|
1404
|
+
$,
|
|
1404
1405
|
u,
|
|
1405
1406
|
h
|
|
1406
|
-
),
|
|
1407
|
-
top:
|
|
1408
|
-
right:
|
|
1409
|
-
bottom:
|
|
1410
|
-
left:
|
|
1407
|
+
), R = d(() => ({
|
|
1408
|
+
top: Ir(h.value.margins),
|
|
1409
|
+
right: wr(h.value.margins),
|
|
1410
|
+
bottom: Er(h.value.margins, m.value),
|
|
1411
|
+
left: Nr(h.value.margins, g.value)
|
|
1411
1412
|
})), S = d(() => {
|
|
1412
1413
|
var A;
|
|
1413
|
-
return r.xScale ? Ye(r.xScale) ? r.xScale : (A = r.xScale) == null ? void 0 : A.call(r, p.value, o.value,
|
|
1414
|
-
}),
|
|
1414
|
+
return r.xScale ? Ye(r.xScale) ? r.xScale : (A = r.xScale) == null ? void 0 : A.call(r, p.value, o.value, $) : N.value;
|
|
1415
|
+
}), P = d(() => {
|
|
1415
1416
|
var A;
|
|
1416
|
-
return r.yScale ? Ye(r.yScale) ? r.yScale : (A = r.yScale) == null ? void 0 : A.call(r, p.value, o.value,
|
|
1417
|
+
return r.yScale ? Ye(r.yScale) ? r.yScale : (A = r.yScale) == null ? void 0 : A.call(r, p.value, o.value, $) : D.value;
|
|
1417
1418
|
}), te = d(() => ({
|
|
1418
1419
|
...h.value.xAxisOptions,
|
|
1419
|
-
withHover: u.value ===
|
|
1420
|
+
withHover: u.value === O.VERTICAL
|
|
1420
1421
|
})), ne = d(() => ({
|
|
1421
1422
|
...h.value.yAxisOptions,
|
|
1422
|
-
withHover: u.value ===
|
|
1423
|
-
})),
|
|
1423
|
+
withHover: u.value === O.HORIZONTAL
|
|
1424
|
+
})), G = d(() => {
|
|
1424
1425
|
var A;
|
|
1425
1426
|
return (A = h.value.xAxisOptions) == null ? void 0 : A.title;
|
|
1426
|
-
}),
|
|
1427
|
+
}), U = d(() => {
|
|
1427
1428
|
var A;
|
|
1428
1429
|
return (A = h.value.yAxisOptions) == null ? void 0 : A.title;
|
|
1429
1430
|
}), _ = d(() => {
|
|
1430
1431
|
var A;
|
|
1431
|
-
return ((A = h.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 &&
|
|
1432
|
+
return ((A = h.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 && G.value;
|
|
1432
1433
|
}), b = d(() => {
|
|
1433
1434
|
var A;
|
|
1434
|
-
return ((A = h.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 &&
|
|
1435
|
-
}),
|
|
1435
|
+
return ((A = h.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 && U.value;
|
|
1436
|
+
}), x = d(
|
|
1436
1437
|
() => a.value.every((A) => !A.values.length)
|
|
1437
|
-
),
|
|
1438
|
-
const A = [], { noBaseScales:
|
|
1439
|
-
return
|
|
1440
|
-
}), { hasNegativeValues:
|
|
1441
|
-
|
|
1438
|
+
), B = d(() => {
|
|
1439
|
+
const A = [], { noBaseScales: F } = h.value;
|
|
1440
|
+
return F || A.push(() => !!(S.value && P.value)), A.every((Y) => Y() === !0);
|
|
1441
|
+
}), { hasNegativeValues: M } = Ar(p), { negativeBarAttributes: z } = Tr(
|
|
1442
|
+
$,
|
|
1442
1443
|
S,
|
|
1443
|
-
|
|
1444
|
+
P,
|
|
1444
1445
|
u
|
|
1445
|
-
), { shouldGenerateTooltipAnchors: ge } =
|
|
1446
|
+
), { shouldGenerateTooltipAnchors: ge } = yt(
|
|
1446
1447
|
y,
|
|
1447
1448
|
h,
|
|
1448
1449
|
S,
|
|
1449
|
-
|
|
1450
|
+
P,
|
|
1450
1451
|
u,
|
|
1451
1452
|
p,
|
|
1452
1453
|
s
|
|
1453
|
-
), { tooltipConfig: ye, showTooltip:
|
|
1454
|
+
), { tooltipConfig: ye, showTooltip: le, hideTooltip: Me } = Or(), { getTooltipItems: Lt } = $r(p), Ot = d(
|
|
1454
1455
|
() => h.value.withTooltip !== !1 && ye.opened
|
|
1455
|
-
),
|
|
1456
|
+
), $t = d(
|
|
1456
1457
|
() => {
|
|
1457
1458
|
var A;
|
|
1458
1459
|
return ((A = h.value.tooltipOptions) == null ? void 0 : A.position) || "top";
|
|
1459
1460
|
}
|
|
1460
1461
|
);
|
|
1461
1462
|
function be(A) {
|
|
1462
|
-
var
|
|
1463
|
+
var F;
|
|
1463
1464
|
if (A !== c.value && (h.value.withHover !== !1 && (c.value = A), h.value.withTooltip !== !1)) {
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1465
|
+
const Y = (F = h.value.tooltipOptions) != null && F.targetElement ? h.value.tooltipOptions.targetElement === "self" ? f.value.$el : h.value.tooltipOptions.targetElement : v.value[A];
|
|
1466
|
+
le(Y);
|
|
1466
1467
|
}
|
|
1467
1468
|
}
|
|
1468
1469
|
function ke(A) {
|
|
1469
1470
|
if (A > a.value[0].values.length - 1) {
|
|
1470
|
-
|
|
1471
|
+
J(Z.InvalidHoveredIndex);
|
|
1471
1472
|
return;
|
|
1472
1473
|
}
|
|
1473
1474
|
be(A);
|
|
1474
1475
|
}
|
|
1475
|
-
function
|
|
1476
|
+
function It() {
|
|
1476
1477
|
Me(), c.value = -1, e("chart-mouseleave");
|
|
1477
1478
|
}
|
|
1478
|
-
function
|
|
1479
|
-
A !== null && be(A), e("axis-mouseenter", { index: A, value:
|
|
1479
|
+
function wt({ index: A, value: F, event: Y }) {
|
|
1480
|
+
A !== null && be(A), e("axis-mouseenter", { index: A, value: F, event: Y });
|
|
1480
1481
|
}
|
|
1481
|
-
function
|
|
1482
|
-
e("axis-click", { index: A, value:
|
|
1482
|
+
function Et({ index: A, value: F, event: Y }) {
|
|
1483
|
+
e("axis-click", { index: A, value: F, event: Y });
|
|
1483
1484
|
}
|
|
1484
|
-
return
|
|
1485
|
+
return C(
|
|
1485
1486
|
a,
|
|
1486
|
-
(A,
|
|
1487
|
-
),
|
|
1487
|
+
(A, F) => e("data-changed", { newValue: A, oldValue: F })
|
|
1488
|
+
), C(
|
|
1488
1489
|
o,
|
|
1489
|
-
(A,
|
|
1490
|
-
),
|
|
1490
|
+
(A, F) => e("labels-changed", { newValue: A, oldValue: F })
|
|
1491
|
+
), C(x, (A) => A && J(Z.Empty), { immediate: !0 }), C(() => r.hoveredIndex, ke), C(
|
|
1491
1492
|
y,
|
|
1492
1493
|
(A) => {
|
|
1493
1494
|
A && r.hoveredIndex != null && c.value === -1 && ke(r.hoveredIndex);
|
|
1494
1495
|
},
|
|
1495
1496
|
{ flush: "post" }
|
|
1496
|
-
),
|
|
1497
|
+
), X(() => {
|
|
1497
1498
|
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.');
|
|
1498
|
-
}), Ae("chartID", k), Ae("isEmpty",
|
|
1499
|
+
}), Ae("chartID", k), Ae("isEmpty", x), Ae("tooltipAnchorAttributes", y), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: c, tooltipAnchor: v, chartContainer: f, tooltipAnchorAttributes: y, xAxisHeight: m, yAxisWidth: g, allOptions: h, internalData: p, computedLabels: L, containerSize: $, updateSize: T, chartID: k, xScale: N, yScale: D, computedMargins: R, computedXScale: S, computedYScale: P, computedXAxisOptions: te, computedYAxisOptions: ne, xAxisTitle: G, yAxisTitle: U, showXAxisTitle: _, showYAxisTitle: b, isEmpty: x, isReady: B, hasNegativeValues: M, negativeBarAttributes: z, shouldGenerateTooltipAnchors: ge, tooltipConfig: ye, showTooltip: le, hideTooltip: Me, getTooltipItems: Lt, isTooltipOpened: Ot, tooltipPosition: $t, handleInternalHover: be, handleExternalHover: ke, handleMouseleave: It, handleAxisMouseenter: wt, handleAxisClick: Et, LumeAxis: bn, LumeBar: Pe, LumeChartContainer: Cn, LumeChartLegend: Bn, LumeTooltip: rr, LumeOverlayGroup: kr, TOOLTIP_ANCHOR_RADIUS: ln };
|
|
1499
1500
|
}
|
|
1500
1501
|
});
|
|
1501
|
-
var
|
|
1502
|
+
var Dr = function() {
|
|
1502
1503
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1503
1504
|
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, click: function(a) {
|
|
1504
1505
|
return n.emit("chart-click", a);
|
|
@@ -1551,9 +1552,9 @@ var Rr = function() {
|
|
|
1551
1552
|
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
|
|
1552
1553
|
return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
|
|
1553
1554
|
}), 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);
|
|
1554
|
-
}, Hr = [],
|
|
1555
|
+
}, Hr = [], Rr = /* @__PURE__ */ w(
|
|
1555
1556
|
Cr,
|
|
1556
|
-
|
|
1557
|
+
Dr,
|
|
1557
1558
|
Hr,
|
|
1558
1559
|
!1,
|
|
1559
1560
|
null,
|
|
@@ -1561,7 +1562,7 @@ var Rr = function() {
|
|
|
1561
1562
|
null,
|
|
1562
1563
|
null
|
|
1563
1564
|
);
|
|
1564
|
-
const
|
|
1565
|
+
const oe = Rr.exports, Sr = /* @__PURE__ */ E({
|
|
1565
1566
|
__name: "lume-alluvial-node-label",
|
|
1566
1567
|
props: {
|
|
1567
1568
|
bottom: { type: Boolean, default: !1 }
|
|
@@ -1570,20 +1571,20 @@ const le = Sr.exports, Br = /* @__PURE__ */ E({
|
|
|
1570
1571
|
return { __sfc: !0 };
|
|
1571
1572
|
}
|
|
1572
1573
|
});
|
|
1573
|
-
var
|
|
1574
|
+
var Br = function() {
|
|
1574
1575
|
var e = this, r = e._self._c;
|
|
1575
1576
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1576
|
-
},
|
|
1577
|
+
}, Fr = [], Pr = /* @__PURE__ */ w(
|
|
1578
|
+
Sr,
|
|
1577
1579
|
Br,
|
|
1578
1580
|
Fr,
|
|
1579
|
-
Pr,
|
|
1580
1581
|
!1,
|
|
1581
1582
|
null,
|
|
1582
1583
|
"d2a7cb8e",
|
|
1583
1584
|
null,
|
|
1584
1585
|
null
|
|
1585
1586
|
);
|
|
1586
|
-
const
|
|
1587
|
+
const Gr = Pr.exports, Vr = /* @__PURE__ */ E({
|
|
1587
1588
|
__name: "lume-alluvial-node-value",
|
|
1588
1589
|
props: {
|
|
1589
1590
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1592,20 +1593,20 @@ const Vr = Gr.exports, jr = /* @__PURE__ */ E({
|
|
|
1592
1593
|
return { __sfc: !0 };
|
|
1593
1594
|
}
|
|
1594
1595
|
});
|
|
1595
|
-
var
|
|
1596
|
+
var jr = function() {
|
|
1596
1597
|
var e = this, r = e._self._c;
|
|
1597
1598
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1598
|
-
},
|
|
1599
|
+
}, Mr = [], zr = /* @__PURE__ */ w(
|
|
1600
|
+
Vr,
|
|
1599
1601
|
jr,
|
|
1600
1602
|
Mr,
|
|
1601
|
-
zr,
|
|
1602
1603
|
!1,
|
|
1603
1604
|
null,
|
|
1604
1605
|
"002e2887",
|
|
1605
1606
|
null,
|
|
1606
1607
|
null
|
|
1607
1608
|
);
|
|
1608
|
-
const
|
|
1609
|
+
const Wr = zr.exports;
|
|
1609
1610
|
function Qe(t, e) {
|
|
1610
1611
|
return {
|
|
1611
1612
|
x0: 0 + (e ? e.left : 0),
|
|
@@ -1614,35 +1615,32 @@ function Qe(t, e) {
|
|
|
1614
1615
|
y1: t.height - (e ? e.bottom : 0)
|
|
1615
1616
|
};
|
|
1616
1617
|
}
|
|
1617
|
-
function
|
|
1618
|
+
function Zr(t) {
|
|
1618
1619
|
const e = I(Qe(t));
|
|
1619
1620
|
function r(n) {
|
|
1620
1621
|
e.value = Qe(t, n);
|
|
1621
1622
|
}
|
|
1622
1623
|
return { extents: e, updateExtents: r };
|
|
1623
1624
|
}
|
|
1624
|
-
var
|
|
1625
|
-
const
|
|
1626
|
-
function
|
|
1627
|
-
r && it() || console.error(
|
|
1625
|
+
var bt = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(bt || {});
|
|
1626
|
+
const Xr = "[lume] ";
|
|
1627
|
+
function Ur(t, e, r = !0) {
|
|
1628
|
+
r && it() || console.error(Xr + "Error: " + t, e);
|
|
1628
1629
|
}
|
|
1629
|
-
const qe = 8,
|
|
1630
|
-
function
|
|
1630
|
+
const qe = 8, Yr = 8, Kr = 20, Jr = 200;
|
|
1631
|
+
function re(t) {
|
|
1631
1632
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1632
1633
|
}
|
|
1633
|
-
function
|
|
1634
|
-
return t.source.id + ":" + t.target.id;
|
|
1635
|
-
}
|
|
1636
|
-
function qr(t, e) {
|
|
1634
|
+
function Qr(t, e) {
|
|
1637
1635
|
return e.nodes.find((r) => r.id === t);
|
|
1638
1636
|
}
|
|
1639
|
-
function
|
|
1640
|
-
return e.links.find((r) =>
|
|
1637
|
+
function qr(t, e) {
|
|
1638
|
+
return e.links.find((r) => r.id === t);
|
|
1641
1639
|
}
|
|
1642
|
-
function
|
|
1640
|
+
function kt(t) {
|
|
1643
1641
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1644
1642
|
}
|
|
1645
|
-
function
|
|
1643
|
+
function ea(t, e) {
|
|
1646
1644
|
if (!e)
|
|
1647
1645
|
return;
|
|
1648
1646
|
const r = t.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), n = t.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = e.filter((l) => r.includes(l.dataset.id)).reduce(
|
|
@@ -1659,7 +1657,7 @@ function ta(t, e) {
|
|
|
1659
1657
|
bottom: 0
|
|
1660
1658
|
};
|
|
1661
1659
|
}
|
|
1662
|
-
function
|
|
1660
|
+
function ta(t) {
|
|
1663
1661
|
return t.map((e) => ({
|
|
1664
1662
|
x: e.x0,
|
|
1665
1663
|
y: e.y0,
|
|
@@ -1672,22 +1670,22 @@ function na(t) {
|
|
|
1672
1670
|
node: e
|
|
1673
1671
|
}));
|
|
1674
1672
|
}
|
|
1675
|
-
function
|
|
1673
|
+
function na(t) {
|
|
1676
1674
|
return [t.source.x1, t.y0];
|
|
1677
1675
|
}
|
|
1678
|
-
function
|
|
1676
|
+
function ra(t) {
|
|
1679
1677
|
return [t.target.x0, t.y1];
|
|
1680
1678
|
}
|
|
1681
|
-
function
|
|
1682
|
-
return t.curveFunction ?
|
|
1679
|
+
function aa(t) {
|
|
1680
|
+
return t.curveFunction ? Dt(t.curveFunction).source(na).target(ra) : Bt();
|
|
1683
1681
|
}
|
|
1684
|
-
function
|
|
1682
|
+
function oa(t) {
|
|
1685
1683
|
return t.map((e) => {
|
|
1686
1684
|
var r;
|
|
1687
1685
|
return {
|
|
1688
|
-
id:
|
|
1686
|
+
id: e.id,
|
|
1689
1687
|
color: e.color || ((r = e.source) == null ? void 0 : r.color) || de,
|
|
1690
|
-
d:
|
|
1688
|
+
d: aa(e)(e),
|
|
1691
1689
|
strokeWidth: Math.max(1, e.width),
|
|
1692
1690
|
link: e
|
|
1693
1691
|
};
|
|
@@ -1701,8 +1699,8 @@ function et(t, e, r, n, a) {
|
|
|
1701
1699
|
};
|
|
1702
1700
|
return;
|
|
1703
1701
|
}
|
|
1704
|
-
const o = Date.now(), l =
|
|
1705
|
-
let s = (Date.now() - o) /
|
|
1702
|
+
const o = Date.now(), l = Qt(e, r), i = () => {
|
|
1703
|
+
let s = (Date.now() - o) / Jr;
|
|
1706
1704
|
s > 1 && (s = 1), t.node = {
|
|
1707
1705
|
...t.node,
|
|
1708
1706
|
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
@@ -1710,11 +1708,11 @@ function et(t, e, r, n, a) {
|
|
|
1710
1708
|
};
|
|
1711
1709
|
requestAnimationFrame(i);
|
|
1712
1710
|
}
|
|
1713
|
-
const
|
|
1711
|
+
const la = {
|
|
1714
1712
|
nodes: [],
|
|
1715
1713
|
links: []
|
|
1716
1714
|
};
|
|
1717
|
-
function
|
|
1715
|
+
function ua(t, e, r) {
|
|
1718
1716
|
const n = I(null), a = d(() => {
|
|
1719
1717
|
var i;
|
|
1720
1718
|
return (i = t.value) == null ? void 0 : i[0].values.map(
|
|
@@ -1726,24 +1724,27 @@ function ia(t, e, r) {
|
|
|
1726
1724
|
deriveColorFromIncomingLinks: v
|
|
1727
1725
|
})
|
|
1728
1726
|
);
|
|
1729
|
-
}), o = d(
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
(
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
(
|
|
1736
|
-
color: f,
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1727
|
+
}), o = d(
|
|
1728
|
+
() => {
|
|
1729
|
+
var i;
|
|
1730
|
+
return (i = t.value) == null ? void 0 : i[0].values.map(
|
|
1731
|
+
(u) => {
|
|
1732
|
+
var s;
|
|
1733
|
+
return (s = u.targets) == null ? void 0 : s.map(
|
|
1734
|
+
({ node: c, value: v, color: f, curveFunction: y }) => ({
|
|
1735
|
+
id: `${u.value}:${c}`,
|
|
1736
|
+
color: f,
|
|
1737
|
+
curveFunction: y,
|
|
1738
|
+
source: u.value ?? u.label,
|
|
1739
|
+
target: c,
|
|
1740
|
+
value: v
|
|
1741
|
+
})
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1744
|
+
).filter(Boolean).flat();
|
|
1745
|
+
}
|
|
1746
|
+
), l = d(() => Ft().nodeId(re).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations));
|
|
1747
|
+
return C([l, r], () => {
|
|
1747
1748
|
try {
|
|
1748
1749
|
const { x0: i, y0: u, x1: s, y1: c } = r.value;
|
|
1749
1750
|
n.value = l.value.extent([
|
|
@@ -1751,62 +1752,68 @@ function ia(t, e, r) {
|
|
|
1751
1752
|
[s, c]
|
|
1752
1753
|
])({ nodes: a.value, links: o.value });
|
|
1753
1754
|
} catch (i) {
|
|
1754
|
-
|
|
1755
|
+
Ur(bt.GraphProblem, i), n.value = la;
|
|
1755
1756
|
}
|
|
1756
1757
|
}), { graph: n };
|
|
1757
1758
|
}
|
|
1758
|
-
function
|
|
1759
|
+
function De(t, e) {
|
|
1759
1760
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1760
|
-
e[r.id] = n,
|
|
1761
|
+
e[r.id] = n, De(
|
|
1762
|
+
r,
|
|
1763
|
+
e
|
|
1764
|
+
);
|
|
1761
1765
|
}), e;
|
|
1762
1766
|
}
|
|
1763
|
-
function
|
|
1767
|
+
function He(t, e) {
|
|
1764
1768
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1765
|
-
e[r.id] = n,
|
|
1769
|
+
e[r.id] = n, He(
|
|
1770
|
+
r,
|
|
1771
|
+
e
|
|
1772
|
+
);
|
|
1766
1773
|
}), e;
|
|
1767
1774
|
}
|
|
1768
|
-
function
|
|
1769
|
-
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(
|
|
1775
|
+
function ia(t, e) {
|
|
1776
|
+
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
1770
1777
|
}
|
|
1771
|
-
const
|
|
1778
|
+
const sa = (t, e) => {
|
|
1772
1779
|
let r;
|
|
1773
|
-
|
|
1780
|
+
kt(t) ? r = {
|
|
1774
1781
|
[t.id]: t.value,
|
|
1775
|
-
...
|
|
1776
|
-
...
|
|
1782
|
+
...De(t),
|
|
1783
|
+
...He(t)
|
|
1777
1784
|
} : r = {
|
|
1778
1785
|
[t.source.id]: t.source.value,
|
|
1779
1786
|
[t.target.id]: t.target.value,
|
|
1780
|
-
...
|
|
1781
|
-
...
|
|
1787
|
+
...De(t.source),
|
|
1788
|
+
...He(t.target)
|
|
1782
1789
|
};
|
|
1783
|
-
const n =
|
|
1790
|
+
const n = ia(r, e);
|
|
1784
1791
|
return { nodes: r, links: n };
|
|
1785
|
-
},
|
|
1786
|
-
if (
|
|
1792
|
+
}, ca = (t) => {
|
|
1793
|
+
if (kt(t)) {
|
|
1787
1794
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1788
1795
|
return {
|
|
1789
1796
|
nodes: e.reduce(
|
|
1790
|
-
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [
|
|
1791
|
-
{ [
|
|
1797
|
+
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [re(a)]: o } : { ...r, [re(n)]: o },
|
|
1798
|
+
{ [re(t)]: t.value }
|
|
1792
1799
|
),
|
|
1793
|
-
links: e.map((r) =>
|
|
1800
|
+
links: e.map(({ id: r }) => r)
|
|
1794
1801
|
};
|
|
1795
1802
|
}
|
|
1796
1803
|
return {
|
|
1797
1804
|
nodes: {
|
|
1798
|
-
[
|
|
1799
|
-
[
|
|
1805
|
+
[re(t.target)]: t.value,
|
|
1806
|
+
[re(t.source)]: t.source.value
|
|
1800
1807
|
},
|
|
1801
|
-
links: [
|
|
1808
|
+
links: [t.id]
|
|
1802
1809
|
};
|
|
1803
1810
|
};
|
|
1804
|
-
function
|
|
1811
|
+
function da(t, e, r) {
|
|
1805
1812
|
const n = I(null), a = d(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1806
1813
|
n.value,
|
|
1807
1814
|
r.value
|
|
1808
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1809
|
-
return
|
|
1815
|
+
) : e.value.highlightedElements === "closest" ? ca(n.value, r.value) : sa(n.value, r.value) : { nodes: {}, links: [] });
|
|
1816
|
+
return C(a, (o, l) => {
|
|
1810
1817
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1811
1818
|
t.value.forEach((i) => {
|
|
1812
1819
|
i.node.id in l.nodes && et(
|
|
@@ -1829,7 +1836,7 @@ function va(t, e, r) {
|
|
|
1829
1836
|
});
|
|
1830
1837
|
}), { highlightedElements: a, hoveredElement: n };
|
|
1831
1838
|
}
|
|
1832
|
-
const
|
|
1839
|
+
const va = /* @__PURE__ */ E({
|
|
1833
1840
|
__name: "lume-alluvial-group",
|
|
1834
1841
|
props: {
|
|
1835
1842
|
...he(),
|
|
@@ -1840,7 +1847,7 @@ const _a = /* @__PURE__ */ E({
|
|
|
1840
1847
|
},
|
|
1841
1848
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1842
1849
|
setup(t, { emit: e }) {
|
|
1843
|
-
const r = t, n = fe("chartID"), { data: a, options: o } =
|
|
1850
|
+
const r = t, n = fe("chartID"), { data: a, options: o } = H(r), l = I([]), i = I([]), u = I(null), { extents: s, updateExtents: c } = Zr(r.containerSize), { graph: v } = ua(a, o, s), { hoveredElement: f, highlightedElements: y } = da(
|
|
1844
1851
|
l,
|
|
1845
1852
|
o,
|
|
1846
1853
|
v
|
|
@@ -1848,8 +1855,8 @@ const _a = /* @__PURE__ */ E({
|
|
|
1848
1855
|
() => Object.keys(y.value.nodes)
|
|
1849
1856
|
), h = d(
|
|
1850
1857
|
() => l.value.reduce((_, b) => {
|
|
1851
|
-
const
|
|
1852
|
-
return _.includes(
|
|
1858
|
+
const x = b.x + o.value.nodeWidth / 2;
|
|
1859
|
+
return _.includes(x) ? _ : [..._, x];
|
|
1853
1860
|
}, []).sort((_, b) => _ - b)
|
|
1854
1861
|
// Make sure positions are sorted in ascending order
|
|
1855
1862
|
), p = d(() => {
|
|
@@ -1858,54 +1865,57 @@ const _a = /* @__PURE__ */ E({
|
|
|
1858
1865
|
label: _,
|
|
1859
1866
|
x: h.value[b]
|
|
1860
1867
|
}));
|
|
1861
|
-
}),
|
|
1862
|
-
() => o.value.nodeHeaderPadding ??
|
|
1863
|
-
),
|
|
1868
|
+
}), L = d(
|
|
1869
|
+
() => o.value.nodeHeaderPadding ?? Kr
|
|
1870
|
+
), $ = d(() => {
|
|
1864
1871
|
if (!(!o.value.gradient || !v.value))
|
|
1865
|
-
return v.value.links.reduce((_, b) =>
|
|
1866
|
-
source: b.
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1872
|
+
return v.value.links.reduce((_, b) => {
|
|
1873
|
+
const { source: x, target: B } = b, M = x.color || x.fallbackColor, z = B.deriveColorFromIncomingLinks ? M : B.color || B.fallbackColor;
|
|
1874
|
+
return _[b.id] = {
|
|
1875
|
+
source: M,
|
|
1876
|
+
target: z,
|
|
1877
|
+
x1: x.x1,
|
|
1878
|
+
x2: B.x0
|
|
1879
|
+
}, _;
|
|
1880
|
+
}, {});
|
|
1871
1881
|
}), T = d(() => {
|
|
1872
1882
|
const _ = l.value.filter(
|
|
1873
|
-
(
|
|
1883
|
+
(x) => P(x)
|
|
1874
1884
|
), b = [];
|
|
1875
|
-
return _.forEach((
|
|
1876
|
-
const
|
|
1877
|
-
i.value.filter(({ link:
|
|
1878
|
-
const ge =
|
|
1879
|
-
return
|
|
1880
|
-
x:
|
|
1881
|
-
y:
|
|
1882
|
-
height:
|
|
1883
|
-
width:
|
|
1884
|
-
key: `node-block-${
|
|
1885
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
1886
|
-
}),
|
|
1885
|
+
return _.forEach((x) => {
|
|
1886
|
+
const B = [];
|
|
1887
|
+
i.value.filter(({ link: M }) => M.target.id === x.node.id).reverse().reduce((M, z) => {
|
|
1888
|
+
const ge = z.link.target.y1 - z.link.target.y0, le = z.link.value / x.node.value * ge;
|
|
1889
|
+
return B.push({
|
|
1890
|
+
x: x.x,
|
|
1891
|
+
y: x.y + M,
|
|
1892
|
+
height: le,
|
|
1893
|
+
width: x.width,
|
|
1894
|
+
key: `node-block-${x.node.id}-source-link-${z.link.source.id}`,
|
|
1895
|
+
class: `lume-alluvial-group__node-block lume-fill--${z.link.source.color || de}`
|
|
1896
|
+
}), M + le;
|
|
1887
1897
|
}, 0), b.push({
|
|
1888
|
-
id:
|
|
1889
|
-
subNodes:
|
|
1898
|
+
id: x.node.id,
|
|
1899
|
+
subNodes: B
|
|
1890
1900
|
});
|
|
1891
1901
|
}), b;
|
|
1892
1902
|
});
|
|
1893
1903
|
function k(_) {
|
|
1894
|
-
return o.value.gradient && `url('#${n}_${
|
|
1904
|
+
return o.value.gradient && `url('#${n}_${_.id}')`;
|
|
1895
1905
|
}
|
|
1896
1906
|
function N(_) {
|
|
1897
1907
|
return g.value.length > 0 && !g.value.includes(_.toString());
|
|
1898
1908
|
}
|
|
1899
|
-
function
|
|
1909
|
+
function D(_) {
|
|
1900
1910
|
return g.value.length > 0 && g.value.includes(_.toString());
|
|
1901
1911
|
}
|
|
1902
|
-
function
|
|
1912
|
+
function R(_) {
|
|
1903
1913
|
return y.value.links.length > 0 && !y.value.links.includes(_);
|
|
1904
1914
|
}
|
|
1905
1915
|
function S(_) {
|
|
1906
1916
|
return y.value.links.length > 0 && y.value.links.includes(_);
|
|
1907
1917
|
}
|
|
1908
|
-
function
|
|
1918
|
+
function P(_) {
|
|
1909
1919
|
return !_.node.color && _.node.deriveColorFromIncomingLinks;
|
|
1910
1920
|
}
|
|
1911
1921
|
function te(_, b) {
|
|
@@ -1915,33 +1925,33 @@ const _a = /* @__PURE__ */ E({
|
|
|
1915
1925
|
const b = f.value;
|
|
1916
1926
|
f.value = null, e("link-mouseleave", { link: b, event: _ });
|
|
1917
1927
|
}
|
|
1918
|
-
function
|
|
1928
|
+
function G(_) {
|
|
1919
1929
|
if (_ == null) {
|
|
1920
1930
|
f.value = null;
|
|
1921
1931
|
return;
|
|
1922
1932
|
}
|
|
1923
|
-
const b =
|
|
1933
|
+
const b = Qr(_, v.value) || qr(_, v.value);
|
|
1924
1934
|
if (!b) {
|
|
1925
|
-
|
|
1935
|
+
J(Z.InvalidHoveredElement);
|
|
1926
1936
|
return;
|
|
1927
1937
|
}
|
|
1928
1938
|
f.value = b;
|
|
1929
1939
|
}
|
|
1930
|
-
function
|
|
1940
|
+
function U(_) {
|
|
1931
1941
|
var b;
|
|
1932
|
-
return ((b = T.value.find(({ id:
|
|
1942
|
+
return ((b = T.value.find(({ id: x }) => _ === x)) == null ? void 0 : b.subNodes) ?? [];
|
|
1933
1943
|
}
|
|
1934
|
-
return
|
|
1935
|
-
l.value =
|
|
1936
|
-
}),
|
|
1944
|
+
return C(v, (_) => {
|
|
1945
|
+
l.value = ta(_.nodes), i.value = oa(_.links).reverse(), f.value == null && r.hoveredElementId != null && G(r.hoveredElementId);
|
|
1946
|
+
}), C([r.containerSize, u], () => {
|
|
1937
1947
|
if (r.containerSize.width && r.containerSize.height) {
|
|
1938
|
-
const _ =
|
|
1948
|
+
const _ = ea(v.value, u.value);
|
|
1939
1949
|
c(_);
|
|
1940
1950
|
}
|
|
1941
|
-
}),
|
|
1951
|
+
}), C(() => r.hoveredElementId, G), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: s, updateExtents: c, graph: v, hoveredElement: f, highlightedElements: y, formatValue: m, hoveredNodeIds: g, nodeColumnPositions: h, nodeHeaders: p, computedNodeHeaderPadding: L, gradients: $, nodesDerivingColorFromIncomingLinks: T, getLinkStroke: k, isNodeFaded: N, isNodeFocused: D, isLinkFaded: R, isLinkFocused: S, shouldDeriveNodeColorFromIncomingLinks: P, handleLinkMouseover: te, handleLinkMouseleave: ne, handleExternalHover: G, getSubNodesDerivingColorFromIncomingLinks: U, LumeAlluvialNodeLabel: Gr, LumeAlluvialNodeValue: Wr, GHOST_STROKE_WIDTH_OFFSET: Yr };
|
|
1942
1952
|
}
|
|
1943
1953
|
});
|
|
1944
|
-
var
|
|
1954
|
+
var _a = function() {
|
|
1945
1955
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1946
1956
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(a) {
|
|
1947
1957
|
return r("text", { key: `header_${a.x}`, staticClass: "lume-alluvial-group__node-header lume-typography--caption", attrs: { x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")]);
|
|
@@ -1993,17 +2003,17 @@ var fa = function() {
|
|
|
1993
2003
|
a.node.value
|
|
1994
2004
|
) })], 2)], 2)]);
|
|
1995
2005
|
})], 2);
|
|
1996
|
-
},
|
|
2006
|
+
}, fa = [], pa = /* @__PURE__ */ w(
|
|
2007
|
+
va,
|
|
1997
2008
|
_a,
|
|
1998
2009
|
fa,
|
|
1999
|
-
pa,
|
|
2000
2010
|
!1,
|
|
2001
2011
|
null,
|
|
2002
|
-
"
|
|
2012
|
+
"1b46bc35",
|
|
2003
2013
|
null,
|
|
2004
2014
|
null
|
|
2005
2015
|
);
|
|
2006
|
-
const
|
|
2016
|
+
const ma = pa.exports, ha = {
|
|
2007
2017
|
margins: {
|
|
2008
2018
|
top: 0,
|
|
2009
2019
|
right: 0,
|
|
@@ -2019,15 +2029,16 @@ const ha = ma.exports, ga = {
|
|
|
2019
2029
|
highlightedElements: "closest",
|
|
2020
2030
|
nodePadding: 16,
|
|
2021
2031
|
nodeWidth: 16,
|
|
2022
|
-
nodeAlign:
|
|
2023
|
-
valueFormat: (t) => String(t)
|
|
2024
|
-
|
|
2032
|
+
nodeAlign: Pt,
|
|
2033
|
+
valueFormat: (t) => String(t),
|
|
2034
|
+
iterations: 6
|
|
2035
|
+
}, ga = /* @__PURE__ */ E({
|
|
2025
2036
|
__name: "lume-alluvial-diagram",
|
|
2026
2037
|
props: {
|
|
2027
|
-
...
|
|
2038
|
+
...mr(Se)
|
|
2028
2039
|
},
|
|
2029
2040
|
setup(t) {
|
|
2030
|
-
const e = t, r = ee(
|
|
2041
|
+
const e = t, r = ee(V()), n = en(V()), { options: a } = H(e), { allOptions: o } = W(a, ha);
|
|
2031
2042
|
function l(i) {
|
|
2032
2043
|
return {
|
|
2033
2044
|
...i,
|
|
@@ -2035,10 +2046,10 @@ const ha = ma.exports, ga = {
|
|
|
2035
2046
|
// Alluvial chart never uses base scales
|
|
2036
2047
|
};
|
|
2037
2048
|
}
|
|
2038
|
-
return { __sfc: !0, props: e, slots: r, groupSlots: n, options: a, allOptions: o, getAlluvialDiagramOptions: l, LumeChart:
|
|
2049
|
+
return { __sfc: !0, props: e, slots: r, groupSlots: n, options: a, allOptions: o, getAlluvialDiagramOptions: l, LumeChart: oe, LumeAlluvialGroup: ma };
|
|
2039
2050
|
}
|
|
2040
2051
|
});
|
|
2041
|
-
var
|
|
2052
|
+
var ya = function() {
|
|
2042
2053
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2043
2054
|
return r(n.LumeChart, e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2044
2055
|
return [r(n.LumeAlluvialGroup, e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
@@ -2051,26 +2062,26 @@ var ba = function() {
|
|
|
2051
2062
|
return [e._t(o, null, null, l || {})];
|
|
2052
2063
|
} };
|
|
2053
2064
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2054
|
-
},
|
|
2065
|
+
}, ba = [], ka = /* @__PURE__ */ w(
|
|
2066
|
+
ga,
|
|
2055
2067
|
ya,
|
|
2056
2068
|
ba,
|
|
2057
|
-
ka,
|
|
2058
2069
|
!1,
|
|
2059
2070
|
null,
|
|
2060
2071
|
null,
|
|
2061
2072
|
null,
|
|
2062
2073
|
null
|
|
2063
2074
|
);
|
|
2064
|
-
const
|
|
2065
|
-
var
|
|
2066
|
-
const
|
|
2075
|
+
const Do = ka.exports;
|
|
2076
|
+
var Re = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Re || {});
|
|
2077
|
+
const Aa = /* @__PURE__ */ E({
|
|
2067
2078
|
__name: "lume-bar-chart",
|
|
2068
2079
|
props: {
|
|
2069
|
-
...
|
|
2080
|
+
...ae(),
|
|
2070
2081
|
type: {
|
|
2071
2082
|
type: String,
|
|
2072
2083
|
default: null,
|
|
2073
|
-
validator: (t) => t in
|
|
2084
|
+
validator: (t) => t in Re || t == null
|
|
2074
2085
|
}
|
|
2075
2086
|
},
|
|
2076
2087
|
setup(t) {
|
|
@@ -2084,7 +2095,7 @@ const Ta = /* @__PURE__ */ E({
|
|
|
2084
2095
|
["single", r],
|
|
2085
2096
|
["grouped", n],
|
|
2086
2097
|
["stacked", a]
|
|
2087
|
-
]), l = ee(
|
|
2098
|
+
]), l = ee(V());
|
|
2088
2099
|
function i(s) {
|
|
2089
2100
|
return {
|
|
2090
2101
|
...s,
|
|
@@ -2092,7 +2103,7 @@ const Ta = /* @__PURE__ */ E({
|
|
|
2092
2103
|
// Bar chart always starts on zero,
|
|
2093
2104
|
tooltipOptions: {
|
|
2094
2105
|
...(s == null ? void 0 : s.tooltipOptions) || {},
|
|
2095
|
-
position: e.orientation ===
|
|
2106
|
+
position: e.orientation === O.HORIZONTAL && "right"
|
|
2096
2107
|
}
|
|
2097
2108
|
};
|
|
2098
2109
|
}
|
|
@@ -2105,48 +2116,48 @@ const Ta = /* @__PURE__ */ E({
|
|
|
2105
2116
|
return o.get(e.type);
|
|
2106
2117
|
}
|
|
2107
2118
|
});
|
|
2108
|
-
return { __sfc: !0, TYPES:
|
|
2119
|
+
return { __sfc: !0, TYPES: Re, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: e, slots: l, getBarChartOptions: i, component: u };
|
|
2109
2120
|
}
|
|
2110
2121
|
});
|
|
2111
|
-
var
|
|
2122
|
+
var Ta = function() {
|
|
2112
2123
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2113
2124
|
return r(n.component, e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2114
2125
|
return { key: o, fn: function(l) {
|
|
2115
2126
|
return [e._t(o, null, null, l || {})];
|
|
2116
2127
|
} };
|
|
2117
2128
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1));
|
|
2118
|
-
},
|
|
2129
|
+
}, xa = [], La = /* @__PURE__ */ w(
|
|
2130
|
+
Aa,
|
|
2119
2131
|
Ta,
|
|
2120
2132
|
xa,
|
|
2121
|
-
La,
|
|
2122
2133
|
!1,
|
|
2123
2134
|
null,
|
|
2124
2135
|
null,
|
|
2125
2136
|
null,
|
|
2126
2137
|
null
|
|
2127
2138
|
);
|
|
2128
|
-
const Ho =
|
|
2129
|
-
function
|
|
2130
|
-
return Object.values(
|
|
2139
|
+
const Ho = La.exports;
|
|
2140
|
+
function Oa(t) {
|
|
2141
|
+
return Object.values(on).includes(t) || t == null;
|
|
2131
2142
|
}
|
|
2132
|
-
function
|
|
2133
|
-
return Object.values(
|
|
2143
|
+
function $a(t) {
|
|
2144
|
+
return Object.values(O).includes(t);
|
|
2134
2145
|
}
|
|
2135
|
-
const
|
|
2146
|
+
const Ia = (t = !1) => ({
|
|
2136
2147
|
type: {
|
|
2137
2148
|
type: String,
|
|
2138
2149
|
default: null,
|
|
2139
|
-
validator:
|
|
2150
|
+
validator: Oa
|
|
2140
2151
|
},
|
|
2141
2152
|
...t ? {
|
|
2142
2153
|
orientation: {
|
|
2143
2154
|
type: String,
|
|
2144
|
-
default:
|
|
2145
|
-
validator:
|
|
2155
|
+
default: O.VERTICAL,
|
|
2156
|
+
validator: $a
|
|
2146
2157
|
}
|
|
2147
2158
|
} : {}
|
|
2148
2159
|
});
|
|
2149
|
-
function
|
|
2160
|
+
function At(t) {
|
|
2150
2161
|
const e = d(() => t.value.map((n) => ({
|
|
2151
2162
|
...n,
|
|
2152
2163
|
values: n.values.map((a) => ({
|
|
@@ -2161,12 +2172,12 @@ function Tt(t) {
|
|
|
2161
2172
|
});
|
|
2162
2173
|
return { multiBarData: e, groupedData: r };
|
|
2163
2174
|
}
|
|
2164
|
-
function
|
|
2175
|
+
function wa(t, e) {
|
|
2165
2176
|
return t.value.length === 1 ? "single" : e.value;
|
|
2166
2177
|
}
|
|
2167
|
-
function
|
|
2178
|
+
function Ea(t, e, r) {
|
|
2168
2179
|
const n = d(
|
|
2169
|
-
() => r.value ===
|
|
2180
|
+
() => r.value === O.HORIZONTAL
|
|
2170
2181
|
);
|
|
2171
2182
|
function a(i) {
|
|
2172
2183
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
@@ -2174,9 +2185,9 @@ function Na(t, e, r) {
|
|
|
2174
2185
|
const o = d(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = d(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2175
2186
|
return { barXScale: o, barYScale: l };
|
|
2176
2187
|
}
|
|
2177
|
-
function
|
|
2188
|
+
function Na(t, e, r, n, a, o) {
|
|
2178
2189
|
const l = d(
|
|
2179
|
-
() => n.value ===
|
|
2190
|
+
() => n.value === O.HORIZONTAL
|
|
2180
2191
|
);
|
|
2181
2192
|
function i(v, f) {
|
|
2182
2193
|
let y, m;
|
|
@@ -2189,12 +2200,12 @@ function Da(t, e, r, n, a, o) {
|
|
|
2189
2200
|
return l.value ? r.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
|
|
2190
2201
|
}
|
|
2191
2202
|
function c(v, f, y) {
|
|
2192
|
-
const { value: m, color: g } = v, h = g ?? t.value[f].color ?? de, { x: p, y:
|
|
2203
|
+
const { value: m, color: g } = v, h = g ?? t.value[f].color ?? de, { x: p, y: L } = i(m, y), $ = u(m), T = s(m);
|
|
2193
2204
|
return {
|
|
2194
2205
|
classList: [`lume-fill--${h}`, ...o],
|
|
2195
2206
|
x: p,
|
|
2196
|
-
y:
|
|
2197
|
-
width:
|
|
2207
|
+
y: L,
|
|
2208
|
+
width: $,
|
|
2198
2209
|
height: T,
|
|
2199
2210
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2200
2211
|
isNegative: m < 0
|
|
@@ -2204,8 +2215,8 @@ function Da(t, e, r, n, a, o) {
|
|
|
2204
2215
|
}
|
|
2205
2216
|
function Ca(t, e, r, n, a, o) {
|
|
2206
2217
|
const l = d(
|
|
2207
|
-
() => n.value ===
|
|
2208
|
-
), i = d(() =>
|
|
2218
|
+
() => n.value === O.HORIZONTAL
|
|
2219
|
+
), i = d(() => ue().domain(t.value.map((m, g) => g)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => ue().domain(t.value.map((m, g) => g)).range([0, r.value.bandwidth()]).padding(0));
|
|
2209
2220
|
function s(m, g, h) {
|
|
2210
2221
|
if (l.value)
|
|
2211
2222
|
return m >= 0 ? e.value(0) : e.value(m);
|
|
@@ -2226,22 +2237,22 @@ function Ca(t, e, r, n, a, o) {
|
|
|
2226
2237
|
return l.value ? u.value.bandwidth() : m < 0 ? r.value(m) - r.value(0) : r.value(0) - r.value(m);
|
|
2227
2238
|
}
|
|
2228
2239
|
function y(m, g, h) {
|
|
2229
|
-
const { value: p, color:
|
|
2240
|
+
const { value: p, color: L } = m, $ = L ?? t.value[g].color ?? Object.values(j)[g], T = s(p, h, g), k = c(p, h, g), N = v(p), D = f(p);
|
|
2230
2241
|
return {
|
|
2231
|
-
classList: [`lume-fill--${
|
|
2242
|
+
classList: [`lume-fill--${$}`, ...o],
|
|
2232
2243
|
x: T,
|
|
2233
2244
|
y: k,
|
|
2234
2245
|
width: N,
|
|
2235
|
-
height:
|
|
2246
|
+
height: D,
|
|
2236
2247
|
isFaded: a.value !== -1 && a.value !== h,
|
|
2237
2248
|
isNegative: p < 0
|
|
2238
2249
|
};
|
|
2239
2250
|
}
|
|
2240
2251
|
return { barAttributeGenerator: y };
|
|
2241
2252
|
}
|
|
2242
|
-
function
|
|
2253
|
+
function Da(t, e, r) {
|
|
2243
2254
|
const n = d(
|
|
2244
|
-
() => e.value ===
|
|
2255
|
+
() => e.value === O.HORIZONTAL
|
|
2245
2256
|
), a = d(() => {
|
|
2246
2257
|
const u = t.value.map(
|
|
2247
2258
|
(s) => s.filter((c) => c.value < 0).reduce((c, v) => c + v.value, 0)
|
|
@@ -2257,9 +2268,9 @@ function Ra(t, e, r) {
|
|
|
2257
2268
|
return Math.max(...u);
|
|
2258
2269
|
});
|
|
2259
2270
|
function l(u, s, c) {
|
|
2260
|
-
return n.value ?
|
|
2271
|
+
return n.value ? ie().domain([a.value, o.value]).range([0, c.width]) : Object.assign(
|
|
2261
2272
|
Ke(
|
|
2262
|
-
|
|
2273
|
+
ue().domain(s.map((v, f) => f)).range([0, c.width]),
|
|
2263
2274
|
e.value,
|
|
2264
2275
|
r.value
|
|
2265
2276
|
),
|
|
@@ -2269,26 +2280,26 @@ function Ra(t, e, r) {
|
|
|
2269
2280
|
function i(u, s, c) {
|
|
2270
2281
|
return n.value ? Object.assign(
|
|
2271
2282
|
Ke(
|
|
2272
|
-
|
|
2283
|
+
ue().domain(s.map((v, f) => f)).range([0, c.height]),
|
|
2273
2284
|
e.value,
|
|
2274
2285
|
r.value
|
|
2275
2286
|
),
|
|
2276
2287
|
{ labels: s }
|
|
2277
|
-
) :
|
|
2288
|
+
) : ie().domain([o.value, a.value]).range([0, c.height]);
|
|
2278
2289
|
}
|
|
2279
2290
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2280
2291
|
}
|
|
2281
2292
|
function Ha(t, e, r, n, a, o) {
|
|
2282
2293
|
const l = d(
|
|
2283
|
-
() => n.value ===
|
|
2294
|
+
() => n.value === O.HORIZONTAL
|
|
2284
2295
|
), i = d(
|
|
2285
2296
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2286
2297
|
), u = d(
|
|
2287
|
-
() => t.value.map((p) => p.values.map((
|
|
2298
|
+
() => t.value.map((p) => p.values.map((L) => L == null ? void 0 : L.value))
|
|
2288
2299
|
);
|
|
2289
|
-
function s(p,
|
|
2300
|
+
function s(p, L, $) {
|
|
2290
2301
|
let T, k;
|
|
2291
|
-
return l.value ? (T = e.value(p >= 0 ? 0 +
|
|
2302
|
+
return l.value ? (T = e.value(p >= 0 ? 0 + $ : p + $), k = r.value(i.value[L])) : (T = e.value(i.value[L]), k = r.value(p >= 0 ? p + $ : 0 + $)), { x: T, y: k };
|
|
2292
2303
|
}
|
|
2293
2304
|
function c(p) {
|
|
2294
2305
|
return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
|
|
@@ -2302,31 +2313,31 @@ function Ha(t, e, r, n, a, o) {
|
|
|
2302
2313
|
function y(p) {
|
|
2303
2314
|
return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
|
|
2304
2315
|
}
|
|
2305
|
-
function m(p,
|
|
2306
|
-
return p ? u.value.reduce((
|
|
2316
|
+
function m(p, L) {
|
|
2317
|
+
return p ? u.value.reduce(($, T, k) => (k < p && T[L] >= 0 && ($ += T[L]), $), 0) : 0;
|
|
2307
2318
|
}
|
|
2308
|
-
function g(p,
|
|
2309
|
-
return p ? u.value.reduce((
|
|
2319
|
+
function g(p, L) {
|
|
2320
|
+
return p ? u.value.reduce(($, T, k) => (k < p && T[L] < 0 && ($ += T[L]), $), 0) : 0;
|
|
2310
2321
|
}
|
|
2311
|
-
function h(p,
|
|
2312
|
-
const { value: T, color: k } = p, N = T >= 0 ? c(T) : v(T),
|
|
2322
|
+
function h(p, L, $) {
|
|
2323
|
+
const { value: T, color: k } = p, N = T >= 0 ? c(T) : v(T), D = T >= 0 ? f(T) : y(T), R = T >= 0 ? m(L, $) : g(L, $), { x: S, y: P } = s(T, $, R);
|
|
2313
2324
|
return {
|
|
2314
|
-
classList: [`lume-fill--${k ?? t.value[
|
|
2325
|
+
classList: [`lume-fill--${k ?? t.value[L].color ?? Object.values(j)[L]}`, ...o],
|
|
2315
2326
|
width: N,
|
|
2316
|
-
height:
|
|
2327
|
+
height: D,
|
|
2317
2328
|
x: S,
|
|
2318
|
-
y:
|
|
2319
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2329
|
+
y: P,
|
|
2330
|
+
isFaded: a.value !== -1 && a.value !== $,
|
|
2320
2331
|
isNegative: T < 0
|
|
2321
2332
|
};
|
|
2322
2333
|
}
|
|
2323
2334
|
return { barAttributeGenerator: h };
|
|
2324
2335
|
}
|
|
2325
2336
|
const tt = {
|
|
2326
|
-
single:
|
|
2337
|
+
single: Na,
|
|
2327
2338
|
grouped: Ca,
|
|
2328
2339
|
stacked: Ha
|
|
2329
|
-
},
|
|
2340
|
+
}, Ra = /* @__PURE__ */ E({
|
|
2330
2341
|
__name: "lume-bar-group",
|
|
2331
2342
|
props: {
|
|
2332
2343
|
...he(),
|
|
@@ -2334,7 +2345,7 @@ const tt = {
|
|
|
2334
2345
|
type: [String, Array],
|
|
2335
2346
|
default: () => []
|
|
2336
2347
|
},
|
|
2337
|
-
...
|
|
2348
|
+
...Ia(!0),
|
|
2338
2349
|
transition: {
|
|
2339
2350
|
type: Boolean,
|
|
2340
2351
|
default: !0
|
|
@@ -2351,8 +2362,8 @@ const tt = {
|
|
|
2351
2362
|
xScale: u,
|
|
2352
2363
|
yScale: s,
|
|
2353
2364
|
classList: c
|
|
2354
|
-
} =
|
|
2355
|
-
const p =
|
|
2365
|
+
} = H(r), { groupedData: v } = At(n), { barXScale: f, barYScale: y } = Ea(u, s, o), m = d(() => typeof c.value == "string" ? [c.value] : c.value), g = d(() => {
|
|
2366
|
+
const p = wa(n, i), { barAttributeGenerator: L } = tt[p](
|
|
2356
2367
|
n,
|
|
2357
2368
|
f,
|
|
2358
2369
|
y,
|
|
@@ -2360,15 +2371,15 @@ const tt = {
|
|
|
2360
2371
|
a,
|
|
2361
2372
|
m.value
|
|
2362
2373
|
);
|
|
2363
|
-
return
|
|
2374
|
+
return L;
|
|
2364
2375
|
}), h = d(() => {
|
|
2365
2376
|
if (l.value)
|
|
2366
|
-
return o.value ===
|
|
2377
|
+
return o.value === O.HORIZONTAL ? "width" : "height";
|
|
2367
2378
|
});
|
|
2368
2379
|
return { __sfc: !0, MIXIN_MAP: tt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: c, groupedData: v, barXScale: f, barYScale: y, computedClasses: m, getBarAttributes: g, computedTransition: h, LumeBar: Pe };
|
|
2369
2380
|
}
|
|
2370
2381
|
});
|
|
2371
|
-
var
|
|
2382
|
+
var Sa = function() {
|
|
2372
2383
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2373
2384
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2374
2385
|
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
@@ -2383,43 +2394,43 @@ var Ba = function() {
|
|
|
2383
2394
|
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2384
2395
|
}), 1);
|
|
2385
2396
|
}), 0);
|
|
2386
|
-
},
|
|
2397
|
+
}, Ba = [], Fa = /* @__PURE__ */ w(
|
|
2398
|
+
Ra,
|
|
2387
2399
|
Sa,
|
|
2388
2400
|
Ba,
|
|
2389
|
-
Fa,
|
|
2390
2401
|
!1,
|
|
2391
2402
|
null,
|
|
2392
2403
|
null,
|
|
2393
2404
|
null,
|
|
2394
2405
|
null
|
|
2395
2406
|
);
|
|
2396
|
-
const je =
|
|
2397
|
-
[
|
|
2407
|
+
const je = Fa.exports, Pa = {
|
|
2408
|
+
[O.VERTICAL]: {
|
|
2398
2409
|
withTooltip: !0,
|
|
2399
2410
|
xAxisOptions: {},
|
|
2400
2411
|
yAxisOptions: { gridLines: !0 },
|
|
2401
|
-
margins:
|
|
2412
|
+
margins: Q.VERTICAL
|
|
2402
2413
|
},
|
|
2403
|
-
[
|
|
2414
|
+
[O.HORIZONTAL]: {
|
|
2404
2415
|
withTooltip: !0,
|
|
2405
2416
|
xAxisOptions: { gridLines: !0 },
|
|
2406
2417
|
yAxisOptions: { gridLines: !1 },
|
|
2407
|
-
margins:
|
|
2418
|
+
margins: Q.HORIZONTAL
|
|
2408
2419
|
}
|
|
2409
|
-
},
|
|
2420
|
+
}, Ga = /* @__PURE__ */ E({
|
|
2410
2421
|
__name: "lume-single-bar-chart",
|
|
2411
2422
|
props: {
|
|
2412
|
-
...
|
|
2423
|
+
...ae(Se)
|
|
2413
2424
|
},
|
|
2414
2425
|
setup(t) {
|
|
2415
|
-
const e = t, r = ee(
|
|
2416
|
-
() =>
|
|
2426
|
+
const e = t, r = ee(V()), { orientation: n, options: a } = H(e), o = d(
|
|
2427
|
+
() => Pa[n.value || O.VERTICAL]
|
|
2417
2428
|
// needs to be computed so that default options are reactive
|
|
2418
|
-
), { allOptions: l } =
|
|
2419
|
-
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart:
|
|
2429
|
+
), { allOptions: l } = W(a, o);
|
|
2430
|
+
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: oe, LumeBarGroup: je };
|
|
2420
2431
|
}
|
|
2421
2432
|
});
|
|
2422
|
-
var
|
|
2433
|
+
var Va = function() {
|
|
2423
2434
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2424
2435
|
return r(n.LumeChart, e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2425
2436
|
return [r(n.LumeBarGroup, e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
|
|
@@ -2428,47 +2439,47 @@ var ja = function() {
|
|
|
2428
2439
|
return [e._t(o, null, null, l || {})];
|
|
2429
2440
|
} };
|
|
2430
2441
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2431
|
-
},
|
|
2442
|
+
}, ja = [], Ma = /* @__PURE__ */ w(
|
|
2443
|
+
Ga,
|
|
2432
2444
|
Va,
|
|
2433
2445
|
ja,
|
|
2434
|
-
Ma,
|
|
2435
2446
|
!1,
|
|
2436
2447
|
null,
|
|
2437
2448
|
null,
|
|
2438
2449
|
null,
|
|
2439
2450
|
null
|
|
2440
2451
|
);
|
|
2441
|
-
const
|
|
2442
|
-
[
|
|
2452
|
+
const Ro = Ma.exports, za = {
|
|
2453
|
+
[O.VERTICAL]: {
|
|
2443
2454
|
withTooltip: !0,
|
|
2444
2455
|
xAxisOptions: {},
|
|
2445
2456
|
yAxisOptions: { gridLines: !0 },
|
|
2446
|
-
margins:
|
|
2457
|
+
margins: Q.VERTICAL
|
|
2447
2458
|
},
|
|
2448
|
-
[
|
|
2459
|
+
[O.HORIZONTAL]: {
|
|
2449
2460
|
withTooltip: !0,
|
|
2450
2461
|
xAxisOptions: { gridLines: !0 },
|
|
2451
2462
|
yAxisOptions: { gridLines: !1 },
|
|
2452
|
-
margins:
|
|
2463
|
+
margins: Q.HORIZONTAL,
|
|
2453
2464
|
tooltipOptions: { position: "right" }
|
|
2454
2465
|
}
|
|
2455
|
-
},
|
|
2466
|
+
}, Wa = /* @__PURE__ */ E({
|
|
2456
2467
|
__name: "lume-grouped-bar-chart",
|
|
2457
2468
|
props: {
|
|
2458
|
-
...
|
|
2469
|
+
...ae()
|
|
2459
2470
|
},
|
|
2460
2471
|
setup(t) {
|
|
2461
|
-
const e = t, r = ee(
|
|
2462
|
-
() =>
|
|
2472
|
+
const e = t, r = ee(V()), { orientation: n, options: a } = H(e), o = d(
|
|
2473
|
+
() => za[n.value || O.VERTICAL]
|
|
2463
2474
|
// needs to be computed so that default options are reactive
|
|
2464
|
-
), { allOptions: l } =
|
|
2475
|
+
), { allOptions: l } = W(
|
|
2465
2476
|
a,
|
|
2466
2477
|
o
|
|
2467
2478
|
);
|
|
2468
|
-
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart:
|
|
2479
|
+
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: oe, LumeBarGroup: je };
|
|
2469
2480
|
}
|
|
2470
2481
|
});
|
|
2471
|
-
var
|
|
2482
|
+
var Za = function() {
|
|
2472
2483
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2473
2484
|
return r(n.LumeChart, e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2474
2485
|
return [r(n.LumeBarGroup, e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
|
|
@@ -2477,51 +2488,51 @@ var Xa = function() {
|
|
|
2477
2488
|
return [e._t(o, null, null, l || {})];
|
|
2478
2489
|
} };
|
|
2479
2490
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2480
|
-
},
|
|
2491
|
+
}, Xa = [], Ua = /* @__PURE__ */ w(
|
|
2492
|
+
Wa,
|
|
2481
2493
|
Za,
|
|
2482
2494
|
Xa,
|
|
2483
|
-
Ua,
|
|
2484
2495
|
!1,
|
|
2485
2496
|
null,
|
|
2486
2497
|
null,
|
|
2487
2498
|
null,
|
|
2488
2499
|
null
|
|
2489
2500
|
);
|
|
2490
|
-
const
|
|
2491
|
-
[
|
|
2501
|
+
const So = Ua.exports, Ya = {
|
|
2502
|
+
[O.VERTICAL]: {
|
|
2492
2503
|
withTooltip: !0,
|
|
2493
2504
|
xAxisOptions: {},
|
|
2494
2505
|
yAxisOptions: { gridLines: !0 },
|
|
2495
|
-
margins:
|
|
2506
|
+
margins: Q.VERTICAL
|
|
2496
2507
|
},
|
|
2497
|
-
[
|
|
2508
|
+
[O.HORIZONTAL]: {
|
|
2498
2509
|
withTooltip: !0,
|
|
2499
2510
|
xAxisOptions: { gridLines: !0 },
|
|
2500
2511
|
yAxisOptions: { gridLines: !1 },
|
|
2501
|
-
margins:
|
|
2512
|
+
margins: Q.HORIZONTAL,
|
|
2502
2513
|
tooltipOptions: { position: "right" }
|
|
2503
2514
|
}
|
|
2504
|
-
},
|
|
2515
|
+
}, Ka = /* @__PURE__ */ E({
|
|
2505
2516
|
__name: "lume-stacked-bar-chart",
|
|
2506
2517
|
props: {
|
|
2507
|
-
...
|
|
2518
|
+
...ae()
|
|
2508
2519
|
},
|
|
2509
2520
|
setup(t) {
|
|
2510
|
-
const e = t, r = ee(
|
|
2511
|
-
() =>
|
|
2521
|
+
const e = t, r = ee(V()), { data: n, orientation: a, options: o } = H(e), l = d(
|
|
2522
|
+
() => Ya[a.value || O.VERTICAL]
|
|
2512
2523
|
// needs to be computed so that default options are reactive
|
|
2513
|
-
), { allOptions: i } =
|
|
2524
|
+
), { allOptions: i } = W(
|
|
2514
2525
|
o,
|
|
2515
2526
|
l
|
|
2516
|
-
), { internalData: u } = Ve(n), { groupedData: s } =
|
|
2527
|
+
), { internalData: u } = Ve(n), { groupedData: s } = At(u), { stackedXScaleGenerator: c, stackedYScaleGenerator: v } = Da(
|
|
2517
2528
|
s,
|
|
2518
2529
|
a,
|
|
2519
2530
|
o
|
|
2520
2531
|
);
|
|
2521
|
-
return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator: v, LumeChart:
|
|
2532
|
+
return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator: v, LumeChart: oe, LumeBarGroup: je };
|
|
2522
2533
|
}
|
|
2523
2534
|
});
|
|
2524
|
-
var
|
|
2535
|
+
var Ja = function() {
|
|
2525
2536
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2526
2537
|
return r(n.LumeChart, e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.stackedXScaleGenerator, "y-scale": n.stackedYScaleGenerator, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2527
2538
|
return [r(n.LumeBarGroup, e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
|
|
@@ -2530,17 +2541,17 @@ var Qa = function() {
|
|
|
2530
2541
|
return [e._t(o, null, null, l || {})];
|
|
2531
2542
|
} };
|
|
2532
2543
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2533
|
-
},
|
|
2544
|
+
}, Qa = [], qa = /* @__PURE__ */ w(
|
|
2545
|
+
Ka,
|
|
2534
2546
|
Ja,
|
|
2535
2547
|
Qa,
|
|
2536
|
-
qa,
|
|
2537
2548
|
!1,
|
|
2538
2549
|
null,
|
|
2539
2550
|
null,
|
|
2540
2551
|
null,
|
|
2541
2552
|
null
|
|
2542
2553
|
);
|
|
2543
|
-
const
|
|
2554
|
+
const Bo = qa.exports, nt = 2, eo = /* @__PURE__ */ E({
|
|
2544
2555
|
__name: "lume-line",
|
|
2545
2556
|
props: {
|
|
2546
2557
|
pathDefinition: {
|
|
@@ -2553,7 +2564,7 @@ const Fo = eo.exports, nt = 2, to = /* @__PURE__ */ E({
|
|
|
2553
2564
|
},
|
|
2554
2565
|
color: {
|
|
2555
2566
|
type: String,
|
|
2556
|
-
default:
|
|
2567
|
+
default: j.Skyblue
|
|
2557
2568
|
},
|
|
2558
2569
|
dashed: {
|
|
2559
2570
|
type: Boolean,
|
|
@@ -2575,10 +2586,10 @@ const Fo = eo.exports, nt = 2, to = /* @__PURE__ */ E({
|
|
|
2575
2586
|
emits: ["click"],
|
|
2576
2587
|
setup(t, { emit: e }) {
|
|
2577
2588
|
const r = I(null);
|
|
2578
|
-
return
|
|
2589
|
+
return X(() => me(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: nt, emit: e, root: r };
|
|
2579
2590
|
}
|
|
2580
2591
|
});
|
|
2581
|
-
var
|
|
2592
|
+
var to = function() {
|
|
2582
2593
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2583
2594
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2584
2595
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2590,24 +2601,24 @@ var no = function() {
|
|
|
2590
2601
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
2591
2602
|
return n.emit("click", a);
|
|
2592
2603
|
} } });
|
|
2593
|
-
},
|
|
2604
|
+
}, no = [], ro = /* @__PURE__ */ w(
|
|
2605
|
+
eo,
|
|
2594
2606
|
to,
|
|
2595
2607
|
no,
|
|
2596
|
-
ro,
|
|
2597
2608
|
!1,
|
|
2598
2609
|
null,
|
|
2599
2610
|
"08896455",
|
|
2600
2611
|
null,
|
|
2601
2612
|
null
|
|
2602
2613
|
);
|
|
2603
|
-
const
|
|
2614
|
+
const ao = ro.exports, rt = 4, oo = /* @__PURE__ */ E({
|
|
2604
2615
|
__name: "lume-point",
|
|
2605
2616
|
props: {
|
|
2606
2617
|
x: { type: Number, required: !0 },
|
|
2607
2618
|
y: { type: Number, required: !0 },
|
|
2608
2619
|
color: {
|
|
2609
2620
|
type: String,
|
|
2610
|
-
default:
|
|
2621
|
+
default: j.Skyblue
|
|
2611
2622
|
},
|
|
2612
2623
|
radius: {
|
|
2613
2624
|
type: Number,
|
|
@@ -2621,26 +2632,26 @@ const oo = ao.exports, rt = 4, lo = /* @__PURE__ */ E({
|
|
|
2621
2632
|
emits: ["click"],
|
|
2622
2633
|
setup(t, { emit: e }) {
|
|
2623
2634
|
const r = t, n = I(null), a = d(() => r.radius / 2);
|
|
2624
|
-
return
|
|
2635
|
+
return X(() => me(n.value)), { __sfc: !0, DEFAULT_RADIUS: rt, props: r, emit: e, root: n, strokeWidth: a };
|
|
2625
2636
|
}
|
|
2626
2637
|
});
|
|
2627
|
-
var
|
|
2638
|
+
var lo = function() {
|
|
2628
2639
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2629
2640
|
return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2630
2641
|
return n.emit("click", a);
|
|
2631
2642
|
} } });
|
|
2632
|
-
},
|
|
2643
|
+
}, uo = [], io = /* @__PURE__ */ w(
|
|
2644
|
+
oo,
|
|
2633
2645
|
lo,
|
|
2634
2646
|
uo,
|
|
2635
|
-
io,
|
|
2636
2647
|
!1,
|
|
2637
2648
|
null,
|
|
2638
2649
|
"9bacbd7d",
|
|
2639
2650
|
null,
|
|
2640
2651
|
null
|
|
2641
2652
|
);
|
|
2642
|
-
const
|
|
2643
|
-
function
|
|
2653
|
+
const so = io.exports;
|
|
2654
|
+
function Tt(t) {
|
|
2644
2655
|
function e(o) {
|
|
2645
2656
|
let l = null;
|
|
2646
2657
|
return o == null ? void 0 : o.reduce((i, u, s) => (u == null || u.value == null ? (l ? l.push(s) : l = [s], s === (o == null ? void 0 : o.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
@@ -2684,19 +2695,19 @@ function xt(t) {
|
|
|
2684
2695
|
};
|
|
2685
2696
|
})) };
|
|
2686
2697
|
}
|
|
2687
|
-
function
|
|
2698
|
+
function co(t, e) {
|
|
2688
2699
|
const r = t.bandwidth() / 2;
|
|
2689
2700
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2690
2701
|
}
|
|
2691
|
-
function
|
|
2702
|
+
function vo(t, e) {
|
|
2692
2703
|
return (r, n) => t(e + (n - 1));
|
|
2693
2704
|
}
|
|
2694
|
-
function
|
|
2705
|
+
function _o(t, e, r, n) {
|
|
2695
2706
|
return Ht().x(
|
|
2696
|
-
q(r) ?
|
|
2707
|
+
q(r) ? co(r, t) : vo(r, t)
|
|
2697
2708
|
).y((o) => n(o))(e);
|
|
2698
2709
|
}
|
|
2699
|
-
const at = 1,
|
|
2710
|
+
const at = 1, fo = /* @__PURE__ */ E({
|
|
2700
2711
|
__name: "lume-line-group",
|
|
2701
2712
|
props: {
|
|
2702
2713
|
...he(),
|
|
@@ -2711,10 +2722,10 @@ const at = 1, po = /* @__PURE__ */ E({
|
|
|
2711
2722
|
},
|
|
2712
2723
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2713
2724
|
setup(t, { emit: e }) {
|
|
2714
|
-
const r = t, { data: n, options: a, xScale: o, yScale: l } =
|
|
2725
|
+
const r = t, { data: n, options: a, xScale: o, yScale: l } = H(r), i = fe(
|
|
2715
2726
|
"tooltipAnchorAttributes",
|
|
2716
2727
|
null
|
|
2717
|
-
), { updateTooltipAnchorAttributes: u } =
|
|
2728
|
+
), { updateTooltipAnchorAttributes: u } = yt(
|
|
2718
2729
|
i,
|
|
2719
2730
|
a,
|
|
2720
2731
|
o,
|
|
@@ -2722,12 +2733,12 @@ const at = 1, po = /* @__PURE__ */ E({
|
|
|
2722
2733
|
), s = d(() => {
|
|
2723
2734
|
if (n.value.every((N) => N.isDashed))
|
|
2724
2735
|
return n.value;
|
|
2725
|
-
const { computedLineData: k } =
|
|
2736
|
+
const { computedLineData: k } = Tt(n);
|
|
2726
2737
|
return a.value.withTooltip !== !1 && (i != null && i.value) && u(k.value), k.value;
|
|
2727
2738
|
}), c = d(() => {
|
|
2728
2739
|
if (r.hoveredIndex === -1)
|
|
2729
2740
|
return;
|
|
2730
|
-
const k =
|
|
2741
|
+
const k = Kt(
|
|
2731
2742
|
s.value,
|
|
2732
2743
|
r.hoveredIndex
|
|
2733
2744
|
);
|
|
@@ -2737,7 +2748,7 @@ const at = 1, po = /* @__PURE__ */ E({
|
|
|
2737
2748
|
// Move to X index, Vertical line to the highest point
|
|
2738
2749
|
};
|
|
2739
2750
|
}), v = d(
|
|
2740
|
-
() => o.value && at / (
|
|
2751
|
+
() => o.value && at / (Jt(o.value) - 1)
|
|
2741
2752
|
// Subtracting the first line (read below)
|
|
2742
2753
|
), f = d(
|
|
2743
2754
|
() => {
|
|
@@ -2754,39 +2765,39 @@ const at = 1, po = /* @__PURE__ */ E({
|
|
|
2754
2765
|
return s.value[k].values;
|
|
2755
2766
|
}
|
|
2756
2767
|
function p(k, N) {
|
|
2757
|
-
var
|
|
2758
|
-
const
|
|
2759
|
-
(
|
|
2768
|
+
var R, S;
|
|
2769
|
+
const D = k === 0 ? [] : [
|
|
2770
|
+
(R = h(N)[k - 1]) == null ? void 0 : R.value,
|
|
2760
2771
|
(S = h(N)[k]) == null ? void 0 : S.value
|
|
2761
2772
|
];
|
|
2762
|
-
return
|
|
2773
|
+
return _o(
|
|
2763
2774
|
k,
|
|
2764
|
-
|
|
2775
|
+
D,
|
|
2765
2776
|
o.value,
|
|
2766
2777
|
l.value
|
|
2767
2778
|
) || "";
|
|
2768
2779
|
}
|
|
2769
|
-
function
|
|
2780
|
+
function L(k) {
|
|
2770
2781
|
return {
|
|
2771
2782
|
animationDelay: k < 2 ? 0 : (k - 1) * v.value,
|
|
2772
2783
|
animationDuration: v.value
|
|
2773
2784
|
};
|
|
2774
2785
|
}
|
|
2775
|
-
function
|
|
2776
|
-
var
|
|
2777
|
-
const
|
|
2786
|
+
function $(k, N) {
|
|
2787
|
+
var R;
|
|
2788
|
+
const D = (R = h(N)[k]) == null ? void 0 : R.value;
|
|
2778
2789
|
return {
|
|
2779
2790
|
x: q(o.value) ? r.xScale(m.value[k]) + y.value : r.xScale(k),
|
|
2780
|
-
y: l.value(
|
|
2791
|
+
y: l.value(D)
|
|
2781
2792
|
};
|
|
2782
2793
|
}
|
|
2783
2794
|
function T(k) {
|
|
2784
2795
|
return r.hoveredIndex === k;
|
|
2785
2796
|
}
|
|
2786
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: at, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: c, animationDuration: v, pointRadius: f, xAxisOffset: y, domain: m, computedWithPoints: g, getValuesFromDataset: h, getPathDefinition: p, getLineTransitionParams:
|
|
2797
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: at, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: c, animationDuration: v, pointRadius: f, xAxisOffset: y, domain: m, computedWithPoints: g, getValuesFromDataset: h, getPathDefinition: p, getLineTransitionParams: L, getPointPosition: $, isPointActive: T, LumeLine: ao, LumePoint: so };
|
|
2787
2798
|
}
|
|
2788
2799
|
});
|
|
2789
|
-
var
|
|
2800
|
+
var po = function() {
|
|
2790
2801
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2791
2802
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
2792
2803
|
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
|
|
@@ -2799,33 +2810,33 @@ var mo = function() {
|
|
|
2799
2810
|
} } }, "lume-point", n.getPointPosition(i, o), !1));
|
|
2800
2811
|
}), 1) : e._e()]);
|
|
2801
2812
|
})], 2);
|
|
2802
|
-
},
|
|
2813
|
+
}, mo = [], ho = /* @__PURE__ */ w(
|
|
2814
|
+
fo,
|
|
2803
2815
|
po,
|
|
2804
2816
|
mo,
|
|
2805
|
-
ho,
|
|
2806
2817
|
!1,
|
|
2807
2818
|
null,
|
|
2808
2819
|
"c4d7f0ca",
|
|
2809
2820
|
null,
|
|
2810
2821
|
null
|
|
2811
2822
|
);
|
|
2812
|
-
const
|
|
2813
|
-
margins:
|
|
2823
|
+
const xt = ho.exports, go = {
|
|
2824
|
+
margins: Q.VERTICAL,
|
|
2814
2825
|
startOnZero: !0,
|
|
2815
2826
|
withTooltip: !0,
|
|
2816
2827
|
xAxisOptions: {},
|
|
2817
2828
|
yAxisOptions: { gridLines: !0 }
|
|
2818
|
-
},
|
|
2829
|
+
}, yo = /* @__PURE__ */ E({
|
|
2819
2830
|
__name: "lume-line-chart",
|
|
2820
2831
|
props: {
|
|
2821
|
-
...
|
|
2832
|
+
...ae(null, !1)
|
|
2822
2833
|
},
|
|
2823
2834
|
setup(t) {
|
|
2824
|
-
const e = t, r = ee(
|
|
2825
|
-
return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart:
|
|
2835
|
+
const e = t, r = ee(V()), { options: n } = H(e), { allOptions: a } = W(n, go);
|
|
2836
|
+
return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: oe, LumeLineGroup: xt };
|
|
2826
2837
|
}
|
|
2827
2838
|
});
|
|
2828
|
-
var
|
|
2839
|
+
var bo = function() {
|
|
2829
2840
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2830
2841
|
return r(n.LumeChart, e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2831
2842
|
return [r(n.LumeLineGroup, e._b({}, "lume-line-group", a, !1))];
|
|
@@ -2834,28 +2845,28 @@ var ko = function() {
|
|
|
2834
2845
|
return [e._t(o, null, null, l || {})];
|
|
2835
2846
|
} };
|
|
2836
2847
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2837
|
-
},
|
|
2848
|
+
}, ko = [], Ao = /* @__PURE__ */ w(
|
|
2849
|
+
yo,
|
|
2838
2850
|
bo,
|
|
2839
2851
|
ko,
|
|
2840
|
-
Ao,
|
|
2841
2852
|
!1,
|
|
2842
2853
|
null,
|
|
2843
2854
|
null,
|
|
2844
2855
|
null,
|
|
2845
2856
|
null
|
|
2846
2857
|
);
|
|
2847
|
-
const
|
|
2848
|
-
function
|
|
2858
|
+
const Fo = Ao.exports;
|
|
2859
|
+
function To(t) {
|
|
2849
2860
|
return { areaPathDefinition: d(
|
|
2850
2861
|
() => function(r, n) {
|
|
2851
2862
|
if (!r || !n)
|
|
2852
2863
|
return;
|
|
2853
2864
|
const a = t.value[0].values;
|
|
2854
|
-
return
|
|
2865
|
+
return Rt().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
2855
2866
|
}
|
|
2856
2867
|
) };
|
|
2857
2868
|
}
|
|
2858
|
-
const
|
|
2869
|
+
const xo = {
|
|
2859
2870
|
margins: {
|
|
2860
2871
|
top: 0,
|
|
2861
2872
|
right: 0,
|
|
@@ -2869,14 +2880,14 @@ const Lo = {
|
|
|
2869
2880
|
tooltipOptions: {
|
|
2870
2881
|
showTitle: !1
|
|
2871
2882
|
}
|
|
2872
|
-
},
|
|
2883
|
+
}, Lo = /* @__PURE__ */ E({
|
|
2873
2884
|
__name: "lume-sparkline-chart",
|
|
2874
2885
|
props: {
|
|
2875
2886
|
...Ge(null),
|
|
2876
|
-
...
|
|
2887
|
+
...se()
|
|
2877
2888
|
},
|
|
2878
2889
|
setup(t, { expose: e }) {
|
|
2879
|
-
const r = t, n = ee(
|
|
2890
|
+
const r = t, n = ee(V()), { data: a, options: o } = H(r), { internalData: l } = Ve(a), { allOptions: i } = W(o, xo), { computedLineData: u } = Tt(l), { areaPathDefinition: s } = To(u), c = d(() => l.value[0].color), v = d(
|
|
2880
2891
|
() => a.value[0].areaColor || c.value
|
|
2881
2892
|
);
|
|
2882
2893
|
function f(m) {
|
|
@@ -2886,14 +2897,14 @@ const Lo = {
|
|
|
2886
2897
|
};
|
|
2887
2898
|
}
|
|
2888
2899
|
function y(m, g, h) {
|
|
2889
|
-
return
|
|
2900
|
+
return ie().range([0, h.width]).domain([0, m[0].values.length - 1]);
|
|
2890
2901
|
}
|
|
2891
2902
|
return e({
|
|
2892
2903
|
areaPathDefinition: s
|
|
2893
|
-
}), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor: v, getSparklineOptions: f, xScaleGenerator: y, LumeChart:
|
|
2904
|
+
}), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor: v, getSparklineOptions: f, xScaleGenerator: y, LumeChart: oe, LumeLineGroup: xt };
|
|
2894
2905
|
}
|
|
2895
2906
|
});
|
|
2896
|
-
var
|
|
2907
|
+
var Oo = function() {
|
|
2897
2908
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2898
2909
|
return r(n.LumeChart, e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2899
2910
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -2907,41 +2918,41 @@ var $o = function() {
|
|
|
2907
2918
|
return [e._t(o, null, null, l || {})];
|
|
2908
2919
|
} };
|
|
2909
2920
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2910
|
-
},
|
|
2921
|
+
}, $o = [], Io = /* @__PURE__ */ w(
|
|
2922
|
+
Lo,
|
|
2911
2923
|
Oo,
|
|
2912
2924
|
$o,
|
|
2913
|
-
Io,
|
|
2914
2925
|
!1,
|
|
2915
2926
|
null,
|
|
2916
2927
|
"9fc2cb6e",
|
|
2917
2928
|
null,
|
|
2918
2929
|
null
|
|
2919
2930
|
);
|
|
2920
|
-
const
|
|
2931
|
+
const Po = Io.exports;
|
|
2921
2932
|
export {
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2933
|
+
Do as LumeAlluvialDiagram,
|
|
2934
|
+
ma as LumeAlluvialGroup,
|
|
2935
|
+
Gr as LumeAlluvialNodeLabel,
|
|
2936
|
+
Wr as LumeAlluvialNodeValue,
|
|
2937
|
+
bn as LumeAxis,
|
|
2927
2938
|
Pe as LumeBar,
|
|
2928
2939
|
Ho as LumeBarChart,
|
|
2929
2940
|
je as LumeBarGroup,
|
|
2930
|
-
|
|
2941
|
+
oe as LumeChart,
|
|
2931
2942
|
Cn as LumeChartContainer,
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2943
|
+
Bn as LumeChartLegend,
|
|
2944
|
+
So as LumeGroupedBarChart,
|
|
2945
|
+
ao as LumeLine,
|
|
2946
|
+
Fo as LumeLineChart,
|
|
2947
|
+
xt as LumeLineGroup,
|
|
2948
|
+
kr as LumeOverlayGroup,
|
|
2949
|
+
so as LumePoint,
|
|
2950
|
+
Ro as LumeSingleBarChart,
|
|
2951
|
+
Po as LumeSparklineChart,
|
|
2952
|
+
Bo as LumeStackedBarChart,
|
|
2953
|
+
rr as LumeTooltip,
|
|
2954
|
+
Qn as LumeTooltipItem,
|
|
2955
|
+
Xn as LumeTooltipSummary,
|
|
2956
|
+
jn as LumeTooltipTitle
|
|
2946
2957
|
};
|
|
2947
2958
|
//# sourceMappingURL=index.js.map
|