@adyen/lume 1.13.0 → 1.14.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 +2 -0
- package/dist/@types/types/alluvial.d.ts.map +1 -1
- package/dist/@types/types/options.d.ts +3 -1
- package/dist/@types/types/options.d.ts.map +1 -1
- package/dist/common/{vDk1lu85.js → BvvJadxi.js} +1183 -1138
- package/dist/common/BvvJadxi.js.map +1 -0
- package/dist/common/DHB3p6kw.js +5 -0
- package/dist/common/DHB3p6kw.js.map +1 -0
- package/dist/common/DWtV4D8X.js +5 -0
- package/dist/common/DWtV4D8X.js.map +1 -0
- package/dist/common/DiDq9ch9.js +5 -0
- package/dist/common/DiDq9ch9.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/scss/components/lume-alluvial-group.scss +10 -0
- package/dist/scss/main.scss +4 -4
- package/dist/styles/main.css +1 -1
- package/package.json +3 -3
- 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
|
|
2
|
-
import { sankeyLinkHorizontal as
|
|
3
|
-
import { format as
|
|
4
|
-
import { createPopper as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as P, ref as I, isRef as It, computed as f, watch as H, toRefs as j, inject as $e, reactive as we, onMounted as re, watchEffect as Nt, onBeforeUnmount as Et, useSlots as Z, nextTick as Ce, 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 be, scaleBand as ke, link as nn, line as rn, area as an } from "d3";
|
|
4
|
+
import { createPopper as on } from "@popperjs/core";
|
|
5
|
+
const un = /* @__PURE__ */ P({
|
|
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
|
|
47
|
+
function S(t, e, r, n, a, o, u, i) {
|
|
48
48
|
var l = typeof t == "function" ? t.options : t;
|
|
49
|
-
return e && (l.render = e, l.staticRenderFns = r, l._compiled = !0),
|
|
49
|
+
return e && (l.render = e, l.staticRenderFns = r, l._compiled = !0), o && (l._scopeId = "data-v-" + o), {
|
|
50
50
|
exports: t,
|
|
51
51
|
options: l
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var ln = 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
|
+
un,
|
|
66
|
+
ln,
|
|
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 $t() {
|
|
81
81
|
return process.env.NODE_ENV === "production";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function wt(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 Be(t) {
|
|
97
97
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Dt(t, e) {
|
|
100
100
|
const r = { ...t };
|
|
101
101
|
return Object.entries(e).forEach(([n, a]) => {
|
|
102
|
-
r[n] =
|
|
102
|
+
r[n] = Be(t[n]) && Be(a) ? Dt(t[n], a) : a;
|
|
103
103
|
}), r;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return t != null &&
|
|
105
|
+
function pn(t) {
|
|
106
|
+
return t != null && Be(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, u;
|
|
132
|
+
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((u = a.values[e]) == null ? void 0 : u.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 Ht(t) {
|
|
137
|
+
const e = It(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 && $t() || console.warn(Ln + "Warning: " + t);
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Ne = (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,7 +201,7 @@ const Oe = (t) => {
|
|
|
201
201
|
return e ? e(...n) : n[0];
|
|
202
202
|
}
|
|
203
203
|
return r;
|
|
204
|
-
},
|
|
204
|
+
}, xe = () => ({
|
|
205
205
|
options: {
|
|
206
206
|
type: Object,
|
|
207
207
|
default: () => ({})
|
|
@@ -209,20 +209,20 @@ const Oe = (t) => {
|
|
|
209
209
|
});
|
|
210
210
|
function Q(t, e) {
|
|
211
211
|
return { allOptions: f(() => {
|
|
212
|
-
const n =
|
|
213
|
-
return n ?
|
|
212
|
+
const n = It(e) ? e == null ? void 0 : e.value : e;
|
|
213
|
+
return n ? Dt(n, t.value) : t.value;
|
|
214
214
|
}) };
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
function
|
|
218
|
-
const n = I(), a = f(() => Math.max(...t.value.range())),
|
|
219
|
-
function
|
|
216
|
+
const An = 0.2;
|
|
217
|
+
function Tn(t, e, r) {
|
|
218
|
+
const n = I(), a = f(() => Math.max(...t.value.range())), o = f(() => e.value.length);
|
|
219
|
+
function u() {
|
|
220
220
|
if (!e.value) return;
|
|
221
221
|
const l = e.value.reduce(
|
|
222
222
|
(s, v) => s + v.ref.getBoundingClientRect().width,
|
|
223
223
|
0
|
|
224
|
-
), c = Math.ceil(l /
|
|
225
|
-
n.value = c + c *
|
|
224
|
+
), c = Math.ceil(l / o.value);
|
|
225
|
+
n.value = c + c * An;
|
|
226
226
|
}
|
|
227
227
|
function i(l) {
|
|
228
228
|
if (!e.value) return !0;
|
|
@@ -231,16 +231,16 @@ function kn(t, e, r) {
|
|
|
231
231
|
const v = a.value / s, m = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / v);
|
|
232
232
|
return l % m === 0;
|
|
233
233
|
}
|
|
234
|
-
return H(e,
|
|
234
|
+
return H(e, u), { 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
|
+
}, St = "No data", it = 20, Pt = 0.33, Rt = 0.5, Ct = 12, Le = 8, In = 1, Nn = [
|
|
244
244
|
"auto",
|
|
245
245
|
"auto-start",
|
|
246
246
|
"auto-end",
|
|
@@ -257,10 +257,10 @@ const O = {
|
|
|
257
257
|
"left-start",
|
|
258
258
|
"left-end"
|
|
259
259
|
];
|
|
260
|
-
function
|
|
261
|
-
t != null && t.closest("svg") ||
|
|
260
|
+
function De(t) {
|
|
261
|
+
t != null && t.closest("svg") || ne(J.NotContainedInSvg);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const Bt = {
|
|
264
264
|
/** Displays a line for each tick. */
|
|
265
265
|
gridLines: !1,
|
|
266
266
|
/** Displays the axis title. */
|
|
@@ -276,21 +276,21 @@ 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
|
+
...Bt,
|
|
281
281
|
withTitle: !1,
|
|
282
282
|
skip: !0
|
|
283
|
-
},
|
|
284
|
-
...
|
|
283
|
+
}, $n = {
|
|
284
|
+
...Bt,
|
|
285
285
|
gridLines: !0
|
|
286
|
-
},
|
|
286
|
+
}, wn = function(t, e, r) {
|
|
287
287
|
const n = f(() => t.value.step() * t.value.paddingInner() / 2);
|
|
288
288
|
function a(l, c) {
|
|
289
289
|
return {
|
|
290
290
|
transform: `translate(${(t.value(c) ?? t.value(l)) - n.value}, 0)`
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function o(l) {
|
|
294
294
|
var s;
|
|
295
295
|
const c = Math.max(
|
|
296
296
|
t.value.step(),
|
|
@@ -299,10 +299,10 @@ const Rt = {
|
|
|
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 + Le
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function u() {
|
|
306
306
|
const l = t.value.step() / 2;
|
|
307
307
|
return {
|
|
308
308
|
x1: l,
|
|
@@ -320,28 +320,28 @@ const Rt = {
|
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
323
|
-
getGridLinesAttributes:
|
|
324
|
-
getTickGhostAttributes:
|
|
323
|
+
getGridLinesAttributes: u,
|
|
324
|
+
getTickGhostAttributes: o,
|
|
325
325
|
getTickGroupAttributes: a,
|
|
326
326
|
getTickLabelAttributes: i
|
|
327
327
|
};
|
|
328
|
-
},
|
|
328
|
+
}, Dn = function(t, e, r) {
|
|
329
329
|
const n = f(() => t.value.step() * t.value.paddingInner() / 2);
|
|
330
330
|
function a(l, c) {
|
|
331
331
|
return {
|
|
332
332
|
transform: `translate(0, ${(t.value(c) ?? t.value(l)) - n.value})`
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function o(l) {
|
|
336
336
|
var s;
|
|
337
|
-
const c = (l ? (s = l.getComputedTextLength) == null ? void 0 : s.call(l) : 42) + r.value.tickPadding +
|
|
337
|
+
const c = (l ? (s = l.getComputedTextLength) == null ? void 0 : s.call(l) : 42) + r.value.tickPadding + Le;
|
|
338
338
|
return {
|
|
339
339
|
x: -c,
|
|
340
340
|
width: c,
|
|
341
341
|
height: t.value.step()
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function u() {
|
|
345
345
|
const l = t.value.step() / 2;
|
|
346
346
|
return {
|
|
347
347
|
y1: l,
|
|
@@ -358,12 +358,12 @@ const Rt = {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
return {
|
|
361
|
-
getGridLinesAttributes:
|
|
362
|
-
getTickGhostAttributes:
|
|
361
|
+
getGridLinesAttributes: u,
|
|
362
|
+
getTickGhostAttributes: o,
|
|
363
363
|
getTickGroupAttributes: a,
|
|
364
364
|
getTickLabelAttributes: i
|
|
365
365
|
};
|
|
366
|
-
},
|
|
366
|
+
}, Hn = function(t, e, r) {
|
|
367
367
|
const n = f(() => {
|
|
368
368
|
const l = t.value.ticks();
|
|
369
369
|
return l.length > 1 ? t.value(l[1]) - t.value(l[0]) : 0;
|
|
@@ -373,14 +373,14 @@ const Rt = {
|
|
|
373
373
|
transform: `translate(${t.value(l)}, 0)`
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function o() {
|
|
377
377
|
return {
|
|
378
|
-
height: r.value.tickPadding +
|
|
378
|
+
height: r.value.tickPadding + Ct + Le,
|
|
379
379
|
width: n.value,
|
|
380
380
|
x: -(n.value / 2)
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function u() {
|
|
384
384
|
return {
|
|
385
385
|
y1: -e.value.height
|
|
386
386
|
};
|
|
@@ -393,12 +393,12 @@ const Rt = {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
return {
|
|
396
|
-
getGridLinesAttributes:
|
|
397
|
-
getTickGhostAttributes:
|
|
396
|
+
getGridLinesAttributes: u,
|
|
397
|
+
getTickGhostAttributes: o,
|
|
398
398
|
getTickGroupAttributes: a,
|
|
399
399
|
getTickLabelAttributes: i
|
|
400
400
|
};
|
|
401
|
-
},
|
|
401
|
+
}, Sn = function(t, e, r) {
|
|
402
402
|
const n = f(() => {
|
|
403
403
|
const l = t.value.ticks();
|
|
404
404
|
return l.length > 1 ? t.value(l[1]) - t.value(l[0]) : 0;
|
|
@@ -408,9 +408,9 @@ const Rt = {
|
|
|
408
408
|
transform: `translate(0, ${t.value(l)})`
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function o(l) {
|
|
412
412
|
var s;
|
|
413
|
-
const c = (((s = l == null ? void 0 : l.getComputedTextLength) == null ? void 0 : s.call(l)) || 0) + r.value.tickPadding +
|
|
413
|
+
const c = (((s = l == null ? void 0 : l.getComputedTextLength) == null ? void 0 : s.call(l)) || 0) + r.value.tickPadding + Le;
|
|
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 u() {
|
|
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: u,
|
|
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 || {}), Ie = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(Ie || {});
|
|
446
|
+
const Rn = /* @__PURE__ */ P({
|
|
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 Ie
|
|
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,44 +472,44 @@ const Dn = /* @__PURE__ */ R({
|
|
|
472
472
|
type: String,
|
|
473
473
|
default: O.VERTICAL
|
|
474
474
|
},
|
|
475
|
-
...
|
|
475
|
+
...xe()
|
|
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 ?
|
|
479
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: u, options: i, orientation: l } = j(r), c = $e("isEmpty", I(!1)), s = we({}), v = I(null), m = I(null), h = I(null), g = f(
|
|
480
|
+
() => r.type ? Ie[r.type] : r.position
|
|
481
481
|
), _ = f(
|
|
482
|
-
() => r.type || (
|
|
482
|
+
() => r.type || (g.value === "left" ? "y" : "x")
|
|
483
483
|
), x = f(
|
|
484
484
|
() => _.value === "x" && l.value === O.VERTICAL || _.value === "y" && l.value === O.HORIZONTAL
|
|
485
485
|
), { allOptions: d } = Q(
|
|
486
486
|
i,
|
|
487
|
-
_.value === "x" ?
|
|
488
|
-
), { showTick: p } =
|
|
489
|
-
() => c.value || !a.value ||
|
|
487
|
+
_.value === "x" ? En : $n
|
|
488
|
+
), { showTick: p } = Tn(a, v, d), y = f(
|
|
489
|
+
() => c.value || !a.value || _n(a.value)
|
|
490
490
|
), b = f(() => {
|
|
491
|
-
var E, w,
|
|
492
|
-
return _.value === "y" && y.value ? `translate(0, ${((E =
|
|
491
|
+
var E, w, C, 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}, ${(C = o.value) == null ? void 0 : C.height})` : `translate(0, ${_.value === "x" ? (te = o.value) == null ? void 0 : te.height : 0})`;
|
|
493
493
|
}), A = f(() => {
|
|
494
494
|
if (!a.value) return [];
|
|
495
495
|
if (K(a.value))
|
|
496
496
|
return a.value.labels || a.value.domain();
|
|
497
|
-
const { tickCount: E } = d.value, [w,
|
|
498
|
-
return
|
|
499
|
-
}),
|
|
497
|
+
const { tickCount: E } = d.value, [w, C] = a.value.domain();
|
|
498
|
+
return tn(w, C, E);
|
|
499
|
+
}), N = f(() => {
|
|
500
500
|
const { tickFormat: E } = d.value;
|
|
501
|
-
return
|
|
501
|
+
return Ne(E);
|
|
502
502
|
}), T = f(
|
|
503
|
-
() => d.value.withHover && x.value &&
|
|
504
|
-
),
|
|
505
|
-
() => d.value.tickPadding +
|
|
506
|
-
),
|
|
503
|
+
() => d.value.withHover && x.value && u.value > -1
|
|
504
|
+
), $ = f(
|
|
505
|
+
() => d.value.tickPadding + Le || n
|
|
506
|
+
), R = f(() => _.value === "x" ? (
|
|
507
507
|
// If x axis, get the tick height
|
|
508
508
|
Math.max(
|
|
509
509
|
...(v.value || []).map(
|
|
510
510
|
(E) => {
|
|
511
|
-
var w,
|
|
512
|
-
return ((
|
|
511
|
+
var w, C;
|
|
512
|
+
return ((C = (w = E.ref).getBBox) == null ? void 0 : C.call(w).height) + $.value;
|
|
513
513
|
}
|
|
514
514
|
)
|
|
515
515
|
)
|
|
@@ -518,62 +518,62 @@ const Dn = /* @__PURE__ */ R({
|
|
|
518
518
|
Math.max(
|
|
519
519
|
...(v.value || []).map(
|
|
520
520
|
(E) => {
|
|
521
|
-
var w,
|
|
522
|
-
return ((
|
|
521
|
+
var w, C;
|
|
522
|
+
return ((C = (w = E.ref).getBBox) == null ? void 0 : C.call(w).width) + $.value;
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
525
|
)
|
|
526
526
|
));
|
|
527
|
-
function
|
|
527
|
+
function G(E) {
|
|
528
528
|
const { showTicks: w } = d.value;
|
|
529
|
-
return w === !1 ? "" :
|
|
529
|
+
return w === !1 ? "" : N.value(E);
|
|
530
530
|
}
|
|
531
|
-
function V(E, w,
|
|
532
|
-
e("mouseenter", { index: x.value ? E : null, value: w, event:
|
|
531
|
+
function V(E, w, C) {
|
|
532
|
+
e("mouseenter", { index: x.value ? E : null, value: w, event: C });
|
|
533
533
|
}
|
|
534
|
-
function ee(E, w,
|
|
535
|
-
e("click", { index: E, value: w, event:
|
|
534
|
+
function ee(E, w, C) {
|
|
535
|
+
e("click", { index: E, value: w, event: C });
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function ce(E) {
|
|
538
538
|
var w;
|
|
539
539
|
if (!(!v.value || !v.value.length))
|
|
540
540
|
return (w = v.value[E]) == null ? void 0 : w.ref;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
542
|
+
function ae() {
|
|
543
|
+
h.value = A.value.map(
|
|
544
544
|
(E, w) => ({
|
|
545
|
-
value:
|
|
545
|
+
value: G(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
556
|
function ue() {
|
|
557
557
|
if (!a.value) return;
|
|
558
|
-
const E = a.value.step ? "bandScale" : "linearScale", w =
|
|
559
|
-
Object.entries(w(a,
|
|
560
|
-
([
|
|
561
|
-
s[
|
|
558
|
+
const E = a.value.step ? "bandScale" : "linearScale", w = Pn[`${_.value}-${Fe[E]}`];
|
|
559
|
+
Object.entries(w(a, o, d) || []).forEach(
|
|
560
|
+
([C, te]) => {
|
|
561
|
+
s[C] = te;
|
|
562
562
|
}
|
|
563
563
|
);
|
|
564
564
|
}
|
|
565
|
-
return H(a, ue, { flush: "sync", immediate: !0 }), H(a,
|
|
565
|
+
return H(a, ue, { flush: "sync", immediate: !0 }), H(a, ae, { immediate: !0 }), H(v, ae), H(R, (E) => e("lume__internal--axis-size", E)), H(r.containerSize, oe), re(() => De(m.value)), { __sfc: !0, SCALE_MIXIN_MAP: Fe, POSITIONS: Ge, TYPES: Ie, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: u, options: i, orientation: l, isEmpty: c, mixins: s, tickRefs: v, root: m, ticksWithAttributes: h, computedPosition: g, computedType: _, shouldHover: x, allOptions: d, showTick: p, alignAxisBaseline: y, axisTransform: b, ticks: A, tickFormatter: N, isHovering: T, axisLabelOffset: $, axisSize: R, formatTick: G, handleTickMouseenter: V, handleTickClick: ee, getTextNode: ce, setTicks: ae, updateGridlines: oe, init: ue, LumeTick: dn };
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
|
-
var
|
|
568
|
+
var Cn = 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(u) {
|
|
574
|
+
return n.handleTickMouseenter(o, a.value, u);
|
|
575
|
+
}, click: function(u) {
|
|
576
|
+
return n.handleTickClick(o, a.value, u);
|
|
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
|
+
}, Bn = [], Fn = /* @__PURE__ */ S(
|
|
586
|
+
Rn,
|
|
587
|
+
Cn,
|
|
588
|
+
Bn,
|
|
589
589
|
!1,
|
|
590
590
|
null,
|
|
591
591
|
null
|
|
592
592
|
);
|
|
593
|
-
const
|
|
594
|
-
function
|
|
595
|
-
const a = f(() => r.value > 0 && r.value < 1),
|
|
593
|
+
const Gn = Fn.exports;
|
|
594
|
+
function jn(t, e, r, n) {
|
|
595
|
+
const a = f(() => r.value > 0 && r.value < 1), o = f(
|
|
596
596
|
() => n.value > 0 && n.value < 1
|
|
597
|
-
),
|
|
597
|
+
), u = f(
|
|
598
598
|
() => a.value ? t.value - 0.5 : t.value
|
|
599
599
|
// draws the 1px bar closer to the axis
|
|
600
600
|
), i = f(
|
|
601
|
-
() =>
|
|
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: u, 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), u = f(() => `${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: u };
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const Mn = /* @__PURE__ */ P({
|
|
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:
|
|
650
|
+
const r = t, { x: n, y: a, width: o, height: u, transition: i, classList: l } = j(r), c = I(null), s = f(
|
|
651
651
|
() => typeof l.value == "string" ? [l.value] : l.value
|
|
652
|
-
), v = f(() => i.value === "width"), m = f(() => i.value === "height"),
|
|
653
|
-
return
|
|
652
|
+
), v = f(() => i.value === "width"), m = f(() => i.value === "height"), h = Vn(n, a, o, u), { computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d } = jn(n, a, o, u), p = f(() => x.value ? 1 : (v.value ? h.computedWidth : o).value), y = f(() => d.value ? 1 : (m.value ? h.computedHeight : u).value), b = v.value || m.value ? h.transformOrigin : null;
|
|
653
|
+
return re(() => De(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: u, transition: i, classList: l, root: c, computedClasses: s, shouldTransitionWidth: v, shouldTransitionHeight: m, transitionProps: h, computedX: g, computedY: _, shouldHaveMinWidth: x, shouldHaveMinHeight: d, computedWidth: p, computedHeight: y, transformOrigin: b };
|
|
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 ===
|
|
686
|
-
}
|
|
687
|
-
function
|
|
688
|
-
return Object.values(
|
|
689
|
-
}
|
|
690
|
-
function
|
|
691
|
-
return e ===
|
|
692
|
-
...
|
|
693
|
-
...
|
|
694
|
-
...
|
|
695
|
-
...
|
|
681
|
+
const Qe = Un.exports;
|
|
682
|
+
var le = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(le || {}), X = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(X || {}), Ft = /* @__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))(Ft || {}), 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 = le.Categorical, Ae = X.Skyblue, Xn = qe.SkyTeal;
|
|
684
|
+
function Yn(t) {
|
|
685
|
+
return t === le.Divergent ? Xn : Ae;
|
|
686
|
+
}
|
|
687
|
+
function Kn(t) {
|
|
688
|
+
return Object.values(tt).includes(t);
|
|
689
|
+
}
|
|
690
|
+
function st(t, e) {
|
|
691
|
+
return e === le.Divergent ? Object.values(qe).includes(t) : Object.values({
|
|
692
|
+
...X,
|
|
693
|
+
...Ft,
|
|
694
|
+
...et,
|
|
695
|
+
...tt
|
|
696
696
|
}).includes(t);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
const r = Object.values(
|
|
700
|
-
return
|
|
698
|
+
function Jn(t, e) {
|
|
699
|
+
const r = Object.values(X).indexOf(t);
|
|
700
|
+
return kn(Object.values(X), 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 ct(t, e, r) {
|
|
711
711
|
switch (e) {
|
|
712
712
|
default:
|
|
713
|
-
case
|
|
714
|
-
return
|
|
715
|
-
case
|
|
716
|
-
return
|
|
717
|
-
case
|
|
718
|
-
return
|
|
713
|
+
case le.Categorical:
|
|
714
|
+
return Kn(t) ? t : Jn(t, r);
|
|
715
|
+
case le.Sequential:
|
|
716
|
+
return Qn(t, r);
|
|
717
|
+
case le.Divergent:
|
|
718
|
+
return qn(t, r);
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
721
|
+
function er(t, e, r = Zn, n) {
|
|
722
|
+
return st(t, r) ? t : (n > 4 && (ne(J.ColorLoop), n = n % 5), st(e, r) ? ct(e, r, n) : ct(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,
|
|
@@ -739,23 +739,23 @@ const qe = (t = null) => ({
|
|
|
739
739
|
},
|
|
740
740
|
color: {
|
|
741
741
|
type: String,
|
|
742
|
-
default:
|
|
742
|
+
default: X.Skyblue
|
|
743
743
|
},
|
|
744
744
|
title: {
|
|
745
745
|
type: String,
|
|
746
746
|
default: null
|
|
747
747
|
}
|
|
748
748
|
});
|
|
749
|
-
function
|
|
750
|
-
const
|
|
749
|
+
function rt(t, e, r, n, a) {
|
|
750
|
+
const o = we({
|
|
751
751
|
width: 0,
|
|
752
752
|
height: 0
|
|
753
|
-
}),
|
|
753
|
+
}), u = crypto.randomUUID(), i = f(() => {
|
|
754
754
|
var s;
|
|
755
|
-
return t.value.length > 5 &&
|
|
755
|
+
return t.value.length > 5 && ne(J.DatasetLength), (s = t.value) == null ? void 0 : s.map(
|
|
756
756
|
(v, m) => {
|
|
757
|
-
if (
|
|
758
|
-
const
|
|
757
|
+
if (nr(v)) return v;
|
|
758
|
+
const h = tr(v.values), g = er(
|
|
759
759
|
v.color,
|
|
760
760
|
r == null ? void 0 : r.value,
|
|
761
761
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -763,26 +763,26 @@ function et(t, e, r, n, a) {
|
|
|
763
763
|
);
|
|
764
764
|
return {
|
|
765
765
|
...v,
|
|
766
|
-
values:
|
|
767
|
-
color:
|
|
766
|
+
values: h,
|
|
767
|
+
color: g,
|
|
768
768
|
__internal: !0
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
}), l = f(() => Array.isArray(e.value) ? e.value :
|
|
772
|
+
}), l = f(() => Array.isArray(e.value) ? e.value : Ht(t.value).map((s, v) => v));
|
|
773
773
|
function c(s) {
|
|
774
|
-
const v = (a == null ? void 0 : a.value) === O.HORIZONTAL && l.value.length * (((n == null ? void 0 : n.value.barHeight) ||
|
|
775
|
-
|
|
774
|
+
const v = (a == null ? void 0 : a.value) === O.HORIZONTAL && l.value.length * (((n == null ? void 0 : n.value.barHeight) || it) * 2) + ((n == null ? void 0 : n.value.barHeight) || it) || s.height;
|
|
775
|
+
o.width = s.width, o.height = v;
|
|
776
776
|
}
|
|
777
777
|
return {
|
|
778
|
-
chartID:
|
|
778
|
+
chartID: u,
|
|
779
779
|
computedLabels: l,
|
|
780
|
-
containerSize:
|
|
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), u = I(null);
|
|
797
797
|
function i() {
|
|
798
|
-
var s, v, m,
|
|
798
|
+
var s, v, m, h;
|
|
799
799
|
const { width: l, height: c } = r;
|
|
800
|
-
!l && !c || (n.value === O.HORIZONTAL ? (
|
|
800
|
+
!l && !c || (n.value === O.HORIZONTAL ? (o.value = (s = t.value) != null && s.length ? vt(
|
|
801
801
|
t.value,
|
|
802
802
|
l,
|
|
803
803
|
n.value,
|
|
804
804
|
a.value.startOnZero
|
|
805
|
-
) : null,
|
|
805
|
+
) : null, u.value = (v = e.value) != null && v.length ? dt(
|
|
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 ? dt(
|
|
811
811
|
e.value,
|
|
812
812
|
l,
|
|
813
813
|
n.value,
|
|
814
814
|
a.value
|
|
815
|
-
) : null,
|
|
815
|
+
) : null, u.value = (h = t.value) != null && h.length ? vt(
|
|
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 Nt(i), { xScale: o, yScale: u };
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
const a = [0, e], { padding:
|
|
824
|
+
function dt(t, e, r, n) {
|
|
825
|
+
const a = [0, e], { padding: o, paddingInner: u, paddingOuter: i } = n, l = o ?? (r === O.HORIZONTAL ? Rt : Pt);
|
|
826
826
|
return Object.assign(
|
|
827
|
-
|
|
827
|
+
ke().range(a).paddingInner(u ?? l).paddingOuter(i ?? l).domain(t.map((c, s) => s)),
|
|
828
828
|
{ labels: t }
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
const a =
|
|
831
|
+
function vt(t, e, r, n) {
|
|
832
|
+
const a = wt(t).filter((s) => s != null), o = [0, e];
|
|
833
833
|
if (a.length === 0)
|
|
834
|
-
return
|
|
835
|
-
const
|
|
834
|
+
return be().range(o).domain([0, 0]).nice();
|
|
835
|
+
const u = Math.min(...a), i = n && u > 0 ? 0 : u;
|
|
836
836
|
let l = Math.max(...a);
|
|
837
837
|
n && l < 0 && (l = 0);
|
|
838
838
|
const c = r === O.HORIZONTAL ? [i, l] : [l, i];
|
|
839
|
-
return
|
|
839
|
+
return be().range(o).domain(c).nice();
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function ft(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 pt(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 ? Rt : Pt);
|
|
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 fe = (t, e = !0) => ({
|
|
859
|
+
...nt(t),
|
|
860
|
+
...rr(),
|
|
861
|
+
...xe(),
|
|
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
|
+
...xe(),
|
|
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 ur() {
|
|
886
|
+
const t = I(), e = we({
|
|
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
|
+
}), Et(() => {
|
|
896
896
|
r.unobserve(t.value);
|
|
897
897
|
}), { resizeState: e, resizeRef: t };
|
|
898
898
|
}
|
|
899
|
-
const
|
|
899
|
+
const lr = /* @__PURE__ */ P({
|
|
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 } = j(r), o = I(null), { resizeRef: u, resizeState: i } = ur(), l = f(
|
|
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 Nt(() => {
|
|
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 v = c - n.value.left - n.value.right, m = s - n.value.top - n.value.bottom,
|
|
934
|
+
const v = c - n.value.left - n.value.right, m = s - n.value.top - n.value.bottom, h = {
|
|
935
935
|
width: v > 0 ? v : 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: u, resizeState: i, svgHeight: l };
|
|
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
|
+
lr,
|
|
959
|
+
ir,
|
|
960
|
+
sr,
|
|
961
961
|
!1,
|
|
962
962
|
null,
|
|
963
963
|
"d53cdc3e"
|
|
964
964
|
);
|
|
965
|
-
const
|
|
965
|
+
const dr = cr.exports, vr = /* @__PURE__ */ P({
|
|
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(u) {
|
|
985
|
+
return n.emit("click", { index: o, dataset: a, event: u });
|
|
986
|
+
}, mouseenter: function(u) {
|
|
987
|
+
return n.emit("mouseenter", { index: o, dataset: a, event: u });
|
|
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
|
+
}, Ar = [], Tr = /* @__PURE__ */ S(
|
|
1015
|
+
xr,
|
|
1016
|
+
Lr,
|
|
1017
|
+
Ar,
|
|
1018
1018
|
!1,
|
|
1019
1019
|
null,
|
|
1020
1020
|
"4ed7ec1b"
|
|
1021
1021
|
);
|
|
1022
|
-
const
|
|
1022
|
+
const Or = Tr.exports, Ir = /* @__PURE__ */ P({
|
|
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__ */ P({
|
|
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,11 +1082,11 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1082
1082
|
type: String,
|
|
1083
1083
|
default: null
|
|
1084
1084
|
},
|
|
1085
|
-
...
|
|
1085
|
+
...xe()
|
|
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:
|
|
1089
|
+
const r = t, n = I(null), { items: a, options: o } = j(r), u = Z(), i = I(null), { allOptions: l } = Q(o), c = f(
|
|
1090
1090
|
() => l.value.fixedPositioning ?? r.fixedPositioning
|
|
1091
1091
|
), s = f(
|
|
1092
1092
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -1105,16 +1105,16 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1105
1105
|
...r.modifiers || []
|
|
1106
1106
|
]), m = f(
|
|
1107
1107
|
() => l.value.showTitle !== !1 && r.title != null
|
|
1108
|
-
),
|
|
1108
|
+
), h = f(() => Ne(l.value.valueFormat)), g = f(() => Ne(l.value.titleFormat)), _ = f(
|
|
1109
1109
|
() => {
|
|
1110
1110
|
var A;
|
|
1111
|
-
return ((A = a.value) == null ? void 0 : A.find((
|
|
1111
|
+
return ((A = a.value) == null ? void 0 : A.find((N) => N.isSummary)) || {
|
|
1112
1112
|
label: l.value.summary ?? r.summary
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
|
-
), x = f(() =>
|
|
1115
|
+
), x = f(() => u.summary || _.value.label), d = f(() => r.inverse || l.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
1120
|
modifiers: v.value
|
|
@@ -1130,13 +1130,13 @@ const Ir = Or.exports, Er = /* @__PURE__ */ R({
|
|
|
1130
1130
|
}
|
|
1131
1131
|
return H(
|
|
1132
1132
|
() => r.targetElement,
|
|
1133
|
-
async (A,
|
|
1134
|
-
|
|
1133
|
+
async (A, N) => {
|
|
1134
|
+
!N && A ? (await Ce(), p()) : b();
|
|
1135
1135
|
}
|
|
1136
|
-
),
|
|
1136
|
+
), re(p), Et(y), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: u, popper: i, allOptions: l, computedFixedPositioning: c, strategy: s, allModifiers: v, showTitle: m, formatValue: h, formatTitle: g, summaryItem: _, hasSummary: x, computedItems: d, initPopper: p, destroyPopper: y, updatePopper: b, 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, He = () => ({
|
|
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
|
+
}), Cr = /* @__PURE__ */ P({
|
|
1215
1215
|
__name: "lume-overlay-group",
|
|
1216
1216
|
props: {
|
|
1217
|
-
...
|
|
1217
|
+
...He(),
|
|
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:
|
|
1225
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: u } = j(r), i = f(() => Ht(n));
|
|
1226
1226
|
function l(c) {
|
|
1227
1227
|
var x;
|
|
1228
|
-
const s = a.value === O.HORIZONTAL ?
|
|
1228
|
+
const s = a.value === O.HORIZONTAL ? u.value : o.value, v = s.domain(), m = mn(s), h = ((x = s.paddingInner) == null ? void 0 : x.call(s)) ?? 0, g = m * h, _ = K(s) ? s(v[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(...u.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: u, overlayData: i, getOverlayBarAttributes: l, LumeBar: Qe };
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
1242
|
-
var
|
|
1242
|
+
var Br = 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(u) {
|
|
1246
|
+
return n.emit("lume__internal--hover", o);
|
|
1247
|
+
}, click: function(u) {
|
|
1248
|
+
return n.emit("click", { index: o, event: u });
|
|
1249
|
+
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1250
1250
|
}), 1);
|
|
1251
|
-
},
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1251
|
+
}, Fr = [], Gr = /* @__PURE__ */ S(
|
|
1252
|
+
Cr,
|
|
1253
|
+
Br,
|
|
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,35 +1285,35 @@ 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, ...u) {
|
|
1289
1289
|
document.dispatchEvent(
|
|
1290
|
-
new CustomEvent(`${e}_${
|
|
1291
|
-
detail: [...
|
|
1290
|
+
new CustomEvent(`${e}_${o}`, {
|
|
1291
|
+
detail: [...u]
|
|
1292
1292
|
})
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
|
-
function n(
|
|
1295
|
+
function n(o, u) {
|
|
1296
1296
|
document.addEventListener(
|
|
1297
|
-
`${e}_${
|
|
1298
|
-
(i) =>
|
|
1297
|
+
`${e}_${o}`,
|
|
1298
|
+
(i) => u(...i.detail)
|
|
1299
1299
|
);
|
|
1300
1300
|
}
|
|
1301
|
-
return { componentEventPropagator:
|
|
1301
|
+
return { componentEventPropagator: Vr.reduce((o, u) => (o[u] = (i) => t(u, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1302
1302
|
};
|
|
1303
|
-
function
|
|
1303
|
+
function Mr(t) {
|
|
1304
1304
|
return { hasNegativeValues: f(
|
|
1305
|
-
() =>
|
|
1305
|
+
() => wt(t.value).some((r) => r < 0)
|
|
1306
1306
|
) };
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function zr(t, e, r, n) {
|
|
1309
1309
|
const a = f(
|
|
1310
1310
|
() => n.value === O.HORIZONTAL
|
|
1311
|
-
),
|
|
1311
|
+
), o = f(
|
|
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
|
+
), u = f(
|
|
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;
|
|
@@ -1325,28 +1325,28 @@ function Fr(t, e, r, n) {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
1327
1327
|
return { negativeBarAttributes: f(() => ({
|
|
1328
|
-
width:
|
|
1329
|
-
height:
|
|
1328
|
+
width: u.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 u = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1342
|
+
return r[o] ? r[o] + u : u;
|
|
1343
1343
|
}
|
|
1344
1344
|
), []);
|
|
1345
1345
|
}
|
|
1346
|
-
const
|
|
1347
|
-
"stacked-bar":
|
|
1346
|
+
const mt = {
|
|
1347
|
+
"stacked-bar": Ur
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1349
|
+
function Gt(t, e, r, n, a, o, u, i) {
|
|
1350
1350
|
const l = f(
|
|
1351
1351
|
() => {
|
|
1352
1352
|
var s;
|
|
@@ -1354,26 +1354,26 @@ function Ct(t, e, r, n, a, u, o, i) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
);
|
|
1356
1356
|
function c(s) {
|
|
1357
|
-
var
|
|
1358
|
-
const v = ((
|
|
1357
|
+
var h;
|
|
1358
|
+
const v = ((h = a == null ? void 0 : a.value) == null ? void 0 : h.length) ?? 0, m = i != null && i.value && mt[i.value] ? mt[i.value](
|
|
1359
1359
|
s,
|
|
1360
1360
|
v
|
|
1361
|
-
) :
|
|
1362
|
-
t.value = m.map((
|
|
1363
|
-
cx: (
|
|
1364
|
-
cy: (
|
|
1361
|
+
) : Wr(s, v);
|
|
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 && (u != null && u.value) && l.value && c(u.value);
|
|
1371
1371
|
},
|
|
1372
1372
|
{ immediate: !0 }
|
|
1373
1373
|
), { shouldGenerateTooltipAnchors: l, updateTooltipAnchorAttributes: c };
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
const t =
|
|
1375
|
+
function Zr() {
|
|
1376
|
+
const t = we({
|
|
1377
1377
|
opened: !1,
|
|
1378
1378
|
targetElement: null
|
|
1379
1379
|
});
|
|
@@ -1383,78 +1383,78 @@ function Mr() {
|
|
|
1383
1383
|
t.opened = !1, t.targetElement = null;
|
|
1384
1384
|
} };
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function Xr(t) {
|
|
1387
1387
|
return { getTooltipItems: f(
|
|
1388
|
-
() => (r) => t.value.map(({ color: n, label: a, values:
|
|
1389
|
-
var
|
|
1388
|
+
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1389
|
+
var u, i, l;
|
|
1390
1390
|
return {
|
|
1391
|
-
color: ((
|
|
1391
|
+
color: ((u = o[r]) == null ? void 0 : u.color) || n,
|
|
1392
1392
|
label: a,
|
|
1393
|
-
value: ((i =
|
|
1393
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((l = o[r]) == null ? void 0 : l.value) ?? St
|
|
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__ */ P({
|
|
1425
1425
|
__name: "lume-chart",
|
|
1426
1426
|
props: {
|
|
1427
|
-
...
|
|
1427
|
+
...fe(),
|
|
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 =
|
|
1434
|
+
const r = t, n = Z(), { data: a, labels: o, color: u, options: i, orientation: l, chartType: c } = j(r), s = I(-1), v = I(null), m = I(null), h = I([]), g = I(null), _ = I(0), x = I(0), { allOptions: d } = Q(i), { internalData: p, computedLabels: y, containerSize: b, updateSize: A, chartID: N } = rt(a, o, u, d, l), { listenInternalEvent: T } = q(e, N), { xScale: $, yScale: R } = ar(
|
|
1435
1435
|
p,
|
|
1436
1436
|
y,
|
|
1437
1437
|
b,
|
|
1438
1438
|
l,
|
|
1439
1439
|
d
|
|
1440
|
-
),
|
|
1441
|
-
top:
|
|
1442
|
-
right:
|
|
1443
|
-
bottom:
|
|
1444
|
-
left:
|
|
1440
|
+
), G = f(() => ({
|
|
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
1445
|
})), V = f(() => {
|
|
1446
1446
|
var k;
|
|
1447
|
-
return r.xScale ?
|
|
1447
|
+
return r.xScale ? ft(r.xScale) ? r.xScale : (k = r.xScale) == null ? void 0 : k.call(r, p.value, o.value, b) : $.value;
|
|
1448
1448
|
}), ee = f(() => {
|
|
1449
1449
|
var k;
|
|
1450
|
-
return r.yScale ?
|
|
1451
|
-
}),
|
|
1450
|
+
return r.yScale ? ft(r.yScale) ? r.yScale : (k = r.yScale) == null ? void 0 : k.call(r, p.value, o.value, b) : R.value;
|
|
1451
|
+
}), ce = f(() => ({
|
|
1452
1452
|
...d.value.xAxisOptions,
|
|
1453
1453
|
withHover: l.value === O.VERTICAL
|
|
1454
|
-
})),
|
|
1454
|
+
})), ae = f(() => ({
|
|
1455
1455
|
...d.value.yAxisOptions,
|
|
1456
1456
|
withHover: l.value === O.HORIZONTAL
|
|
1457
|
-
})),
|
|
1457
|
+
})), oe = f(() => {
|
|
1458
1458
|
var k;
|
|
1459
1459
|
return (k = d.value.xAxisOptions) == null ? void 0 : k.title;
|
|
1460
1460
|
}), ue = f(() => {
|
|
@@ -1462,95 +1462,95 @@ const Yr = /* @__PURE__ */ R({
|
|
|
1462
1462
|
return (k = d.value.yAxisOptions) == null ? void 0 : k.title;
|
|
1463
1463
|
}), E = f(() => {
|
|
1464
1464
|
var k;
|
|
1465
|
-
return ((k = d.value.xAxisOptions) == null ? void 0 : k.withTitle) !== !1 &&
|
|
1465
|
+
return ((k = d.value.xAxisOptions) == null ? void 0 : k.withTitle) !== !1 && oe.value;
|
|
1466
1466
|
}), w = f(() => {
|
|
1467
1467
|
var k;
|
|
1468
1468
|
return ((k = d.value.yAxisOptions) == null ? void 0 : k.withTitle) !== !1 && ue.value;
|
|
1469
|
-
}),
|
|
1470
|
-
() => a.value.every((k) => !k.values.length) || a.value.every((k) => k.values.every((
|
|
1471
|
-
),
|
|
1472
|
-
const k = [], { noBaseScales:
|
|
1473
|
-
return
|
|
1474
|
-
}), { hasNegativeValues:
|
|
1469
|
+
}), C = f(
|
|
1470
|
+
() => a.value.every((k) => !k.values.length) || a.value.every((k) => k.values.every((F) => F === null))
|
|
1471
|
+
), te = f(() => {
|
|
1472
|
+
const k = [], { noBaseScales: F } = d.value;
|
|
1473
|
+
return F || k.push(() => !!(V.value && ee.value)), k.every((U) => U() === !0);
|
|
1474
|
+
}), { hasNegativeValues: me } = Mr(p), { negativeBarAttributes: Se } = zr(
|
|
1475
1475
|
b,
|
|
1476
1476
|
V,
|
|
1477
1477
|
ee,
|
|
1478
1478
|
l
|
|
1479
|
-
), { shouldGenerateTooltipAnchors:
|
|
1480
|
-
|
|
1479
|
+
), { shouldGenerateTooltipAnchors: _e } = Gt(
|
|
1480
|
+
h,
|
|
1481
1481
|
d,
|
|
1482
1482
|
V,
|
|
1483
1483
|
ee,
|
|
1484
|
-
|
|
1484
|
+
o,
|
|
1485
1485
|
l,
|
|
1486
1486
|
p,
|
|
1487
1487
|
c
|
|
1488
|
-
), { tooltipConfig:
|
|
1488
|
+
), { tooltipConfig: L, showTooltip: D, hideTooltip: B } = Zr(), { getTooltipItems: M } = Xr(p), Y = f(
|
|
1489
1489
|
() => {
|
|
1490
1490
|
var k;
|
|
1491
1491
|
return ((k = d.value.tooltipOptions) == null ? void 0 : k.position) || "top";
|
|
1492
1492
|
}
|
|
1493
|
-
),
|
|
1494
|
-
var
|
|
1495
|
-
const k = (
|
|
1496
|
-
return
|
|
1493
|
+
), z = f(() => {
|
|
1494
|
+
var F;
|
|
1495
|
+
const k = (F = d.value.tooltipOptions) == null ? void 0 : F.withPointerEvents;
|
|
1496
|
+
return L.opened && (!k || k && g.value === !1);
|
|
1497
1497
|
});
|
|
1498
|
-
function
|
|
1499
|
-
var
|
|
1498
|
+
function ge(k) {
|
|
1499
|
+
var U;
|
|
1500
1500
|
if (d.value.withHover === !1 || k === s.value) return;
|
|
1501
|
-
const
|
|
1501
|
+
const F = s.value;
|
|
1502
1502
|
if (s.value = k, d.value.withTooltip !== !1) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1503
|
+
const Kt = (U = d.value.tooltipOptions) != null && U.targetElement ? d.value.tooltipOptions.targetElement === "self" ? m.value.$el : d.value.tooltipOptions.targetElement : v.value[k];
|
|
1504
|
+
D(Kt);
|
|
1505
1505
|
}
|
|
1506
|
-
e("hovered-index-changed", { newIndex: k, oldIndex:
|
|
1506
|
+
e("hovered-index-changed", { newIndex: k, oldIndex: F }), e("update:hoveredIndex", k);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1508
|
+
function de() {
|
|
1509
|
+
B(), s.value = -1, e("update:hoveredIndex", -1);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function he(k) {
|
|
1512
1512
|
if (!a.value.some(
|
|
1513
|
-
({ values:
|
|
1513
|
+
({ values: U }) => k <= U.length - 1
|
|
1514
1514
|
)) {
|
|
1515
|
-
|
|
1515
|
+
ne(J.InvalidHoveredIndex);
|
|
1516
1516
|
return;
|
|
1517
1517
|
}
|
|
1518
|
-
k == null || k === -1 ?
|
|
1518
|
+
k == null || k === -1 ? de() : ge(k);
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function Te() {
|
|
1521
1521
|
setTimeout(() => {
|
|
1522
|
-
|
|
1522
|
+
z.value && de(), e("chart-mouseleave");
|
|
1523
1523
|
}, 0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function Oe(k) {
|
|
1526
1526
|
A(k), e("resize", k);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
k !== null &&
|
|
1528
|
+
function ve({ index: k, value: F, event: U }) {
|
|
1529
|
+
k !== null && ge(k), e("axis-mouseenter", { index: k, value: F, event: U });
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1532
|
-
e("axis-click", { index: k, value:
|
|
1531
|
+
function Yt({ index: k, value: F, event: U }) {
|
|
1532
|
+
e("axis-click", { index: k, value: F, event: U });
|
|
1533
1533
|
}
|
|
1534
1534
|
return H(
|
|
1535
1535
|
a,
|
|
1536
|
-
(k,
|
|
1536
|
+
(k, F) => e("data-changed", { newValue: k, oldValue: F })
|
|
1537
1537
|
), H(
|
|
1538
|
-
|
|
1539
|
-
(k,
|
|
1540
|
-
), H(
|
|
1541
|
-
|
|
1538
|
+
o,
|
|
1539
|
+
(k, F) => e("labels-changed", { newValue: k, oldValue: F })
|
|
1540
|
+
), H(C, (k) => k && ne(J.Empty), { immediate: !0 }), H(() => r.hoveredIndex, he), H(
|
|
1541
|
+
h,
|
|
1542
1542
|
(k) => {
|
|
1543
|
-
k && r.hoveredIndex != null && s.value === -1 &&
|
|
1543
|
+
k && r.hoveredIndex != null && s.value === -1 && he(r.hoveredIndex);
|
|
1544
1544
|
},
|
|
1545
1545
|
{ flush: "post" }
|
|
1546
|
-
), H(
|
|
1547
|
-
k === !1 &&
|
|
1548
|
-
}),
|
|
1549
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), T("lume__internal--hover",
|
|
1550
|
-
}),
|
|
1546
|
+
), H(g, (k) => {
|
|
1547
|
+
k === !1 && L.opened && de();
|
|
1548
|
+
}), re(async () => {
|
|
1549
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), T("lume__internal--hover", ge);
|
|
1550
|
+
}), Pe("chartID", N), Pe("isEmpty", C), Pe("tooltipAnchorAttributes", h), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: u, options: i, orientation: l, chartType: c, internalHoveredIndex: s, tooltipAnchor: v, chartContainer: m, tooltipAnchorAttributes: h, isHoveringTooltip: g, xAxisHeight: _, yAxisWidth: x, allOptions: d, internalData: p, computedLabels: y, containerSize: b, updateSize: A, chartID: N, listenInternalEvent: T, xScale: $, yScale: R, computedMargins: G, computedXScale: V, computedYScale: ee, computedXAxisOptions: ce, computedYAxisOptions: ae, xAxisTitle: oe, yAxisTitle: ue, showXAxisTitle: E, showYAxisTitle: w, isEmpty: C, isReady: te, hasNegativeValues: me, negativeBarAttributes: Se, shouldGenerateTooltipAnchors: _e, tooltipConfig: L, showTooltip: D, hideTooltip: B, getTooltipItems: M, tooltipPosition: Y, shouldHideTooltip: z, handleInternalHover: ge, handleHideTooltip: de, handleExternalHover: he, handleMouseleave: Te, handleResize: Oe, handleAxisMouseenter: ve, handleAxisClick: Yt, 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 pe = na.exports, _t = 8, ra = 8, aa = 20, ye = 2, oa = 3, ua = 4, gt = 2, la = /* @__PURE__ */ P({
|
|
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: l, height: c } =
|
|
1634
|
-
a.value = l +
|
|
1630
|
+
async ([u, i]) => {
|
|
1631
|
+
if (u && i) {
|
|
1632
|
+
a.value = i, await Ce();
|
|
1633
|
+
const { width: l, height: c } = u.getBoundingClientRect();
|
|
1634
|
+
a.value = l + gt > i ? i : l + gt, 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 (u) => {
|
|
1639
|
+
u !== r.maxWidth && (await Ce(), 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
|
+
la,
|
|
1648
|
+
ia,
|
|
1649
|
+
sa,
|
|
1650
1650
|
!1,
|
|
1651
1651
|
null,
|
|
1652
1652
|
"7126dfdb"
|
|
1653
1653
|
);
|
|
1654
|
-
const
|
|
1654
|
+
const da = ca.exports, va = /* @__PURE__ */ P({
|
|
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__ */ P({
|
|
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 = f(() => {
|
|
1686
|
+
var i;
|
|
1687
|
+
return ((i = r.value) == null ? void 0 : i.getBBox().width) ?? 0;
|
|
1688
|
+
}), a = f(() => e.align === "left" ? 0 : e.align === "right" ? -n.value : -n.value / 2), o = f(
|
|
1689
|
+
() => r.value && `translate(${a.value}, 0)`
|
|
1690
|
+
), u = f(
|
|
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: u };
|
|
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 ht(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(ht(t));
|
|
1711
1720
|
function r(n) {
|
|
1712
|
-
e.value =
|
|
1721
|
+
e.value = ht(t, n);
|
|
1713
1722
|
}
|
|
1714
1723
|
return { extents: e, updateExtents: r };
|
|
1715
1724
|
}
|
|
1716
|
-
var
|
|
1717
|
-
const
|
|
1718
|
-
function
|
|
1719
|
-
r &&
|
|
1725
|
+
var Ee = /* @__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))(Ee || {});
|
|
1726
|
+
const La = "[lume] ";
|
|
1727
|
+
function Ue(t, e, r = !0) {
|
|
1728
|
+
r && $t() || console.error(La + "Error: " + t, e);
|
|
1720
1729
|
}
|
|
1721
|
-
const
|
|
1722
|
-
function
|
|
1730
|
+
const Aa = 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 Ta(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 jt(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 Vt(t) {
|
|
1749
|
+
return t.layer === 0;
|
|
1750
|
+
}
|
|
1751
|
+
function Mt(t, e) {
|
|
1752
|
+
return t.parentNodeId == null && t.layer === e;
|
|
1753
|
+
}
|
|
1754
|
+
function zt(t, e, r) {
|
|
1755
|
+
return Vt(t) ? e.alignFirstNodeLabels !== "right" : Mt(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((l) => Vt(l)).map((l) => `${l.id}`), o = t.nodes.filter((l) => Mt(l, n)).map((l) => `${l.id}`), u = e.filter((l) => a.includes(l.dataset.id)).reduce(
|
|
1760
|
+
(l, c) => Math.max(l, c.getBBox().width),
|
|
1738
1761
|
-1 / 0
|
|
1739
|
-
),
|
|
1740
|
-
(
|
|
1762
|
+
), i = e.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1763
|
+
(l, c) => Math.max(l, c.getBBox().width),
|
|
1741
1764
|
-1 / 0
|
|
1742
1765
|
);
|
|
1743
1766
|
return {
|
|
1744
|
-
left:
|
|
1767
|
+
left: r.alignFirstNodeLabels === "right" ? 0 : u,
|
|
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 < ye;
|
|
1753
1777
|
return {
|
|
1754
|
-
x:
|
|
1755
|
-
y:
|
|
1778
|
+
x: n.x0,
|
|
1779
|
+
y: n.y0 - (a ? ye / 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 ? ye : n.y1 - n.y0,
|
|
1759
1783
|
textTransform: {
|
|
1760
|
-
x: e
|
|
1761
|
-
y: (
|
|
1784
|
+
x: zt(n, e, r) ? n.x0 - _t : n.x1 + _t,
|
|
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) || Ae,
|
|
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 yt(t, e, r, n, a) {
|
|
1789
1813
|
if (n === !1) {
|
|
1790
1814
|
t.node = {
|
|
1791
1815
|
...t.node,
|
|
@@ -1793,17 +1817,17 @@ 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(), u = bn(e, r), i = () => {
|
|
1821
|
+
let c = (Date.now() - o) / Aa;
|
|
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 : u(c)
|
|
1801
1825
|
}, c < 1 && requestAnimationFrame(i);
|
|
1802
1826
|
};
|
|
1803
1827
|
requestAnimationFrame(i);
|
|
1804
1828
|
}
|
|
1805
|
-
const
|
|
1806
|
-
function
|
|
1829
|
+
const Ha = ":aggregated";
|
|
1830
|
+
function Sa(t) {
|
|
1807
1831
|
const e = I([]), r = f(() => {
|
|
1808
1832
|
var c, s;
|
|
1809
1833
|
const l = /* @__PURE__ */ new Map();
|
|
@@ -1821,43 +1845,43 @@ function Na(t) {
|
|
|
1821
1845
|
function a(l) {
|
|
1822
1846
|
return r.value.has(l);
|
|
1823
1847
|
}
|
|
1824
|
-
function
|
|
1848
|
+
function o(l) {
|
|
1825
1849
|
return n.value.has(l);
|
|
1826
1850
|
}
|
|
1827
|
-
function
|
|
1851
|
+
function u(l) {
|
|
1828
1852
|
return e.value.includes(l);
|
|
1829
1853
|
}
|
|
1830
1854
|
function i(l) {
|
|
1831
|
-
a(l) && (e.value =
|
|
1855
|
+
a(l) && (e.value = u(l) ? e.value.filter((c) => c !== l) : [...e.value, l]);
|
|
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: u,
|
|
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((
|
|
1871
|
+
(u) => !n.has(W(u.source)) && !n.has(W(u.target))
|
|
1872
|
+
), o = new Set(a.map(({ id: u }) => u));
|
|
1873
|
+
return r.forEach((u, i) => {
|
|
1850
1874
|
const l = /* @__PURE__ */ new Map();
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
const v =
|
|
1875
|
+
u.forEach((c) => {
|
|
1876
|
+
Wt(e, c).forEach((s) => {
|
|
1877
|
+
const v = W(s.target), m = l.get(v);
|
|
1854
1878
|
if (m) {
|
|
1855
1879
|
m.value += s.value;
|
|
1856
1880
|
return;
|
|
1857
1881
|
}
|
|
1858
|
-
const
|
|
1882
|
+
const h = `${i}:${v}`;
|
|
1859
1883
|
l.set(v, {
|
|
1860
|
-
id:
|
|
1884
|
+
id: o.has(h) ? `${h}${Ha}` : h,
|
|
1861
1885
|
aggregatedFrom: i,
|
|
1862
1886
|
color: s.color,
|
|
1863
1887
|
curveFunction: s.curveFunction,
|
|
@@ -1868,62 +1892,62 @@ function wa(t, e, r, n) {
|
|
|
1868
1892
|
});
|
|
1869
1893
|
}), a.push(...l.values());
|
|
1870
1894
|
}), {
|
|
1871
|
-
nodes: t.filter((
|
|
1895
|
+
nodes: t.filter((u) => !n.has(u.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: u
|
|
1883
1907
|
}) {
|
|
1884
1908
|
var i;
|
|
1885
1909
|
(i = t == null ? void 0 : t.nodes) != null && i.length && n.forEach((l) => {
|
|
1886
1910
|
const c = t.nodes.find((v) => v.id === l), s = (a.get(l) ?? []).map((v) => e.find((m) => m.id === v)).filter(Boolean);
|
|
1887
|
-
!c || !s.length ||
|
|
1911
|
+
!c || !s.length || Ca({ graph: t, parent: c, children: s, linkDefinitions: r, options: o, extents: u });
|
|
1888
1912
|
});
|
|
1889
1913
|
}
|
|
1890
|
-
function
|
|
1914
|
+
function Ca({
|
|
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 u = r.map(
|
|
1923
|
+
(s) => za(n, e, s)
|
|
1924
|
+
), i = u.reduce((s, v) => s + v, 0);
|
|
1901
1925
|
if (!i) return;
|
|
1902
1926
|
const l = (e.y1 - e.y0) / i;
|
|
1903
|
-
|
|
1927
|
+
Ba({
|
|
1904
1928
|
parent: e,
|
|
1905
1929
|
children: r,
|
|
1906
|
-
childValues:
|
|
1930
|
+
childValues: u,
|
|
1907
1931
|
scale: l,
|
|
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:
|
|
1939
|
+
childValues: u,
|
|
1916
1940
|
scale: l,
|
|
1917
1941
|
linkDefinitions: n
|
|
1918
1942
|
});
|
|
1919
|
-
|
|
1920
|
-
const v =
|
|
1943
|
+
Ma(t, e).forEach((s) => {
|
|
1944
|
+
const v = Va({
|
|
1921
1945
|
children: r,
|
|
1922
1946
|
aggregatedLink: s,
|
|
1923
1947
|
scale: l,
|
|
1924
1948
|
linkDefinitions: n
|
|
1925
1949
|
});
|
|
1926
|
-
|
|
1950
|
+
bt(t.links, s, v), bt(
|
|
1927
1951
|
s.target.targetLinks,
|
|
1928
1952
|
s,
|
|
1929
1953
|
v
|
|
@@ -1935,76 +1959,76 @@ function Ha({
|
|
|
1935
1959
|
...c
|
|
1936
1960
|
], t.links.push(...c), t.nodes.push(...r);
|
|
1937
1961
|
}
|
|
1938
|
-
function
|
|
1962
|
+
function Ba({
|
|
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: u
|
|
1946
1970
|
}) {
|
|
1947
|
-
const i = t.x1 - t.x0, l = t.x1, c =
|
|
1971
|
+
const i = t.x1 - t.x0, l = t.x1, c = Wa(a, t) ?? u.x1, s = Math.max(l, l + (c - l - i) / 2), v = r.map((_) => _ * n), m = Fa(e, o.nodePadding ?? 0), h = [...v, ...m].reduce(
|
|
1948
1972
|
(_, x) => _ + x,
|
|
1949
1973
|
0
|
|
1950
1974
|
);
|
|
1951
|
-
let
|
|
1975
|
+
let g = Ga({ parent: t, children: e, totalHeight: h, extents: u });
|
|
1952
1976
|
e.forEach((_, x) => {
|
|
1953
|
-
|
|
1977
|
+
g += m[x], _.x0 = s, _.x1 = s + i, _.y0 = g, _.y1 = g + v[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 l =
|
|
1982
|
-
id: (l == null ? void 0 : l.id) ?? `${t.id}:${
|
|
2003
|
+
let o = t.y0;
|
|
2004
|
+
return e.map((u, i) => {
|
|
2005
|
+
const l = ut(a, t.id, u.id), c = r[i] * n, s = {
|
|
2006
|
+
id: (l == null ? void 0 : l.id) ?? `${t.id}:${u.id}`,
|
|
1983
2007
|
color: l == null ? void 0 : l.color,
|
|
1984
2008
|
curveFunction: l == null ? void 0 : l.curveFunction,
|
|
1985
2009
|
source: t,
|
|
1986
|
-
target:
|
|
2010
|
+
target: u,
|
|
1987
2011
|
value: r[i],
|
|
1988
2012
|
width: c,
|
|
1989
|
-
y0:
|
|
1990
|
-
y1: (
|
|
2013
|
+
y0: o + c / 2,
|
|
2014
|
+
y1: (u.y0 + u.y1) / 2
|
|
1991
2015
|
};
|
|
1992
|
-
return
|
|
2016
|
+
return o += c, u.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 l =
|
|
2005
|
-
if (!l) return
|
|
2026
|
+
let o = e.y1 - e.width / 2;
|
|
2027
|
+
return t.reduce((u, i) => {
|
|
2028
|
+
const l = ut(n, i.id, a.id);
|
|
2029
|
+
if (!l) return u;
|
|
2006
2030
|
const c = l.value * r, s = i.sourceLinks.reduce(
|
|
2007
|
-
(m, { width:
|
|
2031
|
+
(m, { width: h }) => m + h,
|
|
2008
2032
|
i.y0
|
|
2009
2033
|
), v = {
|
|
2010
2034
|
id: l.id,
|
|
@@ -2015,40 +2039,40 @@ function Ba({
|
|
|
2015
2039
|
value: l.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(v), u.push(v), u;
|
|
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 Wt(t, e) {
|
|
2029
2053
|
return t.filter(
|
|
2030
|
-
(r) =>
|
|
2054
|
+
(r) => W(r.source) === e
|
|
2031
2055
|
);
|
|
2032
2056
|
}
|
|
2033
|
-
function
|
|
2057
|
+
function ut(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 = ut(t, e.id, r.id);
|
|
2064
|
+
return n ? n.value : Wt(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 bt(t, e, r) {
|
|
2052
2076
|
const n = t.indexOf(e);
|
|
2053
2077
|
if (n === -1) {
|
|
2054
2078
|
t.push(...r);
|
|
@@ -2056,42 +2080,42 @@ 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 kt(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: u,
|
|
2074
2098
|
isSubNode: i,
|
|
2075
2099
|
parentIdByChildId: l,
|
|
2076
2100
|
toggleNodeExpansion: c
|
|
2077
|
-
} =
|
|
2101
|
+
} = Sa(t), s = f(() => {
|
|
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
2106
|
color: b,
|
|
2083
2107
|
value: A,
|
|
2084
|
-
deriveColorFromIncomingLinks:
|
|
2108
|
+
deriveColorFromIncomingLinks: N,
|
|
2085
2109
|
expandableNodes: T,
|
|
2086
|
-
offset:
|
|
2110
|
+
offset: $
|
|
2087
2111
|
}) => ({
|
|
2088
2112
|
label: y || A.toString(),
|
|
2089
2113
|
color: b,
|
|
2090
|
-
fallbackColor: b ||
|
|
2114
|
+
fallbackColor: b || Ae,
|
|
2091
2115
|
id: A,
|
|
2092
|
-
deriveColorFromIncomingLinks:
|
|
2116
|
+
deriveColorFromIncomingLinks: N,
|
|
2093
2117
|
expandableNodes: T,
|
|
2094
|
-
offset:
|
|
2118
|
+
offset: $
|
|
2095
2119
|
})
|
|
2096
2120
|
);
|
|
2097
2121
|
}), v = f(
|
|
@@ -2101,135 +2125,135 @@ function za(t, e, r) {
|
|
|
2101
2125
|
(y) => {
|
|
2102
2126
|
var b;
|
|
2103
2127
|
return (b = y.targets) == null ? void 0 : b.map(
|
|
2104
|
-
({ node: A, value:
|
|
2128
|
+
({ node: A, value: N, color: T, curveFunction: $ }) => ({
|
|
2105
2129
|
id: `${y.value}:${A}`,
|
|
2106
2130
|
color: T,
|
|
2107
|
-
curveFunction:
|
|
2131
|
+
curveFunction: $,
|
|
2108
2132
|
source: y.value ?? y.label,
|
|
2109
2133
|
target: A,
|
|
2110
|
-
value:
|
|
2134
|
+
value: N
|
|
2111
2135
|
})
|
|
2112
2136
|
);
|
|
2113
2137
|
}
|
|
2114
2138
|
).filter(Boolean).flat();
|
|
2115
2139
|
}
|
|
2116
|
-
), m = f(() =>
|
|
2140
|
+
), m = f(() => 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 = f(() => {
|
|
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 b =
|
|
2120
|
-
return b ? (b.push(y), b.sort((A,
|
|
2143
|
+
const b = kt(y, p);
|
|
2144
|
+
return b ? (b.push(y), b.sort((A, N) => (A._y0 || A.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 = kt(d, h.value);
|
|
2125
2149
|
if (!y) return;
|
|
2126
|
-
const b = y[y.findIndex((
|
|
2150
|
+
const b = y[y.findIndex((N) => N.id === d.id) - 1], A = b && y.length !== 1 ? b.y1 + p : p;
|
|
2127
2151
|
d._y0 = d.y0, d._y1 = d.y1, d.y0 = A, d.y1 = d.y0 + (d._y1 - d._y0);
|
|
2128
2152
|
}
|
|
2129
2153
|
function _(d, p) {
|
|
2130
|
-
const { id: y, _y0: b, y0: A } = d,
|
|
2131
|
-
(
|
|
2154
|
+
const { id: y, _y0: b, y0: A } = d, N = p.links.filter(
|
|
2155
|
+
(R) => R.source.id === y
|
|
2132
2156
|
), T = p.links.filter(
|
|
2133
|
-
(
|
|
2134
|
-
),
|
|
2135
|
-
|
|
2157
|
+
(R) => R.target.id === y
|
|
2158
|
+
), $ = A - b;
|
|
2159
|
+
N.forEach((R) => R.y0 += $), T.forEach((R) => R.y1 += $);
|
|
2136
2160
|
}
|
|
2137
2161
|
const x = f(() => {
|
|
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
2169
|
const { x0: d, y0: p, x1: y, y1: b } = r.value, A = m.value.extent([
|
|
2146
2170
|
[d, p],
|
|
2147
2171
|
[y, b]
|
|
2148
2172
|
])(
|
|
2149
|
-
|
|
2173
|
+
Pa(
|
|
2150
2174
|
s.value,
|
|
2151
2175
|
v.value,
|
|
2152
2176
|
a.value,
|
|
2153
2177
|
l.value
|
|
2154
2178
|
)
|
|
2155
2179
|
);
|
|
2156
|
-
|
|
2180
|
+
Ra({
|
|
2157
2181
|
graph: A,
|
|
2158
2182
|
nodes: s.value,
|
|
2159
2183
|
linkDefinitions: v.value,
|
|
2160
|
-
expandedNodeIds:
|
|
2184
|
+
expandedNodeIds: o.value,
|
|
2161
2185
|
childIdsByParentId: a.value,
|
|
2162
2186
|
options: e.value,
|
|
2163
2187
|
extents: r.value
|
|
2164
2188
|
}), n.value = A;
|
|
2165
2189
|
} catch (d) {
|
|
2166
|
-
|
|
2190
|
+
Ue(Ee.GraphProblem, d), n.value = Za;
|
|
2167
2191
|
}
|
|
2168
|
-
}), { columns:
|
|
2192
|
+
}), { columns: h, graph: x, isExpandableNode: u, 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
|
+
jt(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 (jt(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
|
|
2246
|
+
function Qa(t, e, r) {
|
|
2223
2247
|
const n = I(null), a = f(() => 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, u) => {
|
|
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 u.nodes && yt(
|
|
2231
2255
|
i,
|
|
2232
|
-
|
|
2256
|
+
u.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 && yt(
|
|
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__ */ P({
|
|
2251
2275
|
__name: "lume-alluvial-group",
|
|
2252
2276
|
props: {
|
|
2253
|
-
...
|
|
2277
|
+
...He(),
|
|
2254
2278
|
hoveredElementId: {
|
|
2255
2279
|
type: [Number, String],
|
|
2256
2280
|
default: null
|
|
@@ -2258,187 +2282,206 @@ 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 =
|
|
2262
|
-
o,
|
|
2285
|
+
const r = t, n = $e("chartID"), { data: a, options: o } = j(r), u = I([]), i = I([]), l = I(null), c = I(null), s = I(null), { extents: v, updateExtents: m } = xa(r.containerSize), { columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x } = Xa(a, o, v), { hoveredElement: d, highlightedElements: p } = Qa(
|
|
2263
2286
|
u,
|
|
2264
|
-
|
|
2265
|
-
|
|
2287
|
+
o,
|
|
2288
|
+
g
|
|
2289
|
+
), y = f(() => Ne(o.value.valueFormat)), b = f(
|
|
2266
2290
|
() => Object.keys(p.value.nodes)
|
|
2267
|
-
), A = f(
|
|
2268
|
-
(
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2291
|
+
), A = f(
|
|
2292
|
+
() => {
|
|
2293
|
+
var L, D;
|
|
2294
|
+
return (D = (L = g.value) == null ? void 0 : L.nodes) != null && D.length ? ot(g.value.nodes) : 0;
|
|
2295
|
+
}
|
|
2296
|
+
), N = f(() => {
|
|
2297
|
+
if (!h.value) return [];
|
|
2298
|
+
const L = h.value.length - 1;
|
|
2299
|
+
return h.value.map(([{ x0: D, x1: B }], M) => M === 0 && o.value.alignFirstNodeLabels === "right" ? { x: D, align: "left" } : M === L && o.value.alignLastNodeLabels === "left" ? { x: B, align: "right" } : { x: (D + B) / 2, align: "center" });
|
|
2300
|
+
}), T = f(() => {
|
|
2301
|
+
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
2302
|
+
return o.value.nodeHeaders.slice(0, N.value.length).map((L, D) => ({
|
|
2272
2303
|
label: L,
|
|
2273
|
-
|
|
2304
|
+
...N.value[D]
|
|
2274
2305
|
}));
|
|
2275
|
-
}),
|
|
2276
|
-
() =>
|
|
2277
|
-
),
|
|
2278
|
-
if (!(!
|
|
2279
|
-
return
|
|
2280
|
-
const { source: B, target:
|
|
2281
|
-
return L[
|
|
2282
|
-
source:
|
|
2306
|
+
}), $ = f(
|
|
2307
|
+
() => o.value.nodeHeaderPadding ?? aa
|
|
2308
|
+
), R = f(() => {
|
|
2309
|
+
if (!(!o.value.gradient || !g.value))
|
|
2310
|
+
return g.value.links.reduce((L, D) => {
|
|
2311
|
+
const { source: B, target: M } = D, Y = B.color || B.fallbackColor, z = M.deriveColorFromIncomingLinks ? Y : M.color || M.fallbackColor;
|
|
2312
|
+
return L[D.id] = {
|
|
2313
|
+
source: Y,
|
|
2283
2314
|
target: z,
|
|
2284
2315
|
x1: B.x1,
|
|
2285
|
-
x2:
|
|
2316
|
+
x2: M.x0
|
|
2286
2317
|
}, L;
|
|
2287
2318
|
}, {});
|
|
2288
|
-
}),
|
|
2289
|
-
const L =
|
|
2290
|
-
(B) =>
|
|
2291
|
-
),
|
|
2319
|
+
}), G = f(() => {
|
|
2320
|
+
const L = u.value.filter(
|
|
2321
|
+
(B) => E(B)
|
|
2322
|
+
), D = [];
|
|
2292
2323
|
return L.forEach((B) => {
|
|
2293
|
-
const
|
|
2294
|
-
i.value.filter(({ link:
|
|
2295
|
-
const
|
|
2296
|
-
let
|
|
2297
|
-
return
|
|
2324
|
+
const M = [];
|
|
2325
|
+
i.value.filter(({ link: Y }) => Y.target.id === B.node.id).reverse().reduce((Y, z, ge, de) => {
|
|
2326
|
+
const he = z.link.target.y1 - z.link.target.y0 > ye;
|
|
2327
|
+
let Te, Oe, ve;
|
|
2328
|
+
return he ? (Te = z.link.target.y1 - z.link.target.y0, Oe = z.link.value / B.node.value, ve = Oe * Te) : ve = ye / de.length, M.push({
|
|
2298
2329
|
x: B.x,
|
|
2299
|
-
y: B.y +
|
|
2300
|
-
height:
|
|
2330
|
+
y: B.y + Y,
|
|
2331
|
+
height: ve,
|
|
2301
2332
|
width: B.width,
|
|
2302
2333
|
key: `node-block-${B.node.id}-source-link-${z.link.source.id}`,
|
|
2303
|
-
class: `lume-alluvial-group__node-block lume-fill--${z.link.source.color ||
|
|
2304
|
-
}),
|
|
2305
|
-
}, 0),
|
|
2334
|
+
class: `lume-alluvial-group__node-block lume-fill--${z.link.source.color || Ae}`
|
|
2335
|
+
}), Y + ve;
|
|
2336
|
+
}, 0), D.push({
|
|
2306
2337
|
id: B.node.id,
|
|
2307
|
-
subNodes:
|
|
2338
|
+
subNodes: M
|
|
2308
2339
|
});
|
|
2309
|
-
}),
|
|
2340
|
+
}), D;
|
|
2310
2341
|
});
|
|
2311
|
-
function j(L) {
|
|
2312
|
-
return u.value.gradient && `url('#${n}_${L.id}')`;
|
|
2313
|
-
}
|
|
2314
2342
|
function V(L) {
|
|
2315
|
-
return
|
|
2343
|
+
return o.value.gradient && `url('#${n}_${L.id}')`;
|
|
2316
2344
|
}
|
|
2317
2345
|
function ee(L) {
|
|
2346
|
+
return b.value.length > 0 && !b.value.includes(L.toString());
|
|
2347
|
+
}
|
|
2348
|
+
function ce(L) {
|
|
2318
2349
|
return b.value.length > 0 && b.value.includes(L.toString());
|
|
2319
2350
|
}
|
|
2320
|
-
function
|
|
2351
|
+
function ae(L) {
|
|
2321
2352
|
return p.value.links.length > 0 && !p.value.links.includes(L);
|
|
2322
2353
|
}
|
|
2323
2354
|
function oe(L) {
|
|
2324
2355
|
return p.value.links.length > 0 && p.value.links.includes(L);
|
|
2325
2356
|
}
|
|
2326
|
-
function
|
|
2357
|
+
function ue(L) {
|
|
2358
|
+
return zt(L, o.value, A.value);
|
|
2359
|
+
}
|
|
2360
|
+
function E(L) {
|
|
2327
2361
|
return !L.node.color && L.node.deriveColorFromIncomingLinks;
|
|
2328
2362
|
}
|
|
2329
|
-
function
|
|
2330
|
-
_(L.id) && x(L.id), e("node-click", { node: L, event:
|
|
2363
|
+
function w(L, D) {
|
|
2364
|
+
_(L.id) && x(L.id), e("node-click", { node: L, event: D });
|
|
2331
2365
|
}
|
|
2332
|
-
function
|
|
2333
|
-
L !== d.value && (d.value = L, e("link-mouseenter", { link: L, event:
|
|
2366
|
+
function C(L, D) {
|
|
2367
|
+
L !== d.value && (d.value = L, e("link-mouseenter", { link: L, event: D }));
|
|
2334
2368
|
}
|
|
2335
|
-
function
|
|
2336
|
-
const
|
|
2337
|
-
d.value = null, e("link-mouseleave", { link:
|
|
2369
|
+
function te(L) {
|
|
2370
|
+
const D = d.value;
|
|
2371
|
+
d.value = null, e("link-mouseleave", { link: D, event: L });
|
|
2338
2372
|
}
|
|
2339
|
-
function
|
|
2373
|
+
function me(L) {
|
|
2340
2374
|
if (L == null) {
|
|
2341
2375
|
d.value = null;
|
|
2342
2376
|
return;
|
|
2343
2377
|
}
|
|
2344
|
-
const
|
|
2345
|
-
if (!
|
|
2346
|
-
|
|
2378
|
+
const D = Ta(L, g.value) || Oa(L, g.value);
|
|
2379
|
+
if (!D) {
|
|
2380
|
+
ne(J.InvalidHoveredElement);
|
|
2347
2381
|
return;
|
|
2348
2382
|
}
|
|
2349
|
-
d.value =
|
|
2383
|
+
d.value = D;
|
|
2350
2384
|
}
|
|
2351
|
-
function
|
|
2352
|
-
var
|
|
2353
|
-
return ((
|
|
2385
|
+
function Se(L) {
|
|
2386
|
+
var D;
|
|
2387
|
+
return ((D = G.value.find(({ id: B }) => L === B)) == null ? void 0 : D.subNodes) ?? [];
|
|
2354
2388
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const L =
|
|
2389
|
+
function _e() {
|
|
2390
|
+
const L = Ia(
|
|
2391
|
+
g.value,
|
|
2392
|
+
l.value,
|
|
2393
|
+
o.value
|
|
2394
|
+
);
|
|
2357
2395
|
m(L);
|
|
2358
2396
|
}
|
|
2359
|
-
return H(
|
|
2360
|
-
|
|
2397
|
+
return H(g, (L) => {
|
|
2398
|
+
u.value = Na(L.nodes, o.value), i.value = Da(L.links).reverse(), d.value == null && r.hoveredElementId != null && me(r.hoveredElementId);
|
|
2361
2399
|
}), H([c, s], () => {
|
|
2362
2400
|
d.value = c.value ?? s.value;
|
|
2363
2401
|
}), H([r.containerSize, l], () => {
|
|
2364
|
-
r.containerSize.width && r.containerSize.height &&
|
|
2365
|
-
}), H(
|
|
2402
|
+
r.containerSize.width && r.containerSize.height && _e();
|
|
2403
|
+
}), H(
|
|
2404
|
+
() => [o.value.alignFirstNodeLabels, o.value.alignLastNodeLabels],
|
|
2405
|
+
_e
|
|
2406
|
+
), H(() => r.hoveredElementId, me), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: u, linkPaths: i, nodeTextRefs: l, pointedNode: c, focusedNode: s, extents: v, updateExtents: m, columns: h, graph: g, isExpandableNode: _, toggleNodeExpansion: x, hoveredElement: d, highlightedElements: p, formatValue: y, hoveredNodeIds: b, lastNodeLayer: A, nodeColumnPositions: N, nodeHeaders: T, computedNodeHeaderPadding: $, gradients: R, nodesDerivingColorFromIncomingLinks: G, getLinkStroke: V, isNodeFaded: ee, isNodeFocused: ce, isLinkFaded: ae, isLinkFocused: oe, isLabelBeforeNode: ue, shouldDeriveNodeColorFromIncomingLinks: E, handleNodeClick: w, handleLinkMouseover: C, handleLinkMouseleave: te, handleExternalHover: me, getSubNodesDerivingColorFromIncomingLinks: Se, updateMargins: _e, LumeAlluvialNodeLabel: da, LumeAlluvialNodeValue: _a, LumeAlluvialNodeHeader: ka, GHOST_STROKE_WIDTH_OFFSET: ra, NODE_OUTLINE_PADDING: oa, NODE_OUTLINE_RADIUS: ua };
|
|
2366
2407
|
}
|
|
2367
2408
|
});
|
|
2368
|
-
var
|
|
2409
|
+
var eo = function() {
|
|
2369
2410
|
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:
|
|
2411
|
+
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
|
|
2412
|
+
return [e._t(`node-header-${o}`, function() {
|
|
2413
|
+
return [r(n.LumeAlluvialNodeHeader, { key: `header_${a.x}`, attrs: { align: a.align, x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")])];
|
|
2414
|
+
}, { align: a.align, x: a.x, y: -n.computedNodeHeaderPadding })];
|
|
2415
|
+
})], 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) {
|
|
2416
|
+
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
2417
|
}), 1) : e._e(), e._l(n.linkPaths, function(a) {
|
|
2377
2418
|
return r("path", { key: `link-ghost_${a.id}`, staticClass: "lume-alluvial-group__link", class: [
|
|
2378
2419
|
"lume-stroke--transparent",
|
|
2379
2420
|
"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,
|
|
2421
|
+
], attrs: { d: a.d, "stroke-width": a.strokeWidth + n.GHOST_STROKE_WIDTH_OFFSET, "data-j-alluvial-ghost": "" }, on: { click: function(o) {
|
|
2422
|
+
return n.emit("link-click", { link: a.link, event: o });
|
|
2423
|
+
}, mouseover: function(o) {
|
|
2424
|
+
return n.handleLinkMouseover(a.link, o);
|
|
2384
2425
|
} } });
|
|
2385
2426
|
}), e._l(n.linkPaths, function(a) {
|
|
2386
2427
|
return r("path", { key: `link_${a.id}`, staticClass: "lume-alluvial-group__link", class: {
|
|
2387
2428
|
[`lume-stroke--${a.color}`]: !n.options.gradient && a.color,
|
|
2388
2429
|
"lume-alluvial-group__link--faded": n.isLinkFaded(a.id),
|
|
2389
2430
|
"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,
|
|
2431
|
+
}, 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) {
|
|
2432
|
+
return n.emit("link-click", { link: a.link, event: o });
|
|
2433
|
+
}, mouseover: function(o) {
|
|
2434
|
+
return n.handleLinkMouseover(a.link, o);
|
|
2394
2435
|
} } });
|
|
2395
|
-
})], 2), e._l(n.nodeBlocks, function(a,
|
|
2396
|
-
return r("g", { key: `node-block_${
|
|
2436
|
+
})], 2), e._l(n.nodeBlocks, function(a, o) {
|
|
2437
|
+
return r("g", { key: `node-block_${o}`, staticClass: "lume-alluvial-group__node", class: {
|
|
2397
2438
|
"lume-alluvial-group__node--expandable": n.isExpandableNode(
|
|
2398
2439
|
a.node.id
|
|
2399
2440
|
),
|
|
2400
2441
|
"lume-alluvial-group__node--faded": n.isNodeFaded(a.node.id),
|
|
2401
2442
|
"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(
|
|
2443
|
+
}, attrs: { "data-j-alluvial-group__node-block": "" } }, [r("g", { attrs: { tabindex: n.isExpandableNode(a.node.id) ? "0" : null }, on: { click: function(u) {
|
|
2444
|
+
return n.handleNodeClick(a.node, u);
|
|
2445
|
+
}, keydown: [function(u) {
|
|
2446
|
+
return !u.type.indexOf("key") && e._k(u.keyCode, "enter", 13, u.key, "Enter") ? null : (u.preventDefault(), n.handleNodeClick(a.node, u));
|
|
2447
|
+
}, function(u) {
|
|
2448
|
+
return !u.type.indexOf("key") && e._k(u.keyCode, "space", 32, u.key, [" ", "Spacebar"]) ? null : (u.preventDefault(), n.handleNodeClick(a.node, u));
|
|
2449
|
+
}], mouseenter: function(u) {
|
|
2450
|
+
return n.emit("node-mouseenter", { node: a.node, event: u });
|
|
2451
|
+
}, mouseleave: function(u) {
|
|
2452
|
+
return n.emit("node-mouseleave", { node: a.node, event: u });
|
|
2453
|
+
}, mouseover: function(u) {
|
|
2413
2454
|
n.pointedNode = a.node;
|
|
2414
|
-
}, mouseout: function(
|
|
2455
|
+
}, mouseout: function(u) {
|
|
2415
2456
|
n.pointedNode = null;
|
|
2416
|
-
}, focus: function(
|
|
2457
|
+
}, focus: function(u) {
|
|
2417
2458
|
n.focusedNode = a.node;
|
|
2418
|
-
}, blur: function(
|
|
2459
|
+
}, blur: function(u) {
|
|
2419
2460
|
n.focusedNode = null;
|
|
2420
2461
|
} } }, [n.shouldDeriveNodeColorFromIncomingLinks(a) ? e._l(n.getSubNodesDerivingColorFromIncomingLinks(
|
|
2421
2462
|
a.node.id
|
|
2422
|
-
), function(
|
|
2423
|
-
return r("rect", e._b({ key:
|
|
2463
|
+
), function(u) {
|
|
2464
|
+
return r("rect", e._b({ key: u.key, attrs: { "data-j-alluvial-sub-nodes": "" } }, "rect", u, !1));
|
|
2424
2465
|
}) : 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 } }), 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": "" } }) : e._e(), r("g", { ref: "nodeTextRefs", refInFor: !0, staticClass: "lume-alluvial-group__node-text lume-typography--caption", class: {
|
|
2425
|
-
"lume-alluvial-group__node-text--left":
|
|
2466
|
+
"lume-alluvial-group__node-text--left": n.isLabelBeforeNode(
|
|
2467
|
+
a.node
|
|
2468
|
+
)
|
|
2426
2469
|
}, 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
|
|
2470
|
+
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
2471
|
}, { node: a.node, value: n.formatValue(
|
|
2429
2472
|
a.node.transitionValue || a.node.value,
|
|
2430
2473
|
a.node.value
|
|
2431
2474
|
) })], 2)], 2)]);
|
|
2432
2475
|
})], 2);
|
|
2433
|
-
},
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2476
|
+
}, to = [], no = /* @__PURE__ */ S(
|
|
2477
|
+
qa,
|
|
2478
|
+
eo,
|
|
2479
|
+
to,
|
|
2437
2480
|
!1,
|
|
2438
2481
|
null,
|
|
2439
|
-
"
|
|
2482
|
+
"8a5c4359"
|
|
2440
2483
|
);
|
|
2441
|
-
const
|
|
2484
|
+
const ro = no.exports, ao = {
|
|
2442
2485
|
margins: {
|
|
2443
2486
|
top: 0,
|
|
2444
2487
|
right: 0,
|
|
@@ -2450,20 +2493,22 @@ const qa = Qa.exports, eo = {
|
|
|
2450
2493
|
withHover: !1,
|
|
2451
2494
|
withLegend: !1,
|
|
2452
2495
|
// Alluvial options
|
|
2496
|
+
alignFirstNodeLabels: "left",
|
|
2497
|
+
alignLastNodeLabels: "right",
|
|
2453
2498
|
gradient: !1,
|
|
2454
2499
|
highlightedElements: "closest",
|
|
2455
2500
|
nodePadding: 16,
|
|
2456
2501
|
nodeWidth: 16,
|
|
2457
|
-
nodeAlign:
|
|
2502
|
+
nodeAlign: qt,
|
|
2458
2503
|
valueFormat: (t) => String(t),
|
|
2459
2504
|
iterations: 6
|
|
2460
|
-
},
|
|
2505
|
+
}, oo = /* @__PURE__ */ P({
|
|
2461
2506
|
__name: "lume-alluvial-diagram",
|
|
2462
2507
|
props: {
|
|
2463
|
-
...
|
|
2508
|
+
...or(Ke)
|
|
2464
2509
|
},
|
|
2465
2510
|
setup(t, { emit: e }) {
|
|
2466
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2511
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(Z()), o = xn(Z()), { options: u } = j(r), { allOptions: i } = Q(u, ao);
|
|
2467
2512
|
function l(c) {
|
|
2468
2513
|
return {
|
|
2469
2514
|
...c,
|
|
@@ -2471,54 +2516,54 @@ const qa = Qa.exports, eo = {
|
|
|
2471
2516
|
// Alluvial chart never uses base scales
|
|
2472
2517
|
};
|
|
2473
2518
|
}
|
|
2474
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots:
|
|
2519
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: u, allOptions: i, getAlluvialDiagramOptions: l, LumeChart: pe, LumeAlluvialGroup: ro };
|
|
2475
2520
|
}
|
|
2476
2521
|
});
|
|
2477
|
-
var
|
|
2522
|
+
var uo = function() {
|
|
2478
2523
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2479
2524
|
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(
|
|
2525
|
+
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, u) {
|
|
2526
|
+
return { key: u, fn: function(i) {
|
|
2527
|
+
return [e._t(u, null, null, i || {})];
|
|
2483
2528
|
} };
|
|
2484
2529
|
})], null, !0) }, "lume-alluvial-group", a, !1), n.componentEventPropagator))];
|
|
2485
|
-
} }, e._l(n.slots, function(a,
|
|
2486
|
-
return { key:
|
|
2487
|
-
return [e._t(
|
|
2530
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2531
|
+
return { key: o, fn: function(u) {
|
|
2532
|
+
return [e._t(o, null, null, u || {})];
|
|
2488
2533
|
} };
|
|
2489
2534
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2490
|
-
},
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2535
|
+
}, lo = [], io = /* @__PURE__ */ S(
|
|
2536
|
+
oo,
|
|
2537
|
+
uo,
|
|
2538
|
+
lo,
|
|
2494
2539
|
!1,
|
|
2495
2540
|
null,
|
|
2496
2541
|
null
|
|
2497
2542
|
);
|
|
2498
|
-
const
|
|
2499
|
-
var
|
|
2500
|
-
const
|
|
2543
|
+
const xu = io.exports;
|
|
2544
|
+
var Ye = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Ye || {});
|
|
2545
|
+
const so = /* @__PURE__ */ P({
|
|
2501
2546
|
__name: "lume-bar-chart",
|
|
2502
2547
|
props: {
|
|
2503
|
-
...
|
|
2548
|
+
...fe(),
|
|
2504
2549
|
type: {
|
|
2505
2550
|
type: String,
|
|
2506
2551
|
default: null,
|
|
2507
|
-
validator: (t) => t in
|
|
2552
|
+
validator: (t) => t in Ye || t == null
|
|
2508
2553
|
}
|
|
2509
2554
|
},
|
|
2510
2555
|
setup(t, { emit: e }) {
|
|
2511
|
-
const r = t, n =
|
|
2512
|
-
() => import("./
|
|
2513
|
-
), a =
|
|
2514
|
-
() => import("./
|
|
2515
|
-
),
|
|
2516
|
-
() => import("./
|
|
2517
|
-
),
|
|
2556
|
+
const r = t, n = Re(
|
|
2557
|
+
() => import("./DHB3p6kw.js")
|
|
2558
|
+
), a = Re(
|
|
2559
|
+
() => import("./DiDq9ch9.js")
|
|
2560
|
+
), o = Re(
|
|
2561
|
+
() => import("./DWtV4D8X.js")
|
|
2562
|
+
), u = /* @__PURE__ */ new Map([
|
|
2518
2563
|
["single", n],
|
|
2519
2564
|
["grouped", a],
|
|
2520
|
-
["stacked",
|
|
2521
|
-
]), { componentEventPropagator: i } = q(e), l =
|
|
2565
|
+
["stacked", o]
|
|
2566
|
+
]), { componentEventPropagator: i } = q(e), l = se(Z());
|
|
2522
2567
|
function c(v) {
|
|
2523
2568
|
return {
|
|
2524
2569
|
...v,
|
|
@@ -2531,164 +2576,164 @@ const oo = /* @__PURE__ */ R({
|
|
|
2531
2576
|
};
|
|
2532
2577
|
}
|
|
2533
2578
|
const s = f(() => {
|
|
2534
|
-
if (
|
|
2579
|
+
if (Ke(r.data)) return u.get("single");
|
|
2535
2580
|
if (!r.type)
|
|
2536
2581
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2537
|
-
return
|
|
2582
|
+
return u.get(r.type);
|
|
2538
2583
|
});
|
|
2539
|
-
return { __sfc: !0, TYPES:
|
|
2584
|
+
return { __sfc: !0, TYPES: Ye, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: u, props: r, emit: e, componentEventPropagator: i, slots: l, getBarChartOptions: c, component: s };
|
|
2540
2585
|
}
|
|
2541
2586
|
});
|
|
2542
|
-
var
|
|
2587
|
+
var co = function() {
|
|
2543
2588
|
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(
|
|
2589
|
+
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) {
|
|
2590
|
+
return { key: o, fn: function(u) {
|
|
2591
|
+
return [e._t(o, null, null, u || {})];
|
|
2547
2592
|
} };
|
|
2548
2593
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2549
|
-
},
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2594
|
+
}, vo = [], fo = /* @__PURE__ */ S(
|
|
2595
|
+
so,
|
|
2596
|
+
co,
|
|
2597
|
+
vo,
|
|
2553
2598
|
!1,
|
|
2554
2599
|
null,
|
|
2555
2600
|
null
|
|
2556
2601
|
);
|
|
2557
|
-
const
|
|
2558
|
-
function
|
|
2559
|
-
return Object.values(
|
|
2602
|
+
const Lu = fo.exports;
|
|
2603
|
+
function po(t) {
|
|
2604
|
+
return Object.values(On).includes(t) || t == null;
|
|
2560
2605
|
}
|
|
2561
|
-
function
|
|
2606
|
+
function mo(t) {
|
|
2562
2607
|
return Object.values(O).includes(t);
|
|
2563
2608
|
}
|
|
2564
|
-
const
|
|
2609
|
+
const _o = (t = !1) => ({
|
|
2565
2610
|
type: {
|
|
2566
2611
|
type: String,
|
|
2567
2612
|
default: null,
|
|
2568
|
-
validator:
|
|
2613
|
+
validator: po
|
|
2569
2614
|
},
|
|
2570
2615
|
...t ? {
|
|
2571
2616
|
orientation: {
|
|
2572
2617
|
type: String,
|
|
2573
2618
|
default: O.VERTICAL,
|
|
2574
|
-
validator:
|
|
2619
|
+
validator: mo
|
|
2575
2620
|
}
|
|
2576
2621
|
} : {}
|
|
2577
2622
|
});
|
|
2578
|
-
function
|
|
2623
|
+
function Ut(t, e) {
|
|
2579
2624
|
const r = f(() => t.value.map((a) => {
|
|
2580
|
-
var
|
|
2625
|
+
var o;
|
|
2581
2626
|
return {
|
|
2582
2627
|
...a,
|
|
2583
|
-
values:
|
|
2628
|
+
values: Je(
|
|
2584
2629
|
a.values,
|
|
2585
|
-
((
|
|
2586
|
-
).map((
|
|
2587
|
-
...
|
|
2588
|
-
value: (
|
|
2630
|
+
((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) ?? 0
|
|
2631
|
+
).map((u) => ({
|
|
2632
|
+
...u,
|
|
2633
|
+
value: (u == null ? void 0 : u.value) || 0
|
|
2589
2634
|
}))
|
|
2590
2635
|
};
|
|
2591
2636
|
})), n = f(() => {
|
|
2592
2637
|
var a;
|
|
2593
|
-
return (a = r.value) == null ? void 0 : a.reduce((
|
|
2594
|
-
|
|
2595
|
-
}),
|
|
2638
|
+
return (a = r.value) == null ? void 0 : a.reduce((o, u) => (u.values.forEach((i, l) => {
|
|
2639
|
+
o[l] ? o[l].push(i) : o[l] = [i];
|
|
2640
|
+
}), o), []);
|
|
2596
2641
|
});
|
|
2597
2642
|
return { multiBarData: r, groupedData: n };
|
|
2598
2643
|
}
|
|
2599
|
-
function
|
|
2644
|
+
function go(t, e) {
|
|
2600
2645
|
return t.value.length === 1 ? "single" : e.value;
|
|
2601
2646
|
}
|
|
2602
|
-
function
|
|
2647
|
+
function ho(t, e, r) {
|
|
2603
2648
|
const n = f(
|
|
2604
2649
|
() => r.value === O.HORIZONTAL
|
|
2605
2650
|
);
|
|
2606
2651
|
function a(i) {
|
|
2607
|
-
i ||
|
|
2652
|
+
i || Ue(Ee.BarScaleNull), Math.min(...i.domain()) > 0 && Ue(Ee.BarScaleDomainAbove0);
|
|
2608
2653
|
}
|
|
2609
|
-
const
|
|
2610
|
-
return { barXScale:
|
|
2654
|
+
const o = f(() => n.value ? (a(t.value), t.value) : t.value), u = f(() => n.value ? e.value : (a(e.value), e.value));
|
|
2655
|
+
return { barXScale: o, barYScale: u };
|
|
2611
2656
|
}
|
|
2612
|
-
const
|
|
2657
|
+
const yo = {
|
|
2613
2658
|
x: 0,
|
|
2614
2659
|
y: 0,
|
|
2615
2660
|
width: 0,
|
|
2616
2661
|
height: 0
|
|
2617
2662
|
};
|
|
2618
|
-
function
|
|
2619
|
-
const
|
|
2663
|
+
function bo(t, e, r, n, a, o) {
|
|
2664
|
+
const u = f(
|
|
2620
2665
|
() => n.value === O.HORIZONTAL
|
|
2621
2666
|
);
|
|
2622
2667
|
function i(v, m) {
|
|
2623
|
-
let
|
|
2624
|
-
return
|
|
2668
|
+
let h, g;
|
|
2669
|
+
return u.value ? (h = v >= 0 ? e.value(0) : e.value(v), g = r.value(r.value.domain()[m])) : (h = e.value(e.value.domain()[m]), g = v < 0 ? r.value(0) : r.value(v)), { x: h, y: g };
|
|
2625
2670
|
}
|
|
2626
2671
|
function l(v) {
|
|
2627
|
-
return
|
|
2672
|
+
return u.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : e.value.bandwidth();
|
|
2628
2673
|
}
|
|
2629
2674
|
function c(v) {
|
|
2630
|
-
return
|
|
2675
|
+
return u.value ? r.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
|
|
2631
2676
|
}
|
|
2632
|
-
function s(v, m,
|
|
2633
|
-
if (!(e.value && r.value)) return
|
|
2634
|
-
const { value: _, color: x } = v, d = x ?? t.value[m].color ??
|
|
2677
|
+
function s(v, m, h) {
|
|
2678
|
+
if (!(e.value && r.value)) return yo;
|
|
2679
|
+
const { value: _, color: x } = v, d = x ?? t.value[m].color ?? Ae, { x: p, y } = i(_, h), b = l(_), A = c(_);
|
|
2635
2680
|
return {
|
|
2636
|
-
classList: [`lume-fill--${d}`, ...
|
|
2681
|
+
classList: [`lume-fill--${d}`, ...o],
|
|
2637
2682
|
x: p,
|
|
2638
2683
|
y,
|
|
2639
2684
|
width: b,
|
|
2640
2685
|
height: A,
|
|
2641
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2686
|
+
isFaded: a.value !== -1 && a.value !== h,
|
|
2642
2687
|
isNegative: _ < 0
|
|
2643
2688
|
};
|
|
2644
2689
|
}
|
|
2645
2690
|
return { barAttributeGenerator: s };
|
|
2646
2691
|
}
|
|
2647
|
-
const
|
|
2692
|
+
const ko = {
|
|
2648
2693
|
x: 0,
|
|
2649
2694
|
y: 0,
|
|
2650
2695
|
width: 0,
|
|
2651
2696
|
height: 0
|
|
2652
2697
|
};
|
|
2653
|
-
function
|
|
2654
|
-
const
|
|
2698
|
+
function xo(t, e, r, n, a, o) {
|
|
2699
|
+
const u = f(
|
|
2655
2700
|
() => n.value === O.HORIZONTAL
|
|
2656
|
-
), i = f(() =>
|
|
2657
|
-
function c(
|
|
2658
|
-
if (
|
|
2659
|
-
return
|
|
2701
|
+
), i = f(() => ke().domain(t.value.map((g, _) => _)).range([0, e.value.bandwidth()]).padding(0)), l = f(() => ke().domain(t.value.map((g, _) => _)).range([0, r.value.bandwidth()]).padding(0));
|
|
2702
|
+
function c(g, _, x) {
|
|
2703
|
+
if (u.value)
|
|
2704
|
+
return g >= 0 ? e.value(0) : e.value(g);
|
|
2660
2705
|
const d = e.value.domain();
|
|
2661
2706
|
return e.value(d[_]) + i.value(x);
|
|
2662
2707
|
}
|
|
2663
|
-
function s(
|
|
2664
|
-
if (
|
|
2708
|
+
function s(g, _, x) {
|
|
2709
|
+
if (u.value) {
|
|
2665
2710
|
const d = r.value.domain();
|
|
2666
2711
|
return r.value(d[_]) + l.value(x);
|
|
2667
2712
|
}
|
|
2668
|
-
return
|
|
2713
|
+
return g < 0 ? r.value(0) : r.value(g);
|
|
2669
2714
|
}
|
|
2670
|
-
function v(
|
|
2671
|
-
return
|
|
2715
|
+
function v(g) {
|
|
2716
|
+
return u.value ? g < 0 ? e.value(0) - e.value(g) : e.value(g) - e.value(0) : i.value.bandwidth();
|
|
2672
2717
|
}
|
|
2673
|
-
function m(
|
|
2674
|
-
return
|
|
2718
|
+
function m(g) {
|
|
2719
|
+
return u.value ? l.value.bandwidth() : g < 0 ? r.value(g) - r.value(0) : r.value(0) - r.value(g);
|
|
2675
2720
|
}
|
|
2676
|
-
function g
|
|
2677
|
-
if (!(e.value && r.value)) return
|
|
2678
|
-
const { value: p, color: y } =
|
|
2721
|
+
function h(g, _, x) {
|
|
2722
|
+
if (!(e.value && r.value)) return ko;
|
|
2723
|
+
const { value: p, color: y } = g, b = y ?? t.value[_].color ?? Object.values(X)[_], A = c(p, x, _), N = s(p, x, _), T = v(p), $ = m(p);
|
|
2679
2724
|
return {
|
|
2680
|
-
classList: [`lume-fill--${b}`, ...
|
|
2725
|
+
classList: [`lume-fill--${b}`, ...o],
|
|
2681
2726
|
x: A,
|
|
2682
|
-
y:
|
|
2727
|
+
y: N,
|
|
2683
2728
|
width: T,
|
|
2684
|
-
height:
|
|
2729
|
+
height: $,
|
|
2685
2730
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2686
2731
|
isNegative: p < 0
|
|
2687
2732
|
};
|
|
2688
2733
|
}
|
|
2689
|
-
return { barAttributeGenerator:
|
|
2734
|
+
return { barAttributeGenerator: h };
|
|
2690
2735
|
}
|
|
2691
|
-
function
|
|
2736
|
+
function Lo(t, e, r) {
|
|
2692
2737
|
const n = f(
|
|
2693
2738
|
() => e.value === O.HORIZONTAL
|
|
2694
2739
|
), a = f(() => {
|
|
@@ -2696,7 +2741,7 @@ function yo(t, e, r) {
|
|
|
2696
2741
|
(c) => c.filter((s) => s.value < 0).reduce((s, v) => s + v.value, 0)
|
|
2697
2742
|
);
|
|
2698
2743
|
return Math.min(...l);
|
|
2699
|
-
}),
|
|
2744
|
+
}), o = f(() => {
|
|
2700
2745
|
const l = t.value.map(
|
|
2701
2746
|
(c) => c.reduce(
|
|
2702
2747
|
(s, v) => v.value >= 0 ? s + v.value : s,
|
|
@@ -2705,10 +2750,10 @@ function yo(t, e, r) {
|
|
|
2705
2750
|
);
|
|
2706
2751
|
return Math.max(...l);
|
|
2707
2752
|
});
|
|
2708
|
-
function
|
|
2709
|
-
return c.length ? n.value ?
|
|
2710
|
-
|
|
2711
|
-
|
|
2753
|
+
function u(l, c, s) {
|
|
2754
|
+
return c.length ? n.value ? be().domain([a.value, o.value]).range([0, s.width]) : Object.assign(
|
|
2755
|
+
pt(
|
|
2756
|
+
ke().domain(c.map((v, m) => m)).range([0, s.width]),
|
|
2712
2757
|
e.value,
|
|
2713
2758
|
r.value
|
|
2714
2759
|
),
|
|
@@ -2717,73 +2762,73 @@ function yo(t, e, r) {
|
|
|
2717
2762
|
}
|
|
2718
2763
|
function i(l, c, s) {
|
|
2719
2764
|
return c.length ? n.value ? Object.assign(
|
|
2720
|
-
|
|
2721
|
-
|
|
2765
|
+
pt(
|
|
2766
|
+
ke().domain(c.map((v, m) => m)).range([0, s.height]),
|
|
2722
2767
|
e.value,
|
|
2723
2768
|
r.value
|
|
2724
2769
|
),
|
|
2725
2770
|
{ labels: c }
|
|
2726
|
-
) :
|
|
2771
|
+
) : be().domain([o.value, a.value]).range([0, s.height]) : null;
|
|
2727
2772
|
}
|
|
2728
|
-
return { stackedXScaleGenerator:
|
|
2773
|
+
return { stackedXScaleGenerator: u, stackedYScaleGenerator: i };
|
|
2729
2774
|
}
|
|
2730
|
-
function
|
|
2731
|
-
const
|
|
2775
|
+
function Ao(t, e, r, n, a, o) {
|
|
2776
|
+
const u = f(
|
|
2732
2777
|
() => n.value === O.HORIZONTAL
|
|
2733
2778
|
), i = f(
|
|
2734
|
-
() =>
|
|
2779
|
+
() => u.value ? r.value.domain() : e.value.domain()
|
|
2735
2780
|
), l = f(
|
|
2736
2781
|
() => t.value.map((d) => d.values.map((p) => p == null ? void 0 : p.value))
|
|
2737
2782
|
);
|
|
2738
2783
|
function c(d, p, y) {
|
|
2739
2784
|
let b, A;
|
|
2740
|
-
return
|
|
2785
|
+
return u.value ? (b = e.value(d >= 0 ? 0 + y : d + y), A = r.value(i.value[p])) : (b = e.value(i.value[p]), A = r.value(d >= 0 ? d + y : 0 + y)), { x: b, y: A };
|
|
2741
2786
|
}
|
|
2742
2787
|
function s(d) {
|
|
2743
|
-
return
|
|
2788
|
+
return u.value ? e.value(d) - e.value(0) : e.value.bandwidth();
|
|
2744
2789
|
}
|
|
2745
2790
|
function v(d) {
|
|
2746
|
-
return
|
|
2791
|
+
return u.value ? e.value(0) - e.value(d) : e.value.bandwidth();
|
|
2747
2792
|
}
|
|
2748
2793
|
function m(d) {
|
|
2749
|
-
return
|
|
2794
|
+
return u.value ? r.value.bandwidth() : r.value(0) - r.value(d);
|
|
2750
2795
|
}
|
|
2751
|
-
function
|
|
2752
|
-
return
|
|
2796
|
+
function h(d) {
|
|
2797
|
+
return u.value ? r.value.bandwidth() : r.value(d) - r.value(0);
|
|
2753
2798
|
}
|
|
2754
|
-
function
|
|
2799
|
+
function g(d, p) {
|
|
2755
2800
|
return d ? l.value.reduce((y, b, A) => (A < d && b[p] >= 0 && (y += b[p]), y), 0) : 0;
|
|
2756
2801
|
}
|
|
2757
2802
|
function _(d, p) {
|
|
2758
2803
|
return d ? l.value.reduce((y, b, A) => (A < d && b[p] < 0 && (y += b[p]), y), 0) : 0;
|
|
2759
2804
|
}
|
|
2760
2805
|
function x(d, p, y) {
|
|
2761
|
-
const { value: b, color: A } = d,
|
|
2806
|
+
const { value: b, color: A } = d, N = b >= 0 ? s(b) : v(b), T = b >= 0 ? m(b) : h(b), $ = b >= 0 ? g(p, y) : _(p, y), { x: R, y: G } = c(b, y, $);
|
|
2762
2807
|
return {
|
|
2763
|
-
classList: [`lume-fill--${A ?? t.value[p].color ?? Object.values(
|
|
2764
|
-
width:
|
|
2808
|
+
classList: [`lume-fill--${A ?? t.value[p].color ?? Object.values(X)[p]}`, ...o],
|
|
2809
|
+
width: N,
|
|
2765
2810
|
height: T,
|
|
2766
|
-
x:
|
|
2767
|
-
y:
|
|
2811
|
+
x: R,
|
|
2812
|
+
y: G,
|
|
2768
2813
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2769
2814
|
isNegative: b < 0
|
|
2770
2815
|
};
|
|
2771
2816
|
}
|
|
2772
2817
|
return { barAttributeGenerator: x };
|
|
2773
2818
|
}
|
|
2774
|
-
const
|
|
2775
|
-
single:
|
|
2776
|
-
grouped:
|
|
2777
|
-
stacked:
|
|
2778
|
-
},
|
|
2819
|
+
const xt = {
|
|
2820
|
+
single: bo,
|
|
2821
|
+
grouped: xo,
|
|
2822
|
+
stacked: Ao
|
|
2823
|
+
}, To = /* @__PURE__ */ P({
|
|
2779
2824
|
__name: "lume-bar-group",
|
|
2780
2825
|
props: {
|
|
2781
|
-
...
|
|
2826
|
+
...He(),
|
|
2782
2827
|
classList: {
|
|
2783
2828
|
type: [String, Array],
|
|
2784
2829
|
default: () => []
|
|
2785
2830
|
},
|
|
2786
|
-
...
|
|
2831
|
+
..._o(!0),
|
|
2787
2832
|
transition: {
|
|
2788
2833
|
type: Boolean,
|
|
2789
2834
|
default: !0
|
|
@@ -2794,199 +2839,199 @@ const yt = {
|
|
|
2794
2839
|
const r = t, {
|
|
2795
2840
|
data: n,
|
|
2796
2841
|
hoveredIndex: a,
|
|
2797
|
-
orientation:
|
|
2798
|
-
transition:
|
|
2842
|
+
orientation: o,
|
|
2843
|
+
transition: u,
|
|
2799
2844
|
type: i,
|
|
2800
2845
|
xScale: l,
|
|
2801
2846
|
yScale: c,
|
|
2802
2847
|
classList: s,
|
|
2803
2848
|
labels: v
|
|
2804
|
-
} =
|
|
2805
|
-
const A =
|
|
2849
|
+
} = j(r), m = $e("chartID"), { emitInternalEvent: h } = q(e, m), { groupedData: g } = Ut(n, v), { barXScale: _, barYScale: x } = ho(l, c, o), d = f(() => typeof s.value == "string" ? [s.value] : s.value), p = f(() => {
|
|
2850
|
+
const A = go(n, i), { barAttributeGenerator: N } = xt[A](
|
|
2806
2851
|
n,
|
|
2807
2852
|
_,
|
|
2808
2853
|
x,
|
|
2809
|
-
|
|
2854
|
+
o,
|
|
2810
2855
|
a,
|
|
2811
2856
|
d.value
|
|
2812
2857
|
);
|
|
2813
|
-
return
|
|
2858
|
+
return N;
|
|
2814
2859
|
}), y = f(() => {
|
|
2815
|
-
if (
|
|
2816
|
-
return
|
|
2860
|
+
if (u.value)
|
|
2861
|
+
return o.value === O.HORIZONTAL ? "width" : "height";
|
|
2817
2862
|
});
|
|
2818
2863
|
async function b(A) {
|
|
2819
|
-
e("lume__internal--hover", A),
|
|
2864
|
+
e("lume__internal--hover", A), h("lume__internal--hover", A);
|
|
2820
2865
|
}
|
|
2821
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2866
|
+
return { __sfc: !0, MIXIN_MAP: xt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: u, type: i, xScale: l, yScale: c, classList: s, labels: v, chartID: m, emitInternalEvent: h, groupedData: g, barXScale: _, barYScale: x, computedClasses: d, getBarAttributes: p, computedTransition: y, handleInternalHover: b, LumeBar: Qe };
|
|
2822
2867
|
}
|
|
2823
2868
|
});
|
|
2824
|
-
var
|
|
2869
|
+
var Oo = function() {
|
|
2825
2870
|
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(
|
|
2871
|
+
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2872
|
+
return r("g", { key: o, on: { mouseenter: function(u) {
|
|
2873
|
+
return n.handleInternalHover(o);
|
|
2874
|
+
} } }, e._l(a, function(u, i) {
|
|
2830
2875
|
return r(n.LumeBar, e._b({ key: `bar-${i}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(l) {
|
|
2831
2876
|
return n.emit("bar-click", {
|
|
2832
|
-
index:
|
|
2877
|
+
index: o,
|
|
2833
2878
|
datasetIndex: i,
|
|
2834
2879
|
event: l
|
|
2835
2880
|
});
|
|
2836
|
-
} } }, "lume-bar", n.getBarAttributes(
|
|
2881
|
+
} } }, "lume-bar", n.getBarAttributes(u, i, o, a), !1));
|
|
2837
2882
|
}), 1);
|
|
2838
2883
|
}), 0);
|
|
2839
|
-
},
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2884
|
+
}, Io = [], No = /* @__PURE__ */ S(
|
|
2885
|
+
To,
|
|
2886
|
+
Oo,
|
|
2887
|
+
Io,
|
|
2843
2888
|
!1,
|
|
2844
2889
|
null,
|
|
2845
2890
|
null
|
|
2846
2891
|
);
|
|
2847
|
-
const
|
|
2892
|
+
const lt = No.exports, Eo = {
|
|
2848
2893
|
[O.VERTICAL]: {
|
|
2849
2894
|
withTooltip: !0,
|
|
2850
2895
|
xAxisOptions: {},
|
|
2851
2896
|
yAxisOptions: { gridLines: !0 },
|
|
2852
|
-
margins:
|
|
2897
|
+
margins: ie.VERTICAL
|
|
2853
2898
|
},
|
|
2854
2899
|
[O.HORIZONTAL]: {
|
|
2855
2900
|
withTooltip: !0,
|
|
2856
2901
|
xAxisOptions: { gridLines: !0 },
|
|
2857
2902
|
yAxisOptions: { gridLines: !1 },
|
|
2858
|
-
margins:
|
|
2903
|
+
margins: ie.HORIZONTAL
|
|
2859
2904
|
}
|
|
2860
|
-
},
|
|
2905
|
+
}, $o = /* @__PURE__ */ P({
|
|
2861
2906
|
__name: "lume-single-bar-chart",
|
|
2862
2907
|
props: {
|
|
2863
|
-
...
|
|
2908
|
+
...fe(Ke)
|
|
2864
2909
|
},
|
|
2865
2910
|
setup(t, { emit: e }) {
|
|
2866
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2867
|
-
() =>
|
|
2911
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(Z()), { orientation: o, options: u } = j(r), i = f(
|
|
2912
|
+
() => Eo[o.value || O.VERTICAL]
|
|
2868
2913
|
// needs to be computed so that default options are reactive
|
|
2869
|
-
), { allOptions: l } = Q(
|
|
2870
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation:
|
|
2914
|
+
), { allOptions: l } = Q(u, i);
|
|
2915
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: u, baseOptions: i, allOptions: l, LumeChart: pe, LumeBarGroup: lt };
|
|
2871
2916
|
}
|
|
2872
2917
|
});
|
|
2873
|
-
var
|
|
2918
|
+
var wo = function() {
|
|
2874
2919
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2875
2920
|
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
2921
|
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(
|
|
2922
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2923
|
+
return { key: o, fn: function(u) {
|
|
2924
|
+
return [e._t(o, null, null, u || {})];
|
|
2880
2925
|
} };
|
|
2881
2926
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2882
|
-
},
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2927
|
+
}, Do = [], Ho = /* @__PURE__ */ S(
|
|
2928
|
+
$o,
|
|
2929
|
+
wo,
|
|
2930
|
+
Do,
|
|
2886
2931
|
!1,
|
|
2887
2932
|
null,
|
|
2888
2933
|
null
|
|
2889
2934
|
);
|
|
2890
|
-
const
|
|
2935
|
+
const Au = Ho.exports, So = {
|
|
2891
2936
|
[O.VERTICAL]: {
|
|
2892
2937
|
withTooltip: !0,
|
|
2893
2938
|
xAxisOptions: {},
|
|
2894
2939
|
yAxisOptions: { gridLines: !0 },
|
|
2895
|
-
margins:
|
|
2940
|
+
margins: ie.VERTICAL
|
|
2896
2941
|
},
|
|
2897
2942
|
[O.HORIZONTAL]: {
|
|
2898
2943
|
withTooltip: !0,
|
|
2899
2944
|
xAxisOptions: { gridLines: !0 },
|
|
2900
2945
|
yAxisOptions: { gridLines: !1 },
|
|
2901
|
-
margins:
|
|
2946
|
+
margins: ie.HORIZONTAL,
|
|
2902
2947
|
tooltipOptions: { position: "right" }
|
|
2903
2948
|
}
|
|
2904
|
-
},
|
|
2949
|
+
}, Po = /* @__PURE__ */ P({
|
|
2905
2950
|
__name: "lume-grouped-bar-chart",
|
|
2906
2951
|
props: {
|
|
2907
|
-
...
|
|
2952
|
+
...fe()
|
|
2908
2953
|
},
|
|
2909
2954
|
setup(t, { emit: e }) {
|
|
2910
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2911
|
-
() =>
|
|
2955
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(Z()), { orientation: o, options: u } = j(r), i = f(
|
|
2956
|
+
() => So[o.value || O.VERTICAL]
|
|
2912
2957
|
// needs to be computed so that default options are reactive
|
|
2913
2958
|
), { allOptions: l } = Q(
|
|
2914
|
-
|
|
2959
|
+
u,
|
|
2915
2960
|
i
|
|
2916
2961
|
);
|
|
2917
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation:
|
|
2962
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: u, baseOptions: i, allOptions: l, LumeChart: pe, LumeBarGroup: lt };
|
|
2918
2963
|
}
|
|
2919
2964
|
});
|
|
2920
|
-
var
|
|
2965
|
+
var Ro = function() {
|
|
2921
2966
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2922
2967
|
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
2968
|
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(
|
|
2969
|
+
} }, e._l(n.slots, function(a, o) {
|
|
2970
|
+
return { key: o, fn: function(u) {
|
|
2971
|
+
return [e._t(o, null, null, u || {})];
|
|
2927
2972
|
} };
|
|
2928
2973
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2929
|
-
},
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2974
|
+
}, Co = [], Bo = /* @__PURE__ */ S(
|
|
2975
|
+
Po,
|
|
2976
|
+
Ro,
|
|
2977
|
+
Co,
|
|
2933
2978
|
!1,
|
|
2934
2979
|
null,
|
|
2935
2980
|
null
|
|
2936
2981
|
);
|
|
2937
|
-
const
|
|
2982
|
+
const Tu = Bo.exports, Fo = {
|
|
2938
2983
|
[O.VERTICAL]: {
|
|
2939
2984
|
withTooltip: !0,
|
|
2940
2985
|
xAxisOptions: {},
|
|
2941
2986
|
yAxisOptions: { gridLines: !0 },
|
|
2942
|
-
margins:
|
|
2987
|
+
margins: ie.VERTICAL,
|
|
2943
2988
|
tooltipOptions: { inverse: !0 }
|
|
2944
2989
|
},
|
|
2945
2990
|
[O.HORIZONTAL]: {
|
|
2946
2991
|
withTooltip: !0,
|
|
2947
2992
|
xAxisOptions: { gridLines: !0 },
|
|
2948
2993
|
yAxisOptions: { gridLines: !1 },
|
|
2949
|
-
margins:
|
|
2994
|
+
margins: ie.HORIZONTAL,
|
|
2950
2995
|
tooltipOptions: { position: "right" }
|
|
2951
2996
|
}
|
|
2952
|
-
},
|
|
2997
|
+
}, Go = /* @__PURE__ */ P({
|
|
2953
2998
|
__name: "lume-stacked-bar-chart",
|
|
2954
2999
|
props: {
|
|
2955
|
-
...
|
|
3000
|
+
...fe()
|
|
2956
3001
|
},
|
|
2957
3002
|
setup(t, { emit: e }) {
|
|
2958
|
-
const r = t, { componentEventPropagator: n } = q(e), a =
|
|
2959
|
-
() =>
|
|
3003
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(Z()), { data: o, orientation: u, options: i, labels: l } = j(r), c = f(
|
|
3004
|
+
() => Fo[u.value || O.VERTICAL]
|
|
2960
3005
|
// needs to be computed so that default options are reactive
|
|
2961
3006
|
), { allOptions: s } = Q(
|
|
2962
3007
|
i,
|
|
2963
3008
|
c
|
|
2964
|
-
), { internalData: v } =
|
|
3009
|
+
), { internalData: v } = rt(o), { groupedData: m } = Ut(v, l), { stackedXScaleGenerator: h, stackedYScaleGenerator: g } = Lo(
|
|
2965
3010
|
m,
|
|
2966
|
-
|
|
3011
|
+
u,
|
|
2967
3012
|
i
|
|
2968
|
-
), _ = f(() => r.xScale ||
|
|
2969
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data:
|
|
3013
|
+
), _ = f(() => r.xScale || h), x = f(() => r.yScale || g);
|
|
3014
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: u, options: i, labels: l, baseOptions: c, allOptions: s, internalData: v, groupedData: m, stackedXScaleGenerator: h, stackedYScaleGenerator: g, xScale: _, yScale: x, LumeChart: pe, LumeBarGroup: lt };
|
|
2970
3015
|
}
|
|
2971
3016
|
});
|
|
2972
|
-
var
|
|
3017
|
+
var jo = function() {
|
|
2973
3018
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2974
3019
|
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
3020
|
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(
|
|
3021
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3022
|
+
return { key: o, fn: function(u) {
|
|
3023
|
+
return [e._t(o, null, null, u || {})];
|
|
2979
3024
|
} };
|
|
2980
3025
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2981
|
-
},
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
3026
|
+
}, Vo = [], Mo = /* @__PURE__ */ S(
|
|
3027
|
+
Go,
|
|
3028
|
+
jo,
|
|
3029
|
+
Vo,
|
|
2985
3030
|
!1,
|
|
2986
3031
|
null,
|
|
2987
3032
|
null
|
|
2988
3033
|
);
|
|
2989
|
-
const
|
|
3034
|
+
const Ou = Mo.exports, Lt = 2, zo = /* @__PURE__ */ P({
|
|
2990
3035
|
__name: "lume-line",
|
|
2991
3036
|
props: {
|
|
2992
3037
|
pathDefinition: {
|
|
@@ -2995,11 +3040,11 @@ const xu = Go.exports, bt = 2, Fo = /* @__PURE__ */ R({
|
|
|
2995
3040
|
},
|
|
2996
3041
|
width: {
|
|
2997
3042
|
type: Number,
|
|
2998
|
-
default:
|
|
3043
|
+
default: Lt
|
|
2999
3044
|
},
|
|
3000
3045
|
color: {
|
|
3001
3046
|
type: String,
|
|
3002
|
-
default:
|
|
3047
|
+
default: X.Skyblue
|
|
3003
3048
|
},
|
|
3004
3049
|
dashed: {
|
|
3005
3050
|
type: Boolean,
|
|
@@ -3021,10 +3066,10 @@ const xu = Go.exports, bt = 2, Fo = /* @__PURE__ */ R({
|
|
|
3021
3066
|
emits: ["click"],
|
|
3022
3067
|
setup(t, { emit: e }) {
|
|
3023
3068
|
const r = I(null);
|
|
3024
|
-
return
|
|
3069
|
+
return re(() => De(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: Lt, emit: e, root: r };
|
|
3025
3070
|
}
|
|
3026
3071
|
});
|
|
3027
|
-
var
|
|
3072
|
+
var Wo = function() {
|
|
3028
3073
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3029
3074
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
3030
3075
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -3036,31 +3081,31 @@ var jo = function() {
|
|
|
3036
3081
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
3037
3082
|
return n.emit("click", a);
|
|
3038
3083
|
} } });
|
|
3039
|
-
},
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3084
|
+
}, Uo = [], Zo = /* @__PURE__ */ S(
|
|
3085
|
+
zo,
|
|
3086
|
+
Wo,
|
|
3087
|
+
Uo,
|
|
3043
3088
|
!1,
|
|
3044
3089
|
null,
|
|
3045
3090
|
"59449838"
|
|
3046
3091
|
);
|
|
3047
|
-
const
|
|
3092
|
+
const Xo = Zo.exports, At = 4, Tt = 3, Yo = /* @__PURE__ */ P({
|
|
3048
3093
|
__name: "lume-point",
|
|
3049
3094
|
props: {
|
|
3050
3095
|
x: null,
|
|
3051
3096
|
y: null,
|
|
3052
|
-
color: { default:
|
|
3053
|
-
radius: { default:
|
|
3097
|
+
color: { default: X.Skyblue },
|
|
3098
|
+
radius: { default: At },
|
|
3054
3099
|
active: { type: Boolean, default: !1 },
|
|
3055
3100
|
visible: { type: Boolean, default: !1 }
|
|
3056
3101
|
},
|
|
3057
3102
|
emits: ["click"],
|
|
3058
3103
|
setup(t, { emit: e }) {
|
|
3059
|
-
const r = t, n = I(null), a = f(() => r.radius / 2),
|
|
3060
|
-
return
|
|
3104
|
+
const r = t, n = I(null), a = f(() => r.radius / 2), o = f(() => r.active ? r.radius : r.visible ? Tt : 0);
|
|
3105
|
+
return re(() => De(n.value)), { __sfc: !0, DEFAULT_RADIUS: At, DEFAULT_VISIBLE_RADIUS: Tt, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
|
|
3061
3106
|
}
|
|
3062
3107
|
});
|
|
3063
|
-
var
|
|
3108
|
+
var Ko = function() {
|
|
3064
3109
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3065
3110
|
return r("circle", { ref: "root", staticClass: "lume-point", class: {
|
|
3066
3111
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -3069,47 +3114,47 @@ var Uo = function() {
|
|
|
3069
3114
|
}, attrs: { cx: e.x, cy: e.y, r: n.computedRadius, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
3070
3115
|
return n.emit("click", a);
|
|
3071
3116
|
} } });
|
|
3072
|
-
},
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3117
|
+
}, Jo = [], Qo = /* @__PURE__ */ S(
|
|
3118
|
+
Yo,
|
|
3119
|
+
Ko,
|
|
3120
|
+
Jo,
|
|
3076
3121
|
!1,
|
|
3077
3122
|
null,
|
|
3078
3123
|
"080270c0"
|
|
3079
3124
|
);
|
|
3080
|
-
const
|
|
3081
|
-
function
|
|
3082
|
-
function r(
|
|
3125
|
+
const qo = Qo.exports;
|
|
3126
|
+
function Zt(t, e) {
|
|
3127
|
+
function r(u) {
|
|
3083
3128
|
let i = null;
|
|
3084
|
-
return
|
|
3129
|
+
return u == null ? void 0 : u.reduce((l, c, s) => (c == null || c.value == null ? (i ? i.push(s) : i = [s], s === (u == null ? void 0 : u.length) - 1 && l.push(i)) : i && (l.push(i), i = null), l), []);
|
|
3085
3130
|
}
|
|
3086
|
-
function n(
|
|
3087
|
-
const m = Math.abs(
|
|
3088
|
-
return
|
|
3131
|
+
function n(u, i, l, c) {
|
|
3132
|
+
const m = Math.abs(u - i) / (l + 1) * (c + 1);
|
|
3133
|
+
return u == null && i == null ? null : u > i ? u - m : u + m;
|
|
3089
3134
|
}
|
|
3090
|
-
function a(
|
|
3135
|
+
function a(u) {
|
|
3091
3136
|
return function(l) {
|
|
3092
|
-
return !!
|
|
3137
|
+
return !!u.find(
|
|
3093
3138
|
(c) => c.includes(l) || c.includes(l - 1)
|
|
3094
3139
|
);
|
|
3095
3140
|
};
|
|
3096
3141
|
}
|
|
3097
3142
|
return { computedLineData: f(
|
|
3098
|
-
() => t.value.map((
|
|
3099
|
-
const i = r(
|
|
3143
|
+
() => t.value.map((u) => {
|
|
3144
|
+
const i = r(u.values);
|
|
3100
3145
|
return {
|
|
3101
|
-
...
|
|
3146
|
+
...u,
|
|
3102
3147
|
isDashed: a(i),
|
|
3103
|
-
values:
|
|
3104
|
-
var v, m,
|
|
3148
|
+
values: u.values.map((l, c) => {
|
|
3149
|
+
var v, m, h, g;
|
|
3105
3150
|
const s = i.find(
|
|
3106
3151
|
(_) => _.includes(c)
|
|
3107
3152
|
);
|
|
3108
3153
|
if (s) {
|
|
3109
3154
|
const _ = s[0] - 1, x = s[s.length - 1] + 1;
|
|
3110
|
-
let d = (v =
|
|
3155
|
+
let d = (v = u.values[_]) == null ? void 0 : v.value, p = (m = u.values[x]) == null ? void 0 : m.value;
|
|
3111
3156
|
if (d == null) {
|
|
3112
|
-
const y = (
|
|
3157
|
+
const y = (g = (h = e == null ? void 0 : e.value) == null ? void 0 : h.domain) == null ? void 0 : g.call(h);
|
|
3113
3158
|
d = (y == null ? void 0 : y[1]) ?? 0, p = d;
|
|
3114
3159
|
} else p == null && (p = d);
|
|
3115
3160
|
return {
|
|
@@ -3119,7 +3164,7 @@ function jt(t, e) {
|
|
|
3119
3164
|
s.length,
|
|
3120
3165
|
s.indexOf(c)
|
|
3121
3166
|
),
|
|
3122
|
-
label:
|
|
3167
|
+
label: St,
|
|
3123
3168
|
isNull: !0
|
|
3124
3169
|
};
|
|
3125
3170
|
}
|
|
@@ -3129,23 +3174,23 @@ function jt(t, e) {
|
|
|
3129
3174
|
})
|
|
3130
3175
|
) };
|
|
3131
3176
|
}
|
|
3132
|
-
function
|
|
3177
|
+
function eu(t, e) {
|
|
3133
3178
|
const r = t.bandwidth() / 2;
|
|
3134
3179
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
3135
3180
|
}
|
|
3136
|
-
function
|
|
3181
|
+
function tu(t, e) {
|
|
3137
3182
|
return (r, n) => t(e + (n - 1));
|
|
3138
3183
|
}
|
|
3139
|
-
function
|
|
3140
|
-
const a =
|
|
3141
|
-
K(r) ?
|
|
3142
|
-
).y((
|
|
3143
|
-
return e.every((
|
|
3184
|
+
function nu(t, e, r, n) {
|
|
3185
|
+
const a = rn().x(
|
|
3186
|
+
K(r) ? eu(r, t) : tu(r, t)
|
|
3187
|
+
).y((o) => n(o));
|
|
3188
|
+
return e.every((o) => o == null) ? null : a(e);
|
|
3144
3189
|
}
|
|
3145
|
-
const
|
|
3190
|
+
const Ot = 1, ru = /* @__PURE__ */ P({
|
|
3146
3191
|
__name: "lume-line-group",
|
|
3147
3192
|
props: {
|
|
3148
|
-
...
|
|
3193
|
+
...He(),
|
|
3149
3194
|
withPoints: {
|
|
3150
3195
|
type: [Boolean, String],
|
|
3151
3196
|
default: !0
|
|
@@ -3157,46 +3202,46 @@ const At = 1, qo = /* @__PURE__ */ R({
|
|
|
3157
3202
|
},
|
|
3158
3203
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3159
3204
|
setup(t, { emit: e }) {
|
|
3160
|
-
const r = t, { data: n, options: a, xScale:
|
|
3205
|
+
const r = t, { data: n, options: a, xScale: o, yScale: u, labels: i } = j(r), l = $e(
|
|
3161
3206
|
"tooltipAnchorAttributes",
|
|
3162
3207
|
null
|
|
3163
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
3208
|
+
), { updateTooltipAnchorAttributes: c } = Gt(
|
|
3164
3209
|
l,
|
|
3165
3210
|
a,
|
|
3166
|
-
u,
|
|
3167
3211
|
o,
|
|
3212
|
+
u,
|
|
3168
3213
|
i
|
|
3169
3214
|
), s = f(() => {
|
|
3170
|
-
if (n.value.every((
|
|
3215
|
+
if (n.value.every(($) => $.isDashed))
|
|
3171
3216
|
return n.value;
|
|
3172
|
-
const { computedLineData: T } =
|
|
3217
|
+
const { computedLineData: T } = Zt(
|
|
3173
3218
|
n,
|
|
3174
|
-
|
|
3219
|
+
u
|
|
3175
3220
|
);
|
|
3176
3221
|
return a.value.withTooltip !== !1 && (l != null && l.value) && c(T.value), T.value;
|
|
3177
3222
|
}), v = f(() => {
|
|
3178
3223
|
if (r.hoveredIndex === -1) return;
|
|
3179
|
-
const T =
|
|
3224
|
+
const T = hn(
|
|
3180
3225
|
s.value,
|
|
3181
3226
|
r.hoveredIndex
|
|
3182
3227
|
);
|
|
3183
3228
|
return {
|
|
3184
|
-
d: `M ${
|
|
3185
|
-
V ${
|
|
3229
|
+
d: `M ${je(o.value, r.hoveredIndex)},${u.value.range()[1]}
|
|
3230
|
+
V ${u.value(T)}`
|
|
3186
3231
|
// Move to X index, Vertical line to the highest point
|
|
3187
3232
|
};
|
|
3188
3233
|
}), m = f(
|
|
3189
|
-
() =>
|
|
3234
|
+
() => o.value && Ot / (yn(o.value) - 1)
|
|
3190
3235
|
// Subtracting the first line (read below)
|
|
3191
|
-
),
|
|
3236
|
+
), h = f(
|
|
3192
3237
|
() => {
|
|
3193
3238
|
var T;
|
|
3194
3239
|
return ((T = a.value) == null ? void 0 : T.lineWidth) * 2 || void 0;
|
|
3195
3240
|
}
|
|
3196
3241
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3197
|
-
),
|
|
3198
|
-
() =>
|
|
3199
|
-
), _ = f(() =>
|
|
3242
|
+
), g = f(
|
|
3243
|
+
() => o.value.bandwidth() / 2
|
|
3244
|
+
), _ = f(() => o.value.domain()), x = f(
|
|
3200
3245
|
() => a.value.withPoints ?? r.withPoints
|
|
3201
3246
|
), d = f(
|
|
3202
3247
|
() => a.value.withPoints === "visible" || r.withPoints === "visible"
|
|
@@ -3204,17 +3249,17 @@ const At = 1, qo = /* @__PURE__ */ R({
|
|
|
3204
3249
|
function p(T) {
|
|
3205
3250
|
return s.value[T].values;
|
|
3206
3251
|
}
|
|
3207
|
-
function y(T,
|
|
3208
|
-
var
|
|
3209
|
-
const
|
|
3210
|
-
(
|
|
3211
|
-
(V = p(
|
|
3252
|
+
function y(T, $) {
|
|
3253
|
+
var G, V;
|
|
3254
|
+
const R = T === 0 ? [] : [
|
|
3255
|
+
(G = p($)[T - 1]) == null ? void 0 : G.value,
|
|
3256
|
+
(V = p($)[T]) == null ? void 0 : V.value
|
|
3212
3257
|
];
|
|
3213
|
-
return
|
|
3258
|
+
return nu(
|
|
3214
3259
|
T,
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3260
|
+
R,
|
|
3261
|
+
o.value,
|
|
3262
|
+
u.value
|
|
3218
3263
|
) || "";
|
|
3219
3264
|
}
|
|
3220
3265
|
function b(T) {
|
|
@@ -3223,86 +3268,86 @@ const At = 1, qo = /* @__PURE__ */ R({
|
|
|
3223
3268
|
animationDuration: m.value
|
|
3224
3269
|
};
|
|
3225
3270
|
}
|
|
3226
|
-
function A(T,
|
|
3227
|
-
var
|
|
3228
|
-
const
|
|
3271
|
+
function A(T, $) {
|
|
3272
|
+
var G;
|
|
3273
|
+
const R = (G = p($)[T]) == null ? void 0 : G.value;
|
|
3229
3274
|
return {
|
|
3230
|
-
x: K(
|
|
3231
|
-
y:
|
|
3275
|
+
x: K(o.value) ? r.xScale(_.value[T]) + g.value : r.xScale(T),
|
|
3276
|
+
y: R === null ? u.value(u.value.domain()[1]) : u.value(R)
|
|
3232
3277
|
};
|
|
3233
3278
|
}
|
|
3234
|
-
function
|
|
3279
|
+
function N(T) {
|
|
3235
3280
|
return r.hoveredIndex === T;
|
|
3236
3281
|
}
|
|
3237
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
3282
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: Ot, props: r, emit: e, data: n, options: a, xScale: o, yScale: u, labels: i, tooltipAnchorAttributes: l, updateTooltipAnchorAttributes: c, computedGroupData: s, overlayLineAttributes: v, animationDuration: m, pointRadius: h, xAxisOffset: g, domain: _, computedWithPoints: x, computedVisiblePoints: d, getValuesFromDataset: p, getPathDefinition: y, getLineTransitionParams: b, getPointPosition: A, isPointActive: N, LumeLine: Xo, LumePoint: qo };
|
|
3238
3283
|
}
|
|
3239
3284
|
});
|
|
3240
|
-
var
|
|
3285
|
+
var au = function() {
|
|
3241
3286
|
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:
|
|
3287
|
+
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) {
|
|
3288
|
+
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(u, i) {
|
|
3289
|
+
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(l) {
|
|
3290
|
+
return n.emit("line-click", { index: i, datasetIndex: o, event: l });
|
|
3246
3291
|
} } }, "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,
|
|
3292
|
+
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(u, i) {
|
|
3293
|
+
return [u.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(l) {
|
|
3294
|
+
return n.emit("point-click", { index: i, datasetIndex: o, event: l });
|
|
3295
|
+
} } }, "lume-point", n.getPointPosition(i, o), !1))];
|
|
3251
3296
|
})], 2) : e._e()]);
|
|
3252
3297
|
})], 2);
|
|
3253
|
-
},
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3298
|
+
}, ou = [], uu = /* @__PURE__ */ S(
|
|
3299
|
+
ru,
|
|
3300
|
+
au,
|
|
3301
|
+
ou,
|
|
3257
3302
|
!1,
|
|
3258
3303
|
null,
|
|
3259
3304
|
"898c2e7a"
|
|
3260
3305
|
);
|
|
3261
|
-
const
|
|
3262
|
-
margins:
|
|
3306
|
+
const Xt = uu.exports, lu = {
|
|
3307
|
+
margins: ie.VERTICAL,
|
|
3263
3308
|
startOnZero: !0,
|
|
3264
3309
|
withTooltip: !0,
|
|
3265
3310
|
xAxisOptions: {},
|
|
3266
3311
|
yAxisOptions: { gridLines: !0 }
|
|
3267
|
-
},
|
|
3312
|
+
}, iu = /* @__PURE__ */ P({
|
|
3268
3313
|
__name: "lume-line-chart",
|
|
3269
3314
|
props: {
|
|
3270
|
-
...
|
|
3315
|
+
...fe(null, !1)
|
|
3271
3316
|
},
|
|
3272
3317
|
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:
|
|
3318
|
+
const r = t, { componentEventPropagator: n } = q(e), a = se(Z()), { options: o } = j(r), { allOptions: u } = Q(o, lu);
|
|
3319
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: u, LumeChart: pe, LumeLineGroup: Xt };
|
|
3275
3320
|
}
|
|
3276
3321
|
});
|
|
3277
|
-
var
|
|
3322
|
+
var su = function() {
|
|
3278
3323
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3279
3324
|
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
3325
|
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(
|
|
3326
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3327
|
+
return { key: o, fn: function(u) {
|
|
3328
|
+
return [e._t(o, null, null, u || {})];
|
|
3284
3329
|
} };
|
|
3285
3330
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3286
|
-
},
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3331
|
+
}, cu = [], du = /* @__PURE__ */ S(
|
|
3332
|
+
iu,
|
|
3333
|
+
su,
|
|
3334
|
+
cu,
|
|
3290
3335
|
!1,
|
|
3291
3336
|
null,
|
|
3292
3337
|
null
|
|
3293
3338
|
);
|
|
3294
|
-
const
|
|
3295
|
-
function
|
|
3339
|
+
const Iu = du.exports;
|
|
3340
|
+
function vu(t) {
|
|
3296
3341
|
return { areaPathDefinition: f(
|
|
3297
3342
|
() => function(r, n) {
|
|
3298
3343
|
if (!r || !n || K(r) || K(n))
|
|
3299
3344
|
return;
|
|
3300
3345
|
const a = t.value[0].values;
|
|
3301
|
-
return
|
|
3346
|
+
return an().x((o, u) => r(u)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
3302
3347
|
}
|
|
3303
3348
|
) };
|
|
3304
3349
|
}
|
|
3305
|
-
const
|
|
3350
|
+
const fu = {
|
|
3306
3351
|
margins: {
|
|
3307
3352
|
top: 0,
|
|
3308
3353
|
right: 0,
|
|
@@ -3316,23 +3361,23 @@ const su = {
|
|
|
3316
3361
|
tooltipOptions: {
|
|
3317
3362
|
showTitle: !1
|
|
3318
3363
|
}
|
|
3319
|
-
},
|
|
3364
|
+
}, pu = /* @__PURE__ */ P({
|
|
3320
3365
|
__name: "lume-sparkline-chart",
|
|
3321
3366
|
props: {
|
|
3322
|
-
...
|
|
3323
|
-
...
|
|
3367
|
+
...nt(null),
|
|
3368
|
+
...xe()
|
|
3324
3369
|
},
|
|
3325
3370
|
setup(t, { expose: e, emit: r }) {
|
|
3326
|
-
const n = t, { componentEventPropagator: a } = q(r),
|
|
3371
|
+
const n = t, { componentEventPropagator: a } = q(r), o = se(Z()), { data: u, options: i } = j(n), { internalData: l } = rt(u), { allOptions: c } = Q(i, fu), { computedLineData: s } = Zt(l), { areaPathDefinition: v } = vu(s), m = f(() => {
|
|
3327
3372
|
var x, d;
|
|
3328
3373
|
return (d = (x = l.value) == null ? void 0 : x[0]) == null ? void 0 : d.color;
|
|
3329
|
-
}),
|
|
3374
|
+
}), h = f(
|
|
3330
3375
|
() => {
|
|
3331
3376
|
var x, d;
|
|
3332
|
-
return ((d = (x =
|
|
3377
|
+
return ((d = (x = u.value) == null ? void 0 : x[0]) == null ? void 0 : d.areaColor) || m.value;
|
|
3333
3378
|
}
|
|
3334
3379
|
);
|
|
3335
|
-
function
|
|
3380
|
+
function g(x) {
|
|
3336
3381
|
return {
|
|
3337
3382
|
...x,
|
|
3338
3383
|
noMinSize: !0
|
|
@@ -3340,14 +3385,14 @@ const su = {
|
|
|
3340
3385
|
}
|
|
3341
3386
|
function _(x, d, p) {
|
|
3342
3387
|
if (x.length)
|
|
3343
|
-
return
|
|
3388
|
+
return be().range([0, p.width]).domain([0, x[0].values.length - 1]);
|
|
3344
3389
|
}
|
|
3345
3390
|
return e({
|
|
3346
3391
|
areaPathDefinition: v
|
|
3347
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots:
|
|
3392
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: u, options: i, internalData: l, allOptions: c, computedLineData: s, areaPathDefinition: v, computedColor: m, areaColor: h, getSparklineOptions: g, xScaleGenerator: _, LumeChart: pe, LumeLineGroup: Xt };
|
|
3348
3393
|
}
|
|
3349
3394
|
});
|
|
3350
|
-
var
|
|
3395
|
+
var mu = function() {
|
|
3351
3396
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3352
3397
|
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
3398
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3356,70 +3401,70 @@ var du = function() {
|
|
|
3356
3401
|
`lume-fill--${n.areaColor || n.computedColor}`,
|
|
3357
3402
|
"lume-fill--faded"
|
|
3358
3403
|
], 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(
|
|
3404
|
+
} }, e._l(n.slots, function(a, o) {
|
|
3405
|
+
return { key: o, fn: function(u) {
|
|
3406
|
+
return [e._t(o, null, null, u || {})];
|
|
3362
3407
|
} };
|
|
3363
3408
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3364
|
-
},
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3409
|
+
}, _u = [], gu = /* @__PURE__ */ S(
|
|
3410
|
+
pu,
|
|
3411
|
+
mu,
|
|
3412
|
+
_u,
|
|
3368
3413
|
!1,
|
|
3369
3414
|
null,
|
|
3370
3415
|
"579f7e32"
|
|
3371
3416
|
);
|
|
3372
|
-
const
|
|
3417
|
+
const Nu = gu.exports;
|
|
3373
3418
|
export {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3419
|
+
Mr as A,
|
|
3420
|
+
pt as B,
|
|
3421
|
+
le as C,
|
|
3422
|
+
qe as D,
|
|
3423
|
+
je as E,
|
|
3424
|
+
ft as F,
|
|
3425
|
+
at as G,
|
|
3426
|
+
rt as H,
|
|
3427
|
+
ar as I,
|
|
3428
|
+
Zt as J,
|
|
3429
|
+
zr as K,
|
|
3430
|
+
tt as L,
|
|
3386
3431
|
Q as M,
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
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
|
-
|
|
3432
|
+
ur as N,
|
|
3433
|
+
et as O,
|
|
3434
|
+
Zr as P,
|
|
3435
|
+
Gt as Q,
|
|
3436
|
+
Xr as R,
|
|
3437
|
+
Ft as S,
|
|
3438
|
+
nt as T,
|
|
3439
|
+
fe as U,
|
|
3440
|
+
or as V,
|
|
3441
|
+
xe as W,
|
|
3442
|
+
rr as X,
|
|
3443
|
+
X as a,
|
|
3444
|
+
ro as b,
|
|
3445
|
+
ka as c,
|
|
3446
|
+
da as d,
|
|
3447
|
+
_a as e,
|
|
3448
|
+
Gn as f,
|
|
3449
|
+
Qe as g,
|
|
3450
|
+
Lu as h,
|
|
3451
|
+
lt as i,
|
|
3452
|
+
pe as j,
|
|
3453
|
+
dr as k,
|
|
3454
|
+
xu as l,
|
|
3455
|
+
_r as m,
|
|
3456
|
+
Tu as n,
|
|
3457
|
+
Xo as o,
|
|
3458
|
+
Iu as p,
|
|
3459
|
+
Xt as q,
|
|
3460
|
+
jr as r,
|
|
3461
|
+
qo as s,
|
|
3462
|
+
Au as t,
|
|
3463
|
+
Nu as u,
|
|
3464
|
+
Ou as v,
|
|
3465
|
+
Rr as w,
|
|
3466
|
+
wr as x,
|
|
3467
|
+
Or as y,
|
|
3468
|
+
kr as z
|
|
3424
3469
|
};
|
|
3425
|
-
//# sourceMappingURL=
|
|
3470
|
+
//# sourceMappingURL=BvvJadxi.js.map
|