@adyen/lume 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +504 -494
- package/dist/index.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as I, isRef as _t, computed as d, watch as H, toRefs as P, inject as de, reactive as ge, onMounted as J, onBeforeUnmount as pt, watchEffect as ft, useSlots as V, provide as Ae, defineAsyncComponent as Le } from "vue";
|
|
2
|
+
import { format as Ft, ticks as Gt, scaleBand as se, scaleLinear as ce, link as Vt, line as jt, area as Mt } from "d3";
|
|
3
|
+
import { createPopper as zt } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as Wt, sankey as Zt, sankeyJustify as Xt } from "d3-sankey";
|
|
5
|
+
const Ut = /* @__PURE__ */ w({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,7 +44,7 @@ const Xt = /* @__PURE__ */ E({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function E(t, e, r, n, o, a, 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), a && (u._scopeId = "data-v-" + a);
|
|
50
50
|
var c;
|
|
@@ -73,7 +73,7 @@ function w(t, e, r, n, o, a, l, i) {
|
|
|
73
73
|
options: u
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var Yt = 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 Ut = function() {
|
|
|
83
83
|
}, click: function(o) {
|
|
84
84
|
return n.emit("click", o);
|
|
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
|
-
Xt,
|
|
86
|
+
}, Kt = [], Jt = /* @__PURE__ */ E(
|
|
88
87
|
Ut,
|
|
89
88
|
Yt,
|
|
89
|
+
Kt,
|
|
90
90
|
!1,
|
|
91
91
|
null,
|
|
92
92
|
"59ddc0a6",
|
|
93
93
|
null,
|
|
94
94
|
null
|
|
95
95
|
);
|
|
96
|
-
const
|
|
96
|
+
const Qt = Jt.exports, qt = [
|
|
97
97
|
"controls",
|
|
98
98
|
"legend",
|
|
99
99
|
"axes",
|
|
@@ -101,10 +101,10 @@ const Jt = Kt.exports, Qt = [
|
|
|
101
101
|
"tooltip",
|
|
102
102
|
"tooltip-content"
|
|
103
103
|
];
|
|
104
|
-
function
|
|
104
|
+
function mt() {
|
|
105
105
|
return process.env.NODE_ENV === "production";
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ht(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()) || [];
|
|
@@ -112,7 +112,7 @@ function mt(t) {
|
|
|
112
112
|
function Fe(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function en(t) {
|
|
116
116
|
return !!t && t.every(
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
@@ -120,22 +120,22 @@ function qt(t) {
|
|
|
120
120
|
function $e(t) {
|
|
121
121
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function gt(t, e) {
|
|
124
124
|
const r = { ...t };
|
|
125
125
|
return Object.entries(e).forEach(([n, o]) => {
|
|
126
|
-
r[n] = $e(t[n]) && $e(o) ?
|
|
126
|
+
r[n] = $e(t[n]) && $e(o) ? gt(t[n], o) : o;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function tn(t) {
|
|
130
130
|
return t != null && $e(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function oe(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function nn(t) {
|
|
136
136
|
return oe(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const rn = (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 nn = (t, e) => {
|
|
|
145
145
|
))
|
|
146
146
|
throw new Error("Index exceeds length of all of the datasets");
|
|
147
147
|
};
|
|
148
|
-
function
|
|
148
|
+
function on(t, e) {
|
|
149
149
|
var r;
|
|
150
|
-
return
|
|
150
|
+
return rn(t, e), ((r = t.reduce(
|
|
151
151
|
(n, o) => {
|
|
152
152
|
var a, l;
|
|
153
153
|
return (((a = n.values[e]) == null ? void 0 : a.value) ?? 0) > (((l = o.values[e]) == null ? void 0 : l.value) ?? 0) ? n : o;
|
|
@@ -155,7 +155,7 @@ function rn(t, e) {
|
|
|
155
155
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
156
156
|
}
|
|
157
157
|
function Ie(t) {
|
|
158
|
-
const e =
|
|
158
|
+
const e = _t(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,13 +164,13 @@ function Ie(t) {
|
|
|
164
164
|
);
|
|
165
165
|
return Array(r).fill(null);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function an(t) {
|
|
168
168
|
return oe(t) ? t.domain().length : Math.max(...t.domain());
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function ln(t, e) {
|
|
171
171
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function un(t, e, r) {
|
|
174
174
|
const n = r ? t.length - e : e, o = t.slice(0, n);
|
|
175
175
|
return t.slice(n).concat(o);
|
|
176
176
|
}
|
|
@@ -184,32 +184,32 @@ function ae(t) {
|
|
|
184
184
|
}
|
|
185
185
|
return t;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function sn(t) {
|
|
188
188
|
return Object.assign(
|
|
189
189
|
{},
|
|
190
190
|
...Object.keys(t).map(
|
|
191
|
-
(e) =>
|
|
191
|
+
(e) => qt.includes(e) ? {} : { [e]: t[e] }
|
|
192
192
|
)
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const cn = (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
|
|
199
|
+
var K = /* @__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))(K || {});
|
|
201
|
+
const dn = "[lume] ";
|
|
202
202
|
function ne(t, e = !0) {
|
|
203
|
-
e &&
|
|
203
|
+
e && mt() || console.warn(dn + "Warning: " + t);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
205
|
+
const he = (t) => {
|
|
206
206
|
let e = null;
|
|
207
207
|
switch (typeof t) {
|
|
208
208
|
case "string":
|
|
209
209
|
try {
|
|
210
|
-
e =
|
|
210
|
+
e = Ft(t);
|
|
211
211
|
} catch {
|
|
212
|
-
ne(
|
|
212
|
+
ne(K.InvalidFormat), e = null;
|
|
213
213
|
}
|
|
214
214
|
break;
|
|
215
215
|
case "function":
|
|
@@ -222,7 +222,7 @@ const ge = (t) => {
|
|
|
222
222
|
return e ? e(...n) : n[0];
|
|
223
223
|
}
|
|
224
224
|
return r;
|
|
225
|
-
},
|
|
225
|
+
}, ve = () => ({
|
|
226
226
|
options: {
|
|
227
227
|
type: Object,
|
|
228
228
|
default: () => ({})
|
|
@@ -230,12 +230,12 @@ const ge = (t) => {
|
|
|
230
230
|
});
|
|
231
231
|
function Z(t, e) {
|
|
232
232
|
return { allOptions: d(() => {
|
|
233
|
-
const n =
|
|
234
|
-
return n ?
|
|
233
|
+
const n = _t(e) ? e == null ? void 0 : e.value : e;
|
|
234
|
+
return n ? gt(n, t.value) : t.value;
|
|
235
235
|
}) };
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
function
|
|
237
|
+
const vn = 0.2;
|
|
238
|
+
function _n(t, e, r) {
|
|
239
239
|
const n = I(), o = d(() => Math.max(...t.value.range())), a = d(() => e.value.length);
|
|
240
240
|
function l() {
|
|
241
241
|
if (!e.value)
|
|
@@ -244,7 +244,7 @@ function vn(t, e, r) {
|
|
|
244
244
|
(v, s) => v + s.ref.getBoundingClientRect().width,
|
|
245
245
|
0
|
|
246
246
|
), c = Math.ceil(u / a.value);
|
|
247
|
-
n.value = c + c *
|
|
247
|
+
n.value = c + c * vn;
|
|
248
248
|
}
|
|
249
249
|
function i(u) {
|
|
250
250
|
if (!e.value)
|
|
@@ -257,15 +257,15 @@ function vn(t, e, r) {
|
|
|
257
257
|
}
|
|
258
258
|
return H(e, l), { showTick: i };
|
|
259
259
|
}
|
|
260
|
-
var j = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(j || {}),
|
|
260
|
+
var j = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(j || {}), yt = /* @__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))(yt || {}), Ge = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ge || {}), Ve = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(Ve || {}), je = /* @__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))(je || {});
|
|
261
261
|
const L = {
|
|
262
262
|
HORIZONTAL: "horizontal",
|
|
263
263
|
VERTICAL: "vertical"
|
|
264
|
-
},
|
|
264
|
+
}, pn = {
|
|
265
265
|
SINGLE: "single",
|
|
266
266
|
GROUPED: "grouped",
|
|
267
267
|
STACKED: "stacked"
|
|
268
|
-
}, bt = "No data",
|
|
268
|
+
}, bt = "No data", Je = 20, kt = 0.33, Tt = 0.5, xt = 12, _e = 8, fn = 1, mn = [
|
|
269
269
|
"auto",
|
|
270
270
|
"auto-start",
|
|
271
271
|
"auto-end",
|
|
@@ -282,8 +282,8 @@ const L = {
|
|
|
282
282
|
"left-start",
|
|
283
283
|
"left-end"
|
|
284
284
|
];
|
|
285
|
-
function
|
|
286
|
-
t != null && t.closest("svg") || ne(
|
|
285
|
+
function ye(t) {
|
|
286
|
+
t != null && t.closest("svg") || ne(K.NotContainedInSvg);
|
|
287
287
|
}
|
|
288
288
|
const At = {
|
|
289
289
|
/** Displays a line for each tick. */
|
|
@@ -301,14 +301,14 @@ const At = {
|
|
|
301
301
|
tickFormat: null,
|
|
302
302
|
/** Space between the tick label and the axis line. */
|
|
303
303
|
tickPadding: 8
|
|
304
|
-
},
|
|
304
|
+
}, hn = {
|
|
305
305
|
...At,
|
|
306
306
|
withTitle: !1,
|
|
307
307
|
skip: !0
|
|
308
|
-
},
|
|
308
|
+
}, gn = {
|
|
309
309
|
...At,
|
|
310
310
|
gridLines: !0
|
|
311
|
-
},
|
|
311
|
+
}, yn = function(t, e, r) {
|
|
312
312
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
313
313
|
function o(u, c) {
|
|
314
314
|
return {
|
|
@@ -324,7 +324,7 @@ const At = {
|
|
|
324
324
|
return {
|
|
325
325
|
x: -(c - t.value.step()) / 2,
|
|
326
326
|
width: c,
|
|
327
|
-
height: r.value.tickPadding + xt +
|
|
327
|
+
height: r.value.tickPadding + xt + _e
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function l() {
|
|
@@ -350,7 +350,7 @@ const At = {
|
|
|
350
350
|
getTickGroupAttributes: o,
|
|
351
351
|
getTickLabelAttributes: i
|
|
352
352
|
};
|
|
353
|
-
},
|
|
353
|
+
}, bn = function(t, e, r) {
|
|
354
354
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
355
355
|
function o(u, c) {
|
|
356
356
|
return {
|
|
@@ -359,7 +359,7 @@ const At = {
|
|
|
359
359
|
}
|
|
360
360
|
function a(u) {
|
|
361
361
|
var v;
|
|
362
|
-
const c = (u ? (v = u.getComputedTextLength) == null ? void 0 : v.call(u) : 42) + r.value.tickPadding +
|
|
362
|
+
const c = (u ? (v = u.getComputedTextLength) == null ? void 0 : v.call(u) : 42) + r.value.tickPadding + _e;
|
|
363
363
|
return {
|
|
364
364
|
x: -c,
|
|
365
365
|
width: c,
|
|
@@ -388,7 +388,7 @@ const At = {
|
|
|
388
388
|
getTickGroupAttributes: o,
|
|
389
389
|
getTickLabelAttributes: i
|
|
390
390
|
};
|
|
391
|
-
},
|
|
391
|
+
}, kn = function(t, e, r) {
|
|
392
392
|
const n = d(() => {
|
|
393
393
|
const u = t.value.ticks();
|
|
394
394
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -400,7 +400,7 @@ const At = {
|
|
|
400
400
|
}
|
|
401
401
|
function a() {
|
|
402
402
|
return {
|
|
403
|
-
height: r.value.tickPadding + xt +
|
|
403
|
+
height: r.value.tickPadding + xt + _e,
|
|
404
404
|
width: n.value,
|
|
405
405
|
x: -(n.value / 2)
|
|
406
406
|
};
|
|
@@ -423,7 +423,7 @@ const At = {
|
|
|
423
423
|
getTickGroupAttributes: o,
|
|
424
424
|
getTickLabelAttributes: i
|
|
425
425
|
};
|
|
426
|
-
},
|
|
426
|
+
}, Tn = function(t, e, r) {
|
|
427
427
|
const n = d(() => {
|
|
428
428
|
const u = t.value.ticks();
|
|
429
429
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -435,7 +435,7 @@ const At = {
|
|
|
435
435
|
}
|
|
436
436
|
function a(u) {
|
|
437
437
|
var v;
|
|
438
|
-
const c = (((v = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : v.call(u)) || 0) + r.value.tickPadding +
|
|
438
|
+
const c = (((v = u == null ? void 0 : u.getComputedTextLength) == null ? void 0 : v.call(u)) || 0) + r.value.tickPadding + _e;
|
|
439
439
|
return {
|
|
440
440
|
width: c,
|
|
441
441
|
height: n.value,
|
|
@@ -461,14 +461,14 @@ const At = {
|
|
|
461
461
|
getTickGroupAttributes: o,
|
|
462
462
|
getTickLabelAttributes: i
|
|
463
463
|
};
|
|
464
|
-
},
|
|
465
|
-
"x-band-scale-axis":
|
|
466
|
-
"y-band-scale-axis":
|
|
467
|
-
"x-linear-scale-axis":
|
|
468
|
-
"y-linear-scale-axis":
|
|
464
|
+
}, xn = {
|
|
465
|
+
"x-band-scale-axis": yn,
|
|
466
|
+
"y-band-scale-axis": bn,
|
|
467
|
+
"x-linear-scale-axis": kn,
|
|
468
|
+
"y-linear-scale-axis": Tn
|
|
469
469
|
};
|
|
470
|
-
var
|
|
471
|
-
const
|
|
470
|
+
var Ee = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Ee || {}), we = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(we || {}), me = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(me || {});
|
|
471
|
+
const An = /* @__PURE__ */ w({
|
|
472
472
|
__name: "lume-axis",
|
|
473
473
|
props: {
|
|
474
474
|
scale: {
|
|
@@ -478,12 +478,12 @@ const xn = /* @__PURE__ */ E({
|
|
|
478
478
|
type: {
|
|
479
479
|
type: String,
|
|
480
480
|
default: void 0,
|
|
481
|
-
validator: (t) => t in
|
|
481
|
+
validator: (t) => t in me
|
|
482
482
|
},
|
|
483
483
|
position: {
|
|
484
484
|
type: String,
|
|
485
485
|
default: void 0,
|
|
486
|
-
validator: (t) => t in
|
|
486
|
+
validator: (t) => t in we
|
|
487
487
|
},
|
|
488
488
|
containerSize: {
|
|
489
489
|
type: Object,
|
|
@@ -497,34 +497,34 @@ const xn = /* @__PURE__ */ E({
|
|
|
497
497
|
type: String,
|
|
498
498
|
default: L.VERTICAL
|
|
499
499
|
},
|
|
500
|
-
...
|
|
500
|
+
...ve()
|
|
501
501
|
},
|
|
502
502
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
503
503
|
setup(t, { emit: e }) {
|
|
504
|
-
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } =
|
|
505
|
-
() => r.type ?
|
|
504
|
+
const r = t, n = 16, { scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u } = P(r), c = de("isEmpty", I(!1)), v = ge({}), s = I(null), _ = I(null), m = I(null), f = d(
|
|
505
|
+
() => r.type ? me[r.type] : r.position
|
|
506
506
|
), g = d(
|
|
507
507
|
() => r.type || (f.value === "left" ? "y" : "x")
|
|
508
508
|
), y = d(
|
|
509
509
|
() => g.value === "x" && u.value === L.VERTICAL || g.value === "y" && u.value === L.HORIZONTAL
|
|
510
510
|
), { allOptions: p } = Z(
|
|
511
511
|
i,
|
|
512
|
-
g.value === "x" ?
|
|
513
|
-
), { showTick: T } =
|
|
512
|
+
g.value === "x" ? hn : gn
|
|
513
|
+
), { showTick: T } = _n(o, s, p.value.skip), A = d(() => {
|
|
514
514
|
var $, h, O, N;
|
|
515
515
|
return g.value === "y" && c.value ? `translate(0, ${(($ = a.value) == null ? void 0 : $.height) / 2})` : g.value === "x" && c.value ? `translate(-${((h = a.value) == null ? void 0 : h.width) / 2}, ${(O = a.value) == null ? void 0 : O.height})` : `translate(0, ${g.value === "x" ? (N = a.value) == null ? void 0 : N.height : 0})`;
|
|
516
516
|
}), x = d(() => {
|
|
517
517
|
if (oe(o.value))
|
|
518
518
|
return o.value.labels || o.value.domain();
|
|
519
519
|
const { tickCount: $ } = p.value, [h, O] = o.value.domain();
|
|
520
|
-
return
|
|
520
|
+
return Gt(h, O, $);
|
|
521
521
|
}), k = d(() => {
|
|
522
522
|
const { tickFormat: $ } = p.value;
|
|
523
|
-
return
|
|
523
|
+
return he($);
|
|
524
524
|
}), C = d(
|
|
525
525
|
() => p.value.withHover && y.value && l.value > -1
|
|
526
526
|
), D = d(
|
|
527
|
-
() => p.value.tickPadding +
|
|
527
|
+
() => p.value.tickPadding + _e || n
|
|
528
528
|
), R = d(() => g.value === "x" ? (
|
|
529
529
|
// If x axis, get the tick height
|
|
530
530
|
Math.max(
|
|
@@ -550,7 +550,7 @@ const xn = /* @__PURE__ */ E({
|
|
|
550
550
|
const { showTicks: h } = p.value;
|
|
551
551
|
return h === !1 ? "" : k.value($);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Q($, h, O) {
|
|
554
554
|
e("mouseenter", { index: y.value ? $ : null, value: h, event: O });
|
|
555
555
|
}
|
|
556
556
|
function G($, h, O) {
|
|
@@ -561,7 +561,7 @@ const xn = /* @__PURE__ */ E({
|
|
|
561
561
|
if (!(!s.value || !s.value.length))
|
|
562
562
|
return (h = s.value[$]) == null ? void 0 : h.ref;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function q() {
|
|
565
565
|
m.value = x.value.map(
|
|
566
566
|
($, h) => ({
|
|
567
567
|
value: B($),
|
|
@@ -573,17 +573,17 @@ const xn = /* @__PURE__ */ E({
|
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
function U() {
|
|
576
|
-
const $ = o.value.step ? "bandScale" : "linearScale", h =
|
|
576
|
+
const $ = o.value.step ? "bandScale" : "linearScale", h = xn[`${g.value}-${Ee[$]}`];
|
|
577
577
|
Object.entries(h(o, a, p) || []).forEach(
|
|
578
578
|
([O, N]) => {
|
|
579
579
|
v[O] = N;
|
|
580
580
|
}
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
|
-
return H(o, U, { flush: "sync", immediate: !0 }), H(o,
|
|
583
|
+
return H(o, U, { flush: "sync", immediate: !0 }), H(o, q, { immediate: !0 }), H(s, q), H(R, ($) => e("lume__internal--axis-size", $)), J(() => ye(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ee, POSITIONS: we, TYPES: me, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: o, containerSize: a, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: v, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: f, computedType: g, shouldHover: y, allOptions: p, showTick: T, axisTransform: A, ticks: x, tickFormatter: k, isHovering: C, axisLabelOffset: D, axisSize: R, formatTick: B, handleTickMouseenter: Q, handleTickClick: G, getTextNode: M, setTicks: q, init: U, LumeTick: Qt };
|
|
584
584
|
}
|
|
585
585
|
});
|
|
586
|
-
var
|
|
586
|
+
var Ln = function() {
|
|
587
587
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
588
588
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(o) {
|
|
589
589
|
return n.emit("mouseleave", o);
|
|
@@ -600,18 +600,18 @@ var An = function() {
|
|
|
600
600
|
o
|
|
601
601
|
);
|
|
602
602
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
603
|
-
},
|
|
604
|
-
xn,
|
|
603
|
+
}, On = [], $n = /* @__PURE__ */ E(
|
|
605
604
|
An,
|
|
606
605
|
Ln,
|
|
606
|
+
On,
|
|
607
607
|
!1,
|
|
608
608
|
null,
|
|
609
609
|
null,
|
|
610
610
|
null,
|
|
611
611
|
null
|
|
612
612
|
);
|
|
613
|
-
const
|
|
614
|
-
function
|
|
613
|
+
const In = $n.exports;
|
|
614
|
+
function En(t, e, r, n) {
|
|
615
615
|
const o = d(() => r.value > 0 && r.value < 1), a = d(
|
|
616
616
|
() => n.value > 0 && n.value < 1
|
|
617
617
|
), l = d(
|
|
@@ -625,11 +625,11 @@ function In(t, e, r, n) {
|
|
|
625
625
|
}
|
|
626
626
|
function wn(t, e, r, n) {
|
|
627
627
|
const o = I(0), a = I(0), l = d(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
628
|
-
return
|
|
628
|
+
return J(() => {
|
|
629
629
|
o.value = r.value, a.value = n.value;
|
|
630
630
|
}), H(r, (i) => o.value = i), H(n, (i) => a.value = i), { computedWidth: o, computedHeight: a, transformOrigin: l };
|
|
631
631
|
}
|
|
632
|
-
const
|
|
632
|
+
const Nn = /* @__PURE__ */ w({
|
|
633
633
|
__name: "lume-bar",
|
|
634
634
|
props: {
|
|
635
635
|
x: {
|
|
@@ -667,13 +667,13 @@ const En = /* @__PURE__ */ E({
|
|
|
667
667
|
},
|
|
668
668
|
emits: ["click", "mouseover", "mouseleave"],
|
|
669
669
|
setup(t, { emit: e }) {
|
|
670
|
-
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } =
|
|
670
|
+
const r = t, { x: n, y: o, width: a, height: l, transition: i, classList: u } = P(r), c = I(null), v = d(
|
|
671
671
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
672
|
-
), s = d(() => i.value === "width"), _ = d(() => i.value === "height"), m = wn(n, o, a, l), { computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p } =
|
|
673
|
-
return
|
|
672
|
+
), s = d(() => i.value === "width"), _ = d(() => i.value === "height"), m = wn(n, o, a, l), { computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = En(n, o, a, l), T = d(() => y.value ? 1 : (s.value ? m.computedWidth : a).value), A = d(() => p.value ? 1 : (_.value ? m.computedHeight : l).value), x = s.value || _.value ? m.transformOrigin : null;
|
|
673
|
+
return J(() => ye(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: o, width: a, height: l, transition: i, classList: u, root: c, computedClasses: v, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: f, computedY: g, shouldHaveMinWidth: y, shouldHaveMinHeight: p, computedWidth: T, computedHeight: A, transformOrigin: x };
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
|
-
var
|
|
676
|
+
var Cn = function() {
|
|
677
677
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
678
678
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
679
679
|
{
|
|
@@ -690,32 +690,32 @@ var Nn = function() {
|
|
|
690
690
|
}, mouseleave: function(o) {
|
|
691
691
|
return n.emit("mouseleave", o);
|
|
692
692
|
} } });
|
|
693
|
-
},
|
|
694
|
-
En,
|
|
693
|
+
}, Hn = [], Dn = /* @__PURE__ */ E(
|
|
695
694
|
Nn,
|
|
696
695
|
Cn,
|
|
696
|
+
Hn,
|
|
697
697
|
!1,
|
|
698
698
|
null,
|
|
699
699
|
"8e8f732a",
|
|
700
700
|
null,
|
|
701
701
|
null
|
|
702
702
|
);
|
|
703
|
-
const
|
|
704
|
-
function
|
|
705
|
-
const t = I(), e =
|
|
703
|
+
const Me = Dn.exports;
|
|
704
|
+
function Rn() {
|
|
705
|
+
const t = I(), e = ge({
|
|
706
706
|
dimensions: {}
|
|
707
707
|
}), r = new ResizeObserver((n) => {
|
|
708
708
|
n.forEach((o) => {
|
|
709
709
|
e.dimensions = o.contentRect;
|
|
710
710
|
});
|
|
711
711
|
});
|
|
712
|
-
return
|
|
712
|
+
return J(() => {
|
|
713
713
|
r.observe(t.value);
|
|
714
|
-
}),
|
|
714
|
+
}), pt(() => {
|
|
715
715
|
r.unobserve(t.value);
|
|
716
716
|
}), { resizeState: e, resizeRef: t };
|
|
717
717
|
}
|
|
718
|
-
const
|
|
718
|
+
const Pn = /* @__PURE__ */ w({
|
|
719
719
|
__name: "lume-chart-container",
|
|
720
720
|
props: {
|
|
721
721
|
margins: {
|
|
@@ -737,10 +737,10 @@ const Rn = /* @__PURE__ */ E({
|
|
|
737
737
|
},
|
|
738
738
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
739
739
|
setup(t, { emit: e }) {
|
|
740
|
-
const r = t, { margins: n, containerSize: o } =
|
|
740
|
+
const r = t, { margins: n, containerSize: o } = P(r), a = I(null), { resizeRef: l, resizeState: i } = Rn(), u = d(
|
|
741
741
|
() => o.value.height + n.value.top + n.value.bottom
|
|
742
742
|
);
|
|
743
|
-
return
|
|
743
|
+
return ft(() => {
|
|
744
744
|
if (!a.value)
|
|
745
745
|
return;
|
|
746
746
|
const { width: c } = i.dimensions, { height: v } = a.value.getBoundingClientRect();
|
|
@@ -756,7 +756,7 @@ const Rn = /* @__PURE__ */ E({
|
|
|
756
756
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: o, root: a, resizeRef: l, resizeState: i, svgHeight: u };
|
|
757
757
|
}
|
|
758
758
|
});
|
|
759
|
-
var
|
|
759
|
+
var Sn = function() {
|
|
760
760
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
761
761
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
762
762
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -769,32 +769,32 @@ var Pn = function() {
|
|
|
769
769
|
}, mouseleave: function(o) {
|
|
770
770
|
return n.emit("mouseleave", o);
|
|
771
771
|
} } }, [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);
|
|
772
|
-
},
|
|
773
|
-
Rn,
|
|
772
|
+
}, Bn = [], Fn = /* @__PURE__ */ E(
|
|
774
773
|
Pn,
|
|
775
774
|
Sn,
|
|
775
|
+
Bn,
|
|
776
776
|
!1,
|
|
777
777
|
null,
|
|
778
778
|
"36870bc4",
|
|
779
779
|
null,
|
|
780
780
|
null
|
|
781
781
|
);
|
|
782
|
-
const
|
|
782
|
+
const Gn = Fn.exports, Vn = /* @__PURE__ */ w({
|
|
783
783
|
__name: "lume-chart-legend",
|
|
784
784
|
props: {
|
|
785
785
|
data: {
|
|
786
786
|
type: Array,
|
|
787
|
-
validator:
|
|
787
|
+
validator: en,
|
|
788
788
|
required: !0
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
791
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
792
792
|
setup(t, { emit: e }) {
|
|
793
|
-
const r =
|
|
793
|
+
const r = de("isEmpty");
|
|
794
794
|
return { __sfc: !0, emit: e, isEmpty: r };
|
|
795
795
|
}
|
|
796
796
|
});
|
|
797
|
-
var
|
|
797
|
+
var jn = function() {
|
|
798
798
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
799
799
|
return n.isEmpty ? e._e() : r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(o) {
|
|
800
800
|
return n.emit("mouseleave");
|
|
@@ -805,47 +805,47 @@ var Vn = function() {
|
|
|
805
805
|
return n.emit("mouseenter", { index: a, dataset: o, event: l });
|
|
806
806
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${o.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(o.label || a) + " ")]);
|
|
807
807
|
}), 0);
|
|
808
|
-
},
|
|
809
|
-
Gn,
|
|
808
|
+
}, Mn = [], zn = /* @__PURE__ */ E(
|
|
810
809
|
Vn,
|
|
811
810
|
jn,
|
|
811
|
+
Mn,
|
|
812
812
|
!1,
|
|
813
813
|
null,
|
|
814
814
|
"4710298b",
|
|
815
815
|
null,
|
|
816
816
|
null
|
|
817
817
|
);
|
|
818
|
-
const
|
|
819
|
-
const
|
|
820
|
-
var
|
|
818
|
+
const Wn = zn.exports;
|
|
819
|
+
const Zn = {};
|
|
820
|
+
var Xn = function() {
|
|
821
821
|
var e = this, r = e._self._c;
|
|
822
822
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
823
|
-
},
|
|
824
|
-
Wn,
|
|
823
|
+
}, Un = [], Yn = /* @__PURE__ */ E(
|
|
825
824
|
Zn,
|
|
826
825
|
Xn,
|
|
826
|
+
Un,
|
|
827
827
|
!1,
|
|
828
828
|
null,
|
|
829
829
|
"8af3fac6",
|
|
830
830
|
null,
|
|
831
831
|
null
|
|
832
832
|
);
|
|
833
|
-
const
|
|
834
|
-
const
|
|
835
|
-
var
|
|
833
|
+
const Kn = Yn.exports;
|
|
834
|
+
const Jn = {};
|
|
835
|
+
var Qn = function() {
|
|
836
836
|
var e = this, r = e._self._c;
|
|
837
837
|
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
|
-
Kn,
|
|
838
|
+
}, qn = [], er = /* @__PURE__ */ E(
|
|
840
839
|
Jn,
|
|
841
840
|
Qn,
|
|
841
|
+
qn,
|
|
842
842
|
!1,
|
|
843
843
|
null,
|
|
844
844
|
"4ed7ec1b",
|
|
845
845
|
null,
|
|
846
846
|
null
|
|
847
847
|
);
|
|
848
|
-
const
|
|
848
|
+
const tr = er.exports, nr = /* @__PURE__ */ w({
|
|
849
849
|
__name: "lume-tooltip-item",
|
|
850
850
|
props: {
|
|
851
851
|
color: {
|
|
@@ -857,20 +857,20 @@ const er = qn.exports, tr = /* @__PURE__ */ E({
|
|
|
857
857
|
return { __sfc: !0 };
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
|
-
var
|
|
860
|
+
var rr = function() {
|
|
861
861
|
var e = this, r = e._self._c;
|
|
862
862
|
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
|
-
tr,
|
|
863
|
+
}, or = [], ar = /* @__PURE__ */ E(
|
|
865
864
|
nr,
|
|
866
865
|
rr,
|
|
866
|
+
or,
|
|
867
867
|
!1,
|
|
868
868
|
null,
|
|
869
869
|
"4f995c3c",
|
|
870
870
|
null,
|
|
871
871
|
null
|
|
872
872
|
);
|
|
873
|
-
const
|
|
873
|
+
const lr = ar.exports, ur = /* @__PURE__ */ w({
|
|
874
874
|
__name: "lume-tooltip",
|
|
875
875
|
props: {
|
|
876
876
|
targetElement: {
|
|
@@ -884,7 +884,7 @@ const ar = or.exports, lr = /* @__PURE__ */ E({
|
|
|
884
884
|
position: {
|
|
885
885
|
type: String,
|
|
886
886
|
default: "auto",
|
|
887
|
-
validator: (t) =>
|
|
887
|
+
validator: (t) => mn.includes(t)
|
|
888
888
|
},
|
|
889
889
|
fixedPositioning: {
|
|
890
890
|
type: Boolean,
|
|
@@ -902,11 +902,11 @@ const ar = or.exports, lr = /* @__PURE__ */ E({
|
|
|
902
902
|
type: String,
|
|
903
903
|
default: null
|
|
904
904
|
},
|
|
905
|
-
...
|
|
905
|
+
...ve()
|
|
906
906
|
},
|
|
907
907
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
908
908
|
setup(t, { emit: e }) {
|
|
909
|
-
const r = t, n = I(null), { items: o, options: a } =
|
|
909
|
+
const r = t, n = I(null), { items: o, options: a } = P(r), l = V(), i = I(null), { allOptions: u } = Z(a), c = d(
|
|
910
910
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
911
911
|
), v = d(
|
|
912
912
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -925,7 +925,7 @@ const ar = or.exports, lr = /* @__PURE__ */ E({
|
|
|
925
925
|
...r.modifiers || []
|
|
926
926
|
]), _ = d(
|
|
927
927
|
() => u.value.showTitle !== !1 && r.title != null
|
|
928
|
-
), m = d(() =>
|
|
928
|
+
), m = d(() => he(u.value.valueFormat)), f = d(() => he(u.value.titleFormat)), g = d(
|
|
929
929
|
() => {
|
|
930
930
|
var x;
|
|
931
931
|
return ((x = o.value) == null ? void 0 : x.find((k) => k.isSummary)) || {
|
|
@@ -934,7 +934,7 @@ const ar = or.exports, lr = /* @__PURE__ */ E({
|
|
|
934
934
|
}
|
|
935
935
|
), y = d(() => l.summary || g.value.label);
|
|
936
936
|
function p() {
|
|
937
|
-
r.targetElement && n.value && (i.value =
|
|
937
|
+
r.targetElement && n.value && (i.value = zt(r.targetElement, n.value, {
|
|
938
938
|
placement: r.position,
|
|
939
939
|
strategy: v.value,
|
|
940
940
|
modifiers: s.value
|
|
@@ -953,10 +953,10 @@ const ar = or.exports, lr = /* @__PURE__ */ E({
|
|
|
953
953
|
(x, k) => {
|
|
954
954
|
!k && x ? p() : A();
|
|
955
955
|
}
|
|
956
|
-
),
|
|
956
|
+
), J(p), pt(T), { __sfc: !0, props: r, emit: e, root: n, items: o, options: a, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: v, allModifiers: s, showTitle: _, formatValue: m, formatTitle: f, summaryItem: g, hasSummary: y, initPopper: p, destroyPopper: T, updatePopper: A, LumeTooltipTitle: Kn, LumeTooltipSummary: tr, LumeTooltipItem: lr };
|
|
957
957
|
}
|
|
958
958
|
});
|
|
959
|
-
var
|
|
959
|
+
var ir = function() {
|
|
960
960
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
961
961
|
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.targetElement, expression: "targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
962
962
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
@@ -981,66 +981,66 @@ var ur = function() {
|
|
|
981
981
|
});
|
|
982
982
|
})], 2)];
|
|
983
983
|
})], 2);
|
|
984
|
-
},
|
|
985
|
-
lr,
|
|
984
|
+
}, sr = [], cr = /* @__PURE__ */ E(
|
|
986
985
|
ur,
|
|
987
986
|
ir,
|
|
987
|
+
sr,
|
|
988
988
|
!1,
|
|
989
989
|
null,
|
|
990
990
|
"8ec11304",
|
|
991
991
|
null,
|
|
992
992
|
null
|
|
993
993
|
);
|
|
994
|
-
const
|
|
994
|
+
const dr = cr.exports;
|
|
995
995
|
var te = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(te || {});
|
|
996
|
-
const
|
|
997
|
-
function _r(t) {
|
|
998
|
-
return t === te.Divergent ? vr : fe;
|
|
999
|
-
}
|
|
996
|
+
const vr = te.Categorical, pe = j.Skyblue, _r = Ge.SkyTeal;
|
|
1000
997
|
function pr(t) {
|
|
1001
|
-
return
|
|
998
|
+
return t === te.Divergent ? _r : pe;
|
|
999
|
+
}
|
|
1000
|
+
function fr(t) {
|
|
1001
|
+
return Object.values(je).includes(t);
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function Qe(t, e) {
|
|
1004
1004
|
return e === te.Divergent ? Object.values(Ge).includes(t) : Object.values({
|
|
1005
1005
|
...j,
|
|
1006
|
-
...gt,
|
|
1007
1006
|
...yt,
|
|
1008
|
-
...Ve
|
|
1007
|
+
...Ve,
|
|
1008
|
+
...je
|
|
1009
1009
|
}).includes(t);
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function mr(t, e) {
|
|
1012
1012
|
const r = Object.values(j).indexOf(t);
|
|
1013
|
-
return
|
|
1013
|
+
return un(Object.values(j), r > -1 ? r : 0)[e];
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function hr(t, e) {
|
|
1016
1016
|
const r = 50 + e * 10;
|
|
1017
1017
|
return `${t}-${r}`;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function gr(t, e) {
|
|
1020
1020
|
const r = (e + 1) * 10;
|
|
1021
1021
|
return `${t}-${r}`;
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function qe(t, e, r) {
|
|
1024
1024
|
switch (e) {
|
|
1025
1025
|
default:
|
|
1026
1026
|
case te.Categorical:
|
|
1027
|
-
return
|
|
1027
|
+
return fr(t) ? t : mr(t, r);
|
|
1028
1028
|
case te.Sequential:
|
|
1029
|
-
return mr(t, r);
|
|
1030
|
-
case te.Divergent:
|
|
1031
1029
|
return hr(t, r);
|
|
1030
|
+
case te.Divergent:
|
|
1031
|
+
return gr(t, r);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
1036
|
-
}
|
|
1037
|
-
function yr(t) {
|
|
1038
|
-
return t.map((e) => en(e) ? e : { value: e });
|
|
1034
|
+
function yr(t, e, r = vr, n) {
|
|
1035
|
+
return Qe(t, r) ? t : (n > 4 && (ne(K.ColorLoop), n = n % 5), Qe(e, r) ? qe(e, r, n) : qe(pr(r), r, n));
|
|
1039
1036
|
}
|
|
1040
1037
|
function br(t) {
|
|
1038
|
+
return t.map((e) => tn(e) ? e : { value: e });
|
|
1039
|
+
}
|
|
1040
|
+
function kr(t) {
|
|
1041
1041
|
return t.__internal === !0;
|
|
1042
1042
|
}
|
|
1043
|
-
const
|
|
1043
|
+
const ze = (t = null) => ({
|
|
1044
1044
|
data: {
|
|
1045
1045
|
type: Array,
|
|
1046
1046
|
required: !0,
|
|
@@ -1059,17 +1059,17 @@ const Me = (t = null) => ({
|
|
|
1059
1059
|
default: null
|
|
1060
1060
|
}
|
|
1061
1061
|
});
|
|
1062
|
-
function
|
|
1063
|
-
const a =
|
|
1062
|
+
function We(t, e, r, n, o) {
|
|
1063
|
+
const a = ge({
|
|
1064
1064
|
width: 0,
|
|
1065
1065
|
height: 0
|
|
1066
|
-
}), l =
|
|
1066
|
+
}), l = cn(12), i = d(() => {
|
|
1067
1067
|
var v;
|
|
1068
|
-
return t.value.length > 5 && ne(
|
|
1068
|
+
return t.value.length > 5 && ne(K.DatasetLength), (v = t.value) == null ? void 0 : v.map(
|
|
1069
1069
|
(s, _) => {
|
|
1070
|
-
if (
|
|
1070
|
+
if (kr(s))
|
|
1071
1071
|
return s;
|
|
1072
|
-
const m =
|
|
1072
|
+
const m = br(s.values), f = yr(
|
|
1073
1073
|
s.color,
|
|
1074
1074
|
r == null ? void 0 : r.value,
|
|
1075
1075
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -1085,7 +1085,7 @@ function ze(t, e, r, n, o) {
|
|
|
1085
1085
|
);
|
|
1086
1086
|
}), u = d(() => Array.isArray(e.value) ? e.value : Ie(t.value).map((v, s) => s));
|
|
1087
1087
|
function c(v) {
|
|
1088
|
-
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && Ie(t).length * (((n == null ? void 0 : n.value.barHeight) ||
|
|
1088
|
+
const s = (o == null ? void 0 : o.value) === L.HORIZONTAL && Ie(t).length * (((n == null ? void 0 : n.value.barHeight) || Je) * 2) + ((n == null ? void 0 : n.value.barHeight) || Je) || v.height;
|
|
1089
1089
|
a.width = v.width, a.height = s;
|
|
1090
1090
|
}
|
|
1091
1091
|
return {
|
|
@@ -1096,7 +1096,7 @@ function ze(t, e, r, n, o) {
|
|
|
1096
1096
|
updateSize: c
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1099
|
+
const Tr = () => ({
|
|
1100
1100
|
xScale: {
|
|
1101
1101
|
type: Function,
|
|
1102
1102
|
default: null
|
|
@@ -1106,55 +1106,55 @@ const kr = () => ({
|
|
|
1106
1106
|
default: null
|
|
1107
1107
|
}
|
|
1108
1108
|
});
|
|
1109
|
-
function
|
|
1109
|
+
function xr(t, e, r, n, o) {
|
|
1110
1110
|
const a = I(null), l = I(null);
|
|
1111
1111
|
function i() {
|
|
1112
1112
|
const { width: u, height: c } = r;
|
|
1113
|
-
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value =
|
|
1113
|
+
!u && !c || !e.value || !t.value || (n.value === L.HORIZONTAL ? (a.value = tt(
|
|
1114
1114
|
t.value,
|
|
1115
1115
|
u,
|
|
1116
1116
|
n.value,
|
|
1117
1117
|
o.value.startOnZero
|
|
1118
|
-
), l.value =
|
|
1118
|
+
), l.value = et(
|
|
1119
1119
|
e.value,
|
|
1120
1120
|
c,
|
|
1121
1121
|
n.value,
|
|
1122
1122
|
o.value
|
|
1123
|
-
)) : (a.value =
|
|
1123
|
+
)) : (a.value = et(
|
|
1124
1124
|
e.value,
|
|
1125
1125
|
u,
|
|
1126
1126
|
n.value,
|
|
1127
1127
|
o.value
|
|
1128
|
-
), l.value =
|
|
1128
|
+
), l.value = tt(
|
|
1129
1129
|
t.value,
|
|
1130
1130
|
c,
|
|
1131
1131
|
n.value,
|
|
1132
1132
|
o.value.startOnZero
|
|
1133
1133
|
)));
|
|
1134
1134
|
}
|
|
1135
|
-
return
|
|
1135
|
+
return ft(i), { xScale: a, yScale: l };
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function et(t, e, r, n) {
|
|
1138
1138
|
const o = [0, e], { padding: a, paddingInner: l, paddingOuter: i } = n, u = a ?? (r === L.HORIZONTAL ? Tt : kt);
|
|
1139
1139
|
return Object.assign(
|
|
1140
|
-
|
|
1140
|
+
se().range(o).paddingInner(l ?? u).paddingOuter(i ?? u).domain(t.map((c, v) => v)),
|
|
1141
1141
|
{ labels: t }
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const o =
|
|
1144
|
+
function tt(t, e, r, n) {
|
|
1145
|
+
const o = ht(t).filter((v) => v != null), a = [0, e];
|
|
1146
1146
|
if (o.length === 0)
|
|
1147
|
-
return
|
|
1147
|
+
return ce().range(a).domain([0, 0]).nice();
|
|
1148
1148
|
const l = Math.min(...o), i = n && l > 0 ? 0 : l, u = Math.max(...o), c = r === L.HORIZONTAL ? [i, u] : [u, i];
|
|
1149
|
-
return
|
|
1149
|
+
return ce().range(a).domain(c).nice();
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function nt(t) {
|
|
1152
1152
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function Ne(t, e) {
|
|
1155
1155
|
return oe(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function rt(t, e, {
|
|
1158
1158
|
padding: r,
|
|
1159
1159
|
paddingInner: n,
|
|
1160
1160
|
paddingOuter: o
|
|
@@ -1166,9 +1166,9 @@ function Lt(t) {
|
|
|
1166
1166
|
return Object.values(L).includes(t);
|
|
1167
1167
|
}
|
|
1168
1168
|
const ue = (t, e = !0) => ({
|
|
1169
|
-
...
|
|
1170
|
-
...
|
|
1171
|
-
...
|
|
1169
|
+
...ze(t),
|
|
1170
|
+
...Tr(),
|
|
1171
|
+
...ve(),
|
|
1172
1172
|
classList: {
|
|
1173
1173
|
type: [String, Array],
|
|
1174
1174
|
default: () => []
|
|
@@ -1184,14 +1184,14 @@ const ue = (t, e = !0) => ({
|
|
|
1184
1184
|
validator: Lt
|
|
1185
1185
|
}
|
|
1186
1186
|
} : {}
|
|
1187
|
-
}),
|
|
1188
|
-
...
|
|
1189
|
-
...
|
|
1187
|
+
}), Ar = (t) => ({
|
|
1188
|
+
...ze(t),
|
|
1189
|
+
...ve(),
|
|
1190
1190
|
hoveredElement: {
|
|
1191
1191
|
type: [Number, String],
|
|
1192
1192
|
default: null
|
|
1193
1193
|
}
|
|
1194
|
-
}),
|
|
1194
|
+
}), be = () => ({
|
|
1195
1195
|
data: {
|
|
1196
1196
|
type: Array,
|
|
1197
1197
|
required: !0
|
|
@@ -1233,10 +1233,10 @@ const ue = (t, e = !0) => ({
|
|
|
1233
1233
|
type: [String, Array],
|
|
1234
1234
|
default: () => []
|
|
1235
1235
|
}
|
|
1236
|
-
}),
|
|
1236
|
+
}), Lr = /* @__PURE__ */ w({
|
|
1237
1237
|
__name: "lume-overlay-group",
|
|
1238
1238
|
props: {
|
|
1239
|
-
...
|
|
1239
|
+
...be(),
|
|
1240
1240
|
orientation: {
|
|
1241
1241
|
type: String,
|
|
1242
1242
|
default: L.VERTICAL
|
|
@@ -1244,10 +1244,10 @@ const ue = (t, e = !0) => ({
|
|
|
1244
1244
|
},
|
|
1245
1245
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1246
1246
|
setup(t, { emit: e }) {
|
|
1247
|
-
const r = t, { data: n, orientation: o, xScale: a, yScale: l } =
|
|
1247
|
+
const r = t, { data: n, orientation: o, xScale: a, yScale: l } = P(r), i = d(() => Ie(n));
|
|
1248
1248
|
function u(c) {
|
|
1249
1249
|
var y;
|
|
1250
|
-
const v = o.value === L.HORIZONTAL ? l.value : a.value, s = v.domain(), _ =
|
|
1250
|
+
const v = o.value === L.HORIZONTAL ? l.value : a.value, s = v.domain(), _ = nn(v), m = ((y = v.paddingInner) == null ? void 0 : y.call(v)) ?? 0, f = _ * m, g = oe(v) ? v(s[c]) - f / 2 : v(c) - _ / 2;
|
|
1251
1251
|
return o.value === L.HORIZONTAL ? {
|
|
1252
1252
|
width: Math.max(...a.value.range()),
|
|
1253
1253
|
height: _,
|
|
@@ -1258,10 +1258,10 @@ const ue = (t, e = !0) => ({
|
|
|
1258
1258
|
transform: `translate(${g}, 0)`
|
|
1259
1259
|
};
|
|
1260
1260
|
}
|
|
1261
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar:
|
|
1261
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: o, xScale: a, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Me };
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
|
-
var
|
|
1264
|
+
var Or = function() {
|
|
1265
1265
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1266
1266
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(o, a) {
|
|
1267
1267
|
return r(n.LumeBar, e._b({ key: `overlay-${a}`, attrs: { "data-j-lume-overlay-group": a, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
@@ -1270,17 +1270,17 @@ var Lr = function() {
|
|
|
1270
1270
|
return n.emit("click", { index: a, event: l });
|
|
1271
1271
|
} } }, "lume-bar", n.getOverlayBarAttributes(a), !1));
|
|
1272
1272
|
}), 1);
|
|
1273
|
-
},
|
|
1274
|
-
Ar,
|
|
1273
|
+
}, $r = [], Ir = /* @__PURE__ */ E(
|
|
1275
1274
|
Lr,
|
|
1276
1275
|
Or,
|
|
1276
|
+
$r,
|
|
1277
1277
|
!1,
|
|
1278
1278
|
null,
|
|
1279
1279
|
null,
|
|
1280
1280
|
null,
|
|
1281
1281
|
null
|
|
1282
1282
|
);
|
|
1283
|
-
const
|
|
1283
|
+
const Er = Ir.exports, wr = [
|
|
1284
1284
|
"axis-click",
|
|
1285
1285
|
"axis-mouseenter",
|
|
1286
1286
|
"axis-mouseleave",
|
|
@@ -1305,28 +1305,30 @@ const Ir = $r.exports, wr = [
|
|
|
1305
1305
|
"link-mouseleave",
|
|
1306
1306
|
"tooltip-opened",
|
|
1307
1307
|
"tooltip-moved",
|
|
1308
|
-
"tooltip-closed"
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
se || await r(), se.$emit(`${e}_${l}`, ...i);
|
|
1308
|
+
"tooltip-closed",
|
|
1309
|
+
"hovered-index-changed"
|
|
1310
|
+
], X = (t, e) => {
|
|
1311
|
+
function r(a, ...l) {
|
|
1312
|
+
document.dispatchEvent(
|
|
1313
|
+
new CustomEvent(`${e}_${a}`, {
|
|
1314
|
+
detail: [...l]
|
|
1315
|
+
})
|
|
1316
|
+
);
|
|
1318
1317
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1318
|
+
function n(a, l) {
|
|
1319
|
+
document.addEventListener(
|
|
1320
|
+
`${e}_${a}`,
|
|
1321
|
+
(i) => l(...i.detail)
|
|
1322
|
+
);
|
|
1321
1323
|
}
|
|
1322
|
-
return { componentEventPropagator: wr.reduce((
|
|
1324
|
+
return { componentEventPropagator: wr.reduce((a, l) => (a[l] = (i) => t(l, i), a), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1323
1325
|
};
|
|
1324
|
-
function
|
|
1326
|
+
function Nr(t) {
|
|
1325
1327
|
return { hasNegativeValues: d(
|
|
1326
|
-
() =>
|
|
1328
|
+
() => ht(t.value).some((r) => r < 0)
|
|
1327
1329
|
) };
|
|
1328
1330
|
}
|
|
1329
|
-
function
|
|
1331
|
+
function Cr(t, e, r, n) {
|
|
1330
1332
|
const o = d(
|
|
1331
1333
|
() => n.value === L.HORIZONTAL
|
|
1332
1334
|
), a = d(
|
|
@@ -1351,17 +1353,17 @@ function Nr(t, e, r, n) {
|
|
|
1351
1353
|
transform: i.value
|
|
1352
1354
|
})) };
|
|
1353
1355
|
}
|
|
1354
|
-
function
|
|
1356
|
+
function Hr(t) {
|
|
1355
1357
|
return t.reduce((e, r) => r.values.map((n, o) => e[o] ? n.value > e[o] ? n.value : e[o] : n.value ?? 0), []);
|
|
1356
1358
|
}
|
|
1357
|
-
function
|
|
1359
|
+
function Dr(t) {
|
|
1358
1360
|
return t.reduce((e, r) => r.values.map((n, o) => {
|
|
1359
1361
|
const a = n.value == null || n.value < 0 ? 0 : n.value;
|
|
1360
1362
|
return e[o] ? e[o] + a : a;
|
|
1361
1363
|
}), []);
|
|
1362
1364
|
}
|
|
1363
|
-
const
|
|
1364
|
-
"stacked-bar":
|
|
1365
|
+
const ot = {
|
|
1366
|
+
"stacked-bar": Dr
|
|
1365
1367
|
};
|
|
1366
1368
|
function Ot(t, e, r, n, o, a, l) {
|
|
1367
1369
|
const i = d(
|
|
@@ -1371,7 +1373,7 @@ function Ot(t, e, r, n, o, a, l) {
|
|
|
1371
1373
|
}
|
|
1372
1374
|
);
|
|
1373
1375
|
function u(c) {
|
|
1374
|
-
const v = l != null && l.value &&
|
|
1376
|
+
const v = l != null && l.value && ot[l.value] ? ot[l.value](c) : Hr(c);
|
|
1375
1377
|
t.value = v.map((s, _) => ({
|
|
1376
1378
|
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(s) : Ne(r.value, _),
|
|
1377
1379
|
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Ne(n.value, _) : n.value(s)
|
|
@@ -1385,8 +1387,8 @@ function Ot(t, e, r, n, o, a, l) {
|
|
|
1385
1387
|
{ immediate: !0 }
|
|
1386
1388
|
), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: u };
|
|
1387
1389
|
}
|
|
1388
|
-
function
|
|
1389
|
-
const t =
|
|
1390
|
+
function Rr() {
|
|
1391
|
+
const t = ge({
|
|
1390
1392
|
opened: !1,
|
|
1391
1393
|
targetElement: null
|
|
1392
1394
|
});
|
|
@@ -1396,7 +1398,7 @@ function Dr() {
|
|
|
1396
1398
|
t.opened = !1, t.targetElement = null;
|
|
1397
1399
|
} };
|
|
1398
1400
|
}
|
|
1399
|
-
function
|
|
1401
|
+
function Pr(t) {
|
|
1400
1402
|
return { getTooltipItems: d(
|
|
1401
1403
|
() => (r) => t.value.map(({ color: n, label: o, values: a }) => {
|
|
1402
1404
|
var l, i, u;
|
|
@@ -1422,19 +1424,19 @@ const Ce = 16, He = 8, De = 28, Re = 24, re = {
|
|
|
1422
1424
|
left: Re
|
|
1423
1425
|
}
|
|
1424
1426
|
};
|
|
1425
|
-
function
|
|
1427
|
+
function Sr(t) {
|
|
1426
1428
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? Ce : t.top;
|
|
1427
1429
|
}
|
|
1428
|
-
function
|
|
1430
|
+
function Br(t) {
|
|
1429
1431
|
return !t || t === "auto" || t.right == null || t.right === "auto" ? He : t.right;
|
|
1430
1432
|
}
|
|
1431
|
-
function
|
|
1433
|
+
function Fr(t, e) {
|
|
1432
1434
|
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || De : t.bottom;
|
|
1433
1435
|
}
|
|
1434
|
-
function
|
|
1436
|
+
function Gr(t, e) {
|
|
1435
1437
|
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Re : t.left;
|
|
1436
1438
|
}
|
|
1437
|
-
const
|
|
1439
|
+
const Vr = /* @__PURE__ */ w({
|
|
1438
1440
|
__name: "lume-chart",
|
|
1439
1441
|
props: {
|
|
1440
1442
|
...ue(),
|
|
@@ -1444,24 +1446,24 @@ const Gr = /* @__PURE__ */ E({
|
|
|
1444
1446
|
}
|
|
1445
1447
|
},
|
|
1446
1448
|
setup(t, { emit: e }) {
|
|
1447
|
-
const r = t, n = V(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } =
|
|
1449
|
+
const r = t, n = V(), { data: o, labels: a, color: l, options: i, orientation: u, chartType: c } = P(r), v = I(-1), s = I(null), _ = I(null), m = I([]), f = I(null), g = I(0), y = I(0), { allOptions: p } = Z(i), { internalData: T, computedLabels: A, containerSize: x, updateSize: k, chartID: C } = We(o, a, l, p, u), { listenInternalEvent: D } = X(e, C), { xScale: R, yScale: B } = xr(
|
|
1448
1450
|
T,
|
|
1449
1451
|
A,
|
|
1450
1452
|
x,
|
|
1451
1453
|
u,
|
|
1452
1454
|
p
|
|
1453
|
-
),
|
|
1454
|
-
top:
|
|
1455
|
-
right:
|
|
1456
|
-
bottom:
|
|
1457
|
-
left:
|
|
1455
|
+
), Q = d(() => ({
|
|
1456
|
+
top: Sr(p.value.margins),
|
|
1457
|
+
right: Br(p.value.margins),
|
|
1458
|
+
bottom: Fr(p.value.margins, g.value),
|
|
1459
|
+
left: Gr(p.value.margins, y.value)
|
|
1458
1460
|
})), G = d(() => {
|
|
1459
1461
|
var b;
|
|
1460
|
-
return r.xScale ?
|
|
1462
|
+
return r.xScale ? nt(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, T.value, a.value, x) : R.value;
|
|
1461
1463
|
}), M = d(() => {
|
|
1462
1464
|
var b;
|
|
1463
|
-
return r.yScale ?
|
|
1464
|
-
}),
|
|
1465
|
+
return r.yScale ? nt(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, T.value, a.value, x) : B.value;
|
|
1466
|
+
}), q = d(() => ({
|
|
1465
1467
|
...p.value.xAxisOptions,
|
|
1466
1468
|
withHover: u.value === L.VERTICAL
|
|
1467
1469
|
})), U = d(() => ({
|
|
@@ -1482,14 +1484,14 @@ const Gr = /* @__PURE__ */ E({
|
|
|
1482
1484
|
}), F = d(
|
|
1483
1485
|
() => o.value.every((b) => !b.values.length)
|
|
1484
1486
|
), z = d(() => {
|
|
1485
|
-
const b = [], { noBaseScales:
|
|
1486
|
-
return
|
|
1487
|
-
}), { hasNegativeValues: W } =
|
|
1487
|
+
const b = [], { noBaseScales: S } = p.value;
|
|
1488
|
+
return S || b.push(() => !!(G.value && M.value)), b.every((Y) => Y() === !0);
|
|
1489
|
+
}), { hasNegativeValues: W } = Nr(T), { negativeBarAttributes: ke } = Cr(
|
|
1488
1490
|
x,
|
|
1489
1491
|
G,
|
|
1490
1492
|
M,
|
|
1491
1493
|
u
|
|
1492
|
-
), { shouldGenerateTooltipAnchors:
|
|
1494
|
+
), { shouldGenerateTooltipAnchors: Xe } = Ot(
|
|
1493
1495
|
m,
|
|
1494
1496
|
p,
|
|
1495
1497
|
G,
|
|
@@ -1497,66 +1499,70 @@ const Gr = /* @__PURE__ */ E({
|
|
|
1497
1499
|
u,
|
|
1498
1500
|
T,
|
|
1499
1501
|
c
|
|
1500
|
-
), { tooltipConfig:
|
|
1501
|
-
() => p.value.withTooltip !== !1 &&
|
|
1502
|
+
), { tooltipConfig: ee, showTooltip: Ue, hideTooltip: Ye } = Rr(), { getTooltipItems: Ct } = Pr(T), Ht = d(
|
|
1503
|
+
() => p.value.withTooltip !== !1 && ee.opened
|
|
1502
1504
|
), Dt = d(
|
|
1503
1505
|
() => {
|
|
1504
1506
|
var b;
|
|
1505
1507
|
return ((b = p.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1506
1508
|
}
|
|
1507
|
-
),
|
|
1508
|
-
var
|
|
1509
|
-
const b = (
|
|
1510
|
-
return
|
|
1509
|
+
), Ke = d(() => {
|
|
1510
|
+
var S;
|
|
1511
|
+
const b = (S = p.value.tooltipOptions) == null ? void 0 : S.withPointerEvents;
|
|
1512
|
+
return ee.opened && (!b || b && f.value === !1);
|
|
1511
1513
|
});
|
|
1512
|
-
function
|
|
1513
|
-
var
|
|
1514
|
-
if (b
|
|
1515
|
-
|
|
1516
|
-
|
|
1514
|
+
function fe(b) {
|
|
1515
|
+
var Y;
|
|
1516
|
+
if (b === v.value)
|
|
1517
|
+
return;
|
|
1518
|
+
const S = v.value;
|
|
1519
|
+
if (p.value.withHover !== !1 && (v.value = b), p.value.withTooltip !== !1) {
|
|
1520
|
+
const Bt = (Y = p.value.tooltipOptions) != null && Y.targetElement ? p.value.tooltipOptions.targetElement === "self" ? _.value.$el : p.value.tooltipOptions.targetElement : s.value[b];
|
|
1521
|
+
Ue(Bt);
|
|
1517
1522
|
}
|
|
1523
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: S });
|
|
1518
1524
|
}
|
|
1519
|
-
function
|
|
1520
|
-
|
|
1525
|
+
function Te() {
|
|
1526
|
+
Ye(), v.value = -1;
|
|
1521
1527
|
}
|
|
1522
|
-
function
|
|
1528
|
+
function xe(b) {
|
|
1523
1529
|
if (b > o.value[0].values.length - 1) {
|
|
1524
|
-
ne(
|
|
1530
|
+
ne(K.InvalidHoveredIndex);
|
|
1525
1531
|
return;
|
|
1526
1532
|
}
|
|
1527
|
-
|
|
1533
|
+
fe(b);
|
|
1528
1534
|
}
|
|
1529
1535
|
function Rt() {
|
|
1530
1536
|
setTimeout(() => {
|
|
1531
|
-
|
|
1537
|
+
Ke.value && Te(), e("chart-mouseleave");
|
|
1532
1538
|
}, 0);
|
|
1533
1539
|
}
|
|
1534
|
-
function Pt({ index: b, value:
|
|
1535
|
-
b !== null &&
|
|
1540
|
+
function Pt({ index: b, value: S, event: Y }) {
|
|
1541
|
+
b !== null && fe(b), e("axis-mouseenter", { index: b, value: S, event: Y });
|
|
1536
1542
|
}
|
|
1537
|
-
function St({ index: b, value:
|
|
1538
|
-
e("axis-click", { index: b, value:
|
|
1543
|
+
function St({ index: b, value: S, event: Y }) {
|
|
1544
|
+
e("axis-click", { index: b, value: S, event: Y });
|
|
1539
1545
|
}
|
|
1540
1546
|
return H(
|
|
1541
1547
|
o,
|
|
1542
|
-
(b,
|
|
1548
|
+
(b, S) => e("data-changed", { newValue: b, oldValue: S })
|
|
1543
1549
|
), H(
|
|
1544
1550
|
a,
|
|
1545
|
-
(b,
|
|
1546
|
-
), H(F, (b) => b && ne(
|
|
1551
|
+
(b, S) => e("labels-changed", { newValue: b, oldValue: S })
|
|
1552
|
+
), H(F, (b) => b && ne(K.Empty), { immediate: !0 }), H(() => r.hoveredIndex, xe), H(
|
|
1547
1553
|
m,
|
|
1548
1554
|
(b) => {
|
|
1549
|
-
b && r.hoveredIndex != null && v.value === -1 &&
|
|
1555
|
+
b && r.hoveredIndex != null && v.value === -1 && xe(r.hoveredIndex);
|
|
1550
1556
|
},
|
|
1551
1557
|
{ flush: "post" }
|
|
1552
1558
|
), H(f, (b) => {
|
|
1553
|
-
b === !1 &&
|
|
1554
|
-
}),
|
|
1555
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1556
|
-
}),
|
|
1559
|
+
b === !1 && ee.opened && Te();
|
|
1560
|
+
}), J(async () => {
|
|
1561
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", fe);
|
|
1562
|
+
}), Ae("chartID", C), Ae("isEmpty", F), Ae("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: o, labels: a, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: v, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: f, xAxisHeight: g, yAxisWidth: y, allOptions: p, internalData: T, computedLabels: A, containerSize: x, updateSize: k, chartID: C, listenInternalEvent: D, xScale: R, yScale: B, computedMargins: Q, computedXScale: G, computedYScale: M, computedXAxisOptions: q, computedYAxisOptions: U, xAxisTitle: $, yAxisTitle: h, showXAxisTitle: O, showYAxisTitle: N, isEmpty: F, isReady: z, hasNegativeValues: W, negativeBarAttributes: ke, shouldGenerateTooltipAnchors: Xe, tooltipConfig: ee, showTooltip: Ue, hideTooltip: Ye, getTooltipItems: Ct, isTooltipOpened: Ht, tooltipPosition: Dt, shouldHideTooltip: Ke, handleInternalHover: fe, handleHideTooltip: Te, handleExternalHover: xe, handleMouseleave: Rt, handleAxisMouseenter: Pt, handleAxisClick: St, LumeAxis: In, LumeBar: Me, LumeChartContainer: Gn, LumeChartLegend: Wn, LumeTooltip: dr, LumeOverlayGroup: Er, TOOLTIP_ANCHOR_RADIUS: fn };
|
|
1557
1563
|
}
|
|
1558
1564
|
});
|
|
1559
|
-
var
|
|
1565
|
+
var jr = function() {
|
|
1560
1566
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1561
1567
|
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(o) {
|
|
1562
1568
|
return n.emit("chart-click", o);
|
|
@@ -1613,17 +1619,17 @@ var Vr = function() {
|
|
|
1613
1619
|
}, { 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(o, a) {
|
|
1614
1620
|
return r("circle", e._b({ key: `anchor_${a}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", o, !1));
|
|
1615
1621
|
}), 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);
|
|
1616
|
-
},
|
|
1617
|
-
Gr,
|
|
1622
|
+
}, Mr = [], zr = /* @__PURE__ */ E(
|
|
1618
1623
|
Vr,
|
|
1619
1624
|
jr,
|
|
1625
|
+
Mr,
|
|
1620
1626
|
!1,
|
|
1621
1627
|
null,
|
|
1622
|
-
"
|
|
1628
|
+
"dad8a6ee",
|
|
1623
1629
|
null,
|
|
1624
1630
|
null
|
|
1625
1631
|
);
|
|
1626
|
-
const ie =
|
|
1632
|
+
const ie = zr.exports, Wr = /* @__PURE__ */ w({
|
|
1627
1633
|
__name: "lume-alluvial-node-label",
|
|
1628
1634
|
props: {
|
|
1629
1635
|
bottom: { type: Boolean, default: !1 }
|
|
@@ -1632,20 +1638,20 @@ const ie = Mr.exports, zr = /* @__PURE__ */ E({
|
|
|
1632
1638
|
return { __sfc: !0 };
|
|
1633
1639
|
}
|
|
1634
1640
|
});
|
|
1635
|
-
var
|
|
1641
|
+
var Zr = function() {
|
|
1636
1642
|
var e = this, r = e._self._c;
|
|
1637
1643
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1638
|
-
},
|
|
1639
|
-
zr,
|
|
1644
|
+
}, Xr = [], Ur = /* @__PURE__ */ E(
|
|
1640
1645
|
Wr,
|
|
1641
1646
|
Zr,
|
|
1647
|
+
Xr,
|
|
1642
1648
|
!1,
|
|
1643
1649
|
null,
|
|
1644
1650
|
"d2a7cb8e",
|
|
1645
1651
|
null,
|
|
1646
1652
|
null
|
|
1647
1653
|
);
|
|
1648
|
-
const
|
|
1654
|
+
const Yr = Ur.exports, Kr = /* @__PURE__ */ w({
|
|
1649
1655
|
__name: "lume-alluvial-node-value",
|
|
1650
1656
|
props: {
|
|
1651
1657
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1654,21 +1660,21 @@ const Ur = Xr.exports, Yr = /* @__PURE__ */ E({
|
|
|
1654
1660
|
return { __sfc: !0 };
|
|
1655
1661
|
}
|
|
1656
1662
|
});
|
|
1657
|
-
var
|
|
1663
|
+
var Jr = function() {
|
|
1658
1664
|
var e = this, r = e._self._c;
|
|
1659
1665
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { dy: e.bottom ? "1.2em" : "" } }, [e._t("default")], 2);
|
|
1660
|
-
},
|
|
1661
|
-
Yr,
|
|
1666
|
+
}, Qr = [], qr = /* @__PURE__ */ E(
|
|
1662
1667
|
Kr,
|
|
1663
1668
|
Jr,
|
|
1669
|
+
Qr,
|
|
1664
1670
|
!1,
|
|
1665
1671
|
null,
|
|
1666
1672
|
"002e2887",
|
|
1667
1673
|
null,
|
|
1668
1674
|
null
|
|
1669
1675
|
);
|
|
1670
|
-
const
|
|
1671
|
-
function
|
|
1676
|
+
const eo = qr.exports;
|
|
1677
|
+
function at(t, e) {
|
|
1672
1678
|
return {
|
|
1673
1679
|
x0: 0 + (e ? e.left : 0),
|
|
1674
1680
|
y0: 0 + (e ? e.top : 0),
|
|
@@ -1676,32 +1682,32 @@ function ot(t, e) {
|
|
|
1676
1682
|
y1: t.height - (e ? e.bottom : 0)
|
|
1677
1683
|
};
|
|
1678
1684
|
}
|
|
1679
|
-
function
|
|
1680
|
-
const e = I(
|
|
1685
|
+
function to(t) {
|
|
1686
|
+
const e = I(at(t));
|
|
1681
1687
|
function r(n) {
|
|
1682
|
-
e.value =
|
|
1688
|
+
e.value = at(t, n);
|
|
1683
1689
|
}
|
|
1684
1690
|
return { extents: e, updateExtents: r };
|
|
1685
1691
|
}
|
|
1686
1692
|
var $t = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t))($t || {});
|
|
1687
|
-
const
|
|
1688
|
-
function
|
|
1689
|
-
r &&
|
|
1693
|
+
const no = "[lume] ";
|
|
1694
|
+
function ro(t, e, r = !0) {
|
|
1695
|
+
r && mt() || console.error(no + "Error: " + t, e);
|
|
1690
1696
|
}
|
|
1691
|
-
const
|
|
1697
|
+
const lt = 8, oo = 8, ao = 20, Oe = 2, lo = 200;
|
|
1692
1698
|
function le(t) {
|
|
1693
1699
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1694
1700
|
}
|
|
1695
|
-
function
|
|
1701
|
+
function uo(t, e) {
|
|
1696
1702
|
return e.nodes.find((r) => r.id === t);
|
|
1697
1703
|
}
|
|
1698
|
-
function
|
|
1704
|
+
function io(t, e) {
|
|
1699
1705
|
return e.links.find((r) => r.id === t);
|
|
1700
1706
|
}
|
|
1701
1707
|
function It(t) {
|
|
1702
1708
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1703
1709
|
}
|
|
1704
|
-
function
|
|
1710
|
+
function so(t, e) {
|
|
1705
1711
|
if (!e)
|
|
1706
1712
|
return;
|
|
1707
1713
|
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}`), o = e.filter((l) => r.includes(l.dataset.id)).reduce(
|
|
@@ -1718,41 +1724,45 @@ function io(t, e) {
|
|
|
1718
1724
|
bottom: 0
|
|
1719
1725
|
};
|
|
1720
1726
|
}
|
|
1721
|
-
function so(t) {
|
|
1722
|
-
return t.map((e) => ({
|
|
1723
|
-
x: e.x0,
|
|
1724
|
-
y: e.y0,
|
|
1725
|
-
width: e.x1 - e.x0,
|
|
1726
|
-
height: e.y1 - e.y0,
|
|
1727
|
-
textTransform: {
|
|
1728
|
-
x: e.depth > 0 ? e.x1 + at : e.x0 - at,
|
|
1729
|
-
y: (e.y1 + e.y0) / 2
|
|
1730
|
-
},
|
|
1731
|
-
node: e
|
|
1732
|
-
}));
|
|
1733
|
-
}
|
|
1734
1727
|
function co(t) {
|
|
1735
|
-
return
|
|
1728
|
+
return t.map((e) => {
|
|
1729
|
+
const r = e.y1 - e.y0 < Oe;
|
|
1730
|
+
return {
|
|
1731
|
+
x: e.x0,
|
|
1732
|
+
y: e.y0 - (r ? Oe / 2 : 0),
|
|
1733
|
+
// Negative offset to account for the min. height
|
|
1734
|
+
width: e.x1 - e.x0,
|
|
1735
|
+
height: r ? Oe : e.y1 - e.y0,
|
|
1736
|
+
textTransform: {
|
|
1737
|
+
x: e.depth > 0 ? e.x1 + lt : e.x0 - lt,
|
|
1738
|
+
y: (e.y1 + e.y0) / 2
|
|
1739
|
+
},
|
|
1740
|
+
node: e
|
|
1741
|
+
};
|
|
1742
|
+
});
|
|
1736
1743
|
}
|
|
1737
1744
|
function vo(t) {
|
|
1738
|
-
return [t.
|
|
1745
|
+
return [t.source.x1, t.y0];
|
|
1739
1746
|
}
|
|
1740
1747
|
function _o(t) {
|
|
1741
|
-
return t.
|
|
1748
|
+
return [t.target.x0, t.y1];
|
|
1742
1749
|
}
|
|
1743
1750
|
function po(t) {
|
|
1751
|
+
return t.curveFunction ? Vt(t.curveFunction).source(vo).target(_o) : Wt();
|
|
1752
|
+
}
|
|
1753
|
+
function fo(t) {
|
|
1744
1754
|
return t.map((e) => {
|
|
1745
1755
|
var r;
|
|
1746
1756
|
return {
|
|
1747
1757
|
id: e.id,
|
|
1748
|
-
color: e.color || ((r = e.source) == null ? void 0 : r.color) ||
|
|
1749
|
-
d:
|
|
1758
|
+
color: e.color || ((r = e.source) == null ? void 0 : r.color) || pe,
|
|
1759
|
+
d: po(e)(e),
|
|
1750
1760
|
strokeWidth: Math.max(1, e.width),
|
|
1751
1761
|
link: e
|
|
1752
1762
|
};
|
|
1753
1763
|
});
|
|
1754
1764
|
}
|
|
1755
|
-
function
|
|
1765
|
+
function ut(t, e, r, n, o) {
|
|
1756
1766
|
if (n === !1) {
|
|
1757
1767
|
t.node = {
|
|
1758
1768
|
...t.node,
|
|
@@ -1760,8 +1770,8 @@ function lt(t, e, r, n, o) {
|
|
|
1760
1770
|
};
|
|
1761
1771
|
return;
|
|
1762
1772
|
}
|
|
1763
|
-
const a = Date.now(), l =
|
|
1764
|
-
let c = (Date.now() - a) /
|
|
1773
|
+
const a = Date.now(), l = ln(e, r), i = () => {
|
|
1774
|
+
let c = (Date.now() - a) / lo;
|
|
1765
1775
|
c > 1 && (c = 1), t.node = {
|
|
1766
1776
|
...t.node,
|
|
1767
1777
|
transitionValue: o && c === 1 ? void 0 : l(c)
|
|
@@ -1769,21 +1779,21 @@ function lt(t, e, r, n, o) {
|
|
|
1769
1779
|
};
|
|
1770
1780
|
requestAnimationFrame(i);
|
|
1771
1781
|
}
|
|
1772
|
-
const
|
|
1782
|
+
const mo = {
|
|
1773
1783
|
nodes: [],
|
|
1774
1784
|
links: []
|
|
1775
1785
|
};
|
|
1776
|
-
function
|
|
1786
|
+
function it(t, e) {
|
|
1777
1787
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1778
1788
|
}
|
|
1779
|
-
function
|
|
1789
|
+
function ho(t, e, r) {
|
|
1780
1790
|
const n = I(null), o = d(() => {
|
|
1781
1791
|
var s;
|
|
1782
1792
|
return (s = t.value) == null ? void 0 : s[0].values.map(
|
|
1783
1793
|
({ label: _, color: m, value: f, deriveColorFromIncomingLinks: g, offset: y }) => ({
|
|
1784
1794
|
label: _ || f.toString(),
|
|
1785
1795
|
color: m,
|
|
1786
|
-
fallbackColor: m ||
|
|
1796
|
+
fallbackColor: m || pe,
|
|
1787
1797
|
id: f,
|
|
1788
1798
|
deriveColorFromIncomingLinks: g,
|
|
1789
1799
|
offset: y
|
|
@@ -1808,18 +1818,18 @@ function mo(t, e, r) {
|
|
|
1808
1818
|
}
|
|
1809
1819
|
).filter(Boolean).flat();
|
|
1810
1820
|
}
|
|
1811
|
-
), l = d(() =>
|
|
1821
|
+
), l = d(() => Zt().nodeId(le).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), i = d(() => {
|
|
1812
1822
|
var s;
|
|
1813
1823
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1814
1824
|
(_, m) => {
|
|
1815
|
-
const f =
|
|
1825
|
+
const f = it(m, _);
|
|
1816
1826
|
return f ? (f.push(m), f.sort((g, y) => (g._y0 || g.y0) - (y._y0 || y.y0))) : _.push([m]), _;
|
|
1817
1827
|
},
|
|
1818
1828
|
[]
|
|
1819
1829
|
);
|
|
1820
1830
|
});
|
|
1821
1831
|
function u(s) {
|
|
1822
|
-
const { offset: _ } = s, m =
|
|
1832
|
+
const { offset: _ } = s, m = it(s, i.value);
|
|
1823
1833
|
if (!m)
|
|
1824
1834
|
return;
|
|
1825
1835
|
const f = m[m.findIndex((y) => y.id === s.id) - 1], g = f && m.length !== 1 ? f.y1 + _ : _;
|
|
@@ -1834,7 +1844,7 @@ function mo(t, e, r) {
|
|
|
1834
1844
|
y.forEach((A) => A.y0 += T), p.forEach((A) => A.y1 += T);
|
|
1835
1845
|
}
|
|
1836
1846
|
const v = d(() => (n.value && o.value.forEach((s) => {
|
|
1837
|
-
typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
1847
|
+
s.value === 0 && (s.fallbackColor = Ve.Grey), typeof s.offset == "number" && (u(s), c(s, n.value));
|
|
1838
1848
|
}), n.value));
|
|
1839
1849
|
return H([l, r], () => {
|
|
1840
1850
|
try {
|
|
@@ -1844,7 +1854,7 @@ function mo(t, e, r) {
|
|
|
1844
1854
|
[m, f]
|
|
1845
1855
|
])({ nodes: o.value, links: a.value });
|
|
1846
1856
|
} catch (s) {
|
|
1847
|
-
|
|
1857
|
+
ro($t.GraphProblem, s), n.value = mo;
|
|
1848
1858
|
}
|
|
1849
1859
|
}), { columns: i, graph: v };
|
|
1850
1860
|
}
|
|
@@ -1864,10 +1874,10 @@ function Se(t, e) {
|
|
|
1864
1874
|
);
|
|
1865
1875
|
}), e;
|
|
1866
1876
|
}
|
|
1867
|
-
function
|
|
1877
|
+
function go(t, e) {
|
|
1868
1878
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
1869
1879
|
}
|
|
1870
|
-
const
|
|
1880
|
+
const yo = (t, e) => {
|
|
1871
1881
|
let r;
|
|
1872
1882
|
It(t) ? r = {
|
|
1873
1883
|
[t.id]: t.value,
|
|
@@ -1879,9 +1889,9 @@ const go = (t, e) => {
|
|
|
1879
1889
|
...Pe(t.source),
|
|
1880
1890
|
...Se(t.target)
|
|
1881
1891
|
};
|
|
1882
|
-
const n =
|
|
1892
|
+
const n = go(r, e);
|
|
1883
1893
|
return { nodes: r, links: n };
|
|
1884
|
-
},
|
|
1894
|
+
}, bo = (t) => {
|
|
1885
1895
|
if (It(t)) {
|
|
1886
1896
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1887
1897
|
return {
|
|
@@ -1900,15 +1910,15 @@ const go = (t, e) => {
|
|
|
1900
1910
|
links: [t.id]
|
|
1901
1911
|
};
|
|
1902
1912
|
};
|
|
1903
|
-
function
|
|
1913
|
+
function ko(t, e, r) {
|
|
1904
1914
|
const n = I(null), o = d(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1905
1915
|
n.value,
|
|
1906
1916
|
r.value
|
|
1907
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1917
|
+
) : e.value.highlightedElements === "closest" ? bo(n.value, r.value) : yo(n.value, r.value) : { nodes: {}, links: [] });
|
|
1908
1918
|
return H(o, (a, l) => {
|
|
1909
1919
|
if (a.links.length === 0 && Object.keys(a.nodes).length === 0) {
|
|
1910
1920
|
t.value.forEach((i) => {
|
|
1911
|
-
i.node.id in l.nodes &&
|
|
1921
|
+
i.node.id in l.nodes && ut(
|
|
1912
1922
|
i,
|
|
1913
1923
|
l.nodes[i.node.id],
|
|
1914
1924
|
i.node.value,
|
|
@@ -1919,7 +1929,7 @@ function bo(t, e, r) {
|
|
|
1919
1929
|
return;
|
|
1920
1930
|
}
|
|
1921
1931
|
t.value.forEach((i) => {
|
|
1922
|
-
i.node.id in a.nodes &&
|
|
1932
|
+
i.node.id in a.nodes && ut(
|
|
1923
1933
|
i,
|
|
1924
1934
|
i.node.value,
|
|
1925
1935
|
a.nodes[i.node.id],
|
|
@@ -1928,10 +1938,10 @@ function bo(t, e, r) {
|
|
|
1928
1938
|
});
|
|
1929
1939
|
}), { highlightedElements: o, hoveredElement: n };
|
|
1930
1940
|
}
|
|
1931
|
-
const
|
|
1941
|
+
const To = /* @__PURE__ */ w({
|
|
1932
1942
|
__name: "lume-alluvial-group",
|
|
1933
1943
|
props: {
|
|
1934
|
-
...
|
|
1944
|
+
...be(),
|
|
1935
1945
|
hoveredElementId: {
|
|
1936
1946
|
type: [Number, String],
|
|
1937
1947
|
default: null
|
|
@@ -1939,11 +1949,11 @@ const ko = /* @__PURE__ */ E({
|
|
|
1939
1949
|
},
|
|
1940
1950
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1941
1951
|
setup(t, { emit: e }) {
|
|
1942
|
-
const r = t, n =
|
|
1952
|
+
const r = t, n = de("chartID"), { data: o, options: a } = P(r), l = I([]), i = I([]), u = I(null), { extents: c, updateExtents: v } = to(r.containerSize), { columns: s, graph: _ } = ho(o, a, c), { hoveredElement: m, highlightedElements: f } = ko(
|
|
1943
1953
|
l,
|
|
1944
1954
|
a,
|
|
1945
1955
|
_
|
|
1946
|
-
), g = d(() =>
|
|
1956
|
+
), g = d(() => he(a.value.valueFormat)), y = d(
|
|
1947
1957
|
() => Object.keys(f.value.nodes)
|
|
1948
1958
|
), p = d(() => s.value ? s.value.map(
|
|
1949
1959
|
(h) => h[0].x0 + a.value.nodeWidth / 2
|
|
@@ -1954,7 +1964,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
1954
1964
|
x: p.value[O]
|
|
1955
1965
|
}));
|
|
1956
1966
|
}), A = d(
|
|
1957
|
-
() => a.value.nodeHeaderPadding ??
|
|
1967
|
+
() => a.value.nodeHeaderPadding ?? ao
|
|
1958
1968
|
), x = d(() => {
|
|
1959
1969
|
if (!(!a.value.gradient || !_.value))
|
|
1960
1970
|
return _.value.links.reduce((h, O) => {
|
|
@@ -1973,15 +1983,15 @@ const ko = /* @__PURE__ */ E({
|
|
|
1973
1983
|
return h.forEach((N) => {
|
|
1974
1984
|
const F = [];
|
|
1975
1985
|
i.value.filter(({ link: z }) => z.target.id === N.node.id).reverse().reduce((z, W) => {
|
|
1976
|
-
const
|
|
1986
|
+
const ke = W.link.target.y1 - W.link.target.y0, ee = W.link.value / N.node.value * ke;
|
|
1977
1987
|
return F.push({
|
|
1978
1988
|
x: N.x,
|
|
1979
1989
|
y: N.y + z,
|
|
1980
|
-
height:
|
|
1990
|
+
height: ee,
|
|
1981
1991
|
width: N.width,
|
|
1982
1992
|
key: `node-block-${N.node.id}-source-link-${W.link.source.id}`,
|
|
1983
|
-
class: `lume-alluvial-group__node-block lume-fill--${W.link.source.color ||
|
|
1984
|
-
}), z +
|
|
1993
|
+
class: `lume-alluvial-group__node-block lume-fill--${W.link.source.color || pe}`
|
|
1994
|
+
}), z + ee;
|
|
1985
1995
|
}, 0), O.push({
|
|
1986
1996
|
id: N.node.id,
|
|
1987
1997
|
subNodes: F
|
|
@@ -2000,7 +2010,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
2000
2010
|
function B(h) {
|
|
2001
2011
|
return f.value.links.length > 0 && !f.value.links.includes(h);
|
|
2002
2012
|
}
|
|
2003
|
-
function
|
|
2013
|
+
function Q(h) {
|
|
2004
2014
|
return f.value.links.length > 0 && f.value.links.includes(h);
|
|
2005
2015
|
}
|
|
2006
2016
|
function G(h) {
|
|
@@ -2009,7 +2019,7 @@ const ko = /* @__PURE__ */ E({
|
|
|
2009
2019
|
function M(h, O) {
|
|
2010
2020
|
h !== m.value && (m.value = h, e("link-mouseenter", { link: h, event: O }));
|
|
2011
2021
|
}
|
|
2012
|
-
function
|
|
2022
|
+
function q(h) {
|
|
2013
2023
|
const O = m.value;
|
|
2014
2024
|
m.value = null, e("link-mouseleave", { link: O, event: h });
|
|
2015
2025
|
}
|
|
@@ -2018,9 +2028,9 @@ const ko = /* @__PURE__ */ E({
|
|
|
2018
2028
|
m.value = null;
|
|
2019
2029
|
return;
|
|
2020
2030
|
}
|
|
2021
|
-
const O =
|
|
2031
|
+
const O = uo(h, _.value) || io(h, _.value);
|
|
2022
2032
|
if (!O) {
|
|
2023
|
-
ne(
|
|
2033
|
+
ne(K.InvalidHoveredElement);
|
|
2024
2034
|
return;
|
|
2025
2035
|
}
|
|
2026
2036
|
m.value = O;
|
|
@@ -2030,16 +2040,16 @@ const ko = /* @__PURE__ */ E({
|
|
|
2030
2040
|
return ((O = k.value.find(({ id: N }) => h === N)) == null ? void 0 : O.subNodes) ?? [];
|
|
2031
2041
|
}
|
|
2032
2042
|
return H(_, (h) => {
|
|
2033
|
-
l.value =
|
|
2043
|
+
l.value = co(h.nodes), i.value = fo(h.links).reverse(), m.value == null && r.hoveredElementId != null && U(r.hoveredElementId);
|
|
2034
2044
|
}), H([r.containerSize, u], () => {
|
|
2035
2045
|
if (r.containerSize.width && r.containerSize.height) {
|
|
2036
|
-
const h =
|
|
2046
|
+
const h = so(_.value, u.value);
|
|
2037
2047
|
v(h);
|
|
2038
2048
|
}
|
|
2039
|
-
}), H(() => r.hoveredElementId, U), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: v, columns: s, graph: _, hoveredElement: m, highlightedElements: f, formatValue: g, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders: T, computedNodeHeaderPadding: A, gradients: x, nodesDerivingColorFromIncomingLinks: k, getLinkStroke: C, isNodeFaded: D, isNodeFocused: R, isLinkFaded: B, isLinkFocused:
|
|
2049
|
+
}), H(() => r.hoveredElementId, U), { __sfc: !0, props: r, emit: e, chartID: n, data: o, options: a, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: v, columns: s, graph: _, hoveredElement: m, highlightedElements: f, formatValue: g, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders: T, computedNodeHeaderPadding: A, gradients: x, nodesDerivingColorFromIncomingLinks: k, getLinkStroke: C, isNodeFaded: D, isNodeFocused: R, isLinkFaded: B, isLinkFocused: Q, shouldDeriveNodeColorFromIncomingLinks: G, handleLinkMouseover: M, handleLinkMouseleave: q, handleExternalHover: U, getSubNodesDerivingColorFromIncomingLinks: $, LumeAlluvialNodeLabel: Yr, LumeAlluvialNodeValue: eo, GHOST_STROKE_WIDTH_OFFSET: oo };
|
|
2040
2050
|
}
|
|
2041
2051
|
});
|
|
2042
|
-
var
|
|
2052
|
+
var xo = function() {
|
|
2043
2053
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2044
2054
|
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(o) {
|
|
2045
2055
|
return r("text", { key: `header_${o.x}`, staticClass: "lume-alluvial-group__node-header lume-typography--caption", attrs: { x: o.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(o.label) + " ")]);
|
|
@@ -2091,17 +2101,17 @@ var To = function() {
|
|
|
2091
2101
|
o.node.value
|
|
2092
2102
|
) })], 2)], 2)]);
|
|
2093
2103
|
})], 2);
|
|
2094
|
-
},
|
|
2095
|
-
ko,
|
|
2104
|
+
}, Ao = [], Lo = /* @__PURE__ */ E(
|
|
2096
2105
|
To,
|
|
2097
2106
|
xo,
|
|
2107
|
+
Ao,
|
|
2098
2108
|
!1,
|
|
2099
2109
|
null,
|
|
2100
2110
|
"6fe8c153",
|
|
2101
2111
|
null,
|
|
2102
2112
|
null
|
|
2103
2113
|
);
|
|
2104
|
-
const
|
|
2114
|
+
const Oo = Lo.exports, $o = {
|
|
2105
2115
|
margins: {
|
|
2106
2116
|
top: 0,
|
|
2107
2117
|
right: 0,
|
|
@@ -2117,16 +2127,16 @@ const Lo = Ao.exports, Oo = {
|
|
|
2117
2127
|
highlightedElements: "closest",
|
|
2118
2128
|
nodePadding: 16,
|
|
2119
2129
|
nodeWidth: 16,
|
|
2120
|
-
nodeAlign:
|
|
2130
|
+
nodeAlign: Xt,
|
|
2121
2131
|
valueFormat: (t) => String(t),
|
|
2122
2132
|
iterations: 6
|
|
2123
|
-
},
|
|
2133
|
+
}, Io = /* @__PURE__ */ w({
|
|
2124
2134
|
__name: "lume-alluvial-diagram",
|
|
2125
2135
|
props: {
|
|
2126
|
-
...
|
|
2136
|
+
...Ar(Fe)
|
|
2127
2137
|
},
|
|
2128
2138
|
setup(t, { emit: e }) {
|
|
2129
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), a =
|
|
2139
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), a = sn(V()), { options: l } = P(r), { allOptions: i } = Z(l, $o);
|
|
2130
2140
|
function u(c) {
|
|
2131
2141
|
return {
|
|
2132
2142
|
...c,
|
|
@@ -2134,10 +2144,10 @@ const Lo = Ao.exports, Oo = {
|
|
|
2134
2144
|
// Alluvial chart never uses base scales
|
|
2135
2145
|
};
|
|
2136
2146
|
}
|
|
2137
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, groupSlots: a, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: ie, LumeAlluvialGroup:
|
|
2147
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, groupSlots: a, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: ie, LumeAlluvialGroup: Oo };
|
|
2138
2148
|
}
|
|
2139
2149
|
});
|
|
2140
|
-
var
|
|
2150
|
+
var Eo = function() {
|
|
2141
2151
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2142
2152
|
return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
2143
2153
|
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(a, l) {
|
|
@@ -2150,9 +2160,9 @@ var Io = function() {
|
|
|
2150
2160
|
return [e._t(a, null, null, l || {})];
|
|
2151
2161
|
} };
|
|
2152
2162
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2153
|
-
}, wo = [],
|
|
2154
|
-
$o,
|
|
2163
|
+
}, wo = [], No = /* @__PURE__ */ E(
|
|
2155
2164
|
Io,
|
|
2165
|
+
Eo,
|
|
2156
2166
|
wo,
|
|
2157
2167
|
!1,
|
|
2158
2168
|
null,
|
|
@@ -2160,9 +2170,9 @@ var Io = function() {
|
|
|
2160
2170
|
null,
|
|
2161
2171
|
null
|
|
2162
2172
|
);
|
|
2163
|
-
const
|
|
2173
|
+
const ja = No.exports;
|
|
2164
2174
|
var Be = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Be || {});
|
|
2165
|
-
const
|
|
2175
|
+
const Co = /* @__PURE__ */ w({
|
|
2166
2176
|
__name: "lume-bar-chart",
|
|
2167
2177
|
props: {
|
|
2168
2178
|
...ue(),
|
|
@@ -2173,11 +2183,11 @@ const No = /* @__PURE__ */ E({
|
|
|
2173
2183
|
}
|
|
2174
2184
|
},
|
|
2175
2185
|
setup(t, { emit: e }) {
|
|
2176
|
-
const r = t, n =
|
|
2186
|
+
const r = t, n = Le(
|
|
2177
2187
|
() => import("./common/42f5d2fc.js")
|
|
2178
|
-
), o =
|
|
2188
|
+
), o = Le(
|
|
2179
2189
|
() => import("./common/abc9d23d.js")
|
|
2180
|
-
), a =
|
|
2190
|
+
), a = Le(
|
|
2181
2191
|
() => import("./common/0664fd4d.js")
|
|
2182
2192
|
), l = /* @__PURE__ */ new Map([
|
|
2183
2193
|
["single", n],
|
|
@@ -2207,45 +2217,45 @@ const No = /* @__PURE__ */ E({
|
|
|
2207
2217
|
return { __sfc: !0, TYPES: Be, LumeSingleBarChart: n, LumeGroupedBarChart: o, LumeStackedBarChart: a, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: v };
|
|
2208
2218
|
}
|
|
2209
2219
|
});
|
|
2210
|
-
var
|
|
2220
|
+
var Ho = function() {
|
|
2211
2221
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2212
2222
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(o, a) {
|
|
2213
2223
|
return { key: a, fn: function(l) {
|
|
2214
2224
|
return [e._t(a, null, null, l || {})];
|
|
2215
2225
|
} };
|
|
2216
2226
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2217
|
-
},
|
|
2218
|
-
No,
|
|
2227
|
+
}, Do = [], Ro = /* @__PURE__ */ E(
|
|
2219
2228
|
Co,
|
|
2220
2229
|
Ho,
|
|
2230
|
+
Do,
|
|
2221
2231
|
!1,
|
|
2222
2232
|
null,
|
|
2223
2233
|
null,
|
|
2224
2234
|
null,
|
|
2225
2235
|
null
|
|
2226
2236
|
);
|
|
2227
|
-
const
|
|
2228
|
-
function Ro(t) {
|
|
2229
|
-
return Object.values(_n).includes(t) || t == null;
|
|
2230
|
-
}
|
|
2237
|
+
const Ma = Ro.exports;
|
|
2231
2238
|
function Po(t) {
|
|
2239
|
+
return Object.values(pn).includes(t) || t == null;
|
|
2240
|
+
}
|
|
2241
|
+
function So(t) {
|
|
2232
2242
|
return Object.values(L).includes(t);
|
|
2233
2243
|
}
|
|
2234
|
-
const
|
|
2244
|
+
const Bo = (t = !1) => ({
|
|
2235
2245
|
type: {
|
|
2236
2246
|
type: String,
|
|
2237
2247
|
default: null,
|
|
2238
|
-
validator:
|
|
2248
|
+
validator: Po
|
|
2239
2249
|
},
|
|
2240
2250
|
...t ? {
|
|
2241
2251
|
orientation: {
|
|
2242
2252
|
type: String,
|
|
2243
2253
|
default: L.VERTICAL,
|
|
2244
|
-
validator:
|
|
2254
|
+
validator: So
|
|
2245
2255
|
}
|
|
2246
2256
|
} : {}
|
|
2247
2257
|
});
|
|
2248
|
-
function
|
|
2258
|
+
function Et(t) {
|
|
2249
2259
|
const e = d(() => t.value.map((n) => ({
|
|
2250
2260
|
...n,
|
|
2251
2261
|
values: n.values.map((o) => ({
|
|
@@ -2260,10 +2270,10 @@ function wt(t) {
|
|
|
2260
2270
|
});
|
|
2261
2271
|
return { multiBarData: e, groupedData: r };
|
|
2262
2272
|
}
|
|
2263
|
-
function
|
|
2273
|
+
function Fo(t, e) {
|
|
2264
2274
|
return t.value.length === 1 ? "single" : e.value;
|
|
2265
2275
|
}
|
|
2266
|
-
function
|
|
2276
|
+
function Go(t, e, r) {
|
|
2267
2277
|
const n = d(
|
|
2268
2278
|
() => r.value === L.HORIZONTAL
|
|
2269
2279
|
);
|
|
@@ -2273,7 +2283,7 @@ function Fo(t, e, r) {
|
|
|
2273
2283
|
const a = d(() => n.value ? (() => (o(t.value), t.value))() : t.value), l = d(() => n.value ? e.value : (() => (o(e.value), e.value))());
|
|
2274
2284
|
return { barXScale: a, barYScale: l };
|
|
2275
2285
|
}
|
|
2276
|
-
function
|
|
2286
|
+
function Vo(t, e, r, n, o, a) {
|
|
2277
2287
|
const l = d(
|
|
2278
2288
|
() => n.value === L.HORIZONTAL
|
|
2279
2289
|
);
|
|
@@ -2288,7 +2298,7 @@ function Go(t, e, r, n, o, a) {
|
|
|
2288
2298
|
return l.value ? r.value.bandwidth() : s < 0 ? r.value(s) - r.value(0) : r.value(0) - r.value(s);
|
|
2289
2299
|
}
|
|
2290
2300
|
function v(s, _, m) {
|
|
2291
|
-
const { value: f, color: g } = s, y = g ?? t.value[_].color ??
|
|
2301
|
+
const { value: f, color: g } = s, y = g ?? t.value[_].color ?? pe, { x: p, y: T } = i(f, m), A = u(f), x = c(f);
|
|
2292
2302
|
return {
|
|
2293
2303
|
classList: [`lume-fill--${y}`, ...a],
|
|
2294
2304
|
x: p,
|
|
@@ -2301,10 +2311,10 @@ function Go(t, e, r, n, o, a) {
|
|
|
2301
2311
|
}
|
|
2302
2312
|
return { barAttributeGenerator: v };
|
|
2303
2313
|
}
|
|
2304
|
-
function
|
|
2314
|
+
function jo(t, e, r, n, o, a) {
|
|
2305
2315
|
const l = d(
|
|
2306
2316
|
() => n.value === L.HORIZONTAL
|
|
2307
|
-
), i = d(() =>
|
|
2317
|
+
), i = d(() => se().domain(t.value.map((f, g) => g)).range([0, e.value.bandwidth()]).padding(0)), u = d(() => se().domain(t.value.map((f, g) => g)).range([0, r.value.bandwidth()]).padding(0));
|
|
2308
2318
|
function c(f, g, y) {
|
|
2309
2319
|
if (l.value)
|
|
2310
2320
|
return f >= 0 ? e.value(0) : e.value(f);
|
|
@@ -2338,7 +2348,7 @@ function Vo(t, e, r, n, o, a) {
|
|
|
2338
2348
|
}
|
|
2339
2349
|
return { barAttributeGenerator: m };
|
|
2340
2350
|
}
|
|
2341
|
-
function
|
|
2351
|
+
function Mo(t, e, r) {
|
|
2342
2352
|
const n = d(
|
|
2343
2353
|
() => e.value === L.HORIZONTAL
|
|
2344
2354
|
), o = d(() => {
|
|
@@ -2356,9 +2366,9 @@ function jo(t, e, r) {
|
|
|
2356
2366
|
return Math.max(...u);
|
|
2357
2367
|
});
|
|
2358
2368
|
function l(u, c, v) {
|
|
2359
|
-
return n.value ?
|
|
2360
|
-
|
|
2361
|
-
|
|
2369
|
+
return n.value ? ce().domain([o.value, a.value]).range([0, v.width]) : Object.assign(
|
|
2370
|
+
rt(
|
|
2371
|
+
se().domain(c.map((s, _) => _)).range([0, v.width]),
|
|
2362
2372
|
e.value,
|
|
2363
2373
|
r.value
|
|
2364
2374
|
),
|
|
@@ -2367,17 +2377,17 @@ function jo(t, e, r) {
|
|
|
2367
2377
|
}
|
|
2368
2378
|
function i(u, c, v) {
|
|
2369
2379
|
return n.value ? Object.assign(
|
|
2370
|
-
|
|
2371
|
-
|
|
2380
|
+
rt(
|
|
2381
|
+
se().domain(c.map((s, _) => _)).range([0, v.height]),
|
|
2372
2382
|
e.value,
|
|
2373
2383
|
r.value
|
|
2374
2384
|
),
|
|
2375
2385
|
{ labels: c }
|
|
2376
|
-
) :
|
|
2386
|
+
) : ce().domain([a.value, o.value]).range([0, v.height]);
|
|
2377
2387
|
}
|
|
2378
2388
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2379
2389
|
}
|
|
2380
|
-
function
|
|
2390
|
+
function zo(t, e, r, n, o, a) {
|
|
2381
2391
|
const l = d(
|
|
2382
2392
|
() => n.value === L.HORIZONTAL
|
|
2383
2393
|
), i = d(
|
|
@@ -2408,32 +2418,32 @@ function Mo(t, e, r, n, o, a) {
|
|
|
2408
2418
|
return p ? u.value.reduce((A, x, k) => (k < p && x[T] < 0 && (A += x[T]), A), 0) : 0;
|
|
2409
2419
|
}
|
|
2410
2420
|
function y(p, T, A) {
|
|
2411
|
-
const { value: x, color: k } = p, C = x >= 0 ? v(x) : s(x), D = x >= 0 ? _(x) : m(x), R = x >= 0 ? f(T, A) : g(T, A), { x: B, y:
|
|
2421
|
+
const { value: x, color: k } = p, C = x >= 0 ? v(x) : s(x), D = x >= 0 ? _(x) : m(x), R = x >= 0 ? f(T, A) : g(T, A), { x: B, y: Q } = c(x, A, R);
|
|
2412
2422
|
return {
|
|
2413
2423
|
classList: [`lume-fill--${k ?? t.value[T].color ?? Object.values(j)[T]}`, ...a],
|
|
2414
2424
|
width: C,
|
|
2415
2425
|
height: D,
|
|
2416
2426
|
x: B,
|
|
2417
|
-
y:
|
|
2427
|
+
y: Q,
|
|
2418
2428
|
isFaded: o.value !== -1 && o.value !== A,
|
|
2419
2429
|
isNegative: x < 0
|
|
2420
2430
|
};
|
|
2421
2431
|
}
|
|
2422
2432
|
return { barAttributeGenerator: y };
|
|
2423
2433
|
}
|
|
2424
|
-
const
|
|
2425
|
-
single:
|
|
2426
|
-
grouped:
|
|
2427
|
-
stacked:
|
|
2428
|
-
},
|
|
2434
|
+
const st = {
|
|
2435
|
+
single: Vo,
|
|
2436
|
+
grouped: jo,
|
|
2437
|
+
stacked: zo
|
|
2438
|
+
}, Wo = /* @__PURE__ */ w({
|
|
2429
2439
|
__name: "lume-bar-group",
|
|
2430
2440
|
props: {
|
|
2431
|
-
...
|
|
2441
|
+
...be(),
|
|
2432
2442
|
classList: {
|
|
2433
2443
|
type: [String, Array],
|
|
2434
2444
|
default: () => []
|
|
2435
2445
|
},
|
|
2436
|
-
...
|
|
2446
|
+
...Bo(!0),
|
|
2437
2447
|
transition: {
|
|
2438
2448
|
type: Boolean,
|
|
2439
2449
|
default: !0
|
|
@@ -2450,8 +2460,8 @@ const it = {
|
|
|
2450
2460
|
xScale: u,
|
|
2451
2461
|
yScale: c,
|
|
2452
2462
|
classList: v
|
|
2453
|
-
} =
|
|
2454
|
-
const x =
|
|
2463
|
+
} = P(r), s = de("chartID"), { emitInternalEvent: _ } = X(e, s), { groupedData: m } = Et(n), { barXScale: f, barYScale: g } = Go(u, c, a), y = d(() => typeof v.value == "string" ? [v.value] : v.value), p = d(() => {
|
|
2464
|
+
const x = Fo(n, i), { barAttributeGenerator: k } = st[x](
|
|
2455
2465
|
n,
|
|
2456
2466
|
f,
|
|
2457
2467
|
g,
|
|
@@ -2465,12 +2475,12 @@ const it = {
|
|
|
2465
2475
|
return a.value === L.HORIZONTAL ? "width" : "height";
|
|
2466
2476
|
});
|
|
2467
2477
|
async function A(x) {
|
|
2468
|
-
e("lume__internal--hover", x),
|
|
2478
|
+
e("lume__internal--hover", x), _("lume__internal--hover", x);
|
|
2469
2479
|
}
|
|
2470
|
-
return { __sfc: !0, MIXIN_MAP:
|
|
2480
|
+
return { __sfc: !0, MIXIN_MAP: st, props: r, emit: e, data: n, hoveredIndex: o, orientation: a, transition: l, type: i, xScale: u, yScale: c, classList: v, chartID: s, emitInternalEvent: _, groupedData: m, barXScale: f, barYScale: g, computedClasses: y, getBarAttributes: p, computedTransition: T, handleInternalHover: A, LumeBar: Me };
|
|
2471
2481
|
}
|
|
2472
2482
|
});
|
|
2473
|
-
var
|
|
2483
|
+
var Zo = function() {
|
|
2474
2484
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2475
2485
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(o, a) {
|
|
2476
2486
|
return r("g", { key: a, on: { mouseenter: function(l) {
|
|
@@ -2485,17 +2495,17 @@ var Wo = function() {
|
|
|
2485
2495
|
} } }, "lume-bar", n.getBarAttributes(l, i, a, o), !1));
|
|
2486
2496
|
}), 1);
|
|
2487
2497
|
}), 0);
|
|
2488
|
-
},
|
|
2489
|
-
zo,
|
|
2498
|
+
}, Xo = [], Uo = /* @__PURE__ */ E(
|
|
2490
2499
|
Wo,
|
|
2491
2500
|
Zo,
|
|
2501
|
+
Xo,
|
|
2492
2502
|
!1,
|
|
2493
2503
|
null,
|
|
2494
2504
|
null,
|
|
2495
2505
|
null,
|
|
2496
2506
|
null
|
|
2497
2507
|
);
|
|
2498
|
-
const
|
|
2508
|
+
const Ze = Uo.exports, Yo = {
|
|
2499
2509
|
[L.VERTICAL]: {
|
|
2500
2510
|
withTooltip: !0,
|
|
2501
2511
|
xAxisOptions: {},
|
|
@@ -2508,20 +2518,20 @@ const We = Xo.exports, Uo = {
|
|
|
2508
2518
|
yAxisOptions: { gridLines: !1 },
|
|
2509
2519
|
margins: re.HORIZONTAL
|
|
2510
2520
|
}
|
|
2511
|
-
},
|
|
2521
|
+
}, Ko = /* @__PURE__ */ w({
|
|
2512
2522
|
__name: "lume-single-bar-chart",
|
|
2513
2523
|
props: {
|
|
2514
2524
|
...ue(Fe)
|
|
2515
2525
|
},
|
|
2516
2526
|
setup(t, { emit: e }) {
|
|
2517
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } =
|
|
2518
|
-
() =>
|
|
2527
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } = P(r), i = d(
|
|
2528
|
+
() => Yo[a.value || L.VERTICAL]
|
|
2519
2529
|
// needs to be computed so that default options are reactive
|
|
2520
2530
|
), { allOptions: u } = Z(l, i);
|
|
2521
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2531
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: Ze };
|
|
2522
2532
|
}
|
|
2523
2533
|
});
|
|
2524
|
-
var
|
|
2534
|
+
var Jo = function() {
|
|
2525
2535
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2526
2536
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
2527
2537
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", o, !1), n.componentEventPropagator))];
|
|
@@ -2530,17 +2540,17 @@ var Ko = function() {
|
|
|
2530
2540
|
return [e._t(a, null, null, l || {})];
|
|
2531
2541
|
} };
|
|
2532
2542
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2533
|
-
},
|
|
2534
|
-
Yo,
|
|
2543
|
+
}, Qo = [], qo = /* @__PURE__ */ E(
|
|
2535
2544
|
Ko,
|
|
2536
2545
|
Jo,
|
|
2546
|
+
Qo,
|
|
2537
2547
|
!1,
|
|
2538
2548
|
null,
|
|
2539
2549
|
null,
|
|
2540
2550
|
null,
|
|
2541
2551
|
null
|
|
2542
2552
|
);
|
|
2543
|
-
const
|
|
2553
|
+
const za = qo.exports, ea = {
|
|
2544
2554
|
[L.VERTICAL]: {
|
|
2545
2555
|
withTooltip: !0,
|
|
2546
2556
|
xAxisOptions: {},
|
|
@@ -2554,23 +2564,23 @@ const Ma = Qo.exports, qo = {
|
|
|
2554
2564
|
margins: re.HORIZONTAL,
|
|
2555
2565
|
tooltipOptions: { position: "right" }
|
|
2556
2566
|
}
|
|
2557
|
-
},
|
|
2567
|
+
}, ta = /* @__PURE__ */ w({
|
|
2558
2568
|
__name: "lume-grouped-bar-chart",
|
|
2559
2569
|
props: {
|
|
2560
2570
|
...ue()
|
|
2561
2571
|
},
|
|
2562
2572
|
setup(t, { emit: e }) {
|
|
2563
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } =
|
|
2564
|
-
() =>
|
|
2573
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { orientation: a, options: l } = P(r), i = d(
|
|
2574
|
+
() => ea[a.value || L.VERTICAL]
|
|
2565
2575
|
// needs to be computed so that default options are reactive
|
|
2566
2576
|
), { allOptions: u } = Z(
|
|
2567
2577
|
l,
|
|
2568
2578
|
i
|
|
2569
2579
|
);
|
|
2570
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup:
|
|
2580
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, orientation: a, options: l, baseOptions: i, allOptions: u, LumeChart: ie, LumeBarGroup: Ze };
|
|
2571
2581
|
}
|
|
2572
2582
|
});
|
|
2573
|
-
var
|
|
2583
|
+
var na = function() {
|
|
2574
2584
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2575
2585
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
2576
2586
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", o, !1), n.componentEventPropagator))];
|
|
@@ -2579,17 +2589,17 @@ var ta = function() {
|
|
|
2579
2589
|
return [e._t(a, null, null, l || {})];
|
|
2580
2590
|
} };
|
|
2581
2591
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2582
|
-
},
|
|
2583
|
-
ea,
|
|
2592
|
+
}, ra = [], oa = /* @__PURE__ */ E(
|
|
2584
2593
|
ta,
|
|
2585
2594
|
na,
|
|
2595
|
+
ra,
|
|
2586
2596
|
!1,
|
|
2587
2597
|
null,
|
|
2588
2598
|
null,
|
|
2589
2599
|
null,
|
|
2590
2600
|
null
|
|
2591
2601
|
);
|
|
2592
|
-
const
|
|
2602
|
+
const Wa = oa.exports, aa = {
|
|
2593
2603
|
[L.VERTICAL]: {
|
|
2594
2604
|
withTooltip: !0,
|
|
2595
2605
|
xAxisOptions: {},
|
|
@@ -2603,27 +2613,27 @@ const za = ra.exports, oa = {
|
|
|
2603
2613
|
margins: re.HORIZONTAL,
|
|
2604
2614
|
tooltipOptions: { position: "right" }
|
|
2605
2615
|
}
|
|
2606
|
-
},
|
|
2616
|
+
}, la = /* @__PURE__ */ w({
|
|
2607
2617
|
__name: "lume-stacked-bar-chart",
|
|
2608
2618
|
props: {
|
|
2609
2619
|
...ue()
|
|
2610
2620
|
},
|
|
2611
2621
|
setup(t, { emit: e }) {
|
|
2612
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { data: a, orientation: l, options: i } =
|
|
2613
|
-
() =>
|
|
2622
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { data: a, orientation: l, options: i } = P(r), u = d(
|
|
2623
|
+
() => aa[l.value || L.VERTICAL]
|
|
2614
2624
|
// needs to be computed so that default options are reactive
|
|
2615
2625
|
), { allOptions: c } = Z(
|
|
2616
2626
|
i,
|
|
2617
2627
|
u
|
|
2618
|
-
), { internalData: v } =
|
|
2628
|
+
), { internalData: v } = We(a), { groupedData: s } = Et(v), { stackedXScaleGenerator: _, stackedYScaleGenerator: m } = Mo(
|
|
2619
2629
|
s,
|
|
2620
2630
|
l,
|
|
2621
2631
|
i
|
|
2622
2632
|
);
|
|
2623
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, baseOptions: u, allOptions: c, internalData: v, groupedData: s, stackedXScaleGenerator: _, stackedYScaleGenerator: m, LumeChart: ie, LumeBarGroup:
|
|
2633
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, data: a, orientation: l, options: i, baseOptions: u, allOptions: c, internalData: v, groupedData: s, stackedXScaleGenerator: _, stackedYScaleGenerator: m, LumeChart: ie, LumeBarGroup: Ze };
|
|
2624
2634
|
}
|
|
2625
2635
|
});
|
|
2626
|
-
var
|
|
2636
|
+
var ua = function() {
|
|
2627
2637
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2628
2638
|
return r(n.LumeChart, e._g(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(o) {
|
|
2629
2639
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", o, !1), n.componentEventPropagator))];
|
|
@@ -2632,17 +2642,17 @@ var la = function() {
|
|
|
2632
2642
|
return [e._t(a, null, null, l || {})];
|
|
2633
2643
|
} };
|
|
2634
2644
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2635
|
-
},
|
|
2636
|
-
aa,
|
|
2645
|
+
}, ia = [], sa = /* @__PURE__ */ E(
|
|
2637
2646
|
la,
|
|
2638
2647
|
ua,
|
|
2648
|
+
ia,
|
|
2639
2649
|
!1,
|
|
2640
2650
|
null,
|
|
2641
2651
|
null,
|
|
2642
2652
|
null,
|
|
2643
2653
|
null
|
|
2644
2654
|
);
|
|
2645
|
-
const
|
|
2655
|
+
const Za = sa.exports, ct = 2, ca = /* @__PURE__ */ w({
|
|
2646
2656
|
__name: "lume-line",
|
|
2647
2657
|
props: {
|
|
2648
2658
|
pathDefinition: {
|
|
@@ -2651,7 +2661,7 @@ const Wa = ia.exports, st = 2, sa = /* @__PURE__ */ E({
|
|
|
2651
2661
|
},
|
|
2652
2662
|
width: {
|
|
2653
2663
|
type: Number,
|
|
2654
|
-
default:
|
|
2664
|
+
default: ct
|
|
2655
2665
|
},
|
|
2656
2666
|
color: {
|
|
2657
2667
|
type: String,
|
|
@@ -2677,10 +2687,10 @@ const Wa = ia.exports, st = 2, sa = /* @__PURE__ */ E({
|
|
|
2677
2687
|
emits: ["click"],
|
|
2678
2688
|
setup(t, { emit: e }) {
|
|
2679
2689
|
const r = I(null);
|
|
2680
|
-
return
|
|
2690
|
+
return J(() => ye(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: ct, emit: e, root: r };
|
|
2681
2691
|
}
|
|
2682
2692
|
});
|
|
2683
|
-
var
|
|
2693
|
+
var da = function() {
|
|
2684
2694
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2685
2695
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2686
2696
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2692,17 +2702,17 @@ var ca = function() {
|
|
|
2692
2702
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(o) {
|
|
2693
2703
|
return n.emit("click", o);
|
|
2694
2704
|
} } });
|
|
2695
|
-
},
|
|
2696
|
-
sa,
|
|
2705
|
+
}, va = [], _a = /* @__PURE__ */ E(
|
|
2697
2706
|
ca,
|
|
2698
2707
|
da,
|
|
2708
|
+
va,
|
|
2699
2709
|
!1,
|
|
2700
2710
|
null,
|
|
2701
2711
|
"08896455",
|
|
2702
2712
|
null,
|
|
2703
2713
|
null
|
|
2704
2714
|
);
|
|
2705
|
-
const
|
|
2715
|
+
const pa = _a.exports, dt = 4, fa = /* @__PURE__ */ w({
|
|
2706
2716
|
__name: "lume-point",
|
|
2707
2717
|
props: {
|
|
2708
2718
|
x: { type: Number, required: !0 },
|
|
@@ -2713,7 +2723,7 @@ const _a = va.exports, ct = 4, pa = /* @__PURE__ */ E({
|
|
|
2713
2723
|
},
|
|
2714
2724
|
radius: {
|
|
2715
2725
|
type: Number,
|
|
2716
|
-
default:
|
|
2726
|
+
default: dt
|
|
2717
2727
|
},
|
|
2718
2728
|
active: {
|
|
2719
2729
|
type: Boolean,
|
|
@@ -2723,26 +2733,26 @@ const _a = va.exports, ct = 4, pa = /* @__PURE__ */ E({
|
|
|
2723
2733
|
emits: ["click"],
|
|
2724
2734
|
setup(t, { emit: e }) {
|
|
2725
2735
|
const r = t, n = I(null), o = d(() => r.radius / 2);
|
|
2726
|
-
return
|
|
2736
|
+
return J(() => ye(n.value)), { __sfc: !0, DEFAULT_RADIUS: dt, props: r, emit: e, root: n, strokeWidth: o };
|
|
2727
2737
|
}
|
|
2728
2738
|
});
|
|
2729
|
-
var
|
|
2739
|
+
var ma = function() {
|
|
2730
2740
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2731
2741
|
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(o) {
|
|
2732
2742
|
return n.emit("click", o);
|
|
2733
2743
|
} } });
|
|
2734
|
-
},
|
|
2735
|
-
pa,
|
|
2744
|
+
}, ha = [], ga = /* @__PURE__ */ E(
|
|
2736
2745
|
fa,
|
|
2737
2746
|
ma,
|
|
2747
|
+
ha,
|
|
2738
2748
|
!1,
|
|
2739
2749
|
null,
|
|
2740
2750
|
"9bacbd7d",
|
|
2741
2751
|
null,
|
|
2742
2752
|
null
|
|
2743
2753
|
);
|
|
2744
|
-
const
|
|
2745
|
-
function
|
|
2754
|
+
const ya = ga.exports;
|
|
2755
|
+
function wt(t) {
|
|
2746
2756
|
function e(a) {
|
|
2747
2757
|
let l = null;
|
|
2748
2758
|
return a == null ? void 0 : a.reduce((i, u, c) => (u == null || u.value == null ? (l ? l.push(c) : l = [c], c === (a == null ? void 0 : a.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
@@ -2786,22 +2796,22 @@ function Et(t) {
|
|
|
2786
2796
|
};
|
|
2787
2797
|
})) };
|
|
2788
2798
|
}
|
|
2789
|
-
function
|
|
2799
|
+
function ba(t, e) {
|
|
2790
2800
|
const r = t.bandwidth() / 2;
|
|
2791
2801
|
return (n, o) => t(t.domain()[e + (o - 1)]) + r;
|
|
2792
2802
|
}
|
|
2793
|
-
function
|
|
2803
|
+
function ka(t, e) {
|
|
2794
2804
|
return (r, n) => t(e + (n - 1));
|
|
2795
2805
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return
|
|
2798
|
-
oe(r) ?
|
|
2806
|
+
function Ta(t, e, r, n) {
|
|
2807
|
+
return jt().x(
|
|
2808
|
+
oe(r) ? ba(r, t) : ka(r, t)
|
|
2799
2809
|
).y((a) => n(a))(e);
|
|
2800
2810
|
}
|
|
2801
|
-
const
|
|
2811
|
+
const vt = 1, xa = /* @__PURE__ */ w({
|
|
2802
2812
|
__name: "lume-line-group",
|
|
2803
2813
|
props: {
|
|
2804
|
-
...
|
|
2814
|
+
...be(),
|
|
2805
2815
|
withPoints: {
|
|
2806
2816
|
type: Boolean,
|
|
2807
2817
|
default: !0
|
|
@@ -2813,7 +2823,7 @@ const dt = 1, Ta = /* @__PURE__ */ E({
|
|
|
2813
2823
|
},
|
|
2814
2824
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2815
2825
|
setup(t, { emit: e }) {
|
|
2816
|
-
const r = t, { data: n, options: o, xScale: a, yScale: l } =
|
|
2826
|
+
const r = t, { data: n, options: o, xScale: a, yScale: l } = P(r), i = de(
|
|
2817
2827
|
"tooltipAnchorAttributes",
|
|
2818
2828
|
null
|
|
2819
2829
|
), { updateTooltipAnchorAttributes: u } = Ot(
|
|
@@ -2824,12 +2834,12 @@ const dt = 1, Ta = /* @__PURE__ */ E({
|
|
|
2824
2834
|
), c = d(() => {
|
|
2825
2835
|
if (n.value.every((C) => C.isDashed))
|
|
2826
2836
|
return n.value;
|
|
2827
|
-
const { computedLineData: k } =
|
|
2837
|
+
const { computedLineData: k } = wt(n);
|
|
2828
2838
|
return o.value.withTooltip !== !1 && (i != null && i.value) && u(k.value), k.value;
|
|
2829
2839
|
}), v = d(() => {
|
|
2830
2840
|
if (r.hoveredIndex === -1)
|
|
2831
2841
|
return;
|
|
2832
|
-
const k =
|
|
2842
|
+
const k = on(
|
|
2833
2843
|
c.value,
|
|
2834
2844
|
r.hoveredIndex
|
|
2835
2845
|
);
|
|
@@ -2839,7 +2849,7 @@ const dt = 1, Ta = /* @__PURE__ */ E({
|
|
|
2839
2849
|
// Move to X index, Vertical line to the highest point
|
|
2840
2850
|
};
|
|
2841
2851
|
}), s = d(
|
|
2842
|
-
() => a.value &&
|
|
2852
|
+
() => a.value && vt / (an(a.value) - 1)
|
|
2843
2853
|
// Subtracting the first line (read below)
|
|
2844
2854
|
), _ = d(
|
|
2845
2855
|
() => {
|
|
@@ -2861,7 +2871,7 @@ const dt = 1, Ta = /* @__PURE__ */ E({
|
|
|
2861
2871
|
(R = y(C)[k - 1]) == null ? void 0 : R.value,
|
|
2862
2872
|
(B = y(C)[k]) == null ? void 0 : B.value
|
|
2863
2873
|
];
|
|
2864
|
-
return
|
|
2874
|
+
return Ta(
|
|
2865
2875
|
k,
|
|
2866
2876
|
D,
|
|
2867
2877
|
a.value,
|
|
@@ -2885,10 +2895,10 @@ const dt = 1, Ta = /* @__PURE__ */ E({
|
|
|
2885
2895
|
function x(k) {
|
|
2886
2896
|
return r.hoveredIndex === k;
|
|
2887
2897
|
}
|
|
2888
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2898
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: vt, props: r, emit: e, data: n, options: o, xScale: a, yScale: l, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: u, computedGroupData: c, overlayLineAttributes: v, animationDuration: s, pointRadius: _, xAxisOffset: m, domain: f, computedWithPoints: g, getValuesFromDataset: y, getPathDefinition: p, getLineTransitionParams: T, getPointPosition: A, isPointActive: x, LumeLine: pa, LumePoint: ya };
|
|
2889
2899
|
}
|
|
2890
2900
|
});
|
|
2891
|
-
var
|
|
2901
|
+
var Aa = function() {
|
|
2892
2902
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2893
2903
|
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(o, a) {
|
|
2894
2904
|
return r("g", { key: o.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(o.values, function(l, i) {
|
|
@@ -2901,33 +2911,33 @@ var xa = function() {
|
|
|
2901
2911
|
} } }, "lume-point", n.getPointPosition(i, a), !1));
|
|
2902
2912
|
}), 1) : e._e()]);
|
|
2903
2913
|
})], 2);
|
|
2904
|
-
},
|
|
2905
|
-
Ta,
|
|
2914
|
+
}, La = [], Oa = /* @__PURE__ */ E(
|
|
2906
2915
|
xa,
|
|
2907
2916
|
Aa,
|
|
2917
|
+
La,
|
|
2908
2918
|
!1,
|
|
2909
2919
|
null,
|
|
2910
2920
|
"c4d7f0ca",
|
|
2911
2921
|
null,
|
|
2912
2922
|
null
|
|
2913
2923
|
);
|
|
2914
|
-
const Nt =
|
|
2924
|
+
const Nt = Oa.exports, $a = {
|
|
2915
2925
|
margins: re.VERTICAL,
|
|
2916
2926
|
startOnZero: !0,
|
|
2917
2927
|
withTooltip: !0,
|
|
2918
2928
|
xAxisOptions: {},
|
|
2919
2929
|
yAxisOptions: { gridLines: !0 }
|
|
2920
|
-
},
|
|
2930
|
+
}, Ia = /* @__PURE__ */ w({
|
|
2921
2931
|
__name: "lume-line-chart",
|
|
2922
2932
|
props: {
|
|
2923
2933
|
...ue(null, !1)
|
|
2924
2934
|
},
|
|
2925
2935
|
setup(t, { emit: e }) {
|
|
2926
|
-
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { options: a } =
|
|
2936
|
+
const r = t, { componentEventPropagator: n } = X(e), o = ae(V()), { options: a } = P(r), { allOptions: l } = Z(a, $a);
|
|
2927
2937
|
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: o, options: a, allOptions: l, LumeChart: ie, LumeLineGroup: Nt };
|
|
2928
2938
|
}
|
|
2929
2939
|
});
|
|
2930
|
-
var
|
|
2940
|
+
var Ea = function() {
|
|
2931
2941
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2932
2942
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
2933
2943
|
return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", o, !1), n.componentEventPropagator))];
|
|
@@ -2936,9 +2946,9 @@ var Ia = function() {
|
|
|
2936
2946
|
return [e._t(a, null, null, l || {})];
|
|
2937
2947
|
} };
|
|
2938
2948
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2939
|
-
}, wa = [],
|
|
2940
|
-
$a,
|
|
2949
|
+
}, wa = [], Na = /* @__PURE__ */ E(
|
|
2941
2950
|
Ia,
|
|
2951
|
+
Ea,
|
|
2942
2952
|
wa,
|
|
2943
2953
|
!1,
|
|
2944
2954
|
null,
|
|
@@ -2946,18 +2956,18 @@ var Ia = function() {
|
|
|
2946
2956
|
null,
|
|
2947
2957
|
null
|
|
2948
2958
|
);
|
|
2949
|
-
const
|
|
2950
|
-
function
|
|
2959
|
+
const Xa = Na.exports;
|
|
2960
|
+
function Ca(t) {
|
|
2951
2961
|
return { areaPathDefinition: d(
|
|
2952
2962
|
() => function(r, n) {
|
|
2953
2963
|
if (!r || !n)
|
|
2954
2964
|
return;
|
|
2955
2965
|
const o = t.value[0].values;
|
|
2956
|
-
return
|
|
2966
|
+
return Mt().x((a, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((a) => n(a.value))(o);
|
|
2957
2967
|
}
|
|
2958
2968
|
) };
|
|
2959
2969
|
}
|
|
2960
|
-
const
|
|
2970
|
+
const Ha = {
|
|
2961
2971
|
margins: {
|
|
2962
2972
|
top: 0,
|
|
2963
2973
|
right: 0,
|
|
@@ -2971,14 +2981,14 @@ const Ca = {
|
|
|
2971
2981
|
tooltipOptions: {
|
|
2972
2982
|
showTitle: !1
|
|
2973
2983
|
}
|
|
2974
|
-
},
|
|
2984
|
+
}, Da = /* @__PURE__ */ w({
|
|
2975
2985
|
__name: "lume-sparkline-chart",
|
|
2976
2986
|
props: {
|
|
2977
|
-
...
|
|
2978
|
-
...
|
|
2987
|
+
...ze(null),
|
|
2988
|
+
...ve()
|
|
2979
2989
|
},
|
|
2980
2990
|
setup(t, { expose: e, emit: r }) {
|
|
2981
|
-
const n = t, { componentEventPropagator: o } = X(r), a = ae(V()), { data: l, options: i } =
|
|
2991
|
+
const n = t, { componentEventPropagator: o } = X(r), a = ae(V()), { data: l, options: i } = P(n), { internalData: u } = We(l), { allOptions: c } = Z(i, Ha), { computedLineData: v } = wt(u), { areaPathDefinition: s } = Ca(v), _ = d(() => u.value[0].color), m = d(
|
|
2982
2992
|
() => l.value[0].areaColor || _.value
|
|
2983
2993
|
);
|
|
2984
2994
|
function f(y) {
|
|
@@ -2988,14 +2998,14 @@ const Ca = {
|
|
|
2988
2998
|
};
|
|
2989
2999
|
}
|
|
2990
3000
|
function g(y, p, T) {
|
|
2991
|
-
return
|
|
3001
|
+
return ce().range([0, T.width]).domain([0, y[0].values.length - 1]);
|
|
2992
3002
|
}
|
|
2993
3003
|
return e({
|
|
2994
3004
|
areaPathDefinition: s
|
|
2995
3005
|
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: o, slots: a, data: l, options: i, internalData: u, allOptions: c, computedLineData: v, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: f, xScaleGenerator: g, LumeChart: ie, LumeLineGroup: Nt };
|
|
2996
3006
|
}
|
|
2997
3007
|
});
|
|
2998
|
-
var
|
|
3008
|
+
var Ra = function() {
|
|
2999
3009
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3000
3010
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(o) {
|
|
3001
3011
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3009,41 +3019,41 @@ var Da = function() {
|
|
|
3009
3019
|
return [e._t(a, null, null, l || {})];
|
|
3010
3020
|
} };
|
|
3011
3021
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3012
|
-
},
|
|
3013
|
-
Ha,
|
|
3022
|
+
}, Pa = [], Sa = /* @__PURE__ */ E(
|
|
3014
3023
|
Da,
|
|
3015
3024
|
Ra,
|
|
3025
|
+
Pa,
|
|
3016
3026
|
!1,
|
|
3017
3027
|
null,
|
|
3018
3028
|
"c681fff6",
|
|
3019
3029
|
null,
|
|
3020
3030
|
null
|
|
3021
3031
|
);
|
|
3022
|
-
const
|
|
3032
|
+
const Ua = Sa.exports;
|
|
3023
3033
|
export {
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3034
|
+
ja as LumeAlluvialDiagram,
|
|
3035
|
+
Oo as LumeAlluvialGroup,
|
|
3036
|
+
Yr as LumeAlluvialNodeLabel,
|
|
3037
|
+
eo as LumeAlluvialNodeValue,
|
|
3038
|
+
In as LumeAxis,
|
|
3039
|
+
Me as LumeBar,
|
|
3040
|
+
Ma as LumeBarChart,
|
|
3041
|
+
Ze as LumeBarGroup,
|
|
3032
3042
|
ie as LumeChart,
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3043
|
+
Gn as LumeChartContainer,
|
|
3044
|
+
Wn as LumeChartLegend,
|
|
3045
|
+
Wa as LumeGroupedBarChart,
|
|
3046
|
+
pa as LumeLine,
|
|
3047
|
+
Xa as LumeLineChart,
|
|
3038
3048
|
Nt as LumeLineGroup,
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3049
|
+
Er as LumeOverlayGroup,
|
|
3050
|
+
ya as LumePoint,
|
|
3051
|
+
za as LumeSingleBarChart,
|
|
3052
|
+
Ua as LumeSparklineChart,
|
|
3053
|
+
Za as LumeStackedBarChart,
|
|
3054
|
+
dr as LumeTooltip,
|
|
3055
|
+
lr as LumeTooltipItem,
|
|
3056
|
+
tr as LumeTooltipSummary,
|
|
3057
|
+
Kn as LumeTooltipTitle
|
|
3048
3058
|
};
|
|
3049
3059
|
//# sourceMappingURL=index.js.map
|