vue-data-ui 2.2.92 → 2.2.94
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/index-DZlxUin4.js +57288 -0
- package/dist/{index.es-Dc9Fd4o6.js → index.es-Cgqo-FBk.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-data-ui.js +61 -455
- package/package.json +1 -1
- package/dist/data-table-d-VcuH-r.js +0 -1488
- package/dist/legend-DJCYLsl_.js +0 -61
- package/dist/themes-lgjsYHsH.js +0 -4967
- package/dist/title-BF-9Qcni.js +0 -56
- package/dist/tooltip-D85WEOKi.js +0 -94
- package/dist/user-options-DZgCz8UA.js +0 -415
- package/dist/vue-ui-3d-bar-DW7kGJSz.js +0 -20360
- package/dist/vue-ui-age-pyramid-4hcuKpFY.js +0 -781
- package/dist/vue-ui-annotator-C83FVvl8.js +0 -2175
- package/dist/vue-ui-candlestick-diclGj95.js +0 -807
- package/dist/vue-ui-chestnut-ACetHLdG.js +0 -1049
- package/dist/vue-ui-cursor-Rx7UNaYT.js +0 -229
- package/dist/vue-ui-dashboard-B3PlN0ks.js +0 -231
- package/dist/vue-ui-digits-CxMXID42.js +0 -154
- package/dist/vue-ui-donut-DMiwVXNd.js +0 -1534
- package/dist/vue-ui-dumbbell-B_X1T8TR.js +0 -621
- package/dist/vue-ui-flow-B72wzQ6V.js +0 -451
- package/dist/vue-ui-galaxy-DXX5yivT.js +0 -482
- package/dist/vue-ui-gauge-Cs9PDurH.js +0 -466
- package/dist/vue-ui-heatmap-PcoNSLdN.js +0 -581
- package/dist/vue-ui-kpi-DchEmPtB.js +0 -55
- package/dist/vue-ui-mini-loader-DltJLkqy.js +0 -131
- package/dist/vue-ui-molecule-CWvukBzs.js +0 -746
- package/dist/vue-ui-mood-radar-DEfdtIi8.js +0 -544
- package/dist/vue-ui-nested-donuts-9URpqgXE.js +0 -768
- package/dist/vue-ui-onion-C0eowUT6.js +0 -551
- package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +0 -647
- package/dist/vue-ui-quadrant-_ddVAm9V.js +0 -1174
- package/dist/vue-ui-quick-chart-Cio0hDYO.js +0 -1310
- package/dist/vue-ui-radar-Dyg38i33.js +0 -853
- package/dist/vue-ui-rating-CE1Lmwd2.js +0 -271
- package/dist/vue-ui-relation-circle-BMlB3k3d.js +0 -303
- package/dist/vue-ui-rings-BuXeijvb.js +0 -507
- package/dist/vue-ui-scatter-B1hZfOua.js +0 -870
- package/dist/vue-ui-screenshot-0QXgxzGs.js +0 -160
- package/dist/vue-ui-smiley-B7kR7exr.js +0 -763
- package/dist/vue-ui-spark-trend-BmL2KiYL.js +0 -245
- package/dist/vue-ui-sparkgauge-BMzFv14L.js +0 -158
- package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +0 -243
- package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +0 -244
- package/dist/vue-ui-strip-plot-DyN6P0JO.js +0 -614
- package/dist/vue-ui-table-DM3zL89q.js +0 -2180
- package/dist/vue-ui-table-heatmap-gWx0Nslu.js +0 -237
- package/dist/vue-ui-thermometer-Bcqv5kd_.js +0 -384
- package/dist/vue-ui-timer-BIFxjujK.js +0 -451
- package/dist/vue-ui-tiremarks-zBwHpED_.js +0 -248
- package/dist/vue-ui-treemap-BaplVc_z.js +0 -719
- package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +0 -734
- package/dist/vue-ui-waffle-COOzH7M3.js +0 -635
- package/dist/vue-ui-wheel-BEpuVTBk.js +0 -226
- package/dist/vue-ui-word-cloud-DNqxAAiX.js +0 -344
- package/dist/vue-ui-xy-_mHq-czW.js +0 -2058
- package/dist/vue-ui-xy-canvas-DqX8Gee5.js +0 -1003
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { ref as i, computed as N, openBlock as V, createElementBlock as U, nextTick as G } from "vue";
|
|
2
|
-
import { t as K, c as P } from "./data-table-d-VcuH-r.js";
|
|
3
|
-
import { u as q, h as J } from "./vue-ui-3d-bar-DW7kGJSz.js";
|
|
4
|
-
const te = {
|
|
5
|
-
__name: "vue-ui-screenshot",
|
|
6
|
-
props: {
|
|
7
|
-
config: {
|
|
8
|
-
type: Object,
|
|
9
|
-
default() {
|
|
10
|
-
return {};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
emits: ["postImage"],
|
|
15
|
-
setup(Y, { expose: z, emit: H }) {
|
|
16
|
-
const k = Y, { vue_ui_screenshot: C } = q(), $ = i(`vue-ui-screenshot-${Math.random()}`), n = N(() => {
|
|
17
|
-
if (!Object.keys(k.config || {}).length)
|
|
18
|
-
return C;
|
|
19
|
-
const e = K({
|
|
20
|
-
defaultConfig: C,
|
|
21
|
-
userConfig: k.config
|
|
22
|
-
});
|
|
23
|
-
return P(e);
|
|
24
|
-
}), a = i(null), d = i(null), v = i(null), B = i(null), M = i(null), y = i(null), h = i(null), p = i(null), m = i(null), b = i(null), x = i(null), w = i(!1), S = i(null);
|
|
25
|
-
function T() {
|
|
26
|
-
const e = document.createElement("DIV"), { innerWidth: t, innerHeight: l } = window;
|
|
27
|
-
return e.style.position = "fixed", e.style.top = `${l ? l / 2 - n.value.style.captureArea.initialHeight / 2 : 200}px`, e.style.left = `${t ? t / 2 - n.value.style.captureArea.initialWidth / 2 : 100}px`, e.style.width = `${n.value.style.captureArea.initialWidth}px`, e.style.height = `${n.value.style.captureArea.initialHeight}px`, e.style.background = n.value.style.captureArea.background, e.style.cursor = "move", e.style.boxSizing = "border-box", e.style.border = n.value.style.captureArea.border, e.style.resize = "both", e.style.padding = "none !important", e.style.margin = "none !important", e.dataset.cy = "screenshot-overlay", e;
|
|
28
|
-
}
|
|
29
|
-
function E() {
|
|
30
|
-
a.value && (clearTimeout(S.value), a.value.remove(), a.value = null);
|
|
31
|
-
}
|
|
32
|
-
function R(e) {
|
|
33
|
-
const t = document.createElement("DIV");
|
|
34
|
-
t.classList.add("vue-ui-screenshot-info-text"), t.innerHTML = n.value.translations.info, t.dataset.html2canvasIgnore = "true", t.dataset.cy = "screenshot-info-text", t.style.background = n.value.style.info.background, t.style.color = n.value.style.info.color, t.style.fontWeight = n.value.style.info.bold ? "bold" : "normal", t.style.minWidth = `${n.value.style.info.minWidth}px`, t.style.left = "50%", t.style.padding = `${n.value.style.info.padding}px`, t.style.position = "absolute", t.style.textAlign = "center", t.style.top = `${n.value.style.info.top}px`, t.style.transform = "translateX(-50%)", t.style.borderRadius = `${n.value.style.info.borderRadius}px`, t.style.boxShadow = n.value.style.info.boxShadow, t.style.fontFamily = n.value.style.info.fontFamily, t.style.fontSize = `${n.value.style.info.fontSize}px`, t.style.border = n.value.style.info.border, t.style.userSelect = "none";
|
|
35
|
-
const l = document.createElement("BUTTON");
|
|
36
|
-
l.classList.add("vue-ui-screenshot-close-button"), l.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>', l.style.outline = "none", l.dataset.cy = "screenshot-close-button", l.style.display = "flex", l.style.cursor = "pointer", l.style.borderRadius = "50%", l.style.alignItems = "center", l.style.position = "absolute", l.style.justifyContent = "center", l.style.transformOrigin = "center", l.style.top = `${n.value.style.cancelButton.top}px`, l.style.right = `${n.value.style.cancelButton.right}px`, l.style.background = n.value.style.cancelButton.background, l.style.color = n.value.style.cancelButton.color, l.style.border = n.value.style.cancelButton.border, l.style.borderRadius = `${n.value.style.cancelButton.borderRadius}px`, l.style.height = `${n.value.style.cancelButton.size}px`, l.style.width = `${n.value.style.cancelButton.size}px`, l.addEventListener("click", E), t.appendChild(l), e.appendChild(t);
|
|
37
|
-
}
|
|
38
|
-
function I(e) {
|
|
39
|
-
a.value && (w.value = !0, e.touches ? (y.value = e.touches[0].clientX, h.value = e.touches[0].clientY) : (y.value = e.clientX, h.value = e.clientY), b.value = a.value.getBoundingClientRect().width, x.value = a.value.getBoundingClientRect().height, e.target.addEventListener("mousemove", L), e.target.addEventListener("touchmove", L));
|
|
40
|
-
}
|
|
41
|
-
function L(e) {
|
|
42
|
-
if (!a.value) return;
|
|
43
|
-
let t, l;
|
|
44
|
-
e.touches ? (p.value = e.touches[0].clientX, t = e.touches[0].clientX, m.value = e.touches[0].clientY, l = e.touches[0].clientY) : (p.value = e.clientX, t = e.clientX, m.value = e.clientY, l = e.clientY);
|
|
45
|
-
const u = e.target.classList[0], s = a.value.style;
|
|
46
|
-
switch (!0) {
|
|
47
|
-
case u === "vue-ui-screenshot-handle-nw":
|
|
48
|
-
s.top = `${l}px`, s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
|
|
49
|
-
break;
|
|
50
|
-
case u === "vue-ui-screenshot-handle-ne":
|
|
51
|
-
s.top = `${l}px`, s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (h.value - m.value)}px`;
|
|
52
|
-
break;
|
|
53
|
-
case u === "vue-ui-screenshot-handle-sw":
|
|
54
|
-
s.left = `${t}px`, s.width = `${b.value + (y.value - p.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
|
|
55
|
-
break;
|
|
56
|
-
case u === "vue-ui-screenshot-handle-se":
|
|
57
|
-
s.width = `${b.value + (p.value - y.value)}px`, s.height = `${x.value + (m.value - h.value)}px`;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function X(e) {
|
|
62
|
-
if (!a.value) return;
|
|
63
|
-
e.stopPropagation();
|
|
64
|
-
const t = Array.from(e.target.classList);
|
|
65
|
-
t.includes("vue-ui-screenshot-handle-se") || t.includes("vue-ui-screenshot-handle-sw") || t.includes("vue-ui-screenshot-handle-nw") || t.includes("vue-ui-screenshot-handle-ne") || (w.value = !0, a.value.style.pointerEvents = "auto", e.touches ? (d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (d.value = e.clientX, v.value = e.clientY), B.value = d.value, M.value = v.value, document.addEventListener("mousemove", g), document.addEventListener("touchmove", g), document.addEventListener("mouseup", f), document.addEventListener("touchend", f));
|
|
66
|
-
}
|
|
67
|
-
function f() {
|
|
68
|
-
d.value = null, v.value = null, B.value = null, M.value = null, w.value = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchmove", g), document.removeEventListener("touchend", f);
|
|
69
|
-
}
|
|
70
|
-
function g(e) {
|
|
71
|
-
if (!a.value) return;
|
|
72
|
-
const t = a.value.getBoundingClientRect();
|
|
73
|
-
let l, u;
|
|
74
|
-
e.touches ? (l = e.touches[0].clientX - d.value, u = e.touches[0].clientY - v.value, d.value = e.touches[0].clientX, v.value = e.touches[0].clientY) : (l = e.clientX - d.value, u = e.clientY - v.value, d.value = e.clientX, v.value = e.clientY), a.value.style.top = `${t.top + u}px`, a.value.style.left = `${t.left + l}px`;
|
|
75
|
-
}
|
|
76
|
-
function A(e) {
|
|
77
|
-
e.target.removeEventListener("mousemove", L), e.target.removeEventListener("touchmove", L), document.removeEventListener("mousemove", g), document.removeEventListener("touchmove", g), document.removeEventListener("mouseup", f), document.removeEventListener("touchend", f), w.value = !1;
|
|
78
|
-
}
|
|
79
|
-
function W() {
|
|
80
|
-
const e = navigator.userAgent;
|
|
81
|
-
return /(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e) ? "tablet" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(
|
|
82
|
-
e
|
|
83
|
-
) ? "mobile" : "desktop";
|
|
84
|
-
}
|
|
85
|
-
function D() {
|
|
86
|
-
const e = document.getElementById(`vue-ui-screenshot-button-${$.value}`);
|
|
87
|
-
e.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
88
|
-
<path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
|
|
89
|
-
</svg>`, document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([
|
|
90
|
-
{ opacity: "0.3" },
|
|
91
|
-
{ opacity: "1" },
|
|
92
|
-
{ opacity: "0.3" }
|
|
93
|
-
], { duration: 1e3, iterations: 1 / 0 }), e.classList.add("loading"), e.setAttribute("disabled", "true");
|
|
94
|
-
}
|
|
95
|
-
function O() {
|
|
96
|
-
if (!a.value) return;
|
|
97
|
-
D();
|
|
98
|
-
const e = a.value.getBoundingClientRect();
|
|
99
|
-
S.value = setTimeout(() => {
|
|
100
|
-
J(document.body, {
|
|
101
|
-
allowTaint: !0,
|
|
102
|
-
width: e.width,
|
|
103
|
-
height: e.height,
|
|
104
|
-
x: e.left + window.scrollX,
|
|
105
|
-
y: e.top + window.scrollY,
|
|
106
|
-
useCORS: !0,
|
|
107
|
-
scale: n.value.quality
|
|
108
|
-
}).then((t) => {
|
|
109
|
-
const l = t.toDataURL("image/png", 1), u = l.split(",")[1], c = atob(u).length / 1024;
|
|
110
|
-
if (n.value.mode === "download") {
|
|
111
|
-
const o = document.createElement("a");
|
|
112
|
-
o.download = "screenshot.png", o.href = l, o.click();
|
|
113
|
-
}
|
|
114
|
-
n.value.mode === "post" && H("postImage", {
|
|
115
|
-
createdAt: Date.now(),
|
|
116
|
-
fileSize: `${c.toFixed(2)} KB`,
|
|
117
|
-
image: l,
|
|
118
|
-
x: e.left + window.scrollX,
|
|
119
|
-
y: e.top + window.scrollY,
|
|
120
|
-
screenWidth: window.innerWidth > 0 ? window.innerWidth : screen.width,
|
|
121
|
-
deviceType: W()
|
|
122
|
-
});
|
|
123
|
-
}).finally(E);
|
|
124
|
-
}, 10);
|
|
125
|
-
}
|
|
126
|
-
function _(e) {
|
|
127
|
-
const t = n.value.style.handles.size / 2 + 4, l = document.createElement("DIV");
|
|
128
|
-
l.style.top = `${-t}px`, l.style.left = `${-t}px`, l.style.cursor = "nw-resize", l.classList.add("vue-ui-screenshot-handle-nw"), l.dataset.cy = "screenshot-handle-nw";
|
|
129
|
-
const u = document.createElement("DIV");
|
|
130
|
-
u.style.top = `${-t}px`, u.style.left = "auto", u.style.right = `${-t}px`, u.style.cursor = "ne-resize", u.classList.add("vue-ui-screenshot-handle-ne"), u.dataset.cy = "screenshot-handle-ne";
|
|
131
|
-
const s = document.createElement("DIV");
|
|
132
|
-
s.style.top = "auto", s.style.bottom = `${-t}px`, s.style.left = `${-t}px`, s.style.cursor = "sw-resize", s.classList.add("vue-ui-screenshot-handle-sw"), s.dataset.cy = "screenshot-handle-sw";
|
|
133
|
-
const c = document.createElement("DIV");
|
|
134
|
-
c.style.top = "auto", c.style.left = "auto", c.style.right = `${-t}px`, c.style.bottom = `${-t}px`, c.style.cursor = "se-resize", c.classList.add("vue-ui-screenshot-handle-se"), c.dataset.cy = "screenshot-handle-se";
|
|
135
|
-
const o = document.createElement("BUTTON");
|
|
136
|
-
o.innerHTML = `<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`, o.classList.add("vue-ui-screenshot-capture-button"), o.id = `vue-ui-screenshot-button-${$.value}`, o.style.position = "absolute", o.style.top = "50%", o.style.left = "50%", o.style.transform = "translate(-50%,-50%)", o.style.background = n.value.style.captureButton.background, o.style.color = n.value.style.captureButton.color, o.style.border = n.value.style.captureButton.border, o.style.outline = "none", o.style.cursor = "pointer", o.style.padding = n.value.style.captureButton.padding, o.style.fontFamily = n.value.style.captureButton.fontFamily, o.style.fontSize = `${n.value.style.captureButton.fontSize}px`, o.style.minHeight = `${n.value.style.captureButton.minHeight}px`, o.style.width = "fit-content", o.style.display = "flex", o.style.alignItems = "center", o.style.justifyContent = "center", o.style.gap = "3px", o.style.borderRadius = `${n.value.style.captureButton.borderRadius}px`, o.style.boxShadow = n.value.style.captureButton.boxShadow, o.style.userSelect = "none", o.style.opacity = "0.95", o.style.textAlign = "left", o.style.fontWeight = n.value.style.captureButton.bold ? "bold" : "normal", o.dataset.cy = "screenshot-save-button", o.addEventListener("mouseenter", () => {
|
|
137
|
-
o.style.opacity = "1";
|
|
138
|
-
}), o.addEventListener("mouseleave", () => {
|
|
139
|
-
o.style.opacity = "0.95";
|
|
140
|
-
}), o.addEventListener("click", O), e.appendChild(o), [l, u, s, c].forEach((r, j) => {
|
|
141
|
-
r.classList.add(`handle-${j}`), r.dataset.html2canvasIgnore = "true", r.style.position = "absolute", r.style.height = `${n.value.style.handles.size}px`, r.style.width = `${n.value.style.handles.size}px`, r.style.background = n.value.style.handles.background, r.style.border = n.value.style.handles.border, r.style.borderRadius = `${n.value.style.handles.borderRadius}px`, r.style.pointerEvents = "auto !important", r.addEventListener("mousedown", I), r.addEventListener("touchstart", I), e.appendChild(r);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
function F() {
|
|
145
|
-
a.value || G(() => {
|
|
146
|
-
const e = T();
|
|
147
|
-
e.dataset.html2canvasIgnore = !0, R(e), _(e), a.value = e, e.addEventListener("touchmove", function(t) {
|
|
148
|
-
t.preventDefault();
|
|
149
|
-
}, { passive: !1 }), document.body.appendChild(e), document.addEventListener("mousedown", X), document.addEventListener("touchstart", X), document.addEventListener("mouseup", A), document.addEventListener("touchend", A);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
return z({
|
|
153
|
-
shoot: F,
|
|
154
|
-
close: E
|
|
155
|
-
}), (e, t) => (V(), U("div"));
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
export {
|
|
159
|
-
te as default
|
|
160
|
-
};
|