@legalplace/wizardx-core 4.1.22 → 4.2.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.
@@ -1,11 +1,11 @@
1
1
  export const initInstanceReducer = (state, action) => {
2
- const { uniqid, isPaid, dataStatus, steps, companyId, employeeId } = action;
2
+ const { uniqid, isPaid, dataStatus, steps, companyUuid, employeeUuid } = action;
3
3
  return Object.assign(Object.assign({}, state), { instance: {
4
4
  dataStatus,
5
5
  uniqid,
6
6
  isPaid,
7
7
  steps,
8
- companyId,
9
- employeeId,
8
+ companyUuid,
9
+ employeeUuid,
10
10
  } });
11
11
  };
@@ -1,5 +1,5 @@
1
1
  export const updateInstanceReducer = (state, action) => {
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
- employeeId }) });
2
+ const { uniqid, isPaid, dataStatus, steps, companyUuid, employeeUuid } = 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, companyUuid,
4
+ employeeUuid }) });
5
5
  };
@@ -44,8 +44,8 @@ describe('App Instance Reducer', () => {
44
44
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
45
45
  dataStatus: 'saved',
46
46
  uniqid: '3jHD42343sDE',
47
- companyId: undefined,
48
- employeeId: undefined,
47
+ companyUuid: undefined,
48
+ employeeUuid: undefined,
49
49
  isPaid: true,
50
50
  steps: '*',
51
51
  } }));
@@ -26,8 +26,8 @@ const appStateMock = {
26
26
  totalPages: 3,
27
27
  },
28
28
  instance: {
29
- companyId: undefined,
30
- employeeId: undefined,
29
+ companyUuid: undefined,
30
+ employeeUuid: undefined,
31
31
  dataStatus: 'saved',
32
32
  uniqid: '3jHD42343sDE',
33
33
  isPaid: false,
@@ -96,8 +96,8 @@ describe('App Reducer test suit', () => {
96
96
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
97
97
  dataStatus: 'saved',
98
98
  uniqid: 'SomeUniqid123',
99
- employeeId: undefined,
100
- companyId: undefined,
99
+ employeeUuid: undefined,
100
+ companyUuid: undefined,
101
101
  isPaid: true,
102
102
  steps: '*',
103
103
  } }));
@@ -112,8 +112,8 @@ describe('App Reducer test suit', () => {
112
112
  });
