Compare commits

..

15 Commits

Author SHA1 Message Date
GitHub Action
719dfc0e68 chore(release): publish 1.3.2-beta.4 2024-02-01 06:58:38 +00:00
liujuping
8e3529f2a2 feat: update test package.yaml 2024-02-01 14:50:05 +08:00
liujuping
07dccbea6b refactor(plugin-command): add plugin-command package 2024-02-01 14:45:59 +08:00
liujuping
e093a42c4a refactor(plugin-command): add plugin-command package 2024-02-01 12:55:30 +08:00
GitHub Action
8934813efa chore(release): publish 1.3.2-beta.3 2024-02-01 01:11:45 +00:00
liujuping
238828c6d4 feat: update ts defined 2024-02-01 09:05:23 +08:00
liujuping
ac1d462dc5 fix(workspace): fix workspace.plugins.xxx api is invalid 2024-02-01 09:05:22 +08:00
GitHub Action
588ff54268 chore(release): publish 1.3.2-beta.2 2024-01-30 08:47:52 +00:00
liujuping
1ae217df8d Merge branch 'develop' into release/1.3.2-beta 2024-01-30 16:41:37 +08:00
GitHub Action
4a167ddcb2 chore(release): publish 1.3.2-beta.1 2024-01-26 09:42:53 +00:00
liujuping
7f6fde759b feat(setter): add field ts 2024-01-26 17:18:50 +08:00
GitHub Action
cbe27a7b1e chore(docs): publish documentation 2024-01-26 17:18:50 +08:00
liujuping
cb3e79f756 docs(demo): add dialog use desc 2024-01-26 17:18:50 +08:00
GitHub Action
add1767509 chore(release): publish 1.3.2-beta.0 2024-01-25 09:10:13 +00:00
JackLian
b0e5b4e6f8 chore(docs): minor change of readme 2024-01-25 17:04:02 +08:00
45 changed files with 102 additions and 245 deletions

2
.github/CODEOWNERS vendored
View File

@ -2,7 +2,7 @@
# These owners will be the default owners for everything in # These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence # the repo. Unless a later match takes precedence
* @liujuping @1ncounter * @liujuping @JackLian
/modules/material-parser @akirakai /modules/material-parser @akirakai
/modules/code-generator @qingniaotonghua /modules/code-generator @qingniaotonghua

View File

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: >- if: >-
contains(github.ref, 'refs/heads/release/') && contains(github.ref, 'refs/heads/release/') &&
(github.actor == '1ncounter' || github.actor == 'liujuping') (github.actor == 'JackLian' || github.actor == 'liujuping')
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup Node.js - name: Setup Node.js

View File

@ -1,6 +1,6 @@
--- ---
title: canvas - 画布 API title: canvas - 画布 API
sidebar_position: 10 sidebar_position: 12
--- ---
> **@types** [IPublicApiCanvas](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/canvas.ts)<br/> > **@types** [IPublicApiCanvas](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/canvas.ts)<br/>

View File

