vue-data-ui 3.0.0-next.6 → 3.0.0-next.60
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/{Arrow-Ul64M9UV.js → Arrow-Dt0ZxTK2.js} +1 -1
- package/dist/{BaseDraggableDialog-Q2ajCztp.js → BaseDraggableDialog-Bl-2tw3H.js} +2 -2
- package/dist/{BaseIcon-BKR7AGeP.js → BaseIcon-C3ljqn8J.js} +1 -1
- package/dist/{ColorPicker-BagIs8-K.js → ColorPicker-0d0whOB3.js} +2 -2
- package/dist/{DataTable-CDwApkI_.js → DataTable-C_tJHvMd.js} +2 -2
- package/dist/{Legend-BSLj7tYc.js → Legend-VD0VB7l7.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DjJe5fXu.js → NonSvgPenAndPaper-DQsHc_AG.js} +3 -3
- package/dist/{PackageVersion-BsKpz6KS.js → PackageVersion-5S8ajCUS.js} +1 -1
- package/dist/{PenAndPaper-BYRk8xrS.js → PenAndPaper-D6wazxlT.js} +3 -3
- package/dist/{Shape-DK7zYTKa.js → Shape-DDSX29LV.js} +43 -37
- package/dist/Slicer-D3SbIarX.js +602 -0
- package/dist/{SparkTooltip-Dy2sVTb_.js → SparkTooltip-BCdP3VDl.js} +1 -1
- package/dist/{Title-Cednydse.js → Title-DEKAfzRX.js} +1 -1
- package/dist/{Tooltip-DJlwW-XP.js → Tooltip-DJlC-n25.js} +23 -19
- package/dist/{UserOptions-DxIzWere.js → UserOptions-D2G7II3G.js} +2 -2
- package/dist/{dom-to-png-lZcM-YfK.js → dom-to-png-Y0tASTWQ.js} +1 -1
- package/dist/{img-DqlIAUF6.js → img-ChLGv8nO.js} +1 -1
- package/dist/{index-BQcLOx39.js → index-BLtc1AIS.js} +1707 -1131
- package/dist/{pdf-CjIXhsyg.js → pdf-DNiq-xsc.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +481 -21
- package/dist/types/vue-data-ui.d.ts +481 -21
- package/dist/useAutoSizeLabelsInsideViewbox-BJDcwsoB.js +41 -0
- package/dist/useNestedProp-DExlTpuj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BRY5saEA.js → usePrinter-fqbzwh0l.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-CWRlSsiN.js → vue-data-ui-B8bRwUEL.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-Dddx5kJW.js +1323 -0
- package/dist/{vue-ui-accordion-Df-5BRRg.js → vue-ui-accordion-EMAj3Ykx.js} +3 -3
- package/dist/vue-ui-age-pyramid-CMzKOGfv.js +834 -0
- package/dist/{vue-ui-annotator-BxC5dcIv.js → vue-ui-annotator-BQxXVdZW.js} +2 -2
- package/dist/vue-ui-bullet-DIie_6-T.js +571 -0
- package/dist/vue-ui-candlestick-DU796IGE.js +999 -0
- package/dist/{vue-ui-carousel-table-NTDzafWQ.js → vue-ui-carousel-table-xDItqzuw.js} +29 -29
- package/dist/{vue-ui-chestnut-k21Qqjjq.js → vue-ui-chestnut-DnQ494SU.js} +5 -5
- package/dist/{vue-ui-chord-BVoA6nfI.js → vue-ui-chord-DTs9gQ-R.js} +8 -8
- package/dist/{vue-ui-circle-pack-CEBgImRX.js → vue-ui-circle-pack-D73gxFJW.js} +24 -24
- package/dist/{vue-ui-cursor-BQcz8xw2.js → vue-ui-cursor-CNXTFeSs.js} +2 -2
- package/dist/{vue-ui-dashboard-CyzEpJoI.js → vue-ui-dashboard-Duph5Yta.js} +62 -62
- package/dist/{vue-ui-digits-Dafw1UsT.js → vue-ui-digits-D7qOSGZ-.js} +2 -2
- package/dist/{vue-ui-donut-DKfux8XT.js → vue-ui-donut-EfxITdHJ.js} +320 -308
- package/dist/vue-ui-donut-evolution-H6nfW_kx.js +1075 -0
- package/dist/vue-ui-dumbbell-DCUR8kl_.js +1119 -0
- package/dist/vue-ui-flow-DUENWmgc.js +841 -0
- package/dist/{vue-ui-funnel-CuN8HWwP.js → vue-ui-funnel-BSGUxWhW.js} +16 -16
- package/dist/{vue-ui-galaxy-BHCLFlmy.js → vue-ui-galaxy-D8PBQfbb.js} +60 -58
- package/dist/vue-ui-gauge-C8v8wKJO.js +791 -0
- package/dist/{vue-ui-gizmo-DHEEfdp9.js → vue-ui-gizmo-DmguslRh.js} +3 -3
- package/dist/vue-ui-heatmap-BM5Gfdzz.js +1078 -0
- package/dist/vue-ui-history-plot-CF6SlpwK.js +1073 -0
- package/dist/{vue-ui-kpi-C4i2w_Yd.js → vue-ui-kpi-BCyX-Zu-.js} +7 -7
- package/dist/{vue-ui-mini-loader-BeetGv_m.js → vue-ui-mini-loader-ByMff4PK.js} +2 -2
- package/dist/{vue-ui-molecule-F_gDXjJr.js → vue-ui-molecule-Cxnf2xDy.js} +53 -51
- package/dist/{vue-ui-mood-radar-BJMOEqlu.js → vue-ui-mood-radar-DEfJWXE7.js} +15 -15
- package/dist/vue-ui-nested-donuts-Bt7Pw9l0.js +1286 -0
- package/dist/vue-ui-onion-Bk3KL1Nk.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-BpKRlOYy.js +915 -0
- package/dist/{vue-ui-quadrant-DTyRC1_v.js → vue-ui-quadrant-D1dgOAp2.js} +59 -57
- package/dist/vue-ui-quick-chart-_I6OrH-J.js +1761 -0
- package/dist/{vue-ui-radar-De2iznwo.js → vue-ui-radar-BWnhxayf.js} +30 -28
- package/dist/{vue-ui-rating-CarXXyD-.js → vue-ui-rating-I08lL1Nb.js} +2 -2
- package/dist/{vue-ui-relation-circle-CKkK9D4E.js → vue-ui-relation-circle-CMF5FSha.js} +6 -6
- package/dist/vue-ui-ridgeline-prYrXNYF.js +1153 -0
- package/dist/vue-ui-rings-DmbUIw9S.js +728 -0
- package/dist/vue-ui-scatter-srTVLcUK.js +1178 -0
- package/dist/{vue-ui-skeleton-C7maR60-.js → vue-ui-skeleton-FanSnKr8.js} +3 -3
- package/dist/{vue-ui-smiley-DzCCn5Oc.js → vue-ui-smiley-CWA0Y6wM.js} +26 -26
- package/dist/{vue-ui-spark-trend-Db-Fnp8C.js → vue-ui-spark-trend-EiEzMoPj.js} +3 -3
- package/dist/vue-ui-sparkbar-CCe0U_o0.js +351 -0
- package/dist/{vue-ui-sparkgauge-DAQ4zozy.js → vue-ui-sparkgauge-Cdcirik_.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CMEaO0CW.js → vue-ui-sparkhistogram-CEj9qz9m.js} +4 -4
- package/dist/vue-ui-sparkline-B2-YztKx.js +489 -0
- package/dist/vue-ui-sparkstackbar-BGMtc_HC.js +421 -0
- package/dist/vue-ui-stackbar-DrKaioRS.js +1370 -0
- package/dist/vue-ui-strip-plot-C4qWoDEh.js +915 -0
- package/dist/{vue-ui-table-Dck8Pyg9.js → vue-ui-table-CXqyTj_Z.js} +11 -11
- package/dist/{vue-ui-table-heatmap-DknIGf9_.js → vue-ui-table-heatmap-BZTn3qnM.js} +5 -5
- package/dist/{vue-ui-table-sparkline-G4HAzUt6.js → vue-ui-table-sparkline-CIBdN_KF.js} +14 -14
- package/dist/vue-ui-thermometer-DPIpWKUI.js +541 -0
- package/dist/{vue-ui-timer-Dmr-HCSc.js → vue-ui-timer-Cha-Gb1x.js} +5 -5
- package/dist/vue-ui-tiremarks-B4SjQyS7.js +406 -0
- package/dist/vue-ui-treemap-1twI_ag-.js +1035 -0
- package/dist/{vue-ui-vertical-bar--QFtoFje.js → vue-ui-vertical-bar-C31Jqkbw.js} +318 -302
- package/dist/vue-ui-waffle-DkZykFPK.js +910 -0
- package/dist/vue-ui-wheel-CYOrBHBD.js +379 -0
- package/dist/vue-ui-word-cloud-Clyg0CRZ.js +765 -0
- package/dist/{vue-ui-world-BcK_brDq.js → vue-ui-world-BYgMbS-e.js} +11 -9
- package/dist/vue-ui-xy-BMszd4wZ.js +3760 -0
- package/dist/{vue-ui-xy-canvas--88oKdGN.js → vue-ui-xy-canvas-DwXvZ311.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-B_Hb6qSk.js +0 -577
- package/dist/useNestedProp-DefBVltl.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-CJMZqDo1.js +0 -1227
- package/dist/vue-ui-age-pyramid-B6WAMtPk.js +0 -746
- package/dist/vue-ui-bullet-NmtltFbU.js +0 -513
- package/dist/vue-ui-candlestick-BzqQtynP.js +0 -873
- package/dist/vue-ui-donut-evolution-D7cNk_6l.js +0 -903
- package/dist/vue-ui-dumbbell--H80zebk.js +0 -753
- package/dist/vue-ui-flow-lk_HU5NB.js +0 -765
- package/dist/vue-ui-gauge-DWlCh2_B.js +0 -738
- package/dist/vue-ui-heatmap-BK6BNOY_.js +0 -877
- package/dist/vue-ui-history-plot-CGF6lE-7.js +0 -924
- package/dist/vue-ui-nested-donuts-BX0Z0rb1.js +0 -1177
- package/dist/vue-ui-onion-BhjUET_W.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-n7QPVLrW.js +0 -807
- package/dist/vue-ui-quick-chart-5xX-yBIY.js +0 -1612
- package/dist/vue-ui-ridgeline-DQ8RQf3E.js +0 -969
- package/dist/vue-ui-rings-Cze6OsmO.js +0 -685
- package/dist/vue-ui-scatter-CwI3_Dn7.js +0 -1045
- package/dist/vue-ui-sparkbar-C6wsNMMO.js +0 -301
- package/dist/vue-ui-sparkline-R7pfxRWN.js +0 -459
- package/dist/vue-ui-sparkstackbar-DV_XqJQ2.js +0 -381
- package/dist/vue-ui-stackbar-gReSujA_.js +0 -1207
- package/dist/vue-ui-strip-plot-8fsm3nn2.js +0 -761
- package/dist/vue-ui-thermometer-BIkXa4hY.js +0 -495
- package/dist/vue-ui-tiremarks-YWbRk0dm.js +0 -358
- package/dist/vue-ui-treemap-D2OnG3Fh.js +0 -965
- package/dist/vue-ui-waffle-BdaCXuWc.js +0 -863
- package/dist/vue-ui-wheel-Bw3XSa8N.js +0 -352
- package/dist/vue-ui-word-cloud-BH8UZH_J.js +0 -659
- package/dist/vue-ui-xy-Be--zwe9.js +0 -2980
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { a1 as p } from "./index-BLtc1AIS.js";
|
|
2
|
+
function A({
|
|
3
|
+
svgRef: i,
|
|
4
|
+
fontSize: r,
|
|
5
|
+
minFontSize: a,
|
|
6
|
+
sizeRef: u,
|
|
7
|
+
labelClass: c,
|
|
8
|
+
labelTypes: e = []
|
|
9
|
+
}) {
|
|
10
|
+
function s() {
|
|
11
|
+
const o = i.value;
|
|
12
|
+
if (!o) return;
|
|
13
|
+
const [l, h, f, S] = o.getAttribute("viewBox").split(" ").map(Number), m = { x: l, y: h, width: f, height: S };
|
|
14
|
+
e.length || (e = [
|
|
15
|
+
{
|
|
16
|
+
selector: c,
|
|
17
|
+
baseSize: r,
|
|
18
|
+
minSize: a,
|
|
19
|
+
sizeRef: u
|
|
20
|
+
}
|
|
21
|
+
]), e.map((t) => o.querySelectorAll(t.selector).length).reduce((t, n) => t + n, 0) !== 0 && e.forEach(({ selector: t, baseSize: n, minSize: z, sizeRef: d }) => {
|
|
22
|
+
o.querySelectorAll(t).forEach((g) => {
|
|
23
|
+
const b = p({
|
|
24
|
+
el: g,
|
|
25
|
+
bounds: m,
|
|
26
|
+
currentFontSize: n,
|
|
27
|
+
minFontSize: z,
|
|
28
|
+
attempts: 200,
|
|
29
|
+
padding: 1
|
|
30
|
+
});
|
|
31
|
+
d.value = b;
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
autoSizeLabels: s
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
A as u
|
|
41
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as o, A as n } from "./index-BLtc1AIS.js";
|
|
2
|
+
function c({ defaultConfig: e, userConfig: t }) {
|
|
3
|
+
if (!Object.keys(t || {}).length)
|
|
4
|
+
return e;
|
|
5
|
+
const r = o({
|
|
6
|
+
defaultConfig: e,
|
|
7
|
+
userConfig: t
|
|
8
|
+
});
|
|
9
|
+
return n(r);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as u
|
|
13
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ref as h, computed as H, onMounted as I, onUnmounted as W, watchEffect as _, watch as G } from "vue";
|
|
2
|
+
function U(r, A = { x: 0, y: 0, width: 100, height: 100 }, C = 1, k) {
|
|
3
|
+
const l = h({ ...A }), o = h({ ...l.value }), v = h(1), E = h(!1), p = h(!1), w = h(0), X = h(null), m = h({ x: 0, y: 0 }), D = H(
|
|
4
|
+
() => o.value.x !== l.value.x || o.value.y !== l.value.y || o.value.width !== l.value.width || o.value.height !== l.value.height
|
|
5
|
+
);
|
|
6
|
+
let f = null;
|
|
7
|
+
function M(e) {
|
|
8
|
+
if (e.length < 2) return 0;
|
|
9
|
+
const t = e[0].clientX - e[1].clientX, n = e[0].clientY - e[1].clientY;
|
|
10
|
+
return Math.hypot(t, n);
|
|
11
|
+
}
|
|
12
|
+
function g(e) {
|
|
13
|
+
const t = r.value;
|
|
14
|
+
if (!t) return { x: 0, y: 0 };
|
|
15
|
+
const n = t.createSVGPoint();
|
|
16
|
+
n.x = e.clientX, n.y = e.clientY;
|
|
17
|
+
const a = t.getScreenCTM()?.inverse();
|
|
18
|
+
return a ? n.matrixTransform(a) : { x: 0, y: 0 };
|
|
19
|
+
}
|
|
20
|
+
function B(e, t) {
|
|
21
|
+
const n = r.value;
|
|
22
|
+
if (!n) return { dx: 0, dy: 0 };
|
|
23
|
+
const a = Math.max(1, n.clientWidth), i = Math.max(1, n.clientHeight), c = o.value.width / a, s = o.value.height / i;
|
|
24
|
+
return { dx: e * c, dy: t * s };
|
|
25
|
+
}
|
|
26
|
+
function L(e) {
|
|
27
|
+
E.value = !0;
|
|
28
|
+
const t = e.touches?.[0] || e;
|
|
29
|
+
m.value = { x: t.clientX, y: t.clientY }, r.value && (r.value.style.cursor = "grabbing");
|
|
30
|
+
}
|
|
31
|
+
function P(e) {
|
|
32
|
+
if (!E.value) return;
|
|
33
|
+
const t = e.touches?.[0] || e, n = t.clientX - m.value.x, a = t.clientY - m.value.y;
|
|
34
|
+
if (n === 0 && a === 0) return;
|
|
35
|
+
const { dx: i, dy: c } = B(n, a);
|
|
36
|
+
o.value.x -= i, o.value.y -= c, m.value = { x: t.clientX, y: t.clientY };
|
|
37
|
+
}
|
|
38
|
+
function d() {
|
|
39
|
+
E.value = !1, r.value && (r.value.style.cursor = "");
|
|
40
|
+
}
|
|
41
|
+
function T(e) {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
const t = e.deltaY > 0 ? 0.9 : 1.1;
|
|
44
|
+
S(t, g(e));
|
|
45
|
+
}
|
|
46
|
+
function Z(e) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
const t = g(e), n = 1.02 * (1 + C / 100);
|
|
49
|
+
V(n, t);
|
|
50
|
+
}
|
|
51
|
+
function V(e, t) {
|
|
52
|
+
f && cancelAnimationFrame(f);
|
|
53
|
+
const n = v.value, a = n * e;
|
|
54
|
+
let i = 0;
|
|
55
|
+
const c = (u) => u < 0.5 ? 2 * u * u : -1 + (4 - 2 * u) * u, s = () => {
|
|
56
|
+
i += 0.02;
|
|
57
|
+
const u = n + (a - n) * c(i);
|
|
58
|
+
S(u / n, t), i < 1 ? f = requestAnimationFrame(s) : f = null;
|
|
59
|
+
};
|
|
60
|
+
s();
|
|
61
|
+
}
|
|
62
|
+
function S(e, t) {
|
|
63
|
+
const n = v.value * e, a = n / v.value, i = o.value.width / a, c = o.value.height / a, s = (t.x - o.value.x) * (1 - 1 / a), u = (t.y - o.value.y) * (1 - 1 / a);
|
|
64
|
+
o.value.x += s, o.value.y += u, o.value.width = i, o.value.height = c, v.value = n;
|
|
65
|
+
}
|
|
66
|
+
function b(e) {
|
|
67
|
+
e.touches.length === 2 ? (p.value = !0, w.value = M(e.touches), X.value = { ...o.value }) : (e.preventDefault(), L(e));
|
|
68
|
+
}
|
|
69
|
+
function F(e) {
|
|
70
|
+
if (p.value && e.touches.length === 2) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
const t = M(e.touches);
|
|
73
|
+
if (w.value) {
|
|
74
|
+
const n = t / w.value;
|
|
75
|
+
r.value.getBoundingClientRect();
|
|
76
|
+
const i = (e.touches[0].clientX + e.touches[1].clientX) / 2, c = (e.touches[0].clientY + e.touches[1].clientY) / 2, s = g({ clientX: i, clientY: c });
|
|
77
|
+
o.value = { ...X.value }, S(n, s);
|
|
78
|
+
}
|
|
79
|
+
} else
|
|
80
|
+
e.preventDefault(), P(e);
|
|
81
|
+
}
|
|
82
|
+
function x(e) {
|
|
83
|
+
e.touches.length < 2 && (p.value = !1), d();
|
|
84
|
+
}
|
|
85
|
+
function q(e = !1) {
|
|
86
|
+
if (!e) {
|
|
87
|
+
o.value = { ...l.value }, v.value = 1;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const t = { ...o.value }, n = v.value, a = 300;
|
|
91
|
+
let i = null;
|
|
92
|
+
const c = (s) => {
|
|
93
|
+
i == null && (i = s);
|
|
94
|
+
const u = Math.min((s - i) / a, 1);
|
|
95
|
+
o.value = {
|
|
96
|
+
x: t.x + (l.value.x - t.x) * u,
|
|
97
|
+
y: t.y + (l.value.y - t.y) * u,
|
|
98
|
+
width: t.width + (l.value.width - t.width) * u,
|
|
99
|
+
height: t.height + (l.value.height - t.height) * u
|
|
100
|
+
}, v.value = n + (1 - n) * u, u < 1 && requestAnimationFrame(c);
|
|
101
|
+
};
|
|
102
|
+
requestAnimationFrame(c);
|
|
103
|
+
}
|
|
104
|
+
function z(e, t = {}) {
|
|
105
|
+
const { overwriteCurrentIfNotZoomed: n = !0 } = t;
|
|
106
|
+
l.value = { ...e }, !D.value && n && (o.value = { ...l.value }, v.value = 1);
|
|
107
|
+
}
|
|
108
|
+
function Y() {
|
|
109
|
+
const e = r.value;
|
|
110
|
+
e && (e.addEventListener("mousedown", L), e.addEventListener("mousemove", P), e.addEventListener("mouseup", d), e.addEventListener("mouseleave", d), e.addEventListener("wheel", T, { passive: !1 }), e.addEventListener("dblclick", Z), e.addEventListener("touchstart", b, { passive: !1 }), e.addEventListener("touchmove", F, { passive: !1 }), e.addEventListener("touchend", x), e.addEventListener("touchcancel", x));
|
|
111
|
+
}
|
|
112
|
+
function y() {
|
|
113
|
+
const e = r.value;
|
|
114
|
+
e && (e.removeEventListener("mousedown", L), e.removeEventListener("mousemove", P), e.removeEventListener("mouseup", d), e.removeEventListener("mouseleave", d), e.removeEventListener("wheel", T), e.removeEventListener("dblclick", Z), e.removeEventListener("touchstart", b), e.removeEventListener("touchmove", F), e.removeEventListener("touchend", x), e.removeEventListener("touchcancel", x));
|
|
115
|
+
}
|
|
116
|
+
return I(Y), W(y), _(() => (k?.value ? Y() : y(), () => y())), G(r, (e, t) => {
|
|
117
|
+
y(), Y();
|
|
118
|
+
}), { viewBox: o, resetZoom: q, isZoom: D, setInitialViewBox: z };
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
U as u
|
|
122
|
+
};
|
|
@@ -10,7 +10,7 @@ function m({
|
|
|
10
10
|
!t || r.value || (r.value = !0, clearTimeout(n.value), n.value = setTimeout(async () => {
|
|
11
11
|
if (t)
|
|
12
12
|
try {
|
|
13
|
-
const { default: e } = await import("./pdf-
|
|
13
|
+
const { default: e } = await import("./pdf-DNiq-xsc.js");
|
|
14
14
|
await e({
|
|
15
15
|
domElement: document.getElementById(u),
|
|
16
16
|
fileName: l,
|
|
@@ -27,7 +27,7 @@ function m({
|
|
|
27
27
|
!t || a.value || (a.value = !0, clearTimeout(n.value), n.value = setTimeout(async () => {
|
|
28
28
|
if (t)
|
|
29
29
|
try {
|
|
30
|
-
const { default: e } = await import("./img-
|
|
30
|
+
const { default: e } = await import("./img-ChLGv8nO.js");
|
|
31
31
|
await e({
|
|
32
32
|
domElement: document.getElementById(u),
|
|
33
33
|
fileName: l,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { watch as A, nextTick as D } from "vue";
|
|
2
|
+
function S({
|
|
3
|
+
timeLabelsEls: F,
|
|
4
|
+
timeLabels: L,
|
|
5
|
+
slicer: x,
|
|
6
|
+
configRef: s,
|
|
7
|
+
rotationPath: r,
|
|
8
|
+
autoRotatePath: p,
|
|
9
|
+
isAutoSize: N,
|
|
10
|
+
setViewBox: y,
|
|
11
|
+
forceResizeObserver: C,
|
|
12
|
+
callback: o,
|
|
13
|
+
targetClass: j = ".vue-data-ui-time-label",
|
|
14
|
+
rotation: w = -30.0001,
|
|
15
|
+
height: T = null,
|
|
16
|
+
width: b = null
|
|
17
|
+
}) {
|
|
18
|
+
function i(a, n) {
|
|
19
|
+
return n.reduce((e, t) => e && e[t], a);
|
|
20
|
+
}
|
|
21
|
+
function g(a, n, e) {
|
|
22
|
+
n.slice(0, -1).reduce((t, l) => t[l], a)[n.slice(-1)] = e;
|
|
23
|
+
}
|
|
24
|
+
function q(a) {
|
|
25
|
+
const n = /translate\(\s*([^\s,]+)\s*,\s*([^\s,]+)\s*\)/.exec(a);
|
|
26
|
+
return n ? {
|
|
27
|
+
x: parseFloat(n[1]),
|
|
28
|
+
y: parseFloat(n[2])
|
|
29
|
+
} : { x: 0, y: 0 };
|
|
30
|
+
}
|
|
31
|
+
async function c() {
|
|
32
|
+
await D();
|
|
33
|
+
const a = F.value;
|
|
34
|
+
if (!a) return;
|
|
35
|
+
const e = Array.from(a.querySelectorAll(j)).map((u) => ({
|
|
36
|
+
...q(u.getAttribute("transform")),
|
|
37
|
+
width: u.getBBox().width
|
|
38
|
+
}));
|
|
39
|
+
let t = !1;
|
|
40
|
+
const l = 4;
|
|
41
|
+
for (let u = 0; u < e.length && !t; u += 1)
|
|
42
|
+
for (let m = u + 1; m < e.length; m += 1) {
|
|
43
|
+
const v = e[u], f = e[m];
|
|
44
|
+
if (!(v.x + v.width + l < f.x || f.x + f.width + l < v.x)) {
|
|
45
|
+
t = !0;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const d = i(s.value, r);
|
|
50
|
+
t && !d ? (g(s.value, r, w), o && o({ collision: t }), N.value && y && C && (y(), C())) : !t && d === w && (g(s.value, r, 0), o && o({ collision: t }));
|
|
51
|
+
}
|
|
52
|
+
function B(a, n) {
|
|
53
|
+
let e;
|
|
54
|
+
return (...t) => {
|
|
55
|
+
clearTimeout(e), e = setTimeout(() => a(...t), n);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const h = B(c, 200);
|
|
59
|
+
return T && b && A([() => b.value, () => T.value], async ([a, n], [e, t]) => {
|
|
60
|
+
if (!i(s.value, p)) return;
|
|
61
|
+
a !== e || n !== t ? h() : await c();
|
|
62
|
+
}), A(
|
|
63
|
+
[
|
|
64
|
+
() => L.value,
|
|
65
|
+
() => i(s.value, r),
|
|
66
|
+
() => x.value.start,
|
|
67
|
+
() => x.value.end
|
|
68
|
+
],
|
|
69
|
+
async ([, , a, n], [, , e, t]) => {
|
|
70
|
+
if (!i(s.value, p)) return;
|
|
71
|
+
a !== e || n !== t ? h() : await c();
|
|
72
|
+
},
|
|
73
|
+
{ immediate: !0 }
|
|
74
|
+
), { detectTimeLabelCollision: c };
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
S as u
|
|
78
|
+
};
|