Compare commits

...

4 Commits

Author SHA1 Message Date
JackLian
63d9836915 chore(release): publish 1.1.6-beta.1 2023-04-03 15:01:22 +08:00
liujuping
2b82b3e193 fix: change autorun params to IPublicModelSettingField 2023-04-03 14:59:19 +08:00
liujuping
9b7462b8a4 feat: JSSlot prop export result add id 2023-04-03 14:59:19 +08:00
JackLian
115db19ab4 chore(release): publish 1.1.6-beta.0 2023-03-31 15:16:33 +08:00
24 changed files with 90 additions and 79 deletions

View File

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

View File

@ -17,6 +17,8 @@ const jestConfig = {
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
// testMatch: ['**/document/node/node.add.test.ts'],
// testMatch: ['**/setting-field.test.ts'],
// testMatch: ['**/node.test.ts'],
// testMatch: ['**/builtin-hotkey.test.ts'],
transformIgnorePatterns: [
`/node_modules/(?!${esModules})/`,
],

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-designer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Designer for Ali LowCode Engine",
"main": "lib/index.js",
"module": "es/index.js",
@ -15,9 +15,9 @@
},
"license": "MIT",
"dependencies": {
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"react": "^16",
"react-dom": "^16.7.0",

View File

@ -2,7 +2,7 @@
import { isValidElement } from 'react';
import { IPublicTypeFieldConfig, IPublicTypeSetterConfig } from '@alilc/lowcode-types';
import { isSetterConfig, isDynamicSetter } from '@alilc/lowcode-utils';
import { SettingField } from './setting-field';
import { ISettingField } from './setting-field';
function getHotterFromSetter(setter) {
return setter && (setter.Hotter || (setter.type && setter.type.Hotter)) || []; // eslint-disable-line
@ -35,7 +35,7 @@ export class Transducer {
context: any;
constructor(context: SettingField, config: { setter: IPublicTypeFieldConfig['setter'] }) {
constructor(context: ISettingField, config: { setter: IPublicTypeFieldConfig['setter'] }) {
let { setter } = config;
// 1. validElement

View File

@ -30,7 +30,6 @@ import type { IExclusiveGroup } from './exclusive-group';
import { includeSlot, removeSlot } from '../../utils/slot';
import { foreachReverse } from '../../utils/tree';
import { NodeRemoveOptions, EDITOR_EVENT } from '../../types';
import { Prop as ShellProp } from '@alilc/lowcode-shell';
export interface NodeStatus {
locking: boolean;
@ -432,7 +431,7 @@ export class Node<Schema extends IPublicTypeNodeSchema = IPublicTypeNodeSchema>
}
this.autoruns = autoruns.map((item) => {
return autorun(() => {
item.autorun(ShellProp.create(this.props.get(item.name, true))!);
item.autorun(this.props.getNode().settingEntry.get(item.name)?.internalToShellField());
});
});
}

View File

@ -302,6 +302,7 @@ export class Prop implements IProp, IPropParent {
type: 'JSSlot',
params: schema.params,
value: schema,
id: schema.id,
};
}
return {
@ -310,6 +311,7 @@ export class Prop implements IProp, IPropParent {
value: schema.children,
title: schema.title,
name: schema.name,
id: schema.id,
};
}

View File

@ -1,8 +1,13 @@
// @ts-nocheck
import '../../fixtures/window';
import { set } from '../../utils';
import { Editor } from '@alilc/lowcode-editor-core';
import {
Editor,
globalContext,
Setters as InnerSetters,
} from '@alilc/lowcode-editor-core';
import { Project } from '../../../src/project/project';
import { Workspace as InnerWorkspace } from '@alilc/lowcode-workspace';
import { DocumentModel } from '../../../src/document/document-model';
import {
isRootNode,
@ -23,6 +28,7 @@ import rootContentMetadata from '../../fixtures/component-metadata/root-content'
import rootFooterMetadata from '../../fixtures/component-metadata/root-footer';
import { shellModelFactory } from '../../../../engine/src/modules/shell-model-factory';
import { isNode } from '@alilc/lowcode-utils';
import { Setters } from '@alilc/lowcode-shell';
describe('Node 方法测试', () => {
let editor: Editor;
@ -35,6 +41,9 @@ describe('Node 方法测试', () => {
designer = new Designer({ editor, shellModelFactory });
project = designer.project;
doc = new DocumentModel(project, formSchema);
editor.set('setters', new Setters(new InnerSetters()));
!globalContext.has(Editor) && globalContext.register(editor, Editor);
!globalContext.has('workspace') && globalContext.register(new InnerWorkspace(), 'workspace');
});
afterEach(() => {

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-editor-core",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Core Api for Ali lowCode engine",
"license": "MIT",
"main": "lib/index.js",
@ -14,8 +14,8 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"intl-messageformat": "^9.3.1",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-editor-skeleton",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "alibaba lowcode editor skeleton",
"main": "lib/index.js",
"module": "es/index.js",
@ -18,10 +18,10 @@
],
"dependencies": {
"@alifd/next": "^1.20.12",
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"react": "^16.8.1",
"react-dom": "^16.8.1"

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-engine",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
"main": "lib/engine-core.js",
"module": "es/engine-core.js",
@ -19,15 +19,15 @@
"license": "MIT",
"dependencies": {
"@alifd/next": "^1.19.12",
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-editor-skeleton": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.1",
"@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-designer": "1.1.5",
"@alilc/lowcode-plugin-outline-pane": "1.1.5",
"@alilc/lowcode-shell": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-workspace": "1.1.5",
"@alilc/lowcode-plugin-designer": "1.1.6-beta.1",
"@alilc/lowcode-plugin-outline-pane": "1.1.6-beta.1",
"@alilc/lowcode-shell": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"@alilc/lowcode-workspace": "1.1.6-beta.1",
"react": "^16.8.1",
"react-dom": "^16.8.1"
},

View File

@ -176,10 +176,9 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
if (node?.componentMeta?.isModal) {
return { container: focusNode, ref };
}
const canDropInFn = document.checkNesting;
if (!ref && focusNode && targetNode.contains(focusNode)) {
if (canDropInFn(focusNode, dragNodeObject)) {
if (document.checkNesting(focusNode, dragNodeObject)) {
return { container: focusNode };
}
@ -191,7 +190,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
if (!c.isContainerNode) {
return false;
}
if (canDropInFn(c, dragNodeObject)) {
if (document.checkNesting(c, dragNodeObject)) {
return true;
}
return false;
@ -201,7 +200,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
return { container: dropElement, ref };
}
if (canDropInFn(targetNode, dragNodeObject)) {
if (document.checkNesting(targetNode, dragNodeObject)) {
return { container: targetNode, ref };
}
@ -209,7 +208,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
}
if (targetNode.isContainerNode) {
if (canDropInFn(targetNode, dragNodeObject)) {
if (document.checkNesting(targetNode, dragNodeObject)) {
return { container: targetNode, ref };
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-ignitor",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "点火器bootstrap lce project",
"main": "lib/index.js",
"private": true,

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-plugin-designer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "alibaba lowcode editor designer plugin",
"files": [
"es",
@ -18,9 +18,9 @@
],
"author": "xiayang.xy",
"dependencies": {
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"react": "^16.8.1",
"react-dom": "^16.8.1"
},

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Outline pane for Ali lowCode engine",
"files": [
"es",
@ -13,10 +13,10 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"react": "^16",
"react-dom": "^16.7.0",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-rax-renderer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Rax renderer for Ali lowCode engine",
"main": "lib/index.js",
"module": "es/index.js",
@ -30,8 +30,8 @@
"build": "build-scripts build"
},
"dependencies": {
"@alilc/lowcode-renderer-core": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-renderer-core": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"rax-find-dom-node": "^1.0.1"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-rax-simulator-renderer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "rax simulator renderer for alibaba lowcode designer",
"main": "lib/index.js",
"module": "es/index.js",
@ -13,10 +13,10 @@
"build:umd": "build-scripts build --config build.umd.json"
},
"dependencies": {
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-rax-renderer": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-rax-renderer": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"driver-universal": "^3.1.3",
"history": "^5.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-react-renderer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "react renderer for ali lowcode engine",
"main": "lib/index.js",
"module": "es/index.js",
@ -22,7 +22,7 @@
],
"dependencies": {
"@alifd/next": "^1.21.16",
"@alilc/lowcode-renderer-core": "1.1.5"
"@alilc/lowcode-renderer-core": "1.1.6-beta.1"
},
"devDependencies": {
"@alib/build-scripts": "^0.1.18",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "react simulator renderer for alibaba lowcode designer",
"main": "lib/index.js",
"module": "es/index.js",
@ -17,10 +17,10 @@
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
},
"dependencies": {
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-react-renderer": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-react-renderer": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"mobx": "^6.3.0",
"mobx-react": "^7.2.0",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-renderer-core",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "renderer core",
"license": "MIT",
"main": "lib/index.js",
@ -16,8 +16,8 @@
},
"dependencies": {
"@alilc/lowcode-datasource-engine": "^1.0.0",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"debug": "^4.1.1",
"fetch-jsonp": "^1.1.3",
@ -32,7 +32,7 @@
"devDependencies": {
"@alib/build-scripts": "^0.1.18",
"@alifd/next": "^1.26.0",
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@babel/plugin-transform-typescript": "^7.16.8",
"@testing-library/react": "^11.2.2",
"@types/classnames": "^2.2.11",

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-shell",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js",
"module": "es/index.js",
@ -15,12 +15,12 @@
},
"license": "MIT",
"dependencies": {
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-editor-skeleton": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-workspace": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"@alilc/lowcode-workspace": "1.1.6-beta.1",
"classnames": "^2.2.6",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",

View File

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

View File

@ -1,6 +1,6 @@
import { MouseEvent } from 'react';
import { IPublicTypePropType, IPublicTypeComponentAction } from './';
import { IPublicModelNode, IPublicModelProp, IPublicModelSettingField } from '../model';
import { IPublicModelNode, IPublicModelSettingField } from '../model';
/**
*
@ -102,7 +102,7 @@ export interface IPublicTypeFilterItem {
}
export interface IPublicTypeAutorunItem {
name: string;
autorun: (prop: IPublicModelProp) => any;
autorun: (target: IPublicModelSettingField | null) => any;
}
// thinkof Array

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-utils",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Utils for Ali lowCode engine",
"files": [
"lib",
@ -14,7 +14,7 @@
},
"dependencies": {
"@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-types": "1.1.6-beta.1",
"lodash": "^4.17.21",
"mobx": "^6.3.0",
"react": "^16"

View File

@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-workspace",
"version": "1.1.5",
"version": "1.1.6-beta.1",
"description": "Shell Layer for AliLowCodeEngine",
"main": "lib/index.js",
"module": "es/index.js",
@ -15,11 +15,11 @@
},
"license": "MIT",
"dependencies": {
"@alilc/lowcode-designer": "1.1.5",
"@alilc/lowcode-editor-core": "1.1.5",
"@alilc/lowcode-editor-skeleton": "1.1.5",
"@alilc/lowcode-types": "1.1.5",
"@alilc/lowcode-utils": "1.1.5",
"@alilc/lowcode-designer": "1.1.6-beta.1",
"@alilc/lowcode-editor-core": "1.1.6-beta.1",
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.1",
"@alilc/lowcode-types": "1.1.6-beta.1",
"@alilc/lowcode-utils": "1.1.6-beta.1",
"classnames": "^2.2.6",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",