amis-editor-core 6.9.0-rc.6 → 6.9.0-rc.8
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 +4 -7
- package/esm/deepSplice.d.ts +12 -0
- package/esm/index.d.ts +3 -1
- package/esm/index.js +2 -2
- package/esm/manager.d.ts +13 -2
- package/esm/plugin.d.ts +2 -0
- package/esm/store/editor.d.ts +1 -0
- package/lib/component/Editor.d.ts +4 -7
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/deepSplice.d.ts +12 -0
- package/lib/dnd/flex.d.ts +1 -1
- package/lib/editor.js +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +2 -2
- package/lib/manager.d.ts +13 -2
- package/lib/plugin.d.ts +2 -0
- package/lib/store/editor.d.ts +1 -0
- package/package.json +4 -3
package/lib/manager.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { EditorDNDManager } from './dnd';
|
|
|
10
10
|
import { VariableManager } from './variable';
|
|
11
11
|
import type { IScopedContext } from 'amis';
|
|
12
12
|
import type { SchemaObject, SchemaCollection } from 'amis';
|
|
13
|
-
import type { RendererConfig } from 'amis-core';
|
|
13
|
+
import type { Api, Payload, RendererConfig } from 'amis-core';
|
|
14
14
|
export interface EditorManagerConfig extends Omit<EditorProps, 'value' | 'onChange'> {
|
|
15
15
|
}
|
|
16
16
|
export interface PluginClass {
|
|
@@ -61,6 +61,7 @@ export declare class EditorManager {
|
|
|
61
61
|
dataSchema: DataSchema;
|
|
62
62
|
/** 变量管理 */
|
|
63
63
|
readonly variableManager: VariableManager;
|
|
64
|
+
fetch?: (api: Api, data?: any, options?: object) => Promise<Payload>;
|
|
64
65
|
constructor(config: EditorManagerConfig, store: EditorStoreType, parent?: EditorManager | undefined);
|
|
65
66
|
normalizeScene(plugins?: Array<PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)]>): (PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)])[];
|
|
66
67
|
dynamicAddPlugin(pluginName: string): void;
|
|
@@ -440,6 +441,11 @@ export declare class EditorManager {
|
|
|
440
441
|
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
441
442
|
calculateHighlightBox(root?: any): void;
|
|
442
443
|
resetHighlightBox(root: any): void;
|
|
444
|
+
/**
|
|
445
|
+
* 显示插入面板
|
|
446
|
+
* @param region
|
|
447
|
+
* @param preferTag
|
|
448
|
+
*/
|
|
443
449
|
updateState(state: any, replace?: boolean): void;
|
|
444
450
|
setWidthMutable(value: any): void;
|
|
445
451
|
setHeightMutable(value: any): void;
|
|
@@ -817,6 +823,11 @@ export declare class EditorManager {
|
|
|
817
823
|
getTarget(): HTMLElement | HTMLElement[] | null;
|
|
818
824
|
calculateHighlightBox(root?: any): void;
|
|
819
825
|
resetHighlightBox(root: any): void;
|
|
826
|
+
/**
|
|
827
|
+
* 显示插入面板
|
|
828
|
+
* @param region
|
|
829
|
+
* @param preferTag
|
|
830
|
+
*/
|
|
820
831
|
updateState(state: any, replace?: boolean): void;
|
|
821
832
|
setWidthMutable(value: any): void;
|
|
822
833
|
setHeightMutable(value: any): void;
|
|
@@ -1039,7 +1050,7 @@ export declare class EditorManager {
|
|
|
1039
1050
|
toggleSelection(id: string): void;
|
|
1040
1051
|
setSelection(selections: Array<string>, id?: string): void;
|
|
1041
1052
|
startDrag(id: string, e: React.DragEvent): void;
|
|
1042
|
-
scaffold(form:
|
|
1053
|
+
scaffold(form: ScaffoldForm, value: any): Promise<SchemaObject>;
|
|
1043
1054
|
reScaffold(id: string, form: ScaffoldForm, value: any): Promise<void>;
|
|
1044
1055
|
reScaffoldV2(id: string): Promise<void>;
|
|
1045
1056
|
lazyPatchSchema: import("lodash").DebouncedFunc<any>;
|
package/lib/plugin.d.ts
CHANGED
|
@@ -250,6 +250,7 @@ export interface ScaffoldForm extends PopOverForm {
|
|
|
250
250
|
stepsBody?: boolean;
|
|
251
251
|
/** 是否可跳过创建向导直接创建 */
|
|
252
252
|
canSkip?: boolean;
|
|
253
|
+
getSchema?: (value: any) => PopOverForm | Promise<PopOverForm>;
|
|
253
254
|
mode?: 'normal' | 'horizontal' | 'inline' | {
|
|
254
255
|
mode: string;
|
|
255
256
|
horizontal: any;
|
|
@@ -338,6 +339,7 @@ export interface PanelProps {
|
|
|
338
339
|
manager: EditorManager;
|
|
339
340
|
popOverContainer?: () => HTMLElement | void;
|
|
340
341
|
readonly?: boolean;
|
|
342
|
+
children?: React.ReactNode | ((props: PanelProps) => React.ReactNode);
|
|
341
343
|
}
|
|
342
344
|
/**
|
|
343
345
|
* 面板信息定义
|
package/lib/store/editor.d.ts
CHANGED
|
@@ -523,6 +523,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
|
|
|
523
523
|
readonly filteredSchema: any;
|
|
524
524
|
readonly filteredSchemaForPreview: any;
|
|
525
525
|
isRootSchema(id: string): boolean;
|
|
526
|
+
readonly rootId: any;
|
|
526
527
|
getRootId(): any;
|
|
527
528
|
isHoved(id: string): boolean | "";
|
|
528
529
|
isActive(id: string): boolean | "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amis-editor-core",
|
|
3
|
-
"version": "6.9.0-rc.
|
|
3
|
+
"version": "6.9.0-rc.8",
|
|
4
4
|
"description": "amis 可视化编辑器",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"test": "echo \"Warnings: no test specified\"",
|
|
30
|
-
"build": "npm run clean-dist && NODE_ENV=production rollup -c",
|
|
31
|
-
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
|
30
|
+
"build": "npm run clean-dist && cross-env NODE_ENV=production rollup -c",
|
|
31
|
+
"build-esm": "npm run clean-dist && cross-env NODE_ENV=production rollup -c rollup.esm.config.js",
|
|
32
32
|
"clean-dist": "rimraf lib/* esm/*",
|
|
33
33
|
"i18n:update": "npx i18n update --config=./i18nConfig.js",
|
|
34
34
|
"i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"ajv": "^8.8.2",
|
|
85
85
|
"autoprefixer": "^10.4.12",
|
|
86
86
|
"concurrently": "^6.2.0",
|
|
87
|
+
"cross-env": "^7.0.3",
|
|
87
88
|
"css-loader": "^6.2.0",
|
|
88
89
|
"faker": "^5.5.3",
|
|
89
90
|
"i18n-command": "^0.0.23-beta.15",
|