@adyen/lume-vue3 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +625 -614
- package/dist/index.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as W, ref as R, openBlock as y, createElementBlock as x, mergeProps as C, createElementVNode as j, toDisplayString as oe, createCommentVNode as z, isRef as Nt, computed as v, watch as K, toRefs as ee, inject as Ne, reactive as Ce, onMounted as fe, unref as d, Fragment as Q, renderList as Z, createBlock as X, normalizeClass as ne, normalizeStyle as Dt, onBeforeUnmount as Ht, watchEffect as Bt, renderSlot as S, createTextVNode as de, useSlots as le, withDirectives as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as W, ref as R, openBlock as y, createElementBlock as x, mergeProps as C, createElementVNode as j, toDisplayString as oe, createCommentVNode as z, isRef as Nt, computed as v, watch as K, toRefs as ee, inject as Ne, reactive as Ce, onMounted as fe, unref as d, Fragment as Q, renderList as Z, createBlock as X, normalizeClass as ne, normalizeStyle as Dt, onBeforeUnmount as Ht, watchEffect as Bt, renderSlot as S, createTextVNode as de, useSlots as le, withDirectives as ln, withCtx as V, createSlots as se, vShow as rn, pushScopeId as un, popScopeId as sn, provide as Fe, createVNode as re, toHandlers as ae, normalizeProps as ve, guardReactiveProps as me, defineAsyncComponent as ze, resolveDynamicComponent as cn } from "vue";
|
|
2
|
+
import { format as dn, ticks as vn, scaleBand as we, scaleLinear as Ee, link as mn, line as pn, area as fn } from "d3";
|
|
3
|
+
import { createPopper as hn } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as gn, sankey as _n, sankeyJustify as yn } from "d3-sankey";
|
|
5
|
+
const kn = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
7
7
|
"pointer-events": "all",
|
|
8
8
|
"data-j-axis__tick-label": ""
|
|
9
|
-
},
|
|
9
|
+
}, bn = /* @__PURE__ */ W({
|
|
10
10
|
__name: "lume-tick",
|
|
11
11
|
props: {
|
|
12
12
|
value: {
|
|
@@ -43,9 +43,9 @@ const yn = {
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
|
-
setup(e, { expose:
|
|
47
|
-
const o =
|
|
48
|
-
return
|
|
46
|
+
setup(e, { expose: n, emit: t }) {
|
|
47
|
+
const o = t, a = R(null);
|
|
48
|
+
return n({ ref: a }), (r, l) => (y(), x("g", C(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -54,7 +54,7 @@ const yn = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
j("g",
|
|
57
|
+
j("g", kn, [
|
|
58
58
|
j("rect", C(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
@@ -69,12 +69,12 @@ const yn = {
|
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const q = (e,
|
|
73
|
-
const
|
|
74
|
-
for (const [o, a] of
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
}, ht = /* @__PURE__ */ q(
|
|
72
|
+
const q = (e, n) => {
|
|
73
|
+
const t = e.__vccOpts || e;
|
|
74
|
+
for (const [o, a] of n)
|
|
75
|
+
t[o] = a;
|
|
76
|
+
return t;
|
|
77
|
+
}, ht = /* @__PURE__ */ q(bn, [["__scopeId", "data-v-59ddc0a6"]]), An = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -87,166 +87,166 @@ function Mt() {
|
|
|
87
87
|
}
|
|
88
88
|
function Rt(e) {
|
|
89
89
|
return (e == null ? void 0 : e.map(
|
|
90
|
-
(
|
|
90
|
+
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
91
91
|
).flat()) || [];
|
|
92
92
|
}
|
|
93
93
|
function nt(e) {
|
|
94
94
|
return e.length === 1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Tn(e) {
|
|
97
97
|
return !!e && e.every(
|
|
98
|
-
(
|
|
98
|
+
(n) => "color" in n
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
function We(e) {
|
|
102
102
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
103
103
|
}
|
|
104
|
-
function St(e,
|
|
105
|
-
const
|
|
106
|
-
return Object.entries(
|
|
107
|
-
|
|
108
|
-
}),
|
|
104
|
+
function St(e, n) {
|
|
105
|
+
const t = { ...e };
|
|
106
|
+
return Object.entries(n).forEach(([o, a]) => {
|
|
107
|
+
t[o] = We(e[o]) && We(a) ? St(e[o], a) : a;
|
|
108
|
+
}), t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Ln(e) {
|
|
111
111
|
return e != null && We(e) && "value" in e;
|
|
112
112
|
}
|
|
113
113
|
function be(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function On(e) {
|
|
117
117
|
return be(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const $n = (e, n) => {
|
|
120
120
|
if (!e)
|
|
121
121
|
throw new Error("Data is not a valid array");
|
|
122
122
|
if (e.length === 0)
|
|
123
123
|
throw new Error("Cannot get highest value from empty array");
|
|
124
124
|
if (!e.some(
|
|
125
|
-
({ values: o }) => o.length - 1 >=
|
|
125
|
+
({ values: o }) => o.length - 1 >= n
|
|
126
126
|
))
|
|
127
127
|
throw new Error("Index exceeds length of all of the datasets");
|
|
128
128
|
};
|
|
129
|
-
function
|
|
130
|
-
var
|
|
131
|
-
return
|
|
129
|
+
function xn(e, n) {
|
|
130
|
+
var t;
|
|
131
|
+
return $n(e, n), ((t = e.reduce(
|
|
132
132
|
(o, a) => {
|
|
133
133
|
var r, l;
|
|
134
|
-
return (((r = o.values[
|
|
134
|
+
return (((r = o.values[n]) == null ? void 0 : r.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
135
135
|
}
|
|
136
|
-
).values[
|
|
136
|
+
).values[n]) == null ? void 0 : t.value) || 0;
|
|
137
137
|
}
|
|
138
138
|
function Ue(e) {
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
139
|
+
const n = Nt(e) ? e.value : e;
|
|
140
|
+
if (!n)
|
|
141
141
|
throw new Error("No empty array can be created from specified data value");
|
|
142
|
-
const
|
|
143
|
-
...
|
|
142
|
+
const t = Math.max(
|
|
143
|
+
...n.map((o) => o.values.length),
|
|
144
144
|
0
|
|
145
145
|
);
|
|
146
|
-
return Array(
|
|
146
|
+
return Array(t).fill(null);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function In(e) {
|
|
149
149
|
return be(e) ? e.domain().length : Math.max(...e.domain());
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return (
|
|
151
|
+
function wn(e, n) {
|
|
152
|
+
return (t) => Math.round(e * (1 - t) + n * t);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
const o =
|
|
154
|
+
function En(e, n, t) {
|
|
155
|
+
const o = t ? e.length - n : n, a = e.slice(0, o);
|
|
156
156
|
return e.slice(o).concat(a);
|
|
157
157
|
}
|
|
158
158
|
function Ae(e) {
|
|
159
159
|
if (e.groups) {
|
|
160
|
-
const
|
|
160
|
+
const n = Object.keys(e);
|
|
161
161
|
return Object.assign(
|
|
162
162
|
{},
|
|
163
|
-
...
|
|
163
|
+
...n.map((t) => t !== "groups" ? { [t]: e[t] } : {})
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
return e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Nn(e) {
|
|
169
169
|
return Object.assign(
|
|
170
170
|
{},
|
|
171
171
|
...Object.keys(e).map(
|
|
172
|
-
(
|
|
172
|
+
(n) => An.includes(n) ? {} : { [n]: e[n] }
|
|
173
173
|
)
|
|
174
174
|
);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
(
|
|
176
|
+
const Dn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
177
|
+
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
178
178
|
""
|
|
179
179
|
);
|
|
180
180
|
var pe = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
181
181
|
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e))(pe || {});
|
|
182
|
-
const
|
|
183
|
-
function ye(e,
|
|
184
|
-
|
|
182
|
+
const Hn = "[lume] ";
|
|
183
|
+
function ye(e, n = !0) {
|
|
184
|
+
n && Mt() || console.warn(Hn + "Warning: " + e);
|
|
185
185
|
}
|
|
186
186
|
const Se = (e) => {
|
|
187
|
-
let
|
|
187
|
+
let n = null;
|
|
188
188
|
switch (typeof e) {
|
|
189
189
|
case "string":
|
|
190
190
|
try {
|
|
191
|
-
|
|
191
|
+
n = dn(e);
|
|
192
192
|
} catch {
|
|
193
|
-
ye(pe.InvalidFormat),
|
|
193
|
+
ye(pe.InvalidFormat), n = null;
|
|
194
194
|
}
|
|
195
195
|
break;
|
|
196
196
|
case "function":
|
|
197
|
-
|
|
197
|
+
n = e;
|
|
198
198
|
break;
|
|
199
199
|
default:
|
|
200
|
-
|
|
200
|
+
n = null;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
202
|
+
function t(...o) {
|
|
203
|
+
return n ? n(...o) : o[0];
|
|
204
204
|
}
|
|
205
|
-
return
|
|
205
|
+
return t;
|
|
206
206
|
}, De = () => ({
|
|
207
207
|
options: {
|
|
208
208
|
type: Object,
|
|
209
209
|
default: () => ({})
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
|
-
function ce(e,
|
|
212
|
+
function ce(e, n) {
|
|
213
213
|
return { allOptions: v(() => {
|
|
214
|
-
const o = Nt(
|
|
214
|
+
const o = Nt(n) ? n == null ? void 0 : n.value : n;
|
|
215
215
|
return o ? St(o, e.value) : e.value;
|
|
216
216
|
}) };
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
220
|
-
const o = R(), a = v(() => Math.max(...e.value.range())), r = v(() =>
|
|
218
|
+
const Bn = 0.2;
|
|
219
|
+
function Mn(e, n, t) {
|
|
220
|
+
const o = R(), a = v(() => Math.max(...e.value.range())), r = v(() => n.value.length);
|
|
221
221
|
function l() {
|
|
222
|
-
if (!
|
|
222
|
+
if (!n.value)
|
|
223
223
|
return;
|
|
224
|
-
const s =
|
|
224
|
+
const s = n.value.reduce(
|
|
225
225
|
(p, u) => p + u.ref.getBoundingClientRect().width,
|
|
226
226
|
0
|
|
227
227
|
), c = Math.ceil(s / r.value);
|
|
228
|
-
o.value = c + c *
|
|
228
|
+
o.value = c + c * Bn;
|
|
229
229
|
}
|
|
230
230
|
function i(s) {
|
|
231
|
-
if (!
|
|
231
|
+
if (!n.value)
|
|
232
232
|
return !0;
|
|
233
|
-
const c =
|
|
233
|
+
const c = n.value.length;
|
|
234
234
|
if (s === 0)
|
|
235
235
|
return !0;
|
|
236
|
-
const p = a.value / c, u = typeof
|
|
236
|
+
const p = a.value / c, u = typeof t == "number" && t > 0 && t + 1 || Math.ceil(o.value / p);
|
|
237
237
|
return s % u === 0;
|
|
238
238
|
}
|
|
239
|
-
return K(
|
|
239
|
+
return K(n, l), { showTick: i };
|
|
240
240
|
}
|
|
241
241
|
var ue = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ue || {}), Ct = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Ct || {}), ot = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(ot || {}), at = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(at || {}), lt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(lt || {});
|
|
242
242
|
const B = {
|
|
243
243
|
HORIZONTAL: "horizontal",
|
|
244
244
|
VERTICAL: "vertical"
|
|
245
|
-
},
|
|
245
|
+
}, Rn = {
|
|
246
246
|
SINGLE: "single",
|
|
247
247
|
GROUPED: "grouped",
|
|
248
248
|
STACKED: "stacked"
|
|
249
|
-
}, Gt = "No data", gt = 20, jt = 0.33, Pt = 0.5, Vt = 12, He = 8,
|
|
249
|
+
}, Gt = "No data", gt = 20, jt = 0.33, Pt = 0.5, Vt = 12, He = 8, Sn = 1, Cn = [
|
|
250
250
|
"auto",
|
|
251
251
|
"auto-start",
|
|
252
252
|
"auto-end",
|
|
@@ -282,14 +282,14 @@ const Ft = {
|
|
|
282
282
|
tickFormat: null,
|
|
283
283
|
/** Space between the tick label and the axis line. */
|
|
284
284
|
tickPadding: 8
|
|
285
|
-
},
|
|
285
|
+
}, Gn = {
|
|
286
286
|
...Ft,
|
|
287
287
|
withTitle: !1,
|
|
288
288
|
skip: !0
|
|
289
|
-
},
|
|
289
|
+
}, jn = {
|
|
290
290
|
...Ft,
|
|
291
291
|
gridLines: !0
|
|
292
|
-
},
|
|
292
|
+
}, Pn = function(e, n, t) {
|
|
293
293
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
294
294
|
function a(s, c) {
|
|
295
295
|
return {
|
|
@@ -305,7 +305,7 @@ const Ft = {
|
|
|
305
305
|
return {
|
|
306
306
|
x: -(c - e.value.step()) / 2,
|
|
307
307
|
width: c,
|
|
308
|
-
height:
|
|
308
|
+
height: t.value.tickPadding + Vt + He
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
function l() {
|
|
@@ -313,14 +313,14 @@ const Ft = {
|
|
|
313
313
|
return {
|
|
314
314
|
x1: s,
|
|
315
315
|
x2: s,
|
|
316
|
-
y1: -
|
|
316
|
+
y1: -n.value.height
|
|
317
317
|
// Negative height means it goes from bottom to top
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
function i() {
|
|
321
321
|
return {
|
|
322
322
|
x: e.value.step() / 2,
|
|
323
|
-
y:
|
|
323
|
+
y: t.value.tickPadding,
|
|
324
324
|
dy: "0.8em",
|
|
325
325
|
"text-anchor": "middle"
|
|
326
326
|
};
|
|
@@ -331,7 +331,7 @@ const Ft = {
|
|
|
331
331
|
getTickGroupAttributes: a,
|
|
332
332
|
getTickLabelAttributes: i
|
|
333
333
|
};
|
|
334
|
-
},
|
|
334
|
+
}, Vn = function(e, n, t) {
|
|
335
335
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
336
336
|
function a(s, c) {
|
|
337
337
|
return {
|
|
@@ -340,7 +340,7 @@ const Ft = {
|
|
|
340
340
|
}
|
|
341
341
|
function r(s) {
|
|
342
342
|
var p;
|
|
343
|
-
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) +
|
|
343
|
+
const c = (s ? (p = s.getComputedTextLength) == null ? void 0 : p.call(s) : 42) + t.value.tickPadding + He;
|
|
344
344
|
return {
|
|
345
345
|
x: -c,
|
|
346
346
|
width: c,
|
|
@@ -352,12 +352,12 @@ const Ft = {
|
|
|
352
352
|
return {
|
|
353
353
|
y1: s,
|
|
354
354
|
y2: s,
|
|
355
|
-
x1:
|
|
355
|
+
x1: n.value.width
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
function i() {
|
|
359
359
|
return {
|
|
360
|
-
x: -
|
|
360
|
+
x: -t.value.tickPadding,
|
|
361
361
|
y: e.value.step() / 2,
|
|
362
362
|
"text-anchor": "end",
|
|
363
363
|
"alignment-baseline": "middle"
|
|
@@ -369,7 +369,7 @@ const Ft = {
|
|
|
369
369
|
getTickGroupAttributes: a,
|
|
370
370
|
getTickLabelAttributes: i
|
|
371
371
|
};
|
|
372
|
-
},
|
|
372
|
+
}, Fn = function(e, n, t) {
|
|
373
373
|
const o = v(() => {
|
|
374
374
|
const s = e.value.ticks();
|
|
375
375
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
@@ -381,19 +381,19 @@ const Ft = {
|
|
|
381
381
|
}
|
|
382
382
|
function r() {
|
|
383
383
|
return {
|
|
384
|
-
height:
|
|
384
|
+
height: t.value.tickPadding + Vt + He,
|
|
385
385
|
width: o.value,
|
|
386
386
|
x: -(o.value / 2)
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
389
|
function l() {
|
|
390
390
|
return {
|
|
391
|
-
y1: -
|
|
391
|
+
y1: -n.value.height
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
394
|
function i() {
|
|
395
395
|
return {
|
|
396
|
-
y:
|
|
396
|
+
y: t.value.tickPadding,
|
|
397
397
|
dy: "0.8em",
|
|
398
398
|
"text-anchor": "middle"
|
|
399
399
|
};
|
|
@@ -404,7 +404,7 @@ const Ft = {
|
|
|
404
404
|
getTickGroupAttributes: a,
|
|
405
405
|
getTickLabelAttributes: i
|
|
406
406
|
};
|
|
407
|
-
},
|
|
407
|
+
}, zn = function(e, n, t) {
|
|
408
408
|
const o = v(() => {
|
|
409
409
|
const s = e.value.ticks();
|
|
410
410
|
return s.length > 1 ? e.value(s[1]) - e.value(s[0]) : 0;
|
|
@@ -416,7 +416,7 @@ const Ft = {
|
|
|
416
416
|
}
|
|
417
417
|
function r(s) {
|
|
418
418
|
var p;
|
|
419
|
-
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) +
|
|
419
|
+
const c = (((p = s == null ? void 0 : s.getComputedTextLength) == null ? void 0 : p.call(s)) || 0) + t.value.tickPadding + He;
|
|
420
420
|
return {
|
|
421
421
|
width: c,
|
|
422
422
|
height: o.value,
|
|
@@ -426,12 +426,12 @@ const Ft = {
|
|
|
426
426
|
}
|
|
427
427
|
function l() {
|
|
428
428
|
return {
|
|
429
|
-
x1:
|
|
429
|
+
x1: n.value.width
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
function i() {
|
|
433
433
|
return {
|
|
434
|
-
x: -
|
|
434
|
+
x: -t.value.tickPadding,
|
|
435
435
|
dy: "0.4em",
|
|
436
436
|
"text-anchor": "end"
|
|
437
437
|
};
|
|
@@ -442,12 +442,12 @@ const Ft = {
|
|
|
442
442
|
getTickGroupAttributes: a,
|
|
443
443
|
getTickLabelAttributes: i
|
|
444
444
|
};
|
|
445
|
-
},
|
|
446
|
-
"x-band-scale-axis":
|
|
447
|
-
"y-band-scale-axis":
|
|
448
|
-
"x-linear-scale-axis":
|
|
449
|
-
"y-linear-scale-axis":
|
|
450
|
-
},
|
|
445
|
+
}, Zn = {
|
|
446
|
+
"x-band-scale-axis": Pn,
|
|
447
|
+
"y-band-scale-axis": Vn,
|
|
448
|
+
"x-linear-scale-axis": Fn,
|
|
449
|
+
"y-linear-scale-axis": zn
|
|
450
|
+
}, Wn = ["transform"], Un = { key: 0 }, Xn = /* @__PURE__ */ j("linearGradient", { id: "lume-tick-gradient" }, [
|
|
451
451
|
/* @__PURE__ */ j("stop", {
|
|
452
452
|
offset: "0%",
|
|
453
453
|
"stop-color": "rgba(255,255,255,0)"
|
|
@@ -464,8 +464,8 @@ const Ft = {
|
|
|
464
464
|
offset: "100%",
|
|
465
465
|
"stop-color": "rgba(255,255,255,0)"
|
|
466
466
|
})
|
|
467
|
-
], -1),
|
|
468
|
-
|
|
467
|
+
], -1), Yn = [
|
|
468
|
+
Xn
|
|
469
469
|
];
|
|
470
470
|
var zt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(zt || {}), Zt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Zt || {}), Xe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(Xe || {});
|
|
471
471
|
const _t = /* @__PURE__ */ W({
|
|
@@ -500,8 +500,8 @@ const _t = /* @__PURE__ */ W({
|
|
|
500
500
|
...De()
|
|
501
501
|
},
|
|
502
502
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
503
|
-
setup(e, { emit:
|
|
504
|
-
const o = e, a =
|
|
503
|
+
setup(e, { emit: n }) {
|
|
504
|
+
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: s, orientation: c } = ee(o), p = Ne("isEmpty", R(!1)), u = Ce({}), f = R(null), g = R(null), m = R(null), T = v(
|
|
505
505
|
() => o.type ? Xe[o.type] : o.position
|
|
506
506
|
), O = v(
|
|
507
507
|
() => o.type || (T.value === "left" ? "y" : "x")
|
|
@@ -509,15 +509,15 @@ const _t = /* @__PURE__ */ W({
|
|
|
509
509
|
() => O.value === "x" && c.value === B.VERTICAL || O.value === "y" && c.value === B.HORIZONTAL
|
|
510
510
|
), { allOptions: h } = ce(
|
|
511
511
|
s,
|
|
512
|
-
O.value === "x" ?
|
|
513
|
-
), { showTick: $ } =
|
|
512
|
+
O.value === "x" ? Gn : jn
|
|
513
|
+
), { showTick: $ } = Mn(r, f, h.value.skip), w = v(() => {
|
|
514
514
|
var M, k, E, _;
|
|
515
515
|
return O.value === "y" && p.value ? `translate(0, ${((M = l.value) == null ? void 0 : M.height) / 2})` : O.value === "x" && p.value ? `translate(-${((k = l.value) == null ? void 0 : k.width) / 2}, ${(E = l.value) == null ? void 0 : E.height})` : `translate(0, ${O.value === "x" ? (_ = l.value) == null ? void 0 : _.height : 0})`;
|
|
516
516
|
}), D = v(() => {
|
|
517
517
|
if (be(r.value))
|
|
518
518
|
return r.value.labels || r.value.domain();
|
|
519
519
|
const { tickCount: M } = h.value, [k, E] = r.value.domain();
|
|
520
|
-
return
|
|
520
|
+
return vn(k, E, M);
|
|
521
521
|
}), N = v(() => {
|
|
522
522
|
const { tickFormat: M } = h.value;
|
|
523
523
|
return Se(M);
|
|
@@ -573,7 +573,7 @@ const _t = /* @__PURE__ */ W({
|
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
function ge() {
|
|
576
|
-
const M = r.value.step ? "bandScale" : "linearScale", k =
|
|
576
|
+
const M = r.value.step ? "bandScale" : "linearScale", k = Zn[`${O.value}-${zt[M]}`];
|
|
577
577
|
Object.entries(k(r, l, h) || []).forEach(
|
|
578
578
|
([E, _]) => {
|
|
579
579
|
u[E] = _;
|
|
@@ -589,7 +589,7 @@ const _t = /* @__PURE__ */ W({
|
|
|
589
589
|
"data-j-axis": "",
|
|
590
590
|
onMouseleave: k[1] || (k[1] = (E) => a("mouseleave", E))
|
|
591
591
|
}, [
|
|
592
|
-
O.value === "x" ? (y(), x("defs",
|
|
592
|
+
O.value === "x" ? (y(), x("defs", Un, Yn)) : z("", !0),
|
|
593
593
|
(y(!0), x(Q, null, Z(m.value, (E, _) => (y(), X(d(ht), C({
|
|
594
594
|
key: `${E.value}_${_}`,
|
|
595
595
|
ref_for: !0,
|
|
@@ -610,28 +610,28 @@ const _t = /* @__PURE__ */ W({
|
|
|
610
610
|
E
|
|
611
611
|
))
|
|
612
612
|
}), null, 16)) : z("", !0)
|
|
613
|
-
], 40,
|
|
613
|
+
], 40, Wn)) : z("", !0);
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
|
-
function
|
|
617
|
-
const a = v(() =>
|
|
616
|
+
function Kn(e, n, t, o) {
|
|
617
|
+
const a = v(() => t.value > 0 && t.value < 1), r = v(
|
|
618
618
|
() => o.value > 0 && o.value < 1
|
|
619
619
|
), l = v(
|
|
620
620
|
() => a.value ? e.value - 0.5 : e.value
|
|
621
621
|
// draws the 1px bar closer to the axis
|
|
622
622
|
), i = v(
|
|
623
|
-
() => r.value ?
|
|
623
|
+
() => r.value ? n.value - 0.5 : n.value
|
|
624
624
|
// draws the 1px bar closer to the axis
|
|
625
625
|
);
|
|
626
626
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: r };
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
const a = R(0), r = R(0), l = v(() => `${e.value +
|
|
628
|
+
function Jn(e, n, t, o) {
|
|
629
|
+
const a = R(0), r = R(0), l = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
630
630
|
return fe(() => {
|
|
631
|
-
a.value =
|
|
632
|
-
}), K(
|
|
631
|
+
a.value = t.value, r.value = o.value;
|
|
632
|
+
}), K(t, (i) => a.value = i), K(o, (i) => r.value = i), { computedWidth: a, computedHeight: r, transformOrigin: l };
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const Qn = ["x", "y", "width", "height"], qn = /* @__PURE__ */ W({
|
|
635
635
|
__name: "lume-bar",
|
|
636
636
|
props: {
|
|
637
637
|
x: {
|
|
@@ -668,10 +668,10 @@ const Jn = ["x", "y", "width", "height"], Qn = /* @__PURE__ */ W({
|
|
|
668
668
|
}
|
|
669
669
|
},
|
|
670
670
|
emits: ["click", "mouseover", "mouseleave"],
|
|
671
|
-
setup(e, { emit:
|
|
672
|
-
const
|
|
671
|
+
setup(e, { emit: n }) {
|
|
672
|
+
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: s, classList: c } = ee(t), p = R(null), u = v(
|
|
673
673
|
() => typeof c.value == "string" ? [c.value] : c.value
|
|
674
|
-
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m =
|
|
674
|
+
), f = v(() => s.value === "width"), g = v(() => s.value === "height"), m = Jn(a, r, l, i), { computedX: T, computedY: O, shouldHaveMinWidth: b, shouldHaveMinHeight: h } = Kn(a, r, l, i), $ = v(() => b.value ? 1 : (f.value ? m.computedWidth : l).value), w = v(() => h.value ? 1 : (g.value ? m.computedHeight : i).value), D = f.value || g.value ? m.transformOrigin : null;
|
|
675
675
|
return fe(() => Ge(p.value)), (N, H) => (y(), x("rect", {
|
|
676
676
|
ref_key: "root",
|
|
677
677
|
ref: p,
|
|
@@ -693,25 +693,25 @@ const Jn = ["x", "y", "width", "height"], Qn = /* @__PURE__ */ W({
|
|
|
693
693
|
onClick: H[0] || (H[0] = (G) => o("click", G)),
|
|
694
694
|
onMouseover: H[1] || (H[1] = (G) => o("mouseover", G)),
|
|
695
695
|
onMouseleave: H[2] || (H[2] = (G) => o("mouseleave", G))
|
|
696
|
-
}, null, 46,
|
|
696
|
+
}, null, 46, Qn));
|
|
697
697
|
}
|
|
698
698
|
});
|
|
699
|
-
const rt = /* @__PURE__ */ q(
|
|
700
|
-
function
|
|
701
|
-
const e = R(),
|
|
699
|
+
const rt = /* @__PURE__ */ q(qn, [["__scopeId", "data-v-8e8f732a"]]);
|
|
700
|
+
function eo() {
|
|
701
|
+
const e = R(), n = Ce({
|
|
702
702
|
dimensions: {}
|
|
703
|
-
}),
|
|
703
|
+
}), t = new ResizeObserver((o) => {
|
|
704
704
|
o.forEach((a) => {
|
|
705
|
-
|
|
705
|
+
n.dimensions = a.contentRect;
|
|
706
706
|
});
|
|
707
707
|
});
|
|
708
708
|
return fe(() => {
|
|
709
|
-
|
|
709
|
+
t.observe(e.value);
|
|
710
710
|
}), Ht(() => {
|
|
711
|
-
|
|
712
|
-
}), { resizeState:
|
|
711
|
+
t.unobserve(e.value);
|
|
712
|
+
}), { resizeState: n, resizeRef: e };
|
|
713
713
|
}
|
|
714
|
-
const
|
|
714
|
+
const to = ["height"], no = ["transform"], oo = /* @__PURE__ */ W({
|
|
715
715
|
__name: "lume-chart-container",
|
|
716
716
|
props: {
|
|
717
717
|
margins: {
|
|
@@ -732,8 +732,8 @@ const eo = ["height"], to = ["transform"], no = /* @__PURE__ */ W({
|
|
|
732
732
|
}
|
|
733
733
|
},
|
|
734
734
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
735
|
-
setup(e, { emit:
|
|
736
|
-
const
|
|
735
|
+
setup(e, { emit: n }) {
|
|
736
|
+
const t = e, o = n, { margins: a, containerSize: r } = ee(t), l = R(null), { resizeRef: i, resizeState: s } = eo(), c = v(
|
|
737
737
|
() => r.value.height + a.value.top + a.value.bottom
|
|
738
738
|
);
|
|
739
739
|
return Bt(() => {
|
|
@@ -776,80 +776,80 @@ const eo = ["height"], to = ["transform"], no = /* @__PURE__ */ W({
|
|
|
776
776
|
"data-j-chart-container__group": ""
|
|
777
777
|
}, [
|
|
778
778
|
S(p.$slots, "default", {}, void 0, !0)
|
|
779
|
-
], 8,
|
|
780
|
-
], 42,
|
|
779
|
+
], 8, no)
|
|
780
|
+
], 42, to)),
|
|
781
781
|
S(p.$slots, "footer", {}, void 0, !0),
|
|
782
782
|
S(p.$slots, "extra", {}, void 0, !0)
|
|
783
783
|
], 2));
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
|
-
const
|
|
786
|
+
const ao = /* @__PURE__ */ q(oo, [["__scopeId", "data-v-36870bc4"]]), lo = ["onClick", "onMouseenter"], ro = /* @__PURE__ */ W({
|
|
787
787
|
__name: "lume-chart-legend",
|
|
788
788
|
props: {
|
|
789
789
|
data: {
|
|
790
790
|
type: Array,
|
|
791
|
-
validator:
|
|
791
|
+
validator: Tn,
|
|
792
792
|
required: !0
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
796
|
-
setup(e, { emit:
|
|
797
|
-
const
|
|
796
|
+
setup(e, { emit: n }) {
|
|
797
|
+
const t = n, o = Ne("isEmpty");
|
|
798
798
|
return (a, r) => d(o) ? z("", !0) : (y(), x("div", {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "lume-chart-legend",
|
|
801
801
|
"data-j-chart-legend": "",
|
|
802
|
-
onMouseleave: r[0] || (r[0] = (l) =>
|
|
802
|
+
onMouseleave: r[0] || (r[0] = (l) => t("mouseleave"))
|
|
803
803
|
}, [
|
|
804
804
|
(y(!0), x(Q, null, Z(e.data, (l, i) => (y(), x("div", {
|
|
805
805
|
key: `legend-item-${i}`,
|
|
806
806
|
class: "lume-chart-legend__item lume-typography--body",
|
|
807
807
|
tabindex: "0",
|
|
808
808
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
809
|
-
onClick: (s) =>
|
|
810
|
-
onMouseenter: (s) =>
|
|
809
|
+
onClick: (s) => t("click", { index: i, dataset: l, event: s }),
|
|
810
|
+
onMouseenter: (s) => t("mouseenter", { index: i, dataset: l, event: s })
|
|
811
811
|
}, [
|
|
812
812
|
j("span", {
|
|
813
813
|
class: ne(["lume-chart-legend__symbol", `lume-background-color--${l.color}`]),
|
|
814
814
|
"data-j-chart-legend__symbol": ""
|
|
815
815
|
}, null, 2),
|
|
816
816
|
de(" " + oe(l.label || i), 1)
|
|
817
|
-
], 40,
|
|
817
|
+
], 40, lo))), 128))
|
|
818
818
|
], 32));
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
|
-
const yt = /* @__PURE__ */ q(
|
|
822
|
-
const
|
|
821
|
+
const yt = /* @__PURE__ */ q(ro, [["__scopeId", "data-v-4710298b"]]);
|
|
822
|
+
const uo = {}, io = {
|
|
823
823
|
class: "lume-tooltip__title",
|
|
824
824
|
"data-j-tooltip__title": ""
|
|
825
825
|
};
|
|
826
|
-
function
|
|
827
|
-
return y(), x("div",
|
|
826
|
+
function so(e, n) {
|
|
827
|
+
return y(), x("div", io, [
|
|
828
828
|
S(e.$slots, "default", {}, void 0, !0)
|
|
829
829
|
]);
|
|
830
830
|
}
|
|
831
|
-
const
|
|
832
|
-
const
|
|
831
|
+
const co = /* @__PURE__ */ q(uo, [["render", so], ["__scopeId", "data-v-8af3fac6"]]);
|
|
832
|
+
const vo = {}, mo = {
|
|
833
833
|
class: "lume-tooltip__item",
|
|
834
834
|
"data-j-tooltip__summary-item": ""
|
|
835
|
-
},
|
|
836
|
-
function
|
|
837
|
-
return y(), x("li",
|
|
835
|
+
}, po = { class: "lume-tooltip__value" };
|
|
836
|
+
function fo(e, n) {
|
|
837
|
+
return y(), x("li", mo, [
|
|
838
838
|
j("span", null, [
|
|
839
839
|
S(e.$slots, "default", {}, void 0, !0)
|
|
840
840
|
]),
|
|
841
|
-
j("strong",
|
|
841
|
+
j("strong", po, [
|
|
842
842
|
S(e.$slots, "value", {}, void 0, !0)
|
|
843
843
|
])
|
|
844
844
|
]);
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const ho = /* @__PURE__ */ q(vo, [["render", fo], ["__scopeId", "data-v-4ed7ec1b"]]), go = {
|
|
847
847
|
class: "lume-tooltip__item",
|
|
848
848
|
"data-j-tooltip__item": ""
|
|
849
|
-
},
|
|
849
|
+
}, _o = { "data-j-tooltip__item__label": "" }, yo = {
|
|
850
850
|
class: "lume-tooltip__value",
|
|
851
851
|
"data-j-tooltip__item__value": ""
|
|
852
|
-
},
|
|
852
|
+
}, ko = /* @__PURE__ */ W({
|
|
853
853
|
__name: "lume-tooltip-item",
|
|
854
854
|
props: {
|
|
855
855
|
color: {
|
|
@@ -858,27 +858,27 @@ const fo = /* @__PURE__ */ q(co, [["render", po], ["__scopeId", "data-v-4ed7ec1b
|
|
|
858
858
|
}
|
|
859
859
|
},
|
|
860
860
|
setup(e) {
|
|
861
|
-
return (
|
|
861
|
+
return (n, t) => (y(), x("li", go, [
|
|
862
862
|
e.color ? (y(), x("span", {
|
|
863
863
|
key: 0,
|
|
864
864
|
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
865
865
|
"data-j-tooltip__item__symbol": ""
|
|
866
866
|
}, null, 2)) : z("", !0),
|
|
867
|
-
j("span",
|
|
868
|
-
S(
|
|
867
|
+
j("span", _o, [
|
|
868
|
+
S(n.$slots, "label", {}, void 0, !0)
|
|
869
869
|
]),
|
|
870
|
-
j("strong",
|
|
871
|
-
S(
|
|
870
|
+
j("strong", yo, [
|
|
871
|
+
S(n.$slots, "value", {}, void 0, !0)
|
|
872
872
|
])
|
|
873
873
|
]));
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
|
-
const
|
|
876
|
+
const bo = /* @__PURE__ */ q(ko, [["__scopeId", "data-v-4f995c3c"]]), Ao = (e) => (un("data-v-8ec11304"), e = e(), sn(), e), To = { class: "lume-tooltip__items" }, Lo = {
|
|
877
877
|
key: 0,
|
|
878
878
|
class: "lume-tooltip__break"
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
],
|
|
879
|
+
}, Oo = /* @__PURE__ */ Ao(() => /* @__PURE__ */ j("hr", null, null, -1)), $o = [
|
|
880
|
+
Oo
|
|
881
|
+
], xo = /* @__PURE__ */ W({
|
|
882
882
|
__name: "lume-tooltip",
|
|
883
883
|
props: {
|
|
884
884
|
targetElement: {
|
|
@@ -892,7 +892,7 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
892
892
|
position: {
|
|
893
893
|
type: String,
|
|
894
894
|
default: "auto",
|
|
895
|
-
validator: (e) =>
|
|
895
|
+
validator: (e) => Cn.includes(e)
|
|
896
896
|
},
|
|
897
897
|
fixedPositioning: {
|
|
898
898
|
type: Boolean,
|
|
@@ -913,9 +913,9 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
913
913
|
...De()
|
|
914
914
|
},
|
|
915
915
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
916
|
-
setup(e, { emit:
|
|
917
|
-
const
|
|
918
|
-
() => c.value.fixedPositioning ??
|
|
916
|
+
setup(e, { emit: n }) {
|
|
917
|
+
const t = e, o = n, a = R(null), { items: r, options: l } = ee(t), i = le(), s = R(null), { allOptions: c } = ce(l), p = v(
|
|
918
|
+
() => c.value.fixedPositioning ?? t.fixedPositioning
|
|
919
919
|
), u = v(
|
|
920
920
|
() => p.value ? "fixed" : "absolute"
|
|
921
921
|
), f = v(() => [
|
|
@@ -930,38 +930,38 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
930
930
|
name: "offset",
|
|
931
931
|
options: { offset: [0, c.value.offset || 8] }
|
|
932
932
|
},
|
|
933
|
-
...
|
|
933
|
+
...t.modifiers || []
|
|
934
934
|
]), g = v(
|
|
935
|
-
() => c.value.showTitle !== !1 &&
|
|
935
|
+
() => c.value.showTitle !== !1 && t.title != null
|
|
936
936
|
), m = v(() => Se(c.value.valueFormat)), T = v(() => Se(c.value.titleFormat)), O = v(
|
|
937
937
|
() => {
|
|
938
938
|
var D;
|
|
939
939
|
return ((D = r.value) == null ? void 0 : D.find((N) => N.isSummary)) || {
|
|
940
|
-
label: c.value.summary ??
|
|
940
|
+
label: c.value.summary ?? t.summary
|
|
941
941
|
};
|
|
942
942
|
}
|
|
943
943
|
), b = v(() => i.summary || O.value.label);
|
|
944
944
|
function h() {
|
|
945
|
-
|
|
946
|
-
placement:
|
|
945
|
+
t.targetElement && a.value && (s.value = hn(t.targetElement, a.value, {
|
|
946
|
+
placement: t.position,
|
|
947
947
|
strategy: u.value,
|
|
948
948
|
modifiers: f.value
|
|
949
|
-
}), o("opened",
|
|
949
|
+
}), o("opened", t.targetElement));
|
|
950
950
|
}
|
|
951
951
|
function $() {
|
|
952
952
|
s.value && (s.value.destroy(), o("closed"));
|
|
953
953
|
}
|
|
954
954
|
function w() {
|
|
955
|
-
s.value && (c.value.withAnimation !== !1 && a.value.classList.add("lume-tooltip--animated"),
|
|
956
|
-
s.value.state.elements.reference =
|
|
955
|
+
s.value && (c.value.withAnimation !== !1 && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
956
|
+
s.value.state.elements.reference = t.targetElement, s.value.update(), o("moved", t.targetElement);
|
|
957
957
|
}() : $());
|
|
958
958
|
}
|
|
959
959
|
return K(
|
|
960
|
-
() =>
|
|
960
|
+
() => t.targetElement,
|
|
961
961
|
(D, N) => {
|
|
962
962
|
!N && D ? h() : w();
|
|
963
963
|
}
|
|
964
|
-
), fe(h), Ht($), (D, N) =>
|
|
964
|
+
), fe(h), Ht($), (D, N) => ln((y(), x("div", {
|
|
965
965
|
ref_key: "root",
|
|
966
966
|
ref: a,
|
|
967
967
|
class: ne(["lume-tooltip lume-typography--caption", {
|
|
@@ -973,16 +973,16 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
973
973
|
}, [
|
|
974
974
|
S(D.$slots, "default", {}, () => [
|
|
975
975
|
S(D.$slots, "title", {}, () => [
|
|
976
|
-
g.value ? (y(), X(d(
|
|
976
|
+
g.value ? (y(), X(d(co), { key: 0 }, {
|
|
977
977
|
default: V(() => [
|
|
978
978
|
de(oe(T.value(e.title)), 1)
|
|
979
979
|
]),
|
|
980
980
|
_: 1
|
|
981
981
|
})) : z("", !0)
|
|
982
982
|
], !0),
|
|
983
|
-
j("ul",
|
|
983
|
+
j("ul", To, [
|
|
984
984
|
S(D.$slots, "summary", {}, () => [
|
|
985
|
-
b.value ? (y(), X(d(
|
|
985
|
+
b.value ? (y(), X(d(ho), { key: 0 }, se({
|
|
986
986
|
default: V(() => [
|
|
987
987
|
de(oe(O.value.label) + " ", 1)
|
|
988
988
|
]),
|
|
@@ -997,9 +997,9 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
997
997
|
} : void 0
|
|
998
998
|
]), 1024)) : z("", !0)
|
|
999
999
|
], !0),
|
|
1000
|
-
b.value ? (y(), x("li",
|
|
1000
|
+
b.value ? (y(), x("li", Lo, $o)) : z("", !0),
|
|
1001
1001
|
S(D.$slots, "items", {}, () => [
|
|
1002
|
-
(y(!0), x(Q, null, Z(d(r), (H) => (y(), X(d(
|
|
1002
|
+
(y(!0), x(Q, null, Z(d(r), (H) => (y(), X(d(bo), {
|
|
1003
1003
|
key: H.label,
|
|
1004
1004
|
color: H.color
|
|
1005
1005
|
}, {
|
|
@@ -1015,57 +1015,57 @@ const ko = /* @__PURE__ */ q(yo, [["__scopeId", "data-v-4f995c3c"]]), bo = (e) =
|
|
|
1015
1015
|
])
|
|
1016
1016
|
], !0)
|
|
1017
1017
|
], 34)), [
|
|
1018
|
-
[
|
|
1018
|
+
[rn, e.targetElement]
|
|
1019
1019
|
]);
|
|
1020
1020
|
}
|
|
1021
1021
|
});
|
|
1022
|
-
const
|
|
1022
|
+
const Io = /* @__PURE__ */ q(xo, [["__scopeId", "data-v-8ec11304"]]);
|
|
1023
1023
|
var _e = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(_e || {});
|
|
1024
|
-
const
|
|
1025
|
-
function Eo(e) {
|
|
1026
|
-
return e === _e.Divergent ? wo : Be;
|
|
1027
|
-
}
|
|
1024
|
+
const wo = _e.Categorical, Be = ue.Skyblue, Eo = ot.SkyTeal;
|
|
1028
1025
|
function No(e) {
|
|
1026
|
+
return e === _e.Divergent ? Eo : Be;
|
|
1027
|
+
}
|
|
1028
|
+
function Do(e) {
|
|
1029
1029
|
return Object.values(lt).includes(e);
|
|
1030
1030
|
}
|
|
1031
|
-
function kt(e,
|
|
1032
|
-
return
|
|
1031
|
+
function kt(e, n) {
|
|
1032
|
+
return n === _e.Divergent ? Object.values(ot).includes(e) : Object.values({
|
|
1033
1033
|
...ue,
|
|
1034
1034
|
...Ct,
|
|
1035
1035
|
...at,
|
|
1036
1036
|
...lt
|
|
1037
1037
|
}).includes(e);
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
const
|
|
1041
|
-
return
|
|
1039
|
+
function Ho(e, n) {
|
|
1040
|
+
const t = Object.values(ue).indexOf(e);
|
|
1041
|
+
return En(Object.values(ue), t > -1 ? t : 0)[n];
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const
|
|
1045
|
-
return `${e}-${
|
|
1043
|
+
function Bo(e, n) {
|
|
1044
|
+
const t = 50 + n * 10;
|
|
1045
|
+
return `${e}-${t}`;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
const
|
|
1049
|
-
return `${e}-${
|
|
1047
|
+
function Mo(e, n) {
|
|
1048
|
+
const t = (n + 1) * 10;
|
|
1049
|
+
return `${e}-${t}`;
|
|
1050
1050
|
}
|
|
1051
|
-
function bt(e,
|
|
1052
|
-
switch (
|
|
1051
|
+
function bt(e, n, t) {
|
|
1052
|
+
switch (n) {
|
|
1053
1053
|
default:
|
|
1054
1054
|
case _e.Categorical:
|
|
1055
|
-
return
|
|
1055
|
+
return Do(e) ? e : Ho(e, t);
|
|
1056
1056
|
case _e.Sequential:
|
|
1057
|
-
return
|
|
1057
|
+
return Bo(e, t);
|
|
1058
1058
|
case _e.Divergent:
|
|
1059
|
-
return
|
|
1059
|
+
return Mo(e, t);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return kt(e,
|
|
1064
|
-
}
|
|
1065
|
-
function Ro(e) {
|
|
1066
|
-
return e.map((t) => Tn(t) ? t : { value: t });
|
|
1062
|
+
function Ro(e, n, t = wo, o) {
|
|
1063
|
+
return kt(e, t) ? e : (o > 4 && (ye(pe.ColorLoop), o = o % 5), kt(n, t) ? bt(n, t, o) : bt(No(t), t, o));
|
|
1067
1064
|
}
|
|
1068
1065
|
function So(e) {
|
|
1066
|
+
return e.map((n) => Ln(n) ? n : { value: n });
|
|
1067
|
+
}
|
|
1068
|
+
function Co(e) {
|
|
1069
1069
|
return e.__internal === !0;
|
|
1070
1070
|
}
|
|
1071
1071
|
const ut = (e = null) => ({
|
|
@@ -1087,19 +1087,19 @@ const ut = (e = null) => ({
|
|
|
1087
1087
|
default: null
|
|
1088
1088
|
}
|
|
1089
1089
|
});
|
|
1090
|
-
function it(e,
|
|
1090
|
+
function it(e, n, t, o, a) {
|
|
1091
1091
|
const r = Ce({
|
|
1092
1092
|
width: 0,
|
|
1093
1093
|
height: 0
|
|
1094
|
-
}), l =
|
|
1094
|
+
}), l = Dn(12), i = v(() => {
|
|
1095
1095
|
var p;
|
|
1096
1096
|
return e.value.length > 5 && ye(pe.DatasetLength), (p = e.value) == null ? void 0 : p.map(
|
|
1097
1097
|
(u, f) => {
|
|
1098
|
-
if (
|
|
1098
|
+
if (Co(u))
|
|
1099
1099
|
return u;
|
|
1100
|
-
const g =
|
|
1100
|
+
const g = So(u.values), m = Ro(
|
|
1101
1101
|
u.color,
|
|
1102
|
-
|
|
1102
|
+
t == null ? void 0 : t.value,
|
|
1103
1103
|
o == null ? void 0 : o.value.colorPalette,
|
|
1104
1104
|
f
|
|
1105
1105
|
);
|
|
@@ -1111,7 +1111,7 @@ function it(e, t, n, o, a) {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
1113
|
);
|
|
1114
|
-
}), s = v(() => Array.isArray(
|
|
1114
|
+
}), s = v(() => Array.isArray(n.value) ? n.value : Ue(e.value).map((p, u) => u));
|
|
1115
1115
|
function c(p) {
|
|
1116
1116
|
const u = (a == null ? void 0 : a.value) === B.HORIZONTAL && Ue(e).length * (((o == null ? void 0 : o.value.barHeight) || gt) * 2) + ((o == null ? void 0 : o.value.barHeight) || gt) || p.height;
|
|
1117
1117
|
r.width = p.width, r.height = u;
|
|
@@ -1124,7 +1124,7 @@ function it(e, t, n, o, a) {
|
|
|
1124
1124
|
updateSize: c
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
|
-
const
|
|
1127
|
+
const Go = () => ({
|
|
1128
1128
|
xScale: {
|
|
1129
1129
|
type: Function,
|
|
1130
1130
|
default: null
|
|
@@ -1134,22 +1134,22 @@ const Co = () => ({
|
|
|
1134
1134
|
default: null
|
|
1135
1135
|
}
|
|
1136
1136
|
});
|
|
1137
|
-
function
|
|
1137
|
+
function jo(e, n, t, o, a) {
|
|
1138
1138
|
const r = R(null), l = R(null);
|
|
1139
1139
|
function i() {
|
|
1140
|
-
const { width: s, height: c } =
|
|
1141
|
-
!s && !c || !
|
|
1140
|
+
const { width: s, height: c } = t;
|
|
1141
|
+
!s && !c || !n.value || !e.value || (o.value === B.HORIZONTAL ? (r.value = Tt(
|
|
1142
1142
|
e.value,
|
|
1143
1143
|
s,
|
|
1144
1144
|
o.value,
|
|
1145
1145
|
a.value.startOnZero
|
|
1146
1146
|
), l.value = At(
|
|
1147
|
-
|
|
1147
|
+
n.value,
|
|
1148
1148
|
c,
|
|
1149
1149
|
o.value,
|
|
1150
1150
|
a.value
|
|
1151
1151
|
)) : (r.value = At(
|
|
1152
|
-
|
|
1152
|
+
n.value,
|
|
1153
1153
|
s,
|
|
1154
1154
|
o.value,
|
|
1155
1155
|
a.value
|
|
@@ -1162,40 +1162,40 @@ function Go(e, t, n, o, a) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
return Bt(i), { xScale: r, yScale: l };
|
|
1164
1164
|
}
|
|
1165
|
-
function At(e,
|
|
1166
|
-
const a = [0,
|
|
1165
|
+
function At(e, n, t, o) {
|
|
1166
|
+
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, s = r ?? (t === B.HORIZONTAL ? Pt : jt);
|
|
1167
1167
|
return Object.assign(
|
|
1168
1168
|
we().range(a).paddingInner(l ?? s).paddingOuter(i ?? s).domain(e.map((c, p) => p)),
|
|
1169
1169
|
{ labels: e }
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
|
-
function Tt(e,
|
|
1173
|
-
const a = Rt(e).filter((p) => p != null), r = [0,
|
|
1172
|
+
function Tt(e, n, t, o) {
|
|
1173
|
+
const a = Rt(e).filter((p) => p != null), r = [0, n];
|
|
1174
1174
|
if (a.length === 0)
|
|
1175
1175
|
return Ee().range(r).domain([0, 0]).nice();
|
|
1176
|
-
const l = Math.min(...a), i = o && l > 0 ? 0 : l, s = Math.max(...a), c =
|
|
1176
|
+
const l = Math.min(...a), i = o && l > 0 ? 0 : l, s = Math.max(...a), c = t === B.HORIZONTAL ? [i, s] : [s, i];
|
|
1177
1177
|
return Ee().range(r).domain(c).nice();
|
|
1178
1178
|
}
|
|
1179
1179
|
function Lt(e) {
|
|
1180
1180
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1181
1181
|
}
|
|
1182
|
-
function Ye(e,
|
|
1183
|
-
return be(e) ? e.bandwidth() / 2 + e(e.domain()[
|
|
1182
|
+
function Ye(e, n) {
|
|
1183
|
+
return be(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1184
1184
|
}
|
|
1185
|
-
function Ot(e,
|
|
1186
|
-
padding:
|
|
1185
|
+
function Ot(e, n, {
|
|
1186
|
+
padding: t,
|
|
1187
1187
|
paddingInner: o,
|
|
1188
1188
|
paddingOuter: a
|
|
1189
1189
|
} = {}) {
|
|
1190
|
-
const r =
|
|
1190
|
+
const r = t ?? (n === B.HORIZONTAL ? Pt : jt);
|
|
1191
1191
|
return e.copy().paddingInner(o ?? r).paddingOuter(a ?? r);
|
|
1192
1192
|
}
|
|
1193
1193
|
function Wt(e) {
|
|
1194
1194
|
return Object.values(B).includes(e);
|
|
1195
1195
|
}
|
|
1196
|
-
const xe = (e,
|
|
1196
|
+
const xe = (e, n = !0) => ({
|
|
1197
1197
|
...ut(e),
|
|
1198
|
-
...
|
|
1198
|
+
...Go(),
|
|
1199
1199
|
...De(),
|
|
1200
1200
|
classList: {
|
|
1201
1201
|
type: [String, Array],
|
|
@@ -1205,14 +1205,14 @@ const xe = (e, t = !0) => ({
|
|
|
1205
1205
|
type: Number,
|
|
1206
1206
|
default: null
|
|
1207
1207
|
},
|
|
1208
|
-
...
|
|
1208
|
+
...n ? {
|
|
1209
1209
|
orientation: {
|
|
1210
1210
|
type: String,
|
|
1211
1211
|
default: B.VERTICAL,
|
|
1212
1212
|
validator: Wt
|
|
1213
1213
|
}
|
|
1214
1214
|
} : {}
|
|
1215
|
-
}),
|
|
1215
|
+
}), Po = (e) => ({
|
|
1216
1216
|
...ut(e),
|
|
1217
1217
|
...De(),
|
|
1218
1218
|
hoveredElement: {
|
|
@@ -1261,7 +1261,7 @@ const xe = (e, t = !0) => ({
|
|
|
1261
1261
|
type: [String, Array],
|
|
1262
1262
|
default: () => []
|
|
1263
1263
|
}
|
|
1264
|
-
}),
|
|
1264
|
+
}), Vo = { class: "lume-overlay-group" }, Fo = /* @__PURE__ */ W({
|
|
1265
1265
|
__name: "lume-overlay-group",
|
|
1266
1266
|
props: {
|
|
1267
1267
|
...je(),
|
|
@@ -1271,11 +1271,11 @@ const xe = (e, t = !0) => ({
|
|
|
1271
1271
|
}
|
|
1272
1272
|
},
|
|
1273
1273
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1274
|
-
setup(e, { emit:
|
|
1275
|
-
const
|
|
1274
|
+
setup(e, { emit: n }) {
|
|
1275
|
+
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } = ee(t), s = v(() => Ue(a));
|
|
1276
1276
|
function c(p) {
|
|
1277
1277
|
var b;
|
|
1278
|
-
const u = r.value === B.HORIZONTAL ? i.value : l.value, f = u.domain(), g =
|
|
1278
|
+
const u = r.value === B.HORIZONTAL ? i.value : l.value, f = u.domain(), g = On(u), m = ((b = u.paddingInner) == null ? void 0 : b.call(u)) ?? 0, T = g * m, O = be(u) ? u(f[p]) - T / 2 : u(p) - g / 2;
|
|
1279
1279
|
return r.value === B.HORIZONTAL ? {
|
|
1280
1280
|
width: Math.max(...l.value.range()),
|
|
1281
1281
|
height: g,
|
|
@@ -1286,7 +1286,7 @@ const xe = (e, t = !0) => ({
|
|
|
1286
1286
|
transform: `translate(${O}, 0)`
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
|
-
return (p, u) => (y(), x("g",
|
|
1289
|
+
return (p, u) => (y(), x("g", Vo, [
|
|
1290
1290
|
(y(!0), x(Q, null, Z(s.value, (f, g) => (y(), X(d(rt), C(c(g), {
|
|
1291
1291
|
key: `overlay-${g}`,
|
|
1292
1292
|
"data-j-lume-overlay-group": g,
|
|
@@ -1297,35 +1297,35 @@ const xe = (e, t = !0) => ({
|
|
|
1297
1297
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1298
1298
|
]));
|
|
1299
1299
|
}
|
|
1300
|
-
}), he = (e,
|
|
1301
|
-
function
|
|
1300
|
+
}), he = (e, n) => {
|
|
1301
|
+
function t(r, ...l) {
|
|
1302
1302
|
}
|
|
1303
1303
|
function o(r, l) {
|
|
1304
1304
|
}
|
|
1305
|
-
return { componentEventPropagator: {}, emitInternalEvent:
|
|
1305
|
+
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1306
1306
|
};
|
|
1307
|
-
function
|
|
1307
|
+
function zo(e) {
|
|
1308
1308
|
return { hasNegativeValues: v(
|
|
1309
|
-
() => Rt(e.value).some((
|
|
1309
|
+
() => Rt(e.value).some((t) => t < 0)
|
|
1310
1310
|
) };
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Zo(e, n, t, o) {
|
|
1313
1313
|
const a = v(
|
|
1314
1314
|
() => o.value === B.HORIZONTAL
|
|
1315
1315
|
), r = v(
|
|
1316
1316
|
() => {
|
|
1317
1317
|
var c;
|
|
1318
|
-
return e.height - (a != null && a.value ? 0 : ((c =
|
|
1318
|
+
return e.height - (a != null && a.value ? 0 : ((c = t.value) == null ? void 0 : c.call(t, 0)) || 0);
|
|
1319
1319
|
}
|
|
1320
1320
|
), l = v(
|
|
1321
1321
|
() => {
|
|
1322
1322
|
var c;
|
|
1323
|
-
return a != null && a.value ? ((c =
|
|
1323
|
+
return a != null && a.value ? ((c = n.value) == null ? void 0 : c.call(n, 0)) || 0 : e.width;
|
|
1324
1324
|
}
|
|
1325
1325
|
), i = v(
|
|
1326
1326
|
() => {
|
|
1327
1327
|
var c;
|
|
1328
|
-
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c =
|
|
1328
|
+
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c = t.value) == null ? void 0 : c.call(t, 0)) || 0})`;
|
|
1329
1329
|
}
|
|
1330
1330
|
);
|
|
1331
1331
|
return { negativeBarAttributes: v(() => ({
|
|
@@ -1334,41 +1334,51 @@ function zo(e, t, n, o) {
|
|
|
1334
1334
|
transform: i.value
|
|
1335
1335
|
})) };
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1337
|
+
function Ut(e, n) {
|
|
1338
|
+
const t = n - e.length;
|
|
1339
|
+
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
1340
|
+
}
|
|
1341
|
+
function Wo(e, n) {
|
|
1342
|
+
return e.reduce((t, o) => Ut(o.values, n).map((a, r) => t[r] ? a.value > t[r] ? a.value : t[r] : a.value ?? 0), []);
|
|
1339
1343
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return e.reduce((t,
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1344
|
+
function Uo(e, n) {
|
|
1345
|
+
return e.reduce((t, o) => Ut(o.values, n).map(
|
|
1346
|
+
(a, r) => {
|
|
1347
|
+
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1348
|
+
return t[r] ? t[r] + l : l;
|
|
1349
|
+
}
|
|
1350
|
+
), []);
|
|
1345
1351
|
}
|
|
1346
1352
|
const $t = {
|
|
1347
|
-
"stacked-bar":
|
|
1353
|
+
"stacked-bar": Uo
|
|
1348
1354
|
};
|
|
1349
|
-
function
|
|
1350
|
-
const
|
|
1355
|
+
function Xt(e, n, t, o, a, r, l, i) {
|
|
1356
|
+
const s = v(
|
|
1351
1357
|
() => {
|
|
1352
|
-
var
|
|
1353
|
-
return
|
|
1358
|
+
var p;
|
|
1359
|
+
return n.value.withTooltip !== !1 && !((p = n.value.tooltipOptions) != null && p.targetElement);
|
|
1354
1360
|
}
|
|
1355
1361
|
);
|
|
1356
|
-
function
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1362
|
+
function c(p) {
|
|
1363
|
+
var g;
|
|
1364
|
+
const u = ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length) ?? 0, f = l != null && l.value && $t[l.value] ? $t[l.value](
|
|
1365
|
+
p,
|
|
1366
|
+
u
|
|
1367
|
+
) : Wo(p, u);
|
|
1368
|
+
e.value = f.map((m, T) => ({
|
|
1369
|
+
cx: (a == null ? void 0 : a.value) === B.HORIZONTAL ? t.value(m) : Ye(t.value, T),
|
|
1370
|
+
cy: (a == null ? void 0 : a.value) === B.HORIZONTAL ? Ye(o.value, T) : o.value(m)
|
|
1361
1371
|
}));
|
|
1362
1372
|
}
|
|
1363
1373
|
return K(
|
|
1364
|
-
[
|
|
1374
|
+
[t, o],
|
|
1365
1375
|
() => {
|
|
1366
|
-
|
|
1376
|
+
t.value && o.value && (r != null && r.value) && s.value && c(r.value);
|
|
1367
1377
|
},
|
|
1368
1378
|
{ immediate: !0 }
|
|
1369
|
-
), { shouldGenerateTooltipAnchors:
|
|
1379
|
+
), { shouldGenerateTooltipAnchors: s, updateTooltipAnchorAttributes: c };
|
|
1370
1380
|
}
|
|
1371
|
-
function
|
|
1381
|
+
function Xo() {
|
|
1372
1382
|
const e = Ce({
|
|
1373
1383
|
opened: !1,
|
|
1374
1384
|
targetElement: null
|
|
@@ -1379,14 +1389,14 @@ function Uo() {
|
|
|
1379
1389
|
e.opened = !1, e.targetElement = null;
|
|
1380
1390
|
} };
|
|
1381
1391
|
}
|
|
1382
|
-
function
|
|
1392
|
+
function Yo(e) {
|
|
1383
1393
|
return { getTooltipItems: v(
|
|
1384
|
-
() => (
|
|
1394
|
+
() => (t) => e.value.map(({ color: o, label: a, values: r }) => {
|
|
1385
1395
|
var l, i, s;
|
|
1386
1396
|
return {
|
|
1387
|
-
color: ((l = r[
|
|
1397
|
+
color: ((l = r[t]) == null ? void 0 : l.color) || o,
|
|
1388
1398
|
label: a,
|
|
1389
|
-
value: ((i = r[
|
|
1399
|
+
value: ((i = r[t]) == null ? void 0 : i.label) ?? ((s = r[t]) == null ? void 0 : s.value) ?? Gt
|
|
1390
1400
|
};
|
|
1391
1401
|
})
|
|
1392
1402
|
) };
|
|
@@ -1405,28 +1415,28 @@ const Ke = 16, Je = 8, Qe = 28, qe = 24, ke = {
|
|
|
1405
1415
|
left: qe
|
|
1406
1416
|
}
|
|
1407
1417
|
};
|
|
1408
|
-
function
|
|
1418
|
+
function Ko(e) {
|
|
1409
1419
|
return !e || e === "auto" || e.top == null || e.top === "auto" ? Ke : e.top;
|
|
1410
1420
|
}
|
|
1411
|
-
function
|
|
1421
|
+
function Jo(e) {
|
|
1412
1422
|
return !e || e === "auto" || e.right == null || e.right === "auto" ? Je : e.right;
|
|
1413
1423
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ?
|
|
1424
|
+
function Qo(e, n) {
|
|
1425
|
+
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || Qe : e.bottom;
|
|
1416
1426
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return !e || e === "auto" || e.left == null || e.left === "auto" ?
|
|
1427
|
+
function qo(e, n) {
|
|
1428
|
+
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || qe : e.left;
|
|
1419
1429
|
}
|
|
1420
|
-
const
|
|
1430
|
+
const ea = { class: "lume-chart__header" }, ta = { class: "lume-chart__header-section" }, na = {
|
|
1421
1431
|
key: 0,
|
|
1422
1432
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1423
|
-
},
|
|
1433
|
+
}, oa = { class: "lume-chart__controls" }, aa = { class: "lume-chart__header-section" }, la = {
|
|
1424
1434
|
key: 0,
|
|
1425
1435
|
class: "lume-chart__axis-title lume-axis-title lume-typography--body"
|
|
1426
|
-
},
|
|
1436
|
+
}, ra = { key: 3 }, ua = ["r"], ia = {
|
|
1427
1437
|
key: 0,
|
|
1428
1438
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1429
|
-
},
|
|
1439
|
+
}, sa = /* @__PURE__ */ W({
|
|
1430
1440
|
__name: "lume-chart",
|
|
1431
1441
|
props: {
|
|
1432
1442
|
...xe(),
|
|
@@ -1435,24 +1445,24 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1435
1445
|
default: null
|
|
1436
1446
|
}
|
|
1437
1447
|
},
|
|
1438
|
-
setup(e, { emit:
|
|
1439
|
-
const
|
|
1448
|
+
setup(e, { emit: n }) {
|
|
1449
|
+
const t = e, o = le(), a = n, { data: r, labels: l, color: i, options: s, orientation: c, chartType: p } = ee(t), u = R(-1), f = R(null), g = R(null), m = R([]), T = R(null), O = R(0), b = R(0), { allOptions: h } = ce(s), { internalData: $, computedLabels: w, containerSize: D, updateSize: N, chartID: H } = it(r, l, i, h, c), { xScale: G, yScale: U } = jo(
|
|
1440
1450
|
$,
|
|
1441
1451
|
w,
|
|
1442
1452
|
D,
|
|
1443
1453
|
c,
|
|
1444
1454
|
h
|
|
1445
1455
|
), te = v(() => ({
|
|
1446
|
-
top:
|
|
1447
|
-
right:
|
|
1448
|
-
bottom:
|
|
1449
|
-
left:
|
|
1456
|
+
top: Ko(h.value.margins),
|
|
1457
|
+
right: Jo(h.value.margins),
|
|
1458
|
+
bottom: Qo(h.value.margins, O.value),
|
|
1459
|
+
left: qo(h.value.margins, b.value)
|
|
1450
1460
|
})), F = v(() => {
|
|
1451
1461
|
var L;
|
|
1452
|
-
return
|
|
1462
|
+
return t.xScale ? Lt(t.xScale) ? t.xScale : (L = t.xScale) == null ? void 0 : L.call(t, $.value, l.value, D) : G.value;
|
|
1453
1463
|
}), J = v(() => {
|
|
1454
1464
|
var L;
|
|
1455
|
-
return
|
|
1465
|
+
return t.yScale ? Lt(t.yScale) ? t.yScale : (L = t.yScale) == null ? void 0 : L.call(t, $.value, l.value, D) : U.value;
|
|
1456
1466
|
}), Te = v(() => ({
|
|
1457
1467
|
...h.value.xAxisOptions,
|
|
1458
1468
|
withHover: c.value === B.VERTICAL
|
|
@@ -1476,27 +1486,28 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1476
1486
|
), P = v(() => {
|
|
1477
1487
|
const L = [], { noBaseScales: A } = h.value;
|
|
1478
1488
|
return A || L.push(() => !!(F.value && J.value)), L.every((I) => I() === !0);
|
|
1479
|
-
}), { hasNegativeValues: Y } =
|
|
1489
|
+
}), { hasNegativeValues: Y } = zo($), { negativeBarAttributes: ie } = Zo(
|
|
1480
1490
|
D,
|
|
1481
1491
|
F,
|
|
1482
1492
|
J,
|
|
1483
1493
|
c
|
|
1484
|
-
), { shouldGenerateTooltipAnchors: Pe } =
|
|
1494
|
+
), { shouldGenerateTooltipAnchors: Pe } = Xt(
|
|
1485
1495
|
m,
|
|
1486
1496
|
h,
|
|
1487
1497
|
F,
|
|
1488
1498
|
J,
|
|
1489
1499
|
c,
|
|
1490
1500
|
$,
|
|
1491
|
-
p
|
|
1492
|
-
|
|
1501
|
+
p,
|
|
1502
|
+
l
|
|
1503
|
+
), { tooltipConfig: Oe, showTooltip: Me, hideTooltip: tn } = Xo(), { getTooltipItems: ct } = Yo($), nn = v(
|
|
1493
1504
|
() => h.value.withTooltip !== !1 && Oe.opened
|
|
1494
1505
|
), dt = v(
|
|
1495
1506
|
() => {
|
|
1496
1507
|
var L;
|
|
1497
1508
|
return ((L = h.value.tooltipOptions) == null ? void 0 : L.position) || "top";
|
|
1498
1509
|
}
|
|
1499
|
-
),
|
|
1510
|
+
), on = v(() => {
|
|
1500
1511
|
var A;
|
|
1501
1512
|
const L = (A = h.value.tooltipOptions) == null ? void 0 : A.withPointerEvents;
|
|
1502
1513
|
return Oe.opened && (!L || L && T.value === !1);
|
|
@@ -1513,7 +1524,7 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1513
1524
|
a("hovered-index-changed", { newIndex: L, oldIndex: A });
|
|
1514
1525
|
}
|
|
1515
1526
|
function vt() {
|
|
1516
|
-
|
|
1527
|
+
tn(), u.value = -1;
|
|
1517
1528
|
}
|
|
1518
1529
|
function mt(L) {
|
|
1519
1530
|
if (L > r.value[0].values.length - 1) {
|
|
@@ -1522,9 +1533,9 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1522
1533
|
}
|
|
1523
1534
|
Re(L);
|
|
1524
1535
|
}
|
|
1525
|
-
function
|
|
1536
|
+
function an() {
|
|
1526
1537
|
setTimeout(() => {
|
|
1527
|
-
|
|
1538
|
+
on.value && vt(), a("chart-mouseleave");
|
|
1528
1539
|
}, 0);
|
|
1529
1540
|
}
|
|
1530
1541
|
function pt({ index: L, value: A, event: I }) {
|
|
@@ -1539,17 +1550,17 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1539
1550
|
), K(
|
|
1540
1551
|
l,
|
|
1541
1552
|
(L, A) => a("labels-changed", { newValue: L, oldValue: A })
|
|
1542
|
-
), K(_, (L) => L && ye(pe.Empty), { immediate: !0 }), K(() =>
|
|
1553
|
+
), K(_, (L) => L && ye(pe.Empty), { immediate: !0 }), K(() => t.hoveredIndex, mt), K(
|
|
1543
1554
|
m,
|
|
1544
1555
|
(L) => {
|
|
1545
|
-
L &&
|
|
1556
|
+
L && t.hoveredIndex != null && u.value === -1 && mt(t.hoveredIndex);
|
|
1546
1557
|
},
|
|
1547
1558
|
{ flush: "post" }
|
|
1548
1559
|
), K(T, (L) => {
|
|
1549
1560
|
L === !1 && Oe.opened && vt();
|
|
1550
1561
|
}), fe(async () => {
|
|
1551
1562
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1552
|
-
}), Fe("chartID", H), Fe("isEmpty", _), Fe("tooltipAnchorAttributes", m), (L, A) => (y(), X(d(
|
|
1563
|
+
}), Fe("chartID", H), Fe("isEmpty", _), Fe("tooltipAnchorAttributes", m), (L, A) => (y(), X(d(ao), {
|
|
1553
1564
|
id: `lume-chart_${d(H)}`,
|
|
1554
1565
|
ref_key: "chartContainer",
|
|
1555
1566
|
ref: g,
|
|
@@ -1561,18 +1572,18 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1561
1572
|
onResize: d(N),
|
|
1562
1573
|
onClick: A[24] || (A[24] = (I) => a("chart-click", I)),
|
|
1563
1574
|
onMouseenter: A[25] || (A[25] = (I) => a("chart-mouseenter", I)),
|
|
1564
|
-
onMouseleave:
|
|
1575
|
+
onMouseleave: an
|
|
1565
1576
|
}, {
|
|
1566
1577
|
header: V(() => [
|
|
1567
|
-
j("div",
|
|
1568
|
-
j("div",
|
|
1569
|
-
L.title ? (y(), x("h1",
|
|
1570
|
-
j("div",
|
|
1578
|
+
j("div", ea, [
|
|
1579
|
+
j("div", ta, [
|
|
1580
|
+
L.title ? (y(), x("h1", na, oe(L.title), 1)) : z("", !0),
|
|
1581
|
+
j("div", oa, [
|
|
1571
1582
|
S(L.$slots, "controls", {}, void 0, !0)
|
|
1572
1583
|
])
|
|
1573
1584
|
]),
|
|
1574
|
-
j("div",
|
|
1575
|
-
E.value ? (y(), x("h3",
|
|
1585
|
+
j("div", aa, [
|
|
1586
|
+
E.value ? (y(), x("h3", la, oe(M.value), 1)) : z("", !0),
|
|
1576
1587
|
S(L.$slots, "legend", { data: d($) }, () => [
|
|
1577
1588
|
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(), X(d(yt), {
|
|
1578
1589
|
key: 0,
|
|
@@ -1588,7 +1599,7 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1588
1599
|
])
|
|
1589
1600
|
]),
|
|
1590
1601
|
footer: V(() => [
|
|
1591
|
-
k.value ? (y(), x("h3",
|
|
1602
|
+
k.value ? (y(), x("h3", ia, oe(ge.value), 1)) : z("", !0),
|
|
1592
1603
|
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(), X(d(yt), {
|
|
1593
1604
|
key: 1,
|
|
1594
1605
|
data: d($),
|
|
@@ -1612,7 +1623,7 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1612
1623
|
handleMouseLeave: () => T.value = !1,
|
|
1613
1624
|
options: d(h).tooltipOptions
|
|
1614
1625
|
}), () => [
|
|
1615
|
-
|
|
1626
|
+
nn.value ? (y(), X(d(Io), C({ key: 0 }, d(Oe), {
|
|
1616
1627
|
position: dt.value,
|
|
1617
1628
|
title: d(w)[u.value],
|
|
1618
1629
|
items: d(ct)(u.value),
|
|
@@ -1683,7 +1694,7 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1683
1694
|
"onLume__internal-AxisSize": A[6] || (A[6] = (I) => b.value = I)
|
|
1684
1695
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1685
1696
|
], !0) : z("", !0),
|
|
1686
|
-
d(h).withHover !== !1 ? (y(), X(d(
|
|
1697
|
+
d(h).withHover !== !1 ? (y(), X(d(Fo), {
|
|
1687
1698
|
key: 2,
|
|
1688
1699
|
data: d($),
|
|
1689
1700
|
orientation: d(c),
|
|
@@ -1692,15 +1703,15 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1692
1703
|
"data-j-lume-chart__overlay-group": "",
|
|
1693
1704
|
"onLume__internal-Hover": Re
|
|
1694
1705
|
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : z("", !0),
|
|
1695
|
-
d(Pe) ? (y(), x("g",
|
|
1706
|
+
d(Pe) ? (y(), x("g", ra, [
|
|
1696
1707
|
(y(!0), x(Q, null, Z(m.value, (I, Ve) => (y(), x("circle", C(I, {
|
|
1697
1708
|
ref_for: !0,
|
|
1698
1709
|
ref_key: "tooltipAnchor",
|
|
1699
1710
|
ref: f,
|
|
1700
1711
|
key: `anchor_${Ve}`,
|
|
1701
|
-
r: d(
|
|
1712
|
+
r: d(Sn),
|
|
1702
1713
|
class: "lume-fill--transparent"
|
|
1703
|
-
}), null, 16,
|
|
1714
|
+
}), null, 16, ua))), 128))
|
|
1704
1715
|
])) : z("", !0),
|
|
1705
1716
|
S(L.$slots, "groups", {
|
|
1706
1717
|
data: d($),
|
|
@@ -1730,75 +1741,75 @@ const qo = { class: "lume-chart__header" }, ea = { class: "lume-chart__header-se
|
|
|
1730
1741
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1731
1742
|
}
|
|
1732
1743
|
});
|
|
1733
|
-
const Ie = /* @__PURE__ */ q(
|
|
1744
|
+
const Ie = /* @__PURE__ */ q(sa, [["__scopeId", "data-v-42aac599"]]), ca = ["dy"], da = /* @__PURE__ */ W({
|
|
1734
1745
|
__name: "lume-alluvial-node-label",
|
|
1735
1746
|
props: {
|
|
1736
1747
|
bottom: { type: Boolean, default: !1 }
|
|
1737
1748
|
},
|
|
1738
1749
|
setup(e) {
|
|
1739
|
-
return (
|
|
1750
|
+
return (n, t) => (y(), x("text", {
|
|
1740
1751
|
class: "lume-alluvial-group__node-label",
|
|
1741
1752
|
dy: e.bottom ? "1.2em" : ""
|
|
1742
1753
|
}, [
|
|
1743
|
-
S(
|
|
1744
|
-
], 8,
|
|
1754
|
+
S(n.$slots, "default", {}, void 0, !0)
|
|
1755
|
+
], 8, ca));
|
|
1745
1756
|
}
|
|
1746
1757
|
});
|
|
1747
|
-
const
|
|
1758
|
+
const va = /* @__PURE__ */ q(da, [["__scopeId", "data-v-d2a7cb8e"]]), ma = ["dy"], pa = /* @__PURE__ */ W({
|
|
1748
1759
|
__name: "lume-alluvial-node-value",
|
|
1749
1760
|
props: {
|
|
1750
1761
|
bottom: { type: Boolean, default: !0 }
|
|
1751
1762
|
},
|
|
1752
1763
|
setup(e) {
|
|
1753
|
-
return (
|
|
1764
|
+
return (n, t) => (y(), x("text", {
|
|
1754
1765
|
class: "lume-alluvial-group__node-value",
|
|
1755
1766
|
dy: e.bottom ? "1.2em" : ""
|
|
1756
1767
|
}, [
|
|
1757
|
-
S(
|
|
1758
|
-
], 8,
|
|
1768
|
+
S(n.$slots, "default", {}, void 0, !0)
|
|
1769
|
+
], 8, ma));
|
|
1759
1770
|
}
|
|
1760
1771
|
});
|
|
1761
|
-
const
|
|
1762
|
-
function xt(e,
|
|
1772
|
+
const fa = /* @__PURE__ */ q(pa, [["__scopeId", "data-v-002e2887"]]);
|
|
1773
|
+
function xt(e, n) {
|
|
1763
1774
|
return {
|
|
1764
|
-
x0: 0 + (
|
|
1765
|
-
y0: 0 + (
|
|
1766
|
-
x1: e.width - (
|
|
1767
|
-
y1: e.height - (
|
|
1775
|
+
x0: 0 + (n ? n.left : 0),
|
|
1776
|
+
y0: 0 + (n ? n.top : 0),
|
|
1777
|
+
x1: e.width - (n ? n.right : 0),
|
|
1778
|
+
y1: e.height - (n ? n.bottom : 0)
|
|
1768
1779
|
};
|
|
1769
1780
|
}
|
|
1770
|
-
function
|
|
1771
|
-
const
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1781
|
+
function ha(e) {
|
|
1782
|
+
const n = R(xt(e));
|
|
1783
|
+
function t(o) {
|
|
1784
|
+
n.value = xt(e, o);
|
|
1774
1785
|
}
|
|
1775
|
-
return { extents:
|
|
1786
|
+
return { extents: n, updateExtents: t };
|
|
1776
1787
|
}
|
|
1777
|
-
var
|
|
1778
|
-
const
|
|
1779
|
-
function
|
|
1780
|
-
|
|
1788
|
+
var Yt = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e))(Yt || {});
|
|
1789
|
+
const ga = "[lume] ";
|
|
1790
|
+
function _a(e, n, t = !0) {
|
|
1791
|
+
t && Mt() || console.error(ga + "Error: " + e, n);
|
|
1781
1792
|
}
|
|
1782
|
-
const It = 8,
|
|
1793
|
+
const It = 8, ya = 8, ka = 20, Ze = 2, ba = 200;
|
|
1783
1794
|
function $e(e) {
|
|
1784
1795
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1785
1796
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
1797
|
+
function Aa(e, n) {
|
|
1798
|
+
return n.nodes.find((t) => t.id === e);
|
|
1788
1799
|
}
|
|
1789
|
-
function
|
|
1790
|
-
return
|
|
1800
|
+
function Ta(e, n) {
|
|
1801
|
+
return n.links.find((t) => t.id === e);
|
|
1791
1802
|
}
|
|
1792
|
-
function
|
|
1803
|
+
function Kt(e) {
|
|
1793
1804
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1794
1805
|
}
|
|
1795
|
-
function
|
|
1796
|
-
if (!
|
|
1806
|
+
function La(e, n) {
|
|
1807
|
+
if (!n)
|
|
1797
1808
|
return;
|
|
1798
|
-
const
|
|
1809
|
+
const t = e.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), o = e.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = n.filter((l) => t.includes(l.dataset.id)).reduce(
|
|
1799
1810
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1800
1811
|
-1 / 0
|
|
1801
|
-
), r =
|
|
1812
|
+
), r = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1802
1813
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1803
1814
|
-1 / 0
|
|
1804
1815
|
);
|
|
@@ -1809,54 +1820,54 @@ function Ta(e, t) {
|
|
|
1809
1820
|
bottom: 0
|
|
1810
1821
|
};
|
|
1811
1822
|
}
|
|
1812
|
-
function
|
|
1813
|
-
return e.map((
|
|
1814
|
-
const
|
|
1823
|
+
function Oa(e) {
|
|
1824
|
+
return e.map((n) => {
|
|
1825
|
+
const t = n.y1 - n.y0 < Ze;
|
|
1815
1826
|
return {
|
|
1816
|
-
x:
|
|
1817
|
-
y:
|
|
1827
|
+
x: n.x0,
|
|
1828
|
+
y: n.y0 - (t ? Ze / 2 : 0),
|
|
1818
1829
|
// Negative offset to account for the min. height
|
|
1819
|
-
width:
|
|
1820
|
-
height:
|
|
1830
|
+
width: n.x1 - n.x0,
|
|
1831
|
+
height: t ? Ze : n.y1 - n.y0,
|
|
1821
1832
|
textTransform: {
|
|
1822
|
-
x:
|
|
1823
|
-
y: (
|
|
1833
|
+
x: n.depth > 0 ? n.x1 + It : n.x0 - It,
|
|
1834
|
+
y: (n.y1 + n.y0) / 2
|
|
1824
1835
|
},
|
|
1825
|
-
node:
|
|
1836
|
+
node: n
|
|
1826
1837
|
};
|
|
1827
1838
|
});
|
|
1828
1839
|
}
|
|
1829
|
-
function Oa(e) {
|
|
1830
|
-
return [e.source.x1, e.y0];
|
|
1831
|
-
}
|
|
1832
1840
|
function $a(e) {
|
|
1833
|
-
return [e.
|
|
1841
|
+
return [e.source.x1, e.y0];
|
|
1834
1842
|
}
|
|
1835
1843
|
function xa(e) {
|
|
1836
|
-
return e.
|
|
1844
|
+
return [e.target.x0, e.y1];
|
|
1837
1845
|
}
|
|
1838
1846
|
function Ia(e) {
|
|
1839
|
-
return e.
|
|
1840
|
-
|
|
1847
|
+
return e.curveFunction ? mn(e.curveFunction).source($a).target(xa) : gn();
|
|
1848
|
+
}
|
|
1849
|
+
function wa(e) {
|
|
1850
|
+
return e.map((n) => {
|
|
1851
|
+
var t;
|
|
1841
1852
|
return {
|
|
1842
|
-
id:
|
|
1843
|
-
color:
|
|
1844
|
-
d:
|
|
1845
|
-
strokeWidth: Math.max(1,
|
|
1846
|
-
link:
|
|
1853
|
+
id: n.id,
|
|
1854
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Be,
|
|
1855
|
+
d: Ia(n)(n),
|
|
1856
|
+
strokeWidth: Math.max(1, n.width),
|
|
1857
|
+
link: n
|
|
1847
1858
|
};
|
|
1848
1859
|
});
|
|
1849
1860
|
}
|
|
1850
|
-
function wt(e,
|
|
1861
|
+
function wt(e, n, t, o, a) {
|
|
1851
1862
|
if (o === !1) {
|
|
1852
1863
|
e.node = {
|
|
1853
1864
|
...e.node,
|
|
1854
|
-
transitionValue: a ? void 0 :
|
|
1865
|
+
transitionValue: a ? void 0 : t
|
|
1855
1866
|
};
|
|
1856
1867
|
return;
|
|
1857
1868
|
}
|
|
1858
|
-
const r = Date.now(), l =
|
|
1859
|
-
let c = (Date.now() - r) /
|
|
1869
|
+
const r = Date.now(), l = wn(n, t), i = () => {
|
|
1870
|
+
let c = (Date.now() - r) / ba;
|
|
1860
1871
|
c > 1 && (c = 1), e.node = {
|
|
1861
1872
|
...e.node,
|
|
1862
1873
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
@@ -1864,14 +1875,14 @@ function wt(e, t, n, o, a) {
|
|
|
1864
1875
|
};
|
|
1865
1876
|
requestAnimationFrame(i);
|
|
1866
1877
|
}
|
|
1867
|
-
const
|
|
1878
|
+
const Ea = {
|
|
1868
1879
|
nodes: [],
|
|
1869
1880
|
links: []
|
|
1870
1881
|
};
|
|
1871
|
-
function Et(e,
|
|
1872
|
-
return
|
|
1882
|
+
function Et(e, n) {
|
|
1883
|
+
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1873
1884
|
}
|
|
1874
|
-
function
|
|
1885
|
+
function Na(e, n, t) {
|
|
1875
1886
|
const o = R(null), a = v(() => {
|
|
1876
1887
|
var u;
|
|
1877
1888
|
return (u = e.value) == null ? void 0 : u[0].values.map(
|
|
@@ -1903,7 +1914,7 @@ function Ea(e, t, n) {
|
|
|
1903
1914
|
}
|
|
1904
1915
|
).filter(Boolean).flat();
|
|
1905
1916
|
}
|
|
1906
|
-
), l = v(() =>
|
|
1917
|
+
), l = v(() => _n().nodeId($e).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1907
1918
|
var u;
|
|
1908
1919
|
return (u = o.value) == null ? void 0 : u.nodes.reduce(
|
|
1909
1920
|
(f, g) => {
|
|
@@ -1931,60 +1942,60 @@ function Ea(e, t, n) {
|
|
|
1931
1942
|
const p = v(() => (o.value && a.value.forEach((u) => {
|
|
1932
1943
|
u.value === 0 && (u.fallbackColor = at.Grey), typeof u.offset == "number" && (s(u), c(u, o.value));
|
|
1933
1944
|
}), o.value));
|
|
1934
|
-
return K([l,
|
|
1945
|
+
return K([l, t], () => {
|
|
1935
1946
|
try {
|
|
1936
|
-
const { x0: u, y0: f, x1: g, y1: m } =
|
|
1947
|
+
const { x0: u, y0: f, x1: g, y1: m } = t.value;
|
|
1937
1948
|
o.value = l.value.extent([
|
|
1938
1949
|
[u, f],
|
|
1939
1950
|
[g, m]
|
|
1940
1951
|
])({ nodes: a.value, links: r.value });
|
|
1941
1952
|
} catch (u) {
|
|
1942
|
-
|
|
1953
|
+
_a(Yt.GraphProblem, u), o.value = Ea;
|
|
1943
1954
|
}
|
|
1944
1955
|
}), { columns: i, graph: p };
|
|
1945
1956
|
}
|
|
1946
|
-
function et(e,
|
|
1947
|
-
return
|
|
1948
|
-
t
|
|
1949
|
-
|
|
1950
|
-
|
|
1957
|
+
function et(e, n) {
|
|
1958
|
+
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
1959
|
+
n[t.id] = o, et(
|
|
1960
|
+
t,
|
|
1961
|
+
n
|
|
1951
1962
|
);
|
|
1952
|
-
}),
|
|
1963
|
+
}), n;
|
|
1953
1964
|
}
|
|
1954
|
-
function tt(e,
|
|
1955
|
-
return
|
|
1956
|
-
t
|
|
1957
|
-
|
|
1958
|
-
|
|
1965
|
+
function tt(e, n) {
|
|
1966
|
+
return n || (n = {}), e.sourceLinks && e.sourceLinks.forEach(({ target: t, value: o }) => {
|
|
1967
|
+
n[t.id] = o, tt(
|
|
1968
|
+
t,
|
|
1969
|
+
n
|
|
1959
1970
|
);
|
|
1960
|
-
}),
|
|
1971
|
+
}), n;
|
|
1961
1972
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
1973
|
+
function Da(e, n) {
|
|
1974
|
+
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
1964
1975
|
}
|
|
1965
|
-
const
|
|
1966
|
-
let
|
|
1967
|
-
|
|
1976
|
+
const Ha = (e, n) => {
|
|
1977
|
+
let t;
|
|
1978
|
+
Kt(e) ? t = {
|
|
1968
1979
|
[e.id]: e.value,
|
|
1969
1980
|
...et(e),
|
|
1970
1981
|
...tt(e)
|
|
1971
|
-
} :
|
|
1982
|
+
} : t = {
|
|
1972
1983
|
[e.source.id]: e.source.value,
|
|
1973
1984
|
[e.target.id]: e.target.value,
|
|
1974
1985
|
...et(e.source),
|
|
1975
1986
|
...tt(e.target)
|
|
1976
1987
|
};
|
|
1977
|
-
const o =
|
|
1978
|
-
return { nodes:
|
|
1979
|
-
},
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1988
|
+
const o = Da(t, n);
|
|
1989
|
+
return { nodes: t, links: o };
|
|
1990
|
+
}, Ba = (e) => {
|
|
1991
|
+
if (Kt(e)) {
|
|
1992
|
+
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
1982
1993
|
return {
|
|
1983
|
-
nodes:
|
|
1984
|
-
(
|
|
1994
|
+
nodes: n.reduce(
|
|
1995
|
+
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [$e(a)]: r } : { ...t, [$e(o)]: r },
|
|
1985
1996
|
{ [$e(e)]: e.value }
|
|
1986
1997
|
),
|
|
1987
|
-
links:
|
|
1998
|
+
links: n.map(({ id: t }) => t)
|
|
1988
1999
|
};
|
|
1989
2000
|
}
|
|
1990
2001
|
return {
|
|
@@ -1995,11 +2006,11 @@ const Da = (e, t) => {
|
|
|
1995
2006
|
links: [e.id]
|
|
1996
2007
|
};
|
|
1997
2008
|
};
|
|
1998
|
-
function
|
|
1999
|
-
const o = R(null), a = v(() => o.value ? typeof
|
|
2009
|
+
function Ma(e, n, t) {
|
|
2010
|
+
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2000
2011
|
o.value,
|
|
2001
|
-
|
|
2002
|
-
) :
|
|
2012
|
+
t.value
|
|
2013
|
+
) : n.value.highlightedElements === "closest" ? Ba(o.value, t.value) : Ha(o.value, t.value) : { nodes: {}, links: [] });
|
|
2003
2014
|
return K(a, (r, l) => {
|
|
2004
2015
|
if (r.links.length === 0 && Object.keys(r.nodes).length === 0) {
|
|
2005
2016
|
e.value.forEach((i) => {
|
|
@@ -2007,7 +2018,7 @@ function Ba(e, t, n) {
|
|
|
2007
2018
|
i,
|
|
2008
2019
|
l.nodes[i.node.id],
|
|
2009
2020
|
i.node.value,
|
|
2010
|
-
|
|
2021
|
+
n.value.withTransition,
|
|
2011
2022
|
!0
|
|
2012
2023
|
);
|
|
2013
2024
|
});
|
|
@@ -2018,15 +2029,15 @@ function Ba(e, t, n) {
|
|
|
2018
2029
|
i,
|
|
2019
2030
|
i.node.value,
|
|
2020
2031
|
r.nodes[i.node.id],
|
|
2021
|
-
|
|
2032
|
+
n.value.withTransition
|
|
2022
2033
|
);
|
|
2023
2034
|
});
|
|
2024
2035
|
}), { highlightedElements: a, hoveredElement: o };
|
|
2025
2036
|
}
|
|
2026
|
-
const
|
|
2037
|
+
const Ra = {
|
|
2027
2038
|
class: "lume-alluvial-group",
|
|
2028
2039
|
"data-j-alluvial-group": ""
|
|
2029
|
-
},
|
|
2040
|
+
}, Sa = { key: 0 }, Ca = ["x", "y"], Ga = { key: 0 }, ja = ["id", "x1", "x2"], Pa = ["stop-color"], Va = ["stop-color"], Fa = ["d", "stroke-width", "onClick", "onMouseover"], za = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Za = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Wa = ["x", "y", "height", "width"], Ua = ["transform", "data-id"], Xa = /* @__PURE__ */ W({
|
|
2030
2041
|
__name: "lume-alluvial-group",
|
|
2031
2042
|
props: {
|
|
2032
2043
|
...je(),
|
|
@@ -2036,8 +2047,8 @@ const Ma = {
|
|
|
2036
2047
|
}
|
|
2037
2048
|
},
|
|
2038
2049
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2039
|
-
setup(e, { emit:
|
|
2040
|
-
const
|
|
2050
|
+
setup(e, { emit: n }) {
|
|
2051
|
+
const t = e, o = n, a = Ne("chartID"), { data: r, options: l } = ee(t), i = R([]), s = R([]), c = R(null), { extents: p, updateExtents: u } = ha(t.containerSize), { columns: f, graph: g } = Na(r, l, p), { hoveredElement: m, highlightedElements: T } = Ma(
|
|
2041
2052
|
i,
|
|
2042
2053
|
l,
|
|
2043
2054
|
g
|
|
@@ -2052,7 +2063,7 @@ const Ma = {
|
|
|
2052
2063
|
x: h.value[E]
|
|
2053
2064
|
}));
|
|
2054
2065
|
}), w = v(
|
|
2055
|
-
() => l.value.nodeHeaderPadding ??
|
|
2066
|
+
() => l.value.nodeHeaderPadding ?? ka
|
|
2056
2067
|
), D = v(() => {
|
|
2057
2068
|
if (!(!l.value.gradient || !g.value))
|
|
2058
2069
|
return g.value.links.reduce((k, E) => {
|
|
@@ -2116,7 +2127,7 @@ const Ma = {
|
|
|
2116
2127
|
m.value = null;
|
|
2117
2128
|
return;
|
|
2118
2129
|
}
|
|
2119
|
-
const E =
|
|
2130
|
+
const E = Aa(k, g.value) || Ta(k, g.value);
|
|
2120
2131
|
if (!E) {
|
|
2121
2132
|
ye(pe.InvalidHoveredElement);
|
|
2122
2133
|
return;
|
|
@@ -2128,26 +2139,26 @@ const Ma = {
|
|
|
2128
2139
|
return ((E = N.value.find(({ id: _ }) => k === _)) == null ? void 0 : E.subNodes) ?? [];
|
|
2129
2140
|
}
|
|
2130
2141
|
return K(g, (k) => {
|
|
2131
|
-
i.value =
|
|
2132
|
-
}), K([
|
|
2133
|
-
if (
|
|
2134
|
-
const k =
|
|
2142
|
+
i.value = Oa(k.nodes), s.value = wa(k.links).reverse(), m.value == null && t.hoveredElementId != null && ge(t.hoveredElementId);
|
|
2143
|
+
}), K([t.containerSize, c], () => {
|
|
2144
|
+
if (t.containerSize.width && t.containerSize.height) {
|
|
2145
|
+
const k = La(g.value, c.value);
|
|
2135
2146
|
u(k);
|
|
2136
2147
|
}
|
|
2137
|
-
}), K(() =>
|
|
2138
|
-
$.value ? (y(), x("g",
|
|
2148
|
+
}), K(() => t.hoveredElementId, ge), (k, E) => (y(), x("g", Ra, [
|
|
2149
|
+
$.value ? (y(), x("g", Sa, [
|
|
2139
2150
|
(y(!0), x(Q, null, Z($.value, (_) => (y(), x("text", {
|
|
2140
2151
|
key: `header_${_.x}`,
|
|
2141
2152
|
x: _.x,
|
|
2142
2153
|
y: -w.value,
|
|
2143
2154
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
2144
|
-
}, oe(_.label), 9,
|
|
2155
|
+
}, oe(_.label), 9, Ca))), 128))
|
|
2145
2156
|
])) : z("", !0),
|
|
2146
2157
|
j("g", {
|
|
2147
2158
|
class: "lume-alluvial-link-group",
|
|
2148
2159
|
onMouseleave: Le
|
|
2149
2160
|
}, [
|
|
2150
|
-
d(l).gradient ? (y(), x("defs",
|
|
2161
|
+
d(l).gradient ? (y(), x("defs", Ga, [
|
|
2151
2162
|
(y(!0), x(Q, null, Z(D.value, (_, P) => (y(), x("linearGradient", {
|
|
2152
2163
|
id: `${d(a)}_${P}`,
|
|
2153
2164
|
key: P,
|
|
@@ -2158,12 +2169,12 @@ const Ma = {
|
|
|
2158
2169
|
j("stop", {
|
|
2159
2170
|
offset: "0%",
|
|
2160
2171
|
"stop-color": `var(--lume-color--${_.source})`
|
|
2161
|
-
}, null, 8,
|
|
2172
|
+
}, null, 8, Pa),
|
|
2162
2173
|
j("stop", {
|
|
2163
2174
|
offset: "100%",
|
|
2164
2175
|
"stop-color": `var(--lume-color--${_.target})`
|
|
2165
|
-
}, null, 8,
|
|
2166
|
-
], 8,
|
|
2176
|
+
}, null, 8, Va)
|
|
2177
|
+
], 8, ja))), 128))
|
|
2167
2178
|
])) : z("", !0),
|
|
2168
2179
|
(y(!0), x(Q, null, Z(s.value, (_) => (y(), x("path", {
|
|
2169
2180
|
key: `link-ghost_${_.id}`,
|
|
@@ -2172,11 +2183,11 @@ const Ma = {
|
|
|
2172
2183
|
"lume-alluvial-group__link--ghost"
|
|
2173
2184
|
]]),
|
|
2174
2185
|
d: _.d,
|
|
2175
|
-
"stroke-width": _.strokeWidth + d(
|
|
2186
|
+
"stroke-width": _.strokeWidth + d(ya),
|
|
2176
2187
|
"data-j-alluvial-ghost": "",
|
|
2177
2188
|
onClick: (P) => o("link-click", { link: _.link, event: P }),
|
|
2178
2189
|
onMouseover: (P) => Te(_.link, P)
|
|
2179
|
-
}, null, 40,
|
|
2190
|
+
}, null, 40, Fa))), 128)),
|
|
2180
2191
|
(y(!0), x(Q, null, Z(s.value, (_) => (y(), x("path", {
|
|
2181
2192
|
key: `link_${_.id}`,
|
|
2182
2193
|
class: ne(["lume-alluvial-group__link", {
|
|
@@ -2193,7 +2204,7 @@ const Ma = {
|
|
|
2193
2204
|
"data-id": _.id,
|
|
2194
2205
|
onClick: (P) => o("link-click", { link: _.link, event: P }),
|
|
2195
2206
|
onMouseover: (P) => Te(_.link, P)
|
|
2196
|
-
}, null, 42,
|
|
2207
|
+
}, null, 42, za))), 128))
|
|
2197
2208
|
], 32),
|
|
2198
2209
|
(y(!0), x(Q, null, Z(i.value, (_, P) => (y(), x("g", {
|
|
2199
2210
|
key: `node-block_${P}`,
|
|
@@ -2222,7 +2233,7 @@ const Ma = {
|
|
|
2222
2233
|
y: _.y,
|
|
2223
2234
|
height: _.height,
|
|
2224
2235
|
width: _.width
|
|
2225
|
-
}, null, 10,
|
|
2236
|
+
}, null, 10, Wa)),
|
|
2226
2237
|
j("g", {
|
|
2227
2238
|
ref_for: !0,
|
|
2228
2239
|
ref_key: "nodeTextRefs",
|
|
@@ -2240,7 +2251,7 @@ const Ma = {
|
|
|
2240
2251
|
_.node.value
|
|
2241
2252
|
)
|
|
2242
2253
|
}, () => [
|
|
2243
|
-
re(d(
|
|
2254
|
+
re(d(va), {
|
|
2244
2255
|
bottom: d(l).switchText
|
|
2245
2256
|
}, {
|
|
2246
2257
|
default: V(() => [
|
|
@@ -2248,7 +2259,7 @@ const Ma = {
|
|
|
2248
2259
|
]),
|
|
2249
2260
|
_: 2
|
|
2250
2261
|
}, 1032, ["bottom"]),
|
|
2251
|
-
re(d(
|
|
2262
|
+
re(d(fa), {
|
|
2252
2263
|
bottom: !d(l).switchText
|
|
2253
2264
|
}, {
|
|
2254
2265
|
default: V(() => [
|
|
@@ -2260,13 +2271,13 @@ const Ma = {
|
|
|
2260
2271
|
_: 2
|
|
2261
2272
|
}, 1032, ["bottom"])
|
|
2262
2273
|
], !0)
|
|
2263
|
-
], 10,
|
|
2264
|
-
], 40,
|
|
2274
|
+
], 10, Ua)
|
|
2275
|
+
], 40, Za)
|
|
2265
2276
|
], 2))), 128))
|
|
2266
2277
|
]));
|
|
2267
2278
|
}
|
|
2268
2279
|
});
|
|
2269
|
-
const
|
|
2280
|
+
const Ya = /* @__PURE__ */ q(Xa, [["__scopeId", "data-v-6fe8c153"]]), Ka = {
|
|
2270
2281
|
margins: {
|
|
2271
2282
|
top: 0,
|
|
2272
2283
|
right: 0,
|
|
@@ -2282,16 +2293,16 @@ const Xa = /* @__PURE__ */ q(Ua, [["__scopeId", "data-v-6fe8c153"]]), Ya = {
|
|
|
2282
2293
|
highlightedElements: "closest",
|
|
2283
2294
|
nodePadding: 16,
|
|
2284
2295
|
nodeWidth: 16,
|
|
2285
|
-
nodeAlign:
|
|
2296
|
+
nodeAlign: yn,
|
|
2286
2297
|
valueFormat: (e) => String(e),
|
|
2287
2298
|
iterations: 6
|
|
2288
|
-
},
|
|
2299
|
+
}, Sl = /* @__PURE__ */ W({
|
|
2289
2300
|
__name: "lume-alluvial-diagram",
|
|
2290
2301
|
props: {
|
|
2291
|
-
...
|
|
2302
|
+
...Po(nt)
|
|
2292
2303
|
},
|
|
2293
|
-
setup(e, { emit:
|
|
2294
|
-
const
|
|
2304
|
+
setup(e, { emit: n }) {
|
|
2305
|
+
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), r = Nn(le()), { options: l } = ee(t), { allOptions: i } = ce(l, Ka);
|
|
2295
2306
|
function s(c) {
|
|
2296
2307
|
return {
|
|
2297
2308
|
...c,
|
|
@@ -2299,12 +2310,12 @@ const Xa = /* @__PURE__ */ q(Ua, [["__scopeId", "data-v-6fe8c153"]]), Ya = {
|
|
|
2299
2310
|
// Alluvial chart never uses base scales
|
|
2300
2311
|
};
|
|
2301
2312
|
}
|
|
2302
|
-
return (c, p) => (y(), X(d(Ie), C(
|
|
2313
|
+
return (c, p) => (y(), X(d(Ie), C(t, {
|
|
2303
2314
|
options: s(d(i)),
|
|
2304
2315
|
"data-j-alluvial-diagram": ""
|
|
2305
2316
|
}, ae(d(o))), se({
|
|
2306
2317
|
groups: V((u) => [
|
|
2307
|
-
re(d(
|
|
2318
|
+
re(d(Ya), C(u, { "hovered-element-id": c.hoveredElement }, ae(d(o))), se({ _: 2 }, [
|
|
2308
2319
|
Z(d(r), (f, g) => ({
|
|
2309
2320
|
name: g,
|
|
2310
2321
|
fn: V((m) => [
|
|
@@ -2324,26 +2335,26 @@ const Xa = /* @__PURE__ */ q(Ua, [["__scopeId", "data-v-6fe8c153"]]), Ya = {
|
|
|
2324
2335
|
]), 1040, ["options"]));
|
|
2325
2336
|
}
|
|
2326
2337
|
});
|
|
2327
|
-
var
|
|
2328
|
-
const
|
|
2338
|
+
var Jt = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(Jt || {});
|
|
2339
|
+
const Cl = /* @__PURE__ */ W({
|
|
2329
2340
|
__name: "lume-bar-chart",
|
|
2330
2341
|
props: {
|
|
2331
2342
|
...xe(),
|
|
2332
2343
|
type: {
|
|
2333
2344
|
type: String,
|
|
2334
2345
|
default: null,
|
|
2335
|
-
validator: (e) => e in
|
|
2346
|
+
validator: (e) => e in Jt || e == null
|
|
2336
2347
|
}
|
|
2337
2348
|
},
|
|
2338
|
-
setup(e, { emit:
|
|
2339
|
-
const
|
|
2349
|
+
setup(e, { emit: n }) {
|
|
2350
|
+
const t = ze(
|
|
2340
2351
|
() => import("./common/42f5d2fc.js")
|
|
2341
2352
|
), o = ze(
|
|
2342
2353
|
() => import("./common/abc9d23d.js")
|
|
2343
2354
|
), a = ze(
|
|
2344
2355
|
() => import("./common/0664fd4d.js")
|
|
2345
2356
|
), r = /* @__PURE__ */ new Map([
|
|
2346
|
-
["single",
|
|
2357
|
+
["single", t],
|
|
2347
2358
|
["grouped", o],
|
|
2348
2359
|
["stacked", a]
|
|
2349
2360
|
]), l = e, { componentEventPropagator: i } = he(), s = Ae(le());
|
|
@@ -2367,7 +2378,7 @@ const Sl = /* @__PURE__ */ W({
|
|
|
2367
2378
|
return r.get(l.type);
|
|
2368
2379
|
}
|
|
2369
2380
|
});
|
|
2370
|
-
return (u, f) => (y(), X(
|
|
2381
|
+
return (u, f) => (y(), X(cn(p.value), C({ ...l, ...u.$attrs }, {
|
|
2371
2382
|
options: c(u.options)
|
|
2372
2383
|
}, ae(d(i))), se({ _: 2 }, [
|
|
2373
2384
|
Z(d(s), (g, m) => ({
|
|
@@ -2379,67 +2390,67 @@ const Sl = /* @__PURE__ */ W({
|
|
|
2379
2390
|
]), 1040, ["options"]));
|
|
2380
2391
|
}
|
|
2381
2392
|
});
|
|
2382
|
-
function Ka(e) {
|
|
2383
|
-
return Object.values(Mn).includes(e) || e == null;
|
|
2384
|
-
}
|
|
2385
2393
|
function Ja(e) {
|
|
2394
|
+
return Object.values(Rn).includes(e) || e == null;
|
|
2395
|
+
}
|
|
2396
|
+
function Qa(e) {
|
|
2386
2397
|
return Object.values(B).includes(e);
|
|
2387
2398
|
}
|
|
2388
|
-
const
|
|
2399
|
+
const qa = (e = !1) => ({
|
|
2389
2400
|
type: {
|
|
2390
2401
|
type: String,
|
|
2391
2402
|
default: null,
|
|
2392
|
-
validator:
|
|
2403
|
+
validator: Ja
|
|
2393
2404
|
},
|
|
2394
2405
|
...e ? {
|
|
2395
2406
|
orientation: {
|
|
2396
2407
|
type: String,
|
|
2397
2408
|
default: B.VERTICAL,
|
|
2398
|
-
validator:
|
|
2409
|
+
validator: Qa
|
|
2399
2410
|
}
|
|
2400
2411
|
} : {}
|
|
2401
2412
|
});
|
|
2402
|
-
function
|
|
2403
|
-
const
|
|
2413
|
+
function Qt(e) {
|
|
2414
|
+
const n = v(() => e.value.map((o) => ({
|
|
2404
2415
|
...o,
|
|
2405
2416
|
values: o.values.map((a) => ({
|
|
2406
2417
|
...a,
|
|
2407
2418
|
value: (a == null ? void 0 : a.value) || 0
|
|
2408
2419
|
}))
|
|
2409
|
-
}))),
|
|
2420
|
+
}))), t = v(() => {
|
|
2410
2421
|
var o;
|
|
2411
|
-
return (o =
|
|
2422
|
+
return (o = n.value) == null ? void 0 : o.reduce((a, r) => (r.values.forEach((l, i) => {
|
|
2412
2423
|
a[i] ? a[i].push(l) : a[i] = [l];
|
|
2413
2424
|
}), a), []);
|
|
2414
2425
|
});
|
|
2415
|
-
return { multiBarData:
|
|
2426
|
+
return { multiBarData: n, groupedData: t };
|
|
2416
2427
|
}
|
|
2417
|
-
function
|
|
2418
|
-
return e.value.length === 1 ? "single" :
|
|
2428
|
+
function el(e, n) {
|
|
2429
|
+
return e.value.length === 1 ? "single" : n.value;
|
|
2419
2430
|
}
|
|
2420
|
-
function
|
|
2431
|
+
function tl(e, n, t) {
|
|
2421
2432
|
const o = v(
|
|
2422
|
-
() =>
|
|
2433
|
+
() => t.value === B.HORIZONTAL
|
|
2423
2434
|
);
|
|
2424
2435
|
function a(i) {
|
|
2425
2436
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2426
2437
|
}
|
|
2427
|
-
const r = v(() => o.value ? (() => (a(e.value), e.value))() : e.value), l = v(() => o.value ?
|
|
2438
|
+
const r = v(() => o.value ? (() => (a(e.value), e.value))() : e.value), l = v(() => o.value ? n.value : (() => (a(n.value), n.value))());
|
|
2428
2439
|
return { barXScale: r, barYScale: l };
|
|
2429
2440
|
}
|
|
2430
|
-
function
|
|
2441
|
+
function nl(e, n, t, o, a, r) {
|
|
2431
2442
|
const l = v(
|
|
2432
2443
|
() => o.value === B.HORIZONTAL
|
|
2433
2444
|
);
|
|
2434
2445
|
function i(u, f) {
|
|
2435
2446
|
let g, m;
|
|
2436
|
-
return l.value ? (g = u >= 0 ?
|
|
2447
|
+
return l.value ? (g = u >= 0 ? n.value(0) : n.value(u), m = t.value(t.value.domain()[f])) : (g = n.value(n.value.domain()[f]), m = u < 0 ? t.value(0) : t.value(u)), { x: g, y: m };
|
|
2437
2448
|
}
|
|
2438
2449
|
function s(u) {
|
|
2439
|
-
return l.value ? u < 0 ?
|
|
2450
|
+
return l.value ? u < 0 ? n.value(0) - n.value(u) : n.value(u) - n.value(0) : n.value.bandwidth();
|
|
2440
2451
|
}
|
|
2441
2452
|
function c(u) {
|
|
2442
|
-
return l.value ?
|
|
2453
|
+
return l.value ? t.value.bandwidth() : u < 0 ? t.value(u) - t.value(0) : t.value(0) - t.value(u);
|
|
2443
2454
|
}
|
|
2444
2455
|
function p(u, f, g) {
|
|
2445
2456
|
const { value: m, color: T } = u, O = T ?? e.value[f].color ?? Be, { x: b, y: h } = i(m, g), $ = s(m), w = c(m);
|
|
@@ -2455,28 +2466,28 @@ function tl(e, t, n, o, a, r) {
|
|
|
2455
2466
|
}
|
|
2456
2467
|
return { barAttributeGenerator: p };
|
|
2457
2468
|
}
|
|
2458
|
-
function
|
|
2469
|
+
function ol(e, n, t, o, a, r) {
|
|
2459
2470
|
const l = v(
|
|
2460
2471
|
() => o.value === B.HORIZONTAL
|
|
2461
|
-
), i = v(() => we().domain(e.value.map((m, T) => T)).range([0,
|
|
2472
|
+
), i = v(() => we().domain(e.value.map((m, T) => T)).range([0, n.value.bandwidth()]).padding(0)), s = v(() => we().domain(e.value.map((m, T) => T)).range([0, t.value.bandwidth()]).padding(0));
|
|
2462
2473
|
function c(m, T, O) {
|
|
2463
2474
|
if (l.value)
|
|
2464
|
-
return m >= 0 ?
|
|
2465
|
-
const b =
|
|
2466
|
-
return
|
|
2475
|
+
return m >= 0 ? n.value(0) : n.value(m);
|
|
2476
|
+
const b = n.value.domain();
|
|
2477
|
+
return n.value(b[T]) + i.value(O);
|
|
2467
2478
|
}
|
|
2468
2479
|
function p(m, T, O) {
|
|
2469
2480
|
if (l.value) {
|
|
2470
|
-
const b =
|
|
2471
|
-
return
|
|
2481
|
+
const b = t.value.domain();
|
|
2482
|
+
return t.value(b[T]) + s.value(O);
|
|
2472
2483
|
}
|
|
2473
|
-
return m < 0 ?
|
|
2484
|
+
return m < 0 ? t.value(0) : t.value(m);
|
|
2474
2485
|
}
|
|
2475
2486
|
function u(m) {
|
|
2476
|
-
return l.value ? m < 0 ?
|
|
2487
|
+
return l.value ? m < 0 ? n.value(0) - n.value(m) : n.value(m) - n.value(0) : i.value.bandwidth();
|
|
2477
2488
|
}
|
|
2478
2489
|
function f(m) {
|
|
2479
|
-
return l.value ? s.value.bandwidth() : m < 0 ?
|
|
2490
|
+
return l.value ? s.value.bandwidth() : m < 0 ? t.value(m) - t.value(0) : t.value(0) - t.value(m);
|
|
2480
2491
|
}
|
|
2481
2492
|
function g(m, T, O) {
|
|
2482
2493
|
const { value: b, color: h } = m, $ = h ?? e.value[T].color ?? Object.values(ue)[T], w = c(b, O, T), D = p(b, O, T), N = u(b), H = f(b);
|
|
@@ -2492,9 +2503,9 @@ function nl(e, t, n, o, a, r) {
|
|
|
2492
2503
|
}
|
|
2493
2504
|
return { barAttributeGenerator: g };
|
|
2494
2505
|
}
|
|
2495
|
-
function
|
|
2506
|
+
function al(e, n, t) {
|
|
2496
2507
|
const o = v(
|
|
2497
|
-
() =>
|
|
2508
|
+
() => n.value === B.HORIZONTAL
|
|
2498
2509
|
), a = v(() => {
|
|
2499
2510
|
const s = e.value.map(
|
|
2500
2511
|
(c) => c.filter((p) => p.value < 0).reduce((p, u) => p + u.value, 0)
|
|
@@ -2513,8 +2524,8 @@ function ol(e, t, n) {
|
|
|
2513
2524
|
return o.value ? Ee().domain([a.value, r.value]).range([0, p.width]) : Object.assign(
|
|
2514
2525
|
Ot(
|
|
2515
2526
|
we().domain(c.map((u, f) => f)).range([0, p.width]),
|
|
2516
|
-
|
|
2517
|
-
|
|
2527
|
+
n.value,
|
|
2528
|
+
t.value
|
|
2518
2529
|
),
|
|
2519
2530
|
{ labels: c }
|
|
2520
2531
|
);
|
|
@@ -2523,37 +2534,37 @@ function ol(e, t, n) {
|
|
|
2523
2534
|
return o.value ? Object.assign(
|
|
2524
2535
|
Ot(
|
|
2525
2536
|
we().domain(c.map((u, f) => f)).range([0, p.height]),
|
|
2526
|
-
|
|
2527
|
-
|
|
2537
|
+
n.value,
|
|
2538
|
+
t.value
|
|
2528
2539
|
),
|
|
2529
2540
|
{ labels: c }
|
|
2530
2541
|
) : Ee().domain([r.value, a.value]).range([0, p.height]);
|
|
2531
2542
|
}
|
|
2532
2543
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2533
2544
|
}
|
|
2534
|
-
function
|
|
2545
|
+
function ll(e, n, t, o, a, r) {
|
|
2535
2546
|
const l = v(
|
|
2536
2547
|
() => o.value === B.HORIZONTAL
|
|
2537
2548
|
), i = v(
|
|
2538
|
-
() => l.value ?
|
|
2549
|
+
() => l.value ? t.value.domain() : n.value.domain()
|
|
2539
2550
|
), s = v(
|
|
2540
2551
|
() => e.value.map((b) => b.values.map((h) => h == null ? void 0 : h.value))
|
|
2541
2552
|
);
|
|
2542
2553
|
function c(b, h, $) {
|
|
2543
2554
|
let w, D;
|
|
2544
|
-
return l.value ? (w =
|
|
2555
|
+
return l.value ? (w = n.value(b >= 0 ? 0 + $ : b + $), D = t.value(i.value[h])) : (w = n.value(i.value[h]), D = t.value(b >= 0 ? b + $ : 0 + $)), { x: w, y: D };
|
|
2545
2556
|
}
|
|
2546
2557
|
function p(b) {
|
|
2547
|
-
return l.value ?
|
|
2558
|
+
return l.value ? n.value(b) - n.value(0) : n.value.bandwidth();
|
|
2548
2559
|
}
|
|
2549
2560
|
function u(b) {
|
|
2550
|
-
return l.value ?
|
|
2561
|
+
return l.value ? n.value(0) - n.value(b) : n.value.bandwidth();
|
|
2551
2562
|
}
|
|
2552
2563
|
function f(b) {
|
|
2553
|
-
return l.value ?
|
|
2564
|
+
return l.value ? t.value.bandwidth() : t.value(0) - t.value(b);
|
|
2554
2565
|
}
|
|
2555
2566
|
function g(b) {
|
|
2556
|
-
return l.value ?
|
|
2567
|
+
return l.value ? t.value.bandwidth() : t.value(b) - t.value(0);
|
|
2557
2568
|
}
|
|
2558
2569
|
function m(b, h) {
|
|
2559
2570
|
return b ? s.value.reduce(($, w, D) => (D < b && w[h] >= 0 && ($ += w[h]), $), 0) : 0;
|
|
@@ -2575,13 +2586,13 @@ function al(e, t, n, o, a, r) {
|
|
|
2575
2586
|
}
|
|
2576
2587
|
return { barAttributeGenerator: O };
|
|
2577
2588
|
}
|
|
2578
|
-
const
|
|
2589
|
+
const rl = {
|
|
2579
2590
|
class: "lume-bar-group",
|
|
2580
2591
|
"data-j-bars-group": ""
|
|
2581
|
-
},
|
|
2582
|
-
single:
|
|
2583
|
-
grouped:
|
|
2584
|
-
stacked:
|
|
2592
|
+
}, ul = ["onMouseenter"], il = {
|
|
2593
|
+
single: nl,
|
|
2594
|
+
grouped: ol,
|
|
2595
|
+
stacked: ll
|
|
2585
2596
|
}, st = /* @__PURE__ */ W({
|
|
2586
2597
|
__name: "lume-bar-group",
|
|
2587
2598
|
props: {
|
|
@@ -2590,15 +2601,15 @@ const ll = {
|
|
|
2590
2601
|
type: [String, Array],
|
|
2591
2602
|
default: () => []
|
|
2592
2603
|
},
|
|
2593
|
-
...
|
|
2604
|
+
...qa(!0),
|
|
2594
2605
|
transition: {
|
|
2595
2606
|
type: Boolean,
|
|
2596
2607
|
default: !0
|
|
2597
2608
|
}
|
|
2598
2609
|
},
|
|
2599
2610
|
emits: ["bar-click", "lume__internal--hover"],
|
|
2600
|
-
setup(e, { emit:
|
|
2601
|
-
const
|
|
2611
|
+
setup(e, { emit: n }) {
|
|
2612
|
+
const t = e, o = n, {
|
|
2602
2613
|
data: a,
|
|
2603
2614
|
hoveredIndex: r,
|
|
2604
2615
|
orientation: l,
|
|
@@ -2607,10 +2618,10 @@ const ll = {
|
|
|
2607
2618
|
xScale: c,
|
|
2608
2619
|
yScale: p,
|
|
2609
2620
|
classList: u
|
|
2610
|
-
} = ee(
|
|
2621
|
+
} = ee(t);
|
|
2611
2622
|
Ne("chartID");
|
|
2612
|
-
const { emitInternalEvent: f } = he(), { groupedData: g } =
|
|
2613
|
-
const w =
|
|
2623
|
+
const { emitInternalEvent: f } = he(), { groupedData: g } = Qt(a), { barXScale: m, barYScale: T } = tl(c, p, l), O = v(() => typeof u.value == "string" ? [u.value] : u.value), b = v(() => {
|
|
2624
|
+
const w = el(a, s), { barAttributeGenerator: D } = il[w](
|
|
2614
2625
|
a,
|
|
2615
2626
|
m,
|
|
2616
2627
|
T,
|
|
@@ -2626,7 +2637,7 @@ const ll = {
|
|
|
2626
2637
|
async function $(w) {
|
|
2627
2638
|
o("lume__internal--hover", w), f("lume__internal--hover", w);
|
|
2628
2639
|
}
|
|
2629
|
-
return (w, D) => (y(), x("g",
|
|
2640
|
+
return (w, D) => (y(), x("g", rl, [
|
|
2630
2641
|
(y(!0), x(Q, null, Z(d(g), (N, H) => (y(), x("g", {
|
|
2631
2642
|
key: H,
|
|
2632
2643
|
onMouseenter: (G) => $(H)
|
|
@@ -2641,10 +2652,10 @@ const ll = {
|
|
|
2641
2652
|
event: te
|
|
2642
2653
|
})
|
|
2643
2654
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2644
|
-
], 40,
|
|
2655
|
+
], 40, ul))), 128))
|
|
2645
2656
|
]));
|
|
2646
2657
|
}
|
|
2647
|
-
}),
|
|
2658
|
+
}), sl = {
|
|
2648
2659
|
[B.VERTICAL]: {
|
|
2649
2660
|
withTooltip: !0,
|
|
2650
2661
|
xAxisOptions: {},
|
|
@@ -2657,17 +2668,17 @@ const ll = {
|
|
|
2657
2668
|
yAxisOptions: { gridLines: !1 },
|
|
2658
2669
|
margins: ke.HORIZONTAL
|
|
2659
2670
|
}
|
|
2660
|
-
},
|
|
2671
|
+
}, Gl = /* @__PURE__ */ W({
|
|
2661
2672
|
__name: "lume-single-bar-chart",
|
|
2662
2673
|
props: {
|
|
2663
2674
|
...xe(nt)
|
|
2664
2675
|
},
|
|
2665
|
-
setup(e, { emit:
|
|
2666
|
-
const
|
|
2667
|
-
() =>
|
|
2676
|
+
setup(e, { emit: n }) {
|
|
2677
|
+
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { orientation: r, options: l } = ee(t), i = v(
|
|
2678
|
+
() => sl[r.value || B.VERTICAL]
|
|
2668
2679
|
// needs to be computed so that default options are reactive
|
|
2669
2680
|
), { allOptions: s } = ce(l, i);
|
|
2670
|
-
return (c, p) => (y(), X(d(Ie), C(
|
|
2681
|
+
return (c, p) => (y(), X(d(Ie), C(t, {
|
|
2671
2682
|
"chart-type": "single-bar",
|
|
2672
2683
|
options: d(s),
|
|
2673
2684
|
"data-j-single-bar-chart": ""
|
|
@@ -2685,7 +2696,7 @@ const ll = {
|
|
|
2685
2696
|
}))
|
|
2686
2697
|
]), 1040, ["options"]));
|
|
2687
2698
|
}
|
|
2688
|
-
}),
|
|
2699
|
+
}), cl = {
|
|
2689
2700
|
[B.VERTICAL]: {
|
|
2690
2701
|
withTooltip: !0,
|
|
2691
2702
|
xAxisOptions: {},
|
|
@@ -2699,20 +2710,20 @@ const ll = {
|
|
|
2699
2710
|
margins: ke.HORIZONTAL,
|
|
2700
2711
|
tooltipOptions: { position: "right" }
|
|
2701
2712
|
}
|
|
2702
|
-
},
|
|
2713
|
+
}, jl = /* @__PURE__ */ W({
|
|
2703
2714
|
__name: "lume-grouped-bar-chart",
|
|
2704
2715
|
props: {
|
|
2705
2716
|
...xe()
|
|
2706
2717
|
},
|
|
2707
|
-
setup(e, { emit:
|
|
2708
|
-
const
|
|
2709
|
-
() =>
|
|
2718
|
+
setup(e, { emit: n }) {
|
|
2719
|
+
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { orientation: r, options: l } = ee(t), i = v(
|
|
2720
|
+
() => cl[r.value || B.VERTICAL]
|
|
2710
2721
|
// needs to be computed so that default options are reactive
|
|
2711
2722
|
), { allOptions: s } = ce(
|
|
2712
2723
|
l,
|
|
2713
2724
|
i
|
|
2714
2725
|
);
|
|
2715
|
-
return (c, p) => (y(), X(d(Ie), C(
|
|
2726
|
+
return (c, p) => (y(), X(d(Ie), C(t, {
|
|
2716
2727
|
"chart-type": "grouped-bar",
|
|
2717
2728
|
options: d(s),
|
|
2718
2729
|
"data-j-grouped-bar-chart": ""
|
|
@@ -2730,7 +2741,7 @@ const ll = {
|
|
|
2730
2741
|
}))
|
|
2731
2742
|
]), 1040, ["options"]));
|
|
2732
2743
|
}
|
|
2733
|
-
}),
|
|
2744
|
+
}), dl = {
|
|
2734
2745
|
[B.VERTICAL]: {
|
|
2735
2746
|
withTooltip: !0,
|
|
2736
2747
|
xAxisOptions: {},
|
|
@@ -2744,24 +2755,24 @@ const ll = {
|
|
|
2744
2755
|
margins: ke.HORIZONTAL,
|
|
2745
2756
|
tooltipOptions: { position: "right" }
|
|
2746
2757
|
}
|
|
2747
|
-
},
|
|
2758
|
+
}, Pl = /* @__PURE__ */ W({
|
|
2748
2759
|
__name: "lume-stacked-bar-chart",
|
|
2749
2760
|
props: {
|
|
2750
2761
|
...xe()
|
|
2751
2762
|
},
|
|
2752
|
-
setup(e, { emit:
|
|
2753
|
-
const
|
|
2754
|
-
() =>
|
|
2763
|
+
setup(e, { emit: n }) {
|
|
2764
|
+
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { data: r, orientation: l, options: i } = ee(t), s = v(
|
|
2765
|
+
() => dl[l.value || B.VERTICAL]
|
|
2755
2766
|
// needs to be computed so that default options are reactive
|
|
2756
2767
|
), { allOptions: c } = ce(
|
|
2757
2768
|
i,
|
|
2758
2769
|
s
|
|
2759
|
-
), { internalData: p } = it(r), { groupedData: u } =
|
|
2770
|
+
), { internalData: p } = it(r), { groupedData: u } = Qt(p), { stackedXScaleGenerator: f, stackedYScaleGenerator: g } = al(
|
|
2760
2771
|
u,
|
|
2761
2772
|
l,
|
|
2762
2773
|
i
|
|
2763
2774
|
);
|
|
2764
|
-
return (m, T) => (y(), X(d(Ie), C(
|
|
2775
|
+
return (m, T) => (y(), X(d(Ie), C(t, {
|
|
2765
2776
|
"chart-type": "stacked-bar",
|
|
2766
2777
|
options: d(c),
|
|
2767
2778
|
"x-scale": d(f),
|
|
@@ -2781,7 +2792,7 @@ const ll = {
|
|
|
2781
2792
|
}))
|
|
2782
2793
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2783
2794
|
}
|
|
2784
|
-
}),
|
|
2795
|
+
}), vl = ["d", "stroke-width"], ml = 2, pl = /* @__PURE__ */ W({
|
|
2785
2796
|
__name: "lume-line",
|
|
2786
2797
|
props: {
|
|
2787
2798
|
pathDefinition: {
|
|
@@ -2790,7 +2801,7 @@ const ll = {
|
|
|
2790
2801
|
},
|
|
2791
2802
|
width: {
|
|
2792
2803
|
type: Number,
|
|
2793
|
-
default:
|
|
2804
|
+
default: ml
|
|
2794
2805
|
},
|
|
2795
2806
|
color: {
|
|
2796
2807
|
type: String,
|
|
@@ -2814,8 +2825,8 @@ const ll = {
|
|
|
2814
2825
|
}
|
|
2815
2826
|
},
|
|
2816
2827
|
emits: ["click"],
|
|
2817
|
-
setup(e, { emit:
|
|
2818
|
-
const
|
|
2828
|
+
setup(e, { emit: n }) {
|
|
2829
|
+
const t = n, o = R(null);
|
|
2819
2830
|
return fe(() => Ge(o.value)), (a, r) => (y(), x("path", {
|
|
2820
2831
|
ref_key: "root",
|
|
2821
2832
|
ref: o,
|
|
@@ -2831,11 +2842,11 @@ const ll = {
|
|
|
2831
2842
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2832
2843
|
}),
|
|
2833
2844
|
"data-j-line": "",
|
|
2834
|
-
onClick: r[0] || (r[0] = (l) =>
|
|
2835
|
-
}, null, 14,
|
|
2845
|
+
onClick: r[0] || (r[0] = (l) => t("click", l))
|
|
2846
|
+
}, null, 14, vl));
|
|
2836
2847
|
}
|
|
2837
2848
|
});
|
|
2838
|
-
const
|
|
2849
|
+
const fl = /* @__PURE__ */ q(pl, [["__scopeId", "data-v-08896455"]]), hl = ["cx", "cy", "r", "stroke-width"], gl = 4, _l = /* @__PURE__ */ W({
|
|
2839
2850
|
__name: "lume-point",
|
|
2840
2851
|
props: {
|
|
2841
2852
|
x: { type: Number, required: !0 },
|
|
@@ -2846,7 +2857,7 @@ const pl = /* @__PURE__ */ q(ml, [["__scopeId", "data-v-08896455"]]), fl = ["cx"
|
|
|
2846
2857
|
},
|
|
2847
2858
|
radius: {
|
|
2848
2859
|
type: Number,
|
|
2849
|
-
default:
|
|
2860
|
+
default: gl
|
|
2850
2861
|
},
|
|
2851
2862
|
active: {
|
|
2852
2863
|
type: Boolean,
|
|
@@ -2854,8 +2865,8 @@ const pl = /* @__PURE__ */ q(ml, [["__scopeId", "data-v-08896455"]]), fl = ["cx"
|
|
|
2854
2865
|
}
|
|
2855
2866
|
},
|
|
2856
2867
|
emits: ["click"],
|
|
2857
|
-
setup(e, { emit:
|
|
2858
|
-
const
|
|
2868
|
+
setup(e, { emit: n }) {
|
|
2869
|
+
const t = e, o = n, a = R(null), r = v(() => t.radius / 2);
|
|
2859
2870
|
return fe(() => Ge(a.value)), (l, i) => (y(), x("circle", {
|
|
2860
2871
|
ref_key: "root",
|
|
2861
2872
|
ref: a,
|
|
@@ -2866,16 +2877,16 @@ const pl = /* @__PURE__ */ q(ml, [["__scopeId", "data-v-08896455"]]), fl = ["cx"
|
|
|
2866
2877
|
"stroke-width": r.value,
|
|
2867
2878
|
"data-j-point": "",
|
|
2868
2879
|
onClick: i[0] || (i[0] = (s) => o("click", s))
|
|
2869
|
-
}, null, 10,
|
|
2880
|
+
}, null, 10, hl));
|
|
2870
2881
|
}
|
|
2871
2882
|
});
|
|
2872
|
-
const
|
|
2873
|
-
function
|
|
2874
|
-
function
|
|
2883
|
+
const yl = /* @__PURE__ */ q(_l, [["__scopeId", "data-v-9bacbd7d"]]);
|
|
2884
|
+
function qt(e) {
|
|
2885
|
+
function n(r) {
|
|
2875
2886
|
let l = null;
|
|
2876
2887
|
return r == null ? void 0 : r.reduce((i, s, c) => (s == null || s.value == null ? (l ? l.push(c) : l = [c], c === (r == null ? void 0 : r.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2877
2888
|
}
|
|
2878
|
-
function
|
|
2889
|
+
function t(r, l, i, s) {
|
|
2879
2890
|
const u = Math.abs(r - l) / (i + 1) * (s + 1);
|
|
2880
2891
|
return r > l ? r - u : r + u;
|
|
2881
2892
|
}
|
|
@@ -2887,7 +2898,7 @@ function Qt(e) {
|
|
|
2887
2898
|
};
|
|
2888
2899
|
}
|
|
2889
2900
|
return { computedLineData: v(() => e.value.map((r) => {
|
|
2890
|
-
const l =
|
|
2901
|
+
const l = n(r.values);
|
|
2891
2902
|
return {
|
|
2892
2903
|
...r,
|
|
2893
2904
|
isDashed: o(l),
|
|
@@ -2900,7 +2911,7 @@ function Qt(e) {
|
|
|
2900
2911
|
const f = c[0] - 1, g = c[c.length - 1] + 1;
|
|
2901
2912
|
let m = (p = r.values[f]) == null ? void 0 : p.value, T = (u = r.values[g]) == null ? void 0 : u.value;
|
|
2902
2913
|
return m == null && (m = T), T == null && (T = m), {
|
|
2903
|
-
value:
|
|
2914
|
+
value: t(
|
|
2904
2915
|
m,
|
|
2905
2916
|
T,
|
|
2906
2917
|
c.length,
|
|
@@ -2914,26 +2925,26 @@ function Qt(e) {
|
|
|
2914
2925
|
};
|
|
2915
2926
|
})) };
|
|
2916
2927
|
}
|
|
2917
|
-
function
|
|
2918
|
-
const
|
|
2919
|
-
return (o, a) => e(e.domain()[
|
|
2928
|
+
function kl(e, n) {
|
|
2929
|
+
const t = e.bandwidth() / 2;
|
|
2930
|
+
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
2920
2931
|
}
|
|
2921
|
-
function
|
|
2922
|
-
return (
|
|
2932
|
+
function bl(e, n) {
|
|
2933
|
+
return (t, o) => e(n + (o - 1));
|
|
2923
2934
|
}
|
|
2924
|
-
function
|
|
2925
|
-
return
|
|
2926
|
-
be(
|
|
2927
|
-
).y((r) => o(r))(
|
|
2935
|
+
function Al(e, n, t, o) {
|
|
2936
|
+
return pn().x(
|
|
2937
|
+
be(t) ? kl(t, e) : bl(t, e)
|
|
2938
|
+
).y((r) => o(r))(n);
|
|
2928
2939
|
}
|
|
2929
|
-
const
|
|
2940
|
+
const Tl = {
|
|
2930
2941
|
class: "lume-line-group",
|
|
2931
2942
|
"data-j-lume-line-group": ""
|
|
2932
|
-
},
|
|
2943
|
+
}, Ll = { class: "lume-line-group__lines" }, Ol = {
|
|
2933
2944
|
key: 0,
|
|
2934
2945
|
class: "lume-line-group__points",
|
|
2935
2946
|
"data-j-lume-line-group__points": ""
|
|
2936
|
-
},
|
|
2947
|
+
}, $l = 1, xl = /* @__PURE__ */ W({
|
|
2937
2948
|
__name: "lume-line-group",
|
|
2938
2949
|
props: {
|
|
2939
2950
|
...je(),
|
|
@@ -2947,11 +2958,11 @@ const Al = {
|
|
|
2947
2958
|
}
|
|
2948
2959
|
},
|
|
2949
2960
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2950
|
-
setup(e, { emit:
|
|
2951
|
-
const
|
|
2961
|
+
setup(e, { emit: n }) {
|
|
2962
|
+
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i } = ee(t), s = Ne(
|
|
2952
2963
|
"tooltipAnchorAttributes",
|
|
2953
2964
|
null
|
|
2954
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
2965
|
+
), { updateTooltipAnchorAttributes: c } = Xt(
|
|
2955
2966
|
s,
|
|
2956
2967
|
r,
|
|
2957
2968
|
l,
|
|
@@ -2959,22 +2970,22 @@ const Al = {
|
|
|
2959
2970
|
), p = v(() => {
|
|
2960
2971
|
if (a.value.every((H) => H.isDashed))
|
|
2961
2972
|
return a.value;
|
|
2962
|
-
const { computedLineData: N } =
|
|
2973
|
+
const { computedLineData: N } = qt(a);
|
|
2963
2974
|
return r.value.withTooltip !== !1 && (s != null && s.value) && c(N.value), N.value;
|
|
2964
2975
|
}), u = v(() => {
|
|
2965
|
-
if (
|
|
2976
|
+
if (t.hoveredIndex === -1)
|
|
2966
2977
|
return;
|
|
2967
|
-
const N =
|
|
2978
|
+
const N = xn(
|
|
2968
2979
|
p.value,
|
|
2969
|
-
|
|
2980
|
+
t.hoveredIndex
|
|
2970
2981
|
);
|
|
2971
2982
|
return {
|
|
2972
|
-
d: `M ${Ye(l.value,
|
|
2983
|
+
d: `M ${Ye(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
2973
2984
|
V ${i.value(N)}`
|
|
2974
2985
|
// Move to X index, Vertical line to the highest point
|
|
2975
2986
|
};
|
|
2976
2987
|
}), f = v(
|
|
2977
|
-
() => l.value &&
|
|
2988
|
+
() => l.value && $l / (In(l.value) - 1)
|
|
2978
2989
|
// Subtracting the first line (read below)
|
|
2979
2990
|
), g = v(
|
|
2980
2991
|
() => {
|
|
@@ -2985,7 +2996,7 @@ const Al = {
|
|
|
2985
2996
|
), m = v(
|
|
2986
2997
|
() => l.value.bandwidth() / 2
|
|
2987
2998
|
), T = v(() => l.value.domain()), O = v(
|
|
2988
|
-
() => r.value.withPoints ??
|
|
2999
|
+
() => r.value.withPoints ?? t.withPoints
|
|
2989
3000
|
);
|
|
2990
3001
|
function b(N) {
|
|
2991
3002
|
return p.value[N].values;
|
|
@@ -2996,7 +3007,7 @@ const Al = {
|
|
|
2996
3007
|
(U = b(H)[N - 1]) == null ? void 0 : U.value,
|
|
2997
3008
|
(te = b(H)[N]) == null ? void 0 : te.value
|
|
2998
3009
|
];
|
|
2999
|
-
return
|
|
3010
|
+
return Al(
|
|
3000
3011
|
N,
|
|
3001
3012
|
G,
|
|
3002
3013
|
l.value,
|
|
@@ -3013,14 +3024,14 @@ const Al = {
|
|
|
3013
3024
|
var U;
|
|
3014
3025
|
const G = (U = b(H)[N]) == null ? void 0 : U.value;
|
|
3015
3026
|
return {
|
|
3016
|
-
x: be(l.value) ?
|
|
3027
|
+
x: be(l.value) ? t.xScale(T.value[N]) + m.value : t.xScale(N),
|
|
3017
3028
|
y: i.value(G)
|
|
3018
3029
|
};
|
|
3019
3030
|
}
|
|
3020
3031
|
function D(N) {
|
|
3021
|
-
return
|
|
3032
|
+
return t.hoveredIndex === N;
|
|
3022
3033
|
}
|
|
3023
|
-
return (N, H) => (y(), x("g",
|
|
3034
|
+
return (N, H) => (y(), x("g", Tl, [
|
|
3024
3035
|
j("path", C(u.value, {
|
|
3025
3036
|
class: "lume-line-group__overlay-line",
|
|
3026
3037
|
"data-j-lume-line-group__overlay-line": ""
|
|
@@ -3029,8 +3040,8 @@ const Al = {
|
|
|
3029
3040
|
key: G.label,
|
|
3030
3041
|
class: "lume-line-group__group"
|
|
3031
3042
|
}, [
|
|
3032
|
-
j("g",
|
|
3033
|
-
(y(!0), x(Q, null, Z(G.values, (te, F) => (y(), X(d(
|
|
3043
|
+
j("g", Ll, [
|
|
3044
|
+
(y(!0), x(Q, null, Z(G.values, (te, F) => (y(), X(d(fl), C($(F), {
|
|
3034
3045
|
key: `line-${F}`,
|
|
3035
3046
|
color: G.color,
|
|
3036
3047
|
dashed: G.isDashed(F),
|
|
@@ -3040,8 +3051,8 @@ const Al = {
|
|
|
3040
3051
|
onClick: (J) => o("line-click", { index: F, datasetIndex: U, event: J })
|
|
3041
3052
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3042
3053
|
]),
|
|
3043
|
-
O.value ? (y(), x("g",
|
|
3044
|
-
(y(!0), x(Q, null, Z(G.values, (te, F) => (y(), X(d(
|
|
3054
|
+
O.value ? (y(), x("g", Ol, [
|
|
3055
|
+
(y(!0), x(Q, null, Z(G.values, (te, F) => (y(), X(d(yl), C(w(F, U), {
|
|
3045
3056
|
key: `point-${F}`,
|
|
3046
3057
|
active: D(F),
|
|
3047
3058
|
color: G.color,
|
|
@@ -3054,26 +3065,26 @@ const Al = {
|
|
|
3054
3065
|
]));
|
|
3055
3066
|
}
|
|
3056
3067
|
});
|
|
3057
|
-
const
|
|
3068
|
+
const en = /* @__PURE__ */ q(xl, [["__scopeId", "data-v-c4d7f0ca"]]), Il = {
|
|
3058
3069
|
margins: ke.VERTICAL,
|
|
3059
3070
|
startOnZero: !0,
|
|
3060
3071
|
withTooltip: !0,
|
|
3061
3072
|
xAxisOptions: {},
|
|
3062
3073
|
yAxisOptions: { gridLines: !0 }
|
|
3063
|
-
},
|
|
3074
|
+
}, Vl = /* @__PURE__ */ W({
|
|
3064
3075
|
__name: "lume-line-chart",
|
|
3065
3076
|
props: {
|
|
3066
3077
|
...xe(null, !1)
|
|
3067
3078
|
},
|
|
3068
|
-
setup(e, { emit:
|
|
3069
|
-
const
|
|
3070
|
-
return (i, s) => (y(), X(d(Ie), C(
|
|
3079
|
+
setup(e, { emit: n }) {
|
|
3080
|
+
const t = e, { componentEventPropagator: o } = he(), a = Ae(le()), { options: r } = ee(t), { allOptions: l } = ce(r, Il);
|
|
3081
|
+
return (i, s) => (y(), X(d(Ie), C(t, {
|
|
3071
3082
|
"chart-type": "line",
|
|
3072
3083
|
options: d(l),
|
|
3073
3084
|
"data-j-lume-line-chart": ""
|
|
3074
3085
|
}, ae(d(o))), se({
|
|
3075
3086
|
groups: V((c) => [
|
|
3076
|
-
re(d(
|
|
3087
|
+
re(d(en), C(c, ae(d(o))), null, 16)
|
|
3077
3088
|
]),
|
|
3078
3089
|
_: 2
|
|
3079
3090
|
}, [
|
|
@@ -3086,17 +3097,17 @@ const qt = /* @__PURE__ */ q($l, [["__scopeId", "data-v-c4d7f0ca"]]), xl = {
|
|
|
3086
3097
|
]), 1040, ["options"]));
|
|
3087
3098
|
}
|
|
3088
3099
|
});
|
|
3089
|
-
function
|
|
3100
|
+
function wl(e) {
|
|
3090
3101
|
return { areaPathDefinition: v(
|
|
3091
|
-
() => function(
|
|
3092
|
-
if (!
|
|
3102
|
+
() => function(t, o) {
|
|
3103
|
+
if (!t || !o)
|
|
3093
3104
|
return;
|
|
3094
3105
|
const a = e.value[0].values;
|
|
3095
|
-
return
|
|
3106
|
+
return fn().x((r, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((r) => o(r.value))(a);
|
|
3096
3107
|
}
|
|
3097
3108
|
) };
|
|
3098
3109
|
}
|
|
3099
|
-
const
|
|
3110
|
+
const El = {
|
|
3100
3111
|
margins: {
|
|
3101
3112
|
top: 0,
|
|
3102
3113
|
right: 0,
|
|
@@ -3110,14 +3121,14 @@ const wl = {
|
|
|
3110
3121
|
tooltipOptions: {
|
|
3111
3122
|
showTitle: !1
|
|
3112
3123
|
}
|
|
3113
|
-
},
|
|
3124
|
+
}, Nl = ["d"], Dl = /* @__PURE__ */ W({
|
|
3114
3125
|
__name: "lume-sparkline-chart",
|
|
3115
3126
|
props: {
|
|
3116
3127
|
...ut(null),
|
|
3117
3128
|
...De()
|
|
3118
3129
|
},
|
|
3119
|
-
setup(e, { expose:
|
|
3120
|
-
const o = e, { componentEventPropagator: a } = he(), r = Ae(le()), { data: l, options: i } = ee(o), { internalData: s } = it(l), { allOptions: c } = ce(i,
|
|
3130
|
+
setup(e, { expose: n, emit: t }) {
|
|
3131
|
+
const o = e, { componentEventPropagator: a } = he(), r = Ae(le()), { data: l, options: i } = ee(o), { internalData: s } = it(l), { allOptions: c } = ce(i, El), { computedLineData: p } = qt(s), { areaPathDefinition: u } = wl(p), f = v(() => s.value[0].color), g = v(
|
|
3121
3132
|
() => l.value[0].areaColor || f.value
|
|
3122
3133
|
);
|
|
3123
3134
|
function m(O) {
|
|
@@ -3129,7 +3140,7 @@ const wl = {
|
|
|
3129
3140
|
function T(O, b, h) {
|
|
3130
3141
|
return Ee().range([0, h.width]).domain([0, O[0].values.length - 1]);
|
|
3131
3142
|
}
|
|
3132
|
-
return
|
|
3143
|
+
return n({
|
|
3133
3144
|
areaPathDefinition: u
|
|
3134
3145
|
}), (O, b) => (y(), X(d(Ie), C(o, {
|
|
3135
3146
|
"chart-type": "line",
|
|
@@ -3147,8 +3158,8 @@ const wl = {
|
|
|
3147
3158
|
]),
|
|
3148
3159
|
d: d(u)(h.xScale, h.yScale),
|
|
3149
3160
|
"data-j-sparkline__area": ""
|
|
3150
|
-
}, null, 10,
|
|
3151
|
-
re(d(
|
|
3161
|
+
}, null, 10, Nl)) : z("", !0),
|
|
3162
|
+
re(d(en), C(h, { "with-points": !1 }, ae(d(a))), null, 16)
|
|
3152
3163
|
]),
|
|
3153
3164
|
_: 2
|
|
3154
3165
|
}, [
|
|
@@ -3161,31 +3172,31 @@ const wl = {
|
|
|
3161
3172
|
]), 1040, ["options"]));
|
|
3162
3173
|
}
|
|
3163
3174
|
});
|
|
3164
|
-
const
|
|
3175
|
+
const Fl = /* @__PURE__ */ q(Dl, [["__scopeId", "data-v-c681fff6"]]);
|
|
3165
3176
|
export {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3177
|
+
Sl as LumeAlluvialDiagram,
|
|
3178
|
+
Ya as LumeAlluvialGroup,
|
|
3179
|
+
va as LumeAlluvialNodeLabel,
|
|
3180
|
+
fa as LumeAlluvialNodeValue,
|
|
3170
3181
|
_t as LumeAxis,
|
|
3171
3182
|
rt as LumeBar,
|
|
3172
|
-
|
|
3183
|
+
Cl as LumeBarChart,
|
|
3173
3184
|
st as LumeBarGroup,
|
|
3174
3185
|
Ie as LumeChart,
|
|
3175
|
-
|
|
3186
|
+
ao as LumeChartContainer,
|
|
3176
3187
|
yt as LumeChartLegend,
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3188
|
+
jl as LumeGroupedBarChart,
|
|
3189
|
+
fl as LumeLine,
|
|
3190
|
+
Vl as LumeLineChart,
|
|
3191
|
+
en as LumeLineGroup,
|
|
3192
|
+
Fo as LumeOverlayGroup,
|
|
3193
|
+
yl as LumePoint,
|
|
3194
|
+
Gl as LumeSingleBarChart,
|
|
3195
|
+
Fl as LumeSparklineChart,
|
|
3196
|
+
Pl as LumeStackedBarChart,
|
|
3197
|
+
Io as LumeTooltip,
|
|
3198
|
+
bo as LumeTooltipItem,
|
|
3199
|
+
ho as LumeTooltipSummary,
|
|
3200
|
+
co as LumeTooltipTitle
|
|
3190
3201
|
};
|
|
3191
3202
|
//# sourceMappingURL=index.js.map
|