@adyen/lume-vue3 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts +1 -1
- package/dist/@types/components/groups/lume-bar-group/composables/bar-mixin.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-bar-group/lume-bar-group.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-line-group/lume-line-group.vue.d.ts.map +1 -1
- package/dist/@types/composables/tooltip.d.ts +3 -3
- package/dist/@types/composables/tooltip.d.ts.map +1 -1
- package/dist/@types/docs/storybook-data/base-data.d.ts +7 -0
- package/dist/@types/docs/storybook-data/base-data.d.ts.map +1 -1
- package/dist/@types/utils/constants.d.ts +2 -0
- package/dist/@types/utils/constants.d.ts.map +1 -1
- package/dist/@types/utils/helpers.d.ts +8 -0
- package/dist/@types/utils/helpers.d.ts.map +1 -1
- package/dist/index.js +1009 -999
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
1
|
+
import { defineComponent as Z, ref as B, openBlock as _, createElementBlock as $, mergeProps as j, createElementVNode as G, toDisplayString as ae, createCommentVNode as z, isRef as Bt, computed as v, watch as Y, toRefs as ne, inject as De, reactive as Ge, onMounted as ye, unref as d, Fragment as ee, renderList as W, createBlock as K, normalizeClass as oe, normalizeStyle as Rt, onBeforeUnmount as St, watchEffect as Ct, renderSlot as S, createTextVNode as fe, useSlots as re, withDirectives as rn, withCtx as V, createSlots as de, vShow as sn, pushScopeId as cn, popScopeId as dn, provide as Fe, createVNode as ie, nextTick as _t, toHandlers as le, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as ze, resolveDynamicComponent as vn } from "vue";
|
|
2
2
|
import { format as mn, ticks as pn, scaleBand as Ee, scaleLinear as Ne, link as fn, line as hn, area as gn } from "d3";
|
|
3
3
|
import { createPopper as _n } from "@popperjs/core";
|
|
4
4
|
import { sankeyLinkHorizontal as yn, sankey as kn, sankeyJustify as bn } from "d3-sankey";
|
|
@@ -44,15 +44,15 @@ const An = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t,
|
|
48
|
-
return n({ ref:
|
|
47
|
+
const o = t, l = B(null);
|
|
48
|
+
return n({ ref: l }), (u, a) => (_(), $("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
52
52
|
}],
|
|
53
53
|
"data-j-axis__tick": "",
|
|
54
|
-
onMouseenter:
|
|
55
|
-
onClick:
|
|
54
|
+
onMouseenter: a[0] || (a[0] = (i) => o("mouseenter", i)),
|
|
55
|
+
onClick: a[1] || (a[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
57
|
G("g", An, [
|
|
58
58
|
G("rect", j(e.ghost, {
|
|
@@ -61,20 +61,20 @@ const An = {
|
|
|
61
61
|
}), null, 16),
|
|
62
62
|
G("text", j(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
|
-
ref:
|
|
64
|
+
ref: l,
|
|
65
65
|
class: "axis__label"
|
|
66
66
|
}), ae(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (_(),
|
|
68
|
+
e.withGridlines ? (_(), $("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : z("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const
|
|
72
|
+
const te = (e, n) => {
|
|
73
73
|
const t = e.__vccOpts || e;
|
|
74
|
-
for (const [o,
|
|
75
|
-
t[o] =
|
|
74
|
+
for (const [o, l] of n)
|
|
75
|
+
t[o] = l;
|
|
76
76
|
return t;
|
|
77
|
-
},
|
|
77
|
+
}, yt = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-59ddc0a6"]]), Ln = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -82,10 +82,10 @@ const ee = (e, n) => {
|
|
|
82
82
|
"tooltip",
|
|
83
83
|
"tooltip-content"
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function Gt() {
|
|
86
86
|
return process.env.NODE_ENV === "production";
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function jt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
90
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
@@ -101,20 +101,20 @@ function On(e) {
|
|
|
101
101
|
function Ze(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Vt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
|
-
return Object.entries(n).forEach(([o,
|
|
107
|
-
t[o] = Ze(e[o]) && Ze(
|
|
106
|
+
return Object.entries(n).forEach(([o, l]) => {
|
|
107
|
+
t[o] = Ze(e[o]) && Ze(l) ? Vt(e[o], l) : l;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
110
|
function xn(e) {
|
|
111
111
|
return e != null && Ze(e) && "value" in e;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ve(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
115
115
|
}
|
|
116
116
|
function $n(e) {
|
|
117
|
-
return
|
|
117
|
+
return ve(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
119
|
const In = (e, n) => {
|
|
120
120
|
if (!e)
|
|
@@ -123,19 +123,19 @@ const In = (e, n) => {
|
|
|
123
123
|
throw new Error("Cannot get highest value from empty array");
|
|
124
124
|
e.some(
|
|
125
125
|
({ values: o }) => o.length - 1 >= n
|
|
126
|
-
) ||
|
|
126
|
+
) || _e(me.IndexExceedsLengthOfDataSets);
|
|
127
127
|
};
|
|
128
128
|
function wn(e, n) {
|
|
129
129
|
var t;
|
|
130
130
|
return In(e, n), ((t = e.reduce(
|
|
131
|
-
(o,
|
|
132
|
-
var u,
|
|
133
|
-
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((
|
|
131
|
+
(o, l) => {
|
|
132
|
+
var u, a;
|
|
133
|
+
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((a = l.values[n]) == null ? void 0 : a.value) ?? 0) ? o : l;
|
|
134
134
|
}
|
|
135
135
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
136
136
|
}
|
|
137
137
|
function Ue(e) {
|
|
138
|
-
const n =
|
|
138
|
+
const n = Bt(e) ? e.value : e;
|
|
139
139
|
if (!n)
|
|
140
140
|
throw new Error("No empty array can be created from specified data value");
|
|
141
141
|
const t = Math.max(
|
|
@@ -145,16 +145,16 @@ function Ue(e) {
|
|
|
145
145
|
return Array(t).fill(null);
|
|
146
146
|
}
|
|
147
147
|
function En(e) {
|
|
148
|
-
return
|
|
148
|
+
return ve(e) ? e.domain().length : Math.max(...e.domain());
|
|
149
149
|
}
|
|
150
150
|
function Nn(e, n) {
|
|
151
151
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
152
152
|
}
|
|
153
153
|
function Dn(e, n, t) {
|
|
154
|
-
const o = t ? e.length - n : n,
|
|
155
|
-
return e.slice(o).concat(
|
|
154
|
+
const o = t ? e.length - n : n, l = e.slice(0, o);
|
|
155
|
+
return e.slice(o).concat(l);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Oe(e) {
|
|
158
158
|
if (e.groups) {
|
|
159
159
|
const n = Object.keys(e);
|
|
160
160
|
return Object.assign(
|
|
@@ -176,11 +176,15 @@ const Mn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
|
176
176
|
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
177
177
|
""
|
|
178
178
|
);
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
function ot(e, n) {
|
|
180
|
+
const t = n - e.length;
|
|
181
|
+
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
182
|
+
}
|
|
183
|
+
var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
184
|
+
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
|
|
181
185
|
const Bn = "[lume] ";
|
|
182
|
-
function
|
|
183
|
-
n &&
|
|
186
|
+
function _e(e, n = !0) {
|
|
187
|
+
n && Gt() || console.warn(Bn + "Warning: " + e);
|
|
184
188
|
}
|
|
185
189
|
const Ce = (e) => {
|
|
186
190
|
let n = null;
|
|
@@ -189,7 +193,7 @@ const Ce = (e) => {
|
|
|
189
193
|
try {
|
|
190
194
|
n = mn(e);
|
|
191
195
|
} catch {
|
|
192
|
-
|
|
196
|
+
_e(me.InvalidFormat), n = null;
|
|
193
197
|
}
|
|
194
198
|
break;
|
|
195
199
|
case "function":
|
|
@@ -208,16 +212,16 @@ const Ce = (e) => {
|
|
|
208
212
|
default: () => ({})
|
|
209
213
|
}
|
|
210
214
|
});
|
|
211
|
-
function
|
|
215
|
+
function pe(e, n) {
|
|
212
216
|
return { allOptions: v(() => {
|
|
213
|
-
const o =
|
|
214
|
-
return o ?
|
|
217
|
+
const o = Bt(n) ? n == null ? void 0 : n.value : n;
|
|
218
|
+
return o ? Vt(o, e.value) : e.value;
|
|
215
219
|
}) };
|
|
216
220
|
}
|
|
217
221
|
const Rn = 0.2;
|
|
218
222
|
function Sn(e, n, t) {
|
|
219
|
-
const o =
|
|
220
|
-
function
|
|
223
|
+
const o = B(), l = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
224
|
+
function a() {
|
|
221
225
|
if (!n.value)
|
|
222
226
|
return;
|
|
223
227
|
const s = n.value.reduce(
|
|
@@ -232,20 +236,20 @@ function Sn(e, n, t) {
|
|
|
232
236
|
const c = n.value.length;
|
|
233
237
|
if (s === 0)
|
|
234
238
|
return !0;
|
|
235
|
-
const p =
|
|
239
|
+
const p = l.value / c, r = typeof t == "number" && t > 0 && t + 1 || Math.ceil(o.value / p);
|
|
236
240
|
return s % r === 0;
|
|
237
241
|
}
|
|
238
|
-
return Y(n,
|
|
242
|
+
return Y(n, a), { showTick: i };
|
|
239
243
|
}
|
|
240
|
-
var
|
|
241
|
-
const
|
|
244
|
+
var se = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(se || {}), Pt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Pt || {}), at = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(at || {}), lt = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(lt || {}), ut = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ut || {});
|
|
245
|
+
const D = {
|
|
242
246
|
HORIZONTAL: "horizontal",
|
|
243
247
|
VERTICAL: "vertical"
|
|
244
248
|
}, Cn = {
|
|
245
249
|
SINGLE: "single",
|
|
246
250
|
GROUPED: "grouped",
|
|
247
251
|
STACKED: "stacked"
|
|
248
|
-
},
|
|
252
|
+
}, Ft = "No data", kt = 20, zt = 0.33, Wt = 0.5, Zt = 12, Me = 8, Gn = 1, jn = [
|
|
249
253
|
"auto",
|
|
250
254
|
"auto-start",
|
|
251
255
|
"auto-end",
|
|
@@ -263,9 +267,9 @@ const H = {
|
|
|
263
267
|
"left-end"
|
|
264
268
|
];
|
|
265
269
|
function je(e) {
|
|
266
|
-
e != null && e.closest("svg") ||
|
|
270
|
+
e != null && e.closest("svg") || _e(me.NotContainedInSvg);
|
|
267
271
|
}
|
|
268
|
-
const
|
|
272
|
+
const Ut = {
|
|
269
273
|
/** Displays a line for each tick. */
|
|
270
274
|
gridLines: !1,
|
|
271
275
|
/** Displays the axis title. */
|
|
@@ -282,15 +286,15 @@ const Zt = {
|
|
|
282
286
|
/** Space between the tick label and the axis line. */
|
|
283
287
|
tickPadding: 8
|
|
284
288
|
}, Vn = {
|
|
285
|
-
...
|
|
289
|
+
...Ut,
|
|
286
290
|
withTitle: !1,
|
|
287
291
|
skip: !0
|
|
288
292
|
}, Pn = {
|
|
289
|
-
...
|
|
293
|
+
...Ut,
|
|
290
294
|
gridLines: !0
|
|
291
295
|
}, Fn = function(e, n, t) {
|
|
292
296
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
293
|
-
function
|
|
297
|
+
function l(s, c) {
|
|
294
298
|
return {
|
|
295
299
|
transform: `translate(${(e.value(c) ?? e.value(s)) - o.value}, 0)`
|
|
296
300
|
};
|
|
@@ -304,10 +308,10 @@ const Zt = {
|
|
|
304
308
|
return {
|
|
305
309
|
x: -(c - e.value.step()) / 2,
|
|
306
310
|
width: c,
|
|
307
|
-
height: t.value.tickPadding +
|
|
311
|
+
height: t.value.tickPadding + Zt + Me
|
|
308
312
|
};
|
|
309
313
|
}
|
|
310
|
-
function
|
|
314
|
+
function a() {
|
|
311
315
|
const s = e.value.step() / 2;
|
|
312
316
|
return {
|
|
313
317
|
x1: s,
|
|
@@ -325,14 +329,14 @@ const Zt = {
|
|
|
325
329
|
};
|
|
326
330
|
}
|
|
327
331
|
return {
|
|
328
|
-
getGridLinesAttributes:
|
|
332
|
+
getGridLinesAttributes: a,
|
|
329
333
|
getTickGhostAttributes: u,
|
|
330
|
-
getTickGroupAttributes:
|
|
334
|
+
getTickGroupAttributes: l,
|
|
331
335
|
getTickLabelAttributes: i
|
|
332
336
|
};
|
|
333
337
|
}, zn = function(e, n, t) {
|
|
334
338
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
335
|
-
function
|
|
339
|
+
function l(s, c) {
|
|
336
340
|
return {
|
|
337
341
|
transform: `translate(0, ${(e.value(c) ?? e.value(s)) - o.value})`
|
|
338
342
|
};
|
|
@@ -346,7 +350,7 @@ const Zt = {
|
|
|
346
350
|
height: e.value.step()
|
|
347
351
|
};
|
|
348
352
|
}
|
|
349
|
-
function
|
|
353
|
+
function a() {
|
|
350
354
|
const s = e.value.step() / 2;
|
|
351
355
|
return {
|
|
352
356
|
y1: s,
|
|
@@ -363,9 +367,9 @@ const Zt = {
|
|
|
363
367
|
};
|
|
364
368
|
}
|
|
365
369
|
return {
|
|
366
|
-
getGridLinesAttributes:
|
|
370
|
+
getGridLinesAttributes: a,
|
|
367
371
|
getTickGhostAttributes: u,
|
|
368
|
-
getTickGroupAttributes:
|
|
372
|
+
getTickGroupAttributes: l,
|
|
369
373
|
getTickLabelAttributes: i
|
|
370
374
|
};
|
|
371
375
|
}, Wn = function(e, n, t) {
|
|
@@ -373,19 +377,19 @@ const Zt = {
|
|
|
373
377
|
const s = e.value.ticks();
|
|
374
378
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
375
379
|
});
|
|
376
|
-
function
|
|
380
|
+
function l(s) {
|
|
377
381
|
return {
|
|
378
382
|
transform: `translate(${e.value(s)}, 0)`
|
|
379
383
|
};
|
|
380
384
|
}
|
|
381
385
|
function u() {
|
|
382
386
|
return {
|
|
383
|
-
height: t.value.tickPadding +
|
|
387
|
+
height: t.value.tickPadding + Zt + Me,
|
|
384
388
|
width: o.value,
|
|
385
389
|
x: -(o.value / 2)
|
|
386
390
|
};
|
|
387
391
|
}
|
|
388
|
-
function
|
|
392
|
+
function a() {
|
|
389
393
|
return {
|
|
390
394
|
y1: -n.value.height
|
|
391
395
|
};
|
|
@@ -398,9 +402,9 @@ const Zt = {
|
|
|
398
402
|
};
|
|
399
403
|
}
|
|
400
404
|
return {
|
|
401
|
-
getGridLinesAttributes:
|
|
405
|
+
getGridLinesAttributes: a,
|
|
402
406
|
getTickGhostAttributes: u,
|
|
403
|
-
getTickGroupAttributes:
|
|
407
|
+
getTickGroupAttributes: l,
|
|
404
408
|
getTickLabelAttributes: i
|
|
405
409
|
};
|
|
406
410
|
}, Zn = function(e, n, t) {
|
|
@@ -408,7 +412,7 @@ const Zt = {
|
|
|
408
412
|
const s = e.value.ticks();
|
|
409
413
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
410
414
|
});
|
|
411
|
-
function
|
|
415
|
+
function l(s) {
|
|
412
416
|
return {
|
|
413
417
|
transform: `translate(0, ${e.value(s)})`
|
|
414
418
|
};
|
|
@@ -423,7 +427,7 @@ const Zt = {
|
|
|
423
427
|
y: -(o.value / 2)
|
|
424
428
|
};
|
|
425
429
|
}
|
|
426
|
-
function
|
|
430
|
+
function a() {
|
|
427
431
|
return {
|
|
428
432
|
x1: n.value.width
|
|
429
433
|
};
|
|
@@ -436,9 +440,9 @@ const Zt = {
|
|
|
436
440
|
};
|
|
437
441
|
}
|
|
438
442
|
return {
|
|
439
|
-
getGridLinesAttributes:
|
|
443
|
+
getGridLinesAttributes: a,
|
|
440
444
|
getTickGhostAttributes: u,
|
|
441
|
-
getTickGroupAttributes:
|
|
445
|
+
getTickGroupAttributes: l,
|
|
442
446
|
getTickLabelAttributes: i
|
|
443
447
|
};
|
|
444
448
|
}, Un = {
|
|
@@ -466,8 +470,8 @@ const Zt = {
|
|
|
466
470
|
], -1), Jn = [
|
|
467
471
|
Kn
|
|
468
472
|
];
|
|
469
|
-
var
|
|
470
|
-
const
|
|
473
|
+
var Xt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Xt || {}), Yt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Yt || {}), Xe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Xe || {});
|
|
474
|
+
const bt = /* @__PURE__ */ Z({
|
|
471
475
|
__name: "lume-axis",
|
|
472
476
|
props: {
|
|
473
477
|
scale: {
|
|
@@ -482,7 +486,7 @@ const kt = /* @__PURE__ */ Z({
|
|
|
482
486
|
position: {
|
|
483
487
|
type: String,
|
|
484
488
|
default: void 0,
|
|
485
|
-
validator: (e) => e in
|
|
489
|
+
validator: (e) => e in Yt
|
|
486
490
|
},
|
|
487
491
|
containerSize: {
|
|
488
492
|
type: Object,
|
|
@@ -494,116 +498,116 @@ const kt = /* @__PURE__ */ Z({
|
|
|
494
498
|
},
|
|
495
499
|
orientation: {
|
|
496
500
|
type: String,
|
|
497
|
-
default:
|
|
501
|
+
default: D.VERTICAL
|
|
498
502
|
},
|
|
499
503
|
...He()
|
|
500
504
|
},
|
|
501
505
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
502
506
|
setup(e, { emit: n }) {
|
|
503
|
-
const o = e,
|
|
507
|
+
const o = e, l = n, { scale: u, containerSize: a, hoveredIndex: i, options: s, orientation: c } = ne(o), p = De("isEmpty", B(!1)), r = Ge({}), h = B(null), g = B(null), m = B(null), A = v(
|
|
504
508
|
() => o.type ? Xe[o.type] : o.position
|
|
505
|
-
),
|
|
506
|
-
() => o.type || (
|
|
507
|
-
),
|
|
508
|
-
() =>
|
|
509
|
-
), { allOptions:
|
|
509
|
+
), x = v(
|
|
510
|
+
() => o.type || (A.value === "left" ? "y" : "x")
|
|
511
|
+
), T = v(
|
|
512
|
+
() => x.value === "x" && c.value === D.VERTICAL || x.value === "y" && c.value === D.HORIZONTAL
|
|
513
|
+
), { allOptions: f } = pe(
|
|
510
514
|
s,
|
|
511
|
-
|
|
512
|
-
), { showTick:
|
|
513
|
-
var
|
|
514
|
-
return
|
|
515
|
-
}), N = v(() => {
|
|
516
|
-
if (de(u.value))
|
|
517
|
-
return u.value.labels || u.value.domain();
|
|
518
|
-
const { tickCount: S } = h.value, [M, k] = u.value.domain();
|
|
519
|
-
return pn(M, k, S);
|
|
515
|
+
x.value === "x" ? Vn : Pn
|
|
516
|
+
), { showTick: O } = Sn(u, h, f.value.skip), N = v(() => {
|
|
517
|
+
var R, H, k, M;
|
|
518
|
+
return x.value === "y" && p.value ? `translate(0, ${((R = a.value) == null ? void 0 : R.height) / 2})` : x.value === "x" && p.value ? `translate(-${((H = a.value) == null ? void 0 : H.width) / 2}, ${(k = a.value) == null ? void 0 : k.height})` : `translate(0, ${x.value === "x" ? (M = a.value) == null ? void 0 : M.height : 0})`;
|
|
520
519
|
}), E = v(() => {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
(
|
|
525
|
-
),
|
|
526
|
-
|
|
527
|
-
|
|
520
|
+
if (ve(u.value))
|
|
521
|
+
return u.value.labels || u.value.domain();
|
|
522
|
+
const { tickCount: R } = f.value, [H, k] = u.value.domain();
|
|
523
|
+
return pn(H, k, R);
|
|
524
|
+
}), F = v(() => {
|
|
525
|
+
const { tickFormat: R } = f.value;
|
|
526
|
+
return Ce(R);
|
|
527
|
+
}), w = v(
|
|
528
|
+
() => f.value.withHover && T.value && i.value > -1
|
|
529
|
+
), C = v(
|
|
530
|
+
() => f.value.tickPadding + Me || 16
|
|
531
|
+
), J = v(() => x.value === "x" ? (
|
|
528
532
|
// If x axis, get the tick height
|
|
529
533
|
Math.max(
|
|
530
|
-
...(
|
|
531
|
-
(
|
|
532
|
-
var
|
|
533
|
-
return ((k = (
|
|
534
|
+
...(h.value || []).map(
|
|
535
|
+
(R) => {
|
|
536
|
+
var H, k;
|
|
537
|
+
return ((k = (H = R.ref).getBBox) == null ? void 0 : k.call(H).height) + C.value;
|
|
534
538
|
}
|
|
535
539
|
)
|
|
536
540
|
)
|
|
537
541
|
) : (
|
|
538
542
|
// If y axis, get the tick width
|
|
539
543
|
Math.max(
|
|
540
|
-
...(
|
|
541
|
-
(
|
|
542
|
-
var
|
|
543
|
-
return ((k = (
|
|
544
|
+
...(h.value || []).map(
|
|
545
|
+
(R) => {
|
|
546
|
+
var H, k;
|
|
547
|
+
return ((k = (H = R.ref).getBBox) == null ? void 0 : k.call(H).width) + C.value;
|
|
544
548
|
}
|
|
545
549
|
)
|
|
546
550
|
)
|
|
547
551
|
));
|
|
548
|
-
function
|
|
549
|
-
const { showTicks:
|
|
550
|
-
return
|
|
552
|
+
function U(R) {
|
|
553
|
+
const { showTicks: H } = f.value;
|
|
554
|
+
return H === !1 ? "" : F.value(R);
|
|
551
555
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
556
|
+
function q(R, H, k) {
|
|
557
|
+
l("mouseenter", { index: T.value ? R : null, value: H, event: k });
|
|
554
558
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
559
|
+
function P(R, H, k) {
|
|
560
|
+
l("click", { index: R, value: H, event: k });
|
|
557
561
|
}
|
|
558
|
-
function
|
|
559
|
-
var
|
|
560
|
-
if (!(!
|
|
561
|
-
return (
|
|
562
|
+
function ue(R) {
|
|
563
|
+
var H;
|
|
564
|
+
if (!(!h.value || !h.value.length))
|
|
565
|
+
return (H = h.value[R]) == null ? void 0 : H.ref;
|
|
562
566
|
}
|
|
563
567
|
function xe() {
|
|
564
|
-
m.value =
|
|
565
|
-
(
|
|
566
|
-
value:
|
|
567
|
-
group: r.getTickGroupAttributes(
|
|
568
|
-
ghost: r.getTickGhostAttributes(
|
|
568
|
+
m.value = E.value.map(
|
|
569
|
+
(R, H) => ({
|
|
570
|
+
value: U(R),
|
|
571
|
+
group: r.getTickGroupAttributes(R, H),
|
|
572
|
+
ghost: r.getTickGhostAttributes(ue(H)),
|
|
569
573
|
label: r.getTickLabelAttributes(),
|
|
570
574
|
gridline: r.getGridLinesAttributes()
|
|
571
575
|
})
|
|
572
576
|
);
|
|
573
577
|
}
|
|
574
|
-
function
|
|
575
|
-
const
|
|
576
|
-
Object.entries(
|
|
577
|
-
([k,
|
|
578
|
-
r[k] =
|
|
578
|
+
function be() {
|
|
579
|
+
const R = u.value.step ? "bandScale" : "linearScale", H = Un[`${x.value}-${Xt[R]}`];
|
|
580
|
+
Object.entries(H(u, a, f) || []).forEach(
|
|
581
|
+
([k, M]) => {
|
|
582
|
+
r[k] = M;
|
|
579
583
|
}
|
|
580
584
|
);
|
|
581
585
|
}
|
|
582
|
-
return Y(u,
|
|
586
|
+
return Y(u, be, { flush: "sync", immediate: !0 }), Y(u, xe, { immediate: !0 }), Y(h, xe), Y(J, (R) => l("lume__internal--axis-size", R)), ye(() => je(g.value)), (R, H) => d(u) ? (_(), $("g", {
|
|
583
587
|
key: 0,
|
|
584
588
|
ref_key: "root",
|
|
585
589
|
ref: g,
|
|
586
590
|
class: "axis",
|
|
587
|
-
transform:
|
|
591
|
+
transform: N.value,
|
|
588
592
|
"data-j-axis": "",
|
|
589
|
-
onMouseleave:
|
|
593
|
+
onMouseleave: H[1] || (H[1] = (k) => l("mouseleave", k))
|
|
590
594
|
}, [
|
|
591
|
-
|
|
592
|
-
(_(!0),
|
|
593
|
-
key: `${k.value}_${
|
|
595
|
+
x.value === "x" ? (_(), $("defs", Yn, Jn)) : z("", !0),
|
|
596
|
+
(_(!0), $(ee, null, W(m.value, (k, M) => (_(), K(d(yt), j({
|
|
597
|
+
key: `${k.value}_${M}`,
|
|
594
598
|
ref_for: !0,
|
|
595
599
|
ref_key: "tickRefs",
|
|
596
|
-
ref:
|
|
600
|
+
ref: h
|
|
597
601
|
}, k, {
|
|
598
|
-
"is-hidden": d(
|
|
599
|
-
"with-gridlines": d(
|
|
600
|
-
onMouseenter: (y) =>
|
|
601
|
-
onClick: (y) =>
|
|
602
|
+
"is-hidden": d(f).skip && !d(O)(M),
|
|
603
|
+
"with-gridlines": d(f).gridLines,
|
|
604
|
+
onMouseenter: (y) => q(M, k.value, y),
|
|
605
|
+
onClick: (y) => P(M, k.value, y)
|
|
602
606
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
603
|
-
|
|
607
|
+
w.value ? (_(), K(d(yt), j({ key: 1 }, m.value[d(i)], {
|
|
604
608
|
"with-gridlines": !1,
|
|
605
609
|
"is-hovered": "",
|
|
606
|
-
onClick:
|
|
610
|
+
onClick: H[0] || (H[0] = (k) => P(
|
|
607
611
|
d(i),
|
|
608
612
|
m.value[d(i)].value,
|
|
609
613
|
k
|
|
@@ -613,22 +617,22 @@ const kt = /* @__PURE__ */ Z({
|
|
|
613
617
|
}
|
|
614
618
|
});
|
|
615
619
|
function Qn(e, n, t, o) {
|
|
616
|
-
const
|
|
620
|
+
const l = v(() => t.value > 0 && t.value < 1), u = v(
|
|
617
621
|
() => o.value > 0 && o.value < 1
|
|
618
|
-
),
|
|
619
|
-
() =>
|
|
622
|
+
), a = v(
|
|
623
|
+
() => l.value ? e.value - 0.5 : e.value
|
|
620
624
|
// draws the 1px bar closer to the axis
|
|
621
625
|
), i = v(
|
|
622
626
|
() => u.value ? n.value - 0.5 : n.value
|
|
623
627
|
// draws the 1px bar closer to the axis
|
|
624
628
|
);
|
|
625
|
-
return { computedX:
|
|
629
|
+
return { computedX: a, computedY: i, shouldHaveMinWidth: l, shouldHaveMinHeight: u };
|
|
626
630
|
}
|
|
627
631
|
function qn(e, n, t, o) {
|
|
628
|
-
const
|
|
629
|
-
return
|
|
630
|
-
|
|
631
|
-
}), Y(t, (i) =>
|
|
632
|
+
const l = B(0), u = B(0), a = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
633
|
+
return ye(() => {
|
|
634
|
+
l.value = t.value, u.value = o.value;
|
|
635
|
+
}), Y(t, (i) => l.value = i), Y(o, (i) => u.value = i), { computedWidth: l, computedHeight: u, transformOrigin: a };
|
|
632
636
|
}
|
|
633
637
|
const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
634
638
|
__name: "lume-bar",
|
|
@@ -668,45 +672,45 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
668
672
|
},
|
|
669
673
|
emits: ["click", "mouseover", "mouseleave"],
|
|
670
674
|
setup(e, { emit: n }) {
|
|
671
|
-
const t = e, o = n, { x:
|
|
675
|
+
const t = e, o = n, { x: l, y: u, width: a, height: i, transition: s, classList: c } = ne(t), p = B(null), r = v(
|
|
672
676
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
673
|
-
),
|
|
674
|
-
return
|
|
677
|
+
), h = v(() => s.value === "width"), g = v(() => s.value === "height"), m = qn(l, u, a, i), { computedX: A, computedY: x, shouldHaveMinWidth: T, shouldHaveMinHeight: f } = Qn(l, u, a, i), O = v(() => T.value ? 1 : (h.value ? m.computedWidth : a).value), N = v(() => f.value ? 1 : (g.value ? m.computedHeight : i).value), E = h.value || g.value ? m.transformOrigin : null;
|
|
678
|
+
return ye(() => je(p.value)), (F, w) => (_(), $("rect", {
|
|
675
679
|
ref_key: "root",
|
|
676
680
|
ref: p,
|
|
677
681
|
class: oe(["lume-bar", [
|
|
678
682
|
{
|
|
679
683
|
"lume-fill--faded": e.isFaded,
|
|
680
684
|
"lume-bar--negative": e.isNegative,
|
|
681
|
-
"lume-bar--transition-width":
|
|
685
|
+
"lume-bar--transition-width": h.value,
|
|
682
686
|
"lume-bar--transition-height": g.value
|
|
683
687
|
},
|
|
684
688
|
...r.value
|
|
685
689
|
]]),
|
|
686
|
-
style:
|
|
687
|
-
x: d(
|
|
688
|
-
y: d(
|
|
689
|
-
width:
|
|
690
|
-
height:
|
|
690
|
+
style: Rt({ transformOrigin: d(E) }),
|
|
691
|
+
x: d(A),
|
|
692
|
+
y: d(x),
|
|
693
|
+
width: O.value,
|
|
694
|
+
height: N.value,
|
|
691
695
|
"data-j-bar": "",
|
|
692
|
-
onClick:
|
|
693
|
-
onMouseover:
|
|
694
|
-
onMouseleave:
|
|
696
|
+
onClick: w[0] || (w[0] = (C) => o("click", C)),
|
|
697
|
+
onMouseover: w[1] || (w[1] = (C) => o("mouseover", C)),
|
|
698
|
+
onMouseleave: w[2] || (w[2] = (C) => o("mouseleave", C))
|
|
695
699
|
}, null, 46, eo));
|
|
696
700
|
}
|
|
697
701
|
});
|
|
698
|
-
const
|
|
702
|
+
const rt = /* @__PURE__ */ te(to, [["__scopeId", "data-v-8e8f732a"]]);
|
|
699
703
|
function no() {
|
|
700
|
-
const e =
|
|
704
|
+
const e = B(), n = Ge({
|
|
701
705
|
dimensions: {}
|
|
702
706
|
}), t = new ResizeObserver((o) => {
|
|
703
|
-
o.forEach((
|
|
704
|
-
n.dimensions =
|
|
707
|
+
o.forEach((l) => {
|
|
708
|
+
n.dimensions = l.contentRect;
|
|
705
709
|
});
|
|
706
710
|
});
|
|
707
|
-
return
|
|
711
|
+
return ye(() => {
|
|
708
712
|
t.observe(e.value);
|
|
709
|
-
}),
|
|
713
|
+
}), St(() => {
|
|
710
714
|
t.unobserve(e.value);
|
|
711
715
|
}), { resizeState: n, resizeRef: e };
|
|
712
716
|
}
|
|
@@ -732,23 +736,23 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
732
736
|
},
|
|
733
737
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
734
738
|
setup(e, { emit: n }) {
|
|
735
|
-
const t = e, o = n, { margins:
|
|
736
|
-
() => u.value.height +
|
|
739
|
+
const t = e, o = n, { margins: l, containerSize: u } = ne(t), a = B(null), { resizeRef: i, resizeState: s } = no(), c = v(
|
|
740
|
+
() => u.value.height + l.value.top + l.value.bottom
|
|
737
741
|
);
|
|
738
|
-
return
|
|
739
|
-
if (!
|
|
742
|
+
return Ct(() => {
|
|
743
|
+
if (!a.value)
|
|
740
744
|
return;
|
|
741
|
-
const { width: p } = s.dimensions, { height: r } =
|
|
745
|
+
const { width: p } = s.dimensions, { height: r } = a.value.getBoundingClientRect();
|
|
742
746
|
if (!p || !r)
|
|
743
747
|
return;
|
|
744
|
-
const
|
|
745
|
-
width:
|
|
748
|
+
const h = p - l.value.left - l.value.right, g = r - l.value.top - l.value.bottom, m = {
|
|
749
|
+
width: h > 0 ? h : 0,
|
|
746
750
|
height: g > 0 ? g : 0,
|
|
747
751
|
outerWidth: p,
|
|
748
752
|
outerHeight: r
|
|
749
753
|
};
|
|
750
754
|
o("resize", m);
|
|
751
|
-
}), (p, r) => (_(),
|
|
755
|
+
}), (p, r) => (_(), $("div", {
|
|
752
756
|
ref_key: "resizeRef",
|
|
753
757
|
ref: i,
|
|
754
758
|
class: oe(["lume-chart-container", {
|
|
@@ -756,33 +760,33 @@ const oo = ["height"], ao = ["transform"], lo = /* @__PURE__ */ Z({
|
|
|
756
760
|
}]),
|
|
757
761
|
"data-j-chart-container": ""
|
|
758
762
|
}, [
|
|
759
|
-
|
|
760
|
-
(_(),
|
|
763
|
+
S(p.$slots, "header", {}, void 0, !0),
|
|
764
|
+
(_(), $("svg", {
|
|
761
765
|
ref_key: "root",
|
|
762
|
-
ref:
|
|
766
|
+
ref: a,
|
|
763
767
|
class: oe(["lume-chart-container__svg", {
|
|
764
768
|
"lume-chart-container__svg--transparent": e.transparentBackground
|
|
765
769
|
}]),
|
|
766
770
|
height: c.value,
|
|
767
771
|
"data-j-chart-container__root": "",
|
|
768
|
-
onClick: r[0] || (r[0] = (
|
|
769
|
-
onMouseenter: r[1] || (r[1] = (
|
|
770
|
-
onMouseleave: r[2] || (r[2] = (
|
|
772
|
+
onClick: r[0] || (r[0] = (h) => o("click", h)),
|
|
773
|
+
onMouseenter: r[1] || (r[1] = (h) => o("mouseenter", h)),
|
|
774
|
+
onMouseleave: r[2] || (r[2] = (h) => o("mouseleave", h))
|
|
771
775
|
}, [
|
|
772
776
|
G("g", {
|
|
773
|
-
transform: `translate(${d(
|
|
777
|
+
transform: `translate(${d(l).left}, ${d(l).top})`,
|
|
774
778
|
class: "lume-chart-container__group",
|
|
775
779
|
"data-j-chart-container__group": ""
|
|
776
780
|
}, [
|
|
777
|
-
|
|
781
|
+
S(p.$slots, "default", {}, void 0, !0)
|
|
778
782
|
], 8, ao)
|
|
779
783
|
], 42, oo)),
|
|
780
|
-
|
|
781
|
-
|
|
784
|
+
S(p.$slots, "footer", {}, void 0, !0),
|
|
785
|
+
S(p.$slots, "extra", {}, void 0, !0)
|
|
782
786
|
], 2));
|
|
783
787
|
}
|
|
784
788
|
});
|
|
785
|
-
const uo = /* @__PURE__ */
|
|
789
|
+
const uo = /* @__PURE__ */ te(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["onClick", "onMouseenter"], io = /* @__PURE__ */ Z({
|
|
786
790
|
__name: "lume-chart-legend",
|
|
787
791
|
props: {
|
|
788
792
|
data: {
|
|
@@ -794,55 +798,55 @@ const uo = /* @__PURE__ */ ee(lo, [["__scopeId", "data-v-2c7d0302"]]), ro = ["on
|
|
|
794
798
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
795
799
|
setup(e, { emit: n }) {
|
|
796
800
|
const t = n, o = De("isEmpty");
|
|
797
|
-
return (
|
|
801
|
+
return (l, u) => d(o) ? z("", !0) : (_(), $("div", {
|
|
798
802
|
key: 0,
|
|
799
803
|
class: "lume-chart-legend",
|
|
800
804
|
"data-j-chart-legend": "",
|
|
801
|
-
onMouseleave: u[0] || (u[0] = (
|
|
805
|
+
onMouseleave: u[0] || (u[0] = (a) => t("mouseleave"))
|
|
802
806
|
}, [
|
|
803
|
-
(_(!0),
|
|
807
|
+
(_(!0), $(ee, null, W(e.data, (a, i) => (_(), $("div", {
|
|
804
808
|
key: `legend-item-${i}`,
|
|
805
809
|
class: "lume-chart-legend__item lume-typography--body",
|
|
806
810
|
tabindex: "0",
|
|
807
811
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
808
|
-
onClick: (s) => t("click", { index: i, dataset:
|
|
809
|
-
onMouseenter: (s) => t("mouseenter", { index: i, dataset:
|
|
812
|
+
onClick: (s) => t("click", { index: i, dataset: a, event: s }),
|
|
813
|
+
onMouseenter: (s) => t("mouseenter", { index: i, dataset: a, event: s })
|
|
810
814
|
}, [
|
|
811
815
|
G("span", {
|
|
812
|
-
class: oe(["lume-chart-legend__symbol", `lume-background-color--${
|
|
816
|
+
class: oe(["lume-chart-legend__symbol", `lume-background-color--${a.color}`]),
|
|
813
817
|
"data-j-chart-legend__symbol": ""
|
|
814
818
|
}, null, 2),
|
|
815
|
-
|
|
819
|
+
fe(" " + ae(a.label || i), 1)
|
|
816
820
|
], 40, ro))), 128))
|
|
817
821
|
], 32));
|
|
818
822
|
}
|
|
819
823
|
});
|
|
820
|
-
const
|
|
824
|
+
const At = /* @__PURE__ */ te(io, [["__scopeId", "data-v-4710298b"]]);
|
|
821
825
|
const so = {}, co = {
|
|
822
826
|
class: "lume-tooltip__title",
|
|
823
827
|
"data-j-tooltip__title": ""
|
|
824
828
|
};
|
|
825
829
|
function vo(e, n) {
|
|
826
|
-
return _(),
|
|
827
|
-
|
|
830
|
+
return _(), $("div", co, [
|
|
831
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
828
832
|
]);
|
|
829
833
|
}
|
|
830
|
-
const mo = /* @__PURE__ */
|
|
834
|
+
const mo = /* @__PURE__ */ te(so, [["render", vo], ["__scopeId", "data-v-8af3fac6"]]);
|
|
831
835
|
const po = {}, fo = {
|
|
832
836
|
class: "lume-tooltip__item",
|
|
833
837
|
"data-j-tooltip__summary-item": ""
|
|
834
838
|
}, ho = { class: "lume-tooltip__value" };
|
|
835
839
|
function go(e, n) {
|
|
836
|
-
return _(),
|
|
840
|
+
return _(), $("li", fo, [
|
|
837
841
|
G("span", null, [
|
|
838
|
-
|
|
842
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
839
843
|
]),
|
|
840
844
|
G("strong", ho, [
|
|
841
|
-
|
|
845
|
+
S(e.$slots, "value", {}, void 0, !0)
|
|
842
846
|
])
|
|
843
847
|
]);
|
|
844
848
|
}
|
|
845
|
-
const _o = /* @__PURE__ */
|
|
849
|
+
const _o = /* @__PURE__ */ te(po, [["render", go], ["__scopeId", "data-v-4ed7ec1b"]]), yo = {
|
|
846
850
|
class: "lume-tooltip__item",
|
|
847
851
|
"data-j-tooltip__item": ""
|
|
848
852
|
}, ko = { "data-j-tooltip__item__label": "" }, bo = {
|
|
@@ -857,22 +861,22 @@ const _o = /* @__PURE__ */ ee(po, [["render", go], ["__scopeId", "data-v-4ed7ec1
|
|
|
857
861
|
}
|
|
858
862
|
},
|
|
859
863
|
setup(e) {
|
|
860
|
-
return (n, t) => (_(),
|
|
861
|
-
e.color ? (_(),
|
|
864
|
+
return (n, t) => (_(), $("li", yo, [
|
|
865
|
+
e.color ? (_(), $("span", {
|
|
862
866
|
key: 0,
|
|
863
867
|
class: oe([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
864
868
|
"data-j-tooltip__item__symbol": ""
|
|
865
869
|
}, null, 2)) : z("", !0),
|
|
866
870
|
G("span", ko, [
|
|
867
|
-
|
|
871
|
+
S(n.$slots, "label", {}, void 0, !0)
|
|
868
872
|
]),
|
|
869
873
|
G("strong", bo, [
|
|
870
|
-
|
|
874
|
+
S(n.$slots, "value", {}, void 0, !0)
|
|
871
875
|
])
|
|
872
876
|
]));
|
|
873
877
|
}
|
|
874
878
|
});
|
|
875
|
-
const To = /* @__PURE__ */
|
|
879
|
+
const To = /* @__PURE__ */ te(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e) => (cn("data-v-8ec11304"), e = e(), dn(), e), Oo = { class: "lume-tooltip__items" }, xo = {
|
|
876
880
|
key: 0,
|
|
877
881
|
class: "lume-tooltip__break"
|
|
878
882
|
}, $o = /* @__PURE__ */ Lo(() => /* @__PURE__ */ G("hr", null, null, -1)), Io = [
|
|
@@ -913,11 +917,11 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
913
917
|
},
|
|
914
918
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
915
919
|
setup(e, { emit: n }) {
|
|
916
|
-
const t = e, o = n,
|
|
920
|
+
const t = e, o = n, l = B(null), { items: u, options: a } = ne(t), i = re(), s = B(null), { allOptions: c } = pe(a), p = v(
|
|
917
921
|
() => c.value.fixedPositioning ?? t.fixedPositioning
|
|
918
922
|
), r = v(
|
|
919
923
|
() => p.value ? "fixed" : "absolute"
|
|
920
|
-
),
|
|
924
|
+
), h = v(() => [
|
|
921
925
|
{
|
|
922
926
|
name: "computeStyles",
|
|
923
927
|
options: {
|
|
@@ -932,81 +936,81 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
932
936
|
...t.modifiers || []
|
|
933
937
|
]), g = v(
|
|
934
938
|
() => c.value.showTitle !== !1 && t.title != null
|
|
935
|
-
), m = v(() => Ce(c.value.valueFormat)),
|
|
939
|
+
), m = v(() => Ce(c.value.valueFormat)), A = v(() => Ce(c.value.titleFormat)), x = v(
|
|
936
940
|
() => {
|
|
937
|
-
var
|
|
938
|
-
return ((
|
|
941
|
+
var E;
|
|
942
|
+
return ((E = u.value) == null ? void 0 : E.find((F) => F.isSummary)) || {
|
|
939
943
|
label: c.value.summary ?? t.summary
|
|
940
944
|
};
|
|
941
945
|
}
|
|
942
|
-
),
|
|
943
|
-
function
|
|
944
|
-
t.targetElement &&
|
|
946
|
+
), T = v(() => i.summary || x.value.label);
|
|
947
|
+
function f() {
|
|
948
|
+
t.targetElement && l.value && (s.value = _n(t.targetElement, l.value, {
|
|
945
949
|
placement: t.position,
|
|
946
950
|
strategy: r.value,
|
|
947
|
-
modifiers:
|
|
951
|
+
modifiers: h.value
|
|
948
952
|
}), o("opened", t.targetElement));
|
|
949
953
|
}
|
|
950
|
-
function
|
|
954
|
+
function O() {
|
|
951
955
|
s.value && (s.value.destroy(), o("closed"));
|
|
952
956
|
}
|
|
953
|
-
function
|
|
954
|
-
s.value && (c.value.withAnimation !== !1 &&
|
|
957
|
+
function N() {
|
|
958
|
+
s.value && (c.value.withAnimation !== !1 && l.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
955
959
|
s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
|
|
956
|
-
}() :
|
|
960
|
+
}() : O());
|
|
957
961
|
}
|
|
958
962
|
return Y(
|
|
959
963
|
() => t.targetElement,
|
|
960
|
-
(
|
|
961
|
-
!
|
|
964
|
+
(E, F) => {
|
|
965
|
+
!F && E ? f() : N();
|
|
962
966
|
}
|
|
963
|
-
),
|
|
967
|
+
), ye(f), St(O), (E, F) => rn((_(), $("div", {
|
|
964
968
|
ref_key: "root",
|
|
965
|
-
ref:
|
|
969
|
+
ref: l,
|
|
966
970
|
class: oe(["lume-tooltip lume-typography--caption", {
|
|
967
|
-
"lume-tooltip--pointer-events": d(
|
|
971
|
+
"lume-tooltip--pointer-events": d(a).withPointerEvents
|
|
968
972
|
}]),
|
|
969
973
|
"data-j-tooltip": "",
|
|
970
|
-
onMouseenter:
|
|
971
|
-
onMouseleave:
|
|
974
|
+
onMouseenter: F[0] || (F[0] = (w) => o("tooltip-mouseenter")),
|
|
975
|
+
onMouseleave: F[1] || (F[1] = (w) => o("tooltip-mouseleave"))
|
|
972
976
|
}, [
|
|
973
|
-
|
|
974
|
-
|
|
977
|
+
S(E.$slots, "default", {}, () => [
|
|
978
|
+
S(E.$slots, "title", {}, () => [
|
|
975
979
|
g.value ? (_(), K(d(mo), { key: 0 }, {
|
|
976
|
-
default:
|
|
977
|
-
|
|
980
|
+
default: V(() => [
|
|
981
|
+
fe(ae(A.value(e.title)), 1)
|
|
978
982
|
]),
|
|
979
983
|
_: 1
|
|
980
984
|
})) : z("", !0)
|
|
981
985
|
], !0),
|
|
982
986
|
G("ul", Oo, [
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
default:
|
|
986
|
-
|
|
987
|
+
S(E.$slots, "summary", {}, () => [
|
|
988
|
+
T.value ? (_(), K(d(_o), { key: 0 }, de({
|
|
989
|
+
default: V(() => [
|
|
990
|
+
fe(ae(x.value.label) + " ", 1)
|
|
987
991
|
]),
|
|
988
992
|
_: 2
|
|
989
993
|
}, [
|
|
990
|
-
|
|
994
|
+
x.value.value ? {
|
|
991
995
|
name: "value",
|
|
992
|
-
fn:
|
|
993
|
-
|
|
996
|
+
fn: V(() => [
|
|
997
|
+
fe(ae(m.value(x.value.value)), 1)
|
|
994
998
|
]),
|
|
995
999
|
key: "0"
|
|
996
1000
|
} : void 0
|
|
997
1001
|
]), 1024)) : z("", !0)
|
|
998
1002
|
], !0),
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
(_(!0),
|
|
1002
|
-
key:
|
|
1003
|
-
color:
|
|
1003
|
+
T.value ? (_(), $("li", xo, Io)) : z("", !0),
|
|
1004
|
+
S(E.$slots, "items", {}, () => [
|
|
1005
|
+
(_(!0), $(ee, null, W(d(u), (w) => (_(), K(d(To), {
|
|
1006
|
+
key: w.label,
|
|
1007
|
+
color: w.color
|
|
1004
1008
|
}, {
|
|
1005
|
-
label:
|
|
1006
|
-
|
|
1009
|
+
label: V(() => [
|
|
1010
|
+
fe(ae(w.label), 1)
|
|
1007
1011
|
]),
|
|
1008
|
-
value:
|
|
1009
|
-
|
|
1012
|
+
value: V(() => [
|
|
1013
|
+
fe(ae(m.value(w.value)), 1)
|
|
1010
1014
|
]),
|
|
1011
1015
|
_: 2
|
|
1012
1016
|
}, 1032, ["color"]))), 128))
|
|
@@ -1018,26 +1022,26 @@ const To = /* @__PURE__ */ ee(Ao, [["__scopeId", "data-v-4f995c3c"]]), Lo = (e)
|
|
|
1018
1022
|
]);
|
|
1019
1023
|
}
|
|
1020
1024
|
});
|
|
1021
|
-
const Eo = /* @__PURE__ */
|
|
1022
|
-
var
|
|
1023
|
-
const No =
|
|
1025
|
+
const Eo = /* @__PURE__ */ te(wo, [["__scopeId", "data-v-8ec11304"]]);
|
|
1026
|
+
var Te = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(Te || {});
|
|
1027
|
+
const No = Te.Categorical, Be = se.Skyblue, Do = at.SkyTeal;
|
|
1024
1028
|
function Ho(e) {
|
|
1025
|
-
return e ===
|
|
1029
|
+
return e === Te.Divergent ? Do : Be;
|
|
1026
1030
|
}
|
|
1027
1031
|
function Mo(e) {
|
|
1028
|
-
return Object.values(
|
|
1029
|
-
}
|
|
1030
|
-
function
|
|
1031
|
-
return n ===
|
|
1032
|
-
...
|
|
1033
|
-
...
|
|
1034
|
-
...
|
|
1035
|
-
...
|
|
1032
|
+
return Object.values(ut).includes(e);
|
|
1033
|
+
}
|
|
1034
|
+
function Tt(e, n) {
|
|
1035
|
+
return n === Te.Divergent ? Object.values(at).includes(e) : Object.values({
|
|
1036
|
+
...se,
|
|
1037
|
+
...Pt,
|
|
1038
|
+
...lt,
|
|
1039
|
+
...ut
|
|
1036
1040
|
}).includes(e);
|
|
1037
1041
|
}
|
|
1038
1042
|
function Bo(e, n) {
|
|
1039
|
-
const t = Object.values(
|
|
1040
|
-
return Dn(Object.values(
|
|
1043
|
+
const t = Object.values(se).indexOf(e);
|
|
1044
|
+
return Dn(Object.values(se), t > -1 ? t : 0)[n];
|
|
1041
1045
|
}
|
|
1042
1046
|
function Ro(e, n) {
|
|
1043
1047
|
const t = 50 + n * 10;
|
|
@@ -1047,19 +1051,19 @@ function So(e, n) {
|
|
|
1047
1051
|
const t = (n + 1) * 10;
|
|
1048
1052
|
return `${e}-${t}`;
|
|
1049
1053
|
}
|
|
1050
|
-
function
|
|
1054
|
+
function Lt(e, n, t) {
|
|
1051
1055
|
switch (n) {
|
|
1052
1056
|
default:
|
|
1053
|
-
case
|
|
1057
|
+
case Te.Categorical:
|
|
1054
1058
|
return Mo(e) ? e : Bo(e, t);
|
|
1055
|
-
case
|
|
1059
|
+
case Te.Sequential:
|
|
1056
1060
|
return Ro(e, t);
|
|
1057
|
-
case
|
|
1061
|
+
case Te.Divergent:
|
|
1058
1062
|
return So(e, t);
|
|
1059
1063
|
}
|
|
1060
1064
|
}
|
|
1061
1065
|
function Co(e, n, t = No, o) {
|
|
1062
|
-
return
|
|
1066
|
+
return Tt(e, t) ? e : (o > 4 && (_e(me.ColorLoop), o = o % 5), Tt(n, t) ? Lt(n, t, o) : Lt(Ho(t), t, o));
|
|
1063
1067
|
}
|
|
1064
1068
|
function Go(e) {
|
|
1065
1069
|
return e.map((n) => xn(n) ? n : { value: n });
|
|
@@ -1067,7 +1071,7 @@ function Go(e) {
|
|
|
1067
1071
|
function jo(e) {
|
|
1068
1072
|
return e.__internal === !0;
|
|
1069
1073
|
}
|
|
1070
|
-
const
|
|
1074
|
+
const it = (e = null) => ({
|
|
1071
1075
|
data: {
|
|
1072
1076
|
type: Array,
|
|
1073
1077
|
required: !0,
|
|
@@ -1079,28 +1083,28 @@ const rt = (e = null) => ({
|
|
|
1079
1083
|
},
|
|
1080
1084
|
color: {
|
|
1081
1085
|
type: String,
|
|
1082
|
-
default:
|
|
1086
|
+
default: se.Skyblue
|
|
1083
1087
|
},
|
|
1084
1088
|
title: {
|
|
1085
1089
|
type: String,
|
|
1086
1090
|
default: null
|
|
1087
1091
|
}
|
|
1088
1092
|
});
|
|
1089
|
-
function
|
|
1093
|
+
function st(e, n, t, o, l) {
|
|
1090
1094
|
const u = Ge({
|
|
1091
1095
|
width: 0,
|
|
1092
1096
|
height: 0
|
|
1093
|
-
}),
|
|
1097
|
+
}), a = Mn(12), i = v(() => {
|
|
1094
1098
|
var p;
|
|
1095
|
-
return e.value.length > 5 &&
|
|
1096
|
-
(r,
|
|
1099
|
+
return e.value.length > 5 && _e(me.DatasetLength), (p = e.value) == null ? void 0 : p.map(
|
|
1100
|
+
(r, h) => {
|
|
1097
1101
|
if (jo(r))
|
|
1098
1102
|
return r;
|
|
1099
1103
|
const g = Go(r.values), m = Co(
|
|
1100
1104
|
r.color,
|
|
1101
1105
|
t == null ? void 0 : t.value,
|
|
1102
1106
|
o == null ? void 0 : o.value.colorPalette,
|
|
1103
|
-
|
|
1107
|
+
h
|
|
1104
1108
|
);
|
|
1105
1109
|
return {
|
|
1106
1110
|
...r,
|
|
@@ -1112,11 +1116,11 @@ function it(e, n, t, o, a) {
|
|
|
1112
1116
|
);
|
|
1113
1117
|
}), s = v(() => Array.isArray(n.value) ? n.value : Ue(e.value).map((p, r) => r));
|
|
1114
1118
|
function c(p) {
|
|
1115
|
-
const r = (
|
|
1119
|
+
const r = (l == null ? void 0 : l.value) === D.HORIZONTAL && Ue(e).length * (((o == null ? void 0 : o.value.barHeight) || kt) * 2) + ((o == null ? void 0 : o.value.barHeight) || kt) || p.height;
|
|
1116
1120
|
u.width = p.width, u.height = r;
|
|
1117
1121
|
}
|
|
1118
1122
|
return {
|
|
1119
|
-
chartID:
|
|
1123
|
+
chartID: a,
|
|
1120
1124
|
computedLabels: s,
|
|
1121
1125
|
containerSize: u,
|
|
1122
1126
|
internalData: i,
|
|
@@ -1133,67 +1137,67 @@ const Vo = () => ({
|
|
|
1133
1137
|
default: null
|
|
1134
1138
|
}
|
|
1135
1139
|
});
|
|
1136
|
-
function Po(e, n, t, o,
|
|
1137
|
-
const u =
|
|
1140
|
+
function Po(e, n, t, o, l) {
|
|
1141
|
+
const u = B(null), a = B(null);
|
|
1138
1142
|
function i() {
|
|
1139
1143
|
const { width: s, height: c } = t;
|
|
1140
|
-
!s && !c || !n.value || !e.value || (o.value ===
|
|
1144
|
+
!s && !c || !n.value || !e.value || (o.value === D.HORIZONTAL ? (u.value = xt(
|
|
1141
1145
|
e.value,
|
|
1142
1146
|
s,
|
|
1143
1147
|
o.value,
|
|
1144
|
-
|
|
1145
|
-
),
|
|
1148
|
+
l.value.startOnZero
|
|
1149
|
+
), a.value = Ot(
|
|
1146
1150
|
n.value,
|
|
1147
1151
|
c,
|
|
1148
1152
|
o.value,
|
|
1149
|
-
|
|
1150
|
-
)) : (u.value =
|
|
1153
|
+
l.value
|
|
1154
|
+
)) : (u.value = Ot(
|
|
1151
1155
|
n.value,
|
|
1152
1156
|
s,
|
|
1153
1157
|
o.value,
|
|
1154
|
-
|
|
1155
|
-
),
|
|
1158
|
+
l.value
|
|
1159
|
+
), a.value = xt(
|
|
1156
1160
|
e.value,
|
|
1157
1161
|
c,
|
|
1158
1162
|
o.value,
|
|
1159
|
-
|
|
1163
|
+
l.value.startOnZero
|
|
1160
1164
|
)));
|
|
1161
1165
|
}
|
|
1162
|
-
return
|
|
1166
|
+
return Ct(i), { xScale: u, yScale: a };
|
|
1163
1167
|
}
|
|
1164
|
-
function
|
|
1165
|
-
const
|
|
1168
|
+
function Ot(e, n, t, o) {
|
|
1169
|
+
const l = [0, n], { padding: u, paddingInner: a, paddingOuter: i } = o, s = u ?? (t === D.HORIZONTAL ? Wt : zt);
|
|
1166
1170
|
return Object.assign(
|
|
1167
|
-
Ee().range(
|
|
1171
|
+
Ee().range(l).paddingInner(a ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1168
1172
|
{ labels: e }
|
|
1169
1173
|
);
|
|
1170
1174
|
}
|
|
1171
|
-
function
|
|
1172
|
-
const
|
|
1173
|
-
if (
|
|
1175
|
+
function xt(e, n, t, o) {
|
|
1176
|
+
const l = jt(e).filter((p) => p != null), u = [0, n];
|
|
1177
|
+
if (l.length === 0)
|
|
1174
1178
|
return Ne().range(u).domain([0, 0]).nice();
|
|
1175
|
-
const
|
|
1179
|
+
const a = Math.min(...l), i = o && a > 0 ? 0 : a, s = Math.max(...l), c = t === D.HORIZONTAL ? [i, s] : [s, i];
|
|
1176
1180
|
return Ne().range(u).domain(c).nice();
|
|
1177
1181
|
}
|
|
1178
|
-
function
|
|
1182
|
+
function $t(e) {
|
|
1179
1183
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1180
1184
|
}
|
|
1181
1185
|
function Ye(e, n) {
|
|
1182
|
-
return
|
|
1186
|
+
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1183
1187
|
}
|
|
1184
|
-
function
|
|
1188
|
+
function It(e, n, {
|
|
1185
1189
|
padding: t,
|
|
1186
1190
|
paddingInner: o,
|
|
1187
|
-
paddingOuter:
|
|
1191
|
+
paddingOuter: l
|
|
1188
1192
|
} = {}) {
|
|
1189
|
-
const u = t ?? (n ===
|
|
1190
|
-
return e.copy().paddingInner(o ?? u).paddingOuter(
|
|
1193
|
+
const u = t ?? (n === D.HORIZONTAL ? Wt : zt);
|
|
1194
|
+
return e.copy().paddingInner(o ?? u).paddingOuter(l ?? u);
|
|
1191
1195
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return Object.values(
|
|
1196
|
+
function Kt(e) {
|
|
1197
|
+
return Object.values(D).includes(e);
|
|
1194
1198
|
}
|
|
1195
1199
|
const Ie = (e, n = !0) => ({
|
|
1196
|
-
...
|
|
1200
|
+
...it(e),
|
|
1197
1201
|
...Vo(),
|
|
1198
1202
|
...He(),
|
|
1199
1203
|
classList: {
|
|
@@ -1207,12 +1211,12 @@ const Ie = (e, n = !0) => ({
|
|
|
1207
1211
|
...n ? {
|
|
1208
1212
|
orientation: {
|
|
1209
1213
|
type: String,
|
|
1210
|
-
default:
|
|
1211
|
-
validator:
|
|
1214
|
+
default: D.VERTICAL,
|
|
1215
|
+
validator: Kt
|
|
1212
1216
|
}
|
|
1213
1217
|
} : {}
|
|
1214
1218
|
}), Fo = (e) => ({
|
|
1215
|
-
...
|
|
1219
|
+
...it(e),
|
|
1216
1220
|
...He(),
|
|
1217
1221
|
hoveredElement: {
|
|
1218
1222
|
type: [Number, String],
|
|
@@ -1233,8 +1237,8 @@ const Ie = (e, n = !0) => ({
|
|
|
1233
1237
|
},
|
|
1234
1238
|
orientation: {
|
|
1235
1239
|
type: String,
|
|
1236
|
-
default:
|
|
1237
|
-
validator:
|
|
1240
|
+
default: D.VERTICAL,
|
|
1241
|
+
validator: Kt
|
|
1238
1242
|
},
|
|
1239
1243
|
xScale: {
|
|
1240
1244
|
type: Function,
|
|
@@ -1266,27 +1270,27 @@ const Ie = (e, n = !0) => ({
|
|
|
1266
1270
|
...Ve(),
|
|
1267
1271
|
orientation: {
|
|
1268
1272
|
type: String,
|
|
1269
|
-
default:
|
|
1273
|
+
default: D.VERTICAL
|
|
1270
1274
|
}
|
|
1271
1275
|
},
|
|
1272
1276
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1273
1277
|
setup(e, { emit: n }) {
|
|
1274
|
-
const t = e, o = n, { data:
|
|
1278
|
+
const t = e, o = n, { data: l, orientation: u, xScale: a, yScale: i } = ne(t), s = v(() => Ue(l));
|
|
1275
1279
|
function c(p) {
|
|
1276
|
-
var
|
|
1277
|
-
const r = u.value ===
|
|
1278
|
-
return u.value ===
|
|
1279
|
-
width: Math.max(...
|
|
1280
|
+
var T;
|
|
1281
|
+
const r = u.value === D.HORIZONTAL ? i.value : a.value, h = r.domain(), g = $n(r), m = ((T = r.paddingInner) == null ? void 0 : T.call(r)) ?? 0, A = g * m, x = ve(r) ? r(h[p]) - A / 2 : r(p) - g / 2;
|
|
1282
|
+
return u.value === D.HORIZONTAL ? {
|
|
1283
|
+
width: Math.max(...a.value.range()),
|
|
1280
1284
|
height: g,
|
|
1281
|
-
transform: `translate(0, ${
|
|
1285
|
+
transform: `translate(0, ${x})`
|
|
1282
1286
|
} : {
|
|
1283
1287
|
width: g,
|
|
1284
1288
|
height: Math.max(...i.value.range()),
|
|
1285
|
-
transform: `translate(${
|
|
1289
|
+
transform: `translate(${x}, 0)`
|
|
1286
1290
|
};
|
|
1287
1291
|
}
|
|
1288
|
-
return (p, r) => (_(),
|
|
1289
|
-
(_(!0),
|
|
1292
|
+
return (p, r) => (_(), $("g", zo, [
|
|
1293
|
+
(_(!0), $(ee, null, W(s.value, (h, g) => (_(), K(d(rt), j(c(g), {
|
|
1290
1294
|
key: `overlay-${g}`,
|
|
1291
1295
|
"data-j-lume-overlay-group": g,
|
|
1292
1296
|
transition: !1,
|
|
@@ -1296,62 +1300,60 @@ const Ie = (e, n = !0) => ({
|
|
|
1296
1300
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1297
1301
|
]));
|
|
1298
1302
|
}
|
|
1299
|
-
}),
|
|
1300
|
-
function t(u, ...
|
|
1303
|
+
}), ke = (e, n) => {
|
|
1304
|
+
function t(u, ...a) {
|
|
1301
1305
|
}
|
|
1302
|
-
function o(u,
|
|
1306
|
+
function o(u, a) {
|
|
1303
1307
|
}
|
|
1304
1308
|
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1305
1309
|
};
|
|
1306
1310
|
function Zo(e) {
|
|
1307
1311
|
return { hasNegativeValues: v(
|
|
1308
|
-
() =>
|
|
1312
|
+
() => jt(e.value).some((t) => t < 0)
|
|
1309
1313
|
) };
|
|
1310
1314
|
}
|
|
1311
1315
|
function Uo(e, n, t, o) {
|
|
1312
|
-
const
|
|
1313
|
-
() => o.value ===
|
|
1316
|
+
const l = v(
|
|
1317
|
+
() => o.value === D.HORIZONTAL
|
|
1314
1318
|
), u = v(
|
|
1315
1319
|
() => {
|
|
1316
1320
|
var c;
|
|
1317
|
-
return e.height - (
|
|
1321
|
+
return e.height - (l != null && l.value ? 0 : ((c = t.value) == null ? void 0 : c.call(t, 0)) || 0);
|
|
1318
1322
|
}
|
|
1319
|
-
),
|
|
1323
|
+
), a = v(
|
|
1320
1324
|
() => {
|
|
1321
1325
|
var c;
|
|
1322
|
-
return
|
|
1326
|
+
return l != null && l.value ? ((c = n.value) == null ? void 0 : c.call(n, 0)) || 0 : e.width;
|
|
1323
1327
|
}
|
|
1324
1328
|
), i = v(
|
|
1325
1329
|
() => {
|
|
1326
1330
|
var c;
|
|
1327
|
-
return
|
|
1331
|
+
return l != null && l.value ? "translate(0, 0)" : `translate(0, ${((c = t.value) == null ? void 0 : c.call(t, 0)) || 0})`;
|
|
1328
1332
|
}
|
|
1329
1333
|
);
|
|
1330
1334
|
return { negativeBarAttributes: v(() => ({
|
|
1331
|
-
width:
|
|
1335
|
+
width: a.value,
|
|
1332
1336
|
height: u.value,
|
|
1333
1337
|
transform: i.value
|
|
1334
1338
|
})) };
|
|
1335
1339
|
}
|
|
1336
|
-
function Kt(e, n) {
|
|
1337
|
-
const t = n - e.length;
|
|
1338
|
-
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
1339
|
-
}
|
|
1340
1340
|
function Xo(e, n) {
|
|
1341
|
-
return e.reduce((t, o) =>
|
|
1341
|
+
return e.reduce((t, o) => ot(o.values, n).map(
|
|
1342
|
+
(l, u) => t[u] ? l.value > t[u] ? l.value : t[u] : l.value ?? 0
|
|
1343
|
+
), []);
|
|
1342
1344
|
}
|
|
1343
1345
|
function Yo(e, n) {
|
|
1344
|
-
return e.reduce((t, o) =>
|
|
1345
|
-
(
|
|
1346
|
-
const
|
|
1347
|
-
return t[u] ? t[u] +
|
|
1346
|
+
return e.reduce((t, o) => ot(o.values, n).map(
|
|
1347
|
+
(l, u) => {
|
|
1348
|
+
const a = l.value == null || l.value < 0 ? 0 : l.value;
|
|
1349
|
+
return t[u] ? t[u] + a : a;
|
|
1348
1350
|
}
|
|
1349
1351
|
), []);
|
|
1350
1352
|
}
|
|
1351
|
-
const
|
|
1353
|
+
const wt = {
|
|
1352
1354
|
"stacked-bar": Yo
|
|
1353
1355
|
};
|
|
1354
|
-
function Jt(e, n, t, o,
|
|
1356
|
+
function Jt(e, n, t, o, l, u, a, i) {
|
|
1355
1357
|
const s = v(
|
|
1356
1358
|
() => {
|
|
1357
1359
|
var p;
|
|
@@ -1360,19 +1362,19 @@ function Jt(e, n, t, o, a, u, l, i) {
|
|
|
1360
1362
|
);
|
|
1361
1363
|
function c(p) {
|
|
1362
1364
|
var g;
|
|
1363
|
-
const r = ((g =
|
|
1365
|
+
const r = ((g = l == null ? void 0 : l.value) == null ? void 0 : g.length) ?? 0, h = i != null && i.value && wt[i.value] ? wt[i.value](
|
|
1364
1366
|
p,
|
|
1365
1367
|
r
|
|
1366
1368
|
) : Xo(p, r);
|
|
1367
|
-
e.value =
|
|
1368
|
-
cx: (
|
|
1369
|
-
cy: (
|
|
1369
|
+
e.value = h.map((m, A) => ({
|
|
1370
|
+
cx: (u == null ? void 0 : u.value) === D.HORIZONTAL ? t.value(m) : Ye(t.value, A),
|
|
1371
|
+
cy: (u == null ? void 0 : u.value) === D.HORIZONTAL ? Ye(o.value, A) : o.value(m)
|
|
1370
1372
|
}));
|
|
1371
1373
|
}
|
|
1372
1374
|
return Y(
|
|
1373
1375
|
[t, o],
|
|
1374
1376
|
() => {
|
|
1375
|
-
t.value && o.value && (
|
|
1377
|
+
t.value && o.value && (a != null && a.value) && s.value && c(a.value);
|
|
1376
1378
|
},
|
|
1377
1379
|
{ immediate: !0 }
|
|
1378
1380
|
), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: c };
|
|
@@ -1390,17 +1392,17 @@ function Ko() {
|
|
|
1390
1392
|
}
|
|
1391
1393
|
function Jo(e) {
|
|
1392
1394
|
return { getTooltipItems: v(
|
|
1393
|
-
() => (t) => e.value.map(({ color: o, label:
|
|
1394
|
-
var
|
|
1395
|
+
() => (t) => e.value.map(({ color: o, label: l, values: u }) => {
|
|
1396
|
+
var a, i, s;
|
|
1395
1397
|
return {
|
|
1396
|
-
color: ((
|
|
1397
|
-
label:
|
|
1398
|
-
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((s = u[t]) == null ? void 0 : s.value) ??
|
|
1398
|
+
color: ((a = u[t]) == null ? void 0 : a.color) || o,
|
|
1399
|
+
label: l,
|
|
1400
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((s = u[t]) == null ? void 0 : s.value) ?? Ft
|
|
1399
1401
|
};
|
|
1400
1402
|
})
|
|
1401
1403
|
) };
|
|
1402
1404
|
}
|
|
1403
|
-
const Ke = 16, Je = 8, Qe = 28, qe = 24,
|
|
1405
|
+
const Ke = 16, Je = 8, Qe = 28, qe = 24, Le = {
|
|
1404
1406
|
VERTICAL: {
|
|
1405
1407
|
top: Ke,
|
|
1406
1408
|
right: Je,
|
|
@@ -1445,207 +1447,207 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1445
1447
|
}
|
|
1446
1448
|
},
|
|
1447
1449
|
setup(e, { emit: n }) {
|
|
1448
|
-
const t = e, o =
|
|
1449
|
-
|
|
1450
|
-
w,
|
|
1450
|
+
const t = e, o = re(), l = n, { data: u, labels: a, color: i, options: s, orientation: c, chartType: p } = ne(t), r = B(-1), h = B(null), g = B(null), m = B([]), A = B(null), x = B(0), T = B(0), { allOptions: f } = pe(s), { internalData: O, computedLabels: N, containerSize: E, updateSize: F, chartID: w } = st(u, a, i, f, c), { xScale: C, yScale: J } = Po(
|
|
1451
|
+
O,
|
|
1451
1452
|
N,
|
|
1453
|
+
E,
|
|
1452
1454
|
c,
|
|
1453
|
-
|
|
1454
|
-
),
|
|
1455
|
-
top: Qo(
|
|
1456
|
-
right: qo(
|
|
1457
|
-
bottom: ea(
|
|
1458
|
-
left: ta(
|
|
1459
|
-
})),
|
|
1455
|
+
f
|
|
1456
|
+
), U = v(() => ({
|
|
1457
|
+
top: Qo(f.value.margins),
|
|
1458
|
+
right: qo(f.value.margins),
|
|
1459
|
+
bottom: ea(f.value.margins, x.value),
|
|
1460
|
+
left: ta(f.value.margins, T.value)
|
|
1461
|
+
})), q = v(() => {
|
|
1460
1462
|
var L;
|
|
1461
|
-
return t.xScale ?
|
|
1462
|
-
}),
|
|
1463
|
+
return t.xScale ? $t(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, O.value, a.value, E) : C.value;
|
|
1464
|
+
}), P = v(() => {
|
|
1463
1465
|
var L;
|
|
1464
|
-
return t.yScale ?
|
|
1465
|
-
}),
|
|
1466
|
-
...
|
|
1467
|
-
withHover: c.value ===
|
|
1466
|
+
return t.yScale ? $t(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, O.value, a.value, E) : J.value;
|
|
1467
|
+
}), ue = v(() => ({
|
|
1468
|
+
...f.value.xAxisOptions,
|
|
1469
|
+
withHover: c.value === D.VERTICAL
|
|
1468
1470
|
})), xe = v(() => ({
|
|
1469
|
-
...
|
|
1470
|
-
withHover: c.value ===
|
|
1471
|
-
})),
|
|
1471
|
+
...f.value.yAxisOptions,
|
|
1472
|
+
withHover: c.value === D.HORIZONTAL
|
|
1473
|
+
})), be = v(() => {
|
|
1472
1474
|
var L;
|
|
1473
|
-
return (L =
|
|
1474
|
-
}),
|
|
1475
|
+
return (L = f.value.xAxisOptions) == null ? void 0 : L.title;
|
|
1476
|
+
}), R = v(() => {
|
|
1475
1477
|
var L;
|
|
1476
|
-
return (L =
|
|
1477
|
-
}),
|
|
1478
|
+
return (L = f.value.yAxisOptions) == null ? void 0 : L.title;
|
|
1479
|
+
}), H = v(() => {
|
|
1478
1480
|
var L;
|
|
1479
|
-
return ((L =
|
|
1481
|
+
return ((L = f.value.xAxisOptions) == null ? void 0 : L.withTitle) !== !1 && be.value;
|
|
1480
1482
|
}), k = v(() => {
|
|
1481
1483
|
var L;
|
|
1482
|
-
return ((L =
|
|
1483
|
-
}),
|
|
1484
|
+
return ((L = f.value.yAxisOptions) == null ? void 0 : L.withTitle) !== !1 && R.value;
|
|
1485
|
+
}), M = v(
|
|
1484
1486
|
() => u.value.every((L) => !L.values.length)
|
|
1485
1487
|
), y = v(() => {
|
|
1486
|
-
const L = [], { noBaseScales:
|
|
1487
|
-
return
|
|
1488
|
-
}), { hasNegativeValues: X } = Zo(
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1488
|
+
const L = [], { noBaseScales: b } = f.value;
|
|
1489
|
+
return b || L.push(() => !!(q.value && P.value)), L.every((I) => I() === !0);
|
|
1490
|
+
}), { hasNegativeValues: X } = Zo(O), { negativeBarAttributes: Q } = Uo(
|
|
1491
|
+
E,
|
|
1492
|
+
q,
|
|
1493
|
+
P,
|
|
1492
1494
|
c
|
|
1493
|
-
), { shouldGenerateTooltipAnchors:
|
|
1495
|
+
), { shouldGenerateTooltipAnchors: ce } = Jt(
|
|
1494
1496
|
m,
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1497
|
+
f,
|
|
1498
|
+
q,
|
|
1499
|
+
P,
|
|
1500
|
+
a,
|
|
1498
1501
|
c,
|
|
1499
|
-
|
|
1500
|
-
p
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
), vt = v(
|
|
1502
|
+
O,
|
|
1503
|
+
p
|
|
1504
|
+
), { tooltipConfig: Ae, showTooltip: dt, hideTooltip: Re } = Ko(), { getTooltipItems: vt } = Jo(O), an = v(
|
|
1505
|
+
() => f.value.withTooltip !== !1 && Ae.opened
|
|
1506
|
+
), mt = v(
|
|
1505
1507
|
() => {
|
|
1506
1508
|
var L;
|
|
1507
|
-
return ((L =
|
|
1509
|
+
return ((L = f.value.tooltipOptions) == null ? void 0 : L.position) || "top";
|
|
1508
1510
|
}
|
|
1509
1511
|
), ln = v(() => {
|
|
1510
|
-
var
|
|
1511
|
-
const L = (
|
|
1512
|
-
return
|
|
1512
|
+
var b;
|
|
1513
|
+
const L = (b = f.value.tooltipOptions) == null ? void 0 : b.withPointerEvents;
|
|
1514
|
+
return Ae.opened && (!L || L && A.value === !1);
|
|
1513
1515
|
});
|
|
1514
1516
|
function Se(L) {
|
|
1515
1517
|
var I;
|
|
1516
1518
|
if (L === r.value)
|
|
1517
1519
|
return;
|
|
1518
|
-
const
|
|
1519
|
-
if (
|
|
1520
|
-
const Pe = (I =
|
|
1521
|
-
|
|
1520
|
+
const b = r.value;
|
|
1521
|
+
if (f.value.withHover !== !1 && (r.value = L), f.value.withTooltip !== !1) {
|
|
1522
|
+
const Pe = (I = f.value.tooltipOptions) != null && I.targetElement ? f.value.tooltipOptions.targetElement === "self" ? g.value.$el : f.value.tooltipOptions.targetElement : h.value[L];
|
|
1523
|
+
dt(Pe);
|
|
1522
1524
|
}
|
|
1523
|
-
|
|
1525
|
+
l("hovered-index-changed", { newIndex: L, oldIndex: b });
|
|
1524
1526
|
}
|
|
1525
|
-
function
|
|
1527
|
+
function pt() {
|
|
1526
1528
|
Re(), r.value = -1;
|
|
1527
1529
|
}
|
|
1528
|
-
function
|
|
1530
|
+
function ft(L) {
|
|
1529
1531
|
if (!u.value.some(
|
|
1530
1532
|
({ values: I }) => L <= I.length - 1
|
|
1531
1533
|
)) {
|
|
1532
|
-
|
|
1534
|
+
_e(me.InvalidHoveredIndex);
|
|
1533
1535
|
return;
|
|
1534
1536
|
}
|
|
1535
1537
|
Se(L);
|
|
1536
1538
|
}
|
|
1537
1539
|
function un() {
|
|
1538
1540
|
setTimeout(() => {
|
|
1539
|
-
ln.value &&
|
|
1541
|
+
ln.value && pt(), l("chart-mouseleave");
|
|
1540
1542
|
}, 0);
|
|
1541
1543
|
}
|
|
1542
|
-
function
|
|
1543
|
-
L !== null && Se(L),
|
|
1544
|
+
function ht({ index: L, value: b, event: I }) {
|
|
1545
|
+
L !== null && Se(L), l("axis-mouseenter", { index: L, value: b, event: I });
|
|
1544
1546
|
}
|
|
1545
|
-
function
|
|
1546
|
-
|
|
1547
|
+
function gt({ index: L, value: b, event: I }) {
|
|
1548
|
+
l("axis-click", { index: L, value: b, event: I });
|
|
1547
1549
|
}
|
|
1548
1550
|
return Y(
|
|
1549
1551
|
u,
|
|
1550
|
-
(L,
|
|
1552
|
+
(L, b) => l("data-changed", { newValue: L, oldValue: b })
|
|
1551
1553
|
), Y(
|
|
1552
|
-
|
|
1553
|
-
(L,
|
|
1554
|
-
), Y(
|
|
1554
|
+
a,
|
|
1555
|
+
(L, b) => l("labels-changed", { newValue: L, oldValue: b })
|
|
1556
|
+
), Y(M, (L) => L && _e(me.Empty), { immediate: !0 }), Y(() => t.hoveredIndex, ft), Y(
|
|
1555
1557
|
m,
|
|
1556
1558
|
(L) => {
|
|
1557
|
-
L && t.hoveredIndex != null && r.value === -1 &&
|
|
1559
|
+
L && t.hoveredIndex != null && r.value === -1 && ft(t.hoveredIndex);
|
|
1558
1560
|
},
|
|
1559
1561
|
{ flush: "post" }
|
|
1560
|
-
), Y(
|
|
1561
|
-
L === !1 &&
|
|
1562
|
-
}),
|
|
1563
|
-
|
|
1564
|
-
}), Fe("chartID",
|
|
1565
|
-
id: `lume-chart_${d(
|
|
1562
|
+
), Y(A, (L) => {
|
|
1563
|
+
L === !1 && Ae.opened && pt();
|
|
1564
|
+
}), ye(async () => {
|
|
1565
|
+
l("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1566
|
+
}), Fe("chartID", w), Fe("isEmpty", M), Fe("tooltipAnchorAttributes", m), (L, b) => (_(), K(d(uo), {
|
|
1567
|
+
id: `lume-chart_${d(w)}`,
|
|
1566
1568
|
ref_key: "chartContainer",
|
|
1567
1569
|
ref: g,
|
|
1568
|
-
margins:
|
|
1569
|
-
"container-size": d(
|
|
1570
|
-
"no-min-size": d(
|
|
1571
|
-
"transparent-background": d(
|
|
1570
|
+
margins: U.value,
|
|
1571
|
+
"container-size": d(E),
|
|
1572
|
+
"no-min-size": d(f).noMinSize,
|
|
1573
|
+
"transparent-background": d(f).transparentBackground,
|
|
1572
1574
|
"data-j-lume-chart": "",
|
|
1573
|
-
onResize: d(
|
|
1574
|
-
onClick:
|
|
1575
|
-
onMouseenter:
|
|
1575
|
+
onResize: d(F),
|
|
1576
|
+
onClick: b[24] || (b[24] = (I) => l("chart-click", I)),
|
|
1577
|
+
onMouseenter: b[25] || (b[25] = (I) => l("chart-mouseenter", I)),
|
|
1576
1578
|
onMouseleave: un
|
|
1577
1579
|
}, {
|
|
1578
|
-
header:
|
|
1580
|
+
header: V(() => [
|
|
1579
1581
|
G("div", na, [
|
|
1580
1582
|
G("div", oa, [
|
|
1581
|
-
L.title ? (_(),
|
|
1583
|
+
L.title ? (_(), $("h1", aa, ae(L.title), 1)) : z("", !0),
|
|
1582
1584
|
G("div", la, [
|
|
1583
|
-
|
|
1585
|
+
S(L.$slots, "controls", {}, void 0, !0)
|
|
1584
1586
|
])
|
|
1585
1587
|
]),
|
|
1586
1588
|
G("div", ua, [
|
|
1587
|
-
k.value ? (_(),
|
|
1588
|
-
|
|
1589
|
-
d(
|
|
1589
|
+
k.value ? (_(), $("h3", ra, ae(R.value), 1)) : z("", !0),
|
|
1590
|
+
S(L.$slots, "legend", { data: d(O) }, () => [
|
|
1591
|
+
d(f).withLegend !== !1 && d(f).legendPosition !== "bottom" ? (_(), K(d(At), {
|
|
1590
1592
|
key: 0,
|
|
1591
|
-
data: d(
|
|
1593
|
+
data: d(O),
|
|
1592
1594
|
class: "lume-chart__legend",
|
|
1593
1595
|
"data-j-lume-chart__legend": "",
|
|
1594
|
-
onClick:
|
|
1595
|
-
onMouseenter:
|
|
1596
|
-
onMouseleave:
|
|
1596
|
+
onClick: b[0] || (b[0] = (I) => l("legend-click", I)),
|
|
1597
|
+
onMouseenter: b[1] || (b[1] = (I) => l("legend-mouseenter", I)),
|
|
1598
|
+
onMouseleave: b[2] || (b[2] = (I) => l("legend-mouseleave"))
|
|
1597
1599
|
}, null, 8, ["data"])) : z("", !0)
|
|
1598
1600
|
], !0)
|
|
1599
1601
|
])
|
|
1600
1602
|
])
|
|
1601
1603
|
]),
|
|
1602
|
-
footer:
|
|
1603
|
-
|
|
1604
|
-
d(
|
|
1604
|
+
footer: V(() => [
|
|
1605
|
+
H.value ? (_(), $("h3", ca, ae(be.value), 1)) : z("", !0),
|
|
1606
|
+
d(f).withLegend !== !1 && d(f).legendPosition == "bottom" ? (_(), K(d(At), {
|
|
1605
1607
|
key: 1,
|
|
1606
|
-
data: d(
|
|
1608
|
+
data: d(O),
|
|
1607
1609
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1608
1610
|
"data-j-lume-chart__legend": "",
|
|
1609
|
-
onClick:
|
|
1610
|
-
onMouseenter:
|
|
1611
|
-
onMouseleave:
|
|
1611
|
+
onClick: b[16] || (b[16] = (I) => l("legend-click", I)),
|
|
1612
|
+
onMouseenter: b[17] || (b[17] = (I) => l("legend-mouseenter", I)),
|
|
1613
|
+
onMouseleave: b[18] || (b[18] = (I) => l("legend-mouseleave"))
|
|
1612
1614
|
}, null, 8, ["data"])) : z("", !0)
|
|
1613
1615
|
]),
|
|
1614
|
-
extra:
|
|
1615
|
-
|
|
1616
|
-
data: d(
|
|
1617
|
-
labels: d(
|
|
1618
|
-
title: d(
|
|
1619
|
-
items: d(
|
|
1620
|
-
position:
|
|
1621
|
-
withTooltip: d(
|
|
1616
|
+
extra: V(() => [
|
|
1617
|
+
S(L.$slots, "tooltip", j(d(Ae), {
|
|
1618
|
+
data: d(O),
|
|
1619
|
+
labels: d(N),
|
|
1620
|
+
title: d(N)[r.value],
|
|
1621
|
+
items: d(vt)(r.value),
|
|
1622
|
+
position: mt.value,
|
|
1623
|
+
withTooltip: d(f).withTooltip !== !1,
|
|
1622
1624
|
hoveredIndex: r.value,
|
|
1623
|
-
handleMouseEnter: () =>
|
|
1624
|
-
handleMouseLeave: () =>
|
|
1625
|
-
options: d(
|
|
1625
|
+
handleMouseEnter: () => A.value = !0,
|
|
1626
|
+
handleMouseLeave: () => A.value = !1,
|
|
1627
|
+
options: d(f).tooltipOptions
|
|
1626
1628
|
}), () => [
|
|
1627
|
-
an.value ? (_(), K(d(Eo), j({ key: 0 }, d(
|
|
1628
|
-
position:
|
|
1629
|
-
title: d(
|
|
1630
|
-
items: d(
|
|
1631
|
-
options: d(
|
|
1629
|
+
an.value ? (_(), K(d(Eo), j({ key: 0 }, d(Ae), {
|
|
1630
|
+
position: mt.value,
|
|
1631
|
+
title: d(N)[r.value],
|
|
1632
|
+
items: d(vt)(r.value),
|
|
1633
|
+
options: d(f).tooltipOptions,
|
|
1632
1634
|
"data-j-lume-chart__tooltip": "",
|
|
1633
|
-
onOpened:
|
|
1635
|
+
onOpened: b[19] || (b[19] = (I) => l("tooltip-opened", {
|
|
1634
1636
|
index: r.value,
|
|
1635
1637
|
targetElement: I
|
|
1636
1638
|
})),
|
|
1637
|
-
onMoved:
|
|
1639
|
+
onMoved: b[20] || (b[20] = (I) => l("tooltip-moved", {
|
|
1638
1640
|
index: r.value,
|
|
1639
1641
|
targetElement: I
|
|
1640
1642
|
})),
|
|
1641
|
-
onClosed:
|
|
1642
|
-
onTooltipMouseenter:
|
|
1643
|
-
onTooltipMouseleave:
|
|
1643
|
+
onClosed: b[21] || (b[21] = (I) => l("tooltip-closed")),
|
|
1644
|
+
onTooltipMouseenter: b[22] || (b[22] = (I) => A.value = !0),
|
|
1645
|
+
onTooltipMouseleave: b[23] || (b[23] = (I) => A.value = !1)
|
|
1644
1646
|
}), {
|
|
1645
|
-
default:
|
|
1646
|
-
|
|
1647
|
-
data: d(
|
|
1648
|
-
labels: d(
|
|
1647
|
+
default: V(() => [
|
|
1648
|
+
S(L.$slots, "tooltip-content", {
|
|
1649
|
+
data: d(O),
|
|
1650
|
+
labels: d(N),
|
|
1649
1651
|
hoveredIndex: r.value
|
|
1650
1652
|
}, void 0, !0)
|
|
1651
1653
|
]),
|
|
@@ -1653,87 +1655,87 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1653
1655
|
}, 16, ["position", "title", "items", "options"])) : z("", !0)
|
|
1654
1656
|
], !0)
|
|
1655
1657
|
]),
|
|
1656
|
-
default:
|
|
1657
|
-
y.value ? (_(),
|
|
1658
|
-
d(X) ? (_(), K(d(
|
|
1658
|
+
default: V(() => [
|
|
1659
|
+
y.value ? (_(), $(ee, { key: 0 }, [
|
|
1660
|
+
d(X) ? (_(), K(d(rt), j({ key: 0 }, d(Q), {
|
|
1659
1661
|
"class-list": "lume-fill--negative",
|
|
1660
1662
|
transition: !1,
|
|
1661
1663
|
"data-j-lume-chart__negative-values": ""
|
|
1662
1664
|
}), null, 16)) : z("", !0),
|
|
1663
|
-
d(
|
|
1665
|
+
d(f).withAxes !== !1 ? S(L.$slots, "axes", {
|
|
1664
1666
|
key: 1,
|
|
1665
|
-
xScale:
|
|
1666
|
-
yScale:
|
|
1667
|
-
containerSize: d(
|
|
1668
|
-
options: d(
|
|
1667
|
+
xScale: q.value,
|
|
1668
|
+
yScale: P.value,
|
|
1669
|
+
containerSize: d(E),
|
|
1670
|
+
options: d(f),
|
|
1669
1671
|
hoveredIndex: r.value
|
|
1670
1672
|
}, () => [
|
|
1671
|
-
|
|
1673
|
+
ie(d(bt), {
|
|
1672
1674
|
type: "x",
|
|
1673
|
-
scale:
|
|
1674
|
-
"container-size": d(
|
|
1675
|
-
options:
|
|
1675
|
+
scale: q.value,
|
|
1676
|
+
"container-size": d(E),
|
|
1677
|
+
options: ue.value,
|
|
1676
1678
|
"hovered-index": r.value,
|
|
1677
1679
|
orientation: d(c),
|
|
1678
1680
|
"data-j-lume-chart__x-axis": "",
|
|
1679
|
-
onClick:
|
|
1680
|
-
onMouseenter:
|
|
1681
|
-
onMouseleave:
|
|
1682
|
-
"onLume__internal-AxisSize":
|
|
1681
|
+
onClick: gt,
|
|
1682
|
+
onMouseenter: ht,
|
|
1683
|
+
onMouseleave: b[3] || (b[3] = (I) => l("axis-mouseleave")),
|
|
1684
|
+
"onLume__internal-AxisSize": b[4] || (b[4] = (I) => x.value = I)
|
|
1683
1685
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1684
|
-
|
|
1686
|
+
ie(d(bt), {
|
|
1685
1687
|
type: "y",
|
|
1686
|
-
scale:
|
|
1687
|
-
"container-size": d(
|
|
1688
|
+
scale: P.value,
|
|
1689
|
+
"container-size": d(E),
|
|
1688
1690
|
options: xe.value,
|
|
1689
1691
|
"hovered-index": r.value,
|
|
1690
1692
|
orientation: d(c),
|
|
1691
1693
|
"data-j-lume-chart__y-axis": "",
|
|
1692
|
-
onClick:
|
|
1693
|
-
onMouseenter:
|
|
1694
|
-
onMouseleave:
|
|
1695
|
-
"onLume__internal-AxisSize":
|
|
1694
|
+
onClick: gt,
|
|
1695
|
+
onMouseenter: ht,
|
|
1696
|
+
onMouseleave: b[5] || (b[5] = (I) => l("axis-mouseleave")),
|
|
1697
|
+
"onLume__internal-AxisSize": b[6] || (b[6] = (I) => T.value = I)
|
|
1696
1698
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1697
1699
|
], !0) : z("", !0),
|
|
1698
|
-
d(
|
|
1700
|
+
d(f).withHover !== !1 ? (_(), K(d(Wo), {
|
|
1699
1701
|
key: 2,
|
|
1700
|
-
data: d(
|
|
1702
|
+
data: d(O),
|
|
1701
1703
|
orientation: d(c),
|
|
1702
|
-
"x-scale":
|
|
1703
|
-
"y-scale":
|
|
1704
|
+
"x-scale": q.value,
|
|
1705
|
+
"y-scale": P.value,
|
|
1704
1706
|
"data-j-lume-chart__overlay-group": "",
|
|
1705
1707
|
"onLume__internal-Hover": Se
|
|
1706
1708
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1707
|
-
d(
|
|
1708
|
-
(_(!0),
|
|
1709
|
+
d(ce) ? (_(), $("g", ia, [
|
|
1710
|
+
(_(!0), $(ee, null, W(m.value, (I, Pe) => (_(), $("circle", j(I, {
|
|
1709
1711
|
ref_for: !0,
|
|
1710
1712
|
ref_key: "tooltipAnchor",
|
|
1711
|
-
ref:
|
|
1713
|
+
ref: h,
|
|
1712
1714
|
key: `anchor_${Pe}`,
|
|
1713
1715
|
r: d(Gn),
|
|
1714
1716
|
class: "lume-fill--transparent"
|
|
1715
1717
|
}), null, 16, sa))), 128))
|
|
1716
1718
|
])) : z("", !0),
|
|
1717
|
-
|
|
1718
|
-
data: d(
|
|
1719
|
-
labels: d(
|
|
1720
|
-
options: d(
|
|
1719
|
+
S(L.$slots, "groups", {
|
|
1720
|
+
data: d(O),
|
|
1721
|
+
labels: d(N),
|
|
1722
|
+
options: d(f),
|
|
1721
1723
|
orientation: d(c),
|
|
1722
|
-
xScale:
|
|
1723
|
-
yScale:
|
|
1724
|
+
xScale: q.value,
|
|
1725
|
+
yScale: P.value,
|
|
1724
1726
|
hoveredIndex: r.value,
|
|
1725
|
-
containerSize: d(
|
|
1726
|
-
transition: d(
|
|
1727
|
+
containerSize: d(E),
|
|
1728
|
+
transition: d(f).withTransition !== !1,
|
|
1727
1729
|
classList: L.classList,
|
|
1728
|
-
onNodeClick:
|
|
1729
|
-
onNodeMouseenter:
|
|
1730
|
-
onNodeMouseleave:
|
|
1731
|
-
onLinkClick:
|
|
1732
|
-
onLinkMouseenter:
|
|
1733
|
-
onLinkMouseleave:
|
|
1734
|
-
onBarClick:
|
|
1735
|
-
onLineClick:
|
|
1736
|
-
onPointClick:
|
|
1730
|
+
onNodeClick: b[7] || (b[7] = (I) => l("node-click", I)),
|
|
1731
|
+
onNodeMouseenter: b[8] || (b[8] = (I) => l("node-mouseenter", I)),
|
|
1732
|
+
onNodeMouseleave: b[9] || (b[9] = (I) => l("node-mouseleave", I)),
|
|
1733
|
+
onLinkClick: b[10] || (b[10] = (I) => l("link-click", I)),
|
|
1734
|
+
onLinkMouseenter: b[11] || (b[11] = (I) => l("link-mouseenter", I)),
|
|
1735
|
+
onLinkMouseleave: b[12] || (b[12] = (I) => l("link-mouseleave", I)),
|
|
1736
|
+
onBarClick: b[13] || (b[13] = (I) => l("bar-click", I)),
|
|
1737
|
+
onLineClick: b[14] || (b[14] = (I) => l("line-click", I)),
|
|
1738
|
+
onPointClick: b[15] || (b[15] = (I) => l("point-click", I)),
|
|
1737
1739
|
"onLume__internal-Hover": Se
|
|
1738
1740
|
}, void 0, !0)
|
|
1739
1741
|
], 64)) : z("", !0)
|
|
@@ -1742,7 +1744,7 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1742
1744
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1743
1745
|
}
|
|
1744
1746
|
});
|
|
1745
|
-
const we = /* @__PURE__ */
|
|
1747
|
+
const we = /* @__PURE__ */ te(da, [["__scopeId", "data-v-15099487"]]), Et = 8, va = 8, ma = 20, We = 2, Nt = 2, pa = ["dy", "dominant-baseline"], fa = ["y", "x", "width", "height"], ha = { class: "lume-alluvial-group__label-wrapper" }, ga = /* @__PURE__ */ Z({
|
|
1746
1748
|
__name: "lume-alluvial-node-label",
|
|
1747
1749
|
props: {
|
|
1748
1750
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1751,63 +1753,63 @@ const we = /* @__PURE__ */ ee(da, [["__scopeId", "data-v-2d7c3049"]]), wt = 8, v
|
|
|
1751
1753
|
},
|
|
1752
1754
|
emits: ["lume__internal--node-resize"],
|
|
1753
1755
|
setup(e, { emit: n }) {
|
|
1754
|
-
const t = e, o = n,
|
|
1756
|
+
const t = e, o = n, l = B(null), u = B(t.maxWidth), a = B(1);
|
|
1755
1757
|
return Y(
|
|
1756
|
-
[
|
|
1758
|
+
[l, () => t.maxWidth],
|
|
1757
1759
|
async ([i, s]) => {
|
|
1758
1760
|
if (i && s) {
|
|
1759
|
-
u.value = s, await
|
|
1761
|
+
u.value = s, await _t();
|
|
1760
1762
|
const { width: c, height: p } = i.getBoundingClientRect();
|
|
1761
|
-
u.value = c +
|
|
1763
|
+
u.value = c + Nt > s ? s : c + Nt, a.value = Math.ceil(p);
|
|
1762
1764
|
}
|
|
1763
1765
|
},
|
|
1764
1766
|
{ immediate: !0 }
|
|
1765
1767
|
), Y(u, async (i) => {
|
|
1766
|
-
i !== t.maxWidth && (await
|
|
1767
|
-
}), (i, s) => e.maxWidth ? (_(),
|
|
1768
|
+
i !== t.maxWidth && (await _t(), o("lume__internal--node-resize"));
|
|
1769
|
+
}), (i, s) => e.maxWidth ? (_(), $("foreignObject", {
|
|
1768
1770
|
key: 1,
|
|
1769
1771
|
class: "lume-alluvial-group__node-foreign",
|
|
1770
|
-
y: e.bottom ? "0.1em" : -
|
|
1772
|
+
y: e.bottom ? "0.1em" : -a.value + 1,
|
|
1771
1773
|
x: e.left ? -u.value : 0,
|
|
1772
1774
|
width: u.value,
|
|
1773
|
-
height:
|
|
1775
|
+
height: a.value
|
|
1774
1776
|
}, [
|
|
1775
1777
|
G("div", ha, [
|
|
1776
1778
|
G("span", {
|
|
1777
1779
|
ref_key: "text",
|
|
1778
|
-
ref:
|
|
1780
|
+
ref: l,
|
|
1779
1781
|
class: "lume-alluvial-group__node-label"
|
|
1780
1782
|
}, [
|
|
1781
|
-
|
|
1783
|
+
S(i.$slots, "default", {}, void 0, !0)
|
|
1782
1784
|
], 512)
|
|
1783
1785
|
])
|
|
1784
|
-
], 8, fa)) : (_(),
|
|
1786
|
+
], 8, fa)) : (_(), $("text", {
|
|
1785
1787
|
key: 0,
|
|
1786
1788
|
class: "lume-alluvial-group__node-label",
|
|
1787
1789
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1788
1790
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1789
1791
|
}, [
|
|
1790
|
-
|
|
1792
|
+
S(i.$slots, "default", {}, void 0, !0)
|
|
1791
1793
|
], 8, pa));
|
|
1792
1794
|
}
|
|
1793
1795
|
});
|
|
1794
|
-
const _a = /* @__PURE__ */
|
|
1796
|
+
const _a = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y", "dominant-baseline"], ka = /* @__PURE__ */ Z({
|
|
1795
1797
|
__name: "lume-alluvial-node-value",
|
|
1796
1798
|
props: {
|
|
1797
1799
|
bottom: { type: Boolean, default: !0 }
|
|
1798
1800
|
},
|
|
1799
1801
|
setup(e) {
|
|
1800
|
-
return (n, t) => (_(),
|
|
1802
|
+
return (n, t) => (_(), $("text", {
|
|
1801
1803
|
class: "lume-alluvial-group__node-value",
|
|
1802
1804
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1803
1805
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1804
1806
|
}, [
|
|
1805
|
-
|
|
1807
|
+
S(n.$slots, "default", {}, void 0, !0)
|
|
1806
1808
|
], 8, ya));
|
|
1807
1809
|
}
|
|
1808
1810
|
});
|
|
1809
|
-
const ba = /* @__PURE__ */
|
|
1810
|
-
function
|
|
1811
|
+
const ba = /* @__PURE__ */ te(ka, [["__scopeId", "data-v-b4fc758b"]]);
|
|
1812
|
+
function Dt(e, n) {
|
|
1811
1813
|
return {
|
|
1812
1814
|
x0: 0 + (n ? n.left : 0),
|
|
1813
1815
|
y0: 0 + (n ? n.top : 0),
|
|
@@ -1816,16 +1818,16 @@ function Nt(e, n) {
|
|
|
1816
1818
|
};
|
|
1817
1819
|
}
|
|
1818
1820
|
function Aa(e) {
|
|
1819
|
-
const n =
|
|
1821
|
+
const n = B(Dt(e));
|
|
1820
1822
|
function t(o) {
|
|
1821
|
-
n.value =
|
|
1823
|
+
n.value = Dt(e, o);
|
|
1822
1824
|
}
|
|
1823
1825
|
return { extents: n, updateExtents: t };
|
|
1824
1826
|
}
|
|
1825
1827
|
var Qt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Qt || {});
|
|
1826
1828
|
const Ta = "[lume] ";
|
|
1827
1829
|
function La(e, n, t = !0) {
|
|
1828
|
-
t &&
|
|
1830
|
+
t && Gt() || console.error(Ta + "Error: " + e, n);
|
|
1829
1831
|
}
|
|
1830
1832
|
const Oa = 200;
|
|
1831
1833
|
function $e(e) {
|
|
@@ -1843,15 +1845,15 @@ function qt(e) {
|
|
|
1843
1845
|
function Ia(e, n) {
|
|
1844
1846
|
if (!n)
|
|
1845
1847
|
return;
|
|
1846
|
-
const t = e.nodes.filter((
|
|
1847
|
-
(
|
|
1848
|
+
const t = e.nodes.filter((a) => a.targetLinks.length === 0).map((a) => `${a.id}`), o = e.nodes.filter((a) => a.sourceLinks.length === 0).map((a) => `${a.id}`), l = n.filter((a) => t.includes(a.dataset.id)).reduce(
|
|
1849
|
+
(a, i) => Math.max(a, i.getBBox().width),
|
|
1848
1850
|
-1 / 0
|
|
1849
|
-
), u = n.filter((
|
|
1850
|
-
(
|
|
1851
|
+
), u = n.filter((a) => o.includes(a.dataset.id)).reduce(
|
|
1852
|
+
(a, i) => Math.max(a, i.getBBox().width),
|
|
1851
1853
|
-1 / 0
|
|
1852
1854
|
);
|
|
1853
1855
|
return {
|
|
1854
|
-
left:
|
|
1856
|
+
left: l,
|
|
1855
1857
|
top: 0,
|
|
1856
1858
|
right: u,
|
|
1857
1859
|
bottom: 0
|
|
@@ -1867,7 +1869,7 @@ function wa(e) {
|
|
|
1867
1869
|
width: n.x1 - n.x0,
|
|
1868
1870
|
height: t ? We : n.y1 - n.y0,
|
|
1869
1871
|
textTransform: {
|
|
1870
|
-
x: n.depth > 0 ? n.x1 +
|
|
1872
|
+
x: n.depth > 0 ? n.x1 + Et : n.x0 - Et,
|
|
1871
1873
|
y: (n.y1 + n.y0) / 2
|
|
1872
1874
|
},
|
|
1873
1875
|
node: n
|
|
@@ -1895,19 +1897,19 @@ function Ha(e) {
|
|
|
1895
1897
|
};
|
|
1896
1898
|
});
|
|
1897
1899
|
}
|
|
1898
|
-
function
|
|
1900
|
+
function Ht(e, n, t, o, l) {
|
|
1899
1901
|
if (o === !1) {
|
|
1900
1902
|
e.node = {
|
|
1901
1903
|
...e.node,
|
|
1902
|
-
transitionValue:
|
|
1904
|
+
transitionValue: l ? void 0 : t
|
|
1903
1905
|
};
|
|
1904
1906
|
return;
|
|
1905
1907
|
}
|
|
1906
|
-
const u = Date.now(),
|
|
1908
|
+
const u = Date.now(), a = Nn(n, t), i = () => {
|
|
1907
1909
|
let c = (Date.now() - u) / Oa;
|
|
1908
1910
|
c > 1 && (c = 1), e.node = {
|
|
1909
1911
|
...e.node,
|
|
1910
|
-
transitionValue:
|
|
1912
|
+
transitionValue: l && c === 1 ? void 0 : a(c)
|
|
1911
1913
|
}, c < 1 && requestAnimationFrame(i);
|
|
1912
1914
|
};
|
|
1913
1915
|
requestAnimationFrame(i);
|
|
@@ -1916,76 +1918,76 @@ const Ma = {
|
|
|
1916
1918
|
nodes: [],
|
|
1917
1919
|
links: []
|
|
1918
1920
|
};
|
|
1919
|
-
function
|
|
1921
|
+
function Mt(e, n) {
|
|
1920
1922
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1921
1923
|
}
|
|
1922
1924
|
function Ba(e, n, t) {
|
|
1923
|
-
const o =
|
|
1925
|
+
const o = B(null), l = v(() => {
|
|
1924
1926
|
var r;
|
|
1925
1927
|
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1926
|
-
({ label:
|
|
1927
|
-
label:
|
|
1928
|
+
({ label: h, color: g, value: m, deriveColorFromIncomingLinks: A, offset: x }) => ({
|
|
1929
|
+
label: h || m.toString(),
|
|
1928
1930
|
color: g,
|
|
1929
1931
|
fallbackColor: g || Be,
|
|
1930
1932
|
id: m,
|
|
1931
|
-
deriveColorFromIncomingLinks:
|
|
1932
|
-
offset:
|
|
1933
|
+
deriveColorFromIncomingLinks: A,
|
|
1934
|
+
offset: x
|
|
1933
1935
|
})
|
|
1934
1936
|
);
|
|
1935
1937
|
}), u = v(
|
|
1936
1938
|
() => {
|
|
1937
1939
|
var r;
|
|
1938
1940
|
return (r = e.value) == null ? void 0 : r[0].values.map(
|
|
1939
|
-
(
|
|
1941
|
+
(h) => {
|
|
1940
1942
|
var g;
|
|
1941
|
-
return (g =
|
|
1942
|
-
({ node: m, value:
|
|
1943
|
-
id: `${
|
|
1944
|
-
color:
|
|
1945
|
-
curveFunction:
|
|
1946
|
-
source:
|
|
1943
|
+
return (g = h.targets) == null ? void 0 : g.map(
|
|
1944
|
+
({ node: m, value: A, color: x, curveFunction: T }) => ({
|
|
1945
|
+
id: `${h.value}:${m}`,
|
|
1946
|
+
color: x,
|
|
1947
|
+
curveFunction: T,
|
|
1948
|
+
source: h.value ?? h.label,
|
|
1947
1949
|
target: m,
|
|
1948
|
-
value:
|
|
1950
|
+
value: A
|
|
1949
1951
|
})
|
|
1950
1952
|
);
|
|
1951
1953
|
}
|
|
1952
1954
|
).filter(Boolean).flat();
|
|
1953
1955
|
}
|
|
1954
|
-
),
|
|
1956
|
+
), a = v(() => kn().nodeId($e).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1955
1957
|
var r;
|
|
1956
1958
|
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1957
|
-
(
|
|
1958
|
-
const m =
|
|
1959
|
-
return m ? (m.push(g), m.sort((
|
|
1959
|
+
(h, g) => {
|
|
1960
|
+
const m = Mt(g, h);
|
|
1961
|
+
return m ? (m.push(g), m.sort((A, x) => (A._y0 || A.y0) - (x._y0 || x.y0))) : h.push([g]), h;
|
|
1960
1962
|
},
|
|
1961
1963
|
[]
|
|
1962
1964
|
);
|
|
1963
1965
|
});
|
|
1964
1966
|
function s(r) {
|
|
1965
|
-
const { offset:
|
|
1967
|
+
const { offset: h } = r, g = Mt(r, i.value);
|
|
1966
1968
|
if (!g)
|
|
1967
1969
|
return;
|
|
1968
|
-
const m = g[g.findIndex((
|
|
1969
|
-
r._y0 = r.y0, r._y1 = r.y1, r.y0 =
|
|
1970
|
-
}
|
|
1971
|
-
function c(r,
|
|
1972
|
-
const { id: g, _y0: m, y0:
|
|
1973
|
-
(
|
|
1974
|
-
),
|
|
1975
|
-
(
|
|
1976
|
-
),
|
|
1977
|
-
|
|
1978
|
-
}
|
|
1979
|
-
const p = v(() => (o.value &&
|
|
1980
|
-
r.value === 0 && (r.fallbackColor =
|
|
1970
|
+
const m = g[g.findIndex((x) => x.id === r.id) - 1], A = m && g.length !== 1 ? m.y1 + h : h;
|
|
1971
|
+
r._y0 = r.y0, r._y1 = r.y1, r.y0 = A, r.y1 = r.y0 + (r._y1 - r._y0);
|
|
1972
|
+
}
|
|
1973
|
+
function c(r, h) {
|
|
1974
|
+
const { id: g, _y0: m, y0: A } = r, x = h.links.filter(
|
|
1975
|
+
(O) => O.source.id === g
|
|
1976
|
+
), T = h.links.filter(
|
|
1977
|
+
(O) => O.target.id === g
|
|
1978
|
+
), f = A - m;
|
|
1979
|
+
x.forEach((O) => O.y0 += f), T.forEach((O) => O.y1 += f);
|
|
1980
|
+
}
|
|
1981
|
+
const p = v(() => (o.value && l.value.forEach((r) => {
|
|
1982
|
+
r.value === 0 && (r.fallbackColor = lt.Grey), typeof r.offset == "number" && (s(r), c(r, o.value));
|
|
1981
1983
|
}), o.value));
|
|
1982
|
-
return Y([
|
|
1984
|
+
return Y([a, t], () => {
|
|
1983
1985
|
try {
|
|
1984
|
-
const { x0: r, y0:
|
|
1985
|
-
o.value =
|
|
1986
|
-
[r,
|
|
1986
|
+
const { x0: r, y0: h, x1: g, y1: m } = t.value;
|
|
1987
|
+
o.value = a.value.extent([
|
|
1988
|
+
[r, h],
|
|
1987
1989
|
[g, m]
|
|
1988
|
-
])({ nodes:
|
|
1990
|
+
])({ nodes: l.value, links: u.value });
|
|
1989
1991
|
} catch (r) {
|
|
1990
1992
|
La(Qt.GraphProblem, r), o.value = Ma;
|
|
1991
1993
|
}
|
|
@@ -2029,7 +2031,7 @@ const Sa = (e, n) => {
|
|
|
2029
2031
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2030
2032
|
return {
|
|
2031
2033
|
nodes: n.reduce(
|
|
2032
|
-
(t, { source: o, target:
|
|
2034
|
+
(t, { source: o, target: l, value: u }) => o === e ? { ...t, [$e(l)]: u } : { ...t, [$e(o)]: u },
|
|
2033
2035
|
{ [$e(e)]: e.value }
|
|
2034
2036
|
),
|
|
2035
2037
|
links: n.map(({ id: t }) => t)
|
|
@@ -2044,16 +2046,16 @@ const Sa = (e, n) => {
|
|
|
2044
2046
|
};
|
|
2045
2047
|
};
|
|
2046
2048
|
function Ga(e, n, t) {
|
|
2047
|
-
const o =
|
|
2049
|
+
const o = B(null), l = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2048
2050
|
o.value,
|
|
2049
2051
|
t.value
|
|
2050
2052
|
) : n.value.highlightedElements === "closest" ? Ca(o.value, t.value) : Sa(o.value, t.value) : { nodes: {}, links: [] });
|
|
2051
|
-
return Y(
|
|
2053
|
+
return Y(l, (u, a) => {
|
|
2052
2054
|
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2053
2055
|
e.value.forEach((i) => {
|
|
2054
|
-
i.node.id in
|
|
2056
|
+
i.node.id in a.nodes && Ht(
|
|
2055
2057
|
i,
|
|
2056
|
-
|
|
2058
|
+
a.nodes[i.node.id],
|
|
2057
2059
|
i.node.value,
|
|
2058
2060
|
n.value.withTransition,
|
|
2059
2061
|
!0
|
|
@@ -2062,14 +2064,14 @@ function Ga(e, n, t) {
|
|
|
2062
2064
|
return;
|
|
2063
2065
|
}
|
|
2064
2066
|
e.value.forEach((i) => {
|
|
2065
|
-
i.node.id in u.nodes &&
|
|
2067
|
+
i.node.id in u.nodes && Ht(
|
|
2066
2068
|
i,
|
|
2067
2069
|
i.node.value,
|
|
2068
2070
|
u.nodes[i.node.id],
|
|
2069
2071
|
n.value.withTransition
|
|
2070
2072
|
);
|
|
2071
2073
|
});
|
|
2072
|
-
}), { highlightedElements:
|
|
2074
|
+
}), { highlightedElements: l, hoveredElement: o };
|
|
2073
2075
|
}
|
|
2074
2076
|
const ja = {
|
|
2075
2077
|
class: "lume-alluvial-group",
|
|
@@ -2085,110 +2087,110 @@ const ja = {
|
|
|
2085
2087
|
},
|
|
2086
2088
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2087
2089
|
setup(e, { emit: n }) {
|
|
2088
|
-
const t = e, o = n,
|
|
2090
|
+
const t = e, o = n, l = De("chartID"), { data: u, options: a } = ne(t), i = B([]), s = B([]), c = B(null), { extents: p, updateExtents: r } = Aa(t.containerSize), { columns: h, graph: g } = Ba(u, a, p), { hoveredElement: m, highlightedElements: A } = Ga(
|
|
2089
2091
|
i,
|
|
2090
|
-
|
|
2092
|
+
a,
|
|
2091
2093
|
g
|
|
2092
|
-
),
|
|
2093
|
-
() => Object.keys(
|
|
2094
|
-
),
|
|
2095
|
-
(k) => k[0].x0 +
|
|
2096
|
-
) : []),
|
|
2097
|
-
if (!(!
|
|
2098
|
-
return
|
|
2094
|
+
), x = v(() => Ce(a.value.valueFormat)), T = v(
|
|
2095
|
+
() => Object.keys(A.value.nodes)
|
|
2096
|
+
), f = v(() => h.value ? h.value.map(
|
|
2097
|
+
(k) => k[0].x0 + a.value.nodeWidth / 2
|
|
2098
|
+
) : []), O = v(() => {
|
|
2099
|
+
if (!(!a.value.nodeHeaders || !a.value.nodeHeaders.length))
|
|
2100
|
+
return a.value.nodeHeaders.slice(0, f.value.length).map((k, M) => ({
|
|
2099
2101
|
label: k,
|
|
2100
|
-
x:
|
|
2102
|
+
x: f.value[M]
|
|
2101
2103
|
}));
|
|
2102
|
-
}),
|
|
2103
|
-
() =>
|
|
2104
|
-
),
|
|
2105
|
-
if (!(!
|
|
2106
|
-
return g.value.links.reduce((k,
|
|
2107
|
-
const { source: y, target: X } =
|
|
2108
|
-
return k[
|
|
2109
|
-
source:
|
|
2110
|
-
target:
|
|
2104
|
+
}), N = v(
|
|
2105
|
+
() => a.value.nodeHeaderPadding ?? ma
|
|
2106
|
+
), E = v(() => {
|
|
2107
|
+
if (!(!a.value.gradient || !g.value))
|
|
2108
|
+
return g.value.links.reduce((k, M) => {
|
|
2109
|
+
const { source: y, target: X } = M, Q = y.color || y.fallbackColor, ce = X.deriveColorFromIncomingLinks ? Q : X.color || X.fallbackColor;
|
|
2110
|
+
return k[M.id] = {
|
|
2111
|
+
source: Q,
|
|
2112
|
+
target: ce,
|
|
2111
2113
|
x1: y.x1,
|
|
2112
2114
|
x2: X.x0
|
|
2113
2115
|
}, k;
|
|
2114
2116
|
}, {});
|
|
2115
|
-
}),
|
|
2117
|
+
}), F = v(() => {
|
|
2116
2118
|
const k = i.value.filter(
|
|
2117
|
-
(y) =>
|
|
2118
|
-
),
|
|
2119
|
+
(y) => P(y)
|
|
2120
|
+
), M = [];
|
|
2119
2121
|
return k.forEach((y) => {
|
|
2120
2122
|
const X = [];
|
|
2121
|
-
s.value.filter(({ link:
|
|
2122
|
-
const
|
|
2123
|
+
s.value.filter(({ link: Q }) => Q.target.id === y.node.id).reverse().reduce((Q, ce) => {
|
|
2124
|
+
const Ae = ce.link.target.y1 - ce.link.target.y0, Re = ce.link.value / y.node.value * Ae;
|
|
2123
2125
|
return X.push({
|
|
2124
2126
|
x: y.x,
|
|
2125
|
-
y: y.y +
|
|
2127
|
+
y: y.y + Q,
|
|
2126
2128
|
height: Re,
|
|
2127
2129
|
width: y.width,
|
|
2128
|
-
key: `node-block-${y.node.id}-source-link-${
|
|
2129
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2130
|
-
}),
|
|
2131
|
-
}, 0),
|
|
2130
|
+
key: `node-block-${y.node.id}-source-link-${ce.link.source.id}`,
|
|
2131
|
+
class: `lume-alluvial-group__node-block lume-fill--${ce.link.source.color || Be}`
|
|
2132
|
+
}), Q + Re;
|
|
2133
|
+
}, 0), M.push({
|
|
2132
2134
|
id: y.node.id,
|
|
2133
2135
|
subNodes: X
|
|
2134
2136
|
});
|
|
2135
|
-
}),
|
|
2137
|
+
}), M;
|
|
2136
2138
|
});
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2139
|
+
function w(k) {
|
|
2140
|
+
return a.value.gradient && `url('#${l}_${k.id}')`;
|
|
2139
2141
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2142
|
+
function C(k) {
|
|
2143
|
+
return T.value.length > 0 && !T.value.includes(k.toString());
|
|
2142
2144
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2145
|
+
function J(k) {
|
|
2146
|
+
return T.value.length > 0 && T.value.includes(k.toString());
|
|
2145
2147
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2148
|
+
function U(k) {
|
|
2149
|
+
return A.value.links.length > 0 && !A.value.links.includes(k);
|
|
2148
2150
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return
|
|
2151
|
+
function q(k) {
|
|
2152
|
+
return A.value.links.length > 0 && A.value.links.includes(k);
|
|
2151
2153
|
}
|
|
2152
|
-
function
|
|
2154
|
+
function P(k) {
|
|
2153
2155
|
return !k.node.color && k.node.deriveColorFromIncomingLinks;
|
|
2154
2156
|
}
|
|
2155
|
-
function
|
|
2156
|
-
k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event:
|
|
2157
|
+
function ue(k, M) {
|
|
2158
|
+
k !== m.value && (m.value = k, o("link-mouseenter", { link: k, event: M }));
|
|
2157
2159
|
}
|
|
2158
2160
|
function xe(k) {
|
|
2159
|
-
const
|
|
2160
|
-
m.value = null, o("link-mouseleave", { link:
|
|
2161
|
+
const M = m.value;
|
|
2162
|
+
m.value = null, o("link-mouseleave", { link: M, event: k });
|
|
2161
2163
|
}
|
|
2162
|
-
function
|
|
2164
|
+
function be(k) {
|
|
2163
2165
|
if (k == null) {
|
|
2164
2166
|
m.value = null;
|
|
2165
2167
|
return;
|
|
2166
2168
|
}
|
|
2167
|
-
const
|
|
2168
|
-
if (!
|
|
2169
|
-
|
|
2169
|
+
const M = xa(k, g.value) || $a(k, g.value);
|
|
2170
|
+
if (!M) {
|
|
2171
|
+
_e(me.InvalidHoveredElement);
|
|
2170
2172
|
return;
|
|
2171
2173
|
}
|
|
2172
|
-
m.value =
|
|
2174
|
+
m.value = M;
|
|
2173
2175
|
}
|
|
2174
|
-
function
|
|
2175
|
-
var
|
|
2176
|
-
return ((
|
|
2176
|
+
function R(k) {
|
|
2177
|
+
var M;
|
|
2178
|
+
return ((M = F.value.find(({ id: y }) => k === y)) == null ? void 0 : M.subNodes) ?? [];
|
|
2177
2179
|
}
|
|
2178
|
-
function
|
|
2180
|
+
function H() {
|
|
2179
2181
|
const k = Ia(g.value, c.value);
|
|
2180
2182
|
r(k);
|
|
2181
2183
|
}
|
|
2182
2184
|
return Y(g, (k) => {
|
|
2183
|
-
i.value = wa(k.nodes), s.value = Ha(k.links).reverse(), m.value == null && t.hoveredElementId != null &&
|
|
2185
|
+
i.value = wa(k.nodes), s.value = Ha(k.links).reverse(), m.value == null && t.hoveredElementId != null && be(t.hoveredElementId);
|
|
2184
2186
|
}), Y([t.containerSize, c], () => {
|
|
2185
|
-
t.containerSize.width && t.containerSize.height &&
|
|
2186
|
-
}), Y(() => t.hoveredElementId,
|
|
2187
|
-
|
|
2188
|
-
(_(!0),
|
|
2187
|
+
t.containerSize.width && t.containerSize.height && H();
|
|
2188
|
+
}), Y(() => t.hoveredElementId, be), (k, M) => (_(), $("g", ja, [
|
|
2189
|
+
O.value ? (_(), $("g", Va, [
|
|
2190
|
+
(_(!0), $(ee, null, W(O.value, (y) => (_(), $("text", {
|
|
2189
2191
|
key: `header_${y.x}`,
|
|
2190
2192
|
x: y.x,
|
|
2191
|
-
y: -
|
|
2193
|
+
y: -N.value,
|
|
2192
2194
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
2193
2195
|
}, ae(y.label), 9, Pa))), 128))
|
|
2194
2196
|
])) : z("", !0),
|
|
@@ -2196,9 +2198,9 @@ const ja = {
|
|
|
2196
2198
|
class: "lume-alluvial-link-group",
|
|
2197
2199
|
onMouseleave: xe
|
|
2198
2200
|
}, [
|
|
2199
|
-
d(
|
|
2200
|
-
(_(!0),
|
|
2201
|
-
id: `${d(
|
|
2201
|
+
d(a).gradient ? (_(), $("defs", Fa, [
|
|
2202
|
+
(_(!0), $(ee, null, W(E.value, (y, X) => (_(), $("linearGradient", {
|
|
2203
|
+
id: `${d(l)}_${X}`,
|
|
2202
2204
|
key: X,
|
|
2203
2205
|
gradientUnits: "userSpaceOnUse",
|
|
2204
2206
|
x1: y.x1,
|
|
@@ -2214,7 +2216,7 @@ const ja = {
|
|
|
2214
2216
|
}, null, 8, Za)
|
|
2215
2217
|
], 8, za))), 128))
|
|
2216
2218
|
])) : z("", !0),
|
|
2217
|
-
(_(!0),
|
|
2219
|
+
(_(!0), $(ee, null, W(s.value, (y) => (_(), $("path", {
|
|
2218
2220
|
key: `link-ghost_${y.id}`,
|
|
2219
2221
|
class: oe(["lume-alluvial-group__link", [
|
|
2220
2222
|
"lume-stroke--transparent",
|
|
@@ -2224,47 +2226,47 @@ const ja = {
|
|
|
2224
2226
|
"stroke-width": y.strokeWidth + d(va),
|
|
2225
2227
|
"data-j-alluvial-ghost": "",
|
|
2226
2228
|
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2227
|
-
onMouseover: (X) =>
|
|
2229
|
+
onMouseover: (X) => ue(y.link, X)
|
|
2228
2230
|
}, null, 40, Ua))), 128)),
|
|
2229
|
-
(_(!0),
|
|
2231
|
+
(_(!0), $(ee, null, W(s.value, (y) => (_(), $("path", {
|
|
2230
2232
|
key: `link_${y.id}`,
|
|
2231
2233
|
class: oe(["lume-alluvial-group__link", {
|
|
2232
|
-
[`lume-stroke--${y.color}`]: !d(
|
|
2233
|
-
"lume-alluvial-group__link--faded":
|
|
2234
|
-
"lume-alluvial-group__link--focused":
|
|
2234
|
+
[`lume-stroke--${y.color}`]: !d(a).gradient && y.color,
|
|
2235
|
+
"lume-alluvial-group__link--faded": U(y.id),
|
|
2236
|
+
"lume-alluvial-group__link--focused": q(y.id)
|
|
2235
2237
|
}]),
|
|
2236
2238
|
d: y.d,
|
|
2237
|
-
stroke:
|
|
2239
|
+
stroke: w(y.link),
|
|
2238
2240
|
"stroke-dasharray": k.containerSize.width,
|
|
2239
2241
|
"stroke-dashoffset": k.containerSize.width,
|
|
2240
2242
|
"stroke-width": y.strokeWidth,
|
|
2241
2243
|
"data-j-alluvial-path": "",
|
|
2242
2244
|
"data-id": y.id,
|
|
2243
2245
|
onClick: (X) => o("link-click", { link: y.link, event: X }),
|
|
2244
|
-
onMouseover: (X) =>
|
|
2246
|
+
onMouseover: (X) => ue(y.link, X)
|
|
2245
2247
|
}, null, 42, Xa))), 128))
|
|
2246
2248
|
], 32),
|
|
2247
|
-
(_(!0),
|
|
2249
|
+
(_(!0), $(ee, null, W(i.value, (y, X) => (_(), $("g", {
|
|
2248
2250
|
key: `node-block_${X}`,
|
|
2249
2251
|
class: oe(["lume-alluvial-group__node", {
|
|
2250
|
-
"lume-alluvial-group__node--faded":
|
|
2251
|
-
"lume-alluvial-group__node--focused":
|
|
2252
|
+
"lume-alluvial-group__node--faded": C(y.node.id),
|
|
2253
|
+
"lume-alluvial-group__node--focused": J(y.node.id)
|
|
2252
2254
|
}]),
|
|
2253
2255
|
"data-j-alluvial-group__node-block": ""
|
|
2254
2256
|
}, [
|
|
2255
2257
|
G("g", {
|
|
2256
|
-
onClick: (
|
|
2257
|
-
onMouseenter: (
|
|
2258
|
-
onMouseleave: (
|
|
2259
|
-
onMouseover: (
|
|
2260
|
-
onMouseout:
|
|
2258
|
+
onClick: (Q) => o("node-click", { node: y.node, event: Q }),
|
|
2259
|
+
onMouseenter: (Q) => o("node-mouseenter", { node: y.node, event: Q }),
|
|
2260
|
+
onMouseleave: (Q) => o("node-mouseleave", { node: y.node, event: Q }),
|
|
2261
|
+
onMouseover: (Q) => m.value = y.node,
|
|
2262
|
+
onMouseout: M[0] || (M[0] = (Q) => m.value = null)
|
|
2261
2263
|
}, [
|
|
2262
|
-
|
|
2264
|
+
P(y) ? (_(!0), $(ee, { key: 0 }, W(R(
|
|
2263
2265
|
y.node.id
|
|
2264
|
-
), (
|
|
2265
|
-
key:
|
|
2266
|
+
), (Q) => (_(), $("rect", j(Q, {
|
|
2267
|
+
key: Q.key,
|
|
2266
2268
|
"data-j-alluvial-sub-nodes": ""
|
|
2267
|
-
}), null, 16))), 128)) : (_(),
|
|
2269
|
+
}), null, 16))), 128)) : (_(), $("rect", {
|
|
2268
2270
|
key: 1,
|
|
2269
2271
|
class: oe(["lume-alluvial-group__node-block", `lume-fill--${y.node.color || y.node.fallbackColor}`]),
|
|
2270
2272
|
x: y.x,
|
|
@@ -2281,31 +2283,31 @@ const ja = {
|
|
|
2281
2283
|
}]),
|
|
2282
2284
|
transform: `translate(${y.textTransform.x},${y.textTransform.y})`,
|
|
2283
2285
|
"data-id": y.node.id,
|
|
2284
|
-
width: d(
|
|
2286
|
+
width: d(a).nodeLabelMaxWidth
|
|
2285
2287
|
}, [
|
|
2286
|
-
|
|
2288
|
+
S(k.$slots, `node-text-${y.node.id}`, {
|
|
2287
2289
|
node: y.node,
|
|
2288
|
-
value:
|
|
2290
|
+
value: x.value(
|
|
2289
2291
|
y.node.transitionValue || y.node.value,
|
|
2290
2292
|
y.node.value
|
|
2291
2293
|
)
|
|
2292
2294
|
}, () => [
|
|
2293
|
-
|
|
2294
|
-
bottom: d(
|
|
2295
|
+
ie(d(_a), {
|
|
2296
|
+
bottom: d(a).switchText,
|
|
2295
2297
|
left: y.node.depth === 0,
|
|
2296
|
-
"max-width": d(
|
|
2297
|
-
"onLume__internal-NodeResize":
|
|
2298
|
+
"max-width": d(a).nodeLabelMaxWidth,
|
|
2299
|
+
"onLume__internal-NodeResize": H
|
|
2298
2300
|
}, {
|
|
2299
|
-
default:
|
|
2300
|
-
|
|
2301
|
+
default: V(() => [
|
|
2302
|
+
fe(ae(y.node.label), 1)
|
|
2301
2303
|
]),
|
|
2302
2304
|
_: 2
|
|
2303
2305
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2304
|
-
|
|
2305
|
-
bottom: !d(
|
|
2306
|
+
ie(d(ba), {
|
|
2307
|
+
bottom: !d(a).switchText
|
|
2306
2308
|
}, {
|
|
2307
|
-
default:
|
|
2308
|
-
|
|
2309
|
+
default: V(() => [
|
|
2310
|
+
fe(ae(x.value(
|
|
2309
2311
|
y.node.transitionValue || y.node.value,
|
|
2310
2312
|
y.node.value
|
|
2311
2313
|
)), 1)
|
|
@@ -2319,7 +2321,7 @@ const ja = {
|
|
|
2319
2321
|
]));
|
|
2320
2322
|
}
|
|
2321
2323
|
});
|
|
2322
|
-
const qa = /* @__PURE__ */
|
|
2324
|
+
const qa = /* @__PURE__ */ te(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
2323
2325
|
margins: {
|
|
2324
2326
|
top: 0,
|
|
2325
2327
|
right: 0,
|
|
@@ -2344,7 +2346,7 @@ const qa = /* @__PURE__ */ ee(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
|
2344
2346
|
...Fo(nt)
|
|
2345
2347
|
},
|
|
2346
2348
|
setup(e, { emit: n }) {
|
|
2347
|
-
const t = e, { componentEventPropagator: o } =
|
|
2349
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(re()), u = Hn(re()), { options: a } = ne(t), { allOptions: i } = pe(a, el);
|
|
2348
2350
|
function s(c) {
|
|
2349
2351
|
return {
|
|
2350
2352
|
...c,
|
|
@@ -2355,23 +2357,23 @@ const qa = /* @__PURE__ */ ee(Qa, [["__scopeId", "data-v-a8689157"]]), el = {
|
|
|
2355
2357
|
return (c, p) => (_(), K(d(we), j(t, {
|
|
2356
2358
|
options: s(d(i)),
|
|
2357
2359
|
"data-j-alluvial-diagram": ""
|
|
2358
|
-
}, le(d(o))),
|
|
2359
|
-
groups:
|
|
2360
|
-
|
|
2361
|
-
W(d(u), (
|
|
2360
|
+
}, le(d(o))), de({
|
|
2361
|
+
groups: V((r) => [
|
|
2362
|
+
ie(d(qa), j(r, { "hovered-element-id": c.hoveredElement }, le(d(o))), de({ _: 2 }, [
|
|
2363
|
+
W(d(u), (h, g) => ({
|
|
2362
2364
|
name: g,
|
|
2363
|
-
fn:
|
|
2364
|
-
|
|
2365
|
+
fn: V((m) => [
|
|
2366
|
+
S(c.$slots, g, he(ge(m || {})))
|
|
2365
2367
|
])
|
|
2366
2368
|
}))
|
|
2367
2369
|
]), 1040, ["hovered-element-id"])
|
|
2368
2370
|
]),
|
|
2369
2371
|
_: 2
|
|
2370
2372
|
}, [
|
|
2371
|
-
W(d(
|
|
2372
|
-
name:
|
|
2373
|
-
fn:
|
|
2374
|
-
|
|
2373
|
+
W(d(l), (r, h) => ({
|
|
2374
|
+
name: h,
|
|
2375
|
+
fn: V((g) => [
|
|
2376
|
+
S(c.$slots, h, he(ge(g || {})))
|
|
2375
2377
|
])
|
|
2376
2378
|
}))
|
|
2377
2379
|
]), 1040, ["options"]));
|
|
@@ -2393,13 +2395,13 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2393
2395
|
() => import("./common/42f5d2fc.js")
|
|
2394
2396
|
), o = ze(
|
|
2395
2397
|
() => import("./common/abc9d23d.js")
|
|
2396
|
-
),
|
|
2398
|
+
), l = ze(
|
|
2397
2399
|
() => import("./common/0664fd4d.js")
|
|
2398
2400
|
), u = /* @__PURE__ */ new Map([
|
|
2399
2401
|
["single", t],
|
|
2400
2402
|
["grouped", o],
|
|
2401
|
-
["stacked",
|
|
2402
|
-
]),
|
|
2403
|
+
["stacked", l]
|
|
2404
|
+
]), a = e, { componentEventPropagator: i } = ke(), s = Oe(re());
|
|
2403
2405
|
function c(r) {
|
|
2404
2406
|
return {
|
|
2405
2407
|
...r,
|
|
@@ -2407,26 +2409,26 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
2407
2409
|
// Bar chart always starts on zero,
|
|
2408
2410
|
tooltipOptions: {
|
|
2409
2411
|
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2410
|
-
position:
|
|
2412
|
+
position: a.orientation === D.HORIZONTAL ? "right" : void 0
|
|
2411
2413
|
}
|
|
2412
2414
|
};
|
|
2413
2415
|
}
|
|
2414
2416
|
const p = v(() => {
|
|
2415
|
-
if (
|
|
2416
|
-
if (nt(
|
|
2417
|
+
if (a.data) {
|
|
2418
|
+
if (nt(a.data))
|
|
2417
2419
|
return u.get("single");
|
|
2418
|
-
if (!
|
|
2420
|
+
if (!a.type)
|
|
2419
2421
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2420
|
-
return u.get(
|
|
2422
|
+
return u.get(a.type);
|
|
2421
2423
|
}
|
|
2422
2424
|
});
|
|
2423
|
-
return (r,
|
|
2425
|
+
return (r, h) => (_(), K(vn(p.value), j({ ...a, ...r.$attrs }, {
|
|
2424
2426
|
options: c(r.options)
|
|
2425
|
-
}, le(d(i))),
|
|
2427
|
+
}, le(d(i))), de({ _: 2 }, [
|
|
2426
2428
|
W(d(s), (g, m) => ({
|
|
2427
2429
|
name: m,
|
|
2428
|
-
fn:
|
|
2429
|
-
|
|
2430
|
+
fn: V((A) => [
|
|
2431
|
+
S(r.$slots, m, he(ge(A || {})))
|
|
2430
2432
|
])
|
|
2431
2433
|
}))
|
|
2432
2434
|
]), 1040, ["options"]));
|
|
@@ -2436,7 +2438,7 @@ function tl(e) {
|
|
|
2436
2438
|
return Object.values(Cn).includes(e) || e == null;
|
|
2437
2439
|
}
|
|
2438
2440
|
function nl(e) {
|
|
2439
|
-
return Object.values(
|
|
2441
|
+
return Object.values(D).includes(e);
|
|
2440
2442
|
}
|
|
2441
2443
|
const ol = (e = !1) => ({
|
|
2442
2444
|
type: {
|
|
@@ -2447,108 +2449,114 @@ const ol = (e = !1) => ({
|
|
|
2447
2449
|
...e ? {
|
|
2448
2450
|
orientation: {
|
|
2449
2451
|
type: String,
|
|
2450
|
-
default:
|
|
2452
|
+
default: D.VERTICAL,
|
|
2451
2453
|
validator: nl
|
|
2452
2454
|
}
|
|
2453
2455
|
} : {}
|
|
2454
2456
|
});
|
|
2455
|
-
function tn(e) {
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
...
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2457
|
+
function tn(e, n) {
|
|
2458
|
+
const t = v(() => e.value.map((l) => {
|
|
2459
|
+
var u;
|
|
2460
|
+
return {
|
|
2461
|
+
...l,
|
|
2462
|
+
values: ot(
|
|
2463
|
+
l.values,
|
|
2464
|
+
((u = n == null ? void 0 : n.value) == null ? void 0 : u.length) ?? 0
|
|
2465
|
+
).map((a) => ({
|
|
2466
|
+
...a,
|
|
2467
|
+
value: (a == null ? void 0 : a.value) || 0
|
|
2468
|
+
}))
|
|
2469
|
+
};
|
|
2470
|
+
})), o = v(() => {
|
|
2471
|
+
var l;
|
|
2472
|
+
return (l = t.value) == null ? void 0 : l.reduce((u, a) => (a.values.forEach((i, s) => {
|
|
2473
|
+
u[s] ? u[s].push(i) : u[s] = [i];
|
|
2474
|
+
}), u), []);
|
|
2467
2475
|
});
|
|
2468
|
-
return { multiBarData:
|
|
2476
|
+
return { multiBarData: t, groupedData: o };
|
|
2469
2477
|
}
|
|
2470
2478
|
function al(e, n) {
|
|
2471
2479
|
return e.value.length === 1 ? "single" : n.value;
|
|
2472
2480
|
}
|
|
2473
2481
|
function ll(e, n, t) {
|
|
2474
2482
|
const o = v(
|
|
2475
|
-
() => t.value ===
|
|
2483
|
+
() => t.value === D.HORIZONTAL
|
|
2476
2484
|
);
|
|
2477
|
-
function
|
|
2485
|
+
function l(i) {
|
|
2478
2486
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2479
2487
|
}
|
|
2480
|
-
const u = v(() => o.value ? (() => (
|
|
2481
|
-
return { barXScale: u, barYScale:
|
|
2488
|
+
const u = v(() => o.value ? (() => (l(e.value), e.value))() : e.value), a = v(() => o.value ? n.value : (() => (l(n.value), n.value))());
|
|
2489
|
+
return { barXScale: u, barYScale: a };
|
|
2482
2490
|
}
|
|
2483
|
-
function ul(e, n, t, o,
|
|
2484
|
-
const
|
|
2485
|
-
() => o.value ===
|
|
2491
|
+
function ul(e, n, t, o, l, u) {
|
|
2492
|
+
const a = v(
|
|
2493
|
+
() => o.value === D.HORIZONTAL
|
|
2486
2494
|
);
|
|
2487
|
-
function i(r,
|
|
2495
|
+
function i(r, h) {
|
|
2488
2496
|
let g, m;
|
|
2489
|
-
return
|
|
2497
|
+
return a.value ? (g = r >= 0 ? n.value(0) : n.value(r), m = t.value(t.value.domain()[h])) : (g = n.value(n.value.domain()[h]), m = r < 0 ? t.value(0) : t.value(r)), { x: g, y: m };
|
|
2490
2498
|
}
|
|
2491
2499
|
function s(r) {
|
|
2492
|
-
return
|
|
2500
|
+
return a.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
2493
2501
|
}
|
|
2494
2502
|
function c(r) {
|
|
2495
|
-
return
|
|
2503
|
+
return a.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2496
2504
|
}
|
|
2497
|
-
function p(r,
|
|
2498
|
-
const { value: m, color:
|
|
2505
|
+
function p(r, h, g) {
|
|
2506
|
+
const { value: m, color: A } = r, x = A ?? e.value[h].color ?? Be, { x: T, y: f } = i(m, g), O = s(m), N = c(m);
|
|
2499
2507
|
return {
|
|
2500
|
-
classList: [`lume-fill--${
|
|
2501
|
-
x:
|
|
2502
|
-
y:
|
|
2503
|
-
width:
|
|
2504
|
-
height:
|
|
2505
|
-
isFaded:
|
|
2508
|
+
classList: [`lume-fill--${x}`, ...u],
|
|
2509
|
+
x: T,
|
|
2510
|
+
y: f,
|
|
2511
|
+
width: O,
|
|
2512
|
+
height: N,
|
|
2513
|
+
isFaded: l.value !== -1 && l.value !== g,
|
|
2506
2514
|
isNegative: m < 0
|
|
2507
2515
|
};
|
|
2508
2516
|
}
|
|
2509
2517
|
return { barAttributeGenerator: p };
|
|
2510
2518
|
}
|
|
2511
|
-
function rl(e, n, t, o,
|
|
2512
|
-
const
|
|
2513
|
-
() => o.value ===
|
|
2514
|
-
), i = v(() => Ee().domain(e.value.map((m,
|
|
2515
|
-
function c(m,
|
|
2516
|
-
if (
|
|
2519
|
+
function rl(e, n, t, o, l, u) {
|
|
2520
|
+
const a = v(
|
|
2521
|
+
() => o.value === D.HORIZONTAL
|
|
2522
|
+
), i = v(() => Ee().domain(e.value.map((m, A) => A)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => Ee().domain(e.value.map((m, A) => A)).range([0, t.value.bandwidth()]).padding(0));
|
|
2523
|
+
function c(m, A, x) {
|
|
2524
|
+
if (a.value)
|
|
2517
2525
|
return m >= 0 ? n.value(0) : n.value(m);
|
|
2518
|
-
const
|
|
2519
|
-
return n.value(
|
|
2526
|
+
const T = n.value.domain();
|
|
2527
|
+
return n.value(T[A]) + i.value(x);
|
|
2520
2528
|
}
|
|
2521
|
-
function p(m,
|
|
2522
|
-
if (
|
|
2523
|
-
const
|
|
2524
|
-
return t.value(
|
|
2529
|
+
function p(m, A, x) {
|
|
2530
|
+
if (a.value) {
|
|
2531
|
+
const T = t.value.domain();
|
|
2532
|
+
return t.value(T[A]) + s.value(x);
|
|
2525
2533
|
}
|
|
2526
2534
|
return m < 0 ? t.value(0) : t.value(m);
|
|
2527
2535
|
}
|
|
2528
2536
|
function r(m) {
|
|
2529
|
-
return
|
|
2537
|
+
return a.value ? m < 0 ? n.value(0) - n.value(m) : n.value(m) - n.value(0) : i.value.bandwidth();
|
|
2530
2538
|
}
|
|
2531
|
-
function
|
|
2532
|
-
return
|
|
2539
|
+
function h(m) {
|
|
2540
|
+
return a.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2533
2541
|
}
|
|
2534
|
-
function g(m,
|
|
2535
|
-
const { value:
|
|
2542
|
+
function g(m, A, x) {
|
|
2543
|
+
const { value: T, color: f } = m, O = f ?? e.value[A].color ?? Object.values(se)[A], N = c(T, x, A), E = p(T, x, A), F = r(T), w = h(T);
|
|
2536
2544
|
return {
|
|
2537
|
-
classList: [`lume-fill--${
|
|
2538
|
-
x:
|
|
2539
|
-
y:
|
|
2540
|
-
width:
|
|
2541
|
-
height:
|
|
2542
|
-
isFaded:
|
|
2543
|
-
isNegative:
|
|
2545
|
+
classList: [`lume-fill--${O}`, ...u],
|
|
2546
|
+
x: N,
|
|
2547
|
+
y: E,
|
|
2548
|
+
width: F,
|
|
2549
|
+
height: w,
|
|
2550
|
+
isFaded: l.value !== -1 && l.value !== x,
|
|
2551
|
+
isNegative: T < 0
|
|
2544
2552
|
};
|
|
2545
2553
|
}
|
|
2546
2554
|
return { barAttributeGenerator: g };
|
|
2547
2555
|
}
|
|
2548
2556
|
function il(e, n, t) {
|
|
2549
2557
|
const o = v(
|
|
2550
|
-
() => n.value ===
|
|
2551
|
-
),
|
|
2558
|
+
() => n.value === D.HORIZONTAL
|
|
2559
|
+
), l = v(() => {
|
|
2552
2560
|
const s = e.value.map(
|
|
2553
2561
|
(c) => c.filter((p) => p.value < 0).reduce((p, r) => p + r.value, 0)
|
|
2554
2562
|
);
|
|
@@ -2562,10 +2570,10 @@ function il(e, n, t) {
|
|
|
2562
2570
|
);
|
|
2563
2571
|
return Math.max(...s);
|
|
2564
2572
|
});
|
|
2565
|
-
function
|
|
2566
|
-
return o.value ? Ne().domain([
|
|
2567
|
-
|
|
2568
|
-
Ee().domain(c.map((r,
|
|
2573
|
+
function a(s, c, p) {
|
|
2574
|
+
return o.value ? Ne().domain([l.value, u.value]).range([0, p.width]) : Object.assign(
|
|
2575
|
+
It(
|
|
2576
|
+
Ee().domain(c.map((r, h) => h)).range([0, p.width]),
|
|
2569
2577
|
n.value,
|
|
2570
2578
|
t.value
|
|
2571
2579
|
),
|
|
@@ -2574,59 +2582,59 @@ function il(e, n, t) {
|
|
|
2574
2582
|
}
|
|
2575
2583
|
function i(s, c, p) {
|
|
2576
2584
|
return o.value ? Object.assign(
|
|
2577
|
-
|
|
2578
|
-
Ee().domain(c.map((r,
|
|
2585
|
+
It(
|
|
2586
|
+
Ee().domain(c.map((r, h) => h)).range([0, p.height]),
|
|
2579
2587
|
n.value,
|
|
2580
2588
|
t.value
|
|
2581
2589
|
),
|
|
2582
2590
|
{ labels: c }
|
|
2583
|
-
) : Ne().domain([u.value,
|
|
2591
|
+
) : Ne().domain([u.value, l.value]).range([0, p.height]);
|
|
2584
2592
|
}
|
|
2585
|
-
return { stackedXScaleGenerator:
|
|
2593
|
+
return { stackedXScaleGenerator: a, stackedYScaleGenerator: i };
|
|
2586
2594
|
}
|
|
2587
|
-
function sl(e, n, t, o,
|
|
2588
|
-
const
|
|
2589
|
-
() => o.value ===
|
|
2595
|
+
function sl(e, n, t, o, l, u) {
|
|
2596
|
+
const a = v(
|
|
2597
|
+
() => o.value === D.HORIZONTAL
|
|
2590
2598
|
), i = v(
|
|
2591
|
-
() =>
|
|
2599
|
+
() => a.value ? t.value.domain() : n.value.domain()
|
|
2592
2600
|
), s = v(
|
|
2593
|
-
() => e.value.map((
|
|
2601
|
+
() => e.value.map((T) => T.values.map((f) => f == null ? void 0 : f.value))
|
|
2594
2602
|
);
|
|
2595
|
-
function c(
|
|
2596
|
-
let
|
|
2597
|
-
return
|
|
2603
|
+
function c(T, f, O) {
|
|
2604
|
+
let N, E;
|
|
2605
|
+
return a.value ? (N = n.value(T >= 0 ? 0 + O : T + O), E = t.value(i.value[f])) : (N = n.value(i.value[f]), E = t.value(T >= 0 ? T + O : 0 + O)), { x: N, y: E };
|
|
2598
2606
|
}
|
|
2599
|
-
function p(
|
|
2600
|
-
return
|
|
2607
|
+
function p(T) {
|
|
2608
|
+
return a.value ? n.value(T) - n.value(0) : n.value.bandwidth();
|
|
2601
2609
|
}
|
|
2602
|
-
function r(
|
|
2603
|
-
return
|
|
2610
|
+
function r(T) {
|
|
2611
|
+
return a.value ? n.value(0) - n.value(T) : n.value.bandwidth();
|
|
2604
2612
|
}
|
|
2605
|
-
function
|
|
2606
|
-
return
|
|
2613
|
+
function h(T) {
|
|
2614
|
+
return a.value ? t.value.bandwidth() : t.value(0) - t.value(T);
|
|
2607
2615
|
}
|
|
2608
|
-
function g(
|
|
2609
|
-
return
|
|
2616
|
+
function g(T) {
|
|
2617
|
+
return a.value ? t.value.bandwidth() : t.value(T) - t.value(0);
|
|
2610
2618
|
}
|
|
2611
|
-
function m(
|
|
2612
|
-
return
|
|
2619
|
+
function m(T, f) {
|
|
2620
|
+
return T ? s.value.reduce((O, N, E) => (E < T && N[f] >= 0 && (O += N[f]), O), 0) : 0;
|
|
2613
2621
|
}
|
|
2614
|
-
function T
|
|
2615
|
-
return
|
|
2622
|
+
function A(T, f) {
|
|
2623
|
+
return T ? s.value.reduce((O, N, E) => (E < T && N[f] < 0 && (O += N[f]), O), 0) : 0;
|
|
2616
2624
|
}
|
|
2617
|
-
function
|
|
2618
|
-
const { value:
|
|
2625
|
+
function x(T, f, O) {
|
|
2626
|
+
const { value: N, color: E } = T, F = N >= 0 ? p(N) : r(N), w = N >= 0 ? h(N) : g(N), C = N >= 0 ? m(f, O) : A(f, O), { x: J, y: U } = c(N, O, C);
|
|
2619
2627
|
return {
|
|
2620
|
-
classList: [`lume-fill--${
|
|
2621
|
-
width:
|
|
2622
|
-
height:
|
|
2623
|
-
x:
|
|
2624
|
-
y:
|
|
2625
|
-
isFaded:
|
|
2626
|
-
isNegative:
|
|
2628
|
+
classList: [`lume-fill--${E ?? e.value[f].color ?? Object.values(se)[f]}`, ...u],
|
|
2629
|
+
width: F,
|
|
2630
|
+
height: w,
|
|
2631
|
+
x: J,
|
|
2632
|
+
y: U,
|
|
2633
|
+
isFaded: l.value !== -1 && l.value !== O,
|
|
2634
|
+
isNegative: N < 0
|
|
2627
2635
|
};
|
|
2628
2636
|
}
|
|
2629
|
-
return { barAttributeGenerator:
|
|
2637
|
+
return { barAttributeGenerator: x };
|
|
2630
2638
|
}
|
|
2631
2639
|
const cl = {
|
|
2632
2640
|
class: "lume-bar-group",
|
|
@@ -2635,7 +2643,7 @@ const cl = {
|
|
|
2635
2643
|
single: ul,
|
|
2636
2644
|
grouped: rl,
|
|
2637
2645
|
stacked: sl
|
|
2638
|
-
},
|
|
2646
|
+
}, ct = /* @__PURE__ */ Z({
|
|
2639
2647
|
__name: "lume-bar-group",
|
|
2640
2648
|
props: {
|
|
2641
2649
|
...Ve(),
|
|
@@ -2652,63 +2660,64 @@ const cl = {
|
|
|
2652
2660
|
emits: ["bar-click", "lume__internal--hover"],
|
|
2653
2661
|
setup(e, { emit: n }) {
|
|
2654
2662
|
const t = e, o = n, {
|
|
2655
|
-
data:
|
|
2663
|
+
data: l,
|
|
2656
2664
|
hoveredIndex: u,
|
|
2657
|
-
orientation:
|
|
2665
|
+
orientation: a,
|
|
2658
2666
|
transition: i,
|
|
2659
2667
|
type: s,
|
|
2660
2668
|
xScale: c,
|
|
2661
2669
|
yScale: p,
|
|
2662
|
-
classList: r
|
|
2663
|
-
|
|
2670
|
+
classList: r,
|
|
2671
|
+
labels: h
|
|
2672
|
+
} = ne(t);
|
|
2664
2673
|
De("chartID");
|
|
2665
|
-
const { emitInternalEvent:
|
|
2666
|
-
const
|
|
2667
|
-
a,
|
|
2668
|
-
m,
|
|
2669
|
-
T,
|
|
2674
|
+
const { emitInternalEvent: g } = ke(), { groupedData: m } = tn(l, h), { barXScale: A, barYScale: x } = ll(c, p, a), T = v(() => typeof r.value == "string" ? [r.value] : r.value), f = v(() => {
|
|
2675
|
+
const E = al(l, s), { barAttributeGenerator: F } = vl[E](
|
|
2670
2676
|
l,
|
|
2677
|
+
A,
|
|
2678
|
+
x,
|
|
2679
|
+
a,
|
|
2671
2680
|
u,
|
|
2672
|
-
|
|
2681
|
+
T.value
|
|
2673
2682
|
);
|
|
2674
|
-
return
|
|
2675
|
-
}),
|
|
2683
|
+
return F;
|
|
2684
|
+
}), O = v(() => {
|
|
2676
2685
|
if (i.value)
|
|
2677
|
-
return
|
|
2686
|
+
return a.value === D.HORIZONTAL ? "width" : "height";
|
|
2678
2687
|
});
|
|
2679
|
-
async function
|
|
2680
|
-
o("lume__internal--hover",
|
|
2688
|
+
async function N(E) {
|
|
2689
|
+
o("lume__internal--hover", E), g("lume__internal--hover", E);
|
|
2681
2690
|
}
|
|
2682
|
-
return (
|
|
2683
|
-
(_(!0),
|
|
2684
|
-
key:
|
|
2685
|
-
onMouseenter: (
|
|
2691
|
+
return (E, F) => (_(), $("g", cl, [
|
|
2692
|
+
(_(!0), $(ee, null, W(d(m), (w, C) => (_(), $("g", {
|
|
2693
|
+
key: C,
|
|
2694
|
+
onMouseenter: (J) => N(C)
|
|
2686
2695
|
}, [
|
|
2687
|
-
(_(!0),
|
|
2696
|
+
(_(!0), $(ee, null, W(w, (J, U) => (_(), K(d(rt), j(f.value(J, U, C, w), {
|
|
2688
2697
|
key: `bar-${U}`,
|
|
2689
|
-
transition:
|
|
2698
|
+
transition: O.value,
|
|
2690
2699
|
"data-j-lume-bar": "",
|
|
2691
|
-
onClick: (
|
|
2692
|
-
index:
|
|
2700
|
+
onClick: (q) => o("bar-click", {
|
|
2701
|
+
index: C,
|
|
2693
2702
|
datasetIndex: U,
|
|
2694
|
-
event:
|
|
2703
|
+
event: q
|
|
2695
2704
|
})
|
|
2696
2705
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2697
2706
|
], 40, dl))), 128))
|
|
2698
2707
|
]));
|
|
2699
2708
|
}
|
|
2700
2709
|
}), ml = {
|
|
2701
|
-
[
|
|
2710
|
+
[D.VERTICAL]: {
|
|
2702
2711
|
withTooltip: !0,
|
|
2703
2712
|
xAxisOptions: {},
|
|
2704
2713
|
yAxisOptions: { gridLines: !0 },
|
|
2705
|
-
margins:
|
|
2714
|
+
margins: Le.VERTICAL
|
|
2706
2715
|
},
|
|
2707
|
-
[
|
|
2716
|
+
[D.HORIZONTAL]: {
|
|
2708
2717
|
withTooltip: !0,
|
|
2709
2718
|
xAxisOptions: { gridLines: !0 },
|
|
2710
2719
|
yAxisOptions: { gridLines: !1 },
|
|
2711
|
-
margins:
|
|
2720
|
+
margins: Le.HORIZONTAL
|
|
2712
2721
|
}
|
|
2713
2722
|
}, Fl = /* @__PURE__ */ Z({
|
|
2714
2723
|
__name: "lume-single-bar-chart",
|
|
@@ -2716,40 +2725,40 @@ const cl = {
|
|
|
2716
2725
|
...Ie(nt)
|
|
2717
2726
|
},
|
|
2718
2727
|
setup(e, { emit: n }) {
|
|
2719
|
-
const t = e, { componentEventPropagator: o } =
|
|
2720
|
-
() => ml[u.value ||
|
|
2728
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(re()), { orientation: u, options: a } = ne(t), i = v(
|
|
2729
|
+
() => ml[u.value || D.VERTICAL]
|
|
2721
2730
|
// needs to be computed so that default options are reactive
|
|
2722
|
-
), { allOptions: s } =
|
|
2731
|
+
), { allOptions: s } = pe(a, i);
|
|
2723
2732
|
return (c, p) => (_(), K(d(we), j(t, {
|
|
2724
2733
|
"chart-type": "single-bar",
|
|
2725
2734
|
options: d(s),
|
|
2726
2735
|
"data-j-single-bar-chart": ""
|
|
2727
|
-
}, le(d(o))),
|
|
2728
|
-
groups:
|
|
2729
|
-
|
|
2736
|
+
}, le(d(o))), de({
|
|
2737
|
+
groups: V((r) => [
|
|
2738
|
+
ie(d(ct), j(r, { orientation: d(u) }, le(d(o))), null, 16, ["orientation"])
|
|
2730
2739
|
]),
|
|
2731
2740
|
_: 2
|
|
2732
2741
|
}, [
|
|
2733
|
-
W(d(
|
|
2734
|
-
name:
|
|
2735
|
-
fn:
|
|
2736
|
-
|
|
2742
|
+
W(d(l), (r, h) => ({
|
|
2743
|
+
name: h,
|
|
2744
|
+
fn: V((g) => [
|
|
2745
|
+
S(c.$slots, h, he(ge(g || {})))
|
|
2737
2746
|
])
|
|
2738
2747
|
}))
|
|
2739
2748
|
]), 1040, ["options"]));
|
|
2740
2749
|
}
|
|
2741
2750
|
}), pl = {
|
|
2742
|
-
[
|
|
2751
|
+
[D.VERTICAL]: {
|
|
2743
2752
|
withTooltip: !0,
|
|
2744
2753
|
xAxisOptions: {},
|
|
2745
2754
|
yAxisOptions: { gridLines: !0 },
|
|
2746
|
-
margins:
|
|
2755
|
+
margins: Le.VERTICAL
|
|
2747
2756
|
},
|
|
2748
|
-
[
|
|
2757
|
+
[D.HORIZONTAL]: {
|
|
2749
2758
|
withTooltip: !0,
|
|
2750
2759
|
xAxisOptions: { gridLines: !0 },
|
|
2751
2760
|
yAxisOptions: { gridLines: !1 },
|
|
2752
|
-
margins:
|
|
2761
|
+
margins: Le.HORIZONTAL,
|
|
2753
2762
|
tooltipOptions: { position: "right" }
|
|
2754
2763
|
}
|
|
2755
2764
|
}, zl = /* @__PURE__ */ Z({
|
|
@@ -2758,43 +2767,43 @@ const cl = {
|
|
|
2758
2767
|
...Ie()
|
|
2759
2768
|
},
|
|
2760
2769
|
setup(e, { emit: n }) {
|
|
2761
|
-
const t = e, { componentEventPropagator: o } =
|
|
2762
|
-
() => pl[u.value ||
|
|
2770
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(re()), { orientation: u, options: a } = ne(t), i = v(
|
|
2771
|
+
() => pl[u.value || D.VERTICAL]
|
|
2763
2772
|
// needs to be computed so that default options are reactive
|
|
2764
|
-
), { allOptions: s } =
|
|
2765
|
-
|
|
2773
|
+
), { allOptions: s } = pe(
|
|
2774
|
+
a,
|
|
2766
2775
|
i
|
|
2767
2776
|
);
|
|
2768
2777
|
return (c, p) => (_(), K(d(we), j(t, {
|
|
2769
2778
|
"chart-type": "grouped-bar",
|
|
2770
2779
|
options: d(s),
|
|
2771
2780
|
"data-j-grouped-bar-chart": ""
|
|
2772
|
-
}, le(d(o))),
|
|
2773
|
-
groups:
|
|
2774
|
-
|
|
2781
|
+
}, le(d(o))), de({
|
|
2782
|
+
groups: V((r) => [
|
|
2783
|
+
ie(d(ct), j(r, { type: "grouped" }, le(d(o))), null, 16)
|
|
2775
2784
|
]),
|
|
2776
2785
|
_: 2
|
|
2777
2786
|
}, [
|
|
2778
|
-
W(d(
|
|
2779
|
-
name:
|
|
2780
|
-
fn:
|
|
2781
|
-
|
|
2787
|
+
W(d(l), (r, h) => ({
|
|
2788
|
+
name: h,
|
|
2789
|
+
fn: V((g) => [
|
|
2790
|
+
S(c.$slots, h, he(ge(g || {})))
|
|
2782
2791
|
])
|
|
2783
2792
|
}))
|
|
2784
2793
|
]), 1040, ["options"]));
|
|
2785
2794
|
}
|
|
2786
2795
|
}), fl = {
|
|
2787
|
-
[
|
|
2796
|
+
[D.VERTICAL]: {
|
|
2788
2797
|
withTooltip: !0,
|
|
2789
2798
|
xAxisOptions: {},
|
|
2790
2799
|
yAxisOptions: { gridLines: !0 },
|
|
2791
|
-
margins:
|
|
2800
|
+
margins: Le.VERTICAL
|
|
2792
2801
|
},
|
|
2793
|
-
[
|
|
2802
|
+
[D.HORIZONTAL]: {
|
|
2794
2803
|
withTooltip: !0,
|
|
2795
2804
|
xAxisOptions: { gridLines: !0 },
|
|
2796
2805
|
yAxisOptions: { gridLines: !1 },
|
|
2797
|
-
margins:
|
|
2806
|
+
margins: Le.HORIZONTAL,
|
|
2798
2807
|
tooltipOptions: { position: "right" }
|
|
2799
2808
|
}
|
|
2800
2809
|
}, Wl = /* @__PURE__ */ Z({
|
|
@@ -2803,33 +2812,33 @@ const cl = {
|
|
|
2803
2812
|
...Ie()
|
|
2804
2813
|
},
|
|
2805
2814
|
setup(e, { emit: n }) {
|
|
2806
|
-
const t = e, { componentEventPropagator: o } =
|
|
2807
|
-
() => fl[
|
|
2815
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(re()), { data: u, orientation: a, options: i, labels: s } = ne(t), c = v(
|
|
2816
|
+
() => fl[a.value || D.VERTICAL]
|
|
2808
2817
|
// needs to be computed so that default options are reactive
|
|
2809
|
-
), { allOptions:
|
|
2818
|
+
), { allOptions: p } = pe(
|
|
2810
2819
|
i,
|
|
2811
|
-
|
|
2812
|
-
), { internalData:
|
|
2813
|
-
|
|
2814
|
-
|
|
2820
|
+
c
|
|
2821
|
+
), { internalData: r } = st(u), { groupedData: h } = tn(r, s), { stackedXScaleGenerator: g, stackedYScaleGenerator: m } = il(
|
|
2822
|
+
h,
|
|
2823
|
+
a,
|
|
2815
2824
|
i
|
|
2816
2825
|
);
|
|
2817
|
-
return (
|
|
2826
|
+
return (A, x) => (_(), K(d(we), j(t, {
|
|
2818
2827
|
"chart-type": "stacked-bar",
|
|
2819
|
-
options: d(
|
|
2820
|
-
"x-scale": d(
|
|
2821
|
-
"y-scale": d(
|
|
2828
|
+
options: d(p),
|
|
2829
|
+
"x-scale": d(g),
|
|
2830
|
+
"y-scale": d(m),
|
|
2822
2831
|
"data-j-stacked-bar-chart": ""
|
|
2823
|
-
}, le(d(o))),
|
|
2824
|
-
groups:
|
|
2825
|
-
|
|
2832
|
+
}, le(d(o))), de({
|
|
2833
|
+
groups: V((T) => [
|
|
2834
|
+
ie(d(ct), j(T, { type: "stacked" }, le(d(o))), null, 16)
|
|
2826
2835
|
]),
|
|
2827
2836
|
_: 2
|
|
2828
2837
|
}, [
|
|
2829
|
-
W(d(
|
|
2830
|
-
name:
|
|
2831
|
-
fn:
|
|
2832
|
-
|
|
2838
|
+
W(d(l), (T, f) => ({
|
|
2839
|
+
name: f,
|
|
2840
|
+
fn: V((O) => [
|
|
2841
|
+
S(A.$slots, f, he(ge(O || {})))
|
|
2833
2842
|
])
|
|
2834
2843
|
}))
|
|
2835
2844
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
@@ -2847,7 +2856,7 @@ const cl = {
|
|
|
2847
2856
|
},
|
|
2848
2857
|
color: {
|
|
2849
2858
|
type: String,
|
|
2850
|
-
default:
|
|
2859
|
+
default: se.Skyblue
|
|
2851
2860
|
},
|
|
2852
2861
|
dashed: {
|
|
2853
2862
|
type: Boolean,
|
|
@@ -2868,8 +2877,8 @@ const cl = {
|
|
|
2868
2877
|
},
|
|
2869
2878
|
emits: ["click"],
|
|
2870
2879
|
setup(e, { emit: n }) {
|
|
2871
|
-
const t = n, o =
|
|
2872
|
-
return
|
|
2880
|
+
const t = n, o = B(null);
|
|
2881
|
+
return ye(() => je(o.value)), (l, u) => (_(), $("path", {
|
|
2873
2882
|
ref_key: "root",
|
|
2874
2883
|
ref: o,
|
|
2875
2884
|
class: oe(["lume-line", {
|
|
@@ -2879,23 +2888,23 @@ const cl = {
|
|
|
2879
2888
|
}]),
|
|
2880
2889
|
d: e.pathDefinition,
|
|
2881
2890
|
"stroke-width": e.width,
|
|
2882
|
-
style:
|
|
2891
|
+
style: Rt({
|
|
2883
2892
|
animationDelay: e.transition && e.animationDelay + "s",
|
|
2884
2893
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2885
2894
|
}),
|
|
2886
2895
|
"data-j-line": "",
|
|
2887
|
-
onClick: u[0] || (u[0] = (
|
|
2896
|
+
onClick: u[0] || (u[0] = (a) => t("click", a))
|
|
2888
2897
|
}, null, 14, hl));
|
|
2889
2898
|
}
|
|
2890
2899
|
});
|
|
2891
|
-
const yl = /* @__PURE__ */
|
|
2900
|
+
const yl = /* @__PURE__ */ te(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx", "cy", "r", "stroke-width"], bl = 4, Al = /* @__PURE__ */ Z({
|
|
2892
2901
|
__name: "lume-point",
|
|
2893
2902
|
props: {
|
|
2894
2903
|
x: { type: Number, required: !0 },
|
|
2895
2904
|
y: { type: Number, required: !0 },
|
|
2896
2905
|
color: {
|
|
2897
2906
|
type: String,
|
|
2898
|
-
default:
|
|
2907
|
+
default: se.Skyblue
|
|
2899
2908
|
},
|
|
2900
2909
|
radius: {
|
|
2901
2910
|
type: Number,
|
|
@@ -2908,10 +2917,10 @@ const yl = /* @__PURE__ */ ee(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2908
2917
|
},
|
|
2909
2918
|
emits: ["click"],
|
|
2910
2919
|
setup(e, { emit: n }) {
|
|
2911
|
-
const t = e, o = n,
|
|
2912
|
-
return
|
|
2920
|
+
const t = e, o = n, l = B(null), u = v(() => t.radius / 2);
|
|
2921
|
+
return ye(() => je(l.value)), (a, i) => (_(), $("circle", {
|
|
2913
2922
|
ref_key: "root",
|
|
2914
|
-
ref:
|
|
2923
|
+
ref: l,
|
|
2915
2924
|
class: oe(["lume-point", `lume-stroke--${e.color}`]),
|
|
2916
2925
|
cx: e.x,
|
|
2917
2926
|
cy: e.y,
|
|
@@ -2922,15 +2931,15 @@ const yl = /* @__PURE__ */ ee(_l, [["__scopeId", "data-v-08896455"]]), kl = ["cx
|
|
|
2922
2931
|
}, null, 10, kl));
|
|
2923
2932
|
}
|
|
2924
2933
|
});
|
|
2925
|
-
const Tl = /* @__PURE__ */
|
|
2934
|
+
const Tl = /* @__PURE__ */ te(Al, [["__scopeId", "data-v-b6745177"]]);
|
|
2926
2935
|
function nn(e) {
|
|
2927
2936
|
function n(u) {
|
|
2928
|
-
let
|
|
2929
|
-
return u == null ? void 0 : u.reduce((i, s, c) => (s == null || s.value == null ? (
|
|
2937
|
+
let a = null;
|
|
2938
|
+
return u == null ? void 0 : u.reduce((i, s, c) => (s == null || s.value == null ? (a ? a.push(c) : a = [c], c === (u == null ? void 0 : u.length) - 1 && i.push(a)) : a && (i.push(a), a = null), i), []);
|
|
2930
2939
|
}
|
|
2931
|
-
function t(u,
|
|
2932
|
-
const r = Math.abs(u -
|
|
2933
|
-
return u >
|
|
2940
|
+
function t(u, a, i, s) {
|
|
2941
|
+
const r = Math.abs(u - a) / (i + 1) * (s + 1);
|
|
2942
|
+
return u > a ? u - r : u + r;
|
|
2934
2943
|
}
|
|
2935
2944
|
function o(u) {
|
|
2936
2945
|
return function(i) {
|
|
@@ -2940,26 +2949,26 @@ function nn(e) {
|
|
|
2940
2949
|
};
|
|
2941
2950
|
}
|
|
2942
2951
|
return { computedLineData: v(() => e.value.map((u) => {
|
|
2943
|
-
const
|
|
2952
|
+
const a = n(u.values);
|
|
2944
2953
|
return {
|
|
2945
2954
|
...u,
|
|
2946
|
-
isDashed: o(
|
|
2955
|
+
isDashed: o(a),
|
|
2947
2956
|
values: u.values.map((i, s) => {
|
|
2948
2957
|
var p, r;
|
|
2949
|
-
const c =
|
|
2950
|
-
(
|
|
2958
|
+
const c = a.find(
|
|
2959
|
+
(h) => h.includes(s)
|
|
2951
2960
|
);
|
|
2952
2961
|
if (c) {
|
|
2953
|
-
const
|
|
2954
|
-
let m = (p = u.values[
|
|
2955
|
-
return m == null && (m =
|
|
2962
|
+
const h = c[0] - 1, g = c[c.length - 1] + 1;
|
|
2963
|
+
let m = (p = u.values[h]) == null ? void 0 : p.value, A = (r = u.values[g]) == null ? void 0 : r.value;
|
|
2964
|
+
return m == null && (m = A), A == null && (A = m), {
|
|
2956
2965
|
value: t(
|
|
2957
2966
|
m,
|
|
2958
|
-
|
|
2967
|
+
A,
|
|
2959
2968
|
c.length,
|
|
2960
2969
|
c.indexOf(s)
|
|
2961
2970
|
),
|
|
2962
|
-
label:
|
|
2971
|
+
label: Ft
|
|
2963
2972
|
};
|
|
2964
2973
|
}
|
|
2965
2974
|
return i;
|
|
@@ -2969,14 +2978,14 @@ function nn(e) {
|
|
|
2969
2978
|
}
|
|
2970
2979
|
function Ll(e, n) {
|
|
2971
2980
|
const t = e.bandwidth() / 2;
|
|
2972
|
-
return (o,
|
|
2981
|
+
return (o, l) => e(e.domain()[n + (l - 1)]) + t;
|
|
2973
2982
|
}
|
|
2974
2983
|
function Ol(e, n) {
|
|
2975
2984
|
return (t, o) => e(n + (o - 1));
|
|
2976
2985
|
}
|
|
2977
2986
|
function xl(e, n, t, o) {
|
|
2978
2987
|
return hn().x(
|
|
2979
|
-
|
|
2988
|
+
ve(t) ? Ll(t, e) : Ol(t, e)
|
|
2980
2989
|
).y((u) => o(u))(n);
|
|
2981
2990
|
}
|
|
2982
2991
|
const $l = {
|
|
@@ -3001,114 +3010,115 @@ const $l = {
|
|
|
3001
3010
|
},
|
|
3002
3011
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3003
3012
|
setup(e, { emit: n }) {
|
|
3004
|
-
const t = e, o = n, { data:
|
|
3013
|
+
const t = e, o = n, { data: l, options: u, xScale: a, yScale: i, labels: s } = ne(t), c = De(
|
|
3005
3014
|
"tooltipAnchorAttributes",
|
|
3006
3015
|
null
|
|
3007
|
-
), { updateTooltipAnchorAttributes:
|
|
3008
|
-
|
|
3016
|
+
), { updateTooltipAnchorAttributes: p } = Jt(
|
|
3017
|
+
c,
|
|
3009
3018
|
u,
|
|
3010
|
-
|
|
3011
|
-
i
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3019
|
+
a,
|
|
3020
|
+
i,
|
|
3021
|
+
s
|
|
3022
|
+
), r = v(() => {
|
|
3023
|
+
if (l.value.every((C) => C.isDashed))
|
|
3024
|
+
return l.value;
|
|
3025
|
+
const { computedLineData: w } = nn(l);
|
|
3026
|
+
return u.value.withTooltip !== !1 && (c != null && c.value) && p(w.value), w.value;
|
|
3027
|
+
}), h = v(() => {
|
|
3018
3028
|
if (t.hoveredIndex === -1)
|
|
3019
3029
|
return;
|
|
3020
|
-
const
|
|
3021
|
-
|
|
3030
|
+
const w = wn(
|
|
3031
|
+
r.value,
|
|
3022
3032
|
t.hoveredIndex
|
|
3023
3033
|
);
|
|
3024
3034
|
return {
|
|
3025
|
-
d: `M ${Ye(
|
|
3026
|
-
V ${i.value(
|
|
3035
|
+
d: `M ${Ye(a.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3036
|
+
V ${i.value(w)}`
|
|
3027
3037
|
// Move to X index, Vertical line to the highest point
|
|
3028
3038
|
};
|
|
3029
|
-
}),
|
|
3030
|
-
() =>
|
|
3039
|
+
}), g = v(
|
|
3040
|
+
() => a.value && El / (En(a.value) - 1)
|
|
3031
3041
|
// Subtracting the first line (read below)
|
|
3032
|
-
),
|
|
3042
|
+
), m = v(
|
|
3033
3043
|
() => {
|
|
3034
|
-
var
|
|
3035
|
-
return ((
|
|
3044
|
+
var w;
|
|
3045
|
+
return ((w = u.value) == null ? void 0 : w.lineWidth) * 2 || void 0;
|
|
3036
3046
|
}
|
|
3037
3047
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3038
|
-
),
|
|
3039
|
-
() =>
|
|
3040
|
-
),
|
|
3048
|
+
), A = v(
|
|
3049
|
+
() => a.value.bandwidth() / 2
|
|
3050
|
+
), x = v(() => a.value.domain()), T = v(
|
|
3041
3051
|
() => u.value.withPoints ?? t.withPoints
|
|
3042
3052
|
);
|
|
3043
|
-
function
|
|
3044
|
-
return
|
|
3053
|
+
function f(w) {
|
|
3054
|
+
return r.value[w].values;
|
|
3045
3055
|
}
|
|
3046
|
-
function
|
|
3047
|
-
var U,
|
|
3048
|
-
const
|
|
3049
|
-
(U =
|
|
3050
|
-
(
|
|
3056
|
+
function O(w, C) {
|
|
3057
|
+
var U, q;
|
|
3058
|
+
const J = w === 0 ? [] : [
|
|
3059
|
+
(U = f(C)[w - 1]) == null ? void 0 : U.value,
|
|
3060
|
+
(q = f(C)[w]) == null ? void 0 : q.value
|
|
3051
3061
|
];
|
|
3052
3062
|
return xl(
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3063
|
+
w,
|
|
3064
|
+
J,
|
|
3065
|
+
a.value,
|
|
3056
3066
|
i.value
|
|
3057
3067
|
) || "";
|
|
3058
3068
|
}
|
|
3059
|
-
function
|
|
3069
|
+
function N(w) {
|
|
3060
3070
|
return {
|
|
3061
|
-
animationDelay:
|
|
3062
|
-
animationDuration:
|
|
3071
|
+
animationDelay: w < 2 ? 0 : (w - 1) * g.value,
|
|
3072
|
+
animationDuration: g.value
|
|
3063
3073
|
};
|
|
3064
3074
|
}
|
|
3065
|
-
function w
|
|
3075
|
+
function E(w, C) {
|
|
3066
3076
|
var U;
|
|
3067
|
-
const
|
|
3077
|
+
const J = (U = f(C)[w]) == null ? void 0 : U.value;
|
|
3068
3078
|
return {
|
|
3069
|
-
x:
|
|
3070
|
-
y: i.value(
|
|
3079
|
+
x: ve(a.value) ? t.xScale(x.value[w]) + A.value : t.xScale(w),
|
|
3080
|
+
y: i.value(J)
|
|
3071
3081
|
};
|
|
3072
3082
|
}
|
|
3073
|
-
function
|
|
3074
|
-
return t.hoveredIndex ===
|
|
3083
|
+
function F(w) {
|
|
3084
|
+
return t.hoveredIndex === w;
|
|
3075
3085
|
}
|
|
3076
|
-
return (
|
|
3077
|
-
G("path", j(
|
|
3086
|
+
return (w, C) => (_(), $("g", $l, [
|
|
3087
|
+
G("path", j(h.value, {
|
|
3078
3088
|
class: "lume-line-group__overlay-line",
|
|
3079
3089
|
"data-j-lume-line-group__overlay-line": ""
|
|
3080
3090
|
}), null, 16),
|
|
3081
|
-
(_(!0),
|
|
3082
|
-
key:
|
|
3091
|
+
(_(!0), $(ee, null, W(r.value, (J, U) => (_(), $("g", {
|
|
3092
|
+
key: J.label,
|
|
3083
3093
|
class: "lume-line-group__group"
|
|
3084
3094
|
}, [
|
|
3085
3095
|
G("g", Il, [
|
|
3086
|
-
(_(!0),
|
|
3087
|
-
key: `line-${
|
|
3088
|
-
color:
|
|
3089
|
-
dashed:
|
|
3090
|
-
"path-definition":
|
|
3096
|
+
(_(!0), $(ee, null, W(J.values, (q, P) => (_(), K(d(yl), j(N(P), {
|
|
3097
|
+
key: `line-${P}`,
|
|
3098
|
+
color: J.color,
|
|
3099
|
+
dashed: J.isDashed(P),
|
|
3100
|
+
"path-definition": O(P, U),
|
|
3091
3101
|
transition: e.transition,
|
|
3092
3102
|
width: d(u).lineWidth,
|
|
3093
|
-
onClick: (
|
|
3103
|
+
onClick: (ue) => o("line-click", { index: P, datasetIndex: U, event: ue })
|
|
3094
3104
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3095
3105
|
]),
|
|
3096
|
-
|
|
3097
|
-
(_(!0),
|
|
3098
|
-
key: `point-${
|
|
3099
|
-
active:
|
|
3100
|
-
color:
|
|
3101
|
-
index:
|
|
3102
|
-
radius:
|
|
3103
|
-
onClick: (
|
|
3106
|
+
T.value ? (_(), $("g", wl, [
|
|
3107
|
+
(_(!0), $(ee, null, W(J.values, (q, P) => (_(), K(d(Tl), j(E(P, U), {
|
|
3108
|
+
key: `point-${P}`,
|
|
3109
|
+
active: F(P),
|
|
3110
|
+
color: J.color,
|
|
3111
|
+
index: P,
|
|
3112
|
+
radius: m.value,
|
|
3113
|
+
onClick: (ue) => o("point-click", { index: P, datasetIndex: U, event: ue })
|
|
3104
3114
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3105
3115
|
])) : z("", !0)
|
|
3106
3116
|
]))), 128))
|
|
3107
3117
|
]));
|
|
3108
3118
|
}
|
|
3109
3119
|
});
|
|
3110
|
-
const on = /* @__PURE__ */
|
|
3111
|
-
margins:
|
|
3120
|
+
const on = /* @__PURE__ */ te(Nl, [["__scopeId", "data-v-649a5210"]]), Dl = {
|
|
3121
|
+
margins: Le.VERTICAL,
|
|
3112
3122
|
startOnZero: !0,
|
|
3113
3123
|
withTooltip: !0,
|
|
3114
3124
|
xAxisOptions: {},
|
|
@@ -3119,21 +3129,21 @@ const on = /* @__PURE__ */ ee(Nl, [["__scopeId", "data-v-c4d7f0ca"]]), Dl = {
|
|
|
3119
3129
|
...Ie(null, !1)
|
|
3120
3130
|
},
|
|
3121
3131
|
setup(e, { emit: n }) {
|
|
3122
|
-
const t = e, { componentEventPropagator: o } =
|
|
3132
|
+
const t = e, { componentEventPropagator: o } = ke(), l = Oe(re()), { options: u } = ne(t), { allOptions: a } = pe(u, Dl);
|
|
3123
3133
|
return (i, s) => (_(), K(d(we), j(t, {
|
|
3124
3134
|
"chart-type": "line",
|
|
3125
|
-
options: d(
|
|
3135
|
+
options: d(a),
|
|
3126
3136
|
"data-j-lume-line-chart": ""
|
|
3127
|
-
}, le(d(o))),
|
|
3128
|
-
groups:
|
|
3129
|
-
|
|
3137
|
+
}, le(d(o))), de({
|
|
3138
|
+
groups: V((c) => [
|
|
3139
|
+
ie(d(on), j(c, le(d(o))), null, 16)
|
|
3130
3140
|
]),
|
|
3131
3141
|
_: 2
|
|
3132
3142
|
}, [
|
|
3133
|
-
W(d(
|
|
3143
|
+
W(d(l), (c, p) => ({
|
|
3134
3144
|
name: p,
|
|
3135
|
-
fn:
|
|
3136
|
-
|
|
3145
|
+
fn: V((r) => [
|
|
3146
|
+
S(i.$slots, p, he(ge(r || {})))
|
|
3137
3147
|
])
|
|
3138
3148
|
}))
|
|
3139
3149
|
]), 1040, ["options"]));
|
|
@@ -3142,10 +3152,10 @@ const on = /* @__PURE__ */ ee(Nl, [["__scopeId", "data-v-c4d7f0ca"]]), Dl = {
|
|
|
3142
3152
|
function Hl(e) {
|
|
3143
3153
|
return { areaPathDefinition: v(
|
|
3144
3154
|
() => function(t, o) {
|
|
3145
|
-
if (!t || !o ||
|
|
3155
|
+
if (!t || !o || ve(t) || ve(o))
|
|
3146
3156
|
return;
|
|
3147
|
-
const
|
|
3148
|
-
return gn().x((u,
|
|
3157
|
+
const l = e.value[0].values;
|
|
3158
|
+
return gn().x((u, a) => t(a)).y0(o(Math.min(...o.domain()))).y1((u) => o(u.value))(l);
|
|
3149
3159
|
}
|
|
3150
3160
|
) };
|
|
3151
3161
|
}
|
|
@@ -3166,67 +3176,67 @@ const Ml = {
|
|
|
3166
3176
|
}, Bl = ["d"], Rl = /* @__PURE__ */ Z({
|
|
3167
3177
|
__name: "lume-sparkline-chart",
|
|
3168
3178
|
props: {
|
|
3169
|
-
...
|
|
3179
|
+
...it(null),
|
|
3170
3180
|
...He()
|
|
3171
3181
|
},
|
|
3172
3182
|
setup(e, { expose: n, emit: t }) {
|
|
3173
|
-
const o = e, { componentEventPropagator:
|
|
3174
|
-
() =>
|
|
3183
|
+
const o = e, { componentEventPropagator: l } = ke(), u = Oe(re()), { data: a, options: i } = ne(o), { internalData: s } = st(a), { allOptions: c } = pe(i, Ml), { computedLineData: p } = nn(s), { areaPathDefinition: r } = Hl(p), h = v(() => s.value[0].color), g = v(
|
|
3184
|
+
() => a.value[0].areaColor || h.value
|
|
3175
3185
|
);
|
|
3176
|
-
function m(
|
|
3186
|
+
function m(x) {
|
|
3177
3187
|
return {
|
|
3178
|
-
...
|
|
3188
|
+
...x,
|
|
3179
3189
|
noMinSize: !0
|
|
3180
3190
|
};
|
|
3181
3191
|
}
|
|
3182
|
-
function
|
|
3183
|
-
return Ne().range([0,
|
|
3192
|
+
function A(x, T, f) {
|
|
3193
|
+
return Ne().range([0, f.width]).domain([0, x[0].values.length - 1]);
|
|
3184
3194
|
}
|
|
3185
3195
|
return n({
|
|
3186
3196
|
areaPathDefinition: r
|
|
3187
|
-
}), (
|
|
3197
|
+
}), (x, T) => (_(), K(d(we), j(o, {
|
|
3188
3198
|
"chart-type": "line",
|
|
3189
3199
|
options: m(d(c)),
|
|
3190
|
-
"x-scale":
|
|
3191
|
-
}, le(d(
|
|
3192
|
-
groups:
|
|
3193
|
-
d(c).showArea ? (_(),
|
|
3200
|
+
"x-scale": A
|
|
3201
|
+
}, le(d(l))), de({
|
|
3202
|
+
groups: V((f) => [
|
|
3203
|
+
d(c).showArea ? (_(), $("path", {
|
|
3194
3204
|
key: 0,
|
|
3195
3205
|
class: oe([
|
|
3196
3206
|
"sparkline-chart__area",
|
|
3197
3207
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3198
|
-
`lume-fill--${g.value ||
|
|
3208
|
+
`lume-fill--${g.value || h.value}`,
|
|
3199
3209
|
"lume-fill--faded"
|
|
3200
3210
|
]),
|
|
3201
|
-
d: d(r)(
|
|
3211
|
+
d: d(r)(f.xScale, f.yScale),
|
|
3202
3212
|
"data-j-sparkline__area": ""
|
|
3203
3213
|
}, null, 10, Bl)) : z("", !0),
|
|
3204
|
-
|
|
3214
|
+
ie(d(on), j(f, { "with-points": !1 }, le(d(l))), null, 16)
|
|
3205
3215
|
]),
|
|
3206
3216
|
_: 2
|
|
3207
3217
|
}, [
|
|
3208
|
-
W(d(u), (
|
|
3209
|
-
name:
|
|
3210
|
-
fn:
|
|
3211
|
-
|
|
3218
|
+
W(d(u), (f, O) => ({
|
|
3219
|
+
name: O,
|
|
3220
|
+
fn: V((N) => [
|
|
3221
|
+
S(x.$slots, O, he(ge(N || {})), void 0, !0)
|
|
3212
3222
|
])
|
|
3213
3223
|
}))
|
|
3214
3224
|
]), 1040, ["options"]));
|
|
3215
3225
|
}
|
|
3216
3226
|
});
|
|
3217
|
-
const Ul = /* @__PURE__ */
|
|
3227
|
+
const Ul = /* @__PURE__ */ te(Rl, [["__scopeId", "data-v-c681fff6"]]);
|
|
3218
3228
|
export {
|
|
3219
3229
|
Vl as LumeAlluvialDiagram,
|
|
3220
3230
|
qa as LumeAlluvialGroup,
|
|
3221
3231
|
_a as LumeAlluvialNodeLabel,
|
|
3222
3232
|
ba as LumeAlluvialNodeValue,
|
|
3223
|
-
|
|
3224
|
-
|
|
3233
|
+
bt as LumeAxis,
|
|
3234
|
+
rt as LumeBar,
|
|
3225
3235
|
Pl as LumeBarChart,
|
|
3226
|
-
|
|
3236
|
+
ct as LumeBarGroup,
|
|
3227
3237
|
we as LumeChart,
|
|
3228
3238
|
uo as LumeChartContainer,
|
|
3229
|
-
|
|
3239
|
+
At as LumeChartLegend,
|
|
3230
3240
|
zl as LumeGroupedBarChart,
|
|
3231
3241
|
yl as LumeLine,
|
|
3232
3242
|
Zl as LumeLineChart,
|