mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 18:58:11 +00:00
Merge branch 'master' into react-renderer-umd
This commit is contained in:
commit
f6cfd6a4bf
@ -28,6 +28,8 @@ module.exports = {
|
|||||||
'eol-last': 0,
|
'eol-last': 0,
|
||||||
'react/no-find-dom-node': 0,
|
'react/no-find-dom-node': 0,
|
||||||
'no-case-declarations': 0,
|
'no-case-declarations': 0,
|
||||||
'@typescript-eslint/indent': 0
|
'@typescript-eslint/indent': 0,
|
||||||
|
'import/no-cycle': 0,
|
||||||
|
'@typescript-eslint/no-shadow': 0,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lerna": "2.11.0",
|
"lerna": "2.11.0",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"npmClient": "tnpm",
|
"npmClient": "tnpm",
|
||||||
"registry": "http://registry.antfin-inc.com",
|
"registry": "http://registry.antfin-inc.com",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
|
|||||||
17
package.json
17
package.json
@ -25,23 +25,20 @@
|
|||||||
"test": "lerna run test --stream",
|
"test": "lerna run test --stream",
|
||||||
"test:snapshot": "lerna run test:snapshot",
|
"test:snapshot": "lerna run test:snapshot",
|
||||||
"watchdog:build": "node ./scripts/watchdog.js",
|
"watchdog:build": "node ./scripts/watchdog.js",
|
||||||
"xima:fix": "xima fix",
|
"f2elint:scan": "f2elint scan -q -i ./packages/*/src",
|
||||||
"xima:scan": "xima scan --quiet"
|
"f2elint:fix": "f2elint fix -i ./packages/*/src"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "xima exec lint-staged",
|
"pre-commit": "f2elint commit-file-scan",
|
||||||
"commit-msg": "xima exec commitlint -E HUSKY_GIT_PARAMS"
|
"commit-msg": "f2elint commit-msg-scan"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
|
||||||
"**/*.{css,scss,less}": "xima exec stylelint",
|
|
||||||
"**/*.{js,jsx,ts,tsx}": "xima exec eslint"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ali/lerna": "^1",
|
"@ali/lerna": "^1",
|
||||||
"typescript": "^3.2.2",
|
"f2elint": "^2.0.1",
|
||||||
"xima": "^0.3.0"
|
"husky": "^7.0.4",
|
||||||
|
"typescript": "^3.2.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0"
|
"node": ">=14.0.0"
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
编排模块
|
|
||||||
|
|
||||||
|
|
||||||
simulator/renderer 发 CDN
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-designer",
|
"name": "@ali/lowcode-designer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "Designer for Ali LowCode Engine",
|
"description": "Designer for Ali LowCode Engine",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -15,9 +15,9 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-editor-core": "1.0.74",
|
"@ali/lowcode-editor-core": "1.0.76",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"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",
|
||||||
|
|||||||
@ -47,9 +47,9 @@ function getTitle(title: string | I18nData | ReactElement) {
|
|||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class BorderContainer extends Component<{
|
export class BorderContainer extends Component<{
|
||||||
host: BuiltinSimulatorHost,
|
host: BuiltinSimulatorHost;
|
||||||
}, {
|
}, {
|
||||||
target?: ParentalNode,
|
target?: ParentalNode;
|
||||||
}> {
|
}> {
|
||||||
|
|
||||||
state = {} as any;
|
state = {} as any;
|
||||||
|
|||||||
@ -1004,7 +1004,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
if (!domNode) return;
|
if (!domNode) return;
|
||||||
if (isElementNode(domNode) && !isDOMNodeVisible(domNode, this.viewport)) {
|
if (isElementNode(domNode) && !isDOMNodeVisible(domNode, this.viewport)) {
|
||||||
const { left, top } = domNode.getBoundingClientRect();
|
const { left, top } = domNode.getBoundingClientRect();
|
||||||
const { scrollTop = 0, scrollLeft = 0 } = this.contentDocument?.documentElement!;
|
const { scrollTop = 0, scrollLeft = 0 } = this.contentDocument?.documentElement || {};
|
||||||
opt.left = left + scrollLeft;
|
opt.left = left + scrollLeft;
|
||||||
opt.top = top + scrollTop;
|
opt.top = top + scrollTop;
|
||||||
scroll = true;
|
scroll = true;
|
||||||
|
|||||||
@ -62,7 +62,7 @@ export class LiveEditing {
|
|||||||
|
|
||||||
let setterPropElement = getSetterPropElement(targetElement, rootElement);
|
let setterPropElement = getSetterPropElement(targetElement, rootElement);
|
||||||
let propTarget = setterPropElement?.dataset.setterProp;
|
let propTarget = setterPropElement?.dataset.setterProp;
|
||||||
let matched: (LiveTextEditingConfig & { propElement?: HTMLElement; }) | undefined | null;
|
let matched: (LiveTextEditingConfig & { propElement?: HTMLElement }) | undefined | null;
|
||||||
if (liveTextEditing) {
|
if (liveTextEditing) {
|
||||||
if (propTarget) {
|
if (propTarget) {
|
||||||
// 已埋点命中 data-setter-prop="proptarget", 从 liveTextEditing 读取配置(mode|onSaveContent)
|
// 已埋点命中 data-setter-prop="proptarget", 从 liveTextEditing 读取配置(mode|onSaveContent)
|
||||||
@ -196,7 +196,8 @@ export interface SaveHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setCaret(event: MouseEvent) {
|
function setCaret(event: MouseEvent) {
|
||||||
const doc = event.view?.document!;
|
const doc = event.view?.document;
|
||||||
|
if (!doc) return;
|
||||||
const range = doc.caretRangeFromPoint(event.clientX, event.clientY);
|
const range = doc.caretRangeFromPoint(event.clientX, event.clientY);
|
||||||
if (range) {
|
if (range) {
|
||||||
selectRange(doc, range);
|
selectRange(doc, range);
|
||||||
|
|||||||
@ -14,6 +14,7 @@ export const getClosestClickableNode = (
|
|||||||
while (node) {
|
while (node) {
|
||||||
// 判断当前节点是否可点击
|
// 判断当前节点是否可点击
|
||||||
let canClick = canClickNode(node, event);
|
let canClick = canClickNode(node, event);
|
||||||
|
// eslint-disable-next-line no-loop-func
|
||||||
const lockedNode = getClosestNode(node!, (n) => {
|
const lockedNode = getClosestNode(node!, (n) => {
|
||||||
// 假如当前节点就是 locked 状态,要从当前节点的父节点开始查找
|
// 假如当前节点就是 locked 状态,要从当前节点的父节点开始查找
|
||||||
return !!(node?.isLocked ? n.parent?.isLocked : n.isLocked);
|
return !!(node?.isLocked ? n.parent?.isLocked : n.isLocked);
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import {
|
|||||||
LiveTextEditingConfig,
|
LiveTextEditingConfig,
|
||||||
FieldConfig,
|
FieldConfig,
|
||||||
} from '@ali/lowcode-types';
|
} from '@ali/lowcode-types';
|
||||||
import { computed, engineConfig } from '@ali/lowcode-editor-core';
|
import { makeObservable, obx, computed, engineConfig } from '@ali/lowcode-editor-core';
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
|
|
||||||
import { isNode, Node, ParentalNode } from './document';
|
import { isNode, Node, ParentalNode } from './document';
|
||||||
@ -130,7 +130,7 @@ export class ComponentMeta {
|
|||||||
|
|
||||||
private childWhitelist?: NestingFilter | null;
|
private childWhitelist?: NestingFilter | null;
|
||||||
|
|
||||||
private _title?: TitleContent;
|
@obx private _title?: TitleContent;
|
||||||
|
|
||||||
private _isMinimalRenderUnit?: boolean;
|
private _isMinimalRenderUnit?: boolean;
|
||||||
|
|
||||||
@ -162,6 +162,7 @@ export class ComponentMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(readonly designer: Designer, metadata: ComponentMetadata) {
|
constructor(readonly designer: Designer, metadata: ComponentMetadata) {
|
||||||
|
makeObservable(this);
|
||||||
this.parseMetadata(metadata);
|
this.parseMetadata(metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ hotkey.bind(['command+z', 'ctrl+z'], (e) => {
|
|||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const selection = focusing.focusDesigner?.currentSelection;
|
const selection = focusing.focusDesigner?.currentSelection;
|
||||||
const curSelected = Array.from(selection?.selected!);
|
const curSelected = Array.from(selection?.selected || []);
|
||||||
his.back();
|
his.back();
|
||||||
selection?.selectAll(curSelected);
|
selection?.selectAll(curSelected);
|
||||||
});
|
});
|
||||||
@ -193,7 +193,7 @@ hotkey.bind(['command+y', 'ctrl+y', 'command+shift+z'], (e) => {
|
|||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const selection = focusing.focusDesigner?.currentSelection;
|
const selection = focusing.focusDesigner?.currentSelection;
|
||||||
const curSelected = Array.from(selection?.selected!);
|
const curSelected = Array.from(selection?.selected || []);
|
||||||
his.forward();
|
his.forward();
|
||||||
selection?.selectAll(curSelected);
|
selection?.selectAll(curSelected);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
//opacity: 0.9;
|
|
||||||
box-shadow: 0 0 6px grey;
|
box-shadow: 0 0 6px grey;
|
||||||
transform: translate(-10%, -50%);
|
transform: translate(-10%, -50%);
|
||||||
.lc-ghost {
|
.lc-ghost {
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import { Node, DocumentModel } from '../document';
|
|||||||
import { ISimulatorHost, isSimulatorHost, NodeInstance, ComponentInstance } from '../simulator';
|
import { ISimulatorHost, isSimulatorHost, NodeInstance, ComponentInstance } from '../simulator';
|
||||||
import { Designer } from './designer';
|
import { Designer } from './designer';
|
||||||
|
|
||||||
|
export type DragObjectReducer = (dragObject: DragObject) => DragObject;
|
||||||
|
|
||||||
export interface LocateEvent {
|
export interface LocateEvent {
|
||||||
readonly type: 'LocateEvent';
|
readonly type: 'LocateEvent';
|
||||||
/**
|
/**
|
||||||
@ -193,7 +195,7 @@ function isDragEvent(e: any): e is DragEvent {
|
|||||||
*/
|
*/
|
||||||
export class Dragon {
|
export class Dragon {
|
||||||
private sensors: ISensor[] = [];
|
private sensors: ISensor[] = [];
|
||||||
|
private dragObjectTransducers: DragObjectReducer[] = [];
|
||||||
/**
|
/**
|
||||||
* current active sensor, 可用于感应区高亮
|
* current active sensor, 可用于感应区高亮
|
||||||
*/
|
*/
|
||||||
@ -243,16 +245,41 @@ export class Dragon {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* change dragObject 对外暴露的拖拽对象处理方法
|
||||||
|
*
|
||||||
|
* @param fn 拖拽对象处理函数
|
||||||
|
*/
|
||||||
|
addDragObjectReducer(fn: DragObjectReducer) {
|
||||||
|
this.dragObjectTransducers.push(fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
transformDragObject(dragObject: DragObject) {
|
||||||
|
if (!this.dragObjectTransducers?.length) {
|
||||||
|
return dragObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.dragObjectTransducers.reduce((preDragObject, reducer) => {
|
||||||
|
try {
|
||||||
|
return reducer(preDragObject);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(e);
|
||||||
|
return preDragObject;
|
||||||
|
}
|
||||||
|
}, dragObject);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* boost your dragObject for dragging(flying) 发射拖拽对象
|
* boost your dragObject for dragging(flying) 发射拖拽对象
|
||||||
*
|
*
|
||||||
* @param dragObject 拖拽对象
|
* @param dragObject 拖拽对象
|
||||||
* @param boostEvent 拖拽初始时事件
|
* @param boostEvent 拖拽初始时事件
|
||||||
*/
|
*/
|
||||||
boost(dragObject: DragObject, boostEvent: MouseEvent | DragEvent, fromRglNode?: Node) {
|
boost(dragObjectWrap: DragObject, boostEvent: MouseEvent | DragEvent, fromRglNode?: Node) {
|
||||||
const { designer } = this;
|
const { designer } = this;
|
||||||
const masterSensors = this.getMasterSensors();
|
const masterSensors = this.getMasterSensors();
|
||||||
const handleEvents = makeEventsHandler(boostEvent, masterSensors);
|
const handleEvents = makeEventsHandler(boostEvent, masterSensors);
|
||||||
|
const dragObject = this.transformDragObject(dragObjectWrap);
|
||||||
const newBie = !isDragNodeObject(dragObject);
|
const newBie = !isDragNodeObject(dragObject);
|
||||||
const forceCopyState =
|
const forceCopyState =
|
||||||
isDragNodeObject(dragObject) && dragObject.nodes.some((node) => node.isSlot());
|
isDragNodeObject(dragObject) && dragObject.nodes.some((node) => node.isSlot());
|
||||||
|
|||||||
@ -78,6 +78,9 @@ export function isRowContainer(container: Element | Text, win?: Window) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (/grid$/.test(display)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
|||||||
return this._config;
|
return this._config;
|
||||||
}
|
}
|
||||||
|
|
||||||
private initItems(items: Array<FieldConfig | CustomView>, settingFieldCollector?: { (name: string | number, field: SettingField): void; (name: string, field: SettingField): void; }) {
|
private initItems(items: Array<FieldConfig | CustomView>, settingFieldCollector?: { (name: string | number, field: SettingField): void; (name: string, field: SettingField): void }) {
|
||||||
this._items = items.map((item) => {
|
this._items = items.map((item) => {
|
||||||
if (isCustomView(item)) {
|
if (isCustomView(item)) {
|
||||||
return item;
|
return item;
|
||||||
|
|||||||
@ -292,7 +292,7 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyValueChange(oldValue: any, newValue:any) {
|
notifyValueChange(oldValue: any, newValue: any) {
|
||||||
this.editor.emit(GlobalEvent.Node.Prop.Change, { node: this.getNode(), prop: this, oldValue, newValue });
|
this.editor.emit(GlobalEvent.Node.Prop.Change, { node: this.getNode(), prop: this, oldValue, newValue });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export class DocumentModel {
|
|||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
private _addons: Array<{ name: string, exportData: any }> = [];
|
private _addons: Array<{ name: string; exportData: any }> = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模拟器
|
* 模拟器
|
||||||
@ -634,7 +634,7 @@ export class DocumentModel {
|
|||||||
) {
|
) {
|
||||||
let visitorResult = {};
|
let visitorResult = {};
|
||||||
if (!visitorName) {
|
if (!visitorName) {
|
||||||
/* tslint:disable no-console */
|
/* eslint-disable-next-line no-console */
|
||||||
console.warn('Invalid or empty RootNodeVisitor name.');
|
console.warn('Invalid or empty RootNodeVisitor name.');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -656,6 +656,7 @@ export class DocumentModel {
|
|||||||
const exsitingMap: { [componentName: string]: boolean } = {};
|
const exsitingMap: { [componentName: string]: boolean } = {};
|
||||||
for (const node of this._nodesMap.values()) {
|
for (const node of this._nodesMap.values()) {
|
||||||
const { componentName } = node || {};
|
const { componentName } = node || {};
|
||||||
|
if (componentName === 'Slot') continue;
|
||||||
if (!exsitingMap[componentName]) {
|
if (!exsitingMap[componentName]) {
|
||||||
exsitingMap[componentName] = true;
|
exsitingMap[componentName] = true;
|
||||||
if (node.componentMeta?.npm?.package) {
|
if (node.componentMeta?.npm?.package) {
|
||||||
|
|||||||
@ -933,7 +933,7 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
|||||||
return this.props;
|
return this.props;
|
||||||
}
|
}
|
||||||
|
|
||||||
onChildrenChange(fn: (param?: { type: string, node: Node }) => void): (() => void) | undefined {
|
onChildrenChange(fn: (param?: { type: string; node: Node }) => void): (() => void) | undefined {
|
||||||
const wrappedFunc = wrapWithEventSwitch(fn);
|
const wrappedFunc = wrapWithEventSwitch(fn);
|
||||||
return this.children?.onChange(wrappedFunc);
|
return this.children?.onChange(wrappedFunc);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { TransformStage } from '../transform-stage';
|
|||||||
|
|
||||||
const { set: mobxSet, isObservableArray } = mobx;
|
const { set: mobxSet, isObservableArray } = mobx;
|
||||||
export const UNSET = Symbol.for('unset');
|
export const UNSET = Symbol.for('unset');
|
||||||
|
// eslint-disable-next-line no-redeclare
|
||||||
export type UNSET = typeof UNSET;
|
export type UNSET = typeof UNSET;
|
||||||
|
|
||||||
export interface IPropParent {
|
export interface IPropParent {
|
||||||
@ -381,10 +382,11 @@ export class Prop implements IPropParent {
|
|||||||
@computed private get items(): Prop[] | null {
|
@computed private get items(): Prop[] | null {
|
||||||
if (this._items) return this._items;
|
if (this._items) return this._items;
|
||||||
return runInAction(() => {
|
return runInAction(() => {
|
||||||
let items: Prop[] | null = [];
|
let items: Prop[] | null = null;
|
||||||
if (this._type === 'list') {
|
if (this._type === 'list') {
|
||||||
const data = this._value;
|
const data = this._value;
|
||||||
for (const item of data) {
|
for (const item of data) {
|
||||||
|
items = items || [];
|
||||||
items.push(new Prop(this, item));
|
items.push(new Prop(this, item));
|
||||||
}
|
}
|
||||||
this._maps = null;
|
this._maps = null;
|
||||||
@ -394,6 +396,7 @@ export class Prop implements IPropParent {
|
|||||||
const keys = Object.keys(data);
|
const keys = Object.keys(data);
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
const prop = new Prop(this, data[key], key);
|
const prop = new Prop(this, data[key], key);
|
||||||
|
items = items || [];
|
||||||
items.push(prop);
|
items.push(prop);
|
||||||
maps.set(key, prop);
|
maps.set(key, prop);
|
||||||
}
|
}
|
||||||
@ -526,7 +529,8 @@ export class Prop implements IPropParent {
|
|||||||
this.setValue([]);
|
this.setValue([]);
|
||||||
}
|
}
|
||||||
const prop = new Prop(this, value);
|
const prop = new Prop(this, value);
|
||||||
this.items!.push(prop);
|
this._items = this._items || [];
|
||||||
|
this._items.push(prop);
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { BuiltinSimulatorRenderer } from './builtin-simulator/renderer';
|
|||||||
import { Node, ParentalNode } from './document';
|
import { Node, ParentalNode } from './document';
|
||||||
|
|
||||||
export type AutoFit = '100%';
|
export type AutoFit = '100%';
|
||||||
|
// eslint-disable-next-line no-redeclare
|
||||||
export const AutoFit = '100%';
|
export const AutoFit = '100%';
|
||||||
|
|
||||||
export interface IViewport extends IScrollable {
|
export interface IViewport extends IScrollable {
|
||||||
|
|||||||
@ -2,6 +2,6 @@ import Logger, { Level } from 'zen-logger';
|
|||||||
|
|
||||||
export { Logger };
|
export { Logger };
|
||||||
|
|
||||||
export function getLogger(config: { level: Level, bizName: string }): Logger {
|
export function getLogger(config: { level: Level; bizName: string }): Logger {
|
||||||
return new Logger(config);
|
return new Logger(config);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,6 +79,7 @@ Object {
|
|||||||
"__slot__extraContent": false,
|
"__slot__extraContent": false,
|
||||||
"__slot__logo": false,
|
"__slot__logo": false,
|
||||||
"__slot__tab": false,
|
"__slot__tab": false,
|
||||||
|
"__style__": Object {},
|
||||||
"action": "",
|
"action": "",
|
||||||
"content": "",
|
"content": "",
|
||||||
"crumb": "",
|
"crumb": "",
|
||||||
@ -94,6 +95,7 @@ Object {
|
|||||||
"condition": true,
|
"condition": true,
|
||||||
"id": "node_k1ow3cbf",
|
"id": "node_k1ow3cbf",
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"behavior": "NORMAL",
|
"behavior": "NORMAL",
|
||||||
"content": Object {
|
"content": Object {
|
||||||
"en_US": "Title",
|
"en_US": "Title",
|
||||||
@ -142,6 +144,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -219,6 +222,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -292,6 +296,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -364,6 +369,7 @@ Object {
|
|||||||
"id": "node_k1ow3cbx",
|
"id": "node_k1ow3cbx",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"colSpan": "",
|
"colSpan": "",
|
||||||
"fieldId": "column_k1p1bnjm",
|
"fieldId": "column_k1p1bnjm",
|
||||||
},
|
},
|
||||||
@ -380,6 +386,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -453,6 +460,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"behavior": "NORMAL",
|
"behavior": "NORMAL",
|
||||||
@ -545,6 +553,7 @@ Object {
|
|||||||
"id": "node_k1ow3cby",
|
"id": "node_k1ow3cby",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"colSpan": "",
|
"colSpan": "",
|
||||||
"fieldId": "column_k1p1bnjn",
|
"fieldId": "column_k1p1bnjn",
|
||||||
},
|
},
|
||||||
@ -558,6 +567,7 @@ Object {
|
|||||||
"id": "node_k1ow3cbw",
|
"id": "node_k1ow3cbw",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"columnGap": "20",
|
"columnGap": "20",
|
||||||
"fieldId": "columns_k1ow3h1v",
|
"fieldId": "columns_k1ow3h1v",
|
||||||
"layout": "6:6",
|
"layout": "6:6",
|
||||||
@ -628,6 +638,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -705,6 +716,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -777,6 +789,7 @@ Object {
|
|||||||
"id": "node_k1ow3cc6",
|
"id": "node_k1ow3cc6",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"colSpan": "",
|
"colSpan": "",
|
||||||
"fieldId": "column_k1p1bnjo",
|
"fieldId": "column_k1p1bnjo",
|
||||||
},
|
},
|
||||||
@ -793,6 +806,7 @@ Object {
|
|||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"__category__": "form",
|
"__category__": "form",
|
||||||
|
"__style__": Object {},
|
||||||
"__useMediator": "value",
|
"__useMediator": "value",
|
||||||
"addonAfter": Object {
|
"addonAfter": Object {
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
@ -865,6 +879,7 @@ Object {
|
|||||||
"id": "node_k1ow3cc7",
|
"id": "node_k1ow3cc7",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"colSpan": "",
|
"colSpan": "",
|
||||||
"fieldId": "column_k1p1bnjp",
|
"fieldId": "column_k1p1bnjp",
|
||||||
},
|
},
|
||||||
@ -878,6 +893,7 @@ Object {
|
|||||||
"id": "node_k1ow3cc5",
|
"id": "node_k1ow3cc5",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"columnGap": "20",
|
"columnGap": "20",
|
||||||
"fieldId": "columns_k1ow3h22",
|
"fieldId": "columns_k1ow3h22",
|
||||||
"layout": "6:6",
|
"layout": "6:6",
|
||||||
@ -1006,6 +1022,7 @@ Object {
|
|||||||
"value": Array [
|
"value": Array [
|
||||||
Object {
|
Object {
|
||||||
"componentName": "Text",
|
"componentName": "Text",
|
||||||
|
"props": Object {},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -1035,6 +1052,7 @@ Object {
|
|||||||
"behavior": "NORMAL",
|
"behavior": "NORMAL",
|
||||||
"className": "div_kgaqfbm9",
|
"className": "div_kgaqfbm9",
|
||||||
"customClassName": "",
|
"customClassName": "",
|
||||||
|
"events": Object {},
|
||||||
"fieldId": "div_k1ow3h1o",
|
"fieldId": "div_k1ow3h1o",
|
||||||
"useFieldIdAsDomId": false,
|
"useFieldIdAsDomId": false,
|
||||||
},
|
},
|
||||||
@ -1049,6 +1067,7 @@ Object {
|
|||||||
"id": "form",
|
"id": "form",
|
||||||
"isLocked": false,
|
"isLocked": false,
|
||||||
"props": Object {
|
"props": Object {
|
||||||
|
"__style__": Object {},
|
||||||
"autoUnmount": true,
|
"autoUnmount": true,
|
||||||
"autoValidate": true,
|
"autoValidate": true,
|
||||||
"behavior": "NORMAL",
|
"behavior": "NORMAL",
|
||||||
@ -1057,6 +1076,7 @@ Object {
|
|||||||
"variable": "state.formData",
|
"variable": "state.formData",
|
||||||
},
|
},
|
||||||
"fieldId": "form",
|
"fieldId": "form",
|
||||||
|
"fieldOptions": Object {},
|
||||||
"labelAlign": "top",
|
"labelAlign": "top",
|
||||||
"obj": Object {
|
"obj": Object {
|
||||||
"a": 1,
|
"a": 1,
|
||||||
@ -1117,6 +1137,7 @@ Object {
|
|||||||
"globalConfig": Object {
|
"globalConfig": Object {
|
||||||
"fit": Object {
|
"fit": Object {
|
||||||
"compiled": "",
|
"compiled": "",
|
||||||
|
"error": Object {},
|
||||||
"source": "",
|
"source": "",
|
||||||
"type": "js",
|
"type": "js",
|
||||||
},
|
},
|
||||||
@ -1175,6 +1196,7 @@ Object.keys(module.exports).forEach(function(item) {
|
|||||||
},
|
},
|
||||||
"props": Object {
|
"props": Object {
|
||||||
"className": "page_kgaqfbm4",
|
"className": "page_kgaqfbm4",
|
||||||
|
"containerStyle": Object {},
|
||||||
"extensions": Object {
|
"extensions": Object {
|
||||||
"启用页头": true,
|
"启用页头": true,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -247,6 +247,8 @@ describe('Prop 类测试', () => {
|
|||||||
type: 'JSExpression',
|
type: 'JSExpression',
|
||||||
value: 'state.a',
|
value: 'state.a',
|
||||||
},
|
},
|
||||||
|
emptyArr: [],
|
||||||
|
emptyObj: {},
|
||||||
z: {
|
z: {
|
||||||
z1: 1,
|
z1: 1,
|
||||||
z2: 'str',
|
z2: 'str',
|
||||||
@ -258,7 +260,7 @@ describe('Prop 类测试', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('items / get', async () => {
|
it('items / get', async () => {
|
||||||
expect(prop.size).toBe(5);
|
expect(prop.size).toBe(7);
|
||||||
|
|
||||||
expect(prop.get('a').getValue()).toBe(1);
|
expect(prop.get('a').getValue()).toBe(1);
|
||||||
expect(prop.get('b').getValue()).toBe('str');
|
expect(prop.get('b').getValue()).toBe('str');
|
||||||
@ -289,6 +291,10 @@ describe('Prop 类测试', () => {
|
|||||||
const newlyCreatedNestedProp2 = prop.get('m.m2', true);
|
const newlyCreatedNestedProp2 = prop.get('m.m2', true);
|
||||||
// .m2 的值为 undefined,导出时将会被移除
|
// .m2 的值为 undefined,导出时将会被移除
|
||||||
expect(prop.get('m').getValue()).toEqual({ m1: 'newlyCreatedNestedProp' });
|
expect(prop.get('m').getValue()).toEqual({ m1: 'newlyCreatedNestedProp' });
|
||||||
|
|
||||||
|
// 对于空值的 list / map 类型,_items 应该为 null
|
||||||
|
expect(prop.get('emptyArr')._items).toBeNull();
|
||||||
|
expect(prop.get('emptyObj')._items).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('export', () => {
|
it('export', () => {
|
||||||
@ -300,6 +306,8 @@ describe('Prop 类测试', () => {
|
|||||||
type: 'JSExpression',
|
type: 'JSExpression',
|
||||||
value: 'state.a',
|
value: 'state.a',
|
||||||
},
|
},
|
||||||
|
emptyArr: [],
|
||||||
|
emptyObj: {},
|
||||||
z: {
|
z: {
|
||||||
z1: 1,
|
z1: 1,
|
||||||
z2: 'str',
|
z2: 'str',
|
||||||
@ -348,19 +356,19 @@ describe('Prop 类测试', () => {
|
|||||||
for (const item of prop) {
|
for (const item of prop) {
|
||||||
mockedFn();
|
mockedFn();
|
||||||
}
|
}
|
||||||
expect(mockedFn).toHaveBeenCalledTimes(5);
|
expect(mockedFn).toHaveBeenCalledTimes(7);
|
||||||
mockedFn.mockClear();
|
mockedFn.mockClear();
|
||||||
|
|
||||||
prop.forEach((item) => {
|
prop.forEach((item) => {
|
||||||
mockedFn();
|
mockedFn();
|
||||||
});
|
});
|
||||||
expect(mockedFn).toHaveBeenCalledTimes(5);
|
expect(mockedFn).toHaveBeenCalledTimes(7);
|
||||||
mockedFn.mockClear();
|
mockedFn.mockClear();
|
||||||
|
|
||||||
prop.map((item) => {
|
prop.map((item) => {
|
||||||
return mockedFn();
|
return mockedFn();
|
||||||
});
|
});
|
||||||
expect(mockedFn).toHaveBeenCalledTimes(5);
|
expect(mockedFn).toHaveBeenCalledTimes(7);
|
||||||
mockedFn.mockClear();
|
mockedFn.mockClear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-editor-core",
|
"name": "@ali/lowcode-editor-core",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"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.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-editor-skeleton",
|
"name": "@ali/lowcode-editor-skeleton",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"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",
|
||||||
@ -17,10 +17,10 @@
|
|||||||
"editor"
|
"editor"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.74",
|
"@ali/lowcode-designer": "1.0.76",
|
||||||
"@ali/lowcode-editor-core": "1.0.74",
|
"@ali/lowcode-editor-core": "1.0.76",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"@alifd/next": "^1.20.12",
|
"@alifd/next": "^1.20.12",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-engine",
|
"name": "@ali/lowcode-engine",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"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,13 +18,13 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.74",
|
"@ali/lowcode-designer": "1.0.76",
|
||||||
"@ali/lowcode-editor-core": "1.0.74",
|
"@ali/lowcode-editor-core": "1.0.76",
|
||||||
"@ali/lowcode-editor-skeleton": "1.0.74",
|
"@ali/lowcode-editor-skeleton": "1.0.76",
|
||||||
"@ali/lowcode-engine-ext": "^1.0.0",
|
"@ali/lowcode-engine-ext": "^1.0.0",
|
||||||
"@ali/lowcode-plugin-designer": "1.0.74",
|
"@ali/lowcode-plugin-designer": "1.0.76",
|
||||||
"@ali/lowcode-plugin-outline-pane": "1.0.74",
|
"@ali/lowcode-plugin-outline-pane": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"@alifd/next": "^1.19.12",
|
"@alifd/next": "^1.19.12",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-ignitor",
|
"name": "@ali/lowcode-ignitor",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "点火器,bootstrap lce project",
|
"description": "点火器,bootstrap lce project",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-plugin-designer",
|
"name": "@ali/lowcode-plugin-designer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "alibaba lowcode editor designer plugin",
|
"description": "alibaba lowcode editor designer plugin",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -18,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"author": "xiayang.xy",
|
"author": "xiayang.xy",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-editor-core": "1.0.74",
|
"@ali/lowcode-editor-core": "1.0.76",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-plugin-outline-pane",
|
"name": "@ali/lowcode-plugin-outline-pane",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "Outline pane for Ali lowCode engine",
|
"description": "Outline pane for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -12,10 +12,10 @@
|
|||||||
"build": "build-scripts build --skip-demo"
|
"build": "build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.74",
|
"@ali/lowcode-designer": "1.0.76",
|
||||||
"@ali/lowcode-editor-core": "1.0.74",
|
"@ali/lowcode-editor-core": "1.0.76",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
|
|||||||
@ -11,7 +11,7 @@ export default class TreeNode {
|
|||||||
/**
|
/**
|
||||||
* 是否可以展开
|
* 是否可以展开
|
||||||
*/
|
*/
|
||||||
@computed get expandable(): boolean {
|
get expandable(): boolean {
|
||||||
if (this.locked) return false;
|
if (this.locked) return false;
|
||||||
return this.hasChildren() || this.hasSlots() || this.dropDetail?.index != null;
|
return this.hasChildren() || this.hasSlots() || this.dropDetail?.index != null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-rax-renderer",
|
"name": "@ali/lowcode-rax-renderer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "Rax renderer for Ali lowCode engine",
|
"description": "Rax renderer for Ali lowCode engine",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -30,8 +30,8 @@
|
|||||||
"build": "build-scripts build"
|
"build": "build-scripts build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-renderer-core": "1.0.74",
|
"@ali/lowcode-renderer-core": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"rax-find-dom-node": "^1.0.1"
|
"rax-find-dom-node": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-rax-simulator-renderer",
|
"name": "@ali/lowcode-rax-simulator-renderer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"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",
|
||||||
@ -11,10 +11,10 @@
|
|||||||
"cloud-build": "build-scripts build --skip-demo"
|
"cloud-build": "build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.74",
|
"@ali/lowcode-designer": "1.0.76",
|
||||||
"@ali/lowcode-rax-renderer": "1.0.74",
|
"@ali/lowcode-rax-renderer": "1.0.76",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"driver-universal": "^3.1.3",
|
"driver-universal": "^3.1.3",
|
||||||
"history": "^5.0.0",
|
"history": "^5.0.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-react-renderer",
|
"name": "@ali/lowcode-react-renderer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"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.74",
|
"@ali/lowcode-renderer-core": "1.0.76",
|
||||||
"@alifd/next": "^1.21.16"
|
"@alifd/next": "^1.21.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-react-simulator-renderer",
|
"name": "@ali/lowcode-react-simulator-renderer",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "react simulator renderer for alibaba lowcode designer",
|
"description": "react simulator renderer for alibaba lowcode designer",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -13,10 +13,10 @@
|
|||||||
"cloud-build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo"
|
"cloud-build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-designer": "1.0.74",
|
"@ali/lowcode-designer": "1.0.76",
|
||||||
"@ali/lowcode-react-renderer": "1.0.74",
|
"@ali/lowcode-react-renderer": "1.0.76",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"mobx": "^6.3.0",
|
"mobx": "^6.3.0",
|
||||||
"mobx-react": "^7.2.0",
|
"mobx-react": "^7.2.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-renderer-core",
|
"name": "@ali/lowcode-renderer-core",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "renderer core",
|
"description": "renderer core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@ -17,8 +17,8 @@
|
|||||||
"@ali/bzb-request": "^2.6.0-beta.13",
|
"@ali/bzb-request": "^2.6.0-beta.13",
|
||||||
"@ali/lib-mtop": "^2.5.1",
|
"@ali/lib-mtop": "^2.5.1",
|
||||||
"@ali/lowcode-datasource-engine": "^1.0.22",
|
"@ali/lowcode-datasource-engine": "^1.0.22",
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@ali/lowcode-utils": "1.0.74",
|
"@ali/lowcode-utils": "1.0.76",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"fetch-jsonp": "^1.1.3",
|
"fetch-jsonp": "^1.1.3",
|
||||||
|
|||||||
@ -218,6 +218,8 @@ export function leafWrapper(Comp: types.IBaseRenderer, {
|
|||||||
nodeChildren: null,
|
nodeChildren: null,
|
||||||
childrenInState: false,
|
childrenInState: false,
|
||||||
visible: !hidden,
|
visible: !hidden,
|
||||||
|
nodeCacheProps: {},
|
||||||
|
nodeProps: {},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,11 +351,11 @@ export function leafWrapper(Comp: types.IBaseRenderer, {
|
|||||||
this.curEventLeaf = _leaf;
|
this.curEventLeaf = _leaf;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
const {
|
||||||
nodeChildren: null,
|
visible,
|
||||||
nodeProps: {},
|
...resetState
|
||||||
childrenInState: false,
|
} = this.defaultState;
|
||||||
});
|
this.setState(resetState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 监听参数变化 */
|
/** 监听参数变化 */
|
||||||
@ -378,23 +380,22 @@ export function leafWrapper(Comp: types.IBaseRenderer, {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.beforeRender(RerenderType.PropsChanged);
|
this.beforeRender(RerenderType.PropsChanged);
|
||||||
|
const state = this.state;
|
||||||
|
const nodeCacheProps = state.nodeCacheProps;
|
||||||
const nodeProps = getProps(node?.export?.(TransformStage.Render) as types.ISchema, scope, Comp, componentInfo);
|
const nodeProps = getProps(node?.export?.(TransformStage.Render) as types.ISchema, scope, Comp, componentInfo);
|
||||||
const preNodeProps = this.state.nodeProps;
|
if (key && !(key in nodeProps) && (key in this.props)) {
|
||||||
const newNodeProps = {
|
|
||||||
...preNodeProps,
|
|
||||||
...nodeProps,
|
|
||||||
};
|
|
||||||
if (key && !(key in newNodeProps) && (key in this.props)) {
|
|
||||||
// 当 key 在 this.props 中时,且不存在在计算值中,需要用 newValue 覆盖掉 this.props 的取值
|
// 当 key 在 this.props 中时,且不存在在计算值中,需要用 newValue 覆盖掉 this.props 的取值
|
||||||
newNodeProps[key] = newValue;
|
nodeCacheProps[key] = newValue;
|
||||||
}
|
}
|
||||||
__debug(`${leaf?.componentName}[${this.props.componentId}] component trigger onPropsChange!`, newNodeProps);
|
__debug(`${leaf?.componentName}[${this.props.componentId}] component trigger onPropsChange!`, nodeProps, nodeCacheProps, key, newValue);
|
||||||
this.setState('children' in nodeProps ? {
|
this.setState('children' in nodeProps ? {
|
||||||
nodeChildren: nodeProps.children,
|
nodeChildren: nodeProps.children,
|
||||||
nodeProps: newNodeProps,
|
nodeProps,
|
||||||
childrenInState: true,
|
childrenInState: true,
|
||||||
|
nodeCacheProps,
|
||||||
} : {
|
} : {
|
||||||
nodeProps: newNodeProps,
|
nodeProps,
|
||||||
|
nodeCacheProps,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -497,6 +498,7 @@ export function leafWrapper(Comp: types.IBaseRenderer, {
|
|||||||
|
|
||||||
const compProps = {
|
const compProps = {
|
||||||
...rest,
|
...rest,
|
||||||
|
...(this.state.nodeCacheProps || {}),
|
||||||
...(this.state.nodeProps || {}),
|
...(this.state.nodeProps || {}),
|
||||||
children: [],
|
children: [],
|
||||||
__id: this.props.componentId,
|
__id: this.props.componentId,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-types",
|
"name": "@ali/lowcode-types",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "Types for Ali lowCode engine",
|
"description": "Types for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ali/lowcode-utils",
|
"name": "@ali/lowcode-utils",
|
||||||
"version": "1.0.74",
|
"version": "1.0.76",
|
||||||
"description": "Utils for Ali lowCode engine",
|
"description": "Utils for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"build": "build-scripts build --skip-demo"
|
"build": "build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ali/lowcode-types": "1.0.74",
|
"@ali/lowcode-types": "1.0.76",
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"react": "^16"
|
"react": "^16"
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
TODO
|
|
||||||
---
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "lib"
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"./src/"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
[
|
|
||||||
"build-plugin-component"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@ali/lowcode-engine-",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"description": "xxx for Ali lowCode engine",
|
|
||||||
"main": "lib/index.js",
|
|
||||||
"files": [
|
|
||||||
"lib"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc",
|
|
||||||
"test": "ava",
|
|
||||||
"test:snapshot": "ava --update-snapshots"
|
|
||||||
},
|
|
||||||
"ava": {
|
|
||||||
"compileEnhancements": false,
|
|
||||||
"snapshotDir": "test/fixtures/__snapshots__",
|
|
||||||
"extensions": [
|
|
||||||
"ts"
|
|
||||||
],
|
|
||||||
"require": [
|
|
||||||
"ts-node/register"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"license": "MIT"
|
|
||||||
}
|
|
||||||
0
templates/src/index.d.ts
vendored
0
templates/src/index.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
//
|
|
||||||
// # sourceMappingURL=index.js.map
|
|
||||||
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,EAAE"}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
//
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
import test from 'ava';
|
|
||||||
|
|
||||||
test('foobar', t => {
|
|
||||||
t.pass();
|
|
||||||
});
|
|
||||||
Loading…
x
Reference in New Issue
Block a user