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