@lysaab/lysa-pep 1.0.3-0 → 1.0.4-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/.vscode/settings.json +4 -0
- package/lib/Exports.d.ts +7 -7
- package/lib/Exports.js +7 -7
- package/lib/components/CountrySelect.d.ts +15 -15
- package/lib/components/CountrySelect.js +30 -30
- package/lib/components/PepAnswers.d.ts +8 -8
- package/lib/components/PepAnswers.js +131 -131
- package/lib/components/PepAnswers.scss +7 -7
- package/lib/model/Countries.d.ts +4 -4
- package/lib/model/Countries.js +1002 -1002
- package/lib/model/PepModel.d.ts +7 -7
- package/lib/model/PepModel.js +40 -40
- package/lib/model/PepTexts.d.ts +322 -380
- package/lib/model/PepTexts.js +467 -552
- package/lib/pages/IsPep/IsPepMessages.d.ts +32 -32
- package/lib/pages/IsPep/IsPepMessages.js +66 -66
- package/lib/pages/IsPep/IsPepPage.d.ts +14 -14
- package/lib/pages/IsPep/IsPepPage.js +60 -59
- package/lib/pages/PepContext.d.ts +80 -80
- package/lib/pages/PepContext.js +88 -88
- package/lib/pages/PepIsPepPage.d.ts +6 -15
- package/lib/pages/PepIsPepPage.js +57 -59
- package/lib/pages/PepRelationPage.d.ts +6 -6
- package/lib/pages/PepRelationPage.js +83 -79
- package/lib/pages/PepRolePage.d.ts +9 -10
- package/lib/pages/PepRolePage.js +127 -127
- package/lib/pages/PepStatusPage.d.ts +6 -6
- package/lib/pages/PepStatusPage.js +57 -58
- package/lib/pages/RelationPage/RelationMessages.d.ts +105 -105
- package/lib/pages/RelationPage/RelationMessages.js +283 -283
- package/lib/pages/RelationPage/RelationPage.d.ts +6 -6
- package/lib/pages/RelationPage/RelationPage.js +154 -153
- package/lib/pages/RolePage/RoleMessages.d.ts +185 -185
- package/lib/pages/RolePage/RoleMessages.js +385 -385
- package/lib/pages/RolePage/RolePage.d.ts +11 -11
- package/lib/pages/RolePage/RolePage.js +223 -220
- package/lib/pages/StatusPage/StatusMessages.d.ts +72 -72
- package/lib/pages/StatusPage/StatusMessages.js +266 -266
- package/lib/pages/StatusPage/StatusPage.d.ts +6 -6
- package/lib/pages/StatusPage/StatusPage.js +98 -95
- package/lib/utils/Possession.d.ts +1 -1
- package/lib/utils/Possession.js +18 -18
- package/package.json +57 -57
- package/src/Exports.ts +12 -12
- package/src/components/CountrySelect.tsx +47 -47
- package/src/components/PepAnswers.scss +7 -7
- package/src/components/PepAnswers.tsx +252 -252
- package/src/demo/Done.tsx +16 -16
- package/src/demo/Pep.tsx +112 -112
- package/src/model/PepModel.ts +52 -52
- package/src/pages/IsPep/IsPepMessages.ts +67 -67
- package/src/pages/IsPep/IsPepPage.tsx +118 -115
- package/src/pages/PepContext.tsx +144 -144
- package/src/pages/RelationPage/RelationMessages.ts +288 -288
- package/src/pages/RelationPage/RelationPage.tsx +304 -299
- package/src/pages/RolePage/RoleMessages.ts +393 -393
- package/src/pages/RolePage/RolePage.tsx +361 -356
- package/src/pages/StatusPage/StatusMessages.ts +272 -272
- package/src/pages/StatusPage/StatusPage.tsx +213 -207
package/lib/model/PepModel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PepState } from "../pages/PepContext";
|
|
2
|
-
export interface PepRequest extends Omit<PepState, "isSweden" | "isOngoing" | "ended" | "birthdayOfPEP"> {
|
|
3
|
-
ended?: string;
|
|
4
|
-
birthdayOfPEP?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function stateToRequest(pepData: PepState): PepRequest;
|
|
7
|
-
export declare function requestToState({ ended, birthdayOfPEP, ...serverData }: PepRequest): PepState;
|
|
1
|
+
import { PepState } from "../pages/PepContext";
|
|
2
|
+
export interface PepRequest extends Omit<PepState, "isSweden" | "isOngoing" | "ended" | "birthdayOfPEP"> {
|
|
3
|
+
ended?: string;
|
|
4
|
+
birthdayOfPEP?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function stateToRequest(pepData: PepState): PepRequest;
|
|
7
|
+
export declare function requestToState({ ended, birthdayOfPEP, ...serverData }: PepRequest): PepState;
|
package/lib/model/PepModel.js
CHANGED
|
@@ -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(pepData) {
|
|
15
|
-
const data = Object.assign({}, pepData);
|
|
16
|
-
delete data.isSweden;
|
|
17
|
-
delete data.isOngoing;
|
|
18
|
-
delete data.ownerName;
|
|
19
|
-
if (data.legalEntityType === EntityType.PERSON) {
|
|
20
|
-
delete data.tin;
|
|
21
|
-
}
|
|
22
|
-
return Object.assign(Object.assign({}, data), { country: data.type !== PepType.NOT_PEP ? data.country || "SE" : undefined, ended: data.ended
|
|
23
|
-
? DateTime.fromJSDate(data.ended).toFormat("yyyy-MM")
|
|
24
|
-
: undefined, birthdayOfPEP: data.birthdayOfPEP
|
|
25
|
-
? DateTime.fromJSDate(data.birthdayOfPEP).toFormat("yyyy-MM-dd")
|
|
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.isSweden = state.country === "SE" ? "sweden" : "other";
|
|
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(pepData) {
|
|
15
|
+
const data = Object.assign({}, pepData);
|
|
16
|
+
delete data.isSweden;
|
|
17
|
+
delete data.isOngoing;
|
|
18
|
+
delete data.ownerName;
|
|
19
|
+
if (data.legalEntityType === EntityType.PERSON) {
|
|
20
|
+
delete data.tin;
|
|
21
|
+
}
|
|
22
|
+
return Object.assign(Object.assign({}, data), { country: data.type !== PepType.NOT_PEP ? data.country || "SE" : undefined, ended: data.ended
|
|
23
|
+
? DateTime.fromJSDate(data.ended).toFormat("yyyy-MM")
|
|
24
|
+
: undefined, birthdayOfPEP: data.birthdayOfPEP
|
|
25
|
+
? DateTime.fromJSDate(data.birthdayOfPEP).toFormat("yyyy-MM-dd")
|
|
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.isSweden = state.country === "SE" ? "sweden" : "other";
|
|
38
|
+
state.isOngoing = state.ended ? PepStatus.ENDED : PepStatus.ONGOING;
|
|
39
|
+
return state;
|
|
40
|
+
}
|