vue-data-ui 3.0.0-next.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- package/dist/vue-ui-xy--HToGdle.js +0 -2982
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { a1 as K } from "./index-BtNwOUja.js";
|
|
2
|
+
function q({
|
|
3
|
+
svgRef: S,
|
|
4
|
+
fontSize: p,
|
|
5
|
+
minFontSize: z,
|
|
6
|
+
sizeRef: A,
|
|
7
|
+
labelClass: B,
|
|
8
|
+
labelTypes: m = []
|
|
9
|
+
}) {
|
|
10
|
+
let y = null;
|
|
11
|
+
function g(e) {
|
|
12
|
+
let n = e[0];
|
|
13
|
+
for (let t = 1; t < e.length; t += 1) e[t] < n && (n = e[t]);
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
function w(e) {
|
|
17
|
+
let n = e[0];
|
|
18
|
+
for (let t = 1; t < e.length; t += 1) e[t] > n && (n = e[t]);
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
21
|
+
function F(e) {
|
|
22
|
+
const n = e.ownerSVGElement;
|
|
23
|
+
if (!n) return { x: 0, y: 0, width: 0, height: 0 };
|
|
24
|
+
const t = e.getBBox(), i = e.getCTM(), s = [
|
|
25
|
+
{ x: t.x, y: t.y },
|
|
26
|
+
{ x: t.x + t.width, y: t.y },
|
|
27
|
+
{ x: t.x, y: t.y + t.height },
|
|
28
|
+
{ x: t.x + t.width, y: t.y + t.height }
|
|
29
|
+
].map((r) => {
|
|
30
|
+
const a = n.createSVGPoint();
|
|
31
|
+
a.x = r.x, a.y = r.y;
|
|
32
|
+
const l = i ? a.matrixTransform(i) : a;
|
|
33
|
+
return { x: l.x, y: l.y };
|
|
34
|
+
}), h = s.map((r) => r.x), c = s.map((r) => r.y), o = g(h), u = w(h), f = g(c), x = w(c);
|
|
35
|
+
return { x: o, y: f, width: u - o, height: x - f };
|
|
36
|
+
}
|
|
37
|
+
function O(e, n, t = 1) {
|
|
38
|
+
const { x: i, y: s, width: h, height: c } = F(e), o = i >= n.x + t, u = i + h <= n.x + n.width - t, f = s >= n.y + t, x = s + c <= n.y + n.height - t;
|
|
39
|
+
return o && u && f && x;
|
|
40
|
+
}
|
|
41
|
+
function d(e, n, t, i, s = 120, h = 1) {
|
|
42
|
+
let c = t, o = 0;
|
|
43
|
+
for (; o < s && (e.style.fontSize = `${c}px`, !(O(e, n, h) || c <= i)); )
|
|
44
|
+
c -= 0.5, o += 1;
|
|
45
|
+
return c < i ? i : c;
|
|
46
|
+
}
|
|
47
|
+
function b() {
|
|
48
|
+
const e = S.value;
|
|
49
|
+
if (!e) return;
|
|
50
|
+
const [n, t, i, s] = e.getAttribute("viewBox").split(" ").map(Number), h = { x: n, y: t, width: i, height: s };
|
|
51
|
+
m.length || (m = [
|
|
52
|
+
{
|
|
53
|
+
selector: B,
|
|
54
|
+
baseSize: p,
|
|
55
|
+
minSize: z,
|
|
56
|
+
sizeRef: A
|
|
57
|
+
}
|
|
58
|
+
]), m.map((o) => e.querySelectorAll(o.selector).length).reduce((o, u) => o + u, 0) !== 0 && m.forEach(({ selector: o, baseSize: u, minSize: f, sizeRef: x }) => {
|
|
59
|
+
e.querySelectorAll(o).forEach((r) => {
|
|
60
|
+
const a = K({
|
|
61
|
+
el: r,
|
|
62
|
+
bounds: h,
|
|
63
|
+
currentFontSize: u,
|
|
64
|
+
minFontSize: f,
|
|
65
|
+
attempts: 200,
|
|
66
|
+
padding: 1
|
|
67
|
+
}), l = d(r, h, a, f, 120, 1);
|
|
68
|
+
r.style.fontSize = `${l}px`, x.value = l;
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function v() {
|
|
73
|
+
y && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
74
|
+
y = null, b();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return { autoSizeLabels: v };
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
q as u
|
|
81
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { nextTick as v } from "vue";
|
|
2
|
+
function k({
|
|
3
|
+
svgRef: S,
|
|
4
|
+
unitWidth: b,
|
|
5
|
+
fontSize: m = 12,
|
|
6
|
+
step: z = 0.5,
|
|
7
|
+
maxIterations: w = 60,
|
|
8
|
+
hideUnderMin: N = !0
|
|
9
|
+
}) {
|
|
10
|
+
const u = /* @__PURE__ */ new WeakMap(), y = (t) => {
|
|
11
|
+
if (typeof t == "number") return t;
|
|
12
|
+
if (!t) return NaN;
|
|
13
|
+
const s = parseFloat(String(t).replace("px", ""));
|
|
14
|
+
return Number.isFinite(s) ? s : NaN;
|
|
15
|
+
}, l = (t) => {
|
|
16
|
+
const s = y(t.getAttribute("font-size"));
|
|
17
|
+
if (Number.isFinite(s)) return s;
|
|
18
|
+
const r = window.getComputedStyle(t);
|
|
19
|
+
return y(r.fontSize) || m;
|
|
20
|
+
}, n = (t, s) => {
|
|
21
|
+
t.setAttribute("font-size", String(s));
|
|
22
|
+
}, F = (t) => {
|
|
23
|
+
if (u.has(t))
|
|
24
|
+
n(t, u.get(t));
|
|
25
|
+
else {
|
|
26
|
+
const s = l(t);
|
|
27
|
+
u.set(t, s), n(t, s);
|
|
28
|
+
}
|
|
29
|
+
}, h = (t) => {
|
|
30
|
+
try {
|
|
31
|
+
return t.getBBox().width || 0;
|
|
32
|
+
} catch {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
fitText: async (t, s = 6) => {
|
|
38
|
+
await v();
|
|
39
|
+
const r = S?.value;
|
|
40
|
+
if (!r) return;
|
|
41
|
+
const d = r.querySelectorAll(t);
|
|
42
|
+
if (!d.length) return;
|
|
43
|
+
const o = Math.max(0, b.value);
|
|
44
|
+
if (o <= 0) return;
|
|
45
|
+
const a = [];
|
|
46
|
+
d.forEach((e) => {
|
|
47
|
+
const f = e.style.display, g = e.style.opacity;
|
|
48
|
+
e.style.display = "", e.style.opacity = "0", F(e);
|
|
49
|
+
let c = h(e), p = l(e), i = p, x = 0;
|
|
50
|
+
if (c <= o)
|
|
51
|
+
a.push({ el: e, finalSize: p, fits: !0 });
|
|
52
|
+
else {
|
|
53
|
+
for (; c > o && i > s && x < w; )
|
|
54
|
+
i = Math.max(s, i - z), n(e, i), c = h(e), x += 1;
|
|
55
|
+
const T = c <= o && i > s;
|
|
56
|
+
a.push({ el: e, finalSize: i, fits: T }), n(e, p);
|
|
57
|
+
}
|
|
58
|
+
e.style.display = f, e.style.opacity = g;
|
|
59
|
+
});
|
|
60
|
+
const A = N && a.some((e) => !e.fits);
|
|
61
|
+
a.forEach(({ el: e, finalSize: f, fits: g }) => {
|
|
62
|
+
A ? e.style.display = "none" : (e.style.display = "", n(e, f));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
k as u
|
|
69
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createElementBlock as v, openBlock as g, ref as d, computed as h, unref as c, watchEffect as A } from "vue";
|
|
2
|
+
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const B = {}, E = { class: "vue-data-ui-scanner" };
|
|
4
|
+
function L(o, e) {
|
|
5
|
+
return g(), v("div", E);
|
|
6
|
+
}
|
|
7
|
+
const S = /* @__PURE__ */ y(B, [["render", L], ["__scopeId", "data-v-d6376e44"]]);
|
|
8
|
+
function T({
|
|
9
|
+
config: o,
|
|
10
|
+
dataset: e,
|
|
11
|
+
skeletonDataset: r,
|
|
12
|
+
skeletonConfig: s,
|
|
13
|
+
FINAL_CONFIG: i,
|
|
14
|
+
prepareConfig: f,
|
|
15
|
+
callback: t = null,
|
|
16
|
+
dsIsNumber: _ = !1
|
|
17
|
+
}) {
|
|
18
|
+
const u = d(!1), a = h(() => {
|
|
19
|
+
const m = c(o)?.loading ?? !1, n = c(e), p = _ ? [null, void 0].includes(n) : n == null || Array.isArray(n) && n.length === 0 || Object.keys(n).length === 0;
|
|
20
|
+
return u.value || m || p;
|
|
21
|
+
}), l = d(c(e));
|
|
22
|
+
return A(() => {
|
|
23
|
+
l.value = a.value ? r : c(e), i.value = a.value ? s : f(), t && t();
|
|
24
|
+
}), { loading: a, FINAL_DATASET: l, manualLoading: u, skeletonDataset: r, skeletonConfig: s };
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
S as B,
|
|
28
|
+
T as u
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as o, A as n } from "./index-BtNwOUja.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-DoShrdT5.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-DrR839Ot.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
|
+
};
|