@coding-flow/flow-approval-presenter 0.0.7 → 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.
@@ -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.7",
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.7",
40
- "@coding-flow/flow-types": "0.0.7"
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.7"
43
+ "@coding-flow/flow-types": "0.0.8"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "rslib build",