Merge branch '@hera/dev' of ssh://git.daoyoucloud.com:13004/daoyoucloud/tachycode into feat_record_check_vehicles

This commit is contained in:
lyx 2024-03-19 13:25:52 +08:00
commit 4bd98be813
124 changed files with 823 additions and 486 deletions

93
.github/workflows/manual-e2e.yml vendored Normal file
View File

@ -0,0 +1,93 @@
name: manual-e2e
on:
workflow_dispatch:
inputs:
branch:
description: 'nocobase/pro-plugins repository branch'
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.branch }}
cancel-in-progress: true
jobs:
e2e-test-postgres:
strategy:
matrix:
node_version: ['18']
runs-on: ubuntu-latest
container: node:${{ matrix.node_version }}
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:11
# Provide the password for postgres
env:
POSTGRES_USER: nocobase
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout pro-plugins - ${{ inputs.branch }}
uses: actions/checkout@v3
with:
repository: nocobase/pro-plugins
ref: ${{ inputs.branch }}
path: packages/pro-plugins
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
# - name: Set variables
# run: |
# target_directory="./packages/pro-plugins/@nocobase"
# subdirectories=$(find "$target_directory" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | tr '\n' ' ')
# trimmed_variable=$(echo "$subdirectories" | xargs)
# packageNames="@nocobase/${trimmed_variable// / @nocobase/}"
# pluginNames="${trimmed_variable//plugin-/}"
# BEFORE_PACK_NOCOBASE="yarn add @nocobase/plugin-notifications @nocobase/plugin-disable-pm-add $packageNames -W"
# APPEND_PRESET_LOCAL_PLUGINS="notifications,disable-pm-add,${pluginNames// /,}"
# echo "var1=$BEFORE_PACK_NOCOBASE" >> $GITHUB_OUTPUT
# echo "var2=$APPEND_PRESET_LOCAL_PLUGINS" >> $GITHUB_OUTPUT
# id: vars
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: ls -a ./node_modules/@nocobase
- name: yarn build
run: yarn build
env:
__E2E__: true
- run: npx playwright install chromium --with-deps
- name: Test with postgres
run: yarn e2e p-test
env:
__E2E__: true
APP_ENV: production
LOGGER_LEVEL: error
DB_DIALECT: postgres
DB_HOST: postgres
DB_PORT: 5432
DB_USER: nocobase
DB_PASSWORD: password
DB_DATABASE: nocobase
APPEND_PRESET_BUILT_IN_PLUGINS: mock-collections,workflow-response-message,workflow-request-interceptor,workflow-json-query,workflow-approval,telemetry-prometheus,data-source-external-postgres,embed,data-source-external-mysql,workflow-variable,collection-fdw,demo-platform,departments,data-source-external-mariadb
timeout-minutes: 120

View File

