@adyen/lume 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts +2 -0
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts +9 -0
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts +30 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts +4 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -1
- package/dist/@types/components/index.d.ts +1 -0
- package/dist/@types/components/index.d.ts.map +1 -1
- package/dist/@types/composables/events.d.ts.map +1 -1
- package/dist/@types/docs/storybook-helpers.d.ts.map +1 -1
- package/dist/@types/types/events.d.ts +1 -0
- package/dist/@types/types/events.d.ts.map +1 -1
- package/dist/index.js +565 -531
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +25 -24
- package/dist/plugin.js.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
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 H, ref as I, isRef as bt, computed as v, watch as C, toRefs as B, inject as Le, reactive as Oe, onMounted as ee, onBeforeUnmount as kt, watchEffect as xt, useSlots as M, provide as we, nextTick as tt, defineAsyncComponent as Ne } from "vue";
|
|
2
|
+
import { format as Mt, ticks as zt, scaleBand as _e, scaleLinear as fe, link as Wt, line as Zt, area as Ut } from "d3";
|
|
3
|
+
import { createPopper as Xt } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as Yt, sankey as Kt, sankeyJustify as Jt } from "d3-sankey";
|
|
5
|
+
const Qt = /* @__PURE__ */ H({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -40,11 +40,11 @@ const qt = /* @__PURE__ */ C({
|
|
|
40
40
|
},
|
|
41
41
|
emits: ["click", "mouseenter"],
|
|
42
42
|
setup(t, { expose: e, emit: r }) {
|
|
43
|
-
const n =
|
|
43
|
+
const n = I(null);
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function
|
|
47
|
+
function w(t, e, r, n, a, o, l, i) {
|
|
48
48
|
var u = typeof t == "function" ? t.options : t;
|
|
49
49
|
e && (u.render = e, u.staticRenderFns = r, u._compiled = !0), n && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
|
|
50
50
|
var c;
|
|
@@ -73,7 +73,7 @@ function N(t, e, r, n, a, o, l, i) {
|
|
|
73
73
|
options: u
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var qt = 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 en = function() {
|
|
|
83
83
|
}, click: function(a) {
|
|
84
84
|
return n.emit("click", a);
|
|
85
85
|
} } }, "g", e.group, !1), [r("g", { staticClass: "axis__tick-label lume-typography--axis", attrs: { "pointer-events": "all", "data-j-axis__tick-label": "" } }, [r("rect", e._b({ staticClass: "axis__ghost", attrs: { fill: "url(#lume-tick-gradient)" } }, "rect", e.ghost, !1)), r("text", e._b({ ref: "labelRef", staticClass: "axis__label" }, "text", e.label, !1), [e._v(" " + e._s(e.value) + " ")])]), e.withGridlines ? r("line", e._b({ staticClass: "axis__grid-line" }, "line", e.gridline, !1)) : e._e()]);
|
|
86
|
-
},
|
|
86
|
+
}, en = [], tn = /* @__PURE__ */ w(
|
|
87
|
+
Qt,
|
|
87
88
|
qt,
|
|
88
89
|
en,
|
|
89
|
-
tn,
|
|
90
90
|
!1,
|
|
91
91
|
null,
|
|
92
92
|
"59ddc0a6",
|
|
93
93
|
null,
|
|
94
94
|
null
|
|
95
95
|
);
|
|
96
|
-
const
|
|
96
|
+
const nn = tn.exports, rn = [
|
|
97
97
|
"controls",
|
|
98
98
|
"legend",
|
|
99
99
|
"axes",
|
|
@@ -112,7 +112,7 @@ function Tt(t) {
|
|
|
112
112
|
function ze(t) {
|
|
113
113
|
return t.length === 1;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function an(t) {
|
|
116
116
|
return !!t && t.every(
|
|
117
117
|
(e) => "color" in e
|
|
118
118
|
);
|
|
@@ -126,20 +126,20 @@ function Lt(t, e) {
|
|
|
126
126
|
r[n] = He(t[n]) && He(a) ? Lt(t[n], a) : a;
|
|
127
127
|
}), r;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function on(t) {
|
|
130
130
|
return t != null && He(t) && "value" in t;
|
|
131
131
|
}
|
|
132
132
|
function X(t) {
|
|
133
133
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ln(t) {
|
|
136
136
|
return X(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
137
137
|
}
|
|
138
138
|
function nt(t) {
|
|
139
139
|
const [e, r] = t.domain();
|
|
140
140
|
return e == null || r == null || e === 0 && r === 0;
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const un = (t, e) => {
|
|
143
143
|
if (!t)
|
|
144
144
|
throw new Error("Data is not a valid array");
|
|
145
145
|
if (t.length === 0)
|
|
@@ -148,9 +148,9 @@ const sn = (t, e) => {
|
|
|
148
148
|
({ values: n }) => n.length - 1 >= e
|
|
149
149
|
) || q(Y.IndexExceedsLengthOfDataSets);
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function sn(t, e) {
|
|
152
152
|
var r;
|
|
153
|
-
return
|
|
153
|
+
return un(t, e), ((r = t.reduce(
|
|
154
154
|
(n, a) => {
|
|
155
155
|
var o, l;
|
|
156
156
|
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
@@ -167,13 +167,13 @@ function Ot(t) {
|
|
|
167
167
|
);
|
|
168
168
|
return Array(r).fill(null);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function cn(t) {
|
|
171
171
|
return X(t) ? t.domain().length : Math.max(...t.domain());
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function dn(t, e) {
|
|
174
174
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function vn(t, e, r) {
|
|
177
177
|
const n = r ? t.length - e : e, a = t.slice(0, n);
|
|
178
178
|
return t.slice(n).concat(a);
|
|
179
179
|
}
|
|
@@ -187,15 +187,15 @@ function oe(t) {
|
|
|
187
187
|
}
|
|
188
188
|
return t;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function _n(t) {
|
|
191
191
|
return Object.assign(
|
|
192
192
|
{},
|
|
193
193
|
...Object.keys(t).map(
|
|
194
|
-
(e) =>
|
|
194
|
+
(e) => rn.includes(e) ? {} : { [e]: t[e] }
|
|
195
195
|
)
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const fn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
199
199
|
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
200
200
|
""
|
|
201
201
|
);
|
|
@@ -205,16 +205,16 @@ function We(t, e) {
|
|
|
205
205
|
}
|
|
206
206
|
var Y = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
207
207
|
Learn more: https://lume.design/guidelines/datasets`, t.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", t.Empty = "The dataset(s) provided are empty.", t.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", t.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", t.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", t.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", t.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", t))(Y || {});
|
|
208
|
-
const
|
|
208
|
+
const pn = "[lume] ";
|
|
209
209
|
function q(t, e = !0) {
|
|
210
|
-
e && At() || console.warn(
|
|
210
|
+
e && At() || console.warn(pn + "Warning: " + t);
|
|
211
211
|
}
|
|
212
212
|
const Ae = (t) => {
|
|
213
213
|
let e = null;
|
|
214
214
|
switch (typeof t) {
|
|
215
215
|
case "string":
|
|
216
216
|
try {
|
|
217
|
-
e =
|
|
217
|
+
e = Mt(t);
|
|
218
218
|
} catch {
|
|
219
219
|
q(Y.InvalidFormat), e = null;
|
|
220
220
|
}
|
|
@@ -241,9 +241,9 @@ function K(t, e) {
|
|
|
241
241
|
return n ? Lt(n, t.value) : t.value;
|
|
242
242
|
}) };
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
function
|
|
246
|
-
const n =
|
|
244
|
+
const mn = 0.2;
|
|
245
|
+
function hn(t, e, r) {
|
|
246
|
+
const n = I(), a = v(() => Math.max(...t.value.range())), o = v(() => e.value.length);
|
|
247
247
|
function l() {
|
|
248
248
|
if (!e.value)
|
|
249
249
|
return;
|
|
@@ -251,7 +251,7 @@ function gn(t, e, r) {
|
|
|
251
251
|
(d, s) => d + s.ref.getBoundingClientRect().width,
|
|
252
252
|
0
|
|
253
253
|
), c = Math.ceil(u / o.value);
|
|
254
|
-
n.value = c + c *
|
|
254
|
+
n.value = c + c * mn;
|
|
255
255
|
}
|
|
256
256
|
function i(u) {
|
|
257
257
|
if (!e.value)
|
|
@@ -262,17 +262,17 @@ function gn(t, e, r) {
|
|
|
262
262
|
const s = a.value / d, _ = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / s);
|
|
263
263
|
return u % _ === 0;
|
|
264
264
|
}
|
|
265
|
-
return
|
|
265
|
+
return C(e, l), { showTick: i };
|
|
266
266
|
}
|
|
267
|
-
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}),
|
|
267
|
+
var z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), $t = /* @__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))($t || {}), Ze = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Ze || {}), Ue = /* @__PURE__ */ ((t) => (t.Grey = "grey", t.Green = "green", t.Orange = "orange", t.Red = "red", t))(Ue || {}), Xe = /* @__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))(Xe || {});
|
|
268
268
|
const L = {
|
|
269
269
|
HORIZONTAL: "horizontal",
|
|
270
270
|
VERTICAL: "vertical"
|
|
271
|
-
},
|
|
271
|
+
}, gn = {
|
|
272
272
|
SINGLE: "single",
|
|
273
273
|
GROUPED: "grouped",
|
|
274
274
|
STACKED: "stacked"
|
|
275
|
-
},
|
|
275
|
+
}, It = "No data", rt = 20, Et = 0.33, wt = 0.5, Nt = 12, me = 8, yn = 1, bn = [
|
|
276
276
|
"auto",
|
|
277
277
|
"auto-start",
|
|
278
278
|
"auto-end",
|
|
@@ -289,7 +289,7 @@ const L = {
|
|
|
289
289
|
"left-start",
|
|
290
290
|
"left-end"
|
|
291
291
|
];
|
|
292
|
-
function
|
|
292
|
+
function $e(t) {
|
|
293
293
|
t != null && t.closest("svg") || q(Y.NotContainedInSvg);
|
|
294
294
|
}
|
|
295
295
|
const Ht = {
|
|
@@ -308,14 +308,14 @@ const Ht = {
|
|
|
308
308
|
tickFormat: null,
|
|
309
309
|
/** Space between the tick label and the axis line. */
|
|
310
310
|
tickPadding: 8
|
|
311
|
-
},
|
|
311
|
+
}, kn = {
|
|
312
312
|
...Ht,
|
|
313
313
|
withTitle: !1,
|
|
314
314
|
skip: !0
|
|
315
|
-
},
|
|
315
|
+
}, xn = {
|
|
316
316
|
...Ht,
|
|
317
317
|
gridLines: !0
|
|
318
|
-
},
|
|
318
|
+
}, An = function(t, e, r) {
|
|
319
319
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
320
320
|
function a(u, c) {
|
|
321
321
|
return {
|
|
@@ -357,7 +357,7 @@ const Ht = {
|
|
|
357
357
|
getTickGroupAttributes: a,
|
|
358
358
|
getTickLabelAttributes: i
|
|
359
359
|
};
|
|
360
|
-
},
|
|
360
|
+
}, Tn = function(t, e, r) {
|
|
361
361
|
const n = v(() => t.value.step() * t.value.paddingInner() / 2);
|
|
362
362
|
function a(u, c) {
|
|
363
363
|
return {
|
|
@@ -395,7 +395,7 @@ const Ht = {
|
|
|
395
395
|
getTickGroupAttributes: a,
|
|
396
396
|
getTickLabelAttributes: i
|
|
397
397
|
};
|
|
398
|
-
},
|
|
398
|
+
}, Ln = function(t, e, r) {
|
|
399
399
|
const n = v(() => {
|
|
400
400
|
const u = t.value.ticks();
|
|
401
401
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -430,7 +430,7 @@ const Ht = {
|
|
|
430
430
|
getTickGroupAttributes: a,
|
|
431
431
|
getTickLabelAttributes: i
|
|
432
432
|
};
|
|
433
|
-
},
|
|
433
|
+
}, On = function(t, e, r) {
|
|
434
434
|
const n = v(() => {
|
|
435
435
|
const u = t.value.ticks();
|
|
436
436
|
return u.length > 1 ? t.value(u[1]) - t.value(u[0]) : 0;
|
|
@@ -469,13 +469,13 @@ const Ht = {
|
|
|
469
469
|
getTickLabelAttributes: i
|
|
470
470
|
};
|
|
471
471
|
}, $n = {
|
|
472
|
-
"x-band-scale-axis":
|
|
473
|
-
"y-band-scale-axis":
|
|
474
|
-
"x-linear-scale-axis":
|
|
475
|
-
"y-linear-scale-axis":
|
|
472
|
+
"x-band-scale-axis": An,
|
|
473
|
+
"y-band-scale-axis": Tn,
|
|
474
|
+
"x-linear-scale-axis": Ln,
|
|
475
|
+
"y-linear-scale-axis": On
|
|
476
476
|
};
|
|
477
477
|
var Ce = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Ce || {}), De = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(De || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
478
|
-
const
|
|
478
|
+
const In = /* @__PURE__ */ H({
|
|
479
479
|
__name: "lume-axis",
|
|
480
480
|
props: {
|
|
481
481
|
scale: {
|
|
@@ -508,7 +508,7 @@ const En = /* @__PURE__ */ C({
|
|
|
508
508
|
},
|
|
509
509
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
510
510
|
setup(t, { emit: e }) {
|
|
511
|
-
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = B(r), c = Le("isEmpty",
|
|
511
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u } = B(r), c = Le("isEmpty", I(!1)), d = Oe({}), s = I(null), _ = I(null), m = I(null), p = v(
|
|
512
512
|
() => r.type ? xe[r.type] : r.position
|
|
513
513
|
), h = v(
|
|
514
514
|
() => r.type || (p.value === "left" ? "y" : "x")
|
|
@@ -516,20 +516,20 @@ const En = /* @__PURE__ */ C({
|
|
|
516
516
|
() => h.value === "x" && u.value === L.VERTICAL || h.value === "y" && u.value === L.HORIZONTAL
|
|
517
517
|
), { allOptions: f } = K(
|
|
518
518
|
i,
|
|
519
|
-
h.value === "x" ?
|
|
520
|
-
), { showTick:
|
|
521
|
-
var
|
|
522
|
-
return h.value === "y" && c.value && (!a.value || nt(a.value)) ? `translate(0, ${((
|
|
519
|
+
h.value === "x" ? kn : xn
|
|
520
|
+
), { showTick: k } = hn(a, s, f), x = v(() => {
|
|
521
|
+
var $, g, O, N;
|
|
522
|
+
return h.value === "y" && c.value && (!a.value || nt(a.value)) ? `translate(0, ${(($ = o.value) == null ? void 0 : $.height) / 2})` : h.value === "x" && c.value && (!a.value || nt(a.value)) ? `translate(-${((g = o.value) == null ? void 0 : g.width) / 2}, ${(O = o.value) == null ? void 0 : O.height})` : `translate(0, ${h.value === "x" ? (N = o.value) == null ? void 0 : N.height : 0})`;
|
|
523
523
|
}), A = v(() => {
|
|
524
524
|
if (!a.value)
|
|
525
525
|
return [];
|
|
526
526
|
if (X(a.value))
|
|
527
527
|
return a.value.labels || a.value.domain();
|
|
528
|
-
const { tickCount:
|
|
529
|
-
return
|
|
530
|
-
}),
|
|
531
|
-
const { tickFormat:
|
|
532
|
-
return Ae(
|
|
528
|
+
const { tickCount: $ } = f.value, [g, O] = a.value.domain();
|
|
529
|
+
return zt(g, O, $);
|
|
530
|
+
}), E = v(() => {
|
|
531
|
+
const { tickFormat: $ } = f.value;
|
|
532
|
+
return Ae($);
|
|
533
533
|
}), T = v(
|
|
534
534
|
() => f.value.withHover && y.value && l.value > -1
|
|
535
535
|
), D = v(
|
|
@@ -538,9 +538,9 @@ const En = /* @__PURE__ */ C({
|
|
|
538
538
|
// If x axis, get the tick height
|
|
539
539
|
Math.max(
|
|
540
540
|
...(s.value || []).map(
|
|
541
|
-
(
|
|
541
|
+
($) => {
|
|
542
542
|
var g, O;
|
|
543
|
-
return ((O = (g =
|
|
543
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).height) + D.value;
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
)
|
|
@@ -548,33 +548,33 @@ const En = /* @__PURE__ */ C({
|
|
|
548
548
|
// If y axis, get the tick width
|
|
549
549
|
Math.max(
|
|
550
550
|
...(s.value || []).map(
|
|
551
|
-
(
|
|
551
|
+
($) => {
|
|
552
552
|
var g, O;
|
|
553
|
-
return ((O = (g =
|
|
553
|
+
return ((O = (g = $.ref).getBBox) == null ? void 0 : O.call(g).width) + D.value;
|
|
554
554
|
}
|
|
555
555
|
)
|
|
556
556
|
)
|
|
557
557
|
));
|
|
558
|
-
function R(
|
|
558
|
+
function R($) {
|
|
559
559
|
const { showTicks: g } = f.value;
|
|
560
|
-
return g === !1 ? "" :
|
|
560
|
+
return g === !1 ? "" : E.value($);
|
|
561
561
|
}
|
|
562
|
-
function G(
|
|
563
|
-
e("mouseenter", { index: y.value ?
|
|
562
|
+
function G($, g, O) {
|
|
563
|
+
e("mouseenter", { index: y.value ? $ : null, value: g, event: O });
|
|
564
564
|
}
|
|
565
|
-
function j(
|
|
566
|
-
e("click", { index:
|
|
565
|
+
function j($, g, O) {
|
|
566
|
+
e("click", { index: $, value: g, event: O });
|
|
567
567
|
}
|
|
568
|
-
function W(
|
|
568
|
+
function W($) {
|
|
569
569
|
var g;
|
|
570
570
|
if (!(!s.value || !s.value.length))
|
|
571
|
-
return (g = s.value[
|
|
571
|
+
return (g = s.value[$]) == null ? void 0 : g.ref;
|
|
572
572
|
}
|
|
573
573
|
function te() {
|
|
574
574
|
m.value = A.value.map(
|
|
575
|
-
(
|
|
576
|
-
value: R(
|
|
577
|
-
group: d.getTickGroupAttributes(
|
|
575
|
+
($, g) => ({
|
|
576
|
+
value: R($),
|
|
577
|
+
group: d.getTickGroupAttributes($, g),
|
|
578
578
|
ghost: d.getTickGhostAttributes(W(g)),
|
|
579
579
|
label: d.getTickLabelAttributes(),
|
|
580
580
|
gridline: d.getGridLinesAttributes()
|
|
@@ -582,22 +582,22 @@ const En = /* @__PURE__ */ C({
|
|
|
582
582
|
);
|
|
583
583
|
}
|
|
584
584
|
function Q() {
|
|
585
|
-
m.value && m.value.map((
|
|
585
|
+
m.value && m.value.map(($) => ($.gridline = d.getGridLinesAttributes(), $));
|
|
586
586
|
}
|
|
587
587
|
function ne() {
|
|
588
588
|
if (!a.value)
|
|
589
589
|
return;
|
|
590
|
-
const
|
|
590
|
+
const $ = a.value.step ? "bandScale" : "linearScale", g = $n[`${h.value}-${Ce[$]}`];
|
|
591
591
|
Object.entries(g(a, o, f) || []).forEach(
|
|
592
|
-
([O,
|
|
593
|
-
d[O] =
|
|
592
|
+
([O, N]) => {
|
|
593
|
+
d[O] = N;
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return C(a, ne, { flush: "sync", immediate: !0 }), C(a, te, { immediate: !0 }), C(s, te), C(S, ($) => e("lume__internal--axis-size", $)), C(r.containerSize, Q), ee(() => $e(_.value)), { __sfc: !0, SCALE_MIXIN_MAP: Ce, POSITIONS: De, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: i, orientation: u, isEmpty: c, mixins: d, tickRefs: s, root: _, ticksWithAttributes: m, computedPosition: p, computedType: h, shouldHover: y, allOptions: f, showTick: k, axisTransform: x, ticks: A, tickFormatter: E, isHovering: T, axisLabelOffset: D, axisSize: S, formatTick: R, handleTickMouseenter: G, handleTickClick: j, getTextNode: W, setTicks: te, updateGridlines: Q, init: ne, LumeTick: nn };
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
|
-
var
|
|
600
|
+
var En = function() {
|
|
601
601
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
602
602
|
return n.scale ? r("g", { ref: "root", staticClass: "axis", attrs: { transform: n.axisTransform, "data-j-axis": "" }, on: { mouseleave: function(a) {
|
|
603
603
|
return n.emit("mouseleave", a);
|
|
@@ -614,18 +614,18 @@ var wn = function() {
|
|
|
614
614
|
a
|
|
615
615
|
);
|
|
616
616
|
} } }, "lume-tick", n.ticksWithAttributes[n.hoveredIndex], !1)) : e._e()], 2) : e._e();
|
|
617
|
-
},
|
|
617
|
+
}, wn = [], Nn = /* @__PURE__ */ w(
|
|
618
|
+
In,
|
|
618
619
|
En,
|
|
619
620
|
wn,
|
|
620
|
-
Nn,
|
|
621
621
|
!1,
|
|
622
622
|
null,
|
|
623
623
|
null,
|
|
624
624
|
null,
|
|
625
625
|
null
|
|
626
626
|
);
|
|
627
|
-
const
|
|
628
|
-
function
|
|
627
|
+
const Hn = Nn.exports;
|
|
628
|
+
function Cn(t, e, r, n) {
|
|
629
629
|
const a = v(() => r.value > 0 && r.value < 1), o = v(
|
|
630
630
|
() => n.value > 0 && n.value < 1
|
|
631
631
|
), l = v(
|
|
@@ -637,13 +637,13 @@ function Dn(t, e, r, n) {
|
|
|
637
637
|
);
|
|
638
638
|
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
const a =
|
|
640
|
+
function Dn(t, e, r, n) {
|
|
641
|
+
const a = I(0), o = I(0), l = v(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
642
642
|
return ee(() => {
|
|
643
643
|
a.value = r.value, o.value = n.value;
|
|
644
|
-
}),
|
|
644
|
+
}), C(r, (i) => a.value = i), C(n, (i) => o.value = i), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
645
645
|
}
|
|
646
|
-
const
|
|
646
|
+
const Sn = /* @__PURE__ */ H({
|
|
647
647
|
__name: "lume-bar",
|
|
648
648
|
props: {
|
|
649
649
|
x: {
|
|
@@ -681,13 +681,13 @@ const Rn = /* @__PURE__ */ C({
|
|
|
681
681
|
},
|
|
682
682
|
emits: ["click", "mouseover", "mouseleave"],
|
|
683
683
|
setup(t, { emit: e }) {
|
|
684
|
-
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), c =
|
|
684
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: i, classList: u } = B(r), c = I(null), d = v(
|
|
685
685
|
() => typeof u.value == "string" ? [u.value] : u.value
|
|
686
|
-
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m =
|
|
687
|
-
return ee(() =>
|
|
686
|
+
), s = v(() => i.value === "width"), _ = v(() => i.value === "height"), m = Dn(n, a, o, l), { computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f } = Cn(n, a, o, l), k = v(() => y.value ? 1 : (s.value ? m.computedWidth : o).value), x = v(() => f.value ? 1 : (_.value ? m.computedHeight : l).value), A = s.value || _.value ? m.transformOrigin : null;
|
|
687
|
+
return ee(() => $e(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: i, classList: u, root: c, computedClasses: d, shouldTransitionWidth: s, shouldTransitionHeight: _, transitionProps: m, computedX: p, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: f, computedWidth: k, computedHeight: x, transformOrigin: A };
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
|
-
var
|
|
690
|
+
var Rn = function() {
|
|
691
691
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
692
692
|
return r("rect", { ref: "root", staticClass: "lume-bar", class: [
|
|
693
693
|
{
|
|
@@ -704,19 +704,19 @@ var Pn = function() {
|
|
|
704
704
|
}, mouseleave: function(a) {
|
|
705
705
|
return n.emit("mouseleave", a);
|
|
706
706
|
} } });
|
|
707
|
-
},
|
|
707
|
+
}, Pn = [], Bn = /* @__PURE__ */ w(
|
|
708
|
+
Sn,
|
|
708
709
|
Rn,
|
|
709
710
|
Pn,
|
|
710
|
-
Bn,
|
|
711
711
|
!1,
|
|
712
712
|
null,
|
|
713
713
|
"8e8f732a",
|
|
714
714
|
null,
|
|
715
715
|
null
|
|
716
716
|
);
|
|
717
|
-
const Ye =
|
|
718
|
-
function
|
|
719
|
-
const t =
|
|
717
|
+
const Ye = Bn.exports;
|
|
718
|
+
function Fn() {
|
|
719
|
+
const t = I(), e = Oe({
|
|
720
720
|
dimensions: {}
|
|
721
721
|
}), r = new ResizeObserver((n) => {
|
|
722
722
|
n.forEach((a) => {
|
|
@@ -729,7 +729,7 @@ function Gn() {
|
|
|
729
729
|
r.unobserve(t.value);
|
|
730
730
|
}), { resizeState: e, resizeRef: t };
|
|
731
731
|
}
|
|
732
|
-
const
|
|
732
|
+
const Gn = /* @__PURE__ */ H({
|
|
733
733
|
__name: "lume-chart-container",
|
|
734
734
|
props: {
|
|
735
735
|
margins: {
|
|
@@ -751,7 +751,7 @@ const jn = /* @__PURE__ */ C({
|
|
|
751
751
|
},
|
|
752
752
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
753
753
|
setup(t, { emit: e }) {
|
|
754
|
-
const r = t, { margins: n, containerSize: a } = B(r), o =
|
|
754
|
+
const r = t, { margins: n, containerSize: a } = B(r), o = I(null), { resizeRef: l, resizeState: i } = Fn(), u = v(
|
|
755
755
|
() => a.value.height + n.value.top + n.value.bottom
|
|
756
756
|
);
|
|
757
757
|
return xt(() => {
|
|
@@ -770,7 +770,7 @@ const jn = /* @__PURE__ */ C({
|
|
|
770
770
|
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: i, svgHeight: u };
|
|
771
771
|
}
|
|
772
772
|
});
|
|
773
|
-
var
|
|
773
|
+
var jn = function() {
|
|
774
774
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
775
775
|
return r("div", { ref: "resizeRef", staticClass: "lume-chart-container", class: {
|
|
776
776
|
"lume-chart-container--minimum": !e.noMinSize
|
|
@@ -783,22 +783,22 @@ var Vn = function() {
|
|
|
783
783
|
}, mouseleave: function(a) {
|
|
784
784
|
return n.emit("mouseleave", a);
|
|
785
785
|
} } }, [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);
|
|
786
|
-
},
|
|
786
|
+
}, Vn = [], Mn = /* @__PURE__ */ w(
|
|
787
|
+
Gn,
|
|
787
788
|
jn,
|
|
788
789
|
Vn,
|
|
789
|
-
Mn,
|
|
790
790
|
!1,
|
|
791
791
|
null,
|
|
792
792
|
"2c7d0302",
|
|
793
793
|
null,
|
|
794
794
|
null
|
|
795
795
|
);
|
|
796
|
-
const
|
|
796
|
+
const zn = Mn.exports, Wn = /* @__PURE__ */ H({
|
|
797
797
|
__name: "lume-chart-legend",
|
|
798
798
|
props: {
|
|
799
799
|
data: {
|
|
800
800
|
type: Array,
|
|
801
|
-
validator:
|
|
801
|
+
validator: an,
|
|
802
802
|
required: !0
|
|
803
803
|
}
|
|
804
804
|
},
|
|
@@ -807,7 +807,7 @@ const Wn = zn.exports, Zn = /* @__PURE__ */ C({
|
|
|
807
807
|
return { __sfc: !0, emit: e };
|
|
808
808
|
}
|
|
809
809
|
});
|
|
810
|
-
var
|
|
810
|
+
var Zn = function() {
|
|
811
811
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
812
812
|
return r("div", { staticClass: "lume-chart-legend", attrs: { "data-j-chart-legend": "" }, on: { mouseleave: function(a) {
|
|
813
813
|
return n.emit("mouseleave");
|
|
@@ -818,47 +818,47 @@ var Un = function() {
|
|
|
818
818
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
819
819
|
} } }, [r("span", { staticClass: "lume-chart-legend__symbol", class: `lume-background-color--${a.color}`, attrs: { "data-j-chart-legend__symbol": "" } }), e._v(" " + e._s(a.label || o) + " ")]);
|
|
820
820
|
}), 0);
|
|
821
|
-
},
|
|
821
|
+
}, Un = [], Xn = /* @__PURE__ */ w(
|
|
822
|
+
Wn,
|
|
822
823
|
Zn,
|
|
823
824
|
Un,
|
|
824
|
-
Xn,
|
|
825
825
|
!1,
|
|
826
826
|
null,
|
|
827
827
|
"f8ebd3b9",
|
|
828
828
|
null,
|
|
829
829
|
null
|
|
830
830
|
);
|
|
831
|
-
const
|
|
832
|
-
const
|
|
833
|
-
var
|
|
831
|
+
const Yn = Xn.exports;
|
|
832
|
+
const Kn = {};
|
|
833
|
+
var Jn = function() {
|
|
834
834
|
var e = this, r = e._self._c;
|
|
835
835
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
836
|
-
},
|
|
836
|
+
}, Qn = [], qn = /* @__PURE__ */ w(
|
|
837
|
+
Kn,
|
|
837
838
|
Jn,
|
|
838
839
|
Qn,
|
|
839
|
-
qn,
|
|
840
840
|
!1,
|
|
841
841
|
null,
|
|
842
842
|
"8af3fac6",
|
|
843
843
|
null,
|
|
844
844
|
null
|
|
845
845
|
);
|
|
846
|
-
const
|
|
847
|
-
const
|
|
848
|
-
var
|
|
846
|
+
const er = qn.exports;
|
|
847
|
+
const tr = {};
|
|
848
|
+
var nr = function() {
|
|
849
849
|
var e = this, r = e._self._c;
|
|
850
850
|
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)]);
|
|
851
|
-
},
|
|
851
|
+
}, rr = [], ar = /* @__PURE__ */ w(
|
|
852
|
+
tr,
|
|
852
853
|
nr,
|
|
853
854
|
rr,
|
|
854
|
-
ar,
|
|
855
855
|
!1,
|
|
856
856
|
null,
|
|
857
857
|
"4ed7ec1b",
|
|
858
858
|
null,
|
|
859
859
|
null
|
|
860
860
|
);
|
|
861
|
-
const
|
|
861
|
+
const or = ar.exports, lr = /* @__PURE__ */ H({
|
|
862
862
|
__name: "lume-tooltip-item",
|
|
863
863
|
props: {
|
|
864
864
|
color: {
|
|
@@ -870,22 +870,26 @@ const lr = or.exports, ur = /* @__PURE__ */ C({
|
|
|
870
870
|
return { __sfc: !0 };
|
|
871
871
|
}
|
|
872
872
|
});
|
|
873
|
-
var
|
|
873
|
+
var ur = function() {
|
|
874
874
|
var e = this, r = e._self._c;
|
|
875
875
|
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)]);
|
|
876
|
-
},
|
|
876
|
+
}, ir = [], sr = /* @__PURE__ */ w(
|
|
877
|
+
lr,
|
|
877
878
|
ur,
|
|
878
879
|
ir,
|
|
879
|
-
sr,
|
|
880
880
|
!1,
|
|
881
881
|
null,
|
|
882
882
|
"4f995c3c",
|
|
883
883
|
null,
|
|
884
884
|
null
|
|
885
885
|
);
|
|
886
|
-
const
|
|
886
|
+
const cr = sr.exports, dr = /* @__PURE__ */ H({
|
|
887
887
|
__name: "lume-tooltip",
|
|
888
888
|
props: {
|
|
889
|
+
opened: {
|
|
890
|
+
type: Boolean,
|
|
891
|
+
default: !1
|
|
892
|
+
},
|
|
889
893
|
targetElement: {
|
|
890
894
|
type: Element,
|
|
891
895
|
default: null
|
|
@@ -897,7 +901,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ C({
|
|
|
897
901
|
position: {
|
|
898
902
|
type: String,
|
|
899
903
|
default: "auto",
|
|
900
|
-
validator: (t) =>
|
|
904
|
+
validator: (t) => bn.includes(t)
|
|
901
905
|
},
|
|
902
906
|
fixedPositioning: {
|
|
903
907
|
type: Boolean,
|
|
@@ -923,7 +927,7 @@ const dr = cr.exports, vr = /* @__PURE__ */ C({
|
|
|
923
927
|
},
|
|
924
928
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
925
929
|
setup(t, { emit: e }) {
|
|
926
|
-
const r = t, n =
|
|
930
|
+
const r = t, n = I(null), { items: a, options: o } = B(r), l = M(), i = I(null), { allOptions: u } = K(o), c = v(
|
|
927
931
|
() => u.value.fixedPositioning ?? r.fixedPositioning
|
|
928
932
|
), d = v(
|
|
929
933
|
() => c.value ? "fixed" : "absolute"
|
|
@@ -944,38 +948,38 @@ const dr = cr.exports, vr = /* @__PURE__ */ C({
|
|
|
944
948
|
() => u.value.showTitle !== !1 && r.title != null
|
|
945
949
|
), m = v(() => Ae(u.value.valueFormat)), p = v(() => Ae(u.value.titleFormat)), h = v(
|
|
946
950
|
() => {
|
|
947
|
-
var
|
|
948
|
-
return ((
|
|
951
|
+
var E;
|
|
952
|
+
return ((E = a.value) == null ? void 0 : E.find((T) => T.isSummary)) || {
|
|
949
953
|
label: u.value.summary ?? r.summary
|
|
950
954
|
};
|
|
951
955
|
}
|
|
952
956
|
), y = v(() => l.summary || h.value.label), f = v(() => r.inverse || u.value.inverse ? [...a.value].reverse() : a.value);
|
|
953
|
-
function
|
|
954
|
-
r.targetElement && n.value && (i.value =
|
|
957
|
+
function k() {
|
|
958
|
+
r.targetElement && n.value && (i.value = Xt(r.targetElement, n.value, {
|
|
955
959
|
placement: r.position,
|
|
956
960
|
strategy: d.value,
|
|
957
961
|
modifiers: s.value
|
|
958
962
|
}), e("opened", r.targetElement));
|
|
959
963
|
}
|
|
960
964
|
function x() {
|
|
961
|
-
i.value && (i.value.destroy(), e("closed"));
|
|
965
|
+
i.value && (i.value.destroy(), e("closed"), n.value.classList.remove("lume-tooltip--animated"));
|
|
962
966
|
}
|
|
963
967
|
function A() {
|
|
964
968
|
i.value && (u.value.withAnimation !== !1 && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
965
969
|
i.value.state.elements.reference = r.targetElement, i.value.update(), e("moved", r.targetElement);
|
|
966
970
|
}() : x());
|
|
967
971
|
}
|
|
968
|
-
return
|
|
972
|
+
return C(
|
|
969
973
|
() => r.targetElement,
|
|
970
|
-
(
|
|
971
|
-
!T &&
|
|
974
|
+
(E, T) => {
|
|
975
|
+
!T && E ? k() : A();
|
|
972
976
|
}
|
|
973
|
-
), ee(
|
|
977
|
+
), ee(k), kt(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: i, allOptions: u, computedFixedPositioning: c, strategy: d, allModifiers: s, showTitle: _, formatValue: m, formatTitle: p, summaryItem: h, hasSummary: y, computedItems: f, initPopper: k, destroyPopper: x, updatePopper: A, LumeTooltipTitle: er, LumeTooltipSummary: or, LumeTooltipItem: cr };
|
|
974
978
|
}
|
|
975
979
|
});
|
|
976
|
-
var
|
|
980
|
+
var vr = function() {
|
|
977
981
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
978
|
-
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.targetElement, expression: "targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
982
|
+
return r("div", { directives: [{ name: "show", rawName: "v-show", value: e.opened && e.targetElement, expression: "opened && targetElement" }], ref: "root", staticClass: "lume-tooltip lume-typography--caption", class: {
|
|
979
983
|
"lume-tooltip--pointer-events": n.options.withPointerEvents
|
|
980
984
|
}, attrs: { "data-j-tooltip": "" }, on: { mouseenter: function(a) {
|
|
981
985
|
return n.emit("tooltip-mouseenter");
|
|
@@ -998,42 +1002,42 @@ var _r = function() {
|
|
|
998
1002
|
});
|
|
999
1003
|
})], 2)];
|
|
1000
1004
|
})], 2);
|
|
1001
|
-
},
|
|
1005
|
+
}, _r = [], fr = /* @__PURE__ */ w(
|
|
1006
|
+
dr,
|
|
1002
1007
|
vr,
|
|
1003
1008
|
_r,
|
|
1004
|
-
fr,
|
|
1005
1009
|
!1,
|
|
1006
1010
|
null,
|
|
1007
|
-
"
|
|
1011
|
+
"e0426df7",
|
|
1008
1012
|
null,
|
|
1009
1013
|
null
|
|
1010
1014
|
);
|
|
1011
|
-
const
|
|
1015
|
+
const pr = fr.exports;
|
|
1012
1016
|
var re = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(re || {});
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1015
|
-
return t === re.Divergent ?
|
|
1017
|
+
const mr = re.Categorical, he = z.Skyblue, hr = Ze.SkyTeal;
|
|
1018
|
+
function gr(t) {
|
|
1019
|
+
return t === re.Divergent ? hr : he;
|
|
1016
1020
|
}
|
|
1017
|
-
function
|
|
1021
|
+
function yr(t) {
|
|
1018
1022
|
return Object.values(Xe).includes(t);
|
|
1019
1023
|
}
|
|
1020
1024
|
function at(t, e) {
|
|
1021
1025
|
return e === re.Divergent ? Object.values(Ze).includes(t) : Object.values({
|
|
1022
1026
|
...z,
|
|
1023
|
-
|
|
1027
|
+
...$t,
|
|
1024
1028
|
...Ue,
|
|
1025
1029
|
...Xe
|
|
1026
1030
|
}).includes(t);
|
|
1027
1031
|
}
|
|
1028
|
-
function
|
|
1032
|
+
function br(t, e) {
|
|
1029
1033
|
const r = Object.values(z).indexOf(t);
|
|
1030
|
-
return
|
|
1034
|
+
return vn(Object.values(z), r > -1 ? r : 0)[e];
|
|
1031
1035
|
}
|
|
1032
|
-
function
|
|
1036
|
+
function kr(t, e) {
|
|
1033
1037
|
const r = 50 + e * 10;
|
|
1034
1038
|
return `${t}-${r}`;
|
|
1035
1039
|
}
|
|
1036
|
-
function
|
|
1040
|
+
function xr(t, e) {
|
|
1037
1041
|
const r = (e + 1) * 10;
|
|
1038
1042
|
return `${t}-${r}`;
|
|
1039
1043
|
}
|
|
@@ -1041,20 +1045,20 @@ function ot(t, e, r) {
|
|
|
1041
1045
|
switch (e) {
|
|
1042
1046
|
default:
|
|
1043
1047
|
case re.Categorical:
|
|
1044
|
-
return
|
|
1048
|
+
return yr(t) ? t : br(t, r);
|
|
1045
1049
|
case re.Sequential:
|
|
1046
|
-
return
|
|
1050
|
+
return kr(t, r);
|
|
1047
1051
|
case re.Divergent:
|
|
1048
|
-
return
|
|
1052
|
+
return xr(t, r);
|
|
1049
1053
|
}
|
|
1050
1054
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(
|
|
1055
|
+
function Ar(t, e, r = mr, n) {
|
|
1056
|
+
return at(t, r) ? t : (n > 4 && (q(Y.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(gr(r), r, n));
|
|
1053
1057
|
}
|
|
1054
|
-
function
|
|
1055
|
-
return t.map((e) =>
|
|
1058
|
+
function Tr(t) {
|
|
1059
|
+
return t.map((e) => on(e) ? e : { value: e });
|
|
1056
1060
|
}
|
|
1057
|
-
function
|
|
1061
|
+
function Lr(t) {
|
|
1058
1062
|
return t.__internal === !0;
|
|
1059
1063
|
}
|
|
1060
1064
|
const Ke = (t = null) => ({
|
|
@@ -1080,13 +1084,13 @@ function Je(t, e, r, n, a) {
|
|
|
1080
1084
|
const o = Oe({
|
|
1081
1085
|
width: 0,
|
|
1082
1086
|
height: 0
|
|
1083
|
-
}), l =
|
|
1087
|
+
}), l = fn(12), i = v(() => {
|
|
1084
1088
|
var d;
|
|
1085
1089
|
return t.value.length > 5 && q(Y.DatasetLength), (d = t.value) == null ? void 0 : d.map(
|
|
1086
1090
|
(s, _) => {
|
|
1087
|
-
if (
|
|
1091
|
+
if (Lr(s))
|
|
1088
1092
|
return s;
|
|
1089
|
-
const m =
|
|
1093
|
+
const m = Tr(s.values), p = Ar(
|
|
1090
1094
|
s.color,
|
|
1091
1095
|
r == null ? void 0 : r.value,
|
|
1092
1096
|
n == null ? void 0 : n.value.colorPalette,
|
|
@@ -1113,7 +1117,7 @@ function Je(t, e, r, n, a) {
|
|
|
1113
1117
|
updateSize: c
|
|
1114
1118
|
};
|
|
1115
1119
|
}
|
|
1116
|
-
const
|
|
1120
|
+
const Or = () => ({
|
|
1117
1121
|
xScale: {
|
|
1118
1122
|
type: Function,
|
|
1119
1123
|
default: null
|
|
@@ -1124,7 +1128,7 @@ const Ir = () => ({
|
|
|
1124
1128
|
}
|
|
1125
1129
|
});
|
|
1126
1130
|
function $r(t, e, r, n, a) {
|
|
1127
|
-
const o =
|
|
1131
|
+
const o = I(null), l = I(null);
|
|
1128
1132
|
function i() {
|
|
1129
1133
|
var d, s, _, m;
|
|
1130
1134
|
const { width: u, height: c } = r;
|
|
@@ -1183,9 +1187,9 @@ function st(t, e, {
|
|
|
1183
1187
|
function Ct(t) {
|
|
1184
1188
|
return Object.values(L).includes(t);
|
|
1185
1189
|
}
|
|
1186
|
-
const
|
|
1190
|
+
const ce = (t, e = !0) => ({
|
|
1187
1191
|
...Ke(t),
|
|
1188
|
-
...
|
|
1192
|
+
...Or(),
|
|
1189
1193
|
...pe(),
|
|
1190
1194
|
classList: {
|
|
1191
1195
|
type: [String, Array],
|
|
@@ -1202,14 +1206,14 @@ const de = (t, e = !0) => ({
|
|
|
1202
1206
|
validator: Ct
|
|
1203
1207
|
}
|
|
1204
1208
|
} : {}
|
|
1205
|
-
}),
|
|
1209
|
+
}), Ir = (t) => ({
|
|
1206
1210
|
...Ke(t),
|
|
1207
1211
|
...pe(),
|
|
1208
1212
|
hoveredElement: {
|
|
1209
1213
|
type: [Number, String],
|
|
1210
1214
|
default: null
|
|
1211
1215
|
}
|
|
1212
|
-
}),
|
|
1216
|
+
}), Ie = () => ({
|
|
1213
1217
|
data: {
|
|
1214
1218
|
type: Array,
|
|
1215
1219
|
required: !0
|
|
@@ -1251,10 +1255,10 @@ const de = (t, e = !0) => ({
|
|
|
1251
1255
|
type: [String, Array],
|
|
1252
1256
|
default: () => []
|
|
1253
1257
|
}
|
|
1254
|
-
}),
|
|
1258
|
+
}), Er = /* @__PURE__ */ H({
|
|
1255
1259
|
__name: "lume-overlay-group",
|
|
1256
1260
|
props: {
|
|
1257
|
-
|
|
1261
|
+
...Ie(),
|
|
1258
1262
|
orientation: {
|
|
1259
1263
|
type: String,
|
|
1260
1264
|
default: L.VERTICAL
|
|
@@ -1265,7 +1269,7 @@ const de = (t, e = !0) => ({
|
|
|
1265
1269
|
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = B(r), i = v(() => Ot(n));
|
|
1266
1270
|
function u(c) {
|
|
1267
1271
|
var y;
|
|
1268
|
-
const d = a.value === L.HORIZONTAL ? l.value : o.value, s = d.domain(), _ =
|
|
1272
|
+
const d = a.value === L.HORIZONTAL ? l.value : o.value, s = d.domain(), _ = ln(d), m = ((y = d.paddingInner) == null ? void 0 : y.call(d)) ?? 0, p = _ * m, h = X(d) ? d(s[c]) - p / 2 : d(c) - _ / 2;
|
|
1269
1273
|
return a.value === L.HORIZONTAL ? {
|
|
1270
1274
|
width: Math.max(...o.value.range()),
|
|
1271
1275
|
height: _,
|
|
@@ -1279,7 +1283,7 @@ const de = (t, e = !0) => ({
|
|
|
1279
1283
|
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: i, getOverlayBarAttributes: u, LumeBar: Ye };
|
|
1280
1284
|
}
|
|
1281
1285
|
});
|
|
1282
|
-
var
|
|
1286
|
+
var wr = function() {
|
|
1283
1287
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1284
1288
|
return r("g", { staticClass: "lume-overlay-group" }, e._l(n.overlayData, function(a, o) {
|
|
1285
1289
|
return r(n.LumeBar, e._b({ key: `overlay-${o}`, attrs: { "data-j-lume-overlay-group": o, transition: !1, "class-list": "lume-fill--transparent" }, on: { mouseover: function(l) {
|
|
@@ -1288,17 +1292,17 @@ var Nr = function() {
|
|
|
1288
1292
|
return n.emit("click", { index: o, event: l });
|
|
1289
1293
|
} } }, "lume-bar", n.getOverlayBarAttributes(o), !1));
|
|
1290
1294
|
}), 1);
|
|
1291
|
-
},
|
|
1295
|
+
}, Nr = [], Hr = /* @__PURE__ */ w(
|
|
1296
|
+
Er,
|
|
1292
1297
|
wr,
|
|
1293
1298
|
Nr,
|
|
1294
|
-
Hr,
|
|
1295
1299
|
!1,
|
|
1296
1300
|
null,
|
|
1297
1301
|
null,
|
|
1298
1302
|
null,
|
|
1299
1303
|
null
|
|
1300
1304
|
);
|
|
1301
|
-
const
|
|
1305
|
+
const Cr = Hr.exports, Dr = [
|
|
1302
1306
|
"axis-click",
|
|
1303
1307
|
"axis-mouseenter",
|
|
1304
1308
|
"axis-mouseleave",
|
|
@@ -1324,7 +1328,8 @@ const Dr = Cr.exports, Sr = [
|
|
|
1324
1328
|
"tooltip-opened",
|
|
1325
1329
|
"tooltip-moved",
|
|
1326
1330
|
"tooltip-closed",
|
|
1327
|
-
"hovered-index-changed"
|
|
1331
|
+
"hovered-index-changed",
|
|
1332
|
+
"update:hoveredIndex"
|
|
1328
1333
|
], J = (t, e) => {
|
|
1329
1334
|
function r(o, ...l) {
|
|
1330
1335
|
document.dispatchEvent(
|
|
@@ -1339,14 +1344,14 @@ const Dr = Cr.exports, Sr = [
|
|
|
1339
1344
|
(i) => l(...i.detail)
|
|
1340
1345
|
);
|
|
1341
1346
|
}
|
|
1342
|
-
return { componentEventPropagator:
|
|
1347
|
+
return { componentEventPropagator: Dr.reduce((o, l) => (o[l] = (i) => t(l, i), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1343
1348
|
};
|
|
1344
|
-
function
|
|
1349
|
+
function Sr(t) {
|
|
1345
1350
|
return { hasNegativeValues: v(
|
|
1346
1351
|
() => Tt(t.value).some((r) => r < 0)
|
|
1347
1352
|
) };
|
|
1348
1353
|
}
|
|
1349
|
-
function
|
|
1354
|
+
function Rr(t, e, r, n) {
|
|
1350
1355
|
const a = v(
|
|
1351
1356
|
() => n.value === L.HORIZONTAL
|
|
1352
1357
|
), o = v(
|
|
@@ -1371,12 +1376,12 @@ function Pr(t, e, r, n) {
|
|
|
1371
1376
|
transform: i.value
|
|
1372
1377
|
})) };
|
|
1373
1378
|
}
|
|
1374
|
-
function
|
|
1379
|
+
function Pr(t, e) {
|
|
1375
1380
|
return t.reduce((r, n) => We(n.values, e).map(
|
|
1376
1381
|
(a, o) => r[o] ? a.value > r[o] ? a.value : r[o] : a.value ?? 0
|
|
1377
1382
|
), []);
|
|
1378
1383
|
}
|
|
1379
|
-
function
|
|
1384
|
+
function Br(t, e) {
|
|
1380
1385
|
return t.reduce((r, n) => We(n.values, e).map(
|
|
1381
1386
|
(a, o) => {
|
|
1382
1387
|
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
@@ -1385,7 +1390,7 @@ function Fr(t, e) {
|
|
|
1385
1390
|
), []);
|
|
1386
1391
|
}
|
|
1387
1392
|
const ct = {
|
|
1388
|
-
"stacked-bar":
|
|
1393
|
+
"stacked-bar": Br
|
|
1389
1394
|
};
|
|
1390
1395
|
function Dt(t, e, r, n, a, o, l, i) {
|
|
1391
1396
|
const u = v(
|
|
@@ -1399,13 +1404,13 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1399
1404
|
const s = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, _ = i != null && i.value && ct[i.value] ? ct[i.value](
|
|
1400
1405
|
d,
|
|
1401
1406
|
s
|
|
1402
|
-
) :
|
|
1407
|
+
) : Pr(d, s);
|
|
1403
1408
|
t.value = _.map((p, h) => ({
|
|
1404
1409
|
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(p) : Se(r.value, h),
|
|
1405
1410
|
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Se(n.value, h) : n.value(p)
|
|
1406
1411
|
}));
|
|
1407
1412
|
}
|
|
1408
|
-
return
|
|
1413
|
+
return C(
|
|
1409
1414
|
[r, n],
|
|
1410
1415
|
() => {
|
|
1411
1416
|
r.value && n.value && (l != null && l.value) && u.value && c(l.value);
|
|
@@ -1413,7 +1418,7 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1413
1418
|
{ immediate: !0 }
|
|
1414
1419
|
), { shouldGenerateTooltipAnchors: u, updateTooltipAnchorAttributes: c };
|
|
1415
1420
|
}
|
|
1416
|
-
function
|
|
1421
|
+
function Fr() {
|
|
1417
1422
|
const t = Oe({
|
|
1418
1423
|
opened: !1,
|
|
1419
1424
|
targetElement: null
|
|
@@ -1424,14 +1429,14 @@ function Gr() {
|
|
|
1424
1429
|
t.opened = !1, t.targetElement = null;
|
|
1425
1430
|
} };
|
|
1426
1431
|
}
|
|
1427
|
-
function
|
|
1432
|
+
function Gr(t) {
|
|
1428
1433
|
return { getTooltipItems: v(
|
|
1429
1434
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1430
1435
|
var l, i, u;
|
|
1431
1436
|
return {
|
|
1432
1437
|
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1433
1438
|
label: a,
|
|
1434
|
-
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ??
|
|
1439
|
+
value: ((i = o[r]) == null ? void 0 : i.label) ?? ((u = o[r]) == null ? void 0 : u.value) ?? It
|
|
1435
1440
|
};
|
|
1436
1441
|
})
|
|
1437
1442
|
) };
|
|
@@ -1450,45 +1455,45 @@ const Re = 16, Pe = 8, Be = 28, Fe = 24, ae = {
|
|
|
1450
1455
|
left: Fe
|
|
1451
1456
|
}
|
|
1452
1457
|
};
|
|
1453
|
-
function
|
|
1458
|
+
function jr(t) {
|
|
1454
1459
|
return !t || t === "auto" || t.top == null || t.top === "auto" ? Re : t.top;
|
|
1455
1460
|
}
|
|
1456
|
-
function
|
|
1461
|
+
function Vr(t) {
|
|
1457
1462
|
return !t || t === "auto" || t.right == null || t.right === "auto" ? Pe : t.right;
|
|
1458
1463
|
}
|
|
1459
|
-
function
|
|
1464
|
+
function Mr(t, e) {
|
|
1460
1465
|
return !t || t === "auto" || t.bottom == null || t.bottom === "auto" ? e || Be : t.bottom;
|
|
1461
1466
|
}
|
|
1462
|
-
function
|
|
1467
|
+
function zr(t, e) {
|
|
1463
1468
|
return !t || t === "auto" || t.left == null || t.left === "auto" ? e || Fe : t.left;
|
|
1464
1469
|
}
|
|
1465
|
-
const
|
|
1470
|
+
const Wr = /* @__PURE__ */ H({
|
|
1466
1471
|
__name: "lume-chart",
|
|
1467
1472
|
props: {
|
|
1468
|
-
...
|
|
1473
|
+
...ce(),
|
|
1469
1474
|
chartType: {
|
|
1470
1475
|
type: String,
|
|
1471
1476
|
default: null
|
|
1472
1477
|
}
|
|
1473
1478
|
},
|
|
1474
1479
|
setup(t, { emit: e }) {
|
|
1475
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d =
|
|
1476
|
-
|
|
1480
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: i, orientation: u, chartType: c } = B(r), d = I(-1), s = I(null), _ = I(null), m = I([]), p = I(null), h = I(0), y = I(0), { allOptions: f } = K(i), { internalData: k, computedLabels: x, containerSize: A, updateSize: E, chartID: T } = Je(a, o, l, f, u), { listenInternalEvent: D } = J(e, T), { xScale: S, yScale: R } = $r(
|
|
1481
|
+
k,
|
|
1477
1482
|
x,
|
|
1478
1483
|
A,
|
|
1479
1484
|
u,
|
|
1480
1485
|
f
|
|
1481
1486
|
), G = v(() => ({
|
|
1482
|
-
top:
|
|
1483
|
-
right:
|
|
1484
|
-
bottom:
|
|
1485
|
-
left:
|
|
1487
|
+
top: jr(f.value.margins),
|
|
1488
|
+
right: Vr(f.value.margins),
|
|
1489
|
+
bottom: Mr(f.value.margins, h.value),
|
|
1490
|
+
left: zr(f.value.margins, y.value)
|
|
1486
1491
|
})), j = v(() => {
|
|
1487
|
-
var
|
|
1488
|
-
return r.xScale ? it(r.xScale) ? r.xScale : (
|
|
1492
|
+
var b;
|
|
1493
|
+
return r.xScale ? it(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, A) : S.value;
|
|
1489
1494
|
}), W = v(() => {
|
|
1490
|
-
var
|
|
1491
|
-
return r.yScale ? it(r.yScale) ? r.yScale : (
|
|
1495
|
+
var b;
|
|
1496
|
+
return r.yScale ? it(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, A) : R.value;
|
|
1492
1497
|
}), te = v(() => ({
|
|
1493
1498
|
...f.value.xAxisOptions,
|
|
1494
1499
|
withHover: u.value === L.VERTICAL
|
|
@@ -1496,23 +1501,23 @@ const Zr = /* @__PURE__ */ C({
|
|
|
1496
1501
|
...f.value.yAxisOptions,
|
|
1497
1502
|
withHover: u.value === L.HORIZONTAL
|
|
1498
1503
|
})), ne = v(() => {
|
|
1499
|
-
var
|
|
1500
|
-
return (
|
|
1501
|
-
}),
|
|
1502
|
-
var
|
|
1503
|
-
return (
|
|
1504
|
+
var b;
|
|
1505
|
+
return (b = f.value.xAxisOptions) == null ? void 0 : b.title;
|
|
1506
|
+
}), $ = v(() => {
|
|
1507
|
+
var b;
|
|
1508
|
+
return (b = f.value.yAxisOptions) == null ? void 0 : b.title;
|
|
1504
1509
|
}), g = v(() => {
|
|
1505
|
-
var
|
|
1506
|
-
return ((
|
|
1510
|
+
var b;
|
|
1511
|
+
return ((b = f.value.xAxisOptions) == null ? void 0 : b.withTitle) !== !1 && ne.value;
|
|
1507
1512
|
}), O = v(() => {
|
|
1508
|
-
var
|
|
1509
|
-
return ((
|
|
1510
|
-
}),
|
|
1511
|
-
() => a.value.every((
|
|
1513
|
+
var b;
|
|
1514
|
+
return ((b = f.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && $.value;
|
|
1515
|
+
}), N = v(
|
|
1516
|
+
() => a.value.every((b) => !b.values.length)
|
|
1512
1517
|
), Z = v(() => {
|
|
1513
|
-
const
|
|
1514
|
-
return !P && !
|
|
1515
|
-
}), { hasNegativeValues: U } =
|
|
1518
|
+
const b = [], { noBaseScales: P } = f.value;
|
|
1519
|
+
return !P && !N.value && b.push(() => !!(j.value && W.value)), b.every((V) => V() === !0);
|
|
1520
|
+
}), { hasNegativeValues: U } = Sr(k), { negativeBarAttributes: F } = Rr(
|
|
1516
1521
|
A,
|
|
1517
1522
|
j,
|
|
1518
1523
|
W,
|
|
@@ -1524,74 +1529,72 @@ const Zr = /* @__PURE__ */ C({
|
|
|
1524
1529
|
W,
|
|
1525
1530
|
o,
|
|
1526
1531
|
u,
|
|
1527
|
-
|
|
1532
|
+
k,
|
|
1528
1533
|
c
|
|
1529
|
-
), { tooltipConfig:
|
|
1530
|
-
() => f.value.withTooltip !== !1 && le.opened
|
|
1531
|
-
), Ft = v(
|
|
1534
|
+
), { tooltipConfig: ve, showTooltip: ge, hideTooltip: le } = Fr(), { getTooltipItems: ye } = Gr(k), ue = v(
|
|
1532
1535
|
() => {
|
|
1533
|
-
var
|
|
1534
|
-
return ((
|
|
1536
|
+
var b;
|
|
1537
|
+
return ((b = f.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1535
1538
|
}
|
|
1536
1539
|
), et = v(() => {
|
|
1537
1540
|
var P;
|
|
1538
|
-
const
|
|
1539
|
-
return
|
|
1541
|
+
const b = (P = f.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1542
|
+
return ve.opened && (!b || b && p.value === !1);
|
|
1540
1543
|
});
|
|
1541
|
-
function be(
|
|
1544
|
+
function be(b) {
|
|
1542
1545
|
var V;
|
|
1543
|
-
if (
|
|
1546
|
+
if (b === d.value)
|
|
1544
1547
|
return;
|
|
1545
1548
|
const P = d.value;
|
|
1546
|
-
if (f.value.withHover !== !1 && (d.value =
|
|
1547
|
-
const
|
|
1548
|
-
ge(
|
|
1549
|
+
if (f.value.withHover !== !1 && (d.value = b), f.value.withTooltip !== !1) {
|
|
1550
|
+
const Vt = (V = f.value.tooltipOptions) != null && V.targetElement ? f.value.tooltipOptions.targetElement === "self" ? _.value.$el : f.value.tooltipOptions.targetElement : s.value[b];
|
|
1551
|
+
ge(Vt);
|
|
1549
1552
|
}
|
|
1550
|
-
e("hovered-index-changed", { newIndex:
|
|
1553
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
1551
1554
|
}
|
|
1552
1555
|
function ke() {
|
|
1553
|
-
|
|
1556
|
+
le(), d.value = -1, e("update:hoveredIndex", -1);
|
|
1554
1557
|
}
|
|
1555
|
-
function Ee(
|
|
1558
|
+
function Ee(b) {
|
|
1556
1559
|
if (!a.value.some(
|
|
1557
|
-
({ values: V }) =>
|
|
1560
|
+
({ values: V }) => b <= V.length - 1
|
|
1558
1561
|
)) {
|
|
1559
1562
|
q(Y.InvalidHoveredIndex);
|
|
1560
1563
|
return;
|
|
1561
1564
|
}
|
|
1562
|
-
|
|
1565
|
+
b == null || b === -1 ? ke() : be(b);
|
|
1563
1566
|
}
|
|
1564
|
-
function
|
|
1567
|
+
function Ft() {
|
|
1565
1568
|
setTimeout(() => {
|
|
1566
1569
|
et.value && ke(), e("chart-mouseleave");
|
|
1567
1570
|
}, 0);
|
|
1568
1571
|
}
|
|
1569
|
-
function
|
|
1570
|
-
|
|
1572
|
+
function Gt({ index: b, value: P, event: V }) {
|
|
1573
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: V });
|
|
1571
1574
|
}
|
|
1572
|
-
function
|
|
1573
|
-
e("axis-click", { index:
|
|
1575
|
+
function jt({ index: b, value: P, event: V }) {
|
|
1576
|
+
e("axis-click", { index: b, value: P, event: V });
|
|
1574
1577
|
}
|
|
1575
|
-
return
|
|
1578
|
+
return C(
|
|
1576
1579
|
a,
|
|
1577
|
-
(
|
|
1578
|
-
),
|
|
1580
|
+
(b, P) => e("data-changed", { newValue: b, oldValue: P })
|
|
1581
|
+
), C(
|
|
1579
1582
|
o,
|
|
1580
|
-
(
|
|
1581
|
-
),
|
|
1583
|
+
(b, P) => e("labels-changed", { newValue: b, oldValue: P })
|
|
1584
|
+
), C(N, (b) => b && q(Y.Empty), { immediate: !0 }), C(() => r.hoveredIndex, Ee), C(
|
|
1582
1585
|
m,
|
|
1583
|
-
(
|
|
1584
|
-
|
|
1586
|
+
(b) => {
|
|
1587
|
+
b && r.hoveredIndex != null && d.value === -1 && Ee(r.hoveredIndex);
|
|
1585
1588
|
},
|
|
1586
1589
|
{ flush: "post" }
|
|
1587
|
-
),
|
|
1588
|
-
|
|
1590
|
+
), C(p, (b) => {
|
|
1591
|
+
b === !1 && ve.opened && ke();
|
|
1589
1592
|
}), ee(async () => {
|
|
1590
1593
|
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), D("lume__internal--hover", be);
|
|
1591
|
-
}), we("chartID", T), we("isEmpty",
|
|
1594
|
+
}), we("chartID", T), we("isEmpty", N), we("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: i, orientation: u, chartType: c, internalHoveredIndex: d, tooltipAnchor: s, chartContainer: _, tooltipAnchorAttributes: m, isHoveringTooltip: p, xAxisHeight: h, yAxisWidth: y, allOptions: f, internalData: k, computedLabels: x, containerSize: A, updateSize: E, chartID: T, listenInternalEvent: D, xScale: S, yScale: R, computedMargins: G, computedXScale: j, computedYScale: W, computedXAxisOptions: te, computedYAxisOptions: Q, xAxisTitle: ne, yAxisTitle: $, showXAxisTitle: g, showYAxisTitle: O, isEmpty: N, isReady: Z, hasNegativeValues: U, negativeBarAttributes: F, shouldGenerateTooltipAnchors: qe, tooltipConfig: ve, showTooltip: ge, hideTooltip: le, getTooltipItems: ye, tooltipPosition: ue, shouldHideTooltip: et, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: Ee, handleMouseleave: Ft, handleAxisMouseenter: Gt, handleAxisClick: jt, LumeAxis: Hn, LumeBar: Ye, LumeChartContainer: zn, LumeChartLegend: Yn, LumeTooltip: pr, LumeOverlayGroup: Cr, TOOLTIP_ANCHOR_RADIUS: yn };
|
|
1592
1595
|
}
|
|
1593
1596
|
});
|
|
1594
|
-
var
|
|
1597
|
+
var Zr = function() {
|
|
1595
1598
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1596
1599
|
return r(n.LumeChartContainer, { ref: "chartContainer", attrs: { id: `lume-chart_${n.chartID}`, margins: n.computedMargins, "container-size": n.containerSize, "no-min-size": n.allOptions.noMinSize, "transparent-background": n.allOptions.transparentBackground, "data-j-lume-chart": "" }, on: { resize: n.updateSize, click: function(a) {
|
|
1597
1600
|
return n.emit("chart-click", a);
|
|
@@ -1617,7 +1620,7 @@ var Ur = function() {
|
|
|
1617
1620
|
} } }) : e._e()];
|
|
1618
1621
|
}, proxy: !0 }, { key: "extra", fn: function() {
|
|
1619
1622
|
return [e._t("tooltip", function() {
|
|
1620
|
-
return [n.
|
|
1623
|
+
return [n.allOptions.withTooltip !== !1 ? r(n.LumeTooltip, e._b({ attrs: { position: n.tooltipPosition, title: n.computedLabels[n.internalHoveredIndex], items: n.getTooltipItems(n.internalHoveredIndex), options: n.allOptions.tooltipOptions, "data-j-lume-chart__tooltip": "" }, on: { opened: function(a) {
|
|
1621
1624
|
return n.emit("tooltip-opened", {
|
|
1622
1625
|
index: n.internalHoveredIndex,
|
|
1623
1626
|
targetElement: a
|
|
@@ -1648,17 +1651,17 @@ var Ur = function() {
|
|
|
1648
1651
|
}, { xScale: n.computedXScale, yScale: n.computedYScale, containerSize: n.containerSize, options: n.allOptions, hoveredIndex: n.internalHoveredIndex }) : e._e(), n.allOptions.withHover !== !1 ? r(n.LumeOverlayGroup, { attrs: { data: n.internalData, orientation: n.orientation, "x-scale": n.computedXScale, "y-scale": n.computedYScale, "data-j-lume-chart__overlay-group": "" }, on: { "lume__internal--hover": n.handleInternalHover } }) : e._e(), n.shouldGenerateTooltipAnchors ? r("g", e._l(n.tooltipAnchorAttributes, function(a, o) {
|
|
1649
1652
|
return r("circle", e._b({ key: `anchor_${o}`, ref: "tooltipAnchor", refInFor: !0, staticClass: "lume-fill--transparent", attrs: { r: n.TOOLTIP_ANCHOR_RADIUS } }, "circle", a, !1));
|
|
1650
1653
|
}), 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);
|
|
1651
|
-
},
|
|
1654
|
+
}, Ur = [], Xr = /* @__PURE__ */ w(
|
|
1655
|
+
Wr,
|
|
1652
1656
|
Zr,
|
|
1653
1657
|
Ur,
|
|
1654
|
-
Xr,
|
|
1655
1658
|
!1,
|
|
1656
1659
|
null,
|
|
1657
|
-
"
|
|
1660
|
+
"14e6a8a3",
|
|
1658
1661
|
null,
|
|
1659
1662
|
null
|
|
1660
1663
|
);
|
|
1661
|
-
const
|
|
1664
|
+
const de = Xr.exports, dt = 8, Yr = 8, Kr = 20, se = 2, vt = 2, Jr = /* @__PURE__ */ H({
|
|
1662
1665
|
__name: "lume-alluvial-node-label",
|
|
1663
1666
|
props: {
|
|
1664
1667
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1667,8 +1670,8 @@ const ve = Yr.exports, dt = 8, Kr = 8, Jr = 20, ce = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1667
1670
|
},
|
|
1668
1671
|
emits: ["lume__internal--node-resize"],
|
|
1669
1672
|
setup(t, { emit: e }) {
|
|
1670
|
-
const r = t, n =
|
|
1671
|
-
return
|
|
1673
|
+
const r = t, n = I(null), a = I(r.maxWidth), o = I(1);
|
|
1674
|
+
return C(
|
|
1672
1675
|
[n, () => r.maxWidth],
|
|
1673
1676
|
async ([l, i]) => {
|
|
1674
1677
|
if (l && i) {
|
|
@@ -1678,25 +1681,25 @@ const ve = Yr.exports, dt = 8, Kr = 8, Jr = 20, ce = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1678
1681
|
}
|
|
1679
1682
|
},
|
|
1680
1683
|
{ immediate: !0 }
|
|
1681
|
-
),
|
|
1684
|
+
), C(a, async (l) => {
|
|
1682
1685
|
l !== r.maxWidth && (await tt(), e("lume__internal--node-resize"));
|
|
1683
1686
|
}), { __sfc: !0, props: r, emit: e, text: n, foreignObjectWidth: a, foreignObjectHeight: o };
|
|
1684
1687
|
}
|
|
1685
1688
|
});
|
|
1686
|
-
var
|
|
1689
|
+
var Qr = function() {
|
|
1687
1690
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1688
1691
|
return e.maxWidth ? r("foreignObject", { staticClass: "lume-alluvial-group__node-foreign", attrs: { y: e.bottom ? "0.1em" : -n.foreignObjectHeight + 1, x: e.left ? -n.foreignObjectWidth : 0, width: n.foreignObjectWidth, height: n.foreignObjectHeight } }, [r("div", { staticClass: "lume-alluvial-group__label-wrapper" }, [r("span", { ref: "text", staticClass: "lume-alluvial-group__node-label" }, [e._t("default")], 2)])]) : r("text", { staticClass: "lume-alluvial-group__node-label", attrs: { dy: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1689
|
-
},
|
|
1692
|
+
}, qr = [], ea = /* @__PURE__ */ w(
|
|
1693
|
+
Jr,
|
|
1690
1694
|
Qr,
|
|
1691
1695
|
qr,
|
|
1692
|
-
ea,
|
|
1693
1696
|
!1,
|
|
1694
1697
|
null,
|
|
1695
1698
|
"7126dfdb",
|
|
1696
1699
|
null,
|
|
1697
1700
|
null
|
|
1698
1701
|
);
|
|
1699
|
-
const
|
|
1702
|
+
const ta = ea.exports, na = /* @__PURE__ */ H({
|
|
1700
1703
|
__name: "lume-alluvial-node-value",
|
|
1701
1704
|
props: {
|
|
1702
1705
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1705,20 +1708,48 @@ const na = ta.exports, ra = /* @__PURE__ */ C({
|
|
|
1705
1708
|
return { __sfc: !0 };
|
|
1706
1709
|
}
|
|
1707
1710
|
});
|
|
1708
|
-
var
|
|
1711
|
+
var ra = function() {
|
|
1709
1712
|
var e = this, r = e._self._c;
|
|
1710
1713
|
return e._self._setupProxy, r("text", { staticClass: "lume-alluvial-group__node-value", attrs: { y: e.bottom ? ".2em" : "-.2em", "dominant-baseline": e.bottom ? "hanging" : "auto" } }, [e._t("default")], 2);
|
|
1711
|
-
},
|
|
1714
|
+
}, aa = [], oa = /* @__PURE__ */ w(
|
|
1715
|
+
na,
|
|
1712
1716
|
ra,
|
|
1713
1717
|
aa,
|
|
1714
|
-
oa,
|
|
1715
1718
|
!1,
|
|
1716
1719
|
null,
|
|
1717
1720
|
"b4fc758b",
|
|
1718
1721
|
null,
|
|
1719
1722
|
null
|
|
1720
1723
|
);
|
|
1721
|
-
const
|
|
1724
|
+
const la = oa.exports, ua = /* @__PURE__ */ H({
|
|
1725
|
+
__name: "lume-alluvial-node-header",
|
|
1726
|
+
props: {
|
|
1727
|
+
x: { type: Number, required: !0 },
|
|
1728
|
+
y: { type: Number, required: !0 }
|
|
1729
|
+
},
|
|
1730
|
+
setup(t) {
|
|
1731
|
+
const e = I(null), r = v(
|
|
1732
|
+
() => e.value && `translate(${-e.value.getBBox().width / 2}, 0)`
|
|
1733
|
+
), n = v(
|
|
1734
|
+
() => e.value && `translate(${e.value.getBBox().width / 2}, 0)`
|
|
1735
|
+
);
|
|
1736
|
+
return { __sfc: !0, textRef: e, beforeTransform: r, afterTransform: n };
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
var ia = function() {
|
|
1740
|
+
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1741
|
+
return r("g", { attrs: { transform: `translate(${e.x}, ${e.y})` } }, [r("g", { attrs: { transform: n.beforeTransform } }, [e._t("before")], 2), r("text", { ref: "textRef", staticClass: "lume-alluvial-group__node-header lume-typography--caption" }, [e._t("default")], 2), r("g", { attrs: { transform: n.afterTransform } }, [e._t("after")], 2)]);
|
|
1742
|
+
}, sa = [], ca = /* @__PURE__ */ w(
|
|
1743
|
+
ua,
|
|
1744
|
+
ia,
|
|
1745
|
+
sa,
|
|
1746
|
+
!1,
|
|
1747
|
+
null,
|
|
1748
|
+
"0e483453",
|
|
1749
|
+
null,
|
|
1750
|
+
null
|
|
1751
|
+
);
|
|
1752
|
+
const da = ca.exports;
|
|
1722
1753
|
function _t(t, e) {
|
|
1723
1754
|
return {
|
|
1724
1755
|
x0: 0 + (e ? e.left : 0),
|
|
@@ -1727,32 +1758,32 @@ function _t(t, e) {
|
|
|
1727
1758
|
y1: t.height - (e ? e.bottom : 0)
|
|
1728
1759
|
};
|
|
1729
1760
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const e =
|
|
1761
|
+
function va(t) {
|
|
1762
|
+
const e = I(_t(t));
|
|
1732
1763
|
function r(n) {
|
|
1733
1764
|
e.value = _t(t, n);
|
|
1734
1765
|
}
|
|
1735
1766
|
return { extents: e, updateExtents: r };
|
|
1736
1767
|
}
|
|
1737
1768
|
var Te = /* @__PURE__ */ ((t) => (t.GraphProblem = "There was an issue generating your alluvial graph.", t.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", t.BarScaleNull = "Bar linear scale cannot be `null`", t))(Te || {});
|
|
1738
|
-
const
|
|
1769
|
+
const _a = "[lume] ";
|
|
1739
1770
|
function Ge(t, e, r = !0) {
|
|
1740
|
-
r && At() || console.error(
|
|
1771
|
+
r && At() || console.error(_a + "Error: " + t, e);
|
|
1741
1772
|
}
|
|
1742
|
-
const
|
|
1743
|
-
function
|
|
1773
|
+
const fa = 200;
|
|
1774
|
+
function ie(t) {
|
|
1744
1775
|
return typeof t == "string" || typeof t == "number" ? t : t.id ?? t.label;
|
|
1745
1776
|
}
|
|
1746
|
-
function
|
|
1777
|
+
function pa(t, e) {
|
|
1747
1778
|
return e.nodes.find((r) => r.id === t);
|
|
1748
1779
|
}
|
|
1749
|
-
function
|
|
1780
|
+
function ma(t, e) {
|
|
1750
1781
|
return e.links.find((r) => r.id === t);
|
|
1751
1782
|
}
|
|
1752
1783
|
function St(t) {
|
|
1753
1784
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1754
1785
|
}
|
|
1755
|
-
function
|
|
1786
|
+
function ha(t, e) {
|
|
1756
1787
|
if (!e)
|
|
1757
1788
|
return;
|
|
1758
1789
|
const r = t.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), n = t.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = e.filter((l) => r.includes(l.dataset.id)).reduce(
|
|
@@ -1769,15 +1800,15 @@ function _a(t, e) {
|
|
|
1769
1800
|
bottom: 0
|
|
1770
1801
|
};
|
|
1771
1802
|
}
|
|
1772
|
-
function
|
|
1803
|
+
function ga(t) {
|
|
1773
1804
|
return t.map((e) => {
|
|
1774
|
-
const r = e.y1 - e.y0 <
|
|
1805
|
+
const r = e.y1 - e.y0 < se;
|
|
1775
1806
|
return {
|
|
1776
1807
|
x: e.x0,
|
|
1777
|
-
y: e.y0 - (r ?
|
|
1808
|
+
y: e.y0 - (r ? se / 2 : 0),
|
|
1778
1809
|
// Negative offset to account for the min. height
|
|
1779
1810
|
width: e.x1 - e.x0,
|
|
1780
|
-
height: r ?
|
|
1811
|
+
height: r ? se : e.y1 - e.y0,
|
|
1781
1812
|
textTransform: {
|
|
1782
1813
|
x: e.depth > 0 ? e.x1 + dt : e.x0 - dt,
|
|
1783
1814
|
y: (e.y1 + e.y0) / 2
|
|
@@ -1786,22 +1817,22 @@ function fa(t) {
|
|
|
1786
1817
|
};
|
|
1787
1818
|
});
|
|
1788
1819
|
}
|
|
1789
|
-
function
|
|
1820
|
+
function ya(t) {
|
|
1790
1821
|
return [t.source.x1, t.y0];
|
|
1791
1822
|
}
|
|
1792
|
-
function
|
|
1823
|
+
function ba(t) {
|
|
1793
1824
|
return [t.target.x0, t.y1];
|
|
1794
1825
|
}
|
|
1795
|
-
function
|
|
1796
|
-
return t.curveFunction ?
|
|
1826
|
+
function ka(t) {
|
|
1827
|
+
return t.curveFunction ? Wt(t.curveFunction).source(ya).target(ba) : Yt();
|
|
1797
1828
|
}
|
|
1798
|
-
function
|
|
1829
|
+
function xa(t) {
|
|
1799
1830
|
return t.map((e) => {
|
|
1800
1831
|
var r;
|
|
1801
1832
|
return {
|
|
1802
1833
|
id: e.id,
|
|
1803
1834
|
color: e.color || ((r = e.source) == null ? void 0 : r.color) || he,
|
|
1804
|
-
d:
|
|
1835
|
+
d: ka(e)(e),
|
|
1805
1836
|
strokeWidth: Math.max(1, e.width),
|
|
1806
1837
|
link: e
|
|
1807
1838
|
};
|
|
@@ -1815,8 +1846,8 @@ function ft(t, e, r, n, a) {
|
|
|
1815
1846
|
};
|
|
1816
1847
|
return;
|
|
1817
1848
|
}
|
|
1818
|
-
const o = Date.now(), l =
|
|
1819
|
-
let c = (Date.now() - o) /
|
|
1849
|
+
const o = Date.now(), l = dn(e, r), i = () => {
|
|
1850
|
+
let c = (Date.now() - o) / fa;
|
|
1820
1851
|
c > 1 && (c = 1), t.node = {
|
|
1821
1852
|
...t.node,
|
|
1822
1853
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
@@ -1824,15 +1855,15 @@ function ft(t, e, r, n, a) {
|
|
|
1824
1855
|
};
|
|
1825
1856
|
requestAnimationFrame(i);
|
|
1826
1857
|
}
|
|
1827
|
-
const
|
|
1858
|
+
const Aa = {
|
|
1828
1859
|
nodes: [],
|
|
1829
1860
|
links: []
|
|
1830
1861
|
};
|
|
1831
1862
|
function pt(t, e) {
|
|
1832
1863
|
return e.find((r) => r.every((n) => n.x0 === t.x0));
|
|
1833
1864
|
}
|
|
1834
|
-
function
|
|
1835
|
-
const n =
|
|
1865
|
+
function Ta(t, e, r) {
|
|
1866
|
+
const n = I(null), a = v(() => {
|
|
1836
1867
|
var s, _;
|
|
1837
1868
|
return (_ = (s = t.value) == null ? void 0 : s[0]) == null ? void 0 : _.values.map(
|
|
1838
1869
|
({ label: m, color: p, value: h, deriveColorFromIncomingLinks: y, offset: f }) => ({
|
|
@@ -1851,10 +1882,10 @@ function ba(t, e, r) {
|
|
|
1851
1882
|
(m) => {
|
|
1852
1883
|
var p;
|
|
1853
1884
|
return (p = m.targets) == null ? void 0 : p.map(
|
|
1854
|
-
({ node: h, value: y, color: f, curveFunction:
|
|
1885
|
+
({ node: h, value: y, color: f, curveFunction: k }) => ({
|
|
1855
1886
|
id: `${m.value}:${h}`,
|
|
1856
1887
|
color: f,
|
|
1857
|
-
curveFunction:
|
|
1888
|
+
curveFunction: k,
|
|
1858
1889
|
source: m.value ?? m.label,
|
|
1859
1890
|
target: h,
|
|
1860
1891
|
value: y
|
|
@@ -1863,7 +1894,7 @@ function ba(t, e, r) {
|
|
|
1863
1894
|
}
|
|
1864
1895
|
).filter(Boolean).flat();
|
|
1865
1896
|
}
|
|
1866
|
-
), l = v(() =>
|
|
1897
|
+
), l = v(() => Kt().nodeId(ie).nodeAlign(e.value.nodeAlign).nodePadding(e.value.nodePadding).nodeSort(e.value.nodeSort).nodeWidth(e.value.nodeWidth).linkSort(e.value.linkSort).iterations(e.value.iterations)), i = v(() => {
|
|
1867
1898
|
var s;
|
|
1868
1899
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1869
1900
|
(_, m) => {
|
|
@@ -1885,8 +1916,8 @@ function ba(t, e, r) {
|
|
|
1885
1916
|
(x) => x.source.id === m
|
|
1886
1917
|
), f = _.links.filter(
|
|
1887
1918
|
(x) => x.target.id === m
|
|
1888
|
-
),
|
|
1889
|
-
y.forEach((x) => x.y0 +=
|
|
1919
|
+
), k = h - p;
|
|
1920
|
+
y.forEach((x) => x.y0 += k), f.forEach((x) => x.y1 += k);
|
|
1890
1921
|
}
|
|
1891
1922
|
const d = v(() => {
|
|
1892
1923
|
var s;
|
|
@@ -1894,7 +1925,7 @@ function ba(t, e, r) {
|
|
|
1894
1925
|
_.value === 0 && (_.fallbackColor = Ue.Grey), typeof _.offset == "number" && (u(_), c(_, n.value));
|
|
1895
1926
|
})), n.value;
|
|
1896
1927
|
});
|
|
1897
|
-
return
|
|
1928
|
+
return C([l, r], () => {
|
|
1898
1929
|
try {
|
|
1899
1930
|
const { x0: s, y0: _, x1: m, y1: p } = r.value;
|
|
1900
1931
|
n.value = l.value.extent([
|
|
@@ -1902,7 +1933,7 @@ function ba(t, e, r) {
|
|
|
1902
1933
|
[m, p]
|
|
1903
1934
|
])({ nodes: a.value, links: o.value });
|
|
1904
1935
|
} catch (s) {
|
|
1905
|
-
Ge(Te.GraphProblem, s), n.value =
|
|
1936
|
+
Ge(Te.GraphProblem, s), n.value = Aa;
|
|
1906
1937
|
}
|
|
1907
1938
|
}), { columns: i, graph: d };
|
|
1908
1939
|
}
|
|
@@ -1922,10 +1953,10 @@ function Ve(t, e) {
|
|
|
1922
1953
|
);
|
|
1923
1954
|
}), e;
|
|
1924
1955
|
}
|
|
1925
|
-
function
|
|
1956
|
+
function La(t, e) {
|
|
1926
1957
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
1927
1958
|
}
|
|
1928
|
-
const
|
|
1959
|
+
const Oa = (t, e) => {
|
|
1929
1960
|
let r;
|
|
1930
1961
|
St(t) ? r = {
|
|
1931
1962
|
[t.id]: t.value,
|
|
@@ -1937,33 +1968,33 @@ const xa = (t, e) => {
|
|
|
1937
1968
|
...je(t.source),
|
|
1938
1969
|
...Ve(t.target)
|
|
1939
1970
|
};
|
|
1940
|
-
const n =
|
|
1971
|
+
const n = La(r, e);
|
|
1941
1972
|
return { nodes: r, links: n };
|
|
1942
|
-
},
|
|
1973
|
+
}, $a = (t) => {
|
|
1943
1974
|
if (St(t)) {
|
|
1944
1975
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1945
1976
|
return {
|
|
1946
1977
|
nodes: e.reduce(
|
|
1947
|
-
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [
|
|
1948
|
-
{ [
|
|
1978
|
+
(r, { source: n, target: a, value: o }) => n === t ? { ...r, [ie(a)]: o } : { ...r, [ie(n)]: o },
|
|
1979
|
+
{ [ie(t)]: t.value }
|
|
1949
1980
|
),
|
|
1950
1981
|
links: e.map(({ id: r }) => r)
|
|
1951
1982
|
};
|
|
1952
1983
|
}
|
|
1953
1984
|
return {
|
|
1954
1985
|
nodes: {
|
|
1955
|
-
[
|
|
1956
|
-
[
|
|
1986
|
+
[ie(t.target)]: t.value,
|
|
1987
|
+
[ie(t.source)]: t.source.value
|
|
1957
1988
|
},
|
|
1958
1989
|
links: [t.id]
|
|
1959
1990
|
};
|
|
1960
1991
|
};
|
|
1961
|
-
function
|
|
1962
|
-
const n =
|
|
1992
|
+
function Ia(t, e, r) {
|
|
1993
|
+
const n = I(null), a = v(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1963
1994
|
n.value,
|
|
1964
1995
|
r.value
|
|
1965
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1966
|
-
return
|
|
1996
|
+
) : e.value.highlightedElements === "closest" ? $a(n.value, r.value) : Oa(n.value, r.value) : { nodes: {}, links: [] });
|
|
1997
|
+
return C(a, (o, l) => {
|
|
1967
1998
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1968
1999
|
t.value.forEach((i) => {
|
|
1969
2000
|
i.node.id in l.nodes && ft(
|
|
@@ -1986,10 +2017,10 @@ function Ta(t, e, r) {
|
|
|
1986
2017
|
});
|
|
1987
2018
|
}), { highlightedElements: a, hoveredElement: n };
|
|
1988
2019
|
}
|
|
1989
|
-
const
|
|
2020
|
+
const Ea = /* @__PURE__ */ H({
|
|
1990
2021
|
__name: "lume-alluvial-group",
|
|
1991
2022
|
props: {
|
|
1992
|
-
|
|
2023
|
+
...Ie(),
|
|
1993
2024
|
hoveredElementId: {
|
|
1994
2025
|
type: [Number, String],
|
|
1995
2026
|
default: null
|
|
@@ -1997,7 +2028,7 @@ const La = /* @__PURE__ */ C({
|
|
|
1997
2028
|
},
|
|
1998
2029
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1999
2030
|
setup(t, { emit: e }) {
|
|
2000
|
-
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l =
|
|
2031
|
+
const r = t, n = Le("chartID"), { data: a, options: o } = B(r), l = I([]), i = I([]), u = I(null), { extents: c, updateExtents: d } = va(r.containerSize), { columns: s, graph: _ } = Ta(a, o, c), { hoveredElement: m, highlightedElements: p } = Ia(
|
|
2001
2032
|
l,
|
|
2002
2033
|
o,
|
|
2003
2034
|
_
|
|
@@ -2005,44 +2036,44 @@ const La = /* @__PURE__ */ C({
|
|
|
2005
2036
|
() => Object.keys(p.value.nodes)
|
|
2006
2037
|
), f = v(() => s.value ? s.value.map(
|
|
2007
2038
|
(g) => g[0].x0 + o.value.nodeWidth / 2
|
|
2008
|
-
) : []),
|
|
2039
|
+
) : []), k = v(() => {
|
|
2009
2040
|
if (!(!o.value.nodeHeaders || !o.value.nodeHeaders.length))
|
|
2010
2041
|
return o.value.nodeHeaders.slice(0, f.value.length).map((g, O) => ({
|
|
2011
2042
|
label: g,
|
|
2012
2043
|
x: f.value[O]
|
|
2013
2044
|
}));
|
|
2014
2045
|
}), x = v(
|
|
2015
|
-
() => o.value.nodeHeaderPadding ??
|
|
2046
|
+
() => o.value.nodeHeaderPadding ?? Kr
|
|
2016
2047
|
), A = v(() => {
|
|
2017
2048
|
if (!(!o.value.gradient || !_.value))
|
|
2018
2049
|
return _.value.links.reduce((g, O) => {
|
|
2019
|
-
const { source:
|
|
2050
|
+
const { source: N, target: Z } = O, U = N.color || N.fallbackColor, F = Z.deriveColorFromIncomingLinks ? U : Z.color || Z.fallbackColor;
|
|
2020
2051
|
return g[O.id] = {
|
|
2021
2052
|
source: U,
|
|
2022
2053
|
target: F,
|
|
2023
|
-
x1:
|
|
2054
|
+
x1: N.x1,
|
|
2024
2055
|
x2: Z.x0
|
|
2025
2056
|
}, g;
|
|
2026
2057
|
}, {});
|
|
2027
|
-
}),
|
|
2058
|
+
}), E = v(() => {
|
|
2028
2059
|
const g = l.value.filter(
|
|
2029
|
-
(
|
|
2060
|
+
(N) => j(N)
|
|
2030
2061
|
), O = [];
|
|
2031
|
-
return g.forEach((
|
|
2062
|
+
return g.forEach((N) => {
|
|
2032
2063
|
const Z = [];
|
|
2033
|
-
i.value.filter(({ link: U }) => U.target.id ===
|
|
2034
|
-
const ge = F.link.target.y1 - F.link.target.y0 >
|
|
2035
|
-
let
|
|
2036
|
-
return ge ? (
|
|
2037
|
-
x:
|
|
2038
|
-
y:
|
|
2039
|
-
height:
|
|
2040
|
-
width:
|
|
2041
|
-
key: `node-block-${
|
|
2064
|
+
i.value.filter(({ link: U }) => U.target.id === N.node.id).reverse().reduce((U, F, qe, ve) => {
|
|
2065
|
+
const ge = F.link.target.y1 - F.link.target.y0 > se;
|
|
2066
|
+
let le, ye, ue;
|
|
2067
|
+
return ge ? (le = F.link.target.y1 - F.link.target.y0, ye = F.link.value / N.node.value, ue = ye * le) : (le = se, ue = se / ve.length), Z.push({
|
|
2068
|
+
x: N.x,
|
|
2069
|
+
y: N.y + U,
|
|
2070
|
+
height: ue,
|
|
2071
|
+
width: N.width,
|
|
2072
|
+
key: `node-block-${N.node.id}-source-link-${F.link.source.id}`,
|
|
2042
2073
|
class: `lume-alluvial-group__node-block lume-fill--${F.link.source.color || he}`
|
|
2043
|
-
}), U +
|
|
2074
|
+
}), U + ue;
|
|
2044
2075
|
}, 0), O.push({
|
|
2045
|
-
id:
|
|
2076
|
+
id: N.node.id,
|
|
2046
2077
|
subNodes: Z
|
|
2047
2078
|
});
|
|
2048
2079
|
}), O;
|
|
@@ -2077,7 +2108,7 @@ const La = /* @__PURE__ */ C({
|
|
|
2077
2108
|
m.value = null;
|
|
2078
2109
|
return;
|
|
2079
2110
|
}
|
|
2080
|
-
const O =
|
|
2111
|
+
const O = pa(g, _.value) || ma(g, _.value);
|
|
2081
2112
|
if (!O) {
|
|
2082
2113
|
q(Y.InvalidHoveredElement);
|
|
2083
2114
|
return;
|
|
@@ -2086,24 +2117,26 @@ const La = /* @__PURE__ */ C({
|
|
|
2086
2117
|
}
|
|
2087
2118
|
function ne(g) {
|
|
2088
2119
|
var O;
|
|
2089
|
-
return ((O =
|
|
2120
|
+
return ((O = E.value.find(({ id: N }) => g === N)) == null ? void 0 : O.subNodes) ?? [];
|
|
2090
2121
|
}
|
|
2091
|
-
function
|
|
2092
|
-
const g =
|
|
2122
|
+
function $() {
|
|
2123
|
+
const g = ha(_.value, u.value);
|
|
2093
2124
|
d(g);
|
|
2094
2125
|
}
|
|
2095
|
-
return
|
|
2096
|
-
l.value =
|
|
2097
|
-
}),
|
|
2098
|
-
r.containerSize.width && r.containerSize.height &&
|
|
2099
|
-
}),
|
|
2126
|
+
return C(_, (g) => {
|
|
2127
|
+
l.value = ga(g.nodes), i.value = xa(g.links).reverse(), m.value == null && r.hoveredElementId != null && Q(r.hoveredElementId);
|
|
2128
|
+
}), C([r.containerSize, u], () => {
|
|
2129
|
+
r.containerSize.width && r.containerSize.height && $();
|
|
2130
|
+
}), C(() => r.hoveredElementId, Q), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: i, nodeTextRefs: u, extents: c, updateExtents: d, columns: s, graph: _, hoveredElement: m, highlightedElements: p, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: f, nodeHeaders: k, computedNodeHeaderPadding: x, gradients: A, nodesDerivingColorFromIncomingLinks: E, getLinkStroke: T, isNodeFaded: D, isNodeFocused: S, isLinkFaded: R, isLinkFocused: G, shouldDeriveNodeColorFromIncomingLinks: j, handleLinkMouseover: W, handleLinkMouseleave: te, handleExternalHover: Q, getSubNodesDerivingColorFromIncomingLinks: ne, updateMargins: $, LumeAlluvialNodeLabel: ta, LumeAlluvialNodeValue: la, LumeAlluvialNodeHeader: da, GHOST_STROKE_WIDTH_OFFSET: Yr };
|
|
2100
2131
|
}
|
|
2101
2132
|
});
|
|
2102
|
-
var
|
|
2133
|
+
var wa = function() {
|
|
2103
2134
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2104
|
-
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", e._l(n.nodeHeaders, function(a) {
|
|
2105
|
-
return
|
|
2106
|
-
|
|
2135
|
+
return r("g", { staticClass: "lume-alluvial-group", attrs: { "data-j-alluvial-group": "" } }, [n.nodeHeaders ? r("g", [e._l(n.nodeHeaders, function(a, o) {
|
|
2136
|
+
return [e._t(`node-header-${o}`, function() {
|
|
2137
|
+
return [r(n.LumeAlluvialNodeHeader, { key: `header_${a.x}`, attrs: { x: a.x, y: -n.computedNodeHeaderPadding } }, [e._v(" " + e._s(a.label) + " ")])];
|
|
2138
|
+
}, { x: a.x, y: -n.computedNodeHeaderPadding })];
|
|
2139
|
+
})], 2) : e._e(), r("g", { staticClass: "lume-alluvial-link-group", on: { mouseleave: n.handleLinkMouseleave } }, [n.options.gradient ? r("defs", e._l(n.gradients, function(a, o) {
|
|
2107
2140
|
return r("linearGradient", { key: o, attrs: { id: `${n.chartID}_${o}`, gradientUnits: "userSpaceOnUse", x1: a.x1, x2: a.x2 } }, [r("stop", { attrs: { offset: "0%", "stop-color": `var(--lume-color--${a.source})` } }), r("stop", { attrs: { offset: "100%", "stop-color": `var(--lume-color--${a.target})` } })], 1);
|
|
2108
2141
|
}), 1) : e._e(), e._l(n.linkPaths, function(a) {
|
|
2109
2142
|
return r("path", { key: `link-ghost_${a.id}`, staticClass: "lume-alluvial-group__link", class: [
|
|
@@ -2151,17 +2184,17 @@ var Oa = function() {
|
|
|
2151
2184
|
a.node.value
|
|
2152
2185
|
) })], 2)], 2)]);
|
|
2153
2186
|
})], 2);
|
|
2154
|
-
},
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2187
|
+
}, Na = [], Ha = /* @__PURE__ */ w(
|
|
2188
|
+
Ea,
|
|
2189
|
+
wa,
|
|
2190
|
+
Na,
|
|
2158
2191
|
!1,
|
|
2159
2192
|
null,
|
|
2160
|
-
"
|
|
2193
|
+
"02af69f2",
|
|
2161
2194
|
null,
|
|
2162
2195
|
null
|
|
2163
2196
|
);
|
|
2164
|
-
const
|
|
2197
|
+
const Ca = Ha.exports, Da = {
|
|
2165
2198
|
margins: {
|
|
2166
2199
|
top: 0,
|
|
2167
2200
|
right: 0,
|
|
@@ -2177,16 +2210,16 @@ const Ea = $a.exports, wa = {
|
|
|
2177
2210
|
highlightedElements: "closest",
|
|
2178
2211
|
nodePadding: 16,
|
|
2179
2212
|
nodeWidth: 16,
|
|
2180
|
-
nodeAlign:
|
|
2213
|
+
nodeAlign: Jt,
|
|
2181
2214
|
valueFormat: (t) => String(t),
|
|
2182
2215
|
iterations: 6
|
|
2183
|
-
},
|
|
2216
|
+
}, Sa = /* @__PURE__ */ H({
|
|
2184
2217
|
__name: "lume-alluvial-diagram",
|
|
2185
2218
|
props: {
|
|
2186
|
-
...
|
|
2219
|
+
...Ir(ze)
|
|
2187
2220
|
},
|
|
2188
2221
|
setup(t, { emit: e }) {
|
|
2189
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o =
|
|
2222
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), o = _n(M()), { options: l } = B(r), { allOptions: i } = K(l, Da);
|
|
2190
2223
|
function u(c) {
|
|
2191
2224
|
return {
|
|
2192
2225
|
...c,
|
|
@@ -2194,10 +2227,10 @@ const Ea = $a.exports, wa = {
|
|
|
2194
2227
|
// Alluvial chart never uses base scales
|
|
2195
2228
|
};
|
|
2196
2229
|
}
|
|
2197
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart:
|
|
2230
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: i, getAlluvialDiagramOptions: u, LumeChart: de, LumeAlluvialGroup: Ca };
|
|
2198
2231
|
}
|
|
2199
2232
|
});
|
|
2200
|
-
var
|
|
2233
|
+
var Ra = function() {
|
|
2201
2234
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2202
2235
|
return r(n.LumeChart, e._g(e._b({ attrs: { options: n.getAlluvialDiagramOptions(n.allOptions), "data-j-alluvial-diagram": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2203
2236
|
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
@@ -2209,23 +2242,23 @@ var Ha = function() {
|
|
|
2209
2242
|
return { key: o, fn: function(l) {
|
|
2210
2243
|
return [e._t(o, null, null, l || {})];
|
|
2211
2244
|
} };
|
|
2212
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2213
|
-
},
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2245
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2246
|
+
}, Pa = [], Ba = /* @__PURE__ */ w(
|
|
2247
|
+
Sa,
|
|
2248
|
+
Ra,
|
|
2249
|
+
Pa,
|
|
2217
2250
|
!1,
|
|
2218
2251
|
null,
|
|
2219
2252
|
null,
|
|
2220
2253
|
null,
|
|
2221
2254
|
null
|
|
2222
2255
|
);
|
|
2223
|
-
const
|
|
2256
|
+
const Qo = Ba.exports;
|
|
2224
2257
|
var Me = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked", t))(Me || {});
|
|
2225
|
-
const
|
|
2258
|
+
const Fa = /* @__PURE__ */ H({
|
|
2226
2259
|
__name: "lume-bar-chart",
|
|
2227
2260
|
props: {
|
|
2228
|
-
...
|
|
2261
|
+
...ce(),
|
|
2229
2262
|
type: {
|
|
2230
2263
|
type: String,
|
|
2231
2264
|
default: null,
|
|
@@ -2265,41 +2298,41 @@ const Sa = /* @__PURE__ */ C({
|
|
|
2265
2298
|
return { __sfc: !0, TYPES: Me, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: i, slots: u, getBarChartOptions: c, component: d };
|
|
2266
2299
|
}
|
|
2267
2300
|
});
|
|
2268
|
-
var
|
|
2301
|
+
var Ga = function() {
|
|
2269
2302
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2270
2303
|
return r(n.component, e._g(e._b({ tag: "component", attrs: { options: n.getBarChartOptions(e.options) }, scopedSlots: e._u([e._l(n.slots, function(a, o) {
|
|
2271
2304
|
return { key: o, fn: function(l) {
|
|
2272
2305
|
return [e._t(o, null, null, l || {})];
|
|
2273
2306
|
} };
|
|
2274
2307
|
})], null, !0) }, "component", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2275
|
-
},
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2308
|
+
}, ja = [], Va = /* @__PURE__ */ w(
|
|
2309
|
+
Fa,
|
|
2310
|
+
Ga,
|
|
2311
|
+
ja,
|
|
2279
2312
|
!1,
|
|
2280
2313
|
null,
|
|
2281
2314
|
null,
|
|
2282
2315
|
null,
|
|
2283
2316
|
null
|
|
2284
2317
|
);
|
|
2285
|
-
const
|
|
2286
|
-
function
|
|
2287
|
-
return Object.values(
|
|
2318
|
+
const qo = Va.exports;
|
|
2319
|
+
function Ma(t) {
|
|
2320
|
+
return Object.values(gn).includes(t) || t == null;
|
|
2288
2321
|
}
|
|
2289
|
-
function
|
|
2322
|
+
function za(t) {
|
|
2290
2323
|
return Object.values(L).includes(t);
|
|
2291
2324
|
}
|
|
2292
|
-
const
|
|
2325
|
+
const Wa = (t = !1) => ({
|
|
2293
2326
|
type: {
|
|
2294
2327
|
type: String,
|
|
2295
2328
|
default: null,
|
|
2296
|
-
validator:
|
|
2329
|
+
validator: Ma
|
|
2297
2330
|
},
|
|
2298
2331
|
...t ? {
|
|
2299
2332
|
orientation: {
|
|
2300
2333
|
type: String,
|
|
2301
2334
|
default: L.VERTICAL,
|
|
2302
|
-
validator:
|
|
2335
|
+
validator: za
|
|
2303
2336
|
}
|
|
2304
2337
|
} : {}
|
|
2305
2338
|
});
|
|
@@ -2324,10 +2357,10 @@ function Rt(t, e) {
|
|
|
2324
2357
|
});
|
|
2325
2358
|
return { multiBarData: r, groupedData: n };
|
|
2326
2359
|
}
|
|
2327
|
-
function
|
|
2360
|
+
function Za(t, e) {
|
|
2328
2361
|
return t.value.length === 1 ? "single" : e.value;
|
|
2329
2362
|
}
|
|
2330
|
-
function
|
|
2363
|
+
function Ua(t, e, r) {
|
|
2331
2364
|
const n = v(
|
|
2332
2365
|
() => r.value === L.HORIZONTAL
|
|
2333
2366
|
);
|
|
@@ -2337,13 +2370,13 @@ function Ma(t, e, r) {
|
|
|
2337
2370
|
const o = v(() => n.value ? (() => (a(t.value), t.value))() : t.value), l = v(() => n.value ? e.value : (() => (a(e.value), e.value))());
|
|
2338
2371
|
return { barXScale: o, barYScale: l };
|
|
2339
2372
|
}
|
|
2340
|
-
const
|
|
2373
|
+
const Xa = {
|
|
2341
2374
|
x: 0,
|
|
2342
2375
|
y: 0,
|
|
2343
2376
|
width: 0,
|
|
2344
2377
|
height: 0
|
|
2345
2378
|
};
|
|
2346
|
-
function
|
|
2379
|
+
function Ya(t, e, r, n, a, o) {
|
|
2347
2380
|
const l = v(
|
|
2348
2381
|
() => n.value === L.HORIZONTAL
|
|
2349
2382
|
);
|
|
@@ -2359,27 +2392,27 @@ function Wa(t, e, r, n, a, o) {
|
|
|
2359
2392
|
}
|
|
2360
2393
|
function d(s, _, m) {
|
|
2361
2394
|
if (!(e.value && r.value))
|
|
2362
|
-
return
|
|
2363
|
-
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x:
|
|
2395
|
+
return Xa;
|
|
2396
|
+
const { value: h, color: y } = s, f = y ?? t.value[_].color ?? he, { x: k, y: x } = i(h, m), A = u(h), E = c(h);
|
|
2364
2397
|
return {
|
|
2365
2398
|
classList: [`lume-fill--${f}`, ...o],
|
|
2366
|
-
x:
|
|
2399
|
+
x: k,
|
|
2367
2400
|
y: x,
|
|
2368
2401
|
width: A,
|
|
2369
|
-
height:
|
|
2402
|
+
height: E,
|
|
2370
2403
|
isFaded: a.value !== -1 && a.value !== m,
|
|
2371
2404
|
isNegative: h < 0
|
|
2372
2405
|
};
|
|
2373
2406
|
}
|
|
2374
2407
|
return { barAttributeGenerator: d };
|
|
2375
2408
|
}
|
|
2376
|
-
const
|
|
2409
|
+
const Ka = {
|
|
2377
2410
|
x: 0,
|
|
2378
2411
|
y: 0,
|
|
2379
2412
|
width: 0,
|
|
2380
2413
|
height: 0
|
|
2381
2414
|
};
|
|
2382
|
-
function
|
|
2415
|
+
function Ja(t, e, r, n, a, o) {
|
|
2383
2416
|
const l = v(
|
|
2384
2417
|
() => n.value === L.HORIZONTAL
|
|
2385
2418
|
), i = v(() => _e().domain(t.value.map((p, h) => h)).range([0, e.value.bandwidth()]).padding(0)), u = v(() => _e().domain(t.value.map((p, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
@@ -2404,21 +2437,21 @@ function Ua(t, e, r, n, a, o) {
|
|
|
2404
2437
|
}
|
|
2405
2438
|
function m(p, h, y) {
|
|
2406
2439
|
if (!(e.value && r.value))
|
|
2407
|
-
return
|
|
2408
|
-
const { value:
|
|
2440
|
+
return Ka;
|
|
2441
|
+
const { value: k, color: x } = p, A = x ?? t.value[h].color ?? Object.values(z)[h], E = c(k, y, h), T = d(k, y, h), D = s(k), S = _(k);
|
|
2409
2442
|
return {
|
|
2410
2443
|
classList: [`lume-fill--${A}`, ...o],
|
|
2411
|
-
x:
|
|
2444
|
+
x: E,
|
|
2412
2445
|
y: T,
|
|
2413
2446
|
width: D,
|
|
2414
2447
|
height: S,
|
|
2415
2448
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2416
|
-
isNegative:
|
|
2449
|
+
isNegative: k < 0
|
|
2417
2450
|
};
|
|
2418
2451
|
}
|
|
2419
2452
|
return { barAttributeGenerator: m };
|
|
2420
2453
|
}
|
|
2421
|
-
function
|
|
2454
|
+
function Qa(t, e, r) {
|
|
2422
2455
|
const n = v(
|
|
2423
2456
|
() => e.value === L.HORIZONTAL
|
|
2424
2457
|
), a = v(() => {
|
|
@@ -2457,17 +2490,17 @@ function Xa(t, e, r) {
|
|
|
2457
2490
|
}
|
|
2458
2491
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2459
2492
|
}
|
|
2460
|
-
function
|
|
2493
|
+
function qa(t, e, r, n, a, o) {
|
|
2461
2494
|
const l = v(
|
|
2462
2495
|
() => n.value === L.HORIZONTAL
|
|
2463
2496
|
), i = v(
|
|
2464
2497
|
() => l.value ? r.value.domain() : e.value.domain()
|
|
2465
2498
|
), u = v(
|
|
2466
|
-
() => t.value.map((f) => f.values.map((
|
|
2499
|
+
() => t.value.map((f) => f.values.map((k) => k == null ? void 0 : k.value))
|
|
2467
2500
|
);
|
|
2468
|
-
function c(f,
|
|
2469
|
-
let A,
|
|
2470
|
-
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x),
|
|
2501
|
+
function c(f, k, x) {
|
|
2502
|
+
let A, E;
|
|
2503
|
+
return l.value ? (A = e.value(f >= 0 ? 0 + x : f + x), E = r.value(i.value[k])) : (A = e.value(i.value[k]), E = r.value(f >= 0 ? f + x : 0 + x)), { x: A, y: E };
|
|
2471
2504
|
}
|
|
2472
2505
|
function d(f) {
|
|
2473
2506
|
return l.value ? e.value(f) - e.value(0) : e.value.bandwidth();
|
|
@@ -2481,16 +2514,16 @@ function Ya(t, e, r, n, a, o) {
|
|
|
2481
2514
|
function m(f) {
|
|
2482
2515
|
return l.value ? r.value.bandwidth() : r.value(f) - r.value(0);
|
|
2483
2516
|
}
|
|
2484
|
-
function p(f,
|
|
2485
|
-
return f ? u.value.reduce((x, A,
|
|
2517
|
+
function p(f, k) {
|
|
2518
|
+
return f ? u.value.reduce((x, A, E) => (E < f && A[k] >= 0 && (x += A[k]), x), 0) : 0;
|
|
2486
2519
|
}
|
|
2487
|
-
function h(f,
|
|
2488
|
-
return f ? u.value.reduce((x, A,
|
|
2520
|
+
function h(f, k) {
|
|
2521
|
+
return f ? u.value.reduce((x, A, E) => (E < f && A[k] < 0 && (x += A[k]), x), 0) : 0;
|
|
2489
2522
|
}
|
|
2490
|
-
function y(f,
|
|
2491
|
-
const { value: A, color:
|
|
2523
|
+
function y(f, k, x) {
|
|
2524
|
+
const { value: A, color: E } = f, T = A >= 0 ? d(A) : s(A), D = A >= 0 ? _(A) : m(A), S = A >= 0 ? p(k, x) : h(k, x), { x: R, y: G } = c(A, x, S);
|
|
2492
2525
|
return {
|
|
2493
|
-
classList: [`lume-fill--${
|
|
2526
|
+
classList: [`lume-fill--${E ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2494
2527
|
width: T,
|
|
2495
2528
|
height: D,
|
|
2496
2529
|
x: R,
|
|
@@ -2502,18 +2535,18 @@ function Ya(t, e, r, n, a, o) {
|
|
|
2502
2535
|
return { barAttributeGenerator: y };
|
|
2503
2536
|
}
|
|
2504
2537
|
const mt = {
|
|
2505
|
-
single:
|
|
2506
|
-
grouped:
|
|
2507
|
-
stacked:
|
|
2508
|
-
},
|
|
2538
|
+
single: Ya,
|
|
2539
|
+
grouped: Ja,
|
|
2540
|
+
stacked: qa
|
|
2541
|
+
}, eo = /* @__PURE__ */ H({
|
|
2509
2542
|
__name: "lume-bar-group",
|
|
2510
2543
|
props: {
|
|
2511
|
-
|
|
2544
|
+
...Ie(),
|
|
2512
2545
|
classList: {
|
|
2513
2546
|
type: [String, Array],
|
|
2514
2547
|
default: () => []
|
|
2515
2548
|
},
|
|
2516
|
-
...
|
|
2549
|
+
...Wa(!0),
|
|
2517
2550
|
transition: {
|
|
2518
2551
|
type: Boolean,
|
|
2519
2552
|
default: !0
|
|
@@ -2531,8 +2564,8 @@ const mt = {
|
|
|
2531
2564
|
yScale: c,
|
|
2532
2565
|
classList: d,
|
|
2533
2566
|
labels: s
|
|
2534
|
-
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Rt(n, s), { barXScale: h, barYScale: y } =
|
|
2535
|
-
const
|
|
2567
|
+
} = B(r), _ = Le("chartID"), { emitInternalEvent: m } = J(e, _), { groupedData: p } = Rt(n, s), { barXScale: h, barYScale: y } = Ua(u, c, o), f = v(() => typeof d.value == "string" ? [d.value] : d.value), k = v(() => {
|
|
2568
|
+
const E = Za(n, i), { barAttributeGenerator: T } = mt[E](
|
|
2536
2569
|
n,
|
|
2537
2570
|
h,
|
|
2538
2571
|
y,
|
|
@@ -2545,13 +2578,13 @@ const mt = {
|
|
|
2545
2578
|
if (l.value)
|
|
2546
2579
|
return o.value === L.HORIZONTAL ? "width" : "height";
|
|
2547
2580
|
});
|
|
2548
|
-
async function A(
|
|
2549
|
-
e("lume__internal--hover",
|
|
2581
|
+
async function A(E) {
|
|
2582
|
+
e("lume__internal--hover", E), m("lume__internal--hover", E);
|
|
2550
2583
|
}
|
|
2551
|
-
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes:
|
|
2584
|
+
return { __sfc: !0, MIXIN_MAP: mt, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: i, xScale: u, yScale: c, classList: d, labels: s, chartID: _, emitInternalEvent: m, groupedData: p, barXScale: h, barYScale: y, computedClasses: f, getBarAttributes: k, computedTransition: x, handleInternalHover: A, LumeBar: Ye };
|
|
2552
2585
|
}
|
|
2553
2586
|
});
|
|
2554
|
-
var
|
|
2587
|
+
var to = function() {
|
|
2555
2588
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2556
2589
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2557
2590
|
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
@@ -2566,17 +2599,17 @@ var Ja = function() {
|
|
|
2566
2599
|
} } }, "lume-bar", n.getBarAttributes(l, i, o, a), !1));
|
|
2567
2600
|
}), 1);
|
|
2568
2601
|
}), 0);
|
|
2569
|
-
},
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2602
|
+
}, no = [], ro = /* @__PURE__ */ w(
|
|
2603
|
+
eo,
|
|
2604
|
+
to,
|
|
2605
|
+
no,
|
|
2573
2606
|
!1,
|
|
2574
2607
|
null,
|
|
2575
2608
|
null,
|
|
2576
2609
|
null,
|
|
2577
2610
|
null
|
|
2578
2611
|
);
|
|
2579
|
-
const Qe =
|
|
2612
|
+
const Qe = ro.exports, ao = {
|
|
2580
2613
|
[L.VERTICAL]: {
|
|
2581
2614
|
withTooltip: !0,
|
|
2582
2615
|
xAxisOptions: {},
|
|
@@ -2589,20 +2622,20 @@ const Qe = qa.exports, eo = {
|
|
|
2589
2622
|
yAxisOptions: { gridLines: !1 },
|
|
2590
2623
|
margins: ae.HORIZONTAL
|
|
2591
2624
|
}
|
|
2592
|
-
},
|
|
2625
|
+
}, oo = /* @__PURE__ */ H({
|
|
2593
2626
|
__name: "lume-single-bar-chart",
|
|
2594
2627
|
props: {
|
|
2595
|
-
...
|
|
2628
|
+
...ce(ze)
|
|
2596
2629
|
},
|
|
2597
2630
|
setup(t, { emit: e }) {
|
|
2598
2631
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { orientation: o, options: l } = B(r), i = v(
|
|
2599
|
-
() =>
|
|
2632
|
+
() => ao[o.value || L.VERTICAL]
|
|
2600
2633
|
// needs to be computed so that default options are reactive
|
|
2601
2634
|
), { allOptions: u } = K(l, i);
|
|
2602
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2635
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: Qe };
|
|
2603
2636
|
}
|
|
2604
2637
|
});
|
|
2605
|
-
var
|
|
2638
|
+
var lo = function() {
|
|
2606
2639
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2607
2640
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "single-bar", options: n.allOptions, "data-j-single-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2608
2641
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2610,18 +2643,18 @@ var no = function() {
|
|
|
2610
2643
|
return { key: o, fn: function(l) {
|
|
2611
2644
|
return [e._t(o, null, null, l || {})];
|
|
2612
2645
|
} };
|
|
2613
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2646
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2647
|
+
}, uo = [], io = /* @__PURE__ */ w(
|
|
2648
|
+
oo,
|
|
2649
|
+
lo,
|
|
2650
|
+
uo,
|
|
2618
2651
|
!1,
|
|
2619
2652
|
null,
|
|
2620
2653
|
null,
|
|
2621
2654
|
null,
|
|
2622
2655
|
null
|
|
2623
2656
|
);
|
|
2624
|
-
const
|
|
2657
|
+
const el = io.exports, so = {
|
|
2625
2658
|
[L.VERTICAL]: {
|
|
2626
2659
|
withTooltip: !0,
|
|
2627
2660
|
xAxisOptions: {},
|
|
@@ -2635,23 +2668,23 @@ const Ko = ao.exports, oo = {
|
|
|
2635
2668
|
margins: ae.HORIZONTAL,
|
|
2636
2669
|
tooltipOptions: { position: "right" }
|
|
2637
2670
|
}
|
|
2638
|
-
},
|
|
2671
|
+
}, co = /* @__PURE__ */ H({
|
|
2639
2672
|
__name: "lume-grouped-bar-chart",
|
|
2640
2673
|
props: {
|
|
2641
|
-
...
|
|
2674
|
+
...ce()
|
|
2642
2675
|
},
|
|
2643
2676
|
setup(t, { emit: e }) {
|
|
2644
2677
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { orientation: o, options: l } = B(r), i = v(
|
|
2645
|
-
() =>
|
|
2678
|
+
() => so[o.value || L.VERTICAL]
|
|
2646
2679
|
// needs to be computed so that default options are reactive
|
|
2647
2680
|
), { allOptions: u } = K(
|
|
2648
2681
|
l,
|
|
2649
2682
|
i
|
|
2650
2683
|
);
|
|
2651
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart:
|
|
2684
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: i, allOptions: u, LumeChart: de, LumeBarGroup: Qe };
|
|
2652
2685
|
}
|
|
2653
2686
|
});
|
|
2654
|
-
var
|
|
2687
|
+
var vo = function() {
|
|
2655
2688
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2656
2689
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "grouped-bar", options: n.allOptions, "data-j-grouped-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2657
2690
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "grouped" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2659,18 +2692,18 @@ var uo = function() {
|
|
|
2659
2692
|
return { key: o, fn: function(l) {
|
|
2660
2693
|
return [e._t(o, null, null, l || {})];
|
|
2661
2694
|
} };
|
|
2662
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2663
|
-
},
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2695
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2696
|
+
}, _o = [], fo = /* @__PURE__ */ w(
|
|
2697
|
+
co,
|
|
2698
|
+
vo,
|
|
2699
|
+
_o,
|
|
2667
2700
|
!1,
|
|
2668
2701
|
null,
|
|
2669
2702
|
null,
|
|
2670
2703
|
null,
|
|
2671
2704
|
null
|
|
2672
2705
|
);
|
|
2673
|
-
const
|
|
2706
|
+
const tl = fo.exports, po = {
|
|
2674
2707
|
[L.VERTICAL]: {
|
|
2675
2708
|
withTooltip: !0,
|
|
2676
2709
|
xAxisOptions: {},
|
|
@@ -2683,29 +2716,29 @@ const Jo = so.exports, co = {
|
|
|
2683
2716
|
xAxisOptions: { gridLines: !0 },
|
|
2684
2717
|
yAxisOptions: { gridLines: !1 },
|
|
2685
2718
|
margins: ae.HORIZONTAL,
|
|
2686
|
-
tooltipOptions: { position: "right"
|
|
2719
|
+
tooltipOptions: { position: "right" }
|
|
2687
2720
|
}
|
|
2688
|
-
},
|
|
2721
|
+
}, mo = /* @__PURE__ */ H({
|
|
2689
2722
|
__name: "lume-stacked-bar-chart",
|
|
2690
2723
|
props: {
|
|
2691
|
-
...
|
|
2724
|
+
...ce()
|
|
2692
2725
|
},
|
|
2693
2726
|
setup(t, { emit: e }) {
|
|
2694
2727
|
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { data: o, orientation: l, options: i, labels: u } = B(r), c = v(
|
|
2695
|
-
() =>
|
|
2728
|
+
() => po[l.value || L.VERTICAL]
|
|
2696
2729
|
// needs to be computed so that default options are reactive
|
|
2697
2730
|
), { allOptions: d } = K(
|
|
2698
2731
|
i,
|
|
2699
2732
|
c
|
|
2700
|
-
), { internalData: s } = Je(o), { groupedData: _ } = Rt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } =
|
|
2733
|
+
), { internalData: s } = Je(o), { groupedData: _ } = Rt(s, u), { stackedXScaleGenerator: m, stackedYScaleGenerator: p } = Qa(
|
|
2701
2734
|
_,
|
|
2702
2735
|
l,
|
|
2703
2736
|
i
|
|
2704
2737
|
), h = v(() => r.xScale || m), y = v(() => r.yScale || p);
|
|
2705
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart:
|
|
2738
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: i, labels: u, baseOptions: c, allOptions: d, internalData: s, groupedData: _, stackedXScaleGenerator: m, stackedYScaleGenerator: p, xScale: h, yScale: y, LumeChart: de, LumeBarGroup: Qe };
|
|
2706
2739
|
}
|
|
2707
2740
|
});
|
|
2708
|
-
var
|
|
2741
|
+
var ho = function() {
|
|
2709
2742
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2710
2743
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "stacked-bar", options: n.allOptions, "x-scale": n.xScale, "y-scale": n.yScale, "data-j-stacked-bar-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
2711
2744
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { type: "stacked" } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2713,18 +2746,18 @@ var _o = function() {
|
|
|
2713
2746
|
return { key: o, fn: function(l) {
|
|
2714
2747
|
return [e._t(o, null, null, l || {})];
|
|
2715
2748
|
} };
|
|
2716
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
2717
|
-
},
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2749
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2750
|
+
}, go = [], yo = /* @__PURE__ */ w(
|
|
2751
|
+
mo,
|
|
2752
|
+
ho,
|
|
2753
|
+
go,
|
|
2721
2754
|
!1,
|
|
2722
2755
|
null,
|
|
2723
2756
|
null,
|
|
2724
2757
|
null,
|
|
2725
2758
|
null
|
|
2726
2759
|
);
|
|
2727
|
-
const
|
|
2760
|
+
const nl = yo.exports, ht = 2, bo = /* @__PURE__ */ H({
|
|
2728
2761
|
__name: "lume-line",
|
|
2729
2762
|
props: {
|
|
2730
2763
|
pathDefinition: {
|
|
@@ -2758,11 +2791,11 @@ const Qo = po.exports, ht = 2, mo = /* @__PURE__ */ C({
|
|
|
2758
2791
|
},
|
|
2759
2792
|
emits: ["click"],
|
|
2760
2793
|
setup(t, { emit: e }) {
|
|
2761
|
-
const r =
|
|
2762
|
-
return ee(() =>
|
|
2794
|
+
const r = I(null);
|
|
2795
|
+
return ee(() => $e(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: ht, emit: e, root: r };
|
|
2763
2796
|
}
|
|
2764
2797
|
});
|
|
2765
|
-
var
|
|
2798
|
+
var ko = function() {
|
|
2766
2799
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2767
2800
|
return r("path", { ref: "root", staticClass: "lume-line", class: {
|
|
2768
2801
|
[`lume-stroke--${e.color}`]: !0,
|
|
@@ -2774,17 +2807,17 @@ var ho = function() {
|
|
|
2774
2807
|
}, attrs: { d: e.pathDefinition, "stroke-width": e.width, "data-j-line": "" }, on: { click: function(a) {
|
|
2775
2808
|
return n.emit("click", a);
|
|
2776
2809
|
} } });
|
|
2777
|
-
},
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2810
|
+
}, xo = [], Ao = /* @__PURE__ */ w(
|
|
2811
|
+
bo,
|
|
2812
|
+
ko,
|
|
2813
|
+
xo,
|
|
2781
2814
|
!1,
|
|
2782
2815
|
null,
|
|
2783
2816
|
"08896455",
|
|
2784
2817
|
null,
|
|
2785
2818
|
null
|
|
2786
2819
|
);
|
|
2787
|
-
const
|
|
2820
|
+
const To = Ao.exports, gt = 4, Lo = /* @__PURE__ */ H({
|
|
2788
2821
|
__name: "lume-point",
|
|
2789
2822
|
props: {
|
|
2790
2823
|
x: { type: Number, required: !0 },
|
|
@@ -2804,26 +2837,26 @@ const bo = yo.exports, gt = 4, ko = /* @__PURE__ */ C({
|
|
|
2804
2837
|
},
|
|
2805
2838
|
emits: ["click"],
|
|
2806
2839
|
setup(t, { emit: e }) {
|
|
2807
|
-
const r = t, n =
|
|
2808
|
-
return ee(() =>
|
|
2840
|
+
const r = t, n = I(null), a = v(() => r.radius / 2);
|
|
2841
|
+
return ee(() => $e(n.value)), { __sfc: !0, DEFAULT_RADIUS: gt, props: r, emit: e, root: n, strokeWidth: a };
|
|
2809
2842
|
}
|
|
2810
2843
|
});
|
|
2811
|
-
var
|
|
2844
|
+
var Oo = function() {
|
|
2812
2845
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2813
2846
|
return r("circle", { ref: "root", staticClass: "lume-point", class: `lume-stroke--${e.color}`, attrs: { cx: e.x, cy: e.y, r: e.active ? e.radius : 0, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2814
2847
|
return n.emit("click", a);
|
|
2815
2848
|
} } });
|
|
2816
|
-
},
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2849
|
+
}, $o = [], Io = /* @__PURE__ */ w(
|
|
2850
|
+
Lo,
|
|
2851
|
+
Oo,
|
|
2852
|
+
$o,
|
|
2820
2853
|
!1,
|
|
2821
2854
|
null,
|
|
2822
2855
|
"b6745177",
|
|
2823
2856
|
null,
|
|
2824
2857
|
null
|
|
2825
2858
|
);
|
|
2826
|
-
const
|
|
2859
|
+
const Eo = Io.exports;
|
|
2827
2860
|
function Pt(t) {
|
|
2828
2861
|
function e(o) {
|
|
2829
2862
|
let l = null;
|
|
@@ -2860,7 +2893,7 @@ function Pt(t) {
|
|
|
2860
2893
|
c.length,
|
|
2861
2894
|
c.indexOf(u)
|
|
2862
2895
|
),
|
|
2863
|
-
label:
|
|
2896
|
+
label: It
|
|
2864
2897
|
};
|
|
2865
2898
|
}
|
|
2866
2899
|
return i;
|
|
@@ -2868,23 +2901,23 @@ function Pt(t) {
|
|
|
2868
2901
|
};
|
|
2869
2902
|
})) };
|
|
2870
2903
|
}
|
|
2871
|
-
function
|
|
2904
|
+
function wo(t, e) {
|
|
2872
2905
|
const r = t.bandwidth() / 2;
|
|
2873
2906
|
return (n, a) => t(t.domain()[e + (a - 1)]) + r;
|
|
2874
2907
|
}
|
|
2875
|
-
function
|
|
2908
|
+
function No(t, e) {
|
|
2876
2909
|
return (r, n) => t(e + (n - 1));
|
|
2877
2910
|
}
|
|
2878
|
-
function
|
|
2879
|
-
const a =
|
|
2880
|
-
X(r) ?
|
|
2911
|
+
function Ho(t, e, r, n) {
|
|
2912
|
+
const a = Zt().x(
|
|
2913
|
+
X(r) ? wo(r, t) : No(r, t)
|
|
2881
2914
|
).y((o) => n(o));
|
|
2882
2915
|
return e.every((o) => o == null) ? null : a(e);
|
|
2883
2916
|
}
|
|
2884
|
-
const yt = 1,
|
|
2917
|
+
const yt = 1, Co = /* @__PURE__ */ H({
|
|
2885
2918
|
__name: "lume-line-group",
|
|
2886
2919
|
props: {
|
|
2887
|
-
|
|
2920
|
+
...Ie(),
|
|
2888
2921
|
withPoints: {
|
|
2889
2922
|
type: Boolean,
|
|
2890
2923
|
default: !0
|
|
@@ -2913,7 +2946,7 @@ const yt = 1, Eo = /* @__PURE__ */ C({
|
|
|
2913
2946
|
}), s = v(() => {
|
|
2914
2947
|
if (r.hoveredIndex === -1)
|
|
2915
2948
|
return;
|
|
2916
|
-
const T =
|
|
2949
|
+
const T = sn(
|
|
2917
2950
|
d.value,
|
|
2918
2951
|
r.hoveredIndex
|
|
2919
2952
|
);
|
|
@@ -2923,7 +2956,7 @@ const yt = 1, Eo = /* @__PURE__ */ C({
|
|
|
2923
2956
|
// Move to X index, Vertical line to the highest point
|
|
2924
2957
|
};
|
|
2925
2958
|
}), _ = v(
|
|
2926
|
-
() => o.value && yt / (
|
|
2959
|
+
() => o.value && yt / (cn(o.value) - 1)
|
|
2927
2960
|
// Subtracting the first line (read below)
|
|
2928
2961
|
), m = v(
|
|
2929
2962
|
() => {
|
|
@@ -2939,13 +2972,13 @@ const yt = 1, Eo = /* @__PURE__ */ C({
|
|
|
2939
2972
|
function f(T) {
|
|
2940
2973
|
return d.value[T].values;
|
|
2941
2974
|
}
|
|
2942
|
-
function
|
|
2975
|
+
function k(T, D) {
|
|
2943
2976
|
var R, G;
|
|
2944
2977
|
const S = T === 0 ? [] : [
|
|
2945
2978
|
(R = f(D)[T - 1]) == null ? void 0 : R.value,
|
|
2946
2979
|
(G = f(D)[T]) == null ? void 0 : G.value
|
|
2947
2980
|
];
|
|
2948
|
-
return
|
|
2981
|
+
return Ho(
|
|
2949
2982
|
T,
|
|
2950
2983
|
S,
|
|
2951
2984
|
o.value,
|
|
@@ -2966,13 +2999,13 @@ const yt = 1, Eo = /* @__PURE__ */ C({
|
|
|
2966
2999
|
y: S === null ? l.value(l.value.domain()[1]) : l.value(S)
|
|
2967
3000
|
};
|
|
2968
3001
|
}
|
|
2969
|
-
function
|
|
3002
|
+
function E(T) {
|
|
2970
3003
|
return r.hoveredIndex === T;
|
|
2971
3004
|
}
|
|
2972
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition:
|
|
3005
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: yt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: i, tooltipAnchorAttributes: u, updateTooltipAnchorAttributes: c, computedGroupData: d, overlayLineAttributes: s, animationDuration: _, pointRadius: m, xAxisOffset: p, domain: h, computedWithPoints: y, getValuesFromDataset: f, getPathDefinition: k, getLineTransitionParams: x, getPointPosition: A, isPointActive: E, LumeLine: To, LumePoint: Eo };
|
|
2973
3006
|
}
|
|
2974
3007
|
});
|
|
2975
|
-
var
|
|
3008
|
+
var Do = function() {
|
|
2976
3009
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2977
3010
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
2978
3011
|
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, i) {
|
|
@@ -2985,33 +3018,33 @@ var wo = function() {
|
|
|
2985
3018
|
} } }, "lume-point", n.getPointPosition(i, o), !1));
|
|
2986
3019
|
}), 1) : e._e()]);
|
|
2987
3020
|
})], 2);
|
|
2988
|
-
},
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
3021
|
+
}, So = [], Ro = /* @__PURE__ */ w(
|
|
3022
|
+
Co,
|
|
3023
|
+
Do,
|
|
3024
|
+
So,
|
|
2992
3025
|
!1,
|
|
2993
3026
|
null,
|
|
2994
3027
|
"44ba7be1",
|
|
2995
3028
|
null,
|
|
2996
3029
|
null
|
|
2997
3030
|
);
|
|
2998
|
-
const Bt =
|
|
3031
|
+
const Bt = Ro.exports, Po = {
|
|
2999
3032
|
margins: ae.VERTICAL,
|
|
3000
3033
|
startOnZero: !0,
|
|
3001
3034
|
withTooltip: !0,
|
|
3002
3035
|
xAxisOptions: {},
|
|
3003
3036
|
yAxisOptions: { gridLines: !0 }
|
|
3004
|
-
},
|
|
3037
|
+
}, Bo = /* @__PURE__ */ H({
|
|
3005
3038
|
__name: "lume-line-chart",
|
|
3006
3039
|
props: {
|
|
3007
|
-
...
|
|
3040
|
+
...ce(null, !1)
|
|
3008
3041
|
},
|
|
3009
3042
|
setup(t, { emit: e }) {
|
|
3010
|
-
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { options: o } = B(r), { allOptions: l } = K(o,
|
|
3011
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart:
|
|
3043
|
+
const r = t, { componentEventPropagator: n } = J(e), a = oe(M()), { options: o } = B(r), { allOptions: l } = K(o, Po);
|
|
3044
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: de, LumeLineGroup: Bt };
|
|
3012
3045
|
}
|
|
3013
3046
|
});
|
|
3014
|
-
var
|
|
3047
|
+
var Fo = function() {
|
|
3015
3048
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3016
3049
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.allOptions, "data-j-lume-line-chart": "" }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3017
3050
|
return [r(n.LumeLineGroup, e._g(e._b({}, "lume-line-group", a, !1), n.componentEventPropagator))];
|
|
@@ -3019,29 +3052,29 @@ var So = function() {
|
|
|
3019
3052
|
return { key: o, fn: function(l) {
|
|
3020
3053
|
return [e._t(o, null, null, l || {})];
|
|
3021
3054
|
} };
|
|
3022
|
-
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3023
|
-
},
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3055
|
+
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
3056
|
+
}, Go = [], jo = /* @__PURE__ */ w(
|
|
3057
|
+
Bo,
|
|
3058
|
+
Fo,
|
|
3059
|
+
Go,
|
|
3027
3060
|
!1,
|
|
3028
3061
|
null,
|
|
3029
3062
|
null,
|
|
3030
3063
|
null,
|
|
3031
3064
|
null
|
|
3032
3065
|
);
|
|
3033
|
-
const
|
|
3034
|
-
function
|
|
3066
|
+
const rl = jo.exports;
|
|
3067
|
+
function Vo(t) {
|
|
3035
3068
|
return { areaPathDefinition: v(
|
|
3036
3069
|
() => function(r, n) {
|
|
3037
3070
|
if (!r || !n || X(r) || X(n))
|
|
3038
3071
|
return;
|
|
3039
3072
|
const a = t.value[0].values;
|
|
3040
|
-
return
|
|
3073
|
+
return Ut().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
3041
3074
|
}
|
|
3042
3075
|
) };
|
|
3043
3076
|
}
|
|
3044
|
-
const
|
|
3077
|
+
const Mo = {
|
|
3045
3078
|
margins: {
|
|
3046
3079
|
top: 0,
|
|
3047
3080
|
right: 0,
|
|
@@ -3055,14 +3088,14 @@ const Fo = {
|
|
|
3055
3088
|
tooltipOptions: {
|
|
3056
3089
|
showTitle: !1
|
|
3057
3090
|
}
|
|
3058
|
-
},
|
|
3091
|
+
}, zo = /* @__PURE__ */ H({
|
|
3059
3092
|
__name: "lume-sparkline-chart",
|
|
3060
3093
|
props: {
|
|
3061
3094
|
...Ke(null),
|
|
3062
3095
|
...pe()
|
|
3063
3096
|
},
|
|
3064
3097
|
setup(t, { expose: e, emit: r }) {
|
|
3065
|
-
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Je(l), { allOptions: c } = K(i,
|
|
3098
|
+
const n = t, { componentEventPropagator: a } = J(r), o = oe(M()), { data: l, options: i } = B(n), { internalData: u } = Je(l), { allOptions: c } = K(i, Mo), { computedLineData: d } = Pt(u), { areaPathDefinition: s } = Vo(d), _ = v(() => {
|
|
3066
3099
|
var y, f;
|
|
3067
3100
|
return (f = (y = u.value) == null ? void 0 : y[0]) == null ? void 0 : f.color;
|
|
3068
3101
|
}), m = v(
|
|
@@ -3077,16 +3110,16 @@ const Fo = {
|
|
|
3077
3110
|
noMinSize: !0
|
|
3078
3111
|
};
|
|
3079
3112
|
}
|
|
3080
|
-
function h(y, f,
|
|
3113
|
+
function h(y, f, k) {
|
|
3081
3114
|
if (y.length)
|
|
3082
|
-
return fe().range([0,
|
|
3115
|
+
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3083
3116
|
}
|
|
3084
3117
|
return e({
|
|
3085
3118
|
areaPathDefinition: s
|
|
3086
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart:
|
|
3119
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: i, internalData: u, allOptions: c, computedLineData: d, areaPathDefinition: s, computedColor: _, areaColor: m, getSparklineOptions: p, xScaleGenerator: h, LumeChart: de, LumeLineGroup: Bt };
|
|
3087
3120
|
}
|
|
3088
3121
|
});
|
|
3089
|
-
var
|
|
3122
|
+
var Wo = function() {
|
|
3090
3123
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
3091
3124
|
return r(n.LumeChart, e._g(e._b({ attrs: { "chart-type": "line", options: n.getSparklineOptions(n.allOptions), "x-scale": n.xScaleGenerator }, scopedSlots: e._u([{ key: "groups", fn: function(a) {
|
|
3092
3125
|
return [n.allOptions.showArea ? r("path", { class: [
|
|
@@ -3100,41 +3133,42 @@ var jo = function() {
|
|
|
3100
3133
|
return [e._t(o, null, null, l || {})];
|
|
3101
3134
|
} };
|
|
3102
3135
|
})], null, !0) }, "lume-chart", n.props, !1), n.componentEventPropagator));
|
|
3103
|
-
},
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3136
|
+
}, Zo = [], Uo = /* @__PURE__ */ w(
|
|
3137
|
+
zo,
|
|
3138
|
+
Wo,
|
|
3139
|
+
Zo,
|
|
3107
3140
|
!1,
|
|
3108
3141
|
null,
|
|
3109
3142
|
"bda226a1",
|
|
3110
3143
|
null,
|
|
3111
3144
|
null
|
|
3112
3145
|
);
|
|
3113
|
-
const
|
|
3146
|
+
const al = Uo.exports;
|
|
3114
3147
|
export {
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3148
|
+
Qo as LumeAlluvialDiagram,
|
|
3149
|
+
Ca as LumeAlluvialGroup,
|
|
3150
|
+
da as LumeAlluvialNodeHeader,
|
|
3151
|
+
ta as LumeAlluvialNodeLabel,
|
|
3152
|
+
la as LumeAlluvialNodeValue,
|
|
3153
|
+
Hn as LumeAxis,
|
|
3120
3154
|
Ye as LumeBar,
|
|
3121
|
-
|
|
3155
|
+
qo as LumeBarChart,
|
|
3122
3156
|
Qe as LumeBarGroup,
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3157
|
+
de as LumeChart,
|
|
3158
|
+
zn as LumeChartContainer,
|
|
3159
|
+
Yn as LumeChartLegend,
|
|
3160
|
+
tl as LumeGroupedBarChart,
|
|
3161
|
+
To as LumeLine,
|
|
3162
|
+
rl as LumeLineChart,
|
|
3129
3163
|
Bt as LumeLineGroup,
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3164
|
+
Cr as LumeOverlayGroup,
|
|
3165
|
+
Eo as LumePoint,
|
|
3166
|
+
el as LumeSingleBarChart,
|
|
3167
|
+
al as LumeSparklineChart,
|
|
3168
|
+
nl as LumeStackedBarChart,
|
|
3169
|
+
pr as LumeTooltip,
|
|
3170
|
+
cr as LumeTooltipItem,
|
|
3171
|
+
or as LumeTooltipSummary,
|
|
3172
|
+
er as LumeTooltipTitle
|
|
3139
3173
|
};
|
|
3140
3174
|
//# sourceMappingURL=index.js.map
|