@coding-flow/flow-approval-presenter 0.0.6 → 0.0.8

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.
@@ -3,3 +3,4 @@ export { type DelegateViewPlugin, VIEW_KEY as DelegateViewPluginKey } from "./de
3
3
  export { type ReturnViewPlugin, VIEW_KEY as ReturnViewPluginKey } from "./return-type";
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
+ export { type ManualViewPlugin, VIEW_KEY as ManualViewPluginKey } from "./manual-key-type";
@@ -3,4 +3,5 @@ import { VIEW_KEY as external_delegate_type_js_VIEW_KEY } from "./delegate-type.
3
3
  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
- export { VIEW_KEY as AddAuditViewPluginKey, external_delegate_type_js_VIEW_KEY as DelegateViewPluginKey, 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 };
6
+ import { VIEW_KEY as external_manual_key_type_js_VIEW_KEY } from "./manual-key-type.js";
7
+ 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 };
@@ -0,0 +1,8 @@
1
+ import { NodeOption } from "@coding-flow/flow-types";
2
+ export declare const VIEW_KEY = "ManualViewPlugin";
3
+ export interface ManualViewPlugin {
4
+ /** 返回下级节点Id */
5
+ onChange: (value: string) => void;
6
+ /** 可选下级节点方向 */
7
+ options: NodeOption[];
8
+ }
@@ -0,0 +1,2 @@
1
+ const VIEW_KEY = 'ManualViewPlugin';
2
+ export { VIEW_KEY };
@@ -6,7 +6,7 @@ class FlowActionPresenter {
6
6
  mockKey;
7
7
  submitRecordIds;
8
8
  constructor(state, api, formActionContext, mockKey){
9
- this.state = state;
9
+ this.state = JSON.parse(JSON.stringify(state));
10
10
  this.api = api;
11
11
  this.formActionContext = formActionContext;
12
12
  this.submitRecordIds = [];
@@ -23,7 +23,7 @@ class FlowActionPresenter {
23
23
  return this.submitRecordIds;
24
24
  }
25
25
  syncState(state) {
26
- this.state = state;
26
+ this.state = JSON.parse(JSON.stringify(state));
27
27
  }
28
28
  async processNodes() {
29
29
  const formData = this.formActionContext.save();
@@ -69,6 +69,7 @@ class FlowActionPresenter {
69
69
  actionId
70
70
  };
71
71
  const recordId = await this.api.create(createRequest, this.mockKey);
72
+ if (this.state.flow) this.state.flow.recordId = recordId;
72
73
  const actionRequest = {
73
74
  formData,
74
75
  recordId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coding-flow/flow-approval-presenter",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
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.6",
40
- "@coding-flow/flow-types": "0.0.6"
39
+ "@coding-flow/flow-core": "0.0.8",
40
+ "@coding-flow/flow-types": "0.0.8"
41
41
  },
42
42
  "devDependencies": {
43
- "@coding-flow/flow-types": "0.0.6"
43
+ "@coding-flow/flow-types": "0.0.8"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "rslib build",