vue-data-ui 2.3.3 → 2.3.5
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 +19 -15
- package/dist/Arrow-BSOdhAJO.cjs +1 -0
- package/dist/Arrow-BjDVSrfA.js +101 -0
- package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
- package/dist/BaseIcon-vmmfWlyR.js +174 -0
- package/dist/DataTable-CaB7GIwQ.js +127 -0
- package/dist/DataTable-ssrNbONo.cjs +1 -0
- package/dist/Legend-DHpoRTAE.js +62 -0
- package/dist/Legend-Dl5IYoxK.cjs +1 -0
- package/dist/Shape-CQT4S7N-.js +107 -0
- package/dist/Shape-CaF4pvOn.cjs +1 -0
- package/dist/Slicer-Bdb1BlrC.js +156 -0
- package/dist/Slicer-QC8nTm24.cjs +1 -0
- package/dist/Title-BNPZwnkp.js +46 -0
- package/dist/Title-Cj_xubjI.cjs +1 -0
- package/dist/Tooltip-CdJ5hegk.cjs +1 -0
- package/dist/Tooltip-ZnJAz6dl.js +94 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/documentation/installation.md +14 -13
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-BMCvLyab.js +10369 -0
- package/dist/index-BkomIE9L.cjs +4 -0
- package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +105 -5
- package/dist/types/vue-data-ui.d.ts +105 -5
- package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
- package/dist/useNestedProp-CkP8xhG_.js +13 -0
- package/dist/usePrinter-BuuBz5JR.js +513 -0
- package/dist/usePrinter-r6uHYEcR.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
- package/dist/vue-data-ui-DxeO0iaC.js +254 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +61 -59
- package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
- package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
- package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
- package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
- package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
- package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
- package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
- package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
- package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
- package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
- package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
- package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
- package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
- package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
- package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
- package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
- package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
- package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
- package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
- package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
- package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
- package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
- package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
- package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
- package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
- package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
- package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
- package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
- package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
- package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
- package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
- package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
- package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
- package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
- package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
- package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
- package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
- package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
- package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
- package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
- package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
- package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
- package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
- package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
- package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
- package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
- package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
- package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
- package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
- package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
- package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
- package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
- package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
- package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
- package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
- package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
- package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
- package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
- package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
- package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
- package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
- package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
- package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
- package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
- package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
- package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
- package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
- package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
- package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
- package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
- package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
- package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
- package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
- package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
- package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
- package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
- package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
- package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
- package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
- package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
- package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
- package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
- package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
- package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
- package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
- package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
- package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
- package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
- package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
- package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
- package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
- package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
- package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
- package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
- package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
- package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
- package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
- package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
- package/dist/vue-ui-xy-qToggEfh.js +2064 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { ref as k, onMounted as q, onBeforeUnmount as H, withDirectives as R, openBlock as t, createElementBlock as s, normalizeStyle as d, createElementVNode as w, withModifiers as x, withKeys as G, createVNode as J, normalizeClass as c, renderSlot as m, Fragment as M, createBlock as f, toDisplayString as $, createCommentVNode as u, normalizeProps as h, mergeProps as z, unref as Q } from "vue";
|
|
2
|
+
import v from "./BaseIcon-vmmfWlyR.js";
|
|
3
|
+
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { p as Z } from "./pdf-97UbtKC2.js";
|
|
5
|
+
import _ from "./html2canvas.esm-d2sM-0Wm.js";
|
|
6
|
+
const ee = {
|
|
7
|
+
beforeMount(e, r) {
|
|
8
|
+
e.clickOutsideEvent = function(i) {
|
|
9
|
+
e === i.target || e.contains(i.target) || r.value(i);
|
|
10
|
+
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
11
|
+
},
|
|
12
|
+
unmounted(e) {
|
|
13
|
+
document.removeEventListener("click", e.clickOutsideEvent);
|
|
14
|
+
}
|
|
15
|
+
}, te = ["title", "onClick", "onKeypress"], oe = ["data-open"], ne = {
|
|
16
|
+
__name: "UserOptions",
|
|
17
|
+
props: {
|
|
18
|
+
hasPdf: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
hasXls: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
hasImg: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
hasLabel: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
isLabelActive: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
hasTable: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
hasSort: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
hasStack: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
hasTooltip: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
color: {
|
|
55
|
+
type: String
|
|
56
|
+
},
|
|
57
|
+
backgroundColor: {
|
|
58
|
+
type: String
|
|
59
|
+
},
|
|
60
|
+
isPrinting: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
},
|
|
64
|
+
isImaging: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
title: {
|
|
69
|
+
type: String
|
|
70
|
+
},
|
|
71
|
+
uid: {
|
|
72
|
+
type: String
|
|
73
|
+
},
|
|
74
|
+
hasFullscreen: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
77
|
+
},
|
|
78
|
+
chartElement: {
|
|
79
|
+
type: HTMLElement,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
isFullscreen: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !1
|
|
85
|
+
},
|
|
86
|
+
isStacked: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !1
|
|
89
|
+
},
|
|
90
|
+
isTooltip: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
},
|
|
94
|
+
hasAnimation: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
isAnimation: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
102
|
+
titles: {
|
|
103
|
+
type: Object,
|
|
104
|
+
default() {
|
|
105
|
+
return {};
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
showTooltips: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: !0
|
|
111
|
+
},
|
|
112
|
+
zIndex: {
|
|
113
|
+
type: Number,
|
|
114
|
+
default: 1
|
|
115
|
+
},
|
|
116
|
+
noOffset: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !1
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
emits: ["generatePdf", "generateCsv", "generateImage", "toggleTable", "toggleLabels", "toggleSort", "toggleFullscreen", "toggleStack", "toggleTooltip", "toggleAnimation"],
|
|
122
|
+
setup(e, { emit: r }) {
|
|
123
|
+
const i = e;
|
|
124
|
+
function T() {
|
|
125
|
+
r("generatePdf");
|
|
126
|
+
}
|
|
127
|
+
function S() {
|
|
128
|
+
r("generateCsv");
|
|
129
|
+
}
|
|
130
|
+
function C() {
|
|
131
|
+
r("generateImage");
|
|
132
|
+
}
|
|
133
|
+
const b = k(!1);
|
|
134
|
+
function D() {
|
|
135
|
+
b.value = !b.value, r("toggleTable");
|
|
136
|
+
}
|
|
137
|
+
const B = k(!1), U = k(!0);
|
|
138
|
+
function F() {
|
|
139
|
+
g.value = window.innerWidth > 600, B.value = !B.value, B.value && (U.value = !1);
|
|
140
|
+
}
|
|
141
|
+
function K() {
|
|
142
|
+
i.isPrinting || i.isImaging || (B.value = !1);
|
|
143
|
+
}
|
|
144
|
+
function N() {
|
|
145
|
+
B.value && K();
|
|
146
|
+
}
|
|
147
|
+
const p = k(i.isLabelActive);
|
|
148
|
+
function V() {
|
|
149
|
+
p.value = !p.value, r("toggleLabels");
|
|
150
|
+
}
|
|
151
|
+
const I = k(i.isAnimation);
|
|
152
|
+
function P() {
|
|
153
|
+
I.value = !I.value, r("toggleAnimation");
|
|
154
|
+
}
|
|
155
|
+
function j() {
|
|
156
|
+
r("toggleSort");
|
|
157
|
+
}
|
|
158
|
+
const E = k(i.isStacked);
|
|
159
|
+
function W() {
|
|
160
|
+
E.value = !E.value, r("toggleStack");
|
|
161
|
+
}
|
|
162
|
+
const L = k(i.isTooltip);
|
|
163
|
+
function X() {
|
|
164
|
+
L.value = !L.value, r("toggleTooltip");
|
|
165
|
+
}
|
|
166
|
+
const y = k(!1);
|
|
167
|
+
function A(n) {
|
|
168
|
+
i.chartElement && (n === "in" ? (y.value = !0, i.chartElement.requestFullscreen(), r("toggleFullscreen", !0)) : (y.value = !1, document && document.exitFullscreen(), r("toggleFullscreen", !1)));
|
|
169
|
+
}
|
|
170
|
+
function O(n) {
|
|
171
|
+
document.fullscreenElement ? y.value = !0 : y.value = !1;
|
|
172
|
+
}
|
|
173
|
+
q(() => {
|
|
174
|
+
document.addEventListener("fullscreenchange", O);
|
|
175
|
+
}), H(() => {
|
|
176
|
+
document.removeEventListener("fullscreenchange", O);
|
|
177
|
+
});
|
|
178
|
+
const g = k(window.innerWidth > 600), l = k({
|
|
179
|
+
tooltip: !1,
|
|
180
|
+
pdf: !1,
|
|
181
|
+
csv: !1,
|
|
182
|
+
img: !1,
|
|
183
|
+
table: !1,
|
|
184
|
+
labels: !1,
|
|
185
|
+
sort: !1,
|
|
186
|
+
stack: !1,
|
|
187
|
+
fullscreen: !1,
|
|
188
|
+
animation: !1
|
|
189
|
+
});
|
|
190
|
+
return (n, o) => R((t(), s("div", {
|
|
191
|
+
"data-html2canvas-ignore": "",
|
|
192
|
+
class: "vue-ui-user-options",
|
|
193
|
+
style: d(`z-index: ${e.zIndex}; height: 34px; position: ${y.value ? "fixed" : "absolute"}; top: 0; right:${y.value ? "12px" : "0"}; padding: 4px; background:transparent;`)
|
|
194
|
+
}, [
|
|
195
|
+
w("div", {
|
|
196
|
+
tabindex: "0",
|
|
197
|
+
title: B.value ? e.titles.close || "" : e.titles.open || "",
|
|
198
|
+
style: d(`width:32px; position: absolute; top: 0; right: ${e.noOffset ? 0 : 4}px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${e.backgroundColor}`),
|
|
199
|
+
onClick: x(F, ["stop"]),
|
|
200
|
+
onKeypress: G(F, ["enter"])
|
|
201
|
+
}, [
|
|
202
|
+
J(v, {
|
|
203
|
+
name: B.value ? "close" : "menu",
|
|
204
|
+
stroke: "#CCCCCC",
|
|
205
|
+
"stroke-width": 2
|
|
206
|
+
}, null, 8, ["name"])
|
|
207
|
+
], 44, te),
|
|
208
|
+
w("div", {
|
|
209
|
+
"data-open": B.value,
|
|
210
|
+
class: c({ "vue-ui-user-options-drawer": !0 }),
|
|
211
|
+
style: d(`background:${e.backgroundColor}; right:${e.noOffset ? 0 : 4}px`)
|
|
212
|
+
}, [
|
|
213
|
+
e.hasTooltip ? (t(), s("button", {
|
|
214
|
+
key: 0,
|
|
215
|
+
tabindex: "0",
|
|
216
|
+
class: "vue-ui-user-options-button",
|
|
217
|
+
onClick: X,
|
|
218
|
+
onMouseenter: o[0] || (o[0] = (a) => l.value.tooltip = !0),
|
|
219
|
+
onMouseout: o[1] || (o[1] = (a) => l.value.tooltip = !1)
|
|
220
|
+
}, [
|
|
221
|
+
n.$slots.optionTooltip ? m(n.$slots, "optionTooltip", { key: 0 }, void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
222
|
+
L.value ? (t(), f(v, {
|
|
223
|
+
key: 0,
|
|
224
|
+
name: "tooltip",
|
|
225
|
+
stroke: e.color,
|
|
226
|
+
style: { "pointer-events": "none" }
|
|
227
|
+
}, null, 8, ["stroke"])) : (t(), f(v, {
|
|
228
|
+
key: 1,
|
|
229
|
+
name: "tooltipDisabled",
|
|
230
|
+
stroke: e.color,
|
|
231
|
+
style: { "pointer-events": "none" }
|
|
232
|
+
}, null, 8, ["stroke"]))
|
|
233
|
+
], 64)),
|
|
234
|
+
g.value && e.titles.tooltip && !n.$slots.optionTooltip ? (t(), s("div", {
|
|
235
|
+
key: 2,
|
|
236
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.tooltip }),
|
|
237
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
238
|
+
}, $(e.titles.tooltip), 7)) : u("", !0)
|
|
239
|
+
], 32)) : u("", !0),
|
|
240
|
+
e.hasPdf ? (t(), s("button", {
|
|
241
|
+
key: 1,
|
|
242
|
+
tabindex: "0",
|
|
243
|
+
class: "vue-ui-user-options-button",
|
|
244
|
+
onClick: T,
|
|
245
|
+
onMouseenter: o[2] || (o[2] = (a) => l.value.pdf = !0),
|
|
246
|
+
onMouseout: o[3] || (o[3] = (a) => l.value.pdf = !1)
|
|
247
|
+
}, [
|
|
248
|
+
n.$slots.optionPdf ? m(n.$slots, "optionPdf", { key: 0 }, void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
249
|
+
e.isPrinting ? (t(), f(v, {
|
|
250
|
+
key: 0,
|
|
251
|
+
name: "spin",
|
|
252
|
+
isSpin: "",
|
|
253
|
+
stroke: e.color,
|
|
254
|
+
style: { "pointer-events": "none" }
|
|
255
|
+
}, null, 8, ["stroke"])) : (t(), f(v, {
|
|
256
|
+
key: 1,
|
|
257
|
+
name: "pdf",
|
|
258
|
+
stroke: e.color,
|
|
259
|
+
style: { "pointer-events": "none" }
|
|
260
|
+
}, null, 8, ["stroke"]))
|
|
261
|
+
], 64)),
|
|
262
|
+
g.value && e.titles.pdf && !n.$slots.optionPdf ? (t(), s("div", {
|
|
263
|
+
key: 2,
|
|
264
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.pdf }),
|
|
265
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
266
|
+
}, $(e.titles.pdf), 7)) : u("", !0)
|
|
267
|
+
], 32)) : u("", !0),
|
|
268
|
+
e.hasXls ? (t(), s("button", {
|
|
269
|
+
key: 2,
|
|
270
|
+
tabindex: "0",
|
|
271
|
+
class: "vue-ui-user-options-button",
|
|
272
|
+
onClick: S,
|
|
273
|
+
onMouseenter: o[4] || (o[4] = (a) => l.value.csv = !0),
|
|
274
|
+
onMouseout: o[5] || (o[5] = (a) => l.value.csv = !1)
|
|
275
|
+
}, [
|
|
276
|
+
n.$slots.optionCsv ? m(n.$slots, "optionCsv", { key: 0 }, void 0, !0) : (t(), f(v, {
|
|
277
|
+
key: 1,
|
|
278
|
+
name: "excel",
|
|
279
|
+
stroke: e.color,
|
|
280
|
+
style: { "pointer-events": "none" }
|
|
281
|
+
}, null, 8, ["stroke"])),
|
|
282
|
+
g.value && e.titles.csv && !n.$slots.optionCsv ? (t(), s("div", {
|
|
283
|
+
key: 2,
|
|
284
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.csv }),
|
|
285
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
286
|
+
}, $(e.titles.csv), 7)) : u("", !0)
|
|
287
|
+
], 32)) : u("", !0),
|
|
288
|
+
e.hasImg ? (t(), s("button", {
|
|
289
|
+
key: 3,
|
|
290
|
+
tabindex: "0",
|
|
291
|
+
class: "vue-ui-user-options-button",
|
|
292
|
+
onClick: C,
|
|
293
|
+
onMouseenter: o[6] || (o[6] = (a) => l.value.img = !0),
|
|
294
|
+
onMouseout: o[7] || (o[7] = (a) => l.value.img = !1)
|
|
295
|
+
}, [
|
|
296
|
+
n.$slots.optionImg ? m(n.$slots, "optionImg", { key: 0 }, void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
297
|
+
e.isImaging ? (t(), f(v, {
|
|
298
|
+
key: 0,
|
|
299
|
+
name: "spin",
|
|
300
|
+
isSpin: "",
|
|
301
|
+
stroke: e.color,
|
|
302
|
+
style: { "pointer-events": "none" }
|
|
303
|
+
}, null, 8, ["stroke"])) : (t(), f(v, {
|
|
304
|
+
key: 1,
|
|
305
|
+
name: "image",
|
|
306
|
+
stroke: e.color,
|
|
307
|
+
style: { "pointer-events": "none" }
|
|
308
|
+
}, null, 8, ["stroke"]))
|
|
309
|
+
], 64)),
|
|
310
|
+
g.value && e.titles.img && !n.$slots.optionImg ? (t(), s("div", {
|
|
311
|
+
key: 2,
|
|
312
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.img }),
|
|
313
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
314
|
+
}, $(e.titles.img), 7)) : u("", !0)
|
|
315
|
+
], 32)) : u("", !0),
|
|
316
|
+
e.hasTable ? (t(), s("button", {
|
|
317
|
+
key: 4,
|
|
318
|
+
tabindex: "0",
|
|
319
|
+
class: "vue-ui-user-options-button",
|
|
320
|
+
onClick: D,
|
|
321
|
+
onMouseenter: o[8] || (o[8] = (a) => l.value.table = !0),
|
|
322
|
+
onMouseout: o[9] || (o[9] = (a) => l.value.table = !1)
|
|
323
|
+
}, [
|
|
324
|
+
n.$slots.optionTable ? m(n.$slots, "optionTable", { key: 0 }, void 0, !0) : (t(), f(v, {
|
|
325
|
+
key: 1,
|
|
326
|
+
name: b.value ? "tableClose" : "tableOpen",
|
|
327
|
+
stroke: e.color,
|
|
328
|
+
style: { "pointer-events": "none" }
|
|
329
|
+
}, null, 8, ["name", "stroke"])),
|
|
330
|
+
g.value && e.titles.table && !n.$slots.optionTable ? (t(), s("div", {
|
|
331
|
+
key: 2,
|
|
332
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.table }),
|
|
333
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
334
|
+
}, $(e.titles.table), 7)) : u("", !0)
|
|
335
|
+
], 32)) : u("", !0),
|
|
336
|
+
e.hasLabel ? (t(), s("button", {
|
|
337
|
+
key: 5,
|
|
338
|
+
tabindex: "0",
|
|
339
|
+
class: "vue-ui-user-options-button",
|
|
340
|
+
onClick: V,
|
|
341
|
+
onMouseenter: o[10] || (o[10] = (a) => l.value.labels = !0),
|
|
342
|
+
onMouseout: o[11] || (o[11] = (a) => l.value.labels = !1)
|
|
343
|
+
}, [
|
|
344
|
+
n.$slots.optionLabels ? m(n.$slots, "optionLabels", { key: 0 }, void 0, !0) : (t(), f(v, {
|
|
345
|
+
key: 1,
|
|
346
|
+
name: p.value ? "labelClose" : "labelOpen",
|
|
347
|
+
stroke: e.color,
|
|
348
|
+
style: { "pointer-events": "none" }
|
|
349
|
+
}, null, 8, ["name", "stroke"])),
|
|
350
|
+
g.value && e.titles.labels && !n.$slots.optionLabels ? (t(), s("div", {
|
|
351
|
+
key: 2,
|
|
352
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.labels }),
|
|
353
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
354
|
+
}, $(e.titles.labels), 7)) : u("", !0)
|
|
355
|
+
], 32)) : u("", !0),
|
|
356
|
+
e.hasSort ? (t(), s("button", {
|
|
357
|
+
key: 6,
|
|
358
|
+
tabindex: "0",
|
|
359
|
+
class: "vue-ui-user-options-button",
|
|
360
|
+
onClick: j,
|
|
361
|
+
onMouseenter: o[12] || (o[12] = (a) => l.value.sort = !0),
|
|
362
|
+
onMouseout: o[13] || (o[13] = (a) => l.value.sort = !1)
|
|
363
|
+
}, [
|
|
364
|
+
n.$slots.optionSort ? m(n.$slots, "optionSort", { key: 0 }, void 0, !0) : (t(), f(v, {
|
|
365
|
+
key: 1,
|
|
366
|
+
name: "sort",
|
|
367
|
+
stroke: e.color,
|
|
368
|
+
style: { "pointer-events": "none" }
|
|
369
|
+
}, null, 8, ["stroke"])),
|
|
370
|
+
g.value && e.titles.sort && !n.$slots.optionSort ? (t(), s("div", {
|
|
371
|
+
key: 2,
|
|
372
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.sort }),
|
|
373
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
374
|
+
}, $(e.titles.sort), 7)) : u("", !0)
|
|
375
|
+
], 32)) : u("", !0),
|
|
376
|
+
e.hasStack ? (t(), s("button", {
|
|
377
|
+
key: 7,
|
|
378
|
+
tabindex: "0",
|
|
379
|
+
class: "vue-ui-user-options-button",
|
|
380
|
+
onClick: W,
|
|
381
|
+
onMouseenter: o[14] || (o[14] = (a) => l.value.stack = !0),
|
|
382
|
+
onMouseout: o[15] || (o[15] = (a) => l.value.stack = !1)
|
|
383
|
+
}, [
|
|
384
|
+
n.$slots.optionStack ? m(n.$slots, "optionStack", { key: 0 }, void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
385
|
+
E.value ? (t(), f(v, {
|
|
386
|
+
key: 0,
|
|
387
|
+
name: "unstack",
|
|
388
|
+
stroke: e.color,
|
|
389
|
+
style: { "pointer-events": "none" }
|
|
390
|
+
}, null, 8, ["stroke"])) : (t(), f(v, {
|
|
391
|
+
key: 1,
|
|
392
|
+
name: "stack",
|
|
393
|
+
stroke: e.color,
|
|
394
|
+
style: { "pointer-events": "none" }
|
|
395
|
+
}, null, 8, ["stroke"]))
|
|
396
|
+
], 64)),
|
|
397
|
+
g.value && e.titles.stack && !n.$slots.optionStack ? (t(), s("div", {
|
|
398
|
+
key: 2,
|
|
399
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.stack }),
|
|
400
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
401
|
+
}, $(e.titles.stack), 7)) : u("", !0)
|
|
402
|
+
], 32)) : u("", !0),
|
|
403
|
+
e.hasFullscreen ? (t(), s("button", {
|
|
404
|
+
key: 8,
|
|
405
|
+
tabindex: "0",
|
|
406
|
+
class: "vue-ui-user-options-button",
|
|
407
|
+
onMouseenter: o[16] || (o[16] = (a) => l.value.fullscreen = !0),
|
|
408
|
+
onMouseout: o[17] || (o[17] = (a) => l.value.fullscreen = !1),
|
|
409
|
+
onClick: o[18] || (o[18] = (a) => A(y.value ? "out" : "in"))
|
|
410
|
+
}, [
|
|
411
|
+
n.$slots.optionFullscreen ? m(n.$slots, "optionFullscreen", h(z({ key: 0 }, { toggleFullscreen: A, isFullscreen: y.value })), void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
412
|
+
y.value ? (t(), f(v, {
|
|
413
|
+
key: 0,
|
|
414
|
+
name: "exitFullscreen",
|
|
415
|
+
stroke: e.color,
|
|
416
|
+
style: { "pointer-events": "none" }
|
|
417
|
+
}, null, 8, ["stroke"])) : u("", !0),
|
|
418
|
+
y.value ? u("", !0) : (t(), f(v, {
|
|
419
|
+
key: 1,
|
|
420
|
+
name: "fullscreen",
|
|
421
|
+
stroke: e.color,
|
|
422
|
+
style: { "pointer-events": "none" }
|
|
423
|
+
}, null, 8, ["stroke"]))
|
|
424
|
+
], 64)),
|
|
425
|
+
g.value && e.titles.fullscreen && !n.$slots.optionFullscreen ? (t(), s("div", {
|
|
426
|
+
key: 2,
|
|
427
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.fullscreen }),
|
|
428
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
429
|
+
}, $(e.titles.fullscreen), 7)) : u("", !0)
|
|
430
|
+
], 32)) : u("", !0),
|
|
431
|
+
e.hasAnimation ? (t(), s("button", {
|
|
432
|
+
key: 9,
|
|
433
|
+
tabindex: "0",
|
|
434
|
+
class: "vue-ui-user-options-button",
|
|
435
|
+
onMouseenter: o[19] || (o[19] = (a) => l.value.animation = !0),
|
|
436
|
+
onMouseout: o[20] || (o[20] = (a) => l.value.animation = !1),
|
|
437
|
+
onClick: P
|
|
438
|
+
}, [
|
|
439
|
+
n.$slots.optionAnimation ? m(n.$slots, "optionAnimation", h(z({ key: 0 }, { toggleAnimation: P, isAnimated: I.value })), void 0, !0) : (t(), s(M, { key: 1 }, [
|
|
440
|
+
I.value ? (t(), f(v, {
|
|
441
|
+
key: 0,
|
|
442
|
+
name: "play",
|
|
443
|
+
stroke: e.color,
|
|
444
|
+
style: { "pointer-events": "none" }
|
|
445
|
+
}, null, 8, ["stroke"])) : u("", !0),
|
|
446
|
+
I.value ? u("", !0) : (t(), f(v, {
|
|
447
|
+
key: 1,
|
|
448
|
+
name: "pause",
|
|
449
|
+
stroke: e.color,
|
|
450
|
+
style: { "pointer-events": "none" }
|
|
451
|
+
}, null, 8, ["stroke"]))
|
|
452
|
+
], 64)),
|
|
453
|
+
g.value && e.titles.fullscreen && !n.$slots.optionAnimation ? (t(), s("div", {
|
|
454
|
+
key: 2,
|
|
455
|
+
class: c({ "button-info": !0, "button-info-visible": l.value.animation }),
|
|
456
|
+
style: d({ background: e.backgroundColor, color: e.color })
|
|
457
|
+
}, $(e.titles.animation), 7)) : u("", !0)
|
|
458
|
+
], 32)) : u("", !0)
|
|
459
|
+
], 12, oe)
|
|
460
|
+
], 4)), [
|
|
461
|
+
[Q(ee), N]
|
|
462
|
+
]);
|
|
463
|
+
}
|
|
464
|
+
}, ve = /* @__PURE__ */ Y(ne, [["__scopeId", "data-v-d4402778"]]);
|
|
465
|
+
function le({ domElement: e, fileName: r, format: i = "png" }) {
|
|
466
|
+
if (e)
|
|
467
|
+
return new Promise((T, S) => {
|
|
468
|
+
const C = document.createElement("a");
|
|
469
|
+
_(e, { scale: 2 }).then((b) => {
|
|
470
|
+
C.href = b.toDataURL(`image/${i}`), C.download = `${r}.${i}`, C.click(), C && C.remove(), T();
|
|
471
|
+
}).catch((b) => {
|
|
472
|
+
console.error("Error generating image:", b), S(b);
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
function fe({
|
|
477
|
+
elementId: e,
|
|
478
|
+
fileName: r
|
|
479
|
+
}) {
|
|
480
|
+
const i = k(!1), T = k(!1), S = k(null);
|
|
481
|
+
function C() {
|
|
482
|
+
i.value = !0, clearTimeout(S.value), S.value = setTimeout(() => {
|
|
483
|
+
Z({
|
|
484
|
+
domElement: document.getElementById(e),
|
|
485
|
+
fileName: r
|
|
486
|
+
}).finally(() => {
|
|
487
|
+
i.value = !1;
|
|
488
|
+
});
|
|
489
|
+
}, 100);
|
|
490
|
+
}
|
|
491
|
+
function b() {
|
|
492
|
+
T.value = !0, clearTimeout(S.value), S.value = setTimeout(() => {
|
|
493
|
+
le({
|
|
494
|
+
domElement: document.getElementById(e),
|
|
495
|
+
fileName: r,
|
|
496
|
+
format: "png"
|
|
497
|
+
}).finally(() => {
|
|
498
|
+
T.value = !1;
|
|
499
|
+
}, 100);
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
return {
|
|
503
|
+
generatePdf: C,
|
|
504
|
+
generateImage: b,
|
|
505
|
+
isPrinting: i,
|
|
506
|
+
isImaging: T
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
export {
|
|
510
|
+
ve as U,
|
|
511
|
+
le as s,
|
|
512
|
+
fe as u
|
|
513
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),i=require("./BaseIcon-BoKtpbrI.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=require("./pdf-Cz3729tZ.cjs"),O=require("./html2canvas.esm-BA_v9SIU.cjs"),w={beforeMount(t,u){t.clickOutsideEvent=function(s){t===s.target||t.contains(s.target)||u.value(s)},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.removeEventListener("click",t.clickOutsideEvent)}},D=["title","onClick","onKeypress"],h=["data-open"],q={__name:"UserOptions",props:{hasPdf:{type:Boolean,default:!0},hasXls:{type:Boolean,default:!0},hasImg:{type:Boolean,default:!1},hasLabel:{type:Boolean,default:!1},isLabelActive:{type:Boolean,default:!1},hasTable:{type:Boolean,default:!1},hasSort:{type:Boolean,default:!1},hasStack:{type:Boolean,default:!1},hasTooltip:{type:Boolean,default:!1},color:{type:String},backgroundColor:{type:String},isPrinting:{type:Boolean,default:!1},isImaging:{type:Boolean,default:!1},title:{type:String},uid:{type:String},hasFullscreen:{type:Boolean,default:!1},chartElement:{type:HTMLElement,default:null},isFullscreen:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!1},hasAnimation:{type:Boolean,default:!1},isAnimation:{type:Boolean,default:!1},titles:{type:Object,default(){return{}}},showTooltips:{type:Boolean,default:!0},zIndex:{type:Number,default:1},noOffset:{type:Boolean,default:!1}},emits:["generatePdf","generateCsv","generateImage","toggleTable","toggleLabels","toggleSort","toggleFullscreen","toggleStack","toggleTooltip","toggleAnimation"],setup(t,{emit:u}){const s=t;function v(){u("generatePdf")}function f(){u("generateCsv")}function d(){u("generateImage")}const c=e.ref(!1);function z(){c.value=!c.value,u("toggleTable")}const m=e.ref(!1),V=e.ref(!0);function C(){r.value=window.innerWidth>600,m.value=!m.value,m.value&&(V.value=!1)}function N(){s.isPrinting||s.isImaging||(m.value=!1)}function T(){m.value&&N()}const y=e.ref(s.isLabelActive);function I(){y.value=!y.value,u("toggleLabels")}const g=e.ref(s.isAnimation);function p(){g.value=!g.value,u("toggleAnimation")}function M(){u("toggleSort")}const b=e.ref(s.isStacked);function F(){b.value=!b.value,u("toggleStack")}const B=e.ref(s.isTooltip);function P(){B.value=!B.value,u("toggleTooltip")}const k=e.ref(!1);function $(l){s.chartElement&&(l==="in"?(k.value=!0,s.chartElement.requestFullscreen(),u("toggleFullscreen",!0)):(k.value=!1,document&&document.exitFullscreen(),u("toggleFullscreen",!1)))}function S(l){document.fullscreenElement?k.value=!0:k.value=!1}e.onMounted(()=>{document.addEventListener("fullscreenchange",S)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",S)});const r=e.ref(window.innerWidth>600),n=e.ref({tooltip:!1,pdf:!1,csv:!1,img:!1,table:!1,labels:!1,sort:!1,stack:!1,fullscreen:!1,animation:!1});return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{"data-html2canvas-ignore":"",class:"vue-ui-user-options",style:e.normalizeStyle(`z-index: ${t.zIndex}; height: 34px; position: ${k.value?"fixed":"absolute"}; top: 0; right:${k.value?"12px":"0"}; padding: 4px; background:transparent;`)},[e.createElementVNode("div",{tabindex:"0",title:m.value?t.titles.close||"":t.titles.open||"",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right: ${t.noOffset?0:4}px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${t.backgroundColor}`),onClick:e.withModifiers(C,["stop"]),onKeypress:e.withKeys(C,["enter"])},[e.createVNode(i.default,{name:m.value?"close":"menu",stroke:"#CCCCCC","stroke-width":2},null,8,["name"])],44,D),e.createElementVNode("div",{"data-open":m.value,class:e.normalizeClass({"vue-ui-user-options-drawer":!0}),style:e.normalizeStyle(`background:${t.backgroundColor}; right:${t.noOffset?0:4}px`)},[t.hasTooltip?(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",class:"vue-ui-user-options-button",onClick:P,onMouseenter:o[0]||(o[0]=a=>n.value.tooltip=!0),onMouseout:o[1]||(o[1]=a=>n.value.tooltip=!1)},[l.$slots.optionTooltip?e.renderSlot(l.$slots,"optionTooltip",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"tooltip",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"tooltipDisabled",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.tooltip&&!l.$slots.optionTooltip?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.tooltip}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.tooltip),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasPdf?(e.openBlock(),e.createElementBlock("button",{key:1,tabindex:"0",class:"vue-ui-user-options-button",onClick:v,onMouseenter:o[2]||(o[2]=a=>n.value.pdf=!0),onMouseout:o[3]||(o[3]=a=>n.value.pdf=!1)},[l.$slots.optionPdf?e.renderSlot(l.$slots,"optionPdf",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isPrinting?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pdf",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.pdf&&!l.$slots.optionPdf?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.pdf}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.pdf),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasXls?(e.openBlock(),e.createElementBlock("button",{key:2,tabindex:"0",class:"vue-ui-user-options-button",onClick:f,onMouseenter:o[4]||(o[4]=a=>n.value.csv=!0),onMouseout:o[5]||(o[5]=a=>n.value.csv=!1)},[l.$slots.optionCsv?e.renderSlot(l.$slots,"optionCsv",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"excel",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.csv&&!l.$slots.optionCsv?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.csv}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.csv),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasImg?(e.openBlock(),e.createElementBlock("button",{key:3,tabindex:"0",class:"vue-ui-user-options-button",onClick:d,onMouseenter:o[6]||(o[6]=a=>n.value.img=!0),onMouseout:o[7]||(o[7]=a=>n.value.img=!1)},[l.$slots.optionImg?e.renderSlot(l.$slots,"optionImg",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isImaging?(e.openBlock(),e.createBlock(i.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"image",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.img&&!l.$slots.optionImg?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.img}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.img),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasTable?(e.openBlock(),e.createElementBlock("button",{key:4,tabindex:"0",class:"vue-ui-user-options-button",onClick:z,onMouseenter:o[8]||(o[8]=a=>n.value.table=!0),onMouseout:o[9]||(o[9]=a=>n.value.table=!1)},[l.$slots.optionTable?e.renderSlot(l.$slots,"optionTable",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:c.value?"tableClose":"tableOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.table&&!l.$slots.optionTable?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.table}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.table),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasLabel?(e.openBlock(),e.createElementBlock("button",{key:5,tabindex:"0",class:"vue-ui-user-options-button",onClick:I,onMouseenter:o[10]||(o[10]=a=>n.value.labels=!0),onMouseout:o[11]||(o[11]=a=>n.value.labels=!1)},[l.$slots.optionLabels?e.renderSlot(l.$slots,"optionLabels",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:y.value?"labelClose":"labelOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),r.value&&t.titles.labels&&!l.$slots.optionLabels?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.labels}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.labels),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasSort?(e.openBlock(),e.createElementBlock("button",{key:6,tabindex:"0",class:"vue-ui-user-options-button",onClick:M,onMouseenter:o[12]||(o[12]=a=>n.value.sort=!0),onMouseout:o[13]||(o[13]=a=>n.value.sort=!1)},[l.$slots.optionSort?e.renderSlot(l.$slots,"optionSort",{key:0},void 0,!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"sort",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),r.value&&t.titles.sort&&!l.$slots.optionSort?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.sort}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.sort),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasStack?(e.openBlock(),e.createElementBlock("button",{key:7,tabindex:"0",class:"vue-ui-user-options-button",onClick:F,onMouseenter:o[14]||(o[14]=a=>n.value.stack=!0),onMouseout:o[15]||(o[15]=a=>n.value.stack=!1)},[l.$slots.optionStack?e.renderSlot(l.$slots,"optionStack",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"unstack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(i.default,{key:1,name:"stack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.stack&&!l.$slots.optionStack?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.stack}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.stack),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasFullscreen?(e.openBlock(),e.createElementBlock("button",{key:8,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[16]||(o[16]=a=>n.value.fullscreen=!0),onMouseout:o[17]||(o[17]=a=>n.value.fullscreen=!1),onClick:o[18]||(o[18]=a=>$(k.value?"out":"in"))},[l.$slots.optionFullscreen?e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.mergeProps({key:0},{toggleFullscreen:$,isFullscreen:k.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"exitFullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"fullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionFullscreen?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.fullscreen}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.fullscreen),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasAnimation?(e.openBlock(),e.createElementBlock("button",{key:9,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[19]||(o[19]=a=>n.value.animation=!0),onMouseout:o[20]||(o[20]=a=>n.value.animation=!1),onClick:p},[l.$slots.optionAnimation?e.renderSlot(l.$slots,"optionAnimation",e.normalizeProps(e.mergeProps({key:0},{toggleAnimation:p,isAnimated:g.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g.value?(e.openBlock(),e.createBlock(i.default,{key:0,name:"play",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,name:"pause",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),r.value&&t.titles.fullscreen&&!l.$slots.optionAnimation?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.animation}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.animation),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)],12,h)],4)),[[e.unref(w),T]])}},U=L._export_sfc(q,[["__scopeId","data-v-d4402778"]]);function E({domElement:t,fileName:u,format:s="png"}){if(t)return new Promise((v,f)=>{const d=document.createElement("a");O.default(t,{scale:2}).then(c=>{d.href=c.toDataURL(`image/${s}`),d.download=`${u}.${s}`,d.click(),d&&d.remove(),v()}).catch(c=>{console.error("Error generating image:",c),f(c)})})}function K({elementId:t,fileName:u}){const s=e.ref(!1),v=e.ref(!1),f=e.ref(null);function d(){s.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{A.pdf({domElement:document.getElementById(t),fileName:u}).finally(()=>{s.value=!1})},100)}function c(){v.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{E({domElement:document.getElementById(t),fileName:u,format:"png"}).finally(()=>{v.value=!1},100)})}return{generatePdf:d,generateImage:c,isPrinting:s,isImaging:v}}exports.UserOptions=U;exports.saveAsImage=E;exports.usePrinter=K;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function b(e,i,o,t={}){if(o<=0)return;e.save();const{color:s="black",lineWidth:u=1,lineCap:d="round",lineJoin:f="round",lineDash:w=null,lineDashoffset:r=0,shadowColor:l=null,shadowBlur:a=0,shadowOffsetX:y=0,shadowOffsetY:g=0,fillStyle:N="#FFFFFF"}=t;e.beginPath(),e.arc(i.x,i.y,o,0,2*Math.PI),e.strokeStyle=s,e.lineWidth=u,e.lineCap=d,e.lineJoin=f,w&&(e.setLineDash(w),e.lineDashoffset=r),l&&(e.shadowColor=l,e.shadowOffsetX=y,e.shadowOffsetY=g),a&&(e.shadowBlur=a),N&&(e.fillStyle=N),e.fillStyle&&e.fill(),e.stroke(),e.restore()}function C(e,i,o={}){if(!i.length)return;e.save();const{color:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,shadowColor:r=null,shadowBlur:l=0,shadowOffsetX:a=0,shadowOffsetY:y=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let g=1;g<i.length;g+=1)e.lineTo(i[g].x,i[g].y);e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),r&&(e.shadowColor=r,e.shadowOffsetX=a,e.shadowOffsetY=y),l&&(e.shadowBlur=l),e.stroke(),e.restore()}function m(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,fillColor:r=null,gradient:l=null,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),l.start.r||0,h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else r&&(e.fillStyle=r);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function L(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,fillColor:r=null,gradient:l=null,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),l.start.r||0,h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else r&&(e.fillStyle=r);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function I(e,i,o,t,s={}){e.save();const{font:u="16px sans-serif",color:d="black",align:f="start",baseline:w="alphabetic",maxWidth:r=void 0,rotation:l=0,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0,strokeColor:n=null,lineWidth:p=1}=s;e.font=u,e.fillStyle=d,e.textAlign=f,e.textBaseline=w,a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),n&&(e.strokeStyle=n,e.lineWidth=p),l!==0&&(e.translate(o,t),e.rotate(Math.PI/180*l),e.translate(-o,-t)),e.fillText(i,o,t,r),n&&e.strokeText(i,o,t,r),e.restore()}function O(e,i=20){let o;return function(...t){const s=this;o||(e.apply(s,t),o=!0,setTimeout(()=>o=!1,i))}}function E(e,i,o=!1){let t;return function(...s){const u=this,d=function(){t=null,o||e.apply(u,s)},f=o&&!t;clearTimeout(t),t=setTimeout(d,i),f&&e.apply(u,s)}}function k(e){const i=document.createElement("canvas");return i.width=e.width||1,i.height=e.height||1,e.width||(e.width=1),e.height||(e.height=1),i.getContext("2d").drawImage(e,0,0),i}function h(e,i){return[null,void 0,NaN,1/0,-1/0].includes(e)?i:e}function M({chart:e,title:i=null,slicer:o=null,legend:t=null}){let s=0,u=0;if(e){const d=e.parentNode,{height:f,width:w}=d.getBoundingClientRect();let r=0,l=0,a=0;i&&(r=i.getBoundingClientRect().height),o&&(l=o.getBoundingClientRect().height),t&&(a=t.getBoundingClientRect().height),s=f-r-l-a,u=w}return{width:u,height:s}}exports.circle=b;exports.cloneCanvas=k;exports.debounce=E;exports.line=C;exports.polygon=m;exports.rect=L;exports.text=I;exports.throttle=O;exports.useResponsive=M;
|