@adyen/lume 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/charts/lume-alluvial-diagram/defaults.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts +13 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/helpers.d.ts +20 -2
- package/dist/@types/components/groups/lume-alluvial-group/helpers.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts +2 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -1
- package/dist/@types/types/alluvial.d.ts +3 -0
- package/dist/@types/types/alluvial.d.ts.map +1 -1
- package/dist/@types/types/options.d.ts +4 -1
- package/dist/@types/types/options.d.ts.map +1 -1
- package/dist/common/BSSy21i7.js +5 -0
- package/dist/common/BSSy21i7.js.map +1 -0
- package/dist/common/asrcm8__.js +5 -0
- package/dist/common/asrcm8__.js.map +1 -0
- package/dist/common/es6xM4zX.js +5 -0
- package/dist/common/es6xM4zX.js.map +1 -0
- package/dist/common/{vDk1lu85.js → h4DBladZ.js} +1416 -1352
- package/dist/common/h4DBladZ.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +23 -0
- package/dist/scss/main.scss +4 -4
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
- package/dist/common/Aka2OjK8.js +0 -5
- package/dist/common/Aka2OjK8.js.map +0 -1
- package/dist/common/BAc0dIxQ.js +0 -5
- package/dist/common/BAc0dIxQ.js.map +0 -1
- package/dist/common/BkCJnqDA.js +0 -5
- package/dist/common/BkCJnqDA.js.map +0 -1
- package/dist/common/vDk1lu85.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as R, ref as I, isRef as
|
|
2
|
-
import { sankeyLinkHorizontal as
|
|
3
|
-
import { format as
|
|
4
|
-
import { createPopper as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as R, ref as I, isRef as Nt, computed as v, watch as H, toRefs as V, inject as Oe, reactive as Ie, onMounted as re, watchEffect as Et, onBeforeUnmount as $t, useSlots as X, nextTick as Be, provide as Pe, defineAsyncComponent as Re } from "vue";
|
|
2
|
+
import { sankeyLinkHorizontal as Jt, sankey as Qt, sankeyJustify as qt } from "d3-sankey";
|
|
3
|
+
import { format as en, ticks as tn, scaleLinear as ge, scaleBand as he, link as nn, line as rn, area as an } from "d3";
|
|
4
|
+
import { createPopper as on } from "@popperjs/core";
|
|
5
|
+
const ln = /* @__PURE__ */ R({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,14 +44,14 @@ const nn = /* @__PURE__ */ R({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
48
|
-
var
|
|
49
|
-
return e && (
|
|
47
|
+
function S(t, e, r, n, a, o, l, i) {
|
|
48
|
+
var u = typeof t == "function" ? t.options : t;
|
|
49
|
+
return e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), o && (u._scopeId = "data-v-" + o), {
|
|
50
50
|
exports: t,
|
|
51
|
-
options:
|
|
51
|
+
options: u
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var un = function() {
|
|
55
55
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
56
56
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
57
57
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -61,15 +61,15 @@ var rn = function() {
|
|
|
61
61
|
}, click: function(a) {
|
|
62
62
|
return n.emit("click", a);
|
|
63
63
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
}, sn = [], cn = /* @__PURE__ */ S(
|
|
65
|
+
ln,
|
|
66
|
+
un,
|
|
67
|
+
sn,
|
|
68
68
|
!1,
|
|
69
69
|
null,
|
|
70
70
|
"59ddc0a6"
|
|
71
71
|
);
|
|
72
|
-
const
|
|
72
|
+
const dn = cn.exports, vn = [
|
|
73
73
|
"controls",
|
|
74
74
|
"legend",
|
|
75
75
|
"axes",
|
|
@@ -77,64 +77,64 @@ const un = on.exports, ln = [
|
|
|
77
77
|
"tooltip",
|
|
78
78
|
"tooltip-content"
|
|
79
79
|
];
|
|
80
|
-
function
|
|
80
|
+
function wt() {
|
|
81
81
|
return process.env.NODE_ENV === "production";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Dt(t) {
|
|
84
84
|
return (t == null ? void 0 : t.map(
|
|
85
85
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
86
86
|
).flat()) || [];
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ke(t) {
|
|
89
89
|
return t.length === 1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function fn(t) {
|
|
92
92
|
return !!t && t.every(
|
|
93
93
|
(e) => "color" in e
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Ce(t) {
|
|
97
97
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ht(t, e) {
|
|
100
100
|
const r = { ...t };
|
|
101
101
|
return Object.entries(e).forEach(([n, a]) => {
|
|
102
|
-
r[n] =
|
|
102
|
+
r[n] = Ce(t[n]) && Ce(a) ? Ht(t[n], a) : a;
|
|
103
103
|
}), r;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return t != null &&
|
|
105
|
+
function pn(t) {
|
|
106
|
+
return t != null && Ce(t) && "value" in t;
|
|
107
107
|
}
|
|
108
108
|
function K(t) {
|
|
109
109
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function mn(t) {
|
|
112
112
|
return K(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function _n(t) {
|
|
115
115
|
const [e, r] = t.domain();
|
|
116
116
|
return e == null || r == null || e === 0 && r === 0;
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const gn = (t, e) => {
|
|
119
119
|
if (!t)
|
|
120
120
|
throw new Error("Data is not a valid array");
|
|
121
121
|
if (t.length === 0)
|
|
122
122
|
throw new Error("Cannot get highest value from empty array");
|
|
123
123
|
t.some(
|
|
124
124
|
({ values: n }) => n.length - 1 >= e
|
|
125
|
-
) ||
|
|
125
|
+
) || ne(J.IndexExceedsLengthOfDataSets);
|
|
126
126
|
};
|
|
127
|
-
function
|
|
127
|
+
function hn(t, e) {
|
|
128
128
|
var r;
|
|
129
|
-
return
|
|
129
|
+
return gn(t, e), ((r = t.reduce(
|
|
130
130
|
(n, a) => {
|
|
131
|
-
var
|
|
132
|
-
return (((
|
|
131
|
+
var o, l;
|
|
132
|
+
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
133
133
|
}
|
|
134
134
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const e =
|
|
136
|
+
function St(t) {
|
|
137
|
+
const e = Nt(t) ? t.value : t;
|
|
138
138
|
if (!e)
|
|
139
139
|
throw new Error("No empty array can be created from specified data value");
|
|
140
140
|
const r = Math.max(
|
|
@@ -143,17 +143,17 @@ function Nt(t) {
|
|
|
143
143
|
);
|
|
144
144
|
return Array(r).fill(null);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function yn(t) {
|
|
147
147
|
return K(t) ? t.domain().length : Math.max(...t.domain());
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function bn(t, e) {
|
|
150
150
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function kn(t, e, r) {
|
|
153
153
|
const n = e, a = t.slice(0, n);
|
|
154
154
|
return t.slice(n).concat(a);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function se(t) {
|
|
157
157
|
if (t.groups) {
|
|
158
158
|
const e = Object.keys(t);
|
|
159
159
|
return Object.assign(
|
|
@@ -163,32 +163,32 @@ function ce(t) {
|
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function xn(t) {
|
|
167
167
|
return Object.assign(
|
|
168
168
|
{},
|
|
169
169
|
...Object.keys(t).map(
|
|
170
|
-
(e) =>
|
|
170
|
+
(e) => vn.includes(e) ? {} : { [e]: t[e] }
|
|
171
171
|
)
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Je(t, e) {
|
|
175
175
|
const r = e - t.length;
|
|
176
176
|
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
177
177
|
}
|
|
178
178
|
var J = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
179
179
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(J || {});
|
|
180
|
-
const
|
|
181
|
-
function
|
|
182
|
-
e &&
|
|
180
|
+
const Ln = "[lume] ";
|
|
181
|
+
function ne(t, e = !0) {
|
|
182
|
+
e && wt() || console.warn(Ln + "Warning: " + t);
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Te = (t) => {
|
|
185
185
|
let e = null;
|
|
186
186
|
switch (typeof t) {
|
|
187
187
|
case "string":
|
|
188
188
|
try {
|
|
189
|
-
e =
|
|
189
|
+
e = en(t);
|
|
190
190
|
} catch {
|
|
191
|
-
|
|
191
|
+
ne(J.InvalidFormat), e = null;
|
|
192
192
|
}
|
|
193
193
|
break;
|
|
194
194
|
case "function":
|
|
@@ -201,46 +201,46 @@ const Oe = (t) => {
|
|
|
201
201
|
return e ? e(...n) : n[0];
|
|
202
202
|
}
|
|
203
203
|
return r;
|
|
204
|
-
},
|
|
204
|
+
}, ye = () => ({
|
|
205
205
|
options: {
|
|
206
206
|
type: Object,
|
|
207
207
|
default: () => ({})
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
function Q(t, e) {
|
|
211
|
-
return { allOptions:
|
|
212
|
-
const n =
|
|
213
|
-
return n ?
|
|
211
|
+
return { allOptions: v(() => {
|
|
212
|
+
const n = Nt(e) ? e == null ? void 0 : e.value : e;
|
|
213
|
+
return n ? Ht(n, t.value) : t.value;
|
|
214
214
|
}) };
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
function
|
|
218
|
-
const n = I(), a =
|
|
219
|
-
function
|
|
216
|
+
const Tn = 0.2;
|
|
217
|
+
function An(t, e, r) {
|
|
218
|
+
const n = I(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
|
|
219
|
+
function l() {
|
|
220
220
|
if (!e.value) return;
|
|
221
|
-
const
|
|
222
|
-
(s,
|
|
221
|
+
const u = e.value.reduce(
|
|
222
|
+
(s, f) => s + f.ref.getBoundingClientRect().width,
|
|
223
223
|
0
|
|
224
|
-
), c = Math.ceil(
|
|
225
|
-
n.value = c + c *
|
|
224
|
+
), c = Math.ceil(u / o.value);
|
|
225
|
+
n.value = c + c * Tn;
|
|
226
226
|
}
|
|
227
|
-
function i(
|
|
227
|
+
function i(u) {
|
|
228
228
|
if (!e.value) return !0;
|
|
229
229
|
const c = r.value.skip, s = e.value.length;
|
|
230
|
-
if (
|
|
231
|
-
const
|
|
232
|
-
return
|
|
230
|
+
if (u === 0) return !0;
|
|
231
|
+
const f = a.value / s, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / f);
|
|
232
|
+
return u % m === 0;
|
|
233
233
|
}
|
|
234
|
-
return H(e,
|
|
234
|
+
return H(e, l), { showTick: i };
|
|
235
235
|
}
|
|
236
236
|
const O = {
|
|
237
237
|
HORIZONTAL: "horizontal",
|
|
238
238
|
VERTICAL: "vertical"
|
|
239
|
-
},
|
|
239
|
+
}, On = {
|
|
240
240
|
SINGLE: "single",
|
|
241
241
|
GROUPED: "grouped",
|
|
242
242
|
STACKED: "stacked"
|
|
243
|
-
},
|
|
243
|
+
}, Pt = "No data", st = 20, Rt = 0.33, Bt = 0.5, Ct = 12, be = 8, In = 1, Nn = [
|
|
244
244
|
"auto",
|
|
245
245
|
"auto-start",
|
|
246
246
|
"auto-end",
|
|
@@ -258,9 +258,9 @@ const O = {
|
|
|
258
258
|
"left-end"
|
|
259
259
|
];
|
|
260
260
|
function Ne(t) {
|
|
261
|
-
t != null && t.closest("svg") ||
|
|
261
|
+
t != null && t.closest("svg") || ne(J.NotContainedInSvg);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const Ft = {
|
|
264
264
|
/** Displays a line for each tick. */
|
|
265
265
|
gridLines: !1,
|
|
266
266
|
/** Displays the axis title. */
|
|
@@ -276,37 +276,37 @@ const Rt = {
|
|
|
276
276
|
tickFormat: null,
|
|
277
277
|
/** Space between the tick label and the axis line. */
|
|
278
278
|
tickPadding: 12
|
|
279
|
-
},
|
|
280
|
-
...
|
|
279
|
+
}, En = {
|
|
280
|
+
...Ft,
|
|
281
281
|
withTitle: !1,
|
|
282
282
|
skip: !0
|
|
283
|
-
},
|
|
284
|
-
...
|
|
283
|
+
}, $n = {
|
|
284
|
+
...Ft,
|
|
285
285
|
gridLines: !0
|
|
286
|
-
},
|
|
287
|
-
const n =
|
|
288
|
-
function a(
|
|
286
|
+
}, wn = function(t, e, r) {
|
|
287
|
+
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
288
|
+
function a(u, c) {
|
|
289
289
|
return {
|
|
290
|
-
transform: `translate(${(t.value(c) ?? t.value(
|
|
290
|
+
transform: `translate(${(t.value(c) ?? t.value(u)) - n.value}, 0)`
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function u
|
|
293
|
+
function o(u) {
|
|
294
294
|
var s;
|
|
295
295
|
const c = Math.max(
|
|
296
296
|
t.value.step(),
|
|
297
|
-
(
|
|
297
|
+
(u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : t.value.step()) + 20
|
|
298
298
|
);
|
|
299
299
|
return {
|
|
300
300
|
x: -(c - t.value.step()) / 2,
|
|
301
301
|
width: c,
|
|
302
|
-
height: r.value.tickPadding +
|
|
302
|
+
height: r.value.tickPadding + Ct + be
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const
|
|
305
|
+
function l() {
|
|
306
|
+
const u = t.value.step() / 2;
|
|
307
307
|
return {
|
|
308
|
-
x1:
|
|
309
|
-
x2:
|
|
308
|
+
x1: u,
|
|
309
|
+
x2: u,
|
|
310
310
|
y1: -e.value.height
|
|
311
311
|
// Negative height means it goes from bottom to top
|
|
312
312
|
};
|
|
@@ -320,32 +320,32 @@ const Rt = {
|
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
323
|
-
getGridLinesAttributes:
|
|
324
|
-
getTickGhostAttributes:
|
|
323
|
+
getGridLinesAttributes: l,
|
|
324
|
+
getTickGhostAttributes: o,
|
|
325
325
|
getTickGroupAttributes: a,
|
|
326
326
|
getTickLabelAttributes: i
|
|
327
327
|
};
|
|
328
|
-
},
|
|
329
|
-
const n =
|
|
330
|
-
function a(
|
|
328
|
+
}, Dn = function(t, e, r) {
|
|
329
|
+
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
330
|
+
function a(u, c) {
|
|
331
331
|
return {
|
|
332
|
-
transform: `translate(0, ${(t.value(c) ?? t.value(
|
|
332
|
+
transform: `translate(0, ${(t.value(c) ?? t.value(u)) - n.value})`
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function u
|
|
335
|
+
function o(u) {
|
|
336
336
|
var s;
|
|
337
|
-
const c = (
|
|
337
|
+
const c = (u ? (s = u.getComputedTextLength) == null ? void 0 : s.call(u) : 42) + r.value.tickPadding + be;
|
|
338
338
|
return {
|
|
339
339
|
x: -c,
|
|
340
340
|
width: c,
|
|
341
341
|
height: t.value.step()
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
const
|
|
344
|
+
function l() {
|
|
345
|
+
const u = t.value.step() / 2;
|
|
346
346
|
return {
|
|
347
|
-
y1:
|
|
348
|
-
y2:
|
|
347
|
+
y1: u,
|
|
348
|
+
y2: u,
|
|
349
349
|
x1: e.value.width
|
|
350
350
|
};
|
|
351
351
|
}
|
|
@@ -358,29 +358,29 @@ const Rt = {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
return {
|
|
361
|
-
getGridLinesAttributes:
|
|
362
|
-
getTickGhostAttributes:
|
|
361
|
+
getGridLinesAttributes: l,
|
|
362
|
+
getTickGhostAttributes: o,
|
|
363
363
|
getTickGroupAttributes: a,
|
|
364
364
|
getTickLabelAttributes: i
|
|
365
365
|
};
|
|
366
|
-
},
|
|
367
|
-
const n =
|
|
368
|
-
const
|
|
369
|
-
return
|
|
366
|
+
}, Hn = function(t, e, r) {
|
|
367
|
+
const n = v(() => {
|
|
368
|
+
const u = t.value.ticks();
|
|
369
|
+
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
370
370
|
});
|
|
371
|
-
function a(
|
|
371
|
+
function a(u) {
|
|
372
372
|
return {
|
|
373
|
-
transform: `translate(${t.value(
|
|
373
|
+
transform: `translate(${t.value(u)}, 0)`
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function o() {
|
|
377
377
|
return {
|
|
378
|
-
height: r.value.tickPadding +
|
|
378
|
+
height: r.value.tickPadding + Ct + be,
|
|
379
379
|
width: n.value,
|
|
380
380
|
x: -(n.value / 2)
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function l() {
|
|
384
384
|
return {
|
|
385
385
|
y1: -e.value.height
|
|
386
386
|
};
|
|
@@ -393,24 +393,24 @@ const Rt = {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
return {
|
|
396
|
-
getGridLinesAttributes:
|
|
397
|
-
getTickGhostAttributes:
|
|
396
|
+
getGridLinesAttributes: l,
|
|
397
|
+
getTickGhostAttributes: o,
|
|
398
398
|
getTickGroupAttributes: a,
|
|
399
399
|
getTickLabelAttributes: i
|
|
400
400
|
};
|
|
401
|
-
},
|
|
402
|
-
const n =
|
|
403
|
-
const
|
|
404
|
-
return
|
|
401
|
+
}, Sn = function(t, e, r) {
|
|
402
|
+
const n = v(() => {
|
|
403
|
+
const u = t.value.ticks();
|
|
404
|
+
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
405
405
|
});
|
|
406
|
-
function a(
|
|
406
|
+
function a(u) {
|
|
407
407
|
return {
|
|
408
|
-
transform: `translate(0, ${t.value(
|
|
408
|
+
transform: `translate(0, ${t.value(u)})`
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function u
|
|
411
|
+
function o(u) {
|
|
412
412
|
var s;
|
|
413
|
-
const c = (((s =
|
|
413
|
+
const c = (((s = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : s.call(u)) || 0) + r.value.tickPadding + be;
|
|
414
414
|
return {
|
|
415
415
|
width: c,
|
|
416
416
|
height: n.value,
|
|
@@ -418,7 +418,7 @@ const Rt = {
|
|
|
418
418
|
y: -(n.value / 2)
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function l() {
|
|
422
422
|
return {
|
|
423
423
|
x1: e.value.width
|
|
424
424
|
};
|
|
@@ -431,19 +431,19 @@ const Rt = {
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
return {
|
|
434
|
-
getGridLinesAttributes:
|
|
435
|
-
getTickGhostAttributes:
|
|
434
|
+
getGridLinesAttributes: l,
|
|
435
|
+
getTickGhostAttributes: o,
|
|
436
436
|
getTickGroupAttributes: a,
|
|
437
437
|
getTickLabelAttributes: i
|
|
438
438
|
};
|
|
439
|
-
},
|
|
440
|
-
"x-band-scale-axis":
|
|
441
|
-
"y-band-scale-axis":
|
|
442
|
-
"x-linear-scale-axis":
|
|
443
|
-
"y-linear-scale-axis":
|
|
439
|
+
}, Pn = {
|
|
440
|
+
"x-band-scale-axis": wn,
|
|
441
|
+
"y-band-scale-axis": Dn,
|
|
442
|
+
"x-linear-scale-axis": Hn,
|
|
443
|
+
"y-linear-scale-axis": Sn
|
|
444
444
|
};
|
|
445
|
-
var
|
|
446
|
-
const
|
|
445
|
+
var Fe = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Fe || {}), Ge = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Ge || {}), Le = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(Le || {});
|
|
446
|
+
const Rn = /* @__PURE__ */ R({
|
|
447
447
|
__name: "lume-axis",
|
|
448
448
|
props: {
|
|
449
449
|
scale: {
|
|
@@ -453,12 +453,12 @@ const Dn = /* @__PURE__ */ R({
|
|
|
453
453
|
type: {
|
|
454
454
|
type: String,
|
|
455
455
|
default: void 0,
|
|
456
|
-
validator: (t) => t in
|
|
456
|
+
validator: (t) => t in Le
|
|
457
457
|
},
|
|
458
458
|
position: {
|
|
459
459
|
type: String,
|
|
460
460
|
default: void 0,
|
|
461
|
-
validator: (t) => t in
|
|
461
|
+
validator: (t) => t in Ge
|
|
462
462
|
},
|
|
463
463
|
containerSize: {
|
|
464
464
|
type: Object,
|
|
@@ -472,108 +472,108 @@ const Dn = /* @__PURE__ */ R({
|
|
|
472
472
|
type: String,
|
|
473
473
|
default: O.VERTICAL
|
|
474
474
|
},
|
|
475
|
-
...
|
|
475
|
+
...ye()
|
|
476
476
|
},
|
|
477
477
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
478
478
|
setup(t, { emit: e }) {
|
|
479
|
-
const r = t, n = 16, { scale: a, containerSize:
|
|
480
|
-
() => r.type ?
|
|
481
|
-
), _ =
|
|
482
|
-
() => r.type || (
|
|
483
|
-
), x =
|
|
484
|
-
() => _.value === "x" &&
|
|
479
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = V(r), c = Oe("isEmpty", I(!1)), s = Ie({}), f = I(null), m = I(null), h = I(null), g = v(
|
|
480
|
+
() => r.type ? Le[r.type] : r.position
|
|
481
|
+
), _ = v(
|
|
482
|
+
() => r.type || (g.value === "left" ? "y" : "x")
|
|
483
|
+
), x = v(
|
|
484
|
+
() => _.value === "x" && u.value === O.VERTICAL || _.value === "y" && u.value === O.HORIZONTAL
|
|
485
485
|
), { allOptions: d } = Q(
|
|
486
486
|
i,
|
|
487
|
-
_.value === "x" ?
|
|
488
|
-
), { showTick: p } =
|
|
489
|
-
() => c.value || !a.value ||
|
|
490
|
-
),
|
|
491
|
-
var E, w, P,
|
|
492
|
-
return _.value === "y" && y.value ? `translate(0, ${((E =
|
|
493
|
-
}),
|
|
487
|
+
_.value === "x" ? En : $n
|
|
488
|
+
), { showTick: p } = An(a, f, d), y = v(
|
|
489
|
+
() => c.value || !a.value || _n(a.value)
|
|
490
|
+
), k = v(() => {
|
|
491
|
+
var E, w, P, te;
|
|
492
|
+
return _.value === "y" && y.value ? `translate(0, ${((E = o.value) == null ? void 0 : E.height) / 2})` : _.value === "x" && y.value ? `translate(-${((w = o.value) == null ? void 0 : w.width) / 2}, ${(P = o.value) == null ? void 0 : P.height})` : `translate(0, ${_.value === "x" ? (te = o.value) == null ? void 0 : te.height : 0})`;
|
|
493
|
+
}), T = v(() => {
|
|
494
494
|
if (!a.value) return [];
|
|
495
495
|
if (K(a.value))
|
|
496
496
|
return a.value.labels || a.value.domain();
|
|
497
497
|
const { tickCount: E } = d.value, [w, P] = a.value.domain();
|
|
498
|
-
return
|
|
499
|
-
}),
|
|
498
|
+
return tn(w, P, E);
|
|
499
|
+
}), N = v(() => {
|
|
500
500
|
const { tickFormat: E } = d.value;
|
|
501
|
-
return
|
|
502
|
-
}),
|
|
503
|
-
() => d.value.withHover && x.value &&
|
|
504
|
-
),
|
|
505
|
-
() => d.value.tickPadding +
|
|
506
|
-
),
|
|
501
|
+
return Te(E);
|
|
502
|
+
}), A = v(
|
|
503
|
+
() => d.value.withHover && x.value && l.value > -1
|
|
504
|
+
), D = v(
|
|
505
|
+
() => d.value.tickPadding + be || n
|
|
506
|
+
), C = v(() => _.value === "x" ? (
|
|
507
507
|
// If x axis, get the tick height
|
|
508
508
|
Math.max(
|
|
509
|
-
...(
|
|
509
|
+
...(f.value || []).map(
|
|
510
510
|
(E) => {
|
|
511
511
|
var w, P;
|
|
512
|
-
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).height) +
|
|
512
|
+
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).height) + D.value;
|
|
513
513
|
}
|
|
514
514
|
)
|
|
515
515
|
)
|
|
516
516
|
) : (
|
|
517
517
|
// If y axis, get the tick width
|
|
518
518
|
Math.max(
|
|
519
|
-
...(
|
|
519
|
+
...(f.value || []).map(
|
|
520
520
|
(E) => {
|
|
521
521
|
var w, P;
|
|
522
|
-
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).width) +
|
|
522
|
+
return ((P = (w = E.ref).getBBox) == null ? void 0 : P.call(w).width) + D.value;
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
525
|
)
|
|
526
526
|
));
|
|
527
|
-
function
|
|
527
|
+
function M(E) {
|
|
528
528
|
const { showTicks: w } = d.value;
|
|
529
|
-
return w === !1 ? "" :
|
|
529
|
+
return w === !1 ? "" : N.value(E);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function z(E, w, P) {
|
|
532
532
|
e("mouseenter", { index: x.value ? E : null, value: w, event: P });
|
|
533
533
|
}
|
|
534
534
|
function ee(E, w, P) {
|
|
535
535
|
e("click", { index: E, value: w, event: P });
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function ce(E) {
|
|
538
538
|
var w;
|
|
539
|
-
if (!(!
|
|
540
|
-
return (w =
|
|
539
|
+
if (!(!f.value || !f.value.length))
|
|
540
|
+
return (w = f.value[E]) == null ? void 0 : w.ref;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
542
|
+
function ae() {
|
|
543
|
+
h.value = T.value.map(
|
|
544
544
|
(E, w) => ({
|
|
545
|
-
value:
|
|
545
|
+
value: M(E),
|
|
546
546
|
group: s.getTickGroupAttributes(E, w),
|
|
547
|
-
ghost: s.getTickGhostAttributes(
|
|
547
|
+
ghost: s.getTickGhostAttributes(ce(w)),
|
|
548
548
|
label: s.getTickLabelAttributes(),
|
|
549
549
|
gridline: s.getGridLinesAttributes()
|
|
550
550
|
})
|
|
551
551
|
);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
553
|
+
function oe() {
|
|
554
|
+
h.value && h.value.map((E) => (E.gridline = s.getGridLinesAttributes(), E));
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function le() {
|
|
557
557
|
if (!a.value) return;
|
|
558
|
-
const E = a.value.step ? "bandScale" : "linearScale", w =
|
|
559
|
-
Object.entries(w(a,
|
|
560
|
-
([P,
|
|
561
|
-
s[P] =
|
|
558
|
+
const E = a.value.step ? "bandScale" : "linearScale", w = Pn[`${_.value}-${Fe[E]}`];
|
|
559
|
+
Object.entries(w(a, o, d) || []).forEach(
|
|
560
|
+
([P, te]) => {
|
|
561
|
+
s[P] = te;
|
|
562
562
|
}
|
|
563
563
|
);
|
|
564
564
|
}
|
|
565
|
-
return H(a,
|
|
565
|
+
return H(a, le, { flush: "sync", immediate: !0 }), H(a, ae, { immediate: !0 }), H(f, ae), H(C, (E) => e("lume__internal--axis-size", E)), H(r.containerSize, oe), re(() => Ne(m.value)), { __sfc: !0, SCALE_MIXIN_MAP: Fe, POSITIONS: Ge, TYPES: Le, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: s, tickRefs: f, root: m, ticksWithAttributes: h, computedPosition: g, computedType: _, shouldHover: x, allOptions: d, showTick: p, alignAxisBaseline: y, axisTransform: k, ticks: T, tickFormatter: N, isHovering: A, axisLabelOffset: D, axisSize: C, formatTick: M, handleTickMouseenter: z, handleTickClick: ee, getTextNode: ce, setTicks: ae, updateGridlines: oe, init: le, LumeTick: dn };
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
|
-
var
|
|
568
|
+
var Bn = function() {
|
|
569
569
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
570
570
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
|
|
571
571
|
return n.emit("mouseleave", a);
|
|
572
|
-
} } }, [n.computedType === "x" ? r("defs", [r("linearGradient", { attrs: { id: "lume-tick-gradient" } }, [r("stop", { attrs: { offset: "0%", "stop-color": "rgba(255,255,255,0)" } }), r("stop", { attrs: { offset: "10%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "90%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "100%", "stop-color": "rgba(255,255,255,0)" } })], 1)], 1) : e._e(), e._l(n.ticksWithAttributes, function(a,
|
|
573
|
-
return r(n.LumeTick, e._b({ key: `${a.value}_${
|
|
574
|
-
return n.handleTickMouseenter(
|
|
575
|
-
}, click: function(
|
|
576
|
-
return n.handleTickClick(
|
|
572
|
+
} } }, [n.computedType === "x" ? r("defs", [r("linearGradient", { attrs: { id: "lume-tick-gradient" } }, [r("stop", { attrs: { offset: "0%", "stop-color": "rgba(255,255,255,0)" } }), r("stop", { attrs: { offset: "10%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "90%", "stop-color": "var(--lume-chart-background-color)" } }), r("stop", { attrs: { offset: "100%", "stop-color": "rgba(255,255,255,0)" } })], 1)], 1) : e._e(), e._l(n.ticksWithAttributes, function(a, o) {
|
|
573
|
+
return r(n.LumeTick, e._b({ key: `${a.value}_${o}`, ref: "tickRefs", refInFor: !0, attrs: { "is-hidden": n.allOptions.skip && !n.showTick(o), "with-gridlines": n.allOptions.gridLines }, on: { mouseenter: function(l) {
|
|
574
|
+
return n.handleTickMouseenter(o, a.value, l);
|
|
575
|
+
}, click: function(l) {
|
|
576
|
+
return n.handleTickClick(o, a.value, l);
|
|
577
577
|
} } }, "lume-tick", a, !1));
|
|
578
578
|
}), n.isHovering ? r(n.LumeTick, e._b({ attrs: { "with-gridlines": !1, "is-hovered": "" }, on: { click: function(a) {
|
|
579
579
|
return n.handleTickClick(
|
|
@@ -582,34 +582,34 @@ var Hn = function() {
|
|
|
582
582
|
a
|
|
583
583
|
);
|
|
584
584
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
585
|
-
},
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
585
|
+
}, Cn = [], Fn = /* @__PURE__ */ S(
|
|
586
|
+
Rn,
|
|
587
|
+
Bn,
|
|
588
|
+
Cn,
|
|
589
589
|
!1,
|
|
590
590
|
null,
|
|
591
591
|
null
|
|
592
592
|
);
|
|
593
|
-
const
|
|
594
|
-
function
|
|
595
|
-
const a =
|
|
593
|
+
const Gn = Fn.exports;
|
|
594
|
+
function jn(t, e, r, n) {
|
|
595
|
+
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
596
596
|
() => n.value > 0 && n.value < 1
|
|
597
|
-
),
|
|
597
|
+
), l = v(
|
|
598
598
|
() => a.value ? t.value - 0.5 : t.value
|
|
599
599
|
// draws the 1px bar closer to the axis
|
|
600
|
-
), i =
|
|
601
|
-
() =>
|
|
600
|
+
), i = v(
|
|
601
|
+
() => o.value ? e.value - 0.5 : e.value
|
|
602
602
|
// draws the 1px bar closer to the axis
|
|
603
603
|
);
|
|
604
|
-
return { computedX:
|
|
604
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
const a = I(0),
|
|
608
|
-
return
|
|
609
|
-
a.value = r.value,
|
|
610
|
-
}), H(r, (i) => a.value = i), H(n, (i) =>
|
|
606
|
+
function Vn(t, e, r, n) {
|
|
607
|
+
const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
608
|
+
return re(() => {
|
|
609
|
+
a.value = r.value, o.value = n.value;
|
|
610
|
+
}), H(r, (i) => a.value = i), H(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const Mn = /* @__PURE__ */ R({
|
|
613
613
|
__name: "lume-bar",
|
|
614
614
|
props: {
|
|
615
615
|
x: {
|
|
@@ -647,13 +647,13 @@ const Gn = /* @__PURE__ */ R({
|
|
|
647
647
|
},
|
|
648
648
|
emits: ["click", "mouseover", "mouseleave"],
|
|
649
649
|
setup(t, { emit: e }) {
|
|
650
|
-
const r = t, { x: n, y: a, width:
|
|
651
|
-
() => typeof
|
|
652
|
-
),
|
|
653
|
-
return
|
|
650
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = V(r), c = I(null), s = v(
|
|
651
|
+
() => typeof u.value == "string" ? [u.value] : u.value
|
|
652
|
+
), f = v(() => i.value === "width"), m = v(() => i.value === "height"), h = Vn(n, a, o, l), { computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d } = jn(n, a, o, l), p = v(() => x.value ? 1 : (f.value ? h.computedWidth : o).value), y = v(() => d.value ? 1 : (m.value ? h.computedHeight : l).value), k = f.value || m.value ? h.transformOrigin : null;
|
|
653
|
+
return re(() => Ne(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: s, shouldTransitionWidth: f, shouldTransitionHeight: m, transitionProps: h, computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d, computedWidth: p, computedHeight: y, transformOrigin: k };
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
var
|
|
656
|
+
var zn = function() {
|
|
657
657
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
658
658
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
659
659
|
{
|
|
@@ -670,64 +670,64 @@ var Fn = function() {
|
|
|
670
670
|
}, mouseleave: function(a) {
|
|
671
671
|
return n.emit("mouseleave", a);
|
|
672
672
|
} } });
|
|
673
|
-
},
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
673
|
+
}, Wn = [], Un = /* @__PURE__ */ S(
|
|
674
|
+
Mn,
|
|
675
|
+
zn,
|
|
676
|
+
Wn,
|
|
677
677
|
!1,
|
|
678
678
|
null,
|
|
679
679
|
"8e8f732a"
|
|
680
680
|
);
|
|
681
|
-
const
|
|
682
|
-
var
|
|
683
|
-
const
|
|
684
|
-
function
|
|
685
|
-
return t ===
|
|
681
|
+
const Qe = Un.exports;
|
|
682
|
+
var ue = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(ue || {}), Y = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(Y || {}), Gt = /* @__PURE__ */ ((t) => (t.Skyblue10 = "skyblue-10", t.Skyblue20 = "skyblue-20", t.Skyblue30 = "skyblue-30", t.Skyblue40 = "skyblue-40", t.Skyblue50 = "skyblue-50", t.Skyblue60 = "skyblue-60", t.Skyblue70 = "skyblue-70", t.Skyblue80 = "skyblue-80", t.Skyblue90 = "skyblue-90", t.Skyblue100 = "skyblue-100", t.Royalblue10 = "royalblue-10", t.Royalblue20 = "royalblue-20", t.Royalblue30 = "royalblue-30", t.Royalblue40 = "royalblue-40", t.Royalblue50 = "royalblue-50", t.Royalblue60 = "royalblue-60", t.Royalblue70 = "royalblue-70", t.Royalblue80 = "royalblue-80", t.Royalblue90 = "royalblue-90", t.Royalblue100 = "royalblue-100", t.Violet10 = "violet-10", t.Violet20 = "violet-20", t.Violet30 = "violet-30", t.Violet40 = "violet-40", t.Violet50 = "violet-50", t.Violet60 = "violet-60", t.Violet70 = "violet-70", t.Violet80 = "violet-80", t.Violet90 = "violet-90", t.Violet100 = "violet-100", t.Darkteal10 = "darkteal-10", t.Darkteal20 = "darkteal-20", t.Darkteal30 = "darkteal-30", t.Darkteal40 = "darkteal-40", t.Darkteal50 = "darkteal-50", t.Darkteal60 = "darkteal-60", t.Darkteal70 = "darkteal-70", t.Darkteal80 = "darkteal-80", t.Darkteal90 = "darkteal-90", t.Darkteal100 = "darkteal-100", t.Gold10 = "gold-10", t.Gold20 = "gold-20", t.Gold30 = "gold-30", t.Gold40 = "gold-40", t.Gold50 = "gold-50", t.Gold60 = "gold-60", t.Gold70 = "gold-70", t.Gold80 = "gold-80", t.Gold90 = "gold-90", t.Gold100 = "gold-100", t))(Gt || {}), qe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(qe || {}), et = /* @__PURE__ */ ((t) => (t.White = "white", t.Black = "black", t.Green = "green", t.Orange = "orange", t.Red = "red", t.Grey = "grey", t.Grey10 = "grey-10", t.Grey20 = "grey-20", t.Grey30 = "grey-30", t.Grey40 = "grey-40", t.Grey50 = "grey-50", t.Grey60 = "grey-60", t.Grey70 = "grey-70", t.Grey80 = "grey-80", t.Grey90 = "grey-90", t.Grey100 = "grey-100", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t["01"] = "01", t["02"] = "02", t["03"] = "03", t["04"] = "04", t["05"] = "05", t["06"] = "06", t["07"] = "07", t["08"] = "08", t["09"] = "09", t))(tt || {});
|
|
683
|
+
const Zn = ue.Categorical, ke = Y.Skyblue, Xn = qe.SkyTeal;
|
|
684
|
+
function Yn(t) {
|
|
685
|
+
return t === ue.Divergent ? Xn : ke;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
return Object.values(
|
|
687
|
+
function Kn(t) {
|
|
688
|
+
return Object.values(tt).includes(t);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
return e ===
|
|
690
|
+
function ct(t, e) {
|
|
691
|
+
return e === ue.Divergent ? Object.values(qe).includes(t) : Object.values({
|
|
692
692
|
...Y,
|
|
693
|
-
...
|
|
694
|
-
...
|
|
695
|
-
...
|
|
693
|
+
...Gt,
|
|
694
|
+
...et,
|
|
695
|
+
...tt
|
|
696
696
|
}).includes(t);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Jn(t, e) {
|
|
699
699
|
const r = Object.values(Y).indexOf(t);
|
|
700
|
-
return
|
|
700
|
+
return kn(Object.values(Y), r > -1 ? r : 0)[e];
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function Qn(t, e) {
|
|
703
703
|
const r = 50 + e * 10;
|
|
704
704
|
return `${t}-${r}`;
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function qn(t, e) {
|
|
707
707
|
const r = (e + 1) * 10;
|
|
708
708
|
return `${t}-${r}`;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function dt(t, e, r) {
|
|
711
711
|
switch (e) {
|
|
712
712
|
default:
|
|
713
|
-
case
|
|
714
|
-
return
|
|
715
|
-
case
|
|
716
|
-
return
|
|
717
|
-
case
|
|
718
|
-
return
|
|
713
|
+
case ue.Categorical:
|
|
714
|
+
return Kn(t) ? t : Jn(t, r);
|
|
715
|
+
case ue.Sequential:
|
|
716
|
+
return Qn(t, r);
|
|
717
|
+
case ue.Divergent:
|
|
718
|
+
return qn(t, r);
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
721
|
+
function er(t, e, r = Zn, n) {
|
|
722
|
+
return ct(t, r) ? t : (n > 4 && (ne(J.ColorLoop), n = n % 5), ct(e, r) ? dt(e, r, n) : dt(Yn(r), r, n));
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return t.map((e) =>
|
|
724
|
+
function tr(t) {
|
|
725
|
+
return t.map((e) => pn(e) ? e : { value: e });
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function nr(t) {
|
|
728
728
|
return t.__internal === !0;
|
|
729
729
|
}
|
|
730
|
-
const
|
|
730
|
+
const nt = (t = null) => ({
|
|
731
731
|
data: {
|
|
732
732
|
type: Array,
|
|
733
733
|
required: !0,
|
|
@@ -746,43 +746,43 @@ const qe = (t = null) => ({
|
|
|
746
746
|
default: null
|
|
747
747
|
}
|
|
748
748
|
});
|
|
749
|
-
function
|
|
750
|
-
const
|
|
749
|
+
function rt(t, e, r, n, a) {
|
|
750
|
+
const o = Ie({
|
|
751
751
|
width: 0,
|
|
752
752
|
height: 0
|
|
753
|
-
}),
|
|
753
|
+
}), l = crypto.randomUUID(), i = v(() => {
|
|
754
754
|
var s;
|
|
755
|
-
return t.value.length > 5 &&
|
|
756
|
-
(
|
|
757
|
-
if (
|
|
758
|
-
const
|
|
759
|
-
|
|
755
|
+
return t.value.length > 5 && ne(J.DatasetLength), (s = t.value) == null ? void 0 : s.map(
|
|
756
|
+
(f, m) => {
|
|
757
|
+
if (nr(f)) return f;
|
|
758
|
+
const h = tr(f.values), g = er(
|
|
759
|
+
f.color,
|
|
760
760
|
r == null ? void 0 : r.value,
|
|
761
761
|
n == null ? void 0 : n.value.colorPalette,
|
|
762
762
|
m
|
|
763
763
|
);
|
|
764
764
|
return {
|
|
765
|
-
...
|
|
766
|
-
values:
|
|
767
|
-
color:
|
|
765
|
+
...f,
|
|
766
|
+
values: h,
|
|
767
|
+
color: g,
|
|
768
768
|
__internal: !0
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
}),
|
|
772
|
+
}), u = v(() => Array.isArray(e.value) ? e.value : St(t.value).map((s, f) => f));
|
|
773
773
|
function c(s) {
|
|
774
|
-
const
|
|
775
|
-
|
|
774
|
+
const f = (a == null ? void 0 : a.value) === O.HORIZONTAL && u.value.length * (((n == null ? void 0 : n.value.barHeight) || st) * 2) + ((n == null ? void 0 : n.value.barHeight) || st) || s.height;
|
|
775
|
+
o.width = s.width, o.height = f;
|
|
776
776
|
}
|
|
777
777
|
return {
|
|
778
|
-
chartID:
|
|
779
|
-
computedLabels:
|
|
780
|
-
containerSize:
|
|
778
|
+
chartID: l,
|
|
779
|
+
computedLabels: u,
|
|
780
|
+
containerSize: o,
|
|
781
781
|
internalData: i,
|
|
782
782
|
updateSize: c
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
const
|
|
785
|
+
const rr = () => ({
|
|
786
786
|
xScale: {
|
|
787
787
|
type: Function,
|
|
788
788
|
default: null
|
|
@@ -792,73 +792,73 @@ const qn = () => ({
|
|
|
792
792
|
default: null
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
|
-
function
|
|
796
|
-
const
|
|
795
|
+
function ar(t, e, r, n, a) {
|
|
796
|
+
const o = I(null), l = I(null);
|
|
797
797
|
function i() {
|
|
798
|
-
var s,
|
|
799
|
-
const { width:
|
|
800
|
-
!
|
|
798
|
+
var s, f, m, h;
|
|
799
|
+
const { width: u, height: c } = r;
|
|
800
|
+
!u && !c || (n.value === O.HORIZONTAL ? (o.value = (s = t.value) != null && s.length ? ft(
|
|
801
801
|
t.value,
|
|
802
|
-
|
|
802
|
+
u,
|
|
803
803
|
n.value,
|
|
804
804
|
a.value.startOnZero
|
|
805
|
-
) : null,
|
|
805
|
+
) : null, l.value = (f = e.value) != null && f.length ? vt(
|
|
806
806
|
e.value,
|
|
807
807
|
c,
|
|
808
808
|
n.value,
|
|
809
809
|
a.value
|
|
810
|
-
) : null) : (
|
|
810
|
+
) : null) : (o.value = (m = e.value) != null && m.length ? vt(
|
|
811
811
|
e.value,
|
|
812
|
-
|
|
812
|
+
u,
|
|
813
813
|
n.value,
|
|
814
814
|
a.value
|
|
815
|
-
) : null,
|
|
815
|
+
) : null, l.value = (h = t.value) != null && h.length ? ft(
|
|
816
816
|
t.value,
|
|
817
817
|
c,
|
|
818
818
|
n.value,
|
|
819
819
|
a.value.startOnZero
|
|
820
820
|
) : null));
|
|
821
821
|
}
|
|
822
|
-
return
|
|
822
|
+
return Et(i), { xScale: o, yScale: l };
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
const a = [0, e], { padding:
|
|
824
|
+
function vt(t, e, r, n) {
|
|
825
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: i } = n, u = o ?? (r === O.HORIZONTAL ? Bt : Rt);
|
|
826
826
|
return Object.assign(
|
|
827
|
-
|
|
827
|
+
he().range(a).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, s) => s)),
|
|
828
828
|
{ labels: t }
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
const a =
|
|
831
|
+
function ft(t, e, r, n) {
|
|
832
|
+
const a = Dt(t).filter((s) => s != null), o = [0, e];
|
|
833
833
|
if (a.length === 0)
|
|
834
|
-
return ge().range(
|
|
835
|
-
const
|
|
836
|
-
let
|
|
837
|
-
n &&
|
|
838
|
-
const c = r === O.HORIZONTAL ? [i,
|
|
839
|
-
return ge().range(
|
|
840
|
-
}
|
|
841
|
-
function
|
|
834
|
+
return ge().range(o).domain([0, 0]).nice();
|
|
835
|
+
const l = Math.min(...a), i = n && l > 0 ? 0 : l;
|
|
836
|
+
let u = Math.max(...a);
|
|
837
|
+
n && u < 0 && (u = 0);
|
|
838
|
+
const c = r === O.HORIZONTAL ? [i, u] : [u, i];
|
|
839
|
+
return ge().range(o).domain(c).nice();
|
|
840
|
+
}
|
|
841
|
+
function pt(t) {
|
|
842
842
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function je(t, e) {
|
|
845
845
|
return K(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function mt(t, e, {
|
|
848
848
|
padding: r,
|
|
849
849
|
paddingInner: n,
|
|
850
850
|
paddingOuter: a
|
|
851
851
|
} = {}) {
|
|
852
|
-
const
|
|
853
|
-
return t.copy().paddingInner(n ??
|
|
852
|
+
const o = r ?? (e === O.HORIZONTAL ? Bt : Rt);
|
|
853
|
+
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function at(t) {
|
|
856
856
|
return Object.values(O).includes(t);
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
...
|
|
860
|
-
...
|
|
861
|
-
...
|
|
858
|
+
const ve = (t, e = !0) => ({
|
|
859
|
+
...nt(t),
|
|
860
|
+
...rr(),
|
|
861
|
+
...ye(),
|
|
862
862
|
classList: {
|
|
863
863
|
type: [String, Array],
|
|
864
864
|
default: () => []
|
|
@@ -871,32 +871,32 @@ const me = (t, e = !0) => ({
|
|
|
871
871
|
orientation: {
|
|
872
872
|
type: String,
|
|
873
873
|
default: O.VERTICAL,
|
|
874
|
-
validator:
|
|
874
|
+
validator: at
|
|
875
875
|
}
|
|
876
876
|
} : {}
|
|
877
|
-
}),
|
|
878
|
-
...
|
|
879
|
-
...
|
|
877
|
+
}), or = (t) => ({
|
|
878
|
+
...nt(t),
|
|
879
|
+
...ye(),
|
|
880
880
|
hoveredElement: {
|
|
881
881
|
type: [Number, String],
|
|
882
882
|
default: null
|
|
883
883
|
}
|
|
884
884
|
});
|
|
885
|
-
function
|
|
886
|
-
const t = I(), e =
|
|
885
|
+
function lr() {
|
|
886
|
+
const t = I(), e = Ie({
|
|
887
887
|
dimensions: {}
|
|
888
888
|
}), r = new ResizeObserver((n) => {
|
|
889
889
|
n.forEach((a) => {
|
|
890
890
|
e.dimensions = a.contentRect;
|
|
891
891
|
});
|
|
892
892
|
});
|
|
893
|
-
return
|
|
893
|
+
return re(() => {
|
|
894
894
|
r.observe(t.value);
|
|
895
|
-
}),
|
|
895
|
+
}), $t(() => {
|
|
896
896
|
r.unobserve(t.value);
|
|
897
897
|
}), { resizeState: e, resizeRef: t };
|
|
898
898
|
}
|
|
899
|
-
const
|
|
899
|
+
const ur = /* @__PURE__ */ R({
|
|
900
900
|
__name: "lume-chart-container",
|
|
901
901
|
props: {
|
|
902
902
|
margins: {
|
|
@@ -918,30 +918,30 @@ const rr = /* @__PURE__ */ R({
|
|
|
918
918
|
orientation: {
|
|
919
919
|
type: String,
|
|
920
920
|
default: O.VERTICAL,
|
|
921
|
-
validator:
|
|
921
|
+
validator: at
|
|
922
922
|
}
|
|
923
923
|
},
|
|
924
924
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
925
925
|
setup(t, { emit: e }) {
|
|
926
|
-
const r = t, { margins: n, containerSize: a } =
|
|
926
|
+
const r = t, { margins: n, containerSize: a } = V(r), o = I(null), { resizeRef: l, resizeState: i } = lr(), u = v(
|
|
927
927
|
() => a.value.height + n.value.top + n.value.bottom
|
|
928
928
|
);
|
|
929
|
-
return
|
|
930
|
-
if (!
|
|
931
|
-
const { width: c } = i.dimensions, { height: s } =
|
|
929
|
+
return Et(() => {
|
|
930
|
+
if (!o.value) return;
|
|
931
|
+
const { width: c } = i.dimensions, { height: s } = o.value.getBoundingClientRect();
|
|
932
932
|
if (!c || r.orientation === O.VERTICAL && !s)
|
|
933
933
|
return;
|
|
934
|
-
const
|
|
935
|
-
width:
|
|
934
|
+
const f = c - n.value.left - n.value.right, m = s - n.value.top - n.value.bottom, h = {
|
|
935
|
+
width: f > 0 ? f : 0,
|
|
936
936
|
height: m > 0 ? m : 0,
|
|
937
937
|
outerWidth: c,
|
|
938
938
|
outerHeight: s
|
|
939
939
|
};
|
|
940
|
-
e("resize",
|
|
941
|
-
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root:
|
|
940
|
+
e("resize", h);
|
|
941
|
+
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
942
942
|
}
|
|
943
943
|
});
|
|
944
|
-
var
|
|
944
|
+
var ir = function() {
|
|
945
945
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
946
946
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
947
947
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -954,20 +954,20 @@ var ar = function() {
|
|
|
954
954
|
}, mouseleave: function(a) {
|
|
955
955
|
return n.emit("mouseleave", a);
|
|
956
956
|
} } }, [r("g", { staticClass: "lume-chart-container__group", attrs: { transform: `translate(${n.margins.left}, ${n.margins.top})`, "data-j-chart-container__group": "" } }, [e._t("default")], 2)]), e._t("footer"), e._t("extra")], 2);
|
|
957
|
-
},
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
957
|
+
}, sr = [], cr = /* @__PURE__ */ S(
|
|
958
|
+
ur,
|
|
959
|
+
ir,
|
|
960
|
+
sr,
|
|
961
961
|
!1,
|
|
962
962
|
null,
|
|
963
963
|
"d53cdc3e"
|
|
964
964
|
);
|
|
965
|
-
const
|
|
965
|
+
const dr = cr.exports, vr = /* @__PURE__ */ R({
|
|
966
966
|
__name: "lume-chart-legend",
|
|
967
967
|
props: {
|
|
968
968
|
data: {
|
|
969
969
|
type: Array,
|
|
970
|
-
validator:
|
|
970
|
+
validator: fn,
|
|
971
971
|
required: !0
|
|
972
972
|
}
|
|
973
973
|
},
|
|
@@ -976,50 +976,50 @@ const lr = ur.exports, ir = /* @__PURE__ */ R({
|
|
|
976
976
|
return { __sfc: !0, emit: e };
|
|
977
977
|
}
|
|
978
978
|
});
|
|
979
|
-
var
|
|
979
|
+
var fr = function() {
|
|
980
980
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
981
981
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
982
982
|
return n.emit("mouseleave");
|
|
983
|
-
} } }, e._l(e.data, function(a,
|
|
984
|
-
return r("div", { key: `legend-item-${
|
|
985
|
-
return n.emit("click", { index:
|
|
986
|
-
}, mouseenter: function(
|
|
987
|
-
return n.emit("mouseenter", { index:
|
|
988
|
-
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label ||
|
|
983
|
+
} } }, e._l(e.data, function(a, o) {
|
|
984
|
+
return r("div", { key: `legend-item-${o}`, staticClass: "lume-chart-legend__item lume-typography--caption", attrs: { tabindex: "0", "data-j-chart-legend__symbol-wrapper": "" }, on: { click: function(l) {
|
|
985
|
+
return n.emit("click", { index: o, dataset: a, event: l });
|
|
986
|
+
}, mouseenter: function(l) {
|
|
987
|
+
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
988
|
+
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
989
989
|
}), 0);
|
|
990
|
-
},
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
990
|
+
}, pr = [], mr = /* @__PURE__ */ S(
|
|
991
|
+
vr,
|
|
992
|
+
fr,
|
|
993
|
+
pr,
|
|
994
994
|
!1,
|
|
995
995
|
null,
|
|
996
996
|
"6f1d1c44"
|
|
997
997
|
);
|
|
998
|
-
const
|
|
999
|
-
var
|
|
998
|
+
const _r = mr.exports, gr = {};
|
|
999
|
+
var hr = function() {
|
|
1000
1000
|
var e = this, r = e._self._c;
|
|
1001
1001
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1002
|
+
}, yr = [], br = /* @__PURE__ */ S(
|
|
1003
|
+
gr,
|
|
1004
|
+
hr,
|
|
1005
|
+
yr,
|
|
1006
1006
|
!1,
|
|
1007
1007
|
null,
|
|
1008
1008
|
"8af3fac6"
|
|
1009
1009
|
);
|
|
1010
|
-
const
|
|
1011
|
-
var
|
|
1010
|
+
const kr = br.exports, xr = {};
|
|
1011
|
+
var Lr = function() {
|
|
1012
1012
|
var e = this, r = e._self._c;
|
|
1013
1013
|
return r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__summary-item": "" } }, [r("span", [e._t("default")], 2), r("strong", { staticClass: "lume-tooltip__value" }, [e._t("value")], 2)]);
|
|
1014
|
-
},
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1014
|
+
}, Tr = [], Ar = /* @__PURE__ */ S(
|
|
1015
|
+
xr,
|
|
1016
|
+
Lr,
|
|
1017
|
+
Tr,
|
|
1018
1018
|
!1,
|
|
1019
1019
|
null,
|
|
1020
1020
|
"4ed7ec1b"
|
|
1021
1021
|
);
|
|
1022
|
-
const
|
|
1022
|
+
const Or = Ar.exports, Ir = /* @__PURE__ */ R({
|
|
1023
1023
|
__name: "lume-tooltip-item",
|
|
1024
1024
|
props: {
|
|
1025
1025
|
color: {
|
|
@@ -1031,18 +1031,18 @@ const xr = kr.exports, Ar = /* @__PURE__ */ R({
|
|
|
1031
1031
|
return { __sfc: !0 };
|
|
1032
1032
|
}
|
|
1033
1033
|
});
|
|
1034
|
-
var
|
|
1034
|
+
var Nr = function() {
|
|
1035
1035
|
var e = this, r = e._self._c;
|
|
1036
1036
|
return e._self._setupProxy, r("li", { staticClass: "lume-tooltip__item", attrs: { "data-j-tooltip__item": "" } }, [e.color ? r("span", { staticClass: "lume-tooltip__symbol", class: [`lume-background-color--${e.color}`], attrs: { "data-j-tooltip__item__symbol": "" } }) : e._e(), r("span", { attrs: { "data-j-tooltip__item__label": "" } }, [e._t("label")], 2), r("strong", { staticClass: "lume-tooltip__value", attrs: { "data-j-tooltip__item__value": "" } }, [e._t("value")], 2)]);
|
|
1037
|
-
},
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1037
|
+
}, Er = [], $r = /* @__PURE__ */ S(
|
|
1038
|
+
Ir,
|
|
1039
|
+
Nr,
|
|
1040
|
+
Er,
|
|
1041
1041
|
!1,
|
|
1042
1042
|
null,
|
|
1043
1043
|
"4f995c3c"
|
|
1044
1044
|
);
|
|
1045
|
-
const
|
|
1045
|
+
const wr = $r.exports, Dr = /* @__PURE__ */ R({
|
|
1046
1046
|
__name: "lume-tooltip",
|
|
1047
1047
|
props: {
|
|
1048
1048
|
opened: {
|
|
@@ -1060,7 +1060,7 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1060
1060
|
position: {
|
|
1061
1061
|
type: String,
|
|
1062
1062
|
default: "auto",
|
|
1063
|
-
validator: (t) =>
|
|
1063
|
+
validator: (t) => Nn.includes(t)
|
|
1064
1064
|
},
|
|
1065
1065
|
fixedPositioning: {
|
|
1066
1066
|
type: Boolean,
|
|
@@ -1082,15 +1082,15 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1082
1082
|
type: String,
|
|
1083
1083
|
default: null
|
|
1084
1084
|
},
|
|
1085
|
-
...
|
|
1085
|
+
...ye()
|
|
1086
1086
|
},
|
|
1087
1087
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1088
1088
|
setup(t, { emit: e }) {
|
|
1089
|
-
const r = t, n = I(null), { items: a, options:
|
|
1090
|
-
() =>
|
|
1091
|
-
), s =
|
|
1089
|
+
const r = t, n = I(null), { items: a, options: o } = V(r), l = X(), i = I(null), { allOptions: u } = Q(o), c = v(
|
|
1090
|
+
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
1091
|
+
), s = v(
|
|
1092
1092
|
() => c.value ? "fixed" : "absolute"
|
|
1093
|
-
),
|
|
1093
|
+
), f = v(() => [
|
|
1094
1094
|
{
|
|
1095
1095
|
name: "computeStyles",
|
|
1096
1096
|
options: {
|
|
@@ -1100,43 +1100,43 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1100
1100
|
},
|
|
1101
1101
|
{
|
|
1102
1102
|
name: "offset",
|
|
1103
|
-
options: { offset: [0,
|
|
1103
|
+
options: { offset: [0, u.value.offset || 8] }
|
|
1104
1104
|
},
|
|
1105
1105
|
...r.modifiers || []
|
|
1106
|
-
]), m =
|
|
1107
|
-
() =>
|
|
1108
|
-
),
|
|
1106
|
+
]), m = v(
|
|
1107
|
+
() => u.value.showTitle !== !1 && r.title != null
|
|
1108
|
+
), h = v(() => Te(u.value.valueFormat)), g = v(() => Te(u.value.titleFormat)), _ = v(
|
|
1109
1109
|
() => {
|
|
1110
|
-
var
|
|
1111
|
-
return ((
|
|
1112
|
-
label:
|
|
1110
|
+
var T;
|
|
1111
|
+
return ((T = a.value) == null ? void 0 : T.find((N) => N.isSummary)) || {
|
|
1112
|
+
label: u.value.summary ?? r.summary
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
), x =
|
|
1115
|
+
), x = v(() => l.summary || _.value.label), d = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
|
|
1116
1116
|
function p() {
|
|
1117
|
-
r.targetElement && n.value && (i.value =
|
|
1117
|
+
r.targetElement && n.value && (i.value = on(r.targetElement, n.value, {
|
|
1118
1118
|
placement: r.position,
|
|
1119
1119
|
strategy: s.value,
|
|
1120
|
-
modifiers:
|
|
1120
|
+
modifiers: f.value
|
|
1121
1121
|
}), e("opened", r.targetElement));
|
|
1122
1122
|
}
|
|
1123
1123
|
function y() {
|
|
1124
1124
|
i.value && (i.value.destroy(), e("closed"), n.value && n.value.classList.remove("lume-tooltip--animated"));
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1127
|
-
i.value && (
|
|
1126
|
+
function k() {
|
|
1127
|
+
i.value && (u.value.withAnimation !== !1 && n.value && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? (function() {
|
|
1128
1128
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
1129
1129
|
})() : y());
|
|
1130
1130
|
}
|
|
1131
1131
|
return H(
|
|
1132
1132
|
() => r.targetElement,
|
|
1133
|
-
async (
|
|
1134
|
-
|
|
1133
|
+
async (T, N) => {
|
|
1134
|
+
!N && T ? (await Be(), p()) : k();
|
|
1135
1135
|
}
|
|
1136
|
-
),
|
|
1136
|
+
), re(p), $t(y), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: s, allModifiers: f, showTitle: m, formatValue: h, formatTitle: g, summaryItem: _, hasSummary: x, computedItems: d, initPopper: p, destroyPopper: y, updatePopper: k, LumeTooltipTitle: kr, LumeTooltipSummary: Or, LumeTooltipItem: wr };
|
|
1137
1137
|
}
|
|
1138
1138
|
});
|
|
1139
|
-
var
|
|
1139
|
+
var Hr = function() {
|
|
1140
1140
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1141
1141
|
return e.opened && e.targetElement ? r("div", { ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
1142
1142
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
@@ -1161,15 +1161,15 @@ var $r = function() {
|
|
|
1161
1161
|
});
|
|
1162
1162
|
})], 2)];
|
|
1163
1163
|
})], 2) : e._e();
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1164
|
+
}, Sr = [], Pr = /* @__PURE__ */ S(
|
|
1165
|
+
Dr,
|
|
1166
|
+
Hr,
|
|
1167
|
+
Sr,
|
|
1168
1168
|
!1,
|
|
1169
1169
|
null,
|
|
1170
1170
|
"6f13599d"
|
|
1171
1171
|
);
|
|
1172
|
-
const
|
|
1172
|
+
const Rr = Pr.exports, Ee = () => ({
|
|
1173
1173
|
data: {
|
|
1174
1174
|
type: Array,
|
|
1175
1175
|
required: !0
|
|
@@ -1185,7 +1185,7 @@ const Dr = wr.exports, we = () => ({
|
|
|
1185
1185
|
orientation: {
|
|
1186
1186
|
type: String,
|
|
1187
1187
|
default: O.VERTICAL,
|
|
1188
|
-
validator:
|
|
1188
|
+
validator: at
|
|
1189
1189
|
},
|
|
1190
1190
|
xScale: {
|
|
1191
1191
|
type: Function,
|
|
@@ -1211,10 +1211,10 @@ const Dr = wr.exports, we = () => ({
|
|
|
1211
1211
|
type: [String, Array],
|
|
1212
1212
|
default: () => []
|
|
1213
1213
|
}
|
|
1214
|
-
}),
|
|
1214
|
+
}), Br = /* @__PURE__ */ R({
|
|
1215
1215
|
__name: "lume-overlay-group",
|
|
1216
1216
|
props: {
|
|
1217
|
-
...
|
|
1217
|
+
...Ee(),
|
|
1218
1218
|
orientation: {
|
|
1219
1219
|
type: String,
|
|
1220
1220
|
default: O.VERTICAL
|
|
@@ -1222,41 +1222,41 @@ const Dr = wr.exports, we = () => ({
|
|
|
1222
1222
|
},
|
|
1223
1223
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1224
1224
|
setup(t, { emit: e }) {
|
|
1225
|
-
const r = t, { data: n, orientation: a, xScale:
|
|
1226
|
-
function
|
|
1225
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = V(r), i = v(() => St(n));
|
|
1226
|
+
function u(c) {
|
|
1227
1227
|
var x;
|
|
1228
|
-
const s = a.value === O.HORIZONTAL ?
|
|
1228
|
+
const s = a.value === O.HORIZONTAL ? l.value : o.value, f = s.domain(), m = mn(s), h = ((x = s.paddingInner) == null ? void 0 : x.call(s)) ?? 0, g = m * h, _ = K(s) ? s(f[c]) - g / 2 : s(c) - m / 2;
|
|
1229
1229
|
return a.value === O.HORIZONTAL ? {
|
|
1230
|
-
width: Math.max(...
|
|
1230
|
+
width: Math.max(...o.value.range()),
|
|
1231
1231
|
height: m,
|
|
1232
1232
|
transform: `translate(0, ${_})`
|
|
1233
1233
|
} : {
|
|
1234
1234
|
width: m,
|
|
1235
|
-
height: Math.max(...
|
|
1235
|
+
height: Math.max(...l.value.range()),
|
|
1236
1236
|
transform: `translate(${_}, 0)`
|
|
1237
1237
|
};
|
|
1238
1238
|
}
|
|
1239
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale:
|
|
1239
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Qe };
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
1242
|
-
var
|
|
1242
|
+
var Cr = function() {
|
|
1243
1243
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1244
|
-
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a,
|
|
1245
|
-
return r(n.LumeBar, e._b({ key: `overlay-${
|
|
1246
|
-
return n.emit("lume__internal--hover",
|
|
1247
|
-
}, click: function(
|
|
1248
|
-
return n.emit("click", { index:
|
|
1249
|
-
} } }, "lume-bar", n.getOverlayBarAttributes(
|
|
1244
|
+
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1245
|
+
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
1246
|
+
return n.emit("lume__internal--hover", o);
|
|
1247
|
+
}, click: function(l) {
|
|
1248
|
+
return n.emit("click", { index: o, event: l });
|
|
1249
|
+
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1250
1250
|
}), 1);
|
|
1251
|
-
},
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1251
|
+
}, Fr = [], Gr = /* @__PURE__ */ S(
|
|
1252
|
+
Br,
|
|
1253
|
+
Cr,
|
|
1254
|
+
Fr,
|
|
1255
1255
|
!1,
|
|
1256
1256
|
null,
|
|
1257
1257
|
null
|
|
1258
1258
|
);
|
|
1259
|
-
const
|
|
1259
|
+
const jr = Gr.exports, Vr = [
|
|
1260
1260
|
"axis-click",
|
|
1261
1261
|
"axis-mouseenter",
|
|
1262
1262
|
"axis-mouseleave",
|
|
@@ -1285,95 +1285,95 @@ const Cr = Sr.exports, Br = [
|
|
|
1285
1285
|
"hovered-index-changed",
|
|
1286
1286
|
"update:hoveredIndex"
|
|
1287
1287
|
], q = (t, e) => {
|
|
1288
|
-
function r(
|
|
1288
|
+
function r(o, ...l) {
|
|
1289
1289
|
document.dispatchEvent(
|
|
1290
|
-
new CustomEvent(`${e}_${
|
|
1291
|
-
detail: [...
|
|
1290
|
+
new CustomEvent(`${e}_${o}`, {
|
|
1291
|
+
detail: [...l]
|
|
1292
1292
|
})
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
|
-
function n(
|
|
1295
|
+
function n(o, l) {
|
|
1296
1296
|
document.addEventListener(
|
|
1297
|
-
`${e}_${
|
|
1298
|
-
(i) =>
|
|
1297
|
+
`${e}_${o}`,
|
|
1298
|
+
(i) => l(...i.detail)
|
|
1299
1299
|
);
|
|
1300
1300
|
}
|
|
1301
|
-
return { componentEventPropagator:
|
|
1301
|
+
return { componentEventPropagator: Vr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1302
1302
|
};
|
|
1303
|
-
function
|
|
1304
|
-
return { hasNegativeValues:
|
|
1305
|
-
() =>
|
|
1303
|
+
function Mr(t) {
|
|
1304
|
+
return { hasNegativeValues: v(
|
|
1305
|
+
() => Dt(t.value).some((r) => r < 0)
|
|
1306
1306
|
) };
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
const a =
|
|
1308
|
+
function zr(t, e, r, n) {
|
|
1309
|
+
const a = v(
|
|
1310
1310
|
() => n.value === O.HORIZONTAL
|
|
1311
|
-
),
|
|
1311
|
+
), o = v(
|
|
1312
1312
|
() => {
|
|
1313
1313
|
var c;
|
|
1314
1314
|
return t.height - (a != null && a.value ? 0 : ((c = r.value) == null ? void 0 : c.call(r, 0)) || 0);
|
|
1315
1315
|
}
|
|
1316
|
-
),
|
|
1316
|
+
), l = v(
|
|
1317
1317
|
() => {
|
|
1318
1318
|
var c;
|
|
1319
1319
|
return a != null && a.value ? ((c = e.value) == null ? void 0 : c.call(e, 0)) || 0 : t.width;
|
|
1320
1320
|
}
|
|
1321
|
-
), i =
|
|
1321
|
+
), i = v(
|
|
1322
1322
|
() => {
|
|
1323
1323
|
var c;
|
|
1324
1324
|
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c = r.value) == null ? void 0 : c.call(r, 0)) || 0})`;
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
1327
|
-
return { negativeBarAttributes:
|
|
1328
|
-
width:
|
|
1329
|
-
height:
|
|
1327
|
+
return { negativeBarAttributes: v(() => ({
|
|
1328
|
+
width: l.value,
|
|
1329
|
+
height: o.value,
|
|
1330
1330
|
transform: i.value
|
|
1331
1331
|
})) };
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return t.reduce((r, n) =>
|
|
1335
|
-
(a,
|
|
1333
|
+
function Wr(t, e) {
|
|
1334
|
+
return t.reduce((r, n) => Je(n.values, e).map(
|
|
1335
|
+
(a, o) => r[o] ? a.value > r[o] ? a.value : r[o] : a.value ?? 0
|
|
1336
1336
|
), []);
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return t.reduce((r, n) =>
|
|
1340
|
-
(a,
|
|
1341
|
-
const
|
|
1342
|
-
return r[
|
|
1338
|
+
function Ur(t, e) {
|
|
1339
|
+
return t.reduce((r, n) => Je(n.values, e).map(
|
|
1340
|
+
(a, o) => {
|
|
1341
|
+
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1342
|
+
return r[o] ? r[o] + l : l;
|
|
1343
1343
|
}
|
|
1344
1344
|
), []);
|
|
1345
1345
|
}
|
|
1346
|
-
const
|
|
1347
|
-
"stacked-bar":
|
|
1346
|
+
const _t = {
|
|
1347
|
+
"stacked-bar": Ur
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1350
|
-
const
|
|
1349
|
+
function jt(t, e, r, n, a, o, l, i) {
|
|
1350
|
+
const u = v(
|
|
1351
1351
|
() => {
|
|
1352
1352
|
var s;
|
|
1353
1353
|
return e.value.withTooltip !== !1 && !((s = e.value.tooltipOptions) != null && s.targetElement);
|
|
1354
1354
|
}
|
|
1355
1355
|
);
|
|
1356
1356
|
function c(s) {
|
|
1357
|
-
var
|
|
1358
|
-
const
|
|
1357
|
+
var h;
|
|
1358
|
+
const f = ((h = a == null ? void 0 : a.value) == null ? void 0 : h.length) ?? 0, m = i != null && i.value && _t[i.value] ? _t[i.value](
|
|
1359
1359
|
s,
|
|
1360
|
-
|
|
1361
|
-
) :
|
|
1362
|
-
t.value = m.map((
|
|
1363
|
-
cx: (
|
|
1364
|
-
cy: (
|
|
1360
|
+
f
|
|
1361
|
+
) : Wr(s, f);
|
|
1362
|
+
t.value = m.map((g, _) => ({
|
|
1363
|
+
cx: (o == null ? void 0 : o.value) === O.HORIZONTAL ? r.value(g) : je(r.value, _),
|
|
1364
|
+
cy: (o == null ? void 0 : o.value) === O.HORIZONTAL ? je(n.value, _) : n.value(g)
|
|
1365
1365
|
}));
|
|
1366
1366
|
}
|
|
1367
1367
|
return H(
|
|
1368
1368
|
[r, n],
|
|
1369
1369
|
() => {
|
|
1370
|
-
r.value && n.value && (
|
|
1370
|
+
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
1371
1371
|
},
|
|
1372
1372
|
{ immediate: !0 }
|
|
1373
|
-
), { shouldGenerateTooltipAnchors:
|
|
1373
|
+
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
const t =
|
|
1375
|
+
function Zr() {
|
|
1376
|
+
const t = Ie({
|
|
1377
1377
|
opened: !1,
|
|
1378
1378
|
targetElement: null
|
|
1379
1379
|
});
|
|
@@ -1383,174 +1383,174 @@ function Mr() {
|
|
|
1383
1383
|
t.opened = !1, t.targetElement = null;
|
|
1384
1384
|
} };
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1387
|
-
return { getTooltipItems:
|
|
1388
|
-
() => (r) => t.value.map(({ color: n, label: a, values:
|
|
1389
|
-
var
|
|
1386
|
+
function Xr(t) {
|
|
1387
|
+
return { getTooltipItems: v(
|
|
1388
|
+
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1389
|
+
var l, i, u;
|
|
1390
1390
|
return {
|
|
1391
|
-
color: ((
|
|
1391
|
+
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1392
1392
|
label: a,
|
|
1393
|
-
value: ((i =
|
|
1393
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? Pt
|
|
1394
1394
|
};
|
|
1395
1395
|
})
|
|
1396
1396
|
) };
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1398
|
+
const Ve = 16, Me = 8, ze = 28, We = 24, ie = {
|
|
1399
1399
|
VERTICAL: {
|
|
1400
|
-
top:
|
|
1401
|
-
right:
|
|
1402
|
-
bottom:
|
|
1403
|
-
left:
|
|
1400
|
+
top: Ve,
|
|
1401
|
+
right: Me,
|
|
1402
|
+
bottom: ze,
|
|
1403
|
+
left: We
|
|
1404
1404
|
},
|
|
1405
1405
|
HORIZONTAL: {
|
|
1406
|
-
top:
|
|
1407
|
-
right:
|
|
1408
|
-
bottom:
|
|
1409
|
-
left:
|
|
1406
|
+
top: Ve,
|
|
1407
|
+
right: Me,
|
|
1408
|
+
bottom: ze,
|
|
1409
|
+
left: We
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
|
-
function
|
|
1413
|
-
return !t || t === "auto" || t.top == null || t.top === "auto" ?
|
|
1412
|
+
function Yr(t) {
|
|
1413
|
+
return !t || t === "auto" || t.top == null || t.top === "auto" ? Ve : t.top;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return !t || t === "auto" || t.right == null || t.right === "auto" ?
|
|
1415
|
+
function Kr(t) {
|
|
1416
|
+
return !t || t === "auto" || t.right == null || t.right === "auto" ? Me : t.right;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e ||
|
|
1418
|
+
function Jr(t, e) {
|
|
1419
|
+
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || ze : t.bottom;
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
return !t || t === "auto" || t.left == null || t.left === "auto" ? e ||
|
|
1421
|
+
function Qr(t, e) {
|
|
1422
|
+
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || We : t.left;
|
|
1423
1423
|
}
|
|
1424
|
-
const
|
|
1424
|
+
const qr = /* @__PURE__ */ R({
|
|
1425
1425
|
__name: "lume-chart",
|
|
1426
1426
|
props: {
|
|
1427
|
-
...
|
|
1427
|
+
...ve(),
|
|
1428
1428
|
chartType: {
|
|
1429
1429
|
type: String,
|
|
1430
1430
|
default: null
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
1433
|
setup(t, { emit: e }) {
|
|
1434
|
-
const r = t, n = X(), { data: a, labels:
|
|
1434
|
+
const r = t, n = X(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = V(r), s = I(-1), f = I(null), m = I(null), h = I([]), g = I(null), _ = I(0), x = I(0), { allOptions: d } = Q(i), { internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N } = rt(a, o, l, d, u), { listenInternalEvent: A } = q(e, N), { xScale: D, yScale: C } = ar(
|
|
1435
1435
|
p,
|
|
1436
1436
|
y,
|
|
1437
|
-
|
|
1438
|
-
|
|
1437
|
+
k,
|
|
1438
|
+
u,
|
|
1439
1439
|
d
|
|
1440
|
-
),
|
|
1441
|
-
top:
|
|
1442
|
-
right:
|
|
1443
|
-
bottom:
|
|
1444
|
-
left:
|
|
1445
|
-
})),
|
|
1446
|
-
var
|
|
1447
|
-
return r.xScale ?
|
|
1448
|
-
}), ee =
|
|
1449
|
-
var
|
|
1450
|
-
return r.yScale ?
|
|
1451
|
-
}),
|
|
1440
|
+
), M = v(() => ({
|
|
1441
|
+
top: Yr(d.value.margins),
|
|
1442
|
+
right: Kr(d.value.margins),
|
|
1443
|
+
bottom: Jr(d.value.margins, _.value),
|
|
1444
|
+
left: Qr(d.value.margins, x.value)
|
|
1445
|
+
})), z = v(() => {
|
|
1446
|
+
var b;
|
|
1447
|
+
return r.xScale ? pt(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, p.value, o.value, k) : D.value;
|
|
1448
|
+
}), ee = v(() => {
|
|
1449
|
+
var b;
|
|
1450
|
+
return r.yScale ? pt(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, p.value, o.value, k) : C.value;
|
|
1451
|
+
}), ce = v(() => ({
|
|
1452
1452
|
...d.value.xAxisOptions,
|
|
1453
|
-
withHover:
|
|
1454
|
-
})),
|
|
1453
|
+
withHover: u.value === O.VERTICAL
|
|
1454
|
+
})), ae = v(() => ({
|
|
1455
1455
|
...d.value.yAxisOptions,
|
|
1456
|
-
withHover:
|
|
1457
|
-
})),
|
|
1458
|
-
var
|
|
1459
|
-
return (
|
|
1460
|
-
}),
|
|
1461
|
-
var
|
|
1462
|
-
return (
|
|
1463
|
-
}), E =
|
|
1464
|
-
var
|
|
1465
|
-
return ((
|
|
1466
|
-
}), w =
|
|
1467
|
-
var
|
|
1468
|
-
return ((
|
|
1469
|
-
}), P =
|
|
1470
|
-
() => a.value.every((
|
|
1471
|
-
),
|
|
1472
|
-
const
|
|
1473
|
-
return
|
|
1474
|
-
}), { hasNegativeValues:
|
|
1475
|
-
|
|
1476
|
-
|
|
1456
|
+
withHover: u.value === O.HORIZONTAL
|
|
1457
|
+
})), oe = v(() => {
|
|
1458
|
+
var b;
|
|
1459
|
+
return (b = d.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1460
|
+
}), le = v(() => {
|
|
1461
|
+
var b;
|
|
1462
|
+
return (b = d.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1463
|
+
}), E = v(() => {
|
|
1464
|
+
var b;
|
|
1465
|
+
return ((b = d.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && oe.value;
|
|
1466
|
+
}), w = v(() => {
|
|
1467
|
+
var b;
|
|
1468
|
+
return ((b = d.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && le.value;
|
|
1469
|
+
}), P = v(
|
|
1470
|
+
() => a.value.every((b) => !b.values.length) || a.value.every((b) => b.values.every((F) => F === null))
|
|
1471
|
+
), te = v(() => {
|
|
1472
|
+
const b = [], { noBaseScales: F } = d.value;
|
|
1473
|
+
return F || b.push(() => !!(z.value && ee.value)), b.every((j) => j() === !0);
|
|
1474
|
+
}), { hasNegativeValues: $e } = Mr(p), { negativeBarAttributes: we } = zr(
|
|
1475
|
+
k,
|
|
1476
|
+
z,
|
|
1477
1477
|
ee,
|
|
1478
|
-
|
|
1479
|
-
), { shouldGenerateTooltipAnchors:
|
|
1480
|
-
|
|
1478
|
+
u
|
|
1479
|
+
), { shouldGenerateTooltipAnchors: De } = jt(
|
|
1480
|
+
h,
|
|
1481
1481
|
d,
|
|
1482
|
-
|
|
1482
|
+
z,
|
|
1483
1483
|
ee,
|
|
1484
|
+
o,
|
|
1484
1485
|
u,
|
|
1485
|
-
l,
|
|
1486
1486
|
p,
|
|
1487
1487
|
c
|
|
1488
|
-
), { tooltipConfig:
|
|
1488
|
+
), { tooltipConfig: pe, showTooltip: de, hideTooltip: xe } = Zr(), { getTooltipItems: me } = Xr(p), L = v(
|
|
1489
1489
|
() => {
|
|
1490
|
-
var
|
|
1491
|
-
return ((
|
|
1490
|
+
var b;
|
|
1491
|
+
return ((b = d.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1492
1492
|
}
|
|
1493
|
-
),
|
|
1494
|
-
var
|
|
1495
|
-
const
|
|
1496
|
-
return
|
|
1493
|
+
), $ = v(() => {
|
|
1494
|
+
var F;
|
|
1495
|
+
const b = (F = d.value.tooltipOptions) == null ? void 0 : F.withPointerEvents;
|
|
1496
|
+
return pe.opened && (!b || b && g.value === !1);
|
|
1497
1497
|
});
|
|
1498
|
-
function
|
|
1499
|
-
var
|
|
1500
|
-
if (d.value.withHover === !1 ||
|
|
1501
|
-
const
|
|
1502
|
-
if (s.value =
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1498
|
+
function B(b) {
|
|
1499
|
+
var j;
|
|
1500
|
+
if (d.value.withHover === !1 || b === s.value) return;
|
|
1501
|
+
const F = s.value;
|
|
1502
|
+
if (s.value = b, d.value.withTooltip !== !1) {
|
|
1503
|
+
const Kt = (j = d.value.tooltipOptions) != null && j.targetElement ? d.value.tooltipOptions.targetElement === "self" ? m.value.$el : d.value.tooltipOptions.targetElement : f.value[b];
|
|
1504
|
+
de(Kt);
|
|
1505
1505
|
}
|
|
1506
|
-
e("hovered-index-changed", { newIndex:
|
|
1506
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: F }), e("update:hoveredIndex", b);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1508
|
+
function G() {
|
|
1509
|
+
xe(), s.value = -1, e("update:hoveredIndex", -1);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function U(b) {
|
|
1512
1512
|
if (!a.value.some(
|
|
1513
|
-
({ values:
|
|
1513
|
+
({ values: j }) => b <= j.length - 1
|
|
1514
1514
|
)) {
|
|
1515
|
-
|
|
1515
|
+
ne(J.InvalidHoveredIndex);
|
|
1516
1516
|
return;
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1518
|
+
b == null || b === -1 ? G() : B(b);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function Z() {
|
|
1521
1521
|
setTimeout(() => {
|
|
1522
|
-
|
|
1522
|
+
$.value && G(), e("chart-mouseleave");
|
|
1523
1523
|
}, 0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
|
|
1525
|
+
function it(b) {
|
|
1526
|
+
T(b), e("resize", b);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
|
|
1528
|
+
function He({ index: b, value: F, event: j }) {
|
|
1529
|
+
b !== null && B(b), e("axis-mouseenter", { index: b, value: F, event: j });
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1532
|
-
e("axis-click", { index:
|
|
1531
|
+
function Se({ index: b, value: F, event: j }) {
|
|
1532
|
+
e("axis-click", { index: b, value: F, event: j });
|
|
1533
1533
|
}
|
|
1534
1534
|
return H(
|
|
1535
1535
|
a,
|
|
1536
|
-
(
|
|
1536
|
+
(b, F) => e("data-changed", { newValue: b, oldValue: F })
|
|
1537
1537
|
), H(
|
|
1538
|
-
|
|
1539
|
-
(
|
|
1540
|
-
), H(P, (
|
|
1541
|
-
|
|
1542
|
-
(
|
|
1543
|
-
|
|
1538
|
+
o,
|
|
1539
|
+
(b, F) => e("labels-changed", { newValue: b, oldValue: F })
|
|
1540
|
+
), H(P, (b) => b && ne(J.Empty), { immediate: !0 }), H(() => r.hoveredIndex, U), H(
|
|
1541
|
+
h,
|
|
1542
|
+
(b) => {
|
|
1543
|
+
b && r.hoveredIndex != null && s.value === -1 && U(r.hoveredIndex);
|
|
1544
1544
|
},
|
|
1545
1545
|
{ flush: "post" }
|
|
1546
|
-
), H(
|
|
1547
|
-
|
|
1548
|
-
}),
|
|
1549
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1550
|
-
}),
|
|
1546
|
+
), H(g, (b) => {
|
|
1547
|
+
b === !1 && pe.opened && G();
|
|
1548
|
+
}), re(async () => {
|
|
1549
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), A("lume__internal--hover", B);
|
|
1550
|
+
}), Pe("chartID", N), Pe("isEmpty", P), Pe("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: s, tooltipAnchor: f, chartContainer: m, tooltipAnchorAttributes: h, isHoveringTooltip: g, xAxisHeight: _, yAxisWidth: x, allOptions: d, internalData: p, computedLabels: y, containerSize: k, updateSize: T, chartID: N, listenInternalEvent: A, xScale: D, yScale: C, computedMargins: M, computedXScale: z, computedYScale: ee, computedXAxisOptions: ce, computedYAxisOptions: ae, xAxisTitle: oe, yAxisTitle: le, showXAxisTitle: E, showYAxisTitle: w, isEmpty: P, isReady: te, hasNegativeValues: $e, negativeBarAttributes: we, shouldGenerateTooltipAnchors: De, tooltipConfig: pe, showTooltip: de, hideTooltip: xe, getTooltipItems: me, tooltipPosition: L, shouldHideTooltip: $, handleInternalHover: B, handleHideTooltip: G, handleExternalHover: U, handleMouseleave: Z, handleResize: it, handleAxisMouseenter: He, handleAxisClick: Se, LumeAxis: Gn, LumeBar: Qe, LumeChartContainer: dr, LumeChartLegend: _r, LumeTooltip: Rr, LumeOverlayGroup: jr, TOOLTIP_ANCHOR_RADIUS: In };
|
|
1551
1551
|
}
|
|
1552
1552
|
});
|
|
1553
|
-
var
|
|
1553
|
+
var ea = function() {
|
|
1554
1554
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1555
1555
|
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, orientation: n.orientation, "data-j-lume-chart": "" }, on: { resize: n.handleResize, click: function(a) {
|
|
1556
1556
|
return n.emit("chart-click", a);
|
|
@@ -1604,18 +1604,18 @@ var Kr = function() {
|
|
|
1604
1604
|
}, "lume__internal--axis-size": function(a) {
|
|
1605
1605
|
n.yAxisWidth = a;
|
|
1606
1606
|
} } })];
|
|
1607
|
-
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a,
|
|
1608
|
-
return r("circle", e._b({ key: `anchor_${
|
|
1607
|
+
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
|
|
1608
|
+
return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
|
|
1609
1609
|
}), 0) : e._e(), e._t("groups", null, { data: n.internalData, labels: n.computedLabels, options: n.allOptions, orientation: n.orientation, xScale: n.computedXScale, yScale: n.computedYScale, hoveredIndex: n.internalHoveredIndex, containerSize: n.containerSize, transition: n.allOptions.withTransition !== !1, classList: e.classList })] : e._e()], 2);
|
|
1610
|
-
},
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1610
|
+
}, ta = [], na = /* @__PURE__ */ S(
|
|
1611
|
+
qr,
|
|
1612
|
+
ea,
|
|
1613
|
+
ta,
|
|
1614
1614
|
!1,
|
|
1615
1615
|
null,
|
|
1616
1616
|
"17c48844"
|
|
1617
1617
|
);
|
|
1618
|
-
const
|
|
1618
|
+
const fe = na.exports, gt = 8, ra = 8, aa = 20, _e = 2, oa = 3, la = 4, ht = 2, ua = /* @__PURE__ */ R({
|
|
1619
1619
|
__name: "lume-alluvial-node-label",
|
|
1620
1620
|
props: {
|
|
1621
1621
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1624,34 +1624,34 @@ const _e = Qr.exports, ft = 8, qr = 8, ea = 20, he = 2, ta = 3, na = 4, pt = 2,
|
|
|
1624
1624
|
},
|
|
1625
1625
|
emits: ["lume__internal--node-resize"],
|
|
1626
1626
|
setup(t, { emit: e }) {
|
|
1627
|
-
const r = t, n = I(null), a = I(r.maxWidth),
|
|
1627
|
+
const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
|
|
1628
1628
|
return H(
|
|
1629
1629
|
[n, () => r.maxWidth],
|
|
1630
|
-
async ([
|
|
1631
|
-
if (
|
|
1632
|
-
a.value = i, await
|
|
1633
|
-
const { width:
|
|
1634
|
-
a.value =
|
|
1630
|
+
async ([l, i]) => {
|
|
1631
|
+
if (l && i) {
|
|
1632
|
+
a.value = i, await Be();
|
|
1633
|
+
const { width: u, height: c } = l.getBoundingClientRect();
|
|
1634
|
+
a.value = u + ht > i ? i : u + ht, o.value = Math.ceil(c);
|
|
1635
1635
|
}
|
|
1636
1636
|
},
|
|
1637
1637
|
{ immediate: !0 }
|
|
1638
|
-
), H(a, async (
|
|
1639
|
-
|
|
1640
|
-
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight:
|
|
1638
|
+
), H(a, async (l) => {
|
|
1639
|
+
l !== r.maxWidth && (await Be(), e("lume__internal--node-resize"));
|
|
1640
|
+
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
|
|
1641
1641
|
}
|
|
1642
1642
|
});
|
|
1643
|
-
var
|
|
1643
|
+
var ia = function() {
|
|
1644
1644
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1645
1645
|
return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1646
|
-
},
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1646
|
+
}, sa = [], ca = /* @__PURE__ */ S(
|
|
1647
|
+
ua,
|
|
1648
|
+
ia,
|
|
1649
|
+
sa,
|
|
1650
1650
|
!1,
|
|
1651
1651
|
null,
|
|
1652
1652
|
"7126dfdb"
|
|
1653
1653
|
);
|
|
1654
|
-
const
|
|
1654
|
+
const da = ca.exports, va = /* @__PURE__ */ R({
|
|
1655
1655
|
__name: "lume-alluvial-node-value",
|
|
1656
1656
|
props: {
|
|
1657
1657
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1660,45 +1660,54 @@ const la = ua.exports, ia = /* @__PURE__ */ R({
|
|
|
1660
1660
|
return { __sfc: !0 };
|
|
1661
1661
|
}
|
|
1662
1662
|
});
|
|
1663
|
-
var
|
|
1663
|
+
var fa = function() {
|
|
1664
1664
|
var e = this, r = e._self._c;
|
|
1665
1665
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { y: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1666
|
-
},
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1666
|
+
}, pa = [], ma = /* @__PURE__ */ S(
|
|
1667
|
+
va,
|
|
1668
|
+
fa,
|
|
1669
|
+
pa,
|
|
1670
1670
|
!1,
|
|
1671
1671
|
null,
|
|
1672
1672
|
"b4fc758b"
|
|
1673
1673
|
);
|
|
1674
|
-
const
|
|
1674
|
+
const _a = ma.exports, ga = /* @__PURE__ */ R({
|
|
1675
1675
|
__name: "lume-alluvial-node-header",
|
|
1676
1676
|
props: {
|
|
1677
|
+
align: {
|
|
1678
|
+
type: String,
|
|
1679
|
+
default: "center"
|
|
1680
|
+
},
|
|
1677
1681
|
x: { type: Number, required: !0 },
|
|
1678
1682
|
y: { type: Number, required: !0 }
|
|
1679
1683
|
},
|
|
1680
1684
|
setup(t) {
|
|
1681
|
-
const e = I(null),
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
+
const e = t, r = I(null), n = v(() => {
|
|
1686
|
+
var i;
|
|
1687
|
+
return ((i = r.value) == null ? void 0 : i.getBBox().width) ?? 0;
|
|
1688
|
+
}), a = v(() => e.align === "left" ? 0 : e.align === "right" ? -n.value : -n.value / 2), o = v(
|
|
1689
|
+
() => r.value && `translate(${a.value}, 0)`
|
|
1690
|
+
), l = v(
|
|
1691
|
+
() => r.value && `translate(${a.value + n.value}, 0)`
|
|
1685
1692
|
);
|
|
1686
|
-
return { __sfc: !0,
|
|
1693
|
+
return { __sfc: !0, props: e, textRef: r, textWidth: n, textStart: a, beforeTransform: o, afterTransform: l };
|
|
1687
1694
|
}
|
|
1688
1695
|
});
|
|
1689
|
-
var
|
|
1696
|
+
var ha = function() {
|
|
1690
1697
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1691
|
-
return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption"
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1698
|
+
return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption", class: {
|
|
1699
|
+
[`lume-alluvial-group__node-header--${e.align}`]: e.align !== "center"
|
|
1700
|
+
} }, [e._t("default")], 2), r("g", { attrs: { transform: n.afterTransform } }, [e._t("after")], 2)]);
|
|
1701
|
+
}, ya = [], ba = /* @__PURE__ */ S(
|
|
1702
|
+
ga,
|
|
1703
|
+
ha,
|
|
1704
|
+
ya,
|
|
1696
1705
|
!1,
|
|
1697
1706
|
null,
|
|
1698
|
-
"
|
|
1707
|
+
"ee436a8d"
|
|
1699
1708
|
);
|
|
1700
|
-
const
|
|
1701
|
-
function
|
|
1709
|
+
const ka = ba.exports;
|
|
1710
|
+
function yt(t, e) {
|
|
1702
1711
|
return {
|
|
1703
1712
|
x0: 0 + (e ? e.left : 0),
|
|
1704
1713
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1706,86 +1715,101 @@ function mt(t, e) {
|
|
|
1706
1715
|
y1: t.height - (e ? e.bottom : 0)
|
|
1707
1716
|
};
|
|
1708
1717
|
}
|
|
1709
|
-
function
|
|
1710
|
-
const e = I(
|
|
1718
|
+
function xa(t) {
|
|
1719
|
+
const e = I(yt(t));
|
|
1711
1720
|
function r(n) {
|
|
1712
|
-
e.value =
|
|
1721
|
+
e.value = yt(t, n);
|
|
1713
1722
|
}
|
|
1714
1723
|
return { extents: e, updateExtents: r };
|
|
1715
1724
|
}
|
|
1716
|
-
var
|
|
1717
|
-
const
|
|
1718
|
-
function
|
|
1719
|
-
r &&
|
|
1725
|
+
var Ae = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Ae || {});
|
|
1726
|
+
const La = "[lume] ";
|
|
1727
|
+
function Ue(t, e, r = !0) {
|
|
1728
|
+
r && wt() || console.error(La + "Error: " + t, e);
|
|
1720
1729
|
}
|
|
1721
|
-
const
|
|
1722
|
-
function
|
|
1730
|
+
const Ta = 200;
|
|
1731
|
+
function W(t) {
|
|
1723
1732
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1724
1733
|
}
|
|
1725
|
-
function
|
|
1734
|
+
function Aa(t, e) {
|
|
1726
1735
|
return e.nodes.find((r) => r.id === t);
|
|
1727
1736
|
}
|
|
1728
|
-
function
|
|
1737
|
+
function Oa(t, e) {
|
|
1729
1738
|
return e.links.find((r) => r.id === t);
|
|
1730
1739
|
}
|
|
1731
|
-
function
|
|
1740
|
+
function Vt(t) {
|
|
1732
1741
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1733
1742
|
}
|
|
1734
|
-
function
|
|
1743
|
+
function ot(t) {
|
|
1744
|
+
return Math.max(
|
|
1745
|
+
...t.filter((e) => e.parentNodeId == null).map(({ layer: e }) => e)
|
|
1746
|
+
);
|
|
1747
|
+
}
|
|
1748
|
+
function Mt(t) {
|
|
1749
|
+
return t.layer === 0;
|
|
1750
|
+
}
|
|
1751
|
+
function zt(t, e) {
|
|
1752
|
+
return t.parentNodeId == null && t.layer === e;
|
|
1753
|
+
}
|
|
1754
|
+
function Wt(t, e, r) {
|
|
1755
|
+
return Mt(t) ? e.alignFirstNodeLabels !== "right" : zt(t, r) ? e.alignLastNodeLabels === "left" : !1;
|
|
1756
|
+
}
|
|
1757
|
+
function Ia(t, e, r) {
|
|
1735
1758
|
if (!e) return;
|
|
1736
|
-
const
|
|
1737
|
-
(
|
|
1759
|
+
const n = ot(t.nodes), a = t.nodes.filter((u) => Mt(u)).map((u) => `${u.id}`), o = t.nodes.filter((u) => zt(u, n)).map((u) => `${u.id}`), l = e.filter((u) => a.includes(u.dataset.id)).reduce(
|
|
1760
|
+
(u, c) => Math.max(u, c.getBBox().width),
|
|
1738
1761
|
-1 / 0
|
|
1739
|
-
),
|
|
1740
|
-
(
|
|
1762
|
+
), i = e.filter((u) => o.includes(u.dataset.id)).reduce(
|
|
1763
|
+
(u, c) => Math.max(u, c.getBBox().width),
|
|
1741
1764
|
-1 / 0
|
|
1742
1765
|
);
|
|
1743
1766
|
return {
|
|
1744
|
-
left:
|
|
1767
|
+
left: r.alignFirstNodeLabels === "right" ? 0 : l,
|
|
1745
1768
|
top: 0,
|
|
1746
|
-
right:
|
|
1769
|
+
right: r.alignLastNodeLabels === "left" ? 0 : i,
|
|
1747
1770
|
bottom: 0
|
|
1748
1771
|
};
|
|
1749
1772
|
}
|
|
1750
|
-
function
|
|
1751
|
-
|
|
1752
|
-
|
|
1773
|
+
function Na(t, e) {
|
|
1774
|
+
const r = ot(t);
|
|
1775
|
+
return t.map((n) => {
|
|
1776
|
+
const a = n.y1 - n.y0 < _e;
|
|
1753
1777
|
return {
|
|
1754
|
-
x:
|
|
1755
|
-
y:
|
|
1778
|
+
x: n.x0,
|
|
1779
|
+
y: n.y0 - (a ? _e / 2 : 0),
|
|
1756
1780
|
// Negative offset to account for the min. height
|
|
1757
|
-
width:
|
|
1758
|
-
height:
|
|
1781
|
+
width: n.x1 - n.x0,
|
|
1782
|
+
height: a ? _e : n.y1 - n.y0,
|
|
1759
1783
|
textTransform: {
|
|
1760
|
-
x: e
|
|
1761
|
-
y: (
|
|
1784
|
+
x: Wt(n, e, r) ? n.x0 - gt : n.x1 + gt,
|
|
1785
|
+
y: (n.y1 + n.y0) / 2
|
|
1762
1786
|
},
|
|
1763
|
-
node:
|
|
1787
|
+
node: n
|
|
1764
1788
|
};
|
|
1765
1789
|
});
|
|
1766
1790
|
}
|
|
1767
|
-
function
|
|
1791
|
+
function Ea(t) {
|
|
1768
1792
|
return [t.source.x1, t.y0];
|
|
1769
1793
|
}
|
|
1770
|
-
function
|
|
1794
|
+
function $a(t) {
|
|
1771
1795
|
return [t.target.x0, t.y1];
|
|
1772
1796
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return t.curveFunction ?
|
|
1797
|
+
function wa(t) {
|
|
1798
|
+
return t.curveFunction ? nn(t.curveFunction).source(Ea).target($a) : Jt();
|
|
1775
1799
|
}
|
|
1776
|
-
function
|
|
1800
|
+
function Da(t) {
|
|
1777
1801
|
return t.map((e) => {
|
|
1778
1802
|
var r;
|
|
1779
1803
|
return {
|
|
1780
1804
|
id: e.id,
|
|
1781
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1782
|
-
d:
|
|
1805
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || ke,
|
|
1806
|
+
d: wa(e)(e),
|
|
1783
1807
|
strokeWidth: Math.max(1, e.width),
|
|
1784
1808
|
link: e
|
|
1785
1809
|
};
|
|
1786
1810
|
});
|
|
1787
1811
|
}
|
|
1788
|
-
function
|
|
1812
|
+
function bt(t, e, r, n, a) {
|
|
1789
1813
|
if (n === !1) {
|
|
1790
1814
|
t.node = {
|
|
1791
1815
|
...t.node,
|
|
@@ -1793,140 +1817,140 @@ function _t(t, e, r, n, a) {
|
|
|
1793
1817
|
};
|
|
1794
1818
|
return;
|
|
1795
1819
|
}
|
|
1796
|
-
const
|
|
1797
|
-
let c = (Date.now() -
|
|
1820
|
+
const o = Date.now(), l = bn(e, r), i = () => {
|
|
1821
|
+
let c = (Date.now() - o) / Ta;
|
|
1798
1822
|
c > 1 && (c = 1), t.node = {
|
|
1799
1823
|
...t.node,
|
|
1800
|
-
transitionValue: a && c === 1 ? void 0 :
|
|
1824
|
+
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
1801
1825
|
}, c < 1 && requestAnimationFrame(i);
|
|
1802
1826
|
};
|
|
1803
1827
|
requestAnimationFrame(i);
|
|
1804
1828
|
}
|
|
1805
|
-
const
|
|
1806
|
-
function
|
|
1807
|
-
const e = I([]), r =
|
|
1829
|
+
const Ha = ":aggregated";
|
|
1830
|
+
function Sa(t) {
|
|
1831
|
+
const e = I([]), r = v(() => {
|
|
1808
1832
|
var c, s;
|
|
1809
|
-
const
|
|
1810
|
-
return (s = (c = t.value) == null ? void 0 : c[0]) == null || s.values.forEach(({ value:
|
|
1811
|
-
m != null && m.length &&
|
|
1812
|
-
}),
|
|
1813
|
-
}), n =
|
|
1833
|
+
const u = /* @__PURE__ */ new Map();
|
|
1834
|
+
return (s = (c = t.value) == null ? void 0 : c[0]) == null || s.values.forEach(({ value: f, expandableNodes: m }) => {
|
|
1835
|
+
m != null && m.length && u.set(f, [...m]);
|
|
1836
|
+
}), u;
|
|
1837
|
+
}), n = v(
|
|
1814
1838
|
() => {
|
|
1815
|
-
const
|
|
1839
|
+
const u = /* @__PURE__ */ new Map();
|
|
1816
1840
|
return r.value.forEach((c, s) => {
|
|
1817
|
-
c.forEach((
|
|
1818
|
-
}),
|
|
1841
|
+
c.forEach((f) => u.set(f, s));
|
|
1842
|
+
}), u;
|
|
1819
1843
|
}
|
|
1820
1844
|
);
|
|
1821
|
-
function a(
|
|
1822
|
-
return r.value.has(
|
|
1845
|
+
function a(u) {
|
|
1846
|
+
return r.value.has(u);
|
|
1823
1847
|
}
|
|
1824
|
-
function u
|
|
1825
|
-
return n.value.has(
|
|
1848
|
+
function o(u) {
|
|
1849
|
+
return n.value.has(u);
|
|
1826
1850
|
}
|
|
1827
|
-
function
|
|
1828
|
-
return e.value.includes(
|
|
1851
|
+
function l(u) {
|
|
1852
|
+
return e.value.includes(u);
|
|
1829
1853
|
}
|
|
1830
|
-
function i(
|
|
1831
|
-
a(
|
|
1854
|
+
function i(u) {
|
|
1855
|
+
a(u) && (e.value = l(u) ? e.value.filter((c) => c !== u) : [...e.value, u]);
|
|
1832
1856
|
}
|
|
1833
1857
|
return H(t, () => e.value = []), {
|
|
1834
1858
|
childIdsByParentId: r,
|
|
1835
1859
|
expandedNodeIds: e,
|
|
1836
1860
|
isExpandableNode: a,
|
|
1837
|
-
isExpandedNode:
|
|
1838
|
-
isSubNode:
|
|
1861
|
+
isExpandedNode: l,
|
|
1862
|
+
isSubNode: o,
|
|
1839
1863
|
parentIdByChildId: n,
|
|
1840
1864
|
toggleNodeExpansion: i
|
|
1841
1865
|
};
|
|
1842
1866
|
}
|
|
1843
|
-
function
|
|
1867
|
+
function Pa(t, e, r, n) {
|
|
1844
1868
|
if (!t || !e || n.size === 0)
|
|
1845
1869
|
return { nodes: t, links: e };
|
|
1846
1870
|
const a = e.filter(
|
|
1847
|
-
(
|
|
1848
|
-
),
|
|
1849
|
-
return r.forEach((
|
|
1850
|
-
const
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
const
|
|
1871
|
+
(l) => !n.has(W(l.source)) && !n.has(W(l.target))
|
|
1872
|
+
), o = new Set(a.map(({ id: l }) => l));
|
|
1873
|
+
return r.forEach((l, i) => {
|
|
1874
|
+
const u = /* @__PURE__ */ new Map();
|
|
1875
|
+
l.forEach((c) => {
|
|
1876
|
+
Ut(e, c).forEach((s) => {
|
|
1877
|
+
const f = W(s.target), m = u.get(f);
|
|
1854
1878
|
if (m) {
|
|
1855
1879
|
m.value += s.value;
|
|
1856
1880
|
return;
|
|
1857
1881
|
}
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1860
|
-
id:
|
|
1882
|
+
const h = `${i}:${f}`;
|
|
1883
|
+
u.set(f, {
|
|
1884
|
+
id: o.has(h) ? `${h}${Ha}` : h,
|
|
1861
1885
|
aggregatedFrom: i,
|
|
1862
1886
|
color: s.color,
|
|
1863
1887
|
curveFunction: s.curveFunction,
|
|
1864
1888
|
source: i,
|
|
1865
|
-
target:
|
|
1889
|
+
target: f,
|
|
1866
1890
|
value: s.value
|
|
1867
1891
|
});
|
|
1868
1892
|
});
|
|
1869
|
-
}), a.push(...
|
|
1893
|
+
}), a.push(...u.values());
|
|
1870
1894
|
}), {
|
|
1871
|
-
nodes: t.filter((
|
|
1895
|
+
nodes: t.filter((l) => !n.has(l.id)),
|
|
1872
1896
|
links: a
|
|
1873
1897
|
};
|
|
1874
1898
|
}
|
|
1875
|
-
function
|
|
1899
|
+
function Ra({
|
|
1876
1900
|
graph: t,
|
|
1877
1901
|
nodes: e,
|
|
1878
1902
|
linkDefinitions: r,
|
|
1879
1903
|
expandedNodeIds: n,
|
|
1880
1904
|
childIdsByParentId: a,
|
|
1881
|
-
options:
|
|
1882
|
-
extents:
|
|
1905
|
+
options: o,
|
|
1906
|
+
extents: l
|
|
1883
1907
|
}) {
|
|
1884
1908
|
var i;
|
|
1885
|
-
(i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((
|
|
1886
|
-
const c = t.nodes.find((
|
|
1887
|
-
!c || !s.length ||
|
|
1909
|
+
(i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((u) => {
|
|
1910
|
+
const c = t.nodes.find((f) => f.id === u), s = (a.get(u) ?? []).map((f) => e.find((m) => m.id === f)).filter(Boolean);
|
|
1911
|
+
!c || !s.length || Ba({ graph: t, parent: c, children: s, linkDefinitions: r, options: o, extents: l });
|
|
1888
1912
|
});
|
|
1889
1913
|
}
|
|
1890
|
-
function
|
|
1914
|
+
function Ba({
|
|
1891
1915
|
graph: t,
|
|
1892
1916
|
parent: e,
|
|
1893
1917
|
children: r,
|
|
1894
1918
|
linkDefinitions: n,
|
|
1895
1919
|
options: a,
|
|
1896
|
-
extents:
|
|
1920
|
+
extents: o
|
|
1897
1921
|
}) {
|
|
1898
|
-
const
|
|
1899
|
-
(s) =>
|
|
1900
|
-
), i =
|
|
1922
|
+
const l = r.map(
|
|
1923
|
+
(s) => za(n, e, s)
|
|
1924
|
+
), i = l.reduce((s, f) => s + f, 0);
|
|
1901
1925
|
if (!i) return;
|
|
1902
|
-
const
|
|
1903
|
-
|
|
1926
|
+
const u = (e.y1 - e.y0) / i;
|
|
1927
|
+
Ca({
|
|
1904
1928
|
parent: e,
|
|
1905
1929
|
children: r,
|
|
1906
|
-
childValues:
|
|
1907
|
-
scale:
|
|
1930
|
+
childValues: l,
|
|
1931
|
+
scale: u,
|
|
1908
1932
|
graph: t,
|
|
1909
1933
|
options: a,
|
|
1910
|
-
extents:
|
|
1934
|
+
extents: o
|
|
1911
1935
|
});
|
|
1912
|
-
const c =
|
|
1936
|
+
const c = ja({
|
|
1913
1937
|
parent: e,
|
|
1914
1938
|
children: r,
|
|
1915
|
-
childValues:
|
|
1916
|
-
scale:
|
|
1939
|
+
childValues: l,
|
|
1940
|
+
scale: u,
|
|
1917
1941
|
linkDefinitions: n
|
|
1918
1942
|
});
|
|
1919
|
-
|
|
1920
|
-
const
|
|
1943
|
+
Ma(t, e).forEach((s) => {
|
|
1944
|
+
const f = Va({
|
|
1921
1945
|
children: r,
|
|
1922
1946
|
aggregatedLink: s,
|
|
1923
|
-
scale:
|
|
1947
|
+
scale: u,
|
|
1924
1948
|
linkDefinitions: n
|
|
1925
1949
|
});
|
|
1926
|
-
|
|
1950
|
+
kt(t.links, s, f), kt(
|
|
1927
1951
|
s.target.targetLinks,
|
|
1928
1952
|
s,
|
|
1929
|
-
|
|
1953
|
+
f
|
|
1930
1954
|
);
|
|
1931
1955
|
}), e.sourceLinks = [
|
|
1932
1956
|
...e.sourceLinks.filter(
|
|
@@ -1935,120 +1959,120 @@ function Ha({
|
|
|
1935
1959
|
...c
|
|
1936
1960
|
], t.links.push(...c), t.nodes.push(...r);
|
|
1937
1961
|
}
|
|
1938
|
-
function
|
|
1962
|
+
function Ca({
|
|
1939
1963
|
parent: t,
|
|
1940
1964
|
children: e,
|
|
1941
1965
|
childValues: r,
|
|
1942
1966
|
scale: n,
|
|
1943
1967
|
graph: a,
|
|
1944
|
-
options:
|
|
1945
|
-
extents:
|
|
1968
|
+
options: o,
|
|
1969
|
+
extents: l
|
|
1946
1970
|
}) {
|
|
1947
|
-
const i = t.x1 - t.x0,
|
|
1971
|
+
const i = t.x1 - t.x0, u = t.x1, c = Wa(a, t) ?? l.x1, s = Math.max(u, u + (c - u - i) / 2), f = r.map((_) => _ * n), m = Fa(e, o.nodePadding ?? 0), h = [...f, ...m].reduce(
|
|
1948
1972
|
(_, x) => _ + x,
|
|
1949
1973
|
0
|
|
1950
1974
|
);
|
|
1951
|
-
let
|
|
1975
|
+
let g = Ga({ parent: t, children: e, totalHeight: h, extents: l });
|
|
1952
1976
|
e.forEach((_, x) => {
|
|
1953
|
-
|
|
1977
|
+
g += m[x], _.x0 = s, _.x1 = s + i, _.y0 = g, _.y1 = g + f[x], _.depth = t.depth + 0.5, _.layer = t.layer + 0.5, _.parentNodeId = t.id, _.value = r[x], _.sourceLinks = [], _.targetLinks = [], g = _.y1;
|
|
1954
1978
|
});
|
|
1955
1979
|
}
|
|
1956
|
-
function
|
|
1980
|
+
function Fa(t, e) {
|
|
1957
1981
|
return t.map(({ offset: r }, n) => n === 0 ? 0 : typeof r == "number" ? r : e);
|
|
1958
1982
|
}
|
|
1959
|
-
function
|
|
1983
|
+
function Ga({
|
|
1960
1984
|
parent: t,
|
|
1961
1985
|
children: e,
|
|
1962
1986
|
totalHeight: r,
|
|
1963
1987
|
extents: n
|
|
1964
1988
|
}) {
|
|
1965
1989
|
const { offset: a } = e[0];
|
|
1966
|
-
return typeof a == "number" ? t.y0 + a :
|
|
1990
|
+
return typeof a == "number" ? t.y0 + a : Ua(
|
|
1967
1991
|
(t.y0 + t.y1) / 2 - r / 2,
|
|
1968
1992
|
n.y0,
|
|
1969
1993
|
Math.max(n.y0, n.y1 - r)
|
|
1970
1994
|
);
|
|
1971
1995
|
}
|
|
1972
|
-
function
|
|
1996
|
+
function ja({
|
|
1973
1997
|
parent: t,
|
|
1974
1998
|
children: e,
|
|
1975
1999
|
childValues: r,
|
|
1976
2000
|
scale: n,
|
|
1977
2001
|
linkDefinitions: a
|
|
1978
2002
|
}) {
|
|
1979
|
-
let
|
|
1980
|
-
return e.map((
|
|
1981
|
-
const
|
|
1982
|
-
id: (
|
|
1983
|
-
color:
|
|
1984
|
-
curveFunction:
|
|
2003
|
+
let o = t.y0;
|
|
2004
|
+
return e.map((l, i) => {
|
|
2005
|
+
const u = lt(a, t.id, l.id), c = r[i] * n, s = {
|
|
2006
|
+
id: (u == null ? void 0 : u.id) ?? `${t.id}:${l.id}`,
|
|
2007
|
+
color: u == null ? void 0 : u.color,
|
|
2008
|
+
curveFunction: u == null ? void 0 : u.curveFunction,
|
|
1985
2009
|
source: t,
|
|
1986
|
-
target:
|
|
2010
|
+
target: l,
|
|
1987
2011
|
value: r[i],
|
|
1988
2012
|
width: c,
|
|
1989
|
-
y0:
|
|
1990
|
-
y1: (
|
|
2013
|
+
y0: o + c / 2,
|
|
2014
|
+
y1: (l.y0 + l.y1) / 2
|
|
1991
2015
|
};
|
|
1992
|
-
return
|
|
2016
|
+
return o += c, l.targetLinks.push(s), s;
|
|
1993
2017
|
});
|
|
1994
2018
|
}
|
|
1995
|
-
function
|
|
2019
|
+
function Va({
|
|
1996
2020
|
children: t,
|
|
1997
2021
|
aggregatedLink: e,
|
|
1998
2022
|
scale: r,
|
|
1999
2023
|
linkDefinitions: n
|
|
2000
2024
|
}) {
|
|
2001
2025
|
const a = e.target;
|
|
2002
|
-
let
|
|
2003
|
-
return t.reduce((
|
|
2004
|
-
const
|
|
2005
|
-
if (!
|
|
2006
|
-
const c =
|
|
2007
|
-
(m, { width:
|
|
2026
|
+
let o = e.y1 - e.width / 2;
|
|
2027
|
+
return t.reduce((l, i) => {
|
|
2028
|
+
const u = lt(n, i.id, a.id);
|
|
2029
|
+
if (!u) return l;
|
|
2030
|
+
const c = u.value * r, s = i.sourceLinks.reduce(
|
|
2031
|
+
(m, { width: h }) => m + h,
|
|
2008
2032
|
i.y0
|
|
2009
|
-
),
|
|
2010
|
-
id:
|
|
2011
|
-
color:
|
|
2012
|
-
curveFunction:
|
|
2033
|
+
), f = {
|
|
2034
|
+
id: u.id,
|
|
2035
|
+
color: u.color,
|
|
2036
|
+
curveFunction: u.curveFunction,
|
|
2013
2037
|
source: i,
|
|
2014
2038
|
target: a,
|
|
2015
|
-
value:
|
|
2039
|
+
value: u.value,
|
|
2016
2040
|
width: c,
|
|
2017
2041
|
y0: s + c / 2,
|
|
2018
|
-
y1:
|
|
2042
|
+
y1: o + c / 2
|
|
2019
2043
|
};
|
|
2020
|
-
return
|
|
2044
|
+
return o += c, i.sourceLinks.push(f), l.push(f), l;
|
|
2021
2045
|
}, []);
|
|
2022
2046
|
}
|
|
2023
|
-
function
|
|
2047
|
+
function Ma(t, e) {
|
|
2024
2048
|
return t.links.filter(
|
|
2025
2049
|
(r) => r.aggregatedFrom === e.id
|
|
2026
2050
|
);
|
|
2027
2051
|
}
|
|
2028
|
-
function
|
|
2052
|
+
function Ut(t, e) {
|
|
2029
2053
|
return t.filter(
|
|
2030
|
-
(r) =>
|
|
2054
|
+
(r) => W(r.source) === e
|
|
2031
2055
|
);
|
|
2032
2056
|
}
|
|
2033
|
-
function
|
|
2057
|
+
function lt(t, e, r) {
|
|
2034
2058
|
return t.find(
|
|
2035
|
-
(n) =>
|
|
2059
|
+
(n) => W(n.source) === e && W(n.target) === r
|
|
2036
2060
|
);
|
|
2037
2061
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const n =
|
|
2040
|
-
return n ? n.value :
|
|
2041
|
-
(a, { value:
|
|
2062
|
+
function za(t, e, r) {
|
|
2063
|
+
const n = lt(t, e.id, r.id);
|
|
2064
|
+
return n ? n.value : Ut(t, r.id).reduce(
|
|
2065
|
+
(a, { value: o }) => a + o,
|
|
2042
2066
|
0
|
|
2043
2067
|
);
|
|
2044
2068
|
}
|
|
2045
|
-
function
|
|
2069
|
+
function Wa(t, e) {
|
|
2046
2070
|
const r = t.nodes.filter(
|
|
2047
2071
|
(n) => n.layer === e.layer + 1
|
|
2048
2072
|
);
|
|
2049
2073
|
return r.length ? Math.min(...r.map(({ x0: n }) => n)) : null;
|
|
2050
2074
|
}
|
|
2051
|
-
function
|
|
2075
|
+
function kt(t, e, r) {
|
|
2052
2076
|
const n = t.indexOf(e);
|
|
2053
2077
|
if (n === -1) {
|
|
2054
2078
|
t.push(...r);
|
|
@@ -2056,180 +2080,180 @@ function ht(t, e, r) {
|
|
|
2056
2080
|
}
|
|
2057
2081
|
t.splice(n, 1, ...r);
|
|
2058
2082
|
}
|
|
2059
|
-
function
|
|
2083
|
+
function Ua(t, e, r) {
|
|
2060
2084
|
return Math.max(e, Math.min(t, r));
|
|
2061
2085
|
}
|
|
2062
|
-
const
|
|
2086
|
+
const Za = {
|
|
2063
2087
|
nodes: [],
|
|
2064
2088
|
links: []
|
|
2065
2089
|
};
|
|
2066
|
-
function
|
|
2090
|
+
function xt(t, e) {
|
|
2067
2091
|
return e.find((r) => r.every((n) => n.layer === t.layer));
|
|
2068
2092
|
}
|
|
2069
|
-
function
|
|
2093
|
+
function Xa(t, e, r) {
|
|
2070
2094
|
const n = I(null), {
|
|
2071
2095
|
childIdsByParentId: a,
|
|
2072
|
-
expandedNodeIds:
|
|
2073
|
-
isExpandableNode:
|
|
2096
|
+
expandedNodeIds: o,
|
|
2097
|
+
isExpandableNode: l,
|
|
2074
2098
|
isSubNode: i,
|
|
2075
|
-
parentIdByChildId:
|
|
2099
|
+
parentIdByChildId: u,
|
|
2076
2100
|
toggleNodeExpansion: c
|
|
2077
|
-
} =
|
|
2101
|
+
} = Sa(t), s = v(() => {
|
|
2078
2102
|
var d, p;
|
|
2079
2103
|
return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
|
|
2080
2104
|
({
|
|
2081
2105
|
label: y,
|
|
2082
|
-
color:
|
|
2083
|
-
value:
|
|
2084
|
-
deriveColorFromIncomingLinks:
|
|
2085
|
-
expandableNodes:
|
|
2086
|
-
offset:
|
|
2106
|
+
color: k,
|
|
2107
|
+
value: T,
|
|
2108
|
+
deriveColorFromIncomingLinks: N,
|
|
2109
|
+
expandableNodes: A,
|
|
2110
|
+
offset: D
|
|
2087
2111
|
}) => ({
|
|
2088
|
-
label: y ||
|
|
2089
|
-
color:
|
|
2090
|
-
fallbackColor:
|
|
2091
|
-
id:
|
|
2092
|
-
deriveColorFromIncomingLinks:
|
|
2093
|
-
expandableNodes:
|
|
2094
|
-
offset:
|
|
2112
|
+
label: y || T.toString(),
|
|
2113
|
+
color: k,
|
|
2114
|
+
fallbackColor: k || ke,
|
|
2115
|
+
id: T,
|
|
2116
|
+
deriveColorFromIncomingLinks: N,
|
|
2117
|
+
expandableNodes: A,
|
|
2118
|
+
offset: D
|
|
2095
2119
|
})
|
|
2096
2120
|
);
|
|
2097
|
-
}),
|
|
2121
|
+
}), f = v(
|
|
2098
2122
|
() => {
|
|
2099
2123
|
var d, p;
|
|
2100
2124
|
return (p = (d = t.value) == null ? void 0 : d[0]) == null ? void 0 : p.values.map(
|
|
2101
2125
|
(y) => {
|
|
2102
|
-
var
|
|
2103
|
-
return (
|
|
2104
|
-
({ node:
|
|
2105
|
-
id: `${y.value}:${
|
|
2106
|
-
color:
|
|
2107
|
-
curveFunction:
|
|
2126
|
+
var k;
|
|
2127
|
+
return (k = y.targets) == null ? void 0 : k.map(
|
|
2128
|
+
({ node: T, value: N, color: A, curveFunction: D }) => ({
|
|
2129
|
+
id: `${y.value}:${T}`,
|
|
2130
|
+
color: A,
|
|
2131
|
+
curveFunction: D,
|
|
2108
2132
|
source: y.value ?? y.label,
|
|
2109
|
-
target:
|
|
2110
|
-
value:
|
|
2133
|
+
target: T,
|
|
2134
|
+
value: N
|
|
2111
2135
|
})
|
|
2112
2136
|
);
|
|
2113
2137
|
}
|
|
2114
2138
|
).filter(Boolean).flat();
|
|
2115
2139
|
}
|
|
2116
|
-
), m =
|
|
2140
|
+
), m = v(() => Qt().nodeId(W).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), h = v(() => {
|
|
2117
2141
|
var d;
|
|
2118
2142
|
return (d = n.value) == null ? void 0 : d.nodes.filter((p) => p.parentNodeId == null).reduce((p, y) => {
|
|
2119
|
-
const
|
|
2120
|
-
return
|
|
2143
|
+
const k = xt(y, p);
|
|
2144
|
+
return k ? (k.push(y), k.sort((T, N) => (T._y0 || T.y0) - (N._y0 || N.y0))) : p.push([y]), p;
|
|
2121
2145
|
}, []).sort((p, y) => p[0].layer - y[0].layer);
|
|
2122
2146
|
});
|
|
2123
|
-
function
|
|
2124
|
-
const { offset: p } = d, y =
|
|
2147
|
+
function g(d) {
|
|
2148
|
+
const { offset: p } = d, y = xt(d, h.value);
|
|
2125
2149
|
if (!y) return;
|
|
2126
|
-
const
|
|
2127
|
-
d._y0 = d.y0, d._y1 = d.y1, d.y0 =
|
|
2150
|
+
const k = y[y.findIndex((N) => N.id === d.id) - 1], T = k && y.length !== 1 ? k.y1 + p : p;
|
|
2151
|
+
d._y0 = d.y0, d._y1 = d.y1, d.y0 = T, d.y1 = d.y0 + (d._y1 - d._y0);
|
|
2128
2152
|
}
|
|
2129
2153
|
function _(d, p) {
|
|
2130
|
-
const { id: y, _y0:
|
|
2131
|
-
(
|
|
2132
|
-
),
|
|
2133
|
-
(
|
|
2134
|
-
),
|
|
2135
|
-
|
|
2136
|
-
}
|
|
2137
|
-
const x =
|
|
2154
|
+
const { id: y, _y0: k, y0: T } = d, N = p.links.filter(
|
|
2155
|
+
(C) => C.source.id === y
|
|
2156
|
+
), A = p.links.filter(
|
|
2157
|
+
(C) => C.target.id === y
|
|
2158
|
+
), D = T - k;
|
|
2159
|
+
N.forEach((C) => C.y0 += D), A.forEach((C) => C.y1 += D);
|
|
2160
|
+
}
|
|
2161
|
+
const x = v(() => {
|
|
2138
2162
|
var d;
|
|
2139
2163
|
return n.value && ((d = s.value) == null || d.forEach((p) => {
|
|
2140
|
-
p.value === 0 && (p.fallbackColor =
|
|
2164
|
+
p.value === 0 && (p.fallbackColor = et.Grey), typeof p.offset == "number" && !i(p.id) && (g(p), _(p, n.value));
|
|
2141
2165
|
})), n.value;
|
|
2142
2166
|
});
|
|
2143
|
-
return H([m, r,
|
|
2167
|
+
return H([m, r, o], () => {
|
|
2144
2168
|
try {
|
|
2145
|
-
const { x0: d, y0: p, x1: y, y1:
|
|
2169
|
+
const { x0: d, y0: p, x1: y, y1: k } = r.value, T = m.value.extent([
|
|
2146
2170
|
[d, p],
|
|
2147
|
-
[y,
|
|
2171
|
+
[y, k]
|
|
2148
2172
|
])(
|
|
2149
|
-
|
|
2173
|
+
Pa(
|
|
2150
2174
|
s.value,
|
|
2151
|
-
|
|
2175
|
+
f.value,
|
|
2152
2176
|
a.value,
|
|
2153
|
-
|
|
2177
|
+
u.value
|
|
2154
2178
|
)
|
|
2155
2179
|
);
|
|
2156
|
-
|
|
2157
|
-
graph:
|
|
2180
|
+
Ra({
|
|
2181
|
+
graph: T,
|
|
2158
2182
|
nodes: s.value,
|
|
2159
|
-
linkDefinitions:
|
|
2160
|
-
expandedNodeIds:
|
|
2183
|
+
linkDefinitions: f.value,
|
|
2184
|
+
expandedNodeIds: o.value,
|
|
2161
2185
|
childIdsByParentId: a.value,
|
|
2162
2186
|
options: e.value,
|
|
2163
2187
|
extents: r.value
|
|
2164
|
-
}), n.value =
|
|
2188
|
+
}), n.value = T;
|
|
2165
2189
|
} catch (d) {
|
|
2166
|
-
|
|
2190
|
+
Ue(Ae.GraphProblem, d), n.value = Za;
|
|
2167
2191
|
}
|
|
2168
|
-
}), { columns:
|
|
2192
|
+
}), { columns: h, graph: x, isExpandableNode: l, toggleNodeExpansion: c };
|
|
2169
2193
|
}
|
|
2170
|
-
function
|
|
2194
|
+
function Ze(t, e) {
|
|
2171
2195
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
2172
|
-
e[r.id] = n,
|
|
2196
|
+
e[r.id] = n, Ze(
|
|
2173
2197
|
r,
|
|
2174
2198
|
e
|
|
2175
2199
|
);
|
|
2176
2200
|
}), e;
|
|
2177
2201
|
}
|
|
2178
|
-
function
|
|
2202
|
+
function Xe(t, e) {
|
|
2179
2203
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
2180
|
-
e[r.id] = n,
|
|
2204
|
+
e[r.id] = n, Xe(
|
|
2181
2205
|
r,
|
|
2182
2206
|
e
|
|
2183
2207
|
);
|
|
2184
2208
|
}), e;
|
|
2185
2209
|
}
|
|
2186
|
-
function
|
|
2210
|
+
function Ya(t, e) {
|
|
2187
2211
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
2188
2212
|
}
|
|
2189
|
-
const
|
|
2213
|
+
const Ka = (t, e) => {
|
|
2190
2214
|
let r;
|
|
2191
|
-
|
|
2215
|
+
Vt(t) ? r = {
|
|
2192
2216
|
[t.id]: t.value,
|
|
2193
|
-
...
|
|
2194
|
-
...
|
|
2217
|
+
...Ze(t),
|
|
2218
|
+
...Xe(t)
|
|
2195
2219
|
} : r = {
|
|
2196
2220
|
[t.source.id]: t.source.value,
|
|
2197
2221
|
[t.target.id]: t.target.value,
|
|
2198
|
-
...
|
|
2199
|
-
...
|
|
2222
|
+
...Ze(t.source),
|
|
2223
|
+
...Xe(t.target)
|
|
2200
2224
|
};
|
|
2201
|
-
const n =
|
|
2225
|
+
const n = Ya(r, e);
|
|
2202
2226
|
return { nodes: r, links: n };
|
|
2203
|
-
},
|
|
2204
|
-
if (
|
|
2227
|
+
}, Ja = (t) => {
|
|
2228
|
+
if (Vt(t)) {
|
|
2205
2229
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
2206
2230
|
return {
|
|
2207
2231
|
nodes: e.reduce(
|
|
2208
|
-
(r, { source: n, target: a, value:
|
|
2209
|
-
{ [
|
|
2232
|
+
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [W(a)]: o } : { ...r, [W(n)]: o },
|
|
2233
|
+
{ [W(t)]: t.value }
|
|
2210
2234
|
),
|
|
2211
2235
|
links: e.map(({ id: r }) => r)
|
|
2212
2236
|
};
|
|
2213
2237
|
}
|
|
2214
2238
|
return {
|
|
2215
2239
|
nodes: {
|
|
2216
|
-
[
|
|
2217
|
-
[
|
|
2240
|
+
[W(t.target)]: t.value,
|
|
2241
|
+
[W(t.source)]: t.source.value
|
|
2218
2242
|
},
|
|
2219
2243
|
links: [t.id]
|
|
2220
2244
|
};
|
|
2221
2245
|
};
|
|
2222
|
-
function
|
|
2223
|
-
const n = I(null), a =
|
|
2246
|
+
function Qa(t, e, r) {
|
|
2247
|
+
const n = I(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
2224
2248
|
n.value,
|
|
2225
2249
|
r.value
|
|
2226
|
-
) : e.value.highlightedElements === "closest" ?
|
|
2227
|
-
return H(a, (
|
|
2228
|
-
if (
|
|
2250
|
+
) : e.value.highlightedElements === "closest" ? Ja(n.value, r.value) : Ka(n.value, r.value) : { nodes: {}, links: [] });
|
|
2251
|
+
return H(a, (o, l) => {
|
|
2252
|
+
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
2229
2253
|
t.value.forEach((i) => {
|
|
2230
|
-
i.node.id in
|
|
2254
|
+
i.node.id in l.nodes && bt(
|
|
2231
2255
|
i,
|
|
2232
|
-
|
|
2256
|
+
l.nodes[i.node.id],
|
|
2233
2257
|
i.node.value,
|
|
2234
2258
|
e.value.withTransition,
|
|
2235
2259
|
!0
|
|
@@ -2238,19 +2262,19 @@ function Xa(t, e, r) {
|
|
|
2238
2262
|
return;
|
|
2239
2263
|
}
|
|
2240
2264
|
t.value.forEach((i) => {
|
|
2241
|
-
i.node.id in
|
|
2265
|
+
i.node.id in o.nodes && bt(
|
|
2242
2266
|
i,
|
|
2243
2267
|
i.node.value,
|
|
2244
|
-
|
|
2268
|
+
o.nodes[i.node.id],
|
|
2245
2269
|
e.value.withTransition
|
|
2246
2270
|
);
|
|
2247
2271
|
});
|
|
2248
2272
|
}), { highlightedElements: a, hoveredElement: n };
|
|
2249
2273
|
}
|
|
2250
|
-
const
|
|
2274
|
+
const qa = /* @__PURE__ */ R({
|
|
2251
2275
|
__name: "lume-alluvial-group",
|
|
2252
2276
|
props: {
|
|
2253
|
-
...
|
|
2277
|
+
...Ee(),
|
|
2254
2278
|
hoveredElementId: {
|
|
2255
2279
|
type: [Number, String],
|
|
2256
2280
|
default: null
|
|
@@ -2258,187 +2282,224 @@ const Ya = /* @__PURE__ */ R({
|
|
|
2258
2282
|
},
|
|
2259
2283
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2260
2284
|
setup(t, { emit: e }) {
|
|
2261
|
-
const r = t, n =
|
|
2285
|
+
const r = t, n = Oe("chartID"), { data: a, options: o } = V(r), l = I([]), i = I([]), u = I(null), c = I(null), s = I(null), { extents: f, updateExtents: m } = xa(r.containerSize), { columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x } = Xa(a, o, f), { hoveredElement: d, highlightedElements: p } = Qa(
|
|
2286
|
+
l,
|
|
2262
2287
|
o,
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2288
|
+
g
|
|
2289
|
+
), y = v(() => Te(o.value.valueFormat)), k = v(
|
|
2290
|
+
() => o.value.nodeExpansionTrigger === "block"
|
|
2291
|
+
), T = v(
|
|
2266
2292
|
() => Object.keys(p.value.nodes)
|
|
2267
|
-
),
|
|
2268
|
-
(
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2293
|
+
), N = v(
|
|
2294
|
+
() => {
|
|
2295
|
+
var L, $;
|
|
2296
|
+
return ($ = (L = g.value) == null ? void 0 : L.nodes) != null && $.length ? ot(g.value.nodes) : 0;
|
|
2297
|
+
}
|
|
2298
|
+
), A = v(() => {
|
|
2299
|
+
if (!h.value) return [];
|
|
2300
|
+
const L = h.value.length - 1;
|
|
2301
|
+
return h.value.map(([{ x0: $, x1: B }], G) => G === 0 && o.value.alignFirstNodeLabels === "right" ? { x: $, align: "left" } : G === L && o.value.alignLastNodeLabels === "left" ? { x: B, align: "right" } : { x: ($ + B) / 2, align: "center" });
|
|
2302
|
+
}), D = v(() => {
|
|
2303
|
+
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
2304
|
+
return o.value.nodeHeaders.slice(0, A.value.length).map((L, $) => ({
|
|
2272
2305
|
label: L,
|
|
2273
|
-
|
|
2306
|
+
...A.value[$]
|
|
2274
2307
|
}));
|
|
2275
|
-
}),
|
|
2276
|
-
() =>
|
|
2277
|
-
),
|
|
2278
|
-
if (!(!
|
|
2279
|
-
return
|
|
2280
|
-
const { source: B, target:
|
|
2281
|
-
return L[
|
|
2308
|
+
}), C = v(
|
|
2309
|
+
() => o.value.nodeHeaderPadding ?? aa
|
|
2310
|
+
), M = v(() => {
|
|
2311
|
+
if (!(!o.value.gradient || !g.value))
|
|
2312
|
+
return g.value.links.reduce((L, $) => {
|
|
2313
|
+
const { source: B, target: G } = $, U = B.color || B.fallbackColor, Z = G.deriveColorFromIncomingLinks ? U : G.color || G.fallbackColor;
|
|
2314
|
+
return L[$.id] = {
|
|
2282
2315
|
source: U,
|
|
2283
|
-
target:
|
|
2316
|
+
target: Z,
|
|
2284
2317
|
x1: B.x1,
|
|
2285
|
-
x2:
|
|
2318
|
+
x2: G.x0
|
|
2286
2319
|
}, L;
|
|
2287
2320
|
}, {});
|
|
2288
|
-
}),
|
|
2289
|
-
const L =
|
|
2290
|
-
(B) =>
|
|
2291
|
-
),
|
|
2321
|
+
}), z = v(() => {
|
|
2322
|
+
const L = l.value.filter(
|
|
2323
|
+
(B) => w(B)
|
|
2324
|
+
), $ = [];
|
|
2292
2325
|
return L.forEach((B) => {
|
|
2293
|
-
const
|
|
2294
|
-
i.value.filter(({ link: U }) => U.target.id === B.node.id).reverse().reduce((U,
|
|
2295
|
-
const
|
|
2296
|
-
let
|
|
2297
|
-
return
|
|
2326
|
+
const G = [];
|
|
2327
|
+
i.value.filter(({ link: U }) => U.target.id === B.node.id).reverse().reduce((U, Z, it, He) => {
|
|
2328
|
+
const Se = Z.link.target.y1 - Z.link.target.y0 > _e;
|
|
2329
|
+
let b, F, j;
|
|
2330
|
+
return Se ? (b = Z.link.target.y1 - Z.link.target.y0, F = Z.link.value / B.node.value, j = F * b) : j = _e / He.length, G.push({
|
|
2298
2331
|
x: B.x,
|
|
2299
2332
|
y: B.y + U,
|
|
2300
|
-
height:
|
|
2333
|
+
height: j,
|
|
2301
2334
|
width: B.width,
|
|
2302
|
-
key: `node-block-${B.node.id}-source-link-${
|
|
2303
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2304
|
-
}), U +
|
|
2305
|
-
}, 0),
|
|
2335
|
+
key: `node-block-${B.node.id}-source-link-${Z.link.source.id}`,
|
|
2336
|
+
class: `lume-alluvial-group__node-block lume-fill--${Z.link.source.color || ke}`
|
|
2337
|
+
}), U + j;
|
|
2338
|
+
}, 0), $.push({
|
|
2306
2339
|
id: B.node.id,
|
|
2307
|
-
subNodes:
|
|
2340
|
+
subNodes: G
|
|
2308
2341
|
});
|
|
2309
|
-
}),
|
|
2342
|
+
}), $;
|
|
2310
2343
|
});
|
|
2311
|
-
function
|
|
2312
|
-
return
|
|
2344
|
+
function ee(L) {
|
|
2345
|
+
return o.value.gradient && `url('#${n}_${L.id}')`;
|
|
2313
2346
|
}
|
|
2314
|
-
function
|
|
2315
|
-
return
|
|
2347
|
+
function ce(L) {
|
|
2348
|
+
return T.value.length > 0 && !T.value.includes(L.toString());
|
|
2316
2349
|
}
|
|
2317
|
-
function
|
|
2318
|
-
return
|
|
2350
|
+
function ae(L) {
|
|
2351
|
+
return T.value.length > 0 && T.value.includes(L.toString());
|
|
2319
2352
|
}
|
|
2320
|
-
function
|
|
2353
|
+
function oe(L) {
|
|
2321
2354
|
return p.value.links.length > 0 && !p.value.links.includes(L);
|
|
2322
2355
|
}
|
|
2323
|
-
function
|
|
2356
|
+
function le(L) {
|
|
2324
2357
|
return p.value.links.length > 0 && p.value.links.includes(L);
|
|
2325
2358
|
}
|
|
2326
|
-
function
|
|
2359
|
+
function E(L) {
|
|
2360
|
+
return Wt(L, o.value, N.value);
|
|
2361
|
+
}
|
|
2362
|
+
function w(L) {
|
|
2327
2363
|
return !L.node.color && L.node.deriveColorFromIncomingLinks;
|
|
2328
2364
|
}
|
|
2329
|
-
function
|
|
2330
|
-
_(L.id) && x(L.id)
|
|
2365
|
+
function P(L) {
|
|
2366
|
+
_(L.id) && x(L.id);
|
|
2331
2367
|
}
|
|
2332
|
-
function
|
|
2333
|
-
|
|
2368
|
+
function te(L, $) {
|
|
2369
|
+
k.value || P(L), e("node-click", { node: L, event: $ });
|
|
2334
2370
|
}
|
|
2335
|
-
function
|
|
2336
|
-
|
|
2337
|
-
d.value = null, e("link-mouseleave", { link: C, event: L });
|
|
2371
|
+
function $e(L, $) {
|
|
2372
|
+
P(L), e("node-click", { node: L, event: $ });
|
|
2338
2373
|
}
|
|
2339
|
-
function
|
|
2374
|
+
function we(L) {
|
|
2375
|
+
k.value && P(L);
|
|
2376
|
+
}
|
|
2377
|
+
function De(L, $) {
|
|
2378
|
+
L !== d.value && (d.value = L, e("link-mouseenter", { link: L, event: $ }));
|
|
2379
|
+
}
|
|
2380
|
+
function pe(L) {
|
|
2381
|
+
const $ = d.value;
|
|
2382
|
+
d.value = null, e("link-mouseleave", { link: $, event: L });
|
|
2383
|
+
}
|
|
2384
|
+
function de(L) {
|
|
2340
2385
|
if (L == null) {
|
|
2341
2386
|
d.value = null;
|
|
2342
2387
|
return;
|
|
2343
2388
|
}
|
|
2344
|
-
const
|
|
2345
|
-
if (
|
|
2346
|
-
|
|
2389
|
+
const $ = Aa(L, g.value) || Oa(L, g.value);
|
|
2390
|
+
if (!$) {
|
|
2391
|
+
ne(J.InvalidHoveredElement);
|
|
2347
2392
|
return;
|
|
2348
2393
|
}
|
|
2349
|
-
d.value =
|
|
2394
|
+
d.value = $;
|
|
2350
2395
|
}
|
|
2351
|
-
function
|
|
2352
|
-
var
|
|
2353
|
-
return ((
|
|
2396
|
+
function xe(L) {
|
|
2397
|
+
var $;
|
|
2398
|
+
return (($ = z.value.find(({ id: B }) => L === B)) == null ? void 0 : $.subNodes) ?? [];
|
|
2354
2399
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const L =
|
|
2400
|
+
function me() {
|
|
2401
|
+
const L = Ia(
|
|
2402
|
+
g.value,
|
|
2403
|
+
u.value,
|
|
2404
|
+
o.value
|
|
2405
|
+
);
|
|
2357
2406
|
m(L);
|
|
2358
2407
|
}
|
|
2359
|
-
return H(
|
|
2360
|
-
|
|
2408
|
+
return H(g, (L) => {
|
|
2409
|
+
l.value = Na(L.nodes, o.value), i.value = Da(L.links).reverse(), d.value == null && r.hoveredElementId != null && de(r.hoveredElementId);
|
|
2361
2410
|
}), H([c, s], () => {
|
|
2362
2411
|
d.value = c.value ?? s.value;
|
|
2363
|
-
}), H([r.containerSize,
|
|
2364
|
-
r.containerSize.width && r.containerSize.height &&
|
|
2365
|
-
}), H(
|
|
2412
|
+
}), H([r.containerSize, u], () => {
|
|
2413
|
+
r.containerSize.width && r.containerSize.height && me();
|
|
2414
|
+
}), H(
|
|
2415
|
+
() => [o.value.alignFirstNodeLabels, o.value.alignLastNodeLabels],
|
|
2416
|
+
me
|
|
2417
|
+
), H(() => r.hoveredElementId, de), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, pointedNode: c, focusedNode: s, extents: f, updateExtents: m, columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x, hoveredElement: d, highlightedElements: p, formatValue: y, isBlockExpansionTrigger: k, hoveredNodeIds: T, lastNodeLayer: N, nodeColumnPositions: A, nodeHeaders: D, computedNodeHeaderPadding: C, gradients: M, nodesDerivingColorFromIncomingLinks: z, getLinkStroke: ee, isNodeFaded: ce, isNodeFocused: ae, isLinkFaded: oe, isLinkFocused: le, isLabelBeforeNode: E, shouldDeriveNodeColorFromIncomingLinks: w, toggleExpansion: P, handleNodeClick: te, handleNodeKeydown: $e, handleNodeBlockClick: we, handleLinkMouseover: De, handleLinkMouseleave: pe, handleExternalHover: de, getSubNodesDerivingColorFromIncomingLinks: xe, updateMargins: me, LumeAlluvialNodeLabel: da, LumeAlluvialNodeValue: _a, LumeAlluvialNodeHeader: ka, GHOST_STROKE_WIDTH_OFFSET: ra, NODE_OUTLINE_PADDING: oa, NODE_OUTLINE_RADIUS: la };
|
|
2366
2418
|
}
|
|
2367
2419
|
});
|
|
2368
|
-
var
|
|
2420
|
+
var eo = function() {
|
|
2369
2421
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2370
|
-
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a,
|
|
2371
|
-
return [e._t(`node-header-${
|
|
2372
|
-
return [r(n.LumeAlluvialNodeHeader, { key: `header_${a.x}`, attrs: { x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")])];
|
|
2373
|
-
}, { x: a.x, y: -n.computedNodeHeaderPadding })];
|
|
2374
|
-
})], 2) : e._e(), r("g", { staticClass: "lume-alluvial-link-group", on: { mouseleave: n.handleLinkMouseleave } }, [n.options.gradient ? r("defs", e._l(n.gradients, function(a,
|
|
2375
|
-
return r("linearGradient", { key:
|
|
2422
|
+
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
|
|
2423
|
+
return [e._t(`node-header-${o}`, function() {
|
|
2424
|
+
return [r(n.LumeAlluvialNodeHeader, { key: `header_${a.x}`, attrs: { align: a.align, x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")])];
|
|
2425
|
+
}, { align: a.align, x: a.x, y: -n.computedNodeHeaderPadding })];
|
|
2426
|
+
})], 2) : e._e(), r("g", { staticClass: "lume-alluvial-link-group", on: { mouseleave: n.handleLinkMouseleave } }, [n.options.gradient ? r("defs", e._l(n.gradients, function(a, o) {
|
|
2427
|
+
return r("linearGradient", { key: o, attrs: { id: `${n.chartID}_${o}`, gradientUnits: "userSpaceOnUse", x1: a.x1, x2: a.x2 } }, [r("stop", { attrs: { offset: "0%", "stop-color": `var(--lume-color--${a.source})` } }), r("stop", { attrs: { offset: "100%", "stop-color": `var(--lume-color--${a.target})` } })], 1);
|
|
2376
2428
|
}), 1) : e._e(), e._l(n.linkPaths, function(a) {
|
|
2377
2429
|
return r("path", { key: `link-ghost_${a.id}`, staticClass: "lume-alluvial-group__link", class: [
|
|
2378
2430
|
"lume-stroke--transparent",
|
|
2379
2431
|
"lume-alluvial-group__link--ghost"
|
|
2380
|
-
], attrs: { d: a.d, "stroke-width": a.strokeWidth + n.GHOST_STROKE_WIDTH_OFFSET, "data-j-alluvial-ghost": "" }, on: { click: function(
|
|
2381
|
-
return n.emit("link-click", { link: a.link, event:
|
|
2382
|
-
}, mouseover: function(
|
|
2383
|
-
return n.handleLinkMouseover(a.link,
|
|
2432
|
+
], attrs: { d: a.d, "stroke-width": a.strokeWidth + n.GHOST_STROKE_WIDTH_OFFSET, "data-j-alluvial-ghost": "" }, on: { click: function(o) {
|
|
2433
|
+
return n.emit("link-click", { link: a.link, event: o });
|
|
2434
|
+
}, mouseover: function(o) {
|
|
2435
|
+
return n.handleLinkMouseover(a.link, o);
|
|
2384
2436
|
} } });
|
|
2385
2437
|
}), e._l(n.linkPaths, function(a) {
|
|
2386
2438
|
return r("path", { key: `link_${a.id}`, staticClass: "lume-alluvial-group__link", class: {
|
|
2387
2439
|
[`lume-stroke--${a.color}`]: !n.options.gradient && a.color,
|
|
2388
2440
|
"lume-alluvial-group__link--faded": n.isLinkFaded(a.id),
|
|
2389
2441
|
"lume-alluvial-group__link--focused": n.isLinkFocused(a.id)
|
|
2390
|
-
}, attrs: { d: a.d, stroke: n.getLinkStroke(a.link), "stroke-dasharray": e.containerSize.width, "stroke-dashoffset": e.containerSize.width, "stroke-width": a.strokeWidth, "data-j-alluvial-path": "", "data-id": a.id }, on: { click: function(
|
|
2391
|
-
return n.emit("link-click", { link: a.link, event:
|
|
2392
|
-
}, mouseover: function(
|
|
2393
|
-
return n.handleLinkMouseover(a.link,
|
|
2442
|
+
}, attrs: { d: a.d, stroke: n.getLinkStroke(a.link), "stroke-dasharray": e.containerSize.width, "stroke-dashoffset": e.containerSize.width, "stroke-width": a.strokeWidth, "data-j-alluvial-path": "", "data-id": a.id }, on: { click: function(o) {
|
|
2443
|
+
return n.emit("link-click", { link: a.link, event: o });
|
|
2444
|
+
}, mouseover: function(o) {
|
|
2445
|
+
return n.handleLinkMouseover(a.link, o);
|
|
2394
2446
|
} } });
|
|
2395
|
-
})], 2), e._l(n.nodeBlocks, function(a,
|
|
2396
|
-
return r("g", { key: `node-block_${
|
|
2447
|
+
})], 2), e._l(n.nodeBlocks, function(a, o) {
|
|
2448
|
+
return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
|
|
2397
2449
|
"lume-alluvial-group__node--expandable": n.isExpandableNode(
|
|
2398
2450
|
a.node.id
|
|
2399
2451
|
),
|
|
2452
|
+
"lume-alluvial-group__node--expandable-block": n.isExpandableNode(a.node.id) && n.isBlockExpansionTrigger,
|
|
2400
2453
|
"lume-alluvial-group__node--faded": n.isNodeFaded(a.node.id),
|
|
2401
2454
|
"lume-alluvial-group__node--focused": n.isNodeFocused(a.node.id)
|
|
2402
|
-
}, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { attrs: { tabindex: n.isExpandableNode(a.node.id) ? "0" : null }, on: { click: function(
|
|
2403
|
-
return n.handleNodeClick(a.node,
|
|
2404
|
-
}, keydown: [function(
|
|
2405
|
-
return !
|
|
2406
|
-
}, function(
|
|
2407
|
-
return !
|
|
2408
|
-
}], mouseenter: function(
|
|
2409
|
-
return n.emit("node-mouseenter", { node: a.node, event:
|
|
2410
|
-
}, mouseleave: function(
|
|
2411
|
-
return n.emit("node-mouseleave", { node: a.node, event:
|
|
2412
|
-
}, mouseover: function(
|
|
2455
|
+
}, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { attrs: { tabindex: n.isExpandableNode(a.node.id) ? "0" : null }, on: { click: function(l) {
|
|
2456
|
+
return n.handleNodeClick(a.node, l);
|
|
2457
|
+
}, keydown: [function(l) {
|
|
2458
|
+
return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : (l.preventDefault(), n.handleNodeKeydown(a.node, l));
|
|
2459
|
+
}, function(l) {
|
|
2460
|
+
return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : (l.preventDefault(), n.handleNodeKeydown(a.node, l));
|
|
2461
|
+
}], mouseenter: function(l) {
|
|
2462
|
+
return n.emit("node-mouseenter", { node: a.node, event: l });
|
|
2463
|
+
}, mouseleave: function(l) {
|
|
2464
|
+
return n.emit("node-mouseleave", { node: a.node, event: l });
|
|
2465
|
+
}, mouseover: function(l) {
|
|
2413
2466
|
n.pointedNode = a.node;
|
|
2414
|
-
}, mouseout: function(
|
|
2467
|
+
}, mouseout: function(l) {
|
|
2415
2468
|
n.pointedNode = null;
|
|
2416
|
-
}, focus: function(
|
|
2469
|
+
}, focus: function(l) {
|
|
2417
2470
|
n.focusedNode = a.node;
|
|
2418
|
-
}, blur: function(
|
|
2471
|
+
}, blur: function(l) {
|
|
2419
2472
|
n.focusedNode = null;
|
|
2420
2473
|
} } }, [n.shouldDeriveNodeColorFromIncomingLinks(a) ? e._l(n.getSubNodesDerivingColorFromIncomingLinks(
|
|
2421
2474
|
a.node.id
|
|
2422
|
-
), function(
|
|
2423
|
-
return r("rect", e._b({ key:
|
|
2424
|
-
|
|
2425
|
-
"
|
|
2475
|
+
), function(l) {
|
|
2476
|
+
return r("rect", e._b({ key: l.key, attrs: { "data-j-alluvial-sub-nodes": "" }, on: { click: function(i) {
|
|
2477
|
+
return n.handleNodeBlockClick(a.node);
|
|
2478
|
+
} } }, "rect", l, !1));
|
|
2479
|
+
}) : r("rect", { staticClass: "lume-alluvial-group__node-block", class: `lume-fill--${a.node.color || a.node.fallbackColor}`, attrs: { x: a.x, y: a.y, height: a.height, width: a.width }, on: { click: function(l) {
|
|
2480
|
+
return n.handleNodeBlockClick(a.node);
|
|
2481
|
+
} } }), n.isExpandableNode(a.node.id) ? r("rect", { staticClass: "lume-alluvial-group__node-outline", class: `lume-stroke--${a.node.color || a.node.fallbackColor}`, attrs: { x: a.x - n.NODE_OUTLINE_PADDING, y: a.y - n.NODE_OUTLINE_PADDING, height: a.height + n.NODE_OUTLINE_PADDING * 2, width: a.width + n.NODE_OUTLINE_PADDING * 2, rx: n.NODE_OUTLINE_RADIUS, "data-j-alluvial-node-outline": "" }, on: { click: function(l) {
|
|
2482
|
+
return n.handleNodeBlockClick(a.node);
|
|
2483
|
+
} } }) : e._e(), r("g", { ref: "nodeTextRefs", refInFor: !0, staticClass: "lume-alluvial-group__node-text lume-typography--caption", class: {
|
|
2484
|
+
"lume-alluvial-group__node-text--left": n.isLabelBeforeNode(
|
|
2485
|
+
a.node
|
|
2486
|
+
)
|
|
2426
2487
|
}, attrs: { transform: `translate(${a.textTransform.x},${a.textTransform.y})`, "data-id": a.node.id, width: n.options.nodeLabelMaxWidth } }, [e._t(`node-text-${a.node.id}`, function() {
|
|
2427
|
-
return [r(n.LumeAlluvialNodeLabel, { attrs: { bottom: n.options.switchText, left: a.node
|
|
2488
|
+
return [r(n.LumeAlluvialNodeLabel, { attrs: { bottom: n.options.switchText, left: n.isLabelBeforeNode(a.node), "max-width": n.options.nodeLabelMaxWidth }, on: { "lume__internal--node-resize": n.updateMargins } }, [e._v(" " + e._s(a.node.label) + " ")]), r(n.LumeAlluvialNodeValue, { attrs: { bottom: !n.options.switchText } }, [e._v(" " + e._s(n.formatValue(a.node.transitionValue || a.node.value, a.node.value)) + " ")])];
|
|
2428
2489
|
}, { node: a.node, value: n.formatValue(
|
|
2429
2490
|
a.node.transitionValue || a.node.value,
|
|
2430
2491
|
a.node.value
|
|
2431
2492
|
) })], 2)], 2)]);
|
|
2432
2493
|
})], 2);
|
|
2433
|
-
},
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2494
|
+
}, to = [], no = /* @__PURE__ */ S(
|
|
2495
|
+
qa,
|
|
2496
|
+
eo,
|
|
2497
|
+
to,
|
|
2437
2498
|
!1,
|
|
2438
2499
|
null,
|
|
2439
|
-
"
|
|
2500
|
+
"0f56c6f5"
|
|
2440
2501
|
);
|
|
2441
|
-
const
|
|
2502
|
+
const ro = no.exports, ao = {
|
|
2442
2503
|
margins: {
|
|
2443
2504
|
top: 0,
|
|
2444
2505
|
right: 0,
|
|
@@ -2450,340 +2511,343 @@ const qa = Qa.exports, eo = {
|
|
|
2450
2511
|
withHover: !1,
|
|
2451
2512
|
withLegend: !1,
|
|
2452
2513
|
// Alluvial options
|
|
2514
|
+
alignFirstNodeLabels: "left",
|
|
2515
|
+
alignLastNodeLabels: "right",
|
|
2453
2516
|
gradient: !1,
|
|
2454
2517
|
highlightedElements: "closest",
|
|
2455
2518
|
nodePadding: 16,
|
|
2456
2519
|
nodeWidth: 16,
|
|
2457
|
-
nodeAlign:
|
|
2520
|
+
nodeAlign: qt,
|
|
2521
|
+
nodeExpansionTrigger: "node",
|
|
2458
2522
|
valueFormat: (t) => String(t),
|
|
2459
2523
|
iterations: 6
|
|
2460
|
-
},
|
|
2524
|
+
}, oo = /* @__PURE__ */ R({
|
|
2461
2525
|
__name: "lume-alluvial-diagram",
|
|
2462
2526
|
props: {
|
|
2463
|
-
...
|
|
2527
|
+
...or(Ke)
|
|
2464
2528
|
},
|
|
2465
2529
|
setup(t, { emit: e }) {
|
|
2466
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2467
|
-
function
|
|
2530
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), o = xn(X()), { options: l } = V(r), { allOptions: i } = Q(l, ao);
|
|
2531
|
+
function u(c) {
|
|
2468
2532
|
return {
|
|
2469
2533
|
...c,
|
|
2470
2534
|
noBaseScales: !0
|
|
2471
2535
|
// Alluvial chart never uses base scales
|
|
2472
2536
|
};
|
|
2473
2537
|
}
|
|
2474
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots:
|
|
2538
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: fe, LumeAlluvialGroup: ro };
|
|
2475
2539
|
}
|
|
2476
2540
|
});
|
|
2477
|
-
var
|
|
2541
|
+
var lo = function() {
|
|
2478
2542
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2479
2543
|
return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2480
|
-
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(
|
|
2481
|
-
return { key:
|
|
2482
|
-
return [e._t(
|
|
2544
|
+
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
2545
|
+
return { key: l, fn: function(i) {
|
|
2546
|
+
return [e._t(l, null, null, i || {})];
|
|
2483
2547
|
} };
|
|
2484
2548
|
})], null, !0) }, "lume-alluvial-group", a, !1), n.componentEventPropagator))];
|
|
2485
|
-
} }, e._l(n.slots, function(a,
|
|
2486
|
-
return { key:
|
|
2487
|
-
return [e._t(
|
|
2549
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2550
|
+
return { key: o, fn: function(l) {
|
|
2551
|
+
return [e._t(o, null, null, l || {})];
|
|
2488
2552
|
} };
|
|
2489
2553
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2490
|
-
},
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2554
|
+
}, uo = [], io = /* @__PURE__ */ S(
|
|
2555
|
+
oo,
|
|
2556
|
+
lo,
|
|
2557
|
+
uo,
|
|
2494
2558
|
!1,
|
|
2495
2559
|
null,
|
|
2496
2560
|
null
|
|
2497
2561
|
);
|
|
2498
|
-
const
|
|
2499
|
-
var
|
|
2500
|
-
const
|
|
2562
|
+
const xl = io.exports;
|
|
2563
|
+
var Ye = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ye || {});
|
|
2564
|
+
const so = /* @__PURE__ */ R({
|
|
2501
2565
|
__name: "lume-bar-chart",
|
|
2502
2566
|
props: {
|
|
2503
|
-
...
|
|
2567
|
+
...ve(),
|
|
2504
2568
|
type: {
|
|
2505
2569
|
type: String,
|
|
2506
2570
|
default: null,
|
|
2507
|
-
validator: (t) => t in
|
|
2571
|
+
validator: (t) => t in Ye || t == null
|
|
2508
2572
|
}
|
|
2509
2573
|
},
|
|
2510
2574
|
setup(t, { emit: e }) {
|
|
2511
|
-
const r = t, n =
|
|
2512
|
-
() => import("./
|
|
2513
|
-
), a =
|
|
2514
|
-
() => import("./
|
|
2515
|
-
),
|
|
2516
|
-
() => import("./
|
|
2517
|
-
),
|
|
2575
|
+
const r = t, n = Re(
|
|
2576
|
+
() => import("./asrcm8__.js")
|
|
2577
|
+
), a = Re(
|
|
2578
|
+
() => import("./BSSy21i7.js")
|
|
2579
|
+
), o = Re(
|
|
2580
|
+
() => import("./es6xM4zX.js")
|
|
2581
|
+
), l = /* @__PURE__ */ new Map([
|
|
2518
2582
|
["single", n],
|
|
2519
2583
|
["grouped", a],
|
|
2520
|
-
["stacked",
|
|
2521
|
-
]), { componentEventPropagator: i } = q(e),
|
|
2522
|
-
function c(
|
|
2584
|
+
["stacked", o]
|
|
2585
|
+
]), { componentEventPropagator: i } = q(e), u = se(X());
|
|
2586
|
+
function c(f) {
|
|
2523
2587
|
return {
|
|
2524
|
-
...
|
|
2588
|
+
...f,
|
|
2525
2589
|
startOnZero: !0,
|
|
2526
2590
|
// Bar chart always starts on zero,
|
|
2527
2591
|
tooltipOptions: {
|
|
2528
|
-
...(
|
|
2592
|
+
...(f == null ? void 0 : f.tooltipOptions) || {},
|
|
2529
2593
|
position: r.orientation === O.HORIZONTAL ? "right" : void 0
|
|
2530
2594
|
}
|
|
2531
2595
|
};
|
|
2532
2596
|
}
|
|
2533
|
-
const s =
|
|
2534
|
-
if (
|
|
2597
|
+
const s = v(() => {
|
|
2598
|
+
if (Ke(r.data)) return l.get("single");
|
|
2535
2599
|
if (!r.type)
|
|
2536
2600
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2537
|
-
return
|
|
2601
|
+
return l.get(r.type);
|
|
2538
2602
|
});
|
|
2539
|
-
return { __sfc: !0, TYPES:
|
|
2603
|
+
return { __sfc: !0, TYPES: Ye, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: s };
|
|
2540
2604
|
}
|
|
2541
2605
|
});
|
|
2542
|
-
var
|
|
2606
|
+
var co = function() {
|
|
2543
2607
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2544
|
-
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a,
|
|
2545
|
-
return { key:
|
|
2546
|
-
return [e._t(
|
|
2608
|
+
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2609
|
+
return { key: o, fn: function(l) {
|
|
2610
|
+
return [e._t(o, null, null, l || {})];
|
|
2547
2611
|
} };
|
|
2548
2612
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2549
|
-
},
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2613
|
+
}, vo = [], fo = /* @__PURE__ */ S(
|
|
2614
|
+
so,
|
|
2615
|
+
co,
|
|
2616
|
+
vo,
|
|
2553
2617
|
!1,
|
|
2554
2618
|
null,
|
|
2555
2619
|
null
|
|
2556
2620
|
);
|
|
2557
|
-
const
|
|
2558
|
-
function
|
|
2559
|
-
return Object.values(
|
|
2621
|
+
const Ll = fo.exports;
|
|
2622
|
+
function po(t) {
|
|
2623
|
+
return Object.values(On).includes(t) || t == null;
|
|
2560
2624
|
}
|
|
2561
|
-
function
|
|
2625
|
+
function mo(t) {
|
|
2562
2626
|
return Object.values(O).includes(t);
|
|
2563
2627
|
}
|
|
2564
|
-
const
|
|
2628
|
+
const _o = (t = !1) => ({
|
|
2565
2629
|
type: {
|
|
2566
2630
|
type: String,
|
|
2567
2631
|
default: null,
|
|
2568
|
-
validator:
|
|
2632
|
+
validator: po
|
|
2569
2633
|
},
|
|
2570
2634
|
...t ? {
|
|
2571
2635
|
orientation: {
|
|
2572
2636
|
type: String,
|
|
2573
2637
|
default: O.VERTICAL,
|
|
2574
|
-
validator:
|
|
2638
|
+
validator: mo
|
|
2575
2639
|
}
|
|
2576
2640
|
} : {}
|
|
2577
2641
|
});
|
|
2578
|
-
function
|
|
2579
|
-
const r =
|
|
2580
|
-
var
|
|
2642
|
+
function Zt(t, e) {
|
|
2643
|
+
const r = v(() => t.value.map((a) => {
|
|
2644
|
+
var o;
|
|
2581
2645
|
return {
|
|
2582
2646
|
...a,
|
|
2583
|
-
values:
|
|
2647
|
+
values: Je(
|
|
2584
2648
|
a.values,
|
|
2585
|
-
((
|
|
2586
|
-
).map((
|
|
2587
|
-
...
|
|
2588
|
-
value: (
|
|
2649
|
+
((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) ?? 0
|
|
2650
|
+
).map((l) => ({
|
|
2651
|
+
...l,
|
|
2652
|
+
value: (l == null ? void 0 : l.value) || 0
|
|
2589
2653
|
}))
|
|
2590
2654
|
};
|
|
2591
|
-
})), n =
|
|
2655
|
+
})), n = v(() => {
|
|
2592
2656
|
var a;
|
|
2593
|
-
return (a = r.value) == null ? void 0 : a.reduce((
|
|
2594
|
-
u
|
|
2595
|
-
}),
|
|
2657
|
+
return (a = r.value) == null ? void 0 : a.reduce((o, l) => (l.values.forEach((i, u) => {
|
|
2658
|
+
o[u] ? o[u].push(i) : o[u] = [i];
|
|
2659
|
+
}), o), []);
|
|
2596
2660
|
});
|
|
2597
2661
|
return { multiBarData: r, groupedData: n };
|
|
2598
2662
|
}
|
|
2599
|
-
function
|
|
2663
|
+
function go(t, e) {
|
|
2600
2664
|
return t.value.length === 1 ? "single" : e.value;
|
|
2601
2665
|
}
|
|
2602
|
-
function
|
|
2603
|
-
const n =
|
|
2666
|
+
function ho(t, e, r) {
|
|
2667
|
+
const n = v(
|
|
2604
2668
|
() => r.value === O.HORIZONTAL
|
|
2605
2669
|
);
|
|
2606
2670
|
function a(i) {
|
|
2607
|
-
i ||
|
|
2671
|
+
i || Ue(Ae.BarScaleNull), Math.min(...i.domain()) > 0 && Ue(Ae.BarScaleDomainAbove0);
|
|
2608
2672
|
}
|
|
2609
|
-
const
|
|
2610
|
-
return { barXScale:
|
|
2673
|
+
const o = v(() => n.value ? (a(t.value), t.value) : t.value), l = v(() => n.value ? e.value : (a(e.value), e.value));
|
|
2674
|
+
return { barXScale: o, barYScale: l };
|
|
2611
2675
|
}
|
|
2612
|
-
const
|
|
2676
|
+
const yo = {
|
|
2613
2677
|
x: 0,
|
|
2614
2678
|
y: 0,
|
|
2615
2679
|
width: 0,
|
|
2616
2680
|
height: 0
|
|
2617
2681
|
};
|
|
2618
|
-
function
|
|
2619
|
-
const
|
|
2682
|
+
function bo(t, e, r, n, a, o) {
|
|
2683
|
+
const l = v(
|
|
2620
2684
|
() => n.value === O.HORIZONTAL
|
|
2621
2685
|
);
|
|
2622
|
-
function i(
|
|
2623
|
-
let
|
|
2624
|
-
return
|
|
2686
|
+
function i(f, m) {
|
|
2687
|
+
let h, g;
|
|
2688
|
+
return l.value ? (h = f >= 0 ? e.value(0) : e.value(f), g = r.value(r.value.domain()[m])) : (h = e.value(e.value.domain()[m]), g = f < 0 ? r.value(0) : r.value(f)), { x: h, y: g };
|
|
2625
2689
|
}
|
|
2626
|
-
function
|
|
2627
|
-
return
|
|
2690
|
+
function u(f) {
|
|
2691
|
+
return l.value ? f < 0 ? e.value(0) - e.value(f) : e.value(f) - e.value(0) : e.value.bandwidth();
|
|
2628
2692
|
}
|
|
2629
|
-
function c(
|
|
2630
|
-
return
|
|
2693
|
+
function c(f) {
|
|
2694
|
+
return l.value ? r.value.bandwidth() : f < 0 ? r.value(f) - r.value(0) : r.value(0) - r.value(f);
|
|
2631
2695
|
}
|
|
2632
|
-
function s(
|
|
2633
|
-
if (!(e.value && r.value)) return
|
|
2634
|
-
const { value: _, color: x } =
|
|
2696
|
+
function s(f, m, h) {
|
|
2697
|
+
if (!(e.value && r.value)) return yo;
|
|
2698
|
+
const { value: _, color: x } = f, d = x ?? t.value[m].color ?? ke, { x: p, y } = i(_, h), k = u(_), T = c(_);
|
|
2635
2699
|
return {
|
|
2636
|
-
classList: [`lume-fill--${d}`, ...
|
|
2700
|
+
classList: [`lume-fill--${d}`, ...o],
|
|
2637
2701
|
x: p,
|
|
2638
2702
|
y,
|
|
2639
|
-
width:
|
|
2640
|
-
height:
|
|
2641
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2703
|
+
width: k,
|
|
2704
|
+
height: T,
|
|
2705
|
+
isFaded: a.value !== -1 && a.value !== h,
|
|
2642
2706
|
isNegative: _ < 0
|
|
2643
2707
|
};
|
|
2644
2708
|
}
|
|
2645
2709
|
return { barAttributeGenerator: s };
|
|
2646
2710
|
}
|
|
2647
|
-
const
|
|
2711
|
+
const ko = {
|
|
2648
2712
|
x: 0,
|
|
2649
2713
|
y: 0,
|
|
2650
2714
|
width: 0,
|
|
2651
2715
|
height: 0
|
|
2652
2716
|
};
|
|
2653
|
-
function
|
|
2654
|
-
const
|
|
2717
|
+
function xo(t, e, r, n, a, o) {
|
|
2718
|
+
const l = v(
|
|
2655
2719
|
() => n.value === O.HORIZONTAL
|
|
2656
|
-
), i =
|
|
2657
|
-
function c(
|
|
2658
|
-
if (
|
|
2659
|
-
return
|
|
2720
|
+
), i = v(() => he().domain(t.value.map((g, _) => _)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => he().domain(t.value.map((g, _) => _)).range([0, r.value.bandwidth()]).padding(0));
|
|
2721
|
+
function c(g, _, x) {
|
|
2722
|
+
if (l.value)
|
|
2723
|
+
return g >= 0 ? e.value(0) : e.value(g);
|
|
2660
2724
|
const d = e.value.domain();
|
|
2661
2725
|
return e.value(d[_]) + i.value(x);
|
|
2662
2726
|
}
|
|
2663
|
-
function s(
|
|
2664
|
-
if (
|
|
2727
|
+
function s(g, _, x) {
|
|
2728
|
+
if (l.value) {
|
|
2665
2729
|
const d = r.value.domain();
|
|
2666
|
-
return r.value(d[_]) +
|
|
2730
|
+
return r.value(d[_]) + u.value(x);
|
|
2667
2731
|
}
|
|
2668
|
-
return
|
|
2732
|
+
return g < 0 ? r.value(0) : r.value(g);
|
|
2669
2733
|
}
|
|
2670
|
-
function
|
|
2671
|
-
return
|
|
2734
|
+
function f(g) {
|
|
2735
|
+
return l.value ? g < 0 ? e.value(0) - e.value(g) : e.value(g) - e.value(0) : i.value.bandwidth();
|
|
2672
2736
|
}
|
|
2673
|
-
function m(
|
|
2674
|
-
return
|
|
2737
|
+
function m(g) {
|
|
2738
|
+
return l.value ? u.value.bandwidth() : g < 0 ? r.value(g) - r.value(0) : r.value(0) - r.value(g);
|
|
2675
2739
|
}
|
|
2676
|
-
function g
|
|
2677
|
-
if (!(e.value && r.value)) return
|
|
2678
|
-
const { value: p, color: y } =
|
|
2740
|
+
function h(g, _, x) {
|
|
2741
|
+
if (!(e.value && r.value)) return ko;
|
|
2742
|
+
const { value: p, color: y } = g, k = y ?? t.value[_].color ?? Object.values(Y)[_], T = c(p, x, _), N = s(p, x, _), A = f(p), D = m(p);
|
|
2679
2743
|
return {
|
|
2680
|
-
classList: [`lume-fill--${
|
|
2681
|
-
x:
|
|
2682
|
-
y:
|
|
2683
|
-
width:
|
|
2684
|
-
height:
|
|
2744
|
+
classList: [`lume-fill--${k}`, ...o],
|
|
2745
|
+
x: T,
|
|
2746
|
+
y: N,
|
|
2747
|
+
width: A,
|
|
2748
|
+
height: D,
|
|
2685
2749
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2686
2750
|
isNegative: p < 0
|
|
2687
2751
|
};
|
|
2688
2752
|
}
|
|
2689
|
-
return { barAttributeGenerator:
|
|
2753
|
+
return { barAttributeGenerator: h };
|
|
2690
2754
|
}
|
|
2691
|
-
function
|
|
2692
|
-
const n =
|
|
2755
|
+
function Lo(t, e, r) {
|
|
2756
|
+
const n = v(
|
|
2693
2757
|
() => e.value === O.HORIZONTAL
|
|
2694
|
-
), a =
|
|
2695
|
-
const
|
|
2696
|
-
(c) => c.filter((s) => s.value < 0).reduce((s,
|
|
2758
|
+
), a = v(() => {
|
|
2759
|
+
const u = t.value.map(
|
|
2760
|
+
(c) => c.filter((s) => s.value < 0).reduce((s, f) => s + f.value, 0)
|
|
2697
2761
|
);
|
|
2698
|
-
return Math.min(...
|
|
2699
|
-
}),
|
|
2700
|
-
const
|
|
2762
|
+
return Math.min(...u);
|
|
2763
|
+
}), o = v(() => {
|
|
2764
|
+
const u = t.value.map(
|
|
2701
2765
|
(c) => c.reduce(
|
|
2702
|
-
(s,
|
|
2766
|
+
(s, f) => f.value >= 0 ? s + f.value : s,
|
|
2703
2767
|
0
|
|
2704
2768
|
)
|
|
2705
2769
|
);
|
|
2706
|
-
return Math.max(...
|
|
2770
|
+
return Math.max(...u);
|
|
2707
2771
|
});
|
|
2708
|
-
function
|
|
2709
|
-
return c.length ? n.value ? ge().domain([a.value,
|
|
2710
|
-
|
|
2711
|
-
|
|
2772
|
+
function l(u, c, s) {
|
|
2773
|
+
return c.length ? n.value ? ge().domain([a.value, o.value]).range([0, s.width]) : Object.assign(
|
|
2774
|
+
mt(
|
|
2775
|
+
he().domain(c.map((f, m) => m)).range([0, s.width]),
|
|
2712
2776
|
e.value,
|
|
2713
2777
|
r.value
|
|
2714
2778
|
),
|
|
2715
2779
|
{ labels: c }
|
|
2716
2780
|
) : null;
|
|
2717
2781
|
}
|
|
2718
|
-
function i(
|
|
2782
|
+
function i(u, c, s) {
|
|
2719
2783
|
return c.length ? n.value ? Object.assign(
|
|
2720
|
-
|
|
2721
|
-
|
|
2784
|
+
mt(
|
|
2785
|
+
he().domain(c.map((f, m) => m)).range([0, s.height]),
|
|
2722
2786
|
e.value,
|
|
2723
2787
|
r.value
|
|
2724
2788
|
),
|
|
2725
2789
|
{ labels: c }
|
|
2726
|
-
) : ge().domain([
|
|
2790
|
+
) : ge().domain([o.value, a.value]).range([0, s.height]) : null;
|
|
2727
2791
|
}
|
|
2728
|
-
return { stackedXScaleGenerator:
|
|
2792
|
+
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2729
2793
|
}
|
|
2730
|
-
function
|
|
2731
|
-
const
|
|
2794
|
+
function To(t, e, r, n, a, o) {
|
|
2795
|
+
const l = v(
|
|
2732
2796
|
() => n.value === O.HORIZONTAL
|
|
2733
|
-
), i =
|
|
2734
|
-
() =>
|
|
2735
|
-
),
|
|
2797
|
+
), i = v(
|
|
2798
|
+
() => l.value ? r.value.domain() : e.value.domain()
|
|
2799
|
+
), u = v(
|
|
2736
2800
|
() => t.value.map((d) => d.values.map((p) => p == null ? void 0 : p.value))
|
|
2737
2801
|
);
|
|
2738
2802
|
function c(d, p, y) {
|
|
2739
|
-
let
|
|
2740
|
-
return
|
|
2803
|
+
let k, T;
|
|
2804
|
+
return l.value ? (k = e.value(d >= 0 ? 0 + y : d + y), T = r.value(i.value[p])) : (k = e.value(i.value[p]), T = r.value(d >= 0 ? d + y : 0 + y)), { x: k, y: T };
|
|
2741
2805
|
}
|
|
2742
2806
|
function s(d) {
|
|
2743
|
-
return
|
|
2807
|
+
return l.value ? e.value(d) - e.value(0) : e.value.bandwidth();
|
|
2744
2808
|
}
|
|
2745
|
-
function
|
|
2746
|
-
return
|
|
2809
|
+
function f(d) {
|
|
2810
|
+
return l.value ? e.value(0) - e.value(d) : e.value.bandwidth();
|
|
2747
2811
|
}
|
|
2748
2812
|
function m(d) {
|
|
2749
|
-
return
|
|
2813
|
+
return l.value ? r.value.bandwidth() : r.value(0) - r.value(d);
|
|
2750
2814
|
}
|
|
2751
|
-
function
|
|
2752
|
-
return
|
|
2815
|
+
function h(d) {
|
|
2816
|
+
return l.value ? r.value.bandwidth() : r.value(d) - r.value(0);
|
|
2753
2817
|
}
|
|
2754
|
-
function
|
|
2755
|
-
return d ?
|
|
2818
|
+
function g(d, p) {
|
|
2819
|
+
return d ? u.value.reduce((y, k, T) => (T < d && k[p] >= 0 && (y += k[p]), y), 0) : 0;
|
|
2756
2820
|
}
|
|
2757
2821
|
function _(d, p) {
|
|
2758
|
-
return d ?
|
|
2822
|
+
return d ? u.value.reduce((y, k, T) => (T < d && k[p] < 0 && (y += k[p]), y), 0) : 0;
|
|
2759
2823
|
}
|
|
2760
2824
|
function x(d, p, y) {
|
|
2761
|
-
const { value:
|
|
2825
|
+
const { value: k, color: T } = d, N = k >= 0 ? s(k) : f(k), A = k >= 0 ? m(k) : h(k), D = k >= 0 ? g(p, y) : _(p, y), { x: C, y: M } = c(k, y, D);
|
|
2762
2826
|
return {
|
|
2763
|
-
classList: [`lume-fill--${
|
|
2764
|
-
width:
|
|
2765
|
-
height:
|
|
2766
|
-
x:
|
|
2767
|
-
y:
|
|
2827
|
+
classList: [`lume-fill--${T ?? t.value[p].color ?? Object.values(Y)[p]}`, ...o],
|
|
2828
|
+
width: N,
|
|
2829
|
+
height: A,
|
|
2830
|
+
x: C,
|
|
2831
|
+
y: M,
|
|
2768
2832
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2769
|
-
isNegative:
|
|
2833
|
+
isNegative: k < 0
|
|
2770
2834
|
};
|
|
2771
2835
|
}
|
|
2772
2836
|
return { barAttributeGenerator: x };
|
|
2773
2837
|
}
|
|
2774
|
-
const
|
|
2775
|
-
single:
|
|
2776
|
-
grouped:
|
|
2777
|
-
stacked:
|
|
2778
|
-
},
|
|
2838
|
+
const Lt = {
|
|
2839
|
+
single: bo,
|
|
2840
|
+
grouped: xo,
|
|
2841
|
+
stacked: To
|
|
2842
|
+
}, Ao = /* @__PURE__ */ R({
|
|
2779
2843
|
__name: "lume-bar-group",
|
|
2780
2844
|
props: {
|
|
2781
|
-
...
|
|
2845
|
+
...Ee(),
|
|
2782
2846
|
classList: {
|
|
2783
2847
|
type: [String, Array],
|
|
2784
2848
|
default: () => []
|
|
2785
2849
|
},
|
|
2786
|
-
...
|
|
2850
|
+
..._o(!0),
|
|
2787
2851
|
transition: {
|
|
2788
2852
|
type: Boolean,
|
|
2789
2853
|
default: !0
|
|
@@ -2794,199 +2858,199 @@ const yt = {
|
|
|
2794
2858
|
const r = t, {
|
|
2795
2859
|
data: n,
|
|
2796
2860
|
hoveredIndex: a,
|
|
2797
|
-
orientation:
|
|
2798
|
-
transition:
|
|
2861
|
+
orientation: o,
|
|
2862
|
+
transition: l,
|
|
2799
2863
|
type: i,
|
|
2800
|
-
xScale:
|
|
2864
|
+
xScale: u,
|
|
2801
2865
|
yScale: c,
|
|
2802
2866
|
classList: s,
|
|
2803
|
-
labels:
|
|
2804
|
-
} =
|
|
2805
|
-
const
|
|
2867
|
+
labels: f
|
|
2868
|
+
} = V(r), m = Oe("chartID"), { emitInternalEvent: h } = q(e, m), { groupedData: g } = Zt(n, f), { barXScale: _, barYScale: x } = ho(u, c, o), d = v(() => typeof s.value == "string" ? [s.value] : s.value), p = v(() => {
|
|
2869
|
+
const T = go(n, i), { barAttributeGenerator: N } = Lt[T](
|
|
2806
2870
|
n,
|
|
2807
2871
|
_,
|
|
2808
2872
|
x,
|
|
2809
|
-
|
|
2873
|
+
o,
|
|
2810
2874
|
a,
|
|
2811
2875
|
d.value
|
|
2812
2876
|
);
|
|
2813
|
-
return
|
|
2814
|
-
}), y =
|
|
2815
|
-
if (
|
|
2816
|
-
return
|
|
2877
|
+
return N;
|
|
2878
|
+
}), y = v(() => {
|
|
2879
|
+
if (l.value)
|
|
2880
|
+
return o.value === O.HORIZONTAL ? "width" : "height";
|
|
2817
2881
|
});
|
|
2818
|
-
async function
|
|
2819
|
-
e("lume__internal--hover",
|
|
2882
|
+
async function k(T) {
|
|
2883
|
+
e("lume__internal--hover", T), h("lume__internal--hover", T);
|
|
2820
2884
|
}
|
|
2821
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2885
|
+
return { __sfc: !0, MIXIN_MAP: Lt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: s, labels: f, chartID: m, emitInternalEvent: h, groupedData: g, barXScale: _, barYScale: x, computedClasses: d, getBarAttributes: p, computedTransition: y, handleInternalHover: k, LumeBar: Qe };
|
|
2822
2886
|
}
|
|
2823
2887
|
});
|
|
2824
|
-
var
|
|
2888
|
+
var Oo = function() {
|
|
2825
2889
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2826
|
-
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a,
|
|
2827
|
-
return r("g", { key:
|
|
2828
|
-
return n.handleInternalHover(
|
|
2829
|
-
} } }, e._l(a, function(
|
|
2830
|
-
return r(n.LumeBar, e._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(
|
|
2890
|
+
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2891
|
+
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
2892
|
+
return n.handleInternalHover(o);
|
|
2893
|
+
} } }, e._l(a, function(l, i) {
|
|
2894
|
+
return r(n.LumeBar, e._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(u) {
|
|
2831
2895
|
return n.emit("bar-click", {
|
|
2832
|
-
index:
|
|
2896
|
+
index: o,
|
|
2833
2897
|
datasetIndex: i,
|
|
2834
|
-
event:
|
|
2898
|
+
event: u
|
|
2835
2899
|
});
|
|
2836
|
-
} } }, "lume-bar", n.getBarAttributes(
|
|
2900
|
+
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2837
2901
|
}), 1);
|
|
2838
2902
|
}), 0);
|
|
2839
|
-
},
|
|
2840
|
-
ko,
|
|
2841
|
-
xo,
|
|
2903
|
+
}, Io = [], No = /* @__PURE__ */ S(
|
|
2842
2904
|
Ao,
|
|
2905
|
+
Oo,
|
|
2906
|
+
Io,
|
|
2843
2907
|
!1,
|
|
2844
2908
|
null,
|
|
2845
2909
|
null
|
|
2846
2910
|
);
|
|
2847
|
-
const
|
|
2911
|
+
const ut = No.exports, Eo = {
|
|
2848
2912
|
[O.VERTICAL]: {
|
|
2849
2913
|
withTooltip: !0,
|
|
2850
2914
|
xAxisOptions: {},
|
|
2851
2915
|
yAxisOptions: { gridLines: !0 },
|
|
2852
|
-
margins:
|
|
2916
|
+
margins: ie.VERTICAL
|
|
2853
2917
|
},
|
|
2854
2918
|
[O.HORIZONTAL]: {
|
|
2855
2919
|
withTooltip: !0,
|
|
2856
2920
|
xAxisOptions: { gridLines: !0 },
|
|
2857
2921
|
yAxisOptions: { gridLines: !1 },
|
|
2858
|
-
margins:
|
|
2922
|
+
margins: ie.HORIZONTAL
|
|
2859
2923
|
}
|
|
2860
|
-
},
|
|
2924
|
+
}, $o = /* @__PURE__ */ R({
|
|
2861
2925
|
__name: "lume-single-bar-chart",
|
|
2862
2926
|
props: {
|
|
2863
|
-
...
|
|
2927
|
+
...ve(Ke)
|
|
2864
2928
|
},
|
|
2865
2929
|
setup(t, { emit: e }) {
|
|
2866
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2867
|
-
() =>
|
|
2930
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
|
|
2931
|
+
() => Eo[o.value || O.VERTICAL]
|
|
2868
2932
|
// needs to be computed so that default options are reactive
|
|
2869
|
-
), { allOptions:
|
|
2870
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation:
|
|
2933
|
+
), { allOptions: u } = Q(l, i);
|
|
2934
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
|
|
2871
2935
|
}
|
|
2872
2936
|
});
|
|
2873
|
-
var
|
|
2937
|
+
var wo = function() {
|
|
2874
2938
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2875
2939
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2876
2940
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
2877
|
-
} }, e._l(n.slots, function(a,
|
|
2878
|
-
return { key:
|
|
2879
|
-
return [e._t(
|
|
2941
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2942
|
+
return { key: o, fn: function(l) {
|
|
2943
|
+
return [e._t(o, null, null, l || {})];
|
|
2880
2944
|
} };
|
|
2881
2945
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2882
|
-
},
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2946
|
+
}, Do = [], Ho = /* @__PURE__ */ S(
|
|
2947
|
+
$o,
|
|
2948
|
+
wo,
|
|
2949
|
+
Do,
|
|
2886
2950
|
!1,
|
|
2887
2951
|
null,
|
|
2888
2952
|
null
|
|
2889
2953
|
);
|
|
2890
|
-
const
|
|
2954
|
+
const Tl = Ho.exports, So = {
|
|
2891
2955
|
[O.VERTICAL]: {
|
|
2892
2956
|
withTooltip: !0,
|
|
2893
2957
|
xAxisOptions: {},
|
|
2894
2958
|
yAxisOptions: { gridLines: !0 },
|
|
2895
|
-
margins:
|
|
2959
|
+
margins: ie.VERTICAL
|
|
2896
2960
|
},
|
|
2897
2961
|
[O.HORIZONTAL]: {
|
|
2898
2962
|
withTooltip: !0,
|
|
2899
2963
|
xAxisOptions: { gridLines: !0 },
|
|
2900
2964
|
yAxisOptions: { gridLines: !1 },
|
|
2901
|
-
margins:
|
|
2965
|
+
margins: ie.HORIZONTAL,
|
|
2902
2966
|
tooltipOptions: { position: "right" }
|
|
2903
2967
|
}
|
|
2904
|
-
},
|
|
2968
|
+
}, Po = /* @__PURE__ */ R({
|
|
2905
2969
|
__name: "lume-grouped-bar-chart",
|
|
2906
2970
|
props: {
|
|
2907
|
-
...
|
|
2971
|
+
...ve()
|
|
2908
2972
|
},
|
|
2909
2973
|
setup(t, { emit: e }) {
|
|
2910
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2911
|
-
() =>
|
|
2974
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { orientation: o, options: l } = V(r), i = v(
|
|
2975
|
+
() => So[o.value || O.VERTICAL]
|
|
2912
2976
|
// needs to be computed so that default options are reactive
|
|
2913
|
-
), { allOptions:
|
|
2914
|
-
|
|
2977
|
+
), { allOptions: u } = Q(
|
|
2978
|
+
l,
|
|
2915
2979
|
i
|
|
2916
2980
|
);
|
|
2917
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation:
|
|
2981
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: fe, LumeBarGroup: ut };
|
|
2918
2982
|
}
|
|
2919
2983
|
});
|
|
2920
|
-
var
|
|
2984
|
+
var Ro = function() {
|
|
2921
2985
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2922
2986
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2923
2987
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
2924
|
-
} }, e._l(n.slots, function(a,
|
|
2925
|
-
return { key:
|
|
2926
|
-
return [e._t(
|
|
2988
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2989
|
+
return { key: o, fn: function(l) {
|
|
2990
|
+
return [e._t(o, null, null, l || {})];
|
|
2927
2991
|
} };
|
|
2928
2992
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2929
|
-
},
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2993
|
+
}, Bo = [], Co = /* @__PURE__ */ S(
|
|
2994
|
+
Po,
|
|
2995
|
+
Ro,
|
|
2996
|
+
Bo,
|
|
2933
2997
|
!1,
|
|
2934
2998
|
null,
|
|
2935
2999
|
null
|
|
2936
3000
|
);
|
|
2937
|
-
const
|
|
3001
|
+
const Al = Co.exports, Fo = {
|
|
2938
3002
|
[O.VERTICAL]: {
|
|
2939
3003
|
withTooltip: !0,
|
|
2940
3004
|
xAxisOptions: {},
|
|
2941
3005
|
yAxisOptions: { gridLines: !0 },
|
|
2942
|
-
margins:
|
|
3006
|
+
margins: ie.VERTICAL,
|
|
2943
3007
|
tooltipOptions: { inverse: !0 }
|
|
2944
3008
|
},
|
|
2945
3009
|
[O.HORIZONTAL]: {
|
|
2946
3010
|
withTooltip: !0,
|
|
2947
3011
|
xAxisOptions: { gridLines: !0 },
|
|
2948
3012
|
yAxisOptions: { gridLines: !1 },
|
|
2949
|
-
margins:
|
|
3013
|
+
margins: ie.HORIZONTAL,
|
|
2950
3014
|
tooltipOptions: { position: "right" }
|
|
2951
3015
|
}
|
|
2952
|
-
},
|
|
3016
|
+
}, Go = /* @__PURE__ */ R({
|
|
2953
3017
|
__name: "lume-stacked-bar-chart",
|
|
2954
3018
|
props: {
|
|
2955
|
-
...
|
|
3019
|
+
...ve()
|
|
2956
3020
|
},
|
|
2957
3021
|
setup(t, { emit: e }) {
|
|
2958
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2959
|
-
() =>
|
|
3022
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { data: o, orientation: l, options: i, labels: u } = V(r), c = v(
|
|
3023
|
+
() => Fo[l.value || O.VERTICAL]
|
|
2960
3024
|
// needs to be computed so that default options are reactive
|
|
2961
3025
|
), { allOptions: s } = Q(
|
|
2962
3026
|
i,
|
|
2963
3027
|
c
|
|
2964
|
-
), { internalData:
|
|
3028
|
+
), { internalData: f } = rt(o), { groupedData: m } = Zt(f, u), { stackedXScaleGenerator: h, stackedYScaleGenerator: g } = Lo(
|
|
2965
3029
|
m,
|
|
2966
|
-
|
|
3030
|
+
l,
|
|
2967
3031
|
i
|
|
2968
|
-
), _ =
|
|
2969
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data:
|
|
3032
|
+
), _ = v(() => r.xScale || h), x = v(() => r.yScale || g);
|
|
3033
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: s, internalData: f, groupedData: m, stackedXScaleGenerator: h, stackedYScaleGenerator: g, xScale: _, yScale: x, LumeChart: fe, LumeBarGroup: ut };
|
|
2970
3034
|
}
|
|
2971
3035
|
});
|
|
2972
|
-
var
|
|
3036
|
+
var jo = function() {
|
|
2973
3037
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2974
3038
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2975
3039
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
2976
|
-
} }, e._l(n.slots, function(a,
|
|
2977
|
-
return { key:
|
|
2978
|
-
return [e._t(
|
|
3040
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3041
|
+
return { key: o, fn: function(l) {
|
|
3042
|
+
return [e._t(o, null, null, l || {})];
|
|
2979
3043
|
} };
|
|
2980
3044
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2981
|
-
},
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3045
|
+
}, Vo = [], Mo = /* @__PURE__ */ S(
|
|
3046
|
+
Go,
|
|
3047
|
+
jo,
|
|
3048
|
+
Vo,
|
|
2985
3049
|
!1,
|
|
2986
3050
|
null,
|
|
2987
3051
|
null
|
|
2988
3052
|
);
|
|
2989
|
-
const
|
|
3053
|
+
const Ol = Mo.exports, Tt = 2, zo = /* @__PURE__ */ R({
|
|
2990
3054
|
__name: "lume-line",
|
|
2991
3055
|
props: {
|
|
2992
3056
|
pathDefinition: {
|
|
@@ -2995,7 +3059,7 @@ const xu = Go.exports, bt = 2, Fo = /* @__PURE__ */ R({
|
|
|
2995
3059
|
},
|
|
2996
3060
|
width: {
|
|
2997
3061
|
type: Number,
|
|
2998
|
-
default:
|
|
3062
|
+
default: Tt
|
|
2999
3063
|
},
|
|
3000
3064
|
color: {
|
|
3001
3065
|
type: String,
|
|
@@ -3021,10 +3085,10 @@ const xu = Go.exports, bt = 2, Fo = /* @__PURE__ */ R({
|
|
|
3021
3085
|
emits: ["click"],
|
|
3022
3086
|
setup(t, { emit: e }) {
|
|
3023
3087
|
const r = I(null);
|
|
3024
|
-
return
|
|
3088
|
+
return re(() => Ne(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Tt, emit: e, root: r };
|
|
3025
3089
|
}
|
|
3026
3090
|
});
|
|
3027
|
-
var
|
|
3091
|
+
var Wo = function() {
|
|
3028
3092
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3029
3093
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
3030
3094
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -3036,31 +3100,31 @@ var jo = function() {
|
|
|
3036
3100
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
3037
3101
|
return n.emit("click", a);
|
|
3038
3102
|
} } });
|
|
3039
|
-
},
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3103
|
+
}, Uo = [], Zo = /* @__PURE__ */ S(
|
|
3104
|
+
zo,
|
|
3105
|
+
Wo,
|
|
3106
|
+
Uo,
|
|
3043
3107
|
!1,
|
|
3044
3108
|
null,
|
|
3045
3109
|
"59449838"
|
|
3046
3110
|
);
|
|
3047
|
-
const
|
|
3111
|
+
const Xo = Zo.exports, At = 4, Ot = 3, Yo = /* @__PURE__ */ R({
|
|
3048
3112
|
__name: "lume-point",
|
|
3049
3113
|
props: {
|
|
3050
3114
|
x: null,
|
|
3051
3115
|
y: null,
|
|
3052
3116
|
color: { default: Y.Skyblue },
|
|
3053
|
-
radius: { default:
|
|
3117
|
+
radius: { default: At },
|
|
3054
3118
|
active: { type: Boolean, default: !1 },
|
|
3055
3119
|
visible: { type: Boolean, default: !1 }
|
|
3056
3120
|
},
|
|
3057
3121
|
emits: ["click"],
|
|
3058
3122
|
setup(t, { emit: e }) {
|
|
3059
|
-
const r = t, n = I(null), a =
|
|
3060
|
-
return
|
|
3123
|
+
const r = t, n = I(null), a = v(() => r.radius / 2), o = v(() => r.active ? r.radius : r.visible ? Ot : 0);
|
|
3124
|
+
return re(() => Ne(n.value)), { __sfc: !0, DEFAULT_RADIUS: At, DEFAULT_VISIBLE_RADIUS: Ot, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
|
|
3061
3125
|
}
|
|
3062
3126
|
});
|
|
3063
|
-
var
|
|
3127
|
+
var Ko = function() {
|
|
3064
3128
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3065
3129
|
return r("circle", { ref: "root", staticClass: "lume-point", class: {
|
|
3066
3130
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -3069,47 +3133,47 @@ var Uo = function() {
|
|
|
3069
3133
|
}, attrs: { cx: e.x, cy: e.y, r: n.computedRadius, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
3070
3134
|
return n.emit("click", a);
|
|
3071
3135
|
} } });
|
|
3072
|
-
},
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3136
|
+
}, Jo = [], Qo = /* @__PURE__ */ S(
|
|
3137
|
+
Yo,
|
|
3138
|
+
Ko,
|
|
3139
|
+
Jo,
|
|
3076
3140
|
!1,
|
|
3077
3141
|
null,
|
|
3078
3142
|
"080270c0"
|
|
3079
3143
|
);
|
|
3080
|
-
const
|
|
3081
|
-
function
|
|
3082
|
-
function r(
|
|
3144
|
+
const qo = Qo.exports;
|
|
3145
|
+
function Xt(t, e) {
|
|
3146
|
+
function r(l) {
|
|
3083
3147
|
let i = null;
|
|
3084
|
-
return
|
|
3148
|
+
return l == null ? void 0 : l.reduce((u, c, s) => (c == null || c.value == null ? (i ? i.push(s) : i = [s], s === (l == null ? void 0 : l.length) - 1 && u.push(i)) : i && (u.push(i), i = null), u), []);
|
|
3085
3149
|
}
|
|
3086
|
-
function n(
|
|
3087
|
-
const m = Math.abs(
|
|
3088
|
-
return
|
|
3150
|
+
function n(l, i, u, c) {
|
|
3151
|
+
const m = Math.abs(l - i) / (u + 1) * (c + 1);
|
|
3152
|
+
return l == null && i == null ? null : l > i ? l - m : l + m;
|
|
3089
3153
|
}
|
|
3090
|
-
function a(
|
|
3091
|
-
return function(
|
|
3092
|
-
return !!
|
|
3093
|
-
(c) => c.includes(
|
|
3154
|
+
function a(l) {
|
|
3155
|
+
return function(u) {
|
|
3156
|
+
return !!l.find(
|
|
3157
|
+
(c) => c.includes(u) || c.includes(u - 1)
|
|
3094
3158
|
);
|
|
3095
3159
|
};
|
|
3096
3160
|
}
|
|
3097
|
-
return { computedLineData:
|
|
3098
|
-
() => t.value.map((
|
|
3099
|
-
const i = r(
|
|
3161
|
+
return { computedLineData: v(
|
|
3162
|
+
() => t.value.map((l) => {
|
|
3163
|
+
const i = r(l.values);
|
|
3100
3164
|
return {
|
|
3101
|
-
...
|
|
3165
|
+
...l,
|
|
3102
3166
|
isDashed: a(i),
|
|
3103
|
-
values:
|
|
3104
|
-
var
|
|
3167
|
+
values: l.values.map((u, c) => {
|
|
3168
|
+
var f, m, h, g;
|
|
3105
3169
|
const s = i.find(
|
|
3106
3170
|
(_) => _.includes(c)
|
|
3107
3171
|
);
|
|
3108
3172
|
if (s) {
|
|
3109
3173
|
const _ = s[0] - 1, x = s[s.length - 1] + 1;
|
|
3110
|
-
let d = (
|
|
3174
|
+
let d = (f = l.values[_]) == null ? void 0 : f.value, p = (m = l.values[x]) == null ? void 0 : m.value;
|
|
3111
3175
|
if (d == null) {
|
|
3112
|
-
const y = (
|
|
3176
|
+
const y = (g = (h = e == null ? void 0 : e.value) == null ? void 0 : h.domain) == null ? void 0 : g.call(h);
|
|
3113
3177
|
d = (y == null ? void 0 : y[1]) ?? 0, p = d;
|
|
3114
3178
|
} else p == null && (p = d);
|
|
3115
3179
|
return {
|
|
@@ -3119,33 +3183,33 @@ function jt(t, e) {
|
|
|
3119
3183
|
s.length,
|
|
3120
3184
|
s.indexOf(c)
|
|
3121
3185
|
),
|
|
3122
|
-
label:
|
|
3186
|
+
label: Pt,
|
|
3123
3187
|
isNull: !0
|
|
3124
3188
|
};
|
|
3125
3189
|
}
|
|
3126
|
-
return
|
|
3190
|
+
return u;
|
|
3127
3191
|
})
|
|
3128
3192
|
};
|
|
3129
3193
|
})
|
|
3130
3194
|
) };
|
|
3131
3195
|
}
|
|
3132
|
-
function
|
|
3196
|
+
function el(t, e) {
|
|
3133
3197
|
const r = t.bandwidth() / 2;
|
|
3134
3198
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
3135
3199
|
}
|
|
3136
|
-
function
|
|
3200
|
+
function tl(t, e) {
|
|
3137
3201
|
return (r, n) => t(e + (n - 1));
|
|
3138
3202
|
}
|
|
3139
|
-
function
|
|
3140
|
-
const a =
|
|
3141
|
-
K(r) ?
|
|
3142
|
-
).y((
|
|
3143
|
-
return e.every((
|
|
3203
|
+
function nl(t, e, r, n) {
|
|
3204
|
+
const a = rn().x(
|
|
3205
|
+
K(r) ? el(r, t) : tl(r, t)
|
|
3206
|
+
).y((o) => n(o));
|
|
3207
|
+
return e.every((o) => o == null) ? null : a(e);
|
|
3144
3208
|
}
|
|
3145
|
-
const
|
|
3209
|
+
const It = 1, rl = /* @__PURE__ */ R({
|
|
3146
3210
|
__name: "lume-line-group",
|
|
3147
3211
|
props: {
|
|
3148
|
-
...
|
|
3212
|
+
...Ee(),
|
|
3149
3213
|
withPoints: {
|
|
3150
3214
|
type: [Boolean, String],
|
|
3151
3215
|
default: !0
|
|
@@ -3157,152 +3221,152 @@ const At = 1, qo = /* @__PURE__ */ R({
|
|
|
3157
3221
|
},
|
|
3158
3222
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3159
3223
|
setup(t, { emit: e }) {
|
|
3160
|
-
const r = t, { data: n, options: a, xScale:
|
|
3224
|
+
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: i } = V(r), u = Oe(
|
|
3161
3225
|
"tooltipAnchorAttributes",
|
|
3162
3226
|
null
|
|
3163
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
3164
|
-
l,
|
|
3165
|
-
a,
|
|
3227
|
+
), { updateTooltipAnchorAttributes: c } = jt(
|
|
3166
3228
|
u,
|
|
3229
|
+
a,
|
|
3167
3230
|
o,
|
|
3231
|
+
l,
|
|
3168
3232
|
i
|
|
3169
|
-
), s =
|
|
3170
|
-
if (n.value.every((
|
|
3233
|
+
), s = v(() => {
|
|
3234
|
+
if (n.value.every((D) => D.isDashed))
|
|
3171
3235
|
return n.value;
|
|
3172
|
-
const { computedLineData:
|
|
3236
|
+
const { computedLineData: A } = Xt(
|
|
3173
3237
|
n,
|
|
3174
|
-
|
|
3238
|
+
l
|
|
3175
3239
|
);
|
|
3176
|
-
return a.value.withTooltip !== !1 && (
|
|
3177
|
-
}),
|
|
3240
|
+
return a.value.withTooltip !== !1 && (u != null && u.value) && c(A.value), A.value;
|
|
3241
|
+
}), f = v(() => {
|
|
3178
3242
|
if (r.hoveredIndex === -1) return;
|
|
3179
|
-
const
|
|
3243
|
+
const A = hn(
|
|
3180
3244
|
s.value,
|
|
3181
3245
|
r.hoveredIndex
|
|
3182
3246
|
);
|
|
3183
3247
|
return {
|
|
3184
|
-
d: `M ${
|
|
3185
|
-
V ${
|
|
3248
|
+
d: `M ${je(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
3249
|
+
V ${l.value(A)}`
|
|
3186
3250
|
// Move to X index, Vertical line to the highest point
|
|
3187
3251
|
};
|
|
3188
|
-
}), m =
|
|
3189
|
-
() =>
|
|
3252
|
+
}), m = v(
|
|
3253
|
+
() => o.value && It / (yn(o.value) - 1)
|
|
3190
3254
|
// Subtracting the first line (read below)
|
|
3191
|
-
),
|
|
3255
|
+
), h = v(
|
|
3192
3256
|
() => {
|
|
3193
|
-
var
|
|
3194
|
-
return ((
|
|
3257
|
+
var A;
|
|
3258
|
+
return ((A = a.value) == null ? void 0 : A.lineWidth) * 2 || void 0;
|
|
3195
3259
|
}
|
|
3196
3260
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3197
|
-
),
|
|
3198
|
-
() =>
|
|
3199
|
-
), _ =
|
|
3261
|
+
), g = v(
|
|
3262
|
+
() => o.value.bandwidth() / 2
|
|
3263
|
+
), _ = v(() => o.value.domain()), x = v(
|
|
3200
3264
|
() => a.value.withPoints ?? r.withPoints
|
|
3201
|
-
), d =
|
|
3265
|
+
), d = v(
|
|
3202
3266
|
() => a.value.withPoints === "visible" || r.withPoints === "visible"
|
|
3203
3267
|
);
|
|
3204
|
-
function p(
|
|
3205
|
-
return s.value[
|
|
3206
|
-
}
|
|
3207
|
-
function y(
|
|
3208
|
-
var
|
|
3209
|
-
const
|
|
3210
|
-
(
|
|
3211
|
-
(
|
|
3268
|
+
function p(A) {
|
|
3269
|
+
return s.value[A].values;
|
|
3270
|
+
}
|
|
3271
|
+
function y(A, D) {
|
|
3272
|
+
var M, z;
|
|
3273
|
+
const C = A === 0 ? [] : [
|
|
3274
|
+
(M = p(D)[A - 1]) == null ? void 0 : M.value,
|
|
3275
|
+
(z = p(D)[A]) == null ? void 0 : z.value
|
|
3212
3276
|
];
|
|
3213
|
-
return
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3277
|
+
return nl(
|
|
3278
|
+
A,
|
|
3279
|
+
C,
|
|
3280
|
+
o.value,
|
|
3281
|
+
l.value
|
|
3218
3282
|
) || "";
|
|
3219
3283
|
}
|
|
3220
|
-
function
|
|
3284
|
+
function k(A) {
|
|
3221
3285
|
return {
|
|
3222
|
-
animationDelay:
|
|
3286
|
+
animationDelay: A < 2 ? 0 : (A - 1) * m.value,
|
|
3223
3287
|
animationDuration: m.value
|
|
3224
3288
|
};
|
|
3225
3289
|
}
|
|
3226
|
-
function A
|
|
3227
|
-
var
|
|
3228
|
-
const
|
|
3290
|
+
function T(A, D) {
|
|
3291
|
+
var M;
|
|
3292
|
+
const C = (M = p(D)[A]) == null ? void 0 : M.value;
|
|
3229
3293
|
return {
|
|
3230
|
-
x: K(
|
|
3231
|
-
y:
|
|
3294
|
+
x: K(o.value) ? r.xScale(_.value[A]) + g.value : r.xScale(A),
|
|
3295
|
+
y: C === null ? l.value(l.value.domain()[1]) : l.value(C)
|
|
3232
3296
|
};
|
|
3233
3297
|
}
|
|
3234
|
-
function
|
|
3235
|
-
return r.hoveredIndex ===
|
|
3298
|
+
function N(A) {
|
|
3299
|
+
return r.hoveredIndex === A;
|
|
3236
3300
|
}
|
|
3237
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
3301
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: It, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: s, overlayLineAttributes: f, animationDuration: m, pointRadius: h, xAxisOffset: g, domain: _, computedWithPoints: x, computedVisiblePoints: d, getValuesFromDataset: p, getPathDefinition: y, getLineTransitionParams: k, getPointPosition: T, isPointActive: N, LumeLine: Xo, LumePoint: qo };
|
|
3238
3302
|
}
|
|
3239
3303
|
});
|
|
3240
|
-
var
|
|
3304
|
+
var al = function() {
|
|
3241
3305
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3242
|
-
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a,
|
|
3243
|
-
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(
|
|
3244
|
-
return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: a.color, dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i,
|
|
3245
|
-
return n.emit("line-click", { index: i, datasetIndex:
|
|
3306
|
+
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
3307
|
+
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
|
|
3308
|
+
return r(n.LumeLine, e._b({ key: `line-${i}`, attrs: { color: a.color, dashed: a.isDashed(i), "path-definition": n.getPathDefinition(i, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(u) {
|
|
3309
|
+
return n.emit("line-click", { index: i, datasetIndex: o, event: u });
|
|
3246
3310
|
} } }, "lume-line", n.getLineTransitionParams(i), !1));
|
|
3247
|
-
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(
|
|
3248
|
-
return [
|
|
3249
|
-
return n.emit("point-click", { index: i, datasetIndex:
|
|
3250
|
-
} } }, "lume-point", n.getPointPosition(i,
|
|
3311
|
+
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(l, i) {
|
|
3312
|
+
return [l.isNull ? e._e() : r(n.LumePoint, e._b({ attrs: { active: n.isPointActive(i), color: a.color, index: i, radius: n.pointRadius, visible: n.computedVisiblePoints }, on: { click: function(u) {
|
|
3313
|
+
return n.emit("point-click", { index: i, datasetIndex: o, event: u });
|
|
3314
|
+
} } }, "lume-point", n.getPointPosition(i, o), !1))];
|
|
3251
3315
|
})], 2) : e._e()]);
|
|
3252
3316
|
})], 2);
|
|
3253
|
-
},
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3317
|
+
}, ol = [], ll = /* @__PURE__ */ S(
|
|
3318
|
+
rl,
|
|
3319
|
+
al,
|
|
3320
|
+
ol,
|
|
3257
3321
|
!1,
|
|
3258
3322
|
null,
|
|
3259
3323
|
"898c2e7a"
|
|
3260
3324
|
);
|
|
3261
|
-
const
|
|
3262
|
-
margins:
|
|
3325
|
+
const Yt = ll.exports, ul = {
|
|
3326
|
+
margins: ie.VERTICAL,
|
|
3263
3327
|
startOnZero: !0,
|
|
3264
3328
|
withTooltip: !0,
|
|
3265
3329
|
xAxisOptions: {},
|
|
3266
3330
|
yAxisOptions: { gridLines: !0 }
|
|
3267
|
-
},
|
|
3331
|
+
}, il = /* @__PURE__ */ R({
|
|
3268
3332
|
__name: "lume-line-chart",
|
|
3269
3333
|
props: {
|
|
3270
|
-
...
|
|
3334
|
+
...ve(null, !1)
|
|
3271
3335
|
},
|
|
3272
3336
|
setup(t, { emit: e }) {
|
|
3273
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
3274
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options:
|
|
3337
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(X()), { options: o } = V(r), { allOptions: l } = Q(o, ul);
|
|
3338
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: fe, LumeLineGroup: Yt };
|
|
3275
3339
|
}
|
|
3276
3340
|
});
|
|
3277
|
-
var
|
|
3341
|
+
var sl = function() {
|
|
3278
3342
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3279
3343
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3280
3344
|
return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
3281
|
-
} }, e._l(n.slots, function(a,
|
|
3282
|
-
return { key:
|
|
3283
|
-
return [e._t(
|
|
3345
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3346
|
+
return { key: o, fn: function(l) {
|
|
3347
|
+
return [e._t(o, null, null, l || {})];
|
|
3284
3348
|
} };
|
|
3285
3349
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3286
|
-
},
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3350
|
+
}, cl = [], dl = /* @__PURE__ */ S(
|
|
3351
|
+
il,
|
|
3352
|
+
sl,
|
|
3353
|
+
cl,
|
|
3290
3354
|
!1,
|
|
3291
3355
|
null,
|
|
3292
3356
|
null
|
|
3293
3357
|
);
|
|
3294
|
-
const
|
|
3295
|
-
function
|
|
3296
|
-
return { areaPathDefinition:
|
|
3358
|
+
const Il = dl.exports;
|
|
3359
|
+
function vl(t) {
|
|
3360
|
+
return { areaPathDefinition: v(
|
|
3297
3361
|
() => function(r, n) {
|
|
3298
3362
|
if (!r || !n || K(r) || K(n))
|
|
3299
3363
|
return;
|
|
3300
3364
|
const a = t.value[0].values;
|
|
3301
|
-
return
|
|
3365
|
+
return an().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
3302
3366
|
}
|
|
3303
3367
|
) };
|
|
3304
3368
|
}
|
|
3305
|
-
const
|
|
3369
|
+
const fl = {
|
|
3306
3370
|
margins: {
|
|
3307
3371
|
top: 0,
|
|
3308
3372
|
right: 0,
|
|
@@ -3316,23 +3380,23 @@ const su = {
|
|
|
3316
3380
|
tooltipOptions: {
|
|
3317
3381
|
showTitle: !1
|
|
3318
3382
|
}
|
|
3319
|
-
},
|
|
3383
|
+
}, pl = /* @__PURE__ */ R({
|
|
3320
3384
|
__name: "lume-sparkline-chart",
|
|
3321
3385
|
props: {
|
|
3322
|
-
...
|
|
3323
|
-
...
|
|
3386
|
+
...nt(null),
|
|
3387
|
+
...ye()
|
|
3324
3388
|
},
|
|
3325
3389
|
setup(t, { expose: e, emit: r }) {
|
|
3326
|
-
const n = t, { componentEventPropagator: a } = q(r),
|
|
3390
|
+
const n = t, { componentEventPropagator: a } = q(r), o = se(X()), { data: l, options: i } = V(n), { internalData: u } = rt(l), { allOptions: c } = Q(i, fl), { computedLineData: s } = Xt(u), { areaPathDefinition: f } = vl(s), m = v(() => {
|
|
3327
3391
|
var x, d;
|
|
3328
|
-
return (d = (x =
|
|
3329
|
-
}),
|
|
3392
|
+
return (d = (x = u.value) == null ? void 0 : x[0]) == null ? void 0 : d.color;
|
|
3393
|
+
}), h = v(
|
|
3330
3394
|
() => {
|
|
3331
3395
|
var x, d;
|
|
3332
|
-
return ((d = (x =
|
|
3396
|
+
return ((d = (x = l.value) == null ? void 0 : x[0]) == null ? void 0 : d.areaColor) || m.value;
|
|
3333
3397
|
}
|
|
3334
3398
|
);
|
|
3335
|
-
function
|
|
3399
|
+
function g(x) {
|
|
3336
3400
|
return {
|
|
3337
3401
|
...x,
|
|
3338
3402
|
noMinSize: !0
|
|
@@ -3343,11 +3407,11 @@ const su = {
|
|
|
3343
3407
|
return ge().range([0, p.width]).domain([0, x[0].values.length - 1]);
|
|
3344
3408
|
}
|
|
3345
3409
|
return e({
|
|
3346
|
-
areaPathDefinition:
|
|
3347
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots:
|
|
3410
|
+
areaPathDefinition: f
|
|
3411
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: s, areaPathDefinition: f, computedColor: m, areaColor: h, getSparklineOptions: g, xScaleGenerator: _, LumeChart: fe, LumeLineGroup: Yt };
|
|
3348
3412
|
}
|
|
3349
3413
|
});
|
|
3350
|
-
var
|
|
3414
|
+
var ml = function() {
|
|
3351
3415
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3352
3416
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3353
3417
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3356,70 +3420,70 @@ var du = function() {
|
|
|
3356
3420
|
`lume-fill--${n.areaColor || n.computedColor}`,
|
|
3357
3421
|
"lume-fill--faded"
|
|
3358
3422
|
], attrs: { d: n.areaPathDefinition(a.xScale, a.yScale), "data-j-sparkline__area": "" } }) : e._e(), r(n.LumeLineGroup, e._g(e._b({ attrs: { "with-points": !1 } }, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
3359
|
-
} }, e._l(n.slots, function(a,
|
|
3360
|
-
return { key:
|
|
3361
|
-
return [e._t(
|
|
3423
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3424
|
+
return { key: o, fn: function(l) {
|
|
3425
|
+
return [e._t(o, null, null, l || {})];
|
|
3362
3426
|
} };
|
|
3363
3427
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3364
|
-
},
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3428
|
+
}, _l = [], gl = /* @__PURE__ */ S(
|
|
3429
|
+
pl,
|
|
3430
|
+
ml,
|
|
3431
|
+
_l,
|
|
3368
3432
|
!1,
|
|
3369
3433
|
null,
|
|
3370
3434
|
"579f7e32"
|
|
3371
3435
|
);
|
|
3372
|
-
const
|
|
3436
|
+
const Nl = gl.exports;
|
|
3373
3437
|
export {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3438
|
+
Mr as A,
|
|
3439
|
+
mt as B,
|
|
3440
|
+
ue as C,
|
|
3441
|
+
qe as D,
|
|
3442
|
+
je as E,
|
|
3443
|
+
pt as F,
|
|
3444
|
+
at as G,
|
|
3445
|
+
rt as H,
|
|
3446
|
+
ar as I,
|
|
3447
|
+
Xt as J,
|
|
3448
|
+
zr as K,
|
|
3449
|
+
tt as L,
|
|
3386
3450
|
Q as M,
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3451
|
+
lr as N,
|
|
3452
|
+
et as O,
|
|
3453
|
+
Zr as P,
|
|
3454
|
+
jt as Q,
|
|
3455
|
+
Xr as R,
|
|
3456
|
+
Gt as S,
|
|
3457
|
+
nt as T,
|
|
3458
|
+
ve as U,
|
|
3459
|
+
or as V,
|
|
3460
|
+
ye as W,
|
|
3461
|
+
rr as X,
|
|
3398
3462
|
Y as a,
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3463
|
+
ro as b,
|
|
3464
|
+
ka as c,
|
|
3465
|
+
da as d,
|
|
3466
|
+
_a as e,
|
|
3467
|
+
Gn as f,
|
|
3468
|
+
Qe as g,
|
|
3469
|
+
Ll as h,
|
|
3470
|
+
ut as i,
|
|
3471
|
+
fe as j,
|
|
3472
|
+
dr as k,
|
|
3473
|
+
xl as l,
|
|
3474
|
+
_r as m,
|
|
3475
|
+
Al as n,
|
|
3476
|
+
Xo as o,
|
|
3477
|
+
Il as p,
|
|
3478
|
+
Yt as q,
|
|
3479
|
+
jr as r,
|
|
3480
|
+
qo as s,
|
|
3481
|
+
Tl as t,
|
|
3482
|
+
Nl as u,
|
|
3483
|
+
Ol as v,
|
|
3484
|
+
Rr as w,
|
|
3485
|
+
wr as x,
|
|
3486
|
+
Or as y,
|
|
3487
|
+
kr as z
|
|
3424
3488
|
};
|
|
3425
|
-
//# sourceMappingURL=
|
|
3489
|
+
//# sourceMappingURL=h4DBladZ.js.map
|