vue-data-ui 3.9.0 → 3.9.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/{PackageVersion-DXy-wfBa.js → PackageVersion-CIhhY-aH.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/usePanZoom-CDF7rb3o.js +132 -0
- package/dist/{vue-data-ui-BDPkTNHQ.js → vue-data-ui-bVCjAfu8.js} +57 -57
- package/dist/vue-data-ui.js +58 -58
- package/dist/{vue-ui-3d-bar-uKhbCJCE.js → vue-ui-3d-bar-Bs1SXAWI.js} +1 -1
- package/dist/{vue-ui-age-pyramid-DLT_gkMY.js → vue-ui-age-pyramid-D25YLhPh.js} +1 -1
- package/dist/{vue-ui-bullet-BwOyLfur.js → vue-ui-bullet-XX1owNiy.js} +1 -1
- package/dist/{vue-ui-candlestick-DvIJjYgT.js → vue-ui-candlestick-CbKnRXLs.js} +1 -1
- package/dist/{vue-ui-carousel-table-mQdTBiJ6.js → vue-ui-carousel-table-B95eZm5f.js} +1 -1
- package/dist/{vue-ui-chestnut-D4aL-SRw.js → vue-ui-chestnut-D6B8mFCb.js} +1 -1
- package/dist/{vue-ui-chord-BNyOLiis.js → vue-ui-chord-C-Fe5nTC.js} +1 -1
- package/dist/{vue-ui-circle-pack-DGjOBC77.js → vue-ui-circle-pack-DbGOEbwG.js} +1 -1
- package/dist/{vue-ui-cursor-JDfWC_4Z.js → vue-ui-cursor-D99JZotY.js} +1 -1
- package/dist/{vue-ui-dag-C7GVHRdz.js → vue-ui-dag-D7R60BRH.js} +2 -2
- package/dist/{vue-ui-dashboard-Dhte9CS8.js → vue-ui-dashboard-Dxhaj5E6.js} +54 -54
- package/dist/{vue-ui-donut-BnJXrdXi.js → vue-ui-donut-CbHumHFw.js} +1 -1
- package/dist/{vue-ui-donut-evolution-B7IXs662.js → vue-ui-donut-evolution--rlD_bzN.js} +1 -1
- package/dist/{vue-ui-dumbbell-icb7XI8Y.js → vue-ui-dumbbell-Bak094f4.js} +1 -1
- package/dist/{vue-ui-flow-BkFZyi2d.js → vue-ui-flow-BU_3xWDD.js} +1 -1
- package/dist/{vue-ui-funnel-BtCQx40Z.js → vue-ui-funnel-aOfTIY8A.js} +1 -1
- package/dist/{vue-ui-galaxy-DlkNLZDJ.js → vue-ui-galaxy-CFnCDW6L.js} +1 -1
- package/dist/{vue-ui-gauge-Cdj0ecH3.js → vue-ui-gauge-Te_U6eYB.js} +1 -1
- package/dist/{vue-ui-geo-e3rtm3qo.js → vue-ui-geo-qkJZph6o.js} +2 -2
- package/dist/{vue-ui-gizmo-D14h2JTq.js → vue-ui-gizmo-BKGL0hrf.js} +1 -1
- package/dist/{vue-ui-heatmap-rpR42azQ.js → vue-ui-heatmap-CxupvmxZ.js} +1 -1
- package/dist/{vue-ui-history-plot-Cecn8Oxm.js → vue-ui-history-plot-CRNGUd--.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-VKpzt8eG.js → vue-ui-horizontal-bar-GXt7JlrG.js} +1 -1
- package/dist/{vue-ui-molecule-DlEuruqh.js → vue-ui-molecule-D5MQWvsl.js} +2 -2
- package/dist/{vue-ui-mood-radar-BAP8G4Wj.js → vue-ui-mood-radar-DkwW-6_J.js} +1 -1
- package/dist/{vue-ui-nested-donuts-DSxsX5Vz.js → vue-ui-nested-donuts-Cl2CtNHY.js} +1 -1
- package/dist/{vue-ui-onion-BcFbjgm_.js → vue-ui-onion-BbTd3-9h.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-C-qcnEpN.js → vue-ui-parallel-coordinate-plot-CAuAUcJe.js} +1 -1
- package/dist/{vue-ui-quadrant-ChTRugDc.js → vue-ui-quadrant-CiQOwv_x.js} +1 -1
- package/dist/{vue-ui-quick-chart-CkRSQBoP.js → vue-ui-quick-chart-Db_p50n_.js} +1 -1
- package/dist/{vue-ui-radar-D7h9MmKX.js → vue-ui-radar-Cq0FzSuo.js} +1 -1
- package/dist/{vue-ui-relation-circle-BGSf9_de.js → vue-ui-relation-circle-0TKhiI54.js} +1 -1
- package/dist/{vue-ui-ridgeline-BP3OBUSp.js → vue-ui-ridgeline-BpKSoxMw.js} +1 -1
- package/dist/{vue-ui-rings-bixIaG84.js → vue-ui-rings-vn5kZZRA.js} +1 -1
- package/dist/{vue-ui-scatter-CsbW44rO.js → vue-ui-scatter-CF_h6seO.js} +1 -1
- package/dist/{vue-ui-skeleton-B7FFPfD7.js → vue-ui-skeleton-pcNjmtIm.js} +1 -1
- package/dist/{vue-ui-spark-trend-BWiUSAGV.js → vue-ui-spark-trend-Gwr_mhU3.js} +1 -1
- package/dist/{vue-ui-sparkbar-Y1-PvC2Q.js → vue-ui-sparkbar-Ti79zXlf.js} +1 -1
- package/dist/{vue-ui-sparkgauge-DIOgIo9T.js → vue-ui-sparkgauge-Cw076CAR.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cc45FboV.js → vue-ui-sparkhistogram-DAQatxbk.js} +1 -1
- package/dist/{vue-ui-sparkline-BkxHQO4g.js → vue-ui-sparkline-DIFjHdAd.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-eL00_vqY.js → vue-ui-sparkstackbar-CV48OIlq.js} +1 -1
- package/dist/{vue-ui-stackbar-CCgBPMxT.js → vue-ui-stackbar-iNQuoaFJ.js} +1 -1
- package/dist/{vue-ui-stackline-CrChjJG1.js → vue-ui-stackline-Ba_T3bRL.js} +1 -1
- package/dist/{vue-ui-strip-plot-ChBPDnF4.js → vue-ui-strip-plot-DQHiecxa.js} +1 -1
- package/dist/{vue-ui-table-Bf7ErBf-.js → vue-ui-table-BNvnkqgr.js} +2 -2
- package/dist/{vue-ui-table-sparkline-CQf4nxMY.js → vue-ui-table-sparkline-Z9G-8VPL.js} +1 -1
- package/dist/{vue-ui-thermometer-1vtRLqYp.js → vue-ui-thermometer-NJ6mFchh.js} +1 -1
- package/dist/{vue-ui-timer-C0_Umc6p.js → vue-ui-timer-BzWAHC6N.js} +1 -1
- package/dist/{vue-ui-tiremarks-iijIId_5.js → vue-ui-tiremarks-DUVReJRZ.js} +1 -1
- package/dist/{vue-ui-treemap-vE6a19Mm.js → vue-ui-treemap-pLbU0XEi.js} +1 -1
- package/dist/{vue-ui-waffle-C8kR8CpE.js → vue-ui-waffle-QkCm05fN.js} +1 -1
- package/dist/{vue-ui-wheel-D4OCD06F.js → vue-ui-wheel-DaRAOHXK.js} +1 -1
- package/dist/{vue-ui-word-cloud-Zhi8r9_M.js → vue-ui-word-cloud-CEIaALCH.js} +2 -2
- package/dist/{vue-ui-world-CKdzBshi.js → vue-ui-world-BS0oWBVp.js} +1 -1
- package/dist/{vue-ui-xy-BOzzwSSP.js → vue-ui-xy-l6mUNMUu.js} +1 -1
- package/package.json +1 -1
- package/dist/usePanZoom-DMfuOfaC.js +0 -135
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as e, openBlock as t, toDisplayString as o, unref as r } from "vue";
|
|
2
|
-
const n = "3.9.
|
|
2
|
+
const n = "3.9.1", a = { "aria-hidden": "true" }, p = {
|
|
3
3
|
__name: "PackageVersion",
|
|
4
4
|
setup(s) {
|
|
5
5
|
return (c, i) => (t(), e("desc", a, "Composed with Vue Data UI " + o(r(n)), 1));
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { ref as h, computed as j, onMounted as J, onUnmounted as K, watchEffect as Q, watch as _ } from "vue";
|
|
2
|
+
function R(v, k = { x: 0, y: 0, width: 100, height: 100 }, z = 1, m, D = null) {
|
|
3
|
+
const o = h({ ...k }), n = h({ ...o.value }), i = h(1), E = h(!1), L = h(!1), S = h(0), T = h(null), P = h(1), x = h({ x: 0, y: 0 }), H = j(
|
|
4
|
+
() => n.value.x !== o.value.x || n.value.y !== o.value.y || n.value.width !== o.value.width || n.value.height !== o.value.height
|
|
5
|
+
);
|
|
6
|
+
let y = null;
|
|
7
|
+
function Z(e) {
|
|
8
|
+
if (e.length < 2) return 0;
|
|
9
|
+
const t = e[0].clientX - e[1].clientX, a = e[0].clientY - e[1].clientY;
|
|
10
|
+
return Math.hypot(t, a);
|
|
11
|
+
}
|
|
12
|
+
function Y(e) {
|
|
13
|
+
const t = v.value;
|
|
14
|
+
if (!t) return { x: 0, y: 0 };
|
|
15
|
+
const a = t.createSVGPoint();
|
|
16
|
+
a.x = e.clientX, a.y = e.clientY;
|
|
17
|
+
const l = t.getScreenCTM()?.inverse();
|
|
18
|
+
return l ? a.matrixTransform(l) : { x: 0, y: 0 };
|
|
19
|
+
}
|
|
20
|
+
function I(e, t) {
|
|
21
|
+
const a = v.value;
|
|
22
|
+
if (!a) return { dx: 0, dy: 0 };
|
|
23
|
+
const l = Math.max(1, a.clientWidth), u = Math.max(1, a.clientHeight), s = n.value.width / l, r = n.value.height / u;
|
|
24
|
+
return { dx: e * s, dy: t * r };
|
|
25
|
+
}
|
|
26
|
+
function F(e) {
|
|
27
|
+
E.value = !0;
|
|
28
|
+
const t = e.touches?.[0] || e;
|
|
29
|
+
x.value = { x: t.clientX, y: t.clientY }, v.value && (v.value.style.cursor = "grabbing");
|
|
30
|
+
}
|
|
31
|
+
function X(e) {
|
|
32
|
+
if (!E.value) return;
|
|
33
|
+
const t = e.touches?.[0] || e, a = t.clientX - x.value.x, l = t.clientY - x.value.y;
|
|
34
|
+
if (a === 0 && l === 0) return;
|
|
35
|
+
const { dx: u, dy: s } = I(a, l);
|
|
36
|
+
n.value.x -= u, n.value.y -= s, x.value = { x: t.clientX, y: t.clientY };
|
|
37
|
+
}
|
|
38
|
+
function f() {
|
|
39
|
+
E.value = !1, v.value && (v.value.style.cursor = "");
|
|
40
|
+
}
|
|
41
|
+
function b(e) {
|
|
42
|
+
D && D(), e.preventDefault();
|
|
43
|
+
const t = e.deltaY > 0 ? 0.9 : 1.1;
|
|
44
|
+
w(t, Y(e));
|
|
45
|
+
}
|
|
46
|
+
function A(e) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
const t = Y(e), a = 1.5 * (1 + z / 100);
|
|
49
|
+
q(a, t);
|
|
50
|
+
}
|
|
51
|
+
function q(e, t) {
|
|
52
|
+
y && cancelAnimationFrame(y);
|
|
53
|
+
const a = i.value, l = a * e;
|
|
54
|
+
let u = null;
|
|
55
|
+
const s = 200, r = (d) => d < 0.5 ? 2 * d * d : -1 + (4 - 2 * d) * d, c = (d) => {
|
|
56
|
+
u == null && (u = d);
|
|
57
|
+
const V = Math.min((d - u) / s, 1), U = (a + (l - a) * r(V)) / i.value;
|
|
58
|
+
w(U, t), V < 1 ? y = requestAnimationFrame(c) : y = null;
|
|
59
|
+
};
|
|
60
|
+
requestAnimationFrame(c);
|
|
61
|
+
}
|
|
62
|
+
function w(e, t) {
|
|
63
|
+
const a = i.value * e, l = a / i.value, u = n.value.width / l, s = n.value.height / l, r = (t.x - n.value.x) * (1 - 1 / l), c = (t.y - n.value.y) * (1 - 1 / l);
|
|
64
|
+
n.value.x += r, n.value.y += c, n.value.width = u, n.value.height = s, i.value = a;
|
|
65
|
+
}
|
|
66
|
+
function B(e) {
|
|
67
|
+
e.touches.length === 2 ? (L.value = !0, S.value = Z(e.touches), T.value = { ...n.value }, P.value = i.value) : (e.preventDefault(), F(e));
|
|
68
|
+
}
|
|
69
|
+
function C(e) {
|
|
70
|
+
if (L.value && e.touches.length === 2) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
const t = Z(e.touches);
|
|
73
|
+
if (!S.value || !t) return;
|
|
74
|
+
const a = t / S.value, u = P.value * a / i.value, s = (e.touches[0].clientX + e.touches[1].clientX) / 2, r = (e.touches[0].clientY + e.touches[1].clientY) / 2, c = Y({ clientX: s, clientY: r });
|
|
75
|
+
n.value = { ...T.value }, i.value = P.value, w(u, c);
|
|
76
|
+
} else
|
|
77
|
+
e.preventDefault(), X(e);
|
|
78
|
+
}
|
|
79
|
+
function p(e) {
|
|
80
|
+
e.touches.length < 2 && (L.value = !1), f();
|
|
81
|
+
}
|
|
82
|
+
function W(e = !1) {
|
|
83
|
+
if (!e) {
|
|
84
|
+
n.value = { ...o.value }, i.value = 1;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const t = { ...n.value }, a = i.value, l = 300;
|
|
88
|
+
let u = null;
|
|
89
|
+
const s = (r) => {
|
|
90
|
+
u == null && (u = r);
|
|
91
|
+
const c = Math.min((r - u) / l, 1);
|
|
92
|
+
n.value = {
|
|
93
|
+
x: t.x + (o.value.x - t.x) * c,
|
|
94
|
+
y: t.y + (o.value.y - t.y) * c,
|
|
95
|
+
width: t.width + (o.value.width - t.width) * c,
|
|
96
|
+
height: t.height + (o.value.height - t.height) * c
|
|
97
|
+
}, i.value = a + (1 - a) * c, c < 1 && requestAnimationFrame(s);
|
|
98
|
+
};
|
|
99
|
+
requestAnimationFrame(s);
|
|
100
|
+
}
|
|
101
|
+
function G(e, t = {}) {
|
|
102
|
+
const { overwriteCurrentIfNotZoomed: a = !0 } = t, l = n.value.x !== o.value.x || n.value.y !== o.value.y || n.value.width !== o.value.width || n.value.height !== o.value.height;
|
|
103
|
+
o.value = { ...e }, !l && a && (n.value = { ...o.value }, i.value = 1);
|
|
104
|
+
}
|
|
105
|
+
function M() {
|
|
106
|
+
const e = v.value;
|
|
107
|
+
e && (e.addEventListener("mousedown", F), e.addEventListener("mousemove", X), e.addEventListener("mouseup", f), e.addEventListener("mouseleave", f), e.addEventListener("wheel", b, { passive: !1 }), e.addEventListener("dblclick", A), e.addEventListener("touchstart", B, { passive: !1 }), e.addEventListener("touchmove", C, { passive: !1 }), e.addEventListener("touchend", p), e.addEventListener("touchcancel", p));
|
|
108
|
+
}
|
|
109
|
+
function g() {
|
|
110
|
+
const e = v.value;
|
|
111
|
+
e && (e.removeEventListener("mousedown", F), e.removeEventListener("mousemove", X), e.removeEventListener("mouseup", f), e.removeEventListener("mouseleave", f), e.removeEventListener("wheel", b), e.removeEventListener("dblclick", A), e.removeEventListener("touchstart", B), e.removeEventListener("touchmove", C), e.removeEventListener("touchend", p), e.removeEventListener("touchcancel", p));
|
|
112
|
+
}
|
|
113
|
+
J(() => {
|
|
114
|
+
(!m || m.value) && M();
|
|
115
|
+
}), K(g), Q(() => {
|
|
116
|
+
if (m)
|
|
117
|
+
return m.value ? M() : g(), () => g();
|
|
118
|
+
}), _(v, () => {
|
|
119
|
+
g(), (!m || m.value) && M();
|
|
120
|
+
});
|
|
121
|
+
function N(e, t = !1) {
|
|
122
|
+
const a = {
|
|
123
|
+
x: n.value.x + n.value.width / 2,
|
|
124
|
+
y: n.value.y + n.value.height / 2
|
|
125
|
+
};
|
|
126
|
+
t ? q(e, a) : w(e, a);
|
|
127
|
+
}
|
|
128
|
+
return { viewBox: n, resetZoom: W, isZoom: H, setInitialViewBox: G, scale: i, zoomByFactor: N };
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
R as u
|
|
132
|
+
};
|