Compare commits

...

17 Commits

Author SHA1 Message Date
LeoYuan 袁力皓
2c3634801a chore(release): publish 1.0.9-beta.7 2022-05-31 10:00:44 +08:00
LeoYuan 袁力皓
edea336f76 Merge branch 'develop' into release/1.0.9-beta 2022-05-31 09:56:16 +08:00
LeoYuan 袁力皓
c7035c0b71 chore(release): publish 1.0.9-beta.6 2022-05-27 11:06:33 +08:00
LeoYuan 袁力皓
37a3f54051 feat: return unbind function for onChangeDetecting & onChangeSelection 2022-05-27 10:53:50 +08:00
LeoYuan 袁力皓
95755c0385 fix: use the original object if it is not a shell object 2022-05-27 10:47:40 +08:00
LeoYuan 袁力皓
3262e47b5f refactor: using a more semver-like prerelease version format 2022-05-27 10:25:30 +08:00
LeoYuan 袁力皓
57cdb8b6c3 chore(release): publish 1.0.9-beta.5 2022-05-26 14:59:57 +08:00
LeoYuan 袁力皓
d04e96e6dd feat: add id setter for DocumentModel 2022-05-26 14:54:41 +08:00
LeoYuan 袁力皓
016f2e600b chore(release): publish 1.0.9-beta.4 2022-05-25 20:02:47 +08:00
LeoYuan 袁力皓
cb3c46f7fb feat: add availableActions for ComponentMeta 2022-05-25 19:58:36 +08:00
LeoYuan 袁力皓
288871d5da chore(release): publish 1.0.9-beta.3 2022-05-23 14:25:59 +08:00
LeoYuan 袁力皓
5615b36d22 feat: add componentMeta getter for setingPropEntry 2022-05-23 14:12:47 +08:00
LeoYuan 袁力皓
7a3850bece chore(release): publish 1.0.9-beta.2 2022-05-20 14:23:03 +08:00
LeoYuan 袁力皓
7a14fff218 feat: add slotNode for shell prop 2022-05-20 14:19:13 +08:00
LeoYuan 袁力皓
8af35a3dc4 chore(release): publish 1.0.9-beta.1 2022-05-19 14:39:03 +08:00
LeoYuan 袁力皓
cb8faabe99 Merge remote-tracking branch 'origin/develop' into release/1.0.9-beta 2022-05-19 14:33:48 +08:00
LeoYuan 袁力皓
0152df9f23 chore(release): publish 1.0.9-beta.0 2022-05-19 14:28:18 +08:00
22 changed files with 91 additions and 66 deletions

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-designer", "name": "@alilc/lowcode-designer",
"version": "1.0.8", "version": "1.0.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",
@ -15,10 +15,10 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-shell": "1.0.8", "@alilc/lowcode-shell": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",

View File

@ -40,7 +40,9 @@ export class LowCodePluginManager implements ILowCodePluginManager {
isEngineVersionMatched(versionExp: string): boolean { isEngineVersionMatched(versionExp: string): boolean {
const engineVersion = engineConfig.get('ENGINE_VERSION'); const engineVersion = engineConfig.get('ENGINE_VERSION');
return semverSatisfies(engineVersion, versionExp); // ref: https://github.com/npm/node-semver#functions
// 1.0.1-beta should match '^1.0.0'
return semverSatisfies(engineVersion, versionExp, { includePrerelease: true });
} }
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-core", "name": "@alilc/lowcode-editor-core",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-skeleton", "name": "@alilc/lowcode-editor-skeleton",
"version": "1.0.8", "version": "1.0.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",
@ -18,10 +18,10 @@
], ],
"dependencies": { "dependencies": {
"@alifd/next": "^1.20.12", "@alifd/next": "^1.20.12",
"@alilc/lowcode-designer": "1.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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"

View File

@ -17,7 +17,7 @@ function getVersion() {
const [_, version, beta] = match; const [_, version, beta] = match;
return beta && beta.endsWith('beta') ? `${version}(beta)` : version; return beta && beta.endsWith('beta') ? `${version}-beta` : version;
} }
const releaseVersion = getVersion(); const releaseVersion = getVersion();

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine", "name": "@alilc/lowcode-engine",
"version": "1.0.8", "version": "1.0.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,14 +19,14 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.12", "@alifd/next": "^1.19.12",
"@alilc/lowcode-designer": "1.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-editor-skeleton": "1.0.8", "@alilc/lowcode-editor-skeleton": "1.0.9-beta.7",
"@alilc/lowcode-engine-ext": "^1.0.0", "@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-designer": "1.0.8", "@alilc/lowcode-plugin-designer": "1.0.9-beta.7",
"@alilc/lowcode-plugin-outline-pane": "1.0.8", "@alilc/lowcode-plugin-outline-pane": "1.0.9-beta.7",
"@alilc/lowcode-shell": "1.0.8", "@alilc/lowcode-shell": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.9-beta.7",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-ignitor", "name": "@alilc/lowcode-ignitor",
"version": "1.0.8", "version": "1.0.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.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.9-beta.7",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-outline-pane", "name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.0.8", "version": "1.0.9-beta.7",
"description": "Outline pane for Ali lowCode engine", "description": "Outline pane for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -13,10 +13,10 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-designer": "1.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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"

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-renderer", "name": "@alilc/lowcode-rax-renderer",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-renderer-core": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.9-beta.7",
"rax-find-dom-node": "^1.0.1" "rax-find-dom-node": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-simulator-renderer", "name": "@alilc/lowcode-rax-simulator-renderer",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-rax-renderer": "1.0.8", "@alilc/lowcode-rax-renderer": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-renderer", "name": "@alilc/lowcode-react-renderer",
"version": "1.0.8", "version": "1.0.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.0.8" "@alilc/lowcode-renderer-core": "1.0.9-beta.7"
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-simulator-renderer", "name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.0.8", "version": "1.0.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",
@ -16,10 +16,10 @@
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json" "build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json"
}, },
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-react-renderer": "1.0.8", "@alilc/lowcode-react-renderer": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-renderer-core", "name": "@alilc/lowcode-renderer-core",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",
@ -34,7 +34,7 @@
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",
"@alilc/lowcode-designer": "1.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-test-mate": "^1.0.1", "@alilc/lowcode-test-mate": "^1.0.1",
"@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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-shell", "name": "@alilc/lowcode-shell",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-designer": "1.0.9-beta.7",
"@alilc/lowcode-editor-core": "1.0.8", "@alilc/lowcode-editor-core": "1.0.9-beta.7",
"@alilc/lowcode-editor-skeleton": "1.0.8", "@alilc/lowcode-editor-skeleton": "1.0.9-beta.7",
"@alilc/lowcode-types": "1.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"@alilc/lowcode-utils": "1.0.8", "@alilc/lowcode-utils": "1.0.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",

