@adyen/lume 1.11.4 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts +18 -10
- 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 +12 -12
- 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/defaults.d.ts +5 -6
- package/dist/@types/components/charts/lume-grouped-bar-chart/defaults.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts +22 -14
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts +22 -14
- 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/defaults.d.ts +5 -5
- package/dist/@types/components/charts/lume-single-bar-chart/defaults.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts +22 -14
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts +16 -8
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts +5 -7
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts +22 -14
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-axis/components/lume-tick/lume-tick.vue.d.ts +9 -8
- package/dist/@types/components/core/lume-axis/components/lume-tick/lume-tick.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-axis/lume-axis.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-bar/lume-bar.vue.d.ts +4 -4
- package/dist/@types/components/core/lume-bar/lume-bar.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts +247 -77
- 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 +18 -7
- 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-line/lume-line.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-point/lume-point.vue.d.ts +45 -45
- package/dist/@types/components/core/lume-point/lume-point.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/lume-tooltip-item.vue.d.ts +13 -5
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-item/lume-tooltip-item.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/lume-tooltip-summary.vue.d.ts +12 -4
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-summary/lume-tooltip-summary.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/lume-tooltip-title.vue.d.ts +11 -3
- package/dist/@types/components/core/lume-tooltip/components/lume-tooltip-title/lume-tooltip-title.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts +2 -2
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts +16 -6
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/lume-alluvial-node-label.vue.d.ts +15 -4
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-label/lume-alluvial-node-label.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/lume-alluvial-node-value.vue.d.ts +12 -4
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-value/lume-alluvial-node-value.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-graph.d.ts +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-hover.d.ts +244 -84
- package/dist/@types/components/groups/lume-alluvial-group/composables/alluvial-hover.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts +152 -142
- 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/stacked-mixin.d.ts +2 -2
- 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 +4 -4
- package/dist/@types/components/groups/lume-bar-group/lume-bar-group.vue.d.ts.map +1 -1
- 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 +4 -4
- package/dist/@types/components/groups/lume-overlay-group/lume-overlay-group.vue.d.ts.map +1 -1
- package/dist/@types/composables/base.d.ts +5 -5
- package/dist/@types/composables/base.d.ts.map +1 -1
- package/dist/@types/composables/events.d.ts.map +1 -1
- package/dist/@types/composables/format.d.ts +1 -1
- package/dist/@types/composables/format.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 -10
- package/dist/@types/composables/line-null-values.d.ts.map +1 -1
- package/dist/@types/composables/options.d.ts.map +1 -1
- package/dist/@types/composables/props.d.ts +8 -8
- package/dist/@types/composables/props.d.ts.map +1 -1
- package/dist/@types/composables/scales.d.ts +2 -2
- 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/docs/storybook-helpers.d.ts.map +1 -1
- package/dist/@types/plugin.d.ts.map +1 -1
- package/dist/@types/types/dataset.d.ts +1 -0
- package/dist/@types/types/dataset.d.ts.map +1 -1
- package/dist/@types/types/options.d.ts +1 -1
- package/dist/@types/types/options.d.ts.map +1 -1
- package/dist/@types/utils/helpers.d.ts +0 -8
- package/dist/@types/utils/helpers.d.ts.map +1 -1
- package/dist/@types/utils/margins.d.ts.map +1 -1
- package/dist/common/B8Yzpn9z.js +5 -0
- package/dist/common/B8Yzpn9z.js.map +1 -0
- package/dist/common/{DOsNWEJz.js → Bbm8lOKv.js} +554 -554
- package/dist/common/Bbm8lOKv.js.map +1 -0
- package/dist/common/DmfABIXc.js +5 -0
- package/dist/common/DmfABIXc.js.map +1 -0
- package/dist/common/Lrbt_T-f.js +5 -0
- package/dist/common/Lrbt_T-f.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/scss/components/lume-point.scss +5 -2
- package/dist/scss/main.scss +9 -9
- package/dist/styles/main.css +2 -2
- package/package.json +6 -6
- package/dist/common/B2eP8VXX.js +0 -5
- package/dist/common/B2eP8VXX.js.map +0 -1
- package/dist/common/BVaEQc6H.js +0 -5
- package/dist/common/BVaEQc6H.js.map +0 -1
- package/dist/common/DOsNWEJz.js.map +0 -1
- package/dist/common/phC4rovR.js +0 -5
- package/dist/common/phC4rovR.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as N, ref as w, isRef as
|
|
2
|
-
import { sankeyLinkHorizontal as
|
|
3
|
-
import { format as
|
|
4
|
-
import { createPopper as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as N, ref as w, isRef as kt, computed as d, watch as H, toRefs as S, inject as Le, reactive as Oe, onMounted as ee, watchEffect as xt, onBeforeUnmount as At, useSlots as M, nextTick as He, provide as Ee, defineAsyncComponent as Ne } from "vue";
|
|
2
|
+
import { sankeyLinkHorizontal as zt, sankey as Wt, sankeyJustify as Zt } from "d3-sankey";
|
|
3
|
+
import { format as Ut, ticks as Xt, scaleLinear as fe, scaleBand as pe, link as Yt, line as Kt, area as Jt } from "d3";
|
|
4
|
+
import { createPopper as Qt } from "@popperjs/core";
|
|
5
|
+
const qt = /* @__PURE__ */ N({
|
|
6
6
|
__name: "lume-tick",
|
|
7
7
|
props: {
|
|
8
8
|
value: {
|
|
@@ -44,14 +44,14 @@ const Qt = /* @__PURE__ */ N({
|
|
|
44
44
|
return e({ ref: n }), { __sfc: !0, emit: r, labelRef: n };
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
function E(t, e, r, n, a, o, l,
|
|
48
|
-
var
|
|
49
|
-
return e && (
|
|
47
|
+
function E(t, e, r, n, a, o, l, u) {
|
|
48
|
+
var i = typeof t == "function" ? t.options : t;
|
|
49
|
+
return e && (i.render = e, i.staticRenderFns = r, i._compiled = !0), o && (i._scopeId = "data-v-" + o), {
|
|
50
50
|
exports: t,
|
|
51
|
-
options:
|
|
51
|
+
options: i
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var en = function() {
|
|
55
55
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
56
56
|
return r("g", e._b({ staticClass: "axis__tick", class: {
|
|
57
57
|
"axis__tick--hovered": e.isHovered,
|
|
@@ -61,15 +61,15 @@ var qt = function() {
|
|
|
61
61
|
}, click: function(a) {
|
|
62
62
|
return n.emit("click", a);
|
|
63
63
|
} } }, "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()]);
|
|
64
|
-
},
|
|
65
|
-
Qt,
|
|
64
|
+
}, tn = [], nn = /* @__PURE__ */ E(
|
|
66
65
|
qt,
|
|
67
66
|
en,
|
|
67
|
+
tn,
|
|
68
68
|
!1,
|
|
69
69
|
null,
|
|
70
70
|
"59ddc0a6"
|
|
71
71
|
);
|
|
72
|
-
const
|
|
72
|
+
const rn = nn.exports, an = [
|
|
73
73
|
"controls",
|
|
74
74
|
"legend",
|
|
75
75
|
"axes",
|
|
@@ -77,10 +77,10 @@ const nn = tn.exports, rn = [
|
|
|
77
77
|
"tooltip",
|
|
78
78
|
"tooltip-content"
|
|
79
79
|
];
|
|
80
|
-
function
|
|
80
|
+
function Tt() {
|
|
81
81
|
return process.env.NODE_ENV === "production";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Lt(t) {
|
|
84
84
|
return (t == null ? void 0 : t.map(
|
|
85
85
|
(e) => e.values.map((r) => r == null ? void 0 : r.value).flat()
|
|
86
86
|
).flat()) || [];
|
|
@@ -88,7 +88,7 @@ function Tt(t) {
|
|
|
88
88
|
function We(t) {
|
|
89
89
|
return t.length === 1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function on(t) {
|
|
92
92
|
return !!t && t.every(
|
|
93
93
|
(e) => "color" in e
|
|
94
94
|
);
|
|
@@ -96,26 +96,26 @@ function an(t) {
|
|
|
96
96
|
function De(t) {
|
|
97
97
|
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ot(t, e) {
|
|
100
100
|
const r = { ...t };
|
|
101
101
|
return Object.entries(e).forEach(([n, a]) => {
|
|
102
|
-
r[n] = De(t[n]) && De(a) ?
|
|
102
|
+
r[n] = De(t[n]) && De(a) ? Ot(t[n], a) : a;
|
|
103
103
|
}), r;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function ln(t) {
|
|
106
106
|
return t != null && De(t) && "value" in t;
|
|
107
107
|
}
|
|
108
108
|
function U(t) {
|
|
109
109
|
return (t == null ? void 0 : t.bandwidth) !== void 0;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function un(t) {
|
|
112
112
|
return U(t) ? t.step() : Math.max(...t.range()) / Math.max(...t.domain());
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function sn(t) {
|
|
115
115
|
const [e, r] = t.domain();
|
|
116
116
|
return e == null || r == null || e === 0 && r === 0;
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const cn = (t, e) => {
|
|
119
119
|
if (!t)
|
|
120
120
|
throw new Error("Data is not a valid array");
|
|
121
121
|
if (t.length === 0)
|
|
@@ -124,17 +124,17 @@ const sn = (t, e) => {
|
|
|
124
124
|
({ values: n }) => n.length - 1 >= e
|
|
125
125
|
) || q(X.IndexExceedsLengthOfDataSets);
|
|
126
126
|
};
|
|
127
|
-
function
|
|
127
|
+
function dn(t, e) {
|
|
128
128
|
var r;
|
|
129
|
-
return
|
|
129
|
+
return cn(t, e), ((r = t.reduce(
|
|
130
130
|
(n, a) => {
|
|
131
131
|
var o, l;
|
|
132
132
|
return (((o = n.values[e]) == null ? void 0 : o.value) ?? 0) > (((l = a.values[e]) == null ? void 0 : l.value) ?? 0) ? n : a;
|
|
133
133
|
}
|
|
134
134
|
).values[e]) == null ? void 0 : r.value) || 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const e =
|
|
136
|
+
function It(t) {
|
|
137
|
+
const e = kt(t) ? t.value : t;
|
|
138
138
|
if (!e)
|
|
139
139
|
throw new Error("No empty array can be created from specified data value");
|
|
140
140
|
const r = Math.max(
|
|
@@ -143,13 +143,13 @@ function Ot(t) {
|
|
|
143
143
|
);
|
|
144
144
|
return Array(r).fill(null);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function vn(t) {
|
|
147
147
|
return U(t) ? t.domain().length : Math.max(...t.domain());
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function fn(t, e) {
|
|
150
150
|
return (r) => Math.round(t * (1 - r) + e * r);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function pn(t, e, r) {
|
|
153
153
|
const n = e, a = t.slice(0, n);
|
|
154
154
|
return t.slice(n).concat(a);
|
|
155
155
|
}
|
|
@@ -163,18 +163,14 @@ function ae(t) {
|
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function mn(t) {
|
|
167
167
|
return Object.assign(
|
|
168
168
|
{},
|
|
169
169
|
...Object.keys(t).map(
|
|
170
|
-
(e) =>
|
|
170
|
+
(e) => an.includes(e) ? {} : { [e]: t[e] }
|
|
171
171
|
)
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
const mn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce(
|
|
175
|
-
(e, r) => e += (r &= 63) < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r > 62 ? "-" : "_",
|
|
176
|
-
""
|
|
177
|
-
);
|
|
178
174
|
function Ze(t, e) {
|
|
179
175
|
const r = e - t.length;
|
|
180
176
|
return r > 0 ? [...t, ...Array(r).fill({ value: null })] : t;
|
|
@@ -183,14 +179,14 @@ var X = /* @__PURE__ */ ((t) => (t.DatasetLength = `Our guidelines highly recomm
|
|
|
183
179
|
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))(X || {});
|
|
184
180
|
const _n = "[lume] ";
|
|
185
181
|
function q(t, e = !0) {
|
|
186
|
-
e &&
|
|
182
|
+
e && Tt() || console.warn(_n + "Warning: " + t);
|
|
187
183
|
}
|
|
188
184
|
const Ae = (t) => {
|
|
189
185
|
let e = null;
|
|
190
186
|
switch (typeof t) {
|
|
191
187
|
case "string":
|
|
192
188
|
try {
|
|
193
|
-
e =
|
|
189
|
+
e = Ut(t);
|
|
194
190
|
} catch {
|
|
195
191
|
q(X.InvalidFormat), e = null;
|
|
196
192
|
}
|
|
@@ -213,8 +209,8 @@ const Ae = (t) => {
|
|
|
213
209
|
});
|
|
214
210
|
function Y(t, e) {
|
|
215
211
|
return { allOptions: d(() => {
|
|
216
|
-
const n =
|
|
217
|
-
return n ?
|
|
212
|
+
const n = kt(e) ? e == null ? void 0 : e.value : e;
|
|
213
|
+
return n ? Ot(n, t.value) : t.value;
|
|
218
214
|
}) };
|
|
219
215
|
}
|
|
220
216
|
const hn = 0.2;
|
|
@@ -222,29 +218,29 @@ function gn(t, e, r) {
|
|
|
222
218
|
const n = w(), a = d(() => Math.max(...t.value.range())), o = d(() => e.value.length);
|
|
223
219
|
function l() {
|
|
224
220
|
if (!e.value) return;
|
|
225
|
-
const
|
|
221
|
+
const i = e.value.reduce(
|
|
226
222
|
(v, s) => v + s.ref.getBoundingClientRect().width,
|
|
227
223
|
0
|
|
228
|
-
), c = Math.ceil(
|
|
224
|
+
), c = Math.ceil(i / o.value);
|
|
229
225
|
n.value = c + c * hn;
|
|
230
226
|
}
|
|
231
|
-
function i
|
|
227
|
+
function u(i) {
|
|
232
228
|
if (!e.value) return !0;
|
|
233
229
|
const c = r.value.skip, v = e.value.length;
|
|
234
|
-
if (
|
|
230
|
+
if (i === 0) return !0;
|
|
235
231
|
const s = a.value / v, f = typeof c == "number" && c > 0 && c + 1 || Math.ceil(n.value / s);
|
|
236
|
-
return
|
|
232
|
+
return i % f === 0;
|
|
237
233
|
}
|
|
238
|
-
return H(e, l), { showTick:
|
|
234
|
+
return H(e, l), { showTick: u };
|
|
239
235
|
}
|
|
240
|
-
const
|
|
236
|
+
const L = {
|
|
241
237
|
HORIZONTAL: "horizontal",
|
|
242
238
|
VERTICAL: "vertical"
|
|
243
239
|
}, yn = {
|
|
244
240
|
SINGLE: "single",
|
|
245
241
|
GROUPED: "grouped",
|
|
246
242
|
STACKED: "stacked"
|
|
247
|
-
}, $t = "No data", rt = 20,
|
|
243
|
+
}, $t = "No data", rt = 20, wt = 0.33, Et = 0.5, Nt = 12, _e = 8, bn = 1, kn = [
|
|
248
244
|
"auto",
|
|
249
245
|
"auto-start",
|
|
250
246
|
"auto-end",
|
|
@@ -261,10 +257,10 @@ const O = {
|
|
|
261
257
|
"left-start",
|
|
262
258
|
"left-end"
|
|
263
259
|
];
|
|
264
|
-
function
|
|
260
|
+
function Ie(t) {
|
|
265
261
|
t != null && t.closest("svg") || q(X.NotContainedInSvg);
|
|
266
262
|
}
|
|
267
|
-
const
|
|
263
|
+
const Ht = {
|
|
268
264
|
/** Displays a line for each tick. */
|
|
269
265
|
gridLines: !1,
|
|
270
266
|
/** Displays the axis title. */
|
|
@@ -281,41 +277,41 @@ const Nt = {
|
|
|
281
277
|
/** Space between the tick label and the axis line. */
|
|
282
278
|
tickPadding: 12
|
|
283
279
|
}, xn = {
|
|
284
|
-
...
|
|
280
|
+
...Ht,
|
|
285
281
|
withTitle: !1,
|
|
286
282
|
skip: !0
|
|
287
283
|
}, An = {
|
|
288
|
-
...
|
|
284
|
+
...Ht,
|
|
289
285
|
gridLines: !0
|
|
290
286
|
}, Tn = function(t, e, r) {
|
|
291
287
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
292
|
-
function a(
|
|
288
|
+
function a(i, c) {
|
|
293
289
|
return {
|
|
294
|
-
transform: `translate(${(t.value(c) ?? t.value(
|
|
290
|
+
transform: `translate(${(t.value(c) ?? t.value(i)) - n.value}, 0)`
|
|
295
291
|
};
|
|
296
292
|
}
|
|
297
|
-
function o(
|
|
293
|
+
function o(i) {
|
|
298
294
|
var v;
|
|
299
295
|
const c = Math.max(
|
|
300
296
|
t.value.step(),
|
|
301
|
-
(
|
|
297
|
+
(i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : t.value.step()) + 20
|
|
302
298
|
);
|
|
303
299
|
return {
|
|
304
300
|
x: -(c - t.value.step()) / 2,
|
|
305
301
|
width: c,
|
|
306
|
-
height: r.value.tickPadding +
|
|
302
|
+
height: r.value.tickPadding + Nt + _e
|
|
307
303
|
};
|
|
308
304
|
}
|
|
309
305
|
function l() {
|
|
310
|
-
const
|
|
306
|
+
const i = t.value.step() / 2;
|
|
311
307
|
return {
|
|
312
|
-
x1:
|
|
313
|
-
x2:
|
|
308
|
+
x1: i,
|
|
309
|
+
x2: i,
|
|
314
310
|
y1: -e.value.height
|
|
315
311
|
// Negative height means it goes from bottom to top
|
|
316
312
|
};
|
|
317
313
|
}
|
|
318
|
-
function
|
|
314
|
+
function u() {
|
|
319
315
|
return {
|
|
320
316
|
x: t.value.step() / 2,
|
|
321
317
|
y: r.value.tickPadding,
|
|
@@ -327,18 +323,18 @@ const Nt = {
|
|
|
327
323
|
getGridLinesAttributes: l,
|
|
328
324
|
getTickGhostAttributes: o,
|
|
329
325
|
getTickGroupAttributes: a,
|
|
330
|
-
getTickLabelAttributes:
|
|
326
|
+
getTickLabelAttributes: u
|
|
331
327
|
};
|
|
332
328
|
}, Ln = function(t, e, r) {
|
|
333
329
|
const n = d(() => t.value.step() * t.value.paddingInner() / 2);
|
|
334
|
-
function a(
|
|
330
|
+
function a(i, c) {
|
|
335
331
|
return {
|
|
336
|
-
transform: `translate(0, ${(t.value(c) ?? t.value(
|
|
332
|
+
transform: `translate(0, ${(t.value(c) ?? t.value(i)) - n.value})`
|
|
337
333
|
};
|
|
338
334
|
}
|
|
339
|
-
function o(
|
|
335
|
+
function o(i) {
|
|
340
336
|
var v;
|
|
341
|
-
const c = (
|
|
337
|
+
const c = (i ? (v = i.getComputedTextLength) == null ? void 0 : v.call(i) : 42) + r.value.tickPadding + _e;
|
|
342
338
|
return {
|
|
343
339
|
x: -c,
|
|
344
340
|
width: c,
|
|
@@ -346,14 +342,14 @@ const Nt = {
|
|
|
346
342
|
};
|
|
347
343
|
}
|
|
348
344
|
function l() {
|
|
349
|
-
const
|
|
345
|
+
const i = t.value.step() / 2;
|
|
350
346
|
return {
|
|
351
|
-
y1:
|
|
352
|
-
y2:
|
|
347
|
+
y1: i,
|
|
348
|
+
y2: i,
|
|
353
349
|
x1: e.value.width
|
|
354
350
|
};
|
|
355
351
|
}
|
|
356
|
-
function
|
|
352
|
+
function u() {
|
|
357
353
|
return {
|
|
358
354
|
x: -r.value.tickPadding,
|
|
359
355
|
y: t.value.step() / 2,
|
|
@@ -365,21 +361,21 @@ const Nt = {
|
|
|
365
361
|
getGridLinesAttributes: l,
|
|
366
362
|
getTickGhostAttributes: o,
|
|
367
363
|
getTickGroupAttributes: a,
|
|
368
|
-
getTickLabelAttributes:
|
|
364
|
+
getTickLabelAttributes: u
|
|
369
365
|
};
|
|
370
366
|
}, On = function(t, e, r) {
|
|
371
367
|
const n = d(() => {
|
|
372
|
-
const
|
|
373
|
-
return
|
|
368
|
+
const i = t.value.ticks();
|
|
369
|
+
return i.length > 1 ? t.value(i[1]) - t.value(i[0]) : 0;
|
|
374
370
|
});
|
|
375
|
-
function a(
|
|
371
|
+
function a(i) {
|
|
376
372
|
return {
|
|
377
|
-
transform: `translate(${t.value(
|
|
373
|
+
transform: `translate(${t.value(i)}, 0)`
|
|
378
374
|
};
|
|
379
375
|
}
|
|
380
376
|
function o() {
|
|
381
377
|
return {
|
|
382
|
-
height: r.value.tickPadding +
|
|
378
|
+
height: r.value.tickPadding + Nt + _e,
|
|
383
379
|
width: n.value,
|
|
384
380
|
x: -(n.value / 2)
|
|
385
381
|
};
|
|
@@ -389,7 +385,7 @@ const Nt = {
|
|
|
389
385
|
y1: -e.value.height
|
|
390
386
|
};
|
|
391
387
|
}
|
|
392
|
-
function
|
|
388
|
+
function u() {
|
|
393
389
|
return {
|
|
394
390
|
y: r.value.tickPadding,
|
|
395
391
|
dy: "0.8em",
|
|
@@ -400,21 +396,21 @@ const Nt = {
|
|
|
400
396
|
getGridLinesAttributes: l,
|
|
401
397
|
getTickGhostAttributes: o,
|
|
402
398
|
getTickGroupAttributes: a,
|
|
403
|
-
getTickLabelAttributes:
|
|
399
|
+
getTickLabelAttributes: u
|
|
404
400
|
};
|
|
405
|
-
},
|
|
401
|
+
}, In = function(t, e, r) {
|
|
406
402
|
const n = d(() => {
|
|
407
|
-
const
|
|
408
|
-
return
|
|
403
|
+
const i = t.value.ticks();
|
|
404
|
+
return i.length > 1 ? t.value(i[1]) - t.value(i[0]) : 0;
|
|
409
405
|
});
|
|
410
|
-
function a(
|
|
406
|
+
function a(i) {
|
|
411
407
|
return {
|
|
412
|
-
transform: `translate(0, ${t.value(
|
|
408
|
+
transform: `translate(0, ${t.value(i)})`
|
|
413
409
|
};
|
|
414
410
|
}
|
|
415
|
-
function o(
|
|
411
|
+
function o(i) {
|
|
416
412
|
var v;
|
|
417
|
-
const c = (((v =
|
|
413
|
+
const c = (((v = i == null ? void 0 : i.getComputedTextLength) == null ? void 0 : v.call(i)) || 0) + r.value.tickPadding + _e;
|
|
418
414
|
return {
|
|
419
415
|
width: c,
|
|
420
416
|
height: n.value,
|
|
@@ -427,7 +423,7 @@ const Nt = {
|
|
|
427
423
|
x1: e.value.width
|
|
428
424
|
};
|
|
429
425
|
}
|
|
430
|
-
function
|
|
426
|
+
function u() {
|
|
431
427
|
return {
|
|
432
428
|
x: -r.value.tickPadding,
|
|
433
429
|
dy: "0.4em",
|
|
@@ -438,15 +434,15 @@ const Nt = {
|
|
|
438
434
|
getGridLinesAttributes: l,
|
|
439
435
|
getTickGhostAttributes: o,
|
|
440
436
|
getTickGroupAttributes: a,
|
|
441
|
-
getTickLabelAttributes:
|
|
437
|
+
getTickLabelAttributes: u
|
|
442
438
|
};
|
|
443
|
-
},
|
|
439
|
+
}, $n = {
|
|
444
440
|
"x-band-scale-axis": Tn,
|
|
445
441
|
"y-band-scale-axis": Ln,
|
|
446
442
|
"x-linear-scale-axis": On,
|
|
447
|
-
"y-linear-scale-axis":
|
|
443
|
+
"y-linear-scale-axis": In
|
|
448
444
|
};
|
|
449
|
-
var Re = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Re || {}),
|
|
445
|
+
var Re = /* @__PURE__ */ ((t) => (t.bandScale = "band-scale-axis", t.linearScale = "linear-scale-axis", t))(Re || {}), Pe = /* @__PURE__ */ ((t) => (t.left = "left", t.bottom = "bottom", t))(Pe || {}), xe = /* @__PURE__ */ ((t) => (t.x = "bottom", t.y = "left", t))(xe || {});
|
|
450
446
|
const wn = /* @__PURE__ */ N({
|
|
451
447
|
__name: "lume-axis",
|
|
452
448
|
props: {
|
|
@@ -462,7 +458,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
462
458
|
position: {
|
|
463
459
|
type: String,
|
|
464
460
|
default: void 0,
|
|
465
|
-
validator: (t) => t in
|
|
461
|
+
validator: (t) => t in Pe
|
|
466
462
|
},
|
|
467
463
|
containerSize: {
|
|
468
464
|
type: Object,
|
|
@@ -474,46 +470,46 @@ const wn = /* @__PURE__ */ N({
|
|
|
474
470
|
},
|
|
475
471
|
orientation: {
|
|
476
472
|
type: String,
|
|
477
|
-
default:
|
|
473
|
+
default: L.VERTICAL
|
|
478
474
|
},
|
|
479
475
|
...me()
|
|
480
476
|
},
|
|
481
477
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
482
478
|
setup(t, { emit: e }) {
|
|
483
|
-
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options:
|
|
479
|
+
const r = t, n = 16, { scale: a, containerSize: o, hoveredIndex: l, options: u, orientation: i } = S(r), c = Le("isEmpty", w(!1)), v = Oe({}), s = w(null), f = w(null), m = w(null), _ = d(
|
|
484
480
|
() => r.type ? xe[r.type] : r.position
|
|
485
481
|
), h = d(
|
|
486
482
|
() => r.type || (_.value === "left" ? "y" : "x")
|
|
487
483
|
), y = d(
|
|
488
|
-
() => h.value === "x" &&
|
|
484
|
+
() => h.value === "x" && i.value === L.VERTICAL || h.value === "y" && i.value === L.HORIZONTAL
|
|
489
485
|
), { allOptions: p } = Y(
|
|
490
|
-
|
|
486
|
+
u,
|
|
491
487
|
h.value === "x" ? xn : An
|
|
492
488
|
), { showTick: k } = gn(a, s, p), x = d(
|
|
493
|
-
() => c.value || !a.value ||
|
|
489
|
+
() => c.value || !a.value || sn(a.value)
|
|
494
490
|
), T = d(() => {
|
|
495
|
-
var g, A,
|
|
496
|
-
return h.value === "y" && x.value ? `translate(0, ${((g = o.value) == null ? void 0 : g.height) / 2})` : h.value === "x" && x.value ? `translate(-${((A = o.value) == null ? void 0 : A.width) / 2}, ${(
|
|
491
|
+
var g, A, O, G;
|
|
492
|
+
return h.value === "y" && x.value ? `translate(0, ${((g = o.value) == null ? void 0 : g.height) / 2})` : h.value === "x" && x.value ? `translate(-${((A = o.value) == null ? void 0 : A.width) / 2}, ${(O = o.value) == null ? void 0 : O.height})` : `translate(0, ${h.value === "x" ? (G = o.value) == null ? void 0 : G.height : 0})`;
|
|
497
493
|
}), I = d(() => {
|
|
498
494
|
if (!a.value) return [];
|
|
499
495
|
if (U(a.value))
|
|
500
496
|
return a.value.labels || a.value.domain();
|
|
501
|
-
const { tickCount: g } = p.value, [A,
|
|
502
|
-
return
|
|
503
|
-
}),
|
|
497
|
+
const { tickCount: g } = p.value, [A, O] = a.value.domain();
|
|
498
|
+
return Xt(A, O, g);
|
|
499
|
+
}), R = d(() => {
|
|
504
500
|
const { tickFormat: g } = p.value;
|
|
505
501
|
return Ae(g);
|
|
506
|
-
}),
|
|
502
|
+
}), $ = d(
|
|
507
503
|
() => p.value.withHover && y.value && l.value > -1
|
|
508
|
-
),
|
|
504
|
+
), D = d(
|
|
509
505
|
() => p.value.tickPadding + _e || n
|
|
510
|
-
),
|
|
506
|
+
), B = d(() => h.value === "x" ? (
|
|
511
507
|
// If x axis, get the tick height
|
|
512
508
|
Math.max(
|
|
513
509
|
...(s.value || []).map(
|
|
514
510
|
(g) => {
|
|
515
|
-
var A,
|
|
516
|
-
return ((
|
|
511
|
+
var A, O;
|
|
512
|
+
return ((O = (A = g.ref).getBBox) == null ? void 0 : O.call(A).height) + D.value;
|
|
517
513
|
}
|
|
518
514
|
)
|
|
519
515
|
)
|
|
@@ -522,21 +518,21 @@ const wn = /* @__PURE__ */ N({
|
|
|
522
518
|
Math.max(
|
|
523
519
|
...(s.value || []).map(
|
|
524
520
|
(g) => {
|
|
525
|
-
var A,
|
|
526
|
-
return ((
|
|
521
|
+
var A, O;
|
|
522
|
+
return ((O = (A = g.ref).getBBox) == null ? void 0 : O.call(A).width) + D.value;
|
|
527
523
|
}
|
|
528
524
|
)
|
|
529
525
|
)
|
|
530
526
|
));
|
|
531
|
-
function
|
|
527
|
+
function C(g) {
|
|
532
528
|
const { showTicks: A } = p.value;
|
|
533
|
-
return A === !1 ? "" :
|
|
529
|
+
return A === !1 ? "" : R.value(g);
|
|
534
530
|
}
|
|
535
|
-
function
|
|
536
|
-
e("mouseenter", { index: y.value ? g : null, value: A, event:
|
|
531
|
+
function F(g, A, O) {
|
|
532
|
+
e("mouseenter", { index: y.value ? g : null, value: A, event: O });
|
|
537
533
|
}
|
|
538
|
-
function J(g, A,
|
|
539
|
-
e("click", { index: g, value: A, event:
|
|
534
|
+
function J(g, A, O) {
|
|
535
|
+
e("click", { index: g, value: A, event: O });
|
|
540
536
|
}
|
|
541
537
|
function oe(g) {
|
|
542
538
|
var A;
|
|
@@ -546,7 +542,7 @@ const wn = /* @__PURE__ */ N({
|
|
|
546
542
|
function W() {
|
|
547
543
|
m.value = I.value.map(
|
|
548
544
|
(g, A) => ({
|
|
549
|
-
value:
|
|
545
|
+
value: C(g),
|
|
550
546
|
group: v.getTickGroupAttributes(g, A),
|
|
551
547
|
ghost: v.getTickGhostAttributes(oe(A)),
|
|
552
548
|
label: v.getTickLabelAttributes(),
|
|
@@ -559,14 +555,14 @@ const wn = /* @__PURE__ */ N({
|
|
|
559
555
|
}
|
|
560
556
|
function Q() {
|
|
561
557
|
if (!a.value) return;
|
|
562
|
-
const g = a.value.step ? "bandScale" : "linearScale", A =
|
|
558
|
+
const g = a.value.step ? "bandScale" : "linearScale", A = $n[`${h.value}-${Re[g]}`];
|
|
563
559
|
Object.entries(A(a, o, p) || []).forEach(
|
|
564
|
-
([
|
|
565
|
-
v[
|
|
560
|
+
([O, G]) => {
|
|
561
|
+
v[O] = G;
|
|
566
562
|
}
|
|
567
563
|
);
|
|
568
564
|
}
|
|
569
|
-
return H(a, Q, { flush: "sync", immediate: !0 }), H(a, W, { immediate: !0 }), H(s, W), H(
|
|
565
|
+
return H(a, Q, { flush: "sync", immediate: !0 }), H(a, W, { immediate: !0 }), H(s, W), H(B, (g) => e("lume__internal--axis-size", g)), H(r.containerSize, te), ee(() => Ie(f.value)), { __sfc: !0, SCALE_MIXIN_MAP: Re, POSITIONS: Pe, TYPES: xe, AXIS_LABEL_OFFSET: n, props: r, emit: e, scale: a, containerSize: o, hoveredIndex: l, options: u, orientation: i, isEmpty: c, mixins: v, tickRefs: s, root: f, ticksWithAttributes: m, computedPosition: _, computedType: h, shouldHover: y, allOptions: p, showTick: k, alignAxisBaseline: x, axisTransform: T, ticks: I, tickFormatter: R, isHovering: $, axisLabelOffset: D, axisSize: B, formatTick: C, handleTickMouseenter: F, handleTickClick: J, getTextNode: oe, setTicks: W, updateGridlines: te, init: Q, LumeTick: rn };
|
|
570
566
|
}
|
|
571
567
|
});
|
|
572
568
|
var En = function() {
|
|
@@ -601,19 +597,19 @@ function Rn(t, e, r, n) {
|
|
|
601
597
|
), l = d(
|
|
602
598
|
() => a.value ? t.value - 0.5 : t.value
|
|
603
599
|
// draws the 1px bar closer to the axis
|
|
604
|
-
),
|
|
600
|
+
), u = d(
|
|
605
601
|
() => o.value ? e.value - 0.5 : e.value
|
|
606
602
|
// draws the 1px bar closer to the axis
|
|
607
603
|
);
|
|
608
|
-
return { computedX: l, computedY:
|
|
604
|
+
return { computedX: l, computedY: u, shouldHaveMinWidth: a, shouldHaveMinHeight: o };
|
|
609
605
|
}
|
|
610
|
-
function
|
|
606
|
+
function Pn(t, e, r, n) {
|
|
611
607
|
const a = w(0), o = w(0), l = d(() => `${t.value + r.value / 2}px ${e.value + n.value / 2}px`);
|
|
612
608
|
return ee(() => {
|
|
613
609
|
a.value = r.value, o.value = n.value;
|
|
614
|
-
}), H(r, (
|
|
610
|
+
}), H(r, (u) => a.value = u), H(n, (u) => o.value = u), { computedWidth: a, computedHeight: o, transformOrigin: l };
|
|
615
611
|
}
|
|
616
|
-
const
|
|
612
|
+
const Sn = /* @__PURE__ */ N({
|
|
617
613
|
__name: "lume-bar",
|
|
618
614
|
props: {
|
|
619
615
|
x: {
|
|
@@ -651,10 +647,10 @@ const Pn = /* @__PURE__ */ N({
|
|
|
651
647
|
},
|
|
652
648
|
emits: ["click", "mouseover", "mouseleave"],
|
|
653
649
|
setup(t, { emit: e }) {
|
|
654
|
-
const r = t, { x: n, y: a, width: o, height: l, transition:
|
|
655
|
-
() => typeof
|
|
656
|
-
), s = d(() =>
|
|
657
|
-
return ee(() =>
|
|
650
|
+
const r = t, { x: n, y: a, width: o, height: l, transition: u, classList: i } = S(r), c = w(null), v = d(
|
|
651
|
+
() => typeof i.value == "string" ? [i.value] : i.value
|
|
652
|
+
), s = d(() => u.value === "width"), f = d(() => u.value === "height"), m = Pn(n, a, o, l), { computedX: _, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: p } = Rn(n, a, o, l), k = d(() => y.value ? 1 : (s.value ? m.computedWidth : o).value), x = d(() => p.value ? 1 : (f.value ? m.computedHeight : l).value), T = s.value || f.value ? m.transformOrigin : null;
|
|
653
|
+
return ee(() => Ie(c.value)), { __sfc: !0, props: r, emit: e, x: n, y: a, width: o, height: l, transition: u, classList: i, root: c, computedClasses: v, shouldTransitionWidth: s, shouldTransitionHeight: f, transitionProps: m, computedX: _, computedY: h, shouldHaveMinWidth: y, shouldHaveMinHeight: p, computedWidth: k, computedHeight: x, transformOrigin: T };
|
|
658
654
|
}
|
|
659
655
|
});
|
|
660
656
|
var Bn = function() {
|
|
@@ -675,7 +671,7 @@ var Bn = function() {
|
|
|
675
671
|
return n.emit("mouseleave", a);
|
|
676
672
|
} } });
|
|
677
673
|
}, Cn = [], Gn = /* @__PURE__ */ E(
|
|
678
|
-
|
|
674
|
+
Sn,
|
|
679
675
|
Bn,
|
|
680
676
|
Cn,
|
|
681
677
|
!1,
|
|
@@ -683,7 +679,7 @@ var Bn = function() {
|
|
|
683
679
|
"8e8f732a"
|
|
684
680
|
);
|
|
685
681
|
const Ue = Gn.exports;
|
|
686
|
-
var ne = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(ne || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}),
|
|
682
|
+
var ne = /* @__PURE__ */ ((t) => (t.Categorical = "categorical", t.Sequential = "sequential", t.Divergent = "divergent", t))(ne || {}), z = /* @__PURE__ */ ((t) => (t.Skyblue = "skyblue", t.Royalblue = "royalblue", t.Violet = "violet", t.Darkteal = "darkteal", t.Gold = "gold", t))(z || {}), Dt = /* @__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))(Dt || {}), Xe = /* @__PURE__ */ ((t) => (t.SkyTeal = "skyblue-darkteal", t.VioletRoyal = "violet-royalblue", t.VioletTeal = "violet-darkteal", t.GoldTeal = "gold-darkteal", t.GoldRoyal = "gold-royalblue", t))(Xe || {}), Ye = /* @__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))(Ye || {}), Ke = /* @__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))(Ke || {});
|
|
687
683
|
const Fn = ne.Categorical, he = z.Skyblue, jn = Xe.SkyTeal;
|
|
688
684
|
function Vn(t) {
|
|
689
685
|
return t === ne.Divergent ? jn : he;
|
|
@@ -694,14 +690,14 @@ function Mn(t) {
|
|
|
694
690
|
function at(t, e) {
|
|
695
691
|
return e === ne.Divergent ? Object.values(Xe).includes(t) : Object.values({
|
|
696
692
|
...z,
|
|
697
|
-
...
|
|
693
|
+
...Dt,
|
|
698
694
|
...Ye,
|
|
699
695
|
...Ke
|
|
700
696
|
}).includes(t);
|
|
701
697
|
}
|
|
702
698
|
function zn(t, e) {
|
|
703
699
|
const r = Object.values(z).indexOf(t);
|
|
704
|
-
return
|
|
700
|
+
return pn(Object.values(z), r > -1 ? r : 0)[e];
|
|
705
701
|
}
|
|
706
702
|
function Wn(t, e) {
|
|
707
703
|
const r = 50 + e * 10;
|
|
@@ -726,7 +722,7 @@ function Un(t, e, r = Fn, n) {
|
|
|
726
722
|
return at(t, r) ? t : (n > 4 && (q(X.ColorLoop), n = n % 5), at(e, r) ? ot(e, r, n) : ot(Vn(r), r, n));
|
|
727
723
|
}
|
|
728
724
|
function Xn(t) {
|
|
729
|
-
return t.map((e) =>
|
|
725
|
+
return t.map((e) => ln(e) ? e : { value: e });
|
|
730
726
|
}
|
|
731
727
|
function Yn(t) {
|
|
732
728
|
return t.__internal === !0;
|
|
@@ -754,7 +750,7 @@ function Qe(t, e, r, n, a) {
|
|
|
754
750
|
const o = Oe({
|
|
755
751
|
width: 0,
|
|
756
752
|
height: 0
|
|
757
|
-
}), l =
|
|
753
|
+
}), l = crypto.randomUUID(), u = d(() => {
|
|
758
754
|
var v;
|
|
759
755
|
return t.value.length > 5 && q(X.DatasetLength), (v = t.value) == null ? void 0 : v.map(
|
|
760
756
|
(s, f) => {
|
|
@@ -773,16 +769,16 @@ function Qe(t, e, r, n, a) {
|
|
|
773
769
|
};
|
|
774
770
|
}
|
|
775
771
|
);
|
|
776
|
-
}),
|
|
772
|
+
}), i = d(() => Array.isArray(e.value) ? e.value : It(t.value).map((v, s) => s));
|
|
777
773
|
function c(v) {
|
|
778
|
-
const s = (a == null ? void 0 : a.value) ===
|
|
774
|
+
const s = (a == null ? void 0 : a.value) === L.HORIZONTAL && i.value.length * (((n == null ? void 0 : n.value.barHeight) || rt) * 2) + ((n == null ? void 0 : n.value.barHeight) || rt) || v.height;
|
|
779
775
|
o.width = v.width, o.height = s;
|
|
780
776
|
}
|
|
781
777
|
return {
|
|
782
778
|
chartID: l,
|
|
783
|
-
computedLabels:
|
|
779
|
+
computedLabels: i,
|
|
784
780
|
containerSize: o,
|
|
785
|
-
internalData:
|
|
781
|
+
internalData: u,
|
|
786
782
|
updateSize: c
|
|
787
783
|
};
|
|
788
784
|
}
|
|
@@ -798,12 +794,12 @@ const Kn = () => ({
|
|
|
798
794
|
});
|
|
799
795
|
function Jn(t, e, r, n, a) {
|
|
800
796
|
const o = w(null), l = w(null);
|
|
801
|
-
function
|
|
797
|
+
function u() {
|
|
802
798
|
var v, s, f, m;
|
|
803
|
-
const { width:
|
|
804
|
-
!
|
|
799
|
+
const { width: i, height: c } = r;
|
|
800
|
+
!i && !c || (n.value === L.HORIZONTAL ? (o.value = (v = t.value) != null && v.length ? it(
|
|
805
801
|
t.value,
|
|
806
|
-
|
|
802
|
+
i,
|
|
807
803
|
n.value,
|
|
808
804
|
a.value.startOnZero
|
|
809
805
|
) : null, l.value = (s = e.value) != null && s.length ? lt(
|
|
@@ -813,36 +809,39 @@ function Jn(t, e, r, n, a) {
|
|
|
813
809
|
a.value
|
|
814
810
|
) : null) : (o.value = (f = e.value) != null && f.length ? lt(
|
|
815
811
|
e.value,
|
|
816
|
-
|
|
812
|
+
i,
|
|
817
813
|
n.value,
|
|
818
814
|
a.value
|
|
819
|
-
) : null, l.value = (m = t.value) != null && m.length ?
|
|
815
|
+
) : null, l.value = (m = t.value) != null && m.length ? it(
|
|
820
816
|
t.value,
|
|
821
817
|
c,
|
|
822
818
|
n.value,
|
|
823
819
|
a.value.startOnZero
|
|
824
820
|
) : null));
|
|
825
821
|
}
|
|
826
|
-
return
|
|
822
|
+
return xt(u), { xScale: o, yScale: l };
|
|
827
823
|
}
|
|
828
824
|
function lt(t, e, r, n) {
|
|
829
|
-
const a = [0, e], { padding: o, paddingInner: l, paddingOuter:
|
|
825
|
+
const a = [0, e], { padding: o, paddingInner: l, paddingOuter: u } = n, i = o ?? (r === L.HORIZONTAL ? Et : wt);
|
|
830
826
|
return Object.assign(
|
|
831
|
-
|
|
827
|
+
pe().range(a).paddingInner(l ?? i).paddingOuter(u ?? i).domain(t.map((c, v) => v)),
|
|
832
828
|
{ labels: t }
|
|
833
829
|
);
|
|
834
830
|
}
|
|
835
|
-
function
|
|
836
|
-
const a =
|
|
831
|
+
function it(t, e, r, n) {
|
|
832
|
+
const a = Lt(t).filter((v) => v != null), o = [0, e];
|
|
837
833
|
if (a.length === 0)
|
|
838
|
-
return
|
|
839
|
-
const l = Math.min(...a),
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
834
|
+
return fe().range(o).domain([0, 0]).nice();
|
|
835
|
+
const l = Math.min(...a), u = n && l > 0 ? 0 : l;
|
|
836
|
+
let i = Math.max(...a);
|
|
837
|
+
n && i < 0 && (i = 0);
|
|
838
|
+
const c = r === L.HORIZONTAL ? [u, i] : [i, u];
|
|
839
|
+
return fe().range(o).domain(c).nice();
|
|
840
|
+
}
|
|
841
|
+
function ut(t) {
|
|
843
842
|
return (t == null ? void 0 : t.range) !== void 0 || (t == null ? void 0 : t.copy) !== void 0;
|
|
844
843
|
}
|
|
845
|
-
function
|
|
844
|
+
function Se(t, e) {
|
|
846
845
|
return U(t) ? t.bandwidth() / 2 + t(t.domain()[e]) : t(e);
|
|
847
846
|
}
|
|
848
847
|
function st(t, e, {
|
|
@@ -850,13 +849,13 @@ function st(t, e, {
|
|
|
850
849
|
paddingInner: n,
|
|
851
850
|
paddingOuter: a
|
|
852
851
|
} = {}) {
|
|
853
|
-
const o = r ?? (e ===
|
|
852
|
+
const o = r ?? (e === L.HORIZONTAL ? Et : wt);
|
|
854
853
|
return t.copy().paddingInner(n ?? o).paddingOuter(a ?? o);
|
|
855
854
|
}
|
|
856
855
|
function qe(t) {
|
|
857
|
-
return Object.values(
|
|
856
|
+
return Object.values(L).includes(t);
|
|
858
857
|
}
|
|
859
|
-
const
|
|
858
|
+
const ue = (t, e = !0) => ({
|
|
860
859
|
...Je(t),
|
|
861
860
|
...Kn(),
|
|
862
861
|
...me(),
|
|
@@ -871,7 +870,7 @@ const ce = (t, e = !0) => ({
|
|
|
871
870
|
...e ? {
|
|
872
871
|
orientation: {
|
|
873
872
|
type: String,
|
|
874
|
-
default:
|
|
873
|
+
default: L.VERTICAL,
|
|
875
874
|
validator: qe
|
|
876
875
|
}
|
|
877
876
|
} : {}
|
|
@@ -893,7 +892,7 @@ function qn() {
|
|
|
893
892
|
});
|
|
894
893
|
return ee(() => {
|
|
895
894
|
r.observe(t.value);
|
|
896
|
-
}),
|
|
895
|
+
}), At(() => {
|
|
897
896
|
r.unobserve(t.value);
|
|
898
897
|
}), { resizeState: e, resizeRef: t };
|
|
899
898
|
}
|
|
@@ -918,19 +917,19 @@ const er = /* @__PURE__ */ N({
|
|
|
918
917
|
},
|
|
919
918
|
orientation: {
|
|
920
919
|
type: String,
|
|
921
|
-
default:
|
|
920
|
+
default: L.VERTICAL,
|
|
922
921
|
validator: qe
|
|
923
922
|
}
|
|
924
923
|
},
|
|
925
924
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
926
925
|
setup(t, { emit: e }) {
|
|
927
|
-
const r = t, { margins: n, containerSize: a } =
|
|
926
|
+
const r = t, { margins: n, containerSize: a } = S(r), o = w(null), { resizeRef: l, resizeState: u } = qn(), i = d(
|
|
928
927
|
() => a.value.height + n.value.top + n.value.bottom
|
|
929
928
|
);
|
|
930
|
-
return
|
|
929
|
+
return xt(() => {
|
|
931
930
|
if (!o.value) return;
|
|
932
|
-
const { width: c } =
|
|
933
|
-
if (!c || r.orientation ===
|
|
931
|
+
const { width: c } = u.dimensions, { height: v } = o.value.getBoundingClientRect();
|
|
932
|
+
if (!c || r.orientation === L.VERTICAL && !v)
|
|
934
933
|
return;
|
|
935
934
|
const s = c - n.value.left - n.value.right, f = v - n.value.top - n.value.bottom, m = {
|
|
936
935
|
width: s > 0 ? s : 0,
|
|
@@ -939,7 +938,7 @@ const er = /* @__PURE__ */ N({
|
|
|
939
938
|
outerHeight: v
|
|
940
939
|
};
|
|
941
940
|
e("resize", m);
|
|
942
|
-
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState:
|
|
941
|
+
}), { __sfc: !0, props: r, emit: e, margins: n, containerSize: a, root: o, resizeRef: l, resizeState: u, svgHeight: i };
|
|
943
942
|
}
|
|
944
943
|
});
|
|
945
944
|
var tr = function() {
|
|
@@ -968,7 +967,7 @@ const ar = rr.exports, or = /* @__PURE__ */ N({
|
|
|
968
967
|
props: {
|
|
969
968
|
data: {
|
|
970
969
|
type: Array,
|
|
971
|
-
validator:
|
|
970
|
+
validator: on,
|
|
972
971
|
required: !0
|
|
973
972
|
}
|
|
974
973
|
},
|
|
@@ -988,15 +987,15 @@ var lr = function() {
|
|
|
988
987
|
return n.emit("mouseenter", { index: o, dataset: a, event: l });
|
|
989
988
|
} } }, [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) + " ")]);
|
|
990
989
|
}), 0);
|
|
991
|
-
},
|
|
990
|
+
}, ir = [], ur = /* @__PURE__ */ E(
|
|
992
991
|
or,
|
|
993
992
|
lr,
|
|
994
|
-
|
|
993
|
+
ir,
|
|
995
994
|
!1,
|
|
996
995
|
null,
|
|
997
996
|
"6f1d1c44"
|
|
998
997
|
);
|
|
999
|
-
const sr =
|
|
998
|
+
const sr = ur.exports, cr = {};
|
|
1000
999
|
var dr = function() {
|
|
1001
1000
|
var e = this, r = e._self._c;
|
|
1002
1001
|
return r("div", { staticClass: "lume-tooltip__title", attrs: { "data-j-tooltip__title": "" } }, [e._t("default")], 2);
|
|
@@ -1087,8 +1086,8 @@ const Tr = Ar.exports, Lr = /* @__PURE__ */ N({
|
|
|
1087
1086
|
},
|
|
1088
1087
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1089
1088
|
setup(t, { emit: e }) {
|
|
1090
|
-
const r = t, n = w(null), { items: a, options: o } =
|
|
1091
|
-
() =>
|
|
1089
|
+
const r = t, n = w(null), { items: a, options: o } = S(r), l = M(), u = w(null), { allOptions: i } = Y(o), c = d(
|
|
1090
|
+
() => i.value.fixedPositioning ?? r.fixedPositioning
|
|
1092
1091
|
), v = d(
|
|
1093
1092
|
() => c.value ? "fixed" : "absolute"
|
|
1094
1093
|
), s = d(() => [
|
|
@@ -1101,40 +1100,40 @@ const Tr = Ar.exports, Lr = /* @__PURE__ */ N({
|
|
|
1101
1100
|
},
|
|
1102
1101
|
{
|
|
1103
1102
|
name: "offset",
|
|
1104
|
-
options: { offset: [0,
|
|
1103
|
+
options: { offset: [0, i.value.offset || 8] }
|
|
1105
1104
|
},
|
|
1106
1105
|
...r.modifiers || []
|
|
1107
1106
|
]), f = d(
|
|
1108
|
-
() =>
|
|
1109
|
-
), m = d(() => Ae(
|
|
1107
|
+
() => i.value.showTitle !== !1 && r.title != null
|
|
1108
|
+
), m = d(() => Ae(i.value.valueFormat)), _ = d(() => Ae(i.value.titleFormat)), h = d(
|
|
1110
1109
|
() => {
|
|
1111
1110
|
var I;
|
|
1112
|
-
return ((I = a.value) == null ? void 0 : I.find((
|
|
1113
|
-
label:
|
|
1111
|
+
return ((I = a.value) == null ? void 0 : I.find((R) => R.isSummary)) || {
|
|
1112
|
+
label: i.value.summary ?? r.summary
|
|
1114
1113
|
};
|
|
1115
1114
|
}
|
|
1116
|
-
), y = d(() => l.summary || h.value.label), p = d(() => r.inverse ||
|
|
1115
|
+
), y = d(() => l.summary || h.value.label), p = d(() => r.inverse || i.value.inverse ? [...a.value].reverse() : a.value);
|
|
1117
1116
|
function k() {
|
|
1118
|
-
r.targetElement && n.value && (
|
|
1117
|
+
r.targetElement && n.value && (u.value = Qt(r.targetElement, n.value, {
|
|
1119
1118
|
placement: r.position,
|
|
1120
1119
|
strategy: v.value,
|
|
1121
1120
|
modifiers: s.value
|
|
1122
1121
|
}), e("opened", r.targetElement));
|
|
1123
1122
|
}
|
|
1124
1123
|
function x() {
|
|
1125
|
-
|
|
1124
|
+
u.value && (u.value.destroy(), e("closed"), n.value && n.value.classList.remove("lume-tooltip--animated"));
|
|
1126
1125
|
}
|
|
1127
1126
|
function T() {
|
|
1128
|
-
|
|
1129
|
-
|
|
1127
|
+
u.value && (i.value.withAnimation !== !1 && n.value && n.value.classList.add("lume-tooltip--animated"), r.targetElement ? function() {
|
|
1128
|
+
u.value.state.elements.reference = r.targetElement, u.value.update(), e("moved", r.targetElement);
|
|
1130
1129
|
}() : x());
|
|
1131
1130
|
}
|
|
1132
1131
|
return H(
|
|
1133
1132
|
() => r.targetElement,
|
|
1134
|
-
async (I,
|
|
1135
|
-
!
|
|
1133
|
+
async (I, R) => {
|
|
1134
|
+
!R && I ? (await He(), k()) : T();
|
|
1136
1135
|
}
|
|
1137
|
-
), ee(k),
|
|
1136
|
+
), ee(k), At(x), { __sfc: !0, props: r, emit: e, root: n, items: a, options: o, slots: l, popper: u, allOptions: i, computedFixedPositioning: c, strategy: v, allModifiers: s, showTitle: f, formatValue: m, formatTitle: _, summaryItem: h, hasSummary: y, computedItems: p, initPopper: k, destroyPopper: x, updatePopper: T, LumeTooltipTitle: pr, LumeTooltipSummary: yr, LumeTooltipItem: Tr };
|
|
1138
1137
|
}
|
|
1139
1138
|
});
|
|
1140
1139
|
var Or = function() {
|
|
@@ -1162,15 +1161,15 @@ var Or = function() {
|
|
|
1162
1161
|
});
|
|
1163
1162
|
})], 2)];
|
|
1164
1163
|
})], 2) : e._e();
|
|
1165
|
-
},
|
|
1164
|
+
}, Ir = [], $r = /* @__PURE__ */ E(
|
|
1166
1165
|
Lr,
|
|
1167
1166
|
Or,
|
|
1168
|
-
|
|
1167
|
+
Ir,
|
|
1169
1168
|
!1,
|
|
1170
1169
|
null,
|
|
1171
|
-
"
|
|
1170
|
+
"6f13599d"
|
|
1172
1171
|
);
|
|
1173
|
-
const wr =
|
|
1172
|
+
const wr = $r.exports, $e = () => ({
|
|
1174
1173
|
data: {
|
|
1175
1174
|
type: Array,
|
|
1176
1175
|
required: !0
|
|
@@ -1185,7 +1184,7 @@ const wr = Ir.exports, Ie = () => ({
|
|
|
1185
1184
|
},
|
|
1186
1185
|
orientation: {
|
|
1187
1186
|
type: String,
|
|
1188
|
-
default:
|
|
1187
|
+
default: L.VERTICAL,
|
|
1189
1188
|
validator: qe
|
|
1190
1189
|
},
|
|
1191
1190
|
xScale: {
|
|
@@ -1215,19 +1214,19 @@ const wr = Ir.exports, Ie = () => ({
|
|
|
1215
1214
|
}), Er = /* @__PURE__ */ N({
|
|
1216
1215
|
__name: "lume-overlay-group",
|
|
1217
1216
|
props: {
|
|
1218
|
-
|
|
1217
|
+
...$e(),
|
|
1219
1218
|
orientation: {
|
|
1220
1219
|
type: String,
|
|
1221
|
-
default:
|
|
1220
|
+
default: L.VERTICAL
|
|
1222
1221
|
}
|
|
1223
1222
|
},
|
|
1224
1223
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1225
1224
|
setup(t, { emit: e }) {
|
|
1226
|
-
const r = t, { data: n, orientation: a, xScale: o, yScale: l } =
|
|
1227
|
-
function
|
|
1225
|
+
const r = t, { data: n, orientation: a, xScale: o, yScale: l } = S(r), u = d(() => It(n));
|
|
1226
|
+
function i(c) {
|
|
1228
1227
|
var y;
|
|
1229
|
-
const v = a.value ===
|
|
1230
|
-
return a.value ===
|
|
1228
|
+
const v = a.value === L.HORIZONTAL ? l.value : o.value, s = v.domain(), f = un(v), m = ((y = v.paddingInner) == null ? void 0 : y.call(v)) ?? 0, _ = f * m, h = U(v) ? v(s[c]) - _ / 2 : v(c) - f / 2;
|
|
1229
|
+
return a.value === L.HORIZONTAL ? {
|
|
1231
1230
|
width: Math.max(...o.value.range()),
|
|
1232
1231
|
height: f,
|
|
1233
1232
|
transform: `translate(0, ${h})`
|
|
@@ -1237,7 +1236,7 @@ const wr = Ir.exports, Ie = () => ({
|
|
|
1237
1236
|
transform: `translate(${h}, 0)`
|
|
1238
1237
|
};
|
|
1239
1238
|
}
|
|
1240
|
-
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData:
|
|
1239
|
+
return { __sfc: !0, props: r, emit: e, data: n, orientation: a, xScale: o, yScale: l, overlayData: u, getOverlayBarAttributes: i, LumeBar: Ue };
|
|
1241
1240
|
}
|
|
1242
1241
|
});
|
|
1243
1242
|
var Nr = function() {
|
|
@@ -1257,7 +1256,7 @@ var Nr = function() {
|
|
|
1257
1256
|
null,
|
|
1258
1257
|
null
|
|
1259
1258
|
);
|
|
1260
|
-
const Rr = Dr.exports,
|
|
1259
|
+
const Rr = Dr.exports, Pr = [
|
|
1261
1260
|
"axis-click",
|
|
1262
1261
|
"axis-mouseenter",
|
|
1263
1262
|
"axis-mouseleave",
|
|
@@ -1296,19 +1295,19 @@ const Rr = Dr.exports, Sr = [
|
|
|
1296
1295
|
function n(o, l) {
|
|
1297
1296
|
document.addEventListener(
|
|
1298
1297
|
`${e}_${o}`,
|
|
1299
|
-
(
|
|
1298
|
+
(u) => l(...u.detail)
|
|
1300
1299
|
);
|
|
1301
1300
|
}
|
|
1302
|
-
return { componentEventPropagator:
|
|
1301
|
+
return { componentEventPropagator: Pr.reduce((o, l) => (o[l] = (u) => t(l, u), o), {}), emitInternalEvent: r, listenInternalEvent: n };
|
|
1303
1302
|
};
|
|
1304
|
-
function
|
|
1303
|
+
function Sr(t) {
|
|
1305
1304
|
return { hasNegativeValues: d(
|
|
1306
|
-
() =>
|
|
1305
|
+
() => Lt(t.value).some((r) => r < 0)
|
|
1307
1306
|
) };
|
|
1308
1307
|
}
|
|
1309
1308
|
function Br(t, e, r, n) {
|
|
1310
1309
|
const a = d(
|
|
1311
|
-
() => n.value ===
|
|
1310
|
+
() => n.value === L.HORIZONTAL
|
|
1312
1311
|
), o = d(
|
|
1313
1312
|
() => {
|
|
1314
1313
|
var c;
|
|
@@ -1319,7 +1318,7 @@ function Br(t, e, r, n) {
|
|
|
1319
1318
|
var c;
|
|
1320
1319
|
return a != null && a.value ? ((c = e.value) == null ? void 0 : c.call(e, 0)) || 0 : t.width;
|
|
1321
1320
|
}
|
|
1322
|
-
),
|
|
1321
|
+
), u = d(
|
|
1323
1322
|
() => {
|
|
1324
1323
|
var c;
|
|
1325
1324
|
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((c = r.value) == null ? void 0 : c.call(r, 0)) || 0})`;
|
|
@@ -1328,7 +1327,7 @@ function Br(t, e, r, n) {
|
|
|
1328
1327
|
return { negativeBarAttributes: d(() => ({
|
|
1329
1328
|
width: l.value,
|
|
1330
1329
|
height: o.value,
|
|
1331
|
-
transform:
|
|
1330
|
+
transform: u.value
|
|
1332
1331
|
})) };
|
|
1333
1332
|
}
|
|
1334
1333
|
function Cr(t, e) {
|
|
@@ -1347,8 +1346,8 @@ function Gr(t, e) {
|
|
|
1347
1346
|
const ct = {
|
|
1348
1347
|
"stacked-bar": Gr
|
|
1349
1348
|
};
|
|
1350
|
-
function
|
|
1351
|
-
const
|
|
1349
|
+
function Rt(t, e, r, n, a, o, l, u) {
|
|
1350
|
+
const i = d(
|
|
1352
1351
|
() => {
|
|
1353
1352
|
var v;
|
|
1354
1353
|
return e.value.withTooltip !== !1 && !((v = e.value.tooltipOptions) != null && v.targetElement);
|
|
@@ -1356,22 +1355,22 @@ function Dt(t, e, r, n, a, o, l, i) {
|
|
|
1356
1355
|
);
|
|
1357
1356
|
function c(v) {
|
|
1358
1357
|
var m;
|
|
1359
|
-
const s = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, f =
|
|
1358
|
+
const s = ((m = a == null ? void 0 : a.value) == null ? void 0 : m.length) ?? 0, f = u != null && u.value && ct[u.value] ? ct[u.value](
|
|
1360
1359
|
v,
|
|
1361
1360
|
s
|
|
1362
1361
|
) : Cr(v, s);
|
|
1363
1362
|
t.value = f.map((_, h) => ({
|
|
1364
|
-
cx: (o == null ? void 0 : o.value) ===
|
|
1365
|
-
cy: (o == null ? void 0 : o.value) ===
|
|
1363
|
+
cx: (o == null ? void 0 : o.value) === L.HORIZONTAL ? r.value(_) : Se(r.value, h),
|
|
1364
|
+
cy: (o == null ? void 0 : o.value) === L.HORIZONTAL ? Se(n.value, h) : n.value(_)
|
|
1366
1365
|
}));
|
|
1367
1366
|
}
|
|
1368
1367
|
return H(
|
|
1369
1368
|
[r, n],
|
|
1370
1369
|
() => {
|
|
1371
|
-
r.value && n.value && (l != null && l.value) &&
|
|
1370
|
+
r.value && n.value && (l != null && l.value) && i.value && c(l.value);
|
|
1372
1371
|
},
|
|
1373
1372
|
{ immediate: !0 }
|
|
1374
|
-
), { shouldGenerateTooltipAnchors:
|
|
1373
|
+
), { shouldGenerateTooltipAnchors: i, updateTooltipAnchorAttributes: c };
|
|
1375
1374
|
}
|
|
1376
1375
|
function Fr() {
|
|
1377
1376
|
const t = Oe({
|
|
@@ -1387,11 +1386,11 @@ function Fr() {
|
|
|
1387
1386
|
function jr(t) {
|
|
1388
1387
|
return { getTooltipItems: d(
|
|
1389
1388
|
() => (r) => t.value.map(({ color: n, label: a, values: o }) => {
|
|
1390
|
-
var l,
|
|
1389
|
+
var l, u, i;
|
|
1391
1390
|
return {
|
|
1392
1391
|
color: ((l = o[r]) == null ? void 0 : l.color) || n,
|
|
1393
1392
|
label: a,
|
|
1394
|
-
value: ((
|
|
1393
|
+
value: ((u = o[r]) == null ? void 0 : u.label) ?? ((i = o[r]) == null ? void 0 : i.value) ?? $t
|
|
1395
1394
|
};
|
|
1396
1395
|
})
|
|
1397
1396
|
) };
|
|
@@ -1425,36 +1424,36 @@ function Wr(t, e) {
|
|
|
1425
1424
|
const Zr = /* @__PURE__ */ N({
|
|
1426
1425
|
__name: "lume-chart",
|
|
1427
1426
|
props: {
|
|
1428
|
-
...
|
|
1427
|
+
...ue(),
|
|
1429
1428
|
chartType: {
|
|
1430
1429
|
type: String,
|
|
1431
1430
|
default: null
|
|
1432
1431
|
}
|
|
1433
1432
|
},
|
|
1434
1433
|
setup(t, { emit: e }) {
|
|
1435
|
-
const r = t, n = M(), { data: a, labels: o, color: l, options:
|
|
1434
|
+
const r = t, n = M(), { data: a, labels: o, color: l, options: u, orientation: i, chartType: c } = S(r), v = w(-1), s = w(null), f = w(null), m = w([]), _ = w(null), h = w(0), y = w(0), { allOptions: p } = Y(u), { internalData: k, computedLabels: x, containerSize: T, updateSize: I, chartID: R } = Qe(a, o, l, p, i), { listenInternalEvent: $ } = K(e, R), { xScale: D, yScale: B } = Jn(
|
|
1436
1435
|
k,
|
|
1437
1436
|
x,
|
|
1438
1437
|
T,
|
|
1439
|
-
|
|
1438
|
+
i,
|
|
1440
1439
|
p
|
|
1441
|
-
),
|
|
1440
|
+
), C = d(() => ({
|
|
1442
1441
|
top: Vr(p.value.margins),
|
|
1443
1442
|
right: Mr(p.value.margins),
|
|
1444
1443
|
bottom: zr(p.value.margins, h.value),
|
|
1445
1444
|
left: Wr(p.value.margins, y.value)
|
|
1446
|
-
})),
|
|
1445
|
+
})), F = d(() => {
|
|
1447
1446
|
var b;
|
|
1448
|
-
return r.xScale ?
|
|
1447
|
+
return r.xScale ? ut(r.xScale) ? r.xScale : (b = r.xScale) == null ? void 0 : b.call(r, k.value, o.value, T) : D.value;
|
|
1449
1448
|
}), J = d(() => {
|
|
1450
1449
|
var b;
|
|
1451
|
-
return r.yScale ?
|
|
1450
|
+
return r.yScale ? ut(r.yScale) ? r.yScale : (b = r.yScale) == null ? void 0 : b.call(r, k.value, o.value, T) : B.value;
|
|
1452
1451
|
}), oe = d(() => ({
|
|
1453
1452
|
...p.value.xAxisOptions,
|
|
1454
|
-
withHover:
|
|
1453
|
+
withHover: i.value === L.VERTICAL
|
|
1455
1454
|
})), W = d(() => ({
|
|
1456
1455
|
...p.value.yAxisOptions,
|
|
1457
|
-
withHover:
|
|
1456
|
+
withHover: i.value === L.HORIZONTAL
|
|
1458
1457
|
})), te = d(() => {
|
|
1459
1458
|
var b;
|
|
1460
1459
|
return (b = p.value.xAxisOptions) == null ? void 0 : b.title;
|
|
@@ -1467,47 +1466,47 @@ const Zr = /* @__PURE__ */ N({
|
|
|
1467
1466
|
}), A = d(() => {
|
|
1468
1467
|
var b;
|
|
1469
1468
|
return ((b = p.value.yAxisOptions) == null ? void 0 : b.withTitle) !== !1 && Q.value;
|
|
1470
|
-
}),
|
|
1471
|
-
() => a.value.every((b) => !b.values.length) || a.value.every((b) => b.values.every((
|
|
1472
|
-
),
|
|
1473
|
-
const b = [], { noBaseScales:
|
|
1474
|
-
return
|
|
1475
|
-
}), { hasNegativeValues: Z } =
|
|
1469
|
+
}), O = d(
|
|
1470
|
+
() => a.value.every((b) => !b.values.length) || a.value.every((b) => b.values.every((P) => P === null))
|
|
1471
|
+
), G = d(() => {
|
|
1472
|
+
const b = [], { noBaseScales: P } = p.value;
|
|
1473
|
+
return P || b.push(() => !!(F.value && J.value)), b.every((V) => V() === !0);
|
|
1474
|
+
}), { hasNegativeValues: Z } = Sr(k), { negativeBarAttributes: j } = Br(
|
|
1476
1475
|
T,
|
|
1477
|
-
|
|
1476
|
+
F,
|
|
1478
1477
|
J,
|
|
1479
|
-
|
|
1480
|
-
), { shouldGenerateTooltipAnchors: tt } =
|
|
1478
|
+
i
|
|
1479
|
+
), { shouldGenerateTooltipAnchors: tt } = Rt(
|
|
1481
1480
|
m,
|
|
1482
1481
|
p,
|
|
1483
|
-
|
|
1482
|
+
F,
|
|
1484
1483
|
J,
|
|
1485
1484
|
o,
|
|
1486
|
-
|
|
1485
|
+
i,
|
|
1487
1486
|
k,
|
|
1488
1487
|
c
|
|
1489
|
-
), { tooltipConfig:
|
|
1488
|
+
), { tooltipConfig: ce, showTooltip: ge, hideTooltip: de } = Fr(), { getTooltipItems: ye } = jr(k), le = d(
|
|
1490
1489
|
() => {
|
|
1491
1490
|
var b;
|
|
1492
1491
|
return ((b = p.value.tooltipOptions) == null ? void 0 : b.position) || "top";
|
|
1493
1492
|
}
|
|
1494
1493
|
), nt = d(() => {
|
|
1495
|
-
var
|
|
1496
|
-
const b = (
|
|
1497
|
-
return
|
|
1494
|
+
var P;
|
|
1495
|
+
const b = (P = p.value.tooltipOptions) == null ? void 0 : P.withPointerEvents;
|
|
1496
|
+
return ce.opened && (!b || b && _.value === !1);
|
|
1498
1497
|
});
|
|
1499
1498
|
function be(b) {
|
|
1500
1499
|
var V;
|
|
1501
1500
|
if (p.value.withHover === !1 || b === v.value) return;
|
|
1502
|
-
const
|
|
1501
|
+
const P = v.value;
|
|
1503
1502
|
if (v.value = b, p.value.withTooltip !== !1) {
|
|
1504
|
-
const
|
|
1505
|
-
ge(
|
|
1503
|
+
const Mt = (V = p.value.tooltipOptions) != null && V.targetElement ? p.value.tooltipOptions.targetElement === "self" ? f.value.$el : p.value.tooltipOptions.targetElement : s.value[b];
|
|
1504
|
+
ge(Mt);
|
|
1506
1505
|
}
|
|
1507
|
-
e("hovered-index-changed", { newIndex: b, oldIndex:
|
|
1506
|
+
e("hovered-index-changed", { newIndex: b, oldIndex: P }), e("update:hoveredIndex", b);
|
|
1508
1507
|
}
|
|
1509
1508
|
function ke() {
|
|
1510
|
-
|
|
1509
|
+
de(), v.value = -1, e("update:hoveredIndex", -1);
|
|
1511
1510
|
}
|
|
1512
1511
|
function we(b) {
|
|
1513
1512
|
if (!a.value.some(
|
|
@@ -1518,37 +1517,37 @@ const Zr = /* @__PURE__ */ N({
|
|
|
1518
1517
|
}
|
|
1519
1518
|
b == null || b === -1 ? ke() : be(b);
|
|
1520
1519
|
}
|
|
1521
|
-
function
|
|
1520
|
+
function Gt() {
|
|
1522
1521
|
setTimeout(() => {
|
|
1523
1522
|
nt.value && ke(), e("chart-mouseleave");
|
|
1524
1523
|
}, 0);
|
|
1525
1524
|
}
|
|
1526
|
-
function
|
|
1525
|
+
function Ft(b) {
|
|
1527
1526
|
I(b), e("resize", b);
|
|
1528
1527
|
}
|
|
1529
|
-
function
|
|
1530
|
-
b !== null && be(b), e("axis-mouseenter", { index: b, value:
|
|
1528
|
+
function jt({ index: b, value: P, event: V }) {
|
|
1529
|
+
b !== null && be(b), e("axis-mouseenter", { index: b, value: P, event: V });
|
|
1531
1530
|
}
|
|
1532
|
-
function
|
|
1533
|
-
e("axis-click", { index: b, value:
|
|
1531
|
+
function Vt({ index: b, value: P, event: V }) {
|
|
1532
|
+
e("axis-click", { index: b, value: P, event: V });
|
|
1534
1533
|
}
|
|
1535
1534
|
return H(
|
|
1536
1535
|
a,
|
|
1537
|
-
(b,
|
|
1536
|
+
(b, P) => e("data-changed", { newValue: b, oldValue: P })
|
|
1538
1537
|
), H(
|
|
1539
1538
|
o,
|
|
1540
|
-
(b,
|
|
1541
|
-
), H(
|
|
1539
|
+
(b, P) => e("labels-changed", { newValue: b, oldValue: P })
|
|
1540
|
+
), H(O, (b) => b && q(X.Empty), { immediate: !0 }), H(() => r.hoveredIndex, we), H(
|
|
1542
1541
|
m,
|
|
1543
1542
|
(b) => {
|
|
1544
1543
|
b && r.hoveredIndex != null && v.value === -1 && we(r.hoveredIndex);
|
|
1545
1544
|
},
|
|
1546
1545
|
{ flush: "post" }
|
|
1547
1546
|
), H(_, (b) => {
|
|
1548
|
-
b === !1 &&
|
|
1547
|
+
b === !1 && ce.opened && ke();
|
|
1549
1548
|
}), ee(async () => {
|
|
1550
|
-
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'),
|
|
1551
|
-
}), Ee("chartID",
|
|
1549
|
+
e("rendered"), n.groups || console.error('"groups" `<slot>` must have content.'), $("lume__internal--hover", be);
|
|
1550
|
+
}), Ee("chartID", R), Ee("isEmpty", O), Ee("tooltipAnchorAttributes", m), { __sfc: !0, props: r, slots: n, emit: e, data: a, labels: o, color: l, options: u, orientation: i, chartType: c, internalHoveredIndex: v, tooltipAnchor: s, chartContainer: f, tooltipAnchorAttributes: m, isHoveringTooltip: _, xAxisHeight: h, yAxisWidth: y, allOptions: p, internalData: k, computedLabels: x, containerSize: T, updateSize: I, chartID: R, listenInternalEvent: $, xScale: D, yScale: B, computedMargins: C, computedXScale: F, computedYScale: J, computedXAxisOptions: oe, computedYAxisOptions: W, xAxisTitle: te, yAxisTitle: Q, showXAxisTitle: g, showYAxisTitle: A, isEmpty: O, isReady: G, hasNegativeValues: Z, negativeBarAttributes: j, shouldGenerateTooltipAnchors: tt, tooltipConfig: ce, showTooltip: ge, hideTooltip: de, getTooltipItems: ye, tooltipPosition: le, shouldHideTooltip: nt, handleInternalHover: be, handleHideTooltip: ke, handleExternalHover: we, handleMouseleave: Gt, handleResize: Ft, handleAxisMouseenter: jt, handleAxisClick: Vt, LumeAxis: Dn, LumeBar: Ue, LumeChartContainer: ar, LumeChartLegend: sr, LumeTooltip: wr, LumeOverlayGroup: Rr, TOOLTIP_ANCHOR_RADIUS: bn };
|
|
1552
1551
|
}
|
|
1553
1552
|
});
|
|
1554
1553
|
var Ur = function() {
|
|
@@ -1614,9 +1613,9 @@ var Ur = function() {
|
|
|
1614
1613
|
Xr,
|
|
1615
1614
|
!1,
|
|
1616
1615
|
null,
|
|
1617
|
-
"
|
|
1616
|
+
"17c48844"
|
|
1618
1617
|
);
|
|
1619
|
-
const
|
|
1618
|
+
const se = Yr.exports, dt = 8, Kr = 8, Jr = 20, ve = 2, vt = 2, Qr = /* @__PURE__ */ N({
|
|
1620
1619
|
__name: "lume-alluvial-node-label",
|
|
1621
1620
|
props: {
|
|
1622
1621
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1628,11 +1627,11 @@ const de = Yr.exports, dt = 8, Kr = 8, Jr = 20, se = 2, vt = 2, Qr = /* @__PURE_
|
|
|
1628
1627
|
const r = t, n = w(null), a = w(r.maxWidth), o = w(1);
|
|
1629
1628
|
return H(
|
|
1630
1629
|
[n, () => r.maxWidth],
|
|
1631
|
-
async ([l,
|
|
1632
|
-
if (l &&
|
|
1633
|
-
a.value =
|
|
1634
|
-
const { width:
|
|
1635
|
-
a.value =
|
|
1630
|
+
async ([l, u]) => {
|
|
1631
|
+
if (l && u) {
|
|
1632
|
+
a.value = u, await He();
|
|
1633
|
+
const { width: i, height: c } = l.getBoundingClientRect();
|
|
1634
|
+
a.value = i + vt > u ? u : i + vt, o.value = Math.ceil(c);
|
|
1636
1635
|
}
|
|
1637
1636
|
},
|
|
1638
1637
|
{ immediate: !0 }
|
|
@@ -1672,7 +1671,7 @@ var aa = function() {
|
|
|
1672
1671
|
null,
|
|
1673
1672
|
"b4fc758b"
|
|
1674
1673
|
);
|
|
1675
|
-
const
|
|
1674
|
+
const ia = la.exports, ua = /* @__PURE__ */ N({
|
|
1676
1675
|
__name: "lume-alluvial-node-header",
|
|
1677
1676
|
props: {
|
|
1678
1677
|
x: { type: Number, required: !0 },
|
|
@@ -1691,7 +1690,7 @@ var sa = function() {
|
|
|
1691
1690
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
1692
1691
|
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)]);
|
|
1693
1692
|
}, ca = [], da = /* @__PURE__ */ E(
|
|
1694
|
-
|
|
1693
|
+
ua,
|
|
1695
1694
|
sa,
|
|
1696
1695
|
ca,
|
|
1697
1696
|
!1,
|
|
@@ -1717,7 +1716,7 @@ function fa(t) {
|
|
|
1717
1716
|
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 || {});
|
|
1718
1717
|
const pa = "[lume] ";
|
|
1719
1718
|
function je(t, e, r = !0) {
|
|
1720
|
-
r &&
|
|
1719
|
+
r && Tt() || console.error(pa + "Error: " + t, e);
|
|
1721
1720
|
}
|
|
1722
1721
|
const ma = 200;
|
|
1723
1722
|
function ie(t) {
|
|
@@ -1729,16 +1728,16 @@ function _a(t, e) {
|
|
|
1729
1728
|
function ha(t, e) {
|
|
1730
1729
|
return e.links.find((r) => r.id === t);
|
|
1731
1730
|
}
|
|
1732
|
-
function
|
|
1731
|
+
function Pt(t) {
|
|
1733
1732
|
return !!(t.sourceLinks && t.targetLinks);
|
|
1734
1733
|
}
|
|
1735
1734
|
function ga(t, e) {
|
|
1736
1735
|
if (!e) return;
|
|
1737
1736
|
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(
|
|
1738
|
-
(l,
|
|
1737
|
+
(l, u) => Math.max(l, u.getBBox().width),
|
|
1739
1738
|
-1 / 0
|
|
1740
1739
|
), o = e.filter((l) => n.includes(l.dataset.id)).reduce(
|
|
1741
|
-
(l,
|
|
1740
|
+
(l, u) => Math.max(l, u.getBBox().width),
|
|
1742
1741
|
-1 / 0
|
|
1743
1742
|
);
|
|
1744
1743
|
return {
|
|
@@ -1750,13 +1749,13 @@ function ga(t, e) {
|
|
|
1750
1749
|
}
|
|
1751
1750
|
function ya(t) {
|
|
1752
1751
|
return t.map((e) => {
|
|
1753
|
-
const r = e.y1 - e.y0 <
|
|
1752
|
+
const r = e.y1 - e.y0 < ve;
|
|
1754
1753
|
return {
|
|
1755
1754
|
x: e.x0,
|
|
1756
|
-
y: e.y0 - (r ?
|
|
1755
|
+
y: e.y0 - (r ? ve / 2 : 0),
|
|
1757
1756
|
// Negative offset to account for the min. height
|
|
1758
1757
|
width: e.x1 - e.x0,
|
|
1759
|
-
height: r ?
|
|
1758
|
+
height: r ? ve : e.y1 - e.y0,
|
|
1760
1759
|
textTransform: {
|
|
1761
1760
|
x: e.depth > 0 ? e.x1 + dt : e.x0 - dt,
|
|
1762
1761
|
y: (e.y1 + e.y0) / 2
|
|
@@ -1772,7 +1771,7 @@ function ka(t) {
|
|
|
1772
1771
|
return [t.target.x0, t.y1];
|
|
1773
1772
|
}
|
|
1774
1773
|
function xa(t) {
|
|
1775
|
-
return t.curveFunction ?
|
|
1774
|
+
return t.curveFunction ? Yt(t.curveFunction).source(ba).target(ka) : zt();
|
|
1776
1775
|
}
|
|
1777
1776
|
function Aa(t) {
|
|
1778
1777
|
return t.map((e) => {
|
|
@@ -1794,14 +1793,14 @@ function pt(t, e, r, n, a) {
|
|
|
1794
1793
|
};
|
|
1795
1794
|
return;
|
|
1796
1795
|
}
|
|
1797
|
-
const o = Date.now(), l =
|
|
1796
|
+
const o = Date.now(), l = fn(e, r), u = () => {
|
|
1798
1797
|
let c = (Date.now() - o) / ma;
|
|
1799
1798
|
c > 1 && (c = 1), t.node = {
|
|
1800
1799
|
...t.node,
|
|
1801
1800
|
transitionValue: a && c === 1 ? void 0 : l(c)
|
|
1802
|
-
}, c < 1 && requestAnimationFrame(
|
|
1801
|
+
}, c < 1 && requestAnimationFrame(u);
|
|
1803
1802
|
};
|
|
1804
|
-
requestAnimationFrame(
|
|
1803
|
+
requestAnimationFrame(u);
|
|
1805
1804
|
}
|
|
1806
1805
|
const Ta = {
|
|
1807
1806
|
nodes: [],
|
|
@@ -1842,7 +1841,7 @@ function La(t, e, r) {
|
|
|
1842
1841
|
}
|
|
1843
1842
|
).filter(Boolean).flat();
|
|
1844
1843
|
}
|
|
1845
|
-
), l = d(() =>
|
|
1844
|
+
), l = d(() => Wt().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)), u = d(() => {
|
|
1846
1845
|
var s;
|
|
1847
1846
|
return (s = n.value) == null ? void 0 : s.nodes.reduce(
|
|
1848
1847
|
(f, m) => {
|
|
@@ -1852,8 +1851,8 @@ function La(t, e, r) {
|
|
|
1852
1851
|
[]
|
|
1853
1852
|
);
|
|
1854
1853
|
});
|
|
1855
|
-
function
|
|
1856
|
-
const { offset: f } = s, m = mt(s,
|
|
1854
|
+
function i(s) {
|
|
1855
|
+
const { offset: f } = s, m = mt(s, u.value);
|
|
1857
1856
|
if (!m) return;
|
|
1858
1857
|
const _ = m[m.findIndex((y) => y.id === s.id) - 1], h = _ && m.length !== 1 ? _.y1 + f : f;
|
|
1859
1858
|
s._y0 = s.y0, s._y1 = s.y1, s.y0 = h, s.y1 = s.y0 + (s._y1 - s._y0);
|
|
@@ -1869,7 +1868,7 @@ function La(t, e, r) {
|
|
|
1869
1868
|
const v = d(() => {
|
|
1870
1869
|
var s;
|
|
1871
1870
|
return n.value && ((s = a.value) == null || s.forEach((f) => {
|
|
1872
|
-
f.value === 0 && (f.fallbackColor = Ye.Grey), typeof f.offset == "number" && (
|
|
1871
|
+
f.value === 0 && (f.fallbackColor = Ye.Grey), typeof f.offset == "number" && (i(f), c(f, n.value));
|
|
1873
1872
|
})), n.value;
|
|
1874
1873
|
});
|
|
1875
1874
|
return H([l, r], () => {
|
|
@@ -1882,7 +1881,7 @@ function La(t, e, r) {
|
|
|
1882
1881
|
} catch (s) {
|
|
1883
1882
|
je(Te.GraphProblem, s), n.value = Ta;
|
|
1884
1883
|
}
|
|
1885
|
-
}), { columns:
|
|
1884
|
+
}), { columns: u, graph: v };
|
|
1886
1885
|
}
|
|
1887
1886
|
function Ve(t, e) {
|
|
1888
1887
|
return e || (e = {}), t.targetLinks && t.targetLinks.forEach(({ source: r, value: n }) => {
|
|
@@ -1903,9 +1902,9 @@ function Me(t, e) {
|
|
|
1903
1902
|
function Oa(t, e) {
|
|
1904
1903
|
return e.links.reduce((r, n) => (n.source.id in t && n.target.id in t && r.push(n.id), r), []);
|
|
1905
1904
|
}
|
|
1906
|
-
const
|
|
1905
|
+
const Ia = (t, e) => {
|
|
1907
1906
|
let r;
|
|
1908
|
-
|
|
1907
|
+
Pt(t) ? r = {
|
|
1909
1908
|
[t.id]: t.value,
|
|
1910
1909
|
...Ve(t),
|
|
1911
1910
|
...Me(t)
|
|
@@ -1917,8 +1916,8 @@ const $a = (t, e) => {
|
|
|
1917
1916
|
};
|
|
1918
1917
|
const n = Oa(r, e);
|
|
1919
1918
|
return { nodes: r, links: n };
|
|
1920
|
-
},
|
|
1921
|
-
if (
|
|
1919
|
+
}, $a = (t) => {
|
|
1920
|
+
if (Pt(t)) {
|
|
1922
1921
|
const e = [...t.sourceLinks, ...t.targetLinks];
|
|
1923
1922
|
return {
|
|
1924
1923
|
nodes: e.reduce(
|
|
@@ -1940,25 +1939,25 @@ function wa(t, e, r) {
|
|
|
1940
1939
|
const n = w(null), a = d(() => n.value ? typeof e.value.highlightedElements == "function" ? e.value.highlightedElements(
|
|
1941
1940
|
n.value,
|
|
1942
1941
|
r.value
|
|
1943
|
-
) : e.value.highlightedElements === "closest" ?
|
|
1942
|
+
) : e.value.highlightedElements === "closest" ? $a(n.value, r.value) : Ia(n.value, r.value) : { nodes: {}, links: [] });
|
|
1944
1943
|
return H(a, (o, l) => {
|
|
1945
1944
|
if (o.links.length === 0 && Object.keys(o.nodes).length === 0) {
|
|
1946
|
-
t.value.forEach((
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
l.nodes[
|
|
1950
|
-
|
|
1945
|
+
t.value.forEach((u) => {
|
|
1946
|
+
u.node.id in l.nodes && pt(
|
|
1947
|
+
u,
|
|
1948
|
+
l.nodes[u.node.id],
|
|
1949
|
+
u.node.value,
|
|
1951
1950
|
e.value.withTransition,
|
|
1952
1951
|
!0
|
|
1953
1952
|
);
|
|
1954
1953
|
});
|
|
1955
1954
|
return;
|
|
1956
1955
|
}
|
|
1957
|
-
t.value.forEach((
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
o.nodes[
|
|
1956
|
+
t.value.forEach((u) => {
|
|
1957
|
+
u.node.id in o.nodes && pt(
|
|
1958
|
+
u,
|
|
1959
|
+
u.node.value,
|
|
1960
|
+
o.nodes[u.node.id],
|
|
1962
1961
|
e.value.withTransition
|
|
1963
1962
|
);
|
|
1964
1963
|
});
|
|
@@ -1967,7 +1966,7 @@ function wa(t, e, r) {
|
|
|
1967
1966
|
const Ea = /* @__PURE__ */ N({
|
|
1968
1967
|
__name: "lume-alluvial-group",
|
|
1969
1968
|
props: {
|
|
1970
|
-
|
|
1969
|
+
...$e(),
|
|
1971
1970
|
hoveredElementId: {
|
|
1972
1971
|
type: [Number, String],
|
|
1973
1972
|
default: null
|
|
@@ -1975,7 +1974,7 @@ const Ea = /* @__PURE__ */ N({
|
|
|
1975
1974
|
},
|
|
1976
1975
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
1977
1976
|
setup(t, { emit: e }) {
|
|
1978
|
-
const r = t, n = Le("chartID"), { data: a, options: o } =
|
|
1977
|
+
const r = t, n = Le("chartID"), { data: a, options: o } = S(r), l = w([]), u = w([]), i = w(null), { extents: c, updateExtents: v } = fa(r.containerSize), { columns: s, graph: f } = La(a, o, c), { hoveredElement: m, highlightedElements: _ } = wa(
|
|
1979
1978
|
l,
|
|
1980
1979
|
o,
|
|
1981
1980
|
f
|
|
@@ -1994,53 +1993,53 @@ const Ea = /* @__PURE__ */ N({
|
|
|
1994
1993
|
), T = d(() => {
|
|
1995
1994
|
if (!(!o.value.gradient || !f.value))
|
|
1996
1995
|
return f.value.links.reduce((g, A) => {
|
|
1997
|
-
const { source:
|
|
1996
|
+
const { source: O, target: G } = A, Z = O.color || O.fallbackColor, j = G.deriveColorFromIncomingLinks ? Z : G.color || G.fallbackColor;
|
|
1998
1997
|
return g[A.id] = {
|
|
1999
1998
|
source: Z,
|
|
2000
|
-
target:
|
|
2001
|
-
x1:
|
|
2002
|
-
x2:
|
|
1999
|
+
target: j,
|
|
2000
|
+
x1: O.x1,
|
|
2001
|
+
x2: G.x0
|
|
2003
2002
|
}, g;
|
|
2004
2003
|
}, {});
|
|
2005
2004
|
}), I = d(() => {
|
|
2006
2005
|
const g = l.value.filter(
|
|
2007
|
-
(
|
|
2006
|
+
(O) => F(O)
|
|
2008
2007
|
), A = [];
|
|
2009
|
-
return g.forEach((
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2012
|
-
const ge =
|
|
2013
|
-
let
|
|
2014
|
-
return ge ? (
|
|
2015
|
-
x:
|
|
2016
|
-
y:
|
|
2017
|
-
height:
|
|
2018
|
-
width:
|
|
2019
|
-
key: `node-block-${
|
|
2020
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2021
|
-
}), Z +
|
|
2008
|
+
return g.forEach((O) => {
|
|
2009
|
+
const G = [];
|
|
2010
|
+
u.value.filter(({ link: Z }) => Z.target.id === O.node.id).reverse().reduce((Z, j, tt, ce) => {
|
|
2011
|
+
const ge = j.link.target.y1 - j.link.target.y0 > ve;
|
|
2012
|
+
let de, ye, le;
|
|
2013
|
+
return ge ? (de = j.link.target.y1 - j.link.target.y0, ye = j.link.value / O.node.value, le = ye * de) : le = ve / ce.length, G.push({
|
|
2014
|
+
x: O.x,
|
|
2015
|
+
y: O.y + Z,
|
|
2016
|
+
height: le,
|
|
2017
|
+
width: O.width,
|
|
2018
|
+
key: `node-block-${O.node.id}-source-link-${j.link.source.id}`,
|
|
2019
|
+
class: `lume-alluvial-group__node-block lume-fill--${j.link.source.color || he}`
|
|
2020
|
+
}), Z + le;
|
|
2022
2021
|
}, 0), A.push({
|
|
2023
|
-
id:
|
|
2024
|
-
subNodes:
|
|
2022
|
+
id: O.node.id,
|
|
2023
|
+
subNodes: G
|
|
2025
2024
|
});
|
|
2026
2025
|
}), A;
|
|
2027
2026
|
});
|
|
2028
|
-
function
|
|
2027
|
+
function R(g) {
|
|
2029
2028
|
return o.value.gradient && `url('#${n}_${g.id}')`;
|
|
2030
2029
|
}
|
|
2031
|
-
function
|
|
2030
|
+
function $(g) {
|
|
2032
2031
|
return y.value.length > 0 && !y.value.includes(g.toString());
|
|
2033
2032
|
}
|
|
2034
|
-
function
|
|
2033
|
+
function D(g) {
|
|
2035
2034
|
return y.value.length > 0 && y.value.includes(g.toString());
|
|
2036
2035
|
}
|
|
2037
|
-
function
|
|
2036
|
+
function B(g) {
|
|
2038
2037
|
return _.value.links.length > 0 && !_.value.links.includes(g);
|
|
2039
2038
|
}
|
|
2040
|
-
function
|
|
2039
|
+
function C(g) {
|
|
2041
2040
|
return _.value.links.length > 0 && _.value.links.includes(g);
|
|
2042
2041
|
}
|
|
2043
|
-
function
|
|
2042
|
+
function F(g) {
|
|
2044
2043
|
return !g.node.color && g.node.deriveColorFromIncomingLinks;
|
|
2045
2044
|
}
|
|
2046
2045
|
function J(g, A) {
|
|
@@ -2064,17 +2063,17 @@ const Ea = /* @__PURE__ */ N({
|
|
|
2064
2063
|
}
|
|
2065
2064
|
function te(g) {
|
|
2066
2065
|
var A;
|
|
2067
|
-
return ((A = I.value.find(({ id:
|
|
2066
|
+
return ((A = I.value.find(({ id: O }) => g === O)) == null ? void 0 : A.subNodes) ?? [];
|
|
2068
2067
|
}
|
|
2069
2068
|
function Q() {
|
|
2070
|
-
const g = ga(f.value,
|
|
2069
|
+
const g = ga(f.value, i.value);
|
|
2071
2070
|
v(g);
|
|
2072
2071
|
}
|
|
2073
2072
|
return H(f, (g) => {
|
|
2074
|
-
l.value = ya(g.nodes),
|
|
2075
|
-
}), H([r.containerSize,
|
|
2073
|
+
l.value = ya(g.nodes), u.value = Aa(g.links).reverse(), m.value == null && r.hoveredElementId != null && W(r.hoveredElementId);
|
|
2074
|
+
}), H([r.containerSize, i], () => {
|
|
2076
2075
|
r.containerSize.width && r.containerSize.height && Q();
|
|
2077
|
-
}), H(() => r.hoveredElementId, W), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths:
|
|
2076
|
+
}), H(() => r.hoveredElementId, W), { __sfc: !0, props: r, emit: e, chartID: n, data: a, options: o, nodeBlocks: l, linkPaths: u, nodeTextRefs: i, extents: c, updateExtents: v, columns: s, graph: f, hoveredElement: m, highlightedElements: _, formatValue: h, hoveredNodeIds: y, nodeColumnPositions: p, nodeHeaders: k, computedNodeHeaderPadding: x, gradients: T, nodesDerivingColorFromIncomingLinks: I, getLinkStroke: R, isNodeFaded: $, isNodeFocused: D, isLinkFaded: B, isLinkFocused: C, shouldDeriveNodeColorFromIncomingLinks: F, handleLinkMouseover: J, handleLinkMouseleave: oe, handleExternalHover: W, getSubNodesDerivingColorFromIncomingLinks: te, updateMargins: Q, LumeAlluvialNodeLabel: na, LumeAlluvialNodeValue: ia, LumeAlluvialNodeHeader: va, GHOST_STROKE_WIDTH_OFFSET: Kr };
|
|
2078
2077
|
}
|
|
2079
2078
|
});
|
|
2080
2079
|
var Na = function() {
|
|
@@ -2137,9 +2136,9 @@ var Na = function() {
|
|
|
2137
2136
|
Ha,
|
|
2138
2137
|
!1,
|
|
2139
2138
|
null,
|
|
2140
|
-
"
|
|
2139
|
+
"2a790ee0"
|
|
2141
2140
|
);
|
|
2142
|
-
const Ra = Da.exports,
|
|
2141
|
+
const Ra = Da.exports, Pa = {
|
|
2143
2142
|
margins: {
|
|
2144
2143
|
top: 0,
|
|
2145
2144
|
right: 0,
|
|
@@ -2155,32 +2154,32 @@ const Ra = Da.exports, Sa = {
|
|
|
2155
2154
|
highlightedElements: "closest",
|
|
2156
2155
|
nodePadding: 16,
|
|
2157
2156
|
nodeWidth: 16,
|
|
2158
|
-
nodeAlign:
|
|
2157
|
+
nodeAlign: Zt,
|
|
2159
2158
|
valueFormat: (t) => String(t),
|
|
2160
2159
|
iterations: 6
|
|
2161
|
-
},
|
|
2160
|
+
}, Sa = /* @__PURE__ */ N({
|
|
2162
2161
|
__name: "lume-alluvial-diagram",
|
|
2163
2162
|
props: {
|
|
2164
2163
|
...Qn(We)
|
|
2165
2164
|
},
|
|
2166
2165
|
setup(t, { emit: e }) {
|
|
2167
|
-
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), o =
|
|
2168
|
-
function
|
|
2166
|
+
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), o = mn(M()), { options: l } = S(r), { allOptions: u } = Y(l, Pa);
|
|
2167
|
+
function i(c) {
|
|
2169
2168
|
return {
|
|
2170
2169
|
...c,
|
|
2171
2170
|
noBaseScales: !0
|
|
2172
2171
|
// Alluvial chart never uses base scales
|
|
2173
2172
|
};
|
|
2174
2173
|
}
|
|
2175
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions:
|
|
2174
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, groupSlots: o, options: l, allOptions: u, getAlluvialDiagramOptions: i, LumeChart: se, LumeAlluvialGroup: Ra };
|
|
2176
2175
|
}
|
|
2177
2176
|
});
|
|
2178
2177
|
var Ba = function() {
|
|
2179
2178
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2180
2179
|
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) {
|
|
2181
2180
|
return [r(n.LumeAlluvialGroup, e._g(e._b({ attrs: { "hovered-element-id": e.hoveredElement }, scopedSlots: e._u([e._l(n.groupSlots, function(o, l) {
|
|
2182
|
-
return { key: l, fn: function(
|
|
2183
|
-
return [e._t(l, null, null,
|
|
2181
|
+
return { key: l, fn: function(u) {
|
|
2182
|
+
return [e._t(l, null, null, u || {})];
|
|
2184
2183
|
} };
|
|
2185
2184
|
})], null, !0) }, "lume-alluvial-group", a, !1), n.componentEventPropagator))];
|
|
2186
2185
|
} }, e._l(n.slots, function(a, o) {
|
|
@@ -2189,7 +2188,7 @@ var Ba = function() {
|
|
|
2189
2188
|
} };
|
|
2190
2189
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2191
2190
|
}, Ca = [], Ga = /* @__PURE__ */ E(
|
|
2192
|
-
|
|
2191
|
+
Sa,
|
|
2193
2192
|
Ba,
|
|
2194
2193
|
Ca,
|
|
2195
2194
|
!1,
|
|
@@ -2201,7 +2200,7 @@ var ze = /* @__PURE__ */ ((t) => (t.grouped = "grouped", t.stacked = "stacked",
|
|
|
2201
2200
|
const Fa = /* @__PURE__ */ N({
|
|
2202
2201
|
__name: "lume-bar-chart",
|
|
2203
2202
|
props: {
|
|
2204
|
-
...
|
|
2203
|
+
...ue(),
|
|
2205
2204
|
type: {
|
|
2206
2205
|
type: String,
|
|
2207
2206
|
default: null,
|
|
@@ -2210,16 +2209,16 @@ const Fa = /* @__PURE__ */ N({
|
|
|
2210
2209
|
},
|
|
2211
2210
|
setup(t, { emit: e }) {
|
|
2212
2211
|
const r = t, n = Ne(
|
|
2213
|
-
() => import("./
|
|
2212
|
+
() => import("./DmfABIXc.js")
|
|
2214
2213
|
), a = Ne(
|
|
2215
|
-
() => import("./
|
|
2214
|
+
() => import("./B8Yzpn9z.js")
|
|
2216
2215
|
), o = Ne(
|
|
2217
|
-
() => import("./
|
|
2216
|
+
() => import("./Lrbt_T-f.js")
|
|
2218
2217
|
), l = /* @__PURE__ */ new Map([
|
|
2219
2218
|
["single", n],
|
|
2220
2219
|
["grouped", a],
|
|
2221
2220
|
["stacked", o]
|
|
2222
|
-
]), { componentEventPropagator:
|
|
2221
|
+
]), { componentEventPropagator: u } = K(e), i = ae(M());
|
|
2223
2222
|
function c(s) {
|
|
2224
2223
|
return {
|
|
2225
2224
|
...s,
|
|
@@ -2227,7 +2226,7 @@ const Fa = /* @__PURE__ */ N({
|
|
|
2227
2226
|
// Bar chart always starts on zero,
|
|
2228
2227
|
tooltipOptions: {
|
|
2229
2228
|
...(s == null ? void 0 : s.tooltipOptions) || {},
|
|
2230
|
-
position: r.orientation ===
|
|
2229
|
+
position: r.orientation === L.HORIZONTAL ? "right" : void 0
|
|
2231
2230
|
}
|
|
2232
2231
|
};
|
|
2233
2232
|
}
|
|
@@ -2237,7 +2236,7 @@ const Fa = /* @__PURE__ */ N({
|
|
|
2237
2236
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2238
2237
|
return l.get(r.type);
|
|
2239
2238
|
});
|
|
2240
|
-
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator:
|
|
2239
|
+
return { __sfc: !0, TYPES: ze, LumeSingleBarChart: n, LumeGroupedBarChart: a, LumeStackedBarChart: o, COMPONENT_MAP: l, props: r, emit: e, componentEventPropagator: u, slots: i, getBarChartOptions: c, component: v };
|
|
2241
2240
|
}
|
|
2242
2241
|
});
|
|
2243
2242
|
var ja = function() {
|
|
@@ -2260,7 +2259,7 @@ function za(t) {
|
|
|
2260
2259
|
return Object.values(yn).includes(t) || t == null;
|
|
2261
2260
|
}
|
|
2262
2261
|
function Wa(t) {
|
|
2263
|
-
return Object.values(
|
|
2262
|
+
return Object.values(L).includes(t);
|
|
2264
2263
|
}
|
|
2265
2264
|
const Za = (t = !1) => ({
|
|
2266
2265
|
type: {
|
|
@@ -2271,7 +2270,7 @@ const Za = (t = !1) => ({
|
|
|
2271
2270
|
...t ? {
|
|
2272
2271
|
orientation: {
|
|
2273
2272
|
type: String,
|
|
2274
|
-
default:
|
|
2273
|
+
default: L.VERTICAL,
|
|
2275
2274
|
validator: Wa
|
|
2276
2275
|
}
|
|
2277
2276
|
} : {}
|
|
@@ -2291,8 +2290,8 @@ function St(t, e) {
|
|
|
2291
2290
|
};
|
|
2292
2291
|
})), n = d(() => {
|
|
2293
2292
|
var a;
|
|
2294
|
-
return (a = r.value) == null ? void 0 : a.reduce((o, l) => (l.values.forEach((
|
|
2295
|
-
o[
|
|
2293
|
+
return (a = r.value) == null ? void 0 : a.reduce((o, l) => (l.values.forEach((u, i) => {
|
|
2294
|
+
o[i] ? o[i].push(u) : o[i] = [u];
|
|
2296
2295
|
}), o), []);
|
|
2297
2296
|
});
|
|
2298
2297
|
return { multiBarData: r, groupedData: n };
|
|
@@ -2302,10 +2301,10 @@ function Ua(t, e) {
|
|
|
2302
2301
|
}
|
|
2303
2302
|
function Xa(t, e, r) {
|
|
2304
2303
|
const n = d(
|
|
2305
|
-
() => r.value ===
|
|
2304
|
+
() => r.value === L.HORIZONTAL
|
|
2306
2305
|
);
|
|
2307
|
-
function a(
|
|
2308
|
-
|
|
2306
|
+
function a(u) {
|
|
2307
|
+
u || je(Te.BarScaleNull), Math.min(...u.domain()) > 0 && je(Te.BarScaleDomainAbove0);
|
|
2309
2308
|
}
|
|
2310
2309
|
const o = d(() => n.value ? (a(t.value), t.value) : t.value), l = d(() => n.value ? e.value : (a(e.value), e.value));
|
|
2311
2310
|
return { barXScale: o, barYScale: l };
|
|
@@ -2318,13 +2317,13 @@ const Ya = {
|
|
|
2318
2317
|
};
|
|
2319
2318
|
function Ka(t, e, r, n, a, o) {
|
|
2320
2319
|
const l = d(
|
|
2321
|
-
() => n.value ===
|
|
2320
|
+
() => n.value === L.HORIZONTAL
|
|
2322
2321
|
);
|
|
2323
|
-
function
|
|
2322
|
+
function u(s, f) {
|
|
2324
2323
|
let m, _;
|
|
2325
2324
|
return l.value ? (m = s >= 0 ? e.value(0) : e.value(s), _ = r.value(r.value.domain()[f])) : (m = e.value(e.value.domain()[f]), _ = s < 0 ? r.value(0) : r.value(s)), { x: m, y: _ };
|
|
2326
2325
|
}
|
|
2327
|
-
function
|
|
2326
|
+
function i(s) {
|
|
2328
2327
|
return l.value ? s < 0 ? e.value(0) - e.value(s) : e.value(s) - e.value(0) : e.value.bandwidth();
|
|
2329
2328
|
}
|
|
2330
2329
|
function c(s) {
|
|
@@ -2332,7 +2331,7 @@ function Ka(t, e, r, n, a, o) {
|
|
|
2332
2331
|
}
|
|
2333
2332
|
function v(s, f, m) {
|
|
2334
2333
|
if (!(e.value && r.value)) return Ya;
|
|
2335
|
-
const { value: h, color: y } = s, p = y ?? t.value[f].color ?? he, { x: k, y: x } =
|
|
2334
|
+
const { value: h, color: y } = s, p = y ?? t.value[f].color ?? he, { x: k, y: x } = u(h, m), T = i(h), I = c(h);
|
|
2336
2335
|
return {
|
|
2337
2336
|
classList: [`lume-fill--${p}`, ...o],
|
|
2338
2337
|
x: k,
|
|
@@ -2353,36 +2352,36 @@ const Ja = {
|
|
|
2353
2352
|
};
|
|
2354
2353
|
function Qa(t, e, r, n, a, o) {
|
|
2355
2354
|
const l = d(
|
|
2356
|
-
() => n.value ===
|
|
2357
|
-
),
|
|
2355
|
+
() => n.value === L.HORIZONTAL
|
|
2356
|
+
), u = d(() => pe().domain(t.value.map((_, h) => h)).range([0, e.value.bandwidth()]).padding(0)), i = d(() => pe().domain(t.value.map((_, h) => h)).range([0, r.value.bandwidth()]).padding(0));
|
|
2358
2357
|
function c(_, h, y) {
|
|
2359
2358
|
if (l.value)
|
|
2360
2359
|
return _ >= 0 ? e.value(0) : e.value(_);
|
|
2361
2360
|
const p = e.value.domain();
|
|
2362
|
-
return e.value(p[h]) +
|
|
2361
|
+
return e.value(p[h]) + u.value(y);
|
|
2363
2362
|
}
|
|
2364
2363
|
function v(_, h, y) {
|
|
2365
2364
|
if (l.value) {
|
|
2366
2365
|
const p = r.value.domain();
|
|
2367
|
-
return r.value(p[h]) +
|
|
2366
|
+
return r.value(p[h]) + i.value(y);
|
|
2368
2367
|
}
|
|
2369
2368
|
return _ < 0 ? r.value(0) : r.value(_);
|
|
2370
2369
|
}
|
|
2371
2370
|
function s(_) {
|
|
2372
|
-
return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) :
|
|
2371
|
+
return l.value ? _ < 0 ? e.value(0) - e.value(_) : e.value(_) - e.value(0) : u.value.bandwidth();
|
|
2373
2372
|
}
|
|
2374
2373
|
function f(_) {
|
|
2375
|
-
return l.value ?
|
|
2374
|
+
return l.value ? i.value.bandwidth() : _ < 0 ? r.value(_) - r.value(0) : r.value(0) - r.value(_);
|
|
2376
2375
|
}
|
|
2377
2376
|
function m(_, h, y) {
|
|
2378
2377
|
if (!(e.value && r.value)) return Ja;
|
|
2379
|
-
const { value: k, color: x } = _, T = x ?? t.value[h].color ?? Object.values(z)[h], I = c(k, y, h),
|
|
2378
|
+
const { value: k, color: x } = _, T = x ?? t.value[h].color ?? Object.values(z)[h], I = c(k, y, h), R = v(k, y, h), $ = s(k), D = f(k);
|
|
2380
2379
|
return {
|
|
2381
2380
|
classList: [`lume-fill--${T}`, ...o],
|
|
2382
2381
|
x: I,
|
|
2383
|
-
y:
|
|
2384
|
-
width:
|
|
2385
|
-
height:
|
|
2382
|
+
y: R,
|
|
2383
|
+
width: $,
|
|
2384
|
+
height: D,
|
|
2386
2385
|
isFaded: a.value !== -1 && a.value !== y,
|
|
2387
2386
|
isNegative: k < 0
|
|
2388
2387
|
};
|
|
@@ -2391,54 +2390,54 @@ function Qa(t, e, r, n, a, o) {
|
|
|
2391
2390
|
}
|
|
2392
2391
|
function qa(t, e, r) {
|
|
2393
2392
|
const n = d(
|
|
2394
|
-
() => e.value ===
|
|
2393
|
+
() => e.value === L.HORIZONTAL
|
|
2395
2394
|
), a = d(() => {
|
|
2396
|
-
const
|
|
2395
|
+
const i = t.value.map(
|
|
2397
2396
|
(c) => c.filter((v) => v.value < 0).reduce((v, s) => v + s.value, 0)
|
|
2398
2397
|
);
|
|
2399
|
-
return Math.min(...
|
|
2398
|
+
return Math.min(...i);
|
|
2400
2399
|
}), o = d(() => {
|
|
2401
|
-
const
|
|
2400
|
+
const i = t.value.map(
|
|
2402
2401
|
(c) => c.reduce(
|
|
2403
2402
|
(v, s) => s.value >= 0 ? v + s.value : v,
|
|
2404
2403
|
0
|
|
2405
2404
|
)
|
|
2406
2405
|
);
|
|
2407
|
-
return Math.max(...
|
|
2406
|
+
return Math.max(...i);
|
|
2408
2407
|
});
|
|
2409
|
-
function l(
|
|
2410
|
-
return c.length ? n.value ?
|
|
2408
|
+
function l(i, c, v) {
|
|
2409
|
+
return c.length ? n.value ? fe().domain([a.value, o.value]).range([0, v.width]) : Object.assign(
|
|
2411
2410
|
st(
|
|
2412
|
-
|
|
2411
|
+
pe().domain(c.map((s, f) => f)).range([0, v.width]),
|
|
2413
2412
|
e.value,
|
|
2414
2413
|
r.value
|
|
2415
2414
|
),
|
|
2416
2415
|
{ labels: c }
|
|
2417
2416
|
) : null;
|
|
2418
2417
|
}
|
|
2419
|
-
function i
|
|
2418
|
+
function u(i, c, v) {
|
|
2420
2419
|
return c.length ? n.value ? Object.assign(
|
|
2421
2420
|
st(
|
|
2422
|
-
|
|
2421
|
+
pe().domain(c.map((s, f) => f)).range([0, v.height]),
|
|
2423
2422
|
e.value,
|
|
2424
2423
|
r.value
|
|
2425
2424
|
),
|
|
2426
2425
|
{ labels: c }
|
|
2427
|
-
) :
|
|
2426
|
+
) : fe().domain([o.value, a.value]).range([0, v.height]) : null;
|
|
2428
2427
|
}
|
|
2429
|
-
return { stackedXScaleGenerator: l, stackedYScaleGenerator:
|
|
2428
|
+
return { stackedXScaleGenerator: l, stackedYScaleGenerator: u };
|
|
2430
2429
|
}
|
|
2431
2430
|
function eo(t, e, r, n, a, o) {
|
|
2432
2431
|
const l = d(
|
|
2433
|
-
() => n.value ===
|
|
2434
|
-
), i = d(
|
|
2435
|
-
() => l.value ? r.value.domain() : e.value.domain()
|
|
2432
|
+
() => n.value === L.HORIZONTAL
|
|
2436
2433
|
), u = d(
|
|
2434
|
+
() => l.value ? r.value.domain() : e.value.domain()
|
|
2435
|
+
), i = d(
|
|
2437
2436
|
() => t.value.map((p) => p.values.map((k) => k == null ? void 0 : k.value))
|
|
2438
2437
|
);
|
|
2439
2438
|
function c(p, k, x) {
|
|
2440
2439
|
let T, I;
|
|
2441
|
-
return l.value ? (T = e.value(p >= 0 ? 0 + x : p + x), I = r.value(
|
|
2440
|
+
return l.value ? (T = e.value(p >= 0 ? 0 + x : p + x), I = r.value(u.value[k])) : (T = e.value(u.value[k]), I = r.value(p >= 0 ? p + x : 0 + x)), { x: T, y: I };
|
|
2442
2441
|
}
|
|
2443
2442
|
function v(p) {
|
|
2444
2443
|
return l.value ? e.value(p) - e.value(0) : e.value.bandwidth();
|
|
@@ -2453,19 +2452,19 @@ function eo(t, e, r, n, a, o) {
|
|
|
2453
2452
|
return l.value ? r.value.bandwidth() : r.value(p) - r.value(0);
|
|
2454
2453
|
}
|
|
2455
2454
|
function _(p, k) {
|
|
2456
|
-
return p ?
|
|
2455
|
+
return p ? i.value.reduce((x, T, I) => (I < p && T[k] >= 0 && (x += T[k]), x), 0) : 0;
|
|
2457
2456
|
}
|
|
2458
2457
|
function h(p, k) {
|
|
2459
|
-
return p ?
|
|
2458
|
+
return p ? i.value.reduce((x, T, I) => (I < p && T[k] < 0 && (x += T[k]), x), 0) : 0;
|
|
2460
2459
|
}
|
|
2461
2460
|
function y(p, k, x) {
|
|
2462
|
-
const { value: T, color: I } = p,
|
|
2461
|
+
const { value: T, color: I } = p, R = T >= 0 ? v(T) : s(T), $ = T >= 0 ? f(T) : m(T), D = T >= 0 ? _(k, x) : h(k, x), { x: B, y: C } = c(T, x, D);
|
|
2463
2462
|
return {
|
|
2464
2463
|
classList: [`lume-fill--${I ?? t.value[k].color ?? Object.values(z)[k]}`, ...o],
|
|
2465
|
-
width:
|
|
2466
|
-
height:
|
|
2467
|
-
x:
|
|
2468
|
-
y:
|
|
2464
|
+
width: R,
|
|
2465
|
+
height: $,
|
|
2466
|
+
x: B,
|
|
2467
|
+
y: C,
|
|
2469
2468
|
isFaded: a.value !== -1 && a.value !== x,
|
|
2470
2469
|
isNegative: T < 0
|
|
2471
2470
|
};
|
|
@@ -2479,7 +2478,7 @@ const _t = {
|
|
|
2479
2478
|
}, to = /* @__PURE__ */ N({
|
|
2480
2479
|
__name: "lume-bar-group",
|
|
2481
2480
|
props: {
|
|
2482
|
-
|
|
2481
|
+
...$e(),
|
|
2483
2482
|
classList: {
|
|
2484
2483
|
type: [String, Array],
|
|
2485
2484
|
default: () => []
|
|
@@ -2497,13 +2496,13 @@ const _t = {
|
|
|
2497
2496
|
hoveredIndex: a,
|
|
2498
2497
|
orientation: o,
|
|
2499
2498
|
transition: l,
|
|
2500
|
-
type:
|
|
2501
|
-
xScale:
|
|
2499
|
+
type: u,
|
|
2500
|
+
xScale: i,
|
|
2502
2501
|
yScale: c,
|
|
2503
2502
|
classList: v,
|
|
2504
2503
|
labels: s
|
|
2505
|
-
} =
|
|
2506
|
-
const I = Ua(n,
|
|
2504
|
+
} = S(r), f = Le("chartID"), { emitInternalEvent: m } = K(e, f), { groupedData: _ } = St(n, s), { barXScale: h, barYScale: y } = Xa(i, c, o), p = d(() => typeof v.value == "string" ? [v.value] : v.value), k = d(() => {
|
|
2505
|
+
const I = Ua(n, u), { barAttributeGenerator: R } = _t[I](
|
|
2507
2506
|
n,
|
|
2508
2507
|
h,
|
|
2509
2508
|
y,
|
|
@@ -2511,15 +2510,15 @@ const _t = {
|
|
|
2511
2510
|
a,
|
|
2512
2511
|
p.value
|
|
2513
2512
|
);
|
|
2514
|
-
return
|
|
2513
|
+
return R;
|
|
2515
2514
|
}), x = d(() => {
|
|
2516
2515
|
if (l.value)
|
|
2517
|
-
return o.value ===
|
|
2516
|
+
return o.value === L.HORIZONTAL ? "width" : "height";
|
|
2518
2517
|
});
|
|
2519
2518
|
async function T(I) {
|
|
2520
2519
|
e("lume__internal--hover", I), m("lume__internal--hover", I);
|
|
2521
2520
|
}
|
|
2522
|
-
return { __sfc: !0, MIXIN_MAP: _t, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type:
|
|
2521
|
+
return { __sfc: !0, MIXIN_MAP: _t, props: r, emit: e, data: n, hoveredIndex: a, orientation: o, transition: l, type: u, xScale: i, yScale: c, classList: v, labels: s, chartID: f, emitInternalEvent: m, groupedData: _, barXScale: h, barYScale: y, computedClasses: p, getBarAttributes: k, computedTransition: x, handleInternalHover: T, LumeBar: Ue };
|
|
2523
2522
|
}
|
|
2524
2523
|
});
|
|
2525
2524
|
var no = function() {
|
|
@@ -2527,14 +2526,14 @@ var no = function() {
|
|
|
2527
2526
|
return r("g", { staticClass: "lume-bar-group", attrs: { "data-j-bars-group": "" } }, e._l(n.groupedData, function(a, o) {
|
|
2528
2527
|
return r("g", { key: o, on: { mouseenter: function(l) {
|
|
2529
2528
|
return n.handleInternalHover(o);
|
|
2530
|
-
} } }, e._l(a, function(l,
|
|
2531
|
-
return r(n.LumeBar, e._b({ key: `bar-${
|
|
2529
|
+
} } }, e._l(a, function(l, u) {
|
|
2530
|
+
return r(n.LumeBar, e._b({ key: `bar-${u}`, attrs: { transition: n.computedTransition, "data-j-lume-bar": "" }, on: { click: function(i) {
|
|
2532
2531
|
return n.emit("bar-click", {
|
|
2533
2532
|
index: o,
|
|
2534
|
-
datasetIndex:
|
|
2535
|
-
event:
|
|
2533
|
+
datasetIndex: u,
|
|
2534
|
+
event: i
|
|
2536
2535
|
});
|
|
2537
|
-
} } }, "lume-bar", n.getBarAttributes(l,
|
|
2536
|
+
} } }, "lume-bar", n.getBarAttributes(l, u, o, a), !1));
|
|
2538
2537
|
}), 1);
|
|
2539
2538
|
}), 0);
|
|
2540
2539
|
}, ro = [], ao = /* @__PURE__ */ E(
|
|
@@ -2546,13 +2545,13 @@ var no = function() {
|
|
|
2546
2545
|
null
|
|
2547
2546
|
);
|
|
2548
2547
|
const et = ao.exports, oo = {
|
|
2549
|
-
[
|
|
2548
|
+
[L.VERTICAL]: {
|
|
2550
2549
|
withTooltip: !0,
|
|
2551
2550
|
xAxisOptions: {},
|
|
2552
2551
|
yAxisOptions: { gridLines: !0 },
|
|
2553
2552
|
margins: re.VERTICAL
|
|
2554
2553
|
},
|
|
2555
|
-
[
|
|
2554
|
+
[L.HORIZONTAL]: {
|
|
2556
2555
|
withTooltip: !0,
|
|
2557
2556
|
xAxisOptions: { gridLines: !0 },
|
|
2558
2557
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2561,17 +2560,17 @@ const et = ao.exports, oo = {
|
|
|
2561
2560
|
}, lo = /* @__PURE__ */ N({
|
|
2562
2561
|
__name: "lume-single-bar-chart",
|
|
2563
2562
|
props: {
|
|
2564
|
-
...
|
|
2563
|
+
...ue(We)
|
|
2565
2564
|
},
|
|
2566
2565
|
setup(t, { emit: e }) {
|
|
2567
|
-
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { orientation: o, options: l } =
|
|
2568
|
-
() => oo[o.value ||
|
|
2566
|
+
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { orientation: o, options: l } = S(r), u = d(
|
|
2567
|
+
() => oo[o.value || L.VERTICAL]
|
|
2569
2568
|
// needs to be computed so that default options are reactive
|
|
2570
|
-
), { allOptions:
|
|
2571
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions:
|
|
2569
|
+
), { allOptions: i } = Y(l, u);
|
|
2570
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: u, allOptions: i, LumeChart: se, LumeBarGroup: et };
|
|
2572
2571
|
}
|
|
2573
2572
|
});
|
|
2574
|
-
var
|
|
2573
|
+
var io = function() {
|
|
2575
2574
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2576
2575
|
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) {
|
|
2577
2576
|
return [r(n.LumeBarGroup, e._g(e._b({ attrs: { orientation: n.orientation } }, "lume-bar-group", a, !1), n.componentEventPropagator))];
|
|
@@ -2580,22 +2579,22 @@ var uo = function() {
|
|
|
2580
2579
|
return [e._t(o, null, null, l || {})];
|
|
2581
2580
|
} };
|
|
2582
2581
|
})], null, !0) }, "lume-chart", { ...n.props, ...e.$attrs }, !1), n.componentEventPropagator));
|
|
2583
|
-
},
|
|
2582
|
+
}, uo = [], so = /* @__PURE__ */ E(
|
|
2584
2583
|
lo,
|
|
2585
|
-
uo,
|
|
2586
2584
|
io,
|
|
2585
|
+
uo,
|
|
2587
2586
|
!1,
|
|
2588
2587
|
null,
|
|
2589
2588
|
null
|
|
2590
2589
|
);
|
|
2591
2590
|
const tl = so.exports, co = {
|
|
2592
|
-
[
|
|
2591
|
+
[L.VERTICAL]: {
|
|
2593
2592
|
withTooltip: !0,
|
|
2594
2593
|
xAxisOptions: {},
|
|
2595
2594
|
yAxisOptions: { gridLines: !0 },
|
|
2596
2595
|
margins: re.VERTICAL
|
|
2597
2596
|
},
|
|
2598
|
-
[
|
|
2597
|
+
[L.HORIZONTAL]: {
|
|
2599
2598
|
withTooltip: !0,
|
|
2600
2599
|
xAxisOptions: { gridLines: !0 },
|
|
2601
2600
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2605,17 +2604,17 @@ const tl = so.exports, co = {
|
|
|
2605
2604
|
}, vo = /* @__PURE__ */ N({
|
|
2606
2605
|
__name: "lume-grouped-bar-chart",
|
|
2607
2606
|
props: {
|
|
2608
|
-
...
|
|
2607
|
+
...ue()
|
|
2609
2608
|
},
|
|
2610
2609
|
setup(t, { emit: e }) {
|
|
2611
|
-
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { orientation: o, options: l } =
|
|
2612
|
-
() => co[o.value ||
|
|
2610
|
+
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { orientation: o, options: l } = S(r), u = d(
|
|
2611
|
+
() => co[o.value || L.VERTICAL]
|
|
2613
2612
|
// needs to be computed so that default options are reactive
|
|
2614
|
-
), { allOptions:
|
|
2613
|
+
), { allOptions: i } = Y(
|
|
2615
2614
|
l,
|
|
2616
|
-
|
|
2615
|
+
u
|
|
2617
2616
|
);
|
|
2618
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions:
|
|
2617
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, orientation: o, options: l, baseOptions: u, allOptions: i, LumeChart: se, LumeBarGroup: et };
|
|
2619
2618
|
}
|
|
2620
2619
|
});
|
|
2621
2620
|
var fo = function() {
|
|
@@ -2636,14 +2635,14 @@ var fo = function() {
|
|
|
2636
2635
|
null
|
|
2637
2636
|
);
|
|
2638
2637
|
const nl = mo.exports, _o = {
|
|
2639
|
-
[
|
|
2638
|
+
[L.VERTICAL]: {
|
|
2640
2639
|
withTooltip: !0,
|
|
2641
2640
|
xAxisOptions: {},
|
|
2642
2641
|
yAxisOptions: { gridLines: !0 },
|
|
2643
2642
|
margins: re.VERTICAL,
|
|
2644
2643
|
tooltipOptions: { inverse: !0 }
|
|
2645
2644
|
},
|
|
2646
|
-
[
|
|
2645
|
+
[L.HORIZONTAL]: {
|
|
2647
2646
|
withTooltip: !0,
|
|
2648
2647
|
xAxisOptions: { gridLines: !0 },
|
|
2649
2648
|
yAxisOptions: { gridLines: !1 },
|
|
@@ -2653,21 +2652,21 @@ const nl = mo.exports, _o = {
|
|
|
2653
2652
|
}, ho = /* @__PURE__ */ N({
|
|
2654
2653
|
__name: "lume-stacked-bar-chart",
|
|
2655
2654
|
props: {
|
|
2656
|
-
...
|
|
2655
|
+
...ue()
|
|
2657
2656
|
},
|
|
2658
2657
|
setup(t, { emit: e }) {
|
|
2659
|
-
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { data: o, orientation: l, options:
|
|
2660
|
-
() => _o[l.value ||
|
|
2658
|
+
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { data: o, orientation: l, options: u, labels: i } = S(r), c = d(
|
|
2659
|
+
() => _o[l.value || L.VERTICAL]
|
|
2661
2660
|
// needs to be computed so that default options are reactive
|
|
2662
2661
|
), { allOptions: v } = Y(
|
|
2663
|
-
|
|
2662
|
+
u,
|
|
2664
2663
|
c
|
|
2665
|
-
), { internalData: s } = Qe(o), { groupedData: f } = St(s,
|
|
2664
|
+
), { internalData: s } = Qe(o), { groupedData: f } = St(s, i), { stackedXScaleGenerator: m, stackedYScaleGenerator: _ } = qa(
|
|
2666
2665
|
f,
|
|
2667
2666
|
l,
|
|
2668
|
-
|
|
2667
|
+
u
|
|
2669
2668
|
), h = d(() => r.xScale || m), y = d(() => r.yScale || _);
|
|
2670
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options:
|
|
2669
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, data: o, orientation: l, options: u, labels: i, baseOptions: c, allOptions: v, internalData: s, groupedData: f, stackedXScaleGenerator: m, stackedYScaleGenerator: _, xScale: h, yScale: y, LumeChart: se, LumeBarGroup: et };
|
|
2671
2670
|
}
|
|
2672
2671
|
});
|
|
2673
2672
|
var go = function() {
|
|
@@ -2722,7 +2721,7 @@ const rl = bo.exports, ht = 2, ko = /* @__PURE__ */ N({
|
|
|
2722
2721
|
emits: ["click"],
|
|
2723
2722
|
setup(t, { emit: e }) {
|
|
2724
2723
|
const r = w(null);
|
|
2725
|
-
return ee(() =>
|
|
2724
|
+
return ee(() => Ie(r.value)), { __sfc: !0, DEFAULT_LINE_WIDTH: ht, emit: e, root: r };
|
|
2726
2725
|
}
|
|
2727
2726
|
});
|
|
2728
2727
|
var xo = function() {
|
|
@@ -2745,87 +2744,86 @@ var xo = function() {
|
|
|
2745
2744
|
null,
|
|
2746
2745
|
"59449838"
|
|
2747
2746
|
);
|
|
2748
|
-
const Lo = To.exports, gt = 4, Oo = /* @__PURE__ */ N({
|
|
2747
|
+
const Lo = To.exports, gt = 4, yt = 3, Oo = /* @__PURE__ */ N({
|
|
2749
2748
|
__name: "lume-point",
|
|
2750
2749
|
props: {
|
|
2751
|
-
x:
|
|
2752
|
-
y:
|
|
2753
|
-
color: {
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
}
|
|
2757
|
-
radius: {
|
|
2758
|
-
type: Number,
|
|
2759
|
-
default: gt
|
|
2760
|
-
},
|
|
2761
|
-
active: {
|
|
2762
|
-
type: Boolean,
|
|
2763
|
-
default: !1
|
|
2764
|
-
}
|
|
2750
|
+
x: null,
|
|
2751
|
+
y: null,
|
|
2752
|
+
color: { default: z.Skyblue },
|
|
2753
|
+
radius: { default: gt },
|
|
2754
|
+
active: { type: Boolean, default: !1 },
|
|
2755
|
+
visible: { type: Boolean, default: !1 }
|
|
2765
2756
|
},
|
|
2766
2757
|
emits: ["click"],
|
|
2767
2758
|
setup(t, { emit: e }) {
|
|
2768
|
-
const r = t, n = w(null), a = d(() => r.radius / 2);
|
|
2769
|
-
return ee(() =>
|
|
2759
|
+
const r = t, n = w(null), a = d(() => r.radius / 2), o = d(() => r.active ? r.radius : r.visible ? yt : 0);
|
|
2760
|
+
return ee(() => Ie(n.value)), { __sfc: !0, DEFAULT_RADIUS: gt, DEFAULT_VISIBLE_RADIUS: yt, props: r, emit: e, root: n, strokeWidth: a, computedRadius: o };
|
|
2770
2761
|
}
|
|
2771
2762
|
});
|
|
2772
|
-
var
|
|
2763
|
+
var Io = function() {
|
|
2773
2764
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2774
|
-
return r("circle", { ref: "root", staticClass: "lume-point", class:
|
|
2765
|
+
return r("circle", { ref: "root", staticClass: "lume-point", class: {
|
|
2766
|
+
[`lume-stroke--${e.color}`]: !0,
|
|
2767
|
+
"lume-point--active": e.active,
|
|
2768
|
+
[`lume-point--visible lume-fill--${e.color}`]: e.visible
|
|
2769
|
+
}, attrs: { cx: e.x, cy: e.y, r: n.computedRadius, "stroke-width": n.strokeWidth, "data-j-point": "" }, on: { click: function(a) {
|
|
2775
2770
|
return n.emit("click", a);
|
|
2776
2771
|
} } });
|
|
2777
|
-
},
|
|
2772
|
+
}, $o = [], wo = /* @__PURE__ */ E(
|
|
2778
2773
|
Oo,
|
|
2779
|
-
$o,
|
|
2780
2774
|
Io,
|
|
2775
|
+
$o,
|
|
2781
2776
|
!1,
|
|
2782
2777
|
null,
|
|
2783
|
-
"
|
|
2778
|
+
"080270c0"
|
|
2784
2779
|
);
|
|
2785
2780
|
const Eo = wo.exports;
|
|
2786
|
-
function
|
|
2781
|
+
function Bt(t) {
|
|
2787
2782
|
function e(o) {
|
|
2788
2783
|
let l = null;
|
|
2789
|
-
return o == null ? void 0 : o.reduce((
|
|
2784
|
+
return o == null ? void 0 : o.reduce((u, i, c) => (i == null || i.value == null ? (l ? l.push(c) : l = [c], c === (o == null ? void 0 : o.length) - 1 && u.push(l)) : l && (u.push(l), l = null), u), []);
|
|
2790
2785
|
}
|
|
2791
|
-
function r(o, l,
|
|
2792
|
-
const s = Math.abs(o - l) / (
|
|
2786
|
+
function r(o, l, u, i) {
|
|
2787
|
+
const s = Math.abs(o - l) / (u + 1) * (i + 1);
|
|
2793
2788
|
return o == null && l == null ? null : o > l ? o - s : o + s;
|
|
2794
2789
|
}
|
|
2795
2790
|
function n(o) {
|
|
2796
|
-
return function(
|
|
2791
|
+
return function(u) {
|
|
2797
2792
|
return !!o.find(
|
|
2798
|
-
(
|
|
2793
|
+
(i) => i.includes(u) || i.includes(u - 1)
|
|
2799
2794
|
);
|
|
2800
2795
|
};
|
|
2801
2796
|
}
|
|
2802
|
-
return { computedLineData: d(
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2797
|
+
return { computedLineData: d(
|
|
2798
|
+
() => t.value.map((o) => {
|
|
2799
|
+
const l = e(o.values);
|
|
2800
|
+
return {
|
|
2801
|
+
...o,
|
|
2802
|
+
isDashed: n(l),
|
|
2803
|
+
values: o.values.map((u, i) => {
|
|
2804
|
+
var v, s;
|
|
2805
|
+
const c = l.find(
|
|
2806
|
+
(f) => f.includes(i)
|
|
2807
|
+
);
|
|
2808
|
+
if (c) {
|
|
2809
|
+
const f = c[0] - 1, m = c[c.length - 1] + 1;
|
|
2810
|
+
let _ = (v = o.values[f]) == null ? void 0 : v.value, h = (s = o.values[m]) == null ? void 0 : s.value;
|
|
2811
|
+
return _ == null && (_ = h), h == null && (h = _), {
|
|
2812
|
+
value: r(
|
|
2813
|
+
_,
|
|
2814
|
+
h,
|
|
2815
|
+
c.length,
|
|
2816
|
+
c.indexOf(i)
|
|
2817
|
+
),
|
|
2818
|
+
label: $t,
|
|
2819
|
+
isNull: !0
|
|
2820
|
+
};
|
|
2821
|
+
}
|
|
2822
|
+
return u;
|
|
2823
|
+
})
|
|
2824
|
+
};
|
|
2825
|
+
})
|
|
2826
|
+
) };
|
|
2829
2827
|
}
|
|
2830
2828
|
function No(t, e) {
|
|
2831
2829
|
const r = t.bandwidth() / 2;
|
|
@@ -2835,17 +2833,17 @@ function Ho(t, e) {
|
|
|
2835
2833
|
return (r, n) => t(e + (n - 1));
|
|
2836
2834
|
}
|
|
2837
2835
|
function Do(t, e, r, n) {
|
|
2838
|
-
const a =
|
|
2836
|
+
const a = Kt().x(
|
|
2839
2837
|
U(r) ? No(r, t) : Ho(r, t)
|
|
2840
2838
|
).y((o) => n(o));
|
|
2841
2839
|
return e.every((o) => o == null) ? null : a(e);
|
|
2842
2840
|
}
|
|
2843
|
-
const
|
|
2841
|
+
const bt = 1, Ro = /* @__PURE__ */ N({
|
|
2844
2842
|
__name: "lume-line-group",
|
|
2845
2843
|
props: {
|
|
2846
|
-
|
|
2844
|
+
...$e(),
|
|
2847
2845
|
withPoints: {
|
|
2848
|
-
type: Boolean,
|
|
2846
|
+
type: [Boolean, String],
|
|
2849
2847
|
default: !0
|
|
2850
2848
|
},
|
|
2851
2849
|
transition: {
|
|
@@ -2855,103 +2853,105 @@ const yt = 1, Ro = /* @__PURE__ */ N({
|
|
|
2855
2853
|
},
|
|
2856
2854
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
2857
2855
|
setup(t, { emit: e }) {
|
|
2858
|
-
const r = t, { data: n, options: a, xScale: o, yScale: l, labels:
|
|
2856
|
+
const r = t, { data: n, options: a, xScale: o, yScale: l, labels: u } = S(r), i = Le(
|
|
2859
2857
|
"tooltipAnchorAttributes",
|
|
2860
2858
|
null
|
|
2861
|
-
), { updateTooltipAnchorAttributes: c } =
|
|
2862
|
-
|
|
2859
|
+
), { updateTooltipAnchorAttributes: c } = Rt(
|
|
2860
|
+
i,
|
|
2863
2861
|
a,
|
|
2864
2862
|
o,
|
|
2865
2863
|
l,
|
|
2866
|
-
|
|
2864
|
+
u
|
|
2867
2865
|
), v = d(() => {
|
|
2868
2866
|
if (n.value.every((D) => D.isDashed))
|
|
2869
2867
|
return n.value;
|
|
2870
|
-
const { computedLineData:
|
|
2871
|
-
return a.value.withTooltip !== !1 && (
|
|
2868
|
+
const { computedLineData: $ } = Bt(n);
|
|
2869
|
+
return a.value.withTooltip !== !1 && (i != null && i.value) && c($.value), $.value;
|
|
2872
2870
|
}), s = d(() => {
|
|
2873
2871
|
if (r.hoveredIndex === -1) return;
|
|
2874
|
-
const
|
|
2872
|
+
const $ = dn(
|
|
2875
2873
|
v.value,
|
|
2876
2874
|
r.hoveredIndex
|
|
2877
2875
|
);
|
|
2878
2876
|
return {
|
|
2879
|
-
d: `M ${
|
|
2880
|
-
V ${l.value(
|
|
2877
|
+
d: `M ${Se(o.value, r.hoveredIndex)},${l.value.range()[1]}
|
|
2878
|
+
V ${l.value($)}`
|
|
2881
2879
|
// Move to X index, Vertical line to the highest point
|
|
2882
2880
|
};
|
|
2883
2881
|
}), f = d(
|
|
2884
|
-
() => o.value &&
|
|
2882
|
+
() => o.value && bt / (vn(o.value) - 1)
|
|
2885
2883
|
// Subtracting the first line (read below)
|
|
2886
2884
|
), m = d(
|
|
2887
2885
|
() => {
|
|
2888
|
-
var
|
|
2889
|
-
return ((
|
|
2886
|
+
var $;
|
|
2887
|
+
return (($ = a.value) == null ? void 0 : $.lineWidth) * 2 || void 0;
|
|
2890
2888
|
}
|
|
2891
2889
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
2892
2890
|
), _ = d(
|
|
2893
2891
|
() => o.value.bandwidth() / 2
|
|
2894
2892
|
), h = d(() => o.value.domain()), y = d(
|
|
2895
2893
|
() => a.value.withPoints ?? r.withPoints
|
|
2894
|
+
), p = d(
|
|
2895
|
+
() => a.value.withPoints === "visible" || r.withPoints === "visible"
|
|
2896
2896
|
);
|
|
2897
|
-
function
|
|
2898
|
-
return v.value[
|
|
2899
|
-
}
|
|
2900
|
-
function
|
|
2901
|
-
var
|
|
2902
|
-
const
|
|
2903
|
-
(
|
|
2904
|
-
(
|
|
2897
|
+
function k($) {
|
|
2898
|
+
return v.value[$].values;
|
|
2899
|
+
}
|
|
2900
|
+
function x($, D) {
|
|
2901
|
+
var C, F;
|
|
2902
|
+
const B = $ === 0 ? [] : [
|
|
2903
|
+
(C = k(D)[$ - 1]) == null ? void 0 : C.value,
|
|
2904
|
+
(F = k(D)[$]) == null ? void 0 : F.value
|
|
2905
2905
|
];
|
|
2906
2906
|
return Do(
|
|
2907
|
-
|
|
2908
|
-
|
|
2907
|
+
$,
|
|
2908
|
+
B,
|
|
2909
2909
|
o.value,
|
|
2910
2910
|
l.value
|
|
2911
2911
|
) || "";
|
|
2912
2912
|
}
|
|
2913
|
-
function
|
|
2913
|
+
function T($) {
|
|
2914
2914
|
return {
|
|
2915
|
-
animationDelay:
|
|
2915
|
+
animationDelay: $ < 2 ? 0 : ($ - 1) * f.value,
|
|
2916
2916
|
animationDuration: f.value
|
|
2917
2917
|
};
|
|
2918
2918
|
}
|
|
2919
|
-
function
|
|
2920
|
-
var
|
|
2921
|
-
const
|
|
2919
|
+
function I($, D) {
|
|
2920
|
+
var C;
|
|
2921
|
+
const B = (C = k(D)[$]) == null ? void 0 : C.value;
|
|
2922
2922
|
return {
|
|
2923
|
-
x: U(o.value) ? r.xScale(h.value[
|
|
2924
|
-
y:
|
|
2923
|
+
x: U(o.value) ? r.xScale(h.value[$]) + _.value : r.xScale($),
|
|
2924
|
+
y: B === null ? l.value(l.value.domain()[1]) : l.value(B)
|
|
2925
2925
|
};
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2928
|
-
return r.hoveredIndex ===
|
|
2927
|
+
function R($) {
|
|
2928
|
+
return r.hoveredIndex === $;
|
|
2929
2929
|
}
|
|
2930
|
-
return { __sfc: !0, LUME_TRANSITION_TIME_FULL:
|
|
2930
|
+
return { __sfc: !0, LUME_TRANSITION_TIME_FULL: bt, props: r, emit: e, data: n, options: a, xScale: o, yScale: l, labels: u, tooltipAnchorAttributes: i, updateTooltipAnchorAttributes: c, computedGroupData: v, overlayLineAttributes: s, animationDuration: f, pointRadius: m, xAxisOffset: _, domain: h, computedWithPoints: y, computedVisiblePoints: p, getValuesFromDataset: k, getPathDefinition: x, getLineTransitionParams: T, getPointPosition: I, isPointActive: R, LumeLine: Lo, LumePoint: Eo };
|
|
2931
2931
|
}
|
|
2932
2932
|
});
|
|
2933
|
-
var
|
|
2933
|
+
var Po = function() {
|
|
2934
2934
|
var e = this, r = e._self._c, n = e._self._setupProxy;
|
|
2935
2935
|
return r("g", { staticClass: "lume-line-group", attrs: { "data-j-lume-line-group": "" } }, [r("path", e._b({ staticClass: "lume-line-group__overlay-line", attrs: { "data-j-lume-line-group__overlay-line": "" } }, "path", n.overlayLineAttributes, !1)), e._l(n.computedGroupData, function(a, o) {
|
|
2936
|
-
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l,
|
|
2937
|
-
return r(n.LumeLine, e._b({ key: `line-${
|
|
2938
|
-
return n.emit("line-click", { index:
|
|
2939
|
-
} } }, "lume-line", n.getLineTransitionParams(
|
|
2940
|
-
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, e._l(a.values, function(l,
|
|
2941
|
-
return r(n.LumePoint, e._b({
|
|
2942
|
-
return n.emit("point-click", { index:
|
|
2943
|
-
} } }, "lume-point", n.getPointPosition(
|
|
2944
|
-
}),
|
|
2936
|
+
return r("g", { key: a.label, staticClass: "lume-line-group__group" }, [r("g", { staticClass: "lume-line-group__lines" }, e._l(a.values, function(l, u) {
|
|
2937
|
+
return r(n.LumeLine, e._b({ key: `line-${u}`, attrs: { color: a.color, dashed: a.isDashed(u), "path-definition": n.getPathDefinition(u, o), transition: e.transition, width: n.options.lineWidth }, on: { click: function(i) {
|
|
2938
|
+
return n.emit("line-click", { index: u, datasetIndex: o, event: i });
|
|
2939
|
+
} } }, "lume-line", n.getLineTransitionParams(u), !1));
|
|
2940
|
+
}), 1), n.computedWithPoints ? r("g", { staticClass: "lume-line-group__points", attrs: { "data-j-lume-line-group__points": "" } }, [e._l(a.values, function(l, u) {
|
|
2941
|
+
return [l.isNull ? e._e() : r(n.LumePoint, e._b({ attrs: { active: n.isPointActive(u), color: a.color, index: u, radius: n.pointRadius, visible: n.computedVisiblePoints }, on: { click: function(i) {
|
|
2942
|
+
return n.emit("point-click", { index: u, datasetIndex: o, event: i });
|
|
2943
|
+
} } }, "lume-point", n.getPointPosition(u, o), !1))];
|
|
2944
|
+
})], 2) : e._e()]);
|
|
2945
2945
|
})], 2);
|
|
2946
|
-
},
|
|
2946
|
+
}, So = [], Bo = /* @__PURE__ */ E(
|
|
2947
2947
|
Ro,
|
|
2948
|
-
So,
|
|
2949
2948
|
Po,
|
|
2949
|
+
So,
|
|
2950
2950
|
!1,
|
|
2951
2951
|
null,
|
|
2952
|
-
"
|
|
2952
|
+
"1eb6df01"
|
|
2953
2953
|
);
|
|
2954
|
-
const
|
|
2954
|
+
const Ct = Bo.exports, Co = {
|
|
2955
2955
|
margins: re.VERTICAL,
|
|
2956
2956
|
startOnZero: !0,
|
|
2957
2957
|
withTooltip: !0,
|
|
@@ -2960,11 +2960,11 @@ const Bt = Bo.exports, Co = {
|
|
|
2960
2960
|
}, Go = /* @__PURE__ */ N({
|
|
2961
2961
|
__name: "lume-line-chart",
|
|
2962
2962
|
props: {
|
|
2963
|
-
...
|
|
2963
|
+
...ue(null, !1)
|
|
2964
2964
|
},
|
|
2965
2965
|
setup(t, { emit: e }) {
|
|
2966
|
-
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { options: o } =
|
|
2967
|
-
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart:
|
|
2966
|
+
const r = t, { componentEventPropagator: n } = K(e), a = ae(M()), { options: o } = S(r), { allOptions: l } = Y(o, Co);
|
|
2967
|
+
return { __sfc: !0, props: r, emit: e, componentEventPropagator: n, slots: a, options: o, allOptions: l, LumeChart: se, LumeLineGroup: Ct };
|
|
2968
2968
|
}
|
|
2969
2969
|
});
|
|
2970
2970
|
var Fo = function() {
|
|
@@ -2991,7 +2991,7 @@ function Mo(t) {
|
|
|
2991
2991
|
if (!r || !n || U(r) || U(n))
|
|
2992
2992
|
return;
|
|
2993
2993
|
const a = t.value[0].values;
|
|
2994
|
-
return
|
|
2994
|
+
return Jt().x((o, l) => r(l)).y0(n(Math.min(...n.domain()))).y1((o) => n(o.value))(a);
|
|
2995
2995
|
}
|
|
2996
2996
|
) };
|
|
2997
2997
|
}
|
|
@@ -3016,9 +3016,9 @@ const zo = {
|
|
|
3016
3016
|
...me()
|
|
3017
3017
|
},
|
|
3018
3018
|
setup(t, { expose: e, emit: r }) {
|
|
3019
|
-
const n = t, { componentEventPropagator: a } = K(r), o = ae(M()), { data: l, options:
|
|
3019
|
+
const n = t, { componentEventPropagator: a } = K(r), o = ae(M()), { data: l, options: u } = S(n), { internalData: i } = Qe(l), { allOptions: c } = Y(u, zo), { computedLineData: v } = Bt(i), { areaPathDefinition: s } = Mo(v), f = d(() => {
|
|
3020
3020
|
var y, p;
|
|
3021
|
-
return (p = (y =
|
|
3021
|
+
return (p = (y = i.value) == null ? void 0 : y[0]) == null ? void 0 : p.color;
|
|
3022
3022
|
}), m = d(
|
|
3023
3023
|
() => {
|
|
3024
3024
|
var y, p;
|
|
@@ -3033,11 +3033,11 @@ const zo = {
|
|
|
3033
3033
|
}
|
|
3034
3034
|
function h(y, p, k) {
|
|
3035
3035
|
if (y.length)
|
|
3036
|
-
return
|
|
3036
|
+
return fe().range([0, k.width]).domain([0, y[0].values.length - 1]);
|
|
3037
3037
|
}
|
|
3038
3038
|
return e({
|
|
3039
3039
|
areaPathDefinition: s
|
|
3040
|
-
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options:
|
|
3040
|
+
}), { __sfc: !0, props: n, emit: r, componentEventPropagator: a, slots: o, data: l, options: u, internalData: i, allOptions: c, computedLineData: v, areaPathDefinition: s, computedColor: f, areaColor: m, getSparklineOptions: _, xScaleGenerator: h, LumeChart: se, LumeLineGroup: Ct };
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
var Zo = function() {
|
|
@@ -3060,30 +3060,30 @@ var Zo = function() {
|
|
|
3060
3060
|
Uo,
|
|
3061
3061
|
!1,
|
|
3062
3062
|
null,
|
|
3063
|
-
"
|
|
3063
|
+
"579f7e32"
|
|
3064
3064
|
);
|
|
3065
3065
|
const ol = Xo.exports;
|
|
3066
3066
|
export {
|
|
3067
|
-
|
|
3068
|
-
|
|
3067
|
+
Bt as A,
|
|
3068
|
+
Sr as B,
|
|
3069
3069
|
Br as C,
|
|
3070
3070
|
me as D,
|
|
3071
3071
|
Y as E,
|
|
3072
3072
|
qe as F,
|
|
3073
|
-
|
|
3073
|
+
ue as G,
|
|
3074
3074
|
Qn as H,
|
|
3075
3075
|
qn as I,
|
|
3076
3076
|
Kn as J,
|
|
3077
3077
|
Jn as K,
|
|
3078
3078
|
Dn as L,
|
|
3079
|
-
|
|
3080
|
-
|
|
3079
|
+
ut as M,
|
|
3080
|
+
Se as N,
|
|
3081
3081
|
st as O,
|
|
3082
|
-
|
|
3082
|
+
Rt as P,
|
|
3083
3083
|
Fr as Q,
|
|
3084
3084
|
jr as R,
|
|
3085
3085
|
z as S,
|
|
3086
|
-
|
|
3086
|
+
Dt as T,
|
|
3087
3087
|
Xe as U,
|
|
3088
3088
|
Ye as V,
|
|
3089
3089
|
Ke as W,
|
|
@@ -3094,7 +3094,7 @@ export {
|
|
|
3094
3094
|
rl as d,
|
|
3095
3095
|
al as e,
|
|
3096
3096
|
ol as f,
|
|
3097
|
-
|
|
3097
|
+
se as g,
|
|
3098
3098
|
ar as h,
|
|
3099
3099
|
sr as i,
|
|
3100
3100
|
wr as j,
|
|
@@ -3107,12 +3107,12 @@ export {
|
|
|
3107
3107
|
Eo as q,
|
|
3108
3108
|
Ra as r,
|
|
3109
3109
|
na as s,
|
|
3110
|
-
|
|
3110
|
+
ia as t,
|
|
3111
3111
|
va as u,
|
|
3112
3112
|
et as v,
|
|
3113
|
-
|
|
3113
|
+
Ct as w,
|
|
3114
3114
|
Rr as x,
|
|
3115
3115
|
Je as y,
|
|
3116
3116
|
Qe as z
|
|
3117
3117
|
};
|
|
3118
|
-
//# sourceMappingURL=
|
|
3118
|
+
//# sourceMappingURL=Bbm8lOKv.js.map
|