@ -1,101 +0,0 @@
---
title: command - 指令 API
sidebar_position: 10
---
## 模块概览
该模块使得与命令系统的交互成为可能,提供了一种全面的方式来处理、执行和管理应用程序中的命令。
## 接口
### IPublicApiCommand
与命令交互的接口。它提供了注册、注销、执行和管理命令的方法。
## 方法
### registerCommand
注册一个新命令及其处理函数。
```
typescriptCopy code
/**
* 注册一个新的命令及其处理程序。
* @param command {IPublicTypeCommand} - 要注册的命令。
*/
registerCommand(command: IPublicTypeCommand): void;
```
### unregisterCommand
注销一个已存在的命令。
```
typescriptCopy code
/**
* 注销一个已存在的命令。
* @param name {string} - 要注销的命令的名称。
*/
unregisterCommand(name: string): void;
```
### executeCommand
根据名称和提供的参数执行命令,确保参数符合命令的定义。
```
typescriptCopy code
/**
* 根据名称和提供的参数执行命令。
* @param name {string} - 要执行的命令的名称。
* @param args {IPublicTypeCommandHandlerArgs} - 命令的参数。
*/
executeCommand(name: string, args?: IPublicTypeCommandHandlerArgs): void;
```
### batchExecuteCommand
批量执行命令,在所有命令执行后进行重绘,历史记录中只记录一次。
```
typescriptCopy code
/**
* 批量执行命令,随后进行重绘,历史记录中只记录一次。
* @param commands {Array} - 命令对象的数组,包含名称和可选参数。
*/
batchExecuteCommand(commands: { name: string; args?: IPublicTypeCommandHandlerArgs }[]): void;
```
### listCommands
列出所有已注册的命令。
```
typescriptCopy code
/**
* 列出所有已注册的命令。
* @returns {IPublicTypeListCommand[]} - 已注册命令的数组。
*/
listCommands(): IPublicTypeListCommand[];
```
### onCommandError
为命令执行过程中的错误注册错误处理回调函数。
```
typescriptCopy code
/**
* 为命令执行过程中的错误注册一个回调函数。
* @param callback {(name: string, error: Error) => void} - 错误处理的回调函数。
*/
onCommandError(callback: (name: string, error: Error) => void): void;
```

View File

