mixdashboards 1.0.78 → 1.0.80

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 (336) hide show
  1. package/dist/{BaseComponent-Dwhb9Mde.js → BaseComponent-CEp8NJiX.js} +8 -8
  2. package/dist/{BaseComponent-bzb58Hhs.cjs → BaseComponent-DaYX7dUF.cjs} +1 -1
  3. package/dist/{EChartComponentBase-BmS2KONN.js → EChartComponentBase-B-VNAC8K.js} +2 -2
  4. package/dist/{EChartComponentBase-CMN_pOMr.cjs → EChartComponentBase-C2sxqwSE.cjs} +1 -1
  5. package/dist/{EmergencyPlanPanel-FtvC-aXY.js → EmergencyPlanPanel-CwWvSELn.js} +1 -1
  6. package/dist/{EmergencyPlanPanel-CVusdpDo.cjs → EmergencyPlanPanel-Dcj6mNDZ.cjs} +1 -1
  7. package/dist/{HistoryPlanDialog-CrYylrTC.cjs → HistoryPlanDialog-CHHKFCEb.cjs} +1 -1
  8. package/dist/{HistoryPlanDialog-DliuSi0p.js → HistoryPlanDialog-MDXWiel6.js} +1 -1
  9. package/dist/{MonitoringMap-CBnv001f.cjs → MonitoringMap-CfcXyLMN.cjs} +1 -1
  10. package/dist/{MonitoringMap-DB3R5nAJ.js → MonitoringMap-Disr1Wm4.js} +2 -2
  11. package/dist/{UniverSheet-DFyIjurx.js → UniverSheet-BcuvQ33A.js} +2 -2
  12. package/dist/{UniverSheet-jy9kOyPN.cjs → UniverSheet-M8Z5JVxm.cjs} +1 -1
  13. package/dist/{accelerationChart-Ceo371ch.cjs → accelerationChart-DoqDRcpd.cjs} +1 -1
  14. package/dist/{accelerationChart-Q_Q_QlU7.js → accelerationChart-Dq5_6weP.js} +14 -14
  15. package/dist/{actionItem-BzMI_4-S.js → actionItem-BryBezOd.js} +2 -2
  16. package/dist/{actionItem-DB74CPi2.cjs → actionItem-JVOxJr61.cjs} +1 -1
  17. package/dist/{alarmLevelChart-CxmiBIKh.cjs → alarmLevelChart-C4_IhtlF.cjs} +1 -1
  18. package/dist/{alarmLevelChart-Bp3SLCMe.js → alarmLevelChart-DUysIMGJ.js} +2 -2
  19. package/dist/{alertTable-B1w_i0VB.cjs → alertTable-DWQGvAmY.cjs} +1 -1
  20. package/dist/{alertTable-DXzTm7mA.js → alertTable-nLYwM6ix.js} +2 -2
  21. package/dist/{aliasObjectSelectorDemo-Dfanalux.js → aliasObjectSelectorDemo-Cgnw6vkp.js} +1 -1
  22. package/dist/{aliasObjectSelectorDemo-CRuq8zju.cjs → aliasObjectSelectorDemo-DdAJ_krx.cjs} +1 -1
  23. package/dist/{annualRainfallChart-DEeyac7q.cjs → annualRainfallChart-BVoSl6rW.cjs} +1 -1
  24. package/dist/{annualRainfallChart-D4Rhc84p.js → annualRainfallChart-C4P7sAvp.js} +2 -2
  25. package/dist/{aqi-BzCTxj0q.js → aqi-BZTi1MAr.js} +2 -2
  26. package/dist/{aqi-CBknBfTF.cjs → aqi-jvYPQWm2.cjs} +1 -1
  27. package/dist/{aqiIndass-CUs24FxP.cjs → aqiIndass-C028TDT1.cjs} +1 -1
  28. package/dist/{aqiIndass-BJGsJsmz.js → aqiIndass-CZfEX0GU.js} +18 -18
  29. package/dist/{areaDeformCurve-bSAkB3Pt.js → areaDeformCurve-B0DUtSgh.js} +2 -2
  30. package/dist/{areaDeformCurve-B8VGdoKK.cjs → areaDeformCurve-BXhSeaoy.cjs} +1 -1
  31. package/dist/{arrayCard-BkD5sytz.js → arrayCard-BlEclzhU.js} +2 -2
  32. package/dist/{arrayCard-kh5WRweD.cjs → arrayCard-CH1c-fdy.cjs} +1 -1
  33. package/dist/{audio-BTrvZwCy.js → audio-DssRoD8a.js} +2 -2
  34. package/dist/{audio-DwJN2gca.cjs → audio-kCcoKcES.cjs} +1 -1
  35. package/dist/{bar-DYIb4143.js → bar-C19ODKbU.js} +2 -2
  36. package/dist/{bar-DsyyzcxB.cjs → bar-Dijd0sQu.cjs} +1 -1
  37. package/dist/{bmp-DbEyuBZw.cjs → bmp-Bxw4TwUB.cjs} +1 -1
  38. package/dist/{bmp-Dt3mSkAr.js → bmp-DUTgixKN.js} +2 -2
  39. package/dist/{box-D7RsK5Qp.js → box-B44mc692.js} +2 -2
  40. package/dist/{box--u3HQFj9.cjs → box-CeE915Ww.cjs} +1 -1
  41. package/dist/{chartConfigPanel-DybQRqg6.cjs → chartConfigPanel-0O_o7wlV.cjs} +1 -1
  42. package/dist/{chartConfigPanel-CD-csrX-.js → chartConfigPanel-w0x44bWL.js} +1 -1
  43. package/dist/circleBar-BJoBZfyx.js +310 -0
  44. package/dist/circleBar-CVYAERg4.cjs +4 -0
  45. package/dist/{clock-Cj0HsizY.js → clock-C5FWG3xy.js} +2 -2
  46. package/dist/{clock-Dc9jgxHT.cjs → clock-CFE1WkOQ.cjs} +1 -1
  47. package/dist/{clt-uJT1jgHk.js → clt-Cycf8W0K.js} +2 -2
  48. package/dist/{clt-CBbtQxMc.cjs → clt-DEzN6BGU.cjs} +1 -1
  49. package/dist/{cmc-JJ6eTxB3.js → cmc-C9PYd5ym.js} +2 -2
  50. package/dist/{cmc-CeTCKLBx.cjs → cmc-DR3T47y4.cjs} +1 -1
  51. package/dist/{cmp-CGZ_2BdE.cjs → cmp-DsKyXUHa.cjs} +1 -1
  52. package/dist/{cmp-D9qlHJoW.js → cmp-Dsc6RprW.js} +2 -2
  53. package/dist/{conclusionCard-BsLeh3yq.js → conclusionCard-BGUQzWMI.js} +2 -2
  54. package/dist/{conclusionCard-CwLwj3zj.cjs → conclusionCard-sUyiTSA6.cjs} +1 -1
  55. package/dist/{controlList-l2ZYM6m5.cjs → controlList-B6EasOKV.cjs} +1 -1
  56. package/dist/{controlList-CYNS0ArB.js → controlList-DeLBnY0K.js} +2 -2
  57. package/dist/{controlRecordList-N79_cTON.cjs → controlRecordList-D63e4vQn.cjs} +1 -1
  58. package/dist/{controlRecordList-BZmCvISO.js → controlRecordList-DCz4Xt9n.js} +2 -2
  59. package/dist/{controlRecordListAPP-aDj520mp.js → controlRecordListAPP-D0cUYXLY.js} +2 -2
  60. package/dist/{controlRecordListAPP-DOzMDV4x.cjs → controlRecordListAPP-pfRdnvv1.cjs} +1 -1
  61. package/dist/{crd-bm_BHuoV.js → crd-B4ZnlIJq.js} +2 -2
  62. package/dist/{crd-CV4kMUTB.cjs → crd-DRUEk13j.cjs} +1 -1
  63. package/dist/{ctrBtn-DYceHTAq.js → ctrBtn-5odXmYf7.js} +17 -17
  64. package/dist/{ctrBtn-Cs6ZmfyJ.cjs → ctrBtn-Bm79a5Sj.cjs} +1 -1
  65. package/dist/{ctrSet-B6PlTSBE.js → ctrSet-B1dpatKF.js} +33 -33
  66. package/dist/ctrSet-BMnG-OkK.cjs +1 -0
  67. package/dist/{ctrSwitch-B9lHJgQn.cjs → ctrSwitch-A9LVcYIN.cjs} +1 -1
  68. package/dist/{ctrSwitch-E0FM_4f2.js → ctrSwitch-C5aPCuez.js} +39 -39
  69. package/dist/{dataManagement-bKmkV2VY.cjs → dataManagement-8NQDTifq.cjs} +1 -1
  70. package/dist/{dataManagement-BAHa-OHl.js → dataManagement-Dqf-T0x4.js} +2 -2
  71. package/dist/{dataReport-B60Rb4sb.js → dataReport-CT4_ly92.js} +2 -2
  72. package/dist/{dataReport-JcrjpK_j.cjs → dataReport-CiB4XAKO.cjs} +1 -1
  73. package/dist/{dataTable-BmvewFlr.js → dataTable-BWc0XycI.js} +1 -1
  74. package/dist/{dataTable-CX6uktOu.cjs → dataTable-BiyK3INj.cjs} +1 -1
  75. package/dist/{datetime-BPM_lGiY.cjs → datetime-BVigJCWY.cjs} +1 -1
  76. package/dist/{datetime-DARBbZJx.js → datetime-Du0fBPZ3.js} +2 -2
  77. package/dist/{deepClusterSlipSurface-BF77Vp7G.js → deepClusterSlipSurface-BJBW_lMx.js} +2 -2
  78. package/dist/{deepClusterSlipSurface-IywdiDlA.cjs → deepClusterSlipSurface-Dh-nEUwt.cjs} +1 -1
  79. package/dist/{deepDataMatrix-sRXkGqdm.cjs → deepDataMatrix-CGCLKdVW.cjs} +1 -1
  80. package/dist/{deepDataMatrix--zgQoWer.js → deepDataMatrix-CMJMtqVu.js} +2 -2
  81. package/dist/{deepDisplacement3D-BYt49pzj.js → deepDisplacement3D-BdzBAOZZ.js} +2 -2
  82. package/dist/{deepDisplacement3D-BET8Ftuc.cjs → deepDisplacement3D-DcwFkrri.cjs} +1 -1
  83. package/dist/{deepDisplacementChart-BGBhipUx.js → deepDisplacementChart-Be9lxAWP.js} +25 -25
  84. package/dist/{deepDisplacementChart-D7loYUI5.cjs → deepDisplacementChart-Ct7iZvof.cjs} +1 -1
  85. package/dist/{deepDisplacementChart-B2zPpsk6.js → deepDisplacementChart-D_dq-XPI.js} +16 -16
  86. package/dist/{deepDisplacementChart-BuuM485C.cjs → deepDisplacementChart-EjGt1LJp.cjs} +1 -1
  87. package/dist/{deepDisplacementView-Bwk9p_Qc.js → deepDisplacementView-1eSVkmqk.js} +1 -1
  88. package/dist/{deepDisplacementView-CTBH3IxP.cjs → deepDisplacementView-VyO91qP0.cjs} +1 -1
  89. package/dist/{deepNodeTemperatureChart-BqTigCTs.js → deepNodeTemperatureChart-BUvEk5T9.js} +2 -2
  90. package/dist/{deepNodeTemperatureChart-CTLHLf0w.cjs → deepNodeTemperatureChart-DPnQPYKr.cjs} +1 -1
  91. package/dist/{deepTangentAngleChart-5oxzMpMF.js → deepTangentAngleChart-5mJOFDsK.js} +2 -2
  92. package/dist/{deepTangentAngleChart-CHxB8OFL.cjs → deepTangentAngleChart-hJHt5aoD.cjs} +1 -1
  93. package/dist/{deepTemperatureField-Cr6YbuR_.cjs → deepTemperatureField-BAS3omfm.cjs} +1 -1
  94. package/dist/{deepTemperatureField-Bhk89D3D.js → deepTemperatureField-DlrB4dKP.js} +3 -3
  95. package/dist/{deepTrendChart-CAbdVR8d.js → deepTrendChart-CLNAoy8P.js} +2 -2
  96. package/dist/{deepTrendChart-Ch94j4W9.cjs → deepTrendChart-DAM_Ds5z.cjs} +1 -1
  97. package/dist/{deviceOnlineStatus-C5ODwFsY.js → deviceOnlineStatus-1UHPkOr2.js} +2 -2
  98. package/dist/{deviceOnlineStatus-DxsTb4Vb.cjs → deviceOnlineStatus-D_oS1F9j.cjs} +1 -1
  99. package/dist/{deviceStatus-DPfOQCSX.js → deviceStatus-CcPjyhrB.js} +10 -10
  100. package/dist/{deviceStatus-CjFTpCaU.cjs → deviceStatus-DdFB86J7.cjs} +1 -1
  101. package/dist/{displacementDataTable-DG36VWok.js → displacementDataTable-B7x4ogcW.js} +9 -9
  102. package/dist/{displacementDataTable-BIqBEkul.cjs → displacementDataTable-NlqtVyYg.cjs} +1 -1
  103. package/dist/{displacementTrajectoryChart-DRltcPfa.cjs → displacementTrajectoryChart-BRy93sPt.cjs} +1 -1
  104. package/dist/{displacementTrajectoryChart-Cpmj24Jn.js → displacementTrajectoryChart-C10Uroic.js} +11 -11
  105. package/dist/{displacementTrendChart-DpD79zii.cjs → displacementTrendChart-B5NRRQzD.cjs} +1 -1
  106. package/dist/{displacementTrendChart-D1yfRFQb.js → displacementTrendChart-D-_Ls7J4.js} +11 -11
  107. package/dist/{dxf-C_9cH0WU.cjs → dxf-B7DB_30i.cjs} +1 -1
  108. package/dist/{dxf-zbCakRgh.js → dxf-CqFFtWRq.js} +2 -2
  109. package/dist/{dzc-CfPVaIgj.js → dzc-BjA7dXWS.js} +2 -2
  110. package/dist/{dzc-CejqHneE.cjs → dzc-DT6Chp2Q.cjs} +1 -1
  111. package/dist/{emergencyPlan-dEwML5xC.cjs → emergencyPlan-DkErPudJ.cjs} +1 -1
  112. package/dist/{emergencyPlan-LbeRH-P9.js → emergencyPlan-IJ0wIcFl.js} +3 -3
  113. package/dist/{evn-DsD_MKQd.js → evn-DeaQXEPO.js} +2 -2
  114. package/dist/{evn-BvgQ3o3T.cjs → evn-Dh71UuO9.cjs} +1 -1
  115. package/dist/{evolutionChart-B4C9qB3I.js → evolutionChart-C3oCrBf3.js} +3 -3
  116. package/dist/{evolutionChart-Dt5-xRsy.cjs → evolutionChart-C7Ae0ZiT.cjs} +1 -1
  117. package/dist/{fileViewer-B0LdLy2P.js → fileViewer-8Us72XkI.js} +2 -2
  118. package/dist/{fileViewer-DZIREgL0.cjs → fileViewer-ERPHU_Zd.cjs} +1 -1
  119. package/dist/{filterBar-D_jcuqwP.cjs → filterBar-CW7bn1-p.cjs} +1 -1
  120. package/dist/{filterBar-Bt6w4_xK.js → filterBar-D9xz6-NL.js} +2 -2
  121. package/dist/{fireCombustionCurve-CHRd1nSv.cjs → fireCombustionCurve-CqiMMU_8.cjs} +1 -1
  122. package/dist/{fireCombustionCurve-C2rWY89D.js → fireCombustionCurve-DIUwJpXU.js} +3 -3
  123. package/dist/{fireFilterBar-CpwHRisZ.js → fireFilterBar-BG-StguC.js} +2 -2
  124. package/dist/{fireFilterBar-DX8qH1rr.cjs → fireFilterBar-Beqb_Dns.cjs} +1 -1
  125. package/dist/{fireHistoryTable-B38M6w5w.cjs → fireHistoryTable-CRzrvuo8.cjs} +1 -1
  126. package/dist/{fireHistoryTable-DcSgHt5q.js → fireHistoryTable-ChqoTAYc.js} +2 -2
  127. package/dist/{gag-qDNPdFJu.cjs → gag-Bx9QvvT7.cjs} +1 -1
  128. package/dist/{gag-BErw_nsf.js → gag-Cf3zHBXx.js} +2 -2
  129. package/dist/{gasStationList-BREZbC_k.js → gasStationList--rmQJ0jp.js} +2 -2
  130. package/dist/{gasStationList-NhJa4GO6.cjs → gasStationList-BjyCsqqM.cjs} +1 -1
  131. package/dist/{geo3dViewer-D9uSt0up.cjs → geo3dViewer-Ch6d1IMg.cjs} +1 -1
  132. package/dist/{geo3dViewer-zAN1eIza.js → geo3dViewer-mDKnyJMa.js} +3 -3
  133. package/dist/{glbModel-C4FiDMM5.cjs → glbModel-DAofoZCs.cjs} +1 -1
  134. package/dist/{glbModel-i6HvK0m8.js → glbModel-aQXnlO7p.js} +2 -2
  135. package/dist/{globalObjectSelector-BrVwJEgp.js → globalObjectSelector-AF67vBmT.js} +1 -1
  136. package/dist/{globalObjectSelector-CR74psMa.cjs → globalObjectSelector-C2t3Jtm6.cjs} +1 -1
  137. package/dist/{gnssFilterBar-BkfBQWXF.cjs → gnssFilterBar-4JNWA-CR.cjs} +1 -1
  138. package/dist/{gnssFilterBar-BEHXIIKI.js → gnssFilterBar-BgpevrmL.js} +2 -2
  139. package/dist/{gnssHistoryTable-DDWGE_ge.js → gnssHistoryTable-De2cn5dP.js} +2 -2
  140. package/dist/{gnssHistoryTable-CQ-7ESYj.cjs → gnssHistoryTable-xnzV8l_Q.cjs} +1 -1
  141. package/dist/{gnssMapView-C9iRAzym.js → gnssMapView-C9IqBqEw.js} +4 -4
  142. package/dist/{gnssMapView-P6ed3l_W.cjs → gnssMapView-D9V5XNlw.cjs} +2 -2
  143. package/dist/{gnssSectionProfile-CIZnF7VA.cjs → gnssSectionProfile-CxXhhOCd.cjs} +1 -1
  144. package/dist/{gnssSectionProfile-BIqyABEf.js → gnssSectionProfile-HfiKe0-s.js} +2 -2
  145. package/dist/{gnssTimeSeriesChart-BgIM5U-H.cjs → gnssTimeSeriesChart-C4onoU3C.cjs} +1 -1
  146. package/dist/{gnssTimeSeriesChart-DqH9JFBF.js → gnssTimeSeriesChart-CvoTHHqa.js} +2 -2
  147. package/dist/{gnssXYTrajectory-CH8864n6.cjs → gnssXYTrajectory-Dug2OwRw.cjs} +1 -1
  148. package/dist/{gnssXYTrajectory-BviUjxG9.js → gnssXYTrajectory-g_pRuL75.js} +2 -2
  149. package/dist/{grd-BhpBxrpa.cjs → grd-CYg3e2B0.cjs} +1 -1
  150. package/dist/{grd-DfkGlcW6.js → grd-DqKnlgw_.js} +20 -20
  151. package/dist/{grdIndass-ByznFwzc.js → grdIndass-CUE7Gb-W.js} +2 -2
  152. package/dist/{grdIndass-DhMfHz31.cjs → grdIndass-D3wFyDpD.cjs} +1 -1
  153. package/dist/{grg-CVBoetQY.js → grg-BpNY4dsd.js} +6 -6
  154. package/dist/{grg-uzBlEm_K.cjs → grg-Cu7muu3_.cjs} +1 -1
  155. package/dist/{gridview-Dt3i1t5d.js → gridview-BLabvs9I.js} +2 -2
  156. package/dist/{gridview-CyXCqWKq.cjs → gridview-BUsfJz0o.cjs} +1 -1
  157. package/dist/{groundwaterFilterBar-BbS81e9a.js → groundwaterFilterBar-BQFayVwl.js} +2 -2
  158. package/dist/{groundwaterFilterBar-C4xCPqa_.cjs → groundwaterFilterBar-f9qXTkoQ.cjs} +1 -1
  159. package/dist/{groundwaterProfileChart-DvjFvCm5.cjs → groundwaterProfileChart-AN7OLcKv.cjs} +2 -2
  160. package/dist/{groundwaterProfileChart-BBPFrt5W.js → groundwaterProfileChart-pVEgD-ec.js} +3 -3
  161. package/dist/{groundwaterTimeCurve-Cb3xlM78.cjs → groundwaterTimeCurve-BoJnmOYq.cjs} +1 -1
  162. package/dist/{groundwaterTimeCurve-CKlvc2nQ.js → groundwaterTimeCurve-DRoycHDe.js} +3 -3
  163. package/dist/{groupCard-BVdjzdqF.cjs → groupCard-Dq6TXOZt.cjs} +1 -1
  164. package/dist/{groupCard-BBzDl9uX.js → groupCard-fPMXeW8L.js} +2 -2
  165. package/dist/{headerBar-B5Z8UviF.cjs → headerBar-Da-XmgLi.cjs} +1 -1
  166. package/dist/{headerBar-Dty08mHR.js → headerBar-ap2M954P.js} +2 -2
  167. package/dist/{history-yI8XiwXi.cjs → history-3PgmioqY.cjs} +1 -1
  168. package/dist/{history-TkSKA8F1.js → history-BC8RESyu.js} +1 -1
  169. package/dist/{index-YNdVib_6.js → index-CqVPeq0-.js} +455 -453
  170. package/dist/index-OgmTZiO-.cjs +612 -0
  171. package/dist/{insarDeformChart-C9UkWIL9.js → insarDeformChart-CKBcUJCV.js} +2 -2
  172. package/dist/{insarDeformChart-Dr9Ve1vY.cjs → insarDeformChart-DABg6b8J.cjs} +1 -1
  173. package/dist/{insarImageViewer-DAKBn2vV.cjs → insarImageViewer-9FpJDh1K.cjs} +1 -1
  174. package/dist/{insarImageViewer-DZbq2xch.js → insarImageViewer-C1XBU0YL.js} +2 -2
  175. package/dist/{kds-BkH8cJCu.cjs → kds-B04fJsat.cjs} +1 -1
  176. package/dist/{kds-__I8-o5i.js → kds-D6TYb16w.js} +21 -21
  177. package/dist/{kpiCard-fRfv1QPb.cjs → kpiCard-Bfi2W9cH.cjs} +1 -1
  178. package/dist/{kpiCard-BzuF0qdE.js → kpiCard-D5S1M8Rs.js} +2 -2
  179. package/dist/{landslideMap-zD8SU2Lh.cjs → landslideMap-CWmIK6ca.cjs} +1 -1
  180. package/dist/{landslideMap-D84pku4Y.js → landslideMap-DXyIahAi.js} +3 -3
  181. package/dist/{landslideWarning-Cq-di-hN.cjs → landslideWarning-CPwRDf3u.cjs} +1 -1
  182. package/dist/{landslideWarning-0mckvEoZ.js → landslideWarning-DaI_F3dC.js} +5 -5
  183. package/dist/{layerTabs-COzqQ9mn.js → layerTabs-DJaWhtYa.js} +2 -2
  184. package/dist/{layerTabs-C2zq6a5M.cjs → layerTabs-DfVZUJvC.cjs} +1 -1
  185. package/dist/{leaflet-src-2tPn7QVH.js → leaflet-src-DU74PJcX.js} +1 -1
  186. package/dist/{leaflet-src-D8MF2j44.cjs → leaflet-src-gpxoqh6Y.cjs} +1 -1
  187. package/dist/{lerc-BHcVhBOn.cjs → lerc-ACN_ZV5f.cjs} +1 -1
  188. package/dist/{lerc-BCmG0CMS.js → lerc-ZmeF7NhV.js} +2 -2
  189. package/dist/{lin-niA_T9Ql.cjs → lin-BqSPUdmV.cjs} +1 -1
  190. package/dist/{lin-CQ6TCBCr.js → lin-DXM61jXV.js} +2 -2
  191. package/dist/{linIndass-J9rdji6E.js → linIndass-DQZjD3lL.js} +12 -12
  192. package/dist/{linIndass-nZx16Vos.cjs → linIndass-jqzXVoXv.cjs} +1 -1
  193. package/dist/{lst-DieyrYCh.js → lst-Bpf41jqR.js} +2 -2
  194. package/dist/{lst-Cw1XCAv0.cjs → lst-C9RrqCgo.cjs} +1 -1
  195. package/dist/{manualEntry-CCmyPMJm.js → manualEntry-BvKEwOnY.js} +2 -2
  196. package/dist/{manualEntry-ChhTpAF2.cjs → manualEntry-wG0RcQYe.cjs} +1 -1
  197. package/dist/{mapBackground-BzOdjhnZ.cjs → mapBackground-DOsGw2Dh.cjs} +1 -1
  198. package/dist/{mapBackground-CiiG2nHi.js → mapBackground-DxQdqWM2.js} +3 -3
  199. package/dist/{mappingList-CoBD8D27.js → mappingList-BRpK5eX_.js} +2 -2
  200. package/dist/{mappingList-D42mILiq.cjs → mappingList-C7qyzN6o.cjs} +1 -1
  201. package/dist/{markdownViewer-C3HUXDvf.js → markdownViewer-CZVNZ8jN.js} +2 -2
  202. package/dist/{markdownViewer-DHs9ekCh.cjs → markdownViewer-C_TA7AX-.cjs} +1 -1
  203. package/dist/{mix-control-modal-BEwriuWS.js → mix-control-modal-DITf1VAp.js} +1 -1
  204. package/dist/{mix-control-modal-DGd2S6Jd.cjs → mix-control-modal-DjG-ChQu.cjs} +1 -1
  205. package/dist/{mixGrid-Cnq99D09.cjs → mixGrid-Zk7NKpBw.cjs} +1 -1
  206. package/dist/{mixGrid-CBenxHD_.js → mixGrid-mbFlywYp.js} +2 -2
  207. package/dist/mixdashboards.cjs +1 -1
  208. package/dist/mixdashboards.css +1 -1
  209. package/dist/mixdashboards.js +1 -1
  210. package/dist/{mixiotObjectListApi-e1qL7PHh.cjs → mixiotObjectListApi-CRPxZbIS.cjs} +1 -1
  211. package/dist/{mixiotObjectListApi-CKJLXcnf.js → mixiotObjectListApi-cTDvF31d.js} +1 -1
  212. package/dist/{mjpegCamera-D8lB701i.js → mjpegCamera-B3m55jok.js} +2 -2
  213. package/dist/{mjpegCamera-DDFrZo-x.cjs → mjpegCamera-Da5NZX0r.cjs} +1 -1
  214. package/dist/{monitorAlert-C-mo-lDe.cjs → monitorAlert-BqUYN_BF.cjs} +1 -1
  215. package/dist/{monitorAlert-Z1dFDfPh.js → monitorAlert-sn_3TrGJ.js} +9 -9
  216. package/dist/{monitorData-CNRfV5Wt.cjs → monitorData-B-dcmDx3.cjs} +1 -1
  217. package/dist/{monitorData-DZhO9Gos.js → monitorData-RhTZn3fI.js} +11 -11
  218. package/dist/{monitorSpeedChart-DrRdMdGD.cjs → monitorSpeedChart-_L0zgWxs.cjs} +1 -1
  219. package/dist/{monitorSpeedChart-C5pN46lO.js → monitorSpeedChart-uWpHlkZd.js} +1 -1
  220. package/dist/{mxa-COpw24fq.cjs → mxa-BNnKgDyq.cjs} +1 -1
  221. package/dist/{mxa-BFQ70ksk.js → mxa-ClEVeLaa.js} +2 -2
  222. package/dist/{myValue-Eb3asTOC.cjs → myValue-DoBpTp1-.cjs} +1 -1
  223. package/dist/{myValue-Dosl4Ro5.js → myValue-Drhoqp_w.js} +2 -2
  224. package/dist/{myValueList-mcqRZanE.cjs → myValueList-BT6mKnwJ.cjs} +1 -1
  225. package/dist/{myValueList-Dkc10vr6.js → myValueList-BfIDIHUe.js} +2 -2
  226. package/dist/{objectList-FWkZ6PAs.js → objectList-CATv4N0g.js} +3 -3
  227. package/dist/{objectList-D4owr3ED.cjs → objectList-CM1T-IQo.cjs} +1 -1
  228. package/dist/{objectListAPP-CdfeZTgm.js → objectListAPP-BG9iL6S_.js} +3 -3
  229. package/dist/{objectListAPP-Bzevu1od.cjs → objectListAPP-lNp3RQsA.cjs} +1 -1
  230. package/dist/percentBar-BOQp427o.js +369 -0
  231. package/dist/percentBar-By73saGo.cjs +5 -0
  232. package/dist/{photo-Dmxxqgrg.cjs → photo-CFomIdjq.cjs} +1 -1
  233. package/dist/{photo-DxXTYq73.js → photo-N8uk9UzU.js} +2 -2
  234. package/dist/{pie-BxpiCEYe.cjs → pie-BzkMCV5O.cjs} +1 -1
  235. package/dist/{pie-COixdWUz.js → pie-DuWuL4rb.js} +2 -2
  236. package/dist/{placeholder-Ole-Or58.cjs → placeholder-B9T7qNoD.cjs} +1 -1
  237. package/dist/{placeholder-CLLNLxRC.js → placeholder-DI_zsp-O.js} +1 -1
  238. package/dist/{pressBtn-DwKg9PbD.cjs → pressBtn-B_D3cFPd.cjs} +1 -1
  239. package/dist/{pressBtn-C7Y-B8Dz.js → pressBtn-D-j1_nDJ.js} +38 -38
  240. package/dist/{processTable-CTkwZWWJ.js → processTable-B-X05x32.js} +2 -2
  241. package/dist/{processTable-DDcKkjJx.cjs → processTable-B5WzGKQr.cjs} +1 -1
  242. package/dist/{progressBar-7qHg67Sf.cjs → progressBar-19d-9U9p.cjs} +1 -1
  243. package/dist/{progressBar-9npgJ9jD.js → progressBar-F61-3H3E.js} +2 -2
  244. package/dist/{progressCircle-DP08TX08.js → progressCircle-Dp4XWdE0.js} +2 -2
  245. package/dist/{progressCircle-Xgjnl1KF.cjs → progressCircle-RZ36ttud.cjs} +1 -1
  246. package/dist/{qrcode-D6wDMo-f.cjs → qrcode-D8C5cFka.cjs} +1 -1
  247. package/dist/{qrcode-ClTSNzEN.js → qrcode-PeEXEcDd.js} +2 -2
  248. package/dist/{raceBar-CTmsN8VC.js → raceBar-BnkzNqH0.js} +2 -2
  249. package/dist/{raceBar-C8mVFHnd.cjs → raceBar-DuCYwMoq.cjs} +1 -1
  250. package/dist/{rad-DWCSD35t.js → rad-BdQ-1k0K.js} +66 -56
  251. package/dist/{rad-Dxaakm82.cjs → rad-DND2sEzm.cjs} +1 -1
  252. package/dist/{radarMapViewer-eEBE3MS-.js → radarMapViewer-BUT7ZD47.js} +2 -2
  253. package/dist/{radarMapViewer-U7IQJjQs.cjs → radarMapViewer-BtwXLg65.cjs} +1 -1
  254. package/dist/{rainfallFilterBar-DJTDGu7Z.js → rainfallFilterBar-0IX3rYUD.js} +2 -2
  255. package/dist/{rainfallFilterBar-ow_wdOwq.cjs → rainfallFilterBar-BVD1fsJF.cjs} +1 -1
  256. package/dist/{rainfallTimeCurve-CwGmJhxu.js → rainfallTimeCurve-BIt0Ax0l.js} +3 -3
  257. package/dist/{rainfallTimeCurve-BL1I5Z2D.cjs → rainfallTimeCurve-DvYAvU9a.cjs} +1 -1
  258. package/dist/{rangeLin-BqcJpIva.js → rangeLin-BpAilzGc.js} +2 -2
  259. package/dist/{rangeLin-BEz9xapa.cjs → rangeLin-DKjgf_Ab.cjs} +1 -1
  260. package/dist/{realtimeEvolutionMap-NOkyU7G3.js → realtimeEvolutionMap-5rOyArZq.js} +2 -2
  261. package/dist/{realtimeEvolutionMap-mzXlR8gS.cjs → realtimeEvolutionMap-Feks0bxX.cjs} +1 -1
  262. package/dist/{regionBar-DDk-2UWS.js → regionBar-D2if9Cyv.js} +2 -2
  263. package/dist/{regionBar-CEfz0Yol.cjs → regionBar-oWO1HZta.cjs} +1 -1
  264. package/dist/{request-BIXfJXjX.js → request-BAa7KXPI.js} +1 -1
  265. package/dist/{request-BfG3yDz6.cjs → request-DRttaVjf.cjs} +1 -1
  266. package/dist/{retainer1-Cz5rXIJj.js → retainer1-Bz3hKsxS.js} +3 -3
  267. package/dist/{retainer1-Ch1oZMeA.cjs → retainer1-CA3lV3eb.cjs} +1 -1
  268. package/dist/{retainer2-DJ1R2GJE.cjs → retainer2-BnfP4WPr.cjs} +1 -1
  269. package/dist/{retainer2-DeelXgAZ.js → retainer2-UsoVsRXo.js} +3 -3
  270. package/dist/{retainerRecordList-DyhfjtfF.js → retainerRecordList-DbXRpaHy.js} +2 -2
  271. package/dist/{retainerRecordList-D3MsCnqy.cjs → retainerRecordList-jkXbz9xr.cjs} +1 -1
  272. package/dist/{retainerRecordListAPP-B_hCyRak.cjs → retainerRecordListAPP-CS4s1t0e.cjs} +1 -1
  273. package/dist/{retainerRecordListAPP-3Gr7db3D.js → retainerRecordListAPP-DI4f5Q6f.js} +2 -2
  274. package/dist/{ringTopN-fLinQVwX.cjs → ringTopN-BBryDUi9.cjs} +1 -1
  275. package/dist/{ringTopN-t9xaVCWg.js → ringTopN-BCZhDz0U.js} +2 -2
  276. package/dist/{riskRegionTable-CagcISBC.cjs → riskRegionTable-DtG9zTy5.cjs} +1 -1
  277. package/dist/{riskRegionTable-BThwQbTf.js → riskRegionTable-Dw573XX4.js} +2 -2
  278. package/dist/{sankey-BY_nwThw.cjs → sankey-BNmzRTH5.cjs} +1 -1
  279. package/dist/{sankey-Bwm0omQr.js → sankey-DHbOEbzP.js} +2 -2
  280. package/dist/{scd-DeYC1Rqx.js → scd-CNcTAStO.js} +2 -2
  281. package/dist/{scd-Bs1dG1w8.cjs → scd-Cf68XDF5.cjs} +1 -1
  282. package/dist/{sideMenu-CAEh3bwF.cjs → sideMenu-BW8ddV-x.cjs} +1 -1
  283. package/dist/{sideMenu-Db_Nc_xz.js → sideMenu-DKAAQcWF.js} +2 -2
  284. package/dist/{slopeStability-CVC68Qcj.js → slopeStability-Ds4exWb_.js} +10 -10
  285. package/dist/{slopeStability-BWg6jhBB.cjs → slopeStability-eVwuAmlY.cjs} +1 -1
  286. package/dist/{speedCurve-CK4CXHeC.js → speedCurve-B_j8P273.js} +2 -2
  287. package/dist/{speedCurve-DNNEIz4o.cjs → speedCurve-PtxSVJ8J.cjs} +1 -1
  288. package/dist/stackedBar-CC0JmrlS.cjs +2 -0
  289. package/dist/stackedBar-uMr9A877.js +325 -0
  290. package/dist/{stressFilterBar-DQ8nq8jV.js → stressFilterBar-B02kr6zY.js} +2 -2
  291. package/dist/{stressFilterBar-Cigl3IyR.cjs → stressFilterBar-Dh4fWQ90.cjs} +1 -1
  292. package/dist/{stressTimeCurve-BiduKfcg.cjs → stressTimeCurve-6eALY4dC.cjs} +1 -1
  293. package/dist/{stressTimeCurve-BEANw1F8.js → stressTimeCurve-D_Rc1PAY.js} +3 -3
  294. package/dist/{swiper-BgkvIN5U.js → swiper-BsAeDuw3.js} +2 -2
  295. package/dist/{swiper-MIRXMnxk.cjs → swiper-CMP_sa_i.cjs} +1 -1
  296. package/dist/{terminalConfigList-B3lqvQel.js → terminalConfigList-BjbgbZHU.js} +2 -2
  297. package/dist/{terminalConfigList-C3zRbQvM.cjs → terminalConfigList-C83kqf7d.cjs} +1 -1
  298. package/dist/{terminalList-ArxJ1jdO.cjs → terminalList-BnitlFL5.cjs} +1 -1
  299. package/dist/{terminalList-BevfdySj.js → terminalList-DPOBOIu3.js} +2 -2
  300. package/dist/{terminalListAPP-Cs0nnBfc.cjs → terminalListAPP-CSYL2-0G.cjs} +1 -1
  301. package/dist/{terminalListAPP-CbpVft_s.js → terminalListAPP-DI6ePX4Y.js} +2 -2
  302. package/dist/{textbox-CjkfmdaO.js → textbox-Dk4Q0jq3.js} +2 -2
  303. package/dist/{textbox-DC9YLTn5.cjs → textbox-OEvn1Q-J.cjs} +1 -1
  304. package/dist/{timeQueryBar-B69eldHQ.cjs → timeQueryBar-Bnqyhyy7.cjs} +1 -1
  305. package/dist/{timeQueryBar-CXd9yNgD.js → timeQueryBar-CoFozltp.js} +1 -1
  306. package/dist/{timeSeries-CLnLd-gX.js → timeSeries-BYWoWCYY.js} +3 -3
  307. package/dist/{timeSeries-fB14CgRy.cjs → timeSeries-Dw-90k-1.cjs} +1 -1
  308. package/dist/{timeSeriesCurve-DOaxDpjr.cjs → timeSeriesCurve-BkdQ_KeE.cjs} +1 -1
  309. package/dist/{timeSeriesCurve-CMcCzR13.js → timeSeriesCurve-iPezzxLC.js} +3 -3
  310. package/dist/{toggleBtn-BiUyrx_o.cjs → toggleBtn-BC4vsMGo.cjs} +1 -1
  311. package/dist/{toggleBtn-CWmuTxSD.js → toggleBtn-CAXFfijH.js} +2 -2
  312. package/dist/{trajectoryConfigPanel-D7IDlQIH.cjs → trajectoryConfigPanel-BXpItzqc.cjs} +1 -1
  313. package/dist/{trajectoryConfigPanel-DKLN3KY5.js → trajectoryConfigPanel-DlN8AZFo.js} +1 -1
  314. package/dist/{trajectoryScatter-TEactc8J.js → trajectoryScatter-CxDHL1um.js} +2 -2
  315. package/dist/{trajectoryScatter-CL-2FKZe.cjs → trajectoryScatter-_1LoFjV7.cjs} +1 -1
  316. package/dist/{universalConfigPanel-B8JIiLXp.cjs → universalConfigPanel-B6jchzUf.cjs} +1 -1
  317. package/dist/{universalConfigPanel-wicv4Ypw.js → universalConfigPanel-BlDmNWc0.js} +1 -1
  318. package/dist/{universalTable-BlTdL3c0.cjs → universalTable-C-oWFP8u.cjs} +1 -1
  319. package/dist/{universalTable-8e3LrZvD.js → universalTable-DbqMwXuL.js} +2 -2
  320. package/dist/{video-DpRcCZZQ.js → video-DHJ-flUN.js} +2 -2
  321. package/dist/{video-nPkrKQyL.cjs → video-HxDzMY56.cjs} +1 -1
  322. package/dist/{videoMonitor-DOVw5mE0.cjs → videoMonitor-CGlM7hRf.cjs} +1 -1
  323. package/dist/{videoMonitor-Z_7cZk5Y.js → videoMonitor-Golf73FP.js} +9 -9
  324. package/dist/{vlu-BQCrHSlq.js → vlu-Wd6itaBz.js} +2 -2
  325. package/dist/{vlu-DEIgGiO-.cjs → vlu-ZFZU2wAQ.cjs} +1 -1
  326. package/dist/{warningOverview-DXJNk5bT.cjs → warningOverview-BkDN-4f-.cjs} +1 -1
  327. package/dist/{warningOverview-C7J5aXTJ.js → warningOverview-DuBMKv_H.js} +3 -3
  328. package/dist/{weather-C1sjTcwC.js → weather-BRKZBZR9.js} +2 -2
  329. package/dist/{weather-B1Pfcn75.cjs → weather-C_9Xmi0b.cjs} +1 -1
  330. package/dist/{windLin-QKZKJ1h_.cjs → windLin-6KfyL12C.cjs} +1 -1
  331. package/dist/{windLin-vlM63Hu7.js → windLin-DCZqaY1W.js} +2 -2
  332. package/package.json +1 -1
  333. package/dist/circleBar-4md65KCX.js +0 -305
  334. package/dist/circleBar-DJY37bwB.cjs +0 -5
  335. package/dist/ctrSet-XqnGgYPn.cjs +0 -1
  336. package/dist/index-6QhTSPkL.cjs +0 -612
