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