vue-data-ui 2.9.2 → 2.9.3

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-KvKZ2SBJ.cjs → Arrow-Byzfuz-Y.cjs} +1 -1
  2. package/dist/{Arrow-DIEvl571.js → Arrow-Dd8sFWk7.js} +1 -1
  3. package/dist/{BaseIcon-BH4bJe82.js → BaseIcon-CLefSNKF.js} +1 -1
  4. package/dist/{BaseIcon-C6L3qbQ8.cjs → BaseIcon-CSELstL2.cjs} +1 -1
  5. package/dist/{ColorPicker-Dnjy6olA.js → ColorPicker-CZqXDroo.js} +3 -3
  6. package/dist/{ColorPicker-BmVm6Lqe.cjs → ColorPicker-DMqX5Kn5.cjs} +1 -1
  7. package/dist/{DataTable-Cz1SDtvT.cjs → DataTable-CpuMdjPX.cjs} +1 -1
  8. package/dist/{DataTable-CaUgku7o.js → DataTable-Cuky8ZpI.js} +2 -2
  9. package/dist/{Legend-BxZxsJCp.js → Legend-BQ5HGf8B.js} +2 -2
  10. package/dist/{Legend-Bl_MrORk.cjs → Legend-CqHSKd8f.cjs} +1 -1
  11. package/dist/{PackageVersion-BEE_4baV.js → PackageVersion-DJo_CKR-.js} +1 -1
  12. package/dist/{PackageVersion-BrUdYdIC.cjs → PackageVersion-DkyZc28_.cjs} +1 -1
  13. package/dist/{PenAndPaper-B3WdOAcZ.js → PenAndPaper-DK3Wbwoz.js} +3 -3
  14. package/dist/{PenAndPaper-DyGcaflS.cjs → PenAndPaper-DU2wA7cg.cjs} +1 -1
  15. package/dist/{Shape-Hrc-BQkc.js → Shape-BchKnVQT.js} +1 -1
  16. package/dist/{Shape-DuVb3Mev.cjs → Shape-Cp1FyHcE.cjs} +1 -1
  17. package/dist/{Slicer-DVYmI2V1.cjs → Slicer-CE1LNNRp.cjs} +1 -1
  18. package/dist/{Slicer-2ZyRAred.js → Slicer-DvQmWmSB.js} +2 -2
  19. package/dist/{Title-BGh0hWb2.cjs → Title-DV4IpbZv.cjs} +1 -1
  20. package/dist/{Title-CGY0WlAI.js → Title-DmtXFzpc.js} +1 -1
  21. package/dist/{Tooltip-BfEhZz9k.js → Tooltip-BMaBMPpZ.js} +1 -1
  22. package/dist/{Tooltip-DckFFIYj.cjs → Tooltip-De6uq1YK.cjs} +1 -1
  23. package/dist/{dom-to-png-BgJJyI6M.js → dom-to-png-725pnoVX.js} +1 -1
  24. package/dist/{dom-to-png-DnnnXKpR.cjs → dom-to-png-BE7poR2a.cjs} +1 -1
  25. package/dist/{img-DT7UDEPk.cjs → img-CFYnBJP3.cjs} +1 -1
  26. package/dist/{img-DkpJ0ciT.js → img-Ciiut165.js} +1 -1
  27. package/dist/index-Bw9yF1Ws.cjs +9 -0
  28. package/dist/{index-9ZicrZWM.js → index-CeGGP5OF.js} +47 -40
  29. package/dist/pdf-DLDggJUq.cjs +1 -0
  30. package/dist/{pdf-zqw8E-me.js → pdf-DyTBDj-k.js} +18 -18
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +2 -0
  33. package/dist/types/vue-data-ui.d.ts +2 -0
  34. package/dist/{useNestedProp-s1XZrtPS.js → useNestedProp-CD9pbB7F.js} +1 -1
  35. package/dist/{useNestedProp-BS9eJthK.cjs → useNestedProp-CuyRUIUu.cjs} +1 -1
  36. package/dist/{usePrinter-vFXYgZiT.cjs → usePrinter-O9uCoI6k.cjs} +1 -1
  37. package/dist/{usePrinter-D7IXLE53.js → usePrinter-Ox_AUldH.js} +3 -3
  38. package/dist/{vue-data-ui-gEqI-hOT.js → vue-data-ui-Bqni-1Zf.js} +61 -61
  39. package/dist/{vue-data-ui-CNieT2ov.cjs → vue-data-ui-Ci_EB1Pl.cjs} +1 -1
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +18 -18
  42. package/dist/{vue-ui-3d-bar-DX5baNUz.cjs → vue-ui-3d-bar-CwXVZG3Y.cjs} +1 -1
  43. package/dist/{vue-ui-3d-bar-Sbk5MT1S.js → vue-ui-3d-bar-Du8HQpHI.js} +9 -9
  44. package/dist/{vue-ui-accordion-62KnRfCb.js → vue-ui-accordion-B5Gs-td_.js} +3 -3
  45. package/dist/{vue-ui-accordion-DIMalTE4.cjs → vue-ui-accordion-B7WLy1Jg.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-DfuEC7WE.cjs → vue-ui-age-pyramid-B4H7JQkT.cjs} +1 -1
  47. package/dist/{vue-ui-age-pyramid-BkhVyOTM.js → vue-ui-age-pyramid-B8W-ss5n.js} +10 -10
  48. package/dist/vue-ui-annotator-BINIZaue.cjs +371 -0
  49. package/dist/{vue-ui-annotator-CrwbL3rn.js → vue-ui-annotator-DNF_ObQQ.js} +43 -43
  50. package/dist/{vue-ui-bullet-BVr_zBo7.js → vue-ui-bullet-C70Q3NPV.js} +8 -8
  51. package/dist/{vue-ui-bullet-TmXeLFPZ.cjs → vue-ui-bullet-DAbmjJO4.cjs} +1 -1
  52. package/dist/{vue-ui-candlestick-BArypZ1A.js → vue-ui-candlestick-CdC4R7M2.js} +11 -11
  53. package/dist/{vue-ui-candlestick-BFJ8I4sb.cjs → vue-ui-candlestick-DteMmbOt.cjs} +1 -1
  54. package/dist/{vue-ui-carousel-table-CqWp06Xz.js → vue-ui-carousel-table-DRia7BnJ.js} +4 -4
  55. package/dist/{vue-ui-carousel-table-B1i5b5xU.cjs → vue-ui-carousel-table-Dav_wxu5.cjs} +1 -1
  56. package/dist/{vue-ui-chestnut-B8oiuRgc.cjs → vue-ui-chestnut-B6DIgsRe.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-EHo3sSMv.js → vue-ui-chestnut-CHB6EIMR.js} +8 -8
  58. package/dist/{vue-ui-circle-pack-kx10AVM0.js → vue-ui-circle-pack-DqTsATrx.js} +9 -9
  59. package/dist/{vue-ui-circle-pack-BGLhSNyo.cjs → vue-ui-circle-pack-ZYPeAycn.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-C8qofYJh.js → vue-ui-cursor-D6Klb7Ub.js} +2 -2
  61. package/dist/{vue-ui-cursor-H77Z-m2e.cjs → vue-ui-cursor-pMITkG0c.cjs} +1 -1
  62. package/dist/{vue-ui-dashboard-Bn2slDQx.js → vue-ui-dashboard-BjOefVNY.js} +62 -62
  63. package/dist/{vue-ui-dashboard-4YFqFygh.cjs → vue-ui-dashboard-DMKc0NXK.cjs} +1 -1
  64. package/dist/{vue-ui-digits-DbSV0D-j.cjs → vue-ui-digits-CeQ3UvM5.cjs} +1 -1
  65. package/dist/{vue-ui-digits-Cv__rzXF.js → vue-ui-digits-D7bnAeht.js} +2 -2
  66. package/dist/{vue-ui-donut-D_CLR29p.js → vue-ui-donut-B2RReI5v.js} +28 -28
  67. package/dist/{vue-ui-donut-Bno5POxU.cjs → vue-ui-donut-dt7wntWx.cjs} +1 -1
  68. package/dist/{vue-ui-donut-evolution-Dg6laY3D.cjs → vue-ui-donut-evolution-CEMUyFGj.cjs} +1 -1
  69. package/dist/{vue-ui-donut-evolution-BgNwQ1J8.js → vue-ui-donut-evolution-Q8efqEFi.js} +40 -40
  70. package/dist/{vue-ui-dumbbell-DWQl4sxh.cjs → vue-ui-dumbbell-Da0UGWon.cjs} +1 -1
  71. package/dist/{vue-ui-dumbbell-C5Z8rSTk.js → vue-ui-dumbbell-DmJnlQk9.js} +10 -10
  72. package/dist/{vue-ui-flow-D0t3MSCU.cjs → vue-ui-flow-B2LxKwSy.cjs} +1 -1
  73. package/dist/{vue-ui-flow-DKS1oZHc.js → vue-ui-flow-DnpEech8.js} +36 -36
  74. package/dist/{vue-ui-funnel-CqhhBoYG.cjs → vue-ui-funnel-Cfg8_Y28.cjs} +1 -1
  75. package/dist/{vue-ui-funnel-r57KM4Wi.js → vue-ui-funnel-D1FBngXC.js} +9 -9
  76. package/dist/{vue-ui-galaxy-BeQSEKLG.cjs → vue-ui-galaxy-BBseh1Xu.cjs} +1 -1
  77. package/dist/{vue-ui-galaxy-CLIAdqkr.js → vue-ui-galaxy-DeiFZ4-K.js} +35 -35
  78. package/dist/{vue-ui-gauge-BQ4S55FH.js → vue-ui-gauge-BYAT1lpA.js} +19 -19
  79. package/dist/{vue-ui-gauge-CcTneeaQ.cjs → vue-ui-gauge-CgbP28Lu.cjs} +1 -1
  80. package/dist/{vue-ui-gizmo-B_rVeweF.cjs → vue-ui-gizmo-Cg8EOszW.cjs} +1 -1
  81. package/dist/{vue-ui-gizmo-DACB7BcV.js → vue-ui-gizmo-Dx0a1RXr.js} +3 -3
  82. package/dist/{vue-ui-heatmap-DNvbR504.js → vue-ui-heatmap-8ztV6WVL.js} +33 -33
  83. package/dist/{vue-ui-heatmap-DBtRfAWr.cjs → vue-ui-heatmap-Dmnsolb3.cjs} +1 -1
  84. package/dist/{vue-ui-history-plot-MfnR_Gg0.js → vue-ui-history-plot-Bqjnj0j7.js} +11 -11
  85. package/dist/{vue-ui-history-plot-B1zXFmOc.cjs → vue-ui-history-plot-Dyh-V9Gh.cjs} +1 -1
  86. package/dist/{vue-ui-kpi-Dm71j1ZP.cjs → vue-ui-kpi-BC6eewXW.cjs} +1 -1
  87. package/dist/{vue-ui-kpi-DDMCa5qe.js → vue-ui-kpi-BcquwnAL.js} +3 -3
  88. package/dist/{vue-ui-mini-loader-mMxdW73Y.js → vue-ui-mini-loader-B5TCB-jm.js} +2 -2
  89. package/dist/{vue-ui-mini-loader-CROjVz1w.cjs → vue-ui-mini-loader-DwEPWCvw.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-BHUWRS5i.js → vue-ui-molecule-BlQ9EKHu.js} +22 -22
  91. package/dist/{vue-ui-molecule-BulwtJre.cjs → vue-ui-molecule-CxdrRZT1.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-CUWTjV4S.js → vue-ui-mood-radar-CaMrzhKf.js} +11 -11
  93. package/dist/{vue-ui-mood-radar-BhS9UcqE.cjs → vue-ui-mood-radar-D5dAbRIg.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-BQk9K-uM.js → vue-ui-nested-donuts-B0Msfykw.js} +11 -11
  95. package/dist/{vue-ui-nested-donuts-Db_lFOB1.cjs → vue-ui-nested-donuts-PH-8er1N.cjs} +1 -1
  96. package/dist/{vue-ui-onion-C38MS0We.cjs → vue-ui-onion-BdgRqKZC.cjs} +1 -1
  97. package/dist/{vue-ui-onion-CEP_SVGa.js → vue-ui-onion-CJQvWcZc.js} +11 -11
  98. package/dist/{vue-ui-parallel-coordinate-plot-DOER4ePV.cjs → vue-ui-parallel-coordinate-plot-CFSlIws_.cjs} +1 -1
  99. package/dist/{vue-ui-parallel-coordinate-plot-DlIPqsBr.js → vue-ui-parallel-coordinate-plot-e_Fy1AqK.js} +12 -12
  100. package/dist/{vue-ui-quadrant-hEW2euTx.js → vue-ui-quadrant-BUdDJDiC.js} +40 -40
  101. package/dist/{vue-ui-quadrant-BzA3R8WL.cjs → vue-ui-quadrant-CgmJi4VO.cjs} +1 -1
  102. package/dist/{vue-ui-quick-chart-vCYn3Ycg.cjs → vue-ui-quick-chart-WOakiHbL.cjs} +1 -1
  103. package/dist/{vue-ui-quick-chart-D43_sxe7.js → vue-ui-quick-chart-a0Aq180v.js} +37 -37
  104. package/dist/{vue-ui-radar-CrPGLRgF.cjs → vue-ui-radar-D3XH7mnS.cjs} +1 -1
  105. package/dist/{vue-ui-radar-ea-S6hNo.js → vue-ui-radar-Dq5awTJ4.js} +12 -12
  106. package/dist/{vue-ui-rating-DQhxPqnC.cjs → vue-ui-rating-BLYhtefr.cjs} +1 -1
  107. package/dist/{vue-ui-rating-Cr7OYhms.js → vue-ui-rating-CbJwIMBH.js} +10 -10
  108. package/dist/{vue-ui-relation-circle-BD63yYPk.js → vue-ui-relation-circle-Dt3L1hs0.js} +7 -7
  109. package/dist/{vue-ui-relation-circle-Ci_zTDv6.cjs → vue-ui-relation-circle-QSXzaYcG.cjs} +1 -1
  110. package/dist/{vue-ui-rings-Dup7cJhU.js → vue-ui-rings-BzzWkMfI.js} +22 -22
  111. package/dist/{vue-ui-rings-o_5TelyF.cjs → vue-ui-rings-XJSxdsBz.cjs} +1 -1
  112. package/dist/{vue-ui-scatter-D1p3fd_k.cjs → vue-ui-scatter-KB-arFYU.cjs} +1 -1
  113. package/dist/{vue-ui-scatter-CpUvuCj4.js → vue-ui-scatter-WfGg6-i5.js} +44 -44
  114. package/dist/{vue-ui-skeleton-BGykkjYQ.cjs → vue-ui-skeleton-1LYIEAgE.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BjminQzl.js → vue-ui-skeleton-CpGgeJbB.js} +57 -57
  116. package/dist/{vue-ui-smiley-CFKscwS7.js → vue-ui-smiley-C6NH0Lex.js} +2 -2
  117. package/dist/{vue-ui-smiley-BtpjYEEP.cjs → vue-ui-smiley-Dz2M3bCK.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-CRcDMTzh.cjs → vue-ui-spark-trend-B_GfxBXt.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-wAANMLZ4.js → vue-ui-spark-trend-DTeJM_9L.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-BTUT-uco.js → vue-ui-sparkbar-CLGDM4VK.js} +4 -4
  121. package/dist/{vue-ui-sparkbar-BVh9AOEX.cjs → vue-ui-sparkbar-odjVGeM_.cjs} +1 -1
  122. package/dist/{vue-ui-sparkgauge-B_N07sh6.cjs → vue-ui-sparkgauge-83j8e2xQ.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DXxoZfG0.js → vue-ui-sparkgauge-DenhO9cj.js} +9 -9
  124. package/dist/{vue-ui-sparkhistogram-CHbsbOtx.cjs → vue-ui-sparkhistogram-Bsid3CJE.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-cSUQzQ6o.js → vue-ui-sparkhistogram-Ch5_voyg.js} +5 -5
  126. package/dist/{vue-ui-sparkline-_wbJMVVr.js → vue-ui-sparkline-CFx-n0Ax.js} +15 -15
  127. package/dist/{vue-ui-sparkline-Cr5KANZ_.cjs → vue-ui-sparkline-LpkWUXEl.cjs} +1 -1
  128. package/dist/{vue-ui-sparkstackbar-SRvQImaw.cjs → vue-ui-sparkstackbar-CDpHiCTo.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-D93-i-tg.js → vue-ui-sparkstackbar-ZvPhkKk4.js} +5 -5
  130. package/dist/{vue-ui-stackbar-D3KicC2k.cjs → vue-ui-stackbar-CKaqcgK_.cjs} +1 -1
  131. package/dist/{vue-ui-stackbar-CnZsiebh.js → vue-ui-stackbar-CX96MGjz.js} +13 -13
  132. package/dist/{vue-ui-strip-plot-Dv-C246v.js → vue-ui-strip-plot-BCRGcKhd.js} +13 -14
  133. package/dist/{vue-ui-strip-plot-Dz8doRxV.cjs → vue-ui-strip-plot-Cw8Su0WV.cjs} +1 -1
  134. package/dist/vue-ui-table-BcnDEvP5.js +1470 -0
  135. package/dist/vue-ui-table-DCGpCB-H.cjs +14 -0
  136. package/dist/{vue-ui-table-heatmap-CYuY_cv8.js → vue-ui-table-heatmap-BvdOkoVy.js} +4 -4
  137. package/dist/{vue-ui-table-heatmap-C8Vi0yvC.cjs → vue-ui-table-heatmap-XbKVm0qZ.cjs} +1 -1
  138. package/dist/{vue-ui-table-sparkline-C4REu4fs.cjs → vue-ui-table-sparkline-ClWB_nso.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-B76wcNNt.js → vue-ui-table-sparkline-DlAlNznI.js} +5 -5
  140. package/dist/{vue-ui-thermometer-DiZILoae.js → vue-ui-thermometer-DfTbUkLT.js} +7 -7
  141. package/dist/{vue-ui-thermometer-DvNlCnAL.cjs → vue-ui-thermometer-zpcoSEWt.cjs} +1 -1
  142. package/dist/{vue-ui-timer-DUN6vOs9.cjs → vue-ui-timer-DwFy6VaG.cjs} +1 -1
  143. package/dist/{vue-ui-timer-DxYKc_c7.js → vue-ui-timer-TchnXzem.js} +5 -5
  144. package/dist/{vue-ui-tiremarks-BV7MTnlS.cjs → vue-ui-tiremarks-CmAFj_nG.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-D52pzq2N.js → vue-ui-tiremarks-fzrlOBsj.js} +7 -7
  146. package/dist/{vue-ui-treemap-CNbw7CLO.js → vue-ui-treemap-CDo8x9s6.js} +12 -12
  147. package/dist/{vue-ui-treemap-gQhTSE_P.cjs → vue-ui-treemap-DnNrJ4dw.cjs} +1 -1
  148. package/dist/{vue-ui-vertical-bar-B_nsQpZa.js → vue-ui-vertical-bar-Bx1KnXDB.js} +12 -12
  149. package/dist/{vue-ui-vertical-bar-ClJttiMf.cjs → vue-ui-vertical-bar-DxcAPPXR.cjs} +1 -1
  150. package/dist/{vue-ui-waffle-BYBctA3T.cjs → vue-ui-waffle-CvQaobYo.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-CLfNk30s.js → vue-ui-waffle-faLsv9bZ.js} +37 -37
  152. package/dist/{vue-ui-wheel-Bj6lxA5M.cjs → vue-ui-wheel-BWXUHx3h.cjs} +1 -1
  153. package/dist/{vue-ui-wheel-4Yit1iRJ.js → vue-ui-wheel-pn6-k3Wb.js} +7 -7
  154. package/dist/{vue-ui-word-cloud-AZ1OJrxo.cjs → vue-ui-word-cloud-BPU3c5Z2.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D94M5Lsf.js → vue-ui-word-cloud-Bfn2BGMh.js} +10 -10
  156. package/dist/{vue-ui-world-rkzHCxBG.js → vue-ui-world-BbjG83CB.js} +12 -12
  157. package/dist/{vue-ui-world-BwcOIaHG.cjs → vue-ui-world-DWecwIQS.cjs} +2 -2
  158. package/dist/{vue-ui-xy-DXgpQ8zr.js → vue-ui-xy-B5DZ8Qmi.js} +34 -35
  159. package/dist/{vue-ui-xy-DJiY5DSr.cjs → vue-ui-xy-DJZ-eOyQ.cjs} +2 -2
  160. package/dist/{vue-ui-xy-canvas-DsuvSNM3.cjs → vue-ui-xy-canvas-2gXEGzLd.cjs} +1 -1
  161. package/dist/{vue-ui-xy-canvas-CAfAcJWj.js → vue-ui-xy-canvas-BwmEkw6g.js} +12 -12
  162. package/package.json +1 -1
  163. package/dist/index-DjDcQ8pe.cjs +0 -9
  164. package/dist/pdf-DuohwkFu.cjs +0 -1
  165. package/dist/vue-ui-annotator-BGWZZUN7.cjs +0 -371
  166. package/dist/vue-ui-table-Dkoj_poY.js +0 -1466
  167. package/dist/vue-ui-table-iE1t-zP9.cjs +0 -14
