amis-editor 4.1.0-beta.4 → 4.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/Breadcrumb.d.ts +23 -2
- package/dist/component/ClassNameControl.d.ts +1 -1
- package/dist/component/Control/APIControl.d.ts +2 -2
- package/dist/component/Control/OptionControl.d.ts +3 -3
- package/dist/component/Control/PopoverEdit.d.ts +4 -4
- package/dist/component/Control/ValidationControl.d.ts +1 -1
- package/dist/component/Editor.d.ts +20 -1
- package/dist/component/IFramePreview.d.ts +2 -1
- package/dist/component/NodeWrapper.d.ts +1 -1
- package/dist/component/Panel/RenderersPanel.d.ts +1 -2
- package/dist/component/Preview.d.ts +3 -1
- package/dist/component/RegionWrapper.d.ts +4 -0
- package/dist/component/ScaffoldModal.d.ts +1 -1
- package/dist/component/VRenderer.d.ts +4 -0
- package/dist/component/base/InputComponentName.d.ts +1 -1
- package/dist/component/base/SearchCustomRendererPanel.d.ts +15 -0
- package/dist/component/base/SearchPanel.d.ts +83 -0
- package/dist/component/base/SearchRendererPanel.d.ts +2 -42
- package/dist/component/base/ShortcutKey.d.ts +23 -0
- package/dist/env.d.ts +1 -1
- package/dist/exports.min.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +16 -4
- package/dist/plugin/Alert.d.ts +1 -1
- package/dist/plugin/Button.d.ts +1 -1
- package/dist/plugin/Card.d.ts +1 -0
- package/dist/plugin/Cards.d.ts +2 -1
- package/dist/plugin/Carousel.d.ts +1 -0
- package/dist/plugin/Chart.d.ts +1 -0
- package/dist/plugin/Collapse.d.ts +1 -0
- package/dist/plugin/Custom.d.ts +3 -0
- package/dist/plugin/CustomRegion.d.ts +40 -0
- package/dist/plugin/Dialog.d.ts +1 -1
- package/dist/plugin/Drawer.d.ts +1 -1
- package/dist/plugin/DropDownButton.d.ts +1 -1
- package/dist/plugin/Each.d.ts +1 -1
- package/dist/plugin/Flex.d.ts +1 -0
- package/dist/plugin/Form/Control.d.ts +1 -0
- package/dist/plugin/Form/Form.d.ts +19 -3
- package/dist/plugin/Form/Formula.d.ts +3 -3
- package/dist/plugin/Form/InputURL.d.ts +1 -0
- package/dist/plugin/Form/Switch.d.ts +2 -0
- package/dist/plugin/Grid.d.ts +1 -0
- package/dist/plugin/HBox.d.ts +1 -0
- package/dist/plugin/IFrame.d.ts +3 -3
- package/dist/plugin/Json.d.ts +1 -0
- package/dist/plugin/List.d.ts +2 -1
- package/dist/plugin/Mapping.d.ts +1 -0
- package/dist/plugin/Markdown.d.ts +1 -0
- package/dist/plugin/Nav.d.ts +1 -0
- package/dist/plugin/Page.d.ts +1 -1
- package/dist/plugin/Panel/Outline.d.ts +8 -0
- package/dist/plugin/Progress.d.ts +1 -0
- package/dist/plugin/QRCode.d.ts +1 -0
- package/dist/plugin/Reset.d.ts +0 -1
- package/dist/plugin/Service.d.ts +1 -0
- package/dist/plugin/Sparkline.d.ts +1 -0
- package/dist/plugin/Status.d.ts +1 -0
- package/dist/plugin/Steps.d.ts +1 -0
- package/dist/plugin/Submit.d.ts +0 -1
- package/dist/plugin/Table.d.ts +1 -1
- package/dist/plugin/TableView.d.ts +1 -0
- package/dist/plugin/Tasks.d.ts +1 -0
- package/dist/plugin/TooltipWrapper.d.ts +1 -0
- package/dist/plugin/Video.d.ts +1 -0
- package/dist/plugin/WebComponent.d.ts +1 -0
- package/dist/plugin/Wizard.d.ts +11 -2
- package/dist/plugin/Wrapper.d.ts +1 -0
- package/dist/plugin.d.ts +8 -7
- package/dist/store/editor.d.ts +58 -22
- package/dist/store/node.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/util.d.ts +1 -1
- package/package.json +9 -3
- package/src/component/schemaTpl.tsx +2157 -0
- package/src/plugin/Alert.tsx +87 -0
- package/src/plugin/AnchorNav.tsx +233 -0
- package/src/plugin/Audio.tsx +154 -0
- package/src/plugin/Avatar.tsx +77 -0
- package/src/plugin/Breadcrumb.tsx +107 -0
- package/src/plugin/Button.tsx +281 -0
- package/src/plugin/ButtonGroup.tsx +85 -0
- package/src/plugin/ButtonToolbar.tsx +87 -0
- package/src/plugin/CRUD.tsx +1835 -0
- package/src/plugin/Card.tsx +290 -0
- package/src/plugin/Cards.tsx +318 -0
- package/src/plugin/Carousel.tsx +377 -0
- package/src/plugin/Chart.tsx +218 -0
- package/src/plugin/CodeView.tsx +60 -0
- package/src/plugin/Collapse.tsx +136 -0
- package/src/plugin/CollapseGroup.tsx +167 -0
- package/src/plugin/Container.tsx +40 -0
- package/src/plugin/Custom.tsx +128 -0
- package/src/plugin/CustomRegion.tsx +156 -0
- package/src/plugin/Date.tsx +74 -0
- package/src/plugin/Datetime.tsx +68 -0
- package/src/plugin/Dialog.tsx +176 -0
- package/src/plugin/Divider.tsx +36 -0
- package/src/plugin/Drawer.tsx +214 -0
- package/src/plugin/DropDownButton.tsx +235 -0
- package/src/plugin/Each.tsx +150 -0
- package/src/plugin/ErrorRenderer.tsx +15 -0
- package/src/plugin/Flex.tsx +151 -0
- package/src/plugin/Form/ButtonGroupSelect.tsx +75 -0
- package/src/plugin/Form/ButtonToolbar.tsx +110 -0
- package/src/plugin/Form/ChainedSelect.tsx +70 -0
- package/src/plugin/Form/Checkbox.tsx +87 -0
- package/src/plugin/Form/Checkboxes.tsx +167 -0
- package/src/plugin/Form/CodeEditor.tsx +81 -0
- package/src/plugin/Form/Combo.tsx +582 -0
- package/src/plugin/Form/ConditionBuilder.tsx +315 -0
- package/src/plugin/Form/Control.tsx +139 -0
- package/src/plugin/Form/DiffEditor.tsx +111 -0
- package/src/plugin/Form/FieldSet.tsx +163 -0
- package/src/plugin/Form/Form.tsx +687 -0
- package/src/plugin/Form/Formula.tsx +79 -0
- package/src/plugin/Form/Group.tsx +295 -0
- package/src/plugin/Form/Hidden.tsx +44 -0
- package/src/plugin/Form/InputArray.tsx +228 -0
- package/src/plugin/Form/InputCity.tsx +93 -0
- package/src/plugin/Form/InputColor.tsx +123 -0
- package/src/plugin/Form/InputDate.tsx +175 -0
- package/src/plugin/Form/InputDateRange.tsx +225 -0
- package/src/plugin/Form/InputDateTime.tsx +183 -0
- package/src/plugin/Form/InputDateTimeRange.tsx +221 -0
- package/src/plugin/Form/InputEmail.tsx +33 -0
- package/src/plugin/Form/InputExcel.tsx +85 -0
- package/src/plugin/Form/InputFile.tsx +221 -0
- package/src/plugin/Form/InputGroup.tsx +96 -0
- package/src/plugin/Form/InputImage.tsx +266 -0
- package/src/plugin/Form/InputKV.tsx +72 -0
- package/src/plugin/Form/InputMonth.tsx +35 -0
- package/src/plugin/Form/InputMonthRange.tsx +195 -0
- package/src/plugin/Form/InputNumber.tsx +89 -0
- package/src/plugin/Form/InputPassword.tsx +33 -0
- package/src/plugin/Form/InputQuarter.tsx +35 -0
- package/src/plugin/Form/InputQuarterRange.tsx +195 -0
- package/src/plugin/Form/InputRange.tsx +121 -0
- package/src/plugin/Form/InputRating.tsx +78 -0
- package/src/plugin/Form/InputRepeat.tsx +57 -0
- package/src/plugin/Form/InputRichText.tsx +186 -0
- package/src/plugin/Form/InputSubForm.tsx +189 -0
- package/src/plugin/Form/InputTable.tsx +434 -0
- package/src/plugin/Form/InputTag.tsx +70 -0
- package/src/plugin/Form/InputText.tsx +186 -0
- package/src/plugin/Form/InputTime.tsx +85 -0
- package/src/plugin/Form/InputTree.tsx +229 -0
- package/src/plugin/Form/InputURL.tsx +34 -0
- package/src/plugin/Form/InputYear.tsx +35 -0
- package/src/plugin/Form/Item.tsx +327 -0
- package/src/plugin/Form/ListSelect.tsx +73 -0
- package/src/plugin/Form/LocationPicker.tsx +62 -0
- package/src/plugin/Form/MatrixCheckboxes.tsx +136 -0
- package/src/plugin/Form/NestedSelect.tsx +211 -0
- package/src/plugin/Form/Picker.tsx +209 -0
- package/src/plugin/Form/Radios.tsx +119 -0
- package/src/plugin/Form/Select.tsx +233 -0
- package/src/plugin/Form/Static.tsx +322 -0
- package/src/plugin/Form/Switch.tsx +107 -0
- package/src/plugin/Form/TabsTransfer.tsx +259 -0
- package/src/plugin/Form/Textarea.tsx +83 -0
- package/src/plugin/Form/Transfer.tsx +368 -0
- package/src/plugin/Form/TreeSelect.tsx +263 -0
- package/src/plugin/Form/UUID.tsx +48 -0
- package/src/plugin/Grid.tsx +798 -0
- package/src/plugin/HBox.tsx +727 -0
- package/src/plugin/IFrame.tsx +70 -0
- package/src/plugin/Image.tsx +314 -0
- package/src/plugin/Images.tsx +231 -0
- package/src/plugin/Json.tsx +69 -0
- package/src/plugin/Link.tsx +93 -0
- package/src/plugin/List.tsx +278 -0
- package/src/plugin/ListItem.tsx +229 -0
- package/src/plugin/Log.tsx +52 -0
- package/src/plugin/Mapping.tsx +149 -0
- package/src/plugin/Markdown.tsx +47 -0
- package/src/plugin/Nav.tsx +184 -0
- package/src/plugin/Operation.tsx +95 -0
- package/src/plugin/Others/Action.tsx +426 -0
- package/src/plugin/Others/BasicToolbar.tsx +585 -0
- package/src/plugin/Others/DataDebug.tsx +134 -0
- package/src/plugin/Others/TableCell.tsx +480 -0
- package/src/plugin/Others/Unknown.tsx +37 -0
- package/src/plugin/Page.tsx +306 -0
- package/src/plugin/Panel/AvailableRenderers.tsx +41 -0
- package/src/plugin/Panel/Code.tsx +44 -0
- package/src/plugin/Panel/Name.tsx +26 -0
- package/src/plugin/Panel/Outline.tsx +40 -0
- package/src/plugin/Panel.tsx +243 -0
- package/src/plugin/Plain.tsx +84 -0
- package/src/plugin/Progress.tsx +125 -0
- package/src/plugin/Property.tsx +139 -0
- package/src/plugin/QRCode.tsx +96 -0
- package/src/plugin/Reset.tsx +23 -0
- package/src/plugin/Service.tsx +162 -0
- package/src/plugin/Sparkline.tsx +40 -0
- package/src/plugin/Status.tsx +76 -0
- package/src/plugin/Steps.tsx +128 -0
- package/src/plugin/Submit.tsx +23 -0
- package/src/plugin/Table.tsx +428 -0
- package/src/plugin/TableView.tsx +709 -0
- package/src/plugin/Tabs.tsx +362 -0
- package/src/plugin/Tasks.tsx +274 -0
- package/src/plugin/Time.tsx +68 -0
- package/src/plugin/TooltipWrapper.tsx +193 -0
- package/src/plugin/Tpl.tsx +158 -0
- package/src/plugin/Video.tsx +158 -0
- package/src/plugin/WebComponent.tsx +53 -0
- package/src/plugin/Wizard.tsx +740 -0
- package/src/plugin/Wrapper.tsx +107 -0
- package/src/plugin.ts +1050 -0
- package/dist/150a58f3318ca7541ed9.png +0 -0
- package/dist/471adb97c322b226e589.png +0 -0
- package/dist/4de5f42360bc5946c3c2.png +0 -0
- package/dist/4e9968bba3855f088fed.png +0 -0
- package/dist/7f09c38ebc687fea847a.png +0 -0
- package/dist/c94073576487510314ea.png +0 -0
package/dist/manager.d.ts
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* @file 把一些功能性的东西放在了这个里面,辅助 compoennt/Editor.tsx 组件的。
|
|
5
5
|
* 编辑器非 UI 相关的东西应该放在这。
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { 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
|
-
import { SchemaObject } from 'amis';
|
|
11
10
|
import { EditorNodeType } from './store/node';
|
|
12
11
|
import { EditorProps } from './component/Editor';
|
|
13
12
|
import { EditorDNDManager } from './dnd';
|
|
13
|
+
import { SchemaObject } from 'amis/lib/Schema';
|
|
14
|
+
import type { RendererConfig } from 'amis-core/lib/factory';
|
|
14
15
|
export interface EditorManagerConfig extends Omit<EditorProps, 'value' | 'onChange'> {
|
|
15
16
|
}
|
|
16
17
|
export interface PluginClass {
|
|
@@ -48,6 +49,7 @@ export declare class EditorManager {
|
|
|
48
49
|
readonly hackIn: any;
|
|
49
50
|
constructor(config: EditorManagerConfig, store: EditorStoreType, parent?: EditorManager | undefined);
|
|
50
51
|
dynamicAddPlugin(pluginName: string): void;
|
|
52
|
+
buildRenderersAndPanels(): void;
|
|
51
53
|
buildEventContext(idOrNode: string | EditorNodeType): {
|
|
52
54
|
node: {
|
|
53
55
|
parentId: string;
|
|
@@ -80,6 +82,8 @@ export declare class EditorManager {
|
|
|
80
82
|
readonly clickable: boolean;
|
|
81
83
|
readonly draggable: boolean;
|
|
82
84
|
readonly moveable: boolean;
|
|
85
|
+
readonly canMoveUp: boolean;
|
|
86
|
+
readonly canMoveDown: boolean;
|
|
83
87
|
readonly removable: boolean;
|
|
84
88
|
readonly duplicatable: boolean;
|
|
85
89
|
readonly replaceable: boolean;
|
|
@@ -158,6 +162,8 @@ export declare class EditorManager {
|
|
|
158
162
|
readonly clickable: boolean;
|
|
159
163
|
readonly draggable: boolean;
|
|
160
164
|
readonly moveable: boolean;
|
|
165
|
+
readonly canMoveUp: boolean;
|
|
166
|
+
readonly canMoveDown: boolean;
|
|
161
167
|
readonly removable: boolean;
|
|
162
168
|
readonly duplicatable: boolean;
|
|
163
169
|
readonly replaceable: boolean;
|
|
@@ -219,8 +225,8 @@ export declare class EditorManager {
|
|
|
219
225
|
buildJSONSchemaUri(): void;
|
|
220
226
|
buildToolbars(): void;
|
|
221
227
|
collectPanels(node: EditorNodeType, triggerEvent?: boolean, secondFactor?: boolean): BasicPanelItem[];
|
|
222
|
-
buildPanels(): void;
|
|
223
|
-
collectRenderers(region?: string,
|
|
228
|
+
buildPanels(curRendererId?: string): void;
|
|
229
|
+
collectRenderers(region?: string, activeContainerId?: string): Promise<SubRendererInfo[]>;
|
|
224
230
|
buildRenderers(region?: string): Promise<void>;
|
|
225
231
|
rebuild(): Promise<void>;
|
|
226
232
|
/**
|
|
@@ -260,6 +266,12 @@ export declare class EditorManager {
|
|
|
260
266
|
* 备注:可以根据渲染器ID添加新元素,也可以根据现有schema片段添加新元素
|
|
261
267
|
*/
|
|
262
268
|
addElem(rendererIdOrSchema: string | Object): Promise<void>;
|
|
269
|
+
/**
|
|
270
|
+
* 在当前选中元素追加新的schema
|
|
271
|
+
* 备注:目前主要用在复制&粘贴快捷功能键中
|
|
272
|
+
* @param rendererSchema
|
|
273
|
+
*/
|
|
274
|
+
appendSiblingSchema(rendererSchema: Object): Promise<void>;
|
|
263
275
|
/**
|
|
264
276
|
* 给插入面板使用的,将当前选中的节点插入到当前选中的节点容器内。
|
|
265
277
|
* @param position
|
package/dist/plugin/Alert.d.ts
CHANGED
package/dist/plugin/Button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchemaObject } from 'amis';
|
|
2
1
|
import { BaseEventContext, BasePlugin, BasicRendererInfo, RendererInfoResolveEventContext } from '../plugin';
|
|
2
|
+
import { SchemaObject } from 'amis/lib/Schema';
|
|
3
3
|
export declare class ButtonPlugin extends BasePlugin {
|
|
4
4
|
rendererName: string;
|
|
5
5
|
$schema: string;
|
package/dist/plugin/Card.d.ts
CHANGED
package/dist/plugin/Cards.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -64,7 +65,7 @@ export declare class CardsPlugin extends BasePlugin {
|
|
|
64
65
|
panelBodyCreator: (context: BaseEventContext) => any[];
|
|
65
66
|
editDetail(id: string): void;
|
|
66
67
|
buildEditorToolbar({ id, info, schema }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
67
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
68
|
+
buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
68
69
|
filterProps(props: any): any;
|
|
69
70
|
getRendererInfo(context: RendererInfoResolveEventContext): BasicRendererInfo | void;
|
|
70
71
|
}
|
package/dist/plugin/Chart.d.ts
CHANGED
package/dist/plugin/Custom.d.ts
CHANGED
|
@@ -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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 自定义代码
|
|
3
|
+
*/
|
|
4
|
+
import { BasePlugin, BasicRendererInfo, RendererInfoResolveEventContext, RegionConfig } 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
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
previewSchema: {
|
|
25
|
+
type: string;
|
|
26
|
+
html: string;
|
|
27
|
+
onMount: string;
|
|
28
|
+
body: {
|
|
29
|
+
type: string;
|
|
30
|
+
tpl: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
regions: Array<RegionConfig>;
|
|
34
|
+
panelTitle: string;
|
|
35
|
+
panelBody: any[];
|
|
36
|
+
/**
|
|
37
|
+
* 备注: 根据当前custom组件的schema中是否有body元素来启动容器模式,用于实现custom组件实现自定义容器类型
|
|
38
|
+
*/
|
|
39
|
+
getRendererInfo(context: RendererInfoResolveEventContext): BasicRendererInfo | void;
|
|
40
|
+
}
|
package/dist/plugin/Dialog.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class DialogPlugin extends BasePlugin {
|
|
|
7
7
|
isBaseComponent: boolean;
|
|
8
8
|
wrapperProps: {
|
|
9
9
|
wrapperComponent: typeof InlineModal;
|
|
10
|
-
onClose: typeof import("amis
|
|
10
|
+
onClose: typeof import("amis-core").noop;
|
|
11
11
|
show: boolean;
|
|
12
12
|
};
|
|
13
13
|
regions: Array<RegionConfig>;
|
package/dist/plugin/Drawer.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class DrawerPlugin extends BasePlugin {
|
|
|
7
7
|
isBaseComponent: boolean;
|
|
8
8
|
wrapperProps: {
|
|
9
9
|
wrapperComponent: typeof InlineModal;
|
|
10
|
-
onClose: typeof import("amis
|
|
10
|
+
onClose: typeof import("amis-core").noop;
|
|
11
11
|
resizable: boolean;
|
|
12
12
|
show: boolean;
|
|
13
13
|
};
|
|
@@ -38,6 +38,6 @@ export declare class DropDownButtonPlugin extends BasePlugin {
|
|
|
38
38
|
panelBodyCreator: (context: BaseEventContext) => any;
|
|
39
39
|
buildEditorToolbar({ id, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
40
40
|
editDetail(id: string): void;
|
|
41
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
41
|
+
buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
42
42
|
filterProps(props: any): any;
|
|
43
43
|
}
|
package/dist/plugin/Each.d.ts
CHANGED
|
@@ -30,6 +30,6 @@ export declare class EachPlugin extends BasePlugin {
|
|
|
30
30
|
panelBodyCreator: (context: BaseEventContext) => any[];
|
|
31
31
|
filterProps(props: any): any;
|
|
32
32
|
buildEditorToolbar({ id, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
33
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
33
|
+
buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
34
34
|
editDetail(id: string): void;
|
|
35
35
|
}
|
package/dist/plugin/Flex.d.ts
CHANGED
|
@@ -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:
|
|
14
|
-
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { BasePlugin } from '../../plugin';
|
|
3
3
|
export declare class FormulaControlPlugin extends BasePlugin {
|
|
4
4
|
rendererName: string;
|
|
@@ -40,10 +40,10 @@ export declare class FormulaControlPlugin extends BasePlugin {
|
|
|
40
40
|
mode: string;
|
|
41
41
|
className: string;
|
|
42
42
|
})[];
|
|
43
|
-
renderRenderer(props: any):
|
|
43
|
+
renderRenderer(props: any): import("react").DetailedReactHTMLElement<{
|
|
44
44
|
key: any;
|
|
45
45
|
className: string;
|
|
46
|
-
children:
|
|
46
|
+
children: import("react").DetailedReactHTMLElement<{
|
|
47
47
|
className: string;
|
|
48
48
|
children: string;
|
|
49
49
|
}, HTMLElement>;
|
package/dist/plugin/Grid.d.ts
CHANGED
package/dist/plugin/HBox.d.ts
CHANGED
package/dist/plugin/IFrame.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { BasePlugin } from '../plugin';
|
|
3
3
|
export declare class IFramePlugin extends BasePlugin {
|
|
4
4
|
rendererName: string;
|
|
@@ -18,10 +18,10 @@ export declare class IFramePlugin extends BasePlugin {
|
|
|
18
18
|
};
|
|
19
19
|
panelTitle: string;
|
|
20
20
|
panelBody: any[];
|
|
21
|
-
renderRenderer(props: any):
|
|
21
|
+
renderRenderer(props: any): import("react").DetailedReactHTMLElement<{
|
|
22
22
|
key: any;
|
|
23
23
|
className: string;
|
|
24
|
-
children:
|
|
24
|
+
children: import("react").DetailedReactHTMLElement<{
|
|
25
25
|
className: string;
|
|
26
26
|
children: string;
|
|
27
27
|
}, HTMLElement>;
|
package/dist/plugin/Json.d.ts
CHANGED
package/dist/plugin/List.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -49,6 +50,6 @@ export declare class ListPlugin extends BasePlugin {
|
|
|
49
50
|
};
|
|
50
51
|
editDetail(id: string): void;
|
|
51
52
|
buildEditorToolbar({ id, info, schema }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
52
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
53
|
+
buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
53
54
|
getRendererInfo(context: RendererInfoResolveEventContext): BasicRendererInfo | void;
|
|
54
55
|
}
|
package/dist/plugin/Mapping.d.ts
CHANGED
package/dist/plugin/Nav.d.ts
CHANGED
package/dist/plugin/Page.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SchemaObject } from 'amis';
|
|
2
1
|
import { ContainerWrapper } from '../component/ContainerWrapper';
|
|
3
2
|
import { BasePlugin } from '../plugin';
|
|
3
|
+
import type { SchemaObject } from 'amis/lib/Schema';
|
|
4
4
|
export declare class PagePlugin extends BasePlugin {
|
|
5
5
|
rendererName: string;
|
|
6
6
|
$schema: string;
|
|
@@ -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
|
+
}
|
package/dist/plugin/QRCode.d.ts
CHANGED
package/dist/plugin/Reset.d.ts
CHANGED
package/dist/plugin/Service.d.ts
CHANGED
package/dist/plugin/Status.d.ts
CHANGED
package/dist/plugin/Steps.d.ts
CHANGED
package/dist/plugin/Submit.d.ts
CHANGED
package/dist/plugin/Table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchemaObject } from 'amis';
|
|
2
1
|
import { BasePlugin, BaseEventContext, PluginEvent, RegionConfig, RendererInfoResolveEventContext, BasicRendererInfo, InsertEventContext, ScaffoldForm } from '../plugin';
|
|
2
|
+
import { SchemaObject } from 'amis/lib/Schema';
|
|
3
3
|
export declare class TablePlugin extends BasePlugin {
|
|
4
4
|
rendererName: string;
|
|
5
5
|
$schema: string;
|
package/dist/plugin/Tasks.d.ts
CHANGED
package/dist/plugin/Video.d.ts
CHANGED
package/dist/plugin/Wizard.d.ts
CHANGED
|
@@ -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:
|
|
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;
|
package/dist/plugin/Wrapper.d.ts
CHANGED
package/dist/plugin.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file 定义插件的 interface,以及提供一个 BasePlugin 基类,把一些通用的方法放在这。
|
|
3
3
|
*/
|
|
4
|
-
import { BaseSchema } from 'amis';
|
|
5
|
-
import { MenuDivider, MenuItem } from 'amis/lib/components/ContextMenu';
|
|
6
|
-
import { RendererConfig } from 'amis/lib/factory';
|
|
7
4
|
import { RegionWrapperProps } from './component/RegionWrapper';
|
|
8
5
|
import { EditorManager } from './manager';
|
|
9
6
|
import { EditorStoreType } from './store/editor';
|
|
@@ -12,6 +9,9 @@ import { DNDModeInterface } from './dnd/interface';
|
|
|
12
9
|
import { EditorDNDManager } from './dnd';
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import { DiffChange } from './util';
|
|
12
|
+
import type { RendererConfig } from 'amis-core/lib/factory';
|
|
13
|
+
import type { MenuDivider, MenuItem } from 'amis-ui/lib/components/ContextMenu';
|
|
14
|
+
import type { BaseSchema } from 'amis/lib/Schema';
|
|
15
15
|
/**
|
|
16
16
|
* 区域的定义,容器渲染器都需要定义区域信息。
|
|
17
17
|
*/
|
|
@@ -281,10 +281,10 @@ export interface ToolbarItem {
|
|
|
281
281
|
level?: 'primary' | 'secondary' | 'special';
|
|
282
282
|
className?: string;
|
|
283
283
|
draggable?: boolean;
|
|
284
|
-
onDragStart?: (e:
|
|
284
|
+
onDragStart?: (e: any) => void;
|
|
285
285
|
icon?: string;
|
|
286
286
|
iconSvg?: string;
|
|
287
|
-
onClick?: (e:
|
|
287
|
+
onClick?: (e: any) => void;
|
|
288
288
|
tooltip?: string;
|
|
289
289
|
placement?: 'top' | 'bottom' | 'right' | 'left';
|
|
290
290
|
}
|
|
@@ -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';
|
|
@@ -475,6 +475,7 @@ export interface PluginEventListener {
|
|
|
475
475
|
onDndAccept?: (event: PluginEvent<DragEventContext>) => false | void;
|
|
476
476
|
onBuildPanels?: (event: PluginEvent<BuildPanelEventContext>) => void;
|
|
477
477
|
onBuildContextMenus?: (event: PluginEvent<ContextMenuEventContext>) => void;
|
|
478
|
+
onBuildToolbars?: (event: PluginEvent<BaseEventContext>) => void;
|
|
478
479
|
onSelectionChange?: (event: PluginEvent<SelectionEventContext>) => void;
|
|
479
480
|
onPreventClick?: (event: PluginEvent<PreventClickEventContext>) => false | void;
|
|
480
481
|
onWidthChangeStart?: (event: PluginEvent<ResizeMoveEventContext, {
|
|
@@ -586,7 +587,7 @@ export declare abstract class BasePlugin implements PluginInterface {
|
|
|
586
587
|
* @param info
|
|
587
588
|
* @param menus
|
|
588
589
|
*/
|
|
589
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
590
|
+
buildEditorContextMenu({ id, schema, region, info, selections }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
|
590
591
|
buildEditorToolbar({ id, schema, info }: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
|
591
592
|
renderPlaceholder(text: string, key?: any): React.DetailedReactHTMLElement<{
|
|
592
593
|
key: any;
|