vue-data-ui 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{Arrow-C7lNL7sY.js → Arrow-AxsI-FAh.js} +1 -1
- package/dist/{Arrow-Dz6AomGr.cjs → Arrow-W6XO2WVI.cjs} +1 -1
- package/dist/{BaseIcon-uALK38Ov.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
- package/dist/{BaseIcon-BbvG1AlW.js → BaseIcon-BX3x6oa7.js} +1 -1
- package/dist/{DataTable-DYqC2pqu.js → DataTable-BI1tjiA_.js} +2 -2
- package/dist/{DataTable-DTzynbND.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
- package/dist/{Legend-Cgw4lO2O.cjs → Legend-B86sMXn7.cjs} +1 -1
- package/dist/{Legend-DNgTCgEK.js → Legend-CRMHjbGw.js} +1 -1
- package/dist/{PackageVersion-VkaUzgmt.js → PackageVersion-Clrfvyd8.js} +1 -1
- package/dist/{PackageVersion-DwI-KhXH.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
- package/dist/{PenAndPaper-DAZYA8Ew.js → PenAndPaper-BQzgk5kO.js} +2 -2
- package/dist/{PenAndPaper-CDFVOo7X.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
- package/dist/{Shape-Bwon0l0g.js → Shape-DYNtRer6.js} +1 -1
- package/dist/{Shape-D2Dpshg1.cjs → Shape-qK3MNdTg.cjs} +1 -1
- package/dist/{Slicer-TfpN2Cr4.js → Slicer-DFPDip5U.js} +3 -3
- package/dist/{Slicer-uSjfNJjG.cjs → Slicer-NlxLkUso.cjs} +1 -1
- package/dist/{Title-C5pIfQAz.js → Title-710895ks.js} +1 -1
- package/dist/{Title-0Tp4hZ4u.cjs → Title-CUN1T6KC.cjs} +1 -1
- package/dist/{Tooltip-9Tp2Yrd1.cjs → Tooltip-BapDtYOM.cjs} +1 -1
- package/dist/{Tooltip-Cz24YLfw.js → Tooltip-CPlG_yQU.js} +1 -1
- package/dist/{index-eFox7weK.cjs → index-CcykRspI.cjs} +1 -1
- package/dist/{index-Bya_q1J-.js → index-DCsPHn9C.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-B33hazbH.js → useNestedProp-DdSlLeTW.js} +1 -1
- package/dist/{useNestedProp-BkgEhTQY.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
- package/dist/{usePrinter-CSRFnDBU.cjs → usePrinter-BcE45wW6.cjs} +1 -1
- package/dist/{usePrinter-CiHd1FwD.js → usePrinter-siG3sKWo.js} +1 -1
- package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
- package/dist/{useResponsive-BY8tgM1n.js → useResponsive-CoxXLe23.js} +8 -7
- package/dist/{vue-data-ui-BTtxyUc3.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
- package/dist/{vue-data-ui-Bduq4f2p.js → vue-data-ui-D_MTGc8j.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BUEq_VdY.js → vue-ui-3d-bar-BdzWvy4d.js} +9 -9
- package/dist/{vue-ui-3d-bar-B-P7PMHs.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +1 -1
- package/dist/{vue-ui-accordion-TEMpM1hO.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
- package/dist/{vue-ui-accordion-DfUfL2dI.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
- package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CH72tAMb.js → vue-ui-age-pyramid-CHEdFQb7.js} +145 -137
- package/dist/{vue-ui-annotator-DPeJ2its.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
- package/dist/{vue-ui-annotator-DU_DJKCw.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
- package/dist/{vue-ui-bullet-CtP3MlUT.js → vue-ui-bullet-DBk50kIe.js} +75 -69
- package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
- package/dist/{vue-ui-candlestick-DDil13a0.js → vue-ui-candlestick-Bo41qkGe.js} +240 -232
- package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
- package/dist/{vue-ui-carousel-table-BaeIxyc0.js → vue-ui-carousel-table-CkNOqa9q.js} +4 -4
- package/dist/{vue-ui-carousel-table-C7SJIOG-.cjs → vue-ui-carousel-table-lMqx64wd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BczSJF6S.js → vue-ui-chestnut-CNWq-epB.js} +262 -256
- package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
- package/dist/{vue-ui-cursor-Dg_Dmww-.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
- package/dist/{vue-ui-cursor-C2Pj_CI_.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Bul9dqx1.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
- package/dist/{vue-ui-dashboard-Cg020NiT.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
- package/dist/{vue-ui-digits-B8iAa4YZ.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
- package/dist/{vue-ui-digits-Ctgd84JR.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
- package/dist/{vue-ui-donut-DUcp-fat.js → vue-ui-donut-C65SAJKb.js} +338 -330
- package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
- package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-C_YMbTwq.js → vue-ui-donut-evolution-BFbBlmBx.js} +163 -156
- package/dist/{vue-ui-dumbbell-Buwngz_V.js → vue-ui-dumbbell-BnxRfvv0.js} +208 -200
- package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
- package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
- package/dist/{vue-ui-flow-Bz3c0K5P.js → vue-ui-flow-Cra_F-tK.js} +130 -124
- package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
- package/dist/{vue-ui-galaxy-Cjh0XGTX.js → vue-ui-galaxy-DlJ7v0aD.js} +125 -119
- package/dist/{vue-ui-gauge-B1UvGkQa.js → vue-ui-gauge-CsqVvNxE.js} +167 -159
- package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
- package/dist/{vue-ui-gizmo-DFW6HnHp.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DUQ4t-At.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
- package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
- package/dist/{vue-ui-heatmap-C-poazUw.js → vue-ui-heatmap-i4HFM04D.js} +156 -149
- package/dist/{vue-ui-kpi-Z4Oi4raz.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
- package/dist/{vue-ui-kpi-DXe-vxAk.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
- package/dist/{vue-ui-mini-loader-MMvpm9pz.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BVtHTqxS.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
- package/dist/{vue-ui-molecule-BaJpDZND.js → vue-ui-molecule-CgdepnhM.js} +109 -103
- package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BUNDwsEI.js → vue-ui-mood-radar-Bxro4962.js} +173 -166
- package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-mDy2hXa6.js → vue-ui-nested-donuts-B7dXBejH.js} +311 -303
- package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
- package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
- package/dist/{vue-ui-onion-DwFG3HAI.js → vue-ui-onion-i52wztm0.js} +149 -141
- package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-ImET_zeo.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +186 -178
- package/dist/{vue-ui-quadrant-BeveRihK.js → vue-ui-quadrant-BORPtgQO.js} +225 -217
- package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
- package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DAhllTfa.js → vue-ui-quick-chart-yb1FzVdt.js} +386 -378
- package/dist/{vue-ui-radar-BllatzRa.js → vue-ui-radar-CoCbl19A.js} +172 -164
- package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
- package/dist/{vue-ui-rating-D1ykV4xO.js → vue-ui-rating-D-zwuvLK.js} +2 -2
- package/dist/{vue-ui-rating-BoZo7caL.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
- package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
- package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
- package/dist/{vue-ui-rings-B-ZcX6y1.js → vue-ui-rings-Bx2GEh6d.js} +196 -188
- package/dist/{vue-ui-scatter-DG43ck1g.js → vue-ui-scatter-BARiPzro.js} +288 -280
- package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
- package/dist/{vue-ui-screenshot-p3ca8cAl.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
- package/dist/{vue-ui-screenshot-C1JBP_N0.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BYssP0K4.js → vue-ui-skeleton-DNuwx6_y.js} +3 -3
- package/dist/{vue-ui-skeleton-BqKzuhkB.cjs → vue-ui-skeleton-DpfJbsNA.cjs} +1 -1
- package/dist/{vue-ui-smiley-D7dDCdpq.js → vue-ui-smiley-BnX27B0k.js} +2 -2
- package/dist/{vue-ui-smiley-BXKVpHl2.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-GWFrO_0z.js → vue-ui-spark-trend-CgCLrMox.js} +5 -5
- package/dist/{vue-ui-spark-trend-9V60hM3Z.cjs → vue-ui-spark-trend-aW-de-rX.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bgn6AY0q.cjs → vue-ui-sparkbar-BLUXUlTY.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CwqlyAyv.js → vue-ui-sparkbar-BXku33sq.js} +4 -4
- package/dist/{vue-ui-sparkgauge-F2XbiXyA.js → vue-ui-sparkgauge-Doi0iu0L.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dqntz2Zv.cjs → vue-ui-sparkgauge-RTiKvSMp.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DRIKK6Ym.js → vue-ui-sparkhistogram-BnMvXlAP.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DnY4-Sdn.cjs → vue-ui-sparkhistogram-C6AgJH1C.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Cxtzdlhi.js → vue-ui-sparkline-DI7fq_MR.js} +5 -5
- package/dist/{vue-ui-sparkline-CAEs-gtK.cjs → vue-ui-sparkline-DpVCQ6W9.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-D37ms1rx.cjs → vue-ui-sparkstackbar-Bvuq2sLW.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-0A1klq9s.js → vue-ui-sparkstackbar-oNnE5z1C.js} +4 -4
- package/dist/{vue-ui-stackbar-ByOuJSdM.js → vue-ui-stackbar-6g7b3yyu.js} +13 -13
- package/dist/{vue-ui-stackbar-wun4S3C0.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CMD0MSqY.js → vue-ui-strip-plot-BFM8HIM8.js} +204 -196
- package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
- package/dist/{vue-ui-table-B75DJ39t.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
- package/dist/{vue-ui-table-aj0XZ7T5.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Ce93TyBF.cjs → vue-ui-table-heatmap-Bh48bMuU.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BO2ugWqD.js → vue-ui-table-heatmap-DeRCR8l6.js} +4 -4
- package/dist/{vue-ui-table-sparkline-D6KJjDnU.cjs → vue-ui-table-sparkline-C25qj1w_.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CbjfAaj2.js → vue-ui-table-sparkline-w3H-od91.js} +5 -5
- package/dist/{vue-ui-thermometer-Pq4PvSIP.js → vue-ui-thermometer-BySEVhT8.js} +171 -165
- package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
- package/dist/{vue-ui-timer-B6IB6yS6.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
- package/dist/{vue-ui-timer-Bk3BvB-B.js → vue-ui-timer-BN-9a2lj.js} +6 -6
- package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-CU9HJIqf.js → vue-ui-tiremarks-EzYdOMyf.js} +119 -112
- package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
- package/dist/{vue-ui-treemap-DY-lRAhC.js → vue-ui-treemap-Da0f6vaF.js} +266 -258
- package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CtnIKsM1.js → vue-ui-vertical-bar-D1cBfu5p.js} +245 -237
- package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
- package/dist/{vue-ui-waffle-reOsx-gJ.js → vue-ui-waffle-DM2LsEP7.js} +224 -216
- package/dist/{vue-ui-wheel-kYxny3vn.js → vue-ui-wheel-B9cmixxi.js} +125 -117
- package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DwLY4QdB.cjs → vue-ui-word-cloud-BLMWYOPy.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DbMqrHAf.js → vue-ui-word-cloud-Baz7RXN2.js} +11 -11
- package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
- package/dist/{vue-ui-xy-rbACig0h.js → vue-ui-xy-DVnzVSqE.js} +302 -291
- package/dist/{vue-ui-xy-canvas-B0HTR7OV.js → vue-ui-xy-canvas-A7PKnWBs.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CgJd5FiT.cjs → vue-ui-xy-canvas-DAd-B98z.cjs} +1 -1
- package/package.json +1 -1
- package/dist/useResponsive-CodiGUOE.cjs +0 -1
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +0 -1
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +0 -34
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +0 -2
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +0 -6
- package/dist/vue-ui-donut-D7KT9EAp.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +0 -1
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +0 -9
- package/dist/vue-ui-flow-D6rc8J-8.cjs +0 -1
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +0 -1
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +0 -1
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +0 -1
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +0 -1
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +0 -17
- package/dist/vue-ui-onion-GWNoZRhw.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +0 -8
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +0 -15
- package/dist/vue-ui-radar-BJH5SE6-.cjs +0 -1
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +0 -1
- package/dist/vue-ui-relation-circle-xv2l5Be9.js +0 -358
- package/dist/vue-ui-rings-DjH3CK23.cjs +0 -2
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +0 -1
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +0 -1
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +0 -1
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +0 -1
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +0 -4
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +0 -1
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +0 -1
- package/dist/vue-ui-xy-CGWzriYn.cjs +0 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CcykRspI.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-CUN1T6KC.cjs"),ne=require("./usePrinter-BcE45wW6.cjs"),Ce=require("./Tooltip-BapDtYOM.cjs"),Ne=require("./DataTable-RUQ1G_6L.cjs"),$e=require("./vue-ui-skeleton-DpfJbsNA.cjs"),_e=require("./Slicer-NlxLkUso.cjs"),Be=require("./vue-ui-accordion-B7PTyFVk.cjs"),ue=require("./useNestedProp-XtPlFP9O.cjs"),Se=require("./PackageVersion-CowXQ4IM.cjs"),Ve=require("./PenAndPaper-DBSxk9Xk.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Te=["xmlns","viewBox"],Ae={key:0},Fe=["id"],Le=["stop-color"],Pe=["stop-color"],Re=["stop-color"],Oe=["id"],Ie=["stop-color"],Me=["stop-color"],Ue=["stop-color"],qe={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge={key:1},He=["x1","x2","y1","y2","stroke","stroke-width"],je=["x","y","font-size","fill","font-weight"],Xe={key:2},Ye=["transform","text-anchor","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke={key:0},Qe=["cx","cy","r","fill"],Ze=["cx","cy","r","fill"],et={key:1},tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x","y","height","width","fill","rx"],at=["x","y","height","width","fill","rx","stroke","stroke-width"],nt=["x","y","height","width","fill","onMouseover"],ut={key:5,class:"vue-data-ui-watermark"},rt=["innerHTML"],st={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:re}){const h=f,{vue_ui_candlestick:se}=u.useConfig(),k=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(u.createUid()),ie=e.ref(null),S=e.ref(!1),V=e.ref(""),E=e.ref(void 0),L=e.ref(0),m=e.ref(null),P=e.ref(null),R=e.ref(null),O=e.ref(null),I=e.ref(null),M=e.ref(null),x=e.ref(0),U=e.ref(0),q=e.ref(0),t=e.computed({get:()=>D(),set:l=>l});function D(){const l=ue.useNestedProp({userConfig:h.config,defaultConfig:se});return l.theme?{...ue.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||h.config,defaultConfig:l})}:l}e.watch(()=>h.config,l=>{t.value=D(),W(),x.value+=1,q.value+=1,U.value+=1},{deep:!0}),e.watch(()=>h.dataset,l=>{d.value.start=0,d.value.end=l.length,x.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}),w=e.ref(null);e.onMounted(()=>{W()});function W(){if(u.objectIsEmpty(h.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ae.throttle(()=>{const{width:n,height:o}=ae.useResponsive({chart:m.value,title:t.value.style.title.text?P.value:null,slicer:O.value,legend:R.value,source:I.value,noTitle:M.value});i.value.width=n,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(n,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(n,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});w.value=new ResizeObserver(l),w.value.observe(m.value.parentNode)}}e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:X}=ne.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),de=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}),r=e.computed(()=>{const{top:l,right:n,bottom:o,left:a}=t.value.style.layout.padding;return{top:l,right:i.value.width-n,left:a,bottom:i.value.height-o,width:i.value.width-a-n,height:i.value.height-l-o}}),z=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:z.value}),Y=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),T=e.computed(()=>(h.dataset.forEach((l,n)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:n}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:n}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:n}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:n}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:n}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:n})}),Y.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),s=e.computed(()=>r.value.width/Y.value.length),J=e.computed(()=>({max:Math.max(...T.value.map(l=>l.high)),min:0})),g=e.computed(()=>u.calculateNiceScale(J.value.min,J.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function C(l,n){return{...l,x:u.checkNaN(r.value.left+n*s.value+s.value/2),y:u.checkNaN(r.value.top+(1-l/g.value.max)*r.value.height),value:u.checkNaN(l)}}const c=e.computed(()=>T.value.map((l,n)=>{const o=C(l.open,n),a=C(l.high,n),v=C(l.low,n),_=C(l.last,n),B=l.last>l.open;return{period:l.period,open:o,high:a,low:v,last:_,volume:l.volume,isBullish:B}}));function ce(l){return u.checkNaN(l/g.value.max)}const ve=e.computed(()=>g.value.ticks.map(l=>({y:r.value.bottom-r.value.height*ce(l),value:u.checkNaN(l)}))),ye=e.computed(()=>T.value.map(l=>l.period)),A=e.ref(null);function he(l,n){E.value=l,A.value={datapoint:n,seriesIndex:l,series:c.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:n,series:c.value,config:t.value})))V.value=o({seriesIndex:l,datapoint:n,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:_,high:B,low:ee,last:te,volume:le,isBullish:oe}=c.value[l],{period:dt,open:ge,high:me,low:ke,last:be,volume:xe}=t.value.translations;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="${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?oe?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:oe?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${xe} : <b>${isNaN(le)?"-":Number(le.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${ge}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${me}: <b>${t.value.style.tooltip.prefix} ${isNaN(B.value)?"-":Number(B.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ke}: <b>${t.value.style.tooltip.prefix} ${isNaN(ee.value)?"-":Number(ee.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${be}: <b>${t.value.style.tooltip.prefix} ${isNaN(te.value)?"-":Number(te.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",V.value=`<div style="text-align:right">${a}</div>`}S.value=!0}function pe(){d.value={start:0,end:z.value},x.value+=1}function K(){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],n=c.value.map(v=>[v.period,v.open.value,v.high.value,v.low.value,v.last.value,v.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-candlestick"})})}const N=e.computed(()=>{const l=c.value.map(a=>[`<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?a.isBullish?`url(#bullish_gradient_${y.value}`:`url(#bearish_gradient_${y.value})`:a.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,`${t.value.table.td.prefix} ${isNaN(a.open.value)?"-":Number(a.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.high.value)?"-":Number(a.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.low.value)?"-":Number(a.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.last.value)?"-":Number(a.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(a.volume)?"-":a.volume.toLocaleString()}`]),n={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:n,colNames:o}}),b=e.ref(!1);function fe(l){b.value=l,L.value+=1}function Q(){p.value.showTable=!p.value.showTable}function Z(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return re({generatePdf:j,generateCsv:K,generateImage:X,toggleTable:Q,toggleTooltip:Z,toggleAnnotator:F}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:m,class:e.normalizeClass(`vue-ui-candlestick ${b.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_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:$.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,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:P,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${q.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&&k.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(H),isPrinting:e.unref(G),uid:y.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:b.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(j),onGenerateCsv:K,onGenerateImage:e.unref(X),onToggleTable:Q,onToggleTooltip:Z,onToggleAnnotator:F},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:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),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"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.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(Se._sfc_main),c.value.length>0?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,Le),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,Re)],8,Fe),e.createElementVNode("linearGradient",{id:`bullish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Ie),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ue)],8,Oe)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,We)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ve.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.left,x2:r.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,He)):e.createCommentVNode("",!0),o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.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,je)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${r.value.left+s.value*a+s.value/2}, ${r.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,Ye)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(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,Je),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Qe),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ze)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",et,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?s.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"?s.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,tt),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?s.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"?s.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,lt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.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:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.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,ot))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.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:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${y.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${y.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,at))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:r.value.left+a*s.value,y:r.value.top,height:r.value.height<=0?1e-4:r.value.height,width:s.value<=0?1e-4:s.value,fill:E.value===a?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:v=>he(a,o),onMouseleave:n[0]||(n[0]=v=>{E.value=void 0,S.value=!1})},null,40,nt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ut,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.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&&k.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:O},[(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${x.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[d.value.start]?f.dataset[d.value.start][0]:f.dataset[0][0],labelRight:f.dataset[d.value.end-1]?f.dataset[d.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:z.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":n[1]||(n[1]=o=>d.value.start=o),end:d.value.end,"onUpdate:end":n[2]||(n[2]=o=>d.value.end=o),onReset:pe},{"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"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ce._sfc_main,{show:p.value.showTooltip&&S.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:m.value,content:V.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({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(Be.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(Ne.DataTable,{key:`table_${U.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[3]||(n[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,rt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ze))}},it=Ee._export_sfc(st,[["__scopeId","data-v-bec260db"]]);exports.default=it;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as o, onMounted as F, computed as B, watch as V, onBeforeUnmount as re, nextTick as de, openBlock as s, createElementBlock as r, createElementVNode as N, normalizeStyle as d, unref as C, normalizeClass as Ae, createTextVNode as G, toDisplayString as M, renderSlot as v, Fragment as q, renderList as D, normalizeProps as X, guardReactiveProps as j, createCommentVNode as O, createBlock as ve, createSlots as ke, withCtx as P } from "vue";
|
|
2
|
-
import { u as xe, c as we, o as J, e as K, s as Ie, q as Fe, r as Be } from "./index-
|
|
3
|
-
import { u as Oe } from "./useNestedProp-
|
|
4
|
-
import { u as Pe, U as Re } from "./usePrinter-
|
|
5
|
-
import ze from "./vue-ui-skeleton-
|
|
2
|
+
import { u as xe, c as we, o as J, e as K, s as Ie, q as Fe, r as Be } from "./index-DCsPHn9C.js";
|
|
3
|
+
import { u as Oe } from "./useNestedProp-DdSlLeTW.js";
|
|
4
|
+
import { u as Pe, U as Re } from "./usePrinter-siG3sKWo.js";
|
|
5
|
+
import ze from "./vue-ui-skeleton-DNuwx6_y.js";
|
|
6
6
|
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const Ne = ["id"], Se = ["height"], He = ["data-cell", "height"], Le = {
|
|
8
8
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-eFox7weK.cjs"),ae=require("./useNestedProp-BkgEhTQY.cjs"),j=require("./usePrinter-CSRFnDBU.cjs"),ne=require("./vue-ui-skeleton-BqKzuhkB.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],ie=["height"],ue=["data-cell","height"],se={key:2,ref:"source",dir:"auto"},de={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(p,{expose:X}){const l=p,{vue_ui_carousel_table:_}=u.useConfig(),A=e.ref(u.createUid()),I=e.ref(!1),g=e.ref(!!l.dataset);e.onMounted(()=>{P()});function P(){u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),g.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),g.value=!1))}const t=e.computed({get:()=>F(),set:o=>o});function F(){return ae.useNestedProp({userConfig:l.config,defaultConfig:_})}e.watch(()=>l.config,o=>{t.value=F(),P()},{deep:!0}),e.watch(()=>l.dataset,o=>{S()},{deep:!0});const{isPrinting:N,isImaging:O,generatePdf:J,generateImage:R}=j.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),V=e.ref(null),b=e.ref(null),y=e.ref(null),k=e.ref(0),$=e.ref(0),x=e.ref(!1),C=e.ref(null),c=e.ref(null),B=e.ref(0);function S(){C.value&&(c.value={elements:C.value.getElementsByTagName("tr"),heights:Array.from(C.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(S);const K=e.computed(()=>!c.value||!c.value.heights.length?0:Math.max(...c.value.heights)+k.value+$.value),Q=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),W=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)*Q.value+k.value+$.value),w=e.ref(0),T=e.ref(null),f=e.ref(0),m=e.ref(!1),L=e.ref(0);e.onMounted(()=>{b.value&&(k.value=b.value.getBoundingClientRect().height),y.value&&($.value=y.value.getBoundingClientRect().height),s.value.showAnimation&&c.value&&M()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(C.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function Y(o){I.value=o,L.value+=1}function M(){!T.value&&!m.value&&(T.value=requestAnimationFrame(q))}function Z(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function q(o){if(m.value)return;f.value||(f.value=o),o-f.value>=t.value.animation.speedMs&&(w.value+=c.value.heights[B.value],(Z()||B.value>=c.value.heights.length)&&(w.value=0,B.value=-1),B.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),f.value=o),T.value=requestAnimationFrame(q)}function v(){m.value=!0,cancelAnimationFrame(T.value),T.value=null}e.onBeforeUnmount(v);function h(){!m.value||!s.value.showAnimation||(m.value=!1,f.value=0,M())}function ee(){t.value.animation.pauseOnHover&&v()}const E=e.ref(null);function te(){v(),clearTimeout(E.value)}function H(){clearTimeout(E.value),E.value=setTimeout(h,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,h()):(s.value.showAnimation=!1,v())});const oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{x.value=a.contentRect.width<oe.value}),k.value=b.value?b.value.getBoundingClientRect().height:0,$.value=y.value?y.value.getBoundingClientRect().height:0,B.value=0,e.nextTick(()=>{v(),f.value=0,w.value=0,S(),h()})});i.value&&o.observe(i.value)});function U(){J()}function D(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?h():v()}function G(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return X({pauseAnimation:v,resumeAnimation:h,toggleAnimation:D,generateCsv:G,generatePdf:U,generateImage:R}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:V},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(N)||e.unref(O)?"auto":`${Math.max(W.value,K.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":!m.value}),onMouseover:n[0]||(n[0]=a=>ee()),onMouseleave:n[1]||(n[1]=a=>h()),onTouchstart:n[2]||(n[2]=a=>te()),onTouchend:n[3]||(n[3]=a=>H()),onTouchcancel:n[4]||(n[4]=a=>H())},[g.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"})},[e.createElementVNode("caption",{ref_key:"caption",ref:b,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"})},[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:`${k.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:y,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(p.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,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?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,ie)],4),p.dataset.body&&p.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:C,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.body,(a,r)=>(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(a,(d,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":p.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,r%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?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:z})),void 0,!0)],12,ue))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,re),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&g.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(N),isImaging:e.unref(O),uid:A.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:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:V.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:U,onGenerateCsv:G,onGenerateImage:e.unref(R),onToggleAnimation:D,onToggleFullscreen:Y},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:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],512))}},ce=le._export_sfc(de,[["__scopeId","data-v-1b9d6aaa"]]);exports.default=ce;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CcykRspI.cjs"),ae=require("./useNestedProp-XtPlFP9O.cjs"),j=require("./usePrinter-BcE45wW6.cjs"),ne=require("./vue-ui-skeleton-DpfJbsNA.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],ie=["height"],ue=["data-cell","height"],se={key:2,ref:"source",dir:"auto"},de={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(p,{expose:X}){const l=p,{vue_ui_carousel_table:_}=u.useConfig(),A=e.ref(u.createUid()),I=e.ref(!1),g=e.ref(!!l.dataset);e.onMounted(()=>{P()});function P(){u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),g.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),g.value=!1))}const t=e.computed({get:()=>F(),set:o=>o});function F(){return ae.useNestedProp({userConfig:l.config,defaultConfig:_})}e.watch(()=>l.config,o=>{t.value=F(),P()},{deep:!0}),e.watch(()=>l.dataset,o=>{S()},{deep:!0});const{isPrinting:N,isImaging:O,generatePdf:J,generateImage:R}=j.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),V=e.ref(null),b=e.ref(null),y=e.ref(null),k=e.ref(0),$=e.ref(0),x=e.ref(!1),C=e.ref(null),c=e.ref(null),B=e.ref(0);function S(){C.value&&(c.value={elements:C.value.getElementsByTagName("tr"),heights:Array.from(C.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(S);const K=e.computed(()=>!c.value||!c.value.heights.length?0:Math.max(...c.value.heights)+k.value+$.value),Q=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),W=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)*Q.value+k.value+$.value),w=e.ref(0),T=e.ref(null),f=e.ref(0),m=e.ref(!1),L=e.ref(0);e.onMounted(()=>{b.value&&(k.value=b.value.getBoundingClientRect().height),y.value&&($.value=y.value.getBoundingClientRect().height),s.value.showAnimation&&c.value&&M()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(C.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function Y(o){I.value=o,L.value+=1}function M(){!T.value&&!m.value&&(T.value=requestAnimationFrame(q))}function Z(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function q(o){if(m.value)return;f.value||(f.value=o),o-f.value>=t.value.animation.speedMs&&(w.value+=c.value.heights[B.value],(Z()||B.value>=c.value.heights.length)&&(w.value=0,B.value=-1),B.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),f.value=o),T.value=requestAnimationFrame(q)}function v(){m.value=!0,cancelAnimationFrame(T.value),T.value=null}e.onBeforeUnmount(v);function h(){!m.value||!s.value.showAnimation||(m.value=!1,f.value=0,M())}function ee(){t.value.animation.pauseOnHover&&v()}const E=e.ref(null);function te(){v(),clearTimeout(E.value)}function H(){clearTimeout(E.value),E.value=setTimeout(h,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,h()):(s.value.showAnimation=!1,v())});const oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{x.value=a.contentRect.width<oe.value}),k.value=b.value?b.value.getBoundingClientRect().height:0,$.value=y.value?y.value.getBoundingClientRect().height:0,B.value=0,e.nextTick(()=>{v(),f.value=0,w.value=0,S(),h()})});i.value&&o.observe(i.value)});function U(){J()}function D(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?h():v()}function G(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return X({pauseAnimation:v,resumeAnimation:h,toggleAnimation:D,generateCsv:G,generatePdf:U,generateImage:R}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:V},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(N)||e.unref(O)?"auto":`${Math.max(W.value,K.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":!m.value}),onMouseover:n[0]||(n[0]=a=>ee()),onMouseleave:n[1]||(n[1]=a=>h()),onTouchstart:n[2]||(n[2]=a=>te()),onTouchend:n[3]||(n[3]=a=>H()),onTouchcancel:n[4]||(n[4]=a=>H())},[g.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"})},[e.createElementVNode("caption",{ref_key:"caption",ref:b,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"})},[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:`${k.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:y,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(p.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,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?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,ie)],4),p.dataset.body&&p.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:C,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.body,(a,r)=>(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(a,(d,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":p.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,r%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?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:z})),void 0,!0)],12,ue))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,re),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&g.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(N),isImaging:e.unref(O),uid:A.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:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:V.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:U,onGenerateCsv:G,onGenerateImage:e.unref(R),onToggleAnimation:D,onToggleFullscreen:Y},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:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],512))}},ce=le._export_sfc(de,[["__scopeId","data-v-1b9d6aaa"]]);exports.default=ce;
|