vue-data-ui 2.4.58 → 2.4.60

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 (202) hide show
  1. package/README.md +82 -51
  2. package/dist/{Arrow-gAjHZoeI.js → Arrow-BLYi22nR.js} +1 -1
  3. package/dist/{Arrow-DyvFEpcu.cjs → Arrow-BoAS4IQq.cjs} +1 -1
  4. package/dist/{BaseIcon-DKQOeA_7.cjs → BaseIcon-BHIQREMO.cjs} +1 -1
  5. package/dist/{BaseIcon-B0g_Fksl.js → BaseIcon-EWtqg17H.js} +1 -1
  6. package/dist/{DataTable-BloVsNyj.js → DataTable-DO8KGCcE.js} +2 -2
  7. package/dist/{DataTable-Bju6hUOX.cjs → DataTable-Dtq94CxH.cjs} +1 -1
  8. package/dist/{Legend-BsPIe_nG.cjs → Legend-CMyzYtIb.cjs} +1 -1
  9. package/dist/{Legend-CdpH9pz7.js → Legend-DGWOCyLt.js} +1 -1
  10. package/dist/{PackageVersion-W3d_oNMs.js → PackageVersion-BSLNI6kk.js} +1 -1
  11. package/dist/{PackageVersion-Bmujq1-q.cjs → PackageVersion-B_1OHk5A.cjs} +1 -1
  12. package/dist/{PenAndPaper-xuFs3BqZ.js → PenAndPaper-CxMtGtJt.js} +3 -3
  13. package/dist/{PenAndPaper-Be8tn5wI.cjs → PenAndPaper-DhXsAnuf.cjs} +1 -1
  14. package/dist/{Shape-CXTDY_Vo.js → Shape-DnqZey62.js} +1 -1
  15. package/dist/{Shape-Cx89w9Ul.cjs → Shape-y66NSXKp.cjs} +1 -1
  16. package/dist/{Slicer-HGyFRIya.cjs → Slicer-CkI4c7ft.cjs} +1 -1
  17. package/dist/{Slicer-ENfxtrty.js → Slicer-D9bKLcPd.js} +2 -2
  18. package/dist/{Title-1u-GspsX.js → Title-CSqO5Y62.js} +1 -1
  19. package/dist/{Title-CNO85jNx.cjs → Title-DjAOcuWO.cjs} +1 -1
  20. package/dist/{Tooltip-DQOeAhx3.cjs → Tooltip-AHTiRuWB.cjs} +1 -1
  21. package/dist/{Tooltip-B-1Q-Tts.js → Tooltip-D_6iYZSH.js} +1 -1
  22. package/dist/documentation/installation.md +48 -48
  23. package/dist/index-CgZGelSi.cjs +9 -0
  24. package/dist/{index-BSzkwF5n.js → index-D7dTQAhm.js} +2 -2
  25. package/dist/style.css +1 -1
  26. package/dist/{useNestedProp-CSKuqs0C.cjs → useNestedProp-BxCE3J3Z.cjs} +1 -1
  27. package/dist/{useNestedProp-BWC_DPZ5.js → useNestedProp-Dqsj7eUX.js} +1 -1
  28. package/dist/{usePrinter-DtwWejoO.js → usePrinter-B_Ihuvge.js} +1 -1
  29. package/dist/{usePrinter-D-iwyLyE.cjs → usePrinter-sTw1FdN_.cjs} +1 -1
  30. package/dist/{vue-data-ui-Com866XF.cjs → vue-data-ui-BttN99Pm.cjs} +1 -1
  31. package/dist/{vue-data-ui-jb1K_VTO.js → vue-data-ui-CcmpjOfT.js} +60 -60
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/vue-ui-3d-bar-8ewYobNj.cjs +19 -0
  35. package/dist/{vue-ui-3d-bar-Cqc5gqnb.js → vue-ui-3d-bar-TVrDBG5I.js} +170 -158
  36. package/dist/{vue-ui-accordion-lCjQo2kd.cjs → vue-ui-accordion-BZH6cz4t.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-CJdfn7N-.js → vue-ui-accordion-lCiFhb8k.js} +3 -3
  38. package/dist/vue-ui-age-pyramid-BqL8zDjt.cjs +1 -0
  39. package/dist/{vue-ui-age-pyramid-D89kDZnF.js → vue-ui-age-pyramid-rHtMf5-R.js} +176 -164
  40. package/dist/{vue-ui-annotator-Cf-zFFmT.js → vue-ui-annotator-DHgSReIY.js} +1 -1
  41. package/dist/{vue-ui-annotator-muK3_F6c.cjs → vue-ui-annotator-fZIPfk7y.cjs} +1 -1
  42. package/dist/vue-ui-bullet-48af9PqJ.cjs +34 -0
  43. package/dist/{vue-ui-bullet-CT5Gkoot.js → vue-ui-bullet-BwhlvcvA.js} +155 -143
  44. package/dist/vue-ui-candlestick-Ce3tBGpX.cjs +2 -0
  45. package/dist/{vue-ui-candlestick-DmsHITZF.js → vue-ui-candlestick-dMIrnPD6.js} +96 -84
  46. package/dist/{vue-ui-carousel-table-N7QL7jRR.js → vue-ui-carousel-table-EcwgqGoI.js} +97 -95
  47. package/dist/vue-ui-carousel-table-ZhjRbt5-.cjs +1 -0
  48. package/dist/vue-ui-chestnut-VbrVVUon.cjs +6 -0
  49. package/dist/{vue-ui-chestnut-C7b1puxs.js → vue-ui-chestnut-vnOyc43k.js} +160 -148
  50. package/dist/{vue-ui-cursor-BOS7Yvio.cjs → vue-ui-cursor-BdXcdH2e.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-CAnOat4M.js → vue-ui-cursor-nMbvzf_R.js} +2 -2
  52. package/dist/{vue-ui-dashboard-OzgTaY3n.js → vue-ui-dashboard-BtaQn50h.js} +2 -2
  53. package/dist/{vue-ui-dashboard-DI22fn9M.cjs → vue-ui-dashboard-CboN2WC8.cjs} +1 -1
  54. package/dist/{vue-ui-digits-DGP4EmpQ.cjs → vue-ui-digits-CUvrlpPz.cjs} +1 -1
  55. package/dist/{vue-ui-digits-DCm2stj-.js → vue-ui-digits-CVfceh4-.js} +2 -2
  56. package/dist/vue-ui-donut-BckYXDZJ.cjs +1 -0
  57. package/dist/{vue-ui-donut-BilWHtZy.js → vue-ui-donut-CgYNthls.js} +292 -280
  58. package/dist/vue-ui-donut-evolution-BhlBp6R-.cjs +1 -0
  59. package/dist/{vue-ui-donut-evolution-DKmnEHH_.js → vue-ui-donut-evolution-Bose25D6.js} +285 -273
  60. package/dist/vue-ui-dumbbell-C2iT17s8.cjs +9 -0
  61. package/dist/{vue-ui-dumbbell-KwkTK5_q.js → vue-ui-dumbbell-CzSlukSu.js} +159 -147
  62. package/dist/vue-ui-flow-DDlFrtkk.cjs +1 -0
  63. package/dist/{vue-ui-flow-BShJPhpa.js → vue-ui-flow-DoDWK84L.js} +162 -150
  64. package/dist/vue-ui-funnel-BfJoFIfh.cjs +1 -0
  65. package/dist/{vue-ui-funnel-D4xk_DsA.js → vue-ui-funnel-CM_ixf98.js} +229 -215
  66. package/dist/vue-ui-galaxy-CP71UAF5.cjs +1 -0
  67. package/dist/{vue-ui-galaxy-Ch3QRiP6.js → vue-ui-galaxy-DlwjTJCx.js} +148 -136
  68. package/dist/{vue-ui-gauge-DZUv5beK.js → vue-ui-gauge-ByfGCK6z.js} +119 -107
  69. package/dist/vue-ui-gauge-LqhfOqH-.cjs +1 -0
  70. package/dist/{vue-ui-gizmo-B39J58Zm.js → vue-ui-gizmo-D8Rq5vzL.js} +45 -43
  71. package/dist/vue-ui-gizmo-DFnOaVHf.cjs +1 -0
  72. package/dist/vue-ui-heatmap-A8qDlc58.cjs +1 -0
  73. package/dist/{vue-ui-heatmap-z8KMf1yo.js → vue-ui-heatmap-BLjVXXW4.js} +138 -126
  74. package/dist/vue-ui-history-plot-Bxi5QRP8.cjs +1 -0
  75. package/dist/{vue-ui-history-plot--Lw1-910.js → vue-ui-history-plot-DXoNlRFZ.js} +127 -115
  76. package/dist/vue-ui-kpi-5cGZ0OBJ.cjs +1 -0
  77. package/dist/{vue-ui-kpi-BgNONvkD.js → vue-ui-kpi-Bbot_WSI.js} +36 -33
  78. package/dist/{vue-ui-mini-loader-BrCuKpE6.js → vue-ui-mini-loader-DOE9WO73.js} +2 -2
  79. package/dist/{vue-ui-mini-loader-DjEyKAQe.cjs → vue-ui-mini-loader-DWX9tRhG.cjs} +1 -1
  80. package/dist/{vue-ui-molecule-C_eF6tga.js → vue-ui-molecule-0TReXB2j.js} +212 -200
  81. package/dist/vue-ui-molecule-CxeFzXS5.cjs +1 -0
  82. package/dist/vue-ui-mood-radar-1jLzXLXZ.cjs +1 -0
  83. package/dist/{vue-ui-mood-radar-Ch_Qkx9d.js → vue-ui-mood-radar-BMFn685U.js} +123 -111
  84. package/dist/vue-ui-nested-donuts-4FVj04vI.cjs +17 -0
  85. package/dist/{vue-ui-nested-donuts-uqfXLRGX.js → vue-ui-nested-donuts-B9rWg9V8.js} +156 -144
  86. package/dist/vue-ui-onion-Br97OxbL.cjs +5 -0
  87. package/dist/{vue-ui-onion-CbYOkmrF.js → vue-ui-onion-CnIF_tv7.js} +125 -113
  88. package/dist/vue-ui-parallel-coordinate-plot-Bi_h0H7e.cjs +8 -0
  89. package/dist/{vue-ui-parallel-coordinate-plot-aLNOckoo.js → vue-ui-parallel-coordinate-plot-D9iHCwiA.js} +159 -147
  90. package/dist/{vue-ui-quadrant-CuPCDHgS.js → vue-ui-quadrant-4wjbqumK.js} +211 -199
  91. package/dist/vue-ui-quadrant-DHDToQ9a.cjs +1 -0
  92. package/dist/vue-ui-quick-chart-CJKM6r9X.cjs +15 -0
  93. package/dist/{vue-ui-quick-chart-DBCH5qM1.js → vue-ui-quick-chart-s6FHOZf8.js} +576 -540
  94. package/dist/vue-ui-radar-DBR2qBM5.cjs +1 -0
  95. package/dist/{vue-ui-radar-BamYIcPL.js → vue-ui-radar-DpT9w1N-.js} +183 -171
  96. package/dist/vue-ui-rating-D1Mbw1G8.cjs +1 -0
  97. package/dist/{vue-ui-rating-DxaSXiPx.js → vue-ui-rating-D31vSe7a.js} +102 -98
  98. package/dist/vue-ui-relation-circle-BNJbqK_A.cjs +1 -0
  99. package/dist/{vue-ui-relation-circle-C9_8YW0u.js → vue-ui-relation-circle-DfP6BpVn.js} +129 -117
  100. package/dist/{vue-ui-rings-DFzPi4m9.js → vue-ui-rings-ChcGuwL9.js} +150 -138
  101. package/dist/vue-ui-rings-CjB8a3kO.cjs +2 -0
  102. package/dist/vue-ui-scatter-jk0N3EwD.cjs +1 -0
  103. package/dist/{vue-ui-scatter-n_jHEngt.js → vue-ui-scatter-wUZ2CBpp.js} +320 -308
  104. package/dist/{vue-ui-screenshot-1_OHWjZv.js → vue-ui-screenshot-Blg3Suvg.js} +1 -1
  105. package/dist/{vue-ui-screenshot-BzY_uB1R.cjs → vue-ui-screenshot-DAFpjSWg.cjs} +1 -1
  106. package/dist/{vue-ui-skeleton-Ojz7f2oH.js → vue-ui-skeleton-BObG0eVD.js} +3 -3
  107. package/dist/{vue-ui-skeleton-DKtNfORj.cjs → vue-ui-skeleton-m4l9jfqA.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-CXvJ3sXA.js → vue-ui-smiley-DuQ3M02e.js} +208 -206
  109. package/dist/vue-ui-smiley-rh3J3TRY.cjs +2 -0
  110. package/dist/vue-ui-spark-trend-DlNNTu2c.cjs +1 -0
  111. package/dist/{vue-ui-spark-trend-uyDT9RJC.js → vue-ui-spark-trend-SMpnQ3VV.js} +124 -112
  112. package/dist/{vue-ui-sparkbar-CxW1vMP2.js → vue-ui-sparkbar-BB6fvRXK.js} +100 -96
  113. package/dist/vue-ui-sparkbar-chnu8aw9.cjs +1 -0
  114. package/dist/{vue-ui-sparkgauge-NmLBla47.js → vue-ui-sparkgauge-Bk_78-YB.js} +60 -48
  115. package/dist/vue-ui-sparkgauge-FONvy7z9.cjs +1 -0
  116. package/dist/vue-ui-sparkhistogram--uyRru2f.cjs +1 -0
  117. package/dist/{vue-ui-sparkhistogram-B8SukBWt.js → vue-ui-sparkhistogram-CIsN7kQ2.js} +116 -104
  118. package/dist/{vue-ui-sparkline-CokyAm9w.js → vue-ui-sparkline-CFvUW--O.js} +124 -112
  119. package/dist/vue-ui-sparkline-i6LHjMJR.cjs +1 -0
  120. package/dist/vue-ui-sparkstackbar-1RvV2xwt.cjs +1 -0
  121. package/dist/{vue-ui-sparkstackbar-QgZq1O55.js → vue-ui-sparkstackbar-DDMsCq0l.js} +85 -81
  122. package/dist/{vue-ui-stackbar-CTvPYXjb.js → vue-ui-stackbar-BSo9t-88.js} +219 -207
  123. package/dist/vue-ui-stackbar-CQgtC1I4.cjs +6 -0
  124. package/dist/vue-ui-strip-plot-BOSoKxsk.cjs +1 -0
  125. package/dist/{vue-ui-strip-plot-DXPoWvNA.js → vue-ui-strip-plot-C99LsMeZ.js} +113 -101
  126. package/dist/{vue-ui-table-Bb3BBVjm.js → vue-ui-table-3M-aoEc7.js} +1 -1
  127. package/dist/{vue-ui-table-8M1ctuqL.cjs → vue-ui-table-M-6G46br.cjs} +1 -1
  128. package/dist/{vue-ui-table-heatmap-Bv0EfTut.js → vue-ui-table-heatmap-BuYlqsq9.js} +82 -78
  129. package/dist/vue-ui-table-heatmap-CoozQ9bU.cjs +1 -0
  130. package/dist/{vue-ui-table-sparkline-Bs72Df0-.js → vue-ui-table-sparkline-Dm5kErGp.js} +78 -74
  131. package/dist/vue-ui-table-sparkline-u0a2YCwp.cjs +1 -0
  132. package/dist/vue-ui-thermometer-DAz_NjaN.cjs +1 -0
  133. package/dist/{vue-ui-thermometer-DRGjTOIy.js → vue-ui-thermometer-DrY5FsCD.js} +132 -120
  134. package/dist/vue-ui-timer-dCCTsApx.cjs +64 -0
  135. package/dist/{vue-ui-timer-DCA2Dkfi.js → vue-ui-timer-meFVXDUZ.js} +94 -82
  136. package/dist/vue-ui-tiremarks-CRKQklZh.cjs +1 -0
  137. package/dist/{vue-ui-tiremarks-CTqweMbJ.js → vue-ui-tiremarks-PaZ-lr2D.js} +104 -94
  138. package/dist/vue-ui-treemap-Bce1C9jk.cjs +1 -0
  139. package/dist/{vue-ui-treemap-tz9AdMu0.js → vue-ui-treemap-RjHcVtc6.js} +336 -332
  140. package/dist/{vue-ui-vertical-bar-BEkWSr_A.js → vue-ui-vertical-bar-C8rC-QBl.js} +188 -176
  141. package/dist/vue-ui-vertical-bar-e7zR_v0M.cjs +4 -0
  142. package/dist/{vue-ui-waffle-DQPO5aOU.js → vue-ui-waffle-BT8Yn0cl.js} +140 -136
  143. package/dist/vue-ui-waffle-BZLPoVht.cjs +1 -0
  144. package/dist/{vue-ui-wheel-B0u6LKiw.js → vue-ui-wheel-Bq75N1i7.js} +100 -88
  145. package/dist/vue-ui-wheel-CT6r7EQR.cjs +1 -0
  146. package/dist/{vue-ui-word-cloud-CEns9_NI.js → vue-ui-word-cloud-BGh6DY8P.js} +132 -120
  147. package/dist/vue-ui-word-cloud-PcOI8TCE.cjs +1 -0
  148. package/dist/vue-ui-xy-BmNqzUPR.cjs +3 -0
  149. package/dist/{vue-ui-xy-DxpIt6dh.js → vue-ui-xy-DuCsguVf.js} +139 -127
  150. package/dist/{vue-ui-xy-canvas-D_Qiy2N1.js → vue-ui-xy-canvas-6qf3rgfa.js} +231 -227
  151. package/dist/{vue-ui-xy-canvas--zS_4x6O.cjs → vue-ui-xy-canvas-BnJBE19B.cjs} +2 -2
  152. package/package.json +1 -1
  153. package/dist/index-DHwfzZfj.cjs +0 -9
  154. package/dist/vue-ui-3d-bar-Dif8_wHk.cjs +0 -19
  155. package/dist/vue-ui-age-pyramid-DHxsu2a1.cjs +0 -1
  156. package/dist/vue-ui-bullet-CKbrouCq.cjs +0 -34
  157. package/dist/vue-ui-candlestick-C3YNgFyO.cjs +0 -2
  158. package/dist/vue-ui-carousel-table-BU1bmZWZ.cjs +0 -1
  159. package/dist/vue-ui-chestnut-BEALHSS3.cjs +0 -6
  160. package/dist/vue-ui-donut-Jjz58SJJ.cjs +0 -1
  161. package/dist/vue-ui-donut-evolution-BtfRmlIq.cjs +0 -1
  162. package/dist/vue-ui-dumbbell-C2LYuBRx.cjs +0 -9
  163. package/dist/vue-ui-flow-3vjkptJR.cjs +0 -1
  164. package/dist/vue-ui-funnel-DyJdIi_i.cjs +0 -1
  165. package/dist/vue-ui-galaxy-BmGIzIeD.cjs +0 -1
  166. package/dist/vue-ui-gauge-LeMSJBEk.cjs +0 -1
  167. package/dist/vue-ui-gizmo-B7Kum6eT.cjs +0 -1
  168. package/dist/vue-ui-heatmap-CqPuEjJ1.cjs +0 -1
  169. package/dist/vue-ui-history-plot-bjMvk_4h.cjs +0 -1
  170. package/dist/vue-ui-kpi-DIuPP4R7.cjs +0 -1
  171. package/dist/vue-ui-molecule-C3wtpoCr.cjs +0 -1
  172. package/dist/vue-ui-mood-radar-BomqP0zI.cjs +0 -1
  173. package/dist/vue-ui-nested-donuts-KRq3Fcqy.cjs +0 -17
  174. package/dist/vue-ui-onion-G4p7rA61.cjs +0 -5
  175. package/dist/vue-ui-parallel-coordinate-plot-B2OIBraO.cjs +0 -8
  176. package/dist/vue-ui-quadrant-DoWeGQSC.cjs +0 -1
  177. package/dist/vue-ui-quick-chart-DR1qF9kr.cjs +0 -15
  178. package/dist/vue-ui-radar-B6M2ZChR.cjs +0 -1
  179. package/dist/vue-ui-rating-HSL7IrbQ.cjs +0 -1
  180. package/dist/vue-ui-relation-circle-CM_QkigI.cjs +0 -1
  181. package/dist/vue-ui-rings-CmD8g04s.cjs +0 -2
  182. package/dist/vue-ui-scatter-D_WxNGoY.cjs +0 -1
  183. package/dist/vue-ui-smiley-sKWpgakD.cjs +0 -2
  184. package/dist/vue-ui-spark-trend-ByxJmVE5.cjs +0 -1
  185. package/dist/vue-ui-sparkbar-DYHuBv3f.cjs +0 -1
  186. package/dist/vue-ui-sparkgauge-CCvUn2R2.cjs +0 -1
  187. package/dist/vue-ui-sparkhistogram-FU-uE07T.cjs +0 -1
  188. package/dist/vue-ui-sparkline-9LU8yp1t.cjs +0 -1
  189. package/dist/vue-ui-sparkstackbar-9k6C-g_r.cjs +0 -1
  190. package/dist/vue-ui-stackbar-Drqz1of9.cjs +0 -6
  191. package/dist/vue-ui-strip-plot-UYP2fk1H.cjs +0 -1
  192. package/dist/vue-ui-table-heatmap-BqQpJ_Ou.cjs +0 -1
  193. package/dist/vue-ui-table-sparkline-D5xemE-q.cjs +0 -1
  194. package/dist/vue-ui-thermometer-DzynFkq0.cjs +0 -1
  195. package/dist/vue-ui-timer-W5dIiOew.cjs +0 -64
  196. package/dist/vue-ui-tiremarks-BbAzwE5q.cjs +0 -1
  197. package/dist/vue-ui-treemap-CEVP7-S2.cjs +0 -1
  198. package/dist/vue-ui-vertical-bar-D_2WzLxJ.cjs +0 -4
  199. package/dist/vue-ui-waffle-BAvqVwhK.cjs +0 -1
  200. package/dist/vue-ui-wheel-Cjnheeql.cjs +0 -1
  201. package/dist/vue-ui-word-cloud-bxF8a7TI.cjs +0 -1
  202. package/dist/vue-ui-xy-BBvVOSPm.cjs +0 -3
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CgZGelSi.cjs"),ye=require("./useResponsive-BJ7DTGpm.cjs"),Ie=require("./Title-DjAOcuWO.cjs"),ge=require("./usePrinter-sTw1FdN_.cjs"),ze=require("./Tooltip-AHTiRuWB.cjs"),Fe=require("./DataTable-Dtq94CxH.cjs"),Oe=require("./Legend-CMyzYtIb.cjs"),Ae=require("./vue-ui-skeleton-m4l9jfqA.cjs"),De=require("./vue-ui-accordion-BZH6cz4t.cjs"),me=require("./useNestedProp-BxCE3J3Z.cjs"),Me=require("./PackageVersion-B_1OHk5A.cjs"),qe=require("./PenAndPaper-DhXsAnuf.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=$=>(e.pushScopeId("data-v-a0b27ef9"),$=$(),e.popScopeId(),$),je=["id"],Ge=["xmlns","viewBox"],We=["id"],He=["stop-color"],Ye=["stop-color"],Xe=["id"],Je=be(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ke=be(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Qe=[Je,Ke],Ze=["x","y","height","width"],et=["height","width"],tt=["rx","x","y","height","width","stroke","stroke-width","filter"],lt=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],at=["x","y","height","width","filter"],ot={key:0},rt={key:1},ut={key:2},nt={key:3},st=["onMouseover","x","y","height","width"],it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],vt={key:0},dt={key:1},pt=["innerHTML"],ht={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup($,{expose:ke,emit:we}){const p=$,{vue_ui_waffle:Ce}=n.useConfig(),xe=e.useSlots();e.onMounted(()=>{xe["chart-background"]&&console.warn("VueUiWaffle does not support the #chart-background slot.")});const V=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),Be=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),S=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Re.useUserOptionState({config:t.value});function ee(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=ee(),D.value=!t.value.showOnChartHover,te(),X.value+=1,J.value+=1,K.value+=1},{deep:!0});const E=e.ref(null);function te(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:S.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});k.value.width=o,k.value.height=a,f.value.width=o,f.value.height=a});E.value=new ResizeObserver(l),E.value.observe(S.value.parentNode)}}e.onMounted(()=>{te()}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:re}=ge.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),f=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(f.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),C=e.computed(()=>(f.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>f.value.width/t.value.style.chart.layout.grid.size),I=e.computed(()=>f.value.height/t.value.style.chart.layout.grid.size);function ne(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),u=r.map(Math.floor),i=r.map(h=>h%1);let d=o-u.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function se(){return p.dataset.map((l,o)=>({...l,color:n.convertColorToHex(l.color)||ue.value[o]||n.palette[o]||n.palette[o%n.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const ie=e.computed(()=>se()),c=e.ref(ie.value);e.watch(()=>p.dataset,l=>{c.value=se()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return ne(l)}),Ne=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return ne(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:_e.value[o]})))),$e=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Ne.value[o]})));function Te(){return $e.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,u=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(u);d+=1)i.push(d);return l=u,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),P=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(C.value+t.value.style.chart.layout.grid.spaceBetween)+f.value.top});return l}),v=e.ref([]),x=e.ref(!1),ce=e.ref(null),ve=e.ref(null);function de(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=ie.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0),a=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>u?(cancelAnimationFrame(ce.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,r+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ce.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=o;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<a/100?(cancelAnimationFrame(ve.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ve.value=requestAnimationFrame(u))};u()}we("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||n.palette[o]||n.palette[o%n.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>de(l.uid),isSegregated:v.value.includes(l.uid)}))),Pe=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),y=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Ve(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<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" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:o.value/y.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${u})</span></div>`:r+=`<b>${u}%</b></div>`}A.value=r}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function q(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function pe(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(o);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,y.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/y.value)?"-":n.dataLabel({v:g.value.body[i]/y.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ee(l){N.value=l,j.value+=1}function he(){m.value.showTable=!m.value.showTable}function fe(){m.value.showTooltip=!m.value.showTooltip}const F=e.ref(!1);function R(){F.value=!F.value}return ke({getData:Te,generatePdf:oe,generateCsv:pe,generateImage:re,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:S,id:`vue-ui-waffle_${b.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:S.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,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",{key:2,ref_key:"chartTitle",ref:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ie._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Ee,onGeneratePdf:e.unref(oe),onGenerateCsv:pe,onGenerateImage:e.unref(re),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ye)],8,We))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Qe,8,Xe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value})),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:f.value.height-24,width:f.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:q(s.value[r].serieIndex)},null,8,tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:q(s.value[r].serieIndex)},null,8,lt))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:I.value<=0?1e-4:I.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:q(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",ot,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ut," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,at)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>Ve(r),onMouseleave:o[0]||(o[0]=u=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:I.value<=0?1e-4:I.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,st))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${K.value}`,legendSet:_.value,config:Pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>de(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",dt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",vt," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(n.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,ct)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:m.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),V.value?(e.openBlock(),e.createBlock(De.default,{key:8,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${J.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,pt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,je))}},ft=Ue._export_sfc(ht,[["__scopeId","data-v-a0b27ef9"]]);exports.default=ft;
@@ -1,18 +1,18 @@
1
- import { computed as p, ref as s, watch as H, onMounted as re, onBeforeUnmount as ue, openBlock as r, createElementBlock as v, normalizeStyle as A, unref as l, createBlock as w, createCommentVNode as h, createSlots as ie, withCtx as b, renderSlot as f, normalizeProps as I, guardReactiveProps as P, normalizeClass as Y, createVNode as ce, Fragment as ve, renderList as he, toDisplayString as de } from "vue";
2
- import { u as fe, c as ye, t as pe, o as ge, e as me, w as W, X as ke, i as we, v as q, f as be } from "./index-BSzkwF5n.js";
3
- import { _ as Ce } from "./Title-1u-GspsX.js";
4
- import { u as _e, U as Oe } from "./usePrinter-DtwWejoO.js";
5
- import { t as $e, u as xe } from "./useResponsive-CoxXLe23.js";
6
- import Ae from "./vue-ui-skeleton-Ojz7f2oH.js";
7
- import { u as V } from "./useNestedProp-BWC_DPZ5.js";
8
- import { _ as Ie } from "./PackageVersion-W3d_oNMs.js";
9
- import { P as Pe } from "./PenAndPaper-xuFs3BqZ.js";
1
+ import { computed as p, ref as r, watch as H, onMounted as re, onBeforeUnmount as ue, openBlock as n, createElementBlock as c, normalizeStyle as A, unref as o, createBlock as w, createCommentVNode as v, createSlots as ie, withCtx as b, renderSlot as f, normalizeProps as I, guardReactiveProps as P, normalizeClass as Y, createVNode as ce, Fragment as ve, renderList as he, toDisplayString as de } from "vue";
2
+ import { u as fe, c as ye, t as pe, o as ge, e as me, w as W, X as ke, i as we, v as q, f as be } from "./index-D7dTQAhm.js";
3
+ import { _ as Ce } from "./Title-CSqO5Y62.js";
4
+ import { u as _e, U as $e } from "./usePrinter-B_Ihuvge.js";
5
+ import { t as Oe, u as xe } from "./useResponsive-CoxXLe23.js";
6
+ import Ae from "./vue-ui-skeleton-BObG0eVD.js";
7
+ import { u as V } from "./useNestedProp-Dqsj7eUX.js";
8
+ import { _ as Ie } from "./PackageVersion-BSLNI6kk.js";
9
+ import { P as Pe } from "./PenAndPaper-CxMtGtJt.js";
10
10
  import { u as Fe } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { _ as Se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], Te = ["cx", "cy", "r", "stroke", "stroke-width"], Ue = ["x", "y", "font-size", "fill", "font-weight"], Le = {
12
+ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["width", "height"], Te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], Ue = ["cx", "cy", "r", "stroke", "stroke-width"], Le = ["x", "y", "font-size", "fill", "font-weight"], Xe = {
13
13
  key: 5,
14
14
  class: "vue-data-ui-watermark"
15
- }, Xe = {
15
+ }, Be = {
16
16
  __name: "vue-ui-wheel",
17
17
  props: {
18
18
  config: {
@@ -29,10 +29,10 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
29
29
  }
30
30
  },
31
31
  setup(J, { expose: K }) {
32
- const d = J, { vue_ui_wheel: Q } = fe(), C = p(() => !!d.dataset && Object.keys(d.dataset).length), _ = s(ye()), Z = s(null), F = s(0), y = s(null), S = s(null), z = s(null), M = s(null), N = s(0), e = p({
32
+ const d = J, { vue_ui_wheel: Q } = fe(), C = p(() => !!d.dataset && Object.keys(d.dataset).length), _ = r(ye()), Z = r(null), F = r(0), y = r(null), S = r(null), z = r(null), M = r(null), N = r(0), e = p({
33
33
  get: () => L(),
34
34
  set: (t) => t
35
- }), { userOptionsVisible: O, setUserOptionsVisibility: T, keepUserOptionState: U } = Fe({ config: e.value });
35
+ }), { userOptionsVisible: $, setUserOptionsVisibility: T, keepUserOptionState: U } = Fe({ config: e.value });
36
36
  function L() {
37
37
  const t = V({
38
38
  userConfig: d.config,
@@ -46,47 +46,47 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
46
46
  } : t;
47
47
  }
48
48
  H(() => d.config, (t) => {
49
- e.value = L(), O.value = !e.value.showOnChartHover, j(), N.value += 1;
49
+ e.value = L(), $.value = !e.value.showOnChartHover, R(), N.value += 1;
50
50
  }, { deep: !0 });
51
- const { isPrinting: X, isImaging: B, generatePdf: G, generateImage: E } = _e({
51
+ const { isPrinting: X, isImaging: B, generatePdf: E, generateImage: G } = _e({
52
52
  elementId: _.value,
53
53
  fileName: e.value.style.chart.title.text || "vue-ui-wheel"
54
- }), ee = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), o = s({
54
+ }), ee = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), l = r({
55
55
  size: 360,
56
56
  height: 360,
57
57
  width: 360
58
- }), $ = s(e.value.style.chart.layout.percentage.fontSize), c = p(() => ({
59
- radius: Math.min(o.value.width, o.value.height) * 0.9 / 2,
60
- centerX: o.value.width / 2,
61
- centerY: o.value.height / 2
58
+ }), O = r(e.value.style.chart.layout.percentage.fontSize), h = p(() => ({
59
+ radius: Math.min(l.value.width, l.value.height) * 0.9 / 2,
60
+ centerX: l.value.width / 2,
61
+ centerY: l.value.height / 2
62
62
  }));
63
- function R(t, u = 1) {
63
+ function j(t, u = 1) {
64
64
  return {
65
- x: c.value.centerX + c.value.radius * Math.cos(29.85 + t * Math.PI / 180) * u,
66
- y: c.value.centerY + c.value.radius * Math.sin(29.85 + t * Math.PI / 180) * u
65
+ x: h.value.centerX + h.value.radius * Math.cos(29.85 + t * Math.PI / 180) * u,
66
+ y: h.value.centerY + h.value.radius * Math.sin(29.85 + t * Math.PI / 180) * u
67
67
  };
68
68
  }
69
- const n = s(e.value.style.chart.animation.use ? 0 : d.dataset.percentage || 0);
69
+ const s = r(e.value.style.chart.animation.use ? 0 : d.dataset.percentage || 0);
70
70
  H(() => d.dataset, (t) => {
71
- e.value.style.chart.animation.use ? D(t.percentage) : n.value = t.percentage || 0;
71
+ e.value.style.chart.animation.use ? D(t.percentage) : s.value = t.percentage || 0;
72
72
  }, { deep: !0 });
73
- const g = s(null);
73
+ const g = r(null);
74
74
  re(() => {
75
- j();
75
+ R();
76
76
  });
77
- function j() {
77
+ function R() {
78
78
  if (ge(d.dataset) && me({
79
79
  componentName: "VueUiWheel",
80
80
  type: "dataset"
81
81
  }), D(d.dataset.percentage || 0), e.value.responsive) {
82
- const t = $e(() => {
82
+ const t = Oe(() => {
83
83
  const { width: u, height: a } = xe({
84
84
  chart: y.value,
85
85
  title: e.value.style.chart.title.text ? S.value : null,
86
86
  source: z.value,
87
87
  noTitle: M.value
88
88
  });
89
- o.value.width = u, o.value.height = a, $.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(u, a);
89
+ l.value.width = u, l.value.height = a, O.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(u, a);
90
90
  });
91
91
  g.value = new ResizeObserver(t), g.value.observe(y.value.parentNode);
92
92
  }
@@ -96,16 +96,16 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
96
96
  });
97
97
  function D(t) {
98
98
  let u = e.value.style.chart.animation.speed;
99
- const a = Math.abs(t - n.value) / (u * 120);
99
+ const a = Math.abs(t - s.value) / (u * 120);
100
100
  function i() {
101
- n.value < t ? n.value = Math.min(n.value + a, t) : n.value > t && (n.value = Math.max(n.value - a, t)), n.value !== t && requestAnimationFrame(i);
101
+ s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(i);
102
102
  }
103
103
  i();
104
104
  }
105
105
  const te = p(() => {
106
106
  const t = [];
107
107
  for (let a = 0; a < 100; a += 1) {
108
- const i = n.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: le, y: oe } = R(o.value.size / 100 * a), { x: ne, y: se } = R(o.value.size / 100 * a, e.value.style.chart.layout.wheel.ticks.sizeRatio);
108
+ const i = s.value > a ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: le, y: oe } = j(l.value.size / 100 * a), { x: ne, y: se } = j(l.value.size / 100 * a, e.value.style.chart.layout.wheel.ticks.sizeRatio);
109
109
  t.push({
110
110
  x1: le,
111
111
  y1: oe,
@@ -115,49 +115,49 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
115
115
  });
116
116
  }
117
117
  return t;
118
- }), m = s(!1);
118
+ }), m = r(!1);
119
119
  function ae(t) {
120
120
  m.value = t, F.value += 1;
121
121
  }
122
- const k = s(!1);
122
+ const k = r(!1);
123
123
  function x() {
124
124
  k.value = !k.value;
125
125
  }
126
126
  return K({
127
- generatePdf: G,
128
- generateImage: E,
127
+ generatePdf: E,
128
+ generateImage: G,
129
129
  toggleAnnotator: x
130
- }), (t, u) => (r(), v("div", {
130
+ }), (t, u) => (n(), c("div", {
131
131
  class: "vue-ui-wheel",
132
132
  ref_key: "wheelChart",
133
133
  ref: y,
134
134
  id: _.value,
135
135
  style: A(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
136
- onMouseenter: u[0] || (u[0] = () => l(T)(!0)),
137
- onMouseleave: u[1] || (u[1] = () => l(T)(!1))
136
+ onMouseenter: u[0] || (u[0] = () => o(T)(!0)),
137
+ onMouseleave: u[1] || (u[1] = () => o(T)(!1))
138
138
  }, [
139
- e.value.userOptions.buttons.annotator ? (r(), w(Pe, {
139
+ e.value.userOptions.buttons.annotator ? (n(), w(Pe, {
140
140
  key: 0,
141
141
  parent: y.value,
142
142
  backgroundColor: e.value.style.chart.backgroundColor,
143
143
  color: e.value.style.chart.color,
144
144
  active: k.value,
145
145
  onClose: x
146
- }, null, 8, ["parent", "backgroundColor", "color", "active"])) : h("", !0),
147
- ee.value ? (r(), v("div", {
146
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : v("", !0),
147
+ ee.value ? (n(), c("div", {
148
148
  key: 1,
149
149
  ref_key: "noTitle",
150
150
  ref: M,
151
151
  class: "vue-data-ui-no-title-space",
152
152
  style: "height:36px; width: 100%;background:transparent"
153
- }, null, 512)) : h("", !0),
154
- e.value.style.chart.title.text ? (r(), v("div", {
153
+ }, null, 512)) : v("", !0),
154
+ e.value.style.chart.title.text ? (n(), c("div", {
155
155
  key: 2,
156
156
  ref_key: "chartTitle",
157
157
  ref: S,
158
158
  style: "width:100%;background:transparent;padding-bottom:12px"
159
159
  }, [
160
- (r(), w(Ce, {
160
+ (n(), w(Ce, {
161
161
  key: `title_${N.value}`,
162
162
  config: {
163
163
  title: {
@@ -170,15 +170,15 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
170
170
  }
171
171
  }
172
172
  }, null, 8, ["config"]))
173
- ], 512)) : h("", !0),
174
- e.value.userOptions.show && C.value && (l(U) || l(O)) ? (r(), w(Oe, {
173
+ ], 512)) : v("", !0),
174
+ e.value.userOptions.show && C.value && (o(U) || o($)) ? (n(), w($e, {
175
175
  ref_key: "details",
176
176
  ref: Z,
177
177
  key: `user_options_${F.value}`,
178
178
  backgroundColor: e.value.style.chart.backgroundColor,
179
179
  color: e.value.style.chart.color,
180
- isPrinting: l(X),
181
- isImaging: l(B),
180
+ isPrinting: o(X),
181
+ isImaging: o(B),
182
182
  uid: _.value,
183
183
  hasPdf: e.value.userOptions.buttons.pdf,
184
184
  hasImg: e.value.userOptions.buttons.img,
@@ -191,11 +191,11 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
191
191
  isAnnotation: k.value,
192
192
  chartElement: y.value,
193
193
  onToggleFullscreen: ae,
194
- onGeneratePdf: l(G),
195
- onGenerateImage: l(E),
194
+ onGeneratePdf: o(E),
195
+ onGenerateImage: o(G),
196
196
  onToggleAnnotator: x,
197
197
  style: A({
198
- visibility: l(U) ? l(O) ? "visible" : "hidden" : "visible"
198
+ visibility: o(U) ? o($) ? "visible" : "hidden" : "visible"
199
199
  })
200
200
  }, ie({ _: 2 }, [
201
201
  t.$slots.optionPdf ? {
@@ -226,66 +226,78 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
226
226
  ]),
227
227
  key: "3"
228
228
  } : void 0
229
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
230
- C.value ? (r(), v("svg", {
229
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
230
+ C.value ? (n(), c("svg", {
231
231
  key: 4,
232
- xmlns: l(ke),
232
+ xmlns: o(ke),
233
233
  class: Y({ "vue-data-ui-fullscreen--on": m.value, "vue-data-ui-fulscreen--off": !m.value }),
234
- viewBox: `0 0 ${o.value.width <= 0 ? 10 : o.value.width} ${o.value.height <= 0 ? 10 : o.value.height}`,
234
+ viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
235
235
  style: A(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
236
236
  }, [
237
237
  ce(Ie),
238
- (r(!0), v(ve, null, he(te.value, (a, i) => (r(), v("line", {
238
+ t.$slots["chart-background"] ? (n(), c("foreignObject", {
239
+ key: 0,
240
+ x: 0,
241
+ y: 0,
242
+ width: l.value.width <= 0 ? 10 : l.value.width,
243
+ height: l.value.height <= 0 ? 10 : l.value.height,
244
+ style: {
245
+ pointerEvents: "none"
246
+ }
247
+ }, [
248
+ f(t.$slots, "chart-background", {}, void 0, !0)
249
+ ], 8, Ne)) : v("", !0),
250
+ (n(!0), c(ve, null, he(te.value, (a, i) => (n(), c("line", {
239
251
  x1: a.x1,
240
252
  x2: a.x2,
241
253
  y1: a.y1,
242
254
  y2: a.y2,
243
255
  stroke: a.color,
244
- "stroke-width": 5 / 360 * Math.min(o.value.width, o.value.height),
256
+ "stroke-width": 5 / 360 * Math.min(l.value.width, l.value.height),
245
257
  "stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
246
- class: Y({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i <= n.value })
247
- }, null, 10, Ne))), 256)),
248
- e.value.style.chart.layout.innerCircle.show ? (r(), v("circle", {
249
- key: 0,
250
- cx: c.value.centerX,
251
- cy: c.value.centerY,
252
- r: c.value.radius * 0.8 <= 0 ? 1e-4 : c.value.radius * 0.8,
258
+ class: Y({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i <= s.value })
259
+ }, null, 10, Te))), 256)),
260
+ e.value.style.chart.layout.innerCircle.show ? (n(), c("circle", {
261
+ key: 1,
262
+ cx: h.value.centerX,
263
+ cy: h.value.centerY,
264
+ r: h.value.radius * 0.8 <= 0 ? 1e-4 : h.value.radius * 0.8,
253
265
  stroke: e.value.style.chart.layout.innerCircle.stroke,
254
266
  "stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
255
267
  fill: "none"
256
- }, null, 8, Te)) : h("", !0),
257
- e.value.style.chart.layout.percentage.show ? (r(), v("text", {
258
- key: 1,
259
- x: c.value.centerX,
260
- y: c.value.centerY + $.value / 3,
261
- "font-size": $.value,
262
- fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? l(W)(e.value.style.chart.layout.wheel.ticks.activeColor, n.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
268
+ }, null, 8, Ue)) : v("", !0),
269
+ e.value.style.chart.layout.percentage.show ? (n(), c("text", {
270
+ key: 2,
271
+ x: h.value.centerX,
272
+ y: h.value.centerY + O.value / 3,
273
+ "font-size": O.value,
274
+ fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? o(W)(e.value.style.chart.layout.wheel.ticks.activeColor, s.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
263
275
  "text-anchor": "middle",
264
276
  "font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
265
277
  style: { "font-variant-numeric": "tabluar-nums" }
266
- }, de(l(we)(
278
+ }, de(o(we)(
267
279
  e.value.style.chart.layout.percentage.formatter,
268
- l(q)(n.value),
269
- l(be)({
270
- v: l(q)(n.value),
280
+ o(q)(s.value),
281
+ o(be)({
282
+ v: o(q)(s.value),
271
283
  s: "%",
272
284
  r: e.value.style.chart.layout.percentage.rounding
273
285
  })
274
- )), 9, Ue)) : h("", !0),
275
- f(t.$slots, "svg", { svg: o.value }, void 0, !0)
276
- ], 14, Me)) : h("", !0),
277
- t.$slots.watermark ? (r(), v("div", Le, [
278
- f(t.$slots, "watermark", I(P({ isPrinting: l(X) || l(B) })), void 0, !0)
279
- ])) : h("", !0),
280
- t.$slots.source ? (r(), v("div", {
286
+ )), 9, Le)) : v("", !0),
287
+ f(t.$slots, "svg", { svg: l.value }, void 0, !0)
288
+ ], 14, Me)) : v("", !0),
289
+ t.$slots.watermark ? (n(), c("div", Xe, [
290
+ f(t.$slots, "watermark", I(P({ isPrinting: o(X) || o(B) })), void 0, !0)
291
+ ])) : v("", !0),
292
+ t.$slots.source ? (n(), c("div", {
281
293
  key: 6,
282
294
  ref_key: "source",
283
295
  ref: z,
284
296
  dir: "auto"
285
297
  }, [
286
298
  f(t.$slots, "source", {}, void 0, !0)
287
- ], 512)) : h("", !0),
288
- C.value ? h("", !0) : (r(), w(Ae, {
299
+ ], 512)) : v("", !0),
300
+ C.value ? v("", !0) : (n(), w(Ae, {
289
301
  key: 7,
290
302
  config: {
291
303
  type: "wheel",
@@ -299,7 +311,7 @@ const ze = ["id"], Me = ["xmlns", "viewBox"], Ne = ["x1", "x2", "y1", "y2", "str
299
311
  }, null, 8, ["config"]))
300
312
  ], 44, ze));
301
313
  }
302
- }, Je = /* @__PURE__ */ Se(Xe, [["__scopeId", "data-v-149700ac"]]);
314
+ }, Ke = /* @__PURE__ */ Se(Be, [["__scopeId", "data-v-9a761d10"]]);
303
315
  export {
304
- Je as default
316
+ Ke as default
305
317
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CgZGelSi.cjs"),W=require("./Title-DjAOcuWO.cjs"),E=require("./usePrinter-sTw1FdN_.cjs"),M=require("./useResponsive-BJ7DTGpm.cjs"),J=require("./vue-ui-skeleton-m4l9jfqA.cjs"),T=require("./useNestedProp-BxCE3J3Z.cjs"),K=require("./PackageVersion-B_1OHk5A.cjs"),Q=require("./PenAndPaper-DhXsAnuf.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ne=["xmlns","viewBox"],oe=["width","height"],le=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ae=["cx","cy","r","stroke","stroke-width"],re=["x","y","font-size","fill","font-weight"],se={key:5,class:"vue-data-ui-watermark"},ue={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(V,{expose:q}){const c=V,{vue_ui_wheel:U}=s.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(s.createUid()),R=e.ref(null),w=e.ref(0),v=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(null),P=e.ref(0),t=e.computed({get:()=>_(),set:n=>n}),{userOptionsVisible:m,setUserOptionsVisibility:S,keepUserOptionState:N}=Z.useUserOptionState({config:t.value});function _(){const n=T.useNestedProp({userConfig:c.config,defaultConfig:U});return n.theme?{...T.useNestedProp({userConfig:s.themes.vue_ui_wheel[n.theme]||c.config,defaultConfig:n})}:n}e.watch(()=>c.config,n=>{t.value=_(),m.value=!t.value.showOnChartHover,z(),P.value+=1},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:$,generateImage:A}=E.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),L=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),l=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),i=e.computed(()=>({radius:Math.min(l.value.width,l.value.height)*.9/2,centerX:l.value.width/2,centerY:l.value.height/2}));function I(n,r=1){return{x:i.value.centerX+i.value.radius*Math.cos(29.85+n*Math.PI/180)*r,y:i.value.centerY+i.value.radius*Math.sin(29.85+n*Math.PI/180)*r}}const a=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,n=>{t.value.style.chart.animation.use?F(n.percentage):a.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{z()});function z(){if(s.objectIsEmpty(c.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),F(c.dataset.percentage||0),t.value.responsive){const n=M.throttle(()=>{const{width:r,height:o}=M.useResponsive({chart:v.value,title:t.value.style.chart.title.text?C.value:null,source:b.value,noTitle:B.value});l.value.width=r,l.value.height=o,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(r,o)});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function F(n){let r=t.value.style.chart.animation.speed;const o=Math.abs(n-a.value)/(r*120);function u(){a.value<n?a.value=Math.min(a.value+o,n):a.value>n&&(a.value=Math.max(a.value-o,n)),a.value!==n&&requestAnimationFrame(u)}u()}const j=e.computed(()=>{const n=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:H,y:X}=I(l.value.size/100*o),{x:D,y:Y}=I(l.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:H,y1:X,x2:D,y2:Y,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function G(n){h.value=n,w.value+=1}const f=e.ref(!1);function k(){f.value=!f.value}return q({generatePdf:$,generateImage:A,toggleAnnotator:k}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(S)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(S)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:k},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:B,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",{key:2,ref_key:"chartTitle",ref:C,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(W._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(N)||e.unref(m))?(e.openBlock(),e.createBlock(E.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:G,onGeneratePdf:e.unref($),onGenerateImage:e.unref(A),onToggleAnnotator:k,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(m)?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),n.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width<=0?10:l.value.width,height:l.value.height<=0?10:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(n.$slots,"chart-background",{},void 0,!0)],8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(l.value.width,l.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u<=a.value})},null,10,le))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:i.value.centerX,cy:i.value.centerY,r:i.value.radius*.8<=0?1e-4:i.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:i.value.centerX,y:i.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(s.checkNaN)(a.value),e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:l.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,te))}},ie=ee._export_sfc(ue,[["__scopeId","data-v-9a761d10"]]);exports.default=ie;