@adyen/lume 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +465 -475
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +10 -7
- package/dist/plugin.js.map +1 -1
- package/dist/scss/components/lume-tooltip.scss +48 -0
- package/dist/scss/main.scss +0 -3
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
- package/dist/scss/components/lume-tooltip-item.scss +0 -41
- package/dist/scss/components/lume-tooltip-summary.scss +0 -25
- package/dist/scss/components/lume-tooltip-title.scss +0 -9
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as D, ref as x, isRef as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as D, ref as x, isRef as Ue, computed as d, watch as C, toRefs as N, inject as Te, reactive as ue, onMounted as M, onBeforeUnmount as Ye, watchEffect as Ke, useSlots as G, provide as _e, defineAsyncComponent as pe } from "vue";
|
|
2
|
+
import { format as Ot, ticks as Lt, scaleBand as te, scaleLinear as ne, line as xt, area as $t } from "d3";
|
|
3
|
+
import { createPopper as wt } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as It, sankey as Et, sankeyJustify as Dt } from "d3-sankey";
|
|
5
|
+
const Ct = /* @__PURE__ */ D({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -61,19 +61,19 @@ function I(t, e, r, n, a, o, l, i) {
|
|
|
61
61
|
if (u.functional) {
|
|
62
62
|
u._injectStyles = s;
|
|
63
63
|
var c = u.render;
|
|
64
|
-
u.render = function(h,
|
|
65
|
-
return s.call(
|
|
64
|
+
u.render = function(h, v) {
|
|
65
|
+
return s.call(v), c(h, v);
|
|
66
66
|
};
|
|
67
67
|
} else {
|
|
68
|
-
var
|
|
69
|
-
u.beforeCreate =
|
|
68
|
+
var _ = u.beforeCreate;
|
|
69
|
+
u.beforeCreate = _ ? [].concat(_, s) : [s];
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
72
|
exports: t,
|
|
73
73
|
options: u
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var Ht = function() {
|
|
77
77
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
78
78
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
79
79
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -83,26 +83,26 @@ var Ct = function() {
|
|
|
83
83
|
}, click: function(a) {
|
|
84
84
|
return n.emit("click", a);
|
|
85
85
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
86
|
-
},
|
|
87
|
-
Dt,
|
|
86
|
+
}, Nt = [], Rt = /* @__PURE__ */ I(
|
|
88
87
|
Ct,
|
|
89
88
|
Ht,
|
|
89
|
+
Nt,
|
|
90
90
|
!1,
|
|
91
91
|
null,
|
|
92
92
|
"59ddc0a6",
|
|
93
93
|
null,
|
|
94
94
|
null
|
|
95
95
|
);
|
|
96
|
-
const
|
|
97
|
-
function
|
|
96
|
+
const Bt = Rt.exports;
|
|
97
|
+
function Je() {
|
|
98
98
|
return process.env.NODE_ENV === "production";
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Qe(t) {
|
|
101
101
|
return (t == null ? void 0 : t.map(
|
|
102
102
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
103
103
|
).flat()) || [];
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Oe(t) {
|
|
106
106
|
return t.length === 1;
|
|
107
107
|
}
|
|
108
108
|
function St(t) {
|
|
@@ -110,25 +110,25 @@ function St(t) {
|
|
|
110
110
|
(e) => "color" in e
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function fe(t) {
|
|
114
114
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function qe(t, e) {
|
|
117
117
|
const r = { ...t };
|
|
118
118
|
return Object.entries(e).forEach(([n, a]) => {
|
|
119
|
-
r[n] =
|
|
119
|
+
r[n] = fe(t[n]) && fe(a) ? qe(t[n], a) : a;
|
|
120
120
|
}), r;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return t != null &&
|
|
122
|
+
function Pt(t) {
|
|
123
|
+
return t != null && fe(t) && "value" in t;
|
|
124
124
|
}
|
|
125
125
|
function U(t) {
|
|
126
126
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
return U(t) ? t.
|
|
128
|
+
function Gt(t) {
|
|
129
|
+
return U(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
130
130
|
}
|
|
131
|
-
const
|
|
131
|
+
const jt = (t, e) => {
|
|
132
132
|
if (!t)
|
|
133
133
|
throw new Error("Data is not a valid array");
|
|
134
134
|
if (t.length === 0)
|
|
@@ -138,17 +138,17 @@ const Pt = (t, e) => {
|
|
|
138
138
|
throw new Error("Index exceeds length of at least one of the datasets");
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function Ft(t, e) {
|
|
142
142
|
var r;
|
|
143
|
-
return
|
|
143
|
+
return jt(t, e), ((r = t.reduce(
|
|
144
144
|
(n, a) => {
|
|
145
145
|
var o, l;
|
|
146
146
|
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
147
147
|
}
|
|
148
148
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
const e =
|
|
150
|
+
function me(t) {
|
|
151
|
+
const e = Ue(t) ? t.value : t;
|
|
152
152
|
if (!e)
|
|
153
153
|
throw new Error("No empty array can be created from specified data value");
|
|
154
154
|
const r = Math.max(
|
|
@@ -157,13 +157,13 @@ function he(t) {
|
|
|
157
157
|
);
|
|
158
158
|
return Array(r).fill(null);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Vt(t) {
|
|
161
161
|
return U(t) ? t.domain().length : Math.max(...t.domain());
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Mt(t, e) {
|
|
164
164
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function zt(t, e, r) {
|
|
167
167
|
const n = r ? t.length - e : e, a = t.slice(0, n);
|
|
168
168
|
return t.slice(n).concat(a);
|
|
169
169
|
}
|
|
@@ -177,22 +177,22 @@ function Y(t) {
|
|
|
177
177
|
}
|
|
178
178
|
return t;
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const Wt = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
181
181
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
182
182
|
""
|
|
183
183
|
);
|
|
184
184
|
var V = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
185
185
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t))(V || {});
|
|
186
|
-
const
|
|
186
|
+
const Zt = "[lume] ";
|
|
187
187
|
function Z(t, e = !0) {
|
|
188
|
-
e &&
|
|
188
|
+
e && Je() || console.warn(Zt + "Warning: " + t);
|
|
189
189
|
}
|
|
190
190
|
const le = (t) => {
|
|
191
191
|
let e = null;
|
|
192
192
|
switch (typeof t) {
|
|
193
193
|
case "string":
|
|
194
194
|
try {
|
|
195
|
-
e =
|
|
195
|
+
e = Ot(t);
|
|
196
196
|
} catch {
|
|
197
197
|
Z(V.InvalidFormat), e = null;
|
|
198
198
|
}
|
|
@@ -215,21 +215,21 @@ const le = (t) => {
|
|
|
215
215
|
});
|
|
216
216
|
function j(t, e) {
|
|
217
217
|
return { allOptions: d(() => {
|
|
218
|
-
const n =
|
|
219
|
-
return n ?
|
|
218
|
+
const n = Ue(e) ? e == null ? void 0 : e.value : e;
|
|
219
|
+
return n ? qe(n, t.value) : t.value;
|
|
220
220
|
}) };
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
function
|
|
222
|
+
const Xt = 0.15;
|
|
223
|
+
function Ut(t, e, r) {
|
|
224
224
|
const n = x(), a = d(() => Math.max(...t.value.range())), o = d(() => e.value.length);
|
|
225
225
|
function l() {
|
|
226
226
|
if (!e.value)
|
|
227
227
|
return;
|
|
228
228
|
const u = e.value.reduce(
|
|
229
|
-
(c,
|
|
229
|
+
(c, _) => c + _.ref.getBoundingClientRect().width,
|
|
230
230
|
0
|
|
231
231
|
), s = Math.ceil(u / o.value);
|
|
232
|
-
n.value = s + s *
|
|
232
|
+
n.value = s + s * Xt;
|
|
233
233
|
}
|
|
234
234
|
function i(u) {
|
|
235
235
|
if (!e.value)
|
|
@@ -237,16 +237,16 @@ function Zt(t, e, r) {
|
|
|
237
237
|
const s = e.value.length;
|
|
238
238
|
if (u === 0)
|
|
239
239
|
return !0;
|
|
240
|
-
const c = a.value / s,
|
|
241
|
-
return u %
|
|
240
|
+
const c = a.value / s, _ = typeof r == "number" && r > 0 && r + 1 || Math.ceil(n.value / c);
|
|
241
|
+
return u % _ === 0;
|
|
242
242
|
}
|
|
243
243
|
return C(e, l), { showTick: i };
|
|
244
244
|
}
|
|
245
|
-
var P = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(P || {}),
|
|
246
|
-
const
|
|
245
|
+
var P = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(P || {}), et = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(et || {}), Le = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Le || {}), tt = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(tt || {}), xe = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(xe || {});
|
|
246
|
+
const O = {
|
|
247
247
|
HORIZONTAL: "horizontal",
|
|
248
248
|
VERTICAL: "vertical"
|
|
249
|
-
},
|
|
249
|
+
}, Yt = {
|
|
250
250
|
SINGLE: "single",
|
|
251
251
|
GROUPED: "grouped",
|
|
252
252
|
STACKED: "stacked"
|
|
@@ -263,7 +263,7 @@ const L = {
|
|
|
263
263
|
bottom: 28,
|
|
264
264
|
left: 24
|
|
265
265
|
}
|
|
266
|
-
},
|
|
266
|
+
}, nt = "No data", Kt = 20, rt = 0.33, at = 0.5, ot = 12, lt = 8, Jt = 1, Qt = [
|
|
267
267
|
"auto",
|
|
268
268
|
"auto-start",
|
|
269
269
|
"auto-end",
|
|
@@ -280,10 +280,10 @@ const L = {
|
|
|
280
280
|
"left-start",
|
|
281
281
|
"left-end"
|
|
282
282
|
];
|
|
283
|
-
function
|
|
283
|
+
function ie(t) {
|
|
284
284
|
t != null && t.closest("svg") || Z(V.NotContainedInSvg);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const ut = {
|
|
287
287
|
/** Displays a line for each tick. */
|
|
288
288
|
gridLines: !1,
|
|
289
289
|
/** Displays the axis title. */
|
|
@@ -300,11 +300,11 @@ const lt = {
|
|
|
300
300
|
/** Space between the tick label and the axis line. */
|
|
301
301
|
tickPadding: 8
|
|
302
302
|
}, qt = {
|
|
303
|
-
...
|
|
303
|
+
...ut,
|
|
304
304
|
withTitle: !1,
|
|
305
305
|
skip: !0
|
|
306
306
|
}, en = {
|
|
307
|
-
...
|
|
307
|
+
...ut,
|
|
308
308
|
gridLines: !0
|
|
309
309
|
}, tn = function(t, e, r) {
|
|
310
310
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
@@ -322,7 +322,7 @@ const lt = {
|
|
|
322
322
|
return {
|
|
323
323
|
x: -(s - t.value.step()) / 2,
|
|
324
324
|
width: s,
|
|
325
|
-
height: r.value.tickPadding +
|
|
325
|
+
height: r.value.tickPadding + ot + lt
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
function l() {
|
|
@@ -398,7 +398,7 @@ const lt = {
|
|
|
398
398
|
}
|
|
399
399
|
function o() {
|
|
400
400
|
return {
|
|
401
|
-
height: r.value.tickPadding +
|
|
401
|
+
height: r.value.tickPadding + ot + lt,
|
|
402
402
|
width: n.value,
|
|
403
403
|
x: -(n.value / 2)
|
|
404
404
|
};
|
|
@@ -465,7 +465,7 @@ const lt = {
|
|
|
465
465
|
"x-linear-scale-axis": rn,
|
|
466
466
|
"y-linear-scale-axis": an
|
|
467
467
|
};
|
|
468
|
-
var
|
|
468
|
+
var he = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(he || {}), ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(ge || {}), oe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(oe || {});
|
|
469
469
|
const ln = /* @__PURE__ */ D({
|
|
470
470
|
__name: "lume-axis",
|
|
471
471
|
props: {
|
|
@@ -481,7 +481,7 @@ const ln = /* @__PURE__ */ D({
|
|
|
481
481
|
position: {
|
|
482
482
|
type: String,
|
|
483
483
|
default: void 0,
|
|
484
|
-
validator: (t) => t in
|
|
484
|
+
validator: (t) => t in ge
|
|
485
485
|
},
|
|
486
486
|
containerSize: {
|
|
487
487
|
type: Object,
|
|
@@ -493,69 +493,69 @@ const ln = /* @__PURE__ */ D({
|
|
|
493
493
|
},
|
|
494
494
|
orientation: {
|
|
495
495
|
type: String,
|
|
496
|
-
default:
|
|
496
|
+
default: O.VERTICAL
|
|
497
497
|
},
|
|
498
498
|
...ae()
|
|
499
499
|
},
|
|
500
500
|
emits: ["mouseenter", "click", "mouseleave"],
|
|
501
501
|
setup(t, { emit: e }) {
|
|
502
|
-
const r = t, { scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i } = N(r), u =
|
|
502
|
+
const r = t, { scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i } = N(r), u = Te("isEmpty", x(!1)), s = ue({}), c = x(null), _ = x(null), p = x(null), h = d(
|
|
503
503
|
() => r.type ? oe[r.type] : r.position
|
|
504
|
-
),
|
|
504
|
+
), v = d(
|
|
505
505
|
() => r.type || (h.value === "left" ? "y" : "x")
|
|
506
506
|
), m = d(
|
|
507
|
-
() =>
|
|
508
|
-
), { allOptions:
|
|
507
|
+
() => v.value === "x" && i.value === O.VERTICAL || v.value === "y" && i.value === O.HORIZONTAL
|
|
508
|
+
), { allOptions: b } = j(
|
|
509
509
|
l,
|
|
510
|
-
|
|
511
|
-
), { showTick: f } =
|
|
510
|
+
v.value === "x" ? qt : en
|
|
511
|
+
), { showTick: f } = Ut(n, c, b.value.skip), T = d(() => {
|
|
512
512
|
var E, H, R, J;
|
|
513
|
-
return
|
|
514
|
-
}),
|
|
513
|
+
return v.value === "y" && u.value ? `translate(0, ${((E = a.value) == null ? void 0 : E.height) / 2})` : v.value === "x" && u.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(R = a.value) == null ? void 0 : R.height})` : `translate(0, ${v.value === "x" ? (J = a.value) == null ? void 0 : J.height : 0})`;
|
|
514
|
+
}), L = d(() => {
|
|
515
515
|
if (U(n.value))
|
|
516
516
|
return n.value.labels || n.value.domain();
|
|
517
|
-
const { tickCount: E } =
|
|
518
|
-
return
|
|
519
|
-
}),
|
|
520
|
-
const { tickFormat: E } =
|
|
517
|
+
const { tickCount: E } = b.value, [H, R] = n.value.domain();
|
|
518
|
+
return Lt(H, R, E);
|
|
519
|
+
}), A = d(() => {
|
|
520
|
+
const { tickFormat: E } = b.value;
|
|
521
521
|
return le(E);
|
|
522
522
|
}), g = d(
|
|
523
|
-
() =>
|
|
523
|
+
() => b.value.withHover && m.value && o.value > -1
|
|
524
524
|
);
|
|
525
525
|
function $(E) {
|
|
526
|
-
const { showTicks: H } =
|
|
527
|
-
return H === !1 ? "" :
|
|
526
|
+
const { showTicks: H } = b.value;
|
|
527
|
+
return H === !1 ? "" : A.value(E);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function k(E, H, R) {
|
|
530
530
|
e("mouseenter", { index: m.value ? E : null, value: H, event: R });
|
|
531
531
|
}
|
|
532
532
|
function w(E, H, R) {
|
|
533
533
|
e("click", { index: E, value: H, event: R });
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function B(E) {
|
|
536
536
|
if (!(!c.value || !c.value.length))
|
|
537
537
|
return c.value[E].ref;
|
|
538
538
|
}
|
|
539
539
|
function F() {
|
|
540
|
-
p.value =
|
|
540
|
+
p.value = L.value.map(
|
|
541
541
|
(E, H) => ({
|
|
542
542
|
value: $(E),
|
|
543
543
|
group: s.getTickGroupAttributes(E, H),
|
|
544
|
-
ghost: s.getTickGhostAttributes(
|
|
544
|
+
ghost: s.getTickGhostAttributes(B(H)),
|
|
545
545
|
label: s.getTickLabelAttributes(),
|
|
546
546
|
gridline: s.getGridLinesAttributes()
|
|
547
547
|
})
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
function K() {
|
|
551
|
-
const E = n.value.step ? "bandScale" : "linearScale", H = on[`${
|
|
552
|
-
Object.entries(H(n, a,
|
|
551
|
+
const E = n.value.step ? "bandScale" : "linearScale", H = on[`${v.value}-${he[E]}`];
|
|
552
|
+
Object.entries(H(n, a, b) || []).forEach(
|
|
553
553
|
([R, J]) => {
|
|
554
554
|
s[R] = J;
|
|
555
555
|
}
|
|
556
556
|
);
|
|
557
557
|
}
|
|
558
|
-
return C(n, K, { flush: "sync", immediate: !0 }), C(n, F, { immediate: !0 }), C(c, F), M(() =>
|
|
558
|
+
return C(n, K, { flush: "sync", immediate: !0 }), C(n, F, { immediate: !0 }), C(c, F), M(() => ie(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: he, POSITIONS: ge, TYPES: oe, props: r, emit: e, scale: n, containerSize: a, hoveredIndex: o, options: l, orientation: i, isEmpty: u, mixins: s, tickRefs: c, root: _, ticksWithAttributes: p, computedPosition: h, computedType: v, shouldHover: m, allOptions: b, showTick: f, axisTransform: T, ticks: L, tickFormatter: A, isHovering: g, formatTick: $, handleTickMouseenter: k, handleTickClick: w, getTextNode: B, setTicks: F, init: K, LumeTick: Bt };
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
561
|
var un = function() {
|
|
@@ -644,8 +644,8 @@ const pn = /* @__PURE__ */ D({
|
|
|
644
644
|
setup(t, { emit: e }) {
|
|
645
645
|
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = N(r), s = x(null), c = d(
|
|
646
646
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
647
|
-
),
|
|
648
|
-
return M(() =>
|
|
647
|
+
), _ = d(() => i.value === "width"), p = d(() => i.value === "height"), h = _n(n, a, o, l), { computedX: v, computedY: m, shouldHaveMinWidth: b, shouldHaveMinHeight: f } = vn(n, a, o, l), T = d(() => b.value ? 1 : (_.value ? h.computedWidth : o).value), L = d(() => f.value ? 1 : (p.value ? h.computedHeight : l).value), A = _.value || p.value ? h.transformOrigin : null;
|
|
648
|
+
return M(() => ie(s.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: s, computedClasses: c, shouldTransitionWidth: _, shouldTransitionHeight: p, transitionProps: h, computedX: v, computedY: m, shouldHaveMinWidth: b, shouldHaveMinHeight: f, computedWidth: T, computedHeight: L, transformOrigin: A };
|
|
649
649
|
}
|
|
650
650
|
});
|
|
651
651
|
var fn = function() {
|
|
@@ -675,9 +675,9 @@ var fn = function() {
|
|
|
675
675
|
null,
|
|
676
676
|
null
|
|
677
677
|
);
|
|
678
|
-
const
|
|
678
|
+
const $e = hn.exports;
|
|
679
679
|
function gn() {
|
|
680
|
-
const t = x(), e =
|
|
680
|
+
const t = x(), e = ue({
|
|
681
681
|
dimensions: {}
|
|
682
682
|
}), r = new ResizeObserver((n) => {
|
|
683
683
|
n.forEach((a) => {
|
|
@@ -686,7 +686,7 @@ function gn() {
|
|
|
686
686
|
});
|
|
687
687
|
return M(() => {
|
|
688
688
|
r.observe(t.value);
|
|
689
|
-
}),
|
|
689
|
+
}), Ye(() => {
|
|
690
690
|
r.unobserve(t.value);
|
|
691
691
|
}), { resizeState: e, resizeRef: t };
|
|
692
692
|
}
|
|
@@ -725,16 +725,16 @@ const yn = /* @__PURE__ */ D({
|
|
|
725
725
|
})), c = d(
|
|
726
726
|
() => o.value.height + s.value.top + s.value.bottom
|
|
727
727
|
);
|
|
728
|
-
return
|
|
728
|
+
return Ke(() => {
|
|
729
729
|
if (!l.value)
|
|
730
730
|
return;
|
|
731
|
-
const { width:
|
|
732
|
-
if (!
|
|
731
|
+
const { width: _ } = u.dimensions, { height: p } = l.value.getBoundingClientRect();
|
|
732
|
+
if (!_ || !p)
|
|
733
733
|
return;
|
|
734
|
-
const h =
|
|
734
|
+
const h = _ - s.value.left - s.value.right, v = p - s.value.top - s.value.bottom, m = {
|
|
735
735
|
width: h > 0 ? h : 0,
|
|
736
|
-
height:
|
|
737
|
-
outerWidth:
|
|
736
|
+
height: v > 0 ? v : 0,
|
|
737
|
+
outerWidth: _,
|
|
738
738
|
outerHeight: p
|
|
739
739
|
};
|
|
740
740
|
e("resize", m);
|
|
@@ -775,7 +775,7 @@ const Tn = An.exports, On = /* @__PURE__ */ D({
|
|
|
775
775
|
},
|
|
776
776
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
777
777
|
setup(t, { emit: e }) {
|
|
778
|
-
const r =
|
|
778
|
+
const r = Te("isEmpty");
|
|
779
779
|
return { __sfc: !0, emit: e, isEmpty: r };
|
|
780
780
|
}
|
|
781
781
|
});
|
|
@@ -811,7 +811,7 @@ var En = function() {
|
|
|
811
811
|
Dn,
|
|
812
812
|
!1,
|
|
813
813
|
null,
|
|
814
|
-
"
|
|
814
|
+
"8af3fac6",
|
|
815
815
|
null,
|
|
816
816
|
null
|
|
817
817
|
);
|
|
@@ -820,17 +820,17 @@ const Nn = {};
|
|
|
820
820
|
var Rn = function() {
|
|
821
821
|
var e = this, r = e._self._c;
|
|
822
822
|
return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
|
|
823
|
-
},
|
|
823
|
+
}, Bn = [], Sn = /* @__PURE__ */ I(
|
|
824
824
|
Nn,
|
|
825
825
|
Rn,
|
|
826
|
-
|
|
826
|
+
Bn,
|
|
827
827
|
!1,
|
|
828
828
|
null,
|
|
829
|
-
"
|
|
829
|
+
"4ed7ec1b",
|
|
830
830
|
null,
|
|
831
831
|
null
|
|
832
832
|
);
|
|
833
|
-
const Pn =
|
|
833
|
+
const Pn = Sn.exports, Gn = /* @__PURE__ */ D({
|
|
834
834
|
__name: "lume-tooltip-item",
|
|
835
835
|
props: {
|
|
836
836
|
color: {
|
|
@@ -851,7 +851,7 @@ var jn = function() {
|
|
|
851
851
|
Fn,
|
|
852
852
|
!1,
|
|
853
853
|
null,
|
|
854
|
-
"
|
|
854
|
+
"4f995c3c",
|
|
855
855
|
null,
|
|
856
856
|
null
|
|
857
857
|
);
|
|
@@ -895,7 +895,7 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
|
|
|
895
895
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
896
896
|
), c = d(
|
|
897
897
|
() => s.value ? "fixed" : "absolute"
|
|
898
|
-
),
|
|
898
|
+
), _ = d(() => [
|
|
899
899
|
{
|
|
900
900
|
name: "computeStyles",
|
|
901
901
|
options: {
|
|
@@ -910,35 +910,35 @@ const Mn = Vn.exports, zn = /* @__PURE__ */ D({
|
|
|
910
910
|
...r.modifiers || []
|
|
911
911
|
]), p = d(
|
|
912
912
|
() => u.value.showTitle !== !1 && r.title != null
|
|
913
|
-
), h = d(() => le(u.value.valueFormat)),
|
|
913
|
+
), h = d(() => le(u.value.valueFormat)), v = d(() => le(u.value.titleFormat)), m = d(
|
|
914
914
|
() => {
|
|
915
|
-
var
|
|
916
|
-
return ((
|
|
915
|
+
var A;
|
|
916
|
+
return ((A = a.value) == null ? void 0 : A.find((g) => g.isSummary)) || {
|
|
917
917
|
label: u.value.summary ?? r.summary
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
),
|
|
920
|
+
), b = d(() => l.summary || m.value.label);
|
|
921
921
|
function f() {
|
|
922
|
-
r.targetElement && n.value && (i.value =
|
|
922
|
+
r.targetElement && n.value && (i.value = wt(r.targetElement, n.value, {
|
|
923
923
|
placement: r.position,
|
|
924
924
|
strategy: c.value,
|
|
925
|
-
modifiers:
|
|
925
|
+
modifiers: _.value
|
|
926
926
|
}), e("opened", r.targetElement));
|
|
927
927
|
}
|
|
928
928
|
function T() {
|
|
929
929
|
i.value && (i.value.destroy(), e("closed"));
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function L() {
|
|
932
932
|
i.value && (n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
933
933
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
934
934
|
}() : T());
|
|
935
935
|
}
|
|
936
936
|
return C(
|
|
937
937
|
() => r.targetElement,
|
|
938
|
-
(
|
|
939
|
-
!g &&
|
|
938
|
+
(A, g) => {
|
|
939
|
+
!g && A ? f() : L();
|
|
940
940
|
}
|
|
941
|
-
), M(f),
|
|
941
|
+
), M(f), Ye(T), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: s, strategy: c, allModifiers: _, showTitle: p, formatValue: h, formatTitle: v, summaryItem: m, hasSummary: b, initPopper: f, destroyPopper: T, updatePopper: L, LumeTooltipTitle: Hn, LumeTooltipSummary: Pn, LumeTooltipItem: Mn };
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
944
|
var Wn = function() {
|
|
@@ -972,24 +972,24 @@ var Wn = function() {
|
|
|
972
972
|
);
|
|
973
973
|
const Un = Xn.exports;
|
|
974
974
|
var W = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(W || {});
|
|
975
|
-
const Yn = W.Categorical,
|
|
975
|
+
const Yn = W.Categorical, se = P.Skyblue, Kn = Le.SkyTeal;
|
|
976
976
|
function Jn(t) {
|
|
977
|
-
return t === W.Divergent ? Kn :
|
|
977
|
+
return t === W.Divergent ? Kn : se;
|
|
978
978
|
}
|
|
979
979
|
function Qn(t) {
|
|
980
|
-
return Object.values(
|
|
980
|
+
return Object.values(xe).includes(t);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
983
|
-
return e === W.Divergent ? Object.values(
|
|
982
|
+
function Ne(t, e) {
|
|
983
|
+
return e === W.Divergent ? Object.values(Le).includes(t) : Object.values({
|
|
984
984
|
...P,
|
|
985
|
+
...et,
|
|
985
986
|
...tt,
|
|
986
|
-
...
|
|
987
|
-
...we
|
|
987
|
+
...xe
|
|
988
988
|
}).includes(t);
|
|
989
989
|
}
|
|
990
990
|
function qn(t, e) {
|
|
991
991
|
const r = Object.values(P).indexOf(t);
|
|
992
|
-
return
|
|
992
|
+
return zt(Object.values(P), r > -1 ? r : 0)[e];
|
|
993
993
|
}
|
|
994
994
|
function er(t, e) {
|
|
995
995
|
const r = 50 + e * 10;
|
|
@@ -999,7 +999,7 @@ function tr(t, e) {
|
|
|
999
999
|
const r = (e + 1) * 10;
|
|
1000
1000
|
return `${t}-${r}`;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Re(t, e, r) {
|
|
1003
1003
|
switch (e) {
|
|
1004
1004
|
default:
|
|
1005
1005
|
case W.Categorical:
|
|
@@ -1011,15 +1011,15 @@ function Be(t, e, r) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
function nr(t, e, r = Yn, n) {
|
|
1014
|
-
return
|
|
1014
|
+
return Ne(t, r) ? t : (n > 4 && (Z(V.ColorLoop), n = n % 5), Ne(e, r) ? Re(e, r, n) : Re(Jn(r), r, n));
|
|
1015
1015
|
}
|
|
1016
1016
|
function rr(t) {
|
|
1017
|
-
return t.map((e) =>
|
|
1017
|
+
return t.map((e) => Pt(e) ? e : { value: e });
|
|
1018
1018
|
}
|
|
1019
1019
|
function ar(t) {
|
|
1020
1020
|
return t.__internal === !0;
|
|
1021
1021
|
}
|
|
1022
|
-
const
|
|
1022
|
+
const we = (t = null) => ({
|
|
1023
1023
|
data: {
|
|
1024
1024
|
type: Array,
|
|
1025
1025
|
required: !0,
|
|
@@ -1038,34 +1038,34 @@ const Ee = (t = null) => ({
|
|
|
1038
1038
|
default: null
|
|
1039
1039
|
}
|
|
1040
1040
|
});
|
|
1041
|
-
function
|
|
1042
|
-
const o =
|
|
1041
|
+
function Ie(t, e, r, n, a) {
|
|
1042
|
+
const o = ue({
|
|
1043
1043
|
width: 0,
|
|
1044
1044
|
height: 0
|
|
1045
|
-
}), l =
|
|
1045
|
+
}), l = Wt(12), i = d(() => {
|
|
1046
1046
|
var c;
|
|
1047
1047
|
return t.value.length > 5 && Z(V.DatasetLength), (c = t.value) == null ? void 0 : c.map(
|
|
1048
|
-
(
|
|
1049
|
-
if (ar(
|
|
1050
|
-
return
|
|
1051
|
-
const h = rr(
|
|
1052
|
-
|
|
1048
|
+
(_, p) => {
|
|
1049
|
+
if (ar(_))
|
|
1050
|
+
return _;
|
|
1051
|
+
const h = rr(_.values), v = nr(
|
|
1052
|
+
_.color,
|
|
1053
1053
|
r == null ? void 0 : r.value,
|
|
1054
1054
|
n == null ? void 0 : n.value.colorPalette,
|
|
1055
1055
|
p
|
|
1056
1056
|
);
|
|
1057
1057
|
return {
|
|
1058
|
-
...
|
|
1058
|
+
..._,
|
|
1059
1059
|
values: h,
|
|
1060
|
-
color:
|
|
1060
|
+
color: v,
|
|
1061
1061
|
__internal: !0
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
1064
|
);
|
|
1065
|
-
}), u = d(() => Array.isArray(e.value) ? e.value :
|
|
1065
|
+
}), u = d(() => Array.isArray(e.value) ? e.value : me(t.value).map((c, _) => _));
|
|
1066
1066
|
function s(c) {
|
|
1067
|
-
const
|
|
1068
|
-
o.width = c.width, o.height =
|
|
1067
|
+
const _ = (a == null ? void 0 : a.value) === O.HORIZONTAL && me(t).length * (Kt * 2) || c.height;
|
|
1068
|
+
o.width = c.width, o.height = _;
|
|
1069
1069
|
}
|
|
1070
1070
|
return {
|
|
1071
1071
|
chartID: l,
|
|
@@ -1088,66 +1088,64 @@ const or = () => ({
|
|
|
1088
1088
|
function lr(t, e, r, n, a) {
|
|
1089
1089
|
const o = x(null), l = x(null);
|
|
1090
1090
|
function i() {
|
|
1091
|
-
const { width: u, height: s } = r
|
|
1092
|
-
!u && !s || !e.value || !t.value || (n.value ===
|
|
1091
|
+
const { width: u, height: s } = r;
|
|
1092
|
+
!u && !s || !e.value || !t.value || (n.value === O.HORIZONTAL ? (o.value = Se(
|
|
1093
1093
|
t.value,
|
|
1094
1094
|
u,
|
|
1095
1095
|
n.value,
|
|
1096
1096
|
a.value.startOnZero
|
|
1097
|
-
), l.value =
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1097
|
+
), l.value = Be(
|
|
1098
|
+
e.value,
|
|
1099
|
+
s,
|
|
1100
|
+
n.value,
|
|
1101
|
+
a.value
|
|
1102
|
+
)) : (o.value = Be(
|
|
1103
|
+
e.value,
|
|
1104
|
+
u,
|
|
1105
|
+
n.value,
|
|
1106
|
+
a.value
|
|
1107
|
+
), l.value = Se(
|
|
1106
1108
|
t.value,
|
|
1107
1109
|
s,
|
|
1108
1110
|
n.value,
|
|
1109
1111
|
a.value.startOnZero
|
|
1110
1112
|
)));
|
|
1111
1113
|
}
|
|
1112
|
-
return
|
|
1114
|
+
return Ke(i), { xScale: o, yScale: l };
|
|
1113
1115
|
}
|
|
1114
|
-
function
|
|
1115
|
-
|
|
1116
|
-
size: e,
|
|
1117
|
-
paddingOuter: r = 0
|
|
1118
|
-
}) {
|
|
1119
|
-
const n = [0, e];
|
|
1116
|
+
function Be(t, e, r, n) {
|
|
1117
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? at : rt);
|
|
1120
1118
|
return Object.assign(
|
|
1121
|
-
te().range(
|
|
1119
|
+
te().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((s, c) => c)),
|
|
1122
1120
|
{ labels: t }
|
|
1123
1121
|
);
|
|
1124
1122
|
}
|
|
1125
|
-
function
|
|
1126
|
-
const a =
|
|
1123
|
+
function Se(t, e, r, n) {
|
|
1124
|
+
const a = Qe(t).filter((c) => c != null), o = [0, e];
|
|
1127
1125
|
if (a.length === 0)
|
|
1128
1126
|
return ne().range(o).domain([0, 0]).nice();
|
|
1129
|
-
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r ===
|
|
1127
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l, u = Math.max(...a), s = r === O.HORIZONTAL ? [i, u] : [u, i];
|
|
1130
1128
|
return ne().range(o).domain(s).nice();
|
|
1131
1129
|
}
|
|
1132
|
-
function
|
|
1130
|
+
function Pe(t) {
|
|
1133
1131
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1134
1132
|
}
|
|
1135
|
-
function
|
|
1133
|
+
function ye(t, e) {
|
|
1136
1134
|
return U(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1137
1135
|
}
|
|
1138
|
-
function
|
|
1136
|
+
function Ge(t, e, {
|
|
1139
1137
|
padding: r,
|
|
1140
1138
|
paddingInner: n,
|
|
1141
1139
|
paddingOuter: a
|
|
1142
1140
|
} = {}) {
|
|
1143
|
-
const o = r ?? (e ===
|
|
1141
|
+
const o = r ?? (e === O.HORIZONTAL ? at : rt);
|
|
1144
1142
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o / 2);
|
|
1145
1143
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return Object.values(
|
|
1144
|
+
function it(t) {
|
|
1145
|
+
return Object.values(O).includes(t);
|
|
1148
1146
|
}
|
|
1149
1147
|
const q = (t, e = !0) => ({
|
|
1150
|
-
...
|
|
1148
|
+
...we(t),
|
|
1151
1149
|
...or(),
|
|
1152
1150
|
...ae(),
|
|
1153
1151
|
classList: {
|
|
@@ -1161,18 +1159,18 @@ const q = (t, e = !0) => ({
|
|
|
1161
1159
|
...e ? {
|
|
1162
1160
|
orientation: {
|
|
1163
1161
|
type: String,
|
|
1164
|
-
default:
|
|
1165
|
-
validator:
|
|
1162
|
+
default: O.VERTICAL,
|
|
1163
|
+
validator: it
|
|
1166
1164
|
}
|
|
1167
1165
|
} : {}
|
|
1168
1166
|
}), ur = (t) => ({
|
|
1169
|
-
...
|
|
1167
|
+
...we(t),
|
|
1170
1168
|
...ae(),
|
|
1171
1169
|
hoveredElement: {
|
|
1172
1170
|
type: [Number, String],
|
|
1173
1171
|
default: null
|
|
1174
1172
|
}
|
|
1175
|
-
}),
|
|
1173
|
+
}), ce = () => ({
|
|
1176
1174
|
data: {
|
|
1177
1175
|
type: Array,
|
|
1178
1176
|
required: !0
|
|
@@ -1187,8 +1185,8 @@ const q = (t, e = !0) => ({
|
|
|
1187
1185
|
},
|
|
1188
1186
|
orientation: {
|
|
1189
1187
|
type: String,
|
|
1190
|
-
default:
|
|
1191
|
-
validator:
|
|
1188
|
+
default: O.VERTICAL,
|
|
1189
|
+
validator: it
|
|
1192
1190
|
},
|
|
1193
1191
|
xScale: {
|
|
1194
1192
|
type: Function,
|
|
@@ -1217,28 +1215,29 @@ const q = (t, e = !0) => ({
|
|
|
1217
1215
|
}), ir = /* @__PURE__ */ D({
|
|
1218
1216
|
__name: "lume-overlay-group",
|
|
1219
1217
|
props: {
|
|
1220
|
-
...
|
|
1218
|
+
...ce(),
|
|
1221
1219
|
orientation: {
|
|
1222
1220
|
type: String,
|
|
1223
|
-
default:
|
|
1221
|
+
default: O.VERTICAL
|
|
1224
1222
|
}
|
|
1225
1223
|
},
|
|
1226
1224
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1227
1225
|
setup(t, { emit: e }) {
|
|
1228
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = N(r), i = d(() =>
|
|
1226
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = N(r), i = d(() => me(n));
|
|
1229
1227
|
function u(s) {
|
|
1230
|
-
|
|
1231
|
-
|
|
1228
|
+
var b;
|
|
1229
|
+
const c = a.value === O.HORIZONTAL ? l.value : o.value, _ = c.domain(), p = Gt(c), h = ((b = c.paddingInner) == null ? void 0 : b.call(c)) ?? 0, v = p * h, m = U(c) ? c(_[s]) - v / 2 : c(s) - p / 2;
|
|
1230
|
+
return a.value === O.HORIZONTAL ? {
|
|
1232
1231
|
width: Math.max(...o.value.range()),
|
|
1233
1232
|
height: p,
|
|
1234
|
-
transform: `translate(0, ${
|
|
1233
|
+
transform: `translate(0, ${m})`
|
|
1235
1234
|
} : {
|
|
1236
1235
|
width: p,
|
|
1237
1236
|
height: Math.max(...l.value.range()),
|
|
1238
|
-
transform: `translate(${
|
|
1237
|
+
transform: `translate(${m}, 0)`
|
|
1239
1238
|
};
|
|
1240
1239
|
}
|
|
1241
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1240
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: $e };
|
|
1242
1241
|
}
|
|
1243
1242
|
});
|
|
1244
1243
|
var sr = function() {
|
|
@@ -1263,12 +1262,12 @@ var sr = function() {
|
|
|
1263
1262
|
const vr = dr.exports;
|
|
1264
1263
|
function _r(t) {
|
|
1265
1264
|
return { hasNegativeValues: d(
|
|
1266
|
-
() =>
|
|
1265
|
+
() => Qe(t.value).some((r) => r < 0)
|
|
1267
1266
|
) };
|
|
1268
1267
|
}
|
|
1269
1268
|
function pr(t, e, r, n) {
|
|
1270
1269
|
const a = d(
|
|
1271
|
-
() => n.value ===
|
|
1270
|
+
() => n.value === O.HORIZONTAL
|
|
1272
1271
|
), o = d(
|
|
1273
1272
|
() => {
|
|
1274
1273
|
var s;
|
|
@@ -1300,10 +1299,10 @@ function mr(t) {
|
|
|
1300
1299
|
return e[a] ? e[a] + o : o;
|
|
1301
1300
|
}), []);
|
|
1302
1301
|
}
|
|
1303
|
-
const
|
|
1302
|
+
const je = {
|
|
1304
1303
|
"stacked-bar": mr
|
|
1305
1304
|
};
|
|
1306
|
-
function
|
|
1305
|
+
function st(t, e, r, n, a, o, l) {
|
|
1307
1306
|
const i = d(
|
|
1308
1307
|
() => {
|
|
1309
1308
|
var s;
|
|
@@ -1311,10 +1310,10 @@ function it(t, e, r, n, a, o, l) {
|
|
|
1311
1310
|
}
|
|
1312
1311
|
);
|
|
1313
1312
|
function u(s) {
|
|
1314
|
-
const c = l != null && l.value &&
|
|
1315
|
-
t.value = c.map((
|
|
1316
|
-
cx: (a == null ? void 0 : a.value) ===
|
|
1317
|
-
cy: (a == null ? void 0 : a.value) ===
|
|
1313
|
+
const c = l != null && l.value && je[l.value] ? je[l.value](s) : fr(s);
|
|
1314
|
+
t.value = c.map((_, p) => ({
|
|
1315
|
+
cx: (a == null ? void 0 : a.value) === O.HORIZONTAL ? r.value(_) : ye(r.value, p),
|
|
1316
|
+
cy: (a == null ? void 0 : a.value) === O.HORIZONTAL ? ye(n.value, p) : n.value(_)
|
|
1318
1317
|
}));
|
|
1319
1318
|
}
|
|
1320
1319
|
return C(
|
|
@@ -1326,7 +1325,7 @@ function it(t, e, r, n, a, o, l) {
|
|
|
1326
1325
|
), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
|
|
1327
1326
|
}
|
|
1328
1327
|
function hr() {
|
|
1329
|
-
const t =
|
|
1328
|
+
const t = ue({
|
|
1330
1329
|
opened: !1,
|
|
1331
1330
|
targetElement: null
|
|
1332
1331
|
});
|
|
@@ -1343,7 +1342,7 @@ function gr(t) {
|
|
|
1343
1342
|
return {
|
|
1344
1343
|
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1345
1344
|
label: a,
|
|
1346
|
-
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ??
|
|
1345
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? nt
|
|
1347
1346
|
};
|
|
1348
1347
|
})
|
|
1349
1348
|
) };
|
|
@@ -1358,100 +1357,100 @@ const yr = /* @__PURE__ */ D({
|
|
|
1358
1357
|
}
|
|
1359
1358
|
},
|
|
1360
1359
|
setup(t, { emit: e }) {
|
|
1361
|
-
const r = t, n = G(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = N(r), c = x(-1),
|
|
1360
|
+
const r = t, n = G(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: s } = N(r), c = x(-1), _ = x(null), p = x(null), h = x([]), { allOptions: v } = j(i), { internalData: m, computedLabels: b, containerSize: f, updateSize: T, chartID: L } = Ie(a, o, l, v, u), { xScale: A, yScale: g } = lr(
|
|
1362
1361
|
m,
|
|
1363
|
-
|
|
1362
|
+
b,
|
|
1364
1363
|
f,
|
|
1365
1364
|
u,
|
|
1366
|
-
|
|
1365
|
+
v
|
|
1367
1366
|
), $ = d(() => {
|
|
1368
1367
|
var y;
|
|
1369
|
-
return r.xScale ?
|
|
1370
|
-
}),
|
|
1368
|
+
return r.xScale ? Pe(r.xScale) ? r.xScale : (y = r.xScale) == null ? void 0 : y.call(r, m.value, o.value, f) : A.value;
|
|
1369
|
+
}), k = d(() => {
|
|
1371
1370
|
var y;
|
|
1372
|
-
return r.yScale ?
|
|
1371
|
+
return r.yScale ? Pe(r.yScale) ? r.yScale : (y = r.yScale) == null ? void 0 : y.call(r, m.value, o.value, f) : g.value;
|
|
1373
1372
|
}), w = d(() => ({
|
|
1374
|
-
...
|
|
1375
|
-
withHover: u.value ===
|
|
1376
|
-
})),
|
|
1377
|
-
...
|
|
1378
|
-
withHover: u.value ===
|
|
1373
|
+
...v.value.xAxisOptions,
|
|
1374
|
+
withHover: u.value === O.VERTICAL
|
|
1375
|
+
})), B = d(() => ({
|
|
1376
|
+
...v.value.yAxisOptions,
|
|
1377
|
+
withHover: u.value === O.HORIZONTAL
|
|
1379
1378
|
})), F = d(() => {
|
|
1380
1379
|
var y;
|
|
1381
|
-
return (y =
|
|
1380
|
+
return (y = v.value.xAxisOptions) == null ? void 0 : y.title;
|
|
1382
1381
|
}), K = d(() => {
|
|
1383
1382
|
var y;
|
|
1384
|
-
return (y =
|
|
1383
|
+
return (y = v.value.yAxisOptions) == null ? void 0 : y.title;
|
|
1385
1384
|
}), E = d(() => {
|
|
1386
1385
|
var y;
|
|
1387
|
-
return ((y =
|
|
1386
|
+
return ((y = v.value.xAxisOptions) == null ? void 0 : y.withTitle) !== !1 && F.value;
|
|
1388
1387
|
}), H = d(() => {
|
|
1389
1388
|
var y;
|
|
1390
|
-
return ((y =
|
|
1389
|
+
return ((y = v.value.yAxisOptions) == null ? void 0 : y.withTitle) !== !1 && K.value;
|
|
1391
1390
|
}), R = d(
|
|
1392
1391
|
() => a.value.every((y) => !y.values.length)
|
|
1393
1392
|
), J = d(() => {
|
|
1394
|
-
const y = [], { noBaseScales:
|
|
1395
|
-
return
|
|
1396
|
-
}), { hasNegativeValues:
|
|
1393
|
+
const y = [], { noBaseScales: S } = v.value;
|
|
1394
|
+
return S || y.push(() => !!($.value && k.value)), y.every((z) => z() === !0);
|
|
1395
|
+
}), { hasNegativeValues: ft } = _r(m), { negativeBarAttributes: mt } = pr(
|
|
1397
1396
|
f,
|
|
1398
1397
|
$,
|
|
1399
|
-
|
|
1398
|
+
k,
|
|
1400
1399
|
u
|
|
1401
|
-
), { shouldGenerateTooltipAnchors:
|
|
1400
|
+
), { shouldGenerateTooltipAnchors: ht } = st(
|
|
1402
1401
|
h,
|
|
1403
|
-
|
|
1402
|
+
v,
|
|
1404
1403
|
$,
|
|
1405
|
-
|
|
1404
|
+
k,
|
|
1406
1405
|
u,
|
|
1407
1406
|
m,
|
|
1408
1407
|
s
|
|
1409
|
-
), { tooltipConfig:
|
|
1410
|
-
() =>
|
|
1411
|
-
),
|
|
1408
|
+
), { tooltipConfig: De, showTooltip: Ce, hideTooltip: He } = hr(), { getTooltipItems: gt } = gr(m), yt = d(
|
|
1409
|
+
() => v.value.withTooltip !== !1 && De.opened
|
|
1410
|
+
), bt = d(
|
|
1412
1411
|
() => {
|
|
1413
1412
|
var y;
|
|
1414
|
-
return ((y =
|
|
1413
|
+
return ((y = v.value.tooltipOptions) == null ? void 0 : y.position) || "top";
|
|
1415
1414
|
}
|
|
1416
1415
|
);
|
|
1417
|
-
function
|
|
1418
|
-
var
|
|
1419
|
-
if (y !== c.value && (
|
|
1420
|
-
const z = (
|
|
1421
|
-
|
|
1416
|
+
function de(y) {
|
|
1417
|
+
var S;
|
|
1418
|
+
if (y !== c.value && (v.value.withHover !== !1 && (c.value = y), v.value.withTooltip !== !1)) {
|
|
1419
|
+
const z = (S = v.value.tooltipOptions) != null && S.targetElement ? v.value.tooltipOptions.targetElement === "self" ? p.value.$el : v.value.tooltipOptions.targetElement : _.value[y];
|
|
1420
|
+
Ce(z);
|
|
1422
1421
|
}
|
|
1423
1422
|
}
|
|
1424
|
-
function
|
|
1423
|
+
function ve(y) {
|
|
1425
1424
|
if (y > a.value[0].values.length - 1) {
|
|
1426
1425
|
Z(V.InvalidHoveredIndex);
|
|
1427
1426
|
return;
|
|
1428
1427
|
}
|
|
1429
|
-
|
|
1428
|
+
de(y);
|
|
1430
1429
|
}
|
|
1431
|
-
function
|
|
1432
|
-
|
|
1430
|
+
function kt() {
|
|
1431
|
+
He(), c.value = -1, e("chart-mouseleave");
|
|
1433
1432
|
}
|
|
1434
|
-
function
|
|
1435
|
-
y !== null &&
|
|
1433
|
+
function At({ index: y, value: S, event: z }) {
|
|
1434
|
+
y !== null && de(y), e("axis-mouseenter", { index: y, value: S, event: z });
|
|
1436
1435
|
}
|
|
1437
|
-
function
|
|
1438
|
-
e("axis-click", { index: y, value:
|
|
1436
|
+
function Tt({ index: y, value: S, event: z }) {
|
|
1437
|
+
e("axis-click", { index: y, value: S, event: z });
|
|
1439
1438
|
}
|
|
1440
1439
|
return C(
|
|
1441
1440
|
a,
|
|
1442
|
-
(y,
|
|
1441
|
+
(y, S) => e("data-changed", { newValue: y, oldValue: S })
|
|
1443
1442
|
), C(
|
|
1444
1443
|
o,
|
|
1445
|
-
(y,
|
|
1446
|
-
), C(R, (y) => y && Z(V.Empty), { immediate: !0 }), C(() => r.hoveredIndex,
|
|
1444
|
+
(y, S) => e("labels-changed", { newValue: y, oldValue: S })
|
|
1445
|
+
), C(R, (y) => y && Z(V.Empty), { immediate: !0 }), C(() => r.hoveredIndex, ve), C(
|
|
1447
1446
|
h,
|
|
1448
1447
|
(y) => {
|
|
1449
|
-
y && r.hoveredIndex != null && c.value === -1 &&
|
|
1448
|
+
y && r.hoveredIndex != null && c.value === -1 && ve(r.hoveredIndex);
|
|
1450
1449
|
},
|
|
1451
1450
|
{ flush: "post" }
|
|
1452
1451
|
), M(() => {
|
|
1453
1452
|
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.');
|
|
1454
|
-
}),
|
|
1453
|
+
}), _e("chartID", L), _e("isEmpty", R), _e("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: s, internalHoveredIndex: c, tooltipAnchor: _, chartContainer: p, tooltipAnchorAttributes: h, allOptions: v, internalData: m, computedLabels: b, containerSize: f, updateSize: T, chartID: L, xScale: A, yScale: g, computedXScale: $, computedYScale: k, computedXAxisOptions: w, computedYAxisOptions: B, xAxisTitle: F, yAxisTitle: K, showXAxisTitle: E, showYAxisTitle: H, isEmpty: R, isReady: J, hasNegativeValues: ft, negativeBarAttributes: mt, shouldGenerateTooltipAnchors: ht, tooltipConfig: De, showTooltip: Ce, hideTooltip: He, getTooltipItems: gt, isTooltipOpened: yt, tooltipPosition: bt, handleInternalHover: de, handleExternalHover: ve, handleMouseleave: kt, handleAxisMouseenter: At, handleAxisClick: Tt, LumeAxis: dn, LumeBar: $e, LumeChartContainer: Tn, LumeChartLegend: wn, LumeTooltip: Un, LumeOverlayGroup: vr, TOOLTIP_ANCHOR_RADIUS: Jt };
|
|
1455
1454
|
}
|
|
1456
1455
|
});
|
|
1457
1456
|
var br = function() {
|
|
@@ -1514,7 +1513,7 @@ var br = function() {
|
|
|
1514
1513
|
null
|
|
1515
1514
|
);
|
|
1516
1515
|
const ee = Ar.exports;
|
|
1517
|
-
function
|
|
1516
|
+
function Fe(t, e) {
|
|
1518
1517
|
return {
|
|
1519
1518
|
x0: 0 + (e ? e.left : 0),
|
|
1520
1519
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1523,18 +1522,18 @@ function Ve(t, e) {
|
|
|
1523
1522
|
};
|
|
1524
1523
|
}
|
|
1525
1524
|
function Tr(t) {
|
|
1526
|
-
const e = x(
|
|
1525
|
+
const e = x(Fe(t));
|
|
1527
1526
|
function r(n) {
|
|
1528
|
-
e.value =
|
|
1527
|
+
e.value = Fe(t, n);
|
|
1529
1528
|
}
|
|
1530
1529
|
return { extents: e, updateExtents: r };
|
|
1531
1530
|
}
|
|
1532
|
-
var
|
|
1531
|
+
var ct = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))(ct || {});
|
|
1533
1532
|
const Or = "[lume] ";
|
|
1534
1533
|
function Lr(t, e, r = !0) {
|
|
1535
|
-
r &&
|
|
1534
|
+
r && Je() || console.error(Or + "Error: " + t, e);
|
|
1536
1535
|
}
|
|
1537
|
-
const
|
|
1536
|
+
const Ve = 8, xr = 8, $r = 20, wr = 200;
|
|
1538
1537
|
function Q(t) {
|
|
1539
1538
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1540
1539
|
}
|
|
@@ -1547,7 +1546,7 @@ function Ir(t, e) {
|
|
|
1547
1546
|
function Er(t, e) {
|
|
1548
1547
|
return e.links.find((r) => re(r) === t);
|
|
1549
1548
|
}
|
|
1550
|
-
function
|
|
1549
|
+
function dt(t) {
|
|
1551
1550
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1552
1551
|
}
|
|
1553
1552
|
function Dr(t, e) {
|
|
@@ -1574,26 +1573,26 @@ function Cr(t) {
|
|
|
1574
1573
|
width: e.x1 - e.x0,
|
|
1575
1574
|
height: e.y1 - e.y0,
|
|
1576
1575
|
textTransform: {
|
|
1577
|
-
x: e.depth > 0 ? e.x1 +
|
|
1576
|
+
x: e.depth > 0 ? e.x1 + Ve : e.x0 - Ve,
|
|
1578
1577
|
y: (e.y1 + e.y0) / 2
|
|
1579
1578
|
},
|
|
1580
1579
|
node: e
|
|
1581
1580
|
}));
|
|
1582
1581
|
}
|
|
1583
1582
|
function Hr(t) {
|
|
1584
|
-
const e =
|
|
1583
|
+
const e = It();
|
|
1585
1584
|
return t.map((r) => {
|
|
1586
1585
|
var n;
|
|
1587
1586
|
return {
|
|
1588
1587
|
id: re(r),
|
|
1589
|
-
color: r.color || ((n = r.source) == null ? void 0 : n.color) ||
|
|
1588
|
+
color: r.color || ((n = r.source) == null ? void 0 : n.color) || se,
|
|
1590
1589
|
d: e(r),
|
|
1591
1590
|
strokeWidth: Math.max(1, r.width),
|
|
1592
1591
|
link: r
|
|
1593
1592
|
};
|
|
1594
1593
|
});
|
|
1595
1594
|
}
|
|
1596
|
-
function
|
|
1595
|
+
function Me(t, e, r, n, a) {
|
|
1597
1596
|
if (n === !1) {
|
|
1598
1597
|
t.node = {
|
|
1599
1598
|
...t.node,
|
|
@@ -1601,7 +1600,7 @@ function ze(t, e, r, n, a) {
|
|
|
1601
1600
|
};
|
|
1602
1601
|
return;
|
|
1603
1602
|
}
|
|
1604
|
-
const o = Date.now(), l =
|
|
1603
|
+
const o = Date.now(), l = Mt(e, r), i = () => {
|
|
1605
1604
|
let s = (Date.now() - o) / wr;
|
|
1606
1605
|
s > 1 && (s = 1), t.node = {
|
|
1607
1606
|
...t.node,
|
|
@@ -1627,15 +1626,15 @@ function Rr(t, e, r) {
|
|
|
1627
1626
|
return (i = t.value) == null ? void 0 : i[0].values.map(
|
|
1628
1627
|
(u) => {
|
|
1629
1628
|
var s;
|
|
1630
|
-
return (s = u.targets) == null ? void 0 : s.map(({ node: c, value:
|
|
1629
|
+
return (s = u.targets) == null ? void 0 : s.map(({ node: c, value: _, color: p }) => ({
|
|
1631
1630
|
color: p,
|
|
1632
1631
|
source: u.value ?? u.label,
|
|
1633
1632
|
target: c,
|
|
1634
|
-
value:
|
|
1633
|
+
value: _
|
|
1635
1634
|
}));
|
|
1636
1635
|
}
|
|
1637
1636
|
).filter(Boolean).flat();
|
|
1638
|
-
}), l = d(() =>
|
|
1637
|
+
}), l = d(() => Et().nodeId(Q).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort));
|
|
1639
1638
|
return C([l, r], () => {
|
|
1640
1639
|
try {
|
|
1641
1640
|
const { x0: i, y0: u, x1: s, y1: c } = r.value;
|
|
@@ -1644,39 +1643,39 @@ function Rr(t, e, r) {
|
|
|
1644
1643
|
[s, c]
|
|
1645
1644
|
])({ nodes: a.value, links: o.value });
|
|
1646
1645
|
} catch (i) {
|
|
1647
|
-
Lr(
|
|
1646
|
+
Lr(ct.GraphProblem, i), n.value = Nr;
|
|
1648
1647
|
}
|
|
1649
1648
|
}), { graph: n };
|
|
1650
1649
|
}
|
|
1651
|
-
function
|
|
1650
|
+
function be(t, e) {
|
|
1652
1651
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1653
|
-
e[r.id] = n,
|
|
1652
|
+
e[r.id] = n, be(r, e);
|
|
1654
1653
|
}), e;
|
|
1655
1654
|
}
|
|
1656
|
-
function
|
|
1655
|
+
function ke(t, e) {
|
|
1657
1656
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1658
|
-
e[r.id] = n,
|
|
1657
|
+
e[r.id] = n, ke(r, e);
|
|
1659
1658
|
}), e;
|
|
1660
1659
|
}
|
|
1661
|
-
function
|
|
1660
|
+
function Br(t, e) {
|
|
1662
1661
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(re(n)), r), []);
|
|
1663
1662
|
}
|
|
1664
|
-
const
|
|
1663
|
+
const Sr = (t, e) => {
|
|
1665
1664
|
let r;
|
|
1666
|
-
|
|
1665
|
+
dt(t) ? r = {
|
|
1667
1666
|
[t.id]: t.value,
|
|
1668
|
-
...
|
|
1669
|
-
...
|
|
1667
|
+
...be(t),
|
|
1668
|
+
...ke(t)
|
|
1670
1669
|
} : r = {
|
|
1671
1670
|
[t.source.id]: t.source.value,
|
|
1672
1671
|
[t.target.id]: t.target.value,
|
|
1673
|
-
...
|
|
1674
|
-
...
|
|
1672
|
+
...be(t.source),
|
|
1673
|
+
...ke(t.target)
|
|
1675
1674
|
};
|
|
1676
|
-
const n =
|
|
1675
|
+
const n = Br(r, e);
|
|
1677
1676
|
return { nodes: r, links: n };
|
|
1678
1677
|
}, Pr = (t) => {
|
|
1679
|
-
if (
|
|
1678
|
+
if (dt(t)) {
|
|
1680
1679
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1681
1680
|
return {
|
|
1682
1681
|
nodes: e.reduce(
|
|
@@ -1698,11 +1697,11 @@ function Gr(t, e, r) {
|
|
|
1698
1697
|
const n = x(null), a = d(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1699
1698
|
n.value,
|
|
1700
1699
|
r.value
|
|
1701
|
-
) : e.value.highlightedElements === "closest" ? Pr(n.value, r.value) :
|
|
1700
|
+
) : e.value.highlightedElements === "closest" ? Pr(n.value, r.value) : Sr(n.value, r.value) : { nodes: {}, links: [] });
|
|
1702
1701
|
return C(a, (o, l) => {
|
|
1703
1702
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1704
1703
|
t.value.forEach((i) => {
|
|
1705
|
-
i.node.id in l.nodes &&
|
|
1704
|
+
i.node.id in l.nodes && Me(
|
|
1706
1705
|
i,
|
|
1707
1706
|
l.nodes[i.node.id],
|
|
1708
1707
|
i.node.value,
|
|
@@ -1713,7 +1712,7 @@ function Gr(t, e, r) {
|
|
|
1713
1712
|
return;
|
|
1714
1713
|
}
|
|
1715
1714
|
t.value.forEach((i) => {
|
|
1716
|
-
i.node.id in o.nodes &&
|
|
1715
|
+
i.node.id in o.nodes && Me(
|
|
1717
1716
|
i,
|
|
1718
1717
|
i.node.value,
|
|
1719
1718
|
o.nodes[i.node.id],
|
|
@@ -1725,7 +1724,7 @@ function Gr(t, e, r) {
|
|
|
1725
1724
|
const jr = /* @__PURE__ */ D({
|
|
1726
1725
|
__name: "lume-alluvial-group",
|
|
1727
1726
|
props: {
|
|
1728
|
-
...
|
|
1727
|
+
...ce(),
|
|
1729
1728
|
hoveredElementId: {
|
|
1730
1729
|
type: [Number, String],
|
|
1731
1730
|
default: null
|
|
@@ -1733,60 +1732,60 @@ const jr = /* @__PURE__ */ D({
|
|
|
1733
1732
|
},
|
|
1734
1733
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1735
1734
|
setup(t, { emit: e }) {
|
|
1736
|
-
const r = t, { data: n, options: a } = N(r), o = x([]), l = x([]), i = x(null), { extents: u, updateExtents: s } = Tr(r.containerSize), { graph: c } = Rr(n, a, u), { hoveredElement:
|
|
1735
|
+
const r = t, { data: n, options: a } = N(r), o = x([]), l = x([]), i = x(null), { extents: u, updateExtents: s } = Tr(r.containerSize), { graph: c } = Rr(n, a, u), { hoveredElement: _, highlightedElements: p } = Gr(
|
|
1737
1736
|
o,
|
|
1738
1737
|
a,
|
|
1739
1738
|
c
|
|
1740
|
-
), h = d(() => le(a.value.valueFormat)),
|
|
1739
|
+
), h = d(() => le(a.value.valueFormat)), v = d(
|
|
1741
1740
|
() => Object.keys(p.value.nodes)
|
|
1742
1741
|
), m = d(
|
|
1743
|
-
() => o.value.reduce((
|
|
1744
|
-
const
|
|
1745
|
-
return
|
|
1746
|
-
}, []).sort((
|
|
1742
|
+
() => o.value.reduce((k, w) => {
|
|
1743
|
+
const B = w.x + a.value.nodeWidth / 2;
|
|
1744
|
+
return k.includes(B) ? k : [...k, B];
|
|
1745
|
+
}, []).sort((k, w) => k - w)
|
|
1747
1746
|
// Make sure positions are sorted in ascending order
|
|
1748
|
-
),
|
|
1747
|
+
), b = d(() => {
|
|
1749
1748
|
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
1750
|
-
return a.value.nodeHeaders.slice(0, m.value.length).map((
|
|
1751
|
-
label:
|
|
1749
|
+
return a.value.nodeHeaders.slice(0, m.value.length).map((k, w) => ({
|
|
1750
|
+
label: k,
|
|
1752
1751
|
x: m.value[w]
|
|
1753
1752
|
}));
|
|
1754
1753
|
}), f = d(
|
|
1755
1754
|
() => a.value.nodeHeaderPadding ?? $r
|
|
1756
1755
|
);
|
|
1757
|
-
function T(
|
|
1758
|
-
return
|
|
1756
|
+
function T(k) {
|
|
1757
|
+
return v.value.length > 0 && !v.value.includes(k.toString());
|
|
1759
1758
|
}
|
|
1760
|
-
function
|
|
1761
|
-
return p.value.links.length > 0 && !p.value.links.includes(
|
|
1759
|
+
function L(k) {
|
|
1760
|
+
return p.value.links.length > 0 && !p.value.links.includes(k);
|
|
1762
1761
|
}
|
|
1763
|
-
function k
|
|
1764
|
-
|
|
1762
|
+
function A(k, w) {
|
|
1763
|
+
k !== _.value && (_.value = k, e("link-mouseenter", { link: k, event: w }));
|
|
1765
1764
|
}
|
|
1766
|
-
function g(
|
|
1767
|
-
const w =
|
|
1768
|
-
|
|
1765
|
+
function g(k) {
|
|
1766
|
+
const w = _.value;
|
|
1767
|
+
_.value = null, e("link-mouseleave", { link: w, event: k });
|
|
1769
1768
|
}
|
|
1770
|
-
function $(
|
|
1771
|
-
if (
|
|
1772
|
-
|
|
1769
|
+
function $(k) {
|
|
1770
|
+
if (k == null) {
|
|
1771
|
+
_.value = null;
|
|
1773
1772
|
return;
|
|
1774
1773
|
}
|
|
1775
|
-
const w = Ir(
|
|
1774
|
+
const w = Ir(k, c.value) || Er(k, c.value);
|
|
1776
1775
|
if (!w) {
|
|
1777
1776
|
Z(V.InvalidHoveredElement);
|
|
1778
1777
|
return;
|
|
1779
1778
|
}
|
|
1780
|
-
|
|
1779
|
+
_.value = w;
|
|
1781
1780
|
}
|
|
1782
|
-
return C(c, (
|
|
1783
|
-
o.value = Cr(
|
|
1781
|
+
return C(c, (k) => {
|
|
1782
|
+
o.value = Cr(k.nodes), l.value = Hr(k.links).reverse(), _.value == null && r.hoveredElementId != null && $(r.hoveredElementId);
|
|
1784
1783
|
}), C([r.containerSize, i], () => {
|
|
1785
1784
|
if (r.containerSize.width && r.containerSize.height) {
|
|
1786
|
-
const
|
|
1787
|
-
s(
|
|
1785
|
+
const k = Dr(c.value, i.value);
|
|
1786
|
+
s(k);
|
|
1788
1787
|
}
|
|
1789
|
-
}), C(() => r.hoveredElementId, $), { __sfc: !0, props: r, emit: e, data: n, options: a, nodeBlocks: o, linkPaths: l, nodeTextRefs: i, extents: u, updateExtents: s, graph: c, hoveredElement:
|
|
1788
|
+
}), C(() => r.hoveredElementId, $), { __sfc: !0, props: r, emit: e, data: n, options: a, nodeBlocks: o, linkPaths: l, nodeTextRefs: i, extents: u, updateExtents: s, graph: c, hoveredElement: _, highlightedElements: p, formatValue: h, hoveredNodeIds: v, nodeColumnPositions: m, nodeHeaders: b, computedNodeHeaderPadding: f, isNodeFaded: T, isLinkFaded: L, handleLinkMouseover: A, handleLinkMouseleave: g, handleExternalHover: $, DEFAULT_COLOR: se, GHOST_STROKE_WIDTH_OFFSET: xr };
|
|
1790
1789
|
}
|
|
1791
1790
|
});
|
|
1792
1791
|
var Fr = function() {
|
|
@@ -1858,12 +1857,12 @@ const zr = Mr.exports, Wr = {
|
|
|
1858
1857
|
highlightedElements: "full",
|
|
1859
1858
|
nodePadding: 16,
|
|
1860
1859
|
nodeWidth: 16,
|
|
1861
|
-
nodeAlign:
|
|
1860
|
+
nodeAlign: Dt,
|
|
1862
1861
|
valueFormat: (t) => String(t)
|
|
1863
1862
|
}, Zr = /* @__PURE__ */ D({
|
|
1864
1863
|
__name: "lume-alluvial-diagram",
|
|
1865
1864
|
props: {
|
|
1866
|
-
...ur(
|
|
1865
|
+
...ur(Oe)
|
|
1867
1866
|
},
|
|
1868
1867
|
setup(t) {
|
|
1869
1868
|
const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wr);
|
|
@@ -1897,7 +1896,7 @@ var Xr = function() {
|
|
|
1897
1896
|
null
|
|
1898
1897
|
);
|
|
1899
1898
|
const lo = Yr.exports;
|
|
1900
|
-
var
|
|
1899
|
+
var Ae = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ae || {});
|
|
1901
1900
|
const Kr = /* @__PURE__ */ D({
|
|
1902
1901
|
__name: "lume-bar-chart",
|
|
1903
1902
|
props: {
|
|
@@ -1905,15 +1904,15 @@ const Kr = /* @__PURE__ */ D({
|
|
|
1905
1904
|
type: {
|
|
1906
1905
|
type: String,
|
|
1907
1906
|
default: null,
|
|
1908
|
-
validator: (t) => t in
|
|
1907
|
+
validator: (t) => t in Ae || t == null
|
|
1909
1908
|
}
|
|
1910
1909
|
},
|
|
1911
1910
|
setup(t) {
|
|
1912
|
-
const e = t, r =
|
|
1911
|
+
const e = t, r = pe(
|
|
1913
1912
|
() => import("./common/42f5d2fc.js")
|
|
1914
|
-
), n =
|
|
1913
|
+
), n = pe(
|
|
1915
1914
|
() => import("./common/abc9d23d.js")
|
|
1916
|
-
), a =
|
|
1915
|
+
), a = pe(
|
|
1917
1916
|
() => import("./common/0664fd4d.js")
|
|
1918
1917
|
), o = /* @__PURE__ */ new Map([
|
|
1919
1918
|
["single", r],
|
|
@@ -1927,20 +1926,20 @@ const Kr = /* @__PURE__ */ D({
|
|
|
1927
1926
|
// Bar chart always starts on zero,
|
|
1928
1927
|
tooltipOptions: {
|
|
1929
1928
|
...(s == null ? void 0 : s.tooltipOptions) || {},
|
|
1930
|
-
position: e.orientation ===
|
|
1929
|
+
position: e.orientation === O.HORIZONTAL && "right"
|
|
1931
1930
|
}
|
|
1932
1931
|
};
|
|
1933
1932
|
}
|
|
1934
1933
|
const u = d(() => {
|
|
1935
1934
|
if (e.data) {
|
|
1936
|
-
if (
|
|
1935
|
+
if (Oe(e.data))
|
|
1937
1936
|
return o.get("single");
|
|
1938
1937
|
if (!e.type)
|
|
1939
1938
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
1940
1939
|
return o.get(e.type);
|
|
1941
1940
|
}
|
|
1942
1941
|
});
|
|
1943
|
-
return { __sfc: !0, TYPES:
|
|
1942
|
+
return { __sfc: !0, TYPES: Ae, LumeSingleBarChart: r, LumeGroupedBarChart: n, LumeStackedBarChart: a, COMPONENT_MAP: o, props: e, slots: l, getBarChartOptions: i, component: u };
|
|
1944
1943
|
}
|
|
1945
1944
|
});
|
|
1946
1945
|
var Jr = function() {
|
|
@@ -1962,10 +1961,10 @@ var Jr = function() {
|
|
|
1962
1961
|
);
|
|
1963
1962
|
const uo = qr.exports;
|
|
1964
1963
|
function ea(t) {
|
|
1965
|
-
return Object.values(
|
|
1964
|
+
return Object.values(Yt).includes(t) || t == null;
|
|
1966
1965
|
}
|
|
1967
1966
|
function ta(t) {
|
|
1968
|
-
return Object.values(
|
|
1967
|
+
return Object.values(O).includes(t);
|
|
1969
1968
|
}
|
|
1970
1969
|
const na = (t = !1) => ({
|
|
1971
1970
|
type: {
|
|
@@ -1976,12 +1975,12 @@ const na = (t = !1) => ({
|
|
|
1976
1975
|
...t ? {
|
|
1977
1976
|
orientation: {
|
|
1978
1977
|
type: String,
|
|
1979
|
-
default:
|
|
1978
|
+
default: O.VERTICAL,
|
|
1980
1979
|
validator: ta
|
|
1981
1980
|
}
|
|
1982
1981
|
} : {}
|
|
1983
1982
|
});
|
|
1984
|
-
function
|
|
1983
|
+
function vt(t) {
|
|
1985
1984
|
const e = d(() => t.value.map((n) => ({
|
|
1986
1985
|
...n,
|
|
1987
1986
|
values: n.values.map((a) => ({
|
|
@@ -1999,90 +1998,76 @@ function dt(t) {
|
|
|
1999
1998
|
function ra(t, e) {
|
|
2000
1999
|
return t.value.length === 1 ? "single" : e.value;
|
|
2001
2000
|
}
|
|
2002
|
-
function aa(t, e, r
|
|
2003
|
-
const
|
|
2004
|
-
() =>
|
|
2001
|
+
function aa(t, e, r) {
|
|
2002
|
+
const n = d(
|
|
2003
|
+
() => r.value === O.HORIZONTAL
|
|
2005
2004
|
);
|
|
2006
|
-
function
|
|
2007
|
-
Math.min(...
|
|
2005
|
+
function a(i) {
|
|
2006
|
+
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2008
2007
|
}
|
|
2009
|
-
const l = d(() =>
|
|
2010
|
-
|
|
2011
|
-
return a.value ? (() => (o(t.value), t.value))() : ue(
|
|
2012
|
-
t.value,
|
|
2013
|
-
n.value,
|
|
2014
|
-
{ padding: u, paddingInner: s, paddingOuter: c }
|
|
2015
|
-
);
|
|
2016
|
-
}), i = d(() => {
|
|
2017
|
-
const { padding: u, paddingInner: s, paddingOuter: c } = r.value;
|
|
2018
|
-
return a.value ? ue(
|
|
2019
|
-
e.value,
|
|
2020
|
-
n.value,
|
|
2021
|
-
{ padding: u, paddingInner: s, paddingOuter: c }
|
|
2022
|
-
) : (() => (o(e.value), e.value))();
|
|
2023
|
-
});
|
|
2024
|
-
return { barXScale: l, barYScale: i };
|
|
2008
|
+
const o = d(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = d(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2009
|
+
return { barXScale: o, barYScale: l };
|
|
2025
2010
|
}
|
|
2026
2011
|
function oa(t, e, r, n, a, o) {
|
|
2027
2012
|
const l = d(
|
|
2028
|
-
() => n.value ===
|
|
2013
|
+
() => n.value === O.HORIZONTAL
|
|
2029
2014
|
);
|
|
2030
|
-
function i(
|
|
2031
|
-
let h,
|
|
2032
|
-
return l.value ? (h =
|
|
2015
|
+
function i(_, p) {
|
|
2016
|
+
let h, v;
|
|
2017
|
+
return l.value ? (h = _ >= 0 ? e.value(0) : e.value(_), v = r.value(r.value.domain()[p])) : (h = e.value(e.value.domain()[p]), v = _ < 0 ? r.value(0) : r.value(_)), { x: h, y: v };
|
|
2033
2018
|
}
|
|
2034
|
-
function u(
|
|
2035
|
-
return l.value ?
|
|
2019
|
+
function u(_) {
|
|
2020
|
+
return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) : e.value.bandwidth();
|
|
2036
2021
|
}
|
|
2037
|
-
function s(
|
|
2038
|
-
return l.value ? r.value.bandwidth() :
|
|
2022
|
+
function s(_) {
|
|
2023
|
+
return l.value ? r.value.bandwidth() : _ < 0 ? r.value(_) - r.value(0) : r.value(0) - r.value(_);
|
|
2039
2024
|
}
|
|
2040
|
-
function c(
|
|
2041
|
-
const { value:
|
|
2025
|
+
function c(_, p, h) {
|
|
2026
|
+
const { value: v, color: m } = _, b = m ?? t.value[p].color ?? se, { x: f, y: T } = i(v, h), L = u(v), A = s(v);
|
|
2042
2027
|
return {
|
|
2043
|
-
classList: [`lume-fill--${
|
|
2028
|
+
classList: [`lume-fill--${b}`, ...o],
|
|
2044
2029
|
x: f,
|
|
2045
2030
|
y: T,
|
|
2046
|
-
width:
|
|
2047
|
-
height:
|
|
2031
|
+
width: L,
|
|
2032
|
+
height: A,
|
|
2048
2033
|
isFaded: a.value !== -1 && a.value !== h,
|
|
2049
|
-
isNegative:
|
|
2034
|
+
isNegative: v < 0
|
|
2050
2035
|
};
|
|
2051
2036
|
}
|
|
2052
2037
|
return { barAttributeGenerator: c };
|
|
2053
2038
|
}
|
|
2054
2039
|
function la(t, e, r, n, a, o) {
|
|
2055
2040
|
const l = d(
|
|
2056
|
-
() => n.value ===
|
|
2057
|
-
), i = d(() => te().domain(t.value.map((
|
|
2058
|
-
function s(
|
|
2041
|
+
() => n.value === O.HORIZONTAL
|
|
2042
|
+
), i = d(() => te().domain(t.value.map((v, m) => m)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => te().domain(t.value.map((v, m) => m)).range([0, r.value.bandwidth()]).padding(0));
|
|
2043
|
+
function s(v, m, b) {
|
|
2059
2044
|
if (l.value)
|
|
2060
|
-
return
|
|
2045
|
+
return v >= 0 ? e.value(0) : e.value(v);
|
|
2061
2046
|
const f = e.value.domain();
|
|
2062
|
-
return e.value(f[m]) + i.value(
|
|
2047
|
+
return e.value(f[m]) + i.value(b);
|
|
2063
2048
|
}
|
|
2064
|
-
function c(
|
|
2049
|
+
function c(v, m, b) {
|
|
2065
2050
|
if (l.value) {
|
|
2066
2051
|
const f = r.value.domain();
|
|
2067
|
-
return r.value(f[m]) + u.value(
|
|
2052
|
+
return r.value(f[m]) + u.value(b);
|
|
2068
2053
|
}
|
|
2069
|
-
return
|
|
2054
|
+
return v < 0 ? r.value(0) : r.value(v);
|
|
2070
2055
|
}
|
|
2071
|
-
function v
|
|
2072
|
-
return l.value ?
|
|
2056
|
+
function _(v) {
|
|
2057
|
+
return l.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : i.value.bandwidth();
|
|
2073
2058
|
}
|
|
2074
|
-
function p(
|
|
2075
|
-
return l.value ? u.value.bandwidth() :
|
|
2059
|
+
function p(v) {
|
|
2060
|
+
return l.value ? u.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
|
|
2076
2061
|
}
|
|
2077
|
-
function h(
|
|
2078
|
-
const { value: f, color: T } =
|
|
2062
|
+
function h(v, m, b) {
|
|
2063
|
+
const { value: f, color: T } = v, L = T ?? t.value[m].color ?? Object.values(P)[m], A = s(f, b, m), g = c(f, b, m), $ = _(f), k = p(f);
|
|
2079
2064
|
return {
|
|
2080
|
-
classList: [`lume-fill--${
|
|
2081
|
-
x:
|
|
2065
|
+
classList: [`lume-fill--${L}`, ...o],
|
|
2066
|
+
x: A,
|
|
2082
2067
|
y: g,
|
|
2083
2068
|
width: $,
|
|
2084
|
-
height:
|
|
2085
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2069
|
+
height: k,
|
|
2070
|
+
isFaded: a.value !== -1 && a.value !== b,
|
|
2086
2071
|
isNegative: f < 0
|
|
2087
2072
|
};
|
|
2088
2073
|
}
|
|
@@ -2090,7 +2075,7 @@ function la(t, e, r, n, a, o) {
|
|
|
2090
2075
|
}
|
|
2091
2076
|
function ua(t, e) {
|
|
2092
2077
|
const r = d(
|
|
2093
|
-
() => e.value ===
|
|
2078
|
+
() => e.value === O.HORIZONTAL
|
|
2094
2079
|
), n = d(() => {
|
|
2095
2080
|
const i = t.value.map(
|
|
2096
2081
|
(u) => u.filter((s) => s.value < 0).reduce((s, c) => s + c.value, 0)
|
|
@@ -2107,16 +2092,16 @@ function ua(t, e) {
|
|
|
2107
2092
|
});
|
|
2108
2093
|
function o(i, u, s) {
|
|
2109
2094
|
return r.value ? ne().domain([n.value, a.value]).range([0, s.width]) : Object.assign(
|
|
2110
|
-
|
|
2111
|
-
te().domain(u.map((c,
|
|
2095
|
+
Ge(
|
|
2096
|
+
te().domain(u.map((c, _) => _)).range([0, s.width])
|
|
2112
2097
|
),
|
|
2113
2098
|
{ labels: u }
|
|
2114
2099
|
);
|
|
2115
2100
|
}
|
|
2116
2101
|
function l(i, u, s) {
|
|
2117
2102
|
return r.value ? Object.assign(
|
|
2118
|
-
|
|
2119
|
-
te().domain(u.map((c,
|
|
2103
|
+
Ge(
|
|
2104
|
+
te().domain(u.map((c, _) => _)).range([0, s.height])
|
|
2120
2105
|
),
|
|
2121
2106
|
{ labels: u }
|
|
2122
2107
|
) : ne().domain([a.value, n.value]).range([0, s.height]);
|
|
@@ -2125,20 +2110,20 @@ function ua(t, e) {
|
|
|
2125
2110
|
}
|
|
2126
2111
|
function ia(t, e, r, n, a, o) {
|
|
2127
2112
|
const l = d(
|
|
2128
|
-
() => n.value ===
|
|
2113
|
+
() => n.value === O.HORIZONTAL
|
|
2129
2114
|
), i = d(
|
|
2130
2115
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2131
2116
|
), u = d(
|
|
2132
2117
|
() => t.value.map((f) => f.values.map((T) => T == null ? void 0 : T.value))
|
|
2133
2118
|
);
|
|
2134
|
-
function s(f, T,
|
|
2135
|
-
let
|
|
2136
|
-
return l.value ? (
|
|
2119
|
+
function s(f, T, L) {
|
|
2120
|
+
let A, g;
|
|
2121
|
+
return l.value ? (A = e.value(f >= 0 ? 0 + L : f + L), g = r.value(i.value[T])) : (A = e.value(i.value[T]), g = r.value(f >= 0 ? f + L : 0 + L)), { x: A, y: g };
|
|
2137
2122
|
}
|
|
2138
2123
|
function c(f) {
|
|
2139
2124
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2140
2125
|
}
|
|
2141
|
-
function
|
|
2126
|
+
function _(f) {
|
|
2142
2127
|
return l.value ? e.value(0) - e.value(f) : e.value.bandwidth();
|
|
2143
2128
|
}
|
|
2144
2129
|
function p(f) {
|
|
@@ -2147,34 +2132,34 @@ function ia(t, e, r, n, a, o) {
|
|
|
2147
2132
|
function h(f) {
|
|
2148
2133
|
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2149
2134
|
}
|
|
2150
|
-
function
|
|
2151
|
-
return f ? u.value.reduce((
|
|
2135
|
+
function v(f, T) {
|
|
2136
|
+
return f ? u.value.reduce((L, A, g) => (g < f && A[T] >= 0 && (L += A[T]), L), 0) : 0;
|
|
2152
2137
|
}
|
|
2153
2138
|
function m(f, T) {
|
|
2154
|
-
return f ? u.value.reduce((
|
|
2139
|
+
return f ? u.value.reduce((L, A, g) => (g < f && A[T] < 0 && (L += A[T]), L), 0) : 0;
|
|
2155
2140
|
}
|
|
2156
|
-
function
|
|
2157
|
-
const { value:
|
|
2141
|
+
function b(f, T, L) {
|
|
2142
|
+
const { value: A, color: g } = f, $ = A >= 0 ? c(A) : _(A), k = A >= 0 ? p(A) : h(A), w = A >= 0 ? v(T, L) : m(T, L), { x: B, y: F } = s(A, L, w);
|
|
2158
2143
|
return {
|
|
2159
2144
|
classList: [`lume-fill--${g ?? t.value[T].color ?? Object.values(P)[T]}`, ...o],
|
|
2160
2145
|
width: $,
|
|
2161
|
-
height:
|
|
2162
|
-
x:
|
|
2146
|
+
height: k,
|
|
2147
|
+
x: B,
|
|
2163
2148
|
y: F,
|
|
2164
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2165
|
-
isNegative:
|
|
2149
|
+
isFaded: a.value !== -1 && a.value !== L,
|
|
2150
|
+
isNegative: A < 0
|
|
2166
2151
|
};
|
|
2167
2152
|
}
|
|
2168
|
-
return { barAttributeGenerator:
|
|
2153
|
+
return { barAttributeGenerator: b };
|
|
2169
2154
|
}
|
|
2170
|
-
const
|
|
2155
|
+
const ze = {
|
|
2171
2156
|
single: oa,
|
|
2172
2157
|
grouped: la,
|
|
2173
2158
|
stacked: ia
|
|
2174
2159
|
}, sa = /* @__PURE__ */ D({
|
|
2175
2160
|
__name: "lume-bar-group",
|
|
2176
2161
|
props: {
|
|
2177
|
-
...
|
|
2162
|
+
...ce(),
|
|
2178
2163
|
classList: {
|
|
2179
2164
|
type: [String, Array],
|
|
2180
2165
|
default: () => []
|
|
@@ -2190,33 +2175,27 @@ const We = {
|
|
|
2190
2175
|
const r = t, {
|
|
2191
2176
|
data: n,
|
|
2192
2177
|
hoveredIndex: a,
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
s,
|
|
2202
|
-
c,
|
|
2203
|
-
o,
|
|
2204
|
-
l
|
|
2205
|
-
), m = d(() => typeof v.value == "string" ? [v.value] : v.value), A = d(() => {
|
|
2206
|
-
const T = ra(n, u), { barAttributeGenerator: O } = We[T](
|
|
2178
|
+
orientation: o,
|
|
2179
|
+
transition: l,
|
|
2180
|
+
type: i,
|
|
2181
|
+
xScale: u,
|
|
2182
|
+
yScale: s,
|
|
2183
|
+
classList: c
|
|
2184
|
+
} = N(r), { groupedData: _ } = vt(n), { barXScale: p, barYScale: h } = aa(u, s, o), v = d(() => typeof c.value == "string" ? [c.value] : c.value), m = d(() => {
|
|
2185
|
+
const f = ra(n, i), { barAttributeGenerator: T } = ze[f](
|
|
2207
2186
|
n,
|
|
2187
|
+
p,
|
|
2208
2188
|
h,
|
|
2209
|
-
|
|
2210
|
-
l,
|
|
2189
|
+
o,
|
|
2211
2190
|
a,
|
|
2212
|
-
|
|
2191
|
+
v.value
|
|
2213
2192
|
);
|
|
2214
|
-
return
|
|
2215
|
-
}),
|
|
2216
|
-
if (
|
|
2217
|
-
return
|
|
2193
|
+
return T;
|
|
2194
|
+
}), b = d(() => {
|
|
2195
|
+
if (l.value)
|
|
2196
|
+
return o.value === O.HORIZONTAL ? "width" : "height";
|
|
2218
2197
|
});
|
|
2219
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2198
|
+
return { __sfc: !0, MIXIN_MAP: ze, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: s, classList: c, groupedData: _, barXScale: p, barYScale: h, computedClasses: v, getBarAttributes: m, computedTransition: b, LumeBar: $e };
|
|
2220
2199
|
}
|
|
2221
2200
|
});
|
|
2222
2201
|
var ca = function() {
|
|
@@ -2244,14 +2223,14 @@ var ca = function() {
|
|
|
2244
2223
|
null,
|
|
2245
2224
|
null
|
|
2246
2225
|
);
|
|
2247
|
-
const
|
|
2248
|
-
[
|
|
2226
|
+
const Ee = va.exports, _a = {
|
|
2227
|
+
[O.VERTICAL]: {
|
|
2249
2228
|
withTooltip: !0,
|
|
2250
2229
|
xAxisOptions: {},
|
|
2251
2230
|
yAxisOptions: { gridLines: !0 },
|
|
2252
2231
|
margins: X.VERTICAL
|
|
2253
2232
|
},
|
|
2254
|
-
[
|
|
2233
|
+
[O.HORIZONTAL]: {
|
|
2255
2234
|
withTooltip: !0,
|
|
2256
2235
|
xAxisOptions: { gridLines: !0 },
|
|
2257
2236
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2260,14 +2239,14 @@ const Ce = va.exports, _a = {
|
|
|
2260
2239
|
}, pa = /* @__PURE__ */ D({
|
|
2261
2240
|
__name: "lume-single-bar-chart",
|
|
2262
2241
|
props: {
|
|
2263
|
-
...q(
|
|
2242
|
+
...q(Oe)
|
|
2264
2243
|
},
|
|
2265
2244
|
setup(t) {
|
|
2266
2245
|
const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
|
|
2267
|
-
() => _a[n.value ||
|
|
2246
|
+
() => _a[n.value || O.VERTICAL]
|
|
2268
2247
|
// needs to be computed so that default options are reactive
|
|
2269
2248
|
), { allOptions: l } = j(a, o);
|
|
2270
|
-
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup:
|
|
2249
|
+
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ee };
|
|
2271
2250
|
}
|
|
2272
2251
|
});
|
|
2273
2252
|
var fa = function() {
|
|
@@ -2290,13 +2269,13 @@ var fa = function() {
|
|
|
2290
2269
|
null
|
|
2291
2270
|
);
|
|
2292
2271
|
const io = ha.exports, ga = {
|
|
2293
|
-
[
|
|
2272
|
+
[O.VERTICAL]: {
|
|
2294
2273
|
withTooltip: !0,
|
|
2295
2274
|
xAxisOptions: {},
|
|
2296
2275
|
yAxisOptions: { gridLines: !0 },
|
|
2297
2276
|
margins: X.VERTICAL
|
|
2298
2277
|
},
|
|
2299
|
-
[
|
|
2278
|
+
[O.HORIZONTAL]: {
|
|
2300
2279
|
withTooltip: !0,
|
|
2301
2280
|
xAxisOptions: { gridLines: !0 },
|
|
2302
2281
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2310,10 +2289,13 @@ const io = ha.exports, ga = {
|
|
|
2310
2289
|
},
|
|
2311
2290
|
setup(t) {
|
|
2312
2291
|
const e = t, r = Y(G()), { orientation: n, options: a } = N(e), o = d(
|
|
2313
|
-
() => ga[n.value ||
|
|
2292
|
+
() => ga[n.value || O.VERTICAL]
|
|
2314
2293
|
// needs to be computed so that default options are reactive
|
|
2315
|
-
), { allOptions: l } = j(
|
|
2316
|
-
|
|
2294
|
+
), { allOptions: l } = j(
|
|
2295
|
+
a,
|
|
2296
|
+
o
|
|
2297
|
+
);
|
|
2298
|
+
return { __sfc: !0, props: e, slots: r, orientation: n, options: a, baseOptions: o, allOptions: l, LumeChart: ee, LumeBarGroup: Ee };
|
|
2317
2299
|
}
|
|
2318
2300
|
});
|
|
2319
2301
|
var ba = function() {
|
|
@@ -2336,13 +2318,13 @@ var ba = function() {
|
|
|
2336
2318
|
null
|
|
2337
2319
|
);
|
|
2338
2320
|
const so = Aa.exports, Ta = {
|
|
2339
|
-
[
|
|
2321
|
+
[O.VERTICAL]: {
|
|
2340
2322
|
withTooltip: !0,
|
|
2341
2323
|
xAxisOptions: {},
|
|
2342
2324
|
yAxisOptions: { gridLines: !0 },
|
|
2343
2325
|
margins: X.VERTICAL
|
|
2344
2326
|
},
|
|
2345
|
-
[
|
|
2327
|
+
[O.HORIZONTAL]: {
|
|
2346
2328
|
withTooltip: !0,
|
|
2347
2329
|
xAxisOptions: { gridLines: !0 },
|
|
2348
2330
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2356,13 +2338,16 @@ const so = Aa.exports, Ta = {
|
|
|
2356
2338
|
},
|
|
2357
2339
|
setup(t) {
|
|
2358
2340
|
const e = t, r = Y(G()), { data: n, orientation: a, options: o } = N(e), l = d(
|
|
2359
|
-
() => Ta[a.value ||
|
|
2341
|
+
() => Ta[a.value || O.VERTICAL]
|
|
2360
2342
|
// needs to be computed so that default options are reactive
|
|
2361
|
-
), { allOptions: i } = j(
|
|
2343
|
+
), { allOptions: i } = j(
|
|
2344
|
+
o,
|
|
2345
|
+
l
|
|
2346
|
+
), { internalData: u } = Ie(n), { groupedData: s } = vt(u), { stackedXScaleGenerator: c, stackedYScaleGenerator: _ } = ua(
|
|
2362
2347
|
s,
|
|
2363
2348
|
a
|
|
2364
2349
|
);
|
|
2365
|
-
return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator:
|
|
2350
|
+
return { __sfc: !0, props: e, slots: r, data: n, orientation: a, options: o, baseOptions: l, allOptions: i, internalData: u, groupedData: s, stackedXScaleGenerator: c, stackedYScaleGenerator: _, LumeChart: ee, LumeBarGroup: Ee };
|
|
2366
2351
|
}
|
|
2367
2352
|
});
|
|
2368
2353
|
var La = function() {
|
|
@@ -2384,7 +2369,7 @@ var La = function() {
|
|
|
2384
2369
|
null,
|
|
2385
2370
|
null
|
|
2386
2371
|
);
|
|
2387
|
-
const co = $a.exports,
|
|
2372
|
+
const co = $a.exports, We = 2, wa = /* @__PURE__ */ D({
|
|
2388
2373
|
__name: "lume-line",
|
|
2389
2374
|
props: {
|
|
2390
2375
|
pathDefinition: {
|
|
@@ -2393,7 +2378,7 @@ const co = $a.exports, Ze = 2, wa = /* @__PURE__ */ D({
|
|
|
2393
2378
|
},
|
|
2394
2379
|
width: {
|
|
2395
2380
|
type: Number,
|
|
2396
|
-
default:
|
|
2381
|
+
default: We
|
|
2397
2382
|
},
|
|
2398
2383
|
color: {
|
|
2399
2384
|
type: String,
|
|
@@ -2419,7 +2404,7 @@ const co = $a.exports, Ze = 2, wa = /* @__PURE__ */ D({
|
|
|
2419
2404
|
emits: ["click"],
|
|
2420
2405
|
setup(t, { emit: e }) {
|
|
2421
2406
|
const r = x(null);
|
|
2422
|
-
return M(() =>
|
|
2407
|
+
return M(() => ie(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: We, emit: e, root: r };
|
|
2423
2408
|
}
|
|
2424
2409
|
});
|
|
2425
2410
|
var Ia = function() {
|
|
@@ -2444,7 +2429,7 @@ var Ia = function() {
|
|
|
2444
2429
|
null,
|
|
2445
2430
|
null
|
|
2446
2431
|
);
|
|
2447
|
-
const Ca = Da.exports,
|
|
2432
|
+
const Ca = Da.exports, Ze = 4, Ha = /* @__PURE__ */ D({
|
|
2448
2433
|
__name: "lume-point",
|
|
2449
2434
|
props: {
|
|
2450
2435
|
x: { type: Number, required: !0 },
|
|
@@ -2455,7 +2440,7 @@ const Ca = Da.exports, Xe = 4, Ha = /* @__PURE__ */ D({
|
|
|
2455
2440
|
},
|
|
2456
2441
|
radius: {
|
|
2457
2442
|
type: Number,
|
|
2458
|
-
default:
|
|
2443
|
+
default: Ze
|
|
2459
2444
|
},
|
|
2460
2445
|
active: {
|
|
2461
2446
|
type: Boolean,
|
|
@@ -2465,7 +2450,7 @@ const Ca = Da.exports, Xe = 4, Ha = /* @__PURE__ */ D({
|
|
|
2465
2450
|
emits: ["click"],
|
|
2466
2451
|
setup(t, { emit: e }) {
|
|
2467
2452
|
const r = t, n = x(null), a = d(() => r.radius / 2);
|
|
2468
|
-
return M(() =>
|
|
2453
|
+
return M(() => ie(n.value)), { __sfc: !0, DEFAULT_RADIUS: Ze, props: r, emit: e, root: n, strokeWidth: a };
|
|
2469
2454
|
}
|
|
2470
2455
|
});
|
|
2471
2456
|
var Na = function() {
|
|
@@ -2473,7 +2458,7 @@ var Na = function() {
|
|
|
2473
2458
|
return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2474
2459
|
return n.emit("click", a);
|
|
2475
2460
|
} } });
|
|
2476
|
-
}, Ra = [],
|
|
2461
|
+
}, Ra = [], Ba = /* @__PURE__ */ I(
|
|
2477
2462
|
Ha,
|
|
2478
2463
|
Na,
|
|
2479
2464
|
Ra,
|
|
@@ -2483,15 +2468,15 @@ var Na = function() {
|
|
|
2483
2468
|
null,
|
|
2484
2469
|
null
|
|
2485
2470
|
);
|
|
2486
|
-
const
|
|
2487
|
-
function
|
|
2471
|
+
const Sa = Ba.exports;
|
|
2472
|
+
function _t(t) {
|
|
2488
2473
|
function e(o) {
|
|
2489
2474
|
let l = null;
|
|
2490
2475
|
return o == null ? void 0 : o.reduce((i, u, s) => (u == null || u.value == null ? (l ? l.push(s) : l = [s], s === (o == null ? void 0 : o.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2491
2476
|
}
|
|
2492
2477
|
function r(o, l, i, u) {
|
|
2493
|
-
const
|
|
2494
|
-
return o > l ? o -
|
|
2478
|
+
const _ = Math.abs(o - l) / (i + 1) * (u + 1);
|
|
2479
|
+
return o > l ? o - _ : o + _;
|
|
2495
2480
|
}
|
|
2496
2481
|
function n(o) {
|
|
2497
2482
|
return function(i) {
|
|
@@ -2506,21 +2491,21 @@ function vt(t) {
|
|
|
2506
2491
|
...o,
|
|
2507
2492
|
isDashed: n(l),
|
|
2508
2493
|
values: o.values.map((i, u) => {
|
|
2509
|
-
var c,
|
|
2494
|
+
var c, _;
|
|
2510
2495
|
const s = l.find(
|
|
2511
2496
|
(p) => p.includes(u)
|
|
2512
2497
|
);
|
|
2513
2498
|
if (s) {
|
|
2514
2499
|
const p = s[0] - 1, h = s[s.length - 1] + 1;
|
|
2515
|
-
let
|
|
2516
|
-
return
|
|
2500
|
+
let v = (c = o.values[p]) == null ? void 0 : c.value, m = (_ = o.values[h]) == null ? void 0 : _.value;
|
|
2501
|
+
return v == null && (v = m), m == null && (m = v), {
|
|
2517
2502
|
value: r(
|
|
2518
|
-
|
|
2503
|
+
v,
|
|
2519
2504
|
m,
|
|
2520
2505
|
s.length,
|
|
2521
2506
|
s.indexOf(u)
|
|
2522
2507
|
),
|
|
2523
|
-
label:
|
|
2508
|
+
label: nt
|
|
2524
2509
|
};
|
|
2525
2510
|
}
|
|
2526
2511
|
return i;
|
|
@@ -2529,21 +2514,21 @@ function vt(t) {
|
|
|
2529
2514
|
})) };
|
|
2530
2515
|
}
|
|
2531
2516
|
function Pa(t, e) {
|
|
2532
|
-
const r =
|
|
2517
|
+
const r = t.bandwidth() / 2;
|
|
2533
2518
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2534
2519
|
}
|
|
2535
2520
|
function Ga(t, e) {
|
|
2536
2521
|
return (r, n) => t(e + (n - 1));
|
|
2537
2522
|
}
|
|
2538
2523
|
function ja(t, e, r, n) {
|
|
2539
|
-
return
|
|
2524
|
+
return xt().x(
|
|
2540
2525
|
U(r) ? Pa(r, t) : Ga(r, t)
|
|
2541
2526
|
).y((o) => n(o))(e);
|
|
2542
2527
|
}
|
|
2543
|
-
const
|
|
2528
|
+
const Xe = 1, Fa = /* @__PURE__ */ D({
|
|
2544
2529
|
__name: "lume-line-group",
|
|
2545
2530
|
props: {
|
|
2546
|
-
...
|
|
2531
|
+
...ce(),
|
|
2547
2532
|
withPoints: {
|
|
2548
2533
|
type: Boolean,
|
|
2549
2534
|
default: !0
|
|
@@ -2555,10 +2540,10 @@ const Ue = 1, Fa = /* @__PURE__ */ D({
|
|
|
2555
2540
|
},
|
|
2556
2541
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2557
2542
|
setup(t, { emit: e }) {
|
|
2558
|
-
const r = t, { data: n, options: a, xScale: o, yScale: l } = N(r), i =
|
|
2543
|
+
const r = t, { data: n, options: a, xScale: o, yScale: l } = N(r), i = Te(
|
|
2559
2544
|
"tooltipAnchorAttributes",
|
|
2560
2545
|
null
|
|
2561
|
-
), { updateTooltipAnchorAttributes: u } =
|
|
2546
|
+
), { updateTooltipAnchorAttributes: u } = st(
|
|
2562
2547
|
i,
|
|
2563
2548
|
a,
|
|
2564
2549
|
o,
|
|
@@ -2566,22 +2551,22 @@ const Ue = 1, Fa = /* @__PURE__ */ D({
|
|
|
2566
2551
|
), s = d(() => {
|
|
2567
2552
|
if (n.value.every(($) => $.isDashed))
|
|
2568
2553
|
return n.value;
|
|
2569
|
-
const { computedLineData: g } =
|
|
2554
|
+
const { computedLineData: g } = _t(n);
|
|
2570
2555
|
return a.value.withTooltip !== !1 && (i != null && i.value) && u(g.value), g.value;
|
|
2571
2556
|
}), c = d(() => {
|
|
2572
2557
|
if (r.hoveredIndex === -1)
|
|
2573
2558
|
return;
|
|
2574
|
-
const g =
|
|
2559
|
+
const g = Ft(
|
|
2575
2560
|
s.value,
|
|
2576
2561
|
r.hoveredIndex
|
|
2577
2562
|
);
|
|
2578
2563
|
return {
|
|
2579
|
-
d: `M ${
|
|
2564
|
+
d: `M ${ye(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2580
2565
|
V ${l.value(g)}`
|
|
2581
2566
|
// Move to X index, Vertical line to the highest point
|
|
2582
2567
|
};
|
|
2583
|
-
}),
|
|
2584
|
-
() => o.value &&
|
|
2568
|
+
}), _ = d(
|
|
2569
|
+
() => o.value && Xe / (Vt(o.value) - 1)
|
|
2585
2570
|
// Subtracting the first line (read below)
|
|
2586
2571
|
), p = d(
|
|
2587
2572
|
() => {
|
|
@@ -2589,43 +2574,45 @@ const Ue = 1, Fa = /* @__PURE__ */ D({
|
|
|
2589
2574
|
return ((g = a.value) == null ? void 0 : g.lineWidth) * 2 || void 0;
|
|
2590
2575
|
}
|
|
2591
2576
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2592
|
-
), h = d(
|
|
2577
|
+
), h = d(
|
|
2578
|
+
() => o.value.bandwidth() / 2
|
|
2579
|
+
), v = d(() => o.value.domain()), m = d(
|
|
2593
2580
|
() => a.value.withPoints ?? r.withPoints
|
|
2594
2581
|
);
|
|
2595
|
-
function
|
|
2582
|
+
function b(g) {
|
|
2596
2583
|
return s.value[g].values;
|
|
2597
2584
|
}
|
|
2598
2585
|
function f(g, $) {
|
|
2599
|
-
var w,
|
|
2600
|
-
const
|
|
2601
|
-
(w =
|
|
2602
|
-
(
|
|
2586
|
+
var w, B;
|
|
2587
|
+
const k = g === 0 ? [] : [
|
|
2588
|
+
(w = b($)[g - 1]) == null ? void 0 : w.value,
|
|
2589
|
+
(B = b($)[g]) == null ? void 0 : B.value
|
|
2603
2590
|
];
|
|
2604
2591
|
return ja(
|
|
2605
2592
|
g,
|
|
2606
|
-
|
|
2593
|
+
k,
|
|
2607
2594
|
o.value,
|
|
2608
2595
|
l.value
|
|
2609
2596
|
) || "";
|
|
2610
2597
|
}
|
|
2611
2598
|
function T(g) {
|
|
2612
2599
|
return {
|
|
2613
|
-
animationDelay: g < 2 ? 0 : (g - 1) *
|
|
2614
|
-
animationDuration:
|
|
2600
|
+
animationDelay: g < 2 ? 0 : (g - 1) * _.value,
|
|
2601
|
+
animationDuration: _.value
|
|
2615
2602
|
};
|
|
2616
2603
|
}
|
|
2617
|
-
function
|
|
2604
|
+
function L(g, $) {
|
|
2618
2605
|
var w;
|
|
2619
|
-
const
|
|
2606
|
+
const k = (w = b($)[g]) == null ? void 0 : w.value;
|
|
2620
2607
|
return {
|
|
2621
|
-
x: U(o.value) ? r.xScale(
|
|
2622
|
-
y: l.value(
|
|
2608
|
+
x: U(o.value) ? r.xScale(v.value[g]) + h.value : r.xScale(g),
|
|
2609
|
+
y: l.value(k)
|
|
2623
2610
|
};
|
|
2624
2611
|
}
|
|
2625
|
-
function
|
|
2612
|
+
function A(g) {
|
|
2626
2613
|
return r.hoveredIndex === g;
|
|
2627
2614
|
}
|
|
2628
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2615
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Xe, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: s, overlayLineAttributes: c, animationDuration: _, pointRadius: p, xAxisOffset: h, domain: v, computedWithPoints: m, getValuesFromDataset: b, getPathDefinition: f, getLineTransitionParams: T, getPointPosition: L, isPointActive: A, LumeLine: Ca, LumePoint: Sa };
|
|
2629
2616
|
}
|
|
2630
2617
|
});
|
|
2631
2618
|
var Va = function() {
|
|
@@ -2647,11 +2634,11 @@ var Va = function() {
|
|
|
2647
2634
|
Ma,
|
|
2648
2635
|
!1,
|
|
2649
2636
|
null,
|
|
2650
|
-
"
|
|
2637
|
+
"c4d7f0ca",
|
|
2651
2638
|
null,
|
|
2652
2639
|
null
|
|
2653
2640
|
);
|
|
2654
|
-
const
|
|
2641
|
+
const pt = za.exports, Wa = {
|
|
2655
2642
|
margins: X.VERTICAL,
|
|
2656
2643
|
startOnZero: !0,
|
|
2657
2644
|
withTooltip: !0,
|
|
@@ -2664,7 +2651,7 @@ const _t = za.exports, Wa = {
|
|
|
2664
2651
|
},
|
|
2665
2652
|
setup(t) {
|
|
2666
2653
|
const e = t, r = Y(G()), { options: n } = N(e), { allOptions: a } = j(n, Wa);
|
|
2667
|
-
return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: ee, LumeLineGroup:
|
|
2654
|
+
return { __sfc: !0, props: e, slots: r, options: n, allOptions: a, LumeChart: ee, LumeLineGroup: pt };
|
|
2668
2655
|
}
|
|
2669
2656
|
});
|
|
2670
2657
|
var Xa = function() {
|
|
@@ -2693,7 +2680,7 @@ function Ka(t) {
|
|
|
2693
2680
|
if (!r || !n)
|
|
2694
2681
|
return;
|
|
2695
2682
|
const a = t.value[0].values;
|
|
2696
|
-
return
|
|
2683
|
+
return $t().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
2697
2684
|
}
|
|
2698
2685
|
) };
|
|
2699
2686
|
}
|
|
@@ -2714,25 +2701,25 @@ const Ja = {
|
|
|
2714
2701
|
}, Qa = /* @__PURE__ */ D({
|
|
2715
2702
|
__name: "lume-sparkline-chart",
|
|
2716
2703
|
props: {
|
|
2717
|
-
...
|
|
2704
|
+
...we(null),
|
|
2718
2705
|
...ae()
|
|
2719
2706
|
},
|
|
2720
2707
|
setup(t, { expose: e }) {
|
|
2721
|
-
const r = t, n = Y(G()), { data: a, options: o } = N(r), { internalData: l } =
|
|
2708
|
+
const r = t, n = Y(G()), { data: a, options: o } = N(r), { internalData: l } = Ie(a), { allOptions: i } = j(o, Ja), { computedLineData: u } = _t(l), { areaPathDefinition: s } = Ka(u), c = d(() => l.value[0].color), _ = d(
|
|
2722
2709
|
() => a.value[0].areaColor || c.value
|
|
2723
2710
|
);
|
|
2724
|
-
function p(
|
|
2711
|
+
function p(v) {
|
|
2725
2712
|
return {
|
|
2726
|
-
...
|
|
2713
|
+
...v,
|
|
2727
2714
|
noMinSize: !0
|
|
2728
2715
|
};
|
|
2729
2716
|
}
|
|
2730
|
-
function h(
|
|
2731
|
-
return ne().range([0,
|
|
2717
|
+
function h(v, m, b) {
|
|
2718
|
+
return ne().range([0, b.width]).domain([0, v[0].values.length - 1]);
|
|
2732
2719
|
}
|
|
2733
2720
|
return e({
|
|
2734
2721
|
areaPathDefinition: s
|
|
2735
|
-
}), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor:
|
|
2722
|
+
}), { __sfc: !0, props: r, slots: n, data: a, options: o, internalData: l, allOptions: i, computedLineData: u, areaPathDefinition: s, computedColor: c, areaColor: _, getSparklineOptions: p, xScaleGenerator: h, LumeChart: ee, LumeLineGroup: pt };
|
|
2736
2723
|
}
|
|
2737
2724
|
});
|
|
2738
2725
|
var qa = function() {
|
|
@@ -2763,21 +2750,24 @@ export {
|
|
|
2763
2750
|
lo as LumeAlluvialDiagram,
|
|
2764
2751
|
zr as LumeAlluvialGroup,
|
|
2765
2752
|
dn as LumeAxis,
|
|
2766
|
-
|
|
2753
|
+
$e as LumeBar,
|
|
2767
2754
|
uo as LumeBarChart,
|
|
2768
|
-
|
|
2755
|
+
Ee as LumeBarGroup,
|
|
2769
2756
|
ee as LumeChart,
|
|
2770
2757
|
Tn as LumeChartContainer,
|
|
2771
2758
|
wn as LumeChartLegend,
|
|
2772
2759
|
so as LumeGroupedBarChart,
|
|
2773
2760
|
Ca as LumeLine,
|
|
2774
2761
|
vo as LumeLineChart,
|
|
2775
|
-
|
|
2762
|
+
pt as LumeLineGroup,
|
|
2776
2763
|
vr as LumeOverlayGroup,
|
|
2777
|
-
|
|
2764
|
+
Sa as LumePoint,
|
|
2778
2765
|
io as LumeSingleBarChart,
|
|
2779
2766
|
_o as LumeSparklineChart,
|
|
2780
2767
|
co as LumeStackedBarChart,
|
|
2781
|
-
Un as LumeTooltip
|
|
2768
|
+
Un as LumeTooltip,
|
|
2769
|
+
Mn as LumeTooltipItem,
|
|
2770
|
+
Pn as LumeTooltipSummary,
|
|
2771
|
+
Hn as LumeTooltipTitle
|
|
2782
2772
|
};
|
|
2783
2773
|
//# sourceMappingURL=index.js.map
|