@@ -1,18 +1,18 @@
1
- import { useSlots as at, computed as d, ref as v, watch as Ne, onMounted as ot, onBeforeUnmount as ut, createElementBlock as r, openBlock as s, unref as c, normalizeStyle as H, normalizeClass as Be, createBlock as N, createCommentVNode as p, createElementVNode as x, createVNode as re, createSlots as Ve, withCtx as m, renderSlot as g, normalizeProps as U, guardReactiveProps as G, Fragment as $, renderList as P, mergeProps as Me, toDisplayString as A, createTextVNode as De, nextTick as st } from "vue";
2
- import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, L as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-9ZicrZWM.js";
1
+ import { useSlots as at, computed as d, ref as v, watch as Ne, onMounted as ot, onBeforeUnmount as ut, createElementBlock as r, openBlock as s, unref as c, normalizeStyle as H, normalizeClass as Be, createBlock as N, createCommentVNode as p, createElementVNode as x, createVNode as re, createSlots as Ve, withCtx as m, renderSlot as g, normalizeProps as U, guardReactiveProps as G, Fragment as $, renderList as L, mergeProps as Me, toDisplayString as A, createTextVNode as De, nextTick as st } from "vue";
2
+ import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, J as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-CeGGP5OF.js";
3
3
  import { t as $t, u as _t } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as It } from "./Title-CGY0WlAI.js";
