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).
## [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
### Merged

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/cli",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"description": "",
"license": "Apache-2.0",
"main": "./src/index.js",
@ -8,7 +8,7 @@
"nocobase": "./bin/index.js"
},
"dependencies": {
"@nocobase/app": "0.20.0-alpha.12",
"@nocobase/app": "0.20.0-alpha.14",
"@types/fs-extra": "^11.0.1",
"@umijs/utils": "3.5.20",
"chalk": "^4.1.1",
@ -25,7 +25,7 @@
"tsx": "^4.6.2"
},
"devDependencies": {
"@nocobase/devtools": "0.20.0-alpha.12"
"@nocobase/devtools": "0.20.0-alpha.14"
},
"repository": {
"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 keys = ['API_BASE_PATH', 'WS_PATH', 'PLUGIN_STATICS_PATH'];
for (const key of keys) {
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.__env_modified__ = true;
}
};

View File

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

View File

@ -2,7 +2,7 @@ import type { Application } from './Application';
import type { Plugin } from './Plugin';
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 PluginData = {
name: string;
@ -63,6 +63,11 @@ export class PluginManager {
if (opts.name) {
this.pluginsAliases[opts.name] = instance;
}
if (opts.packageName) {
this.pluginsAliases[opts.packageName] = instance;
}
await instance.afterAdd();
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,11 +8,11 @@ import { Collection, CollectionFieldOptions } from '../../../../data-source';
export const FilterFormBlockInitializer = ({
filterCollections,
onlyCurrentDataSource,
showChildren,
hideChildrenIfSingleCollection,
}: {
filterCollections: (options: { collection?: Collection; associationField?: CollectionFieldOptions }) => boolean;
onlyCurrentDataSource: boolean;
showChildren?: boolean;
hideChildrenIfSingleCollection?: boolean;
}) => {
const itemConfig = useSchemaInitializerItem();
const { insert } = useSchemaInitializer();
@ -45,7 +45,7 @@ export const FilterFormBlockInitializer = ({
);
}}
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,31 +1,42 @@
import { css } from '@emotion/css';
import { css, cx } from '@emotion/css';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useToken } from '../style';
import { usePlugin } from '../application';
import { parseHTML } from '@nocobase/utils/client';
import { useCurrentAppInfo } from '../appInfo/CurrentAppInfoProvider';
export const PoweredBy = () => {
const { i18n } = useTranslation();
const { token } = useToken();
const customBrandPlugin: any = usePlugin('@nocobase/plugin-custom-brand');
const data = useCurrentAppInfo();
const urls = {
'en-US': 'https://www.nocobase.com',
'zh-CN': 'https://cn.nocobase.com',
};
const date = new Date();
const year = date.getFullYear();
const style = css`
text-align: center;
color: ${token.colorTextDescription};
a {
color: ${token.colorTextDescription};
&:hover {
color: ${token.colorText};
}
}
`;
const appVersion = `<span class="nb-app-version">v${data?.data?.version}</span>`;
return (
<div
className={css`
text-align: center;
color: ${token.colorTextDescription};
a {
color: ${token.colorTextDescription};
&:hover {
color: ${token.colorText};
}
}
`}
>
©2023-{year} ICP备2023024678号
</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,
onClick,
style,
openSize,
openSize: os,
disabled: propsDisabled,
actionCallback,
/** 如果为 true 则说明该按钮是树表格的 Add child 按钮 */
@ -62,6 +62,8 @@ export const Action: ComposedAction = observer(
const record = useRecord();
const designerProps = fieldSchema['x-designer-props'];
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 linkageRules = fieldSchema?.['x-linkage-rules'] || [];
const { designable } = useDesignable();
@ -150,7 +152,6 @@ export const Action: ComposedAction = observer(
</SortableItem>
);
};
const result = (
<ActionContextProvider
button={renderButton()}

View File

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

View File

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

View File

@ -1,10 +1,12 @@
import { QuestionCircleOutlined } from '@ant-design/icons';
import { css } from '@emotion/css';
import { Dropdown, Menu } from 'antd';
import { Dropdown, Menu, Popover } from 'antd';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { DropdownVisibleContext, useToken } from '..';
import { DropdownVisibleContext, usePlugin, useToken } from '..';
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
@ -66,48 +68,74 @@ const SettingsMenu: React.FC<{
return <Menu items={items} />;
};
export const Help = () => {
const [visible, setVisible] = useState(false);
const { token } = useToken();
const helpClassName = css`
display: inline-block;
vertical-align: top;
width: 46px;
height: 46px;
&:hover {
background: rgba(255, 255, 255, 0.1) !important;
}
`;
return (
<div
className={css`
display: inline-block;
vertical-align: top;
width: 46px;
height: 46px;
&:hover {
background: rgba(255, 255, 255, 0.1) !important;
}
`}
>
<DropdownVisibleContext.Provider value={{ visible, setVisible }}>
<Dropdown
open={visible}
onOpenChange={(visible) => {
setVisible(visible);
}}
dropdownRender={() => {
return <SettingsMenu />;
}}
>
<span
data-testid="help-button"
className={css`
max-width: 160px;
overflow: hidden;
display: inline-block;
line-height: 12px;
white-space: nowrap;
text-overflow: ellipsis;
`}
style={{ cursor: 'pointer', padding: '16px', color: token.colorTextHeaderMenu }}
export const Help = observer(
() => {
const [visible, setVisible] = useState(false);
const { token } = useToken();
const customBrandPlugin: any = usePlugin('@nocobase/plugin-custom-brand');
const data = useCurrentAppInfo();
const icon = (
<span
data-testid="help-button"
className={css`
max-width: 160px;
overflow: hidden;
display: inline-block;
line-height: 12px;
white-space: nowrap;
text-overflow: ellipsis;
`}
style={{ cursor: 'pointer', padding: '16px', color: token.colorTextHeaderMenu }}
>
<QuestionCircleOutlined />
</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>}
>
<QuestionCircleOutlined />
</span>
</Dropdown>
</DropdownVisibleContext.Provider>
</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>
</DropdownVisibleContext.Provider>
</div>
);
},
{ displayName: 'Help' },
);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -49,11 +49,12 @@ class SystemLoggerTransport extends Transport {
}
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 { module, submodule, method, ...meta } = args?.[0] || {};
logger.log({
level,
stack,
message,
meta,
module: module || info['module'] || '',

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ export default (app: Application) => {
try {
await app.pm.addViaCLI(name, _.cloneDeep(options));
} 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,
});
} 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 {
await app.pm.enable(plugins);
} 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 {
await app.pm.disable(plugins);
} 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',
})
.then(async () => {
if (!(await mainApp.isStarted())) {
if (!isStart && !(await mainApp.isStarted())) {
await mainApp.stop({ logging: false });
}
})
@ -342,7 +342,7 @@ export class Gateway extends EventEmitter {
if (e.code !== 'commander.helpDisplayed') {
mainApp.log.error(e);
}
if (!(await mainApp.isStarted())) {
if (!isStart && !(await mainApp.isStarted())) {
await mainApp.stop({ logging: false });
}
});

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/test",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "lib/index.js",
"module": "./src/index.ts",
"types": "./lib/index.d.ts",
@ -40,7 +40,7 @@
},
"dependencies": {
"@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",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",

View File

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

View File

@ -18,3 +18,4 @@ export * from './isPortalInBody';
export * from './uid';
export * from './url';
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,
uiSchema,
targetFieldSchema,
currentFormCollectionName,
currentIterationCollectionName,
});
const contextVariable = useContextAssociationFields({ schema, maxDepth: 2, contextCollectionName, collectionField });
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)),
block.defaultFilter,
]);
return block.doFilter(
{
...param,

View File

@ -1,5 +1,4 @@
import React from 'react';
import { autorun } from '@formily/reactive';
import {
Menu,
Plugin,
@ -9,27 +8,10 @@ import {
useCollection,
} from '@nocobase/client';
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 { isValid } from '@formily/shared';
import { useCreateActionProps } from './hooks/useCreateActionProps';
import { useOutboundActionProps } from './hooks/useOutboundActionProps';
import { AssociatedField } from './components/fields/AssociatedField';
import { DatePicker } from './schema-components/date-picker';
import { SettingBlockInitializer } from './schema-initializer/SettingBlockInitializer';
import { autorun } from '@formily/reactive';
import { Locale, tval } from './locale';
import {
SessionSubmit,
SessionUpdate,
@ -42,45 +24,64 @@ import {
useSetFilterScopeVisible,
AfterSuccess,
} from './schema-settings';
import { SignatureInput } from './components/SignatureInput';
import { RemoteSelect } from './schema-components/remote-select';
import { Select } from './schema-components/select/Select';
import { Locale, tval } from './locale';
import {
GroupBlockInitializer,
GroupBlockProvider,
GroupBlockToolbar,
groupBlockSettings,
} from './schema-initializer/GroupBlockInitializer';
import { useCreateActionProps } from './hooks/useCreateActionProps';
import { useCustomizeUpdateActionProps } from './hooks/useCustomizeUpdateActionProps';
import { useFilterBlockActionProps } from './hooks/useFilterBlockActionProps';
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 {
FilterFormItem,
FilterItemCustomDesigner,
FilterFormItemCustom,
} from './schema-initializer/FilterFormItemCustomInitializer/FilterFormItemCustom';
import { GroupBlock } from './schema-components/GroupBlock';
AssociatedFieldInterface,
CalcFieldInterface,
CustomFieldInterface,
CustomAssociatedFieldInterface,
SignaturePadFieldInterface,
} from './interfaces';
import {
AssociatedField,
CalcResult,
CustomAssociatedField,
CustomField,
CustomComponentDispatcher,
CustomComponentStub,
customComponentDispatcherSettings,
} from './components/custom-components/CustomComponentDispatcher';
import { useFilterBlockActionProps } from './hooks/useFilterBlockActionProps';
import { GroupBlockConfigure } from './components/GroupBlockConfigure/GroupBlockConfigure';
import { AssociatedFieldInterface } from './interfaces/associated';
import { CalcFieldInterface } from './interfaces/calc';
import { CustomFieldInterface } from './interfaces/custom';
import { CustomAssociatedFieldInterface } from './interfaces/customAssociated';
import { SignaturePadFieldInterface } from './interfaces/signatureSchema';
import { CalcResult } from './components/fields/CalcResult';
import { CustomAssociatedField } from './components/custom-components/CustomAssociatedField';
import Expression from './components/fields/Expression';
import { CustomField } from './components/custom-components/CustomField';
import { useGetCustomAssociatedComponents } from './hooks/useGetCustomAssociatedComponents';
import { useGetCustomComponents } from './hooks/useGetCustomComponents';
import { AutoComplete } from './schema-components/AutoComplete/AutoComplete';
import { AdminLayout, DetailsPage, HomePage, OutboundPage, PageLayout } from './pages';
import { Configuration, HomePageConfiguration, LinkManager } from './settings-manager-components';
export { usePDFViewerRef } from './schema-initializer/PDFVIewerBlockInitializer';
Expression,
GroupBlockConfigure,
SignatureInput,
} from './components';
import {
AutoComplete,
DatePicker,
GroupBlock,
InternalPDFViewer,
MenuDesigner,
RemoteSelect,
Select,
} from './schema-components';
import {
CalendarBlockInitializer,
CreateSubmitActionInitializer,
FilterAssociatedFields,
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 class PluginCoreClient extends Plugin {
@ -104,6 +105,53 @@ export class PluginCoreClient extends Plugin {
});
this.schemaSettingsManager.add(groupBlockSettings);
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() {
@ -126,57 +174,57 @@ export class PluginCoreClient extends Plugin {
async registerScopesAndComponents() {
this.app.addScopes({
useOutboundActionProps,
useCustomizeUpdateActionProps,
useCreateActionProps,
useFilterFormCustomProps,
useCustomizeUpdateActionProps,
useFilterBlockActionProps,
usePDFViewerPrintActionProps,
useFilterFormCustomProps,
useGetCustomAssociatedComponents,
useGetCustomComponents,
useOutboundActionProps,
usePDFViewerPrintActionProps,
});
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,
ExtendedCalendarBlockInitializer: CalendarBlockInitializer,
SettingBlock: SettingBlockInitializer,
AfterSuccess,
AssociatedField,
AutoComplete,
CalcResult,
CreateSubmitActionInitializer,
PageLayout,
FilterAssociatedFields,
FilterFormItemCustom,
FilterFormItem,
FilterItemCustomDesigner,
Select,
CustomAssociatedField,
CustomComponentDispatcher,
CustomComponentStub,
CustomField,
DatePicker,
EditTitle,
EditTitleField,
AfterSuccess,
Expression,
ExtendedCalendarBlockInitializer: CalendarBlockInitializer,
FilterAssociatedFields,
FilterFormItem,
FilterFormItemCustom,
FilterItemCustomDesigner,
GroupBlock,
GroupBlockConfigure,
AutoComplete,
GroupBlockInitializer,
GroupBlockProvider,
GroupBlockToolbar,
Menu: {
...Menu,
// @ts-ignore
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 beforeLoad() {}
async registerInterfaces() {
this.app.dataSourceManager.addFieldInterfaces([
AssociatedFieldInterface,
CalcFieldInterface,
CustomFieldInterface,
CustomAssociatedFieldInterface,
SignaturePadFieldInterface,
]);
}
async afterLoad() {
// log for debug
if (process.env.NODE_ENV !== 'production') {
@ -295,16 +351,6 @@ export class PluginCoreClient extends Plugin {
await this.registerSchemaInitializer();
}
async registerInterfaces() {
this.app.dataSourceManager.addFieldInterfaces([
AssociatedFieldInterface,
CalcFieldInterface,
CustomFieldInterface,
CustomAssociatedFieldInterface,
SignaturePadFieldInterface,
]);
}
async load() {
this.locale = new Locale(this.app);
await this.registerTricks();
@ -313,51 +359,6 @@ export class PluginCoreClient extends Plugin {
await this.registerActions();
await this.registerRouters();
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.
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);
}, [fieldFilter?.filter]);
}, [fieldFilter?.filter, fieldSchema['collectionName']]);
useEffect(() => {
changLable(defultValue);
@ -57,14 +57,15 @@ export const AutoComplete = (props) => {
}
const valueLabel = options.filter((item) => item.value === data)[0];
if (valueLabel) {
setValue(valueLabel.label);
form.values.custom[fieldSchema['collectionName']] = valueLabel;
setValue(valueLabel.label);
} else {
setValue(data);
form.values.custom[fieldSchema['collectionName']] = {};
form.values.custom[fieldSchema['collectionName']][fieldNames.label] = data;
setValue(data);
}
} else {
form.values.custom[fieldSchema['collectionName']] = {};
setValue(data);
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 collectionName = fieldSchema['collectionName'];
const filterField = fieldSchema['x-component-props']['params'];
const fieldName = fieldSchema['x-component-props'].fieldNames;
const api = useAPIClient();
useAsyncEffect(async () => {
if (collectionName) {
@ -36,9 +37,14 @@ const ObjectSelect = (props: Props) => {
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) => {
if (isEmptyObject(v)) {
return;

View File

@ -34,6 +34,7 @@ import { EditFormulaTitleField, EditTitle, EditTitleField } from '../../schema-s
import _ from 'lodash';
import { SchemaSettingsRemove } from '../../components/FormFilter/SchemaSettingsRemove';
import { useTranslation } from '../../locale';
import { SchemaSettingComponent, SchemaSettingCollection } from '../../schema-components/SchemaSettingsFieldComponent';
export const useFieldComponents = () => {
const { t } = useTranslation();
@ -182,7 +183,8 @@ export const FilterItemCustomDesigner: React.FC = () => {
});
}}
/>
<EditComponent />
<SchemaSettingCollection />
<SchemaSettingComponent />
<EditTitleField />
<EditFormulaTitleField />
<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
? item.product.category.conversion_unit
: item.product.category.unit;
const weight = count * item.product.weight;
const weight = item.count * item.product.weight;
if (productItem[key]) {
productItem[key].count += count;
} else {

View File

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

View File

@ -4,7 +4,7 @@
"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.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"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 { setDefaultRole } from './actions/user-setDefaultRole';
import { setCurrentRole } from './middlewares/setCurrentRole';
import { createWithACLMetaMiddleware } from './middlewares/with-acl-meta';
import { RoleModel } from './model/RoleModel';
import { RoleResourceActionModel } from './model/RoleResourceActionModel';
import { RoleResourceModel } from './model/RoleResourceModel';
import { createWithACLMetaMiddleware } from './middlewares/with-acl-meta';
export interface AssociationFieldAction {
associationActions: string[];
@ -179,6 +179,7 @@ export class PluginACL extends Plugin {
'roles.resources:*',
'uiSchemas:getProperties',
'roles.menuUiSchemas:*',
'roles.users:*',
],
});

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-bulk-edit",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"displayName": "API documentation",
"displayName.zh-CN": "API 文档",
"description": "An OpenAPI documentation generator for NocoBase HTTP API.",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-audit-logs",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"displayName": "Audit logs (deprecated)",
"displayName.zh-CN": "审计日志(废弃)",
"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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "./dist/server/index.js",
"homepage": "https://docs.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 React from 'react';
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';
export function AuthLayout(props: any) {

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-calendar",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"displayName": "Calendar",
"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.",

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
"displayName.zh-CN": "数据源:主数据库",
"description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
"description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "./dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"homepage": "https://docs.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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "dist/server/index.js",
"displayName": "Data source manager",
"displayName.zh-CN": "数据源管理",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-data-visualization",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"displayName": "Data visualization",
"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.",

View File

@ -1,6 +1,6 @@
import { G2PlotChart } from './g2plot';
import { Pie as G2Pie } from '@ant-design/plots';
import { ChartType } from '../chart';
import { ChartType, RenderProps } from '../chart';
export class Pie extends G2PlotChart {
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",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "./dist/server/index.js",
"peerDependencies": {
"@nocobase/client": "0.x",

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
"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.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-formula",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
"name": "@nocobase/plugin-map",
"displayName": "Block: Map",
"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.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。",
"license": "AGPL-3.0",

View File

@ -4,7 +4,7 @@
"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.zh-CN": "一个功能强大的数学公式字段插件旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统如MySQL、PostgreSQL无缝集成并提供直观的用户界面来定义和执行数学公式字段。",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-mobile-client",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "./dist/server/index.js",
"homepage": "https://docs.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",
"displayName": "mock-collections",
"description": "mock-collections",
"version": "0.20.0-alpha.12",
"version": "0.20.0-alpha.14",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"peerDependencies": {

View File

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

View File

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

View File

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

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