amis-editor-core 6.3.0 → 6.4.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 +1 -0
- package/esm/component/Panel/DialogList.d.ts +3 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +2 -1
- package/esm/store/editor.d.ts +10 -9
- package/esm/util.d.ts +2 -2
- package/lib/component/Editor.d.ts +1 -0
- package/lib/component/Panel/DialogList.d.ts +3 -1
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/editor.js +1 -1
- package/lib/index.js +2 -2
- package/lib/manager.d.ts +2 -1
- package/lib/store/editor.d.ts +10 -9
- package/lib/style.css +1 -1
- package/lib/util.d.ts +2 -2
- package/package.json +1 -1
package/esm/manager.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare function unRegisterEditorPlugin(id: string): void;
|
|
|
46
46
|
export declare class EditorManager {
|
|
47
47
|
readonly config: EditorManagerConfig;
|
|
48
48
|
readonly store: EditorStoreType;
|
|
49
|
+
readonly parent?: EditorManager | undefined;
|
|
49
50
|
readonly plugins: Array<PluginInterface>;
|
|
50
51
|
readonly env: RenderOptions;
|
|
51
52
|
toDispose: Array<() => void>;
|
|
@@ -60,7 +61,7 @@ export declare class EditorManager {
|
|
|
60
61
|
dataSchema: DataSchema;
|
|
61
62
|
/** 变量管理 */
|
|
62
63
|
readonly variableManager: VariableManager;
|
|
63
|
-
constructor(config: EditorManagerConfig, store: EditorStoreType);
|
|
64
|
+
constructor(config: EditorManagerConfig, store: EditorStoreType, parent?: EditorManager | undefined);
|
|
64
65
|
normalizeScene(plugins?: Array<PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)]>): (PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)])[];
|
|
65
66
|
dynamicAddPlugin(pluginName: string): void;
|
|
66
67
|
buildRenderersAndPanels(): void;
|
package/esm/store/editor.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface TargetName {
|
|
|
62
62
|
export type EditorModalBody = (DialogSchema | DrawerSchema) & {
|
|
63
63
|
$$id?: string;
|
|
64
64
|
$$ref?: string;
|
|
65
|
+
$$originId?: string;
|
|
65
66
|
actionType?: string;
|
|
66
67
|
};
|
|
67
68
|
export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
@@ -422,7 +423,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
422
423
|
removeChild(child: any): void;
|
|
423
424
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
424
425
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
425
|
-
updateSchema(value: any): void;
|
|
426
|
+
updateSchema(value: any): void;
|
|
426
427
|
updateSchemaStyle(value: any): void;
|
|
427
428
|
setComponent(value: any): void;
|
|
428
429
|
getComponent(): any;
|
|
@@ -858,7 +859,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
858
859
|
removeChild(child: any): void;
|
|
859
860
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
860
861
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
861
|
-
updateSchema(value: any): void;
|
|
862
|
+
updateSchema(value: any): void;
|
|
862
863
|
updateSchemaStyle(value: any): void;
|
|
863
864
|
setComponent(value: any): void;
|
|
864
865
|
getComponent(): any;
|
|
@@ -1221,7 +1222,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1221
1222
|
removeChild(child: any): void;
|
|
1222
1223
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1223
1224
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1224
|
-
updateSchema(value: any): void;
|
|
1225
|
+
updateSchema(value: any): void;
|
|
1225
1226
|
updateSchemaStyle(value: any): void;
|
|
1226
1227
|
setComponent(value: any): void;
|
|
1227
1228
|
getComponent(): any;
|
|
@@ -1606,7 +1607,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1606
1607
|
removeChild(child: any): void;
|
|
1607
1608
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1608
1609
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1609
|
-
updateSchema(value: any): void;
|
|
1610
|
+
updateSchema(value: any): void;
|
|
1610
1611
|
updateSchemaStyle(value: any): void;
|
|
1611
1612
|
setComponent(value: any): void;
|
|
1612
1613
|
getComponent(): any;
|
|
@@ -1969,7 +1970,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
1969
1970
|
removeChild(child: any): void;
|
|
1970
1971
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
1971
1972
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
1972
|
-
updateSchema(value: any): void;
|
|
1973
|
+
updateSchema(value: any): void;
|
|
1973
1974
|
updateSchemaStyle(value: any): void;
|
|
1974
1975
|
setComponent(value: any): void;
|
|
1975
1976
|
getComponent(): any;
|
|
@@ -2333,7 +2334,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2333
2334
|
removeChild(child: any): void;
|
|
2334
2335
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
2335
2336
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
2336
|
-
updateSchema(value: any): void;
|
|
2337
|
+
updateSchema(value: any): void;
|
|
2337
2338
|
updateSchemaStyle(value: any): void;
|
|
2338
2339
|
setComponent(value: any): void;
|
|
2339
2340
|
getComponent(): any;
|
|
@@ -2696,7 +2697,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
2696
2697
|
removeChild(child: any): void;
|
|
2697
2698
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
2698
2699
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
2699
|
-
updateSchema(value: any): void;
|
|
2700
|
+
updateSchema(value: any): void;
|
|
2700
2701
|
updateSchemaStyle(value: any): void;
|
|
2701
2702
|
setComponent(value: any): void;
|
|
2702
2703
|
getComponent(): any;
|
|
@@ -3060,7 +3061,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3060
3061
|
removeChild(child: any): void;
|
|
3061
3062
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
3062
3063
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
3063
|
-
updateSchema(value: any): void;
|
|
3064
|
+
updateSchema(value: any): void;
|
|
3064
3065
|
updateSchemaStyle(value: any): void;
|
|
3065
3066
|
setComponent(value: any): void;
|
|
3066
3067
|
getComponent(): any;
|
|
@@ -3423,7 +3424,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
3423
3424
|
removeChild(child: any): void;
|
|
3424
3425
|
toggleFold(e: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>): void;
|
|
3425
3426
|
patch(store: any, force?: boolean, setPatchInfo?: ((id: string, value: any) => void) | undefined): void;
|
|
3426
|
-
updateSchema(value: any): void;
|
|
3427
|
+
updateSchema(value: any): void;
|
|
3427
3428
|
updateSchemaStyle(value: any): void;
|
|
3428
3429
|
setComponent(value: any): void;
|
|
3429
3430
|
getComponent(): any;
|
package/esm/util.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export declare const updateComponentContext: (variables: any[]) => any[];
|
|
|
160
160
|
* @param selector dom 选择器
|
|
161
161
|
*/
|
|
162
162
|
export declare const scrollToActive: import("lodash").DebouncedFunc<(selector: string) => void>;
|
|
163
|
-
export declare function addModal(schema: any, modal: any, definitions?: any): any[];
|
|
163
|
+
export declare function addModal(schema: any, modal: any, definitions?: any, isKeyValid?: (key: string) => boolean): any[];
|
|
164
164
|
/**
|
|
165
165
|
* 弹窗转成 definitions 定义
|
|
166
166
|
* 这样打开子弹窗的时候,可以把父级的弹窗列表透传到子弹窗里面去
|
|
@@ -170,7 +170,7 @@ export declare function addModal(schema: any, modal: any, definitions?: any): an
|
|
|
170
170
|
* @param definitions
|
|
171
171
|
* @returns
|
|
172
172
|
*/
|
|
173
|
-
export declare function modalsToDefinitions(modals: Array<EditorModalBody>, definitions?: any): any;
|
|
173
|
+
export declare function modalsToDefinitions(modals: Array<EditorModalBody>, definitions?: any, edtingModal?: EditorModalBody): any;
|
|
174
174
|
/**
|
|
175
175
|
* 从子弹窗的 definitions 合并回来到主弹窗的 definitions
|
|
176
176
|
*
|
|
@@ -26,6 +26,7 @@ export interface EditorProps extends PluginEventListener {
|
|
|
26
26
|
superEditorData?: any;
|
|
27
27
|
withSuperDataSchema?: boolean;
|
|
28
28
|
/** 当前 Editor 为 SubEditor 时触发的宿主节点 */
|
|
29
|
+
hostManager?: EditorManager;
|
|
29
30
|
hostNode?: EditorNodeType;
|
|
30
31
|
dataBindingChange?: (value: string, data: any, manager?: EditorManager) => void;
|
|
31
32
|
/**
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ClassNamesFn } from 'amis-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { EditorStoreType } from '../../store/editor';
|
|
4
|
+
import { EditorManager } from '../../manager';
|
|
4
5
|
export interface DialogListProps {
|
|
5
6
|
classnames: ClassNamesFn;
|
|
6
7
|
store: EditorStoreType;
|
|
8
|
+
manager: EditorManager;
|
|
7
9
|
}
|
|
8
|
-
declare const _default: ({ classnames: cx, store }: DialogListProps) => React.JSX.Element;
|
|
10
|
+
declare const _default: ({ classnames: cx, store, manager }: DialogListProps) => React.JSX.Element;
|
|
9
11
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export default class BackTop extends React.Component<BackTopProps, BackTopStates
|
|
|
16
16
|
constructor(props: any);
|
|
17
17
|
componentDidMount(): void;
|
|
18
18
|
componentWillUnmount(): void;
|
|
19
|
-
getDefaultTarget(): (Window & typeof globalThis)
|
|
19
|
+
getDefaultTarget(): Document | (Window & typeof globalThis);
|
|
20
20
|
handleScroll(e: React.UIEvent<HTMLElement> | {
|
|
21
21
|
target: any;
|
|
22
22
|
}): void;
|
package/lib/editor.js
CHANGED