View File

@ -84,6 +84,10 @@ export default class ComponentMeta {
return this[componentMetaSymbol].prototype; return this[componentMetaSymbol].prototype;
} }
get availableActions() {
return this[componentMetaSymbol].availableActions;
}
/** /**
* npm * npm
* @param npm * @param npm

View File

@ -68,6 +68,10 @@ export default class DocumentModel {
return this[documentSymbol].id; return this[documentSymbol].id;
} }
set id(id) {
this[documentSymbol].id = id;
}
/** /**
* project * project
* @returns * @returns
@ -157,8 +161,8 @@ export default class DocumentModel {
copy?: boolean | undefined, copy?: boolean | undefined,
) { ) {
const node = this[documentSymbol].insertNode( const node = this[documentSymbol].insertNode(
parent[nodeSymbol] as any, parent[nodeSymbol] ? parent[nodeSymbol] : parent,
thing?.[nodeSymbol], thing?.[nodeSymbol] ? thing[nodeSymbol] : thing,
at, at,
copy, copy,
); );
@ -204,7 +208,7 @@ export default class DocumentModel {
* document hover * document hover
*/ */
onChangeDetecting(fn: (node: Node) => void) { onChangeDetecting(fn: (node: Node) => void) {
this[documentSymbol].designer.detecting.onDetectingChange((node: InnerNode) => { return this[documentSymbol].designer.detecting.onDetectingChange((node: InnerNode) => {
fn(Node.create(node)!); fn(Node.create(node)!);
}); });
} }
@ -213,7 +217,7 @@ export default class DocumentModel {
* document * document
*/ */
onChangeSelection(fn: (ids: string[]) => void) { onChangeSelection(fn: (ids: string[]) => void) {
this[documentSymbol].selection.onSelectionChange((ids: string[]) => { return this[documentSymbol].selection.onSelectionChange((ids: string[]) => {
fn(ids); fn(ids);
}); });
} }

View File

@ -43,6 +43,13 @@ export default class Prop {
return Node.create(this[propSymbol].getNode()); return Node.create(this[propSymbol].getNode());
} }
/**
* return the slot node (only if the current prop represents a slot)
*/
get slotNode(): Node | null {
return Node.create(this[propSymbol].slotNode);
}
/** /**
* judge if it is a prop or not * judge if it is a prop or not
*/ */

View File

@ -3,6 +3,7 @@ import { CompositeValue, FieldConfig } from '@alilc/lowcode-types';
import { settingPropEntrySymbol } from './symbols'; import { settingPropEntrySymbol } from './symbols';
import Node from './node'; import Node from './node';
import SettingTopEntry from './setting-top-entry'; import SettingTopEntry from './setting-top-entry';
import ComponentMeta from './component-meta';
export default class SettingPropEntry { export default class SettingPropEntry {
private readonly [settingPropEntrySymbol]: SettingField; private readonly [settingPropEntrySymbol]: SettingField;
@ -89,6 +90,13 @@ export default class SettingPropEntry {
return this[settingPropEntrySymbol].isSettingField; return this[settingPropEntrySymbol].isSettingField;
} }
/**
* componentMeta
*/
get componentMeta(): ComponentMeta | null {
return ComponentMeta.create(this[settingPropEntrySymbol].componentMeta);
}
/** /**
* key * key
* @param key * @param key

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-utils", "name": "@alilc/lowcode-utils",
"version": "1.0.8", "version": "1.0.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.0.8", "@alilc/lowcode-types": "1.0.9-beta.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"react": "^16", "react": "^16",
"zen-logger": "^1.1.0" "zen-logger": "^1.1.0"