amis-editor 4.2.0-beta.2 → 5.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. package/dist/6dbcbb49b6fd405190a9.png +0 -0
  2. package/dist/component/Control/APIControl.d.ts +1101 -447
  3. package/dist/component/Control/ActionAPIControl.d.ts +1158 -0
  4. package/dist/component/Control/BadgeControl.d.ts +133 -0
  5. package/dist/component/Control/BaseControl.d.ts +248 -0
  6. package/dist/component/Control/DataBindingControl.d.ts +14 -0
  7. package/dist/component/Control/DataPickerControl.d.ts +13 -0
  8. package/dist/component/Control/DateShortCutControl.d.ts +83 -0
  9. package/dist/component/Control/FormulaControl.d.ts +51 -0
  10. package/dist/component/Control/OptionControl.d.ts +23 -34
  11. package/dist/component/Control/StatusControl.d.ts +39 -0
  12. package/dist/component/Control/SwitchMoreControl.d.ts +224 -0
  13. package/dist/component/Control/ValidationControl.d.ts +50 -15
  14. package/dist/component/Control/ValidationItem.d.ts +46 -0
  15. package/dist/component/Control/style-control/Background.d.ts +17 -0
  16. package/dist/component/Control/style-control/Border.d.ts +18 -0
  17. package/dist/component/Control/style-control/BoxModel.d.ts +17 -0
  18. package/dist/component/Control/style-control/BoxShadow.d.ts +18 -0
  19. package/dist/component/Control/style-control/Display.d.ts +14 -0
  20. package/dist/component/Control/style-control/Font.d.ts +16 -0
  21. package/dist/component/Control/style-control/font-family.d.ts +11 -0
  22. package/dist/component/Control/style-control/transformation.d.ts +29 -0
  23. package/dist/component/Control/style-control/types.d.ts +8 -0
  24. package/dist/component/Editor.d.ts +16 -0
  25. package/dist/component/RegionWrapper.d.ts +10 -0
  26. package/dist/component/VRenderer.d.ts +10 -0
  27. package/dist/component/schemaTpl.d.ts +8 -0
  28. package/dist/component/validator.d.ts +62 -0
  29. package/dist/dnd/index.d.ts +1 -1
  30. package/dist/event-action/action-config-panel.d.ts +8 -0
  31. package/dist/event-action/actions.d.ts +3 -0
  32. package/dist/event-action/comp-action-select.d.ts +11 -0
  33. package/dist/event-action/config.d.ts +13 -0
  34. package/dist/event-action/index.d.ts +459 -0
  35. package/dist/event-action/schema.d.ts +32 -0
  36. package/dist/exports.min.js +1 -1
  37. package/dist/index.d.ts +23 -5
  38. package/dist/index.min.js +1 -1
  39. package/dist/manager.d.ts +46 -1
  40. package/dist/plugin/Alert.d.ts +4 -2
  41. package/dist/plugin/Button.d.ts +5 -1
  42. package/dist/plugin/ButtonGroup.d.ts +13 -34
  43. package/dist/plugin/ButtonToolbar.d.ts +4 -10
  44. package/dist/plugin/CRUD.d.ts +2 -0
  45. package/dist/plugin/Chart.d.ts +2 -0
  46. package/dist/plugin/Collapse.d.ts +1 -0
  47. package/dist/plugin/CollapseGroup.d.ts +28 -4
  48. package/dist/plugin/Container.d.ts +2 -1
  49. package/dist/plugin/Dialog.d.ts +12 -2
  50. package/dist/plugin/Drawer.d.ts +12 -2
  51. package/dist/plugin/DropDownButton.d.ts +11 -11
  52. package/dist/plugin/Form/ButtonGroupSelect.d.ts +7 -2
  53. package/dist/plugin/Form/ButtonToolbar.d.ts +8 -7
  54. package/dist/plugin/Form/ChainedSelect.d.ts +3 -0
  55. package/dist/plugin/Form/Checkbox.d.ts +7 -2
  56. package/dist/plugin/Form/Checkboxes.d.ts +8 -2
  57. package/dist/plugin/Form/CodeEditor.d.ts +7 -22
  58. package/dist/plugin/Form/Combo.d.ts +3 -0
  59. package/dist/plugin/Form/Control.d.ts +6 -2
  60. package/dist/plugin/Form/DiffEditor.d.ts +7 -1
  61. package/dist/plugin/Form/Form.d.ts +6 -0
  62. package/dist/plugin/Form/Formula.d.ts +1 -25
  63. package/dist/plugin/Form/InputDate.d.ts +8 -2
  64. package/dist/plugin/Form/InputDateRange.d.ts +8 -2
  65. package/dist/plugin/Form/InputDateTime.d.ts +4 -4
  66. package/dist/plugin/Form/InputDateTimeRange.d.ts +4 -4
  67. package/dist/plugin/Form/InputEmail.d.ts +1 -0
  68. package/dist/plugin/Form/InputExcel.d.ts +6 -41
  69. package/dist/plugin/Form/InputFile.d.ts +7 -3
  70. package/dist/plugin/Form/InputKV.d.ts +6 -0
  71. package/dist/plugin/Form/InputMonth.d.ts +1 -0
  72. package/dist/plugin/Form/InputMonthRange.d.ts +4 -4
  73. package/dist/plugin/Form/InputPassword.d.ts +1 -0
  74. package/dist/plugin/Form/InputQuarter.d.ts +1 -0
  75. package/dist/plugin/Form/InputQuarterRange.d.ts +4 -4
  76. package/dist/plugin/Form/InputRange.d.ts +3 -0
  77. package/dist/plugin/Form/InputRating.d.ts +9 -3
  78. package/dist/plugin/Form/InputText.d.ts +24 -2
  79. package/dist/plugin/Form/InputTime.d.ts +3 -3
  80. package/dist/plugin/Form/InputTimeRange.d.ts +20 -0
  81. package/dist/plugin/Form/InputTree.d.ts +6 -2
  82. package/dist/plugin/Form/InputURL.d.ts +1 -0
  83. package/dist/plugin/Form/InputYear.d.ts +1 -0
  84. package/dist/plugin/Form/InputYearRange.d.ts +20 -0
  85. package/dist/plugin/Form/ListSelect.d.ts +6 -2
  86. package/dist/plugin/Form/LocationPicker.d.ts +1 -31
  87. package/dist/plugin/Form/NestedSelect.d.ts +5 -2
  88. package/dist/plugin/Form/Radios.d.ts +7 -2
  89. package/dist/plugin/Form/Select.d.ts +7 -2
  90. package/dist/plugin/Form/Switch.d.ts +7 -2
  91. package/dist/plugin/Form/TabsTransfer.d.ts +5 -2
  92. package/dist/plugin/Form/Textarea.d.ts +7 -1
  93. package/dist/plugin/Form/Transfer.d.ts +5 -2
  94. package/dist/plugin/Form/TreeSelect.d.ts +6 -2
  95. package/dist/plugin/IFrame.d.ts +2 -2
  96. package/dist/plugin/Nav.d.ts +1 -116
  97. package/dist/plugin/Others/Action.d.ts +5 -1
  98. package/dist/plugin/Page.d.ts +5 -2
  99. package/dist/plugin/Progress.d.ts +5 -1
  100. package/dist/plugin/Table.d.ts +2 -0
  101. package/dist/plugin/Tabs.d.ts +33 -2
  102. package/dist/plugin/TooltipWrapper.d.ts +10 -0
  103. package/dist/plugin/Tpl.d.ts +2 -1
  104. package/dist/plugin/Wizard.d.ts +4 -1
  105. package/dist/plugin.d.ts +37 -1
  106. package/dist/store/editor.d.ts +65 -38
  107. package/dist/store/node.d.ts +16 -0
  108. package/dist/style.css +1 -1
  109. package/dist/util.d.ts +36 -3
  110. package/package.json +14 -8
  111. package/src/component/schemaTpl.tsx +1198 -474
  112. package/src/plugin/.DS_Store +0 -0
  113. package/src/plugin/Alert.tsx +69 -48
  114. package/src/plugin/AnchorNav.tsx +1 -0
  115. package/src/plugin/Audio.tsx +9 -15
  116. package/src/plugin/Avatar.tsx +2 -1
  117. package/src/plugin/Breadcrumb.tsx +2 -1
  118. package/src/plugin/Button.tsx +257 -188
  119. package/src/plugin/ButtonGroup.tsx +99 -38
  120. package/src/plugin/ButtonToolbar.tsx +7 -13
  121. package/src/plugin/CRUD.tsx +77 -135
  122. package/src/plugin/Card.tsx +1 -0
  123. package/src/plugin/Cards.tsx +8 -14
  124. package/src/plugin/Carousel.tsx +1 -1
  125. package/src/plugin/Chart.tsx +26 -14
  126. package/src/plugin/Collapse.tsx +78 -78
  127. package/src/plugin/CollapseGroup.tsx +165 -83
  128. package/src/plugin/Container.tsx +59 -6
  129. package/src/plugin/Custom.tsx +2 -8
  130. package/src/plugin/CustomRegion.tsx +4 -3
  131. package/src/plugin/Dialog.tsx +55 -24
  132. package/src/plugin/Drawer.tsx +65 -35
  133. package/src/plugin/DropDownButton.tsx +95 -79
  134. package/src/plugin/Flex.tsx +123 -65
  135. package/src/plugin/Form/ButtonGroupSelect.tsx +114 -26
  136. package/src/plugin/Form/ButtonToolbar.tsx +62 -55
  137. package/src/plugin/Form/ChainedSelect.tsx +45 -0
  138. package/src/plugin/Form/Checkbox.tsx +122 -33
  139. package/src/plugin/Form/Checkboxes.tsx +154 -87
  140. package/src/plugin/Form/CodeEditor.tsx +163 -34
  141. package/src/plugin/Form/Combo.tsx +104 -65
  142. package/src/plugin/Form/Control.tsx +16 -70
  143. package/src/plugin/Form/DiffEditor.tsx +158 -54
  144. package/src/plugin/Form/FieldSet.tsx +6 -11
  145. package/src/plugin/Form/Form.tsx +277 -70
  146. package/src/plugin/Form/Formula.tsx +8 -14
  147. package/src/plugin/Form/InputArray.tsx +7 -16
  148. package/src/plugin/Form/InputCity.tsx +1 -1
  149. package/src/plugin/Form/InputDate.tsx +344 -121
  150. package/src/plugin/Form/InputDateRange.tsx +303 -161
  151. package/src/plugin/Form/InputDateTime.tsx +6 -150
  152. package/src/plugin/Form/InputDateTimeRange.tsx +7 -187
  153. package/src/plugin/Form/InputEmail.tsx +1 -0
  154. package/src/plugin/Form/InputExcel.tsx +70 -27
  155. package/src/plugin/Form/InputFile.tsx +326 -152
  156. package/src/plugin/Form/InputImage.tsx +1 -1
  157. package/src/plugin/Form/InputKV.tsx +61 -0
  158. package/src/plugin/Form/InputMonth.tsx +3 -1
  159. package/src/plugin/Form/InputMonthRange.tsx +6 -160
  160. package/src/plugin/Form/InputNumber.tsx +1 -1
  161. package/src/plugin/Form/InputPassword.tsx +2 -0
  162. package/src/plugin/Form/InputQuarter.tsx +3 -1
  163. package/src/plugin/Form/InputQuarterRange.tsx +6 -160
  164. package/src/plugin/Form/InputRange.tsx +74 -4
  165. package/src/plugin/Form/InputRating.tsx +347 -35
  166. package/src/plugin/Form/InputRichText.tsx +2 -3
  167. package/src/plugin/Form/InputTable.tsx +33 -49
  168. package/src/plugin/Form/InputTag.tsx +1 -1
  169. package/src/plugin/Form/InputText.tsx +310 -132
  170. package/src/plugin/Form/InputTime.tsx +4 -53
  171. package/src/plugin/Form/InputTimeRange.tsx +41 -0
  172. package/src/plugin/Form/InputTree.tsx +196 -46
  173. package/src/plugin/Form/InputURL.tsx +2 -0
  174. package/src/plugin/Form/InputYear.tsx +2 -0
  175. package/src/plugin/Form/InputYearRange.tsx +41 -0
  176. package/src/plugin/Form/Item.tsx +17 -18
  177. package/src/plugin/Form/ListSelect.tsx +75 -20
  178. package/src/plugin/Form/LocationPicker.tsx +2 -7
  179. package/src/plugin/Form/MatrixCheckboxes.tsx +1 -1
  180. package/src/plugin/Form/NestedSelect.tsx +110 -43
  181. package/src/plugin/Form/Picker.tsx +2 -5
  182. package/src/plugin/Form/Radios.tsx +122 -52
  183. package/src/plugin/Form/Select.tsx +239 -168
  184. package/src/plugin/Form/Static.tsx +1 -1
  185. package/src/plugin/Form/Switch.tsx +170 -58
  186. package/src/plugin/Form/TabsTransfer.tsx +175 -79
  187. package/src/plugin/Form/Textarea.tsx +146 -36
  188. package/src/plugin/Form/Transfer.tsx +295 -233
  189. package/src/plugin/Form/TreeSelect.tsx +287 -146
  190. package/src/plugin/Grid.tsx +340 -312
  191. package/src/plugin/HBox.tsx +1 -0
  192. package/src/plugin/IFrame.tsx +21 -12
  193. package/src/plugin/Image.tsx +7 -12
  194. package/src/plugin/Images.tsx +7 -12
  195. package/src/plugin/Link.tsx +6 -12
  196. package/src/plugin/List.tsx +6 -10
  197. package/src/plugin/ListItem.tsx +1 -0
  198. package/src/plugin/Nav.tsx +7 -9
  199. package/src/plugin/Others/Action.tsx +16 -10
  200. package/src/plugin/Others/BasicToolbar.tsx +4 -1
  201. package/src/plugin/Others/TableCell.tsx +19 -39
  202. package/src/plugin/Page.tsx +315 -229
  203. package/src/plugin/Panel.tsx +6 -7
  204. package/src/plugin/Plain.tsx +3 -6
  205. package/src/plugin/Progress.tsx +234 -94
  206. package/src/plugin/Service.tsx +10 -6
  207. package/src/plugin/Table.tsx +49 -20
  208. package/src/plugin/TableView.tsx +212 -106
  209. package/src/plugin/Tabs.tsx +306 -146
  210. package/src/plugin/TooltipWrapper.tsx +231 -135
  211. package/src/plugin/Tpl.tsx +68 -52
  212. package/src/plugin/Video.tsx +9 -20
  213. package/src/plugin/Wizard.tsx +537 -336
  214. package/src/plugin/Wrapper.tsx +82 -61
  215. package/src/plugin.ts +66 -4
  216. package/static/empty.png +0 -0
