vue-data-ui 2.3.90 → 2.3.92
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 +3 -2
- package/dist/{Arrow-C_Fnn6al.js → Arrow-16rQhq4i.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-CdJD01md.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-CAmYNoaf.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-dYWMubrH.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BXnbua0J.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-oa0Srfuc.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-Cr1hulgT.js} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-Dhm9_peB.cjs} +1 -1
- package/dist/PackageVersion-BVZfgDqm.js +10 -0
- package/dist/PackageVersion-BkgJVmj1.cjs +1 -0
- package/dist/{Shape-BNocET8E.js → Shape-D75m5xWM.js} +1 -1
- package/dist/{Shape-B51JGReT.cjs → Shape-hGbEoQOv.cjs} +1 -1
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-B7ya0m2Q.cjs} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-Bx8AozB8.js} +2 -2
- package/dist/{Title-DlBwa3-X.js → Title-1Sw6EmHy.js} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bjrh7khe.cjs} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-CPATjuur.cjs} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-EJf3VBPR.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/index-D09qCApg.cjs +4 -0
- package/dist/{index-DQl1TFXa.js → index-DhJby8wL.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +16 -0
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-Bwd7mK1Z.cjs} +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-CrHvyupb.js} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Bwm8J3RQ.js} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-DdsPm5a4.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-CLxne31S.js} +57 -57
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-ZitCqVgG.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DAv5cYGJ.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Dg87_AAm.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-BAHX7KzB.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-Cn5Jbplg.js} +3 -3
- package/dist/vue-ui-age-pyramid-GzHwQzsH.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-PlamQWqC.js} +83 -81
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-DGgQwl-K.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-Dd5KF_cy.js} +1 -1
- package/dist/vue-ui-candlestick-BIEB2J1w.cjs +2 -0
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-DTzwPhV5.js} +113 -111
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-HNTf5AYY.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-YEfvPESA.js} +4 -4
- package/dist/vue-ui-chestnut-DzjdAYsT.cjs +6 -0
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-PzMOM7mp.js} +161 -159
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-C5rsiCdn.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-DWea2yXV.js} +2 -2
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-BqXhoS8m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CVespiTo.js} +2 -2
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-gNKgZqYU.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-wmDN7Vkf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-Ch6HH0ja.js} +102 -100
- package/dist/vue-ui-donut-evolution-DhDxLZ1J.cjs +1 -0
- package/dist/vue-ui-donut-n37BZPxr.cjs +1 -0
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-sQunZI1L.js} +118 -116
- package/dist/vue-ui-dumbbell-B9Z_pjnG.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-lFlZX8Yi.js} +88 -86
- package/dist/vue-ui-flow-BaFpUJg-.cjs +1 -0
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CSIOC-JR.js} +65 -63
- package/dist/vue-ui-galaxy-BIR5GxIc.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-DL2mnel_.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BMq7KT3t.js} +56 -54
- package/dist/vue-ui-gauge-r_qvpwE7.cjs +1 -0
- package/dist/vue-ui-gizmo-DBas_Sw_.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-Dj7zvNI1.js} +32 -30
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-pqBYIrxm.js} +99 -97
- package/dist/vue-ui-heatmap-qPgEhAzc.cjs +1 -0
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-Cmo9J7wp.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-ZPBinMiF.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-Ce-jbgMT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-DOTWhLi9.js} +2 -2
- package/dist/vue-ui-molecule-D429iwPP.cjs +1 -0
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-RDpgNrHQ.js} +77 -75
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CD5L8WCU.js} +76 -74
- package/dist/vue-ui-mood-radar-CdLJxrkT.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-A-tid5cQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-DyM3uc7x.cjs +17 -0
- package/dist/vue-ui-onion-BKql8oal.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-Cap01Ehu.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-CcDKe4L0.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-BDEfAeyJ.js} +141 -139
- package/dist/vue-ui-quadrant-CZzdpeQ2.cjs +1 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-DlAUYg5u.js} +166 -164
- package/dist/vue-ui-quick-chart-DpGYUyhq.cjs +15 -0
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CbTln7gs.js} +89 -87
- package/dist/vue-ui-radar-oBeaHlpT.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-BU7-F3_e.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-BkDncqow.js} +2 -2
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-C5B6UNGd.js} +54 -52
- package/dist/vue-ui-relation-circle-IWiJWgcB.cjs +1 -0
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-BujVUJ90.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-Df2cRgD8.cjs} +2 -2
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-D6yqZJ7s.js} +132 -130
- package/dist/vue-ui-scatter-jFTeM2hW.cjs +1 -0
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-CHAySwpv.js} +1 -1
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-CVu8IM33.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-ASX40MGk.js} +423 -388
- package/dist/vue-ui-skeleton-CAlTn_Cg.cjs +41 -0
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-DGVzhza2.js} +2 -2
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-dwCqhB0r.cjs} +1 -1
- package/dist/vue-ui-spark-trend-A1EHFK_r.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-B7XhDvTj.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-BuNcvi66.js} +53 -51
- package/dist/vue-ui-sparkbar-CwNjHOjD.cjs +1 -0
- package/dist/vue-ui-sparkgauge-ISu154lS.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-JY2kB9WX.js} +31 -29
- package/dist/vue-ui-sparkhistogram-C8zyC-ii.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-DyEPWxkP.js} +69 -67
- package/dist/vue-ui-sparkline-DL3Thtc4.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-DYC3sdvQ.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-7TmtP3WR.js} +46 -44
- package/dist/vue-ui-sparkstackbar-ChIM9bn2.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-CP5C6Gb_.js} +128 -126
- package/dist/vue-ui-stackbar-DrtiSaNc.cjs +6 -0
- package/dist/vue-ui-strip-plot-BMYMIHGu.cjs +1 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-DJQCq_KE.js} +78 -76
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-D6hvgMif.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-IJi0xaVg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-BZNKXZNs.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-Ls8_xq0D.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BQFK30H1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeuvdssX.js} +5 -5
- package/dist/vue-ui-thermometer-DKm8SXlE.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-DPWIvG92.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-CEzDvZf7.js} +62 -60
- package/dist/vue-ui-timer-n6lv7oTx.cjs +64 -0
- package/dist/vue-ui-tiremarks-B33mHXZN.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-BUGoY22W.js} +51 -49
- package/dist/vue-ui-treemap-DPxBZUUr.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-DmOYjJ_F.js} +93 -91
- package/dist/vue-ui-vertical-bar-BJMYX8t4.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BpVKdSY5.js} +110 -108
- package/dist/vue-ui-waffle-DGcueccy.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-ULg6SwPx.js} +72 -70
- package/dist/vue-ui-wheel-CWKq-CFW.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-DlmgZd-_.js} +43 -41
- package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +1 -0
- package/dist/vue-ui-word-cloud-DWyboczt.js +574 -0
- package/dist/vue-ui-xy-Cz81fw_E.cjs +3 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-V13Ns1gv.js} +507 -504
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-B9cRe5gT.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-GiuHOyj5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B8EMsnjU.cjs +0 -4
- package/dist/vue-ui-3d-bar-Ce-Re50D.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C08rTXJn.cjs +0 -1
- package/dist/vue-ui-candlestick-m8fjxbj-.cjs +0 -2
- package/dist/vue-ui-chestnut-Y0gQvbbf.cjs +0 -6
- package/dist/vue-ui-donut-CCm7GJsm.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DiN8Jm0n.cjs +0 -1
- package/dist/vue-ui-dumbbell-lb72j7bY.cjs +0 -9
- package/dist/vue-ui-flow-B5Gxaqvl.cjs +0 -1
- package/dist/vue-ui-galaxy-Ck5cPkrh.cjs +0 -1
- package/dist/vue-ui-gauge-BwIhwSUw.cjs +0 -1
- package/dist/vue-ui-gizmo-DrGaoiM_.cjs +0 -1
- package/dist/vue-ui-heatmap-BLc6thGZ.cjs +0 -1
- package/dist/vue-ui-molecule-CAj1HFit.cjs +0 -1
- package/dist/vue-ui-mood-radar-CV2in2wO.cjs +0 -1
- package/dist/vue-ui-nested-donuts-4vO23n9z.cjs +0 -17
- package/dist/vue-ui-onion-B3mtn6xf.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs +0 -8
- package/dist/vue-ui-quadrant-CpJX1Jwa.cjs +0 -1
- package/dist/vue-ui-quick-chart-CTxsI2tk.cjs +0 -15
- package/dist/vue-ui-radar-DFjsXmJ3.cjs +0 -1
- package/dist/vue-ui-relation-circle-DXuKdCih.cjs +0 -1
- package/dist/vue-ui-scatter-DPByFMNL.cjs +0 -1
- package/dist/vue-ui-skeleton-Bli7jLZ7.cjs +0 -41
- package/dist/vue-ui-spark-trend-sfgUJ32Q.cjs +0 -1
- package/dist/vue-ui-sparkbar-CKWYzriN.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D0q9F9Nz.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CywhBkm2.cjs +0 -1
- package/dist/vue-ui-sparkline-Besp8Ffy.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +0 -1
- package/dist/vue-ui-stackbar-D0fGVkCR.cjs +0 -6
- package/dist/vue-ui-strip-plot-XDj8rL9m.cjs +0 -1
- package/dist/vue-ui-thermometer-C3T56ras.cjs +0 -1
- package/dist/vue-ui-timer-B_ZvV1ON.cjs +0 -64
- package/dist/vue-ui-tiremarks-DRbSpTgq.cjs +0 -1
- package/dist/vue-ui-treemap-CtKUTs2G.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BBIWdeXH.cjs +0 -4
- package/dist/vue-ui-waffle-9a3C4Nj-.cjs +0 -1
- package/dist/vue-ui-wheel-CErxlmqw.cjs +0 -1
- package/dist/vue-ui-word-cloud-dMBTVGVk.js +0 -513
- package/dist/vue-ui-word-cloud-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te,
|
|
2
|
-
import { u as se } from "./useNestedProp-
|
|
3
|
-
import { u as le, c as oe, X as re, E as W } from "./index-
|
|
1
|
+
import { ref as n, onMounted as Q, onBeforeUnmount as Y, computed as z, watch as Z, openBlock as l, createElementBlock as r, normalizeStyle as f, createBlock as ee, createCommentVNode as v, unref as te, createVNode as M, createElementVNode as C, mergeProps as V, renderSlot as E, normalizeProps as O, guardReactiveProps as U, toDisplayString as ae } from "vue";
|
|
2
|
+
import { u as se } from "./useNestedProp-CrHvyupb.js";
|
|
3
|
+
import { u as le, c as oe, X as re, E as W } from "./index-DhJby8wL.js";
|
|
4
4
|
import { t as ue, u as ie } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import P from "./BaseIcon-
|
|
6
|
-
import { _ as ne } from "./Title-
|
|
7
|
-
import { _ as ce } from "./
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import P from "./BaseIcon-CAmYNoaf.js";
|
|
6
|
+
import { _ as ne } from "./Title-1Sw6EmHy.js";
|
|
7
|
+
import { _ as ce } from "./PackageVersion-BVZfgDqm.js";
|
|
8
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
class he {
|
|
10
|
+
constructor(A, k, T, H = !0, x = !0) {
|
|
10
11
|
this.interval = k, this.elapsed = 0, this.isPaused = !1;
|
|
11
12
|
const S = `
|
|
12
13
|
let interval;
|
|
@@ -72,9 +73,9 @@ class de {
|
|
|
72
73
|
}
|
|
73
74
|
};
|
|
74
75
|
`, R = new Blob([S], { type: "application/javascript" }), m = URL.createObjectURL(R), i = new Worker(m);
|
|
75
|
-
function
|
|
76
|
+
function I(c) {
|
|
76
77
|
let e = Math.floor(c / 1e3), w = Math.floor(c % 1e3 / 10), y = Math.floor(e / 3600), t = Math.floor(e % 3600 / 60), d = e % 60, u = "";
|
|
77
|
-
return
|
|
78
|
+
return x && (u += String(y).padStart(2, "0") + ":"), u += String(t).padStart(2, "0") + ":", u += String(d).padStart(2, "0"), H && (u += "." + String(w).padStart(2, "0")), u;
|
|
78
79
|
}
|
|
79
80
|
this.start = () => {
|
|
80
81
|
this.isPaused = !1, i.postMessage({ action: "start", data: { interval: this.interval } });
|
|
@@ -93,7 +94,7 @@ class de {
|
|
|
93
94
|
const e = (w) => {
|
|
94
95
|
const { elapsed: y, timestamp: t, action: d } = w.data;
|
|
95
96
|
if (d === "lap") {
|
|
96
|
-
const u =
|
|
97
|
+
const u = I(y);
|
|
97
98
|
c({
|
|
98
99
|
timestamp: t || 0,
|
|
99
100
|
elapsed: y,
|
|
@@ -107,17 +108,17 @@ class de {
|
|
|
107
108
|
this.elapsed = e, A({
|
|
108
109
|
timestamp: w || 0,
|
|
109
110
|
elapsed: this.elapsed,
|
|
110
|
-
formatted:
|
|
111
|
+
formatted: I(this.elapsed)
|
|
111
112
|
});
|
|
112
113
|
}, i.onerror = (c) => {
|
|
113
|
-
|
|
114
|
+
T && T(c);
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
const
|
|
118
|
+
const ve = ["xmlns", "viewBox"], pe = { key: 0 }, fe = ["id"], we = ["stop-color"], ke = ["stop-color"], ge = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], me = ["d", "stroke", "stroke-width"], ye = ["r", "fill", "stroke", "stroke-width"], be = ["r", "fill", "stroke", "stroke-width"], _e = ["x", "y"], Me = ["x", "y", "font-size", "fill", "font-weight"], Ce = {
|
|
118
119
|
key: 0,
|
|
119
120
|
class: "vue-ui-timer-controls"
|
|
120
|
-
},
|
|
121
|
+
}, Te = ["title"], xe = ["title"], Ie = ["title"], $e = ["title"], Pe = ["title"], Se = {
|
|
121
122
|
__name: "vue-ui-timer",
|
|
122
123
|
props: {
|
|
123
124
|
config: {
|
|
@@ -129,7 +130,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
129
130
|
},
|
|
130
131
|
emits: ["start", "pause", "reset", "restart", "lap"],
|
|
131
132
|
setup(G, { expose: A, emit: k }) {
|
|
132
|
-
const
|
|
133
|
+
const T = G, { vue_ui_timer: H } = le(), x = n(null), S = n(null), R = n(null), m = n(null), i = n(oe()), I = n(0);
|
|
133
134
|
Q(() => {
|
|
134
135
|
c();
|
|
135
136
|
});
|
|
@@ -137,7 +138,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
137
138
|
if (e.value.responsive) {
|
|
138
139
|
const a = ue(() => {
|
|
139
140
|
const { width: o, height: h } = ie({
|
|
140
|
-
chart:
|
|
141
|
+
chart: x.value,
|
|
141
142
|
title: e.value.style.title.text ? S.value : null,
|
|
142
143
|
legend: R.value
|
|
143
144
|
});
|
|
@@ -161,7 +162,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
161
162
|
fallback: 10
|
|
162
163
|
});
|
|
163
164
|
});
|
|
164
|
-
m.value = new ResizeObserver(a), m.value.observe(
|
|
165
|
+
m.value = new ResizeObserver(a), m.value.observe(x.value.parentNode);
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
Y(() => {
|
|
@@ -173,12 +174,12 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
173
174
|
});
|
|
174
175
|
function w() {
|
|
175
176
|
return se({
|
|
176
|
-
userConfig:
|
|
177
|
+
userConfig: T.config,
|
|
177
178
|
defaultConfig: H
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
|
-
Z(() =>
|
|
181
|
-
e.value = w(), c(),
|
|
181
|
+
Z(() => T.config, (a) => {
|
|
182
|
+
e.value = w(), c(), I.value += 1;
|
|
182
183
|
}, { deep: !0 });
|
|
183
184
|
const y = z(() => {
|
|
184
185
|
if (e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
|
|
@@ -197,7 +198,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
197
198
|
aura: 12 * e.value.stopwatch.tracker.aura.radiusRatio
|
|
198
199
|
},
|
|
199
200
|
label: e.value.stopwatch.label.fontSize
|
|
200
|
-
}), d = n(0), u = new
|
|
201
|
+
}), d = n(0), u = new he(
|
|
201
202
|
(a) => X(a),
|
|
202
203
|
10,
|
|
203
204
|
"",
|
|
@@ -227,19 +228,19 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
227
228
|
}
|
|
228
229
|
const g = z(() => Math.min(t.value.width, t.value.height) / 2.5 * e.value.stopwatch.track.radiusRatio);
|
|
229
230
|
function q(a, o) {
|
|
230
|
-
const
|
|
231
|
-
return a *
|
|
231
|
+
const $ = 360 / (o * 1e3);
|
|
232
|
+
return a * $ % 360;
|
|
232
233
|
}
|
|
233
234
|
function J(a) {
|
|
234
|
-
let o = a * (Math.PI / 180), h = t.value.width / 2 + g.value * Math.cos(o),
|
|
235
|
-
return { cx: h, cy:
|
|
235
|
+
let o = a * (Math.PI / 180), h = t.value.width / 2 + g.value * Math.cos(o), $ = t.value.height / 2 + g.value * Math.sin(o);
|
|
236
|
+
return { cx: h, cy: $ };
|
|
236
237
|
}
|
|
237
238
|
const _ = z(() => {
|
|
238
|
-
const a = q(d.value.elapsed, e.value.stopwatch.cycleSeconds), { cx: o, cy: h } = J(a - 90),
|
|
239
|
+
const a = q(d.value.elapsed, e.value.stopwatch.cycleSeconds), { cx: o, cy: h } = J(a - 90), $ = a > 180 ? 1 : 0;
|
|
239
240
|
return {
|
|
240
241
|
cx: o || t.value.width / 2,
|
|
241
242
|
cy: h || t.value.height / 2 - g.value,
|
|
242
|
-
largeArcFlag:
|
|
243
|
+
largeArcFlag: $,
|
|
243
244
|
sweepFlag: 1
|
|
244
245
|
};
|
|
245
246
|
});
|
|
@@ -251,7 +252,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
251
252
|
lap: F
|
|
252
253
|
}), (a, o) => (l(), r("div", {
|
|
253
254
|
ref_key: "timerChart",
|
|
254
|
-
ref:
|
|
255
|
+
ref: x,
|
|
255
256
|
class: "vue-ui-timer",
|
|
256
257
|
style: f({
|
|
257
258
|
fontFamily: e.value.style.fontFamily,
|
|
@@ -270,7 +271,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
270
271
|
})
|
|
271
272
|
}, [
|
|
272
273
|
(l(), ee(ne, {
|
|
273
|
-
key: `title_${
|
|
274
|
+
key: `title_${I.value}`,
|
|
274
275
|
config: {
|
|
275
276
|
title: {
|
|
276
277
|
cy: "title",
|
|
@@ -292,8 +293,9 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
292
293
|
background: e.value.style.backgroundColor
|
|
293
294
|
})
|
|
294
295
|
}, [
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
M(ce),
|
|
297
|
+
e.value.stopwatch.tracker.gradient.show ? (l(), r("defs", pe, [
|
|
298
|
+
C("radialGradient", {
|
|
297
299
|
id: `tracker_gradient_${i.value}`,
|
|
298
300
|
cx: "50%",
|
|
299
301
|
cy: "50%",
|
|
@@ -301,24 +303,24 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
301
303
|
fx: "50%",
|
|
302
304
|
fy: "50%"
|
|
303
305
|
}, [
|
|
304
|
-
|
|
306
|
+
C("stop", {
|
|
305
307
|
offset: "0%",
|
|
306
308
|
"stop-color": e.value.stopwatch.tracker.gradient.color
|
|
307
|
-
}, null, 8,
|
|
308
|
-
|
|
309
|
+
}, null, 8, we),
|
|
310
|
+
C("stop", {
|
|
309
311
|
offset: "100%",
|
|
310
312
|
"stop-color": e.value.stopwatch.tracker.fill
|
|
311
|
-
}, null, 8,
|
|
312
|
-
], 8,
|
|
313
|
+
}, null, 8, ke)
|
|
314
|
+
], 8, fe)
|
|
313
315
|
])) : v("", !0),
|
|
314
|
-
|
|
316
|
+
C("circle", {
|
|
315
317
|
cx: t.value.width / 2,
|
|
316
318
|
cy: t.value.height / 2,
|
|
317
319
|
r: g.value,
|
|
318
320
|
fill: e.value.stopwatch.track.fill,
|
|
319
321
|
stroke: e.value.stopwatch.track.stroke,
|
|
320
322
|
"stroke-width": e.value.stopwatch.track.strokeWidth
|
|
321
|
-
}, null, 8,
|
|
323
|
+
}, null, 8, ge),
|
|
322
324
|
e.value.stopwatch.cycleTrack.show ? (l(), r("path", {
|
|
323
325
|
key: 1,
|
|
324
326
|
d: `M ${t.value.width / 2},${t.value.height / 2 - g.value} A ${g.value},${g.value} 0 ${_.value.largeArcFlag},${_.value.sweepFlag} ${_.value.cx},${_.value.cy}`,
|
|
@@ -326,19 +328,19 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
326
328
|
"stroke-width": e.value.stopwatch.cycleTrack.strokeWidth,
|
|
327
329
|
"stroke-linecap": "round",
|
|
328
330
|
fill: "none"
|
|
329
|
-
}, null, 8,
|
|
330
|
-
|
|
331
|
+
}, null, 8, me)) : v("", !0),
|
|
332
|
+
C("circle", V(_.value, {
|
|
331
333
|
r: t.value.tracker.core,
|
|
332
334
|
fill: e.value.stopwatch.tracker.gradient.show ? `url(#tracker_gradient_${i.value})` : e.value.stopwatch.tracker.fill,
|
|
333
335
|
stroke: e.value.stopwatch.tracker.stroke,
|
|
334
336
|
"stroke-width": e.value.stopwatch.tracker.strokeWidth
|
|
335
|
-
}), null, 16,
|
|
337
|
+
}), null, 16, ye),
|
|
336
338
|
e.value.stopwatch.tracker.aura.show ? (l(), r("circle", V({ key: 2 }, _.value, {
|
|
337
339
|
r: t.value.tracker.aura,
|
|
338
340
|
fill: `${e.value.stopwatch.tracker.aura.fill}20`,
|
|
339
341
|
stroke: e.value.stopwatch.tracker.aura.stroke,
|
|
340
342
|
"stroke-width": e.value.stopwatch.tracker.aura.strokeWidth
|
|
341
|
-
}), null, 16,
|
|
343
|
+
}), null, 16, be)) : v("", !0),
|
|
342
344
|
a.$slots.time ? (l(), r("foreignObject", {
|
|
343
345
|
key: 3,
|
|
344
346
|
x: t.value.width / 2,
|
|
@@ -348,7 +350,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
348
350
|
style: { overflow: "visible" }
|
|
349
351
|
}, [
|
|
350
352
|
E(a.$slots, "time", O(U({ ...d.value })), void 0, !0)
|
|
351
|
-
], 8,
|
|
353
|
+
], 8, _e)) : (l(), r("text", {
|
|
352
354
|
key: 4,
|
|
353
355
|
x: t.value.width / 2,
|
|
354
356
|
y: t.value.height / 2 + t.value.label / 4,
|
|
@@ -357,14 +359,14 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
357
359
|
fill: e.value.stopwatch.label.color,
|
|
358
360
|
"font-weight": e.value.stopwatch.label.bold ? "bold" : "normal",
|
|
359
361
|
style: { "font-variant-numeric": "tabular-nums !important" }
|
|
360
|
-
}, ae(d.value.formatted || y.value), 9,
|
|
361
|
-
], 12,
|
|
362
|
-
|
|
362
|
+
}, ae(d.value.formatted || y.value), 9, Me))
|
|
363
|
+
], 12, ve)),
|
|
364
|
+
C("div", {
|
|
363
365
|
ref_key: "chartLegend",
|
|
364
366
|
ref: R,
|
|
365
367
|
style: f({ width: "100%", backgroundColor: e.value.stopwatch.legend.backgroundColor })
|
|
366
368
|
}, [
|
|
367
|
-
a.$slots.controls ? v("", !0) : (l(), r("div",
|
|
369
|
+
a.$slots.controls ? v("", !0) : (l(), r("div", Ce, [
|
|
368
370
|
e.value.stopwatch.legend.buttons.start ? (l(), r("button", {
|
|
369
371
|
key: 0,
|
|
370
372
|
title: e.value.stopwatch.legend.buttonTitles.start,
|
|
@@ -375,11 +377,11 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
375
377
|
cursor: s.value ? "default" : "pointer"
|
|
376
378
|
})
|
|
377
379
|
}, [
|
|
378
|
-
|
|
380
|
+
M(P, {
|
|
379
381
|
name: "play",
|
|
380
382
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
381
383
|
}, null, 8, ["stroke"])
|
|
382
|
-
], 12,
|
|
384
|
+
], 12, Te)) : v("", !0),
|
|
383
385
|
e.value.stopwatch.legend.buttons.pause ? (l(), r("button", {
|
|
384
386
|
key: 1,
|
|
385
387
|
title: p.value ? e.value.stopwatch.legend.buttonTitles.resume : e.value.stopwatch.legend.buttonTitles.pause,
|
|
@@ -390,11 +392,11 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
390
392
|
cursor: s.value ? "pointer" : "default"
|
|
391
393
|
})
|
|
392
394
|
}, [
|
|
393
|
-
|
|
395
|
+
M(P, {
|
|
394
396
|
name: "pause",
|
|
395
397
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
396
398
|
}, null, 8, ["stroke"])
|
|
397
|
-
], 12,
|
|
399
|
+
], 12, xe)) : v("", !0),
|
|
398
400
|
e.value.stopwatch.legend.buttons.reset ? (l(), r("button", {
|
|
399
401
|
key: 2,
|
|
400
402
|
title: e.value.stopwatch.legend.buttonTitles.reset,
|
|
@@ -405,11 +407,11 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
405
407
|
cursor: s.value ? "pointer" : "default"
|
|
406
408
|
})
|
|
407
409
|
}, [
|
|
408
|
-
|
|
410
|
+
M(P, {
|
|
409
411
|
name: "stop",
|
|
410
412
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
411
413
|
}, null, 8, ["stroke"])
|
|
412
|
-
], 12,
|
|
414
|
+
], 12, Ie)) : v("", !0),
|
|
413
415
|
e.value.stopwatch.legend.buttons.restart ? (l(), r("button", {
|
|
414
416
|
key: 3,
|
|
415
417
|
title: e.value.stopwatch.legend.buttonTitles.restart,
|
|
@@ -420,11 +422,11 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
420
422
|
cursor: s.value ? "pointer" : "default"
|
|
421
423
|
})
|
|
422
424
|
}, [
|
|
423
|
-
|
|
425
|
+
M(P, {
|
|
424
426
|
name: "restart",
|
|
425
427
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
426
428
|
}, null, 8, ["stroke"])
|
|
427
|
-
], 12,
|
|
429
|
+
], 12, $e)) : v("", !0),
|
|
428
430
|
e.value.stopwatch.legend.buttons.lap ? (l(), r("button", {
|
|
429
431
|
key: 4,
|
|
430
432
|
title: e.value.stopwatch.legend.buttonTitles.lap,
|
|
@@ -435,11 +437,11 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
435
437
|
cursor: s.value && !p.value ? "pointer" : "default"
|
|
436
438
|
})
|
|
437
439
|
}, [
|
|
438
|
-
|
|
440
|
+
M(P, {
|
|
439
441
|
name: "lap",
|
|
440
442
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
441
443
|
}, null, 8, ["stroke"])
|
|
442
|
-
], 12,
|
|
444
|
+
], 12, Pe)) : v("", !0)
|
|
443
445
|
])),
|
|
444
446
|
E(a.$slots, "controls", O(U({
|
|
445
447
|
start: L,
|
|
@@ -462,7 +464,7 @@ const he = ["xmlns", "viewBox"], ve = { key: 0 }, pe = ["id"], fe = ["stop-color
|
|
|
462
464
|
], 4)
|
|
463
465
|
], 4));
|
|
464
466
|
}
|
|
465
|
-
},
|
|
467
|
+
}, Be = /* @__PURE__ */ de(Se, [["__scopeId", "data-v-8609e7e7"]]);
|
|
466
468
|
export {
|
|
467
|
-
|
|
469
|
+
Be as default
|
|
468
470
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-Bwd7mK1Z.cjs"),g=require("./index-D09qCApg.cjs"),$=require("./useResponsive-B3TrDDIG.cjs"),B=require("./BaseIcon-dYWMubrH.cjs"),j=require("./Title-Bjrh7khe.cjs"),q=require("./PackageVersion-BkgJVmj1.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(T,v,y,E=!0,b=!0){this.interval=v,this.elapsed=0,this.isPaused=!1;const S=`
|
|
2
|
+
let interval;
|
|
3
|
+
let elapsed = 0;
|
|
4
|
+
let paused = false;
|
|
5
|
+
let startTime;
|
|
6
|
+
let tickInterval;
|
|
7
|
+
|
|
8
|
+
onmessage = function(e) {
|
|
9
|
+
const { action, data } = e.data;
|
|
10
|
+
|
|
11
|
+
switch(action) {
|
|
12
|
+
case 'start':
|
|
13
|
+
startTime = Date.now();
|
|
14
|
+
tickInterval = data.interval;
|
|
15
|
+
elapsed = 0;
|
|
16
|
+
paused = false;
|
|
17
|
+
interval = setInterval(() => {
|
|
18
|
+
elapsed += tickInterval;
|
|
19
|
+
postMessage({ elapsed, timestamp: Date.now() });
|
|
20
|
+
}, tickInterval);
|
|
21
|
+
break;
|
|
22
|
+
|
|
23
|
+
case 'pause':
|
|
24
|
+
paused = true;
|
|
25
|
+
clearInterval(interval);
|
|
26
|
+
elapsed = Date.now() - startTime;
|
|
27
|
+
break;
|
|
28
|
+
|
|
29
|
+
case 'resume':
|
|
30
|
+
if (paused) {
|
|
31
|
+
startTime = Date.now() - elapsed;
|
|
32
|
+
interval = setInterval(() => {
|
|
33
|
+
elapsed += tickInterval;
|
|
34
|
+
postMessage({ elapsed, timestamp: Date.now() });
|
|
35
|
+
}, tickInterval);
|
|
36
|
+
}
|
|
37
|
+
paused = false;
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case 'stop':
|
|
41
|
+
clearInterval(interval);
|
|
42
|
+
elapsed = 0;
|
|
43
|
+
postMessage({ elapsed });
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'reset':
|
|
47
|
+
elapsed = 0;
|
|
48
|
+
clearInterval(interval);
|
|
49
|
+
postMessage({ elapsed });
|
|
50
|
+
break;
|
|
51
|
+
|
|
52
|
+
case 'lap':
|
|
53
|
+
postMessage({
|
|
54
|
+
elapsed,
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
action: 'lap'
|
|
57
|
+
});
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
default:
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
`,M=new Blob([S],{type:"application/javascript"}),k=URL.createObjectURL(M),n=new Worker(k);function _(u){let t=Math.floor(u/1e3),p=Math.floor(u%1e3/10),f=Math.floor(t/3600),a=Math.floor(t%3600/60),c=t%60,r="";return b&&(r+=String(f).padStart(2,"0")+":"),r+=String(a).padStart(2,"0")+":",r+=String(c).padStart(2,"0"),E&&(r+="."+String(p).padStart(2,"0")),r}this.start=()=>{this.isPaused=!1,n.postMessage({action:"start",data:{interval:this.interval}})},this.pause=()=>{this.isPaused?this.resume():(this.isPaused=!0,n.postMessage({action:"pause"}))},this.resume=()=>{this.isPaused&&(n.postMessage({action:"resume"}),this.isPaused=!1)},this.stop=()=>{n.postMessage({action:"stop"}),this.isPaused=!1},this.reset=()=>{n.postMessage({action:"reset"}),this.elapsed=0,this.isPaused=!1},this.restart=()=>{this.stop(),this.start()},this.lap=()=>new Promise(u=>{n.postMessage({action:"lap"});const t=p=>{const{elapsed:f,timestamp:a,action:c}=p.data;if(c==="lap"){const r=_(f);u({timestamp:a||0,elapsed:f,formatted:r})}};n.addEventListener("message",t,{once:!0})}),n.onmessage=u=>{const{elapsed:t,timestamp:p}=u.data;this.elapsed=t,T({timestamp:p||0,elapsed:this.elapsed,formatted:_(this.elapsed)})},n.onerror=u=>{y&&y(u)}}}const W=["xmlns","viewBox"],G={key:0},X=["id"],J=["stop-color"],K=["stop-color"],Q=["cx","cy","r","fill","stroke","stroke-width"],Y=["d","stroke","stroke-width"],Z=["r","fill","stroke","stroke-width"],ee=["r","fill","stroke","stroke-width"],te=["x","y"],ae=["x","y","font-size","fill","font-weight"],le={key:0,class:"vue-ui-timer-controls"},se=["title"],oe=["title"],re=["title"],ne=["title"],ue=["title"],ce={__name:"vue-ui-timer",props:{config:{type:Object,default(){return{}}}},emits:["start","pause","reset","restart","lap"],setup(R,{expose:T,emit:v}){const y=R,{vue_ui_timer:E}=g.useConfig(),b=e.ref(null),S=e.ref(null),M=e.ref(null),k=e.ref(null),n=e.ref(g.createUid()),_=e.ref(0);e.onMounted(()=>{u()});function u(){if(t.value.responsive){const l=$.throttle(()=>{const{width:o,height:i}=$.useResponsive({chart:b.value,title:t.value.style.title.text?S.value:null,legend:M.value});a.value.width=o,a.value.height=i,a.value.tracker.core=g.translateSize({relator:Math.min(o,i),adjuster:t.value.style.width,source:6*t.value.stopwatch.tracker.radiusRatio,threshold:1,fallback:1}),a.value.tracker.aura=g.translateSize({relator:Math.min(o,i),adjuster:t.value.style.width,source:12*t.value.stopwatch.tracker.aura.radiusRatio,threshold:1,fallback:1}),a.value.label=g.translateSize({relator:Math.min(o,i),adjuster:t.value.style.width,source:t.value.stopwatch.label.fontSize,threshold:10,fallback:10})});k.value=new ResizeObserver(l),k.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const t=e.computed({get:()=>p(),set:l=>l});function p(){return L.useNestedProp({userConfig:y.config,defaultConfig:E})}e.watch(()=>y.config,l=>{t.value=p(),u(),_.value+=1},{deep:!0});const f=e.computed(()=>{if(t.value.stopwatch.showHours&&t.value.stopwatch.showHundredth)return"00:00:00.00";if(t.value.stopwatch.showHours&&!t.value.stopwatch.showHundredth)return"00:00:00";if(!t.value.stopwatch.showHours&&t.value.stopwatch.showHundredth)return"00:00.00";if(!t.value.stopwatch.showHours&&!t.value.stopwatch.showHundredth)return"00:00"}),a=e.ref({height:t.value.style.height,width:t.value.style.width,tracker:{core:6*t.value.stopwatch.tracker.radiusRatio,aura:12*t.value.stopwatch.tracker.aura.radiusRatio},label:t.value.stopwatch.label.fontSize}),c=e.ref(0),r=new U(l=>D(l),10,"",t.value.stopwatch.showHundredth,t.value.stopwatch.showHours),N=e.ref(!0),s=e.ref(!1),d=e.ref(!1);function V(){v("start"),N.value&&r.start(),N.value=!1,s.value=!0}function x(){s.value&&(v("reset"),r.stop(),m.value=[],N.value=!0,s.value=!1)}function z(){d.value=!d.value,v("pause",c.value),r.pause()}function I(){s.value&&(d.value=!1,v("restart"),m.value=[],r.restart())}const m=e.ref([]);async function P(){if(!s.value||d.value)return;const l=await r.lap();l&&(m.value.push(l),v("lap",m.value))}function D({timestamp:l,elapsed:o,formatted:i}){c.value={timestamp:l,elapsed:o,formatted:i}}const h=e.computed(()=>Math.min(a.value.width,a.value.height)/2.5*t.value.stopwatch.track.radiusRatio);function F(l,o){const C=360/(o*1e3);return l*C%360}function H(l){let o=l*(Math.PI/180),i=a.value.width/2+h.value*Math.cos(o),C=a.value.height/2+h.value*Math.sin(o);return{cx:i,cy:C}}const w=e.computed(()=>{const l=F(c.value.elapsed,t.value.stopwatch.cycleSeconds),{cx:o,cy:i}=H(l-90),C=l>180?1:0;return{cx:o||a.value.width/2,cy:i||a.value.height/2-h.value,largeArcFlag:C,sweepFlag:1}});return T({start:V,pause:z,reset:x,restart:I,lap:P}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"timerChart",ref:b,class:"vue-ui-timer",style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",height:t.value.responsive?"100%":"auto",textAlign:"center"})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle({width:"100%",background:t.value.style.backgroundColor})},[(e.openBlock(),e.createBlock(j._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"title",...t.value.style.title},subtitle:{cy:"subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(g.XMLNS),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle({maxWidth:"100%",overflow:"visible",background:t.value.style.backgroundColor})},[e.createVNode(q._sfc_main),t.value.stopwatch.tracker.gradient.show?(e.openBlock(),e.createElementBlock("defs",G,[e.createElementVNode("radialGradient",{id:`tracker_gradient_${n.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.stopwatch.tracker.gradient.color},null,8,J),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.stopwatch.tracker.fill},null,8,K)],8,X)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.value.width/2,cy:a.value.height/2,r:h.value,fill:t.value.stopwatch.track.fill,stroke:t.value.stopwatch.track.stroke,"stroke-width":t.value.stopwatch.track.strokeWidth},null,8,Q),t.value.stopwatch.cycleTrack.show?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.value.width/2},${a.value.height/2-h.value} A ${h.value},${h.value} 0 ${w.value.largeArcFlag},${w.value.sweepFlag} ${w.value.cx},${w.value.cy}`,stroke:t.value.stopwatch.cycleTrack.stroke,"stroke-width":t.value.stopwatch.cycleTrack.strokeWidth,"stroke-linecap":"round",fill:"none"},null,8,Y)):e.createCommentVNode("",!0),e.createElementVNode("circle",e.mergeProps(w.value,{r:a.value.tracker.core,fill:t.value.stopwatch.tracker.gradient.show?`url(#tracker_gradient_${n.value})`:t.value.stopwatch.tracker.fill,stroke:t.value.stopwatch.tracker.stroke,"stroke-width":t.value.stopwatch.tracker.strokeWidth}),null,16,Z),t.value.stopwatch.tracker.aura.show?(e.openBlock(),e.createElementBlock("circle",e.mergeProps({key:2},w.value,{r:a.value.tracker.aura,fill:`${t.value.stopwatch.tracker.aura.fill}20`,stroke:t.value.stopwatch.tracker.aura.stroke,"stroke-width":t.value.stopwatch.tracker.aura.strokeWidth}),null,16,ee)):e.createCommentVNode("",!0),l.$slots.time?(e.openBlock(),e.createElementBlock("foreignObject",{key:3,x:a.value.width/2,y:a.value.height/2,height:"0.1",width:"0.1",style:{overflow:"visible"}},[e.renderSlot(l.$slots,"time",e.normalizeProps(e.guardReactiveProps({...c.value})),void 0,!0)],8,te)):(e.openBlock(),e.createElementBlock("text",{key:4,x:a.value.width/2,y:a.value.height/2+a.value.label/4,"font-size":a.value.label,"text-anchor":"middle",fill:t.value.stopwatch.label.color,"font-weight":t.value.stopwatch.label.bold?"bold":"normal",style:{"font-variant-numeric":"tabular-nums !important"}},e.toDisplayString(c.value.formatted||f.value),9,ae))],12,W)),e.createElementVNode("div",{ref_key:"chartLegend",ref:M,style:e.normalizeStyle({width:"100%",backgroundColor:t.value.stopwatch.legend.backgroundColor})},[l.$slots.controls?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[t.value.stopwatch.legend.buttons.start?(e.openBlock(),e.createElementBlock("button",{key:0,title:t.value.stopwatch.legend.buttonTitles.start,onClick:V,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?.2:1,cursor:s.value?"default":"pointer"})},[e.createVNode(B.default,{name:"play",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,se)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.pause?(e.openBlock(),e.createElementBlock("button",{key:1,title:d.value?t.value.stopwatch.legend.buttonTitles.resume:t.value.stopwatch.legend.buttonTitles.pause,onClick:z,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"pause",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,oe)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.reset?(e.openBlock(),e.createElementBlock("button",{key:2,title:t.value.stopwatch.legend.buttonTitles.reset,onClick:x,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"stop",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,re)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.restart?(e.openBlock(),e.createElementBlock("button",{key:3,title:t.value.stopwatch.legend.buttonTitles.restart,onClick:I,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"restart",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,ne)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.lap?(e.openBlock(),e.createElementBlock("button",{key:4,title:t.value.stopwatch.legend.buttonTitles.lap,onClick:P,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value&&!d.value?1:.2,cursor:s.value&&!d.value?"pointer":"default"})},[e.createVNode(B.default,{name:"lap",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,ue)):e.createCommentVNode("",!0)])),e.renderSlot(l.$slots,"controls",e.normalizeProps(e.guardReactiveProps({start:V,pause:z,reset:x,restart:I,lap:P,laps:m.value,isRunning:s.value,isPaused:d.value,...c.value})),void 0,!0),e.renderSlot(l.$slots,"laps",e.normalizeProps(e.guardReactiveProps({laps:m.value,lap:P,isRunning:s.value,isPaused:d.value,...c.value})),void 0,!0)],4)],4))}},ie=O._export_sfc(ce,[["__scopeId","data-v-8609e7e7"]]);exports.default=ie;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q=require("./useNestedProp-Bwd7mK1Z.cjs"),c=require("./index-D09qCApg.cjs"),U=require("./Title-Bjrh7khe.cjs"),L=require("./usePrinter-DdsPm5a4.cjs"),H=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),D=require("./PackageVersion-BkgJVmj1.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R=["id"],Y={key:0,style:"width:100%;background:transparent;padding-bottom:12px"},J=["xmlns","viewBox"],K={key:0},Q=["d","stroke-width","stroke"],W={key:1},Z=["x1","y1","x2","y2","stroke-width","stroke"],ee=["x","y","font-size","fill","font-weight","text-anchor"],te={key:3,class:"vue-data-ui-watermark"},ae={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:T}=c.useConfig(),x=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),w=e.ref(c.createUid()),$=e.ref(null),P=e.ref(0),B=e.ref(0),t=e.computed({get:()=>z(),set:a=>a});function z(){const a=q.useNestedProp({userConfig:v.config,defaultConfig:T});return a.theme?{...q.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=z(),O(),B.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:F,generateImage:N}=L.usePrinter({elementId:w.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{O()});function E(a){let u=t.value.style.chart.animation.speed;const l=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+l,a):n.value>a&&(n.value=Math.max(n.value-l,a)),n.value!==a&&requestAnimationFrame(r)}r()}function O(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.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}}),C=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),o=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),V=e.ref(100);e.computed(()=>v.dataset.percentage/V.value);const i=e.computed(()=>f.value?{mark:(o.value.height-C.value)/100*.5,space:(o.value.height-C.value)/100*.5}:{mark:(o.value.width-C.value)/100*.5,space:(o.value.width-C.value)/100*.5}),A=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.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(f.value){const y=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=o.value.width-s.value.right-4-y,m=o.value.height-s.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,p=o.value.height-s.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,_=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:d,x2:h,y1:m,y2:p,curve:`M ${d} ${m} C ${d+k} ${m-_}, ${h-k} ${p-_}, ${h} ${p}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+l*i.value.mark+l*i.value.space-i.value.mark,h=d,m=s.value.top+4+y,p=o.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),_=(p-m)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:m,y2:p,curve:`M ${d} ${m} C ${d+k} ${m+_}, ${h+k} ${p-_}, ${h} ${p}`,color:r})}}return a}),g=e.computed(()=>{let a,u,l;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,u=s.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,u=o.value.height-s.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-s.value.right+8,u=o.value.height/2+r,l="start"),{x:a,y:u,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),b=e.ref(!1);function j(a){b.value=a,P.value+=1}return G({generatePdf:F,generateImage:N}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:$,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:w.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(),e.createBlock(U._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,onToggleFullscreen:j,onGeneratePdf:e.unref(F),onGenerateImage:e.unref(N)},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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(D._sfc_main),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":i.value.mark,stroke:n.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<=n.value})},null,10,Q))),256))])):(e.openBlock(),e.createElementBlock("g",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.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:n.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Z))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,n.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ee)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,J)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",te,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,R))}},le=X._export_sfc(ae,[["__scopeId","data-v-9130298e"]]);exports.default=le;
|