vue-data-ui 2.3.49 → 2.3.50

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 (145) hide show
  1. package/dist/{Arrow-Bo8pfwKs.js → Arrow-Cbc6NAqW.js} +1 -1
  2. package/dist/{Arrow-iqIdxIKZ.cjs → Arrow-D6LS6NR1.cjs} +1 -1
  3. package/dist/{BaseIcon-BoVYVkUT.js → BaseIcon-B_HSdFNd.js} +1 -1
  4. package/dist/{BaseIcon-DuVD-1qH.cjs → BaseIcon-I9PxMOax.cjs} +1 -1
  5. package/dist/{DataTable-CMF1l-gL.cjs → DataTable-BxrlKXEw.cjs} +1 -1
  6. package/dist/{DataTable-Dy0vFXS7.js → DataTable-DLcvpgCk.js} +2 -2
  7. package/dist/{Legend-C3LgyVKP.cjs → Legend-CgYcO7bY.cjs} +1 -1
  8. package/dist/{Legend-BbSR193q.js → Legend-CwNBujzg.js} +1 -1
  9. package/dist/{Shape-B5VTXCQH.js → Shape-CJFH8dr8.js} +1 -1
  10. package/dist/{Shape-BNlNwrBB.cjs → Shape-mlNz6Vjk.cjs} +1 -1
  11. package/dist/Slicer-BDwoVjE2.js +288 -0
  12. package/dist/Slicer-DnVQnpZC.cjs +1 -0
  13. package/dist/{Title-CSRD5z1r.cjs → Title-BW1v4dLt.cjs} +1 -1
  14. package/dist/{Title-0px6u9U5.js → Title-DNx5ZGZC.js} +1 -1
  15. package/dist/{Tooltip-TTopnCsK.js → Tooltip-C6nRg_p1.js} +1 -1
  16. package/dist/{Tooltip-DFpYO4rz.cjs → Tooltip-v4URJ3ID.cjs} +1 -1
  17. package/dist/index-BmJ7PKIU.cjs +4 -0
  18. package/dist/{index-8Lp8V0TB.js → index-kgQzkWhV.js} +2 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +1 -0
  21. package/dist/types/vue-data-ui.d.ts +1 -0
  22. package/dist/{useNestedProp-DE-a5lMx.js → useNestedProp-CEBAQM_w.js} +1 -1
  23. package/dist/{useNestedProp-Vjg1xsU_.cjs → useNestedProp-Csm4QEI9.cjs} +1 -1
  24. package/dist/{usePrinter-SLYneJmG.cjs → usePrinter-B04TFy_2.cjs} +1 -1
  25. package/dist/{usePrinter-cCBJ71Cc.js → usePrinter-DmOzyC2c.js} +1 -1
  26. package/dist/{vue-data-ui-pmpX1nQY.js → vue-data-ui-BBqB608Q.js} +57 -57
  27. package/dist/{vue-data-ui-B1ngLIqD.cjs → vue-data-ui-Bre6ULLJ.cjs} +1 -1
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-DcoFVkRG.js → vue-ui-3d-bar-CPoUfTww.js} +7 -7
  31. package/dist/{vue-ui-3d-bar-8yOSr9F5.cjs → vue-ui-3d-bar-T5lswnJv.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-CiSEQOBc.cjs → vue-ui-accordion-CIiNsTrJ.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-BQfLl7n5.js → vue-ui-accordion-j1e7L1IS.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-Cyzoxsd_.js → vue-ui-age-pyramid-D-h3pvsZ.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-BRr6sDTU.cjs → vue-ui-age-pyramid-xmip0W4N.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-60JYTNTN.cjs → vue-ui-annotator-DaHz_6JN.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-DkkEj4IE.js → vue-ui-annotator-ygqoA-aS.js} +1 -1
  38. package/dist/{vue-ui-candlestick-D7IRuRY-.cjs → vue-ui-candlestick-CKVofvan.cjs} +1 -1
  39. package/dist/{vue-ui-candlestick-CDLGf1AM.js → vue-ui-candlestick-DYSSmSM2.js} +9 -9
  40. package/dist/{vue-ui-carousel-table-dITvFJuB.cjs → vue-ui-carousel-table-Cb7luV1r.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-CGqR-L66.js → vue-ui-carousel-table-Ci_g2JSO.js} +4 -4
  42. package/dist/{vue-ui-chestnut-BGLp2adQ.js → vue-ui-chestnut-D1u8zAt6.js} +6 -6
  43. package/dist/{vue-ui-chestnut-x6ysM7Re.cjs → vue-ui-chestnut-GkLVffKx.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-C5gPJbwq.cjs → vue-ui-cursor-BUd1Q5lA.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-X_1-s3ik.js → vue-ui-cursor-C5wjK645.js} +2 -2
  46. package/dist/{vue-ui-dashboard-zfHS3YDI.js → vue-ui-dashboard-BowIqsF3.js} +2 -2
  47. package/dist/{vue-ui-dashboard-Cgtk8oJP.cjs → vue-ui-dashboard-DNBuurN8.cjs} +1 -1
  48. package/dist/{vue-ui-digits-C6o6diGb.js → vue-ui-digits-BNYcmWcq.js} +2 -2
  49. package/dist/{vue-ui-digits-DJL1XNX-.cjs → vue-ui-digits-DTCCLR7t.cjs} +1 -1
  50. package/dist/{vue-ui-donut-Do84LyRn.js → vue-ui-donut-A8FFYcHL.js} +9 -9
  51. package/dist/{vue-ui-donut-BwdyNBGR.cjs → vue-ui-donut-EcZmPKGU.cjs} +1 -1
  52. package/dist/{vue-ui-donut-evolution-DQnRpcIw.js → vue-ui-donut-evolution-D2-hEcFt.js} +9 -9
  53. package/dist/{vue-ui-donut-evolution-CIjVTIAJ.cjs → vue-ui-donut-evolution-D8FWDzbf.cjs} +1 -1
  54. package/dist/{vue-ui-dumbbell-B71pIx5Z.js → vue-ui-dumbbell-BzvaXl3t.js} +8 -8
  55. package/dist/{vue-ui-dumbbell-D_Bvl_1q.cjs → vue-ui-dumbbell-VdBbugvk.cjs} +1 -1
  56. package/dist/{vue-ui-flow-BFXzVNCo.js → vue-ui-flow-BNCURBYM.js} +7 -7
  57. package/dist/{vue-ui-flow-DpFcTi7P.cjs → vue-ui-flow-CVxjyFFr.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-DC0LoWFu.js → vue-ui-galaxy-BOCvpGgo.js} +9 -9
  59. package/dist/{vue-ui-galaxy-CI546a3O.cjs → vue-ui-galaxy-B_WO-Ise.cjs} +1 -1
  60. package/dist/{vue-ui-gauge-Chz7KDBu.js → vue-ui-gauge-CyWiOISv.js} +5 -5
  61. package/dist/{vue-ui-gauge-COVSZG36.cjs → vue-ui-gauge-srBiolyY.cjs} +1 -1
  62. package/dist/{vue-ui-gizmo-ydAuESKo.js → vue-ui-gizmo-6K5mJxXJ.js} +2 -2
  63. package/dist/{vue-ui-gizmo-DuSQv_6q.cjs → vue-ui-gizmo-KBFB-176.cjs} +1 -1
  64. package/dist/{vue-ui-heatmap-Ba_jzJB2.js → vue-ui-heatmap-CV_qq4nz.js} +8 -8
  65. package/dist/{vue-ui-heatmap-CdpBaTry.cjs → vue-ui-heatmap-OyGgSaiJ.cjs} +1 -1
  66. package/dist/{vue-ui-kpi-D2TypVZG.cjs → vue-ui-kpi-CUOL5B4G.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-C5yFYQ19.js → vue-ui-kpi-DDFrvbSg.js} +3 -3
  68. package/dist/{vue-ui-mini-loader-BD6Lu94h.js → vue-ui-mini-loader-BXX4TjNZ.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-DJXMipP5.cjs → vue-ui-mini-loader-D9au1UwX.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-DCCCC-6a.cjs → vue-ui-molecule-B6KIIzQy.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-DCsLwmnF.js → vue-ui-molecule-hDdymcRZ.js} +9 -9
  72. package/dist/{vue-ui-mood-radar-CX6Gq6UB.cjs → vue-ui-mood-radar-CG67AJHj.cjs} +1 -1
  73. package/dist/{vue-ui-mood-radar-D-FUCHS-.js → vue-ui-mood-radar-ClFJDfI5.js} +9 -9
  74. package/dist/{vue-ui-nested-donuts-CgRfdcJy.js → vue-ui-nested-donuts-BfUniFeA.js} +9 -9
  75. package/dist/{vue-ui-nested-donuts-DWuCVtg8.cjs → vue-ui-nested-donuts-D4Lhg5RB.cjs} +1 -1
  76. package/dist/{vue-ui-onion-Dg-7GylY.cjs → vue-ui-onion-BsFXxeB3.cjs} +1 -1
  77. package/dist/{vue-ui-onion-BWo7GrFe.js → vue-ui-onion-tQu-2K9q.js} +9 -9
  78. package/dist/{vue-ui-parallel-coordinate-plot-DSUZL2Sy.js → vue-ui-parallel-coordinate-plot-B4V-f4GJ.js} +10 -10
  79. package/dist/{vue-ui-parallel-coordinate-plot-prF4TxQD.cjs → vue-ui-parallel-coordinate-plot-DxF-vbBl.cjs} +1 -1
  80. package/dist/{vue-ui-quadrant-DYApa1bj.js → vue-ui-quadrant-DxKyRd_P.js} +10 -10
  81. package/dist/{vue-ui-quadrant-Ct06vgiw.cjs → vue-ui-quadrant-EVcqra7f.cjs} +1 -1
  82. package/dist/{vue-ui-quick-chart-CwIWb_LQ.cjs → vue-ui-quick-chart-BlWh80K7.cjs} +1 -1
  83. package/dist/{vue-ui-quick-chart-DOHmWoHL.js → vue-ui-quick-chart-uKmJfOpu.js} +6 -6
  84. package/dist/{vue-ui-radar-C4SFHmfz.js → vue-ui-radar-BtdPKPZ7.js} +10 -10
  85. package/dist/{vue-ui-radar-BJ23WOh7.cjs → vue-ui-radar-DvwcyN74.cjs} +1 -1
  86. package/dist/{vue-ui-rating-BSFASHFc.js → vue-ui-rating-DnjpxJ4y.js} +2 -2
  87. package/dist/{vue-ui-rating-BsRGR-VS.cjs → vue-ui-rating-cs_38Y0m.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-CEzXa3yt.cjs → vue-ui-relation-circle-D8BtbSgz.cjs} +1 -1
  89. package/dist/{vue-ui-relation-circle-Dg-99k9k.js → vue-ui-relation-circle-DU25q6vF.js} +5 -5
  90. package/dist/{vue-ui-rings-DiQhsWx_.cjs → vue-ui-rings-C2g_APoU.cjs} +1 -1
  91. package/dist/{vue-ui-rings-CCcc9cFR.js → vue-ui-rings-Dqmq4eAz.js} +9 -9
  92. package/dist/{vue-ui-scatter-D7z4c6k-.cjs → vue-ui-scatter-CUTI-j6h.cjs} +1 -1
  93. package/dist/{vue-ui-scatter-BgsexKX4.js → vue-ui-scatter-z87lbpUc.js} +10 -10
  94. package/dist/{vue-ui-screenshot-Bj85MdEJ.cjs → vue-ui-screenshot-5Ty4TdFu.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-viGaG1cU.js → vue-ui-screenshot-CmQKWKeg.js} +1 -1
  96. package/dist/{vue-ui-skeleton-Cl9Kp9yE.cjs → vue-ui-skeleton-C1gZzXN3.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-apODtH32.js → vue-ui-skeleton-MSz3CazQ.js} +2 -2
  98. package/dist/{vue-ui-smiley-BUDu21nW.js → vue-ui-smiley-BlboD1sB.js} +2 -2
  99. package/dist/{vue-ui-smiley-CfDLeydH.cjs → vue-ui-smiley-CpG6hClo.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-ZS_m-z6R.cjs → vue-ui-spark-trend-B_VmG9ei.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-B1bpQlNI.js → vue-ui-spark-trend-DsGonhv7.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-C8fgdM5i.cjs → vue-ui-sparkbar-CRAs4ZNh.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-CpwYwA2h.js → vue-ui-sparkbar-CoIRuQE2.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-DpDoOc6V.js → vue-ui-sparkgauge-6NsDwbdd.js} +3 -3
  105. package/dist/{vue-ui-sparkgauge-CGy4jbtz.cjs → vue-ui-sparkgauge-DmfNx81U.cjs} +1 -1
  106. package/dist/{vue-ui-sparkhistogram-CX35Cfkc.cjs → vue-ui-sparkhistogram-BnL8pVPX.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-CcEB0gwD.js → vue-ui-sparkhistogram-SMZKbglD.js} +4 -4
  108. package/dist/{vue-ui-sparkline-CdPAtBR8.cjs → vue-ui-sparkline-DWp53BqW.cjs} +1 -1
  109. package/dist/{vue-ui-sparkline-Bk4kWGco.js → vue-ui-sparkline-ZoKe6jkf.js} +3 -3
  110. package/dist/{vue-ui-sparkstackbar-6xwj9rme.cjs → vue-ui-sparkstackbar-CY99-ucz.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-B7Pvvmo_.js → vue-ui-sparkstackbar-Dv7J7zxM.js} +3 -3
  112. package/dist/{vue-ui-stackbar-7xZmgZo4.cjs → vue-ui-stackbar-Cl_-QqC5.cjs} +1 -1
  113. package/dist/{vue-ui-stackbar-BMhowvyb.js → vue-ui-stackbar-h6h7QGAP.js} +10 -10
  114. package/dist/{vue-ui-strip-plot-CnLnX_zO.js → vue-ui-strip-plot-0MY0XeQZ.js} +9 -9
  115. package/dist/{vue-ui-strip-plot-DOXU1HhU.cjs → vue-ui-strip-plot-ErIBdvIs.cjs} +1 -1
  116. package/dist/{vue-ui-table-CoIUKpaM.js → vue-ui-table-BI39X47u.js} +1 -1
  117. package/dist/{vue-ui-table-Ly0OlueB.cjs → vue-ui-table-CM0rNUf-.cjs} +1 -1
  118. package/dist/{vue-ui-table-heatmap-cLUGY_I8.cjs → vue-ui-table-heatmap-CHhTAsyi.cjs} +1 -1
  119. package/dist/{vue-ui-table-heatmap-CtVr--3k.js → vue-ui-table-heatmap-Dopc6yMN.js} +4 -4
  120. package/dist/{vue-ui-table-sparkline-Ct4n3vjB.js → vue-ui-table-sparkline-6gj6DDCN.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-i_FQjHJt.cjs → vue-ui-table-sparkline-Dg_Mq3rM.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-vrEGhPDN.cjs → vue-ui-thermometer-DEUwMNMZ.cjs} +1 -1
  123. package/dist/{vue-ui-thermometer-CELrItTb.js → vue-ui-thermometer-ih1L-ljO.js} +5 -5
  124. package/dist/{vue-ui-timer-C5oaCNfC.cjs → vue-ui-timer-Bi2yQwlN.cjs} +1 -1
  125. package/dist/{vue-ui-timer-BKhOVqdo.js → vue-ui-timer-w2dLs5eZ.js} +4 -4
  126. package/dist/{vue-ui-tiremarks-p6l5H8Xo.js → vue-ui-tiremarks-DquBFcM5.js} +5 -5
  127. package/dist/{vue-ui-tiremarks-CSbL6U73.cjs → vue-ui-tiremarks-VRvvZ33_.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-BwegaYVE.cjs → vue-ui-treemap-BYNEwTiA.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-C4DTISo2.js → vue-ui-treemap-DGENpszV.js} +9 -9
  130. package/dist/{vue-ui-vertical-bar-C8dwl1ez.js → vue-ui-vertical-bar-CfWUf6Y4.js} +9 -9
  131. package/dist/{vue-ui-vertical-bar-B3GbC7E_.cjs → vue-ui-vertical-bar-DZS2Ch2k.cjs} +1 -1
  132. package/dist/{vue-ui-waffle-BjXgV05U.js → vue-ui-waffle-Dx0BxOeV.js} +9 -9
  133. package/dist/{vue-ui-waffle-DfhoqEtv.cjs → vue-ui-waffle-IWjNb8gI.cjs} +1 -1
  134. package/dist/{vue-ui-wheel-CtUEp9En.cjs → vue-ui-wheel-D1kvWtkG.cjs} +1 -1
  135. package/dist/{vue-ui-wheel-BpGLo5wJ.js → vue-ui-wheel-D5oFlBaQ.js} +5 -5
  136. package/dist/{vue-ui-word-cloud-BSmOL5UE.cjs → vue-ui-word-cloud-BaIIRCDW.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-DNBF-X9H.js → vue-ui-word-cloud-DWJysat7.js} +7 -7
  138. package/dist/{vue-ui-xy-W_Zawlkz.js → vue-ui-xy-6i-4Kwwo.js} +81 -80
  139. package/dist/{vue-ui-xy-ClD6S1Ok.cjs → vue-ui-xy-C6uXNovT.cjs} +2 -2
  140. package/dist/{vue-ui-xy-canvas-DELc-ZEx.js → vue-ui-xy-canvas-4ElbiIL1.js} +10 -10
  141. package/dist/{vue-ui-xy-canvas-BZTwibcy.cjs → vue-ui-xy-canvas-DR85wD3J.cjs} +1 -1
  142. package/package.json +1 -1
  143. package/dist/Slicer-CIqhDVuv.cjs +0 -1
  144. package/dist/Slicer-D62jXLRQ.js +0 -257
  145. package/dist/index-De6Dj52h.cjs +0 -4
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-De6Dj52h.cjs"),$=require("./useNestedProp-Vjg1xsU_.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i=y=>(e.pushScopeId("data-v-3e41118a"),y=y(),e.popScopeId(),y),w={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M=["xmlns","stroke"],B={id:"vueUiSmiley0"},C=["stop-color"],R=["stop-color"],H=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),X=["fill"],j=["stroke"],U=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),G=[U],L=["xmlns","viewBox","stroke"],A={id:"vueUiSmiley0"},D=["stop-color"],Y=["stop-color"],F=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),K=["fill"],I=["viewBox","stroke"],T=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),O=[T],q=["xmlns","stroke"],P={id:"vueUiSmiley1"},J=["stop-color"],Q=["stop-color"],W=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Z=["fill"],ee=["xmlns","stroke"],te=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),oe=[te],le=["xmlns","viewBox","stroke"],ae={id:"vueUiSmiley1"},ne=["stop-color"],se=["stop-color"],ie=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),re=["fill"],de=["viewBox","stroke"],ue=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),ce=[ue],pe=["xmlns","stroke"],ve={id:"vueUiSmiley2"},ye=["stop-color"],me=["stop-color"],fe=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),he=["fill"],ke=["xmlns","stroke"],ge=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),_e=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Ne=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),ze=[ge,xe,_e,Ne],Ve=["xmlns","viewBox","stroke"],be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ee={id:"vueUiSmiley2"},$e=["stop-color"],Se=["stop-color"],we=["fill"],Me=["xmlns","viewBox","stroke"],Be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ce=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Re=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),He=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Xe=[Be,Ce,Re,He],je=["xmlns","stroke"],Ue={id:"vueUiSmiley3"},Ge=["stop-color"],Le=["stop-color"],Ae=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),De=["fill"],Ye=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ke=[Fe],Ie=["xmlns","viewBox","stroke"],Te=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Oe={id:"vueUiSmiley3"},qe=["stop-color"],Pe=["stop-color"],Je=["fill"],Qe=["xmlns","viewBox","stroke"],We=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ze=[We],et=["xmlns","stroke"],tt={id:"vueUiSmiley4"},ot=["stop-color"],lt=["stop-color"],at=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),nt=["fill"],st=["xmlns","stroke"],it=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),rt=[it],dt=["xmlns","viewBox","stroke"],ut=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ct={id:"vueUiSmiley4"},pt=["stop-color"],vt=["stop-color"],yt=["fill"],mt=["xmlns","viewBox","stroke"],ft=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),ht=[ft],kt={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:g,emit:x}){const c=y,{vue_ui_smiley:_}=l.useConfig();e.onMounted(()=>{l.objectIsEmpty(c.dataset)&&l.error({componentName:"VueUiSmiley",type:"dataset"})});const f=e.ref(!1),s=e.ref(void 0),t=e.computed(()=>$.useNestedProp({userConfig:c.config,defaultConfig:_})),N=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)?z(c.dataset.rating):c.dataset.rating||null),m=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)),r=e.ref(N.value),d=e.ref(t.value.readonly);function z(n){if(n===null)return null;let o=0,a=0;for(const h in n){const E=parseInt(h),k=n[h];o+=E*k,a+=k}return a===0?0:o/a}function p(n){const o=r.value-n,a=24;switch(!0){case o<0:return 0;case o>1:return 1*a;default:return o*a}}function v(n){d.value||(r.value=n,x("rate",n))}function V(){return r.value}function b(n=!0){d.value=n}g({getData:V,toggleReadonly:b});function u(n){return t.value.readonly?t.value.style.colors.inactive[n]:r.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:s.value!==void 0&&s.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:o[20]||(o[20]=a=>f.value=!0),onMouseleave:o[21]||(o[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-BmJ7PKIU.cjs"),$=require("./useNestedProp-Csm4QEI9.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),i=y=>(e.pushScopeId("data-v-3e41118a"),y=y(),e.popScopeId(),y),w={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M=["xmlns","stroke"],B={id:"vueUiSmiley0"},C=["stop-color"],R=["stop-color"],H=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),X=["fill"],j=["stroke"],U=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),G=[U],L=["xmlns","viewBox","stroke"],A={id:"vueUiSmiley0"},D=["stop-color"],Y=["stop-color"],F=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),K=["fill"],I=["viewBox","stroke"],T=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-3e41118a></path>',5),O=[T],q=["xmlns","stroke"],P={id:"vueUiSmiley1"},J=["stop-color"],Q=["stop-color"],W=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Z=["fill"],ee=["xmlns","stroke"],te=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),oe=[te],le=["xmlns","viewBox","stroke"],ae={id:"vueUiSmiley1"},ne=["stop-color"],se=["stop-color"],ie=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),re=["fill"],de=["viewBox","stroke"],ue=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9 15l6 0" data-v-3e41118a></path>',5),ce=[ue],pe=["xmlns","stroke"],ve={id:"vueUiSmiley2"},ye=["stop-color"],me=["stop-color"],fe=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),he=["fill"],ke=["xmlns","stroke"],ge=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),xe=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),_e=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),Ne=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),ze=[ge,xe,_e,Ne],Ve=["xmlns","viewBox","stroke"],be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ee={id:"vueUiSmiley2"},$e=["stop-color"],Se=["stop-color"],we=["fill"],Me=["xmlns","viewBox","stroke"],Be=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Ce=i(()=>e.createElementVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null,-1)),Re=i(()=>e.createElementVNode("path",{d:"M9 10l.01 0"},null,-1)),He=i(()=>e.createElementVNode("path",{d:"M15 10l.01 0"},null,-1)),Xe=[Be,Ce,Re,He],je=["xmlns","stroke"],Ue={id:"vueUiSmiley3"},Ge=["stop-color"],Le=["stop-color"],Ae=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),De=["fill"],Ye=["xmlns","stroke"],Fe=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ke=[Fe],Ie=["xmlns","viewBox","stroke"],Te=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),Oe={id:"vueUiSmiley3"},qe=["stop-color"],Pe=["stop-color"],Je=["fill"],Qe=["xmlns","viewBox","stroke"],We=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 10l.01 0" data-v-3e41118a></path><path d="M15 10l.01 0" data-v-3e41118a></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-3e41118a></path>',5),Ze=[We],et=["xmlns","stroke"],tt={id:"vueUiSmiley4"},ot=["stop-color"],lt=["stop-color"],at=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),nt=["fill"],st=["xmlns","stroke"],it=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),rt=[it],dt=["xmlns","viewBox","stroke"],ut=i(()=>e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1)),ct={id:"vueUiSmiley4"},pt=["stop-color"],vt=["stop-color"],yt=["fill"],mt=["xmlns","viewBox","stroke"],ft=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-3e41118a></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-3e41118a></path><path d="M9 9l.01 0" data-v-3e41118a></path><path d="M15 9l.01 0" data-v-3e41118a></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-3e41118a></path>',5),ht=[ft],kt={__name:"vue-ui-smiley",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(y,{expose:g,emit:x}){const c=y,{vue_ui_smiley:_}=l.useConfig();e.onMounted(()=>{l.objectIsEmpty(c.dataset)&&l.error({componentName:"VueUiSmiley",type:"dataset"})});const f=e.ref(!1),s=e.ref(void 0),t=e.computed(()=>$.useNestedProp({userConfig:c.config,defaultConfig:_})),N=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)?z(c.dataset.rating):c.dataset.rating||null),m=e.computed(()=>typeof c.dataset.rating=="object"&&!Array.isArray(c.dataset.rating)),r=e.ref(N.value),d=e.ref(t.value.readonly);function z(n){if(n===null)return null;let o=0,a=0;for(const h in n){const E=parseInt(h),k=n[h];o+=E*k,a+=k}return a===0?0:o/a}function p(n){const o=r.value-n,a=24;switch(!0){case o<0:return 0;case o>1:return 1*a;default:return o*a}}function v(n){d.value||(r.value=n,x("rate",n))}function V(){return r.value}function b(n=!0){d.value=n}g({getData:V,toggleReadonly:b});function u(n){return t.value.readonly?t.value.style.colors.inactive[n]:r.value===n+1?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:s.value!==void 0&&s.value===n?t.value.style.icons.useGradient&&t.value.style.icons.filled?`url(#vueUiSmiley${n})`:t.value.style.colors.active[n]:t.value.style.colors.inactive[n]}return(n,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`),onMouseover:o[20]||(o[20]=a=>f.value=!0),onMouseleave:o[21]||(o[21]=a=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-smiley-wrapper",style:e.normalizeStyle(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===1}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;
2
2
  position:relative`),onMouseenter:o[0]||(o[0]=a=>s.value=0),onMouseleave:o[1]||(o[1]=a=>s.value=void 0),onClick:o[2]||(o[2]=a=>v(1)),onKeyup:o[3]||(o[3]=e.withKeys(a=>v(1),["enter"]))},[t.value.style.tooltip.show&&m.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===0?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"1",4),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(c.dataset.rating[1]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",B,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[0],.05)},null,8,C),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[0]},null,8,R)])]),H,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(0)},null,8,X)],8,M)):(e.openBlock(),e.createElementBlock("svg",{key:2,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(0),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},G,8,j)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.XMLNS),style:{transition:"all 0.1s ease-in-out",position:"absolute",top:"0",left:"0"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",A,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[0],.05)},null,8,D),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[0]},null,8,Y)])]),F,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley0)":t.value.style.colors.activeReadonly[0]},null,8,K)],8,L)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(0)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[0],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},O,8,I)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===2}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:o[4]||(o[4]=a=>s.value=1),onMouseleave:o[5]||(o[5]=a=>s.value=void 0),onClick:o[6]||(o[6]=a=>v(2)),onKeyup:o[7]||(o[7]=e.withKeys(a=>v(2),["enter"]))},[t.value.style.tooltip.show&&m.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===1?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"2",4),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(c.dataset.rating[2]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",P,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.active[1],.05)},null,8,J),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.active[1]},null,8,Q)])]),W,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(1)},null,8,Z)],8,q)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(1),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},oe,8,ee)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ae,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[1],.05)},null,8,ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[1]},null,8,se)])]),ie,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley1)":t.value.style.colors.activeReadonly[1]},null,8,re)],8,le)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(1)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[1],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ce,8,de)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===3}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:o[8]||(o[8]=a=>s.value=2),onMouseleave:o[9]||(o[9]=a=>s.value=void 0),onClick:o[10]||(o[10]=a=>v(3)),onKeyup:o[11]||(o[11]=e.withKeys(a=>v(3),["enter"]))},[t.value.style.tooltip.show&&m.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===2?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"3",4),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(c.dataset.rating[3]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ve,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,ye),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,me)])]),fe,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:u(2)},null,8,he)],8,pe)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(2),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ze,8,ke)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[be,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ee,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[2],.05)},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[2]},null,8,Se)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley2)":t.value.style.colors.activeReadonly[2]},null,8,we)],8,Ve)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(2)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[2],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Xe,8,Me)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===4}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:o[12]||(o[12]=a=>s.value=3),onMouseleave:o[13]||(o[13]=a=>s.value=void 0),onClick:o[14]||(o[14]=a=>v(4)),onKeyup:o[15]||(o[15]=e.withKeys(a=>v(4),["enter"]))},[t.value.style.tooltip.show&&m.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===3?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"4",4),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(c.dataset.rating[4]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Ue,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Le)])]),Ae,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(3)},null,8,De)],8,je)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(3),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Ke,8,Ye)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Te,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",Oe,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[3],.95)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[3]},null,8,Pe)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley3)":t.value.style.colors.activeReadonly[3]},null,8,Je)],8,Ie)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(3)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[3],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Ze,8,Qe)):e.createCommentVNode("",!0)],38),e.createElementVNode("div",{tabindex:"0",class:e.normalizeClass({"vue-ui-smiley-rated":!t.value.readonly&&r.value===5}),style:e.normalizeStyle(`cursor:${t.value.readonly?"default":"pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`),onMouseenter:o[16]||(o[16]=a=>s.value=4),onMouseleave:o[17]||(o[17]=a=>s.value=void 0),onClick:o[18]||(o[18]=a=>v(5)),onKeyup:o[19]||(o[19]=e.withKeys(a=>v(5),["enter"]))},[t.value.style.tooltip.show&&m.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===4?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},"5",4),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(c.dataset.rating[5]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0),t.value.style.icons.filled?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",tt,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,lt)])]),at,e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:u(4)},null,8,nt)],8,et)):(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:u(4),fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},rt,8,st)),t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[ut,e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",ct,[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(l.shiftHue)(t.value.style.colors.activeReadonly[4],.9)},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.activeReadonly[4]},null,8,vt)])]),e.createElementVNode("path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z","stroke-width":"0",fill:t.value.style.icons.useGradient?"url(#vueUiSmiley4)":t.value.style.colors.activeReadonly[4]},null,8,yt)],8,dt)):e.createCommentVNode("",!0),!t.value.style.icons.filled&&d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(l.XMLNS),style:{position:"absolute",top:"0",left:"0",transition:"all 0.1s ease-in-out"},height:"100%",viewBox:`0 0 ${p(4)} 24`,"stroke-width":"1.5",stroke:t.value.style.colors.activeReadonly[4],fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ht,8,mt)):e.createCommentVNode("",!0)],38),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(r.value)?"":r.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},gt=S._export_sfc(kt,[["__scopeId","data-v-3e41118a"]]);exports.default=gt;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-De6Dj52h.cjs"),L=require("./useNestedProp-Vjg1xsU_.cjs"),x=require("./BaseIcon-DuVD-1qH.cjs"),M=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],q=["xmlns","viewBox"],A=["id"],I=["stop-color"],D=["stop-color"],P={key:0},G=["d","fill"],O=["d","fill"],U=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],W=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],Z=["height","width","x"],H={style:{width:"100%"}},R=["x","y","fill","font-size","font-weight"],X=["stroke","cx","cy","fill"],J=["x","y","font-size","fill","font-weight"],K={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N){const r=N,{vue_ui_spark_trend:$}=n.useConfig(),E=e.computed(()=>!!r.dataset&&r.dataset.length),y=e.ref(n.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l});function k(l){return l.map(u=>[void 0].includes(u)?null:u)}const h=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0].includes(l)?null:l)),v=e.ref(!1),g=e.ref(null);e.onMounted(()=>{n.objectIsEmpty(r.dataset)&&n.error({componentName:"VueUiTrendPill",type:"dataset"});let u=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){v.value=!0;let w=performance.now(),B=w-i;B>u?(i=w-B%u,c<r.dataset.length?(h.value.push(r.dataset[c]),c+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),h.value=k(r.dataset),v.value=!1)):g.value=requestAnimationFrame(b)};h.value=[];let c=0;b()}});const o=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:o.value.width-t.value.style.padding.right,bottom:o.value.height-t.value.style.padding.bottom,height:o.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:o.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l),min:Math.min(...l)}}),p=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),V=e.computed(()=>_.value.max+p.value);function C(l){return l/V.value}const T=e.computed(()=>r.dataset.length),a=e.computed(()=>h.value.map((l,u)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:l,absoluteValue:i,plotValue:i+p.value,toMax:C(i+p.value),x:d.value.left+u*(d.value.width/(T.value-1))-t.value.style.padding.right,y:d.value.bottom-d.value.height*C(i+p.value)}})),m=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?n.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),f=e.computed(()=>v.value||m.value===0?"neutral":m.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[f.value]),z=e.computed(()=>{const l={x:a.value[0].x,y:o.value.height-6},u={x:a.value[a.value.length-1].x,y:o.value.height-6},i=[];return a.value.forEach(c=>{i.push(`${c.x},${c.y} `)}),[l.x,l.y,...i,u.x,u.y].toString()}),S=e.computed(()=>{let l=[];return a.value.forEach(u=>{l.push(`${u.x},${u.y} `)}),`M ${l.toString()}`});return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};backgroundColor:${t.value.style.backgroundColor}`)},[E.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke)+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,D)],8,A)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",P,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${d.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,G)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${z.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,O))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,U)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:S.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,W)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:o.value.height/2,width:o.value.height/2,x:o.value.height/5,y:8},[e.createElementVNode("div",H,[f.value==="positive"?(e.openBlock(),e.createBlock(x.default,{key:0,stroke:s.value,name:"arrowTop",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="negative"?(e.openBlock(),e.createBlock(x.default,{key:1,stroke:s.value,name:"arrowBottom",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="neutral"?(e.openBlock(),e.createBlock(x.default,{key:2,stroke:s.value,name:"arrowRight",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,Z)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:o.value.height/2-o.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.dataLabel)({p:m.value>0?"+":"",v:m.value,s:"%",r:t.value.style.trendLabel.rounding})),9,R)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,X)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,J)):e.createCommentVNode("",!0)],12,q)):(e.openBlock(),e.createBlock(M.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},Q=F._export_sfc(K,[["__scopeId","data-v-e9fd1997"]]);exports.default=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BmJ7PKIU.cjs"),L=require("./useNestedProp-Csm4QEI9.cjs"),x=require("./BaseIcon-I9PxMOax.cjs"),M=require("./vue-ui-skeleton-C1gZzXN3.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],q=["xmlns","viewBox"],A=["id"],I=["stop-color"],D=["stop-color"],P={key:0},G=["d","fill"],O=["d","fill"],U=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],W=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],Z=["height","width","x"],H={style:{width:"100%"}},R=["x","y","fill","font-size","font-weight"],X=["stroke","cx","cy","fill"],J=["x","y","font-size","fill","font-weight"],K={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N){const r=N,{vue_ui_spark_trend:$}=n.useConfig(),E=e.computed(()=>!!r.dataset&&r.dataset.length),y=e.ref(n.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l});function k(l){return l.map(u=>[void 0].includes(u)?null:u)}const h=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0].includes(l)?null:l)),v=e.ref(!1),g=e.ref(null);e.onMounted(()=>{n.objectIsEmpty(r.dataset)&&n.error({componentName:"VueUiTrendPill",type:"dataset"});let u=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){v.value=!0;let w=performance.now(),B=w-i;B>u?(i=w-B%u,c<r.dataset.length?(h.value.push(r.dataset[c]),c+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),h.value=k(r.dataset),v.value=!1)):g.value=requestAnimationFrame(b)};h.value=[];let c=0;b()}});const o=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:o.value.width-t.value.style.padding.right,bottom:o.value.height-t.value.style.padding.bottom,height:o.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:o.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l),min:Math.min(...l)}}),p=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),V=e.computed(()=>_.value.max+p.value);function C(l){return l/V.value}const T=e.computed(()=>r.dataset.length),a=e.computed(()=>h.value.map((l,u)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:l,absoluteValue:i,plotValue:i+p.value,toMax:C(i+p.value),x:d.value.left+u*(d.value.width/(T.value-1))-t.value.style.padding.right,y:d.value.bottom-d.value.height*C(i+p.value)}})),m=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?n.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),f=e.computed(()=>v.value||m.value===0?"neutral":m.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[f.value]),z=e.computed(()=>{const l={x:a.value[0].x,y:o.value.height-6},u={x:a.value[a.value.length-1].x,y:o.value.height-6},i=[];return a.value.forEach(c=>{i.push(`${c.x},${c.y} `)}),[l.x,l.y,...i,u.x,u.y].toString()}),S=e.computed(()=>{let l=[];return a.value.forEach(u=>{l.push(`${u.x},${u.y} `)}),`M ${l.toString()}`});return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};backgroundColor:${t.value.style.backgroundColor}`)},[E.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke)+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,D)],8,A)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",P,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${d.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,G)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${z.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,O))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,U)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:S.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,W)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:o.value.height/2,width:o.value.height/2,x:o.value.height/5,y:8},[e.createElementVNode("div",H,[f.value==="positive"?(e.openBlock(),e.createBlock(x.default,{key:0,stroke:s.value,name:"arrowTop",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="negative"?(e.openBlock(),e.createBlock(x.default,{key:1,stroke:s.value,name:"arrowBottom",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="neutral"?(e.openBlock(),e.createBlock(x.default,{key:2,stroke:s.value,name:"arrowRight",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,Z)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:o.value.height/2-o.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.dataLabel)({p:m.value>0?"+":"",v:m.value,s:"%",r:t.value.style.trendLabel.rounding})),9,R)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,X)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,J)):e.createCommentVNode("",!0)],12,q)):(e.openBlock(),e.createBlock(M.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},Q=F._export_sfc(K,[["__scopeId","data-v-e9fd1997"]]);exports.default=Q;
@@ -1,8 +1,8 @@
1
1
  import { computed as u, ref as p, onMounted as W, openBlock as n, createElementBlock as i, normalizeStyle as j, createBlock as w, unref as y, createElementVNode as g, createCommentVNode as v, toDisplayString as A } from "vue";
2
- import { u as X, c as Z, t as Q, o as R, e as H, Q as J, X as K, v as z, M as I, f as B, i as Y } from "./index-8Lp8V0TB.js";
3
- import { u as D } from "./useNestedProp-DE-a5lMx.js";
4
- import M from "./BaseIcon-BoVYVkUT.js";
5
- import ee from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as X, c as Z, t as Q, o as R, e as H, Q as J, X as K, v as z, M as I, f as B, i as Y } from "./index-kgQzkWhV.js";
3
+ import { u as D } from "./useNestedProp-CEBAQM_w.js";
4
+ import M from "./BaseIcon-B_HSdFNd.js";
5
+ import ee from "./vue-ui-skeleton-MSz3CazQ.js";
6
6
  import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const le = ["id"], ae = ["xmlns", "viewBox"], ne = ["id"], oe = ["stop-color"], se = ["stop-color"], ue = { key: 0 }, re = ["d", "fill"], ie = ["d", "fill"], de = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ve = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ye = ["height", "width", "x"], ce = { style: { width: "100%" } }, he = ["x", "y", "fill", "font-size", "font-weight"], fe = ["stroke", "cx", "cy", "fill"], pe = ["x", "y", "font-size", "fill", "font-weight"], ge = {
8
8
  __name: "vue-ui-spark-trend",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-De6Dj52h.cjs"),x=require("./useNestedProp-Vjg1xsU_.cjs"),E=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),V=["onClick"],$={key:1},D=["xmlns","viewBox"],z=["id"],L=["stop-color"],P=["stop-color"],A=["height","width","fill","rx"],F=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:100}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:C}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:n.config,defaultConfig:C});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),f=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),g()});function g(){if(t.value.style.animation.show){let k=function(){s+=a/l,s<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),f.value=requestAnimationFrame(k)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let s=0;k()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(f.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(g)},{deep:!0});const i=e.ref({width:500,height:16}),w=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function _(l){return l/w.value}function h(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:_(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function B(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:t.value.style.backgroundColor+e.unref(o.opacity)[n.backgroundOpacity]})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>B(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(a.color,.03)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,P)],8,z)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:`${t.value.style.gutter.backgroundColor}${e.unref(o.opacity)[t.value.style.gutter.opacity]}`,rx:i.value.height/2},null,8,A),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,D))],12,V)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BmJ7PKIU.cjs"),x=require("./useNestedProp-Csm4QEI9.cjs"),E=require("./vue-ui-skeleton-C1gZzXN3.cjs"),V=["onClick"],$={key:1},D=["xmlns","viewBox"],z=["id"],L=["stop-color"],P=["stop-color"],A=["height","width","fill","rx"],F=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:100}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:C}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:n.config,defaultConfig:C});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),f=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),g()});function g(){if(t.value.style.animation.show){let k=function(){s+=a/l,s<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),f.value=requestAnimationFrame(k)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let s=0;k()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(f.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(g)},{deep:!0});const i=e.ref({width:500,height:16}),w=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function _(l){return l/w.value}function h(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:_(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function B(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:t.value.style.backgroundColor+e.unref(o.opacity)[n.backgroundOpacity]})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>B(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(a.color,.03)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,P)],8,z)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:`${t.value.style.gutter.backgroundColor}${e.unref(o.opacity)[t.value.style.gutter.opacity]}`,rx:i.value.height/2},null,8,A),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,D))],12,V)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
