@adyen/lume-vue3 1.10.1 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts +13 -1
- package/dist/@types/components/core/lume-chart-container/lume-chart-container.vue.d.ts.map +1 -1
- package/dist/index.js +513 -507
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
2
|
-
import { format as mn, ticks as fn, scaleBand as Be, scaleLinear as
|
|
1
|
+
import { defineComponent as Z, ref as R, openBlock as y, createElementBlock as O, mergeProps as j, createElementVNode as G, toDisplayString as oe, createCommentVNode as z, isRef as jt, computed as v, watch as U, toRefs as te, inject as Pe, reactive as Fe, onMounted as _e, unref as d, Fragment as q, renderList as W, createBlock as X, normalizeClass as ne, normalizeStyle as Vt, watchEffect as Ct, onBeforeUnmount as Pt, renderSlot as S, createTextVNode as ce, useSlots as re, nextTick as Qe, withCtx as C, createSlots as de, pushScopeId as cn, popScopeId as dn, provide as Ke, createVNode as ie, toHandlers as ae, normalizeProps as pe, guardReactiveProps as he, defineAsyncComponent as Je, resolveDynamicComponent as vn } from "vue";
|
|
2
|
+
import { format as mn, ticks as fn, scaleBand as Be, scaleLinear as Se, link as pn, line as hn, area as gn } from "d3";
|
|
3
3
|
import { createPopper as _n } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
|
|
5
5
|
const An = {
|
|
@@ -44,7 +44,7 @@ const An = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t, a =
|
|
47
|
+
const o = t, a = R(null);
|
|
48
48
|
return n({ ref: a }), (u, l) => (y(), O("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -54,12 +54,12 @@ const An = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
G("g", An, [
|
|
58
|
+
G("rect", j(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
|
|
62
|
+
G("text", j(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
@@ -74,7 +74,7 @@ const ee = (e, n) => {
|
|
|
74
74
|
for (const [o, a] of n)
|
|
75
75
|
t[o] = a;
|
|
76
76
|
return t;
|
|
77
|
-
},
|
|
77
|
+
}, At = /* @__PURE__ */ ee(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -82,10 +82,10 @@ const ee = (e, n) => {
|
|
|
82
82
|
"tooltip",
|
|
83
83
|
"tooltip-content"
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function Ft() {
|
|
86
86
|
return process.env.NODE_ENV === "production";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function zt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
90
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
@@ -101,10 +101,10 @@ function $n(e) {
|
|
|
101
101
|
function qe(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Wt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
106
|
return Object.entries(n).forEach(([o, a]) => {
|
|
107
|
-
t[o] = qe(e[o]) && qe(a) ?
|
|
107
|
+
t[o] = qe(e[o]) && qe(a) ? Wt(e[o], a) : a;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
110
|
function xn(e) {
|
|
@@ -116,7 +116,7 @@ function ve(e) {
|
|
|
116
116
|
function On(e) {
|
|
117
117
|
return ve(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Tt(e) {
|
|
120
120
|
const [n, t] = e.domain();
|
|
121
121
|
return n == null || t == null || n === 0 && t === 0;
|
|
122
122
|
}
|
|
@@ -138,8 +138,8 @@ function wn(e, n) {
|
|
|
138
138
|
}
|
|
139
139
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
const n =
|
|
141
|
+
function Zt(e) {
|
|
142
|
+
const n = jt(e) ? e.value : e;
|
|
143
143
|
if (!n)
|
|
144
144
|
throw new Error("No empty array can be created from specified data value");
|
|
145
145
|
const t = Math.max(
|
|
@@ -186,9 +186,9 @@ function ct(e, n) {
|
|
|
186
186
|
}
|
|
187
187
|
var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
188
188
|
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
|
|
189
|
-
const
|
|
189
|
+
const Sn = "[lume] ";
|
|
190
190
|
function ge(e, n = !0) {
|
|
191
|
-
n &&
|
|
191
|
+
n && Ft() || console.warn(Sn + "Warning: " + e);
|
|
192
192
|
}
|
|
193
193
|
const Ve = (e) => {
|
|
194
194
|
let n = null;
|
|
@@ -210,7 +210,7 @@ const Ve = (e) => {
|
|
|
210
210
|
return n ? n(...o) : o[0];
|
|
211
211
|
}
|
|
212
212
|
return t;
|
|
213
|
-
},
|
|
213
|
+
}, Me = () => ({
|
|
214
214
|
options: {
|
|
215
215
|
type: Object,
|
|
216
216
|
default: () => ({})
|
|
@@ -218,13 +218,13 @@ const Ve = (e) => {
|
|
|
218
218
|
});
|
|
219
219
|
function fe(e, n) {
|
|
220
220
|
return { allOptions: v(() => {
|
|
221
|
-
const o =
|
|
222
|
-
return o ?
|
|
221
|
+
const o = jt(n) ? n == null ? void 0 : n.value : n;
|
|
222
|
+
return o ? Wt(o, e.value) : e.value;
|
|
223
223
|
}) };
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
function
|
|
227
|
-
const o =
|
|
225
|
+
const Mn = 0.2;
|
|
226
|
+
function Rn(e, n, t) {
|
|
227
|
+
const o = R(), a = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
228
228
|
function l() {
|
|
229
229
|
if (!n.value)
|
|
230
230
|
return;
|
|
@@ -232,7 +232,7 @@ function Gn(e, n, t) {
|
|
|
232
232
|
(f, r) => f + r.ref.getBoundingClientRect().width,
|
|
233
233
|
0
|
|
234
234
|
), s = Math.ceil(c / u.value);
|
|
235
|
-
o.value = s + s *
|
|
235
|
+
o.value = s + s * Mn;
|
|
236
236
|
}
|
|
237
237
|
function i(c) {
|
|
238
238
|
if (!n.value)
|
|
@@ -245,14 +245,14 @@ function Gn(e, n, t) {
|
|
|
245
245
|
}
|
|
246
246
|
return U(n, l), { showTick: i };
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const H = {
|
|
249
249
|
HORIZONTAL: "horizontal",
|
|
250
250
|
VERTICAL: "vertical"
|
|
251
|
-
},
|
|
251
|
+
}, Gn = {
|
|
252
252
|
SINGLE: "single",
|
|
253
253
|
GROUPED: "grouped",
|
|
254
254
|
STACKED: "stacked"
|
|
255
|
-
},
|
|
255
|
+
}, Ut = "No data", Lt = 20, Xt = 0.33, Yt = 0.5, Kt = 12, Re = 8, jn = 1, Vn = [
|
|
256
256
|
"auto",
|
|
257
257
|
"auto-start",
|
|
258
258
|
"auto-end",
|
|
@@ -272,7 +272,7 @@ const B = {
|
|
|
272
272
|
function ze(e) {
|
|
273
273
|
e != null && e.closest("svg") || ge(me.NotContainedInSvg);
|
|
274
274
|
}
|
|
275
|
-
const
|
|
275
|
+
const Jt = {
|
|
276
276
|
/** Displays a line for each tick. */
|
|
277
277
|
gridLines: !1,
|
|
278
278
|
/** Displays the axis title. */
|
|
@@ -289,11 +289,11 @@ const Kt = {
|
|
|
289
289
|
/** Space between the tick label and the axis line. */
|
|
290
290
|
tickPadding: 12
|
|
291
291
|
}, Cn = {
|
|
292
|
-
...
|
|
292
|
+
...Jt,
|
|
293
293
|
withTitle: !1,
|
|
294
294
|
skip: !0
|
|
295
295
|
}, Pn = {
|
|
296
|
-
...
|
|
296
|
+
...Jt,
|
|
297
297
|
gridLines: !0
|
|
298
298
|
}, Fn = function(e, n, t) {
|
|
299
299
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
@@ -311,7 +311,7 @@ const Kt = {
|
|
|
311
311
|
return {
|
|
312
312
|
x: -(s - e.value.step()) / 2,
|
|
313
313
|
width: s,
|
|
314
|
-
height: t.value.tickPadding +
|
|
314
|
+
height: t.value.tickPadding + Kt + Re
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
function l() {
|
|
@@ -346,7 +346,7 @@ const Kt = {
|
|
|
346
346
|
}
|
|
347
347
|
function u(c) {
|
|
348
348
|
var f;
|
|
349
|
-
const s = (c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : 42) + t.value.tickPadding +
|
|
349
|
+
const s = (c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : 42) + t.value.tickPadding + Re;
|
|
350
350
|
return {
|
|
351
351
|
x: -s,
|
|
352
352
|
width: s,
|
|
@@ -387,7 +387,7 @@ const Kt = {
|
|
|
387
387
|
}
|
|
388
388
|
function u() {
|
|
389
389
|
return {
|
|
390
|
-
height: t.value.tickPadding +
|
|
390
|
+
height: t.value.tickPadding + Kt + Re,
|
|
391
391
|
width: o.value,
|
|
392
392
|
x: -(o.value / 2)
|
|
393
393
|
};
|
|
@@ -422,7 +422,7 @@ const Kt = {
|
|
|
422
422
|
}
|
|
423
423
|
function u(c) {
|
|
424
424
|
var f;
|
|
425
|
-
const s = (((f = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : f.call(c)) || 0) + t.value.tickPadding +
|
|
425
|
+
const s = (((f = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : f.call(c)) || 0) + t.value.tickPadding + Re;
|
|
426
426
|
return {
|
|
427
427
|
width: s,
|
|
428
428
|
height: o.value,
|
|
@@ -453,28 +453,28 @@ const Kt = {
|
|
|
453
453
|
"y-band-scale-axis": zn,
|
|
454
454
|
"x-linear-scale-axis": Wn,
|
|
455
455
|
"y-linear-scale-axis": Zn
|
|
456
|
-
}, Xn = ["transform"], Yn = { key: 0 }, Kn = /* @__PURE__ */
|
|
457
|
-
/* @__PURE__ */
|
|
456
|
+
}, Xn = ["transform"], Yn = { key: 0 }, Kn = /* @__PURE__ */ G("linearGradient", { id: "lume-tick-gradient" }, [
|
|
457
|
+
/* @__PURE__ */ G("stop", {
|
|
458
458
|
offset: "0%",
|
|
459
459
|
"stop-color": "rgba(255,255,255,0)"
|
|
460
460
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ G("stop", {
|
|
462
462
|
offset: "10%",
|
|
463
463
|
"stop-color": "var(--lume-chart-background-color)"
|
|
464
464
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ G("stop", {
|
|
466
466
|
offset: "90%",
|
|
467
467
|
"stop-color": "var(--lume-chart-background-color)"
|
|
468
468
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ G("stop", {
|
|
470
470
|
offset: "100%",
|
|
471
471
|
"stop-color": "rgba(255,255,255,0)"
|
|
472
472
|
})
|
|
473
473
|
], -1), Jn = [
|
|
474
474
|
Kn
|
|
475
475
|
];
|
|
476
|
-
var
|
|
477
|
-
const
|
|
476
|
+
var Qt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Qt || {}), qt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(qt || {}), et = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(et || {});
|
|
477
|
+
const $t = /* @__PURE__ */ Z({
|
|
478
478
|
__name: "lume-axis",
|
|
479
479
|
props: {
|
|
480
480
|
scale: {
|
|
@@ -489,7 +489,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
489
489
|
position: {
|
|
490
490
|
type: String,
|
|
491
491
|
default: void 0,
|
|
492
|
-
validator: (e) => e in
|
|
492
|
+
validator: (e) => e in qt
|
|
493
493
|
},
|
|
494
494
|
containerSize: {
|
|
495
495
|
type: Object,
|
|
@@ -501,45 +501,45 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
501
501
|
},
|
|
502
502
|
orientation: {
|
|
503
503
|
type: String,
|
|
504
|
-
default:
|
|
504
|
+
default: H.VERTICAL
|
|
505
505
|
},
|
|
506
|
-
...
|
|
506
|
+
...Me()
|
|
507
507
|
},
|
|
508
508
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
509
509
|
setup(e, { emit: n }) {
|
|
510
|
-
const o = e, a = n, { scale: u, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o), f = Pe("isEmpty",
|
|
510
|
+
const o = e, a = n, { scale: u, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o), f = Pe("isEmpty", R(!1)), r = Fe({}), m = R(null), g = R(null), p = R(null), b = v(
|
|
511
511
|
() => o.type ? et[o.type] : o.position
|
|
512
512
|
), $ = v(
|
|
513
513
|
() => o.type || (b.value === "left" ? "y" : "x")
|
|
514
514
|
), A = v(
|
|
515
|
-
() => $.value === "x" && s.value ===
|
|
515
|
+
() => $.value === "x" && s.value === H.VERTICAL || $.value === "y" && s.value === H.HORIZONTAL
|
|
516
516
|
), { allOptions: h } = fe(
|
|
517
517
|
c,
|
|
518
518
|
$.value === "x" ? Cn : Pn
|
|
519
|
-
), { showTick: x } =
|
|
520
|
-
var
|
|
521
|
-
return $.value === "y" && f.value && (!u.value ||
|
|
519
|
+
), { showTick: x } = Rn(u, m, h), N = v(() => {
|
|
520
|
+
var M, k, E, _;
|
|
521
|
+
return $.value === "y" && f.value && (!u.value || Tt(u.value)) ? `translate(0, ${((M = l.value) == null ? void 0 : M.height) / 2})` : $.value === "x" && f.value && (!u.value || Tt(u.value)) ? `translate(-${((k = l.value) == null ? void 0 : k.width) / 2}, ${(E = l.value) == null ? void 0 : E.height})` : `translate(0, ${$.value === "x" ? (_ = l.value) == null ? void 0 : _.height : 0})`;
|
|
522
522
|
}), D = v(() => {
|
|
523
523
|
if (!u.value)
|
|
524
524
|
return [];
|
|
525
525
|
if (ve(u.value))
|
|
526
526
|
return u.value.labels || u.value.domain();
|
|
527
|
-
const { tickCount:
|
|
528
|
-
return fn(k, E,
|
|
527
|
+
const { tickCount: M } = h.value, [k, E] = u.value.domain();
|
|
528
|
+
return fn(k, E, M);
|
|
529
529
|
}), P = v(() => {
|
|
530
|
-
const { tickFormat:
|
|
531
|
-
return Ve(
|
|
530
|
+
const { tickFormat: M } = h.value;
|
|
531
|
+
return Ve(M);
|
|
532
532
|
}), w = v(
|
|
533
533
|
() => h.value.withHover && A.value && i.value > -1
|
|
534
|
-
),
|
|
535
|
-
() => h.value.tickPadding +
|
|
534
|
+
), B = v(
|
|
535
|
+
() => h.value.tickPadding + Re || 16
|
|
536
536
|
), Y = v(() => $.value === "x" ? (
|
|
537
537
|
// If x axis, get the tick height
|
|
538
538
|
Math.max(
|
|
539
539
|
...(m.value || []).map(
|
|
540
|
-
(
|
|
540
|
+
(M) => {
|
|
541
541
|
var k, E;
|
|
542
|
-
return ((E = (k =
|
|
542
|
+
return ((E = (k = M.ref).getBBox) == null ? void 0 : E.call(k).height) + B.value;
|
|
543
543
|
}
|
|
544
544
|
)
|
|
545
545
|
)
|
|
@@ -547,33 +547,33 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
547
547
|
// If y axis, get the tick width
|
|
548
548
|
Math.max(
|
|
549
549
|
...(m.value || []).map(
|
|
550
|
-
(
|
|
550
|
+
(M) => {
|
|
551
551
|
var k, E;
|
|
552
|
-
return ((E = (k =
|
|
552
|
+
return ((E = (k = M.ref).getBBox) == null ? void 0 : E.call(k).width) + B.value;
|
|
553
553
|
}
|
|
554
554
|
)
|
|
555
555
|
)
|
|
556
556
|
));
|
|
557
|
-
function K(
|
|
557
|
+
function K(M) {
|
|
558
558
|
const { showTicks: k } = h.value;
|
|
559
|
-
return k === !1 ? "" : P.value(
|
|
559
|
+
return k === !1 ? "" : P.value(M);
|
|
560
560
|
}
|
|
561
|
-
function Q(
|
|
562
|
-
a("mouseenter", { index: A.value ?
|
|
561
|
+
function Q(M, k, E) {
|
|
562
|
+
a("mouseenter", { index: A.value ? M : null, value: k, event: E });
|
|
563
563
|
}
|
|
564
|
-
function F(
|
|
565
|
-
a("click", { index:
|
|
564
|
+
function F(M, k, E) {
|
|
565
|
+
a("click", { index: M, value: k, event: E });
|
|
566
566
|
}
|
|
567
|
-
function ue(
|
|
567
|
+
function ue(M) {
|
|
568
568
|
var k;
|
|
569
569
|
if (!(!m.value || !m.value.length))
|
|
570
|
-
return (k = m.value[
|
|
570
|
+
return (k = m.value[M]) == null ? void 0 : k.ref;
|
|
571
571
|
}
|
|
572
572
|
function Le() {
|
|
573
573
|
p.value = D.value.map(
|
|
574
|
-
(
|
|
575
|
-
value: K(
|
|
576
|
-
group: r.getTickGroupAttributes(
|
|
574
|
+
(M, k) => ({
|
|
575
|
+
value: K(M),
|
|
576
|
+
group: r.getTickGroupAttributes(M, k),
|
|
577
577
|
ghost: r.getTickGhostAttributes(ue(k)),
|
|
578
578
|
label: r.getTickLabelAttributes(),
|
|
579
579
|
gridline: r.getGridLinesAttributes()
|
|
@@ -581,19 +581,19 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
583
|
function ke() {
|
|
584
|
-
p.value && p.value.map((
|
|
584
|
+
p.value && p.value.map((M) => (M.gridline = r.getGridLinesAttributes(), M));
|
|
585
585
|
}
|
|
586
586
|
function $e() {
|
|
587
587
|
if (!u.value)
|
|
588
588
|
return;
|
|
589
|
-
const
|
|
589
|
+
const M = u.value.step ? "bandScale" : "linearScale", k = Un[`${$.value}-${Qt[M]}`];
|
|
590
590
|
Object.entries(k(u, l, h) || []).forEach(
|
|
591
591
|
([E, _]) => {
|
|
592
592
|
r[E] = _;
|
|
593
593
|
}
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
|
-
return U(u, $e, { flush: "sync", immediate: !0 }), U(u, Le, { immediate: !0 }), U(m, Le), U(Y, (
|
|
596
|
+
return U(u, $e, { flush: "sync", immediate: !0 }), U(u, Le, { immediate: !0 }), U(m, Le), U(Y, (M) => a("lume__internal--axis-size", M)), U(o.containerSize, ke), _e(() => ze(g.value)), (M, k) => d(u) ? (y(), O("g", {
|
|
597
597
|
key: 0,
|
|
598
598
|
ref_key: "root",
|
|
599
599
|
ref: g,
|
|
@@ -603,7 +603,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
603
603
|
onMouseleave: k[1] || (k[1] = (E) => a("mouseleave", E))
|
|
604
604
|
}, [
|
|
605
605
|
$.value === "x" ? (y(), O("defs", Yn, Jn)) : z("", !0),
|
|
606
|
-
(y(!0), O(q, null, W(p.value, (E, _) => (y(), X(d(
|
|
606
|
+
(y(!0), O(q, null, W(p.value, (E, _) => (y(), X(d(At), j({
|
|
607
607
|
key: `${E.value}_${_}`,
|
|
608
608
|
ref_for: !0,
|
|
609
609
|
ref_key: "tickRefs",
|
|
@@ -614,7 +614,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
614
614
|
onMouseenter: (V) => Q(_, E.value, V),
|
|
615
615
|
onClick: (V) => F(_, E.value, V)
|
|
616
616
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
617
|
-
w.value ? (y(), X(d(
|
|
617
|
+
w.value ? (y(), X(d(At), j({ key: 1 }, p.value[d(i)], {
|
|
618
618
|
"with-gridlines": !1,
|
|
619
619
|
"is-hovered": "",
|
|
620
620
|
onClick: k[0] || (k[0] = (E) => F(
|
|
@@ -639,7 +639,7 @@ function Qn(e, n, t, o) {
|
|
|
639
639
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: u };
|
|
640
640
|
}
|
|
641
641
|
function qn(e, n, t, o) {
|
|
642
|
-
const a =
|
|
642
|
+
const a = R(0), u = R(0), l = v(() => {
|
|
643
643
|
const i = parseFloat(
|
|
644
644
|
getComputedStyle(document.documentElement).fontSize
|
|
645
645
|
), c = (e.value + t.value / 2) / i, s = (n.value + o.value / 2) / i;
|
|
@@ -687,7 +687,7 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
687
687
|
},
|
|
688
688
|
emits: ["click", "mouseover", "mouseleave"],
|
|
689
689
|
setup(e, { emit: n }) {
|
|
690
|
-
const t = e, o = n, { x: a, y: u, width: l, height: i, transition: c, classList: s } = te(t), f =
|
|
690
|
+
const t = e, o = n, { x: a, y: u, width: l, height: i, transition: c, classList: s } = te(t), f = R(null), r = v(
|
|
691
691
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
692
692
|
), m = v(() => c.value === "width"), g = v(() => c.value === "height"), p = qn(a, u, l, i), { computedX: b, computedY: $, shouldHaveMinWidth: A, shouldHaveMinHeight: h } = Qn(a, u, l, i), x = v(() => A.value ? 1 : (m.value ? p.computedWidth : l).value), N = v(() => h.value ? 1 : (g.value ? p.computedHeight : i).value), D = m.value || g.value ? p.transformOrigin : null;
|
|
693
693
|
return _e(() => ze(f.value)), (P, w) => (y(), O("rect", {
|
|
@@ -702,21 +702,222 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
702
702
|
},
|
|
703
703
|
...r.value
|
|
704
704
|
]]),
|
|
705
|
-
style:
|
|
705
|
+
style: Vt({ transformOrigin: d(D) }),
|
|
706
706
|
x: d(b),
|
|
707
707
|
y: d($),
|
|
708
708
|
width: x.value,
|
|
709
709
|
height: N.value,
|
|
710
710
|
"data-j-bar": "",
|
|
711
|
-
onClick: w[0] || (w[0] = (
|
|
712
|
-
onMouseover: w[1] || (w[1] = (
|
|
713
|
-
onMouseleave: w[2] || (w[2] = (
|
|
711
|
+
onClick: w[0] || (w[0] = (B) => o("click", B)),
|
|
712
|
+
onMouseover: w[1] || (w[1] = (B) => o("mouseover", B)),
|
|
713
|
+
onMouseleave: w[2] || (w[2] = (B) => o("mouseleave", B))
|
|
714
714
|
}, null, 46, eo));
|
|
715
715
|
}
|
|
716
716
|
});
|
|
717
717
|
const dt = /* @__PURE__ */ ee(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
718
|
-
|
|
719
|
-
|
|
718
|
+
var be = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(be || {}), se = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(se || {}), en = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(en || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}), mt = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(mt || {}), ft = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ft || {});
|
|
719
|
+
const no = be.Categorical, Ge = se.Skyblue, oo = vt.SkyTeal;
|
|
720
|
+
function ao(e) {
|
|
721
|
+
return e === be.Divergent ? oo : Ge;
|
|
722
|
+
}
|
|
723
|
+
function lo(e) {
|
|
724
|
+
return Object.values(ft).includes(e);
|
|
725
|
+
}
|
|
726
|
+
function xt(e, n) {
|
|
727
|
+
return n === be.Divergent ? Object.values(vt).includes(e) : Object.values({
|
|
728
|
+
...se,
|
|
729
|
+
...en,
|
|
730
|
+
...mt,
|
|
731
|
+
...ft
|
|
732
|
+
}).includes(e);
|
|
733
|
+
}
|
|
734
|
+
function uo(e, n) {
|
|
735
|
+
const t = Object.values(se).indexOf(e);
|
|
736
|
+
return Dn(Object.values(se), t > -1 ? t : 0)[n];
|
|
737
|
+
}
|
|
738
|
+
function ro(e, n) {
|
|
739
|
+
const t = 50 + n * 10;
|
|
740
|
+
return `${e}-${t}`;
|
|
741
|
+
}
|
|
742
|
+
function io(e, n) {
|
|
743
|
+
const t = (n + 1) * 10;
|
|
744
|
+
return `${e}-${t}`;
|
|
745
|
+
}
|
|
746
|
+
function Ot(e, n, t) {
|
|
747
|
+
switch (n) {
|
|
748
|
+
default:
|
|
749
|
+
case be.Categorical:
|
|
750
|
+
return lo(e) ? e : uo(e, t);
|
|
751
|
+
case be.Sequential:
|
|
752
|
+
return ro(e, t);
|
|
753
|
+
case be.Divergent:
|
|
754
|
+
return io(e, t);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
function so(e, n, t = no, o) {
|
|
758
|
+
return xt(e, t) ? e : (o > 4 && (ge(me.ColorLoop), o = o % 5), xt(n, t) ? Ot(n, t, o) : Ot(ao(t), t, o));
|
|
759
|
+
}
|
|
760
|
+
function co(e) {
|
|
761
|
+
return e.map((n) => xn(n) ? n : { value: n });
|
|
762
|
+
}
|
|
763
|
+
function vo(e) {
|
|
764
|
+
return e.__internal === !0;
|
|
765
|
+
}
|
|
766
|
+
const pt = (e = null) => ({
|
|
767
|
+
data: {
|
|
768
|
+
type: Array,
|
|
769
|
+
required: !0,
|
|
770
|
+
validator: e || void 0
|
|
771
|
+
},
|
|
772
|
+
labels: {
|
|
773
|
+
type: Array,
|
|
774
|
+
default: void 0
|
|
775
|
+
},
|
|
776
|
+
color: {
|
|
777
|
+
type: String,
|
|
778
|
+
default: se.Skyblue
|
|
779
|
+
},
|
|
780
|
+
title: {
|
|
781
|
+
type: String,
|
|
782
|
+
default: null
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
function ht(e, n, t, o, a) {
|
|
786
|
+
const u = Fe({
|
|
787
|
+
width: 0,
|
|
788
|
+
height: 0
|
|
789
|
+
}), l = Bn(12), i = v(() => {
|
|
790
|
+
var f;
|
|
791
|
+
return e.value.length > 5 && ge(me.DatasetLength), (f = e.value) == null ? void 0 : f.map(
|
|
792
|
+
(r, m) => {
|
|
793
|
+
if (vo(r))
|
|
794
|
+
return r;
|
|
795
|
+
const g = co(r.values), p = so(
|
|
796
|
+
r.color,
|
|
797
|
+
t == null ? void 0 : t.value,
|
|
798
|
+
o == null ? void 0 : o.value.colorPalette,
|
|
799
|
+
m
|
|
800
|
+
);
|
|
801
|
+
return {
|
|
802
|
+
...r,
|
|
803
|
+
values: g,
|
|
804
|
+
color: p,
|
|
805
|
+
__internal: !0
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
}), c = v(() => Array.isArray(n.value) ? n.value : Zt(e.value).map((f, r) => r));
|
|
810
|
+
function s(f) {
|
|
811
|
+
const r = (a == null ? void 0 : a.value) === H.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Lt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Lt) || f.height;
|
|
812
|
+
u.width = f.width, u.height = r;
|
|
813
|
+
}
|
|
814
|
+
return {
|
|
815
|
+
chartID: l,
|
|
816
|
+
computedLabels: c,
|
|
817
|
+
containerSize: u,
|
|
818
|
+
internalData: i,
|
|
819
|
+
updateSize: s
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
const mo = () => ({
|
|
823
|
+
xScale: {
|
|
824
|
+
type: Function,
|
|
825
|
+
default: null
|
|
826
|
+
},
|
|
827
|
+
yScale: {
|
|
828
|
+
type: Function,
|
|
829
|
+
default: null
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
function fo(e, n, t, o, a) {
|
|
833
|
+
const u = R(null), l = R(null);
|
|
834
|
+
function i() {
|
|
835
|
+
var f, r, m, g;
|
|
836
|
+
const { width: c, height: s } = t;
|
|
837
|
+
!c && !s || (o.value === H.HORIZONTAL ? (u.value = (f = e.value) != null && f.length ? wt(
|
|
838
|
+
e.value,
|
|
839
|
+
c,
|
|
840
|
+
o.value,
|
|
841
|
+
a.value.startOnZero
|
|
842
|
+
) : null, l.value = (r = n.value) != null && r.length ? It(
|
|
843
|
+
n.value,
|
|
844
|
+
s,
|
|
845
|
+
o.value,
|
|
846
|
+
a.value
|
|
847
|
+
) : null) : (u.value = (m = n.value) != null && m.length ? It(
|
|
848
|
+
n.value,
|
|
849
|
+
c,
|
|
850
|
+
o.value,
|
|
851
|
+
a.value
|
|
852
|
+
) : null, l.value = (g = e.value) != null && g.length ? wt(
|
|
853
|
+
e.value,
|
|
854
|
+
s,
|
|
855
|
+
o.value,
|
|
856
|
+
a.value.startOnZero
|
|
857
|
+
) : null));
|
|
858
|
+
}
|
|
859
|
+
return Ct(i), { xScale: u, yScale: l };
|
|
860
|
+
}
|
|
861
|
+
function It(e, n, t, o) {
|
|
862
|
+
const a = [0, n], { padding: u, paddingInner: l, paddingOuter: i } = o, c = u ?? (t === H.HORIZONTAL ? Yt : Xt);
|
|
863
|
+
return Object.assign(
|
|
864
|
+
Be().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, f) => f)),
|
|
865
|
+
{ labels: e }
|
|
866
|
+
);
|
|
867
|
+
}
|
|
868
|
+
function wt(e, n, t, o) {
|
|
869
|
+
const a = zt(e).filter((f) => f != null), u = [0, n];
|
|
870
|
+
if (a.length === 0)
|
|
871
|
+
return Se().range(u).domain([0, 0]).nice();
|
|
872
|
+
const l = Math.min(...a), i = o && l > 0 ? 0 : l, c = Math.max(...a), s = t === H.HORIZONTAL ? [i, c] : [c, i];
|
|
873
|
+
return Se().range(u).domain(s).nice();
|
|
874
|
+
}
|
|
875
|
+
function Et(e) {
|
|
876
|
+
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
877
|
+
}
|
|
878
|
+
function tt(e, n) {
|
|
879
|
+
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
880
|
+
}
|
|
881
|
+
function Nt(e, n, {
|
|
882
|
+
padding: t,
|
|
883
|
+
paddingInner: o,
|
|
884
|
+
paddingOuter: a
|
|
885
|
+
} = {}) {
|
|
886
|
+
const u = t ?? (n === H.HORIZONTAL ? Yt : Xt);
|
|
887
|
+
return e.copy().paddingInner(o ?? u).paddingOuter(a ?? u);
|
|
888
|
+
}
|
|
889
|
+
function gt(e) {
|
|
890
|
+
return Object.values(H).includes(e);
|
|
891
|
+
}
|
|
892
|
+
const Ee = (e, n = !0) => ({
|
|
893
|
+
...pt(e),
|
|
894
|
+
...mo(),
|
|
895
|
+
...Me(),
|
|
896
|
+
classList: {
|
|
897
|
+
type: [String, Array],
|
|
898
|
+
default: () => []
|
|
899
|
+
},
|
|
900
|
+
hoveredIndex: {
|
|
901
|
+
type: Number,
|
|
902
|
+
default: null
|
|
903
|
+
},
|
|
904
|
+
...n ? {
|
|
905
|
+
orientation: {
|
|
906
|
+
type: String,
|
|
907
|
+
default: H.VERTICAL,
|
|
908
|
+
validator: gt
|
|
909
|
+
}
|
|
910
|
+
} : {}
|
|
911
|
+
}), po = (e) => ({
|
|
912
|
+
...pt(e),
|
|
913
|
+
...Me(),
|
|
914
|
+
hoveredElement: {
|
|
915
|
+
type: [Number, String],
|
|
916
|
+
default: null
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
function ho() {
|
|
920
|
+
const e = R(), n = Fe({
|
|
720
921
|
dimensions: {}
|
|
721
922
|
}), t = new ResizeObserver((o) => {
|
|
722
923
|
o.forEach((a) => {
|
|
@@ -725,11 +926,11 @@ function no() {
|
|
|
725
926
|
});
|
|
726
927
|
return _e(() => {
|
|
727
928
|
t.observe(e.value);
|
|
728
|
-
}),
|
|
929
|
+
}), Pt(() => {
|
|
729
930
|
t.unobserve(e.value);
|
|
730
931
|
}), { resizeState: n, resizeRef: e };
|
|
731
932
|
}
|
|
732
|
-
const
|
|
933
|
+
const go = ["height"], _o = ["transform"], yo = /* @__PURE__ */ Z({
|
|
733
934
|
__name: "lume-chart-container",
|
|
734
935
|
props: {
|
|
735
936
|
margins: {
|
|
@@ -747,18 +948,23 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
747
948
|
noMinSize: {
|
|
748
949
|
type: Boolean,
|
|
749
950
|
default: !1
|
|
951
|
+
},
|
|
952
|
+
orientation: {
|
|
953
|
+
type: String,
|
|
954
|
+
default: H.VERTICAL,
|
|
955
|
+
validator: gt
|
|
750
956
|
}
|
|
751
957
|
},
|
|
752
958
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
753
959
|
setup(e, { emit: n }) {
|
|
754
|
-
const t = e, o = n, { margins: a, containerSize: u } = te(t), l =
|
|
960
|
+
const t = e, o = n, { margins: a, containerSize: u } = te(t), l = R(null), { resizeRef: i, resizeState: c } = ho(), s = v(
|
|
755
961
|
() => u.value.height + a.value.top + a.value.bottom
|
|
756
962
|
);
|
|
757
963
|
return Ct(() => {
|
|
758
964
|
if (!l.value)
|
|
759
965
|
return;
|
|
760
966
|
const { width: f } = c.dimensions, { height: r } = l.value.getBoundingClientRect();
|
|
761
|
-
if (!f || !r)
|
|
967
|
+
if (!f || t.orientation === H.VERTICAL && !r)
|
|
762
968
|
return;
|
|
763
969
|
const m = f - a.value.left - a.value.right, g = r - a.value.top - a.value.bottom, p = {
|
|
764
970
|
width: m > 0 ? m : 0,
|
|
@@ -775,7 +981,7 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
775
981
|
}]),
|
|
776
982
|
"data-j-chart-container": ""
|
|
777
983
|
}, [
|
|
778
|
-
|
|
984
|
+
S(f.$slots, "header", {}, void 0, !0),
|
|
779
985
|
(y(), O("svg", {
|
|
780
986
|
ref_key: "root",
|
|
781
987
|
ref: l,
|
|
@@ -788,20 +994,20 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
788
994
|
onMouseenter: r[1] || (r[1] = (m) => o("mouseenter", m)),
|
|
789
995
|
onMouseleave: r[2] || (r[2] = (m) => o("mouseleave", m))
|
|
790
996
|
}, [
|
|
791
|
-
|
|
997
|
+
G("g", {
|
|
792
998
|
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
793
999
|
class: "lume-chart-container__group",
|
|
794
1000
|
"data-j-chart-container__group": ""
|
|
795
1001
|
}, [
|
|
796
|
-
|
|
797
|
-
], 8,
|
|
798
|
-
], 42,
|
|
799
|
-
|
|
800
|
-
|
|
1002
|
+
S(f.$slots, "default", {}, void 0, !0)
|
|
1003
|
+
], 8, _o)
|
|
1004
|
+
], 42, go)),
|
|
1005
|
+
S(f.$slots, "footer", {}, void 0, !0),
|
|
1006
|
+
S(f.$slots, "extra", {}, void 0, !0)
|
|
801
1007
|
], 2));
|
|
802
1008
|
}
|
|
803
1009
|
});
|
|
804
|
-
const
|
|
1010
|
+
const ko = /* @__PURE__ */ ee(yo, [["__scopeId", "data-v-d53cdc3e"]]), bo = ["onClick", "onMouseenter"], Ao = /* @__PURE__ */ Z({
|
|
805
1011
|
__name: "lume-chart-legend",
|
|
806
1012
|
props: {
|
|
807
1013
|
data: {
|
|
@@ -826,47 +1032,47 @@ const uo = /* @__PURE__ */ ee(lo, [["__scopeId", "data-v-c82b22db"]]), ro = ["on
|
|
|
826
1032
|
onClick: (i) => t("click", { index: l, dataset: u, event: i }),
|
|
827
1033
|
onMouseenter: (i) => t("mouseenter", { index: l, dataset: u, event: i })
|
|
828
1034
|
}, [
|
|
829
|
-
|
|
1035
|
+
G("span", {
|
|
830
1036
|
class: ne(["lume-chart-legend__symbol", `lume-background-color--${u.color}`]),
|
|
831
1037
|
"data-j-chart-legend__symbol": ""
|
|
832
1038
|
}, null, 2),
|
|
833
1039
|
ce(" " + oe(u.label || l), 1)
|
|
834
|
-
], 40,
|
|
1040
|
+
], 40, bo))), 128))
|
|
835
1041
|
], 32));
|
|
836
1042
|
}
|
|
837
1043
|
});
|
|
838
|
-
const
|
|
839
|
-
const
|
|
1044
|
+
const Dt = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-6f1d1c44"]]);
|
|
1045
|
+
const To = {}, Lo = {
|
|
840
1046
|
class: "lume-tooltip__title",
|
|
841
1047
|
"data-j-tooltip__title": ""
|
|
842
1048
|
};
|
|
843
|
-
function
|
|
844
|
-
return y(), O("div",
|
|
845
|
-
|
|
1049
|
+
function $o(e, n) {
|
|
1050
|
+
return y(), O("div", Lo, [
|
|
1051
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
846
1052
|
]);
|
|
847
1053
|
}
|
|
848
|
-
const
|
|
849
|
-
const
|
|
1054
|
+
const xo = /* @__PURE__ */ ee(To, [["render", $o], ["__scopeId", "data-v-8af3fac6"]]);
|
|
1055
|
+
const Oo = {}, Io = {
|
|
850
1056
|
class: "lume-tooltip__item",
|
|
851
1057
|
"data-j-tooltip__summary-item": ""
|
|
852
|
-
},
|
|
853
|
-
function
|
|
854
|
-
return y(), O("li",
|
|
855
|
-
|
|
856
|
-
|
|
1058
|
+
}, wo = { class: "lume-tooltip__value" };
|
|
1059
|
+
function Eo(e, n) {
|
|
1060
|
+
return y(), O("li", Io, [
|
|
1061
|
+
G("span", null, [
|
|
1062
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
857
1063
|
]),
|
|
858
|
-
|
|
859
|
-
|
|
1064
|
+
G("strong", wo, [
|
|
1065
|
+
S(e.$slots, "value", {}, void 0, !0)
|
|
860
1066
|
])
|
|
861
1067
|
]);
|
|
862
1068
|
}
|
|
863
|
-
const
|
|
1069
|
+
const No = /* @__PURE__ */ ee(Oo, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b"]]), Do = {
|
|
864
1070
|
class: "lume-tooltip__item",
|
|
865
1071
|
"data-j-tooltip__item": ""
|
|
866
|
-
},
|
|
1072
|
+
}, Ho = { "data-j-tooltip__item__label": "" }, Bo = {
|
|
867
1073
|
class: "lume-tooltip__value",
|
|
868
1074
|
"data-j-tooltip__item__value": ""
|
|
869
|
-
},
|
|
1075
|
+
}, So = /* @__PURE__ */ Z({
|
|
870
1076
|
__name: "lume-tooltip-item",
|
|
871
1077
|
props: {
|
|
872
1078
|
color: {
|
|
@@ -875,27 +1081,27 @@ const _o = /* @__PURE__ */ ee(fo, [["render", go], ["__scopeId", "data-v-4ed7ec1
|
|
|
875
1081
|
}
|
|
876
1082
|
},
|
|
877
1083
|
setup(e) {
|
|
878
|
-
return (n, t) => (y(), O("li",
|
|
1084
|
+
return (n, t) => (y(), O("li", Do, [
|
|
879
1085
|
e.color ? (y(), O("span", {
|
|
880
1086
|
key: 0,
|
|
881
1087
|
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
882
1088
|
"data-j-tooltip__item__symbol": ""
|
|
883
1089
|
}, null, 2)) : z("", !0),
|
|
884
|
-
|
|
885
|
-
|
|
1090
|
+
G("span", Ho, [
|
|
1091
|
+
S(n.$slots, "label", {}, void 0, !0)
|
|
886
1092
|
]),
|
|
887
|
-
|
|
888
|
-
|
|
1093
|
+
G("strong", Bo, [
|
|
1094
|
+
S(n.$slots, "value", {}, void 0, !0)
|
|
889
1095
|
])
|
|
890
1096
|
]));
|
|
891
1097
|
}
|
|
892
1098
|
});
|
|
893
|
-
const
|
|
1099
|
+
const Mo = /* @__PURE__ */ ee(So, [["__scopeId", "data-v-4f995c3c"]]), Ro = (e) => (cn("data-v-e7c90551"), e = e(), dn(), e), Go = { class: "lume-tooltip__items" }, jo = {
|
|
894
1100
|
key: 0,
|
|
895
1101
|
class: "lume-tooltip__break"
|
|
896
|
-
},
|
|
897
|
-
|
|
898
|
-
],
|
|
1102
|
+
}, Vo = /* @__PURE__ */ Ro(() => /* @__PURE__ */ G("hr", null, null, -1)), Co = [
|
|
1103
|
+
Vo
|
|
1104
|
+
], Po = /* @__PURE__ */ Z({
|
|
899
1105
|
__name: "lume-tooltip",
|
|
900
1106
|
props: {
|
|
901
1107
|
opened: {
|
|
@@ -935,11 +1141,11 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
935
1141
|
type: String,
|
|
936
1142
|
default: null
|
|
937
1143
|
},
|
|
938
|
-
...
|
|
1144
|
+
...Me()
|
|
939
1145
|
},
|
|
940
1146
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
941
1147
|
setup(e, { emit: n }) {
|
|
942
|
-
const t = e, o = n, a =
|
|
1148
|
+
const t = e, o = n, a = R(null), { items: u, options: l } = te(t), i = re(), c = R(null), { allOptions: s } = fe(l), f = v(
|
|
943
1149
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
944
1150
|
), r = v(
|
|
945
1151
|
() => f.value ? "fixed" : "absolute"
|
|
@@ -986,7 +1192,7 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
986
1192
|
async (P, w) => {
|
|
987
1193
|
!w && P ? (await Qe(), x()) : D();
|
|
988
1194
|
}
|
|
989
|
-
), _e(x),
|
|
1195
|
+
), _e(x), Pt(N), (P, w) => e.opened && e.targetElement ? (y(), O("div", {
|
|
990
1196
|
key: 0,
|
|
991
1197
|
ref_key: "root",
|
|
992
1198
|
ref: a,
|
|
@@ -994,21 +1200,21 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
994
1200
|
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
995
1201
|
}]),
|
|
996
1202
|
"data-j-tooltip": "",
|
|
997
|
-
onMouseenter: w[0] || (w[0] = (
|
|
998
|
-
onMouseleave: w[1] || (w[1] = (
|
|
1203
|
+
onMouseenter: w[0] || (w[0] = (B) => o("tooltip-mouseenter")),
|
|
1204
|
+
onMouseleave: w[1] || (w[1] = (B) => o("tooltip-mouseleave"))
|
|
999
1205
|
}, [
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
g.value ? (y(), X(d(
|
|
1206
|
+
S(P.$slots, "default", {}, () => [
|
|
1207
|
+
S(P.$slots, "title", {}, () => [
|
|
1208
|
+
g.value ? (y(), X(d(xo), { key: 0 }, {
|
|
1003
1209
|
default: C(() => [
|
|
1004
1210
|
ce(oe(b.value(e.title)), 1)
|
|
1005
1211
|
]),
|
|
1006
1212
|
_: 1
|
|
1007
1213
|
})) : z("", !0)
|
|
1008
1214
|
], !0),
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
A.value ? (y(), X(d(
|
|
1215
|
+
G("ul", Go, [
|
|
1216
|
+
S(P.$slots, "summary", {}, () => [
|
|
1217
|
+
A.value ? (y(), X(d(No), { key: 0 }, de({
|
|
1012
1218
|
default: C(() => [
|
|
1013
1219
|
ce(oe($.value.label) + " ", 1)
|
|
1014
1220
|
]),
|
|
@@ -1023,17 +1229,17 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
1023
1229
|
} : void 0
|
|
1024
1230
|
]), 1024)) : z("", !0)
|
|
1025
1231
|
], !0),
|
|
1026
|
-
A.value ? (y(), O("li",
|
|
1027
|
-
|
|
1028
|
-
(y(!0), O(q, null, W(h.value, (
|
|
1029
|
-
key:
|
|
1030
|
-
color:
|
|
1232
|
+
A.value ? (y(), O("li", jo, Co)) : z("", !0),
|
|
1233
|
+
S(P.$slots, "items", {}, () => [
|
|
1234
|
+
(y(!0), O(q, null, W(h.value, (B) => (y(), X(d(Mo), {
|
|
1235
|
+
key: B.label,
|
|
1236
|
+
color: B.color
|
|
1031
1237
|
}, {
|
|
1032
1238
|
label: C(() => [
|
|
1033
|
-
ce(oe(
|
|
1239
|
+
ce(oe(B.label), 1)
|
|
1034
1240
|
]),
|
|
1035
1241
|
value: C(() => [
|
|
1036
|
-
ce(oe(p.value(
|
|
1242
|
+
ce(oe(p.value(B.value)), 1)
|
|
1037
1243
|
]),
|
|
1038
1244
|
_: 2
|
|
1039
1245
|
}, 1032, ["color"]))), 128))
|
|
@@ -1043,208 +1249,7 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
1043
1249
|
], 34)) : z("", !0);
|
|
1044
1250
|
}
|
|
1045
1251
|
});
|
|
1046
|
-
const
|
|
1047
|
-
var be = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(be || {}), se = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(se || {}), qt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(qt || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}), mt = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(mt || {}), ft = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ft || {});
|
|
1048
|
-
const No = be.Categorical, Re = se.Skyblue, Do = vt.SkyTeal;
|
|
1049
|
-
function Ho(e) {
|
|
1050
|
-
return e === be.Divergent ? Do : Re;
|
|
1051
|
-
}
|
|
1052
|
-
function Bo(e) {
|
|
1053
|
-
return Object.values(ft).includes(e);
|
|
1054
|
-
}
|
|
1055
|
-
function xt(e, n) {
|
|
1056
|
-
return n === be.Divergent ? Object.values(vt).includes(e) : Object.values({
|
|
1057
|
-
...se,
|
|
1058
|
-
...qt,
|
|
1059
|
-
...mt,
|
|
1060
|
-
...ft
|
|
1061
|
-
}).includes(e);
|
|
1062
|
-
}
|
|
1063
|
-
function Mo(e, n) {
|
|
1064
|
-
const t = Object.values(se).indexOf(e);
|
|
1065
|
-
return Dn(Object.values(se), t > -1 ? t : 0)[n];
|
|
1066
|
-
}
|
|
1067
|
-
function So(e, n) {
|
|
1068
|
-
const t = 50 + n * 10;
|
|
1069
|
-
return `${e}-${t}`;
|
|
1070
|
-
}
|
|
1071
|
-
function Go(e, n) {
|
|
1072
|
-
const t = (n + 1) * 10;
|
|
1073
|
-
return `${e}-${t}`;
|
|
1074
|
-
}
|
|
1075
|
-
function Ot(e, n, t) {
|
|
1076
|
-
switch (n) {
|
|
1077
|
-
default:
|
|
1078
|
-
case be.Categorical:
|
|
1079
|
-
return Bo(e) ? e : Mo(e, t);
|
|
1080
|
-
case be.Sequential:
|
|
1081
|
-
return So(e, t);
|
|
1082
|
-
case be.Divergent:
|
|
1083
|
-
return Go(e, t);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
function Ro(e, n, t = No, o) {
|
|
1087
|
-
return xt(e, t) ? e : (o > 4 && (ge(me.ColorLoop), o = o % 5), xt(n, t) ? Ot(n, t, o) : Ot(Ho(t), t, o));
|
|
1088
|
-
}
|
|
1089
|
-
function jo(e) {
|
|
1090
|
-
return e.map((n) => xn(n) ? n : { value: n });
|
|
1091
|
-
}
|
|
1092
|
-
function Vo(e) {
|
|
1093
|
-
return e.__internal === !0;
|
|
1094
|
-
}
|
|
1095
|
-
const pt = (e = null) => ({
|
|
1096
|
-
data: {
|
|
1097
|
-
type: Array,
|
|
1098
|
-
required: !0,
|
|
1099
|
-
validator: e || void 0
|
|
1100
|
-
},
|
|
1101
|
-
labels: {
|
|
1102
|
-
type: Array,
|
|
1103
|
-
default: void 0
|
|
1104
|
-
},
|
|
1105
|
-
color: {
|
|
1106
|
-
type: String,
|
|
1107
|
-
default: se.Skyblue
|
|
1108
|
-
},
|
|
1109
|
-
title: {
|
|
1110
|
-
type: String,
|
|
1111
|
-
default: null
|
|
1112
|
-
}
|
|
1113
|
-
});
|
|
1114
|
-
function ht(e, n, t, o, a) {
|
|
1115
|
-
const u = Fe({
|
|
1116
|
-
width: 0,
|
|
1117
|
-
height: 0
|
|
1118
|
-
}), l = Bn(12), i = v(() => {
|
|
1119
|
-
var f;
|
|
1120
|
-
return e.value.length > 5 && ge(me.DatasetLength), (f = e.value) == null ? void 0 : f.map(
|
|
1121
|
-
(r, m) => {
|
|
1122
|
-
if (Vo(r))
|
|
1123
|
-
return r;
|
|
1124
|
-
const g = jo(r.values), p = Ro(
|
|
1125
|
-
r.color,
|
|
1126
|
-
t == null ? void 0 : t.value,
|
|
1127
|
-
o == null ? void 0 : o.value.colorPalette,
|
|
1128
|
-
m
|
|
1129
|
-
);
|
|
1130
|
-
return {
|
|
1131
|
-
...r,
|
|
1132
|
-
values: g,
|
|
1133
|
-
color: p,
|
|
1134
|
-
__internal: !0
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
);
|
|
1138
|
-
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((f, r) => r));
|
|
1139
|
-
function s(f) {
|
|
1140
|
-
const r = (a == null ? void 0 : a.value) === B.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) || f.height;
|
|
1141
|
-
u.width = f.width, u.height = r;
|
|
1142
|
-
}
|
|
1143
|
-
return {
|
|
1144
|
-
chartID: l,
|
|
1145
|
-
computedLabels: c,
|
|
1146
|
-
containerSize: u,
|
|
1147
|
-
internalData: i,
|
|
1148
|
-
updateSize: s
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
|
-
const Co = () => ({
|
|
1152
|
-
xScale: {
|
|
1153
|
-
type: Function,
|
|
1154
|
-
default: null
|
|
1155
|
-
},
|
|
1156
|
-
yScale: {
|
|
1157
|
-
type: Function,
|
|
1158
|
-
default: null
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
function Po(e, n, t, o, a) {
|
|
1162
|
-
const u = G(null), l = G(null);
|
|
1163
|
-
function i() {
|
|
1164
|
-
var f, r, m, g;
|
|
1165
|
-
const { width: c, height: s } = t;
|
|
1166
|
-
!c && !s || (o.value === B.HORIZONTAL ? (u.value = (f = e.value) != null && f.length ? wt(
|
|
1167
|
-
e.value,
|
|
1168
|
-
c,
|
|
1169
|
-
o.value,
|
|
1170
|
-
a.value.startOnZero
|
|
1171
|
-
) : null, l.value = (r = n.value) != null && r.length ? It(
|
|
1172
|
-
n.value,
|
|
1173
|
-
s,
|
|
1174
|
-
o.value,
|
|
1175
|
-
a.value
|
|
1176
|
-
) : null) : (u.value = (m = n.value) != null && m.length ? It(
|
|
1177
|
-
n.value,
|
|
1178
|
-
c,
|
|
1179
|
-
o.value,
|
|
1180
|
-
a.value
|
|
1181
|
-
) : null, l.value = (g = e.value) != null && g.length ? wt(
|
|
1182
|
-
e.value,
|
|
1183
|
-
s,
|
|
1184
|
-
o.value,
|
|
1185
|
-
a.value.startOnZero
|
|
1186
|
-
) : null));
|
|
1187
|
-
}
|
|
1188
|
-
return Ct(i), { xScale: u, yScale: l };
|
|
1189
|
-
}
|
|
1190
|
-
function It(e, n, t, o) {
|
|
1191
|
-
const a = [0, n], { padding: u, paddingInner: l, paddingOuter: i } = o, c = u ?? (t === B.HORIZONTAL ? Xt : Ut);
|
|
1192
|
-
return Object.assign(
|
|
1193
|
-
Be().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, f) => f)),
|
|
1194
|
-
{ labels: e }
|
|
1195
|
-
);
|
|
1196
|
-
}
|
|
1197
|
-
function wt(e, n, t, o) {
|
|
1198
|
-
const a = Ft(e).filter((f) => f != null), u = [0, n];
|
|
1199
|
-
if (a.length === 0)
|
|
1200
|
-
return Me().range(u).domain([0, 0]).nice();
|
|
1201
|
-
const l = Math.min(...a), i = o && l > 0 ? 0 : l, c = Math.max(...a), s = t === B.HORIZONTAL ? [i, c] : [c, i];
|
|
1202
|
-
return Me().range(u).domain(s).nice();
|
|
1203
|
-
}
|
|
1204
|
-
function Et(e) {
|
|
1205
|
-
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1206
|
-
}
|
|
1207
|
-
function tt(e, n) {
|
|
1208
|
-
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1209
|
-
}
|
|
1210
|
-
function Nt(e, n, {
|
|
1211
|
-
padding: t,
|
|
1212
|
-
paddingInner: o,
|
|
1213
|
-
paddingOuter: a
|
|
1214
|
-
} = {}) {
|
|
1215
|
-
const u = t ?? (n === B.HORIZONTAL ? Xt : Ut);
|
|
1216
|
-
return e.copy().paddingInner(o ?? u).paddingOuter(a ?? u);
|
|
1217
|
-
}
|
|
1218
|
-
function en(e) {
|
|
1219
|
-
return Object.values(B).includes(e);
|
|
1220
|
-
}
|
|
1221
|
-
const Ee = (e, n = !0) => ({
|
|
1222
|
-
...pt(e),
|
|
1223
|
-
...Co(),
|
|
1224
|
-
...Se(),
|
|
1225
|
-
classList: {
|
|
1226
|
-
type: [String, Array],
|
|
1227
|
-
default: () => []
|
|
1228
|
-
},
|
|
1229
|
-
hoveredIndex: {
|
|
1230
|
-
type: Number,
|
|
1231
|
-
default: null
|
|
1232
|
-
},
|
|
1233
|
-
...n ? {
|
|
1234
|
-
orientation: {
|
|
1235
|
-
type: String,
|
|
1236
|
-
default: B.VERTICAL,
|
|
1237
|
-
validator: en
|
|
1238
|
-
}
|
|
1239
|
-
} : {}
|
|
1240
|
-
}), Fo = (e) => ({
|
|
1241
|
-
...pt(e),
|
|
1242
|
-
...Se(),
|
|
1243
|
-
hoveredElement: {
|
|
1244
|
-
type: [Number, String],
|
|
1245
|
-
default: null
|
|
1246
|
-
}
|
|
1247
|
-
}), We = () => ({
|
|
1252
|
+
const Fo = /* @__PURE__ */ ee(Po, [["__scopeId", "data-v-e7c90551"]]), We = () => ({
|
|
1248
1253
|
data: {
|
|
1249
1254
|
type: Array,
|
|
1250
1255
|
required: !0
|
|
@@ -1259,8 +1264,8 @@ const Ee = (e, n = !0) => ({
|
|
|
1259
1264
|
},
|
|
1260
1265
|
orientation: {
|
|
1261
1266
|
type: String,
|
|
1262
|
-
default:
|
|
1263
|
-
validator:
|
|
1267
|
+
default: H.VERTICAL,
|
|
1268
|
+
validator: gt
|
|
1264
1269
|
},
|
|
1265
1270
|
xScale: {
|
|
1266
1271
|
type: Function,
|
|
@@ -1292,16 +1297,16 @@ const Ee = (e, n = !0) => ({
|
|
|
1292
1297
|
...We(),
|
|
1293
1298
|
orientation: {
|
|
1294
1299
|
type: String,
|
|
1295
|
-
default:
|
|
1300
|
+
default: H.VERTICAL
|
|
1296
1301
|
}
|
|
1297
1302
|
},
|
|
1298
1303
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1299
1304
|
setup(e, { emit: n }) {
|
|
1300
|
-
const t = e, o = n, { data: a, orientation: u, xScale: l, yScale: i } = te(t), c = v(() =>
|
|
1305
|
+
const t = e, o = n, { data: a, orientation: u, xScale: l, yScale: i } = te(t), c = v(() => Zt(a));
|
|
1301
1306
|
function s(f) {
|
|
1302
1307
|
var A;
|
|
1303
|
-
const r = u.value ===
|
|
1304
|
-
return u.value ===
|
|
1308
|
+
const r = u.value === H.HORIZONTAL ? i.value : l.value, m = r.domain(), g = On(r), p = ((A = r.paddingInner) == null ? void 0 : A.call(r)) ?? 0, b = g * p, $ = ve(r) ? r(m[f]) - b / 2 : r(f) - g / 2;
|
|
1309
|
+
return u.value === H.HORIZONTAL ? {
|
|
1305
1310
|
width: Math.max(...l.value.range()),
|
|
1306
1311
|
height: g,
|
|
1307
1312
|
transform: `translate(0, ${$})`
|
|
@@ -1331,12 +1336,12 @@ const Ee = (e, n = !0) => ({
|
|
|
1331
1336
|
};
|
|
1332
1337
|
function Zo(e) {
|
|
1333
1338
|
return { hasNegativeValues: v(
|
|
1334
|
-
() =>
|
|
1339
|
+
() => zt(e.value).some((t) => t < 0)
|
|
1335
1340
|
) };
|
|
1336
1341
|
}
|
|
1337
1342
|
function Uo(e, n, t, o) {
|
|
1338
1343
|
const a = v(
|
|
1339
|
-
() => o.value ===
|
|
1344
|
+
() => o.value === H.HORIZONTAL
|
|
1340
1345
|
), u = v(
|
|
1341
1346
|
() => {
|
|
1342
1347
|
var s;
|
|
@@ -1372,7 +1377,7 @@ function Yo(e, n) {
|
|
|
1372
1377
|
}
|
|
1373
1378
|
), []);
|
|
1374
1379
|
}
|
|
1375
|
-
const
|
|
1380
|
+
const Ht = {
|
|
1376
1381
|
"stacked-bar": Yo
|
|
1377
1382
|
};
|
|
1378
1383
|
function tn(e, n, t, o, a, u, l, i) {
|
|
@@ -1384,13 +1389,13 @@ function tn(e, n, t, o, a, u, l, i) {
|
|
|
1384
1389
|
);
|
|
1385
1390
|
function s(f) {
|
|
1386
1391
|
var g;
|
|
1387
|
-
const r = ((g = a == null ? void 0 : a.value) == null ? void 0 : g.length) ?? 0, m = i != null && i.value &&
|
|
1392
|
+
const r = ((g = a == null ? void 0 : a.value) == null ? void 0 : g.length) ?? 0, m = i != null && i.value && Ht[i.value] ? Ht[i.value](
|
|
1388
1393
|
f,
|
|
1389
1394
|
r
|
|
1390
1395
|
) : Xo(f, r);
|
|
1391
1396
|
e.value = m.map((p, b) => ({
|
|
1392
|
-
cx: (u == null ? void 0 : u.value) ===
|
|
1393
|
-
cy: (u == null ? void 0 : u.value) ===
|
|
1397
|
+
cx: (u == null ? void 0 : u.value) === H.HORIZONTAL ? t.value(p) : tt(t.value, b),
|
|
1398
|
+
cy: (u == null ? void 0 : u.value) === H.HORIZONTAL ? tt(o.value, b) : o.value(p)
|
|
1394
1399
|
}));
|
|
1395
1400
|
}
|
|
1396
1401
|
return U(
|
|
@@ -1419,7 +1424,7 @@ function Jo(e) {
|
|
|
1419
1424
|
return {
|
|
1420
1425
|
color: ((l = u[t]) == null ? void 0 : l.color) || o,
|
|
1421
1426
|
label: a,
|
|
1422
|
-
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((c = u[t]) == null ? void 0 : c.value) ??
|
|
1427
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((c = u[t]) == null ? void 0 : c.value) ?? Ut
|
|
1423
1428
|
};
|
|
1424
1429
|
})
|
|
1425
1430
|
) };
|
|
@@ -1469,7 +1474,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1469
1474
|
}
|
|
1470
1475
|
},
|
|
1471
1476
|
setup(e, { emit: n }) {
|
|
1472
|
-
const t = e, o = re(), a = n, { data: u, labels: l, color: i, options: c, orientation: s, chartType: f } = te(t), r =
|
|
1477
|
+
const t = e, o = re(), a = n, { data: u, labels: l, color: i, options: c, orientation: s, chartType: f } = te(t), r = R(-1), m = R(null), g = R(null), p = R([]), b = R(null), $ = R(0), A = R(0), { allOptions: h } = fe(c), { internalData: x, computedLabels: N, containerSize: D, updateSize: P, chartID: w } = ht(u, l, i, h, s), { xScale: B, yScale: Y } = fo(
|
|
1473
1478
|
x,
|
|
1474
1479
|
N,
|
|
1475
1480
|
D,
|
|
@@ -1482,23 +1487,23 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1482
1487
|
left: ta(h.value.margins, A.value)
|
|
1483
1488
|
})), Q = v(() => {
|
|
1484
1489
|
var T;
|
|
1485
|
-
return t.xScale ? Et(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, x.value, l.value, D) :
|
|
1490
|
+
return t.xScale ? Et(t.xScale) ? t.xScale : (T = t.xScale) == null ? void 0 : T.call(t, x.value, l.value, D) : B.value;
|
|
1486
1491
|
}), F = v(() => {
|
|
1487
1492
|
var T;
|
|
1488
1493
|
return t.yScale ? Et(t.yScale) ? t.yScale : (T = t.yScale) == null ? void 0 : T.call(t, x.value, l.value, D) : Y.value;
|
|
1489
1494
|
}), ue = v(() => ({
|
|
1490
1495
|
...h.value.xAxisOptions,
|
|
1491
|
-
withHover: s.value ===
|
|
1496
|
+
withHover: s.value === H.VERTICAL
|
|
1492
1497
|
})), Le = v(() => ({
|
|
1493
1498
|
...h.value.yAxisOptions,
|
|
1494
|
-
withHover: s.value ===
|
|
1499
|
+
withHover: s.value === H.HORIZONTAL
|
|
1495
1500
|
})), ke = v(() => {
|
|
1496
1501
|
var T;
|
|
1497
1502
|
return (T = h.value.xAxisOptions) == null ? void 0 : T.title;
|
|
1498
1503
|
}), $e = v(() => {
|
|
1499
1504
|
var T;
|
|
1500
1505
|
return (T = h.value.yAxisOptions) == null ? void 0 : T.title;
|
|
1501
|
-
}),
|
|
1506
|
+
}), M = v(() => {
|
|
1502
1507
|
var T;
|
|
1503
1508
|
return ((T = h.value.xAxisOptions) == null ? void 0 : T.withTitle) !== !1 && ke.value;
|
|
1504
1509
|
}), k = v(() => {
|
|
@@ -1547,7 +1552,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1547
1552
|
function Xe() {
|
|
1548
1553
|
Ue(), r.value = -1, a("update:hoveredIndex", -1);
|
|
1549
1554
|
}
|
|
1550
|
-
function
|
|
1555
|
+
function yt(T) {
|
|
1551
1556
|
if (!u.value.some(
|
|
1552
1557
|
({ values: I }) => T <= I.length - 1
|
|
1553
1558
|
)) {
|
|
@@ -1564,10 +1569,10 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1564
1569
|
function sn(T) {
|
|
1565
1570
|
P(T), a("resize", T);
|
|
1566
1571
|
}
|
|
1567
|
-
function
|
|
1572
|
+
function kt({ index: T, value: L, event: I }) {
|
|
1568
1573
|
T !== null && je(T), a("axis-mouseenter", { index: T, value: L, event: I });
|
|
1569
1574
|
}
|
|
1570
|
-
function
|
|
1575
|
+
function bt({ index: T, value: L, event: I }) {
|
|
1571
1576
|
a("axis-click", { index: T, value: L, event: I });
|
|
1572
1577
|
}
|
|
1573
1578
|
return U(
|
|
@@ -1576,17 +1581,17 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1576
1581
|
), U(
|
|
1577
1582
|
l,
|
|
1578
1583
|
(T, L) => a("labels-changed", { newValue: T, oldValue: L })
|
|
1579
|
-
), U(E, (T) => T && ge(me.Empty), { immediate: !0 }), U(() => t.hoveredIndex,
|
|
1584
|
+
), U(E, (T) => T && ge(me.Empty), { immediate: !0 }), U(() => t.hoveredIndex, yt), U(
|
|
1580
1585
|
p,
|
|
1581
1586
|
(T) => {
|
|
1582
|
-
T && t.hoveredIndex != null && r.value === -1 &&
|
|
1587
|
+
T && t.hoveredIndex != null && r.value === -1 && yt(t.hoveredIndex);
|
|
1583
1588
|
},
|
|
1584
1589
|
{ flush: "post" }
|
|
1585
1590
|
), U(b, (T) => {
|
|
1586
1591
|
T === !1 && De.opened && Xe();
|
|
1587
1592
|
}), _e(async () => {
|
|
1588
1593
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1589
|
-
}), Ke("chartID", w), Ke("isEmpty", E), Ke("tooltipAnchorAttributes", p), (T, L) => (y(), X(d(
|
|
1594
|
+
}), Ke("chartID", w), Ke("isEmpty", E), Ke("tooltipAnchorAttributes", p), (T, L) => (y(), X(d(ko), {
|
|
1590
1595
|
id: `lume-chart_${d(w)}`,
|
|
1591
1596
|
ref_key: "chartContainer",
|
|
1592
1597
|
ref: g,
|
|
@@ -1594,6 +1599,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1594
1599
|
"container-size": d(D),
|
|
1595
1600
|
"no-min-size": d(h).noMinSize,
|
|
1596
1601
|
"transparent-background": d(h).transparentBackground,
|
|
1602
|
+
orientation: d(s),
|
|
1597
1603
|
"data-j-lume-chart": "",
|
|
1598
1604
|
onResize: sn,
|
|
1599
1605
|
onClick: L[24] || (L[24] = (I) => a("chart-click", I)),
|
|
@@ -1601,17 +1607,17 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1601
1607
|
onMouseleave: rn
|
|
1602
1608
|
}, {
|
|
1603
1609
|
header: C(() => [
|
|
1604
|
-
|
|
1605
|
-
|
|
1610
|
+
G("div", na, [
|
|
1611
|
+
G("div", oa, [
|
|
1606
1612
|
T.title ? (y(), O("h1", aa, oe(T.title), 1)) : z("", !0),
|
|
1607
|
-
|
|
1608
|
-
|
|
1613
|
+
G("div", la, [
|
|
1614
|
+
S(T.$slots, "controls", {}, void 0, !0)
|
|
1609
1615
|
])
|
|
1610
1616
|
]),
|
|
1611
|
-
|
|
1617
|
+
G("div", ua, [
|
|
1612
1618
|
k.value ? (y(), O("h3", ra, oe($e.value), 1)) : z("", !0),
|
|
1613
|
-
|
|
1614
|
-
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(), X(d(
|
|
1619
|
+
S(T.$slots, "legend", { data: d(x) }, () => [
|
|
1620
|
+
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(), X(d(Dt), {
|
|
1615
1621
|
key: 0,
|
|
1616
1622
|
data: d(x),
|
|
1617
1623
|
class: "lume-chart__legend",
|
|
@@ -1625,8 +1631,8 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1625
1631
|
])
|
|
1626
1632
|
]),
|
|
1627
1633
|
footer: C(() => [
|
|
1628
|
-
|
|
1629
|
-
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(), X(d(
|
|
1634
|
+
M.value ? (y(), O("h3", ca, oe(ke.value), 1)) : z("", !0),
|
|
1635
|
+
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(), X(d(Dt), {
|
|
1630
1636
|
key: 1,
|
|
1631
1637
|
data: d(x),
|
|
1632
1638
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
@@ -1637,7 +1643,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1637
1643
|
}, null, 8, ["data"])) : z("", !0)
|
|
1638
1644
|
]),
|
|
1639
1645
|
extra: C(() => [
|
|
1640
|
-
|
|
1646
|
+
S(T.$slots, "tooltip", j(d(De), {
|
|
1641
1647
|
data: d(x),
|
|
1642
1648
|
labels: d(N),
|
|
1643
1649
|
title: d(N)[r.value],
|
|
@@ -1649,7 +1655,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1649
1655
|
handleMouseLeave: () => b.value = !1,
|
|
1650
1656
|
options: d(h).tooltipOptions
|
|
1651
1657
|
}), () => [
|
|
1652
|
-
d(h).withTooltip !== !1 ? (y(), X(d(
|
|
1658
|
+
d(h).withTooltip !== !1 ? (y(), X(d(Fo), j({ key: 0 }, d(De), {
|
|
1653
1659
|
position: He.value,
|
|
1654
1660
|
title: d(N)[r.value],
|
|
1655
1661
|
items: d(xe)(r.value),
|
|
@@ -1668,7 +1674,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1668
1674
|
onTooltipMouseleave: L[23] || (L[23] = (I) => b.value = !1)
|
|
1669
1675
|
}), {
|
|
1670
1676
|
default: C(() => [
|
|
1671
|
-
|
|
1677
|
+
S(T.$slots, "tooltip-content", {
|
|
1672
1678
|
data: d(x),
|
|
1673
1679
|
labels: d(N),
|
|
1674
1680
|
hoveredIndex: r.value
|
|
@@ -1685,7 +1691,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1685
1691
|
transition: !1,
|
|
1686
1692
|
"data-j-lume-chart__negative-values": ""
|
|
1687
1693
|
}), null, 16)) : z("", !0),
|
|
1688
|
-
d(h).withAxes !== !1 ?
|
|
1694
|
+
d(h).withAxes !== !1 ? S(T.$slots, "axes", {
|
|
1689
1695
|
key: 1,
|
|
1690
1696
|
xScale: Q.value,
|
|
1691
1697
|
yScale: F.value,
|
|
@@ -1693,7 +1699,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1693
1699
|
options: d(h),
|
|
1694
1700
|
hoveredIndex: r.value
|
|
1695
1701
|
}, () => [
|
|
1696
|
-
ie(d(
|
|
1702
|
+
ie(d($t), {
|
|
1697
1703
|
type: "x",
|
|
1698
1704
|
scale: Q.value,
|
|
1699
1705
|
"container-size": d(D),
|
|
@@ -1701,12 +1707,12 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1701
1707
|
"hovered-index": r.value,
|
|
1702
1708
|
orientation: d(s),
|
|
1703
1709
|
"data-j-lume-chart__x-axis": "",
|
|
1704
|
-
onClick:
|
|
1705
|
-
onMouseenter:
|
|
1710
|
+
onClick: bt,
|
|
1711
|
+
onMouseenter: kt,
|
|
1706
1712
|
onMouseleave: L[3] || (L[3] = (I) => a("axis-mouseleave")),
|
|
1707
1713
|
"onLume__internal-AxisSize": L[4] || (L[4] = (I) => $.value = I)
|
|
1708
1714
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1709
|
-
ie(d(
|
|
1715
|
+
ie(d($t), {
|
|
1710
1716
|
type: "y",
|
|
1711
1717
|
scale: F.value,
|
|
1712
1718
|
"container-size": d(D),
|
|
@@ -1714,8 +1720,8 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1714
1720
|
"hovered-index": r.value,
|
|
1715
1721
|
orientation: d(s),
|
|
1716
1722
|
"data-j-lume-chart__y-axis": "",
|
|
1717
|
-
onClick:
|
|
1718
|
-
onMouseenter:
|
|
1723
|
+
onClick: bt,
|
|
1724
|
+
onMouseenter: kt,
|
|
1719
1725
|
onMouseleave: L[5] || (L[5] = (I) => a("axis-mouseleave")),
|
|
1720
1726
|
"onLume__internal-AxisSize": L[6] || (L[6] = (I) => A.value = I)
|
|
1721
1727
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
@@ -1739,7 +1745,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1739
1745
|
class: "lume-fill--transparent"
|
|
1740
1746
|
}), null, 16, sa))), 128))
|
|
1741
1747
|
])) : z("", !0),
|
|
1742
|
-
|
|
1748
|
+
S(T.$slots, "groups", {
|
|
1743
1749
|
data: d(x),
|
|
1744
1750
|
labels: d(N),
|
|
1745
1751
|
options: d(h),
|
|
@@ -1764,10 +1770,10 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1764
1770
|
], 64)) : z("", !0)
|
|
1765
1771
|
]),
|
|
1766
1772
|
_: 3
|
|
1767
|
-
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background"]));
|
|
1773
|
+
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "orientation"]));
|
|
1768
1774
|
}
|
|
1769
1775
|
});
|
|
1770
|
-
const Ne = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-
|
|
1776
|
+
const Ne = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-cffc1135"]]), Bt = 8, va = 8, ma = 20, we = 2, St = 2, fa = ["dy", "dominant-baseline"], pa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
|
|
1771
1777
|
__name: "lume-alluvial-node-label",
|
|
1772
1778
|
props: {
|
|
1773
1779
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1776,14 +1782,14 @@ const Ne = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-4eac6847"]]), Ht = 8, v
|
|
|
1776
1782
|
},
|
|
1777
1783
|
emits: ["lume__internal--node-resize"],
|
|
1778
1784
|
setup(e, { emit: n }) {
|
|
1779
|
-
const t = e, o = n, a =
|
|
1785
|
+
const t = e, o = n, a = R(null), u = R(t.maxWidth), l = R(1);
|
|
1780
1786
|
return U(
|
|
1781
1787
|
[a, () => t.maxWidth],
|
|
1782
1788
|
async ([i, c]) => {
|
|
1783
1789
|
if (i && c) {
|
|
1784
1790
|
u.value = c, await Qe();
|
|
1785
1791
|
const { width: s, height: f } = i.getBoundingClientRect();
|
|
1786
|
-
u.value = s +
|
|
1792
|
+
u.value = s + St > c ? c : s + St, l.value = Math.ceil(f);
|
|
1787
1793
|
}
|
|
1788
1794
|
},
|
|
1789
1795
|
{ immediate: !0 }
|
|
@@ -1797,13 +1803,13 @@ const Ne = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-4eac6847"]]), Ht = 8, v
|
|
|
1797
1803
|
width: u.value,
|
|
1798
1804
|
height: l.value
|
|
1799
1805
|
}, [
|
|
1800
|
-
|
|
1801
|
-
|
|
1806
|
+
G("div", ha, [
|
|
1807
|
+
G("span", {
|
|
1802
1808
|
ref_key: "text",
|
|
1803
1809
|
ref: a,
|
|
1804
1810
|
class: "lume-alluvial-group__node-label"
|
|
1805
1811
|
}, [
|
|
1806
|
-
|
|
1812
|
+
S(i.$slots, "default", {}, void 0, !0)
|
|
1807
1813
|
], 512)
|
|
1808
1814
|
])
|
|
1809
1815
|
], 8, pa)) : (y(), O("text", {
|
|
@@ -1812,7 +1818,7 @@ const Ne = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-4eac6847"]]), Ht = 8, v
|
|
|
1812
1818
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1813
1819
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1814
1820
|
}, [
|
|
1815
|
-
|
|
1821
|
+
S(i.$slots, "default", {}, void 0, !0)
|
|
1816
1822
|
], 8, fa));
|
|
1817
1823
|
}
|
|
1818
1824
|
});
|
|
@@ -1827,7 +1833,7 @@ const _a = /* @__PURE__ */ ee(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y"
|
|
|
1827
1833
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1828
1834
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1829
1835
|
}, [
|
|
1830
|
-
|
|
1836
|
+
S(n.$slots, "default", {}, void 0, !0)
|
|
1831
1837
|
], 8, ya));
|
|
1832
1838
|
}
|
|
1833
1839
|
});
|
|
@@ -1838,7 +1844,7 @@ const ba = /* @__PURE__ */ ee(ka, [["__scopeId", "data-v-b4fc758b"]]), Aa = ["tr
|
|
|
1838
1844
|
y: { type: Number, required: !0 }
|
|
1839
1845
|
},
|
|
1840
1846
|
setup(e) {
|
|
1841
|
-
const n =
|
|
1847
|
+
const n = R(null), t = v(
|
|
1842
1848
|
() => n.value && `translate(${-n.value.getBBox().width / 2}, 0)`
|
|
1843
1849
|
), o = v(
|
|
1844
1850
|
() => n.value && `translate(${n.value.getBBox().width / 2}, 0)`
|
|
@@ -1846,18 +1852,18 @@ const ba = /* @__PURE__ */ ee(ka, [["__scopeId", "data-v-b4fc758b"]]), Aa = ["tr
|
|
|
1846
1852
|
return (a, u) => (y(), O("g", {
|
|
1847
1853
|
transform: `translate(${e.x}, ${e.y})`
|
|
1848
1854
|
}, [
|
|
1849
|
-
|
|
1850
|
-
|
|
1855
|
+
G("g", { transform: t.value }, [
|
|
1856
|
+
S(a.$slots, "before", {}, void 0, !0)
|
|
1851
1857
|
], 8, Ta),
|
|
1852
|
-
|
|
1858
|
+
G("text", {
|
|
1853
1859
|
ref_key: "textRef",
|
|
1854
1860
|
ref: n,
|
|
1855
1861
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
1856
1862
|
}, [
|
|
1857
|
-
|
|
1863
|
+
S(a.$slots, "default", {}, void 0, !0)
|
|
1858
1864
|
], 512),
|
|
1859
|
-
|
|
1860
|
-
|
|
1865
|
+
G("g", { transform: o.value }, [
|
|
1866
|
+
S(a.$slots, "after", {}, void 0, !0)
|
|
1861
1867
|
], 8, La)
|
|
1862
1868
|
], 8, Aa));
|
|
1863
1869
|
}
|
|
@@ -1872,7 +1878,7 @@ function Mt(e, n) {
|
|
|
1872
1878
|
};
|
|
1873
1879
|
}
|
|
1874
1880
|
function Oa(e) {
|
|
1875
|
-
const n =
|
|
1881
|
+
const n = R(Mt(e));
|
|
1876
1882
|
function t(o) {
|
|
1877
1883
|
n.value = Mt(e, o);
|
|
1878
1884
|
}
|
|
@@ -1881,7 +1887,7 @@ function Oa(e) {
|
|
|
1881
1887
|
var Ce = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", e.BarScaleNull = "Bar linear scale cannot be `null`", e))(Ce || {});
|
|
1882
1888
|
const Ia = "[lume] ";
|
|
1883
1889
|
function ut(e, n, t = !0) {
|
|
1884
|
-
t &&
|
|
1890
|
+
t && Ft() || console.error(Ia + "Error: " + e, n);
|
|
1885
1891
|
}
|
|
1886
1892
|
const wa = 200;
|
|
1887
1893
|
function Ie(e) {
|
|
@@ -1923,7 +1929,7 @@ function Ha(e) {
|
|
|
1923
1929
|
width: n.x1 - n.x0,
|
|
1924
1930
|
height: t ? we : n.y1 - n.y0,
|
|
1925
1931
|
textTransform: {
|
|
1926
|
-
x: n.depth > 0 ? n.x1 +
|
|
1932
|
+
x: n.depth > 0 ? n.x1 + Bt : n.x0 - Bt,
|
|
1927
1933
|
y: (n.y1 + n.y0) / 2
|
|
1928
1934
|
},
|
|
1929
1935
|
node: n
|
|
@@ -1933,25 +1939,25 @@ function Ha(e) {
|
|
|
1933
1939
|
function Ba(e) {
|
|
1934
1940
|
return [e.source.x1, e.y0];
|
|
1935
1941
|
}
|
|
1936
|
-
function
|
|
1942
|
+
function Sa(e) {
|
|
1937
1943
|
return [e.target.x0, e.y1];
|
|
1938
1944
|
}
|
|
1939
|
-
function
|
|
1940
|
-
return e.curveFunction ? pn(e.curveFunction).source(Ba).target(
|
|
1945
|
+
function Ma(e) {
|
|
1946
|
+
return e.curveFunction ? pn(e.curveFunction).source(Ba).target(Sa) : yn();
|
|
1941
1947
|
}
|
|
1942
|
-
function
|
|
1948
|
+
function Ra(e) {
|
|
1943
1949
|
return e.map((n) => {
|
|
1944
1950
|
var t;
|
|
1945
1951
|
return {
|
|
1946
1952
|
id: n.id,
|
|
1947
|
-
color: n.color || ((t = n.source) == null ? void 0 : t.color) ||
|
|
1948
|
-
d:
|
|
1953
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Ge,
|
|
1954
|
+
d: Ma(n)(n),
|
|
1949
1955
|
strokeWidth: Math.max(1, n.width),
|
|
1950
1956
|
link: n
|
|
1951
1957
|
};
|
|
1952
1958
|
});
|
|
1953
1959
|
}
|
|
1954
|
-
function
|
|
1960
|
+
function Rt(e, n, t, o, a) {
|
|
1955
1961
|
if (o === !1) {
|
|
1956
1962
|
e.node = {
|
|
1957
1963
|
...e.node,
|
|
@@ -1968,7 +1974,7 @@ function St(e, n, t, o, a) {
|
|
|
1968
1974
|
};
|
|
1969
1975
|
requestAnimationFrame(i);
|
|
1970
1976
|
}
|
|
1971
|
-
const
|
|
1977
|
+
const Ga = {
|
|
1972
1978
|
nodes: [],
|
|
1973
1979
|
links: []
|
|
1974
1980
|
};
|
|
@@ -1976,13 +1982,13 @@ function Gt(e, n) {
|
|
|
1976
1982
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1977
1983
|
}
|
|
1978
1984
|
function ja(e, n, t) {
|
|
1979
|
-
const o =
|
|
1985
|
+
const o = R(null), a = v(() => {
|
|
1980
1986
|
var r, m;
|
|
1981
1987
|
return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
|
|
1982
1988
|
({ label: g, color: p, value: b, deriveColorFromIncomingLinks: $, offset: A }) => ({
|
|
1983
1989
|
label: g || b.toString(),
|
|
1984
1990
|
color: p,
|
|
1985
|
-
fallbackColor: p ||
|
|
1991
|
+
fallbackColor: p || Ge,
|
|
1986
1992
|
id: b,
|
|
1987
1993
|
deriveColorFromIncomingLinks: $,
|
|
1988
1994
|
offset: A
|
|
@@ -2046,7 +2052,7 @@ function ja(e, n, t) {
|
|
|
2046
2052
|
[g, p]
|
|
2047
2053
|
])({ nodes: a.value, links: u.value });
|
|
2048
2054
|
} catch (r) {
|
|
2049
|
-
ut(Ce.GraphProblem, r), o.value =
|
|
2055
|
+
ut(Ce.GraphProblem, r), o.value = Ga;
|
|
2050
2056
|
}
|
|
2051
2057
|
}), { columns: i, graph: f };
|
|
2052
2058
|
}
|
|
@@ -2103,14 +2109,14 @@ const Ca = (e, n) => {
|
|
|
2103
2109
|
};
|
|
2104
2110
|
};
|
|
2105
2111
|
function Fa(e, n, t) {
|
|
2106
|
-
const o =
|
|
2112
|
+
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2107
2113
|
o.value,
|
|
2108
2114
|
t.value
|
|
2109
2115
|
) : n.value.highlightedElements === "closest" ? Pa(o.value, t.value) : Ca(o.value, t.value) : { nodes: {}, links: [] });
|
|
2110
2116
|
return U(a, (u, l) => {
|
|
2111
2117
|
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2112
2118
|
e.value.forEach((i) => {
|
|
2113
|
-
i.node.id in l.nodes &&
|
|
2119
|
+
i.node.id in l.nodes && Rt(
|
|
2114
2120
|
i,
|
|
2115
2121
|
l.nodes[i.node.id],
|
|
2116
2122
|
i.node.value,
|
|
@@ -2121,7 +2127,7 @@ function Fa(e, n, t) {
|
|
|
2121
2127
|
return;
|
|
2122
2128
|
}
|
|
2123
2129
|
e.value.forEach((i) => {
|
|
2124
|
-
i.node.id in u.nodes &&
|
|
2130
|
+
i.node.id in u.nodes && Rt(
|
|
2125
2131
|
i,
|
|
2126
2132
|
i.node.value,
|
|
2127
2133
|
u.nodes[i.node.id],
|
|
@@ -2144,7 +2150,7 @@ const za = {
|
|
|
2144
2150
|
},
|
|
2145
2151
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2146
2152
|
setup(e, { emit: n }) {
|
|
2147
|
-
const t = e, o = n, a = Pe("chartID"), { data: u, options: l } = te(t), i =
|
|
2153
|
+
const t = e, o = n, a = Pe("chartID"), { data: u, options: l } = te(t), i = R([]), c = R([]), s = R(null), { extents: f, updateExtents: r } = Oa(t.containerSize), { columns: m, graph: g } = ja(u, l, f), { hoveredElement: p, highlightedElements: b } = Fa(
|
|
2148
2154
|
i,
|
|
2149
2155
|
l,
|
|
2150
2156
|
g
|
|
@@ -2186,7 +2192,7 @@ const za = {
|
|
|
2186
2192
|
height: Oe,
|
|
2187
2193
|
width: _.width,
|
|
2188
2194
|
key: `node-block-${_.node.id}-source-link-${le.link.source.id}`,
|
|
2189
|
-
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color ||
|
|
2195
|
+
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ge}`
|
|
2190
2196
|
}), J + Oe;
|
|
2191
2197
|
}, 0), E.push({
|
|
2192
2198
|
id: _.node.id,
|
|
@@ -2197,7 +2203,7 @@ const za = {
|
|
|
2197
2203
|
function w(k) {
|
|
2198
2204
|
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2199
2205
|
}
|
|
2200
|
-
function
|
|
2206
|
+
function B(k) {
|
|
2201
2207
|
return A.value.length > 0 && !A.value.includes(k.toString());
|
|
2202
2208
|
}
|
|
2203
2209
|
function Y(k) {
|
|
@@ -2235,17 +2241,17 @@ const za = {
|
|
|
2235
2241
|
var E;
|
|
2236
2242
|
return ((E = P.value.find(({ id: _ }) => k === _)) == null ? void 0 : E.subNodes) ?? [];
|
|
2237
2243
|
}
|
|
2238
|
-
function
|
|
2244
|
+
function M() {
|
|
2239
2245
|
const k = Da(g.value, s.value);
|
|
2240
2246
|
r(k);
|
|
2241
2247
|
}
|
|
2242
2248
|
return U(g, (k) => {
|
|
2243
|
-
i.value = Ha(k.nodes), c.value =
|
|
2249
|
+
i.value = Ha(k.nodes), c.value = Ra(k.links).reverse(), p.value == null && t.hoveredElementId != null && ke(t.hoveredElementId);
|
|
2244
2250
|
}), U([t.containerSize, s], () => {
|
|
2245
|
-
t.containerSize.width && t.containerSize.height &&
|
|
2251
|
+
t.containerSize.width && t.containerSize.height && M();
|
|
2246
2252
|
}), U(() => t.hoveredElementId, ke), (k, E) => (y(), O("g", za, [
|
|
2247
2253
|
x.value ? (y(), O("g", Wa, [
|
|
2248
|
-
(y(!0), O(q, null, W(x.value, (_, V) =>
|
|
2254
|
+
(y(!0), O(q, null, W(x.value, (_, V) => S(k.$slots, `node-header-${V}`, {
|
|
2249
2255
|
x: _.x,
|
|
2250
2256
|
y: -N.value
|
|
2251
2257
|
}, () => [
|
|
@@ -2261,7 +2267,7 @@ const za = {
|
|
|
2261
2267
|
}, 1032, ["x", "y"]))
|
|
2262
2268
|
], !0)), 256))
|
|
2263
2269
|
])) : z("", !0),
|
|
2264
|
-
|
|
2270
|
+
G("g", {
|
|
2265
2271
|
class: "lume-alluvial-link-group",
|
|
2266
2272
|
onMouseleave: Le
|
|
2267
2273
|
}, [
|
|
@@ -2273,11 +2279,11 @@ const za = {
|
|
|
2273
2279
|
x1: _.x1,
|
|
2274
2280
|
x2: _.x2
|
|
2275
2281
|
}, [
|
|
2276
|
-
|
|
2282
|
+
G("stop", {
|
|
2277
2283
|
offset: "0%",
|
|
2278
2284
|
"stop-color": `var(--lume-color--${_.source})`
|
|
2279
2285
|
}, null, 8, Xa),
|
|
2280
|
-
|
|
2286
|
+
G("stop", {
|
|
2281
2287
|
offset: "100%",
|
|
2282
2288
|
"stop-color": `var(--lume-color--${_.target})`
|
|
2283
2289
|
}, null, 8, Ya)
|
|
@@ -2316,12 +2322,12 @@ const za = {
|
|
|
2316
2322
|
(y(!0), O(q, null, W(i.value, (_, V) => (y(), O("g", {
|
|
2317
2323
|
key: `node-block_${V}`,
|
|
2318
2324
|
class: ne(["lume-alluvial-group__node", {
|
|
2319
|
-
"lume-alluvial-group__node--faded":
|
|
2325
|
+
"lume-alluvial-group__node--faded": B(_.node.id),
|
|
2320
2326
|
"lume-alluvial-group__node--focused": Y(_.node.id)
|
|
2321
2327
|
}]),
|
|
2322
2328
|
"data-j-alluvial-group__node-block": ""
|
|
2323
2329
|
}, [
|
|
2324
|
-
|
|
2330
|
+
G("g", {
|
|
2325
2331
|
onClick: (J) => o("node-click", { node: _.node, event: J }),
|
|
2326
2332
|
onMouseenter: (J) => o("node-mouseenter", { node: _.node, event: J }),
|
|
2327
2333
|
onMouseleave: (J) => o("node-mouseleave", { node: _.node, event: J }),
|
|
@@ -2341,7 +2347,7 @@ const za = {
|
|
|
2341
2347
|
height: _.height,
|
|
2342
2348
|
width: _.width
|
|
2343
2349
|
}, null, 10, qa)),
|
|
2344
|
-
|
|
2350
|
+
G("g", {
|
|
2345
2351
|
ref_for: !0,
|
|
2346
2352
|
ref_key: "nodeTextRefs",
|
|
2347
2353
|
ref: s,
|
|
@@ -2352,7 +2358,7 @@ const za = {
|
|
|
2352
2358
|
"data-id": _.node.id,
|
|
2353
2359
|
width: d(l).nodeLabelMaxWidth
|
|
2354
2360
|
}, [
|
|
2355
|
-
|
|
2361
|
+
S(k.$slots, `node-text-${_.node.id}`, {
|
|
2356
2362
|
node: _.node,
|
|
2357
2363
|
value: $.value(
|
|
2358
2364
|
_.node.transitionValue || _.node.value,
|
|
@@ -2363,7 +2369,7 @@ const za = {
|
|
|
2363
2369
|
bottom: d(l).switchText,
|
|
2364
2370
|
left: _.node.depth === 0,
|
|
2365
2371
|
"max-width": d(l).nodeLabelMaxWidth,
|
|
2366
|
-
"onLume__internal-NodeResize":
|
|
2372
|
+
"onLume__internal-NodeResize": M
|
|
2367
2373
|
}, {
|
|
2368
2374
|
default: C(() => [
|
|
2369
2375
|
ce(oe(_.node.label), 1)
|
|
@@ -2410,7 +2416,7 @@ const nl = /* @__PURE__ */ ee(tl, [["__scopeId", "data-v-ea53c3da"]]), ol = {
|
|
|
2410
2416
|
}, Zl = /* @__PURE__ */ Z({
|
|
2411
2417
|
__name: "lume-alluvial-diagram",
|
|
2412
2418
|
props: {
|
|
2413
|
-
...
|
|
2419
|
+
...po(st)
|
|
2414
2420
|
},
|
|
2415
2421
|
setup(e, { emit: n }) {
|
|
2416
2422
|
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), u = Hn(re()), { options: l } = te(t), { allOptions: i } = fe(l, ol);
|
|
@@ -2430,7 +2436,7 @@ const nl = /* @__PURE__ */ ee(tl, [["__scopeId", "data-v-ea53c3da"]]), ol = {
|
|
|
2430
2436
|
W(d(u), (m, g) => ({
|
|
2431
2437
|
name: g,
|
|
2432
2438
|
fn: C((p) => [
|
|
2433
|
-
|
|
2439
|
+
S(s.$slots, g, pe(he(p || {})))
|
|
2434
2440
|
])
|
|
2435
2441
|
}))
|
|
2436
2442
|
]), 1040, ["hovered-element-id"])
|
|
@@ -2440,7 +2446,7 @@ const nl = /* @__PURE__ */ ee(tl, [["__scopeId", "data-v-ea53c3da"]]), ol = {
|
|
|
2440
2446
|
W(d(a), (r, m) => ({
|
|
2441
2447
|
name: m,
|
|
2442
2448
|
fn: C((g) => [
|
|
2443
|
-
|
|
2449
|
+
S(s.$slots, m, pe(he(g || {})))
|
|
2444
2450
|
])
|
|
2445
2451
|
}))
|
|
2446
2452
|
]), 1040, ["options"]));
|
|
@@ -2476,7 +2482,7 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2476
2482
|
// Bar chart always starts on zero,
|
|
2477
2483
|
tooltipOptions: {
|
|
2478
2484
|
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2479
|
-
position: l.orientation ===
|
|
2485
|
+
position: l.orientation === H.HORIZONTAL ? "right" : void 0
|
|
2480
2486
|
}
|
|
2481
2487
|
};
|
|
2482
2488
|
}
|
|
@@ -2493,17 +2499,17 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2493
2499
|
W(d(c), (g, p) => ({
|
|
2494
2500
|
name: p,
|
|
2495
2501
|
fn: C((b) => [
|
|
2496
|
-
|
|
2502
|
+
S(r.$slots, p, pe(he(b || {})))
|
|
2497
2503
|
])
|
|
2498
2504
|
}))
|
|
2499
2505
|
]), 1040, ["options"]));
|
|
2500
2506
|
}
|
|
2501
2507
|
});
|
|
2502
2508
|
function al(e) {
|
|
2503
|
-
return Object.values(
|
|
2509
|
+
return Object.values(Gn).includes(e) || e == null;
|
|
2504
2510
|
}
|
|
2505
2511
|
function ll(e) {
|
|
2506
|
-
return Object.values(
|
|
2512
|
+
return Object.values(H).includes(e);
|
|
2507
2513
|
}
|
|
2508
2514
|
const ul = (e = !1) => ({
|
|
2509
2515
|
type: {
|
|
@@ -2514,7 +2520,7 @@ const ul = (e = !1) => ({
|
|
|
2514
2520
|
...e ? {
|
|
2515
2521
|
orientation: {
|
|
2516
2522
|
type: String,
|
|
2517
|
-
default:
|
|
2523
|
+
default: H.VERTICAL,
|
|
2518
2524
|
validator: ll
|
|
2519
2525
|
}
|
|
2520
2526
|
} : {}
|
|
@@ -2545,7 +2551,7 @@ function rl(e, n) {
|
|
|
2545
2551
|
}
|
|
2546
2552
|
function il(e, n, t) {
|
|
2547
2553
|
const o = v(
|
|
2548
|
-
() => t.value ===
|
|
2554
|
+
() => t.value === H.HORIZONTAL
|
|
2549
2555
|
);
|
|
2550
2556
|
function a(i) {
|
|
2551
2557
|
i || ut(Ce.BarScaleNull), Math.min(...i.domain()) > 0 && ut(Ce.BarScaleDomainAbove0);
|
|
@@ -2561,7 +2567,7 @@ const sl = {
|
|
|
2561
2567
|
};
|
|
2562
2568
|
function cl(e, n, t, o, a, u) {
|
|
2563
2569
|
const l = v(
|
|
2564
|
-
() => o.value ===
|
|
2570
|
+
() => o.value === H.HORIZONTAL
|
|
2565
2571
|
);
|
|
2566
2572
|
function i(r, m) {
|
|
2567
2573
|
let g, p;
|
|
@@ -2576,7 +2582,7 @@ function cl(e, n, t, o, a, u) {
|
|
|
2576
2582
|
function f(r, m, g) {
|
|
2577
2583
|
if (!(n.value && t.value))
|
|
2578
2584
|
return sl;
|
|
2579
|
-
const { value: b, color: $ } = r, A = $ ?? e.value[m].color ??
|
|
2585
|
+
const { value: b, color: $ } = r, A = $ ?? e.value[m].color ?? Ge, { x: h, y: x } = i(b, g), N = c(b), D = s(b);
|
|
2580
2586
|
return {
|
|
2581
2587
|
classList: [`lume-fill--${A}`, ...u],
|
|
2582
2588
|
x: h,
|
|
@@ -2597,7 +2603,7 @@ const dl = {
|
|
|
2597
2603
|
};
|
|
2598
2604
|
function vl(e, n, t, o, a, u) {
|
|
2599
2605
|
const l = v(
|
|
2600
|
-
() => o.value ===
|
|
2606
|
+
() => o.value === H.HORIZONTAL
|
|
2601
2607
|
), i = v(() => Be().domain(e.value.map((p, b) => b)).range([0, n.value.bandwidth()]).padding(0)), c = v(() => Be().domain(e.value.map((p, b) => b)).range([0, t.value.bandwidth()]).padding(0));
|
|
2602
2608
|
function s(p, b, $) {
|
|
2603
2609
|
if (l.value)
|
|
@@ -2621,13 +2627,13 @@ function vl(e, n, t, o, a, u) {
|
|
|
2621
2627
|
function g(p, b, $) {
|
|
2622
2628
|
if (!(n.value && t.value))
|
|
2623
2629
|
return dl;
|
|
2624
|
-
const { value: h, color: x } = p, N = x ?? e.value[b].color ?? Object.values(se)[b], D = s(h, $, b), P = f(h, $, b), w = r(h),
|
|
2630
|
+
const { value: h, color: x } = p, N = x ?? e.value[b].color ?? Object.values(se)[b], D = s(h, $, b), P = f(h, $, b), w = r(h), B = m(h);
|
|
2625
2631
|
return {
|
|
2626
2632
|
classList: [`lume-fill--${N}`, ...u],
|
|
2627
2633
|
x: D,
|
|
2628
2634
|
y: P,
|
|
2629
2635
|
width: w,
|
|
2630
|
-
height:
|
|
2636
|
+
height: B,
|
|
2631
2637
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2632
2638
|
isNegative: h < 0
|
|
2633
2639
|
};
|
|
@@ -2636,7 +2642,7 @@ function vl(e, n, t, o, a, u) {
|
|
|
2636
2642
|
}
|
|
2637
2643
|
function ml(e, n, t) {
|
|
2638
2644
|
const o = v(
|
|
2639
|
-
() => n.value ===
|
|
2645
|
+
() => n.value === H.HORIZONTAL
|
|
2640
2646
|
), a = v(() => {
|
|
2641
2647
|
const c = e.value.map(
|
|
2642
2648
|
(s) => s.filter((f) => f.value < 0).reduce((f, r) => f + r.value, 0)
|
|
@@ -2652,7 +2658,7 @@ function ml(e, n, t) {
|
|
|
2652
2658
|
return Math.max(...c);
|
|
2653
2659
|
});
|
|
2654
2660
|
function l(c, s, f) {
|
|
2655
|
-
return s.length ? o.value ?
|
|
2661
|
+
return s.length ? o.value ? Se().domain([a.value, u.value]).range([0, f.width]) : Object.assign(
|
|
2656
2662
|
Nt(
|
|
2657
2663
|
Be().domain(s.map((r, m) => m)).range([0, f.width]),
|
|
2658
2664
|
n.value,
|
|
@@ -2669,13 +2675,13 @@ function ml(e, n, t) {
|
|
|
2669
2675
|
t.value
|
|
2670
2676
|
),
|
|
2671
2677
|
{ labels: s }
|
|
2672
|
-
) :
|
|
2678
|
+
) : Se().domain([u.value, a.value]).range([0, f.height]) : null;
|
|
2673
2679
|
}
|
|
2674
2680
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2675
2681
|
}
|
|
2676
2682
|
function fl(e, n, t, o, a, u) {
|
|
2677
2683
|
const l = v(
|
|
2678
|
-
() => o.value ===
|
|
2684
|
+
() => o.value === H.HORIZONTAL
|
|
2679
2685
|
), i = v(
|
|
2680
2686
|
() => l.value ? t.value.domain() : n.value.domain()
|
|
2681
2687
|
), c = v(
|
|
@@ -2704,7 +2710,7 @@ function fl(e, n, t, o, a, u) {
|
|
|
2704
2710
|
return A ? c.value.reduce((x, N, D) => (D < A && N[h] < 0 && (x += N[h]), x), 0) : 0;
|
|
2705
2711
|
}
|
|
2706
2712
|
function $(A, h, x) {
|
|
2707
|
-
const { value: N, color: D } = A, P = N >= 0 ? f(N) : r(N), w = N >= 0 ? m(N) : g(N),
|
|
2713
|
+
const { value: N, color: D } = A, P = N >= 0 ? f(N) : r(N), w = N >= 0 ? m(N) : g(N), B = N >= 0 ? p(h, x) : b(h, x), { x: Y, y: K } = s(N, x, B);
|
|
2708
2714
|
return {
|
|
2709
2715
|
classList: [`lume-fill--${D ?? e.value[h].color ?? Object.values(se)[h]}`, ...u],
|
|
2710
2716
|
width: P,
|
|
@@ -2724,7 +2730,7 @@ const pl = {
|
|
|
2724
2730
|
single: cl,
|
|
2725
2731
|
grouped: vl,
|
|
2726
2732
|
stacked: fl
|
|
2727
|
-
},
|
|
2733
|
+
}, _t = /* @__PURE__ */ Z({
|
|
2728
2734
|
__name: "lume-bar-group",
|
|
2729
2735
|
props: {
|
|
2730
2736
|
...We(),
|
|
@@ -2764,22 +2770,22 @@ const pl = {
|
|
|
2764
2770
|
return P;
|
|
2765
2771
|
}), x = v(() => {
|
|
2766
2772
|
if (i.value)
|
|
2767
|
-
return l.value ===
|
|
2773
|
+
return l.value === H.HORIZONTAL ? "width" : "height";
|
|
2768
2774
|
});
|
|
2769
2775
|
async function N(D) {
|
|
2770
2776
|
o("lume__internal--hover", D), g("lume__internal--hover", D);
|
|
2771
2777
|
}
|
|
2772
2778
|
return (D, P) => (y(), O("g", pl, [
|
|
2773
|
-
(y(!0), O(q, null, W(d(p), (w,
|
|
2774
|
-
key:
|
|
2775
|
-
onMouseenter: (Y) => N(
|
|
2779
|
+
(y(!0), O(q, null, W(d(p), (w, B) => (y(), O("g", {
|
|
2780
|
+
key: B,
|
|
2781
|
+
onMouseenter: (Y) => N(B)
|
|
2776
2782
|
}, [
|
|
2777
|
-
(y(!0), O(q, null, W(w, (Y, K) => (y(), X(d(dt), j(h.value(Y, K,
|
|
2783
|
+
(y(!0), O(q, null, W(w, (Y, K) => (y(), X(d(dt), j(h.value(Y, K, B, w), {
|
|
2778
2784
|
key: `bar-${K}`,
|
|
2779
2785
|
transition: x.value,
|
|
2780
2786
|
"data-j-lume-bar": "",
|
|
2781
2787
|
onClick: (Q) => o("bar-click", {
|
|
2782
|
-
index:
|
|
2788
|
+
index: B,
|
|
2783
2789
|
datasetIndex: K,
|
|
2784
2790
|
event: Q
|
|
2785
2791
|
})
|
|
@@ -2788,13 +2794,13 @@ const pl = {
|
|
|
2788
2794
|
]));
|
|
2789
2795
|
}
|
|
2790
2796
|
}), _l = {
|
|
2791
|
-
[
|
|
2797
|
+
[H.VERTICAL]: {
|
|
2792
2798
|
withTooltip: !0,
|
|
2793
2799
|
xAxisOptions: {},
|
|
2794
2800
|
yAxisOptions: { gridLines: !0 },
|
|
2795
2801
|
margins: Ae.VERTICAL
|
|
2796
2802
|
},
|
|
2797
|
-
[
|
|
2803
|
+
[H.HORIZONTAL]: {
|
|
2798
2804
|
withTooltip: !0,
|
|
2799
2805
|
xAxisOptions: { gridLines: !0 },
|
|
2800
2806
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2807,7 +2813,7 @@ const pl = {
|
|
|
2807
2813
|
},
|
|
2808
2814
|
setup(e, { emit: n }) {
|
|
2809
2815
|
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { orientation: u, options: l } = te(t), i = v(
|
|
2810
|
-
() => _l[u.value ||
|
|
2816
|
+
() => _l[u.value || H.VERTICAL]
|
|
2811
2817
|
// needs to be computed so that default options are reactive
|
|
2812
2818
|
), { allOptions: c } = fe(l, i);
|
|
2813
2819
|
return (s, f) => (y(), X(d(Ne), j({ ...t, ...s.$attrs }, {
|
|
@@ -2816,26 +2822,26 @@ const pl = {
|
|
|
2816
2822
|
"data-j-single-bar-chart": ""
|
|
2817
2823
|
}, ae(d(o))), de({
|
|
2818
2824
|
groups: C((r) => [
|
|
2819
|
-
ie(d(
|
|
2825
|
+
ie(d(_t), j(r, { orientation: d(u) }, ae(d(o))), null, 16, ["orientation"])
|
|
2820
2826
|
]),
|
|
2821
2827
|
_: 2
|
|
2822
2828
|
}, [
|
|
2823
2829
|
W(d(a), (r, m) => ({
|
|
2824
2830
|
name: m,
|
|
2825
2831
|
fn: C((g) => [
|
|
2826
|
-
|
|
2832
|
+
S(s.$slots, m, pe(he(g || {})))
|
|
2827
2833
|
])
|
|
2828
2834
|
}))
|
|
2829
2835
|
]), 1040, ["options"]));
|
|
2830
2836
|
}
|
|
2831
2837
|
}), yl = {
|
|
2832
|
-
[
|
|
2838
|
+
[H.VERTICAL]: {
|
|
2833
2839
|
withTooltip: !0,
|
|
2834
2840
|
xAxisOptions: {},
|
|
2835
2841
|
yAxisOptions: { gridLines: !0 },
|
|
2836
2842
|
margins: Ae.VERTICAL
|
|
2837
2843
|
},
|
|
2838
|
-
[
|
|
2844
|
+
[H.HORIZONTAL]: {
|
|
2839
2845
|
withTooltip: !0,
|
|
2840
2846
|
xAxisOptions: { gridLines: !0 },
|
|
2841
2847
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2849,7 +2855,7 @@ const pl = {
|
|
|
2849
2855
|
},
|
|
2850
2856
|
setup(e, { emit: n }) {
|
|
2851
2857
|
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { orientation: u, options: l } = te(t), i = v(
|
|
2852
|
-
() => yl[u.value ||
|
|
2858
|
+
() => yl[u.value || H.VERTICAL]
|
|
2853
2859
|
// needs to be computed so that default options are reactive
|
|
2854
2860
|
), { allOptions: c } = fe(
|
|
2855
2861
|
l,
|
|
@@ -2861,27 +2867,27 @@ const pl = {
|
|
|
2861
2867
|
"data-j-grouped-bar-chart": ""
|
|
2862
2868
|
}, ae(d(o))), de({
|
|
2863
2869
|
groups: C((r) => [
|
|
2864
|
-
ie(d(
|
|
2870
|
+
ie(d(_t), j(r, { type: "grouped" }, ae(d(o))), null, 16)
|
|
2865
2871
|
]),
|
|
2866
2872
|
_: 2
|
|
2867
2873
|
}, [
|
|
2868
2874
|
W(d(a), (r, m) => ({
|
|
2869
2875
|
name: m,
|
|
2870
2876
|
fn: C((g) => [
|
|
2871
|
-
|
|
2877
|
+
S(s.$slots, m, pe(he(g || {})))
|
|
2872
2878
|
])
|
|
2873
2879
|
}))
|
|
2874
2880
|
]), 1040, ["options"]));
|
|
2875
2881
|
}
|
|
2876
2882
|
}), kl = {
|
|
2877
|
-
[
|
|
2883
|
+
[H.VERTICAL]: {
|
|
2878
2884
|
withTooltip: !0,
|
|
2879
2885
|
xAxisOptions: {},
|
|
2880
2886
|
yAxisOptions: { gridLines: !0 },
|
|
2881
2887
|
margins: Ae.VERTICAL,
|
|
2882
2888
|
tooltipOptions: { inverse: !0 }
|
|
2883
2889
|
},
|
|
2884
|
-
[
|
|
2890
|
+
[H.HORIZONTAL]: {
|
|
2885
2891
|
withTooltip: !0,
|
|
2886
2892
|
xAxisOptions: { gridLines: !0 },
|
|
2887
2893
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2895,7 +2901,7 @@ const pl = {
|
|
|
2895
2901
|
},
|
|
2896
2902
|
setup(e, { emit: n }) {
|
|
2897
2903
|
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { data: u, orientation: l, options: i, labels: c } = te(t), s = v(
|
|
2898
|
-
() => kl[l.value ||
|
|
2904
|
+
() => kl[l.value || H.VERTICAL]
|
|
2899
2905
|
// needs to be computed so that default options are reactive
|
|
2900
2906
|
), { allOptions: f } = fe(
|
|
2901
2907
|
i,
|
|
@@ -2913,14 +2919,14 @@ const pl = {
|
|
|
2913
2919
|
"data-j-stacked-bar-chart": ""
|
|
2914
2920
|
}, ae(d(o))), de({
|
|
2915
2921
|
groups: C((x) => [
|
|
2916
|
-
ie(d(
|
|
2922
|
+
ie(d(_t), j(x, { type: "stacked" }, ae(d(o))), null, 16)
|
|
2917
2923
|
]),
|
|
2918
2924
|
_: 2
|
|
2919
2925
|
}, [
|
|
2920
2926
|
W(d(a), (x, N) => ({
|
|
2921
2927
|
name: N,
|
|
2922
2928
|
fn: C((D) => [
|
|
2923
|
-
|
|
2929
|
+
S(A.$slots, N, pe(he(D || {})))
|
|
2924
2930
|
])
|
|
2925
2931
|
}))
|
|
2926
2932
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
@@ -2959,7 +2965,7 @@ const pl = {
|
|
|
2959
2965
|
},
|
|
2960
2966
|
emits: ["click"],
|
|
2961
2967
|
setup(e, { emit: n }) {
|
|
2962
|
-
const t = n, o =
|
|
2968
|
+
const t = n, o = R(null);
|
|
2963
2969
|
return _e(() => ze(o.value)), (a, u) => (y(), O("path", {
|
|
2964
2970
|
ref_key: "root",
|
|
2965
2971
|
ref: o,
|
|
@@ -2970,7 +2976,7 @@ const pl = {
|
|
|
2970
2976
|
}]),
|
|
2971
2977
|
d: e.pathDefinition,
|
|
2972
2978
|
"stroke-width": e.width,
|
|
2973
|
-
style:
|
|
2979
|
+
style: Vt({
|
|
2974
2980
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2975
2981
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2976
2982
|
}),
|
|
@@ -2999,7 +3005,7 @@ const Ll = /* @__PURE__ */ ee(Tl, [["__scopeId", "data-v-59449838"]]), $l = ["cx
|
|
|
2999
3005
|
},
|
|
3000
3006
|
emits: ["click"],
|
|
3001
3007
|
setup(e, { emit: n }) {
|
|
3002
|
-
const t = e, o = n, a =
|
|
3008
|
+
const t = e, o = n, a = R(null), u = v(() => t.radius / 2);
|
|
3003
3009
|
return _e(() => ze(a.value)), (l, i) => (y(), O("circle", {
|
|
3004
3010
|
ref_key: "root",
|
|
3005
3011
|
ref: a,
|
|
@@ -3050,7 +3056,7 @@ function ln(e) {
|
|
|
3050
3056
|
s.length,
|
|
3051
3057
|
s.indexOf(c)
|
|
3052
3058
|
),
|
|
3053
|
-
label:
|
|
3059
|
+
label: Ut
|
|
3054
3060
|
};
|
|
3055
3061
|
}
|
|
3056
3062
|
return i;
|
|
@@ -3078,7 +3084,7 @@ const Dl = {
|
|
|
3078
3084
|
key: 0,
|
|
3079
3085
|
class: "lume-line-group__points",
|
|
3080
3086
|
"data-j-lume-line-group__points": ""
|
|
3081
|
-
},
|
|
3087
|
+
}, Sl = 1, Ml = /* @__PURE__ */ Z({
|
|
3082
3088
|
__name: "lume-line-group",
|
|
3083
3089
|
props: {
|
|
3084
3090
|
...We(),
|
|
@@ -3103,7 +3109,7 @@ const Dl = {
|
|
|
3103
3109
|
i,
|
|
3104
3110
|
c
|
|
3105
3111
|
), r = v(() => {
|
|
3106
|
-
if (a.value.every((
|
|
3112
|
+
if (a.value.every((B) => B.isDashed))
|
|
3107
3113
|
return a.value;
|
|
3108
3114
|
const { computedLineData: w } = ln(a);
|
|
3109
3115
|
return u.value.withTooltip !== !1 && (s != null && s.value) && f(w.value), w.value;
|
|
@@ -3120,7 +3126,7 @@ const Dl = {
|
|
|
3120
3126
|
// Move to X index, Vertical line to the highest point
|
|
3121
3127
|
};
|
|
3122
3128
|
}), g = v(
|
|
3123
|
-
() => l.value &&
|
|
3129
|
+
() => l.value && Sl / (En(l.value) - 1)
|
|
3124
3130
|
// Subtracting the first line (read below)
|
|
3125
3131
|
), p = v(
|
|
3126
3132
|
() => {
|
|
@@ -3136,11 +3142,11 @@ const Dl = {
|
|
|
3136
3142
|
function h(w) {
|
|
3137
3143
|
return r.value[w].values;
|
|
3138
3144
|
}
|
|
3139
|
-
function x(w,
|
|
3145
|
+
function x(w, B) {
|
|
3140
3146
|
var K, Q;
|
|
3141
3147
|
const Y = w === 0 ? [] : [
|
|
3142
|
-
(K = h(
|
|
3143
|
-
(Q = h(
|
|
3148
|
+
(K = h(B)[w - 1]) == null ? void 0 : K.value,
|
|
3149
|
+
(Q = h(B)[w]) == null ? void 0 : Q.value
|
|
3144
3150
|
];
|
|
3145
3151
|
return Nl(
|
|
3146
3152
|
w,
|
|
@@ -3155,9 +3161,9 @@ const Dl = {
|
|
|
3155
3161
|
animationDuration: g.value
|
|
3156
3162
|
};
|
|
3157
3163
|
}
|
|
3158
|
-
function D(w,
|
|
3164
|
+
function D(w, B) {
|
|
3159
3165
|
var K;
|
|
3160
|
-
const Y = (K = h(
|
|
3166
|
+
const Y = (K = h(B)[w]) == null ? void 0 : K.value;
|
|
3161
3167
|
return {
|
|
3162
3168
|
x: ve(l.value) ? t.xScale($.value[w]) + b.value : t.xScale(w),
|
|
3163
3169
|
y: Y === null ? i.value(i.value.domain()[1]) : i.value(Y)
|
|
@@ -3166,8 +3172,8 @@ const Dl = {
|
|
|
3166
3172
|
function P(w) {
|
|
3167
3173
|
return t.hoveredIndex === w;
|
|
3168
3174
|
}
|
|
3169
|
-
return (w,
|
|
3170
|
-
|
|
3175
|
+
return (w, B) => (y(), O("g", Dl, [
|
|
3176
|
+
G("path", j(m.value, {
|
|
3171
3177
|
class: "lume-line-group__overlay-line",
|
|
3172
3178
|
"data-j-lume-line-group__overlay-line": ""
|
|
3173
3179
|
}), null, 16),
|
|
@@ -3175,7 +3181,7 @@ const Dl = {
|
|
|
3175
3181
|
key: Y.label,
|
|
3176
3182
|
class: "lume-line-group__group"
|
|
3177
3183
|
}, [
|
|
3178
|
-
|
|
3184
|
+
G("g", Hl, [
|
|
3179
3185
|
(y(!0), O(q, null, W(Y.values, (Q, F) => (y(), X(d(Ll), j(N(F), {
|
|
3180
3186
|
key: `line-${F}`,
|
|
3181
3187
|
color: Y.color,
|
|
@@ -3200,7 +3206,7 @@ const Dl = {
|
|
|
3200
3206
|
]));
|
|
3201
3207
|
}
|
|
3202
3208
|
});
|
|
3203
|
-
const un = /* @__PURE__ */ ee(
|
|
3209
|
+
const un = /* @__PURE__ */ ee(Ml, [["__scopeId", "data-v-23492507"]]), Rl = {
|
|
3204
3210
|
margins: Ae.VERTICAL,
|
|
3205
3211
|
startOnZero: !0,
|
|
3206
3212
|
withTooltip: !0,
|
|
@@ -3212,7 +3218,7 @@ const un = /* @__PURE__ */ ee(Sl, [["__scopeId", "data-v-23492507"]]), Gl = {
|
|
|
3212
3218
|
...Ee(null, !1)
|
|
3213
3219
|
},
|
|
3214
3220
|
setup(e, { emit: n }) {
|
|
3215
|
-
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { options: u } = te(t), { allOptions: l } = fe(u,
|
|
3221
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { options: u } = te(t), { allOptions: l } = fe(u, Rl);
|
|
3216
3222
|
return (i, c) => (y(), X(d(Ne), j({ ...t, ...i.$attrs }, {
|
|
3217
3223
|
"chart-type": "line",
|
|
3218
3224
|
options: d(l),
|
|
@@ -3226,13 +3232,13 @@ const un = /* @__PURE__ */ ee(Sl, [["__scopeId", "data-v-23492507"]]), Gl = {
|
|
|
3226
3232
|
W(d(a), (s, f) => ({
|
|
3227
3233
|
name: f,
|
|
3228
3234
|
fn: C((r) => [
|
|
3229
|
-
|
|
3235
|
+
S(i.$slots, f, pe(he(r || {})))
|
|
3230
3236
|
])
|
|
3231
3237
|
}))
|
|
3232
3238
|
]), 1040, ["options"]));
|
|
3233
3239
|
}
|
|
3234
3240
|
});
|
|
3235
|
-
function
|
|
3241
|
+
function Gl(e) {
|
|
3236
3242
|
return { areaPathDefinition: v(
|
|
3237
3243
|
() => function(t, o) {
|
|
3238
3244
|
if (!t || !o || ve(t) || ve(o))
|
|
@@ -3260,10 +3266,10 @@ const jl = {
|
|
|
3260
3266
|
__name: "lume-sparkline-chart",
|
|
3261
3267
|
props: {
|
|
3262
3268
|
...pt(null),
|
|
3263
|
-
...
|
|
3269
|
+
...Me()
|
|
3264
3270
|
},
|
|
3265
3271
|
setup(e, { expose: n, emit: t }) {
|
|
3266
|
-
const o = e, { componentEventPropagator: a } = ye(), u = Te(re()), { data: l, options: i } = te(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData: f } = ln(c), { areaPathDefinition: r } =
|
|
3272
|
+
const o = e, { componentEventPropagator: a } = ye(), u = Te(re()), { data: l, options: i } = te(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData: f } = ln(c), { areaPathDefinition: r } = Gl(f), m = v(() => {
|
|
3267
3273
|
var $, A;
|
|
3268
3274
|
return (A = ($ = c.value) == null ? void 0 : $[0]) == null ? void 0 : A.color;
|
|
3269
3275
|
}), g = v(
|
|
@@ -3280,7 +3286,7 @@ const jl = {
|
|
|
3280
3286
|
}
|
|
3281
3287
|
function b($, A, h) {
|
|
3282
3288
|
if ($.length)
|
|
3283
|
-
return
|
|
3289
|
+
return Se().range([0, h.width]).domain([0, $[0].values.length - 1]);
|
|
3284
3290
|
}
|
|
3285
3291
|
return n({
|
|
3286
3292
|
areaPathDefinition: r
|
|
@@ -3308,7 +3314,7 @@ const jl = {
|
|
|
3308
3314
|
W(d(u), (h, x) => ({
|
|
3309
3315
|
name: x,
|
|
3310
3316
|
fn: C((N) => [
|
|
3311
|
-
|
|
3317
|
+
S($.$slots, x, pe(he(N || {})), void 0, !0)
|
|
3312
3318
|
])
|
|
3313
3319
|
}))
|
|
3314
3320
|
]), 1040, ["options"]));
|
|
@@ -3325,13 +3331,13 @@ export {
|
|
|
3325
3331
|
xa as LumeAlluvialNodeHeader,
|
|
3326
3332
|
_a as LumeAlluvialNodeLabel,
|
|
3327
3333
|
ba as LumeAlluvialNodeValue,
|
|
3328
|
-
|
|
3334
|
+
$t as LumeAxis,
|
|
3329
3335
|
dt as LumeBar,
|
|
3330
3336
|
Ul as LumeBarChart,
|
|
3331
|
-
|
|
3337
|
+
_t as LumeBarGroup,
|
|
3332
3338
|
Ne as LumeChart,
|
|
3333
|
-
|
|
3334
|
-
|
|
3339
|
+
ko as LumeChartContainer,
|
|
3340
|
+
Dt as LumeChartLegend,
|
|
3335
3341
|
Yl as LumeGroupedBarChart,
|
|
3336
3342
|
Ll as LumeLine,
|
|
3337
3343
|
Jl as LumeLineChart,
|
|
@@ -3341,11 +3347,11 @@ export {
|
|
|
3341
3347
|
Xl as LumeSingleBarChart,
|
|
3342
3348
|
Ql as LumeSparklineChart,
|
|
3343
3349
|
Kl as LumeStackedBarChart,
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3350
|
+
Fo as LumeTooltip,
|
|
3351
|
+
Mo as LumeTooltipItem,
|
|
3352
|
+
No as LumeTooltipSummary,
|
|
3353
|
+
xo as LumeTooltipTitle,
|
|
3348
3354
|
mt as OtherColors,
|
|
3349
|
-
|
|
3355
|
+
en as SequentialColors
|
|
3350
3356
|
};
|
|
3351
3357
|
//# sourceMappingURL=index.js.map
|