Compare commits

...

24 Commits

Author SHA1 Message Date
GitHub Action
5b2e3a7c24 chore(release): publish 1.2.4-beta.3 2023-12-18 06:43:27 +00:00
liujuping
cdf2a3bb66 style(designer): update bem-tools index 2023-12-18 14:36:39 +08:00
GitHub Action
4406dc4103 chore(release): publish 1.2.4-beta.2 2023-12-18 02:46:08 +00:00
liujuping
11e2a1f1d6 feat(skeleton): Add TS defs for modules & optimize Tabs display with array contents 2023-12-18 10:39:18 +08:00
liujuping
19bd17f317 style: remove .lc-workbench-center z-index 2023-12-18 10:39:18 +08:00
GitHub Action
d9c517ffcb chore(docs): publish documentation 2023-12-18 10:39:18 +08:00
JackLian
c716164536 docs: add new link to video page 2023-12-18 10:39:17 +08:00
JackLian
7fbb5db1b8 chore(workflows/publish-docs): update config 2023-12-18 10:39:17 +08:00
JackLian
4827286802 chore(workflows/publish-docs): update config 2023-12-18 10:39:17 +08:00
GitHub Action
30fbbac91c chore(docs): publish documentation 2023-12-18 10:39:17 +08:00
JackLian
3160b3c2a3 chore(workflows/publish-docs): update config 2023-12-18 10:39:17 +08:00
GitHub Action
64aa80ad0f chore(docs): publish documentation 2023-12-18 10:39:17 +08:00
JackLian
303f280be0 chore(workflows/publish-docs): add workflow_dispatch trigger 2023-12-14 14:02:17 +08:00
liujuping
3eb44a1fde chore: update docs publish action 2023-12-14 14:02:17 +08:00
GitHub Action
570c2dedfe chore(docs): publish documentation 2023-12-14 14:02:17 +08:00
JackLian
dc13e5e3a5 docs: add new link to video page 2023-12-14 14:02:17 +08:00
JackLian
7772547c33 chore(docs): use tnpm as oss-syncing source 2023-12-14 14:02:16 +08:00
JackLian
956e6fef5b chore(workflows/publish-docs): update commit message 2023-12-14 14:02:16 +08:00
JackLian
3eb3b9b97b chore: use tnpm as oss-syncing source 2023-12-14 14:02:16 +08:00
GitHub Action
ee6c5af6ca Update package version 2023-12-14 14:02:16 +08:00
刘菊萍(絮黎)
6d8e308d15 docs: update workspace.md 2023-12-14 14:02:16 +08:00
GitHub Action
df286acdfb chore(release): publish 1.2.4-beta.1 2023-12-14 02:02:33 +00:00
JackLian
b0f768e1e6 chore: publish 1.2.4-beta.0 2023-12-14 09:55:46 +08:00
JackLian
5034994a24 chore(release): publish 1.2.4-beta.0 2023-12-14 09:54:43 +08:00
32 changed files with 176 additions and 164 deletions

View File

@ -6,6 +6,7 @@ on:
- develop - develop
paths: paths:
- 'docs/docs/**' - 'docs/docs/**'
workflow_dispatch:
jobs: jobs:
publish-docs: publish-docs:
@ -15,7 +16,8 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '14' ref: 'develop'
node-version: '16'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- run: cd docs && npm install - run: cd docs && npm install
- run: | - run: |
@ -24,9 +26,9 @@ jobs:
git config --local user.email "action@github.com" git config --local user.email "action@github.com"
git config --local user.name "GitHub Action" git config --local user.name "GitHub Action"
git add package.json git add package.json
git commit -m "Update package version" git commit -m "chore(docs): publish documentation"
git push git push
- run: cd docs && npm publish - run: cd docs && npm run build && npm publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get version - name: Get version
@ -48,4 +50,4 @@ jobs:
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
body: '🚀 New version has been released: ' + '${{ needs.publish-docs.outputs.version }}' body: '🚀 New version has been released: ' + '${{ needs.publish-docs.outputs.version }}'
}) })

View File

