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