mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
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:
commit
10a28ae25a
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-demo",
|
||||
"version": "0.8.38",
|
||||
"version": "0.8.40",
|
||||
"private": true,
|
||||
"description": "低代码引擎 DEMO",
|
||||
"scripts": {
|
||||
@ -9,21 +9,21 @@
|
||||
},
|
||||
"config": {},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.34",
|
||||
"@ali/lowcode-plugin-components-pane": "^0.8.30",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.28",
|
||||
"@ali/lowcode-plugin-event-bind-dialog": "^0.8.21",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.34",
|
||||
"@ali/lowcode-plugin-sample-logo": "^0.8.20",
|
||||
"@ali/lowcode-plugin-sample-preview": "^0.8.32",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.36",
|
||||
"@ali/lowcode-plugin-components-pane": "^0.8.32",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.30",
|
||||
"@ali/lowcode-plugin-event-bind-dialog": "^0.8.22",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.36",
|
||||
"@ali/lowcode-plugin-sample-logo": "^0.8.21",
|
||||
"@ali/lowcode-plugin-sample-preview": "^0.8.34",
|
||||
"@ali/lowcode-plugin-settings-pane": "^0.8.8",
|
||||
"@ali/lowcode-plugin-undo-redo": "^0.8.32",
|
||||
"@ali/lowcode-plugin-variable-bind-dialog": "^0.8.19",
|
||||
"@ali/lowcode-plugin-zh-en": "^0.8.23",
|
||||
"@ali/lowcode-react-renderer": "^0.8.14",
|
||||
"@ali/lowcode-plugin-undo-redo": "^0.8.34",
|
||||
"@ali/lowcode-plugin-variable-bind-dialog": "^0.8.20",
|
||||
"@ali/lowcode-plugin-zh-en": "^0.8.24",
|
||||
"@ali/lowcode-react-renderer": "^0.8.15",
|
||||
"@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-datapool-pane": "^6.4.3",
|
||||
"@ali/ve-history-pane": "4.0.0",
|
||||
|
||||
@ -3,6 +3,34 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-designer",
|
||||
"version": "0.9.28",
|
||||
"version": "0.9.30",
|
||||
"description": "Designer for Ali LowCode Engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -15,9 +15,9 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"classnames": "^2.2.6",
|
||||
"event": "^1.0.0",
|
||||
"react": "^16",
|
||||
|
||||
@ -878,7 +878,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
||||
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({
|
||||
target: this.document.rootNode,
|
||||
detail: {
|
||||
|
||||
@ -386,6 +386,8 @@ export class Designer {
|
||||
let meta = this._componentMetasMap.get(key);
|
||||
if (meta) {
|
||||
meta.setMetadata(data);
|
||||
|
||||
this._componentMetasMap.set(key, meta);
|
||||
} else {
|
||||
meta = this._lostComponentMetasMap.get(key);
|
||||
|
||||
@ -426,10 +428,11 @@ export class Designer {
|
||||
|
||||
@computed get componentsMap(): { [key: string]: NpmInfo | Component } {
|
||||
const maps: any = {};
|
||||
this._componentMetasMap.forEach((config, key) => {
|
||||
const designer = this;
|
||||
designer._componentMetasMap.forEach((config, key) => {
|
||||
const metaData = config.getMetadata();
|
||||
if (metaData.devMode === 'lowcode') {
|
||||
maps[key] = this.currentDocument?.simulator?.createComponent(metaData.schema!);
|
||||
maps[key] = metaData.schema;
|
||||
} else {
|
||||
const view = metaData.experimental?.view;
|
||||
if (view) {
|
||||
|
||||
@ -5,6 +5,18 @@ import { SettingEntry } from './setting-entry';
|
||||
import { computed, obx } from '@ali/lowcode-editor-core';
|
||||
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 {
|
||||
readonly isSettingField = true;
|
||||
readonly isRequired: boolean;
|
||||
@ -51,10 +63,11 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
||||
this._expanded = extraProps?.defaultCollapsed ? false : true;
|
||||
|
||||
// initial items
|
||||
if (this.type === 'group' && items) {
|
||||
if (items && items.length > 0) {
|
||||
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
|
||||
|
||||
@ -79,6 +79,10 @@ export class NodeChildren {
|
||||
return this.size > 0;
|
||||
}
|
||||
|
||||
@computed length() {
|
||||
return this.children.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一个节点
|
||||
*/
|
||||
@ -94,6 +98,7 @@ export class NodeChildren {
|
||||
deleted.purge();
|
||||
}
|
||||
this.emitter.emit('change');
|
||||
this.reportModified(node, this.owner, {type: 'remove', removeIndex: i, removeNode: node});
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -290,4 +295,17 @@ export class NodeChildren {
|
||||
// 保证向前兼容性
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,6 +634,14 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
||||
this._slots.push(slotNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一个节点
|
||||
* @param node
|
||||
*/
|
||||
removeChild(node: Node) {
|
||||
this.children?.delete(node);
|
||||
}
|
||||
|
||||
private purged = false;
|
||||
/**
|
||||
* 是否已销毁
|
||||
|
||||
@ -102,7 +102,7 @@ export class Project {
|
||||
| string,
|
||||
): any {}
|
||||
|
||||
open(doc?: string | DocumentModel | RootSchema): void {
|
||||
open(doc?: string | DocumentModel | RootSchema): DocumentModel {
|
||||
if (!doc) {
|
||||
const got = this.documents.find((item) => item.isBlank());
|
||||
if (got) {
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-core",
|
||||
"version": "0.8.22",
|
||||
"version": "0.8.23",
|
||||
"description": "Core Api for Ali lowCode engine",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
@ -15,8 +15,8 @@
|
||||
"cloud-build": "build-scripts build --skip-demo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"@recore/obx": "^1.0.9",
|
||||
"@recore/obx-react": "^1.0.8",
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-preset-general",
|
||||
"version": "0.9.13",
|
||||
"version": "0.9.15",
|
||||
"private": true,
|
||||
"description": "Ali General Editor Preset",
|
||||
"main": "lib/index.js",
|
||||
@ -15,12 +15,12 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.34",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.28",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.34",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.36",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.30",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.36",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@alifd/next": "^1.19.12",
|
||||
"@alife/theme-lowcode-dark": "^0.1.0",
|
||||
"@alife/theme-lowcode-light": "^0.1.0",
|
||||
@ -28,7 +28,7 @@
|
||||
"react-dom": "^16.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ali/lowcode-editor-setters": "^0.9.8",
|
||||
"@ali/lowcode-editor-setters": "^0.9.9",
|
||||
"@alib/build-scripts": "^0.1.18",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/react": "^16.8.3",
|
||||
|
||||
@ -3,6 +3,35 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-preset-vision",
|
||||
"version": "0.8.29",
|
||||
"version": "0.8.31",
|
||||
"private": true,
|
||||
"description": "Vision Polyfill for Ali lowCode engine",
|
||||
"main": "lib/index.js",
|
||||
@ -15,11 +15,11 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.34",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.28",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.34",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.36",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.30",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.36",
|
||||
"@ali/ve-i18n-util": "^2.0.0",
|
||||
"@ali/ve-icons": "^4.1.9",
|
||||
"@ali/ve-less-variables": "2.0.3",
|
||||
|
||||
@ -220,6 +220,9 @@ class Prototype {
|
||||
readonly isPrototype = true;
|
||||
readonly meta: ComponentMeta;
|
||||
readonly options: OldPrototypeConfig | ComponentMetadata;
|
||||
get packageName() {
|
||||
return this.meta.npm?.package;
|
||||
}
|
||||
|
||||
constructor(input: OldPrototypeConfig | ComponentMetadata | ComponentMeta, lookup: boolean = false) {
|
||||
if (lookup) {
|
||||
@ -251,7 +254,7 @@ class Prototype {
|
||||
}
|
||||
|
||||
getPackageName() {
|
||||
return this.meta.npm?.package;
|
||||
return this.packageName;
|
||||
}
|
||||
|
||||
getContextInfo(name: string): any {
|
||||
|
||||
@ -332,27 +332,29 @@ export function upgradePropConfig(config: OldPropConfig, collector: ConfigCollec
|
||||
|
||||
const setterInitial = getInitialFromSetter(setter);
|
||||
|
||||
collector.addInitial({
|
||||
// FIXME! name could be "xxx.xxx"
|
||||
name: slotName || name,
|
||||
initial: (field: Field, currentValue: any) => {
|
||||
// FIXME! read from prototype.defaultProps
|
||||
const defaults = extraProps.defaultValue;
|
||||
|
||||
if (typeof initialFn !== 'function') {
|
||||
initialFn = defaultInitial;
|
||||
}
|
||||
|
||||
const v = initialFn.call(field, currentValue, defaults);
|
||||
|
||||
if (setterInitial) {
|
||||
return setterInitial.call(field, v, defaults);
|
||||
}
|
||||
|
||||
return v;
|
||||
},
|
||||
});
|
||||
|
||||
if (type !== 'composite') {
|
||||
collector.addInitial({
|
||||
// FIXME! name could be "xxx.xxx"
|
||||
name: slotName || name,
|
||||
initial: (field: Field, currentValue: any) => {
|
||||
// FIXME! read from prototype.defaultProps
|
||||
const defaults = extraProps.defaultValue;
|
||||
|
||||
if (typeof initialFn !== 'function') {
|
||||
initialFn = defaultInitial;
|
||||
}
|
||||
|
||||
const v = initialFn.call(field, currentValue, defaults);
|
||||
|
||||
if (setterInitial) {
|
||||
return setterInitial.call(field, v, defaults);
|
||||
}
|
||||
|
||||
return v;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (ignore != null || disabled != null) {
|
||||
collector.addFilter({
|
||||
// FIXME! name should be "xxx.xxx"
|
||||
@ -431,9 +433,11 @@ export function upgradePropConfig(config: OldPropConfig, collector: ConfigCollec
|
||||
autorun: item.autorun,
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
: [];
|
||||
newConfig.items = objItems;
|
||||
|
||||
const initial = (target: SettingTarget, value?: any) => {
|
||||
// TODO:
|
||||
const defaults = extraProps.defaultValue;
|
||||
@ -749,10 +753,7 @@ export function upgradeMetadata(oldConfig: OldPrototypeConfig) {
|
||||
callbacks.onNodeRemove = didDropOut;
|
||||
}
|
||||
if (subtreeModified) {
|
||||
callbacks.onSubtreeModified = (...args: any[]) => {
|
||||
// FIXME! args not correct
|
||||
subtreeModified.apply(args[0], args as any);
|
||||
};
|
||||
callbacks.onSubtreeModified = subtreeModified;
|
||||
}
|
||||
if (onResize) {
|
||||
callbacks.onResize = (e: any, currentNode: any) => {
|
||||
|
||||
@ -85,17 +85,35 @@ designer.addPropsReducer((props, node) => {
|
||||
const newProps: any = {
|
||||
...props,
|
||||
};
|
||||
const getRealValue = (propValue: any) => {
|
||||
if (isVariable(propValue)) {
|
||||
return propValue.value;
|
||||
}
|
||||
if (isJSExpression(propValue)) {
|
||||
return propValue.mock;
|
||||
}
|
||||
return propValue;
|
||||
};
|
||||
initials.forEach((item) => {
|
||||
// FIXME! this implements SettingTarget
|
||||
try {
|
||||
// FIXME! item.name could be 'xxx.xxx'
|
||||
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) {
|
||||
newProps[item.name] = isJSExpression(ov) ? {
|
||||
...ov,
|
||||
mock: v,
|
||||
} : v;
|
||||
if (isVariable(ov)) {
|
||||
newProps[item.name] = {
|
||||
...ov,
|
||||
value: v,
|
||||
};
|
||||
} else if (isJSExpression(ov)) {
|
||||
newProps[item.name] = {
|
||||
...ov,
|
||||
mock: v,
|
||||
};
|
||||
} else {
|
||||
newProps[item.name] = v;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
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;
|
||||
});
|
||||
return newProps;
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-setters",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.9",
|
||||
"description": "Builtin setters for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
@ -22,7 +22,7 @@
|
||||
"@ali/iceluna-comp-react-node": "^1.0.5",
|
||||
"@ali/iceluna-sdk": "^1.0.5-beta.24",
|
||||
"@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",
|
||||
"acorn": "^6.4.1",
|
||||
"classnames": "^2.2.6",
|
||||
|
||||
@ -3,6 +3,25 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-skeleton",
|
||||
"version": "0.8.34",
|
||||
"version": "0.8.36",
|
||||
"description": "alibaba lowcode editor skeleton",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -19,10 +19,10 @@
|
||||
"editor"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@alifd/next": "^1.20.12",
|
||||
"classnames": "^2.2.6",
|
||||
"react": "^16.8.1",
|
||||
|
||||
@ -34,6 +34,10 @@ export default class Area<C extends IWidgetBaseConfig = any, T extends IWidget =
|
||||
return this.container.add(config);
|
||||
}
|
||||
|
||||
remove(config: T | string): number {
|
||||
return this.container.remove(config);
|
||||
}
|
||||
|
||||
private lastCurrent: T | null = null;
|
||||
setVisible(flag: boolean) {
|
||||
if (this.exclusive) {
|
||||
|
||||
11
packages/editor-skeleton/src/icons/fix.tsx
Normal file
11
packages/editor-skeleton/src/icons/fix.tsx
Normal 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';
|
||||
12
packages/editor-skeleton/src/icons/float.tsx
Normal file
12
packages/editor-skeleton/src/icons/float.tsx
Normal 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';
|
||||
@ -6,16 +6,31 @@ import Area from '../area';
|
||||
import { PanelConfig } from '../types';
|
||||
import Panel from '../widget/panel';
|
||||
import { Designer } from '@ali/lowcode-designer';
|
||||
import { IconFloat } from '../icons/float';
|
||||
|
||||
@observer
|
||||
export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, Panel> }> {
|
||||
shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
// FIXME: dirty fix, need deep think
|
||||
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() {
|
||||
const { area } = this.props;
|
||||
const hideTitleBar = area.current?.config.props?.hideTitleBar;
|
||||
@ -34,15 +49,24 @@ export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, P
|
||||
style={style}
|
||||
>
|
||||
{!hideTitleBar && (
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
<Fragment>
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-icon-float"
|
||||
onClick={this.setFloat.bind(this)}
|
||||
>
|
||||
<IconFloat />
|
||||
</Button>
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-icon-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
</Fragment>
|
||||
)}
|
||||
<Contents area={area} />
|
||||
</div>
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, Fragment } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { observer, Focusable, focusTracker } from '@ali/lowcode-editor-core';
|
||||
import { Button, Icon } from '@alifd/next';
|
||||
import { IconFix } from '../icons/fix';
|
||||
import Area from '../area';
|
||||
import Panel from '../widget/panel';
|
||||
|
||||
@ -76,6 +77,18 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
|
||||
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() {
|
||||
const { area } = this.props;
|
||||
const width = area.current?.config.props?.width;
|
||||
@ -93,15 +106,24 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
|
||||
>
|
||||
{
|
||||
!hideTitleBar && (
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
<Fragment>
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-icon-fix"
|
||||
onClick={this.setFixed.bind(this)}
|
||||
>
|
||||
<IconFix />
|
||||
</Button>
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-icon-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
<Contents area={area} />
|
||||
|
||||
@ -175,6 +175,65 @@ body {
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
|
||||
.lc-tabs-title {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
position: relative;
|
||||
display: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// background: rgba(31,56,88,0.04);
|
||||
border-bottom: 1px solid #EDEFF3;
|
||||
.lc-tab-title{
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
&.actived {
|
||||
color: #0079F2;
|
||||
border-bottom-color: #0079F2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lc-tabs-content {
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
bottom: 0;
|
||||
left: 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;
|
||||
@ -190,48 +249,6 @@ body {
|
||||
&.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 {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
position: relative;
|
||||
display: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// background: rgba(31,56,88,0.04);
|
||||
border-bottom: 1px solid #EDEFF3;
|
||||
.lc-tab-title{
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
&.actived {
|
||||
color: #0079F2;
|
||||
border-bottom-color: #0079F2;
|
||||
}
|
||||
}
|
||||
}
|
||||
.lc-tabs-content {
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.lc-left-area {
|
||||
height: 100%;
|
||||
@ -293,16 +310,6 @@ body {
|
||||
&.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-left-area.lc-area-visible ~ .lc-left-fixed-pane {
|
||||
margin-left: 1px;
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-components-pane",
|
||||
"version": "0.8.30",
|
||||
"version": "0.8.32",
|
||||
"description": "alibaba lowcode editor component-list plugin",
|
||||
"files": [
|
||||
"es/",
|
||||
@ -20,9 +20,9 @@
|
||||
],
|
||||
"author": "xiayang.xy",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/ve-component-list": "^1.1.1",
|
||||
"@alifd/next": "^1.19.19",
|
||||
"react": "^16.8.1"
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-designer",
|
||||
"version": "0.9.28",
|
||||
"version": "0.9.30",
|
||||
"description": "alibaba lowcode editor designer plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -20,8 +20,8 @@
|
||||
],
|
||||
"author": "xiayang.xy",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
},
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-event-bind-dialog",
|
||||
"version": "0.8.21",
|
||||
"version": "0.8.22",
|
||||
"description": "alibaba lowcode editor event bind dialog plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -19,8 +19,8 @@
|
||||
],
|
||||
"author": "zude.hzd",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
|
||||
@ -3,6 +3,25 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-outline-pane",
|
||||
"version": "0.8.34",
|
||||
"version": "0.8.36",
|
||||
"description": "Outline pane for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
@ -14,10 +14,10 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"classnames": "^2.2.6",
|
||||
"react": "^16",
|
||||
|
||||
@ -71,7 +71,7 @@ class TreeNodeChildren extends Component<{
|
||||
/>
|
||||
);
|
||||
treeNode.children?.forEach((child, index) => {
|
||||
const childIsModal = child.node.getPrototype().isModal();
|
||||
const childIsModal = child.node.getPrototype()?.isModal() || false;
|
||||
if (isModal != childIsModal) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-sample-logo",
|
||||
"version": "0.8.20",
|
||||
"version": "0.8.21",
|
||||
"description": "alibaba lowcode editor logo plugin",
|
||||
"files": [
|
||||
"es/",
|
||||
@ -20,7 +20,7 @@
|
||||
],
|
||||
"author": "xiayang.xy",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"react": "^16.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-sample-preview",
|
||||
"version": "0.8.32",
|
||||
"version": "0.8.34",
|
||||
"description": "alibaba lowcode editor sample preview plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -18,8 +18,8 @@
|
||||
"editor"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@alifd/next": "^1.x",
|
||||
"react": "^16.8.1"
|
||||
},
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-source-editor",
|
||||
"version": "0.8.18",
|
||||
"version": "0.8.19",
|
||||
"description": "alibaba lowcode editor source-editor plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -19,7 +19,7 @@
|
||||
],
|
||||
"author": "zude.hzd",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"js-beautify": "^1.10.1",
|
||||
"prettier": "^1.18.2",
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-undo-redo",
|
||||
"version": "0.8.32",
|
||||
"version": "0.8.34",
|
||||
"description": "alibaba lowcode editor undo redo plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -19,11 +19,11 @@
|
||||
],
|
||||
"author": "xiayang.xy",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.34",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.36",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
},
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-variable-bind-dialog",
|
||||
"version": "0.8.19",
|
||||
"version": "0.8.20",
|
||||
"description": "alibaba lowcode editor variable bind dialog plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -19,7 +19,7 @@
|
||||
],
|
||||
"author": "zude.hzd",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-zh-en",
|
||||
"version": "0.8.23",
|
||||
"version": "0.8.24",
|
||||
"description": "alibaba lowcode editor zhong english plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -14,9 +14,9 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^0.8.22",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-editor-core": "^0.8.23",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
},
|
||||
|
||||
@ -3,7 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="0.1.4"></a>
|
||||
<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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -11,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
||||
|
||||
<a name="0.1.3"></a>
|
||||
<a name="0.1.3"></a>
|
||||
## 0.1.3 (2020-07-21)
|
||||
|
||||
|
||||
@ -51,7 +59,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
||||
### Features
|
||||
|
||||
* init rax-render ([7167767](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/7167767))
|
||||
|
||||
|
||||
&&
|
||||
&&
|
||||
||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-rax-renderer",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"description": "Rax renderer for Ali lowCode engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "lib/index.js",
|
||||
@ -54,7 +54,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@ali/lowcode-rax-simulator-renderer",
|
||||
"version": "0.8.31",
|
||||
"version": "0.8.33",
|
||||
"description": "rax simulator renderer for alibaba lowcode designer",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -13,10 +13,10 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-rax-renderer": "^0.1.4",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-rax-renderer": "^0.1.5",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@ali/recore-rax": "^1.2.4",
|
||||
"@ali/vu-css-style": "^1.0.2",
|
||||
"@recore/obx": "^1.0.8",
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-react-renderer",
|
||||
"version": "0.8.14",
|
||||
"version": "0.8.15",
|
||||
"description": "react renderer for ali lowcode engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
||||
@ -59,7 +59,7 @@ export default class BlockEngine extends BaseEngine {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { __schema } = this.props;
|
||||
const { __schema, __components } = this.props;
|
||||
|
||||
if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) {
|
||||
return '区块schema结构异常!';
|
||||
@ -69,7 +69,33 @@ export default class BlockEngine extends BaseEngine {
|
||||
this.__generateCtx();
|
||||
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 = () => (
|
||||
<AppContext.Provider
|
||||
value={{
|
||||
|
||||
@ -3,6 +3,26 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@ali/lowcode-react-simulator-renderer",
|
||||
"version": "0.8.34",
|
||||
"version": "0.8.36",
|
||||
"description": "react simulator renderer for alibaba lowcode designer",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -13,10 +13,10 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.28",
|
||||
"@ali/lowcode-react-renderer": "^0.8.14",
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-utils": "^0.8.13",
|
||||
"@ali/lowcode-designer": "^0.9.30",
|
||||
"@ali/lowcode-react-renderer": "^0.8.15",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@ali/lowcode-utils": "^0.8.14",
|
||||
"@ali/vu-css-style": "^1.0.2",
|
||||
"@recore/obx": "^1.0.8",
|
||||
"@recore/obx-react": "^1.0.7",
|
||||
|
||||
@ -74,7 +74,7 @@ export class SimulatorRenderer implements BuiltinSimulatorRenderer {
|
||||
}
|
||||
private _libraryMap: { [key: string]: string } = {};
|
||||
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 = {};
|
||||
@computed get components(): object {
|
||||
@ -247,8 +247,10 @@ export class SimulatorRenderer implements BuiltinSimulatorRenderer {
|
||||
}
|
||||
const _leaf = host.document.designer.currentDocument?.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.Upgrade);
|
||||
props = processPropsSchema(props, propsMap);
|
||||
props = host.document.designer.transformProps(props, node, TransformStage.Render);
|
||||
return createElement(Com, { ...props, _leaf }, children);
|
||||
};
|
||||
@ -386,16 +388,17 @@ const builtinComponents = {
|
||||
Leaf,
|
||||
};
|
||||
|
||||
function buildComponents(
|
||||
libraryMap: LibraryMap,
|
||||
componentsMap: { [componentName: string]: NpmInfo | ComponentType<any> },
|
||||
) {
|
||||
function buildComponents(libraryMap: LibraryMap,
|
||||
componentsMap: { [componentName: string]: NpmInfo | ComponentType<any> | ComponentSchema },
|
||||
createComponent: (schema: ComponentSchema) => Component | null) {
|
||||
const components: any = {
|
||||
...builtinComponents,
|
||||
};
|
||||
Object.keys(componentsMap).forEach((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;
|
||||
} else {
|
||||
component = findComponent(libraryMap, componentName, component);
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-types",
|
||||
"version": "0.8.12",
|
||||
"version": "0.8.13",
|
||||
"description": "Types for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
|
||||
@ -11,6 +11,10 @@ export interface JSExpression {
|
||||
* 模拟值
|
||||
*/
|
||||
mock?: any;
|
||||
/**
|
||||
* 额外扩展属性,如 extType、events
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface JSSlot {
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
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>
|
||||
## [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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-utils",
|
||||
"version": "0.8.13",
|
||||
"version": "0.8.14",
|
||||
"description": "Utils for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
@ -14,7 +14,7 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-types": "^0.8.12",
|
||||
"@ali/lowcode-types": "^0.8.13",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"react": "^16"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user