@adyen/lume 0.8.0 → 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 +982 -943
- 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 E, ref 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__ */ E({
|
|
|
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, Pt = [
|
|
|
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
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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__ */ E({
|
|
|
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
|
-
function
|
|
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,23 +1541,27 @@ 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
|
|
1564
|
+
const le = Sr.exports, Br = /* @__PURE__ */ E({
|
|
1531
1565
|
__name: "lume-alluvial-node-label",
|
|
1532
1566
|
props: {
|
|
1533
1567
|
bottom: { type: Boolean, default: !1 }
|
|
@@ -1536,20 +1570,20 @@ const oe = xr.exports, Or = /* @__PURE__ */ E({
|
|
|
1536
1570
|
return { __sfc: !0 };
|
|
1537
1571
|
}
|
|
1538
1572
|
});
|
|
1539
|
-
var
|
|
1573
|
+
var Fr = function() {
|
|
1540
1574
|
var e = this, r = e._self._c;
|
|
1541
1575
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1576
|
+
}, Pr = [], Gr = /* @__PURE__ */ w(
|
|
1577
|
+
Br,
|
|
1578
|
+
Fr,
|
|
1579
|
+
Pr,
|
|
1546
1580
|
!1,
|
|
1547
1581
|
null,
|
|
1548
1582
|
"d2a7cb8e",
|
|
1549
1583
|
null,
|
|
1550
1584
|
null
|
|
1551
1585
|
);
|
|
1552
|
-
const
|
|
1586
|
+
const Vr = Gr.exports, jr = /* @__PURE__ */ E({
|
|
1553
1587
|
__name: "lume-alluvial-node-value",
|
|
1554
1588
|
props: {
|
|
1555
1589
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1558,21 +1592,21 @@ const Er = wr.exports, Nr = /* @__PURE__ */ E({
|
|
|
1558
1592
|
return { __sfc: !0 };
|
|
1559
1593
|
}
|
|
1560
1594
|
});
|
|
1561
|
-
var
|
|
1595
|
+
var Mr = function() {
|
|
1562
1596
|
var e = this, r = e._self._c;
|
|
1563
1597
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1564
|
-
},
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1598
|
+
}, zr = [], Wr = /* @__PURE__ */ w(
|
|
1599
|
+
jr,
|
|
1600
|
+
Mr,
|
|
1601
|
+
zr,
|
|
1568
1602
|
!1,
|
|
1569
1603
|
null,
|
|
1570
1604
|
"002e2887",
|
|
1571
1605
|
null,
|
|
1572
1606
|
null
|
|
1573
1607
|
);
|
|
1574
|
-
const
|
|
1575
|
-
function
|
|
1608
|
+
const Zr = Wr.exports;
|
|
1609
|
+
function Qe(t, e) {
|
|
1576
1610
|
return {
|
|
1577
1611
|
x0: 0 + (e ? e.left : 0),
|
|
1578
1612
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1580,35 +1614,35 @@ function Ze(t, e) {
|
|
|
1580
1614
|
y1: t.height - (e ? e.bottom : 0)
|
|
1581
1615
|
};
|
|
1582
1616
|
}
|
|
1583
|
-
function
|
|
1584
|
-
const e =
|
|
1617
|
+
function Xr(t) {
|
|
1618
|
+
const e = I(Qe(t));
|
|
1585
1619
|
function r(n) {
|
|
1586
|
-
e.value =
|
|
1620
|
+
e.value = Qe(t, n);
|
|
1587
1621
|
}
|
|
1588
1622
|
return { extents: e, updateExtents: r };
|
|
1589
1623
|
}
|
|
1590
|
-
var
|
|
1591
|
-
const
|
|
1592
|
-
function
|
|
1593
|
-
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);
|
|
1594
1628
|
}
|
|
1595
|
-
const
|
|
1596
|
-
function
|
|
1629
|
+
const qe = 8, Kr = 8, Jr = 20, Qr = 200;
|
|
1630
|
+
function ae(t) {
|
|
1597
1631
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1598
1632
|
}
|
|
1599
|
-
function
|
|
1633
|
+
function Q(t) {
|
|
1600
1634
|
return t.source.id + ":" + t.target.id;
|
|
1601
1635
|
}
|
|
1602
|
-
function
|
|
1636
|
+
function qr(t, e) {
|
|
1603
1637
|
return e.nodes.find((r) => r.id === t);
|
|
1604
1638
|
}
|
|
1605
|
-
function
|
|
1606
|
-
return e.links.find((r) =>
|
|
1639
|
+
function ea(t, e) {
|
|
1640
|
+
return e.links.find((r) => Q(r) === t);
|
|
1607
1641
|
}
|
|
1608
|
-
function
|
|
1642
|
+
function At(t) {
|
|
1609
1643
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1610
1644
|
}
|
|
1611
|
-
function
|
|
1645
|
+
function ta(t, e) {
|
|
1612
1646
|
if (!e)
|
|
1613
1647
|
return;
|
|
1614
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(
|
|
@@ -1625,41 +1659,41 @@ function zr(t, e) {
|
|
|
1625
1659
|
bottom: 0
|
|
1626
1660
|
};
|
|
1627
1661
|
}
|
|
1628
|
-
function
|
|
1662
|
+
function na(t) {
|
|
1629
1663
|
return t.map((e) => ({
|
|
1630
1664
|
x: e.x0,
|
|
1631
1665
|
y: e.y0,
|
|
1632
1666
|
width: e.x1 - e.x0,
|
|
1633
1667
|
height: e.y1 - e.y0,
|
|
1634
1668
|
textTransform: {
|
|
1635
|
-
x: e.depth > 0 ? e.x1 +
|
|
1669
|
+
x: e.depth > 0 ? e.x1 + qe : e.x0 - qe,
|
|
1636
1670
|
y: (e.y1 + e.y0) / 2
|
|
1637
1671
|
},
|
|
1638
1672
|
node: e
|
|
1639
1673
|
}));
|
|
1640
1674
|
}
|
|
1641
|
-
function
|
|
1675
|
+
function ra(t) {
|
|
1642
1676
|
return [t.source.x1, t.y0];
|
|
1643
1677
|
}
|
|
1644
|
-
function
|
|
1678
|
+
function aa(t) {
|
|
1645
1679
|
return [t.target.x0, t.y1];
|
|
1646
1680
|
}
|
|
1647
|
-
function
|
|
1648
|
-
return t.curveFunction ?
|
|
1681
|
+
function oa(t) {
|
|
1682
|
+
return t.curveFunction ? Rt(t.curveFunction).source(ra).target(aa) : Ft();
|
|
1649
1683
|
}
|
|
1650
|
-
function
|
|
1684
|
+
function la(t) {
|
|
1651
1685
|
return t.map((e) => {
|
|
1652
1686
|
var r;
|
|
1653
1687
|
return {
|
|
1654
|
-
id:
|
|
1655
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1656
|
-
d:
|
|
1688
|
+
id: Q(e),
|
|
1689
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || de,
|
|
1690
|
+
d: oa(e)(e),
|
|
1657
1691
|
strokeWidth: Math.max(1, e.width),
|
|
1658
1692
|
link: e
|
|
1659
1693
|
};
|
|
1660
1694
|
});
|
|
1661
1695
|
}
|
|
1662
|
-
function
|
|
1696
|
+
function et(t, e, r, n, a) {
|
|
1663
1697
|
if (n === !1) {
|
|
1664
1698
|
t.node = {
|
|
1665
1699
|
...t.node,
|
|
@@ -1667,8 +1701,8 @@ function Ue(t, e, r, n, a) {
|
|
|
1667
1701
|
};
|
|
1668
1702
|
return;
|
|
1669
1703
|
}
|
|
1670
|
-
const o = Date.now(), l =
|
|
1671
|
-
let s = (Date.now() - o) /
|
|
1704
|
+
const o = Date.now(), l = qt(e, r), i = () => {
|
|
1705
|
+
let s = (Date.now() - o) / Qr;
|
|
1672
1706
|
s > 1 && (s = 1), t.node = {
|
|
1673
1707
|
...t.node,
|
|
1674
1708
|
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
@@ -1676,106 +1710,106 @@ function Ue(t, e, r, n, a) {
|
|
|
1676
1710
|
};
|
|
1677
1711
|
requestAnimationFrame(i);
|
|
1678
1712
|
}
|
|
1679
|
-
const
|
|
1713
|
+
const ua = {
|
|
1680
1714
|
nodes: [],
|
|
1681
1715
|
links: []
|
|
1682
1716
|
};
|
|
1683
|
-
function
|
|
1684
|
-
const n =
|
|
1717
|
+
function ia(t, e, r) {
|
|
1718
|
+
const n = I(null), a = d(() => {
|
|
1685
1719
|
var i;
|
|
1686
1720
|
return (i = t.value) == null ? void 0 : i[0].values.map(
|
|
1687
|
-
({ label: u, color: s, value:
|
|
1688
|
-
label: u ||
|
|
1721
|
+
({ label: u, color: s, value: c, deriveColorFromIncomingLinks: v }) => ({
|
|
1722
|
+
label: u || c.toString(),
|
|
1689
1723
|
color: s,
|
|
1690
|
-
fallbackColor: s ||
|
|
1691
|
-
id:
|
|
1724
|
+
fallbackColor: s || de,
|
|
1725
|
+
id: c,
|
|
1692
1726
|
deriveColorFromIncomingLinks: v
|
|
1693
1727
|
})
|
|
1694
1728
|
);
|
|
1695
|
-
}), o =
|
|
1729
|
+
}), o = d(() => {
|
|
1696
1730
|
var i;
|
|
1697
1731
|
return (i = t.value) == null ? void 0 : i[0].values.map(
|
|
1698
1732
|
(u) => {
|
|
1699
1733
|
var s;
|
|
1700
1734
|
return (s = u.targets) == null ? void 0 : s.map(
|
|
1701
|
-
({ node:
|
|
1735
|
+
({ node: c, value: v, color: f, curveFunction: y }) => ({
|
|
1702
1736
|
color: f,
|
|
1703
|
-
curveFunction:
|
|
1737
|
+
curveFunction: y,
|
|
1704
1738
|
source: u.value ?? u.label,
|
|
1705
|
-
target:
|
|
1739
|
+
target: c,
|
|
1706
1740
|
value: v
|
|
1707
1741
|
})
|
|
1708
1742
|
);
|
|
1709
1743
|
}
|
|
1710
1744
|
).filter(Boolean).flat();
|
|
1711
|
-
}), 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));
|
|
1712
1746
|
return D([l, r], () => {
|
|
1713
1747
|
try {
|
|
1714
|
-
const { x0: i, y0: u, x1: s, y1:
|
|
1748
|
+
const { x0: i, y0: u, x1: s, y1: c } = r.value;
|
|
1715
1749
|
n.value = l.value.extent([
|
|
1716
1750
|
[i, u],
|
|
1717
|
-
[s,
|
|
1751
|
+
[s, c]
|
|
1718
1752
|
])({ nodes: a.value, links: o.value });
|
|
1719
1753
|
} catch (i) {
|
|
1720
|
-
|
|
1754
|
+
Yr(kt.GraphProblem, i), n.value = ua;
|
|
1721
1755
|
}
|
|
1722
1756
|
}), { graph: n };
|
|
1723
1757
|
}
|
|
1724
|
-
function
|
|
1758
|
+
function Ce(t, e) {
|
|
1725
1759
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
1726
|
-
e[r.id] = n,
|
|
1760
|
+
e[r.id] = n, Ce(r, e);
|
|
1727
1761
|
}), e;
|
|
1728
1762
|
}
|
|
1729
|
-
function
|
|
1763
|
+
function Re(t, e) {
|
|
1730
1764
|
return e || (e = {}), t.sourceLinks && t.sourceLinks.forEach(({ target: r, value: n }) => {
|
|
1731
|
-
e[r.id] = n,
|
|
1765
|
+
e[r.id] = n, Re(r, e);
|
|
1732
1766
|
}), e;
|
|
1733
1767
|
}
|
|
1734
|
-
function
|
|
1735
|
-
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), []);
|
|
1736
1770
|
}
|
|
1737
|
-
const
|
|
1771
|
+
const ca = (t, e) => {
|
|
1738
1772
|
let r;
|
|
1739
|
-
|
|
1773
|
+
At(t) ? r = {
|
|
1740
1774
|
[t.id]: t.value,
|
|
1741
|
-
...
|
|
1742
|
-
...
|
|
1775
|
+
...Ce(t),
|
|
1776
|
+
...Re(t)
|
|
1743
1777
|
} : r = {
|
|
1744
1778
|
[t.source.id]: t.source.value,
|
|
1745
1779
|
[t.target.id]: t.target.value,
|
|
1746
|
-
...
|
|
1747
|
-
...
|
|
1780
|
+
...Ce(t.source),
|
|
1781
|
+
...Re(t.target)
|
|
1748
1782
|
};
|
|
1749
|
-
const n =
|
|
1783
|
+
const n = sa(r, e);
|
|
1750
1784
|
return { nodes: r, links: n };
|
|
1751
|
-
},
|
|
1752
|
-
if (
|
|
1785
|
+
}, da = (t) => {
|
|
1786
|
+
if (At(t)) {
|
|
1753
1787
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1754
1788
|
return {
|
|
1755
1789
|
nodes: e.reduce(
|
|
1756
|
-
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [
|
|
1757
|
-
{ [
|
|
1790
|
+
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [ae(a)]: o } : { ...r, [ae(n)]: o },
|
|
1791
|
+
{ [ae(t)]: t.value }
|
|
1758
1792
|
),
|
|
1759
|
-
links: e.map((r) =>
|
|
1793
|
+
links: e.map((r) => Q(r))
|
|
1760
1794
|
};
|
|
1761
1795
|
}
|
|
1762
1796
|
return {
|
|
1763
1797
|
nodes: {
|
|
1764
|
-
[
|
|
1765
|
-
[
|
|
1798
|
+
[ae(t.target)]: t.value,
|
|
1799
|
+
[ae(t.source)]: t.source.value
|
|
1766
1800
|
},
|
|
1767
|
-
links: [
|
|
1801
|
+
links: [Q(t)]
|
|
1768
1802
|
};
|
|
1769
1803
|
};
|
|
1770
|
-
function
|
|
1771
|
-
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(
|
|
1772
1806
|
n.value,
|
|
1773
1807
|
r.value
|
|
1774
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1808
|
+
) : e.value.highlightedElements === "closest" ? da(n.value, r.value) : ca(n.value, r.value) : { nodes: {}, links: [] });
|
|
1775
1809
|
return D(a, (o, l) => {
|
|
1776
1810
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1777
1811
|
t.value.forEach((i) => {
|
|
1778
|
-
i.node.id in l.nodes &&
|
|
1812
|
+
i.node.id in l.nodes && et(
|
|
1779
1813
|
i,
|
|
1780
1814
|
l.nodes[i.node.id],
|
|
1781
1815
|
i.node.value,
|
|
@@ -1786,7 +1820,7 @@ function ta(t, e, r) {
|
|
|
1786
1820
|
return;
|
|
1787
1821
|
}
|
|
1788
1822
|
t.value.forEach((i) => {
|
|
1789
|
-
i.node.id in o.nodes &&
|
|
1823
|
+
i.node.id in o.nodes && et(
|
|
1790
1824
|
i,
|
|
1791
1825
|
i.node.value,
|
|
1792
1826
|
o.nodes[i.node.id],
|
|
@@ -1795,10 +1829,10 @@ function ta(t, e, r) {
|
|
|
1795
1829
|
});
|
|
1796
1830
|
}), { highlightedElements: a, hoveredElement: n };
|
|
1797
1831
|
}
|
|
1798
|
-
const
|
|
1832
|
+
const _a = /* @__PURE__ */ E({
|
|
1799
1833
|
__name: "lume-alluvial-group",
|
|
1800
1834
|
props: {
|
|
1801
|
-
...
|
|
1835
|
+
...he(),
|
|
1802
1836
|
hoveredElementId: {
|
|
1803
1837
|
type: [Number, String],
|
|
1804
1838
|
default: null
|
|
@@ -1806,108 +1840,108 @@ const na = /* @__PURE__ */ E({
|
|
|
1806
1840
|
},
|
|
1807
1841
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1808
1842
|
setup(t, { emit: e }) {
|
|
1809
|
-
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(
|
|
1810
1844
|
l,
|
|
1811
1845
|
o,
|
|
1812
1846
|
v
|
|
1813
|
-
),
|
|
1814
|
-
() => Object.keys(
|
|
1815
|
-
),
|
|
1816
|
-
() => l.value.reduce((
|
|
1817
|
-
const
|
|
1818
|
-
return
|
|
1819
|
-
}, []).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)
|
|
1820
1854
|
// Make sure positions are sorted in ascending order
|
|
1821
|
-
), p =
|
|
1855
|
+
), p = d(() => {
|
|
1822
1856
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
1823
|
-
return o.value.nodeHeaders.slice(0,
|
|
1824
|
-
label:
|
|
1825
|
-
x:
|
|
1857
|
+
return o.value.nodeHeaders.slice(0, h.value.length).map((_, b) => ({
|
|
1858
|
+
label: _,
|
|
1859
|
+
x: h.value[b]
|
|
1826
1860
|
}));
|
|
1827
|
-
}),
|
|
1828
|
-
() => o.value.nodeHeaderPadding ??
|
|
1829
|
-
),
|
|
1861
|
+
}), x = d(
|
|
1862
|
+
() => o.value.nodeHeaderPadding ?? Jr
|
|
1863
|
+
), O = d(() => {
|
|
1830
1864
|
if (!(!o.value.gradient || !v.value))
|
|
1831
|
-
return v.value.links.reduce((
|
|
1832
|
-
source:
|
|
1833
|
-
target:
|
|
1834
|
-
x1:
|
|
1835
|
-
x2:
|
|
1836
|
-
},
|
|
1837
|
-
}),
|
|
1838
|
-
const
|
|
1839
|
-
(
|
|
1840
|
-
),
|
|
1841
|
-
return
|
|
1842
|
-
const
|
|
1843
|
-
i.value.filter(({ link:
|
|
1844
|
-
const
|
|
1845
|
-
return
|
|
1846
|
-
x:
|
|
1847
|
-
y:
|
|
1848
|
-
height:
|
|
1849
|
-
width:
|
|
1850
|
-
key: `node-block-${
|
|
1851
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
1852
|
-
}),
|
|
1853
|
-
}, 0),
|
|
1854
|
-
id:
|
|
1855
|
-
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
|
|
1856
1890
|
});
|
|
1857
|
-
}),
|
|
1891
|
+
}), b;
|
|
1858
1892
|
});
|
|
1859
|
-
function
|
|
1860
|
-
return o.value.gradient && `url('#${n}_${
|
|
1893
|
+
function k(_) {
|
|
1894
|
+
return o.value.gradient && `url('#${n}_${Q(_)}')`;
|
|
1861
1895
|
}
|
|
1862
|
-
function N(
|
|
1863
|
-
return
|
|
1896
|
+
function N(_) {
|
|
1897
|
+
return g.value.length > 0 && !g.value.includes(_.toString());
|
|
1864
1898
|
}
|
|
1865
|
-
function
|
|
1866
|
-
return
|
|
1899
|
+
function C(_) {
|
|
1900
|
+
return g.value.length > 0 && g.value.includes(_.toString());
|
|
1867
1901
|
}
|
|
1868
|
-
function
|
|
1869
|
-
return
|
|
1902
|
+
function H(_) {
|
|
1903
|
+
return y.value.links.length > 0 && !y.value.links.includes(_);
|
|
1870
1904
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
1905
|
+
function S(_) {
|
|
1906
|
+
return y.value.links.length > 0 && y.value.links.includes(_);
|
|
1873
1907
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return !
|
|
1908
|
+
function F(_) {
|
|
1909
|
+
return !_.node.color && _.node.deriveColorFromIncomingLinks;
|
|
1876
1910
|
}
|
|
1877
|
-
function
|
|
1878
|
-
|
|
1911
|
+
function te(_, b) {
|
|
1912
|
+
_ !== f.value && (f.value = _, e("link-mouseenter", { link: _, event: b }));
|
|
1879
1913
|
}
|
|
1880
|
-
function
|
|
1881
|
-
const
|
|
1882
|
-
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: _ });
|
|
1883
1917
|
}
|
|
1884
|
-
function
|
|
1885
|
-
if (
|
|
1918
|
+
function P(_) {
|
|
1919
|
+
if (_ == null) {
|
|
1886
1920
|
f.value = null;
|
|
1887
1921
|
return;
|
|
1888
1922
|
}
|
|
1889
|
-
const
|
|
1890
|
-
if (!
|
|
1891
|
-
|
|
1923
|
+
const b = qr(_, v.value) || ea(_, v.value);
|
|
1924
|
+
if (!b) {
|
|
1925
|
+
K(z.InvalidHoveredElement);
|
|
1892
1926
|
return;
|
|
1893
1927
|
}
|
|
1894
|
-
f.value =
|
|
1928
|
+
f.value = b;
|
|
1895
1929
|
}
|
|
1896
|
-
function
|
|
1897
|
-
var
|
|
1898
|
-
return ((
|
|
1930
|
+
function Z(_) {
|
|
1931
|
+
var b;
|
|
1932
|
+
return ((b = T.value.find(({ id: $ }) => _ === $)) == null ? void 0 : b.subNodes) ?? [];
|
|
1899
1933
|
}
|
|
1900
|
-
return D(v, (
|
|
1901
|
-
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);
|
|
1902
1936
|
}), D([r.containerSize, u], () => {
|
|
1903
1937
|
if (r.containerSize.width && r.containerSize.height) {
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1938
|
+
const _ = ta(v.value, u.value);
|
|
1939
|
+
c(_);
|
|
1906
1940
|
}
|
|
1907
|
-
}), 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 };
|
|
1908
1942
|
}
|
|
1909
1943
|
});
|
|
1910
|
-
var
|
|
1944
|
+
var fa = function() {
|
|
1911
1945
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1912
1946
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(a) {
|
|
1913
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) + " ")]);
|
|
@@ -1959,17 +1993,17 @@ var ra = function() {
|
|
|
1959
1993
|
a.node.value
|
|
1960
1994
|
) })], 2)], 2)]);
|
|
1961
1995
|
})], 2);
|
|
1962
|
-
},
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1996
|
+
}, pa = [], ma = /* @__PURE__ */ w(
|
|
1997
|
+
_a,
|
|
1998
|
+
fa,
|
|
1999
|
+
pa,
|
|
1966
2000
|
!1,
|
|
1967
2001
|
null,
|
|
1968
2002
|
"bda77c32",
|
|
1969
2003
|
null,
|
|
1970
2004
|
null
|
|
1971
2005
|
);
|
|
1972
|
-
const
|
|
2006
|
+
const ha = ma.exports, ga = {
|
|
1973
2007
|
margins: {
|
|
1974
2008
|
top: 0,
|
|
1975
2009
|
right: 0,
|
|
@@ -1982,18 +2016,18 @@ const la = oa.exports, ua = {
|
|
|
1982
2016
|
withLegend: !1,
|
|
1983
2017
|
// Alluvial options
|
|
1984
2018
|
gradient: !1,
|
|
1985
|
-
highlightedElements: "
|
|
2019
|
+
highlightedElements: "closest",
|
|
1986
2020
|
nodePadding: 16,
|
|
1987
2021
|
nodeWidth: 16,
|
|
1988
|
-
nodeAlign:
|
|
2022
|
+
nodeAlign: Gt,
|
|
1989
2023
|
valueFormat: (t) => String(t)
|
|
1990
|
-
},
|
|
2024
|
+
}, ya = /* @__PURE__ */ E({
|
|
1991
2025
|
__name: "lume-alluvial-diagram",
|
|
1992
2026
|
props: {
|
|
1993
|
-
...
|
|
2027
|
+
...hr(Se)
|
|
1994
2028
|
},
|
|
1995
2029
|
setup(t) {
|
|
1996
|
-
const e = t, r =
|
|
2030
|
+
const e = t, r = ee(G()), n = tn(G()), { options: a } = R(e), { allOptions: o } = M(a, ga);
|
|
1997
2031
|
function l(i) {
|
|
1998
2032
|
return {
|
|
1999
2033
|
...i,
|
|
@@ -2001,10 +2035,10 @@ const la = oa.exports, ua = {
|
|
|
2001
2035
|
// Alluvial chart never uses base scales
|
|
2002
2036
|
};
|
|
2003
2037
|
}
|
|
2004
|
-
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 };
|
|
2005
2039
|
}
|
|
2006
2040
|
});
|
|
2007
|
-
var
|
|
2041
|
+
var ba = function() {
|
|
2008
2042
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2009
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) {
|
|
2010
2044
|
return [r(n.LumeAlluvialGroup, e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
@@ -2017,40 +2051,40 @@ var sa = function() {
|
|
|
2017
2051
|
return [e._t(o, null, null, l || {})];
|
|
2018
2052
|
} };
|
|
2019
2053
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2054
|
+
}, ka = [], Aa = /* @__PURE__ */ w(
|
|
2055
|
+
ya,
|
|
2056
|
+
ba,
|
|
2057
|
+
ka,
|
|
2024
2058
|
!1,
|
|
2025
2059
|
null,
|
|
2026
2060
|
null,
|
|
2027
2061
|
null,
|
|
2028
2062
|
null
|
|
2029
2063
|
);
|
|
2030
|
-
const
|
|
2031
|
-
var
|
|
2032
|
-
const
|
|
2064
|
+
const Ro = Aa.exports;
|
|
2065
|
+
var He = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(He || {});
|
|
2066
|
+
const Ta = /* @__PURE__ */ E({
|
|
2033
2067
|
__name: "lume-bar-chart",
|
|
2034
2068
|
props: {
|
|
2035
|
-
...
|
|
2069
|
+
...oe(),
|
|
2036
2070
|
type: {
|
|
2037
2071
|
type: String,
|
|
2038
2072
|
default: null,
|
|
2039
|
-
validator: (t) => t in
|
|
2073
|
+
validator: (t) => t in He || t == null
|
|
2040
2074
|
}
|
|
2041
2075
|
},
|
|
2042
2076
|
setup(t) {
|
|
2043
|
-
const e = t, r =
|
|
2077
|
+
const e = t, r = Te(
|
|
2044
2078
|
() => import("./common/42f5d2fc.js")
|
|
2045
|
-
), n =
|
|
2079
|
+
), n = Te(
|
|
2046
2080
|
() => import("./common/abc9d23d.js")
|
|
2047
|
-
), a =
|
|
2081
|
+
), a = Te(
|
|
2048
2082
|
() => import("./common/0664fd4d.js")
|
|
2049
2083
|
), o = /* @__PURE__ */ new Map([
|
|
2050
2084
|
["single", r],
|
|
2051
2085
|
["grouped", n],
|
|
2052
2086
|
["stacked", a]
|
|
2053
|
-
]), l =
|
|
2087
|
+
]), l = ee(G());
|
|
2054
2088
|
function i(s) {
|
|
2055
2089
|
return {
|
|
2056
2090
|
...s,
|
|
@@ -2062,64 +2096,64 @@ const va = /* @__PURE__ */ E({
|
|
|
2062
2096
|
}
|
|
2063
2097
|
};
|
|
2064
2098
|
}
|
|
2065
|
-
const u =
|
|
2099
|
+
const u = d(() => {
|
|
2066
2100
|
if (e.data) {
|
|
2067
|
-
if (
|
|
2101
|
+
if (Se(e.data))
|
|
2068
2102
|
return o.get("single");
|
|
2069
2103
|
if (!e.type)
|
|
2070
2104
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2071
2105
|
return o.get(e.type);
|
|
2072
2106
|
}
|
|
2073
2107
|
});
|
|
2074
|
-
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 };
|
|
2075
2109
|
}
|
|
2076
2110
|
});
|
|
2077
|
-
var
|
|
2111
|
+
var xa = function() {
|
|
2078
2112
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2079
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) {
|
|
2080
2114
|
return { key: o, fn: function(l) {
|
|
2081
2115
|
return [e._t(o, null, null, l || {})];
|
|
2082
2116
|
} };
|
|
2083
2117
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1));
|
|
2084
|
-
},
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2118
|
+
}, La = [], Oa = /* @__PURE__ */ w(
|
|
2119
|
+
Ta,
|
|
2120
|
+
xa,
|
|
2121
|
+
La,
|
|
2088
2122
|
!1,
|
|
2089
2123
|
null,
|
|
2090
2124
|
null,
|
|
2091
2125
|
null,
|
|
2092
2126
|
null
|
|
2093
2127
|
);
|
|
2094
|
-
const
|
|
2095
|
-
function
|
|
2096
|
-
return Object.values(
|
|
2128
|
+
const Ho = Oa.exports;
|
|
2129
|
+
function $a(t) {
|
|
2130
|
+
return Object.values(ln).includes(t) || t == null;
|
|
2097
2131
|
}
|
|
2098
|
-
function
|
|
2132
|
+
function Ia(t) {
|
|
2099
2133
|
return Object.values(L).includes(t);
|
|
2100
2134
|
}
|
|
2101
|
-
const
|
|
2135
|
+
const wa = (t = !1) => ({
|
|
2102
2136
|
type: {
|
|
2103
2137
|
type: String,
|
|
2104
2138
|
default: null,
|
|
2105
|
-
validator:
|
|
2139
|
+
validator: $a
|
|
2106
2140
|
},
|
|
2107
2141
|
...t ? {
|
|
2108
2142
|
orientation: {
|
|
2109
2143
|
type: String,
|
|
2110
2144
|
default: L.VERTICAL,
|
|
2111
|
-
validator:
|
|
2145
|
+
validator: Ia
|
|
2112
2146
|
}
|
|
2113
2147
|
} : {}
|
|
2114
2148
|
});
|
|
2115
|
-
function
|
|
2116
|
-
const e =
|
|
2149
|
+
function Tt(t) {
|
|
2150
|
+
const e = d(() => t.value.map((n) => ({
|
|
2117
2151
|
...n,
|
|
2118
2152
|
values: n.values.map((a) => ({
|
|
2119
2153
|
...a,
|
|
2120
2154
|
value: (a == null ? void 0 : a.value) || 0
|
|
2121
2155
|
}))
|
|
2122
|
-
}))), r =
|
|
2156
|
+
}))), r = d(() => {
|
|
2123
2157
|
var n;
|
|
2124
2158
|
return (n = e.value) == null ? void 0 : n.reduce((a, o) => (o.values.forEach((l, i) => {
|
|
2125
2159
|
a[i] ? a[i].push(l) : a[i] = [l];
|
|
@@ -2127,26 +2161,26 @@ function ht(t) {
|
|
|
2127
2161
|
});
|
|
2128
2162
|
return { multiBarData: e, groupedData: r };
|
|
2129
2163
|
}
|
|
2130
|
-
function
|
|
2164
|
+
function Ea(t, e) {
|
|
2131
2165
|
return t.value.length === 1 ? "single" : e.value;
|
|
2132
2166
|
}
|
|
2133
|
-
function
|
|
2134
|
-
const n =
|
|
2167
|
+
function Na(t, e, r) {
|
|
2168
|
+
const n = d(
|
|
2135
2169
|
() => r.value === L.HORIZONTAL
|
|
2136
2170
|
);
|
|
2137
2171
|
function a(i) {
|
|
2138
2172
|
Math.min(...i.domain()) > 0 && console.error("Bar linear scale domain cannot start above 0!");
|
|
2139
2173
|
}
|
|
2140
|
-
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))());
|
|
2141
2175
|
return { barXScale: o, barYScale: l };
|
|
2142
2176
|
}
|
|
2143
|
-
function
|
|
2144
|
-
const l =
|
|
2177
|
+
function Da(t, e, r, n, a, o) {
|
|
2178
|
+
const l = d(
|
|
2145
2179
|
() => n.value === L.HORIZONTAL
|
|
2146
2180
|
);
|
|
2147
2181
|
function i(v, f) {
|
|
2148
|
-
let
|
|
2149
|
-
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 };
|
|
2150
2184
|
}
|
|
2151
2185
|
function u(v) {
|
|
2152
2186
|
return l.value ? v < 0 ? e.value(0) - e.value(v) : e.value(v) - e.value(0) : e.value.bandwidth();
|
|
@@ -2154,105 +2188,109 @@ function ka(t, e, r, n, a, o) {
|
|
|
2154
2188
|
function s(v) {
|
|
2155
2189
|
return l.value ? r.value.bandwidth() : v < 0 ? r.value(v) - r.value(0) : r.value(0) - r.value(v);
|
|
2156
2190
|
}
|
|
2157
|
-
function
|
|
2158
|
-
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);
|
|
2159
2193
|
return {
|
|
2160
|
-
classList: [`lume-fill--${
|
|
2194
|
+
classList: [`lume-fill--${h}`, ...o],
|
|
2161
2195
|
x: p,
|
|
2162
|
-
y:
|
|
2163
|
-
width:
|
|
2164
|
-
height:
|
|
2165
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2166
|
-
isNegative:
|
|
2196
|
+
y: x,
|
|
2197
|
+
width: O,
|
|
2198
|
+
height: T,
|
|
2199
|
+
isFaded: a.value !== -1 && a.value !== y,
|
|
2200
|
+
isNegative: m < 0
|
|
2167
2201
|
};
|
|
2168
2202
|
}
|
|
2169
|
-
return { barAttributeGenerator:
|
|
2203
|
+
return { barAttributeGenerator: c };
|
|
2170
2204
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const l =
|
|
2205
|
+
function Ca(t, e, r, n, a, o) {
|
|
2206
|
+
const l = d(
|
|
2173
2207
|
() => n.value === L.HORIZONTAL
|
|
2174
|
-
), i =
|
|
2175
|
-
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) {
|
|
2176
2210
|
if (l.value)
|
|
2177
|
-
return
|
|
2211
|
+
return m >= 0 ? e.value(0) : e.value(m);
|
|
2178
2212
|
const p = e.value.domain();
|
|
2179
|
-
return e.value(p[
|
|
2213
|
+
return e.value(p[g]) + i.value(h);
|
|
2180
2214
|
}
|
|
2181
|
-
function
|
|
2215
|
+
function c(m, g, h) {
|
|
2182
2216
|
if (l.value) {
|
|
2183
2217
|
const p = r.value.domain();
|
|
2184
|
-
return r.value(p[
|
|
2218
|
+
return r.value(p[g]) + u.value(h);
|
|
2185
2219
|
}
|
|
2186
|
-
return
|
|
2220
|
+
return m < 0 ? r.value(0) : r.value(m);
|
|
2187
2221
|
}
|
|
2188
|
-
function v(
|
|
2189
|
-
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();
|
|
2190
2224
|
}
|
|
2191
|
-
function f(
|
|
2192
|
-
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);
|
|
2193
2227
|
}
|
|
2194
|
-
function
|
|
2195
|
-
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);
|
|
2196
2230
|
return {
|
|
2197
|
-
classList: [`lume-fill--${
|
|
2198
|
-
x:
|
|
2199
|
-
y,
|
|
2231
|
+
classList: [`lume-fill--${O}`, ...o],
|
|
2232
|
+
x: T,
|
|
2233
|
+
y: k,
|
|
2200
2234
|
width: N,
|
|
2201
|
-
height:
|
|
2202
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2235
|
+
height: C,
|
|
2236
|
+
isFaded: a.value !== -1 && a.value !== h,
|
|
2203
2237
|
isNegative: p < 0
|
|
2204
2238
|
};
|
|
2205
2239
|
}
|
|
2206
|
-
return { barAttributeGenerator:
|
|
2240
|
+
return { barAttributeGenerator: y };
|
|
2207
2241
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const
|
|
2242
|
+
function Ra(t, e, r) {
|
|
2243
|
+
const n = d(
|
|
2210
2244
|
() => e.value === L.HORIZONTAL
|
|
2211
|
-
),
|
|
2212
|
-
const
|
|
2213
|
-
(
|
|
2245
|
+
), a = d(() => {
|
|
2246
|
+
const u = t.value.map(
|
|
2247
|
+
(s) => s.filter((c) => c.value < 0).reduce((c, v) => c + v.value, 0)
|
|
2214
2248
|
);
|
|
2215
|
-
return Math.min(...
|
|
2216
|
-
}),
|
|
2217
|
-
const
|
|
2218
|
-
(
|
|
2219
|
-
(
|
|
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,
|
|
2220
2254
|
0
|
|
2221
2255
|
)
|
|
2222
2256
|
);
|
|
2223
|
-
return Math.max(...
|
|
2257
|
+
return Math.max(...u);
|
|
2224
2258
|
});
|
|
2225
|
-
function
|
|
2226
|
-
return
|
|
2227
|
-
|
|
2228
|
-
|
|
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
|
|
2229
2265
|
),
|
|
2230
|
-
{ labels:
|
|
2266
|
+
{ labels: s }
|
|
2231
2267
|
);
|
|
2232
2268
|
}
|
|
2233
|
-
function
|
|
2234
|
-
return
|
|
2235
|
-
|
|
2236
|
-
|
|
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
|
|
2237
2275
|
),
|
|
2238
|
-
{ labels:
|
|
2239
|
-
) :
|
|
2276
|
+
{ labels: s }
|
|
2277
|
+
) : se().domain([o.value, a.value]).range([0, c.height]);
|
|
2240
2278
|
}
|
|
2241
|
-
return { stackedXScaleGenerator:
|
|
2279
|
+
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2242
2280
|
}
|
|
2243
|
-
function
|
|
2244
|
-
const l =
|
|
2281
|
+
function Ha(t, e, r, n, a, o) {
|
|
2282
|
+
const l = d(
|
|
2245
2283
|
() => n.value === L.HORIZONTAL
|
|
2246
|
-
), i =
|
|
2284
|
+
), i = d(
|
|
2247
2285
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2248
|
-
), u =
|
|
2249
|
-
() => 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))
|
|
2250
2288
|
);
|
|
2251
|
-
function s(p,
|
|
2252
|
-
let
|
|
2253
|
-
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 };
|
|
2254
2292
|
}
|
|
2255
|
-
function
|
|
2293
|
+
function c(p) {
|
|
2256
2294
|
return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
|
|
2257
2295
|
}
|
|
2258
2296
|
function v(p) {
|
|
@@ -2261,42 +2299,42 @@ function La(t, e, r, n, a, o) {
|
|
|
2261
2299
|
function f(p) {
|
|
2262
2300
|
return l.value ? r.value.bandwidth() : r.value(0) - r.value(p);
|
|
2263
2301
|
}
|
|
2264
|
-
function
|
|
2302
|
+
function y(p) {
|
|
2265
2303
|
return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
|
|
2266
2304
|
}
|
|
2267
|
-
function
|
|
2268
|
-
return p ? u.value.reduce((
|
|
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;
|
|
2269
2307
|
}
|
|
2270
|
-
function
|
|
2271
|
-
return p ? u.value.reduce((
|
|
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;
|
|
2272
2310
|
}
|
|
2273
|
-
function
|
|
2274
|
-
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);
|
|
2275
2313
|
return {
|
|
2276
|
-
classList: [`lume-fill--${
|
|
2314
|
+
classList: [`lume-fill--${k ?? t.value[x].color ?? Object.values(V)[x]}`, ...o],
|
|
2277
2315
|
width: N,
|
|
2278
|
-
height:
|
|
2279
|
-
x:
|
|
2280
|
-
y:
|
|
2281
|
-
isFaded: a.value !== -1 && a.value !==
|
|
2282
|
-
isNegative:
|
|
2316
|
+
height: C,
|
|
2317
|
+
x: S,
|
|
2318
|
+
y: F,
|
|
2319
|
+
isFaded: a.value !== -1 && a.value !== O,
|
|
2320
|
+
isNegative: T < 0
|
|
2283
2321
|
};
|
|
2284
2322
|
}
|
|
2285
|
-
return { barAttributeGenerator:
|
|
2323
|
+
return { barAttributeGenerator: h };
|
|
2286
2324
|
}
|
|
2287
|
-
const
|
|
2288
|
-
single:
|
|
2289
|
-
grouped:
|
|
2290
|
-
stacked:
|
|
2291
|
-
},
|
|
2325
|
+
const tt = {
|
|
2326
|
+
single: Da,
|
|
2327
|
+
grouped: Ca,
|
|
2328
|
+
stacked: Ha
|
|
2329
|
+
}, Sa = /* @__PURE__ */ E({
|
|
2292
2330
|
__name: "lume-bar-group",
|
|
2293
2331
|
props: {
|
|
2294
|
-
...
|
|
2332
|
+
...he(),
|
|
2295
2333
|
classList: {
|
|
2296
2334
|
type: [String, Array],
|
|
2297
2335
|
default: () => []
|
|
2298
2336
|
},
|
|
2299
|
-
...
|
|
2337
|
+
...wa(!0),
|
|
2300
2338
|
transition: {
|
|
2301
2339
|
type: Boolean,
|
|
2302
2340
|
default: !0
|
|
@@ -2312,25 +2350,25 @@ const Ye = {
|
|
|
2312
2350
|
type: i,
|
|
2313
2351
|
xScale: u,
|
|
2314
2352
|
yScale: s,
|
|
2315
|
-
classList:
|
|
2316
|
-
} =
|
|
2317
|
-
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](
|
|
2318
2356
|
n,
|
|
2319
2357
|
f,
|
|
2320
|
-
|
|
2358
|
+
y,
|
|
2321
2359
|
o,
|
|
2322
2360
|
a,
|
|
2323
|
-
|
|
2361
|
+
m.value
|
|
2324
2362
|
);
|
|
2325
|
-
return
|
|
2326
|
-
}),
|
|
2363
|
+
return x;
|
|
2364
|
+
}), h = d(() => {
|
|
2327
2365
|
if (l.value)
|
|
2328
2366
|
return o.value === L.HORIZONTAL ? "width" : "height";
|
|
2329
2367
|
});
|
|
2330
|
-
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 };
|
|
2331
2369
|
}
|
|
2332
2370
|
});
|
|
2333
|
-
var
|
|
2371
|
+
var Ba = function() {
|
|
2334
2372
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2335
2373
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2336
2374
|
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
@@ -2345,43 +2383,43 @@ var Oa = function() {
|
|
|
2345
2383
|
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2346
2384
|
}), 1);
|
|
2347
2385
|
}), 0);
|
|
2348
|
-
},
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2386
|
+
}, Fa = [], Pa = /* @__PURE__ */ w(
|
|
2387
|
+
Sa,
|
|
2388
|
+
Ba,
|
|
2389
|
+
Fa,
|
|
2352
2390
|
!1,
|
|
2353
2391
|
null,
|
|
2354
2392
|
null,
|
|
2355
2393
|
null,
|
|
2356
2394
|
null
|
|
2357
2395
|
);
|
|
2358
|
-
const
|
|
2396
|
+
const je = Pa.exports, Ga = {
|
|
2359
2397
|
[L.VERTICAL]: {
|
|
2360
2398
|
withTooltip: !0,
|
|
2361
2399
|
xAxisOptions: {},
|
|
2362
2400
|
yAxisOptions: { gridLines: !0 },
|
|
2363
|
-
margins:
|
|
2401
|
+
margins: J.VERTICAL
|
|
2364
2402
|
},
|
|
2365
2403
|
[L.HORIZONTAL]: {
|
|
2366
2404
|
withTooltip: !0,
|
|
2367
2405
|
xAxisOptions: { gridLines: !0 },
|
|
2368
2406
|
yAxisOptions: { gridLines: !1 },
|
|
2369
|
-
margins:
|
|
2407
|
+
margins: J.HORIZONTAL
|
|
2370
2408
|
}
|
|
2371
|
-
},
|
|
2409
|
+
}, Va = /* @__PURE__ */ E({
|
|
2372
2410
|
__name: "lume-single-bar-chart",
|
|
2373
2411
|
props: {
|
|
2374
|
-
...
|
|
2412
|
+
...oe(Se)
|
|
2375
2413
|
},
|
|
2376
2414
|
setup(t) {
|
|
2377
|
-
const e = t, r =
|
|
2378
|
-
() =>
|
|
2415
|
+
const e = t, r = ee(G()), { orientation: n, options: a } = R(e), o = d(
|
|
2416
|
+
() => Ga[n.value || L.VERTICAL]
|
|
2379
2417
|
// needs to be computed so that default options are reactive
|
|
2380
|
-
), { allOptions: l } =
|
|
2381
|
-
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 };
|
|
2382
2420
|
}
|
|
2383
2421
|
});
|
|
2384
|
-
var
|
|
2422
|
+
var ja = function() {
|
|
2385
2423
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2386
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) {
|
|
2387
2425
|
return [r(n.LumeBarGroup, e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1))];
|
|
@@ -2390,47 +2428,47 @@ var Na = function() {
|
|
|
2390
2428
|
return [e._t(o, null, null, l || {})];
|
|
2391
2429
|
} };
|
|
2392
2430
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2393
|
-
},
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2431
|
+
}, Ma = [], za = /* @__PURE__ */ w(
|
|
2432
|
+
Va,
|
|
2433
|
+
ja,
|
|
2434
|
+
Ma,
|
|
2397
2435
|
!1,
|
|
2398
2436
|
null,
|
|
2399
2437
|
null,
|
|
2400
2438
|
null,
|
|
2401
2439
|
null
|
|
2402
2440
|
);
|
|
2403
|
-
const
|
|
2441
|
+
const So = za.exports, Wa = {
|
|
2404
2442
|
[L.VERTICAL]: {
|
|
2405
2443
|
withTooltip: !0,
|
|
2406
2444
|
xAxisOptions: {},
|
|
2407
2445
|
yAxisOptions: { gridLines: !0 },
|
|
2408
|
-
margins:
|
|
2446
|
+
margins: J.VERTICAL
|
|
2409
2447
|
},
|
|
2410
2448
|
[L.HORIZONTAL]: {
|
|
2411
2449
|
withTooltip: !0,
|
|
2412
2450
|
xAxisOptions: { gridLines: !0 },
|
|
2413
2451
|
yAxisOptions: { gridLines: !1 },
|
|
2414
|
-
margins:
|
|
2452
|
+
margins: J.HORIZONTAL,
|
|
2415
2453
|
tooltipOptions: { position: "right" }
|
|
2416
2454
|
}
|
|
2417
|
-
},
|
|
2455
|
+
}, Za = /* @__PURE__ */ E({
|
|
2418
2456
|
__name: "lume-grouped-bar-chart",
|
|
2419
2457
|
props: {
|
|
2420
|
-
...
|
|
2458
|
+
...oe()
|
|
2421
2459
|
},
|
|
2422
2460
|
setup(t) {
|
|
2423
|
-
const e = t, r =
|
|
2424
|
-
() =>
|
|
2461
|
+
const e = t, r = ee(G()), { orientation: n, options: a } = R(e), o = d(
|
|
2462
|
+
() => Wa[n.value || L.VERTICAL]
|
|
2425
2463
|
// needs to be computed so that default options are reactive
|
|
2426
|
-
), { allOptions: l } =
|
|
2464
|
+
), { allOptions: l } = M(
|
|
2427
2465
|
a,
|
|
2428
2466
|
o
|
|
2429
2467
|
);
|
|
2430
|
-
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 };
|
|
2431
2469
|
}
|
|
2432
2470
|
});
|
|
2433
|
-
var
|
|
2471
|
+
var Xa = function() {
|
|
2434
2472
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2435
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) {
|
|
2436
2474
|
return [r(n.LumeBarGroup, e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1))];
|
|
@@ -2439,50 +2477,51 @@ var Sa = function() {
|
|
|
2439
2477
|
return [e._t(o, null, null, l || {})];
|
|
2440
2478
|
} };
|
|
2441
2479
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2442
|
-
},
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2480
|
+
}, Ua = [], Ya = /* @__PURE__ */ w(
|
|
2481
|
+
Za,
|
|
2482
|
+
Xa,
|
|
2483
|
+
Ua,
|
|
2446
2484
|
!1,
|
|
2447
2485
|
null,
|
|
2448
2486
|
null,
|
|
2449
2487
|
null,
|
|
2450
2488
|
null
|
|
2451
2489
|
);
|
|
2452
|
-
const
|
|
2490
|
+
const Bo = Ya.exports, Ka = {
|
|
2453
2491
|
[L.VERTICAL]: {
|
|
2454
2492
|
withTooltip: !0,
|
|
2455
2493
|
xAxisOptions: {},
|
|
2456
2494
|
yAxisOptions: { gridLines: !0 },
|
|
2457
|
-
margins:
|
|
2495
|
+
margins: J.VERTICAL
|
|
2458
2496
|
},
|
|
2459
2497
|
[L.HORIZONTAL]: {
|
|
2460
2498
|
withTooltip: !0,
|
|
2461
2499
|
xAxisOptions: { gridLines: !0 },
|
|
2462
2500
|
yAxisOptions: { gridLines: !1 },
|
|
2463
|
-
margins:
|
|
2501
|
+
margins: J.HORIZONTAL,
|
|
2464
2502
|
tooltipOptions: { position: "right" }
|
|
2465
2503
|
}
|
|
2466
|
-
},
|
|
2504
|
+
}, Ja = /* @__PURE__ */ E({
|
|
2467
2505
|
__name: "lume-stacked-bar-chart",
|
|
2468
2506
|
props: {
|
|
2469
|
-
...
|
|
2507
|
+
...oe()
|
|
2470
2508
|
},
|
|
2471
2509
|
setup(t) {
|
|
2472
|
-
const e = t, r =
|
|
2473
|
-
() =>
|
|
2510
|
+
const e = t, r = ee(G()), { data: n, orientation: a, options: o } = R(e), l = d(
|
|
2511
|
+
() => Ka[a.value || L.VERTICAL]
|
|
2474
2512
|
// needs to be computed so that default options are reactive
|
|
2475
|
-
), { allOptions: i } =
|
|
2513
|
+
), { allOptions: i } = M(
|
|
2476
2514
|
o,
|
|
2477
2515
|
l
|
|
2478
|
-
), { internalData: u } =
|
|
2516
|
+
), { internalData: u } = Ve(n), { groupedData: s } = Tt(u), { stackedXScaleGenerator: c, stackedYScaleGenerator: v } = Ra(
|
|
2479
2517
|
s,
|
|
2480
|
-
a
|
|
2518
|
+
a,
|
|
2519
|
+
o
|
|
2481
2520
|
);
|
|
2482
|
-
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 };
|
|
2483
2522
|
}
|
|
2484
2523
|
});
|
|
2485
|
-
var
|
|
2524
|
+
var Qa = function() {
|
|
2486
2525
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2487
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) {
|
|
2488
2527
|
return [r(n.LumeBarGroup, e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1))];
|
|
@@ -2491,17 +2530,17 @@ var Va = function() {
|
|
|
2491
2530
|
return [e._t(o, null, null, l || {})];
|
|
2492
2531
|
} };
|
|
2493
2532
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2494
|
-
},
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2533
|
+
}, qa = [], eo = /* @__PURE__ */ w(
|
|
2534
|
+
Ja,
|
|
2535
|
+
Qa,
|
|
2536
|
+
qa,
|
|
2498
2537
|
!1,
|
|
2499
2538
|
null,
|
|
2500
2539
|
null,
|
|
2501
2540
|
null,
|
|
2502
2541
|
null
|
|
2503
2542
|
);
|
|
2504
|
-
const
|
|
2543
|
+
const Fo = eo.exports, nt = 2, to = /* @__PURE__ */ E({
|
|
2505
2544
|
__name: "lume-line",
|
|
2506
2545
|
props: {
|
|
2507
2546
|
pathDefinition: {
|
|
@@ -2510,11 +2549,11 @@ const $o = Ma.exports, Ke = 2, za = /* @__PURE__ */ E({
|
|
|
2510
2549
|
},
|
|
2511
2550
|
width: {
|
|
2512
2551
|
type: Number,
|
|
2513
|
-
default:
|
|
2552
|
+
default: nt
|
|
2514
2553
|
},
|
|
2515
2554
|
color: {
|
|
2516
2555
|
type: String,
|
|
2517
|
-
default:
|
|
2556
|
+
default: V.Skyblue
|
|
2518
2557
|
},
|
|
2519
2558
|
dashed: {
|
|
2520
2559
|
type: Boolean,
|
|
@@ -2535,11 +2574,11 @@ const $o = Ma.exports, Ke = 2, za = /* @__PURE__ */ E({
|
|
|
2535
2574
|
},
|
|
2536
2575
|
emits: ["click"],
|
|
2537
2576
|
setup(t, { emit: e }) {
|
|
2538
|
-
const r =
|
|
2539
|
-
return
|
|
2577
|
+
const r = I(null);
|
|
2578
|
+
return W(() => me(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: nt, emit: e, root: r };
|
|
2540
2579
|
}
|
|
2541
2580
|
});
|
|
2542
|
-
var
|
|
2581
|
+
var no = function() {
|
|
2543
2582
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2544
2583
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2545
2584
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2551,28 +2590,28 @@ var Wa = function() {
|
|
|
2551
2590
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
2552
2591
|
return n.emit("click", a);
|
|
2553
2592
|
} } });
|
|
2554
|
-
},
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2593
|
+
}, ro = [], ao = /* @__PURE__ */ w(
|
|
2594
|
+
to,
|
|
2595
|
+
no,
|
|
2596
|
+
ro,
|
|
2558
2597
|
!1,
|
|
2559
2598
|
null,
|
|
2560
2599
|
"08896455",
|
|
2561
2600
|
null,
|
|
2562
2601
|
null
|
|
2563
2602
|
);
|
|
2564
|
-
const
|
|
2603
|
+
const oo = ao.exports, rt = 4, lo = /* @__PURE__ */ E({
|
|
2565
2604
|
__name: "lume-point",
|
|
2566
2605
|
props: {
|
|
2567
2606
|
x: { type: Number, required: !0 },
|
|
2568
2607
|
y: { type: Number, required: !0 },
|
|
2569
2608
|
color: {
|
|
2570
2609
|
type: String,
|
|
2571
|
-
default:
|
|
2610
|
+
default: V.Skyblue
|
|
2572
2611
|
},
|
|
2573
2612
|
radius: {
|
|
2574
2613
|
type: Number,
|
|
2575
|
-
default:
|
|
2614
|
+
default: rt
|
|
2576
2615
|
},
|
|
2577
2616
|
active: {
|
|
2578
2617
|
type: Boolean,
|
|
@@ -2581,27 +2620,27 @@ const Ua = Xa.exports, Je = 4, Ya = /* @__PURE__ */ E({
|
|
|
2581
2620
|
},
|
|
2582
2621
|
emits: ["click"],
|
|
2583
2622
|
setup(t, { emit: e }) {
|
|
2584
|
-
const r = t, n =
|
|
2585
|
-
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 };
|
|
2586
2625
|
}
|
|
2587
2626
|
});
|
|
2588
|
-
var
|
|
2627
|
+
var uo = function() {
|
|
2589
2628
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2590
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) {
|
|
2591
2630
|
return n.emit("click", a);
|
|
2592
2631
|
} } });
|
|
2593
|
-
},
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2632
|
+
}, io = [], so = /* @__PURE__ */ w(
|
|
2633
|
+
lo,
|
|
2634
|
+
uo,
|
|
2635
|
+
io,
|
|
2597
2636
|
!1,
|
|
2598
2637
|
null,
|
|
2599
2638
|
"9bacbd7d",
|
|
2600
2639
|
null,
|
|
2601
2640
|
null
|
|
2602
2641
|
);
|
|
2603
|
-
const
|
|
2604
|
-
function
|
|
2642
|
+
const co = so.exports;
|
|
2643
|
+
function xt(t) {
|
|
2605
2644
|
function e(o) {
|
|
2606
2645
|
let l = null;
|
|
2607
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), []);
|
|
@@ -2617,27 +2656,27 @@ function gt(t) {
|
|
|
2617
2656
|
);
|
|
2618
2657
|
};
|
|
2619
2658
|
}
|
|
2620
|
-
return { computedLineData:
|
|
2659
|
+
return { computedLineData: d(() => t.value.map((o) => {
|
|
2621
2660
|
const l = e(o.values);
|
|
2622
2661
|
return {
|
|
2623
2662
|
...o,
|
|
2624
2663
|
isDashed: n(l),
|
|
2625
2664
|
values: o.values.map((i, u) => {
|
|
2626
|
-
var
|
|
2665
|
+
var c, v;
|
|
2627
2666
|
const s = l.find(
|
|
2628
2667
|
(f) => f.includes(u)
|
|
2629
2668
|
);
|
|
2630
2669
|
if (s) {
|
|
2631
|
-
const f = s[0] - 1,
|
|
2632
|
-
let
|
|
2633
|
-
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), {
|
|
2634
2673
|
value: r(
|
|
2635
|
-
_,
|
|
2636
2674
|
m,
|
|
2675
|
+
g,
|
|
2637
2676
|
s.length,
|
|
2638
2677
|
s.indexOf(u)
|
|
2639
2678
|
),
|
|
2640
|
-
label:
|
|
2679
|
+
label: _t
|
|
2641
2680
|
};
|
|
2642
2681
|
}
|
|
2643
2682
|
return i;
|
|
@@ -2645,22 +2684,22 @@ function gt(t) {
|
|
|
2645
2684
|
};
|
|
2646
2685
|
})) };
|
|
2647
2686
|
}
|
|
2648
|
-
function
|
|
2687
|
+
function vo(t, e) {
|
|
2649
2688
|
const r = t.bandwidth() / 2;
|
|
2650
2689
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2651
2690
|
}
|
|
2652
|
-
function
|
|
2691
|
+
function _o(t, e) {
|
|
2653
2692
|
return (r, n) => t(e + (n - 1));
|
|
2654
2693
|
}
|
|
2655
|
-
function
|
|
2656
|
-
return
|
|
2657
|
-
|
|
2694
|
+
function fo(t, e, r, n) {
|
|
2695
|
+
return Ht().x(
|
|
2696
|
+
q(r) ? vo(r, t) : _o(r, t)
|
|
2658
2697
|
).y((o) => n(o))(e);
|
|
2659
2698
|
}
|
|
2660
|
-
const
|
|
2699
|
+
const at = 1, po = /* @__PURE__ */ E({
|
|
2661
2700
|
__name: "lume-line-group",
|
|
2662
2701
|
props: {
|
|
2663
|
-
...
|
|
2702
|
+
...he(),
|
|
2664
2703
|
withPoints: {
|
|
2665
2704
|
type: Boolean,
|
|
2666
2705
|
default: !0
|
|
@@ -2672,82 +2711,82 @@ const Qe = 1, ro = /* @__PURE__ */ E({
|
|
|
2672
2711
|
},
|
|
2673
2712
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2674
2713
|
setup(t, { emit: e }) {
|
|
2675
|
-
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(
|
|
2676
2715
|
"tooltipAnchorAttributes",
|
|
2677
2716
|
null
|
|
2678
|
-
), { updateTooltipAnchorAttributes: u } =
|
|
2717
|
+
), { updateTooltipAnchorAttributes: u } = bt(
|
|
2679
2718
|
i,
|
|
2680
2719
|
a,
|
|
2681
2720
|
o,
|
|
2682
2721
|
l
|
|
2683
|
-
), s =
|
|
2722
|
+
), s = d(() => {
|
|
2684
2723
|
if (n.value.every((N) => N.isDashed))
|
|
2685
2724
|
return n.value;
|
|
2686
|
-
const { computedLineData:
|
|
2687
|
-
return a.value.withTooltip !== !1 && (i != null && i.value) && u(
|
|
2688
|
-
}),
|
|
2725
|
+
const { computedLineData: k } = xt(n);
|
|
2726
|
+
return a.value.withTooltip !== !1 && (i != null && i.value) && u(k.value), k.value;
|
|
2727
|
+
}), c = d(() => {
|
|
2689
2728
|
if (r.hoveredIndex === -1)
|
|
2690
2729
|
return;
|
|
2691
|
-
const
|
|
2730
|
+
const k = Jt(
|
|
2692
2731
|
s.value,
|
|
2693
2732
|
r.hoveredIndex
|
|
2694
2733
|
);
|
|
2695
2734
|
return {
|
|
2696
|
-
d: `M ${
|
|
2697
|
-
V ${l.value(
|
|
2735
|
+
d: `M ${Ie(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2736
|
+
V ${l.value(k)}`
|
|
2698
2737
|
// Move to X index, Vertical line to the highest point
|
|
2699
2738
|
};
|
|
2700
|
-
}), v =
|
|
2701
|
-
() => o.value &&
|
|
2739
|
+
}), v = d(
|
|
2740
|
+
() => o.value && at / (Qt(o.value) - 1)
|
|
2702
2741
|
// Subtracting the first line (read below)
|
|
2703
|
-
), f =
|
|
2742
|
+
), f = d(
|
|
2704
2743
|
() => {
|
|
2705
|
-
var
|
|
2706
|
-
return ((
|
|
2744
|
+
var k;
|
|
2745
|
+
return ((k = a.value) == null ? void 0 : k.lineWidth) * 2 || void 0;
|
|
2707
2746
|
}
|
|
2708
2747
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2709
|
-
),
|
|
2748
|
+
), y = d(
|
|
2710
2749
|
() => o.value.bandwidth() / 2
|
|
2711
|
-
),
|
|
2750
|
+
), m = d(() => o.value.domain()), g = d(
|
|
2712
2751
|
() => a.value.withPoints ?? r.withPoints
|
|
2713
2752
|
);
|
|
2714
|
-
function k
|
|
2715
|
-
return s.value[
|
|
2753
|
+
function h(k) {
|
|
2754
|
+
return s.value[k].values;
|
|
2716
2755
|
}
|
|
2717
|
-
function p(
|
|
2718
|
-
var
|
|
2719
|
-
const
|
|
2720
|
-
(
|
|
2721
|
-
(
|
|
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
|
|
2722
2761
|
];
|
|
2723
|
-
return
|
|
2724
|
-
|
|
2725
|
-
|
|
2762
|
+
return fo(
|
|
2763
|
+
k,
|
|
2764
|
+
C,
|
|
2726
2765
|
o.value,
|
|
2727
2766
|
l.value
|
|
2728
2767
|
) || "";
|
|
2729
2768
|
}
|
|
2730
|
-
function
|
|
2769
|
+
function x(k) {
|
|
2731
2770
|
return {
|
|
2732
|
-
animationDelay:
|
|
2771
|
+
animationDelay: k < 2 ? 0 : (k - 1) * v.value,
|
|
2733
2772
|
animationDuration: v.value
|
|
2734
2773
|
};
|
|
2735
2774
|
}
|
|
2736
|
-
function
|
|
2737
|
-
var
|
|
2738
|
-
const
|
|
2775
|
+
function O(k, N) {
|
|
2776
|
+
var H;
|
|
2777
|
+
const C = (H = h(N)[k]) == null ? void 0 : H.value;
|
|
2739
2778
|
return {
|
|
2740
|
-
x:
|
|
2741
|
-
y: l.value(
|
|
2779
|
+
x: q(o.value) ? r.xScale(m.value[k]) + y.value : r.xScale(k),
|
|
2780
|
+
y: l.value(C)
|
|
2742
2781
|
};
|
|
2743
2782
|
}
|
|
2744
|
-
function
|
|
2745
|
-
return r.hoveredIndex ===
|
|
2783
|
+
function T(k) {
|
|
2784
|
+
return r.hoveredIndex === k;
|
|
2746
2785
|
}
|
|
2747
|
-
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 };
|
|
2748
2787
|
}
|
|
2749
2788
|
});
|
|
2750
|
-
var
|
|
2789
|
+
var mo = function() {
|
|
2751
2790
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2752
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) {
|
|
2753
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) {
|
|
@@ -2760,33 +2799,33 @@ var ao = function() {
|
|
|
2760
2799
|
} } }, "lume-point", n.getPointPosition(i, o), !1));
|
|
2761
2800
|
}), 1) : e._e()]);
|
|
2762
2801
|
})], 2);
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2802
|
+
}, ho = [], go = /* @__PURE__ */ w(
|
|
2803
|
+
po,
|
|
2804
|
+
mo,
|
|
2805
|
+
ho,
|
|
2767
2806
|
!1,
|
|
2768
2807
|
null,
|
|
2769
2808
|
"c4d7f0ca",
|
|
2770
2809
|
null,
|
|
2771
2810
|
null
|
|
2772
2811
|
);
|
|
2773
|
-
const
|
|
2774
|
-
margins:
|
|
2812
|
+
const Lt = go.exports, yo = {
|
|
2813
|
+
margins: J.VERTICAL,
|
|
2775
2814
|
startOnZero: !0,
|
|
2776
2815
|
withTooltip: !0,
|
|
2777
2816
|
xAxisOptions: {},
|
|
2778
2817
|
yAxisOptions: { gridLines: !0 }
|
|
2779
|
-
},
|
|
2818
|
+
}, bo = /* @__PURE__ */ E({
|
|
2780
2819
|
__name: "lume-line-chart",
|
|
2781
2820
|
props: {
|
|
2782
|
-
...
|
|
2821
|
+
...oe(null, !1)
|
|
2783
2822
|
},
|
|
2784
2823
|
setup(t) {
|
|
2785
|
-
const e = t, r =
|
|
2786
|
-
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 };
|
|
2787
2826
|
}
|
|
2788
2827
|
});
|
|
2789
|
-
var
|
|
2828
|
+
var ko = function() {
|
|
2790
2829
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2791
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) {
|
|
2792
2831
|
return [r(n.LumeLineGroup, e._b({}, "lume-line-group", a, !1))];
|
|
@@ -2795,28 +2834,28 @@ var so = function() {
|
|
|
2795
2834
|
return [e._t(o, null, null, l || {})];
|
|
2796
2835
|
} };
|
|
2797
2836
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2798
|
-
},
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2837
|
+
}, Ao = [], To = /* @__PURE__ */ w(
|
|
2838
|
+
bo,
|
|
2839
|
+
ko,
|
|
2840
|
+
Ao,
|
|
2802
2841
|
!1,
|
|
2803
2842
|
null,
|
|
2804
2843
|
null,
|
|
2805
2844
|
null,
|
|
2806
2845
|
null
|
|
2807
2846
|
);
|
|
2808
|
-
const
|
|
2809
|
-
function
|
|
2810
|
-
return { areaPathDefinition:
|
|
2847
|
+
const Po = To.exports;
|
|
2848
|
+
function xo(t) {
|
|
2849
|
+
return { areaPathDefinition: d(
|
|
2811
2850
|
() => function(r, n) {
|
|
2812
2851
|
if (!r || !n)
|
|
2813
2852
|
return;
|
|
2814
2853
|
const a = t.value[0].values;
|
|
2815
|
-
return
|
|
2854
|
+
return St().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
2816
2855
|
}
|
|
2817
2856
|
) };
|
|
2818
2857
|
}
|
|
2819
|
-
const
|
|
2858
|
+
const Lo = {
|
|
2820
2859
|
margins: {
|
|
2821
2860
|
top: 0,
|
|
2822
2861
|
right: 0,
|
|
@@ -2830,31 +2869,31 @@ const fo = {
|
|
|
2830
2869
|
tooltipOptions: {
|
|
2831
2870
|
showTitle: !1
|
|
2832
2871
|
}
|
|
2833
|
-
},
|
|
2872
|
+
}, Oo = /* @__PURE__ */ E({
|
|
2834
2873
|
__name: "lume-sparkline-chart",
|
|
2835
2874
|
props: {
|
|
2836
|
-
...
|
|
2837
|
-
...
|
|
2875
|
+
...Ge(null),
|
|
2876
|
+
...ce()
|
|
2838
2877
|
},
|
|
2839
2878
|
setup(t, { expose: e }) {
|
|
2840
|
-
const r = t, n =
|
|
2841
|
-
() => 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
|
|
2842
2881
|
);
|
|
2843
|
-
function f(
|
|
2882
|
+
function f(m) {
|
|
2844
2883
|
return {
|
|
2845
|
-
...
|
|
2884
|
+
...m,
|
|
2846
2885
|
noMinSize: !0
|
|
2847
2886
|
};
|
|
2848
2887
|
}
|
|
2849
|
-
function
|
|
2850
|
-
return
|
|
2888
|
+
function y(m, g, h) {
|
|
2889
|
+
return se().range([0, h.width]).domain([0, m[0].values.length - 1]);
|
|
2851
2890
|
}
|
|
2852
2891
|
return e({
|
|
2853
2892
|
areaPathDefinition: s
|
|
2854
|
-
}), { __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 };
|
|
2855
2894
|
}
|
|
2856
2895
|
});
|
|
2857
|
-
var
|
|
2896
|
+
var $o = function() {
|
|
2858
2897
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2859
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) {
|
|
2860
2899
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -2868,41 +2907,41 @@ var mo = function() {
|
|
|
2868
2907
|
return [e._t(o, null, null, l || {})];
|
|
2869
2908
|
} };
|
|
2870
2909
|
})], null, !0) }, "lume-chart", n.props, !1));
|
|
2871
|
-
},
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2910
|
+
}, Io = [], wo = /* @__PURE__ */ w(
|
|
2911
|
+
Oo,
|
|
2912
|
+
$o,
|
|
2913
|
+
Io,
|
|
2875
2914
|
!1,
|
|
2876
2915
|
null,
|
|
2877
2916
|
"9fc2cb6e",
|
|
2878
2917
|
null,
|
|
2879
2918
|
null
|
|
2880
2919
|
);
|
|
2881
|
-
const
|
|
2920
|
+
const Go = wo.exports;
|
|
2882
2921
|
export {
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
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
|
|
2907
2946
|
};
|
|
2908
2947
|
//# sourceMappingURL=index.js.map
|