@@ -0,0 +1,369 @@
1
+ var W = Object.defineProperty, V = Object.defineProperties;
2
+ var R = Object.getOwnPropertyDescriptors;
3
+ var N = Object.getOwnPropertySymbols;
4
+ var X = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
+ var P = (p, a, d) => a in p ? W(p, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : p[a] = d, A = (p, a) => {
6
+ for (var d in a || (a = {}))
7
+ X.call(a, d) && P(p, d, a[d]);
8
+ if (N)
9
+ for (var d of N(a))
10
+ M.call(a, d) && P(p, d, a[d]);
11
+ return p;
12
+ }, _ = (p, a) => V(p, R(a));
13
+ import { defineComponent as H, onMounted as q, onUnmounted as G, computed as K, openBlock as J, createElementBlock as Q, normalizeStyle as T, unref as F, createElementVNode as O, toDisplayString as Y, renderSlot as Z } from "vue";
14
+ import { D as tt, l as et, u as it, n as ot, C as B, o as st, s as I, q as at, _ as nt } from "./index-CqVPeq0-.js";
15
+ import "element-plus";
16
+ import { E as rt } from "./EChartComponentBase-B-VNAC8K.js";
17
+ import { g as lt } from "./titleStyle-BT5GlpAb.js";
18
+ import { u as ct, i as dt, a as ht } from "./installCanvasRenderer-oDYkyVFy.js";
19
+ import { i as pt } from "./install-DdM8j5Ll.js";
20
+ import { i as ut } from "./install-CEl1AYgZ.js";
21
+ import { i as ft } from "./install-DbAuuRVv.js";
22
+ import { i as mt } from "./install-CqrIgcb1.js";
23
+ const gt = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3c/svg%3e", xt = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3c/svg%3e", yt = { class: "mix-body" }, St = ["id"], bt = {
24
+ DEFAULT_ICON: gt,
25
+ ACTIVE_ICON: xt,
26
+ NAME_CN: "百分比堆积柱状图",
27
+ NAME_EN: "Percent Stacked Bar Chart",
28
+ ORDER: 3,
29
+ PLATFORM: ["pc", "screen", "mobile"]
30
+ }, Ct = {
31
+ titleColor: "#111",
32
+ // color
33
+ textColor: "#111",
34
+ // color
35
+ bgColor: "#fff",
36
+ // color
37
+ top: 30,
38
+ // number
39
+ bottom: 40,
40
+ left: 40,
41
+ right: 20,
42
+ radiusSize: 8,
43
+ textSize: 12,
44
+ barWidth: 30,
45
+ points: 10,
46
+ isHideTitle: !1,
47
+ // checkbox
48
+ showLabel: !1,
49
+ titleAlign: "left",
50
+ titleWeight: "bold",
51
+ titleBgColor: "transparent",
52
+ titleBorderType: "none",
53
+ titleBorderColor: "#cccccc",
54
+ titleBorderWidth: 1,
55
+ titlePaddingH: 8,
56
+ titlePaddingV: 4
57
+ }, Ft = [
58
+ {
59
+ name: "参数一",
60
+ fv: "",
61
+ object_id: "",
62
+ color: "#4162ff",
63
+ periodUnit: "near-hour",
64
+ periodValue: 1
65
+ },
66
+ {
67
+ name: "参数二",
68
+ fv: "",
69
+ object_id: "",
70
+ color: "#3bbc6a",
71
+ periodUnit: "near-hour",
72
+ periodValue: 1
73
+ }
74
+ ], vt = [
75
+ "name",
76
+ "fv",
77
+ "object_id",
78
+ "color",
79
+ {
80
+ key: "periodUnit",
81
+ label: "setting.timeUnit",
82
+ type: "select",
83
+ options: tt
84
+ },
85
+ { key: "periodValue", label: "setting.timePeriod", type: "number" }
86
+ ], wt = ["mosaic", "statistics", "calculate"], At = {
87
+ source: "mosaic",
88
+ useAlias: !1,
89
+ multiObject: !1,
90
+ null: { type: "0", value: "" }
91
+ }, _t = {
92
+ DEFAULT: bt,
93
+ OPTIONS: Ct,
94
+ DATA: Ft,
95
+ PARAMS: vt,
96
+ SOURCE: wt,
97
+ COMMON: At
98
+ }, Ot = /* @__PURE__ */ H(_(A({}, _t), {
99
+ __name: "percentBar",
100
+ props: {
101
+ conf: { type: Object, default: () => ({ data: [] }) },
102
+ uid: { type: String, default: "" },
103
+ mode: { type: String, default: "edit" },
104
+ theme: { type: String, default: "light" }
105
+ },
106
+ setup(p) {
107
+ ct([
108
+ pt,
109
+ ut,
110
+ dt,
111
+ ft,
112
+ ht,
113
+ mt
114
+ ]);
115
+ const a = p, d = et();
116
+ class $ extends rt {
117
+ // 提取样式
118
+ extractStyles() {
119
+ return _(A({}, super.extractStyles()), {
120
+ barWidth: this.getOptionValue("barWidth", 30),
121
+ showLabel: this.getOptionValue("showLabel", !1)
122
+ });
123
+ }
124
+ // 获取 X 轴数据
125
+ getXAxisData() {
126
+ var t;
127
+ return (t = this.getFixedStatisticsXLabels()) != null ? t : this.getTimeAxis();
128
+ }
129
+ /** 统计/计算且非 near 时返回固定类目轴刻度;否则返回 null */
130
+ getFixedStatisticsXLabels() {
131
+ var i;
132
+ const { data: t, common: e } = this.props.conf, n = (e == null ? void 0 : e.source) || "mosaic", o = (i = t[0]) == null ? void 0 : i.periodUnit;
133
+ return ["statistics", "calculate"].includes(n) && o && !String(o).startsWith("near") ? ot(o) : null;
134
+ }
135
+ // 计算百分比数据(每个类目下各系列值占总值的百分比)
136
+ calcPercentData(t) {
137
+ if (!t.length || !t[0].length) return t;
138
+ const e = t[0].length, n = t.map(() => []);
139
+ for (let o = 0; o < e; o++) {
140
+ let i = 0;
141
+ for (let s = 0; s < t.length; s++)
142
+ i += t[s][o] || 0;
143
+ for (let s = 0; s < t.length; s++)
144
+ n[s][o] = i > 0 ? parseFloat(((t[s][o] || 0) / i * 100).toFixed(1)) : 0;
145
+ }
146
+ return n;
147
+ }
148
+ // 获取 ECharts option
149
+ getChartOption() {
150
+ const t = this.Style.value;
151
+ return {
152
+ tooltip: {
153
+ trigger: "axis",
154
+ axisPointer: { type: "shadow" },
155
+ formatter: (e) => {
156
+ if (!(e != null && e.length)) return "";
157
+ let n = `<div>${e[0].axisValue}</div>`, o = 0;
158
+ return e.forEach((i) => {
159
+ o += i.value || 0;
160
+ }), e.forEach((i) => {
161
+ const s = o > 0 ? ((i.value || 0) / o * 100).toFixed(1) : "0.0";
162
+ n += `<div style="display:flex;align-items:center;gap:4px;">
163
+ <span style="display:inline-block;width:10px;height:10px;border-radius:2px;background:${i.color};"></span>
164
+ ${i.seriesName}: ${s}%
165
+ </div>`;
166
+ }), n;
167
+ },
168
+ textStyle: { align: "left", fontSize: t.textSize }
169
+ },
170
+ grid: {
171
+ top: t.top,
172
+ bottom: t.bottom,
173
+ left: t.left,
174
+ right: t.right,
175
+ containLabel: !1
176
+ },
177
+ legend: {
178
+ show: !0,
179
+ data: this.props.conf.data.map((e) => e.name),
180
+ right: 20,
181
+ top: 0,
182
+ textStyle: { color: t.textColor, fontSize: t.textSize }
183
+ },
184
+ xAxis: [
185
+ {
186
+ type: "category",
187
+ data: this.getXAxisData(),
188
+ axisTick: { alignWithLabel: !0 },
189
+ axisLine: { lineStyle: { color: t.textColor } },
190
+ axisLabel: {
191
+ formatter: (e) => {
192
+ if (!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(e))
193
+ return e;
194
+ const [n, o] = e.split(" ");
195
+ return `${n}
196
+ ${o}`;
197
+ },
198
+ color: t.textColor,
199
+ fontSize: t.textSize
200
+ }
201
+ }
202
+ ],
203
+ yAxis: [
204
+ {
205
+ type: "value",
206
+ max: 100,
207
+ nameGap: 10,
208
+ nameTextStyle: { align: "right" },
209
+ splitLine: { lineStyle: { type: "dashed", color: "#e5e5e5" } },
210
+ axisLabel: {
211
+ color: t.textColor,
212
+ fontSize: t.textSize,
213
+ formatter: "{value}%"
214
+ },
215
+ axisLine: { lineStyle: { color: t.textColor } },
216
+ splitNumber: 4
217
+ }
218
+ ],
219
+ series: this.formatSeries()
220
+ };
221
+ }
222
+ // 格式化 Series(使用 stack 属性 + 百分比数据)
223
+ formatSeries() {
224
+ const t = this.props.conf, e = this.Style.value, n = this.getFixedStatisticsXLabels(), o = n ? n.length : e.points, i = t.data.map((u, h) => (u.color || B[h], st({
225
+ num: o,
226
+ max: 200,
227
+ min: 0,
228
+ mode: this.props.mode,
229
+ hasDataSource: this.hasData()
230
+ }))), s = this.calcPercentData(i);
231
+ return t.data.map((u, h) => {
232
+ const r = u.color || B[h];
233
+ return {
234
+ type: "bar",
235
+ stack: "total",
236
+ data: s[h],
237
+ name: u.name,
238
+ itemStyle: { color: r },
239
+ label: {
240
+ show: e.showLabel,
241
+ position: "inside",
242
+ color: "#fff",
243
+ formatter: (c) => c.value + "%"
244
+ },
245
+ barWidth: e.barWidth + "%"
246
+ };
247
+ });
248
+ }
249
+ // 设置实时数据
250
+ setSocketData(t) {
251
+ var x;
252
+ if (!this.hasData() || !this.chartObj || !t) return;
253
+ const { data: e, common: n } = this.props.conf, o = n.source || "mosaic", i = this.chartObj.getOption(), s = (x = e[0]) == null ? void 0 : x.periodUnit, u = ["statistics", "calculate"].includes(o) && s && !String(s).startsWith("near");
254
+ if (e.forEach((l, f) => {
255
+ const m = this.extractDataValue(t, l.fv);
256
+ if (["statistics", "calculate"].includes(o) && l.periodUnit && !String(l.periodUnit).startsWith("near") && !String(l.periodUnit).startsWith("last")) {
257
+ const v = I(
258
+ t.start_time,
259
+ l.periodUnit
260
+ ), C = v ? i.xAxis[0].data.indexOf(v) : -1;
261
+ C >= 0 && (i.series[f].data[C] = m);
262
+ return;
263
+ }
264
+ const y = ["statistics", "calculate"].includes(o) ? t.start_time : t.datetime;
265
+ y != null && (f === 0 && i.xAxis[0].data.push(y), i.series[f].data.push(m));
266
+ }), u) {
267
+ const l = i.series.map((m) => [...m.data]), f = this.calcPercentData(l);
268
+ i.series.forEach((m, y) => {
269
+ m.data = f[y];
270
+ }), this.updateChart(i);
271
+ return;
272
+ }
273
+ const h = at(
274
+ i.xAxis[0].data,
275
+ i.series.map((l) => l.data)
276
+ ), r = Number(this.Style.value.points) || 10;
277
+ i.xAxis[0].data = h.times.slice(-r);
278
+ const c = h.data.map((l) => l.slice(-r)), S = this.calcPercentData(c);
279
+ i.series.forEach((l, f) => {
280
+ l.data = S[f];
281
+ }), this.updateChart(i);
282
+ }
283
+ setHistoryData(t) {
284
+ if (!t || !(t != null && t.length)) return;
285
+ const e = this.chartObj.getOption(), n = Number(this.Style.value.points) || 10, { data: o } = this.props.conf, i = (r) => {
286
+ if (r == null || r === "" || r === "-") return null;
287
+ const c = Number(r);
288
+ return Number.isFinite(c) ? c : null;
289
+ }, s = this.getFixedStatisticsXLabels();
290
+ if (s != null && s.length) {
291
+ e.xAxis[0].data = [...s];
292
+ const r = [];
293
+ t.forEach((S, x) => {
294
+ var C;
295
+ if (!e.series[x]) return;
296
+ const l = o[x], f = (l == null ? void 0 : l.periodUnit) || ((C = o[0]) == null ? void 0 : C.periodUnit), m = new Array(s.length).fill(null), y = S.time || [], v = S.data || [];
297
+ for (let w = 0; w < y.length; w++) {
298
+ const k = I(
299
+ y[w],
300
+ String(f || "")
301
+ ), U = k ? s.indexOf(k) : -1;
302
+ U >= 0 && (m[U] = i(v[w]));
303
+ }
304
+ r.push(m);
305
+ });
306
+ const c = this.calcPercentData(r);
307
+ e.series.forEach((S, x) => {
308
+ S.data = c[x] || new Array(s.length).fill(0);
309
+ }), this.updateChart(e);
310
+ return;
311
+ }
312
+ e.xAxis[0].data = t[0].time.slice(-n);
313
+ const u = t.map((r) => (r.data || []).map(i).slice(-n)), h = this.calcPercentData(u);
314
+ e.series.forEach((r, c) => {
315
+ r.data = h[c];
316
+ }), this.updateChart(e);
317
+ }
318
+ }
319
+ const g = new $(a, "percentBar");
320
+ g.setupLifecycle();
321
+ const D = it();
322
+ q(() => {
323
+ var b;
324
+ if (D.registerInstance(a.uid, g), a.mode === "preview") {
325
+ const t = ((b = g.getChartInstance) == null ? void 0 : b.call(g)) || g.chartObj;
326
+ t == null || t.off("click"), t == null || t.on("click", (e) => {
327
+ var o, i, s, u, h, r;
328
+ const n = e == null ? void 0 : e.seriesName;
329
+ if (typeof n == "string" && n) {
330
+ const c = ((i = (o = a.conf) == null ? void 0 : o.options) == null ? void 0 : i.linkChannel) === "custom" ? (u = (s = a.conf) == null ? void 0 : s.options) == null ? void 0 : u.customChannel : (r = (h = a.conf) == null ? void 0 : h.options) == null ? void 0 : r.linkChannel;
331
+ d.publish(c || "percentBar", "percentBar", {
332
+ objectId: "",
333
+ deviceId: "",
334
+ type: "select",
335
+ fieldKey: n,
336
+ fv: A({ key: n }, e),
337
+ source: "percentBar"
338
+ });
339
+ }
340
+ });
341
+ }
342
+ }), G(() => {
343
+ D.unregisterInstance(a.uid);
344
+ });
345
+ const E = g.getStyle(), j = g.getEchartId(), L = a.conf, z = K(() => lt(a.conf.options));
346
+ return (b, t) => (J(), Q("div", {
347
+ class: "mix-component",
348
+ style: T({
349
+ background: F(E).bgColor,
350
+ borderRadius: `${F(E).radiusSize}px`
351
+ })
352
+ }, [
353
+ O("div", {
354
+ class: "mix-title",
355
+ style: T(z.value)
356
+ }, Y(F(L).caption || F(L).name), 5),
357
+ O("div", yt, [
358
+ O("div", {
359
+ class: "w-full h-full",
360
+ id: F(j)
361
+ }, null, 8, St)
362
+ ]),
363
+ Z(b.$slots, "default", {}, void 0, !0)
364
+ ], 4));
365
+ }
366
+ })), jt = /* @__PURE__ */ nt(Ot, [["__scopeId", "data-v-ef344dae"]]);
367
+ export {
368
+ jt as default
369
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";var j=Object.defineProperty,z=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var U=(p,n,u)=>n in p?j(p,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[n]=u,A=(p,n)=>{for(var u in n||(n={}))R.call(n,u)&&U(p,u,n[u]);if(P)for(var u of P(n))W.call(n,u)&&U(p,u,n[u]);return p},_=(p,n)=>z(p,V(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),g=require("./index-OgmTZiO-.cjs");require("element-plus");const q=require("./EChartComponentBase-C2sxqwSE.cjs"),X=require("./titleStyle-NSnz6cUg.cjs"),E=require("./installCanvasRenderer-CyhM1Qpl.cjs"),M=require("./install-DV5cEgNV.cjs"),H=require("./install-CltTFs4e.cjs"),G=require("./install-C8buXQPI.cjs"),K=require("./install-Ch5d8i37.cjs"),J="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3c/svg%3e",Q="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3c/svg%3e",Y={class:"mix-body"},Z=["id"],tt={DEFAULT_ICON:J,ACTIVE_ICON:Q,NAME_CN:"百分比堆积柱状图",NAME_EN:"Percent Stacked Bar Chart",ORDER:3,PLATFORM:["pc","screen","mobile"]},et={titleColor:"#111",textColor:"#111",bgColor:"#fff",top:30,bottom:40,left:40,right:20,radiusSize:8,textSize:12,barWidth:30,points:10,isHideTitle:!1,showLabel:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},it=[{name:"参数一",fv:"",object_id:"",color:"#4162ff",periodUnit:"near-hour",periodValue:1},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a",periodUnit:"near-hour",periodValue:1}],ot=["name","fv","object_id","color",{key:"periodUnit",label:"setting.timeUnit",type:"select",options:g.DATE_OPTION},{key:"periodValue",label:"setting.timePeriod",type:"number"}],st=["mosaic","statistics","calculate"],nt={source:"mosaic",useAlias:!1,multiObject:!1,null:{type:"0",value:""}},at={DEFAULT:tt,OPTIONS:et,DATA:it,PARAMS:ot,SOURCE:st,COMMON:nt},rt=l.defineComponent(_(A({},at),{__name:"percentBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){E.use([M.install,H.install,E.install,G.install,E.install$1,K.install]);const n=p,u=g.useLinkStore();class B extends q.EChartComponentBase{extractStyles(){return _(A({},super.extractStyles()),{barWidth:this.getOptionValue("barWidth",30),showLabel:this.getOptionValue("showLabel",!1)})}getXAxisData(){var t;return(t=this.getFixedStatisticsXLabels())!=null?t:this.getTimeAxis()}getFixedStatisticsXLabels(){var i;const{data:t,common:e}=this.props.conf,a=(e==null?void 0:e.source)||"mosaic",o=(i=t[0])==null?void 0:i.periodUnit;return["statistics","calculate"].includes(a)&&o&&!String(o).startsWith("near")?g.getStatisticsTimeUnitLabel(o):null}calcPercentData(t){if(!t.length||!t[0].length)return t;const e=t[0].length,a=t.map(()=>[]);for(let o=0;o<e;o++){let i=0;for(let s=0;s<t.length;s++)i+=t[s][o]||0;for(let s=0;s<t.length;s++)a[s][o]=i>0?parseFloat(((t[s][o]||0)/i*100).toFixed(1)):0}return a}getChartOption(){const t=this.Style.value;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{if(!(e!=null&&e.length))return"";let a=`<div>${e[0].axisValue}</div>`,o=0;return e.forEach(i=>{o+=i.value||0}),e.forEach(i=>{const s=o>0?((i.value||0)/o*100).toFixed(1):"0.0";a+=`<div style="display:flex;align-items:center;gap:4px;">
2
+ <span style="display:inline-block;width:10px;height:10px;border-radius:2px;background:${i.color};"></span>
3
+ ${i.seriesName}: ${s}%
4
+ </div>`}),a},textStyle:{align:"left",fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!1},legend:{show:!0,data:this.props.conf.data.map(e=>e.name),right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},xAxis:[{type:"category",data:this.getXAxisData(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:t.textColor}},axisLabel:{formatter:e=>{if(!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(e))return e;const[a,o]=e.split(" ");return`${a}
5
+ ${o}`},color:t.textColor,fontSize:t.textSize}}],yAxis:[{type:"value",max:100,nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize,formatter:"{value}%"},axisLine:{lineStyle:{color:t.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){const t=this.props.conf,e=this.Style.value,a=this.getFixedStatisticsXLabels(),o=a?a.length:e.points,i=t.data.map((f,h)=>(f.color||g.COLORS[h],g.getRandomArr({num:o,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}))),s=this.calcPercentData(i);return t.data.map((f,h)=>{const r=f.color||g.COLORS[h];return{type:"bar",stack:"total",data:s[h],name:f.name,itemStyle:{color:r},label:{show:e.showLabel,position:"inside",color:"#fff",formatter:d=>d.value+"%"},barWidth:e.barWidth+"%"}})}setSocketData(t){var y;if(!this.hasData()||!this.chartObj||!t)return;const{data:e,common:a}=this.props.conf,o=a.source||"mosaic",i=this.chartObj.getOption(),s=(y=e[0])==null?void 0:y.periodUnit,f=["statistics","calculate"].includes(o)&&s&&!String(s).startsWith("near");if(e.forEach((c,x)=>{const m=this.extractDataValue(t,c.fv);if(["statistics","calculate"].includes(o)&&c.periodUnit&&!String(c.periodUnit).startsWith("near")&&!String(c.periodUnit).startsWith("last")){const w=g.statisticsSocketTimeToXAxisLabel(t.start_time,c.periodUnit),F=w?i.xAxis[0].data.indexOf(w):-1;F>=0&&(i.series[x].data[F]=m);return}const b=["statistics","calculate"].includes(o)?t.start_time:t.datetime;b!=null&&(x===0&&i.xAxis[0].data.push(b),i.series[x].data.push(m))}),f){const c=i.series.map(m=>[...m.data]),x=this.calcPercentData(c);i.series.forEach((m,b)=>{m.data=x[b]}),this.updateChart(i);return}const h=g.addRealtimeData(i.xAxis[0].data,i.series.map(c=>c.data)),r=Number(this.Style.value.points)||10;i.xAxis[0].data=h.times.slice(-r);const d=h.data.map(c=>c.slice(-r)),C=this.calcPercentData(d);i.series.forEach((c,x)=>{c.data=C[x]}),this.updateChart(i)}setHistoryData(t){if(!t||!(t!=null&&t.length))return;const e=this.chartObj.getOption(),a=Number(this.Style.value.points)||10,{data:o}=this.props.conf,i=r=>{if(r==null||r===""||r==="-")return null;const d=Number(r);return Number.isFinite(d)?d:null},s=this.getFixedStatisticsXLabels();if(s!=null&&s.length){e.xAxis[0].data=[...s];const r=[];t.forEach((C,y)=>{var F;if(!e.series[y])return;const c=o[y],x=(c==null?void 0:c.periodUnit)||((F=o[0])==null?void 0:F.periodUnit),m=new Array(s.length).fill(null),b=C.time||[],w=C.data||[];for(let O=0;O<b.length;O++){const T=g.statisticsSocketTimeToXAxisLabel(b[O],String(x||"")),N=T?s.indexOf(T):-1;N>=0&&(m[N]=i(w[O]))}r.push(m)});const d=this.calcPercentData(r);e.series.forEach((C,y)=>{C.data=d[y]||new Array(s.length).fill(0)}),this.updateChart(e);return}e.xAxis[0].data=t[0].time.slice(-a);const f=t.map(r=>(r.data||[]).map(i).slice(-a)),h=this.calcPercentData(f);e.series.forEach((r,d)=>{r.data=h[d]}),this.updateChart(e)}}const S=new B(n,"percentBar");S.setupLifecycle();const L=g.useCounterStore();l.onMounted(()=>{var v;if(L.registerInstance(n.uid,S),n.mode==="preview"){const t=((v=S.getChartInstance)==null?void 0:v.call(S))||S.chartObj;t==null||t.off("click"),t==null||t.on("click",e=>{var o,i,s,f,h,r;const a=e==null?void 0:e.seriesName;if(typeof a=="string"&&a){const d=((i=(o=n.conf)==null?void 0:o.options)==null?void 0:i.linkChannel)==="custom"?(f=(s=n.conf)==null?void 0:s.options)==null?void 0:f.customChannel:(r=(h=n.conf)==null?void 0:h.options)==null?void 0:r.linkChannel;u.publish(d||"percentBar","percentBar",{objectId:"",deviceId:"",type:"select",fieldKey:a,fv:A({key:a},e),source:"percentBar"})}})}}),l.onUnmounted(()=>{L.unregisterInstance(n.uid)});const D=S.getStyle(),I=S.getEchartId(),k=n.conf,$=l.computed(()=>X.generateTitleStyle(n.conf.options));return(v,t)=>(l.openBlock(),l.createElementBlock("div",{class:"mix-component",style:l.normalizeStyle({background:l.unref(D).bgColor,borderRadius:`${l.unref(D).radiusSize}px`})},[l.createElementVNode("div",{class:"mix-title",style:l.normalizeStyle($.value)},l.toDisplayString(l.unref(k).caption||l.unref(k).name),5),l.createElementVNode("div",Y,[l.createElementVNode("div",{class:"w-full h-full",id:l.unref(I)},null,8,Z)]),l.renderSlot(v.$slots,"default",{},void 0,!0)],4))}})),lt=g._export_sfc(rt,[["__scopeId","data-v-ef344dae"]]);exports.default=lt;
@@ -1 +1 @@
1
- "use strict";var Y=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var T=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))oe.call(t,o)&&T(e,o,t[o]);if(F)for(var o of F(t))ae.call(t,o)&&T(e,o,t[o]);return e},L=(e,t)=>ee(e,te(t));var s=(e,t,o)=>new Promise((l,a)=>{var d=f=>{try{r(o.next(f))}catch(v){a(v)}},h=f=>{try{r(o.throw(f))}catch(v){a(v)}},r=f=>f.done?l(f.value):Promise.resolve(f.value).then(d,h);r((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),re=require("./vue-i18n-BvHMBi_b.cjs"),ne=require("./BaseComponent-bzb58Hhs.cjs"),y=require("./index-6QhTSPkL.cjs"),A=require("./materialFileUrl-DfPNm265.cjs"),I=require("element-plus"),q=require("./ele-bmp-icon-BBI0-SX7.cjs");process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const le=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function se(e){return i.inject(le)}const U=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},ce=(e,t)=>{if(e&&String(e).trim()){const o=String(e).trim();if(o.startsWith("http://")||o.startsWith("https://"))try{return new URL(o).pathname||""}catch(l){return o}return o.startsWith("/")?o:`/${o}`}return t?`/yunfiles/material/file/${t}`:""},de={uploadFile(e){return s(this,null,function*(){var l;const t=new FormData;t.append("file",e);const o=yield y.api.upload(t,!0);if(U(o.code)&&((l=o.result)!=null&&l.url))return o.result.url;throw new Error(o.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return s(this,null,function*(){var d,h;const l={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},a=yield y.api.post("upload_material",l,!0);if(U(a.code)&&a.result){const r=a.result,f=ce(r.material_path||r.relative_path||"",r.file_id);if(f)return L(b({},r),{material_path:f,material_size:(h=(d=r.material_size)!=null?d:r.file_size)!=null?h:0,material_type:r.material_type||r.mime_type||t||"png",name:r.name||r.file_name||""})}throw new Error(a.info||a.msg||"上传原图获取路径失败")})},createMaterial(e){return s(this,null,function*(){var o;const t=yield y.api.post("create_dashboard_material",e,!0);if(U(t.code)&&((o=t.result)!=null&&o.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(o){return s(this,arguments,function*(e,t={}){var h;const l=((h=e.name.split(".").pop())==null?void 0:h.toLowerCase())||"png",a=yield this._fileToBase64(e),d=yield this.uploadMaterialGetPath(a,l);if(d.uid)return{uid:d.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,o)=>{const l=new FileReader;l.onload=()=>t(l.result),l.onerror=()=>o(new Error("文件读取失败")),l.readAsDataURL(e)})},getMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return s(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return s(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return s(this,null,function*(){var o;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const l=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),a=(o=l==null?void 0:l.result)==null?void 0:o.data;Array.isArray(a)&&a.length>0&&a[0].uid&&(yield this.deleteMaterial(a[0].uid))}catch(l){}})}},W={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return s(this,null,function*(){var o;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((o=t==null?void 0:t.result)==null?void 0:o.data)||[]})},_deleteByUid(e,t){return s(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return s(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return s(this,null,function*(){for(const o of t)yield this._deleteByUid(e,o.uid)})},createMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(o){return s(this,arguments,function*(e,t={}){const l=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(L(b({},t),{where_and:l}))})},getMaterialRelationByComponent(l,a){return s(this,arguments,function*(e,t,o={}){const d=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(L(b({},o),{where_and:d}))})},getRelationsByMaterial(e){return s(this,null,function*(){var l;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),o=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((l=o==null?void 0:o.result)==null?void 0:l.data)||[]})},getMaterialUsageSummary(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e),o=new Set;return t.forEach(l=>{const a=String(l.dashboard_record_uid||"").trim();a&&o.add(a)}),{relationCount:t.length,dashboardCount:o.size,relations:t}})},deleteAllRelationsByMaterial(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const o of t)!(o!=null&&o.uid)||!(o!=null&&o.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:o.dashboard_record_uid,uid:o.uid}));return t.length})},deleteAllRelationsByDashboard(e){return s(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return s(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,o,l){return s(this,null,function*(){if(!e||!t||!o||!l)return;const a=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o],["component_id","=",l]]),d=yield this._listRelations(a);for(const h of d)yield this._deleteByRelation(h)})},deleteLayerLevelRelations(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),d=(yield this._listRelations(l)).filter(h=>this._isLayerLevel(h));for(const h of d)yield this._deleteByRelation(h)})},deleteSheetLevelRelations(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),a=(yield this._listRelations(o)).filter(d=>this._isSheetLevel(d));for(const d of a)yield this._deleteByRelation(d)})},deleteDashboardLevelRelations(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),l=(yield this._listRelations(t)).filter(a=>this._isDashboardLevel(a));for(const a of l)yield this._deleteByRelation(a)})},deleteRelationsByLayerHierarchy(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),a=yield this._listRelations(l),d=a.filter(r=>this._isComponentLevel(r)),h=a.filter(r=>this._isLayerLevel(r));for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsBySheetHierarchy(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),l=yield this._listRelations(o),a=l.filter(r=>this._isComponentLevel(r)),d=l.filter(r=>this._isLayerLevel(r)),h=l.filter(r=>this._isSheetLevel(r));for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsByDashboardHierarchy(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),o=yield this._listRelations(t),l=o.filter(r=>this._isComponentLevel(r)),a=o.filter(r=>this._isLayerLevel(r)),d=o.filter(r=>this._isSheetLevel(r)),h=o.filter(r=>this._isDashboardLevel(r));for(const r of l)yield this._deleteByRelation(r);for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})}},ue=i.ref(!1),he=i.ref("all");function _e(e="all"){return he.value=e,ue.value=!0,new Promise(t=>{})}const pe={class:"mix-body"},me={class:"upload-content"},ye={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},fe={class:"upload-text"},ge={key:0,class:"upload-actions"},ve={key:1,class:"viewer-container"},we={key:0,class:"file-info"},be={class:"file-name"},Re=["title"],Me=["src","alt"],Ne={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2,PLATFORM:["pc","screen","mobile"]},Le={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ee=[],Se=[],Be=[],Ce=null,Ae={DEFAULT:Ne,OPTIONS:Le,DATA:Ee,PARAMS:Se,SOURCE:Be,COMMON:Ce},Ue=i.defineComponent(L(b({},Ae),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=re.useI18n(),o=y.useCounterStore(),l=se(),a=e;class d extends ne.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),j()}}const h=new d(a,"photo");h.setupLifecycle();const r=h.getStyle(),f=i.ref(null),v=i.ref(""),p=i.ref(""),R=i.ref(""),k=i.ref(!1),D=i.ref(!1),$=n=>A.buildMaterialFileUrlByMaterialPath(n),j=()=>s(null,null,function*(){var c,u,_;const{conf:n}=a;(u=(c=n==null?void 0:n.options)==null?void 0:c.fileUrl)!=null&&u.value&&(v.value=$(n.options.fileUrl.value),yield V(),R.value=((_=n.options.fileName)==null?void 0:_.value)||"")}),P=n=>{n&&n.startsWith("blob:")&&URL.revokeObjectURL(n)},V=()=>s(null,null,function*(){if(v.value)try{const n=y.resolveHttpAuthTokenForFetch();if(!n){p.value="";return}const c=A.encodeMaterialFileRequestUrl(v.value),u=yield fetch(c,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${n}`}});if(!u.ok)throw new Error(`load image failed: ${u.status}`);const _=yield u.blob(),g=URL.createObjectURL(_);P(p.value),p.value=g}catch(n){console.error("[Photo] 拉取图片失败:",n),P(p.value),p.value=""}}),H=i.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),J=i.computed(()=>{var c;const n=(c=r==null?void 0:r.value)==null?void 0:c.imageDisplayMode;return n==="tile"?{display:"none"}:n==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),G=i.computed(()=>{var n;return((n=r==null?void 0:r.value)==null?void 0:n.imageDisplayMode)!=="tile"||!p.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${p.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=i.computed(()=>{const n=l.params.id;return n?String(n):""}),x=n=>{var u;const c=((u=o.pageData)==null?void 0:u.sheets)||[];for(const _ of c){const g=_.id,M=_.caption||_.name||_.id,E=_.layers||[];for(const w of E){const S=w.id,B=w.caption||w.name||w.id,C=w.components||[];for(const m of C)if((m==null?void 0:m.id)===n){const N=m.caption||m.name||m.id;return{sheetId:g,layerId:S,sheetName:M,layerName:B,componentName:N}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},Z=n=>s(null,null,function*(){var g;if(!O.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id);if(!c||!n)return;const{sheetId:u,layerId:_}=x(c);try{yield W.deleteComponentRelations(O.value,u,_,c),yield W.createMaterialRelation({dashboard_record_uid:O.value,material_uid:n,sheet_id:u||void 0,layer_id:_||void 0,component_id:c})}catch(M){console.warn("[Photo] 同步素材关联失败:",M)}}),z=()=>s(null,null,function*(){try{const n=yield _e("image");if(n){if(console.log("[Photo] 选中的素材:",n),console.log("[Photo] material_path:",n.material_path),console.log("[Photo] thumbnail:",n.thumbnail),console.log("[Photo] file_id:",n.file_id),!n.material_path){I.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const c=String(n.material_path).trim(),u=A.buildMaterialFileUrlByMaterialPath(c);console.log("[Photo] 原图URL:",u),v.value=u,yield V(),R.value=n.name,a.conf&&a.conf.options&&(a.conf.options.fileUrl||(a.conf.options.fileUrl={value:"",type:"string",label:""}),a.conf.options.fileName||(a.conf.options.fileName={value:"",type:"string",label:""}),a.conf.options.materialUid||(a.conf.options.materialUid={value:"",type:"string",label:""}),a.conf.options.fileUrl.value=c,a.conf.options.fileName.value=n.name,a.conf.options.materialUid.value=n.uid,console.log("[Photo] 配置已保存:",{fileUrl:a.conf.options.fileUrl.value,fileName:a.conf.options.fileName.value,materialUid:a.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",p.value),I.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield Z(n.uid)}else console.log("[Photo] 用户取消选择")}catch(n){console.error("[Photo] 素材选择失败:",n),I.ElMessage.error("素材选择失败")}}),K=()=>{P(p.value),p.value="",v.value="",R.value="",a.mode!=="preview"&&z()},Q=()=>{k.value=!1,f.value,console.log("图片加载成功")},X=n=>{var g,M,E,w,S,B,C;if(console.error("图片加载失败:",n),k.value||D.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id)||"",u=c?x(c):null;u&&(u.sheetName||u.layerName||u.componentName)?`${u.sheetName||"-"}${u.layerName||"-"}${u.componentName||"-"}`:R.value;const _=String(((w=(E=(M=a.conf)==null?void 0:M.options)==null?void 0:E.materialUid)==null?void 0:w.value)||((C=(B=(S=a.conf)==null?void 0:S.options)==null?void 0:B.imageUid)==null?void 0:C.value)||"").trim();_&&(D.value=!0,de.getMaterialItem(_).then(m=>{if(U(m==null?void 0:m.code)&&(m!=null&&m.result)){const N=m.result;N!=null&&N.material_path&&(v.value=A.buildMaterialFileUrlByMaterialPath(String(N.material_path).trim()),V());return}k.value=!0}).catch(()=>{}).finally(()=>{D.value=!1}))};return i.onMounted(()=>{}),i.onBeforeUnmount(()=>{p.value&&p.value.startsWith("blob:")&&URL.revokeObjectURL(p.value)}),(n,c)=>{var _,g;const u=ie.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component",style:i.normalizeStyle({borderRadius:`${i.unref(r).radiusSize}px`})},[i.createElementVNode("div",pe,[p.value?(i.openBlock(),i.createElementBlock("div",ve,[a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",we,[i.createElementVNode("span",be,i.toDisplayString(R.value),1),i.createElementVNode("button",{class:"change-file-btn",onClick:K,title:i.unref(t)("component.photo.changeFile")||"更换文件"},[...c[1]||(c[1]=[i.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[i.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,Re)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"image-container",style:i.normalizeStyle(H.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:f,src:p.value,alt:R.value,style:i.normalizeStyle(J.value),onLoad:Q,onError:X},null,44,Me),((g=(_=i.unref(r))==null?void 0:_.value)==null?void 0:g.imageDisplayMode)==="tile"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"tiled-background",style:i.normalizeStyle(G.value)},null,4)):i.createCommentVNode("",!0)],4)])):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}])},[i.createElementVNode("div",me,[(i.openBlock(),i.createElementBlock("svg",ye,[...c[0]||(c[0]=[i.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),i.createElementVNode("p",fe,i.toDisplayString(a.mode==="preview"?"未上传素材":i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",ge,[i.createVNode(u,{type:"primary",size:"small",onClick:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):i.createCommentVNode("",!0)])],2))]),i.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),ke=y._export_sfc(Ue,[["__scopeId","data-v-57314f5b"]]);exports.default=ke;
1
+ "use strict";var Y=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var T=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))oe.call(t,o)&&T(e,o,t[o]);if(F)for(var o of F(t))ae.call(t,o)&&T(e,o,t[o]);return e},L=(e,t)=>ee(e,te(t));var s=(e,t,o)=>new Promise((l,a)=>{var d=f=>{try{r(o.next(f))}catch(v){a(v)}},h=f=>{try{r(o.throw(f))}catch(v){a(v)}},r=f=>f.done?l(f.value):Promise.resolve(f.value).then(d,h);r((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),re=require("./vue-i18n-BvHMBi_b.cjs"),ne=require("./BaseComponent-DaYX7dUF.cjs"),y=require("./index-OgmTZiO-.cjs"),A=require("./materialFileUrl-DfPNm265.cjs"),I=require("element-plus"),q=require("./ele-bmp-icon-BBI0-SX7.cjs");process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const le=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function se(e){return i.inject(le)}const U=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},ce=(e,t)=>{if(e&&String(e).trim()){const o=String(e).trim();if(o.startsWith("http://")||o.startsWith("https://"))try{return new URL(o).pathname||""}catch(l){return o}return o.startsWith("/")?o:`/${o}`}return t?`/yunfiles/material/file/${t}`:""},de={uploadFile(e){return s(this,null,function*(){var l;const t=new FormData;t.append("file",e);const o=yield y.api.upload(t,!0);if(U(o.code)&&((l=o.result)!=null&&l.url))return o.result.url;throw new Error(o.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return s(this,null,function*(){var d,h;const l={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},a=yield y.api.post("upload_material",l,!0);if(U(a.code)&&a.result){const r=a.result,f=ce(r.material_path||r.relative_path||"",r.file_id);if(f)return L(b({},r),{material_path:f,material_size:(h=(d=r.material_size)!=null?d:r.file_size)!=null?h:0,material_type:r.material_type||r.mime_type||t||"png",name:r.name||r.file_name||""})}throw new Error(a.info||a.msg||"上传原图获取路径失败")})},createMaterial(e){return s(this,null,function*(){var o;const t=yield y.api.post("create_dashboard_material",e,!0);if(U(t.code)&&((o=t.result)!=null&&o.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(o){return s(this,arguments,function*(e,t={}){var h;const l=((h=e.name.split(".").pop())==null?void 0:h.toLowerCase())||"png",a=yield this._fileToBase64(e),d=yield this.uploadMaterialGetPath(a,l);if(d.uid)return{uid:d.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,o)=>{const l=new FileReader;l.onload=()=>t(l.result),l.onerror=()=>o(new Error("文件读取失败")),l.readAsDataURL(e)})},getMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return s(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return s(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return s(this,null,function*(){var o;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const l=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),a=(o=l==null?void 0:l.result)==null?void 0:o.data;Array.isArray(a)&&a.length>0&&a[0].uid&&(yield this.deleteMaterial(a[0].uid))}catch(l){}})}},W={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return s(this,null,function*(){var o;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((o=t==null?void 0:t.result)==null?void 0:o.data)||[]})},_deleteByUid(e,t){return s(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return s(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return s(this,null,function*(){for(const o of t)yield this._deleteByUid(e,o.uid)})},createMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(o){return s(this,arguments,function*(e,t={}){const l=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(L(b({},t),{where_and:l}))})},getMaterialRelationByComponent(l,a){return s(this,arguments,function*(e,t,o={}){const d=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(L(b({},o),{where_and:d}))})},getRelationsByMaterial(e){return s(this,null,function*(){var l;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),o=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((l=o==null?void 0:o.result)==null?void 0:l.data)||[]})},getMaterialUsageSummary(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e),o=new Set;return t.forEach(l=>{const a=String(l.dashboard_record_uid||"").trim();a&&o.add(a)}),{relationCount:t.length,dashboardCount:o.size,relations:t}})},deleteAllRelationsByMaterial(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const o of t)!(o!=null&&o.uid)||!(o!=null&&o.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:o.dashboard_record_uid,uid:o.uid}));return t.length})},deleteAllRelationsByDashboard(e){return s(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return s(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,o,l){return s(this,null,function*(){if(!e||!t||!o||!l)return;const a=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o],["component_id","=",l]]),d=yield this._listRelations(a);for(const h of d)yield this._deleteByRelation(h)})},deleteLayerLevelRelations(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),d=(yield this._listRelations(l)).filter(h=>this._isLayerLevel(h));for(const h of d)yield this._deleteByRelation(h)})},deleteSheetLevelRelations(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),a=(yield this._listRelations(o)).filter(d=>this._isSheetLevel(d));for(const d of a)yield this._deleteByRelation(d)})},deleteDashboardLevelRelations(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),l=(yield this._listRelations(t)).filter(a=>this._isDashboardLevel(a));for(const a of l)yield this._deleteByRelation(a)})},deleteRelationsByLayerHierarchy(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),a=yield this._listRelations(l),d=a.filter(r=>this._isComponentLevel(r)),h=a.filter(r=>this._isLayerLevel(r));for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsBySheetHierarchy(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),l=yield this._listRelations(o),a=l.filter(r=>this._isComponentLevel(r)),d=l.filter(r=>this._isLayerLevel(r)),h=l.filter(r=>this._isSheetLevel(r));for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsByDashboardHierarchy(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),o=yield this._listRelations(t),l=o.filter(r=>this._isComponentLevel(r)),a=o.filter(r=>this._isLayerLevel(r)),d=o.filter(r=>this._isSheetLevel(r)),h=o.filter(r=>this._isDashboardLevel(r));for(const r of l)yield this._deleteByRelation(r);for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})}},ue=i.ref(!1),he=i.ref("all");function _e(e="all"){return he.value=e,ue.value=!0,new Promise(t=>{})}const pe={class:"mix-body"},me={class:"upload-content"},ye={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},fe={class:"upload-text"},ge={key:0,class:"upload-actions"},ve={key:1,class:"viewer-container"},we={key:0,class:"file-info"},be={class:"file-name"},Re=["title"],Me=["src","alt"],Ne={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2,PLATFORM:["pc","screen","mobile"]},Le={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ee=[],Se=[],Be=[],Ce=null,Ae={DEFAULT:Ne,OPTIONS:Le,DATA:Ee,PARAMS:Se,SOURCE:Be,COMMON:Ce},Ue=i.defineComponent(L(b({},Ae),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=re.useI18n(),o=y.useCounterStore(),l=se(),a=e;class d extends ne.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),j()}}const h=new d(a,"photo");h.setupLifecycle();const r=h.getStyle(),f=i.ref(null),v=i.ref(""),p=i.ref(""),R=i.ref(""),k=i.ref(!1),D=i.ref(!1),$=n=>A.buildMaterialFileUrlByMaterialPath(n),j=()=>s(null,null,function*(){var c,u,_;const{conf:n}=a;(u=(c=n==null?void 0:n.options)==null?void 0:c.fileUrl)!=null&&u.value&&(v.value=$(n.options.fileUrl.value),yield V(),R.value=((_=n.options.fileName)==null?void 0:_.value)||"")}),P=n=>{n&&n.startsWith("blob:")&&URL.revokeObjectURL(n)},V=()=>s(null,null,function*(){if(v.value)try{const n=y.resolveHttpAuthTokenForFetch();if(!n){p.value="";return}const c=A.encodeMaterialFileRequestUrl(v.value),u=yield fetch(c,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${n}`}});if(!u.ok)throw new Error(`load image failed: ${u.status}`);const _=yield u.blob(),g=URL.createObjectURL(_);P(p.value),p.value=g}catch(n){console.error("[Photo] 拉取图片失败:",n),P(p.value),p.value=""}}),H=i.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),J=i.computed(()=>{var c;const n=(c=r==null?void 0:r.value)==null?void 0:c.imageDisplayMode;return n==="tile"?{display:"none"}:n==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),G=i.computed(()=>{var n;return((n=r==null?void 0:r.value)==null?void 0:n.imageDisplayMode)!=="tile"||!p.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${p.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=i.computed(()=>{const n=l.params.id;return n?String(n):""}),x=n=>{var u;const c=((u=o.pageData)==null?void 0:u.sheets)||[];for(const _ of c){const g=_.id,M=_.caption||_.name||_.id,E=_.layers||[];for(const w of E){const S=w.id,B=w.caption||w.name||w.id,C=w.components||[];for(const m of C)if((m==null?void 0:m.id)===n){const N=m.caption||m.name||m.id;return{sheetId:g,layerId:S,sheetName:M,layerName:B,componentName:N}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},Z=n=>s(null,null,function*(){var g;if(!O.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id);if(!c||!n)return;const{sheetId:u,layerId:_}=x(c);try{yield W.deleteComponentRelations(O.value,u,_,c),yield W.createMaterialRelation({dashboard_record_uid:O.value,material_uid:n,sheet_id:u||void 0,layer_id:_||void 0,component_id:c})}catch(M){console.warn("[Photo] 同步素材关联失败:",M)}}),z=()=>s(null,null,function*(){try{const n=yield _e("image");if(n){if(console.log("[Photo] 选中的素材:",n),console.log("[Photo] material_path:",n.material_path),console.log("[Photo] thumbnail:",n.thumbnail),console.log("[Photo] file_id:",n.file_id),!n.material_path){I.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const c=String(n.material_path).trim(),u=A.buildMaterialFileUrlByMaterialPath(c);console.log("[Photo] 原图URL:",u),v.value=u,yield V(),R.value=n.name,a.conf&&a.conf.options&&(a.conf.options.fileUrl||(a.conf.options.fileUrl={value:"",type:"string",label:""}),a.conf.options.fileName||(a.conf.options.fileName={value:"",type:"string",label:""}),a.conf.options.materialUid||(a.conf.options.materialUid={value:"",type:"string",label:""}),a.conf.options.fileUrl.value=c,a.conf.options.fileName.value=n.name,a.conf.options.materialUid.value=n.uid,console.log("[Photo] 配置已保存:",{fileUrl:a.conf.options.fileUrl.value,fileName:a.conf.options.fileName.value,materialUid:a.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",p.value),I.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield Z(n.uid)}else console.log("[Photo] 用户取消选择")}catch(n){console.error("[Photo] 素材选择失败:",n),I.ElMessage.error("素材选择失败")}}),K=()=>{P(p.value),p.value="",v.value="",R.value="",a.mode!=="preview"&&z()},Q=()=>{k.value=!1,f.value,console.log("图片加载成功")},X=n=>{var g,M,E,w,S,B,C;if(console.error("图片加载失败:",n),k.value||D.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id)||"",u=c?x(c):null;u&&(u.sheetName||u.layerName||u.componentName)?`${u.sheetName||"-"}${u.layerName||"-"}${u.componentName||"-"}`:R.value;const _=String(((w=(E=(M=a.conf)==null?void 0:M.options)==null?void 0:E.materialUid)==null?void 0:w.value)||((C=(B=(S=a.conf)==null?void 0:S.options)==null?void 0:B.imageUid)==null?void 0:C.value)||"").trim();_&&(D.value=!0,de.getMaterialItem(_).then(m=>{if(U(m==null?void 0:m.code)&&(m!=null&&m.result)){const N=m.result;N!=null&&N.material_path&&(v.value=A.buildMaterialFileUrlByMaterialPath(String(N.material_path).trim()),V());return}k.value=!0}).catch(()=>{}).finally(()=>{D.value=!1}))};return i.onMounted(()=>{}),i.onBeforeUnmount(()=>{p.value&&p.value.startsWith("blob:")&&URL.revokeObjectURL(p.value)}),(n,c)=>{var _,g;const u=ie.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component",style:i.normalizeStyle({borderRadius:`${i.unref(r).radiusSize}px`})},[i.createElementVNode("div",pe,[p.value?(i.openBlock(),i.createElementBlock("div",ve,[a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",we,[i.createElementVNode("span",be,i.toDisplayString(R.value),1),i.createElementVNode("button",{class:"change-file-btn",onClick:K,title:i.unref(t)("component.photo.changeFile")||"更换文件"},[...c[1]||(c[1]=[i.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[i.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,Re)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"image-container",style:i.normalizeStyle(H.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:f,src:p.value,alt:R.value,style:i.normalizeStyle(J.value),onLoad:Q,onError:X},null,44,Me),((g=(_=i.unref(r))==null?void 0:_.value)==null?void 0:g.imageDisplayMode)==="tile"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"tiled-background",style:i.normalizeStyle(G.value)},null,4)):i.createCommentVNode("",!0)],4)])):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}])},[i.createElementVNode("div",me,[(i.openBlock(),i.createElementBlock("svg",ye,[...c[0]||(c[0]=[i.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),i.createElementVNode("p",fe,i.toDisplayString(a.mode==="preview"?"未上传素材":i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",ge,[i.createVNode(u,{type:"primary",size:"small",onClick:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):i.createCommentVNode("",!0)])],2))]),i.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),ke=y._export_sfc(Ue,[["__scopeId","data-v-57314f5b"]]);exports.default=ke;
@@ -31,8 +31,8 @@ import "element-plus/es/components/base/style/css";
31
31
  import "element-plus/es/components/button/style/css";
32
32
  import { inject as he, ref as R, defineComponent as _e, computed as O, onMounted as pe, onBeforeUnmount as me, openBlock as L, createElementBlock as M, normalizeStyle as x, unref as A, createElementVNode as g, normalizeClass as fe, toDisplayString as T, createVNode as ye, withCtx as ve, createTextVNode as ge, createCommentVNode as $, renderSlot as we } from "vue";
33
33
  import { u as be } from "./vue-i18n-5Nahpzrm.js";
34
- import { B as Re } from "./BaseComponent-Dwhb9Mde.js";
35
- import { a as y, u as Le, r as Me, _ as Se } from "./index-YNdVib_6.js";
34
+ import { B as Re } from "./BaseComponent-CEp8NJiX.js";
35
+ import { a as y, u as Le, r as Me, _ as Se } from "./index-CqVPeq0-.js";
36
36
  import { e as Ne, b as j } from "./materialFileUrl-CubtnHeq.js";
37
37
  import { ElMessage as H } from "element-plus";
38
38
  import { A as Ce, D as Ee } from "./ele-bmp-icon-Pdolk1J5.js";
@@ -1,2 +1,2 @@
1
- "use strict";var k=Object.defineProperty,A=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var O=(r,l,c)=>l in r?k(r,l,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[l]=c,d=(r,l)=>{for(var c in l||(l={}))$.call(l,c)&&O(r,c,l[c]);if(C)for(var c of C(l))I.call(l,c)&&O(r,c,l[c]);return r},f=(r,l)=>A(r,B(l));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),y=require("./index-6QhTSPkL.cjs");require("element-plus");const N=require("./EChartComponentBase-CMN_pOMr.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),S=require("./ele-pie-icon-BNhXPoUT.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),j=require("./install-DV5cEgNV.cjs"),z=require("./install-CltTFs4e.cjs"),T=require("./install-nDY6w-GK.cjs"),q={class:"mix-body"},D=["id"],P={DEFAULT_ICON:S.DEFAULT_ICON,ACTIVE_ICON:S.ACTIVE_ICON,NAME_CN:"饼状图",NAME_EN:"Pie",ORDER:1,PLATFORM:["pc","screen","mobile"]},M={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,type:{value:"pie",type:"radio",option:[{value:"pie",label:"component.options.pie_type_pie"},{value:"circle",label:"component.options.pie_type_circle"}],label:"component.options.pie_type"},radius:{value:50,type:"number",label:"component.options.pie_radius",dependent:"type",repel:"circle"},inside:{value:40,type:"number",label:"component.options.pie_inside",dependent:"type",repel:"pie"},outside:{value:75,type:"number",label:"component.options.pie_outside",dependent:"type",repel:"pie"},isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,showLabel:!1,showLegend:{value:!0,type:"checkbox",label:"component.options.showLegend",dependent:"showLabel"},orient:{value:"horizontal",type:"radio",option:[{value:"horizontal",label:"component.options.orient_horizontal"},{value:"vertical",label:"component.options.orient_vertical"}],label:"component.options.orient",dependent:"showLegend"},showValue:{value:!0,type:"checkbox",label:"component.options.showValue",dependent:"showLabel"},showRate:{value:!1,type:"checkbox",label:"component.options.showRate",dependent:"showLabel"},wrap:{value:!1,type:"checkbox",label:"component.options.wrap",dependent:"showLabel"},wrapByte:{value:5,type:"number",label:"component.options.pie_wrapByte",dependent:"wrap"}},H=[{name:"参数一",fv:"",object_id:"",color:"#4162ff"},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a"},{name:"参数三",fv:"",object_id:"",color:"#e24359"}],F=["name","fv","object_id","color"],U=["mosaic","statistics","calculate"],W={useAlias:!1,multiObject:!1,source:"mosaic"},G={DEFAULT:P,OPTIONS:M,DATA:H,PARAMS:F,SOURCE:U,COMMON:W},K=a.defineComponent(f(d({},G),{__name:"pie",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){b.use([j.install,z.install,b.install,b.install$1,T.install]);const l=r,c=y.useLinkStore(),_={horizontal:{orient:"horizontal",bottom:"5%",left:"center"},vertical:{orient:"vertical",right:"5%",top:"5%"}};class L extends N.EChartComponentBase{initChart(){var e,t;super.initChart(),this.props.mode==="preview"&&((e=this.chartObj)==null||e.off("click"),(t=this.chartObj)==null||t.on("click",o=>{var n,s,p,u,h,v;const i=o==null?void 0:o.name;if(typeof i=="string"&&i){const E=((s=(n=this.props.conf)==null?void 0:n.options)==null?void 0:s.linkChannel)==="custom"?(u=(p=this.props.conf)==null?void 0:p.options)==null?void 0:u.customChannel:(v=(h=this.props.conf)==null?void 0:h.options)==null?void 0:v.linkChannel;c.publish(E||"pie","pie",{objectId:"",deviceId:"",type:"select",fieldKey:i,fv:d({key:i},o),source:"pie"})}}))}extractStyles(){return f(d({},super.extractStyles()),{type:this.getOptionValue("type","pie"),radius:this.getOptionValue("radius",50),inside:this.getOptionValue("inside",40),outside:this.getOptionValue("outside",75),showLabel:this.getOptionValue("showLabel",!1),showLegend:this.getOptionValue("showLegend",!0),orient:this.getOptionValue("orient","horizontal"),showValue:this.getOptionValue("showValue",!0),showRate:this.getOptionValue("showRate",!1),wrap:this.getOptionValue("wrap",!1),wrapByte:this.getOptionValue("wrapByte",5)})}getChartOption(){const e=this.Style.value,{data:t,name:o}=this.props.conf,i=t.map((n,s)=>n.color||y.COLORS[s]);return{title:{show:!1,text:o||"",x:"center"},color:i,tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:f(d({show:e.showLabel&&e.showLegend},_[e.orient]),{data:t.map(n=>n.name),textStyle:{color:e.textColor}}),series:this.formatSeries()}}formatSeries(){const e=this.Style.value,{data:t,name:o}=this.props.conf,i=t.map(s=>({value:0,name:s.name})),n=e.type==="pie"?`${e.radius}%`:[`${e.inside}%`,`${e.outside}%`];return[{name:o,type:"pie",radius:n,center:["50%","40%"],data:i,emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:e.showLabel,color:e.textColor,lineHeight:16,fontSize:e.textSize,formatter:s=>this.formatLabel(s)}}]}formatLabel(e){const t=this.Style.value;if(!t.showLabel)return"";let o=e.name;return t.showValue&&t.showRate?o=`${e.name}: ${e.value}(${e.percent}%)`:t.showValue?o=`${e.name}: ${e.value}`:t.showRate&&(o=`${e.name}${e.percent}%`),this.insertBreaks(o)}insertBreaks(e){const t=this.Style.value;if(!t.showLabel||!t.wrap)return e;const o=t.wrapByte||5;let i="",n=0,s=0;for(const p of e)p.charCodeAt(0)>=19968&&p.charCodeAt(0)<=40959?(s++,n+=2):n+=1,i+=p,(s>=o||n>=o*2)&&(i+=`
1
+ "use strict";var k=Object.defineProperty,A=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var O=(r,l,c)=>l in r?k(r,l,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[l]=c,d=(r,l)=>{for(var c in l||(l={}))$.call(l,c)&&O(r,c,l[c]);if(C)for(var c of C(l))I.call(l,c)&&O(r,c,l[c]);return r},f=(r,l)=>A(r,B(l));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),y=require("./index-OgmTZiO-.cjs");require("element-plus");const N=require("./EChartComponentBase-C2sxqwSE.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),S=require("./ele-pie-icon-BNhXPoUT.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),j=require("./install-DV5cEgNV.cjs"),z=require("./install-CltTFs4e.cjs"),T=require("./install-nDY6w-GK.cjs"),q={class:"mix-body"},D=["id"],P={DEFAULT_ICON:S.DEFAULT_ICON,ACTIVE_ICON:S.ACTIVE_ICON,NAME_CN:"饼状图",NAME_EN:"Pie",ORDER:1,PLATFORM:["pc","screen","mobile"]},M={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,type:{value:"pie",type:"radio",option:[{value:"pie",label:"component.options.pie_type_pie"},{value:"circle",label:"component.options.pie_type_circle"}],label:"component.options.pie_type"},radius:{value:50,type:"number",label:"component.options.pie_radius",dependent:"type",repel:"circle"},inside:{value:40,type:"number",label:"component.options.pie_inside",dependent:"type",repel:"pie"},outside:{value:75,type:"number",label:"component.options.pie_outside",dependent:"type",repel:"pie"},isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,showLabel:!1,showLegend:{value:!0,type:"checkbox",label:"component.options.showLegend",dependent:"showLabel"},orient:{value:"horizontal",type:"radio",option:[{value:"horizontal",label:"component.options.orient_horizontal"},{value:"vertical",label:"component.options.orient_vertical"}],label:"component.options.orient",dependent:"showLegend"},showValue:{value:!0,type:"checkbox",label:"component.options.showValue",dependent:"showLabel"},showRate:{value:!1,type:"checkbox",label:"component.options.showRate",dependent:"showLabel"},wrap:{value:!1,type:"checkbox",label:"component.options.wrap",dependent:"showLabel"},wrapByte:{value:5,type:"number",label:"component.options.pie_wrapByte",dependent:"wrap"}},H=[{name:"参数一",fv:"",object_id:"",color:"#4162ff"},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a"},{name:"参数三",fv:"",object_id:"",color:"#e24359"}],F=["name","fv","object_id","color"],U=["mosaic","statistics","calculate"],W={useAlias:!1,multiObject:!1,source:"mosaic"},G={DEFAULT:P,OPTIONS:M,DATA:H,PARAMS:F,SOURCE:U,COMMON:W},K=a.defineComponent(f(d({},G),{__name:"pie",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){b.use([j.install,z.install,b.install,b.install$1,T.install]);const l=r,c=y.useLinkStore(),_={horizontal:{orient:"horizontal",bottom:"5%",left:"center"},vertical:{orient:"vertical",right:"5%",top:"5%"}};class L extends N.EChartComponentBase{initChart(){var e,t;super.initChart(),this.props.mode==="preview"&&((e=this.chartObj)==null||e.off("click"),(t=this.chartObj)==null||t.on("click",o=>{var n,s,p,u,h,v;const i=o==null?void 0:o.name;if(typeof i=="string"&&i){const E=((s=(n=this.props.conf)==null?void 0:n.options)==null?void 0:s.linkChannel)==="custom"?(u=(p=this.props.conf)==null?void 0:p.options)==null?void 0:u.customChannel:(v=(h=this.props.conf)==null?void 0:h.options)==null?void 0:v.linkChannel;c.publish(E||"pie","pie",{objectId:"",deviceId:"",type:"select",fieldKey:i,fv:d({key:i},o),source:"pie"})}}))}extractStyles(){return f(d({},super.extractStyles()),{type:this.getOptionValue("type","pie"),radius:this.getOptionValue("radius",50),inside:this.getOptionValue("inside",40),outside:this.getOptionValue("outside",75),showLabel:this.getOptionValue("showLabel",!1),showLegend:this.getOptionValue("showLegend",!0),orient:this.getOptionValue("orient","horizontal"),showValue:this.getOptionValue("showValue",!0),showRate:this.getOptionValue("showRate",!1),wrap:this.getOptionValue("wrap",!1),wrapByte:this.getOptionValue("wrapByte",5)})}getChartOption(){const e=this.Style.value,{data:t,name:o}=this.props.conf,i=t.map((n,s)=>n.color||y.COLORS[s]);return{title:{show:!1,text:o||"",x:"center"},color:i,tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:f(d({show:e.showLabel&&e.showLegend},_[e.orient]),{data:t.map(n=>n.name),textStyle:{color:e.textColor}}),series:this.formatSeries()}}formatSeries(){const e=this.Style.value,{data:t,name:o}=this.props.conf,i=t.map(s=>({value:0,name:s.name})),n=e.type==="pie"?`${e.radius}%`:[`${e.inside}%`,`${e.outside}%`];return[{name:o,type:"pie",radius:n,center:["50%","40%"],data:i,emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:e.showLabel,color:e.textColor,lineHeight:16,fontSize:e.textSize,formatter:s=>this.formatLabel(s)}}]}formatLabel(e){const t=this.Style.value;if(!t.showLabel)return"";let o=e.name;return t.showValue&&t.showRate?o=`${e.name}: ${e.value}(${e.percent}%)`:t.showValue?o=`${e.name}: ${e.value}`:t.showRate&&(o=`${e.name}${e.percent}%`),this.insertBreaks(o)}insertBreaks(e){const t=this.Style.value;if(!t.showLabel||!t.wrap)return e;const o=t.wrapByte||5;let i="",n=0,s=0;for(const p of e)p.charCodeAt(0)>=19968&&p.charCodeAt(0)<=40959?(s++,n+=2):n+=1,i+=p,(s>=o||n>=o*2)&&(i+=`
2
2
  `,s=0,n=0);return i}setHistoryData(e){if(!e||!(e!=null&&e.length))return;const t=this.chartObj.getOption();t.series[0].data.forEach((o,i)=>{var n;o.value=(n=e[i].data[0])!=null?n:0}),this.updateChart(t)}setSocketData(e){if(!e||!this.chartObj)return;const{data:t}=this.props.conf,o=this.chartObj.getOption();t.forEach((i,n)=>{var p,u,h;const s=this.extractDataValue(e,i.fv);(h=(u=(p=o.series)==null?void 0:p[0])==null?void 0:u.data)!=null&&h[n]&&(o.series[0].data[n].value=s!=null?s:0)}),this.updateChart(o)}}const m=new L(l,"pie");m.setupLifecycle();const w=m.getStyle(),V=m.getEchartId(),x=a.computed(()=>R.generateTitleStyle(l.conf.options));return(g,e)=>(a.openBlock(),a.createElementBlock("div",{class:"mix-component",style:a.normalizeStyle({background:a.unref(w).bgColor,borderRadius:`${a.unref(w).radiusSize}px`})},[a.createElementVNode("div",{class:"mix-title",style:a.normalizeStyle(x.value)},a.toDisplayString(r.conf.caption||r.conf.name),5),a.createElementVNode("div",q,[a.createElementVNode("div",{class:"w-full h-full",id:a.unref(V)},null,8,D)]),a.renderSlot(g.$slots,"default",{},void 0,!0)],4))}})),X=y._export_sfc(K,[["__scopeId","data-v-03b40f26"]]);exports.default=X;
@@ -11,9 +11,9 @@ var O = (l, a, r) => a in l ? k(l, a, { enumerable: !0, configurable: !0, writab
11
11
  return l;
12
12
  }, d = (l, a) => E(l, $(a));
13
13
  import { defineComponent as R, computed as j, openBlock as z, createElementBlock as I, normalizeStyle as _, unref as m, createElementVNode as b, toDisplayString as N, renderSlot as D } from "vue";
14
- import { l as T, C as P, _ as H } from "./index-YNdVib_6.js";
14
+ import { l as T, C as P, _ as H } from "./index-CqVPeq0-.js";
15
15
  import "element-plus";
16
- import { E as M } from "./EChartComponentBase-BmS2KONN.js";
16
+ import { E as M } from "./EChartComponentBase-B-VNAC8K.js";
17
17
  import { g as F } from "./titleStyle-BT5GlpAb.js";
18
18
  import { A as U, D as W } from "./ele-pie-icon-RPfHJxqp.js";
19
19
  import { u as G, i as K, a as X } from "./installCanvasRenderer-oDYkyVFy.js";
@@ -1 +1 @@
1
- "use strict";var P=Object.defineProperty,A=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var O=(l,t,r)=>t in l?P(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,M=(l,t)=>{for(var r in t||(t={}))$.call(t,r)&&O(l,r,t[r]);if(D)for(var r of D(t))U.call(t,r)&&O(l,r,t[r]);return l},T=(l,t)=>A(l,W(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),z=require("./ele-box-icon-NZ0BTjhm.cjs"),j=require("./index-6QhTSPkL.cjs"),q=["data-placeholder-id","data-placeholder-name","data-x","data-y","data-w","data-h"],G={key:0,class:"mix-placeholder__label"},H={class:"mix-placeholder__title"},J={key:0,class:"mix-placeholder__name"},K={class:"mix-placeholder__meta"},Q={key:0,class:"mix-placeholder__pixel"},X={class:"mix-placeholder__pixel-pos"},Y={key:1,class:"mix-placeholder__desc"},Z={key:0,class:"mix-placeholder__name-runtime"},ee={DEFAULT_ICON:z.DEFAULT_ICON,ACTIVE_ICON:z.ACTIVE_ICON,NAME_CN:"占位组件",NAME_EN:"Placeholder",ORDER:99,PLATFORM:["pc","screen","mobile"]},te={placeholderName:{value:"",type:"string",label:"占位组件名称"},description:{value:"",type:"string",label:"描述"},bgColor:{value:"rgba(64, 158, 255, 0.08)",type:"color",label:"填充色"},borderColor:{value:"#409EFF",type:"color",label:"边框颜色"},borderWidth:{value:2,type:"number",label:"边框宽度",min:0,max:10},borderStyle:{value:"dashed",type:"radio",label:"边框样式",option:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"},{label:"点线",value:"dotted"}]},radiusSize:{value:4,type:"number",label:"圆角",min:0,max:50},showLabel:{value:!0,type:"checkbox",label:"显示标签"},showInPreview:{value:!1,type:"checkbox",label:"运行时显示边框"}},oe=[],le={},ae={DEFAULT:ee,OPTIONS:te,SOURCE:oe,COMMON:le},ne=e.defineComponent(T(M({},ae),{__name:"placeholder",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(l){const t=l,r=(o,a)=>{var c,i;const n=(i=(c=t.conf)==null?void 0:c.options)==null?void 0:i[o];return n==null?a:typeof n=="object"&&"value"in n?n.value:n},d=e.computed(()=>({placeholderName:r("placeholderName",""),description:r("description",""),bgColor:r("bgColor","rgba(64, 158, 255, 0.08)"),borderColor:r("borderColor","#409EFF"),borderWidth:Number(r("borderWidth",2))||0,borderStyle:r("borderStyle","dashed"),radiusSize:Number(r("radiusSize",4))||0,showLabel:r("showLabel",!0)!==!1,showInPreview:r("showInPreview",!1)===!0})),_=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.name)||((a=t.conf)==null?void 0:a.id)||""}),b=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.caption)||((a=t.conf)==null?void 0:a.name)||""}),F=e.computed(()=>({backgroundColor:d.value.bgColor,borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${d.value.borderWidth}px`,borderRadius:`${d.value.radiusSize}px`})),L=e.computed(()=>({borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${Math.max(1,d.value.borderWidth)}px`,borderRadius:`${d.value.radiusSize}px`,backgroundColor:"transparent"})),m=e.ref(null),S=e.useTemplateRef("rootRef"),N=()=>{const o=S.value;if(!o)return{gridItem:null,canvas:null};const a=o.closest(".vgl-item")||o.closest(".vue-grid-item"),n=o.closest(".canvas");return{gridItem:a,canvas:n}},x=()=>{const{gridItem:o,canvas:a}=N();if(!o||!a)return;const n=o.getBoundingClientRect(),c=a.getBoundingClientRect(),i=a.offsetWidth||1,u=c.width/i||1,s=u===0?1:u;m.value={left:Math.round((n.left-c.left)/s),top:Math.round((n.top-c.top)/s),width:Math.round(n.width/s),height:Math.round(n.height/s)}},y=o=>{var a,n,c,i,u,s,h,v,f;if(typeof window!="undefined")try{window.dispatchEvent(new CustomEvent(`mix-placeholder:${o}`,{detail:{id:((a=t.conf)==null?void 0:a.id)||"",name:_.value,grid:{x:(c=(n=t.conf)==null?void 0:n.x)!=null?c:0,y:(u=(i=t.conf)==null?void 0:i.y)!=null?u:0,w:(h=(s=t.conf)==null?void 0:s.w)!=null?h:0,h:(f=(v=t.conf)==null?void 0:v.h)!=null?f:0},pixel:m.value,mode:t.mode}}))}catch(g){}};let p=null;return e.onMounted(()=>{e.nextTick(()=>{x(),y("registered");const{gridItem:o}=N();o&&typeof ResizeObserver!="undefined"&&(p=new ResizeObserver(()=>{x(),y("updated")}),p.observe(o))})}),e.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,y("unregistered")}),e.watch(()=>{var o,a,n,c,i;return[(o=t.conf)==null?void 0:o.x,(a=t.conf)==null?void 0:a.y,(n=t.conf)==null?void 0:n.w,(c=t.conf)==null?void 0:c.h,(i=t.conf)==null?void 0:i.options,t.mode]},()=>{e.nextTick(()=>{x(),y("updated")})},{deep:!0}),(o,a)=>{var n,c,i,u,s,h,v,f,g,w,C,E,k,B,R,I,V;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:S,class:"mix-placeholder",style:e.normalizeStyle({pointerEvents:l.mode==="edit"?"auto":void 0}),"data-placeholder-id":((n=l.conf)==null?void 0:n.id)||"","data-placeholder-name":_.value,"data-x":(i=(c=l.conf)==null?void 0:c.x)!=null?i:0,"data-y":(s=(u=l.conf)==null?void 0:u.y)!=null?s:0,"data-w":(v=(h=l.conf)==null?void 0:h.w)!=null?v:0,"data-h":(g=(f=l.conf)==null?void 0:f.h)!=null?g:0},[l.mode==="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-placeholder__frame mix-placeholder__frame--edit",style:e.normalizeStyle(F.value)},[d.value.showLabel?(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",H,[a[0]||(a[0]=e.createElementVNode("span",{class:"mix-placeholder__tag"},"占位组件",-1)),b.value?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",K,[e.createElementVNode("span",null,"x:"+e.toDisplayString((C=(w=l.conf)==null?void 0:w.x)!=null?C:0),1),e.createElementVNode("span",null,"y:"+e.toDisplayString((k=(E=l.conf)==null?void 0:E.y)!=null?k:0),1),e.createElementVNode("span",null,"w:"+e.toDisplayString((R=(B=l.conf)==null?void 0:B.w)!=null?R:0),1),e.createElementVNode("span",null,"h:"+e.toDisplayString((V=(I=l.conf)==null?void 0:I.h)!=null?V:0),1)]),m.value?(e.openBlock(),e.createElementBlock("div",Q,[e.createTextVNode(e.toDisplayString(m.value.width)+"px × "+e.toDisplayString(m.value.height)+"px ",1),e.createElementVNode("span",X,"@("+e.toDisplayString(m.value.left)+", "+e.toDisplayString(m.value.top)+")",1)])):e.createCommentVNode("",!0),d.value.description?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(d.value.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],4)):d.value.showInPreview?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mix-placeholder__frame mix-placeholder__frame--runtime",style:e.normalizeStyle(L.value)},[d.value.showLabel&&b.value?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],12,q)}}})),re=j._export_sfc(ne,[["__scopeId","data-v-d6ad7f4c"]]);exports.default=re;
1
+ "use strict";var P=Object.defineProperty,A=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var O=(l,t,r)=>t in l?P(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,M=(l,t)=>{for(var r in t||(t={}))$.call(t,r)&&O(l,r,t[r]);if(D)for(var r of D(t))U.call(t,r)&&O(l,r,t[r]);return l},T=(l,t)=>A(l,W(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),z=require("./ele-box-icon-NZ0BTjhm.cjs"),j=require("./index-OgmTZiO-.cjs"),q=["data-placeholder-id","data-placeholder-name","data-x","data-y","data-w","data-h"],G={key:0,class:"mix-placeholder__label"},H={class:"mix-placeholder__title"},J={key:0,class:"mix-placeholder__name"},K={class:"mix-placeholder__meta"},Q={key:0,class:"mix-placeholder__pixel"},X={class:"mix-placeholder__pixel-pos"},Y={key:1,class:"mix-placeholder__desc"},Z={key:0,class:"mix-placeholder__name-runtime"},ee={DEFAULT_ICON:z.DEFAULT_ICON,ACTIVE_ICON:z.ACTIVE_ICON,NAME_CN:"占位组件",NAME_EN:"Placeholder",ORDER:99,PLATFORM:["pc","screen","mobile"]},te={placeholderName:{value:"",type:"string",label:"占位组件名称"},description:{value:"",type:"string",label:"描述"},bgColor:{value:"rgba(64, 158, 255, 0.08)",type:"color",label:"填充色"},borderColor:{value:"#409EFF",type:"color",label:"边框颜色"},borderWidth:{value:2,type:"number",label:"边框宽度",min:0,max:10},borderStyle:{value:"dashed",type:"radio",label:"边框样式",option:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"},{label:"点线",value:"dotted"}]},radiusSize:{value:4,type:"number",label:"圆角",min:0,max:50},showLabel:{value:!0,type:"checkbox",label:"显示标签"},showInPreview:{value:!1,type:"checkbox",label:"运行时显示边框"}},oe=[],le={},ae={DEFAULT:ee,OPTIONS:te,SOURCE:oe,COMMON:le},ne=e.defineComponent(T(M({},ae),{__name:"placeholder",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(l){const t=l,r=(o,a)=>{var c,i;const n=(i=(c=t.conf)==null?void 0:c.options)==null?void 0:i[o];return n==null?a:typeof n=="object"&&"value"in n?n.value:n},d=e.computed(()=>({placeholderName:r("placeholderName",""),description:r("description",""),bgColor:r("bgColor","rgba(64, 158, 255, 0.08)"),borderColor:r("borderColor","#409EFF"),borderWidth:Number(r("borderWidth",2))||0,borderStyle:r("borderStyle","dashed"),radiusSize:Number(r("radiusSize",4))||0,showLabel:r("showLabel",!0)!==!1,showInPreview:r("showInPreview",!1)===!0})),_=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.name)||((a=t.conf)==null?void 0:a.id)||""}),b=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.caption)||((a=t.conf)==null?void 0:a.name)||""}),F=e.computed(()=>({backgroundColor:d.value.bgColor,borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${d.value.borderWidth}px`,borderRadius:`${d.value.radiusSize}px`})),L=e.computed(()=>({borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${Math.max(1,d.value.borderWidth)}px`,borderRadius:`${d.value.radiusSize}px`,backgroundColor:"transparent"})),m=e.ref(null),S=e.useTemplateRef("rootRef"),N=()=>{const o=S.value;if(!o)return{gridItem:null,canvas:null};const a=o.closest(".vgl-item")||o.closest(".vue-grid-item"),n=o.closest(".canvas");return{gridItem:a,canvas:n}},x=()=>{const{gridItem:o,canvas:a}=N();if(!o||!a)return;const n=o.getBoundingClientRect(),c=a.getBoundingClientRect(),i=a.offsetWidth||1,u=c.width/i||1,s=u===0?1:u;m.value={left:Math.round((n.left-c.left)/s),top:Math.round((n.top-c.top)/s),width:Math.round(n.width/s),height:Math.round(n.height/s)}},y=o=>{var a,n,c,i,u,s,h,v,f;if(typeof window!="undefined")try{window.dispatchEvent(new CustomEvent(`mix-placeholder:${o}`,{detail:{id:((a=t.conf)==null?void 0:a.id)||"",name:_.value,grid:{x:(c=(n=t.conf)==null?void 0:n.x)!=null?c:0,y:(u=(i=t.conf)==null?void 0:i.y)!=null?u:0,w:(h=(s=t.conf)==null?void 0:s.w)!=null?h:0,h:(f=(v=t.conf)==null?void 0:v.h)!=null?f:0},pixel:m.value,mode:t.mode}}))}catch(g){}};let p=null;return e.onMounted(()=>{e.nextTick(()=>{x(),y("registered");const{gridItem:o}=N();o&&typeof ResizeObserver!="undefined"&&(p=new ResizeObserver(()=>{x(),y("updated")}),p.observe(o))})}),e.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,y("unregistered")}),e.watch(()=>{var o,a,n,c,i;return[(o=t.conf)==null?void 0:o.x,(a=t.conf)==null?void 0:a.y,(n=t.conf)==null?void 0:n.w,(c=t.conf)==null?void 0:c.h,(i=t.conf)==null?void 0:i.options,t.mode]},()=>{e.nextTick(()=>{x(),y("updated")})},{deep:!0}),(o,a)=>{var n,c,i,u,s,h,v,f,g,w,C,E,k,B,R,I,V;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:S,class:"mix-placeholder",style:e.normalizeStyle({pointerEvents:l.mode==="edit"?"auto":void 0}),"data-placeholder-id":((n=l.conf)==null?void 0:n.id)||"","data-placeholder-name":_.value,"data-x":(i=(c=l.conf)==null?void 0:c.x)!=null?i:0,"data-y":(s=(u=l.conf)==null?void 0:u.y)!=null?s:0,"data-w":(v=(h=l.conf)==null?void 0:h.w)!=null?v:0,"data-h":(g=(f=l.conf)==null?void 0:f.h)!=null?g:0},[l.mode==="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-placeholder__frame mix-placeholder__frame--edit",style:e.normalizeStyle(F.value)},[d.value.showLabel?(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",H,[a[0]||(a[0]=e.createElementVNode("span",{class:"mix-placeholder__tag"},"占位组件",-1)),b.value?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",K,[e.createElementVNode("span",null,"x:"+e.toDisplayString((C=(w=l.conf)==null?void 0:w.x)!=null?C:0),1),e.createElementVNode("span",null,"y:"+e.toDisplayString((k=(E=l.conf)==null?void 0:E.y)!=null?k:0),1),e.createElementVNode("span",null,"w:"+e.toDisplayString((R=(B=l.conf)==null?void 0:B.w)!=null?R:0),1),e.createElementVNode("span",null,"h:"+e.toDisplayString((V=(I=l.conf)==null?void 0:I.h)!=null?V:0),1)]),m.value?(e.openBlock(),e.createElementBlock("div",Q,[e.createTextVNode(e.toDisplayString(m.value.width)+"px × "+e.toDisplayString(m.value.height)+"px ",1),e.createElementVNode("span",X,"@("+e.toDisplayString(m.value.left)+", "+e.toDisplayString(m.value.top)+")",1)])):e.createCommentVNode("",!0),d.value.description?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(d.value.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],4)):d.value.showInPreview?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mix-placeholder__frame mix-placeholder__frame--runtime",style:e.normalizeStyle(L.value)},[d.value.showLabel&&b.value?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],12,q)}}})),re=j._export_sfc(ne,[["__scopeId","data-v-d6ad7f4c"]]);exports.default=re;
@@ -12,7 +12,7 @@ var $ = (o, e, r) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writab
12
12
  }, D = (o, e) => G(o, H(e));
13
13
  import { defineComponent as Q, computed as w, ref as X, useTemplateRef as Y, onMounted as Z, nextTick as U, onBeforeUnmount as ee, watch as te, openBlock as h, createElementBlock as m, normalizeStyle as R, createElementVNode as p, toDisplayString as i, createCommentVNode as b, createTextVNode as oe, renderSlot as le } from "vue";
14
14
  import { A as ae, D as re } from "./ele-box-icon-Brlhb3oN.js";
15
- import { _ as de } from "./index-YNdVib_6.js";
15
+ import { _ as de } from "./index-CqVPeq0-.js";
16
16
  const ne = ["data-placeholder-id", "data-placeholder-name", "data-x", "data-y", "data-w", "data-h"], ce = {
17
17
  key: 0,
18
18
  class: "mix-placeholder__label"