vue-data-ui 2.10.11 → 2.10.12-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/{Arrow-C6ETniRR.cjs → Arrow-Cc7VWI72.cjs} +1 -1
- package/dist/{Arrow-B0YRTzCj.js → Arrow-DM3oKxpx.js} +1 -1
- package/dist/{BaseIcon-CObkWSlF.cjs → BaseIcon-CPELbcJd.cjs} +1 -1
- package/dist/{BaseIcon-V0HD2AAD.js → BaseIcon-Cxzy5vMD.js} +4 -3
- package/dist/{ColorPicker-Czm9Mx_k.cjs → ColorPicker-6PJH4EYd.cjs} +1 -1
- package/dist/{ColorPicker-BMSFl1XZ.js → ColorPicker-BB6VBARq.js} +3 -3
- package/dist/{DataTable-CVSajw4G.js → DataTable-C0D_esqj.js} +55 -53
- package/dist/DataTable-DhENH-yp.cjs +1 -0
- package/dist/{Legend-B61dtd8W.js → Legend-0b4003Zt.js} +2 -2
- package/dist/{Legend-DUZ-tBhF.cjs → Legend-QzF5KY2J.cjs} +1 -1
- package/dist/{PackageVersion-DqsC6J9R.js → PackageVersion-C-ytTlJe.js} +3 -3
- package/dist/PackageVersion-C4g94Tsx.cjs +1 -0
- package/dist/{PenAndPaper-CU0ABvzv.cjs → PenAndPaper-CHjiY-tS.cjs} +1 -1
- package/dist/{PenAndPaper-Bqjmruhh.js → PenAndPaper-__UJ-k8q.js} +3 -3
- package/dist/{Shape-CWSam3QO.js → Shape-C0Zlk88G.js} +1 -1
- package/dist/{Shape-x9QWqySR.cjs → Shape-DT8Iisqv.cjs} +1 -1
- package/dist/{Slicer-BbMNT2AI.js → Slicer-CWCYtaVJ.js} +3 -3
- package/dist/{Slicer-VF0Mi4Gp.cjs → Slicer-DwATmGwL.cjs} +1 -1
- package/dist/{Title-LLvOAGEi.cjs → Title-BgrPj3Ra.cjs} +1 -1
- package/dist/{Title-CxubvuEh.js → Title-C9AEelQ1.js} +1 -1
- package/dist/{Tooltip-C0W6IWVK.js → Tooltip-5snNLRyR.js} +1 -1
- package/dist/{Tooltip-B1xW8AQT.cjs → Tooltip-Bc608PZp.cjs} +1 -1
- package/dist/documentation/installation.md +1 -0
- package/dist/{dom-to-png-D2P_vWEM.js → dom-to-png-2k-zSMSO.js} +1 -1
- package/dist/{dom-to-png-CNF-s1oi.cjs → dom-to-png-D3dfvprm.cjs} +1 -1
- package/dist/{img-DacIcr83.js → img-Bh2yECQj.js} +1 -1
- package/dist/{img-BDamDFQb.cjs → img-_T4QDD3Z.cjs} +1 -1
- package/dist/index-D6Vsy8lL.cjs +9 -0
- package/dist/{index-CO-5OgQA.js → index-lwwgkcGL.js} +7013 -6929
- package/dist/{pdf-DflC6mtT.js → pdf-Ccv6h6_6.js} +1 -1
- package/dist/{pdf-D6wHFpvv.cjs → pdf-CutCfuk-.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +92 -5
- package/dist/types/vue-data-ui.d.ts +92 -5
- package/dist/{useNestedProp-DUH233CH.cjs → useNestedProp-BtWmF1jm.cjs} +1 -1
- package/dist/{useNestedProp-D8sa_wYF.js → useNestedProp-TXT2IHSL.js} +1 -1
- package/dist/{usePrinter-u4erwqXt.cjs → usePrinter-AHpiDJH-.cjs} +1 -1
- package/dist/{usePrinter-DldU0tBx.js → usePrinter-BCTMiyK9.js} +3 -3
- package/dist/{useResponsive-DQmBAoBf.cjs → useResponsive-BBkmXXaa.cjs} +1 -1
- package/dist/{useResponsive-Cw4oZ8sQ.js → useResponsive-JZ9xq-JV.js} +4 -1
- package/dist/vue-data-ui-CX2ucaPo.cjs +9 -0
- package/dist/{vue-data-ui-DaG_fJyV.js → vue-data-ui-CfrRJcx_.js} +115 -107
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +60 -59
- package/dist/{vue-ui-3d-bar-CKaPvMis.js → vue-ui-3d-bar-Bw5eaxc9.js} +9 -9
- package/dist/{vue-ui-3d-bar-1L_FJakQ.cjs → vue-ui-3d-bar-SITXGX1M.cjs} +1 -1
- package/dist/{vue-ui-accordion-RRHvINsj.js → vue-ui-accordion-CJnR6fHi.js} +3 -3
- package/dist/{vue-ui-accordion-DkOSgEPp.cjs → vue-ui-accordion-xPf1pXPZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BsfpBP5o.js → vue-ui-age-pyramid-D0gBQw8X.js} +11 -11
- package/dist/{vue-ui-age-pyramid-BX5nAmcR.cjs → vue-ui-age-pyramid-DD7razIH.cjs} +1 -1
- package/dist/{vue-ui-annotator-CSSRY4KB.js → vue-ui-annotator-DlcWoI3N.js} +2 -2
- package/dist/{vue-ui-annotator-BCfRHpTL.cjs → vue-ui-annotator-fCtNR00Z.cjs} +1 -1
- package/dist/{vue-ui-bullet-wcXiBQsu.js → vue-ui-bullet-C6FMBrAT.js} +8 -8
- package/dist/{vue-ui-bullet-BuoFM_Qt.cjs → vue-ui-bullet-CJ0zuIH3.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DLPBk-z0.js → vue-ui-candlestick-85YmMYyP.js} +12 -12
- package/dist/{vue-ui-candlestick-D_UWn-gv.cjs → vue-ui-candlestick-BVkM9KBy.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DZWUAetO.cjs → vue-ui-carousel-table-CY9-s7Gp.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-B-FxYow7.js → vue-ui-carousel-table-DbY5LTHJ.js} +4 -4
- package/dist/{vue-ui-chestnut-D_GtQRUL.js → vue-ui-chestnut-B87se5P9.js} +8 -8
- package/dist/{vue-ui-chestnut-Ds2IXobn.cjs → vue-ui-chestnut-DuUQ_4V9.cjs} +1 -1
- package/dist/vue-ui-chord-Cs5PAaYt.cjs +16 -0
- package/dist/vue-ui-chord-mQl3OTYa.js +924 -0
- package/dist/{vue-ui-circle-pack-IFKy_EXs.js → vue-ui-circle-pack-Cd20ryi8.js} +10 -10
- package/dist/{vue-ui-circle-pack-DZjwCJfn.cjs → vue-ui-circle-pack-DPD_uT2D.cjs} +1 -1
- package/dist/{vue-ui-cursor-CpXWkh96.js → vue-ui-cursor-3XMz_kBQ.js} +2 -2
- package/dist/{vue-ui-cursor-CFcWzQ_a.cjs → vue-ui-cursor-DEjvP2po.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BMVLKe5Z.cjs → vue-ui-dashboard-CpFZiasA.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CLULzCgo.js → vue-ui-dashboard-koc4m8YD.js} +62 -62
- package/dist/{vue-ui-digits-VMbRXMfP.cjs → vue-ui-digits-Xf7nHAu_.cjs} +1 -1
- package/dist/{vue-ui-digits-B3J16TA3.js → vue-ui-digits-a85ERBus.js} +2 -2
- package/dist/{vue-ui-donut-BjGbzLsC.cjs → vue-ui-donut-Cbc429Lz.cjs} +1 -1
- package/dist/{vue-ui-donut-DUAbkhZV.js → vue-ui-donut-Dgq-t23H.js} +13 -13
- package/dist/{vue-ui-donut-evolution-B2MMB7lY.cjs → vue-ui-donut-evolution-BN23CyWC.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BlMjAI3c.js → vue-ui-donut-evolution-BplxUn27.js} +11 -11
- package/dist/{vue-ui-dumbbell-B_88Pzkq.js → vue-ui-dumbbell-2ipG57aA.js} +11 -11
- package/dist/{vue-ui-dumbbell-DgizrVYM.cjs → vue-ui-dumbbell-CQcVm8Cp.cjs} +1 -1
- package/dist/{vue-ui-flow-v5zjc5i3.cjs → vue-ui-flow-CwH1q46r.cjs} +1 -1
- package/dist/{vue-ui-flow-CGYd2Iko.js → vue-ui-flow-DFlHSj8M.js} +11 -11
- package/dist/{vue-ui-funnel-D8Ql3Fu9.js → vue-ui-funnel-Bk0Fg5Fd.js} +10 -10
- package/dist/{vue-ui-funnel-AOnxjmTY.cjs → vue-ui-funnel-Dy6OxxYr.cjs} +1 -1
- package/dist/{vue-ui-galaxy-C5XKP863.js → vue-ui-galaxy-CEnVeZAi.js} +11 -11
- package/dist/{vue-ui-galaxy-qIl1Sp2I.cjs → vue-ui-galaxy-PhEQ-ses.cjs} +1 -1
- package/dist/{vue-ui-gauge-CnS0ZVac.js → vue-ui-gauge-C7b6k24U.js} +8 -8
- package/dist/{vue-ui-gauge-BzmlwkZO.cjs → vue-ui-gauge-Cebe-UaX.cjs} +1 -1
- package/dist/{vue-ui-gizmo-oMF4Uxgv.cjs → vue-ui-gizmo-Bz2sqw_e.cjs} +1 -1
- package/dist/{vue-ui-gizmo-w7f-RuqD.js → vue-ui-gizmo-eJFYYvWM.js} +3 -3
- package/dist/{vue-ui-heatmap-DdbtuK1j.js → vue-ui-heatmap-BLoaEofW.js} +10 -10
- package/dist/{vue-ui-heatmap-CjUYm6Y8.cjs → vue-ui-heatmap-CjXVuG6t.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CPEbWJv-.cjs → vue-ui-history-plot-DzIjEASo.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DJ5eSSra.js → vue-ui-history-plot-QjiUbA7Y.js} +12 -12
- package/dist/{vue-ui-kpi-BBpWvss7.cjs → vue-ui-kpi-BFtRYfbe.cjs} +1 -1
- package/dist/{vue-ui-kpi-T-hxtGRX.js → vue-ui-kpi-D4pZ3CJ2.js} +3 -3
- package/dist/{vue-ui-mini-loader-BUdcns7l.js → vue-ui-mini-loader-D2QcTAa8.js} +2 -2
- package/dist/{vue-ui-mini-loader-CnEXcdzr.cjs → vue-ui-mini-loader-DrflipQf.cjs} +1 -1
- package/dist/{vue-ui-molecule-9zI34I22.js → vue-ui-molecule-BYVCvz1r.js} +11 -11
- package/dist/{vue-ui-molecule-CXda1TRy.cjs → vue-ui-molecule-DJUWNXPe.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-3FsJtJ1q.js → vue-ui-mood-radar-B9zgFFlO.js} +11 -11
- package/dist/{vue-ui-mood-radar-DCz7WxHl.cjs → vue-ui-mood-radar-Cj0AoE9r.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CQHTFClA.cjs → vue-ui-nested-donuts-Ca-C56Sp.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D5-RAGOC.js → vue-ui-nested-donuts-n6rFlsNU.js} +12 -12
- package/dist/{vue-ui-onion-DyNY3aLe.js → vue-ui-onion-B9fUzbb6.js} +12 -12
- package/dist/{vue-ui-onion-C3tsgeYq.cjs → vue-ui-onion-BA_RYM1D.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-tnKZr6bC.cjs → vue-ui-parallel-coordinate-plot-KOV1W4KH.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-D3C5xDkx.js → vue-ui-parallel-coordinate-plot-QokZ1gwW.js} +13 -13
- package/dist/{vue-ui-quadrant-Oyf18Bj4.js → vue-ui-quadrant-DwdrLzcC.js} +13 -13
- package/dist/{vue-ui-quadrant-CF7YSzrp.cjs → vue-ui-quadrant-kdXTrqPf.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Y8-adLxE.cjs → vue-ui-quick-chart-CPeGSnBN.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-TbLTi-d3.js → vue-ui-quick-chart-Dad-wlg0.js} +10 -10
- package/dist/{vue-ui-radar-BfHQxjpG.js → vue-ui-radar-B1OXJn1d.js} +13 -13
- package/dist/{vue-ui-radar-BvNWx4a8.cjs → vue-ui-radar-ClWdu2fy.cjs} +1 -1
- package/dist/{vue-ui-rating-BDM0NHP6.js → vue-ui-rating-_WB5qAQ6.js} +2 -2
- package/dist/{vue-ui-rating-DitReQ9n.cjs → vue-ui-rating-i0mHMe0E.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DcZyVpqG.cjs → vue-ui-relation-circle-C631GMOX.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DpwaksSx.js → vue-ui-relation-circle-CW73Nbxq.js} +8 -8
- package/dist/{vue-ui-ridgeline-DgzMstgJ.cjs → vue-ui-ridgeline-DJO42BY7.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-BXEg60Vj.js → vue-ui-ridgeline-DW_YX94e.js} +13 -13
- package/dist/{vue-ui-rings-Bsvdt8jo.js → vue-ui-rings-B8rqh0-_.js} +13 -13
- package/dist/{vue-ui-rings-DqF707hp.cjs → vue-ui-rings-BgWpuick.cjs} +1 -1
- package/dist/{vue-ui-scatter-qQ-795VY.js → vue-ui-scatter-01DXyF2q.js} +13 -13
- package/dist/{vue-ui-scatter-D9sIS4Dp.cjs → vue-ui-scatter-Bu2QFsk4.cjs} +1 -1
- package/dist/vue-ui-skeleton-2QZvx0f3.cjs +41 -0
- package/dist/{vue-ui-skeleton-BeEBd4CC.js → vue-ui-skeleton-BufuSja5.js} +503 -467
- package/dist/{vue-ui-smiley-Bba04Gln.js → vue-ui-smiley-DfLMSjyl.js} +2 -2
- package/dist/{vue-ui-smiley-B3JFedE5.cjs → vue-ui-smiley-crIxjQdS.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DiZvQzSb.cjs → vue-ui-spark-trend-HBiBZbwX.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DB2vKJ0m.js → vue-ui-spark-trend-d0lcXznw.js} +5 -5
- package/dist/{vue-ui-sparkbar-DjsNBWGs.js → vue-ui-sparkbar-CSJkcisH.js} +4 -4
- package/dist/{vue-ui-sparkbar-B1pBe2b4.cjs → vue-ui-sparkbar-gr-jpXO8.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BJ0vTnKL.js → vue-ui-sparkgauge-CV7lhSGE.js} +4 -4
- package/dist/{vue-ui-sparkgauge-ByMA0D5w.cjs → vue-ui-sparkgauge-CzeccsGw.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cv-hyUbF.js → vue-ui-sparkhistogram-ClDu95-3.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-WxGpd0TA.cjs → vue-ui-sparkhistogram-O_r9cvon.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DPlkEVV6.cjs → vue-ui-sparkline-B6ho6TD2.cjs} +1 -1
- package/dist/{vue-ui-sparkline-tnMT43CD.js → vue-ui-sparkline-DT7wW1fR.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BFkweUWm.cjs → vue-ui-sparkstackbar-C9QU7IZI.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-8WSy0M8S.js → vue-ui-sparkstackbar-YVKlhkKi.js} +5 -5
- package/dist/{vue-ui-stackbar-BfkOVox7.js → vue-ui-stackbar-CRjmJOju.js} +14 -14
- package/dist/{vue-ui-stackbar-BFgWt2oG.cjs → vue-ui-stackbar-SSP_x5Ku.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CN06Oh8m.js → vue-ui-strip-plot-BiYJlrH3.js} +12 -12
- package/dist/{vue-ui-strip-plot-BKsixkUU.cjs → vue-ui-strip-plot-Bko-Rape.cjs} +1 -1
- package/dist/{vue-ui-table-o_zUZsUz.cjs → vue-ui-table-C__UHZB8.cjs} +1 -1
- package/dist/{vue-ui-table-B-sy0kOZ.js → vue-ui-table-DHaMznpt.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BidbeObz.cjs → vue-ui-table-heatmap-C1HUdO8f.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Dur8rhk6.js → vue-ui-table-heatmap-Ci2H0bXz.js} +4 -4
- package/dist/{vue-ui-table-sparkline-Ccw_ekS8.js → vue-ui-table-sparkline-BFgLj1Ik.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BeWSYBle.cjs → vue-ui-table-sparkline-D-zsMLQt.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Ds9lWEE_.cjs → vue-ui-thermometer-BXF4zDfZ.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BOw4FvGD.js → vue-ui-thermometer-pUxYKQhF.js} +7 -7
- package/dist/{vue-ui-timer-OAHpNcTb.cjs → vue-ui-timer-CMw9W2ql.cjs} +1 -1
- package/dist/{vue-ui-timer-B2gMYwCj.js → vue-ui-timer-DfQM6a6k.js} +6 -6
- package/dist/{vue-ui-tiremarks-B8dltsA4.cjs → vue-ui-tiremarks-CWgfo0wD.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BlfDeAAZ.js → vue-ui-tiremarks-DdNVrSbT.js} +7 -7
- package/dist/{vue-ui-treemap-meoOt_AQ.js → vue-ui-treemap-BDpXhqzI.js} +13 -13
- package/dist/{vue-ui-treemap-BjWTRcbW.cjs → vue-ui-treemap-Dw6ymGLS.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-8EaYa2I2.js → vue-ui-vertical-bar-ByJLpT85.js} +13 -13
- package/dist/{vue-ui-vertical-bar-kRBUbvs6.cjs → vue-ui-vertical-bar-jaQJuWqm.cjs} +1 -1
- package/dist/{vue-ui-waffle-XM92kEwZ.cjs → vue-ui-waffle-CFgSCKkV.cjs} +1 -1
- package/dist/{vue-ui-waffle-ThNptuVQ.js → vue-ui-waffle-Dp3DOosi.js} +13 -13
- package/dist/{vue-ui-wheel-B_DSO7Ko.js → vue-ui-wheel-DBz7onD-.js} +8 -8
- package/dist/{vue-ui-wheel-DMiRno4r.cjs → vue-ui-wheel-soTpsEi4.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-tsIW_o0M.js → vue-ui-word-cloud-CG84NZet.js} +11 -11
- package/dist/{vue-ui-word-cloud-8-CU7ACz.cjs → vue-ui-word-cloud-D_ErqoV2.cjs} +1 -1
- package/dist/{vue-ui-world-C-TO7n_r.cjs → vue-ui-world-C4yMp_Gj.cjs} +1 -1
- package/dist/{vue-ui-world-DizUMTdP.js → vue-ui-world-Dc8U0Mmg.js} +11 -11
- package/dist/{vue-ui-xy-CKNq6i3B.js → vue-ui-xy-CFm5IDQP.js} +16 -16
- package/dist/{vue-ui-xy-canvas-DgLV6VWJ.js → vue-ui-xy-canvas-BVeP6Xmm.js} +13 -13
- package/dist/{vue-ui-xy-canvas-Cmax9zNa.cjs → vue-ui-xy-canvas-CXQ_ZMp1.cjs} +1 -1
- package/dist/{vue-ui-xy-CHcCU9pB.cjs → vue-ui-xy-nXoPTCxs.cjs} +2 -2
- package/package.json +1 -1
- package/dist/DataTable-DypMcnH2.cjs +0 -1
- package/dist/PackageVersion-BS7Jybcw.cjs +0 -1
- package/dist/index-B7zOq_yO.cjs +0 -9
- package/dist/vue-data-ui-C3o_PUJM.cjs +0 -9
- package/dist/vue-ui-skeleton-Br6xw2QW.cjs +0 -41
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B7zOq_yO.cjs"),ee=require("./usePrinter-u4erwqXt.cjs"),ge=require("./vue-ui-skeleton-Br6xw2QW.cjs"),ke=require("./BaseIcon-CObkWSlF.cjs"),_e=require("./vue-ui-accordion-DkOSgEPp.cjs"),te=require("./useNestedProp-DUH233CH.cjs"),xe=require("./PackageVersion-BS7Jybcw.cjs"),Be=require("./PenAndPaper-CU0ABvzv.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-D6Vsy8lL.cjs"),ee=require("./usePrinter-AHpiDJH-.cjs"),ge=require("./vue-ui-skeleton-2QZvx0f3.cjs"),ke=require("./BaseIcon-CPELbcJd.cjs"),_e=require("./vue-ui-accordion-xPf1pXPZ.cjs"),te=require("./useNestedProp-BtWmF1jm.cjs"),xe=require("./PackageVersion-C4g94Tsx.cjs"),Be=require("./PenAndPaper-CHjiY-tS.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}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-D6Vsy8lL.cjs"),Qe=require("./useUserOptionState-BgepsfED.cjs"),Pe=require("./useNestedProp-BtWmF1jm.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./Title-BgrPj3Ra.cjs"),Ke=require("./PackageVersion-C4g94Tsx.cjs"),et=require("./PenAndPaper-CHjiY-tS.cjs"),tt=require("./BaseIcon-CPELbcJd.cjs"),Ae=require("./usePrinter-AHpiDJH-.cjs"),ot=require("./Legend-QzF5KY2J.cjs"),at=require("./Shape-DT8Iisqv.cjs"),lt=require("./DataTable-DhENH-yp.cjs"),nt=require("./vue-ui-accordion-xPf1pXPZ.cjs"),rt=require("./vue-ui-skeleton-2QZvx0f3.cjs"),Ie=require("./useResponsive-BBkmXXaa.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ut=["id"],it=["xmlns","viewBox"],ct=["width","height"],dt={key:1},vt=["id","d"],ht={key:2},ft=["transform"],mt=["d","fill","stroke","stroke-width","onMouseenter","onClick"],pt=["d","fill","stroke","stroke-width"],gt=["d","fill"],bt=["d","fill","stroke","stroke-width","onMouseenter","onClick"],kt=["d","fill","stroke","stroke-width"],yt=["d","fill","stroke","stroke-width"],Ct=["d","fill","stroke","stroke-width"],$t={key:0},wt=["x1","y1","x2","y2","stroke","stroke-width"],Bt=["x1","y1","x2","y2","stroke","stroke-width"],Mt=["cx","cy","r","stroke","stroke-width","fill"],xt=["transform","fill","text-anchor","font-size","font-weight"],Pt={key:1},At=["font-size","font-weight","fill"],It=["href"],_t=["transform","text-anchor","font-size","font-weight","fill"],St={key:5,class:"vue-data-ui-watermark"},Et=["onClick"],Nt={key:8,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Vt={style:{"text-align":"right",width:"100%"}},Tt={__name:"vue-ui-chord",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:["selectLegend","selectGroup","selectRibbon"],setup(_e,{expose:Se,emit:Ee}){e.useCssVars(o=>({"7187d07a":o.slicerColor}));const{vue_ui_chord:Ne}=d.useConfig(),h=_e,L=Ee,P=e.ref(!!h.dataset&&Object.hasOwn(h.dataset,"matrix")),B=e.ref(d.createUid()),b=e.ref(null),m=e.ref(null),v=e.ref(null),H=e.ref(0),E=e.ref(null),Q=e.ref(null),Z=e.ref(null),J=e.ref(null),K=e.ref(null),ee=e.ref(0),te=e.ref(0),oe=e.ref(0),N=e.ref(!1),X=e.ref(null),a=e.computed({get:()=>ie(),set:o=>o}),{userOptionsVisible:j,setUserOptionsVisibility:ae,keepUserOptionState:le}=Qe.useUserOptionState({config:a.value}),{svgRef:V}=Ze.useChartAccessibility({config:a.value.style.chart.title}),{isPrinting:ne,isImaging:re,generatePdf:se,generateImage:ue}=Ae.usePrinter({elementId:`chord_${B.value}`,fileName:a.value.style.chart.title.text||"vue-ui-chord",options:a.value.userOptions.print}),T=e.ref({showTable:a.value.table.show});function ie(){const o=Pe.useNestedProp({userConfig:h.config,defaultConfig:Ne});return o.theme?{...Pe.useNestedProp({userConfig:d.themes.vue_ui_chord[o.theme]||h.config,defaultConfig:o}),customPalette:d.themePalettes[o.theme]||d.palette}:o}e.watch(()=>h.config,o=>{a.value=ie(),j.value=!a.value.userOptions.showOnChartHover,ce(),ee.value+=1,te.value+=1,oe.value+=1,$.value=a.value.initialRotation,T.value.showTable=a.value.table.show},{deep:!0});function ce(){if(d.objectIsEmpty(h.dataset)?d.error({componentName:"VueUiChord",type:"dataset"}):d.getMissingDatasetAttributes({datasetObject:h.dataset,requiredAttributes:["matrix"]}).forEach(o=>{P.value=!1,d.error({componentName:"VueUiChord",type:"datasetAttribute",property:o})}),P.value&&de(),a.value.responsive){const o=E.value.parentNode,l=Ie.throttle(()=>{const{width:n,height:u,heightNoTitle:r,heightSource:s,heightTitle:c,heightLegend:k}=Ie.useResponsive({chart:E.value,title:a.value.style.chart.title.text?Q.value:null,legend:a.value.style.chart.legend.show?Z.value:null,source:J.value,noTitle:K.value}),y=c+k+s+r;n<u?E.value.style.width="100%":(E.value.style.height="100%",V.value.style.height=`calc(100% - ${y}px)`)},100),t=new ResizeObserver(l);t.observe(o),X.value=t,l()}ve.value=setTimeout(()=>{N.value=!0},500)}function de(){h.dataset.matrix.length<2&&(console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
2
|
+
|
|
3
|
+
matrix:[
|
|
4
|
+
[1, 1],
|
|
5
|
+
[1, 1]
|
|
6
|
+
]`),P.value=!1),h.dataset.matrix.forEach((o,l)=>{o.length!==h.dataset.matrix.length&&(console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${l} has ${o.length} elements instead of the required ${h.dataset.matrix.length}
|
|
7
|
+
|
|
8
|
+
dataset.matrix[${l}] = [${o.toString()}] has a length of ${o.length} but should have the same length as the matrix itself (${h.dataset.matrix.length})`),P.value=!1)})}const ve=e.ref(null);e.onMounted(()=>{ce()});const M=e.ref({height:600,width:600}),Ve=e.computed(()=>a.value.userOptions.show&&!a.value.style.chart.title.text),Te=e.computed(()=>d.convertCustomPalette(a.value.customPalette)),f=e.computed(()=>({inner:M.value.width*.3*a.value.style.chart.arcs.innerRadiusRatio,outer:M.value.width*.34*a.value.style.chart.arcs.outerRadiusRatio})),ze=e.computed(()=>a.value.style.chart.arcs.padAngle/100),p=e.computed(()=>P.value?{matrix:h.dataset.matrix??[[0]],labels:h.dataset.labels??[""],colors:h.dataset.colors&&Array.isArray(h.dataset.colors)&&h.dataset.colors.length?h.dataset.colors.map(o=>d.convertColorToHex(o)):h.dataset.matrix.map((o,l)=>Te.value[l]||d.palette[l]||d.palette[l%d.palette.length])}:{matrix:[],labels:[],colors:[]});function Oe(o,l){const t=o.length,n=f.value.inner,u=new Array(t).fill(0);let r=0;for(let i=0;i<t;i+=1)for(let g=0;g<t;g+=1)u[i]+=o[i][g],r+=o[i][g];const s=(2*Math.PI-l*t)/r,c=[];let k=0;for(let i=0;i<t;i+=1){const g=k,w=g+u[i]*s;c.push({index:i,pattern:`pattern_${B.value}_${i}`,startAngle:g,endAngle:w,name:p.value.labels[i],id:d.createUid(),color:p.value.colors[i]}),k=w+l}const y=[];for(let i=0;i<t;i+=1){const g=o[i].map((x,I)=>({j:I,v:x}));g.sort((x,I)=>I.v-x.v);let w=c[i].startAngle;for(const{j:x,v:I}of g){const S=w,O=S+I*s;y.push({index:i,subIndex:x,pattern:`pattern_${B.value}_${i}`,startAngle:S,endAngle:O,value:I,groupName:p.value.labels[i],groupId:c[i].id,groupColor:p.value.colors[i],midAngle:(S+O)/2,midBaseX:Math.cos((S+O)/2-Math.PI/2)*n,midBaseY:Math.sin((S+O)/2-Math.PI/2)*n}),w=O}}const A=[];for(const i of y){const g=y.find(w=>w.index===i.subIndex&&w.subIndex===i.index);A.push({source:i,target:g,id:d.createUid()})}return{groups:c,chords:A}}const C=e.computed(()=>{const o=Oe(p.value.matrix,ze.value);return de(),o.chords.sort((l,t)=>Math.max(t.source.value,t.target.value)-Math.max(l.source.value,l.target.value)),o}),Le=e.computed(()=>{const o=f.value.outer+a.value.style.chart.ribbons.labels.offset+12,t=a.value.style.chart.ribbons.labels.fontSize*.6,n=[];if(m.value){const r=m.value;if(r.source.value){const s=String(r.source.value);n.push({id:r.id+"-src",theta:r.source.midAngle,w:s.length*t/o,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){const s=String(r.target.value);n.push({id:r.id+"-tgt",theta:r.target.midAngle,w:s.length*t/o,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}return n}function u(r){C.value.chords.filter(s=>s.source.groupId===r&&s.source.value).forEach(s=>{{const c=String(s.source.value);n.push({id:s.id+"-src",theta:s.source.midAngle,w:c.length*t/o,midBaseX:s.source.midBaseX,midBaseY:s.source.midBaseY,groupColor:s.source.groupColor,value:s.source.value})}if(s.target&&s.target.value&&s.target.value!==s.source.value){const c=String(s.target.value);n.push({id:s.id+"-tgt",theta:s.target.midAngle,w:c.length*t/o,midBaseX:s.target.midBaseX,midBaseY:s.target.midBaseY,groupColor:s.target.groupColor,value:s.target.value})}})}return v.value&&u(v.value),b.value&&u(b.value.id),n}),Fe=e.computed(()=>{const o=Le.value.map(u=>({...u})).sort((u,r)=>u.theta-r.theta),l=a.value.style.chart.ribbons.labels.minSeparationDeg*Math.PI/180;let t=!0,n=0;for(;t&&n++<10;){t=!1;for(let c=1;c<o.length;c+=1){const k=o[c-1],y=o[c],A=k.theta+k.w+l;y.theta<A&&(y.theta=A,t=!0)}const u=o[0],r=o[o.length-1],s=r.theta+r.w+l-2*Math.PI;u.theta<s&&(u.theta=s,t=!0)}return o});function he(o,l,t,n){const u=o-Math.PI/2,r=l-Math.PI/2,s=Math.cos(u)*t,c=Math.sin(u)*t,k=Math.cos(r)*t,y=Math.sin(r)*t,A=Math.cos(r)*n,i=Math.sin(r)*n,g=Math.cos(u)*n,w=Math.sin(u)*n,x=l-o>Math.PI?1:0;return`M${s},${c} A${t},${t} 0 ${x} 1 ${k},${y} L${A},${i} A${n},${n} 0 ${x} 0 ${g},${w} Z`}function F(o,l){const t=f.value.inner,n=o.startAngle-Math.PI/2,u=o.endAngle-Math.PI/2,r=l.startAngle-Math.PI/2,s=l.endAngle-Math.PI/2,c=Math.cos(n)*t,k=Math.sin(n)*t,y=Math.cos(u)*t,A=Math.sin(u)*t,i=Math.cos(r)*t,g=Math.sin(r)*t,w=Math.cos(s)*t,x=Math.sin(s)*t,I=o.endAngle-o.startAngle>Math.PI?1:0,S=l.endAngle-l.startAngle>Math.PI?1:0;return`M${c},${k}A${t},${t} 0 ${I} 1 ${y},${A}Q0,0 ${i},${g}A${t},${t} 0 ${S} 1 ${w},${x}Q0,0 ${c},${k}Z`}const fe=e.computed(()=>$.value*Math.PI/180);function qe(o){return(o.startAngle+o.endAngle)/2}function Re(o){return((qe(o)+fe.value)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}function De(o){let l=o+fe.value;return l=(l%(2*Math.PI)+2*Math.PI)%(2*Math.PI),l>Math.PI?"end":"start"}function Ue(o){const l=o-Math.PI/2,t=Math.cos(l)*(f.value.outer+a.value.style.chart.arcs.labels.offset+24),n=Math.sin(l)*(f.value.outer+a.value.style.chart.arcs.labels.offset+24);return`translate(${t},${n})`}function Xe(o,l,t){const n=o-Math.PI/2,u=l-Math.PI/2,r=Math.cos(n)*t,s=Math.sin(n)*t,c=Math.cos(u)*t,k=Math.sin(u)*t,y=l-o>Math.PI?1:0;return`M${r},${s} A${t},${t} 0 ${y} 1 ${c},${k}`}const $=e.ref(a.value.initialRotation),Y=e.ref(!1);let me=0,pe=0;function ge(o){const l=V.value.getBoundingClientRect(),t=l.left+l.width/2,n=l.top+l.height/2,u=o.clientX??o.touches[0].clientX,r=o.clientY??o.touches[0].clientY;return Math.atan2(r-n,u-t)}function be(o){!a.value.enableRotation||z.value||(o.preventDefault(),Y.value=!0,me=$.value,pe=ge(o))}function q(o){if(!Y.value)return;const l=ge(o);$.value=me+(l-pe)*180/Math.PI}function R(){Y.value=!1}function ke(o){return d.applyDataLabel(a.value.style.chart.ribbons.labels.formatter,o,d.dataLabel({p:a.value.style.chart.ribbons.labels.prefix,v:o,s:a.value.style.chart.ribbons.labels.suffix,r:a.value.style.chart.ribbons.labels.rounding}))}e.onMounted(()=>{window.addEventListener("mousemove",q),window.addEventListener("mouseup",R),window.addEventListener("touchmove",q,{passive:!1}),window.addEventListener("touchend",R)}),e.onBeforeUnmount(()=>{window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",R),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",R),clearTimeout(ve.value),X.value&&X.value.disconnect()});const G=e.ref(!1);function je(o){G.value=o,H.value+=1}function Ye(o){v.value||(b.value=o)}function Ge(o){v.value||(m.value=o)}function ye(o){var n;return!v.value&&!b.value&&!m.value?.8:(v.value?v.value===o.source.groupId:b.value?b.value.id===o.source.groupId:((n=m.value)==null?void 0:n.id)===o.id)?1:.1}function Ce(o){var n,u;return!v.value&&!b.value&&!m.value||(v.value?v.value===o.id:b.value?b.value.id===o.id:[(n=m.value)==null?void 0:n.source.groupId,(u=m.value)==null?void 0:u.target.groupId].includes(o.id))?1:.3}const z=e.ref(!1);function W(){z.value=!z.value}function $e(){T.value.showTable=!T.value.showTable}function We(){return C.value}const _=e.ref(null);function we(){const o=a.value.initialRotation;_.value!==null&&cancelAnimationFrame(_.value);const l=()=>{$.value+=(o-$.value)*.05,Math.abs($.value-o)<.1?($.value=o,_.value=null):_.value=requestAnimationFrame(l)};_.value=requestAnimationFrame(l)}e.onBeforeUnmount(()=>{_.value!==null&&cancelAnimationFrame(_.value)});function Be(o){o===v.value?(v.value=null,L("selectLegend",null)):(v.value=o,L("selectLegend",C.value.groups.find(l=>l.id===o)))}const Me=e.computed(()=>C.value.groups.map((o,l)=>({name:o.name,color:o.color,shape:"circle",patternIndex:l,pattern:`pattern_${B.value}_${l}`,id:o.id,select:()=>Be(o.id),opacity:v.value?v.value===o.id?1:.3:1}))),He=e.computed(()=>({cy:"chord-div-legend",backgroundColor:a.value.style.chart.legend.backgroundColor,color:a.value.style.chart.legend.color,fontSize:a.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:a.value.style.chart.legend.bold?"bold":""})),D=e.computed(()=>{const o=C.value.groups.map((t,n)=>({name:t.name||n,color:t.color})),l=p.value.matrix;return{head:o,body:l}}),U=e.computed(()=>{const o=[{name:"",color:null},...D.value.head],l=D.value.body.map((u,r)=>[D.value.head[r],...D.value.body[r]]),t={th:{backgroundColor:a.value.table.th.backgroundColor,color:a.value.table.th.color,outline:a.value.table.th.outline},td:{backgroundColor:a.value.table.td.backgroundColor,color:a.value.table.td.color,outline:a.value.table.td.outline},breakpoint:a.value.table.responsiveBreakpoint};return{colNames:o,head:o,body:l,config:t}});function xe(){e.nextTick(()=>{const o=p.value.matrix.map((n,u)=>[[p.value.labels[u]||u],n]),l=[[a.value.style.chart.title.text],[a.value.style.chart.title.subtitle.text],[[""],...p.value.labels.map((n,u)=>[n||u])]].concat(o),t=d.createCsvContent(l);d.downloadCsv({csvContent:t,title:a.value.style.chart.title.text||"vue-ui-chord"})})}return Se({getData:We,generateCsv:xe,generateImage:ue,generatePdf:se,toggleAnnotator:W,toggleTable:$e}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"chordChart",ref:E,class:e.normalizeClass({"vue-ui-chord":!0,"vue-data-ui-wrapper-fullscreen":G.value,"vue-data-ui-responsive":a.value.responsive}),style:e.normalizeStyle(`font-family:${a.value.style.fontFamily};width:100%; text-align:center;background:${a.value.style.chart.backgroundColor}`),id:`chord_${B.value}`,onMouseenter:l[4]||(l[4]=()=>e.unref(ae)(!0)),onMouseleave:l[5]||(l[5]=()=>e.unref(ae)(!1))},[a.value.userOptions.buttons.annotator&&e.unref(V)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:a.value.style.chart.color,backgroundColor:a.value.style.chart.backgroundColor,active:z.value,svgRef:e.unref(V),onClose:W},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:K,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),a.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Je._sfc_main,{key:`title_${ee.value}`,config:{title:{cy:"chord-div-title",...a.value.style.chart.title},subtitle:{cy:"chord-div-subtitle",...a.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),a.value.userOptions.show&&P.value&&(e.unref(le)||e.unref(j))?(e.openBlock(),e.createBlock(Ae.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(re),uid:B.value,hasTooltip:!1,hasPdf:a.value.userOptions.buttons.pdf,hasImg:a.value.userOptions.buttons.img,hasXls:a.value.userOptions.buttons.csv,hasTable:a.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:a.value.userOptions.buttons.fullscreen,isFullscreen:G.value,chartElement:E.value,position:a.value.userOptions.position,titles:{...a.value.userOptions.buttonTitles},hasAnnotator:a.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:je,onGeneratePdf:e.unref(se),onGenerateCsv:xe,onGenerateImage:e.unref(ue),onToggleTable:$e,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(le)?e.unref(j)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:t,color:n})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:t,color:n})),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.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:t,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:t,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:t,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:t,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(d.XMLNS),ref_key:"svgRef",ref:V,viewBox:`0 0 ${M.value.width} ${M.value.height}`,preserveAspectRatio:"xMidYMid meet",style:{overflow:"visible"},onMousedown:e.withModifiers(be,["prevent"]),onTouchstart:e.withModifiers(be,["prevent"])},[e.createVNode(Ke._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:M.value.width<=0?10:M.value.width,height:M.value.height<=0?10:M.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ct)):e.createCommentVNode("",!0),a.value.style.chart.arcs.labels.curved?(e.openBlock(),e.createElementBlock("defs",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("path",{key:`labelPath-${n}`,id:`labelPath-${n}_${B.value}`,d:Xe(t.startAngle,t.endAngle,(f.value.inner+f.value.outer)/2+a.value.style.chart.arcs.labels.offset),fill:"none"},null,8,vt))),128))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:t.index,patternId:`pattern_${B.value}_${n}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${M.value.width/2}, ${M.value.height/2}) rotate(${$.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("path",{class:e.normalizeClass({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":a.value.useCssAnimation&&!N.value}),key:`arc-${n}`,d:he(t.startAngle,t.endAngle,f.value.outer,f.value.inner),fill:p.value.colors[n],stroke:a.value.style.chart.arcs.stroke,"stroke-width":a.value.style.chart.arcs.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:Ce(t)}),onMouseenter:()=>Ye(t),onMouseleave:l[0]||(l[0]=u=>b.value=null),onClick:u=>L("selectGroup",t)},null,46,mt)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{class:e.normalizeClass({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":a.value.useCssAnimation&&!N.value}),key:`arc-${n}`,d:he(t.startAngle,t.endAngle,f.value.outer,f.value.inner),fill:`url(#${t.pattern})`,stroke:a.value.style.chart.arcs.stroke,"stroke-width":a.value.style.chart.arcs.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:Ce(t),pointerEvents:"none"})},null,14,pt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value?C.value.chords.filter(t=>t.source.groupId===b.value.id):v.value?C.value.chords.filter(t=>t.source.groupId===v.value):C.value.chords,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`ribbon-${t.id}`},[t.source.value?(e.openBlock(),e.createElementBlock("path",{key:0,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:a.value.style.chart.backgroundColor,style:e.normalizeStyle({opacity:a.value.style.chart.ribbons.underlayerOpacity})},null,14,gt)):e.createCommentVNode("",!0),t.source.value?(e.openBlock(),e.createElementBlock("path",{key:1,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:p.value.colors[t.source.index],stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:ye(t)}),onMouseenter:()=>Ge({...t,path:F(t.source,t.target),color:p.value.colors[t.source.index]}),onClick:n=>L("selectRibbon",{...t,color:p.value.colors[t.source.index]}),onMouseleave:l[1]||(l[1]=n=>m.value=null)},null,46,bt)):e.createCommentVNode("",!0),t.source.value&&o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{key:2,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:`url(#pattern_${B.value}_${t.source.index})`,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:ye(t),pointerEvents:"none"})},null,14,kt)):e.createCommentVNode("",!0)],64))),128)),m.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:m.value.path,fill:m.value.color,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:"none"}},null,8,yt)):e.createCommentVNode("",!0),m.value&&o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{key:1,d:m.value.path,fill:`url(#${m.value.source.pattern})`,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:"none"}},null,8,Ct)):e.createCommentVNode("",!0)]),(b.value||m.value||v.value)&&a.value.style.chart.ribbons.labels.show?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Fe.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("line",{x1:t.midBaseX,y1:t.midBaseY,x2:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),y2:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),stroke:a.value.style.chart.backgroundColor,"stroke-width":a.value.style.chart.ribbons.labels.connector.strokeWidth*3,"pointer-events":"none"},null,8,wt),e.createElementVNode("line",{x1:t.midBaseX,y1:t.midBaseY,x2:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),y2:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),stroke:a.value.style.chart.ribbons.labels.connector.stroke,"stroke-width":a.value.style.chart.ribbons.labels.connector.strokeWidth,"pointer-events":"none"},null,8,Bt),a.value.style.chart.ribbons.labels.marker.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),cy:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),r:a.value.style.chart.ribbons.labels.marker.radius,stroke:a.value.style.chart.ribbons.labels.marker.stroke,"stroke-width":a.value.style.chart.ribbons.labels.marker.strokeWidth,fill:t.groupColor,"pointer-events":"none"},null,8,Mt)):e.createCommentVNode("",!0),e.createElementVNode("text",{transform:`
|
|
9
|
+
translate(
|
|
10
|
+
${Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+24)},
|
|
11
|
+
${Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+24)}
|
|
12
|
+
) rotate(${-$.value})
|
|
13
|
+
`,fill:a.value.style.chart.ribbons.labels.useSerieColor?t.groupColor:a.value.style.chart.ribbons.labels.color,"text-anchor":De(t.theta),"font-size":a.value.style.chart.ribbons.labels.fontSize,"font-weight":a.value.style.chart.ribbons.labels.bold?"bold":"normal",dy:".35em","pointer-events":"none"},e.toDisplayString(ke(t.value)),9,xt)],64))),128))])):e.createCommentVNode("",!0),a.value.style.chart.arcs.labels.show?(e.openBlock(),e.createElementBlock("g",Pt,[a.value.style.chart.arcs.labels.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("text",{key:`curved-label-${n}`,"font-size":a.value.style.chart.arcs.labels.fontSize,"font-weight":a.value.style.chart.arcs.labels.bold?"bold":"normal",fill:a.value.style.chart.arcs.labels.adaptColorToBackground?e.unref(d.adaptColorToBackground)(p.value.colors[n]):a.value.style.chart.arcs.labels.color},[e.createElementVNode("textPath",{href:`#labelPath-${n}_${B.value}`,startOffset:"50%","text-anchor":"middle"},e.toDisplayString(p.value.labels[n]),9,It)],8,At))),128)):!b.value&&!m.value&&!v.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("text",{key:`label-${n}`,transform:`
|
|
14
|
+
${Ue((t.startAngle+t.endAngle)/2)}
|
|
15
|
+
rotate(${-$.value})
|
|
16
|
+
`,dy:".35em","text-anchor":Re(t)>Math.PI?"end":"start","font-size":a.value.style.chart.arcs.labels.fontSize,"font-weight":a.value.style.chart.arcs.labels.bold?"bold":"normal",fill:a.value.style.chart.arcs.labels.color},e.toDisplayString(p.value.labels[n]),9,_t))),128)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],8,ft),e.renderSlot(o.$slots,"svg",{svg:{height:600,width:600}},void 0,!0)],40,it)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",St,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ne)||e.unref(re)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(rt.default,{key:6,config:{type:"chord",style:{backgroundColor:a.value.style.chart.backgroundColor,chord:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[a.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ot.Legend,{key:`legend_${oe.value}`,legendSet:Me.value,config:He.value,onClickMarker:l[2]||(l[2]=({legend:t})=>Be(t.id))},e.createSlots({item:e.withCtx(({legend:t,index:n})=>[e.createElementVNode("div",{style:e.normalizeStyle({opacity:v.value?v.value===t.id?1:.3:1}),onClick:u=>t.select()},e.toDisplayString(t.name),13,Et)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:t,index:n})=>[e.createVNode(at._sfc_main,{shape:t.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${B.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:Me.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:J,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value!==a.value.initialRotation?(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(o.$slots,"reset-action",{reset:we},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:a.value.style.chart.backgroundColor}),onClick:we},[e.createVNode(tt.default,{name:"refresh",stroke:a.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(nt.default,{key:9,hideDetails:"",config:{open:T.value.showTable,maxHeight:1e4,body:{backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color},head:{backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(lt.DataTable,{key:`table_${te.value}`,colNames:U.value.colNames,head:U.value.head,body:U.value.body,config:U.value.config,title:`${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text?` : ${a.value.style.chart.title.subtitle.text}`:""}`,onClose:l[3]||(l[3]=t=>T.value.showTable=!1)},{th:e.withCtx(({th:t})=>[e.createTextVNode(e.toDisplayString(t.name),1)]),td:e.withCtx(({td:t})=>[e.createElementVNode("div",Vt,e.toDisplayString(t.name?t.name:ke(t)),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ut))}},zt=st._export_sfc(Tt,[["__scopeId","data-v-5f1eebd5"]]);exports.default=zt;
|