diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ed0edb305..15d923631d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.4.23](https://github.com/nocobase/nocobase/compare/v1.4.22...v1.4.23) - 2025-01-13 + +### 🐛 Bug Fixes + +- **[client]** Fix the issue where fixed actions column are not working properly in tables ([#6048](https://github.com/nocobase/nocobase/pull/6048)) by @zhangzhonghe + +- **[Users]** Disable browser autofill when setting passwords for users in user management ([#6041](https://github.com/nocobase/nocobase/pull/6041)) by @2013xile + +- **[Workflow]** Fix date field based schedule event not triggers after app started ([#6042](https://github.com/nocobase/nocobase/pull/6042)) by @mytharcher + ## [v1.4.22](https://github.com/nocobase/nocobase/compare/v1.4.21...v1.4.22) - 2025-01-10 ### 🚀 Improvements diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 08d839d882..ccbd921da3 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -5,6 +5,16 @@ 格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), 并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。 +## [v1.4.23](https://github.com/nocobase/nocobase/compare/v1.4.22...v1.4.23) - 2025-01-13 + +### 🐛 修复 + +- **[client]** 修复在表格中固定操作列不生效的问题 ([#6048](https://github.com/nocobase/nocobase/pull/6048)) by @zhangzhonghe + +- **[用户]** 在用户管理中给用户设置密码的时候关闭浏览器自动填充 ([#6041](https://github.com/nocobase/nocobase/pull/6041)) by @2013xile + +- **[工作流]** 修复基于数据表字段的定时任务在启动后不执行的问题 ([#6042](https://github.com/nocobase/nocobase/pull/6042)) by @mytharcher + ## [v1.4.22](https://github.com/nocobase/nocobase/compare/v1.4.21...v1.4.22) - 2025-01-10 ### 🚀 优化 diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index 285382bdde..987ce4e85f 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -228,7 +228,8 @@ export const SubTable: any = observer( showIndex dragSort={false} showDel={ - allowAddnew !== false || allowSelectExistingRecord !== false || allowDisassociation !== false + field.editable && + (allowAddnew !== false || allowSelectExistingRecord !== false || allowDisassociation !== false) ? (record) => { if (!field.editable) { return false; diff --git a/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx b/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx index 793514bdb2..7db99ad2f1 100644 --- a/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx +++ b/packages/core/client/src/schema-component/antd/input-number/InputNumber.tsx @@ -12,6 +12,7 @@ import { InputNumber as AntdNumber, InputNumberProps as AntdInputNumberProps } f import React from 'react'; import { InputNumberReadPrettyProps, ReadPretty } from './ReadPretty'; import BigNumber from 'bignumber.js'; +import { omit } from 'lodash'; type ComposedInputNumber = React.ForwardRefExoticComponent< Pick, string | number | symbol> & React.RefAttributes @@ -37,7 +38,14 @@ export const InputNumber: ComposedInputNumber = connect((props: AntdInputNumberP onChange(toSafeNumber(v)); } }; - return ; + let inputNumberProps = { + onChange: handleChange, + ...others, + }; + if (others['formatStyle']) { + inputNumberProps = omit(inputNumberProps, ['addonAfter', 'addonBefore']); + } + return ; }, mapReadPretty(ReadPretty)); InputNumber.ReadPretty = ReadPretty; diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.Column.ActionBar.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.Column.ActionBar.tsx index 5ab46f55f6..a3f1329219 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.Column.ActionBar.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.Column.ActionBar.tsx @@ -10,7 +10,7 @@ import { css } from '@emotion/css'; import { observer } from '@formily/react'; import React from 'react'; -import { SortableItem, useDesigner } from '../..'; +import { SortableItem, useDesigner, useSchemaComponentContext } from '../..'; import { useFlag } from '../../../flag-provider/hooks/useFlag'; export const designerCss = ({ margin = '-18px -16px', padding = '18px 16px' } = {}) => css` @@ -53,9 +53,15 @@ export const designerCss = ({ margin = '-18px -16px', padding = '18px 16px' } = `; export const TableColumnActionBar = observer( - (props) => { + (props: any) => { const Designer = useDesigner(); const { isInSubTable } = useFlag() || {}; + const { designable } = useSchemaComponentContext(); + + if (!designable || Designer.isNullComponent) { + return props.children; + } + return ( { const Designer = useDesigner(); const field = useField(); const { fieldSchema, uiSchema, collectionField } = useColumnSchema(); + const { designable } = useSchemaComponentContext(); const compile = useCompile(); const { isInSubTable } = useFlag() || {}; useEffect(() => { @@ -84,6 +86,10 @@ export const TableColumnDecorator = (props) => { field.title = uiSchema?.title; } }, [uiSchema?.title]); + + if (!designable || Designer.isNullComponent) { + return props.children; + } return ( ((props) => const { record, schema, rowIndex, isSubTable, ...others } = props; const styleRules = schema?.[LinkageRuleDataKeyMap['style']]; const [dynamicStyle, setDynamicStyle] = useState({}); - const isReadyPrettyMode = + const isReadPrettyMode = !!schema?.properties && Object.values(schema.properties).some((item) => item['x-read-pretty'] === true); - const style = useMemo(() => ({ ...props.style, ...dynamicStyle }), [props.style, dynamicStyle]); + const mergedStyle = useMemo(() => ({ ...props.style, ...dynamicStyle }), [props.style, dynamicStyle]); return ( <> {/* To improve rendering performance, do not render GetStyleRules component when no style rules are set */} {!_.isEmpty(styleRules) && ( - + )} - + {props.children} @@ -750,9 +750,6 @@ const InternalNocoBaseTable = React.memo( .ant-table-cell-fix-right { padding: 8px 16px !important; } - .ant-table-thead .ant-table-cell { - padding: 8px 16px; - } } } } diff --git a/packages/core/client/src/schema-component/common/withPopupWrapper/index.tsx b/packages/core/client/src/schema-component/common/withPopupWrapper/index.tsx index ab876304c4..588497e8db 100644 --- a/packages/core/client/src/schema-component/common/withPopupWrapper/index.tsx +++ b/packages/core/client/src/schema-component/common/withPopupWrapper/index.tsx @@ -14,9 +14,9 @@ import { ActionContextProvider, SchemaComponentOptions, useActionContext, useDes import { PopupVisibleProvider } from '../../antd/page/PagePopups'; import { usePopupUtils } from '../../antd/page/pagePopupUtils'; import { popupSchema } from './schema'; - import { CollectionProvider, useCollection } from '../../../data-source'; import { NocoBaseRecursionField } from '../../../formily/NocoBaseRecursionField'; +import { VariablePopupRecordProvider } from '../../../modules/variable/variablesProvider/VariablePopupRecordProvider'; const useInsertSchema = () => { const fieldSchema = useFieldSchema(); @@ -109,12 +109,14 @@ function withPopupWrapper(WrappedComponent: React.ComponentType) { > - + + + diff --git a/packages/core/client/src/schema-component/core/SchemaComponent.tsx b/packages/core/client/src/schema-component/core/SchemaComponent.tsx index d99b6b21ee..5a51340ace 100644 --- a/packages/core/client/src/schema-component/core/SchemaComponent.tsx +++ b/packages/core/client/src/schema-component/core/SchemaComponent.tsx @@ -63,7 +63,7 @@ const RecursionSchemaComponent = memo((props: ISchemaFieldProps & SchemaComponen /** * @deprecated */ - refresh: _.noop, + refresh: ctx.refresh || _.noop, }), [ctx, distributed], ); diff --git a/packages/core/client/src/schema-component/hooks/useDesigner.ts b/packages/core/client/src/schema-component/hooks/useDesigner.ts index f688a2e7f3..1d69c98e07 100644 --- a/packages/core/client/src/schema-component/hooks/useDesigner.ts +++ b/packages/core/client/src/schema-component/hooks/useDesigner.ts @@ -13,6 +13,7 @@ import { useMemo } from 'react'; import { SchemaToolbar } from '../../schema-settings'; const DefaultSchemaToolbar = () => null; +DefaultSchemaToolbar.isNullComponent = true; /** * @deprecated diff --git a/packages/core/server/src/gateway/ws-server.ts b/packages/core/server/src/gateway/ws-server.ts index f35abf10ef..87ded7963c 100644 --- a/packages/core/server/src/gateway/ws-server.ts +++ b/packages/core/server/src/gateway/ws-server.ts @@ -224,6 +224,9 @@ export class WSServer extends EventEmitter { setClientTag(clientId: string, tagKey: string, tagValue: string) { const client = this.webSocketClients.get(clientId); + if (!client) { + return; + } client.tags.add(`${tagKey}#${tagValue}`); console.log(`client tags: ${Array.from(client.tags)}`); } diff --git a/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts b/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts index 94365b9649..85cb90ca9a 100644 --- a/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts @@ -101,7 +101,15 @@ describe('xlsx importer', () => { workbook: template, }); - await expect(importer.validate()).resolves.toBeUndefined(); + let error; + + try { + await importer.validate(); + } catch (e) { + error = e; + } + + expect(error).toBeUndefined(); }); }); diff --git a/packages/plugins/@nocobase/plugin-client/src/server/server.ts b/packages/plugins/@nocobase/plugin-client/src/server/server.ts index f0d58dd692..504743cebd 100644 --- a/packages/plugins/@nocobase/plugin-client/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-client/src/server/server.ts @@ -96,6 +96,15 @@ export class PluginClientServer extends Plugin { if (process.env['EXPORT_LIMIT']) { info.exportLimit = parseInt(process.env['EXPORT_LIMIT']); } + + if (process.env['EXPORT_AUTO_MODE_THRESHOLD']) { + info.exportAutoModeThreshold = parseInt(process.env['EXPORT_AUTO_MODE_THRESHOLD']); + } + + if (process.env['EXPORT_ATTACHMENTS_AUTO_MODE_THRESHOLD']) { + info.exportAttachmentsAutoModeThreshold = parseInt(process.env['EXPORT_ATTACHMENTS_AUTO_MODE_THRESHOLD']); + } + ctx.body = info; await next(); },