mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 10:48:17 +00:00
feat: 将 typings 在顶层导出
refactor: 将 designerHelper 等改成 designerCabin
This commit is contained in:
parent
80f101559f
commit
d2aed7d78d
11
CHANGELOG.md
11
CHANGELOG.md
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 将 typings 在顶层导出 ([9d9b6f4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/9d9b6f4))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"lerna": "2.11.0",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"npmClient": "tyarn",
|
||||
"registry": "http://registry.npm.alibaba-inc.com",
|
||||
"useWorkspaces": true,
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-designer
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-designer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Designer for Ali LowCode Engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -14,9 +14,9 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"classnames": "^2.2.6",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.5",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Editor, Hotkey, hotkey } from '@ali/lowcode-editor-core';
|
||||
import { Skeleton } from '@ali/lowcode-editor-skeleton';
|
||||
import { ILowCodePluginConfig, ILowCodePluginManager, ILowCodePluginContext, IDesignerHelper } from '@ali/lowcode-types';
|
||||
import { ILowCodePluginConfig, ILowCodePluginManager, ILowCodePluginContext, IDesignerCabin, ILowCodePlugin } from '@ali/lowcode-types';
|
||||
import { getLogger, Logger } from '../utils';
|
||||
import {
|
||||
registerMetadataTransducer,
|
||||
@ -16,7 +16,7 @@ export default class PluginContext implements ILowCodePluginContext {
|
||||
hotkey: Hotkey;
|
||||
logger: Logger;
|
||||
plugins: ILowCodePluginManager;
|
||||
designerHelper: IDesignerHelper;
|
||||
designerCabin: IDesignerCabin;
|
||||
|
||||
constructor(editor: Editor, plugins: ILowCodePluginManager) {
|
||||
this.editor = editor;
|
||||
@ -24,10 +24,10 @@ export default class PluginContext implements ILowCodePluginContext {
|
||||
this.skeleton = editor.get('skeleton')!;
|
||||
this.hotkey = hotkey;
|
||||
this.plugins = plugins;
|
||||
this.designerHelper = this.createDesignerHelper();
|
||||
this.designerCabin = this.createDesignerCabin();
|
||||
}
|
||||
|
||||
private createDesignerHelper(): IDesignerHelper {
|
||||
private createDesignerCabin(): IDesignerCabin {
|
||||
return {
|
||||
registerMetadataTransducer,
|
||||
addBuiltinComponentAction,
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-editor-core
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-core",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Core Api for Ali lowCode engine",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
@ -15,8 +15,8 @@
|
||||
"cloud-build": "build-scripts build --skip-demo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"@recore/obx": "^1.0.9",
|
||||
"@recore/obx-react": "^1.0.8",
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-editor-preset-general
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-preset-general",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Ali General Editor Preset",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -14,12 +14,12 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@alifd/next": "^1.19.12",
|
||||
"@alife/theme-lowcode-dark": "^0.1.0",
|
||||
"@alife/theme-lowcode-light": "^0.1.0",
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-editor-preset-vision
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-preset-vision",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Preset Vision for AliLowCode engine",
|
||||
"main": "lib/index.js",
|
||||
"private": true,
|
||||
@ -18,13 +18,13 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-setters": "^1.0.22",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/ve-i18n-util": "^2.0.0",
|
||||
"@ali/ve-icons": "^4.1.9",
|
||||
"@ali/ve-less-variables": "2.0.3",
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 将 typings 在顶层导出 ([9d9b6f4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/9d9b6f4))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-editor-skeleton",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "alibaba lowcode editor skeleton",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -19,10 +19,10 @@
|
||||
"editor"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/ve-icons": "latest",
|
||||
"@ali/ve-less-variables": "^2.0.0",
|
||||
"@alifd/next": "^1.20.12",
|
||||
@ -35,7 +35,7 @@
|
||||
"@alib/build-scripts": "^0.1.3",
|
||||
"@types/react": "^16.9.13",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"build-plugin-component": "^0.2.7-1",
|
||||
"build-plugin-component": "^0.2.7",
|
||||
"build-plugin-fusion": "^0.1.0",
|
||||
"build-plugin-moment-locales": "^0.1.0"
|
||||
},
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 将 typings 在顶层导出 ([9d9b6f4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/9d9b6f4))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"build-plugin-component",
|
||||
{
|
||||
"filename": "engine",
|
||||
"library": "AliLowCodeEngine",
|
||||
"library": "___AliLowCodeEngine___",
|
||||
"libraryTarget": "umd",
|
||||
"externals": {
|
||||
"react": "var window.React",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-engine",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Universal API for AliLowCode engine",
|
||||
"main": "lib/engine.js",
|
||||
"module": "es/engine.js",
|
||||
@ -18,12 +18,12 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-plugin-outline-pane": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/ve-i18n-util": "^2.0.0",
|
||||
"@ali/ve-icons": "^4.1.9",
|
||||
"@ali/ve-less-variables": "2.0.3",
|
||||
|
||||
@ -1,32 +1,41 @@
|
||||
import { createElement } from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { globalContext, Editor } from '@ali/lowcode-editor-core';
|
||||
import builtinSetters from '@ali/lowcode-editor-setters';
|
||||
import { Designer, LiveEditing, TransformStage, Node, getConvertedExtraKey, LowCodePluginManager } from '@ali/lowcode-designer';
|
||||
import Outline, { OutlineBackupPane, getTreeMaster } from '@ali/lowcode-plugin-outline-pane';
|
||||
import * as editorHelper from '@ali/lowcode-editor-core';
|
||||
import * as designerHelper from '@ali/lowcode-designer';
|
||||
import * as skeletonHelper from '@ali/lowcode-editor-skeleton';
|
||||
import DesignerPlugin from '@ali/lowcode-plugin-designer';
|
||||
import * as editorCabin from '@ali/lowcode-editor-core';
|
||||
import {
|
||||
Designer,
|
||||
LowCodePluginManager,
|
||||
} from '@ali/lowcode-designer';
|
||||
import * as designerCabin from '@ali/lowcode-designer';
|
||||
import { Skeleton, SettingsPrimaryPane, registerDefaults } from '@ali/lowcode-editor-skeleton';
|
||||
import { liveEditingRule, liveEditingSaveHander } from './live-editing';
|
||||
import * as skeletonCabin from '@ali/lowcode-editor-skeleton';
|
||||
import Outline, { OutlineBackupPane, getTreeMaster } from '@ali/lowcode-plugin-outline-pane';
|
||||
import DesignerPlugin from '@ali/lowcode-plugin-designer';
|
||||
import builtinSetters from '@ali/lowcode-editor-setters';
|
||||
import './modules/live-editing';
|
||||
|
||||
editorHelper.registerSetter(builtinSetters);
|
||||
export * from './modules/editor-types';
|
||||
export * from './modules/skeleton-types';
|
||||
export * from './modules/designer-types';
|
||||
export * from './modules/lowcode-types';
|
||||
|
||||
const { hotkey, monitor, getSetter, registerSetter } = editorCabin;
|
||||
registerSetter(builtinSetters as any);
|
||||
registerDefaults();
|
||||
|
||||
const editor = new Editor();
|
||||
globalContext.register(editor, Editor);
|
||||
|
||||
const skeleton = new Skeleton(editor);
|
||||
editor.set(Skeleton, skeleton);
|
||||
editor.set('skeleton', skeleton);
|
||||
registerDefaults();
|
||||
editor.set('skeleton' as any, skeleton);
|
||||
|
||||
const designer = new Designer({ editor });
|
||||
editor.set(Designer, designer);
|
||||
editor.set('designer', designer);
|
||||
editor.set('designer' as any, designer);
|
||||
|
||||
const plugins = (new LowCodePluginManager(editor)).toProxy();
|
||||
editor.set('plugins', plugins);
|
||||
const plugins = new LowCodePluginManager(editor).toProxy();
|
||||
editor.set('plugins' as any, plugins);
|
||||
|
||||
skeleton.add({
|
||||
area: 'mainArea',
|
||||
@ -65,8 +74,7 @@ skeleton.add({
|
||||
});
|
||||
|
||||
const { project, currentSelection: selection } = designer;
|
||||
const { hotkey, monitor, getSetter, registerSetter } = editorHelper;
|
||||
const { Workbench } = skeletonHelper;
|
||||
const { Workbench } = skeletonCabin;
|
||||
const setters = {
|
||||
getSetter,
|
||||
registerSetter,
|
||||
@ -74,11 +82,11 @@ const setters = {
|
||||
|
||||
export {
|
||||
editor,
|
||||
editorHelper,
|
||||
editorCabin,
|
||||
skeleton,
|
||||
skeletonHelper,
|
||||
skeletonCabin,
|
||||
designer,
|
||||
designerHelper,
|
||||
designerCabin,
|
||||
plugins,
|
||||
setters,
|
||||
project,
|
||||
@ -95,18 +103,21 @@ export {
|
||||
monitor,
|
||||
};
|
||||
|
||||
const getSelection = () => designer.currentDocument?.selection;
|
||||
// TODO: build-plugin-component 的 umd 开发态没有导出 AliLowCodeEngine,这里先简单绕过
|
||||
(window as any).AliLowCodeEngine = {
|
||||
editor,
|
||||
editorHelper,
|
||||
editorCabin,
|
||||
skeleton,
|
||||
skeletonHelper,
|
||||
skeletonCabin,
|
||||
designer,
|
||||
designerHelper,
|
||||
designerCabin,
|
||||
plugins,
|
||||
setters,
|
||||
project,
|
||||
selection,
|
||||
get selection() {
|
||||
return getSelection();
|
||||
},
|
||||
/**
|
||||
* 注册一些全局的切面
|
||||
*/
|
||||
@ -138,6 +149,3 @@ export async function init(container?: Element) {
|
||||
engineContainer,
|
||||
);
|
||||
}
|
||||
|
||||
LiveEditing.addLiveEditingSpecificRule(liveEditingRule);
|
||||
LiveEditing.addLiveEditingSaveHandler(liveEditingSaveHander);
|
||||
|
||||
@ -2,6 +2,8 @@ export * from './engine';
|
||||
|
||||
const version = '{{VERSION_PLACEHOLDER}}';
|
||||
|
||||
(window as any).AliLowCodeEngine.version = version;
|
||||
|
||||
console.log(
|
||||
`%c AliLowCodeEngine %c v${version} `,
|
||||
'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;',
|
||||
|
||||
10
packages/engine/src/modules/designer-types.ts
Normal file
10
packages/engine/src/modules/designer-types.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import * as designerCabin from '@ali/lowcode-designer';
|
||||
|
||||
// 这样做的目的是为了去除 Node / DocumentModel 等的值属性,仅保留类型属性
|
||||
export type Node = designerCabin.Node;
|
||||
export type ParentalNode = designerCabin.ParentalNode;
|
||||
export type DocumentModel = designerCabin.DocumentModel;
|
||||
export type RootNode = designerCabin.RootNode;
|
||||
export type EditingTarget = designerCabin.EditingTarget;
|
||||
export type SaveHandler = designerCabin.SaveHandler;
|
||||
export type ComponentMeta = designerCabin.ComponentMeta;
|
||||
3
packages/engine/src/modules/editor-types.ts
Normal file
3
packages/engine/src/modules/editor-types.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as editorCabin from '@ali/lowcode-editor-core';
|
||||
|
||||
export type RegisteredSetter = editorCabin.RegisteredSetter;
|
||||
@ -1,4 +1,4 @@
|
||||
import { EditingTarget, Node as DocNode, SaveHandler } from '@ali/lowcode-designer';
|
||||
import { EditingTarget, Node as DocNode, SaveHandler, LiveEditing } from '@ali/lowcode-designer';
|
||||
import { isJSExpression } from '@ali/lowcode-types';
|
||||
|
||||
function getText(node: DocNode, prop: string) {
|
||||
@ -78,3 +78,6 @@ export const liveEditingSaveHander: SaveHandler = {
|
||||
// 非文本编辑
|
||||
// 国际化数据,改变当前
|
||||
// JSExpression, 改变 mock 或 弹出绑定变量
|
||||
|
||||
LiveEditing.addLiveEditingSpecificRule(liveEditingRule);
|
||||
LiveEditing.addLiveEditingSaveHandler(liveEditingSaveHander);
|
||||
6
packages/engine/src/modules/lowcode-types.ts
Normal file
6
packages/engine/src/modules/lowcode-types.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export {
|
||||
ILowCodePluginConfig,
|
||||
ILowCodePluginManager,
|
||||
ILowCodePluginContext,
|
||||
IDesignerCabin,
|
||||
} from '@ali/lowcode-types';
|
||||
3
packages/engine/src/modules/skeleton-types.ts
Normal file
3
packages/engine/src/modules/skeleton-types.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as skeletonCabin from '@ali/lowcode-editor-skeleton';
|
||||
|
||||
export type IWidgetBaseConfig = skeletonCabin.IWidgetBaseConfig;
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-ignitor
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-ignitor",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "点火器,bootstrap lce project",
|
||||
"main": "lib/index.js",
|
||||
"private": true,
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 将 typings 在顶层导出 ([9d9b6f4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/9d9b6f4))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-designer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "alibaba lowcode editor designer plugin",
|
||||
"files": [
|
||||
"es",
|
||||
@ -20,8 +20,8 @@
|
||||
],
|
||||
"author": "xiayang.xy",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1"
|
||||
},
|
||||
@ -29,7 +29,7 @@
|
||||
"@alib/build-scripts": "^0.1.3",
|
||||
"@types/react": "^16.9.13",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"build-plugin-component": "^0.2.7-1"
|
||||
"build-plugin-component": "^0.2.7"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npm.alibaba-inc.com"
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-plugin-outline-pane",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Outline pane for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
@ -14,10 +14,10 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"classnames": "^2.2.6",
|
||||
"react": "^16",
|
||||
|
||||
@ -3,7 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -11,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-rax-renderer
|
||||
|
||||
<a name="1.0.30-beta.13"></a>
|
||||
<a name="1.0.30-beta.13"></a>
|
||||
## [1.0.30-beta.13](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.12...v1.0.30-beta.13) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-rax-renderer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Rax renderer for Ali lowCode engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "lib/index.js",
|
||||
@ -36,7 +36,7 @@
|
||||
"@ali/bzb-request": "2.6.1",
|
||||
"@ali/lib-mtop": "^2.5.1",
|
||||
"@ali/lowcode-datasource-engine": "^1.0.22",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/ui-table": "^1.0.1-beta.6",
|
||||
"classnames": "^2.2.6",
|
||||
"debug": "^4.1.1",
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-rax-simulator-renderer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "rax simulator renderer for alibaba lowcode designer",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -13,10 +13,10 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-rax-renderer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-rax-renderer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/recore-rax": "^1.2.4",
|
||||
"@ali/vu-css-style": "^1.0.2",
|
||||
"@recore/obx": "^1.0.8",
|
||||
@ -57,5 +57,5 @@
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npm.alibaba-inc.com"
|
||||
},
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.30-beta.12/build/index.html"
|
||||
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.30-beta.14/build/index.html"
|
||||
}
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-react-renderer
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-react-renderer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "react renderer for ali lowcode engine",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-react-simulator-renderer",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "react simulator renderer for alibaba lowcode designer",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@ -16,10 +16,10 @@
|
||||
"build": "build-scripts build --skip-demo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-react-renderer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-react-renderer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/vu-css-style": "^1.0.2",
|
||||
"@recore/obx": "^1.0.8",
|
||||
"@recore/obx-react": "^1.0.7",
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-types
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-types",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Types for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
|
||||
@ -31,7 +31,7 @@ export interface ILowCodePlugin {
|
||||
setDisabled(flag: boolean): void;
|
||||
}
|
||||
|
||||
export interface IDesignerHelper {
|
||||
export interface IDesignerCabin {
|
||||
registerMetadataTransducer: (transducer: MetadataTransducer, level: number, id?: string) => void;
|
||||
addBuiltinComponentAction: (action: ComponentAction) => void;
|
||||
removeBuiltinComponentAction: (actionName: string) => void;
|
||||
@ -44,7 +44,7 @@ export interface ILowCodePluginContext {
|
||||
hotkey: Hotkey;
|
||||
logger: Logger;
|
||||
plugins: ILowCodePluginManager;
|
||||
designerHelper: IDesignerHelper;
|
||||
designerCabin: IDesignerCabin;
|
||||
/**
|
||||
其他暂不增加,按需增加
|
||||
*/
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @ali/lowcode-utils
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-utils",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Utils for Ali lowCode engine",
|
||||
"files": [
|
||||
"es",
|
||||
@ -14,7 +14,7 @@
|
||||
"test:snapshot": "ava --update-snapshots"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ali/lowcode-types": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-types": "^1.0.30-beta.15",
|
||||
"@alifd/next": "^1.19.16",
|
||||
"lodash.get": "^4.4.2",
|
||||
"react": "^16"
|
||||
|
||||
@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.0.30-beta.15"></a>
|
||||
## [1.0.30-beta.15](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.14...v1.0.30-beta.15) (2021-01-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* 将 typings 在顶层导出 ([9d9b6f4](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/9d9b6f4))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.30-beta.14"></a>
|
||||
## [1.0.30-beta.14](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.30-beta.13...v1.0.30-beta.14) (2021-01-13)
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
"@ali/lowcode-engine": "var window.AliLowCodeEngine",
|
||||
"@ali/visualengine-utils": "var window.VisualEngineUtils",
|
||||
"rax": "var window.Rax",
|
||||
"moment": "var window.moment",
|
||||
"monaco-editor/esm/vs/editor/editor.api": "var window.monaco",
|
||||
"monaco-editor/esm/vs/editor/editor.main.js": "var window.monaco"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ali/lowcode-vision-polyfill",
|
||||
"version": "1.0.30-beta.14",
|
||||
"version": "1.0.30-beta.15",
|
||||
"description": "Vision Polyfill for Ali lowCode engine",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -17,10 +17,10 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.14",
|
||||
"@ali/lowcode-designer": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-core": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-editor-skeleton": "^1.0.30-beta.15",
|
||||
"@ali/lowcode-utils": "^1.0.30-beta.15",
|
||||
"@ali/ve-i18n-util": "^2.0.0",
|
||||
"@ali/ve-icons": "^4.1.9",
|
||||
"@ali/ve-less-variables": "2.0.3",
|
||||
|
||||
@ -12,15 +12,15 @@ import {
|
||||
upgradeConfigure,
|
||||
} from './upgrade-metadata';
|
||||
import { accessLibrary } from '@ali/lowcode-utils';
|
||||
import { designer, designerHelper, editorHelper } from '@ali/lowcode-engine';
|
||||
import { designer, designerCabin, editorCabin } from '@ali/lowcode-engine';
|
||||
|
||||
const {
|
||||
addBuiltinComponentAction,
|
||||
isComponentMeta,
|
||||
registerMetadataTransducer,
|
||||
TransformStage,
|
||||
} = designerHelper;
|
||||
const { intl } = editorHelper;
|
||||
} = designerCabin;
|
||||
const { intl } = editorCabin;
|
||||
|
||||
const GlobalPropsConfigure: Array<{
|
||||
position: string;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { ComponentType, ReactElement, isValidElement, ComponentClass } from 'react';
|
||||
import { isPlainObject, uniqueId } from '@ali/lowcode-utils';
|
||||
import { isI18nData, SettingTarget, InitialItem, FilterItem, isJSSlot, ProjectSchema, AutorunItem, isJSBlock } from '@ali/lowcode-types';
|
||||
import { editorHelper, designerHelper } from '@ali/lowcode-engine';
|
||||
import { editorCabin, designerCabin } from '@ali/lowcode-engine';
|
||||
|
||||
const { SettingField } = designerHelper;
|
||||
const { untracked } = editorHelper;
|
||||
const { SettingField } = designerCabin;
|
||||
const { untracked } = editorCabin;
|
||||
|
||||
type Field = SettingTarget;
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Overlay } from '@alifd/next';
|
||||
import React from 'react';
|
||||
import { Node, ParentalNode } from '@ali/lowcode-designer';
|
||||
import { editorHelper } from '@ali/lowcode-engine';
|
||||
import { editorCabin } from '@ali/lowcode-engine';
|
||||
import './index.less';
|
||||
|
||||
const { Popup } = Overlay;
|
||||
const { Title } = editorHelper;
|
||||
const { Title } = editorCabin;
|
||||
|
||||
export interface IProps {
|
||||
node: Node;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { designer, designerHelper } from '@ali/lowcode-engine';
|
||||
import { designer, designerCabin } from '@ali/lowcode-engine';
|
||||
import { isPrototype } from './bundle/prototype';
|
||||
|
||||
const { DragObjectType, isNode, isDragNodeDataObject } = designerHelper;
|
||||
const { DragObjectType, isNode, isDragNodeDataObject } = designerCabin;
|
||||
const { dragon } = designer;
|
||||
const DragEngine = {
|
||||
from(shell: Element, boost: (e: MouseEvent) => any): any {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import { ALI_SCHEMA_VERSION } from './base/const';
|
||||
import { editorHelper } from '@ali/lowcode-engine';
|
||||
import { editorCabin } from '@ali/lowcode-engine';
|
||||
|
||||
const { obx } = editorHelper;
|
||||
const { obx } = editorCabin;
|
||||
|
||||
interface ILiteralObject {
|
||||
[key: string]: any;
|
||||
|
||||
@ -11,10 +11,10 @@ import {
|
||||
} from './fields';
|
||||
|
||||
import { ComponentClass, Component, isValidElement, createElement } from 'react';
|
||||
import { editorHelper, setters } from '@ali/lowcode-engine';
|
||||
import { editorCabin, setters } from '@ali/lowcode-engine';
|
||||
|
||||
const { getSetter } = setters;
|
||||
const { createSetterContent } = editorHelper;
|
||||
const { createSetterContent } = editorCabin;
|
||||
|
||||
function isReactClass(obj: any): obj is ComponentClass<any> {
|
||||
return (
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { editorHelper } from '@ali/lowcode-engine';
|
||||
import { editorCabin } from '@ali/lowcode-engine';
|
||||
|
||||
const { obx } = editorHelper;
|
||||
const { obx } = editorCabin;
|
||||
|
||||
let keybase = Date.now();
|
||||
function keygen(maps) {
|
||||
|
||||
@ -7,7 +7,7 @@ import logger from '@ali/vu-logger';
|
||||
import I18nUtil from './i18n-util';
|
||||
import { VE_EVENTS as EVENTS, VE_HOOKS as HOOKS, VERSION as Version } from './base/const';
|
||||
import Bus from './bus';
|
||||
import { skeleton, designer, editor, plugins, init, hotkey as Hotkey, monitor, designerHelper } from '@ali/lowcode-engine';
|
||||
import { skeleton, designer, editor, plugins, init, hotkey as Hotkey, monitor, designerCabin } from '@ali/lowcode-engine';
|
||||
import Panes from './panes';
|
||||
import Exchange from './exchange';
|
||||
import context from './context';
|
||||
@ -26,7 +26,6 @@ import Viewport from './viewport';
|
||||
import Project from './project';
|
||||
import Symbols from './symbols';
|
||||
import { invariant } from './utils';
|
||||
import '@ali/lowcode-editor-setters';
|
||||
import './reducers';
|
||||
|
||||
import './vision.less';
|
||||
@ -52,17 +51,11 @@ const modules = {
|
||||
Prop,
|
||||
};
|
||||
|
||||
// const designerHelper = {
|
||||
// registerMetadataTransducer,
|
||||
// addBuiltinComponentAction,
|
||||
// removeBuiltinComponentAction,
|
||||
// // modifyBuiltinComponentAction,
|
||||
// };
|
||||
const { registerMetadataTransducer } = designerHelper;
|
||||
const { registerMetadataTransducer } = designerCabin;
|
||||
|
||||
const VisualEngine = {
|
||||
designer,
|
||||
designerHelper,
|
||||
designerCabin,
|
||||
editor,
|
||||
skeleton,
|
||||
/**
|
||||
@ -115,7 +108,7 @@ export default VisualEngine;
|
||||
|
||||
export {
|
||||
designer,
|
||||
designerHelper,
|
||||
designerCabin,
|
||||
editor,
|
||||
skeleton,
|
||||
/**
|
||||
|
||||
@ -3,9 +3,9 @@ import {
|
||||
} from '@ali/lowcode-utils';
|
||||
import { isJSBlock } from '@ali/lowcode-types';
|
||||
import { isVariable } from '../utils';
|
||||
import { designerHelper } from '@ali/lowcode-engine';
|
||||
import { designerCabin } from '@ali/lowcode-engine';
|
||||
|
||||
const { getConvertedExtraKey } = designerHelper;
|
||||
const { getConvertedExtraKey } = designerCabin;
|
||||
|
||||
export function upgradePropsReducer(props: any) {
|
||||
if (!props || !isPlainObject(props)) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { isJSBlock, isJSExpression, isJSSlot } from '@ali/lowcode-types';
|
||||
import { isPlainObject, hasOwnProperty, cloneDeep, isI18NObject, isUseI18NSetter, convertToI18NObject, isString } from '@ali/lowcode-utils';
|
||||
import { editor, designer, designerHelper } from '@ali/lowcode-engine';
|
||||
import { editor, designer, designerCabin } from '@ali/lowcode-engine';
|
||||
import bus from './bus';
|
||||
import { VE_EVENTS } from './base/const';
|
||||
|
||||
@ -18,7 +18,7 @@ import {
|
||||
nodeTopFixedReducer,
|
||||
} from './props-reducers';
|
||||
|
||||
const { LiveEditing, TransformStage } = designerHelper;
|
||||
const { LiveEditing, TransformStage } = designerCabin;
|
||||
|
||||
// LiveEditing.addLiveEditingSpecificRule(liveEditingRule);
|
||||
// LiveEditing.addLiveEditingSaveHandler(liveEditingSaveHander);
|
||||
|
||||
@ -15,7 +15,7 @@ dirs
|
||||
files.forEach(file => {
|
||||
const fileDir = join(pkgDir, file);
|
||||
if (!fs.existsSync(fileDir)) {
|
||||
throw new Error(`${fileDir} not exists, plz run build`);
|
||||
throw new Error(`${fileDir} does not exist, plz run build`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user