@adyen/lume-vue3 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/BFctvs0x.js +5 -0
- package/dist/common/BFctvs0x.js.map +1 -0
- package/dist/common/BeJM7XD3.js +5 -0
- package/dist/common/BeJM7XD3.js.map +1 -0
- package/dist/common/BkqRLrZG.js +5 -0
- package/dist/common/BkqRLrZG.js.map +1 -0
- package/dist/common/{o-3UCjl8.js → CDiQ5aDd.js} +1020 -1016
- package/dist/common/CDiQ5aDd.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 +8 -8
- package/dist/styles/main.css +2 -2
- package/package.json +7 -7
- package/dist/common/D3C1hTl9.js +0 -5
- package/dist/common/D3C1hTl9.js.map +0 -1
- package/dist/common/DI0JiGP5.js +0 -5
- package/dist/common/DI0JiGP5.js.map +0 -1
- package/dist/common/DgbGPOnI.js +0 -5
- package/dist/common/DgbGPOnI.js.map +0 -1
- package/dist/common/o-3UCjl8.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
2
|
-
import { sankeyLinkHorizontal as vn, sankey as
|
|
3
|
-
import { format as pn, ticks as hn,
|
|
1
|
+
import { defineComponent as Z, ref as R, createElementBlock as I, openBlock as _, mergeProps as j, createElementVNode as S, createCommentVNode as C, toDisplayString as oe, isRef as Gt, computed as v, watch as X, toRefs as te, inject as Fe, reactive as Ce, onMounted as _e, unref as d, createBlock as Y, Fragment as q, renderList as W, normalizeStyle as jt, normalizeClass as ne, watchEffect as Vt, onBeforeUnmount as Pt, renderSlot as B, createTextVNode as ce, useSlots as re, nextTick as Qe, withCtx as V, createSlots as de, pushScopeId as sn, popScopeId as cn, provide as Ke, createVNode as ue, toHandlers as ae, normalizeProps as he, guardReactiveProps as ge, defineAsyncComponent as Je, resolveDynamicComponent as dn } from "vue";
|
|
2
|
+
import { sankeyLinkHorizontal as vn, sankey as mn, sankeyJustify as fn } from "d3-sankey";
|
|
3
|
+
import { format as pn, ticks as hn, scaleLinear as Be, scaleBand as Me, link as gn, line as yn, area as _n } from "d3";
|
|
4
4
|
import { createPopper as kn } from "@popperjs/core";
|
|
5
5
|
const bn = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
@@ -44,8 +44,8 @@ const bn = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t, a =
|
|
48
|
-
return n({ ref: a }), (
|
|
47
|
+
const o = t, a = R(null);
|
|
48
|
+
return n({ ref: a }), (r, l) => (_(), I("g", j(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
@@ -54,26 +54,26 @@ const bn = {
|
|
|
54
54
|
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
55
|
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
S("g", bn, [
|
|
58
|
+
S("rect", j(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
|
-
|
|
62
|
+
S("text", j(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
64
|
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
66
|
-
}),
|
|
66
|
+
}), oe(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (_(), I("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) :
|
|
68
|
+
e.withGridlines ? (_(), I("line", j({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : C("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), ee = (e, n) => {
|
|
72
72
|
const t = e.__vccOpts || e;
|
|
73
73
|
for (const [o, a] of n)
|
|
74
74
|
t[o] = a;
|
|
75
75
|
return t;
|
|
76
|
-
}, At = /* @__PURE__ */
|
|
76
|
+
}, At = /* @__PURE__ */ ee(An, [["__scopeId", "data-v-59ddc0a6"]]), Tn = [
|
|
77
77
|
"controls",
|
|
78
78
|
"legend",
|
|
79
79
|
"axes",
|
|
@@ -81,10 +81,10 @@ const bn = {
|
|
|
81
81
|
"tooltip",
|
|
82
82
|
"tooltip-content"
|
|
83
83
|
];
|
|
84
|
-
function
|
|
84
|
+
function Ft() {
|
|
85
85
|
return process.env.NODE_ENV === "production";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ct(e) {
|
|
88
88
|
return (e == null ? void 0 : e.map(
|
|
89
89
|
(n) => n.values.map((t) => t == null ? void 0 : t.value).flat()
|
|
90
90
|
).flat()) || [];
|
|
@@ -109,31 +109,31 @@ function zt(e, n) {
|
|
|
109
109
|
function $n(e) {
|
|
110
110
|
return e != null && qe(e) && "value" in e;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ve(e) {
|
|
113
113
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
114
114
|
}
|
|
115
115
|
function On(e) {
|
|
116
|
-
return
|
|
116
|
+
return ve(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
117
117
|
}
|
|
118
118
|
function In(e) {
|
|
119
119
|
const [n, t] = e.domain();
|
|
120
120
|
return n == null || t == null || n === 0 && t === 0;
|
|
121
121
|
}
|
|
122
|
-
const
|
|
122
|
+
const wn = (e, n) => {
|
|
123
123
|
if (!e)
|
|
124
124
|
throw new Error("Data is not a valid array");
|
|
125
125
|
if (e.length === 0)
|
|
126
126
|
throw new Error("Cannot get highest value from empty array");
|
|
127
127
|
e.some(
|
|
128
128
|
({ values: o }) => o.length - 1 >= n
|
|
129
|
-
) ||
|
|
129
|
+
) || ye(me.IndexExceedsLengthOfDataSets);
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function xn(e, n) {
|
|
132
132
|
var t;
|
|
133
|
-
return
|
|
133
|
+
return wn(e, n), ((t = e.reduce(
|
|
134
134
|
(o, a) => {
|
|
135
|
-
var
|
|
136
|
-
return (((
|
|
135
|
+
var r, l;
|
|
136
|
+
return (((r = o.values[n]) == null ? void 0 : r.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
137
137
|
}
|
|
138
138
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
139
139
|
}
|
|
@@ -148,7 +148,7 @@ function Wt(e) {
|
|
|
148
148
|
return Array(t).fill(null);
|
|
149
149
|
}
|
|
150
150
|
function En(e) {
|
|
151
|
-
return
|
|
151
|
+
return ve(e) ? e.domain().length : Math.max(...e.domain());
|
|
152
152
|
}
|
|
153
153
|
function Nn(e, n) {
|
|
154
154
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
@@ -157,7 +157,7 @@ function Dn(e, n, t) {
|
|
|
157
157
|
const o = n, a = e.slice(0, o);
|
|
158
158
|
return e.slice(o).concat(a);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Te(e) {
|
|
161
161
|
if (e.groups) {
|
|
162
162
|
const n = Object.keys(e);
|
|
163
163
|
return Object.assign(
|
|
@@ -175,19 +175,15 @@ function Hn(e) {
|
|
|
175
175
|
)
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
const Bn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
179
|
-
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
180
|
-
""
|
|
181
|
-
);
|
|
182
178
|
function ct(e, n) {
|
|
183
179
|
const t = n - e.length;
|
|
184
180
|
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
185
181
|
}
|
|
186
|
-
var
|
|
187
|
-
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(
|
|
188
|
-
const
|
|
189
|
-
function
|
|
190
|
-
n &&
|
|
182
|
+
var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
183
|
+
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
|
|
184
|
+
const Bn = "[lume] ";
|
|
185
|
+
function ye(e, n = !0) {
|
|
186
|
+
n && Ft() || console.warn(Bn + "Warning: " + e);
|
|
191
187
|
}
|
|
192
188
|
const Ve = (e) => {
|
|
193
189
|
let n = null;
|
|
@@ -196,7 +192,7 @@ const Ve = (e) => {
|
|
|
196
192
|
try {
|
|
197
193
|
n = pn(e);
|
|
198
194
|
} catch {
|
|
199
|
-
|
|
195
|
+
ye(me.InvalidFormat), n = null;
|
|
200
196
|
}
|
|
201
197
|
break;
|
|
202
198
|
case "function":
|
|
@@ -221,34 +217,34 @@ function fe(e, n) {
|
|
|
221
217
|
return o ? zt(o, e.value) : e.value;
|
|
222
218
|
}) };
|
|
223
219
|
}
|
|
224
|
-
const
|
|
225
|
-
function
|
|
226
|
-
const o =
|
|
220
|
+
const Mn = 0.2;
|
|
221
|
+
function Rn(e, n, t) {
|
|
222
|
+
const o = R(), a = v(() => Math.max(...e.value.range())), r = v(() => n.value.length);
|
|
227
223
|
function l() {
|
|
228
224
|
if (!n.value) return;
|
|
229
225
|
const c = n.value.reduce(
|
|
230
|
-
(
|
|
226
|
+
(f, u) => f + u.ref.getBoundingClientRect().width,
|
|
231
227
|
0
|
|
232
|
-
), s = Math.ceil(c /
|
|
233
|
-
o.value = s + s *
|
|
228
|
+
), s = Math.ceil(c / r.value);
|
|
229
|
+
o.value = s + s * Mn;
|
|
234
230
|
}
|
|
235
231
|
function i(c) {
|
|
236
232
|
if (!n.value) return !0;
|
|
237
|
-
const s = t.value.skip,
|
|
233
|
+
const s = t.value.skip, f = n.value.length;
|
|
238
234
|
if (c === 0) return !0;
|
|
239
|
-
const
|
|
240
|
-
return c %
|
|
235
|
+
const u = a.value / f, m = typeof s == "number" && s > 0 && s + 1 || Math.ceil(o.value / u);
|
|
236
|
+
return c % m === 0;
|
|
241
237
|
}
|
|
242
238
|
return X(n, l), { showTick: i };
|
|
243
239
|
}
|
|
244
240
|
const H = {
|
|
245
241
|
HORIZONTAL: "horizontal",
|
|
246
242
|
VERTICAL: "vertical"
|
|
247
|
-
},
|
|
243
|
+
}, Sn = {
|
|
248
244
|
SINGLE: "single",
|
|
249
245
|
GROUPED: "grouped",
|
|
250
246
|
STACKED: "stacked"
|
|
251
|
-
}, Zt = "No data", Tt = 20, Ut = 0.33, Xt = 0.5, Yt = 12, Se = 8,
|
|
247
|
+
}, Zt = "No data", Tt = 20, Ut = 0.33, Xt = 0.5, Yt = 12, Se = 8, Gn = 1, jn = [
|
|
252
248
|
"auto",
|
|
253
249
|
"auto-start",
|
|
254
250
|
"auto-end",
|
|
@@ -266,7 +262,7 @@ const H = {
|
|
|
266
262
|
"left-end"
|
|
267
263
|
];
|
|
268
264
|
function ze(e) {
|
|
269
|
-
e != null && e.closest("svg") ||
|
|
265
|
+
e != null && e.closest("svg") || ye(me.NotContainedInSvg);
|
|
270
266
|
}
|
|
271
267
|
const Kt = {
|
|
272
268
|
/** Displays a line for each tick. */
|
|
@@ -284,11 +280,11 @@ const Kt = {
|
|
|
284
280
|
tickFormat: null,
|
|
285
281
|
/** Space between the tick label and the axis line. */
|
|
286
282
|
tickPadding: 12
|
|
287
|
-
},
|
|
283
|
+
}, Vn = {
|
|
288
284
|
...Kt,
|
|
289
285
|
withTitle: !1,
|
|
290
286
|
skip: !0
|
|
291
|
-
},
|
|
287
|
+
}, Pn = {
|
|
292
288
|
...Kt,
|
|
293
289
|
gridLines: !0
|
|
294
290
|
}, Fn = function(e, n, t) {
|
|
@@ -298,11 +294,11 @@ const Kt = {
|
|
|
298
294
|
transform: `translate(${(e.value(s) ?? e.value(c)) - o.value}, 0)`
|
|
299
295
|
};
|
|
300
296
|
}
|
|
301
|
-
function
|
|
302
|
-
var
|
|
297
|
+
function r(c) {
|
|
298
|
+
var f;
|
|
303
299
|
const s = Math.max(
|
|
304
300
|
e.value.step(),
|
|
305
|
-
(c ? (
|
|
301
|
+
(c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : e.value.step()) + 20
|
|
306
302
|
);
|
|
307
303
|
return {
|
|
308
304
|
x: -(s - e.value.step()) / 2,
|
|
@@ -329,20 +325,20 @@ const Kt = {
|
|
|
329
325
|
}
|
|
330
326
|
return {
|
|
331
327
|
getGridLinesAttributes: l,
|
|
332
|
-
getTickGhostAttributes:
|
|
328
|
+
getTickGhostAttributes: r,
|
|
333
329
|
getTickGroupAttributes: a,
|
|
334
330
|
getTickLabelAttributes: i
|
|
335
331
|
};
|
|
336
|
-
},
|
|
332
|
+
}, Cn = function(e, n, t) {
|
|
337
333
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
338
334
|
function a(c, s) {
|
|
339
335
|
return {
|
|
340
336
|
transform: `translate(0, ${(e.value(s) ?? e.value(c)) - o.value})`
|
|
341
337
|
};
|
|
342
338
|
}
|
|
343
|
-
function
|
|
344
|
-
var
|
|
345
|
-
const s = (c ? (
|
|
339
|
+
function r(c) {
|
|
340
|
+
var f;
|
|
341
|
+
const s = (c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : 42) + t.value.tickPadding + Se;
|
|
346
342
|
return {
|
|
347
343
|
x: -s,
|
|
348
344
|
width: s,
|
|
@@ -367,11 +363,11 @@ const Kt = {
|
|
|
367
363
|
}
|
|
368
364
|
return {
|
|
369
365
|
getGridLinesAttributes: l,
|
|
370
|
-
getTickGhostAttributes:
|
|
366
|
+
getTickGhostAttributes: r,
|
|
371
367
|
getTickGroupAttributes: a,
|
|
372
368
|
getTickLabelAttributes: i
|
|
373
369
|
};
|
|
374
|
-
},
|
|
370
|
+
}, zn = function(e, n, t) {
|
|
375
371
|
const o = v(() => {
|
|
376
372
|
const c = e.value.ticks();
|
|
377
373
|
return c.length > 1 ? e.value(c[1]) - e.value(c[0]) : 0;
|
|
@@ -381,7 +377,7 @@ const Kt = {
|
|
|
381
377
|
transform: `translate(${e.value(c)}, 0)`
|
|
382
378
|
};
|
|
383
379
|
}
|
|
384
|
-
function
|
|
380
|
+
function r() {
|
|
385
381
|
return {
|
|
386
382
|
height: t.value.tickPadding + Yt + Se,
|
|
387
383
|
width: o.value,
|
|
@@ -402,11 +398,11 @@ const Kt = {
|
|
|
402
398
|
}
|
|
403
399
|
return {
|
|
404
400
|
getGridLinesAttributes: l,
|
|
405
|
-
getTickGhostAttributes:
|
|
401
|
+
getTickGhostAttributes: r,
|
|
406
402
|
getTickGroupAttributes: a,
|
|
407
403
|
getTickLabelAttributes: i
|
|
408
404
|
};
|
|
409
|
-
},
|
|
405
|
+
}, Wn = function(e, n, t) {
|
|
410
406
|
const o = v(() => {
|
|
411
407
|
const c = e.value.ticks();
|
|
412
408
|
return c.length > 1 ? e.value(c[1]) - e.value(c[0]) : 0;
|
|
@@ -416,9 +412,9 @@ const Kt = {
|
|
|
416
412
|
transform: `translate(0, ${e.value(c)})`
|
|
417
413
|
};
|
|
418
414
|
}
|
|
419
|
-
function
|
|
420
|
-
var
|
|
421
|
-
const s = (((
|
|
415
|
+
function r(c) {
|
|
416
|
+
var f;
|
|
417
|
+
const s = (((f = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : f.call(c)) || 0) + t.value.tickPadding + Se;
|
|
422
418
|
return {
|
|
423
419
|
width: s,
|
|
424
420
|
height: o.value,
|
|
@@ -440,34 +436,34 @@ const Kt = {
|
|
|
440
436
|
}
|
|
441
437
|
return {
|
|
442
438
|
getGridLinesAttributes: l,
|
|
443
|
-
getTickGhostAttributes:
|
|
439
|
+
getTickGhostAttributes: r,
|
|
444
440
|
getTickGroupAttributes: a,
|
|
445
441
|
getTickLabelAttributes: i
|
|
446
442
|
};
|
|
447
|
-
},
|
|
443
|
+
}, Zn = {
|
|
448
444
|
"x-band-scale-axis": Fn,
|
|
449
|
-
"y-band-scale-axis":
|
|
450
|
-
"x-linear-scale-axis":
|
|
451
|
-
"y-linear-scale-axis":
|
|
452
|
-
},
|
|
453
|
-
/* @__PURE__ */
|
|
445
|
+
"y-band-scale-axis": Cn,
|
|
446
|
+
"x-linear-scale-axis": zn,
|
|
447
|
+
"y-linear-scale-axis": Wn
|
|
448
|
+
}, Un = ["transform"], Xn = { key: 0 }, Yn = /* @__PURE__ */ S("linearGradient", { id: "lume-tick-gradient" }, [
|
|
449
|
+
/* @__PURE__ */ S("stop", {
|
|
454
450
|
offset: "0%",
|
|
455
451
|
"stop-color": "rgba(255,255,255,0)"
|
|
456
452
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ S("stop", {
|
|
458
454
|
offset: "10%",
|
|
459
455
|
"stop-color": "var(--lume-chart-background-color)"
|
|
460
456
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ S("stop", {
|
|
462
458
|
offset: "90%",
|
|
463
459
|
"stop-color": "var(--lume-chart-background-color)"
|
|
464
460
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ S("stop", {
|
|
466
462
|
offset: "100%",
|
|
467
463
|
"stop-color": "rgba(255,255,255,0)"
|
|
468
464
|
})
|
|
469
|
-
], -1),
|
|
470
|
-
|
|
465
|
+
], -1), Kn = [
|
|
466
|
+
Yn
|
|
471
467
|
];
|
|
472
468
|
var Jt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Jt || {}), Qt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(Qt || {}), et = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(et || {});
|
|
473
469
|
const Lt = /* @__PURE__ */ Z({
|
|
@@ -503,7 +499,7 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
503
499
|
},
|
|
504
500
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
505
501
|
setup(e, { emit: n }) {
|
|
506
|
-
const o = e, a = n, { scale:
|
|
502
|
+
const o = e, a = n, { scale: r, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o), f = Fe("isEmpty", R(!1)), u = Ce({}), m = R(null), y = R(null), p = R(null), b = v(
|
|
507
503
|
() => o.type ? et[o.type] : o.position
|
|
508
504
|
), $ = v(
|
|
509
505
|
() => o.type || (b.value === "left" ? "y" : "x")
|
|
@@ -511,136 +507,136 @@ const Lt = /* @__PURE__ */ Z({
|
|
|
511
507
|
() => $.value === "x" && s.value === H.VERTICAL || $.value === "y" && s.value === H.HORIZONTAL
|
|
512
508
|
), { allOptions: g } = fe(
|
|
513
509
|
c,
|
|
514
|
-
$.value === "x" ?
|
|
515
|
-
), { showTick: O } =
|
|
516
|
-
() =>
|
|
510
|
+
$.value === "x" ? Vn : Pn
|
|
511
|
+
), { showTick: O } = Rn(r, m, g), N = v(
|
|
512
|
+
() => f.value || !r.value || In(r.value)
|
|
517
513
|
), D = v(() => {
|
|
518
|
-
var k,
|
|
519
|
-
return $.value === "y" && N.value ? `translate(0, ${((k = l.value) == null ? void 0 : k.height) / 2})` : $.value === "x" && N.value ? `translate(-${((
|
|
514
|
+
var k, x, h, M;
|
|
515
|
+
return $.value === "y" && N.value ? `translate(0, ${((k = l.value) == null ? void 0 : k.height) / 2})` : $.value === "x" && N.value ? `translate(-${((x = l.value) == null ? void 0 : x.width) / 2}, ${(h = l.value) == null ? void 0 : h.height})` : `translate(0, ${$.value === "x" ? (M = l.value) == null ? void 0 : M.height : 0})`;
|
|
520
516
|
}), P = v(() => {
|
|
521
|
-
if (!
|
|
522
|
-
if (
|
|
523
|
-
return
|
|
524
|
-
const { tickCount: k } = g.value, [
|
|
525
|
-
return hn(
|
|
526
|
-
}),
|
|
517
|
+
if (!r.value) return [];
|
|
518
|
+
if (ve(r.value))
|
|
519
|
+
return r.value.labels || r.value.domain();
|
|
520
|
+
const { tickCount: k } = g.value, [x, h] = r.value.domain();
|
|
521
|
+
return hn(x, h, k);
|
|
522
|
+
}), G = v(() => {
|
|
527
523
|
const { tickFormat: k } = g.value;
|
|
528
524
|
return Ve(k);
|
|
529
|
-
}),
|
|
525
|
+
}), E = v(
|
|
530
526
|
() => g.value.withHover && L.value && i.value > -1
|
|
531
|
-
),
|
|
527
|
+
), K = v(
|
|
532
528
|
() => g.value.tickPadding + Se || 16
|
|
533
|
-
),
|
|
529
|
+
), U = v(() => $.value === "x" ? (
|
|
534
530
|
// If x axis, get the tick height
|
|
535
531
|
Math.max(
|
|
536
|
-
...(
|
|
532
|
+
...(m.value || []).map(
|
|
537
533
|
(k) => {
|
|
538
|
-
var
|
|
539
|
-
return ((h = (
|
|
534
|
+
var x, h;
|
|
535
|
+
return ((h = (x = k.ref).getBBox) == null ? void 0 : h.call(x).height) + K.value;
|
|
540
536
|
}
|
|
541
537
|
)
|
|
542
538
|
)
|
|
543
539
|
) : (
|
|
544
540
|
// If y axis, get the tick width
|
|
545
541
|
Math.max(
|
|
546
|
-
...(
|
|
542
|
+
...(m.value || []).map(
|
|
547
543
|
(k) => {
|
|
548
|
-
var
|
|
549
|
-
return ((h = (
|
|
544
|
+
var x, h;
|
|
545
|
+
return ((h = (x = k.ref).getBBox) == null ? void 0 : h.call(x).width) + K.value;
|
|
550
546
|
}
|
|
551
547
|
)
|
|
552
548
|
)
|
|
553
549
|
));
|
|
554
|
-
function
|
|
555
|
-
const { showTicks:
|
|
556
|
-
return
|
|
550
|
+
function F(k) {
|
|
551
|
+
const { showTicks: x } = g.value;
|
|
552
|
+
return x === !1 ? "" : G.value(k);
|
|
557
553
|
}
|
|
558
|
-
function
|
|
559
|
-
a("mouseenter", { index: L.value ? k : null, value:
|
|
554
|
+
function Q(k, x, h) {
|
|
555
|
+
a("mouseenter", { index: L.value ? k : null, value: x, event: h });
|
|
560
556
|
}
|
|
561
|
-
function
|
|
562
|
-
a("click", { index: k, value:
|
|
557
|
+
function J(k, x, h) {
|
|
558
|
+
a("click", { index: k, value: x, event: h });
|
|
563
559
|
}
|
|
564
|
-
function
|
|
565
|
-
var
|
|
566
|
-
if (!(!
|
|
567
|
-
return (
|
|
560
|
+
function se(k) {
|
|
561
|
+
var x;
|
|
562
|
+
if (!(!m.value || !m.value.length))
|
|
563
|
+
return (x = m.value[k]) == null ? void 0 : x.ref;
|
|
568
564
|
}
|
|
569
|
-
function
|
|
565
|
+
function pe() {
|
|
570
566
|
p.value = P.value.map(
|
|
571
|
-
(k,
|
|
572
|
-
value:
|
|
573
|
-
group:
|
|
574
|
-
ghost:
|
|
575
|
-
label:
|
|
576
|
-
gridline:
|
|
567
|
+
(k, x) => ({
|
|
568
|
+
value: F(k),
|
|
569
|
+
group: u.getTickGroupAttributes(k, x),
|
|
570
|
+
ghost: u.getTickGhostAttributes(se(x)),
|
|
571
|
+
label: u.getTickLabelAttributes(),
|
|
572
|
+
gridline: u.getGridLinesAttributes()
|
|
577
573
|
})
|
|
578
574
|
);
|
|
579
575
|
}
|
|
580
|
-
function Te() {
|
|
581
|
-
p.value && p.value.map((k) => (k.gridline = r.getGridLinesAttributes(), k));
|
|
582
|
-
}
|
|
583
576
|
function Le() {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
577
|
+
p.value && p.value.map((k) => (k.gridline = u.getGridLinesAttributes(), k));
|
|
578
|
+
}
|
|
579
|
+
function $e() {
|
|
580
|
+
if (!r.value) return;
|
|
581
|
+
const k = r.value.step ? "bandScale" : "linearScale", x = Zn[`${$.value}-${Jt[k]}`];
|
|
582
|
+
Object.entries(x(r, l, g) || []).forEach(
|
|
583
|
+
([h, M]) => {
|
|
584
|
+
u[h] = M;
|
|
589
585
|
}
|
|
590
586
|
);
|
|
591
587
|
}
|
|
592
|
-
return X(
|
|
588
|
+
return X(r, $e, { flush: "sync", immediate: !0 }), X(r, pe, { immediate: !0 }), X(m, pe), X(U, (k) => a("lume__internal--axis-size", k)), X(o.containerSize, Le), _e(() => ze(y.value)), (k, x) => d(r) ? (_(), I("g", {
|
|
593
589
|
key: 0,
|
|
594
590
|
ref_key: "root",
|
|
595
591
|
ref: y,
|
|
596
592
|
class: "axis",
|
|
597
593
|
transform: D.value,
|
|
598
594
|
"data-j-axis": "",
|
|
599
|
-
onMouseleave:
|
|
595
|
+
onMouseleave: x[1] || (x[1] = (h) => a("mouseleave", h))
|
|
600
596
|
}, [
|
|
601
|
-
$.value === "x" ? (_(), I("defs",
|
|
602
|
-
(_(!0), I(
|
|
603
|
-
key: `${h.value}_${
|
|
597
|
+
$.value === "x" ? (_(), I("defs", Xn, Kn)) : C("", !0),
|
|
598
|
+
(_(!0), I(q, null, W(p.value, (h, M) => (_(), Y(d(At), j({
|
|
599
|
+
key: `${h.value}_${M}`,
|
|
604
600
|
ref_for: !0,
|
|
605
601
|
ref_key: "tickRefs",
|
|
606
|
-
ref:
|
|
602
|
+
ref: m
|
|
607
603
|
}, h, {
|
|
608
|
-
"is-hidden": d(g).skip && !d(O)(
|
|
604
|
+
"is-hidden": d(g).skip && !d(O)(M),
|
|
609
605
|
"with-gridlines": d(g).gridLines,
|
|
610
|
-
onMouseenter: (
|
|
611
|
-
onClick: (
|
|
606
|
+
onMouseenter: (z) => Q(M, h.value, z),
|
|
607
|
+
onClick: (z) => J(M, h.value, z)
|
|
612
608
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
613
|
-
|
|
609
|
+
E.value ? (_(), Y(d(At), j({ key: 1 }, p.value[d(i)], {
|
|
614
610
|
"with-gridlines": !1,
|
|
615
611
|
"is-hovered": "",
|
|
616
|
-
onClick:
|
|
612
|
+
onClick: x[0] || (x[0] = (h) => J(
|
|
617
613
|
d(i),
|
|
618
614
|
p.value[d(i)].value,
|
|
619
615
|
h
|
|
620
616
|
))
|
|
621
|
-
}), null, 16)) :
|
|
622
|
-
], 40,
|
|
617
|
+
}), null, 16)) : C("", !0)
|
|
618
|
+
], 40, Un)) : C("", !0);
|
|
623
619
|
}
|
|
624
620
|
});
|
|
625
|
-
function
|
|
626
|
-
const a = v(() => t.value > 0 && t.value < 1),
|
|
621
|
+
function Jn(e, n, t, o) {
|
|
622
|
+
const a = v(() => t.value > 0 && t.value < 1), r = v(
|
|
627
623
|
() => o.value > 0 && o.value < 1
|
|
628
624
|
), l = v(
|
|
629
625
|
() => a.value ? e.value - 0.5 : e.value
|
|
630
626
|
// draws the 1px bar closer to the axis
|
|
631
627
|
), i = v(
|
|
632
|
-
() =>
|
|
628
|
+
() => r.value ? n.value - 0.5 : n.value
|
|
633
629
|
// draws the 1px bar closer to the axis
|
|
634
630
|
);
|
|
635
|
-
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight:
|
|
631
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: r };
|
|
636
632
|
}
|
|
637
|
-
function
|
|
638
|
-
const a =
|
|
639
|
-
return
|
|
640
|
-
a.value = t.value,
|
|
641
|
-
}), X(t, (i) => a.value = i), X(o, (i) =>
|
|
633
|
+
function Qn(e, n, t, o) {
|
|
634
|
+
const a = R(0), r = R(0), l = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
635
|
+
return _e(() => {
|
|
636
|
+
a.value = t.value, r.value = o.value;
|
|
637
|
+
}), X(t, (i) => a.value = i), X(o, (i) => r.value = i), { computedWidth: a, computedHeight: r, transformOrigin: l };
|
|
642
638
|
}
|
|
643
|
-
const
|
|
639
|
+
const qn = ["x", "y", "width", "height"], eo = /* @__PURE__ */ Z({
|
|
644
640
|
__name: "lume-bar",
|
|
645
641
|
props: {
|
|
646
642
|
x: {
|
|
@@ -678,20 +674,20 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
678
674
|
},
|
|
679
675
|
emits: ["click", "mouseover", "mouseleave"],
|
|
680
676
|
setup(e, { emit: n }) {
|
|
681
|
-
const t = e, o = n, { x: a, y:
|
|
677
|
+
const t = e, o = n, { x: a, y: r, width: l, height: i, transition: c, classList: s } = te(t), f = R(null), u = v(
|
|
682
678
|
() => typeof s.value == "string" ? [s.value] : s.value
|
|
683
|
-
),
|
|
684
|
-
return
|
|
679
|
+
), m = v(() => c.value === "width"), y = v(() => c.value === "height"), p = Qn(a, r, l, i), { computedX: b, computedY: $, shouldHaveMinWidth: L, shouldHaveMinHeight: g } = Jn(a, r, l, i), O = v(() => L.value ? 1 : (m.value ? p.computedWidth : l).value), N = v(() => g.value ? 1 : (y.value ? p.computedHeight : i).value), D = m.value || y.value ? p.transformOrigin : null;
|
|
680
|
+
return _e(() => ze(f.value)), (P, G) => (_(), I("rect", {
|
|
685
681
|
ref_key: "root",
|
|
686
|
-
ref:
|
|
687
|
-
class:
|
|
682
|
+
ref: f,
|
|
683
|
+
class: ne(["lume-bar", [
|
|
688
684
|
{
|
|
689
685
|
"lume-fill--faded": e.isFaded,
|
|
690
686
|
"lume-bar--negative": e.isNegative,
|
|
691
|
-
"lume-bar--transition-width":
|
|
687
|
+
"lume-bar--transition-width": m.value,
|
|
692
688
|
"lume-bar--transition-height": y.value
|
|
693
689
|
},
|
|
694
|
-
...
|
|
690
|
+
...u.value
|
|
695
691
|
]]),
|
|
696
692
|
style: jt({ transformOrigin: d(D) }),
|
|
697
693
|
x: d(b),
|
|
@@ -699,29 +695,29 @@ const eo = ["x", "y", "width", "height"], to = /* @__PURE__ */ Z({
|
|
|
699
695
|
width: O.value,
|
|
700
696
|
height: N.value,
|
|
701
697
|
"data-j-bar": "",
|
|
702
|
-
onClick:
|
|
703
|
-
onMouseover:
|
|
704
|
-
onMouseleave:
|
|
705
|
-
}, null, 46,
|
|
706
|
-
}
|
|
707
|
-
}), dt = /* @__PURE__ */
|
|
708
|
-
var
|
|
709
|
-
const
|
|
710
|
-
function
|
|
711
|
-
return e ===
|
|
698
|
+
onClick: G[0] || (G[0] = (E) => o("click", E)),
|
|
699
|
+
onMouseover: G[1] || (G[1] = (E) => o("mouseover", E)),
|
|
700
|
+
onMouseleave: G[2] || (G[2] = (E) => o("mouseleave", E))
|
|
701
|
+
}, null, 46, qn));
|
|
702
|
+
}
|
|
703
|
+
}), dt = /* @__PURE__ */ ee(eo, [["__scopeId", "data-v-8e8f732a"]]);
|
|
704
|
+
var be = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(be || {}), ie = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(ie || {}), qt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(qt || {}), vt = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(vt || {}), mt = /* @__PURE__ */ ((e) => (e.White = "white", e.Black = "black", e.Green = "green", e.Orange = "orange", e.Red = "red", e.Grey = "grey", e.Grey10 = "grey-10", e.Grey20 = "grey-20", e.Grey30 = "grey-30", e.Grey40 = "grey-40", e.Grey50 = "grey-50", e.Grey60 = "grey-60", e.Grey70 = "grey-70", e.Grey80 = "grey-80", e.Grey90 = "grey-90", e.Grey100 = "grey-100", e))(mt || {}), ft = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(ft || {});
|
|
705
|
+
const to = be.Categorical, Ge = ie.Skyblue, no = vt.SkyTeal;
|
|
706
|
+
function oo(e) {
|
|
707
|
+
return e === be.Divergent ? no : Ge;
|
|
712
708
|
}
|
|
713
|
-
function
|
|
714
|
-
return Object.values(
|
|
709
|
+
function ao(e) {
|
|
710
|
+
return Object.values(ft).includes(e);
|
|
715
711
|
}
|
|
716
712
|
function $t(e, n) {
|
|
717
|
-
return n ===
|
|
713
|
+
return n === be.Divergent ? Object.values(vt).includes(e) : Object.values({
|
|
718
714
|
...ie,
|
|
719
715
|
...qt,
|
|
720
|
-
...
|
|
721
|
-
...
|
|
716
|
+
...mt,
|
|
717
|
+
...ft
|
|
722
718
|
}).includes(e);
|
|
723
719
|
}
|
|
724
|
-
function
|
|
720
|
+
function lo(e, n) {
|
|
725
721
|
const t = Object.values(ie).indexOf(e);
|
|
726
722
|
return Dn(Object.values(ie), t > -1 ? t : 0)[n];
|
|
727
723
|
}
|
|
@@ -729,28 +725,28 @@ function ro(e, n) {
|
|
|
729
725
|
const t = 50 + n * 10;
|
|
730
726
|
return `${e}-${t}`;
|
|
731
727
|
}
|
|
732
|
-
function
|
|
728
|
+
function uo(e, n) {
|
|
733
729
|
const t = (n + 1) * 10;
|
|
734
730
|
return `${e}-${t}`;
|
|
735
731
|
}
|
|
736
732
|
function Ot(e, n, t) {
|
|
737
733
|
switch (n) {
|
|
738
734
|
default:
|
|
739
|
-
case
|
|
740
|
-
return
|
|
741
|
-
case
|
|
735
|
+
case be.Categorical:
|
|
736
|
+
return ao(e) ? e : lo(e, t);
|
|
737
|
+
case be.Sequential:
|
|
742
738
|
return ro(e, t);
|
|
743
|
-
case
|
|
744
|
-
return
|
|
739
|
+
case be.Divergent:
|
|
740
|
+
return uo(e, t);
|
|
745
741
|
}
|
|
746
742
|
}
|
|
747
|
-
function
|
|
748
|
-
return $t(e, t) ? e : (o > 4 && (
|
|
743
|
+
function io(e, n, t = to, o) {
|
|
744
|
+
return $t(e, t) ? e : (o > 4 && (ye(me.ColorLoop), o = o % 5), $t(n, t) ? Ot(n, t, o) : Ot(oo(t), t, o));
|
|
749
745
|
}
|
|
750
|
-
function
|
|
746
|
+
function so(e) {
|
|
751
747
|
return e.map((n) => $n(n) ? n : { value: n });
|
|
752
748
|
}
|
|
753
|
-
function
|
|
749
|
+
function co(e) {
|
|
754
750
|
return e.__internal === !0;
|
|
755
751
|
}
|
|
756
752
|
const pt = (e = null) => ({
|
|
@@ -773,42 +769,42 @@ const pt = (e = null) => ({
|
|
|
773
769
|
}
|
|
774
770
|
});
|
|
775
771
|
function ht(e, n, t, o, a) {
|
|
776
|
-
const
|
|
772
|
+
const r = Ce({
|
|
777
773
|
width: 0,
|
|
778
774
|
height: 0
|
|
779
|
-
}), l =
|
|
780
|
-
var
|
|
781
|
-
return e.value.length > 5 &&
|
|
782
|
-
(
|
|
783
|
-
if (
|
|
784
|
-
const y =
|
|
785
|
-
|
|
775
|
+
}), l = crypto.randomUUID(), i = v(() => {
|
|
776
|
+
var f;
|
|
777
|
+
return e.value.length > 5 && ye(me.DatasetLength), (f = e.value) == null ? void 0 : f.map(
|
|
778
|
+
(u, m) => {
|
|
779
|
+
if (co(u)) return u;
|
|
780
|
+
const y = so(u.values), p = io(
|
|
781
|
+
u.color,
|
|
786
782
|
t == null ? void 0 : t.value,
|
|
787
783
|
o == null ? void 0 : o.value.colorPalette,
|
|
788
|
-
|
|
784
|
+
m
|
|
789
785
|
);
|
|
790
786
|
return {
|
|
791
|
-
...
|
|
787
|
+
...u,
|
|
792
788
|
values: y,
|
|
793
789
|
color: p,
|
|
794
790
|
__internal: !0
|
|
795
791
|
};
|
|
796
792
|
}
|
|
797
793
|
);
|
|
798
|
-
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((
|
|
799
|
-
function s(
|
|
800
|
-
const
|
|
801
|
-
|
|
794
|
+
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((f, u) => u));
|
|
795
|
+
function s(f) {
|
|
796
|
+
const u = (a == null ? void 0 : a.value) === H.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) || f.height;
|
|
797
|
+
r.width = f.width, r.height = u;
|
|
802
798
|
}
|
|
803
799
|
return {
|
|
804
800
|
chartID: l,
|
|
805
801
|
computedLabels: c,
|
|
806
|
-
containerSize:
|
|
802
|
+
containerSize: r,
|
|
807
803
|
internalData: i,
|
|
808
804
|
updateSize: s
|
|
809
805
|
};
|
|
810
806
|
}
|
|
811
|
-
const
|
|
807
|
+
const vo = () => ({
|
|
812
808
|
xScale: {
|
|
813
809
|
type: Function,
|
|
814
810
|
default: null
|
|
@@ -819,68 +815,71 @@ const fo = () => ({
|
|
|
819
815
|
}
|
|
820
816
|
});
|
|
821
817
|
function mo(e, n, t, o, a) {
|
|
822
|
-
const
|
|
818
|
+
const r = R(null), l = R(null);
|
|
823
819
|
function i() {
|
|
824
|
-
var
|
|
820
|
+
var f, u, m, y;
|
|
825
821
|
const { width: c, height: s } = t;
|
|
826
|
-
!c && !s || (o.value === H.HORIZONTAL ? (
|
|
822
|
+
!c && !s || (o.value === H.HORIZONTAL ? (r.value = (f = e.value) != null && f.length ? wt(
|
|
827
823
|
e.value,
|
|
828
824
|
c,
|
|
829
825
|
o.value,
|
|
830
826
|
a.value.startOnZero
|
|
831
|
-
) : null, l.value = (
|
|
827
|
+
) : null, l.value = (u = n.value) != null && u.length ? It(
|
|
832
828
|
n.value,
|
|
833
829
|
s,
|
|
834
830
|
o.value,
|
|
835
831
|
a.value
|
|
836
|
-
) : null) : (
|
|
832
|
+
) : null) : (r.value = (m = n.value) != null && m.length ? It(
|
|
837
833
|
n.value,
|
|
838
834
|
c,
|
|
839
835
|
o.value,
|
|
840
836
|
a.value
|
|
841
|
-
) : null, l.value = (y = e.value) != null && y.length ?
|
|
837
|
+
) : null, l.value = (y = e.value) != null && y.length ? wt(
|
|
842
838
|
e.value,
|
|
843
839
|
s,
|
|
844
840
|
o.value,
|
|
845
841
|
a.value.startOnZero
|
|
846
842
|
) : null));
|
|
847
843
|
}
|
|
848
|
-
return Vt(i), { xScale:
|
|
844
|
+
return Vt(i), { xScale: r, yScale: l };
|
|
849
845
|
}
|
|
850
846
|
function It(e, n, t, o) {
|
|
851
|
-
const a = [0, n], { padding:
|
|
847
|
+
const a = [0, n], { padding: r, paddingInner: l, paddingOuter: i } = o, c = r ?? (t === H.HORIZONTAL ? Xt : Ut);
|
|
852
848
|
return Object.assign(
|
|
853
|
-
|
|
849
|
+
Me().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, f) => f)),
|
|
854
850
|
{ labels: e }
|
|
855
851
|
);
|
|
856
852
|
}
|
|
857
|
-
function
|
|
858
|
-
const a =
|
|
853
|
+
function wt(e, n, t, o) {
|
|
854
|
+
const a = Ct(e).filter((f) => f != null), r = [0, n];
|
|
859
855
|
if (a.length === 0)
|
|
860
|
-
return
|
|
861
|
-
const l = Math.min(...a), i = o && l > 0 ? 0 : l
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
856
|
+
return Be().range(r).domain([0, 0]).nice();
|
|
857
|
+
const l = Math.min(...a), i = o && l > 0 ? 0 : l;
|
|
858
|
+
let c = Math.max(...a);
|
|
859
|
+
o && c < 0 && (c = 0);
|
|
860
|
+
const s = t === H.HORIZONTAL ? [i, c] : [c, i];
|
|
861
|
+
return Be().range(r).domain(s).nice();
|
|
862
|
+
}
|
|
863
|
+
function xt(e) {
|
|
865
864
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
866
865
|
}
|
|
867
866
|
function tt(e, n) {
|
|
868
|
-
return
|
|
867
|
+
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
869
868
|
}
|
|
870
869
|
function Et(e, n, {
|
|
871
870
|
padding: t,
|
|
872
871
|
paddingInner: o,
|
|
873
872
|
paddingOuter: a
|
|
874
873
|
} = {}) {
|
|
875
|
-
const
|
|
876
|
-
return e.copy().paddingInner(o ??
|
|
874
|
+
const r = t ?? (n === H.HORIZONTAL ? Xt : Ut);
|
|
875
|
+
return e.copy().paddingInner(o ?? r).paddingOuter(a ?? r);
|
|
877
876
|
}
|
|
878
877
|
function gt(e) {
|
|
879
878
|
return Object.values(H).includes(e);
|
|
880
879
|
}
|
|
881
880
|
const we = (e, n = !0) => ({
|
|
882
881
|
...pt(e),
|
|
883
|
-
...
|
|
882
|
+
...vo(),
|
|
884
883
|
...Re(),
|
|
885
884
|
classList: {
|
|
886
885
|
type: [String, Array],
|
|
@@ -897,7 +896,7 @@ const we = (e, n = !0) => ({
|
|
|
897
896
|
validator: gt
|
|
898
897
|
}
|
|
899
898
|
} : {}
|
|
900
|
-
}),
|
|
899
|
+
}), fo = (e) => ({
|
|
901
900
|
...pt(e),
|
|
902
901
|
...Re(),
|
|
903
902
|
hoveredElement: {
|
|
@@ -905,21 +904,21 @@ const we = (e, n = !0) => ({
|
|
|
905
904
|
default: null
|
|
906
905
|
}
|
|
907
906
|
});
|
|
908
|
-
function
|
|
909
|
-
const e =
|
|
907
|
+
function po() {
|
|
908
|
+
const e = R(), n = Ce({
|
|
910
909
|
dimensions: {}
|
|
911
910
|
}), t = new ResizeObserver((o) => {
|
|
912
911
|
o.forEach((a) => {
|
|
913
912
|
n.dimensions = a.contentRect;
|
|
914
913
|
});
|
|
915
914
|
});
|
|
916
|
-
return
|
|
915
|
+
return _e(() => {
|
|
917
916
|
t.observe(e.value);
|
|
918
917
|
}), Pt(() => {
|
|
919
918
|
t.unobserve(e.value);
|
|
920
919
|
}), { resizeState: n, resizeRef: e };
|
|
921
920
|
}
|
|
922
|
-
const
|
|
921
|
+
const ho = ["height"], go = ["transform"], yo = /* @__PURE__ */ Z({
|
|
923
922
|
__name: "lume-chart-container",
|
|
924
923
|
props: {
|
|
925
924
|
margins: {
|
|
@@ -946,55 +945,55 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
946
945
|
},
|
|
947
946
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
948
947
|
setup(e, { emit: n }) {
|
|
949
|
-
const t = e, o = n, { margins: a, containerSize:
|
|
950
|
-
() =>
|
|
948
|
+
const t = e, o = n, { margins: a, containerSize: r } = te(t), l = R(null), { resizeRef: i, resizeState: c } = po(), s = v(
|
|
949
|
+
() => r.value.height + a.value.top + a.value.bottom
|
|
951
950
|
);
|
|
952
951
|
return Vt(() => {
|
|
953
952
|
if (!l.value) return;
|
|
954
|
-
const { width:
|
|
955
|
-
if (!
|
|
953
|
+
const { width: f } = c.dimensions, { height: u } = l.value.getBoundingClientRect();
|
|
954
|
+
if (!f || t.orientation === H.VERTICAL && !u)
|
|
956
955
|
return;
|
|
957
|
-
const
|
|
958
|
-
width:
|
|
956
|
+
const m = f - a.value.left - a.value.right, y = u - a.value.top - a.value.bottom, p = {
|
|
957
|
+
width: m > 0 ? m : 0,
|
|
959
958
|
height: y > 0 ? y : 0,
|
|
960
|
-
outerWidth:
|
|
961
|
-
outerHeight:
|
|
959
|
+
outerWidth: f,
|
|
960
|
+
outerHeight: u
|
|
962
961
|
};
|
|
963
962
|
o("resize", p);
|
|
964
|
-
}), (
|
|
963
|
+
}), (f, u) => (_(), I("div", {
|
|
965
964
|
ref_key: "resizeRef",
|
|
966
965
|
ref: i,
|
|
967
|
-
class:
|
|
966
|
+
class: ne(["lume-chart-container", {
|
|
968
967
|
"lume-chart-container--minimum": !e.noMinSize
|
|
969
968
|
}]),
|
|
970
969
|
"data-j-chart-container": ""
|
|
971
970
|
}, [
|
|
972
|
-
|
|
971
|
+
B(f.$slots, "header", {}, void 0, !0),
|
|
973
972
|
(_(), I("svg", {
|
|
974
973
|
ref_key: "root",
|
|
975
974
|
ref: l,
|
|
976
|
-
class:
|
|
975
|
+
class: ne(["lume-chart-container__svg", {
|
|
977
976
|
"lume-chart-container__svg--transparent": e.transparentBackground
|
|
978
977
|
}]),
|
|
979
978
|
height: s.value,
|
|
980
979
|
"data-j-chart-container__root": "",
|
|
981
|
-
onClick:
|
|
982
|
-
onMouseenter:
|
|
983
|
-
onMouseleave:
|
|
980
|
+
onClick: u[0] || (u[0] = (m) => o("click", m)),
|
|
981
|
+
onMouseenter: u[1] || (u[1] = (m) => o("mouseenter", m)),
|
|
982
|
+
onMouseleave: u[2] || (u[2] = (m) => o("mouseleave", m))
|
|
984
983
|
}, [
|
|
985
|
-
|
|
984
|
+
S("g", {
|
|
986
985
|
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
987
986
|
class: "lume-chart-container__group",
|
|
988
987
|
"data-j-chart-container__group": ""
|
|
989
988
|
}, [
|
|
990
|
-
|
|
991
|
-
], 8,
|
|
992
|
-
], 42,
|
|
993
|
-
|
|
994
|
-
|
|
989
|
+
B(f.$slots, "default", {}, void 0, !0)
|
|
990
|
+
], 8, go)
|
|
991
|
+
], 42, ho)),
|
|
992
|
+
B(f.$slots, "footer", {}, void 0, !0),
|
|
993
|
+
B(f.$slots, "extra", {}, void 0, !0)
|
|
995
994
|
], 2));
|
|
996
995
|
}
|
|
997
|
-
}),
|
|
996
|
+
}), _o = /* @__PURE__ */ ee(yo, [["__scopeId", "data-v-d53cdc3e"]]), ko = ["onClick", "onMouseenter"], bo = /* @__PURE__ */ Z({
|
|
998
997
|
__name: "lume-chart-legend",
|
|
999
998
|
props: {
|
|
1000
999
|
data: {
|
|
@@ -1009,54 +1008,54 @@ const go = ["height"], yo = ["transform"], _o = /* @__PURE__ */ Z({
|
|
|
1009
1008
|
return (o, a) => (_(), I("div", {
|
|
1010
1009
|
class: "lume-chart-legend",
|
|
1011
1010
|
"data-j-chart-legend": "",
|
|
1012
|
-
onMouseleave: a[0] || (a[0] = (
|
|
1011
|
+
onMouseleave: a[0] || (a[0] = (r) => t("mouseleave"))
|
|
1013
1012
|
}, [
|
|
1014
|
-
(_(!0), I(
|
|
1013
|
+
(_(!0), I(q, null, W(e.data, (r, l) => (_(), I("div", {
|
|
1015
1014
|
key: `legend-item-${l}`,
|
|
1016
1015
|
class: "lume-chart-legend__item lume-typography--caption",
|
|
1017
1016
|
tabindex: "0",
|
|
1018
1017
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
1019
|
-
onClick: (i) => t("click", { index: l, dataset:
|
|
1020
|
-
onMouseenter: (i) => t("mouseenter", { index: l, dataset:
|
|
1018
|
+
onClick: (i) => t("click", { index: l, dataset: r, event: i }),
|
|
1019
|
+
onMouseenter: (i) => t("mouseenter", { index: l, dataset: r, event: i })
|
|
1021
1020
|
}, [
|
|
1022
|
-
|
|
1023
|
-
class:
|
|
1021
|
+
S("span", {
|
|
1022
|
+
class: ne(["lume-chart-legend__symbol", `lume-background-color--${r.color}`]),
|
|
1024
1023
|
"data-j-chart-legend__symbol": ""
|
|
1025
1024
|
}, null, 2),
|
|
1026
|
-
|
|
1027
|
-
], 40,
|
|
1025
|
+
ce(" " + oe(r.label || l), 1)
|
|
1026
|
+
], 40, ko))), 128))
|
|
1028
1027
|
], 32));
|
|
1029
1028
|
}
|
|
1030
|
-
}), Nt = /* @__PURE__ */
|
|
1029
|
+
}), Nt = /* @__PURE__ */ ee(bo, [["__scopeId", "data-v-6f1d1c44"]]), Ao = {}, To = {
|
|
1031
1030
|
class: "lume-tooltip__title",
|
|
1032
1031
|
"data-j-tooltip__title": ""
|
|
1033
1032
|
};
|
|
1034
|
-
function
|
|
1035
|
-
return _(), I("div",
|
|
1036
|
-
|
|
1033
|
+
function Lo(e, n) {
|
|
1034
|
+
return _(), I("div", To, [
|
|
1035
|
+
B(e.$slots, "default", {}, void 0, !0)
|
|
1037
1036
|
]);
|
|
1038
1037
|
}
|
|
1039
|
-
const
|
|
1038
|
+
const $o = /* @__PURE__ */ ee(Ao, [["render", Lo], ["__scopeId", "data-v-8af3fac6"]]), Oo = {}, Io = {
|
|
1040
1039
|
class: "lume-tooltip__item",
|
|
1041
1040
|
"data-j-tooltip__summary-item": ""
|
|
1042
1041
|
}, wo = { class: "lume-tooltip__value" };
|
|
1043
|
-
function
|
|
1044
|
-
return _(), I("li",
|
|
1045
|
-
|
|
1046
|
-
|
|
1042
|
+
function xo(e, n) {
|
|
1043
|
+
return _(), I("li", Io, [
|
|
1044
|
+
S("span", null, [
|
|
1045
|
+
B(e.$slots, "default", {}, void 0, !0)
|
|
1047
1046
|
]),
|
|
1048
|
-
|
|
1049
|
-
|
|
1047
|
+
S("strong", wo, [
|
|
1048
|
+
B(e.$slots, "value", {}, void 0, !0)
|
|
1050
1049
|
])
|
|
1051
1050
|
]);
|
|
1052
1051
|
}
|
|
1053
|
-
const
|
|
1052
|
+
const Eo = /* @__PURE__ */ ee(Oo, [["render", xo], ["__scopeId", "data-v-4ed7ec1b"]]), No = {
|
|
1054
1053
|
class: "lume-tooltip__item",
|
|
1055
1054
|
"data-j-tooltip__item": ""
|
|
1056
|
-
},
|
|
1055
|
+
}, Do = { "data-j-tooltip__item__label": "" }, Ho = {
|
|
1057
1056
|
class: "lume-tooltip__value",
|
|
1058
1057
|
"data-j-tooltip__item__value": ""
|
|
1059
|
-
},
|
|
1058
|
+
}, Bo = /* @__PURE__ */ Z({
|
|
1060
1059
|
__name: "lume-tooltip-item",
|
|
1061
1060
|
props: {
|
|
1062
1061
|
color: {
|
|
@@ -1065,26 +1064,26 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1065
1064
|
}
|
|
1066
1065
|
},
|
|
1067
1066
|
setup(e) {
|
|
1068
|
-
return (n, t) => (_(), I("li",
|
|
1067
|
+
return (n, t) => (_(), I("li", No, [
|
|
1069
1068
|
e.color ? (_(), I("span", {
|
|
1070
1069
|
key: 0,
|
|
1071
|
-
class:
|
|
1070
|
+
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
1072
1071
|
"data-j-tooltip__item__symbol": ""
|
|
1073
|
-
}, null, 2)) :
|
|
1074
|
-
|
|
1075
|
-
|
|
1072
|
+
}, null, 2)) : C("", !0),
|
|
1073
|
+
S("span", Do, [
|
|
1074
|
+
B(n.$slots, "label", {}, void 0, !0)
|
|
1076
1075
|
]),
|
|
1077
|
-
|
|
1078
|
-
|
|
1076
|
+
S("strong", Ho, [
|
|
1077
|
+
B(n.$slots, "value", {}, void 0, !0)
|
|
1079
1078
|
])
|
|
1080
1079
|
]));
|
|
1081
1080
|
}
|
|
1082
|
-
}),
|
|
1081
|
+
}), Mo = /* @__PURE__ */ ee(Bo, [["__scopeId", "data-v-4f995c3c"]]), Ro = (e) => (sn("data-v-6f13599d"), e = e(), cn(), e), So = { class: "lume-tooltip__items" }, Go = {
|
|
1083
1082
|
key: 0,
|
|
1084
1083
|
class: "lume-tooltip__break"
|
|
1085
|
-
},
|
|
1086
|
-
|
|
1087
|
-
],
|
|
1084
|
+
}, jo = /* @__PURE__ */ Ro(() => /* @__PURE__ */ S("hr", null, null, -1)), Vo = [
|
|
1085
|
+
jo
|
|
1086
|
+
], Po = /* @__PURE__ */ Z({
|
|
1088
1087
|
__name: "lume-tooltip",
|
|
1089
1088
|
props: {
|
|
1090
1089
|
opened: {
|
|
@@ -1102,7 +1101,7 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1102
1101
|
position: {
|
|
1103
1102
|
type: String,
|
|
1104
1103
|
default: "auto",
|
|
1105
|
-
validator: (e) =>
|
|
1104
|
+
validator: (e) => jn.includes(e)
|
|
1106
1105
|
},
|
|
1107
1106
|
fixedPositioning: {
|
|
1108
1107
|
type: Boolean,
|
|
@@ -1128,11 +1127,11 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1128
1127
|
},
|
|
1129
1128
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
1130
1129
|
setup(e, { emit: n }) {
|
|
1131
|
-
const t = e, o = n, a =
|
|
1130
|
+
const t = e, o = n, a = R(null), { items: r, options: l } = te(t), i = re(), c = R(null), { allOptions: s } = fe(l), f = v(
|
|
1132
1131
|
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
1133
|
-
),
|
|
1134
|
-
() =>
|
|
1135
|
-
),
|
|
1132
|
+
), u = v(
|
|
1133
|
+
() => f.value ? "fixed" : "absolute"
|
|
1134
|
+
), m = v(() => [
|
|
1136
1135
|
{
|
|
1137
1136
|
name: "computeStyles",
|
|
1138
1137
|
options: {
|
|
@@ -1150,16 +1149,16 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1150
1149
|
), p = v(() => Ve(s.value.valueFormat)), b = v(() => Ve(s.value.titleFormat)), $ = v(
|
|
1151
1150
|
() => {
|
|
1152
1151
|
var P;
|
|
1153
|
-
return ((P =
|
|
1152
|
+
return ((P = r.value) == null ? void 0 : P.find((G) => G.isSummary)) || {
|
|
1154
1153
|
label: s.value.summary ?? t.summary
|
|
1155
1154
|
};
|
|
1156
1155
|
}
|
|
1157
|
-
), L = v(() => i.summary || $.value.label), g = v(() => t.inverse || s.value.inverse ? [...
|
|
1156
|
+
), L = v(() => i.summary || $.value.label), g = v(() => t.inverse || s.value.inverse ? [...r.value].reverse() : r.value);
|
|
1158
1157
|
function O() {
|
|
1159
1158
|
t.targetElement && a.value && (c.value = kn(t.targetElement, a.value, {
|
|
1160
1159
|
placement: t.position,
|
|
1161
|
-
strategy:
|
|
1162
|
-
modifiers:
|
|
1160
|
+
strategy: u.value,
|
|
1161
|
+
modifiers: m.value
|
|
1163
1162
|
}), o("opened", t.targetElement));
|
|
1164
1163
|
}
|
|
1165
1164
|
function N() {
|
|
@@ -1172,66 +1171,66 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1172
1171
|
}
|
|
1173
1172
|
return X(
|
|
1174
1173
|
() => t.targetElement,
|
|
1175
|
-
async (P,
|
|
1176
|
-
!
|
|
1174
|
+
async (P, G) => {
|
|
1175
|
+
!G && P ? (await Qe(), O()) : D();
|
|
1177
1176
|
}
|
|
1178
|
-
),
|
|
1177
|
+
), _e(O), Pt(N), (P, G) => e.opened && e.targetElement ? (_(), I("div", {
|
|
1179
1178
|
key: 0,
|
|
1180
1179
|
ref_key: "root",
|
|
1181
1180
|
ref: a,
|
|
1182
|
-
class:
|
|
1181
|
+
class: ne(["lume-tooltip lume-typography--caption", {
|
|
1183
1182
|
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
1184
1183
|
}]),
|
|
1185
1184
|
"data-j-tooltip": "",
|
|
1186
|
-
onMouseenter:
|
|
1187
|
-
onMouseleave:
|
|
1185
|
+
onMouseenter: G[0] || (G[0] = (E) => o("tooltip-mouseenter")),
|
|
1186
|
+
onMouseleave: G[1] || (G[1] = (E) => o("tooltip-mouseleave"))
|
|
1188
1187
|
}, [
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
y.value ? (_(), Y(d(
|
|
1188
|
+
B(P.$slots, "default", {}, () => [
|
|
1189
|
+
B(P.$slots, "title", {}, () => [
|
|
1190
|
+
y.value ? (_(), Y(d($o), { key: 0 }, {
|
|
1192
1191
|
default: V(() => [
|
|
1193
|
-
|
|
1192
|
+
ce(oe(b.value(e.title)), 1)
|
|
1194
1193
|
]),
|
|
1195
1194
|
_: 1
|
|
1196
|
-
})) :
|
|
1195
|
+
})) : C("", !0)
|
|
1197
1196
|
], !0),
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
L.value ? (_(), Y(d(
|
|
1197
|
+
S("ul", So, [
|
|
1198
|
+
B(P.$slots, "summary", {}, () => [
|
|
1199
|
+
L.value ? (_(), Y(d(Eo), { key: 0 }, de({
|
|
1201
1200
|
default: V(() => [
|
|
1202
|
-
|
|
1201
|
+
ce(oe($.value.label) + " ", 1)
|
|
1203
1202
|
]),
|
|
1204
1203
|
_: 2
|
|
1205
1204
|
}, [
|
|
1206
1205
|
$.value.value ? {
|
|
1207
1206
|
name: "value",
|
|
1208
1207
|
fn: V(() => [
|
|
1209
|
-
|
|
1208
|
+
ce(oe(p.value($.value.value)), 1)
|
|
1210
1209
|
]),
|
|
1211
1210
|
key: "0"
|
|
1212
1211
|
} : void 0
|
|
1213
|
-
]), 1024)) :
|
|
1212
|
+
]), 1024)) : C("", !0)
|
|
1214
1213
|
], !0),
|
|
1215
|
-
L.value ? (_(), I("li",
|
|
1216
|
-
|
|
1217
|
-
(_(!0), I(
|
|
1218
|
-
key:
|
|
1219
|
-
color:
|
|
1214
|
+
L.value ? (_(), I("li", Go, Vo)) : C("", !0),
|
|
1215
|
+
B(P.$slots, "items", {}, () => [
|
|
1216
|
+
(_(!0), I(q, null, W(g.value, (E) => (_(), Y(d(Mo), {
|
|
1217
|
+
key: E.label,
|
|
1218
|
+
color: E.color
|
|
1220
1219
|
}, {
|
|
1221
1220
|
label: V(() => [
|
|
1222
|
-
|
|
1221
|
+
ce(oe(E.label), 1)
|
|
1223
1222
|
]),
|
|
1224
1223
|
value: V(() => [
|
|
1225
|
-
|
|
1224
|
+
ce(oe(p.value(E.value)), 1)
|
|
1226
1225
|
]),
|
|
1227
1226
|
_: 2
|
|
1228
1227
|
}, 1032, ["color"]))), 128))
|
|
1229
1228
|
], !0)
|
|
1230
1229
|
])
|
|
1231
1230
|
], !0)
|
|
1232
|
-
], 34)) :
|
|
1231
|
+
], 34)) : C("", !0);
|
|
1233
1232
|
}
|
|
1234
|
-
}), Fo = /* @__PURE__ */
|
|
1233
|
+
}), Fo = /* @__PURE__ */ ee(Po, [["__scopeId", "data-v-6f13599d"]]), We = () => ({
|
|
1235
1234
|
data: {
|
|
1236
1235
|
type: Array,
|
|
1237
1236
|
required: !0
|
|
@@ -1273,7 +1272,7 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1273
1272
|
type: [String, Array],
|
|
1274
1273
|
default: () => []
|
|
1275
1274
|
}
|
|
1276
|
-
}),
|
|
1275
|
+
}), Co = { class: "lume-overlay-group" }, zo = /* @__PURE__ */ Z({
|
|
1277
1276
|
__name: "lume-overlay-group",
|
|
1278
1277
|
props: {
|
|
1279
1278
|
...We(),
|
|
@@ -1284,11 +1283,11 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1284
1283
|
},
|
|
1285
1284
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1286
1285
|
setup(e, { emit: n }) {
|
|
1287
|
-
const t = e, o = n, { data: a, orientation:
|
|
1288
|
-
function s(
|
|
1286
|
+
const t = e, o = n, { data: a, orientation: r, xScale: l, yScale: i } = te(t), c = v(() => Wt(a));
|
|
1287
|
+
function s(f) {
|
|
1289
1288
|
var L;
|
|
1290
|
-
const
|
|
1291
|
-
return
|
|
1289
|
+
const u = r.value === H.HORIZONTAL ? i.value : l.value, m = u.domain(), y = On(u), p = ((L = u.paddingInner) == null ? void 0 : L.call(u)) ?? 0, b = y * p, $ = ve(u) ? u(m[f]) - b / 2 : u(f) - y / 2;
|
|
1290
|
+
return r.value === H.HORIZONTAL ? {
|
|
1292
1291
|
width: Math.max(...l.value.range()),
|
|
1293
1292
|
height: y,
|
|
1294
1293
|
transform: `translate(0, ${$})`
|
|
@@ -1298,8 +1297,8 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1298
1297
|
transform: `translate(${$}, 0)`
|
|
1299
1298
|
};
|
|
1300
1299
|
}
|
|
1301
|
-
return (
|
|
1302
|
-
(_(!0), I(
|
|
1300
|
+
return (f, u) => (_(), I("g", Co, [
|
|
1301
|
+
(_(!0), I(q, null, W(c.value, (m, y) => (_(), Y(d(dt), j(s(y), {
|
|
1303
1302
|
key: `overlay-${y}`,
|
|
1304
1303
|
"data-j-lume-overlay-group": y,
|
|
1305
1304
|
transition: !1,
|
|
@@ -1309,22 +1308,22 @@ const No = /* @__PURE__ */ q(Io, [["render", Eo], ["__scopeId", "data-v-4ed7ec1b
|
|
|
1309
1308
|
}), null, 16, ["data-j-lume-overlay-group", "onMouseover", "onClick"]))), 128))
|
|
1310
1309
|
]));
|
|
1311
1310
|
}
|
|
1312
|
-
}),
|
|
1313
|
-
function t(
|
|
1311
|
+
}), ke = (e, n) => {
|
|
1312
|
+
function t(r, ...l) {
|
|
1314
1313
|
}
|
|
1315
|
-
function o(
|
|
1314
|
+
function o(r, l) {
|
|
1316
1315
|
}
|
|
1317
1316
|
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1318
1317
|
};
|
|
1319
|
-
function
|
|
1318
|
+
function Wo(e) {
|
|
1320
1319
|
return { hasNegativeValues: v(
|
|
1321
|
-
() =>
|
|
1320
|
+
() => Ct(e.value).some((t) => t < 0)
|
|
1322
1321
|
) };
|
|
1323
1322
|
}
|
|
1324
|
-
function
|
|
1323
|
+
function Zo(e, n, t, o) {
|
|
1325
1324
|
const a = v(
|
|
1326
1325
|
() => o.value === H.HORIZONTAL
|
|
1327
|
-
),
|
|
1326
|
+
), r = v(
|
|
1328
1327
|
() => {
|
|
1329
1328
|
var s;
|
|
1330
1329
|
return e.height - (a != null && a.value ? 0 : ((s = t.value) == null ? void 0 : s.call(t, 0)) || 0);
|
|
@@ -1342,42 +1341,42 @@ function Uo(e, n, t, o) {
|
|
|
1342
1341
|
);
|
|
1343
1342
|
return { negativeBarAttributes: v(() => ({
|
|
1344
1343
|
width: l.value,
|
|
1345
|
-
height:
|
|
1344
|
+
height: r.value,
|
|
1346
1345
|
transform: i.value
|
|
1347
1346
|
})) };
|
|
1348
1347
|
}
|
|
1349
|
-
function
|
|
1348
|
+
function Uo(e, n) {
|
|
1350
1349
|
return e.reduce((t, o) => ct(o.values, n).map(
|
|
1351
|
-
(a,
|
|
1350
|
+
(a, r) => t[r] ? a.value > t[r] ? a.value : t[r] : a.value ?? 0
|
|
1352
1351
|
), []);
|
|
1353
1352
|
}
|
|
1354
|
-
function
|
|
1353
|
+
function Xo(e, n) {
|
|
1355
1354
|
return e.reduce((t, o) => ct(o.values, n).map(
|
|
1356
|
-
(a,
|
|
1355
|
+
(a, r) => {
|
|
1357
1356
|
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1358
|
-
return t[
|
|
1357
|
+
return t[r] ? t[r] + l : l;
|
|
1359
1358
|
}
|
|
1360
1359
|
), []);
|
|
1361
1360
|
}
|
|
1362
1361
|
const Dt = {
|
|
1363
|
-
"stacked-bar":
|
|
1362
|
+
"stacked-bar": Xo
|
|
1364
1363
|
};
|
|
1365
|
-
function en(e, n, t, o, a,
|
|
1364
|
+
function en(e, n, t, o, a, r, l, i) {
|
|
1366
1365
|
const c = v(
|
|
1367
1366
|
() => {
|
|
1368
|
-
var
|
|
1369
|
-
return n.value.withTooltip !== !1 && !((
|
|
1367
|
+
var f;
|
|
1368
|
+
return n.value.withTooltip !== !1 && !((f = n.value.tooltipOptions) != null && f.targetElement);
|
|
1370
1369
|
}
|
|
1371
1370
|
);
|
|
1372
|
-
function s(
|
|
1371
|
+
function s(f) {
|
|
1373
1372
|
var y;
|
|
1374
|
-
const
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
) :
|
|
1378
|
-
e.value =
|
|
1379
|
-
cx: (
|
|
1380
|
-
cy: (
|
|
1373
|
+
const u = ((y = a == null ? void 0 : a.value) == null ? void 0 : y.length) ?? 0, m = i != null && i.value && Dt[i.value] ? Dt[i.value](
|
|
1374
|
+
f,
|
|
1375
|
+
u
|
|
1376
|
+
) : Uo(f, u);
|
|
1377
|
+
e.value = m.map((p, b) => ({
|
|
1378
|
+
cx: (r == null ? void 0 : r.value) === H.HORIZONTAL ? t.value(p) : tt(t.value, b),
|
|
1379
|
+
cy: (r == null ? void 0 : r.value) === H.HORIZONTAL ? tt(o.value, b) : o.value(p)
|
|
1381
1380
|
}));
|
|
1382
1381
|
}
|
|
1383
1382
|
return X(
|
|
@@ -1388,8 +1387,8 @@ function en(e, n, t, o, a, u, l, i) {
|
|
|
1388
1387
|
{ immediate: !0 }
|
|
1389
1388
|
), { shouldGenerateTooltipAnchors: c, updateTooltipAnchorAttributes: s };
|
|
1390
1389
|
}
|
|
1391
|
-
function
|
|
1392
|
-
const e =
|
|
1390
|
+
function Yo() {
|
|
1391
|
+
const e = Ce({
|
|
1393
1392
|
opened: !1,
|
|
1394
1393
|
targetElement: null
|
|
1395
1394
|
});
|
|
@@ -1399,19 +1398,19 @@ function Ko() {
|
|
|
1399
1398
|
e.opened = !1, e.targetElement = null;
|
|
1400
1399
|
} };
|
|
1401
1400
|
}
|
|
1402
|
-
function
|
|
1401
|
+
function Ko(e) {
|
|
1403
1402
|
return { getTooltipItems: v(
|
|
1404
|
-
() => (t) => e.value.map(({ color: o, label: a, values:
|
|
1403
|
+
() => (t) => e.value.map(({ color: o, label: a, values: r }) => {
|
|
1405
1404
|
var l, i, c;
|
|
1406
1405
|
return {
|
|
1407
|
-
color: ((l =
|
|
1406
|
+
color: ((l = r[t]) == null ? void 0 : l.color) || o,
|
|
1408
1407
|
label: a,
|
|
1409
|
-
value: ((i =
|
|
1408
|
+
value: ((i = r[t]) == null ? void 0 : i.label) ?? ((c = r[t]) == null ? void 0 : c.value) ?? Zt
|
|
1410
1409
|
};
|
|
1411
1410
|
})
|
|
1412
1411
|
) };
|
|
1413
1412
|
}
|
|
1414
|
-
const nt = 16, ot = 8, at = 28, lt = 24,
|
|
1413
|
+
const nt = 16, ot = 8, at = 28, lt = 24, Ae = {
|
|
1415
1414
|
VERTICAL: {
|
|
1416
1415
|
top: nt,
|
|
1417
1416
|
right: ot,
|
|
@@ -1425,28 +1424,28 @@ const nt = 16, ot = 8, at = 28, lt = 24, be = {
|
|
|
1425
1424
|
left: lt
|
|
1426
1425
|
}
|
|
1427
1426
|
};
|
|
1428
|
-
function
|
|
1427
|
+
function Jo(e) {
|
|
1429
1428
|
return !e || e === "auto" || e.top == null || e.top === "auto" ? nt : e.top;
|
|
1430
1429
|
}
|
|
1431
|
-
function
|
|
1430
|
+
function Qo(e) {
|
|
1432
1431
|
return !e || e === "auto" || e.right == null || e.right === "auto" ? ot : e.right;
|
|
1433
1432
|
}
|
|
1434
|
-
function
|
|
1433
|
+
function qo(e, n) {
|
|
1435
1434
|
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || at : e.bottom;
|
|
1436
1435
|
}
|
|
1437
|
-
function
|
|
1436
|
+
function ea(e, n) {
|
|
1438
1437
|
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || lt : e.left;
|
|
1439
1438
|
}
|
|
1440
|
-
const
|
|
1439
|
+
const ta = { class: "lume-chart__header" }, na = { class: "lume-chart__header-section" }, oa = {
|
|
1441
1440
|
key: 0,
|
|
1442
1441
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1443
|
-
},
|
|
1442
|
+
}, aa = { class: "lume-chart__controls" }, la = { class: "lume-chart__header-section" }, ra = {
|
|
1444
1443
|
key: 0,
|
|
1445
1444
|
class: "lume-chart__axis-title lume-axis-title lume-typography--caption"
|
|
1446
|
-
},
|
|
1445
|
+
}, ua = { key: 3 }, ia = ["r"], sa = {
|
|
1447
1446
|
key: 0,
|
|
1448
1447
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1449
|
-
},
|
|
1448
|
+
}, ca = /* @__PURE__ */ Z({
|
|
1450
1449
|
__name: "lume-chart",
|
|
1451
1450
|
props: {
|
|
1452
1451
|
...we(),
|
|
@@ -1456,61 +1455,61 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1456
1455
|
}
|
|
1457
1456
|
},
|
|
1458
1457
|
setup(e, { emit: n }) {
|
|
1459
|
-
const t = e, o =
|
|
1458
|
+
const t = e, o = re(), a = n, { data: r, labels: l, color: i, options: c, orientation: s, chartType: f } = te(t), u = R(-1), m = R(null), y = R(null), p = R([]), b = R(null), $ = R(0), L = R(0), { allOptions: g } = fe(c), { internalData: O, computedLabels: N, containerSize: D, updateSize: P, chartID: G } = ht(r, l, i, g, s), { xScale: E, yScale: K } = mo(
|
|
1460
1459
|
O,
|
|
1461
1460
|
N,
|
|
1462
1461
|
D,
|
|
1463
1462
|
s,
|
|
1464
1463
|
g
|
|
1465
|
-
),
|
|
1466
|
-
top:
|
|
1467
|
-
right:
|
|
1468
|
-
bottom:
|
|
1469
|
-
left:
|
|
1470
|
-
})),
|
|
1464
|
+
), U = v(() => ({
|
|
1465
|
+
top: Jo(g.value.margins),
|
|
1466
|
+
right: Qo(g.value.margins),
|
|
1467
|
+
bottom: qo(g.value.margins, $.value),
|
|
1468
|
+
left: ea(g.value.margins, L.value)
|
|
1469
|
+
})), F = v(() => {
|
|
1471
1470
|
var A;
|
|
1472
|
-
return t.xScale ?
|
|
1473
|
-
}),
|
|
1471
|
+
return t.xScale ? xt(t.xScale) ? t.xScale : (A = t.xScale) == null ? void 0 : A.call(t, O.value, l.value, D) : E.value;
|
|
1472
|
+
}), Q = v(() => {
|
|
1474
1473
|
var A;
|
|
1475
|
-
return t.yScale ?
|
|
1476
|
-
}),
|
|
1474
|
+
return t.yScale ? xt(t.yScale) ? t.yScale : (A = t.yScale) == null ? void 0 : A.call(t, O.value, l.value, D) : K.value;
|
|
1475
|
+
}), J = v(() => ({
|
|
1477
1476
|
...g.value.xAxisOptions,
|
|
1478
1477
|
withHover: s.value === H.VERTICAL
|
|
1479
|
-
})),
|
|
1478
|
+
})), se = v(() => ({
|
|
1480
1479
|
...g.value.yAxisOptions,
|
|
1481
1480
|
withHover: s.value === H.HORIZONTAL
|
|
1482
|
-
})),
|
|
1481
|
+
})), pe = v(() => {
|
|
1483
1482
|
var A;
|
|
1484
1483
|
return (A = g.value.xAxisOptions) == null ? void 0 : A.title;
|
|
1485
|
-
}),
|
|
1484
|
+
}), Le = v(() => {
|
|
1486
1485
|
var A;
|
|
1487
1486
|
return (A = g.value.yAxisOptions) == null ? void 0 : A.title;
|
|
1488
|
-
}),
|
|
1487
|
+
}), $e = v(() => {
|
|
1489
1488
|
var A;
|
|
1490
|
-
return ((A = g.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 &&
|
|
1489
|
+
return ((A = g.value.xAxisOptions) == null ? void 0 : A.withTitle) !== !1 && pe.value;
|
|
1491
1490
|
}), k = v(() => {
|
|
1492
1491
|
var A;
|
|
1493
|
-
return ((A = g.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 &&
|
|
1494
|
-
}),
|
|
1495
|
-
() =>
|
|
1492
|
+
return ((A = g.value.yAxisOptions) == null ? void 0 : A.withTitle) !== !1 && Le.value;
|
|
1493
|
+
}), x = v(
|
|
1494
|
+
() => r.value.every((A) => !A.values.length) || r.value.every((A) => A.values.every((T) => T === null))
|
|
1496
1495
|
), h = v(() => {
|
|
1497
1496
|
const A = [], { noBaseScales: T } = g.value;
|
|
1498
|
-
return T || A.push(() => !!(
|
|
1499
|
-
}), { hasNegativeValues:
|
|
1497
|
+
return T || A.push(() => !!(F.value && Q.value)), A.every((w) => w() === !0);
|
|
1498
|
+
}), { hasNegativeValues: M } = Wo(O), { negativeBarAttributes: z } = Zo(
|
|
1500
1499
|
D,
|
|
1501
|
-
|
|
1502
|
-
|
|
1500
|
+
F,
|
|
1501
|
+
Q,
|
|
1503
1502
|
s
|
|
1504
1503
|
), { shouldGenerateTooltipAnchors: le } = en(
|
|
1505
1504
|
p,
|
|
1506
1505
|
g,
|
|
1507
|
-
|
|
1508
|
-
|
|
1506
|
+
F,
|
|
1507
|
+
Q,
|
|
1509
1508
|
l,
|
|
1510
1509
|
s,
|
|
1511
1510
|
O,
|
|
1512
|
-
|
|
1513
|
-
), { tooltipConfig:
|
|
1511
|
+
f
|
|
1512
|
+
), { tooltipConfig: Ee, showTooltip: Ze, hideTooltip: Ue } = Yo(), { getTooltipItems: Ne } = Ko(O), De = v(
|
|
1514
1513
|
() => {
|
|
1515
1514
|
var A;
|
|
1516
1515
|
return ((A = g.value.tooltipOptions) == null ? void 0 : A.position) || "top";
|
|
@@ -1518,242 +1517,242 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1518
1517
|
), Oe = v(() => {
|
|
1519
1518
|
var T;
|
|
1520
1519
|
const A = (T = g.value.tooltipOptions) == null ? void 0 : T.withPointerEvents;
|
|
1521
|
-
return
|
|
1520
|
+
return Ee.opened && (!A || A && b.value === !1);
|
|
1522
1521
|
});
|
|
1523
1522
|
function je(A) {
|
|
1524
|
-
var
|
|
1525
|
-
if (g.value.withHover === !1 || A ===
|
|
1526
|
-
const T =
|
|
1527
|
-
if (
|
|
1528
|
-
const Ye = (
|
|
1523
|
+
var w;
|
|
1524
|
+
if (g.value.withHover === !1 || A === u.value) return;
|
|
1525
|
+
const T = u.value;
|
|
1526
|
+
if (u.value = A, g.value.withTooltip !== !1) {
|
|
1527
|
+
const Ye = (w = g.value.tooltipOptions) != null && w.targetElement ? g.value.tooltipOptions.targetElement === "self" ? y.value.$el : g.value.tooltipOptions.targetElement : m.value[A];
|
|
1529
1528
|
Ze(Ye);
|
|
1530
1529
|
}
|
|
1531
1530
|
a("hovered-index-changed", { newIndex: A, oldIndex: T }), a("update:hoveredIndex", A);
|
|
1532
1531
|
}
|
|
1533
1532
|
function Xe() {
|
|
1534
|
-
Ue(),
|
|
1533
|
+
Ue(), u.value = -1, a("update:hoveredIndex", -1);
|
|
1535
1534
|
}
|
|
1536
1535
|
function _t(A) {
|
|
1537
|
-
if (!
|
|
1538
|
-
({ values:
|
|
1536
|
+
if (!r.value.some(
|
|
1537
|
+
({ values: w }) => A <= w.length - 1
|
|
1539
1538
|
)) {
|
|
1540
|
-
|
|
1539
|
+
ye(me.InvalidHoveredIndex);
|
|
1541
1540
|
return;
|
|
1542
1541
|
}
|
|
1543
1542
|
A == null || A === -1 ? Xe() : je(A);
|
|
1544
1543
|
}
|
|
1545
|
-
function
|
|
1544
|
+
function rn() {
|
|
1546
1545
|
setTimeout(() => {
|
|
1547
1546
|
Oe.value && Xe(), a("chart-mouseleave");
|
|
1548
1547
|
}, 0);
|
|
1549
1548
|
}
|
|
1550
|
-
function
|
|
1549
|
+
function un(A) {
|
|
1551
1550
|
P(A), a("resize", A);
|
|
1552
1551
|
}
|
|
1553
|
-
function kt({ index: A, value: T, event:
|
|
1554
|
-
A !== null && je(A), a("axis-mouseenter", { index: A, value: T, event:
|
|
1552
|
+
function kt({ index: A, value: T, event: w }) {
|
|
1553
|
+
A !== null && je(A), a("axis-mouseenter", { index: A, value: T, event: w });
|
|
1555
1554
|
}
|
|
1556
|
-
function bt({ index: A, value: T, event:
|
|
1557
|
-
a("axis-click", { index: A, value: T, event:
|
|
1555
|
+
function bt({ index: A, value: T, event: w }) {
|
|
1556
|
+
a("axis-click", { index: A, value: T, event: w });
|
|
1558
1557
|
}
|
|
1559
1558
|
return X(
|
|
1560
|
-
|
|
1559
|
+
r,
|
|
1561
1560
|
(A, T) => a("data-changed", { newValue: A, oldValue: T })
|
|
1562
1561
|
), X(
|
|
1563
1562
|
l,
|
|
1564
1563
|
(A, T) => a("labels-changed", { newValue: A, oldValue: T })
|
|
1565
|
-
), X(
|
|
1564
|
+
), X(x, (A) => A && ye(me.Empty), { immediate: !0 }), X(() => t.hoveredIndex, _t), X(
|
|
1566
1565
|
p,
|
|
1567
1566
|
(A) => {
|
|
1568
|
-
A && t.hoveredIndex != null &&
|
|
1567
|
+
A && t.hoveredIndex != null && u.value === -1 && _t(t.hoveredIndex);
|
|
1569
1568
|
},
|
|
1570
1569
|
{ flush: "post" }
|
|
1571
1570
|
), X(b, (A) => {
|
|
1572
|
-
A === !1 &&
|
|
1573
|
-
}),
|
|
1571
|
+
A === !1 && Ee.opened && Xe();
|
|
1572
|
+
}), _e(async () => {
|
|
1574
1573
|
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1575
|
-
}), Ke("chartID",
|
|
1576
|
-
id: `lume-chart_${d(
|
|
1574
|
+
}), Ke("chartID", G), Ke("isEmpty", x), Ke("tooltipAnchorAttributes", p), (A, T) => (_(), Y(d(_o), {
|
|
1575
|
+
id: `lume-chart_${d(G)}`,
|
|
1577
1576
|
ref_key: "chartContainer",
|
|
1578
1577
|
ref: y,
|
|
1579
|
-
margins:
|
|
1578
|
+
margins: U.value,
|
|
1580
1579
|
"container-size": d(D),
|
|
1581
1580
|
"no-min-size": d(g).noMinSize,
|
|
1582
1581
|
"transparent-background": d(g).transparentBackground,
|
|
1583
1582
|
orientation: d(s),
|
|
1584
1583
|
"data-j-lume-chart": "",
|
|
1585
|
-
onResize:
|
|
1586
|
-
onClick: T[24] || (T[24] = (
|
|
1587
|
-
onMouseenter: T[25] || (T[25] = (
|
|
1588
|
-
onMouseleave:
|
|
1584
|
+
onResize: un,
|
|
1585
|
+
onClick: T[24] || (T[24] = (w) => a("chart-click", w)),
|
|
1586
|
+
onMouseenter: T[25] || (T[25] = (w) => a("chart-mouseenter", w)),
|
|
1587
|
+
onMouseleave: rn
|
|
1589
1588
|
}, {
|
|
1590
1589
|
header: V(() => [
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
A.title ? (_(), I("h1",
|
|
1594
|
-
|
|
1595
|
-
|
|
1590
|
+
S("div", ta, [
|
|
1591
|
+
S("div", na, [
|
|
1592
|
+
A.title ? (_(), I("h1", oa, oe(A.title), 1)) : C("", !0),
|
|
1593
|
+
S("div", aa, [
|
|
1594
|
+
B(A.$slots, "controls", {}, void 0, !0)
|
|
1596
1595
|
])
|
|
1597
1596
|
]),
|
|
1598
|
-
|
|
1599
|
-
k.value ? (_(), I("h3", ra,
|
|
1600
|
-
|
|
1597
|
+
S("div", la, [
|
|
1598
|
+
k.value ? (_(), I("h3", ra, oe(Le.value), 1)) : C("", !0),
|
|
1599
|
+
B(A.$slots, "legend", { data: d(O) }, () => [
|
|
1601
1600
|
d(g).withLegend !== !1 && d(g).legendPosition !== "bottom" ? (_(), Y(d(Nt), {
|
|
1602
1601
|
key: 0,
|
|
1603
1602
|
data: d(O),
|
|
1604
1603
|
class: "lume-chart__legend",
|
|
1605
1604
|
"data-j-lume-chart__legend": "",
|
|
1606
|
-
onClick: T[0] || (T[0] = (
|
|
1607
|
-
onMouseenter: T[1] || (T[1] = (
|
|
1608
|
-
onMouseleave: T[2] || (T[2] = (
|
|
1609
|
-
}, null, 8, ["data"])) :
|
|
1605
|
+
onClick: T[0] || (T[0] = (w) => a("legend-click", w)),
|
|
1606
|
+
onMouseenter: T[1] || (T[1] = (w) => a("legend-mouseenter", w)),
|
|
1607
|
+
onMouseleave: T[2] || (T[2] = (w) => a("legend-mouseleave"))
|
|
1608
|
+
}, null, 8, ["data"])) : C("", !0)
|
|
1610
1609
|
], !0)
|
|
1611
1610
|
])
|
|
1612
1611
|
])
|
|
1613
1612
|
]),
|
|
1614
1613
|
footer: V(() => [
|
|
1615
|
-
|
|
1614
|
+
$e.value ? (_(), I("h3", sa, oe(pe.value), 1)) : C("", !0),
|
|
1616
1615
|
d(g).withLegend !== !1 && d(g).legendPosition == "bottom" ? (_(), Y(d(Nt), {
|
|
1617
1616
|
key: 1,
|
|
1618
1617
|
data: d(O),
|
|
1619
1618
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1620
1619
|
"data-j-lume-chart__legend": "",
|
|
1621
|
-
onClick: T[16] || (T[16] = (
|
|
1622
|
-
onMouseenter: T[17] || (T[17] = (
|
|
1623
|
-
onMouseleave: T[18] || (T[18] = (
|
|
1624
|
-
}, null, 8, ["data"])) :
|
|
1620
|
+
onClick: T[16] || (T[16] = (w) => a("legend-click", w)),
|
|
1621
|
+
onMouseenter: T[17] || (T[17] = (w) => a("legend-mouseenter", w)),
|
|
1622
|
+
onMouseleave: T[18] || (T[18] = (w) => a("legend-mouseleave"))
|
|
1623
|
+
}, null, 8, ["data"])) : C("", !0)
|
|
1625
1624
|
]),
|
|
1626
1625
|
extra: V(() => [
|
|
1627
|
-
|
|
1626
|
+
B(A.$slots, "tooltip", j(d(Ee), {
|
|
1628
1627
|
data: d(O),
|
|
1629
1628
|
labels: d(N),
|
|
1630
|
-
title: d(N)[
|
|
1631
|
-
items: d(
|
|
1632
|
-
position:
|
|
1629
|
+
title: d(N)[u.value],
|
|
1630
|
+
items: d(Ne)(u.value),
|
|
1631
|
+
position: De.value,
|
|
1633
1632
|
withTooltip: d(g).withTooltip !== !1,
|
|
1634
|
-
hoveredIndex:
|
|
1633
|
+
hoveredIndex: u.value,
|
|
1635
1634
|
handleMouseEnter: () => b.value = !0,
|
|
1636
1635
|
handleMouseLeave: () => b.value = !1,
|
|
1637
1636
|
options: d(g).tooltipOptions
|
|
1638
1637
|
}), () => [
|
|
1639
|
-
d(g).withTooltip !== !1 ? (_(), Y(d(Fo), j({ key: 0 }, d(
|
|
1640
|
-
position:
|
|
1641
|
-
title: d(N)[
|
|
1642
|
-
items: d(
|
|
1638
|
+
d(g).withTooltip !== !1 ? (_(), Y(d(Fo), j({ key: 0 }, d(Ee), {
|
|
1639
|
+
position: De.value,
|
|
1640
|
+
title: d(N)[u.value],
|
|
1641
|
+
items: d(Ne)(u.value),
|
|
1643
1642
|
options: d(g).tooltipOptions,
|
|
1644
1643
|
"data-j-lume-chart__tooltip": "",
|
|
1645
|
-
onOpened: T[19] || (T[19] = (
|
|
1646
|
-
index:
|
|
1647
|
-
targetElement:
|
|
1644
|
+
onOpened: T[19] || (T[19] = (w) => a("tooltip-opened", {
|
|
1645
|
+
index: u.value,
|
|
1646
|
+
targetElement: w
|
|
1648
1647
|
})),
|
|
1649
|
-
onMoved: T[20] || (T[20] = (
|
|
1650
|
-
index:
|
|
1651
|
-
targetElement:
|
|
1648
|
+
onMoved: T[20] || (T[20] = (w) => a("tooltip-moved", {
|
|
1649
|
+
index: u.value,
|
|
1650
|
+
targetElement: w
|
|
1652
1651
|
})),
|
|
1653
|
-
onClosed: T[21] || (T[21] = (
|
|
1654
|
-
onTooltipMouseenter: T[22] || (T[22] = (
|
|
1655
|
-
onTooltipMouseleave: T[23] || (T[23] = (
|
|
1652
|
+
onClosed: T[21] || (T[21] = (w) => a("tooltip-closed")),
|
|
1653
|
+
onTooltipMouseenter: T[22] || (T[22] = (w) => b.value = !0),
|
|
1654
|
+
onTooltipMouseleave: T[23] || (T[23] = (w) => b.value = !1)
|
|
1656
1655
|
}), {
|
|
1657
1656
|
default: V(() => [
|
|
1658
|
-
|
|
1657
|
+
B(A.$slots, "tooltip-content", {
|
|
1659
1658
|
data: d(O),
|
|
1660
1659
|
labels: d(N),
|
|
1661
|
-
hoveredIndex:
|
|
1660
|
+
hoveredIndex: u.value
|
|
1662
1661
|
}, void 0, !0)
|
|
1663
1662
|
]),
|
|
1664
1663
|
_: 3
|
|
1665
|
-
}, 16, ["position", "title", "items", "options"])) :
|
|
1664
|
+
}, 16, ["position", "title", "items", "options"])) : C("", !0)
|
|
1666
1665
|
], !0)
|
|
1667
1666
|
]),
|
|
1668
1667
|
default: V(() => [
|
|
1669
|
-
h.value ? (_(), I(
|
|
1670
|
-
d(
|
|
1668
|
+
h.value ? (_(), I(q, { key: 0 }, [
|
|
1669
|
+
d(M) ? (_(), Y(d(dt), j({ key: 0 }, d(z), {
|
|
1671
1670
|
"class-list": "lume-fill--negative",
|
|
1672
1671
|
transition: !1,
|
|
1673
1672
|
"data-j-lume-chart__negative-values": ""
|
|
1674
|
-
}), null, 16)) :
|
|
1675
|
-
d(g).withAxes !== !1 ?
|
|
1673
|
+
}), null, 16)) : C("", !0),
|
|
1674
|
+
d(g).withAxes !== !1 ? B(A.$slots, "axes", {
|
|
1676
1675
|
key: 1,
|
|
1677
|
-
xScale:
|
|
1678
|
-
yScale:
|
|
1676
|
+
xScale: F.value,
|
|
1677
|
+
yScale: Q.value,
|
|
1679
1678
|
containerSize: d(D),
|
|
1680
1679
|
options: d(g),
|
|
1681
|
-
hoveredIndex:
|
|
1680
|
+
hoveredIndex: u.value
|
|
1682
1681
|
}, () => [
|
|
1683
|
-
|
|
1682
|
+
ue(d(Lt), {
|
|
1684
1683
|
type: "x",
|
|
1685
|
-
scale:
|
|
1684
|
+
scale: F.value,
|
|
1686
1685
|
"container-size": d(D),
|
|
1687
|
-
options:
|
|
1688
|
-
"hovered-index":
|
|
1686
|
+
options: J.value,
|
|
1687
|
+
"hovered-index": u.value,
|
|
1689
1688
|
orientation: d(s),
|
|
1690
1689
|
"data-j-lume-chart__x-axis": "",
|
|
1691
1690
|
onClick: bt,
|
|
1692
1691
|
onMouseenter: kt,
|
|
1693
|
-
onMouseleave: T[3] || (T[3] = (
|
|
1694
|
-
"onLume__internal-AxisSize": T[4] || (T[4] = (
|
|
1692
|
+
onMouseleave: T[3] || (T[3] = (w) => a("axis-mouseleave")),
|
|
1693
|
+
"onLume__internal-AxisSize": T[4] || (T[4] = (w) => $.value = w)
|
|
1695
1694
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1696
|
-
|
|
1695
|
+
ue(d(Lt), {
|
|
1697
1696
|
type: "y",
|
|
1698
|
-
scale:
|
|
1697
|
+
scale: Q.value,
|
|
1699
1698
|
"container-size": d(D),
|
|
1700
|
-
options:
|
|
1701
|
-
"hovered-index":
|
|
1699
|
+
options: se.value,
|
|
1700
|
+
"hovered-index": u.value,
|
|
1702
1701
|
orientation: d(s),
|
|
1703
1702
|
"data-j-lume-chart__y-axis": "",
|
|
1704
1703
|
onClick: bt,
|
|
1705
1704
|
onMouseenter: kt,
|
|
1706
|
-
onMouseleave: T[5] || (T[5] = (
|
|
1707
|
-
"onLume__internal-AxisSize": T[6] || (T[6] = (
|
|
1705
|
+
onMouseleave: T[5] || (T[5] = (w) => a("axis-mouseleave")),
|
|
1706
|
+
"onLume__internal-AxisSize": T[6] || (T[6] = (w) => L.value = w)
|
|
1708
1707
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1709
|
-
], !0) :
|
|
1710
|
-
d(g).withHover !== !1 ? (_(), Y(d(
|
|
1708
|
+
], !0) : C("", !0),
|
|
1709
|
+
d(g).withHover !== !1 ? (_(), Y(d(zo), {
|
|
1711
1710
|
key: 2,
|
|
1712
1711
|
data: d(O),
|
|
1713
1712
|
orientation: d(s),
|
|
1714
|
-
"x-scale":
|
|
1715
|
-
"y-scale":
|
|
1713
|
+
"x-scale": F.value,
|
|
1714
|
+
"y-scale": Q.value,
|
|
1716
1715
|
"data-j-lume-chart__overlay-group": "",
|
|
1717
1716
|
"onLume__internal-Hover": je
|
|
1718
|
-
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) :
|
|
1719
|
-
d(le) ? (_(), I("g",
|
|
1720
|
-
(_(!0), I(
|
|
1717
|
+
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : C("", !0),
|
|
1718
|
+
d(le) ? (_(), I("g", ua, [
|
|
1719
|
+
(_(!0), I(q, null, W(p.value, (w, Ye) => (_(), I("circle", j(w, {
|
|
1721
1720
|
ref_for: !0,
|
|
1722
1721
|
ref_key: "tooltipAnchor",
|
|
1723
|
-
ref:
|
|
1722
|
+
ref: m,
|
|
1724
1723
|
key: `anchor_${Ye}`,
|
|
1725
|
-
r: d(
|
|
1724
|
+
r: d(Gn),
|
|
1726
1725
|
class: "lume-fill--transparent"
|
|
1727
|
-
}), null, 16,
|
|
1728
|
-
])) :
|
|
1729
|
-
|
|
1726
|
+
}), null, 16, ia))), 128))
|
|
1727
|
+
])) : C("", !0),
|
|
1728
|
+
B(A.$slots, "groups", {
|
|
1730
1729
|
data: d(O),
|
|
1731
1730
|
labels: d(N),
|
|
1732
1731
|
options: d(g),
|
|
1733
1732
|
orientation: d(s),
|
|
1734
|
-
xScale:
|
|
1735
|
-
yScale:
|
|
1736
|
-
hoveredIndex:
|
|
1733
|
+
xScale: F.value,
|
|
1734
|
+
yScale: Q.value,
|
|
1735
|
+
hoveredIndex: u.value,
|
|
1737
1736
|
containerSize: d(D),
|
|
1738
1737
|
transition: d(g).withTransition !== !1,
|
|
1739
1738
|
classList: A.classList,
|
|
1740
|
-
onNodeClick: T[7] || (T[7] = (
|
|
1741
|
-
onNodeMouseenter: T[8] || (T[8] = (
|
|
1742
|
-
onNodeMouseleave: T[9] || (T[9] = (
|
|
1743
|
-
onLinkClick: T[10] || (T[10] = (
|
|
1744
|
-
onLinkMouseenter: T[11] || (T[11] = (
|
|
1745
|
-
onLinkMouseleave: T[12] || (T[12] = (
|
|
1746
|
-
onBarClick: T[13] || (T[13] = (
|
|
1747
|
-
onLineClick: T[14] || (T[14] = (
|
|
1748
|
-
onPointClick: T[15] || (T[15] = (
|
|
1739
|
+
onNodeClick: T[7] || (T[7] = (w) => a("node-click", w)),
|
|
1740
|
+
onNodeMouseenter: T[8] || (T[8] = (w) => a("node-mouseenter", w)),
|
|
1741
|
+
onNodeMouseleave: T[9] || (T[9] = (w) => a("node-mouseleave", w)),
|
|
1742
|
+
onLinkClick: T[10] || (T[10] = (w) => a("link-click", w)),
|
|
1743
|
+
onLinkMouseenter: T[11] || (T[11] = (w) => a("link-mouseenter", w)),
|
|
1744
|
+
onLinkMouseleave: T[12] || (T[12] = (w) => a("link-mouseleave", w)),
|
|
1745
|
+
onBarClick: T[13] || (T[13] = (w) => a("bar-click", w)),
|
|
1746
|
+
onLineClick: T[14] || (T[14] = (w) => a("line-click", w)),
|
|
1747
|
+
onPointClick: T[15] || (T[15] = (w) => a("point-click", w)),
|
|
1749
1748
|
"onLume__internal-Hover": je
|
|
1750
1749
|
}, void 0, !0)
|
|
1751
|
-
], 64)) :
|
|
1750
|
+
], 64)) : C("", !0)
|
|
1752
1751
|
]),
|
|
1753
1752
|
_: 3
|
|
1754
1753
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "orientation"]));
|
|
1755
1754
|
}
|
|
1756
|
-
}),
|
|
1755
|
+
}), xe = /* @__PURE__ */ ee(ca, [["__scopeId", "data-v-17c48844"]]), Ht = 8, da = 8, va = 20, He = 2, Bt = 2, ma = ["dy", "dominant-baseline"], fa = ["y", "x", "width", "height"], pa = { class: "lume-alluvial-group__label-wrapper" }, ha = /* @__PURE__ */ Z({
|
|
1757
1756
|
__name: "lume-alluvial-node-label",
|
|
1758
1757
|
props: {
|
|
1759
1758
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1762,46 +1761,46 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1762
1761
|
},
|
|
1763
1762
|
emits: ["lume__internal--node-resize"],
|
|
1764
1763
|
setup(e, { emit: n }) {
|
|
1765
|
-
const t = e, o = n, a =
|
|
1764
|
+
const t = e, o = n, a = R(null), r = R(t.maxWidth), l = R(1);
|
|
1766
1765
|
return X(
|
|
1767
1766
|
[a, () => t.maxWidth],
|
|
1768
1767
|
async ([i, c]) => {
|
|
1769
1768
|
if (i && c) {
|
|
1770
|
-
|
|
1771
|
-
const { width: s, height:
|
|
1772
|
-
|
|
1769
|
+
r.value = c, await Qe();
|
|
1770
|
+
const { width: s, height: f } = i.getBoundingClientRect();
|
|
1771
|
+
r.value = s + Bt > c ? c : s + Bt, l.value = Math.ceil(f);
|
|
1773
1772
|
}
|
|
1774
1773
|
},
|
|
1775
1774
|
{ immediate: !0 }
|
|
1776
|
-
), X(
|
|
1775
|
+
), X(r, async (i) => {
|
|
1777
1776
|
i !== t.maxWidth && (await Qe(), o("lume__internal--node-resize"));
|
|
1778
1777
|
}), (i, c) => e.maxWidth ? (_(), I("foreignObject", {
|
|
1779
1778
|
key: 1,
|
|
1780
1779
|
class: "lume-alluvial-group__node-foreign",
|
|
1781
1780
|
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
1782
|
-
x: e.left ? -
|
|
1783
|
-
width:
|
|
1781
|
+
x: e.left ? -r.value : 0,
|
|
1782
|
+
width: r.value,
|
|
1784
1783
|
height: l.value
|
|
1785
1784
|
}, [
|
|
1786
|
-
|
|
1787
|
-
|
|
1785
|
+
S("div", pa, [
|
|
1786
|
+
S("span", {
|
|
1788
1787
|
ref_key: "text",
|
|
1789
1788
|
ref: a,
|
|
1790
1789
|
class: "lume-alluvial-group__node-label"
|
|
1791
1790
|
}, [
|
|
1792
|
-
|
|
1791
|
+
B(i.$slots, "default", {}, void 0, !0)
|
|
1793
1792
|
], 512)
|
|
1794
1793
|
])
|
|
1795
|
-
], 8,
|
|
1794
|
+
], 8, fa)) : (_(), I("text", {
|
|
1796
1795
|
key: 0,
|
|
1797
1796
|
class: "lume-alluvial-group__node-label",
|
|
1798
1797
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1799
1798
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1800
1799
|
}, [
|
|
1801
|
-
|
|
1800
|
+
B(i.$slots, "default", {}, void 0, !0)
|
|
1802
1801
|
], 8, ma));
|
|
1803
1802
|
}
|
|
1804
|
-
}),
|
|
1803
|
+
}), ga = /* @__PURE__ */ ee(ha, [["__scopeId", "data-v-7126dfdb"]]), ya = ["y", "dominant-baseline"], _a = /* @__PURE__ */ Z({
|
|
1805
1804
|
__name: "lume-alluvial-node-value",
|
|
1806
1805
|
props: {
|
|
1807
1806
|
bottom: { type: Boolean, default: !0 }
|
|
@@ -1812,40 +1811,40 @@ const na = { class: "lume-chart__header" }, oa = { class: "lume-chart__header-se
|
|
|
1812
1811
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1813
1812
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1814
1813
|
}, [
|
|
1815
|
-
|
|
1816
|
-
], 8,
|
|
1814
|
+
B(n.$slots, "default", {}, void 0, !0)
|
|
1815
|
+
], 8, ya));
|
|
1817
1816
|
}
|
|
1818
|
-
}),
|
|
1817
|
+
}), ka = /* @__PURE__ */ ee(_a, [["__scopeId", "data-v-b4fc758b"]]), ba = ["transform"], Aa = ["transform"], Ta = ["transform"], La = /* @__PURE__ */ Z({
|
|
1819
1818
|
__name: "lume-alluvial-node-header",
|
|
1820
1819
|
props: {
|
|
1821
1820
|
x: { type: Number, required: !0 },
|
|
1822
1821
|
y: { type: Number, required: !0 }
|
|
1823
1822
|
},
|
|
1824
1823
|
setup(e) {
|
|
1825
|
-
const n =
|
|
1824
|
+
const n = R(null), t = v(
|
|
1826
1825
|
() => n.value && `translate(${-n.value.getBBox().width / 2}, 0)`
|
|
1827
1826
|
), o = v(
|
|
1828
1827
|
() => n.value && `translate(${n.value.getBBox().width / 2}, 0)`
|
|
1829
1828
|
);
|
|
1830
|
-
return (a,
|
|
1829
|
+
return (a, r) => (_(), I("g", {
|
|
1831
1830
|
transform: `translate(${e.x}, ${e.y})`
|
|
1832
1831
|
}, [
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
], 8,
|
|
1836
|
-
|
|
1832
|
+
S("g", { transform: t.value }, [
|
|
1833
|
+
B(a.$slots, "before", {}, void 0, !0)
|
|
1834
|
+
], 8, Aa),
|
|
1835
|
+
S("text", {
|
|
1837
1836
|
ref_key: "textRef",
|
|
1838
1837
|
ref: n,
|
|
1839
1838
|
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
1840
1839
|
}, [
|
|
1841
|
-
|
|
1840
|
+
B(a.$slots, "default", {}, void 0, !0)
|
|
1842
1841
|
], 512),
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
], 8,
|
|
1846
|
-
], 8,
|
|
1842
|
+
S("g", { transform: o.value }, [
|
|
1843
|
+
B(a.$slots, "after", {}, void 0, !0)
|
|
1844
|
+
], 8, Ta)
|
|
1845
|
+
], 8, ba));
|
|
1847
1846
|
}
|
|
1848
|
-
}),
|
|
1847
|
+
}), $a = /* @__PURE__ */ ee(La, [["__scopeId", "data-v-0e483453"]]);
|
|
1849
1848
|
function Mt(e, n) {
|
|
1850
1849
|
return {
|
|
1851
1850
|
x0: 0 + (n ? n.left : 0),
|
|
@@ -1854,56 +1853,56 @@ function Mt(e, n) {
|
|
|
1854
1853
|
y1: e.height - (n ? n.bottom : 0)
|
|
1855
1854
|
};
|
|
1856
1855
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const n =
|
|
1856
|
+
function Oa(e) {
|
|
1857
|
+
const n = R(Mt(e));
|
|
1859
1858
|
function t(o) {
|
|
1860
1859
|
n.value = Mt(e, o);
|
|
1861
1860
|
}
|
|
1862
1861
|
return { extents: n, updateExtents: t };
|
|
1863
1862
|
}
|
|
1864
1863
|
var Pe = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", e.BarScaleNull = "Bar linear scale cannot be `null`", e))(Pe || {});
|
|
1865
|
-
const
|
|
1866
|
-
function
|
|
1867
|
-
t &&
|
|
1864
|
+
const Ia = "[lume] ";
|
|
1865
|
+
function rt(e, n, t = !0) {
|
|
1866
|
+
t && Ft() || console.error(Ia + "Error: " + e, n);
|
|
1868
1867
|
}
|
|
1869
1868
|
const wa = 200;
|
|
1870
1869
|
function Ie(e) {
|
|
1871
1870
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1872
1871
|
}
|
|
1873
|
-
function
|
|
1872
|
+
function xa(e, n) {
|
|
1874
1873
|
return n.nodes.find((t) => t.id === e);
|
|
1875
1874
|
}
|
|
1876
|
-
function
|
|
1875
|
+
function Ea(e, n) {
|
|
1877
1876
|
return n.links.find((t) => t.id === e);
|
|
1878
1877
|
}
|
|
1879
1878
|
function tn(e) {
|
|
1880
1879
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1881
1880
|
}
|
|
1882
|
-
function
|
|
1881
|
+
function Na(e, n) {
|
|
1883
1882
|
if (!n) return;
|
|
1884
1883
|
const t = e.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), o = e.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = n.filter((l) => t.includes(l.dataset.id)).reduce(
|
|
1885
1884
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1886
1885
|
-1 / 0
|
|
1887
|
-
),
|
|
1886
|
+
), r = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1888
1887
|
(l, i) => Math.max(l, i.getBBox().width),
|
|
1889
1888
|
-1 / 0
|
|
1890
1889
|
);
|
|
1891
1890
|
return {
|
|
1892
1891
|
left: a,
|
|
1893
1892
|
top: 0,
|
|
1894
|
-
right:
|
|
1893
|
+
right: r,
|
|
1895
1894
|
bottom: 0
|
|
1896
1895
|
};
|
|
1897
1896
|
}
|
|
1898
|
-
function
|
|
1897
|
+
function Da(e) {
|
|
1899
1898
|
return e.map((n) => {
|
|
1900
|
-
const t = n.y1 - n.y0 <
|
|
1899
|
+
const t = n.y1 - n.y0 < He;
|
|
1901
1900
|
return {
|
|
1902
1901
|
x: n.x0,
|
|
1903
|
-
y: n.y0 - (t ?
|
|
1902
|
+
y: n.y0 - (t ? He / 2 : 0),
|
|
1904
1903
|
// Negative offset to account for the min. height
|
|
1905
1904
|
width: n.x1 - n.x0,
|
|
1906
|
-
height: t ?
|
|
1905
|
+
height: t ? He : n.y1 - n.y0,
|
|
1907
1906
|
textTransform: {
|
|
1908
1907
|
x: n.depth > 0 ? n.x1 + Ht : n.x0 - Ht,
|
|
1909
1908
|
y: (n.y1 + n.y0) / 2
|
|
@@ -1912,22 +1911,22 @@ function Ha(e) {
|
|
|
1912
1911
|
};
|
|
1913
1912
|
});
|
|
1914
1913
|
}
|
|
1915
|
-
function
|
|
1914
|
+
function Ha(e) {
|
|
1916
1915
|
return [e.source.x1, e.y0];
|
|
1917
1916
|
}
|
|
1918
|
-
function
|
|
1917
|
+
function Ba(e) {
|
|
1919
1918
|
return [e.target.x0, e.y1];
|
|
1920
1919
|
}
|
|
1921
|
-
function
|
|
1922
|
-
return e.curveFunction ? gn(e.curveFunction).source(
|
|
1920
|
+
function Ma(e) {
|
|
1921
|
+
return e.curveFunction ? gn(e.curveFunction).source(Ha).target(Ba) : vn();
|
|
1923
1922
|
}
|
|
1924
|
-
function
|
|
1923
|
+
function Ra(e) {
|
|
1925
1924
|
return e.map((n) => {
|
|
1926
1925
|
var t;
|
|
1927
1926
|
return {
|
|
1928
1927
|
id: n.id,
|
|
1929
1928
|
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Ge,
|
|
1930
|
-
d:
|
|
1929
|
+
d: Ma(n)(n),
|
|
1931
1930
|
strokeWidth: Math.max(1, n.width),
|
|
1932
1931
|
link: n
|
|
1933
1932
|
};
|
|
@@ -1941,8 +1940,8 @@ function Rt(e, n, t, o, a) {
|
|
|
1941
1940
|
};
|
|
1942
1941
|
return;
|
|
1943
1942
|
}
|
|
1944
|
-
const
|
|
1945
|
-
let s = (Date.now() -
|
|
1943
|
+
const r = Date.now(), l = Nn(n, t), i = () => {
|
|
1944
|
+
let s = (Date.now() - r) / wa;
|
|
1946
1945
|
s > 1 && (s = 1), e.node = {
|
|
1947
1946
|
...e.node,
|
|
1948
1947
|
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
@@ -1950,17 +1949,17 @@ function Rt(e, n, t, o, a) {
|
|
|
1950
1949
|
};
|
|
1951
1950
|
requestAnimationFrame(i);
|
|
1952
1951
|
}
|
|
1953
|
-
const
|
|
1952
|
+
const Sa = {
|
|
1954
1953
|
nodes: [],
|
|
1955
1954
|
links: []
|
|
1956
1955
|
};
|
|
1957
1956
|
function St(e, n) {
|
|
1958
1957
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1959
1958
|
}
|
|
1960
|
-
function
|
|
1961
|
-
const o =
|
|
1962
|
-
var
|
|
1963
|
-
return (
|
|
1959
|
+
function Ga(e, n, t) {
|
|
1960
|
+
const o = R(null), a = v(() => {
|
|
1961
|
+
var u, m;
|
|
1962
|
+
return (m = (u = e.value) == null ? void 0 : u[0]) == null ? void 0 : m.values.map(
|
|
1964
1963
|
({ label: y, color: p, value: b, deriveColorFromIncomingLinks: $, offset: L }) => ({
|
|
1965
1964
|
label: y || b.toString(),
|
|
1966
1965
|
color: p,
|
|
@@ -1970,10 +1969,10 @@ function ja(e, n, t) {
|
|
|
1970
1969
|
offset: L
|
|
1971
1970
|
})
|
|
1972
1971
|
);
|
|
1973
|
-
}),
|
|
1972
|
+
}), r = v(
|
|
1974
1973
|
() => {
|
|
1975
|
-
var
|
|
1976
|
-
return (
|
|
1974
|
+
var u, m;
|
|
1975
|
+
return (m = (u = e.value) == null ? void 0 : u[0]) == null ? void 0 : m.values.map(
|
|
1977
1976
|
(y) => {
|
|
1978
1977
|
var p;
|
|
1979
1978
|
return (p = y.targets) == null ? void 0 : p.map(
|
|
@@ -1989,51 +1988,51 @@ function ja(e, n, t) {
|
|
|
1989
1988
|
}
|
|
1990
1989
|
).filter(Boolean).flat();
|
|
1991
1990
|
}
|
|
1992
|
-
), l = v(() =>
|
|
1993
|
-
var
|
|
1994
|
-
return (
|
|
1995
|
-
(
|
|
1996
|
-
const p = St(y,
|
|
1997
|
-
return p ? (p.push(y), p.sort((b, $) => (b._y0 || b.y0) - ($._y0 || $.y0))) :
|
|
1991
|
+
), l = v(() => mn().nodeId(Ie).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1992
|
+
var u;
|
|
1993
|
+
return (u = o.value) == null ? void 0 : u.nodes.reduce(
|
|
1994
|
+
(m, y) => {
|
|
1995
|
+
const p = St(y, m);
|
|
1996
|
+
return p ? (p.push(y), p.sort((b, $) => (b._y0 || b.y0) - ($._y0 || $.y0))) : m.push([y]), m;
|
|
1998
1997
|
},
|
|
1999
1998
|
[]
|
|
2000
1999
|
);
|
|
2001
2000
|
});
|
|
2002
|
-
function c(
|
|
2003
|
-
const { offset:
|
|
2001
|
+
function c(u) {
|
|
2002
|
+
const { offset: m } = u, y = St(u, i.value);
|
|
2004
2003
|
if (!y) return;
|
|
2005
|
-
const p = y[y.findIndex(($) => $.id ===
|
|
2006
|
-
|
|
2004
|
+
const p = y[y.findIndex(($) => $.id === u.id) - 1], b = p && y.length !== 1 ? p.y1 + m : m;
|
|
2005
|
+
u._y0 = u.y0, u._y1 = u.y1, u.y0 = b, u.y1 = u.y0 + (u._y1 - u._y0);
|
|
2007
2006
|
}
|
|
2008
|
-
function s(
|
|
2009
|
-
const { id: y, _y0: p, y0: b } =
|
|
2007
|
+
function s(u, m) {
|
|
2008
|
+
const { id: y, _y0: p, y0: b } = u, $ = m.links.filter(
|
|
2010
2009
|
(O) => O.source.id === y
|
|
2011
|
-
), L =
|
|
2010
|
+
), L = m.links.filter(
|
|
2012
2011
|
(O) => O.target.id === y
|
|
2013
2012
|
), g = b - p;
|
|
2014
2013
|
$.forEach((O) => O.y0 += g), L.forEach((O) => O.y1 += g);
|
|
2015
2014
|
}
|
|
2016
|
-
const
|
|
2017
|
-
var
|
|
2018
|
-
return o.value && ((
|
|
2019
|
-
|
|
2015
|
+
const f = v(() => {
|
|
2016
|
+
var u;
|
|
2017
|
+
return o.value && ((u = a.value) == null || u.forEach((m) => {
|
|
2018
|
+
m.value === 0 && (m.fallbackColor = mt.Grey), typeof m.offset == "number" && (c(m), s(m, o.value));
|
|
2020
2019
|
})), o.value;
|
|
2021
2020
|
});
|
|
2022
2021
|
return X([l, t], () => {
|
|
2023
2022
|
try {
|
|
2024
|
-
const { x0:
|
|
2023
|
+
const { x0: u, y0: m, x1: y, y1: p } = t.value;
|
|
2025
2024
|
o.value = l.value.extent([
|
|
2026
|
-
[
|
|
2025
|
+
[u, m],
|
|
2027
2026
|
[y, p]
|
|
2028
|
-
])({ nodes: a.value, links:
|
|
2029
|
-
} catch (
|
|
2030
|
-
|
|
2027
|
+
])({ nodes: a.value, links: r.value });
|
|
2028
|
+
} catch (u) {
|
|
2029
|
+
rt(Pe.GraphProblem, u), o.value = Sa;
|
|
2031
2030
|
}
|
|
2032
|
-
}), { columns: i, graph:
|
|
2031
|
+
}), { columns: i, graph: f };
|
|
2033
2032
|
}
|
|
2034
|
-
function
|
|
2033
|
+
function ut(e, n) {
|
|
2035
2034
|
return n || (n = {}), e.targetLinks && e.targetLinks.forEach(({ source: t, value: o }) => {
|
|
2036
|
-
n[t.id] = o,
|
|
2035
|
+
n[t.id] = o, ut(
|
|
2037
2036
|
t,
|
|
2038
2037
|
n
|
|
2039
2038
|
);
|
|
@@ -2047,29 +2046,29 @@ function it(e, n) {
|
|
|
2047
2046
|
);
|
|
2048
2047
|
}), n;
|
|
2049
2048
|
}
|
|
2050
|
-
function
|
|
2049
|
+
function ja(e, n) {
|
|
2051
2050
|
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
2052
2051
|
}
|
|
2053
|
-
const
|
|
2052
|
+
const Va = (e, n) => {
|
|
2054
2053
|
let t;
|
|
2055
2054
|
tn(e) ? t = {
|
|
2056
2055
|
[e.id]: e.value,
|
|
2057
|
-
...
|
|
2056
|
+
...ut(e),
|
|
2058
2057
|
...it(e)
|
|
2059
2058
|
} : t = {
|
|
2060
2059
|
[e.source.id]: e.source.value,
|
|
2061
2060
|
[e.target.id]: e.target.value,
|
|
2062
|
-
...
|
|
2061
|
+
...ut(e.source),
|
|
2063
2062
|
...it(e.target)
|
|
2064
2063
|
};
|
|
2065
|
-
const o =
|
|
2064
|
+
const o = ja(t, n);
|
|
2066
2065
|
return { nodes: t, links: o };
|
|
2067
|
-
},
|
|
2066
|
+
}, Pa = (e) => {
|
|
2068
2067
|
if (tn(e)) {
|
|
2069
2068
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2070
2069
|
return {
|
|
2071
2070
|
nodes: n.reduce(
|
|
2072
|
-
(t, { source: o, target: a, value:
|
|
2071
|
+
(t, { source: o, target: a, value: r }) => o === e ? { ...t, [Ie(a)]: r } : { ...t, [Ie(o)]: r },
|
|
2073
2072
|
{ [Ie(e)]: e.value }
|
|
2074
2073
|
),
|
|
2075
2074
|
links: n.map(({ id: t }) => t)
|
|
@@ -2084,12 +2083,12 @@ const Pa = (e, n) => {
|
|
|
2084
2083
|
};
|
|
2085
2084
|
};
|
|
2086
2085
|
function Fa(e, n, t) {
|
|
2087
|
-
const o =
|
|
2086
|
+
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2088
2087
|
o.value,
|
|
2089
2088
|
t.value
|
|
2090
|
-
) : n.value.highlightedElements === "closest" ?
|
|
2091
|
-
return X(a, (
|
|
2092
|
-
if (
|
|
2089
|
+
) : n.value.highlightedElements === "closest" ? Pa(o.value, t.value) : Va(o.value, t.value) : { nodes: {}, links: [] });
|
|
2090
|
+
return X(a, (r, l) => {
|
|
2091
|
+
if (r.links.length === 0 && Object.keys(r.nodes).length === 0) {
|
|
2093
2092
|
e.value.forEach((i) => {
|
|
2094
2093
|
i.node.id in l.nodes && Rt(
|
|
2095
2094
|
i,
|
|
@@ -2102,19 +2101,19 @@ function Fa(e, n, t) {
|
|
|
2102
2101
|
return;
|
|
2103
2102
|
}
|
|
2104
2103
|
e.value.forEach((i) => {
|
|
2105
|
-
i.node.id in
|
|
2104
|
+
i.node.id in r.nodes && Rt(
|
|
2106
2105
|
i,
|
|
2107
2106
|
i.node.value,
|
|
2108
|
-
|
|
2107
|
+
r.nodes[i.node.id],
|
|
2109
2108
|
n.value.withTransition
|
|
2110
2109
|
);
|
|
2111
2110
|
});
|
|
2112
2111
|
}), { highlightedElements: a, hoveredElement: o };
|
|
2113
2112
|
}
|
|
2114
|
-
const
|
|
2113
|
+
const Ca = {
|
|
2115
2114
|
class: "lume-alluvial-group",
|
|
2116
2115
|
"data-j-alluvial-group": ""
|
|
2117
|
-
},
|
|
2116
|
+
}, za = { key: 0 }, Wa = { key: 0 }, Za = ["id", "x1", "x2"], Ua = ["stop-color"], Xa = ["stop-color"], Ya = ["d", "stroke-width", "onClick", "onMouseover"], Ka = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], Ja = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], Qa = ["x", "y", "height", "width"], qa = ["transform", "data-id", "width"], el = /* @__PURE__ */ Z({
|
|
2118
2117
|
__name: "lume-alluvial-group",
|
|
2119
2118
|
props: {
|
|
2120
2119
|
...We(),
|
|
@@ -2125,237 +2124,237 @@ const za = {
|
|
|
2125
2124
|
},
|
|
2126
2125
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2127
2126
|
setup(e, { emit: n }) {
|
|
2128
|
-
const t = e, o = n, a =
|
|
2127
|
+
const t = e, o = n, a = Fe("chartID"), { data: r, options: l } = te(t), i = R([]), c = R([]), s = R(null), { extents: f, updateExtents: u } = Oa(t.containerSize), { columns: m, graph: y } = Ga(r, l, f), { hoveredElement: p, highlightedElements: b } = Fa(
|
|
2129
2128
|
i,
|
|
2130
2129
|
l,
|
|
2131
2130
|
y
|
|
2132
2131
|
), $ = v(() => Ve(l.value.valueFormat)), L = v(
|
|
2133
2132
|
() => Object.keys(b.value.nodes)
|
|
2134
|
-
), g = v(() =>
|
|
2133
|
+
), g = v(() => m.value ? m.value.map(
|
|
2135
2134
|
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2136
2135
|
) : []), O = v(() => {
|
|
2137
2136
|
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2138
|
-
return l.value.nodeHeaders.slice(0, g.value.length).map((k,
|
|
2137
|
+
return l.value.nodeHeaders.slice(0, g.value.length).map((k, x) => ({
|
|
2139
2138
|
label: k,
|
|
2140
|
-
x: g.value[
|
|
2139
|
+
x: g.value[x]
|
|
2141
2140
|
}));
|
|
2142
2141
|
}), N = v(
|
|
2143
|
-
() => l.value.nodeHeaderPadding ??
|
|
2142
|
+
() => l.value.nodeHeaderPadding ?? va
|
|
2144
2143
|
), D = v(() => {
|
|
2145
2144
|
if (!(!l.value.gradient || !y.value))
|
|
2146
|
-
return y.value.links.reduce((k,
|
|
2147
|
-
const { source: h, target:
|
|
2148
|
-
return k[
|
|
2149
|
-
source:
|
|
2145
|
+
return y.value.links.reduce((k, x) => {
|
|
2146
|
+
const { source: h, target: M } = x, z = h.color || h.fallbackColor, le = M.deriveColorFromIncomingLinks ? z : M.color || M.fallbackColor;
|
|
2147
|
+
return k[x.id] = {
|
|
2148
|
+
source: z,
|
|
2150
2149
|
target: le,
|
|
2151
2150
|
x1: h.x1,
|
|
2152
|
-
x2:
|
|
2151
|
+
x2: M.x0
|
|
2153
2152
|
}, k;
|
|
2154
2153
|
}, {});
|
|
2155
2154
|
}), P = v(() => {
|
|
2156
2155
|
const k = i.value.filter(
|
|
2157
|
-
(h) =>
|
|
2158
|
-
),
|
|
2156
|
+
(h) => Q(h)
|
|
2157
|
+
), x = [];
|
|
2159
2158
|
return k.forEach((h) => {
|
|
2160
|
-
const
|
|
2161
|
-
c.value.filter(({ link:
|
|
2162
|
-
const Ue = le.link.target.y1 - le.link.target.y0 >
|
|
2163
|
-
let
|
|
2164
|
-
return Ue ? (
|
|
2159
|
+
const M = [];
|
|
2160
|
+
c.value.filter(({ link: z }) => z.target.id === h.node.id).reverse().reduce((z, le, Ee, Ze) => {
|
|
2161
|
+
const Ue = le.link.target.y1 - le.link.target.y0 > He;
|
|
2162
|
+
let Ne, De, Oe;
|
|
2163
|
+
return Ue ? (Ne = le.link.target.y1 - le.link.target.y0, De = le.link.value / h.node.value, Oe = De * Ne) : Oe = He / Ze.length, M.push({
|
|
2165
2164
|
x: h.x,
|
|
2166
|
-
y: h.y +
|
|
2165
|
+
y: h.y + z,
|
|
2167
2166
|
height: Oe,
|
|
2168
2167
|
width: h.width,
|
|
2169
2168
|
key: `node-block-${h.node.id}-source-link-${le.link.source.id}`,
|
|
2170
2169
|
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ge}`
|
|
2171
|
-
}),
|
|
2172
|
-
}, 0),
|
|
2170
|
+
}), z + Oe;
|
|
2171
|
+
}, 0), x.push({
|
|
2173
2172
|
id: h.node.id,
|
|
2174
|
-
subNodes:
|
|
2173
|
+
subNodes: M
|
|
2175
2174
|
});
|
|
2176
|
-
}),
|
|
2175
|
+
}), x;
|
|
2177
2176
|
});
|
|
2178
|
-
function
|
|
2177
|
+
function G(k) {
|
|
2179
2178
|
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2180
2179
|
}
|
|
2181
|
-
function
|
|
2180
|
+
function E(k) {
|
|
2182
2181
|
return L.value.length > 0 && !L.value.includes(k.toString());
|
|
2183
2182
|
}
|
|
2184
|
-
function
|
|
2183
|
+
function K(k) {
|
|
2185
2184
|
return L.value.length > 0 && L.value.includes(k.toString());
|
|
2186
2185
|
}
|
|
2187
|
-
function
|
|
2186
|
+
function U(k) {
|
|
2188
2187
|
return b.value.links.length > 0 && !b.value.links.includes(k);
|
|
2189
2188
|
}
|
|
2190
|
-
function
|
|
2189
|
+
function F(k) {
|
|
2191
2190
|
return b.value.links.length > 0 && b.value.links.includes(k);
|
|
2192
2191
|
}
|
|
2193
|
-
function
|
|
2192
|
+
function Q(k) {
|
|
2194
2193
|
return !k.node.color && k.node.deriveColorFromIncomingLinks;
|
|
2195
2194
|
}
|
|
2196
|
-
function
|
|
2197
|
-
k !== p.value && (p.value = k, o("link-mouseenter", { link: k, event:
|
|
2195
|
+
function J(k, x) {
|
|
2196
|
+
k !== p.value && (p.value = k, o("link-mouseenter", { link: k, event: x }));
|
|
2198
2197
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const
|
|
2201
|
-
p.value = null, o("link-mouseleave", { link:
|
|
2198
|
+
function se(k) {
|
|
2199
|
+
const x = p.value;
|
|
2200
|
+
p.value = null, o("link-mouseleave", { link: x, event: k });
|
|
2202
2201
|
}
|
|
2203
|
-
function
|
|
2202
|
+
function pe(k) {
|
|
2204
2203
|
if (k == null) {
|
|
2205
2204
|
p.value = null;
|
|
2206
2205
|
return;
|
|
2207
2206
|
}
|
|
2208
|
-
const
|
|
2209
|
-
if (!
|
|
2210
|
-
|
|
2207
|
+
const x = xa(k, y.value) || Ea(k, y.value);
|
|
2208
|
+
if (!x) {
|
|
2209
|
+
ye(me.InvalidHoveredElement);
|
|
2211
2210
|
return;
|
|
2212
2211
|
}
|
|
2213
|
-
p.value =
|
|
2212
|
+
p.value = x;
|
|
2214
2213
|
}
|
|
2215
|
-
function
|
|
2216
|
-
var
|
|
2217
|
-
return ((
|
|
2214
|
+
function Le(k) {
|
|
2215
|
+
var x;
|
|
2216
|
+
return ((x = P.value.find(({ id: h }) => k === h)) == null ? void 0 : x.subNodes) ?? [];
|
|
2218
2217
|
}
|
|
2219
|
-
function
|
|
2220
|
-
const k =
|
|
2221
|
-
|
|
2218
|
+
function $e() {
|
|
2219
|
+
const k = Na(y.value, s.value);
|
|
2220
|
+
u(k);
|
|
2222
2221
|
}
|
|
2223
2222
|
return X(y, (k) => {
|
|
2224
|
-
i.value =
|
|
2223
|
+
i.value = Da(k.nodes), c.value = Ra(k.links).reverse(), p.value == null && t.hoveredElementId != null && pe(t.hoveredElementId);
|
|
2225
2224
|
}), X([t.containerSize, s], () => {
|
|
2226
|
-
t.containerSize.width && t.containerSize.height &&
|
|
2227
|
-
}), X(() => t.hoveredElementId,
|
|
2228
|
-
O.value ? (_(), I("g",
|
|
2229
|
-
(_(!0), I(
|
|
2225
|
+
t.containerSize.width && t.containerSize.height && $e();
|
|
2226
|
+
}), X(() => t.hoveredElementId, pe), (k, x) => (_(), I("g", Ca, [
|
|
2227
|
+
O.value ? (_(), I("g", za, [
|
|
2228
|
+
(_(!0), I(q, null, W(O.value, (h, M) => B(k.$slots, `node-header-${M}`, {
|
|
2230
2229
|
x: h.x,
|
|
2231
2230
|
y: -N.value
|
|
2232
2231
|
}, () => [
|
|
2233
|
-
(_(), Y(d(
|
|
2232
|
+
(_(), Y(d($a), {
|
|
2234
2233
|
key: `header_${h.x}`,
|
|
2235
2234
|
x: h.x,
|
|
2236
2235
|
y: -N.value
|
|
2237
2236
|
}, {
|
|
2238
2237
|
default: V(() => [
|
|
2239
|
-
|
|
2238
|
+
ce(oe(h.label), 1)
|
|
2240
2239
|
]),
|
|
2241
2240
|
_: 2
|
|
2242
2241
|
}, 1032, ["x", "y"]))
|
|
2243
2242
|
], !0)), 256))
|
|
2244
|
-
])) :
|
|
2245
|
-
|
|
2243
|
+
])) : C("", !0),
|
|
2244
|
+
S("g", {
|
|
2246
2245
|
class: "lume-alluvial-link-group",
|
|
2247
|
-
onMouseleave:
|
|
2246
|
+
onMouseleave: se
|
|
2248
2247
|
}, [
|
|
2249
|
-
d(l).gradient ? (_(), I("defs",
|
|
2250
|
-
(_(!0), I(
|
|
2251
|
-
id: `${d(a)}_${
|
|
2252
|
-
key:
|
|
2248
|
+
d(l).gradient ? (_(), I("defs", Wa, [
|
|
2249
|
+
(_(!0), I(q, null, W(D.value, (h, M) => (_(), I("linearGradient", {
|
|
2250
|
+
id: `${d(a)}_${M}`,
|
|
2251
|
+
key: M,
|
|
2253
2252
|
gradientUnits: "userSpaceOnUse",
|
|
2254
2253
|
x1: h.x1,
|
|
2255
2254
|
x2: h.x2
|
|
2256
2255
|
}, [
|
|
2257
|
-
|
|
2256
|
+
S("stop", {
|
|
2258
2257
|
offset: "0%",
|
|
2259
2258
|
"stop-color": `var(--lume-color--${h.source})`
|
|
2260
|
-
}, null, 8,
|
|
2261
|
-
|
|
2259
|
+
}, null, 8, Ua),
|
|
2260
|
+
S("stop", {
|
|
2262
2261
|
offset: "100%",
|
|
2263
2262
|
"stop-color": `var(--lume-color--${h.target})`
|
|
2264
|
-
}, null, 8,
|
|
2265
|
-
], 8,
|
|
2266
|
-
])) :
|
|
2267
|
-
(_(!0), I(
|
|
2263
|
+
}, null, 8, Xa)
|
|
2264
|
+
], 8, Za))), 128))
|
|
2265
|
+
])) : C("", !0),
|
|
2266
|
+
(_(!0), I(q, null, W(c.value, (h) => (_(), I("path", {
|
|
2268
2267
|
key: `link-ghost_${h.id}`,
|
|
2269
|
-
class:
|
|
2268
|
+
class: ne(["lume-alluvial-group__link", [
|
|
2270
2269
|
"lume-stroke--transparent",
|
|
2271
2270
|
"lume-alluvial-group__link--ghost"
|
|
2272
2271
|
]]),
|
|
2273
2272
|
d: h.d,
|
|
2274
|
-
"stroke-width": h.strokeWidth + d(
|
|
2273
|
+
"stroke-width": h.strokeWidth + d(da),
|
|
2275
2274
|
"data-j-alluvial-ghost": "",
|
|
2276
|
-
onClick: (
|
|
2277
|
-
onMouseover: (
|
|
2278
|
-
}, null, 40,
|
|
2279
|
-
(_(!0), I(
|
|
2275
|
+
onClick: (M) => o("link-click", { link: h.link, event: M }),
|
|
2276
|
+
onMouseover: (M) => J(h.link, M)
|
|
2277
|
+
}, null, 40, Ya))), 128)),
|
|
2278
|
+
(_(!0), I(q, null, W(c.value, (h) => (_(), I("path", {
|
|
2280
2279
|
key: `link_${h.id}`,
|
|
2281
|
-
class:
|
|
2280
|
+
class: ne(["lume-alluvial-group__link", {
|
|
2282
2281
|
[`lume-stroke--${h.color}`]: !d(l).gradient && h.color,
|
|
2283
|
-
"lume-alluvial-group__link--faded":
|
|
2284
|
-
"lume-alluvial-group__link--focused":
|
|
2282
|
+
"lume-alluvial-group__link--faded": U(h.id),
|
|
2283
|
+
"lume-alluvial-group__link--focused": F(h.id)
|
|
2285
2284
|
}]),
|
|
2286
2285
|
d: h.d,
|
|
2287
|
-
stroke:
|
|
2286
|
+
stroke: G(h.link),
|
|
2288
2287
|
"stroke-dasharray": k.containerSize.width,
|
|
2289
2288
|
"stroke-dashoffset": k.containerSize.width,
|
|
2290
2289
|
"stroke-width": h.strokeWidth,
|
|
2291
2290
|
"data-j-alluvial-path": "",
|
|
2292
2291
|
"data-id": h.id,
|
|
2293
|
-
onClick: (
|
|
2294
|
-
onMouseover: (
|
|
2295
|
-
}, null, 42,
|
|
2292
|
+
onClick: (M) => o("link-click", { link: h.link, event: M }),
|
|
2293
|
+
onMouseover: (M) => J(h.link, M)
|
|
2294
|
+
}, null, 42, Ka))), 128))
|
|
2296
2295
|
], 32),
|
|
2297
|
-
(_(!0), I(
|
|
2298
|
-
key: `node-block_${
|
|
2299
|
-
class:
|
|
2300
|
-
"lume-alluvial-group__node--faded":
|
|
2301
|
-
"lume-alluvial-group__node--focused":
|
|
2296
|
+
(_(!0), I(q, null, W(i.value, (h, M) => (_(), I("g", {
|
|
2297
|
+
key: `node-block_${M}`,
|
|
2298
|
+
class: ne(["lume-alluvial-group__node", {
|
|
2299
|
+
"lume-alluvial-group__node--faded": E(h.node.id),
|
|
2300
|
+
"lume-alluvial-group__node--focused": K(h.node.id)
|
|
2302
2301
|
}]),
|
|
2303
2302
|
"data-j-alluvial-group__node-block": ""
|
|
2304
2303
|
}, [
|
|
2305
|
-
|
|
2306
|
-
onClick: (
|
|
2307
|
-
onMouseenter: (
|
|
2308
|
-
onMouseleave: (
|
|
2309
|
-
onMouseover: (
|
|
2310
|
-
onMouseout:
|
|
2304
|
+
S("g", {
|
|
2305
|
+
onClick: (z) => o("node-click", { node: h.node, event: z }),
|
|
2306
|
+
onMouseenter: (z) => o("node-mouseenter", { node: h.node, event: z }),
|
|
2307
|
+
onMouseleave: (z) => o("node-mouseleave", { node: h.node, event: z }),
|
|
2308
|
+
onMouseover: (z) => p.value = h.node,
|
|
2309
|
+
onMouseout: x[0] || (x[0] = (z) => p.value = null)
|
|
2311
2310
|
}, [
|
|
2312
|
-
|
|
2311
|
+
Q(h) ? (_(!0), I(q, { key: 0 }, W(Le(
|
|
2313
2312
|
h.node.id
|
|
2314
|
-
), (
|
|
2315
|
-
key:
|
|
2313
|
+
), (z) => (_(), I("rect", j(z, {
|
|
2314
|
+
key: z.key,
|
|
2316
2315
|
"data-j-alluvial-sub-nodes": ""
|
|
2317
2316
|
}), null, 16))), 128)) : (_(), I("rect", {
|
|
2318
2317
|
key: 1,
|
|
2319
|
-
class:
|
|
2318
|
+
class: ne(["lume-alluvial-group__node-block", `lume-fill--${h.node.color || h.node.fallbackColor}`]),
|
|
2320
2319
|
x: h.x,
|
|
2321
2320
|
y: h.y,
|
|
2322
2321
|
height: h.height,
|
|
2323
2322
|
width: h.width
|
|
2324
|
-
}, null, 10,
|
|
2325
|
-
|
|
2323
|
+
}, null, 10, Qa)),
|
|
2324
|
+
S("g", {
|
|
2326
2325
|
ref_for: !0,
|
|
2327
2326
|
ref_key: "nodeTextRefs",
|
|
2328
2327
|
ref: s,
|
|
2329
|
-
class:
|
|
2328
|
+
class: ne(["lume-alluvial-group__node-text lume-typography--caption", {
|
|
2330
2329
|
"lume-alluvial-group__node-text--left": h.node.depth === 0
|
|
2331
2330
|
}]),
|
|
2332
2331
|
transform: `translate(${h.textTransform.x},${h.textTransform.y})`,
|
|
2333
2332
|
"data-id": h.node.id,
|
|
2334
2333
|
width: d(l).nodeLabelMaxWidth
|
|
2335
2334
|
}, [
|
|
2336
|
-
|
|
2335
|
+
B(k.$slots, `node-text-${h.node.id}`, {
|
|
2337
2336
|
node: h.node,
|
|
2338
2337
|
value: $.value(
|
|
2339
2338
|
h.node.transitionValue || h.node.value,
|
|
2340
2339
|
h.node.value
|
|
2341
2340
|
)
|
|
2342
2341
|
}, () => [
|
|
2343
|
-
|
|
2342
|
+
ue(d(ga), {
|
|
2344
2343
|
bottom: d(l).switchText,
|
|
2345
2344
|
left: h.node.depth === 0,
|
|
2346
2345
|
"max-width": d(l).nodeLabelMaxWidth,
|
|
2347
|
-
"onLume__internal-NodeResize":
|
|
2346
|
+
"onLume__internal-NodeResize": $e
|
|
2348
2347
|
}, {
|
|
2349
2348
|
default: V(() => [
|
|
2350
|
-
|
|
2349
|
+
ce(oe(h.node.label), 1)
|
|
2351
2350
|
]),
|
|
2352
2351
|
_: 2
|
|
2353
2352
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2354
|
-
|
|
2353
|
+
ue(d(ka), {
|
|
2355
2354
|
bottom: !d(l).switchText
|
|
2356
2355
|
}, {
|
|
2357
2356
|
default: V(() => [
|
|
2358
|
-
|
|
2357
|
+
ce(oe($.value(
|
|
2359
2358
|
h.node.transitionValue || h.node.value,
|
|
2360
2359
|
h.node.value
|
|
2361
2360
|
)), 1)
|
|
@@ -2363,12 +2362,12 @@ const za = {
|
|
|
2363
2362
|
_: 2
|
|
2364
2363
|
}, 1032, ["bottom"])
|
|
2365
2364
|
], !0)
|
|
2366
|
-
], 10,
|
|
2367
|
-
], 40,
|
|
2365
|
+
], 10, qa)
|
|
2366
|
+
], 40, Ja)
|
|
2368
2367
|
], 2))), 128))
|
|
2369
2368
|
]));
|
|
2370
2369
|
}
|
|
2371
|
-
}),
|
|
2370
|
+
}), tl = /* @__PURE__ */ ee(el, [["__scopeId", "data-v-2a790ee0"]]), nl = {
|
|
2372
2371
|
margins: {
|
|
2373
2372
|
top: 0,
|
|
2374
2373
|
right: 0,
|
|
@@ -2384,16 +2383,16 @@ const za = {
|
|
|
2384
2383
|
highlightedElements: "closest",
|
|
2385
2384
|
nodePadding: 16,
|
|
2386
2385
|
nodeWidth: 16,
|
|
2387
|
-
nodeAlign:
|
|
2386
|
+
nodeAlign: fn,
|
|
2388
2387
|
valueFormat: (e) => String(e),
|
|
2389
2388
|
iterations: 6
|
|
2390
2389
|
}, Zl = /* @__PURE__ */ Z({
|
|
2391
2390
|
__name: "lume-alluvial-diagram",
|
|
2392
2391
|
props: {
|
|
2393
|
-
...
|
|
2392
|
+
...fo(st)
|
|
2394
2393
|
},
|
|
2395
2394
|
setup(e, { emit: n }) {
|
|
2396
|
-
const t = e, { componentEventPropagator: o } =
|
|
2395
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), r = Hn(re()), { options: l } = te(t), { allOptions: i } = fe(l, nl);
|
|
2397
2396
|
function c(s) {
|
|
2398
2397
|
return {
|
|
2399
2398
|
...s,
|
|
@@ -2401,26 +2400,26 @@ const za = {
|
|
|
2401
2400
|
// Alluvial chart never uses base scales
|
|
2402
2401
|
};
|
|
2403
2402
|
}
|
|
2404
|
-
return (s,
|
|
2403
|
+
return (s, f) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2405
2404
|
options: c(d(i)),
|
|
2406
2405
|
"data-j-alluvial-diagram": ""
|
|
2407
|
-
},
|
|
2408
|
-
groups: V((
|
|
2409
|
-
|
|
2410
|
-
W(d(
|
|
2406
|
+
}, ae(d(o))), de({
|
|
2407
|
+
groups: V((u) => [
|
|
2408
|
+
ue(d(tl), j(u, { "hovered-element-id": s.hoveredElement }, ae(d(o))), de({ _: 2 }, [
|
|
2409
|
+
W(d(r), (m, y) => ({
|
|
2411
2410
|
name: y,
|
|
2412
2411
|
fn: V((p) => [
|
|
2413
|
-
|
|
2412
|
+
B(s.$slots, y, he(ge(p || {})))
|
|
2414
2413
|
])
|
|
2415
2414
|
}))
|
|
2416
2415
|
]), 1040, ["hovered-element-id"])
|
|
2417
2416
|
]),
|
|
2418
2417
|
_: 2
|
|
2419
2418
|
}, [
|
|
2420
|
-
W(d(a), (
|
|
2421
|
-
name:
|
|
2419
|
+
W(d(a), (u, m) => ({
|
|
2420
|
+
name: m,
|
|
2422
2421
|
fn: V((y) => [
|
|
2423
|
-
|
|
2422
|
+
B(s.$slots, m, he(ge(y || {})))
|
|
2424
2423
|
])
|
|
2425
2424
|
}))
|
|
2426
2425
|
]), 1040, ["options"]));
|
|
@@ -2439,73 +2438,73 @@ const Ul = /* @__PURE__ */ Z({
|
|
|
2439
2438
|
},
|
|
2440
2439
|
setup(e, { emit: n }) {
|
|
2441
2440
|
const t = Je(
|
|
2442
|
-
() => import("./
|
|
2441
|
+
() => import("./BkqRLrZG.js")
|
|
2443
2442
|
), o = Je(
|
|
2444
|
-
() => import("./
|
|
2443
|
+
() => import("./BeJM7XD3.js")
|
|
2445
2444
|
), a = Je(
|
|
2446
|
-
() => import("./
|
|
2447
|
-
),
|
|
2445
|
+
() => import("./BFctvs0x.js")
|
|
2446
|
+
), r = /* @__PURE__ */ new Map([
|
|
2448
2447
|
["single", t],
|
|
2449
2448
|
["grouped", o],
|
|
2450
2449
|
["stacked", a]
|
|
2451
|
-
]), l = e, { componentEventPropagator: i } =
|
|
2452
|
-
function s(
|
|
2450
|
+
]), l = e, { componentEventPropagator: i } = ke(), c = Te(re());
|
|
2451
|
+
function s(u) {
|
|
2453
2452
|
return {
|
|
2454
|
-
...
|
|
2453
|
+
...u,
|
|
2455
2454
|
startOnZero: !0,
|
|
2456
2455
|
// Bar chart always starts on zero,
|
|
2457
2456
|
tooltipOptions: {
|
|
2458
|
-
...(
|
|
2457
|
+
...(u == null ? void 0 : u.tooltipOptions) || {},
|
|
2459
2458
|
position: l.orientation === H.HORIZONTAL ? "right" : void 0
|
|
2460
2459
|
}
|
|
2461
2460
|
};
|
|
2462
2461
|
}
|
|
2463
|
-
const
|
|
2464
|
-
if (st(l.data)) return
|
|
2462
|
+
const f = v(() => {
|
|
2463
|
+
if (st(l.data)) return r.get("single");
|
|
2465
2464
|
if (!l.type)
|
|
2466
2465
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2467
|
-
return
|
|
2466
|
+
return r.get(l.type);
|
|
2468
2467
|
});
|
|
2469
|
-
return (
|
|
2470
|
-
options: s(
|
|
2471
|
-
},
|
|
2468
|
+
return (u, m) => (_(), Y(dn(f.value), j({ ...l, ...u.$attrs }, {
|
|
2469
|
+
options: s(u.options)
|
|
2470
|
+
}, ae(d(i))), de({ _: 2 }, [
|
|
2472
2471
|
W(d(c), (y, p) => ({
|
|
2473
2472
|
name: p,
|
|
2474
2473
|
fn: V((b) => [
|
|
2475
|
-
|
|
2474
|
+
B(u.$slots, p, he(ge(b || {})))
|
|
2476
2475
|
])
|
|
2477
2476
|
}))
|
|
2478
2477
|
]), 1040, ["options"]));
|
|
2479
2478
|
}
|
|
2480
2479
|
});
|
|
2481
|
-
function
|
|
2482
|
-
return Object.values(
|
|
2480
|
+
function ol(e) {
|
|
2481
|
+
return Object.values(Sn).includes(e) || e == null;
|
|
2483
2482
|
}
|
|
2484
|
-
function
|
|
2483
|
+
function al(e) {
|
|
2485
2484
|
return Object.values(H).includes(e);
|
|
2486
2485
|
}
|
|
2487
|
-
const
|
|
2486
|
+
const ll = (e = !1) => ({
|
|
2488
2487
|
type: {
|
|
2489
2488
|
type: String,
|
|
2490
2489
|
default: null,
|
|
2491
|
-
validator:
|
|
2490
|
+
validator: ol
|
|
2492
2491
|
},
|
|
2493
2492
|
...e ? {
|
|
2494
2493
|
orientation: {
|
|
2495
2494
|
type: String,
|
|
2496
2495
|
default: H.VERTICAL,
|
|
2497
|
-
validator:
|
|
2496
|
+
validator: al
|
|
2498
2497
|
}
|
|
2499
2498
|
} : {}
|
|
2500
2499
|
});
|
|
2501
2500
|
function on(e, n) {
|
|
2502
2501
|
const t = v(() => e.value.map((a) => {
|
|
2503
|
-
var
|
|
2502
|
+
var r;
|
|
2504
2503
|
return {
|
|
2505
2504
|
...a,
|
|
2506
2505
|
values: ct(
|
|
2507
2506
|
a.values,
|
|
2508
|
-
((
|
|
2507
|
+
((r = n == null ? void 0 : n.value) == null ? void 0 : r.length) ?? 0
|
|
2509
2508
|
).map((l) => ({
|
|
2510
2509
|
...l,
|
|
2511
2510
|
value: (l == null ? void 0 : l.value) || 0
|
|
@@ -2513,50 +2512,50 @@ function on(e, n) {
|
|
|
2513
2512
|
};
|
|
2514
2513
|
})), o = v(() => {
|
|
2515
2514
|
var a;
|
|
2516
|
-
return (a = t.value) == null ? void 0 : a.reduce((
|
|
2517
|
-
|
|
2518
|
-
}),
|
|
2515
|
+
return (a = t.value) == null ? void 0 : a.reduce((r, l) => (l.values.forEach((i, c) => {
|
|
2516
|
+
r[c] ? r[c].push(i) : r[c] = [i];
|
|
2517
|
+
}), r), []);
|
|
2519
2518
|
});
|
|
2520
2519
|
return { multiBarData: t, groupedData: o };
|
|
2521
2520
|
}
|
|
2522
2521
|
function rl(e, n) {
|
|
2523
2522
|
return e.value.length === 1 ? "single" : n.value;
|
|
2524
2523
|
}
|
|
2525
|
-
function
|
|
2524
|
+
function ul(e, n, t) {
|
|
2526
2525
|
const o = v(
|
|
2527
2526
|
() => t.value === H.HORIZONTAL
|
|
2528
2527
|
);
|
|
2529
2528
|
function a(i) {
|
|
2530
|
-
i ||
|
|
2529
|
+
i || rt(Pe.BarScaleNull), Math.min(...i.domain()) > 0 && rt(Pe.BarScaleDomainAbove0);
|
|
2531
2530
|
}
|
|
2532
|
-
const
|
|
2533
|
-
return { barXScale:
|
|
2531
|
+
const r = v(() => o.value ? (a(e.value), e.value) : e.value), l = v(() => o.value ? n.value : (a(n.value), n.value));
|
|
2532
|
+
return { barXScale: r, barYScale: l };
|
|
2534
2533
|
}
|
|
2535
|
-
const
|
|
2534
|
+
const il = {
|
|
2536
2535
|
x: 0,
|
|
2537
2536
|
y: 0,
|
|
2538
2537
|
width: 0,
|
|
2539
2538
|
height: 0
|
|
2540
2539
|
};
|
|
2541
|
-
function
|
|
2540
|
+
function sl(e, n, t, o, a, r) {
|
|
2542
2541
|
const l = v(
|
|
2543
2542
|
() => o.value === H.HORIZONTAL
|
|
2544
2543
|
);
|
|
2545
|
-
function i(
|
|
2544
|
+
function i(u, m) {
|
|
2546
2545
|
let y, p;
|
|
2547
|
-
return l.value ? (y =
|
|
2546
|
+
return l.value ? (y = u >= 0 ? n.value(0) : n.value(u), p = t.value(t.value.domain()[m])) : (y = n.value(n.value.domain()[m]), p = u < 0 ? t.value(0) : t.value(u)), { x: y, y: p };
|
|
2548
2547
|
}
|
|
2549
|
-
function c(
|
|
2550
|
-
return l.value ?
|
|
2548
|
+
function c(u) {
|
|
2549
|
+
return l.value ? u < 0 ? n.value(0) - n.value(u) : n.value(u) - n.value(0) : n.value.bandwidth();
|
|
2551
2550
|
}
|
|
2552
|
-
function s(
|
|
2553
|
-
return l.value ? t.value.bandwidth() :
|
|
2551
|
+
function s(u) {
|
|
2552
|
+
return l.value ? t.value.bandwidth() : u < 0 ? t.value(u) - t.value(0) : t.value(0) - t.value(u);
|
|
2554
2553
|
}
|
|
2555
|
-
function
|
|
2556
|
-
if (!(n.value && t.value)) return
|
|
2557
|
-
const { value: b, color: $ } =
|
|
2554
|
+
function f(u, m, y) {
|
|
2555
|
+
if (!(n.value && t.value)) return il;
|
|
2556
|
+
const { value: b, color: $ } = u, L = $ ?? e.value[m].color ?? Ge, { x: g, y: O } = i(b, y), N = c(b), D = s(b);
|
|
2558
2557
|
return {
|
|
2559
|
-
classList: [`lume-fill--${L}`, ...
|
|
2558
|
+
classList: [`lume-fill--${L}`, ...r],
|
|
2560
2559
|
x: g,
|
|
2561
2560
|
y: O,
|
|
2562
2561
|
width: N,
|
|
@@ -2565,92 +2564,92 @@ function cl(e, n, t, o, a, u) {
|
|
|
2565
2564
|
isNegative: b < 0
|
|
2566
2565
|
};
|
|
2567
2566
|
}
|
|
2568
|
-
return { barAttributeGenerator:
|
|
2567
|
+
return { barAttributeGenerator: f };
|
|
2569
2568
|
}
|
|
2570
|
-
const
|
|
2569
|
+
const cl = {
|
|
2571
2570
|
x: 0,
|
|
2572
2571
|
y: 0,
|
|
2573
2572
|
width: 0,
|
|
2574
2573
|
height: 0
|
|
2575
2574
|
};
|
|
2576
|
-
function
|
|
2575
|
+
function dl(e, n, t, o, a, r) {
|
|
2577
2576
|
const l = v(
|
|
2578
2577
|
() => o.value === H.HORIZONTAL
|
|
2579
|
-
), i = v(() =>
|
|
2578
|
+
), i = v(() => Me().domain(e.value.map((p, b) => b)).range([0, n.value.bandwidth()]).padding(0)), c = v(() => Me().domain(e.value.map((p, b) => b)).range([0, t.value.bandwidth()]).padding(0));
|
|
2580
2579
|
function s(p, b, $) {
|
|
2581
2580
|
if (l.value)
|
|
2582
2581
|
return p >= 0 ? n.value(0) : n.value(p);
|
|
2583
2582
|
const L = n.value.domain();
|
|
2584
2583
|
return n.value(L[b]) + i.value($);
|
|
2585
2584
|
}
|
|
2586
|
-
function
|
|
2585
|
+
function f(p, b, $) {
|
|
2587
2586
|
if (l.value) {
|
|
2588
2587
|
const L = t.value.domain();
|
|
2589
2588
|
return t.value(L[b]) + c.value($);
|
|
2590
2589
|
}
|
|
2591
2590
|
return p < 0 ? t.value(0) : t.value(p);
|
|
2592
2591
|
}
|
|
2593
|
-
function
|
|
2592
|
+
function u(p) {
|
|
2594
2593
|
return l.value ? p < 0 ? n.value(0) - n.value(p) : n.value(p) - n.value(0) : i.value.bandwidth();
|
|
2595
2594
|
}
|
|
2596
|
-
function
|
|
2595
|
+
function m(p) {
|
|
2597
2596
|
return l.value ? c.value.bandwidth() : p < 0 ? t.value(p) - t.value(0) : t.value(0) - t.value(p);
|
|
2598
2597
|
}
|
|
2599
2598
|
function y(p, b, $) {
|
|
2600
|
-
if (!(n.value && t.value)) return
|
|
2601
|
-
const { value: g, color: O } = p, N = O ?? e.value[b].color ?? Object.values(ie)[b], D = s(g, $, b), P =
|
|
2599
|
+
if (!(n.value && t.value)) return cl;
|
|
2600
|
+
const { value: g, color: O } = p, N = O ?? e.value[b].color ?? Object.values(ie)[b], D = s(g, $, b), P = f(g, $, b), G = u(g), E = m(g);
|
|
2602
2601
|
return {
|
|
2603
|
-
classList: [`lume-fill--${N}`, ...
|
|
2602
|
+
classList: [`lume-fill--${N}`, ...r],
|
|
2604
2603
|
x: D,
|
|
2605
2604
|
y: P,
|
|
2606
|
-
width:
|
|
2607
|
-
height:
|
|
2605
|
+
width: G,
|
|
2606
|
+
height: E,
|
|
2608
2607
|
isFaded: a.value !== -1 && a.value !== $,
|
|
2609
2608
|
isNegative: g < 0
|
|
2610
2609
|
};
|
|
2611
2610
|
}
|
|
2612
2611
|
return { barAttributeGenerator: y };
|
|
2613
2612
|
}
|
|
2614
|
-
function
|
|
2613
|
+
function vl(e, n, t) {
|
|
2615
2614
|
const o = v(
|
|
2616
2615
|
() => n.value === H.HORIZONTAL
|
|
2617
2616
|
), a = v(() => {
|
|
2618
2617
|
const c = e.value.map(
|
|
2619
|
-
(s) => s.filter((
|
|
2618
|
+
(s) => s.filter((f) => f.value < 0).reduce((f, u) => f + u.value, 0)
|
|
2620
2619
|
);
|
|
2621
2620
|
return Math.min(...c);
|
|
2622
|
-
}),
|
|
2621
|
+
}), r = v(() => {
|
|
2623
2622
|
const c = e.value.map(
|
|
2624
2623
|
(s) => s.reduce(
|
|
2625
|
-
(
|
|
2624
|
+
(f, u) => u.value >= 0 ? f + u.value : f,
|
|
2626
2625
|
0
|
|
2627
2626
|
)
|
|
2628
2627
|
);
|
|
2629
2628
|
return Math.max(...c);
|
|
2630
2629
|
});
|
|
2631
|
-
function l(c, s,
|
|
2632
|
-
return s.length ? o.value ?
|
|
2630
|
+
function l(c, s, f) {
|
|
2631
|
+
return s.length ? o.value ? Be().domain([a.value, r.value]).range([0, f.width]) : Object.assign(
|
|
2633
2632
|
Et(
|
|
2634
|
-
|
|
2633
|
+
Me().domain(s.map((u, m) => m)).range([0, f.width]),
|
|
2635
2634
|
n.value,
|
|
2636
2635
|
t.value
|
|
2637
2636
|
),
|
|
2638
2637
|
{ labels: s }
|
|
2639
2638
|
) : null;
|
|
2640
2639
|
}
|
|
2641
|
-
function i(c, s,
|
|
2640
|
+
function i(c, s, f) {
|
|
2642
2641
|
return s.length ? o.value ? Object.assign(
|
|
2643
2642
|
Et(
|
|
2644
|
-
|
|
2643
|
+
Me().domain(s.map((u, m) => m)).range([0, f.height]),
|
|
2645
2644
|
n.value,
|
|
2646
2645
|
t.value
|
|
2647
2646
|
),
|
|
2648
2647
|
{ labels: s }
|
|
2649
|
-
) :
|
|
2648
|
+
) : Be().domain([r.value, a.value]).range([0, f.height]) : null;
|
|
2650
2649
|
}
|
|
2651
2650
|
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2652
2651
|
}
|
|
2653
|
-
function ml(e, n, t, o, a,
|
|
2652
|
+
function ml(e, n, t, o, a, r) {
|
|
2654
2653
|
const l = v(
|
|
2655
2654
|
() => o.value === H.HORIZONTAL
|
|
2656
2655
|
), i = v(
|
|
@@ -2662,13 +2661,13 @@ function ml(e, n, t, o, a, u) {
|
|
|
2662
2661
|
let N, D;
|
|
2663
2662
|
return l.value ? (N = n.value(L >= 0 ? 0 + O : L + O), D = t.value(i.value[g])) : (N = n.value(i.value[g]), D = t.value(L >= 0 ? L + O : 0 + O)), { x: N, y: D };
|
|
2664
2663
|
}
|
|
2665
|
-
function
|
|
2664
|
+
function f(L) {
|
|
2666
2665
|
return l.value ? n.value(L) - n.value(0) : n.value.bandwidth();
|
|
2667
2666
|
}
|
|
2668
|
-
function
|
|
2667
|
+
function u(L) {
|
|
2669
2668
|
return l.value ? n.value(0) - n.value(L) : n.value.bandwidth();
|
|
2670
2669
|
}
|
|
2671
|
-
function
|
|
2670
|
+
function m(L) {
|
|
2672
2671
|
return l.value ? t.value.bandwidth() : t.value(0) - t.value(L);
|
|
2673
2672
|
}
|
|
2674
2673
|
function y(L) {
|
|
@@ -2681,25 +2680,25 @@ function ml(e, n, t, o, a, u) {
|
|
|
2681
2680
|
return L ? c.value.reduce((O, N, D) => (D < L && N[g] < 0 && (O += N[g]), O), 0) : 0;
|
|
2682
2681
|
}
|
|
2683
2682
|
function $(L, g, O) {
|
|
2684
|
-
const { value: N, color: D } = L, P = N >= 0 ?
|
|
2683
|
+
const { value: N, color: D } = L, P = N >= 0 ? f(N) : u(N), G = N >= 0 ? m(N) : y(N), E = N >= 0 ? p(g, O) : b(g, O), { x: K, y: U } = s(N, O, E);
|
|
2685
2684
|
return {
|
|
2686
|
-
classList: [`lume-fill--${D ?? e.value[g].color ?? Object.values(ie)[g]}`, ...
|
|
2685
|
+
classList: [`lume-fill--${D ?? e.value[g].color ?? Object.values(ie)[g]}`, ...r],
|
|
2687
2686
|
width: P,
|
|
2688
|
-
height:
|
|
2689
|
-
x:
|
|
2690
|
-
y:
|
|
2687
|
+
height: G,
|
|
2688
|
+
x: K,
|
|
2689
|
+
y: U,
|
|
2691
2690
|
isFaded: a.value !== -1 && a.value !== O,
|
|
2692
2691
|
isNegative: N < 0
|
|
2693
2692
|
};
|
|
2694
2693
|
}
|
|
2695
2694
|
return { barAttributeGenerator: $ };
|
|
2696
2695
|
}
|
|
2697
|
-
const
|
|
2696
|
+
const fl = {
|
|
2698
2697
|
class: "lume-bar-group",
|
|
2699
2698
|
"data-j-bars-group": ""
|
|
2700
|
-
},
|
|
2701
|
-
single:
|
|
2702
|
-
grouped:
|
|
2699
|
+
}, pl = ["onMouseenter"], hl = {
|
|
2700
|
+
single: sl,
|
|
2701
|
+
grouped: dl,
|
|
2703
2702
|
stacked: ml
|
|
2704
2703
|
}, yt = /* @__PURE__ */ Z({
|
|
2705
2704
|
__name: "lume-bar-group",
|
|
@@ -2709,7 +2708,7 @@ const pl = {
|
|
|
2709
2708
|
type: [String, Array],
|
|
2710
2709
|
default: () => []
|
|
2711
2710
|
},
|
|
2712
|
-
...
|
|
2711
|
+
...ll(!0),
|
|
2713
2712
|
transition: {
|
|
2714
2713
|
type: Boolean,
|
|
2715
2714
|
default: !0
|
|
@@ -2719,23 +2718,23 @@ const pl = {
|
|
|
2719
2718
|
setup(e, { emit: n }) {
|
|
2720
2719
|
const t = e, o = n, {
|
|
2721
2720
|
data: a,
|
|
2722
|
-
hoveredIndex:
|
|
2721
|
+
hoveredIndex: r,
|
|
2723
2722
|
orientation: l,
|
|
2724
2723
|
transition: i,
|
|
2725
2724
|
type: c,
|
|
2726
2725
|
xScale: s,
|
|
2727
|
-
yScale:
|
|
2728
|
-
classList:
|
|
2729
|
-
labels:
|
|
2730
|
-
} =
|
|
2731
|
-
|
|
2732
|
-
const { emitInternalEvent: y } =
|
|
2733
|
-
const D = rl(a, c), { barAttributeGenerator: P } =
|
|
2726
|
+
yScale: f,
|
|
2727
|
+
classList: u,
|
|
2728
|
+
labels: m
|
|
2729
|
+
} = te(t);
|
|
2730
|
+
Fe("chartID");
|
|
2731
|
+
const { emitInternalEvent: y } = ke(), { groupedData: p } = on(a, m), { barXScale: b, barYScale: $ } = ul(s, f, l), L = v(() => typeof u.value == "string" ? [u.value] : u.value), g = v(() => {
|
|
2732
|
+
const D = rl(a, c), { barAttributeGenerator: P } = hl[D](
|
|
2734
2733
|
a,
|
|
2735
2734
|
b,
|
|
2736
2735
|
$,
|
|
2737
2736
|
l,
|
|
2738
|
-
|
|
2737
|
+
r,
|
|
2739
2738
|
L.value
|
|
2740
2739
|
);
|
|
2741
2740
|
return P;
|
|
@@ -2746,36 +2745,36 @@ const pl = {
|
|
|
2746
2745
|
async function N(D) {
|
|
2747
2746
|
o("lume__internal--hover", D), y("lume__internal--hover", D);
|
|
2748
2747
|
}
|
|
2749
|
-
return (D, P) => (_(), I("g",
|
|
2750
|
-
(_(!0), I(
|
|
2751
|
-
key:
|
|
2752
|
-
onMouseenter: (
|
|
2748
|
+
return (D, P) => (_(), I("g", fl, [
|
|
2749
|
+
(_(!0), I(q, null, W(d(p), (G, E) => (_(), I("g", {
|
|
2750
|
+
key: E,
|
|
2751
|
+
onMouseenter: (K) => N(E)
|
|
2753
2752
|
}, [
|
|
2754
|
-
(_(!0), I(
|
|
2755
|
-
key: `bar-${
|
|
2753
|
+
(_(!0), I(q, null, W(G, (K, U) => (_(), Y(d(dt), j(g.value(K, U, E, G), {
|
|
2754
|
+
key: `bar-${U}`,
|
|
2756
2755
|
transition: O.value,
|
|
2757
2756
|
"data-j-lume-bar": "",
|
|
2758
|
-
onClick: (
|
|
2759
|
-
index:
|
|
2760
|
-
datasetIndex:
|
|
2761
|
-
event:
|
|
2757
|
+
onClick: (F) => o("bar-click", {
|
|
2758
|
+
index: E,
|
|
2759
|
+
datasetIndex: U,
|
|
2760
|
+
event: F
|
|
2762
2761
|
})
|
|
2763
2762
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2764
|
-
], 40,
|
|
2763
|
+
], 40, pl))), 128))
|
|
2765
2764
|
]));
|
|
2766
2765
|
}
|
|
2767
|
-
}),
|
|
2766
|
+
}), gl = {
|
|
2768
2767
|
[H.VERTICAL]: {
|
|
2769
2768
|
withTooltip: !0,
|
|
2770
2769
|
xAxisOptions: {},
|
|
2771
2770
|
yAxisOptions: { gridLines: !0 },
|
|
2772
|
-
margins:
|
|
2771
|
+
margins: Ae.VERTICAL
|
|
2773
2772
|
},
|
|
2774
2773
|
[H.HORIZONTAL]: {
|
|
2775
2774
|
withTooltip: !0,
|
|
2776
2775
|
xAxisOptions: { gridLines: !0 },
|
|
2777
2776
|
yAxisOptions: { gridLines: !1 },
|
|
2778
|
-
margins:
|
|
2777
|
+
margins: Ae.HORIZONTAL
|
|
2779
2778
|
}
|
|
2780
2779
|
}, Xl = /* @__PURE__ */ Z({
|
|
2781
2780
|
__name: "lume-single-bar-chart",
|
|
@@ -2783,40 +2782,40 @@ const pl = {
|
|
|
2783
2782
|
...we(st)
|
|
2784
2783
|
},
|
|
2785
2784
|
setup(e, { emit: n }) {
|
|
2786
|
-
const t = e, { componentEventPropagator: o } =
|
|
2787
|
-
() =>
|
|
2785
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { orientation: r, options: l } = te(t), i = v(
|
|
2786
|
+
() => gl[r.value || H.VERTICAL]
|
|
2788
2787
|
// needs to be computed so that default options are reactive
|
|
2789
2788
|
), { allOptions: c } = fe(l, i);
|
|
2790
|
-
return (s,
|
|
2789
|
+
return (s, f) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2791
2790
|
"chart-type": "single-bar",
|
|
2792
2791
|
options: d(c),
|
|
2793
2792
|
"data-j-single-bar-chart": ""
|
|
2794
|
-
},
|
|
2795
|
-
groups: V((
|
|
2796
|
-
|
|
2793
|
+
}, ae(d(o))), de({
|
|
2794
|
+
groups: V((u) => [
|
|
2795
|
+
ue(d(yt), j(u, { orientation: d(r) }, ae(d(o))), null, 16, ["orientation"])
|
|
2797
2796
|
]),
|
|
2798
2797
|
_: 2
|
|
2799
2798
|
}, [
|
|
2800
|
-
W(d(a), (
|
|
2801
|
-
name:
|
|
2799
|
+
W(d(a), (u, m) => ({
|
|
2800
|
+
name: m,
|
|
2802
2801
|
fn: V((y) => [
|
|
2803
|
-
|
|
2802
|
+
B(s.$slots, m, he(ge(y || {})))
|
|
2804
2803
|
])
|
|
2805
2804
|
}))
|
|
2806
2805
|
]), 1040, ["options"]));
|
|
2807
2806
|
}
|
|
2808
|
-
}),
|
|
2807
|
+
}), yl = {
|
|
2809
2808
|
[H.VERTICAL]: {
|
|
2810
2809
|
withTooltip: !0,
|
|
2811
2810
|
xAxisOptions: {},
|
|
2812
2811
|
yAxisOptions: { gridLines: !0 },
|
|
2813
|
-
margins:
|
|
2812
|
+
margins: Ae.VERTICAL
|
|
2814
2813
|
},
|
|
2815
2814
|
[H.HORIZONTAL]: {
|
|
2816
2815
|
withTooltip: !0,
|
|
2817
2816
|
xAxisOptions: { gridLines: !0 },
|
|
2818
2817
|
yAxisOptions: { gridLines: !1 },
|
|
2819
|
-
margins:
|
|
2818
|
+
margins: Ae.HORIZONTAL,
|
|
2820
2819
|
tooltipOptions: { position: "right" }
|
|
2821
2820
|
}
|
|
2822
2821
|
}, Yl = /* @__PURE__ */ Z({
|
|
@@ -2825,44 +2824,44 @@ const pl = {
|
|
|
2825
2824
|
...we()
|
|
2826
2825
|
},
|
|
2827
2826
|
setup(e, { emit: n }) {
|
|
2828
|
-
const t = e, { componentEventPropagator: o } =
|
|
2829
|
-
() =>
|
|
2827
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { orientation: r, options: l } = te(t), i = v(
|
|
2828
|
+
() => yl[r.value || H.VERTICAL]
|
|
2830
2829
|
// needs to be computed so that default options are reactive
|
|
2831
2830
|
), { allOptions: c } = fe(
|
|
2832
2831
|
l,
|
|
2833
2832
|
i
|
|
2834
2833
|
);
|
|
2835
|
-
return (s,
|
|
2834
|
+
return (s, f) => (_(), Y(d(xe), j({ ...t, ...s.$attrs }, {
|
|
2836
2835
|
"chart-type": "grouped-bar",
|
|
2837
2836
|
options: d(c),
|
|
2838
2837
|
"data-j-grouped-bar-chart": ""
|
|
2839
|
-
},
|
|
2840
|
-
groups: V((
|
|
2841
|
-
|
|
2838
|
+
}, ae(d(o))), de({
|
|
2839
|
+
groups: V((u) => [
|
|
2840
|
+
ue(d(yt), j(u, { type: "grouped" }, ae(d(o))), null, 16)
|
|
2842
2841
|
]),
|
|
2843
2842
|
_: 2
|
|
2844
2843
|
}, [
|
|
2845
|
-
W(d(a), (
|
|
2846
|
-
name:
|
|
2844
|
+
W(d(a), (u, m) => ({
|
|
2845
|
+
name: m,
|
|
2847
2846
|
fn: V((y) => [
|
|
2848
|
-
|
|
2847
|
+
B(s.$slots, m, he(ge(y || {})))
|
|
2849
2848
|
])
|
|
2850
2849
|
}))
|
|
2851
2850
|
]), 1040, ["options"]));
|
|
2852
2851
|
}
|
|
2853
|
-
}),
|
|
2852
|
+
}), _l = {
|
|
2854
2853
|
[H.VERTICAL]: {
|
|
2855
2854
|
withTooltip: !0,
|
|
2856
2855
|
xAxisOptions: {},
|
|
2857
2856
|
yAxisOptions: { gridLines: !0 },
|
|
2858
|
-
margins:
|
|
2857
|
+
margins: Ae.VERTICAL,
|
|
2859
2858
|
tooltipOptions: { inverse: !0 }
|
|
2860
2859
|
},
|
|
2861
2860
|
[H.HORIZONTAL]: {
|
|
2862
2861
|
withTooltip: !0,
|
|
2863
2862
|
xAxisOptions: { gridLines: !0 },
|
|
2864
2863
|
yAxisOptions: { gridLines: !1 },
|
|
2865
|
-
margins:
|
|
2864
|
+
margins: Ae.HORIZONTAL,
|
|
2866
2865
|
tooltipOptions: { position: "right" }
|
|
2867
2866
|
}
|
|
2868
2867
|
}, Kl = /* @__PURE__ */ Z({
|
|
@@ -2871,38 +2870,38 @@ const pl = {
|
|
|
2871
2870
|
...we()
|
|
2872
2871
|
},
|
|
2873
2872
|
setup(e, { emit: n }) {
|
|
2874
|
-
const t = e, { componentEventPropagator: o } =
|
|
2875
|
-
() =>
|
|
2873
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { data: r, orientation: l, options: i, labels: c } = te(t), s = v(
|
|
2874
|
+
() => _l[l.value || H.VERTICAL]
|
|
2876
2875
|
// needs to be computed so that default options are reactive
|
|
2877
|
-
), { allOptions:
|
|
2876
|
+
), { allOptions: f } = fe(
|
|
2878
2877
|
i,
|
|
2879
2878
|
s
|
|
2880
|
-
), { internalData:
|
|
2881
|
-
|
|
2879
|
+
), { internalData: u } = ht(r), { groupedData: m } = on(u, c), { stackedXScaleGenerator: y, stackedYScaleGenerator: p } = vl(
|
|
2880
|
+
m,
|
|
2882
2881
|
l,
|
|
2883
2882
|
i
|
|
2884
2883
|
), b = v(() => t.xScale || y), $ = v(() => t.yScale || p);
|
|
2885
|
-
return (L, g) => (_(), Y(d(
|
|
2884
|
+
return (L, g) => (_(), Y(d(xe), j({ ...t, ...L.$attrs }, {
|
|
2886
2885
|
"chart-type": "stacked-bar",
|
|
2887
|
-
options: d(
|
|
2886
|
+
options: d(f),
|
|
2888
2887
|
"x-scale": b.value,
|
|
2889
2888
|
"y-scale": $.value,
|
|
2890
2889
|
"data-j-stacked-bar-chart": ""
|
|
2891
|
-
},
|
|
2890
|
+
}, ae(d(o))), de({
|
|
2892
2891
|
groups: V((O) => [
|
|
2893
|
-
|
|
2892
|
+
ue(d(yt), j(O, { type: "stacked" }, ae(d(o))), null, 16)
|
|
2894
2893
|
]),
|
|
2895
2894
|
_: 2
|
|
2896
2895
|
}, [
|
|
2897
2896
|
W(d(a), (O, N) => ({
|
|
2898
2897
|
name: N,
|
|
2899
2898
|
fn: V((D) => [
|
|
2900
|
-
|
|
2899
|
+
B(L.$slots, N, he(ge(D || {})))
|
|
2901
2900
|
])
|
|
2902
2901
|
}))
|
|
2903
2902
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2904
2903
|
}
|
|
2905
|
-
}),
|
|
2904
|
+
}), kl = ["d", "stroke-width"], bl = 2, Al = /* @__PURE__ */ Z({
|
|
2906
2905
|
__name: "lume-line",
|
|
2907
2906
|
props: {
|
|
2908
2907
|
pathDefinition: {
|
|
@@ -2911,7 +2910,7 @@ const pl = {
|
|
|
2911
2910
|
},
|
|
2912
2911
|
width: {
|
|
2913
2912
|
type: Number,
|
|
2914
|
-
default:
|
|
2913
|
+
default: bl
|
|
2915
2914
|
},
|
|
2916
2915
|
color: {
|
|
2917
2916
|
type: String,
|
|
@@ -2936,11 +2935,11 @@ const pl = {
|
|
|
2936
2935
|
},
|
|
2937
2936
|
emits: ["click"],
|
|
2938
2937
|
setup(e, { emit: n }) {
|
|
2939
|
-
const t = n, o =
|
|
2940
|
-
return
|
|
2938
|
+
const t = n, o = R(null);
|
|
2939
|
+
return _e(() => ze(o.value)), (a, r) => (_(), I("path", {
|
|
2941
2940
|
ref_key: "root",
|
|
2942
2941
|
ref: o,
|
|
2943
|
-
class:
|
|
2942
|
+
class: ne(["lume-line", {
|
|
2944
2943
|
[`lume-stroke--${e.color}`]: !0,
|
|
2945
2944
|
"lume-line--dashed": e.dashed,
|
|
2946
2945
|
"lume-line--transition": e.transition
|
|
@@ -2952,88 +2951,87 @@ const pl = {
|
|
|
2952
2951
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2953
2952
|
}),
|
|
2954
2953
|
"data-j-line": "",
|
|
2955
|
-
onClick:
|
|
2956
|
-
}, null, 14,
|
|
2954
|
+
onClick: r[0] || (r[0] = (l) => t("click", l))
|
|
2955
|
+
}, null, 14, kl));
|
|
2957
2956
|
}
|
|
2958
|
-
}),
|
|
2957
|
+
}), Tl = /* @__PURE__ */ ee(Al, [["__scopeId", "data-v-59449838"]]), Ll = ["cx", "cy", "r", "stroke-width"], $l = 4, Ol = 3, Il = /* @__PURE__ */ Z({
|
|
2959
2958
|
__name: "lume-point",
|
|
2960
2959
|
props: {
|
|
2961
|
-
x: {
|
|
2962
|
-
y: {
|
|
2963
|
-
color: {
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
}
|
|
2967
|
-
radius: {
|
|
2968
|
-
type: Number,
|
|
2969
|
-
default: Ol
|
|
2970
|
-
},
|
|
2971
|
-
active: {
|
|
2972
|
-
type: Boolean,
|
|
2973
|
-
default: !1
|
|
2974
|
-
}
|
|
2960
|
+
x: {},
|
|
2961
|
+
y: {},
|
|
2962
|
+
color: { default: ie.Skyblue },
|
|
2963
|
+
radius: { default: $l },
|
|
2964
|
+
active: { type: Boolean, default: !1 },
|
|
2965
|
+
visible: { type: Boolean, default: !1 }
|
|
2975
2966
|
},
|
|
2976
2967
|
emits: ["click"],
|
|
2977
2968
|
setup(e, { emit: n }) {
|
|
2978
|
-
const t = e, o = n, a =
|
|
2979
|
-
return
|
|
2969
|
+
const t = e, o = n, a = R(null), r = v(() => t.radius / 2), l = v(() => t.active ? t.radius : t.visible ? Ol : 0);
|
|
2970
|
+
return _e(() => ze(a.value)), (i, c) => (_(), I("circle", {
|
|
2980
2971
|
ref_key: "root",
|
|
2981
2972
|
ref: a,
|
|
2982
|
-
class:
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2973
|
+
class: ne(["lume-point", {
|
|
2974
|
+
[`lume-stroke--${i.color}`]: !0,
|
|
2975
|
+
"lume-point--active": i.active,
|
|
2976
|
+
[`lume-point--visible lume-fill--${i.color}`]: i.visible
|
|
2977
|
+
}]),
|
|
2978
|
+
cx: i.x,
|
|
2979
|
+
cy: i.y,
|
|
2980
|
+
r: l.value,
|
|
2981
|
+
"stroke-width": r.value,
|
|
2987
2982
|
"data-j-point": "",
|
|
2988
|
-
onClick:
|
|
2989
|
-
}, null, 10,
|
|
2983
|
+
onClick: c[0] || (c[0] = (s) => o("click", s))
|
|
2984
|
+
}, null, 10, Ll));
|
|
2990
2985
|
}
|
|
2991
|
-
}),
|
|
2986
|
+
}), wl = /* @__PURE__ */ ee(Il, [["__scopeId", "data-v-080270c0"]]);
|
|
2992
2987
|
function an(e) {
|
|
2993
|
-
function n(
|
|
2988
|
+
function n(r) {
|
|
2994
2989
|
let l = null;
|
|
2995
|
-
return
|
|
2990
|
+
return r == null ? void 0 : r.reduce((i, c, s) => (c == null || c.value == null ? (l ? l.push(s) : l = [s], s === (r == null ? void 0 : r.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2996
2991
|
}
|
|
2997
|
-
function t(
|
|
2998
|
-
const
|
|
2999
|
-
return
|
|
2992
|
+
function t(r, l, i, c) {
|
|
2993
|
+
const u = Math.abs(r - l) / (i + 1) * (c + 1);
|
|
2994
|
+
return r == null && l == null ? null : r > l ? r - u : r + u;
|
|
3000
2995
|
}
|
|
3001
|
-
function o(
|
|
2996
|
+
function o(r) {
|
|
3002
2997
|
return function(i) {
|
|
3003
|
-
return !!
|
|
2998
|
+
return !!r.find(
|
|
3004
2999
|
(c) => c.includes(i) || c.includes(i - 1)
|
|
3005
3000
|
);
|
|
3006
3001
|
};
|
|
3007
3002
|
}
|
|
3008
|
-
return { computedLineData: v(
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3003
|
+
return { computedLineData: v(
|
|
3004
|
+
() => e.value.map((r) => {
|
|
3005
|
+
const l = n(r.values);
|
|
3006
|
+
return {
|
|
3007
|
+
...r,
|
|
3008
|
+
isDashed: o(l),
|
|
3009
|
+
values: r.values.map((i, c) => {
|
|
3010
|
+
var f, u;
|
|
3011
|
+
const s = l.find(
|
|
3012
|
+
(m) => m.includes(c)
|
|
3013
|
+
);
|
|
3014
|
+
if (s) {
|
|
3015
|
+
const m = s[0] - 1, y = s[s.length - 1] + 1;
|
|
3016
|
+
let p = (f = r.values[m]) == null ? void 0 : f.value, b = (u = r.values[y]) == null ? void 0 : u.value;
|
|
3017
|
+
return p == null && (p = b), b == null && (b = p), {
|
|
3018
|
+
value: t(
|
|
3019
|
+
p,
|
|
3020
|
+
b,
|
|
3021
|
+
s.length,
|
|
3022
|
+
s.indexOf(c)
|
|
3023
|
+
),
|
|
3024
|
+
label: Zt,
|
|
3025
|
+
isNull: !0
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
3028
|
+
return i;
|
|
3029
|
+
})
|
|
3030
|
+
};
|
|
3031
|
+
})
|
|
3032
|
+
) };
|
|
3035
3033
|
}
|
|
3036
|
-
function
|
|
3034
|
+
function xl(e, n) {
|
|
3037
3035
|
const t = e.bandwidth() / 2;
|
|
3038
3036
|
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
3039
3037
|
}
|
|
@@ -3042,9 +3040,9 @@ function El(e, n) {
|
|
|
3042
3040
|
}
|
|
3043
3041
|
function Nl(e, n, t, o) {
|
|
3044
3042
|
const a = yn().x(
|
|
3045
|
-
|
|
3046
|
-
).y((
|
|
3047
|
-
return n.every((
|
|
3043
|
+
ve(t) ? xl(t, e) : El(t, e)
|
|
3044
|
+
).y((r) => o(r));
|
|
3045
|
+
return n.every((r) => r == null) ? null : a(n);
|
|
3048
3046
|
}
|
|
3049
3047
|
const Dl = {
|
|
3050
3048
|
class: "lume-line-group",
|
|
@@ -3058,7 +3056,7 @@ const Dl = {
|
|
|
3058
3056
|
props: {
|
|
3059
3057
|
...We(),
|
|
3060
3058
|
withPoints: {
|
|
3061
|
-
type: Boolean,
|
|
3059
|
+
type: [Boolean, String],
|
|
3062
3060
|
default: !0
|
|
3063
3061
|
},
|
|
3064
3062
|
transition: {
|
|
@@ -3068,29 +3066,29 @@ const Dl = {
|
|
|
3068
3066
|
},
|
|
3069
3067
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3070
3068
|
setup(e, { emit: n }) {
|
|
3071
|
-
const t = e, o = n, { data: a, options:
|
|
3069
|
+
const t = e, o = n, { data: a, options: r, xScale: l, yScale: i, labels: c } = te(t), s = Fe(
|
|
3072
3070
|
"tooltipAnchorAttributes",
|
|
3073
3071
|
null
|
|
3074
|
-
), { updateTooltipAnchorAttributes:
|
|
3072
|
+
), { updateTooltipAnchorAttributes: f } = en(
|
|
3075
3073
|
s,
|
|
3076
|
-
|
|
3074
|
+
r,
|
|
3077
3075
|
l,
|
|
3078
3076
|
i,
|
|
3079
3077
|
c
|
|
3080
|
-
),
|
|
3081
|
-
if (a.value.every((
|
|
3078
|
+
), u = v(() => {
|
|
3079
|
+
if (a.value.every((K) => K.isDashed))
|
|
3082
3080
|
return a.value;
|
|
3083
|
-
const { computedLineData:
|
|
3084
|
-
return
|
|
3085
|
-
}),
|
|
3081
|
+
const { computedLineData: E } = an(a);
|
|
3082
|
+
return r.value.withTooltip !== !1 && (s != null && s.value) && f(E.value), E.value;
|
|
3083
|
+
}), m = v(() => {
|
|
3086
3084
|
if (t.hoveredIndex === -1) return;
|
|
3087
|
-
const
|
|
3088
|
-
|
|
3085
|
+
const E = xn(
|
|
3086
|
+
u.value,
|
|
3089
3087
|
t.hoveredIndex
|
|
3090
3088
|
);
|
|
3091
3089
|
return {
|
|
3092
3090
|
d: `M ${tt(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3093
|
-
V ${i.value(
|
|
3091
|
+
V ${i.value(E)}`
|
|
3094
3092
|
// Move to X index, Vertical line to the highest point
|
|
3095
3093
|
};
|
|
3096
3094
|
}), y = v(
|
|
@@ -3098,83 +3096,89 @@ const Dl = {
|
|
|
3098
3096
|
// Subtracting the first line (read below)
|
|
3099
3097
|
), p = v(
|
|
3100
3098
|
() => {
|
|
3101
|
-
var
|
|
3102
|
-
return ((
|
|
3099
|
+
var E;
|
|
3100
|
+
return ((E = r.value) == null ? void 0 : E.lineWidth) * 2 || void 0;
|
|
3103
3101
|
}
|
|
3104
3102
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3105
3103
|
), b = v(
|
|
3106
3104
|
() => l.value.bandwidth() / 2
|
|
3107
3105
|
), $ = v(() => l.value.domain()), L = v(
|
|
3108
|
-
() =>
|
|
3106
|
+
() => r.value.withPoints ?? t.withPoints
|
|
3107
|
+
), g = v(
|
|
3108
|
+
() => r.value.withPoints === "visible" || t.withPoints === "visible"
|
|
3109
3109
|
);
|
|
3110
|
-
function
|
|
3111
|
-
return
|
|
3112
|
-
}
|
|
3113
|
-
function
|
|
3114
|
-
var
|
|
3115
|
-
const U =
|
|
3116
|
-
(
|
|
3117
|
-
(
|
|
3110
|
+
function O(E) {
|
|
3111
|
+
return u.value[E].values;
|
|
3112
|
+
}
|
|
3113
|
+
function N(E, K) {
|
|
3114
|
+
var F, Q;
|
|
3115
|
+
const U = E === 0 ? [] : [
|
|
3116
|
+
(F = O(K)[E - 1]) == null ? void 0 : F.value,
|
|
3117
|
+
(Q = O(K)[E]) == null ? void 0 : Q.value
|
|
3118
3118
|
];
|
|
3119
3119
|
return Nl(
|
|
3120
|
-
|
|
3120
|
+
E,
|
|
3121
3121
|
U,
|
|
3122
3122
|
l.value,
|
|
3123
3123
|
i.value
|
|
3124
3124
|
) || "";
|
|
3125
3125
|
}
|
|
3126
|
-
function
|
|
3126
|
+
function D(E) {
|
|
3127
3127
|
return {
|
|
3128
|
-
animationDelay:
|
|
3128
|
+
animationDelay: E < 2 ? 0 : (E - 1) * y.value,
|
|
3129
3129
|
animationDuration: y.value
|
|
3130
3130
|
};
|
|
3131
3131
|
}
|
|
3132
|
-
function
|
|
3133
|
-
var
|
|
3134
|
-
const U = (
|
|
3132
|
+
function P(E, K) {
|
|
3133
|
+
var F;
|
|
3134
|
+
const U = (F = O(K)[E]) == null ? void 0 : F.value;
|
|
3135
3135
|
return {
|
|
3136
|
-
x:
|
|
3136
|
+
x: ve(l.value) ? t.xScale($.value[E]) + b.value : t.xScale(E),
|
|
3137
3137
|
y: U === null ? i.value(i.value.domain()[1]) : i.value(U)
|
|
3138
3138
|
};
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3141
|
-
return t.hoveredIndex ===
|
|
3140
|
+
function G(E) {
|
|
3141
|
+
return t.hoveredIndex === E;
|
|
3142
3142
|
}
|
|
3143
|
-
return (
|
|
3144
|
-
|
|
3143
|
+
return (E, K) => (_(), I("g", Dl, [
|
|
3144
|
+
S("path", j(m.value, {
|
|
3145
3145
|
class: "lume-line-group__overlay-line",
|
|
3146
3146
|
"data-j-lume-line-group__overlay-line": ""
|
|
3147
3147
|
}), null, 16),
|
|
3148
|
-
(_(!0), I(
|
|
3148
|
+
(_(!0), I(q, null, W(u.value, (U, F) => (_(), I("g", {
|
|
3149
3149
|
key: U.label,
|
|
3150
3150
|
class: "lume-line-group__group"
|
|
3151
3151
|
}, [
|
|
3152
|
-
|
|
3153
|
-
(_(!0), I(
|
|
3154
|
-
key: `line-${
|
|
3152
|
+
S("g", Hl, [
|
|
3153
|
+
(_(!0), I(q, null, W(U.values, (Q, J) => (_(), Y(d(Tl), j(D(J), {
|
|
3154
|
+
key: `line-${J}`,
|
|
3155
3155
|
color: U.color,
|
|
3156
|
-
dashed: U.isDashed(
|
|
3157
|
-
"path-definition":
|
|
3156
|
+
dashed: U.isDashed(J),
|
|
3157
|
+
"path-definition": N(J, F),
|
|
3158
3158
|
transition: e.transition,
|
|
3159
|
-
width: d(
|
|
3160
|
-
onClick: (
|
|
3159
|
+
width: d(r).lineWidth,
|
|
3160
|
+
onClick: (se) => o("line-click", { index: J, datasetIndex: F, event: se })
|
|
3161
3161
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3162
3162
|
]),
|
|
3163
3163
|
L.value ? (_(), I("g", Bl, [
|
|
3164
|
-
(_(!0), I(
|
|
3165
|
-
key: `point-${
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3164
|
+
(_(!0), I(q, null, W(U.values, (Q, J) => (_(), I(q, {
|
|
3165
|
+
key: `point-${J}`
|
|
3166
|
+
}, [
|
|
3167
|
+
Q.isNull ? C("", !0) : (_(), Y(d(wl), j({ key: 0 }, P(J, F), {
|
|
3168
|
+
active: G(J),
|
|
3169
|
+
color: U.color,
|
|
3170
|
+
index: J,
|
|
3171
|
+
radius: p.value,
|
|
3172
|
+
visible: g.value,
|
|
3173
|
+
onClick: (se) => o("point-click", { index: J, datasetIndex: F, event: se })
|
|
3174
|
+
}), null, 16, ["active", "color", "index", "radius", "visible", "onClick"]))
|
|
3175
|
+
], 64))), 128))
|
|
3176
|
+
])) : C("", !0)
|
|
3173
3177
|
]))), 128))
|
|
3174
3178
|
]));
|
|
3175
3179
|
}
|
|
3176
|
-
}), ln = /* @__PURE__ */
|
|
3177
|
-
margins:
|
|
3180
|
+
}), ln = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-1eb6df01"]]), Sl = {
|
|
3181
|
+
margins: Ae.VERTICAL,
|
|
3178
3182
|
startOnZero: !0,
|
|
3179
3183
|
withTooltip: !0,
|
|
3180
3184
|
xAxisOptions: {},
|
|
@@ -3185,21 +3189,21 @@ const Dl = {
|
|
|
3185
3189
|
...we(null, !1)
|
|
3186
3190
|
},
|
|
3187
3191
|
setup(e, { emit: n }) {
|
|
3188
|
-
const t = e, { componentEventPropagator: o } =
|
|
3189
|
-
return (i, c) => (_(), Y(d(
|
|
3192
|
+
const t = e, { componentEventPropagator: o } = ke(), a = Te(re()), { options: r } = te(t), { allOptions: l } = fe(r, Sl);
|
|
3193
|
+
return (i, c) => (_(), Y(d(xe), j({ ...t, ...i.$attrs }, {
|
|
3190
3194
|
"chart-type": "line",
|
|
3191
3195
|
options: d(l),
|
|
3192
3196
|
"data-j-lume-line-chart": ""
|
|
3193
|
-
},
|
|
3197
|
+
}, ae(d(o))), de({
|
|
3194
3198
|
groups: V((s) => [
|
|
3195
|
-
|
|
3199
|
+
ue(d(ln), j(s, ae(d(o))), null, 16)
|
|
3196
3200
|
]),
|
|
3197
3201
|
_: 2
|
|
3198
3202
|
}, [
|
|
3199
|
-
W(d(a), (s,
|
|
3200
|
-
name:
|
|
3201
|
-
fn: V((
|
|
3202
|
-
|
|
3203
|
+
W(d(a), (s, f) => ({
|
|
3204
|
+
name: f,
|
|
3205
|
+
fn: V((u) => [
|
|
3206
|
+
B(i.$slots, f, he(ge(u || {})))
|
|
3203
3207
|
])
|
|
3204
3208
|
}))
|
|
3205
3209
|
]), 1040, ["options"]));
|
|
@@ -3208,10 +3212,10 @@ const Dl = {
|
|
|
3208
3212
|
function Gl(e) {
|
|
3209
3213
|
return { areaPathDefinition: v(
|
|
3210
3214
|
() => function(t, o) {
|
|
3211
|
-
if (!t || !o ||
|
|
3215
|
+
if (!t || !o || ve(t) || ve(o))
|
|
3212
3216
|
return;
|
|
3213
3217
|
const a = e.value[0].values;
|
|
3214
|
-
return _n().x((
|
|
3218
|
+
return _n().x((r, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((r) => o(r.value))(a);
|
|
3215
3219
|
}
|
|
3216
3220
|
) };
|
|
3217
3221
|
}
|
|
@@ -3236,13 +3240,13 @@ const jl = {
|
|
|
3236
3240
|
...Re()
|
|
3237
3241
|
},
|
|
3238
3242
|
setup(e, { expose: n, emit: t }) {
|
|
3239
|
-
const o = e, { componentEventPropagator: a } =
|
|
3243
|
+
const o = e, { componentEventPropagator: a } = ke(), r = Te(re()), { data: l, options: i } = te(o), { internalData: c } = ht(l), { allOptions: s } = fe(i, jl), { computedLineData: f } = an(c), { areaPathDefinition: u } = Gl(f), m = v(() => {
|
|
3240
3244
|
var $, L;
|
|
3241
3245
|
return (L = ($ = c.value) == null ? void 0 : $[0]) == null ? void 0 : L.color;
|
|
3242
3246
|
}), y = v(
|
|
3243
3247
|
() => {
|
|
3244
3248
|
var $, L;
|
|
3245
|
-
return ((L = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : L.areaColor) ||
|
|
3249
|
+
return ((L = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : L.areaColor) || m.value;
|
|
3246
3250
|
}
|
|
3247
3251
|
);
|
|
3248
3252
|
function p($) {
|
|
@@ -3253,64 +3257,64 @@ const jl = {
|
|
|
3253
3257
|
}
|
|
3254
3258
|
function b($, L, g) {
|
|
3255
3259
|
if ($.length)
|
|
3256
|
-
return
|
|
3260
|
+
return Be().range([0, g.width]).domain([0, $[0].values.length - 1]);
|
|
3257
3261
|
}
|
|
3258
3262
|
return n({
|
|
3259
|
-
areaPathDefinition:
|
|
3260
|
-
}), ($, L) => (_(), Y(d(
|
|
3263
|
+
areaPathDefinition: u
|
|
3264
|
+
}), ($, L) => (_(), Y(d(xe), j(o, {
|
|
3261
3265
|
"chart-type": "line",
|
|
3262
3266
|
options: p(d(s)),
|
|
3263
3267
|
"x-scale": b
|
|
3264
|
-
},
|
|
3268
|
+
}, ae(d(a))), de({
|
|
3265
3269
|
groups: V((g) => [
|
|
3266
3270
|
d(s).showArea ? (_(), I("path", {
|
|
3267
3271
|
key: 0,
|
|
3268
|
-
class:
|
|
3272
|
+
class: ne([
|
|
3269
3273
|
"sparkline-chart__area",
|
|
3270
3274
|
d(i).withTransition !== !1 ? "sparkline-chart__area--transition" : "",
|
|
3271
|
-
`lume-fill--${y.value ||
|
|
3275
|
+
`lume-fill--${y.value || m.value}`,
|
|
3272
3276
|
"lume-fill--faded"
|
|
3273
3277
|
]),
|
|
3274
|
-
d: d(
|
|
3278
|
+
d: d(u)(g.xScale, g.yScale),
|
|
3275
3279
|
"data-j-sparkline__area": ""
|
|
3276
|
-
}, null, 10, Vl)) :
|
|
3277
|
-
|
|
3280
|
+
}, null, 10, Vl)) : C("", !0),
|
|
3281
|
+
ue(d(ln), j(g, { "with-points": !1 }, ae(d(a))), null, 16)
|
|
3278
3282
|
]),
|
|
3279
3283
|
_: 2
|
|
3280
3284
|
}, [
|
|
3281
|
-
W(d(
|
|
3285
|
+
W(d(r), (g, O) => ({
|
|
3282
3286
|
name: O,
|
|
3283
3287
|
fn: V((N) => [
|
|
3284
|
-
|
|
3288
|
+
B($.$slots, O, he(ge(N || {})), void 0, !0)
|
|
3285
3289
|
])
|
|
3286
3290
|
}))
|
|
3287
3291
|
]), 1040, ["options"]));
|
|
3288
3292
|
}
|
|
3289
|
-
}), Ql = /* @__PURE__ */
|
|
3293
|
+
}), Ql = /* @__PURE__ */ ee(Pl, [["__scopeId", "data-v-579f7e32"]]);
|
|
3290
3294
|
export {
|
|
3291
|
-
|
|
3292
|
-
|
|
3295
|
+
Wo as A,
|
|
3296
|
+
Zo as B,
|
|
3293
3297
|
Re as C,
|
|
3294
3298
|
fe as D,
|
|
3295
3299
|
gt as E,
|
|
3296
3300
|
we as F,
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3301
|
+
fo as G,
|
|
3302
|
+
po as H,
|
|
3303
|
+
vo as I,
|
|
3300
3304
|
mo as J,
|
|
3301
|
-
|
|
3302
|
-
|
|
3305
|
+
xt as K,
|
|
3306
|
+
xe as L,
|
|
3303
3307
|
tt as M,
|
|
3304
3308
|
Et as N,
|
|
3305
3309
|
en as O,
|
|
3306
|
-
|
|
3307
|
-
|
|
3310
|
+
Yo as P,
|
|
3311
|
+
Ko as Q,
|
|
3308
3312
|
ie as R,
|
|
3309
3313
|
qt as S,
|
|
3310
3314
|
vt as T,
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3315
|
+
mt as U,
|
|
3316
|
+
ft as V,
|
|
3317
|
+
be as W,
|
|
3314
3318
|
Zl as _,
|
|
3315
3319
|
Ul as a,
|
|
3316
3320
|
Xl as b,
|
|
@@ -3318,25 +3322,25 @@ export {
|
|
|
3318
3322
|
Kl as d,
|
|
3319
3323
|
Jl as e,
|
|
3320
3324
|
Lt as f,
|
|
3321
|
-
|
|
3325
|
+
_o as g,
|
|
3322
3326
|
Nt as h,
|
|
3323
3327
|
Fo as i,
|
|
3324
|
-
|
|
3325
|
-
|
|
3328
|
+
Mo as j,
|
|
3329
|
+
Eo as k,
|
|
3326
3330
|
Ql as l,
|
|
3327
|
-
|
|
3331
|
+
$o as m,
|
|
3328
3332
|
dt as n,
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3333
|
+
Tl as o,
|
|
3334
|
+
wl as p,
|
|
3335
|
+
tl as q,
|
|
3336
|
+
ga as r,
|
|
3337
|
+
ka as s,
|
|
3338
|
+
$a as t,
|
|
3335
3339
|
yt as u,
|
|
3336
3340
|
ln as v,
|
|
3337
|
-
|
|
3341
|
+
zo as w,
|
|
3338
3342
|
pt as x,
|
|
3339
3343
|
ht as y,
|
|
3340
3344
|
an as z
|
|
3341
3345
|
};
|
|
3342
|
-
//# sourceMappingURL=
|
|
3346
|
+
//# sourceMappingURL=CDiQ5aDd.js.map
|