Skip to content

Commit

Permalink
daily merge (#3)
Browse files Browse the repository at this point in the history
* Yun002 (#2)

* feat(independent-page): set independent-page

* feat(plugin): add fuzhijia clock plugin

* feat(clock): complete fuzhijia clock

* fix(clock): map issue after refreshing page

* fix(clock): tmap clock issue

* feat(wxcom-auth): add wxcom auth plugin

* fix(merge): merge from main

---------

Co-authored-by: jessetalk <>

* Update README.md

* Update README.zh-CN.md

* Update README.zh-CN.md

* fix:  numeric field display issue in form linkage rule (nocobase#4482)

* fix:  numeric field display issue in form linkage rule

* fix: bug

* chore(versions): 😊 publish v1.0.0-alpha.16

* chore: update changelog

* Update README.md

* Update README.zh-CN.md

* Update README.md

* chore: database prepare error message

* chore: retry in dev env

* refactor: form linkage rule to cancel assignment when multiple fields are selected (nocobase#4492)

* fix: optimize data scope variable in permission configuration (nocobase#4484)

* fix: optimize data scope variable in permission configuration

* test: add e2e test

* chore: fix failed e2e

* fix: optimize data scope variable in permission configuration

* chore: skip weird test

* fix: auto change log

* chore(versions): 😊 publish v1.0.0-alpha.17

* chore: update changelog

* feat: update LICENSE

* fix: sub-table support allowAddNew setting (nocobase#4498)

* chore(auth): change char length limit of username to 1-50 (nocobase#4502)

* fix: fix loss of data scope field in permission configuration

* fix: after update event in single relation repository (nocobase#4503)

* fix: after update event in single relation repository

* test(plugin-workflow): add association collection trigger

---------

Co-authored-by: mytharcher <mytharcher@gmail.com>

* refactor: remove all frontend checks for isForeignKey (nocobase#4499)

* refactor: remove all frontend checks for isForeignKey

* fix: bug

---------

Co-authored-by: estheryo <32948748+estheryo@users.noreply.github.com>
Co-authored-by: Katherine <shunai.tang@hand-china.com>
Co-authored-by: GitHub Actions Bot <actions@github.com>
Co-authored-by: Chareice <chareice@live.com>
Co-authored-by: Zeke Zhang <958414905@qq.com>
Co-authored-by: zhou <zhou.working@gmail.com>
Co-authored-by: YANG QIA <2013xile@gmail.com>
Co-authored-by: mytharcher <mytharcher@gmail.com>
  • Loading branch information
9 people committed May 28, 2024
1 parent da2dc80 commit 8a709cd
Show file tree
Hide file tree
Showing 115 changed files with 4,872 additions and 258 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ jobs:
repository: nocobase/nocobase
ssh-key: ${{ secrets.NOCOBASE_DEPLOY_KEY }}
persist-credentials: true
fetch-depth: 0
- name: Checkout pro-plugins
uses: actions/checkout@v4
with:
repository: nocobase/pro-plugins
path: packages/pro-plugins
fetch-depth: 0
ssh-key: ${{ secrets.PRO_PLUGINS_DEPLOY_KEY }}
persist-credentials: true
- name: Set Node.js 18
Expand Down
4,462 changes: 4,461 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Updated Date: March 30, 2024
Updated Date: May 27, 2024

NocoBase License Agreement

Expand Down Expand Up @@ -81,7 +81,7 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr

6.6 Can remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface.

6.7 Can sell plugins developed for Software in the Plugin Market or on User’s own website.
6.7 Can sell plugins developed for Software in the Plugin Market.

6.8 Can sell or provide Upper Layer Applications developed based on Software in the form of SaaS to the public.

Expand All @@ -105,9 +105,11 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr

7.6 It is not allowed to disclose the source code of Commercial Plugins to any third party.

7.7 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
7.7 It is not allowed to publicly sell plugins developed for Software outside of the Plugin Market.

7.8 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
7.8 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.

7.9 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.

=============================================================
8. Legal Jurisdiction, Interpretation, and Dispute Resolution
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ https://github.com/nocobase/nocobase/assets/1267426/1d6a3979-d1eb-4e50-b726-2f90

## We'd love your support!

<a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>

<a href="https://www.producthunt.com/posts/nocobase?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=456520&theme=light&period=daily" alt="NocoBase - Scalability&#0045;first&#0044;&#0032;open&#0045;source&#0032;no&#0045;code&#0032;platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

## Recent major updates

- [v1.0:Significant Milestone - 2024/04/28](https://docs.nocobase.com/welcome/release/v1001-changelog)
- [v0.21:Block performance optimization - 2024/03/29](https://docs.nocobase.com/welcome/release/v0210-changelog)
- [v0.20:Support for multiple data sources - 2024/03/03](https://docs.nocobase.com/welcome/release/v0200-changelog)
- [v1.0.0-alpha.15: New Plugins and Improved “Configure actions” Interaction - 2024/05/19](https://docs.nocobase.com/welcome/changelog/20240519)
- [v1.0: Significant Milestone - 2024/04/28](https://docs.nocobase.com/welcome/release/v1001-changelog)
- [v0.21: Block performance optimization - 2024/03/29](https://docs.nocobase.com/welcome/release/v0210-changelog)
- [v0.20: Support for multiple data sources - 2024/03/03](https://docs.nocobase.com/welcome/release/v0200-changelog)
- [v0.19: Application process optimization - 2024/01/08](https://docs.nocobase.com/welcome/release/v0190-changelog)
- [v0.18: Establish a sound testing system - 2023/12/21](https://docs.nocobase.com/welcome/release/v0180-changelog)
- [v0.17: New SchemaInitializer and SchemaSettings - 2023/12/11](https://docs.nocobase.com/welcome/release/v0170-changelog)
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
https://github.com/nocobase/nocobase/assets/1267426/29623e45-9a48-4598-bb9e-9dd173ade553

## 感谢你的支持!
<a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>

<a href="https://www.producthunt.com/posts/nocobase?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=456520&theme=light&period=daily" alt="NocoBase - Scalability&#0045;first&#0044;&#0032;open&#0045;source&#0032;no&#0045;code&#0032;platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

## 最近重要更新
- [v1.0.0-alpha.15:新增插件、改进「配置操作」交互 - 2024/05/19](https://docs-cn.nocobase.com/welcome/changelog/20240519)
- [v1.0:新的里程碑 - 2024/04/28](https://docs-cn.nocobase.com/welcome/release/v1001-changelog)
- [v0.21:优化区块性能 - 2024/03/29](https://docs-cn.nocobase.com/welcome/release/v0210-changelog)
- [v0.20:支持多数据源 - 2024/03/03](https://docs-cn.nocobase.com/welcome/release/v0200-changelog)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [
Expand Down
6 changes: 3 additions & 3 deletions packages/core/acl/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@nocobase/acl",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/resourcer": "1.0.0-alpha.15",
"@nocobase/utils": "1.0.0-alpha.15",
"@nocobase/resourcer": "1.0.0-alpha.17",
"@nocobase/utils": "1.0.0-alpha.17",
"minimatch": "^5.1.1"
},
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nocobase/actions",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/cache": "1.0.0-alpha.15",
"@nocobase/database": "1.0.0-alpha.15",
"@nocobase/resourcer": "1.0.0-alpha.15"
"@nocobase/cache": "1.0.0-alpha.17",
"@nocobase/database": "1.0.0-alpha.17",
"@nocobase/resourcer": "1.0.0-alpha.17"
},
"repository": {
"type": "git",
Expand Down
10 changes: 5 additions & 5 deletions packages/core/app/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@nocobase/app",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/database": "1.0.0-alpha.15",
"@nocobase/preset-nocobase": "1.0.0-alpha.15",
"@nocobase/server": "1.0.0-alpha.15"
"@nocobase/database": "1.0.0-alpha.17",
"@nocobase/preset-nocobase": "1.0.0-alpha.17",
"@nocobase/server": "1.0.0-alpha.17"
},
"devDependencies": {
"@nocobase/client": "1.0.0-alpha.15"
"@nocobase/client": "1.0.0-alpha.17"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@nocobase/auth",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/actions": "1.0.0-alpha.15",
"@nocobase/cache": "1.0.0-alpha.15",
"@nocobase/database": "1.0.0-alpha.15",
"@nocobase/resourcer": "1.0.0-alpha.15",
"@nocobase/utils": "1.0.0-alpha.15",
"@nocobase/actions": "1.0.0-alpha.17",
"@nocobase/cache": "1.0.0-alpha.17",
"@nocobase/database": "1.0.0-alpha.17",
"@nocobase/resourcer": "1.0.0-alpha.17",
"@nocobase/utils": "1.0.0-alpha.17",
"@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/core/auth/src/__tests__/base-auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('base-auth', () => {
} as any);

expect(auth.validateUsername('')).toBe(false);
expect(auth.validateUsername('a')).toBe(false);
expect(auth.validateUsername('a@')).toBe(false);
expect(auth.validateUsername('a.')).toBe(false);
expect(auth.validateUsername('a<')).toBe(false);
Expand All @@ -26,8 +25,8 @@ describe('base-auth', () => {
expect(auth.validateUsername('a/')).toBe(false);
expect(auth.validateUsername("a'")).toBe(false);
expect(auth.validateUsername('ab')).toBe(true);
// 16 characters
expect(auth.validateUsername('12345678910111213')).toBe(false);
// 50 characters
expect(auth.validateUsername('01234567890123456789012345678901234567890123456789a')).toBe(false);
});

it('check: should return null when no token', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/auth/src/base/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class BaseAuth extends Auth {
* @internal
*/
validateUsername(username: string) {
return /^[^@.<>"'/]{2,16}$/.test(username);
return /^[^@.<>"'/]{1,50}$/.test(username);
}

async check() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/build",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "Library build tool based on rollup.",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/cache",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nocobase/cli",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"description": "",
"license": "AGPL-3.0",
"main": "./src/index.js",
"bin": {
"nocobase": "./bin/index.js"
},
"dependencies": {
"@nocobase/app": "1.0.0-alpha.15",
"@nocobase/app": "1.0.0-alpha.17",
"@types/fs-extra": "^11.0.1",
"@umijs/utils": "3.5.20",
"chalk": "^4.1.1",
Expand All @@ -25,7 +25,7 @@
"tsx": "^4.6.2"
},
"devDependencies": {
"@nocobase/devtools": "1.0.0-alpha.15"
"@nocobase/devtools": "1.0.0-alpha.17"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/client",
"version": "1.0.0-alpha.15",
"version": "1.0.0-alpha.17",
"license": "AGPL-3.0",
"main": "lib/index.js",
"module": "es/index.mjs",
Expand All @@ -26,9 +26,9 @@
"@formily/reactive-react": "^2.2.27",
"@formily/shared": "^2.2.27",
"@formily/validator": "^2.2.27",
"@nocobase/evaluators": "1.0.0-alpha.15",
"@nocobase/sdk": "1.0.0-alpha.15",
"@nocobase/utils": "1.0.0-alpha.15",
"@nocobase/evaluators": "1.0.0-alpha.17",
"@nocobase/sdk": "1.0.0-alpha.17",
"@nocobase/utils": "1.0.0-alpha.17",
"ahooks": "^3.7.2",
"antd": "^5.12.8",
"antd-style": "3.4.5",
Expand All @@ -41,6 +41,7 @@
"i18next": "^22.4.9",
"i18next-http-backend": "^2.1.1",
"lodash": "4.17.21",
"lru-cache": "6.0.0",
"markdown-it": "14.1.0",
"markdown-it-highlightjs": "3.3.1",
"mathjs": "^10.6.0",
Expand All @@ -59,8 +60,7 @@
"react-router-dom": "^6.11.2",
"react-to-print": "^2.14.7",
"sanitize-html": "2.10.0",
"use-deep-compare-effect": "^1.8.1",
"lru-cache": "6.0.0"
"use-deep-compare-effect": "^1.8.1"
},
"peerDependencies": {
"react": ">=18.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const useCollectionManager_deprecated = (dataSourceName?: string) => {

// 是否可以作为标题字段
const isTitleField = (field) => {
return !field.isForeignKey && getInterface(field.interface)?.titleUsable;
return getInterface(field.interface)?.titleUsable;
};

const getParentCollectionFields = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CollectionFieldInterface } from '../../data-source/collection-field-int

registerValidateRules({
username(value) {
return /^[^@.<>"'/]{2,16}$/.test(value) || i18n.t('Must be 2-16 characters in length (excluding @.<>"\'/)');
return /^[^@.<>"'/]{1,50}$/.test(value) || i18n.t('Must be 1-50 characters in length (excluding @.<>"\'/)');
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ export class InheritanceCollectionMixin extends Collection {
}
const currentFields = this.getCurrentFields();
const inheritedFields = this.getInheritedFields();
const allFields = unionBy(currentFields?.concat(inheritedFields) || [], 'name').filter((v: any) => {
return !v.isForeignKey;
});
const allFields = unionBy(currentFields?.concat(inheritedFields) || [], 'name');

this.allFields = allFields;

Expand All @@ -254,9 +252,7 @@ export class InheritanceCollectionMixin extends Collection {
}
const currentFields = this.getCurrentFields();
const inheritedFields = this.getInheritedFields();
const allFields = unionBy(currentFields?.concat(inheritedFields) || [], 'name').filter((v: any) => {
return v.isForeignKey;
});
const allFields = unionBy(currentFields?.concat(inheritedFields) || [], 'name');

return allFields;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/client/src/data-source/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const HEADERS_DATA_SOURCE_KEY = 'x-data-source';
// export function getCollectionFieldsOptions(){}

export const isTitleField = (dm: DataSourceManager, field: CollectionFieldOptions) => {
return !field.isForeignKey && dm.collectionFieldInterfaceManager.getFieldInterface(field.interface)?.titleUsable;
return dm.collectionFieldInterfaceManager.getFieldInterface(field.interface)?.titleUsable;
};

export const useDataSourceHeaders = (dataSource?: string) => {
Expand Down
10 changes: 7 additions & 3 deletions packages/core/client/src/flag-provider/FlagProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For more information, please refer to: https://www.nocobase.com/agreement.
*/

import React from 'react';
import React, { FC } from 'react';

export interface FlagProviderProps {
/**
Expand All @@ -30,11 +30,15 @@ export interface FlagProviderProps {
* 是否存在于 `子表单` 中
*/
isInSubForm?: boolean;
children: any;
/**
* 如果为 true,则表示变量需要在其他上下文中解析
* @default true
*/
isVariableParsedInOtherContext?: boolean;
}

export const FlagContext = React.createContext<Omit<FlagProviderProps, 'children'>>(null);

export const FlagProvider = (props: FlagProviderProps) => {
export const FlagProvider: FC<FlagProviderProps> = (props) => {
return <FlagContext.Provider value={props}>{props.children}</FlagContext.Provider>;
};
2 changes: 1 addition & 1 deletion packages/core/client/src/flag-provider/hooks/useFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import { useContext } from 'react';
import { FlagContext } from '../FlagProvider';

export const useFlag = () => {
return useContext(FlagContext);
return useContext(FlagContext) || {};
};
2 changes: 1 addition & 1 deletion packages/core/client/src/locale/ko_KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
"Verification code": "인증 코드",
"Send code": "코드 전송",
"Retry after {{count}} seconds": "{{count}} 초 후 재시도",
"Must be 2-16 characters in length (excluding @.<>\"'/)": "2~16자여야 합니다 ( @.<>\"'/ 제외)",
"Must be 1-50 characters in length (excluding @.<>\"'/)": "1~50자여야 합니다 ( @.<>\"'/ 제외)",
"Roles": "역할",
"Add role": "역할 추가",
"Role name": "역할 이름",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/client/src/locale/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
"Verification code": "验证码",
"Send code": "发送验证码",
"Retry after {{count}} seconds": "{{count}} 秒后重试",
"Must be 2-16 characters in length (excluding @.<>\"'/)": "长度为2到16个字符(不能包含@.<>\"'/)",
"Must be 1-50 characters in length (excluding @.<>\"'/)": "长度为1到50个字符(不能包含@.<>\"'/)",
"Roles": "角色",
"Add role": "添加角色",
"Role name": "角色名称",
Expand Down Expand Up @@ -847,7 +847,7 @@
"Filter out a single piece or a group of records as a template": "筛选出一条或一组数据,作为模板",
"The title field is used to identify the template record": "用于识别模板数据",
"Template fields": "模板字段",
"The selected fields will automatically populate the form":"用于自动填充到表单",
"The selected fields will automatically populate the form": "用于自动填充到表单",
"Table selected records": "表格中选中的记录",
"Tag": "标签",
"Tag color field": "标签颜色字段",
Expand Down Expand Up @@ -937,8 +937,8 @@
"This variable has been deprecated and can be replaced with \"Current form\"": "该变量已被弃用,可以使用“当前表单”替代",
"Unknown field type": "未知字段类型",
"The following field types are not compatible and do not support output and display": "以下字段类型未适配,不支持输出和显示",
"Not fixed":"不固定",
"Left fixed":"左固定",
"Right fixed":"右固定",
"Fixed":"固定列"
"Not fixed": "不固定",
"Left fixed": "左固定",
"Right fixed": "右固定",
"Fixed": "固定列"
}
Loading

0 comments on commit 8a709cd

Please sign in to comment.