vue-data-ui 2.2.89 → 2.2.91

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.
Files changed (60) hide show
  1. package/dist/data-table-d-VcuH-r.js +1488 -0
  2. package/dist/{index.es-5fba9ad2.js → index.es-Dc9Fd4o6.js} +173 -301
  3. package/dist/legend-DJCYLsl_.js +61 -0
  4. package/dist/{purify.es-00041b4f.js → purify.es-BwOkayRK.js} +9 -18
  5. package/dist/style.css +1 -1
  6. package/dist/themes-lgjsYHsH.js +4967 -0
  7. package/dist/title-BF-9Qcni.js +56 -0
  8. package/dist/tooltip-D85WEOKi.js +94 -0
  9. package/dist/types/vue-data-ui.d.ts +3 -0
  10. package/dist/user-options-DZgCz8UA.js +415 -0
  11. package/dist/vue-data-ui.js +455 -62
  12. package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
  13. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
  14. package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
  15. package/dist/vue-ui-candlestick-diclGj95.js +807 -0
  16. package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
  17. package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
  18. package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
  19. package/dist/vue-ui-digits-CxMXID42.js +154 -0
  20. package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
  21. package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
  22. package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
  23. package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
  24. package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
  25. package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
  26. package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
  27. package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
  28. package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
  29. package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
  30. package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
  31. package/dist/vue-ui-onion-C0eowUT6.js +551 -0
  32. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
  33. package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
  34. package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
  35. package/dist/vue-ui-radar-Dyg38i33.js +853 -0
  36. package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
  37. package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
  38. package/dist/vue-ui-rings-BuXeijvb.js +507 -0
  39. package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
  40. package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
  41. package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
  42. package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
  43. package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
  44. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
  45. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
  46. package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
  47. package/dist/vue-ui-table-DM3zL89q.js +2180 -0
  48. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
  49. package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
  50. package/dist/vue-ui-timer-BIFxjujK.js +451 -0
  51. package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
  52. package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
  53. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
  54. package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
  55. package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
  56. package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
  57. package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
  58. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
  59. package/package.json +5 -5
  60. package/dist/index-fb63a0e3.js +0 -58150
@@ -0,0 +1,160 @@
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
+ };