GeezerVison is showing github.com — Merge branch 'release/1.1.1' · euui/lowcode-engine@12dee7f
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/plugins.md +39-12Lines changed: 39 additions & 12 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -118,11 +118,13 @@ import { IPublicModelPluginContext } from '@alilc/lowcode-types'; | 118 | 118 | const BuiltinPluginRegistry = (ctx: IPublicModelPluginContext, options: any) => { | 119 | 119 | return { | 120 | 120 | async init() { | 121 | | - // 1.0.4 之后的传值方式,通过 register(xxx, options) | 122 | | - // 取值通过 options | | 121 | + // 直接传值方式: | | 122 | + // 通过 register(xxx, options) 传入 | | 123 | + // 通过 options 取出 | 123 | 124 |
| 124 | | - // 1.0.4 之前的传值方式,通过 init(..., preference) | 125 | | - // 取值通过 ctx.preference.getValue() | | 125 | + // 引擎初始化时也可以设置某插件的全局配置项: | | 126 | + // 通过 engine.init(..., preference) 传入 | | 127 | + // 通过 ctx.preference.getValue() 取出 | 126 | 128 | }, | 127 | 129 | }; | 128 | 130 | } | @@ -155,7 +157,6 @@ BuiltinPluginRegistry.meta = { | 155 | 157 | }, | 156 | 158 | } | 157 | 159 |
| 158 | | -// 从 1.0.4 开始,支持直接在 pluginCreator 的第二个参数 options 获取入参 | 159 | 160 | await plugins.register(BuiltinPluginRegistry, { key1: 'abc', key5: 'willNotPassToPlugin' }); | 160 | 161 | ``` | 161 | 162 |
| @@ -164,8 +165,11 @@ await plugins.register(BuiltinPluginRegistry, { key1: 'abc', key5: 'willNotPassT | 164 | 165 | 获取指定插件 | 165 | 166 |
| 166 | 167 | ```typescript | 167 | | -function get(pluginName: string): IPublicModelPluginInstance; | 168 | | -
| | 168 | +/** | | 169 | + * 获取指定插件 | | 170 | + * get plugin instance by name | | 171 | + */ | | 172 | +get(pluginName: string): IPublicModelPluginInstance | null; | 169 | 173 | ``` | 170 | 174 |
| 171 | 175 | 关联模型 [IPublicModelPluginInstance](./model/plugin-instance) | @@ -175,8 +179,11 @@ function get(pluginName: string): IPublicModelPluginInstance; | 175 | 179 | 获取所有的插件实例 | 176 | 180 |
| 177 | 181 | ```typescript | 178 | | -function getAll(): IPublicModelPluginInstance[]; | 179 | | -
| | 182 | +/** | | 183 | + * 获取所有的插件实例 | | 184 | + * get all plugin instances | | 185 | + */ | | 186 | +getAll(): IPublicModelPluginInstance[]; | 180 | 187 | ``` | 181 | 188 |
| 182 | 189 | 关联模型 [IPublicModelPluginInstance](./model/plugin-instance) | @@ -186,17 +193,37 @@ function getAll(): IPublicModelPluginInstance[]; | 186 | 193 | 判断是否有指定插件 | 187 | 194 |
| 188 | 195 | ```typescript | 189 | | -function has(pluginName: string): boolean; | 190 | | -
| | 196 | +/** | | 197 | + * 判断是否有指定插件 | | 198 | + * check if plugin with certain name exists | | 199 | + */ | | 200 | +has(pluginName: string): boolean; | 191 | 201 | ``` | 192 | 202 |
| 193 | 203 | ### delete | 194 | 204 |
| 195 | 205 | 删除指定插件 | 196 | 206 |
| 197 | 207 | ```typescript | 198 | | -function delete(pluginName: string): void; | | 208 | +/** | | 209 | + * 删除指定插件 | | 210 | + * delete plugin instance by name | | 211 | + */ | | 212 | +delete(pluginName: string): void; | | 213 | +``` | 199 | 214 |
| | 215 | +### getPluginPreference | | 216 | + | | 217 | +引擎初始化时可以提供全局配置给到各插件,通过这个方法可以获得本插件对应的配置 | | 218 | + | | 219 | +```typescript | | 220 | +/** | | 221 | + * 引擎初始化时可以提供全局配置给到各插件,通过这个方法可以获得本插件对应的配置 | | 222 | + * use this to get preference config for this plugin when engine.init() called | | 223 | + */ | | 224 | +getPluginPreference( | | 225 | + pluginName: string, | | 226 | + ): Record<string, IPublicTypePreferenceValueType> | null | undefined; | 200 | 227 | ``` | 201 | 228 |
| 202 | 229 | ## 相关类型定义 | |
Collapse file Copy file name to clipboardExpand all lines: lerna.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "lerna": "4.0.0", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "npmClient": "yarn", | 5 | 5 | "useWorkspaces": true, | 6 | 6 | "packages": [ | |
Collapse file Copy file name to clipboardExpand all lines: modules/code-generator/package.json +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 143 | 143 | "publishConfig": { | 144 | 144 | "access": "public", | 145 | 145 | "registry": "https://registry.npmjs.org/" | 146 | | - } | 147 | | -} | | 146 | + }, | | 147 | + | | 148 | +} |
Collapse file Copy file name to clipboardExpand all lines: packages/designer/package.json +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "@alilc/lowcode-designer", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "description": "Designer for Ali LowCode Engine", | 5 | 5 | "main": "lib/index.js", | 6 | 6 | "module": "es/index.js", | | 15 | 15 | }, | 16 | 16 | "license": "MIT", | 17 | 17 | "dependencies": { | 18 | | - "@alilc/lowcode-editor-core": "1.1.0", | 19 | | - "@alilc/lowcode-types": "1.1.0", | 20 | | - "@alilc/lowcode-utils": "1.1.0", | | 18 | + "@alilc/lowcode-editor-core": "1.1.1", | | 19 | + "@alilc/lowcode-types": "1.1.1", | | 20 | + "@alilc/lowcode-utils": "1.1.1", | 21 | 21 | "classnames": "^2.2.6", | 22 | 22 | "react": "^16", | 23 | 23 | "react-dom": "^16.7.0", | |
Collapse file Copy file name to clipboardExpand all lines: packages/designer/src/plugin/plugin-types.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,12 +26,12 @@ export interface ILowCodePluginRuntimeCore { | 26 | 26 | disabled: boolean; | 27 | 27 | config: IPublicTypePluginConfig; | 28 | 28 | logger: IPublicApiLogger; | | 29 | + meta: IPublicTypePluginMeta; | 29 | 30 | init(forceInit?: boolean): void; | 30 | 31 | isInited(): boolean; | 31 | 32 | destroy(): void; | 32 | 33 | toProxy(): any; | 33 | 34 | setDisabled(flag: boolean): void; | 34 | | - meta: IPublicTypePluginMeta; | 35 | 35 | } | 36 | 36 |
| 37 | 37 | interface ILowCodePluginRuntimeExportsAccessor { | |
Collapse file Copy file name to clipboardExpand all lines: packages/editor-core/package.json +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "@alilc/lowcode-editor-core", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "description": "Core Api for Ali lowCode engine", | 5 | 5 | "license": "MIT", | 6 | 6 | "main": "lib/index.js", | | 14 | 14 | }, | 15 | 15 | "dependencies": { | 16 | 16 | "@alifd/next": "^1.19.16", | 17 | | - "@alilc/lowcode-types": "1.1.0", | 18 | | - "@alilc/lowcode-utils": "1.1.0", | | 17 | + "@alilc/lowcode-types": "1.1.1", | | 18 | + "@alilc/lowcode-utils": "1.1.1", | 19 | 19 | "classnames": "^2.2.6", | 20 | 20 | "debug": "^4.1.1", | 21 | 21 | "intl-messageformat": "^9.3.1", | |
Collapse file Copy file name to clipboardExpand all lines: packages/editor-skeleton/package.json +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "@alilc/lowcode-editor-skeleton", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "description": "alibaba lowcode editor skeleton", | 5 | 5 | "main": "lib/index.js", | 6 | 6 | "module": "es/index.js", | | 18 | 18 | ], | 19 | 19 | "dependencies": { | 20 | 20 | "@alifd/next": "^1.20.12", | 21 | | - "@alilc/lowcode-designer": "1.1.0", | 22 | | - "@alilc/lowcode-editor-core": "1.1.0", | 23 | | - "@alilc/lowcode-types": "1.1.0", | 24 | | - "@alilc/lowcode-utils": "1.1.0", | | 21 | + "@alilc/lowcode-designer": "1.1.1", | | 22 | + "@alilc/lowcode-editor-core": "1.1.1", | | 23 | + "@alilc/lowcode-types": "1.1.1", | | 24 | + "@alilc/lowcode-utils": "1.1.1", | 25 | 25 | "classnames": "^2.2.6", | 26 | 26 | "react": "^16.8.1", | 27 | 27 | "react-dom": "^16.8.1" | |
Collapse file Copy file name to clipboardExpand all lines: packages/engine/package.json +9-9Lines changed: 9 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "@alilc/lowcode-engine", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系", | 5 | 5 | "main": "lib/engine-core.js", | 6 | 6 | "module": "es/engine-core.js", | | 19 | 19 | "license": "MIT", | 20 | 20 | "dependencies": { | 21 | 21 | "@alifd/next": "^1.19.12", | 22 | | - "@alilc/lowcode-designer": "1.1.0", | 23 | | - "@alilc/lowcode-editor-core": "1.1.0", | 24 | | - "@alilc/lowcode-editor-skeleton": "1.1.0", | | 22 | + "@alilc/lowcode-designer": "1.1.1", | | 23 | + "@alilc/lowcode-editor-core": "1.1.1", | | 24 | + "@alilc/lowcode-editor-skeleton": "1.1.1", | 25 | 25 | "@alilc/lowcode-engine-ext": "^1.0.0", | 26 | | - "@alilc/lowcode-plugin-designer": "1.1.0", | 27 | | - "@alilc/lowcode-plugin-outline-pane": "1.1.0", | 28 | | - "@alilc/lowcode-shell": "1.1.0", | 29 | | - "@alilc/lowcode-utils": "1.1.0", | 30 | | - "@alilc/lowcode-workspace": "1.1.0", | | 26 | + "@alilc/lowcode-plugin-designer": "1.1.1", | | 27 | + "@alilc/lowcode-plugin-outline-pane": "1.1.1", | | 28 | + "@alilc/lowcode-shell": "1.1.1", | | 29 | + "@alilc/lowcode-utils": "1.1.1", | | 30 | + "@alilc/lowcode-workspace": "1.1.1", | 31 | 31 | "react": "^16.8.1", | 32 | 32 | "react-dom": "^16.8.1" | 33 | 33 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/engine/src/engine-core.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -63,7 +63,7 @@ async function registryInnerPlugin(designer: Designer, editor: Editor, plugins: | 63 | 63 | // 注册一批内置插件 | 64 | 64 | await plugins.register(OutlinePlugin, {}, { autoInit: true }); | 65 | 65 | await plugins.register(componentMetaParser(designer)); | 66 | | - await plugins.register(setterRegistry, {}, { autoInit: true }); | | 66 | + await plugins.register(setterRegistry, {}); | 67 | 67 | await plugins.register(defaultPanelRegistry(editor)); | 68 | 68 | await plugins.register(builtinHotkey); | 69 | 69 | await plugins.register(registerDefaults, {}, { autoInit: true }); | @@ -195,6 +195,7 @@ export async function init( | 195 | 195 | engineContainer, | 196 | 196 | ); | 197 | 197 | innerWorkspace.setActive(true); | | 198 | + innerHotkey.activate(false); | 198 | 199 | await innerWorkspace.plugins.init(pluginPreference); | 199 | 200 | return; | 200 | 201 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/ignitor/package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "@alilc/lowcode-ignitor", | 3 | | - "version": "1.1.0", | | 3 | + "version": "1.1.1", | 4 | 4 | "description": "点火器,bootstrap lce project", | 5 | 5 | "main": "lib/index.js", | 6 | 6 | "private": true, | |
|