Compare commits

...

20 Commits

Author SHA1 Message Date
JackLian
7dd74afc7a chore(release): publish 1.1.9-beta.7 2023-07-19 11:29:14 +08:00
liujuping
898300f439 style: update workbench styles 2023-07-19 11:26:32 +08:00
JackLian
5860824d66 chore(release): publish 1.1.9-beta.6 2023-07-18 10:30:42 +08:00
liujuping
1a8ee9b88b fix: fix left-pane cant hidden when iframe click 2023-07-18 10:26:53 +08:00
JackLian
7e1fe6a07f chore(release): publish 1.1.9-beta.5 2023-07-14 14:43:59 +08:00
JackLian
a78a31a7f3 chore(release): publish 1.1.9-beta.4 2023-07-14 14:43:05 +08:00
liujuping
23d782875c feat: add hotkey in workspace plugins 2023-07-14 14:40:59 +08:00
eternalsky
5074229704 chore(release): code-generator - 1.1.5 2023-07-14 14:40:59 +08:00
eternalsky
7fdfd32ebf feat(codegen): add new option exclude for plugin containerLifeCycle 2023-07-14 14:40:59 +08:00
Jack Lian
ca3b6d084f chore(release): publish 1.1.9-beta.3 2023-07-12 18:46:55 +08:00
liujuping
61afbcab77 feat: add config.workspaceEmptyComponent 2023-07-12 18:28:39 +08:00
JackLian
3e5ae7024d chore(release): publish 1.1.9-beta.2 2023-07-12 11:42:58 +08:00
AndyJin
a3ab0e4b24 fix: the action of history would not update outline tree 2023-07-12 11:40:37 +08:00
JackLian
7bde669510 chore(release): publish 1.1.9-beta.1 2023-07-11 17:33:53 +08:00
liujuping
bf7b0b3877 feat: add new cache from diff origin component 2023-07-11 17:31:51 +08:00
橙林
60545d1c7f chore(code-gen): template sync icejs 2023-07-11 17:31:51 +08:00
橙林
a3e014dced chore(code-gen): icejs、icejs3 solutions plugins.components add containerInjectConstants 2023-07-11 17:31:50 +08:00
橙林
d428ca3b18 chore(code-gen): replace deprecated api 2023-07-11 17:31:50 +08:00
JackLian
fbcb14b426 chore(docs): publish 1.0.33 2023-07-11 17:31:50 +08:00
JackLian
61fe7a7916 chore(release): publish 1.1.9-beta.0 2023-07-10 16:47:24 +08:00
35 changed files with 173 additions and 122 deletions

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-code-generator", "name": "@alilc/lowcode-code-generator",
"version": "1.1.4", "version": "1.1.5",
"description": "出码引擎 for LowCode Engine", "description": "出码引擎 for LowCode Engine",
"license": "MIT", "license": "MIT",
"main": "lib/index.js", "main": "lib/index.js",

View File

