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