amis-editor 3.3.9 → 4.0.1-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (443) hide show
  1. package/dist/150a58f3318ca7541ed9.png +0 -0
  2. package/dist/471adb97c322b226e589.png +0 -0
  3. package/dist/4de5f42360bc5946c3c2.png +0 -0
  4. package/dist/4e9968bba3855f088fed.png +0 -0
  5. package/dist/7f09c38ebc687fea847a.png +0 -0
  6. package/dist/c94073576487510314ea.png +0 -0
  7. package/dist/component/AvailableRenderersPanel.d.ts +13 -1
  8. package/dist/component/BackTop.d.ts +26 -0
  9. package/dist/component/Breadcrumb.d.ts +1 -1
  10. package/dist/component/ContextMenuPanel.d.ts +8 -0
  11. package/dist/component/InputComponentName.d.ts +8 -0
  12. package/dist/component/Outline.d.ts +6 -0
  13. package/dist/component/Preview.d.ts +2 -0
  14. package/dist/component/RegionHLBox.d.ts +1 -8
  15. package/dist/dnd/default.d.ts +1 -1
  16. package/dist/dnd/index.d.ts +1 -1
  17. package/dist/index.d.ts +3 -4
  18. package/dist/index.min.js +1 -1
  19. package/dist/manager.d.ts +442 -0
  20. package/dist/plugin/BasicToolbar.d.ts +1 -1
  21. package/dist/plugin/Date.d.ts +1 -0
  22. package/dist/plugin/Datetime.d.ts +3 -0
  23. package/dist/plugin/Form/FieldSet.d.ts +1 -0
  24. package/dist/plugin/Form/Group.d.ts +1 -0
  25. package/dist/plugin/Form/InputExcel.d.ts +13 -1
  26. package/dist/plugin/Form/InputGroup.d.ts +0 -2
  27. package/dist/plugin/Form/InputKV.d.ts +28 -0
  28. package/dist/plugin/Form/Item.d.ts +1 -1
  29. package/dist/plugin/Grid.d.ts +17 -20
  30. package/dist/plugin/HBox.d.ts +1 -0
  31. package/dist/plugin/Log.d.ts +1 -0
  32. package/dist/plugin/Plain.d.ts +1 -0
  33. package/dist/plugin/Reset.d.ts +1 -0
  34. package/dist/plugin/Steps.d.ts +1 -7
  35. package/dist/plugin/Submit.d.ts +1 -0
  36. package/dist/plugin/Time.d.ts +3 -0
  37. package/dist/plugin/WebComponent.d.ts +1 -0
  38. package/dist/plugin/Wrapper.d.ts +1 -0
  39. package/dist/plugin.d.ts +19 -0
  40. package/dist/store/editor.d.ts +6 -1
  41. package/dist/style.css +1 -1
  42. package/dist/util.d.ts +1 -1
  43. package/package.json +15 -8
  44. package/.editorconfig +0 -12
  45. package/.fecsrc +0 -8
  46. package/.prettierrc +0 -20
  47. package/dist/npm/src/compat.d.ts +0 -30
  48. package/dist/npm/src/component/AvailableRenderersPanel.d.ts +0 -8
  49. package/dist/npm/src/component/Breadcrumb.d.ts +0 -12
  50. package/dist/npm/src/component/ClassNameControl.d.ts +0 -31
  51. package/dist/npm/src/component/CodeEditor.d.ts +0 -34
  52. package/dist/npm/src/component/CodeEditorPanel.d.ts +0 -12
  53. package/dist/npm/src/component/ContainerWrapper.d.ts +0 -12
  54. package/dist/npm/src/component/Editor.d.ts +0 -48
  55. package/dist/npm/src/component/ErrorRenderer.d.ts +0 -4
  56. package/dist/npm/src/component/HighlightBox.d.ts +0 -13
  57. package/dist/npm/src/component/InsertSubRendererPanel.d.ts +0 -11
  58. package/dist/npm/src/component/MiniEditor.d.ts +0 -8
  59. package/dist/npm/src/component/NodeWrapper.d.ts +0 -20
  60. package/dist/npm/src/component/Outline.d.ts +0 -12
  61. package/dist/npm/src/component/Panels.d.ts +0 -17
  62. package/dist/npm/src/component/Preview.d.ts +0 -43
  63. package/dist/npm/src/component/RegionHLBox.d.ts +0 -27
  64. package/dist/npm/src/component/RegionWrapper.d.ts +0 -150
  65. package/dist/npm/src/component/RendererThumb.d.ts +0 -23
  66. package/dist/npm/src/component/ScaffoldModal.d.ts +0 -53
  67. package/dist/npm/src/component/SubEditor.d.ts +0 -71
  68. package/dist/npm/src/component/VRenderer.d.ts +0 -142
  69. package/dist/npm/src/component/schemaTpl.d.ts +0 -4
  70. package/dist/npm/src/dnd/default.d.ts +0 -47
  71. package/dist/npm/src/dnd/index.d.ts +0 -119
  72. package/dist/npm/src/dnd/interface.d.ts +0 -14
  73. package/dist/npm/src/dnd/position-h.d.ts +0 -7
  74. package/dist/npm/src/env.d.ts +0 -5
  75. package/dist/npm/src/index.d.ts +0 -126
  76. package/dist/npm/src/mocker.d.ts +0 -1
  77. package/dist/npm/src/plugin/Action.d.ts +0 -6
  78. package/dist/npm/src/plugin/Alert.d.ts +0 -18
  79. package/dist/npm/src/plugin/Audio.d.ts +0 -21
  80. package/dist/npm/src/plugin/AvailableRenderers.d.ts +0 -8
  81. package/dist/npm/src/plugin/BasicToolbar.d.ts +0 -9
  82. package/dist/npm/src/plugin/Button.d.ts +0 -24
  83. package/dist/npm/src/plugin/ButtonGroup.d.ts +0 -59
  84. package/dist/npm/src/plugin/ButtonToolbar.d.ts +0 -35
  85. package/dist/npm/src/plugin/CRUD.d.ts +0 -28
  86. package/dist/npm/src/plugin/Card.d.ts +0 -55
  87. package/dist/npm/src/plugin/Cards.d.ts +0 -69
  88. package/dist/npm/src/plugin/Carousel.d.ts +0 -31
  89. package/dist/npm/src/plugin/Chart.d.ts +0 -44
  90. package/dist/npm/src/plugin/Code.d.ts +0 -9
  91. package/dist/npm/src/plugin/Collapse.d.ts +0 -21
  92. package/dist/npm/src/plugin/Container.d.ts +0 -20
  93. package/dist/npm/src/plugin/Date.d.ts +0 -19
  94. package/dist/npm/src/plugin/Datetime.d.ts +0 -10
  95. package/dist/npm/src/plugin/Dialog.d.ts +0 -18
  96. package/dist/npm/src/plugin/DiffEditor.d.ts +0 -19
  97. package/dist/npm/src/plugin/Divider.d.ts +0 -13
  98. package/dist/npm/src/plugin/Drawer.d.ts +0 -16
  99. package/dist/npm/src/plugin/DropDownButton.d.ts +0 -41
  100. package/dist/npm/src/plugin/Each.d.ts +0 -35
  101. package/dist/npm/src/plugin/ErrorRenderer.d.ts +0 -6
  102. package/dist/npm/src/plugin/Form/Array.d.ts +0 -26
  103. package/dist/npm/src/plugin/Form/Button.d.ts +0 -11
  104. package/dist/npm/src/plugin/Form/ButtonGroup.d.ts +0 -21
  105. package/dist/npm/src/plugin/Form/ButtonToolbar.d.ts +0 -26
  106. package/dist/npm/src/plugin/Form/ChainedSelect.d.ts +0 -18
  107. package/dist/npm/src/plugin/Form/Checkbox.d.ts +0 -18
  108. package/dist/npm/src/plugin/Form/Checkboxes.d.ts +0 -23
  109. package/dist/npm/src/plugin/Form/City.d.ts +0 -18
  110. package/dist/npm/src/plugin/Form/Color.d.ts +0 -18
  111. package/dist/npm/src/plugin/Form/Combo.d.ts +0 -37
  112. package/dist/npm/src/plugin/Form/Container.d.ts +0 -36
  113. package/dist/npm/src/plugin/Form/Date.d.ts +0 -20
  114. package/dist/npm/src/plugin/Form/DateRange.d.ts +0 -20
  115. package/dist/npm/src/plugin/Form/DateTime.d.ts +0 -19
  116. package/dist/npm/src/plugin/Form/DiffEditor.d.ts +0 -18
  117. package/dist/npm/src/plugin/Form/Editor.d.ts +0 -39
  118. package/dist/npm/src/plugin/Form/Email.d.ts +0 -24
  119. package/dist/npm/src/plugin/Form/FieldSet.d.ts +0 -25
  120. package/dist/npm/src/plugin/Form/File.d.ts +0 -18
  121. package/dist/npm/src/plugin/Form/Form.d.ts +0 -18
  122. package/dist/npm/src/plugin/Form/Formula.d.ts +0 -50
  123. package/dist/npm/src/plugin/Form/Grid.d.ts +0 -32
  124. package/dist/npm/src/plugin/Form/Group.d.ts +0 -23
  125. package/dist/npm/src/plugin/Form/HBox.d.ts +0 -72
  126. package/dist/npm/src/plugin/Form/Hidden.d.ts +0 -22
  127. package/dist/npm/src/plugin/Form/Image.d.ts +0 -19
  128. package/dist/npm/src/plugin/Form/InputGroup.d.ts +0 -33
  129. package/dist/npm/src/plugin/Form/Item.d.ts +0 -10
  130. package/dist/npm/src/plugin/Form/List.d.ts +0 -23
  131. package/dist/npm/src/plugin/Form/Matrix.d.ts +0 -25
  132. package/dist/npm/src/plugin/Form/NestedSelect.d.ts +0 -72
  133. package/dist/npm/src/plugin/Form/Number.d.ts +0 -19
  134. package/dist/npm/src/plugin/Form/Panel.d.ts +0 -23
  135. package/dist/npm/src/plugin/Form/Password.d.ts +0 -24
  136. package/dist/npm/src/plugin/Form/Picker.d.ts +0 -25
  137. package/dist/npm/src/plugin/Form/QRCode.d.ts +0 -19
  138. package/dist/npm/src/plugin/Form/Radios.d.ts +0 -23
  139. package/dist/npm/src/plugin/Form/Range.d.ts +0 -18
  140. package/dist/npm/src/plugin/Form/Rating.d.ts +0 -18
  141. package/dist/npm/src/plugin/Form/Repeat.d.ts +0 -18
  142. package/dist/npm/src/plugin/Form/Reset.d.ts +0 -6
  143. package/dist/npm/src/plugin/Form/RichText.d.ts +0 -18
  144. package/dist/npm/src/plugin/Form/Select.d.ts +0 -23
  145. package/dist/npm/src/plugin/Form/Service.d.ts +0 -23
  146. package/dist/npm/src/plugin/Form/Static.d.ts +0 -22
  147. package/dist/npm/src/plugin/Form/SubForm.d.ts +0 -62
  148. package/dist/npm/src/plugin/Form/Submit.d.ts +0 -6
  149. package/dist/npm/src/plugin/Form/Switch.d.ts +0 -19
  150. package/dist/npm/src/plugin/Form/Table.d.ts +0 -33
  151. package/dist/npm/src/plugin/Form/Tabs.d.ts +0 -16
  152. package/dist/npm/src/plugin/Form/Tag.d.ts +0 -20
  153. package/dist/npm/src/plugin/Form/Text.d.ts +0 -19
  154. package/dist/npm/src/plugin/Form/Textarea.d.ts +0 -19
  155. package/dist/npm/src/plugin/Form/Time.d.ts +0 -18
  156. package/dist/npm/src/plugin/Form/Tree.d.ts +0 -72
  157. package/dist/npm/src/plugin/Form/TreeSelect.d.ts +0 -72
  158. package/dist/npm/src/plugin/Form/Url.d.ts +0 -24
  159. package/dist/npm/src/plugin/Grid.d.ts +0 -30
  160. package/dist/npm/src/plugin/HBox.d.ts +0 -32
  161. package/dist/npm/src/plugin/IFrame.d.ts +0 -28
  162. package/dist/npm/src/plugin/Image.d.ts +0 -19
  163. package/dist/npm/src/plugin/Images.d.ts +0 -24
  164. package/dist/npm/src/plugin/Json.d.ts +0 -24
  165. package/dist/npm/src/plugin/Link.d.ts +0 -20
  166. package/dist/npm/src/plugin/List.d.ts +0 -53
  167. package/dist/npm/src/plugin/ListItem.d.ts +0 -16
  168. package/dist/npm/src/plugin/Mapping.d.ts +0 -35
  169. package/dist/npm/src/plugin/Nav.d.ts +0 -161
  170. package/dist/npm/src/plugin/Operation.d.ts +0 -25
  171. package/dist/npm/src/plugin/Page.d.ts +0 -26
  172. package/dist/npm/src/plugin/Panel.d.ts +0 -16
  173. package/dist/npm/src/plugin/Plain.d.ts +0 -18
  174. package/dist/npm/src/plugin/Progress.d.ts +0 -19
  175. package/dist/npm/src/plugin/QRCode.d.ts +0 -19
  176. package/dist/npm/src/plugin/Reset.d.ts +0 -10
  177. package/dist/npm/src/plugin/Service.d.ts +0 -24
  178. package/dist/npm/src/plugin/Status.d.ts +0 -19
  179. package/dist/npm/src/plugin/Submit.d.ts +0 -10
  180. package/dist/npm/src/plugin/Switch.d.ts +0 -21
  181. package/dist/npm/src/plugin/Table.d.ts +0 -18
  182. package/dist/npm/src/plugin/TableCell.d.ts +0 -8
  183. package/dist/npm/src/plugin/Tabs.d.ts +0 -43
  184. package/dist/npm/src/plugin/Tasks.d.ts +0 -41
  185. package/dist/npm/src/plugin/Time.d.ts +0 -10
  186. package/dist/npm/src/plugin/Tpl.d.ts +0 -16
  187. package/dist/npm/src/plugin/Unknown.d.ts +0 -5
  188. package/dist/npm/src/plugin/Video.d.ts +0 -24
  189. package/dist/npm/src/plugin/Wizard.d.ts +0 -40
  190. package/dist/npm/src/plugin/Wrapper.d.ts +0 -20
  191. package/dist/npm/src/plugin.d.ts +0 -486
  192. package/dist/npm/src/store/editor.d.ts +0 -731
  193. package/dist/npm/src/store/node.d.ts +0 -208
  194. package/dist/npm/src/util.d.ts +0 -45
  195. package/dist/plugin/DiffEditor.d.ts +0 -19
  196. package/dist/plugin/Form/AnchorNav.d.ts +0 -17
  197. package/dist/plugin/Form/Array.d.ts +0 -27
  198. package/dist/plugin/Form/Button.d.ts +0 -11
  199. package/dist/plugin/Form/ButtonGroup.d.ts +0 -22
  200. package/dist/plugin/Form/City.d.ts +0 -19
  201. package/dist/plugin/Form/Color.d.ts +0 -39
  202. package/dist/plugin/Form/Container.d.ts +0 -37
  203. package/dist/plugin/Form/Date.d.ts +0 -20
  204. package/dist/plugin/Form/DateRange.d.ts +0 -20
  205. package/dist/plugin/Form/DateTime.d.ts +0 -19
  206. package/dist/plugin/Form/Email.d.ts +0 -25
  207. package/dist/plugin/Form/File.d.ts +0 -19
  208. package/dist/plugin/Form/Grid.d.ts +0 -32
  209. package/dist/plugin/Form/HBox.d.ts +0 -73
  210. package/dist/plugin/Form/Image.d.ts +0 -20
  211. package/dist/plugin/Form/List.d.ts +0 -24
  212. package/dist/plugin/Form/Location.d.ts +0 -48
  213. package/dist/plugin/Form/Matrix.d.ts +0 -26
  214. package/dist/plugin/Form/Month.d.ts +0 -16
  215. package/dist/plugin/Form/MonthRange.d.ts +0 -20
  216. package/dist/plugin/Form/Number.d.ts +0 -20
  217. package/dist/plugin/Form/Panel.d.ts +0 -24
  218. package/dist/plugin/Form/Password.d.ts +0 -25
  219. package/dist/plugin/Form/QRCode.d.ts +0 -20
  220. package/dist/plugin/Form/Range.d.ts +0 -19
  221. package/dist/plugin/Form/Rating.d.ts +0 -19
  222. package/dist/plugin/Form/Repeat.d.ts +0 -19
  223. package/dist/plugin/Form/Reset.d.ts +0 -7
  224. package/dist/plugin/Form/RichText.d.ts +0 -19
  225. package/dist/plugin/Form/Service.d.ts +0 -24
  226. package/dist/plugin/Form/SubForm.d.ts +0 -64
  227. package/dist/plugin/Form/Submit.d.ts +0 -6
  228. package/dist/plugin/Form/Table.d.ts +0 -34
  229. package/dist/plugin/Form/Tabs.d.ts +0 -17
  230. package/dist/plugin/Form/Tag.d.ts +0 -21
  231. package/dist/plugin/Form/Text.d.ts +0 -20
  232. package/dist/plugin/Form/Time.d.ts +0 -19
  233. package/dist/plugin/Form/Tree.d.ts +0 -73
  234. package/dist/plugin/Form/Url.d.ts +0 -25
  235. package/dist/plugin/Form/Year.d.ts +0 -16
  236. package/dist/plugin/Switch.d.ts +0 -21
  237. package/dist/src/compat.d.ts +0 -30
  238. package/dist/src/component/AvailableRenderersPanel.d.ts +0 -8
  239. package/dist/src/component/Breadcrumb.d.ts +0 -12
  240. package/dist/src/component/ClassNameControl.d.ts +0 -31
  241. package/dist/src/component/CodeEditor.d.ts +0 -37
  242. package/dist/src/component/CodeEditorPanel.d.ts +0 -12
  243. package/dist/src/component/CommonConfigWrapper.d.ts +0 -6
  244. package/dist/src/component/ContainerWrapper.d.ts +0 -12
  245. package/dist/src/component/Editor.d.ts +0 -60
  246. package/dist/src/component/ErrorRenderer.d.ts +0 -4
  247. package/dist/src/component/HighlightBox.d.ts +0 -22
  248. package/dist/src/component/IFrameBridge.d.ts +0 -32
  249. package/dist/src/component/IFramePreview.d.ts +0 -37
  250. package/dist/src/component/InsertSubRendererPanel.d.ts +0 -11
  251. package/dist/src/component/MiniEditor.d.ts +0 -9
  252. package/dist/src/component/NodeWrapper.d.ts +0 -20
  253. package/dist/src/component/Outline.d.ts +0 -12
  254. package/dist/src/component/Panels.d.ts +0 -17
  255. package/dist/src/component/PopOverForm.d.ts +0 -22
  256. package/dist/src/component/Preview.d.ts +0 -62
  257. package/dist/src/component/RegionHLBox.d.ts +0 -27
  258. package/dist/src/component/RegionWrapper.d.ts +0 -181
  259. package/dist/src/component/RendererThumb.d.ts +0 -22
  260. package/dist/src/component/ScaffoldModal.d.ts +0 -24
  261. package/dist/src/component/SubEditor.d.ts +0 -67
  262. package/dist/src/component/TableViewEditor.d.ts +0 -79
  263. package/dist/src/component/TargetNamePanel.d.ts +0 -7
  264. package/dist/src/component/VRenderer.d.ts +0 -169
  265. package/dist/src/component/schemaTpl.d.ts +0 -4
  266. package/dist/src/dnd/default.d.ts +0 -47
  267. package/dist/src/dnd/index.d.ts +0 -119
  268. package/dist/src/dnd/interface.d.ts +0 -14
  269. package/dist/src/dnd/position-h.d.ts +0 -7
  270. package/dist/src/env.d.ts +0 -5
  271. package/dist/src/icons/index.d.ts +0 -2
  272. package/dist/src/index.d.ts +0 -151
  273. package/dist/src/mocker.d.ts +0 -1
  274. package/dist/src/plugin/Action.d.ts +0 -6
  275. package/dist/src/plugin/Alert.d.ts +0 -19
  276. package/dist/src/plugin/AnchorNav.d.ts +0 -66
  277. package/dist/src/plugin/Audio.d.ts +0 -21
  278. package/dist/src/plugin/AvailableRenderers.d.ts +0 -8
  279. package/dist/src/plugin/Avatar.d.ts +0 -17
  280. package/dist/src/plugin/BasicToolbar.d.ts +0 -11
  281. package/dist/src/plugin/Breadcrumb.d.ts +0 -25
  282. package/dist/src/plugin/Button.d.ts +0 -24
  283. package/dist/src/plugin/ButtonGroup.d.ts +0 -59
  284. package/dist/src/plugin/ButtonToolbar.d.ts +0 -35
  285. package/dist/src/plugin/CRUD.d.ts +0 -144
  286. package/dist/src/plugin/Card.d.ts +0 -55
  287. package/dist/src/plugin/Cards.d.ts +0 -69
  288. package/dist/src/plugin/Carousel.d.ts +0 -38
  289. package/dist/src/plugin/Chart.d.ts +0 -46
  290. package/dist/src/plugin/Code.d.ts +0 -9
  291. package/dist/src/plugin/CodeView.d.ts +0 -18
  292. package/dist/src/plugin/Collapse.d.ts +0 -21
  293. package/dist/src/plugin/Container.d.ts +0 -20
  294. package/dist/src/plugin/Custom.d.ts +0 -23
  295. package/dist/src/plugin/DataDebug.d.ts +0 -20
  296. package/dist/src/plugin/Date.d.ts +0 -19
  297. package/dist/src/plugin/Datetime.d.ts +0 -13
  298. package/dist/src/plugin/Dialog.d.ts +0 -20
  299. package/dist/src/plugin/DiffEditor.d.ts +0 -19
  300. package/dist/src/plugin/Divider.d.ts +0 -14
  301. package/dist/src/plugin/Drawer.d.ts +0 -17
  302. package/dist/src/plugin/DropDownButton.d.ts +0 -41
  303. package/dist/src/plugin/Each.d.ts +0 -35
  304. package/dist/src/plugin/ErrorRenderer.d.ts +0 -6
  305. package/dist/src/plugin/Flex.d.ts +0 -28
  306. package/dist/src/plugin/Form/Array.d.ts +0 -26
  307. package/dist/src/plugin/Form/Button.d.ts +0 -11
  308. package/dist/src/plugin/Form/ButtonGroup.d.ts +0 -21
  309. package/dist/src/plugin/Form/ButtonGroupSelect.d.ts +0 -22
  310. package/dist/src/plugin/Form/ButtonToolbar.d.ts +0 -27
  311. package/dist/src/plugin/Form/ChainedSelect.d.ts +0 -19
  312. package/dist/src/plugin/Form/Checkbox.d.ts +0 -19
  313. package/dist/src/plugin/Form/Checkboxes.d.ts +0 -24
  314. package/dist/src/plugin/Form/City.d.ts +0 -18
  315. package/dist/src/plugin/Form/Color.d.ts +0 -39
  316. package/dist/src/plugin/Form/Combo.d.ts +0 -38
  317. package/dist/src/plugin/Form/ConditionBuilder.d.ts +0 -43
  318. package/dist/src/plugin/Form/Container.d.ts +0 -36
  319. package/dist/src/plugin/Form/Control.d.ts +0 -21
  320. package/dist/src/plugin/Form/Date.d.ts +0 -20
  321. package/dist/src/plugin/Form/DateRange.d.ts +0 -20
  322. package/dist/src/plugin/Form/DateTime.d.ts +0 -19
  323. package/dist/src/plugin/Form/DiffEditor.d.ts +0 -19
  324. package/dist/src/plugin/Form/Editor.d.ts +0 -40
  325. package/dist/src/plugin/Form/Email.d.ts +0 -24
  326. package/dist/src/plugin/Form/FieldSet.d.ts +0 -26
  327. package/dist/src/plugin/Form/File.d.ts +0 -18
  328. package/dist/src/plugin/Form/Form.d.ts +0 -18
  329. package/dist/src/plugin/Form/Formula.d.ts +0 -51
  330. package/dist/src/plugin/Form/Grid.d.ts +0 -32
  331. package/dist/src/plugin/Form/Group.d.ts +0 -25
  332. package/dist/src/plugin/Form/HBox.d.ts +0 -72
  333. package/dist/src/plugin/Form/Hidden.d.ts +0 -24
  334. package/dist/src/plugin/Form/Image.d.ts +0 -19
  335. package/dist/src/plugin/Form/InputArray.d.ts +0 -27
  336. package/dist/src/plugin/Form/InputCity.d.ts +0 -19
  337. package/dist/src/plugin/Form/InputDate.d.ts +0 -20
  338. package/dist/src/plugin/Form/InputDateRange.d.ts +0 -20
  339. package/dist/src/plugin/Form/InputDateTime.d.ts +0 -19
  340. package/dist/src/plugin/Form/InputDateTimeRange.d.ts +0 -20
  341. package/dist/src/plugin/Form/InputEmail.d.ts +0 -25
  342. package/dist/src/plugin/Form/InputFile.d.ts +0 -19
  343. package/dist/src/plugin/Form/InputGroup.d.ts +0 -34
  344. package/dist/src/plugin/Form/InputImage.d.ts +0 -20
  345. package/dist/src/plugin/Form/InputMonth.d.ts +0 -16
  346. package/dist/src/plugin/Form/InputMonthRange.d.ts +0 -20
  347. package/dist/src/plugin/Form/InputNumber.d.ts +0 -20
  348. package/dist/src/plugin/Form/InputPassword.d.ts +0 -25
  349. package/dist/src/plugin/Form/InputQuarter.d.ts +0 -16
  350. package/dist/src/plugin/Form/InputQuarterRange.d.ts +0 -20
  351. package/dist/src/plugin/Form/InputRange.d.ts +0 -19
  352. package/dist/src/plugin/Form/InputRating.d.ts +0 -19
  353. package/dist/src/plugin/Form/InputRepeat.d.ts +0 -19
  354. package/dist/src/plugin/Form/InputRichText.d.ts +0 -19
  355. package/dist/src/plugin/Form/InputSubForm.d.ts +0 -64
  356. package/dist/src/plugin/Form/InputTable.d.ts +0 -40
  357. package/dist/src/plugin/Form/InputTag.d.ts +0 -21
  358. package/dist/src/plugin/Form/InputText.d.ts +0 -20
  359. package/dist/src/plugin/Form/InputTime.d.ts +0 -19
  360. package/dist/src/plugin/Form/InputTree.d.ts +0 -73
  361. package/dist/src/plugin/Form/InputURL.d.ts +0 -25
  362. package/dist/src/plugin/Form/InputYear.d.ts +0 -16
  363. package/dist/src/plugin/Form/Item.d.ts +0 -10
  364. package/dist/src/plugin/Form/List.d.ts +0 -23
  365. package/dist/src/plugin/Form/ListSelect.d.ts +0 -24
  366. package/dist/src/plugin/Form/LocationPicker.d.ts +0 -48
  367. package/dist/src/plugin/Form/Matrix.d.ts +0 -25
  368. package/dist/src/plugin/Form/MatrixCheckboxes.d.ts +0 -26
  369. package/dist/src/plugin/Form/NestedSelect.d.ts +0 -73
  370. package/dist/src/plugin/Form/Number.d.ts +0 -19
  371. package/dist/src/plugin/Form/Panel.d.ts +0 -23
  372. package/dist/src/plugin/Form/Password.d.ts +0 -24
  373. package/dist/src/plugin/Form/Picker.d.ts +0 -26
  374. package/dist/src/plugin/Form/QRCode.d.ts +0 -19
  375. package/dist/src/plugin/Form/Radios.d.ts +0 -24
  376. package/dist/src/plugin/Form/Range.d.ts +0 -18
  377. package/dist/src/plugin/Form/Rating.d.ts +0 -18
  378. package/dist/src/plugin/Form/Repeat.d.ts +0 -18
  379. package/dist/src/plugin/Form/Reset.d.ts +0 -7
  380. package/dist/src/plugin/Form/RichText.d.ts +0 -18
  381. package/dist/src/plugin/Form/Select.d.ts +0 -24
  382. package/dist/src/plugin/Form/Service.d.ts +0 -23
  383. package/dist/src/plugin/Form/Static.d.ts +0 -23
  384. package/dist/src/plugin/Form/SubForm.d.ts +0 -62
  385. package/dist/src/plugin/Form/Submit.d.ts +0 -6
  386. package/dist/src/plugin/Form/Switch.d.ts +0 -20
  387. package/dist/src/plugin/Form/Table.d.ts +0 -33
  388. package/dist/src/plugin/Form/Tabs.d.ts +0 -16
  389. package/dist/src/plugin/Form/TabsTransfer.d.ts +0 -74
  390. package/dist/src/plugin/Form/Tag.d.ts +0 -20
  391. package/dist/src/plugin/Form/Text.d.ts +0 -19
  392. package/dist/src/plugin/Form/Textarea.d.ts +0 -20
  393. package/dist/src/plugin/Form/Time.d.ts +0 -18
  394. package/dist/src/plugin/Form/Transfer.d.ts +0 -68
  395. package/dist/src/plugin/Form/Tree.d.ts +0 -72
  396. package/dist/src/plugin/Form/TreeSelect.d.ts +0 -73
  397. package/dist/src/plugin/Form/UUID.d.ts +0 -23
  398. package/dist/src/plugin/Form/Url.d.ts +0 -24
  399. package/dist/src/plugin/Grid.d.ts +0 -49
  400. package/dist/src/plugin/HBox.d.ts +0 -44
  401. package/dist/src/plugin/IFrame.d.ts +0 -28
  402. package/dist/src/plugin/Image.d.ts +0 -19
  403. package/dist/src/plugin/Images.d.ts +0 -24
  404. package/dist/src/plugin/Json.d.ts +0 -24
  405. package/dist/src/plugin/Link.d.ts +0 -20
  406. package/dist/src/plugin/List.d.ts +0 -53
  407. package/dist/src/plugin/ListItem.d.ts +0 -16
  408. package/dist/src/plugin/Log.d.ts +0 -16
  409. package/dist/src/plugin/Mapping.d.ts +0 -35
  410. package/dist/src/plugin/Markdown.d.ts +0 -19
  411. package/dist/src/plugin/Name.d.ts +0 -8
  412. package/dist/src/plugin/Nav.d.ts +0 -161
  413. package/dist/src/plugin/Operation.d.ts +0 -25
  414. package/dist/src/plugin/Page.d.ts +0 -27
  415. package/dist/src/plugin/Panel.d.ts +0 -17
  416. package/dist/src/plugin/Plain.d.ts +0 -19
  417. package/dist/src/plugin/Progress.d.ts +0 -19
  418. package/dist/src/plugin/Property.d.ts +0 -26
  419. package/dist/src/plugin/QRCode.d.ts +0 -19
  420. package/dist/src/plugin/Reset.d.ts +0 -11
  421. package/dist/src/plugin/Service.d.ts +0 -24
  422. package/dist/src/plugin/Sparkline.d.ts +0 -28
  423. package/dist/src/plugin/Status.d.ts +0 -19
  424. package/dist/src/plugin/Steps.d.ts +0 -43
  425. package/dist/src/plugin/Submit.d.ts +0 -10
  426. package/dist/src/plugin/Switch.d.ts +0 -21
  427. package/dist/src/plugin/Table.d.ts +0 -19
  428. package/dist/src/plugin/TableCell.d.ts +0 -9
  429. package/dist/src/plugin/TableView.d.ts +0 -132
  430. package/dist/src/plugin/Tabs.d.ts +0 -43
  431. package/dist/src/plugin/Tasks.d.ts +0 -41
  432. package/dist/src/plugin/Time.d.ts +0 -13
  433. package/dist/src/plugin/Tpl.d.ts +0 -18
  434. package/dist/src/plugin/Unknown.d.ts +0 -5
  435. package/dist/src/plugin/Video.d.ts +0 -24
  436. package/dist/src/plugin/WebComponent.d.ts +0 -47
  437. package/dist/src/plugin/Wizard.d.ts +0 -40
  438. package/dist/src/plugin/Wrapper.d.ts +0 -20
  439. package/dist/src/plugin.d.ts +0 -560
  440. package/dist/src/store/editor.d.ts +0 -891
  441. package/dist/src/store/node.d.ts +0 -247
  442. package/dist/src/util.d.ts +0 -62
  443. package/rollup.config.js +0 -24
