mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-10 09:56:20 +00:00
Merge branch 'release/1.0.56' into release/0.16.0
This commit is contained in:
commit
12097d1949
11
CHANGELOG.md
11
CHANGELOG.md
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fieldId 有值时跳过 initial, 因为在目前 vc 的 fieldId 实现是每次返回不同的值 ([0360572](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/03605724769b72ab28aa6c4ae7311c10257dd8f0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lerna": "2.11.0",
|
"lerna": "2.11.0",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"npmClient": "tnpm",
|
"npmClient": "tnpm",
|
||||||
"registry": "http://registry.npm.alibaba-inc.com",
|
"registry": "http://registry.npm.alibaba-inc.com",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-designer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-designer
|
**Note:** Version bump only for package @ali/lowcode-designer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-designer",
|
"name": "@ali/lowcode-designer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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",
|
||||||
@ -14,9 +14,9 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.5",
|
"enzyme-adapter-react-16": "^1.15.5",
|
||||||
|
|||||||
@ -752,14 +752,16 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
*/
|
*/
|
||||||
setupDetecting() {
|
setupDetecting() {
|
||||||
const doc = this.contentDocument!;
|
const doc = this.contentDocument!;
|
||||||
const { detecting } = this.designer;
|
const { detecting, dragon } = this.designer;
|
||||||
const hover = (e: MouseEvent) => {
|
const hover = (e: MouseEvent) => {
|
||||||
if (!detecting.enable || this.designMode !== 'design') {
|
if (!detecting.enable || this.designMode !== 'design') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const nodeInst = this.getNodeInstanceFromElement(e.target as Element);
|
const nodeInst = this.getNodeInstanceFromElement(e.target as Element);
|
||||||
detecting.capture(nodeInst?.node || null);
|
detecting.capture(nodeInst?.node || null);
|
||||||
e.stopPropagation();
|
if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) {
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const leave = () => detecting.leave(this.project.currentDocument);
|
const leave = () => detecting.leave(this.project.currentDocument);
|
||||||
|
|
||||||
@ -770,7 +772,9 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
doc.addEventListener(
|
doc.addEventListener(
|
||||||
'mousemove',
|
'mousemove',
|
||||||
(e: Event) => {
|
(e: Event) => {
|
||||||
e.stopPropagation();
|
if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) {
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,15 +4,16 @@ import { SettingPropEntry } from './setting-prop-entry';
|
|||||||
import { SettingEntry } from './setting-entry';
|
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';
|
||||||
|
import { ISetValueOptions } from '../../types';
|
||||||
|
|
||||||
function getSettingFieldCollectorKey(parent: SettingEntry, config: FieldConfig) {
|
function getSettingFieldCollectorKey(parent: SettingEntry, config: FieldConfig) {
|
||||||
let top = parent;
|
let cur = parent;
|
||||||
const path = [config.name];
|
const path = [config.name];
|
||||||
while (top !== parent.top) {
|
while (cur !== parent.top) {
|
||||||
if (top instanceof SettingField && top.type !== 'group') {
|
if (cur instanceof SettingField && cur.type !== 'group') {
|
||||||
path.unshift(top.name);
|
path.unshift(cur.name);
|
||||||
}
|
}
|
||||||
top = top.parent;
|
cur = cur.parent;
|
||||||
}
|
}
|
||||||
return path.join('.');
|
return path.join('.');
|
||||||
}
|
}
|
||||||
@ -140,7 +141,7 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
|||||||
|
|
||||||
private hotValue: any;
|
private hotValue: any;
|
||||||
|
|
||||||
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) {
|
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: ISetValueOptions) {
|
||||||
if (isHotValue) {
|
if (isHotValue) {
|
||||||
this.setHotValue(val, extraOptions);
|
this.setHotValue(val, extraOptions);
|
||||||
return;
|
return;
|
||||||
@ -172,9 +173,14 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
|||||||
this.valueChange();
|
this.valueChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
setHotValue(data: any, options?: any) {
|
setHotValue(data: any, options?: ISetValueOptions) {
|
||||||
this.hotValue = data;
|
this.hotValue = data;
|
||||||
const value = this.transducer.toNative(data);
|
const value = this.transducer.toNative(data);
|
||||||
|
if (options) {
|
||||||
|
options.fromSetHotValue = true;
|
||||||
|
} else {
|
||||||
|
options = { fromSetHotValue: true };
|
||||||
|
}
|
||||||
if (this.isUseVariable()) {
|
if (this.isUseVariable()) {
|
||||||
const oldValue = this.getValue();
|
const oldValue = this.getValue();
|
||||||
this.setValue({
|
this.setValue({
|
||||||
@ -191,7 +197,7 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.valueChange();
|
this.valueChange(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
onEffect(action: () => void): () => void {
|
onEffect(action: () => void): () => void {
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import { Node } from '../../document';
|
|||||||
import { ComponentMeta } from '../../component-meta';
|
import { ComponentMeta } from '../../component-meta';
|
||||||
import { Designer } from '../designer';
|
import { Designer } from '../designer';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
import { ISetValueOptions } from '../../types';
|
||||||
|
import { isSettingField } from './setting-field';
|
||||||
|
|
||||||
export class SettingPropEntry implements SettingEntry {
|
export class SettingPropEntry implements SettingEntry {
|
||||||
// === static properties ===
|
// === static properties ===
|
||||||
@ -162,7 +164,7 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
/**
|
/**
|
||||||
* 设置当前属性值
|
* 设置当前属性值
|
||||||
*/
|
*/
|
||||||
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) {
|
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: ISetValueOptions) {
|
||||||
const oldValue = this.getValue();
|
const oldValue = this.getValue();
|
||||||
if (this.type === 'field') {
|
if (this.type === 'field') {
|
||||||
this.parent.setPropValue(this.name, val);
|
this.parent.setPropValue(this.name, val);
|
||||||
@ -178,6 +180,10 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.notifyValueChange(oldValue, val);
|
this.notifyValueChange(oldValue, val);
|
||||||
|
// 如果 fromSetHotValue,那么在 setHotValue 中已经调用过 valueChange 了
|
||||||
|
if (!extraOptions?.fromSetHotValue) {
|
||||||
|
this.valueChange(extraOptions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -272,8 +278,12 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
valueChange() {
|
valueChange(options: ISetValueOptions = {}) {
|
||||||
this.emitter.emit('valuechange');
|
this.emitter.emit('valuechange', options);
|
||||||
|
|
||||||
|
if (this.parent && isSettingField(this.parent)) {
|
||||||
|
this.parent.valueChange(options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyValueChange(oldValue: any, newValue:any) {
|
notifyValueChange(oldValue: any, newValue:any) {
|
||||||
@ -288,15 +298,6 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
getConfig<K extends keyof IPropConfig>(configName?: K): IPropConfig[K] | IPropConfig {
|
|
||||||
if (configName) {
|
|
||||||
return this.config[configName];
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.config;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
getVariableValue() {
|
getVariableValue() {
|
||||||
const v = this.getValue();
|
const v = this.getValue();
|
||||||
if (isJSExpression(v)) {
|
if (isJSExpression(v)) {
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import { untracked, computed, obx, engineConfig } from '@ali/lowcode-editor-core';
|
import { untracked, computed, obx, engineConfig } from '@ali/lowcode-editor-core';
|
||||||
import { CompositeValue, isJSExpression, isJSSlot, JSSlot, SlotSchema } from '@ali/lowcode-types';
|
import { CompositeValue, FieldConfig, isJSExpression, isJSSlot, JSSlot, SlotSchema } from '@ali/lowcode-types';
|
||||||
import { uniqueId, isPlainObject, hasOwnProperty, compatStage } from '@ali/lowcode-utils';
|
import { uniqueId, isPlainObject, hasOwnProperty, compatStage } from '@ali/lowcode-utils';
|
||||||
import { PropStash } from './prop-stash';
|
import { PropStash } from './prop-stash';
|
||||||
import { valueToSource } from './value-to-source';
|
import { valueToSource } from './value-to-source';
|
||||||
import { Props } from './props';
|
import { Props } from './props';
|
||||||
import { SlotNode, Node } from '../node';
|
import { SlotNode, Node } from '../node';
|
||||||
import { TransformStage } from '../transform-stage';
|
import { TransformStage } from '../transform-stage';
|
||||||
|
import { getFocusedElement } from 'medium-editor';
|
||||||
|
|
||||||
export const UNSET = Symbol.for('unset');
|
export const UNSET = Symbol.for('unset');
|
||||||
export type UNSET = typeof UNSET;
|
export type UNSET = typeof UNSET;
|
||||||
@ -14,10 +15,40 @@ export interface IPropParent {
|
|||||||
delete(prop: Prop): void;
|
delete(prop: Prop): void;
|
||||||
readonly props: Props;
|
readonly props: Props;
|
||||||
readonly owner: Node;
|
readonly owner: Node;
|
||||||
|
readonly path: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ValueTypes = 'unset' | 'literal' | 'map' | 'list' | 'expression' | 'slot';
|
export type ValueTypes = 'unset' | 'literal' | 'map' | 'list' | 'expression' | 'slot';
|
||||||
|
|
||||||
|
function hasItemsInMetadata(prop: Prop) {
|
||||||
|
const path = prop.path;
|
||||||
|
const { configure } = prop.getNode().componentMeta.getMetadata();
|
||||||
|
if (!path || path.length === 0) return false;
|
||||||
|
let props = configure?.props;
|
||||||
|
while (path.length > 0) {
|
||||||
|
let name = path.shift();
|
||||||
|
let matchedProp = getMatchedProp(props, name!);
|
||||||
|
if (!matchedProp) return false;
|
||||||
|
if (path.length === 0) return !!matchedProp?.items;
|
||||||
|
props = matchedProp.items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMatchedProp(props: FieldConfig[] | undefined, name: string): FieldConfig | null {
|
||||||
|
let found = null;
|
||||||
|
if (!props) return null;
|
||||||
|
for (const prop of props) {
|
||||||
|
if (prop.name === name) {
|
||||||
|
found = prop;
|
||||||
|
break;
|
||||||
|
} else if (prop.type === 'group' && prop.items) {
|
||||||
|
found = getMatchedProp(prop.items, name);
|
||||||
|
if (found) return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
export class Prop implements IPropParent {
|
export class Prop implements IPropParent {
|
||||||
readonly isProp = true;
|
readonly isProp = true;
|
||||||
|
|
||||||
@ -253,6 +284,21 @@ export class Prop implements IPropParent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.dispose();
|
||||||
|
|
||||||
|
// 将父属性设置成一个对象,得同时把子属性都设值,同时清空其他子属性
|
||||||
|
if (this._type === 'map' && isPlainObject(val)) {
|
||||||
|
this.items?.forEach((item) => {
|
||||||
|
// @ts-ignore
|
||||||
|
if ([item.key] in val) {
|
||||||
|
// @ts-ignore
|
||||||
|
item.setValue(val[item.key]);
|
||||||
|
} else {
|
||||||
|
this.clearPropValue(item.key!);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (oldValue !== this._value) {
|
if (oldValue !== this._value) {
|
||||||
editor?.emit('node.innerProp.change', {
|
editor?.emit('node.innerProp.change', {
|
||||||
node: this.owner,
|
node: this.owner,
|
||||||
@ -261,7 +307,6 @@ export class Prop implements IPropParent {
|
|||||||
newValue: this._value,
|
newValue: this._value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@computed getValue(): CompositeValue {
|
@computed getValue(): CompositeValue {
|
||||||
@ -358,7 +403,13 @@ export class Prop implements IPropParent {
|
|||||||
|
|
||||||
@obx.val private _maps: Map<string | number, Prop> | null = null;
|
@obx.val private _maps: Map<string | number, Prop> | null = null;
|
||||||
|
|
||||||
@computed private get items(): Prop[] | null {
|
get path(): string[] {
|
||||||
|
return (this.parent.path || []).concat(this.key as string);
|
||||||
|
}
|
||||||
|
|
||||||
|
private get items(): Prop[] | null {
|
||||||
|
// 不在元数据配置项中的,不产生 items
|
||||||
|
if (!hasItemsInMetadata(this)) return null;
|
||||||
let _items: any;
|
let _items: any;
|
||||||
untracked(() => {
|
untracked(() => {
|
||||||
_items = this._items;
|
_items = this._items;
|
||||||
|
|||||||
@ -37,6 +37,8 @@ export class Props implements IPropParent {
|
|||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly path = [];
|
||||||
|
|
||||||
get props(): Props {
|
get props(): Props {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,3 +19,20 @@ const utils = {
|
|||||||
getNodeSchemaById,
|
getNodeSchemaById,
|
||||||
};
|
};
|
||||||
export type Utils = typeof utils;
|
export type Utils = typeof utils;
|
||||||
|
|
||||||
|
export enum PROP_VALUE_CHANGED_TYPE {
|
||||||
|
/**
|
||||||
|
* normal set value
|
||||||
|
*/
|
||||||
|
SET_VALUE = 'SET_VALUE',
|
||||||
|
/**
|
||||||
|
* value changed caused by sub-prop value change
|
||||||
|
*/
|
||||||
|
SUB_VALUE_CHANGE = 'SUB_VALUE_CHANGE',
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISetValueOptions {
|
||||||
|
disableMutator?: boolean;
|
||||||
|
type?: PROP_VALUE_CHANGED_TYPE;
|
||||||
|
fromSetHotValue?: boolean;
|
||||||
|
}
|
||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-editor-core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-editor-core
|
**Note:** Version bump only for package @ali/lowcode-editor-core
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-editor-core",
|
"name": "@ali/lowcode-editor-core",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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",
|
||||||
@ -13,8 +13,8 @@
|
|||||||
"build": "build-scripts build --skip-demo"
|
"build": "build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
|
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-editor-preset-general",
|
"name": "@ali/lowcode-editor-preset-general",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "Ali General Editor Preset",
|
"description": "Ali General Editor Preset",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -14,12 +14,12 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-editor-skeleton": "1.0.53",
|
"@ali/lowcode-editor-skeleton": "1.0.54",
|
||||||
"@ali/lowcode-plugin-designer": "1.0.53",
|
"@ali/lowcode-plugin-designer": "1.0.54",
|
||||||
"@ali/lowcode-plugin-outline-pane": "1.0.53",
|
"@ali/lowcode-plugin-outline-pane": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-editor-skeleton
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-editor-skeleton
|
**Note:** Version bump only for package @ali/lowcode-editor-skeleton
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-editor-skeleton",
|
"name": "@ali/lowcode-editor-skeleton",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@ali/ve-icons": "latest",
|
"@ali/ve-icons": "latest",
|
||||||
"@ali/ve-less-variables": "^2.0.0",
|
"@ali/ve-less-variables": "^2.0.0",
|
||||||
"@alifd/next": "^1.20.12",
|
"@alifd/next": "^1.20.12",
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { Component, Fragment } from 'react';
|
import { Component, Fragment } from 'react';
|
||||||
import { Icon, Button } from '@alifd/next';
|
import { Icon, Button } from '@alifd/next';
|
||||||
import { SetterType, FieldConfig } from '@ali/lowcode-types';
|
import { SetterType, FieldConfig, CustomView } from '@ali/lowcode-types';
|
||||||
import { createSettingFieldView } from '../settings/settings-pane';
|
import { createSettingFieldView } from '../settings/settings-pane';
|
||||||
import { PopupContext, PopupPipe } from '../popup';
|
import { PopupContext, PopupPipe } from '../popup';
|
||||||
import { SettingField } from '@ali/lowcode-designer';
|
import { isSettingField, SettingField } from '@ali/lowcode-designer';
|
||||||
import './style.less';
|
import './style.less';
|
||||||
import { Title } from '@ali/lowcode-editor-core';
|
import { Title } from '@ali/lowcode-editor-core';
|
||||||
|
|
||||||
@ -165,11 +165,17 @@ class FormSetter extends Component<FormSetterProps> {
|
|||||||
super(props);
|
super(props);
|
||||||
const { config, field } = props;
|
const { config, field } = props;
|
||||||
const { extraProps } = field;
|
const { extraProps } = field;
|
||||||
this.items = (config?.items || []).map((conf) => field.createField({
|
field.items.forEach((item: SettingField | CustomView) => {
|
||||||
...conf,
|
if (isSettingField(item)) {
|
||||||
setValue: extraProps?.setValue,
|
const originalSetValue = item.extraProps.setValue;
|
||||||
}));
|
item.extraProps.setValue = (...args) => {
|
||||||
|
// 调用子字段本身的 setValue
|
||||||
|
originalSetValue?.apply(null, args);
|
||||||
|
// 调用父字段本身的 setValue
|
||||||
|
extraProps.setValue?.apply(null, args);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
// TODO: extraConfig for custom fields
|
// TODO: extraConfig for custom fields
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +187,7 @@ class FormSetter extends Component<FormSetterProps> {
|
|||||||
const { field } = this.props;
|
const { field } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className="lc-setter-object lc-block-setter">
|
<div className="lc-setter-object lc-block-setter">
|
||||||
{this.items.map((item, index) => createSettingFieldView(item, field, index))}
|
{field.items.map((item, index) => createSettingFieldView(item, field, index))}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,13 +69,13 @@ export class SettingsMain {
|
|||||||
if (!this.designer) {
|
if (!this.designer) {
|
||||||
this.designer = nodes[0].document.designer;
|
this.designer = nodes[0].document.designer;
|
||||||
}
|
}
|
||||||
|
// 当节点只有一个时,复用 node 上挂载的 settingEntry,不会产生平行的两个实例,这样在整个系统中对
|
||||||
let lastSettings = this._settings;
|
// 某个节点操作的 SettingTopEntry 只有一个实例,后续的 getProp() 也会拿到相同的 SettingField 实例
|
||||||
// obx 的一些响应式计算会延迟到下一个时钟周期,导致 prop.parent 获取不到,这里也做一个延迟
|
if (nodes.length === 1) {
|
||||||
executePendingFn(() => {
|
this._settings = nodes[0].settingEntry;
|
||||||
lastSettings?.purge();
|
} else {
|
||||||
}, 2000);
|
this._settings = this.designer.createSettingEntry(nodes);
|
||||||
this._settings = this.designer.createSettingEntry(nodes);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
purge() {
|
purge() {
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-engine
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-engine
|
**Note:** Version bump only for package @ali/lowcode-engine
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-engine",
|
"name": "@ali/lowcode-engine",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "Universal API for AliLowCode engine",
|
"description": "Universal API for AliLowCode engine",
|
||||||
"main": "lib/engine-core.js",
|
"main": "lib/engine-core.js",
|
||||||
"module": "es/engine-core.js",
|
"module": "es/engine-core.js",
|
||||||
@ -18,14 +18,14 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-editor-setters": "1.0.30",
|
"@ali/lowcode-editor-setters": "1.0.30",
|
||||||
"@ali/lowcode-editor-skeleton": "1.0.53",
|
"@ali/lowcode-editor-skeleton": "1.0.54",
|
||||||
"@ali/lowcode-engine-ext": "^1.0.0",
|
"@ali/lowcode-engine-ext": "^1.0.0",
|
||||||
"@ali/lowcode-plugin-designer": "1.0.53",
|
"@ali/lowcode-plugin-designer": "1.0.54",
|
||||||
"@ali/lowcode-plugin-outline-pane": "1.0.53",
|
"@ali/lowcode-plugin-outline-pane": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-ignitor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-ignitor
|
**Note:** Version bump only for package @ali/lowcode-ignitor
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-ignitor",
|
"name": "@ali/lowcode-ignitor",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "点火器,bootstrap lce project",
|
"description": "点火器,bootstrap lce project",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-plugin-designer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-plugin-designer
|
**Note:** Version bump only for package @ali/lowcode-plugin-designer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-plugin-designer",
|
"name": "@ali/lowcode-plugin-designer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "alibaba lowcode editor designer plugin",
|
"description": "alibaba lowcode editor designer plugin",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"author": "xiayang.xy",
|
"author": "xiayang.xy",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane
|
**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-plugin-outline-pane",
|
"name": "@ali/lowcode-plugin-outline-pane",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-rax-renderer",
|
"name": "@ali/lowcode-rax-renderer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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",
|
||||||
@ -30,8 +30,8 @@
|
|||||||
"build": "build-scripts build"
|
"build": "build-scripts build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-renderer-core": "1.0.53",
|
"@ali/lowcode-renderer-core": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"rax-find-dom-node": "^1.0.1"
|
"rax-find-dom-node": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
|
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-rax-simulator-renderer",
|
"name": "@ali/lowcode-rax-simulator-renderer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-rax-renderer": "1.0.53",
|
"@ali/lowcode-rax-renderer": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-react-renderer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-react-renderer
|
**Note:** Version bump only for package @ali/lowcode-react-renderer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-react-renderer",
|
"name": "@ali/lowcode-react-renderer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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",
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"react"
|
"react"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-renderer-core": "1.0.53",
|
"@ali/lowcode-renderer-core": "1.0.54",
|
||||||
"@alifd/next": "^1.21.16"
|
"@alifd/next": "^1.21.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer
|
**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-react-simulator-renderer",
|
"name": "@ali/lowcode-react-simulator-renderer",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "react simulator renderer for alibaba lowcode designer",
|
"description": "react simulator renderer for alibaba lowcode designer",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -16,10 +16,10 @@
|
|||||||
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo"
|
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-react-renderer": "1.0.53",
|
"@ali/lowcode-react-renderer": "1.0.54",
|
||||||
"@ali/lowcode-types": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
@ -48,8 +48,8 @@ export class DocumentInstance {
|
|||||||
this.disposeFunctions.push(host.onActivityEvent((data: ActivityData, ctx: any) => {
|
this.disposeFunctions.push(host.onActivityEvent((data: ActivityData, ctx: any) => {
|
||||||
if (host.mutedActivityEvent || (ctx && ctx.doc !== this.document)) return;
|
if (host.mutedActivityEvent || (ctx && ctx.doc !== this.document)) return;
|
||||||
|
|
||||||
// 当节点数小数 300 个时,不走入增量更新逻辑,后面优化、细化逻辑后逐步放开限制
|
// 当节点数小数 200 个时,不走入增量更新逻辑,后面优化、细化逻辑后逐步放开限制
|
||||||
if (this.document.nodesMap.size < 300) return;
|
if (this.document.nodesMap.size < 200) return;
|
||||||
|
|
||||||
if (tid) clearTimeout(tid);
|
if (tid) clearTimeout(tid);
|
||||||
// 临时关闭全量计算 schema 的逻辑,在增量计算结束后,来一次全量计算
|
// 临时关闭全量计算 schema 的逻辑,在增量计算结束后,来一次全量计算
|
||||||
@ -59,7 +59,7 @@ export class DocumentInstance {
|
|||||||
if (supportsQuickPropSetting(data, this)) {
|
if (supportsQuickPropSetting(data, this)) {
|
||||||
setInstancesProp(data, this);
|
setInstancesProp(data, this);
|
||||||
} else {
|
} else {
|
||||||
this._schema = applyActivities(this._schema!, data);
|
// this._schema = applyActivities(this._schema!, data);
|
||||||
}
|
}
|
||||||
} else if (data.type === ActivityType.ADDED) {
|
} else if (data.type === ActivityType.ADDED) {
|
||||||
// FIXME: 待补充 节点增加 逻辑
|
// FIXME: 待补充 节点增加 逻辑
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { ReactInstance } from 'react';
|
import { ReactInstance } from 'react';
|
||||||
import { ActivityData, isJSSlot } from '@ali/lowcode-types';
|
import { ActivityData, isJSSlot } from '@ali/lowcode-types';
|
||||||
import { DocumentInstance } from '../renderer';
|
import { DocumentInstance } from '../renderer';
|
||||||
|
import { isReactClass } from '@ali/lowcode-utils';
|
||||||
|
|
||||||
interface UtilsMetadata {
|
interface UtilsMetadata {
|
||||||
name: string;
|
name: string;
|
||||||
@ -55,9 +56,9 @@ function haveForceUpdate(instances: any[]): boolean {
|
|||||||
export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstance) {
|
export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstance) {
|
||||||
const { payload } = data;
|
const { payload } = data;
|
||||||
const { schema, prop } = payload;
|
const { schema, prop } = payload;
|
||||||
const nodeId = schema.id!;
|
const { componentName, id: nodeId } = schema;
|
||||||
// const key = data.payload.prop.key;
|
// const key = data.payload.prop.key;
|
||||||
const instances = doc.instancesMap.get(nodeId);
|
const instances = doc.instancesMap.get(nodeId!);
|
||||||
const propKey = getUppermostPropKey(prop);
|
const propKey = getUppermostPropKey(prop);
|
||||||
let value = (schema.props as any)[propKey];
|
let value = (schema.props as any)[propKey];
|
||||||
|
|
||||||
@ -65,14 +66,28 @@ export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstan
|
|||||||
nodeId &&
|
nodeId &&
|
||||||
Array.isArray(instances) &&
|
Array.isArray(instances) &&
|
||||||
instances.length > 0 &&
|
instances.length > 0 &&
|
||||||
haveForceUpdate(instances) &&
|
|
||||||
propKey &&
|
propKey &&
|
||||||
// 不是 extraProp
|
// 不是 extraProp
|
||||||
!propKey.startsWith('___') &&
|
!propKey.startsWith('___') &&
|
||||||
!isJSSlot(value)
|
!isJSSlot(value) &&
|
||||||
|
// functional component 不支持 ref.props 直接设值,是 readonly 的
|
||||||
|
isReactClass((doc.container?.components as any)[componentName]) &&
|
||||||
|
haveForceUpdate(instances) &&
|
||||||
|
// 黑名单组件通常会把 schema / children 魔改,导致直接设置 props 失效
|
||||||
|
isAllowedComponent(componentName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 不允许走快捷设置的组件黑名单
|
||||||
|
const DISABLED__QUICK_SETTING_COMPONENT_NAMES = [
|
||||||
|
'Filter', // 查询组件
|
||||||
|
'Filter2', // 查询组件
|
||||||
|
'TableField', // 明细组件
|
||||||
|
];
|
||||||
|
function isAllowedComponent(name: string): boolean {
|
||||||
|
return !DISABLED__QUICK_SETTING_COMPONENT_NAMES.includes(name);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置属性值
|
* 设置属性值
|
||||||
* @param data
|
* @param data
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-renderer-core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-renderer-core
|
**Note:** Version bump only for package @ali/lowcode-renderer-core
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-renderer-core",
|
"name": "@ali/lowcode-renderer-core",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "renderer core",
|
"description": "renderer core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
|||||||
@ -372,7 +372,7 @@ export default function baseRenererFactory() {
|
|||||||
}
|
}
|
||||||
if (Array.isArray(schema)) {
|
if (Array.isArray(schema)) {
|
||||||
if (schema.length === 1) return this.__createVirtualDom(schema[0], self, parentInfo);
|
if (schema.length === 1) return this.__createVirtualDom(schema[0], self, parentInfo);
|
||||||
return schema.map((item, idy) => this.__createVirtualDom(item, self, parentInfo, item?.__ctx?.lceKey ? '' : idy));
|
return schema.map((item, idy) => this.__createVirtualDom(item, self, parentInfo, item?.__ctx?.lceKey ? '' : String(idy)));
|
||||||
}
|
}
|
||||||
// FIXME
|
// FIXME
|
||||||
const _children = this.getSchemaChildren(schema);
|
const _children = this.getSchemaChildren(schema);
|
||||||
@ -484,6 +484,7 @@ export default function baseRenererFactory() {
|
|||||||
}
|
}
|
||||||
props.key = props.key || `${schema.__ctx.lceKey}_${schema.__ctx.idx || 0}_${idx !== undefined ? idx : ''}`;
|
props.key = props.key || `${schema.__ctx.lceKey}_${schema.__ctx.idx || 0}_${idx !== undefined ? idx : ''}`;
|
||||||
} else if (typeof idx === 'number' && !props.key) {
|
} else if (typeof idx === 'number' && !props.key) {
|
||||||
|
// 仅当循环场景走这里
|
||||||
props.key = idx;
|
props.key = idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-types
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-types
|
**Note:** Version bump only for package @ali/lowcode-types
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-types",
|
"name": "@ali/lowcode-types",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "Types for Ali lowCode engine",
|
"description": "Types for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ali/lowcode-utils
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ali/lowcode-utils
|
**Note:** Version bump only for package @ali/lowcode-utils
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-utils",
|
"name": "@ali/lowcode-utils",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"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": "1.0.53",
|
"@ali/lowcode-types": "1.0.54",
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"lodash.get": "^4.4.2",
|
"lodash.get": "^4.4.2",
|
||||||
"react": "^16"
|
"react": "^16"
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fieldId 有值时跳过 initial, 因为在目前 vc 的 fieldId 实现是每次返回不同的值 ([0360572](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/03605724769b72ab28aa6c4ae7311c10257dd8f0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-vision-polyfill",
|
"name": "@ali/lowcode-vision-polyfill",
|
||||||
"version": "1.0.53",
|
"version": "1.0.54",
|
||||||
"description": "Vision Polyfill for Ali lowCode engine",
|
"description": "Vision Polyfill for Ali lowCode engine",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -18,10 +18,10 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.53",
|
"@ali/lowcode-designer": "1.0.54",
|
||||||
"@ali/lowcode-editor-core": "1.0.53",
|
"@ali/lowcode-editor-core": "1.0.54",
|
||||||
"@ali/lowcode-editor-skeleton": "1.0.53",
|
"@ali/lowcode-editor-skeleton": "1.0.54",
|
||||||
"@ali/lowcode-utils": "1.0.53",
|
"@ali/lowcode-utils": "1.0.54",
|
||||||
"@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",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user