vue-data-ui 2.10.8 → 2.10.10
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-NnfTvwbg.cjs → Arrow-CjydbHaJ.cjs} +1 -1
- package/dist/{Arrow-aCcBx0NS.js → Arrow-CkVAj2ex.js} +1 -1
- package/dist/{BaseIcon-DTt4YbQE.js → BaseIcon-CeAuvfV6.js} +1 -1
- package/dist/{BaseIcon-DmfPEj6j.cjs → BaseIcon-DvVvIgek.cjs} +1 -1
- package/dist/{ColorPicker-DsEujcIN.cjs → ColorPicker-Bc4l4E7Z.cjs} +1 -1
- package/dist/{ColorPicker-DrovFYIL.js → ColorPicker-DcVKrz_V.js} +3 -3
- package/dist/{DataTable-zSU-0X__.cjs → DataTable-CJVWuZQ7.cjs} +1 -1
- package/dist/{DataTable-CX-Ynkp4.js → DataTable-Dz3uePkM.js} +2 -2
- package/dist/{Legend-DFQ4iWI3.cjs → Legend-BVXdf95S.cjs} +1 -1
- package/dist/{Legend-BTvPguV6.js → Legend-DRjI7VTS.js} +2 -2
- package/dist/{PackageVersion-CkUbRQrt.js → PackageVersion-BNm7stW7.js} +1 -1
- package/dist/PackageVersion-NIHFWeLx.cjs +1 -0
- package/dist/{PenAndPaper-Br3OdauM.js → PenAndPaper-Ba1SBNDw.js} +3 -3
- package/dist/{PenAndPaper-CG9o3ymS.cjs → PenAndPaper-dU138eET.cjs} +1 -1
- package/dist/{Shape-D9l3WJGO.cjs → Shape-CwHZ-sW6.cjs} +1 -1
- package/dist/{Shape-Y1FgLdPz.js → Shape-DqWzVzjZ.js} +1 -1
- package/dist/{Slicer-C2GR76As.js → Slicer-9CXQSz7y.js} +2 -2
- package/dist/{Slicer-B7FJCuCB.cjs → Slicer-DLFjRDKI.cjs} +1 -1
- package/dist/{Title-CEZO2hzQ.cjs → Title-CcJuov8a.cjs} +1 -1
- package/dist/{Title-tlFeM12I.js → Title-CiymPFBZ.js} +1 -1
- package/dist/{Tooltip-BCtHh3BT.js → Tooltip-BXojuEca.js} +1 -1
- package/dist/{Tooltip-BZa-QzER.cjs → Tooltip-DolT-Egr.cjs} +1 -1
- package/dist/{dom-to-png-fAhFmKHV.cjs → dom-to-png-BACUnvWN.cjs} +1 -1
- package/dist/{dom-to-png-CjxHTZgX.js → dom-to-png-BbzDwc8c.js} +1 -1
- package/dist/{img-Ds_hWTTu.cjs → img-BCxvOZEr.cjs} +1 -1
- package/dist/{img-w_iFTYRY.js → img-O1YZMZE1.js} +1 -1
- package/dist/{index-Dy2-pNb6.cjs → index-CFHk7XOI.cjs} +1 -1
- package/dist/{index-Co5UfCMK.js → index-DvXHhwi7.js} +1 -1
- package/dist/{pdf-CCdcXY_7.cjs → pdf-Bq_WJR-q.cjs} +1 -1
- package/dist/{pdf-BfkOvZWw.js → pdf-CG4EnFNu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-C22WP03t.js → useNestedProp-Bw2_FZ80.js} +1 -1
- package/dist/{useNestedProp-DQ8Jt3-Y.cjs → useNestedProp-dCmM2zfv.cjs} +1 -1
- package/dist/{usePrinter-BQEYwy4a.cjs → usePrinter-Cr-rXufG.cjs} +1 -1
- package/dist/{usePrinter-D_wgo-7k.js → usePrinter-D0Njbrwg.js} +3 -3
- package/dist/{vue-data-ui-zmg06AF1.cjs → vue-data-ui-BXsbflWH.cjs} +1 -1
- package/dist/{vue-data-ui-C18HDIa2.js → vue-data-ui-ukeuQLYG.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C_gJuhTV.cjs → vue-ui-3d-bar-C3-VA6Iq.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-SB6p5amV.js → vue-ui-3d-bar-CaoKpu9l.js} +9 -9
- package/dist/{vue-ui-accordion-dVGUWjXH.cjs → vue-ui-accordion-BvbhG2QO.cjs} +1 -1
- package/dist/{vue-ui-accordion-CfB_jW1X.js → vue-ui-accordion-rd6DBLB5.js} +3 -3
- package/dist/{vue-ui-age-pyramid-G8ggvkGU.js → vue-ui-age-pyramid-Cjr5nyxr.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DZ_ajGY_.cjs → vue-ui-age-pyramid-Cle-IO4l.cjs} +1 -1
- package/dist/{vue-ui-annotator-DeoWv4A3.js → vue-ui-annotator-DxegikPh.js} +2 -2
- package/dist/{vue-ui-annotator-BkZat_7T.cjs → vue-ui-annotator-Rvcr7Sf7.cjs} +1 -1
- package/dist/{vue-ui-bullet-D9jaszdm.cjs → vue-ui-bullet-BLYaTFAz.cjs} +1 -1
- package/dist/{vue-ui-bullet-CvjS0_Pz.js → vue-ui-bullet-CmuRRP70.js} +8 -8
- package/dist/{vue-ui-candlestick-gnsNiFI3.cjs → vue-ui-candlestick-BieBlp2c.cjs} +1 -1
- package/dist/{vue-ui-candlestick-xBYW3oOn.js → vue-ui-candlestick-DmA7Uqy4.js} +11 -11
- package/dist/{vue-ui-carousel-table-DNW8HJNv.cjs → vue-ui-carousel-table-9SZvnl9Q.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BKQIWhzt.js → vue-ui-carousel-table-CP0CJfcG.js} +4 -4
- package/dist/{vue-ui-chestnut-D9UKh8la.cjs → vue-ui-chestnut-CPF5eohd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C5RprHfl.js → vue-ui-chestnut-rna7-x5E.js} +8 -8
- package/dist/{vue-ui-circle-pack-Cx4gGG1K.js → vue-ui-circle-pack-COHe6gAY.js} +9 -9
- package/dist/{vue-ui-circle-pack-OTXbeD89.cjs → vue-ui-circle-pack-CwtKnUdV.cjs} +1 -1
- package/dist/{vue-ui-cursor-BuEDX1kV.cjs → vue-ui-cursor-B0CTU0OJ.cjs} +1 -1
- package/dist/{vue-ui-cursor-Cdvi-0lD.js → vue-ui-cursor-Bnz6m5UN.js} +2 -2
- package/dist/{vue-ui-dashboard-BAPaHtqr.cjs → vue-ui-dashboard-DZUi9h4u.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BLHl6FJI.js → vue-ui-dashboard-DumW8xZp.js} +62 -62
- package/dist/{vue-ui-digits-CCAt8_aJ.js → vue-ui-digits-AvU7LQwA.js} +2 -2
- package/dist/{vue-ui-digits-YV4qxb86.cjs → vue-ui-digits-C9Lc2vf6.cjs} +1 -1
- package/dist/{vue-ui-donut-CNZIha3Z.js → vue-ui-donut-CF8KPH2H.js} +12 -12
- package/dist/{vue-ui-donut-BvjPFjpd.cjs → vue-ui-donut-CFadUVCm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Dxx5Psl4.cjs → vue-ui-donut-evolution-CF3yvm9u.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DNhwy9qU.js → vue-ui-donut-evolution-D_eA5afL.js} +11 -11
- package/dist/{vue-ui-dumbbell-MGMSs7vG.cjs → vue-ui-dumbbell-CWZNqHum.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BmRkAtBK.js → vue-ui-dumbbell-CwvokBZU.js} +10 -10
- package/dist/vue-ui-flow-D8XUyGoY.cjs +3 -0
- package/dist/{vue-ui-flow-CxhJwDZa.js → vue-ui-flow-DH4I9526.js} +274 -273
- package/dist/{vue-ui-funnel-CJHKcUDg.js → vue-ui-funnel-BYQyM9Qy.js} +9 -9
- package/dist/{vue-ui-funnel-twMmn36_.cjs → vue-ui-funnel-Cj0ZTNhc.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BjBTNZ6j.cjs → vue-ui-galaxy-BviAjFrA.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CDonLoXv.js → vue-ui-galaxy-CKXBzmN1.js} +11 -11
- package/dist/{vue-ui-gauge-DXadxMZn.cjs → vue-ui-gauge-Cy31bXmf.cjs} +1 -1
- package/dist/{vue-ui-gauge-C7L0uVvx.js → vue-ui-gauge-DG6gMQYv.js} +7 -7
- package/dist/{vue-ui-gizmo-u7ypeW6n.cjs → vue-ui-gizmo-17lmQTkY.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C9JuTLL-.js → vue-ui-gizmo-DFndi5tZ.js} +3 -3
- package/dist/{vue-ui-heatmap-Cjckqsrg.cjs → vue-ui-heatmap-BqjWfqcB.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DaAgigHH.js → vue-ui-heatmap-D0qsMawE.js} +10 -10
- package/dist/{vue-ui-history-plot-KoGpnC64.js → vue-ui-history-plot-Cekgkdnm.js} +11 -11
- package/dist/{vue-ui-history-plot-YLMX8PqM.cjs → vue-ui-history-plot-Dgfl_nqu.cjs} +1 -1
- package/dist/{vue-ui-kpi-DNUDGlWM.js → vue-ui-kpi-DVJmaGJs.js} +3 -3
- package/dist/{vue-ui-kpi-GZlFX5zg.cjs → vue-ui-kpi-D_1edGUC.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-D1HhmCbC.cjs → vue-ui-mini-loader-Ba-YuHH3.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-9YvdM0_A.js → vue-ui-mini-loader-DeZTsVLO.js} +2 -2
- package/dist/{vue-ui-molecule-B71fJREj.js → vue-ui-molecule-Bl3QO6ap.js} +11 -11
- package/dist/{vue-ui-molecule-DDsKb9re.cjs → vue-ui-molecule-OfRmGbBu.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BO4yaBxo.cjs → vue-ui-mood-radar-C5m5P61q.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DH4RYmdT.js → vue-ui-mood-radar-DMAnLGTo.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BlxuqLPb.cjs → vue-ui-nested-donuts-DfECvthA.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-bOXvQ01U.js → vue-ui-nested-donuts-pcIPwSEN.js} +11 -11
- package/dist/{vue-ui-onion-BugH4ThJ.cjs → vue-ui-onion-BERoTmw5.cjs} +1 -1
- package/dist/{vue-ui-onion-D7VhEicc.js → vue-ui-onion-BJQrXERJ.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DjTMM1Zt.cjs → vue-ui-parallel-coordinate-plot-CcxszfT5.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bc5Yr0Yr.js → vue-ui-parallel-coordinate-plot-V5yjq2qt.js} +12 -12
- package/dist/{vue-ui-quadrant-Dni5Lkhg.cjs → vue-ui-quadrant-BjTSploz.cjs} +1 -1
- package/dist/{vue-ui-quadrant-PrjG5beo.js → vue-ui-quadrant-DmBXoM1K.js} +12 -12
- package/dist/{vue-ui-quick-chart-C46V8Ffa.js → vue-ui-quick-chart-8JQHu8_6.js} +9 -9
- package/dist/{vue-ui-quick-chart-LuGKbIvU.cjs → vue-ui-quick-chart-Vg51F_fv.cjs} +1 -1
- package/dist/{vue-ui-radar-05pd47HM.js → vue-ui-radar-B59hKBs9.js} +12 -12
- package/dist/{vue-ui-radar-j2Vgot8p.cjs → vue-ui-radar-DM6Sp8pR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bl_q3TYs.js → vue-ui-rating-BOpo_dKd.js} +2 -2
- package/dist/{vue-ui-rating-ClxiMhPq.cjs → vue-ui-rating-DoWnn_wH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Bu5eYbEg.js → vue-ui-relation-circle-BNSUjYth.js} +7 -7
- package/dist/{vue-ui-relation-circle-BuoQTWw_.cjs → vue-ui-relation-circle-Dw3E2cQS.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-ESRn_Q1y.cjs → vue-ui-ridgeline-CfgyyLHT.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-D4ot7MF8.js → vue-ui-ridgeline-DNLWxIOo.js} +12 -12
- package/dist/{vue-ui-rings-Dyl5VV9I.js → vue-ui-rings-Dz1eSPrm.js} +12 -12
- package/dist/{vue-ui-rings-D7o_vleu.cjs → vue-ui-rings-waaeEddc.cjs} +1 -1
- package/dist/{vue-ui-scatter-njuULIsD.js → vue-ui-scatter-CBfydDzi.js} +12 -12
- package/dist/{vue-ui-scatter-B31kZz0w.cjs → vue-ui-scatter-D66nsMM5.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BSlYUHZA.js → vue-ui-skeleton-CJ9j8gHc.js} +3 -3
- package/dist/{vue-ui-skeleton-Db7PiDqL.cjs → vue-ui-skeleton-DcQQl9nv.cjs} +1 -1
- package/dist/{vue-ui-smiley-BmNRkSub.js → vue-ui-smiley-B62ZaIXL.js} +2 -2
- package/dist/{vue-ui-smiley-CfdbRWq6.cjs → vue-ui-smiley-CKgBpYEI.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CwtYlUEX.cjs → vue-ui-spark-trend-CcHJtofv.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B0Xvu1YP.js → vue-ui-spark-trend-DS6c__u7.js} +5 -5
- package/dist/{vue-ui-sparkbar-Xy7idkhv.cjs → vue-ui-sparkbar-ZAyG8tz6.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-e2-8wHQH.js → vue-ui-sparkbar-oQceGXzy.js} +4 -4
- package/dist/{vue-ui-sparkgauge-vjcDqzGe.cjs → vue-ui-sparkgauge-DK08SKBD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-_cMBBl3V.js → vue-ui-sparkgauge-Nqea8uqi.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BpD6XxfA.cjs → vue-ui-sparkhistogram-CRXHUkEG.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DUyGQgqZ.js → vue-ui-sparkhistogram-D53Fp0iI.js} +5 -5
- package/dist/{vue-ui-sparkline-D1wfG3Yw.js → vue-ui-sparkline-BGytINYe.js} +4 -4
- package/dist/{vue-ui-sparkline-cPPxz94c.cjs → vue-ui-sparkline-CcN5BzJC.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-iRVpx_xT.cjs → vue-ui-sparkstackbar-BzN70G0w.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BCTx016Z.js → vue-ui-sparkstackbar-j7zxJEwR.js} +5 -5
- package/dist/{vue-ui-stackbar--QKW68d6.js → vue-ui-stackbar-DG1zFQ6I.js} +13 -13
- package/dist/{vue-ui-stackbar-DCotybpB.cjs → vue-ui-stackbar-_Rbe0zcH.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BhLBOV7s.js → vue-ui-strip-plot-BXBF0O7V.js} +11 -11
- package/dist/{vue-ui-strip-plot-CdceC4jP.cjs → vue-ui-strip-plot-DfLu7xBj.cjs} +1 -1
- package/dist/{vue-ui-table-DjDENKmJ.js → vue-ui-table-CQkGKA38.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CZdiE-l3.js → vue-ui-table-heatmap-Be3sBs1v.js} +4 -4
- package/dist/{vue-ui-table-heatmap-gbdWhEG_.cjs → vue-ui-table-heatmap-D6q9ISlX.cjs} +1 -1
- package/dist/{vue-ui-table-Cd9UeZXy.cjs → vue-ui-table-jufn4CSz.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-zGotm14D.js → vue-ui-table-sparkline-BGA_BtKK.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BFQ4DQRu.cjs → vue-ui-table-sparkline-DXn5vFtK.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CRhrvWm0.cjs → vue-ui-thermometer-C2QTnZLg.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DA3KgSw1.js → vue-ui-thermometer-D0ajQG3p.js} +7 -7
- package/dist/{vue-ui-timer-DnXYrfrB.cjs → vue-ui-timer-BUgMA6gQ.cjs} +1 -1
- package/dist/{vue-ui-timer-ult9htF3.js → vue-ui-timer-D8pO4CRs.js} +5 -5
- package/dist/{vue-ui-tiremarks-CRXtVmEM.js → vue-ui-tiremarks-BBeVDMLy.js} +7 -7
- package/dist/{vue-ui-tiremarks-Dht-uT9E.cjs → vue-ui-tiremarks-Cz1hC6e6.cjs} +1 -1
- package/dist/{vue-ui-treemap-pbhS4FfC.cjs → vue-ui-treemap-BNuJbnXL.cjs} +1 -1
- package/dist/{vue-ui-treemap-Ck5tHVnE.js → vue-ui-treemap-DUoEwGF0.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BZjsolLB.cjs → vue-ui-vertical-bar-ASDnRvkD.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-egz76l34.js → vue-ui-vertical-bar-j-ZfufVH.js} +12 -12
- package/dist/{vue-ui-waffle-C7za7d0u.cjs → vue-ui-waffle-CHV-QmJq.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrMkCjJJ.js → vue-ui-waffle-Dev3qUVT.js} +12 -12
- package/dist/{vue-ui-wheel-DIgPyNrB.cjs → vue-ui-wheel-Drcpu-bo.cjs} +1 -1
- package/dist/{vue-ui-wheel-DzMpr4xY.js → vue-ui-wheel-JMze39OW.js} +7 -7
- package/dist/{vue-ui-word-cloud-CNqAz548.cjs → vue-ui-word-cloud-B_8TgWf5.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-TS3az-LK.js → vue-ui-word-cloud-Bywulitd.js} +10 -10
- package/dist/{vue-ui-world-DMdqTY5G.cjs → vue-ui-world-BPpDQcP7.cjs} +1 -1
- package/dist/{vue-ui-world-D3X01xYB.js → vue-ui-world-BSDboMw1.js} +11 -11
- package/dist/{vue-ui-xy-CF87Afh2.cjs → vue-ui-xy-Do294mp4.cjs} +2 -2
- package/dist/{vue-ui-xy-tIBPr8r8.js → vue-ui-xy-_RG7ZoSc.js} +16 -16
- package/dist/{vue-ui-xy-canvas-2IL8lPL4.cjs → vue-ui-xy-canvas-BHznnIA0.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BHeV-3t9.js → vue-ui-xy-canvas-Cs3pXcFe.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-DxR-fKLM.cjs +0 -1
- package/dist/vue-ui-flow-B3t_sNr4.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dy2-pNb6.cjs"),Y=require("./useResponsive-DQmBAoBf.cjs"),ie=require("./Title-CEZO2hzQ.cjs"),J=require("./usePrinter-BQEYwy4a.cjs"),ne=require("./Tooltip-BZa-QzER.cjs"),ue=require("./DataTable-zSU-0X__.cjs"),de=require("./vue-ui-skeleton-Db7PiDqL.cjs"),ce=require("./vue-ui-accordion-dVGUWjXH.cjs"),K=require("./useNestedProp-DQ8Jt3-Y.cjs"),ve=require("./PackageVersion-DxR-fKLM.cjs"),ye=require("./PenAndPaper-CG9o3ymS.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],be=["xmlns","viewBox"],me=["x","y","width","height"],xe=["id"],ke=["stop-color"],we=["stop-color"],Ce=["id"],_e=["stop-color"],Ne=["stop-color"],Se=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Te=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx"],Ae={key:0},$e=["x","y","fill","font-size","font-weight"],Ee=["x","y","fill","font-size","font-weight"],Ve={key:1},ze=["x","y","font-size","fill","font-weight"],Oe={key:2},Pe={key:0},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],De=["x","y","font-size","fill","font-weight"],Me=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","font-size","fill","font-weight"],Ue=["x","y","font-size","fill","font-weight"],Ge=["x","y","width","height","fill","onMouseover"],He={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:Q}){const{vue_ui_age_pyramid:Z}=r.useConfig(),u=T,m=e.computed(()=>!!u.dataset&&u.dataset.length),v=e.ref(r.createUid()),ee=e.ref(null),C=e.ref(!1),_=e.ref(""),x=e.ref(null),B=e.ref(0),g=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:O,keepUserOptionState:P}=he.useUserOptionState({config:t.value}),{svgRef:I}=fe.useChartAccessibility({config:t.value.style.title});function F(){const l=K.useNestedProp({userConfig:u.config,defaultConfig:Z});return l.theme?{...K.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),N.value=!t.value.userOptions.showOnChartHover,D(),V.value+=1,z.value+=1,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.tooltip.show},{deep:!0});const R=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=Y.throttle(()=>{const{width:i,height:o}=Y.useResponsive({chart:g.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});requestAnimationFrame(()=>{d.value.width=i,d.value.height=o})});R.value=new ResizeObserver(l),R.value.observe(g.value.parentNode)}}const{isPrinting:M,isImaging:q,generatePdf:U,generateImage:G}=J.usePrinter({elementId:`vue-ui-age-pyramid_${v.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),le=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=oe(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,X=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(X),x:s.value.left+s.value.width/2+X/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function oe(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),h=e.computed(()=>u.dataset.length),ae=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),f=e.computed(()=>ae.value.map((l,i)=>{const o=s.value.top+s.value.height/h.value*i,a=s.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),S=e.ref(null);function se(l,i){x.value=l,S.value={datapoint:i,seriesIndex:l,series:f.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value})))_.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value});else{let a="";const n=f.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",_.value=`<div>${a}</div>`}C.value=!0}function H(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={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};return{head:l,body:i,config:o,colNames:l}}),p=e.ref(!1);function re(l){p.value=l,B.value+=1}function W(){c.value.showTable=!c.value.showTable}function j(){c.value.showTooltip=!c.value.showTooltip}const w=e.ref(!1);function L(){w.value=!w.value}return Q({generatePdf:U,generateCsv:H,generateImage:G,toggleTable:W,toggleTooltip:j,toggleAnnotator:L}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:g,id:`vue-ui-age-pyramid_${v.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(O)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(P)||e.unref(N))?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(q),isPrinting:e.unref(M),uid:v.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:H,onGenerateImage:e.unref(G),onToggleTable:W,onToggleTooltip:j,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(P)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:a})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:a})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,me)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we)],8,xe),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ne)],8,Ce)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Se),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Te),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Be)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,$e),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ee)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/h.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Oe,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ie),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Re)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,De)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,qe)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Ue)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/h.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/h.value<=0?1e-4:s.value.height/h.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>se(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,Ge)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:f.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ne._sfc_main,{show:c.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:_.value,isFullscreen:p.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({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:c.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(ue.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ge))}},je=pe._export_sfc(We,[["__scopeId","data-v-beb1c78c"]]);exports.default=je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CFHk7XOI.cjs"),Y=require("./useResponsive-DQmBAoBf.cjs"),ie=require("./Title-CcJuov8a.cjs"),J=require("./usePrinter-Cr-rXufG.cjs"),ne=require("./Tooltip-DolT-Egr.cjs"),ue=require("./DataTable-CJVWuZQ7.cjs"),de=require("./vue-ui-skeleton-DcQQl9nv.cjs"),ce=require("./vue-ui-accordion-BvbhG2QO.cjs"),K=require("./useNestedProp-dCmM2zfv.cjs"),ve=require("./PackageVersion-NIHFWeLx.cjs"),ye=require("./PenAndPaper-dU138eET.cjs"),he=require("./useUserOptionState-BgepsfED.cjs"),fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],be=["xmlns","viewBox"],me=["x","y","width","height"],xe=["id"],ke=["stop-color"],we=["stop-color"],Ce=["id"],_e=["stop-color"],Ne=["stop-color"],Se=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Te=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx"],Ae={key:0},$e=["x","y","fill","font-size","font-weight"],Ee=["x","y","fill","font-size","font-weight"],Ve={key:1},ze=["x","y","font-size","fill","font-weight"],Oe={key:2},Pe={key:0},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],De=["x","y","font-size","fill","font-weight"],Me=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","font-size","fill","font-weight"],Ue=["x","y","font-size","fill","font-weight"],Ge=["x","y","width","height","fill","onMouseover"],He={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:Q}){const{vue_ui_age_pyramid:Z}=r.useConfig(),u=T,m=e.computed(()=>!!u.dataset&&u.dataset.length),v=e.ref(r.createUid()),ee=e.ref(null),C=e.ref(!1),_=e.ref(""),x=e.ref(null),B=e.ref(0),g=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:O,keepUserOptionState:P}=he.useUserOptionState({config:t.value}),{svgRef:I}=fe.useChartAccessibility({config:t.value.style.title});function F(){const l=K.useNestedProp({userConfig:u.config,defaultConfig:Z});return l.theme?{...K.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),N.value=!t.value.userOptions.showOnChartHover,D(),V.value+=1,z.value+=1,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.tooltip.show},{deep:!0});const R=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=Y.throttle(()=>{const{width:i,height:o}=Y.useResponsive({chart:g.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});requestAnimationFrame(()=>{d.value.width=i,d.value.height=o})});R.value=new ResizeObserver(l),R.value.observe(g.value.parentNode)}}const{isPrinting:M,isImaging:q,generatePdf:U,generateImage:G}=J.usePrinter({elementId:`vue-ui-age-pyramid_${v.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),le=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),y=e.computed(()=>{const l=oe(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,X=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(X),x:s.value.left+s.value.width/2+X/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function oe(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),h=e.computed(()=>u.dataset.length),ae=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),f=e.computed(()=>ae.value.map((l,i)=>{const o=s.value.top+s.value.height/h.value*i,a=s.value.height/h.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),S=e.ref(null);function se(l,i){x.value=l,S.value={datapoint:i,seriesIndex:l,series:f.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value})))_.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:f.value,config:t.value});else{let a="";const n=f.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",_.value=`<div>${a}</div>`}C.value=!0}function H(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={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};return{head:l,body:i,config:o,colNames:l}}),p=e.ref(!1);function re(l){p.value=l,B.value+=1}function W(){c.value.showTable=!c.value.showTable}function j(){c.value.showTooltip=!c.value.showTooltip}const w=e.ref(!1);function L(){w.value=!w.value}return Q({generatePdf:U,generateCsv:H,generateImage:G,toggleTable:W,toggleTooltip:j,toggleAnnotator:L}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:g,id:`vue-ui-age-pyramid_${v.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(O)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,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:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(P)||e.unref(N))?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(q),isPrinting:e.unref(M),uid:v.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:H,onGenerateImage:e.unref(G),onToggleTable:W,onToggleTooltip:j,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(P)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:a})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:a})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,me)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we)],8,xe),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${v.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ne)],8,Ce)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Se),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${v.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Te),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${v.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Be)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,$e),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ee)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/h.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Oe,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("line",{x1:y.value.right[0].x,x2:y.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ie),e.createElementVNode("line",{x1:y.value.left[0].x,x2:y.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Re)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,De)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,qe)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Ue)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/h.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/h.value<=0?1e-4:s.value.height/h.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>se(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,Ge)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:f.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ne._sfc_main,{show:c.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:_.value,isFullscreen:p.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({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(ce.default,{key:8,hideDetails:"",config:{open:c.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(ue.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ge))}},je=pe._export_sfc(We,[["__scopeId","data-v-beb1c78c"]]);exports.default=je;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as p, A as v, u as w, B as A } from "./index-
|
|
2
|
-
import { d as M } from "./dom-to-png-
|
|
1
|
+
import { z as p, A as v, u as w, B as A } from "./index-DvXHhwi7.js";
|
|
2
|
+
import { d as M } from "./dom-to-png-BbzDwc8c.js";
|
|
3
3
|
import { createElementBlock as d, openBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, createCommentVNode as a, normalizeClass as y, createStaticVNode as F, withDirectives as N, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G } from "vue";
|
|
4
4
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const m = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var I=Object.create;var b=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var f=(e,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of C(o))!x.call(e,l)&&l!==s&&b(e,l,{get:()=>o[l],enumerable:!(n=F(o,l))||n.enumerable});return e};var k=(e,o,s)=>(s=e!=null?I(S(e)):{},f(o||!e||!e.__esModule?b(s,"default",{value:e,enumerable:!0}):s,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-
|
|
1
|
+
"use strict";var I=Object.create;var b=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var f=(e,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of C(o))!x.call(e,l)&&l!==s&&b(e,l,{get:()=>o[l],enumerable:!(n=F(o,l))||n.enumerable});return e};var k=(e,o,s)=>(s=e!=null?I(S(e)):{},f(o||!e||!e.__esModule?b(s,"default",{value:e,enumerable:!0}):s,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-CFHk7XOI.cjs"),g=require("./dom-to-png-BACUnvWN.cjs"),i=require("vue"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const o=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(o)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const o=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
|
|
2
2
|
<defs>
|
|
3
3
|
<marker
|
|
4
4
|
id="${e.id}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CFHk7XOI.cjs"),F=require("./useNestedProp-dCmM2zfv.cjs"),J=require("./Title-CcJuov8a.cjs"),K=require("./Legend-BVXdf95S.cjs"),I=require("./usePrinter-Cr-rXufG.cjs"),Q=require("./PackageVersion-NIHFWeLx.cjs"),Z=require("./PenAndPaper-dU138eET.cjs"),ee=require("./vue-ui-skeleton-DcQQl9nv.cjs"),te=require("./useUserOptionState-BgepsfED.cjs"),ae=require("./useChartAccessibility-Cm7nkzTG.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],oe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},se=["xmlns","viewBox"],ne=["width","height"],ue={key:1},ie=["x","y","height","width","fill","stroke"],ce=["x","y","height","width","rx","fill","stroke","stroke-width"],de=["x","y","height","width","fill","stroke","stroke-width"],he=["x","y","font-size","font-weight","fill"],ve=["x","y","height","width","rx","fill","stroke","stroke-width"],me={key:3},ge=["x","y","fill","font-size","font-weight"],fe={key:4},ye=["x1","x2","y1","y2","stroke"],pe={key:5,class:"vue-data-ui-watermark"},ke={class:"vue-ui-bullet-legend-item",dir:"auto"},be={style:{"margin-right":"2px"}},we={key:7,ref:"source",dir:"auto"},Be={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:H}){const{vue_ui_bullet:T}=s.useConfig(),n=z,w=e.ref(null),q=e.ref(null),B=e.ref(0),M=e.ref(null),U=e.ref(0),h=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
2
2
|
|
|
3
3
|
segments: [
|
|
4
4
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as g, computed as f, onMounted as ge, watch as K, onBeforeUnmount as fe, createElementBlock as o, openBlock as r, unref as u, normalizeStyle as H, normalizeClass as Q, createBlock as w, createCommentVNode as i, createElementVNode as x, createSlots as me, withCtx as p, renderSlot as m, normalizeProps as L, guardReactiveProps as $, createVNode as ye, Fragment as M, renderList as T, toDisplayString as O } from "vue";
|
|
2
|
-
import { u as pe, o as be, e as Z, g as ke, c as we, l as xe, D as _e, d as Ce, i as B, f as A, X as Le, a as $e } from "./index-
|
|
3
|
-
import { u as ee } from "./useNestedProp-
|
|
4
|
-
import { _ as Oe } from "./Title-
|
|
5
|
-
import { L as Be } from "./Legend-
|
|
6
|
-
import { u as Ae, U as Fe } from "./usePrinter-
|
|
7
|
-
import { _ as Ie } from "./PackageVersion-
|
|
8
|
-
import { _ as Se } from "./PenAndPaper-
|
|
9
|
-
import Pe from "./vue-ui-skeleton-
|
|
2
|
+
import { u as pe, o as be, e as Z, g as ke, c as we, l as xe, D as _e, d as Ce, i as B, f as A, X as Le, a as $e } from "./index-DvXHhwi7.js";
|
|
3
|
+
import { u as ee } from "./useNestedProp-Bw2_FZ80.js";
|
|
4
|
+
import { _ as Oe } from "./Title-CiymPFBZ.js";
|
|
5
|
+
import { L as Be } from "./Legend-DRjI7VTS.js";
|
|
6
|
+
import { u as Ae, U as Fe } from "./usePrinter-D0Njbrwg.js";
|
|
7
|
+
import { _ as Ie } from "./PackageVersion-BNm7stW7.js";
|
|
8
|
+
import { _ as Se } from "./PenAndPaper-Ba1SBNDw.js";
|
|
9
|
+
import Pe from "./vue-ui-skeleton-CJ9j8gHc.js";
|
|
10
10
|
import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Me } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CFHk7XOI.cjs"),de=require("./useResponsive-DQmBAoBf.cjs"),ze=require("./Title-CcJuov8a.cjs"),ce=require("./usePrinter-Cr-rXufG.cjs"),Ve=require("./Tooltip-DolT-Egr.cjs"),Ee=require("./DataTable-CJVWuZQ7.cjs"),Te=require("./vue-ui-skeleton-DcQQl9nv.cjs"),Ae=require("./Slicer-DLFjRDKI.cjs"),Fe=require("./vue-ui-accordion-BvbhG2QO.cjs"),ve=require("./useNestedProp-dCmM2zfv.cjs"),Ie=require("./PackageVersion-NIHFWeLx.cjs"),Pe=require("./PenAndPaper-dU138eET.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],De=["xmlns","viewBox"],Me=["x","y","width","height"],qe={key:1},He=["id"],We=["stop-color"],Ge=["stop-color"],je=["stop-color"],Xe=["id"],Ye=["stop-color"],Je=["stop-color"],Ke=["stop-color"],Qe={key:0},Ze=["x1","x2","y1","y2","stroke","stroke-width"],et=["x1","x2","y1","y2","stroke","stroke-width"],tt={key:1},lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x","y","font-size","fill","font-weight"],at={key:2},nt=["transform","text-anchor","font-size","fill","font-weight"],st=["x1","x2","y1","y2","stroke","stroke-width"],ut={key:0},rt=["cx","cy","r","fill"],it=["cx","cy","r","fill"],dt={key:1},ct=["x1","x2","y1","y2","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],yt=["x","y","height","width","fill","rx"],ht=["x","y","height","width","fill","rx","stroke","stroke-width"],pt=["x","y","height","width","fill","onMouseover"],ft={key:5,class:"vue-data-ui-watermark"},mt=["innerHTML"],gt={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ye}){const{vue_ui_candlestick:he}=s.useConfig(),d=f,x=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(s.createUid()),pe=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),R=e.ref(0),b=e.ref(null),L=e.ref(null),O=e.ref(null),U=e.ref(null),D=e.ref(null),M=e.ref(null),C=e.ref(0),q=e.ref(0),H=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:W,keepUserOptionState:G}=Re.useUserOptionState({config:t.value}),{svgRef:j}=Le.useChartAccessibility({config:t.value.style.title});function X(){const l=ve.useNestedProp({userConfig:d.config,defaultConfig:he});let a={};return l.theme?a={...ve.useNestedProp({userConfig:s.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&s.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&s.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=X(),A.value=!t.value.userOptions.showOnChartHover,Y(),C.value+=1,H.value+=1,q.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(s.objectIsEmpty(d.dataset)&&s.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=de.throttle(()=>{const{width:a,height:o}=de.useResponsive({chart:b.value,title:t.value.style.title.text?L.value:null,slicer:U.value,legend:O.value,source:D.value,noTitle:M.value});requestAnimationFrame(()=>{i.value.width=a,i.value.height=o,i.value.xAxisFontSize=s.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=s.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})})});N.value=new ResizeObserver(l),N.value.observe(b.value.parentNode)}le()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=ce.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick",options:t.value.userOptions.print}),fe=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}),u=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),ee=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),ee.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>u.value.width/ee.value.length),te=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>s.calculateNiceScale(te.value.min,te.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:s.checkNaN(u.value.left+a*r.value+r.value/2),y:s.checkNaN(u.value.top+(1-l/m.value.max)*u.value.height),value:s.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function me(l){return s.checkNaN(l/m.value.max)}const ge=e.computed(()=>m.value.ticks.map(l=>({y:u.value.bottom-u.value.height*me(l),value:s.checkNaN(l)}))),ke=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function xe(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(s.isFunction(o)&&s.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:se,last:ue,volume:re,isBullish:ie}=v.value[l],{period:xt,open:Ne,high:$e,low:Se,last:Be,volume:_e}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
2
|
fill="${t.value.style.layout.candle.gradient.show?ie?`url(#bullish_gradient_${h.value})`:`url(#bearish_gradient_${h.value})`:ie?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${_e} : <b>${isNaN(re)?"-":Number(re.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(se.value)?"-":Number(se.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Be}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function be(){le()}const g=e.ref(null);async function le(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&g.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),g.value&&g.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),g.value&&g.value.setEndValue(we(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function we(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function oe(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=s.createCsvContent(o);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${h.value}`:`url(#bearish_gradient_${h.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),k=e.ref(!1);function Ce(l){k.value=l,R.value+=1}function ae(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const B=e.ref(!1);function P(){B.value=!B.value}return ye({generatePdf:Q,generateCsv:oe,generateImage:Z,toggleTable:ae,toggleTooltip:ne,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:b,class:e.normalizeClass(`vue-ui-candlestick ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${h.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(W)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(W)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),fe.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:L,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${H.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&&x.value&&(e.unref(G)||e.unref(A))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(J),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:oe,onGenerateImage:e.unref(Z),onToggleTable:ae,onToggleTooltip:ne,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.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(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,We),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,je)],8,He),e.createElementVNode("linearGradient",{id:`bullish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Ye),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ke)],8,Xe)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ze),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:u.value.bottom,y2:u.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,et)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.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,lt)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.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(s.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,ot)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${u.value.left+r.value*n+r.value/2}, ${u.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,nt)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,st),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",ut,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,rt),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,it)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,ct),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,vt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${h.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${h.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ht))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+n*r.value,y:u.value.top,height:u.value.height<=0?1e-4:u.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(s.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>xe(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,pt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ft,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.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&&x.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Ae.Slicer,{ref_key:"slicerComponent",ref:g,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.zoom.enableSelectionDrag,onReset:be},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ve._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:b.value,content:E.value,isFullscreen:k.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),x.value?(e.openBlock(),e.createBlock(Fe.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(Ee.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},kt=Oe._export_sfc(gt,[["__scopeId","data-v-83916fa7"]]);exports.default=kt;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as g, ref as n, watch as Ne, onMounted as Je, onBeforeUnmount as Ke, nextTick as V, createElementBlock as u, openBlock as s, unref as v, normalizeStyle as ee, normalizeClass as Ae, createBlock as _, createCommentVNode as y, createElementVNode as r, createVNode as Te, createSlots as Qe, withCtx as m, renderSlot as f, normalizeProps as z, guardReactiveProps as S, Fragment as I, renderList as F, toDisplayString as P, createTextVNode as Ze } from "vue";
|
|
2
|
-
import { u as et, c as tt, a as lt, C as Ie, o as ot, e as N, D as at, v as U, X as st, w as j, E as ut, s as it, F as Fe, q as nt, r as rt, x as dt, y as vt } from "./index-
|
|
2
|
+
import { u as et, c as tt, a as lt, C as Ie, o as ot, e as N, D as at, v as U, X as st, w as j, E as ut, s as it, F as Fe, q as nt, r as rt, x as dt, y as vt } from "./index-DvXHhwi7.js";
|
|
3
3
|
import { t as yt, u as ct } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as ht } from "./Title-
|
|
5
|
-
import { u as ft, U as pt } from "./usePrinter-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import { D as mt } from "./DataTable-
|
|
8
|
-
import bt from "./vue-ui-skeleton-
|
|
9
|
-
import { S as xt } from "./Slicer-
|
|
10
|
-
import kt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Re } from "./useNestedProp-
|
|
12
|
-
import { _ as wt } from "./PackageVersion-
|
|
13
|
-
import { _ as $t } from "./PenAndPaper-
|
|
4
|
+
import { _ as ht } from "./Title-CiymPFBZ.js";
|
|
5
|
+
import { u as ft, U as pt } from "./usePrinter-D0Njbrwg.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-BXojuEca.js";
|
|
7
|
+
import { D as mt } from "./DataTable-Dz3uePkM.js";
|
|
8
|
+
import bt from "./vue-ui-skeleton-CJ9j8gHc.js";
|
|
9
|
+
import { S as xt } from "./Slicer-9CXQSz7y.js";
|
|
10
|
+
import kt from "./vue-ui-accordion-rd6DBLB5.js";
|
|
11
|
+
import { u as Re } from "./useNestedProp-Bw2_FZ80.js";
|
|
12
|
+
import { _ as wt } from "./PackageVersion-BNm7stW7.js";
|
|
13
|
+
import { _ as $t } from "./PenAndPaper-Ba1SBNDw.js";
|
|
14
14
|
import { u as Ct } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as _t } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Dy2-pNb6.cjs"),ue=require("./useNestedProp-DQ8Jt3-Y.cjs"),Q=require("./usePrinter-BQEYwy4a.cjs"),se=require("./vue-ui-skeleton-Db7PiDqL.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const{vue_ui_carousel_table:Y}=u.useConfig(),r=b,x=e.ref(u.createUid()),z=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.userOptions.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${x.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table",options:t.value.userOptions.print}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),S=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let a=function(){const i=o.getBoundingClientRect().bottom;n.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),n=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",a)})}});function ae(o){z.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=l.value;return o+a>=n}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const n=o-s.value,a=t.value.animation.speedMs/4/1e3;n>=a&&(d.value+=a,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const I=e.ref(null);function re(){c(),clearTimeout(I.value)}function j(){clearTimeout(I.value),I.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{S.value=a.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),n=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-carousel-table",style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:n[5]||(n[5]=()=>e.unref(P)(!0)),onMouseleave:n[6]||(n[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${x.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":S.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||(n[0]=a=>le()),onMouseleave:n[1]||(n[1]=a=>g()),onTouchstart:n[2]||(n[2]=a=>re()),onTouchend:n[3]||(n[3]=a=>j()),onTouchcancel:n[4]||(n[4]=a=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:S.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:S.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(a,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.mergeProps({ref_for:!0},{th:a,colIndex:i}),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:{clipPath:"inset(0,0,0,0)"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(a,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(p,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.mergeProps({ref_for:!0},{td:p,rowIndex:i,colIndex:E}),void 0,!0)],12,fe))),256))],4))),256))],512)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:x.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:i})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:i})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-751c3b08"]]);exports.default=ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CFHk7XOI.cjs"),ue=require("./useNestedProp-dCmM2zfv.cjs"),Q=require("./usePrinter-Cr-rXufG.cjs"),se=require("./vue-ui-skeleton-DcQQl9nv.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const{vue_ui_carousel_table:Y}=u.useConfig(),r=b,x=e.ref(u.createUid()),z=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.userOptions.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${x.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table",options:t.value.userOptions.print}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),S=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let a=function(){const i=o.getBoundingClientRect().bottom;n.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),n=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",a)})}});function ae(o){z.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=l.value;return o+a>=n}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const n=o-s.value,a=t.value.animation.speedMs/4/1e3;n>=a&&(d.value+=a,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const I=e.ref(null);function re(){c(),clearTimeout(I.value)}function j(){clearTimeout(I.value),I.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{S.value=a.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),n=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-carousel-table",style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:n[5]||(n[5]=()=>e.unref(P)(!0)),onMouseleave:n[6]||(n[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${x.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":S.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||(n[0]=a=>le()),onMouseleave:n[1]||(n[1]=a=>g()),onTouchstart:n[2]||(n[2]=a=>re()),onTouchend:n[3]||(n[3]=a=>j()),onTouchcancel:n[4]||(n[4]=a=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:S.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:S.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(a,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.mergeProps({ref_for:!0},{th:a,colIndex:i}),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:{clipPath:"inset(0,0,0,0)"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(a,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(p,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.mergeProps({ref_for:!0},{td:p,rowIndex:i,colIndex:E}),void 0,!0)],12,fe))),256))],4))),256))],512)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:x.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:i})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:i})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-751c3b08"]]);exports.default=ge;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as n, useSlots as Fe, onMounted as A, computed as P, watch as E, onBeforeUnmount as ve, nextTick as pe, createElementBlock as v, openBlock as u, unref as r, createElementVNode as H, createBlock as ce, createCommentVNode as R, normalizeClass as Be, normalizeStyle as f, createTextVNode as L, renderSlot as p, toDisplayString as G, Fragment as D, renderList as X, mergeProps as fe, createSlots as Pe, withCtx as w, normalizeProps as he, guardReactiveProps as me } from "vue";
|
|
2
|
-
import { u as Re, c as ze, o as j, e as J, s as Se, q as Ee, r as He } from "./index-
|
|
3
|
-
import { u as Ne } from "./useNestedProp-
|
|
4
|
-
import { u as Ue, U as Ve } from "./usePrinter-
|
|
5
|
-
import Me from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Re, c as ze, o as j, e as J, s as Se, q as Ee, r as He } from "./index-DvXHhwi7.js";
|
|
3
|
+
import { u as Ne } from "./useNestedProp-Bw2_FZ80.js";
|
|
4
|
+
import { u as Ue, U as Ve } from "./usePrinter-D0Njbrwg.js";
|
|
5
|
+
import Me from "./vue-ui-skeleton-CJ9j8gHc.js";
|
|
6
6
|
import { u as qe } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ge = ["id"], De = ["height"], Xe = ["data-cell", "height"], je = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Dy2-pNb6.cjs"),ee=require("./usePrinter-BQEYwy4a.cjs"),ge=require("./vue-ui-skeleton-Db7PiDqL.cjs"),ke=require("./BaseIcon-DmfPEj6j.cjs"),_e=require("./vue-ui-accordion-dVGUWjXH.cjs"),te=require("./useNestedProp-DQ8Jt3-Y.cjs"),xe=require("./PackageVersion-DxR-fKLM.cjs"),Be=require("./PenAndPaper-CG9o3ymS.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},pt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4b8440b7":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function pe(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),C("selectBranch",null)):(p(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(p(),C("selectRoot",null)):(p(),b.value=a,C("selectRoot",a))}function fe(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CFHk7XOI.cjs"),ee=require("./usePrinter-Cr-rXufG.cjs"),ge=require("./vue-ui-skeleton-DcQQl9nv.cjs"),ke=require("./BaseIcon-DvVvIgek.cjs"),_e=require("./vue-ui-accordion-BvbhG2QO.cjs"),te=require("./useNestedProp-dCmM2zfv.cjs"),xe=require("./PackageVersion-NIHFWeLx.cjs"),Be=require("./PenAndPaper-dU138eET.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},pt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4b8440b7":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function pe(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),C("selectBranch",null)):(p(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(p(),C("selectRoot",null)):(p(),b.value=a,C("selectRoot",a))}function fe(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
2
2
|
${l.x1},${l.y1+d}
|
|
3
3
|
C${l.x1-20},${l.y1+d}
|
|
4
4
|
${l.x1-80},${l.y1+d}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as He, computed as m, ref as T, watch as We, onMounted as Ke, createElementBlock as o, openBlock as a, unref as n, normalizeStyle as h, normalizeClass as k, createBlock as K, createCommentVNode as f, renderSlot as S, createSlots as Je, withCtx as B, normalizeProps as J, guardReactiveProps as Q, createVNode as Ce, createElementVNode as s, toDisplayString as c, Fragment as g, renderList as _, createTextVNode as Z, withKeys as Qe, nextTick as Te } from "vue";
|
|
2
|
-
import { u as Ze, c as et, t as tt, p as V, a as lt, b as at, g as ne, e as ee, d as re, o as ot, X as st, s as F, w as ze, i as G, f as z, G as Ne, m as Se, j as ut, k as H, n as P, q as nt, r as rt } from "./index-
|
|
3
|
-
import { u as it, U as ct } from "./usePrinter-
|
|
4
|
-
import dt from "./vue-ui-skeleton-
|
|
5
|
-
import vt from "./BaseIcon-
|
|
6
|
-
import yt from "./vue-ui-accordion-
|
|
7
|
-
import { u as Fe } from "./useNestedProp-
|
|
8
|
-
import { _ as ht } from "./PackageVersion-
|
|
9
|
-
import { _ as ft } from "./PenAndPaper-
|
|
2
|
+
import { u as Ze, c as et, t as tt, p as V, a as lt, b as at, g as ne, e as ee, d as re, o as ot, X as st, s as F, w as ze, i as G, f as z, G as Ne, m as Se, j as ut, k as H, n as P, q as nt, r as rt } from "./index-DvXHhwi7.js";
|
|
3
|
+
import { u as it, U as ct } from "./usePrinter-D0Njbrwg.js";
|
|
4
|
+
import dt from "./vue-ui-skeleton-CJ9j8gHc.js";
|
|
5
|
+
import vt from "./BaseIcon-CeAuvfV6.js";
|
|
6
|
+
import yt from "./vue-ui-accordion-rd6DBLB5.js";
|
|
7
|
+
import { u as Fe } from "./useNestedProp-Bw2_FZ80.js";
|
|
8
|
+
import { _ as ht } from "./PackageVersion-BNm7stW7.js";
|
|
9
|
+
import { _ as ft } from "./PenAndPaper-Ba1SBNDw.js";
|
|
10
10
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as pt } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|