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