amis-editor-core 6.13.0 → 6.14.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/RegionWrapper.d.ts +2 -1
- package/esm/component/ScaffoldModal.d.ts +2 -0
- package/esm/index.js +2 -2
- package/esm/plugin.d.ts +3 -3
- package/lib/component/RegionWrapper.d.ts +2 -1
- package/lib/component/ScaffoldModal.d.ts +2 -0
- package/lib/component/base/BackTop.d.ts +1 -1
- package/lib/editor.js +1 -1
- package/lib/index.js +2 -2
- package/lib/layout/flex.d.ts +1 -0
- package/lib/plugin.d.ts +3 -3
- package/lib/store/editor.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/esm/plugin.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { EditorStoreType } from './store/editor';
|
|
|
7
7
|
import { EditorNodeType } from './store/node';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { DiffChange } from './util';
|
|
10
|
-
import type { GlobalVariableItem, RendererConfig, Schema } from 'amis-core';
|
|
10
|
+
import type { GlobalVariableItem, RendererConfig, RendererProps, Schema } from 'amis-core';
|
|
11
11
|
import type { MenuDivider, MenuItem } from 'amis-ui/lib/components/ContextMenu';
|
|
12
12
|
import type { BaseSchema, SchemaCollection } from 'amis';
|
|
13
13
|
import type { AsyncLayerOptions } from './component/AsyncLayer';
|
|
@@ -70,7 +70,7 @@ export interface RegionConfig {
|
|
|
70
70
|
/**
|
|
71
71
|
* 返回需要添加 data-region 的 dom 节点。
|
|
72
72
|
*/
|
|
73
|
-
wrapperResolve?: (dom: HTMLElement) => HTMLElement;
|
|
73
|
+
wrapperResolve?: (dom: HTMLElement, props: RendererProps) => HTMLElement;
|
|
74
74
|
/**
|
|
75
75
|
* 当拖入到这个容器时,是否需要修改一下 ghost 结构?
|
|
76
76
|
*/
|
|
@@ -193,7 +193,7 @@ export interface RendererInfo extends RendererScaffoldInfo {
|
|
|
193
193
|
* 返回哪些 dom 节点,需要自动加上 data-editor-id 属性
|
|
194
194
|
* 目前只有 TableCell 里面用到了,就它需要同时给某一列下所有 td 都加上那个属性。
|
|
195
195
|
*/
|
|
196
|
-
wrapperResolve?: (dom: HTMLElement) => HTMLElement | Array<HTMLElement>;
|
|
196
|
+
wrapperResolve?: (dom: HTMLElement, props: RendererProps) => HTMLElement | Array<HTMLElement>;
|
|
197
197
|
/**
|
|
198
198
|
* 默认下发哪些属性,如果要动态下发,请使用 filterProps
|
|
199
199
|
*/
|
|
@@ -3,12 +3,13 @@ import { EditorManager } from '../manager';
|
|
|
3
3
|
import { RegionConfig, RendererInfo } from '../plugin';
|
|
4
4
|
import { EditorStoreType } from '../store/editor';
|
|
5
5
|
import { EditorNodeType } from '../store/node';
|
|
6
|
+
import { RendererProps } from 'amis-core';
|
|
6
7
|
export interface RegionWrapperProps {
|
|
7
8
|
name: string;
|
|
8
9
|
label: string;
|
|
9
10
|
placeholder?: string | JSX.Element;
|
|
10
11
|
preferTag?: string;
|
|
11
|
-
wrapperResolve?: (dom: HTMLElement) => HTMLElement;
|
|
12
|
+
wrapperResolve?: (dom: HTMLElement, props: RendererProps) => HTMLElement;
|
|
12
13
|
editorStore: EditorStoreType;
|
|
13
14
|
manager: EditorManager;
|
|
14
15
|
rendererName?: string;
|
|
@@ -7,7 +7,9 @@ export interface SubEditorProps {
|
|
|
7
7
|
theme?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare class ScaffoldModal extends React.Component<SubEditorProps> {
|
|
10
|
+
modalBodyRef: React.RefObject<HTMLDivElement>;
|
|
10
11
|
handleConfirm([values]: any): Promise<void>;
|
|
12
|
+
getPopOverContainer(): any;
|
|
11
13
|
buildSchema(): {
|
|
12
14
|
wrapperComponent: string;
|
|
13
15
|
type: string;
|
|
@@ -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