mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
feat: PluginContext 中增加 utils / engineConfig
This commit is contained in:
parent
cc465469b2
commit
562e4e0953
@ -1,4 +1,4 @@
|
||||
import { Editor, Hotkey, hotkey, getSetter, registerSetter, getSettersMap } from '@ali/lowcode-editor-core';
|
||||
import { Editor, Hotkey, hotkey, getSetter, registerSetter, getSettersMap, engineConfig, EngineConfig } from '@ali/lowcode-editor-core';
|
||||
import { Skeleton } from '@ali/lowcode-editor-skeleton';
|
||||
import { ILowCodePluginConfig, ILowCodePluginManager, ILowCodePluginContext, IDesignerCabin } from './plugin-types';
|
||||
import { getLogger, Logger } from '../utils';
|
||||
@ -8,7 +8,7 @@ import {
|
||||
removeBuiltinComponentAction,
|
||||
} from '../component-meta';
|
||||
import { Designer } from '../designer';
|
||||
import { Setters } from '../types';
|
||||
import { Setters, Utils, utils } from '../types';
|
||||
|
||||
export default class PluginContext implements ILowCodePluginContext {
|
||||
editor: Editor;
|
||||
@ -19,6 +19,8 @@ export default class PluginContext implements ILowCodePluginContext {
|
||||
plugins: ILowCodePluginManager;
|
||||
designerCabin: IDesignerCabin;
|
||||
setters: Setters;
|
||||
utils: Utils;
|
||||
engineConfig: EngineConfig;
|
||||
|
||||
constructor(editor: Editor, plugins: ILowCodePluginManager) {
|
||||
this.editor = editor;
|
||||
@ -32,6 +34,8 @@ export default class PluginContext implements ILowCodePluginContext {
|
||||
registerSetter,
|
||||
getSettersMap,
|
||||
};
|
||||
this.engineConfig = engineConfig;
|
||||
this.utils = utils;
|
||||
}
|
||||
|
||||
private createDesignerCabin(): IDesignerCabin {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { CompositeObject, ComponentAction } from '@ali/lowcode-types';
|
||||
import Logger from 'zen-logger';
|
||||
import { Skeleton } from '@ali/lowcode-editor-skeleton';
|
||||
import { Editor, Hotkey } from '@ali/lowcode-editor-core';
|
||||
import { Editor, Hotkey, EngineConfig } from '@ali/lowcode-editor-core';
|
||||
import {
|
||||
MetadataTransducer,
|
||||
Designer,
|
||||
@ -54,6 +54,7 @@ export interface ILowCodePluginContext {
|
||||
designerCabin: IDesignerCabin;
|
||||
setters: Setters;
|
||||
utils: Utils;
|
||||
engineConfig: EngineConfig;
|
||||
}
|
||||
|
||||
interface ILowCodePluginManagerPluginAccessor {
|
||||
|
||||
@ -12,7 +12,7 @@ export type NodeRemoveOptions = {
|
||||
suppressRemoveEvent?: boolean;
|
||||
};
|
||||
|
||||
const utils = {
|
||||
export const utils = {
|
||||
isNodeSchema,
|
||||
isFormEvent,
|
||||
compatibleLegaoSchema,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user