Compare commits

...

27 Commits

Author SHA1 Message Date
JackLian
f566257c68 chore(release): publish 1.1.9-beta.10 2023-07-25 17:47:27 +08:00
liujuping
9bb65cc95c feat: skeleton item add visible prop 2023-07-25 17:42:45 +08:00
JackLian
d2bc149c16 chore(release): publish 1.1.9-beta.9 2023-07-25 16:57:18 +08:00
liujuping
dbc5a444f2 feat: add state for workspace windows 2023-07-25 16:23:39 +08:00
liangzr
bda7bb0ed8 feat: generateTemplate fun support context 2023-07-25 16:23:39 +08:00
JackLian
c790928116 chore(release): publish 1.1.9-beta.8 2023-07-25 11:08:19 +08:00
LeoYuan 袁力皓
735b599ce1 fix: lock some ice libs && next resource 404 2023-07-25 11:05:58 +08:00
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
66 changed files with 271 additions and 165 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -111,8 +111,6 @@ export class ProjectBuilder implements IProjectBuilder {
// Init
const { schemaParser } = this;
const projectRoot = await this.template.generateTemplate();
let schema: IPublicTypeProjectSchema =
typeof originalSchema === 'string' ? JSON.parse(originalSchema) : originalSchema;
@ -131,6 +129,9 @@ export class ProjectBuilder implements IProjectBuilder {
// Collect Deps
// Parse JSExpression
const parseResult: IParseResult = schemaParser.parse(schema);
const projectRoot = await this.template.generateTemplate(parseResult);
let buildResult: IModuleInfo[] = [];
const builders = this.createModuleBuilders({

View File

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

View File

@ -67,12 +67,12 @@ const pluginFactory: BuilderComponentPluginFactory<IceJs3PackageJsonPluginConfig
'react-router-dom': '^6.9.0',
'intl-messageformat': '^9.3.6',
'@alifd/next': '1.26.15',
'@ice/runtime': '^1.0.0',
'@ice/runtime': '~1.1.0',
// 数据源相关的依赖:
...buildDataSourceDependencies(ir, cfg?.datasourceConfig),
},
devDependencies: {
'@ice/app': '^3.0.0',
'@ice/app': '~3.1.0',
'@types/react': '^18.0.0',
'@types/react-dom': '^18.0.0',
'@types/node': '^18.11.17',

View File

@ -27,7 +27,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

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

View File

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

View File

@ -127,7 +127,7 @@ export interface ISchemaParser {
export interface IProjectTemplate {
slots: Record<string, IProjectSlot>;
generateTemplate: () => ResultDir | Promise<ResultDir>;
generateTemplate: (data: IParseResult) => ResultDir | Promise<ResultDir>;
}
export interface IProjectSlot {

View File

@ -10,13 +10,13 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.19.18",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-url-params-handler": "^1.0.0",
"@alilc/lowcode-datasource-fetch-handler": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,7 +10,7 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-url-params-handler": "^1.0.0",
"@alilc/b6-page": "^0.1.0",
@ -20,7 +20,7 @@
"@alilc/b6-util-mocks": "1.x"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,11 +10,11 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.19.18",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,11 +10,11 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.19.18",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,14 +10,14 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-fetch-handler": "^1.0.0",
"@alife/container": "^1.0.0",
"@alife/mc-assets-1935": "0.1.9"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,7 +10,7 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"undefined": "*",
"@alife/container": "0.3.7",
@ -18,7 +18,7 @@
"@alife/mc-assets-1935": "0.1.16"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,13 +10,13 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.19.18",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-url-params-handler": "^1.0.0",
"@alilc/lowcode-datasource-fetch-handler": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,14 +10,14 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"undefined": "*",
"@alilc/antd-lowcode": "0.8.0",
"@alife/container": "0.3.7"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,13 +10,13 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-http-handler": "^1.0.0",
"@alilc/lowcode-components": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,12 +10,12 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.19.18",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-datasource-jsonp-handler": "^1.0.0"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,7 +10,7 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"undefined": "*",
"@alilc/antd-lowcode-materials": "0.9.4",
@ -18,7 +18,7 @@
"@alife/container": "0.3.7"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -10,7 +10,7 @@
"react-router-dom": "^6.9.0",
"intl-messageformat": "^9.3.6",
"@alifd/next": "1.26.15",
"@ice/runtime": "^1.0.0",
"@ice/runtime": "~1.1.0",
"@alilc/lowcode-datasource-engine": "^1.0.0",
"undefined": "*",
"@alilc/antd-lowcode-materials": "0.11.0",
@ -18,7 +18,7 @@
"@alife/container": "0.3.7"
},
"devDependencies": {
"@ice/app": "^3.0.0",
"@ice/app": "~3.1.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/node": "^18.11.17",

View File

@ -19,7 +19,7 @@ export default function Document() {
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react/18.2.0/umd/react.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/react-dom/18.2.0/umd/react-dom.development.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/??react-router/6.9.0/react-router.production.min.js,react-router-dom/6.9.0/react-router-dom.production.min.js" />
<script crossOrigin="anonymous" src="//alifd.alicdn.com/npm/@alifd/next/1.26.15/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/alifd__next/1.26.22/next.min.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js" />
<script crossOrigin="anonymous" src="//g.alicdn.com/platform/c/??lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js" />
<Scripts />

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-designer",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Designer for Ali LowCode Engine",
"main": "lib/index.js",
"module": "es/index.js",
@ -16,9 +16,9 @@
"license": "MIT",
"dependencies": {
"@alilc/build-plugin-lce": "^0.0.4-beta.2",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"react": "^16",
"react-dom": "^16.7.0",
@ -53,7 +53,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-editor-core",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Core Api for Ali lowCode engine",
"license": "MIT",
"main": "lib/index.js",
@ -14,8 +14,8 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"intl-messageformat": "^9.3.1",
@ -47,7 +47,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -155,6 +155,10 @@ const VALID_ENGINE_OPTIONS = {
description: '是否开启应用级设计模式',
default: false,
},
workspaceEmptyComponent: {
type: 'function',
description: '应用级设计模式下,窗口为空时展示的占位组件',
},
};
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 {
try {
const workspace = globalContext.get('workspace');
const editor = workspace.isActive ? workspace.window.editor : globalContext.get('editor');
const designer = editor.get('designer');
const editor = workspace.isActive ? workspace.window?.editor : globalContext.get('editor');
const designer = editor?.get('designer');
const node = designer?.currentSelection?.getNodes()?.[0];
const npm = node?.componentMeta?.npm;
const selected =

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-editor-skeleton",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "alibaba lowcode editor skeleton",
"main": "lib/index.js",
"module": "es/index.js",
@ -19,10 +19,10 @@
],
"dependencies": {
"@alifd/next": "^1.20.12",
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"react": "^16.8.1",
"react-dom": "^16.8.1"
@ -42,7 +42,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"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 { Panel } from '../widget/panel';
import { PanelConfig } from '../types';
import { IPublicApiProject } from '@alilc/lowcode-types';
@observer
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);
};
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
this.focusing = area.skeleton.focusTracker.create({
range: (e) => {
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)) {
return false;
}
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) {
return false;

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-engine",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
"main": "lib/engine-core.js",
"module": "es/engine-core.js",
@ -19,15 +19,15 @@
"license": "MIT",
"dependencies": {
"@alifd/next": "^1.19.12",
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-editor-skeleton": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-editor-skeleton": "1.1.9-beta.10",
"@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-designer": "1.1.8",
"@alilc/lowcode-plugin-outline-pane": "1.1.8",
"@alilc/lowcode-shell": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-workspace": "1.1.8",
"@alilc/lowcode-plugin-designer": "1.1.9-beta.10",
"@alilc/lowcode-plugin-outline-pane": "1.1.9-beta.10",
"@alilc/lowcode-shell": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"@alilc/lowcode-workspace": "1.1.9-beta.10",
"react": "^16.8.1",
"react-dom": "^16.8.1"
},
@ -53,7 +53,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-plugin-designer",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "alibaba lowcode editor designer plugin",
"files": [
"es",
@ -18,9 +18,9 @@
],
"author": "xiayang.xy",
"dependencies": {
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"react": "^16.8.1",
"react-dom": "^16.8.1"
},
@ -37,7 +37,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Outline pane for Ali lowCode engine",
"files": [
"es",
@ -13,8 +13,8 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"react": "^16",
"react-dom": "^16.7.0",
@ -38,7 +38,7 @@
"type": "http",
"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",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-react-renderer",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "react renderer for ali lowcode engine",
"main": "lib/index.js",
"module": "es/index.js",
@ -22,7 +22,7 @@
],
"dependencies": {
"@alifd/next": "^1.21.16",
"@alilc/lowcode-renderer-core": "1.1.8"
"@alilc/lowcode-renderer-core": "1.1.9-beta.10"
},
"devDependencies": {
"@alib/build-scripts": "^0.1.18",
@ -42,6 +42,6 @@
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer"
},
"homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues"
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "react simulator renderer for alibaba lowcode designer",
"main": "lib/index.js",
"module": "es/index.js",
@ -17,10 +17,10 @@
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},
"dependencies": {
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-react-renderer": "1.1.8",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-react-renderer": "1.1.9-beta.10",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"mobx": "^6.3.0",
"mobx-react": "^7.2.0",
@ -43,7 +43,7 @@
"type": "http",
"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",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-renderer-core",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "renderer core",
"license": "MIT",
"main": "lib/index.js",
@ -16,8 +16,8 @@
},
"dependencies": {
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"fetch-jsonp": "^1.1.3",
@ -32,7 +32,7 @@
"devDependencies": {
"@alib/build-scripts": "^0.1.18",
"@alifd/next": "^1.26.0",
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@babel/plugin-transform-typescript": "^7.16.8",
"@testing-library/react": "^11.2.2",
"@types/classnames": "^2.2.11",
@ -55,7 +55,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-shell",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js",
"module": "es/index.js",
@ -13,12 +13,12 @@
},
"license": "MIT",
"dependencies": {
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-editor-skeleton": "1.1.8",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-workspace": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-editor-skeleton": "1.1.9-beta.10",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"@alilc/lowcode-workspace": "1.1.9-beta.10",
"classnames": "^2.2.6",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
@ -48,7 +48,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

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

View File

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

View File

@ -13,6 +13,10 @@ export class SkeletonItem implements IPublicModelSkeletonItem {
return this[skeletonItemSymbol].name;
}
get visible() {
return this[skeletonItemSymbol].visible;
}
disable() {
this[skeletonItemSymbol].disable?.();
}

View File

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

View File

@ -2,5 +2,15 @@
* @since 1.1.7
*/
export interface IPublicModelSkeletonItem {
name: string;
visible: boolean;
disable(): void;
enable(): void;
hide(): void;
show(): void;
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-utils",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Utils for Ali lowCode engine",
"files": [
"lib",
@ -14,7 +14,7 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-types": "1.1.9-beta.10",
"lodash": "^4.17.21",
"mobx": "^6.3.0",
"react": "^16"
@ -32,7 +32,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-workspace",
"version": "1.1.8",
"version": "1.1.9-beta.10",
"description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js",
"module": "es/index.js",
@ -15,11 +15,11 @@
},
"license": "MIT",
"dependencies": {
"@alilc/lowcode-designer": "1.1.8",
"@alilc/lowcode-editor-core": "1.1.8",
"@alilc/lowcode-editor-skeleton": "1.1.8",
"@alilc/lowcode-types": "1.1.8",
"@alilc/lowcode-utils": "1.1.8",
"@alilc/lowcode-designer": "1.1.9-beta.10",
"@alilc/lowcode-editor-core": "1.1.9-beta.10",
"@alilc/lowcode-editor-skeleton": "1.1.9-beta.10",
"@alilc/lowcode-types": "1.1.9-beta.10",
"@alilc/lowcode-utils": "1.1.9-beta.10",
"classnames": "^2.2.6",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
@ -49,7 +49,7 @@
"type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace"
},
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6",
"gitHead": "a78a31a7f310c7e4410f71a5845a6a297b2a9c67",
"bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme"
}

View File

@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
import classNames from 'classnames';
import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area, Panel } from '@alilc/lowcode-editor-skeleton';
import { IPublicApiProject } from '@alilc/lowcode-types';
@observer
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);
};
const project: IPublicApiProject | undefined = area.skeleton.editor.get('project');
this.focusing = area.skeleton.focusTracker.create({
range: (e) => {
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)) {
return false;
}
if (project?.simulatorHost?.contentWindow?.document.documentElement.contains(target)) {
return false;
}
// 点击设置区
if (document.querySelector('.lc-right-area')?.contains(target)) {
return false;

View File

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

View File

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

View File

@ -26,6 +26,22 @@ export interface IEditorWindow extends Omit<IPublicModelWindow<IResource>, 'chan
sleep?: boolean;
init(): void;
updateState(state: WINDOW_STATE): void;
}
export enum WINDOW_STATE {
// 睡眠
sleep = 'sleep',
// 激活
active = 'active',
// 未激活
inactive = 'inactive',
// 销毁
destroyed = 'destroyed'
}
export class EditorWindow implements IEditorWindow {
@ -51,6 +67,22 @@ export class EditorWindow implements IEditorWindow {
this.title = config.title;
this.icon = resource.icon;
this.sleep = config.sleep;
if (config.sleep) {
this.updateState(WINDOW_STATE.sleep);
}
}
updateState(state: WINDOW_STATE): void {
switch (state) {
case WINDOW_STATE.active:
this.editorView?.setActivate(true);
break;
case WINDOW_STATE.inactive:
this.editorView?.setActivate(false);
break;
case WINDOW_STATE.destroyed:
break;
}
}
async importSchema(schema: any) {
@ -102,6 +134,7 @@ export class EditorWindow implements IEditorWindow {
this.initReady = true;
this.workspace.checkWindowQueue();
this.sleep = false;
this.updateState(WINDOW_STATE.active);
}
initViewTypes = async () => {

View File

@ -2,7 +2,7 @@ import { IDesigner, ILowCodePluginManager, LowCodePluginManager } from '@alilc/l
import { createModuleEventBus, Editor, IEditor, IEventBus, makeObservable, obx } from '@alilc/lowcode-editor-core';
import { IPublicApiPlugins, IPublicApiWorkspace, IPublicEnumPluginRegisterLevel, IPublicResourceList, IPublicTypeDisposable, IPublicTypeResourceType, IShellModelFactory } from '@alilc/lowcode-types';
import { BasicContext } from './context/base-context';
import { EditorWindow } from './window';
import { EditorWindow, WINDOW_STATE } from './window';
import type { IEditorWindow } from './window';
import { IResource, Resource } from './resource';
import { IResourceType, ResourceType } from './resource-type';
@ -103,6 +103,7 @@ export class Workspace implements IWorkspace {
readonly shellModelFactory: any,
) {
this.context = new BasicContext(this, '', IPublicEnumPluginRegisterLevel.Workspace);
this.context.innerHotkey.activate(true);
makeObservable(this);
}
@ -197,14 +198,16 @@ export class Workspace implements IWorkspace {
}
const window = this.windows[index];
this.windows.splice(index, 1);
this.window?.updateState(WINDOW_STATE.destroyed);
if (this.window === window) {
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.emitChangeActiveWindow();
}
this.emitChangeWindow();
this.window?.updateState(WINDOW_STATE.active);
}
removeEditorWindow(resourceName: string, title: string) {
@ -214,6 +217,7 @@ export class Workspace implements IWorkspace {
async openEditorWindowById(id: string) {
const window = this.editorWindowMap.get(id);
this.window?.updateState(WINDOW_STATE.inactive);
if (window) {
this.window = window;
if (window.sleep) {
@ -221,6 +225,7 @@ export class Workspace implements IWorkspace {
}
this.emitChangeActiveWindow();
}
this.window?.updateState(WINDOW_STATE.active);
}
async openEditorWindow(name: string, title: string, options: Object, viewType?: string, sleep?: boolean) {
@ -235,6 +240,7 @@ export class Workspace implements IWorkspace {
console.error(`${name} resourceType is not available`);
return;
}
this.window?.updateState(WINDOW_STATE.inactive);
const filterWindows = this.windows.filter(d => (d.resource?.name === name && d.resource.title == title));
if (filterWindows && filterWindows.length) {
this.window = filterWindows[0];
@ -244,6 +250,7 @@ export class Workspace implements IWorkspace {
this.checkWindowQueue();
}
this.emitChangeActiveWindow();
this.window?.updateState(WINDOW_STATE.active);
return;
}
const resource = new Resource({
@ -265,6 +272,7 @@ export class Workspace implements IWorkspace {
}
this.emitChangeWindow();
this.emitChangeActiveWindow();
this.window?.updateState(WINDOW_STATE.active);
}
onChangeWindows(fn: () => void) {