amis-editor 4.1.0-beta.2 → 4.1.0-beta.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. package/dist/component/Breadcrumb.d.ts +23 -2
  2. package/dist/component/Editor.d.ts +19 -0
  3. package/dist/component/Panel/RenderersPanel.d.ts +1 -2
  4. package/dist/component/RegionWrapper.d.ts +4 -0
  5. package/dist/component/VRenderer.d.ts +4 -0
  6. package/dist/component/base/SearchCustomRendererPanel.d.ts +15 -0
  7. package/dist/component/base/SearchPanel.d.ts +83 -0
  8. package/dist/component/base/SearchRendererPanel.d.ts +2 -42
  9. package/dist/exports.min.js +1 -1
  10. package/dist/index.d.ts +4 -1
  11. package/dist/index.min.js +1 -1
  12. package/dist/manager.d.ts +14 -3
  13. package/dist/plugin/Card.d.ts +1 -0
  14. package/dist/plugin/Cards.d.ts +1 -0
  15. package/dist/plugin/Carousel.d.ts +1 -0
  16. package/dist/plugin/Chart.d.ts +1 -0
  17. package/dist/plugin/Collapse.d.ts +1 -0
  18. package/dist/plugin/Custom.d.ts +3 -0
  19. package/dist/plugin/CustomRegion.d.ts +43 -0
  20. package/dist/plugin/Flex.d.ts +1 -0
  21. package/dist/plugin/Form/Control.d.ts +1 -0
  22. package/dist/plugin/Form/Form.d.ts +19 -3
  23. package/dist/plugin/Form/InputURL.d.ts +1 -0
  24. package/dist/plugin/Form/Switch.d.ts +2 -0
  25. package/dist/plugin/Grid.d.ts +1 -0
  26. package/dist/plugin/HBox.d.ts +1 -0
  27. package/dist/plugin/Json.d.ts +1 -0
  28. package/dist/plugin/List.d.ts +1 -0
  29. package/dist/plugin/Mapping.d.ts +1 -0
  30. package/dist/plugin/Markdown.d.ts +1 -0
  31. package/dist/plugin/Nav.d.ts +1 -0
  32. package/dist/plugin/Panel/Outline.d.ts +8 -0
  33. package/dist/plugin/Progress.d.ts +1 -0
  34. package/dist/plugin/QRCode.d.ts +1 -0
  35. package/dist/plugin/Reset.d.ts +0 -1
  36. package/dist/plugin/Service.d.ts +1 -0
  37. package/dist/plugin/Sparkline.d.ts +1 -0
  38. package/dist/plugin/Status.d.ts +1 -0
  39. package/dist/plugin/Steps.d.ts +1 -0
  40. package/dist/plugin/Submit.d.ts +0 -1
  41. package/dist/plugin/TableView.d.ts +1 -0
  42. package/dist/plugin/Tasks.d.ts +1 -0
  43. package/dist/plugin/TooltipWrapper.d.ts +1 -0
  44. package/dist/plugin/Video.d.ts +1 -0
  45. package/dist/plugin/WebComponent.d.ts +1 -0
  46. package/dist/plugin/Wizard.d.ts +11 -2
  47. package/dist/plugin/Wrapper.d.ts +1 -0
  48. package/dist/plugin.d.ts +2 -2
  49. package/dist/store/editor.d.ts +20 -2
  50. package/dist/store/node.d.ts +6 -0
  51. package/dist/style.css +1 -1
  52. package/dist/util.d.ts +7 -2
  53. package/package.json +6 -3
  54. package/src/component/schemaTpl.tsx +2157 -0
  55. package/src/plugin/Alert.tsx +87 -0
  56. package/src/plugin/AnchorNav.tsx +233 -0
  57. package/src/plugin/Audio.tsx +161 -0
  58. package/src/plugin/Avatar.tsx +77 -0
  59. package/src/plugin/Breadcrumb.tsx +107 -0
  60. package/src/plugin/Button.tsx +283 -0
  61. package/src/plugin/ButtonGroup.tsx +88 -0
  62. package/src/plugin/ButtonToolbar.tsx +89 -0
  63. package/src/plugin/CRUD.tsx +1835 -0
  64. package/src/plugin/Card.tsx +290 -0
  65. package/src/plugin/Cards.tsx +315 -0
  66. package/src/plugin/Carousel.tsx +386 -0
  67. package/src/plugin/Chart.tsx +218 -0
  68. package/src/plugin/CodeView.tsx +60 -0
  69. package/src/plugin/Collapse.tsx +143 -0
  70. package/src/plugin/CollapseGroup.tsx +167 -0
  71. package/src/plugin/Container.tsx +44 -0
  72. package/src/plugin/Custom.tsx +128 -0
  73. package/src/plugin/CustomRegion.tsx +150 -0
  74. package/src/plugin/Date.tsx +81 -0
  75. package/src/plugin/Datetime.tsx +75 -0
  76. package/src/plugin/Dialog.tsx +178 -0
  77. package/src/plugin/Divider.tsx +36 -0
  78. package/src/plugin/Drawer.tsx +217 -0
  79. package/src/plugin/DropDownButton.tsx +234 -0
  80. package/src/plugin/Each.tsx +152 -0
  81. package/src/plugin/ErrorRenderer.tsx +15 -0
  82. package/src/plugin/Flex.tsx +156 -0
  83. package/src/plugin/Form/ButtonGroupSelect.tsx +86 -0
  84. package/src/plugin/Form/ButtonToolbar.tsx +121 -0
  85. package/src/plugin/Form/ChainedSelect.tsx +70 -0
  86. package/src/plugin/Form/Checkbox.tsx +87 -0
  87. package/src/plugin/Form/Checkboxes.tsx +167 -0
  88. package/src/plugin/Form/CodeEditor.tsx +91 -0
  89. package/src/plugin/Form/Combo.tsx +582 -0
  90. package/src/plugin/Form/ConditionBuilder.tsx +324 -0
  91. package/src/plugin/Form/Control.tsx +139 -0
  92. package/src/plugin/Form/DiffEditor.tsx +117 -0
  93. package/src/plugin/Form/FieldSet.tsx +175 -0
  94. package/src/plugin/Form/Form.tsx +692 -0
  95. package/src/plugin/Form/Formula.tsx +91 -0
  96. package/src/plugin/Form/Group.tsx +300 -0
  97. package/src/plugin/Form/Hidden.tsx +56 -0
  98. package/src/plugin/Form/InputArray.tsx +228 -0
  99. package/src/plugin/Form/InputCity.tsx +93 -0
  100. package/src/plugin/Form/InputColor.tsx +123 -0
  101. package/src/plugin/Form/InputDate.tsx +175 -0
  102. package/src/plugin/Form/InputDateRange.tsx +225 -0
  103. package/src/plugin/Form/InputDateTime.tsx +183 -0
  104. package/src/plugin/Form/InputDateTimeRange.tsx +221 -0
  105. package/src/plugin/Form/InputEmail.tsx +33 -0
  106. package/src/plugin/Form/InputExcel.tsx +85 -0
  107. package/src/plugin/Form/InputFile.tsx +228 -0
  108. package/src/plugin/Form/InputGroup.tsx +105 -0
  109. package/src/plugin/Form/InputImage.tsx +277 -0
  110. package/src/plugin/Form/InputKV.tsx +72 -0
  111. package/src/plugin/Form/InputMonth.tsx +35 -0
  112. package/src/plugin/Form/InputMonthRange.tsx +195 -0
  113. package/src/plugin/Form/InputNumber.tsx +97 -0
  114. package/src/plugin/Form/InputPassword.tsx +33 -0
  115. package/src/plugin/Form/InputQuarter.tsx +35 -0
  116. package/src/plugin/Form/InputQuarterRange.tsx +195 -0
  117. package/src/plugin/Form/InputRange.tsx +121 -0
  118. package/src/plugin/Form/InputRating.tsx +78 -0
  119. package/src/plugin/Form/InputRepeat.tsx +69 -0
  120. package/src/plugin/Form/InputRichText.tsx +197 -0
  121. package/src/plugin/Form/InputSubForm.tsx +198 -0
  122. package/src/plugin/Form/InputTable.tsx +434 -0
  123. package/src/plugin/Form/InputTag.tsx +81 -0
  124. package/src/plugin/Form/InputText.tsx +186 -0
  125. package/src/plugin/Form/InputTime.tsx +95 -0
  126. package/src/plugin/Form/InputTree.tsx +240 -0
  127. package/src/plugin/Form/InputURL.tsx +34 -0
  128. package/src/plugin/Form/InputYear.tsx +35 -0
  129. package/src/plugin/Form/Item.tsx +327 -0
  130. package/src/plugin/Form/ListSelect.tsx +84 -0
  131. package/src/plugin/Form/LocationPicker.tsx +75 -0
  132. package/src/plugin/Form/MatrixCheckboxes.tsx +147 -0
  133. package/src/plugin/Form/NestedSelect.tsx +222 -0
  134. package/src/plugin/Form/Picker.tsx +217 -0
  135. package/src/plugin/Form/Radios.tsx +130 -0
  136. package/src/plugin/Form/Select.tsx +233 -0
  137. package/src/plugin/Form/Static.tsx +335 -0
  138. package/src/plugin/Form/Switch.tsx +118 -0
  139. package/src/plugin/Form/TabsTransfer.tsx +270 -0
  140. package/src/plugin/Form/Textarea.tsx +94 -0
  141. package/src/plugin/Form/Transfer.tsx +379 -0
  142. package/src/plugin/Form/TreeSelect.tsx +263 -0
  143. package/src/plugin/Form/UUID.tsx +48 -0
  144. package/src/plugin/Grid.tsx +799 -0
  145. package/src/plugin/HBox.tsx +727 -0
  146. package/src/plugin/IFrame.tsx +72 -0
  147. package/src/plugin/Image.tsx +318 -0
  148. package/src/plugin/Images.tsx +238 -0
  149. package/src/plugin/Json.tsx +76 -0
  150. package/src/plugin/Link.tsx +95 -0
  151. package/src/plugin/List.tsx +278 -0
  152. package/src/plugin/ListItem.tsx +233 -0
  153. package/src/plugin/Log.tsx +52 -0
  154. package/src/plugin/Mapping.tsx +156 -0
  155. package/src/plugin/Markdown.tsx +47 -0
  156. package/src/plugin/Nav.tsx +186 -0
  157. package/src/plugin/Operation.tsx +97 -0
  158. package/src/plugin/Others/Action.tsx +428 -0
  159. package/src/plugin/Others/BasicToolbar.tsx +591 -0
  160. package/src/plugin/Others/DataDebug.tsx +134 -0
  161. package/src/plugin/Others/TableCell.tsx +480 -0
  162. package/src/plugin/Others/Unknown.tsx +37 -0
  163. package/src/plugin/Page.tsx +308 -0
  164. package/src/plugin/Panel/AvailableRenderers.tsx +41 -0
  165. package/src/plugin/Panel/Code.tsx +44 -0
  166. package/src/plugin/Panel/Name.tsx +26 -0
  167. package/src/plugin/Panel/Outline.tsx +40 -0
  168. package/src/plugin/Panel.tsx +243 -0
  169. package/src/plugin/Plain.tsx +91 -0
  170. package/src/plugin/Progress.tsx +132 -0
  171. package/src/plugin/Property.tsx +139 -0
  172. package/src/plugin/QRCode.tsx +98 -0
  173. package/src/plugin/Reset.tsx +23 -0
  174. package/src/plugin/Service.tsx +167 -0
  175. package/src/plugin/Sparkline.tsx +40 -0
  176. package/src/plugin/Status.tsx +78 -0
  177. package/src/plugin/Steps.tsx +140 -0
  178. package/src/plugin/Submit.tsx +23 -0
  179. package/src/plugin/Table.tsx +440 -0
  180. package/src/plugin/TableView.tsx +711 -0
  181. package/src/plugin/Tabs.tsx +364 -0
  182. package/src/plugin/Tasks.tsx +276 -0
  183. package/src/plugin/Time.tsx +75 -0
  184. package/src/plugin/TooltipWrapper.tsx +193 -0
  185. package/src/plugin/Tpl.tsx +162 -0
  186. package/src/plugin/Video.tsx +160 -0
  187. package/src/plugin/WebComponent.tsx +56 -0
  188. package/src/plugin/Wizard.tsx +743 -0
  189. package/src/plugin/Wrapper.tsx +107 -0
  190. package/src/plugin.ts +1046 -0
  191. package/dist/150a58f3318ca7541ed9.png +0 -0
  192. package/dist/471adb97c322b226e589.png +0 -0
  193. package/dist/4de5f42360bc5946c3c2.png +0 -0
  194. package/dist/4e9968bba3855f088fed.png +0 -0
  195. package/dist/7f09c38ebc687fea847a.png +0 -0
  196. package/dist/c94073576487510314ea.png +0 -0