@@ -1,7 +1,7 @@
1
1
  import { computed as g, ref as x, onMounted as G, watch as W, nextTick as q, openBlock as r, createElementBlock as v, normalizeStyle as y, unref as s, renderSlot as I, normalizeProps as P, mergeProps as H, createCommentVNode as d, createElementVNode as c, toDisplayString as p, Fragment as z, renderList as X, guardReactiveProps as R, createBlock as J } from "vue";
2
- import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, v as _, i as w, f as b, X as oe, s as se } from "./index-8Lp8V0TB.js";
3
- import { u as T } from "./useNestedProp-DE-a5lMx.js";
4
- import ue from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, v as _, i as w, f as b, X as oe, s as se } from "./index-kgQzkWhV.js";
3
+ import { u as T } from "./useNestedProp-CEBAQM_w.js";
4
+ import ue from "./vue-ui-skeleton-MSz3CazQ.js";
5
5
  const ie = ["onClick"], ne = { key: 1 }, re = ["xmlns", "viewBox"], ve = ["id"], ce = ["stop-color"], de = ["stop-color"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], ke = {
6
6
  __name: "vue-ui-sparkbar",
7
7
  props: {
@@ -1,7 +1,7 @@
1
1
  import { computed as s, onMounted as w, ref as m, watch as F, openBlock as n, createElementBlock as r, normalizeStyle as v, toDisplayString as y, createCommentVNode as c, unref as g, createElementVNode as i, normalizeClass as O, createBlock as j } from "vue";
2
- import { u as B, o as D, e as C, g as E, c as I, t as G, I as U, X as V, i as q, f as P } from "./index-8Lp8V0TB.js";
3
- import { u as L } from "./useNestedProp-DE-a5lMx.js";
4
- import T from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as B, o as D, e as C, g as E, c as I, t as G, I as U, X as V, i as q, f as P } from "./index-kgQzkWhV.js";
3
+ import { u as L } from "./useNestedProp-CEBAQM_w.js";
4
+ import T from "./vue-ui-skeleton-MSz3CazQ.js";
5
5
  const X = ["xmlns", "viewBox"], H = ["id"], R = ["stop-color"], Y = ["stop-color"], J = ["d", "stroke", "stroke-linecap"], K = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], Q = ["x", "y", "font-size", "fill", "font-weight"], ae = {
6
6
  __name: "vue-ui-sparkgauge",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-De6Dj52h.cjs"),g=require("./useNestedProp-Vjg1xsU_.cjs"),C=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(s=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:s})})});const v=e.ref(u.createUid()),t=e.computed(()=>{const s=g.useNestedProp({userConfig:a.config,defaultConfig:b});return s.theme?{...g.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[s.theme]||a.config,defaultConfig:s})}:s}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const s=a.dataset.min??0,i=a.dataset.max??0,_=i-s;return{min:s,max:i,diff:_}}),o=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{o.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>o.value>l.value.max?l.value.max:o.value<l.value.min?l.value.min:o.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function s(){o.value+=h.value,o.value<a.dataset.value?requestAnimationFrame(s):o.value=a.dataset.value}t.value.style.animation.show&&(o.value=l.value.min,s())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>o.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,o.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(s,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&r.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*y.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value,color:p.value})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BmJ7PKIU.cjs"),g=require("./useNestedProp-Csm4QEI9.cjs"),C=require("./vue-ui-skeleton-C1gZzXN3.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(s=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:s})})});const v=e.ref(u.createUid()),t=e.computed(()=>{const s=g.useNestedProp({userConfig:a.config,defaultConfig:b});return s.theme?{...g.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[s.theme]||a.config,defaultConfig:s})}:s}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const s=a.dataset.min??0,i=a.dataset.max??0,_=i-s;return{min:s,max:i,diff:_}}),o=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{o.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>o.value>l.value.max?l.value.max:o.value<l.value.min?l.value.min:o.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function s(){o.value+=h.value,o.value<a.dataset.value?requestAnimationFrame(s):o.value=a.dataset.value}t.value.style.animation.show&&(o.value=l.value.min,s())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>o.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,o.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(s,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&r.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*y.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value,color:p.value})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-De6Dj52h.cjs"),k=require("./useNestedProp-Vjg1xsU_.cjs"),z=require("./Shape-BNlNwrBB.cjs"),D=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=n-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=n-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BmJ7PKIU.cjs"),k=require("./useNestedProp-Csm4QEI9.cjs"),z=require("./Shape-mlNz6Vjk.cjs"),D=require("./vue-ui-skeleton-C1gZzXN3.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=n-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=n-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
