react-big-screen 0.0.0 → 0.0.2

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 (432) hide show
  1. package/README.md +307 -64
  2. package/es/IInputNumber-D1VHHCf0.mjs +37 -0
  3. package/es/Line-_Oh8Pbbj.mjs +146 -0
  4. package/es/ProgressList-B37WCaue.mjs +4 -0
  5. package/es/attributes-BPfIEMhu.mjs +46 -0
  6. package/es/attributes-Bd6bjYNO.mjs +57 -0
  7. package/es/attributes-BwCVvyg1.mjs +46 -0
  8. package/es/attributes-C4LeY1BZ.mjs +116 -0
  9. package/es/attributes-CE73rly0.mjs +34 -0
  10. package/es/attributes-CSKP7npu.mjs +96 -0
  11. package/es/attributes-Ca3YwNp_.mjs +40 -0
  12. package/es/attributes-DZxC4B37.mjs +24 -0
  13. package/es/attributes-D_stokyh.mjs +31 -0
  14. package/es/attributes-DieePkzV.mjs +63 -0
  15. package/es/attributes-LoqmZojB.mjs +38 -0
  16. package/es/attributes-ue-CmjAw.mjs +187 -0
  17. package/es/background-C6jjuAGp.mjs +4 -0
  18. package/es/bar-CYwWrGQo.mjs +4 -0
  19. package/es/barLine-PdxYMjap.mjs +4 -0
  20. package/es/base-1-Bxyjxg2p.mjs +4 -0
  21. package/es/base-2-DwwJwZna.mjs +4 -0
  22. package/es/base-3-Cgpni-Ls.mjs +4 -0
  23. package/es/base-4-B347HMAK.mjs +4 -0
  24. package/es/beian.png +0 -0
  25. package/es/bg-theme-1-C6_IGFfb.mjs +4 -0
  26. package/es/bg-theme-2-CUzHZf9k.mjs +4 -0
  27. package/es/bg-theme-3-D8JmxCmu.mjs +4 -0
  28. package/es/bg-theme-4-DSDHPL-t.mjs +4 -0
  29. package/es/bg-theme-5-CSy6VFVO.mjs +4 -0
  30. package/es/bg-theme-6-rNDMxpbu.mjs +4 -0
  31. package/es/bg-theme-7-X9aTr92s.mjs +4 -0
  32. package/es/button-DSF24312.mjs +4 -0
  33. package/es/carousel-BAaOAU7Z.mjs +4 -0
  34. package/es/china-Cb9KgeSB.mjs +77092 -0
  35. package/es/china-ten-DJT5AHpU.mjs +162 -0
  36. package/es/chinaMap-DqxLnLmi.mjs +4 -0
  37. package/es/clock-DnKpmpR_.mjs +4 -0
  38. package/es/com-bg-1-CziqISRC.mjs +4 -0
  39. package/es/com-bg-2-CJpBMT0l.mjs +4 -0
  40. package/es/com-bg-3--MVO0Zy-.mjs +4 -0
  41. package/es/com-bg-4-CtztvOjH.mjs +4 -0
  42. package/es/com-bg-5-Dn0jCJgl.mjs +4 -0
  43. package/es/com-bg-6-DerMFR5l.mjs +4 -0
  44. package/es/dateDisplay-DOZ8l8c3.mjs +4 -0
  45. package/es/defaultImage-D8SVO55a.mjs +4 -0
  46. package/es/demo.amd.js +90 -0
  47. package/es/demo.umd.js +94 -0
  48. package/es/doubleText-B-gI7gxd.mjs +4 -0
  49. package/es/example/classic.json +1 -0
  50. package/es/example/multiple-components-interactive.json +1 -0
  51. package/es/gauge-5zG2YNJg.mjs +4 -0
  52. package/es/horizontalBar-D25X8HSd.mjs +4 -0
  53. package/es/image-C9zpKfcR.mjs +4 -0
  54. package/es/index-5L7Vf29E.mjs +62 -0
  55. package/es/index-7ZW-SCwo.mjs +37 -0
  56. package/es/index-B00lQcU7.mjs +217 -0
  57. package/es/index-BE6SbJah.mjs +67 -0
  58. package/es/index-BFdbTW64.mjs +16 -0
  59. package/es/index-BH8sNWnz.mjs +40 -0
  60. package/es/index-BSb4qVX4.mjs +34 -0
  61. package/es/index-BUdNXLkt.mjs +259 -0
  62. package/es/index-BVzODV3B.mjs +67 -0
  63. package/es/index-BXv4ZOBe.mjs +95 -0
  64. package/es/index-Bf6X5Fsf.mjs +101 -0
  65. package/es/index-Bx44D9HL.mjs +4728 -0
  66. package/es/index-Bz8aOQKt.mjs +58 -0
  67. package/es/index-CNVmSNi4.mjs +48 -0
  68. package/es/index-COR9xxjJ.mjs +24 -0
  69. package/es/index-CWaDu7tv.mjs +25 -0
  70. package/es/index-Ch7bAVMa.mjs +39 -0
  71. package/es/index-D2MkDARx.mjs +43 -0
  72. package/es/index-DzGMaMlo.mjs +116 -0
  73. package/es/index-EkKLbWrX.mjs +4407 -0
  74. package/es/index-Gk3zSHHS.mjs +44 -0
  75. package/es/index-NDbr0gtf.mjs +501 -0
  76. package/es/index-NIXnXIfG.mjs +151 -0
  77. package/es/index-WI440ion.mjs +91 -0
  78. package/es/index-dvGAMCvV.mjs +101 -0
  79. package/es/index-oRp9BKd0.mjs +139 -0
  80. package/es/index-syzd3ScW.mjs +45 -0
  81. package/es/index-w0pdPP5S.mjs +29 -0
  82. package/es/index.mjs +11 -0
  83. package/es/input-BnNvyMJg.mjs +4 -0
  84. package/es/line-5qH7n1hB.mjs +4 -0
  85. package/es/logo.png +0 -0
  86. package/es/page-nav-CgQW4-Fl.mjs +4 -0
  87. package/es/peopleTable-yWF2Rkyo.mjs +4 -0
  88. package/es/pie-CkCoP4pD.mjs +4 -0
  89. package/es/radar-DmhYvzXw.mjs +4 -0
  90. package/es/random-DD0zMfMm.mjs +11 -0
  91. package/es/ring-BcgSqTwf.mjs +4 -0
  92. package/es/scrollList-DPCIAc32.mjs +4 -0
  93. package/es/selectPage-BQkRPT-9.mjs +25 -0
  94. package/es/specialCard-jikYSVVg.mjs +4 -0
  95. package/es/specialTitle-DHomK2iu.mjs +4 -0
  96. package/es/style.css +1 -0
  97. package/es/text-Cn6EC5YR.mjs +4 -0
  98. package/es/title-1-d6ywbVeM.mjs +4 -0
  99. package/es/title-2-D71Ygwgt.mjs +4 -0
  100. package/es/title-3-X8ry0PXo.mjs +4 -0
  101. package/es/title-4-HL43GPvP.mjs +4 -0
  102. package/es/title-Bb_PVLwM.mjs +4 -0
  103. package/es/useCurrentPageId-DrIZvYrl.mjs +17 -0
  104. package/es/useEffectOnce-DrBvWFlm.mjs +7 -0
  105. package/es/useListenRef-C7BrHZ68.mjs +8 -0
  106. package/es/useResizeDom-CwFwXEqh.mjs +21 -0
  107. package/package.json +30 -3
  108. package/types/src/common-module.d.ts +2 -0
  109. package/types/src/components/AddComponentNodeButton/RenderPopover.d.ts +4 -0
  110. package/types/src/components/AddComponentNodeButton/index.d.ts +10 -0
  111. package/types/src/components/AddExposesButton/index.d.ts +14 -0
  112. package/types/src/components/AddRemoteTextDialog/index.d.ts +11 -0
  113. package/types/src/components/Ask/AskComponent.d.ts +10 -0
  114. package/types/src/components/Ask/index.d.ts +14 -0
  115. package/types/src/components/Attributes/base/IColorPicker.d.ts +11 -0
  116. package/types/src/components/Attributes/base/IInput.d.ts +5 -0
  117. package/types/src/components/Attributes/base/IInputNumber.d.ts +5 -0
  118. package/types/src/components/Attributes/base/ITextArea.d.ts +5 -0
  119. package/types/src/components/Attributes/base/ResetButton.d.ts +6 -0
  120. package/types/src/components/Attributes/base/index.d.ts +11 -0
  121. package/types/src/components/Attributes/font/FontWeightSelect.d.ts +3 -0
  122. package/types/src/components/Attributes/font/TextAlignSelect.d.ts +4 -0
  123. package/types/src/components/Attributes/font/index.d.ts +8 -0
  124. package/types/src/components/Attributes/index.d.ts +9 -0
  125. package/types/src/components/Attributes/layout/AttrContainer.d.ts +6 -0
  126. package/types/src/components/Attributes/layout/Line.d.ts +20 -0
  127. package/types/src/components/Attributes/layout/index.d.ts +8 -0
  128. package/types/src/components/AutoScroll/index.d.ts +17 -0
  129. package/types/src/components/CodeEditor/index.d.ts +14 -0
  130. package/types/src/components/CodeEditor/useWorker.d.ts +0 -0
  131. package/types/src/components/ComponentNodeImage/index.d.ts +8 -0
  132. package/types/src/components/ComponentNodesSelect/index.d.ts +2 -0
  133. package/types/src/components/ConfigRender/components/antdButtonTypeSelect.d.ts +2 -0
  134. package/types/src/components/ConfigRender/components/checkbox.d.ts +2 -0
  135. package/types/src/components/ConfigRender/components/checkboxValue.d.ts +2 -0
  136. package/types/src/components/ConfigRender/components/colorPicker.d.ts +2 -0
  137. package/types/src/components/ConfigRender/components/fontWeightSelect.d.ts +2 -0
  138. package/types/src/components/ConfigRender/components/index.d.ts +2 -0
  139. package/types/src/components/ConfigRender/components/input.d.ts +2 -0
  140. package/types/src/components/ConfigRender/components/inputNumber.d.ts +2 -0
  141. package/types/src/components/ConfigRender/components/select.d.ts +2 -0
  142. package/types/src/components/ConfigRender/components/slider.d.ts +2 -0
  143. package/types/src/components/ConfigRender/components/textAlignSelect.d.ts +2 -0
  144. package/types/src/components/ConfigRender/components/textarea.d.ts +2 -0
  145. package/types/src/components/ConfigRender/index.d.ts +36 -0
  146. package/types/src/components/CustomDropDown/index.d.ts +13 -0
  147. package/types/src/components/EditEventDialog/components/EventOptions/CommonOptions.d.ts +7 -0
  148. package/types/src/components/EditEventDialog/components/EventOptions/CustomOptions.d.ts +7 -0
  149. package/types/src/components/EditEventDialog/components/EventOptions/RequestOptions.d.ts +7 -0
  150. package/types/src/components/EditEventDialog/components/EventOptions/VisibleOptions.d.ts +7 -0
  151. package/types/src/components/EditEventDialog/components/EventOptions/index.d.ts +8 -0
  152. package/types/src/components/EditEventDialog/components/TargetComponentNodesList/index.d.ts +12 -0
  153. package/types/src/components/EditEventDialog/components/TargetOperateList/index.d.ts +13 -0
  154. package/types/src/components/EditEventDialog/index.d.ts +14 -0
  155. package/types/src/components/EditFunctionTextButton/EditModal.d.ts +11 -0
  156. package/types/src/components/EditFunctionTextButton/index.d.ts +8 -0
  157. package/types/src/components/EditText/index.d.ts +7 -0
  158. package/types/src/components/GetSizeContainer/index.d.ts +11 -0
  159. package/types/src/components/ICustomSelect/CustomSelect.d.ts +44 -0
  160. package/types/src/components/ICustomSelect/index.d.ts +17 -0
  161. package/types/src/components/ICustomSelect/type.d.ts +9 -0
  162. package/types/src/components/IEmpty/index.d.ts +8 -0
  163. package/types/src/components/IconFont/index.d.ts +6 -0
  164. package/types/src/components/InputNumberWithSuffix/index.d.ts +9 -0
  165. package/types/src/components/ReactECharts/echart.d.ts +9 -0
  166. package/types/src/components/ReactECharts/hooks/useIsNeedClearEcharts.d.ts +3 -0
  167. package/types/src/components/ReactECharts/index.d.ts +25 -0
  168. package/types/src/components/ScaleSelect/index.d.ts +7 -0
  169. package/types/src/components/SelectedInstancesSelect/index.d.ts +2 -0
  170. package/types/src/components/TabsHead/index.d.ts +16 -0
  171. package/types/src/components/TooltipButton/index.d.ts +11 -0
  172. package/types/src/engine/built-in/base/Background/attributes.d.ts +8 -0
  173. package/types/src/engine/built-in/base/Background/index.d.ts +3 -0
  174. package/types/src/engine/built-in/base/Button/attributes.d.ts +12 -0
  175. package/types/src/engine/built-in/base/Button/index.d.ts +6 -0
  176. package/types/src/engine/built-in/base/DateDisplay/attributes.d.ts +10 -0
  177. package/types/src/engine/built-in/base/DateDisplay/index.d.ts +3 -0
  178. package/types/src/engine/built-in/base/DoubleText/attributes.d.ts +23 -0
  179. package/types/src/engine/built-in/base/DoubleText/index.d.ts +3 -0
  180. package/types/src/engine/built-in/base/Image/attributes.d.ts +9 -0
  181. package/types/src/engine/built-in/base/Image/index.d.ts +3 -0
  182. package/types/src/engine/built-in/base/Input/attributes.d.ts +9 -0
  183. package/types/src/engine/built-in/base/Input/index.d.ts +8 -0
  184. package/types/src/engine/built-in/base/Text/attributes.d.ts +15 -0
  185. package/types/src/engine/built-in/base/Text/index.d.ts +8 -0
  186. package/types/src/engine/built-in/base/Title/attributes.d.ts +19 -0
  187. package/types/src/engine/built-in/base/Title/index.d.ts +8 -0
  188. package/types/src/engine/built-in/base/index.d.ts +2 -0
  189. package/types/src/engine/built-in/charts/Bar/index.d.ts +2 -0
  190. package/types/src/engine/built-in/charts/BarLine/index.d.ts +2 -0
  191. package/types/src/engine/built-in/charts/Gauge/index.d.ts +2 -0
  192. package/types/src/engine/built-in/charts/HorizontalBar/index.d.ts +2 -0
  193. package/types/src/engine/built-in/charts/Line/attributes.d.ts +10 -0
  194. package/types/src/engine/built-in/charts/Line/components/EditSeriesList/Item.d.ts +7 -0
  195. package/types/src/engine/built-in/charts/Line/components/EditSeriesList/index.d.ts +12 -0
  196. package/types/src/engine/built-in/charts/Line/index.d.ts +3 -0
  197. package/types/src/engine/built-in/charts/Line/utils.d.ts +12 -0
  198. package/types/src/engine/built-in/charts/Pie/index.d.ts +2 -0
  199. package/types/src/engine/built-in/charts/Radar/index.d.ts +2 -0
  200. package/types/src/engine/built-in/charts/Ring/attributes.d.ts +7 -0
  201. package/types/src/engine/built-in/charts/Ring/index.d.ts +3 -0
  202. package/types/src/engine/built-in/charts/index.d.ts +2 -0
  203. package/types/src/engine/built-in/index.d.ts +2 -0
  204. package/types/src/engine/built-in/layout/Carousel/attributes.d.ts +10 -0
  205. package/types/src/engine/built-in/layout/Carousel/components/EditList/index.d.ts +12 -0
  206. package/types/src/engine/built-in/layout/Carousel/components/EditList/item.d.ts +10 -0
  207. package/types/src/engine/built-in/layout/Carousel/components/ToggleBar/index.d.ts +7 -0
  208. package/types/src/engine/built-in/layout/Carousel/index.d.ts +8 -0
  209. package/types/src/engine/built-in/layout/SpecialCard/attributes.d.ts +12 -0
  210. package/types/src/engine/built-in/layout/SpecialCard/index.d.ts +3 -0
  211. package/types/src/engine/built-in/layout/index.d.ts +2 -0
  212. package/types/src/engine/built-in/nav/PageNav/components/NavLine/index.d.ts +13 -0
  213. package/types/src/engine/built-in/nav/PageNav/index.d.ts +2 -0
  214. package/types/src/engine/built-in/nav/PageNav/utils/index.d.ts +7 -0
  215. package/types/src/engine/built-in/nav/index.d.ts +2 -0
  216. package/types/src/engine/built-in/other/ChinaMap/attributes.d.ts +16 -0
  217. package/types/src/engine/built-in/other/ChinaMap/data/mockData.d.ts +15 -0
  218. package/types/src/engine/built-in/other/ChinaMap/index.d.ts +3 -0
  219. package/types/src/engine/built-in/other/ChinaMap/json/china-ten.json.d.ts +66 -0
  220. package/types/src/engine/built-in/other/ChinaMap/json/china.json.d.ts +3 -0
  221. package/types/src/engine/built-in/other/ChinaMap/utils/createAirplaneLine.d.ts +2 -0
  222. package/types/src/engine/built-in/other/ChinaMap/utils/index.d.ts +2 -0
  223. package/types/src/engine/built-in/other/ChinaMap/utils/registerChinaMap.d.ts +12 -0
  224. package/types/src/engine/built-in/other/DefaultImage/attributes.d.ts +6 -0
  225. package/types/src/engine/built-in/other/DefaultImage/index.d.ts +4 -0
  226. package/types/src/engine/built-in/other/DefaultImage/lazyImage.d.ts +4 -0
  227. package/types/src/engine/built-in/other/PeopleTable/index.d.ts +5 -0
  228. package/types/src/engine/built-in/other/PeopleTable/utils/index.d.ts +1 -0
  229. package/types/src/engine/built-in/other/PeopleTable/utils/mockData.d.ts +9 -0
  230. package/types/src/engine/built-in/other/ProgressList/attributes.d.ts +15 -0
  231. package/types/src/engine/built-in/other/ProgressList/index.d.ts +3 -0
  232. package/types/src/engine/built-in/other/ScrollList/attributes.d.ts +7 -0
  233. package/types/src/engine/built-in/other/ScrollList/index.d.ts +3 -0
  234. package/types/src/engine/built-in/other/SpecialTitle/attributes.d.ts +16 -0
  235. package/types/src/engine/built-in/other/SpecialTitle/index.d.ts +3 -0
  236. package/types/src/engine/built-in/other/index.d.ts +2 -0
  237. package/types/src/engine/component/index.d.ts +31 -0
  238. package/types/src/engine/componentNode/index.d.ts +73 -0
  239. package/types/src/engine/config/index.d.ts +10 -0
  240. package/types/src/engine/enum/event.d.ts +40 -0
  241. package/types/src/engine/enum/functionString.d.ts +13 -0
  242. package/types/src/engine/enum/index.d.ts +3 -0
  243. package/types/src/engine/enum/key.d.ts +10 -0
  244. package/types/src/engine/favorites/index.d.ts +15 -0
  245. package/types/src/engine/hooks/index.d.ts +16 -0
  246. package/types/src/engine/hooks/useComponentNode.d.ts +2 -0
  247. package/types/src/engine/hooks/useComponentNodeRequest.d.ts +10 -0
  248. package/types/src/engine/hooks/useComponentNodes.d.ts +2 -0
  249. package/types/src/engine/hooks/useComponents.d.ts +2 -0
  250. package/types/src/engine/hooks/useConfig.d.ts +4 -0
  251. package/types/src/engine/hooks/useCreateHandleTrigger.d.ts +2 -0
  252. package/types/src/engine/hooks/useCreateUseExposeHook.d.ts +1 -0
  253. package/types/src/engine/hooks/useCurrentPage.d.ts +2 -0
  254. package/types/src/engine/hooks/useCurrentPageId.d.ts +1 -0
  255. package/types/src/engine/hooks/useFavorites.d.ts +2 -0
  256. package/types/src/engine/hooks/useHistoryData.d.ts +2 -0
  257. package/types/src/engine/hooks/useJson.d.ts +2 -0
  258. package/types/src/engine/hooks/usePackages.d.ts +2 -0
  259. package/types/src/engine/hooks/usePages.d.ts +2 -0
  260. package/types/src/engine/hooks/useRegisterInstance.d.ts +2 -0
  261. package/types/src/engine/hooks/useSelectedInstances.d.ts +2 -0
  262. package/types/src/engine/index.d.ts +46 -0
  263. package/types/src/engine/instance/BaseInstance.d.ts +19 -0
  264. package/types/src/engine/instance/index.d.ts +20 -0
  265. package/types/src/engine/model/BaseEvent.d.ts +16 -0
  266. package/types/src/engine/model/index.d.ts +1 -0
  267. package/types/src/engine/page/index.d.ts +24 -0
  268. package/types/src/engine/store/index.d.ts +11 -0
  269. package/types/src/engine/types.d.ts +160 -0
  270. package/types/src/engine/utils/createComponent.d.ts +21 -0
  271. package/types/src/engine/utils/createUUID.d.ts +7 -0
  272. package/types/src/engine/utils/getPackageComponentNodes.d.ts +8 -0
  273. package/types/src/engine/utils/index.d.ts +9 -0
  274. package/types/src/export/components/RenderEditor/index.d.ts +8 -0
  275. package/types/src/export/components/RenderPreview/index.d.ts +8 -0
  276. package/types/src/export/context.d.ts +9 -0
  277. package/types/src/export/index.d.ts +80 -0
  278. package/types/src/export/resources.d.ts +5 -0
  279. package/types/src/hooks/index.d.ts +12 -0
  280. package/types/src/hooks/useBindModal/RenderModal.d.ts +17 -0
  281. package/types/src/hooks/useBindModal/index.d.ts +6 -0
  282. package/types/src/hooks/useClickDomOutsideOnce.d.ts +2 -0
  283. package/types/src/hooks/useDomEvents.d.ts +4 -0
  284. package/types/src/hooks/useEffectOnce.d.ts +2 -0
  285. package/types/src/hooks/useListenRef.d.ts +2 -0
  286. package/types/src/hooks/useListenState.d.ts +2 -0
  287. package/types/src/hooks/useListenStateWithRef.d.ts +2 -0
  288. package/types/src/hooks/useResizeDom.d.ts +2 -0
  289. package/types/src/hooks/useStateWithRef.d.ts +2 -0
  290. package/types/src/i18n/index.d.ts +7 -0
  291. package/types/src/i18n/locales/en.d.ts +3 -0
  292. package/types/src/i18n/locales/zh.d.ts +3 -0
  293. package/types/src/i18n/type.d.ts +82 -0
  294. package/types/src/main.d.ts +0 -0
  295. package/types/src/packages/contextMenu/components/HoverItem/index.d.ts +8 -0
  296. package/types/src/packages/contextMenu/components/RenderContextMenu/index.d.ts +9 -0
  297. package/types/src/packages/contextMenu/components/RenderList/index.d.ts +17 -0
  298. package/types/src/packages/contextMenu/createContextMenu.d.ts +10 -0
  299. package/types/src/packages/contextMenu/hooks/index.d.ts +1 -0
  300. package/types/src/packages/contextMenu/hooks/useContextMenu.d.ts +6 -0
  301. package/types/src/packages/contextMenu/index.d.ts +10 -0
  302. package/types/src/packages/dragMove/index.d.ts +18 -0
  303. package/types/src/packages/dragMove/utils/index.d.ts +1 -0
  304. package/types/src/packages/dragMove/utils/moveableDom.d.ts +8 -0
  305. package/types/src/packages/dragMove/utils/startMove.d.ts +31 -0
  306. package/types/src/packages/globalCursor/index.d.ts +10 -0
  307. package/types/src/packages/historyRecord/index.d.ts +26 -0
  308. package/types/src/packages/historyRecord/types.d.ts +16 -0
  309. package/types/src/packages/infiniteContainer/index.d.ts +16 -0
  310. package/types/src/packages/infiniteContainer/utils/getWheelInfo.d.ts +9 -0
  311. package/types/src/packages/infiniteContainer/utils/index.d.ts +2 -0
  312. package/types/src/packages/infiniteContainer/utils/range.d.ts +1 -0
  313. package/types/src/packages/request/index.d.ts +7 -0
  314. package/types/src/packages/request/request.d.ts +2 -0
  315. package/types/src/packages/request/requestManager.d.ts +21 -0
  316. package/types/src/packages/shortCutKeys/behaviors/addHistory.d.ts +5 -0
  317. package/types/src/packages/shortCutKeys/behaviors/cancelUndoHistory.d.ts +1 -0
  318. package/types/src/packages/shortCutKeys/behaviors/clearComponentNodes.d.ts +1 -0
  319. package/types/src/packages/shortCutKeys/behaviors/collectSelectedComponentNodes.d.ts +1 -0
  320. package/types/src/packages/shortCutKeys/behaviors/copySelectedComponentNodes.d.ts +1 -0
  321. package/types/src/packages/shortCutKeys/behaviors/deleteSelectedComponentNodes.d.ts +1 -0
  322. package/types/src/packages/shortCutKeys/behaviors/getAllChildrenComponentNodes.d.ts +2 -0
  323. package/types/src/packages/shortCutKeys/behaviors/getAllSelectedComponentNodes.d.ts +2 -0
  324. package/types/src/packages/shortCutKeys/behaviors/goHistory.d.ts +1 -0
  325. package/types/src/packages/shortCutKeys/behaviors/index.d.ts +35 -0
  326. package/types/src/packages/shortCutKeys/behaviors/lockAllSelectedComponentNodes.d.ts +1 -0
  327. package/types/src/packages/shortCutKeys/behaviors/saveLocal.d.ts +5 -0
  328. package/types/src/packages/shortCutKeys/behaviors/selectAllComponentNodes.d.ts +1 -0
  329. package/types/src/packages/shortCutKeys/behaviors/selectPage.d.ts +1 -0
  330. package/types/src/packages/shortCutKeys/behaviors/selectedGroup.d.ts +1 -0
  331. package/types/src/packages/shortCutKeys/behaviors/selectedLevelDown.d.ts +1 -0
  332. package/types/src/packages/shortCutKeys/behaviors/selectedLevelUp.d.ts +1 -0
  333. package/types/src/packages/shortCutKeys/behaviors/selectedMoveDown.d.ts +1 -0
  334. package/types/src/packages/shortCutKeys/behaviors/selectedMoveLeft.d.ts +1 -0
  335. package/types/src/packages/shortCutKeys/behaviors/selectedMoveRight.d.ts +1 -0
  336. package/types/src/packages/shortCutKeys/behaviors/selectedMoveUp.d.ts +1 -0
  337. package/types/src/packages/shortCutKeys/behaviors/selectedToBottom.d.ts +1 -0
  338. package/types/src/packages/shortCutKeys/behaviors/selectedToTop.d.ts +1 -0
  339. package/types/src/packages/shortCutKeys/behaviors/selectedUnGroup.d.ts +1 -0
  340. package/types/src/packages/shortCutKeys/behaviors/unSelectAllComponentNodes.d.ts +1 -0
  341. package/types/src/packages/shortCutKeys/behaviors/undoHistory.d.ts +1 -0
  342. package/types/src/packages/shortCutKeys/behaviors/unlockAllSelectedComponentNodes.d.ts +1 -0
  343. package/types/src/packages/shortCutKeys/behaviors/zoomEditorDefault.d.ts +1 -0
  344. package/types/src/packages/shortCutKeys/behaviors/zoomEditorLarger.d.ts +1 -0
  345. package/types/src/packages/shortCutKeys/behaviors/zoomEditorSmaller.d.ts +1 -0
  346. package/types/src/packages/shortCutKeys/hooks/index.d.ts +7 -0
  347. package/types/src/packages/shortCutKeys/hooks/useShortCutKeys.d.ts +2 -0
  348. package/types/src/packages/shortCutKeys/index.d.ts +10 -0
  349. package/types/src/packages/shortCutKeys/utils/index.d.ts +1 -0
  350. package/types/src/packages/shortCutKeys/utils/registerShortCutKeys.d.ts +6 -0
  351. package/types/src/packages/virtual-drag/data/index.d.ts +30 -0
  352. package/types/src/packages/virtual-drag/globalStyle.d.ts +15 -0
  353. package/types/src/packages/virtual-drag/hooks/index.d.ts +3 -0
  354. package/types/src/packages/virtual-drag/hooks/useIsVirtualDragging.d.ts +5 -0
  355. package/types/src/packages/virtual-drag/hooks/useVirtualDrag.d.ts +5 -0
  356. package/types/src/packages/virtual-drag/hooks/useVirtualDrop.d.ts +11 -0
  357. package/types/src/packages/virtual-drag/index.d.ts +7 -0
  358. package/types/src/packages/virtual-drag/utils/dragElement.d.ts +23 -0
  359. package/types/src/packages/virtual-drag/utils/index.d.ts +1 -0
  360. package/types/src/pages/components/Attributes/components/EmptyAttributes/index.d.ts +1 -0
  361. package/types/src/pages/components/Attributes/components/MultipleInstanceAttributes/index.d.ts +6 -0
  362. package/types/src/pages/components/Attributes/components/PageAttributes/index.d.ts +1 -0
  363. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/Attributes/index.d.ts +1 -0
  364. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/DataSource/components/RequestDataSource/index.d.ts +6 -0
  365. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/DataSource/components/StaticDataSource/index.d.ts +6 -0
  366. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/DataSource/index.d.ts +1 -0
  367. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/Interactive/components/EventList/index.d.ts +6 -0
  368. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/Interactive/components/TriggerEventButton/index.d.ts +7 -0
  369. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/Interactive/index.d.ts +1 -0
  370. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/components/Json/index.d.ts +1 -0
  371. package/types/src/pages/components/Attributes/components/SingleInstanceAttributes/index.d.ts +10 -0
  372. package/types/src/pages/components/Attributes/index.d.ts +1 -0
  373. package/types/src/pages/components/Editor/components/PageContainer/index.d.ts +9 -0
  374. package/types/src/pages/components/Editor/components/RenderComponentNode/components/Mask/index.d.ts +12 -0
  375. package/types/src/pages/components/Editor/components/RenderComponentNode/index.d.ts +7 -0
  376. package/types/src/pages/components/Editor/hooks/index.d.ts +4 -0
  377. package/types/src/pages/components/Editor/hooks/useCreateComponentNode.d.ts +2 -0
  378. package/types/src/pages/components/Editor/hooks/useCreateFavorite.d.ts +2 -0
  379. package/types/src/pages/components/Editor/hooks/useRegisterContextMenu/createEditorContextMenu.d.ts +2 -0
  380. package/types/src/pages/components/Editor/hooks/useRegisterContextMenu/createItemContextMenu.d.ts +2 -0
  381. package/types/src/pages/components/Editor/hooks/useRegisterContextMenu/index.d.ts +2 -0
  382. package/types/src/pages/components/Editor/hooks/useRegisterDrag/handleClickComponentNode.d.ts +2 -0
  383. package/types/src/pages/components/Editor/hooks/useRegisterDrag/handleClickEditor.d.ts +1 -0
  384. package/types/src/pages/components/Editor/hooks/useRegisterDrag/index.d.ts +2 -0
  385. package/types/src/pages/components/Editor/hooks/useRegisterDrag/listenDragMove.d.ts +3 -0
  386. package/types/src/pages/components/Editor/hooks/useRegisterDrag/listenDragSize.d.ts +9 -0
  387. package/types/src/pages/components/Editor/hooks/useRegisterDrag/listenDropLayout.d.ts +3 -0
  388. package/types/src/pages/components/Editor/hooks/useRegisterDrag/listenRangeBox.d.ts +2 -0
  389. package/types/src/pages/components/Editor/index.d.ts +2 -0
  390. package/types/src/pages/components/Header/components/ChooseExampleButton/index.d.ts +1 -0
  391. package/types/src/pages/components/Header/components/ShortCutKeysDescription/index.d.ts +1 -0
  392. package/types/src/pages/components/Header/components/SizeBar/index.d.ts +1 -0
  393. package/types/src/pages/components/Header/components/StepDriverButton/index.d.ts +1 -0
  394. package/types/src/pages/components/Header/index.d.ts +1 -0
  395. package/types/src/pages/components/Menu/components/ComponentNodes/components/ComponentNodeItem/index.d.ts +7 -0
  396. package/types/src/pages/components/Menu/components/ComponentNodes/index.d.ts +1 -0
  397. package/types/src/pages/components/Menu/components/Favorites/components/EditFavoriteDialog/index.d.ts +12 -0
  398. package/types/src/pages/components/Menu/components/Favorites/components/FavoriteDetailDialog/index.d.ts +12 -0
  399. package/types/src/pages/components/Menu/components/Favorites/components/Item/index.d.ts +9 -0
  400. package/types/src/pages/components/Menu/components/Favorites/index.d.ts +1 -0
  401. package/types/src/pages/components/Menu/components/History/index.d.ts +1 -0
  402. package/types/src/pages/components/Menu/components/Library/components/ComponentsBlock/components/Item/index.d.ts +9 -0
  403. package/types/src/pages/components/Menu/components/Library/components/ComponentsBlock/index.d.ts +7 -0
  404. package/types/src/pages/components/Menu/components/Library/index.d.ts +1 -0
  405. package/types/src/pages/components/Menu/components/MenuBar/index.d.ts +14 -0
  406. package/types/src/pages/components/Menu/components/Pages/components/AddPageDialog/index.d.ts +12 -0
  407. package/types/src/pages/components/Menu/components/Pages/index.d.ts +1 -0
  408. package/types/src/pages/components/Menu/components/Property/components/AddPackageButton/index.d.ts +9 -0
  409. package/types/src/pages/components/Menu/components/Property/components/DownloadButton/index.d.ts +7 -0
  410. package/types/src/pages/components/Menu/components/Property/components/Item/index.d.ts +7 -0
  411. package/types/src/pages/components/Menu/components/Property/index.d.ts +1 -0
  412. package/types/src/pages/components/Menu/index.d.ts +1 -0
  413. package/types/src/pages/index.d.ts +1 -0
  414. package/types/src/pages/preview/components/FitScreen/index.d.ts +11 -0
  415. package/types/src/pages/preview/components/RenderPreviewComponentNode/index.d.ts +7 -0
  416. package/types/src/pages/preview/index.d.ts +4 -0
  417. package/types/src/router/index.d.ts +1 -0
  418. package/types/src/utils/dom.d.ts +13 -0
  419. package/types/src/utils/download.d.ts +11 -0
  420. package/types/src/utils/driver.d.ts +6 -0
  421. package/types/src/utils/file.d.ts +24 -0
  422. package/types/src/utils/format.d.ts +8 -0
  423. package/types/src/utils/function.d.ts +18 -0
  424. package/types/src/utils/getUrlQuery.d.ts +7 -0
  425. package/types/src/utils/graph.d.ts +31 -0
  426. package/types/src/utils/ignore.d.ts +1 -0
  427. package/types/src/utils/index.d.ts +13 -0
  428. package/types/src/utils/loadExampleJSON.d.ts +12 -0
  429. package/types/src/utils/mouse.d.ts +9 -0
  430. package/types/src/utils/packages.d.ts +9 -0
  431. package/types/src/utils/random.d.ts +13 -0
  432. package/types/src/utils/route.d.ts +12 -0
