mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +00:00
Compare commits
4 Commits
v1.3.2-bet
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6305c2284 | ||
|
|
2892a01d29 | ||
|
|
bd85ca3ca6 | ||
|
|
44beb2a25a |
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -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 @JackLian
|
* @liujuping @1ncounter
|
||||||
|
|
||||||
/modules/material-parser @akirakai
|
/modules/material-parser @akirakai
|
||||||
/modules/code-generator @qingniaotonghua
|
/modules/code-generator @qingniaotonghua
|
||||||
|
|||||||
2
.github/workflows/publish engine.yml
vendored
2
.github/workflows/publish engine.yml
vendored
@ -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 == 'JackLian' || github.actor == 'liujuping')
|
(github.actor == '1ncounter' || github.actor == 'liujuping')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lerna": "4.0.0",
|
"lerna": "4.0.0",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"packages": [
|
"packages": [
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-designer",
|
"name": "@alilc/lowcode-designer",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-types": "1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
"react-dom": "^16.7.0",
|
"react-dom": "^16.7.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-editor-core",
|
"name": "@alilc/lowcode-editor-core",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-editor-skeleton",
|
"name": "@alilc/lowcode-editor-skeleton",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-editor-core": "1.3.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-types": "1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"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"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine",
|
"name": "@alilc/lowcode-engine",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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,16 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.12",
|
"@alifd/next": "^1.19.12",
|
||||||
"@alilc/lowcode-designer": "1.3.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-editor-core": "1.3.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.3.1",
|
"@alilc/lowcode-editor-skeleton": "1.3.2",
|
||||||
"@alilc/lowcode-engine-ext": "^1.0.0",
|
"@alilc/lowcode-engine-ext": "^1.0.0",
|
||||||
"@alilc/lowcode-plugin-designer": "1.3.1",
|
"@alilc/lowcode-plugin-command": "1.3.2",
|
||||||
"@alilc/lowcode-plugin-outline-pane": "1.3.1",
|
"@alilc/lowcode-plugin-designer": "1.3.2",
|
||||||
"@alilc/lowcode-shell": "1.3.1",
|
"@alilc/lowcode-plugin-outline-pane": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-shell": "1.3.2",
|
||||||
"@alilc/lowcode-workspace": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"@alilc/lowcode-plugin-command": "1.3.1",
|
"@alilc/lowcode-workspace": "1.3.2",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-ignitor",
|
"name": "@alilc/lowcode-ignitor",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"description": "点火器,bootstrap lce project",
|
"description": "点火器,bootstrap lce project",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-plugin-command",
|
"name": "@alilc/lowcode-plugin-command",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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",
|
||||||
@ -30,8 +30,8 @@
|
|||||||
"url": "https://github.com/alibaba/lowcode-engine/issues"
|
"url": "https://github.com/alibaba/lowcode-engine/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-types": "^1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "^1.3.1"
|
"@alilc/lowcode-utils": "1.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18"
|
"@alib/build-scripts": "^0.1.18"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-plugin-designer",
|
"name": "@alilc/lowcode-plugin-designer",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-editor-core": "1.3.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-plugin-outline-pane",
|
"name": "@alilc/lowcode-plugin-outline-pane",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
"react-dom": "^16.7.0",
|
"react-dom": "^16.7.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-react-renderer",
|
"name": "@alilc/lowcode-react-renderer",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1"
|
"@alilc/lowcode-renderer-core": "1.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18",
|
"@alib/build-scripts": "^0.1.18",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-react-simulator-renderer",
|
"name": "@alilc/lowcode-react-simulator-renderer",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-react-renderer": "1.3.1",
|
"@alilc/lowcode-react-renderer": "1.3.2",
|
||||||
"@alilc/lowcode-types": "1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-renderer-core",
|
"name": "@alilc/lowcode-renderer-core",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@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",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-shell",
|
"name": "@alilc/lowcode-shell",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-editor-core": "1.3.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.3.1",
|
"@alilc/lowcode-editor-skeleton": "1.3.2",
|
||||||
"@alilc/lowcode-types": "1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"@alilc/lowcode-workspace": "1.3.1",
|
"@alilc/lowcode-workspace": "1.3.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import {
|
|||||||
IDesigner,
|
IDesigner,
|
||||||
isComponentMeta,
|
isComponentMeta,
|
||||||
} from '@alilc/lowcode-designer';
|
} from '@alilc/lowcode-designer';
|
||||||
import { IPublicTypeAssetsJson } from '@alilc/lowcode-utils';
|
import { IPublicTypeAssetsJson, getLogger } from '@alilc/lowcode-utils';
|
||||||
import {
|
import {
|
||||||
IPublicTypeComponentAction,
|
IPublicTypeComponentAction,
|
||||||
IPublicTypeComponentMetadata,
|
IPublicTypeComponentMetadata,
|
||||||
@ -21,6 +21,8 @@ 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;
|
||||||
@ -31,6 +33,10 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-types",
|
"name": "@alilc/lowcode-types",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"description": "Types for Ali lowCode engine",
|
"description": "Types for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-utils",
|
"name": "@alilc/lowcode-utils",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-workspace",
|
"name": "@alilc/lowcode-workspace",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"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.1",
|
"@alilc/lowcode-designer": "1.3.2",
|
||||||
"@alilc/lowcode-editor-core": "1.3.1",
|
"@alilc/lowcode-editor-core": "1.3.2",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.3.1",
|
"@alilc/lowcode-editor-skeleton": "1.3.2",
|
||||||
"@alilc/lowcode-types": "1.3.1",
|
"@alilc/lowcode-types": "1.3.2",
|
||||||
"@alilc/lowcode-utils": "1.3.1",
|
"@alilc/lowcode-utils": "1.3.2",
|
||||||
"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",
|
||||||
|
|||||||
@ -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,6 +62,13 @@ 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;
|
||||||
@ -75,10 +82,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;
|
||||||
@ -146,7 +153,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,14 +197,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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user