From 4274d7ee4a15f3dc9cdeac7578dc8c48d2024a9b Mon Sep 17 00:00:00 2001 From: "bai.zixv" Date: Thu, 23 May 2024 12:01:08 +0800 Subject: [PATCH] feat: approval summary and refactor antd-style (#1036) ![image](/attachments/3a106d40-0cec-4db9-88a2-9f6e08843907) Co-authored-by: sealday Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1036 Co-authored-by: bai.zixv Co-committed-by: bai.zixv --- .../AppendsTreeSelectV2.tsx | 275 ++++++++++++++++++ .../antd/appends-tree-select/index.ts | 1 + .../src/client/common/Cn.ApprovalTodos.tsx | 2 +- .../trigger/Approval.trigger.tsx | 3 +- .../launch/Sm.ApprovalBlockLaunch.tsx | 4 +- .../todos/Sm.ApprovalBlockTodos.tsx | 4 +- .../approval-common/Approvals.collection.tsx | 2 +- .../approval-common/ApprovalsSummary.view.tsx | 29 +- .../src/client/usage/approval-common/style.ts | 27 ++ .../src/server/ApprovalInstruction.ts | 5 +- .../src/server/ApprovalTrigger.ts | 18 +- .../plugin-approval/src/server/actions.ts | 9 +- .../server/collections/approvalExecutions.ts | 9 + .../src/server/collections/approvalRecords.ts | 10 +- .../src/server/collections/approvals.ts | 6 +- .../@hera/plugin-approval/src/server/tools.ts | 21 +- .../plugins/@nocobase/plugin-acl/package.json | 1 - .../src/client/permissions/style.ts | 2 +- .../@nocobase/plugin-api-doc/package.json | 1 - .../plugin-api-doc/src/client/index.tsx | 2 +- .../@nocobase/plugin-calendar/package.json | 1 - .../src/client/calendar/global.style.ts | 2 +- .../plugin-data-source-manager/package.json | 1 - .../component/PermissionManager/style.ts | 2 +- .../@nocobase/plugin-gantt/package.json | 1 - .../src/client/components/calendar/style.tsx | 2 +- .../src/client/components/grid/style.tsx | 2 +- .../src/client/components/other/style.tsx | 4 +- .../src/client/components/task-item/style.tsx | 2 +- .../@nocobase/plugin-kanban/package.json | 1 - .../plugin-kanban/src/client/board/style.ts | 2 +- .../plugin-mobile-client/package.json | 1 - .../plugin-multi-app-manager/package.json | 1 - .../client/MultiAppManagerProvider.style.ts | 2 +- pnpm-lock.yaml | 118 ++++---- 35 files changed, 443 insertions(+), 130 deletions(-) create mode 100644 packages/core/client/src/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.tsx create mode 100644 packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/style.ts diff --git a/packages/core/client/src/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.tsx b/packages/core/client/src/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.tsx new file mode 100644 index 000000000..f9aa705ed --- /dev/null +++ b/packages/core/client/src/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.tsx @@ -0,0 +1,275 @@ +import { CloseCircleFilled } from '@ant-design/icons'; +import { Tag, TreeSelect } from 'antd'; +import type { DefaultOptionType, TreeSelectProps } from 'rc-tree-select/es/TreeSelect'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { + CollectionFieldOptions_deprecated, + parseCollectionName, + useCollectionManager_deprecated, + useCompile, +} from '../../..'; + +export type AppendsTreeSelectPropsV2 = { + value: string[] | string; + onChange: (value: string[] | string) => void; + title?: string; + multiple?: boolean; + filter?(field): boolean; + collection?: string; + needLeaf?: boolean; + useCollection?(props: Pick): string; + rootOption?: { + label: string; + value: string; + }; +}; + +type TreeOptionType = Omit & { value: string }; + +function usePropsCollection({ collection }) { + return collection; +} + +type CallScope = { + compile?(value: string): string; + getCollectionFields?(name: any, dataSource?: string): CollectionFieldOptions_deprecated[]; + filter(field): boolean; +}; + +function loadChildren(this, option) { + const result = getCollectionFieldOptions.call(this, option.field.target, option); + if (result.length) { + if (!result.some((item) => isAssociation(item.field))) { + option.isLeaf = true; + } + } else { + option.isLeaf = true; + } + return result; +} + +function isAssociation(field) { + return field.target && field.interface; +} + +function trueFilter(field) { + return true; +} + +function getCollectionFieldOptions( + this: CallScope, + collection, + parentNode?, + options = { needLeaf: false }, +): TreeOptionType[] { + const { needLeaf } = options; + const [dataSourceName, collectionName] = parseCollectionName(collection); + const rawFields = this.getCollectionFields(collectionName, dataSourceName); + const fields = needLeaf ? rawFields : rawFields.filter(isAssociation); + const boundLoadChildren = loadChildren.bind(this); + return fields.filter(this.filter).map((field) => { + const key = parentNode ? `${parentNode.value ? `${parentNode.value}.` : ''}${field.name}` : field.name; + const fieldTitle = this.compile(field.uiSchema?.title) ?? field.name; + const isLeaf = !this.getCollectionFields(field.target).filter(isAssociation).filter(this.filter).length; + return { + pId: parentNode?.key ?? null, + id: key, + key, + value: key, + title: fieldTitle, + isLeaf, + loadChildren: isLeaf ? null : boundLoadChildren, + field, + fullTitle: parentNode ? [...parentNode.fullTitle, fieldTitle] : [fieldTitle], + }; + }); +} + +// XXX: 目前 AppendsTreeSelectV2 和 AppendsTreeSelect 都有特化逻辑, 需要整理出一个通用组件 +export const AppendsTreeSelectV2: React.FC = (props) => { + const { + title, + value: propsValue, + onChange, + collection, + useCollection = usePropsCollection, + filter = trueFilter, + rootOption, + loadData: propsLoadData, + needLeaf = false, + ...restProps + } = props; + const compile = useCompile(); + const { t } = useTranslation(); + const [optionsMap, setOptionsMap] = useState({}); + const collectionString = useCollection({ collection }); + const [dataSourceName, collectionName] = parseCollectionName(collectionString); + const { getCollectionFields } = useCollectionManager_deprecated(dataSourceName); + const treeData = Object.values(optionsMap); + const value: string | DefaultOptionType[] = useMemo(() => { + if (props.multiple) { + return ((propsValue as string[]) || []).map((v) => optionsMap[v]).filter(Boolean); + } + return propsValue; + }, [propsValue, props.multiple, optionsMap]); + + const loadData = useCallback( + async (option) => { + if (propsLoadData != null) { + return propsLoadData(option); + } + if (!option.isLeaf && option.loadChildren) { + const children = option.loadChildren(option); + setOptionsMap((prev) => { + return children.reduce((result, item) => Object.assign(result, { [item.value]: item }), { ...prev }); + }); + } + }, + [propsLoadData], + ); + // NOTE: + useEffect(() => { + const parentNode = rootOption + ? { + ...rootOption, + id: rootOption.value, + key: rootOption.value, + title: rootOption.label, + fullTitle: rootOption.label, + isLeaf: false, + } + : null; + const tData = + propsLoadData === null + ? [] + : getCollectionFieldOptions.call({ compile, getCollectionFields, filter }, collectionString, parentNode, { + needLeaf, + }); + + const map = tData.reduce((result, item) => Object.assign(result, { [item.value]: item }), {}); + if (parentNode) { + map[parentNode.value] = parentNode; + } + setOptionsMap(map); + }, [collectionString, rootOption, filter, propsLoadData]); + + // NOTE: preload options in value + useEffect(() => { + const arr = (props.multiple ? propsValue : propsValue ? [propsValue] : []) as string[]; + console.log('%c Line:160 🍑 arr', 'font-size:18px;color:#4fff4B;background:#f5ce50', arr); + if (!arr?.length || arr.every((v) => Boolean(optionsMap[v]))) { + return; + } + const loaded = []; + + arr.forEach((v) => { + if (typeof v !== 'string') { + v = v.value; + } + const paths = v.split('.'); + let option = optionsMap[paths[0]]; + for (let i = 1; i < paths.length; i++) { + if (!option) { + break; + } + const next = paths.slice(0, i + 1).join('.'); + if (optionsMap[next]) { + option = optionsMap[next]; + break; + } + if (!option.isLeaf && option.loadChildren) { + const children = option.loadChildren(option); + if (children?.length) { + loaded.push(...children); + option = children.find((item) => item.value === paths.slice(0, i + 1).join('.')); + } + } + } + }); + setOptionsMap((prev) => { + return loaded.reduce((result, item) => Object.assign(result, { [item.value]: item }), { ...prev }); + }); + }, [propsValue, treeData.length, props.multiple]); + + const handleChange = useCallback( + (next: DefaultOptionType[] | string) => { + console.log('%c Line:193 🥔 next', 'font-size:18px;color:#42b983;background:#f5ce50', next); + if (!props.multiple) { + onChange(next as string | Array); + return; + } + + const newValue = (next as DefaultOptionType[]).map((i) => i.value).filter(Boolean) as string[]; + const valueSet = new Set(newValue); + const delValue = (value as DefaultOptionType[]).find((i) => !valueSet.has(i.value as string)); + + if (delValue) { + const prefix = `${delValue.value}.`; + Object.keys(optionsMap).forEach((key) => { + if (key.startsWith(prefix)) { + valueSet.delete(key); + } + }); + } else { + newValue.forEach((v) => { + const paths = v.split('.'); + if (paths.length) { + for (let i = 1; i <= paths.length; i++) { + valueSet.add(paths.slice(0, i).join('.')); + } + } + }); + } + onChange(next); + }, + [props.multiple, value, onChange, optionsMap], + ); + + const TreeTag = useCallback( + (props) => { + const { value, onClose, disabled, closable } = props; + if (!value) { + return null; + } + const { fullTitle } = optionsMap[value] ?? {}; + return ( + + {fullTitle?.join(' / ')} + + ); + }, + [optionsMap], + ); + + const filteredValue = Array.isArray(value) ? value.filter((i) => i.value in optionsMap) : value; + console.log('%c Line:247 🥕 filteredValue', 'font-size:18px;color:#6ec1c2;background:#ea7e5c', filteredValue); + const valueKeys: string[] = props.multiple + ? (propsValue as string[]) + : propsValue != null + ? [propsValue as string] + : []; + + return ( + , + }} + treeCheckStrictly={props.multiple} + treeCheckable={props.multiple} + tagRender={TreeTag} + onChange={handleChange as (next) => void} + treeDataSimpleMode + treeData={treeData} + loadData={loadData} + {...restProps} + /> + ); +}; diff --git a/packages/core/client/src/schema-component/antd/appends-tree-select/index.ts b/packages/core/client/src/schema-component/antd/appends-tree-select/index.ts index 221768530..bcb65e6b3 100644 --- a/packages/core/client/src/schema-component/antd/appends-tree-select/index.ts +++ b/packages/core/client/src/schema-component/antd/appends-tree-select/index.ts @@ -1 +1,2 @@ export * from './AppendsTreeSelect'; +export * from './AppendsTreeSelectV2'; diff --git a/packages/plugins/@hera/plugin-approval/src/client/common/Cn.ApprovalTodos.tsx b/packages/plugins/@hera/plugin-approval/src/client/common/Cn.ApprovalTodos.tsx index 999c2886a..f1d22c9c5 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/common/Cn.ApprovalTodos.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/common/Cn.ApprovalTodos.tsx @@ -96,7 +96,7 @@ export const CollectionApprovalTodos = { }, { type: 'string', - name: 'summaryString', + name: 'summary', interface: 'input', uiSchema: { type: 'string', diff --git a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/Approval.trigger.tsx b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/Approval.trigger.tsx index 84f94f411..4910159f9 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/Approval.trigger.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/configuration/trigger/Approval.trigger.tsx @@ -118,8 +118,7 @@ export class ApprovalTrigger extends Trigger { type: 'array', title: '{{t("Select fields to display in the approval summary", { ns: "workflow" })}}', 'x-decorator': 'FormItem', - // TODO: 需要更换为能支持同时选择普通字段和关联字段的组件.目前只能选择关联字段.走通业务逻辑为先 - 'x-component': 'AppendsTreeSelect', + 'x-component': 'AppendsTreeSelectV2', 'x-component-props': { title: 'Preload associations', multiple: true, diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx index 533880c98..9096d7f6e 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx @@ -142,13 +142,13 @@ export const SchemaApprovalBlockLaunch = { }, }, }, - summaryString: { + summary: { type: 'void', 'x-decorator': 'TableV2.Column.Decorator', 'x-component': 'TableV2.Column', title: tval('Approval Summary'), properties: { - summaryString: { + summary: { type: 'string', 'x-component': 'CollectionField', 'x-read-pretty': true, diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx index 46e5545d2..2a6dbd5c2 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx @@ -143,13 +143,13 @@ export const SchemaApprovalBlockTodos = { }, }, }, - summaryString: { + summary: { type: 'void', 'x-decorator': 'TableV2.Column.Decorator', 'x-component': 'TableV2.Column', title: tval('Approval Summary'), properties: { - summaryString: { + summary: { type: 'string', 'x-component': 'CollectionField', 'x-read-pretty': true, diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Approvals.collection.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Approvals.collection.tsx index 004f143c6..09f5f7dea 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Approvals.collection.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/Approvals.collection.tsx @@ -73,7 +73,7 @@ export const CollectionApprovals = { }, { type: 'string', - name: 'summaryString', + name: 'summary', interface: 'input', uiSchema: { type: 'string', diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/ApprovalsSummary.view.tsx b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/ApprovalsSummary.view.tsx index 426cee970..4e4f9ce88 100644 --- a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/ApprovalsSummary.view.tsx +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/ApprovalsSummary.view.tsx @@ -1,14 +1,31 @@ +import { useCollectionManager, useCollectionRecordData, useCompile } from '@tachybase/client'; import React from 'react'; +import useStyles from './style'; export const ApprovalsSummary = (props) => { - const { value = '', style } = props; - const valueArray = value.split(','); + const { value = '' } = props; + const record = useCollectionRecordData(); + const cm = useCollectionManager(); + const compile = useCompile(); + const { styles } = useStyles(); + const { collectionName } = record; + const results = Object.entries(value).map(([key, objValue]) => { + const field = cm.getCollectionField(`${collectionName}.${key}`); + return { + label: compile(field?.uiSchema?.title || key), + value: Object.prototype.toString.call(objValue) === '[object Object]' ? objValue?.['name'] : objValue, + }; + }); + + // 展示结果要展示一个数组对象, 是 label 和 value 的形式 + // label 放中文, value 放值 return ( -
- {valueArray.map((val) => ( -
- {val} +
+ {results.map((item) => ( +
+
{`${item.label}:`}   
+
{item.value}
))}
diff --git a/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/style.ts b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/style.ts new file mode 100644 index 000000000..d327cedcf --- /dev/null +++ b/packages/plugins/@hera/plugin-approval/src/client/usage/approval-common/style.ts @@ -0,0 +1,27 @@ +import { createStyles } from '@tachybase/client'; + +const useStyles = createStyles(({ css }) => { + return { + ApprovalsSummaryStyle: css` + text-align: left; + &-item { + display: flex; + flex-direction: row; + align-items: baseline; + overflow: hidden; + + &-label { + text-overflow: ellipsis; + white-space: nowrap; + color: #aaa; + } + &-value { + text-overflow: ellipsis; + white-space: nowrap; + } + } + `, + }; +}); + +export default useStyles; diff --git a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts index 4fd3da0c2..abbf03d91 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/ApprovalInstruction.ts @@ -127,7 +127,7 @@ export default class ApprovalInstruction extends Instruction { filter: { 'executions.id': processor.execution.id, }, - fields: ['id', 'status', 'data', 'summaryString'], + fields: ['id', 'status', 'data', 'summary', 'collectionName'], appends: ['approvalExecutions'], except: ['data'], }); @@ -145,7 +145,8 @@ export default class ApprovalInstruction extends Instruction { index, status: node.config.order && index ? APPROVAL_ACTION_STATUS.ASSIGNED : APPROVAL_ACTION_STATUS.PENDING, snapshot: approvalExecution.snapshot, - summaryString: approval.summaryString, + summary: approval.summary, + collectionName: approval.collectionName, })), { transaction: processor.transaction, diff --git a/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts b/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts index 01e93fe64..409b9a2cc 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/ApprovalTrigger.ts @@ -5,7 +5,7 @@ import { parseCollectionName } from '@tachybase/data-source-manager'; import { EXECUTION_STATUS, Trigger, toJSON, JOB_STATUS } from '@tachybase/plugin-workflow'; import { APPROVAL_ACTION_STATUS, APPROVAL_STATUS } from './constants'; import { UiSchemaRepository } from '@nocobase/plugin-ui-schema-storage'; -import { getSummaryString } from './tools'; +import { getSummary } from './tools'; const ExecutionStatusMap = { [EXECUTION_STATUS.RESOLVED]: APPROVAL_STATUS.APPROVED, @@ -52,10 +52,11 @@ export default class ApprovalTrigger extends Trigger { data: toJSON(data), approvalId: approval.id, applicantRoleName: approval.applicantRoleName, - summaryString: getSummaryString({ + summary: getSummary({ summaryConfig: workflow.config.summary, data, }), + collectionName: approval.collectionName, }, { transaction }, ); @@ -65,14 +66,15 @@ export default class ApprovalTrigger extends Trigger { if (workflow.type !== ApprovalTrigger.TYPE) { return; } - const { approvalId, data, summaryString } = execution.context; + const { approvalId, data, summary, collectionName } = execution.context; const approvalExecution = await this.workflow.db.getRepository('approvalExecutions').create({ values: { approvalId, executionId: execution.id, status: execution.status, snapshot: data, - summaryString: summaryString, + summary, + collectionName, }, transaction, }); @@ -198,7 +200,10 @@ export default class ApprovalTrigger extends Trigger { // updatedById: currentUser.id, workflowId: workflow.id, workflowKey: workflow.key, - summaryString: '12,11,15', + summary: getSummary({ + summaryConfig: workflow.config.summary, + data, + }), }, context, }); @@ -231,7 +236,6 @@ export default class ApprovalTrigger extends Trigger { const { repository } = this.workflow.app.dataSourceManager.dataSources .get(dataSourceName) .collectionManager.getCollection(collectionName); - const curretSummaryConfig = workflow.config?.summary || []; dataCurrent = await repository.findOne({ filterByTk: data.id, appends: [...workflow.config.appends], @@ -268,7 +272,7 @@ export default class ApprovalTrigger extends Trigger { workflowId: workflow.id, workflowKey: workflow.key, applicantRoleName: context.state.currentRole, - summaryString: getSummaryString({ + summary: getSummary({ summaryConfig: workflow.config.summary, data: dataCurrent, }), diff --git a/packages/plugins/@hera/plugin-approval/src/server/actions.ts b/packages/plugins/@hera/plugin-approval/src/server/actions.ts index b7053a326..7f18f484f 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/actions.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/actions.ts @@ -2,6 +2,7 @@ import actions, { utils } from '@tachybase/actions'; import WorkflowPlugin, { EXECUTION_STATUS, JOB_STATUS, toJSON } from '@tachybase/plugin-workflow'; import { APPROVAL_STATUS, APPROVAL_ACTION_STATUS } from './constants'; import { parseCollectionName } from '@tachybase/data-source-manager'; +import { getSummary } from './tools'; const workflows = { async listApprovalFlows(context, next) { @@ -60,7 +61,10 @@ const approvals = { dataKey: values[collection.filterTargetKey], workflowKey: workflow.key, applicantRoleName: context.state.currentRole, - summary: toJSON(workflow.config?.summary ?? []), + summary: getSummary({ + summaryConfig: workflow.config.summary, + data: instance, + }), }, }); return actions.create(context, next); @@ -238,7 +242,8 @@ const approvalRecords = { status: values.status, comment: values.comment, snapshot: approvalRecord.approval.data, - summaryString: approvalRecord.approval.summaryString, + summary: approvalRecord.approval.summary, + collectionName: approvalRecord.approval.collectionName, }); context.body = approvalRecord.get(); context.status = 202; diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts index ac46d16e9..895dc243e 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalExecutions.ts @@ -6,6 +6,10 @@ export default defineCollection({ dumpRules: 'required', name: 'approvalExecutions', fields: [ + { + type: 'string', + name: 'collectionName', + }, { type: 'bigInt', name: 'id', @@ -32,6 +36,11 @@ export default defineCollection({ type: 'jsonb', name: 'snapshot', }, + { + type: 'jsonb', + name: 'summary', + defaultValue: {}, + }, { type: 'hasMany', name: 'records', diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts index 56affd4c9..30d42d714 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvalRecords.ts @@ -6,6 +6,10 @@ export default defineCollection({ dumpRules: 'required', name: 'approvalRecords', fields: [ + { + type: 'string', + name: 'collectionName', + }, { type: 'belongsTo', name: 'approval', @@ -51,9 +55,9 @@ export default defineCollection({ defaultValue: {}, }, { - type: 'string', - name: 'summaryString', - defaultValue: '', + type: 'jsonb', + name: 'summary', + defaultValue: {}, }, { type: 'text', diff --git a/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts b/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts index 26ca4e963..3fe0984e0 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/collections/approvals.ts @@ -62,9 +62,9 @@ export default defineCollection({ defaultValue: {}, }, { - type: 'string', - name: 'summaryString', - defaultValue: '', + type: 'jsonb', + name: 'summary', + defaultValue: {}, }, { type: 'belongsTo', diff --git a/packages/plugins/@hera/plugin-approval/src/server/tools.ts b/packages/plugins/@hera/plugin-approval/src/server/tools.ts index 8e6b9cf4c..4e6df35de 100644 --- a/packages/plugins/@hera/plugin-approval/src/server/tools.ts +++ b/packages/plugins/@hera/plugin-approval/src/server/tools.ts @@ -5,17 +5,16 @@ interface ParamsType { data: object; } -export function getSummaryString(params: ParamsType): string { +export function getSummary(params: ParamsType): object { const { summaryConfig = [], data } = params; - const result = summaryConfig - .map((key) => { - const value = _.get(data, key); - // XXX: 丑陋的实现, 不应该依赖具体字段, 应该从 summaryConfig, 拿到的就是最终的值, 走通优先 - if (Object.prototype.toString.call(value) === '[object Object]') { - return _.get(value, 'name'); - } - return _.get(data, key); - }) - .join(','); + + const result = summaryConfig.reduce((summary, key) => { + const value = _.get(data, key); + return { + ...summary, + [key]: value, + }; + }, {}); + return result; } diff --git a/packages/plugins/@nocobase/plugin-acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json index bd5fdcf8f..6fd252276 100644 --- a/packages/plugins/@nocobase/plugin-acl/package.json +++ b/packages/plugins/@nocobase/plugin-acl/package.json @@ -21,7 +21,6 @@ "@types/jsonwebtoken": "^8.5.8", "ahooks": "^3.7.2", "antd": "5.16.1", - "antd-style": "3.4.5", "async-mutex": "^0.3.2", "jsonwebtoken": "^8.5.1", "lodash": "4.17.21", diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/style.ts b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/style.ts index c4e9179c3..101b9cc44 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/permissions/style.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/permissions/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ css }) => { return css` diff --git a/packages/plugins/@nocobase/plugin-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json index 17488450c..1f0fda8e0 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -15,7 +15,6 @@ "devDependencies": { "@ant-design/icons": "~5.3.6", "antd": "5.16.1", - "antd-style": "3.4.5", "react-i18next": "^11.15.1", "swagger-ui-dist": "^5.3.1" }, diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx index cd8be6cae..2848b7bb3 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-api-doc/src/client/index.tsx @@ -1,7 +1,7 @@ import { RightOutlined } from '@ant-design/icons'; import { Plugin } from '@tachybase/client'; import { Button, Tooltip } from 'antd'; -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; import React, { lazy } from 'react'; import { NAMESPACE } from '../locale'; diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json index b2db64304..38ec5b144 100644 --- a/packages/plugins/@nocobase/plugin-calendar/package.json +++ b/packages/plugins/@nocobase/plugin-calendar/package.json @@ -21,7 +21,6 @@ "@tachybase/components": "workspace:*", "@tachybase/schema": "workspace:*", "antd": "5.16.1", - "antd-style": "3.4.5", "cron-parser": "4.4.0", "dayjs": "^1.11.8", "lodash": "^4.17.21", diff --git a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/global.style.ts b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/global.style.ts index 988a41a25..3929a9a0e 100644 --- a/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/global.style.ts +++ b/packages/plugins/@nocobase/plugin-calendar/src/client/calendar/global.style.ts @@ -1,4 +1,4 @@ -import { createGlobalStyle } from 'antd-style'; +import { createGlobalStyle } from '@tachybase/client'; const GlobalStyle = createGlobalStyle` .rbc-overlay { diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index d1a5a2415..314d9e64e 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -16,7 +16,6 @@ "@tachybase/schema": "workspace:*", "ahooks": "^3.7.2", "antd": "5.16.1", - "antd-style": "3.4.5", "classnames": "^2.3.1", "lodash": "4.17.21", "react-i18next": "^11.15.1", diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/style.ts b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/style.ts index c4e9179c3..101b9cc44 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/style.ts +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ css }) => { return css` diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index 893a608b8..88de03d42 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -16,7 +16,6 @@ "@tachybase/components": "workspace:*", "@tachybase/schema": "workspace:*", "antd": "5.16.1", - "antd-style": "3.4.5", "lodash": "4.17.21", "react-i18next": "^11.15.1" }, diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx index b69905b1c..6a2daa049 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx @@ -1,5 +1,5 @@ import { TinyColor } from '@ctrl/tinycolor'; -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { const colorFillAlterSolid = new TinyColor(token.colorFillAlter) diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/style.tsx index 81bf78d4f..b76966286 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/grid/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/other/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/other/style.tsx index 544d78853..93ff15fe6 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/other/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/other/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { @@ -60,7 +60,7 @@ const useStyles = createStyles(({ token, css }) => { .horizontalScroll: { height: 1 } - + .verticalScroll: { overflow: hidden auto; width: 1rem; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/task-item/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/task-item/style.tsx index 2d526efcc..9f889b686 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/task-item/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/task-item/style.tsx @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; const useStyles = createStyles(({ token, css }) => { return { diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index 1d92fc794..70224b7ff 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -15,7 +15,6 @@ "@tachybase/components": "workspace:*", "@tachybase/schema": "workspace:*", "antd": "5.16.1", - "antd-style": "3.4.5", "classnames": "^2.3.1", "lodash": "4.17.21", "react-beautiful-dnd": "^13.1.0", diff --git a/packages/plugins/@nocobase/plugin-kanban/src/client/board/style.ts b/packages/plugins/@nocobase/plugin-kanban/src/client/board/style.ts index ed3102a83..e1082ca40 100644 --- a/packages/plugins/@nocobase/plugin-kanban/src/client/board/style.ts +++ b/packages/plugins/@nocobase/plugin-kanban/src/client/board/style.ts @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ css, token }) => { return { diff --git a/packages/plugins/@tachybase/plugin-mobile-client/package.json b/packages/plugins/@tachybase/plugin-mobile-client/package.json index 3fc8d2c26..608d61408 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/package.json +++ b/packages/plugins/@tachybase/plugin-mobile-client/package.json @@ -15,7 +15,6 @@ "antd": "5.16.1", "antd-mobile": "^5.35.0", "antd-mobile-icons": "^0.3.0", - "antd-style": "3.x", "classnames": "2.x", "lodash": "4.17.21", "react": "~18.2.0", diff --git a/packages/plugins/@tachybase/plugin-multi-app-manager/package.json b/packages/plugins/@tachybase/plugin-multi-app-manager/package.json index 5276b50fc..bb1d74276 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@tachybase/plugin-multi-app-manager/package.json @@ -11,7 +11,6 @@ "devDependencies": { "@tachybase/schema": "workspace:*", "antd": "5.16.1", - "antd-style": "3.x", "async-mutex": "^0.3.2", "lodash": "4.17.21", "mysql2": "^2.3.3", diff --git a/packages/plugins/@tachybase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.style.ts b/packages/plugins/@tachybase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.style.ts index fcd0dcf45..19ca465d1 100644 --- a/packages/plugins/@tachybase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.style.ts +++ b/packages/plugins/@tachybase/plugin-multi-app-manager/src/client/MultiAppManagerProvider.style.ts @@ -1,4 +1,4 @@ -import { createStyles } from 'antd-style'; +import { createStyles } from '@tachybase/client'; export const useStyles = createStyles(({ token }) => { return { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f507e0d80..165aeacbc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1811,9 +1811,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) async-mutex: specifier: ^0.3.2 version: 0.3.2 @@ -1972,9 +1969,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) react-i18next: specifier: ^11.15.1 version: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) @@ -2198,9 +2192,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) cron-parser: specifier: 4.4.0 version: 4.4.0 @@ -2459,9 +2450,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.1 version: 2.5.1 @@ -2773,9 +2761,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) lodash: specifier: 4.17.21 version: 4.17.21 @@ -2984,9 +2969,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.4.5 - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.1 version: 2.5.1 @@ -3889,9 +3871,6 @@ importers: antd-mobile-icons: specifier: ^0.3.0 version: 0.3.0 - antd-style: - specifier: 3.x - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: 2.x version: 2.5.1 @@ -3935,9 +3914,6 @@ importers: antd: specifier: 5.16.1 version: 5.16.1(react-dom@18.2.0)(react@18.2.0) - antd-style: - specifier: 3.x - version: 3.4.5(@types/react@18.2.79)(antd@5.16.1)(react-dom@18.2.0)(react@18.2.0) async-mutex: specifier: ^0.3.2 version: 0.3.2 @@ -6220,7 +6196,7 @@ packages: '@babel/parser': 7.23.6 '@babel/template': 7.22.15 '@babel/traverse': 7.23.6(supports-color@5.5.0) - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 convert-source-map: 1.9.0 debug: 4.3.4(supports-color@5.5.0) gensync: 1.0.0-beta.2 @@ -6264,7 +6240,7 @@ packages: '@babel/parser': 7.24.4 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 convert-source-map: 2.0.0 debug: 4.3.4(supports-color@5.5.0) gensync: 1.0.0-beta.2 @@ -6327,7 +6303,7 @@ packages: resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 jsesc: 2.5.2 @@ -6336,7 +6312,7 @@ packages: resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -6354,13 +6330,13 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 dev: false /@babel/helper-compilation-targets@7.23.6: @@ -6427,26 +6403,26 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-member-expression-to-functions@7.23.0: resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 dev: false /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-module-imports@7.24.3: resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} @@ -6462,10 +6438,10 @@ packages: dependencies: '@babel/core': 7.22.10 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} @@ -6475,10 +6451,10 @@ packages: dependencies: '@babel/core': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} @@ -6488,10 +6464,10 @@ packages: dependencies: '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 /@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5): resolution: {integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==} @@ -6510,7 +6486,7 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 dev: false /@babel/helper-plugin-utils@7.22.5: @@ -6549,7 +6525,7 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-simple-access@7.24.5: resolution: {integrity: sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==} @@ -6561,14 +6537,14 @@ packages: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 dev: false /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@babel/helper-split-export-declaration@7.24.5: resolution: {integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==} @@ -6602,7 +6578,7 @@ packages: dependencies: '@babel/helper-function-name': 7.23.0 '@babel/template': 7.22.15 - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 dev: false /@babel/helpers@7.23.6: @@ -6621,7 +6597,7 @@ packages: dependencies: '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 transitivePeerDependencies: - supports-color @@ -6639,7 +6615,7 @@ packages: resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.0 @@ -6656,7 +6632,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 /@babel/parser@7.24.5: resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} @@ -7613,7 +7589,7 @@ packages: dependencies: '@babel/code-frame': 7.24.2 '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 /@babel/traverse@7.23.6(supports-color@5.5.0): resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==} @@ -7626,7 +7602,7 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.6 - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 debug: 4.3.4(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: @@ -7643,7 +7619,7 @@ packages: '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 debug: 4.3.4(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: @@ -7674,14 +7650,6 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - /@babel/types@7.24.0: - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - /@babel/types@7.24.5: resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} @@ -8340,6 +8308,7 @@ packages: '@types/react': 18.2.79 hoist-non-react-statics: 3.3.2 react: 18.2.0 + dev: false /@emotion/serialize@1.1.2: resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} @@ -8363,6 +8332,7 @@ packages: html-tokenize: 2.0.1 multipipe: 1.0.2 through: 2.3.8 + dev: false /@emotion/sheet@1.2.2: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} @@ -8383,6 +8353,7 @@ packages: react: '>=16.8.0' dependencies: react: 18.2.0 + dev: false /@emotion/utils@1.2.1: resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} @@ -11906,7 +11877,7 @@ packages: resolution: {integrity: sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==} engines: {node: '>=10'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 entities: 4.5.0 /@svgr/plugin-jsx@6.5.1(@svgr/core@6.5.1): @@ -12102,23 +12073,23 @@ packages: /@types/babel__generator@7.6.7: resolution: {integrity: sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@types/babel__template@7.4.4: resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: '@babel/parser': 7.23.6 - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@types/babel__traverse@7.20.4: resolution: {integrity: sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==} dependencies: - '@babel/types': 7.23.6 + '@babel/types': 7.24.5 /@types/babel__traverse@7.20.5: resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -13863,7 +13834,7 @@ packages: '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.4) '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.4) react-refresh: 0.14.0 - vite: 4.5.2(@types/node@20.12.2)(less@4.1.3) + vite: 4.5.2(@types/node@20.12.8)(less@4.1.3) transitivePeerDependencies: - supports-color @@ -14457,6 +14428,7 @@ packages: transitivePeerDependencies: - '@types/react' - react-dom + dev: false /antd@5.16.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-XAlLRrgYV+nj9FHnkXEPS6HNcKcluEa8v44e7Cixjlp8aOXRhUI6IfZaKpc2MPGjQ+06rp62/dsxOUNJW9kfLA==} @@ -15086,7 +15058,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.5 @@ -15140,7 +15112,7 @@ packages: styled-components: '>= 2' dependencies: '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.22.10) lodash: 4.17.21 picomatch: 2.3.1 @@ -15545,6 +15517,7 @@ packages: /buffer-from@0.1.2: resolution: {integrity: sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==} + dev: false /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -20603,6 +20576,7 @@ packages: minimist: 1.2.8 readable-stream: 1.0.34 through2: 0.4.2 + dev: false /html-webpack-plugin@5.5.0(webpack@5.91.0): resolution: {integrity: sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==} @@ -23410,6 +23384,7 @@ packages: dependencies: duplexer2: 0.1.4 object-assign: 4.1.1 + dev: false /mute-stdout@1.0.1: resolution: {integrity: sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==} @@ -23857,6 +23832,7 @@ packages: /object-keys@0.4.0: resolution: {integrity: sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==} + dev: false /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -27059,6 +27035,7 @@ packages: inherits: 2.0.4 isarray: 0.0.1 string_decoder: 0.10.31 + dev: false /readable-stream@1.1.14: resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} @@ -28893,7 +28870,7 @@ packages: react-dom: '>= 16.8.0' react-is: '>= 16.8.0' dependencies: - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/traverse': 7.23.6(supports-color@5.5.0) '@emotion/is-prop-valid': 1.2.1 '@emotion/stylis': 0.8.5 @@ -29375,6 +29352,7 @@ packages: dependencies: readable-stream: 1.0.34 xtend: 2.1.2 + dev: false /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} @@ -30527,6 +30505,7 @@ packages: react: '>= 16.x' dependencies: react: 18.2.0 + dev: false /use-sync-external-store@1.2.0(react@18.2.0): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} @@ -30779,6 +30758,7 @@ packages: rollup: 3.29.4 optionalDependencies: fsevents: 2.3.3 + dev: false /vite@4.5.2(@types/node@20.12.8)(less@4.1.3): resolution: {integrity: sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==} @@ -30815,7 +30795,6 @@ packages: rollup: 3.29.4 optionalDependencies: fsevents: 2.3.3 - dev: true /vite@5.1.5(@types/node@20.12.8)(sass@1.75.0): resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} @@ -31543,6 +31522,7 @@ packages: engines: {node: '>=0.4'} dependencies: object-keys: 0.4.0 + dev: false /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}