Compare commits

...

6 Commits

Author SHA1 Message Date
GitHub Action
4a167ddcb2 chore(release): publish 1.3.2-beta.1 2024-01-26 09:42:53 +00:00
liujuping
7f6fde759b feat(setter): add field ts 2024-01-26 17:18:50 +08:00
GitHub Action
cbe27a7b1e chore(docs): publish documentation 2024-01-26 17:18:50 +08:00
liujuping
cb3e79f756 docs(demo): add dialog use desc 2024-01-26 17:18:50 +08:00
GitHub Action
add1767509 chore(release): publish 1.3.2-beta.0 2024-01-25 09:10:13 +00:00
JackLian
b0e5b4e6f8 chore(docs): minor change of readme 2024-01-25 17:04:02 +08:00
23 changed files with 74 additions and 67 deletions

View File

@ -2,6 +2,8 @@
title: 3. 如何通过按钮展示/隐藏弹窗
sidebar_position: 1
---
> 说明:这个方式依赖低代码弹窗组件是否对外保留了相关的 API不同的物料支持的方式不一样这里只针对综合场景的弹窗物料。
## 1.拖拽一个按钮
![image.png](https://img.alicdn.com/imgextra/i1/O1CN01kLaWA31D6WwTui9VW_!!6000000000167-2-tps-3584-1812.png)

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { ReactNode } from 'react';
import { IPublicApiSetters, IPublicTypeCustomView, IPublicTypeRegisteredSetter } from '@alilc/lowcode-types';
import { IPublicApiSetters, IPublicModelSettingField, IPublicTypeCustomView, IPublicTypeRegisteredSetter } from '@alilc/lowcode-types';
import { createContent, isCustomView } from '@alilc/lowcode-utils';
const settersMap = new Map<string, IPublicTypeRegisteredSetter & {
@ -28,7 +28,7 @@ export function registerSetter(
if (!setter.initialValue) {
const initial = getInitialFromSetter(setter.component);
if (initial) {
setter.initialValue = (field: any) => {
setter.initialValue = (field: IPublicModelSettingField) => {
return initial.call(field, field.getValue());
};
}
@ -81,7 +81,7 @@ export class Setters implements ISetters {
if (!setter.initialValue) {
const initial = getInitialFromSetter(setter.component);
if (initial) {
setter.initialValue = (field: any) => {
setter.initialValue = (field: IPublicModelSettingField) => {
return initial.call(field, field.getValue());
};
}

View File

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

View File

@ -225,7 +225,7 @@ class SettingFieldView extends Component<SettingFieldViewProps, SettingFieldView
const value = this.value;
let _onChange = extraProps?.onChange;
let onChangeAPI = extraProps?.onChange;
let stageName = this.stageName;
return createField(
@ -261,7 +261,7 @@ class SettingFieldView extends Component<SettingFieldViewProps, SettingFieldView
value,
});
field.setValue(value, true);
if (_onChange) _onChange(value, field);
if (onChangeAPI) onChangeAPI(value, field.internalToShellField());
},
onInitial: () => {
if (initialValue == null) {

View File

@ -9,6 +9,7 @@ import {
IPublicTypeTransformedComponentMetadata,
IPublicTypeOneOfType,
ConfigureSupportEvent,
IPublicModelSettingField,
} from '@alilc/lowcode-types';
function propConfigToFieldConfig(propConfig: IPublicTypePropConfig): IPublicTypeFieldConfig {
@ -102,7 +103,7 @@ function propTypeToSetter(propType: IPublicTypePropType): IPublicTypeSetterType
},
},
isRequired,
initialValue: (field: any) => {
initialValue: (field: IPublicModelSettingField) => {
const data: any = {};
items.forEach((item: any) => {
let initial = item.defaultValue;

View File

@ -174,5 +174,6 @@ About Pull Request:
Special thanks to everyone who contributed to this project.
<p>
<a href="https://github.com/alibaba/lowcode-engine/graphs/contributors"><img src="https://contrib.rocks/image?repo=alibaba/lowcode-engine" /></a>
</p>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -77,5 +77,5 @@ export interface IPublicTypeFieldExtraProps {
/**
* onChange
*/
onChange?: (value: any, field: any) => void;
onChange?: (value: any, field: IPublicModelSettingField) => void;
}

View File

@ -1,17 +1,20 @@
import { IPublicModelSettingField } from '../model';
import { IPublicTypeCustomView, IPublicTypeTitleContent } from './';
export interface IPublicTypeRegisteredSetter {
component: IPublicTypeCustomView;
defaultProps?: object;
title?: IPublicTypeTitleContent;
/**
* for MixedSetter to check this setter if available
*/
condition?: (field: any) => boolean;
condition?: (field: IPublicModelSettingField) => boolean;
/**
* for MixedSetter to manual change to this setter
*/
initialValue?: any | ((field: any) => any);
initialValue?: any | ((field: IPublicModelSettingField) => any);
recommend?: boolean;
// 标识是否为动态 setter默认为 true
isDynamic?: boolean;

View File

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

View File

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