@@ -0,0 +1,4728 @@
1
+ var vn = Object.defineProperty;
2
+ var bn = (e, t, n) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var te = (e, t, n) => bn(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsx as l, jsxs as g, Fragment as W } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
5
+ import zt, { useRef as B, useEffect as w, useMemo as A, useState as S, forwardRef as Cn, useImperativeHandle as xn, Suspense as Tt, createContext as In, useContext as kn } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react@18.3.1/node_modules/react/index.js";
6
+ import { DownOutlined as Sn, ReloadOutlined as Q, CloseOutlined as Nn, ArrowUpOutlined as et, ArrowRightOutlined as wn, ArrowDownOutlined as tt, ArrowLeftOutlined as En, QuestionCircleOutlined as An, UploadOutlined as Ln, VerticalAlignBottomOutlined as $t, SaveOutlined as p, ClearOutlined as Rt, TranslationOutlined as Dn, SettingOutlined as Ft, GithubFilled as On, LockOutlined as Ht, EyeOutlined as Pn, EyeInvisibleOutlined as Mn, RightOutlined as Bn, VerticalAlignTopOutlined as jn, UnlockOutlined as zn, BlockOutlined as Tn, DisconnectOutlined as $n, CopyOutlined as Rn, DeleteOutlined as de, StarOutlined as dt, BorderOuterOutlined as Fn, BorderBottomOutlined as Hn, DownloadOutlined as Kn, LoadingOutlined as Kt, EditOutlined as qt, BarsOutlined as qn, FileOutlined as Un, AppstoreOutlined as Jn, FileTextOutlined as Wn, ApartmentOutlined as Vn, BankOutlined as Gn, HistoryOutlined as Xn, PlusOutlined as rt, RedoOutlined as Yn } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/@ant-design+icons@5.6.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@ant-design/icons/es/index.js";
7
+ import { message as E, Tooltip as T, InputNumber as le, Popover as st, Slider as Zn, Space as D, Dropdown as be, Button as K, Input as Qn, Collapse as Ct, Form as M, Modal as re, Descriptions as je, Tree as pn, Row as nt, Col as H, Checkbox as we, Switch as Ut, Tabs as ei, Empty as xt } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/antd@4.24.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/es/index.js";
8
+ import $ from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
9
+ import { R as k, u as N, E as ti, a as ni, b as ii, c as ut, s as li, L as ci, d as ai, e as Jt, f as ht, g as it, l as ze, h as It, i as oi, j as kt, I as Te, k as di, m as ri } from "./index-EkKLbWrX.mjs";
10
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/localforage@1.10.0/node_modules/localforage/dist/localforage.js";
11
+ import { createPortal as si } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js";
12
+ import { createRoot as Wt } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
13
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.js.mjs";
14
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.css";
15
+ import { u as Ee, i as Ae, a as gt, b as Vt, c as Gt, g as ae, d as ui, e as hi, f as gi, h as _i, j as Xt, s as St, P as mi, k as fi, l as yi } from "./index-NDbr0gtf.mjs";
16
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react-color@2.19.3_react@18.3.1/node_modules/react-color/es/index.js";
17
+ import { I as ee, L as Le, a as z, C as vi, b as $e } from "./Line-_Oh8Pbbj.mjs";
18
+ import { I as _t, a as bi } from "./IInputNumber-D1VHHCf0.mjs";
19
+ import { useTranslation as se } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/react-i18next@15.7.4_i18next@24.2.3_typescript@5.9.3__react-dom@18.3.1_react@18.3.1__react@18.3.1_typescript@5.9.3/node_modules/react-i18next/dist/es/index.js";
20
+ import lt from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/hotkeys-js@3.13.15/node_modules/hotkeys-js/dist/hotkeys.esm.js";
21
+ import Ci from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/dayjs.min.js";
22
+ import { cloneDeep as Yt, debounce as xi, groupBy as Ii, throttle as Zt } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/lodash.js";
23
+ import { useUpdateEffect as mt, useUnmount as Qt, useRequest as pt } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/ahooks@3.9.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/ahooks/es/index.js";
24
+ import { I as q, i as ki, a as Si } from "./index-w0pdPP5S.mjs";
25
+ import * as Ni from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/editor/editor.api.js";
26
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js";
27
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js";
28
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js";
29
+ import "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/monaco-editor@0.52.2/node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js";
30
+ import ft from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.js";
31
+ import { saveAs as en } from "/Users/tangjiahui/Desktop/big-screen-demo/node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js";
32
+ import { u as tn } from "./useEffectOnce-DrBvWFlm.mjs";
33
+ import { u as wi, s as Re } from "./selectPage-BQkRPT-9.mjs";
34
+ import { u as Ei } from "./useCurrentPageId-DrIZvYrl.mjs";
35
+ import { u as nn } from "./useListenRef-C7BrHZ68.mjs";
36
+ import { I as Ce } from "./index-DzGMaMlo.mjs";
37
+ async function ln(e) {
38
+ return new Promise((t) => {
39
+ let n = document.createElement("input");
40
+ n.type = "file", e != null && e.accept && (n.accept = e.accept), n.onchange = (i) => {
41
+ var a, d;
42
+ const c = (d = (a = i.target) == null ? void 0 : a.files) == null ? void 0 : d[0];
43
+ if (!c)
44
+ return console.warn("file must be selected."), t(void 0);
45
+ t(c);
46
+ }, n.click();
47
+ });
48
+ }
49
+ async function Ai(e) {
50
+ return ln(e).then((t) => cn(t));
51
+ }
52
+ async function cn(e) {
53
+ return new Promise((t) => {
54
+ if (!e) return "";
55
+ const n = new FileReader();
56
+ n.onload = function() {
57
+ const i = this.result || "";
58
+ t(i);
59
+ }, n.readAsText(e);
60
+ });
61
+ }
62
+ function ct(e, t, n) {
63
+ var c, a;
64
+ let i = (c = e == null ? void 0 : e.dataset) == null ? void 0 : c[t];
65
+ if (!n)
66
+ return i;
67
+ for (; i == null && e; )
68
+ e = e.parentElement, i = (a = e == null ? void 0 : e.dataset) == null ? void 0 : a[t];
69
+ return i;
70
+ }
71
+ function Li(e) {
72
+ var i;
73
+ const t = k.getActiveEngine();
74
+ if (!t) return [];
75
+ const n = (i = t.component.getPackage(e)) == null ? void 0 : i.components;
76
+ return t.componentNode.getAll().filter((c) => {
77
+ var a;
78
+ return (a = n == null ? void 0 : n.find) == null ? void 0 : a.call(n, (d) => d.cId === c.cId);
79
+ });
80
+ }
81
+ function Di(e, t) {
82
+ const n = B(), i = B(null), c = B(), { engine: a } = N();
83
+ return c.current = t, w(() => () => {
84
+ var d;
85
+ (d = n.current) == null || d.call(n);
86
+ }, []), A(() => {
87
+ let d = document.createElement("div");
88
+ document.body.appendChild(d);
89
+ let o = Wt(d);
90
+ return o.render(
91
+ /* @__PURE__ */ l(ti.Provider, { value: { engine: a }, children: /* @__PURE__ */ l(
92
+ ni,
93
+ {
94
+ ref: i,
95
+ component: e,
96
+ onCancel: (...s) => {
97
+ var r, u;
98
+ (u = (r = c.current) == null ? void 0 : r.onCancel) == null || u.call(r, ...s);
99
+ },
100
+ onOk: (...s) => {
101
+ var r, u;
102
+ (u = (r = c.current) == null ? void 0 : r.onOk) == null || u.call(r, ...s);
103
+ }
104
+ }
105
+ ) })
106
+ ), n.current = () => {
107
+ d && (o.unmount(), d.remove(), d = void 0);
108
+ }, {
109
+ open(s) {
110
+ var r, u;
111
+ (u = (r = i.current) == null ? void 0 : r.open) == null || u.call(r, s);
112
+ },
113
+ close(s = !0) {
114
+ var r, u;
115
+ (u = (r = i.current) == null ? void 0 : r.close) == null || u.call(r, s);
116
+ }
117
+ };
118
+ }, []);
119
+ }
120
+ function ue(e) {
121
+ return function(t) {
122
+ return Di(e, t);
123
+ };
124
+ }
125
+ function Oi() {
126
+ const e = ii((t) => t.componentMap);
127
+ return A(() => e ? Object.values(e) : [], [e]);
128
+ }
129
+ function yt() {
130
+ const { engine: e } = N(), [t, n] = S(() => e.instance.getAllSelected());
131
+ return w(() => e.instance.onSelectedChange((i) => {
132
+ const c = Object.values(i);
133
+ n((a) => !c.length && !a.length ? a : c);
134
+ }), []), t;
135
+ }
136
+ function Pi() {
137
+ const { engine: e } = N(), [t, n] = S([]);
138
+ return tn(() => (n(e.favorites.getAll()), e.favorites.onChange((i) => {
139
+ n([...i]);
140
+ }))), t;
141
+ }
142
+ function an() {
143
+ const { engine: e } = N(), [t, n] = S(() => e.history.getHistoryData());
144
+ return w(() => {
145
+ e.history.onChange((i) => {
146
+ n(i);
147
+ });
148
+ }, []), t;
149
+ }
150
+ const Mi = `/**
151
+ * 转换request扩展参数函数 (必须包含主函数main)
152
+ *
153
+ * @params {value} 默认携带参数或json对象
154
+ * @params {origin} 源componentNode
155
+ * @params {target} 目标componentNode
156
+ * @params {option} 事件的最小配置 event.target.opt.option
157
+ * @return {value} 返回修改后的额外查询参数
158
+ */
159
+ function main(value, {origin, target, option}) {
160
+ return value
161
+ }`, Bi = `/**
162
+ * 修改目标componentNode (必须包含主函数main)
163
+ *
164
+ * @params {target} 目标componentNode
165
+ * @params {origin} 源componentNode
166
+ * @params {payload} 触发事件源组件发送参数
167
+ * @return {target} 返回修改后的目标componentNode
168
+ */
169
+ function main(target, origin, payload) {
170
+ return target
171
+ }`, oe = {
172
+ componentNodeId: "rid",
173
+ // 组件id
174
+ dragDirection: "d_dir"
175
+ // 拖拽大小方向
176
+ };
177
+ function ji(e) {
178
+ const t = [];
179
+ return Object.entries(e).forEach(([n, i]) => {
180
+ lt(n, i), t.push(() => lt.unbind(n, i));
181
+ }), () => t.forEach((n) => n());
182
+ }
183
+ function zi(e) {
184
+ w(() => ji(e), []);
185
+ }
186
+ function at() {
187
+ const e = k.getActiveEngine();
188
+ e && (e.componentNode.delete(Oe()), O("删除选中组件"));
189
+ }
190
+ function on() {
191
+ const e = k.getActiveEngine();
192
+ e && (e.instance.selectAll(), O("全选组件"));
193
+ }
194
+ function Ti() {
195
+ const e = k.getActiveEngine();
196
+ e && (e.instance.getAllSelected().forEach((t) => {
197
+ const n = e.componentNode.get(t.id);
198
+ n && e.componentNode.update(t.id, {
199
+ x: ((n == null ? void 0 : n.x) || 0) - 1
200
+ });
201
+ }), O("组件左移"));
202
+ }
203
+ function $i() {
204
+ const e = k.getActiveEngine();
205
+ e && (e.instance.getAllSelected().forEach((t) => {
206
+ const n = e.componentNode.get(t.id);
207
+ n && e.componentNode.update(t.id, {
208
+ x: ((n == null ? void 0 : n.x) || 0) + 1
209
+ });
210
+ }), O("组件右移动"));
211
+ }
212
+ function Ri() {
213
+ const e = k.getActiveEngine();
214
+ e && (e.instance.getAllSelected().forEach((t) => {
215
+ const n = e.componentNode.get(t.id);
216
+ n && e.componentNode.update(t.id, {
217
+ y: ((n == null ? void 0 : n.y) || 0) - 1
218
+ });
219
+ }), O("组件上移"));
220
+ }
221
+ function Fi() {
222
+ const e = k.getActiveEngine();
223
+ e && (e.instance.getAllSelected().forEach((t) => {
224
+ const n = e.componentNode.get(t.id);
225
+ n && e.componentNode.update(t.id, {
226
+ y: ((n == null ? void 0 : n.y) || 0) + 1
227
+ });
228
+ }), O("组件下移"));
229
+ }
230
+ function dn() {
231
+ const e = k.getActiveEngine();
232
+ if (!e) return;
233
+ const t = Oe(), n = new Set(e.instance.getAllSelected().map((a) => a.id)), i = [], c = e.componentNode.cloneComponentNodes(t, {
234
+ onClone(a, d) {
235
+ n.has(a.id) && (n.delete(a.id), i.push(d.id)), d.x += 10, d.y += 10;
236
+ }
237
+ });
238
+ e.componentNode.add(c), setTimeout(() => {
239
+ e.instance.select(i, !0), O("复制组件");
240
+ });
241
+ }
242
+ function Hi() {
243
+ var t, n;
244
+ const e = k.getActiveEngine();
245
+ (n = (t = e == null ? void 0 : e.componentNode) == null ? void 0 : t.clear) == null || n.call(t);
246
+ }
247
+ function vt(e) {
248
+ const t = k.getActiveEngine();
249
+ t && (t.getJSON().then((n) => {
250
+ localStorage.setItem("json", JSON.stringify(n));
251
+ }), E.success("保存成功"));
252
+ }
253
+ function De() {
254
+ const e = k.getActiveEngine();
255
+ e && e.instance.getAllSelected().length && (e.instance.unselectAll(), O("取消全选组件"));
256
+ }
257
+ function Ki() {
258
+ const e = k.getActiveEngine();
259
+ if (!e) return;
260
+ e.instance.getAllSelected().forEach((n) => {
261
+ e.componentNode.get(n.id) && e.componentNode.update(n.id, {
262
+ lock: !0
263
+ });
264
+ }), e.instance.unselectAll();
265
+ }
266
+ function qi() {
267
+ const e = k.getActiveEngine();
268
+ if (!e) return;
269
+ e.instance.getAllSelected().forEach((n) => {
270
+ e.componentNode.get(n.id) && e.componentNode.update(n.id, {
271
+ lock: !1
272
+ });
273
+ });
274
+ }
275
+ function Ui() {
276
+ const e = k.getActiveEngine();
277
+ if (!e) return;
278
+ const t = e.instance.getAllSelected();
279
+ if (t.length < 2)
280
+ return;
281
+ const n = t.map((i) => {
282
+ const c = i.getComponentNode();
283
+ return c.groupId && (e.componentNode.unlinkFromGroup(c.groupId, c.id), c.groupId = void 0), c;
284
+ });
285
+ e.componentNode.createGroup(n);
286
+ }
287
+ function Ji() {
288
+ const e = k.getActiveEngine();
289
+ if (!e) return;
290
+ const t = e.instance.getAllSelected(), n = Array.from(
291
+ t.reduce((i, c) => {
292
+ const a = c.getComponentNode();
293
+ return a.groupId && i.add(a.groupId), i;
294
+ }, /* @__PURE__ */ new Set())
295
+ );
296
+ e.componentNode.unlinkGroup(n), e.instance.unselectAll();
297
+ }
298
+ function Wi() {
299
+ const e = k.getActiveEngine();
300
+ if (!e) return;
301
+ const t = e.componentNode.getMaxLevel();
302
+ e.instance.getAllSelected().forEach((n) => {
303
+ e.componentNode.get(n.id) && e.componentNode.update(n.id, {
304
+ level: t
305
+ });
306
+ });
307
+ }
308
+ function Vi() {
309
+ const e = k.getActiveEngine();
310
+ if (!e) return;
311
+ const t = e.componentNode.getMinLevel();
312
+ e.instance.getAllSelected().forEach((n) => {
313
+ e.componentNode.get(n.id) && e.componentNode.update(n.id, {
314
+ level: t
315
+ });
316
+ });
317
+ }
318
+ function Gi() {
319
+ const e = k.getActiveEngine();
320
+ if (!e) return;
321
+ const t = e.componentNode.getMaxLevel();
322
+ e.instance.getAllSelected().forEach((n) => {
323
+ const i = e.componentNode.get(n.id);
324
+ i && e.componentNode.update(n.id, {
325
+ level: Math.min(t, ((i == null ? void 0 : i.level) || 0) + 1)
326
+ });
327
+ });
328
+ }
329
+ function Xi() {
330
+ const e = k.getActiveEngine();
331
+ if (!e) return;
332
+ const t = e.componentNode.getMinLevel();
333
+ e.instance.getAllSelected().forEach((n) => {
334
+ const i = e.componentNode.get(n.id);
335
+ i && e.componentNode.update(n.id, {
336
+ level: Math.max(t, ((i == null ? void 0 : i.level) || 0) - 1)
337
+ });
338
+ });
339
+ }
340
+ function Yi() {
341
+ const e = k.getActiveEngine();
342
+ if (!e) return;
343
+ const t = Oe();
344
+ if (!t.length) {
345
+ E.warn("收藏组件不能为空");
346
+ return;
347
+ }
348
+ const n = ut(), i = e.favorites.getAll().length;
349
+ e.favorites.add({
350
+ id: n,
351
+ name: `收藏${i + 1}`,
352
+ children: t,
353
+ gmtCreate: Ci().format("YYYY-MM-DD HH:mm:ss")
354
+ });
355
+ }
356
+ function Oe() {
357
+ const e = k.getActiveEngine();
358
+ if (!e) return [];
359
+ const t = e.instance.getAllSelected();
360
+ return Zi(t.map((n) => n.id));
361
+ }
362
+ function Zi(e) {
363
+ const t = k.getActiveEngine();
364
+ if (!t) return [];
365
+ const n = Array.isArray(e) ? e : [e];
366
+ return Object.values(
367
+ n.reduce((i, c) => {
368
+ var d;
369
+ const a = t.componentNode.get(c);
370
+ return a && (i[a.id] = a, (d = a == null ? void 0 : a.panels) != null && d.length && t.componentNode.getPanelComponentNodes(a, !0).forEach((o) => {
371
+ i[o.id] = o;
372
+ })), i;
373
+ }, {})
374
+ );
375
+ }
376
+ function O(e) {
377
+ setTimeout(async () => {
378
+ const t = k.getActiveEngine();
379
+ if (t) {
380
+ const n = await t.getJSON(), i = Yt(n);
381
+ t.history.add(i, e);
382
+ }
383
+ });
384
+ }
385
+ function bt() {
386
+ const e = k.getActiveEngine();
387
+ if (!e) return;
388
+ const { data: t } = e.history.goBack() || {};
389
+ t && (t.config.currentMenu = e.config.getConfig().currentMenu, e.loadJSON(t));
390
+ }
391
+ function ot() {
392
+ const e = k.getActiveEngine();
393
+ if (!e) return;
394
+ const { data: t } = e.history.goForward() || {};
395
+ t && (t.config.currentMenu = e.config.getConfig().currentMenu, e.loadJSON(t));
396
+ }
397
+ function Qi(e) {
398
+ const t = k.getActiveEngine();
399
+ if (!t) return;
400
+ const { data: n } = t.history.go(e) || {};
401
+ n && (n.config.currentMenu = t.config.getConfig().currentMenu, t.instance.unselectAll(), t.loadJSON(n));
402
+ }
403
+ function Pe(e) {
404
+ return lt[e];
405
+ }
406
+ function pi() {
407
+ zi({
408
+ backspace: () => {
409
+ at();
410
+ },
411
+ delete: () => {
412
+ at();
413
+ },
414
+ "Shift + A": () => {
415
+ on();
416
+ },
417
+ left: (e) => {
418
+ e.preventDefault(), Ti();
419
+ },
420
+ right: (e) => {
421
+ e.preventDefault(), $i();
422
+ },
423
+ up: (e) => {
424
+ e.preventDefault(), Ri();
425
+ },
426
+ down: (e) => {
427
+ e.preventDefault(), Fi();
428
+ },
429
+ "Shift + C": () => dn(),
430
+ "Shift + S": () => vt(),
431
+ "Shift + R": () => De(),
432
+ "Shift + Z": () => bt(),
433
+ "Shift + Command + Z": () => ot(),
434
+ "Shift + Ctrl + Z": () => ot()
435
+ });
436
+ }
437
+ const el = "_page_jq57p_59", tl = "_page_header_jq57p_69", nl = "_page_body_jq57p_74", il = "_page_body_left_jq57p_79", ll = "_page_body_main_jq57p_86", cl = "_page_body_right_jq57p_91", al = "_page_footer_jq57p_99", ol = "_page_footer_beian_jq57p_109", G = {
438
+ page: el,
439
+ page_header: tl,
440
+ page_body: nl,
441
+ page_body_left: il,
442
+ page_body_main: ll,
443
+ page_body_right: cl,
444
+ page_footer: al,
445
+ page_footer_beian: ol
446
+ }, dl = "_header_2phks_59", rl = "_header_flex_2phks_67", sl = "_header_flex_btnContainer_2phks_68", Ie = {
447
+ header: dl,
448
+ header_flex: rl,
449
+ header_flex_btnContainer: sl
450
+ }, ul = "_tooltipButton_tq7lx_59", hl = "_tooltipButton_hover_tq7lx_70", gl = "_tooltipButton_disabled_tq7lx_73", Fe = {
451
+ tooltipButton: ul,
452
+ tooltipButton_hover: hl,
453
+ tooltipButton_disabled: gl
454
+ };
455
+ function rn(e) {
456
+ return /* @__PURE__ */ l(T, { title: e == null ? void 0 : e.title, children: /* @__PURE__ */ l(
457
+ "div",
458
+ {
459
+ className: $(
460
+ Fe.tooltipButton,
461
+ (e == null ? void 0 : e.disabled) && Fe.tooltipButton_disabled,
462
+ !(e != null && e.noHoverClass) && Fe.tooltipButton_hover
463
+ ),
464
+ onClick: (t) => {
465
+ var n;
466
+ e != null && e.disabled || (n = e == null ? void 0 : e.onClick) == null || n.call(e, t);
467
+ },
468
+ children: e == null ? void 0 : e.children
469
+ }
470
+ ) });
471
+ }
472
+ window._iconfont_svg_string_4790291 = '<svg><symbol id="icon-undo" viewBox="0 0 1024 1024"><path d="M363 252h8.582c298.234 0 540 241.766 540 540v80.007c0 22.09-17.909 40-40 40s-40-17.91-40-40V792c0-254.051-205.95-460-460-460H363v132.533c0 8.836-7.163 16-16 16a16 16 0 0 1-9.747-3.312L118.517 309.188c-7.008-5.383-8.324-15.428-2.941-22.435a16 16 0 0 1 2.94-2.941l218.737-168.033c7.007-5.383 17.052-4.066 22.435 2.941a16 16 0 0 1 3.312 9.747V252z" ></path></symbol><symbol id="icon-cancel-undo" viewBox="0 0 1024 1024"><path d="M660.992 251.904h-8.704c-297.984 0-540.16 241.664-540.16 540.16v79.872c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936v-79.872c0-253.952 205.824-459.776 459.776-459.776h8.704v132.608c0 8.704 7.168 15.872 15.872 15.872 3.584 0 7.168-1.024 9.728-3.072l218.624-167.936c7.168-5.632 8.192-15.36 3.072-22.528l-3.072-3.072L686.08 116.224c-7.168-5.632-16.896-4.096-22.528 3.072-2.048 2.56-3.072 6.144-3.072 9.728v122.88z" ></path></symbol></svg>', ((e) => {
473
+ var t = (n = (n = document.getElementsByTagName("script"))[n.length - 1]).getAttribute(
474
+ "data-injectcss"
475
+ ), n = n.getAttribute("data-disable-injectsvg");
476
+ if (!n) {
477
+ var i, c, a, d, o, s = function(h, _) {
478
+ _.parentNode.insertBefore(h, _);
479
+ };
480
+ if (t && !e.__iconfont__svg__cssinject__) {
481
+ e.__iconfont__svg__cssinject__ = !0;
482
+ try {
483
+ document.write(
484
+ "<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>"
485
+ );
486
+ } catch (h) {
487
+ console && console.log(h);
488
+ }
489
+ }
490
+ i = function() {
491
+ var h, _ = document.createElement("div");
492
+ _.innerHTML = e._iconfont_svg_string_4790291, (_ = _.getElementsByTagName("svg")[0]) && (_.setAttribute("aria-hidden", "true"), _.style.position = "absolute", _.style.width = 0, _.style.height = 0, _.style.overflow = "hidden", _ = _, (h = document.body).firstChild ? s(_, h.firstChild) : h.appendChild(_));
493
+ }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(i, 0) : (c = function() {
494
+ document.removeEventListener("DOMContentLoaded", c, !1), i();
495
+ }, document.addEventListener("DOMContentLoaded", c, !1)) : document.attachEvent && (a = i, d = e.document, o = !1, u(), d.onreadystatechange = function() {
496
+ d.readyState == "complete" && (d.onreadystatechange = null, r());
497
+ });
498
+ }
499
+ function r() {
500
+ o || (o = !0, a());
501
+ }
502
+ function u() {
503
+ try {
504
+ d.documentElement.doScroll("left");
505
+ } catch {
506
+ return void setTimeout(u, 50);
507
+ }
508
+ r();
509
+ }
510
+ })(window);
511
+ function Nt(e) {
512
+ return /* @__PURE__ */ l("svg", { className: "icon", "aria-hidden": "true", children: /* @__PURE__ */ l("use", { xlinkHref: `#${e == null ? void 0 : e.type}` }) });
513
+ }
514
+ const _l = "_sizeBar_1yvet_59", ml = {
515
+ sizeBar: _l
516
+ }, fl = "_inputNumberWithSuffix_1pwr4_59", yl = "_inputNumberWithSuffix_suffix_1pwr4_63", wt = {
517
+ inputNumberWithSuffix: fl,
518
+ inputNumberWithSuffix_suffix: yl
519
+ };
520
+ function Et(e) {
521
+ const { suffix: t, containerStyle: n, containerClassName: i, ...c } = e;
522
+ return /* @__PURE__ */ g(
523
+ "div",
524
+ {
525
+ style: n,
526
+ className: $(wt.inputNumberWithSuffix, i),
527
+ children: [
528
+ /* @__PURE__ */ l(le, { size: "small", style: { width: 70 }, ...c }),
529
+ t && /* @__PURE__ */ l("div", { className: wt.inputNumberWithSuffix_suffix, children: t })
530
+ ]
531
+ }
532
+ );
533
+ }
534
+ const vl = {
535
+ 50: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "50%" }),
536
+ 100: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "100%" }),
537
+ 150: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "150%" }),
538
+ 200: " "
539
+ };
540
+ function bl(e) {
541
+ const { value: t = 1, isCustom: n } = e, i = Ee(), c = A(() => i.scaleMinZoom * 100, [i]), a = A(() => i.scaleMaxZoom * 100, [i]), d = A(() => i.scaleDefault * 100, [i]), o = A(() => Math.round(t * 100), [t]);
542
+ function s(r) {
543
+ var h;
544
+ const u = Math.round(Number(r)) / 100;
545
+ u !== o && ((h = e == null ? void 0 : e.onChange) == null || h.call(e, u));
546
+ }
547
+ return /* @__PURE__ */ l(
548
+ st,
549
+ {
550
+ content: /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 16 }, children: [
551
+ /* @__PURE__ */ l(
552
+ Zn,
553
+ {
554
+ style: { width: 250 },
555
+ min: c,
556
+ max: Math.max(a, o),
557
+ tooltip: {
558
+ formatter: (r) => `${r}%`
559
+ },
560
+ marks: vl,
561
+ value: o,
562
+ onChange: s
563
+ }
564
+ ),
565
+ /* @__PURE__ */ g(D, { style: { marginTop: -16 }, children: [
566
+ n && /* @__PURE__ */ l(
567
+ _t,
568
+ {
569
+ min: c,
570
+ max: 1e3,
571
+ value: o,
572
+ placeholder: "缩放值",
573
+ style: { fontSize: 12, width: 80 },
574
+ onChange: (r) => {
575
+ s(r || 1);
576
+ }
577
+ }
578
+ ),
579
+ /* @__PURE__ */ l(rn, { noHoverClass: !0, title: "重置", children: /* @__PURE__ */ l(
580
+ Q,
581
+ {
582
+ className: "theme-color icon_clickable",
583
+ onClick: () => {
584
+ s(d);
585
+ }
586
+ }
587
+ ) })
588
+ ] })
589
+ ] }),
590
+ children: /* @__PURE__ */ g("span", { style: { cursor: "pointer" }, children: [
591
+ /* @__PURE__ */ l("span", { style: { marginRight: 4 }, children: `${o}%` }),
592
+ /* @__PURE__ */ l(Sn, {})
593
+ ] })
594
+ }
595
+ );
596
+ }
597
+ function Cl() {
598
+ const e = Ee(), { engine: t } = N();
599
+ return /* @__PURE__ */ g("div", { className: ml.sizeBar, id: "rbs-sizebar", children: [
600
+ /* @__PURE__ */ l(
601
+ Et,
602
+ {
603
+ suffix: "px",
604
+ value: e.width,
605
+ onChange: (n) => {
606
+ t.config.setConfig({
607
+ width: n
608
+ });
609
+ }
610
+ }
611
+ ),
612
+ /* @__PURE__ */ l(Nn, { style: { fontSize: 10 } }),
613
+ /* @__PURE__ */ l(
614
+ Et,
615
+ {
616
+ suffix: "px",
617
+ value: e.height,
618
+ onChange: (n) => {
619
+ t.config.setConfig({
620
+ height: n
621
+ });
622
+ }
623
+ }
624
+ ),
625
+ /* @__PURE__ */ l(
626
+ bl,
627
+ {
628
+ value: e.scale,
629
+ onChange: (n) => {
630
+ t.config.setConfig({
631
+ scale: n
632
+ });
633
+ }
634
+ }
635
+ )
636
+ ] });
637
+ }
638
+ function P({ children: e }) {
639
+ return /* @__PURE__ */ l(
640
+ "div",
641
+ {
642
+ style: {
643
+ border: "1px solid white",
644
+ padding: "0 8px",
645
+ height: 25,
646
+ fontSize: 12,
647
+ borderRadius: 2,
648
+ minWidth: 25,
649
+ display: "inline-flex",
650
+ alignItems: "center",
651
+ justifyContent: "center"
652
+ },
653
+ children: e
654
+ }
655
+ );
656
+ }
657
+ function xl() {
658
+ const [e] = se();
659
+ return /* @__PURE__ */ g(
660
+ D,
661
+ {
662
+ direction: "vertical",
663
+ style: { padding: "6px 6px 10px", userSelect: "none", whiteSpace: "nowrap", width: 335 },
664
+ children: [
665
+ /* @__PURE__ */ l("b", { children: e("head.shortCutKeys.title") }),
666
+ /* @__PURE__ */ g(D, { children: [
667
+ /* @__PURE__ */ g("span", { children: [
668
+ e("head.shortCutKeys.all"),
669
+ ":"
670
+ ] }),
671
+ /* @__PURE__ */ l(P, { children: "Shift" }),
672
+ /* @__PURE__ */ l("span", { children: "+" }),
673
+ /* @__PURE__ */ l(P, { children: "A" })
674
+ ] }),
675
+ /* @__PURE__ */ g(D, { children: [
676
+ /* @__PURE__ */ g("span", { children: [
677
+ e("head.shortCutKeys.invert"),
678
+ ":"
679
+ ] }),
680
+ /* @__PURE__ */ l(P, { children: "Shift" }),
681
+ /* @__PURE__ */ l("span", { children: "+" }),
682
+ /* @__PURE__ */ l(P, { children: "R" })
683
+ ] }),
684
+ /* @__PURE__ */ g(D, { children: [
685
+ /* @__PURE__ */ g("span", { children: [
686
+ e("head.shortCutKeys.copy"),
687
+ ":"
688
+ ] }),
689
+ /* @__PURE__ */ l(P, { children: "Shift" }),
690
+ /* @__PURE__ */ l("span", { children: "+" }),
691
+ /* @__PURE__ */ l(P, { children: "C" })
692
+ ] }),
693
+ /* @__PURE__ */ g(D, { children: [
694
+ /* @__PURE__ */ g("span", { children: [
695
+ e("head.shortCutKeys.save"),
696
+ ":"
697
+ ] }),
698
+ /* @__PURE__ */ l(P, { children: "Shift" }),
699
+ /* @__PURE__ */ l("span", { children: "+" }),
700
+ /* @__PURE__ */ l(P, { children: "S" })
701
+ ] }),
702
+ /* @__PURE__ */ g(D, { children: [
703
+ /* @__PURE__ */ g("span", { children: [
704
+ e("head.shortCutKeys.multiple"),
705
+ ":"
706
+ ] }),
707
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.multipleExt.ext1") }),
708
+ /* @__PURE__ */ l(P, { children: "Shift" }),
709
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.multipleExt.ext2") })
710
+ ] }),
711
+ /* @__PURE__ */ g(D, { children: [
712
+ /* @__PURE__ */ g("span", { children: [
713
+ e("head.shortCutKeys.delete"),
714
+ ":"
715
+ ] }),
716
+ /* @__PURE__ */ l(P, { children: "BackSpace" }),
717
+ /* @__PURE__ */ g("span", { children: [
718
+ " ",
719
+ e("head.shortCutKeys.deleteExt.ext1"),
720
+ " "
721
+ ] }),
722
+ /* @__PURE__ */ l(P, { children: "Delete" })
723
+ ] }),
724
+ /* @__PURE__ */ g(D, { children: [
725
+ /* @__PURE__ */ g("span", { children: [
726
+ e("head.shortCutKeys.move"),
727
+ ":"
728
+ ] }),
729
+ /* @__PURE__ */ l(P, { children: /* @__PURE__ */ l(et, {}) }),
730
+ /* @__PURE__ */ l(P, { children: /* @__PURE__ */ l(wn, {}) }),
731
+ /* @__PURE__ */ l(P, { children: /* @__PURE__ */ l(tt, {}) }),
732
+ /* @__PURE__ */ l(P, { children: /* @__PURE__ */ l(En, {}) })
733
+ ] }),
734
+ /* @__PURE__ */ g(D, { children: [
735
+ /* @__PURE__ */ g("span", { children: [
736
+ e("head.shortCutKeys.force"),
737
+ ":"
738
+ ] }),
739
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.forceExt.ext1") }),
740
+ /* @__PURE__ */ l(P, { children: "Shift" }),
741
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.forceExt.ext2") })
742
+ ] }),
743
+ /* @__PURE__ */ g(D, { children: [
744
+ /* @__PURE__ */ g("span", { children: [
745
+ e("head.shortCutKeys.undo"),
746
+ ":"
747
+ ] }),
748
+ /* @__PURE__ */ l(P, { children: "Shift" }),
749
+ /* @__PURE__ */ l("span", { children: "+" }),
750
+ /* @__PURE__ */ l(P, { children: "Z" })
751
+ ] }),
752
+ /* @__PURE__ */ g(D, { children: [
753
+ /* @__PURE__ */ g("span", { children: [
754
+ e("head.shortCutKeys.cancelUndo"),
755
+ ":"
756
+ ] }),
757
+ /* @__PURE__ */ l(P, { children: "Shift" }),
758
+ /* @__PURE__ */ l("span", { children: "+" }),
759
+ /* @__PURE__ */ l(P, { children: "Ctrl / Command" }),
760
+ /* @__PURE__ */ l("span", { children: "+" }),
761
+ /* @__PURE__ */ l(P, { children: "Z" })
762
+ ] }),
763
+ /* @__PURE__ */ g(D, { children: [
764
+ /* @__PURE__ */ g("span", { children: [
765
+ e("head.shortCutKeys.zoom"),
766
+ ":"
767
+ ] }),
768
+ /* @__PURE__ */ l(P, { children: /* @__PURE__ */ g(D, { children: [
769
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.zoomExt.ext1") }),
770
+ /* @__PURE__ */ l(et, {}),
771
+ /* @__PURE__ */ l("span", { children: "/" }),
772
+ /* @__PURE__ */ l(tt, {})
773
+ ] }) })
774
+ ] }),
775
+ /* @__PURE__ */ g(D, { children: [
776
+ /* @__PURE__ */ g("span", { children: [
777
+ e("head.shortCutKeys.zoomReset"),
778
+ ":"
779
+ ] }),
780
+ /* @__PURE__ */ l(P, { children: e("head.shortCutKeys.zoomResetExt.ext1") })
781
+ ] }),
782
+ /* @__PURE__ */ g(D, { children: [
783
+ /* @__PURE__ */ g("span", { children: [
784
+ e("head.shortCutKeys.dragCanvas"),
785
+ ":"
786
+ ] }),
787
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.dragCanvasExt.ext1") }),
788
+ /* @__PURE__ */ l(P, { children: "Space" }),
789
+ /* @__PURE__ */ l("span", { children: e("head.shortCutKeys.dragCanvas") })
790
+ ] })
791
+ ]
792
+ }
793
+ );
794
+ }
795
+ const Il = ["rbs-screen.top"];
796
+ function kl(e = window.location.host) {
797
+ const t = e == null ? void 0 : e.toLowerCase();
798
+ return Il.some((n) => {
799
+ var i, c;
800
+ return (c = t == null ? void 0 : t.includes) == null ? void 0 : c.call(t, (i = n == null ? void 0 : n.toLowerCase) == null ? void 0 : i.call(n));
801
+ });
802
+ }
803
+ const Sl = (e, t, n) => {
804
+ const i = e[t];
805
+ return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((c, a) => {
806
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
807
+ a.bind(
808
+ null,
809
+ new Error(
810
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== n ? ". Note that variables only represent file names one level deep." : "")
811
+ )
812
+ )
813
+ );
814
+ });
815
+ };
816
+ async function Nl(e) {
817
+ var i;
818
+ const t = await Sl(/* @__PURE__ */ Object.assign({ "../../../../../../public/example/classic.json": () => import("./index-EkKLbWrX.mjs").then((c) => c.r), "../../../../../../public/example/multiple-components-interactive.json": () => import("./index-EkKLbWrX.mjs").then((c) => c.t) }), `../../../../../../public/example/${e}.json`, 9), n = k.getActiveEngine();
819
+ (i = n == null ? void 0 : n.loadJSON) == null || i.call(n, t);
820
+ }
821
+ function wl() {
822
+ return /* @__PURE__ */ l(
823
+ be,
824
+ {
825
+ menu: {
826
+ items: [
827
+ { label: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "经典大屏" }), key: "classic" },
828
+ {
829
+ label: /* @__PURE__ */ l("span", { style: { fontSize: 12 }, children: "表格查询" }),
830
+ key: "multiple-components-interactive"
831
+ }
832
+ ],
833
+ onClick({ key: e }) {
834
+ Nl(e);
835
+ }
836
+ },
837
+ children: /* @__PURE__ */ l(K, { size: "small", style: { fontSize: 12 }, id: "rbs-choose-example-button", children: "切换示例" })
838
+ }
839
+ );
840
+ }
841
+ function El() {
842
+ return /* @__PURE__ */ l(
843
+ K,
844
+ {
845
+ size: "small",
846
+ style: { fontSize: 12 },
847
+ id: "rbs-starter-help",
848
+ onClick: () => {
849
+ li(!0);
850
+ },
851
+ children: "新手教程"
852
+ }
853
+ );
854
+ }
855
+ const Al = kl();
856
+ function Ll() {
857
+ const { engine: e, rbsEngine: t } = N(), [n, i] = se(), c = an(), a = i.language === ci.zh, d = A(() => [
858
+ {
859
+ key: "shortCutKeys",
860
+ description: /* @__PURE__ */ l(xl, {}),
861
+ icon: /* @__PURE__ */ l(An, {})
862
+ },
863
+ {
864
+ key: "undo",
865
+ description: n("head.undo"),
866
+ disabled: !c.isCanGoBack,
867
+ icon: /* @__PURE__ */ l(Nt, { type: "icon-undo" })
868
+ },
869
+ {
870
+ key: "cancelUndo",
871
+ description: n("head.cancelUndo"),
872
+ disabled: !c.isCanGoForward,
873
+ icon: /* @__PURE__ */ l(Nt, { type: "icon-cancel-undo" })
874
+ },
875
+ { key: "export", description: n("head.export"), icon: /* @__PURE__ */ l(Ln, {}) },
876
+ { key: "import", description: n("head.import"), icon: /* @__PURE__ */ l($t, {}) },
877
+ { key: "save", description: n("head.save"), icon: /* @__PURE__ */ l(p, {}) },
878
+ { key: "clear", description: n("head.clear"), icon: /* @__PURE__ */ l(Rt, {}) },
879
+ {
880
+ key: "language",
881
+ description: n("head.language", { text: `${a ? "切换英语" : "change chinese"}` }),
882
+ icon: /* @__PURE__ */ l(Dn, {})
883
+ },
884
+ {
885
+ key: "settings",
886
+ description: n("head.settings"),
887
+ disabled: !0,
888
+ icon: /* @__PURE__ */ l(Ft, {})
889
+ }
890
+ // { key: "preview", description: t("head.preview"), icon: <DesktopOutlined /> },
891
+ ], [i.language, c.isCanGoForward, c.isCanGoBack]);
892
+ function o() {
893
+ window.open("https://github.com/tangjiahui-cn/react-big-screen.git");
894
+ }
895
+ async function s() {
896
+ t == null || t.emit("startPreview", e);
897
+ }
898
+ function r(u) {
899
+ switch (u.key) {
900
+ case "undo":
901
+ bt();
902
+ break;
903
+ case "cancelUndo":
904
+ ot();
905
+ break;
906
+ case "export":
907
+ e.getJSON().then((_) => {
908
+ const m = JSON.stringify(_);
909
+ Jt(m, "大屏看板.json");
910
+ });
911
+ break;
912
+ case "import":
913
+ Ai().then((_) => {
914
+ if (!_)
915
+ return E.warn("文件内容不能为空");
916
+ try {
917
+ const m = JSON.parse(_);
918
+ e.loadJSON(m);
919
+ } catch {
920
+ E.error("请上传json格式文件");
921
+ }
922
+ });
923
+ break;
924
+ case "preview":
925
+ s();
926
+ break;
927
+ case "save":
928
+ vt();
929
+ break;
930
+ case "clear":
931
+ e.clear();
932
+ break;
933
+ case "settings":
934
+ break;
935
+ case "language":
936
+ const h = a ? "en" : "zh";
937
+ ai(h), e.config.setConfig({ language: h });
938
+ break;
939
+ }
940
+ }
941
+ return /* @__PURE__ */ g("div", { className: Ie.header, children: [
942
+ /* @__PURE__ */ g("div", { className: Ie.header_flex, children: [
943
+ /* @__PURE__ */ l("b", { children: "BigScreen" }),
944
+ !Al && /* @__PURE__ */ l(On, { style: { cursor: "pointer", fontSize: 16 }, onClick: o })
945
+ ] }),
946
+ /* @__PURE__ */ l(Cl, {}),
947
+ /* @__PURE__ */ g("div", { className: Ie.header_flex, children: [
948
+ /* @__PURE__ */ l(wl, {}),
949
+ /* @__PURE__ */ l(El, {}),
950
+ /* @__PURE__ */ l("div", { className: Ie.header_flex_btnContainer, id: "rbs-tool-bar", children: d.map((u) => /* @__PURE__ */ l(
951
+ rn,
952
+ {
953
+ disabled: u == null ? void 0 : u.disabled,
954
+ title: u.description,
955
+ onClick: () => r(u),
956
+ children: u == null ? void 0 : u.icon
957
+ },
958
+ u.key
959
+ )) }),
960
+ /* @__PURE__ */ l(
961
+ K,
962
+ {
963
+ type: "primary",
964
+ size: "small",
965
+ style: { fontSize: 12 },
966
+ id: "rbs-preview",
967
+ onClick: s,
968
+ children: "开始预览"
969
+ }
970
+ )
971
+ ] })
972
+ ] });
973
+ }
974
+ const Dl = "_menu_1ueks_59", Ol = "_menu_bar_1ueks_68", Pl = "_menu_main_1ueks_72", He = {
975
+ menu: Dl,
976
+ menu_bar: Ol,
977
+ menu_main: Pl
978
+ }, Ml = "_library_11n9v_59", Bl = "_library_header_11n9v_72", jl = "_library_main_11n9v_83", Ke = {
979
+ library: Ml,
980
+ library_header: Bl,
981
+ library_main: jl
982
+ }, zl = "_componentsBlock_mx05c_59", Tl = {
983
+ componentsBlock: zl
984
+ }, $l = "_componentItem_1a82r_59", Rl = "_componentItem_body_1a82r_71", Fl = "_componentItem_footer_1a82r_80", qe = {
985
+ componentItem: $l,
986
+ componentItem_body: Rl,
987
+ componentItem_footer: Fl
988
+ };
989
+ class Hl {
990
+ constructor() {
991
+ // style tag.
992
+ te(this, "style");
993
+ // count usage times.
994
+ te(this, "count", 0);
995
+ }
996
+ mount() {
997
+ if (this.count++, this.style)
998
+ return;
999
+ const t = document.createElement("style");
1000
+ t.setAttribute("id", "virtual-drag"), t.innerHTML = "html.is-dragging * {cursor: copy;};", document.head.appendChild(this.style = t);
1001
+ }
1002
+ unmount() {
1003
+ !this.style || --this.count > 0 || (this.count = 0, this.style.remove(), this.style = void 0);
1004
+ }
1005
+ }
1006
+ const At = new Hl();
1007
+ function Kl(e, t) {
1008
+ let n = !1;
1009
+ e.addEventListener("mousedown", c);
1010
+ function i(o) {
1011
+ var s;
1012
+ n || (n = !0, (s = t == null ? void 0 : t.onStart) == null || s.call(t, o, { isDragging: n }));
1013
+ }
1014
+ function c() {
1015
+ e.addEventListener("mousemove", i), window.addEventListener("mouseup", a);
1016
+ }
1017
+ function a(o) {
1018
+ var s;
1019
+ (s = t == null ? void 0 : t.onEnd) == null || s.call(t, o, { isDragging: n }), d();
1020
+ }
1021
+ function d() {
1022
+ n = !1, e.removeEventListener("mousemove", i), window.removeEventListener("mouseup", a);
1023
+ }
1024
+ return () => {
1025
+ d(), e.removeEventListener("mousedown", c);
1026
+ };
1027
+ }
1028
+ class ql {
1029
+ constructor() {
1030
+ te(this, "isDragging", !1);
1031
+ te(this, "dragOptions", {
1032
+ type: "",
1033
+ data: void 0
1034
+ });
1035
+ te(this, "draggingChangeCallback", []);
1036
+ }
1037
+ notifyDraggingChange() {
1038
+ this.draggingChangeCallback.forEach((t) => {
1039
+ t({
1040
+ ...this.dragOptions,
1041
+ isDragging: this.isDragging
1042
+ });
1043
+ });
1044
+ }
1045
+ // 监听拖拽变更
1046
+ onDraggingChange(t) {
1047
+ return this.draggingChangeCallback.push(t), () => {
1048
+ this.draggingChangeCallback = this.draggingChangeCallback.filter((n) => n !== t);
1049
+ };
1050
+ }
1051
+ // 设置拖拽中状态
1052
+ setIsDragging(t) {
1053
+ this.isDragging = t, this.notifyDraggingChange();
1054
+ }
1055
+ // 获取拖拽中状态
1056
+ getIsDragging() {
1057
+ return this.isDragging;
1058
+ }
1059
+ // 设置拖拽配置
1060
+ setDragOptions(t, n) {
1061
+ if (n) {
1062
+ this.dragOptions = {
1063
+ ...t
1064
+ };
1065
+ return;
1066
+ }
1067
+ this.dragOptions = {
1068
+ ...this.dragOptions,
1069
+ ...t
1070
+ };
1071
+ }
1072
+ // 获取拖拽配置
1073
+ getDragOptions() {
1074
+ return this.dragOptions;
1075
+ }
1076
+ }
1077
+ const ce = new ql();
1078
+ function sn(e, t) {
1079
+ const n = B(t);
1080
+ n.current = t, w(() => {
1081
+ const i = e.current;
1082
+ if (!i) {
1083
+ console.warn("dom must be set.");
1084
+ return;
1085
+ }
1086
+ const c = Kl(i, {
1087
+ onStart() {
1088
+ At.mount(), document.documentElement.classList.add("is-dragging"), ce.setDragOptions(n.current), ce.setIsDragging(!0);
1089
+ },
1090
+ onEnd() {
1091
+ At.unmount(), document.documentElement.classList.remove("is-dragging"), ce.setDragOptions(n.current), ce.setIsDragging(!1);
1092
+ }
1093
+ });
1094
+ return () => c();
1095
+ }, []);
1096
+ }
1097
+ function un(e, t) {
1098
+ const n = B(t);
1099
+ n.current = t, w(() => {
1100
+ const { accept: i } = t;
1101
+ if (i && !Array.isArray(i))
1102
+ throw new Error("accept must be a string array.");
1103
+ const c = e.current;
1104
+ if (!c) {
1105
+ console.warn("dom must be set.");
1106
+ return;
1107
+ }
1108
+ const a = (d) => {
1109
+ var s, r, u;
1110
+ if (!ce.getIsDragging())
1111
+ return;
1112
+ const o = ce.getDragOptions();
1113
+ i && !((s = i == null ? void 0 : i.includes) != null && s.call(i, o.type || "")) || (u = (r = n.current) == null ? void 0 : r.onDrop) == null || u.call(r, d, o);
1114
+ };
1115
+ return c.addEventListener("mouseup", a), () => {
1116
+ c.removeEventListener("mouseup", a);
1117
+ };
1118
+ }, []);
1119
+ }
1120
+ function xe(e) {
1121
+ const { src: t } = e, [n, i] = S("");
1122
+ return w(() => {
1123
+ switch (typeof t) {
1124
+ case "string":
1125
+ i(t);
1126
+ break;
1127
+ case "function":
1128
+ t().then((c) => {
1129
+ i(c.default);
1130
+ });
1131
+ break;
1132
+ }
1133
+ }, [t]), t ? /* @__PURE__ */ l("img", { style: e == null ? void 0 : e.style, src: n, draggable: !1 }) : /* @__PURE__ */ l("span", { style: { color: "#b8b8b8" }, children: "None" });
1134
+ }
1135
+ function Ul(e) {
1136
+ const { component: t } = e, n = B(null);
1137
+ return sn(n, {
1138
+ type: "create-component",
1139
+ data: {
1140
+ component: t
1141
+ }
1142
+ }), /* @__PURE__ */ g(
1143
+ "div",
1144
+ {
1145
+ style: e == null ? void 0 : e.style,
1146
+ className: $(qe.componentItem, e == null ? void 0 : e.className),
1147
+ ref: n,
1148
+ children: [
1149
+ /* @__PURE__ */ l("div", { className: qe.componentItem_body, children: /* @__PURE__ */ l(xe, { src: t == null ? void 0 : t.icon, style: { maxWidth: "50%", maxHeight: "50%" } }) }),
1150
+ /* @__PURE__ */ l("div", { className: qe.componentItem_footer, children: t.cName })
1151
+ ]
1152
+ }
1153
+ );
1154
+ }
1155
+ function Jl(e) {
1156
+ var a;
1157
+ const { components: t, column: n = 3 } = e, { width: i, lines: c } = A(() => ({
1158
+ width: `${100 / n}%`,
1159
+ lines: Math.ceil(t.length / n)
1160
+ }), [t, n]);
1161
+ return /* @__PURE__ */ g("div", { className: Tl.componentsBlock, children: [
1162
+ !(t != null && t.length) && /* @__PURE__ */ l(q, { description: "暂无组件" }),
1163
+ (a = t == null ? void 0 : t.map) == null ? void 0 : a.call(t, (d, o) => {
1164
+ const s = o % n === n - 1, r = c === 1 || o > (c - 1) * n - 1;
1165
+ return /* @__PURE__ */ l(
1166
+ Ul,
1167
+ {
1168
+ component: d,
1169
+ style: {
1170
+ width: i,
1171
+ borderRight: s ? "none" : "1px solid #e7e7e7",
1172
+ borderBottom: r ? "none" : "1px solid #e7e7e7"
1173
+ }
1174
+ },
1175
+ d.cId
1176
+ );
1177
+ })
1178
+ ] });
1179
+ }
1180
+ function Lt(e, t = "") {
1181
+ if (!t) return e;
1182
+ const n = t.toLowerCase();
1183
+ return e.filter((i) => i.cName.toLowerCase().includes(n) || i.cId.toLowerCase().includes(n));
1184
+ }
1185
+ function Wl() {
1186
+ const [e, t] = se(), [n, i] = S([]), c = Oi(), [a, d] = S(""), [o, s] = S([]), r = A(() => ({
1187
+ base: e("menu.library.base"),
1188
+ charts: e("menu.library.charts"),
1189
+ layout: e("menu.library.layout"),
1190
+ nav: e("menu.library.nav"),
1191
+ unknown: e("menu.library.unknown")
1192
+ }), [t.language]), u = A(() => xi((_, m = "") => {
1193
+ const y = Lt(_, m);
1194
+ s(y);
1195
+ }, 500), []);
1196
+ w(() => {
1197
+ s(Lt(c, a));
1198
+ }, [c]), mt(() => {
1199
+ u(c, a);
1200
+ }, [a]);
1201
+ const h = A(() => {
1202
+ const _ = [], m = Object.entries(
1203
+ Ii(o, (y) => y.category || "unknown")
1204
+ ).map(([y, C]) => (_.push(y), {
1205
+ key: y,
1206
+ components: C,
1207
+ label: r[y] || y
1208
+ }));
1209
+ return i(_), m;
1210
+ }, [o, r]);
1211
+ return /* @__PURE__ */ g("div", { className: Ke.library, children: [
1212
+ /* @__PURE__ */ l("div", { className: Ke.library_header, children: /* @__PURE__ */ l(
1213
+ Qn.Search,
1214
+ {
1215
+ allowClear: !0,
1216
+ value: a,
1217
+ placeholder: "搜索组件",
1218
+ onChange: (_) => {
1219
+ d(_.target.value);
1220
+ }
1221
+ }
1222
+ ) }),
1223
+ /* @__PURE__ */ l("div", { className: Ke.library_main, children: h.length ? /* @__PURE__ */ l(
1224
+ Ct,
1225
+ {
1226
+ expandIconPosition: "end",
1227
+ activeKey: n,
1228
+ style: { padding: 0 },
1229
+ onChange: (_) => i(_ || []),
1230
+ children: h.map((_) => /* @__PURE__ */ l(Ct.Panel, { header: _.label, style: { padding: 0 }, children: /* @__PURE__ */ l(Jl, { components: _.components }) }, _.key))
1231
+ }
1232
+ ) : /* @__PURE__ */ l(q, { style: { height: "100%", background: "white" } }) })
1233
+ ] });
1234
+ }
1235
+ const Vl = "_componentNodes_x43ss_59", Gl = "_componentNodes_head_x43ss_63", Xl = "_componentNodes_block_x43ss_67", Ue = {
1236
+ componentNodes: Vl,
1237
+ componentNodes_head: Gl,
1238
+ componentNodes_block: Xl
1239
+ }, Yl = "_componentNodeItem_r9mbq_59", Zl = "_componentNodeItem_selected_r9mbq_65", Ql = "_componentNodeItem_icon_r9mbq_71", pl = "_componentNodeItem_name_r9mbq_81", ec = "_componentNodeItem_tail_r9mbq_84", tc = "_componentNodeItem_tail_operatable_r9mbq_95", ne = {
1240
+ componentNodeItem: Yl,
1241
+ componentNodeItem_selected: Zl,
1242
+ componentNodeItem_icon: Ql,
1243
+ componentNodeItem_name: pl,
1244
+ componentNodeItem_tail: ec,
1245
+ componentNodeItem_tail_operatable: tc
1246
+ };
1247
+ function nc(e) {
1248
+ const { engine: t } = N(), n = B(null), [i, c] = S(e == null ? void 0 : e.componentNode), a = (i == null ? void 0 : i.show) ?? !0, { component: d, instance: o } = A(() => ({
1249
+ component: t.component.get(i == null ? void 0 : i.cId),
1250
+ instance: t.instance.get(i == null ? void 0 : i.id)
1251
+ }), [i]);
1252
+ function s(u) {
1253
+ u.stopPropagation();
1254
+ const h = Pe("shift");
1255
+ if (t.instance.isSelected(i.id)) {
1256
+ if (!Ae(u.nativeEvent))
1257
+ return;
1258
+ h ? t.instance.unselect(i.id) : t.instance.select(i == null ? void 0 : i.id, !0);
1259
+ return;
1260
+ }
1261
+ t.instance.select(i == null ? void 0 : i.id, !h);
1262
+ }
1263
+ function r(u) {
1264
+ t.componentNode.update(i.id, {
1265
+ show: u
1266
+ });
1267
+ }
1268
+ return w(() => t.componentNode.onChange(i.id, ({ payload: u }) => {
1269
+ c({ ...u });
1270
+ }), []), /* @__PURE__ */ g(
1271
+ "div",
1272
+ {
1273
+ [`data-${oe.componentNodeId}`]: i.id,
1274
+ ref: n,
1275
+ className: $(
1276
+ ne.componentNodeItem,
1277
+ (e == null ? void 0 : e.isSelected) && ne.componentNodeItem_selected
1278
+ ),
1279
+ onMouseDown: (u) => {
1280
+ s(u);
1281
+ },
1282
+ onMouseEnter: () => {
1283
+ var u;
1284
+ (u = o == null ? void 0 : o.handleHover) == null || u.call(o);
1285
+ },
1286
+ onMouseLeave: () => {
1287
+ var u;
1288
+ (u = o == null ? void 0 : o.handleUnHover) == null || u.call(o);
1289
+ },
1290
+ children: [
1291
+ /* @__PURE__ */ l("div", { className: ne.componentNodeItem_icon, children: /* @__PURE__ */ l(xe, { src: d == null ? void 0 : d.icon, style: { height: "75%", maxWidth: "100%" } }) }),
1292
+ /* @__PURE__ */ l("div", { className: ne.componentNodeItem_name, children: i == null ? void 0 : i.name }),
1293
+ /* @__PURE__ */ g("div", { className: ne.componentNodeItem_tail, children: [
1294
+ /* @__PURE__ */ l("div", { children: i != null && i.lock ? /* @__PURE__ */ l(Ht, {}) : "" }),
1295
+ /* @__PURE__ */ l(
1296
+ "div",
1297
+ {
1298
+ className: ne.componentNodeItem_tail_operatable,
1299
+ onMouseDown: (u) => {
1300
+ u.stopPropagation(), r(!a);
1301
+ },
1302
+ children: a ? /* @__PURE__ */ l(Pn, {}) : /* @__PURE__ */ l(Mn, {})
1303
+ }
1304
+ )
1305
+ ] })
1306
+ ]
1307
+ }
1308
+ );
1309
+ }
1310
+ const ic = "_renderContextMenu_vitq8_59", lc = {
1311
+ renderContextMenu: ic
1312
+ }, cc = "_renderList_p7203_59", ac = "_renderList_disabled_p7203_63", oc = "_renderList_item_p7203_70", dc = "_renderList_item_title_p7203_87", rc = "_renderList_item_unselectable_p7203_94", ge = {
1313
+ renderList: cc,
1314
+ renderList_disabled: ac,
1315
+ renderList_item: oc,
1316
+ renderList_item_title: dc,
1317
+ renderList_item_unselectable: rc
1318
+ }, sc = "_hoverItem_overlay_twv7t_59", uc = {
1319
+ hoverItem_overlay: sc
1320
+ }, hc = {
1321
+ top: 0,
1322
+ left: 0
1323
+ };
1324
+ function gc(e) {
1325
+ const { engine: t } = N(), { children: n, items: i, onSelect: c, ...a } = e, [d, o] = S(!1), [s, r] = S(hc);
1326
+ function u(_) {
1327
+ var y, C, b;
1328
+ if ((y = e == null ? void 0 : e.onMouseEnter) == null || y.call(e, _), !(i != null && i.length))
1329
+ return;
1330
+ const m = (b = (C = _.target) == null ? void 0 : C.getBoundingClientRect) == null ? void 0 : b.call(C);
1331
+ m && (r({ top: m.top, left: m.left + m.width }), o(!0));
1332
+ }
1333
+ function h(_) {
1334
+ var m;
1335
+ (m = e == null ? void 0 : e.onMouseLeave) == null || m.call(e, _), o(!1);
1336
+ }
1337
+ return /* @__PURE__ */ g("div", { ...a, onMouseEnter: u, onMouseLeave: h, children: [
1338
+ n,
1339
+ d && si(
1340
+ /* @__PURE__ */ l(
1341
+ "div",
1342
+ {
1343
+ className: uc.hoverItem_overlay,
1344
+ style: {
1345
+ top: s.top,
1346
+ left: s.left,
1347
+ zIndex: t.componentNode.getMaxLevel()
1348
+ },
1349
+ children: /* @__PURE__ */ l(
1350
+ hn,
1351
+ {
1352
+ items: i,
1353
+ onSelect: (_, m) => {
1354
+ c == null || c(_, m), m.stopPropagation();
1355
+ }
1356
+ }
1357
+ )
1358
+ }
1359
+ ),
1360
+ document.body
1361
+ )
1362
+ ] });
1363
+ }
1364
+ function hn(e) {
1365
+ var t, n;
1366
+ return /* @__PURE__ */ l("div", { className: ge.renderList, children: (n = (t = e == null ? void 0 : e.items) == null ? void 0 : t.map) == null ? void 0 : n.call(t, (i) => {
1367
+ var a;
1368
+ const c = !(i != null && i.disabled) && ((i == null ? void 0 : i.selectable) ?? (i == null ? void 0 : i.selectable) === void 0);
1369
+ return /* @__PURE__ */ g(
1370
+ gc,
1371
+ {
1372
+ items: i == null ? void 0 : i.children,
1373
+ style: i == null ? void 0 : i.style,
1374
+ className: $(
1375
+ ge.renderList_item,
1376
+ (i == null ? void 0 : i.disabled) && ge.renderList_disabled,
1377
+ !c && ge.renderList_item_unselectable
1378
+ ),
1379
+ onSelect: (d, o) => {
1380
+ var s, r;
1381
+ (s = e == null ? void 0 : e.onSelect) == null || s.call(e, d, o), d.key === i.key && ((r = i == null ? void 0 : i.onSelect) == null || r.call(i, o));
1382
+ },
1383
+ onClick: (d) => {
1384
+ var o, s;
1385
+ d.stopPropagation(), c && ((o = e == null ? void 0 : e.onSelect) == null || o.call(e, i, d), (s = i == null ? void 0 : i.onSelect) == null || s.call(i, d));
1386
+ },
1387
+ children: [
1388
+ /* @__PURE__ */ g("div", { className: ge.renderList_item_title, style: i == null ? void 0 : i.titleStyle, children: [
1389
+ i == null ? void 0 : i.icon,
1390
+ i == null ? void 0 : i.title
1391
+ ] }),
1392
+ !!((a = i == null ? void 0 : i.children) != null && a.length) && /* @__PURE__ */ l(Bn, { style: { fontSize: "0.75em" } })
1393
+ ]
1394
+ },
1395
+ i == null ? void 0 : i.key
1396
+ );
1397
+ }) });
1398
+ }
1399
+ function _c(e) {
1400
+ const t = B(null);
1401
+ return w(() => {
1402
+ function n(i) {
1403
+ var c, a, d;
1404
+ (a = (c = t.current) == null ? void 0 : c.contains) != null && a.call(c, i.target) || (d = e == null ? void 0 : e.onClickOuter) == null || d.call(e);
1405
+ }
1406
+ return window.addEventListener("click", n), () => {
1407
+ window.removeEventListener("click", n);
1408
+ };
1409
+ }, []), /* @__PURE__ */ l(
1410
+ "div",
1411
+ {
1412
+ ref: t,
1413
+ tabIndex: 0,
1414
+ className: lc.renderContextMenu,
1415
+ onContextMenu: (n) => {
1416
+ n.preventDefault();
1417
+ },
1418
+ children: /* @__PURE__ */ l(
1419
+ hn,
1420
+ {
1421
+ items: e == null ? void 0 : e.items,
1422
+ onSelect: (n) => {
1423
+ var i;
1424
+ (i = e == null ? void 0 : e.onSelect) == null || i.call(e, n);
1425
+ }
1426
+ }
1427
+ )
1428
+ }
1429
+ );
1430
+ }
1431
+ function gn(e, t, n, i) {
1432
+ var s;
1433
+ if (!n || (i != null && i.onBeforeOpen && (n = ((s = i == null ? void 0 : i.onBeforeOpen) == null ? void 0 : s.call(i, n)) || n), n = n == null ? void 0 : n.filter(Boolean), !(n != null && n.length)))
1434
+ return;
1435
+ const c = document.createElement("div");
1436
+ c.style.position = "fixed", c.style.left = `${e}px`, c.style.top = `${t}px`, typeof (i == null ? void 0 : i.zIndex) == "number" && (c.style.zIndex = `${i == null ? void 0 : i.zIndex}`), document.body.appendChild(c);
1437
+ const a = Wt(c);
1438
+ let d = !1;
1439
+ const o = () => {
1440
+ var r, u;
1441
+ d || ((r = a == null ? void 0 : a.unmount) == null || r.call(a), (u = c == null ? void 0 : c.remove) == null || u.call(c), d = !0);
1442
+ };
1443
+ return a.render(
1444
+ /* @__PURE__ */ l(
1445
+ _c,
1446
+ {
1447
+ items: n,
1448
+ onClickOuter: () => {
1449
+ o();
1450
+ },
1451
+ onSelect: (r) => {
1452
+ var u;
1453
+ (u = i == null ? void 0 : i.onSelect) == null || u.call(i, r == null ? void 0 : r.key, r), o();
1454
+ }
1455
+ }
1456
+ )
1457
+ ), o;
1458
+ }
1459
+ const mc = [
1460
+ {
1461
+ key: "top",
1462
+ icon: /* @__PURE__ */ l(jn, {}),
1463
+ title: "置顶",
1464
+ style: { borderTop: "1px solid #e8e8e8" },
1465
+ onSelect: () => Wi()
1466
+ },
1467
+ {
1468
+ key: "bottom",
1469
+ icon: /* @__PURE__ */ l($t, {}),
1470
+ title: "置底",
1471
+ onSelect: () => Vi()
1472
+ },
1473
+ {
1474
+ key: "levelUp",
1475
+ icon: /* @__PURE__ */ l(et, {}),
1476
+ title: "上移一层",
1477
+ onSelect: () => Gi()
1478
+ },
1479
+ {
1480
+ key: "levelDown",
1481
+ icon: /* @__PURE__ */ l(tt, {}),
1482
+ title: "下移一层",
1483
+ style: { borderBottom: "1px solid #e8e8e8" },
1484
+ onSelect: () => Xi()
1485
+ },
1486
+ {
1487
+ key: "lock",
1488
+ icon: /* @__PURE__ */ l(Ht, {}),
1489
+ title: "锁定",
1490
+ onSelect: () => Ki()
1491
+ },
1492
+ {
1493
+ key: "unlock",
1494
+ icon: /* @__PURE__ */ l(zn, {}),
1495
+ title: "解锁",
1496
+ onSelect: () => qi()
1497
+ },
1498
+ {
1499
+ key: "group",
1500
+ icon: /* @__PURE__ */ l(Tn, {}),
1501
+ title: "成组",
1502
+ onSelect: () => Ui()
1503
+ },
1504
+ {
1505
+ key: "ungroup",
1506
+ icon: /* @__PURE__ */ l($n, {}),
1507
+ title: "取消成组",
1508
+ onSelect: () => Ji()
1509
+ },
1510
+ {
1511
+ key: "copy",
1512
+ icon: /* @__PURE__ */ l(Rn, {}),
1513
+ title: "复制",
1514
+ style: { borderTop: "1px solid #e8e8e8" },
1515
+ onSelect: () => dn()
1516
+ },
1517
+ {
1518
+ key: "delete",
1519
+ icon: /* @__PURE__ */ l(de, {}),
1520
+ title: "删除",
1521
+ titleStyle: { gap: 6 },
1522
+ onSelect: () => at()
1523
+ },
1524
+ {
1525
+ key: "collect",
1526
+ icon: /* @__PURE__ */ l(dt, {}),
1527
+ title: "收藏",
1528
+ onSelect: () => Yi()
1529
+ }
1530
+ ];
1531
+ function fc(e, t) {
1532
+ var n;
1533
+ return gn(e.clientX, e.clientY, mc, {
1534
+ zIndex: (n = t == null ? void 0 : t.componentNode) == null ? void 0 : n.getMaxLevel(),
1535
+ onBeforeOpen(i) {
1536
+ let c = 0, a = !1;
1537
+ const d = t.instance.getAllSelected(), o = d.map((s) => {
1538
+ const r = s.getComponentNode();
1539
+ return r != null && r.lock && c++, r.groupId && (a = !0), r;
1540
+ });
1541
+ return o.length ? i.filter((s) => s.key === "group" ? d.length > 1 : s.key === "ungroup" ? a : s.key === "lock" ? c !== o.length : s.key === "unlock" ? !!c : !0) : i;
1542
+ }
1543
+ });
1544
+ }
1545
+ const yc = [
1546
+ {
1547
+ key: "selectAll",
1548
+ title: "全选",
1549
+ icon: /* @__PURE__ */ l(Fn, {}),
1550
+ onSelect: () => on()
1551
+ },
1552
+ {
1553
+ key: "unselectAll",
1554
+ title: "反选",
1555
+ icon: /* @__PURE__ */ l(Hn, {}),
1556
+ onSelect: () => De()
1557
+ },
1558
+ {
1559
+ key: "clear",
1560
+ title: "清空",
1561
+ icon: /* @__PURE__ */ l(Rt, {}),
1562
+ onSelect: () => Hi()
1563
+ },
1564
+ {
1565
+ key: "saveLocal",
1566
+ title: "保存",
1567
+ icon: /* @__PURE__ */ l(p, {}),
1568
+ onSelect: () => vt()
1569
+ }
1570
+ ];
1571
+ function vc(e, t) {
1572
+ var n;
1573
+ return gn(e.clientX, e.clientY, yc, {
1574
+ zIndex: (n = t == null ? void 0 : t.componentNode) == null ? void 0 : n.getMaxLevel()
1575
+ });
1576
+ }
1577
+ let ve = [];
1578
+ function Dt() {
1579
+ ve.length && (ve.forEach((e) => e == null ? void 0 : e()), ve = []);
1580
+ }
1581
+ function _n(e) {
1582
+ const { engine: t } = N();
1583
+ gt(e, {
1584
+ contextmenu(n) {
1585
+ var d;
1586
+ Dt(), n.preventDefault();
1587
+ const i = ct(n.target, oe.componentNodeId, !0), c = t.instance.get(i), a = (d = c == null ? void 0 : c.getComponentNode) == null ? void 0 : d.call(c);
1588
+ if (c && a) {
1589
+ ve.push(fc(n, t));
1590
+ return;
1591
+ }
1592
+ ve.push(vc(n, t));
1593
+ }
1594
+ }), Qt(() => {
1595
+ Dt();
1596
+ });
1597
+ }
1598
+ function bc() {
1599
+ const { engine: e } = N(), t = Vt(), n = yt(), i = B(null), c = A(() => t.length ? /* @__PURE__ */ l("div", { className: Ue.componentNodes_block, children: t.map((a) => /* @__PURE__ */ l(
1600
+ nc,
1601
+ {
1602
+ componentNode: a,
1603
+ isSelected: e.instance.isSelected(a.id)
1604
+ },
1605
+ a.id
1606
+ )) }) : /* @__PURE__ */ l(W, {}), [t, n]);
1607
+ return _n(i), /* @__PURE__ */ g(
1608
+ "div",
1609
+ {
1610
+ ref: i,
1611
+ className: Ue.componentNodes,
1612
+ onMouseDown: () => De(),
1613
+ children: [
1614
+ /* @__PURE__ */ g("div", { className: Ue.componentNodes_head, children: [
1615
+ "当前页组件数量:",
1616
+ t.length
1617
+ ] }),
1618
+ !t.length && /* @__PURE__ */ l(q, {}),
1619
+ c
1620
+ ]
1621
+ }
1622
+ );
1623
+ }
1624
+ const Cc = "_menubar_1ah1r_59", xc = "_menubar_item_1ah1r_67", Ic = "_menubar_item_selected_1ah1r_81", Je = {
1625
+ menubar: Cc,
1626
+ menubar_item: xc,
1627
+ menubar_item_selected: Ic
1628
+ };
1629
+ function kc(e) {
1630
+ var t, n;
1631
+ return /* @__PURE__ */ l("div", { className: Je.menubar, children: (n = (t = e == null ? void 0 : e.list) == null ? void 0 : t.map) == null ? void 0 : n.call(t, (i) => {
1632
+ const c = i.key === e.value;
1633
+ return /* @__PURE__ */ l(T, { title: i == null ? void 0 : i.title, placement: "right", children: /* @__PURE__ */ l(
1634
+ "div",
1635
+ {
1636
+ id: i == null ? void 0 : i.domId,
1637
+ className: $(
1638
+ Je.menubar_item,
1639
+ c && Je.menubar_item_selected
1640
+ ),
1641
+ onClick: () => {
1642
+ var a;
1643
+ (a = e == null ? void 0 : e.onChange) == null || a.call(e, i == null ? void 0 : i.key);
1644
+ },
1645
+ children: i == null ? void 0 : i.icon
1646
+ }
1647
+ ) }, i == null ? void 0 : i.key);
1648
+ }) });
1649
+ }
1650
+ const Sc = "_propertyItem_1r9fx_59", Nc = "_propertyItem_icon_1r9fx_68", wc = "_propertyItem_icon_disabled_1r9fx_75", Ec = "_propertyItemPopover_1r9fx_79", Ac = "_propertyItemPopover_description_1r9fx_84", Lc = "_propertyItemPopover_statistic_1r9fx_89", Dc = "_propertyItemPopover_body_1r9fx_92", Oc = "_propertyItemPopover_body_item_1r9fx_95", Pc = "_propertyItemPopover_body_item_icon_1r9fx_105", Mc = "_propertyItemPopover_title_1r9fx_108", J = {
1651
+ propertyItem: Sc,
1652
+ propertyItem_icon: Nc,
1653
+ propertyItem_icon_disabled: wc,
1654
+ propertyItemPopover: Ec,
1655
+ propertyItemPopover_description: Ac,
1656
+ propertyItemPopover_statistic: Lc,
1657
+ propertyItemPopover_body: Dc,
1658
+ propertyItemPopover_body_item: Oc,
1659
+ propertyItemPopover_body_item_icon: Pc,
1660
+ propertyItemPopover_title: Mc
1661
+ };
1662
+ function Bc(e) {
1663
+ var s, r, u;
1664
+ const { data: t } = e, n = ht(), { engine: i } = N(), c = (t == null ? void 0 : t.origin) !== "system", a = (t == null ? void 0 : t.origin) !== "system";
1665
+ function d() {
1666
+ const h = Li(t == null ? void 0 : t.id), _ = () => {
1667
+ var m;
1668
+ return (m = e == null ? void 0 : e.onDelete) == null ? void 0 : m.call(e, t, h);
1669
+ };
1670
+ h.length || _(), n({
1671
+ content: /* @__PURE__ */ g("span", { children: [
1672
+ /* @__PURE__ */ l("span", { children: "该操作会同时删除" }),
1673
+ /* @__PURE__ */ g("span", { style: { color: "red" }, children: [
1674
+ " ",
1675
+ h.length,
1676
+ " "
1677
+ ] }),
1678
+ /* @__PURE__ */ g("span", { children: [
1679
+ "个相关实例 ,确定删除组件包“",
1680
+ t.name,
1681
+ "”?"
1682
+ ] })
1683
+ ] }),
1684
+ onOk(m) {
1685
+ _(), m();
1686
+ }
1687
+ });
1688
+ }
1689
+ async function o() {
1690
+ const h = await i.component.getPackageSourceCode(t == null ? void 0 : t.id);
1691
+ if (!h) {
1692
+ E.warn("源码不存在");
1693
+ return;
1694
+ }
1695
+ const _ = `${t == null ? void 0 : t.name}.js`;
1696
+ Jt(h, _);
1697
+ }
1698
+ return /* @__PURE__ */ l(
1699
+ st,
1700
+ {
1701
+ placement: "rightTop",
1702
+ title: /* @__PURE__ */ g("div", { className: J.propertyItemPopover_title, children: [
1703
+ /* @__PURE__ */ l("b", { children: t == null ? void 0 : t.name }),
1704
+ /* @__PURE__ */ g("span", { style: { color: "rgba(0,0,0,0.25)" }, children: [
1705
+ "v",
1706
+ t == null ? void 0 : t.version
1707
+ ] })
1708
+ ] }),
1709
+ content: /* @__PURE__ */ g(D, { direction: "vertical", className: J.propertyItemPopover, children: [
1710
+ (t == null ? void 0 : t.description) && /* @__PURE__ */ l("div", { className: J.propertyItemPopover_description, children: t == null ? void 0 : t.description }),
1711
+ /* @__PURE__ */ g("div", { className: J.propertyItemPopover_statistic, children: [
1712
+ "共包含组件",
1713
+ /* @__PURE__ */ g("b", { children: [
1714
+ " ",
1715
+ (s = t == null ? void 0 : t.components) == null ? void 0 : s.length,
1716
+ " "
1717
+ ] }),
1718
+ "个:"
1719
+ ] }),
1720
+ /* @__PURE__ */ l("div", { className: J.propertyItemPopover_body, children: /* @__PURE__ */ l(
1721
+ D,
1722
+ {
1723
+ size: 4,
1724
+ direction: "vertical",
1725
+ style: { width: 300, maxHeight: 160, overflowY: "auto" },
1726
+ children: (u = (r = t == null ? void 0 : t.components) == null ? void 0 : r.map) == null ? void 0 : u.call(r, (h) => /* @__PURE__ */ g("div", { className: J.propertyItemPopover_body_item, children: [
1727
+ /* @__PURE__ */ l("div", { className: J.propertyItemPopover_body_item_icon, children: /* @__PURE__ */ l(
1728
+ xe,
1729
+ {
1730
+ src: h == null ? void 0 : h.icon,
1731
+ style: { maxHeight: "80%", maxWidth: 32 }
1732
+ }
1733
+ ) }),
1734
+ /* @__PURE__ */ l("span", { children: h == null ? void 0 : h.cName })
1735
+ ] }, h == null ? void 0 : h.cId))
1736
+ }
1737
+ ) })
1738
+ ] }),
1739
+ children: /* @__PURE__ */ g("div", { className: J.propertyItem, onContextMenu: (h) => h.preventDefault(), children: [
1740
+ /* @__PURE__ */ l("span", { children: t == null ? void 0 : t.name }),
1741
+ /* @__PURE__ */ g(D, { children: [
1742
+ /* @__PURE__ */ l(
1743
+ de,
1744
+ {
1745
+ title: "删除",
1746
+ className: $(
1747
+ J.propertyItem_icon,
1748
+ !a && J.propertyItem_icon_disabled
1749
+ ),
1750
+ onClick: a ? d : void 0
1751
+ }
1752
+ ),
1753
+ /* @__PURE__ */ l(
1754
+ Kn,
1755
+ {
1756
+ title: "下载到本地",
1757
+ className: $(
1758
+ J.propertyItem_icon,
1759
+ !c && J.propertyItem_icon_disabled
1760
+ ),
1761
+ onClick: a ? o : void 0
1762
+ }
1763
+ )
1764
+ ] })
1765
+ ] })
1766
+ }
1767
+ );
1768
+ }
1769
+ const jc = "_jsonEditor_13vbq_59", zc = "_jsonEditor_render_13vbq_68", Tc = "_jsonEditor_loading_13vbq_72", We = {
1770
+ jsonEditor: jc,
1771
+ jsonEditor_render: zc,
1772
+ jsonEditor_loading: Tc
1773
+ };
1774
+ self.MonacoEnvironment = {
1775
+ getWorker: function(e, t) {
1776
+ const n = (i, c) => new Worker(self.MonacoEnvironment.getWorkerUrl(i), {
1777
+ name: c,
1778
+ type: "module"
1779
+ });
1780
+ switch (t) {
1781
+ case "json":
1782
+ return n("/monaco-editor/esm/vs/language/json/json.worker?worker", t);
1783
+ case "typescript":
1784
+ case "javascript":
1785
+ return n("/monaco-editor/esm/vs/language/typescript/ts.worker?worker", t);
1786
+ default:
1787
+ return n("/monaco-editor/esm/vs/editor/editor.worker?worker", t);
1788
+ }
1789
+ }
1790
+ };
1791
+ function Y(e) {
1792
+ const t = B(null), n = B();
1793
+ return w(() => {
1794
+ var c, a;
1795
+ const i = Ni.editor.create(t.current, {
1796
+ theme: "vs-light",
1797
+ value: e == null ? void 0 : e.value,
1798
+ language: (e == null ? void 0 : e.language) || "text",
1799
+ fontSize: 12,
1800
+ tabSize: 4,
1801
+ lineDecorationsWidth: 0,
1802
+ lineNumbersMinChars: 3,
1803
+ readOnly: e == null ? void 0 : e.readOnly,
1804
+ automaticLayout: !0,
1805
+ ...e == null ? void 0 : e.options,
1806
+ minimap: {
1807
+ enabled: (e == null ? void 0 : e.minimap) ?? !0,
1808
+ showSlider: void 0,
1809
+ ...(c = e == null ? void 0 : e.options) == null ? void 0 : c.minimap
1810
+ },
1811
+ readOnlyMessage: {
1812
+ value: "禁止编辑",
1813
+ ...(a = e == null ? void 0 : e.options) == null ? void 0 : a.readOnlyMessage
1814
+ }
1815
+ });
1816
+ return i.onDidChangeModelContent(() => {
1817
+ var o;
1818
+ const d = i.getValue();
1819
+ (o = e == null ? void 0 : e.onChange) == null || o.call(e, d);
1820
+ }), n.current = i, () => {
1821
+ i.dispose();
1822
+ };
1823
+ }, [e == null ? void 0 : e.language]), mt(() => {
1824
+ var c, a, d, o;
1825
+ if (!(n != null && n.current)) {
1826
+ console.error("monaco-editor init failed.");
1827
+ return;
1828
+ }
1829
+ const i = `${(e == null ? void 0 : e.value) || ""}`;
1830
+ i !== ((a = (c = n == null ? void 0 : n.current) == null ? void 0 : c.getValue) == null ? void 0 : a.call(c)) && ((o = (d = n.current) == null ? void 0 : d.setValue) == null || o.call(d, i));
1831
+ }, [e == null ? void 0 : e.value]), /* @__PURE__ */ g("div", { className: We.jsonEditor, style: e == null ? void 0 : e.style, children: [
1832
+ /* @__PURE__ */ l("div", { ref: t, className: We.jsonEditor_render }),
1833
+ (e == null ? void 0 : e.loading) && /* @__PURE__ */ l("div", { className: We.jsonEditor_loading, children: /* @__PURE__ */ l(Kt, { style: { fontSize: 20 } }) })
1834
+ ] });
1835
+ }
1836
+ const $c = ue((e) => {
1837
+ const { params: t } = e, [n] = M.useForm(), [i, c] = S(!1), a = B("");
1838
+ function d() {
1839
+ n.validateFields(["url"]).then((s) => {
1840
+ var r;
1841
+ if (!["http", "https"].find((u) => {
1842
+ var h, _;
1843
+ return (_ = (h = s == null ? void 0 : s.url) == null ? void 0 : h.startsWith) == null ? void 0 : _.call(h, u);
1844
+ })) {
1845
+ E.error("地址格式不正确");
1846
+ return;
1847
+ }
1848
+ c(!0), (r = it(s == null ? void 0 : s.url)) == null || r.then((u) => {
1849
+ c(!1), a.current = s == null ? void 0 : s.url, n.setFieldsValue({
1850
+ content: u
1851
+ });
1852
+ });
1853
+ });
1854
+ }
1855
+ async function o() {
1856
+ var r, u;
1857
+ const s = n.getFieldValue("content");
1858
+ s || E.warn("文本内容不能为空"), !(t != null && t.beforeOk && !await Promise.resolve((r = t == null ? void 0 : t.beforeOk) == null ? void 0 : r.call(t, s))) && ((u = e == null ? void 0 : e.onOk) == null || u.call(e, {
1859
+ url: a.current,
1860
+ content: s
1861
+ }));
1862
+ }
1863
+ return /* @__PURE__ */ l(
1864
+ re,
1865
+ {
1866
+ width: 800,
1867
+ okText: "确定",
1868
+ cancelText: "取消",
1869
+ title: "远程读取",
1870
+ open: e == null ? void 0 : e.visible,
1871
+ afterClose: e == null ? void 0 : e.afterClose,
1872
+ onCancel: e == null ? void 0 : e.onCancel,
1873
+ bodyStyle: { paddingBottom: 0 },
1874
+ onOk: o,
1875
+ children: /* @__PURE__ */ g(M, { form: n, labelCol: { span: 2 }, children: [
1876
+ /* @__PURE__ */ l(M.Item, { label: "地址", name: "url", rules: [{ required: !0, message: "请输入地址" }], children: /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1877
+ /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "url", style: { flex: 1 }, children: /* @__PURE__ */ l(ee, { size: "middle" }) }),
1878
+ /* @__PURE__ */ l(K, { type: "primary", onClick: d, loading: i, children: "读取" })
1879
+ ] }) }),
1880
+ /* @__PURE__ */ l(M.Item, { label: "文本", name: "content", children: /* @__PURE__ */ l(Y, { readOnly: !0, language: "javascript", style: { height: 400 } }) })
1881
+ ] })
1882
+ }
1883
+ );
1884
+ }), Rc = [
1885
+ { key: "local", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "本地上传" }) },
1886
+ { key: "remote", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "远程导入" }) }
1887
+ ];
1888
+ function Fc(e) {
1889
+ const t = B(), n = B(""), i = $c({
1890
+ onOk({ url: s }) {
1891
+ if (!t.current) {
1892
+ E.warn("package新增失败");
1893
+ return;
1894
+ }
1895
+ t.current.origin = "remote", t.current.originData = s, c(t.current, n.current);
1896
+ }
1897
+ });
1898
+ function c(s, r) {
1899
+ var u;
1900
+ if (!s) return E.warn("不包含组件包");
1901
+ (u = e == null ? void 0 : e.onAdd) == null || u.call(e, s, r || "");
1902
+ }
1903
+ function a(s, r) {
1904
+ var u;
1905
+ if (!(s != null && s.length)) return E.warn("不包含组件包");
1906
+ (u = e == null ? void 0 : e.onAddSome) == null || u.call(e, s, r);
1907
+ }
1908
+ async function d(s) {
1909
+ var C;
1910
+ const r = new Blob([s], { type: s.type }), h = await new ft().loadAsync(r), _ = (h == null ? void 0 : h.files) || {}, m = [], y = [];
1911
+ for (const b in _) {
1912
+ if (!((C = b == null ? void 0 : b.endsWith) != null && C.call(b, ".js")))
1913
+ continue;
1914
+ const f = await _[b].async("text"), v = await ze(f);
1915
+ v && (v.origin = "local", m.push(v), y.push(f));
1916
+ }
1917
+ return {
1918
+ pkgs: m,
1919
+ codes: y
1920
+ };
1921
+ }
1922
+ async function o(s) {
1923
+ let r = "";
1924
+ switch (s) {
1925
+ case "local":
1926
+ const u = await ln({ accept: "text/javascript,application/zip" });
1927
+ if (!u)
1928
+ return;
1929
+ if (["application/x-zip-compressed", "application/zip"].includes(u == null ? void 0 : u.type)) {
1930
+ const { pkgs: h, codes: _ } = await d(u);
1931
+ a(h, _);
1932
+ return;
1933
+ }
1934
+ if ((u == null ? void 0 : u.type) === "text/javascript") {
1935
+ r = await cn(u);
1936
+ const h = await ze(r);
1937
+ if (!h)
1938
+ return E.warn("文本内容必须为UMD或者AMD格式");
1939
+ h.origin = "local", c(h, r);
1940
+ return;
1941
+ }
1942
+ E.warn("只能上传 .js 和 .zip 文件");
1943
+ break;
1944
+ case "remote":
1945
+ i.open({
1946
+ async beforeOk(h) {
1947
+ return n.current = h, t.current = await ze(h), t.current || E.warn("文本内容必须为UMD或者AMD格式"), !!t.current;
1948
+ }
1949
+ });
1950
+ break;
1951
+ }
1952
+ }
1953
+ return /* @__PURE__ */ l(W, { children: /* @__PURE__ */ l(
1954
+ be,
1955
+ {
1956
+ trigger: ["click"],
1957
+ menu: {
1958
+ items: Rc,
1959
+ onClick({ key: s }) {
1960
+ o(s);
1961
+ }
1962
+ },
1963
+ children: /* @__PURE__ */ l(K, { size: "small", style: { fontSize: 12 }, type: "primary", children: e == null ? void 0 : e.children })
1964
+ }
1965
+ ) });
1966
+ }
1967
+ const Ot = "./demo.umd.js", Pt = "./demo.amd.js", Hc = [
1968
+ { key: "umd-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包(UMD)" }) },
1969
+ { key: "amd-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包(AMD)" }) },
1970
+ { key: "zip-demo", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载示例组件包集合(.zip)" }) },
1971
+ { key: "all", label: /* @__PURE__ */ l("span", { className: "theme-text", children: "下载全部资产" }) }
1972
+ ];
1973
+ function Kc(e) {
1974
+ async function t(n) {
1975
+ var i;
1976
+ switch (n) {
1977
+ case "umd-demo":
1978
+ It(Ot, "测试包2.js");
1979
+ break;
1980
+ case "amd-demo":
1981
+ It(Pt, "测试包1.js");
1982
+ break;
1983
+ case "zip-demo":
1984
+ const c = await it(Ot), a = await it(Pt), d = new ft();
1985
+ d.file("测试包1.js", a), d.file("测试包2.js", c), d.generateAsync({ type: "blob" }).then(function(o) {
1986
+ en(o, "组件包集合.zip");
1987
+ });
1988
+ break;
1989
+ case "all":
1990
+ (i = e == null ? void 0 : e.onDownloadAll) == null || i.call(e);
1991
+ break;
1992
+ }
1993
+ }
1994
+ return /* @__PURE__ */ l(W, { children: /* @__PURE__ */ l(
1995
+ be,
1996
+ {
1997
+ trigger: ["click"],
1998
+ menu: {
1999
+ items: Hc,
2000
+ onClick({ key: n }) {
2001
+ t(n);
2002
+ }
2003
+ },
2004
+ children: /* @__PURE__ */ l(K, { size: "small", style: { fontSize: 12 }, children: e == null ? void 0 : e.children })
2005
+ }
2006
+ ) });
2007
+ }
2008
+ const qc = "_property_zt9oy_59", Uc = "_property_header_zt9oy_68", Mt = {
2009
+ property: qc,
2010
+ property_header: Uc
2011
+ };
2012
+ function Jc() {
2013
+ var o;
2014
+ const e = Gt(), { engine: t } = N(), { loading: n, run: i } = pt(
2015
+ async () => new Promise((s) => {
2016
+ setTimeout(() => {
2017
+ E.success("刷新成功"), s();
2018
+ }, 500);
2019
+ }),
2020
+ {
2021
+ manual: !0
2022
+ }
2023
+ );
2024
+ function c(s, r) {
2025
+ const u = Array.isArray(s) ? s : [s], h = Array.isArray(r) ? r : [r];
2026
+ t.component.registerPackage(u), h.forEach((_, m) => {
2027
+ t.component.savePackageSourceCode(u[m], _);
2028
+ });
2029
+ }
2030
+ function a(s, r) {
2031
+ t.component.unregisterPackage(s), t.componentNode.delete(r);
2032
+ }
2033
+ async function d() {
2034
+ const s = e.map((r) => t.component.getPackageSourceCode(r.id));
2035
+ Promise.all(s).then((r) => {
2036
+ const u = new ft();
2037
+ let h = 0;
2038
+ if (r.forEach((_, m) => {
2039
+ if (!_) return;
2040
+ const y = e[m];
2041
+ u.file(`${y.name}.js`, _), h++;
2042
+ }), !h) {
2043
+ E.warn("暂无组件包");
2044
+ return;
2045
+ }
2046
+ u.generateAsync({ type: "blob" }).then(function(_) {
2047
+ en(_, "组件包集合.zip");
2048
+ });
2049
+ });
2050
+ }
2051
+ return /* @__PURE__ */ g("div", { className: Mt.property, children: [
2052
+ /* @__PURE__ */ g("div", { className: Mt.property_header, children: [
2053
+ /* @__PURE__ */ g(D, { children: [
2054
+ /* @__PURE__ */ l("b", { children: "资产列表" }),
2055
+ /* @__PURE__ */ l(
2056
+ "span",
2057
+ {
2058
+ title: "刷新资产",
2059
+ className: "icon_clickable",
2060
+ onClick: () => !n && i(),
2061
+ children: n ? /* @__PURE__ */ l(Kt, {}) : /* @__PURE__ */ l(Q, {})
2062
+ }
2063
+ )
2064
+ ] }),
2065
+ /* @__PURE__ */ g(D, { children: [
2066
+ /* @__PURE__ */ l(
2067
+ Kc,
2068
+ {
2069
+ onDownloadAll: () => {
2070
+ d();
2071
+ },
2072
+ children: "下载"
2073
+ }
2074
+ ),
2075
+ /* @__PURE__ */ l(
2076
+ Fc,
2077
+ {
2078
+ onAdd: (s, r) => {
2079
+ c(s, r);
2080
+ },
2081
+ onAddSome: (s, r) => {
2082
+ c(s, r);
2083
+ },
2084
+ children: "新增组件包"
2085
+ }
2086
+ )
2087
+ ] })
2088
+ ] }),
2089
+ !e.length && /* @__PURE__ */ l(q, {}),
2090
+ (o = e == null ? void 0 : e.map) == null ? void 0 : o.call(e, (s) => /* @__PURE__ */ l(
2091
+ Bc,
2092
+ {
2093
+ data: s,
2094
+ onDelete: (r, u) => {
2095
+ a(r, u);
2096
+ }
2097
+ },
2098
+ s.id
2099
+ ))
2100
+ ] });
2101
+ }
2102
+ const Wc = "_favorites_1mbr5_59", Vc = {
2103
+ favorites: Wc
2104
+ }, Gc = "_favoriteItem_1ipdv_59", Xc = "_favoriteItem_head_1ipdv_74", Yc = "_favoriteItem_name_1ipdv_83", Zc = "_favoriteItem_footer_1ipdv_93", ke = {
2105
+ favoriteItem: Gc,
2106
+ favoriteItem_head: Xc,
2107
+ favoriteItem_name: Yc,
2108
+ favoriteItem_footer: Zc
2109
+ };
2110
+ function Qc(e) {
2111
+ const { favorite: t } = e, n = B(null), i = B(null);
2112
+ return sn(n, {
2113
+ type: "create-favorite",
2114
+ data: {
2115
+ favorite: t
2116
+ }
2117
+ }), gt(i, {
2118
+ mousedown(c) {
2119
+ c.stopPropagation();
2120
+ }
2121
+ }), /* @__PURE__ */ g("div", { className: ke.favoriteItem, ref: n, children: [
2122
+ /* @__PURE__ */ l("div", { className: ke.favoriteItem_head, children: /* @__PURE__ */ l(dt, {}) }),
2123
+ /* @__PURE__ */ l("div", { className: ke.favoriteItem_name, title: t.id, children: t.name }),
2124
+ /* @__PURE__ */ g("div", { className: ke.favoriteItem_footer, ref: i, children: [
2125
+ /* @__PURE__ */ l(T, { title: "编辑", children: /* @__PURE__ */ l(qt, { onClick: () => {
2126
+ var c;
2127
+ return (c = e == null ? void 0 : e.onEdit) == null ? void 0 : c.call(e);
2128
+ } }) }),
2129
+ /* @__PURE__ */ l(T, { title: "删除", children: /* @__PURE__ */ l(de, { onClick: () => {
2130
+ var c;
2131
+ return (c = e == null ? void 0 : e.onDelete) == null ? void 0 : c.call(e);
2132
+ } }) }),
2133
+ /* @__PURE__ */ l(T, { title: "详情", children: /* @__PURE__ */ l(qn, { onClick: () => {
2134
+ var c;
2135
+ return (c = e == null ? void 0 : e.onDetail) == null ? void 0 : c.call(e);
2136
+ } }) })
2137
+ ] })
2138
+ ] }, t.id);
2139
+ }
2140
+ const pc = ue((e) => {
2141
+ var c;
2142
+ const [t] = M.useForm(), n = (c = e == null ? void 0 : e.params) == null ? void 0 : c.favorite;
2143
+ function i() {
2144
+ t.validateFields().then((a) => {
2145
+ var d;
2146
+ (d = e == null ? void 0 : e.onOk) == null || d.call(e, {
2147
+ ...n,
2148
+ name: a == null ? void 0 : a.name
2149
+ });
2150
+ });
2151
+ }
2152
+ return w(() => {
2153
+ e != null && e.visible && t.setFieldsValue({
2154
+ name: n == null ? void 0 : n.name
2155
+ });
2156
+ }, [e == null ? void 0 : e.visible]), /* @__PURE__ */ l(
2157
+ re,
2158
+ {
2159
+ centered: !0,
2160
+ closable: !1,
2161
+ open: e == null ? void 0 : e.visible,
2162
+ onCancel: e == null ? void 0 : e.onCancel,
2163
+ afterClose: e == null ? void 0 : e.afterClose,
2164
+ bodyStyle: { paddingBottom: 6 },
2165
+ footer: null,
2166
+ children: /* @__PURE__ */ l(M, { form: t, children: /* @__PURE__ */ l(M.Item, { label: "名称", name: "name", rules: [{ required: !0, message: "请填写名称" }], children: /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2167
+ /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "name", children: /* @__PURE__ */ l(ee, { size: "middle", style: { flex: 1 } }) }),
2168
+ /* @__PURE__ */ l(K, { type: "primary", onClick: i, children: "保存" })
2169
+ ] }) }) })
2170
+ }
2171
+ );
2172
+ }), ea = "_favoriteDetailDialog_title_17m9n_67", ta = "_favoriteDetailDialog_componentNodes_17m9n_73", na = "_favoriteDetailDialog_item_17m9n_78", Ve = {
2173
+ favoriteDetailDialog_title: ea,
2174
+ favoriteDetailDialog_componentNodes: ta,
2175
+ favoriteDetailDialog_item: na
2176
+ }, ia = ue((e) => {
2177
+ var i, c, a, d;
2178
+ const { engine: t } = N(), n = (i = e == null ? void 0 : e.params) == null ? void 0 : i.favorite;
2179
+ return /* @__PURE__ */ g(
2180
+ re,
2181
+ {
2182
+ centered: !0,
2183
+ title: /* @__PURE__ */ l("div", { className: Ve.favoriteDetailDialog_title, children: n == null ? void 0 : n.name }),
2184
+ open: e == null ? void 0 : e.visible,
2185
+ onCancel: e == null ? void 0 : e.onCancel,
2186
+ afterClose: e == null ? void 0 : e.afterClose,
2187
+ okText: "保存",
2188
+ cancelText: "取消",
2189
+ footer: null,
2190
+ bodyStyle: { padding: "12px 24px 24px", height: 500, overflowY: "hidden" },
2191
+ children: [
2192
+ /* @__PURE__ */ g(
2193
+ je,
2194
+ {
2195
+ column: 2,
2196
+ labelStyle: { color: "rgba(0,0,0,0.5)", fontSize: 12 },
2197
+ contentStyle: { color: "rgba(0,0,0,0.5)", fontSize: 12 },
2198
+ children: [
2199
+ /* @__PURE__ */ l(je.Item, { label: "id", children: n == null ? void 0 : n.id }),
2200
+ /* @__PURE__ */ l(je.Item, { label: "创建时间", children: n == null ? void 0 : n.gmtCreate })
2201
+ ]
2202
+ }
2203
+ ),
2204
+ /* @__PURE__ */ g("div", { className: Ve.favoriteDetailDialog_componentNodes, children: [
2205
+ !((c = n == null ? void 0 : n.children) != null && c.length) && /* @__PURE__ */ l(q, {}),
2206
+ (d = (a = n == null ? void 0 : n.children) == null ? void 0 : a.map) == null ? void 0 : d.call(a, (o) => {
2207
+ const s = t.component.get(o.cId);
2208
+ return /* @__PURE__ */ g("div", { className: Ve.favoriteDetailDialog_item, children: [
2209
+ /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
2210
+ xe,
2211
+ {
2212
+ src: s == null ? void 0 : s.icon,
2213
+ style: { maxWidth: "80%", maxHeight: "80%" }
2214
+ }
2215
+ ) }),
2216
+ /* @__PURE__ */ l("span", { title: o.name, children: o.name })
2217
+ ] }, o.id);
2218
+ })
2219
+ ] })
2220
+ ]
2221
+ }
2222
+ );
2223
+ });
2224
+ function la() {
2225
+ const { engine: e } = N(), t = Pi(), n = ia(), i = pc({
2226
+ onOk(a) {
2227
+ e.favorites.update(a.id, a);
2228
+ }
2229
+ });
2230
+ function c(a) {
2231
+ e.favorites.delete(a);
2232
+ }
2233
+ return /* @__PURE__ */ g("div", { className: Vc.favorites, children: [
2234
+ !(t != null && t.length) && /* @__PURE__ */ l(q, {}),
2235
+ t.map((a) => /* @__PURE__ */ l(
2236
+ Qc,
2237
+ {
2238
+ favorite: a,
2239
+ onDelete: () => c(a),
2240
+ onEdit: () => {
2241
+ i.open({
2242
+ favorite: a
2243
+ });
2244
+ },
2245
+ onDetail: () => {
2246
+ n.open({
2247
+ favorite: a
2248
+ });
2249
+ }
2250
+ },
2251
+ a.id
2252
+ ))
2253
+ ] });
2254
+ }
2255
+ const ca = "_pages_1ty8r_59", aa = "_pages_head_1ty8r_67", oa = "_pages_body_1ty8r_76", Ge = {
2256
+ pages: ca,
2257
+ pages_head: aa,
2258
+ pages_body: oa
2259
+ }, da = ue((e) => {
2260
+ const { params: t } = e, [n] = M.useForm();
2261
+ function i(a) {
2262
+ return {
2263
+ name: a,
2264
+ id: ut(),
2265
+ parentId: t == null ? void 0 : t.parentId
2266
+ };
2267
+ }
2268
+ function c() {
2269
+ n.validateFields().then((a) => {
2270
+ var d;
2271
+ (d = e == null ? void 0 : e.onOk) == null || d.call(e, {
2272
+ page: i(a.name),
2273
+ parentId: t == null ? void 0 : t.parentId
2274
+ });
2275
+ });
2276
+ }
2277
+ return /* @__PURE__ */ l(
2278
+ re,
2279
+ {
2280
+ centered: !0,
2281
+ open: e == null ? void 0 : e.visible,
2282
+ title: "新增页面",
2283
+ afterClose: e == null ? void 0 : e.afterClose,
2284
+ onCancel: e == null ? void 0 : e.onCancel,
2285
+ onOk: c,
2286
+ width: 500,
2287
+ bodyStyle: {
2288
+ padding: "12px 24px 12px 12px"
2289
+ },
2290
+ children: /* @__PURE__ */ g(M, { form: n, labelCol: { span: 4 }, children: [
2291
+ (t == null ? void 0 : t.parentName) && /* @__PURE__ */ l(M.Item, { label: "父页面", children: t == null ? void 0 : t.parentName }),
2292
+ /* @__PURE__ */ l(M.Item, { label: "名称", name: "name", rules: [{ required: !0, message: "请输入名称" }], children: /* @__PURE__ */ l(ee, {}) })
2293
+ ] })
2294
+ }
2295
+ );
2296
+ });
2297
+ function ra() {
2298
+ const { engine: e } = N(), [t, n] = S([]), [i, c] = S([]), [a, d, o] = oi([]), s = wi(), r = Ei(), u = da({
2299
+ onOk({ page: b, parentId: I }) {
2300
+ if (e.page.insert(b, I), Re(b.id), I) {
2301
+ const f = Array.from(new Set(t).add(I));
2302
+ h(f);
2303
+ }
2304
+ }
2305
+ });
2306
+ function h(b) {
2307
+ n(b), e.config.setConfigSilently({ expandedPageIds: b });
2308
+ }
2309
+ function _(b) {
2310
+ var I;
2311
+ return ((I = b == null ? void 0 : b.reduce) == null ? void 0 : I.call(b, (f, v) => f.concat([v.key, ..._(v == null ? void 0 : v.children)]), [])) || [];
2312
+ }
2313
+ function m(b) {
2314
+ u.open({
2315
+ parentId: b.id,
2316
+ parentName: b.name
2317
+ });
2318
+ }
2319
+ function y(b, I = {}) {
2320
+ var v, x, L, j, R, U, V;
2321
+ const f = [b.id, ..._(I[b.id].children)];
2322
+ if (((v = o.current) == null ? void 0 : v.length) === 1 && (f != null && f.includes((L = (x = o.current) == null ? void 0 : x[0]) == null ? void 0 : L.key))) {
2323
+ E.warn("至少保留一个顶层页");
2324
+ return;
2325
+ }
2326
+ if (f.includes(e.config.getCurrentPage())) {
2327
+ let Be = (R = (j = o.current) == null ? void 0 : j[0]) == null ? void 0 : R.key;
2328
+ f.includes(Be) && (Be = (V = (U = o.current) == null ? void 0 : U[1]) == null ? void 0 : V.key), Re(Be);
2329
+ }
2330
+ e.page.delete(f);
2331
+ }
2332
+ function C(b, I = {}) {
2333
+ const f = [];
2334
+ return b.forEach((v) => {
2335
+ var j, R, U;
2336
+ const x = I[v.id], L = I[v.id] = {
2337
+ key: (x == null ? void 0 : x.key) || v.id,
2338
+ title: (x == null ? void 0 : x.title) || /* @__PURE__ */ g("span", { children: [
2339
+ /* @__PURE__ */ l("span", { children: v.name }),
2340
+ /* @__PURE__ */ g("span", { style: { fontSize: 12 }, onClick: (V) => V.stopPropagation(), children: [
2341
+ /* @__PURE__ */ l("a", { style: { marginLeft: 16 }, onClick: () => m(v), children: "新增" }),
2342
+ /* @__PURE__ */ l("a", { style: { marginLeft: 8 }, onClick: () => y(v, I), children: "删除" })
2343
+ ] })
2344
+ ] }),
2345
+ children: (x == null ? void 0 : x.children) || []
2346
+ };
2347
+ if (v != null && v.parentId) {
2348
+ (U = (R = I[j = v == null ? void 0 : v.parentId] || (I[j] = {
2349
+ key: "",
2350
+ title: "",
2351
+ children: []
2352
+ })) == null ? void 0 : R.children) == null || U.push(L);
2353
+ return;
2354
+ }
2355
+ f.push(L);
2356
+ }), f;
2357
+ }
2358
+ return w(() => {
2359
+ n(e.config.getConfig().expandedPageIds || []);
2360
+ }, []), w(() => {
2361
+ d(C(s));
2362
+ }, [s]), w(() => {
2363
+ c([r]);
2364
+ }, [r]), /* @__PURE__ */ g("div", { className: Ge.pages, children: [
2365
+ /* @__PURE__ */ g("div", { className: Ge.pages_head, children: [
2366
+ /* @__PURE__ */ l("b", { children: "页面管理" }),
2367
+ /* @__PURE__ */ l(D, { children: /* @__PURE__ */ l(
2368
+ K,
2369
+ {
2370
+ type: "primary",
2371
+ size: "small",
2372
+ style: { fontSize: 12 },
2373
+ onClick: () => {
2374
+ u.open();
2375
+ },
2376
+ children: "新增页面"
2377
+ }
2378
+ ) })
2379
+ ] }),
2380
+ /* @__PURE__ */ l("div", { className: Ge.pages_body, children: /* @__PURE__ */ l(
2381
+ pn,
2382
+ {
2383
+ showIcon: !0,
2384
+ multiple: !1,
2385
+ defaultExpandAll: !0,
2386
+ icon: /* @__PURE__ */ l(Un, {}),
2387
+ treeData: a,
2388
+ selectedKeys: i,
2389
+ expandedKeys: t,
2390
+ onExpand: h,
2391
+ onSelect: (b) => {
2392
+ b.length && Re(b == null ? void 0 : b[0]);
2393
+ }
2394
+ }
2395
+ ) })
2396
+ ] });
2397
+ }
2398
+ const sa = "_history_zo6ip_59", ua = "_history_head_zo6ip_71", ha = "_history_body_zo6ip_75", ga = "_history_item_zo6ip_80", _a = "_history_item_gray_zo6ip_88", _e = {
2399
+ history: sa,
2400
+ history_head: ua,
2401
+ history_body: ha,
2402
+ history_item: ga,
2403
+ history_item_gray: _a
2404
+ };
2405
+ function ma() {
2406
+ var c, a, d, o;
2407
+ const { engine: e } = N(), t = an(), n = (c = t.current) == null ? void 0 : c.stepId;
2408
+ function i(s) {
2409
+ e.history.isPass(s) && n === s ? bt() : Qi(s);
2410
+ }
2411
+ return /* @__PURE__ */ g("div", { className: _e.history, children: [
2412
+ /* @__PURE__ */ l("div", { className: _e.history_head, children: /* @__PURE__ */ g("b", { children: [
2413
+ "最大存储容量:",
2414
+ t == null ? void 0 : t.maxSize
2415
+ ] }) }),
2416
+ /* @__PURE__ */ g("div", { className: _e.history_body, children: [
2417
+ (d = (a = t == null ? void 0 : t.list) == null ? void 0 : a.map) == null ? void 0 : d.call(a, (s) => /* @__PURE__ */ l(
2418
+ "div",
2419
+ {
2420
+ className: $(_e.history_item, !s.isPass && _e.history_item_gray),
2421
+ onClick: () => {
2422
+ i(s.stepId);
2423
+ },
2424
+ children: s.description
2425
+ },
2426
+ s.stepId
2427
+ )),
2428
+ !((o = t == null ? void 0 : t.list) != null && o.length) && /* @__PURE__ */ l(q, {})
2429
+ ] })
2430
+ ] });
2431
+ }
2432
+ function fa() {
2433
+ const { engine: e } = N(), [t, n] = se(), i = A(() => [
2434
+ {
2435
+ key: "library",
2436
+ domId: "rbs-library",
2437
+ icon: /* @__PURE__ */ l(Jn, {}),
2438
+ title: t("menu.bar.library"),
2439
+ children: /* @__PURE__ */ l(Wl, {})
2440
+ },
2441
+ {
2442
+ key: "pages",
2443
+ domId: "rbs-pages",
2444
+ icon: /* @__PURE__ */ l(Wn, {}),
2445
+ title: t("menu.bar.pages"),
2446
+ children: /* @__PURE__ */ l(ra, {})
2447
+ },
2448
+ {
2449
+ key: "componentNodes",
2450
+ domId: "rbs-componentNodes",
2451
+ icon: /* @__PURE__ */ l(Vn, {}),
2452
+ title: t("menu.bar.componentNodes"),
2453
+ children: /* @__PURE__ */ l(bc, {})
2454
+ },
2455
+ {
2456
+ key: "property",
2457
+ domId: "rbs-property",
2458
+ icon: /* @__PURE__ */ l(Gn, {}),
2459
+ title: t("menu.bar.property"),
2460
+ children: /* @__PURE__ */ l(Jc, {})
2461
+ },
2462
+ {
2463
+ key: "favorites",
2464
+ domId: "rbs-favorites",
2465
+ icon: /* @__PURE__ */ l(dt, {}),
2466
+ title: t("menu.bar.favorites"),
2467
+ children: /* @__PURE__ */ l(la, {})
2468
+ },
2469
+ {
2470
+ key: "history",
2471
+ domId: "rbs-history",
2472
+ icon: /* @__PURE__ */ l(Xn, {}),
2473
+ title: t("menu.bar.history"),
2474
+ children: /* @__PURE__ */ l(ma, {})
2475
+ }
2476
+ ], [n.language]), c = Ee((r) => r.currentMenu), [a, d] = S(""), o = A(() => {
2477
+ var r;
2478
+ return (r = i.find((u) => u.key === a)) == null ? void 0 : r.children;
2479
+ }, [a]);
2480
+ function s(r) {
2481
+ d(r), e.config.setConfigSilently({
2482
+ currentMenu: r
2483
+ });
2484
+ }
2485
+ return w(() => {
2486
+ const { currentMenu: r } = e.config.getConfig(), u = i.find((h) => h.key === r);
2487
+ d((u == null ? void 0 : u.key) || i[0].key);
2488
+ }, [c]), /* @__PURE__ */ g("div", { className: He.menu, children: [
2489
+ /* @__PURE__ */ l("div", { className: He.menu_bar, children: /* @__PURE__ */ l(kc, { value: a, list: i, onChange: s }) }),
2490
+ /* @__PURE__ */ l("div", { className: He.menu_main, children: o })
2491
+ ] });
2492
+ }
2493
+ const ya = "_editor_82kko_59", va = "_editor_render_82kko_65", Bt = {
2494
+ editor: ya,
2495
+ editor_render: va
2496
+ }, ba = "_flexCenter_1kt3d_29", Ca = "_icon_clickable_1kt3d_49", xa = "_icon_selected_1kt3d_56", Ia = "_moveItem_box_1kt3d_59", ka = "_moveItem_box_lock_1kt3d_69", Sa = "_moveItem_box_selected_1kt3d_72", Na = "_moveItem_box_hover_1kt3d_79", wa = "_dragPointCommon_1kt3d_83", Ea = "_p_top_1kt3d_92", Aa = "_p_left_1kt3d_95", La = "_p_right_1kt3d_98", Da = "_p_bottom_1kt3d_101", Oa = "_p_horizontal_mid_1kt3d_104", Pa = "_p_vertical_mid_1kt3d_107", Ma = "_dragPoint_top_1kt3d_110", Ba = "_dragPoint_top_left_1kt3d_123", ja = "_dragPoint_top_right_1kt3d_136", za = "_dragPoint_bottom_1kt3d_149", Ta = "_dragPoint_bottom_left_1kt3d_162", $a = "_dragPoint_bottom_right_1kt3d_175", Ra = "_dragPoint_left_1kt3d_188", Fa = "_dragPoint_right_1kt3d_201", ie = {
2497
+ flexCenter: ba,
2498
+ "theme-text": "_theme-text_1kt3d_34",
2499
+ "theme-color": "_theme-color_1kt3d_38",
2500
+ "text-ellipsis": "_text-ellipsis_1kt3d_41",
2501
+ "border-right": "_border-right_1kt3d_46",
2502
+ icon_clickable: Ca,
2503
+ icon_selected: xa,
2504
+ moveItem_box: Ia,
2505
+ moveItem_box_lock: ka,
2506
+ moveItem_box_selected: Sa,
2507
+ moveItem_box_hover: Na,
2508
+ dragPointCommon: wa,
2509
+ p_top: Ea,
2510
+ p_left: Aa,
2511
+ p_right: La,
2512
+ p_bottom: Da,
2513
+ p_horizontal_mid: Oa,
2514
+ p_vertical_mid: Pa,
2515
+ dragPoint_top: Ma,
2516
+ dragPoint_top_left: Ba,
2517
+ dragPoint_top_right: ja,
2518
+ dragPoint_bottom: za,
2519
+ dragPoint_bottom_left: Ta,
2520
+ dragPoint_bottom_right: $a,
2521
+ dragPoint_left: Ra,
2522
+ dragPoint_right: Fa
2523
+ }, Ha = [
2524
+ "top",
2525
+ "top_left",
2526
+ "top_right",
2527
+ "bottom",
2528
+ "bottom_left",
2529
+ "bottom_right",
2530
+ "left",
2531
+ "right"
2532
+ ], Ka = {
2533
+ top: "n-resize",
2534
+ top_left: "nw-resize",
2535
+ top_right: "ne-resize",
2536
+ bottom: "s-resize",
2537
+ bottom_left: "sw-resize",
2538
+ bottom_right: "se-resize",
2539
+ left: "w-resize",
2540
+ right: "e-resize"
2541
+ };
2542
+ function qa(e, t, n) {
2543
+ const i = {
2544
+ dx: 0,
2545
+ dy: 0,
2546
+ dw: 0,
2547
+ dh: 0
2548
+ };
2549
+ function c() {
2550
+ i.dh = -n, i.dy = n;
2551
+ }
2552
+ function a() {
2553
+ i.dw = -t, i.dx = t;
2554
+ }
2555
+ function d() {
2556
+ i.dh = n;
2557
+ }
2558
+ function o() {
2559
+ i.dw = t;
2560
+ }
2561
+ switch (e) {
2562
+ case "top":
2563
+ c();
2564
+ break;
2565
+ case "top_left":
2566
+ c(), a();
2567
+ break;
2568
+ case "top_right":
2569
+ c(), o();
2570
+ break;
2571
+ case "bottom":
2572
+ d();
2573
+ break;
2574
+ case "bottom_left":
2575
+ d(), a();
2576
+ break;
2577
+ case "bottom_right":
2578
+ d(), o();
2579
+ break;
2580
+ case "left":
2581
+ a();
2582
+ break;
2583
+ case "right":
2584
+ o();
2585
+ break;
2586
+ }
2587
+ return i;
2588
+ }
2589
+ function Ua(e, t, n) {
2590
+ let i = {
2591
+ x: 0,
2592
+ y: 0,
2593
+ width: t.offsetWidth,
2594
+ height: t.offsetHeight
2595
+ };
2596
+ const c = k.getActiveEngine();
2597
+ if (c)
2598
+ return {
2599
+ onStart() {
2600
+ i = {
2601
+ x: e.x,
2602
+ y: e.y,
2603
+ width: e.width,
2604
+ height: e.height
2605
+ }, t.style.zIndex = `${c.componentNode.getMaxLevel()}`, ae.set(Ka[n]);
2606
+ },
2607
+ onMove(a, d) {
2608
+ const o = qa(n, a, d), s = i.width + o.dw, r = i.height + o.dh;
2609
+ s < 0 || r < 0 || c.componentNode.update(e.id, {
2610
+ x: Math.round(i.x + o.dx),
2611
+ y: Math.round(i.y + o.dy),
2612
+ height: Math.round(Math.max(r, 0)),
2613
+ width: Math.round(Math.max(s, 0))
2614
+ });
2615
+ },
2616
+ onEnd() {
2617
+ ae.revoke(), O("拖拽组件大小");
2618
+ }
2619
+ };
2620
+ }
2621
+ const Ja = Cn((e, t) => {
2622
+ const { componentNode: n } = e, i = B(null), [c, a] = S(!1), d = Ee((o) => o.scale);
2623
+ return xn(t, () => ({
2624
+ // 经过实例
2625
+ handleHover() {
2626
+ var o, s, r;
2627
+ (r = (s = (o = i.current) == null ? void 0 : o.classList) == null ? void 0 : s.add) == null || r.call(s, ie.moveItem_box_hover);
2628
+ },
2629
+ // 离开实例
2630
+ handleUnHover() {
2631
+ var o, s, r;
2632
+ (r = (s = (o = i.current) == null ? void 0 : o.classList) == null ? void 0 : s.remove) == null || r.call(s, ie.moveItem_box_hover);
2633
+ },
2634
+ // 选中实例样式
2635
+ handleSelected() {
2636
+ a(!0);
2637
+ },
2638
+ // 取消选中实例样式
2639
+ handleUnSelected() {
2640
+ a(!1);
2641
+ }
2642
+ })), A(() => /* @__PURE__ */ l(
2643
+ "div",
2644
+ {
2645
+ [`data-${oe.componentNodeId}`]: n.id,
2646
+ ref: i,
2647
+ className: $(
2648
+ ie.moveItem_box,
2649
+ c && ie.moveItem_box_selected,
2650
+ n.lock && ie.moveItem_box_lock
2651
+ ),
2652
+ children: c && !n.lock && Ha.map((o) => /* @__PURE__ */ l(
2653
+ "div",
2654
+ {
2655
+ style: { transform: d < 1 ? `scale(${1 / d})` : void 0 },
2656
+ className: ie[`dragPoint_${o}`],
2657
+ [`data-${oe.dragDirection}`]: o
2658
+ },
2659
+ o
2660
+ ))
2661
+ }
2662
+ ), [n.lock, c, d]);
2663
+ });
2664
+ function Wa(e) {
2665
+ var d;
2666
+ const { engine: t } = N(), [n, i] = S(
2667
+ e == null ? void 0 : e.componentNode
2668
+ ), c = n ? (n == null ? void 0 : n.show) ?? !0 : !1, a = A(
2669
+ () => t.component.get(e == null ? void 0 : e.componentNode.cId),
2670
+ [(d = e == null ? void 0 : e.componentNode) == null ? void 0 : d.cId, e == null ? void 0 : e.packages]
2671
+ );
2672
+ return tn(() => t.componentNode.onChange(e == null ? void 0 : e.componentNode.id, ({ payload: o }) => {
2673
+ i({ ...o });
2674
+ })), mt(() => {
2675
+ i(e == null ? void 0 : e.componentNode);
2676
+ }, [e == null ? void 0 : e.componentNode]), a && c ? /* @__PURE__ */ l(Va, { componentNode: n, component: a }) : /* @__PURE__ */ l(W, {});
2677
+ }
2678
+ function Va(e) {
2679
+ const { component: t, componentNode: n } = e, i = nn(n), c = B(null), { dataSource: a, requestInstance: d } = ui(n), o = hi(n.id), s = gi(n.id), r = B(null), u = _i({
2680
+ id: n.id,
2681
+ // 经过实例
2682
+ handleHover() {
2683
+ var h, _;
2684
+ (_ = (h = r == null ? void 0 : r.current) == null ? void 0 : h.handleHover) == null || _.call(h);
2685
+ },
2686
+ // 离开实例
2687
+ handleUnHover() {
2688
+ var h, _;
2689
+ (_ = (h = r == null ? void 0 : r.current) == null ? void 0 : h.handleUnHover) == null || _.call(h);
2690
+ },
2691
+ // 选中实例样式
2692
+ handleSelected() {
2693
+ var h, _;
2694
+ (_ = (h = r == null ? void 0 : r.current) == null ? void 0 : h.handleSelected) == null || _.call(h);
2695
+ },
2696
+ // 取消选中实例样式
2697
+ handleUnSelected() {
2698
+ var h, _;
2699
+ (_ = (h = r == null ? void 0 : r.current) == null ? void 0 : h.handleUnSelected) == null || _.call(h);
2700
+ },
2701
+ // 获取容器dom
2702
+ getContainerDom() {
2703
+ return c.current;
2704
+ },
2705
+ // 获取对应的 componentNode
2706
+ getComponentNode() {
2707
+ return i.current;
2708
+ },
2709
+ // 获取实例的 component
2710
+ getComponent() {
2711
+ return t;
2712
+ },
2713
+ // 重新载入request配置
2714
+ reloadRequest() {
2715
+ d.reload();
2716
+ },
2717
+ // 立刻请求一次
2718
+ request: (h, _) => d.request(h, _)
2719
+ });
2720
+ return /* @__PURE__ */ g(
2721
+ "div",
2722
+ {
2723
+ ref: c,
2724
+ style: {
2725
+ position: "absolute",
2726
+ opacity: n.lock ? 0.75 : 1,
2727
+ left: n.x,
2728
+ top: n.y,
2729
+ width: n.width,
2730
+ height: n.height,
2731
+ zIndex: n.level
2732
+ },
2733
+ onMouseEnter: () => {
2734
+ u.handleHover();
2735
+ },
2736
+ onMouseLeave: () => {
2737
+ u.handleUnHover();
2738
+ },
2739
+ children: [
2740
+ /* @__PURE__ */ l(Tt, { children: /* @__PURE__ */ l(
2741
+ t.component,
2742
+ {
2743
+ useExpose: s,
2744
+ handleTrigger: o,
2745
+ dataSource: a,
2746
+ options: n.options,
2747
+ width: n.width,
2748
+ height: n.height,
2749
+ componentNode: n
2750
+ }
2751
+ ) }),
2752
+ /* @__PURE__ */ l(Ja, { ref: r, componentNode: n })
2753
+ ]
2754
+ }
2755
+ );
2756
+ }
2757
+ function Ga(e) {
2758
+ const t = k.getActiveEngine();
2759
+ t && Ae(e) && t.instance.getAllSelected().length && (t.instance.unselectAll(), O("取消选中组件"));
2760
+ }
2761
+ function Xa(e, t) {
2762
+ const n = Ae(t), i = Pe("shift"), c = k.getActiveEngine();
2763
+ if (!c || e.lock && n && !i)
2764
+ return;
2765
+ t.stopPropagation();
2766
+ const a = Xt(t);
2767
+ if (n || a) {
2768
+ if (c.instance.isSelected(e.id)) {
2769
+ i && c.instance.unselect(e.id);
2770
+ return;
2771
+ }
2772
+ const d = e.groupId ? c.componentNode.getGroupComponentNodeIds(e.groupId) : [e.id];
2773
+ c.instance.select(d, !i), O("选中组件");
2774
+ }
2775
+ }
2776
+ function Ya(e) {
2777
+ var s;
2778
+ const t = e.getComponentNode();
2779
+ if (!t || t != null && t.lock)
2780
+ return;
2781
+ const n = (s = e == null ? void 0 : e.getContainerDom) == null ? void 0 : s.call(e);
2782
+ if (!n)
2783
+ throw new Error("dom must be set.");
2784
+ let i = [], c = !1;
2785
+ const a = n.style.pointerEvents;
2786
+ let d = !1, o;
2787
+ return {
2788
+ onStart() {
2789
+ return ae.set("move"), setTimeout(() => {
2790
+ let { list: r, showCount: u } = pa();
2791
+ i = r, c = u < 300, o = Zt(
2792
+ (h, _) => {
2793
+ Za(i, c, h, _);
2794
+ },
2795
+ u < 100 ? 0 : 20,
2796
+ {
2797
+ trailing: !0
2798
+ }
2799
+ );
2800
+ }), !1;
2801
+ },
2802
+ onMove(r, u) {
2803
+ d || (n.style.pointerEvents = "none", d = !0), o == null || o(r, u);
2804
+ },
2805
+ onEnd(r, u) {
2806
+ ae.revoke(), d && (n.style.pointerEvents = a, Qa(i, c, r, u), i != null && i.length && O("移动组件"), d = !1, o = void 0);
2807
+ }
2808
+ };
2809
+ }
2810
+ function Za(e, t, n, i) {
2811
+ e.forEach((c) => {
2812
+ if (!c.show) return;
2813
+ const a = c.containerDom;
2814
+ if (t)
2815
+ a.style.transform = `translate3d(${n}px,${i}px, 0)`;
2816
+ else {
2817
+ const d = c.componentNode;
2818
+ a.style.left = `${d.x + n}px`, a.style.top = `${d.y + i}px`;
2819
+ }
2820
+ });
2821
+ }
2822
+ function Qa(e, t, n, i) {
2823
+ const c = k.getActiveEngine();
2824
+ c && e.forEach((a) => {
2825
+ a != null && a.show && t && a.containerDom.style.removeProperty("transform");
2826
+ const d = a == null ? void 0 : a.componentNode;
2827
+ d && c.componentNode.update(d.id, {
2828
+ x: Math.round(n + ((d == null ? void 0 : d.x) || 0)),
2829
+ y: Math.round(i + ((d == null ? void 0 : d.y) || 0))
2830
+ });
2831
+ });
2832
+ }
2833
+ function pa() {
2834
+ const e = k.getActiveEngine();
2835
+ return e ? Oe().reduce(
2836
+ (n, i) => {
2837
+ var d, o, s, r;
2838
+ const c = i.show ?? !0;
2839
+ c && n.showCount++;
2840
+ const a = {
2841
+ id: i.id,
2842
+ componentNode: i,
2843
+ show: c,
2844
+ containerDom: (r = (s = (o = (d = e.instance) == null ? void 0 : d.get) == null ? void 0 : o.call(d, i.id)) == null ? void 0 : s.getContainerDom) == null ? void 0 : r.call(s)
2845
+ };
2846
+ return n.list.push(a), n;
2847
+ },
2848
+ {
2849
+ showCount: 0,
2850
+ list: []
2851
+ }
2852
+ ) : {
2853
+ showCount: 0,
2854
+ list: []
2855
+ };
2856
+ }
2857
+ const eo = "_rangeBox_12c3t_59", to = {
2858
+ rangeBox: eo
2859
+ }, jt = Zt((e, t) => {
2860
+ const n = k.getActiveEngine();
2861
+ if (!n) return;
2862
+ const i = n.componentNode.getAll().reduce((c, a) => {
2863
+ const d = {
2864
+ x1: a.x,
2865
+ y1: a.y,
2866
+ x2: a.x + a.width,
2867
+ y2: a.y + a.height
2868
+ }, o = {
2869
+ x1: e.x,
2870
+ y1: e.y,
2871
+ x2: e.x + e.width,
2872
+ y2: e.y + e.height
2873
+ };
2874
+ return ki(d, o) && (!a.lock || a.lock && Pe("shift")) && c.push(a.id), c;
2875
+ }, []);
2876
+ n.instance.select(i, !0), t == null || t(i);
2877
+ }, 100);
2878
+ let F;
2879
+ function no(e) {
2880
+ let t = { x: 0, y: 0 }, n = 1;
2881
+ function i(a = 0, d = 0) {
2882
+ const o = a * n, s = d * n, r = t.x + o, u = t.y + s, h = {
2883
+ x: t.x,
2884
+ y: t.y,
2885
+ width: Math.abs(a),
2886
+ height: Math.abs(d)
2887
+ };
2888
+ return r < h.x && (h.x = r), u < h.y && (h.y = u), h.x /= n, h.y /= n, h;
2889
+ }
2890
+ function c() {
2891
+ F && (F == null || F.remove(), F = void 0);
2892
+ }
2893
+ return {
2894
+ onStart(a, d, o) {
2895
+ const s = k.getActiveEngine();
2896
+ if (!s)
2897
+ return;
2898
+ c();
2899
+ const { x: r = 0, y: u = 0 } = o || {};
2900
+ n = s.config.getConfig().scale;
2901
+ const h = e.getBoundingClientRect();
2902
+ t.x = r - h.x, t.y = u - h.y, F = document.createElement("div"), F.classList.add(to.rangeBox), F.style.zIndex = `${s.componentNode.getMaxLevel()}`, e.appendChild(F), ae.set("default");
2903
+ },
2904
+ onMove(a, d) {
2905
+ if (!F) return;
2906
+ const o = i(a, d);
2907
+ F.style.top = `${o.y}px`, F.style.left = `${o.x}px`, F.style.width = `${o.width}px`, F.style.height = `${o.height}px`, F.style.borderWidth = "1px", jt(o);
2908
+ },
2909
+ onEnd(a, d) {
2910
+ c(), ae.revoke();
2911
+ const o = i(a, d);
2912
+ (o.width || o.height) && jt(o, (s) => {
2913
+ s.length && O("范围选中组件");
2914
+ });
2915
+ }
2916
+ };
2917
+ }
2918
+ function io(e, t) {
2919
+ return {
2920
+ onEnd(n, i, c) {
2921
+ setTimeout(() => {
2922
+ var h;
2923
+ const a = k.getActiveEngine();
2924
+ if (!a)
2925
+ return;
2926
+ const d = a.config.getConfig().scale, o = e.getComponentNode(), s = e.getContainerDom();
2927
+ if (!o || o != null && o.lock || !s)
2928
+ return;
2929
+ const r = ((h = s == null ? void 0 : s.getBoundingClientRect) == null ? void 0 : h.call(s)) || { x: 0, y: 0 }, u = co(o, {
2930
+ x: (c.x - r.x) / d + o.x,
2931
+ // 鼠标在编辑器上的虚拟坐标
2932
+ y: (c.y - r.y) / d + o.y
2933
+ });
2934
+ t == null || t(u);
2935
+ });
2936
+ }
2937
+ };
2938
+ }
2939
+ function lo(e, t) {
2940
+ const n = k.getActiveEngine();
2941
+ if (!n)
2942
+ return;
2943
+ const i = n.componentNode.getAll().reduce((d, o) => {
2944
+ var s;
2945
+ return (o.show ?? !0) && o.category === "layout" && // layout类组件
2946
+ o.id !== e.id && // 不能拖拽到自身(如果自身拖拽组件是layout类型时)
2947
+ Si(t, n.componentNode.getCoordinate(o)) && (d[s = `${o.level}`] || (d[s] = [])).push(o), d;
2948
+ }, {}), c = Object.values(i), a = c[c.length - 1];
2949
+ return a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
2950
+ }
2951
+ function co(e, t) {
2952
+ const n = k.getActiveEngine();
2953
+ if (!n)
2954
+ return;
2955
+ const i = lo(e, {
2956
+ x: t.x,
2957
+ y: t.y
2958
+ });
2959
+ if (i) {
2960
+ const a = i == null ? void 0 : i.currentPanelId;
2961
+ if (!a || n.componentNode.isInPanel(a, e))
2962
+ return;
2963
+ const d = n.componentNode.getPanelName(a) || "目标";
2964
+ return kt({
2965
+ title: "移入提醒",
2966
+ content: `确定放入面板“${d}”?`,
2967
+ onOk(o) {
2968
+ n.instance.getAllSelected().forEach((s) => {
2969
+ const r = n.componentNode.get(s.id);
2970
+ n.componentNode.insertPanel(a, r);
2971
+ }), n.instance.select(i.id, !0), O(`移入面板 “${d}”`), o();
2972
+ }
2973
+ });
2974
+ }
2975
+ const c = e.panelId;
2976
+ if (c) {
2977
+ const a = n.componentNode.getPanelName(c) || "目标";
2978
+ return kt({
2979
+ title: "移出提醒",
2980
+ content: `是否移出面板“${a}”?`,
2981
+ onOk(d) {
2982
+ n.instance.getAllSelected().forEach((o) => {
2983
+ const s = n.componentNode.get(o.id);
2984
+ n.componentNode.removeFromPanel(s), O(`移出面板 “${a}”`);
2985
+ }), d();
2986
+ }
2987
+ });
2988
+ }
2989
+ }
2990
+ function ao(e) {
2991
+ const t = B([]), { engine: n } = N();
2992
+ function i() {
2993
+ var c, a;
2994
+ t != null && t.current.length && ((a = (c = t == null ? void 0 : t.current) == null ? void 0 : c.forEach) == null || a.call(c, (d) => d == null ? void 0 : d()), t.current = []);
2995
+ }
2996
+ gt(e, {
2997
+ mousedown(c) {
2998
+ var m;
2999
+ const a = e.current;
3000
+ if (!a) throw new Error("dom must be exist.");
3001
+ i();
3002
+ const d = Ae(c), o = Xt(c), s = Pe("shift"), r = ct(c.target, oe.componentNodeId, !0), u = n.instance.get(r), h = (m = u == null ? void 0 : u.getComponentNode) == null ? void 0 : m.call(u), _ = o ? !0 : h != null && h.lock ? d && s : d;
3003
+ if (u && h && _) {
3004
+ if (Xa(h, c), !(h != null && h.lock) && d) {
3005
+ const y = ct(
3006
+ c.target,
3007
+ oe.dragDirection
3008
+ );
3009
+ t.current.push(
3010
+ St({
3011
+ startX: c.x,
3012
+ startY: c.y,
3013
+ startEvent: c,
3014
+ scale: n.config.getConfig().scale,
3015
+ hookQueue: [
3016
+ // 监听拖拽大小
3017
+ y && Ua(h, c.target, y),
3018
+ // 监听拖拽移动
3019
+ !y && Ya(u),
3020
+ // 监听是否放置到 layout 组件
3021
+ io(u, (C) => {
3022
+ t.current.push(C);
3023
+ })
3024
+ ]
3025
+ })
3026
+ );
3027
+ }
3028
+ return;
3029
+ }
3030
+ Ga(c), t.current.push(
3031
+ St({
3032
+ startX: c.x,
3033
+ startY: c.y,
3034
+ startEvent: c,
3035
+ scale: n.config.getConfig().scale,
3036
+ hookQueue: [
3037
+ // 监听创建范围多选框(左键按住范围框选)
3038
+ d && no(a)
3039
+ ]
3040
+ })
3041
+ );
3042
+ }
3043
+ }), Qt(() => {
3044
+ i();
3045
+ });
3046
+ }
3047
+ function oo(e) {
3048
+ const { engine: t } = N();
3049
+ un(e, {
3050
+ accept: ["create-component"],
3051
+ onDrop: (n, i) => {
3052
+ const c = e.current;
3053
+ if (!c)
3054
+ throw new Error("dom must be exist.");
3055
+ const { data: a } = i;
3056
+ if (!(a == null ? void 0 : a.component))
3057
+ return;
3058
+ const o = c.getBoundingClientRect(), s = t.config.getConfig().scale, r = t.componentNode.createFromComponent(a.component, {
3059
+ x: Math.round((n.x - o.x) / s),
3060
+ // 真实坐标转为编辑器坐标 (scale 越小,编辑器面积越小,真实像素变化映射到虚拟像素越大)
3061
+ y: Math.round((n.y - o.y) / s),
3062
+ pageId: t.config.getCurrentPage()
3063
+ });
3064
+ t.componentNode.add(r), setTimeout(async () => {
3065
+ t.instance.select(r.id, !0), O(`新增一个组件 “${r.cName}”`);
3066
+ });
3067
+ }
3068
+ });
3069
+ }
3070
+ function ro(e) {
3071
+ const { engine: t } = N();
3072
+ un(e, {
3073
+ accept: ["create-favorite"],
3074
+ onDrop: (n, i) => {
3075
+ var b, I;
3076
+ const c = e.current;
3077
+ if (!c)
3078
+ throw new Error("dom must be exist.");
3079
+ const a = c.getBoundingClientRect(), d = (b = i.data) == null ? void 0 : b.favorite;
3080
+ (I = d.children) != null && I.length || E.warn("收藏元素为空");
3081
+ const o = Math.round(n.x - a.x), s = Math.round(n.y - a.y), r = d.children[0], { x: u, y: h } = d.children.reduce(
3082
+ (f, v) => (f.x = Math.min(f.x, v.x), f.y = Math.min(f.y, v.y), f),
3083
+ {
3084
+ x: r.x,
3085
+ y: r.y
3086
+ }
3087
+ ), _ = t.config.getCurrentPage(), m = [], y = t.config.getConfig().scale, C = t.componentNode.cloneComponentNodes(d.children, {
3088
+ onClone(f, v) {
3089
+ v.x = Math.round((o + (v.x - u)) / y), v.y = Math.round((s + (v.y - h)) / y), v.pageId = _, m.push(v.id);
3090
+ }
3091
+ });
3092
+ t.componentNode.add(C), setTimeout(() => {
3093
+ t.instance.select(m, !0), O(`新增收藏组件 “${d.name}”`);
3094
+ });
3095
+ }
3096
+ });
3097
+ }
3098
+ const so = () => {
3099
+ const { engine: e } = N(), t = B(null), n = B(null), i = Gt(), c = Vt(), a = A(() => {
3100
+ if (i.length)
3101
+ return c == null ? void 0 : c.map((d) => /* @__PURE__ */ l(
3102
+ Wa,
3103
+ {
3104
+ componentNode: d,
3105
+ packages: i
3106
+ },
3107
+ d.id
3108
+ ));
3109
+ }, [c, i]);
3110
+ return ao(n), _n(t), oo(n), ro(n), w(() => e.componentNode.onDelete((d) => {
3111
+ e.page.removeGlobalComponentNode(d);
3112
+ }), []), /* @__PURE__ */ l(
3113
+ "div",
3114
+ {
3115
+ ref: t,
3116
+ className: Bt.editor,
3117
+ onMouseDown: () => De(),
3118
+ children: /* @__PURE__ */ l(mi, { ref: n, className: Bt.editor_render, children: a })
3119
+ }
3120
+ );
3121
+ }, uo = "_attributes_esabd_59", ho = {
3122
+ attributes: uo
3123
+ }, go = "_singleInstanceAttributesBase_description_x66dv_59", _o = "_singleInstanceAttributesBase_body_x66dv_64", mo = "_singleInstanceAttributesBase_label_x66dv_67", fo = "_singleInstanceAttributesBase_x66dv_59", Z = {
3124
+ singleInstanceAttributesBase_description: go,
3125
+ singleInstanceAttributesBase_body: _o,
3126
+ singleInstanceAttributesBase_label: mo,
3127
+ singleInstanceAttributesBase: fo
3128
+ }, yo = "_opacity0_1lvzj_59", vo = "_editText_1lvzj_62", bo = "_editText_text_1lvzj_69", Xe = {
3129
+ opacity0: yo,
3130
+ editText: vo,
3131
+ editText_text: bo
3132
+ };
3133
+ function Co(e) {
3134
+ const [t, n] = S(!1), [i, c] = S("");
3135
+ function a() {
3136
+ c((e == null ? void 0 : e.value) || ""), n(!0);
3137
+ }
3138
+ function d() {
3139
+ var o;
3140
+ if (!i) {
3141
+ E.warn(e == null ? void 0 : e.emptyMessage);
3142
+ return;
3143
+ }
3144
+ n(!1), (o = e == null ? void 0 : e.onChange) == null || o.call(e, i);
3145
+ }
3146
+ return w(() => {
3147
+ n(!1);
3148
+ }, [e == null ? void 0 : e.value]), /* @__PURE__ */ g("div", { className: Xe.editText, children: [
3149
+ t ? /* @__PURE__ */ l(
3150
+ ee,
3151
+ {
3152
+ value: i,
3153
+ style: { width: "100%" },
3154
+ onChange: (o) => c(o),
3155
+ onPressEnter: () => {
3156
+ t && d();
3157
+ }
3158
+ }
3159
+ ) : /* @__PURE__ */ l("b", { className: Xe.editText_text, title: `${(e == null ? void 0 : e.value) || ""}`, children: e == null ? void 0 : e.value }),
3160
+ t ? /* @__PURE__ */ l(p, { className: "icon_clickable", onClick: d }) : /* @__PURE__ */ l(
3161
+ qt,
3162
+ {
3163
+ className: $(Xe.opacity0, "icon_clickable"),
3164
+ onClick: a
3165
+ }
3166
+ )
3167
+ ] });
3168
+ }
3169
+ function xo() {
3170
+ const { engine: e } = N(), { componentNode: t } = he(), [n] = M.useForm(), i = A(() => e.component.get(t == null ? void 0 : t.cId), [t == null ? void 0 : t.cId]), c = i == null ? void 0 : i.attributesComponent;
3171
+ function a(d) {
3172
+ d || e.page.removeGlobalComponentNode(t == null ? void 0 : t.id);
3173
+ }
3174
+ return w(() => {
3175
+ t && n.setFieldsValue({
3176
+ ...t,
3177
+ isAllPage: !!(t != null && t.isAllPage)
3178
+ });
3179
+ }, [t]), /* @__PURE__ */ g(
3180
+ M,
3181
+ {
3182
+ form: n,
3183
+ className: Z.singleInstanceAttributesBase,
3184
+ onValuesChange: (d) => {
3185
+ let o = "修改组件";
3186
+ d.hasOwnProperty("isAllPage") && (a(d.isAllPage), o = d.isAllPage ? "设置组件全页面" : "取消组件全页面"), e.componentNode.update(t == null ? void 0 : t.id, d), O(o);
3187
+ },
3188
+ children: [
3189
+ /* @__PURE__ */ l("div", { className: Z.singleInstanceAttributesBase_description, children: /* @__PURE__ */ g(nt, { children: [
3190
+ /* @__PURE__ */ l(H, { span: 24, style: { marginBottom: 6 }, children: /* @__PURE__ */ l(
3191
+ Co,
3192
+ {
3193
+ emptyMessage: "请填写名称",
3194
+ value: t == null ? void 0 : t.name,
3195
+ onChange: (d) => {
3196
+ e.componentNode.update(t == null ? void 0 : t.id, {
3197
+ name: d
3198
+ });
3199
+ }
3200
+ }
3201
+ ) }),
3202
+ /* @__PURE__ */ g(H, { span: 24, children: [
3203
+ "id:",
3204
+ (t == null ? void 0 : t.id) || "-"
3205
+ ] }),
3206
+ /* @__PURE__ */ g(H, { span: 24, children: [
3207
+ "cId:",
3208
+ (t == null ? void 0 : t.cId) || "-"
3209
+ ] }),
3210
+ /* @__PURE__ */ g(H, { span: 24, children: [
3211
+ "cName:",
3212
+ (t == null ? void 0 : t.cName) || "-"
3213
+ ] })
3214
+ ] }) }),
3215
+ /* @__PURE__ */ g("div", { className: Z.singleInstanceAttributesBase_body, children: [
3216
+ /* @__PURE__ */ g("div", { children: [
3217
+ /* @__PURE__ */ g(nt, { gutter: [8, 8], style: { fontSize: 12 }, children: [
3218
+ /* @__PURE__ */ l(H, { span: 3, className: Z.singleInstanceAttributesBase_label, children: "X轴" }),
3219
+ /* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "x", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
3220
+ /* @__PURE__ */ l(H, { span: 3, className: Z.singleInstanceAttributesBase_label, children: "Y轴" }),
3221
+ /* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "y", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
3222
+ /* @__PURE__ */ l(H, { span: 3, className: Z.singleInstanceAttributesBase_label, children: "宽度" }),
3223
+ /* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "width", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
3224
+ /* @__PURE__ */ l(H, { span: 3, className: Z.singleInstanceAttributesBase_label, children: "高度" }),
3225
+ /* @__PURE__ */ l(H, { span: 9, children: /* @__PURE__ */ l(M.Item, { name: "height", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) })
3226
+ ] }),
3227
+ /* @__PURE__ */ g(Le, { labelSpan: 4, children: [
3228
+ /* @__PURE__ */ l(z, { label: "层级", style: { marginTop: 8 }, labelSpan: 3, children: /* @__PURE__ */ l(M.Item, { name: "level", noStyle: !0, children: /* @__PURE__ */ l(le, { size: "small", style: { width: "100%" } }) }) }),
3229
+ /* @__PURE__ */ l(z, { label: "全页面", style: { marginTop: 8 }, labelTip: "每个页面都会显示", children: /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "isAllPage", valuePropName: "checked", children: /* @__PURE__ */ l(we, {}) }) })
3230
+ ] })
3231
+ ] }),
3232
+ t && c && /* @__PURE__ */ l("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ l(Tt, { children: /* @__PURE__ */ l(
3233
+ c,
3234
+ {
3235
+ componentNode: t,
3236
+ onChangeComponentNode: (d) => {
3237
+ e.componentNode.update(t == null ? void 0 : t.id, d), O("修改组件属性");
3238
+ },
3239
+ options: t == null ? void 0 : t.options,
3240
+ onChange: (d, o) => {
3241
+ e.componentNode.update(t == null ? void 0 : t.id, {
3242
+ options: o ? d : {
3243
+ ...t == null ? void 0 : t.options,
3244
+ ...d
3245
+ }
3246
+ }), O("修改组件属性");
3247
+ }
3248
+ }
3249
+ ) }) })
3250
+ ] })
3251
+ ]
3252
+ }
3253
+ );
3254
+ }
3255
+ const Io = "_dataSource_1t8uf_59", ko = {
3256
+ dataSource: Io
3257
+ }, So = "_requestDataSource_147st_59", No = {
3258
+ requestDataSource: So
3259
+ };
3260
+ function wo(e) {
3261
+ const t = k.getActiveEngine(), { componentNode: n } = he(), i = A(() => {
3262
+ var r, u;
3263
+ return (u = (r = t == null ? void 0 : t.instance) == null ? void 0 : r.get) == null ? void 0 : u.call(r, n == null ? void 0 : n.id);
3264
+ }, [n == null ? void 0 : n.id]), c = n == null ? void 0 : n.request, {
3265
+ data: a,
3266
+ loading: d,
3267
+ refresh: o
3268
+ } = pt(
3269
+ async () => {
3270
+ var r, u;
3271
+ return (u = (r = i == null ? void 0 : i.request) == null ? void 0 : r.call(i, void 0, !0)) == null ? void 0 : u.then((h) => typeof h == "object" && h ? JSON.stringify(h, null, " ") : `${h ?? null}`);
3272
+ },
3273
+ {
3274
+ refreshDeps: [n == null ? void 0 : n.id]
3275
+ }
3276
+ );
3277
+ function s(r) {
3278
+ var u, h;
3279
+ (h = (u = t == null ? void 0 : t.componentNode) == null ? void 0 : u.update) == null || h.call(u, n == null ? void 0 : n.id, (_) => ({
3280
+ request: {
3281
+ ..._.request,
3282
+ ...r
3283
+ }
3284
+ }));
3285
+ }
3286
+ return /* @__PURE__ */ g("div", { style: e == null ? void 0 : e.style, className: No.requestDataSource, children: [
3287
+ /* @__PURE__ */ l(z, { label: "请求类型", children: /* @__PURE__ */ l(
3288
+ Ce,
3289
+ {
3290
+ allowClear: !1,
3291
+ style: { width: "100%" },
3292
+ requestFn: async () => [
3293
+ { label: "GET", value: "get" },
3294
+ { label: "POST", value: "post" },
3295
+ { label: "DELETE", value: "delete" },
3296
+ { label: "PUT", value: "put" }
3297
+ ],
3298
+ value: (c == null ? void 0 : c.method) || "get",
3299
+ onChange: (r) => {
3300
+ s({ method: r }), O("修改请求类型");
3301
+ }
3302
+ }
3303
+ ) }),
3304
+ /* @__PURE__ */ l(z, { label: "请求地址", children: /* @__PURE__ */ l(
3305
+ ee,
3306
+ {
3307
+ value: c == null ? void 0 : c.url,
3308
+ onChange: (r) => {
3309
+ s({ url: r }), O("修改请求地址");
3310
+ }
3311
+ }
3312
+ ) }),
3313
+ /* @__PURE__ */ l("b", { style: { marginTop: 12 }, children: "请求配置" }),
3314
+ /* @__PURE__ */ l(z, { label: "轮循请求", children: /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3315
+ /* @__PURE__ */ l(
3316
+ we,
3317
+ {
3318
+ checked: (c == null ? void 0 : c.loop) ?? !1,
3319
+ onChange: (r) => {
3320
+ s({ loop: r.target.checked }), O("修改轮训请求");
3321
+ }
3322
+ }
3323
+ ),
3324
+ (c == null ? void 0 : c.loop) && /* @__PURE__ */ g(W, { children: [
3325
+ /* @__PURE__ */ l(
3326
+ _t,
3327
+ {
3328
+ style: { width: 100 },
3329
+ value: (c == null ? void 0 : c.loopDelay) || 1e3,
3330
+ onChange: (r) => {
3331
+ s({ loopDelay: r }), O("修改轮训时长");
3332
+ }
3333
+ }
3334
+ ),
3335
+ /* @__PURE__ */ l("span", { children: "毫秒" })
3336
+ ] })
3337
+ ] }) }),
3338
+ /* @__PURE__ */ l(z, { label: "初次请求", children: /* @__PURE__ */ l(
3339
+ we,
3340
+ {
3341
+ checked: (c == null ? void 0 : c.first) ?? !1,
3342
+ onChange: (r) => {
3343
+ s({ first: r.target.checked }), O("修改初次请求");
3344
+ }
3345
+ }
3346
+ ) }),
3347
+ /* @__PURE__ */ g("div", { style: { marginTop: 12, display: "flex", gap: 8, alignItems: "center" }, children: [
3348
+ /* @__PURE__ */ l("b", { children: "数据结果" }),
3349
+ /* @__PURE__ */ l(T, { title: "请求数据", children: /* @__PURE__ */ l(
3350
+ Q,
3351
+ {
3352
+ className: "icon_clickable",
3353
+ onClick: () => {
3354
+ o();
3355
+ }
3356
+ }
3357
+ ) })
3358
+ ] }),
3359
+ /* @__PURE__ */ l(
3360
+ Y,
3361
+ {
3362
+ readOnly: !0,
3363
+ minimap: !1,
3364
+ language: "json",
3365
+ value: d ? "" : a,
3366
+ style: { flex: 1, minHeight: 200, maxHeight: 400 }
3367
+ }
3368
+ )
3369
+ ] });
3370
+ }
3371
+ const Eo = "_staticDataSource_1p3pl_59", Ao = {
3372
+ staticDataSource: Eo
3373
+ };
3374
+ function Lo(e) {
3375
+ const { engine: t } = N(), { componentNode: n } = he(), [i, c] = S("");
3376
+ function a() {
3377
+ if (!i)
3378
+ return E.warn("json格式不正确");
3379
+ try {
3380
+ const d = JSON.parse(i);
3381
+ t.componentNode.update(n == null ? void 0 : n.id, {
3382
+ staticDataSource: d
3383
+ }), E.success("修改成功"), O("修改静态数据");
3384
+ } catch {
3385
+ E.warn("json格式不正确");
3386
+ }
3387
+ }
3388
+ return w(() => {
3389
+ c(
3390
+ n != null && n.staticDataSource ? JSON.stringify((n == null ? void 0 : n.staticDataSource) || {}, null, " ") : ""
3391
+ );
3392
+ }, [n]), /* @__PURE__ */ g("div", { className: Ao.staticDataSource, style: e == null ? void 0 : e.style, children: [
3393
+ /* @__PURE__ */ l(z, { label: "配置数据", children: /* @__PURE__ */ l(T, { title: "保存", children: /* @__PURE__ */ l(p, { className: "icon_clickable", onClick: a }) }) }),
3394
+ /* @__PURE__ */ l(
3395
+ Y,
3396
+ {
3397
+ minimap: !1,
3398
+ language: "json",
3399
+ style: { flex: 1 },
3400
+ value: i,
3401
+ onChange: c,
3402
+ options: {
3403
+ tabSize: 2
3404
+ }
3405
+ }
3406
+ )
3407
+ ] });
3408
+ }
3409
+ const Do = [
3410
+ { label: "静态数据", value: "static" },
3411
+ { label: "请求接口", value: "request" }
3412
+ ];
3413
+ function Oo() {
3414
+ const { engine: e } = N(), { componentNode: t } = he(), n = (t == null ? void 0 : t.dataSourceType) ?? "static";
3415
+ return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className: ko.dataSource, children: [
3416
+ /* @__PURE__ */ l(z, { label: "数据源", children: /* @__PURE__ */ l(
3417
+ Ce,
3418
+ {
3419
+ value: n,
3420
+ allowClear: !1,
3421
+ style: { width: "100%" },
3422
+ requestFn: async () => Do,
3423
+ onChange: (i) => {
3424
+ e.componentNode.update(t == null ? void 0 : t.id, {
3425
+ dataSourceType: i
3426
+ });
3427
+ }
3428
+ }
3429
+ ) }),
3430
+ n === "static" && /* @__PURE__ */ l(Lo, { style: { flex: 1, overflow: "hidden" } }),
3431
+ n === "request" && /* @__PURE__ */ l(wo, { style: { flex: 1, overflow: "hidden" } })
3432
+ ] }) });
3433
+ }
3434
+ const Po = "_interactive_1j74j_59", Mo = {
3435
+ interactive: Po
3436
+ };
3437
+ function Bo(e) {
3438
+ const { componentNode: t } = e, { engine: n } = N(), [i, c] = S([]), a = A(
3439
+ () => n.component.get(t == null ? void 0 : t.cId),
3440
+ [t == null ? void 0 : t.cId]
3441
+ );
3442
+ return w(() => {
3443
+ var d, o;
3444
+ c(
3445
+ ((o = (d = a == null ? void 0 : a.triggers) == null ? void 0 : d.map) == null ? void 0 : o.call(d, (s) => {
3446
+ var r;
3447
+ return {
3448
+ disabled: !!((r = t == null ? void 0 : t.events) != null && r.find((u) => u.triggerId === s.value)),
3449
+ key: s.value,
3450
+ style: { fontSize: 12 },
3451
+ label: s.label
3452
+ };
3453
+ })) || []
3454
+ );
3455
+ }, [a, t]), /* @__PURE__ */ l(
3456
+ be,
3457
+ {
3458
+ trigger: ["click"],
3459
+ menu: {
3460
+ items: i,
3461
+ onClick: ({ key: d }) => {
3462
+ var o;
3463
+ (o = e == null ? void 0 : e.onSelect) == null || o.call(e, d);
3464
+ }
3465
+ },
3466
+ children: /* @__PURE__ */ l(K, { type: "dashed", block: !0, icon: /* @__PURE__ */ l(rt, {}), children: "组件绑定事件" })
3467
+ }
3468
+ );
3469
+ }
3470
+ const jo = "_eventList_19gi2_59", zo = "_eventList_head_19gi2_62", To = "_eventList_body_19gi2_68", $o = "_eventList_item_19gi2_74", Ro = "_eventList_item_body_19gi2_84", Fo = "_eventList_item_opt_19gi2_90", Ho = "_eventList_item_opt_clickable_19gi2_95", X = {
3471
+ eventList: jo,
3472
+ eventList_head: zo,
3473
+ eventList_body: To,
3474
+ eventList_item: $o,
3475
+ eventList_item_body: Ro,
3476
+ eventList_item_opt: Fo,
3477
+ eventList_item_opt_clickable: Ho
3478
+ }, Ko = "_editEventDialog_11y5n_59", qo = "_editEventDialog_menu_11y5n_63", Uo = "_editEventDialog_body_11y5n_78", Ye = {
3479
+ editEventDialog: Ko,
3480
+ editEventDialog_menu: qo,
3481
+ editEventDialog_body: Uo
3482
+ }, Jo = "_eventOptions_main_16n1f_59", Me = {
3483
+ eventOptions_main: Jo
3484
+ };
3485
+ function Wo(e) {
3486
+ var t;
3487
+ return /* @__PURE__ */ l("div", { className: Me.eventOptions_main, children: /* @__PURE__ */ l(z, { label: "组件显示", labelSpan: 3, children: /* @__PURE__ */ l(
3488
+ Ut,
3489
+ {
3490
+ size: "small",
3491
+ checked: (t = e == null ? void 0 : e.value) == null ? void 0 : t.visible,
3492
+ onChange: (n) => {
3493
+ var i;
3494
+ (i = e == null ? void 0 : e.onChange) == null || i.call(e, {
3495
+ ...e == null ? void 0 : e.value,
3496
+ visible: n
3497
+ });
3498
+ }
3499
+ }
3500
+ ) }) });
3501
+ }
3502
+ const Vo = ue((e) => {
3503
+ const [t, n] = zt.useState();
3504
+ return w(() => {
3505
+ var i;
3506
+ e != null && e.visible && n((i = e == null ? void 0 : e.params) == null ? void 0 : i.text);
3507
+ }, [e == null ? void 0 : e.visible]), /* @__PURE__ */ g(
3508
+ re,
3509
+ {
3510
+ centered: !0,
3511
+ width: 650,
3512
+ title: !1,
3513
+ open: e == null ? void 0 : e.visible,
3514
+ closable: !1,
3515
+ bodyStyle: { padding: "12px 20px" },
3516
+ onCancel: e == null ? void 0 : e.onCancel,
3517
+ afterClose: e == null ? void 0 : e.afterClose,
3518
+ footer: /* @__PURE__ */ g(D, { children: [
3519
+ /* @__PURE__ */ l(
3520
+ K,
3521
+ {
3522
+ onClick: () => {
3523
+ var i;
3524
+ (i = e == null ? void 0 : e.onOk) == null || i.call(e, void 0);
3525
+ },
3526
+ children: "重置"
3527
+ }
3528
+ ),
3529
+ /* @__PURE__ */ l(
3530
+ K,
3531
+ {
3532
+ type: "primary",
3533
+ onClick: () => {
3534
+ var i;
3535
+ (i = e == null ? void 0 : e.onOk) == null || i.call(e, t);
3536
+ },
3537
+ children: "保存"
3538
+ }
3539
+ )
3540
+ ] }),
3541
+ children: [
3542
+ /* @__PURE__ */ l("h3", { children: "转换函数" }),
3543
+ /* @__PURE__ */ l(
3544
+ Y,
3545
+ {
3546
+ language: "javascript",
3547
+ style: { height: 450 },
3548
+ value: t ?? Mi,
3549
+ onChange: n
3550
+ }
3551
+ )
3552
+ ]
3553
+ }
3554
+ );
3555
+ });
3556
+ function mn(e) {
3557
+ const t = Vo({
3558
+ onOk(i) {
3559
+ var c;
3560
+ (c = e == null ? void 0 : e.onChange) == null || c.call(e, i);
3561
+ }
3562
+ }), n = A(() => e != null && e.tooltip ? /* @__PURE__ */ l(T, { title: e == null ? void 0 : e.tooltip, children: /* @__PURE__ */ l("span", { children: "{}" }) }) : /* @__PURE__ */ l("span", { children: "{}" }), [e == null ? void 0 : e.tooltip]);
3563
+ return /* @__PURE__ */ l(W, { children: /* @__PURE__ */ l(
3564
+ "span",
3565
+ {
3566
+ className: $("icon_clickable", (e == null ? void 0 : e.value) && "icon_selected"),
3567
+ style: { fontSize: 14 },
3568
+ onClick: () => {
3569
+ t.open({
3570
+ text: e == null ? void 0 : e.value
3571
+ });
3572
+ },
3573
+ children: n
3574
+ }
3575
+ ) });
3576
+ }
3577
+ const Go = /* @__PURE__ */ g("div", { children: [
3578
+ /* @__PURE__ */ l("div", { children: "格式参考:" }),
3579
+ /* @__PURE__ */ l("div", { style: { whiteSpace: "pre-wrap", padding: "12px 0" }, children: JSON.stringify({ name: "tjh", age: 25 }, null, " ") })
3580
+ ] });
3581
+ function Xo(e) {
3582
+ var o, s, r;
3583
+ const t = ((o = e == null ? void 0 : e.value) == null ? void 0 : o.type) || "default", [n, i] = S(), [c, a] = S("");
3584
+ function d() {
3585
+ var u;
3586
+ try {
3587
+ const h = JSON.parse(c);
3588
+ if (typeof h != "object" || h === null) {
3589
+ E.warn("只能保存对象格式数据");
3590
+ return;
3591
+ }
3592
+ (u = e == null ? void 0 : e.onChange) == null || u.call(e, {
3593
+ ...e == null ? void 0 : e.value,
3594
+ params: h
3595
+ }), E.success("更新成功");
3596
+ } catch {
3597
+ E.warn("JSON格式不正确");
3598
+ }
3599
+ }
3600
+ return w(() => {
3601
+ var u;
3602
+ a(JSON.stringify(((u = e == null ? void 0 : e.value) == null ? void 0 : u.params) || {}, null, " "));
3603
+ }, [(s = e == null ? void 0 : e.value) == null ? void 0 : s.params]), w(() => {
3604
+ var u;
3605
+ i((u = e == null ? void 0 : e.value) == null ? void 0 : u.parserFunc);
3606
+ }, [(r = e == null ? void 0 : e.value) == null ? void 0 : r.parserFunc]), /* @__PURE__ */ g("div", { className: Me.eventOptions_main, children: [
3607
+ /* @__PURE__ */ g(D, { style: { width: "100%" }, direction: "vertical", size: 2, children: [
3608
+ /* @__PURE__ */ l(z, { label: "参数类型", labelSpan: 3 }),
3609
+ /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
3610
+ /* @__PURE__ */ l(
3611
+ Ce,
3612
+ {
3613
+ value: t,
3614
+ allowClear: !1,
3615
+ style: { width: Ne },
3616
+ requestFn: async () => [
3617
+ { label: "默认", value: "default" },
3618
+ { label: "json对象", value: "json" }
3619
+ ],
3620
+ onChange: (u) => {
3621
+ var h;
3622
+ (h = e == null ? void 0 : e.onChange) == null || h.call(e, {
3623
+ ...e == null ? void 0 : e.value,
3624
+ params: u === "default" ? void 0 : {},
3625
+ type: u
3626
+ });
3627
+ }
3628
+ }
3629
+ ),
3630
+ /* @__PURE__ */ l(
3631
+ mn,
3632
+ {
3633
+ tooltip: "解析函数",
3634
+ value: n,
3635
+ onChange: (u) => {
3636
+ var h;
3637
+ i(u), (h = e == null ? void 0 : e.onChange) == null || h.call(e, {
3638
+ ...e == null ? void 0 : e.value,
3639
+ parserFunc: u
3640
+ });
3641
+ }
3642
+ }
3643
+ )
3644
+ ] })
3645
+ ] }),
3646
+ t === "json" && /* @__PURE__ */ g(D, { style: { width: "100%" }, direction: "vertical", size: 2, children: [
3647
+ /* @__PURE__ */ l(z, { label: "json对象", labelSpan: 3, labelTip: Go, children: /* @__PURE__ */ l(T, { title: "更新", children: /* @__PURE__ */ l(p, { onClick: d, className: "icon_clickable" }) }) }),
3648
+ /* @__PURE__ */ l(
3649
+ Y,
3650
+ {
3651
+ value: c,
3652
+ language: "json",
3653
+ style: { height: 380 },
3654
+ onChange: (u) => {
3655
+ a(u);
3656
+ }
3657
+ }
3658
+ )
3659
+ ] })
3660
+ ] });
3661
+ }
3662
+ function Yo(e) {
3663
+ var a;
3664
+ const [t, n] = S();
3665
+ function i(d) {
3666
+ var o;
3667
+ (o = e == null ? void 0 : e.onChange) == null || o.call(e, {
3668
+ ...e == null ? void 0 : e.value,
3669
+ function: d
3670
+ });
3671
+ }
3672
+ function c() {
3673
+ i(void 0), n(void 0), E.success("重置成功");
3674
+ }
3675
+ return w(() => {
3676
+ var d;
3677
+ n((d = e == null ? void 0 : e.value) == null ? void 0 : d.function);
3678
+ }, [(a = e == null ? void 0 : e.value) == null ? void 0 : a.function]), /* @__PURE__ */ l("div", { className: Me.eventOptions_main, children: /* @__PURE__ */ g(D, { style: { width: "100%" }, direction: "vertical", size: 4, children: [
3679
+ /* @__PURE__ */ l(z, { label: "函数内容", labelSpan: 3, children: /* @__PURE__ */ l(
3680
+ "div",
3681
+ {
3682
+ style: {
3683
+ height: 24,
3684
+ display: "flex",
3685
+ alignItems: "center",
3686
+ justifyContent: "space-between"
3687
+ },
3688
+ children: /* @__PURE__ */ l(T, { title: "重置", children: /* @__PURE__ */ l(Yn, { onClick: c, className: "icon_clickable" }) })
3689
+ }
3690
+ ) }),
3691
+ /* @__PURE__ */ l(
3692
+ Y,
3693
+ {
3694
+ value: t ?? Bi,
3695
+ language: "javascript",
3696
+ style: { height: 440 },
3697
+ onChange: (d) => {
3698
+ i(d);
3699
+ }
3700
+ }
3701
+ )
3702
+ ] }) });
3703
+ }
3704
+ const Zo = {
3705
+ default: void 0,
3706
+ number: 0,
3707
+ text: "",
3708
+ json: {}
3709
+ };
3710
+ function Qo(e) {
3711
+ var r, u, h, _, m, y, C, b, I, f, v;
3712
+ const { onChange: t } = e, n = ((r = e == null ? void 0 : e.value) == null ? void 0 : r.type) || "default", i = ((u = e == null ? void 0 : e.value) == null ? void 0 : u.type) === "json", [c, a] = S(), [d, o] = S();
3713
+ function s() {
3714
+ var x;
3715
+ if (!d)
3716
+ return E.warn("json不能为空");
3717
+ try {
3718
+ const L = JSON.parse(d || "");
3719
+ typeof L == "object" && L && ((x = e == null ? void 0 : e.onChange) == null || x.call(e, {
3720
+ ...e == null ? void 0 : e.value,
3721
+ value: L
3722
+ }), E.success("设置成功"));
3723
+ } catch {
3724
+ E.warn("json格式不正确");
3725
+ }
3726
+ }
3727
+ return w(() => {
3728
+ var x;
3729
+ a((x = e == null ? void 0 : e.value) == null ? void 0 : x.parserFunc);
3730
+ }, [(h = e == null ? void 0 : e.value) == null ? void 0 : h.parserFunc]), w(() => {
3731
+ var x, L;
3732
+ ((x = e == null ? void 0 : e.value) == null ? void 0 : x.type) === "json" && o(JSON.stringify(((L = e == null ? void 0 : e.value) == null ? void 0 : L.value) || {}, null, " "));
3733
+ }, [(_ = e == null ? void 0 : e.value) == null ? void 0 : _.type, (m = e == null ? void 0 : e.value) == null ? void 0 : m.value]), /* @__PURE__ */ g("div", { className: Me.eventOptions_main, children: [
3734
+ /* @__PURE__ */ g(D, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
3735
+ /* @__PURE__ */ l(z, { label: "参数类型", labelSpan: 3, labelTip: "json数据格式为数组或对象" }),
3736
+ /* @__PURE__ */ g(D, { children: [
3737
+ /* @__PURE__ */ l(
3738
+ Ce,
3739
+ {
3740
+ value: n,
3741
+ allowClear: !1,
3742
+ style: { width: Ne },
3743
+ requestFn: async () => [
3744
+ { label: "默认", value: "default" },
3745
+ { label: "数字", value: "number" },
3746
+ { label: "文本值", value: "text" },
3747
+ { label: "json数据", value: "json" }
3748
+ ],
3749
+ onChange: (x) => t({
3750
+ ...e == null ? void 0 : e.value,
3751
+ value: Zo[x],
3752
+ type: x
3753
+ })
3754
+ }
3755
+ ),
3756
+ /* @__PURE__ */ l(
3757
+ mn,
3758
+ {
3759
+ tooltip: "解析函数",
3760
+ value: c,
3761
+ onChange: (x) => {
3762
+ var L;
3763
+ a(x), (L = e == null ? void 0 : e.onChange) == null || L.call(e, {
3764
+ ...e == null ? void 0 : e.value,
3765
+ parserFunc: x
3766
+ });
3767
+ }
3768
+ }
3769
+ )
3770
+ ] })
3771
+ ] }),
3772
+ ((y = e == null ? void 0 : e.value) == null ? void 0 : y.type) && ((C = e == null ? void 0 : e.value) == null ? void 0 : C.type) !== "default" && /* @__PURE__ */ g(D, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
3773
+ /* @__PURE__ */ l(z, { label: "参数值", labelSpan: 3, children: i && /* @__PURE__ */ l(T, { title: "更新", children: /* @__PURE__ */ l(p, { onClick: s, className: "icon_clickable" }) }) }),
3774
+ /* @__PURE__ */ g(W, { children: [
3775
+ ((b = e == null ? void 0 : e.value) == null ? void 0 : b.type) === "number" && /* @__PURE__ */ l(
3776
+ _t,
3777
+ {
3778
+ min: void 0,
3779
+ style: { width: Ne * 2 },
3780
+ value: (I = e == null ? void 0 : e.value) == null ? void 0 : I.value,
3781
+ onChange: (x) => {
3782
+ t({
3783
+ ...e == null ? void 0 : e.value,
3784
+ value: x
3785
+ });
3786
+ }
3787
+ }
3788
+ ),
3789
+ ((f = e == null ? void 0 : e.value) == null ? void 0 : f.type) === "text" && /* @__PURE__ */ l(
3790
+ bi,
3791
+ {
3792
+ style: { width: Ne * 2 },
3793
+ value: (v = e == null ? void 0 : e.value) == null ? void 0 : v.value,
3794
+ autoSize: { minRows: 3, maxRows: 3 },
3795
+ onChange: (x) => {
3796
+ t({
3797
+ ...e == null ? void 0 : e.value,
3798
+ value: x
3799
+ });
3800
+ }
3801
+ }
3802
+ ),
3803
+ i && /* @__PURE__ */ l(
3804
+ Y,
3805
+ {
3806
+ language: "javascript",
3807
+ style: { height: 375 },
3808
+ value: d,
3809
+ onChange: (x) => {
3810
+ o(x);
3811
+ }
3812
+ }
3813
+ )
3814
+ ] })
3815
+ ] })
3816
+ ] });
3817
+ }
3818
+ const Ne = 200;
3819
+ function po(e) {
3820
+ var i, c, a, d, o;
3821
+ const t = (i = e == null ? void 0 : e.value) == null ? void 0 : i.option;
3822
+ function n(s) {
3823
+ var r;
3824
+ e != null && e.value && ((r = e == null ? void 0 : e.onChange) == null || r.call(e, {
3825
+ ...e == null ? void 0 : e.value,
3826
+ option: s
3827
+ }));
3828
+ }
3829
+ return (c = e == null ? void 0 : e.value) != null && c.exposeId ? ((a = e == null ? void 0 : e.value) == null ? void 0 : a.exposeId) === Te.visible ? /* @__PURE__ */ l(Wo, { value: t, onChange: n }) : ((d = e == null ? void 0 : e.value) == null ? void 0 : d.exposeId) === Te.request ? /* @__PURE__ */ l(Xo, { value: t, onChange: n }) : ((o = e == null ? void 0 : e.value) == null ? void 0 : o.exposeId) === Te.custom ? /* @__PURE__ */ l(Yo, { value: t, onChange: n }) : /* @__PURE__ */ l(Qo, { value: t, onChange: n }) : /* @__PURE__ */ l(q, { description: "请选中目标操作" });
3830
+ }
3831
+ const ed = "_targetList_17cmb_59", td = "_targetList_body_17cmb_66", nd = "_targetList_item_17cmb_74", id = "_targetList_item_clickable_17cmb_82", ld = "_targetList_item_selected_17cmb_89", me = {
3832
+ targetList: ed,
3833
+ targetList_body: td,
3834
+ targetList_item: nd,
3835
+ targetList_item_clickable: id,
3836
+ targetList_item_selected: ld
3837
+ }, cd = "_addComponentNodeButton_xm0lb_59", ad = "_addComponentNodeButton_body_xm0lb_68", od = "_addComponentNodeButton_item_xm0lb_73", dd = "_addComponentNodeButton_item_text_xm0lb_84", rd = "_dropdown_overlay_xm0lb_93", fe = {
3838
+ addComponentNodeButton: cd,
3839
+ addComponentNodeButton_body: ad,
3840
+ addComponentNodeButton_item: od,
3841
+ addComponentNodeButton_item_text: dd,
3842
+ dropdown_overlay: rd
3843
+ };
3844
+ function sd(e) {
3845
+ const { componentNode: t } = e;
3846
+ return /* @__PURE__ */ g(D, { direction: "vertical", style: { fontSize: 12 }, className: "theme-color", size: 6, children: [
3847
+ /* @__PURE__ */ g("div", { children: [
3848
+ /* @__PURE__ */ l("b", { children: "id" }),
3849
+ ":",
3850
+ t == null ? void 0 : t.id
3851
+ ] }),
3852
+ /* @__PURE__ */ g("div", { children: [
3853
+ /* @__PURE__ */ l("b", { children: "name" }),
3854
+ ":",
3855
+ t == null ? void 0 : t.name
3856
+ ] }),
3857
+ /* @__PURE__ */ g("div", { children: [
3858
+ /* @__PURE__ */ l("b", { children: "cName" }),
3859
+ ":",
3860
+ t == null ? void 0 : t.cName
3861
+ ] }),
3862
+ /* @__PURE__ */ g("div", { children: [
3863
+ /* @__PURE__ */ l("b", { children: "show" }),
3864
+ ":",
3865
+ /* @__PURE__ */ l(Ut, { disabled: !0, size: "small", checked: (t == null ? void 0 : t.show) ?? !0 })
3866
+ ] })
3867
+ ] });
3868
+ }
3869
+ function ud(e) {
3870
+ var _;
3871
+ const { engine: t } = N(), [n, i] = S(!1), [c, a] = S([]), [d, o] = S(""), s = B();
3872
+ w(() => {
3873
+ if (n) {
3874
+ s.current && (clearTimeout(s.current), s.current = null);
3875
+ let m = t.componentNode.getAll();
3876
+ e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)), a(m), o("");
3877
+ }
3878
+ }, [n]);
3879
+ const r = A(() => {
3880
+ var y;
3881
+ const m = (y = d == null ? void 0 : d.toLowerCase) == null ? void 0 : y.call(d);
3882
+ return c.filter((C) => {
3883
+ var b, I, f, v;
3884
+ return (v = (f = (I = (b = C == null ? void 0 : C.name) == null ? void 0 : b.toLowerCase) == null ? void 0 : I.call(b)) == null ? void 0 : f.includes) == null ? void 0 : v.call(f, m);
3885
+ });
3886
+ }, [d, c]);
3887
+ function u() {
3888
+ i(!1), s.current = setTimeout(() => {
3889
+ a([]), s.current = null;
3890
+ }, 300);
3891
+ }
3892
+ function h(m) {
3893
+ var y;
3894
+ (y = e == null ? void 0 : e.onSelect) == null || y.call(e, m), u();
3895
+ }
3896
+ return /* @__PURE__ */ l(
3897
+ be,
3898
+ {
3899
+ overlayClassName: fe.dropdown_overlay,
3900
+ menu: {
3901
+ items: [
3902
+ {
3903
+ key: "body",
3904
+ label: /* @__PURE__ */ g("div", { className: fe.addComponentNodeButton, children: [
3905
+ /* @__PURE__ */ l(ee, { placeholder: "搜索页面组件", value: d, onChange: o }),
3906
+ /* @__PURE__ */ g("div", { className: fe.addComponentNodeButton_body, children: [
3907
+ !(r != null && r.length) && /* @__PURE__ */ l(q, {}),
3908
+ (_ = r == null ? void 0 : r.map) == null ? void 0 : _.call(r, (m) => {
3909
+ const y = t.component.get(m == null ? void 0 : m.cId);
3910
+ return /* @__PURE__ */ l(
3911
+ st,
3912
+ {
3913
+ content: /* @__PURE__ */ l(sd, { componentNode: m }),
3914
+ placement: "right",
3915
+ children: /* @__PURE__ */ g(
3916
+ "div",
3917
+ {
3918
+ className: fe.addComponentNodeButton_item,
3919
+ title: m == null ? void 0 : m.name,
3920
+ onClick: () => h(m),
3921
+ children: [
3922
+ /* @__PURE__ */ l(
3923
+ xe,
3924
+ {
3925
+ src: y == null ? void 0 : y.icon,
3926
+ style: { maxHeight: 20, maxWidth: 20 }
3927
+ }
3928
+ ),
3929
+ /* @__PURE__ */ l("div", { className: fe.addComponentNodeButton_item_text, children: m == null ? void 0 : m.name })
3930
+ ]
3931
+ }
3932
+ )
3933
+ },
3934
+ m == null ? void 0 : m.id
3935
+ );
3936
+ })
3937
+ ] })
3938
+ ] })
3939
+ }
3940
+ ]
3941
+ },
3942
+ trigger: ["click"],
3943
+ open: n,
3944
+ onOpenChange: (m) => {
3945
+ m || u();
3946
+ },
3947
+ children: /* @__PURE__ */ l("div", { style: { width: "100%", ...e == null ? void 0 : e.style }, children: /* @__PURE__ */ l(
3948
+ K,
3949
+ {
3950
+ block: !0,
3951
+ onClick: () => !n && i(!0),
3952
+ style: { fontSize: 12, color: "rgba(0,0,0,0.5)" },
3953
+ icon: /* @__PURE__ */ l(rt, {}),
3954
+ children: (e == null ? void 0 : e.children) || "新增组件"
3955
+ }
3956
+ ) })
3957
+ }
3958
+ );
3959
+ }
3960
+ function hd(e) {
3961
+ var d;
3962
+ const t = ht(), { engine: n } = N(), i = A(() => {
3963
+ var o, s;
3964
+ return (s = (o = e == null ? void 0 : e.targets) == null ? void 0 : o.map) == null ? void 0 : s.call(o, (r) => {
3965
+ var u;
3966
+ return {
3967
+ value: r.id,
3968
+ label: (u = n.componentNode.get(r == null ? void 0 : r.id)) == null ? void 0 : u.name
3969
+ };
3970
+ });
3971
+ }, [e == null ? void 0 : e.targets]);
3972
+ function c(o) {
3973
+ var r;
3974
+ const s = [
3975
+ ...(e == null ? void 0 : e.targets) || [],
3976
+ {
3977
+ id: o.id,
3978
+ opts: []
3979
+ }
3980
+ ];
3981
+ (r = e == null ? void 0 : e.onChangeTargets) == null || r.call(e, s, "add");
3982
+ }
3983
+ function a(o) {
3984
+ var _, m, y;
3985
+ let s;
3986
+ const r = ((m = (_ = e == null ? void 0 : e.targets) == null ? void 0 : _.filter) == null ? void 0 : m.call(_, (C) => C.id === o ? (s = C, !1) : !0)) || [], u = ((y = s == null ? void 0 : s.opts) == null ? void 0 : y.length) || 0;
3987
+ function h() {
3988
+ var C, b, I;
3989
+ (C = e == null ? void 0 : e.onChangeTargets) == null || C.call(e, r, "delete"), o === (e == null ? void 0 : e.value) && ((I = e == null ? void 0 : e.onChange) == null || I.call(e, (b = r == null ? void 0 : r[0]) == null ? void 0 : b.id));
3990
+ }
3991
+ if (u) {
3992
+ t({
3993
+ title: "提醒",
3994
+ content: `该组件已配置 ${u} 个事件操作,确定删除?`,
3995
+ onOk(C) {
3996
+ h(), C();
3997
+ }
3998
+ });
3999
+ return;
4000
+ }
4001
+ h();
4002
+ }
4003
+ return /* @__PURE__ */ g("div", { className: $(me.targetList, e == null ? void 0 : e.className), style: e == null ? void 0 : e.style, children: [
4004
+ /* @__PURE__ */ l(
4005
+ ud,
4006
+ {
4007
+ style: { margin: -1 },
4008
+ beforeVisible: (o) => o.filter((s) => {
4009
+ var r, u;
4010
+ return !((u = (r = e == null ? void 0 : e.targets) == null ? void 0 : r.find) != null && u.call(r, (h) => h.id === (s == null ? void 0 : s.id)));
4011
+ }),
4012
+ onSelect: (o) => c(o),
4013
+ children: "新增目标组件"
4014
+ }
4015
+ ),
4016
+ /* @__PURE__ */ l("div", { className: me.targetList_body, children: (d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (o) => {
4017
+ const s = (o == null ? void 0 : o.value) === (e == null ? void 0 : e.value);
4018
+ return /* @__PURE__ */ g(
4019
+ "div",
4020
+ {
4021
+ className: $(
4022
+ me.targetList_item,
4023
+ s && me.targetList_item_selected
4024
+ ),
4025
+ onClick: () => {
4026
+ var r;
4027
+ return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e, o == null ? void 0 : o.value);
4028
+ },
4029
+ children: [
4030
+ o == null ? void 0 : o.label,
4031
+ /* @__PURE__ */ l(
4032
+ de,
4033
+ {
4034
+ className: me.targetList_item_clickable,
4035
+ onClick: (r) => {
4036
+ a(o == null ? void 0 : o.value), r.stopPropagation();
4037
+ }
4038
+ }
4039
+ )
4040
+ ]
4041
+ },
4042
+ o == null ? void 0 : o.value
4043
+ );
4044
+ }) }),
4045
+ !(i != null && i.length) && /* @__PURE__ */ l(q, {})
4046
+ ] });
4047
+ }
4048
+ const gd = "_targetList_17cmb_59", _d = "_targetList_body_17cmb_66", md = "_targetList_item_17cmb_74", fd = "_targetList_item_clickable_17cmb_82", yd = "_targetList_item_selected_17cmb_89", ye = {
4049
+ targetList: gd,
4050
+ targetList_body: _d,
4051
+ targetList_item: md,
4052
+ targetList_item_clickable: fd,
4053
+ targetList_item_selected: yd
4054
+ }, vd = "_addExposesButton_1t3fz_59", bd = "_addExposesButton_body_1t3fz_68", Cd = "_addExposesButton_item_1t3fz_73", xd = "_addExposesButton_item_text_1t3fz_84", Se = {
4055
+ addExposesButton: vd,
4056
+ addExposesButton_body: bd,
4057
+ addExposesButton_item: Cd,
4058
+ addExposesButton_item_text: xd
4059
+ };
4060
+ function Id(e) {
4061
+ var h;
4062
+ const { engine: t } = N(), [n, i] = S(!1), [c, a] = S([]), [d, o] = S(""), s = B(), r = A(() => {
4063
+ var m;
4064
+ const _ = (m = d == null ? void 0 : d.toLowerCase) == null ? void 0 : m.call(d);
4065
+ return c.filter((y) => {
4066
+ var C, b, I, f;
4067
+ return (f = (I = (b = (C = y == null ? void 0 : y.label) == null ? void 0 : C.toLowerCase) == null ? void 0 : b.call(C)) == null ? void 0 : I.includes) == null ? void 0 : f.call(I, _);
4068
+ });
4069
+ }, [d, c]);
4070
+ function u() {
4071
+ i(!1);
4072
+ }
4073
+ return w(() => {
4074
+ var _;
4075
+ if (n) {
4076
+ s.current && (clearTimeout(s.current), s.current = null);
4077
+ let m = [];
4078
+ if (e != null && e.cId) {
4079
+ const y = t.component.get(e == null ? void 0 : e.cId);
4080
+ m = (_ = (y == null ? void 0 : y.exposes) || []) == null ? void 0 : _.reduce(
4081
+ (C, b) => (C.push({ label: b.label, value: b.value }), C),
4082
+ [...di]
4083
+ );
4084
+ }
4085
+ e != null && e.beforeVisible && (m = e == null ? void 0 : e.beforeVisible(m)), a(m), o("");
4086
+ }
4087
+ }, [n]), /* @__PURE__ */ l(
4088
+ vi,
4089
+ {
4090
+ visible: n,
4091
+ onClose: u,
4092
+ overlayChildren: /* @__PURE__ */ g("div", { className: Se.addExposesButton, children: [
4093
+ /* @__PURE__ */ l(ee, { placeholder: "搜索组件操作", value: d, onChange: o }),
4094
+ /* @__PURE__ */ g("div", { className: Se.addExposesButton_body, children: [
4095
+ !(r != null && r.length) && /* @__PURE__ */ l(q, {}),
4096
+ (h = r == null ? void 0 : r.map) == null ? void 0 : h.call(r, (_) => /* @__PURE__ */ l(
4097
+ "div",
4098
+ {
4099
+ className: Se.addExposesButton_item,
4100
+ title: _ == null ? void 0 : _.label,
4101
+ onClick: () => {
4102
+ var m;
4103
+ (m = e == null ? void 0 : e.onSelect) == null || m.call(e, _), u();
4104
+ },
4105
+ children: /* @__PURE__ */ l("div", { className: Se.addExposesButton_item_text, children: _ == null ? void 0 : _.label })
4106
+ },
4107
+ _ == null ? void 0 : _.value
4108
+ ))
4109
+ ] })
4110
+ ] }),
4111
+ children: /* @__PURE__ */ l("div", { style: { width: "100%", ...e == null ? void 0 : e.style }, onClick: () => i(!0), children: /* @__PURE__ */ l(
4112
+ K,
4113
+ {
4114
+ block: !0,
4115
+ onClick: () => u(),
4116
+ style: { fontSize: 12, color: "rgba(0,0,0,0.5)" },
4117
+ icon: /* @__PURE__ */ l(rt, {}),
4118
+ children: (e == null ? void 0 : e.children) || "新增操作"
4119
+ }
4120
+ ) })
4121
+ }
4122
+ );
4123
+ }
4124
+ function kd(e) {
4125
+ var d;
4126
+ const { engine: t } = N(), n = A(() => {
4127
+ var s, r;
4128
+ const o = t.component.get(e == null ? void 0 : e.cId);
4129
+ return {
4130
+ ...ri,
4131
+ ...(r = (s = o == null ? void 0 : o.exposes) == null ? void 0 : s.reduce) == null ? void 0 : r.call(s, (u, h) => (u[h.value] = h.label, u), {})
4132
+ };
4133
+ }, [e == null ? void 0 : e.cId]), i = A(() => {
4134
+ var o, s;
4135
+ return (s = (o = e == null ? void 0 : e.opts) == null ? void 0 : o.map) == null ? void 0 : s.call(o, (r) => ({
4136
+ value: r.operateId,
4137
+ label: n[r.exposeId] || "-"
4138
+ }));
4139
+ }, [e == null ? void 0 : e.opts, n]);
4140
+ function c(o) {
4141
+ var r;
4142
+ const s = [
4143
+ ...(e == null ? void 0 : e.opts) || [],
4144
+ {
4145
+ operateId: ut(),
4146
+ exposeId: o.value,
4147
+ option: {}
4148
+ }
4149
+ ];
4150
+ (r = e == null ? void 0 : e.onChangeOpts) == null || r.call(e, s);
4151
+ }
4152
+ function a(o) {
4153
+ var r, u, h, _, m;
4154
+ const s = ((u = (r = e == null ? void 0 : e.opts) == null ? void 0 : r.filter) == null ? void 0 : u.call(r, (y) => y.operateId !== o)) || [];
4155
+ (h = e == null ? void 0 : e.onChangeOpts) == null || h.call(e, s), o === (e == null ? void 0 : e.value) && ((m = e == null ? void 0 : e.onChange) == null || m.call(e, (_ = s == null ? void 0 : s[0]) == null ? void 0 : _.operateId));
4156
+ }
4157
+ return /* @__PURE__ */ g("div", { className: $(ye.targetList, e == null ? void 0 : e.className), style: e == null ? void 0 : e.style, children: [
4158
+ /* @__PURE__ */ l(
4159
+ Id,
4160
+ {
4161
+ style: { margin: -1 },
4162
+ cId: e == null ? void 0 : e.cId,
4163
+ onSelect: (o) => c(o),
4164
+ children: "新增操作"
4165
+ }
4166
+ ),
4167
+ /* @__PURE__ */ g("div", { className: ye.targetList_body, children: [
4168
+ !(i != null && i.length) && /* @__PURE__ */ l(q, {}),
4169
+ (d = i == null ? void 0 : i.map) == null ? void 0 : d.call(i, (o) => {
4170
+ const s = (o == null ? void 0 : o.value) === (e == null ? void 0 : e.value);
4171
+ return /* @__PURE__ */ g(
4172
+ "div",
4173
+ {
4174
+ className: $(
4175
+ ye.targetList_item,
4176
+ s && ye.targetList_item_selected
4177
+ ),
4178
+ onClick: () => {
4179
+ var r;
4180
+ return (r = e == null ? void 0 : e.onChange) == null ? void 0 : r.call(e, o == null ? void 0 : o.value);
4181
+ },
4182
+ children: [
4183
+ o == null ? void 0 : o.label,
4184
+ /* @__PURE__ */ l(
4185
+ de,
4186
+ {
4187
+ className: ye.targetList_item_clickable,
4188
+ onClick: (r) => {
4189
+ a(o == null ? void 0 : o.value), r.stopPropagation();
4190
+ }
4191
+ }
4192
+ )
4193
+ ]
4194
+ },
4195
+ o == null ? void 0 : o.value
4196
+ );
4197
+ })
4198
+ ] })
4199
+ ] });
4200
+ }
4201
+ const Sd = ue((e) => {
4202
+ const { engine: t } = N(), { componentNode: n, triggerId: i, triggerName: c } = (e == null ? void 0 : e.params) || {}, [a, d] = S(), [o, s] = S(), [r, u] = S(), h = A(() => {
4203
+ var f;
4204
+ return (f = t.componentNode.get(o == null ? void 0 : o.id)) == null ? void 0 : f.cId;
4205
+ }, [o]);
4206
+ function _(f) {
4207
+ var x, L, j;
4208
+ const v = (L = (x = a == null ? void 0 : a.targets) == null ? void 0 : x.find) == null ? void 0 : L.call(x, (R) => R.id === f);
4209
+ s(v), u((j = v == null ? void 0 : v.opts) == null ? void 0 : j[0]);
4210
+ }
4211
+ function m(f) {
4212
+ var v, x;
4213
+ u(
4214
+ (x = (v = o == null ? void 0 : o.opts) == null ? void 0 : v.find) == null ? void 0 : x.call(v, (L) => (L == null ? void 0 : L.operateId) === f)
4215
+ );
4216
+ }
4217
+ function y(f, v) {
4218
+ d({
4219
+ ...a,
4220
+ targets: f
4221
+ }), v && f.length === 1 && s(f[f.length - 1]);
4222
+ }
4223
+ function C(f) {
4224
+ var v, x;
4225
+ (x = (v = a == null ? void 0 : a.targets) == null ? void 0 : v.find) == null || x.call(v, (L) => L.id !== (o == null ? void 0 : o.id) ? !1 : (L.opts = f, !0)), d({ ...a }), f.length === 1 && u(f == null ? void 0 : f[0]);
4226
+ }
4227
+ function b(f) {
4228
+ var v, x;
4229
+ (x = (v = a == null ? void 0 : a.targets) == null ? void 0 : v.find) == null || x.call(v, (L) => {
4230
+ var j, R;
4231
+ return L.id !== (o == null ? void 0 : o.id) ? !1 : ((R = (j = L.opts) == null ? void 0 : j.find) == null || R.call(j, (U) => (U == null ? void 0 : U.operateId) !== (f == null ? void 0 : f.operateId) ? !1 : (Object.assign(U, f), !0)), !0);
4232
+ }), d({ ...a });
4233
+ }
4234
+ function I() {
4235
+ var f;
4236
+ (f = e == null ? void 0 : e.onOk) == null || f.call(e, a);
4237
+ }
4238
+ return w(() => {
4239
+ var f, v, x, L;
4240
+ if (e != null && e.visible) {
4241
+ if (!i) {
4242
+ E.error("triggerId不存在");
4243
+ return;
4244
+ }
4245
+ let j = (v = (f = n == null ? void 0 : n.events) == null ? void 0 : f.find) == null ? void 0 : v.call(f, (V) => (V == null ? void 0 : V.triggerId) === i);
4246
+ j = Yt(j || {}), d(j);
4247
+ const R = (x = j == null ? void 0 : j.targets) == null ? void 0 : x[0];
4248
+ s(R);
4249
+ const U = (L = R == null ? void 0 : R.opts) == null ? void 0 : L[0];
4250
+ u(U);
4251
+ } else
4252
+ d(void 0), s(void 0), u(void 0);
4253
+ }, [e == null ? void 0 : e.visible]), /* @__PURE__ */ g(
4254
+ re,
4255
+ {
4256
+ centered: !0,
4257
+ width: 850,
4258
+ okText: "保存",
4259
+ cancelText: "取消",
4260
+ open: e == null ? void 0 : e.visible,
4261
+ className: Ye.editEventDialog,
4262
+ title: `${c || "-"}`,
4263
+ bodyStyle: { height: 500, display: "flex", padding: 16, userSelect: "none" },
4264
+ afterClose: e == null ? void 0 : e.afterClose,
4265
+ onCancel: e == null ? void 0 : e.onCancel,
4266
+ onOk: I,
4267
+ children: [
4268
+ /* @__PURE__ */ g("div", { className: Ye.editEventDialog_menu, children: [
4269
+ /* @__PURE__ */ l(
4270
+ hd,
4271
+ {
4272
+ className: "border-right",
4273
+ value: o == null ? void 0 : o.id,
4274
+ onChange: (f) => {
4275
+ _(f);
4276
+ },
4277
+ targets: a == null ? void 0 : a.targets,
4278
+ onChangeTargets: (f, v) => {
4279
+ y(f, v === "add");
4280
+ }
4281
+ }
4282
+ ),
4283
+ /* @__PURE__ */ l(
4284
+ kd,
4285
+ {
4286
+ value: r == null ? void 0 : r.operateId,
4287
+ onChange: (f) => {
4288
+ m(f);
4289
+ },
4290
+ cId: h,
4291
+ opts: o == null ? void 0 : o.opts,
4292
+ onChangeOpts: (f) => {
4293
+ C(f);
4294
+ }
4295
+ }
4296
+ )
4297
+ ] }),
4298
+ /* @__PURE__ */ l("div", { className: Ye.editEventDialog_body, children: /* @__PURE__ */ l(
4299
+ po,
4300
+ {
4301
+ value: r,
4302
+ onChange: (f) => {
4303
+ b(f);
4304
+ }
4305
+ }
4306
+ ) })
4307
+ ]
4308
+ }
4309
+ );
4310
+ });
4311
+ function Nd(e) {
4312
+ var u;
4313
+ const { engine: t } = N(), { componentNode: n } = e, i = A(() => t.component.get(n == null ? void 0 : n.cId), [n]), c = ht(), a = Sd({
4314
+ onOk(h) {
4315
+ t.componentNode.update(n == null ? void 0 : n.id, (_) => {
4316
+ var m, y;
4317
+ return (y = (m = _ == null ? void 0 : _.events) == null ? void 0 : m.find) == null || y.call(m, (C) => C.triggerId !== (h == null ? void 0 : h.triggerId) ? !1 : (Object.assign(C, h), !0)), {
4318
+ events: _ == null ? void 0 : _.events
4319
+ };
4320
+ });
4321
+ }
4322
+ }), d = A(() => {
4323
+ var h;
4324
+ return ((h = n == null ? void 0 : n.events) == null ? void 0 : h.map((_) => {
4325
+ var y, C;
4326
+ const m = (C = (y = i == null ? void 0 : i.triggers) == null ? void 0 : y.find) == null ? void 0 : C.call(y, (b) => (b == null ? void 0 : b.value) === _.triggerId);
4327
+ return {
4328
+ label: `${(m == null ? void 0 : m.label) || "-"}`,
4329
+ value: `${_.triggerId}`
4330
+ };
4331
+ })) || [];
4332
+ }, [n, i]);
4333
+ function o(h) {
4334
+ if (!(h != null && h.value)) {
4335
+ E.warn("triggerId不存在");
4336
+ return;
4337
+ }
4338
+ a.open({
4339
+ componentNode: n,
4340
+ triggerId: h == null ? void 0 : h.value,
4341
+ triggerName: h == null ? void 0 : h.label
4342
+ });
4343
+ }
4344
+ function s(h) {
4345
+ t.componentNode.update(n == null ? void 0 : n.id, (_) => {
4346
+ var m, y;
4347
+ return {
4348
+ events: [
4349
+ ...((y = (m = _ == null ? void 0 : _.events) == null ? void 0 : m.filter) == null ? void 0 : y.call(m, (C) => C.triggerId !== h)) || []
4350
+ ]
4351
+ };
4352
+ });
4353
+ }
4354
+ function r(h) {
4355
+ var m, y, C, b;
4356
+ if (!h) {
4357
+ E.warn("triggerId不存在");
4358
+ return;
4359
+ }
4360
+ const _ = (y = (m = n == null ? void 0 : n.events) == null ? void 0 : m.find) == null ? void 0 : y.call(m, (I) => (I == null ? void 0 : I.triggerId) === h);
4361
+ (C = _ == null ? void 0 : _.targets) != null && C.length ? c({
4362
+ title: "提醒",
4363
+ content: `已配置${((b = _ == null ? void 0 : _.targets) == null ? void 0 : b.length) || 0}个事件项,确定删除该事件?`,
4364
+ onOk(I) {
4365
+ s(h), I();
4366
+ }
4367
+ }) : s(h);
4368
+ }
4369
+ return /* @__PURE__ */ g("div", { className: X.eventList, children: [
4370
+ /* @__PURE__ */ l("div", { className: X.eventList_head, children: "绑定事件:" }),
4371
+ /* @__PURE__ */ g("div", { className: X.eventList_body, children: [
4372
+ !(d != null && d.length) && /* @__PURE__ */ l(q, {}),
4373
+ (u = d == null ? void 0 : d.map) == null ? void 0 : u.call(d, (h) => /* @__PURE__ */ g("div", { className: X.eventList_item, children: [
4374
+ /* @__PURE__ */ l("div", { className: X.eventList_item_body, children: h.label }),
4375
+ /* @__PURE__ */ g("div", { className: X.eventList_item_opt, children: [
4376
+ /* @__PURE__ */ l(
4377
+ Ft,
4378
+ {
4379
+ className: X.eventList_item_opt_clickable,
4380
+ onClick: () => o(h)
4381
+ }
4382
+ ),
4383
+ /* @__PURE__ */ l(
4384
+ de,
4385
+ {
4386
+ className: X.eventList_item_opt_clickable,
4387
+ onClick: () => r(h == null ? void 0 : h.value)
4388
+ }
4389
+ )
4390
+ ] })
4391
+ ] }, h.value))
4392
+ ] })
4393
+ ] });
4394
+ }
4395
+ function wd() {
4396
+ const { engine: e } = N(), { componentNode: t } = he();
4397
+ return /* @__PURE__ */ l(Le, { labelSpan: 5, children: /* @__PURE__ */ g("div", { className: Mo.interactive, children: [
4398
+ /* @__PURE__ */ l(
4399
+ Bo,
4400
+ {
4401
+ componentNode: t,
4402
+ onSelect: (n) => {
4403
+ e.componentNode.update(t == null ? void 0 : t.id, (i) => ({
4404
+ events: [
4405
+ ...(i == null ? void 0 : i.events) || [],
4406
+ {
4407
+ triggerId: n,
4408
+ targets: []
4409
+ }
4410
+ ]
4411
+ }));
4412
+ }
4413
+ }
4414
+ ),
4415
+ /* @__PURE__ */ l(Nd, { componentNode: t })
4416
+ ] }) });
4417
+ }
4418
+ const Ed = "_json_1lpul_59", Ad = "_json_head_1lpul_69", Ld = "_json_body_1lpul_76", Ze = {
4419
+ json: Ed,
4420
+ json_head: Ad,
4421
+ json_body: Ld
4422
+ };
4423
+ function Dd() {
4424
+ const { engine: e } = N(), { componentNode: t } = he(), [n] = M.useForm();
4425
+ function i() {
4426
+ n.setFieldsValue({
4427
+ code: t ? JSON.stringify(t || {}, null, " ") : ""
4428
+ });
4429
+ }
4430
+ function c() {
4431
+ const a = n.getFieldValue("code") || "";
4432
+ try {
4433
+ const d = JSON.parse(a);
4434
+ if (!fi(d)) {
4435
+ console.error("must be an object.");
4436
+ return;
4437
+ }
4438
+ e.componentNode.update(t == null ? void 0 : t.id, d, { cover: !0 }), E.success("修改成功");
4439
+ } catch (d) {
4440
+ console.error(d), E.error("json格式不正确");
4441
+ }
4442
+ }
4443
+ return w(() => {
4444
+ i();
4445
+ }, [t]), /* @__PURE__ */ g(M, { className: Ze.json, form: n, children: [
4446
+ /* @__PURE__ */ g("div", { className: Ze.json_head, children: [
4447
+ /* @__PURE__ */ g("span", { children: [
4448
+ /* @__PURE__ */ l("b", { style: { marginRight: 8 }, children: "ComponentNode数据" }),
4449
+ /* @__PURE__ */ l(T, { title: "重置", children: /* @__PURE__ */ l(Q, { className: "icon_clickable", onClick: i }) })
4450
+ ] }),
4451
+ /* @__PURE__ */ l(T, { title: "保存", placement: "top", children: /* @__PURE__ */ l(p, { className: "icon_clickable", onClick: c }) })
4452
+ ] }),
4453
+ /* @__PURE__ */ l("div", { className: Ze.json_body, children: /* @__PURE__ */ l(M.Item, { noStyle: !0, name: "code", children: /* @__PURE__ */ l(
4454
+ Y,
4455
+ {
4456
+ language: "json",
4457
+ minimap: !1,
4458
+ style: {
4459
+ height: "100%",
4460
+ width: "100%"
4461
+ },
4462
+ options: {
4463
+ fontSize: 11,
4464
+ tabSize: 3
4465
+ }
4466
+ }
4467
+ ) }) })
4468
+ ] });
4469
+ }
4470
+ const Od = "_singleAttributes_109pm_59", Pd = {
4471
+ singleAttributes: Od
4472
+ }, fn = In({}), he = () => kn(fn);
4473
+ function yn(e) {
4474
+ const [t, n] = se(), { engine: i } = N(), { instance: c } = e, [a, d] = S(), o = nn(c);
4475
+ return w(() => {
4476
+ const s = i.componentNode.get(c.id);
4477
+ return s && d(s), i.componentNode.onChange(c.id, ({ payload: r }) => {
4478
+ d({ ...r });
4479
+ });
4480
+ }, [c.id]), w(() => i.onJsonChange(() => {
4481
+ var s;
4482
+ d(i.componentNode.get((s = o == null ? void 0 : o.current) == null ? void 0 : s.id));
4483
+ }), []), A(() => a ? /* @__PURE__ */ l(fn.Provider, { value: { instance: c, componentNode: a }, children: /* @__PURE__ */ l(
4484
+ ei,
4485
+ {
4486
+ className: Pd.singleAttributes,
4487
+ defaultActiveKey: "1",
4488
+ size: "small",
4489
+ items: [
4490
+ { key: "1", label: t("attributes.attr.title"), children: /* @__PURE__ */ l(xo, {}) },
4491
+ {
4492
+ key: "2",
4493
+ label: t("attributes.dataSource.title"),
4494
+ children: /* @__PURE__ */ l(Oo, {})
4495
+ },
4496
+ {
4497
+ key: "3",
4498
+ label: t("attributes.interactive.title"),
4499
+ children: /* @__PURE__ */ l(wd, {})
4500
+ },
4501
+ {
4502
+ key: "4",
4503
+ label: "json",
4504
+ children: /* @__PURE__ */ l(Dd, {})
4505
+ }
4506
+ ]
4507
+ }
4508
+ ) }) : /* @__PURE__ */ l(xt, { image: xt.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" }), [c, a, n.language]);
4509
+ }
4510
+ const Md = "_multipleInstanceAttributes_1ehj2_59", Bd = "_multipleInstanceAttributes_header_1ehj2_66", jd = "_multipleInstanceAttributes_body_1ehj2_70", Qe = {
4511
+ multipleInstanceAttributes: Md,
4512
+ multipleInstanceAttributes_header: Bd,
4513
+ multipleInstanceAttributes_body: jd
4514
+ };
4515
+ function zd(e) {
4516
+ const t = yt();
4517
+ return /* @__PURE__ */ l(
4518
+ Ce,
4519
+ {
4520
+ ...e,
4521
+ effectParams: [t],
4522
+ requestFn: async () => {
4523
+ var n;
4524
+ return ((n = t == null ? void 0 : t.map) == null ? void 0 : n.call(t, (i) => ({
4525
+ label: i.getComponentNode().name,
4526
+ value: i.id
4527
+ }))) || [];
4528
+ }
4529
+ }
4530
+ );
4531
+ }
4532
+ function Td(e) {
4533
+ const { instances: t } = e, [n, i] = S();
4534
+ return w(() => {
4535
+ i(t[0]);
4536
+ }, [t]), /* @__PURE__ */ g("div", { className: Qe.multipleInstanceAttributes, children: [
4537
+ /* @__PURE__ */ l("div", { className: Qe.multipleInstanceAttributes_header, children: /* @__PURE__ */ l(
4538
+ zd,
4539
+ {
4540
+ allowClear: !1,
4541
+ style: { width: "100%" },
4542
+ value: n == null ? void 0 : n.id,
4543
+ onChange: (c) => {
4544
+ i(t.find((a) => a.id === c));
4545
+ }
4546
+ }
4547
+ ) }),
4548
+ /* @__PURE__ */ l("div", { className: Qe.multipleInstanceAttributes_body, children: n && /* @__PURE__ */ l(yn, { instance: n }) })
4549
+ ] });
4550
+ }
4551
+ const $d = "_pageAttributes_u2l2i_59", Rd = "_pageAttributes_description_u2l2i_65", Fd = "_pageAttributes_body_u2l2i_70", pe = {
4552
+ pageAttributes: $d,
4553
+ pageAttributes_description: Rd,
4554
+ pageAttributes_body: Fd
4555
+ };
4556
+ function Hd() {
4557
+ const { engine: e } = N(), [t] = se(), n = yi(), { id: i, options: c } = n || {};
4558
+ function a(d) {
4559
+ e.page.update(i, {
4560
+ options: {
4561
+ ...c,
4562
+ ...d
4563
+ }
4564
+ });
4565
+ }
4566
+ return /* @__PURE__ */ g("div", { className: pe.pageAttributes, children: [
4567
+ /* @__PURE__ */ l("div", { className: pe.pageAttributes_description, children: /* @__PURE__ */ g(nt, { children: [
4568
+ /* @__PURE__ */ l(H, { span: 24, style: { marginBottom: 6 }, children: /* @__PURE__ */ l("b", { children: n == null ? void 0 : n.name }) }),
4569
+ /* @__PURE__ */ l(H, { span: 24, children: /* @__PURE__ */ g("span", { children: [
4570
+ "id:",
4571
+ (n == null ? void 0 : n.id) || "-"
4572
+ ] }) }),
4573
+ /* @__PURE__ */ l(H, { span: 24, children: /* @__PURE__ */ g("span", { children: [
4574
+ "parentId:",
4575
+ (n == null ? void 0 : n.parentId) || "-"
4576
+ ] }) })
4577
+ ] }) }),
4578
+ /* @__PURE__ */ l("div", { className: pe.pageAttributes_body, children: /* @__PURE__ */ g(Le, { labelSpan: 5, children: [
4579
+ /* @__PURE__ */ g(
4580
+ z,
4581
+ {
4582
+ label: "页面背景",
4583
+ labelTip: "设置当前页背景颜色",
4584
+ childrenStyle: { display: "flex", alignItems: "center", gap: 8 },
4585
+ children: [
4586
+ /* @__PURE__ */ l(
4587
+ $e,
4588
+ {
4589
+ style: { flex: 1 },
4590
+ value: c == null ? void 0 : c.background,
4591
+ onChange: (d) => {
4592
+ a({ background: d });
4593
+ }
4594
+ }
4595
+ ),
4596
+ /* @__PURE__ */ l(T, { title: t("reset"), children: /* @__PURE__ */ l(
4597
+ Q,
4598
+ {
4599
+ className: "icon_clickable",
4600
+ onClick: () => {
4601
+ a({ background: "white" });
4602
+ }
4603
+ }
4604
+ ) })
4605
+ ]
4606
+ }
4607
+ ),
4608
+ /* @__PURE__ */ g(
4609
+ z,
4610
+ {
4611
+ label: "白板背景",
4612
+ labelTip: "页面所处白板的背景颜色",
4613
+ childrenStyle: { display: "flex", alignItems: "center", gap: 8 },
4614
+ children: [
4615
+ /* @__PURE__ */ l(
4616
+ $e,
4617
+ {
4618
+ style: { flex: 1 },
4619
+ value: c == null ? void 0 : c.whiteBoardColor,
4620
+ onChange: (d) => {
4621
+ a({ whiteBoardColor: d });
4622
+ }
4623
+ }
4624
+ ),
4625
+ /* @__PURE__ */ l(T, { title: t("reset"), children: /* @__PURE__ */ l(
4626
+ Q,
4627
+ {
4628
+ className: "icon_clickable",
4629
+ onClick: () => {
4630
+ a({ whiteBoardColor: "white" });
4631
+ }
4632
+ }
4633
+ ) })
4634
+ ]
4635
+ }
4636
+ ),
4637
+ /* @__PURE__ */ g(
4638
+ z,
4639
+ {
4640
+ label: "边框",
4641
+ childrenStyle: { display: "flex", alignItems: "center", gap: 8 },
4642
+ labelTip: "设置当前页边框",
4643
+ children: [
4644
+ /* @__PURE__ */ l(
4645
+ we,
4646
+ {
4647
+ checked: c == null ? void 0 : c.bordered,
4648
+ onChange: (d) => {
4649
+ a({
4650
+ bordered: d.target.checked
4651
+ });
4652
+ }
4653
+ }
4654
+ ),
4655
+ (c == null ? void 0 : c.bordered) && /* @__PURE__ */ g(W, { children: [
4656
+ /* @__PURE__ */ l(
4657
+ $e,
4658
+ {
4659
+ style: { flex: 1 },
4660
+ value: c == null ? void 0 : c.borderColor,
4661
+ onChange: (d) => {
4662
+ a({ borderColor: d });
4663
+ }
4664
+ }
4665
+ ),
4666
+ /* @__PURE__ */ l(T, { title: t("reset"), children: /* @__PURE__ */ l(
4667
+ Q,
4668
+ {
4669
+ className: "icon_clickable",
4670
+ onClick: () => {
4671
+ a({ borderColor: "white" });
4672
+ }
4673
+ }
4674
+ ) })
4675
+ ] })
4676
+ ]
4677
+ }
4678
+ )
4679
+ ] }) })
4680
+ ] });
4681
+ }
4682
+ function Kd() {
4683
+ const e = yt(), t = A(() => !!e.length, [e]), n = A(() => e.length === 1, [e]);
4684
+ return /* @__PURE__ */ l("div", { className: ho.attributes, children: t ? (
4685
+ // 选中组件实例配置
4686
+ /* @__PURE__ */ g(W, { children: [
4687
+ n && /* @__PURE__ */ l(yn, { instance: e[0] }),
4688
+ !n && /* @__PURE__ */ l(Td, { instances: e })
4689
+ ] })
4690
+ ) : (
4691
+ // 默认页面配置
4692
+ /* @__PURE__ */ l(Hd, {})
4693
+ ) });
4694
+ }
4695
+ function Ir(e) {
4696
+ const { engine: t, json: n } = e;
4697
+ return pi(), zt.useEffect(() => (t.loadJSON(n).then(() => {
4698
+ var i;
4699
+ (i = e == null ? void 0 : e.onJSONLoad) == null || i.call(e);
4700
+ }), () => {
4701
+ t.destroy();
4702
+ }), []), /* @__PURE__ */ g("div", { className: G.page, children: [
4703
+ /* @__PURE__ */ l("div", { className: G.page_header, children: /* @__PURE__ */ l(Ll, {}) }),
4704
+ /* @__PURE__ */ g("div", { className: G.page_body, children: [
4705
+ /* @__PURE__ */ l("div", { className: G.page_body_left, id: "rbs-menu", children: /* @__PURE__ */ l(fa, {}) }),
4706
+ /* @__PURE__ */ l("div", { className: G.page_body_main, id: "rbs-editor", children: /* @__PURE__ */ l(so, {}) }),
4707
+ /* @__PURE__ */ l("div", { className: G.page_body_right, id: "rbs-attributes", children: /* @__PURE__ */ l(Kd, {}) })
4708
+ ] }),
4709
+ /* @__PURE__ */ g("div", { className: G.page_footer, children: [
4710
+ /* @__PURE__ */ g("div", { className: G.page_footer_beian, children: [
4711
+ /* @__PURE__ */ l("img", { src: "/beian.png" }),
4712
+ /* @__PURE__ */ l(
4713
+ "a",
4714
+ {
4715
+ href: "https://beian.mps.gov.cn/#/query/webSearch?code=33010602013871",
4716
+ rel: "noreferrer",
4717
+ target: "_blank",
4718
+ children: "浙公网安备33010602013871号"
4719
+ }
4720
+ )
4721
+ ] }),
4722
+ /* @__PURE__ */ l("a", { href: "https://beian.miit.gov.cn", target: "_blank", rel: "noreferrer", children: "浙ICP备2024117433号-2" })
4723
+ ] })
4724
+ ] });
4725
+ }
4726
+ export {
4727
+ Ir as default
4728
+ };