@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v0.20.0-alpha.14](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.13...v0.20.0-alpha.14) - 2024-03-18
### Merged
- refactor: url field support text type as availableTypes [`#3751`](https://github.com/nocobase/nocobase/pull/3751)
- chore: system logger with error stack [`#3747`](https://github.com/nocobase/nocobase/pull/3747)
- chore: adapt to plugin-custom-brand [`#3740`](https://github.com/nocobase/nocobase/pull/3740)
- fix(data-vi): tooltip bug of pie chart [`#3745`](https://github.com/nocobase/nocobase/pull/3745)
### Commits
- chore(versions): 😊 publish v0.20.0-alpha.14 [`c75d38b`](https://github.com/nocobase/nocobase/commit/c75d38bb05b8d1924d35c1ad1b175f7801d9c3b5)
- fix(field-interface): nested filterable [`3b61968`](https://github.com/nocobase/nocobase/commit/3b619682ee91426a1f091d2043a3aa876446bacc)
- chore: update changelog [`84f0808`](https://github.com/nocobase/nocobase/commit/84f080846ce459e5ba1bb8fa4074057beb40fb07)
## [v0.20.0-alpha.13](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.12...v0.20.0-alpha.13) - 2024-03-17
### Merged
- fix: collections undefined inuseCollectionState [`#3741`](https://github.com/nocobase/nocobase/pull/3741)
- test(acl):column action acl e2e [`#3738`](https://github.com/nocobase/nocobase/pull/3738)
- refactor: colDivider style improve for draging overing [`#3709`](https://github.com/nocobase/nocobase/pull/3709)
- fix(data-vi): association fields transform bug [`#3737`](https://github.com/nocobase/nocobase/pull/3737)
- fix(acl): invalid action permission judgment [`#3735`](https://github.com/nocobase/nocobase/pull/3735)
### Commits
- chore(versions): 😊 publish v0.20.0-alpha.13 [`db9ff33`](https://github.com/nocobase/nocobase/commit/db9ff337e5e69a5462be8474caea1eaf59ff9342)
- fix: console command [`820352f`](https://github.com/nocobase/nocobase/commit/820352f280abd61ae43c5f29b37db889388ba044)
- chore: update changelog [`6f74230`](https://github.com/nocobase/nocobase/commit/6f7423037a5c7ccb5d442549a22b81453430d971)
## [v0.20.0-alpha.12](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.11...v0.20.0-alpha.12) - 2024-03-16 ## [v0.20.0-alpha.12](https://github.com/nocobase/nocobase/compare/v0.20.0-alpha.11...v0.20.0-alpha.12) - 2024-03-16
### Merged ### Merged

View File

@ -1,5 +1,5 @@
{ {
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"], "npmClientArgs": ["--ignore-engines"],

View File

@ -1,13 +1,13 @@
{ {
"name": "@nocobase/acl", "name": "@nocobase/acl",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/resourcer": "0.20.0-alpha.12", "@nocobase/resourcer": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"minimatch": "^5.1.1" "minimatch": "^5.1.1"
}, },
"repository": { "repository": {

View File

@ -1,14 +1,14 @@
{ {
"name": "@nocobase/actions", "name": "@nocobase/actions",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/cache": "0.20.0-alpha.12", "@nocobase/cache": "0.20.0-alpha.14",
"@nocobase/database": "0.20.0-alpha.12", "@nocobase/database": "0.20.0-alpha.14",
"@nocobase/resourcer": "0.20.0-alpha.12" "@nocobase/resourcer": "0.20.0-alpha.14"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,17 +1,17 @@
{ {
"name": "@nocobase/app", "name": "@nocobase/app",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/database": "0.20.0-alpha.12", "@nocobase/database": "0.20.0-alpha.14",
"@nocobase/preset-nocobase": "0.20.0-alpha.12", "@nocobase/preset-nocobase": "0.20.0-alpha.14",
"@nocobase/server": "0.20.0-alpha.12" "@nocobase/server": "0.20.0-alpha.14"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/client": "0.20.0-alpha.12" "@nocobase/client": "0.20.0-alpha.14"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,16 +1,16 @@
{ {
"name": "@nocobase/auth", "name": "@nocobase/auth",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/actions": "0.20.0-alpha.12", "@nocobase/actions": "0.20.0-alpha.14",
"@nocobase/cache": "0.20.0-alpha.12", "@nocobase/cache": "0.20.0-alpha.14",
"@nocobase/database": "0.20.0-alpha.12", "@nocobase/database": "0.20.0-alpha.14",
"@nocobase/resourcer": "0.20.0-alpha.12", "@nocobase/resourcer": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"@types/jsonwebtoken": "^8.5.8", "@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1" "jsonwebtoken": "^8.5.1"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/build", "name": "@nocobase/build",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "Library build tool based on rollup.", "description": "Library build tool based on rollup.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/cache", "name": "@nocobase/cache",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/cli", "name": "@nocobase/cli",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./src/index.js", "main": "./src/index.js",
@ -8,7 +8,7 @@
"nocobase": "./bin/index.js" "nocobase": "./bin/index.js"
}, },
"dependencies": { "dependencies": {
"@nocobase/app": "0.20.0-alpha.12", "@nocobase/app": "0.20.0-alpha.14",
"@types/fs-extra": "^11.0.1", "@types/fs-extra": "^11.0.1",
"@umijs/utils": "3.5.20", "@umijs/utils": "3.5.20",
"chalk": "^4.1.1", "chalk": "^4.1.1",
@ -25,7 +25,7 @@
"tsx": "^4.6.2" "tsx": "^4.6.2"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/devtools": "0.20.0-alpha.12" "@nocobase/devtools": "0.20.0-alpha.14"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -348,15 +348,17 @@ exports.initEnv = function initEnv() {
} }
} }
if (process.env.APP_PUBLIC_PATH) { if (!process.env.__env_modified__ && process.env.APP_PUBLIC_PATH) {
const publicPath = process.env.APP_PUBLIC_PATH.replace(/\/$/g, ''); const publicPath = process.env.APP_PUBLIC_PATH.replace(/\/$/g, '');
const keys = ['API_BASE_PATH', 'WS_PATH', 'PLUGIN_STATICS_PATH']; const keys = ['API_BASE_PATH', 'WS_PATH', 'PLUGIN_STATICS_PATH'];
for (const key of keys) { for (const key of keys) {
process.env[key] = publicPath + process.env[key]; process.env[key] = publicPath + process.env[key];
} }
process.env.__env_modified__ = true;
} }
if (process.env.APP_SERVER_BASE_URL && !process.env.API_BASE_URL) { if (!process.env.__env_modified__ && process.env.APP_SERVER_BASE_URL && !process.env.API_BASE_URL) {
process.env.API_BASE_URL = process.env.APP_SERVER_BASE_URL + process.env.API_BASE_PATH; process.env.API_BASE_URL = process.env.APP_SERVER_BASE_URL + process.env.API_BASE_PATH;
process.env.__env_modified__ = true;
} }
}; };

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/client", "name": "@nocobase/client",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.mjs", "module": "es/index.mjs",
@ -26,9 +26,9 @@
"@formily/reactive-react": "^2.2.27", "@formily/reactive-react": "^2.2.27",
"@formily/shared": "^2.2.27", "@formily/shared": "^2.2.27",
"@formily/validator": "^2.2.27", "@formily/validator": "^2.2.27",
"@nocobase/evaluators": "0.20.0-alpha.12", "@nocobase/evaluators": "0.20.0-alpha.14",
"@nocobase/sdk": "0.20.0-alpha.12", "@nocobase/sdk": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"ahooks": "^3.7.2", "ahooks": "^3.7.2",
"antd": "^5.12.8", "antd": "^5.12.8",
"antd-style": "3.4.5", "antd-style": "3.4.5",

View File

@ -2,7 +2,7 @@ import type { Application } from './Application';
import type { Plugin } from './Plugin'; import type { Plugin } from './Plugin';
import { getPlugins } from './utils/remotePlugins'; import { getPlugins } from './utils/remotePlugins';
export type PluginOptions<T = any> = { name?: string; config?: T }; export type PluginOptions<T = any> = { name?: string; packageName?: string; config?: T };
export type PluginType<Opts = any> = typeof Plugin | [typeof Plugin, PluginOptions<Opts>]; export type PluginType<Opts = any> = typeof Plugin | [typeof Plugin, PluginOptions<Opts>];
export type PluginData = { export type PluginData = {
name: string; name: string;
@ -63,6 +63,11 @@ export class PluginManager {
if (opts.name) { if (opts.name) {
this.pluginsAliases[opts.name] = instance; this.pluginsAliases[opts.name] = instance;
} }
if (opts.packageName) {
this.pluginsAliases[opts.packageName] = instance;
}
await instance.afterAdd(); await instance.afterAdd();
} }

View File

@ -1,7 +1,7 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@formily/react';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import { defaultProps, operators, recordPickerViewer } from './properties';
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface'; import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
import { defaultProps, recordPickerViewer } from './properties';
export class CreatedByFieldInterface extends CollectionFieldInterface { export class CreatedByFieldInterface extends CollectionFieldInterface {
name = 'createdBy'; name = 'createdBy';
@ -32,28 +32,30 @@ export class CreatedByFieldInterface extends CollectionFieldInterface {
...defaultProps, ...defaultProps,
}; };
filterable = { filterable = {
children: [ nested: true,
{ children: [],
name: 'id', // children: [
title: '{{t("ID")}}', // {
operators: operators.id, // name: 'id',
schema: { // title: '{{t("ID")}}',
title: '{{t("ID")}}', // operators: operators.id,
type: 'number', // schema: {
'x-component': 'InputNumber', // title: '{{t("ID")}}',
}, // type: 'number',
}, // 'x-component': 'InputNumber',
{ // },
name: 'nickname', // },
title: '{{t("Nickname")}}', // {
operators: operators.string, // name: 'nickname',
schema: { // title: '{{t("Nickname")}}',
title: '{{t("Nickname")}}', // operators: operators.string,
type: 'string', // schema: {
'x-component': 'Input', // title: '{{t("Nickname")}}',
}, // type: 'string',
}, // 'x-component': 'Input',
], // },
// },
// ],
}; };
schemaInitialize(schema: ISchema, { block }: { block: string }): void { schemaInitialize(schema: ISchema, { block }: { block: string }): void {

View File

@ -1,7 +1,7 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@formily/react';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import { defaultProps, operators, recordPickerViewer } from './properties';
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface'; import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
import { defaultProps, recordPickerViewer } from './properties';
export class UpdatedByFieldInterface extends CollectionFieldInterface { export class UpdatedByFieldInterface extends CollectionFieldInterface {
name = 'updatedBy'; name = 'updatedBy';
@ -32,28 +32,30 @@ export class UpdatedByFieldInterface extends CollectionFieldInterface {
...defaultProps, ...defaultProps,
}; };
filterable = { filterable = {
children: [ nested: true,
{ children: [],
name: 'id', // children: [
title: '{{t("ID")}}', // {
operators: operators.id, // name: 'id',
schema: { // title: '{{t("ID")}}',
title: '{{t("ID")}}', // operators: operators.id,
type: 'number', // schema: {
'x-component': 'InputNumber', // title: '{{t("ID")}}',
}, // type: 'number',
}, // 'x-component': 'InputNumber',
{ // },
name: 'nickname', // },
title: '{{t("Nickname")}}', // {
operators: operators.string, // name: 'nickname',
schema: { // title: '{{t("Nickname")}}',
title: '{{t("Nickname")}}', // operators: operators.string,
type: 'string', // schema: {
'x-component': 'Input', // title: '{{t("Nickname")}}',
}, // type: 'string',
}, // 'x-component': 'Input',
], // },
// },
// ],
}; };
schemaInitialize(schema: ISchema, { block }) { schemaInitialize(schema: ISchema, { block }) {
schema['properties'] = { schema['properties'] = {

View File

@ -9,13 +9,13 @@ export class UrlFieldInterface extends CollectionFieldInterface {
order = 5; order = 5;
title = '{{t("URL")}}'; title = '{{t("URL")}}';
default = { default = {
type: 'string', type: 'text',
uiSchema: { uiSchema: {
type: 'string', type: 'string',
'x-component': 'Input.URL', 'x-component': 'Input.URL',
}, },
}; };
availableTypes = ['string']; availableTypes = ['string', 'text'];
schemaInitialize(schema: ISchema, { block }) {} schemaInitialize(schema: ISchema, { block }) {}
properties = { properties = {
...defaultProps, ...defaultProps,

View File

@ -38,6 +38,7 @@ export * from './nocobase-buildin-plugin';
export * from './plugin-manager'; export * from './plugin-manager';
export * from './pm'; export * from './pm';
export * from './powered-by'; export * from './powered-by';
export * from './powered-by-v2';
export * from './record-provider'; export * from './record-provider';
export * from './route-switch'; export * from './route-switch';
export * from './schema-component'; export * from './schema-component';

View File

@ -14,6 +14,7 @@ export const DetailsBlockInitializer = ({
createBlockSchema, createBlockSchema,
templateWrap, templateWrap,
showAssociationFields, showAssociationFields,
hideChildrenIfSingleCollection,
}: { }: {
filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean; filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean;
onlyCurrentDataSource: boolean; onlyCurrentDataSource: boolean;
@ -33,6 +34,7 @@ export const DetailsBlockInitializer = ({
}, },
) => any; ) => any;
showAssociationFields?: boolean; showAssociationFields?: boolean;
hideChildrenIfSingleCollection?: boolean;
}) => { }) => {
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();
const { getCollection } = useCollectionManager_deprecated(); const { getCollection } = useCollectionManager_deprecated();
@ -66,6 +68,7 @@ export const DetailsBlockInitializer = ({
filter={filterCollections} filter={filterCollections}
templateWrap={templateWrap} templateWrap={templateWrap}
showAssociationFields={showAssociationFields} showAssociationFields={showAssociationFields}
hideChildrenIfSingleCollection={hideChildrenIfSingleCollection}
/> />
); );
}; };

View File

@ -13,6 +13,7 @@ export const FormBlockInitializer = ({
componentType = 'FormItem', componentType = 'FormItem',
templateWrap, templateWrap,
showAssociationFields, showAssociationFields,
hideChildrenIfSingleCollection,
}: { }: {
filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean; filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean;
onlyCurrentDataSource: boolean; onlyCurrentDataSource: boolean;
@ -31,6 +32,7 @@ export const FormBlockInitializer = ({
}, },
) => any; ) => any;
showAssociationFields?: boolean; showAssociationFields?: boolean;
hideChildrenIfSingleCollection?: boolean;
}) => { }) => {
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();
const itemConfig = useSchemaInitializerItem(); const itemConfig = useSchemaInitializerItem();
@ -80,6 +82,7 @@ export const FormBlockInitializer = ({
onlyCurrentDataSource={onlyCurrentDataSource} onlyCurrentDataSource={onlyCurrentDataSource}
hideSearch={hideSearch} hideSearch={hideSearch}
showAssociationFields={showAssociationFields} showAssociationFields={showAssociationFields}
hideChildrenIfSingleCollection={hideChildrenIfSingleCollection}
/> />
); );
}; };

View File

@ -9,11 +9,11 @@ import { Collection, CollectionFieldOptions } from '../../../../data-source';
export const FilterCollapseBlockInitializer = ({ export const FilterCollapseBlockInitializer = ({
filterCollections, filterCollections,
onlyCurrentDataSource, onlyCurrentDataSource,
showChildren, hideChildrenIfSingleCollection,
}: { }: {
filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean; filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean;
onlyCurrentDataSource: boolean; onlyCurrentDataSource: boolean;
showChildren?: boolean; hideChildrenIfSingleCollection?: boolean;
}) => { }) => {
const itemConfig = useSchemaInitializerItem(); const itemConfig = useSchemaInitializerItem();
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();
@ -34,7 +34,7 @@ export const FilterCollapseBlockInitializer = ({
insert(schema); insert(schema);
}} }}
filter={filterCollections} filter={filterCollections}
showChildren={showChildren} hideChildrenIfSingleCollection={hideChildrenIfSingleCollection}
/> />
); );
}; };

View File

@ -8,11 +8,11 @@ import { Collection, CollectionFieldOptions } from '../../../../data-source';
export const FilterFormBlockInitializer = ({ export const FilterFormBlockInitializer = ({
filterCollections, filterCollections,
onlyCurrentDataSource, onlyCurrentDataSource,
showChildren, hideChildrenIfSingleCollection,
}: { }: {
filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean; filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean;
onlyCurrentDataSource: boolean; onlyCurrentDataSource: boolean;
showChildren?: boolean; hideChildrenIfSingleCollection?: boolean;
}) => { }) => {
const itemConfig = useSchemaInitializerItem(); const itemConfig = useSchemaInitializerItem();
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();
@ -45,7 +45,7 @@ export const FilterFormBlockInitializer = ({
); );
}} }}
filter={filterCollections} filter={filterCollections}
showChildren={showChildren} hideChildrenIfSingleCollection={hideChildrenIfSingleCollection}
/> />
); );
}; };

View File

@ -0,0 +1,25 @@
import { css } from '@emotion/css';
import React from 'react';
import { useToken } from '../style';
export const PoweredByV2 = () => {
const { token } = useToken();
const date = new Date();
const year = date.getFullYear();
return (
<div
className={css`
text-align: center;
color: ${token.colorTextDescription};
a {
color: ${token.colorTextDescription};
&:hover {
color: ${token.colorText};
}
}
`}
>
©2023-{year} ICP备2023024678号
</div>
);
};

View File

@ -1,20 +1,21 @@
import { css } from '@emotion/css'; import { css, cx } from '@emotion/css';
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useToken } from '../style'; import { useToken } from '../style';
import { usePlugin } from '../application';
import { parseHTML } from '@nocobase/utils/client';
import { useCurrentAppInfo } from '../appInfo/CurrentAppInfoProvider';
export const PoweredBy = () => { export const PoweredBy = () => {
const { i18n } = useTranslation(); const { i18n } = useTranslation();
const { token } = useToken(); const { token } = useToken();
const customBrandPlugin: any = usePlugin('@nocobase/plugin-custom-brand');
const data = useCurrentAppInfo();
const urls = { const urls = {
'en-US': 'https://www.nocobase.com', 'en-US': 'https://www.nocobase.com',
'zh-CN': 'https://cn.nocobase.com', 'zh-CN': 'https://cn.nocobase.com',
}; };
const date = new Date(); const style = css`
const year = date.getFullYear();
return (
<div
className={css`
text-align: center; text-align: center;
color: ${token.colorTextDescription}; color: ${token.colorTextDescription};
a { a {
@ -23,9 +24,19 @@ export const PoweredBy = () => {
color: ${token.colorText}; color: ${token.colorText};
} }
} }
`} `;
> const appVersion = `<span class="nb-app-version">v${data?.data?.version}</span>`;
©2023-{year} ICP备2023024678号
</div> return (
<div
className={cx(style, 'nb-brand')}
dangerouslySetInnerHTML={{
__html: parseHTML(
customBrandPlugin?.options?.options?.brand ||
`Powered by <a href="${urls[i18n.language] || urls['en-US']}">NocoBase</a>`,
{ appVersion },
),
}}
></div>
); );
}; };

View File

@ -41,7 +41,7 @@ export const Action: ComposedAction = observer(
title, title,
onClick, onClick,
style, style,
openSize, openSize: os,
disabled: propsDisabled, disabled: propsDisabled,
actionCallback, actionCallback,
/** 如果为 true 则说明该按钮是树表格的 Add child 按钮 */ /** 如果为 true 则说明该按钮是树表格的 Add child 按钮 */
@ -62,6 +62,8 @@ export const Action: ComposedAction = observer(
const record = useRecord(); const record = useRecord();
const designerProps = fieldSchema['x-designer-props']; const designerProps = fieldSchema['x-designer-props'];
const openMode = fieldSchema?.['x-component-props']?.['openMode']; const openMode = fieldSchema?.['x-component-props']?.['openMode'];
const openSize = fieldSchema?.['x-component-props']?.['openSize'];
const disabled = form.disabled || field.disabled || field.data?.disabled || propsDisabled; const disabled = form.disabled || field.disabled || field.data?.disabled || propsDisabled;
const linkageRules = fieldSchema?.['x-linkage-rules'] || []; const linkageRules = fieldSchema?.['x-linkage-rules'] || [];
const { designable } = useDesignable(); const { designable } = useDesignable();
@ -150,7 +152,6 @@ export const Action: ComposedAction = observer(
</SortableItem> </SortableItem>
); );
}; };
const result = ( const result = (
<ActionContextProvider <ActionContextProvider
button={renderButton()} button={renderButton()}

View File

@ -92,6 +92,7 @@ function useRecordBlocks() {
[templateWrap, templateWrapOfAssociationDetailsWithoutPagination], [templateWrap, templateWrapOfAssociationDetailsWithoutPagination],
), ),
showAssociationFields: true, showAssociationFields: true,
hideChildrenIfSingleCollection: true,
}; };
}, },
}, },
@ -119,6 +120,7 @@ function useRecordBlocks() {
createBlockSchema: createEditFormBlock, createBlockSchema: createEditFormBlock,
templateWrap: templateWrap, templateWrap: templateWrap,
showAssociationFields: true, showAssociationFields: true,
hideChildrenIfSingleCollection: true,
}; };
}, },
useVisible() { useVisible() {
@ -305,7 +307,6 @@ export const recordBlockInitializers_deprecated = new CompatibleSchemaInitialize
} }
}, },
onlyCurrentDataSource: true, onlyCurrentDataSource: true,
showChildren: true,
}; };
}, },
}, },
@ -327,7 +328,6 @@ export const recordBlockInitializers_deprecated = new CompatibleSchemaInitialize
} }
}, },
onlyCurrentDataSource: true, onlyCurrentDataSource: true,
showChildren: true,
}; };
}, },
}, },
@ -404,7 +404,6 @@ export const recordBlockInitializers = new CompatibleSchemaInitializer(
} }
}, },
onlyCurrentDataSource: true, onlyCurrentDataSource: true,
showChildren: true,
}; };
}, },
}, },
@ -426,7 +425,6 @@ export const recordBlockInitializers = new CompatibleSchemaInitializer(
} }
}, },
onlyCurrentDataSource: true, onlyCurrentDataSource: true,
showChildren: true,
}; };
}, },
}, },

