diff --git a/.github/workflows/manual-merge.yml b/.github/workflows/manual-merge.yml new file mode 100644 index 0000000000..061765def4 --- /dev/null +++ b/.github/workflows/manual-merge.yml @@ -0,0 +1,89 @@ +name: Manual merge + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +on: + workflow_dispatch: + +jobs: + get-plugins: + uses: nocobase/nocobase/.github/workflows/get-plugins.yml@main + secrets: inherit + get-repos: + runs-on: ubuntu-latest + needs: get-plugins + outputs: + proRepos: ${{ steps.get-repos.outputs.proRepos }} + steps: + - name: Get repos + id: get-repos + run: | + if [[ "${{ github.head_ref || github.ref_name }}" == "next" ]]; then + echo "proRepos=$(echo '${{ needs.get-plugins.outputs.beta-plugins }}')" >> $GITHUB_OUTPUT + elif [[ "${{ github.head_ref || github.ref_name }}" == "develop" ]]; then + echo "proRepos=$(echo '${{ needs.get-plugins.outputs.alpha-plugins }}')" >> $GITHUB_OUTPUT + else + exit 1 + fi + merge: + runs-on: ubuntu-latest + needs: + - get-plugins + - get-repos + strategy: + fail-fast: false + matrix: + repo: + - 'nocobase' + - 'pro-plugins' + - ${{ fromJSON(needs.get-repos.outputs.proRepos) }} + - ${{ fromJSON(needs.get-plugins.outputs.custom-plugins) }} + steps: + - name: Get info + id: get-info + run: | + if [[ "${{ github.head_ref || github.ref_name }}" == "next" ]]; then + echo "baseBranch=$(echo 'next')" >> $GITHUB_OUTPUT + echo "targetBranch=$(echo 'main')" >> $GITHUB_OUTPUT + elif [[ "${{ github.head_ref || github.ref_name }}" == "develop" ]]; then + echo "baseBranch=$(echo 'develop')" >> $GITHUB_OUTPUT + echo "targetBranch=$(echo 'next')" >> $GITHUB_OUTPUT + else + exit 1 + fi + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.NOCOBASE_APP_ID }} + private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }} + repositories: ${{ matrix.repo }} + skip-token-revoke: true + - name: Get GitHub App User ID + id: get-user-id + run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ steps.get-info.outputs.baseBranch }} + repository: nocobase/${{ matrix.repo }} + fetch-depth: 0 + token: ${{ steps.app-token.outputs.token }} + - name: Merge ${{ steps.get-info.outputs.targetBranch }} into ${{ steps.get-info.outputs.baseBranch }} + shell: bash + run: | + git checkout ${{ steps.get-info.outputs.targetBranch }} + git pull origin ${{ steps.get-info.outputs.targetBranch }} + git checkout ${{ steps.get-info.outputs.baseBranch }} + git pull origin ${{ steps.get-info.outputs.baseBranch }} + git merge ${{ steps.get-info.outputs.targetBranch }} + git push origin ${{ steps.get-info.outputs.baseBranch }} --atomic --tags + - name: Merge ${{ steps.get-info.outputs.baseBranch }} into ${{ steps.get-info.outputs.targetBranch }} + shell: bash + run: | + git checkout ${{ steps.get-info.outputs.targetBranch }} + git merge ${{ steps.get-info.outputs.baseBranch }} + git push origin ${{ steps.get-info.outputs.targetBranch }} --atomic --tags diff --git a/.github/workflows/manual-release-next.yml b/.github/workflows/manual-release-next.yml index d216bbdb42..b27cfe3741 100644 --- a/.github/workflows/manual-release-next.yml +++ b/.github/workflows/manual-release-next.yml @@ -10,6 +10,9 @@ on: is_feat: description: 'is feat' type: boolean + add_minor: + description: 'add minor number' + type: boolean jobs: get-plugins: @@ -115,11 +118,12 @@ jobs: git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' echo "packages/pro-plugins" >> .git/info/exclude - bash release.sh $IS_FEAT + bash release.sh $IS_FEAT $ADD_MINOR env: PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.beta-plugins }} CUSTOM_PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.custom-plugins }} IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }} + ADD_MINOR: ${{ inputs.add_minor && '--add-minor' || '' }} - name: Push and merge into next run: | for repo in ${{ join(fromJSON(needs.get-plugins.outputs.beta-plugins), ' ') }} ${{ join(fromJSON(needs.get-plugins.outputs.custom-plugins), ' ') }} diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 32fd062b5e..76e99b4da6 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -6,6 +6,10 @@ concurrency: on: workflow_dispatch: + inputs: + is_feat: + description: 'is feat' + type: boolean jobs: get-plugins: @@ -111,10 +115,11 @@ jobs: git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' echo "packages/pro-plugins" >> .git/info/exclude - bash release.sh + bash release.sh $IS_FEAT env: PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.rc-plugins }} CUSTOM_PRO_PLUGIN_REPOS: ${{ needs.get-plugins.outputs.custom-plugins }} + IS_FEAT: ${{ inputs.is_feat && '--is-feat' || '' }} - name: Push and merge into next run: | for repo in ${{ join(fromJSON(needs.get-plugins.outputs.rc-plugins), ' ') }} ${{ join(fromJSON(needs.get-plugins.outputs.custom-plugins), ' ') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b52a0f06..441cad41ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,147 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.4.0](https://github.com/nocobase/nocobase/compare/v1.3.53...v1.4.0) - 2024-12-03 + +## 🎉 Major New Features + +### Simplify the process of adding and updating plugins + +![20241201170853](https://static-docs.nocobase.com/20241201170853.png) + +* The plugin list now reads directly from the local directory. +* Combined the processes for adding and updating plugins. +* Interface supports batch activation of plugins. +* Simplified the download and upgrade process for commercial plugins. + +Reference documentation: + +* [Release Notes / Simplify the process of adding and updating plugins](https://www.nocobase.com/en/blog/simplify-the-process-of-adding-and-updating-plugins) + +### Notification + +![20241201171806](https://static-docs.nocobase.com/20241201171806.png) + +* **Notification: In-app message** + It supports users in receiving real-time message notifications within the NocoBase application; +* **Notification: Email** + Used for sending email notifications with built-in SMTP transport. Details; +* **Notification: WeCom** + Sends notifications through the WeCom channel. + +Reference documentation: + +* [Notification Management](https://docs.nocobase.com/handbook/notification-manager) + +### User Data Synchronization + +![20241201172843](https://static-docs.nocobase.com/20241201172843.png) + +Reference documentation: + +* [User Data Synchronization](https://docs.nocobase.com/handbook/user-data-sync) + +### Backup Manager + +![20241201170237](https://static-docs.nocobase.com/20241201170237.png) + +Reference documentation: + +* [Backup Manager](https://docs.nocobase.com/handbook/backups) + +### Public Forms + +Share public forms externally to collect information from anonymous users. + +![20241201165614](https://static-docs.nocobase.com/20241201165614.png) + +Reference documentation: + +* [Public Forms](https://docs.nocobase.com/handbook/public-forms) + +### Data Source: KingbaseES + +Use the KingbaseES database as a data source, either as the main database or an external database. + +![20241024121815](https://static-docs.nocobase.com/20241024121815.png) + +Reference documentation: + +* [Data Source - KingbaseES](https://docs.nocobase.com/handbook/data-source-kingbase) + +### Data Source: External Oracle + +Use external Oracle databases as a data source. + +![628abc5eb797e6b903d4b548f773a13b.png](https://static-docs.nocobase.com/628abc5eb797e6b903d4b548f773a13b.png) + +Reference documentation: + +* [External Data Source - Oracle](https://docs.nocobase.com/handbook/data-source-external-oracle) + +### Collection Field: Attachments (URL) + +Supports URL-based attachments. + +![e8772bec3d4b1771c1b21d087c9a4185.png](https://static-docs.nocobase.com/e8772bec3d4b1771c1b21d087c9a4185.png) + +Reference documentation: + +* [Data Table Field: Attachments (URL)](https://docs.nocobase.com/handbook/field-attachment-url) + +### Field Component: Mask + +![20241201165938](https://static-docs.nocobase.com/20241201165938.png) + +Reference documentation: + +* [Field component: Mask](https://docs.nocobase.com/handbook/field-component-mask) + +### Workflow: JavaScript + +JavaScript nodes allow users to execute JavaScript within a workflow. The script can use variables from upstream nodes in the process as parameters and the return value of the script can be used in downstream nodes. + +![20241202203655](https://static-docs.nocobase.com/20241202203655.png) + +Reference documentation: + +* [Workflow - JavaScript](https://docs.nocobase.com/handbook/workflow-javascript) + +### Data Visualization: ECharts + +Added ECharts, supporting funnel, radar and more charts, and providing more user-friendly configurations. + +![data-visualization-echarts](https://static-docs.nocobase.com/202410091022965.png) + +Reference documentation: + +* [Data Visualization: Echarts](https://docs.nocobase.com/handbook/data-visualization-echarts) + +### Block: Multi-step form + +![a503e153e8d714b9ca56f512142aeef1.png](https://static-docs.nocobase.com/a503e153e8d714b9ca56f512142aeef1.png) + +Reference documentation: + +* [Multi-step form](https://docs.nocobase.com/handbook/block-multi-step-from) + +### Block: Action Panel + +Designed to house various quick actions, currently supports: + +* Link +* Scan QR code +* Popup +* Custom request + +Supports both grid and list layouts + +![9942e6741e99195713f9e2981b02f228.png](https://static-docs.nocobase.com/9942e6741e99195713f9e2981b02f228.png) + +Reference documentation: + +* [Action Panel](https://docs.nocobase.com/handbook/block-action-panel) + ## [v1.3.55](https://github.com/nocobase/nocobase/compare/v1.3.54...v1.3.55) - 2024-12-03 ### 🚀 Improvements diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index f9db2b600b..7a8f5bca2b 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -5,6 +5,144 @@ 格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), 并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。 +## [v1.4.0](https://github.com/nocobase/nocobase/compare/v1.3.53...v1.4.0) - 2024-12-03 + +## 🎉 主要新特性 + +### 简化插件的添加和更新流程 + +![20241201170853](https://static-docs.nocobase.com/20241201170853.png) + +- 插件列表直接读取本地目录 +- 合并插件添加和更新流程 +- 界面支持批量激活插件 +- 简化商业插件下载和升级流程 + +参考文档: + +- [发布日志 / 简化插件的添加和更新流程](https://www.nocobase.com/cn/blog/simplify-the-process-of-adding-and-updating-plugins) + +### 通知 + +![20241201171806](https://static-docs.nocobase.com/20241201171806.png) + +- 站内信:支持用户在 NocoBase 应用内实时接收消息通知; +- 电子邮件:通过电子邮件渠道发送通知,目前只支持 SMTP 传输方式; +- 企微通知:通过企业微信渠道发送通知。 + +参考文档: + +- [通知管理](https://docs-cn.nocobase.com/handbook/notification-manager) + +### 用户数据同步 + +![20241201172843](https://static-docs.nocobase.com/20241201172843.png) + +参考文档: + +- [用户数据同步](https://docs-cn.nocobase.com/handbook/user-data-sync) + +### 备份管理器 + +![20241201170237](https://static-docs.nocobase.com/20241201170237.png) + +参考文档: + +- [备份管理器](https://docs-cn.nocobase.com/handbook/backups) + +### 公开表单 + +对外分享公开表单,向匿名用户收集信息。 + +![20241201165614](https://static-docs.nocobase.com/20241201165614.png) + +参考文档: + +- [公开表单](https://docs-cn.nocobase.com/handbook/public-forms) + +### 数据源:人大金仓(KingbaseES) + +使用人大金仓(KingbaseES)数据库作为数据源,可以作为主数据库,也可以作为外部数据库使用。 + +![20241024121815](https://static-docs.nocobase.com/20241024121815.png) + +参考文档: + +- [数据源 - 人大金仓(KingbaseES)](https://docs-cn.nocobase.com/handbook/data-source-kingbase) + +### 数据源:外部 Oracle + +使用外部的 Oracle 数据库作为数据源。 + +![701f8271f153d417e6f25c8ba74c931d.png](https://static-docs.nocobase.com/701f8271f153d417e6f25c8ba74c931d.png) + +参考文档: + +- [数据源:外部 Oracle](https://docs-cn.nocobase.com/handbook/data-source-external-oracle) + +### 数据表字段:附件(URL) + +支持 URL 格式的附件 + +![e8772bec3d4b1771c1b21d087c9a4185.png](https://static-docs.nocobase.com/e8772bec3d4b1771c1b21d087c9a4185.png) + +参考文档: + +- [数据表字段:附件(URL)](https://docs-cn.nocobase.com/handbook/field-attachment-url) + +### 字段组件:掩码 + +![20241201165938](https://static-docs.nocobase.com/20241201165938.png) + +参考文档: + +- [字段组件:掩码](https://docs-cn.nocobase.com/handbook/field-component-mask) + +### 工作流:JavaScript + +JavaScript 节点允许用户在工作流中执行一段自定义的服务端 JavaScript 脚本。脚本中可以使用流程上游的变量作为参数,并且可以将脚本的返回值提供给下游节点使用。 + +![20241202203655](https://static-docs.nocobase.com/20241202203655.png) + +参考文档: + +- [工作流 - JavaScript](https://docs-cn.nocobase.com/handbook/workflow-javascript) + +### 数据可视化:ECharts + +新增 ECharts 的图表的支持,支持漏斗图、雷达图等更多图形,并提供更友好的图形配置项。 + +![data-visualization-echarts](https://static-docs.nocobase.com/202410091022965.png) + +参考文档: + +- [数据可视化:ECharts](https://docs-cn.nocobase.com/handbook/data-visualization-echarts) + +### 区块:分步表单 + +![a503e153e8d714b9ca56f512142aeef1.png](https://static-docs.nocobase.com/a503e153e8d714b9ca56f512142aeef1.png) + +参考文档: + +- [分步表单](https://docs-cn.nocobase.com/handbook/block-multi-step-from) + +### 区块:操作面板 + +用于放置各种快捷操作,目前支持: + +- 链接 +- 扫二维码 +- 弹窗 +- 自定义请求 + +支持栅格和列表两种布局 + +![48bd2e280aa887f3e5bd43d6c79d6b46.png](https://static-docs.nocobase.com/48bd2e280aa887f3e5bd43d6c79d6b46.png) + +参考文档: + +- [操作面板](https://docs-cn.nocobase.com/handbook/block-action-panel) + ## [v1.3.55](https://github.com/nocobase/nocobase/compare/v1.3.54...v1.3.55) - 2024-12-03 ### 🚀 优化 diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/hooks/useTableBlockProps.tsx b/packages/core/client/src/modules/blocks/data-blocks/table/hooks/useTableBlockProps.tsx index 72ad32b984..dc4f2ba2d8 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/hooks/useTableBlockProps.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/table/hooks/useTableBlockProps.tsx @@ -125,12 +125,8 @@ export const useTableBlockProps = () => { dataBlocks.forEach((block) => { const target = targets.find((target) => target.uid === block.uid); if (!target) return; - - const isForeignKey = block.foreignKeyFields?.some((field) => field.name === target.field); - const sourceKey = getSourceKey(currentBlock, target.field); - const recordKey = isForeignKey ? sourceKey : tableBlockContextBasicValue.rowKey; - const value = [record[recordKey]]; - + const sourceKey = getSourceKey(currentBlock, target.field) || tableBlockContextBasicValue.rowKey || 'id'; + const value = [record[sourceKey]]; const param = block.service.params?.[0] || {}; // 保留原有的 filter const storedFilter = block.service.params?.[1]?.filters || {}; @@ -184,5 +180,5 @@ export const useTableBlockProps = () => { function getSourceKey(currentBlock: DataBlock, field: string) { const associationField = currentBlock?.associatedFields?.find((item) => item.foreignKey === field); - return associationField?.sourceKey || 'id'; + return associationField?.sourceKey || field?.split?.('.')?.[1]; } diff --git a/packages/plugins/@nocobase/plugin-user-data-sync/package.json b/packages/plugins/@nocobase/plugin-user-data-sync/package.json index f7dbaf74df..e62ac40f80 100644 --- a/packages/plugins/@nocobase/plugin-user-data-sync/package.json +++ b/packages/plugins/@nocobase/plugin-user-data-sync/package.json @@ -2,8 +2,8 @@ "name": "@nocobase/plugin-user-data-sync", "displayName": "User data synchronization", "displayName.zh-CN": "用户数据同步", - "description": "Provide user data source management and user data synchronization interface. The data source can be DingTalk, WeCom, etc., and can be expanded.", - "description.zh-CN": "提供用户数据源管理,用户数据同步接口,数据源可为钉钉、企业微信等,可扩展。", + "description": "Reigster and manage extensible user data synchronization sources, with HTTP API provided by default. Support for synchronizing data to resources such as users and departments.", + "description.zh-CN": "注册和管理可扩展的用户数据同步来源,默认提供 HTTP API。支持向用户和部门等资源同步数据。", "version": "1.5.0-alpha.5", "main": "dist/server/index.js", "peerDependencies": { diff --git a/release.sh b/release.sh index 9fd46e956b..80152ca599 100755 --- a/release.sh +++ b/release.sh @@ -15,6 +15,9 @@ if [ "$branch" == "main" ]; then elif [ "$branch" == "next" ]; then # beta if [ "$1" == '--is-feat' ]; then + if [ "$2" == '--add-minor' ]; then + minor=$((minor + 1)) + fi new_version="$major.$minor.0-beta.1" echo $new_version; else