vue-data-ui 2.6.6 → 2.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DFWjAvCY.js → Arrow-BHD3VBsD.js} +1 -1
- package/dist/{Arrow-BYqxz6UG.cjs → Arrow-YuEygGzC.cjs} +1 -1
- package/dist/{BaseIcon-COe_H-UB.cjs → BaseIcon-D326yPTV.cjs} +1 -1
- package/dist/{BaseIcon-t20JEZNG.js → BaseIcon-dThl5uNa.js} +1 -1
- package/dist/{DataTable-Du7nJ0TM.cjs → DataTable-CaD8j-SL.cjs} +1 -1
- package/dist/{DataTable-CJN0sipt.js → DataTable-D0-zzsJg.js} +2 -2
- package/dist/{Legend-CM7IGBC3.cjs → Legend-CEw2uq9s.cjs} +1 -1
- package/dist/{Legend-BDyPoYfp.js → Legend-Oaw0MY8Y.js} +2 -2
- package/dist/{PackageVersion-qeLvq6l8.cjs → PackageVersion-CCgJTyH9.cjs} +1 -1
- package/dist/{PackageVersion-DqmHcoqz.js → PackageVersion-J_USnljf.js} +1 -1
- package/dist/{PenAndPaper-6UYizrkQ.js → PenAndPaper-CoEXEMcN.js} +3 -3
- package/dist/{PenAndPaper-BYqaxOpk.cjs → PenAndPaper-DvNBHCpq.cjs} +1 -1
- package/dist/Shape-Cwx-wRaK.cjs +1 -0
- package/dist/{Shape-C_qIhG3J.js → Shape-Dtm6toQp.js} +26 -23
- package/dist/{Slicer-DPae3p1M.cjs → Slicer-7z_6bjyU.cjs} +1 -1
- package/dist/{Slicer-BQP3UIW-.js → Slicer-BAcq2vD0.js} +2 -2
- package/dist/{Title-BGiQdt7J.cjs → Title-BQSh4ukk.cjs} +1 -1
- package/dist/{Title-D6h1gTvZ.js → Title-DePxeqVl.js} +1 -1
- package/dist/{Tooltip-BonEVaob.js → Tooltip-DRw9RoFp.js} +23 -20
- package/dist/Tooltip-DtqrGu-Q.cjs +1 -0
- package/dist/{index-B9qF6XbP.js → index-CZlI7PiS.js} +1 -1
- package/dist/{index-kZKcQZM_.cjs → index-DD4PT0Pl.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/useChartAccessibility-BWojgys7.js +13 -0
- package/dist/useChartAccessibility-Cm7nkzTG.cjs +1 -0
- package/dist/{useNestedProp-g5oKzlVy.js → useNestedProp-Cg0NIwr6.js} +1 -1
- package/dist/{useNestedProp-D4Jn2Oxr.cjs → useNestedProp-DU7JFxpL.cjs} +1 -1
- package/dist/{usePrinter-DR42gTOS.cjs → usePrinter-BtJq2wwh.cjs} +1 -1
- package/dist/{usePrinter-DsiBLAy1.js → usePrinter-D-sSdR2l.js} +1 -1
- package/dist/{vue-data-ui-DB2kdhYH.js → vue-data-ui-Dh3BJvUF.js} +61 -61
- package/dist/{vue-data-ui-DbhVASfn.cjs → vue-data-ui-DzVmFW3P.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-DHeSFJ5z.js → vue-ui-3d-bar-Ckd-GTWY.js} +171 -168
- package/dist/vue-ui-3d-bar-llxfgI9N.cjs +19 -0
- package/dist/{vue-ui-accordion-BfDu7hTY.cjs → vue-ui-accordion-2He8z0Sy.cjs} +1 -1
- package/dist/{vue-ui-accordion-DBmchkva.js → vue-ui-accordion-DVtmOO3I.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CvUCPqxa.js → vue-ui-age-pyramid-BUGAES7K.js} +85 -82
- package/dist/vue-ui-age-pyramid-CxBb12yp.cjs +1 -0
- package/dist/{vue-ui-annotator-BV9t6ro7.cjs → vue-ui-annotator-BDUanFLb.cjs} +1 -1
- package/dist/{vue-ui-annotator-Dr5PLrJx.js → vue-ui-annotator-gIa7-tAI.js} +1 -1
- package/dist/vue-ui-bullet-Bg8f_RzX.cjs +34 -0
- package/dist/{vue-ui-bullet-D7Uw9tez.js → vue-ui-bullet-DNfzMdcg.js} +92 -89
- package/dist/vue-ui-candlestick-CnKPX6xB.cjs +2 -0
- package/dist/{vue-ui-candlestick-BFmh-zx1.js → vue-ui-candlestick-jErGIOZA.js} +155 -152
- package/dist/{vue-ui-carousel-table-CUhkylz_.js → vue-ui-carousel-table-DHyvpjWL.js} +4 -4
- package/dist/{vue-ui-carousel-table-C30Gvanv.cjs → vue-ui-carousel-table-DsY9Mrdg.cjs} +1 -1
- package/dist/vue-ui-chestnut-BTCxF3dU.cjs +6 -0
- package/dist/{vue-ui-chestnut-C53wdHmR.js → vue-ui-chestnut-kQjk4FqR.js} +186 -183
- package/dist/{vue-ui-circle-pack-Bj3sA7RV.js → vue-ui-circle-pack-BQbwIDRa.js} +99 -96
- package/dist/vue-ui-circle-pack-D-eMMNzU.cjs +1 -0
- package/dist/{vue-ui-cursor-ZBrt-jTo.cjs → vue-ui-cursor-Dd2eSMAz.cjs} +1 -1
- package/dist/{vue-ui-cursor-0GY46Ywr.js → vue-ui-cursor-xy62w2ep.js} +2 -2
- package/dist/{vue-ui-dashboard-BX787_or.js → vue-ui-dashboard-DPjU-kPn.js} +2 -2
- package/dist/{vue-ui-dashboard-pzZD8J2y.cjs → vue-ui-dashboard-nMODKstD.cjs} +1 -1
- package/dist/{vue-ui-digits-BvCMwL0L.js → vue-ui-digits-BNTE0Lsb.js} +2 -2
- package/dist/{vue-ui-digits-Blb8fghV.cjs → vue-ui-digits-Beuy8wvV.cjs} +1 -1
- package/dist/vue-ui-donut-DWKUDr7k.cjs +1 -0
- package/dist/vue-ui-donut-evolution-BICtQ8ke.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DRfJVMrP.js → vue-ui-donut-evolution-DfHfXqar.js} +133 -131
- package/dist/{vue-ui-donut-yBjSgsTz.js → vue-ui-donut-ipVF2Pk6.js} +158 -155
- package/dist/{vue-ui-dumbbell-4-hWZn-o.js → vue-ui-dumbbell-D04To0aO.js} +125 -122
- package/dist/vue-ui-dumbbell-DPZYa6RZ.cjs +9 -0
- package/dist/{vue-ui-flow-aH6xSdwn.js → vue-ui-flow-DYpBU4gG.js} +96 -93
- package/dist/vue-ui-flow-HFjfjzgX.cjs +1 -0
- package/dist/vue-ui-funnel-BwClLXO6.cjs +1 -0
- package/dist/{vue-ui-funnel-BZy4SvlW.js → vue-ui-funnel-CVQHETom.js} +88 -85
- package/dist/vue-ui-galaxy-B0W8yBZU.cjs +1 -0
- package/dist/{vue-ui-galaxy-GDXdZqjm.js → vue-ui-galaxy-DseGnRIL.js} +123 -120
- package/dist/vue-ui-gauge-0vhiDi19.cjs +1 -0
- package/dist/{vue-ui-gauge-CeyHdkuS.js → vue-ui-gauge-B7nCLtyI.js} +86 -83
- package/dist/{vue-ui-gizmo-veFxjktw.js → vue-ui-gizmo-C1fpqm2H.js} +3 -3
- package/dist/{vue-ui-gizmo-CRTzb1J_.cjs → vue-ui-gizmo-CTMnMH7C.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BizLgjJ8.js → vue-ui-heatmap-B0a6TegZ.js} +109 -106
- package/dist/vue-ui-heatmap-DjxXVFyU.cjs +1 -0
- package/dist/vue-ui-history-plot-CfjWg_3c.cjs +1 -0
- package/dist/{vue-ui-history-plot-gzx5uGyY.js → vue-ui-history-plot-DsLgXpZ8.js} +130 -127
- package/dist/{vue-ui-kpi-CP08PB51.cjs → vue-ui-kpi-CTsWQvCi.cjs} +1 -1
- package/dist/{vue-ui-kpi-MdyAQjdJ.js → vue-ui-kpi-be1EaVNS.js} +3 -3
- package/dist/{vue-ui-mini-loader-CYVr1K6S.js → vue-ui-mini-loader-BHm2QQQF.js} +2 -2
- package/dist/{vue-ui-mini-loader-BRmtJ6az.cjs → vue-ui-mini-loader-DLdlPE48.cjs} +1 -1
- package/dist/{vue-ui-molecule-CJ05ddhf.js → vue-ui-molecule--G2QIMak.js} +147 -144
- package/dist/vue-ui-molecule-DQOP_2JN.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DG1pF6Ii.js → vue-ui-mood-radar-Bhr5Q9pC.js} +97 -94
- package/dist/vue-ui-mood-radar-HxyTIDLP.cjs +1 -0
- package/dist/vue-ui-nested-donuts-C0aK_Cmr.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-CDjZ6KfI.js → vue-ui-nested-donuts-Dtll0W-x.js} +99 -96
- package/dist/{vue-ui-onion-DsskQUiP.js → vue-ui-onion-CRRZ8ajr.js} +105 -102
- package/dist/vue-ui-onion-DJFv8ezH.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-BTkf3dkR.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-D7r71vdp.js → vue-ui-parallel-coordinate-plot-DMk3iobe.js} +97 -94
- package/dist/vue-ui-quadrant-B7iHGaqG.cjs +1 -0
- package/dist/{vue-ui-quadrant-DCHEhvMX.js → vue-ui-quadrant-EcGC8p0U.js} +155 -152
- package/dist/vue-ui-quick-chart-BOla8Yse.cjs +15 -0
- package/dist/{vue-ui-quick-chart-BB5b4AQ1.js → vue-ui-quick-chart-D6AS1YSx.js} +164 -161
- package/dist/vue-ui-radar-DmM3tCiY.cjs +1 -0
- package/dist/{vue-ui-radar-CNEXWSEx.js → vue-ui-radar-LzAasUWm.js} +105 -102
- package/dist/{vue-ui-rating-ClvF4LPg.cjs → vue-ui-rating-D9K7meNL.cjs} +1 -1
- package/dist/{vue-ui-rating-DJLSl0-4.js → vue-ui-rating-DK4hwg8z.js} +2 -2
- package/dist/{vue-ui-relation-circle-Hdzt7fOS.js → vue-ui-relation-circle-CbOCYAmF.js} +127 -124
- package/dist/vue-ui-relation-circle-DIJuJZrt.cjs +1 -0
- package/dist/vue-ui-rings-BWgF92GG.cjs +2 -0
- package/dist/{vue-ui-rings-BAFkqjcL.js → vue-ui-rings-Cqzy5T3m.js} +114 -111
- package/dist/{vue-ui-scatter-Ca67EOrI.js → vue-ui-scatter-DXvyWQYL.js} +157 -154
- package/dist/vue-ui-scatter-F-gNKXpp.cjs +1 -0
- package/dist/{vue-ui-screenshot-CsdnwhSO.js → vue-ui-screenshot-BL75IkNz.js} +1 -1
- package/dist/{vue-ui-screenshot-CFcvBOJm.cjs → vue-ui-screenshot-BXngAa8V.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CHEZlRpn.js → vue-ui-skeleton-D8r-yAkW.js} +3 -3
- package/dist/{vue-ui-skeleton-BBNX7lud.cjs → vue-ui-skeleton-Tk4j6G2D.cjs} +1 -1
- package/dist/{vue-ui-smiley-Dth6gRqg.js → vue-ui-smiley-BKWWVHh7.js} +2 -2
- package/dist/{vue-ui-smiley-EngC6Vc4.cjs → vue-ui-smiley-BLnMEG6Z.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-33sBlF-n.js → vue-ui-spark-trend-Bb7xpmpt.js} +5 -5
- package/dist/{vue-ui-spark-trend-DJ8yhFMx.cjs → vue-ui-spark-trend-CqG-PKFp.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D9QLpB7G.cjs → vue-ui-sparkbar-0h661dcM.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-mJu95295.js → vue-ui-sparkbar-JIpGYhbq.js} +4 -4
- package/dist/vue-ui-sparkgauge-BLglWMCN.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-nFFf8h-x.js → vue-ui-sparkgauge-Cc-l_NLU.js} +56 -53
- package/dist/{vue-ui-sparkhistogram-Bh6R737O.js → vue-ui-sparkhistogram-BysifQmq.js} +93 -90
- package/dist/vue-ui-sparkhistogram-CCbcvIJ1.cjs +1 -0
- package/dist/vue-ui-sparkline-CDJX8K9i.cjs +1 -0
- package/dist/{vue-ui-sparkline-BfBiA1O5.js → vue-ui-sparkline-CV-N3Wio.js} +109 -106
- package/dist/vue-ui-sparkstackbar-Bo4JAlsR.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-BNTFNUIA.js → vue-ui-sparkstackbar-WOO_AbtI.js} +59 -56
- package/dist/{vue-ui-stackbar-BbFUifMU.js → vue-ui-stackbar-CP0igpri.js} +136 -133
- package/dist/vue-ui-stackbar-D7odU6jb.cjs +6 -0
- package/dist/vue-ui-strip-plot-CUqC58Ki.cjs +1 -0
- package/dist/{vue-ui-strip-plot-wsxpyqrw.js → vue-ui-strip-plot-_3AJWLnm.js} +127 -124
- package/dist/{vue-ui-table-DUokotBj.cjs → vue-ui-table-8O19epjz.cjs} +1 -1
- package/dist/{vue-ui-table-CQYM4uPf.js → vue-ui-table-WdE7p5Oy.js} +1 -1
- package/dist/{vue-ui-table-heatmap-OYQ9OOzo.js → vue-ui-table-heatmap-CXS6WfTi.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Brk58nK_.cjs → vue-ui-table-heatmap-DH5kHmxx.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DUjDhg8A.js → vue-ui-table-sparkline-CWwjANqk.js} +5 -5
- package/dist/{vue-ui-table-sparkline-C9dOsIAB.cjs → vue-ui-table-sparkline-DnvQfr2p.cjs} +1 -1
- package/dist/{vue-ui-thermometer-WSMSVcM_.js → vue-ui-thermometer-BxrDTquG.js} +84 -81
- package/dist/vue-ui-thermometer-COmtpPaq.cjs +1 -0
- package/dist/vue-ui-timer-Bx3W4oUc.cjs +64 -0
- package/dist/{vue-ui-timer-DBP_fRcm.js → vue-ui-timer-DjKCOw9A.js} +183 -180
- package/dist/vue-ui-tiremarks--XDyJeJg.cjs +1 -0
- package/dist/{vue-ui-tiremarks-WWgS2mqw.js → vue-ui-tiremarks-VWxcZxB-.js} +59 -56
- package/dist/{vue-ui-treemap-CXoXEuSA.js → vue-ui-treemap-BGFmZcII.js} +123 -120
- package/dist/vue-ui-treemap-DTwjydy8.cjs +1 -0
- package/dist/vue-ui-vertical-bar-Bpv8mXW2.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-COaAa4nz.js → vue-ui-vertical-bar-DC9czKCT.js} +108 -105
- package/dist/vue-ui-waffle-B_6ZAnKt.cjs +1 -0
- package/dist/{vue-ui-waffle-DD8pT7JN.js → vue-ui-waffle-Cu63K9Iy.js} +107 -104
- package/dist/{vue-ui-wheel-BLlKekiu.js → vue-ui-wheel-AOt-pfpa.js} +75 -72
- package/dist/vue-ui-wheel-BQM-dxTa.cjs +1 -0
- package/dist/vue-ui-word-cloud-Bam3-7P_.cjs +1 -0
- package/dist/{vue-ui-word-cloud-CcYtTXW6.js → vue-ui-word-cloud-CrILrx6m.js} +97 -94
- package/dist/{vue-ui-xy-DYzfiZnJ.js → vue-ui-xy-BuLymzS3.js} +179 -150
- package/dist/vue-ui-xy-CSmObuR7.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-CkB7VDhF.cjs → vue-ui-xy-canvas-BQ0Lbxbd.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DqnK_i0Q.js → vue-ui-xy-canvas-DPnb5mqS.js} +82 -81
- package/package.json +1 -1
- package/dist/Shape-BN3-_2DI.cjs +0 -1
- package/dist/Tooltip-DSPKrQcQ.cjs +0 -1
- package/dist/vue-ui-3d-bar-DEu24HHj.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CRYYDXFo.cjs +0 -1
- package/dist/vue-ui-bullet-Dy71N3Jf.cjs +0 -34
- package/dist/vue-ui-candlestick-aZ1YN4hh.cjs +0 -2
- package/dist/vue-ui-chestnut-DuycsDaB.cjs +0 -6
- package/dist/vue-ui-circle-pack-BFF5_9Sm.cjs +0 -1
- package/dist/vue-ui-donut-BO6RWqZ6.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BgJMw_a4.cjs +0 -1
- package/dist/vue-ui-dumbbell-BSXxNjyK.cjs +0 -9
- package/dist/vue-ui-flow-LNlNIRfb.cjs +0 -1
- package/dist/vue-ui-funnel-BhDmLkFj.cjs +0 -1
- package/dist/vue-ui-galaxy-BcwAAgUh.cjs +0 -1
- package/dist/vue-ui-gauge-BCf-2H4T.cjs +0 -1
- package/dist/vue-ui-heatmap-Bxhy4dCf.cjs +0 -1
- package/dist/vue-ui-history-plot-CTBCFIG0.cjs +0 -1
- package/dist/vue-ui-molecule-pTMJG_3k.cjs +0 -1
- package/dist/vue-ui-mood-radar-DXLYUXbX.cjs +0 -1
- package/dist/vue-ui-nested-donuts-yztsnsjM.cjs +0 -17
- package/dist/vue-ui-onion-BgbKMVNe.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-Cha1Em8k.cjs +0 -8
- package/dist/vue-ui-quadrant-BzYnR_Hc.cjs +0 -1
- package/dist/vue-ui-quick-chart-BcW7URue.cjs +0 -15
- package/dist/vue-ui-radar-D-XPVXa9.cjs +0 -1
- package/dist/vue-ui-relation-circle-DfxnHEqR.cjs +0 -1
- package/dist/vue-ui-rings-C9NFME3F.cjs +0 -2
- package/dist/vue-ui-scatter-D0UloS1C.cjs +0 -1
- package/dist/vue-ui-sparkgauge-CBCbyOG2.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BstSpbti.cjs +0 -1
- package/dist/vue-ui-sparkline-DTRZ-_Qw.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-CuU8Vpcv.cjs +0 -1
- package/dist/vue-ui-stackbar-B5uNBkxp.cjs +0 -6
- package/dist/vue-ui-strip-plot-7G7BAGQM.cjs +0 -1
- package/dist/vue-ui-thermometer-VnlcJh4G.cjs +0 -1
- package/dist/vue-ui-timer-Bh8RpM2u.cjs +0 -64
- package/dist/vue-ui-tiremarks-Ct96o_fd.cjs +0 -1
- package/dist/vue-ui-treemap-BfDk53pM.cjs +0 -1
- package/dist/vue-ui-vertical-bar-EIy7A0dV.cjs +0 -4
- package/dist/vue-ui-waffle-BB3l0zZU.cjs +0 -1
- package/dist/vue-ui-wheel-DfpXZJ8A.cjs +0 -1
- package/dist/vue-ui-word-cloud-DdaMzF2e.cjs +0 -1
- package/dist/vue-ui-xy-B4Mzyy81.cjs +0 -3
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
|
|
2
|
+
import { u as oe } from "./useNestedProp-Cg0NIwr6.js";
|
|
3
|
+
import { u as re, c as ue, X as ie, F as V } from "./index-CZlI7PiS.js";
|
|
4
|
+
import { t as ne, u as ce } from "./useResponsive-BWapHhVH.js";
|
|
5
|
+
import R from "./BaseIcon-dThl5uNa.js";
|
|
6
|
+
import { _ as de } from "./Title-DePxeqVl.js";
|
|
7
|
+
import { _ as he } from "./PackageVersion-J_USnljf.js";
|
|
8
|
+
import { u as ve } from "./useChartAccessibility-BWojgys7.js";
|
|
9
|
+
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
class fe {
|
|
11
|
+
constructor(L, N, P, S = !0, w = !0) {
|
|
12
|
+
this.interval = N, this.elapsed = 0, this.isPaused = !1;
|
|
13
|
+
const M = `
|
|
13
14
|
let interval;
|
|
14
15
|
let elapsed = 0;
|
|
15
16
|
let paused = false;
|
|
@@ -72,53 +73,53 @@ class ve {
|
|
|
72
73
|
break;
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
|
-
`,
|
|
76
|
-
function T(
|
|
77
|
-
let
|
|
78
|
-
return w && (
|
|
76
|
+
`, D = new Blob([M], { type: "application/javascript" }), F = URL.createObjectURL(D), r = new Worker(F);
|
|
77
|
+
function T(n) {
|
|
78
|
+
let h = Math.floor(n / 1e3), e = Math.floor(n % 1e3 / 10), g = Math.floor(h / 3600), m = Math.floor(h % 3600 / 60), $ = h % 60, t = "";
|
|
79
|
+
return w && (t += String(g).padStart(2, "0") + ":"), t += String(m).padStart(2, "0") + ":", t += String($).padStart(2, "0"), S && (t += "." + String(e).padStart(2, "0")), t;
|
|
79
80
|
}
|
|
80
81
|
this.start = () => {
|
|
81
|
-
this.isPaused = !1,
|
|
82
|
+
this.isPaused = !1, r.postMessage({ action: "start", data: { interval: this.interval } });
|
|
82
83
|
}, this.pause = () => {
|
|
83
|
-
this.isPaused ? this.resume() : (this.isPaused = !0,
|
|
84
|
+
this.isPaused ? this.resume() : (this.isPaused = !0, r.postMessage({ action: "pause" }));
|
|
84
85
|
}, this.resume = () => {
|
|
85
|
-
this.isPaused && (
|
|
86
|
+
this.isPaused && (r.postMessage({ action: "resume" }), this.isPaused = !1);
|
|
86
87
|
}, this.stop = () => {
|
|
87
|
-
|
|
88
|
+
r.postMessage({ action: "stop" }), this.isPaused = !1;
|
|
88
89
|
}, this.reset = () => {
|
|
89
|
-
|
|
90
|
+
r.postMessage({ action: "reset" }), this.elapsed = 0, this.isPaused = !1;
|
|
90
91
|
}, this.restart = () => {
|
|
91
92
|
this.stop(), this.start();
|
|
92
|
-
}, this.lap = () => new Promise((
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
const { elapsed:
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
timestamp:
|
|
100
|
-
elapsed:
|
|
101
|
-
formatted:
|
|
93
|
+
}, this.lap = () => new Promise((n) => {
|
|
94
|
+
r.postMessage({ action: "lap" });
|
|
95
|
+
const h = (e) => {
|
|
96
|
+
const { elapsed: g, timestamp: m, action: $ } = e.data;
|
|
97
|
+
if ($ === "lap") {
|
|
98
|
+
const t = T(g);
|
|
99
|
+
n({
|
|
100
|
+
timestamp: m || 0,
|
|
101
|
+
elapsed: g,
|
|
102
|
+
formatted: t
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
|
-
|
|
106
|
-
}),
|
|
107
|
-
const { elapsed:
|
|
108
|
-
this.elapsed =
|
|
106
|
+
r.addEventListener("message", h, { once: !0 });
|
|
107
|
+
}), r.onmessage = (n) => {
|
|
108
|
+
const { elapsed: h, timestamp: e } = n.data;
|
|
109
|
+
this.elapsed = h, L({
|
|
109
110
|
timestamp: e || 0,
|
|
110
111
|
elapsed: this.elapsed,
|
|
111
112
|
formatted: T(this.elapsed)
|
|
112
113
|
});
|
|
113
|
-
},
|
|
114
|
-
P && P(
|
|
114
|
+
}, r.onerror = (n) => {
|
|
115
|
+
P && P(n);
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
|
-
const
|
|
119
|
+
const we = ["xmlns", "viewBox"], ke = ["width", "height"], ge = { key: 1 }, me = ["id"], ye = ["stop-color"], be = ["stop-color"], _e = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ce = ["d", "stroke", "stroke-width"], Me = ["r", "fill", "stroke", "stroke-width"], Te = ["r", "fill", "stroke", "stroke-width"], $e = ["x", "y"], xe = ["x", "y", "font-size", "fill", "font-weight"], Ie = {
|
|
119
120
|
key: 0,
|
|
120
121
|
class: "vue-ui-timer-controls"
|
|
121
|
-
},
|
|
122
|
+
}, Re = ["title"], Pe = ["title"], Se = ["title"], De = ["title"], Fe = ["title"], Ae = {
|
|
122
123
|
__name: "vue-ui-timer",
|
|
123
124
|
props: {
|
|
124
125
|
config: {
|
|
@@ -129,34 +130,34 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
129
130
|
}
|
|
130
131
|
},
|
|
131
132
|
emits: ["start", "pause", "reset", "restart", "lap"],
|
|
132
|
-
setup(
|
|
133
|
-
const { vue_ui_timer: P } =
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
setup(X, { expose: L, emit: N }) {
|
|
134
|
+
const { vue_ui_timer: P } = re(), S = X, w = N, M = i(null), D = i(null), F = i(null), r = i(null), T = i(ue()), n = i(0);
|
|
135
|
+
Z(() => {
|
|
136
|
+
h();
|
|
136
137
|
});
|
|
137
|
-
function
|
|
138
|
+
function h() {
|
|
138
139
|
if (e.value.responsive) {
|
|
139
|
-
const a =
|
|
140
|
-
const { width:
|
|
141
|
-
chart:
|
|
142
|
-
title: e.value.style.title.text ?
|
|
143
|
-
legend:
|
|
140
|
+
const a = ne(() => {
|
|
141
|
+
const { width: u, height: c } = ce({
|
|
142
|
+
chart: M.value,
|
|
143
|
+
title: e.value.style.title.text ? D.value : null,
|
|
144
|
+
legend: F.value
|
|
144
145
|
});
|
|
145
146
|
requestAnimationFrame(() => {
|
|
146
|
-
t.value.width =
|
|
147
|
-
relator: Math.min(
|
|
147
|
+
t.value.width = u, t.value.height = c, t.value.tracker.core = V({
|
|
148
|
+
relator: Math.min(u, c),
|
|
148
149
|
adjuster: e.value.style.width,
|
|
149
150
|
source: 6 * e.value.stopwatch.tracker.radiusRatio,
|
|
150
151
|
threshold: 1,
|
|
151
152
|
fallback: 1
|
|
152
|
-
}), t.value.tracker.aura =
|
|
153
|
-
relator: Math.min(
|
|
153
|
+
}), t.value.tracker.aura = V({
|
|
154
|
+
relator: Math.min(u, c),
|
|
154
155
|
adjuster: e.value.style.width,
|
|
155
156
|
source: 12 * e.value.stopwatch.tracker.aura.radiusRatio,
|
|
156
157
|
threshold: 1,
|
|
157
158
|
fallback: 1
|
|
158
|
-
}), t.value.label =
|
|
159
|
-
relator: Math.min(
|
|
159
|
+
}), t.value.label = V({
|
|
160
|
+
relator: Math.min(u, c),
|
|
160
161
|
adjuster: e.value.style.width,
|
|
161
162
|
source: e.value.stopwatch.label.fontSize,
|
|
162
163
|
threshold: 10,
|
|
@@ -164,26 +165,26 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
164
165
|
});
|
|
165
166
|
});
|
|
166
167
|
});
|
|
167
|
-
|
|
168
|
+
r.value = new ResizeObserver(a), r.value.observe(M.value.parentNode);
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
ee(() => {
|
|
172
|
+
r.value && r.value.disconnect();
|
|
172
173
|
});
|
|
173
|
-
const e =
|
|
174
|
-
get: () =>
|
|
174
|
+
const e = z({
|
|
175
|
+
get: () => m(),
|
|
175
176
|
set: (a) => a
|
|
176
|
-
});
|
|
177
|
-
function
|
|
178
|
-
return
|
|
177
|
+
}), { svgRef: g } = ve({ config: e.value.style.title });
|
|
178
|
+
function m() {
|
|
179
|
+
return oe({
|
|
179
180
|
userConfig: S.config,
|
|
180
181
|
defaultConfig: P
|
|
181
182
|
});
|
|
182
183
|
}
|
|
183
|
-
|
|
184
|
-
e.value =
|
|
184
|
+
te(() => S.config, (a) => {
|
|
185
|
+
e.value = m(), h(), n.value += 1;
|
|
185
186
|
}, { deep: !0 });
|
|
186
|
-
const $ =
|
|
187
|
+
const $ = z(() => {
|
|
187
188
|
if (e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
|
|
188
189
|
return "00:00:00.00";
|
|
189
190
|
if (e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
|
|
@@ -192,7 +193,7 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
192
193
|
return "00:00.00";
|
|
193
194
|
if (!e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
|
|
194
195
|
return "00:00";
|
|
195
|
-
}), t =
|
|
196
|
+
}), t = i({
|
|
196
197
|
height: e.value.style.height,
|
|
197
198
|
width: e.value.style.width,
|
|
198
199
|
tracker: {
|
|
@@ -200,80 +201,80 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
200
201
|
aura: 12 * e.value.stopwatch.tracker.aura.radiusRatio
|
|
201
202
|
},
|
|
202
203
|
label: e.value.stopwatch.label.fontSize
|
|
203
|
-
}),
|
|
204
|
-
(a) =>
|
|
204
|
+
}), f = i(0), x = new fe(
|
|
205
|
+
(a) => J(a),
|
|
205
206
|
10,
|
|
206
207
|
"",
|
|
207
208
|
e.value.stopwatch.showHundredth,
|
|
208
209
|
e.value.stopwatch.showHours
|
|
209
|
-
),
|
|
210
|
-
function j() {
|
|
211
|
-
w("start"), N.value && m.start(), N.value = !1, s.value = !0;
|
|
212
|
-
}
|
|
210
|
+
), j = i(!0), s = i(!1), v = i(!1);
|
|
213
211
|
function B() {
|
|
214
|
-
|
|
212
|
+
w("start"), j.value && x.start(), j.value = !1, s.value = !0;
|
|
215
213
|
}
|
|
216
214
|
function O() {
|
|
217
|
-
|
|
215
|
+
s.value && (w("reset"), x.stop(), y.value = [], j.value = !0, s.value = !1);
|
|
218
216
|
}
|
|
219
217
|
function E() {
|
|
220
|
-
|
|
218
|
+
v.value = !v.value, w("pause", f.value), x.pause();
|
|
221
219
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
function U() {
|
|
221
|
+
s.value && (v.value = !1, w("restart"), y.value = [], x.restart());
|
|
222
|
+
}
|
|
223
|
+
const y = i([]);
|
|
224
|
+
async function A() {
|
|
225
|
+
if (!s.value || v.value) return;
|
|
226
|
+
const a = await x.lap();
|
|
226
227
|
a && (y.value.push(a), w("lap", y.value));
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
229
|
+
function J({ timestamp: a, elapsed: u, formatted: c }) {
|
|
230
|
+
f.value = { timestamp: a, elapsed: u, formatted: c };
|
|
230
231
|
}
|
|
231
|
-
const
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return a *
|
|
232
|
+
const k = z(() => Math.min(t.value.width, t.value.height) / 2.5 * e.value.stopwatch.track.radiusRatio);
|
|
233
|
+
function K(a, u) {
|
|
234
|
+
const I = 360 / (u * 1e3);
|
|
235
|
+
return a * I % 360;
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
-
let
|
|
238
|
-
return { cx:
|
|
237
|
+
function Q(a) {
|
|
238
|
+
let u = a * (Math.PI / 180), c = t.value.width / 2 + k.value * Math.cos(u), I = t.value.height / 2 + k.value * Math.sin(u);
|
|
239
|
+
return { cx: c, cy: I };
|
|
239
240
|
}
|
|
240
|
-
const b =
|
|
241
|
-
const a =
|
|
241
|
+
const b = z(() => {
|
|
242
|
+
const a = K(f.value.elapsed, e.value.stopwatch.cycleSeconds), { cx: u, cy: c } = Q(a - 90), I = a > 180 ? 1 : 0;
|
|
242
243
|
return {
|
|
243
|
-
cx:
|
|
244
|
-
cy:
|
|
245
|
-
largeArcFlag:
|
|
244
|
+
cx: u || t.value.width / 2,
|
|
245
|
+
cy: c || t.value.height / 2 - k.value,
|
|
246
|
+
largeArcFlag: I,
|
|
246
247
|
sweepFlag: 1
|
|
247
248
|
};
|
|
248
249
|
});
|
|
249
|
-
return
|
|
250
|
-
start:
|
|
251
|
-
pause:
|
|
252
|
-
reset:
|
|
253
|
-
restart:
|
|
254
|
-
lap:
|
|
255
|
-
}), (a,
|
|
250
|
+
return L({
|
|
251
|
+
start: B,
|
|
252
|
+
pause: E,
|
|
253
|
+
reset: O,
|
|
254
|
+
restart: U,
|
|
255
|
+
lap: A
|
|
256
|
+
}), (a, u) => (l(), o("div", {
|
|
256
257
|
ref_key: "timerChart",
|
|
257
|
-
ref:
|
|
258
|
+
ref: M,
|
|
258
259
|
class: "vue-ui-timer",
|
|
259
|
-
style:
|
|
260
|
+
style: p({
|
|
260
261
|
fontFamily: e.value.style.fontFamily,
|
|
261
262
|
width: "100%",
|
|
262
263
|
height: e.value.responsive ? "100%" : "auto",
|
|
263
264
|
textAlign: "center"
|
|
264
265
|
})
|
|
265
266
|
}, [
|
|
266
|
-
e.value.style.title.text ? (l(),
|
|
267
|
+
e.value.style.title.text ? (l(), o("div", {
|
|
267
268
|
key: 0,
|
|
268
269
|
ref_key: "chartTitle",
|
|
269
|
-
ref:
|
|
270
|
-
style:
|
|
270
|
+
ref: D,
|
|
271
|
+
style: p({
|
|
271
272
|
width: "100%",
|
|
272
273
|
background: e.value.style.backgroundColor
|
|
273
274
|
})
|
|
274
275
|
}, [
|
|
275
|
-
(l(),
|
|
276
|
-
key: `title_${
|
|
276
|
+
(l(), ae(de, {
|
|
277
|
+
key: `title_${n.value}`,
|
|
277
278
|
config: {
|
|
278
279
|
title: {
|
|
279
280
|
cy: "title",
|
|
@@ -285,18 +286,20 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
288
|
}, null, 8, ["config"]))
|
|
288
|
-
], 4)) :
|
|
289
|
-
(l(),
|
|
290
|
-
|
|
289
|
+
], 4)) : d("", !0),
|
|
290
|
+
(l(), o("svg", {
|
|
291
|
+
ref_key: "svgRef",
|
|
292
|
+
ref: g,
|
|
293
|
+
xmlns: se(ie),
|
|
291
294
|
viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
|
|
292
|
-
style:
|
|
295
|
+
style: p({
|
|
293
296
|
maxWidth: "100%",
|
|
294
297
|
overflow: "visible",
|
|
295
298
|
background: e.value.style.backgroundColor
|
|
296
299
|
})
|
|
297
300
|
}, [
|
|
298
|
-
|
|
299
|
-
a.$slots["chart-background"] ? (l(),
|
|
301
|
+
C(he),
|
|
302
|
+
a.$slots["chart-background"] ? (l(), o("foreignObject", {
|
|
300
303
|
key: 0,
|
|
301
304
|
x: 0,
|
|
302
305
|
y: 0,
|
|
@@ -306,9 +309,9 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
306
309
|
pointerEvents: "none"
|
|
307
310
|
}
|
|
308
311
|
}, [
|
|
309
|
-
|
|
310
|
-
], 8,
|
|
311
|
-
e.value.stopwatch.tracker.gradient.show ? (l(),
|
|
312
|
+
H(a.$slots, "chart-background", {}, void 0, !0)
|
|
313
|
+
], 8, ke)) : d("", !0),
|
|
314
|
+
e.value.stopwatch.tracker.gradient.show ? (l(), o("defs", ge, [
|
|
312
315
|
_("radialGradient", {
|
|
313
316
|
id: `tracker_gradient_${T.value}`,
|
|
314
317
|
cx: "50%",
|
|
@@ -320,42 +323,42 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
320
323
|
_("stop", {
|
|
321
324
|
offset: "0%",
|
|
322
325
|
"stop-color": e.value.stopwatch.tracker.gradient.color
|
|
323
|
-
}, null, 8,
|
|
326
|
+
}, null, 8, ye),
|
|
324
327
|
_("stop", {
|
|
325
328
|
offset: "100%",
|
|
326
329
|
"stop-color": e.value.stopwatch.tracker.fill
|
|
327
|
-
}, null, 8,
|
|
328
|
-
], 8,
|
|
329
|
-
])) :
|
|
330
|
+
}, null, 8, be)
|
|
331
|
+
], 8, me)
|
|
332
|
+
])) : d("", !0),
|
|
330
333
|
_("circle", {
|
|
331
334
|
cx: t.value.width / 2,
|
|
332
335
|
cy: t.value.height / 2,
|
|
333
|
-
r:
|
|
336
|
+
r: k.value,
|
|
334
337
|
fill: e.value.stopwatch.track.fill,
|
|
335
338
|
stroke: e.value.stopwatch.track.stroke,
|
|
336
339
|
"stroke-width": e.value.stopwatch.track.strokeWidth
|
|
337
|
-
}, null, 8,
|
|
338
|
-
e.value.stopwatch.cycleTrack.show ? (l(),
|
|
340
|
+
}, null, 8, _e),
|
|
341
|
+
e.value.stopwatch.cycleTrack.show ? (l(), o("path", {
|
|
339
342
|
key: 2,
|
|
340
|
-
d: `M ${t.value.width / 2},${t.value.height / 2 -
|
|
343
|
+
d: `M ${t.value.width / 2},${t.value.height / 2 - k.value} A ${k.value},${k.value} 0 ${b.value.largeArcFlag},${b.value.sweepFlag} ${b.value.cx},${b.value.cy}`,
|
|
341
344
|
stroke: e.value.stopwatch.cycleTrack.stroke,
|
|
342
345
|
"stroke-width": e.value.stopwatch.cycleTrack.strokeWidth,
|
|
343
346
|
"stroke-linecap": "round",
|
|
344
347
|
fill: "none"
|
|
345
|
-
}, null, 8,
|
|
346
|
-
_("circle",
|
|
348
|
+
}, null, 8, Ce)) : d("", !0),
|
|
349
|
+
_("circle", q(b.value, {
|
|
347
350
|
r: t.value.tracker.core,
|
|
348
351
|
fill: e.value.stopwatch.tracker.gradient.show ? `url(#tracker_gradient_${T.value})` : e.value.stopwatch.tracker.fill,
|
|
349
352
|
stroke: e.value.stopwatch.tracker.stroke,
|
|
350
353
|
"stroke-width": e.value.stopwatch.tracker.strokeWidth
|
|
351
|
-
}), null, 16,
|
|
352
|
-
e.value.stopwatch.tracker.aura.show ? (l(),
|
|
354
|
+
}), null, 16, Me),
|
|
355
|
+
e.value.stopwatch.tracker.aura.show ? (l(), o("circle", q({ key: 3 }, b.value, {
|
|
353
356
|
r: t.value.tracker.aura,
|
|
354
357
|
fill: `${e.value.stopwatch.tracker.aura.fill}20`,
|
|
355
358
|
stroke: e.value.stopwatch.tracker.aura.stroke,
|
|
356
359
|
"stroke-width": e.value.stopwatch.tracker.aura.strokeWidth
|
|
357
|
-
}), null, 16,
|
|
358
|
-
a.$slots.time ? (l(),
|
|
360
|
+
}), null, 16, Te)) : d("", !0),
|
|
361
|
+
a.$slots.time ? (l(), o("foreignObject", {
|
|
359
362
|
key: 4,
|
|
360
363
|
x: t.value.width / 2,
|
|
361
364
|
y: t.value.height / 2,
|
|
@@ -363,8 +366,8 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
363
366
|
width: "0.1",
|
|
364
367
|
style: { overflow: "visible" }
|
|
365
368
|
}, [
|
|
366
|
-
|
|
367
|
-
], 8,
|
|
369
|
+
H(a.$slots, "time", W(G({ ...f.value })), void 0, !0)
|
|
370
|
+
], 8, $e)) : (l(), o("text", {
|
|
368
371
|
key: 5,
|
|
369
372
|
x: t.value.width / 2,
|
|
370
373
|
y: t.value.height / 2 + t.value.label / 4,
|
|
@@ -373,112 +376,112 @@ const pe = ["xmlns", "viewBox"], fe = ["width", "height"], we = { key: 1 }, ke =
|
|
|
373
376
|
fill: e.value.stopwatch.label.color,
|
|
374
377
|
"font-weight": e.value.stopwatch.label.bold ? "bold" : "normal",
|
|
375
378
|
style: { "font-variant-numeric": "tabular-nums !important" }
|
|
376
|
-
},
|
|
377
|
-
], 12,
|
|
379
|
+
}, le(f.value.formatted || $.value), 9, xe))
|
|
380
|
+
], 12, we)),
|
|
378
381
|
_("div", {
|
|
379
382
|
ref_key: "chartLegend",
|
|
380
|
-
ref:
|
|
381
|
-
style:
|
|
383
|
+
ref: F,
|
|
384
|
+
style: p({ width: "100%", backgroundColor: e.value.stopwatch.legend.backgroundColor })
|
|
382
385
|
}, [
|
|
383
|
-
a.$slots.controls ?
|
|
384
|
-
e.value.stopwatch.legend.buttons.start ? (l(),
|
|
386
|
+
a.$slots.controls ? d("", !0) : (l(), o("div", Ie, [
|
|
387
|
+
e.value.stopwatch.legend.buttons.start ? (l(), o("button", {
|
|
385
388
|
key: 0,
|
|
386
389
|
title: e.value.stopwatch.legend.buttonTitles.start,
|
|
387
|
-
onClick:
|
|
390
|
+
onClick: B,
|
|
388
391
|
class: "vue-ui-timer-button",
|
|
389
|
-
style:
|
|
392
|
+
style: p({
|
|
390
393
|
opacity: s.value ? 0.2 : 1,
|
|
391
394
|
cursor: s.value ? "default" : "pointer"
|
|
392
395
|
})
|
|
393
396
|
}, [
|
|
394
|
-
|
|
397
|
+
C(R, {
|
|
395
398
|
name: "play",
|
|
396
399
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
397
400
|
}, null, 8, ["stroke"])
|
|
398
|
-
], 12,
|
|
399
|
-
e.value.stopwatch.legend.buttons.pause ? (l(),
|
|
401
|
+
], 12, Re)) : d("", !0),
|
|
402
|
+
e.value.stopwatch.legend.buttons.pause ? (l(), o("button", {
|
|
400
403
|
key: 1,
|
|
401
|
-
title:
|
|
402
|
-
onClick:
|
|
404
|
+
title: v.value ? e.value.stopwatch.legend.buttonTitles.resume : e.value.stopwatch.legend.buttonTitles.pause,
|
|
405
|
+
onClick: E,
|
|
403
406
|
class: "vue-ui-timer-button",
|
|
404
|
-
style:
|
|
407
|
+
style: p({
|
|
405
408
|
opacity: s.value ? 1 : 0.2,
|
|
406
409
|
cursor: s.value ? "pointer" : "default"
|
|
407
410
|
})
|
|
408
411
|
}, [
|
|
409
|
-
|
|
412
|
+
C(R, {
|
|
410
413
|
name: "pause",
|
|
411
414
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
412
415
|
}, null, 8, ["stroke"])
|
|
413
|
-
], 12,
|
|
414
|
-
e.value.stopwatch.legend.buttons.reset ? (l(),
|
|
416
|
+
], 12, Pe)) : d("", !0),
|
|
417
|
+
e.value.stopwatch.legend.buttons.reset ? (l(), o("button", {
|
|
415
418
|
key: 2,
|
|
416
419
|
title: e.value.stopwatch.legend.buttonTitles.reset,
|
|
417
|
-
onClick:
|
|
420
|
+
onClick: O,
|
|
418
421
|
class: "vue-ui-timer-button",
|
|
419
|
-
style:
|
|
422
|
+
style: p({
|
|
420
423
|
opacity: s.value ? 1 : 0.2,
|
|
421
424
|
cursor: s.value ? "pointer" : "default"
|
|
422
425
|
})
|
|
423
426
|
}, [
|
|
424
|
-
|
|
427
|
+
C(R, {
|
|
425
428
|
name: "stop",
|
|
426
429
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
427
430
|
}, null, 8, ["stroke"])
|
|
428
|
-
], 12,
|
|
429
|
-
e.value.stopwatch.legend.buttons.restart ? (l(),
|
|
431
|
+
], 12, Se)) : d("", !0),
|
|
432
|
+
e.value.stopwatch.legend.buttons.restart ? (l(), o("button", {
|
|
430
433
|
key: 3,
|
|
431
434
|
title: e.value.stopwatch.legend.buttonTitles.restart,
|
|
432
|
-
onClick:
|
|
435
|
+
onClick: U,
|
|
433
436
|
class: "vue-ui-timer-button",
|
|
434
|
-
style:
|
|
437
|
+
style: p({
|
|
435
438
|
opacity: s.value ? 1 : 0.2,
|
|
436
439
|
cursor: s.value ? "pointer" : "default"
|
|
437
440
|
})
|
|
438
441
|
}, [
|
|
439
|
-
|
|
442
|
+
C(R, {
|
|
440
443
|
name: "restart",
|
|
441
444
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
442
445
|
}, null, 8, ["stroke"])
|
|
443
|
-
], 12,
|
|
444
|
-
e.value.stopwatch.legend.buttons.lap ? (l(),
|
|
446
|
+
], 12, De)) : d("", !0),
|
|
447
|
+
e.value.stopwatch.legend.buttons.lap ? (l(), o("button", {
|
|
445
448
|
key: 4,
|
|
446
449
|
title: e.value.stopwatch.legend.buttonTitles.lap,
|
|
447
|
-
onClick:
|
|
450
|
+
onClick: A,
|
|
448
451
|
class: "vue-ui-timer-button",
|
|
449
|
-
style:
|
|
450
|
-
opacity: s.value && !
|
|
451
|
-
cursor: s.value && !
|
|
452
|
+
style: p({
|
|
453
|
+
opacity: s.value && !v.value ? 1 : 0.2,
|
|
454
|
+
cursor: s.value && !v.value ? "pointer" : "default"
|
|
452
455
|
})
|
|
453
456
|
}, [
|
|
454
|
-
|
|
457
|
+
C(R, {
|
|
455
458
|
name: "lap",
|
|
456
459
|
stroke: e.value.stopwatch.legend.buttons.iconColor
|
|
457
460
|
}, null, 8, ["stroke"])
|
|
458
|
-
], 12,
|
|
461
|
+
], 12, Fe)) : d("", !0)
|
|
459
462
|
])),
|
|
460
|
-
|
|
461
|
-
start:
|
|
462
|
-
pause:
|
|
463
|
-
reset:
|
|
464
|
-
restart:
|
|
465
|
-
lap:
|
|
463
|
+
H(a.$slots, "controls", W(G({
|
|
464
|
+
start: B,
|
|
465
|
+
pause: E,
|
|
466
|
+
reset: O,
|
|
467
|
+
restart: U,
|
|
468
|
+
lap: A,
|
|
466
469
|
laps: y.value,
|
|
467
470
|
isRunning: s.value,
|
|
468
|
-
isPaused:
|
|
469
|
-
...
|
|
471
|
+
isPaused: v.value,
|
|
472
|
+
...f.value
|
|
470
473
|
})), void 0, !0),
|
|
471
|
-
|
|
474
|
+
H(a.$slots, "laps", W(G({
|
|
472
475
|
laps: y.value,
|
|
473
|
-
lap:
|
|
476
|
+
lap: A,
|
|
474
477
|
isRunning: s.value,
|
|
475
|
-
isPaused:
|
|
476
|
-
...
|
|
478
|
+
isPaused: v.value,
|
|
479
|
+
...f.value
|
|
477
480
|
})), void 0, !0)
|
|
478
481
|
], 4)
|
|
479
482
|
], 4));
|
|
480
483
|
}
|
|
481
|
-
},
|
|
484
|
+
}, We = /* @__PURE__ */ pe(Ae, [["__scopeId", "data-v-19145f1f"]]);
|
|
482
485
|
export {
|
|
483
|
-
|
|
486
|
+
We as default
|
|
484
487
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DU7JFxpL.cjs"),c=require("./index-DD4PT0Pl.cjs"),K=require("./Title-BQSh4ukk.cjs"),j=require("./usePrinter-BtJq2wwh.cjs"),Q=require("./vue-ui-skeleton-Tk4j6G2D.cjs"),W=require("./PackageVersion-CCgJTyH9.cjs"),Z=require("./PenAndPaper-DvNBHCpq.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:R}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),P=e.ref(null),D=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:N,keepUserOptionState:z}=ee.useUserOptionState({config:t.value}),{svgRef:X}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:R});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),x.value=!t.value.userOptions.showOnChartHover,M(),A.value+=1},{deep:!0});const{isPrinting:I,isImaging:F,generatePdf:V,generateImage:q}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?T(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{M()});function T(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function M(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),T(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),U=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/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-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function O(){w.value=!w.value}return H({generatePdf:V,generateImage:q,toggleAnnotator:O}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:P,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;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(N)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(N)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:D,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.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&&$.value&&(e.unref(z)||e.unref(x))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(F),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(V),onGenerateImage:e.unref(q),onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(z)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:X,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,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,s.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,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},me=oe._export_sfc(pe,[["__scopeId","data-v-85afd94d"]]);exports.default=me;
|