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