amis-editor-core 5.2.4-beta.31 → 5.2.5

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.
@@ -4,6 +4,7 @@ import { SchemaObject } from 'amis/lib/Schema';
4
4
  import { EditorManager, PluginClass } from '../manager';
5
5
  import { RenderOptions } from 'amis';
6
6
  import { PluginEventListener, RendererPluginAction } from '../plugin';
7
+ import type { VariableGroup, VariableOptions } from '../variable';
7
8
  export interface EditorProps extends PluginEventListener {
8
9
  value: SchemaObject;
9
10
  onChange: (value: SchemaObject) => void;
@@ -40,7 +41,7 @@ export interface EditorProps extends PluginEventListener {
40
41
  */
41
42
  disableBultinPlugin?: boolean;
42
43
  disablePluginList?: Array<string> | ((id: string, plugin: PluginClass) => boolean);
43
- plugins?: Array<PluginClass>;
44
+ plugins?: Array<PluginClass | [PluginClass, Record<string, any> | (() => Record<string, any>)]>;
44
45
  /**
45
46
  * 传给预览器的其他属性
46
47
  */
@@ -63,6 +64,10 @@ export interface EditorProps extends PluginEventListener {
63
64
  [propName: string]: RendererPluginAction;
64
65
  };
65
66
  };
67
+ /** 上下文变量 */
68
+ variables?: VariableGroup[];
69
+ /** 变量配置 */
70
+ variableOptions?: VariableOptions;
66
71
  onUndo?: () => void;
67
72
  onRedo?: () => void;
68
73
  onSave?: () => void;
@@ -84,6 +89,7 @@ export default class Editor extends Component<EditorProps> {
84
89
  componentDidUpdate(prevProps: EditorProps): void;
85
90
  componentWillUnmount(): void;
86
91
  handleKeyDown(e: KeyboardEvent): void;
92
+ handleMessage(event: any): void;
87
93
  handleContextMenu(e: React.MouseEvent<HTMLElement>): void;
88
94
  canUndo(): boolean;
89
95
  canRedo(): boolean;
@@ -14,6 +14,8 @@ export declare function makeSchemaFormRender(manager: EditorManager, schema: {
14
14
  justify?: boolean;
15
15
  panelById?: string;
16
16
  formKey?: string;
17
+ pipeIn?: (value: any) => any;
18
+ pipeOut?: (value: any) => any;
17
19
  }): ({ value, onChange, popOverContainer, id, store, node }: PanelProps) => JSX.Element;
18
20
  export declare function hackIn(renderer: RendererConfig, regions?: Array<RegionConfig>, overrides?: any): void;
19
21
  export declare function mapReactElement(dom: JSX.Element, iterator: (dom: JSX.Element, index?: number) => JSX.Element, index?: number): JSX.Element;