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