@coding-flow/flow-approval-presenter 0.0.8 → 0.0.10
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/plugins/add-audit-type.d.ts +4 -0
- package/dist/plugins/approval-view-plugin-action.d.ts +3 -0
- package/dist/plugins/approval-view-plugin-action.js +0 -0
- package/dist/plugins/delegate-type.d.ts +4 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/manual-key-type.d.ts +4 -0
- package/dist/plugins/return-type.d.ts +4 -0
- package/dist/plugins/sign-key-type.d.ts +4 -0
- package/dist/plugins/transfer-type.d.ts +4 -0
- package/dist/presenters/action.js +13 -10
- package/package.json +4 -4
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "AddAuditViewPlugin";
|
|
2
4
|
export interface AddAuditViewPlugin {
|
|
3
5
|
/** 返回用户 */
|
|
4
6
|
onChange?: (value: string | string[]) => void;
|
|
5
7
|
/** 当前用户 */
|
|
6
8
|
value?: string | string[];
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
7
11
|
}
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "DelegateViewPlugin";
|
|
2
4
|
export interface DelegateViewPlugin {
|
|
3
5
|
/** 返回用户 */
|
|
4
6
|
onChange?: (value: string | string[]) => void;
|
|
5
7
|
/** 当前用户 */
|
|
6
8
|
value?: string | string[];
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
7
11
|
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { type ReturnViewPlugin, VIEW_KEY as ReturnViewPluginKey } from "./return
|
|
|
4
4
|
export { type SignKeyViewPlugin, VIEW_KEY as SignKeyViewPluginKey } from "./sign-key-type";
|
|
5
5
|
export { type TransferViewPlugin, VIEW_KEY as TransferViewPluginKey } from "./transfer-type";
|
|
6
6
|
export { type ManualViewPlugin, VIEW_KEY as ManualViewPluginKey } from "./manual-key-type";
|
|
7
|
+
export * from "./approval-view-plugin-action";
|
package/dist/plugins/index.js
CHANGED
|
@@ -4,4 +4,5 @@ import { VIEW_KEY as external_return_type_js_VIEW_KEY } from "./return-type.js";
|
|
|
4
4
|
import { VIEW_KEY as external_sign_key_type_js_VIEW_KEY } from "./sign-key-type.js";
|
|
5
5
|
import { VIEW_KEY as external_transfer_type_js_VIEW_KEY } from "./transfer-type.js";
|
|
6
6
|
import { VIEW_KEY as external_manual_key_type_js_VIEW_KEY } from "./manual-key-type.js";
|
|
7
|
+
export * from "./approval-view-plugin-action.js";
|
|
7
8
|
export { VIEW_KEY as AddAuditViewPluginKey, external_delegate_type_js_VIEW_KEY as DelegateViewPluginKey, external_manual_key_type_js_VIEW_KEY as ManualViewPluginKey, external_return_type_js_VIEW_KEY as ReturnViewPluginKey, external_sign_key_type_js_VIEW_KEY as SignKeyViewPluginKey, external_transfer_type_js_VIEW_KEY as TransferViewPluginKey };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { NodeOption } from "@coding-flow/flow-types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "ManualViewPlugin";
|
|
3
5
|
export interface ManualViewPlugin {
|
|
4
6
|
/** 返回下级节点Id */
|
|
5
7
|
onChange: (value: string) => void;
|
|
6
8
|
/** 可选下级节点方向 */
|
|
7
9
|
options: NodeOption[];
|
|
10
|
+
/** 动作控制 **/
|
|
11
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
8
12
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "ReturnViewPlugin";
|
|
2
4
|
export interface ReturnViewPlugin {
|
|
3
5
|
/** 返回用户 */
|
|
4
6
|
onChange?: (value: string | string[]) => void;
|
|
5
7
|
/** 当前用户 */
|
|
6
8
|
value?: string | string[];
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FlowOperator } from "@coding-flow/flow-types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
2
4
|
export declare const VIEW_KEY = "SignKeyViewPlugin";
|
|
3
5
|
export interface SignKeyViewPlugin {
|
|
4
6
|
/** 当前用户 */
|
|
@@ -7,4 +9,6 @@ export interface SignKeyViewPlugin {
|
|
|
7
9
|
onChange?: (value: string) => void;
|
|
8
10
|
/** 当前签名 */
|
|
9
11
|
value?: string;
|
|
12
|
+
/** 动作控制 **/
|
|
13
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
10
14
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ApprovalViewPluginAction } from "./approval-view-plugin-action";
|
|
1
3
|
export declare const VIEW_KEY = "TransferViewPlugin";
|
|
2
4
|
export interface TransferViewPlugin {
|
|
3
5
|
/** 返回用户 */
|
|
4
6
|
onChange?: (value: string | string[]) => void;
|
|
5
7
|
/** 当前用户 */
|
|
6
8
|
value?: string | string[];
|
|
9
|
+
/** 动作控制 **/
|
|
10
|
+
action?: React.Ref<ApprovalViewPluginAction>;
|
|
7
11
|
}
|
|
@@ -69,16 +69,19 @@ class FlowActionPresenter {
|
|
|
69
69
|
actionId
|
|
70
70
|
};
|
|
71
71
|
const recordId = await this.api.create(createRequest, this.mockKey);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
console.log('create recordId:', recordId);
|
|
73
|
+
if (recordId) {
|
|
74
|
+
if (this.state.flow) this.state.flow.recordId = recordId;
|
|
75
|
+
const actionRequest = {
|
|
76
|
+
formData,
|
|
77
|
+
recordId,
|
|
78
|
+
advice: {
|
|
79
|
+
actionId,
|
|
80
|
+
...params
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return await this.api.action(actionRequest, this.mockKey);
|
|
84
|
+
}
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
87
|
getCurrentFormData() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coding-flow/flow-approval-presenter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "flow-engine approval presenter framework ",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"dayjs": "^1.11.19",
|
|
37
37
|
"immer": "^11.1.3",
|
|
38
38
|
"react-redux": "^9.2.0",
|
|
39
|
-
"@coding-flow/flow-core": "0.0.
|
|
40
|
-
"@coding-flow/flow-types": "0.0.
|
|
39
|
+
"@coding-flow/flow-core": "0.0.10",
|
|
40
|
+
"@coding-flow/flow-types": "0.0.10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@coding-flow/flow-types": "0.0.
|
|
43
|
+
"@coding-flow/flow-types": "0.0.10"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "rslib build",
|