113
113
  return expect(reducer).toStrictEqual(Object.assign(Object.assign({}, appStateMock), { instance: {
114
114
  dataStatus: 'saved',
115
- employeeId: undefined,
116
- companyId: undefined,
115
+ employeeUuid: undefined,
116
+ companyUuid: undefined,
117
117
  uniqid: '3jHD42343sDE',
118
118
  isPaid: false,
119
119
  steps: '*',
@@ -155,8 +155,8 @@ function* fetchInstanceInformation(appStates, permalink, uniqid, uniqidParam, pr
155
155
  dataStatus: "saved",
156
156
  uniqid: uniqid || "",
157
157
  draft: response.instance && response.instance.draft,
158
- companyId: (_a = response.instance) === null || _a === void 0 ? void 0 : _a.companyId,
159
- employeeId: (_b = response.instance) === null || _b === void 0 ? void 0 : _b.employeeId,
158
+ companyUuid: (_a = response.instance) === null || _a === void 0 ? void 0 : _a.companyUuid,
159
+ employeeUuid: (_b = response.instance) === null || _b === void 0 ? void 0 : _b.employeeUuid,
160
160
  isPaid: response.instance &&
161
161
  (response.instance.isPaid.toString() === "1" ||
162
162
  response.instance.isPaid === true),
@@ -197,8 +197,8 @@ function* createInstance(enableShadowInstance, modelInformation, uniqid, permali
197
197
  dataStatus: "saved",
198
198
  uniqid: uniqid || "",
199
199
  draft: false,
200
- companyId: undefined,
201
- employeeId: undefined,
200
+ companyUuid: undefined,
201
+ employeeUuid: undefined,
202
202
  isPaid: false,
203
203
  steps: [1],
204
204
  };
@@ -19,8 +19,8 @@ export declare const selectMeta: () => Readonly<import("../../types/State.type")
19
19
  export declare const selectMetaFetchStatus: () => Readonly<"failed" | "waiting" | "succeeded" | "unhealthy" | "userLocked" | "nonBlocking">;
20
20
  export declare const selectPrefix: () => Readonly<string | undefined>;
21
21
  export declare const selectInstanceUniqid: () => Readonly<string | undefined>;
22
- export declare const selectInstanceCompanyId: () => Readonly<number | undefined>;
23
- export declare const selectInstanceEmployeeId: () => Readonly<number | undefined>;
22
+ export declare const selectInstanceCompanyUuid: () => Readonly<string | undefined>;
23
+ export declare const selectInstanceEmployeeUuid: () => Readonly<string | undefined>;
24
24
  export declare const selectDataStatus: () => Readonly<"saved" | "unsaved" | "saving" | "failed">;
25
25
  export declare const selectInstanceIsPaid: () => Readonly<boolean>;
26
26
  export declare const selectInstanceSteps: () => Readonly<boolean>;
@@ -60,12 +60,10 @@ export const selectMeta = createSelector((state) => state.app.meta, (state) => s
60
60
  export const selectMetaFetchStatus = createSelector((state) => state.app.meta.fetchStatus, (state) => state.app.meta.fetchStatus);
61
61
  export const selectPrefix = createSelector((state) => (!state.app.meta ? undefined : state.app.meta.prefix), (state) => (!state.app.meta ? "0" : state.app.meta.permalink));
62
62
  export const selectInstanceUniqid = createSelector((state) => !state.app.instance ? undefined : state.app.instance.uniqid, (state) => (!state.app.instance ? "0" : state.app.instance.uniqid));
63
- export const selectInstanceCompanyId = createSelector((state) => !state.app.instance ? undefined : state.app.instance.companyId, (state) => !state.app.instance || !state.app.instance.companyId
63
+ export const selectInstanceCompanyUuid = createSelector((state) => !state.app.instance ? undefined : state.app.instance.companyUuid, (state) => !state.app.instance || !state.app.instance.companyUuid
64
64
  ? "0"
65
- : state.app.instance.companyId.toString());
66
- export const selectInstanceEmployeeId = createSelector((state) => !state.app.instance ? undefined : state.app.instance.employeeId, (state) => !state.app.instance || !state.app.instance.employeeId
67
- ? "0"
68
- : state.app.instance.employeeId.toString());
65
+ : state.app.instance.companyUuid);
66
+ export const selectInstanceEmployeeUuid = createSelector((state) => !state.app.instance ? undefined : state.app.instance.employeeUuid, (state) => { var _a; return !((_a = state.app.instance) === null || _a === void 0 ? void 0 : _a.employeeUuid) ? "0" : state.app.instance.employeeUuid; });
69
67
  export const selectDataStatus = createSelector((state) => !state.app.instance ? "unsaved" : state.app.instance.dataStatus, (state) => !state.app.instance ? "0" : state.app.instance.dataStatus);
70
68
  export const selectInstanceIsPaid = createSelector((state) => !!(state.app.instance && state.app.instance.isPaid), (state) => state.app.instance && state.app.instance.isPaid
71
69
  ? state.app.instance.isPaid.toString()
@@ -85,8 +85,8 @@ export declare const selectorsLibrary: {
85
85
  selectMetaFetchStatus: () => Readonly<"failed" | "waiting" | "succeeded" | "unhealthy" | "userLocked" | "nonBlocking">;
86
86
  selectPrefix: () => Readonly<string | undefined>;
87
87
  selectInstanceUniqid: () => Readonly<string | undefined>;
88
- selectInstanceCompanyId: () => Readonly<number | undefined>;
89
- selectInstanceEmployeeId: () => Readonly<number | undefined>;
88
+ selectInstanceCompanyUuid: () => Readonly<string | undefined>;
89
+ selectInstanceEmployeeUuid: () => Readonly<string | undefined>;
90
90
  selectDataStatus: () => Readonly<"saved" | "unsaved" | "saving" | "failed">;
91
91
  selectInstanceIsPaid: () => Readonly<boolean>;
92
92
  selectInstanceSteps: () => Readonly<boolean>;
@@ -166,8 +166,8 @@ export interface AppCustomizationMetaType extends ModelV3CustomizationMeta {
166
166
  export interface AppInstanceType {
167
167
  dataStatus: "saved" | "unsaved" | "saving" | "failed";
168
168
  uniqid: string;
169
- companyId?: number;
170
- employeeId?: number;
169
+ companyUuid?: string;
170
+ employeeUuid?: string;
171
171
  isPaid?: boolean;
172
172
  draft?: boolean;
173
173
  steps: "*" | number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.1.22",
3
+ "version": "4.2.0",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -57,7 +57,7 @@
57
57
  "@legalplace/eslint-config": "^2.2.0",
58
58
  "@legalplace/models-v3-types": "^5.1.8",
59
59
  "@legalplace/prettier-config": "^2.1.3",
60
- "@legalplace/typeorm-entities": "^5.12.1",
60
+ "@legalplace/typeorm-entities": "^5.13.0",
61
61
  "@swc-node/jest": "^1.3.2",
62
62
  "@swc/core": "^1.2.93",
63
63
  "@swc/jest": "^0.2.4",
@@ -95,5 +95,5 @@
95
95
  "*.test.ts",
96
96
  "*.test.tsx"
97
97
  ],
98
- "gitHead": "af735f449d5a9a89339805ee2f4c1b25b75715d1"
98
+ "gitHead": "8e9086b2e23ee823aff62a3d4cee2677dbc6fe55"
99
99
  }