@ -87,7 +87,7 @@ registerResourceType(resourceTypeModel: IPublicTypeResourceType): void;
setResourceList(resourceList: IPublicResourceList) {} setResourceList(resourceList: IPublicResourceList) {}
``` ```
相关类型:[IPublicResourceOptions](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/resource-options.ts) 相关类型:[IPublicResourceData](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/resource-list.ts)
### openEditorWindow ### openEditorWindow

View File

@ -3,6 +3,8 @@
- [2023/08/03 初识低代码引擎](https://www.bilibili.com/video/BV1gu411p7TC) - [2023/08/03 初识低代码引擎](https://www.bilibili.com/video/BV1gu411p7TC)
# 社区视频 # 社区视频
- [低代码从入门到实战:低代码引擎实践](https://www.bilibili.com/video/BV1aP4y1Q7Xa/)
- [低代码技术在研发团队的应用模式](https://www.bilibili.com/video/BV1L14y1Y72J/)
- [阿里低代码引擎项目实战 (1)-引擎 demo 部署到 faas 服务](https://www.bilibili.com/video/BV1B44y1P7GM/) - [阿里低代码引擎项目实战 (1)-引擎 demo 部署到 faas 服务](https://www.bilibili.com/video/BV1B44y1P7GM/)
- [【有翻车】阿里低代码引擎项目实战 (2)-保存页面到远端存储](https://www.bilibili.com/video/BV1AS4y1K7DP/) - [【有翻车】阿里低代码引擎项目实战 (2)-保存页面到远端存储](https://www.bilibili.com/video/BV1AS4y1K7DP/)
- [阿里巴巴低代码引擎项目实战 (3)-自定义组件接入](https://www.bilibili.com/video/BV1dZ4y1m76S/) - [阿里巴巴低代码引擎项目实战 (3)-自定义组件接入](https://www.bilibili.com/video/BV1dZ4y1m76S/)

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine-docs", "name": "@alilc/lowcode-engine-docs",
"version": "1.2.10", "version": "1.2.15",
"description": "低代码引擎版本化文档", "description": "低代码引擎版本化文档",
"license": "MIT", "license": "MIT",
"files": [ "files": [

View File

@ -19,7 +19,7 @@ const onResponse = function (res) {
chunks.push(chunk); chunks.push(chunk);
}); });
res.on('end', (chunk) => { res.on('end', () => {
const body = Buffer.concat(chunks); const body = Buffer.concat(chunks);
console.table(JSON.stringify(JSON.parse(body.toString()), null, 2)); console.table(JSON.stringify(JSON.parse(body.toString()), null, 2));
}); });
@ -39,9 +39,9 @@ const postData = JSON.stringify({
}, },
], ],
// 可以发布指定源的 npm 包,默认公网 npm // 可以发布指定源的 npm 包,默认公网 npm
useTnpm: false, useTnpm: true,
}); });
req.write(postData); req.write(postData);
req.end(); req.end();

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-designer", "name": "@alilc/lowcode-designer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
@ -52,7 +52,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -6,5 +6,5 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
overflow: visible; overflow: visible;
z-index: 800; z-index: 1;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-core", "name": "@alilc/lowcode-editor-core",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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,7 +47,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-editor-skeleton", "name": "@alilc/lowcode-editor-skeleton",
"version": "1.2.3", "version": "1.2.4-beta.3",
"description": "alibaba lowcode editor skeleton", "description": "alibaba lowcode editor skeleton",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -19,10 +19,10 @@
], ],
"dependencies": { "dependencies": {
"@alifd/next": "^1.20.12", "@alifd/next": "^1.20.12",
"@alilc/lowcode-designer": "1.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-editor-core": "1.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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"
@ -42,7 +42,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -266,15 +266,28 @@ export class PanelView extends Component<{
} }
@observer @observer
export class TabsPanelView extends Component<{ container: WidgetContainer<Panel> }> { export class TabsPanelView extends Component<{
container: WidgetContainer<Panel>;
// shouldHideSingleTab: 一个布尔值,用于控制当 Tabs 组件只有一个标签时是否隐藏该标签。
shouldHideSingleTab?: boolean;
}> {
render() { render() {
const { container } = this.props; const { container } = this.props;
const titles: ReactElement[] = []; const titles: ReactElement[] = [];
const contents: ReactElement[] = []; const contents: ReactElement[] = [];
container.items.forEach((item: any) => { // 如果只有一个标签且 shouldHideSingleTab 为 true则不显示 Tabs
titles.push(<PanelTitle key={item.id} panel={item} className="lc-tab-title" />); if (this.props.shouldHideSingleTab && container.items.length === 1) {
contents.push(<PanelView key={item.id} panel={item} hideOperationRow hideDragLine />); contents.push(<PanelView key={container.items[0].id} panel={container.items[0]} hideOperationRow hideDragLine />);
}); } else {
container.items.forEach((item: any) => {
titles.push(<PanelTitle key={item.id} panel={item} className="lc-tab-title" />);
contents.push(<PanelView key={item.id} panel={item} hideOperationRow hideDragLine />);
});
}
if (!titles.length) {
return contents;
}
return ( return (
<div className="lc-tabs"> <div className="lc-tabs">

View File

@ -2,17 +2,16 @@ import { Component, Fragment } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { observer } from '@alilc/lowcode-editor-core'; import { observer } from '@alilc/lowcode-editor-core';
import { Area } from '../area'; import { Area } from '../area';
import { PanelConfig } from '../types';
import { Panel } from '../widget/panel'; import { Panel } from '../widget/panel';
import { IPublicTypePanelConfig } from '@alilc/lowcode-types';
@observer @observer
export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, Panel> }> { export default class LeftFixedPane extends Component<{ area: Area<IPublicTypePanelConfig, Panel> }> {
componentDidUpdate() { componentDidUpdate() {
// FIXME: dirty fix, need deep think // FIXME: dirty fix, need deep think
this.props.area.skeleton.editor.get('designer')?.touchOffsetObserver(); this.props.area.skeleton.editor.get('designer')?.touchOffsetObserver();
} }
render() { render() {
const { area } = this.props; const { area } = this.props;
const width = area.current?.config.props?.width; const width = area.current?.config.props?.width;
@ -36,7 +35,7 @@ export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, P
} }
@observer @observer
class Contents extends Component<{ area: Area<PanelConfig, Panel> }> { class Contents extends Component<{ area: Area<IPublicTypePanelConfig, Panel> }> {
render() { render() {
const { area } = this.props; const { area } = this.props;
return <Fragment>{area.container.items.map((panel) => panel.content)}</Fragment>; return <Fragment>{area.container.items.map((panel) => panel.content)}</Fragment>;

View File

@ -3,11 +3,10 @@ import classNames from 'classnames';
import { observer, Focusable } from '@alilc/lowcode-editor-core'; import { observer, Focusable } from '@alilc/lowcode-editor-core';
import { Area } from '../area'; import { Area } from '../area';
import { Panel } from '../widget/panel'; import { Panel } from '../widget/panel';
import { PanelConfig } from '../types'; import { IPublicApiProject, IPublicTypePanelConfig } from '@alilc/lowcode-types';
import { IPublicApiProject } from '@alilc/lowcode-types';
@observer @observer
export default class LeftFloatPane extends Component<{ area: Area<PanelConfig, Panel> }> { export default class LeftFloatPane extends Component<{ area: Area<IPublicTypePanelConfig, Panel> }> {
private dispose?: () => void; private dispose?: () => void;
private focusing?: Focusable; private focusing?: Focusable;

View File

@ -363,7 +363,7 @@ body {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
z-index: 10;
.lc-toolbar { .lc-toolbar {
display: flex; display: flex;
height: var(--toolbar-height); height: var(--toolbar-height);

View File

@ -1,7 +1,6 @@
import { action, makeObservable, obx, engineConfig, IEditor, FocusTracker } from '@alilc/lowcode-editor-core'; import { action, makeObservable, obx, engineConfig, IEditor, FocusTracker } from '@alilc/lowcode-editor-core';
import { import {
DockConfig, DockConfig,
PanelConfig,
WidgetConfig, WidgetConfig,
PanelDockConfig, PanelDockConfig,
DialogDockConfig, DialogDockConfig,
@ -29,6 +28,7 @@ import {
IPublicTypeSkeletonConfig, IPublicTypeSkeletonConfig,
IPublicApiSkeleton, IPublicApiSkeleton,
IPublicTypeConfigTransducer, IPublicTypeConfigTransducer,
IPublicTypePanelConfig,
} from '@alilc/lowcode-types'; } from '@alilc/lowcode-types';
const logger = new Logger({ level: 'warn', bizName: 'skeleton' }); const logger = new Logger({ level: 'warn', bizName: 'skeleton' });
@ -70,15 +70,15 @@ export interface ISkeleton extends Omit<IPublicApiSkeleton,
readonly toolbar: Area<DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig>; readonly toolbar: Area<DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig>;
readonly leftFixedArea: Area<PanelConfig, Panel>; readonly leftFixedArea: Area<IPublicTypePanelConfig, Panel>;
readonly leftFloatArea: Area<PanelConfig, Panel>; readonly leftFloatArea: Area<IPublicTypePanelConfig, Panel>;
readonly rightArea: Area<PanelConfig, Panel>; readonly rightArea: Area<IPublicTypePanelConfig, Panel>;
readonly mainArea: Area<WidgetConfig | PanelConfig, Widget | Panel>; readonly mainArea: Area<WidgetConfig | IPublicTypePanelConfig, Widget | Panel>;
readonly bottomArea: Area<PanelConfig, Panel>; readonly bottomArea: Area<IPublicTypePanelConfig, Panel>;
readonly stages: Area<StageConfig, Stage>; readonly stages: Area<StageConfig, Stage>;
@ -104,7 +104,7 @@ export interface ISkeleton extends Omit<IPublicApiSkeleton,
defaultSetCurrent?: boolean, defaultSetCurrent?: boolean,
): WidgetContainer; ): WidgetContainer;
createPanel(config: PanelConfig): Panel; createPanel(config: IPublicTypePanelConfig): Panel;
add(config: IPublicTypeSkeletonConfig, extraConfig?: Record<string, any>): IWidget | Widget | Panel | Stage | Dock | PanelDock | undefined; add(config: IPublicTypeSkeletonConfig, extraConfig?: Record<string, any>): IWidget | Widget | Panel | Stage | Dock | PanelDock | undefined;
} }
@ -124,15 +124,15 @@ export class Skeleton implements ISkeleton {
readonly toolbar: Area<DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig>; readonly toolbar: Area<DockConfig | DividerConfig | PanelDockConfig | DialogDockConfig>;
readonly leftFixedArea: Area<PanelConfig, Panel>; readonly leftFixedArea: Area<IPublicTypePanelConfig, Panel>;
readonly leftFloatArea: Area<PanelConfig, Panel>; readonly leftFloatArea: Area<IPublicTypePanelConfig, Panel>;
readonly rightArea: Area<PanelConfig, Panel>; readonly rightArea: Area<IPublicTypePanelConfig, Panel>;
@obx readonly mainArea: Area<WidgetConfig | PanelConfig, Widget | Panel>; @obx readonly mainArea: Area<WidgetConfig | IPublicTypePanelConfig, Widget | Panel>;
readonly bottomArea: Area<PanelConfig, Panel>; readonly bottomArea: Area<IPublicTypePanelConfig, Panel>;
readonly stages: Area<StageConfig, Stage>; readonly stages: Area<StageConfig, Stage>;
@ -388,9 +388,9 @@ export class Skeleton implements ISkeleton {
return this.widgets.find(widget => widget.name === name); return this.widgets.find(widget => widget.name === name);
} }
createPanel(config: PanelConfig) { createPanel(config: IPublicTypePanelConfig) {
const parsedConfig = this.parseConfig(config); const parsedConfig = this.parseConfig(config);
const panel = new Panel(this, parsedConfig as PanelConfig); const panel = new Panel(this, parsedConfig as IPublicTypePanelConfig);
this.panels.set(panel.name, panel); this.panels.set(panel.name, panel);
logger.debug(`Panel created with name: ${panel.name} \nconfig:`, config, '\n current panels: ', this.panels); logger.debug(`Panel created with name: ${panel.name} \nconfig:`, config, '\n current panels: ', this.panels);
return panel; return panel;
@ -496,7 +496,7 @@ export class Skeleton implements ISkeleton {
return this.leftArea.add(parsedConfig as PanelDockConfig); return this.leftArea.add(parsedConfig as PanelDockConfig);
case 'rightArea': case 'rightArea':
case 'right': case 'right':
return this.rightArea.add(parsedConfig as PanelConfig); return this.rightArea.add(parsedConfig as IPublicTypePanelConfig);
case 'topArea': case 'topArea':
case 'top': case 'top':
return this.topArea.add(parsedConfig as PanelDockConfig); return this.topArea.add(parsedConfig as PanelDockConfig);
@ -508,14 +508,14 @@ export class Skeleton implements ISkeleton {
case 'main': case 'main':
case 'center': case 'center':
case 'centerArea': case 'centerArea':
return this.mainArea.add(parsedConfig as PanelConfig); return this.mainArea.add(parsedConfig as IPublicTypePanelConfig);
case 'bottomArea': case 'bottomArea':
case 'bottom': case 'bottom':
return this.bottomArea.add(parsedConfig as PanelConfig); return this.bottomArea.add(parsedConfig as IPublicTypePanelConfig);
case 'leftFixedArea': case 'leftFixedArea':
return this.leftFixedArea.add(parsedConfig as PanelConfig); return this.leftFixedArea.add(parsedConfig as IPublicTypePanelConfig);
case 'leftFloatArea': case 'leftFloatArea':
return this.leftFloatArea.add(parsedConfig as PanelConfig); return this.leftFloatArea.add(parsedConfig as IPublicTypePanelConfig);
case 'stages': case 'stages':
return this.stages.add(parsedConfig as StageConfig); return this.stages.add(parsedConfig as StageConfig);
default: default:

View File

@ -1,11 +1,11 @@
import { ReactElement, ComponentType } from 'react'; import { ReactElement, ComponentType } from 'react';
import { import {
IPublicTypeTitleContent, IPublicTypeTitleContent,
IPublicTypeI18nData,
IPublicTypeWidgetConfigArea, IPublicTypeWidgetConfigArea,
IPublicTypeWidgetBaseConfig, IPublicTypeWidgetBaseConfig,
IPublicTypePanelDockPanelProps,
IPublicTypePanelDockProps, IPublicTypePanelDockProps,
IPublicTypePanelConfigProps,
IPublicTypePanelConfig,
} from '@alilc/lowcode-types'; } from '@alilc/lowcode-types';
import { IWidget } from './widget/widget'; import { IWidget } from './widget/widget';
@ -66,40 +66,17 @@ export function isDialogDockConfig(obj: any): obj is DialogDockConfig {
return obj && obj.type === 'DialogDock'; return obj && obj.type === 'DialogDock';
} }
// 窗格扩展 export function isPanelConfig(obj: any): obj is IPublicTypePanelConfig {
export interface PanelConfig extends IPublicTypeWidgetBaseConfig {
type: 'Panel';
content?: string | ReactElement | ComponentType<any> | PanelConfig[]; // as children
props?: PanelProps;
}
export function isPanelConfig(obj: any): obj is PanelConfig {
return obj && obj.type === 'Panel'; return obj && obj.type === 'Panel';
} }
export type HelpTipConfig = string | { url?: string; content?: string | ReactElement };
export interface PanelProps extends IPublicTypePanelDockPanelProps {
title?: IPublicTypeTitleContent;
icon?: any; // 冗余字段
description?: string | IPublicTypeI18nData;
help?: HelpTipConfig; // 显示问号帮助
hiddenWhenInit?: boolean; // when this is true, by default will be hidden
condition?: (widget: IWidget) => any;
onInit?: (widget: IWidget) => any;
onDestroy?: () => any;
shortcut?: string; // 只有在特定位置,可触发 toggle show
enableDrag?: boolean; // 是否开启通过 drag 调整 宽度
keepVisibleWhileDragging?: boolean; // 是否在该 panel 范围内拖拽时保持 visible 状态
}
export interface PanelDockConfig extends IDockBaseConfig { export interface PanelDockConfig extends IDockBaseConfig {
type: 'PanelDock'; type: 'PanelDock';
panelName?: string; panelName?: string;
panelProps?: PanelProps & { panelProps?: IPublicTypePanelConfigProps & {
area?: IPublicTypeWidgetConfigArea; area?: IPublicTypeWidgetConfigArea;
}; };
content?: string | ReactElement | ComponentType<any> | PanelConfig[]; // content for pane content?: string | ReactElement | ComponentType<any> | IPublicTypePanelConfig[]; // content for pane
} }
export function isPanelDockConfig(obj: any): obj is PanelDockConfig { export function isPanelDockConfig(obj: any): obj is PanelDockConfig {

View File

@ -1,10 +1,9 @@
import { createElement, ReactNode } from 'react'; import { createElement, ReactNode } from 'react';
import { obx, computed, makeObservable, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core'; import { obx, computed, makeObservable, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core';
import { uniqueId, createContent } from '@alilc/lowcode-utils'; import { uniqueId, createContent } from '@alilc/lowcode-utils';
import { IPublicTypeTitleContent } from '@alilc/lowcode-types'; import { IPublicTypeHelpTipConfig, IPublicTypePanelConfig, IPublicTypeTitleContent } from '@alilc/lowcode-types';
import { WidgetContainer } from './widget-container'; import { WidgetContainer } from './widget-container';
import { getEvent } from '@alilc/lowcode-shell'; import { getEvent } from '@alilc/lowcode-shell';
import { PanelConfig, HelpTipConfig } from '../types';
import { TitledPanelView, TabsPanelView, PanelView } from '../components/widget-views'; import { TitledPanelView, TabsPanelView, PanelView } from '../components/widget-views';
import { ISkeleton } from '../skeleton'; import { ISkeleton } from '../skeleton';
import { composeTitle } from './utils'; import { composeTitle } from './utils';
@ -45,6 +44,7 @@ export class Panel implements IWidget {
if (this.container) { if (this.container) {
return createElement(TabsPanelView, { return createElement(TabsPanelView, {
container: this.container, container: this.container,
shouldHideSingleTab: true,
}); });
} }
@ -72,15 +72,15 @@ export class Panel implements IWidget {
readonly title: IPublicTypeTitleContent; readonly title: IPublicTypeTitleContent;
readonly help?: HelpTipConfig; readonly help?: IPublicTypeHelpTipConfig;
private plain = false; private plain = false;
private container?: WidgetContainer<Panel, PanelConfig>; private container?: WidgetContainer<Panel, IPublicTypePanelConfig>;
@obx.ref public parent?: WidgetContainer; @obx.ref public parent?: WidgetContainer;
constructor(readonly skeleton: ISkeleton, readonly config: PanelConfig) { constructor(readonly skeleton: ISkeleton, readonly config: IPublicTypePanelConfig) {
makeObservable(this); makeObservable(this);
const { name, content, props = {} } = config; const { name, content, props = {} } = config;
const { hideTitleBar, title, icon, description, help } = props; const { hideTitleBar, title, icon, description, help } = props;
@ -90,9 +90,6 @@ export class Panel implements IWidget {
this.plain = hideTitleBar || !title; this.plain = hideTitleBar || !title;
this.help = help; this.help = help;
if (Array.isArray(content)) { if (Array.isArray(content)) {
if (content.length === 1) {
// todo: not show tabs
}
this.container = this.skeleton.createContainer( this.container = this.skeleton.createContainer(
name, name,
(item) => { (item) => {
@ -127,7 +124,7 @@ export class Panel implements IWidget {
this.parent = parent; this.parent = parent;
} }
add(item: Panel | PanelConfig) { add(item: Panel | IPublicTypePanelConfig) {
return this.container?.add(item); return this.container?.add(item);
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-engine", "name": "@alilc/lowcode-engine",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-editor-core": "1.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-editor-skeleton": "1.2.3", "@alilc/lowcode-editor-skeleton": "1.2.4-beta.3",
"@alilc/lowcode-engine-ext": "^1.0.0", "@alilc/lowcode-engine-ext": "^1.0.0",
"@alilc/lowcode-plugin-designer": "1.2.3", "@alilc/lowcode-plugin-designer": "1.2.4-beta.3",
"@alilc/lowcode-plugin-outline-pane": "1.2.3", "@alilc/lowcode-plugin-outline-pane": "1.2.4-beta.3",
"@alilc/lowcode-shell": "1.2.3", "@alilc/lowcode-shell": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"@alilc/lowcode-workspace": "1.2.3", "@alilc/lowcode-workspace": "1.2.4-beta.3",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },
@ -53,7 +53,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-designer", "name": "@alilc/lowcode-plugin-designer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-editor-core": "1.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"react": "^16.8.1", "react": "^16.8.1",
"react-dom": "^16.8.1" "react-dom": "^16.8.1"
}, },
@ -37,7 +37,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-plugin-outline-pane", "name": "@alilc/lowcode-plugin-outline-pane",
"version": "1.2.3", "version": "1.2.4-beta.3",
"description": "Outline pane for Ali lowCode engine", "description": "Outline pane for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -13,8 +13,8 @@
}, },
"dependencies": { "dependencies": {
"@alifd/next": "^1.19.16", "@alifd/next": "^1.19.16",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"react": "^16", "react": "^16",
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
@ -38,7 +38,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-renderer", "name": "@alilc/lowcode-rax-renderer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-renderer-core": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"rax-find-dom-node": "^1.0.1" "rax-find-dom-node": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
@ -49,6 +49,6 @@
}, },
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-rax-simulator-renderer", "name": "@alilc/lowcode-rax-simulator-renderer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-rax-renderer": "1.2.3", "@alilc/lowcode-rax-renderer": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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,6 +50,6 @@
"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://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-renderer", "name": "@alilc/lowcode-react-renderer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3" "@alilc/lowcode-renderer-core": "1.2.4-beta.3"
}, },
"devDependencies": { "devDependencies": {
"@alib/build-scripts": "^0.1.18", "@alib/build-scripts": "^0.1.18",
@ -42,6 +42,6 @@
"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://github.com/alibaba/lowcode-engine/#readme", "homepage": "https://github.com/alibaba/lowcode-engine/#readme",
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues" "bugs": "https://github.com/alibaba/lowcode-engine/issues"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-react-simulator-renderer", "name": "@alilc/lowcode-react-simulator-renderer",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-react-renderer": "1.2.3", "@alilc/lowcode-react-renderer": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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,7 +43,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-renderer-core", "name": "@alilc/lowcode-renderer-core",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@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,7 +55,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-shell", "name": "@alilc/lowcode-shell",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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",
@ -13,12 +13,12 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@alilc/lowcode-designer": "1.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-editor-core": "1.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-editor-skeleton": "1.2.3", "@alilc/lowcode-editor-skeleton": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"@alilc/lowcode-workspace": "1.2.3", "@alilc/lowcode-workspace": "1.2.4-beta.3",
"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",
@ -48,7 +48,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-types", "name": "@alilc/lowcode-types",
"version": "1.2.3", "version": "1.2.4-beta.3",
"description": "Types for Ali lowCode engine", "description": "Types for Ali lowCode engine",
"files": [ "files": [
"es", "es",
@ -29,7 +29,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,4 +1,27 @@
import { IPublicTypeIconType, IPublicTypeTitleContent, IPublicTypeWidgetConfigArea, TipContent } from './'; import { ReactElement, ComponentType } from 'react';
import { IPublicTypeI18nData, IPublicTypeIconType, IPublicTypeTitleContent, IPublicTypeWidgetConfigArea, TipContent } from './';
export type IPublicTypeHelpTipConfig = string | { url?: string; content?: string | ReactElement };
export interface IPublicTypePanelConfigProps extends IPublicTypePanelDockPanelProps {
title?: IPublicTypeTitleContent;
icon?: any; // 冗余字段
description?: string | IPublicTypeI18nData;
help?: IPublicTypeHelpTipConfig; // 显示问号帮助
hiddenWhenInit?: boolean; // when this is true, by default will be hidden
condition?: (widget: any) => any;
onInit?: (widget: any) => any;
onDestroy?: () => any;
shortcut?: string; // 只有在特定位置,可触发 toggle show
enableDrag?: boolean; // 是否开启通过 drag 调整 宽度
keepVisibleWhileDragging?: boolean; // 是否在该 panel 范围内拖拽时保持 visible 状态
}
export interface IPublicTypePanelConfig extends IPublicTypeWidgetBaseConfig {
type: 'Panel';
content?: string | ReactElement | ComponentType<any> | IPublicTypePanelConfig[]; // as children
props?: IPublicTypePanelConfigProps;
}
export interface IPublicTypeWidgetBaseConfig { export interface IPublicTypeWidgetBaseConfig {
[extra: string]: any; [extra: string]: any;
@ -13,7 +36,7 @@ export interface IPublicTypeWidgetBaseConfig {
*/ */
area?: IPublicTypeWidgetConfigArea; area?: IPublicTypeWidgetConfigArea;
props?: Record<string, any>; props?: Record<string, any>;
content?: any; content?: string | ReactElement | ComponentType<any> | IPublicTypePanelConfig[];
contentProps?: Record<string, any>; contentProps?: Record<string, any>;
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-utils", "name": "@alilc/lowcode-utils",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mobx": "^6.3.0", "mobx": "^6.3.0",
"react": "^16" "react": "^16"
@ -35,7 +35,7 @@
"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": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alilc/lowcode-workspace", "name": "@alilc/lowcode-workspace",
"version": "1.2.3", "version": "1.2.4-beta.3",
"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.2.3", "@alilc/lowcode-designer": "1.2.4-beta.3",
"@alilc/lowcode-editor-core": "1.2.3", "@alilc/lowcode-editor-core": "1.2.4-beta.3",
"@alilc/lowcode-editor-skeleton": "1.2.3", "@alilc/lowcode-editor-skeleton": "1.2.4-beta.3",
"@alilc/lowcode-types": "1.2.3", "@alilc/lowcode-types": "1.2.4-beta.3",
"@alilc/lowcode-utils": "1.2.3", "@alilc/lowcode-utils": "1.2.4-beta.3",
"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,7 +49,7 @@
"type": "http", "type": "http",
"url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace" "url": "https://github.com/alibaba/lowcode-engine/tree/main/packages/workspace"
}, },
"gitHead": "2669f179e6f899d395ce1942d0fe04f9c5ed48a6", "gitHead": "5034994a2421e18d3ee6e14f6ce772ac133865d3",
"bugs": "https://github.com/alibaba/lowcode-engine/issues", "bugs": "https://github.com/alibaba/lowcode-engine/issues",
"homepage": "https://github.com/alibaba/lowcode-engine/#readme" "homepage": "https://github.com/alibaba/lowcode-engine/#readme"
} }

View File

@ -19,7 +19,7 @@ const onResponse = function (res) {
chunks.push(chunk); chunks.push(chunk);
}); });
res.on('end', (chunk) => { res.on('end', () => {
const body = Buffer.concat(chunks); const body = Buffer.concat(chunks);
console.table(JSON.stringify(JSON.parse(body.toString()), null, 2)); console.table(JSON.stringify(JSON.parse(body.toString()), null, 2));
}); });
@ -39,9 +39,9 @@ const postData = JSON.stringify({
}, },
], ],
// 可以发布指定源的 npm 包,默认公网 npm // 可以发布指定源的 npm 包,默认公网 npm
useTnpm: false, useTnpm: true,
}); });
req.write(postData); req.write(postData);
req.end(); req.end();