package/dist/manager.d.ts CHANGED
@@ -80,6 +80,8 @@ export declare class EditorManager {
80
80
  readonly clickable: boolean;
81
81
  readonly draggable: boolean;
82
82
  readonly moveable: boolean;
83
+ readonly canMoveUp: boolean;
84
+ readonly canMoveDown: boolean;
83
85
  readonly removable: boolean;
84
86
  readonly duplicatable: boolean;
85
87
  readonly replaceable: boolean;
@@ -158,6 +160,8 @@ export declare class EditorManager {
158
160
  readonly clickable: boolean;
159
161
  readonly draggable: boolean;
160
162
  readonly moveable: boolean;
163
+ readonly canMoveUp: boolean;
164
+ readonly canMoveDown: boolean;
161
165
  readonly removable: boolean;
162
166
  readonly duplicatable: boolean;
163
167
  readonly replaceable: boolean;
@@ -255,10 +259,17 @@ export declare class EditorManager {
255
259
  */
256
260
  trigger<T extends EventContext>(type: string, context: T): PluginEvent<T>;
257
261
  /**
258
- * 组件面板中的组件点选添加
259
- * @param rendererId
262
+ * 在当前选中元素插入或追加新的元素
263
+ * @param rendererIdOrSchema
264
+ * 备注:可以根据渲染器ID添加新元素,也可以根据现有schema片段添加新元素
260
265
  */
261
- addElem(rendererId: string): Promise<void>;
266
+ addElem(rendererIdOrSchema: string | Object): Promise<void>;
267
+ /**
268
+ * 在当前选中元素追加新的schema
269
+ * 备注:目前主要用在复制&粘贴快捷功能键中
270
+ * @param rendererSchema
271
+ */
272
+ appendSiblingSchema(rendererSchema: Object): Promise<void>;
262
273
  /**
263
274
  * 给插入面板使用的,将当前选中的节点插入到当前选中的节点容器内。
264
275
  * @param position
@@ -5,6 +5,7 @@ export declare class CardPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class CardsPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class CarouselPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class ChartPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class CollapsePlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -10,12 +10,15 @@ export declare class CustomPlugin extends BasePlugin {
10
10
  description: string;
11
11
  tags: string[];
12
12
  icon: string;
13
+ docLink: string;
13
14
  scaffold: {
14
15
  type: string;
16
+ html: string;
15
17
  onMount: string;
16
18
  };
17
19
  previewSchema: {
18
20
  type: string;
21
+ html: string;
19
22
  onMount: string;
20
23
  };
21
24
  panelTitle: string;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @file 自定义代码
3
+ */
4
+ import { BasePlugin, BasicRendererInfo, RendererInfoResolveEventContext } from '../plugin';
5
+ export declare class CustomPlugin extends BasePlugin {
6
+ rendererName: string;
7
+ $schema: string;
8
+ name: string;
9
+ isBaseComponent: boolean;
10
+ disabledRendererPlugin: boolean;
11
+ description: string;
12
+ docLink: string;
13
+ tags: string[];
14
+ icon: string;
15
+ scaffold: {
16
+ type: string;
17
+ html: string;
18
+ onMount: string;
19
+ body: {
20
+ type: string;
21
+ tpl: string;
22
+ inline: boolean;
23
+ id: string;
24
+ }[];
25
+ };
26
+ previewSchema: {
27
+ type: string;
28
+ html: string;
29
+ onMount: string;
30
+ body: {
31
+ type: string;
32
+ tpl: string;
33
+ inline: boolean;
34
+ id: string;
35
+ }[];
36
+ };
37
+ panelTitle: string;
38
+ panelBody: any[];
39
+ /**
40
+ * 备注: 根据当前custom组件的schema中是否有body元素来启动容器模式,用于实现custom组件实现自定义容器类型
41
+ */
42
+ getRendererInfo(context: RendererInfoResolveEventContext): BasicRendererInfo | void;
43
+ }
@@ -7,6 +7,7 @@ export declare class FlexPlugin extends BasePlugin {
7
7
  isBaseComponent: boolean;
8
8
  icon: string;
9
9
  description: string;
10
+ docLink: string;
10
11
  tags: string[];
11
12
  scaffold: {
12
13
  type: string;
@@ -6,6 +6,7 @@ export declare class ControlPlugin extends BasePlugin {
6
6
  isBaseComponent: boolean;
7
7
  icon: string;
8
8
  description: string;
9
+ docLink: string;
9
10
  tags: string[];
10
11
  scaffold: {
11
12
  type: string;
@@ -1,4 +1,3 @@
1
- import { SchemaObject } from 'amis';
2
1
  import { BasePlugin, ChangeEventContext, BaseEventContext, PluginEvent, RegionConfig, ScaffoldForm } from '../../plugin';
3
2
  export declare class FormPlugin extends BasePlugin {
4
3
  rendererName: string;
@@ -10,8 +9,25 @@ export declare class FormPlugin extends BasePlugin {
10
9
  docLink: string;
11
10
  tags: string[];
12
11
  icon: string;
13
- scaffold: SchemaObject;
14
- previewSchema: SchemaObject;
12
+ scaffold: {
13
+ type: string;
14
+ title: string;
15
+ body: {
16
+ label: string;
17
+ type: string;
18
+ name: string;
19
+ }[];
20
+ };
21
+ previewSchema: {
22
+ type: string;
23
+ panelClassName: string;
24
+ mode: string;
25
+ body: {
26
+ label: string;
27
+ name: string;
28
+ type: string;
29
+ }[];
30
+ };
15
31
  scaffoldForm: ScaffoldForm;
16
32
  regions: Array<RegionConfig>;
17
33
  panelTitle: string;
@@ -6,6 +6,7 @@ export declare class URLControlPlugin extends TextControlPlugin {
6
6
  isBaseComponent: boolean;
7
7
  icon: string;
8
8
  description: string;
9
+ docLink: string;
9
10
  scaffold: {
10
11
  type: string;
11
12
  label: string;
@@ -13,6 +13,8 @@ export declare class SwitchControlPlugin extends BasePlugin {
13
13
  type: string;
14
14
  option: string;
15
15
  name: string;
16
+ falseValue: boolean;
17
+ trueValue: boolean;
16
18
  };
17
19
  previewSchema: any;
18
20
  panelTitle: string;
@@ -7,6 +7,7 @@ export declare class GridPlugin extends BasePlugin {
7
7
  name: string;
8
8
  isBaseComponent: boolean;
9
9
  description: string;
10
+ docLink: string;
10
11
  tags: string[];
11
12
  icon: string;
12
13
  scaffold: {
@@ -9,6 +9,7 @@ export declare class HBoxPlugin extends BasePlugin {
9
9
  isBaseComponent: boolean;
10
10
  icon: string;
11
11
  description: string;
12
+ docLink: string;
12
13
  tags: string[];
13
14
  scaffold: {
14
15
  type: string;
@@ -5,6 +5,7 @@ export declare class JsonPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class ListPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class MappingPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class MarkdownPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class NavPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -0,0 +1,8 @@
1
+ import { BasePlugin, BasicPanelItem, BuildPanelEventContext } from '../../plugin';
2
+ /**
3
+ * 大纲面板
4
+ */
5
+ export declare class OutlinePlugin extends BasePlugin {
6
+ order: number;
7
+ buildEditorPanel(context: BuildPanelEventContext, panels: Array<BasicPanelItem>): void;
8
+ }
@@ -5,6 +5,7 @@ export declare class ProgressPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class QRCodePlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -6,7 +6,6 @@ export declare class ResetPlugin extends ButtonPlugin {
6
6
  isBaseComponent: boolean;
7
7
  icon: string;
8
8
  description: string;
9
- docLink: string;
10
9
  panelTitle: string;
11
10
  scaffold: any;
12
11
  previewSchema: any;
@@ -5,6 +5,7 @@ export declare class ServicePlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -8,6 +8,7 @@ export declare class SparklinePlugin extends BasePlugin {
8
8
  name: string;
9
9
  isBaseComponent: boolean;
10
10
  description: string;
11
+ docLink: string;
11
12
  tags: string[];
12
13
  icon: string;
13
14
  scaffold: {
@@ -5,6 +5,7 @@ export declare class StatusPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -6,6 +6,7 @@ export declare class StepsPlugin extends BasePlugin {
6
6
  isBaseComponent: boolean;
7
7
  icon: string;
8
8
  description: string;
9
+ docLink: string;
9
10
  tags: string[];
10
11
  scaffold: {
11
12
  type: string;
@@ -5,7 +5,6 @@ export declare class SubmitPlugin extends ButtonPlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
- docLink: string;
9
8
  panelTitle: string;
10
9
  scaffold: any;
11
10
  previewSchema: any;
@@ -10,6 +10,7 @@ export declare class TableViewPlugin extends BasePlugin {
10
10
  isBaseComponent: boolean;
11
11
  icon: string;
12
12
  description: string;
13
+ docLink: string;
13
14
  tags: string[];
14
15
  scaffold: {
15
16
  type: string;
@@ -5,6 +5,7 @@ export declare class TasksPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class TooltipWrapperPlugin extends BasePlugin {
5
5
  isBaseComponent: boolean;
6
6
  name: string;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -5,6 +5,7 @@ export declare class VideoPlugin extends BasePlugin {
5
5
  name: string;
6
6
  isBaseComponent: boolean;
7
7
  description: string;
8
+ docLink: string;
8
9
  tags: string[];
9
10
  icon: string;
10
11
  scaffold: {
@@ -6,6 +6,7 @@ export declare class WebComponentPlugin extends BasePlugin {
6
6
  name: string;
7
7
  isBaseComponent: boolean;
8
8
  description: string;
9
+ docLink: string;
9
10
  tags: string[];
10
11
  icon: string;
11
12
  scaffold: {
@@ -1,4 +1,3 @@
1
- import { SchemaObject } from 'amis';
2
1
  import { BaseEventContext, BasePlugin, BasicToolbarItem, VRendererConfig } from '../plugin';
3
2
  export declare class WizardPlugin extends BasePlugin {
4
3
  rendererName: string;
@@ -9,7 +8,17 @@ export declare class WizardPlugin extends BasePlugin {
9
8
  docLink: string;
10
9
  tags: string[];
11
10
  icon: string;
12
- scaffold: SchemaObject;
11
+ scaffold: {
12
+ type: string;
13
+ steps: {
14
+ title: string;
15
+ body: {
16
+ type: string;
17
+ label: string;
18
+ name: string;
19
+ }[];
20
+ }[];
21
+ };
13
22
  previewSchema: {
14
23
  type: string;
15
24
  className: string;
@@ -6,6 +6,7 @@ export declare class WrapperPlugin extends BasePlugin {
6
6
  name: string;
7
7
  isBaseComponent: boolean;
8
8
  description: string;
9
+ docLink: string;
9
10
  tags: string[];
10
11
  icon: string;
11
12
  scaffold: {
package/dist/plugin.d.ts CHANGED
@@ -311,7 +311,7 @@ export interface PanelItem {
311
311
  nodeId?: string;
312
312
  key: string;
313
313
  icon: string;
314
- title: string;
314
+ title: string | JSX.Element;
315
315
  component?: React.ComponentType<PanelProps | any>;
316
316
  order: number;
317
317
  position?: 'left' | 'right';
@@ -586,7 +586,7 @@ export declare abstract class BasePlugin implements PluginInterface {
586
586
  * @param info
587
587
  * @param menus
588
588
  */
589
- buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
589
+ buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
590
590
  buildEditorToolbar({ id, schema, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
591
591
  renderPlaceholder(text: string, key?: any): React.DetailedReactHTMLElement<{
592
592
  key: any;
@@ -89,6 +89,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
89
89
  readonly clickable: boolean;
90
90
  readonly draggable: boolean;
91
91
  readonly moveable: boolean;
92
+ readonly canMoveUp: boolean;
93
+ readonly canMoveDown: boolean;
92
94
  readonly removable: boolean;
93
95
  readonly duplicatable: boolean;
94
96
  readonly replaceable: boolean;
@@ -170,12 +172,10 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
170
172
  panels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<PanelItem[], PanelItem[], PanelItem[]>, [undefined]>;
171
173
  showCustomRenderersPanel: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
172
174
  renderersTabsKey: import("mobx-state-tree").IType<string | undefined, string, string>;
173
- renderersPanelUUID: import("mobx-state-tree").IType<string | undefined, string, string>;
174
175
  subRenderers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<SubRendererInfo[], SubRendererInfo[], SubRendererInfo[]>, [undefined]>;
175
176
  subRenderersKeywords: import("mobx-state-tree").IType<string | undefined, string, string>;
176
177
  subRenderersTag: import("mobx-state-tree").IType<string | undefined, string, string>;
177
178
  subRendererRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
178
- customRenderersPanelUUID: import("mobx-state-tree").IType<string | undefined, string, string>;
179
179
  customRenderersKeywords: import("mobx-state-tree").IType<string | undefined, string, string>;
180
180
  customRenderersTag: import("mobx-state-tree").IType<string | undefined, string, string>;
181
181
  panelKey: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -193,6 +193,7 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
193
193
  }, {
194
194
  readonly filteredSchema: any;
195
195
  readonly filteredSchemaForPreview: any;
196
+ isRootSchema(id: string): boolean;
196
197
  isHoved(id: string): boolean | "";
197
198
  isActive(id: string): boolean | "";
198
199
  isContextOn(id: string): boolean | "";
@@ -232,6 +233,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
232
233
  readonly clickable: boolean;
233
234
  readonly draggable: boolean;
234
235
  readonly moveable: boolean;
236
+ readonly canMoveUp: boolean;
237
+ readonly canMoveDown: boolean;
235
238
  readonly removable: boolean;
236
239
  readonly duplicatable: boolean;
237
240
  readonly replaceable: boolean;
@@ -310,6 +313,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
310
313
  readonly clickable: boolean;
311
314
  readonly draggable: boolean;
312
315
  readonly moveable: boolean;
316
+ readonly canMoveUp: boolean;
317
+ readonly canMoveDown: boolean;
313
318
  readonly removable: boolean;
314
319
  readonly duplicatable: boolean;
315
320
  readonly replaceable: boolean;
@@ -363,6 +368,7 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
363
368
  getSchema(id?: string | undefined): any;
364
369
  getSchemaParentById(id: string): any;
365
370
  getSchemaPath(id: string): string;
371
+ getSimpleSchema(curSchema: any): any;
366
372
  getPanelKey(): string;
367
373
  getLeftPanelKey(): string;
368
374
  readonly leftPanels: PanelItem[];
@@ -408,6 +414,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
408
414
  readonly clickable: boolean;
409
415
  readonly draggable: boolean;
410
416
  readonly moveable: boolean;
417
+ readonly canMoveUp: boolean;
418
+ readonly canMoveDown: boolean;
411
419
  readonly removable: boolean;
412
420
  readonly duplicatable: boolean;
413
421
  readonly replaceable: boolean;
@@ -486,6 +494,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
486
494
  readonly clickable: boolean;
487
495
  readonly draggable: boolean;
488
496
  readonly moveable: boolean;
497
+ readonly canMoveUp: boolean;
498
+ readonly canMoveDown: boolean;
489
499
  readonly removable: boolean;
490
500
  readonly duplicatable: boolean;
491
501
  readonly replaceable: boolean;
@@ -565,6 +575,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
565
575
  readonly clickable: boolean;
566
576
  readonly draggable: boolean;
567
577
  readonly moveable: boolean;
578
+ readonly canMoveUp: boolean;
579
+ readonly canMoveDown: boolean;
568
580
  readonly removable: boolean;
569
581
  readonly duplicatable: boolean;
570
582
  readonly replaceable: boolean;
@@ -643,6 +655,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
643
655
  readonly clickable: boolean;
644
656
  readonly draggable: boolean;
645
657
  readonly moveable: boolean;
658
+ readonly canMoveUp: boolean;
659
+ readonly canMoveDown: boolean;
646
660
  readonly removable: boolean;
647
661
  readonly duplicatable: boolean;
648
662
  readonly replaceable: boolean;
@@ -722,6 +736,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
722
736
  readonly clickable: boolean;
723
737
  readonly draggable: boolean;
724
738
  readonly moveable: boolean;
739
+ readonly canMoveUp: boolean;
740
+ readonly canMoveDown: boolean;
725
741
  readonly removable: boolean;
726
742
  readonly duplicatable: boolean;
727
743
  readonly replaceable: boolean;
@@ -800,6 +816,8 @@ export declare const EditorStore: import("mobx-state-tree").IModelType<{
800
816
  readonly clickable: boolean;
801
817
  readonly draggable: boolean;
802
818
  readonly moveable: boolean;
819
+ readonly canMoveUp: boolean;
820
+ readonly canMoveDown: boolean;
803
821
  readonly removable: boolean;
804
822
  readonly duplicatable: boolean;
805
823
  readonly replaceable: boolean;
@@ -36,6 +36,8 @@ export declare const EditorNode: import("mobx-state-tree").IModelType<{
36
36
  readonly clickable: boolean;
37
37
  readonly draggable: boolean;
38
38
  readonly moveable: boolean;
39
+ readonly canMoveUp: boolean;
40
+ readonly canMoveDown: boolean;
39
41
  readonly removable: boolean;
40
42
  readonly duplicatable: boolean;
41
43
  readonly replaceable: boolean;
@@ -120,6 +122,8 @@ export declare const EditorNodeContext: React.Context<({
120
122
  readonly clickable: boolean;
121
123
  readonly draggable: boolean;
122
124
  readonly moveable: boolean;
125
+ readonly canMoveUp: boolean;
126
+ readonly canMoveDown: boolean;
123
127
  readonly removable: boolean;
124
128
  readonly duplicatable: boolean;
125
129
  readonly replaceable: boolean;
@@ -203,6 +207,8 @@ export declare const EditorNodeContext: React.Context<({
203
207
  readonly clickable: boolean;
204
208
  readonly draggable: boolean;
205
209
  readonly moveable: boolean;
210
+ readonly canMoveUp: boolean;
211
+ readonly canMoveDown: boolean;
206
212
  readonly removable: boolean;
207
213
  readonly duplicatable: boolean;
208
214
  readonly replaceable: boolean;