forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkspace.ts
More file actions
49 lines (34 loc) · 1.46 KB
/
Copy pathworkspace.ts
File metadata and controls
49 lines (34 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { IPublicModelWindow } from '../model';
import { IPublicApiPlugins, IPublicModelResource, IPublicResourceList, IPublicTypeDisposable, IPublicTypeResourceType } from '@alilc/lowcode-types';
export interface IPublicApiWorkspace<
Plugins = IPublicApiPlugins,
ModelWindow = IPublicModelWindow
> {
/** 是否启用 workspace 模式 */
isActive: boolean;
/** 当前设计器窗口 */
window: ModelWindow;
plugins: Plugins;
/** 当前设计器的编辑窗口 */
windows: ModelWindow[];
/** 获取资源树列表 */
get resourceList(): IPublicModelResource[];
/** 设置资源树列表 */
setResourceList(resourceList: IPublicResourceList): void;
/** 资源树列表更新事件 */
onResourceListChange(fn: (resourceList: IPublicResourceList) => void): IPublicTypeDisposable;
/** 注册资源 */
registerResourceType(resourceTypeModel: IPublicTypeResourceType): void;
/** 打开视图窗口 */
openEditorWindow(resourceName: string, title: string, extra: Object, viewName?: string): void;
/** 通过视图 id 打开窗口 */
openEditorWindowById(id: string): void;
/** 移除视图窗口 */
removeEditorWindow(resourceName: string, title: string): void;
/** 通过视图 id 移除窗口 */
removeEditorWindowById(id: string): void;
/** 窗口新增/删除的事件 */
onChangeWindows(fn: () => void): IPublicTypeDisposable;
/** active 窗口变更事件 */
onChangeActiveWindow(fn: () => void): IPublicTypeDisposable;
}