@ -635,18 +635,20 @@ export default function createHelloWorldProjectBuilder() {
template: CodeGen.solutionParts.icejs.template, template: CodeGen.solutionParts.icejs.template,
plugins: { plugins: {
components: [ components: [
CodeGen.plugins.react.reactCommonDeps(), CodeGen.plugins.icejs.reactCommonDeps(),
CodeGen.plugins.common.esmodule({ fileType: 'jsx' }), CodeGen.plugins.common.esModule({ fileType: 'jsx' }),
CodeGen.plugins.react.containerClass(), CodeGen.plugins.common.styleImport(),
CodeGen.plugins.react.containerInjectContext(), CodeGen.plugins.icejs.containerClass(),
CodeGen.plugins.react.containerInjectUtils(), CodeGen.plugins.icejs.containerInjectContext(),
CodeGen.plugins.react.containerInjectDataSourceEngine(), CodeGen.plugins.icejs.containerInjectUtils(),
CodeGen.plugins.react.containerInjectI18n(), CodeGen.plugins.icejs.containerInjectDataSourceEngine(),
CodeGen.plugins.react.containerInitState(), CodeGen.plugins.icejs.containerInjectI18n(),
CodeGen.plugins.react.containerLifeCycle(), CodeGen.plugins.icejs.containerInjectConstants(),
CodeGen.plugins.react.containerMethod(), CodeGen.plugins.icejs.containerInitState(),
CodeGen.plugins.icejs.containerLifeCycle(),
CodeGen.plugins.icejs.containerMethod(),
examplePlugin(), examplePlugin(),
CodeGen.plugins.react.jsx({ CodeGen.plugins.icejs.jsx({
nodeTypeMapping: { nodeTypeMapping: {
Div: 'div', Div: 'div',
Component: 'div', Component: 'div',
@ -657,18 +659,20 @@ export default function createHelloWorldProjectBuilder() {
CodeGen.plugins.style.css(), CodeGen.plugins.style.css(),
], ],
pages: [ pages: [
CodeGen.plugins.react.reactCommonDeps(), CodeGen.plugins.icejs.reactCommonDeps(),
CodeGen.plugins.common.esmodule({ fileType: 'jsx' }), CodeGen.plugins.common.esModule({ fileType: 'jsx' }),
CodeGen.plugins.react.containerClass(), CodeGen.plugins.common.styleImport(),
CodeGen.plugins.react.containerInjectContext(), CodeGen.plugins.icejs.containerClass(),
CodeGen.plugins.react.containerInjectUtils(), CodeGen.plugins.icejs.containerInjectContext(),
CodeGen.plugins.react.containerInjectDataSourceEngine(), CodeGen.plugins.icejs.containerInjectUtils(),
CodeGen.plugins.react.containerInjectI18n(), CodeGen.plugins.icejs.containerInjectDataSourceEngine(),
CodeGen.plugins.react.containerInitState(), CodeGen.plugins.icejs.containerInjectI18n(),
CodeGen.plugins.react.containerLifeCycle(), CodeGen.plugins.icejs.containerInjectConstants(),
CodeGen.plugins.react.containerMethod(), CodeGen.plugins.icejs.containerInitState(),
CodeGen.plugins.icejs.containerLifeCycle(),
CodeGen.plugins.icejs.containerMethod(),
examplePlugin(), examplePlugin(),
CodeGen.plugins.react.jsx({ CodeGen.plugins.icejs.jsx({
nodeTypeMapping: { nodeTypeMapping: {
Div: 'div', Div: 'div',
Component: 'div', Component: 'div',
@ -679,13 +683,13 @@ export default function createHelloWorldProjectBuilder() {
CodeGen.plugins.style.css(), CodeGen.plugins.style.css(),
], ],
router: [ router: [
CodeGen.plugins.common.esmodule(), CodeGen.plugins.common.esModule(),
CodeGen.solutionParts.icejs.plugins.router(), CodeGen.solutionParts.icejs.plugins.router(),
], ],
entry: [CodeGen.solutionParts.icejs.plugins.entry()], entry: [CodeGen.solutionParts.icejs.plugins.entry()],
constants: [CodeGen.plugins.project.constants()], constants: [CodeGen.plugins.project.constants()],
utils: [ utils: [
CodeGen.plugins.common.esmodule(), CodeGen.plugins.common.esModule(),
CodeGen.plugins.project.utils('react'), CodeGen.plugins.project.utils('react'),
], ],
i18n: [CodeGen.plugins.project.i18n()], i18n: [CodeGen.plugins.project.i18n()],

View File

@ -16,13 +16,14 @@ import { isJSFunction, isJSExpression } from '@alilc/lowcode-types';
import { isJSExpressionFn } from '../../../utils/common'; import { isJSExpressionFn } from '../../../utils/common';
export interface PluginConfig { export interface PluginConfig {
fileType: string; fileType?: string;
exportNameMapping: Record<string, string>; exportNameMapping?: Record<string, string>;
normalizeNameMapping: Record<string, string>; normalizeNameMapping?: Record<string, string>;
exclude?: string[];
} }
const pluginFactory: BuilderComponentPluginFactory<PluginConfig> = (config?) => { const pluginFactory: BuilderComponentPluginFactory<PluginConfig> = (config?) => {
const cfg: PluginConfig = { const cfg = {
fileType: FileType.JSX, fileType: FileType.JSX,
exportNameMapping: {}, exportNameMapping: {},
normalizeNameMapping: {}, normalizeNameMapping: {},
@ -56,6 +57,10 @@ const pluginFactory: BuilderComponentPluginFactory<PluginConfig> = (config?) =>
normalizeName = cfg.normalizeNameMapping[lifeCycleName] || lifeCycleName; normalizeName = cfg.normalizeNameMapping[lifeCycleName] || lifeCycleName;
} }
if (cfg?.exclude?.includes(normalizeName)) {
return null;
}
const exportName = cfg.exportNameMapping[lifeCycleName] || lifeCycleName; const exportName = cfg.exportNameMapping[lifeCycleName] || lifeCycleName;
if (normalizeName === 'constructor') { if (normalizeName === 'constructor') {
return { return {
@ -97,7 +102,7 @@ const pluginFactory: BuilderComponentPluginFactory<PluginConfig> = (config?) =>
}), }),
linkAfter: [...DEFAULT_LINK_AFTER[CLASS_DEFINE_CHUNK_NAME.InsMethod]], linkAfter: [...DEFAULT_LINK_AFTER[CLASS_DEFINE_CHUNK_NAME.InsMethod]],
}; };
}); }).filter((i) => !!i);
next.chunks.push(...chunks.filter((x): x is ICodeChunk => x !== null)); next.chunks.push(...chunks.filter((x): x is ICodeChunk => x !== null));
} }

View File

@ -45,6 +45,7 @@ export default function createIceJsProjectBuilder(
containerInjectUtils(), containerInjectUtils(),
containerInjectDataSourceEngine(), containerInjectDataSourceEngine(),
containerInjectI18n(), containerInjectI18n(),
containerInjectConstants(),
containerInitState(), containerInitState(),
containerLifeCycle(), containerLifeCycle(),
containerMethod(), containerMethod(),

View File

@ -45,6 +45,7 @@ export default function createIceJsProjectBuilder(
containerInjectUtils(), containerInjectUtils(),
containerInjectDataSourceEngine(), containerInjectDataSourceEngine(),
containerInjectI18n(), containerInjectI18n(),
containerInjectConstants(),
containerInitState(), containerInitState(),
containerLifeCycle(), containerLifeCycle(),
containerMethod(), containerMethod(),

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-designer", "name": "@alilc/lowcode-designer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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",
@ -16,9 +16,9 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/build-plugin-lce": "^0.0.4-beta.2", "@alilc/build-plugin-lce": "^0.0.4-beta.2",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
@ -53,7 +53,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-core", "name": "@alilc/lowcode-editor-core",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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",
@ -14,8 +14,8 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"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",
@ -47,7 +47,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -155,6 +155,10 @@ const VALID_ENGINE_OPTIONS = {
description: '是否开启应用级设计模式', description: '是否开启应用级设计模式',
default: false, default: false,
}, },
workspaceEmptyComponent: {
type: 'function',
description: '应用级设计模式下,窗口为空时展示的占位组件',
},
}; };
const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => { const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => {

View File

@ -317,8 +317,8 @@ function getKeyInfo(combination: string, action?: string): KeyInfo {
function fireCallback(callback: IPublicTypeHotkeyCallback, e: KeyboardEvent, combo?: string, sequence?: string): void { function fireCallback(callback: IPublicTypeHotkeyCallback, e: KeyboardEvent, combo?: string, sequence?: string): void {
try { try {
const workspace = globalContext.get('workspace'); const workspace = globalContext.get('workspace');
const editor = workspace.isActive ? workspace.window.editor : globalContext.get('editor'); const editor = workspace.isActive ? workspace.window?.editor : globalContext.get('editor');
const designer = editor.get('designer'); const designer = editor?.get('designer');
const node = designer?.currentSelection?.getNodes()?.[0]; const node = designer?.currentSelection?.getNodes()?.[0];
const npm = node?.componentMeta?.npm; const npm = node?.componentMeta?.npm;
const selected = const selected =

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-skeleton", "name": "@alilc/lowcode-editor-skeleton",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"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"
@ -42,7 +42,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -4,6 +4,7 @@ import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area } from '../area'; import { Area } from '../area';
import { Panel } from '../widget/panel'; import { Panel } from '../widget/panel';
import { PanelConfig } from '../types'; import { PanelConfig } from '../types';
import { IPublicApiProject } from '@alilc/lowcode-types';
@observer @observer
export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, Panel> }> { export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, Panel> }> {
@ -31,6 +32,8 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
area.skeleton.editor.removeListener('designer.drag', triggerClose); area.skeleton.editor.removeListener('designer.drag', triggerClose);
}; };
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
this.focusing = area.skeleton.focusTracker.create({ this.focusing = area.skeleton.focusTracker.create({
range: (e) => { range: (e) => {
const target = e.target as HTMLElement; const target = e.target as HTMLElement;
@ -44,6 +47,9 @@ export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, P
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) { if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
return false; return false;
} }
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区 // 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) { if (document.querySelector('.lc-right-area')?.contains(target)) {
return false; return false;

View File

@ -318,7 +318,7 @@ body {
align-items: center; align-items: center;
.lc-title { .lc-title {
flex-direction: column; flex-direction: column;
width: 46px; width: calc(var(--left-area-width) - 2px);
height: 46px; height: 46px;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine", "name": "@alilc/lowcode-engine",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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,15 +19,15 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.12", "@alifd/next": "^1.19.12",
"@alilc/lowcode-designer": "1.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-editor-skeleton": "1.1.8", "@alilc/lowcode-editor-skeleton": "1.1.9-beta.7",
"@alilc/lowcode-engine-ext": "^1.0.0", "@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-designer": "1.1.8", "@alilc/lowcode-plugin-designer": "1.1.9-beta.7",
"@alilc/lowcode-plugin-outline-pane": "1.1.8", "@alilc/lowcode-plugin-outline-pane": "1.1.9-beta.7",
"@alilc/lowcode-shell": "1.1.8", "@alilc/lowcode-shell": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"@alilc/lowcode-workspace": "1.1.8", "@alilc/lowcode-workspace": "1.1.9-beta.7",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },
@ -53,7 +53,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-designer", "name": "@alilc/lowcode-plugin-designer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },
@ -37,7 +37,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-outline-pane", "name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
@ -38,7 +38,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-outline-pane" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-outline-pane"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -30,6 +30,10 @@ export class Tree {
treeNode?.notifyExpandableChanged(); treeNode?.notifyExpandableChanged();
}); });
doc?.history.onChangeCursor(() => {
this.root?.notifyExpandableChanged();
});
doc?.onChangeNodeProp((info: IPublicTypePropChangeOptions) => { doc?.onChangeNodeProp((info: IPublicTypePropChangeOptions) => {
const { node, key } = info; const { node, key } = info;
if (key === '___title___') { if (key === '___title___') {

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-renderer", "name": "@alilc/lowcode-rax-renderer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"description": "Rax renderer for Ali lowCode engine", "description": "Rax renderer for Ali lowCode engine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -30,8 +30,8 @@
"build": "build-scripts build" "build": "build-scripts build"
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-renderer-core": "1.1.8", "@alilc/lowcode-renderer-core": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"rax-find-dom-node": "^1.0.1" "rax-find-dom-node": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
@ -49,6 +49,6 @@
}, },
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-simulator-renderer", "name": "@alilc/lowcode-rax-simulator-renderer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"description": "rax simulator renderer for alibaba lowcode designer", "description": "rax simulator renderer for alibaba lowcode designer",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -13,10 +13,10 @@
"build:umd": "build-scripts build --config build.umd.json" "build:umd": "build-scripts build --config build.umd.json"
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-rax-renderer": "1.1.8", "@alilc/lowcode-rax-renderer": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"driver-universal": "^3.1.3", "driver-universal": "^3.1.3",
"history": "^5.0.0", "history": "^5.0.0",
@ -50,6 +50,6 @@
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-simulator-renderer" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-simulator-renderer"
}, },
"homepage": "https://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-renderer", "name": "@alilc/lowcode-react-renderer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8" "@alilc/lowcode-renderer-core": "1.1.9-beta.7"
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",
@ -42,6 +42,6 @@
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer"
}, },
"homepage": "https://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-simulator-renderer", "name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-react-renderer": "1.1.8", "@alilc/lowcode-react-renderer": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"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",
@ -43,7 +43,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-simulator-renderer" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-simulator-renderer"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-renderer-core", "name": "@alilc/lowcode-renderer-core",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@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",
@ -55,7 +55,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -193,8 +193,8 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
getNode, getNode,
}); });
if (curDocumentId && cache.component.has(componentCacheId)) { if (curDocumentId && cache.component.has(componentCacheId) && (cache.component.get(componentCacheId).Comp === Comp)) {
return cache.component.get(componentCacheId); return cache.component.get(componentCacheId).LeafWrapper;
} }
class LeafHoc extends Component { class LeafHoc extends Component {
@ -590,7 +590,10 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
LeafWrapper.displayName = (Comp as any).displayName; LeafWrapper.displayName = (Comp as any).displayName;
cache.component.set(componentCacheId, LeafWrapper); cache.component.set(componentCacheId, {
LeafWrapper,
Comp,
});
return LeafWrapper; return LeafWrapper;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-shell", "name": "@alilc/lowcode-shell",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-editor-skeleton": "1.1.8", "@alilc/lowcode-editor-skeleton": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"@alilc/lowcode-workspace": "1.1.8", "@alilc/lowcode-workspace": "1.1.9-beta.7",
"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",
@ -48,7 +48,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -19,7 +19,7 @@ export class Setters implements IPublicApiSetters {
const workspace = globalContext.get('workspace'); const workspace = globalContext.get('workspace');
if (workspace.isActive) { if (workspace.isActive) {
return untracked(() => { return untracked(() => {
if (!workspace.window.innerSetters) { if (!workspace.window?.innerSetters) {
logger.error('setter api 调用时机出现问题,请检查'); logger.error('setter api 调用时机出现问题,请检查');
return this[innerSettersSymbol]; return this[innerSettersSymbol];
} }

View File

@ -22,7 +22,7 @@ export class Skeleton implements IPublicApiSkeleton {
} }
const workspace = globalContext.get('workspace'); const workspace = globalContext.get('workspace');
if (workspace.isActive) { if (workspace.isActive) {
if (!workspace.window.innerSkeleton) { if (!workspace.window?.innerSkeleton) {
logger.error('skeleton api 调用时机出现问题,请检查'); logger.error('skeleton api 调用时机出现问题,请检查');
return this[innerSkeletonSymbol]; return this[innerSkeletonSymbol];
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-types", "name": "@alilc/lowcode-types",
"version": "1.1.8", "version": "1.1.9-beta.7",
"description": "Types for Ali lowCode engine", "description": "Types for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -29,7 +29,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/types" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/types"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-utils", "name": "@alilc/lowcode-utils",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mobx": "^6.3.0", "mobx": "^6.3.0",
"react": "^16" "react": "^16"
@ -32,7 +32,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-workspace", "name": "@alilc/lowcode-workspace",
"version": "1.1.8", "version": "1.1.9-beta.7",
"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.1.8", "@alilc/lowcode-designer": "1.1.9-beta.7",
"@alilc/lowcode-editor-core": "1.1.8", "@alilc/lowcode-editor-core": "1.1.9-beta.7",
"@alilc/lowcode-editor-skeleton": "1.1.8", "@alilc/lowcode-editor-skeleton": "1.1.9-beta.7",
"@alilc/lowcode-types": "1.1.8", "@alilc/lowcode-types": "1.1.9-beta.7",
"@alilc/lowcode-utils": "1.1.8", "@alilc/lowcode-utils": "1.1.9-beta.7",
"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",
@ -49,7 +49,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { observer, Focusable } from '@alilc/lowcode-editor-core'; import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area, Panel } from '@alilc/lowcode-editor-skeleton'; import { Area, Panel } from '@alilc/lowcode-editor-skeleton';
import { IPublicApiProject } from '@alilc/lowcode-types';
@observer @observer
export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }> { export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }> {
@ -29,6 +30,8 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
area.skeleton.editor.removeListener('designer.drag', triggerClose); area.skeleton.editor.removeListener('designer.drag', triggerClose);
}; };
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
this.focusing = area.skeleton.focusTracker.create({ this.focusing = area.skeleton.focusTracker.create({
range: (e) => { range: (e) => {
const target = e.target as HTMLElement; const target = e.target as HTMLElement;
@ -42,6 +45,9 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) { if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
return false; return false;
} }
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区 // 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) { if (document.querySelector('.lc-right-area')?.contains(target)) {
return false; return false;

View File

@ -276,7 +276,7 @@ body {
align-items: center; align-items: center;
.lc-title { .lc-title {
flex-direction: column; flex-direction: column;
width: 46px; width: calc(var(--left-area-width) - 2px);
height: 46px; height: 46px;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,5 +1,5 @@
import { Component } from 'react'; import { Component } from 'react';
import { TipContainer, observer } from '@alilc/lowcode-editor-core'; import { TipContainer, engineConfig, observer } from '@alilc/lowcode-editor-core';
import { WindowView } from '../view/window-view'; import { WindowView } from '../view/window-view';
import classNames from 'classnames'; import classNames from 'classnames';
import TopArea from './top-area'; import TopArea from './top-area';
@ -21,17 +21,29 @@ export class Workbench extends Component<{
components?: PluginClassSet; components?: PluginClassSet;
className?: string; className?: string;
topAreaItemClassName?: string; topAreaItemClassName?: string;
}, {
workspaceEmptyComponent: any;
}> { }> {
constructor(props: any) { constructor(props: any) {
super(props); super(props);
const { config, components, workspace } = this.props; const { config, components, workspace } = this.props;
const { skeleton } = workspace; const { skeleton } = workspace;
skeleton.buildFromConfig(config, components); skeleton.buildFromConfig(config, components);
engineConfig.onGot('workspaceEmptyComponent', (workspaceEmptyComponent) => {
this.setState({
workspaceEmptyComponent,
});
});
this.state = {
workspaceEmptyComponent: engineConfig.get('workspaceEmptyComponent'),
};
} }
render() { render() {
const { workspace, className, topAreaItemClassName } = this.props; const { workspace, className, topAreaItemClassName } = this.props;
const { skeleton } = workspace; const { skeleton } = workspace;
const WorkspaceEmptyComponent = this.state.workspaceEmptyComponent;
return ( return (
<div className={classNames('lc-workspace-workbench', className)}> <div className={classNames('lc-workspace-workbench', className)}>
<SkeletonContext.Provider value={skeleton}> <SkeletonContext.Provider value={skeleton}>
@ -53,6 +65,10 @@ export class Workbench extends Component<{
/> />
)) ))
} }
{
!workspace.windows.length && WorkspaceEmptyComponent ? <WorkspaceEmptyComponent /> : null
}
</div> </div>
</div> </div>
<MainArea area={skeleton.mainArea} /> <MainArea area={skeleton.mainArea} />

View File

@ -103,6 +103,7 @@ export class Workspace implements IWorkspace {
readonly shellModelFactory: any, readonly shellModelFactory: any,
) { ) {
this.context = new BasicContext(this, '', IPublicEnumPluginRegisterLevel.Workspace); this.context = new BasicContext(this, '', IPublicEnumPluginRegisterLevel.Workspace);
this.context.innerHotkey.activate(true);
makeObservable(this); makeObservable(this);
} }
@ -199,7 +200,7 @@ export class Workspace implements IWorkspace {
this.windows.splice(index, 1); this.windows.splice(index, 1);
if (this.window === window) { if (this.window === window) {
this.window = this.windows[index] || this.windows[index + 1] || this.windows[index - 1]; this.window = this.windows[index] || this.windows[index + 1] || this.windows[index - 1];
if (this.window.sleep) { if (this.window?.sleep) {
this.window.init(); this.window.init();
} }
this.emitChangeActiveWindow(); this.emitChangeActiveWindow();