vue-data-ui 2.10.5 → 2.10.6

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.
Files changed (167) hide show
  1. package/dist/{Arrow-Badwqciu.cjs → Arrow-Cl3tB80E.cjs} +1 -1
  2. package/dist/{Arrow-Bb5xelJS.js → Arrow-rRiIHng2.js} +1 -1
  3. package/dist/{BaseIcon-HDOMbyJq.js → BaseIcon-COlnFbOq.js} +1 -1
  4. package/dist/{BaseIcon-CvuQ41yl.cjs → BaseIcon-CiINppo2.cjs} +1 -1
  5. package/dist/{ColorPicker-NOWXYDyd.cjs → ColorPicker-9QCAgrqp.cjs} +1 -1
  6. package/dist/{ColorPicker-BODnRb0v.js → ColorPicker-UNzkvlGG.js} +3 -3
  7. package/dist/{DataTable-CGMCHKzY.js → DataTable-CXbN2mJi.js} +2 -2
  8. package/dist/{DataTable-Bu_0tRZE.cjs → DataTable-DOiZOQ3J.cjs} +1 -1
  9. package/dist/{Legend-CLZW3_-V.js → Legend-BU9C5fBQ.js} +2 -2
  10. package/dist/{Legend-BDIC5aus.cjs → Legend-CFqKBI0j.cjs} +1 -1
  11. package/dist/{PackageVersion-DrU5ubC-.js → PackageVersion-0Lu6RIig.js} +1 -1
  12. package/dist/{PackageVersion-CKutD59c.cjs → PackageVersion-BMNt7NsQ.cjs} +1 -1
  13. package/dist/{PenAndPaper-Bnvy0XRn.cjs → PenAndPaper-BUwLP3Wx.cjs} +1 -1
  14. package/dist/{PenAndPaper-BF6RVx_0.js → PenAndPaper-D4Uu-GqW.js} +3 -3
  15. package/dist/{Shape-NYJ-EMUq.cjs → Shape-2NRWULE_.cjs} +1 -1
  16. package/dist/{Shape-D5Dtzm3x.js → Shape-BavMx2aa.js} +1 -1
  17. package/dist/{Slicer-BrajQoJL.js → Slicer-B_qJHvNR.js} +2 -2
  18. package/dist/{Slicer-Cdgf9oDx.cjs → Slicer-Ct8BAk8F.cjs} +1 -1
  19. package/dist/{Title-Cj4tUZSu.cjs → Title-BkfQdTEX.cjs} +1 -1
  20. package/dist/{Title-BNsKKvQy.js → Title-DrVDm1wy.js} +1 -1
  21. package/dist/{Tooltip-Dm2APAls.js → Tooltip-BFT6mZ5a.js} +1 -1
  22. package/dist/{Tooltip-CLjMKc28.cjs → Tooltip-BK88meti.cjs} +1 -1
  23. package/dist/{dom-to-png-Z6Fps788.js → dom-to-png-0WSGIcUV.js} +1 -1
  24. package/dist/{dom-to-png-BlAkXMo8.cjs → dom-to-png-CyVwBzNm.cjs} +1 -1
  25. package/dist/{img-DhPFunow.js → img-BT-UmGcu.js} +1 -1
  26. package/dist/{img-0HoPau8z.cjs → img-DqK-SXIP.cjs} +1 -1
  27. package/dist/index-Cai0fWP7.cjs +9 -0
  28. package/dist/{index-D2h9qRb4.js → index-hMo72hAq.js} +18 -9
  29. package/dist/{pdf-Dm8bjLUW.cjs → pdf-DY3kwqSx.cjs} +1 -1
  30. package/dist/{pdf-BpYF_lP6.js → pdf-G7o-GM_m.js} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +9 -0
  33. package/dist/types/vue-data-ui.d.ts +9 -0
  34. package/dist/{useNestedProp-CAbtwUJj.cjs → useNestedProp-DcWhlk8h.cjs} +1 -1
  35. package/dist/{useNestedProp-DlWfv-mw.js → useNestedProp-DhEaBTgF.js} +1 -1
  36. package/dist/{usePrinter-B9NkBzf5.cjs → usePrinter-B4ojFS2B.cjs} +1 -1
  37. package/dist/{usePrinter-BGkHpXM9.js → usePrinter-D2z-bUtX.js} +3 -3
  38. package/dist/{vue-data-ui-DPoOpdO-.cjs → vue-data-ui-BR4hs3ky.cjs} +1 -1
  39. package/dist/{vue-data-ui-kWX-2oPX.js → vue-data-ui-BTkU5knB.js} +62 -62
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +7 -7
  42. package/dist/{vue-ui-3d-bar-CwsCsbwY.cjs → vue-ui-3d-bar-Cx2zND3j.cjs} +1 -1
  43. package/dist/{vue-ui-3d-bar-CAJh6lT_.js → vue-ui-3d-bar-DD3_LLbq.js} +9 -9
  44. package/dist/{vue-ui-accordion-C-v1kmEc.js → vue-ui-accordion-CHMdpjnX.js} +3 -3
  45. package/dist/{vue-ui-accordion-ChE9WO8Q.cjs → vue-ui-accordion-DUGBjyB1.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-DdwMF6_I.js → vue-ui-age-pyramid-CUS2cIAl.js} +10 -10
  47. package/dist/{vue-ui-age-pyramid-CAtI3F1S.cjs → vue-ui-age-pyramid-WpMKbqUM.cjs} +1 -1
  48. package/dist/{vue-ui-annotator-DQ0W7Q5C.cjs → vue-ui-annotator-B5VYzARK.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-bkpTEqep.js → vue-ui-annotator-Ckyjvy1h.js} +2 -2
  50. package/dist/{vue-ui-bullet-CQtNg-wR.cjs → vue-ui-bullet-Clccjys0.cjs} +1 -1
  51. package/dist/{vue-ui-bullet-BEAyOY56.js → vue-ui-bullet-i97qMAx7.js} +8 -8
  52. package/dist/{vue-ui-candlestick-DJtpSDju.cjs → vue-ui-candlestick-B35fn-Jo.cjs} +1 -1
  53. package/dist/{vue-ui-candlestick-DKYirN9r.js → vue-ui-candlestick-Dmu21ktX.js} +11 -11
  54. package/dist/{vue-ui-carousel-table-VFiMfJos.cjs → vue-ui-carousel-table-23ggTo5D.cjs} +1 -1
  55. package/dist/{vue-ui-carousel-table-q1hGM_Iw.js → vue-ui-carousel-table-cvW3wpY7.js} +4 -4
  56. package/dist/{vue-ui-chestnut-B1VUR7mU.js → vue-ui-chestnut-CZpShJyS.js} +8 -8
  57. package/dist/{vue-ui-chestnut-DRGps83_.cjs → vue-ui-chestnut-CkuDV8dp.cjs} +1 -1
  58. package/dist/{vue-ui-circle-pack-Bw_j7w4u.js → vue-ui-circle-pack-B6d9PjE2.js} +9 -9
  59. package/dist/{vue-ui-circle-pack-CkpLDinw.cjs → vue-ui-circle-pack-C2IQV5_6.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-ZkCZRUcy.js → vue-ui-cursor-CG4bTWjj.js} +2 -2
  61. package/dist/{vue-ui-cursor-D_ZN42gT.cjs → vue-ui-cursor-CZBmEqOC.cjs} +1 -1
  62. package/dist/{vue-ui-dashboard-Bcj-LfoN.cjs → vue-ui-dashboard-D-95GOHa.cjs} +1 -1
  63. package/dist/{vue-ui-dashboard-DnEpTStU.js → vue-ui-dashboard-DqM_deY-.js} +62 -62
  64. package/dist/{vue-ui-digits-Bsseebr6.js → vue-ui-digits-CKpey7p1.js} +2 -2
  65. package/dist/{vue-ui-digits-p0PWcPJX.cjs → vue-ui-digits-Cdauuy8X.cjs} +1 -1
  66. package/dist/{vue-ui-donut-CwvMWv_q.js → vue-ui-donut-Dp2Yy4fh.js} +36 -36
  67. package/dist/{vue-ui-donut-evolution-C9eui30b.cjs → vue-ui-donut-evolution-Cg1VnagT.cjs} +1 -1
  68. package/dist/{vue-ui-donut-evolution-BzNh2QwP.js → vue-ui-donut-evolution-ClL_5jhm.js} +11 -11
  69. package/dist/{vue-ui-donut-C3mhQ-03.cjs → vue-ui-donut-j519aqqU.cjs} +1 -1
  70. package/dist/{vue-ui-dumbbell-BvNEHy9Z.js → vue-ui-dumbbell-C8tOQUbs.js} +10 -10
  71. package/dist/{vue-ui-dumbbell-BheHAxmy.cjs → vue-ui-dumbbell-CNJ9en-A.cjs} +1 -1
  72. package/dist/{vue-ui-flow-vz29fymj.cjs → vue-ui-flow-BYypzs-j.cjs} +1 -1
  73. package/dist/{vue-ui-flow-DBuLJlEV.js → vue-ui-flow-Ouw_lvpb.js} +9 -9
  74. package/dist/{vue-ui-funnel-DhoOe49e.js → vue-ui-funnel-CfxmaNEA.js} +9 -9
  75. package/dist/{vue-ui-funnel-D8brKLer.cjs → vue-ui-funnel-DbVCaDxm.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-DUQ5z3km.js → vue-ui-galaxy-dm_p5xAR.js} +11 -11
  77. package/dist/{vue-ui-galaxy-YP3Gl3vG.cjs → vue-ui-galaxy-zBDItFVz.cjs} +1 -1
  78. package/dist/{vue-ui-gauge-WH6OGXAD.cjs → vue-ui-gauge-Dr-7ojj9.cjs} +1 -1
  79. package/dist/{vue-ui-gauge-C_8QgadB.js → vue-ui-gauge-DwwvbGca.js} +7 -7
  80. package/dist/{vue-ui-gizmo-D2AJKoeB.cjs → vue-ui-gizmo-CB5NfNit.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-DFy9X5IT.js → vue-ui-gizmo-Cq0SpTfm.js} +3 -3
  82. package/dist/{vue-ui-heatmap-DH93m9RC.js → vue-ui-heatmap-DNSOppoO.js} +10 -10
  83. package/dist/{vue-ui-heatmap-Dx8XPeob.cjs → vue-ui-heatmap-DtRSx7DO.cjs} +1 -1
  84. package/dist/{vue-ui-history-plot-Cmc7KMnB.cjs → vue-ui-history-plot-BvC3L9g3.cjs} +1 -1
  85. package/dist/{vue-ui-history-plot-C-9fJrMv.js → vue-ui-history-plot-r9eLYJCe.js} +11 -11
  86. package/dist/{vue-ui-kpi-C6cv6sCW.js → vue-ui-kpi-BBpxo07S.js} +3 -3
  87. package/dist/{vue-ui-kpi-DqpTRLkQ.cjs → vue-ui-kpi-raHWFHjI.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-BH-Hztc3.js → vue-ui-mini-loader-CGtQXPzk.js} +2 -2
  89. package/dist/{vue-ui-mini-loader-CpxzfBja.cjs → vue-ui-mini-loader-STx0NSvX.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-avfEzaAy.cjs → vue-ui-molecule-B4WJo2V5.cjs} +1 -1
  91. package/dist/{vue-ui-molecule-1475qvln.js → vue-ui-molecule-EYSvyl-h.js} +11 -11
  92. package/dist/{vue-ui-mood-radar-CnAmD4WX.cjs → vue-ui-mood-radar-CfHUyyMY.cjs} +1 -1
  93. package/dist/{vue-ui-mood-radar-SJjT1sCF.js → vue-ui-mood-radar-Crk-XB3O.js} +11 -11
  94. package/dist/vue-ui-nested-donuts-DRJZT5Bv.cjs +17 -0
  95. package/dist/vue-ui-nested-donuts-Rm4P3uEP.js +1137 -0
  96. package/dist/{vue-ui-onion-CA2N8k0p.cjs → vue-ui-onion-Bgvs96ms.cjs} +1 -1
  97. package/dist/{vue-ui-onion-DzreNeV2.js → vue-ui-onion-Dzl_kjlE.js} +11 -11
  98. package/dist/{vue-ui-parallel-coordinate-plot-CyoOsjFp.js → vue-ui-parallel-coordinate-plot-98c0XRsu.js} +12 -12
  99. package/dist/{vue-ui-parallel-coordinate-plot-V6vt-U3H.cjs → vue-ui-parallel-coordinate-plot-YuLiWTox.cjs} +1 -1
  100. package/dist/{vue-ui-quadrant-C7Fb-DVA.cjs → vue-ui-quadrant-CiqJKJu1.cjs} +1 -1
  101. package/dist/{vue-ui-quadrant-DkMAnQHE.js → vue-ui-quadrant-Dd1ryxBx.js} +40 -40
  102. package/dist/{vue-ui-quick-chart-BNf57IFn.js → vue-ui-quick-chart-CTsvK-CY.js} +9 -9
  103. package/dist/{vue-ui-quick-chart-CQp5GSbr.cjs → vue-ui-quick-chart-DMceIo39.cjs} +1 -1
  104. package/dist/{vue-ui-radar-DHxUS4r0.js → vue-ui-radar-CHYpedpk.js} +12 -12
  105. package/dist/{vue-ui-radar-DVv2P3B3.cjs → vue-ui-radar-Dp8-SmYd.cjs} +1 -1
  106. package/dist/{vue-ui-rating-2dp8n1gK.js → vue-ui-rating-DSsm92zG.js} +10 -10
  107. package/dist/{vue-ui-rating-CA5buZm1.cjs → vue-ui-rating-uVphq_sK.cjs} +1 -1
  108. package/dist/{vue-ui-relation-circle-BGY0EsvO.cjs → vue-ui-relation-circle-46wKUZTv.cjs} +1 -1
  109. package/dist/{vue-ui-relation-circle-hU35G-pb.js → vue-ui-relation-circle-BPVBRieo.js} +7 -7
  110. package/dist/{vue-ui-ridgeline-CTE25ofY.js → vue-ui-ridgeline-B6GA2tXb.js} +49 -49
  111. package/dist/{vue-ui-ridgeline-dhS0sX29.cjs → vue-ui-ridgeline-OULIMr6I.cjs} +1 -1
  112. package/dist/{vue-ui-rings-BgJT1xPm.js → vue-ui-rings-Cl-607b8.js} +12 -12
  113. package/dist/{vue-ui-rings-2XntvE5b.cjs → vue-ui-rings-HVHIYYrh.cjs} +1 -1
  114. package/dist/{vue-ui-scatter-Brh98c-o.cjs → vue-ui-scatter-BZ4DPyoL.cjs} +1 -1
  115. package/dist/{vue-ui-scatter-YKeV-y-p.js → vue-ui-scatter-ClYbim5F.js} +44 -44
  116. package/dist/{vue-ui-skeleton-CNP_4H8z.js → vue-ui-skeleton-C3t9bL6f.js} +19 -19
  117. package/dist/{vue-ui-skeleton-CK5DdXVo.cjs → vue-ui-skeleton-C954hFY-.cjs} +1 -1
  118. package/dist/{vue-ui-smiley-3uIAUF4w.cjs → vue-ui-smiley-BBGCa2S0.cjs} +1 -1
  119. package/dist/{vue-ui-smiley-BUlzuzq6.js → vue-ui-smiley-DsKnKBFv.js} +2 -2
  120. package/dist/{vue-ui-spark-trend-CfhhjekZ.cjs → vue-ui-spark-trend-CBa0FhIy.cjs} +1 -1
  121. package/dist/{vue-ui-spark-trend-DmwQZLUP.js → vue-ui-spark-trend-Da-HE7x2.js} +5 -5
  122. package/dist/{vue-ui-sparkbar-BxKGdAq3.cjs → vue-ui-sparkbar-CUul3e3U.cjs} +1 -1
  123. package/dist/{vue-ui-sparkbar-TLxa0K9v.js → vue-ui-sparkbar-DgQxbUeJ.js} +4 -4
  124. package/dist/{vue-ui-sparkgauge-CIwnnQYW.js → vue-ui-sparkgauge-BKA5GnGO.js} +4 -4
  125. package/dist/{vue-ui-sparkgauge-CWXLMSHa.cjs → vue-ui-sparkgauge-DYPVqz6I.cjs} +1 -1
  126. package/dist/{vue-ui-sparkhistogram-Df0Edni4.cjs → vue-ui-sparkhistogram-CNN9tXh1.cjs} +1 -1
  127. package/dist/{vue-ui-sparkhistogram-w1rEgV9S.js → vue-ui-sparkhistogram-CdZy4SfH.js} +5 -5
  128. package/dist/{vue-ui-sparkline-BQCbVZw5.cjs → vue-ui-sparkline-BCP4gyTp.cjs} +1 -1
  129. package/dist/{vue-ui-sparkline-C2Sf6sF4.js → vue-ui-sparkline-DCNNoruu.js} +15 -15
  130. package/dist/{vue-ui-sparkstackbar-BaVuTNxy.js → vue-ui-sparkstackbar-BAXGFcPk.js} +5 -5
  131. package/dist/{vue-ui-sparkstackbar-BlyzQCK8.cjs → vue-ui-sparkstackbar-sgehFSit.cjs} +1 -1
  132. package/dist/{vue-ui-stackbar-ypv8uR9d.cjs → vue-ui-stackbar-87l909wS.cjs} +1 -1
  133. package/dist/{vue-ui-stackbar-D4H8uFQ5.js → vue-ui-stackbar-Cto9A9WG.js} +13 -13
  134. package/dist/{vue-ui-strip-plot-Dxh7xzZf.js → vue-ui-strip-plot-C0F8_S_g.js} +11 -11
  135. package/dist/{vue-ui-strip-plot-CmrAJ6uF.cjs → vue-ui-strip-plot-Deegqmms.cjs} +1 -1
  136. package/dist/{vue-ui-table-BD8QgS2P.js → vue-ui-table-1vUkkwSp.js} +3 -3
  137. package/dist/{vue-ui-table-BmyVGToW.cjs → vue-ui-table-BUxFdYM7.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-DZIrV6Bq.js → vue-ui-table-heatmap-PPGfjMxh.js} +4 -4
  139. package/dist/{vue-ui-table-heatmap-CXTW4REL.cjs → vue-ui-table-heatmap-uDH3owRO.cjs} +1 -1
  140. package/dist/{vue-ui-table-sparkline--R1CzNtx.cjs → vue-ui-table-sparkline-CPSlJVB1.cjs} +1 -1
  141. package/dist/{vue-ui-table-sparkline-B0aYy2JL.js → vue-ui-table-sparkline-D9LEgrxj.js} +5 -5
  142. package/dist/{vue-ui-thermometer-Dh0nVf-h.js → vue-ui-thermometer-BxngpuEZ.js} +7 -7
  143. package/dist/{vue-ui-thermometer-DtOy35Jd.cjs → vue-ui-thermometer-D8P88pea.cjs} +1 -1
  144. package/dist/{vue-ui-timer-Bo3p5wjo.cjs → vue-ui-timer-B_dh6otW.cjs} +1 -1
  145. package/dist/{vue-ui-timer-C4JkVftX.js → vue-ui-timer-C3dxY--Q.js} +5 -5
  146. package/dist/{vue-ui-tiremarks-GLU60Yzo.js → vue-ui-tiremarks-_oZ6wL6K.js} +7 -7
  147. package/dist/{vue-ui-tiremarks-B-3AEiND.cjs → vue-ui-tiremarks-mISKtpmD.cjs} +1 -1
  148. package/dist/{vue-ui-treemap-ZiuUtYjs.cjs → vue-ui-treemap-CZZXcX0f.cjs} +1 -1
  149. package/dist/{vue-ui-treemap-QyQqnbJc.js → vue-ui-treemap-D5Dcd84h.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-DHZvOGpR.cjs → vue-ui-vertical-bar-C-KAVKXj.cjs} +1 -1
  151. package/dist/{vue-ui-vertical-bar-CbwZCrcW.js → vue-ui-vertical-bar-CtWXk6co.js} +12 -12
  152. package/dist/{vue-ui-waffle-D_zRZStV.js → vue-ui-waffle-BD2GnRkO.js} +12 -12
  153. package/dist/{vue-ui-waffle-Yi5W6qYr.cjs → vue-ui-waffle-C9qyTIzz.cjs} +1 -1
  154. package/dist/{vue-ui-wheel-D85CwfOC.cjs → vue-ui-wheel-CKfr_7kH.cjs} +1 -1
  155. package/dist/{vue-ui-wheel-D_wbd08e.js → vue-ui-wheel-HydW49fo.js} +7 -7
  156. package/dist/{vue-ui-word-cloud-CkActnvX.cjs → vue-ui-word-cloud-C4ISeFpy.cjs} +1 -1
  157. package/dist/{vue-ui-word-cloud-jMOFgeRb.js → vue-ui-word-cloud-C9Pbi6ey.js} +10 -10
  158. package/dist/{vue-ui-world-aTdY2yXo.cjs → vue-ui-world-BlAD3UPb.cjs} +1 -1
  159. package/dist/{vue-ui-world-XMoqQwg7.js → vue-ui-world-D-AsGwlW.js} +11 -11
  160. package/dist/{vue-ui-xy-DL6V_DZs.js → vue-ui-xy-CMw6P4C0.js} +16 -16
  161. package/dist/{vue-ui-xy-DYEFXjnb.cjs → vue-ui-xy-CS-xjZVI.cjs} +2 -2
  162. package/dist/{vue-ui-xy-canvas-K0Qm3FPR.cjs → vue-ui-xy-canvas-Dd7IFwSK.cjs} +1 -1
  163. package/dist/{vue-ui-xy-canvas-DpX9D7Ny.js → vue-ui-xy-canvas-DtKI-IQA.js} +12 -12
  164. package/package.json +1 -1
  165. package/dist/index-D6F-xMcR.cjs +0 -9
  166. package/dist/vue-ui-nested-donuts-6MGMcByL.js +0 -937
  167. package/dist/vue-ui-nested-donuts-BkQJr_zV.cjs +0 -17
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-D6F-xMcR.cjs"),S=require("./vue-ui-xy-DYEFXjnb.cjs"),w=require("./vue-ui-donut-C3mhQ-03.cjs"),e=require("vue"),_=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},components:{VueUiXy:S.default,VueUiDonut:w.default},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,dragOffsetX:0,dragOffsetY:0,modalWidth:400,modalHeight:200,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((n,o)=>n-o),palette:N.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(n=>({average:Object.hasOwn(n,"average")?n.average:!1,decimals:Object.hasOwn(n,"decimals")?n.decimals:0,isMultiselect:Object.hasOwn(n,"isMultiselect")?n.isMultiselect:!1,isPercentage:Object.hasOwn(n,"isPercentage")?n.isPercentage:!1,isSearch:Object.hasOwn(n,"isSearch")?n.isSearch:!1,isSort:Object.hasOwn(n,"isSort")?n.isSort:!1,name:n.name,percentageTo:Object.hasOwn(n,"percentageTo")?n.percentageTo:void 0,prefix:Object.hasOwn(n,"prefix")?n.prefix:"",rangeFilter:Object.hasOwn(n,"rangeFilter")?n.rangeFilter:!1,suffix:Object.hasOwn(n,"suffix")?n.suffix:"",sum:Object.hasOwn(n,"sum")?n.sum:!1,type:n.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-Cai0fWP7.cjs"),S=require("./vue-ui-xy-CS-xjZVI.cjs"),w=require("./vue-ui-donut-j519aqqU.cjs"),e=require("vue"),_=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},components:{VueUiXy:S.default,VueUiDonut:w.default},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,dragOffsetX:0,dragOffsetY:0,modalWidth:400,modalHeight:200,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((n,o)=>n-o),palette:N.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((n,o)=>({...n,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(n=>({average:Object.hasOwn(n,"average")?n.average:!1,decimals:Object.hasOwn(n,"decimals")?n.decimals:0,isMultiselect:Object.hasOwn(n,"isMultiselect")?n.isMultiselect:!1,isPercentage:Object.hasOwn(n,"isPercentage")?n.isPercentage:!1,isSearch:Object.hasOwn(n,"isSearch")?n.isSearch:!1,isSort:Object.hasOwn(n,"isSort")?n.isSort:!1,name:n.name,percentageTo:Object.hasOwn(n,"percentageTo")?n.percentageTo:void 0,prefix:Object.hasOwn(n,"prefix")?n.prefix:"",rangeFilter:Object.hasOwn(n,"rangeFilter")?n.rangeFilter:!1,suffix:Object.hasOwn(n,"suffix")?n.suffix:"",sum:Object.hasOwn(n,"sum")?n.sum:!1,type:n.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
2
2
  Provide an array of objects of type:
3
3
  {
4
4
  name: string;
@@ -1,8 +1,8 @@
1
1
  import { useCssVars as te, computed as v, ref as h, useSlots as ae, onMounted as z, watch as oe, createElementBlock as l, openBlock as n, unref as u, normalizeClass as E, normalizeStyle as C, createBlock as se, createCommentVNode as c, createElementVNode as g, createSlots as ne, withCtx as b, renderSlot as r, normalizeProps as G, guardReactiveProps as B, Fragment as k, renderList as w, mergeProps as f, createVNode as le, nextTick as re } from "vue";
2
- import { u as ue, c as H, a as ie, o as de, e as pe, a5 as ve, G as ce, N as me, q as fe, r as he } from "./index-D2h9qRb4.js";
3
- import { u as A } from "./useNestedProp-DlWfv-mw.js";
4
- import { u as ge, U as be } from "./usePrinter-BGkHpXM9.js";
5
- import { _ as ye } from "./Shape-D5Dtzm3x.js";
2
+ import { u as ue, c as H, a as ie, o as de, e as pe, a5 as ve, G as ce, N as me, q as fe, r as he } from "./index-hMo72hAq.js";
3
+ import { u as A } from "./useNestedProp-DhEaBTgF.js";
4
+ import { u as ge, U as be } from "./usePrinter-D2z-bUtX.js";
5
+ import { _ as ye } from "./Shape-BavMx2aa.js";
6
6
  import { u as Ce } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const _e = ["id"], Ie = { role: "cell" }, $e = { role: "row" }, we = ["data-cell"], Oe = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D6F-xMcR.cjs"),$=require("./useNestedProp-CAbtwUJj.cjs"),w=require("./usePrinter-B9NkBzf5.cjs"),q=require("./Shape-NYJ-EMUq.cjs"),G=require("./useUserOptionState-BgepsfED.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=["id"],A={role:"cell"},D={role:"row"},X=["data-cell"],W={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},J=["height","width"],K={key:0,role:"cell","data-cell":"sum"},Q={key:1,role:"cell","data-cell":"average"},Y={key:2,role:"cell","data-cell":"median"},Z={key:1,ref:"source",dir:"auto"},j={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(P,{expose:N}){e.useCssVars(t=>({"1e8210e3":T.value,"7fb93384":R.value}));const{vue_ui_table_heatmap:E}=a.useConfig(),d=P,p=e.ref(a.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),f=e.ref(0),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiTableHeatmap does not support the #chart-background slot.")});const o=e.computed({get:()=>y(),set:t=>t}),{userOptionsVisible:v,setUserOptionsVisibility:g,keepUserOptionState:h}=G.useUserOptionState({config:o.value});function y(){const t=$.useNestedProp({userConfig:d.config,defaultConfig:E});return t.theme?{...$.useNestedProp({userConfig:a.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=y(),v.value=!o.value.userOptions.showOnChartHover,C()},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:k,generateImage:b}=w.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap",options:o.value.userOptions.print}),F=e.computed(()=>o.value.table.responsiveBreakpoint),z=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{C()});function C(){a.objectIsEmpty(d.dataset)&&a.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(r=>{r.forEach(n=>{s.value=n.contentRect.width<F.value})});c.value&&t.observe(c.value)}const _=e.computed(()=>d.dataset.map(t=>{const r=t.values.map(l=>isNaN(l)?0:l),n=r.reduce((l,i)=>l+i,0);return{...t,values:r,serieExtremes:{max:Math.max(...r),min:Math.min(...r)},sum:n,average:n/r.length,median:a.calcMedian(r),displayValues:[t.name,...t.values],id:a.createUid()}})),B=e.computed(()=>{const t=_.value.flatMap(r=>r.values);return{min:Math.min(...t),max:Math.max(...t)}});function M(t,r){const n=o.value.style.heatmapColors.useIndividualScale;return a.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,n?r.min:B.value.min,n?r.max:B.value.max,t)}const I=e.computed(()=>_.value.map(t=>({...t,colors:t.displayValues.map(r=>isNaN(r)?o.value.style.backgroundColor:M(r,t.serieExtremes))}))),R=e.computed(()=>o.value.style.backgroundColor),T=e.computed(()=>`${o.value.table.borderWidth}px`);function S(){e.nextTick(()=>{const t=I.value.map(l=>[[l.name],l.displayValues,[l.sum],[l.average],[l.median]]),r=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),n=a.createCsvContent(r);a.downloadCsv({csvContent:n,title:"vue-ui-table-heatmap"})})}function U(t){m.value=t,f.value+=1}return N({generatePdf:k,generateCsv:S,generateImage:b}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`,onMouseenter:r[0]||(r[0]=()=>e.unref(g)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(g)(!1))},[o.value.userOptions.show&&z.value&&(e.unref(h)||e.unref(v))?(e.openBlock(),e.createBlock(w.UserOptions,{ref:"details",key:`user_option_${f.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,position:o.value.userOptions.position,onToggleFullscreen:U,onGeneratePdf:e.unref(k),onGenerateCsv:S,onGenerateImage:e.unref(b),style:e.normalizeStyle({visibility:e.unref(h)?e.unref(v)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:l})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:l})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:l})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(n,l)=>(e.openBlock(),e.createElementBlock("th",A,[e.renderSlot(t.$slots,"head",e.mergeProps({ref_for:!0},{value:n,rowIndex:l,type:typeof n,isResponsive:s.value}),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(n,l)=>(e.openBlock(),e.createElementBlock("tr",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[n.color&&u===0?(e.openBlock(),e.createElementBlock("div",W,[n.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(q._sfc_main,{plot:{x:10,y:10},color:n.color,radius:9,shape:n.shape||"circle"},null,8,["color","shape"])],8,J)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.mergeProps({ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.mergeProps({key:0,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.mergeProps({key:1,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value,color:n.colors[u],textColor:e.unref(a.adaptColorToBackground)(n.colors[u])}),void 0,!0):e.createCommentVNode("",!0)],64))],8,X))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",K,[e.renderSlot(t.$slots,"sum",e.mergeProps({ref_for:!0},{value:n.sum,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",Q,[e.renderSlot(t.$slots,"average",e.mergeProps({ref_for:!0},{value:n.average,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",Y,[e.renderSlot(t.$slots,"median",e.mergeProps({ref_for:!0},{value:n.median,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4),t.$slots.source?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,L))}},ee=H._export_sfc(j,[["__scopeId","data-v-dd493d6a"]]);exports.default=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cai0fWP7.cjs"),$=require("./useNestedProp-DcWhlk8h.cjs"),w=require("./usePrinter-B4ojFS2B.cjs"),q=require("./Shape-2NRWULE_.cjs"),G=require("./useUserOptionState-BgepsfED.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=["id"],A={role:"cell"},D={role:"row"},X=["data-cell"],W={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},J=["height","width"],K={key:0,role:"cell","data-cell":"sum"},Q={key:1,role:"cell","data-cell":"average"},Y={key:2,role:"cell","data-cell":"median"},Z={key:1,ref:"source",dir:"auto"},j={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(P,{expose:N}){e.useCssVars(t=>({"1e8210e3":T.value,"7fb93384":R.value}));const{vue_ui_table_heatmap:E}=a.useConfig(),d=P,p=e.ref(a.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),f=e.ref(0),V=e.useSlots();e.onMounted(()=>{V["chart-background"]&&console.warn("VueUiTableHeatmap does not support the #chart-background slot.")});const o=e.computed({get:()=>y(),set:t=>t}),{userOptionsVisible:v,setUserOptionsVisibility:g,keepUserOptionState:h}=G.useUserOptionState({config:o.value});function y(){const t=$.useNestedProp({userConfig:d.config,defaultConfig:E});return t.theme?{...$.useNestedProp({userConfig:a.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}e.watch(()=>d.config,t=>{o.value=y(),v.value=!o.value.userOptions.showOnChartHover,C()},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:k,generateImage:b}=w.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap",options:o.value.userOptions.print}),F=e.computed(()=>o.value.table.responsiveBreakpoint),z=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{C()});function C(){a.objectIsEmpty(d.dataset)&&a.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(r=>{r.forEach(n=>{s.value=n.contentRect.width<F.value})});c.value&&t.observe(c.value)}const _=e.computed(()=>d.dataset.map(t=>{const r=t.values.map(l=>isNaN(l)?0:l),n=r.reduce((l,i)=>l+i,0);return{...t,values:r,serieExtremes:{max:Math.max(...r),min:Math.min(...r)},sum:n,average:n/r.length,median:a.calcMedian(r),displayValues:[t.name,...t.values],id:a.createUid()}})),B=e.computed(()=>{const t=_.value.flatMap(r=>r.values);return{min:Math.min(...t),max:Math.max(...t)}});function M(t,r){const n=o.value.style.heatmapColors.useIndividualScale;return a.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,n?r.min:B.value.min,n?r.max:B.value.max,t)}const I=e.computed(()=>_.value.map(t=>({...t,colors:t.displayValues.map(r=>isNaN(r)?o.value.style.backgroundColor:M(r,t.serieExtremes))}))),R=e.computed(()=>o.value.style.backgroundColor),T=e.computed(()=>`${o.value.table.borderWidth}px`);function S(){e.nextTick(()=>{const t=I.value.map(l=>[[l.name],l.displayValues,[l.sum],[l.average],[l.median]]),r=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),n=a.createCsvContent(r);a.downloadCsv({csvContent:n,title:"vue-ui-table-heatmap"})})}function U(t){m.value=t,f.value+=1}return N({generatePdf:k,generateCsv:S,generateImage:b}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`,onMouseenter:r[0]||(r[0]=()=>e.unref(g)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(g)(!1))},[o.value.userOptions.show&&z.value&&(e.unref(h)||e.unref(v))?(e.openBlock(),e.createBlock(w.UserOptions,{ref:"details",key:`user_option_${f.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,position:o.value.userOptions.position,onToggleFullscreen:U,onGeneratePdf:e.unref(k),onGenerateCsv:S,onGenerateImage:e.unref(b),style:e.normalizeStyle({visibility:e.unref(h)?e.unref(v)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:l})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:l})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:l})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(n,l)=>(e.openBlock(),e.createElementBlock("th",A,[e.renderSlot(t.$slots,"head",e.mergeProps({ref_for:!0},{value:n,rowIndex:l,type:typeof n,isResponsive:s.value}),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(n,l)=>(e.openBlock(),e.createElementBlock("tr",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[n.color&&u===0?(e.openBlock(),e.createElementBlock("div",W,[n.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(q._sfc_main,{plot:{x:10,y:10},color:n.color,radius:9,shape:n.shape||"circle"},null,8,["color","shape"])],8,J)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.mergeProps({ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.mergeProps({key:0,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value}),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.mergeProps({key:1,ref_for:!0},{value:i,rowIndex:l,colIndex:u,type:typeof i,isResponsive:s.value,color:n.colors[u],textColor:e.unref(a.adaptColorToBackground)(n.colors[u])}),void 0,!0):e.createCommentVNode("",!0)],64))],8,X))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",K,[e.renderSlot(t.$slots,"sum",e.mergeProps({ref_for:!0},{value:n.sum,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",Q,[e.renderSlot(t.$slots,"average",e.mergeProps({ref_for:!0},{value:n.average,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",Y,[e.renderSlot(t.$slots,"median",e.mergeProps({ref_for:!0},{value:n.median,rowIndex:l,isResponsive:s.value}),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4),t.$slots.source?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,L))}},ee=H._export_sfc(j,[["__scopeId","data-v-dd493d6a"]]);exports.default=ee;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6F-xMcR.cjs"),Y=require("./useNestedProp-CAbtwUJj.cjs"),ce=require("./vue-ui-sparkline-BQCbVZw5.cjs"),x=require("./BaseIcon-CvuQ41yl.cjs"),D=require("./usePrinter-B9NkBzf5.cjs"),ve=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],fe={style:{"z-index":"1","padding-right":"24px"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},be=["onClick"],ke=["onClick"],he=["data-cell"],Se=["data-cell","onPointerenter"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we=["data-cell"],Ne={key:1,ref:"source",dir:"auto"},ze={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),le=e.useSlots();e.onMounted(()=>{le["chart-background"]&&console.warn("VueUiTableSparkline does not support the #chart-background slot.")});const t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ve.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function ne(l){const a=(l[0].values||[]).map((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.values||[],orders:a[r]}))}const h=e.computed(()=>ne(G.value)),c=e.ref(h.value),re=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){ue(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function ue(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],u=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=u}const b=e.ref(void 0),O=e.ref(void 0);function se({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!I.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function ie(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function de(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-table-sparkline":!0,"vue-ui-responsive":I.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",fe,[e.withDirectives((e.openBlock(),e.createElementBlock("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,be),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,ke)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:ie,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),de]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,he),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(u,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,Se))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,xe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(ce.default,{onHoverIndex:({index:u})=>se({dataIndex:u,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,we)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,me))}},Ve=pe._export_sfc(ze,[["__scopeId","data-v-6ebcec2e"]]);exports.default=Ve;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cai0fWP7.cjs"),Y=require("./useNestedProp-DcWhlk8h.cjs"),ce=require("./vue-ui-sparkline-BCP4gyTp.cjs"),x=require("./BaseIcon-CiINppo2.cjs"),D=require("./usePrinter-B4ojFS2B.cjs"),ve=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],fe={style:{"z-index":"1","padding-right":"24px"}},ye={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},ge={key:0,style:{display:"flex",flexDirection:"row",alignItems:"center"}},be=["onClick"],ke=["onClick"],he=["data-cell"],Se=["data-cell","onPointerenter"],Ce=["data-cell"],_e=["data-cell"],xe=["data-cell"],we=["data-cell"],Ne={key:1,ref:"source",dir:"auto"},ze={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Z,{expose:ee}){e.useCssVars(l=>({"8765d8b0":l.tdo}));const{vue_ui_table_sparkline:te}=s.useConfig(),y=Z,w=e.ref(s.createUid()),$=e.ref(0),N=e.ref(0),z=e.ref(null),le=e.useSlots();e.onMounted(()=>{le["chart-background"]&&console.warn("VueUiTableSparkline does not support the #chart-background slot.")});const t=e.computed({get:()=>T(),set:l=>l}),{userOptionsVisible:V,setUserOptionsVisibility:P,keepUserOptionState:F}=ve.useUserOptionState({config:t.value});function T(){const l=Y.useNestedProp({userConfig:y.config,defaultConfig:te});return l.theme?{...Y.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||y.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>y.config,l=>{t.value=T(),V.value=!t.value.userOptions.showOnChartHover,q(),N.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{c.value=h.value,N.value+=1},{deep:!0});const{isPrinting:M,isImaging:W,generatePdf:L,generateImage:U}=D.usePrinter({elementId:`table_${w.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline",options:t.value.userOptions.print}),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),C=e.ref(null),I=e.ref(!1),oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{q()});const B=e.ref(t.value.colNames);function q(){s.objectIsEmpty(y.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(o=>{o.forEach(a=>{I.value=a.contentRect.width<oe.value})});C.value&&l.observe(C.value),B.value=[];for(let o=0;o<R.value;o+=1)B.value.push(t.value.colNames[o]||`col ${o}`)}const G=e.computed(()=>(y.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),y.dataset.map((l,o)=>{const a=(l.values||[]).map(d=>isNaN(d)?0:d??0),n=a.reduce((d,i)=>d+i,0),u=n/a.length,r=s.calcMedian(a);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||ae.value[o]||s.palette[o]||s.palette[o%s.palette.length],sum:n,average:u,median:r,sparklineDataset:a.map((d,i)=>({period:t.value.colNames[i]||`col ${i}`,value:d||0}))}})));function ne(l){const a=(l[0].values||[]).map((u,r)=>l.map(d=>d.values[r]||[])).map(u=>u.map((r,d)=>[r,d]).sort((r,d)=>d[0]-r[0]).map(r=>r[1]));return l.map((u,r)=>({...u,values:u.values||[],orders:a[r]}))}const h=e.computed(()=>ne(G.value)),c=e.ref(h.value),re=e.computed(()=>Math.max(...c.value.map(l=>(l.values||[]).length))),E=e.ref(void 0),A=e.ref(!1),v=e.ref(void 0),H=e.ref(1);function k(){A.value=!1,v.value=void 0,p.value=void 0,H.value=1,S.value.forEach(l=>l.state=1),g.value={name:1,sum:1,average:1,median:1},c.value=h.value}function _(l,o,a){if(["name","sum","average","median"].includes(l.type)){ue(l.type,o,a);return}if(!J(o))return;if(b.value=o,p.value=void 0,![null,void 0].includes(v.value)&&o!==v.value&&(v.value=void 0,k()),S.value[o].state===a&&v.value===o){v.value=void 0,k();return}A.value=!0,v.value=o;const n=h.value.map(i=>i.values[o]||[]),u=a;S.value[o].state=u,H.value=u,o===E.value?E.value=void 0:E.value=o;const d=n.map((i,m)=>[m,i]).sort((i,m)=>u*(m[1]-i[1])).map(i=>i[0]).map(i=>h.value[i]);c.value=d,N.value+=1}const R=e.computed(()=>Math.max(...y.dataset.map(l=>(l.values||[]).length))),f=e.computed(()=>{let l=B.value.map(a=>({type:"reg",value:a}));if(!l.length)for(let a=0;a<R.value;a+=1)l.push({type:"reg",value:`col ${a+1}`});t.value.showTotal&&(l=[...l,{type:"sum",value:t.value.translations.total}]);let o;return t.value.showAverage&&t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average},{type:"median",value:t.value.translations.median}]:t.value.showAverage&&!t.value.showMedian?o=[...l,{type:"average",value:t.value.translations.average}]:!t.value.showAverage&&t.value.showMedian?o=[...l,{type:"median",value:t.value.translations.median}]:o=l,t.value.showSparklines?[...o,{type:"chart",value:t.value.translations.chart}]:o}),g=e.ref({name:1,sum:1,average:1,median:1}),p=e.ref(void 0);function ue(l,o,a){if(!c.value||c.value.length===0||!K(l))return;if(p.value!==l&&(p.value=void 0),![null,void 0].includes(v.value)&&o!==v.value&&k(),v.value=void 0,g.value[l]===a&&p.value){p.value=void 0,k();return}p.value=l,A.value=!0,g.value[l]=a,[null,void 0].includes(o)||(S.value[o].state=g.value[l]);const n=g.value[l],u=[...c.value].sort((r,d)=>{const i=r[l]??(typeof r[l]=="number"?0:""),m=d[l]??(typeof d[l]=="number"?0:"");return typeof i=="string"&&typeof m=="string"?n===-1?i.localeCompare(m):m.localeCompare(i):typeof i=="number"&&typeof m=="number"?n===-1?i-m:m-i:0});c.value=u}const b=e.ref(void 0),O=e.ref(void 0);function se({dataIndex:l,serieIndex:o}){b.value=l,O.value=o,z.value[l]&&!I.value&&z.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const X=e.ref(!1);function ie(l){X.value=l,$.value+=1}function j(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(f.value),o=G.value.map((u,r)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(o),n=s.createCsvContent(a);s.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}function J(l){return t.value.sortedDataColumnIndices.includes(l)}function K(l){return l.type==="name"||l==="name"?t.value.sortedSeriesName:l.type==="sum"||l==="sum"?t.value.sortedSum:l.type==="average"||l==="average"?t.value.sortedAverage:l.type==="median"||l==="median"?t.value.sortedMedian:!1}function Q(l,o,a){return["sum","average","median"].includes(o.type)?p.value===o.type&&g.value[o.type]===a?1:.3:l===v.value&&S.value[l].state===a?1:.3}function de(){t.value.resetSortOnClickOutside&&k()}const S=e.computed({get:()=>f.value.map(l=>({state:1})),set:l=>l});return ee({generatePdf:L,generateImage:U,generateCsv:j,restoreOrder:k}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:C,class:e.normalizeClass({"vue-ui-table-sparkline":!0,"vue-ui-responsive":I.value}),style:{overflow:"hidden"},id:`table_${w.value}`,onMouseenter:o[3]||(o[3]=()=>e.unref(P)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(P)(!1))},[t.value.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-table-sparkline-caption",style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:o[2]||(o[2]=a=>{O.value=void 0,b.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[e.createElementVNode("thead",fe,[e.withDirectives((e.openBlock(),e.createElementBlock("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(t.value.translations.serie),1),c.value.length>1&&t.value.sortedSeriesName?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:o[0]||(o[0]=a=>_({type:"name"},null,-1))},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===-1?1:.3})},null,8,["stroke","style"])]),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:o[1]||(o[1]=a=>_({type:"name"},null,1))},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:p.value==="name"&&g.value.name===1?1:.3})},null,8,["stroke","style"])])])):e.createCommentVNode("",!0)],4)],4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===f.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",paddingRight:n===f.value.length-1&&t.value.userOptions.show?"36px":""}),class:e.normalizeClass({"sticky-col":n===f.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"3px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a.value),1),c.value.length>1&&(J(n)||K(a))?(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-down",onClick:()=>_(a,n,-1)},[e.createVNode(x.default,{size:12,name:"arrowBottom",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,-1)})},null,8,["stroke","style"])],8,be),e.createElementVNode("button",{class:"vue-ui-table-sparkline-sorting-button vue-ui-table-sparkline-sorting-button-up",onClick:()=>_(a,n,1)},[e.createVNode(x.default,{size:12,name:"arrowTop",stroke:t.value.thead.color,style:e.normalizeStyle({opacity:Q(n,a,1)})},null,8,["stroke","style"])],8,ke)])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&n===f.value.length-1&&(e.unref(F)||e.unref(V))?(e.openBlock(),e.createBlock(D.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(M),isImaging:e.unref(W),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:ie,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(U),onGenerateCsv:j,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(V)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:u,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.mergeProps({ref_for:!0},{isOpen:u,color:r}),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.mergeProps({ref_for:!0},{toggleFullscreen:u,isFullscreen:r}),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0)],6))),256))],4)),[[e.unref(D.vClickOutside),de]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,he),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(u,r)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:z,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:b.value!==void 0&&r===b.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:""}),"data-cell":f.value[r]?f.value[r].value:"",class:"vue-ui-data-table__tbody__td",onPointerenter:d=>{O.value=n,b.value=r}},e.toDisplayString([null,void 0].includes(a.values[r])?"-":e.unref(s.applyDataLabel)(t.value.formatter,Number(a.values[r]),e.unref(s.dataLabel)({p:t.value.prefix,v:Number(a.values[r]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:r})),45,Se))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,Ce)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,_e)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,xe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[e.createVNode(ce.default,{onHoverIndex:({index:u})=>se({dataIndex:u,serieIndex:n}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:b.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(M)&&!e.unref(W),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"])],12,we)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ne,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],42,me))}},Ve=pe._export_sfc(ze,[["__scopeId","data-v-6ebcec2e"]]);exports.default=Ve;
@@ -1,9 +1,9 @@
1
1
  import { useCssVars as ze, ref as p, useSlots as De, onMounted as pe, computed as _, watch as fe, createElementBlock as c, openBlock as d, unref as i, normalizeClass as X, createCommentVNode as g, createElementVNode as f, normalizeStyle as s, toDisplayString as C, withDirectives as Pe, createVNode as z, Fragment as J, renderList as K, createBlock as Ne, createSlots as Fe, withCtx as D, renderSlot as A, mergeProps as me, nextTick as Ve } from "vue";
2
- import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a5 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-D2h9qRb4.js";
3
- import { u as ge } from "./useNestedProp-DlWfv-mw.js";
4
- import Xe from "./vue-ui-sparkline-C2Sf6sF4.js";
5
- import W from "./BaseIcon-HDOMbyJq.js";
6
- import { u as Je, U as Ke, v as Qe } from "./usePrinter-BGkHpXM9.js";
2
+ import { u as Te, c as We, t as Me, p as F, a as Ee, b as Ue, o as Be, e as be, g as Ge, a5 as Le, d as Re, i as V, f as T, q as He, r as qe } from "./index-hMo72hAq.js";
3
+ import { u as ge } from "./useNestedProp-DhEaBTgF.js";
4
+ import Xe from "./vue-ui-sparkline-DCNNoruu.js";
5
+ import W from "./BaseIcon-COlnFbOq.js";
6
+ import { u as Je, U as Ke, v as Qe } from "./usePrinter-D2z-bUtX.js";
7
7
  import { u as Ye } from "./useUserOptionState-BIvW1Kz7.js";
8
8
  import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const je = ["id"], et = { style: { "z-index": "1", "padding-right": "24px" } }, tt = {
@@ -1,11 +1,11 @@
1
1
  import { useCssVars as ke, computed as d, onMounted as be, ref as m, watch as _e, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as I, createBlock as O, createCommentVNode as i, createSlots as xe, withCtx as _, renderSlot as f, normalizeProps as P, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
2
- import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-D2h9qRb4.js";
3
- import { _ as Te } from "./Title-BNsKKvQy.js";
4
- import { u as qe, U as Le } from "./usePrinter-BGkHpXM9.js";
5
- import Ve from "./vue-ui-skeleton-CNP_4H8z.js";
6
- import { u as le } from "./useNestedProp-DlWfv-mw.js";
7
- import { _ as Ee } from "./PackageVersion-DrU5ubC-.js";
8
- import { _ as Ge } from "./PenAndPaper-BF6RVx_0.js";
2
+ import { u as $e, o as Fe, e as oe, g as Ie, c as Oe, t as Pe, p as x, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-hMo72hAq.js";
3
+ import { _ as Te } from "./Title-DrVDm1wy.js";
4
+ import { u as qe, U as Le } from "./usePrinter-D2z-bUtX.js";
5
+ import Ve from "./vue-ui-skeleton-C3t9bL6f.js";
6
+ import { u as le } from "./useNestedProp-DhEaBTgF.js";
7
+ import { _ as Ee } from "./PackageVersion-0Lu6RIig.js";
8
+ import { _ as Ge } from "./PenAndPaper-D4Uu-GqW.js";
9
9
  import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as je } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D6F-xMcR.cjs"),oe=require("./Title-Cj4tUZSu.cjs"),Y=require("./usePrinter-B9NkBzf5.cjs"),re=require("./vue-ui-skeleton-CK5DdXVo.cjs"),z=require("./useNestedProp-CAbtwUJj.cjs"),le=require("./PackageVersion-CKutD59c.cjs"),ae=require("./PenAndPaper-Bnvy0XRn.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cai0fWP7.cjs"),oe=require("./Title-BkfQdTEX.cjs"),Y=require("./usePrinter-B4ojFS2B.cjs"),re=require("./vue-ui-skeleton-C954hFY-.cjs"),z=require("./useNestedProp-DcWhlk8h.cjs"),le=require("./PackageVersion-BMNt7NsQ.cjs"),ae=require("./PenAndPaper-BUwLP3Wx.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],fe=["id"],ye=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"3272b184":X.value,"0885078a":D.value,"09e2f6f7":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),V=e.ref(null),E=e.ref(0),P=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),P.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function f(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return f(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return f(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return f(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return f(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,E.value+=1}const y=e.ref(!1);function w(){y.value=!y.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:V,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae._sfc_main,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:y.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:y.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,ye),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,fe))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b0579fd1"]]);exports.default=Ae;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-CAbtwUJj.cjs"),w=require("./index-D6F-xMcR.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-CvuQ41yl.cjs"),O=require("./Title-Cj4tUZSu.cjs"),U=require("./PackageVersion-CKutD59c.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-DcWhlk8h.cjs"),w=require("./index-Cai0fWP7.cjs"),D=require("./useResponsive-DQmBAoBf.cjs"),B=require("./BaseIcon-CiINppo2.cjs"),O=require("./Title-BkfQdTEX.cjs"),U=require("./PackageVersion-BMNt7NsQ.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
2
2
  let interval;
3
3
  let elapsed = 0;
4
4
  let paused = false;
@@ -1,10 +1,10 @@
1
1
  import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
2
- import { u as oe } from "./useNestedProp-DlWfv-mw.js";
3
- import { u as re, c as ue, X as ie, F as V } from "./index-D2h9qRb4.js";
2
+ import { u as oe } from "./useNestedProp-DhEaBTgF.js";
3
+ import { u as re, c as ue, X as ie, F as V } from "./index-hMo72hAq.js";
4
4
  import { t as ne, u as ce } from "./useResponsive-Cw4oZ8sQ.js";
5
- import R from "./BaseIcon-HDOMbyJq.js";
6
- import { _ as de } from "./Title-BNsKKvQy.js";
7
- import { _ as he } from "./PackageVersion-DrU5ubC-.js";
5
+ import R from "./BaseIcon-COlnFbOq.js";
6
+ import { _ as de } from "./Title-DrVDm1wy.js";
7
+ import { _ as he } from "./PackageVersion-0Lu6RIig.js";
8
8
  import { u as ve } from "./useChartAccessibility-BWojgys7.js";
9
9
  import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  class fe {
@@ -1,11 +1,11 @@
1
1
  import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
2
- import { u as ae } from "./useNestedProp-DlWfv-mw.js";
3
- import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-D2h9qRb4.js";
4
- import { _ as $e } from "./Title-BNsKKvQy.js";
5
- import { u as we, U as xe } from "./usePrinter-BGkHpXM9.js";
6
- import Oe from "./vue-ui-skeleton-CNP_4H8z.js";
7
- import { _ as Pe } from "./PackageVersion-DrU5ubC-.js";
8
- import { _ as Ae } from "./PenAndPaper-BF6RVx_0.js";
2
+ import { u as ae } from "./useNestedProp-DhEaBTgF.js";
3
+ import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-hMo72hAq.js";
4
+ import { _ as $e } from "./Title-DrVDm1wy.js";
5
+ import { u as we, U as xe } from "./usePrinter-D2z-bUtX.js";
6
+ import Oe from "./vue-ui-skeleton-C3t9bL6f.js";
7
+ import { _ as Pe } from "./PackageVersion-0Lu6RIig.js";
8
+ import { _ as Ae } from "./PenAndPaper-D4Uu-GqW.js";
9
9
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-CAbtwUJj.cjs"),c=require("./index-D6F-xMcR.cjs"),K=require("./Title-Cj4tUZSu.cjs"),j=require("./usePrinter-B9NkBzf5.cjs"),Q=require("./vue-ui-skeleton-CK5DdXVo.cjs"),W=require("./PackageVersion-CKutD59c.cjs"),Z=require("./PenAndPaper-Bnvy0XRn.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DcWhlk8h.cjs"),c=require("./index-Cai0fWP7.cjs"),K=require("./Title-BkfQdTEX.cjs"),j=require("./usePrinter-B4ojFS2B.cjs"),Q=require("./vue-ui-skeleton-C954hFY-.cjs"),W=require("./PackageVersion-BMNt7NsQ.cjs"),Z=require("./PenAndPaper-BUwLP3Wx.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6F-xMcR.cjs"),Me=require("./Title-Cj4tUZSu.cjs"),Se=require("./usePrinter-B9NkBzf5.cjs"),He=require("./Tooltip-CLjMKc28.cjs"),Ue=require("./Legend-BDIC5aus.cjs"),We=require("./vue-ui-skeleton-CK5DdXVo.cjs"),Ge=require("./DataTable-Bu_0tRZE.cjs"),je=require("./vue-ui-accordion-ChE9WO8Q.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-CAbtwUJj.cjs"),Xe=require("./PackageVersion-CKutD59c.cjs"),Ye=require("./PenAndPaper-Bnvy0XRn.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-CvuQ41yl.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[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,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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)],46,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cai0fWP7.cjs"),Me=require("./Title-BkfQdTEX.cjs"),Se=require("./usePrinter-B4ojFS2B.cjs"),He=require("./Tooltip-BK88meti.cjs"),Ue=require("./Legend-CFqKBI0j.cjs"),We=require("./vue-ui-skeleton-C954hFY-.cjs"),Ge=require("./DataTable-DOiZOQ3J.cjs"),je=require("./vue-ui-accordion-DUGBjyB1.cjs"),Be=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./useNestedProp-DcWhlk8h.cjs"),Xe=require("./PackageVersion-BMNt7NsQ.cjs"),Ye=require("./PenAndPaper-BUwLP3Wx.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-CiINppo2.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[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,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),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)],46,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;