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