amis-editor-core 6.9.0 → 6.10.0-beta.1
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/esm/component/Editor.d.ts +5 -1
- package/esm/component/ModalForm.d.ts +25 -0
- package/esm/deepSplice.d.ts +12 -0
- package/esm/index.d.ts +4 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +13 -2
- package/esm/plugin.d.ts +13 -0
- package/esm/store/editor.d.ts +25 -36
- package/lib/component/Editor.d.ts +5 -1
- package/lib/component/ModalForm.d.ts +25 -0
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/deepSplice.d.ts +12 -0
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +2 -2
- package/lib/layout/flex.d.ts +0 -1
- package/lib/manager.d.ts +13 -2
- package/lib/plugin.d.ts +13 -0
- package/lib/store/editor.d.ts +25 -36
- package/lib/style.css +1 -1
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { EditorStoreType } from '../store/editor';
|
|
3
3
|
import { EditorManager, PluginClass } from '../manager';
|
|
4
4
|
import { RenderOptions } from 'amis';
|
|
5
|
-
import { PluginEventListener, RendererPluginAction } from '../plugin';
|
|
5
|
+
import { PluginEventListener, RendererPluginAction, IGlobalEvent } from '../plugin';
|
|
6
6
|
import type { SchemaObject } from 'amis';
|
|
7
7
|
import type { VariableGroup, VariableOptions } from '../variable';
|
|
8
8
|
import type { EditorNodeType } from '../store/node';
|
|
@@ -74,6 +74,7 @@ export interface EditorProps extends PluginEventListener {
|
|
|
74
74
|
customActionGetter?: (manager: EditorManager) => {
|
|
75
75
|
[propName: string]: RendererPluginAction;
|
|
76
76
|
};
|
|
77
|
+
globalEventGetter?: (manager: EditorManager) => IGlobalEvent[];
|
|
77
78
|
};
|
|
78
79
|
/** 上下文变量 */
|
|
79
80
|
variables?: VariableGroup[];
|
|
@@ -91,6 +92,9 @@ export interface EditorProps extends PluginEventListener {
|
|
|
91
92
|
getHostNodeDataSchema?: () => Promise<any>;
|
|
92
93
|
getAvaiableContextFields?: (node: EditorNodeType) => Promise<any>;
|
|
93
94
|
readonly?: boolean;
|
|
95
|
+
onEditorMount?: (manager: EditorManager) => void;
|
|
96
|
+
onEditorUnmount?: (manager: EditorManager) => void;
|
|
97
|
+
children?: React.ReactNode | ((manager: EditorManager) => React.ReactNode);
|
|
94
98
|
}
|
|
95
99
|
export default class Editor extends Component<EditorProps> {
|
|
96
100
|
readonly store: EditorStoreType;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditorManager } from '../manager';
|
|
3
|
+
import { EditorStoreType } from '../store/editor';
|
|
4
|
+
export interface ModalFormProps {
|
|
5
|
+
store: EditorStoreType;
|
|
6
|
+
manager: EditorManager;
|
|
7
|
+
theme?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ModalForm extends React.Component<ModalFormProps> {
|
|
10
|
+
handleConfirmClick(): Promise<void>;
|
|
11
|
+
amisScope: any;
|
|
12
|
+
scopeRef(scoped: any): void;
|
|
13
|
+
buildSchema(): {
|
|
14
|
+
type: string;
|
|
15
|
+
wrapWithPanel: boolean;
|
|
16
|
+
mode: string;
|
|
17
|
+
wrapperComponent: string;
|
|
18
|
+
initApi: any;
|
|
19
|
+
api: any;
|
|
20
|
+
body: any[];
|
|
21
|
+
submitOnChange: boolean;
|
|
22
|
+
autoFocus: boolean;
|
|
23
|
+
};
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 深度 splice 数组,同时返回新的对象,按需拷贝,没有副作用
|
|
3
|
+
*
|
|
4
|
+
* 第二个参数可以是一个函数,函数的返回值不为 false 时,表示找到了目标,函数的返回值为 number 时,表示偏移量
|
|
5
|
+
*
|
|
6
|
+
* @param target
|
|
7
|
+
* @param path
|
|
8
|
+
* @param numberToDelete
|
|
9
|
+
* @param items
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare function deepSplice(target: any, path: string | ((value: any, index: number | string, stack: Array<any>) => any), numberToDelete: number, provider?: ((origin: any) => any) | any, ...items: any[]): any;
|
package/esm/index.d.ts
CHANGED
|
@@ -39,6 +39,9 @@ import { UnknownRendererPlugin } from './plugin/Unknown';
|
|
|
39
39
|
import ShortcutKey from './component/base/ShortcutKey';
|
|
40
40
|
import WidthDraggableContainer from './component/base/WidthDraggableContainer';
|
|
41
41
|
import { SchemaFrom } from './component/base/SchemaForm';
|
|
42
|
+
import { RendererThumb } from './component/RendererThumb';
|
|
43
|
+
import { AvailableRenderersPanel } from './component/Panel/AvailableRenderersPanel';
|
|
44
|
+
import { deepSplice } from './deepSplice';
|
|
42
45
|
export declare const version = "__buildVersion";
|
|
43
46
|
export default Editor;
|
|
44
|
-
export { Editor, MiniEditor, utils, mapReactElement, RendererEditor, BasicEditor, CodeEditor, VRenderer, RegionWrapper, IFramePreview as IFrameEditor, SearchPanel, EditorNodeType, EditorNodeSnapshot, EditorStoreType, ContainerWrapper, AvailableRenderersPlugin, BasicToolbarPlugin, CodePlugin, ErrorRendererPlugin, OutlinePlugin, UnknownRendererPlugin, ShortcutKey, SchemaFrom, WidthDraggableContainer };
|
|
47
|
+
export { Editor, MiniEditor, utils, deepSplice, mapReactElement, RendererEditor, BasicEditor, CodeEditor, VRenderer, RegionWrapper, IFramePreview as IFrameEditor, SearchPanel, EditorNodeType, EditorNodeSnapshot, EditorStoreType, ContainerWrapper, AvailableRenderersPlugin, AvailableRenderersPanel, BasicToolbarPlugin, CodePlugin, ErrorRendererPlugin, OutlinePlugin, UnknownRendererPlugin, ShortcutKey, SchemaFrom, WidthDraggableContainer, RendererThumb };
|