package/dist/manager.d.ts CHANGED
@@ -4,14 +4,16 @@
4
4
  * @file 把一些功能性的东西放在了这个里面,辅助 compoennt/Editor.tsx 组件的。
5
5
  * 编辑器非 UI 相关的东西应该放在这。
6
6
  */
7
- import { RenderOptions } from 'amis-core';
7
+ import { DataSchema, RenderOptions } from 'amis-core';
8
8
  import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuItem, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm } from './plugin';
9
9
  import { EditorStoreType, SubEditorContext } from './store/editor';
10
10
  import { EditorNodeType } from './store/node';
11
11
  import { EditorProps } from './component/Editor';
12
12
  import { EditorDNDManager } from './dnd';
13
+ import { IScopedContext } from 'amis';
13
14
  import { SchemaObject } from 'amis/lib/Schema';
14
15
  import type { RendererConfig } from 'amis-core/lib/factory';
16
+ import { PluginActions, PluginEvents, RendererEvent } from './event-action';
15
17
  export interface EditorManagerConfig extends Omit<EditorProps, 'value' | 'onChange'> {
16
18
  }
17
19
  export interface PluginClass {
@@ -47,6 +49,10 @@ export declare class EditorManager {
47
49
  disableHover: boolean;
48
50
  private clipboardData;
49
51
  readonly hackIn: any;
52
+ readonly broadcasts: RendererEvent[];
53
+ readonly pluginEvents: PluginEvents;
54
+ readonly pluginActions: PluginActions;
55
+ dataSchema: DataSchema;
50
56
  constructor(config: EditorManagerConfig, store: EditorStoreType, parent?: EditorManager | undefined);
51
57
  dynamicAddPlugin(pluginName: string): void;
52
58
  buildRenderersAndPanels(): void;
@@ -56,6 +62,7 @@ export declare class EditorManager {
56
62
  parentRegion: string;
57
63
  isCommonConfig: boolean;
58
64
  id: string;
65
+ type: string;
59
66
  label: string;
60
67
  regionInfo: (RegionConfig & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<RegionConfig, RegionConfig, RegionConfig>>>) | undefined;
61
68
  path: string;
@@ -78,10 +85,15 @@ export declare class EditorManager {
78
85
  } & {
79
86
  readonly info: RendererInfo;
80
87
  setInfo(value: RendererInfo): void;
88
+ readonly rendererConfig: RendererConfig | undefined;
89
+ setRendererConfig(value: RendererConfig): void;
81
90
  readonly isVitualRenderer: boolean;
82
91
  readonly clickable: boolean;
83
92
  readonly draggable: boolean;
84
93
  readonly moveable: boolean;
94
+ /**
95
+ * 注销插件
96
+ */
85
97
  readonly canMoveUp: boolean;
86
98
  readonly canMoveDown: boolean;
87
99
  readonly removable: boolean;
@@ -96,6 +108,7 @@ export declare class EditorManager {
96
108
  isExists(id: string): boolean;
97
109
  getChildById(id: string): any;
98
110
  readonly parent: any;
111
+ readonly ancestorField: any;
99
112
  readonly host: any;
100
113
  readonly firstChild: any;
101
114
  readonly index: any;
@@ -108,6 +121,7 @@ export declare class EditorManager {
108
121
  updateIsCommonConfig: (value: boolean) => void;
109
122
  addChild(props: {
110
123
  id: string;
124
+ type: string;
111
125
  label: string;
112
126
  path: string;
113
127
  isCommonConfig?: boolean | undefined;
@@ -136,6 +150,7 @@ export declare class EditorManager {
136
150
  parentRegion: import("mobx-state-tree").IType<string | undefined, string, string>;
137
151
  isCommonConfig: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
138
152
  id: import("mobx-state-tree").IType<string | undefined, string, string>;
153
+ type: import("mobx-state-tree").IType<string | undefined, string, string>;
139
154
  label: import("mobx-state-tree").IType<string | undefined, string, string>;
140
155
  regionInfo: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IType<RegionConfig, RegionConfig, RegionConfig>>;
141
156
  path: import("mobx-state-tree").IType<string | undefined, string, string>;
@@ -158,10 +173,15 @@ export declare class EditorManager {
158
173
  } & {
159
174
  readonly info: RendererInfo;
160
175
  setInfo(value: RendererInfo): void;
176
+ readonly rendererConfig: RendererConfig | undefined;
177
+ setRendererConfig(value: RendererConfig): void;
161
178
  readonly isVitualRenderer: boolean;
162
179
  readonly clickable: boolean;
163
180
  readonly draggable: boolean;
164
181
  readonly moveable: boolean;
182
+ /**
183
+ * 注销插件
184
+ */
165
185
  readonly canMoveUp: boolean;
166
186
  readonly canMoveDown: boolean;
167
187
  readonly removable: boolean;
@@ -176,6 +196,7 @@ export declare class EditorManager {
176
196
  isExists(id: string): boolean;
177
197
  getChildById(id: string): any;
178
198
  readonly parent: any;
199
+ readonly ancestorField: any;
179
200
  readonly host: any;
180
201
  readonly firstChild: any;
181
202
  readonly index: any;
@@ -188,6 +209,7 @@ export declare class EditorManager {
188
209
  updateIsCommonConfig: (value: boolean) => void;
189
210
  addChild(props: {
190
211
  id: string;
212
+ type: string;
191
213
  label: string;
192
214
  path: string;
193
215
  isCommonConfig?: boolean | undefined;
@@ -418,6 +440,8 @@ export declare class EditorManager {
418
440
  definitions?: any;
419
441
  api?: any;
420
442
  submitOnChange?: boolean;
443
+ panelById?: string;
444
+ justify?: boolean;
421
445
  }): ({ value, onChange, popOverContainer, id, store, node }: import("./plugin").PanelProps) => JSX.Element;
422
446
  onWidthChangeStart(e: MouseEvent, ctx: {
423
447
  dom: HTMLElement;
@@ -450,6 +474,27 @@ export declare class EditorManager {
450
474
  resizer: HTMLElement;
451
475
  }, any>;
452
476
  openNodePopOverForm(id: string | EditorNodeType): void;
477
+ /**
478
+ * 更新广播事件集(还没想好怎么存)
479
+ *
480
+ * @param {string} key 插件名称
481
+ * @param {RendererEvent[]} events 事件集
482
+ * @memberof EditorManager
483
+ */
484
+ addBroadcast(event: RendererEvent): void;
485
+ /**
486
+ * 删除指定广播(还没想好怎么存)
487
+ *
488
+ * @param {string} id
489
+ * @memberof EditorManager
490
+ */
491
+ removeBroadcast(id: string): void;
492
+ /**
493
+ * 获取上下文数据结构
494
+ * @param id
495
+ */
496
+ getContextSchemas(id: string | EditorNodeType, withoutSuper?: boolean): Promise<import("json-schema").JSONSchema7[]>;
497
+ beforeDispatchEvent(originHook: any, e: any, component: any, scoped: IScopedContext, data: any, broadcasts?: any): void;
453
498
  /**
454
499
  * 销毁函数
455
500
  */
@@ -1,4 +1,4 @@
1
- import { BasePlugin } from '../plugin';
1
+ import { BaseEventContext, BasePlugin } from '../plugin';
2
2
  import { SchemaObject } from 'amis/lib/Schema';
3
3
  export declare class AlertPlugin extends BasePlugin {
4
4
  rendererName: string;
@@ -15,6 +15,8 @@ export declare class AlertPlugin extends BasePlugin {
15
15
  label: string;
16
16
  placeholder: string;
17
17
  }[];
18
+ notRenderFormZone: boolean;
18
19
  panelTitle: string;
19
- panelBody: any;
20
+ panelJustify: boolean;
21
+ panelBodyCreator: (context: BaseEventContext) => any;
20
22
  }
@@ -1,5 +1,6 @@
1
1
  import { BaseEventContext, BasePlugin, BasicRendererInfo, RendererInfoResolveEventContext } from '../plugin';
2
2
  import { SchemaObject } from 'amis/lib/Schema';
3
+ import { RendererAction, RendererEvent } from '../event-action';
3
4
  export declare class ButtonPlugin extends BasePlugin {
4
5
  rendererName: string;
5
6
  $schema: string;
@@ -12,7 +13,10 @@ export declare class ButtonPlugin extends BasePlugin {
12
13
  scaffold: SchemaObject;
13
14
  previewSchema: any;
14
15
  panelTitle: string;
15
- panelBodyCreator: (context: BaseEventContext) => any[];
16
+ events: RendererEvent[];
17
+ actions: RendererAction[];
18
+ panelJustify: boolean;
19
+ panelBodyCreator: (context: BaseEventContext) => any;
16
20
  /**
17
21
  * 如果禁用了没办法编辑
18
22
  */
@@ -1,4 +1,4 @@
1
- import { BasePlugin, RegionConfig } from '../plugin';
1
+ import { BasePlugin, RegionConfig, BaseEventContext } from '../plugin';
2
2
  export declare class ButtonGroupPlugin extends BasePlugin {
3
3
  rendererName: string;
4
4
  $schema: string;
@@ -11,50 +11,29 @@ export declare class ButtonGroupPlugin extends BasePlugin {
11
11
  scaffold: {
12
12
  type: string;
13
13
  buttons: {
14
+ onEvent: {
15
+ click: {
16
+ actions: never[];
17
+ };
18
+ };
14
19
  type: string;
15
20
  label: string;
16
- actionType: string;
17
- dialog: {
18
- title: string;
19
- body: string;
20
- };
21
21
  }[];
22
22
  };
23
23
  previewSchema: {
24
24
  type: string;
25
25
  buttons: {
26
+ onEvent: {
27
+ click: {
28
+ actions: never[];
29
+ };
30
+ };
26
31
  type: string;
27
32
  label: string;
28
- actionType: string;
29
- dialog: {
30
- title: string;
31
- body: string;
32
- };
33
33
  }[];
34
34
  };
35
35
  panelTitle: string;
36
- panelBody: {
37
- name: string;
38
- type: string;
39
- label: string;
40
- multiple: boolean;
41
- addable: boolean;
42
- minLength: number;
43
- draggable: boolean;
44
- draggableTip: string;
45
- editable: boolean;
46
- visibleOn: string;
47
- items: {
48
- type: string;
49
- inline: boolean;
50
- className: string;
51
- tpl: string;
52
- }[];
53
- addButtonText: string;
54
- scaffold: {
55
- type: string;
56
- label: string;
57
- };
58
- }[];
36
+ panelJustify: boolean;
37
+ panelBodyCreator: (context: BaseEventContext) => any[];
59
38
  regions: Array<RegionConfig>;
60
39
  }
@@ -7,16 +7,15 @@ export declare class ButtonToolbarPlugin extends BasePlugin {
7
7
  description: string;
8
8
  tags: string[];
9
9
  icon: string;
10
+ /**
11
+ * 组件选择面板中隐藏,和ButtonGroup合并
12
+ */
13
+ disabledRendererPlugin: boolean;
10
14
  scaffold: {
11
15
  type: string;
12
16
  buttons: {
13
17
  type: string;
14
18
  label: string;
15
- actionType: string;
16
- dialog: {
17
- title: string;
18
- body: string;
19
- };
20
19
  }[];
21
20
  };
22
21
  previewSchema: {
@@ -24,11 +23,6 @@ export declare class ButtonToolbarPlugin extends BasePlugin {
24
23
  buttons: {
25
24
  type: string;
26
25
  label: string;
27
- actionType: string;
28
- dialog: {
29
- title: string;
30
- body: string;
31
- };
32
26
  }[];
33
27
  };
34
28
  panelTitle: string;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseEventContext, BasePlugin, BasicRendererInfo, BasicSubRenderInfo, ChangeEventContext, PluginEvent, RendererEventContext, RendererInfoResolveEventContext, ScaffoldForm, SubRendererInfo } from '../plugin';
3
+ import { EditorNodeType } from '../store/node';
3
4
  export declare class CRUDPlugin extends BasePlugin {
4
5
  rendererName: string;
5
6
  $schema: string;
@@ -122,4 +123,5 @@ export declare class CRUDPlugin extends BasePlugin {
122
123
  renderRenderer(props: any): JSX.Element;
123
124
  filterProps(props: any): any;
124
125
  afterUpdate(event: PluginEvent<ChangeEventContext>): void;
126
+ buildDataSchemas(node: EditorNodeType, region?: EditorNodeType): Promise<any>;
125
127
  }
@@ -1,4 +1,5 @@
1
1
  import { BaseEventContext, BasePlugin } from '../plugin';
2
+ import { RendererAction } from '../event-action';
2
3
  export declare class ChartPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -42,6 +43,7 @@ export declare class ChartPlugin extends BasePlugin {
42
43
  };
43
44
  replaceChartOption: boolean;
44
45
  };
46
+ actions: RendererAction[];
45
47
  panelTitle: string;
46
48
  panelBodyCreator: (context: BaseEventContext) => any[];
47
49
  editDrillDown(id: string): void;
@@ -27,6 +27,7 @@ export declare class CollapsePlugin extends BasePlugin {
27
27
  }[];
28
28
  };
29
29
  panelTitle: string;
30
+ panelJustify: boolean;
30
31
  panelBodyCreator: (context: BaseEventContext) => any;
31
32
  regions: Array<RegionConfig>;
32
33
  }
@@ -10,21 +10,42 @@ export declare class CollapseGroupPlugin extends BasePlugin {
10
10
  scaffold: {
11
11
  type: string;
12
12
  activeKey: string[];
13
- body: {
13
+ body: ({
14
14
  type: string;
15
15
  key: string;
16
+ active: boolean;
16
17
  header: string;
17
18
  body: {
18
19
  type: string;
19
20
  tpl: string;
20
21
  inline: boolean;
21
22
  }[];
22
- }[];
23
+ } | {
24
+ type: string;
25
+ key: string;
26
+ header: string;
27
+ body: {
28
+ type: string;
29
+ tpl: string;
30
+ inline: boolean;
31
+ }[];
32
+ active?: undefined;
33
+ })[];
23
34
  };
24
35
  previewSchema: {
25
36
  type: string;
26
37
  activeKey: string[];
27
- body: {
38
+ body: ({
39
+ type: string;
40
+ key: string;
41
+ active: boolean;
42
+ header: string;
43
+ body: {
44
+ type: string;
45
+ tpl: string;
46
+ inline: boolean;
47
+ }[];
48
+ } | {
28
49
  type: string;
29
50
  key: string;
30
51
  header: string;
@@ -33,9 +54,12 @@ export declare class CollapseGroupPlugin extends BasePlugin {
33
54
  tpl: string;
34
55
  inline: boolean;
35
56
  }[];
36
- }[];
57
+ active?: undefined;
58
+ })[];
37
59
  };
60
+ activeKeyData: any;
38
61
  panelTitle: string;
62
+ panelJustify: boolean;
39
63
  panelBodyCreator: (context: BaseEventContext) => any[];
40
64
  regions: Array<RegionConfig>;
41
65
  }
@@ -17,5 +17,6 @@ export declare class ContainerPlugin extends BasePlugin {
17
17
  };
18
18
  regions: Array<RegionConfig>;
19
19
  panelTitle: string;
20
- panelBodyCreator: (context: BaseEventContext) => any[];
20
+ panelJustify: boolean;
21
+ panelBodyCreator: (context: BaseEventContext) => any;
21
22
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BasePlugin, RegionConfig } from '../plugin';
2
+ import { BaseEventContext, BasePlugin, RegionConfig } from '../plugin';
3
3
  export declare class DialogPlugin extends BasePlugin {
4
4
  rendererName: string;
5
5
  $schema: string;
@@ -11,8 +11,18 @@ export declare class DialogPlugin extends BasePlugin {
11
11
  show: boolean;
12
12
  };
13
13
  regions: Array<RegionConfig>;
14
+ events: {
15
+ eventName: string;
16
+ eventLabel: string;
17
+ description: string;
18
+ }[];
19
+ actions: {
20
+ actionType: string;
21
+ actionLabel: string;
22
+ description: string;
23
+ }[];
14
24
  panelTitle: string;
15
- panelBody: any[];
25
+ panelBodyCreator: (context: BaseEventContext) => any;
16
26
  buildSubRenderers(): void;
17
27
  }
18
28
  export declare class InlineModal extends React.Component<any, any> {
@@ -1,4 +1,4 @@
1
- import { BasePlugin, RegionConfig } from '../plugin';
1
+ import { BaseEventContext, BasePlugin, RegionConfig } from '../plugin';
2
2
  import { InlineModal } from './Dialog';
3
3
  export declare class DrawerPlugin extends BasePlugin {
4
4
  rendererName: string;
@@ -12,7 +12,17 @@ export declare class DrawerPlugin extends BasePlugin {
12
12
  show: boolean;
13
13
  };
14
14
  regions: Array<RegionConfig>;
15
+ events: {
16
+ eventName: string;
17
+ eventLabel: string;
18
+ description: string;
19
+ }[];
20
+ actions: {
21
+ actionType: string;
22
+ actionLabel: string;
23
+ description: string;
24
+ }[];
15
25
  panelTitle: string;
16
- panelBody: any[];
26
+ panelBodyCreator: (context: BaseEventContext) => any;
17
27
  buildSubRenderers(): void;
18
28
  }
@@ -12,30 +12,30 @@ export declare class DropDownButtonPlugin extends BasePlugin {
12
12
  type: string;
13
13
  label: string;
14
14
  buttons: {
15
+ onEvent: {
16
+ click: {
17
+ actions: never[];
18
+ };
19
+ };
15
20
  type: string;
16
21
  label: string;
17
- actionType: string;
18
- dialog: {
19
- title: string;
20
- body: string;
21
- };
22
22
  }[];
23
23
  };
24
24
  previewSchema: {
25
25
  type: string;
26
26
  label: string;
27
27
  buttons: {
28
+ onEvent: {
29
+ click: {
30
+ actions: never[];
31
+ };
32
+ };
28
33
  type: string;
29
34
  label: string;
30
- actionType: string;
31
- dialog: {
32
- title: string;
33
- body: string;
34
- };
35
35
  }[];
36
36
  };
37
37
  panelTitle: string;
38
- panelBodyCreator: (context: BaseEventContext) => any;
38
+ panelBodyCreator: (context: BaseEventContext) => any[];
39
39
  buildEditorToolbar({ id, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
40
40
  editDetail(id: string): void;
41
41
  buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
@@ -1,4 +1,5 @@
1
- import { BasePlugin } from '../../plugin';
1
+ import { BasePlugin, BaseEventContext } from '../../plugin';
2
+ import { RendererAction, RendererEvent } from '../../event-action';
2
3
  export declare class ButtonGroupControlPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -17,6 +18,10 @@ export declare class ButtonGroupControlPlugin extends BasePlugin {
17
18
  }[];
18
19
  };
19
20
  previewSchema: any;
21
+ notRenderFormZone: boolean;
20
22
  panelTitle: string;
21
- panelBody: any[];
23
+ events: RendererEvent[];
24
+ actions: RendererAction[];
25
+ panelJustify: boolean;
26
+ panelBodyCreator: (context: BaseEventContext) => any[];
22
27
  }
@@ -1,4 +1,4 @@
1
- import { BasePlugin, RegionConfig } from '../../plugin';
1
+ import { BasePlugin, RegionConfig, BaseEventContext } from '../../plugin';
2
2
  export declare class ButtonToolbarControlPlugin extends BasePlugin {
3
3
  rendererName: string;
4
4
  $schema: string;
@@ -11,17 +11,18 @@ export declare class ButtonToolbarControlPlugin extends BasePlugin {
11
11
  scaffold: {
12
12
  type: string;
13
13
  buttons: {
14
+ onEvent: {
15
+ click: {
16
+ actions: never[];
17
+ };
18
+ };
14
19
  type: string;
15
20
  label: string;
16
- actionType: string;
17
- dialog: {
18
- title: string;
19
- body: string;
20
- };
21
21
  }[];
22
22
  };
23
23
  previewSchema: any;
24
24
  regions: Array<RegionConfig>;
25
+ notRenderFormZone: boolean;
25
26
  panelTitle: string;
26
- panelBody: any[];
27
+ panelBodyCreator: (context: BaseEventContext) => any[];
27
28
  }
@@ -1,4 +1,5 @@
1
1
  import { BasePlugin } from '../../plugin';
2
+ import { RendererAction, RendererEvent } from '../../event-action';
2
3
  export declare class ChainedSelectControlPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -14,6 +15,8 @@ export declare class ChainedSelectControlPlugin extends BasePlugin {
14
15
  name: string;
15
16
  };
16
17
  previewSchema: any;
18
+ events: RendererEvent[];
19
+ actions: RendererAction[];
17
20
  panelTitle: string;
18
21
  panelBody: any[];
19
22
  }
@@ -1,4 +1,5 @@
1
- import { BasePlugin } from '../../plugin';
1
+ import { BasePlugin, BaseEventContext } from '../../plugin';
2
+ import { RendererAction, RendererEvent } from '../../event-action';
2
3
  export declare class CheckboxControlPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -14,6 +15,10 @@ export declare class CheckboxControlPlugin extends BasePlugin {
14
15
  name: string;
15
16
  };
16
17
  previewSchema: any;
18
+ notRenderFormZone: boolean;
17
19
  panelTitle: string;
18
- panelBody: any[];
20
+ panelJustify: boolean;
21
+ events: RendererEvent[];
22
+ actions: RendererAction[];
23
+ panelBodyCreator: (context: BaseEventContext) => any;
19
24
  }
@@ -1,4 +1,5 @@
1
- import { BasePlugin } from '../../plugin';
1
+ import { BasePlugin, BaseEventContext } from '../../plugin';
2
+ import { RendererAction, RendererEvent } from '../../event-action';
2
3
  export declare class CheckboxesControlPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -13,12 +14,17 @@ export declare class CheckboxesControlPlugin extends BasePlugin {
13
14
  type: string;
14
15
  label: string;
15
16
  name: string;
17
+ multiple: boolean;
16
18
  options: {
17
19
  label: string;
18
20
  value: string;
19
21
  }[];
20
22
  };
21
23
  previewSchema: any;
24
+ notRenderFormZone: boolean;
22
25
  panelTitle: string;
23
- panelBody: any[];
26
+ events: RendererEvent[];
27
+ actions: RendererAction[];
28
+ panelJustify: boolean;
29
+ panelBodyCreator: (context: BaseEventContext) => any;
24
30
  }
@@ -1,4 +1,6 @@
1
1
  import { BasePlugin } from '../../plugin';
2
+ import type { BaseEventContext } from '../../plugin';
3
+ import { RendererAction, RendererEvent } from '../../event-action';
2
4
  export declare class CodeEditorControlPlugin extends BasePlugin {
3
5
  rendererName: string;
4
6
  $schema: string;
@@ -14,27 +16,10 @@ export declare class CodeEditorControlPlugin extends BasePlugin {
14
16
  name: string;
15
17
  };
16
18
  previewSchema: any;
19
+ events: RendererEvent[];
20
+ actions: RendererAction[];
21
+ notRenderFormZone: boolean;
17
22
  panelTitle: string;
18
- panelBody: ({
19
- label: string;
20
- name: string;
21
- type: string;
22
- value: string;
23
- searchable: boolean;
24
- options: string[];
25
- size?: undefined;
26
- pipeIn?: undefined;
27
- } | {
28
- name: string;
29
- type: string;
30
- size: string;
31
- pipeIn: (value: any) => any;
32
- label: string;
33
- options: {
34
- label: string;
35
- value: string;
36
- }[];
37
- value?: undefined;
38
- searchable?: undefined;
39
- })[];
23
+ panelJustify: boolean;
24
+ panelBodyCreator: (context: BaseEventContext) => any;
40
25
  }
@@ -1,4 +1,5 @@
1
1
  import { BaseEventContext, BasePlugin, BasicToolbarItem, ContextMenuEventContext, ContextMenuItem } from '../../plugin';
2
+ import { RendererAction, RendererEvent } from '../../event-action';
2
3
  export declare class ComboControlPlugin extends BasePlugin {
3
4
  rendererName: string;
4
5
  $schema: string;
@@ -29,6 +30,8 @@ export declare class ComboControlPlugin extends BasePlugin {
29
30
  })[];
30
31
  };
31
32
  previewSchema: any;
33
+ events: RendererEvent[];
34
+ actions: RendererAction[];
32
35
  panelTitle: string;
33
36
  panelBodyCreator: (context: BaseEventContext) => any[];
34
37
  filterProps(props: any): any;
@@ -1,4 +1,4 @@
1
- import { BasePlugin, RegionConfig } from '../../plugin';
1
+ import { BasePlugin, RegionConfig, BaseEventContext } from '../../plugin';
2
2
  export declare class ControlPlugin extends BasePlugin {
3
3
  rendererName: string;
4
4
  $schema: string;
@@ -8,6 +8,10 @@ export declare class ControlPlugin extends BasePlugin {
8
8
  description: string;
9
9
  docLink: string;
10
10
  tags: string[];
11
+ /**
12
+ * 组件选择面板中隐藏,和Container合并
13
+ */
14
+ disabledRendererPlugin: boolean;
11
15
  scaffold: {
12
16
  type: string;
13
17
  label: string;
@@ -19,5 +23,5 @@ export declare class ControlPlugin extends BasePlugin {
19
23
  previewSchema: any;
20
24
  regions: Array<RegionConfig>;
21
25
  panelTitle: string;
22
- panelBody: any[];
26
+ panelBodyCreator: (context: BaseEventContext) => any[];
23
27
  }