vue-data-ui 2.9.7-beta.7 → 2.10.1

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 (165) hide show
  1. package/dist/{Arrow-BXe4KRVG.js → Arrow-BiwOlXfX.js} +1 -1
  2. package/dist/{Arrow-q9FkUQE-.cjs → Arrow-QSJq1QXz.cjs} +1 -1
  3. package/dist/{BaseIcon-By_LgUm3.cjs → BaseIcon-CccbUmmx.cjs} +1 -1
  4. package/dist/{BaseIcon-pJTMhtwZ.js → BaseIcon-CugzlRIB.js} +1 -1
  5. package/dist/{ColorPicker-CzH_L7oz.js → ColorPicker-Bqv3ZR7N.js} +3 -3
  6. package/dist/{ColorPicker-Bg2jgtz8.cjs → ColorPicker-DANVWfwS.cjs} +1 -1
  7. package/dist/{DataTable-DygM2RPO.js → DataTable--GI-DrhZ.js} +2 -2
  8. package/dist/{DataTable-Dih5G6q8.cjs → DataTable-BtWdtAUt.cjs} +1 -1
  9. package/dist/{Legend-DV5BtMlU.cjs → Legend-BYAydsbU.cjs} +1 -1
  10. package/dist/{Legend-B-F0dUuO.js → Legend-Bh3njoaI.js} +2 -2
  11. package/dist/PackageVersion-CIG1jUoQ.cjs +1 -0
  12. package/dist/{PackageVersion-DiDNQaQb.js → PackageVersion-GwcyKwzb.js} +3 -3
  13. package/dist/{PenAndPaper-NSCbqjP7.js → PenAndPaper-C8nE9Htd.js} +3 -3
  14. package/dist/{PenAndPaper-BcZr88YR.cjs → PenAndPaper-CvqghU08.cjs} +1 -1
  15. package/dist/{Shape-DpczxG7m.js → Shape-CoxSOYo0.js} +1 -1
  16. package/dist/{Shape-Ccs6ZNyU.cjs → Shape-DuCjoYEa.cjs} +1 -1
  17. package/dist/{Slicer-jNw3X5MI.js → Slicer-DCRA_8yB.js} +2 -2
  18. package/dist/{Slicer-DhiPdUJc.cjs → Slicer-iaOAIWyg.cjs} +1 -1
  19. package/dist/{Title-zIvA-EJz.js → Title-CASnfBZ_.js} +1 -1
  20. package/dist/{Title-BKc86QJC.cjs → Title-CQxTyQdP.cjs} +1 -1
  21. package/dist/Tooltip-DpeUgH6i.cjs +9 -0
  22. package/dist/Tooltip-j8icrqWr.js +158 -0
  23. package/dist/{dom-to-png-BkCipusj.cjs → dom-to-png-C8nt61zy.cjs} +1 -1
  24. package/dist/{dom-to-png-nkRNNLZE.js → dom-to-png-CaJWmfYX.js} +1 -1
  25. package/dist/{img-CvE8UOtD.cjs → img-5e_6eDJP.cjs} +1 -1
  26. package/dist/{img-DZMBkiHz.js → img-D3H0MQ0_.js} +1 -1
  27. package/dist/{index-sxQQG3Lq.cjs → index-CHDUeW3x.cjs} +1 -1
  28. package/dist/{index-DkQhVckX.js → index-CvceFsAt.js} +1 -1
  29. package/dist/{pdf-D3mylPQ0.cjs → pdf-0YdU2asU.cjs} +1 -1
  30. package/dist/{pdf-DzNIdbn6.js → pdf-D39cNF6K.js} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/{useNestedProp-C1yNgVwb.cjs → useNestedProp-BKE4eQv3.cjs} +1 -1
  33. package/dist/{useNestedProp-CMz_vifI.js → useNestedProp-CCO2zzSz.js} +1 -1
  34. package/dist/{usePrinter-vuPAeatm.cjs → usePrinter-DyQISLol.cjs} +1 -1
  35. package/dist/{usePrinter-BFNx5frV.js → usePrinter-ximty4az.js} +3 -3
  36. package/dist/{vue-data-ui-GdEQOmG_.js → vue-data-ui-4Sp3kGRk.js} +62 -62
  37. package/dist/{vue-data-ui-Di_dyx1c.cjs → vue-data-ui-Cnu3pIt-.cjs} +1 -1
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +1 -1
  40. package/dist/{vue-ui-3d-bar-D-nk_DlU.cjs → vue-ui-3d-bar-CpZKk74W.cjs} +1 -1
  41. package/dist/{vue-ui-3d-bar-BsvkxWpu.js → vue-ui-3d-bar-WcfPdvHo.js} +9 -9
  42. package/dist/{vue-ui-accordion-BGde8cPu.cjs → vue-ui-accordion-B6zl7smQ.cjs} +1 -1
  43. package/dist/{vue-ui-accordion-BhmqK_dm.js → vue-ui-accordion-C-Crf9Kp.js} +3 -3
  44. package/dist/{vue-ui-age-pyramid-asECPGCu.cjs → vue-ui-age-pyramid-C9w9oTK4.cjs} +1 -1
  45. package/dist/{vue-ui-age-pyramid-BtqpeI3J.js → vue-ui-age-pyramid-pBC0KAC8.js} +10 -10
  46. package/dist/{vue-ui-annotator-C3xWd9g5.cjs → vue-ui-annotator-BmRIPGkd.cjs} +1 -1
  47. package/dist/{vue-ui-annotator-BCajN-fC.js → vue-ui-annotator-DM_4LsN-.js} +2 -2
  48. package/dist/{vue-ui-bullet-B71gwkuo.cjs → vue-ui-bullet-DOhxxyQ7.cjs} +1 -1
  49. package/dist/{vue-ui-bullet-BF3-Pueo.js → vue-ui-bullet-Stv9P9bD.js} +8 -8
  50. package/dist/{vue-ui-candlestick-Bp2mrD8a.js → vue-ui-candlestick-BOhHukQT.js} +11 -11
  51. package/dist/{vue-ui-candlestick-BWkqiNin.cjs → vue-ui-candlestick-CxpYZEKV.cjs} +1 -1
  52. package/dist/{vue-ui-carousel-table-BgLDVPgY.js → vue-ui-carousel-table-CwUTxYnK.js} +4 -4
  53. package/dist/{vue-ui-carousel-table-I7Y3f7xc.cjs → vue-ui-carousel-table-DqbmvlOl.cjs} +1 -1
  54. package/dist/{vue-ui-chestnut-CgF-gOVE.cjs → vue-ui-chestnut-C8WpvC_j.cjs} +1 -1
  55. package/dist/{vue-ui-chestnut-BcLBSZUh.js → vue-ui-chestnut-g5CchL-G.js} +8 -8
  56. package/dist/{vue-ui-circle-pack-1lp3In2P.cjs → vue-ui-circle-pack-C-b8MtVb.cjs} +1 -1
  57. package/dist/{vue-ui-circle-pack-BxQVYs5O.js → vue-ui-circle-pack-C-kJTnDN.js} +9 -9
  58. package/dist/{vue-ui-cursor-CHWZT6d2.js → vue-ui-cursor-BXAcaXWy.js} +2 -2
  59. package/dist/{vue-ui-cursor-OlXxkOFr.cjs → vue-ui-cursor-BYIDY_XT.cjs} +1 -1
  60. package/dist/{vue-ui-dashboard-y-1C2nQF.cjs → vue-ui-dashboard-CRolbu6z.cjs} +1 -1
  61. package/dist/{vue-ui-dashboard-BDvAiUow.js → vue-ui-dashboard-CuJXUgxz.js} +62 -62
  62. package/dist/{vue-ui-digits-CNDfDm6H.js → vue-ui-digits-DSOpmvDy.js} +2 -2
  63. package/dist/{vue-ui-digits-DM9tB5y5.cjs → vue-ui-digits-NO6lt99x.cjs} +1 -1
  64. package/dist/{vue-ui-donut-C4ktwvQU.cjs → vue-ui-donut-B_iglo-e.cjs} +1 -1
  65. package/dist/{vue-ui-donut-evolution-jzcI2uE9.cjs → vue-ui-donut-evolution-B-qz0knN.cjs} +1 -1
  66. package/dist/{vue-ui-donut-evolution-Dn9TPIbk.js → vue-ui-donut-evolution-B3vjCqx3.js} +11 -11
  67. package/dist/{vue-ui-donut-Bt8aw3rM.js → vue-ui-donut-xBtAG6tV.js} +12 -12
  68. package/dist/{vue-ui-dumbbell-CFmc7SvX.cjs → vue-ui-dumbbell-BtZEureY.cjs} +1 -1
  69. package/dist/{vue-ui-dumbbell-BJQDoD-K.js → vue-ui-dumbbell-sb2hF1XY.js} +10 -10
  70. package/dist/{vue-ui-flow-2DRQtt4_.cjs → vue-ui-flow-BGWHcBp1.cjs} +1 -1
  71. package/dist/{vue-ui-flow-DC8uT2at.js → vue-ui-flow-BnOUifwC.js} +9 -9
  72. package/dist/{vue-ui-funnel-DUSY2dBf.js → vue-ui-funnel-CK560PmT.js} +9 -9
  73. package/dist/{vue-ui-funnel-DF80O6Xx.cjs → vue-ui-funnel-CmlGCH6m.cjs} +1 -1
  74. package/dist/{vue-ui-galaxy-B_p6csFe.js → vue-ui-galaxy-DX86TMbo.js} +11 -11
  75. package/dist/{vue-ui-galaxy-Chm22yXO.cjs → vue-ui-galaxy-uFa9S6wW.cjs} +1 -1
  76. package/dist/{vue-ui-gauge-DOyYLorX.cjs → vue-ui-gauge-Bvibjzuh.cjs} +1 -1
  77. package/dist/{vue-ui-gauge-BOzVDItg.js → vue-ui-gauge-p7HDLD8Q.js} +7 -7
  78. package/dist/{vue-ui-gizmo-vX9L5RFJ.js → vue-ui-gizmo-O7xD1RVH.js} +3 -3
  79. package/dist/{vue-ui-gizmo-WMdqs_yb.cjs → vue-ui-gizmo-mGk58l53.cjs} +1 -1
  80. package/dist/{vue-ui-heatmap-BcVZnxvl.cjs → vue-ui-heatmap-Bgd9OCN7.cjs} +1 -1
  81. package/dist/{vue-ui-heatmap-CXwM2LPV.js → vue-ui-heatmap-zJv6LywK.js} +10 -10
  82. package/dist/{vue-ui-history-plot-CGv4-vlM.cjs → vue-ui-history-plot-ByohcmFh.cjs} +1 -1
  83. package/dist/{vue-ui-history-plot-B8oI65a8.js → vue-ui-history-plot-DLQ_iKLU.js} +11 -11
  84. package/dist/{vue-ui-kpi-Crn3TSnU.js → vue-ui-kpi-BqAVbl-C.js} +3 -3
  85. package/dist/{vue-ui-kpi-4n98Ko9c.cjs → vue-ui-kpi-q4rtUh1J.cjs} +1 -1
  86. package/dist/{vue-ui-mini-loader-4FpiNlCf.js → vue-ui-mini-loader-BUI1DhPA.js} +2 -2
  87. package/dist/{vue-ui-mini-loader-Cj6BxyJ5.cjs → vue-ui-mini-loader-BuaDAatX.cjs} +1 -1
  88. package/dist/{vue-ui-molecule-DqAuzj16.cjs → vue-ui-molecule-CiKnN8sY.cjs} +1 -1
  89. package/dist/{vue-ui-molecule-B8l5pT6v.js → vue-ui-molecule-DT_XgzVP.js} +11 -11
  90. package/dist/{vue-ui-mood-radar-ClAT34tN.cjs → vue-ui-mood-radar-DJ7zpX69.cjs} +1 -1
  91. package/dist/{vue-ui-mood-radar-CxZo51Yf.js → vue-ui-mood-radar-mZEDM0NK.js} +11 -11
  92. package/dist/{vue-ui-nested-donuts-CCMtDMAJ.js → vue-ui-nested-donuts-ADHpRSrO.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-446yKGGf.cjs → vue-ui-nested-donuts-B7zoKnsX.cjs} +1 -1
  94. package/dist/{vue-ui-onion-B5bQZ-Hs.cjs → vue-ui-onion-Bvs_owV9.cjs} +1 -1
  95. package/dist/{vue-ui-onion-CWkOm41E.js → vue-ui-onion-KlRwElox.js} +11 -11
  96. package/dist/{vue-ui-parallel-coordinate-plot-DoT1kkvM.js → vue-ui-parallel-coordinate-plot-DxfFMJcf.js} +12 -12
  97. package/dist/{vue-ui-parallel-coordinate-plot-6d9leVkB.cjs → vue-ui-parallel-coordinate-plot-j0C-98v6.cjs} +1 -1
  98. package/dist/{vue-ui-quadrant-BWU_071R.cjs → vue-ui-quadrant-FrEtaNmB.cjs} +1 -1
  99. package/dist/{vue-ui-quadrant-lr7VbROd.js → vue-ui-quadrant-mTEq7vUM.js} +12 -12
  100. package/dist/{vue-ui-quick-chart-DeS74Eet.js → vue-ui-quick-chart-wDAfCdZi.js} +9 -9
  101. package/dist/{vue-ui-quick-chart-B-7sQYRD.cjs → vue-ui-quick-chart-xomrTLjF.cjs} +1 -1
  102. package/dist/{vue-ui-radar-C23m4Cbd.cjs → vue-ui-radar-CwIDYXn3.cjs} +1 -1
  103. package/dist/{vue-ui-radar-BOodOTJH.js → vue-ui-radar-tW6hVA3D.js} +12 -12
  104. package/dist/{vue-ui-rating-bkiMMB8y.js → vue-ui-rating-BXxHwgli.js} +2 -2
  105. package/dist/{vue-ui-rating-vfLBqTRT.cjs → vue-ui-rating-D_TuyOn5.cjs} +1 -1
  106. package/dist/{vue-ui-relation-circle-DJNsnQno.cjs → vue-ui-relation-circle-CxJJtooQ.cjs} +1 -1
  107. package/dist/{vue-ui-relation-circle-CoQVW5Kf.js → vue-ui-relation-circle-D11cM4iJ.js} +7 -7
  108. package/dist/{vue-ui-ridgeline-qa_EI0KP.cjs → vue-ui-ridgeline-DRC1lIXN.cjs} +1 -1
  109. package/dist/{vue-ui-ridgeline-C42v9hsJ.js → vue-ui-ridgeline-gD8UVkMZ.js} +14 -14
  110. package/dist/{vue-ui-rings-B9qm19oS.js → vue-ui-rings-DSJRz7iR.js} +12 -12
  111. package/dist/{vue-ui-rings-BwHA_hCQ.cjs → vue-ui-rings-r4xAd8lk.cjs} +1 -1
  112. package/dist/{vue-ui-scatter-DNA0DLGu.js → vue-ui-scatter-BzC8zkfh.js} +12 -12
  113. package/dist/{vue-ui-scatter-DPQ0tlOs.cjs → vue-ui-scatter-W1OKGdmQ.cjs} +1 -1
  114. package/dist/{vue-ui-skeleton-B6i3f4Fi.cjs → vue-ui-skeleton-DRxcfKaL.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BdJM0WP2.js → vue-ui-skeleton-eU-_7BdW.js} +3 -3
  116. package/dist/{vue-ui-smiley-D9LlxHIO.cjs → vue-ui-smiley-Bm7OiLoq.cjs} +1 -1
  117. package/dist/{vue-ui-smiley-Ci3DS8ZM.js → vue-ui-smiley-CcekqVQx.js} +2 -2
  118. package/dist/{vue-ui-spark-trend-DDUWU-Q6.js → vue-ui-spark-trend-BN42Fnf2.js} +5 -5
  119. package/dist/{vue-ui-spark-trend-DqELwVjo.cjs → vue-ui-spark-trend-mobyLUha.cjs} +1 -1
  120. package/dist/{vue-ui-sparkbar-xNCwe5pE.cjs → vue-ui-sparkbar-D3iVdCuI.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-DCVALh-7.js → vue-ui-sparkbar-hgySC-4O.js} +4 -4
  122. package/dist/{vue-ui-sparkgauge-D-NODbdD.cjs → vue-ui-sparkgauge-C6liWKmp.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DOU9v3Wt.js → vue-ui-sparkgauge-Dm2vyIx8.js} +4 -4
  124. package/dist/{vue-ui-sparkhistogram-DjA-JYuA.cjs → vue-ui-sparkhistogram-BnzOIDWc.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-B5SmD4gC.js → vue-ui-sparkhistogram-D07Q0Gk7.js} +5 -5
  126. package/dist/{vue-ui-sparkline-DCoydw3B.js → vue-ui-sparkline-CACBeqAa.js} +4 -4
  127. package/dist/{vue-ui-sparkline-nhJ6OpcW.cjs → vue-ui-sparkline-CQVRc2MO.cjs} +1 -1
  128. package/dist/{vue-ui-sparkstackbar-Djo-G-r6.cjs → vue-ui-sparkstackbar-DFkUjUYc.cjs} +1 -1
  129. package/dist/{vue-ui-sparkstackbar-BSAs-9pN.js → vue-ui-sparkstackbar-UVd-HK1b.js} +5 -5
  130. package/dist/{vue-ui-stackbar-Bs2bYaiE.cjs → vue-ui-stackbar-0sIYiF_A.cjs} +1 -1
  131. package/dist/{vue-ui-stackbar-BlB1qSr6.js → vue-ui-stackbar-DxovHxOT.js} +13 -13
  132. package/dist/{vue-ui-strip-plot-DBvpynsA.cjs → vue-ui-strip-plot-Cvba07hW.cjs} +1 -1
  133. package/dist/{vue-ui-strip-plot-CNCX74Ft.js → vue-ui-strip-plot-HxXmARoE.js} +11 -11
  134. package/dist/{vue-ui-table-BratAogq.js → vue-ui-table-0pQLbxUq.js} +3 -3
  135. package/dist/{vue-ui-table-zwHHPBD1.cjs → vue-ui-table-BX80lD6q.cjs} +1 -1
  136. package/dist/{vue-ui-table-heatmap-BpXNFYTu.js → vue-ui-table-heatmap-DE2bkasJ.js} +4 -4
  137. package/dist/{vue-ui-table-heatmap-CqNsuBze.cjs → vue-ui-table-heatmap-DV26Cbjg.cjs} +1 -1
  138. package/dist/{vue-ui-table-sparkline-CdWcIJWP.cjs → vue-ui-table-sparkline-Ch4LVVdJ.cjs} +1 -1
  139. package/dist/{vue-ui-table-sparkline-ExLIJQsE.js → vue-ui-table-sparkline-DGECSD-C.js} +5 -5
  140. package/dist/{vue-ui-thermometer-Bj7w-qY3.cjs → vue-ui-thermometer-B29iIlzg.cjs} +1 -1
  141. package/dist/{vue-ui-thermometer-RknmCscq.js → vue-ui-thermometer-WFaVRptV.js} +7 -7
  142. package/dist/{vue-ui-timer-BMIoyDx2.cjs → vue-ui-timer-D1rjeIkc.cjs} +1 -1
  143. package/dist/{vue-ui-timer-DS4Upm-U.js → vue-ui-timer-ElOn6Dkf.js} +5 -5
  144. package/dist/{vue-ui-tiremarks-4PfH41b-.cjs → vue-ui-tiremarks-BczAiMV8.cjs} +1 -1
  145. package/dist/{vue-ui-tiremarks-xouEaExO.js → vue-ui-tiremarks-Cfv0NwR7.js} +7 -7
  146. package/dist/{vue-ui-treemap-DdmDX8LC.cjs → vue-ui-treemap-BFN5b5_L.cjs} +1 -1
  147. package/dist/{vue-ui-treemap-B-wToQoh.js → vue-ui-treemap-DxEbCrpf.js} +12 -12
  148. package/dist/{vue-ui-vertical-bar-D-71HVJq.cjs → vue-ui-vertical-bar-590VwiLn.cjs} +1 -1
  149. package/dist/{vue-ui-vertical-bar-Xt9v12o9.js → vue-ui-vertical-bar-ClDqkmhk.js} +12 -12
  150. package/dist/{vue-ui-waffle-Cvl9u0eW.cjs → vue-ui-waffle-BQblwMWf.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-CDMV8YuL.js → vue-ui-waffle-wYqijCXR.js} +12 -12
  152. package/dist/{vue-ui-wheel-B6cbb8pT.cjs → vue-ui-wheel-CZMPP-La.cjs} +1 -1
  153. package/dist/{vue-ui-wheel-Afm6VkM4.js → vue-ui-wheel-DVOyAzMM.js} +7 -7
  154. package/dist/{vue-ui-word-cloud-DC9TpUPR.js → vue-ui-word-cloud-8o2Ipe1I.js} +10 -10
  155. package/dist/{vue-ui-word-cloud-CJ7loBcF.cjs → vue-ui-word-cloud-DAKB2THN.cjs} +1 -1
  156. package/dist/{vue-ui-world-D9O3OQga.cjs → vue-ui-world-CvDlnus7.cjs} +1 -1
  157. package/dist/{vue-ui-world-v3B6N5e6.js → vue-ui-world-h-pQmlJM.js} +11 -11
  158. package/dist/{vue-ui-xy-00xwqVPv.js → vue-ui-xy-BkmYEX1m.js} +16 -16
  159. package/dist/{vue-ui-xy-Cztvx0XF.cjs → vue-ui-xy-DDNWiRTX.cjs} +2 -2
  160. package/dist/{vue-ui-xy-canvas-B9doeuHX.cjs → vue-ui-xy-canvas-BDpExYvk.cjs} +1 -1
  161. package/dist/{vue-ui-xy-canvas-CSyu9s5R.js → vue-ui-xy-canvas-CwuoyOXd.js} +12 -12
  162. package/package.json +1 -1
  163. package/dist/PackageVersion-C3yamdgT.cjs +0 -1
  164. package/dist/Tooltip-1n-Nu7V6.cjs +0 -1
  165. package/dist/Tooltip-BoZnHmkB.js +0 -120
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./index-sxQQG3Lq.cjs"),x=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-1n-Nu7V6.cjs"),dt=require("./Legend-DV5BtMlU.cjs"),ht=require("./Title-BKc86QJC.cjs"),ft=require("./Slicer-DhiPdUJc.cjs"),Ue=require("./usePrinter-vuPAeatm.cjs"),yt=require("./vue-ui-accordion-BGde8cPu.cjs"),pt=require("./DataTable-Dih5G6q8.cjs"),gt=require("./vue-ui-skeleton-B6i3f4Fi.cjs"),qe=require("./useNestedProp-C1yNgVwb.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./BaseIcon-By_LgUm3.cjs"),xt=require("./ColorPicker-Bg2jgtz8.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Ct=["disabled"],Lt=["data-mode","xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],zt=["x","y","fill","font-size"],$t=["x","dy"],Tt=["d","stroke","stroke-width"],Et={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(z,{emit:Ee}){const U=z,Be=Ee,L=t.ref([]),V=t.ref([]),K=t.ref("0 0 0 0"),D=t.ref(U.color),y=t.ref(1),m=t.ref("draw"),w=t.ref(null),q=t.ref(!1),h=t.ref(null),Y=t.ref({x:0,y:0}),X=t.ref([""]),E=t.ref({row:0,col:0}),P=t.ref(16);let W=1;function G(){return W++}function ne(i){var a;const r=R.value;if(!r)return{x:0,y:0};const o=r.createSVGPoint();let u=i.clientX,v=i.clientY;i.touches&&i.touches.length&&(u=i.touches[0].clientX,v=i.touches[0].clientY),o.x=u,o.y=v;const f=(a=r.getScreenCTM())==null?void 0:a.inverse();return f?o.matrixTransform(f):{x:0,y:0}}function re(i){if(!w.value||m.value!=="text"||q.value)return;const{x:r,y:o}=ne(i);Y.value={x:r,y:o},X.value=[""],E.value={row:0,col:0};const u=document.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("x",r),u.setAttribute("y",o),u.setAttribute("fill",D.value),u.setAttribute("font-size",P.value),u.setAttribute("font-family","sans-serif"),u.setAttribute("class","vue-data-ui-doodle"),u.setAttribute("dominant-baseline","hanging"),u.setAttribute("pointer-events","all");const v=document.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttribute("x",r),v.setAttribute("dy","0"),v.textContent="",u.appendChild(v),u.style.pointerEvents="none",u.style.userSelect="none",w.value.appendChild(u),h.value=u,q.value=!0,window.addEventListener("keydown",ue),window.addEventListener("mousedown",ie,!0),J(),se()}function ue(i){if(!q.value)return;let{row:r,col:o}=E.value,u=X.value.slice(),v=!1;if(i.key==="Enter"){const f=u[r],a=f.slice(0,o),T=f.slice(o);u.splice(r,1,a,T),r+=1,o=0,v=!0,i.preventDefault()}else if(i.key==="Backspace"){if(o>0)u[r]=u[r].slice(0,o-1)+u[r].slice(o),o-=1,v=!0;else if(r>0){const f=u[r-1].length;u[r-1]+=u[r],u.splice(r,1),r-=1,o=f,v=!0}i.preventDefault()}else if(i.key==="Delete")o<u[r].length?(u[r]=u[r].slice(0,o)+u[r].slice(o+1),v=!0):r<u.length-1&&(u[r]+=u[r+1],u.splice(r+1,1),v=!0),i.preventDefault();else if(i.key==="ArrowLeft")o>0?o-=1:r>0&&(r-=1,o=u[r].length),v=!0,i.preventDefault();else if(i.key==="ArrowRight")o<u[r].length?o+=1:r<u.length-1&&(r+=1,o=0),v=!0,i.preventDefault();else if(i.key==="ArrowUp")r>0&&(r-=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key==="ArrowDown")r<u.length-1&&(r+=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey)u[r]=u[r].slice(0,o)+i.key+u[r].slice(o),o+=1,v=!0,i.preventDefault();else if(i.key==="Escape"){ce(!0);return}else i.key==="Tab"&&i.preventDefault();v&&(X.value=u,E.value={row:r,col:o},J(),se())}function J(){const i=h.value,{x:r,y:o}=Y.value;for(;i.firstChild;)i.removeChild(i.firstChild);X.value.forEach((u,v)=>{const f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttribute("x",r),f.setAttribute("dy",v===0?"0":`${P.value*1.2}`),f.textContent=u.length?u:"​",i.appendChild(f)})}function se(){const i=w.value.querySelector(".vue-data-ui-svg-caret");i&&w.value.removeChild(i);const r=h.value;if(!r)return;const{x:o,y:u}=Y.value,{row:v,col:f}=E.value,a=P.value,T=r.childNodes[v];if(!T)return;let B=T.textContent.slice(0,f);B.endsWith(" ")&&(B+=" ");const p=document.createElementNS("http://www.w3.org/2000/svg","text");p.setAttribute("x",o),p.setAttribute("y",u),p.setAttribute("font-size",a),p.setAttribute("font-family","sans-serif"),p.textContent=B||"",w.value.appendChild(p);const M=p.getBBox();w.value.removeChild(p);let $=u+v*a*1.2,g=o+M.width;const c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",g),c.setAttribute("y",$),c.setAttribute("width",1),c.setAttribute("height",a),c.setAttribute("fill",D.value),c.setAttribute("class","vue-data-ui-svg-caret"),w.value.appendChild(c)}function ie(i){if(h.value&&!h.value.contains(i.target)){const r=h.value.children;r.length===1&&(r[0].textContent===""||r[0].textContent==="​")&&h.value.remove(),ce(!1)}}function ce(i=!1){var u;window.removeEventListener("keydown",ue),window.removeEventListener("mousedown",ie,!0);const r=(u=w.value)==null?void 0:u.querySelector(".vue-data-ui-svg-caret");r&&w.value.removeChild(r);const o=X.value.every(v=>!v||v==="​");i||o||L.value.push({id:G(),type:"text",x:Y.value.x,y:Y.value.y,color:D.value,fontSize:P.value,lines:X.value.map(v=>v)}),h.value&&w.value&&w.value.contains(h.value)&&w.value.removeChild(h.value),q.value=!1,h.value=null,X.value=[""],E.value={row:0,col:0}}const H=t.computed(()=>d.lightenHexColor(U.color,.6));function ee({width:i,height:r}){K.value=`0 0 ${i} ${r}`}const _=t.ref(null);t.onMounted(()=>{t.nextTick(()=>{if(U.parent){_.value=new ResizeObserver(o=>{for(const u of o){const{width:v,height:f}=u.contentRect;ee({width:v,height:f})}}),_.value.observe(U.parent);const{width:i,height:r}=U.parent.getBoundingClientRect();ee({width:i,height:r})}}),w.value=R.value.querySelector("g")}),t.onBeforeUnmount(()=>{_.value&&_.value.disconnect()}),t.watch(()=>U.parent,i=>{if(!i)return;const{width:r,height:o}=U.parent.getBoundingClientRect();ee({width:r,height:o})},{immediate:!0}),t.watch(m,i=>{var r,o;i==="text"?(r=R.value)==null||r.addEventListener("mousedown",re):(o=R.value)==null||o.removeEventListener("mousedown",re)});const Z=t.ref(!1),N=t.ref(""),R=t.ref(null);function me(i){if(m.value!=="draw"||!R.value)return;Z.value=!0;const{x:r,y:o}=F(i);N.value=`M ${r} ${o}`}function be(i){if(!Z.value||!R.value)return;const{x:r,y:o}=F(i);N.value+=` ${r} ${o}`}function l(i){const r=i.trim().split(/\s+/);if(r.length<4)return i;const o=r.slice(1).map(Number);if(o.length%2!==0)return i;const u=ve(o),v=[`M ${u[0]} ${u[1]}`];for(let T=2;T<u.length-2;T+=2){const B=u[T-2],p=u[T-1],M=u[T],$=u[T+1],g=(B+M)/2,c=(p+$)/2;v.push(`Q ${B} ${p} ${g} ${c}`)}const f=u[u.length-2],a=u[u.length-1];return v.push(`L ${f} ${a}`),v.join(" ")}function ve(i,r=1){const o=[...i];for(let u=2;u<i.length-2;u+=2){const v=i[u],f=i[u+1],a=i[u-2],T=i[u-1],B=i[u+2],p=i[u+3];o[u]=v+r*((a+B)/2-v),o[u+1]=f+r*((T+p)/2-f)}return o}function xe(i){const r=i.trim().split(/\s+/);let o="",u="",v=null,f=null;for(let a=0;a<r.length;a+=1){const T=r[a];if(isNaN(T)){if(u=T,u==="M"||u==="L")v=parseFloat(r[++a]),f=parseFloat(r[++a]),o+=`${u}${v} ${f}`;else if(u==="Q"){const B=parseFloat(r[++a]),p=parseFloat(r[++a]),M=parseFloat(r[++a]),$=parseFloat(r[++a]);B===v&&p===f?o+=`t${M-v} ${$-f}`:o+=`q${B-v} ${p-f} ${M-v} ${$-f}`,v=M,f=$}}else{const B=parseFloat(T),p=parseFloat(r[++a]);if(u==="L"){const M=B-v,$=p-f;M===0?o+=`v${$}`:$===0?o+=`h${M}`:o+=`l${M} ${$}`,v=B,f=p}else if(u==="Q"){const M=B,$=p,g=parseFloat(r[++a]),c=parseFloat(r[++a]);M===v&&$===f?o+=`t${g-v} ${c-f}`:o+=`q${M-v} ${$-f} ${g-v} ${c-f}`,v=g,f=c}}}return o}function ae(){Z.value&&(L.value.push({id:G(),strokeWidth:y.value,path:xe(l(N.value)),color:D.value}),V.value=[],N.value=""),Z.value=!1}function F(i){if(!R.value)return{x:0,y:0};const r=R.value.getBoundingClientRect();let o,u;return i.touches&&i.touches.length?(o=i.touches[0].clientX,u=i.touches[0].clientY):(o=i.clientX,u=i.clientY),{x:o-r.left,y:u-r.top}}function ke(){if(L.value.length>0){const i=L.value.pop();V.value.push(i)}}function Ce(){if(V.value.length>0){const i=V.value.pop();L.value.push(i)}}function Le(){L.value=[],V.value=[]}const de=t.ref(null);return(i,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[z.active?(t.openBlock(),t.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:t.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:z.active}),style:t.normalizeStyle({backgroundColor:z.backgroundColor})},[t.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:r[0]||(r[0]=o=>Be("close"))},[t.createVNode(ge.default,{name:"close",stroke:z.color},null,8,["stroke"])],4),t.createElementVNode("button",kt,[t.createVNode(xt.ColorPicker,{value:D.value,"onUpdate:value":r[1]||(r[1]=o=>D.value=o),backgroundColor:z.backgroundColor,buttonBorderColor:H.value},null,8,["value","backgroundColor","buttonBorderColor"])]),t.createElementVNode("button",{class:t.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-active":m.value==="text"}]),onClick:r[2]||(r[2]=o=>m.value=m.value==="text"?"draw":"text"),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`})},[t.createVNode(ge.default,{name:m.value==="draw"?"annotator":"text",stroke:z.color},null,8,["name","stroke"]),t.createElementVNode("div",{style:t.normalizeStyle({position:"absolute",bottom:"-20px",color:H.value,width:"100%",textAlign:"center",fontSize:"12px"})},t.toDisplayString(t.unref(d.dataLabel)({v:m.value==="draw"?y.value:P.value,s:"px",r:1})),5)],6),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length}),disabled:!L.value.length,style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`,marginTop:"20px"}),onClick:ke},[t.createVNode(ge.default,{name:"restart",stroke:z.color},null,8,["stroke"])],14,Ct),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!V.value.length}),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Ce},[t.createVNode(ge.default,{name:"restart",stroke:z.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),t.createElementVNode("button",{class:t.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length},"vue-ui-pen-and-paper-action"]),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Le},[t.createVNode(ge.default,{name:"trash",stroke:z.color},null,8,["stroke"])],6),m.value==="draw"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":r[3]||(r[3]=o=>y.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,y.value]]):t.createCommentVNode("",!0),m.value==="text"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:3,max:48,step:.1,"onUpdate:modelValue":r[4]||(r[4]=o=>P.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,P.value]]):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),(t.openBlock(),t.createElementBlock("svg",{"data-mode":m.value,ref_key:"svgElement",ref:R,xmlns:t.unref(d.XMLNS),viewBox:K.value,class:t.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!z.active}),onMousedown:me,onMousemove:be,onMouseup:ae,onMouseleave:ae,onTouchstart:t.withModifiers(me,["prevent"]),onTouchmove:t.withModifiers(be,["prevent"]),onTouchend:ae},[t.createElementVNode("g",{ref_key:"G",ref:w},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value,o=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o.id},[o.path&&o.path.replace("M","").split(" ").length===2?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:o.path.replace("M","").split(" ")[0],cy:o.path.replace("M","").split(" ")[1],r:o.strokeWidth/2,fill:o.color},null,8,wt)):o.path?(t.openBlock(),t.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:o.path,stroke:o.color,"stroke-width":o.strokeWidth,fill:"none"},null,8,St)):o.type==="text"?(t.openBlock(),t.createElementBlock("text",{key:2,x:o.x,y:o.y,fill:o.color,"font-size":o.fontSize,"font-family":"sans-serif","dominant-baseline":"hanging",class:"vue-ui-pen-and-paper-text"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.lines,(u,v)=>(t.openBlock(),t.createElementBlock("tspan",{key:v,x:o.x,dy:v===0?"0":o.fontSize*1.2},t.toDisplayString(u.length?u:"​"),9,$t))),128))],8,zt)):t.createCommentVNode("",!0)],64))),128))],512),Z.value?(t.openBlock(),t.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:l(N.value),stroke:D.value,"stroke-width":y.value*1.1,fill:"none"},null,8,Tt)):t.createCommentVNode("",!0)],42,Lt))],64))}},Bt=We._export_sfc(Et,[["__scopeId","data-v-14478ba4"]]),Mt=["id"],Nt=["onClick"],Pt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],At={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(z,{expose:Ee,emit:U}){const{vue_ui_xy_canvas:Be}=d.useConfig(),L=z,V=t.ref(d.createUid()),K=t.ref(null),D=t.ref(null),y=t.ref(null),m=t.ref(1),w=t.ref(1),q=t.ref(!1),h=t.ref(null),Y=t.ref(""),X=t.ref(null),E=t.ref([]),P=t.ref(1),W=t.ref(!0),G=t.ref(!0),ne=t.ref(null),re=t.ref(0),ue=t.ref(0),J=t.ref(!1),se=t.ref(null),ie=t.ref(null),ce=t.ref(null),H=t.ref(null),ee=t.ref(0),_=t.ref(0),Z=t.ref(0),N=t.ref(null),R=t.computed(()=>!!L.dataset&&L.dataset.length),me=U,be=t.useSlots();t.onMounted(()=>{be["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const l=t.computed({get:()=>ke(),set:e=>e}),{userOptionsVisible:ve,setUserOptionsVisibility:xe,keepUserOptionState:ae}=mt.useUserOptionState({config:l.value}),{svgRef:F}=bt.useChartAccessibility({config:l.value.style.chart.title});function ke(){const e=qe.useNestedProp({userConfig:L.config,defaultConfig:Be});let n={};return e.theme?n={...qe.useNestedProp({userConfig:d.themes.vue_ui_xy_canvas[e.theme]||L.config,defaultConfig:e}),customPalette:d.themePalettes[e.theme]||d.palette}:n=e,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.min")?n.style.chart.scale.min=L.config.style.chart.scale.min:n.style.chart.scale.min=null,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.max")?n.style.chart.scale.max=L.config.style.chart.scale.max:n.style.chart.scale.max=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.startIndex")?n.style.chart.zoom.startIndex=L.config.style.chart.zoom.startIndex:n.style.chart.zoom.startIndex=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.endIndex")?n.style.chart.zoom.endIndex=L.config.style.chart.zoom.endIndex:n.style.chart.zoom.endIndex=null,n}t.watch(()=>L.config,e=>{l.value=ke(),ve.value=!l.value.userOptions.showOnChartHover,Me(),ee.value+=1,_.value+=1,Z.value+=1,o.value.showTable=l.value.table.show,o.value.showDataLabels=l.value.style.chart.dataLabels.show,o.value.stacked=l.value.style.chart.stacked,o.value.showTooltip=l.value.style.chart.tooltip.show},{deep:!0}),t.watch(()=>L.dataset,()=>{Me(),ee.value+=1,_.value+=1,Z.value+=1},{deep:!0});const Ce=t.ref(l.value.style.chart.aspectRatio),{isPrinting:Le,isImaging:de,generatePdf:i,generateImage:r}=Ue.usePrinter({elementId:`xy_canvas_${V.value}`,fileName:l.value.style.chart.title.text||"vue-ui-xy-canvas",options:l.value.userOptions.print}),o=t.ref({showTable:l.value.table.show,showDataLabels:l.value.style.chart.dataLabels.show,stacked:l.value.style.chart.stacked,showTooltip:l.value.style.chart.tooltip.show});function u(e){J.value=e,ue.value+=1}const v=t.computed(()=>d.convertCustomPalette(l.value.customPalette)),f=t.computed(()=>$.value?Math.max(...$.value.filter((e,n)=>!E.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=t.computed(()=>{const e=m.value-m.value*(l.value.style.chart.paddingProportions.left+l.value.style.chart.paddingProportions.right);return{canvasWidth:m.value,canvasHeight:w.value,left:m.value*l.value.style.chart.paddingProportions.left,top:w.value*l.value.style.chart.paddingProportions.top,right:m.value-m.value*l.value.style.chart.paddingProportions.right,bottom:w.value-w.value*l.value.style.chart.paddingProportions.bottom,width:e,height:w.value-w.value*(l.value.style.chart.paddingProportions.top+l.value.style.chart.paddingProportions.bottom),slot:e/(c.value.end-c.value.start)}});function T(e,n){return e/n}function B({hasAutoScale:e,series:n,min:s,max:b,scale:C,yOffset:A,individualHeight:k,stackIndex:S=null}){return n.map((te,O)=>{const Q=C.min<0?Math.abs(C.min):0,le=T(te+Q,Q+C.max);let ye,pe;e&&(ye=C.min,pe=T(te-ye,C.max-ye));let j=0;return S===null?j=a.value.bottom-a.value.height*(e?pe:le):j=a.value.bottom-A-k*(e?pe:le),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:j,value:te}})}const p=t.computed(()=>{const e=l.value.style.chart.scale.min!==null?l.value.style.chart.scale.min:Math.min(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),n=l.value.style.chart.scale.max!==null?l.value.style.chart.scale.max:Math.max(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),s=d.calculateNiceScale(e<0?e:0,n===e?e+1<0?0:e+1:n<0?0:n,l.value.style.chart.scale.ticks),b=s.min<0?Math.abs(s.min):0,C=a.value.bottom-a.value.height*(b/(s.max+b)),A=s.ticks.map(k=>({y:a.value.bottom-a.value.height*((k+b)/(s.max+b)),x:a.value.left-8,value:k}));return{absoluteMin:b,max:n,min:e,scale:s,yLabels:A,zero:C}}),M=t.computed(()=>g.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./index-CHDUeW3x.cjs"),x=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-DpeUgH6i.cjs"),dt=require("./Legend-BYAydsbU.cjs"),ht=require("./Title-CQxTyQdP.cjs"),ft=require("./Slicer-iaOAIWyg.cjs"),Ue=require("./usePrinter-DyQISLol.cjs"),yt=require("./vue-ui-accordion-B6zl7smQ.cjs"),pt=require("./DataTable-BtWdtAUt.cjs"),gt=require("./vue-ui-skeleton-DRxcfKaL.cjs"),qe=require("./useNestedProp-BKE4eQv3.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./BaseIcon-CccbUmmx.cjs"),xt=require("./ColorPicker-DANVWfwS.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Ct=["disabled"],Lt=["data-mode","xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],zt=["x","y","fill","font-size"],$t=["x","dy"],Tt=["d","stroke","stroke-width"],Et={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(z,{emit:Ee}){const U=z,Be=Ee,L=t.ref([]),V=t.ref([]),K=t.ref("0 0 0 0"),D=t.ref(U.color),y=t.ref(1),m=t.ref("draw"),w=t.ref(null),q=t.ref(!1),h=t.ref(null),Y=t.ref({x:0,y:0}),X=t.ref([""]),E=t.ref({row:0,col:0}),P=t.ref(16);let W=1;function G(){return W++}function ne(i){var a;const r=R.value;if(!r)return{x:0,y:0};const o=r.createSVGPoint();let u=i.clientX,v=i.clientY;i.touches&&i.touches.length&&(u=i.touches[0].clientX,v=i.touches[0].clientY),o.x=u,o.y=v;const f=(a=r.getScreenCTM())==null?void 0:a.inverse();return f?o.matrixTransform(f):{x:0,y:0}}function re(i){if(!w.value||m.value!=="text"||q.value)return;const{x:r,y:o}=ne(i);Y.value={x:r,y:o},X.value=[""],E.value={row:0,col:0};const u=document.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("x",r),u.setAttribute("y",o),u.setAttribute("fill",D.value),u.setAttribute("font-size",P.value),u.setAttribute("font-family","sans-serif"),u.setAttribute("class","vue-data-ui-doodle"),u.setAttribute("dominant-baseline","hanging"),u.setAttribute("pointer-events","all");const v=document.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttribute("x",r),v.setAttribute("dy","0"),v.textContent="",u.appendChild(v),u.style.pointerEvents="none",u.style.userSelect="none",w.value.appendChild(u),h.value=u,q.value=!0,window.addEventListener("keydown",ue),window.addEventListener("mousedown",ie,!0),J(),se()}function ue(i){if(!q.value)return;let{row:r,col:o}=E.value,u=X.value.slice(),v=!1;if(i.key==="Enter"){const f=u[r],a=f.slice(0,o),T=f.slice(o);u.splice(r,1,a,T),r+=1,o=0,v=!0,i.preventDefault()}else if(i.key==="Backspace"){if(o>0)u[r]=u[r].slice(0,o-1)+u[r].slice(o),o-=1,v=!0;else if(r>0){const f=u[r-1].length;u[r-1]+=u[r],u.splice(r,1),r-=1,o=f,v=!0}i.preventDefault()}else if(i.key==="Delete")o<u[r].length?(u[r]=u[r].slice(0,o)+u[r].slice(o+1),v=!0):r<u.length-1&&(u[r]+=u[r+1],u.splice(r+1,1),v=!0),i.preventDefault();else if(i.key==="ArrowLeft")o>0?o-=1:r>0&&(r-=1,o=u[r].length),v=!0,i.preventDefault();else if(i.key==="ArrowRight")o<u[r].length?o+=1:r<u.length-1&&(r+=1,o=0),v=!0,i.preventDefault();else if(i.key==="ArrowUp")r>0&&(r-=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key==="ArrowDown")r<u.length-1&&(r+=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey)u[r]=u[r].slice(0,o)+i.key+u[r].slice(o),o+=1,v=!0,i.preventDefault();else if(i.key==="Escape"){ce(!0);return}else i.key==="Tab"&&i.preventDefault();v&&(X.value=u,E.value={row:r,col:o},J(),se())}function J(){const i=h.value,{x:r,y:o}=Y.value;for(;i.firstChild;)i.removeChild(i.firstChild);X.value.forEach((u,v)=>{const f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttribute("x",r),f.setAttribute("dy",v===0?"0":`${P.value*1.2}`),f.textContent=u.length?u:"​",i.appendChild(f)})}function se(){const i=w.value.querySelector(".vue-data-ui-svg-caret");i&&w.value.removeChild(i);const r=h.value;if(!r)return;const{x:o,y:u}=Y.value,{row:v,col:f}=E.value,a=P.value,T=r.childNodes[v];if(!T)return;let B=T.textContent.slice(0,f);B.endsWith(" ")&&(B+=" ");const p=document.createElementNS("http://www.w3.org/2000/svg","text");p.setAttribute("x",o),p.setAttribute("y",u),p.setAttribute("font-size",a),p.setAttribute("font-family","sans-serif"),p.textContent=B||"",w.value.appendChild(p);const M=p.getBBox();w.value.removeChild(p);let $=u+v*a*1.2,g=o+M.width;const c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",g),c.setAttribute("y",$),c.setAttribute("width",1),c.setAttribute("height",a),c.setAttribute("fill",D.value),c.setAttribute("class","vue-data-ui-svg-caret"),w.value.appendChild(c)}function ie(i){if(h.value&&!h.value.contains(i.target)){const r=h.value.children;r.length===1&&(r[0].textContent===""||r[0].textContent==="​")&&h.value.remove(),ce(!1)}}function ce(i=!1){var u;window.removeEventListener("keydown",ue),window.removeEventListener("mousedown",ie,!0);const r=(u=w.value)==null?void 0:u.querySelector(".vue-data-ui-svg-caret");r&&w.value.removeChild(r);const o=X.value.every(v=>!v||v==="​");i||o||L.value.push({id:G(),type:"text",x:Y.value.x,y:Y.value.y,color:D.value,fontSize:P.value,lines:X.value.map(v=>v)}),h.value&&w.value&&w.value.contains(h.value)&&w.value.removeChild(h.value),q.value=!1,h.value=null,X.value=[""],E.value={row:0,col:0}}const H=t.computed(()=>d.lightenHexColor(U.color,.6));function ee({width:i,height:r}){K.value=`0 0 ${i} ${r}`}const _=t.ref(null);t.onMounted(()=>{t.nextTick(()=>{if(U.parent){_.value=new ResizeObserver(o=>{for(const u of o){const{width:v,height:f}=u.contentRect;ee({width:v,height:f})}}),_.value.observe(U.parent);const{width:i,height:r}=U.parent.getBoundingClientRect();ee({width:i,height:r})}}),w.value=R.value.querySelector("g")}),t.onBeforeUnmount(()=>{_.value&&_.value.disconnect()}),t.watch(()=>U.parent,i=>{if(!i)return;const{width:r,height:o}=U.parent.getBoundingClientRect();ee({width:r,height:o})},{immediate:!0}),t.watch(m,i=>{var r,o;i==="text"?(r=R.value)==null||r.addEventListener("mousedown",re):(o=R.value)==null||o.removeEventListener("mousedown",re)});const Z=t.ref(!1),N=t.ref(""),R=t.ref(null);function me(i){if(m.value!=="draw"||!R.value)return;Z.value=!0;const{x:r,y:o}=F(i);N.value=`M ${r} ${o}`}function be(i){if(!Z.value||!R.value)return;const{x:r,y:o}=F(i);N.value+=` ${r} ${o}`}function l(i){const r=i.trim().split(/\s+/);if(r.length<4)return i;const o=r.slice(1).map(Number);if(o.length%2!==0)return i;const u=ve(o),v=[`M ${u[0]} ${u[1]}`];for(let T=2;T<u.length-2;T+=2){const B=u[T-2],p=u[T-1],M=u[T],$=u[T+1],g=(B+M)/2,c=(p+$)/2;v.push(`Q ${B} ${p} ${g} ${c}`)}const f=u[u.length-2],a=u[u.length-1];return v.push(`L ${f} ${a}`),v.join(" ")}function ve(i,r=1){const o=[...i];for(let u=2;u<i.length-2;u+=2){const v=i[u],f=i[u+1],a=i[u-2],T=i[u-1],B=i[u+2],p=i[u+3];o[u]=v+r*((a+B)/2-v),o[u+1]=f+r*((T+p)/2-f)}return o}function xe(i){const r=i.trim().split(/\s+/);let o="",u="",v=null,f=null;for(let a=0;a<r.length;a+=1){const T=r[a];if(isNaN(T)){if(u=T,u==="M"||u==="L")v=parseFloat(r[++a]),f=parseFloat(r[++a]),o+=`${u}${v} ${f}`;else if(u==="Q"){const B=parseFloat(r[++a]),p=parseFloat(r[++a]),M=parseFloat(r[++a]),$=parseFloat(r[++a]);B===v&&p===f?o+=`t${M-v} ${$-f}`:o+=`q${B-v} ${p-f} ${M-v} ${$-f}`,v=M,f=$}}else{const B=parseFloat(T),p=parseFloat(r[++a]);if(u==="L"){const M=B-v,$=p-f;M===0?o+=`v${$}`:$===0?o+=`h${M}`:o+=`l${M} ${$}`,v=B,f=p}else if(u==="Q"){const M=B,$=p,g=parseFloat(r[++a]),c=parseFloat(r[++a]);M===v&&$===f?o+=`t${g-v} ${c-f}`:o+=`q${M-v} ${$-f} ${g-v} ${c-f}`,v=g,f=c}}}return o}function ae(){Z.value&&(L.value.push({id:G(),strokeWidth:y.value,path:xe(l(N.value)),color:D.value}),V.value=[],N.value=""),Z.value=!1}function F(i){if(!R.value)return{x:0,y:0};const r=R.value.getBoundingClientRect();let o,u;return i.touches&&i.touches.length?(o=i.touches[0].clientX,u=i.touches[0].clientY):(o=i.clientX,u=i.clientY),{x:o-r.left,y:u-r.top}}function ke(){if(L.value.length>0){const i=L.value.pop();V.value.push(i)}}function Ce(){if(V.value.length>0){const i=V.value.pop();L.value.push(i)}}function Le(){L.value=[],V.value=[]}const de=t.ref(null);return(i,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[z.active?(t.openBlock(),t.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:t.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:z.active}),style:t.normalizeStyle({backgroundColor:z.backgroundColor})},[t.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:r[0]||(r[0]=o=>Be("close"))},[t.createVNode(ge.default,{name:"close",stroke:z.color},null,8,["stroke"])],4),t.createElementVNode("button",kt,[t.createVNode(xt.ColorPicker,{value:D.value,"onUpdate:value":r[1]||(r[1]=o=>D.value=o),backgroundColor:z.backgroundColor,buttonBorderColor:H.value},null,8,["value","backgroundColor","buttonBorderColor"])]),t.createElementVNode("button",{class:t.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-active":m.value==="text"}]),onClick:r[2]||(r[2]=o=>m.value=m.value==="text"?"draw":"text"),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`})},[t.createVNode(ge.default,{name:m.value==="draw"?"annotator":"text",stroke:z.color},null,8,["name","stroke"]),t.createElementVNode("div",{style:t.normalizeStyle({position:"absolute",bottom:"-20px",color:H.value,width:"100%",textAlign:"center",fontSize:"12px"})},t.toDisplayString(t.unref(d.dataLabel)({v:m.value==="draw"?y.value:P.value,s:"px",r:1})),5)],6),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length}),disabled:!L.value.length,style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`,marginTop:"20px"}),onClick:ke},[t.createVNode(ge.default,{name:"restart",stroke:z.color},null,8,["stroke"])],14,Ct),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!V.value.length}),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Ce},[t.createVNode(ge.default,{name:"restart",stroke:z.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),t.createElementVNode("button",{class:t.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length},"vue-ui-pen-and-paper-action"]),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Le},[t.createVNode(ge.default,{name:"trash",stroke:z.color},null,8,["stroke"])],6),m.value==="draw"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":r[3]||(r[3]=o=>y.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,y.value]]):t.createCommentVNode("",!0),m.value==="text"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:3,max:48,step:.1,"onUpdate:modelValue":r[4]||(r[4]=o=>P.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,P.value]]):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),(t.openBlock(),t.createElementBlock("svg",{"data-mode":m.value,ref_key:"svgElement",ref:R,xmlns:t.unref(d.XMLNS),viewBox:K.value,class:t.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!z.active}),onMousedown:me,onMousemove:be,onMouseup:ae,onMouseleave:ae,onTouchstart:t.withModifiers(me,["prevent"]),onTouchmove:t.withModifiers(be,["prevent"]),onTouchend:ae},[t.createElementVNode("g",{ref_key:"G",ref:w},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value,o=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o.id},[o.path&&o.path.replace("M","").split(" ").length===2?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:o.path.replace("M","").split(" ")[0],cy:o.path.replace("M","").split(" ")[1],r:o.strokeWidth/2,fill:o.color},null,8,wt)):o.path?(t.openBlock(),t.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:o.path,stroke:o.color,"stroke-width":o.strokeWidth,fill:"none"},null,8,St)):o.type==="text"?(t.openBlock(),t.createElementBlock("text",{key:2,x:o.x,y:o.y,fill:o.color,"font-size":o.fontSize,"font-family":"sans-serif","dominant-baseline":"hanging",class:"vue-ui-pen-and-paper-text"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.lines,(u,v)=>(t.openBlock(),t.createElementBlock("tspan",{key:v,x:o.x,dy:v===0?"0":o.fontSize*1.2},t.toDisplayString(u.length?u:"​"),9,$t))),128))],8,zt)):t.createCommentVNode("",!0)],64))),128))],512),Z.value?(t.openBlock(),t.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:l(N.value),stroke:D.value,"stroke-width":y.value*1.1,fill:"none"},null,8,Tt)):t.createCommentVNode("",!0)],42,Lt))],64))}},Bt=We._export_sfc(Et,[["__scopeId","data-v-14478ba4"]]),Mt=["id"],Nt=["onClick"],Pt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],At={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(z,{expose:Ee,emit:U}){const{vue_ui_xy_canvas:Be}=d.useConfig(),L=z,V=t.ref(d.createUid()),K=t.ref(null),D=t.ref(null),y=t.ref(null),m=t.ref(1),w=t.ref(1),q=t.ref(!1),h=t.ref(null),Y=t.ref(""),X=t.ref(null),E=t.ref([]),P=t.ref(1),W=t.ref(!0),G=t.ref(!0),ne=t.ref(null),re=t.ref(0),ue=t.ref(0),J=t.ref(!1),se=t.ref(null),ie=t.ref(null),ce=t.ref(null),H=t.ref(null),ee=t.ref(0),_=t.ref(0),Z=t.ref(0),N=t.ref(null),R=t.computed(()=>!!L.dataset&&L.dataset.length),me=U,be=t.useSlots();t.onMounted(()=>{be["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const l=t.computed({get:()=>ke(),set:e=>e}),{userOptionsVisible:ve,setUserOptionsVisibility:xe,keepUserOptionState:ae}=mt.useUserOptionState({config:l.value}),{svgRef:F}=bt.useChartAccessibility({config:l.value.style.chart.title});function ke(){const e=qe.useNestedProp({userConfig:L.config,defaultConfig:Be});let n={};return e.theme?n={...qe.useNestedProp({userConfig:d.themes.vue_ui_xy_canvas[e.theme]||L.config,defaultConfig:e}),customPalette:d.themePalettes[e.theme]||d.palette}:n=e,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.min")?n.style.chart.scale.min=L.config.style.chart.scale.min:n.style.chart.scale.min=null,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.max")?n.style.chart.scale.max=L.config.style.chart.scale.max:n.style.chart.scale.max=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.startIndex")?n.style.chart.zoom.startIndex=L.config.style.chart.zoom.startIndex:n.style.chart.zoom.startIndex=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.endIndex")?n.style.chart.zoom.endIndex=L.config.style.chart.zoom.endIndex:n.style.chart.zoom.endIndex=null,n}t.watch(()=>L.config,e=>{l.value=ke(),ve.value=!l.value.userOptions.showOnChartHover,Me(),ee.value+=1,_.value+=1,Z.value+=1,o.value.showTable=l.value.table.show,o.value.showDataLabels=l.value.style.chart.dataLabels.show,o.value.stacked=l.value.style.chart.stacked,o.value.showTooltip=l.value.style.chart.tooltip.show},{deep:!0}),t.watch(()=>L.dataset,()=>{Me(),ee.value+=1,_.value+=1,Z.value+=1},{deep:!0});const Ce=t.ref(l.value.style.chart.aspectRatio),{isPrinting:Le,isImaging:de,generatePdf:i,generateImage:r}=Ue.usePrinter({elementId:`xy_canvas_${V.value}`,fileName:l.value.style.chart.title.text||"vue-ui-xy-canvas",options:l.value.userOptions.print}),o=t.ref({showTable:l.value.table.show,showDataLabels:l.value.style.chart.dataLabels.show,stacked:l.value.style.chart.stacked,showTooltip:l.value.style.chart.tooltip.show});function u(e){J.value=e,ue.value+=1}const v=t.computed(()=>d.convertCustomPalette(l.value.customPalette)),f=t.computed(()=>$.value?Math.max(...$.value.filter((e,n)=>!E.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=t.computed(()=>{const e=m.value-m.value*(l.value.style.chart.paddingProportions.left+l.value.style.chart.paddingProportions.right);return{canvasWidth:m.value,canvasHeight:w.value,left:m.value*l.value.style.chart.paddingProportions.left,top:w.value*l.value.style.chart.paddingProportions.top,right:m.value-m.value*l.value.style.chart.paddingProportions.right,bottom:w.value-w.value*l.value.style.chart.paddingProportions.bottom,width:e,height:w.value-w.value*(l.value.style.chart.paddingProportions.top+l.value.style.chart.paddingProportions.bottom),slot:e/(c.value.end-c.value.start)}});function T(e,n){return e/n}function B({hasAutoScale:e,series:n,min:s,max:b,scale:C,yOffset:A,individualHeight:k,stackIndex:S=null}){return n.map((te,O)=>{const Q=C.min<0?Math.abs(C.min):0,le=T(te+Q,Q+C.max);let ye,pe;e&&(ye=C.min,pe=T(te-ye,C.max-ye));let j=0;return S===null?j=a.value.bottom-a.value.height*(e?pe:le):j=a.value.bottom-A-k*(e?pe:le),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:j,value:te}})}const p=t.computed(()=>{const e=l.value.style.chart.scale.min!==null?l.value.style.chart.scale.min:Math.min(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),n=l.value.style.chart.scale.max!==null?l.value.style.chart.scale.max:Math.max(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),s=d.calculateNiceScale(e<0?e:0,n===e?e+1<0?0:e+1:n<0?0:n,l.value.style.chart.scale.ticks),b=s.min<0?Math.abs(s.min):0,C=a.value.bottom-a.value.height*(b/(s.max+b)),A=s.ticks.map(k=>({y:a.value.bottom-a.value.height*((k+b)/(s.max+b)),x:a.value.left-8,value:k}));return{absoluteMin:b,max:n,min:e,scale:s,yLabels:A,zero:C}}),M=t.computed(()=>g.value.map(e=>`
2
2
  <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
3
  <svg viewBox="0 0 10 10" height="12" width="12">
4
4
  <circle cx="5" cy="5" r="5" fill="${e.color}"/>
@@ -1,19 +1,19 @@
1
1
  import { ref as c, computed as R, onMounted as ot, nextTick as Oe, onBeforeUnmount as $t, watch as _, createElementBlock as M, openBlock as w, Fragment as je, createCommentVNode as Z, normalizeStyle as N, normalizeClass as ve, createElementVNode as W, withDirectives as gt, createVNode as me, toDisplayString as Qe, unref as D, vModelText as pt, withModifiers as mt, renderList as bt, useSlots as Gt, createBlock as ie, createSlots as Zt, withCtx as A, renderSlot as P, normalizeProps as ye, guardReactiveProps as ge, createTextVNode as qt } from "vue";
2
- import { l as St, f as be, X as jt, u as Kt, c as Qt, t as _t, p as pe, a as Jt, C as Ke, b as el, D as lt, i as Le, d as xt, $ as tl, H as ll, ah as al, o as ol, e as nl, x as kt, q as rl, r as ul, y as sl, s as Re } from "./index-DkQhVckX.js";
2
+ import { l as St, f as be, X as jt, u as Kt, c as Qt, t as _t, p as pe, a as Jt, C as Ke, b as el, D as lt, i as Le, d as xt, $ as tl, H as ll, ah as al, o as ol, e as nl, x as kt, q as rl, r as ul, y as sl, s as Re } from "./index-CvceFsAt.js";
3
3
  import { d as il, t as vl, u as cl, c as dl, a as Lt, l as F, r as at, b as ne, p as wt } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { _ as hl } from "./Tooltip-BoZnHmkB.js";
5
- import { L as fl } from "./Legend-B-F0dUuO.js";
6
- import { _ as yl } from "./Title-zIvA-EJz.js";
7
- import { S as gl } from "./Slicer-jNw3X5MI.js";
8
- import { u as pl, U as ml } from "./usePrinter-BFNx5frV.js";
9
- import bl from "./vue-ui-accordion-BhmqK_dm.js";
10
- import { D as xl } from "./DataTable-DygM2RPO.js";
11
- import kl from "./vue-ui-skeleton-BdJM0WP2.js";
12
- import { u as Ct } from "./useNestedProp-CMz_vifI.js";
4
+ import { _ as hl } from "./Tooltip-j8icrqWr.js";
5
+ import { L as fl } from "./Legend-Bh3njoaI.js";
6
+ import { _ as yl } from "./Title-CASnfBZ_.js";
7
+ import { S as gl } from "./Slicer-DCRA_8yB.js";
8
+ import { u as pl, U as ml } from "./usePrinter-ximty4az.js";
9
+ import bl from "./vue-ui-accordion-C-Crf9Kp.js";
10
+ import { D as xl } from "./DataTable--GI-DrhZ.js";
11
+ import kl from "./vue-ui-skeleton-eU-_7BdW.js";
12
+ import { u as Ct } from "./useNestedProp-CCO2zzSz.js";
13
13
  import { u as Ll } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { u as wl } from "./useChartAccessibility-BWojgys7.js";
15
- import De from "./BaseIcon-pJTMhtwZ.js";
16
- import { C as Cl } from "./ColorPicker-CzH_L7oz.js";
15
+ import De from "./BaseIcon-CugzlRIB.js";
16
+ import { C as Cl } from "./ColorPicker-Bqv3ZR7N.js";
17
17
  import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  const $l = {
19
19
  class: /* @__PURE__ */ ve({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "2.9.7-beta.7",
4
+ "version": "2.10.1",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),t="2.9.7-beta.6",n={"aria-hidden":"true"},s={__name:"PackageVersion",setup(c){return(r,o)=>(e.openBlock(),e.createElementBlock("desc",n,"Composed with Vue Data UI "+e.toDisplayString(e.unref(t)),1))}};exports._sfc_main=s;
@@ -1 +0,0 @@
1
- "use strict";const t=require("vue"),p=require("./index-sxQQG3Lq.cjs");function y({tooltip:e,chart:l,clientPosition:o,positionPreference:u="center",defaultOffsetY:a=24,blockShiftY:f=!1}){const n=t.ref(0),s=t.ref(a);if(e&&l){const{width:r,height:c}=e.getBoundingClientRect(),{right:i,left:d,bottom:v}=l.getBoundingClientRect();u==="center"&&(o.x+r/2>i?n.value=-r+(i-o.x):o.x-r/2<d?n.value=-r+(r-(o.x-d)):n.value=-r/2),u==="right"&&(o.x+r>i?n.value=-r+(i-o.x):n.value=0),u==="left"&&(o.x<d+r?n.value=-r+(r-(o.x-d)):n.value=-r),o.y+c>v&&!f&&(s.value=-c-a)}return{top:o.y+s.value,left:o.x+n.value}}function b(e,l,o){t.onMounted(()=>e.addEventListener(l,o)),t.onUnmounted(()=>e.removeEventListener(l,o))}function m(){const e=t.ref(0),l=t.ref(0);return b(window,"mousemove",o=>{e.value=o.clientX,l.value=o.clientY}),{x:e,y:l}}const h=["aria-hidden"],g=["innerHTML"],x={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100},position:{type:String,default:"center"},offsetY:{type:Number,default:24},blockShiftY:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},setup(e){const l=e,o=t.ref(null),u=t.ref(m(l.parent)),a=t.computed(()=>y({tooltip:o.value,chart:l.parent,clientPosition:u.value,positionPreference:l.position,defaultOffsetY:l.offsetY,blockShiftY:l.blockShiftY})),f=t.computed(()=>p.setOpacity(l.backgroundColor,l.backgroundOpacity));return(n,s)=>(t.openBlock(),t.createBlock(t.Teleport,{to:e.isFullscreen?e.parent:"body"},[e.show?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"tooltip",ref:o,role:"tooltip","aria-hidden":!e.show,"aria-live":"polite",class:t.normalizeClass({"vue-data-ui-custom-tooltip":e.isCustom,"vue-data-ui-tooltip":!e.isCustom}),style:t.normalizeStyle(`pointer-events:none;top:${a.value.top}px;left:${a.value.left}px;${e.isCustom?"":`background:${f.value};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};z-index:2147483647;`)},[t.renderSlot(n.$slots,"tooltip-before"),t.renderSlot(n.$slots,"default"),t.createElementVNode("div",{innerHTML:e.content},null,8,g),t.renderSlot(n.$slots,"tooltip-after")],14,h)):t.createCommentVNode("",!0)],8,["to"]))}};exports._sfc_main=x;exports.useMouse=m;
@@ -1,120 +0,0 @@
1
- import { ref as a, onMounted as b, onUnmounted as h, computed as p, createBlock as g, openBlock as v, Teleport as x, createElementBlock as S, createCommentVNode as k, normalizeStyle as $, normalizeClass as C, renderSlot as c, createElementVNode as B } from "vue";
2
- import { s as F } from "./index-DkQhVckX.js";
3
- function w({ tooltip: e, chart: o, clientPosition: t, positionPreference: r = "center", defaultOffsetY: u = 24, blockShiftY: s = !1 }) {
4
- const l = a(0), f = a(u);
5
- if (e && o) {
6
- const { width: n, height: m } = e.getBoundingClientRect(), { right: i, left: d, bottom: y } = o.getBoundingClientRect();
7
- r === "center" && (t.x + n / 2 > i ? l.value = -n + (i - t.x) : t.x - n / 2 < d ? l.value = -n + (n - (t.x - d)) : l.value = -n / 2), r === "right" && (t.x + n > i ? l.value = -n + (i - t.x) : l.value = 0), r === "left" && (t.x < d + n ? l.value = -n + (n - (t.x - d)) : l.value = -n), t.y + m > y && !s && (f.value = -m - u);
8
- }
9
- return {
10
- top: t.y + f.value,
11
- left: t.x + l.value
12
- };
13
- }
14
- function N(e, o, t) {
15
- b(() => e.addEventListener(o, t)), h(() => e.removeEventListener(o, t));
16
- }
17
- function Y() {
18
- const e = a(0), o = a(0);
19
- return N(window, "mousemove", (t) => {
20
- e.value = t.clientX, o.value = t.clientY;
21
- }), { x: e, y: o };
22
- }
23
- const z = ["aria-hidden"], E = ["innerHTML"], M = {
24
- __name: "Tooltip",
25
- props: {
26
- backgroundColor: {
27
- type: String,
28
- default: "#FFFFFF"
29
- },
30
- color: {
31
- type: String,
32
- default: "#000000"
33
- },
34
- content: String,
35
- maxWidth: {
36
- type: String,
37
- default: "300px"
38
- },
39
- parent: {
40
- type: Object
41
- },
42
- show: {
43
- type: Boolean,
44
- default: !1
45
- },
46
- isCustom: {
47
- type: Boolean,
48
- default: !1
49
- },
50
- fontSize: {
51
- type: [Number, String],
52
- default: 14
53
- },
54
- borderRadius: {
55
- type: Number,
56
- default: 4
57
- },
58
- borderColor: {
59
- type: String,
60
- default: "#e1e5e8"
61
- },
62
- borderWidth: {
63
- type: Number,
64
- default: 1
65
- },
66
- backgroundOpacity: {
67
- type: Number,
68
- default: 100
69
- },
70
- position: {
71
- type: String,
72
- default: "center"
73
- },
74
- offsetY: {
75
- type: Number,
76
- default: 24
77
- },
78
- blockShiftY: {
79
- type: Boolean,
80
- default: !1
81
- },
82
- isFullscreen: {
83
- type: Boolean,
84
- default: !1
85
- }
86
- },
87
- setup(e) {
88
- const o = e, t = a(null), r = a(Y(o.parent)), u = p(() => w({
89
- tooltip: t.value,
90
- chart: o.parent,
91
- clientPosition: r.value,
92
- positionPreference: o.position,
93
- defaultOffsetY: o.offsetY,
94
- blockShiftY: o.blockShiftY
95
- })), s = p(() => F(o.backgroundColor, o.backgroundOpacity));
96
- return (l, f) => (v(), g(x, {
97
- to: e.isFullscreen ? e.parent : "body"
98
- }, [
99
- e.show ? (v(), S("div", {
100
- key: 0,
101
- ref_key: "tooltip",
102
- ref: t,
103
- role: "tooltip",
104
- "aria-hidden": !e.show,
105
- "aria-live": "polite",
106
- class: C({ "vue-data-ui-custom-tooltip": e.isCustom, "vue-data-ui-tooltip": !e.isCustom }),
107
- style: $(`pointer-events:none;top:${u.value.top}px;left:${u.value.left}px;${e.isCustom ? "" : `background:${s.value};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};z-index:2147483647;`)
108
- }, [
109
- c(l.$slots, "tooltip-before"),
110
- c(l.$slots, "default"),
111
- B("div", { innerHTML: e.content }, null, 8, E),
112
- c(l.$slots, "tooltip-after")
113
- ], 14, z)) : k("", !0)
114
- ], 8, ["to"]));
115
- }
116
- };
117
- export {
118
- M as _,
119
- Y as u
120
- };