vue-data-ui 2.4.0 → 2.4.2
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 +56 -54
- package/dist/{Arrow-CbntjQjr.cjs → Arrow-DLTRnzcG.cjs} +1 -1
- package/dist/{Arrow-NcE21Ngm.js → Arrow-JuK2z9IB.js} +1 -1
- package/dist/BaseIcon-BGExhz6v.cjs +1 -0
- package/dist/{BaseIcon-BUTpMnXi.js → BaseIcon-rRli6Sfv.js} +8 -4
- package/dist/{DataTable-BwH-MU-S.cjs → DataTable-DJzhv96s.cjs} +1 -1
- package/dist/{DataTable-DAgyf9zN.js → DataTable-DTk7C4Pr.js} +2 -2
- package/dist/{Legend-DBhpIX2x.js → Legend-CYF2gpXG.js} +23 -17
- package/dist/Legend-YZ7Hz3o1.cjs +1 -0
- package/dist/{PackageVersion-wB6dCDZw.js → PackageVersion-CvCRsT5_.js} +1 -1
- package/dist/{PackageVersion-Djty0wb2.cjs → PackageVersion-DVZtsuy4.cjs} +1 -1
- package/dist/PenAndPaper-CyXm-yVL.cjs +1 -0
- package/dist/PenAndPaper-Jb0pLt3G.js +269 -0
- package/dist/{Shape-CQVJz33T.js → Shape-BpPn4eWR.js} +1 -1
- package/dist/{Shape-DQ0Hh2Gg.cjs → Shape-X2F-QV_B.cjs} +1 -1
- package/dist/{Slicer-CiSmaE0_.cjs → Slicer-CL0tP5a5.cjs} +1 -1
- package/dist/{Slicer-DXw23eOC.js → Slicer-CU7dRZR0.js} +2 -2
- package/dist/{Title-DlVZnHjs.js → Title-5VmBwT4i.js} +21 -17
- package/dist/Title-Co5jI5ed.cjs +1 -0
- package/dist/{Tooltip-DBzXz806.cjs → Tooltip-Bl6W8Zn7.cjs} +1 -1
- package/dist/{Tooltip-CveCRFgK.js → Tooltip-Cj4EF7v1.js} +1 -1
- package/dist/documentation/installation.md +10 -9
- package/dist/{index-B0CpCD8z.js → index-DnVHQ2xI.js} +1138 -907
- package/dist/index-FfZRtJ6A.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +101 -20
- package/dist/types/vue-data-ui.d.ts +101 -20
- package/dist/{useNestedProp-DGWP4D-K.js → useNestedProp-Cox0K0Y5.js} +1 -1
- package/dist/{useNestedProp-iuDCMc2p.cjs → useNestedProp-q7byAAIJ.cjs} +1 -1
- package/dist/usePrinter-BCAFeO_J.cjs +1 -0
- package/dist/{usePrinter-Dr30K4cu.js → usePrinter-BEeNAqS5.js} +230 -185
- package/dist/vue-data-ui-CRLLZpt0.cjs +9 -0
- package/dist/vue-data-ui-W7nnqn0v.js +261 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +52 -51
- package/dist/{vue-ui-3d-bar-C3hYrYTV.js → vue-ui-3d-bar-BwBrUabe.js} +414 -390
- package/dist/vue-ui-3d-bar-bD_n6qL_.cjs +19 -0
- package/dist/{vue-ui-accordion-CmENcGVW.js → vue-ui-accordion-DspS4q3f.js} +3 -3
- package/dist/{vue-ui-accordion-Deyo7jw7.cjs → vue-ui-accordion-xXgqfR2l.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-C075Lvfe.js → vue-ui-age-pyramid-CxBvm3uM.js} +218 -194
- package/dist/{vue-ui-annotator-Bb6fUz4x.js → vue-ui-annotator-BOofWpzv.js} +1 -1
- package/dist/{vue-ui-annotator-DslXalSQ.cjs → vue-ui-annotator-C6T5_7ZV.cjs} +1 -1
- package/dist/vue-ui-bullet-ChaEgXvR.cjs +23 -0
- package/dist/vue-ui-bullet-DraC-oFu.js +433 -0
- package/dist/vue-ui-candlestick--hPCfMFH.cjs +2 -0
- package/dist/{vue-ui-candlestick-C4VEOmY_.js → vue-ui-candlestick-DQZ5eT1f.js} +267 -243
- package/dist/{vue-ui-carousel-table-Coq4gg_P.cjs → vue-ui-carousel-table-DpRQklDZ.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DZfMMpZ7.js → vue-ui-carousel-table-PdLjpH1p.js} +4 -4
- package/dist/{vue-ui-chestnut-CUnbj-Zb.js → vue-ui-chestnut-ByI_O5hB.js} +293 -269
- package/dist/vue-ui-chestnut-ae6x87wl.cjs +6 -0
- package/dist/{vue-ui-cursor-CtuPho-s.js → vue-ui-cursor-BM74l93B.js} +2 -2
- package/dist/{vue-ui-cursor-B9UvQwLp.cjs → vue-ui-cursor-BvadpA2m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-8gQ1bGCn.js → vue-ui-dashboard-CoANBhAM.js} +2 -2
- package/dist/{vue-ui-dashboard-KMTRqXzR.cjs → vue-ui-dashboard-OP51Gs8I.cjs} +1 -1
- package/dist/{vue-ui-digits-DSMNN4z_.cjs → vue-ui-digits-C7jJJg9k.cjs} +1 -1
- package/dist/{vue-ui-digits-DuEyX8op.js → vue-ui-digits-DioaBnkB.js} +2 -2
- package/dist/vue-ui-donut-CplNylps.cjs +1 -0
- package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DbojarYN.js → vue-ui-donut-evolution-DAb1xzNd.js} +330 -306
- package/dist/{vue-ui-donut-0xdYBc41.js → vue-ui-donut-ldqSm_JV.js} +345 -321
- package/dist/{vue-ui-dumbbell-BxhWjCvR.js → vue-ui-dumbbell-Dg7PkiKJ.js} +265 -241
- package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +9 -0
- package/dist/vue-ui-flow-BPt35d5K.cjs +1 -0
- package/dist/vue-ui-flow-DKT7ZEnr.js +508 -0
- package/dist/vue-ui-galaxy-e06PkTmp.cjs +1 -0
- package/dist/{vue-ui-galaxy-BddgLpP-.js → vue-ui-galaxy-qAA9be3S.js} +193 -169
- package/dist/vue-ui-gauge-D8yVTIgP.js +518 -0
- package/dist/vue-ui-gauge-DiZVIU0D.cjs +1 -0
- package/dist/{vue-ui-gizmo-hXBWaB0c.js → vue-ui-gizmo-DC0uUwI3.js} +3 -3
- package/dist/{vue-ui-gizmo-DRASsqlp.cjs → vue-ui-gizmo-W6bTkg59.cjs} +1 -1
- package/dist/vue-ui-heatmap-CbZcv_2I.cjs +1 -0
- package/dist/{vue-ui-heatmap-B43q8UHu.js → vue-ui-heatmap-u1raIzBQ.js} +252 -228
- package/dist/{vue-ui-kpi-_GVnhxEd.js → vue-ui-kpi-C-iTxMD2.js} +3 -3
- package/dist/{vue-ui-kpi-BiJnqtGR.cjs → vue-ui-kpi-DY_2WF7U.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DVZtFcHw.cjs → vue-ui-mini-loader-Bfq2MNWu.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-qvtu5jtI.js → vue-ui-mini-loader-C7x7S0hi.js} +2 -2
- package/dist/vue-ui-molecule-BFnOIxxs.js +798 -0
- package/dist/vue-ui-molecule-CbKMLrDT.cjs +1 -0
- package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +1 -0
- package/dist/{vue-ui-mood-radar-iZJ0B1Wf.js → vue-ui-mood-radar-CR1v5v2x.js} +263 -239
- package/dist/{vue-ui-nested-donuts-CovQfZ81.js → vue-ui-nested-donuts-DEiloQzq.js} +342 -318
- package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +17 -0
- package/dist/vue-ui-onion-CLvvu4Ku.cjs +5 -0
- package/dist/{vue-ui-onion-CJb2Pg0t.js → vue-ui-onion-LsEhBe4x.js} +226 -202
- package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CUA_fFC3.js → vue-ui-parallel-coordinate-plot-CTlIjJqG.js} +243 -219
- package/dist/{vue-ui-quadrant-IAIp5IZq.js → vue-ui-quadrant-DKVVFufb.js} +350 -326
- package/dist/vue-ui-quadrant-OM5J1mG3.cjs +1 -0
- package/dist/{vue-ui-quick-chart-Bb2RQ6qI.js → vue-ui-quick-chart-8vJikiGH.js} +505 -481
- package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +15 -0
- package/dist/{vue-ui-radar-mIQMBRHx.js → vue-ui-radar-20QhOUer.js} +255 -231
- package/dist/vue-ui-radar-CAaHjDO7.cjs +1 -0
- package/dist/{vue-ui-rating-BGRWSTGr.cjs → vue-ui-rating-Bbzm5nUK.cjs} +1 -1
- package/dist/{vue-ui-rating-DcJb7_bV.js → vue-ui-rating-DRWJsve1.js} +2 -2
- package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +1 -0
- package/dist/vue-ui-relation-circle-I45_Sk5l.js +349 -0
- package/dist/vue-ui-rings-B9WQ7S5m.cjs +2 -0
- package/dist/vue-ui-rings-DG8GCi3y.js +593 -0
- package/dist/vue-ui-scatter-BZfg1YIN.cjs +1 -0
- package/dist/{vue-ui-scatter-DiQJtMz1.js → vue-ui-scatter-Hqu5-F2H.js} +369 -345
- package/dist/{vue-ui-screenshot-BdnW3WFN.cjs → vue-ui-screenshot-D8nxd5RV.cjs} +1 -1
- package/dist/{vue-ui-screenshot-QRt5bT48.js → vue-ui-screenshot-cjiqbtLK.js} +1 -1
- package/dist/{vue-ui-skeleton-fqwO2mHD.cjs → vue-ui-skeleton-Djv08J67.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DEv_1TFa.js → vue-ui-skeleton-aZmkNzAe.js} +3 -3
- package/dist/{vue-ui-smiley-D-zRYR9g.cjs → vue-ui-smiley-B1TA19Hv.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAr3XuJG.js → vue-ui-smiley-ChNvxygm.js} +2 -2
- package/dist/{vue-ui-spark-trend-Br0GTMx_.cjs → vue-ui-spark-trend-BqrPr63O.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CS6jl2aN.js → vue-ui-spark-trend-CQxELQcf.js} +5 -5
- package/dist/{vue-ui-sparkbar-tgfbnVYO.js → vue-ui-sparkbar-0ixbKZzf.js} +4 -4
- package/dist/{vue-ui-sparkbar-N8aFbuJv.cjs → vue-ui-sparkbar-CrTEPTU5.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge--hgbxLQS.cjs → vue-ui-sparkgauge-BYxpe_WV.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CqH25hj7.js → vue-ui-sparkgauge-pdYb7OwH.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-vVRA6Z_l.cjs → vue-ui-sparkhistogram-D21XDUH2.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cry2PFGH.js → vue-ui-sparkhistogram-N69h2q0U.js} +5 -5
- package/dist/{vue-ui-sparkline-DXwqMlzQ.js → vue-ui-sparkline-2BKYZMOb.js} +4 -4
- package/dist/{vue-ui-sparkline-BZir7JxD.cjs → vue-ui-sparkline-Cf4m-Fxo.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Dc6tZvej.cjs → vue-ui-sparkstackbar-dAS8XoJs.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CQjpberv.js → vue-ui-sparkstackbar-sh03cuOU.js} +4 -4
- package/dist/vue-ui-stackbar-B1si-1RM.js +938 -0
- package/dist/vue-ui-stackbar-Dy_saeSe.cjs +6 -0
- package/dist/{vue-ui-strip-plot-C8dme7tS.js → vue-ui-strip-plot-BYn-QrTQ.js} +274 -250
- package/dist/vue-ui-strip-plot-D53LABpZ.cjs +1 -0
- package/dist/{vue-ui-table-DGmUNjR_.cjs → vue-ui-table-Ce4waJaj.cjs} +1 -1
- package/dist/{vue-ui-table-BvbXppa1.js → vue-ui-table-DQORPCDJ.js} +1 -1
- package/dist/{vue-ui-table-heatmap-ccoLJyce.js → vue-ui-table-heatmap-Csp7Tx8N.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Ch2UwsIw.cjs → vue-ui-table-heatmap-EqHt-O7Y.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DT5a8gHs.cjs → vue-ui-table-sparkline-DONmVOMh.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BZ8faxdR.js → vue-ui-table-sparkline-DdwVrfUj.js} +5 -5
- package/dist/vue-ui-thermometer-I6ZnlfAv.js +440 -0
- package/dist/vue-ui-thermometer-hQBkMa7u.cjs +1 -0
- package/dist/{vue-ui-timer-CNpKGbIg.cjs → vue-ui-timer-COOXcn14.cjs} +1 -1
- package/dist/{vue-ui-timer-DE_m5wxu.js → vue-ui-timer-pi1SazTU.js} +5 -5
- package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +1 -0
- package/dist/vue-ui-tiremarks-vdPQYiDp.js +303 -0
- package/dist/vue-ui-treemap-3FNUlKxL.js +816 -0
- package/dist/vue-ui-treemap-Cv0TSFQa.cjs +1 -0
- package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CVZI3v1Y.js → vue-ui-vertical-bar-DwxpB46q.js} +312 -288
- package/dist/vue-ui-waffle-CKM0QyJN.cjs +1 -0
- package/dist/vue-ui-waffle-XecHJIc-.js +782 -0
- package/dist/vue-ui-wheel-Bbih5sSL.js +282 -0
- package/dist/vue-ui-wheel-C0dJrzOJ.cjs +1 -0
- package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +1 -0
- package/dist/vue-ui-word-cloud-DnhXUn5x.js +598 -0
- package/dist/vue-ui-xy-BDpqVzAq.cjs +3 -0
- package/dist/{vue-ui-xy-D3TaTkPR.js → vue-ui-xy-CqlRuFMc.js} +775 -751
- package/dist/{vue-ui-xy-canvas-ClETpddw.js → vue-ui-xy-canvas-C8c2X5fk.js} +409 -385
- package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +9 -0
- package/package.json +1 -1
- package/dist/BaseIcon-7IlvRUX2.cjs +0 -1
- package/dist/Legend-CHQgjBuK.cjs +0 -1
- package/dist/Title-BHmTg9iK.cjs +0 -1
- package/dist/index-Dfhvf8hT.cjs +0 -9
- package/dist/usePrinter-BQQasUin.cjs +0 -1
- package/dist/vue-data-ui-BdSFeW_X.js +0 -256
- package/dist/vue-data-ui-BgVPGbxq.cjs +0 -9
- package/dist/vue-ui-3d-bar-DhHuwXZ1.cjs +0 -19
- package/dist/vue-ui-age-pyramid-DaenyRp2.cjs +0 -1
- package/dist/vue-ui-candlestick-CnVzd826.cjs +0 -2
- package/dist/vue-ui-chestnut-CLnJ0jmo.cjs +0 -6
- package/dist/vue-ui-donut-C4ek9m3R.cjs +0 -1
- package/dist/vue-ui-donut-evolution-B4TkwvNq.cjs +0 -1
- package/dist/vue-ui-dumbbell-Cn3spRSv.cjs +0 -9
- package/dist/vue-ui-flow-D00VdtGU.cjs +0 -1
- package/dist/vue-ui-flow-DreN8go4.js +0 -484
- package/dist/vue-ui-galaxy-DVN-S67V.cjs +0 -1
- package/dist/vue-ui-gauge-DYZYFzHP.cjs +0 -1
- package/dist/vue-ui-gauge-DoTctAHq.js +0 -494
- package/dist/vue-ui-heatmap-ldCySJFf.cjs +0 -1
- package/dist/vue-ui-molecule-DP9jhODZ.cjs +0 -1
- package/dist/vue-ui-molecule-Dpu7Xmu5.js +0 -774
- package/dist/vue-ui-mood-radar-BR0INhYL.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CwIsGnyH.cjs +0 -17
- package/dist/vue-ui-onion-DjEChSmi.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-B8Kl6AMk.cjs +0 -8
- package/dist/vue-ui-quadrant-CmdbW8yZ.cjs +0 -1
- package/dist/vue-ui-quick-chart-DcEk6Ho7.cjs +0 -15
- package/dist/vue-ui-radar-TjgO9_LA.cjs +0 -1
- package/dist/vue-ui-relation-circle-f0fKvSSw.js +0 -325
- package/dist/vue-ui-relation-circle-x4sKnxbi.cjs +0 -1
- package/dist/vue-ui-rings-B3mUyyQ9.cjs +0 -2
- package/dist/vue-ui-rings-M1PUv5Wu.js +0 -569
- package/dist/vue-ui-scatter-DF_nobsG.cjs +0 -1
- package/dist/vue-ui-stackbar-BF0M1KJf.js +0 -915
- package/dist/vue-ui-stackbar-BGmTwxvv.cjs +0 -6
- package/dist/vue-ui-strip-plot-DT9Od_To.cjs +0 -1
- package/dist/vue-ui-thermometer-BOs1_H4X.js +0 -416
- package/dist/vue-ui-thermometer-Biv2CIsy.cjs +0 -1
- package/dist/vue-ui-tiremarks-CTMS_E0z.js +0 -279
- package/dist/vue-ui-tiremarks-YU4wuZl3.cjs +0 -1
- package/dist/vue-ui-treemap-5Dm82baA.js +0 -792
- package/dist/vue-ui-treemap-C0E1_DGA.cjs +0 -1
- package/dist/vue-ui-vertical-bar-CVZHDENz.cjs +0 -4
- package/dist/vue-ui-waffle-Bf4epEaH.js +0 -758
- package/dist/vue-ui-waffle-DD09_Fdb.cjs +0 -1
- package/dist/vue-ui-wheel-BybAQ0bR.cjs +0 -1
- package/dist/vue-ui-wheel-DMvZZCzi.js +0 -258
- package/dist/vue-ui-word-cloud-B8hdGDYI.js +0 -574
- package/dist/vue-ui-word-cloud-MQ0kgdPw.cjs +0 -1
- package/dist/vue-ui-xy-B4C0WR56.cjs +0 -3
- package/dist/vue-ui-xy-canvas-qbn0PHMN.cjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),Ne=require("./Title-Co5jI5ed.cjs"),ve=require("./usePrinter-BCAFeO_J.cjs"),Be=require("./Tooltip-Bl6W8Zn7.cjs"),_e=require("./Legend-YZ7Hz3o1.cjs"),Pe=require("./vue-ui-skeleton-Djv08J67.cjs"),ze=require("./DataTable-DJzhv96s.cjs"),Oe=require("./vue-ui-accordion-xXgqfR2l.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./useNestedProp-q7byAAIJ.cjs"),Ve=require("./PackageVersion-DVZtsuy4.cjs"),Ee=require("./PenAndPaper-CyXm-yVL.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function fe(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ge(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Re(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=fe(n,s),v=fe(u,s);return c>=v}}function Ae(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function Fe(n,d){const s={...d,children:n};return ye(s)}function Ie(n){return(n.x1-n.x0)*(n.y1-n.y0)}function me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},$=Object.assign({},k,B);w=x,m.push($)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},$=Object.assign({},k,B);b=x,m.push($)}return m}}function De(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function qe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function He(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=me(v,h);return f.concat(m)}const C=De(h),b=c[0],w=c.slice(1,p);if(Re(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let $=0;$<m;$+=1)g+=v[$].normalizedValue;const k=Me(h,g),x=me(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ye(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=qe(n.children,Ie(n)),s=He(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ye(s[h]));return Ae(c)}}function Me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ge(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ge(p)}}const We=n=>(e.pushScopeId("data-v-3cef6fec"),n=n(),e.popScopeId(),n),Ue=["id"],Ge=["xmlns","viewBox"],je={key:0},Xe=["id"],Ye=["stop-color"],Ze=["stop-color"],Je=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ke=["x","y","height","width"],Qe={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},et=We(()=>e.createElementVNode("br",null,null,-1)),tt={key:4,class:"vue-data-ui-watermark"},ot=["onClick"],lt={key:0},at={key:1},nt=["innerHTML"],rt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(0),$=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>Z(),set:o=>o});function Z(){const o=pe.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...pe.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=Z(),B.value+=1,$.value+=1,Y.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:ee}=ve.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function te(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),te(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{be()});function be(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),te(V.value),t.value.responsive){const o=he.throttle(()=>{const{width:a,height:l}=he.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),oe=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function le(o,a){return o.value/a}function ke(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-le(a,l);return r.lightenHexColor(o,i<0?0:i)}function ae(o,a,l,i){return o.map((y,z)=>{const M=ke(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),Se=le(y,i);return{...y,color:M,proportion:Se,parentName:l,children:y.children?ae(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>Fe(oe.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ae(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ne({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function re({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Ce(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),T=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function we(o){if(T.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}T.value=!T.value}const S=e.ref(null),ue=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),xe=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function se(o){T.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",oe.value)}const G=e.ref(null);function $e({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function ie(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Te(){return F.value}function ce(){_.value.showTable=!_.value.showTable}function de(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Te,generateCsv:ie,generateImage:ee,generatePdf:Q,toggleTable:ce,toggleTooltip:de,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ve.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:ie,onGenerateImage:e.unref(ee),onToggleTable:ce,onToggleTooltip:de,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},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:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",je,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ze)],8,Xe)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ne(l),width:re(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>we(l),onMouseenter:()=>$e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,Je),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ne(l),width:re(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",Qe,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),et,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:E(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Ke))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:T.value,rect:S.value,config:t.value})),void 0,!0)],14,Ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${Y.value}`,legendSet:ue.value,config:xe.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>se(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>se(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",at," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",lt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ot)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ue.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock(Oe.default,{key:6,hideDetails:"",config:{open:_.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${$.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ue))}},ut=Le._export_sfc(rt,[["__scopeId","data-v-3cef6fec"]]);exports.default=ut;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),ie=require("./useResponsive-B3TrDDIG.cjs"),Se=require("./Title-Co5jI5ed.cjs"),ce=require("./usePrinter-BCAFeO_J.cjs"),Ve=require("./Tooltip-Bl6W8Zn7.cjs"),de=require("./Legend-YZ7Hz3o1.cjs"),Te=require("./vue-ui-skeleton-Djv08J67.cjs"),Be=require("./BaseIcon-BGExhz6v.cjs"),Ee=require("./vue-ui-accordion-xXgqfR2l.cjs"),ve=require("./useNestedProp-q7byAAIJ.cjs"),Le=require("./PackageVersion-DVZtsuy4.cjs"),Pe=require("./PenAndPaper-CyXm-yVL.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),De=["id"],Fe=["onClick"],Me=["xmlns","viewBox"],Oe=["id"],Ie=["stop-color"],Ae=["stop-color"],Re=["x","y","width","height","fill","rx"],qe=["x","y","width","height","fill","rx","stroke","stroke-width"],He=["x2","y1","y2","stroke","stroke-width"],Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x","y","text-anchor","font-size","fill","font-weight"],je=["x","y","font-size","fill","font-weight"],Ge=["x","y","font-size","fill","font-weight"],We=["x","y","font-size","fill","font-weight"],Ye=["y","width","height","fill","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Qe={style:"width:100%;padding-top: 36px;position:relative"},Ze={class:"vue-ui-data-table"},et={key:0},tt={style:{width:"100%"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},st=["data-cell"],it={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vt=["data-cell"],ht={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},pt=["data-cell"],yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},gt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(he,{expose:pe,emit:ye}){const y=he;e.useCssVars(a=>({"19a6ca00":a.tdo}));const{vue_ui_vertical_bar:ge}=n.useConfig(),B=e.computed(()=>!!y.dataset&&y.dataset.length),C=e.ref(n.createUid()),fe=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),be=e.ref(null),q=e.ref(0),N=e.ref(null),H=e.ref(null),M=e.ref(null),X=e.ref(0),O=e.ref(0),t=e.computed({get:()=>U(),set:a=>a});function U(){const a=ve.useNestedProp({userConfig:y.config,defaultConfig:ge});return a.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||y.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>y.config,a=>{t.value=U(),Z(),X.value+=1,O.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>y.dataset,P,{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:Y}=ce.usePrinter({elementId:`vue-ui-vertical-bar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),K=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),J=e.ref(null),Q=e.ref(!1),me=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=y.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),ke(),t.value.responsive){const a=ie.throttle(()=>{const{width:o,height:l}=ie.useResponsive({chart:N.value,title:t.value.style.chart.title.text?H.value:null,legend:t.value.style.chart.legend.show?M.value:null});le.value=o,s.value=l/E.value-c.value*2});L.value=new ResizeObserver(a),L.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function ke(){new ResizeObserver(o=>{o.forEach(l=>{Q.value=l.contentRect.width<me.value})}).observe(J.value)}const p=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ee=e.computed(()=>p.value.sortDesc),_=e.computed(()=>(y.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),y.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${C.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(h=>h.value||0).reduce((h,m)=>h+m,0):0),i=v>=0?1:-1;return{...a,id:l,shape:"square",opacity:f.value.includes(l)?.5:1,value:Math.abs(v),sign:i,hasChildren:r,isChild:!1,segregate:()=>S(l),isSegregated:f.value.includes(l),color:n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((h,m)=>ee.value?m.value-h.value:h.value-m.value).map((h,m)=>({...h,value:n.checkNaN(Math.abs(h.value)),sign:h.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:i,id:`vertical_child_${o}_${m}_${C.value}`,childIndex:m,color:n.convertColorToHex(h.color)||n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((h,m)=>({...h,isFirstChild:m===0,isLastChild:m===a.children.length-1}))}}).toSorted((a,o)=>ee.value?o.value-a.value:a.value-o.value))),te=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Ce=e.computed(()=>(s.value+c.value)*E.value),le=e.ref(512),d=e.computed(()=>({width:le.value,height:Ce.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){E.value=x.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const f=e.ref([]);function S(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a),P(),ye("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(a=>!f.value.includes(a.id))),b=e.computed(()=>x.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function ae(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/b.value*100),s:"%",r:l}):Math.abs(a)/b.value}const w=e.computed(()=>x.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>w.value.map(a=>a.sign).includes(-1)),_e=e.computed(()=>Math.max(...x.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function k(a){const o=a/_e.value;return u.value.width/($.value?2:1)*o}function xe(a){return k(a)+u.value.left}function V(a,o){const l=x.value.find(i=>i.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/b.value)?"":ae(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Ne(){return x.value}const I=e.ref(null),A=e.ref(null);function we(a,o){A.value={datapoint:a,seriesIndex:o,series:_.value,config:t.value},D.value=!0,I.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",i=t.value.style.chart.tooltip.customFormat;n.isFunction(i)&&n.functionReturnsString(()=>i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}))?F.value=i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
|
+
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${a.color}"/></svg> ${r}</div>
|
|
3
|
+
${v?`<div>${v}</div>`:""}
|
|
4
|
+
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/b.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),F.value=`<div style="text-align:left">${l}</div>`)}function oe(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),i=`(${ae(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${i}`:""}`}const g=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=w.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/b.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/b.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ne(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,l=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const T=e.ref(!1);function $e(a){T.value=a,q.value+=1}function re(){p.value.showTable=!p.value.showTable}function ue(){p.value.sortDesc=!p.value.sortDesc,P()}function se(){p.value.showTooltip=!p.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return pe({getData:Ne,recalculateHeight:P,generatePdf:W,generateCsv:ne,generateImage:Y,toggleTable:re,toggleSort:ue,toggleTooltip:se,toggleAnnotator:R}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:N,id:`vue-ui-vertical-bar_${C.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&B.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:fe,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),uid:C.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:T.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(W),onGenerateCsv:ne,onGenerateImage:e.unref(Y),onToggleTable:re,onToggleSort:ue,onToggleTooltip:se,onToggleAnnotator:R},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_top_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[0]||(o[0]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Fe)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Le._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${C.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,Ae)],8,Oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Re)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${C.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,qe),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==w.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):xe(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(oe(l.value,l,r,l.sign)),9,Ue),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(V(l,r).name),9,Ge)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(oe(V(l,r).value),V(l,r),r,l.parentSign||l.sign),9,We)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:d.value.width<=0?1e-4:d.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:I.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>we(l,r),onMouseleave:o[1]||(o[1]=v=>{be.value=null,D.value=!1,I.value=null})},null,40,Ye)]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_bottom_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[2]||(o[2]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Je)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:_.value},void 0,!0),e.createVNode(Ve._sfc_main,{show:p.value.showTooltip&&D.value&&f.value.length<y.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:F.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),B.value?(e.openBlock(),e.createBlock(Ee.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:J,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>p.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>p.value.showTable=!1,["enter"]))},[e.createVNode(Be.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":Q.value})},[e.createElementVNode("table",Ze,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(b.value)?"":b.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":g.value.head[0]??""},[e.createElementVNode("div",at,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,lt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",nt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ot),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",ut,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,rt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",it,e.toDisplayString(l.childName),1)],12,st),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",dt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",ht,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,vt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",yt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,De))}},ft=ze._export_sfc(gt,[["__scopeId","data-v-fdf1fdac"]]);exports.default=ft;
|