vue-data-ui 2.3.74 → 2.3.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DK6F5Fq3.cjs → Arrow-D7M4-bW7.cjs} +1 -1
- package/dist/{Arrow-CYCrAySW.js → Arrow-DY9RKUmG.js} +1 -1
- package/dist/{BaseIcon-DBHVtm3A.cjs → BaseIcon-DB7Apwv_.cjs} +1 -1
- package/dist/{BaseIcon-kBIAYqUO.js → BaseIcon-rwm-10Hu.js} +1 -1
- package/dist/{DataTable-BNFSPjhv.cjs → DataTable-CsNozyz7.cjs} +1 -1
- package/dist/{DataTable-CKdV-L0e.js → DataTable-e2fnfjXV.js} +2 -2
- package/dist/{Legend-Cj7T-DqJ.js → Legend-5cQ0xZjK.js} +1 -1
- package/dist/{Legend-Do2kcWFT.cjs → Legend-DgFd-O0m.cjs} +1 -1
- package/dist/{Shape-Bo8ZjViG.js → Shape-CiTElr_0.js} +1 -1
- package/dist/{Shape-DRDUAe_o.cjs → Shape-yPECDLiP.cjs} +1 -1
- package/dist/{Slicer-D8jHSP7U.cjs → Slicer-DaZgCKV7.cjs} +1 -1
- package/dist/{Slicer-4nGKvUYF.js → Slicer-DwBBu3kB.js} +2 -2
- package/dist/{Title-D5cATWsL.cjs → Title-3EduyW4p.cjs} +1 -1
- package/dist/{Title-DZjnxQdN.js → Title-gUz6GDA3.js} +1 -1
- package/dist/{Tooltip-B8yLaegk.cjs → Tooltip-DScSrYXJ.cjs} +1 -1
- package/dist/{Tooltip--kgFEVZs.js → Tooltip-DfSM1mNP.js} +1 -1
- package/dist/{index-D_32ZGWd.cjs → index-BTgtr0F8.cjs} +1 -1
- package/dist/{index-C8SH0f2u.js → index-CaV1s-yZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BvvH633N.cjs → useNestedProp-CisbRRo_.cjs} +1 -1
- package/dist/{useNestedProp-lS_T5lM3.js → useNestedProp-tWCzZrLx.js} +1 -1
- package/dist/{usePrinter-BouFNHWR.cjs → usePrinter-DzTaA1eh.cjs} +1 -1
- package/dist/{usePrinter-Dj50NAxo.js → usePrinter-rvJyT65A.js} +1 -1
- package/dist/{vue-data-ui-v_BbbLtJ.cjs → vue-data-ui-BGkWRPUY.cjs} +1 -1
- package/dist/{vue-data-ui-DoXqU7xC.js → vue-data-ui-BO89gTtq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CnoPOJHm.js → vue-ui-3d-bar-CcTMIHiB.js} +499 -486
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +19 -0
- package/dist/{vue-ui-accordion-Cka6b_Up.cjs → vue-ui-accordion-7e4Myhcg.cjs} +1 -1
- package/dist/{vue-ui-accordion-YHleIgkV.js → vue-ui-accordion-CpzGQ63y.js} +3 -3
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CENg8fDg.js → vue-ui-age-pyramid-D71ZLkVV.js} +182 -169
- package/dist/{vue-ui-annotator-VJOLUkqJ.js → vue-ui-annotator-B8Iu6cYt.js} +1 -1
- package/dist/{vue-ui-annotator-ByYg6QMs.cjs → vue-ui-annotator-BKQrweqm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CHsGD3bx.js → vue-ui-candlestick-Bx4QVkY0.js} +295 -279
- package/dist/vue-ui-candlestick-DAc1FQ-i.cjs +2 -0
- package/dist/vue-ui-carousel-table-uFRqkghO.cjs +1 -0
- package/dist/{vue-ui-carousel-table-RAtX3VBu.js → vue-ui-carousel-table-xuQG6bcH.js} +146 -129
- package/dist/{vue-ui-chestnut-B5GQX0J_.js → vue-ui-chestnut-Bo6rDcU7.js} +215 -204
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +6 -0
- package/dist/{vue-ui-cursor-DnZqLj21.cjs → vue-ui-cursor-BQbeuW-k.cjs} +1 -1
- package/dist/{vue-ui-cursor-CMm7XSSG.js → vue-ui-cursor-C0KOqEOq.js} +2 -2
- package/dist/{vue-ui-dashboard-DgEQJnLr.cjs → vue-ui-dashboard-0Hsjx-bO.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ck_5L3eu.js → vue-ui-dashboard-BT71xS7P.js} +2 -2
- package/dist/{vue-ui-digits--ULH35um.js → vue-ui-digits-BRqpKYvD.js} +2 -2
- package/dist/{vue-ui-digits-UvwUdi6U.cjs → vue-ui-digits-C2ReH6w0.cjs} +1 -1
- package/dist/{vue-ui-donut-QQ1fWWvc.js → vue-ui-donut-NQW-3prf.js} +376 -362
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Cx8kBB_7.js → vue-ui-donut-evolution-jbXQQGTc.js} +270 -255
- package/dist/vue-ui-donut-v81suIOX.cjs +1 -0
- package/dist/vue-ui-dumbbell-DXQSg6wa.cjs +9 -0
- package/dist/{vue-ui-dumbbell-BYvwHpU8.js → vue-ui-dumbbell-Dyz8xdtC.js} +232 -213
- package/dist/vue-ui-flow-BL3JWW1m.js +481 -0
- package/dist/vue-ui-flow-UqSNwH9d.cjs +1 -0
- package/dist/vue-ui-galaxy-DTQWGvRH.cjs +1 -0
- package/dist/{vue-ui-galaxy-B0L57aec.js → vue-ui-galaxy-Dx9nsOuM.js} +175 -162
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +1 -0
- package/dist/vue-ui-gauge-CLaKGi0-.js +500 -0
- package/dist/vue-ui-gizmo-Kitfqu0J.cjs +1 -0
- package/dist/{vue-ui-gizmo-D2RfM55X.js → vue-ui-gizmo-of-4s5HG.js} +66 -53
- package/dist/{vue-ui-heatmap-DKM0DH41.js → vue-ui-heatmap-BIzjOMXO.js} +157 -143
- package/dist/vue-ui-heatmap-DUw2350O.cjs +1 -0
- package/dist/vue-ui-kpi-By3YPwgo.js +98 -0
- package/dist/vue-ui-kpi-DyL2Hcz-.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CLP19Txv.cjs → vue-ui-mini-loader-C048-8Kd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-MywnWlYI.js → vue-ui-mini-loader-DnK3V2z2.js} +2 -2
- package/dist/{vue-ui-molecule-CLI9iTRE.js → vue-ui-molecule-BfhbIqa5.js} +177 -167
- package/dist/vue-ui-molecule-D-ahly6R.cjs +1 -0
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-O30wZo9a.js → vue-ui-mood-radar-DXxEKr3x.js} +172 -161
- package/dist/{vue-ui-nested-donuts-D8o4TqTt.js → vue-ui-nested-donuts-BdUdHFd-.js} +377 -364
- package/dist/vue-ui-nested-donuts-C7qM_FRw.cjs +17 -0
- package/dist/{vue-ui-onion-Hmcke6xB.js → vue-ui-onion-D0vF5jBt.js} +191 -177
- package/dist/vue-ui-onion-DX3gofXZ.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CyChE3NP.js → vue-ui-parallel-coordinate-plot-CTZY-pY8.js} +298 -284
- package/dist/vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs +8 -0
- package/dist/{vue-ui-quadrant-DimTQdAj.js → vue-ui-quadrant-ByY8GP3y.js} +347 -334
- package/dist/vue-ui-quadrant-CgApzie6.cjs +1 -0
- package/dist/{vue-ui-quick-chart-DxJvENid.js → vue-ui-quick-chart-DTxJ__7j.js} +483 -469
- package/dist/vue-ui-quick-chart-DWZEgUJF.cjs +15 -0
- package/dist/{vue-ui-radar-D_FieunT.js → vue-ui-radar-5UBmAU6W.js} +202 -189
- package/dist/vue-ui-radar-DEED0rTz.cjs +1 -0
- package/dist/{vue-ui-rating-BHW2Onru.cjs → vue-ui-rating-Ce_Ewqtl.cjs} +1 -1
- package/dist/{vue-ui-rating-DF1BpH4E.js → vue-ui-rating-Dr6jquxh.js} +2 -2
- package/dist/vue-ui-relation-circle-BU8i2miI.js +322 -0
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +1 -0
- package/dist/{vue-ui-rings-BqS-iece.js → vue-ui-rings-Ctl3Jywh.js} +203 -189
- package/dist/vue-ui-rings-OQ8a1Ruw.cjs +2 -0
- package/dist/vue-ui-scatter-B8StSjt8.cjs +1 -0
- package/dist/{vue-ui-scatter-Dns49Nht.js → vue-ui-scatter-BwJ_koWT.js} +284 -270
- package/dist/{vue-ui-screenshot-5Gsnd0Wr.js → vue-ui-screenshot-BS3L5vhN.js} +1 -1
- package/dist/{vue-ui-screenshot---q062Kd.cjs → vue-ui-screenshot-bAVk3EPl.cjs} +1 -1
- package/dist/{vue-ui-skeleton-fVPw-oIR.cjs → vue-ui-skeleton-CMQzFTs9.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B4eWLjH3.js → vue-ui-skeleton-CvFX_ExX.js} +2 -2
- package/dist/{vue-ui-smiley-B8Tyunn3.js → vue-ui-smiley-CGYZpNt9.js} +2 -2
- package/dist/{vue-ui-smiley-YfHmv0rQ.cjs → vue-ui-smiley-sF8QIso1.cjs} +1 -1
- package/dist/vue-ui-spark-trend-B4XSSKl9.js +263 -0
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +1 -0
- package/dist/{vue-ui-sparkbar-9DBvdYn7.js → vue-ui-sparkbar-BbsJGDMZ.js} +95 -87
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BKyQoI7C.cjs +1 -0
- package/dist/vue-ui-sparkgauge-D4w_i_QJ.js +178 -0
- package/dist/{vue-ui-sparkhistogram-BBUVmco4.js → vue-ui-sparkhistogram-CYybrW-6.js} +79 -68
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +1 -0
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +1 -0
- package/dist/{vue-ui-sparkline-CeqNV6Re.js → vue-ui-sparkline-DjN1SVdO.js} +142 -123
- package/dist/{vue-ui-sparkstackbar-C3GMC1eW.js → vue-ui-sparkstackbar-BLMhJxaN.js} +120 -104
- package/dist/vue-ui-sparkstackbar-BZ2bESBi.cjs +1 -0
- package/dist/{vue-ui-stackbar-DyGPrFxi.js → vue-ui-stackbar-BTKOHUYc.js} +235 -222
- package/dist/vue-ui-stackbar-DRHaJFR8.cjs +6 -0
- package/dist/vue-ui-strip-plot-DxQxFbWg.cjs +1 -0
- package/dist/{vue-ui-strip-plot-y1AnVJmq.js → vue-ui-strip-plot-o6GTsGAT.js} +246 -232
- package/dist/{vue-ui-table-xWvAQS-s.cjs → vue-ui-table-BFIj1Rgh.cjs} +1 -1
- package/dist/{vue-ui-table-B4kfykAO.js → vue-ui-table-CnquiTpr.js} +1 -1
- package/dist/vue-ui-table-heatmap-CCGK12Fa.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-YZRSzwRM.js → vue-ui-table-heatmap-CZRIwv-Q.js} +106 -95
- package/dist/{vue-ui-table-sparkline-C0v2r4Kf.js → vue-ui-table-sparkline-B3zEeq6Z.js} +151 -138
- package/dist/vue-ui-table-sparkline-DYmgfHz4.cjs +1 -0
- package/dist/{vue-ui-thermometer-D5qurIy7.js → vue-ui-thermometer-BopiohUh.js} +116 -104
- package/dist/vue-ui-thermometer-CzPRBt6c.cjs +1 -0
- package/dist/vue-ui-timer-Bonw69Lt.cjs +64 -0
- package/dist/{vue-ui-timer-VWjovnKL.js → vue-ui-timer-C7WkW8hK.js} +191 -176
- package/dist/{vue-ui-tiremarks-jH6cdQOJ.js → vue-ui-tiremarks-BurRtFv4.js} +115 -103
- package/dist/vue-ui-tiremarks-DkIGfq8t.cjs +1 -0
- package/dist/vue-ui-treemap-CalhJmnp.cjs +1 -0
- package/dist/{vue-ui-treemap-BCc5sQLB.js → vue-ui-treemap-DWy4voIr.js} +251 -237
- package/dist/{vue-ui-vertical-bar-2In_g5iC.js → vue-ui-vertical-bar-CJW1YhtY.js} +314 -299
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +4 -0
- package/dist/{vue-ui-waffle-OzU830VX.js → vue-ui-waffle-DB7X6nTS.js} +285 -265
- package/dist/vue-ui-waffle-faQMBYNx.cjs +1 -0
- package/dist/vue-ui-wheel-BzjbGP6a.cjs +1 -0
- package/dist/vue-ui-wheel-CryKap2E.js +255 -0
- package/dist/vue-ui-word-cloud-COqUkvei.js +512 -0
- package/dist/vue-ui-word-cloud-DJN9I4q4.cjs +1 -0
- package/dist/vue-ui-xy-BmA0tspd.cjs +3 -0
- package/dist/{vue-ui-xy-DuJtYXKl.js → vue-ui-xy-b1Z_HPsx.js} +300 -274
- package/dist/{vue-ui-xy-canvas-CKibMJHh.js → vue-ui-xy-canvas-BgbLnY5B.js} +345 -327
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +9 -0
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CwCEoPX-.cjs +0 -19
- package/dist/vue-ui-age-pyramid-GqCNpd_h.cjs +0 -1
- package/dist/vue-ui-candlestick-TdNVq_FX.cjs +0 -2
- package/dist/vue-ui-carousel-table-yXUSFk2u.cjs +0 -1
- package/dist/vue-ui-chestnut-EJj-dQSY.cjs +0 -6
- package/dist/vue-ui-donut-BqUBysA_.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BXtEnop4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CjIh7KTm.cjs +0 -9
- package/dist/vue-ui-flow-hp0Hpuhn.js +0 -469
- package/dist/vue-ui-flow-u29zqSQj.cjs +0 -1
- package/dist/vue-ui-galaxy-DE1HbBi-.cjs +0 -1
- package/dist/vue-ui-gauge-B_IZrsfj.cjs +0 -1
- package/dist/vue-ui-gauge-CPyyn7cL.js +0 -488
- package/dist/vue-ui-gizmo-DR4gacOL.cjs +0 -1
- package/dist/vue-ui-heatmap-DMB_eUpA.cjs +0 -1
- package/dist/vue-ui-kpi-BAxAY13T.js +0 -84
- package/dist/vue-ui-kpi-BD21xshi.cjs +0 -1
- package/dist/vue-ui-molecule-BNsWckH-.cjs +0 -1
- package/dist/vue-ui-mood-radar-BsWE1f8R.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CYyUtXs2.cjs +0 -17
- package/dist/vue-ui-onion-D7TXJu5w.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BqZB7xKn.cjs +0 -8
- package/dist/vue-ui-quadrant-BPDTvxlT.cjs +0 -1
- package/dist/vue-ui-quick-chart-C_-ut0if.cjs +0 -15
- package/dist/vue-ui-radar-C5Kq19hg.cjs +0 -1
- package/dist/vue-ui-relation-circle-4kIYttRI.js +0 -310
- package/dist/vue-ui-relation-circle-DHMHHsqY.cjs +0 -1
- package/dist/vue-ui-rings-BqPS8NKl.cjs +0 -2
- package/dist/vue-ui-scatter-BLVcdf3d.cjs +0 -1
- package/dist/vue-ui-spark-trend-Dpv6am0Z.cjs +0 -1
- package/dist/vue-ui-spark-trend-Em9OqYyG.js +0 -251
- package/dist/vue-ui-sparkbar-BuSuwQYl.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BN5feBzp.js +0 -167
- package/dist/vue-ui-sparkgauge-DKtUZMv1.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BmuusW02.cjs +0 -1
- package/dist/vue-ui-sparkline-Blzv-tIQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-D__WDEMv.cjs +0 -1
- package/dist/vue-ui-stackbar-DFqJ5K_q.cjs +0 -6
- package/dist/vue-ui-strip-plot-z9fjJ6Dj.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CGKecjtm.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CHFZG3Tg.cjs +0 -1
- package/dist/vue-ui-thermometer-DoOxxVW1.cjs +0 -1
- package/dist/vue-ui-timer-D63zHe-I.cjs +0 -64
- package/dist/vue-ui-tiremarks-Cp8YEmXh.cjs +0 -1
- package/dist/vue-ui-treemap-DJrdEFW5.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BfJJqN_z.cjs +0 -4
- package/dist/vue-ui-waffle-A2gmRbq0.cjs +0 -1
- package/dist/vue-ui-wheel-C9QXzWu1.js +0 -242
- package/dist/vue-ui-wheel-DGSh9VKq.cjs +0 -1
- package/dist/vue-ui-word-cloud-C2ZaVlfO.js +0 -498
- package/dist/vue-ui-word-cloud-DPFB1MYk.cjs +0 -1
- package/dist/vue-ui-xy-C-2-aijE.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D7wf3xab.cjs +0 -9
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BTgtr0F8.cjs"),ee=require("./useResponsive-B3TrDDIG.cjs"),ge=require("./Title-3EduyW4p.cjs"),te=require("./usePrinter-DzTaA1eh.cjs"),me=require("./Tooltip-DScSrYXJ.cjs"),ke=require("./DataTable-CsNozyz7.cjs"),xe=require("./vue-ui-skeleton-CMQzFTs9.cjs"),be=require("./Slicer-DaZgCKV7.cjs"),we=require("./vue-ui-accordion-7e4Myhcg.cjs"),le=require("./useNestedProp-CisbRRo_.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["id"],$e=["xmlns","viewBox"],_e={key:0},Be=["id"],Se=["stop-color"],Ve=["stop-color"],Ee=["stop-color"],ze=["id"],Te=["stop-color"],Fe=["stop-color"],Ae=["stop-color"],Le={key:0},Re=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Ie={key:1},Oe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Ue={key:2},De=["transform","text-anchor","font-size","fill","font-weight"],qe=["x1","x2","y1","y2","stroke","stroke-width"],We={key:0},Ge=["cx","cy","r","fill"],He=["cx","cy","r","fill"],je={key:1},Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ye=["x1","x2","y1","y2","stroke","stroke-width"],Je=["x","y","height","width","fill","rx"],Ke=["x","y","height","width","fill","rx","stroke","stroke-width"],Qe=["x","y","height","width","fill","onMouseover"],Ze={key:3,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:oe}){const h=f,{vue_ui_candlestick:ae}=i.useConfig(),m=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(i.createUid()),ue=e.ref(null),B=e.ref(!1),S=e.ref(""),V=e.ref(void 0),F=e.ref(0),k=e.ref(null),A=e.ref(null),L=e.ref(null),R=e.ref(null),b=e.ref(0),P=e.ref(0),I=e.ref(0),t=e.computed({get:()=>O(),set:l=>l});function O(){const l=le.useNestedProp({userConfig:h.config,defaultConfig:ae});return l.theme?{...le.useNestedProp({userConfig:i.themes.vue_ui_candlestick[l.theme]||h.config,defaultConfig:l})}:l}e.watch(()=>h.config,l=>{t.value=O(),M(),b.value+=1,I.value+=1,P.value+=1},{deep:!0}),e.watch(()=>h.dataset,l=>{d.value.start=0,d.value.end=l.length,b.value+=1},{deep:!0});const r=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(()=>{M()});function M(){if(i.objectIsEmpty(h.dataset)&&i.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ee.throttle(()=>{const{width:u,height:o}=ee.useResponsive({chart:k.value,title:t.value.style.title.text?A.value:null,slicer:R.value,legend:L.value});r.value.width=u,r.value.height=o,r.value.xAxisFontSize=i.translateSize({relator:Math.min(u,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),r.value.yAxisFontSize=i.translateSize({relator:Math.min(u,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(k.value.parentNode)}}e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:U,isImaging:D,generatePdf:q,generateImage:W}=te.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:u,bottom:o,left:a}=t.value.style.layout.padding;return{top:l,right:r.value.width-u,left:a,bottom:r.value.height-o,width:r.value.width-a-u,height:r.value.height-l-o}}),E=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:E.value}),G=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),z=e.computed(()=>(h.dataset.forEach((l,u)=>{[null,void 0].includes(l[0])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:u}),[null,void 0].includes(l[1])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:u}),[null,void 0].includes(l[2])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:u}),[null,void 0].includes(l[3])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:u}),[null,void 0].includes(l[4])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:u}),[null,void 0].includes(l[5])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:u})}),G.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),n=e.computed(()=>s.value.width/G.value.length),H=e.computed(()=>({max:Math.max(...z.value.map(l=>l.high)),min:0})),g=e.computed(()=>i.calculateNiceScale(H.value.min,H.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function C(l,u){return{...l,x:i.checkNaN(s.value.left+u*n.value+n.value/2),y:i.checkNaN(s.value.top+(1-l/g.value.max)*s.value.height),value:i.checkNaN(l)}}const c=e.computed(()=>z.value.map((l,u)=>{const o=C(l.open,u),a=C(l.high,u),v=C(l.low,u),$=C(l.last,u),_=l.last>l.open;return{period:l.period,open:o,high:a,low:v,last:$,volume:l.volume,isBullish:_}}));function ie(l){return i.checkNaN(l/g.value.max)}const se=e.computed(()=>g.value.ticks.map(l=>({y:s.value.bottom-s.value.height*ie(l),value:i.checkNaN(l)}))),ne=e.computed(()=>z.value.map(l=>l.period)),T=e.ref(null);function re(l,u){V.value=l,T.value={datapoint:u,seriesIndex:l,series:c.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(i.isFunction(o)&&i.functionReturnsString(()=>o({seriesIndex:l,datapoint:u,series:c.value,config:t.value})))S.value=o({seriesIndex:l,datapoint:u,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:$,high:_,low:J,last:K,volume:Q,isBullish:Z}=c.value[l],{period:ot,open:ve,high:ye,low:he,last:pe,volume:fe}=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?Z?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:Z?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${fe} : <b>${isNaN(Q)?"-":Number(Q.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>${ve}: <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>${ye}: <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>${he}: <b>${t.value.style.tooltip.prefix} ${isNaN(J.value)?"-":Number(J.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${pe}: <b>${t.value.style.tooltip.prefix} ${isNaN(K.value)?"-":Number(K.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",S.value=`<div style="text-align:right">${a}</div>`}B.value=!0}function de(){d.value={start:0,end:E.value},b.value+=1}function j(){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],u=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(u),a=i.createCsvContent(o);i.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()}`]),u={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:u,colNames:o}}),x=e.ref(!1);function ce(l){x.value=l,F.value+=1}function X(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return oe({generatePdf:q,generateCsv:j,generateImage:W,toggleTable:X,toggleTooltip:Y}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:k,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;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${y.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(te.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${F.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(D),isPrinting:e.unref(U),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:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(W),onToggleTable:X,onToggleTooltip:Y},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]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[c.value.length>0?(e.openBlock(),e.createElementBlock("g",_e,[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,Se),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,Ee)],8,Be),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,Te),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ae)],8,ze)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Le,[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,Re),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,Pe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.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: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,Oe)):e.createCommentVNode("",!0),o.value>=g.value.min&&o.value<=g.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+r.value.yAxisFontSize/3,"font-size":r.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(i.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,Me)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+n.value*a+n.value/2}, ${s.value.bottom+r.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":r.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,De)]))),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,qe),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?n.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ge),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?n.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,He)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?n.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"?n.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,Xe),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?n.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"?n.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,Ye)])):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-n.value/2+n.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:n.value*t.value.style.layout.candle.widthRatio<=0?1e-4:n.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,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-n.value/2+n.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:n.value*t.value.style.layout.candle.widthRatio<=0?1e-4:n.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,Ke))),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:s.value.left+a*n.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:n.value<=0?1e-4:n.value,fill:V.value===a?`${t.value.style.layout.selector.color}${e.unref(i.opacity)[t.value.style.layout.selector.opacity]}`:"transparent",onMouseover:v=>re(a,o),onMouseleave:u[0]||(u[0]=v=>{V.value=void 0,B.value=!1})},null,40,Qe))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&m.value?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartSlicer",ref:R},[(e.openBlock(),e.createBlock(be.Slicer,{key:`slicer_${b.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:E.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":u[1]||(u[1]=o=>d.value.start=o),end:d.value.end,"onUpdate:end":u[2]||(u[2]=o=>d.value.end=o),onReset:de},{"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:L},[e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0)],512),e.createVNode(me._sfc_main,{show:p.value.showTooltip&&B.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:k.value,content:S.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({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),m.value?(e.openBlock(),e.createBlock(we.default,{key:6,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(ke.DataTable,{key:`table_${P.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:u[3]||(u[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,et)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},lt=Ce._export_sfc(tt,[["__scopeId","data-v-ac51f136"]]);exports.default=lt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BTgtr0F8.cjs"),ae=require("./useNestedProp-CisbRRo_.cjs"),j=require("./usePrinter-DzTaA1eh.cjs"),ne=require("./vue-ui-skeleton-CMQzFTs9.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],ie=["height"],ue=["data-cell","height"],se={__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:R,generatePdf:J,generateImage:O}=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),C=e.ref(0),B=e.ref(0),$=e.ref(!1),k=e.ref(null),v=e.ref(null),T=e.ref(0);function S(){k.value&&(v.value={elements:k.value.getElementsByTagName("tr"),heights:Array.from(k.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(S);const K=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+C.value+B.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+C.value+B.value),w=e.ref(0),x=e.ref(null),f=e.ref(0),m=e.ref(!1),L=e.ref(0);e.onMounted(()=>{b.value&&(C.value=b.value.getBoundingClientRect().height),y.value&&(B.value=y.value.getBoundingClientRect().height),s.value.showAnimation&&v.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(k.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(){!x.value&&!m.value&&(x.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+=v.value.heights[T.value],(Z()||T.value>=v.value.heights.length)&&(w.value=0,T.value=-1),T.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),f.value=o),x.value=requestAnimationFrame(q)}function c(){m.value=!0,cancelAnimationFrame(x.value),x.value=null}e.onBeforeUnmount(c);function h(){!m.value||!s.value.showAnimation||(m.value=!1,f.value=0,M())}function ee(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function te(){c(),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,c())});const oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{$.value=a.contentRect.width<oe.value}),C.value=b.value?b.value.getBoundingClientRect().height:0,B.value=y.value?y.value.getBoundingClientRect().height:0,T.value=0,e.nextTick(()=>{c(),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():c()}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:c,resumeAnimation:h,toggleAnimation:D,generateCsv:G,generatePdf:U,generateImage:O}),(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(R)?"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":$.value,"is-playing":!m.value}),onMouseenter: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:$.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:`${C.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:$.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:k,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:t.value.tbody.tr.td.style.backgroundColor+e.unref(u.opacity)[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(R),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,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:U,onGenerateCsv:G,onGenerateImage:e.unref(O),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","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},de=le._export_sfc(se,[["__scopeId","data-v-24996b52"]]);exports.default=de;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as o, onMounted as F, computed as B, onBeforeUnmount as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
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 E, normalizeStyle as d, unref as C, normalizeClass as Ae, createTextVNode as G, toDisplayString as M, renderSlot as p, Fragment as q, renderList as D, normalizeProps as X, guardReactiveProps as j, createCommentVNode as N, createBlock as ve, createSlots as xe, withCtx as O } from "vue";
|
|
2
|
+
import { u as ke, c as we, o as J, e as K, w as Ie, q as Fe, r as Be } from "./index-CaV1s-yZ.js";
|
|
3
|
+
import { u as Oe } from "./useNestedProp-tWCzZrLx.js";
|
|
4
|
+
import { u as Pe, U as Re } from "./usePrinter-rvJyT65A.js";
|
|
5
|
+
import ze from "./vue-ui-skeleton-CvFX_ExX.js";
|
|
6
|
+
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const Ne = ["id"], Se = ["height"], He = ["data-cell", "height"], Le = {
|
|
8
8
|
__name: "vue-ui-carousel-table",
|
|
9
9
|
props: {
|
|
10
10
|
config: {
|
|
@@ -20,156 +20,173 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const l =
|
|
23
|
+
setup(g, { expose: ce }) {
|
|
24
|
+
const l = g, { vue_ui_carousel_table: pe } = ke(), S = o(we()), Q = o(!1), $ = o(!!l.dataset);
|
|
25
25
|
F(() => {
|
|
26
|
-
|
|
26
|
+
W();
|
|
27
|
+
});
|
|
28
|
+
function W() {
|
|
29
|
+
J(l.dataset) ? K({
|
|
27
30
|
componentName: "VueUiCarouselTable",
|
|
28
31
|
type: "dataset"
|
|
29
|
-
}) : ((!l.dataset.head ||
|
|
32
|
+
}) : ((!l.dataset.head || J(l.dataset.head)) && (K({
|
|
30
33
|
componentName: "VueUiCarouselTable",
|
|
31
34
|
type: "datasetAttribute",
|
|
32
35
|
property: "head"
|
|
33
|
-
}),
|
|
36
|
+
}), $.value = !1), (!l.dataset.body || J(l.dataset.body)) && (K({
|
|
34
37
|
componentName: "VueUiCarouselTable",
|
|
35
38
|
type: "datasetAttribute",
|
|
36
39
|
property: "body"
|
|
37
|
-
}),
|
|
40
|
+
}), $.value = !1));
|
|
41
|
+
}
|
|
42
|
+
const e = B({
|
|
43
|
+
get: () => Y(),
|
|
44
|
+
set: (t) => t
|
|
38
45
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
function Y() {
|
|
47
|
+
return Oe({
|
|
48
|
+
userConfig: l.config,
|
|
49
|
+
defaultConfig: pe
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
V(() => l.config, (t) => {
|
|
53
|
+
e.value = Y(), W();
|
|
54
|
+
}, { deep: !0 }), V(() => l.dataset, (t) => {
|
|
55
|
+
H();
|
|
56
|
+
}, { deep: !0 });
|
|
57
|
+
const { isPrinting: Z, isImaging: _, generatePdf: he, generateImage: ee } = Pe({
|
|
58
|
+
elementId: `carousel-table_${S.value}`,
|
|
44
59
|
fileName: e.value.caption.text || "vue-ui-carousel-table"
|
|
45
60
|
}), v = o({
|
|
46
61
|
showAnimation: e.value.animation.use
|
|
47
|
-
}),
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
elements:
|
|
51
|
-
heights: Array.from(
|
|
62
|
+
}), u = o(null), te = o(null), T = o(null), A = o(null), x = o(0), P = o(0), R = o(!1), k = o(null), h = o(null), w = o(0);
|
|
63
|
+
function H() {
|
|
64
|
+
k.value && (h.value = {
|
|
65
|
+
elements: k.value.getElementsByTagName("tr"),
|
|
66
|
+
heights: Array.from(k.value.getElementsByTagName("tr")).map((t) => t.getBoundingClientRect().height)
|
|
52
67
|
});
|
|
53
68
|
}
|
|
54
|
-
F(
|
|
55
|
-
const
|
|
69
|
+
F(H);
|
|
70
|
+
const fe = B(() => !h.value || !h.value.heights.length ? 0 : Math.max(...h.value.heights) + x.value + P.value), ge = B(() => l.dataset.body ? e.value.tbody.tr.visible <= l.dataset.body.length ? e.value.tbody.tr.visible : l.dataset.body.length : 0), me = B(() => (e.value.tbody.tr.height + e.value.tbody.tr.td.padding.top + e.value.tbody.tr.td.padding.bottom + e.value.tbody.tr.border.size * 2) * ge.value + x.value + P.value), z = o(0), I = o(null), m = o(0), b = o(!1), ae = o(0);
|
|
56
71
|
F(() => {
|
|
57
|
-
|
|
72
|
+
T.value && (x.value = T.value.getBoundingClientRect().height), A.value && (P.value = A.value.getBoundingClientRect().height), v.value.showAnimation && h.value && oe();
|
|
58
73
|
}), F(() => {
|
|
59
|
-
if (
|
|
74
|
+
if (u.value) {
|
|
60
75
|
let a = function() {
|
|
61
76
|
const i = t.getBoundingClientRect().bottom;
|
|
62
77
|
n.forEach((c) => {
|
|
63
78
|
c.getBoundingClientRect().top < i ? c.style.visibility = "hidden" : c.style.visibility = "visible";
|
|
64
79
|
});
|
|
65
80
|
};
|
|
66
|
-
const t =
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
const t = u.value.querySelector("thead"), n = Array.from(k.value.querySelectorAll("tr"));
|
|
82
|
+
u.value.addEventListener("scroll", a), a(), re(() => {
|
|
83
|
+
u.value.removeEventListener("scroll", a);
|
|
69
84
|
});
|
|
70
85
|
}
|
|
71
86
|
});
|
|
72
|
-
function
|
|
73
|
-
|
|
87
|
+
function be(t) {
|
|
88
|
+
Q.value = t, ae.value += 1;
|
|
74
89
|
}
|
|
75
|
-
function
|
|
76
|
-
!
|
|
90
|
+
function oe() {
|
|
91
|
+
!I.value && !b.value && (I.value = requestAnimationFrame(ne));
|
|
77
92
|
}
|
|
78
|
-
function
|
|
79
|
-
if (!
|
|
80
|
-
const { scrollTop: t, scrollHeight: n, clientHeight: a } =
|
|
93
|
+
function ye() {
|
|
94
|
+
if (!u.value) return !1;
|
|
95
|
+
const { scrollTop: t, scrollHeight: n, clientHeight: a } = u.value;
|
|
81
96
|
return t + a >= n;
|
|
82
97
|
}
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
top:
|
|
98
|
+
function ne(t) {
|
|
99
|
+
if (b.value) return;
|
|
100
|
+
m.value || (m.value = t), t - m.value >= e.value.animation.speedMs && (z.value += h.value.heights[w.value], (ye() || w.value >= h.value.heights.length) && (z.value = 0, w.value = -1), w.value += 1, u.value && u.value.scrollTo({
|
|
101
|
+
top: z.value,
|
|
87
102
|
behavior: "smooth"
|
|
88
|
-
}),
|
|
103
|
+
}), m.value = t), I.value = requestAnimationFrame(ne);
|
|
89
104
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
105
|
+
function f() {
|
|
106
|
+
b.value = !0, cancelAnimationFrame(I.value), I.value = null;
|
|
92
107
|
}
|
|
93
|
-
|
|
94
|
-
function
|
|
95
|
-
!
|
|
108
|
+
re(f);
|
|
109
|
+
function y() {
|
|
110
|
+
!b.value || !v.value.showAnimation || (b.value = !1, m.value = 0, oe());
|
|
96
111
|
}
|
|
97
|
-
function
|
|
98
|
-
e.value.animation.pauseOnHover &&
|
|
112
|
+
function Ce() {
|
|
113
|
+
e.value.animation.pauseOnHover && f();
|
|
99
114
|
}
|
|
100
|
-
const
|
|
101
|
-
function
|
|
102
|
-
|
|
115
|
+
const L = o(null);
|
|
116
|
+
function $e() {
|
|
117
|
+
f(), clearTimeout(L.value);
|
|
103
118
|
}
|
|
104
|
-
function
|
|
105
|
-
clearTimeout(
|
|
119
|
+
function le() {
|
|
120
|
+
clearTimeout(L.value), L.value = setTimeout(y, 1e3);
|
|
106
121
|
}
|
|
107
|
-
|
|
122
|
+
V(
|
|
108
123
|
() => e.value.animation.use,
|
|
109
124
|
(t) => {
|
|
110
|
-
t ? (v.value.showAnimation = !0,
|
|
125
|
+
t ? (v.value.showAnimation = !0, y()) : (v.value.showAnimation = !1, f());
|
|
111
126
|
}
|
|
112
127
|
);
|
|
113
|
-
const
|
|
128
|
+
const Te = B(() => e.value.responsiveBreakpoint);
|
|
114
129
|
F(() => {
|
|
115
130
|
const t = new ResizeObserver((n) => {
|
|
116
131
|
n.forEach((a) => {
|
|
117
|
-
R.value = a.contentRect.width <
|
|
118
|
-
}),
|
|
132
|
+
R.value = a.contentRect.width < Te.value;
|
|
133
|
+
}), x.value = T.value ? T.value.getBoundingClientRect().height : 0, P.value = A.value ? A.value.getBoundingClientRect().height : 0, w.value = 0, de(() => {
|
|
134
|
+
f(), m.value = 0, z.value = 0, H(), y();
|
|
135
|
+
});
|
|
119
136
|
});
|
|
120
|
-
|
|
137
|
+
u.value && t.observe(u.value);
|
|
121
138
|
});
|
|
122
|
-
function
|
|
123
|
-
|
|
139
|
+
function ie() {
|
|
140
|
+
he();
|
|
124
141
|
}
|
|
125
|
-
function
|
|
126
|
-
v.value.showAnimation = !v.value.showAnimation, v.value.showAnimation ?
|
|
142
|
+
function ue() {
|
|
143
|
+
v.value.showAnimation = !v.value.showAnimation, v.value.showAnimation ? y() : f();
|
|
127
144
|
}
|
|
128
|
-
function
|
|
129
|
-
|
|
145
|
+
function se() {
|
|
146
|
+
de(() => {
|
|
130
147
|
const t = l.dataset.head.map((i, c) => [
|
|
131
148
|
[l.dataset.body[c]]
|
|
132
149
|
]), n = [
|
|
133
150
|
[e.value.caption.text],
|
|
134
151
|
[l.dataset.head.map((i) => [i])]
|
|
135
|
-
].concat(t), a =
|
|
136
|
-
|
|
152
|
+
].concat(t), a = Fe(n);
|
|
153
|
+
Be({
|
|
137
154
|
csvContent: a,
|
|
138
155
|
title: e.value.caption.text || "vue-ui-carousel-table"
|
|
139
156
|
});
|
|
140
157
|
});
|
|
141
158
|
}
|
|
142
|
-
return
|
|
143
|
-
pauseAnimation:
|
|
144
|
-
resumeAnimation:
|
|
145
|
-
toggleAnimation:
|
|
146
|
-
generateCsv:
|
|
147
|
-
generatePdf:
|
|
148
|
-
generateImage:
|
|
149
|
-
}), (t, n) => (
|
|
159
|
+
return ce({
|
|
160
|
+
pauseAnimation: f,
|
|
161
|
+
resumeAnimation: y,
|
|
162
|
+
toggleAnimation: ue,
|
|
163
|
+
generateCsv: se,
|
|
164
|
+
generatePdf: ie,
|
|
165
|
+
generateImage: ee
|
|
166
|
+
}), (t, n) => (s(), r("div", {
|
|
150
167
|
style: { position: "relative", overflow: "visible" },
|
|
151
168
|
ref_key: "chartContainer",
|
|
152
|
-
ref:
|
|
169
|
+
ref: te
|
|
153
170
|
}, [
|
|
154
|
-
|
|
171
|
+
E("div", {
|
|
155
172
|
ref_key: "tableContainer",
|
|
156
|
-
ref:
|
|
157
|
-
id: `carousel-table_${
|
|
173
|
+
ref: u,
|
|
174
|
+
id: `carousel-table_${S.value}`,
|
|
158
175
|
style: d({
|
|
159
|
-
height:
|
|
176
|
+
height: C(Z) || C(_) ? "auto" : `${Math.max(me.value, fe.value)}px`,
|
|
160
177
|
containerType: "inline-size",
|
|
161
178
|
position: "relative",
|
|
162
179
|
overflow: "auto",
|
|
163
180
|
fontFamily: e.value.fontFamily
|
|
164
181
|
}),
|
|
165
|
-
class:
|
|
166
|
-
onMouseenter: n[0] || (n[0] = (a) =>
|
|
167
|
-
onMouseleave: n[1] || (n[1] = (a) =>
|
|
168
|
-
onTouchstart: n[2] || (n[2] = (a) =>
|
|
169
|
-
onTouchend: n[3] || (n[3] = (a) =>
|
|
170
|
-
onTouchcancel: n[4] || (n[4] = (a) =>
|
|
182
|
+
class: Ae({ "vue-ui-responsive": R.value, "is-playing": !b.value }),
|
|
183
|
+
onMouseenter: n[0] || (n[0] = (a) => Ce()),
|
|
184
|
+
onMouseleave: n[1] || (n[1] = (a) => y()),
|
|
185
|
+
onTouchstart: n[2] || (n[2] = (a) => $e()),
|
|
186
|
+
onTouchend: n[3] || (n[3] = (a) => le()),
|
|
187
|
+
onTouchcancel: n[4] || (n[4] = (a) => le())
|
|
171
188
|
}, [
|
|
172
|
-
|
|
189
|
+
$.value ? (s(), r("table", {
|
|
173
190
|
key: 0,
|
|
174
191
|
class: "vue-data-ui-carousel-table",
|
|
175
192
|
style: d({
|
|
@@ -179,9 +196,9 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
179
196
|
borderCollapse: "collapse"
|
|
180
197
|
})
|
|
181
198
|
}, [
|
|
182
|
-
|
|
199
|
+
E("caption", {
|
|
183
200
|
ref_key: "caption",
|
|
184
|
-
ref:
|
|
201
|
+
ref: T,
|
|
185
202
|
class: "vue-data-ui-carousel-table-caption",
|
|
186
203
|
style: d({
|
|
187
204
|
...e.value.caption.style,
|
|
@@ -197,15 +214,15 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
197
214
|
minHeight: "36px"
|
|
198
215
|
})
|
|
199
216
|
}, [
|
|
200
|
-
|
|
217
|
+
G(M(e.value.caption.text && !t.$slots.caption ? e.value.caption.text : "") + " ", 1),
|
|
201
218
|
p(t.$slots, "caption", {}, void 0, !0)
|
|
202
219
|
], 4),
|
|
203
|
-
|
|
204
|
-
style: d({ ...e.value.thead.style, position: "sticky", top: `${
|
|
220
|
+
E("thead", {
|
|
221
|
+
style: d({ ...e.value.thead.style, position: "sticky", top: `${x.value}px`, zIndex: 1 })
|
|
205
222
|
}, [
|
|
206
|
-
|
|
223
|
+
E("tr", {
|
|
207
224
|
ref_key: "tableRow",
|
|
208
|
-
ref:
|
|
225
|
+
ref: A,
|
|
209
226
|
role: "row",
|
|
210
227
|
style: d({
|
|
211
228
|
...e.value.thead.tr.style,
|
|
@@ -214,7 +231,7 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
214
231
|
}),
|
|
215
232
|
height: `${e.value.thead.tr.height}px`
|
|
216
233
|
}, [
|
|
217
|
-
(
|
|
234
|
+
(s(!0), r(q, null, D(g.dataset.head, (a, i) => (s(), r("th", {
|
|
218
235
|
role: "cell",
|
|
219
236
|
key: `th_${i}`,
|
|
220
237
|
style: d({
|
|
@@ -226,33 +243,33 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
226
243
|
paddingLeft: e.value.thead.tr.th.padding.left + "px"
|
|
227
244
|
})
|
|
228
245
|
}, [
|
|
229
|
-
|
|
230
|
-
p(t.$slots, "th",
|
|
246
|
+
G(M(t.$slots.th ? "" : a) + " ", 1),
|
|
247
|
+
p(t.$slots, "th", X(j({ th: a, colIndex: i })), void 0, !0)
|
|
231
248
|
], 4))), 128))
|
|
232
|
-
], 12,
|
|
249
|
+
], 12, Se)
|
|
233
250
|
], 4),
|
|
234
|
-
|
|
251
|
+
g.dataset.body && g.dataset.head ? (s(), r("tbody", {
|
|
235
252
|
key: 0,
|
|
236
253
|
ref_key: "tbody",
|
|
237
|
-
ref:
|
|
254
|
+
ref: k,
|
|
238
255
|
style: d({
|
|
239
256
|
clipPath: "inset(0,0,0,0)"
|
|
240
257
|
})
|
|
241
258
|
}, [
|
|
242
|
-
(
|
|
259
|
+
(s(!0), r(q, null, D(g.dataset.body, (a, i) => (s(), r("tr", {
|
|
243
260
|
style: d({
|
|
244
261
|
...e.value.tbody.tr.style,
|
|
245
262
|
border: `${e.value.tbody.tr.border.size}px solid ${e.value.tbody.tr.border.color}`,
|
|
246
263
|
verticalAlign: "middle"
|
|
247
264
|
})
|
|
248
265
|
}, [
|
|
249
|
-
(
|
|
266
|
+
(s(!0), r(q, null, D(a, (c, U) => (s(), r("td", {
|
|
250
267
|
role: "cell",
|
|
251
|
-
"data-cell":
|
|
268
|
+
"data-cell": g.dataset.head[U] || "",
|
|
252
269
|
style: d({
|
|
253
270
|
...e.value.tbody.tr.td.style,
|
|
254
271
|
border: `${e.value.tbody.tr.td.border.size}px solid ${e.value.tbody.tr.td.border.color}`,
|
|
255
|
-
backgroundColor: e.value.tbody.tr.td.style.backgroundColor +
|
|
272
|
+
backgroundColor: e.value.tbody.tr.td.style.backgroundColor + C(Ie)[i % 2 === 0 && e.value.tbody.tr.td.alternateColor ? e.value.tbody.tr.td.alternateOpacity * 100 : 100],
|
|
256
273
|
paddingTop: e.value.tbody.tr.td.padding.top + "px",
|
|
257
274
|
paddingRight: e.value.tbody.tr.td.padding.right + "px",
|
|
258
275
|
paddingBottom: e.value.tbody.tr.td.padding.bottom + "px",
|
|
@@ -261,27 +278,27 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
261
278
|
}),
|
|
262
279
|
height: `${e.value.tbody.tr.height}px`
|
|
263
280
|
}, [
|
|
264
|
-
|
|
265
|
-
p(t.$slots, "td",
|
|
266
|
-
], 12,
|
|
281
|
+
G(M(t.$slots.td ? "" : c) + " ", 1),
|
|
282
|
+
p(t.$slots, "td", X(j({ td: c, rowIndex: i, colIndex: U })), void 0, !0)
|
|
283
|
+
], 12, He))), 256))
|
|
267
284
|
], 4))), 256))
|
|
268
|
-
], 4)) :
|
|
269
|
-
], 4)) :
|
|
270
|
-
], 46,
|
|
271
|
-
|
|
285
|
+
], 4)) : N("", !0)
|
|
286
|
+
], 4)) : N("", !0)
|
|
287
|
+
], 46, Ne),
|
|
288
|
+
$.value ? N("", !0) : (s(), ve(ze, {
|
|
272
289
|
key: 0,
|
|
273
290
|
config: {
|
|
274
291
|
type: "table"
|
|
275
292
|
}
|
|
276
293
|
})),
|
|
277
|
-
e.value.userOptions.show &&
|
|
294
|
+
e.value.userOptions.show && $.value ? (s(), ve(Re, {
|
|
278
295
|
ref: "details",
|
|
279
|
-
key: `user_option_${
|
|
296
|
+
key: `user_option_${ae.value}`,
|
|
280
297
|
backgroundColor: e.value.style.backgroundColor,
|
|
281
298
|
color: e.value.style.color,
|
|
282
|
-
isPrinting:
|
|
283
|
-
isImaging:
|
|
284
|
-
uid:
|
|
299
|
+
isPrinting: C(Z),
|
|
300
|
+
isImaging: C(_),
|
|
301
|
+
uid: S.value,
|
|
285
302
|
hasTooltip: !1,
|
|
286
303
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
287
304
|
hasImg: e.value.userOptions.buttons.img,
|
|
@@ -291,17 +308,17 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
291
308
|
hasAnimation: e.value.userOptions.buttons.animation,
|
|
292
309
|
isAnimation: !v.value.showAnimation,
|
|
293
310
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
294
|
-
isFullscreen:
|
|
295
|
-
chartElement:
|
|
311
|
+
isFullscreen: Q.value,
|
|
312
|
+
chartElement: te.value,
|
|
296
313
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
297
314
|
zIndex: 3,
|
|
298
315
|
noOffset: "",
|
|
299
|
-
onGeneratePdf:
|
|
300
|
-
onGenerateCsv:
|
|
301
|
-
onGenerateImage:
|
|
302
|
-
onToggleAnimation:
|
|
303
|
-
onToggleFullscreen:
|
|
304
|
-
},
|
|
316
|
+
onGeneratePdf: ie,
|
|
317
|
+
onGenerateCsv: se,
|
|
318
|
+
onGenerateImage: C(ee),
|
|
319
|
+
onToggleAnimation: ue,
|
|
320
|
+
onToggleFullscreen: be
|
|
321
|
+
}, xe({ _: 2 }, [
|
|
305
322
|
t.$slots.optionPdf ? {
|
|
306
323
|
name: "optionPdf",
|
|
307
324
|
fn: O(() => [
|
|
@@ -333,14 +350,14 @@ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
|
|
|
333
350
|
t.$slots.optionFullscreen ? {
|
|
334
351
|
name: "optionFullscreen",
|
|
335
352
|
fn: O(({ toggleFullscreen: a, isFullscreen: i }) => [
|
|
336
|
-
p(t.$slots, "optionFullscreen",
|
|
353
|
+
p(t.$slots, "optionFullscreen", X(j({ toggleFullscreen: a, isFullscreen: i })), void 0, !0)
|
|
337
354
|
]),
|
|
338
355
|
key: "4"
|
|
339
356
|
} : void 0
|
|
340
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasAnimation", "isAnimation", "hasFullscreen", "isFullscreen", "chartElement", "titles", "onGenerateImage"])) :
|
|
357
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasAnimation", "isAnimation", "hasFullscreen", "isFullscreen", "chartElement", "titles", "onGenerateImage"])) : N("", !0)
|
|
341
358
|
], 512));
|
|
342
359
|
}
|
|
343
|
-
},
|
|
360
|
+
}, Xe = /* @__PURE__ */ Ee(Le, [["__scopeId", "data-v-24996b52"]]);
|
|
344
361
|
export {
|
|
345
|
-
|
|
362
|
+
Xe as default
|
|
346
363
|
};
|