@@ -1,8 +1,8 @@
1
1
  import { useCssVars as q, computed as _, onMounted as R, ref as M, openBlock as a, createElementBlock as o, normalizeStyle as w, createElementVNode as h, createTextVNode as T, toDisplayString as v, unref as r, createCommentVNode as p, Fragment as f, renderList as g, normalizeClass as N, createBlock as A } from "vue";
2
- import { u as P, o as J, e as D, g as K, c as Q, t as Z, v as b, i as ee, f as te, X as le, s as z } from "./index-8Lp8V0TB.js";
3
- import { u as F } from "./useNestedProp-DE-a5lMx.js";
4
- import { _ as ae } from "./Shape-B5VTXCQH.js";
5
- import oe from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as P, o as J, e as D, g as K, c as Q, t as Z, v as b, i as ee, f as te, X as le, s as z } from "./index-kgQzkWhV.js";
3
+ import { u as F } from "./useNestedProp-CEBAQM_w.js";
4
+ import { _ as ae } from "./Shape-CJFH8dr8.js";
5
+ import oe from "./vue-ui-skeleton-MSz3CazQ.js";
6
6
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"], ve = ["stop-color"], de = ["stop-color"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], ge = ["stop-color"], pe = ["stop-color"], be = { key: 0 }, me = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], _e = { key: 1 }, xe = ["x", "y", "font-size", "font-weight", "fill"], ke = ["x", "y", "font-size", "fill"], $e = ["x", "y", "font-size", "fill"], we = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Ce = {
8
8
  __name: "vue-ui-sparkhistogram",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-De6Dj52h.cjs"),C=require("./useNestedProp-Vjg1xsU_.cjs"),F=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),E=require("./useResponsive-B3TrDDIG.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=["id"],G=["xmlns","viewBox"],O=["id"],j=["stop-color"],R=["stop-color"],H=["id"],U=["stop-color"],X=["stop-color"],Z=["id"],Y=["stop-color"],J=["stop-color"],K={key:0},Q=["d","fill"],ee=["d","fill"],te=["d","stroke","stroke-width"],le=["x1","x2","y1","y2","stroke","stroke-width"],ae=["x","y","width","height","fill","rx"],oe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ne=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ue=["cx","cy","r","fill","stroke","stroke-width"],re=["x","y","font-size","font-weight","fill"],se=["x","y","height","width","onMouseenter","onClick"],ie={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:x}){const i=f,{vue_ui_sparkline:I}=u.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(u.createUid()),_=e.ref(null),B=e.ref(null),t=e.computed(()=>{const l=C.useNestedProp({userConfig:i.config,defaultConfig:I});return l.theme?{...C.useNestedProp({userConfig:u.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),p=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value})),L=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(i.dataset)?u.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{u.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){n<i.dataset.length?(p.value.push(i.dataset[n]),setTimeout(()=>{requestAnimationFrame(a)},l)):p.value=i.dataset,n+=1};p.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let n=0;a()}if(t.value.responsive){const l=E.throttle(()=>{const{width:n,height:a}=E.useResponsive({chart:_.value,title:t.value.style.title.show&&i.showInfo?B.value:null});o.value.width=n,o.value.height=a,o.value.chartWidth=t.value.style.chartWidth/500*n,o.value.padding=.06*n});L.value=new ResizeObserver(l),L.value.observe(_.value.parentNode)}});const o=e.ref({height:80,width:500,chartWidth:t.value.style.chartWidth,padding:30}),S=e.ref(6),r=e.computed(()=>({top:12,left:0,right:o.value.width,bottom:o.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?o.value.width-o.value.chartWidth:o.value.padding,width:i.showInfo&&t.value.style.dataLabel.show?o.value.chartWidth:o.value.width-o.value.padding,height:o.value.height-12})),w=e.computed(()=>Math.min(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),M=e.computed(()=>Math.max(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=w.value>=0?0:w.value;return Math.abs(l)}),z=e.computed(()=>M.value+m.value+S.value),b=e.computed(()=>r.value.bottom-r.value.height*N(m.value));function N(l){return l/z.value}const h=e.computed(()=>i.dataset.length-1),s=e.computed(()=>p.value.map((l,n)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:N(a+m.value),x:r.value.start+n*(r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)),y:r.value.bottom-r.value.height*N(a+m.value),id:`plot_${v.value}_${n}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?u.shiftHue(t.value.style.line.color,.05*(1-n/h.value)):t.value.style.line.color,width:r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)}})),P=e.computed(()=>{const l={x:s.value[0].x,y:o.value.height-6},n={x:s.value[s.value.length-1].x,y:o.value.height-6},a=[];return s.value.forEach(d=>{a.push(`${d.x},${d.y} `)}),[l.x,l.y,...a,n.x,n.y].toString()}),c=e.ref(void 0);function D(l,n){c.value=l,x("hoverIndex",{index:n})}function A(){c.value=void 0,x("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(g.value){const l=s.value.map(a=>a.absoluteValue),n=l.reduce((a,d)=>a+d,0);return{latest:s.value[s.value.length-1].absoluteValue,sum:n,average:n/s.value.length,median:u.calcMedian(l),trend:u.calcLinearProgression(s.value.map(({x:a,y:d,absoluteValue:V})=>({x:a,y:d,value:V}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),$=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function W(l,n){x("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:_,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.area.color,.05)}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(u.opacity)[t.value.style.area.opacity]},null,8,R)],8,O),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,X)],8,H),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,J)],8,Z)]),t.value.style.area.show&&!k.value&&s.value[0]?(e.openBlock(),e.createElementBlock("g",K,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${s.value[0].x},${r.value.bottom} ${e.unref(u.createSmoothPath)(s.value)} L ${s.value.at(-1).x},${r.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,Q)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${P.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,ee))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(u.createSmoothPath)(s.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,te)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[d<s.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:s.value[d+1].x,y1:a.y,y2:s.value[d+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,le)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ae)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||f.selectedIndex===d)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:r.value.top-6,y2:r.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,oe)):e.createCommentVNode("",!0)]))),256)),w.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.start,x2:r.value.start+r.value.width-16,y1:b.value,y2:b.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||f.selectedIndex===d?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ue)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:r.value.width+12+t.value.style.dataLabel.offsetX,y:o.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,$.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:$.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1))/2,y:r.value.top-6,height:r.value.height+6,width:r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1),fill:"transparent",onMouseenter:V=>D(a,d),onMouseleave:A,onClick:()=>W(a,d)},null,40,se))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],12,G)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,q))}},de=T._export_sfc(ie,[["__scopeId","data-v-a8f8425a"]]);exports.default=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BmJ7PKIU.cjs"),C=require("./useNestedProp-Csm4QEI9.cjs"),F=require("./vue-ui-skeleton-C1gZzXN3.cjs"),E=require("./useResponsive-B3TrDDIG.cjs"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=["id"],G=["xmlns","viewBox"],O=["id"],j=["stop-color"],R=["stop-color"],H=["id"],U=["stop-color"],X=["stop-color"],Z=["id"],Y=["stop-color"],J=["stop-color"],K={key:0},Q=["d","fill"],ee=["d","fill"],te=["d","stroke","stroke-width"],le=["x1","x2","y1","y2","stroke","stroke-width"],ae=["x","y","width","height","fill","rx"],oe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ne=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ue=["cx","cy","r","fill","stroke","stroke-width"],re=["x","y","font-size","font-weight","fill"],se=["x","y","height","width","onMouseenter","onClick"],ie={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:x}){const i=f,{vue_ui_sparkline:I}=u.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(u.createUid()),_=e.ref(null),B=e.ref(null),t=e.computed(()=>{const l=C.useNestedProp({userConfig:i.config,defaultConfig:I});return l.theme?{...C.useNestedProp({userConfig:u.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}),p=e.ref(i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value})),L=e.ref(null);e.onMounted(()=>{if(u.objectIsEmpty(i.dataset)?u.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{u.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show&&i.dataset.length>1){let a=function(){n<i.dataset.length?(p.value.push(i.dataset[n]),setTimeout(()=>{requestAnimationFrame(a)},l)):p.value=i.dataset,n+=1};p.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let n=0;a()}if(t.value.responsive){const l=E.throttle(()=>{const{width:n,height:a}=E.useResponsive({chart:_.value,title:t.value.style.title.show&&i.showInfo?B.value:null});o.value.width=n,o.value.height=a,o.value.chartWidth=t.value.style.chartWidth/500*n,o.value.padding=.06*n});L.value=new ResizeObserver(l),L.value.observe(_.value.parentNode)}});const o=e.ref({height:80,width:500,chartWidth:t.value.style.chartWidth,padding:30}),S=e.ref(6),r=e.computed(()=>({top:12,left:0,right:o.value.width,bottom:o.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?o.value.width-o.value.chartWidth:o.value.padding,width:i.showInfo&&t.value.style.dataLabel.show?o.value.chartWidth:o.value.width-o.value.padding,height:o.value.height-12})),w=e.computed(()=>Math.min(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),M=e.computed(()=>Math.max(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=w.value>=0?0:w.value;return Math.abs(l)}),z=e.computed(()=>M.value+m.value+S.value),b=e.computed(()=>r.value.bottom-r.value.height*N(m.value));function N(l){return l/z.value}const h=e.computed(()=>i.dataset.length-1),s=e.computed(()=>p.value.map((l,n)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:N(a+m.value),x:r.value.start+n*(r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)),y:r.value.bottom-r.value.height*N(a+m.value),id:`plot_${v.value}_${n}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?u.shiftHue(t.value.style.line.color,.05*(1-n/h.value)):t.value.style.line.color,width:r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)}})),P=e.computed(()=>{const l={x:s.value[0].x,y:o.value.height-6},n={x:s.value[s.value.length-1].x,y:o.value.height-6},a=[];return s.value.forEach(d=>{a.push(`${d.x},${d.y} `)}),[l.x,l.y,...a,n.x,n.y].toString()}),c=e.ref(void 0);function D(l,n){c.value=l,x("hoverIndex",{index:n})}function A(){c.value=void 0,x("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(g.value){const l=s.value.map(a=>a.absoluteValue),n=l.reduce((a,d)=>a+d,0);return{latest:s.value[s.value.length-1].absoluteValue,sum:n,average:n/s.value.length,median:u.calcMedian(l),trend:u.calcLinearProgression(s.value.map(({x:a,y:d,absoluteValue:V})=>({x:a,y:d,value:V}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),$=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function W(l,n){x("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:_,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.area.color,.05)}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(u.opacity)[t.value.style.area.opacity]},null,8,R)],8,O),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,X)],8,H),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,J)],8,Z)]),t.value.style.area.show&&!k.value&&s.value[0]?(e.openBlock(),e.createElementBlock("g",K,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${s.value[0].x},${r.value.bottom} ${e.unref(u.createSmoothPath)(s.value)} L ${s.value.at(-1).x},${r.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,Q)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${P.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,ee))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(u.createSmoothPath)(s.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,te)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[d<s.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:s.value[d+1].x,y1:a.y,y2:s.value[d+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,le)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ae)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||f.selectedIndex===d)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:r.value.top-6,y2:r.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,oe)):e.createCommentVNode("",!0)]))),256)),w.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.start,x2:r.value.start+r.value.width-16,y1:b.value,y2:b.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||f.selectedIndex===d?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ue)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:r.value.width+12+t.value.style.dataLabel.offsetX,y:o.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,$.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:$.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1))/2,y:r.value.top-6,height:r.value.height+6,width:r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1),fill:"transparent",onMouseenter:V=>D(a,d),onMouseleave:A,onClick:()=>W(a,d)},null,40,se))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],12,G)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,q))}},de=T._export_sfc(ie,[["__scopeId","data-v-a8f8425a"]]);exports.default=de;
