Merge branch 'release/0.9.0' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into release/0.9.0

This commit is contained in:
荣彬 2020-07-22 08:33:41 +08:00
commit 10a28ae25a
65 changed files with 720 additions and 214 deletions

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.40"></a>
## [0.8.40](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-demo@0.8.39...@ali/lowcode-demo@0.8.40) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-demo
<a name="0.8.39"></a>
## [0.8.39](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-demo@0.8.38...@ali/lowcode-demo@0.8.39) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-demo
<a name="0.8.38"></a> <a name="0.8.38"></a>
## [0.8.38](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-demo@0.8.37...@ali/lowcode-demo@0.8.38) (2020-07-21) ## [0.8.38](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-demo@0.8.37...@ali/lowcode-demo@0.8.38) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-demo", "name": "@ali/lowcode-demo",
"version": "0.8.38", "version": "0.8.40",
"private": true, "private": true,
"description": "低代码引擎 DEMO", "description": "低代码引擎 DEMO",
"scripts": { "scripts": {
@ -9,21 +9,21 @@
}, },
"config": {}, "config": {},
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-editor-skeleton": "^0.8.34", "@ali/lowcode-editor-skeleton": "^0.8.36",
"@ali/lowcode-plugin-components-pane": "^0.8.30", "@ali/lowcode-plugin-components-pane": "^0.8.32",
"@ali/lowcode-plugin-designer": "^0.9.28", "@ali/lowcode-plugin-designer": "^0.9.30",
"@ali/lowcode-plugin-event-bind-dialog": "^0.8.21", "@ali/lowcode-plugin-event-bind-dialog": "^0.8.22",
"@ali/lowcode-plugin-outline-pane": "^0.8.34", "@ali/lowcode-plugin-outline-pane": "^0.8.36",
"@ali/lowcode-plugin-sample-logo": "^0.8.20", "@ali/lowcode-plugin-sample-logo": "^0.8.21",
"@ali/lowcode-plugin-sample-preview": "^0.8.32", "@ali/lowcode-plugin-sample-preview": "^0.8.34",
"@ali/lowcode-plugin-settings-pane": "^0.8.8", "@ali/lowcode-plugin-settings-pane": "^0.8.8",
"@ali/lowcode-plugin-undo-redo": "^0.8.32", "@ali/lowcode-plugin-undo-redo": "^0.8.34",
"@ali/lowcode-plugin-variable-bind-dialog": "^0.8.19", "@ali/lowcode-plugin-variable-bind-dialog": "^0.8.20",
"@ali/lowcode-plugin-zh-en": "^0.8.23", "@ali/lowcode-plugin-zh-en": "^0.8.24",
"@ali/lowcode-react-renderer": "^0.8.14", "@ali/lowcode-react-renderer": "^0.8.15",
"@ali/lowcode-runtime": "^0.8.16", "@ali/lowcode-runtime": "^0.8.16",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@ali/ve-action-pane": "^4.7.0-beta.0", "@ali/ve-action-pane": "^4.7.0-beta.0",
"@ali/ve-datapool-pane": "^6.4.3", "@ali/ve-datapool-pane": "^6.4.3",
"@ali/ve-history-pane": "4.0.0", "@ali/ve-history-pane": "4.0.0",

View File

@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.9.30"></a>
## [0.9.30](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-designer@0.9.29...@ali/lowcode-designer@0.9.30) (2020-07-21)
### Bug Fixes
* settingField items is empty when type is not 'group' ([582c41a](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/582c41a))
* updateProps before init ([760e6a6](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/760e6a6))
* 低代码组件修改之后渲染为空 ([ef71632](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/ef71632))
* 修复导入的组件拖入画布报错 ([caf9915](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/caf9915))
* 调整 upgrade 和 init 的流程 ([09fc1a0](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/09fc1a0))
### Features
* support subtreeModified ([7eeb51c](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/7eeb51c))
<a name="0.9.29"></a>
## [0.9.29](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-designer@0.9.28...@ali/lowcode-designer@0.9.29) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-designer
<a name="0.9.28"></a> <a name="0.9.28"></a>
## [0.9.28](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-designer@0.9.27...@ali/lowcode-designer@0.9.28) (2020-07-21) ## [0.9.28](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-designer@0.9.27...@ali/lowcode-designer@0.9.28) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-designer", "name": "@ali/lowcode-designer",
"version": "0.9.28", "version": "0.9.30",
"description": "Designer for Ali LowCode Engine", "description": "Designer for Ali LowCode Engine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -15,9 +15,9 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"event": "^1.0.0", "event": "^1.0.0",
"react": "^16", "react": "^16",

View File