5
- import { u as Tt, U as St } from "./usePrinter-D7IXLE53.js";
6
- import { _ as Ot } from "./Tooltip-BfEhZz9k.js";
7
- import { D as Lt } from "./DataTable-CaUgku7o.js";
8
- import { L as Pt } from "./Legend-BxZxsJCp.js";
9
- import At from "./vue-ui-skeleton-BjminQzl.js";
10
- import Ft from "./vue-ui-accordion-62KnRfCb.js";
11
- import { u as Re } from "./useNestedProp-s1XZrtPS.js";
12
- import { _ as zt } from "./PackageVersion-BEE_4baV.js";
13
- import { _ as Nt } from "./PenAndPaper-B3WdOAcZ.js";
4
+ import { _ as It } from "./Title-DmtXFzpc.js";
5
+ import { u as Tt, U as St } from "./usePrinter-Ox_AUldH.js";
6
+ import { _ as Ot } from "./Tooltip-BMaBMPpZ.js";
7
+ import { D as Pt } from "./DataTable-Cuky8ZpI.js";
8
+ import { L as Lt } from "./Legend-BQ5HGf8B.js";
9
+ import At from "./vue-ui-skeleton-CpGgeJbB.js";
10
+ import Ft from "./vue-ui-accordion-B5Gs-td_.js";
11
+ import { u as Re } from "./useNestedProp-CD9pbB7F.js";
12
+ import { _ as zt } from "./PackageVersion-DJo_CKR-.js";
13
+ import { _ as Nt } from "./PenAndPaper-DK3Wbwoz.js";
14
14
  import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as Vt } from "./Shape-Hrc-BQkc.js";
