@legalplace/wizardx-core 2.11.3 → 2.12.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,35 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.12.0](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.11.4...@legalplace/wizardx-core@2.12.0) (2022-09-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * fix package.json api[#5795](https://git.legalplace.eu/legalplace/monorepo/issues/5795) ([1e397cc](https://git.legalplace.eu/legalplace/monorepo/commits/1e397cc55f12f67a90447b162fb42390eb566b71))
12
+ * fix review api[#5795](https://git.legalplace.eu/legalplace/monorepo/issues/5795) ([47d8f99](https://git.legalplace.eu/legalplace/monorepo/commits/47d8f99b68a66d194828569eb3d33f3b5cf420d0))
13
+ * fix tests api[#5795](https://git.legalplace.eu/legalplace/monorepo/issues/5795) ([2549d83](https://git.legalplace.eu/legalplace/monorepo/commits/2549d83e9e9240407e4d40ce4dc88b5507989348))
14
+
15
+
16
+ ### Features
17
+
18
+ * hidding next button from last page when metaTypology is tool api[#5795](https://git.legalplace.eu/legalplace/monorepo/issues/5795) ([444cead](https://git.legalplace.eu/legalplace/monorepo/commits/444ceade7b26740bd640de926a7b8c8f08beca1b))
19
+
20
+
21
+
22
+
23
+
24
+ ## [2.11.4](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.11.3...@legalplace/wizardx-core@2.11.4) (2022-07-20)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * delete isOrderHandled and put logic on api ([ef92a6b](https://git.legalplace.eu/legalplace/monorepo/commits/ef92a6b3f46c39a4c7e6f158b0ccf07193ed40c6)), closes [api#5886](https://git.legalplace.eu/legalplace/monorepo/issues/5886)
30
+
31
+
32
+
33
+
34
+
6
35
  ## [2.11.3](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.11.2...@legalplace/wizardx-core@2.11.3) (2022-06-07)
7
36
 
8
37
 
@@ -1,8 +1,7 @@
1
1
  export const initInstanceReducer = (state, action) => {
2
- const { uniqid, isPaid, dataStatus, steps, isOrderHandled, companyId, employeeId, } = action;
2
+ const { uniqid, isPaid, dataStatus, steps, companyId, employeeId } = action;
3
3
  return Object.assign(Object.assign({}, state), { instance: {
4
4
  dataStatus,
5
- isOrderHandled,
6
5
  uniqid,
7
6
  isPaid,
8
7
  steps,
@@ -1,5 +1,5 @@
1
1
  export const updateInstanceReducer = (state, action) => {
2
- const { uniqid, isPaid, dataStatus, steps, isOrderHandled, companyId, employeeId, } = action;
3
- return Object.assign(Object.assign({}, state), { instance: Object.assign(Object.assign({}, state.instance), { dataStatus: dataStatus || state.instance.dataStatus, isOrderHandled, uniqid: uniqid || state.instance.uniqid, isPaid, steps: steps || state.instance.steps, companyId,
2
+ const { uniqid, isPaid, dataStatus, steps, companyId, employeeId } = action;
3
+ return Object.assign(Object.assign({}, state), { instance: Object.assign(Object.assign({}, state.instance), { dataStatus: dataStatus || state.instance.dataStatus, uniqid: uniqid || state.instance.uniqid, isPaid, steps: steps || state.instance.steps, companyId,
4
4
  employeeId }) });
5
5
  };
@@ -27,7 +27,6 @@ const appStateMock = {
27
27
  instance: {
28
28
  dataStatus: 'saved',
29
29
  uniqid: '3jHD42343sDE',
30
- isOrderHandled: undefined,
31
30
  isPaid: false,
32
31
  steps: '*',
33
32
  },
@@ -45,7 +44,6 @@ describe('App Instance Reducer', () => {
45
44
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
46
45
  dataStatus: 'saved',
47
46
  uniqid: '3jHD42343sDE',
48
- isOrderHandled: undefined,
49
47
  companyId: undefined,
50
48
  employeeId: undefined,
51
49
  isPaid: true,
@@ -1,9 +1,10 @@
1
1
  export const initMetaReducer = (state, action) => {
2
- const { id, permalink, title, modelVersion, productType, prefix } = action;
2
+ const { id, permalink, title, modelVersion, productType, prefix, metadata } = action;
3
3
  return Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { id,
4
4
  prefix,
5
5
  permalink,
6
6
  title,
7
7
  modelVersion,
8
- productType }) });
8
+ productType,
9
+ metadata }) });
9
10
  };
@@ -42,6 +42,9 @@ describe('App Meta Reducer', () => {
42
42
  title: 'title',
43
43
  modelVersion: 1,
44
44
  productType: 'demarche',
45
+ metadata: {
46
+ metaTypology: "contract"
47
+ }
45
48
  });
46
49
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { meta: {
47
50
  fetchStatus: 'succeeded',
@@ -51,6 +54,9 @@ describe('App Meta Reducer', () => {
51
54
  title: 'title',
52
55
  modelVersion: 1,
53
56
  productType: 'demarche',
57
+ metadata: {
58
+ metaTypology: "contract"
59
+ }
54
60
  } }));
55
61
  });
56
62
  it('fetchModelSucceeded Reducer', () => {
@@ -8,6 +8,9 @@ const appStateMock = {
8
8
  title: 'title',
9
9
  modelVersion: 1,
10
10
  productType: 'demarche',
11
+ metadata: {
12
+ metaTypology: "contract"
13
+ }
11
14
  },
12
15
  wizard: {
13
16
  availableSections: [1, 2, 3],
@@ -27,7 +30,6 @@ const appStateMock = {
27
30
  employeeId: undefined,
28
31
  dataStatus: 'saved',
29
32
  uniqid: '3jHD42343sDE',
30
- isOrderHandled: undefined,
31
33
  isPaid: false,
32
34
  steps: '*',
33
35
  },
@@ -43,6 +45,9 @@ describe('App Reducer test suit', () => {
43
45
  title: 'Some other title',
44
46
  modelVersion: 1,
45
47
  productType: 'demarche',
48
+ metadata: {
49
+ metaTypology: "contract"
50
+ }
46
51
  });
47
52
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { meta: {
48
53
  fetchStatus: 'waiting',
@@ -52,6 +57,9 @@ describe('App Reducer test suit', () => {
52
57
  title: 'Some other title',
53
58
  modelVersion: 1,
54
59
  productType: 'demarche',
60
+ metadata: {
61
+ metaTypology: "contract"
62
+ }
55
63
  } }));
56
64
  });
57
65
  it('Combines pagination reducer', () => {
@@ -88,7 +96,6 @@ describe('App Reducer test suit', () => {
88
96
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
89
97
  dataStatus: 'saved',
90
98
  uniqid: 'SomeUniqid123',
91
- isOrderHandled: undefined,
92
99
  employeeId: undefined,
93
100
  companyId: undefined,
94
101
  isPaid: true,
@@ -105,7 +112,6 @@ describe('App Reducer test suit', () => {
105
112
  });
106
113
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
107
114
  dataStatus: 'saved',
108
- isOrderHandled: undefined,
109
115
  employeeId: undefined,
110
116
  companyId: undefined,
111
117
  uniqid: '3jHD42343sDE',
@@ -156,7 +156,6 @@ function* fetchInstanceInformation(appStates, permalink, uniqid, uniqidParam, pr
156
156
  draft: response.instance && response.instance.draft,
157
157
  companyId: (_a = response.instance) === null || _a === void 0 ? void 0 : _a.companyId,
158
158
  employeeId: (_b = response.instance) === null || _b === void 0 ? void 0 : _b.employeeId,
159
- isOrderHandled: response.instance && response.instance.isOrderHandled,
160
159
  isPaid: response.instance &&
161
160
  (response.instance.isPaid.toString() === "1" ||
162
161
  response.instance.isPaid === true),
@@ -199,7 +198,6 @@ function* createInstance(enableShadowInstance, modelInformation, uniqid, permali
199
198
  draft: false,
200
199
  companyId: undefined,
201
200
  employeeId: undefined,
202
- isOrderHandled: undefined,
203
201
  isPaid: false,
204
202
  steps: [1],
205
203
  };
@@ -218,7 +216,6 @@ function* createInstance(enableShadowInstance, modelInformation, uniqid, permali
218
216
  }
219
217
  instance.uniqid = instanceResponse.uniqid;
220
218
  instance.isPaid = instanceResponse.isPaid === true;
221
- instance.isOrderHandled = instanceResponse.isOrderHandled;
222
219
  instance.steps =
223
220
  typeof instanceResponse.steps === "string" ||
224
221
  Array.isArray(instanceResponse.steps)
@@ -40,7 +40,6 @@ describe('Fetch model saga', () => {
40
40
  store.dispatch(initInstanceAction({
41
41
  uniqid,
42
42
  isPaid: false,
43
- isOrderHandled: undefined,
44
43
  dataStatus: 'saved',
45
44
  steps: '*',
46
45
  }));
@@ -1,6 +1,7 @@
1
1
  import type { OptionV3, VariableV3, SectionV3, ConditionV3, ModelV3 } from "@legalplace/models-v3-types";
2
2
  import type { Types } from "@legalplace/referencesparser";
3
3
  import type { HealthCheckReport } from "@legalplace/model-healthcheck/dist/libs/HealthCheck.type";
4
+ import type { ContractMeta } from "@legalplace/typeorm-entities";
4
5
  export declare type MAPPED_CONDITIONS = {
5
6
  dataMap: {
6
7
  o: number[];
@@ -168,7 +169,6 @@ export interface AppInstanceType {
168
169
  companyId?: number;
169
170
  employeeId?: number;
170
171
  isPaid?: boolean;
171
- isOrderHandled?: boolean;
172
172
  draft?: boolean;
173
173
  steps: "*" | number[];
174
174
  }
@@ -180,6 +180,7 @@ export interface AppMetaType {
180
180
  title: string;
181
181
  modelVersion: number;
182
182
  productType: string;
183
+ metadata?: ContractMeta["metadata"];
183
184
  modelUuid?: string;
184
185
  smartScript?: string;
185
186
  report?: {
@@ -28,6 +28,5 @@ export interface CreateInstanceResponse {
28
28
  status?: string;
29
29
  uniqid: string;
30
30
  isPaid: boolean;
31
- isOrderHandled: boolean;
32
31
  steps: "*" | number[];
33
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "2.11.3",
3
+ "version": "2.12.0",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -55,6 +55,7 @@
55
55
  "@legalplace/eslint-config": "^2.1.4",
56
56
  "@legalplace/models-v3-types": "^3.6.0",
57
57
  "@legalplace/prettier-config": "^2.1.3",
58
+ "@legalplace/typeorm-entities": "3.8.2",
58
59
  "@swc-node/jest": "^1.3.2",
59
60
  "@swc/core": "^1.2.93",
60
61
  "@swc/jest": "^0.2.4",
@@ -92,5 +93,5 @@
92
93
  "*.test.ts",
93
94
  "*.test.tsx"
94
95
  ],
95
- "gitHead": "c0f5622fc3d249a46b6f494884234c3b4c93b163"
96
+ "gitHead": "2b85b938130c3aa452aaf2e9e60df460ddf5a4e2"
96
97
  }