vue-data-ui 2.4.57 → 2.4.59
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 +82 -51
- package/dist/{Arrow-BhwhLRcU.cjs → Arrow-Dudbi6k5.cjs} +1 -1
- package/dist/{Arrow-DelnKkT1.js → Arrow-DzS4HIXj.js} +1 -1
- package/dist/{BaseIcon-9gdEHMWK.js → BaseIcon-BbU81zOd.js} +1 -1
- package/dist/{BaseIcon-DujPvdJ_.cjs → BaseIcon-DD3GLrhS.cjs} +1 -1
- package/dist/{DataTable-BUflha5V.cjs → DataTable-BHCbVv8x.cjs} +1 -1
- package/dist/{DataTable-DgbrnD__.js → DataTable-CFUKU8PU.js} +2 -2
- package/dist/{Legend-V3K-4ipN.cjs → Legend-BYngLoV6.cjs} +1 -1
- package/dist/{Legend-HooNAKB_.js → Legend-f52bnttJ.js} +1 -1
- package/dist/{PackageVersion-S3SzpuwC.js → PackageVersion-C_FFs0BP.js} +1 -1
- package/dist/{PackageVersion-dQYEsTLp.cjs → PackageVersion-nr7f_VNw.cjs} +1 -1
- package/dist/{PenAndPaper-1h87IVla.cjs → PenAndPaper-C9v0NXEg.cjs} +1 -1
- package/dist/{PenAndPaper-v846FwcH.js → PenAndPaper-Dx24BtRW.js} +3 -3
- package/dist/{Shape-D7aacHaz.js → Shape-Ct2x6qZx.js} +1 -1
- package/dist/{Shape-DV5sH0dX.cjs → Shape-Dkt-vkTl.cjs} +1 -1
- package/dist/{Slicer-BRxR5OYL.cjs → Slicer-C0cvEMOy.cjs} +1 -1
- package/dist/{Slicer-BXCORSCz.js → Slicer-Duke9qno.js} +2 -2
- package/dist/{Title-B-EsW0Q2.cjs → Title-CpfNWbUc.cjs} +1 -1
- package/dist/{Title-DLjHHdyq.js → Title-zZtEcB9F.js} +1 -1
- package/dist/{Tooltip-BDaa-67h.js → Tooltip-DDJ2Wvjy.js} +1 -1
- package/dist/{Tooltip-B7gYRLGN.cjs → Tooltip-DZuVxmLc.cjs} +1 -1
- package/dist/documentation/installation.md +48 -48
- package/dist/{index-CI-N9klv.js → index-B9RAElpI.js} +2 -2
- package/dist/index-DaDv7p0W.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-D-zaZbSR.cjs → useNestedProp-DkpuL8Iv.cjs} +1 -1
- package/dist/{useNestedProp-D1eJ0dvv.js → useNestedProp-DuruL3Nt.js} +1 -1
- package/dist/{usePrinter-H2UFIe6n.cjs → usePrinter-BIHu0O5X.cjs} +1 -1
- package/dist/{usePrinter-CXc8xCKk.js → usePrinter-CwTAwqtF.js} +1 -1
- package/dist/{vue-data-ui-CvfX2D1d.cjs → vue-data-ui-BXCJgMfu.cjs} +1 -1
- package/dist/{vue-data-ui-DuXblXhF.js → vue-data-ui-yknmkfFy.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-fvTVGk8O.js → vue-ui-3d-bar-BkbLoUhP.js} +170 -158
- package/dist/vue-ui-3d-bar-CHnh8ZH_.cjs +19 -0
- package/dist/{vue-ui-accordion-paZXh-GD.cjs → vue-ui-accordion-6Clt339w.cjs} +1 -1
- package/dist/{vue-ui-accordion-CYLks1fW.js → vue-ui-accordion-rNA598L6.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Ch3nY1Dx.js → vue-ui-age-pyramid-C3o5HfRK.js} +176 -164
- package/dist/vue-ui-age-pyramid-CKDDaRj_.cjs +1 -0
- package/dist/{vue-ui-annotator-BXbLcJ1L.cjs → vue-ui-annotator-BLilhXfT.cjs} +1 -1
- package/dist/{vue-ui-annotator-DGupSF-o.js → vue-ui-annotator-huMOA-QF.js} +1 -1
- package/dist/{vue-ui-bullet-BSRXabBe.js → vue-ui-bullet-DxYdog9c.js} +155 -143
- package/dist/vue-ui-bullet-yTpejKsw.cjs +34 -0
- package/dist/{vue-ui-candlestick-Dww4XHwQ.js → vue-ui-candlestick-3lCgRxr0.js} +96 -84
- package/dist/vue-ui-candlestick-CmD40PpS.cjs +2 -0
- package/dist/vue-ui-carousel-table-BU8oAq6b.cjs +1 -0
- package/dist/{vue-ui-carousel-table-BZs-sxxu.js → vue-ui-carousel-table-D3JIrHMF.js} +97 -95
- package/dist/vue-ui-chestnut-BWRUxwWm.cjs +6 -0
- package/dist/{vue-ui-chestnut-CnupXXAM.js → vue-ui-chestnut-cWFqbqSU.js} +160 -148
- package/dist/{vue-ui-cursor-oqfOA98Q.js → vue-ui-cursor-DjWkFQEI.js} +2 -2
- package/dist/{vue-ui-cursor-smlBNiGG.cjs → vue-ui-cursor-DzJmB5h9.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BNu7yNYm.js → vue-ui-dashboard-1dycrMNM.js} +2 -2
- package/dist/{vue-ui-dashboard-Dw_90R29.cjs → vue-ui-dashboard-BOjdgUEm.cjs} +1 -1
- package/dist/{vue-ui-digits-_8FbgFrI.cjs → vue-ui-digits-B8TVsqsB.cjs} +1 -1
- package/dist/{vue-ui-digits-qztPrOEN.js → vue-ui-digits-C4NWhIjg.js} +2 -2
- package/dist/vue-ui-donut-BPz8gXi5.cjs +1 -0
- package/dist/{vue-ui-donut-CK9dINFS.js → vue-ui-donut-CXBxDUoh.js} +291 -279
- package/dist/{vue-ui-donut-evolution-DpDpYw3f.js → vue-ui-donut-evolution-BgD7rCFk.js} +285 -273
- package/dist/vue-ui-donut-evolution-h3ZgYI48.cjs +1 -0
- package/dist/vue-ui-dumbbell-BCyFd1Lf.cjs +9 -0
- package/dist/{vue-ui-dumbbell-Dx1I89N9.js → vue-ui-dumbbell-DMp-Waih.js} +159 -147
- package/dist/{vue-ui-flow-DJNqydD1.js → vue-ui-flow-D-XBMcpC.js} +162 -150
- package/dist/vue-ui-flow-DB3_5wEr.cjs +1 -0
- package/dist/vue-ui-funnel-DJVmn_pN.cjs +1 -0
- package/dist/{vue-ui-funnel-mP8ftcS5.js → vue-ui-funnel-Dxb6o97C.js} +229 -215
- package/dist/{vue-ui-galaxy-3cOLS6lh.js → vue-ui-galaxy-C2eHqbLw.js} +148 -136
- package/dist/vue-ui-galaxy-CIBBO623.cjs +1 -0
- package/dist/{vue-ui-gauge-CN_zo833.js → vue-ui-gauge-B9M8ICMX.js} +199 -185
- package/dist/vue-ui-gauge-C_JArbcd.cjs +1 -0
- package/dist/vue-ui-gizmo-ETKRu3P5.cjs +1 -0
- package/dist/{vue-ui-gizmo-akkNcCWf.js → vue-ui-gizmo-OGIvFCA4.js} +45 -43
- package/dist/{vue-ui-heatmap-B3ClLioV.js → vue-ui-heatmap-C2BobYAF.js} +138 -126
- package/dist/vue-ui-heatmap-mPZepJ4V.cjs +1 -0
- package/dist/{vue-ui-history-plot-C-EqVFW-.js → vue-ui-history-plot-BtBDW5ha.js} +127 -115
- package/dist/vue-ui-history-plot-DgEFbRv3.cjs +1 -0
- package/dist/{vue-ui-kpi-C-axCKZx.js → vue-ui-kpi-BCwmp6i5.js} +36 -33
- package/dist/vue-ui-kpi-DZGoUp6y.cjs +1 -0
- package/dist/{vue-ui-mini-loader-Cal5W_q6.cjs → vue-ui-mini-loader-B_I1k10C.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CsZ1zxJz.js → vue-ui-mini-loader-DWQfo-Ey.js} +2 -2
- package/dist/{vue-ui-molecule-BvNh7REY.js → vue-ui-molecule-CpWWvLlc.js} +212 -200
- package/dist/vue-ui-molecule-CqHsa4N7.cjs +1 -0
- package/dist/{vue-ui-mood-radar-C7v4dBNw.js → vue-ui-mood-radar-B4-AQAyE.js} +123 -111
- package/dist/vue-ui-mood-radar-Dx6ICJkv.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-C08kpvMd.js → vue-ui-nested-donuts-C-afzEvx.js} +156 -144
- package/dist/vue-ui-nested-donuts-C8LG5ony.cjs +17 -0
- package/dist/vue-ui-onion-KC_zqQyz.cjs +5 -0
- package/dist/{vue-ui-onion-CTLBemDj.js → vue-ui-onion-wBz5dln6.js} +125 -113
- package/dist/vue-ui-parallel-coordinate-plot-BK1sUOyd.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-H1FdP6AE.js → vue-ui-parallel-coordinate-plot-BoiKoaod.js} +159 -147
- package/dist/vue-ui-quadrant-BJ3gSVgF.cjs +1 -0
- package/dist/{vue-ui-quadrant-Dd-LDy4T.js → vue-ui-quadrant-DY6yUyOl.js} +211 -199
- package/dist/{vue-ui-quick-chart-BeNivWrg.js → vue-ui-quick-chart-DBH9CgBI.js} +576 -540
- package/dist/vue-ui-quick-chart-OHwPApk1.cjs +15 -0
- package/dist/{vue-ui-radar-D9U_vOad.js → vue-ui-radar-DYnmlHtt.js} +183 -171
- package/dist/vue-ui-radar-nhy4Pqtc.cjs +1 -0
- package/dist/{vue-ui-rating-B7AlAqCY.js → vue-ui-rating-3LUgui--.js} +102 -98
- package/dist/vue-ui-rating-wl5jkxb5.cjs +1 -0
- package/dist/vue-ui-relation-circle-CGkAsJl8.cjs +1 -0
- package/dist/{vue-ui-relation-circle-CT23BNcW.js → vue-ui-relation-circle-Da09K_Ce.js} +129 -117
- package/dist/{vue-ui-rings-BZ7FYYxr.js → vue-ui-rings-BuVPBXNc.js} +150 -138
- package/dist/vue-ui-rings-DZfhibc4.cjs +2 -0
- package/dist/{vue-ui-scatter-DMr8OrC3.js → vue-ui-scatter-Bee79rib.js} +320 -308
- package/dist/vue-ui-scatter-ChYAlXb_.cjs +1 -0
- package/dist/{vue-ui-screenshot-BFV1qEsF.cjs → vue-ui-screenshot-Blz4fiO2.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DHiX35pR.js → vue-ui-screenshot-CCnAaGB3.js} +1 -1
- package/dist/{vue-ui-skeleton-BIWgLDDf.cjs → vue-ui-skeleton-B24XJJ2p.cjs} +1 -1
- package/dist/{vue-ui-skeleton-owIhXtQF.js → vue-ui-skeleton-DVYD_VSe.js} +3 -3
- package/dist/vue-ui-smiley-CXOuAdIj.cjs +2 -0
- package/dist/{vue-ui-smiley-CCOQ6zjo.js → vue-ui-smiley-CdrTI5Rh.js} +208 -206
- package/dist/vue-ui-spark-trend-B08HYMm5.cjs +1 -0
- package/dist/{vue-ui-spark-trend-B56DI3Mc.js → vue-ui-spark-trend-Pd3JNy4G.js} +124 -112
- package/dist/{vue-ui-sparkbar-CMkozDkx.js → vue-ui-sparkbar-CTDWiUid.js} +100 -96
- package/dist/vue-ui-sparkbar-Dq1hwL7i.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-De06LRPj.js → vue-ui-sparkgauge-g0C7wuIH.js} +60 -48
- package/dist/vue-ui-sparkgauge-il4rmDdv.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-CoRPiLpB.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-CBDd7jIn.js → vue-ui-sparkhistogram-Dk8IYZGB.js} +116 -104
- package/dist/vue-ui-sparkline-B_1J2ft2.cjs +1 -0
- package/dist/{vue-ui-sparkline-BJejWvTN.js → vue-ui-sparkline-Ca1ai-Mq.js} +124 -112
- package/dist/{vue-ui-sparkstackbar-DlnmPom2.js → vue-ui-sparkstackbar-CRGrf5y2.js} +85 -81
- package/dist/vue-ui-sparkstackbar-tkiKbZHo.cjs +1 -0
- package/dist/{vue-ui-stackbar-19XdLQXB.js → vue-ui-stackbar-QaavE5-F.js} +219 -207
- package/dist/vue-ui-stackbar-zk1K5gP3.cjs +6 -0
- package/dist/vue-ui-strip-plot-8Ksp5AzD.cjs +1 -0
- package/dist/{vue-ui-strip-plot-Bly8GoNP.js → vue-ui-strip-plot-gm_lr5A9.js} +113 -101
- package/dist/{vue-ui-table-BisPh85-.cjs → vue-ui-table-CPLd7hXM.cjs} +1 -1
- package/dist/{vue-ui-table-BUF6Pyfp.js → vue-ui-table-ceYZ6Wzd.js} +1 -1
- package/dist/vue-ui-table-heatmap-CSsYOFf7.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-By-MmFiq.js → vue-ui-table-heatmap-CWQIOR58.js} +82 -78
- package/dist/{vue-ui-table-sparkline-DG70UNkU.js → vue-ui-table-sparkline-BHkqm0Sf.js} +78 -74
- package/dist/vue-ui-table-sparkline-hyL_92AC.cjs +1 -0
- package/dist/vue-ui-thermometer-CKiohIHn.cjs +1 -0
- package/dist/{vue-ui-thermometer-Vr2IP_p0.js → vue-ui-thermometer-Dvk3S7jR.js} +132 -120
- package/dist/vue-ui-timer-BUuk2p4C.cjs +64 -0
- package/dist/{vue-ui-timer-CD7gFOjN.js → vue-ui-timer-D0tGj6hK.js} +94 -82
- package/dist/{vue-ui-tiremarks-44pO3jx1.js → vue-ui-tiremarks-C2G0Sem6.js} +104 -94
- package/dist/vue-ui-tiremarks-Csng3xWI.cjs +1 -0
- package/dist/{vue-ui-treemap-CyOUM3-P.js → vue-ui-treemap-3iutCx61.js} +336 -332
- package/dist/vue-ui-treemap-CJjATl47.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-wngOp0Zc.js → vue-ui-vertical-bar-DZz_tUTV.js} +188 -176
- package/dist/vue-ui-vertical-bar-DtuEIajX.cjs +4 -0
- package/dist/vue-ui-waffle-B-Uf38ml.cjs +1 -0
- package/dist/{vue-ui-waffle-CuN7i0ci.js → vue-ui-waffle-Cr4FGNwb.js} +140 -136
- package/dist/vue-ui-wheel-Bijmdum9.cjs +1 -0
- package/dist/{vue-ui-wheel-B_gLugLx.js → vue-ui-wheel-Da4DH062.js} +100 -88
- package/dist/{vue-ui-word-cloud-DKHGS0my.js → vue-ui-word-cloud-C3o4JBD2.js} +132 -120
- package/dist/vue-ui-word-cloud-Cjyh1I0J.cjs +1 -0
- package/dist/{vue-ui-xy-BK9R8MrJ.js → vue-ui-xy-BX_3ddck.js} +139 -127
- package/dist/{vue-ui-xy-canvas-DaT4HoWD.js → vue-ui-xy-canvas-DqzVCtbZ.js} +231 -227
- package/dist/{vue-ui-xy-canvas-gDaRsnBI.cjs → vue-ui-xy-canvas-ObtOgMlV.cjs} +2 -2
- package/dist/vue-ui-xy-gClSSwyU.cjs +3 -0
- package/package.json +1 -1
- package/dist/index-o6tXRhOr.cjs +0 -9
- package/dist/vue-ui-3d-bar-zKUnnMOY.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Bg8Bexac.cjs +0 -1
- package/dist/vue-ui-bullet-DqM9h81O.cjs +0 -34
- package/dist/vue-ui-candlestick-C0PkovyK.cjs +0 -2
- package/dist/vue-ui-carousel-table-DbXCpYUm.cjs +0 -1
- package/dist/vue-ui-chestnut-Be4Lagdr.cjs +0 -6
- package/dist/vue-ui-donut-B7orj3vV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BmTzjKlH.cjs +0 -1
- package/dist/vue-ui-dumbbell-5yfcA-Of.cjs +0 -9
- package/dist/vue-ui-flow-Bar7LG9t.cjs +0 -1
- package/dist/vue-ui-funnel-lxHehCUr.cjs +0 -1
- package/dist/vue-ui-galaxy-B8zbGikp.cjs +0 -1
- package/dist/vue-ui-gauge-Bz1nzveF.cjs +0 -1
- package/dist/vue-ui-gizmo-C9XQ-7Sj.cjs +0 -1
- package/dist/vue-ui-heatmap-BW6dmp8j.cjs +0 -1
- package/dist/vue-ui-history-plot-Mp0zDeR-.cjs +0 -1
- package/dist/vue-ui-kpi-D8hh3p8f.cjs +0 -1
- package/dist/vue-ui-molecule-RkdIX-iW.cjs +0 -1
- package/dist/vue-ui-mood-radar-DLpDoq0G.cjs +0 -1
- package/dist/vue-ui-nested-donuts-BO249_PV.cjs +0 -17
- package/dist/vue-ui-onion-BjNQgHPX.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CoeVi-98.cjs +0 -8
- package/dist/vue-ui-quadrant-D701bdNz.cjs +0 -1
- package/dist/vue-ui-quick-chart-CRNEkxoM.cjs +0 -15
- package/dist/vue-ui-radar-3W9NRklj.cjs +0 -1
- package/dist/vue-ui-rating-DeuaL_cU.cjs +0 -1
- package/dist/vue-ui-relation-circle-B8JtK-JM.cjs +0 -1
- package/dist/vue-ui-rings-CZCTLghE.cjs +0 -2
- package/dist/vue-ui-scatter-DlA0xU5U.cjs +0 -1
- package/dist/vue-ui-smiley-BISneB7t.cjs +0 -2
- package/dist/vue-ui-spark-trend-lMzod-5S.cjs +0 -1
- package/dist/vue-ui-sparkbar-DcdDLl8l.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BhwNRzrD.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-D00ahrgs.cjs +0 -1
- package/dist/vue-ui-sparkline-CY92qVz0.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BjKL_6dq.cjs +0 -1
- package/dist/vue-ui-stackbar-T4VBFpDo.cjs +0 -6
- package/dist/vue-ui-strip-plot-CtjbMamo.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CPn-jC0n.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CIDuWZZs.cjs +0 -1
- package/dist/vue-ui-thermometer-CMvk1D7J.cjs +0 -1
- package/dist/vue-ui-timer-CUHgN89f.cjs +0 -64
- package/dist/vue-ui-tiremarks-w_gxHFeB.cjs +0 -1
- package/dist/vue-ui-treemap-CFhTEaxa.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C51RKLB8.cjs +0 -4
- package/dist/vue-ui-waffle-CXZc4t27.cjs +0 -1
- package/dist/vue-ui-wheel-u9Vc7ZTZ.cjs +0 -1
- package/dist/vue-ui-word-cloud-tSXyXvd6.cjs +0 -1
- package/dist/vue-ui-xy-bX3g4COC.cjs +0 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as
|
|
1
|
+
import { computed as g, ref as n, watch as Se, onMounted as qe, onBeforeUnmount as Je, nextTick as V, openBlock as s, createElementBlock as u, normalizeClass as Ne, normalizeStyle as ee, unref as v, createBlock as _, createCommentVNode as y, createSlots as Ke, withCtx as m, renderSlot as f, normalizeProps as T, guardReactiveProps as I, createVNode as Ae, createElementVNode as r, Fragment as F, renderList as L, toDisplayString as P, createTextVNode as Qe } from "vue";
|
|
2
|
+
import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as X, E as st, s as ut, x as it, y as nt, q as rt, r as dt, F as Ie } from "./index-B9RAElpI.js";
|
|
3
3
|
import { t as vt, u as yt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as ct } from "./Title-
|
|
5
|
-
import { u as ht, U as pt } from "./usePrinter-
|
|
6
|
-
import { _ as ft } from "./Tooltip-
|
|
7
|
-
import { D as gt } from "./DataTable-
|
|
8
|
-
import mt from "./vue-ui-skeleton-
|
|
9
|
-
import { S as xt } from "./Slicer-
|
|
10
|
-
import bt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Fe } from "./useNestedProp-
|
|
12
|
-
import { _ as kt } from "./PackageVersion-
|
|
13
|
-
import { P as wt } from "./PenAndPaper-
|
|
4
|
+
import { _ as ct } from "./Title-zZtEcB9F.js";
|
|
5
|
+
import { u as ht, U as pt } from "./usePrinter-CwTAwqtF.js";
|
|
6
|
+
import { _ as ft } from "./Tooltip-DDJ2Wvjy.js";
|
|
7
|
+
import { D as gt } from "./DataTable-CFUKU8PU.js";
|
|
8
|
+
import mt from "./vue-ui-skeleton-DVYD_VSe.js";
|
|
9
|
+
import { S as xt } from "./Slicer-Duke9qno.js";
|
|
10
|
+
import bt from "./vue-ui-accordion-rNA598L6.js";
|
|
11
|
+
import { u as Fe } from "./useNestedProp-DuruL3Nt.js";
|
|
12
|
+
import { _ as kt } from "./PackageVersion-C_FFs0BP.js";
|
|
13
|
+
import { P as wt } from "./PenAndPaper-Dx24BtRW.js";
|
|
14
14
|
import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
-
const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key:
|
|
16
|
+
const _t = ["id"], zt = ["xmlns", "viewBox"], St = ["x", "y", "width", "height"], Nt = { key: 1 }, At = ["id"], Tt = ["stop-color"], It = ["stop-color"], Ft = ["stop-color"], Lt = ["id"], Ot = ["stop-color"], Rt = ["stop-color"], Vt = ["stop-color"], Pt = { key: 0 }, Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 1 }, Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["x", "y", "font-size", "fill", "font-weight"], Wt = { key: 2 }, Gt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xt = { key: 0 }, Ht = ["cx", "cy", "r", "fill"], Yt = ["cx", "cy", "r", "fill"], qt = { key: 1 }, Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x", "y", "height", "width", "fill", "rx"], Zt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], el = ["x", "y", "height", "width", "fill", "onMouseover"], tl = {
|
|
17
17
|
key: 5,
|
|
18
18
|
class: "vue-data-ui-watermark"
|
|
19
|
-
},
|
|
19
|
+
}, ll = ["innerHTML"], ol = {
|
|
20
20
|
__name: "vue-ui-candlestick",
|
|
21
21
|
props: {
|
|
22
22
|
config: {
|
|
@@ -33,7 +33,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
setup($, { expose: Le }) {
|
|
36
|
-
const h = $, { vue_ui_candlestick: Oe } = Ze(), O =
|
|
36
|
+
const h = $, { vue_ui_candlestick: Oe } = Ze(), O = g(() => !!h.dataset && h.dataset.length), k = n(et()), Re = n(null), H = n(!1), Y = n(""), q = n(void 0), te = n(0), S = n(null), le = n(null), oe = n(null), ae = n(null), se = n(null), ue = n(null), B = n(0), ie = n(0), ne = n(0), e = g({
|
|
37
37
|
get: () => ve(),
|
|
38
38
|
set: (t) => t
|
|
39
39
|
}), { userOptionsVisible: J, setUserOptionsVisibility: re, keepUserOptionState: de } = $t({ config: e.value });
|
|
@@ -60,7 +60,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
60
60
|
width: e.value.style.width,
|
|
61
61
|
xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
|
|
62
62
|
yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
|
|
63
|
-
}),
|
|
63
|
+
}), E = n(null);
|
|
64
64
|
qe(() => {
|
|
65
65
|
ye();
|
|
66
66
|
});
|
|
@@ -92,20 +92,20 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
92
92
|
fallback: 6
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
|
-
|
|
95
|
+
E.value = new ResizeObserver(t), E.value.observe(S.value.parentNode);
|
|
96
96
|
}
|
|
97
97
|
xe();
|
|
98
98
|
}
|
|
99
99
|
Je(() => {
|
|
100
|
-
|
|
100
|
+
E.value && E.value.disconnect();
|
|
101
101
|
});
|
|
102
102
|
const { isPrinting: ce, isImaging: he, generatePdf: pe, generateImage: fe } = ht({
|
|
103
103
|
elementId: `vue-ui-candlestick_${k.value}`,
|
|
104
104
|
fileName: e.value.style.title.text || "vue-ui-candlestick"
|
|
105
|
-
}), Ve =
|
|
105
|
+
}), Ve = g(() => e.value.userOptions.show && !e.value.style.title.text), w = n({
|
|
106
106
|
showTable: e.value.table.show,
|
|
107
107
|
showTooltip: e.value.style.tooltip.show
|
|
108
|
-
}), i =
|
|
108
|
+
}), i = g(() => {
|
|
109
109
|
const { top: t, right: o, bottom: l, left: a } = e.value.style.layout.padding;
|
|
110
110
|
return {
|
|
111
111
|
top: t,
|
|
@@ -115,10 +115,10 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
115
115
|
width: c.value.width - a - o,
|
|
116
116
|
height: c.value.height - t - l
|
|
117
117
|
};
|
|
118
|
-
}), R =
|
|
118
|
+
}), R = g(() => h.dataset.length), p = n({
|
|
119
119
|
start: 0,
|
|
120
120
|
end: R.value
|
|
121
|
-
}), ge =
|
|
121
|
+
}), ge = g(() => h.dataset.slice(p.value.start, p.value.end)), K = g(() => (h.dataset.forEach((t, o) => {
|
|
122
122
|
[null, void 0].includes(t[0]) && z({
|
|
123
123
|
componentName: "VueUiCandlestick",
|
|
124
124
|
type: "datasetAttribute",
|
|
@@ -157,11 +157,11 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
157
157
|
low: t[3],
|
|
158
158
|
last: t[4],
|
|
159
159
|
volume: t[5]
|
|
160
|
-
})))), d =
|
|
160
|
+
})))), d = g(() => i.value.width / ge.value.length), me = g(() => ({
|
|
161
161
|
max: Math.max(...K.value.map((t) => t.high)),
|
|
162
162
|
min: 0
|
|
163
|
-
})), C =
|
|
164
|
-
function
|
|
163
|
+
})), C = g(() => ot(me.value.min, me.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
|
|
164
|
+
function M(t, o) {
|
|
165
165
|
return {
|
|
166
166
|
...t,
|
|
167
167
|
x: U(i.value.left + o * d.value + d.value / 2),
|
|
@@ -169,8 +169,8 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
169
169
|
value: U(t)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
const x =
|
|
173
|
-
const l =
|
|
172
|
+
const x = g(() => K.value.map((t, o) => {
|
|
173
|
+
const l = M(t.open, o), a = M(t.high, o), b = M(t.low, o), G = M(t.last, o), j = t.last > t.open;
|
|
174
174
|
return {
|
|
175
175
|
period: t.period,
|
|
176
176
|
open: l,
|
|
@@ -178,17 +178,17 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
178
178
|
low: b,
|
|
179
179
|
last: G,
|
|
180
180
|
volume: t.volume,
|
|
181
|
-
isBullish:
|
|
181
|
+
isBullish: j
|
|
182
182
|
};
|
|
183
183
|
}));
|
|
184
184
|
function Pe(t) {
|
|
185
185
|
return U(t / C.value.max);
|
|
186
186
|
}
|
|
187
|
-
const Ue =
|
|
187
|
+
const Ue = g(() => C.value.ticks.map((t) => ({
|
|
188
188
|
y: i.value.bottom - i.value.height * Pe(t),
|
|
189
189
|
value: U(t)
|
|
190
|
-
}))), Be =
|
|
191
|
-
function
|
|
190
|
+
}))), Be = g(() => K.value.map((t) => t.period)), Q = n(null);
|
|
191
|
+
function Ee(t, o) {
|
|
192
192
|
q.value = t, Q.value = {
|
|
193
193
|
datapoint: o,
|
|
194
194
|
seriesIndex: t,
|
|
@@ -210,13 +210,13 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
210
210
|
});
|
|
211
211
|
else if (e.value.style.tooltip.show) {
|
|
212
212
|
let a = "";
|
|
213
|
-
const { period: b, open: G, high:
|
|
213
|
+
const { period: b, open: G, high: j, low: $e, last: Ce, volume: _e, isBullish: ze } = x.value[t], { period: al, open: Ge, high: je, low: Xe, last: He, volume: Ye } = e.value.translations;
|
|
214
214
|
a += `<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" stroke="${e.value.style.layout.candle.stroke}" stroke-width="${e.value.style.layout.candle.strokeWidth}"
|
|
215
|
-
fill="${e.value.style.layout.candle.gradient.show ? ze ? `url(#bullish_gradient_${k.value})` : `url(#bearish_gradient_${k.value})` : ze ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${b}</div>`, a += `${Ye} : <b>${isNaN(_e) ? "-" : Number(_e.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, a += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, a += `<div>${Ge}: <b>${e.value.style.tooltip.prefix} ${isNaN(G.value) ? "-" : Number(G.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, a += `<div>${
|
|
215
|
+
fill="${e.value.style.layout.candle.gradient.show ? ze ? `url(#bullish_gradient_${k.value})` : `url(#bearish_gradient_${k.value})` : ze ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${b}</div>`, a += `${Ye} : <b>${isNaN(_e) ? "-" : Number(_e.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, a += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, a += `<div>${Ge}: <b>${e.value.style.tooltip.prefix} ${isNaN(G.value) ? "-" : Number(G.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, a += `<div>${je}: <b>${e.value.style.tooltip.prefix} ${isNaN(j.value) ? "-" : Number(j.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, a += `<div>${Xe}: <b>${e.value.style.tooltip.prefix} ${isNaN($e.value) ? "-" : Number($e.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, a += `<div>${He}: <b>${e.value.style.tooltip.prefix} ${isNaN(Ce.value) ? "-" : Number(Ce.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, a += "</div>", Y.value = `<div style="text-align:right">${a}</div>`;
|
|
216
216
|
}
|
|
217
217
|
H.value = !0;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function Me() {
|
|
220
220
|
xe();
|
|
221
221
|
}
|
|
222
222
|
const N = n(null);
|
|
@@ -243,7 +243,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
243
243
|
dt({ csvContent: a, title: e.value.style.title.text || "vue-ui-candlestick" });
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
const D =
|
|
246
|
+
const D = g(() => {
|
|
247
247
|
const t = x.value.map((a) => [
|
|
248
248
|
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${e.value.style.layout.candle.borderRadius * 3}" fill="${e.value.style.layout.candle.gradient.show ? a.isBullish ? `url(#bullish_gradient_${k.value}` : `url(#bearish_gradient_${k.value})` : a.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,
|
|
249
249
|
`${e.value.table.td.prefix} ${isNaN(a.open.value) ? "-" : Number(a.open.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
|
|
@@ -373,49 +373,49 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
373
373
|
t.$slots.optionTooltip ? {
|
|
374
374
|
name: "optionTooltip",
|
|
375
375
|
fn: m(() => [
|
|
376
|
-
|
|
376
|
+
f(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
377
377
|
]),
|
|
378
378
|
key: "0"
|
|
379
379
|
} : void 0,
|
|
380
380
|
t.$slots.optionPdf ? {
|
|
381
381
|
name: "optionPdf",
|
|
382
382
|
fn: m(() => [
|
|
383
|
-
|
|
383
|
+
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
384
384
|
]),
|
|
385
385
|
key: "1"
|
|
386
386
|
} : void 0,
|
|
387
387
|
t.$slots.optionCsv ? {
|
|
388
388
|
name: "optionCsv",
|
|
389
389
|
fn: m(() => [
|
|
390
|
-
|
|
390
|
+
f(t.$slots, "optionCsv", {}, void 0, !0)
|
|
391
391
|
]),
|
|
392
392
|
key: "2"
|
|
393
393
|
} : void 0,
|
|
394
394
|
t.$slots.optionImg ? {
|
|
395
395
|
name: "optionImg",
|
|
396
396
|
fn: m(() => [
|
|
397
|
-
|
|
397
|
+
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
398
398
|
]),
|
|
399
399
|
key: "3"
|
|
400
400
|
} : void 0,
|
|
401
401
|
t.$slots.optionTable ? {
|
|
402
402
|
name: "optionTable",
|
|
403
403
|
fn: m(() => [
|
|
404
|
-
|
|
404
|
+
f(t.$slots, "optionTable", {}, void 0, !0)
|
|
405
405
|
]),
|
|
406
406
|
key: "4"
|
|
407
407
|
} : void 0,
|
|
408
408
|
t.$slots.optionFullscreen ? {
|
|
409
409
|
name: "optionFullscreen",
|
|
410
410
|
fn: m(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
411
|
-
|
|
411
|
+
f(t.$slots, "optionFullscreen", T(I({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
412
412
|
]),
|
|
413
413
|
key: "5"
|
|
414
414
|
} : void 0,
|
|
415
415
|
t.$slots.optionAnnotator ? {
|
|
416
416
|
name: "optionAnnotator",
|
|
417
417
|
fn: m(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
418
|
-
|
|
418
|
+
f(t.$slots, "optionAnnotator", T(I({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
419
419
|
]),
|
|
420
420
|
key: "6"
|
|
421
421
|
} : void 0
|
|
@@ -428,7 +428,19 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
428
428
|
style: ee(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
|
|
429
429
|
}, [
|
|
430
430
|
Ae(kt),
|
|
431
|
-
|
|
431
|
+
t.$slots["chart-background"] ? (s(), u("foreignObject", {
|
|
432
|
+
key: 0,
|
|
433
|
+
x: i.value.left,
|
|
434
|
+
y: i.value.top,
|
|
435
|
+
width: i.value.width,
|
|
436
|
+
height: i.value.height,
|
|
437
|
+
style: {
|
|
438
|
+
pointerEvents: "none"
|
|
439
|
+
}
|
|
440
|
+
}, [
|
|
441
|
+
f(t.$slots, "chart-background", {}, void 0, !0)
|
|
442
|
+
], 8, St)) : y("", !0),
|
|
443
|
+
x.value.length > 0 ? (s(), u("g", Nt, [
|
|
432
444
|
r("defs", null, [
|
|
433
445
|
r("linearGradient", {
|
|
434
446
|
id: `bearish_gradient_${k.value}`,
|
|
@@ -438,16 +450,16 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
438
450
|
r("stop", {
|
|
439
451
|
offset: "0%",
|
|
440
452
|
"stop-color": e.value.style.layout.candle.colors.bearish
|
|
441
|
-
}, null, 8,
|
|
453
|
+
}, null, 8, Tt),
|
|
442
454
|
r("stop", {
|
|
443
455
|
offset: "50%",
|
|
444
|
-
"stop-color": `${v(
|
|
445
|
-
}, null, 8,
|
|
456
|
+
"stop-color": `${v(X)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
|
|
457
|
+
}, null, 8, It),
|
|
446
458
|
r("stop", {
|
|
447
459
|
offset: "100%",
|
|
448
|
-
"stop-color": `${v(
|
|
449
|
-
}, null, 8,
|
|
450
|
-
], 8,
|
|
460
|
+
"stop-color": `${v(X)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
|
|
461
|
+
}, null, 8, Ft)
|
|
462
|
+
], 8, At),
|
|
451
463
|
r("linearGradient", {
|
|
452
464
|
id: `bullish_gradient_${k.value}`,
|
|
453
465
|
x2: "0%",
|
|
@@ -456,18 +468,18 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
456
468
|
r("stop", {
|
|
457
469
|
offset: "0%",
|
|
458
470
|
"stop-color": e.value.style.layout.candle.colors.bullish
|
|
459
|
-
}, null, 8,
|
|
471
|
+
}, null, 8, Ot),
|
|
460
472
|
r("stop", {
|
|
461
473
|
offset: "50%",
|
|
462
|
-
"stop-color": `${v(
|
|
463
|
-
}, null, 8,
|
|
474
|
+
"stop-color": `${v(X)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
|
|
475
|
+
}, null, 8, Rt),
|
|
464
476
|
r("stop", {
|
|
465
477
|
offset: "100%",
|
|
466
|
-
"stop-color": `${v(
|
|
467
|
-
}, null, 8,
|
|
468
|
-
], 8,
|
|
478
|
+
"stop-color": `${v(X)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
|
|
479
|
+
}, null, 8, Vt)
|
|
480
|
+
], 8, Lt)
|
|
469
481
|
]),
|
|
470
|
-
e.value.style.layout.grid.show ? (s(), u("g",
|
|
482
|
+
e.value.style.layout.grid.show ? (s(), u("g", Pt, [
|
|
471
483
|
r("line", {
|
|
472
484
|
x1: i.value.left,
|
|
473
485
|
x2: i.value.left,
|
|
@@ -476,7 +488,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
476
488
|
stroke: e.value.style.layout.grid.stroke,
|
|
477
489
|
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
478
490
|
"stroke-linecap": "round"
|
|
479
|
-
}, null, 8,
|
|
491
|
+
}, null, 8, Ut),
|
|
480
492
|
r("line", {
|
|
481
493
|
x1: i.value.left,
|
|
482
494
|
x2: i.value.right,
|
|
@@ -485,9 +497,9 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
485
497
|
stroke: e.value.style.layout.grid.stroke,
|
|
486
498
|
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
487
499
|
"stroke-linecap": "round"
|
|
488
|
-
}, null, 8,
|
|
500
|
+
}, null, 8, Bt)
|
|
489
501
|
])) : y("", !0),
|
|
490
|
-
e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g",
|
|
502
|
+
e.value.style.layout.grid.yAxis.dataLabels.show ? (s(), u("g", Et, [
|
|
491
503
|
(s(!0), u(F, null, L(Ue.value, (l, a) => (s(), u("g", null, [
|
|
492
504
|
l.value >= C.value.min && l.value <= C.value.max ? (s(), u("line", {
|
|
493
505
|
key: 0,
|
|
@@ -507,10 +519,10 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
507
519
|
"text-anchor": "end",
|
|
508
520
|
fill: e.value.style.layout.grid.yAxis.dataLabels.color,
|
|
509
521
|
"font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
510
|
-
}, P(e.value.style.layout.grid.yAxis.dataLabels.prefix) + " " + P(v(st)(l.value) ? l.value.toFixed(e.value.style.layout.grid.yAxis.dataLabels.roundingValue) : "") + " " + P(e.value.style.layout.grid.yAxis.dataLabels.suffix), 9,
|
|
522
|
+
}, P(e.value.style.layout.grid.yAxis.dataLabels.prefix) + " " + P(v(st)(l.value) ? l.value.toFixed(e.value.style.layout.grid.yAxis.dataLabels.roundingValue) : "") + " " + P(e.value.style.layout.grid.yAxis.dataLabels.suffix), 9, Dt)) : y("", !0)
|
|
511
523
|
]))), 256))
|
|
512
524
|
])) : y("", !0),
|
|
513
|
-
e.value.style.layout.grid.xAxis.dataLabels.show ? (s(), u("g",
|
|
525
|
+
e.value.style.layout.grid.xAxis.dataLabels.show ? (s(), u("g", Wt, [
|
|
514
526
|
(s(!0), u(F, null, L(Be.value, (l, a) => (s(), u("g", null, [
|
|
515
527
|
r("text", {
|
|
516
528
|
transform: `translate(${i.value.left + d.value * a + d.value / 2}, ${i.value.bottom + c.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
|
|
@@ -518,7 +530,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
518
530
|
"font-size": c.value.xAxisFontSize,
|
|
519
531
|
fill: e.value.style.layout.grid.xAxis.dataLabels.color,
|
|
520
532
|
"font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
|
|
521
|
-
}, P(l), 9,
|
|
533
|
+
}, P(l), 9, Gt)
|
|
522
534
|
]))), 256))
|
|
523
535
|
])) : y("", !0),
|
|
524
536
|
r("g", null, [
|
|
@@ -531,22 +543,22 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
531
543
|
stroke: e.value.style.layout.wick.stroke,
|
|
532
544
|
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
533
545
|
"stroke-linecap": "round"
|
|
534
|
-
}, null, 8,
|
|
546
|
+
}, null, 8, jt),
|
|
535
547
|
e.value.style.layout.wick.extremity.shape === "circle" ? (s(), u("g", Xt, [
|
|
536
548
|
r("circle", {
|
|
537
549
|
cx: l.high.x,
|
|
538
550
|
cy: l.high.y,
|
|
539
551
|
r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
540
552
|
fill: e.value.style.layout.wick.extremity.color
|
|
541
|
-
}, null, 8,
|
|
553
|
+
}, null, 8, Ht),
|
|
542
554
|
r("circle", {
|
|
543
555
|
cx: l.low.x,
|
|
544
556
|
cy: l.low.y,
|
|
545
557
|
r: e.value.style.layout.wick.extremity.size === "auto" ? d.value / 20 : e.value.style.layout.wick.extremity.size,
|
|
546
558
|
fill: e.value.style.layout.wick.extremity.color
|
|
547
|
-
}, null, 8,
|
|
559
|
+
}, null, 8, Yt)
|
|
548
560
|
])) : y("", !0),
|
|
549
|
-
e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g",
|
|
561
|
+
e.value.style.layout.wick.extremity.shape === "line" ? (s(), u("g", qt, [
|
|
550
562
|
r("line", {
|
|
551
563
|
x1: l.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
552
564
|
x2: l.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
@@ -555,7 +567,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
555
567
|
stroke: e.value.style.layout.wick.extremity.color,
|
|
556
568
|
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
557
569
|
"stroke-linecap": "round"
|
|
558
|
-
}, null, 8,
|
|
570
|
+
}, null, 8, Jt),
|
|
559
571
|
r("line", {
|
|
560
572
|
x1: l.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
561
573
|
x2: l.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? d.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
|
|
@@ -564,7 +576,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
564
576
|
stroke: e.value.style.layout.wick.extremity.color,
|
|
565
577
|
"stroke-width": e.value.style.layout.wick.strokeWidth,
|
|
566
578
|
"stroke-linecap": "round"
|
|
567
|
-
}, null, 8,
|
|
579
|
+
}, null, 8, Kt)
|
|
568
580
|
])) : y("", !0)
|
|
569
581
|
]))), 256))
|
|
570
582
|
]),
|
|
@@ -577,7 +589,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
577
589
|
fill: e.value.style.layout.candle.gradient.underlayer,
|
|
578
590
|
rx: e.value.style.layout.candle.borderRadius,
|
|
579
591
|
stroke: "none"
|
|
580
|
-
}, null, 8,
|
|
592
|
+
}, null, 8, Qt))), 256)),
|
|
581
593
|
(s(!0), u(F, null, L(x.value, (l, a) => (s(), u("rect", {
|
|
582
594
|
x: l.open.x - d.value / 2 + d.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
|
|
583
595
|
y: l.isBullish ? l.last.y : l.open.y,
|
|
@@ -589,7 +601,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
589
601
|
"stroke-width": e.value.style.layout.candle.strokeWidth,
|
|
590
602
|
"stroke-linecap": "round",
|
|
591
603
|
"stroke-linejoin": "round"
|
|
592
|
-
}, null, 8,
|
|
604
|
+
}, null, 8, Zt))), 256))
|
|
593
605
|
]),
|
|
594
606
|
r("g", null, [
|
|
595
607
|
(s(!0), u(F, null, L(x.value, (l, a) => (s(), u("rect", {
|
|
@@ -598,17 +610,17 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
598
610
|
height: i.value.height <= 0 ? 1e-4 : i.value.height,
|
|
599
611
|
width: d.value <= 0 ? 1e-4 : d.value,
|
|
600
612
|
fill: q.value === a ? v(ut)(e.value.style.layout.selector.color, e.value.style.layout.selector.opacity) : "transparent",
|
|
601
|
-
onMouseover: (b) =>
|
|
613
|
+
onMouseover: (b) => Ee(a, l),
|
|
602
614
|
onMouseleave: o[0] || (o[0] = (b) => {
|
|
603
615
|
q.value = void 0, H.value = !1;
|
|
604
616
|
})
|
|
605
|
-
}, null, 40,
|
|
617
|
+
}, null, 40, el))), 256))
|
|
606
618
|
])
|
|
607
619
|
])) : y("", !0),
|
|
608
|
-
|
|
620
|
+
f(t.$slots, "svg", { svg: c.value }, void 0, !0)
|
|
609
621
|
], 14, zt)) : y("", !0),
|
|
610
|
-
t.$slots.watermark ? (s(), u("div",
|
|
611
|
-
|
|
622
|
+
t.$slots.watermark ? (s(), u("div", tl, [
|
|
623
|
+
f(t.$slots, "watermark", T(I({ isPrinting: v(ce) || v(he) })), void 0, !0)
|
|
612
624
|
])) : y("", !0),
|
|
613
625
|
O.value ? y("", !0) : (s(), _(mt, {
|
|
614
626
|
key: 6,
|
|
@@ -655,10 +667,10 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
655
667
|
"onUpdate:end": o[2] || (o[2] = (l) => p.value.end = l),
|
|
656
668
|
refreshStartPoint: e.value.style.zoom.startIndex !== null ? e.value.style.zoom.startIndex : 0,
|
|
657
669
|
refreshEndPoint: e.value.style.zoom.endIndex !== null ? e.value.style.zoom.endIndex + 1 : R.value,
|
|
658
|
-
onReset:
|
|
670
|
+
onReset: Me
|
|
659
671
|
}, {
|
|
660
672
|
"reset-action": m(({ reset: l }) => [
|
|
661
|
-
|
|
673
|
+
f(t.$slots, "reset-action", T(I({ reset: l })), void 0, !0)
|
|
662
674
|
]),
|
|
663
675
|
_: 3
|
|
664
676
|
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint"]))
|
|
@@ -667,7 +679,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
667
679
|
ref_key: "chartLegend",
|
|
668
680
|
ref: oe
|
|
669
681
|
}, [
|
|
670
|
-
|
|
682
|
+
f(t.$slots, "legend", { legend: x.value }, void 0, !0)
|
|
671
683
|
], 512),
|
|
672
684
|
t.$slots.source ? (s(), u("div", {
|
|
673
685
|
key: 8,
|
|
@@ -675,7 +687,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
675
687
|
ref: se,
|
|
676
688
|
dir: "auto"
|
|
677
689
|
}, [
|
|
678
|
-
|
|
690
|
+
f(t.$slots, "source", {}, void 0, !0)
|
|
679
691
|
], 512)) : y("", !0),
|
|
680
692
|
Ae(ft, {
|
|
681
693
|
show: w.value.showTooltip && H.value,
|
|
@@ -694,10 +706,10 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
694
706
|
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
|
|
695
707
|
}, {
|
|
696
708
|
"tooltip-before": m(() => [
|
|
697
|
-
|
|
709
|
+
f(t.$slots, "tooltip-before", T(I({ ...Q.value })), void 0, !0)
|
|
698
710
|
]),
|
|
699
711
|
"tooltip-after": m(() => [
|
|
700
|
-
|
|
712
|
+
f(t.$slots, "tooltip-after", T(I({ ...Q.value })), void 0, !0)
|
|
701
713
|
]),
|
|
702
714
|
_: 3
|
|
703
715
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
@@ -731,7 +743,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
731
743
|
Qe(P(l), 1)
|
|
732
744
|
]),
|
|
733
745
|
td: m(({ td: l }) => [
|
|
734
|
-
r("div", { innerHTML: l }, null, 8,
|
|
746
|
+
r("div", { innerHTML: l }, null, 8, ll)
|
|
735
747
|
]),
|
|
736
748
|
_: 1
|
|
737
749
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
@@ -740,7 +752,7 @@ const _t = ["id"], zt = ["xmlns", "viewBox"], St = { key: 0 }, Nt = ["id"], At =
|
|
|
740
752
|
}, 8, ["config"])) : y("", !0)
|
|
741
753
|
], 46, _t));
|
|
742
754
|
}
|
|
743
|
-
},
|
|
755
|
+
}, bl = /* @__PURE__ */ Ct(ol, [["__scopeId", "data-v-b1cc80a6"]]);
|
|
744
756
|
export {
|
|
745
|
-
|
|
757
|
+
bl as default
|
|
746
758
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DaDv7p0W.cjs"),ie=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./Title-CpfNWbUc.cjs"),de=require("./usePrinter-BIHu0O5X.cjs"),ze=require("./Tooltip-DZuVxmLc.cjs"),Ve=require("./DataTable-BHCbVv8x.cjs"),Ee=require("./vue-ui-skeleton-B24XJJ2p.cjs"),Te=require("./Slicer-C0cvEMOy.cjs"),Ae=require("./vue-ui-accordion-6Clt339w.cjs"),ce=require("./useNestedProp-DkpuL8Iv.cjs"),Fe=require("./PackageVersion-nr7f_VNw.cjs"),Ie=require("./PenAndPaper-C9v0NXEg.cjs"),Pe=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Oe=["xmlns","viewBox"],Ue=["x","y","width","height"],Me={key:1},De=["id"],qe=["stop-color"],We=["stop-color"],Ge=["stop-color"],He=["id"],je=["stop-color"],Xe=["stop-color"],Ye=["stop-color"],Je={key:0},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:1},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x","y","font-size","fill","font-weight"],lt={key:2},ot=["transform","text-anchor","font-size","fill","font-weight"],at=["x1","x2","y1","y2","stroke","stroke-width"],nt={key:0},ut=["cx","cy","r","fill"],st=["cx","cy","r","fill"],rt={key:1},it=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","height","width","fill","rx"],vt=["x","y","height","width","fill","rx","stroke","stroke-width"],yt=["x","y","height","width","fill","onMouseover"],ht={key:5,class:"vue-data-ui-watermark"},pt=["innerHTML"],ft={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ve}){const d=f,{vue_ui_candlestick:ye}=u.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(u.createUid()),he=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),L=e.ref(0),g=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),M=e.ref(null),D=e.ref(null),C=e.ref(0),q=e.ref(0),W=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:G,keepUserOptionState:H}=Pe.useUserOptionState({config:t.value});function j(){const l=ce.useNestedProp({userConfig:d.config,defaultConfig:ye});let a={};return l.theme?a={...ce.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&u.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&u.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=j(),A.value=!t.value.showOnChartHover,X(),C.value+=1,W.value+=1,q.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{X()});function X(){if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ie.throttle(()=>{const{width:a,height:o}=ie.useResponsive({chart:g.value,title:t.value.style.title.text?R.value:null,slicer:U.value,legend:O.value,source:M.value,noTitle:D.value});i.value.width=a,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});N.value=new ResizeObserver(l),N.value.observe(g.value.parentNode)}te()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=de.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),Z=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),Z.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>s.value.width/Z.value.length),ee=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>u.calculateNiceScale(ee.value.min,ee.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:u.checkNaN(s.value.left+a*r.value+r.value/2),y:u.checkNaN(s.value.top+(1-l/m.value.max)*s.value.height),value:u.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function fe(l){return u.checkNaN(l/m.value.max)}const me=e.computed(()=>m.value.ticks.map(l=>({y:s.value.bottom-s.value.height*fe(l),value:u.checkNaN(l)}))),ge=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function ke(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:ne,last:ue,volume:se,isBullish:re}=v.value[l],{period:gt,open:Ce,high:Ne,low:$e,last:Be,volume:Se}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
|
+
fill="${t.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${h.value})`:`url(#bearish_gradient_${h.value})`:re?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${Se} : <b>${isNaN(se)?"-":Number(se.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(ne.value)?"-":Number(ne.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Be}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function xe(){te()}const k=e.ref(null);async function te(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&k.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setEndValue(be(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function be(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function le(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=u.createCsvContent(o);u.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const B=e.computed(()=>{const l=v.value.map(n=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${h.value}`:`url(#bearish_gradient_${h.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),x=e.ref(!1);function we(l){x.value=l,L.value+=1}function oe(){p.value.showTable=!p.value.showTable}function ae(){p.value.showTooltip=!p.value.showTooltip}const S=e.ref(!1);function P(){S.value=!S.value}return ve({generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:oe,toggleTooltip:ae,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:g,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${h.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(G)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:S.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),pe.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.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(H)||e.unref(A))?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:S.value,onToggleFullscreen:we,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:oe,onToggleTooltip:ae,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,qe),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,We),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,Ge)],8,De),e.createElementVNode("linearGradient",{id:`bullish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,je),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ye)],8,He)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,tt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*n+r.value/2}, ${s.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,ot)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,at),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,ut),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,st)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,it),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,dt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${h.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${h.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,vt))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+n*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>ke(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,yt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&b.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Te.Slicer,{ref_key:"slicerComponent",ref:k,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,onReset:xe},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Ae.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${q.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,pt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},mt=Le._export_sfc(ft,[["__scopeId","data-v-b1cc80a6"]]);exports.default=mt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DaDv7p0W.cjs"),ue=require("./useNestedProp-DkpuL8Iv.cjs"),Q=require("./usePrinter-BIHu0O5X.cjs"),se=require("./vue-ui-skeleton-B24XJJ2p.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function ae(o){I.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function re(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>le()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>re()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,fe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"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.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-ad42b687"]]);exports.default=ge;
|