@@ -1,560 +0,0 @@
1
- /**
2
- * @file 定义插件的 interface,以及提供一个 BasePlugin 基类,把一些通用的方法放在这。
3
- */
4
- import { BaseSchema } from 'amis';
5
- import { MenuDivider, MenuItem } from 'amis/lib/components/ContextMenu';
6
- import { RendererConfig } from 'amis/lib/factory';
7
- import { RegionWrapperProps } from './component/RegionWrapper';
8
- import { EditorManager } from './manager';
9
- import { EditorStoreType } from './store/editor';
10
- import { EditorNodeType } from './store/node';
11
- import { DNDModeInterface } from './dnd/interface';
12
- import { EditorDNDManager } from './dnd';
13
- import React from 'react';
14
- import { DiffChange } from './util';
15
- /**
16
- * 区域的定义,容器渲染器都需要定义区域信息。
17
- */
18
- export interface RegionConfig {
19
- /**
20
- * 简单情况,如果区域直接用的 render('region', subSchema)
21
- * 这种只需要配置 key 就能简单插入 Region 节点。
22
- */
23
- key: string;
24
- /**
25
- * 区域用来显示的名字。
26
- */
27
- label: string;
28
- /**
29
- * 区域占位字符,用于提示
30
- */
31
- placeholder?: string;
32
- /**
33
- * 对于复杂的控件需要用到这个配置。
34
- * 如果配置了,则遍历 react dom 直到目标节点调换成 Region 节点
35
- *
36
- * 如果没有配置这个,但是又配置了 renderMethod 方法,
37
- * 那就直接将 renderMethod 里面返回的 react dom 直接包一层 Region
38
- */
39
- matchRegion?: (elem: JSX.Element | undefined | null, component: JSX.Element) => boolean;
40
- /**
41
- * 指定要覆盖哪个方法。
42
- */
43
- renderMethod?: string;
44
- /**
45
- * 通常是hack 当前渲染器,单有时候当前渲染器其实是组合的别的渲染器。
46
- */
47
- rendererName?: string;
48
- /**
49
- * 当配置 renderMethod 的时候会自动把 Region 插入进去。
50
- * 默认是 outter 模式,有时候可能需要配置成 inner,
51
- * 比如 renderMethod 为 render 的时候。
52
- */
53
- insertPosition?: 'outter' | 'inner';
54
- /**
55
- * 是否为可选容器,如果是可选容器,不会强制自动创建成员
56
- */
57
- optional?: boolean;
58
- /**
59
- * 有时候有些包括是需要其他条件的,所以要自己写包裹逻辑。
60
- * 比如 panel 里面的 renderBody
61
- */
62
- renderMethodOverride?: (regions: Array<RegionConfig>, insertRegion: (component: JSX.Element, dom: JSX.Element, regions: Array<RegionConfig>, info: RendererInfo, manager: EditorManager) => JSX.Element) => Function;
63
- /**
64
- * 偏好什么类型的组件?比如表单里面,controls 容器偏向表单项。
65
- */
66
- preferTag?: string;
67
- /**
68
- * 用来指定用什么组件包裹,默认是 RegionWrapper
69
- */
70
- wrapper?: React.ComponentType<RegionWrapperProps>;
71
- /**
72
- * 返回需要添加 data-region 的 dom 节点。
73
- */
74
- wrapperResolve?: (dom: HTMLElement) => HTMLElement;
75
- /**
76
- * 当拖入到这个容器时,是否需要修改一下 ghost 结构?
77
- */
78
- modifyGhost?: (ghost: HTMLElement, schema?: any) => void;
79
- /**
80
- * dnd 拖拽模式。比如 table 那种需要配置成 position-h
81
- */
82
- dndMode?: 'default' | 'position-h' | 'position-v' | (new (dnd: EditorDNDManager) => DNDModeInterface);
83
- /**
84
- * 可以用来判断是否允许拖入当前节点。
85
- */
86
- accept?: (json: any) => boolean;
87
- }
88
- export interface VRendererConfig {
89
- /**
90
- * 配置了这些会自动创建编辑面板。
91
- */
92
- panelIcon?: string;
93
- panelTitle?: string;
94
- /**
95
- * @deprecated 用 panelBody 代替
96
- */
97
- panelControls?: Array<any>;
98
- panelDefinitions?: any;
99
- /**
100
- * @deprecated 用panelBodyCreator 代替
101
- */
102
- panelControlsCreator?: (context: BaseEventContext) => Array<any>;
103
- panelBody?: Array<any>;
104
- panelBodyCreator?: (context: BaseEventContext) => Array<any>;
105
- /**
106
- * 配置了,要是不在 overides 里面使用也是没用的。
107
- */
108
- regions?: {
109
- [propName: string]: RegionConfig;
110
- };
111
- }
112
- export interface RendererScaffoldInfo {
113
- /**
114
- * 组件名称
115
- */
116
- name: string;
117
- icon?: string;
118
- description?: string;
119
- docLink?: string;
120
- previewSchema?: any;
121
- tags?: string | Array<string>;
122
- type?: string;
123
- scaffold?: any;
124
- }
125
- /**
126
- * 渲染器信息。
127
- */
128
- export interface RendererInfo extends RendererScaffoldInfo {
129
- scaffolds?: Array<Partial<RendererScaffoldInfo>>;
130
- /**
131
- * json schema 协议
132
- */
133
- $schema?: string;
134
- /**
135
- * 配置区域。
136
- */
137
- regions?: Array<RegionConfig>;
138
- /**
139
- * 哪些容器属性需要自动转成数组的。如果不配置默认就从 regions 里面读取。
140
- */
141
- patchContainers?: Array<string>;
142
- /**
143
- * 覆盖的目标渲染器名称
144
- */
145
- overrideTargetRendererName?: string;
146
- /**
147
- * 覆写某些方法,一般用来插入虚拟的渲染器编辑器。
148
- */
149
- overrides?: {
150
- [propName: string]: Function;
151
- };
152
- /**
153
- * 虚拟渲染器的配置项,有时候需要给那些并不是渲染器的组件添加点选编辑功能。
154
- * 比如: Tabs 下面的 Tab, 这个并不是个渲染器,但是需要可以点选修改内容。
155
- */
156
- vRendererConfig?: VRendererConfig;
157
- /**
158
- * 默认为 BaseWrapper, 容器类的指定为 BaseContainerWrapper 或者再实现一个
159
- * 暂时没有需要配置的所以注释掉。
160
- * wrapper?: React.ComponentType<NodeWrapperProps>;
161
- *
162
- * 返回哪些 dom 节点,需要自动加上 data-editor-id 属性
163
- * 目前只有 TableCell 里面用到了,就它需要同时给某一列下所有 td 都加上那个属性。
164
- */
165
- wrapperResolve?: (dom: HTMLElement) => HTMLElement | Array<HTMLElement>;
166
- /**
167
- * 默认下发哪些属性,如果要动态下发,请使用 filterProps
168
- */
169
- wrapperProps?: any;
170
- /**
171
- * 修改一些属性,一般用来干掉 $$id
172
- * 这样它的孩子节点就不能直接点选编辑了,比如 Combo。
173
- */
174
- filterProps?: (props: any, node: EditorNodeType) => any;
175
- /**
176
- * 有些没有视图的组件,可以自己输出点内容,否则没办法点选编辑。
177
- */
178
- renderRenderer?: (props: any, info: RendererInfo) => JSX.Element;
179
- /**
180
- * 是否有多重身份?
181
- * 比如 CRUD 即是 CRUD 又可能是 Table
182
- *
183
- * 表格的列,即是表格列,也可能是其他文本框。
184
- *
185
- * 配置了这个后会自动添加多个 panel 面板来编辑。
186
- */
187
- multifactor?: boolean;
188
- /**
189
- * 右键的时候是否出现重新构建,靠这个。
190
- */
191
- scaffoldForm?: ScaffoldForm;
192
- id: string;
193
- plugin: PluginInterface;
194
- extraPlugin?: PluginInterface;
195
- renderer: RendererConfig;
196
- schemaPath: string;
197
- editable?: boolean;
198
- removable?: boolean;
199
- draggable?: boolean;
200
- movable?: boolean;
201
- replaceable?: boolean;
202
- duplicatable?: boolean;
203
- memberImmutable?: boolean | Array<string>;
204
- typeMutable?: boolean;
205
- hostId?: string;
206
- memberIndex?: number;
207
- }
208
- export declare type BasicRendererInfo = Omit<RendererInfo, 'id' | 'plugin' | 'renderer' | 'schemaPath'>;
209
- export interface PopOverForm {
210
- title?: string;
211
- /**
212
- * 脚手架配置项。
213
- */
214
- body: Array<any>;
215
- /**
216
- * @deprecated 改用 body 代替
217
- */
218
- controls?: Array<any>;
219
- }
220
- export interface ScaffoldForm extends PopOverForm {
221
- mode?: 'normal' | 'horizontal' | 'inline';
222
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
223
- initApi?: any;
224
- api?: any;
225
- /**
226
- * 整体验证脚手架配置,如果有错误返回错误对象。
227
- * key 是配置的字段名。
228
- * value 是具体错误信息。
229
- */
230
- validate?: (values: any) => void | {
231
- [propName: string]: string;
232
- } | Promise<void | {
233
- [propName: string]: string;
234
- }>;
235
- /**
236
- * schema 配置转脚手架配置
237
- */
238
- pipeIn?: (value: any) => any;
239
- /**
240
- * 脚手架配置转 schema 配置。
241
- */
242
- pipeOut?: (value: any) => any;
243
- /**
244
- * 是否允许重新构建;
245
- */
246
- canRebuild?: boolean;
247
- }
248
- /**
249
- * 子渲染器信息
250
- */
251
- export interface SubRendererInfo extends RendererScaffoldInfo {
252
- /**
253
- * 首次拖入的时候可以用来配置个表单。
254
- */
255
- scaffoldForm?: ScaffoldForm;
256
- plugin: PluginInterface;
257
- parent: RendererInfo;
258
- id: string;
259
- order: number;
260
- }
261
- export declare type BasicSubRenderInfo = Omit<SubRendererInfo, 'plugin' | 'parent' | 'id' | 'order'> & Partial<Pick<SubRendererInfo, 'order'>>;
262
- /**
263
- * 工具按钮信息。
264
- */
265
- export interface ToolbarItem {
266
- label?: string;
267
- id?: string;
268
- order: number;
269
- level?: 'primary' | 'secondary' | 'special';
270
- className?: string;
271
- draggable?: boolean;
272
- onDragStart?: (e: React.DragEvent) => void;
273
- icon: string;
274
- onClick?: (e: React.MouseEvent) => void;
275
- tooltip?: string;
276
- placement?: 'top' | 'bottom' | 'right' | 'left';
277
- }
278
- export declare type BasicToolbarItem = Partial<ToolbarItem> & Pick<ToolbarItem, 'icon'>;
279
- export declare type ContextMenuItem = MenuItem | MenuDivider;
280
- /**
281
- * 面板的属性定义
282
- */
283
- export interface PanelProps {
284
- id?: string;
285
- info?: RendererInfo;
286
- path?: string;
287
- value: BaseSchema;
288
- onChange: (value: BaseSchema, diff?: Array<DiffChange>) => void;
289
- store: EditorStoreType;
290
- manager: EditorManager;
291
- popOverContainer?: () => HTMLElement | void;
292
- }
293
- /**
294
- * 面板信息定义
295
- */
296
- export interface PanelItem {
297
- nodeId?: string;
298
- key: string;
299
- icon: string;
300
- title: string;
301
- component?: React.ComponentType<PanelProps>;
302
- order: number;
303
- position?: 'left' | 'right';
304
- render?: (props: PanelProps) => JSX.Element;
305
- }
306
- export declare type BasicPanelItem = Omit<PanelItem, 'order'> & Partial<Pick<PanelItem, 'order'>>;
307
- export interface EventContext {
308
- data?: any;
309
- [propName: string]: any;
310
- }
311
- /**
312
- * 事件上下文
313
- */
314
- export interface BaseEventContext extends EventContext {
315
- node: EditorNodeType;
316
- id: string;
317
- info: RendererInfo;
318
- path: string;
319
- schema: any;
320
- schemaPath: string;
321
- }
322
- export interface RendererInfoResolveEventContext extends EventContext {
323
- renderer: RendererConfig;
324
- path: string;
325
- schema: any;
326
- schemaPath: string;
327
- data?: RendererInfo;
328
- }
329
- export interface RendererJSONSchemaResolveEventContext extends BaseEventContext {
330
- data: string;
331
- }
332
- /**
333
- * 右键菜单事件的上下文。
334
- */
335
- export interface ContextMenuEventContext extends BaseEventContext {
336
- region: string;
337
- selections: Array<BaseEventContext>;
338
- data: Array<ContextMenuItem>;
339
- }
340
- export interface SelectionEventContext extends BaseEventContext {
341
- selections: Array<BaseEventContext>;
342
- data: Array<string>;
343
- }
344
- export interface RendererEventContext extends BaseEventContext {
345
- region?: string;
346
- }
347
- export interface ActiveEventContext extends Partial<BaseEventContext> {
348
- active?: boolean;
349
- }
350
- export interface DeleteEventContext extends BaseEventContext {
351
- data?: Array<string>;
352
- }
353
- /**
354
- * 插入节点的事件上下文信息
355
- */
356
- export interface InsertEventContext extends BaseEventContext {
357
- region: string;
358
- beforeId?: string;
359
- index: number;
360
- data: any;
361
- subRenderer?: SubRendererInfo;
362
- dragInfo?: {
363
- id: string;
364
- type: string;
365
- data: any;
366
- };
367
- }
368
- export interface ReplaceEventContext extends BaseEventContext {
369
- data: any;
370
- subRenderer?: SubRendererInfo;
371
- region?: string;
372
- }
373
- export interface MoveEventContext extends BaseEventContext {
374
- region: string;
375
- sourceId: string;
376
- beforeId?: string;
377
- direction?: 'up' | 'down';
378
- }
379
- /**
380
- * 更新节点的事件上下文
381
- */
382
- export interface ChangeEventContext extends BaseEventContext {
383
- value: any;
384
- readonly diff: Array<DiffChange>;
385
- }
386
- export interface DragEventContext extends EventContext {
387
- mode: 'move' | 'copy';
388
- sourceType: 'schema' | 'subrenderer' | string;
389
- sourceId: string;
390
- data: any;
391
- targetId?: string;
392
- targetRegion?: string;
393
- }
394
- export interface BuildPanelEventContext extends BaseEventContext {
395
- data: Array<BasicPanelItem>;
396
- selections: Array<BaseEventContext>;
397
- }
398
- export interface PreventClickEventContext extends EventContext {
399
- data: MouseEvent;
400
- }
401
- export interface WidthMoveEventContext extends EventContext {
402
- data: Object;
403
- nativeEvent: MouseEvent;
404
- x: number;
405
- startX: number;
406
- dx?: number;
407
- dom: HTMLElement;
408
- resizer: HTMLElement;
409
- node: EditorNodeType;
410
- }
411
- /**
412
- * 将事件上下文转成事件对象。
413
- */
414
- export declare type PluginEvent<T, P = any> = {
415
- context: T;
416
- type: string;
417
- preventDefault: () => void;
418
- stopPropagation: () => void;
419
- setData: (data: P) => void;
420
- prevented?: boolean;
421
- stoped?: boolean;
422
- data?: P;
423
- };
424
- export declare type PluginEventFn = (e: PluginEvent<EventContext>) => false | void;
425
- /**
426
- * 创建事件。
427
- * @param type
428
- * @param context
429
- */
430
- export declare function createEvent<T extends EventContext>(type: string, context: T): PluginEvent<T>;
431
- export interface PluginEventListener {
432
- onActive?: (event: PluginEvent<ActiveEventContext>) => void;
433
- /**
434
- * 事件,当有配置项插入前调用。通过 event.preventDefault() 可以干预。
435
- */
436
- beforeInsert?: (event: PluginEvent<InsertEventContext>) => false | void;
437
- afterInsert?: (event: PluginEvent<InsertEventContext>) => void;
438
- /**
439
- * 面板里面编辑修改的事件。
440
- */
441
- beforeUpdate?: (event: PluginEvent<ChangeEventContext>) => false | void;
442
- afterUpdate?: (event: PluginEvent<ChangeEventContext>) => void;
443
- /**
444
- * 更新渲染器,或者右键粘贴配置。
445
- */
446
- beforeReplace?: (event: PluginEvent<ReplaceEventContext>) => false | void;
447
- afterReplace?: (event: PluginEvent<ReplaceEventContext>) => void;
448
- /**
449
- * 移动节点的时候触发,包括上移,下移
450
- */
451
- beforeMove?: (event: PluginEvent<MoveEventContext>) => false | void;
452
- aftterMove?: (event: PluginEvent<MoveEventContext>) => void;
453
- /**
454
- * 删除的时候触发
455
- */
456
- beforeDelete?: (event: PluginEvent<DeleteEventContext>) => false | void;
457
- afterDelete?: (event: PluginEvent<DeleteEventContext>) => void;
458
- beforeResolveEditorInfo?: (event: PluginEvent<RendererInfoResolveEventContext>) => false | void;
459
- afterResolveEditorInfo?: (event: PluginEvent<RendererInfoResolveEventContext>) => void;
460
- beforeResolveJsonSchema?: (event: PluginEvent<RendererJSONSchemaResolveEventContext>) => false | void;
461
- afterResolveJsonSchema?: (event: PluginEvent<RendererJSONSchemaResolveEventContext>) => void;
462
- onDndAccept?: (event: PluginEvent<DragEventContext>) => false | void;
463
- onBuildPanels?: (event: PluginEvent<BuildPanelEventContext>) => void;
464
- onBuildContextMenus?: (event: PluginEvent<ContextMenuEventContext>) => void;
465
- onSelectionChange?: (event: PluginEvent<SelectionEventContext>) => void;
466
- onPreventClick?: (event: PluginEvent<PreventClickEventContext>) => false | void;
467
- onWidthChangeStart?: (event: PluginEvent<WidthMoveEventContext, {
468
- onMove(e: MouseEvent): void;
469
- onEnd(e: MouseEvent): void;
470
- }>) => void;
471
- }
472
- /**
473
- * 插件的 interface 定义
474
- */
475
- export interface PluginInterface extends Partial<BasicRendererInfo>, Partial<BasicSubRenderInfo>, PluginEventListener {
476
- readonly manager: EditorManager;
477
- order?: number;
478
- /**
479
- * 渲染器的名字,关联后不用自己实现 getRendererInfo 了。
480
- */
481
- rendererName?: string;
482
- /**
483
- * 默认的配置面板信息
484
- */
485
- panelIcon?: string;
486
- panelTitle?: string;
487
- /**
488
- * @deprecated 用 panelBody
489
- */
490
- panelControls?: Array<any>;
491
- panelBody?: Array<any>;
492
- panelDefinitions?: any;
493
- panelApi?: any;
494
- panelSubmitOnChange?: boolean;
495
- /**
496
- * @deprecated 用 panelBodyCreator
497
- */
498
- panelControlsCreator?: (context: BaseEventContext) => Array<any>;
499
- panelBodyCreator?: (context: BaseEventContext) => Array<any>;
500
- popOverBody?: Array<any>;
501
- /**
502
- * 返回渲染器信息。不是每个插件都需要。
503
- */
504
- getRendererInfo?: (context: RendererInfoResolveEventContext) => BasicRendererInfo | void;
505
- /**
506
- * 生成节点的 JSON Schema 的 uri 地址。
507
- */
508
- buildJSONSchema?: (context: RendererJSONSchemaResolveEventContext) => void | string;
509
- /**
510
- * 构建右上角功能按钮集合
511
- */
512
- buildEditorToolbar?: (context: BaseEventContext, toolbars: Array<BasicToolbarItem>) => void;
513
- /**
514
- * 构建右键菜单项
515
- */
516
- buildEditorContextMenu?: (context: ContextMenuEventContext, menus: Array<ContextMenuItem>) => void;
517
- /**
518
- * 构建编辑器面板。
519
- */
520
- buildEditorPanel?: (context: BuildPanelEventContext, panels: Array<BasicPanelItem>) => void;
521
- /**
522
- * 构建子渲染器信息集合。
523
- */
524
- buildSubRenderers?: (context: RendererEventContext, subRenderers: Array<SubRendererInfo>, renderers: Array<RendererConfig>) => BasicSubRenderInfo | Array<BasicSubRenderInfo> | void;
525
- markDom?: (dom: HTMLElement | Array<HTMLElement>, props: any) => void;
526
- }
527
- /**
528
- * 基类,所有插件都继承这个好了,可以少写些逻辑。
529
- */
530
- export declare abstract class BasePlugin implements PluginInterface {
531
- readonly manager: EditorManager;
532
- constructor(manager: EditorManager);
533
- /**
534
- * 如果配置里面有 rendererName 自动返回渲染器信息。
535
- * @param renderer
536
- */
537
- getRendererInfo({ renderer, schema }: RendererInfoResolveEventContext): BasicRendererInfo | void;
538
- /**
539
- * 配置了 panelControls 自动生成配置面板
540
- * @param context
541
- * @param panels
542
- */
543
- buildEditorPanel(context: BuildPanelEventContext, panels: Array<BasicPanelItem>): void;
544
- /**
545
- * 默认什么组件都加入的子组件里面,子类里面可以复写这个改变行为。
546
- * @param context
547
- * @param subRenderers
548
- */
549
- buildSubRenderers(context: RendererEventContext, subRenderers: Array<SubRendererInfo>): BasicSubRenderInfo | Array<BasicSubRenderInfo> | void;
550
- buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
551
- renderPlaceholder(text: string, key?: any): React.DetailedReactHTMLElement<{
552
- key: any;
553
- className: string;
554
- children: React.DetailedReactHTMLElement<{
555
- className: string;
556
- children: string;
557
- }, HTMLElement>;
558
- }, HTMLElement>;
559
- getPlugin(rendererNameOrKlass: string | typeof BasePlugin): PluginInterface | undefined;
560
- }