@@ -1,7 +1,7 @@
1
1
  import { computed as v, ref as m, onMounted as ee, openBlock as n, createElementBlock as r, normalizeStyle as N, renderSlot as T, normalizeProps as te, guardReactiveProps as ae, createElementVNode as f, toDisplayString as B, createCommentVNode as y, unref as c, Fragment as P, renderList as A, createBlock as le } from "vue";
2
- import { u as ue, c as se, t as oe, o as ne, e as E, g as re, s as I, R as ie, S as de, X as ve, v as C, M as O, i as R, f as j } from "./index-8Lp8V0TB.js";
3
- import { u as U } from "./useNestedProp-DE-a5lMx.js";
4
- import ce from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as ue, c as se, t as oe, o as ne, e as E, g as re, s as I, R as ie, S as de, X as ve, v as C, M as O, i as R, f as j } from "./index-kgQzkWhV.js";
3
+ import { u as U } from "./useNestedProp-CEBAQM_w.js";
4
+ import ce from "./vue-ui-skeleton-MSz3CazQ.js";
5
5
  import { t as he, u as ye } from "./useResponsive-NZB-WLRF.js";
6
6
  import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const pe = ["id"], ge = ["xmlns", "viewBox"], ke = ["id"], me = ["stop-color"], be = ["stop-color"], xe = ["id"], _e = ["stop-color"], we = ["stop-color"], $e = ["id"], Le = ["stop-color"], Ne = ["stop-color"], Ie = { key: 0 }, Ce = ["d", "fill"], Me = ["d", "fill"], Se = ["d", "stroke", "stroke-width"], ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ve = ["x", "y", "width", "height", "fill", "rx"], Pe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ae = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], We = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], De = ["x", "y", "font-size", "font-weight", "fill"], Fe = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ge = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-De6Dj52h.cjs"),C=require("./useNestedProp-Vjg1xsU_.cjs"),E=require("./vue-ui-skeleton-Cl9Kp9yE.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,H)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BmJ7PKIU.cjs"),C=require("./useNestedProp-Csm4QEI9.cjs"),E=require("./vue-ui-skeleton-C1gZzXN3.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,H)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
@@ -1,7 +1,7 @@
1
1
  import { computed as p, ref as m, onMounted as T, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as u, toDisplayString as k, createCommentVNode as h, unref as b, Fragment as D, renderList as z, normalizeClass as A, createBlock as q } from "vue";
2
- import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-8Lp8V0TB.js";
3
- import { u as U } from "./useNestedProp-DE-a5lMx.js";
4
- import te from "./vue-ui-skeleton-apODtH32.js";
2
+ import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-kgQzkWhV.js";
3
+ import { u as U } from "./useNestedProp-CEBAQM_w.js";
4
+ import te from "./vue-ui-skeleton-MSz3CazQ.js";
5
5
  import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const ae = ["xmlns", "viewBox"], oe = ["id"], se = ["stop-color"], ne = ["stop-color"], re = ["stop-color"], ue = {
7
7
  id: "stackPill",