Skip to content

Commit faa524e

Browse files
committed
Merge branch 'release/1.1.3'
2 parents f6800be + 531cc9c commit faa524e

120 files changed

Lines changed: 2090 additions & 874 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
'no-await-in-loop': 0,
2121
'no-plusplus': 0,
2222
'@typescript-eslint/no-parameter-properties': 0,
23-
'@typescript-eslint/no-unused-vars': 1,
23+
'no-restricted-exports': ['error'],
2424
'no-multi-assign': 1,
2525
'no-dupe-class-members': 1,
2626
'react/no-deprecated': 1,
@@ -48,6 +48,7 @@ module.exports = {
4848
"afterLineComment": false,
4949
"allowBlockStart": true,
5050
}],
51+
"no-unused-vars": ['error', { "destructuredArrayIgnorePattern": "^_" }],
5152
"@typescript-eslint/member-ordering": [
5253
"error",
5354
{ "default": ["signature", "field", "constructor", "method"] }

.github/workflows/cov packages.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,26 @@ jobs:
7171
working-directory: packages/react-simulator-renderer
7272
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
7373
package-manager: yarn
74+
annotations: none
75+
76+
cov-utils:
77+
runs-on: ubuntu-latest
78+
# skip fork's PR, otherwise it fails while making a comment
79+
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
80+
steps:
81+
- name: checkout
82+
uses: actions/checkout@v2
83+
84+
- uses: actions/setup-node@v2
85+
with:
86+
node-version: '14'
87+
88+
- name: install
89+
run: npm i && npm run setup:skip-build
90+
91+
- uses: ArtiomTr/jest-coverage-report-action@v2
92+
with:
93+
working-directory: packages/utils
94+
test-script: npm test
95+
package-manager: yarn
7496
annotations: none

CONTRIBUTOR.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
- [Ychangqing](https://github.com/Ychangqing)
2525
- [yize](https://github.com/yize)
2626
- [youluna](https://github.com/youluna)
27+
- [ibreathebsb](https://github.com/ibreathebsb)
2728

2829
如果您贡献过低代码引擎,但是没有看到您的名字,为我们的疏忽感到抱歉。欢迎您通过 PR 补充上自己的名字。

docs/docs/api/model/config.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Config
3+
sidebar_position: 16
4+
---
5+
> **@types** [IPublicModelEngineConfig](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/engine-config.ts)<br/>
6+
> **@since** v1.1.3
7+
8+
## 方法
9+
### has
10+
11+
判断指定 key 是否有值
12+
13+
```typescript
14+
/**
15+
* 判断指定 key 是否有值
16+
* check if config has certain key configed
17+
* @param key
18+
* @returns
19+
*/
20+
has(key: string): boolean;
21+
```
22+
23+
### get
24+
25+
获取指定 key 的值
26+
27+
```typescript
28+
/**
29+
* 获取指定 key 的值
30+
* get value by key
31+
* @param key
32+
* @param defaultValue
33+
* @returns
34+
*/
35+
get(key: string, defaultValue?: any): any;
36+
```
37+
38+
### set
39+
40+
设置指定 key 的值
41+
42+
```typescript
43+
/**
44+
* 设置指定 key 的值
45+
* set value for certain key
46+
* @param key
47+
* @param value
48+
*/
49+
set(key: string, value: any): void;
50+
```
51+
52+
### setConfig
53+
批量设值,set 的对象版本
54+
55+
```typescript
56+
/**
57+
* 批量设值,set 的对象版本
58+
* set multiple config key-values
59+
* @param config
60+
*/
61+
setConfig(config: { [key: string]: any }): void;
62+
```
63+
64+
### getPreference
65+
获取全局 Preference, 用于管理全局浏览器侧用户 Preference,如 Panel 是否钉住
66+
67+
```typescript
68+
/**
69+
* 获取全局 Preference, 用于管理全局浏览器侧用户 Preference,如 Panel 是否钉住
70+
* get global user preference manager, which can be use to store
71+
* user`s preference in user localstorage, such as a panel is pinned or not.
72+
* @returns {IPublicModelPreference}
73+
* @since v1.1.0
74+
*/
75+
getPreference(): IPublicModelPreference;
76+
```
77+
78+
相关类型:[IPublicModelPreference](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/preference.ts)
79+
80+
## 事件
81+
82+
### onGot
83+
获取指定 key 的值,函数回调模式,若多次被赋值,回调会被多次调用
84+
85+
```typescript
86+
/**
87+
* 获取指定 key 的值,函数回调模式,若多次被赋值,回调会被多次调用
88+
* set callback for event of value set for some key
89+
* this will be called each time the value is set
90+
* @param key
91+
* @param fn
92+
* @returns
93+
*/
94+
onGot(key: string, fn: (data: any) => void): IPublicTypeDisposable;
95+
```
96+
97+
相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts)
98+
99+
### onceGot
100+
获取指定 key 的值,若此时还未赋值,则等待,若已有值,则直接返回值
101+
> 注:此函数返回 Promise 实例,只会执行(fullfill)一次
102+
103+
```typescript
104+
/**
105+
* 获取指定 key 的值,若此时还未赋值,则等待,若已有值,则直接返回值
106+
* 注:此函数返回 Promise 实例,只会执行(fullfill)一次
107+
* wait until value of certain key is set, will only be
108+
* triggered once.
109+
* @param key
110+
* @returns
111+
*/
112+
onceGot(key: string): Promise<any>;
113+
```

docs/docs/api/model/node-children.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,21 @@ forEach(fn: (node: IPublicModelNode, index: number) => void): void;
156156
157157
相关类型:[IPublicModelNode](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/node.ts)
158158
159+
### reverse
160+
161+
类似数组的 reverse
162+
163+
```typescript
164+
/**
165+
* 类似数组的 reverse
166+
* provide the same function with {Array.prototype.reverse}
167+
*/
168+
reverse(): IPublicModelNode[];
169+
170+
```
171+
172+
相关类型:[IPublicModelNode](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/node.ts)
173+
159174
160175
### map
161176

docs/docs/api/model/node.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,3 +645,14 @@ setConditionalVisible(): void;
645645
```
646646

647647
**@since v1.1.0**
648+
649+
### getDOMNode
650+
获取节点实例对应的 dom 节点
651+
652+
```typescript
653+
/**
654+
* 获取节点实例对应的 dom 节点
655+
*/
656+
getDOMNode(): HTMLElement;
657+
658+
```

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "4.0.0",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"npmClient": "yarn",
55
"useWorkspaces": true,
66
"packages": [

packages/designer/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const jestConfig = {
1515
// testMatch: ['**/document-model.test.ts'],
1616
// testMatch: ['**/prop.test.ts'],
1717
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
18+
// testMatch: ['**/document/node/node.add.test.ts'],
1819
transformIgnorePatterns: [
1920
`/node_modules/(?!${esModules})/`,
2021
],

packages/designer/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alilc/lowcode-designer",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "Designer for Ali LowCode Engine",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -15,9 +15,9 @@
1515
},
1616
"license": "MIT",
1717
"dependencies": {
18-
"@alilc/lowcode-editor-core": "1.1.2",
19-
"@alilc/lowcode-types": "1.1.2",
20-
"@alilc/lowcode-utils": "1.1.2",
18+
"@alilc/lowcode-editor-core": "1.1.3",
19+
"@alilc/lowcode-types": "1.1.3",
20+
"@alilc/lowcode-utils": "1.1.3",
2121
"classnames": "^2.2.6",
2222
"react": "^16",
2323
"react-dom": "^16.7.0",

0 commit comments

Comments
 (0)