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