@lysaab/lysa-pep 1.0.4-0 → 1.0.6-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/{lib/Exports.d.ts → Exports.d.ts} +7 -7
- package/{lib/Exports.js → Exports.js} +7 -7
- package/{lib/components → components}/CountrySelect.d.ts +15 -15
- package/{lib/components → components}/CountrySelect.js +30 -30
- package/{lib/components → components}/PepAnswers.d.ts +8 -8
- package/{lib/components → components}/PepAnswers.js +131 -131
- package/{lib/components → components}/PepAnswers.scss +7 -7
- package/messages/src/components/CountrySelect.json +1 -0
- package/messages/src/components/PepAnswers.json +1 -0
- package/messages/src/pages/IsPep/IsPepMessages.json +1 -0
- package/messages/src/pages/IsPep/IsPepPage.json +1 -0
- package/messages/src/pages/RelationPage/RelationMessages.json +1 -0
- package/messages/src/pages/RelationPage/RelationPage.json +1 -0
- package/messages/src/pages/RolePage/RoleMessages.json +1 -0
- package/messages/src/pages/RolePage/RolePage.json +1 -0
- package/messages/src/pages/StatusPage/StatusMessages.json +1 -0
- package/messages/src/pages/StatusPage/StatusPage.json +1 -0
- package/{lib/model → model}/Countries.d.ts +4 -4
- package/{lib/model → model}/Countries.js +1002 -1002
- package/model/PepModel.d.ts +7 -0
- package/{lib/model → model}/PepModel.js +40 -40
- package/{lib/model → model}/PepTexts.d.ts +380 -322
- package/{lib/model → model}/PepTexts.js +552 -467
- package/package.json +71 -57
- package/{lib/pages → pages}/IsPep/IsPepMessages.d.ts +32 -32
- package/{lib/pages → pages}/IsPep/IsPepMessages.js +66 -66
- package/{lib/pages → pages}/IsPep/IsPepPage.d.ts +14 -14
- package/{lib/pages → pages}/IsPep/IsPepPage.js +60 -60
- package/{lib/pages → pages}/PepContext.d.ts +80 -80
- package/{lib/pages → pages}/PepContext.js +88 -88
- package/pages/PepIsPepPage.d.ts +15 -0
- package/{lib/pages → pages}/PepIsPepPage.js +59 -57
- package/{lib/pages → pages}/PepRelationPage.d.ts +6 -6
- package/{lib/pages → pages}/PepRelationPage.js +79 -83
- package/{lib/pages → pages}/PepRolePage.d.ts +10 -9
- package/{lib/pages → pages}/PepRolePage.js +127 -127
- package/{lib/pages → pages}/PepStatusPage.d.ts +6 -6
- package/pages/PepStatusPage.js +58 -0
- package/{lib/pages → pages}/RelationPage/RelationMessages.d.ts +105 -105
- package/{lib/pages → pages}/RelationPage/RelationMessages.js +283 -283
- package/{lib/pages → pages}/RelationPage/RelationPage.d.ts +6 -6
- package/{lib/pages → pages}/RelationPage/RelationPage.js +154 -154
- package/{lib/pages → pages}/RolePage/RoleMessages.d.ts +185 -185
- package/{lib/pages → pages}/RolePage/RoleMessages.js +385 -385
- package/{lib/pages → pages}/RolePage/RolePage.d.ts +11 -11
- package/{lib/pages → pages}/RolePage/RolePage.js +223 -223
- package/{lib/pages → pages}/StatusPage/StatusMessages.d.ts +72 -72
- package/{lib/pages → pages}/StatusPage/StatusMessages.js +266 -266
- package/{lib/pages → pages}/StatusPage/StatusPage.d.ts +8 -6
- package/{lib/pages → pages}/StatusPage/StatusPage.js +103 -98
- package/{lib/utils → utils}/Possession.d.ts +1 -1
- package/{lib/utils → utils}/Possession.js +18 -18
- package/.vscode/settings.json +0 -4
- package/lib/model/PepModel.d.ts +0 -7
- package/lib/pages/PepIsPepPage.d.ts +0 -6
- package/lib/pages/PepStatusPage.js +0 -57
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -2
- package/src/App.css +0 -3
- package/src/App.test.tsx +0 -9
- package/src/App.tsx +0 -25
- package/src/Exports.ts +0 -12
- package/src/components/CountrySelect.tsx +0 -47
- package/src/components/PepAnswers.scss +0 -7
- package/src/components/PepAnswers.tsx +0 -252
- package/src/demo/Done.tsx +0 -16
- package/src/demo/Pep.tsx +0 -112
- package/src/index.css +0 -13
- package/src/index.tsx +0 -12
- package/src/logo.svg +0 -1
- package/src/model/Countries.ts +0 -1002
- package/src/model/PepModel.ts +0 -52
- package/src/pages/IsPep/IsPepMessages.ts +0 -67
- package/src/pages/IsPep/IsPepPage.tsx +0 -118
- package/src/pages/PepContext.tsx +0 -144
- package/src/pages/RelationPage/RelationMessages.ts +0 -288
- package/src/pages/RelationPage/RelationPage.tsx +0 -304
- package/src/pages/RolePage/RoleMessages.ts +0 -393
- package/src/pages/RolePage/RolePage.tsx +0 -361
- package/src/pages/StatusPage/StatusMessages.ts +0 -272
- package/src/pages/StatusPage/StatusPage.tsx +0 -213
- package/src/react-app-env.d.ts +0 -1
- package/src/serviceWorker.ts +0 -143
- package/src/utils/Possession.ts +0 -21
- package/tsconfig.json +0 -25
- package/tsconfig_build.json +0 -19
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PepState } from "../pages/PepContext";
|
|
2
|
+
export interface PepRequest extends Omit<PepState, "isLocalCountry" | "isOngoing" | "ended" | "birthdayOfPEP"> {
|
|
3
|
+
ended?: string;
|
|
4
|
+
birthdayOfPEP?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function stateToRequest(pepState: PepState): PepRequest;
|
|
7
|
+
export declare function requestToState({ ended, birthdayOfPEP, ...serverData }: PepRequest, countryCode: string): PepState;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { PepType, EntityType, PepStatus } from "../pages/PepContext";
|
|
13
|
-
import { DateTime } from "luxon";
|
|
14
|
-
export function stateToRequest(
|
|
15
|
-
const
|
|
16
|
-
delete
|
|
17
|
-
delete
|
|
18
|
-
delete
|
|
19
|
-
if (
|
|
20
|
-
delete
|
|
21
|
-
}
|
|
22
|
-
return Object.assign(Object.assign({},
|
|
23
|
-
? DateTime.fromJSDate(
|
|
24
|
-
: undefined, birthdayOfPEP:
|
|
25
|
-
? DateTime.fromJSDate(
|
|
26
|
-
: undefined });
|
|
27
|
-
}
|
|
28
|
-
export function requestToState(_a) {
|
|
29
|
-
var { ended, birthdayOfPEP } = _a, serverData = __rest(_a, ["ended", "birthdayOfPEP"]);
|
|
30
|
-
const state = Object.assign({}, serverData);
|
|
31
|
-
if (ended) {
|
|
32
|
-
state.ended = DateTime.fromFormat(ended, "yyyy-MM").toJSDate();
|
|
33
|
-
}
|
|
34
|
-
if (birthdayOfPEP) {
|
|
35
|
-
state.birthdayOfPEP = DateTime.fromFormat(birthdayOfPEP, "yyyy-MM-dd").toJSDate();
|
|
36
|
-
}
|
|
37
|
-
state.
|
|
38
|
-
state.isOngoing = state.ended ? PepStatus.ENDED : PepStatus.ONGOING;
|
|
39
|
-
return state;
|
|
40
|
-
}
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { PepType, EntityType, PepStatus } from "../pages/PepContext";
|
|
13
|
+
import { DateTime } from "luxon";
|
|
14
|
+
export function stateToRequest(pepState) {
|
|
15
|
+
const state = Object.assign({}, pepState);
|
|
16
|
+
delete state.isLocalCountry;
|
|
17
|
+
delete state.isOngoing;
|
|
18
|
+
delete state.ownerName;
|
|
19
|
+
if (state.legalEntityType === EntityType.PERSON) {
|
|
20
|
+
delete state.tin;
|
|
21
|
+
}
|
|
22
|
+
return Object.assign(Object.assign({}, state), { country: state.type === PepType.NOT_PEP ? undefined : state.country, ended: state.ended
|
|
23
|
+
? DateTime.fromJSDate(state.ended).toFormat("yyyy-MM")
|
|
24
|
+
: undefined, birthdayOfPEP: state.birthdayOfPEP
|
|
25
|
+
? DateTime.fromJSDate(state.birthdayOfPEP).toFormat("yyyy-MM-dd")
|
|
26
|
+
: undefined });
|
|
27
|
+
}
|
|
28
|
+
export function requestToState(_a, countryCode) {
|
|
29
|
+
var { ended, birthdayOfPEP } = _a, serverData = __rest(_a, ["ended", "birthdayOfPEP"]);
|
|
30
|
+
const state = Object.assign({}, serverData);
|
|
31
|
+
if (ended) {
|
|
32
|
+
state.ended = DateTime.fromFormat(ended, "yyyy-MM").toJSDate();
|
|
33
|
+
}
|
|
34
|
+
if (birthdayOfPEP) {
|
|
35
|
+
state.birthdayOfPEP = DateTime.fromFormat(birthdayOfPEP, "yyyy-MM-dd").toJSDate();
|
|
36
|
+
}
|
|
37
|
+
state.isLocalCountry = state.country === countryCode ? "local" : "other";
|
|
38
|
+
state.isOngoing = state.ended ? PepStatus.ENDED : PepStatus.ONGOING;
|
|
39
|
+
return state;
|
|
40
|
+
}
|