View File

@ -275,8 +275,8 @@ export interface DataBlockInitializerProps {
onlyCurrentDataSource?: boolean; onlyCurrentDataSource?: boolean;
hideSearch?: boolean; hideSearch?: boolean;
showAssociationFields?: boolean; showAssociationFields?: boolean;
/** 即使 children 只有一个时,也显示出来 */ /** 如果只有一项数据表时,不显示 children 列表 */
showChildren?: boolean; hideChildrenIfSingleCollection?: boolean;
} }
export const DataBlockInitializer = (props: DataBlockInitializerProps) => { export const DataBlockInitializer = (props: DataBlockInitializerProps) => {
@ -291,7 +291,7 @@ export const DataBlockInitializer = (props: DataBlockInitializerProps) => {
onlyCurrentDataSource, onlyCurrentDataSource,
hideSearch, hideSearch,
showAssociationFields, showAssociationFields,
showChildren, hideChildrenIfSingleCollection,
filterDataSource, filterDataSource,
} = props; } = props;
const { insert, setVisible } = useSchemaInitializer(); const { insert, setVisible } = useSchemaInitializer();
@ -327,7 +327,7 @@ export const DataBlockInitializer = (props: DataBlockInitializerProps) => {
const compiledMenuItems = useMemo(() => { const compiledMenuItems = useMemo(() => {
let children = searchedChildren.filter((item) => item.key !== 'search' && item.key !== 'empty'); let children = searchedChildren.filter((item) => item.key !== 'search' && item.key !== 'empty');
const hasAssociationField = children.some((item) => item.associationField); const hasAssociationField = children.some((item) => item.associationField);
if (!showChildren && !hasAssociationField && children.length === 1) { if (hideChildrenIfSingleCollection && !hasAssociationField && children.length === 1) {
// 只有一项可选时,直接展开 // 只有一项可选时,直接展开
children = children[0].children; children = children[0].children;
} else { } else {

View File

@ -1,10 +1,12 @@
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { Dropdown, Menu } from 'antd'; import { Dropdown, Menu, Popover } from 'antd';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { DropdownVisibleContext, useToken } from '..'; import { DropdownVisibleContext, usePlugin, useToken } from '..';
import { useCurrentAppInfo } from '../appInfo/CurrentAppInfoProvider'; import { useCurrentAppInfo } from '../appInfo/CurrentAppInfoProvider';
import { observer } from '@formily/reactive-react';
import { parseHTML } from '@nocobase/utils/client';
/** /**
* @note If you want to change here, Note the Setting block on the mobile side * @note If you want to change here, Note the Setting block on the mobile side
@ -66,13 +68,7 @@ const SettingsMenu: React.FC<{
return <Menu items={items} />; return <Menu items={items} />;
}; };
export const Help = () => { const helpClassName = css`
const [visible, setVisible] = useState(false);
const { token } = useToken();
return (
<div
className={css`
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
width: 46px; width: 46px;
@ -80,18 +76,16 @@ export const Help = () => {
&:hover { &:hover {
background: rgba(255, 255, 255, 0.1) !important; background: rgba(255, 255, 255, 0.1) !important;
} }
`} `;
>
<DropdownVisibleContext.Provider value={{ visible, setVisible }}> export const Help = observer(
<Dropdown () => {
open={visible} const [visible, setVisible] = useState(false);
onOpenChange={(visible) => { const { token } = useToken();
setVisible(visible); const customBrandPlugin: any = usePlugin('@nocobase/plugin-custom-brand');
}} const data = useCurrentAppInfo();
dropdownRender={() => {
return <SettingsMenu />; const icon = (
}}
>
<span <span
data-testid="help-button" data-testid="help-button"
className={css` className={css`
@ -106,8 +100,42 @@ export const Help = () => {
> >
<QuestionCircleOutlined /> <QuestionCircleOutlined />
</span> </span>
);
if (customBrandPlugin?.options?.options?.about) {
const appVersion = `<span class="nb-app-version">v${data?.data?.version}</span>`;
const content = parseHTML(customBrandPlugin.options.options.about, { appVersion });
return (
<div className={helpClassName}>
<Popover
// nb-about 的样式定义在 plugin-custom-brand 插件中
rootClassName="nb-about"
content={<div dangerouslySetInnerHTML={{ __html: content }}></div>}
>
{icon}
</Popover>
</div>
);
}
return (
<div className={helpClassName}>
<DropdownVisibleContext.Provider value={{ visible, setVisible }}>
<Dropdown
open={visible}
onOpenChange={(visible) => {
setVisible(visible);
}}
dropdownRender={() => {
return <SettingsMenu />;
}}
>
{icon}
</Dropdown> </Dropdown>
</DropdownVisibleContext.Provider> </DropdownVisibleContext.Provider>
</div> </div>
); );
}; },
{ displayName: 'Help' },
);

View File

@ -1,6 +1,6 @@
{ {
"name": "create-nocobase-app", "name": "create-nocobase-app",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "src/index.js", "main": "src/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {

View File

@ -1,16 +1,16 @@
{ {
"name": "@nocobase/data-source-manager", "name": "@nocobase/data-source-manager",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/actions": "0.20.0-alpha.12", "@nocobase/actions": "0.20.0-alpha.14",
"@nocobase/cache": "0.20.0-alpha.12", "@nocobase/cache": "0.20.0-alpha.14",
"@nocobase/database": "0.20.0-alpha.12", "@nocobase/database": "0.20.0-alpha.14",
"@nocobase/resourcer": "0.20.0-alpha.12", "@nocobase/resourcer": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"@types/jsonwebtoken": "^8.5.8", "@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1" "jsonwebtoken": "^8.5.1"
}, },

View File

@ -1,10 +1,10 @@
import { ACL } from '@nocobase/acl'; import { ACL } from '@nocobase/acl';
import { getNameByParams, parseRequest } from '@nocobase/resourcer'; import { getNameByParams, parseRequest } from '@nocobase/resourcer';
import compose from 'koa-compose';
import { ResourceManager } from './resource-manager';
import { loadDefaultActions } from './load-default-actions';
import { ICollectionManager } from './types';
import EventEmitter from 'events'; import EventEmitter from 'events';
import compose from 'koa-compose';
import { loadDefaultActions } from './load-default-actions';
import { ResourceManager } from './resource-manager';
import { ICollectionManager } from './types';
export type DataSourceOptions = any; export type DataSourceOptions = any;
@ -30,7 +30,7 @@ export abstract class DataSource extends EventEmitter {
this.acl = this.createACL(); this.acl = this.createACL();
this.resourceManager = this.createResourceManager({ this.resourceManager = this.createResourceManager({
prefix: '/api', prefix: process.env.API_BASE_PATH,
...options.resourceManager, ...options.resourceManager,
}); });

View File

@ -1,13 +1,13 @@
{ {
"name": "@nocobase/database", "name": "@nocobase/database",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@nocobase/logger": "0.20.0-alpha.12", "@nocobase/logger": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"async-mutex": "^0.3.2", "async-mutex": "^0.3.2",
"chalk": "^4.1.1", "chalk": "^4.1.1",
"cron-parser": "4.4.0", "cron-parser": "4.4.0",

View File

@ -1,13 +1,13 @@
{ {
"name": "@nocobase/devtools", "name": "@nocobase/devtools",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./src/index.js", "main": "./src/index.js",
"dependencies": { "dependencies": {
"@nocobase/build": "0.20.0-alpha.12", "@nocobase/build": "0.20.0-alpha.14",
"@nocobase/client": "0.20.0-alpha.12", "@nocobase/client": "0.20.0-alpha.14",
"@nocobase/test": "0.20.0-alpha.12", "@nocobase/test": "0.20.0-alpha.14",
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",
"@types/koa-bodyparser": "^4.3.4", "@types/koa-bodyparser": "^4.3.4",
"@types/lodash": "^4.14.177", "@types/lodash": "^4.14.177",

View File

@ -1,13 +1,13 @@
{ {
"name": "@nocobase/evaluators", "name": "@nocobase/evaluators",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@formulajs/formulajs": "4.2.0", "@formulajs/formulajs": "4.2.0",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"mathjs": "^10.6.0" "mathjs": "^10.6.0"
}, },
"repository": { "repository": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/logger", "name": "@nocobase/logger",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "nocobase logging library", "description": "nocobase logging library",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",

View File

@ -49,11 +49,12 @@ class SystemLoggerTransport extends Transport {
} }
log(info: any, callback: any) { log(info: any, callback: any) {
const { level, message, reqId, app, [SPLAT]: args } = info; const { level, message, reqId, app, stack, [SPLAT]: args } = info;
const logger = level === 'error' && this.errorLogger ? this.errorLogger : this.logger; const logger = level === 'error' && this.errorLogger ? this.errorLogger : this.logger;
const { module, submodule, method, ...meta } = args?.[0] || {}; const { module, submodule, method, ...meta } = args?.[0] || {};
logger.log({ logger.log({
level, level,
stack,
message, message,
meta, meta,
module: module || info['module'] || '', module: module || info['module'] || '',

View File

@ -1,12 +1,12 @@
{ {
"name": "@nocobase/resourcer", "name": "@nocobase/resourcer",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"koa-compose": "^4.1.0", "koa-compose": "^4.1.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/sdk", "name": "@nocobase/sdk",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/server", "name": "@nocobase/server",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
@ -10,18 +10,18 @@
"@koa/cors": "^3.1.0", "@koa/cors": "^3.1.0",
"@koa/multer": "^3.0.2", "@koa/multer": "^3.0.2",
"@koa/router": "^9.4.0", "@koa/router": "^9.4.0",
"@nocobase/acl": "0.20.0-alpha.12", "@nocobase/acl": "0.20.0-alpha.14",
"@nocobase/actions": "0.20.0-alpha.12", "@nocobase/actions": "0.20.0-alpha.14",
"@nocobase/auth": "0.20.0-alpha.12", "@nocobase/auth": "0.20.0-alpha.14",
"@nocobase/cache": "0.20.0-alpha.12", "@nocobase/cache": "0.20.0-alpha.14",
"@nocobase/data-source-manager": "0.20.0-alpha.12", "@nocobase/data-source-manager": "0.20.0-alpha.14",
"@nocobase/database": "0.20.0-alpha.12", "@nocobase/database": "0.20.0-alpha.14",
"@nocobase/evaluators": "0.20.0-alpha.12", "@nocobase/evaluators": "0.20.0-alpha.14",
"@nocobase/logger": "0.20.0-alpha.12", "@nocobase/logger": "0.20.0-alpha.14",
"@nocobase/resourcer": "0.20.0-alpha.12", "@nocobase/resourcer": "0.20.0-alpha.14",
"@nocobase/sdk": "0.20.0-alpha.12", "@nocobase/sdk": "0.20.0-alpha.14",
"@nocobase/telemetry": "0.20.0-alpha.12", "@nocobase/telemetry": "0.20.0-alpha.14",
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"@types/decompress": "4.2.4", "@types/decompress": "4.2.4",
"@types/ini": "^1.3.31", "@types/ini": "^1.3.31",
"@types/koa-send": "^4.1.3", "@types/koa-send": "^4.1.3",

View File

@ -23,7 +23,7 @@ export default (app: Application) => {
try { try {
await app.pm.addViaCLI(name, _.cloneDeep(options)); await app.pm.addViaCLI(name, _.cloneDeep(options));
} catch (error) { } catch (error) {
throw new PluginCommandError(`Failed to add plugin: ${error.message}`); throw new PluginCommandError(`Failed to add plugin`, { cause: error });
} }
}); });
@ -42,7 +42,7 @@ export default (app: Application) => {
packageName, packageName,
}); });
} catch (error) { } catch (error) {
throw new PluginCommandError(`Failed to update plugin: ${error.message}`); throw new PluginCommandError(`Failed to update plugin`, { cause: error });
} }
}); });
@ -54,7 +54,7 @@ export default (app: Application) => {
try { try {
await app.pm.enable(plugins); await app.pm.enable(plugins);
} catch (error) { } catch (error) {
throw new PluginCommandError(`Failed to enable plugin: ${error.message}`); throw new PluginCommandError(`Failed to enable plugin`, { cause: error });
} }
}); });
@ -66,7 +66,7 @@ export default (app: Application) => {
try { try {
await app.pm.disable(plugins); await app.pm.disable(plugins);
} catch (error) { } catch (error) {
throw new PluginCommandError(`Failed to disable plugin: ${error.message}`); throw new PluginCommandError(`Failed to disable plugin`, { cause: error });
} }
}); });

View File

@ -334,7 +334,7 @@ export class Gateway extends EventEmitter {
from: 'node', from: 'node',
}) })
.then(async () => { .then(async () => {
if (!(await mainApp.isStarted())) { if (!isStart && !(await mainApp.isStarted())) {
await mainApp.stop({ logging: false }); await mainApp.stop({ logging: false });
} }
}) })
@ -342,7 +342,7 @@ export class Gateway extends EventEmitter {
if (e.code !== 'commander.helpDisplayed') { if (e.code !== 'commander.helpDisplayed') {
mainApp.log.error(e); mainApp.log.error(e);
} }
if (!(await mainApp.isStarted())) { if (!isStart && !(await mainApp.isStarted())) {
await mainApp.stop({ logging: false }); await mainApp.stop({ logging: false });
} }
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/telemetry", "name": "@nocobase/telemetry",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "nocobase telemetry library", "description": "nocobase telemetry library",
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/index.js", "main": "./lib/index.js",
@ -11,7 +11,7 @@
"directory": "packages/telemetry" "directory": "packages/telemetry"
}, },
"dependencies": { "dependencies": {
"@nocobase/utils": "0.20.0-alpha.12", "@nocobase/utils": "0.20.0-alpha.14",
"@opentelemetry/api": "^1.7.0", "@opentelemetry/api": "^1.7.0",
"@opentelemetry/instrumentation": "^0.46.0", "@opentelemetry/instrumentation": "^0.46.0",
"@opentelemetry/resources": "^1.19.0", "@opentelemetry/resources": "^1.19.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/test", "name": "@nocobase/test",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "lib/index.js", "main": "lib/index.js",
"module": "./src/index.ts", "module": "./src/index.ts",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
@ -40,7 +40,7 @@
}, },
"dependencies": { "dependencies": {
"@faker-js/faker": "8.1.0", "@faker-js/faker": "8.1.0",
"@nocobase/server": "0.20.0-alpha.12", "@nocobase/server": "0.20.0-alpha.14",
"@playwright/test": "^1.42.1", "@playwright/test": "^1.42.1",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3", "@testing-library/user-event": "^14.4.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/utils", "name": "@nocobase/utils",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -18,3 +18,4 @@ export * from './isPortalInBody';
export * from './uid'; export * from './uid';
export * from './url'; export * from './url';
export { dayjs, lodash }; export { dayjs, lodash };
export * from './parseHTML';

View File

@ -0,0 +1,11 @@
/**
* parseHTML('<span>{{version}}</span>', { version: '1.0.0' }) -> '<span>1.0.0</span>'
* @param html
* @param variables
* @returns
*/
export function parseHTML(html: string, variables: Record<string, any>) {
return html.replace(/\{\{(\w+)\}\}/g, function (match, key) {
return typeof variables[key] !== 'undefined' ? variables[key] : match;
});
}

View File

@ -110,8 +110,6 @@ export const VariableInput = (props: Props) => {
operator, operator,
uiSchema, uiSchema,
targetFieldSchema, targetFieldSchema,
currentFormCollectionName,
currentIterationCollectionName,
}); });
const contextVariable = useContextAssociationFields({ schema, maxDepth: 2, contextCollectionName, collectionField }); const contextVariable = useContextAssociationFields({ schema, maxDepth: 2, contextCollectionName, collectionField });
const { compatOldVariables } = useCompatOldVariables({ const { compatOldVariables } = useCompatOldVariables({

View File

@ -0,0 +1,13 @@
export * from './custom-components/CustomAssociatedField';
export * from './custom-components/CustomComponentDispatcher';
export * from './custom-components/CustomField';
export * from './fields/AssociatedField';
export * from './fields/CalcResult';
export * from './fields/Expression';
export * from './system/MobileLink';
export * from './system/Notifications';
export * from './system/OnlineUserProvider';
export * from './PDFViewer';
export * from './SignatureInput';
export * from './SignaturePad';
export * from './GroupBlockConfigure/GroupBlockConfigure';

View File

@ -137,7 +137,6 @@ export const useFilterBlockActionProps = () => {
...Object.values(storedFilter).map((filter) => removeNullCondition(filter, fieldSchema)), ...Object.values(storedFilter).map((filter) => removeNullCondition(filter, fieldSchema)),
block.defaultFilter, block.defaultFilter,
]); ]);
return block.doFilter( return block.doFilter(
{ {
...param, ...param,

View File

@ -1,5 +1,4 @@
import React from 'react'; import React from 'react';
import { autorun } from '@formily/reactive';
import { import {
Menu, Menu,
Plugin, Plugin,
@ -9,27 +8,10 @@ import {
useCollection, useCollection,
} from '@nocobase/client'; } from '@nocobase/client';
import { remove } from 'lodash'; import { remove } from 'lodash';
import { CalendarBlockInitializer } from './schema-initializer/CalendarBlockInitializer';
import { MenuDesigner } from './schema-components/deprecated/ExtendedMenuDesigner';
import { InternalPDFViewer } from './schema-components/PDFViewer';
import {
PDFViewerBlockInitializer,
PDFViewerPrintActionInitializer,
PDFViewerProvider,
pdfViewActionInitializer,
usePDFViewerPrintActionProps,
} from './schema-initializer/PDFVIewerBlockInitializer';
import { useCustomizeUpdateActionProps } from './hooks/useCustomizeUpdateActionProps';
import { OutboundButton, OutboundLinkActionInitializer } from './schema-initializer/OutboundLinkActionInitializer';
import { CreateSubmitActionInitializer } from './schema-initializer/CreateSubmitActionInitializer';
import { FilterAssociatedFields } from './schema-initializer/FilterAssociatedFields';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@formily/react';
import { isValid } from '@formily/shared'; import { isValid } from '@formily/shared';
import { useCreateActionProps } from './hooks/useCreateActionProps'; import { autorun } from '@formily/reactive';
import { useOutboundActionProps } from './hooks/useOutboundActionProps'; import { Locale, tval } from './locale';
import { AssociatedField } from './components/fields/AssociatedField';
import { DatePicker } from './schema-components/date-picker';
import { SettingBlockInitializer } from './schema-initializer/SettingBlockInitializer';
import { import {
SessionSubmit, SessionSubmit,
SessionUpdate, SessionUpdate,
@ -42,45 +24,64 @@ import {
useSetFilterScopeVisible, useSetFilterScopeVisible,
AfterSuccess, AfterSuccess,
} from './schema-settings'; } from './schema-settings';
import { SignatureInput } from './components/SignatureInput'; import { useCreateActionProps } from './hooks/useCreateActionProps';
import { RemoteSelect } from './schema-components/remote-select'; import { useCustomizeUpdateActionProps } from './hooks/useCustomizeUpdateActionProps';
import { Select } from './schema-components/select/Select'; import { useFilterBlockActionProps } from './hooks/useFilterBlockActionProps';
import { Locale, tval } from './locale';
import {
GroupBlockInitializer,
GroupBlockProvider,
GroupBlockToolbar,
groupBlockSettings,
} from './schema-initializer/GroupBlockInitializer';
import { useFilterFormCustomProps } from './hooks/useFilterFormCustomProps'; import { useFilterFormCustomProps } from './hooks/useFilterFormCustomProps';
import { useGetCustomAssociatedComponents } from './hooks/useGetCustomAssociatedComponents';
import { useGetCustomComponents } from './hooks/useGetCustomComponents';
import { useOutboundActionProps } from './hooks/useOutboundActionProps';
import { AdminLayout, DetailsPage, HomePage, OutboundPage, PageLayout } from './pages';
import { Configuration, HomePageConfiguration, LinkManager } from './settings-manager-components';
import { import {
FilterFormItem, AssociatedFieldInterface,
FilterItemCustomDesigner, CalcFieldInterface,
FilterFormItemCustom, CustomFieldInterface,
} from './schema-initializer/FilterFormItemCustomInitializer/FilterFormItemCustom'; CustomAssociatedFieldInterface,
import { GroupBlock } from './schema-components/GroupBlock'; SignaturePadFieldInterface,
} from './interfaces';
import { import {
AssociatedField,
CalcResult,
CustomAssociatedField,
CustomField,
CustomComponentDispatcher, CustomComponentDispatcher,
CustomComponentStub, CustomComponentStub,
customComponentDispatcherSettings, customComponentDispatcherSettings,
} from './components/custom-components/CustomComponentDispatcher'; Expression,
import { useFilterBlockActionProps } from './hooks/useFilterBlockActionProps'; GroupBlockConfigure,
import { GroupBlockConfigure } from './components/GroupBlockConfigure/GroupBlockConfigure'; SignatureInput,
import { AssociatedFieldInterface } from './interfaces/associated'; } from './components';
import { CalcFieldInterface } from './interfaces/calc'; import {
import { CustomFieldInterface } from './interfaces/custom'; AutoComplete,
import { CustomAssociatedFieldInterface } from './interfaces/customAssociated'; DatePicker,
import { SignaturePadFieldInterface } from './interfaces/signatureSchema'; GroupBlock,
import { CalcResult } from './components/fields/CalcResult'; InternalPDFViewer,
import { CustomAssociatedField } from './components/custom-components/CustomAssociatedField'; MenuDesigner,
import Expression from './components/fields/Expression'; RemoteSelect,
import { CustomField } from './components/custom-components/CustomField'; Select,
import { useGetCustomAssociatedComponents } from './hooks/useGetCustomAssociatedComponents'; } from './schema-components';
import { useGetCustomComponents } from './hooks/useGetCustomComponents'; import {
import { AutoComplete } from './schema-components/AutoComplete/AutoComplete'; CalendarBlockInitializer,
import { AdminLayout, DetailsPage, HomePage, OutboundPage, PageLayout } from './pages'; CreateSubmitActionInitializer,
import { Configuration, HomePageConfiguration, LinkManager } from './settings-manager-components'; FilterAssociatedFields,
export { usePDFViewerRef } from './schema-initializer/PDFVIewerBlockInitializer'; FilterFormItem,
FilterFormItemCustom,
FilterItemCustomDesigner,
GroupBlockInitializer,
GroupBlockProvider,
GroupBlockToolbar,
OutboundButton,
OutboundLinkActionInitializer,
PDFViewerBlockInitializer,
PDFViewerPrintActionInitializer,
PDFViewerProvider,
SettingBlockInitializer,
groupBlockSettings,
pdfViewActionInitializer,
usePDFViewerPrintActionProps,
} from './schema-initializer';
export { usePDFViewerRef } from './schema-initializer';
export * from './components/custom-components/custom-components'; export * from './components/custom-components/custom-components';
export class PluginCoreClient extends Plugin { export class PluginCoreClient extends Plugin {
@ -104,6 +105,53 @@ export class PluginCoreClient extends Plugin {
}); });
this.schemaSettingsManager.add(groupBlockSettings); this.schemaSettingsManager.add(groupBlockSettings);
this.schemaSettingsManager.add(customComponentDispatcherSettings); this.schemaSettingsManager.add(customComponentDispatcherSettings);
this.schemaSettingsManager.addItem('FilterFormItemSettings', 'formulatitleField', {
Component: EditFormulaTitleField,
useVisible: useFormulaTitleVisible,
});
this.schemaSettingsManager.addItem('FormItemSettings', 'hera-divider', {
type: 'divider',
useVisible() {
const v1 = useFormulaTitleVisible();
const v2 = usePaginationVisible();
return v1 || v2;
},
});
this.schemaSettingsManager.addItem('FormItemSettings', 'formulatitleField', {
Component: EditFormulaTitleField,
useVisible: useFormulaTitleVisible,
});
this.schemaSettingsManager.addItem('FormItemSettings', 'isTablePageSize', {
Component: IsTablePageSize,
useVisible: usePaginationVisible,
});
this.schemaSettingsManager.addItem('ActionSettings', 'Customize.setFilterScope', {
Component: SetFilterScope,
useVisible: useSetFilterScopeVisible,
useComponentProps() {
const collection = useCollection();
return {
collectionName: collection.name,
};
},
});
const SchemaSettingOptionItems = this.schemaSettingsManager
.get('ActionSettings')
.items.filter((item) => item.name === 'Customize')[0].children;
SchemaSettingOptionItems.forEach((item) => {
if (item.name === 'afterSuccess') {
(item as SchemaSettingOptions).Component = AfterSuccess;
}
});
// 预览区块需要提前加进来,没法放在 afterload 中,这块后面需要重构
const previewBlockItem = {
title: tval('preview block'),
name: 'previewBlock',
type: 'itemGroup',
children: [],
};
this.app.schemaInitializerManager.get('popup:common:addBlock').add(previewBlockItem.name, previewBlockItem);
} }
async registerActions() { async registerActions() {
@ -126,57 +174,57 @@ export class PluginCoreClient extends Plugin {
async registerScopesAndComponents() { async registerScopesAndComponents() {
this.app.addScopes({ this.app.addScopes({
useOutboundActionProps,
useCustomizeUpdateActionProps,
useCreateActionProps, useCreateActionProps,
useFilterFormCustomProps, useCustomizeUpdateActionProps,
useFilterBlockActionProps, useFilterBlockActionProps,
usePDFViewerPrintActionProps, useFilterFormCustomProps,
useGetCustomAssociatedComponents, useGetCustomAssociatedComponents,
useGetCustomComponents, useGetCustomComponents,
useOutboundActionProps,
usePDFViewerPrintActionProps,
}); });
this.app.addComponents({ this.app.addComponents({
AssociatedField,
Expression,
CustomField,
CustomAssociatedField,
CalcResult,
PDFViewerPrintActionInitializer,
PDFViewerProvider,
GroupBlock,
CustomComponentStub,
CustomComponentDispatcher,
GroupBlockInitializer,
GroupBlockToolbar,
GroupBlockProvider,
DatePicker,
RemoteSelect,
SignatureInput,
OutboundButton,
OutboundLinkActionInitializer,
PDFViewerBlockInitializer,
PDFViwer: InternalPDFViewer,
AdminLayout, AdminLayout,
ExtendedCalendarBlockInitializer: CalendarBlockInitializer, AfterSuccess,
SettingBlock: SettingBlockInitializer, AssociatedField,
AutoComplete,
CalcResult,
CreateSubmitActionInitializer, CreateSubmitActionInitializer,
PageLayout, CustomAssociatedField,
FilterAssociatedFields, CustomComponentDispatcher,
FilterFormItemCustom, CustomComponentStub,
FilterFormItem, CustomField,
FilterItemCustomDesigner, DatePicker,
Select,
EditTitle, EditTitle,
EditTitleField, EditTitleField,
AfterSuccess, Expression,
ExtendedCalendarBlockInitializer: CalendarBlockInitializer,
FilterAssociatedFields,
FilterFormItem,
FilterFormItemCustom,
FilterItemCustomDesigner,
GroupBlock,
GroupBlockConfigure, GroupBlockConfigure,
AutoComplete, GroupBlockInitializer,
GroupBlockProvider,
GroupBlockToolbar,
Menu: { Menu: {
...Menu, ...Menu,
// @ts-ignore // @ts-ignore
Designer: MenuDesigner, Designer: MenuDesigner,
}, },
OutboundButton,
OutboundLinkActionInitializer,
PDFViewerBlockInitializer,
PDFViewerPrintActionInitializer,
PDFViewerProvider,
PDFViwer: InternalPDFViewer,
PageLayout,
RemoteSelect,
Select,
SettingBlock: SettingBlockInitializer,
SignatureInput,
}); });
} }
@ -282,8 +330,16 @@ export class PluginCoreClient extends Plugin {
); );
} }
async afterAdd() {} async registerInterfaces() {
async beforeLoad() {} this.app.dataSourceManager.addFieldInterfaces([
AssociatedFieldInterface,
CalcFieldInterface,
CustomFieldInterface,
CustomAssociatedFieldInterface,
SignaturePadFieldInterface,
]);
}
async afterLoad() { async afterLoad() {
// log for debug // log for debug
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
@ -295,16 +351,6 @@ export class PluginCoreClient extends Plugin {
await this.registerSchemaInitializer(); await this.registerSchemaInitializer();
} }
async registerInterfaces() {
this.app.dataSourceManager.addFieldInterfaces([
AssociatedFieldInterface,
CalcFieldInterface,
CustomFieldInterface,
CustomAssociatedFieldInterface,
SignaturePadFieldInterface,
]);
}
async load() { async load() {
this.locale = new Locale(this.app); this.locale = new Locale(this.app);
await this.registerTricks(); await this.registerTricks();
@ -313,51 +359,6 @@ export class PluginCoreClient extends Plugin {
await this.registerActions(); await this.registerActions();
await this.registerRouters(); await this.registerRouters();
await this.registerInterfaces(); await this.registerInterfaces();
this.schemaSettingsManager.addItem('FilterFormItemSettings', 'formulatitleField', {
Component: EditFormulaTitleField,
useVisible: useFormulaTitleVisible,
});
this.schemaSettingsManager.addItem('FormItemSettings', 'hera-divider', {
type: 'divider',
useVisible() {
const v1 = useFormulaTitleVisible();
const v2 = usePaginationVisible();
return v1 || v2;
},
});
this.schemaSettingsManager.addItem('FormItemSettings', 'formulatitleField', {
Component: EditFormulaTitleField,
useVisible: useFormulaTitleVisible,
});
this.schemaSettingsManager.addItem('FormItemSettings', 'isTablePageSize', {
Component: IsTablePageSize,
useVisible: usePaginationVisible,
});
this.schemaSettingsManager.addItem('ActionSettings', 'Customize.setFilterScope', {
Component: SetFilterScope,
useVisible: useSetFilterScopeVisible,
useComponentProps() {
const collection = useCollection();
return {
collectionName: collection.name,
};
},
});
const SchemaSettingOptionItems = this.schemaSettingsManager
.get('ActionSettings')
.items.filter((item) => item.name === 'Customize')[0].children;
SchemaSettingOptionItems.forEach((item) => {
if (item.name === 'afterSuccess') {
(item as SchemaSettingOptions).Component = AfterSuccess;
}
});
const previewBlockItem = {
title: tval('preview block'),
name: 'previewBlock',
type: 'itemGroup',
children: [],
};
this.app.schemaInitializerManager.get('RecordBlockInitializers').add(previewBlockItem.name, previewBlockItem);
// listen to connected events. // listen to connected events.
autorun(() => { autorun(() => {

View File

@ -0,0 +1,5 @@
export * from './associated';
export * from './calc';
export * from './custom';
export * from './customAssociated';
export * from './signatureSchema';

View File

@ -28,7 +28,7 @@ export const AutoComplete = (props) => {
}, },
}); });
changLable(defultOptions?.data?.data); changLable(defultOptions?.data?.data);
}, [fieldFilter?.filter]); }, [fieldFilter?.filter, fieldSchema['collectionName']]);
useEffect(() => { useEffect(() => {
changLable(defultValue); changLable(defultValue);
@ -57,14 +57,15 @@ export const AutoComplete = (props) => {
} }
const valueLabel = options.filter((item) => item.value === data)[0]; const valueLabel = options.filter((item) => item.value === data)[0];
if (valueLabel) { if (valueLabel) {
setValue(valueLabel.label);
form.values.custom[fieldSchema['collectionName']] = valueLabel; form.values.custom[fieldSchema['collectionName']] = valueLabel;
setValue(valueLabel.label);
} else { } else {
setValue(data);
form.values.custom[fieldSchema['collectionName']] = {}; form.values.custom[fieldSchema['collectionName']] = {};
form.values.custom[fieldSchema['collectionName']][fieldNames.label] = data; form.values.custom[fieldSchema['collectionName']][fieldNames.label] = data;
setValue(data);
} }
} else { } else {
form.values.custom[fieldSchema['collectionName']] = {};
setValue(data); setValue(data);
setOptions(defultValue); setOptions(defultValue);
} }

View File

@ -0,0 +1,62 @@
import { useField, useFieldSchema } from '@formily/react';
import { SchemaSettingsSelectItem, useCollectionManager, useDesignable } from '@nocobase/client';
import { useFieldComponents } from '../schema-initializer/FilterFormItemCustomInitializer/FilterFormItemCustom';
import React from 'react';
export const SchemaSettingComponent = () => {
const fieldSchema = useFieldSchema();
const field = useField();
const { options } = useFieldComponents();
const { dn } = useDesignable();
return (
<SchemaSettingsSelectItem
key="component-field"
title="Field Component"
options={options}
value={fieldSchema['x-component']}
onChange={(mode) => {
const schema = {
['x-uid']: fieldSchema['x-uid'],
['x-component']: mode,
};
field.component = mode;
void dn.emit('patch', {
schema,
});
dn.refresh();
}}
/>
);
};
export const SchemaSettingCollection = () => {
const fieldSchema = useFieldSchema();
const field = useField();
const collections = useCollectionManager();
const options = collections?.dataSource['options']?.collections.map((value) => {
return {
label: value.name,
value: value.name,
};
});
const { dn } = useDesignable();
return (
<SchemaSettingsSelectItem
key="component-field"
title="Edit Collection"
options={options}
value={fieldSchema['collectionName']}
onChange={(name) => {
fieldSchema['collectionName'] = name;
fieldSchema['name'] = 'custom.' + name;
const schema = {
['x-uid']: fieldSchema['x-uid'],
collectionName: name,
name: 'custom.' + name,
};
void dn.emit('patch', { schema });
dn.refresh();
}}
/>
);
};

View File

@ -0,0 +1,7 @@
export * from './AutoComplete/AutoComplete';
export * from './GroupBlock';
export * from './PDFViewer';
export * from './date-picker';
export * from './deprecated/ExtendedMenuDesigner';
export * from './remote-select';
export * from './select/Select';

View File

@ -26,6 +26,7 @@ const ObjectSelect = (props: Props) => {
const fieldSchema = useFieldSchema(); const fieldSchema = useFieldSchema();
const collectionName = fieldSchema['collectionName']; const collectionName = fieldSchema['collectionName'];
const filterField = fieldSchema['x-component-props']['params']; const filterField = fieldSchema['x-component-props']['params'];
const fieldName = fieldSchema['x-component-props'].fieldNames;
const api = useAPIClient(); const api = useAPIClient();
useAsyncEffect(async () => { useAsyncEffect(async () => {
if (collectionName) { if (collectionName) {
@ -36,9 +37,14 @@ const ObjectSelect = (props: Props) => {
filter: filterField ? { ...filterField.filter } : {}, filter: filterField ? { ...filterField.filter } : {},
}, },
}); });
setDefOptions(defValue?.data?.data); const changOptions = defValue?.data?.data.map((value) => {
value['label'] = value[fieldName.label];
value['value'] = value[fieldNames.label];
return value;
});
setDefOptions(changOptions);
} }
}, [filterField?.filter]); }, [filterField?.filter, collectionName]);
const toValue = (v: any) => { const toValue = (v: any) => {
if (isEmptyObject(v)) { if (isEmptyObject(v)) {
return; return;

View File

@ -34,6 +34,7 @@ import { EditFormulaTitleField, EditTitle, EditTitleField } from '../../schema-s
import _ from 'lodash'; import _ from 'lodash';
import { SchemaSettingsRemove } from '../../components/FormFilter/SchemaSettingsRemove'; import { SchemaSettingsRemove } from '../../components/FormFilter/SchemaSettingsRemove';
import { useTranslation } from '../../locale'; import { useTranslation } from '../../locale';
import { SchemaSettingComponent, SchemaSettingCollection } from '../../schema-components/SchemaSettingsFieldComponent';
export const useFieldComponents = () => { export const useFieldComponents = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@ -182,7 +183,8 @@ export const FilterItemCustomDesigner: React.FC = () => {
}); });
}} }}
/> />
<EditComponent /> <SchemaSettingCollection />
<SchemaSettingComponent />
<EditTitleField /> <EditTitleField />
<EditFormulaTitleField /> <EditFormulaTitleField />
<SchemaSettingsDivider /> <SchemaSettingsDivider />

View File

@ -0,0 +1,8 @@
export * from './FilterFormItemCustomInitializer/FilterFormItemCustom';
export * from './CalendarBlockInitializer';
export * from './PDFVIewerBlockInitializer';
export * from './OutboundLinkActionInitializer';
export * from './CreateSubmitActionInitializer';
export * from './FilterAssociatedFields';
export * from './SettingBlockInitializer';
export * from './GroupBlockInitializer';

View File

@ -71,7 +71,8 @@ export const RecordDetails: CustomFunctionComponent = () => {
const unit = item.product.category.convertible const unit = item.product.category.convertible
? item.product.category.conversion_unit ? item.product.category.conversion_unit
: item.product.category.unit; : item.product.category.unit;
const weight = count * item.product.weight;
const weight = item.count * item.product.weight;
if (productItem[key]) { if (productItem[key]) {
productItem[key].count += count; productItem[key].count += count;
} else { } else {

View File

@ -118,7 +118,7 @@ export class PluginRentalClient extends Plugin {
return name === 'settlements'; return name === 'settlements';
}, },
}); });
this.app.schemaInitializerManager.addItem('RecordBlockInitializers', 'previewBlock.record', { this.app.schemaInitializerManager.addItem('popup:common:addBlock', 'previewBlock.record', {
key: 'record', key: 'record',
type: 'item', type: 'item',
title: tval('record'), title: tval('record'),
@ -127,7 +127,7 @@ export class PluginRentalClient extends Plugin {
usePdfPath: '{{ useRecordPdfPath }}', usePdfPath: '{{ useRecordPdfPath }}',
target: 'record', target: 'record',
}); });
this.app.schemaInitializerManager.addItem('RecordBlockInitializers', 'previewBlock.waybill', { this.app.schemaInitializerManager.addItem('popup:common:addBlock', 'previewBlock.waybill', {
key: 'waybill', key: 'waybill',
type: 'item', type: 'item',
title: tval('waybill'), title: tval('waybill'),
@ -136,7 +136,7 @@ export class PluginRentalClient extends Plugin {
usePdfPath: '{{ useWaybillPdfPath }}', usePdfPath: '{{ useWaybillPdfPath }}',
target: 'waybill', target: 'waybill',
}); });
this.app.schemaInitializerManager.addItem('RecordBlockInitializers', 'previewBlock.settlement', { this.app.schemaInitializerManager.addItem('popup:common:addBlock', 'previewBlock.settlement', {
key: 'settlement', key: 'settlement',
type: 'item', type: 'item',
title: tval('settlement'), title: tval('settlement'),

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "权限控制", "displayName.zh-CN": "权限控制",
"description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.", "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
"description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/acl", "homepage": "https://docs.nocobase.com/handbook/acl",

View File

@ -10,10 +10,10 @@ import { checkAction } from './actions/role-check';
import { roleCollectionsResource } from './actions/role-collections'; import { roleCollectionsResource } from './actions/role-collections';
import { setDefaultRole } from './actions/user-setDefaultRole'; import { setDefaultRole } from './actions/user-setDefaultRole';
import { setCurrentRole } from './middlewares/setCurrentRole'; import { setCurrentRole } from './middlewares/setCurrentRole';
import { createWithACLMetaMiddleware } from './middlewares/with-acl-meta';
import { RoleModel } from './model/RoleModel'; import { RoleModel } from './model/RoleModel';
import { RoleResourceActionModel } from './model/RoleResourceActionModel'; import { RoleResourceActionModel } from './model/RoleResourceActionModel';
import { RoleResourceModel } from './model/RoleResourceModel'; import { RoleResourceModel } from './model/RoleResourceModel';
import { createWithACLMetaMiddleware } from './middlewares/with-acl-meta';
export interface AssociationFieldAction { export interface AssociationFieldAction {
associationActions: string[]; associationActions: string[];
@ -179,6 +179,7 @@ export class PluginACL extends Plugin {
'roles.resources:*', 'roles.resources:*',
'uiSchemas:getProperties', 'uiSchemas:getProperties',
'roles.menuUiSchemas:*', 'roles.menuUiSchemas:*',
'roles.users:*',
], ],
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-action-bulk-edit", "name": "@nocobase/plugin-action-bulk-edit",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-bulk-edit", "homepage": "https://docs.nocobase.com/handbook/action-bulk-edit",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-action-bulk-update", "name": "@nocobase/plugin-action-bulk-update",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-bulk-update", "homepage": "https://docs.nocobase.com/handbook/action-bulk-update",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-action-duplicate", "name": "@nocobase/plugin-action-duplicate",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-duplicate", "homepage": "https://docs.nocobase.com/handbook/action-duplicate",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-action-print", "name": "@nocobase/plugin-action-print",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-print", "homepage": "https://docs.nocobase.com/handbook/action-print",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-api-doc", "name": "@nocobase/plugin-api-doc",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "API documentation", "displayName": "API documentation",
"displayName.zh-CN": "API 文档", "displayName.zh-CN": "API 文档",
"description": "An OpenAPI documentation generator for NocoBase HTTP API.", "description": "An OpenAPI documentation generator for NocoBase HTTP API.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "认证API 密钥", "displayName.zh-CN": "认证API 密钥",
"description": "Allows users to use API key to access application's HTTP API", "description": "Allows users to use API key to access application's HTTP API",
"description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/api-keys", "homepage": "https://docs.nocobase.com/handbook/api-keys",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-audit-logs", "name": "@nocobase/plugin-audit-logs",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "Audit logs (deprecated)", "displayName": "Audit logs (deprecated)",
"displayName.zh-CN": "审计日志(废弃)", "displayName.zh-CN": "审计日志(废弃)",
"description": "This plugin is deprecated. There will be a new audit log plugin in the future.", "description": "This plugin is deprecated. There will be a new audit log plugin in the future.",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-auth", "name": "@nocobase/plugin-auth",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth", "homepage": "https://docs.nocobase.com/handbook/auth",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth",

View File

@ -1,7 +1,7 @@
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import React from 'react'; import React from 'react';
import { Outlet } from 'react-router-dom'; import { Outlet } from 'react-router-dom';
import { useSystemSettings, PoweredBy, useRequest, useAPIClient } from '@nocobase/client'; import { useSystemSettings, PoweredByV2 as PoweredBy, useRequest, useAPIClient } from '@nocobase/client';
import { AuthenticatorsContext } from '../authenticator'; import { AuthenticatorsContext } from '../authenticator';
export function AuthLayout(props: any) { export function AuthLayout(props: any) {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "应用的备份与还原", "displayName.zh-CN": "应用的备份与还原",
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.", "description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/backup-restore", "homepage": "https://docs.nocobase.com/handbook/backup-restore",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-calendar", "name": "@nocobase/plugin-calendar",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "Calendar", "displayName": "Calendar",
"displayName.zh-CN": "日历", "displayName.zh-CN": "日历",
"description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.", "description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "认证CAS", "displayName.zh-CN": "认证CAS",
"description": "CAS authentication.", "description": "CAS authentication.",
"description.zh-CN": "通过 CAS 协议认证身份。", "description.zh-CN": "通过 CAS 协议认证身份。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth-cas", "homepage": "https://docs.nocobase.com/handbook/auth-cas",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "图表(废弃)", "displayName.zh-CN": "图表(废弃)",
"description": "The plugin has been deprecated, please use the data visualization plugin instead.", "description": "The plugin has been deprecated, please use the data visualization plugin instead.",
"description.zh-CN": "已废弃插件,请使用数据可视化插件代替。", "description.zh-CN": "已废弃插件,请使用数据可视化插件代替。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-china-region", "name": "@nocobase/plugin-china-region",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "Administrative divisions of China", "displayName": "Administrative divisions of China",
"displayName.zh-CN": "中国行政区划", "displayName.zh-CN": "中国行政区划",
"description": "Provides data and field type for administrative divisions of China.", "description": "Provides data and field type for administrative divisions of China.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "WEB 客户端", "displayName.zh-CN": "WEB 客户端",
"description": "Provides a client interface for the NocoBase server", "description": "Provides a client interface for the NocoBase server",
"description.zh-CN": "为 NocoBase 服务端提供客户端界面", "description.zh-CN": "为 NocoBase 服务端提供客户端界面",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"devDependencies": { "devDependencies": {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据源:主数据库", "displayName.zh-CN": "数据源:主数据库",
"description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.", "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
"description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。", "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/data-source-main", "homepage": "https://docs.nocobase.com/handbook/data-source-main",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-custom-request", "name": "@nocobase/plugin-custom-request",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-custom-request", "homepage": "https://docs.nocobase.com/handbook/action-custom-request",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-data-source-manager", "name": "@nocobase/plugin-data-source-manager",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"displayName": "Data source manager", "displayName": "Data source manager",
"displayName.zh-CN": "数据源管理", "displayName.zh-CN": "数据源管理",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-data-visualization", "name": "@nocobase/plugin-data-visualization",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "Data visualization", "displayName": "Data visualization",
"displayName.zh-CN": "数据可视化", "displayName.zh-CN": "数据可视化",
"description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.", "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",

View File

@ -1,6 +1,6 @@
import { G2PlotChart } from './g2plot'; import { G2PlotChart } from './g2plot';
import { Pie as G2Pie } from '@ant-design/plots'; import { Pie as G2Pie } from '@ant-design/plots';
import { ChartType } from '../chart'; import { ChartType, RenderProps } from '../chart';
export class Pie extends G2PlotChart { export class Pie extends G2PlotChart {
constructor() { constructor() {
@ -30,4 +30,19 @@ export class Pie extends G2PlotChart {
}, },
}; };
}; };
getProps({ data, general, advanced, fieldProps }: RenderProps) {
const props = super.getProps({ data, general, advanced, fieldProps });
return {
...props,
tooltip: (d, index: number, data, column: any) => {
const field = column.y0.field;
const props = fieldProps[field];
const name = props?.label || field;
const transformer = props?.transformer;
const value = column.y0.value[index];
return { name, value: transformer ? transformer(value) : value };
},
};
}
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-disable-pm-add", "name": "@nocobase/plugin-disable-pm-add",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"peerDependencies": { "peerDependencies": {
"@nocobase/client": "0.x", "@nocobase/client": "0.x",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "错误处理器", "displayName.zh-CN": "错误处理器",
"description": "Handling application errors and exceptions.", "description": "Handling application errors and exceptions.",
"description.zh-CN": "处理应用程序中的错误和异常。", "description.zh-CN": "处理应用程序中的错误和异常。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-excel-formula-field", "name": "@nocobase/plugin-excel-formula-field",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "操作:导出记录", "displayName.zh-CN": "操作:导出记录",
"description": "Export filtered records to excel, you can configure which fields to export.", "description": "Export filtered records to excel, you can configure which fields to export.",
"description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-export", "homepage": "https://docs.nocobase.com/handbook/action-export",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-file-manager", "name": "@nocobase/plugin-file-manager",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "File manager", "displayName": "File manager",
"displayName.zh-CN": "文件管理器", "displayName.zh-CN": "文件管理器",
"description": "Provides files storage services with files collection template and attachment field.", "description": "Provides files storage services with files collection template and attachment field.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据表字段:公式", "displayName.zh-CN": "数据表字段:公式",
"description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.", "description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.",
"description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-formula", "homepage": "https://docs.nocobase.com/handbook/field-formula",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-gantt", "name": "@nocobase/plugin-gantt",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"displayName": "Block: Gantt", "displayName": "Block: Gantt",
"displayName.zh-CN": "区块:甘特图", "displayName.zh-CN": "区块:甘特图",
"description": "Provides Gantt block.", "description": "Provides Gantt block.",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "可视化数据表管理", "displayName.zh-CN": "可视化数据表管理",
"description": "An ER diagram-like tool. Currently only the Master database is supported.", "description": "An ER diagram-like tool. Currently only the Master database is supported.",
"description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。", "description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/graph-collection-manager", "homepage": "https://docs.nocobase.com/handbook/graph-collection-manager",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "区块iframe", "displayName.zh-CN": "区块iframe",
"description": "Create an iframe block on the page to embed and display external web pages or content.", "description": "Create an iframe block on the page to embed and display external web pages or content.",
"description.zh-CN": "在页面上创建和管理iframe用于嵌入和展示外部网页或内容。", "description.zh-CN": "在页面上创建和管理iframe用于嵌入和展示外部网页或内容。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/block-iframe", "homepage": "https://docs.nocobase.com/handbook/block-iframe",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "操作:导入记录", "displayName.zh-CN": "操作:导入记录",
"description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.", "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
"description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-import", "homepage": "https://docs.nocobase.com/handbook/action-import",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-kanban", "name": "@nocobase/plugin-kanban",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/block-kanban", "homepage": "https://docs.nocobase.com/handbook/block-kanban",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-localization-management", "name": "@nocobase/plugin-localization-management",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/localization-management", "homepage": "https://docs.nocobase.com/handbook/localization-management",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "日志", "displayName.zh-CN": "日志",
"description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.", "description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.",
"description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "dist/server/index.js", "main": "dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/logger", "homepage": "https://docs.nocobase.com/handbook/logger",

View File

@ -2,7 +2,7 @@
"name": "@nocobase/plugin-map", "name": "@nocobase/plugin-map",
"displayName": "Block: Map", "displayName": "Block: Map",
"displayName.zh-CN": "区块:地图", "displayName.zh-CN": "区块:地图",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "Map block, support Gaode map and Google map, you can also extend more map types.", "description": "Map block, support Gaode map and Google map, you can also extend more map types.",
"description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。",
"license": "AGPL-3.0", "license": "AGPL-3.0",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数学公式字段", "displayName.zh-CN": "数学公式字段",
"description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.", "description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.",
"description.zh-CN": "一个功能强大的数学公式字段插件旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统如MySQL、PostgreSQL无缝集成并提供直观的用户界面来定义和执行数学公式字段。", "description.zh-CN": "一个功能强大的数学公式字段插件旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统如MySQL、PostgreSQL无缝集成并提供直观的用户界面来定义和执行数学公式字段。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-mobile-client", "name": "@nocobase/plugin-mobile-client",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/mobile-client", "homepage": "https://docs.nocobase.com/handbook/mobile-client",
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client",

View File

@ -2,7 +2,7 @@
"name": "@nocobase/plugin-mock-collections", "name": "@nocobase/plugin-mock-collections",
"displayName": "mock-collections", "displayName": "mock-collections",
"description": "mock-collections", "description": "mock-collections",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"peerDependencies": { "peerDependencies": {

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "多应用管理器", "displayName.zh-CN": "多应用管理器",
"description": "Dynamically create multiple apps without separate deployments.", "description": "Dynamically create multiple apps without separate deployments.",
"description.zh-CN": "无需单独部署即可动态创建多个应用。", "description.zh-CN": "无需单独部署即可动态创建多个应用。",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/multi-app-manager", "homepage": "https://docs.nocobase.com/handbook/multi-app-manager",

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "多应用数据表共享", "displayName.zh-CN": "多应用数据表共享",
"description": "", "description": "",
"description.zh-CN": "", "description.zh-CN": "",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",
"devDependencies": { "devDependencies": {
"@formily/react": "2.x", "@formily/react": "2.x",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-notifications", "name": "@nocobase/plugin-notifications",
"version": "0.20.0-alpha.12", "version": "0.20.0-alpha.14",
"description": "", "description": "",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/server/index.js", "main": "./dist/server/index.js",

Some files were not shown because too many files have changed in this diff Show More