mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-06-08 08:29:08 +00:00
Compare commits
9 Commits
main
...
v1.1.6-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
616c1e96ba | ||
|
|
0662f088dd | ||
|
|
08dfdd8131 | ||
|
|
85788eeb8d | ||
|
|
5ed7e2b39c | ||
|
|
63d9836915 | ||
|
|
2b82b3e193 | ||
|
|
9b7462b8a4 | ||
|
|
115db19ab4 |
18
.github/workflows/test packages.yml
vendored
18
.github/workflows/test packages.yml
vendored
@ -41,4 +41,20 @@ jobs:
|
|||||||
run: npm i && npm run setup:skip-build
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: cd packages/designer && npm test
|
run: cd packages/designer && npm test
|
||||||
|
|
||||||
|
editor-skeleton:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
run: cd packages/editor-skeleton && npm test
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lerna": "4.0.0",
|
"lerna": "4.0.0",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"packages": [
|
"packages": [
|
||||||
|
|||||||
@ -17,6 +17,8 @@ const jestConfig = {
|
|||||||
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
|
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
|
||||||
// testMatch: ['**/document/node/node.add.test.ts'],
|
// testMatch: ['**/document/node/node.add.test.ts'],
|
||||||
// testMatch: ['**/setting-field.test.ts'],
|
// testMatch: ['**/setting-field.test.ts'],
|
||||||
|
// testMatch: ['**/node.test.ts'],
|
||||||
|
// testMatch: ['**/builtin-hotkey.test.ts'],
|
||||||
transformIgnorePatterns: [
|
transformIgnorePatterns: [
|
||||||
`/node_modules/(?!${esModules})/`,
|
`/node_modules/(?!${esModules})/`,
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-designer",
|
"name": "@alilc/lowcode-designer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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": {
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
"react-dom": "^16.7.0",
|
"react-dom": "^16.7.0",
|
||||||
@ -52,5 +52,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/designer"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import type {
|
|||||||
import { Transducer } from './utils';
|
import { Transducer } from './utils';
|
||||||
import { ISettingPropEntry, SettingPropEntry } from './setting-prop-entry';
|
import { ISettingPropEntry, SettingPropEntry } from './setting-prop-entry';
|
||||||
import { computed, obx, makeObservable, action, untracked, intl } from '@alilc/lowcode-editor-core';
|
import { computed, obx, makeObservable, action, untracked, intl } from '@alilc/lowcode-editor-core';
|
||||||
import { cloneDeep, isCustomView, isDynamicSetter } from '@alilc/lowcode-utils';
|
import { cloneDeep, isCustomView, isDynamicSetter, isJSExpression } from '@alilc/lowcode-utils';
|
||||||
import { ISettingTopEntry } from './setting-top-entry';
|
import { ISettingTopEntry } from './setting-top-entry';
|
||||||
import { IComponentMeta, INode } from '@alilc/lowcode-designer';
|
import { IComponentMeta, INode } from '@alilc/lowcode-designer';
|
||||||
|
|
||||||
@ -38,28 +38,28 @@ export interface ISettingField extends ISettingPropEntry, Omit<IBaseModelSetting
|
|||||||
IComponentMeta,
|
IComponentMeta,
|
||||||
INode
|
INode
|
||||||
>, 'setValue' | 'key' | 'node'> {
|
>, 'setValue' | 'key' | 'node'> {
|
||||||
get items(): Array<ISettingField | IPublicTypeCustomView>;
|
|
||||||
|
|
||||||
get title(): string | ReactNode | undefined;
|
|
||||||
|
|
||||||
readonly isSettingField: true;
|
readonly isSettingField: true;
|
||||||
|
|
||||||
purge(): void;
|
|
||||||
|
|
||||||
extraProps: IPublicTypeFieldExtraProps;
|
|
||||||
|
|
||||||
get setter(): IPublicTypeSetterType | null;
|
|
||||||
|
|
||||||
get expanded(): boolean;
|
|
||||||
|
|
||||||
readonly isRequired: boolean;
|
readonly isRequired: boolean;
|
||||||
|
|
||||||
readonly isGroup: boolean;
|
readonly isGroup: boolean;
|
||||||
|
|
||||||
|
extraProps: IPublicTypeFieldExtraProps;
|
||||||
|
|
||||||
|
get items(): Array<ISettingField | IPublicTypeCustomView>;
|
||||||
|
|
||||||
|
get title(): string | ReactNode | undefined;
|
||||||
|
|
||||||
|
get setter(): IPublicTypeSetterType | null;
|
||||||
|
|
||||||
|
get expanded(): boolean;
|
||||||
|
|
||||||
get valueState(): number;
|
get valueState(): number;
|
||||||
|
|
||||||
setExpanded(value: boolean): void;
|
setExpanded(value: boolean): void;
|
||||||
|
|
||||||
|
purge(): void;
|
||||||
|
|
||||||
setValue(
|
setValue(
|
||||||
val: any,
|
val: any,
|
||||||
isHotValue?: boolean,
|
isHotValue?: boolean,
|
||||||
@ -271,16 +271,29 @@ export class SettingField extends SettingPropEntry implements ISettingField {
|
|||||||
}
|
}
|
||||||
if (this.isUseVariable()) {
|
if (this.isUseVariable()) {
|
||||||
const oldValue = this.getValue();
|
const oldValue = this.getValue();
|
||||||
this.setValue(
|
if (isJSExpression(value)) {
|
||||||
{
|
this.setValue(
|
||||||
type: 'JSExpression',
|
{
|
||||||
value: oldValue.value,
|
type: 'JSExpression',
|
||||||
mock: value,
|
value: value.value,
|
||||||
},
|
mock: oldValue.mock,
|
||||||
false,
|
},
|
||||||
false,
|
false,
|
||||||
options,
|
false,
|
||||||
);
|
options,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.setValue(
|
||||||
|
{
|
||||||
|
type: 'JSExpression',
|
||||||
|
value: oldValue.value,
|
||||||
|
mock: value,
|
||||||
|
},
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setValue(value, false, false, options);
|
this.setValue(value, false, false, options);
|
||||||
}
|
}
|
||||||
@ -297,7 +310,6 @@ export class SettingField extends SettingPropEntry implements ISettingField {
|
|||||||
return this.designer!.autorun(action, true);
|
return this.designer!.autorun(action, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internalToShellField() {
|
internalToShellField() {
|
||||||
return this.designer!.shellModelFactory.createSettingField(this);
|
return this.designer!.shellModelFactory.createSettingField(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { isValidElement } from 'react';
|
import { isValidElement } from 'react';
|
||||||
import { IPublicTypeFieldConfig, IPublicTypeSetterConfig } from '@alilc/lowcode-types';
|
import { IPublicTypeFieldConfig, IPublicTypeSetterConfig } from '@alilc/lowcode-types';
|
||||||
import { isSetterConfig, isDynamicSetter } from '@alilc/lowcode-utils';
|
import { isSetterConfig, isDynamicSetter } from '@alilc/lowcode-utils';
|
||||||
import { SettingField } from './setting-field';
|
import { ISettingField } from './setting-field';
|
||||||
|
|
||||||
function getHotterFromSetter(setter) {
|
function getHotterFromSetter(setter) {
|
||||||
return setter && (setter.Hotter || (setter.type && setter.type.Hotter)) || []; // eslint-disable-line
|
return setter && (setter.Hotter || (setter.type && setter.type.Hotter)) || []; // eslint-disable-line
|
||||||
@ -35,7 +35,7 @@ export class Transducer {
|
|||||||
|
|
||||||
context: any;
|
context: any;
|
||||||
|
|
||||||
constructor(context: SettingField, config: { setter: IPublicTypeFieldConfig['setter'] }) {
|
constructor(context: ISettingField, config: { setter: IPublicTypeFieldConfig['setter'] }) {
|
||||||
let { setter } = config;
|
let { setter } = config;
|
||||||
|
|
||||||
// 1. validElement
|
// 1. validElement
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import type { IExclusiveGroup } from './exclusive-group';
|
|||||||
import { includeSlot, removeSlot } from '../../utils/slot';
|
import { includeSlot, removeSlot } from '../../utils/slot';
|
||||||
import { foreachReverse } from '../../utils/tree';
|
import { foreachReverse } from '../../utils/tree';
|
||||||
import { NodeRemoveOptions, EDITOR_EVENT } from '../../types';
|
import { NodeRemoveOptions, EDITOR_EVENT } from '../../types';
|
||||||
import { Prop as ShellProp } from '@alilc/lowcode-shell';
|
|
||||||
|
|
||||||
export interface NodeStatus {
|
export interface NodeStatus {
|
||||||
locking: boolean;
|
locking: boolean;
|
||||||
@ -432,7 +431,7 @@ export class Node<Schema extends IPublicTypeNodeSchema = IPublicTypeNodeSchema>
|
|||||||
}
|
}
|
||||||
this.autoruns = autoruns.map((item) => {
|
this.autoruns = autoruns.map((item) => {
|
||||||
return autorun(() => {
|
return autorun(() => {
|
||||||
item.autorun(ShellProp.create(this.props.get(item.name, true))!);
|
item.autorun(this.props.getNode().settingEntry.get(item.name)?.internalToShellField());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -302,6 +302,7 @@ export class Prop implements IProp, IPropParent {
|
|||||||
type: 'JSSlot',
|
type: 'JSSlot',
|
||||||
params: schema.params,
|
params: schema.params,
|
||||||
value: schema,
|
value: schema,
|
||||||
|
id: schema.id,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@ -310,6 +311,7 @@ export class Prop implements IProp, IPropParent {
|
|||||||
value: schema.children,
|
value: schema.children,
|
||||||
title: schema.title,
|
title: schema.title,
|
||||||
name: schema.name,
|
name: schema.name,
|
||||||
|
id: schema.id,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -168,6 +168,40 @@ describe('setting-field 测试', () => {
|
|||||||
expect(arrField.getHotValue()).toEqual([undefined, {name: '2'}, {name: '3'}]);
|
expect(arrField.getHotValue()).toEqual([undefined, {name: '2'}, {name: '3'}]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('js expression setValue / setHotValue', () => {
|
||||||
|
const settingEntry = mockNode.settingEntry;
|
||||||
|
const field = settingEntry.get('behavior');
|
||||||
|
|
||||||
|
const subField = field.createField({
|
||||||
|
name: 'sub',
|
||||||
|
title: 'sub',
|
||||||
|
});
|
||||||
|
subField.setValue({
|
||||||
|
type: 'JSExpression',
|
||||||
|
value: 'state.a',
|
||||||
|
mock: 'haha',
|
||||||
|
});
|
||||||
|
|
||||||
|
subField.setHotValue({
|
||||||
|
type: 'JSExpression',
|
||||||
|
value: 'state.b',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(subField.getValue()).toEqual({
|
||||||
|
type: 'JSExpression',
|
||||||
|
value: 'state.b',
|
||||||
|
mock: 'haha',
|
||||||
|
});
|
||||||
|
|
||||||
|
subField.setHotValue('mock02');
|
||||||
|
|
||||||
|
expect(subField.getValue()).toEqual({
|
||||||
|
type: 'JSExpression',
|
||||||
|
value: 'state.b',
|
||||||
|
mock: 'mock02',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('onEffect', async () => {
|
it('onEffect', async () => {
|
||||||
const settingEntry = mockNode.settingEntry as SettingTopEntry;
|
const settingEntry = mockNode.settingEntry as SettingTopEntry;
|
||||||
const field = settingEntry.get('behavior');
|
const field = settingEntry.get('behavior');
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import '../../fixtures/window';
|
import '../../fixtures/window';
|
||||||
import { set } from '../../utils';
|
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 { Project } from '../../../src/project/project';
|
||||||
|
import { Workspace as InnerWorkspace } from '@alilc/lowcode-workspace';
|
||||||
import { DocumentModel } from '../../../src/document/document-model';
|
import { DocumentModel } from '../../../src/document/document-model';
|
||||||
import {
|
import {
|
||||||
isRootNode,
|
isRootNode,
|
||||||
@ -23,6 +28,7 @@ import rootContentMetadata from '../../fixtures/component-metadata/root-content'
|
|||||||
import rootFooterMetadata from '../../fixtures/component-metadata/root-footer';
|
import rootFooterMetadata from '../../fixtures/component-metadata/root-footer';
|
||||||
import { shellModelFactory } from '../../../../engine/src/modules/shell-model-factory';
|
import { shellModelFactory } from '../../../../engine/src/modules/shell-model-factory';
|
||||||
import { isNode } from '@alilc/lowcode-utils';
|
import { isNode } from '@alilc/lowcode-utils';
|
||||||
|
import { Setters } from '@alilc/lowcode-shell';
|
||||||
|
|
||||||
describe('Node 方法测试', () => {
|
describe('Node 方法测试', () => {
|
||||||
let editor: Editor;
|
let editor: Editor;
|
||||||
@ -35,6 +41,9 @@ describe('Node 方法测试', () => {
|
|||||||
designer = new Designer({ editor, shellModelFactory });
|
designer = new Designer({ editor, shellModelFactory });
|
||||||
project = designer.project;
|
project = designer.project;
|
||||||
doc = new DocumentModel(project, formSchema);
|
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(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-editor-core",
|
"name": "@alilc/lowcode-editor-core",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -14,8 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"intl-messageformat": "^9.3.1",
|
"intl-messageformat": "^9.3.1",
|
||||||
@ -47,5 +47,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-core"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
9
packages/editor-skeleton/build.test.json
Normal file
9
packages/editor-skeleton/build.test.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
"build-plugin-component",
|
||||||
|
"@alilc/lowcode-test-mate/plugin/index.ts"
|
||||||
|
],
|
||||||
|
"babelPlugins": [
|
||||||
|
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
|
||||||
|
]
|
||||||
|
}
|
||||||
29
packages/editor-skeleton/jest.config.js
Normal file
29
packages/editor-skeleton/jest.config.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const { join } = require('path');
|
||||||
|
const esModules = [].join('|');
|
||||||
|
const pkgNames = fs.readdirSync(join('..')).filter(pkgName => !pkgName.startsWith('.'));
|
||||||
|
|
||||||
|
const jestConfig = {
|
||||||
|
// transform: {
|
||||||
|
// '^.+\\.[jt]sx?$': 'babel-jest',
|
||||||
|
// // '^.+\\.(ts|tsx)$': 'ts-jest',
|
||||||
|
// // '^.+\\.(js|jsx)$': 'babel-jest',
|
||||||
|
// },
|
||||||
|
transformIgnorePatterns: [
|
||||||
|
`/node_modules/(?!${esModules})/`,
|
||||||
|
],
|
||||||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
||||||
|
collectCoverage: false,
|
||||||
|
collectCoverageFrom: [
|
||||||
|
'src/**/*.ts',
|
||||||
|
'!src/**/*.d.ts',
|
||||||
|
'!**/node_modules/**',
|
||||||
|
'!**/vendor/**',
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 只对本仓库内的 pkg 做 mapping
|
||||||
|
jestConfig.moduleNameMapper = {};
|
||||||
|
jestConfig.moduleNameMapper[`^@alilc/lowcode\\-(${pkgNames.join('|')})$`] = '<rootDir>/../$1/src';
|
||||||
|
|
||||||
|
module.exports = jestConfig;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-editor-skeleton",
|
"name": "@alilc/lowcode-editor-skeleton",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -10,6 +10,7 @@
|
|||||||
"es"
|
"es"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"test": "build-scripts test --config build.test.json",
|
||||||
"build": "build-scripts build --skip-demo"
|
"build": "build-scripts build --skip-demo"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -18,10 +19,10 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.20.12",
|
"@alifd/next": "^1.20.12",
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
@ -41,5 +42,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/editor-skeleton"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export function composeTitle(title?: IPublicTypeTitleContent, icon?: IPublicType
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isTitleConfig(_title) && noIcon) {
|
if (isTitleConfig(_title) && noIcon) {
|
||||||
if (!isValidElement(title)) {
|
if (!isValidElement(_title)) {
|
||||||
_title.icon = undefined;
|
_title.icon = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
54
packages/editor-skeleton/tests/widget/utils.test.ts
Normal file
54
packages/editor-skeleton/tests/widget/utils.test.ts
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import { composeTitle } from '../../src/widget/utils';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
|
const label = React.createElement('div');
|
||||||
|
|
||||||
|
describe('composeTitle 测试', () => {
|
||||||
|
it('基础能力测试', () => {
|
||||||
|
expect(composeTitle(undefined)).toEqual({
|
||||||
|
label: undefined,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle(undefined, undefined, 'tips', true, true)).toEqual({
|
||||||
|
icon: undefined,
|
||||||
|
label: 'tips',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle(undefined, undefined, label, true, true)).toEqual({
|
||||||
|
icon: undefined,
|
||||||
|
label,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle({
|
||||||
|
icon: undefined,
|
||||||
|
label,
|
||||||
|
}, undefined, '')).toEqual({
|
||||||
|
icon: undefined,
|
||||||
|
label,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle('settingsPane')).toEqual('settingsPane');
|
||||||
|
|
||||||
|
expect(composeTitle(label, undefined, '物料面板', true, true)).toEqual({
|
||||||
|
icon: undefined,
|
||||||
|
label,
|
||||||
|
tip: '物料面板',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle(label, undefined, label, true, true)).toEqual({
|
||||||
|
icon: undefined,
|
||||||
|
label,
|
||||||
|
tip: label,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(composeTitle({
|
||||||
|
label: "物料面板",
|
||||||
|
icon: undefined,
|
||||||
|
tip: null,
|
||||||
|
})).toEqual({
|
||||||
|
label: "物料面板",
|
||||||
|
icon: undefined,
|
||||||
|
tip: null,
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine",
|
"name": "@alilc/lowcode-engine",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
|
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
|
||||||
"main": "lib/engine-core.js",
|
"main": "lib/engine-core.js",
|
||||||
"module": "es/engine-core.js",
|
"module": "es/engine-core.js",
|
||||||
@ -19,15 +19,15 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.12",
|
"@alifd/next": "^1.19.12",
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.1.5",
|
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-engine-ext": "^1.0.0",
|
"@alilc/lowcode-engine-ext": "^1.0.0",
|
||||||
"@alilc/lowcode-plugin-designer": "1.1.5",
|
"@alilc/lowcode-plugin-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-plugin-outline-pane": "1.1.5",
|
"@alilc/lowcode-plugin-outline-pane": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-shell": "1.1.5",
|
"@alilc/lowcode-shell": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-workspace": "1.1.5",
|
"@alilc/lowcode-workspace": "1.1.6-beta.4",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
@ -53,5 +53,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/engine"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -176,10 +176,9 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
|
|||||||
if (node?.componentMeta?.isModal) {
|
if (node?.componentMeta?.isModal) {
|
||||||
return { container: focusNode, ref };
|
return { container: focusNode, ref };
|
||||||
}
|
}
|
||||||
const canDropInFn = document.checkNesting;
|
|
||||||
|
|
||||||
if (!ref && focusNode && targetNode.contains(focusNode)) {
|
if (!ref && focusNode && targetNode.contains(focusNode)) {
|
||||||
if (canDropInFn(focusNode, dragNodeObject)) {
|
if (document.checkNesting(focusNode, dragNodeObject)) {
|
||||||
return { container: focusNode };
|
return { container: focusNode };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +190,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
|
|||||||
if (!c.isContainerNode) {
|
if (!c.isContainerNode) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (canDropInFn(c, dragNodeObject)) {
|
if (document.checkNesting(c, dragNodeObject)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -201,7 +200,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
|
|||||||
return { container: dropElement, ref };
|
return { container: dropElement, ref };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canDropInFn(targetNode, dragNodeObject)) {
|
if (document.checkNesting(targetNode, dragNodeObject)) {
|
||||||
return { container: targetNode, ref };
|
return { container: targetNode, ref };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +208,7 @@ function getSuitablePlaceForNode(targetNode: IPublicModelNode, node: IPublicMode
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (targetNode.isContainerNode) {
|
if (targetNode.isContainerNode) {
|
||||||
if (canDropInFn(targetNode, dragNodeObject)) {
|
if (document.checkNesting(targetNode, dragNodeObject)) {
|
||||||
return { container: targetNode, ref };
|
return { container: targetNode, ref };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-ignitor",
|
"name": "@alilc/lowcode-ignitor",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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": "@alilc/lowcode-plugin-designer",
|
"name": "@alilc/lowcode-plugin-designer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "alibaba lowcode editor designer plugin",
|
"description": "alibaba lowcode editor designer plugin",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -18,9 +18,9 @@
|
|||||||
],
|
],
|
||||||
"author": "xiayang.xy",
|
"author": "xiayang.xy",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
"react-dom": "^16.8.1"
|
"react-dom": "^16.8.1"
|
||||||
},
|
},
|
||||||
@ -37,5 +37,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-designer"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-plugin-outline-pane",
|
"name": "@alilc/lowcode-plugin-outline-pane",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "Outline pane for Ali lowCode engine",
|
"description": "Outline pane for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -13,10 +13,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
"react-dom": "^16.7.0",
|
"react-dom": "^16.7.0",
|
||||||
@ -40,5 +40,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-outline-pane"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/plugin-outline-pane"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-rax-renderer",
|
"name": "@alilc/lowcode-rax-renderer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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": {
|
||||||
"@alilc/lowcode-renderer-core": "1.1.5",
|
"@alilc/lowcode-renderer-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"rax-find-dom-node": "^1.0.1"
|
"rax-find-dom-node": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -49,5 +49,5 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-renderer@0.1.2/build/index.html",
|
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-renderer@0.1.2/build/index.html",
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-rax-simulator-renderer",
|
"name": "@alilc/lowcode-rax-simulator-renderer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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 @@
|
|||||||
"build:umd": "build-scripts build --config build.umd.json"
|
"build:umd": "build-scripts build --config build.umd.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-rax-renderer": "1.1.5",
|
"@alilc/lowcode-rax-renderer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -50,5 +50,5 @@
|
|||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-simulator-renderer"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/rax-simulator-renderer"
|
||||||
},
|
},
|
||||||
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-simulator-renderer@1.0.73/build/index.html",
|
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-rax-simulator-renderer@1.0.73/build/index.html",
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-react-renderer",
|
"name": "@alilc/lowcode-react-renderer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -22,7 +22,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.21.16",
|
"@alifd/next": "^1.21.16",
|
||||||
"@alilc/lowcode-renderer-core": "1.1.5"
|
"@alilc/lowcode-renderer-core": "1.1.6-beta.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18",
|
"@alib/build-scripts": "^0.1.18",
|
||||||
@ -42,5 +42,5 @@
|
|||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-renderer"
|
||||||
},
|
},
|
||||||
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-react-renderer@1.0.21/build/index.html",
|
"homepage": "https://unpkg.alibaba-inc.com/@alilc/lowcode-react-renderer@1.0.21/build/index.html",
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-react-simulator-renderer",
|
"name": "@alilc/lowcode-react-simulator-renderer",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -17,10 +17,10 @@
|
|||||||
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
|
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-react-renderer": "1.1.5",
|
"@alilc/lowcode-react-renderer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -43,5 +43,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-simulator-renderer"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/react-simulator-renderer"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-renderer-core",
|
"name": "@alilc/lowcode-renderer-core",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "renderer core",
|
"description": "renderer core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@ -16,8 +16,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-datasource-engine": "^1.0.0",
|
"@alilc/lowcode-datasource-engine": "^1.0.0",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -32,7 +32,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18",
|
"@alib/build-scripts": "^0.1.18",
|
||||||
"@alifd/next": "^1.26.0",
|
"@alifd/next": "^1.26.0",
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@babel/plugin-transform-typescript": "^7.16.8",
|
"@babel/plugin-transform-typescript": "^7.16.8",
|
||||||
"@testing-library/react": "^11.2.2",
|
"@testing-library/react": "^11.2.2",
|
||||||
"@types/classnames": "^2.2.11",
|
"@types/classnames": "^2.2.11",
|
||||||
@ -55,5 +55,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/renderer-core"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-shell",
|
"name": "@alilc/lowcode-shell",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "Shell Layer for AliLowCodeEngine",
|
"description": "Shell Layer for AliLowCodeEngine",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -15,12 +15,12 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.1.5",
|
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-workspace": "1.1.5",
|
"@alilc/lowcode-workspace": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -50,5 +50,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-types",
|
"name": "@alilc/lowcode-types",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "Types for Ali lowCode engine",
|
"description": "Types for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"es",
|
||||||
@ -29,5 +29,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/types"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/types"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { MouseEvent } from 'react';
|
import { MouseEvent } from 'react';
|
||||||
import { IPublicTypePropType, IPublicTypeComponentAction } from './';
|
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 {
|
export interface IPublicTypeAutorunItem {
|
||||||
name: string;
|
name: string;
|
||||||
autorun: (prop: IPublicModelProp) => any;
|
autorun: (target: IPublicModelSettingField | null) => any;
|
||||||
}
|
}
|
||||||
|
|
||||||
// thinkof Array
|
// thinkof Array
|
||||||
|
|||||||
@ -23,6 +23,9 @@ export interface IPublicTypePanelDockConfig extends IPublicTypeWidgetBaseConfig
|
|||||||
panelProps?: IPublicTypePanelDockPanelProps;
|
panelProps?: IPublicTypePanelDockPanelProps;
|
||||||
|
|
||||||
props?: IPublicTypePanelDockProps;
|
props?: IPublicTypePanelDockProps;
|
||||||
|
|
||||||
|
/** 面板 name, 当没有 props.title 时, 会使用 name 作为标题 */
|
||||||
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPublicTypePanelDockProps {
|
export interface IPublicTypePanelDockProps {
|
||||||
@ -32,12 +35,19 @@ export interface IPublicTypePanelDockProps {
|
|||||||
|
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
||||||
|
/** 详细描述,hover 时在标题上方显示的 tips 内容 */
|
||||||
description?: TipContent;
|
description?: TipContent;
|
||||||
|
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面板标题前的 icon
|
||||||
|
*/
|
||||||
icon?: IPublicTypeIconType;
|
icon?: IPublicTypeIconType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面板标题
|
||||||
|
*/
|
||||||
title?: IPublicTypeTitleContent;
|
title?: IPublicTypeTitleContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-utils",
|
"name": "@alilc/lowcode-utils",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "Utils for Ali lowCode engine",
|
"description": "Utils for Ali lowCode engine",
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
@ -14,7 +14,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.16",
|
"@alifd/next": "^1.19.16",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mobx": "^6.3.0",
|
"mobx": "^6.3.0",
|
||||||
"react": "^16"
|
"react": "^16"
|
||||||
@ -32,5 +32,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/utils"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-workspace",
|
"name": "@alilc/lowcode-workspace",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6-beta.4",
|
||||||
"description": "Shell Layer for AliLowCodeEngine",
|
"description": "Shell Layer for AliLowCodeEngine",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
@ -15,11 +15,11 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.1.5",
|
"@alilc/lowcode-designer": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-core": "1.1.5",
|
"@alilc/lowcode-editor-core": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.1.5",
|
"@alilc/lowcode-editor-skeleton": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-types": "1.1.5",
|
"@alilc/lowcode-types": "1.1.6-beta.4",
|
||||||
"@alilc/lowcode-utils": "1.1.5",
|
"@alilc/lowcode-utils": "1.1.6-beta.4",
|
||||||
"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",
|
||||||
@ -49,5 +49,5 @@
|
|||||||
"type": "http",
|
"type": "http",
|
||||||
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
|
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/shell"
|
||||||
},
|
},
|
||||||
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6"
|
"gitHead": "63d9836915774b294db21c2282be53d5f24600ff"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user