@ -1,6 +1,6 @@
--- ---
title: common - 通用 API title: common - 通用 API
sidebar_position: 10 sidebar_position: 11
--- ---
> **@types** [IPublicApiCommon](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/common.ts)<br/> > **@types** [IPublicApiCommon](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/common.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: commonUI - UI 组件库 title: commonUI - UI 组件库
sidebar_position: 10 sidebar_position: 11
--- ---
## 简介 ## 简介

View File

@ -1,6 +1,6 @@
--- ---
title: config - 配置 API title: config - 配置 API
sidebar_position: 5 sidebar_position: 8
--- ---
> **@types** [IPublicModelEngineConfig](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/engine-config.ts)<br/> > **@types** [IPublicModelEngineConfig](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/engine-config.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: config options - 配置列表 title: config options - 配置列表
sidebar_position: 5 sidebar_position: 13
--- ---
> **@types** [IPublicTypeEngineOptions](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/engine-options.ts)<br/> > **@types** [IPublicTypeEngineOptions](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/engine-options.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: event - 事件 API title: event - 事件 API
sidebar_position: 10 sidebar_position: 7
--- ---
> **@types** [IPublicApiEvent](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/event.ts)<br/> > **@types** [IPublicApiEvent](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/event.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: hotkey - 快捷键 API title: hotkey - 快捷键 API
sidebar_position: 10 sidebar_position: 5
--- ---
> **@types** [IPublicApiHotkey](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/hotkey.ts)<br/> > **@types** [IPublicApiHotkey](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/hotkey.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: init - 初始化 API title: init - 初始化 API
sidebar_position: 0 sidebar_position: 10
--- ---
> **@since** v1.0.0 > **@since** v1.0.0

View File

@ -1,6 +1,6 @@
--- ---
title: logger - 日志 API title: logger - 日志 API
sidebar_position: 10 sidebar_position: 9
--- ---
> **@types** [IPublicApiLogger](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/logger.ts)<br/> > **@types** [IPublicApiLogger](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/logger.ts)<br/>

View File

@ -1,6 +1,6 @@
--- ---
title: material - 物料 API title: material - 物料 API
sidebar_position: 10 sidebar_position: 2
--- ---
> **@types** [IPublicApiMaterial](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/material.ts)<br/> > **@types** [IPublicApiMaterial](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/material.ts)<br/>

View File

@ -1,6 +1,6 @@
{ {
"label": "模型定义 Models", "label": "模型定义 Models",
"position": 100, "position": 14,
"collapsed": false, "collapsed": false,
"collapsible": true "collapsible": true
} }

View File

@ -1,6 +1,6 @@
--- ---
title: plugins - 插件 API title: plugins - 插件 API
sidebar_position: 2 sidebar_position: 4
--- ---
> **@types** [IPublicApiPlugins](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/plugins.ts)<br/> > **@types** [IPublicApiPlugins](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/plugins.ts)<br/>
> **@since** v1.0.0 > **@since** v1.0.0

View File

@ -1,6 +1,6 @@
--- ---
title: project - 模型 API title: project - 模型 API
sidebar_position: 10 sidebar_position: 3
--- ---
## 模块简介 ## 模块简介

View File

@ -1,6 +1,6 @@
--- ---
title: setters - 设置器 API title: setters - 设置器 API
sidebar_position: 10 sidebar_position: 6
--- ---
> **@types** [IPublicApiSetters](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/setters.ts)<br/> > **@types** [IPublicApiSetters](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/setters.ts)<br/>
> **@since** v1.0.0 > **@since** v1.0.0

View File

@ -1,6 +1,6 @@
--- ---
title: simulatorHost - 模拟器 API title: simulatorHost - 模拟器 API
sidebar_position: 10 sidebar_position: 3
--- ---
> **@types** [IPublicApiSimulatorHost](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/simulator-host.ts)<br/> > **@types** [IPublicApiSimulatorHost](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/simulator-host.ts)<br/>
> **@since** v1.0.0 > **@since** v1.0.0

View File

@ -1,6 +1,6 @@
--- ---
title: skeleton - 面板 API title: skeleton - 面板 API
sidebar_position: 10 sidebar_position: 1
--- ---
> **@types** [IPublicApiSkeleton](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/skeleton.ts)<br/> > **@types** [IPublicApiSkeleton](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/api/skeleton.ts)<br/>
> **@since** v1.0.0 > **@since** v1.0.0

View File

@ -1,6 +1,6 @@
--- ---
title: workspace - 应用级 API title: workspace - 应用级 API
sidebar_position: 10 sidebar_position: 12
--- ---
> **[@experimental](./#experimental)**<br/> > **[@experimental](./#experimental)**<br/>

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine-docs", "name": "@alilc/lowcode-engine-docs",
"version": "1.2.31", "version": "1.2.30",
"description": "低代码引擎版本化文档", "description": "低代码引擎版本化文档",
"license": "MIT", "license": "MIT",
"files": [ "files": [

View File

@ -1,6 +1,6 @@
{ {
"lerna": "4.0.0", "lerna": "4.0.0",
"version": "1.3.2", "version": "1.3.2-beta.4",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"packages": [ "packages": [

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-designer", "name": "@alilc/lowcode-designer",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Designer for Ali LowCode Engine", "description": "Designer for Ali LowCode Engine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -15,9 +15,9 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",

View File

@ -70,7 +70,7 @@ export class Transducer {
} }
if (isDynamicSetter(setter) && isDynamic) { if (isDynamicSetter(setter) && isDynamic) {
try { try {
setter = setter.call(context.internalToShellField(), context.internalToShellField()); setter = setter.call(context, context);
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-core", "name": "@alilc/lowcode-editor-core",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Core Api for Ali lowCode engine", "description": "Core Api for Ali lowCode engine",
"license": "MIT", "license": "MIT",
"main": "lib/index.js", "main": "lib/index.js",
@ -16,8 +16,8 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"debug": "^4.1.1", "debug": "^4.1.1",
"intl-messageformat": "^9.3.1", "intl-messageformat": "^9.3.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-skeleton", "name": "@alilc/lowcode-editor-skeleton",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "alibaba lowcode editor skeleton", "description": "alibaba lowcode editor skeleton",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -19,10 +19,10 @@
], ],
"dependencies": { "dependencies": {
"@alifd/next": "^1.20.12", "@alifd/next": "^1.20.12",
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"

View File

@ -174,5 +174,6 @@ About Pull Request:
Special thanks to everyone who contributed to this project. Special thanks to everyone who contributed to this project.
<p> <p>
<a href="https://github.com/alibaba/lowcode-engine/graphs/contributors"><img src="https://contrib.rocks/image?repo=alibaba/lowcode-engine" /></a> <a href="https://github.com/alibaba/lowcode-engine/graphs/contributors"><img src="https://contrib.rocks/image?repo=alibaba/lowcode-engine" /></a>
</p> </p>

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine", "name": "@alilc/lowcode-engine",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系", "description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
"main": "lib/engine-core.js", "main": "lib/engine-core.js",
"module": "es/engine-core.js", "module": "es/engine-core.js",
@ -19,16 +19,15 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.12", "@alifd/next": "^1.19.12",
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-editor-skeleton": "1.3.2", "@alilc/lowcode-editor-skeleton": "1.3.2-beta.4",
"@alilc/lowcode-engine-ext": "^1.0.0", "@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-command": "1.3.2", "@alilc/lowcode-plugin-designer": "1.3.2-beta.4",
"@alilc/lowcode-plugin-designer": "1.3.2", "@alilc/lowcode-plugin-outline-pane": "1.3.2-beta.4",
"@alilc/lowcode-plugin-outline-pane": "1.3.2", "@alilc/lowcode-shell": "1.3.2-beta.4",
"@alilc/lowcode-shell": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-workspace": "1.3.2-beta.4",
"@alilc/lowcode-workspace": "1.3.2",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -66,7 +66,7 @@ import { defaultPanelRegistry } from './inner-plugins/default-panel-registry';
import { shellModelFactory } from './modules/shell-model-factory'; import { shellModelFactory } from './modules/shell-model-factory';
import { builtinHotkey } from './inner-plugins/builtin-hotkey'; import { builtinHotkey } from './inner-plugins/builtin-hotkey';
import { defaultContextMenu } from './inner-plugins/default-context-menu'; import { defaultContextMenu } from './inner-plugins/default-context-menu';
import { CommandPlugin } from '@alilc/lowcode-plugin-command'; import { defaultCommand } from '@alilc/lowcode-plugin-command';
import { OutlinePlugin } from '@alilc/lowcode-plugin-outline-pane'; import { OutlinePlugin } from '@alilc/lowcode-plugin-outline-pane';
export * from './modules/skeleton-types'; export * from './modules/skeleton-types';
@ -84,7 +84,7 @@ async function registryInnerPlugin(designer: IDesigner, editor: IEditor, plugins
await plugins.register(builtinHotkey); await plugins.register(builtinHotkey);
await plugins.register(registerDefaults, {}, { autoInit: true }); await plugins.register(registerDefaults, {}, { autoInit: true });
await plugins.register(defaultContextMenu); await plugins.register(defaultContextMenu);
await plugins.register(CommandPlugin, {}); await plugins.register(defaultCommand, {});
return () => { return () => {
plugins.delete(OutlinePlugin.pluginName); plugins.delete(OutlinePlugin.pluginName);
@ -94,7 +94,7 @@ async function registryInnerPlugin(designer: IDesigner, editor: IEditor, plugins
plugins.delete(builtinHotkey.pluginName); plugins.delete(builtinHotkey.pluginName);
plugins.delete(registerDefaults.pluginName); plugins.delete(registerDefaults.pluginName);
plugins.delete(defaultContextMenu.pluginName); plugins.delete(defaultContextMenu.pluginName);
plugins.delete(CommandPlugin.pluginName); plugins.delete(defaultCommand.pluginName);
}; };
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-ignitor", "name": "@alilc/lowcode-ignitor",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "点火器bootstrap lce project", "description": "点火器bootstrap lce project",
"main": "lib/index.js", "main": "lib/index.js",
"private": true, "private": true,

View File

@ -1,22 +0,0 @@
const fs = require('fs');
const { join } = require('path');
const esModules = [].join('|');
const pkgNames = fs.readdirSync(join('..')).filter(pkgName => !pkgName.startsWith('.'));
const jestConfig = {
transformIgnorePatterns: [
`/node_modules/(?!${esModules})/`,
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.ts',
'src/**/*.tsx',
],
};
// 只对本仓库内的 pkg 做 mapping
jestConfig.moduleNameMapper = {};
jestConfig.moduleNameMapper[`^@alilc/lowcode\\-(${pkgNames.join('|')})$`] = '<rootDir>/../$1/src';
module.exports = jestConfig;

View File

@ -1,19 +1,17 @@
{ {
"name": "@alilc/lowcode-plugin-command", "name": "@alilc/lowcode-plugin-command",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "> TODO: description", "description": "> TODO: description",
"author": "liujuping <liujup@foxmail.com>", "author": "liujuping <liujup@foxmail.com>",
"homepage": "https://github.com/alibaba/lowcode-engine#readme", "homepage": "https://github.com/alibaba/lowcode-engine#readme",
"license": "ISC", "license": "ISC",
"main": "lib/index.js", "main": "lib/plugin-command.js",
"module": "es/index.js",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
}, },
"files": [ "files": [
"lib", "lib"
"es"
], ],
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
@ -30,10 +28,7 @@
"url": "https://github.com/alibaba/lowcode-engine/issues" "url": "https://github.com/alibaba/lowcode-engine/issues"
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "^1.3.1",
"@alilc/lowcode-utils": "1.3.2" "@alilc/lowcode-utils": "^1.3.1"
},
"devDependencies": {
"@alib/build-scripts": "^0.1.18"
} }
} }

View File

@ -2,7 +2,7 @@ import { IPublicModelPluginContext, IPublicTypePlugin } from '@alilc/lowcode-typ
import { nodeCommand } from './node-command'; import { nodeCommand } from './node-command';
import { historyCommand } from './history-command'; import { historyCommand } from './history-command';
export const CommandPlugin: IPublicTypePlugin = (ctx: IPublicModelPluginContext) => { export const defaultCommand: IPublicTypePlugin = (ctx: IPublicModelPluginContext) => {
const { plugins } = ctx; const { plugins } = ctx;
return { return {
@ -17,9 +17,7 @@ export const CommandPlugin: IPublicTypePlugin = (ctx: IPublicModelPluginContext)
}; };
}; };
CommandPlugin.pluginName = '___default_command___'; defaultCommand.pluginName = '___default_command___';
CommandPlugin.meta = { defaultCommand.meta = {
commandScope: 'common', commandScope: 'common',
}; };
export default CommandPlugin;

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-designer", "name": "@alilc/lowcode-plugin-designer",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "alibaba lowcode editor designer plugin", "description": "alibaba lowcode editor designer plugin",
"files": [ "files": [
"es", "es",
@ -18,9 +18,9 @@
], ],
"author": "xiayang.xy", "author": "xiayang.xy",
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-outline-pane", "name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Outline pane for Ali lowCode engine", "description": "Outline pane for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -13,8 +13,8 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-renderer", "name": "@alilc/lowcode-react-renderer",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "react renderer for ali lowcode engine", "description": "react renderer for ali lowcode engine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -22,7 +22,7 @@
], ],
"dependencies": { "dependencies": {
"@alifd/next": "^1.21.16", "@alifd/next": "^1.21.16",
"@alilc/lowcode-renderer-core": "1.3.2" "@alilc/lowcode-renderer-core": "1.3.2-beta.4"
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-simulator-renderer", "name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "react simulator renderer for alibaba lowcode designer", "description": "react simulator renderer for alibaba lowcode designer",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -17,10 +17,10 @@
"test:cov": "build-scripts test --config build.test.json --jest-coverage" "test:cov": "build-scripts test --config build.test.json --jest-coverage"
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-react-renderer": "1.3.2", "@alilc/lowcode-react-renderer": "1.3.2-beta.4",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"mobx": "^6.3.0", "mobx": "^6.3.0",
"mobx-react": "^7.2.0", "mobx-react": "^7.2.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-renderer-core", "name": "@alilc/lowcode-renderer-core",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "renderer core", "description": "renderer core",
"license": "MIT", "license": "MIT",
"main": "lib/index.js", "main": "lib/index.js",
@ -16,8 +16,8 @@
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-datasource-engine": "^1.0.0", "@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"debug": "^4.1.1", "debug": "^4.1.1",
"fetch-jsonp": "^1.1.3", "fetch-jsonp": "^1.1.3",
@ -32,7 +32,7 @@
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",
"@alifd/next": "^1.26.0", "@alifd/next": "^1.26.0",
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@babel/plugin-transform-typescript": "^7.16.8", "@babel/plugin-transform-typescript": "^7.16.8",
"@testing-library/react": "^11.2.2", "@testing-library/react": "^11.2.2",
"@types/classnames": "^2.2.11", "@types/classnames": "^2.2.11",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-shell", "name": "@alilc/lowcode-shell",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Shell Layer for AliLowCodeEngine", "description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -13,12 +13,12 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-editor-skeleton": "1.3.2", "@alilc/lowcode-editor-skeleton": "1.3.2-beta.4",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"@alilc/lowcode-workspace": "1.3.2", "@alilc/lowcode-workspace": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5", "enzyme-adapter-react-16": "^1.15.5",

View File

@ -3,7 +3,7 @@ import {
IDesigner, IDesigner,
isComponentMeta, isComponentMeta,
} from '@alilc/lowcode-designer'; } from '@alilc/lowcode-designer';
import { IPublicTypeAssetsJson, getLogger } from '@alilc/lowcode-utils'; import { IPublicTypeAssetsJson } from '@alilc/lowcode-utils';
import { import {
IPublicTypeComponentAction, IPublicTypeComponentAction,
IPublicTypeComponentMetadata, IPublicTypeComponentMetadata,
@ -21,8 +21,6 @@ import { editorSymbol, designerSymbol } from '../symbols';
import { ComponentMeta as ShellComponentMeta } from '../model'; import { ComponentMeta as ShellComponentMeta } from '../model';
import { ComponentType } from 'react'; import { ComponentType } from 'react';
const logger = getLogger({ level: 'warn', bizName: 'shell-material' });
const innerEditorSymbol = Symbol('editor'); const innerEditorSymbol = Symbol('editor');
export class Material implements IPublicApiMaterial { export class Material implements IPublicApiMaterial {
private readonly [innerEditorSymbol]: IPublicModelEditor; private readonly [innerEditorSymbol]: IPublicModelEditor;
@ -33,10 +31,6 @@ export class Material implements IPublicApiMaterial {
} }
const workspace: InnerWorkspace = globalContext.get('workspace'); const workspace: InnerWorkspace = globalContext.get('workspace');
if (workspace.isActive) { if (workspace.isActive) {
if (!workspace.window.editor) {
logger.error('Material api 调用时机出现问题,请检查');
return this[innerEditorSymbol];
}
return workspace.window.editor; return workspace.window.editor;
} }

View File

@ -48,8 +48,8 @@ export class Window implements IPublicModelWindow {
} }
get currentEditorView() { get currentEditorView() {
if (this[windowSymbol]._editorView) { if (this[windowSymbol].editorView) {
return new EditorView(this[windowSymbol]._editorView).toProxy() as any; return new EditorView(this[windowSymbol].editorView).toProxy() as any;
} }
return null; return null;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-types", "name": "@alilc/lowcode-types",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Types for Ali lowCode engine", "description": "Types for Ali lowCode engine",
"files": [ "files": [
"es", "es",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-utils", "name": "@alilc/lowcode-utils",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Utils for Ali lowCode engine", "description": "Utils for Ali lowCode engine",
"files": [ "files": [
"lib", "lib",
@ -14,7 +14,7 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mobx": "^6.3.0", "mobx": "^6.3.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-workspace", "name": "@alilc/lowcode-workspace",
"version": "1.3.2", "version": "1.3.2-beta.4",
"description": "Shell Layer for AliLowCodeEngine", "description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -15,11 +15,11 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.3.2", "@alilc/lowcode-designer": "1.3.2-beta.4",
"@alilc/lowcode-editor-core": "1.3.2", "@alilc/lowcode-editor-core": "1.3.2-beta.4",
"@alilc/lowcode-editor-skeleton": "1.3.2", "@alilc/lowcode-editor-skeleton": "1.3.2-beta.4",
"@alilc/lowcode-types": "1.3.2", "@alilc/lowcode-types": "1.3.2-beta.4",
"@alilc/lowcode-utils": "1.3.2", "@alilc/lowcode-utils": "1.3.2-beta.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5", "enzyme-adapter-react-16": "^1.15.5",

View File

@ -17,7 +17,7 @@ export interface IEditorWindow extends Omit<IPublicModelWindow<IResource>, 'chan
editorViews: Map<string, IViewContext>; editorViews: Map<string, IViewContext>;
_editorView: IViewContext; editorView: IViewContext;
changeViewName: (name: string, ignoreEmit?: boolean) => void; changeViewName: (name: string, ignoreEmit?: boolean) => void;
@ -54,7 +54,7 @@ export class EditorWindow implements IEditorWindow {
url: string | undefined; url: string | undefined;
@obx.ref _editorView: Context; @obx.ref editorView: Context;
@obx editorViews: Map<string, Context> = new Map<string, Context>(); @obx editorViews: Map<string, Context> = new Map<string, Context>();
@ -62,13 +62,6 @@ export class EditorWindow implements IEditorWindow {
sleep: boolean | undefined; sleep: boolean | undefined;
get editorView() {
if (!this._editorView) {
return this.editorViews.values().next().value;
}
return this._editorView;
}
constructor(readonly resource: IResource, readonly workspace: IWorkspace, private config: IWindowCOnfig) { constructor(readonly resource: IResource, readonly workspace: IWorkspace, private config: IWindowCOnfig) {
makeObservable(this); makeObservable(this);
this.title = config.title; this.title = config.title;
@ -82,10 +75,10 @@ export class EditorWindow implements IEditorWindow {
updateState(state: WINDOW_STATE): void { updateState(state: WINDOW_STATE): void {
switch (state) { switch (state) {
case WINDOW_STATE.active: case WINDOW_STATE.active:
this._editorView?.setActivate(true); this.editorView?.setActivate(true);
break; break;
case WINDOW_STATE.inactive: case WINDOW_STATE.inactive:
this._editorView?.setActivate(false); this.editorView?.setActivate(false);
break; break;
case WINDOW_STATE.destroyed: case WINDOW_STATE.destroyed:
break; break;
@ -153,7 +146,7 @@ export class EditorWindow implements IEditorWindow {
for (let i = 0; i < editorViews.length; i++) { for (let i = 0; i < editorViews.length; i++) {
const name = editorViews[i].viewName; const name = editorViews[i].viewName;
await this.initViewType(name); await this.initViewType(name);
if (!this._editorView) { if (!this.editorView) {
this.changeViewName(name); this.changeViewName(name);
} }
} }
@ -197,14 +190,14 @@ export class EditorWindow implements IEditorWindow {
}; };
changeViewName = (name: string, ignoreEmit: boolean = true) => { changeViewName = (name: string, ignoreEmit: boolean = true) => {
this._editorView?.setActivate(false); this.editorView?.setActivate(false);
this._editorView = this.editorViews.get(name)!; this.editorView = this.editorViews.get(name)!;
if (!this._editorView) { if (!this.editorView) {
return; return;
} }
this._editorView.setActivate(true); this.editorView.setActivate(true);
if (!ignoreEmit) { if (!ignoreEmit) {
this.emitter.emit('window.change.view.type', name); this.emitter.emit('window.change.view.type', name);