15
+ import { _ as Vt } from "./Shape-BchKnVQT.js";
16
16
  import { u as Mt } from "./useChartAccessibility-BWojgys7.js";
17
17
  import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"], Et = ["stop-color"], Wt = ["id"], qt = ["x", "y", "height", "width"], Ht = ["height", "width"], Xt = { key: 0 }, Yt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Jt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Kt = { key: 1 }, Qt = ["rx", "x", "y", "height", "width", "fill", "filter"], Zt = ["x", "y", "height", "width", "filter"], el = { key: 0 }, tl = { key: 1 }, ll = { key: 2 }, al = { key: 3 }, ol = ["onMouseover", "x", "y", "height", "width"], ul = {
@@ -205,8 +205,8 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
205
205
  y: (e.value.style.chart.layout.grid.vertical ? l : a) * (S.value + e.value.style.chart.layout.grid.spaceBetween) + I.value.top
206
206
  });
207
207
  return t;
208
- }), f = v([]), z = v(!1), Oe = v(null), Le = v(null);
209
- function Pe(t) {
208
+ }), f = v([]), z = v(!1), Oe = v(null), Pe = v(null);
209
+ function Le(t) {
210
210
  if (!e.value.useAnimation) {
211
211
  f.value.includes(t) ? f.value = f.value.filter((u) => u !== t) : f.value.length < D.value.length - 1 && D.value.length > 1 && f.value.push(t);
212
212
  return;
@@ -228,13 +228,13 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
228
228
  i();
229
229
  } else if (f.value.length < D.value.length - 1 && D.value.length > 1) {
230
230
  let u = function() {
231
- o < l / 100 ? (cancelAnimationFrame(Le.value), f.value.push(t), h.value = h.value.map((i, y) => i.uid === t ? {
231
+ o < l / 100 ? (cancelAnimationFrame(Pe.value), f.value.push(t), h.value = h.value.map((i, y) => i.uid === t ? {
232
232
  ...i,
233
233
  values: [0]
234
234
  } : i), z.value = !1) : (z.value = !0, o /= 1.15, h.value = h.value.map((i) => i.uid === t ? {
235
235
  ...i,
236
236
  values: [o]
237
- } : i), Le.value = requestAnimationFrame(u));
237
+ } : i), Pe.value = requestAnimationFrame(u));
238
238
  };
239
239
  u();
240
240
  }
@@ -255,7 +255,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
255
255
  ...t,
256
256
  proportion: t.value / h.value.map((a) => (a.values || []).reduce((l, o) => l + o, 0)).reduce((a, l) => a + l, 0),
257
257
  opacity: f.value.includes(t.uid) ? 0.5 : 1,
258
- segregate: () => Pe(t.uid),
258
+ segregate: () => Le(t.uid),
259
259
  isSegregated: f.value.includes(t.uid)
260
260
  }))), Ze = d(() => ({
261
261
  cy: "waffle-div-legend",
@@ -314,7 +314,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
314
314
  te.value = o;
315
315
  }
316
316
  }
317
- const tt = je, L = d(() => {
317
+ const tt = je, P = d(() => {
318
318
  const t = q.value.map((l) => ({
319
319
  name: l.name,
320
320
  color: l.color
@@ -326,9 +326,9 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
326
326
  }
327
327
  function Ae() {
328
328
  st(() => {
329
- const t = L.value.head.map((o, u) => [[
329
+ const t = P.value.head.map((o, u) => [[
330
330
  o.name
331
- ], [L.value.body[u]], [isNaN(L.value.body[u] / O.value) ? "-" : L.value.body[u] / O.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = wt(a);
331
+ ], [P.value.body[u]], [isNaN(P.value.body[u] / O.value) ? "-" : P.value.body[u] / O.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = wt(a);
332
332
  kt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-waffle" });
333
333
  });
334
334
  }
@@ -346,23 +346,23 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
346
346
  })
347
347
  ),
348
348
  "100%"
349
- ], a = L.value.head.map((u, i) => [
349
+ ], a = P.value.head.map((u, i) => [
350
350
  {
351
351
  color: u.color,
352
352
  name: u.name
353
353
  },
354
354
  j(
355
355
  e.value.style.chart.layout.labels.dataLabels.formatter,
356
- L.value.body[i],
356
+ P.value.body[i],
357
357
  _({
358
358
  p: e.value.style.chart.layout.labels.dataLabels.prefix,
359
- v: L.value.body[i],
359
+ v: P.value.body[i],
360
360
  s: e.value.style.chart.layout.labels.dataLabels.suffix,
361
361
  r: e.value.table.td.roundingValue
362
362
  })
363
363
  ),
364
- isNaN(L.value.body[i] / O.value) ? "-" : _({
365
- v: L.value.body[i] / O.value * 100,
364
+ isNaN(P.value.body[i] / O.value) ? "-" : _({
365
+ v: P.value.body[i] / O.value * 100,
366
366
  s: "%",
367
367
  r: e.value.table.td.roundingPercentage
368
368
  })
@@ -557,7 +557,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
557
557
  }, [
558
558
  re(zt),
559
559
  x("defs", null, [
560
- (s(!0), r($, null, P(n.value, (l, o) => (s(), r("radialGradient", {
560
+ (s(!0), r($, null, L(n.value, (l, o) => (s(), r("radialGradient", {
561
561
  cx: "50%",
562
562
  cy: "50%",
563
563
  r: "50%",
@@ -593,7 +593,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
593
593
  }, null, -1)
594
594
  ]), 8, Wt)
595
595
  ]),
596
- e.value.useCustomCells && n.value.length ? (s(!0), r($, { key: 0 }, P(M.value, (l, o) => (s(), r("foreignObject", {
596
+ e.value.useCustomCells && n.value.length ? (s(!0), r($, { key: 0 }, L(M.value, (l, o) => (s(), r("foreignObject", {
597
597
  x: l.x,
598
598
  y: l.y,
599
599
  height: S.value <= 0 ? 1e-4 : S.value,
@@ -613,11 +613,11 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
613
613
  stroke: "black"
614
614
  }, null, 8, Ht)) : n.value.length && !e.value.useCustomCells ? (s(), r($, { key: 2 }, [
615
615
  t.$slots.pattern ? (s(), r("g", Xt, [
616
- (s(!0), r($, null, P(ae.value, (l) => (s(), r("defs", null, [
616
+ (s(!0), r($, null, L(ae.value, (l) => (s(), r("defs", null, [
617
617
  g(t.$slots, "pattern", Me({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${k.value}_${l.absoluteIndex}` }), void 0, !0)
618
618
  ]))), 256))
619
619
  ])) : p("", !0),
620
- (s(!0), r($, null, P(M.value, (l, o) => (s(), r("rect", {
620
+ (s(!0), r($, null, L(M.value, (l, o) => (s(), r("rect", {
621
621
  rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
622
622
  x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
623
623
  y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
@@ -628,7 +628,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
628
628
  "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
629
629
  filter: K(n.value[o].serieIndex)
630
630
  }, null, 8, Yt))), 256)),
631
- (s(!0), r($, null, P(M.value, (l, o) => (s(), r("rect", {
631
+ (s(!0), r($, null, L(M.value, (l, o) => (s(), r("rect", {
632
632
  rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
633
633
  x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
634
634
  y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
@@ -640,7 +640,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
640
640
  filter: K(n.value[o].serieIndex)
641
641
  }, null, 8, Jt))), 256)),
642
642
  t.$slots.pattern ? (s(), r("g", Kt, [
643
- (s(!0), r($, null, P(M.value, (l, o) => (s(), r("rect", {
643
+ (s(!0), r($, null, L(M.value, (l, o) => (s(), r("rect", {
644
644
  rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
645
645
  x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
646
646
  y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
@@ -652,7 +652,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
652
652
  }, null, 8, Qt))), 256))
653
653
  ])) : p("", !0)
654
654
  ], 64)) : p("", !0),
655
- (s(!0), r($, null, P(M.value, (l, o) => (s(), r($, null, [
655
+ (s(!0), r($, null, L(M.value, (l, o) => (s(), r($, null, [
656
656
  n.value.length && !z.value && !e.value.style.chart.layout.grid.vertical && e.value.style.chart.layout.labels.captions.show && (n.value[o].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || n.value[o].isAbsoluteFirst && o % e.value.style.chart.layout.grid.size === 0 && n.value[o].absoluteStartIndex) ? (s(), r("foreignObject", {
657
657
  key: 0,
658
658
  x: l.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2,
@@ -692,7 +692,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
692
692
  ], 4)
693
693
  ], 8, Zt)) : p("", !0)
694
694
  ], 64))), 256)),
695
- (s(!0), r($, null, P(M.value, (l, o) => (s(), r("rect", {
695
+ (s(!0), r($, null, L(M.value, (l, o) => (s(), r("rect", {
696
696
  onMouseover: (u) => et(o),
697
697
  onMouseleave: a[0] || (a[0] = (u) => {
698
698
  ee.value = !1, V.value = null;
@@ -725,11 +725,11 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
725
725
  ref_key: "chartLegend",
726
726
  ref: ce
727
727
  }, [
728
- e.value.style.chart.legend.show ? (s(), N(Pt, {
728
+ e.value.style.chart.legend.show ? (s(), N(Lt, {
729
729
  key: `legend_${ye.value}`,
730
730
  legendSet: D.value,
731
731
  config: Ze.value,
732
- onClickMarker: a[1] || (a[1] = ({ legend: l }) => Pe(l.uid))
732
+ onClickMarker: a[1] || (a[1] = ({ legend: l }) => Le(l.uid))
733
733
  }, Ve({
734
734
  item: m(({ legend: l }) => [
735
735
  x("div", {
@@ -820,7 +820,7 @@ const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"],
820
820
  }
821
821
  }, {
822
822
  content: m(() => [
823
- (s(), N(Lt, {
823
+ (s(), N(Pt, {
824
824
  key: `table_${pe.value}`,
825
825
  colNames: Q.value.colNames,
826
826
  head: Q.value.head,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-DjDcQ8pe.cjs"),Q=require("./Title-BGh0hWb2.cjs"),R=require("./usePrinter-vFXYgZiT.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-BGykkjYQ.cjs"),U=require("./useNestedProp-BS9eJthK.cjs"),ee=require("./PackageVersion-BrUdYdIC.cjs"),te=require("./PenAndPaper-DyGcaflS.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.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:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.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&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.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":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.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*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.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(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Bw9yF1Ws.cjs"),Q=require("./Title-DV4IpbZv.cjs"),R=require("./usePrinter-O9uCoI6k.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-1LYIEAgE.cjs"),U=require("./useNestedProp-CuyRUIUu.cjs"),ee=require("./PackageVersion-DkyZc28_.cjs"),te=require("./PenAndPaper-DU2wA7cg.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.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:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.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&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.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":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.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*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.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(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
@@ -1,12 +1,12 @@
1
1
  import { computed as f, ref as c, watch as J, onMounted as he, onBeforeUnmount as de, createElementBlock as v, openBlock as n, unref as s, normalizeStyle as S, createBlock as _, createCommentVNode as h, createSlots as ye, withCtx as g, renderSlot as y, normalizeProps as $, guardReactiveProps as O, normalizeClass as z, createVNode as fe, Fragment as K, renderList as Q, toDisplayString as pe } from "vue";
2
- import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-9ZicrZWM.js";
3
- import { _ as Ie } from "./Title-CGY0WlAI.js";
4
- import { u as xe, U as Ae } from "./usePrinter-D7IXLE53.js";
2
+ import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-CeGGP5OF.js";
3
+ import { _ as Ie } from "./Title-DmtXFzpc.js";
4
+ import { u as xe, U as Ae } from "./usePrinter-Ox_AUldH.js";
5
5
  import { t as Fe, u as Pe } from "./useResponsive-Cw4oZ8sQ.js";
6
- import Se from "./vue-ui-skeleton-BjminQzl.js";
7
- import { u as te } from "./useNestedProp-s1XZrtPS.js";
8
- import { _ as ze } from "./PackageVersion-BEE_4baV.js";
9
- import { _ as Me } from "./PenAndPaper-B3WdOAcZ.js";
6
+ import Se from "./vue-ui-skeleton-CpGgeJbB.js";
7
+ import { u as te } from "./useNestedProp-CD9pbB7F.js";
8
+ import { _ as ze } from "./PackageVersion-DJo_CKR-.js";
9
+ import { _ as Me } from "./PenAndPaper-DK3Wbwoz.js";
10
10
  import { u as Te } from "./useUserOptionState-BIvW1Kz7.js";
11
11
  import { u as Ne } from "./useChartAccessibility-BWojgys7.js";
12
12
  import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-DjDcQ8pe.cjs"),pe=require("./Title-BGh0hWb2.cjs"),ne=require("./usePrinter-vFXYgZiT.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-DIMalTE4.cjs"),ge=require("./DataTable-Cz1SDtvT.cjs"),re=require("./useNestedProp-BS9eJthK.cjs"),ye=require("./PackageVersion-BrUdYdIC.cjs"),be=require("./Tooltip-DckFFIYj.cjs"),we=require("./PenAndPaper-DyGcaflS.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-C6L3qbQ8.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"1461b4f2":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:s[1]||(s[1]=l=>e.unref(le)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:v.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.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(ge.DataTable,{key:`table_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),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)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-d3519257"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-Bw9yF1Ws.cjs"),pe=require("./Title-DV4IpbZv.cjs"),ne=require("./usePrinter-O9uCoI6k.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-B7WLy1Jg.cjs"),ge=require("./DataTable-CpuMdjPX.cjs"),re=require("./useNestedProp-CuyRUIUu.cjs"),ye=require("./PackageVersion-DkyZc28_.cjs"),be=require("./Tooltip-De6uq1YK.cjs"),we=require("./PenAndPaper-DU2wA7cg.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-CSELstL2.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"1461b4f2":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we._sfc_main,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:s[1]||(s[1]=l=>e.unref(le)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:v.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.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(ge.DataTable,{key:`table_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),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)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-d3519257"]]);exports.default=_e;
@@ -1,18 +1,18 @@
1
1
  import { useCssVars as Ne, computed as K, ref as h, watch as de, onMounted as _e, onBeforeUnmount as Ae, createElementBlock as V, openBlock as b, unref as v, normalizeStyle as ne, createBlock as Q, createCommentVNode as U, createVNode as ve, createSlots as Ie, withCtx as S, renderSlot as $, normalizeProps as G, guardReactiveProps as L, normalizeClass as ye, createElementVNode as he, Fragment as Re, renderList as We, toDisplayString as be, createTextVNode as Ve, nextTick as we } from "vue";
2
- import { u as Ue, c as Ce, a6 as Be, v as De, t as Ee, p as se, a as Ge, o as Le, e as ke, g as He, f as je, X as Xe, q as qe, r as Ye, x as Ze } from "./index-9ZicrZWM.js";
3
- import { _ as Je } from "./Title-CGY0WlAI.js";
4
- import { u as Ke, U as Qe } from "./usePrinter-D7IXLE53.js";
2
+ import { u as Ue, c as Ce, ai as Be, v as De, t as Ee, p as se, a as Ge, o as Le, e as ke, g as He, f as je, X as Xe, q as qe, r as Ye, x as Ze } from "./index-CeGGP5OF.js";
3
+ import { _ as Je } from "./Title-DmtXFzpc.js";
4
+ import { u as Ke, U as Qe } from "./usePrinter-Ox_AUldH.js";
5
5
  import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
6
- import at from "./vue-ui-accordion-62KnRfCb.js";
7
- import { D as lt } from "./DataTable-CaUgku7o.js";
8
- import { u as $e } from "./useNestedProp-s1XZrtPS.js";
9
- import { _ as nt } from "./PackageVersion-BEE_4baV.js";
10
- import { _ as st } from "./Tooltip-BfEhZz9k.js";
11
- import { _ as rt } from "./PenAndPaper-B3WdOAcZ.js";
6
+ import at from "./vue-ui-accordion-B5Gs-td_.js";
7
+ import { D as lt } from "./DataTable-Cuky8ZpI.js";
8
+ import { u as $e } from "./useNestedProp-CD9pbB7F.js";
9
+ import { _ as nt } from "./PackageVersion-DJo_CKR-.js";
10
+ import { _ as st } from "./Tooltip-BMaBMPpZ.js";
11
+ import { _ as rt } from "./PenAndPaper-DK3Wbwoz.js";
12
12
  import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
13
13
  import { u as ut } from "./useChartAccessibility-BWojgys7.js";
14
14
  import { u as ct } from "./usePanZoom-CUkkqW81.js";
15
- import dt from "./BaseIcon-BH4bJe82.js";
15
+ import dt from "./BaseIcon-CLefSNKF.js";
16
16
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  function xe({
18
18
  word: w,