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