@tachybase/plugin-workflow-approval 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/base/ApprovalPane.schema.d.ts +81 -11
- package/dist/client/common/components/ApprovalsSummary.d.ts +11 -0
- package/dist/client/common/components/SimpleTable.d.ts +24 -0
- package/dist/client/common/components/WorkflowApproval.d.ts +4 -0
- package/dist/client/common/components/index.d.ts +5 -0
- package/dist/client/common/tools/cleanAssociationIds.d.ts +9 -0
- package/dist/client/index.js +34 -70
- package/dist/client/user-interface/h5/common/approval-columns/summary.column.d.ts +7 -0
- package/dist/client/user-interface/h5/common/processSummary.d.ts +14 -0
- package/dist/client/user-interface/h5/todos/component/TabApprovalItem.d.ts +1 -1
- package/dist/common/constants.d.ts +6 -0
- package/dist/common/constants.js +14 -2
- package/dist/common/interface.d.js +15 -0
- package/dist/common/utils.d.ts +2 -0
- package/dist/common/utils.js +46 -0
- package/dist/externalVersion.js +10 -9
- package/dist/locale/en-US.json +3 -1
- package/dist/locale/zh-CN.json +2 -1
- package/dist/server/actions/approvalCarbonCopy.d.ts +1 -1
- package/dist/server/actions/approvalCarbonCopy.js +7 -7
- package/dist/server/actions/approvalRecords.d.ts +2 -2
- package/dist/server/actions/approvalRecords.js +19 -19
- package/dist/server/actions/approvals.d.ts +6 -6
- package/dist/server/actions/approvals.js +65 -82
- package/dist/server/actions/index.js +1 -1
- package/dist/server/actions/workflows.d.ts +1 -1
- package/dist/server/actions/workflows.js +3 -3
- package/dist/server/plugin.js +0 -3
- package/dist/server/tools.d.ts +4 -7
- package/dist/server/tools.js +253 -12
- package/dist/server/triggers/Approval.d.ts +3 -3
- package/dist/server/triggers/Approval.js +32 -22
- package/dist/server/utils.d.ts +2 -2
- package/dist/server/utils.js +4 -4
- package/package.json +9 -9
|
@@ -62,6 +62,11 @@ export declare const schemaApprovalPanne: {
|
|
|
62
62
|
'x-component': string;
|
|
63
63
|
'x-align': string;
|
|
64
64
|
};
|
|
65
|
+
statusFilter: {
|
|
66
|
+
type: string;
|
|
67
|
+
'x-component': string;
|
|
68
|
+
'x-align': string;
|
|
69
|
+
};
|
|
65
70
|
refresh: {
|
|
66
71
|
type: string;
|
|
67
72
|
title: string;
|
|
@@ -224,6 +229,8 @@ export declare const schemaApprovalPanne: {
|
|
|
224
229
|
'x-component': string;
|
|
225
230
|
'x-component-props': {
|
|
226
231
|
sorter: boolean;
|
|
232
|
+
width: number;
|
|
233
|
+
align: string;
|
|
227
234
|
};
|
|
228
235
|
properties: {
|
|
229
236
|
title: {
|
|
@@ -233,14 +240,23 @@ export declare const schemaApprovalPanne: {
|
|
|
233
240
|
};
|
|
234
241
|
};
|
|
235
242
|
};
|
|
236
|
-
|
|
243
|
+
category: {
|
|
237
244
|
type: string;
|
|
238
245
|
'x-decorator': string;
|
|
239
246
|
'x-component': string;
|
|
247
|
+
'x-component-props': {
|
|
248
|
+
width: number;
|
|
249
|
+
align: string;
|
|
250
|
+
};
|
|
240
251
|
properties: {
|
|
241
|
-
|
|
252
|
+
category: {
|
|
242
253
|
type: string;
|
|
254
|
+
'x-collection-field': string;
|
|
243
255
|
'x-component': string;
|
|
256
|
+
'x-component-props': {
|
|
257
|
+
multiple: boolean;
|
|
258
|
+
mode: string;
|
|
259
|
+
};
|
|
244
260
|
'x-read-pretty': boolean;
|
|
245
261
|
};
|
|
246
262
|
};
|
|
@@ -252,13 +268,16 @@ export declare const schemaApprovalPanne: {
|
|
|
252
268
|
'x-component-props': {
|
|
253
269
|
sorter: boolean;
|
|
254
270
|
width: number;
|
|
271
|
+
align: string;
|
|
255
272
|
};
|
|
273
|
+
title: string;
|
|
256
274
|
properties: {
|
|
257
275
|
enabled: {
|
|
258
276
|
type: string;
|
|
259
277
|
'x-component': string;
|
|
260
|
-
'x-
|
|
261
|
-
|
|
278
|
+
'x-component-props': {
|
|
279
|
+
resource: string;
|
|
280
|
+
};
|
|
262
281
|
};
|
|
263
282
|
};
|
|
264
283
|
};
|
|
@@ -269,6 +288,7 @@ export declare const schemaApprovalPanne: {
|
|
|
269
288
|
'x-component-props': {
|
|
270
289
|
sorter: boolean;
|
|
271
290
|
width: number;
|
|
291
|
+
align: string;
|
|
272
292
|
};
|
|
273
293
|
properties: {
|
|
274
294
|
allExecuted: {
|
|
@@ -506,6 +526,42 @@ export declare const schemaApprovalPanne: {
|
|
|
506
526
|
};
|
|
507
527
|
};
|
|
508
528
|
};
|
|
529
|
+
executedTime: {
|
|
530
|
+
type: string;
|
|
531
|
+
'x-decorator': string;
|
|
532
|
+
'x-component': string;
|
|
533
|
+
title: string;
|
|
534
|
+
'x-component-props': {
|
|
535
|
+
sorter: boolean;
|
|
536
|
+
width: number;
|
|
537
|
+
align: string;
|
|
538
|
+
style: {
|
|
539
|
+
display: string;
|
|
540
|
+
placeItems: string;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
properties: {
|
|
544
|
+
executedTime: {
|
|
545
|
+
type: string;
|
|
546
|
+
'x-component': string;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
description: {
|
|
551
|
+
type: string;
|
|
552
|
+
'x-decorator': string;
|
|
553
|
+
'x-component': string;
|
|
554
|
+
properties: {
|
|
555
|
+
description: {
|
|
556
|
+
type: string;
|
|
557
|
+
'x-component': string;
|
|
558
|
+
'x-component-props': {
|
|
559
|
+
ellipsis: boolean;
|
|
560
|
+
};
|
|
561
|
+
'x-read-pretty': boolean;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
509
565
|
updatedAt: {
|
|
510
566
|
type: string;
|
|
511
567
|
'x-decorator': string;
|
|
@@ -532,7 +588,6 @@ export declare const schemaApprovalPanne: {
|
|
|
532
588
|
'x-decorator': string;
|
|
533
589
|
'x-component': string;
|
|
534
590
|
'x-component-props': {
|
|
535
|
-
sorter: boolean;
|
|
536
591
|
width: number;
|
|
537
592
|
align: string;
|
|
538
593
|
style: {
|
|
@@ -645,6 +700,25 @@ export declare const schemaApprovalPanne: {
|
|
|
645
700
|
'x-decorator': string;
|
|
646
701
|
'x-component': string;
|
|
647
702
|
};
|
|
703
|
+
category: {
|
|
704
|
+
'x-collection-field': string;
|
|
705
|
+
'x-component': string;
|
|
706
|
+
'x-decorator': string;
|
|
707
|
+
'x-component-props': {
|
|
708
|
+
multiple: boolean;
|
|
709
|
+
service: {
|
|
710
|
+
params: {
|
|
711
|
+
filter: {
|
|
712
|
+
$and: {
|
|
713
|
+
type: {
|
|
714
|
+
$eq: string;
|
|
715
|
+
};
|
|
716
|
+
}[];
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
};
|
|
648
722
|
footer: {
|
|
649
723
|
type: string;
|
|
650
724
|
'x-component': string;
|
|
@@ -655,9 +729,7 @@ export declare const schemaApprovalPanne: {
|
|
|
655
729
|
'x-component': string;
|
|
656
730
|
'x-component-props': {
|
|
657
731
|
type: string;
|
|
658
|
-
useAction
|
|
659
|
-
run(): Promise<void>;
|
|
660
|
-
};
|
|
732
|
+
useAction: string;
|
|
661
733
|
};
|
|
662
734
|
};
|
|
663
735
|
cancel: {
|
|
@@ -692,9 +764,7 @@ export declare const schemaApprovalPanne: {
|
|
|
692
764
|
title: string;
|
|
693
765
|
'x-component': string;
|
|
694
766
|
'x-component-props': {
|
|
695
|
-
useAction
|
|
696
|
-
run(): Promise<void>;
|
|
697
|
-
};
|
|
767
|
+
useAction: string;
|
|
698
768
|
};
|
|
699
769
|
};
|
|
700
770
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ApprovalsSummaryProps {
|
|
3
|
+
value: any;
|
|
4
|
+
collectionName?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
itemClassName?: string;
|
|
7
|
+
labelClassName?: string;
|
|
8
|
+
valueClassName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ApprovalsSummary: React.NamedExoticComponent<ApprovalsSummaryProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SimpleTableColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
title: string;
|
|
5
|
+
dataIndex?: string;
|
|
6
|
+
render?: (value: any, record: any, index: number) => React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface SimpleTableProps {
|
|
9
|
+
/** 表格标题 */
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
/** 表格列配置 */
|
|
12
|
+
columns: SimpleTableColumn[];
|
|
13
|
+
/** 表格数据源 */
|
|
14
|
+
dataSource: any[];
|
|
15
|
+
/** 自定义样式 */
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
/** 表格容器样式 */
|
|
18
|
+
wrapperStyle?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 极简表格组件
|
|
22
|
+
* 用于展示简单的表格数据,样式简洁,无额外依赖
|
|
23
|
+
*/
|
|
24
|
+
export declare const SimpleTable: React.FC<SimpleTableProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function getWorkflowDetailPath(id: string | number): string;
|
|
2
|
+
export declare function getWorkflowExecutionsPath(id: string | number): string;
|
|
3
|
+
export declare const WorkflowApprovalLink: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ExecutionApprovalLink: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ConfigButton } from './ConfigButton';
|
|
2
|
+
export { FormBlockProvider } from './FormBlock.provider';
|
|
3
|
+
export { SimpleTable } from './SimpleTable';
|
|
4
|
+
export type { SimpleTableColumn, SimpleTableProps } from './SimpleTable';
|
|
5
|
+
export { ApprovalsSummary } from './ApprovalsSummary';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据清洗工具函数:清除关联字段的 id
|
|
3
|
+
* 用于复制操作时,避免关联字段的 id 被认为是已有数据,从而被误认为是修改而不是新建
|
|
4
|
+
*
|
|
5
|
+
* @param data - 要清洗的数据对象
|
|
6
|
+
* @param collection - collection 对象(可选),用于获取字段信息以更精确地处理
|
|
7
|
+
* @returns 清洗后的数据对象
|
|
8
|
+
*/
|
|
9
|
+
export declare function cleanAssociationIds(data: any, collection?: any): any;
|