@ -878,7 +878,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
event: e, event: e,
}; };
if (e.dragObject.type === 'node' && e.dragObject.nodes[0].getPrototype().isModal()) { if (e.dragObject.type === 'node' && e.dragObject.nodes[0]?.getPrototype()?.isModal()) {
return this.designer.createLocation({ return this.designer.createLocation({
target: this.document.rootNode, target: this.document.rootNode,
detail: { detail: {

View File

@ -386,6 +386,8 @@ export class Designer {
let meta = this._componentMetasMap.get(key); let meta = this._componentMetasMap.get(key);
if (meta) { if (meta) {
meta.setMetadata(data); meta.setMetadata(data);
this._componentMetasMap.set(key, meta);
} else { } else {
meta = this._lostComponentMetasMap.get(key); meta = this._lostComponentMetasMap.get(key);
@ -426,10 +428,11 @@ export class Designer {
@computed get componentsMap(): { [key: string]: NpmInfo | Component } { @computed get componentsMap(): { [key: string]: NpmInfo | Component } {
const maps: any = {}; const maps: any = {};
this._componentMetasMap.forEach((config, key) => { const designer = this;
designer._componentMetasMap.forEach((config, key) => {
const metaData = config.getMetadata(); const metaData = config.getMetadata();
if (metaData.devMode === 'lowcode') { if (metaData.devMode === 'lowcode') {
maps[key] = this.currentDocument?.simulator?.createComponent(metaData.schema!); maps[key] = metaData.schema;
} else { } else {
const view = metaData.experimental?.view; const view = metaData.experimental?.view;
if (view) { if (view) {

View File

@ -5,6 +5,18 @@ import { SettingEntry } from './setting-entry';
import { computed, obx } from '@ali/lowcode-editor-core'; import { computed, obx } from '@ali/lowcode-editor-core';
import { cloneDeep } from '@ali/lowcode-utils'; import { cloneDeep } from '@ali/lowcode-utils';
function getSettingFieldCollectorKey(parent: SettingEntry, config: FieldConfig) {
let top = parent;
const path = [config.name];
while (top !== parent.top) {
if (top instanceof SettingField && top.type !== 'group') {
path.unshift(top.name);
}
top = top.parent;
}
return path.join('.');
}
export class SettingField extends SettingPropEntry implements SettingEntry { export class SettingField extends SettingPropEntry implements SettingEntry {
readonly isSettingField = true; readonly isSettingField = true;
readonly isRequired: boolean; readonly isRequired: boolean;
@ -51,10 +63,11 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
this._expanded = extraProps?.defaultCollapsed ? false : true; this._expanded = extraProps?.defaultCollapsed ? false : true;
// initial items // initial items
if (this.type === 'group' && items) { if (items && items.length > 0) {
this.initItems(items, settingFieldCollector); this.initItems(items, settingFieldCollector);
} else if (settingFieldCollector && config.name) { }
settingFieldCollector(config.name, this); if (this.type !== 'group' && settingFieldCollector && config.name) {
settingFieldCollector(getSettingFieldCollectorKey(parent, config), this);
} }
// compatiable old config // compatiable old config

View File

@ -79,6 +79,10 @@ export class NodeChildren {
return this.size > 0; return this.size > 0;
} }
@computed length() {
return this.children.length;
}
/** /**
* *
*/ */
@ -94,6 +98,7 @@ export class NodeChildren {
deleted.purge(); deleted.purge();
} }
this.emitter.emit('change'); this.emitter.emit('change');
this.reportModified(node, this.owner, {type: 'remove', removeIndex: i, removeNode: node});
return false; return false;
} }
@ -290,4 +295,17 @@ export class NodeChildren {
// 保证向前兼容性 // 保证向前兼容性
return "Array"; return "Array";
} }
private reportModified(node: Node, owner: Node, options = {}) {
if (!node) { return; }
if (node.isRoot()) { return; }
const callbacks = owner.componentMeta.getMetadata().experimental?.callbacks;
if (callbacks?.onSubtreeModified) {
callbacks?.onSubtreeModified.call(node, owner, options);
}
if (owner.parent && !owner.parent.isRoot()) {
this.reportModified(node, owner.parent, options);
}
}
} }

View File

@ -634,6 +634,14 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
this._slots.push(slotNode); this._slots.push(slotNode);
} }
/**
*
* @param node
*/
removeChild(node: Node) {
this.children?.delete(node);
}
private purged = false; private purged = false;
/** /**
* *

View File

@ -102,7 +102,7 @@ export class Project {
| string, | string,
): any {} ): any {}
open(doc?: string | DocumentModel | RootSchema): void { open(doc?: string | DocumentModel | RootSchema): DocumentModel {
if (!doc) { if (!doc) {
const got = this.documents.find((item) => item.isBlank()); const got = this.documents.find((item) => item.isBlank());
if (got) { if (got) {

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.23"></a>
## [0.8.23](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-core@0.8.22...@ali/lowcode-editor-core@0.8.23) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-core
<a name="0.8.22"></a> <a name="0.8.22"></a>
## [0.8.22](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-core@0.8.21...@ali/lowcode-editor-core@0.8.22) (2020-07-21) ## [0.8.22](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-core@0.8.21...@ali/lowcode-editor-core@0.8.22) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-editor-core", "name": "@ali/lowcode-editor-core",
"version": "0.8.22", "version": "0.8.23",
"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",
@ -15,8 +15,8 @@
"cloud-build": "build-scripts build --skip-demo" "cloud-build": "build-scripts build --skip-demo"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@recore/obx": "^1.0.9", "@recore/obx": "^1.0.9",
"@recore/obx-react": "^1.0.8", "@recore/obx-react": "^1.0.8",

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.9.15"></a>
## [0.9.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-general@0.9.14...@ali/lowcode-editor-preset-general@0.9.15) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
<a name="0.9.14"></a>
## [0.9.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-general@0.9.13...@ali/lowcode-editor-preset-general@0.9.14) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
<a name="0.9.13"></a> <a name="0.9.13"></a>
## [0.9.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-general@0.9.12...@ali/lowcode-editor-preset-general@0.9.13) (2020-07-21) ## [0.9.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-general@0.9.12...@ali/lowcode-editor-preset-general@0.9.13) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-editor-preset-general", "name": "@ali/lowcode-editor-preset-general",
"version": "0.9.13", "version": "0.9.15",
"private": true, "private": true,
"description": "Ali General Editor Preset", "description": "Ali General Editor Preset",
"main": "lib/index.js", "main": "lib/index.js",
@ -15,12 +15,12 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-editor-skeleton": "^0.8.34", "@ali/lowcode-editor-skeleton": "^0.8.36",
"@ali/lowcode-plugin-designer": "^0.9.28", "@ali/lowcode-plugin-designer": "^0.9.30",
"@ali/lowcode-plugin-outline-pane": "^0.8.34", "@ali/lowcode-plugin-outline-pane": "^0.8.36",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@alifd/next": "^1.19.12", "@alifd/next": "^1.19.12",
"@alife/theme-lowcode-dark": "^0.1.0", "@alife/theme-lowcode-dark": "^0.1.0",
"@alife/theme-lowcode-light": "^0.1.0", "@alife/theme-lowcode-light": "^0.1.0",
@ -28,7 +28,7 @@
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },
"devDependencies": { "devDependencies": {
"@ali/lowcode-editor-setters": "^0.9.8", "@ali/lowcode-editor-setters": "^0.9.9",
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",
"@types/events": "^3.0.0", "@types/events": "^3.0.0",
"@types/react": "^16.8.3", "@types/react": "^16.8.3",

View File

@ -3,6 +3,35 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.31"></a>
## [0.8.31](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-vision@0.8.30...@ali/lowcode-editor-preset-vision@0.8.31) (2020-07-21)
### Bug Fixes
* settingField items is empty when type is not 'group' ([582c41a](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/582c41a))
* 修复 initial 重复、type = 'composite' 时 items 为空 ([bf79e63](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/bf79e63))
* 修复组件面板详情加载不了的 bug ([cca3309](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/cca3309))
* 兼容 variable 历史数据格式 ([d666317](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/d666317))
* 兼容事件绑定 ([f4c07af](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/f4c07af))
* 调整 upgrade 和 init 的流程 ([09fc1a0](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/09fc1a0))
### Features
* support subtreeModified ([7eeb51c](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/7eeb51c))
<a name="0.8.30"></a>
## [0.8.30](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-vision@0.8.29...@ali/lowcode-editor-preset-vision@0.8.30) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-preset-vision
<a name="0.8.29"></a> <a name="0.8.29"></a>
## [0.8.29](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-vision@0.8.28...@ali/lowcode-editor-preset-vision@0.8.29) (2020-07-21) ## [0.8.29](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-preset-vision@0.8.28...@ali/lowcode-editor-preset-vision@0.8.29) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-editor-preset-vision", "name": "@ali/lowcode-editor-preset-vision",
"version": "0.8.29", "version": "0.8.31",
"private": true, "private": true,
"description": "Vision Polyfill for Ali lowCode engine", "description": "Vision Polyfill for Ali lowCode engine",
"main": "lib/index.js", "main": "lib/index.js",
@ -15,11 +15,11 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-editor-skeleton": "^0.8.34", "@ali/lowcode-editor-skeleton": "^0.8.36",
"@ali/lowcode-plugin-designer": "^0.9.28", "@ali/lowcode-plugin-designer": "^0.9.30",
"@ali/lowcode-plugin-outline-pane": "^0.8.34", "@ali/lowcode-plugin-outline-pane": "^0.8.36",
"@ali/ve-i18n-util": "^2.0.0", "@ali/ve-i18n-util": "^2.0.0",
"@ali/ve-icons": "^4.1.9", "@ali/ve-icons": "^4.1.9",
"@ali/ve-less-variables": "2.0.3", "@ali/ve-less-variables": "2.0.3",

View File

@ -220,6 +220,9 @@ class Prototype {
readonly isPrototype = true; readonly isPrototype = true;
readonly meta: ComponentMeta; readonly meta: ComponentMeta;
readonly options: OldPrototypeConfig | ComponentMetadata; readonly options: OldPrototypeConfig | ComponentMetadata;
get packageName() {
return this.meta.npm?.package;
}
constructor(input: OldPrototypeConfig | ComponentMetadata | ComponentMeta, lookup: boolean = false) { constructor(input: OldPrototypeConfig | ComponentMetadata | ComponentMeta, lookup: boolean = false) {
if (lookup) { if (lookup) {
@ -251,7 +254,7 @@ class Prototype {
} }
getPackageName() { getPackageName() {
return this.meta.npm?.package; return this.packageName;
} }
getContextInfo(name: string): any { getContextInfo(name: string): any {

View File

@ -332,6 +332,7 @@ export function upgradePropConfig(config: OldPropConfig, collector: ConfigCollec
const setterInitial = getInitialFromSetter(setter); const setterInitial = getInitialFromSetter(setter);
if (type !== 'composite') {
collector.addInitial({ collector.addInitial({
// FIXME! name could be "xxx.xxx" // FIXME! name could be "xxx.xxx"
name: slotName || name, name: slotName || name,
@ -352,6 +353,7 @@ export function upgradePropConfig(config: OldPropConfig, collector: ConfigCollec
return v; return v;
}, },
}); });
}
if (ignore != null || disabled != null) { if (ignore != null || disabled != null) {
collector.addFilter({ collector.addFilter({
@ -431,9 +433,11 @@ export function upgradePropConfig(config: OldPropConfig, collector: ConfigCollec
autorun: item.autorun, autorun: item.autorun,
}); });
}, },
} },
) )
: []; : [];
newConfig.items = objItems;
const initial = (target: SettingTarget, value?: any) => { const initial = (target: SettingTarget, value?: any) => {
// TODO: // TODO:
const defaults = extraProps.defaultValue; const defaults = extraProps.defaultValue;
@ -749,10 +753,7 @@ export function upgradeMetadata(oldConfig: OldPrototypeConfig) {
callbacks.onNodeRemove = didDropOut; callbacks.onNodeRemove = didDropOut;
} }
if (subtreeModified) { if (subtreeModified) {
callbacks.onSubtreeModified = (...args: any[]) => { callbacks.onSubtreeModified = subtreeModified;
// FIXME! args not correct
subtreeModified.apply(args[0], args as any);
};
} }
if (onResize) { if (onResize) {
callbacks.onResize = (e: any, currentNode: any) => { callbacks.onResize = (e: any, currentNode: any) => {

View File

@ -85,17 +85,35 @@ designer.addPropsReducer((props, node) => {
const newProps: any = { const newProps: any = {
...props, ...props,
}; };
const getRealValue = (propValue: any) => {
if (isVariable(propValue)) {
return propValue.value;
}
if (isJSExpression(propValue)) {
return propValue.mock;
}
return propValue;
};
initials.forEach((item) => { initials.forEach((item) => {
// FIXME! this implements SettingTarget // FIXME! this implements SettingTarget
try { try {
// FIXME! item.name could be 'xxx.xxx' // FIXME! item.name could be 'xxx.xxx'
const ov = props[item.name]; const ov = props[item.name];
const v = item.initial(node as any, isJSExpression(ov) ? ov.mock : ov); const v = item.initial(node as any, getRealValue(ov));
if (v !== undefined) { if (v !== undefined) {
newProps[item.name] = isJSExpression(ov) ? { if (isVariable(ov)) {
newProps[item.name] = {
...ov,
value: v,
};
} else if (isJSExpression(ov)) {
newProps[item.name] = {
...ov, ...ov,
mock: v, mock: v,
} : v; };
} else {
newProps[item.name] = v;
}
} }
} catch (e) { } catch (e) {
if (hasOwnProperty(props, item.name)) { if (hasOwnProperty(props, item.name)) {
@ -153,6 +171,14 @@ function compatiableReducer(props: any) {
}, },
} }
} }
// 为了能降级到老版本,建议在后期版本去掉以下代码
if (isJSExpression(val) && !val.events) {
val = {
type: 'variable',
value: val.mock,
variable: val.value,
}
}
newProps[key] = val; newProps[key] = val;
}); });
return newProps; return newProps;

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.9.9"></a>
## [0.9.9](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-setters@0.9.8...@ali/lowcode-editor-setters@0.9.9) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-setters
<a name="0.9.8"></a> <a name="0.9.8"></a>
## [0.9.8](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-setters@0.9.7...@ali/lowcode-editor-setters@0.9.8) (2020-07-21) ## [0.9.8](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-setters@0.9.7...@ali/lowcode-editor-setters@0.9.8) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-editor-setters", "name": "@ali/lowcode-editor-setters",
"version": "0.9.8", "version": "0.9.9",
"description": "Builtin setters for Ali lowCode engine", "description": "Builtin setters for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -22,7 +22,7 @@
"@ali/iceluna-comp-react-node": "^1.0.5", "@ali/iceluna-comp-react-node": "^1.0.5",
"@ali/iceluna-sdk": "^1.0.5-beta.24", "@ali/iceluna-sdk": "^1.0.5-beta.24",
"@ali/lc-style-setter": "^0.0.1", "@ali/lc-style-setter": "^0.0.1",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"acorn": "^6.4.1", "acorn": "^6.4.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",

View File

@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.36"></a>
## [0.8.36](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-skeleton@0.8.35...@ali/lowcode-editor-skeleton@0.8.36) (2020-07-21)
### Features
* support float pane fixed ([40d8260](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/40d8260))
<a name="0.8.35"></a>
## [0.8.35](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-skeleton@0.8.34...@ali/lowcode-editor-skeleton@0.8.35) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-editor-skeleton
<a name="0.8.34"></a> <a name="0.8.34"></a>
## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-skeleton@0.8.33...@ali/lowcode-editor-skeleton@0.8.34) (2020-07-21) ## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-editor-skeleton@0.8.33...@ali/lowcode-editor-skeleton@0.8.34) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-editor-skeleton", "name": "@ali/lowcode-editor-skeleton",
"version": "0.8.34", "version": "0.8.36",
"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 @@
"editor" "editor"
], ],
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@alifd/next": "^1.20.12", "@alifd/next": "^1.20.12",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16.8.1", "react": "^16.8.1",

View File

@ -34,6 +34,10 @@ export default class Area<C extends IWidgetBaseConfig = any, T extends IWidget =
return this.container.add(config); return this.container.add(config);
} }
remove(config: T | string): number {
return this.container.remove(config);
}
private lastCurrent: T | null = null; private lastCurrent: T | null = null;
setVisible(flag: boolean) { setVisible(flag: boolean) {
if (this.exclusive) { if (this.exclusive) {

View File

@ -0,0 +1,11 @@
import { SVGIcon, IconProps } from "@ali/lowcode-utils";
export function IconFix(props: IconProps) {
return (
<SVGIcon viewBox="0 0 1024 1024" {...props}>
<path d="M750.848 28.928l245.248 242.944a66.048 66.048 0 1 1-93.184 93.184l-25.6-19.456-249.6 353.792 78.336 78.336a66.048 66.048 0 0 1-93.184 92.672l-460.8-464.64a66.048 66.048 0 0 1 93.184-93.184l76.8 78.336 354.048-249.856-18.176-18.944a66.048 66.048 0 1 1 93.184-93.184zM380.672 732.416l-91.904-90.88c-74.24 89.6-191.488 219.904-212.736 247.04a419.84 419.84 0 0 0-70.656 128 419.84 419.84 0 0 0 128-70.144c27.136-21.248 157.44-138.496 246.528-214.016z"></path>
</SVGIcon>
);
}
IconFix.displayName = 'Fix';

View File

@ -0,0 +1,12 @@
import { SVGIcon, IconProps } from "@ali/lowcode-utils";
export function IconFloat(props: IconProps) {
return (
<SVGIcon viewBox="0 0 1024 1024" {...props}>
<path d="M160.256 816.64C116.224 872.448 102.4 921.6 102.4 921.6s49.152-13.824 104.96-57.856c22.016-17.408 128-112.64 200.704-174.08l-73.728-73.728c-61.44 72.704-157.184 178.688-174.08 200.704zM648.704 209.408L442.368 355.328l226.304 226.304 145.92-206.336 15.872 15.872c20.992 20.992 54.784 20.992 75.776 0s20.992-54.784 0-75.776l-197.12-197.12c-20.992-20.992-54.784-20.992-75.776 0-20.992 20.992-20.992 54.784 0 75.776l15.36 15.36zM247.808 334.848c-9.728 2.048-18.944 6.656-26.624 14.336-20.992 20.992-20.992 54.784 0 75.776l377.856 377.856c20.992 20.992 54.784 20.992 75.776 0 7.68-7.68 12.288-16.896 14.336-26.624L247.808 334.848z"></path>
<path d="M840.704 879.104c-9.728 0-19.456-3.584-27.136-11.264L155.648 210.432c-14.848-14.848-14.848-39.424 0-54.272 14.848-14.848 39.424-14.848 54.272 0L867.84 814.08c14.848 14.848 14.848 39.424 0 54.272-7.168 7.168-16.896 10.752-27.136 10.752z"></path>
</SVGIcon>
);
}
IconFloat.displayName = 'Float';

View File

@ -6,16 +6,31 @@ import Area from '../area';
import { PanelConfig } from '../types'; import { PanelConfig } from '../types';
import Panel from '../widget/panel'; import Panel from '../widget/panel';
import { Designer } from '@ali/lowcode-designer'; import { Designer } from '@ali/lowcode-designer';
import { IconFloat } from '../icons/float';
@observer @observer
export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, Panel> }> { export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, Panel> }> {
shouldComponentUpdate() { shouldComponentUpdate() {
return false; return false;
} }
componentDidUpdate() { componentDidUpdate() {
// FIXME: dirty fix, need deep think // FIXME: dirty fix, need deep think
this.props.area.skeleton.editor.get(Designer)?.touchOffsetObserver(); this.props.area.skeleton.editor.get(Designer)?.touchOffsetObserver();
} }
// 取消固定
setFloat() {
const { area } = this.props;
const { current } = area;
if (!current) {
return;
}
area.skeleton.leftFixedArea.remove(current);
area.skeleton.leftFloatArea.add(current);
area.skeleton.leftFloatArea.container.active(current);
}
render() { render() {
const { area } = this.props; const { area } = this.props;
const hideTitleBar = area.current?.config.props?.hideTitleBar; const hideTitleBar = area.current?.config.props?.hideTitleBar;
@ -34,15 +49,24 @@ export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, P
style={style} style={style}
> >
{!hideTitleBar && ( {!hideTitleBar && (
<Fragment>
<Button <Button
text text
className="lc-pane-close" className="lc-pane-icon-float"
onClick={this.setFloat.bind(this)}
>
<IconFloat />
</Button>
<Button
text
className="lc-pane-icon-close"
onClick={() => { onClick={() => {
area.setVisible(false); area.setVisible(false);
}} }}
> >
<Icon type="close" /> <Icon type="close" />
</Button> </Button>
</Fragment>
)} )}
<Contents area={area} /> <Contents area={area} />
</div> </div>

View File

@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { observer, Focusable, focusTracker } from '@ali/lowcode-editor-core'; import { observer, Focusable, focusTracker } from '@ali/lowcode-editor-core';
import { Button, Icon } from '@alifd/next'; import { Button, Icon } from '@alifd/next';
import { IconFix } from '../icons/fix';
import Area from '../area'; import Area from '../area';
import Panel from '../widget/panel'; import Panel from '../widget/panel';
@ -76,6 +77,18 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
this.dispose?.(); this.dispose?.();
} }
// 固定
setFixed() {
const { area } = this.props;
const { current } = area;
if (!current) {
return;
}
area.skeleton.leftFloatArea.remove(current);
area.skeleton.leftFixedArea.add(current);
area.skeleton.leftFixedArea.container.active(current);
}
render() { render() {
const { area } = this.props; const { area } = this.props;
const width = area.current?.config.props?.width; const width = area.current?.config.props?.width;
@ -93,15 +106,24 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
> >
{ {
!hideTitleBar && ( !hideTitleBar && (
<Fragment>
<Button <Button
text text
className="lc-pane-close" className="lc-pane-icon-fix"
onClick={this.setFixed.bind(this)}
>
<IconFix />
</Button>
<Button
text
className="lc-pane-icon-close"
onClick={() => { onClick={() => {
area.setVisible(false); area.setVisible(false);
}} }}
> >
<Icon type="close" /> <Icon type="close" />
</Button> </Button>
</Fragment>
) )
} }
<Contents area={area} /> <Contents area={area} />

View File

@ -175,31 +175,7 @@ body {
display: flex; display: flex;
min-height: 0; min-height: 0;
position: relative; position: relative;
.lc-left-float-pane {
position: absolute;
top: 0;
bottom: 0;
width: var(--dock-pane-width);
min-width: var(--dock-fixed-pane-width);
left: calc(var(--left-area-width) + 1px);
background-color: var(--color-pane-background);
box-shadow: 4px 6px 6px 0 rgba(31,50,88,0.08);
z-index: 820;
display: none;
// padding-top: 36px;
&.lc-area-visible {
display: block;
}
.lc-pane-close{
position: absolute;
right: 16px;
top: 16px;
height: auto;
z-index: 2;
.next-icon{
line-height: 1;
}
}
.lc-tabs-title { .lc-tabs-title {
width: 100%; width: 100%;
height: 32px; height: 32px;
@ -225,6 +201,7 @@ body {
} }
} }
} }
.lc-tabs-content { .lc-tabs-content {
position: absolute; position: absolute;
top: 32px; top: 32px;
@ -232,6 +209,46 @@ body {
left: 0; left: 0;
right: 0; right: 0;
} }
.lc-pane-icon-close {
position: absolute;
right: 16px;
top: 14px;
height: auto;
z-index: 2;
.next-icon{
line-height: 1;
color: rgba(0,0,0,0.6);
}
}
.lc-pane-icon-fix, .lc-pane-icon-float{
position: absolute;
right: 38px;
top: 14px;
height: auto;
z-index: 2;
svg {
vertical-align: middle;
color: rgba(0,0,0,0.6);
}
}
.lc-left-float-pane {
position: absolute;
top: 0;
bottom: 0;
width: var(--dock-pane-width);
min-width: var(--dock-fixed-pane-width);
left: calc(var(--left-area-width) + 1px);
background-color: var(--color-pane-background);
box-shadow: 4px 6px 6px 0 rgba(31,50,88,0.08);
z-index: 820;
display: none;
// padding-top: 36px;
&.lc-area-visible {
display: block;
}
} }
.lc-left-area { .lc-left-area {
height: 100%; height: 100%;
@ -293,16 +310,6 @@ body {
&.lc-area-visible { &.lc-area-visible {
display: block; display: block;
} }
.lc-pane-close {
position: absolute;
right: 16px;
top: 16px;
height: auto;
z-index: 2;
.next-icon {
line-height: 1;
}
}
} }
.lc-left-area.lc-area-visible ~ .lc-left-fixed-pane { .lc-left-area.lc-area-visible ~ .lc-left-fixed-pane {
margin-left: 1px; margin-left: 1px;

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.32"></a>
## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-components-pane@0.8.31...@ali/lowcode-plugin-components-pane@0.8.32) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-components-pane
<a name="0.8.31"></a>
## [0.8.31](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-components-pane@0.8.30...@ali/lowcode-plugin-components-pane@0.8.31) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-components-pane
<a name="0.8.30"></a> <a name="0.8.30"></a>
## [0.8.30](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-components-pane@0.8.29...@ali/lowcode-plugin-components-pane@0.8.30) (2020-07-21) ## [0.8.30](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-components-pane@0.8.29...@ali/lowcode-plugin-components-pane@0.8.30) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-components-pane", "name": "@ali/lowcode-plugin-components-pane",
"version": "0.8.30", "version": "0.8.32",
"description": "alibaba lowcode editor component-list plugin", "description": "alibaba lowcode editor component-list plugin",
"files": [ "files": [
"es/", "es/",
@ -20,9 +20,9 @@
], ],
"author": "xiayang.xy", "author": "xiayang.xy",
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/ve-component-list": "^1.1.1", "@ali/ve-component-list": "^1.1.1",
"@alifd/next": "^1.19.19", "@alifd/next": "^1.19.19",
"react": "^16.8.1" "react": "^16.8.1"

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.9.30"></a>
## [0.9.30](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-designer@0.9.29...@ali/lowcode-plugin-designer@0.9.30) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-designer
<a name="0.9.29"></a>
## [0.9.29](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-designer@0.9.28...@ali/lowcode-plugin-designer@0.9.29) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-designer
<a name="0.9.28"></a> <a name="0.9.28"></a>
## [0.9.28](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-designer@0.9.27...@ali/lowcode-plugin-designer@0.9.28) (2020-07-21) ## [0.9.28](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-designer@0.9.27...@ali/lowcode-plugin-designer@0.9.28) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-designer", "name": "@ali/lowcode-plugin-designer",
"version": "0.9.28", "version": "0.9.30",
"description": "alibaba lowcode editor designer plugin", "description": "alibaba lowcode editor designer plugin",
"files": [ "files": [
"es", "es",
@ -20,8 +20,8 @@
], ],
"author": "xiayang.xy", "author": "xiayang.xy",
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.22"></a>
## [0.8.22](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-event-bind-dialog@0.8.21...@ali/lowcode-plugin-event-bind-dialog@0.8.22) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-event-bind-dialog
<a name="0.8.21"></a> <a name="0.8.21"></a>
## [0.8.21](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-event-bind-dialog@0.8.20...@ali/lowcode-plugin-event-bind-dialog@0.8.21) (2020-07-21) ## [0.8.21](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-event-bind-dialog@0.8.20...@ali/lowcode-plugin-event-bind-dialog@0.8.21) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-event-bind-dialog", "name": "@ali/lowcode-plugin-event-bind-dialog",
"version": "0.8.21", "version": "0.8.22",
"description": "alibaba lowcode editor event bind dialog plugin", "description": "alibaba lowcode editor event bind dialog plugin",
"files": [ "files": [
"es", "es",
@ -19,8 +19,8 @@
], ],
"author": "zude.hzd", "author": "zude.hzd",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"

View File

@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.36"></a>
## [0.8.36](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-outline-pane@0.8.35...@ali/lowcode-plugin-outline-pane@0.8.36) (2020-07-21)
### Bug Fixes
* 修复导入的组件拖入画布报错 ([caf9915](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/caf9915))
<a name="0.8.35"></a>
## [0.8.35](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-outline-pane@0.8.34...@ali/lowcode-plugin-outline-pane@0.8.35) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane
<a name="0.8.34"></a> <a name="0.8.34"></a>
## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-outline-pane@0.8.33...@ali/lowcode-plugin-outline-pane@0.8.34) (2020-07-21) ## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-outline-pane@0.8.33...@ali/lowcode-plugin-outline-pane@0.8.34) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-outline-pane", "name": "@ali/lowcode-plugin-outline-pane",
"version": "0.8.34", "version": "0.8.36",
"description": "Outline pane for Ali lowCode engine", "description": "Outline pane for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -14,10 +14,10 @@
"test:snapshot": "ava --update-snapshots" "test:snapshot": "ava --update-snapshots"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",

View File

@ -71,7 +71,7 @@ class TreeNodeChildren extends Component<{
/> />
); );
treeNode.children?.forEach((child, index) => { treeNode.children?.forEach((child, index) => {
const childIsModal = child.node.getPrototype().isModal(); const childIsModal = child.node.getPrototype()?.isModal() || false;
if (isModal != childIsModal) { if (isModal != childIsModal) {
return; return;
} }

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.21"></a>
## [0.8.21](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-logo@0.8.20...@ali/lowcode-plugin-sample-logo@0.8.21) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-sample-logo
<a name="0.8.20"></a> <a name="0.8.20"></a>
## [0.8.20](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-logo@0.8.19...@ali/lowcode-plugin-sample-logo@0.8.20) (2020-07-21) ## [0.8.20](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-logo@0.8.19...@ali/lowcode-plugin-sample-logo@0.8.20) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-sample-logo", "name": "@ali/lowcode-plugin-sample-logo",
"version": "0.8.20", "version": "0.8.21",
"description": "alibaba lowcode editor logo plugin", "description": "alibaba lowcode editor logo plugin",
"files": [ "files": [
"es/", "es/",
@ -20,7 +20,7 @@
], ],
"author": "xiayang.xy", "author": "xiayang.xy",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"react": "^16.8.1" "react": "^16.8.1"
}, },
"devDependencies": { "devDependencies": {

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.34"></a>
## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-preview@0.8.33...@ali/lowcode-plugin-sample-preview@0.8.34) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-sample-preview
<a name="0.8.33"></a>
## [0.8.33](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-preview@0.8.32...@ali/lowcode-plugin-sample-preview@0.8.33) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-sample-preview
<a name="0.8.32"></a> <a name="0.8.32"></a>
## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-preview@0.8.31...@ali/lowcode-plugin-sample-preview@0.8.32) (2020-07-21) ## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-sample-preview@0.8.31...@ali/lowcode-plugin-sample-preview@0.8.32) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-sample-preview", "name": "@ali/lowcode-plugin-sample-preview",
"version": "0.8.32", "version": "0.8.34",
"description": "alibaba lowcode editor sample preview plugin", "description": "alibaba lowcode editor sample preview plugin",
"files": [ "files": [
"es", "es",
@ -18,8 +18,8 @@
"editor" "editor"
], ],
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@alifd/next": "^1.x", "@alifd/next": "^1.x",
"react": "^16.8.1" "react": "^16.8.1"
}, },

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.19"></a>
## [0.8.19](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-source-editor@0.8.18...@ali/lowcode-plugin-source-editor@0.8.19) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-source-editor
<a name="0.8.18"></a> <a name="0.8.18"></a>
## [0.8.18](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-source-editor@0.8.17...@ali/lowcode-plugin-source-editor@0.8.18) (2020-07-21) ## [0.8.18](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-source-editor@0.8.17...@ali/lowcode-plugin-source-editor@0.8.18) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-source-editor", "name": "@ali/lowcode-plugin-source-editor",
"version": "0.8.18", "version": "0.8.19",
"description": "alibaba lowcode editor source-editor plugin", "description": "alibaba lowcode editor source-editor plugin",
"files": [ "files": [
"es", "es",
@ -19,7 +19,7 @@
], ],
"author": "zude.hzd", "author": "zude.hzd",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"js-beautify": "^1.10.1", "js-beautify": "^1.10.1",
"prettier": "^1.18.2", "prettier": "^1.18.2",

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.34"></a>
## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-undo-redo@0.8.33...@ali/lowcode-plugin-undo-redo@0.8.34) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-undo-redo
<a name="0.8.33"></a>
## [0.8.33](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-undo-redo@0.8.32...@ali/lowcode-plugin-undo-redo@0.8.33) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-undo-redo
<a name="0.8.32"></a> <a name="0.8.32"></a>
## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-undo-redo@0.8.31...@ali/lowcode-plugin-undo-redo@0.8.32) (2020-07-21) ## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-undo-redo@0.8.31...@ali/lowcode-plugin-undo-redo@0.8.32) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-undo-redo", "name": "@ali/lowcode-plugin-undo-redo",
"version": "0.8.32", "version": "0.8.34",
"description": "alibaba lowcode editor undo redo plugin", "description": "alibaba lowcode editor undo redo plugin",
"files": [ "files": [
"es", "es",
@ -19,11 +19,11 @@
], ],
"author": "xiayang.xy", "author": "xiayang.xy",
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-editor-skeleton": "^0.8.34", "@ali/lowcode-editor-skeleton": "^0.8.36",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.20"></a>
## [0.8.20](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-variable-bind-dialog@0.8.19...@ali/lowcode-plugin-variable-bind-dialog@0.8.20) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-variable-bind-dialog
<a name="0.8.19"></a> <a name="0.8.19"></a>
## [0.8.19](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-variable-bind-dialog@0.8.18...@ali/lowcode-plugin-variable-bind-dialog@0.8.19) (2020-07-21) ## [0.8.19](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-variable-bind-dialog@0.8.18...@ali/lowcode-plugin-variable-bind-dialog@0.8.19) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-variable-bind-dialog", "name": "@ali/lowcode-plugin-variable-bind-dialog",
"version": "0.8.19", "version": "0.8.20",
"description": "alibaba lowcode editor variable bind dialog plugin", "description": "alibaba lowcode editor variable bind dialog plugin",
"files": [ "files": [
"es", "es",
@ -19,7 +19,7 @@
], ],
"author": "zude.hzd", "author": "zude.hzd",
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.24"></a>
## [0.8.24](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-zh-en@0.8.23...@ali/lowcode-plugin-zh-en@0.8.24) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-plugin-zh-en
<a name="0.8.23"></a> <a name="0.8.23"></a>
## [0.8.23](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-zh-en@0.8.22...@ali/lowcode-plugin-zh-en@0.8.23) (2020-07-21) ## [0.8.23](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-plugin-zh-en@0.8.22...@ali/lowcode-plugin-zh-en@0.8.23) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-plugin-zh-en", "name": "@ali/lowcode-plugin-zh-en",
"version": "0.8.23", "version": "0.8.24",
"description": "alibaba lowcode editor zhong english plugin", "description": "alibaba lowcode editor zhong english plugin",
"files": [ "files": [
"es", "es",
@ -14,9 +14,9 @@
"test:snapshot": "ava --update-snapshots" "test:snapshot": "ava --update-snapshots"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-editor-core": "^0.8.22", "@ali/lowcode-editor-core": "^0.8.23",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.1.5"></a>
## [0.1.5](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-renderer@0.1.4...@ali/lowcode-rax-renderer@0.1.5) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-rax-renderer
<a name="0.1.4"></a> <a name="0.1.4"></a>
## [0.1.4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-renderer@0.1.3...@ali/lowcode-rax-renderer@0.1.4) (2020-07-21) ## [0.1.4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-renderer@0.1.3...@ali/lowcode-rax-renderer@0.1.4) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-rax-renderer", "name": "@ali/lowcode-rax-renderer",
"version": "0.1.4", "version": "0.1.5",
"description": "Rax renderer for Ali lowCode engine", "description": "Rax renderer for Ali lowCode engine",
"main": "lib/index.js", "main": "lib/index.js",
"module": "lib/index.js", "module": "lib/index.js",
@ -54,7 +54,7 @@
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.0", "@alib/build-scripts": "^0.1.0",
"build-plugin-rax-component": "^0.1.4", "build-plugin-rax-component": "^0.2.11",
"driver-universal": "^3.1.3" "driver-universal": "^3.1.3"
}, },
"publishConfig": { "publishConfig": {

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.33"></a>
## [0.8.33](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-simulator-renderer@0.8.32...@ali/lowcode-rax-simulator-renderer@0.8.33) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
<a name="0.8.32"></a>
## [0.8.32](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-simulator-renderer@0.8.31...@ali/lowcode-rax-simulator-renderer@0.8.32) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
<a name="0.8.31"></a> <a name="0.8.31"></a>
## [0.8.31](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-simulator-renderer@0.8.30...@ali/lowcode-rax-simulator-renderer@0.8.31) (2020-07-21) ## [0.8.31](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-rax-simulator-renderer@0.8.30...@ali/lowcode-rax-simulator-renderer@0.8.31) (2020-07-21)

View File

@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "@ali/lowcode-rax-simulator-renderer", "name": "@ali/lowcode-rax-simulator-renderer",
"version": "0.8.31", "version": "0.8.33",
"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 @@
"test:snapshot": "ava --update-snapshots" "test:snapshot": "ava --update-snapshots"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-rax-renderer": "^0.1.4", "@ali/lowcode-rax-renderer": "^0.1.5",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@ali/recore-rax": "^1.2.4", "@ali/recore-rax": "^1.2.4",
"@ali/vu-css-style": "^1.0.2", "@ali/vu-css-style": "^1.0.2",
"@recore/obx": "^1.0.8", "@recore/obx": "^1.0.8",

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.15"></a>
## [0.8.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-renderer@0.8.14...@ali/lowcode-react-renderer@0.8.15) (2020-07-21)
### Bug Fixes
* 支持自定义 Block 容器 ([1c0b508](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/1c0b508))
<a name="0.8.14"></a> <a name="0.8.14"></a>
## [0.8.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-renderer@0.8.13...@ali/lowcode-react-renderer@0.8.14) (2020-07-21) ## [0.8.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-renderer@0.8.13...@ali/lowcode-react-renderer@0.8.14) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-react-renderer", "name": "@ali/lowcode-react-renderer",
"version": "0.8.14", "version": "0.8.15",
"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",

View File

@ -59,7 +59,7 @@ export default class BlockEngine extends BaseEngine {
} }
render() { render() {
const { __schema } = this.props; const { __schema, __components } = this.props;
if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) { if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) {
return '区块schema结构异常'; return '区块schema结构异常';
@ -69,7 +69,33 @@ export default class BlockEngine extends BaseEngine {
this.__generateCtx(); this.__generateCtx();
this.__render(); this.__render();
const { id, className, style, autoLoading, defaultHeight = 300, loading } = this.__parseData(__schema.props); const props = this.__parseData(__schema.props);
const { id, className, style, autoLoading, defaultHeight = 300, loading } = props;
const { Block } = __components;
if (Block) {
const { engine } = this.context || {};
return (
<AppContext.Provider
value={{
...this.context,
blockContext: this,
}}
>
{engine.createElement(
Block,
{
...props,
ref: this.__getRef,
className: classnames(getFileCssName(__schema.fileName), className, this.props.className),
__id: __schema.id,
},
this.__createDom(),
)}
</AppContext.Provider>
);
}
const renderContent = () => ( const renderContent = () => (
<AppContext.Provider <AppContext.Provider
value={{ value={{

View File

@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.36"></a>
## [0.8.36](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-simulator-renderer@0.8.35...@ali/lowcode-react-simulator-renderer@0.8.36) (2020-07-21)
### Bug Fixes
* 低代码组件修改之后渲染为空 ([ef71632](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/ef71632))
* 调整 upgrade 和 init 的流程 ([09fc1a0](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/09fc1a0))
<a name="0.8.35"></a>
## [0.8.35](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-simulator-renderer@0.8.34...@ali/lowcode-react-simulator-renderer@0.8.35) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer
<a name="0.8.34"></a> <a name="0.8.34"></a>
## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-simulator-renderer@0.8.33...@ali/lowcode-react-simulator-renderer@0.8.34) (2020-07-21) ## [0.8.34](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-react-simulator-renderer@0.8.33...@ali/lowcode-react-simulator-renderer@0.8.34) (2020-07-21)

View File

@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "@ali/lowcode-react-simulator-renderer", "name": "@ali/lowcode-react-simulator-renderer",
"version": "0.8.34", "version": "0.8.36",
"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",
@ -13,10 +13,10 @@
"test:snapshot": "ava --update-snapshots" "test:snapshot": "ava --update-snapshots"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-designer": "^0.9.28", "@ali/lowcode-designer": "^0.9.30",
"@ali/lowcode-react-renderer": "^0.8.14", "@ali/lowcode-react-renderer": "^0.8.15",
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@ali/lowcode-utils": "^0.8.13", "@ali/lowcode-utils": "^0.8.14",
"@ali/vu-css-style": "^1.0.2", "@ali/vu-css-style": "^1.0.2",
"@recore/obx": "^1.0.8", "@recore/obx": "^1.0.8",
"@recore/obx-react": "^1.0.7", "@recore/obx-react": "^1.0.7",

View File

@ -74,7 +74,7 @@ export class SimulatorRenderer implements BuiltinSimulatorRenderer {
} }
private _libraryMap: { [key: string]: string } = {}; private _libraryMap: { [key: string]: string } = {};
private buildComponents() { private buildComponents() {
this._components = buildComponents(this._libraryMap, this._componentsMap); this._components = buildComponents(this._libraryMap, this._componentsMap, this.createComponent.bind(this));
} }
@obx.ref private _components: any = {}; @obx.ref private _components: any = {};
@computed get components(): object { @computed get components(): object {
@ -247,8 +247,10 @@ export class SimulatorRenderer implements BuiltinSimulatorRenderer {
} }
const _leaf = host.document.designer.currentDocument?.createNode(schema); const _leaf = host.document.designer.currentDocument?.createNode(schema);
const node = host.document.createNode(schema); const node = host.document.createNode(schema);
let props = processPropsSchema(schema.props, propsMap); let { props } = schema;
props = host.document.designer.transformProps(props, node, TransformStage.Init); props = host.document.designer.transformProps(props, node, TransformStage.Init);
props = host.document.designer.transformProps(props, node, TransformStage.Upgrade);
props = processPropsSchema(props, propsMap);
props = host.document.designer.transformProps(props, node, TransformStage.Render); props = host.document.designer.transformProps(props, node, TransformStage.Render);
return createElement(Com, { ...props, _leaf }, children); return createElement(Com, { ...props, _leaf }, children);
}; };
@ -386,16 +388,17 @@ const builtinComponents = {
Leaf, Leaf,
}; };
function buildComponents( function buildComponents(libraryMap: LibraryMap,
libraryMap: LibraryMap, componentsMap: { [componentName: string]: NpmInfo | ComponentType<any> | ComponentSchema },
componentsMap: { [componentName: string]: NpmInfo | ComponentType<any> }, createComponent: (schema: ComponentSchema) => Component | null) {
) {
const components: any = { const components: any = {
...builtinComponents, ...builtinComponents,
}; };
Object.keys(componentsMap).forEach((componentName) => { Object.keys(componentsMap).forEach((componentName) => {
let component = componentsMap[componentName]; let component = componentsMap[componentName];
if (isReactComponent(component)) { if (component && (component as ComponentSchema).componentName === 'Component') {
components[componentName] = createComponent(component as ComponentSchema);
} else if (isReactComponent(component)) {
components[componentName] = component; components[componentName] = component;
} else { } else {
component = findComponent(libraryMap, componentName, component); component = findComponent(libraryMap, componentName, component);

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.13"></a>
## [0.8.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-types@0.8.12...@ali/lowcode-types@0.8.13) (2020-07-21)
### Bug Fixes
* 兼容事件绑定 ([f4c07af](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/f4c07af))
<a name="0.8.12"></a> <a name="0.8.12"></a>
## [0.8.12](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-types@0.8.11...@ali/lowcode-types@0.8.12) (2020-07-21) ## [0.8.12](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-types@0.8.11...@ali/lowcode-types@0.8.12) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-types", "name": "@ali/lowcode-types",
"version": "0.8.12", "version": "0.8.13",
"description": "Types for Ali lowCode engine", "description": "Types for Ali lowCode engine",
"files": [ "files": [
"es", "es",

View File

@ -11,6 +11,10 @@ export interface JSExpression {
* *
*/ */
mock?: any; mock?: any;
/**
* extTypeevents
*/
[key: string]: any;
} }
export interface JSSlot { export interface JSSlot {

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="0.8.14"></a>
## [0.8.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-utils@0.8.13...@ali/lowcode-utils@0.8.14) (2020-07-21)
**Note:** Version bump only for package @ali/lowcode-utils
<a name="0.8.13"></a> <a name="0.8.13"></a>
## [0.8.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-utils@0.8.12...@ali/lowcode-utils@0.8.13) (2020-07-21) ## [0.8.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/@ali/lowcode-utils@0.8.12...@ali/lowcode-utils@0.8.13) (2020-07-21)

View File

@ -1,6 +1,6 @@
{ {
"name": "@ali/lowcode-utils", "name": "@ali/lowcode-utils",
"version": "0.8.13", "version": "0.8.14",
"description": "Utils for Ali lowCode engine", "description": "Utils for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -14,7 +14,7 @@
"test:snapshot": "ava --update-snapshots" "test:snapshot": "ava --update-snapshots"
}, },
"dependencies": { "dependencies": {
"@ali/lowcode-types": "^0.8.12", "@ali/lowcode-types": "^0.8.13",
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"react": "^16" "react": "^16"
}, },