vue-data-ui 2.3.3 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-BcMihqI4.cjs +0 -843
  148. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1,453 @@
1
+ import { ref as d, onMounted as q, onBeforeUnmount as J, computed as D, openBlock as r, createElementBlock as u, normalizeStyle as f, createVNode as _, createCommentVNode as p, unref as K, createElementVNode as M, mergeProps as E, renderSlot as N, normalizeProps as B, guardReactiveProps as j, toDisplayString as Q } from "vue";
2
+ import { u as Y } from "./useNestedProp-BgWkUab_.js";
3
+ import { u as Z, c as ee, X as te, B as O } from "./index-uOtklCCx.js";
4
+ import { t as ae, u as se } from "./useResponsive-NZB-WLRF.js";
5
+ import x from "./BaseIcon-7_g11dRj.js";
6
+ import { _ as le } from "./Title-2iks1ziC.js";
7
+ import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ class re {
9
+ constructor(F, w, I, z = !0, C = !0) {
10
+ this.interval = w, this.elapsed = 0, this.isPaused = !1;
11
+ const $ = `
12
+ let interval;
13
+ let elapsed = 0;
14
+ let paused = false;
15
+ let startTime;
16
+ let tickInterval;
17
+
18
+ onmessage = function(e) {
19
+ const { action, data } = e.data;
20
+
21
+ switch(action) {
22
+ case 'start':
23
+ startTime = Date.now();
24
+ tickInterval = data.interval;
25
+ elapsed = 0;
26
+ paused = false;
27
+ interval = setInterval(() => {
28
+ elapsed += tickInterval;
29
+ postMessage({ elapsed, timestamp: Date.now() });
30
+ }, tickInterval);
31
+ break;
32
+
33
+ case 'pause':
34
+ paused = true;
35
+ clearInterval(interval);
36
+ elapsed = Date.now() - startTime;
37
+ break;
38
+
39
+ case 'resume':
40
+ if (paused) {
41
+ startTime = Date.now() - elapsed;
42
+ interval = setInterval(() => {
43
+ elapsed += tickInterval;
44
+ postMessage({ elapsed, timestamp: Date.now() });
45
+ }, tickInterval);
46
+ }
47
+ paused = false;
48
+ break;
49
+
50
+ case 'stop':
51
+ clearInterval(interval);
52
+ elapsed = 0;
53
+ postMessage({ elapsed });
54
+ break;
55
+
56
+ case 'reset':
57
+ elapsed = 0;
58
+ clearInterval(interval);
59
+ postMessage({ elapsed });
60
+ break;
61
+
62
+ case 'lap':
63
+ postMessage({
64
+ elapsed,
65
+ timestamp: Date.now(),
66
+ action: 'lap'
67
+ });
68
+ break;
69
+
70
+ default:
71
+ break;
72
+ }
73
+ };
74
+ `, P = new Blob([$], { type: "application/javascript" }), m = URL.createObjectURL(P), n = new Worker(m);
75
+ function e(h) {
76
+ let t = Math.floor(h / 1e3), i = Math.floor(h % 1e3 / 10), v = Math.floor(t / 3600), k = Math.floor(t % 3600 / 60), a = t % 60, l = "";
77
+ return C && (l += String(v).padStart(2, "0") + ":"), l += String(k).padStart(2, "0") + ":", l += String(a).padStart(2, "0"), z && (l += "." + String(i).padStart(2, "0")), l;
78
+ }
79
+ this.start = () => {
80
+ this.isPaused = !1, n.postMessage({ action: "start", data: { interval: this.interval } });
81
+ }, this.pause = () => {
82
+ this.isPaused ? this.resume() : (this.isPaused = !0, n.postMessage({ action: "pause" }));
83
+ }, this.resume = () => {
84
+ this.isPaused && (n.postMessage({ action: "resume" }), this.isPaused = !1);
85
+ }, this.stop = () => {
86
+ n.postMessage({ action: "stop" }), this.isPaused = !1;
87
+ }, this.reset = () => {
88
+ n.postMessage({ action: "reset" }), this.elapsed = 0, this.isPaused = !1;
89
+ }, this.restart = () => {
90
+ this.stop(), this.start();
91
+ }, this.lap = () => new Promise((h) => {
92
+ n.postMessage({ action: "lap" });
93
+ const t = (i) => {
94
+ const { elapsed: v, timestamp: k, action: a } = i.data;
95
+ if (a === "lap") {
96
+ const l = e(v);
97
+ h({
98
+ timestamp: k || 0,
99
+ elapsed: v,
100
+ formatted: l
101
+ });
102
+ }
103
+ };
104
+ n.addEventListener("message", t, { once: !0 });
105
+ }), n.onmessage = (h) => {
106
+ const { elapsed: t, timestamp: i } = h.data;
107
+ this.elapsed = t, F({
108
+ timestamp: i || 0,
109
+ elapsed: this.elapsed,
110
+ formatted: e(this.elapsed)
111
+ });
112
+ }, n.onerror = (h) => {
113
+ I && I(h);
114
+ };
115
+ }
116
+ }
117
+ const ue = ["xmlns", "viewBox"], ie = { key: 0 }, ne = ["id"], ce = ["stop-color"], de = ["stop-color"], he = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ve = ["d", "stroke", "stroke-width"], pe = ["r", "fill", "stroke", "stroke-width"], fe = ["r", "fill", "stroke", "stroke-width"], we = ["x", "y"], ke = ["x", "y", "font-size", "fill", "font-weight"], ge = {
118
+ key: 0,
119
+ class: "vue-ui-timer-controls"
120
+ }, me = ["title"], ye = ["title"], be = ["title"], _e = ["title"], Me = ["title"], Ce = {
121
+ __name: "vue-ui-timer",
122
+ props: {
123
+ config: {
124
+ type: Object,
125
+ default() {
126
+ return {};
127
+ }
128
+ }
129
+ },
130
+ emits: ["start", "pause", "reset", "restart", "lap"],
131
+ setup(U, { expose: F, emit: w }) {
132
+ const I = U, { vue_ui_timer: z } = Z(), C = d(null), $ = d(null), P = d(null), m = d(null), n = d(ee());
133
+ q(() => {
134
+ if (e.value.responsive) {
135
+ const s = ae(() => {
136
+ const { width: o, height: c } = se({
137
+ chart: C.value,
138
+ title: e.value.style.title.text ? $.value : null,
139
+ legend: P.value
140
+ });
141
+ t.value.width = o, t.value.height = c, t.value.tracker.core = O({
142
+ relator: Math.min(o, c),
143
+ adjuster: e.value.style.width,
144
+ source: 6 * e.value.stopwatch.tracker.radiusRatio,
145
+ threshold: 1,
146
+ fallback: 1
147
+ }), t.value.tracker.aura = O({
148
+ relator: Math.min(o, c),
149
+ adjuster: e.value.style.width,
150
+ source: 12 * e.value.stopwatch.tracker.aura.radiusRatio,
151
+ threshold: 1,
152
+ fallback: 1
153
+ }), t.value.label = O({
154
+ relator: Math.min(o, c),
155
+ adjuster: e.value.style.width,
156
+ source: e.value.stopwatch.label.fontSize,
157
+ threshold: 10,
158
+ fallback: 10
159
+ });
160
+ });
161
+ m.value = new ResizeObserver(s), m.value.observe(C.value.parentNode);
162
+ }
163
+ }), J(() => {
164
+ m.value && m.value.disconnect();
165
+ });
166
+ const e = D(() => Y({
167
+ userConfig: I.config,
168
+ defaultConfig: z
169
+ })), h = D(() => {
170
+ if (e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
171
+ return "00:00:00.00";
172
+ if (e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
173
+ return "00:00:00";
174
+ if (!e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
175
+ return "00:00.00";
176
+ if (!e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
177
+ return "00:00";
178
+ }), t = d({
179
+ height: e.value.style.height,
180
+ width: e.value.style.width,
181
+ tracker: {
182
+ core: 6 * e.value.stopwatch.tracker.radiusRatio,
183
+ aura: 12 * e.value.stopwatch.tracker.aura.radiusRatio
184
+ },
185
+ label: e.value.stopwatch.label.fontSize
186
+ }), i = d(0), v = new re(
187
+ (s) => W(s),
188
+ 10,
189
+ "",
190
+ e.value.stopwatch.showHundredth,
191
+ e.value.stopwatch.showHours
192
+ ), k = d(!0), a = d(!1), l = d(!1);
193
+ function R() {
194
+ w("start"), k.value && v.start(), k.value = !1, a.value = !0;
195
+ }
196
+ function A() {
197
+ a.value && (w("reset"), v.stop(), y.value = [], k.value = !0, a.value = !1);
198
+ }
199
+ function H() {
200
+ l.value = !l.value, w("pause", i.value), v.pause();
201
+ }
202
+ function L() {
203
+ a.value && (l.value = !1, w("restart"), y.value = [], v.restart());
204
+ }
205
+ const y = d([]);
206
+ async function S() {
207
+ if (!a.value || l.value) return;
208
+ const s = await v.lap();
209
+ s && (y.value.push(s), w("lap", y.value));
210
+ }
211
+ function W({ timestamp: s, elapsed: o, formatted: c }) {
212
+ i.value = { timestamp: s, elapsed: o, formatted: c };
213
+ }
214
+ const g = D(() => Math.min(t.value.width, t.value.height) / 2.5 * e.value.stopwatch.track.radiusRatio);
215
+ function G(s, o) {
216
+ const T = 360 / (o * 1e3);
217
+ return s * T % 360;
218
+ }
219
+ function V(s) {
220
+ let o = s * (Math.PI / 180), c = t.value.width / 2 + g.value * Math.cos(o), T = t.value.height / 2 + g.value * Math.sin(o);
221
+ return { cx: c, cy: T };
222
+ }
223
+ const b = D(() => {
224
+ const s = G(i.value.elapsed, e.value.stopwatch.cycleSeconds), { cx: o, cy: c } = V(s - 90), T = s > 180 ? 1 : 0;
225
+ return {
226
+ cx: o || t.value.width / 2,
227
+ cy: c || t.value.height / 2 - g.value,
228
+ largeArcFlag: T,
229
+ sweepFlag: 1
230
+ };
231
+ });
232
+ return F({
233
+ start: R,
234
+ pause: H,
235
+ reset: A,
236
+ restart: L,
237
+ lap: S
238
+ }), (s, o) => (r(), u("div", {
239
+ ref_key: "timerChart",
240
+ ref: C,
241
+ class: "vue-ui-timer",
242
+ style: f({
243
+ fontFamily: e.value.style.fontFamily,
244
+ width: "100%",
245
+ height: e.value.responsive ? "100%" : "auto",
246
+ textAlign: "center"
247
+ })
248
+ }, [
249
+ e.value.style.title.text ? (r(), u("div", {
250
+ key: 0,
251
+ ref_key: "chartTitle",
252
+ ref: $,
253
+ style: f({
254
+ width: "100%",
255
+ background: e.value.style.backgroundColor
256
+ })
257
+ }, [
258
+ _(le, {
259
+ config: {
260
+ title: {
261
+ cy: "title",
262
+ ...e.value.style.title
263
+ },
264
+ subtitle: {
265
+ cy: "subtitle",
266
+ ...e.value.style.title.subtitle
267
+ }
268
+ }
269
+ }, null, 8, ["config"])
270
+ ], 4)) : p("", !0),
271
+ (r(), u("svg", {
272
+ xmlns: K(te),
273
+ viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
274
+ style: f({
275
+ maxWidth: "100%",
276
+ overflow: "visible",
277
+ background: e.value.style.backgroundColor
278
+ })
279
+ }, [
280
+ e.value.stopwatch.tracker.gradient.show ? (r(), u("defs", ie, [
281
+ M("radialGradient", {
282
+ id: `tracker_gradient_${n.value}`,
283
+ cx: "50%",
284
+ cy: "50%",
285
+ r: "50%",
286
+ fx: "50%",
287
+ fy: "50%"
288
+ }, [
289
+ M("stop", {
290
+ offset: "0%",
291
+ "stop-color": e.value.stopwatch.tracker.gradient.color
292
+ }, null, 8, ce),
293
+ M("stop", {
294
+ offset: "100%",
295
+ "stop-color": e.value.stopwatch.tracker.fill
296
+ }, null, 8, de)
297
+ ], 8, ne)
298
+ ])) : p("", !0),
299
+ M("circle", {
300
+ cx: t.value.width / 2,
301
+ cy: t.value.height / 2,
302
+ r: g.value,
303
+ fill: e.value.stopwatch.track.fill,
304
+ stroke: e.value.stopwatch.track.stroke,
305
+ "stroke-width": e.value.stopwatch.track.strokeWidth
306
+ }, null, 8, he),
307
+ e.value.stopwatch.cycleTrack.show ? (r(), u("path", {
308
+ key: 1,
309
+ d: `M ${t.value.width / 2},${t.value.height / 2 - g.value} A ${g.value},${g.value} 0 ${b.value.largeArcFlag},${b.value.sweepFlag} ${b.value.cx},${b.value.cy}`,
310
+ stroke: e.value.stopwatch.cycleTrack.stroke,
311
+ "stroke-width": e.value.stopwatch.cycleTrack.strokeWidth,
312
+ "stroke-linecap": "round",
313
+ fill: "none"
314
+ }, null, 8, ve)) : p("", !0),
315
+ M("circle", E(b.value, {
316
+ r: t.value.tracker.core,
317
+ fill: e.value.stopwatch.tracker.gradient.show ? `url(#tracker_gradient_${n.value})` : e.value.stopwatch.tracker.fill,
318
+ stroke: e.value.stopwatch.tracker.stroke,
319
+ "stroke-width": e.value.stopwatch.tracker.strokeWidth
320
+ }), null, 16, pe),
321
+ e.value.stopwatch.tracker.aura.show ? (r(), u("circle", E({ key: 2 }, b.value, {
322
+ r: t.value.tracker.aura,
323
+ fill: `${e.value.stopwatch.tracker.aura.fill}20`,
324
+ stroke: e.value.stopwatch.tracker.aura.stroke,
325
+ "stroke-width": e.value.stopwatch.tracker.aura.strokeWidth
326
+ }), null, 16, fe)) : p("", !0),
327
+ s.$slots.time ? (r(), u("foreignObject", {
328
+ key: 3,
329
+ x: t.value.width / 2,
330
+ y: t.value.height / 2,
331
+ height: "0.1",
332
+ width: "0.1",
333
+ style: { overflow: "visible" }
334
+ }, [
335
+ N(s.$slots, "time", B(j({ ...i.value })), void 0, !0)
336
+ ], 8, we)) : (r(), u("text", {
337
+ key: 4,
338
+ x: t.value.width / 2,
339
+ y: t.value.height / 2 + t.value.label / 4,
340
+ "font-size": t.value.label,
341
+ "text-anchor": "middle",
342
+ fill: e.value.stopwatch.label.color,
343
+ "font-weight": e.value.stopwatch.label.bold ? "bold" : "normal",
344
+ style: { "font-variant-numeric": "tabular-nums !important" }
345
+ }, Q(i.value.formatted || h.value), 9, ke))
346
+ ], 12, ue)),
347
+ M("div", {
348
+ ref_key: "chartLegend",
349
+ ref: P,
350
+ style: f({ width: "100%", backgroundColor: e.value.stopwatch.legend.backgroundColor })
351
+ }, [
352
+ s.$slots.controls ? p("", !0) : (r(), u("div", ge, [
353
+ e.value.stopwatch.legend.buttons.start ? (r(), u("button", {
354
+ key: 0,
355
+ title: e.value.stopwatch.legend.buttonTitles.start,
356
+ onClick: R,
357
+ class: "vue-ui-timer-button",
358
+ style: f({
359
+ opacity: a.value ? 0.2 : 1,
360
+ cursor: a.value ? "default" : "pointer"
361
+ })
362
+ }, [
363
+ _(x, {
364
+ name: "play",
365
+ stroke: e.value.stopwatch.legend.buttons.iconColor
366
+ }, null, 8, ["stroke"])
367
+ ], 12, me)) : p("", !0),
368
+ e.value.stopwatch.legend.buttons.pause ? (r(), u("button", {
369
+ key: 1,
370
+ title: l.value ? e.value.stopwatch.legend.buttonTitles.resume : e.value.stopwatch.legend.buttonTitles.pause,
371
+ onClick: H,
372
+ class: "vue-ui-timer-button",
373
+ style: f({
374
+ opacity: a.value ? 1 : 0.2,
375
+ cursor: a.value ? "pointer" : "default"
376
+ })
377
+ }, [
378
+ _(x, {
379
+ name: "pause",
380
+ stroke: e.value.stopwatch.legend.buttons.iconColor
381
+ }, null, 8, ["stroke"])
382
+ ], 12, ye)) : p("", !0),
383
+ e.value.stopwatch.legend.buttons.reset ? (r(), u("button", {
384
+ key: 2,
385
+ title: e.value.stopwatch.legend.buttonTitles.reset,
386
+ onClick: A,
387
+ class: "vue-ui-timer-button",
388
+ style: f({
389
+ opacity: a.value ? 1 : 0.2,
390
+ cursor: a.value ? "pointer" : "default"
391
+ })
392
+ }, [
393
+ _(x, {
394
+ name: "stop",
395
+ stroke: e.value.stopwatch.legend.buttons.iconColor
396
+ }, null, 8, ["stroke"])
397
+ ], 12, be)) : p("", !0),
398
+ e.value.stopwatch.legend.buttons.restart ? (r(), u("button", {
399
+ key: 3,
400
+ title: e.value.stopwatch.legend.buttonTitles.restart,
401
+ onClick: L,
402
+ class: "vue-ui-timer-button",
403
+ style: f({
404
+ opacity: a.value ? 1 : 0.2,
405
+ cursor: a.value ? "pointer" : "default"
406
+ })
407
+ }, [
408
+ _(x, {
409
+ name: "restart",
410
+ stroke: e.value.stopwatch.legend.buttons.iconColor
411
+ }, null, 8, ["stroke"])
412
+ ], 12, _e)) : p("", !0),
413
+ e.value.stopwatch.legend.buttons.lap ? (r(), u("button", {
414
+ key: 4,
415
+ title: e.value.stopwatch.legend.buttonTitles.lap,
416
+ onClick: S,
417
+ class: "vue-ui-timer-button",
418
+ style: f({
419
+ opacity: a.value && !l.value ? 1 : 0.2,
420
+ cursor: a.value && !l.value ? "pointer" : "default"
421
+ })
422
+ }, [
423
+ _(x, {
424
+ name: "lap",
425
+ stroke: e.value.stopwatch.legend.buttons.iconColor
426
+ }, null, 8, ["stroke"])
427
+ ], 12, Me)) : p("", !0)
428
+ ])),
429
+ N(s.$slots, "controls", B(j({
430
+ start: R,
431
+ pause: H,
432
+ reset: A,
433
+ restart: L,
434
+ lap: S,
435
+ laps: y.value,
436
+ isRunning: a.value,
437
+ isPaused: l.value,
438
+ ...i.value
439
+ })), void 0, !0),
440
+ N(s.$slots, "laps", B(j({
441
+ laps: y.value,
442
+ lap: S,
443
+ isRunning: a.value,
444
+ isPaused: l.value,
445
+ ...i.value
446
+ })), void 0, !0)
447
+ ], 4)
448
+ ], 4));
449
+ }
450
+ }, De = /* @__PURE__ */ oe(Ce, [["__scopeId", "data-v-1e579c02"]]);
451
+ export {
452
+ De as default
453
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("./useNestedProp-2kIU-7On.cjs"),g=require("./index-p5gfZSvB.cjs"),j=require("./Title-Bb-A5OSV.cjs"),N=require("./usePrinter-fZlsJid8.cjs"),L=require("./vue-ui-skeleton-sjfOtCZr.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],M=["xmlns","viewBox"],X={key:0},D=["d","stroke-width","stroke"],R={key:1},Y=["x1","y1","x2","y2","stroke-width","stroke"],J=["x","y","font-size","fill","font-weight","text-anchor"],K={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(E,{expose:O}){const u=E,{vue_ui_tiremarks:A}=g.useConfig(),x=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),$=e.ref(g.createUid()),w=e.ref(null),P=e.ref(0),t=e.computed(()=>{const a=S.useNestedProp({userConfig:u.config,defaultConfig:A});return a.theme?{...S.useNestedProp({userConfig:g.themes.vue_ui_tiremarks[a.theme]||u.config,defaultConfig:a})}:a}),{isPrinting:V,isImaging:q,generatePdf:B,generateImage:z}=N.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),c=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage);e.watch(()=>u.dataset.percentage,()=>{c.value=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage),F()}),e.onMounted(()=>{g.objectIsEmpty(u.dataset)&&g.error({componentName:"VueUiTiremarks",type:"dataset"}),F()});function F(){let a=0,s=t.value.style.chart.animation.speed,l=.005*t.value.style.chart.animation.acceleration;function r(){c.value+=s+a,a+=l,c.value<u.dataset.percentage?requestAnimationFrame(r):c.value=u.dataset.percentage}t.value.style.chart.animation.use&&(c.value=0,r())}const y=e.computed(()=>t.value.style.chart.layout.display==="vertical"),n=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return y.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),_=e.computed(()=>Object.values(n.value).reduce((a,s)=>a+s,0)),o=e.computed(()=>({height:y.value?312:56,width:y.value?56:312})),G=e.ref(100);e.computed(()=>u.dataset.percentage/G.value);const i=e.computed(()=>y.value?{mark:(o.value.height-_.value)/100*.5,space:(o.value.height-_.value)/100*.5}:{mark:(o.value.width-_.value)/100*.5,space:(o.value.width-_.value)/100*.5}),I=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?g.shiftHue(t.value.style.chart.layout.activeColor,l/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(y.value){const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-n.value.left-n.value.right)/100/3:0,v=n.value.left+4+f,d=o.value.width-n.value.right-4-f,h=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,m=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,k=(d-v)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h-b}, ${d-k} ${m-b}, ${d} ${m}`,color:r})}else{const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-n.value.top-n.value.bottom)/100/3:0,v=n.value.left+l*i.value.mark+l*i.value.space-i.value.mark,d=v,h=n.value.top+4+f,m=o.value.height-n.value.bottom-4-f,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),b=(m-h)/t.value.style.chart.layout.curveAngleX;a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h+b}, ${d+k} ${m-b}, ${d} ${m}`,color:r})}}return a}),p=e.computed(()=>{let a,s,l;const r=t.value.style.chart.percentage.fontSize/3;return y.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,s=n.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,s=o.value.height-n.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,s=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-n.value.right+8,s=o.value.height/2+r,l="start"),{x:a,y:s,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),C=e.ref(!1);function T(a){C.value=a,P.value+=1}return O({generatePdf:B,generateImage:z}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:w,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:$.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(j._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(N.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(q),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:T,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(z)},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(g.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=c.value})},null,10,D))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Y))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:p.value.x,y:p.value.y,"font-size":p.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(g.shiftHue)(t.value.style.chart.layout.activeColor,c.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":p.value.bold?"bold":"normal","text-anchor":p.value.textAnchor},e.toDisplayString(c.value.toFixed(t.value.style.chart.percentage.rounding)+"%"),9,J)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,M)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.default,{key:3,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,H))}},Q=U._export_sfc(K,[["__scopeId","data-v-1bbd1baf"]]);exports.default=Q;