@lysaab/lysa-pep 3.0.4 → 4.0.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.
Files changed (39) hide show
  1. package/Exports.d.ts +7 -7
  2. package/Exports.js +7 -7
  3. package/components/PepAnswers.d.ts +8 -8
  4. package/components/PepAnswers.js +103 -137
  5. package/messages/src/components/PepAnswers.json +1 -1
  6. package/messages/src/pages/IsPep/IsPepMessages.json +1 -1
  7. package/messages/src/pages/IsPep/IsPepPage.json +1 -1
  8. package/messages/src/pages/RelationPage/RelationMessages.json +1 -1
  9. package/messages/src/pages/RelationPage/RelationPage.json +1 -1
  10. package/messages/src/pages/RolePage/RoleMessages.json +1 -1
  11. package/messages/src/pages/RolePage/RolePage.json +1 -1
  12. package/messages/src/pages/StatusPage/StatusMessages.json +1 -1
  13. package/messages/src/pages/StatusPage/StatusPage.json +1 -1
  14. package/model/PepModel.d.ts +7 -7
  15. package/model/PepModel.js +40 -40
  16. package/package.json +3 -3
  17. package/pages/IsPep/IsPepMessages.d.ts +20 -32
  18. package/pages/IsPep/IsPepMessages.js +10 -70
  19. package/pages/IsPep/IsPepPage.d.ts +15 -15
  20. package/pages/IsPep/IsPepPage.js +61 -61
  21. package/pages/PepContext.d.ts +80 -81
  22. package/pages/PepContext.js +88 -89
  23. package/pages/RelationPage/RelationMessages.d.ts +67 -105
  24. package/pages/RelationPage/RelationMessages.js +69 -287
  25. package/pages/RelationPage/RelationPage.d.ts +6 -6
  26. package/pages/RelationPage/RelationPage.js +158 -156
  27. package/pages/RolePage/RoleMessages.d.ts +115 -185
  28. package/pages/RolePage/RoleMessages.js +117 -385
  29. package/pages/RolePage/RolePage.d.ts +13 -11
  30. package/pages/RolePage/RolePage.js +222 -223
  31. package/pages/StatusPage/StatusMessages.d.ts +48 -72
  32. package/pages/StatusPage/StatusMessages.js +50 -272
  33. package/pages/StatusPage/StatusPage.d.ts +10 -8
  34. package/pages/StatusPage/StatusPage.js +104 -105
  35. package/utils/Possession.d.ts +1 -1
  36. package/utils/Possession.js +27 -27
  37. package/components/CountrySelect.d.ts +0 -11
  38. package/components/CountrySelect.js +0 -41
  39. package/messages/src/components/CountrySelect.json +0 -1
package/Exports.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./pages/PepContext";
2
- export * from "./model/PepModel";
3
- export * from "./pages/IsPep/IsPepPage";
4
- export { RelationPage } from "./pages/RelationPage/RelationPage";
5
- export { RolePage as PepRolePage, getMilitaryAlts, getRoleAlts } from "./pages/RolePage/RolePage";
6
- export { StatusPage as PepStatusPage } from "./pages/StatusPage/StatusPage";
7
- export { PepAnswers } from "./components/PepAnswers";
1
+ export * from "./pages/PepContext";
2
+ export * from "./model/PepModel";
3
+ export * from "./pages/IsPep/IsPepPage";
4
+ export { RelationPage } from "./pages/RelationPage/RelationPage";
5
+ export { RolePage as PepRolePage, getMilitaryAlts, getRoleAlts } from "./pages/RolePage/RolePage";
6
+ export { StatusPage as PepStatusPage } from "./pages/StatusPage/StatusPage";
7
+ export { PepAnswers } from "./components/PepAnswers";
package/Exports.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./pages/PepContext";
2
- export * from "./model/PepModel";
3
- export * from "./pages/IsPep/IsPepPage";
4
- export { RelationPage } from "./pages/RelationPage/RelationPage";
5
- export { RolePage as PepRolePage, getMilitaryAlts, getRoleAlts } from "./pages/RolePage/RolePage";
6
- export { StatusPage as PepStatusPage } from "./pages/StatusPage/StatusPage";
7
- export { PepAnswers } from "./components/PepAnswers";
1
+ export * from "./pages/PepContext";
2
+ export * from "./model/PepModel";
3
+ export * from "./pages/IsPep/IsPepPage";
4
+ export { RelationPage } from "./pages/RelationPage/RelationPage";
5
+ export { RolePage as PepRolePage, getMilitaryAlts, getRoleAlts } from "./pages/RolePage/RolePage";
6
+ export { StatusPage as PepStatusPage } from "./pages/StatusPage/StatusPage";
7
+ export { PepAnswers } from "./components/PepAnswers";
@@ -1,8 +1,8 @@
1
- import { FunctionComponent } from "react";
2
- import "./PepAnswers.scss";
3
- import { PepRequest } from "../model/PepModel";
4
- interface Props {
5
- answer: PepRequest;
6
- }
7
- export declare const PepAnswers: FunctionComponent<Props>;
8
- export {};
1
+ import { FunctionComponent } from "react";
2
+ import "./PepAnswers.scss";
3
+ import { PepRequest } from "../model/PepModel";
4
+ interface Props {
5
+ answer: PepRequest;
6
+ }
7
+ export declare const PepAnswers: FunctionComponent<Props>;
8
+ export {};
@@ -1,137 +1,103 @@
1
- import React from "react";
2
- import "./PepAnswers.scss";
3
- import countries from "@lysaab/countries";
4
- import { getRoleAlts, getMilitaryAlts } from "../pages/RolePage/RolePage";
5
- import { PepType } from "../pages/PepContext";
6
- import { useIntl, defineMessages, FormattedMessage } from "react-intl";
7
- import { messages as isPepMessages } from "../pages/IsPep/IsPepMessages";
8
- import { relationMessages, businessRelationMessages, } from "../pages/RelationPage/RelationMessages";
9
- const messages = defineMessages({
10
- whoIsPepLabel: {
11
- id: "pep.answers.who.label",
12
- description: "Who is pep label",
13
- defaultMessage: "Who is PEP?",
14
- },
15
- relationLabel: {
16
- id: "pep.answers.relationship.label",
17
- description: "Relationship label",
18
- defaultMessage: "Relationship",
19
- },
20
- businessRelationLabel: {
21
- id: "pep.answers.businessRelationship.label",
22
- description: "Business relationship label",
23
- defaultMessage: "Who is PEP?",
24
- },
25
- nameOfPepLabel: {
26
- id: "pep.answers.nameOfPep.label",
27
- description: "Name of pep label",
28
- defaultMessage: "The person's name",
29
- },
30
- birthdayOfPEPLabel: {
31
- id: "pep.answers.birthdayOfPEP.label",
32
- description: "Birthday of pep label",
33
- defaultMessage: "The person's birthday",
34
- },
35
- statusLabel: {
36
- id: "pep.answers.status.label",
37
- description: "Status label",
38
- defaultMessage: "Status",
39
- },
40
- statusEndedValue: {
41
- id: "pep.answers.statusEnded.value",
42
- description: "Status ended value",
43
- defaultMessage: "Ended",
44
- },
45
- statusOngoingValue: {
46
- id: "pep.answers.statusOngoing.value",
47
- description: "Status ongoing value",
48
- defaultMessage: "Ongoing",
49
- },
50
- endedLabel: {
51
- id: "pep.answers.endedStatus.label",
52
- description: "Ended label",
53
- defaultMessage: "Ended",
54
- },
55
- roleLabel: {
56
- id: "pep.answers.role.label",
57
- description: "Role label",
58
- defaultMessage: "Role",
59
- },
60
- countryLabel: {
61
- id: "pep.answers.country.label",
62
- description: "Country label",
63
- defaultMessage: "Country",
64
- },
65
- ambassadorCountryLabel: {
66
- id: "pep.answers.ambassadorCountry.label",
67
- description: "Ambassador country label",
68
- defaultMessage: "Ambassador country",
69
- },
70
- governmentCompanyNameLabel: {
71
- id: "pep.answers.governmentCompanyName.label",
72
- description: "Government company name label",
73
- defaultMessage: "Company name",
74
- },
75
- governmentCompanyRoleLabel: {
76
- id: "pep.answers.governmentCompanyRole.label",
77
- description: "Government company role label",
78
- defaultMessage: "Company role",
79
- },
80
- internationalOrganisationNameLabel: {
81
- id: "pep.answers.companyName.label",
82
- description: "International organisation name label",
83
- defaultMessage: "Company name",
84
- },
85
- internationalOrganisationRoleLabel: {
86
- id: "pep.answers.companyRole.label",
87
- description: "International organisation role label",
88
- defaultMessage: "Company role",
89
- },
90
- militaryGradeLabel: {
91
- id: "pep.answers.militaryRank.label",
92
- description: "Military rank label",
93
- defaultMessage: "Military rank",
94
- },
95
- });
96
- export const PepAnswers = ({ answer }) => {
97
- var _a;
98
- const intl = useIntl();
99
- if (!answer.type || answer.type === PepType.NOT_PEP) {
100
- return (React.createElement("div", null,
101
- React.createElement("p", null,
102
- React.createElement(FormattedMessage, { id: "pep.answers.notpep", description: "Not pep", defaultMessage: "The person is not PEP" }))));
103
- }
104
- const entityType = answer.legalEntityType;
105
- const lang = intl.locale.slice(0, 2);
106
- const country = (countries[lang] || countries["en"]).find((country) => country.value === answer.country);
107
- const role = getRoleAlts(intl).find((alt) => alt.value === answer.role);
108
- const militaryRank = getMilitaryAlts(intl).find((alt) => alt.value === answer.militaryRank);
109
- return (React.createElement("div", null,
110
- answer.type && (React.createElement(StaticInput, { label: intl.formatMessage(messages.whoIsPepLabel), value: intl.formatMessage(isPepMessages[answer.type], {
111
- entityType,
112
- name: answer.ownerName,
113
- }) })),
114
- answer.relationToPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.relationLabel), value: intl.formatMessage(relationMessages[answer.relationToPEP], {
115
- entityType,
116
- name: answer.ownerName,
117
- }) })),
118
- answer.businessRelation && (React.createElement(StaticInput, { label: intl.formatMessage(messages.businessRelationLabel), value: intl.formatMessage(businessRelationMessages[answer.businessRelation], { entityType, name: answer.ownerName }) })),
119
- answer.nameOfPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.nameOfPepLabel), value: answer.nameOfPEP })),
120
- answer.birthdayOfPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.birthdayOfPEPLabel), value: answer.birthdayOfPEP })),
121
- answer.ended ? (React.createElement(React.Fragment, null,
122
- React.createElement(StaticInput, { label: intl.formatMessage(messages.statusLabel), value: intl.formatMessage(messages.statusEndedValue) }),
123
- React.createElement(StaticInput, { label: intl.formatMessage(messages.endedLabel), value: answer.ended }))) : (React.createElement(StaticInput, { label: intl.formatMessage(messages.statusLabel), value: intl.formatMessage(messages.statusOngoingValue) })),
124
- answer.country && (React.createElement(StaticInput, { label: intl.formatMessage(messages.countryLabel), value: country ? country.label : answer.country })),
125
- role && (React.createElement(StaticInput, { label: intl.formatMessage(messages.roleLabel), value: role.text })),
126
- answer.ambassadorCountry && (React.createElement(StaticInput, { label: intl.formatMessage(messages.ambassadorCountryLabel), value: ((_a = (countries[lang] || countries["en"]).find((country) => country.value === answer.ambassadorCountry)) === null || _a === void 0 ? void 0 : _a.label) || answer.ambassadorCountry })),
127
- answer.governmentCompany && (React.createElement(StaticInput, { label: intl.formatMessage(messages.governmentCompanyNameLabel), value: answer.governmentCompany })),
128
- answer.governmentCompanyRole && (React.createElement(StaticInput, { label: intl.formatMessage(messages.governmentCompanyRoleLabel), value: answer.governmentCompanyRole })),
129
- answer.internationalOrganisation && (React.createElement(StaticInput, { label: intl.formatMessage(messages.internationalOrganisationNameLabel), value: answer.internationalOrganisation })),
130
- answer.internationalOrganisationRole && (React.createElement(StaticInput, { label: intl.formatMessage(messages.internationalOrganisationRoleLabel), value: answer.internationalOrganisationRole })),
131
- militaryRank && (React.createElement(StaticInput, { label: intl.formatMessage(messages.militaryGradeLabel), value: militaryRank.text }))));
132
- };
133
- const StaticInput = ({ label, value }) => {
134
- return (React.createElement("div", { className: "static-input" },
135
- React.createElement("div", { className: "label" }, label),
136
- React.createElement("div", { className: "value" }, value)));
137
- };
1
+ import React from "react";
2
+ import "./PepAnswers.scss";
3
+ import countries from "@lysaab/countries";
4
+ import { getRoleAlts, getMilitaryAlts } from "../pages/RolePage/RolePage";
5
+ import { PepType } from "../pages/PepContext";
6
+ import { useIntl, defineMessages, FormattedMessage } from "react-intl";
7
+ import { messages as isPepMessages } from "../pages/IsPep/IsPepMessages";
8
+ import { relationMessages, businessRelationMessages, } from "../pages/RelationPage/RelationMessages";
9
+ const messages = defineMessages({
10
+ whoIsPepLabel: {
11
+ id: "pep.answers.who.label",
12
+ },
13
+ relationLabel: {
14
+ id: "pep.answers.relationship.label",
15
+ },
16
+ businessRelationLabel: {
17
+ id: "pep.answers.businessRelationship.label",
18
+ },
19
+ nameOfPepLabel: {
20
+ id: "pep.answers.nameOfPep.label",
21
+ },
22
+ birthdayOfPEPLabel: {
23
+ id: "pep.answers.birthdayOfPEP.label",
24
+ },
25
+ statusLabel: {
26
+ id: "pep.answers.status.label",
27
+ },
28
+ statusEndedValue: {
29
+ id: "pep.answers.statusEnded.value",
30
+ },
31
+ statusOngoingValue: {
32
+ id: "pep.answers.statusOngoing.value",
33
+ },
34
+ endedLabel: {
35
+ id: "pep.answers.endedStatus.label",
36
+ },
37
+ roleLabel: {
38
+ id: "pep.answers.role.label",
39
+ },
40
+ countryLabel: {
41
+ id: "pep.answers.country.label",
42
+ },
43
+ ambassadorCountryLabel: {
44
+ id: "pep.answers.ambassadorCountry.label",
45
+ },
46
+ governmentCompanyNameLabel: {
47
+ id: "pep.answers.governmentCompanyName.label",
48
+ },
49
+ governmentCompanyRoleLabel: {
50
+ id: "pep.answers.governmentCompanyRole.label",
51
+ },
52
+ internationalOrganisationNameLabel: {
53
+ id: "pep.answers.companyName.label",
54
+ },
55
+ internationalOrganisationRoleLabel: {
56
+ id: "pep.answers.companyRole.label",
57
+ },
58
+ militaryGradeLabel: {
59
+ id: "pep.answers.militaryRank.label",
60
+ },
61
+ });
62
+ export const PepAnswers = ({ answer }) => {
63
+ var _a;
64
+ const intl = useIntl();
65
+ if (!answer.type || answer.type === PepType.NOT_PEP) {
66
+ return (React.createElement("div", null,
67
+ React.createElement("p", null,
68
+ React.createElement(FormattedMessage, { id: "pep.answers.notpep" }))));
69
+ }
70
+ const entityType = answer.legalEntityType;
71
+ const lang = intl.locale.slice(0, 2);
72
+ const country = (countries[lang] || countries["en"]).find((country) => country.value === answer.country);
73
+ const role = getRoleAlts(intl).find((alt) => alt.value === answer.role);
74
+ const militaryRank = getMilitaryAlts(intl).find((alt) => alt.value === answer.militaryRank);
75
+ return (React.createElement("div", null,
76
+ answer.type && (React.createElement(StaticInput, { label: intl.formatMessage(messages.whoIsPepLabel), value: intl.formatMessage(isPepMessages[answer.type], {
77
+ entityType,
78
+ name: answer.ownerName,
79
+ }) })),
80
+ answer.relationToPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.relationLabel), value: intl.formatMessage(relationMessages[answer.relationToPEP], {
81
+ entityType,
82
+ name: answer.ownerName,
83
+ }) })),
84
+ answer.businessRelation && (React.createElement(StaticInput, { label: intl.formatMessage(messages.businessRelationLabel), value: intl.formatMessage(businessRelationMessages[answer.businessRelation], { entityType, name: answer.ownerName }) })),
85
+ answer.nameOfPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.nameOfPepLabel), value: answer.nameOfPEP })),
86
+ answer.birthdayOfPEP && (React.createElement(StaticInput, { label: intl.formatMessage(messages.birthdayOfPEPLabel), value: answer.birthdayOfPEP })),
87
+ answer.ended ? (React.createElement(React.Fragment, null,
88
+ React.createElement(StaticInput, { label: intl.formatMessage(messages.statusLabel), value: intl.formatMessage(messages.statusEndedValue) }),
89
+ React.createElement(StaticInput, { label: intl.formatMessage(messages.endedLabel), value: answer.ended }))) : (React.createElement(StaticInput, { label: intl.formatMessage(messages.statusLabel), value: intl.formatMessage(messages.statusOngoingValue) })),
90
+ answer.country && (React.createElement(StaticInput, { label: intl.formatMessage(messages.countryLabel), value: country ? country.label : answer.country })),
91
+ role && (React.createElement(StaticInput, { label: intl.formatMessage(messages.roleLabel), value: role.text })),
92
+ answer.ambassadorCountry && (React.createElement(StaticInput, { label: intl.formatMessage(messages.ambassadorCountryLabel), value: ((_a = (countries[lang] || countries["en"]).find((country) => country.value === answer.ambassadorCountry)) === null || _a === void 0 ? void 0 : _a.label) || answer.ambassadorCountry })),
93
+ answer.governmentCompany && (React.createElement(StaticInput, { label: intl.formatMessage(messages.governmentCompanyNameLabel), value: answer.governmentCompany })),
94
+ answer.governmentCompanyRole && (React.createElement(StaticInput, { label: intl.formatMessage(messages.governmentCompanyRoleLabel), value: answer.governmentCompanyRole })),
95
+ answer.internationalOrganisation && (React.createElement(StaticInput, { label: intl.formatMessage(messages.internationalOrganisationNameLabel), value: answer.internationalOrganisation })),
96
+ answer.internationalOrganisationRole && (React.createElement(StaticInput, { label: intl.formatMessage(messages.internationalOrganisationRoleLabel), value: answer.internationalOrganisationRole })),
97
+ militaryRank && (React.createElement(StaticInput, { label: intl.formatMessage(messages.militaryGradeLabel), value: militaryRank.text }))));
98
+ };
99
+ const StaticInput = ({ label, value }) => {
100
+ return (React.createElement("div", { className: "static-input" },
101
+ React.createElement("div", { className: "label" }, label),
102
+ React.createElement("div", { className: "value" }, value)));
103
+ };
@@ -1 +1 @@
1
- [{"id":"pep.answers.who.label","description":"Who is pep label","defaultMessage":"Who is PEP?"},{"id":"pep.answers.relationship.label","description":"Relationship label","defaultMessage":"Relationship"},{"id":"pep.answers.businessRelationship.label","description":"Business relationship label","defaultMessage":"Who is PEP?"},{"id":"pep.answers.nameOfPep.label","description":"Name of pep label","defaultMessage":"The person's name"},{"id":"pep.answers.birthdayOfPEP.label","description":"Birthday of pep label","defaultMessage":"The person's birthday"},{"id":"pep.answers.status.label","description":"Status label","defaultMessage":"Status"},{"id":"pep.answers.statusEnded.value","description":"Status ended value","defaultMessage":"Ended"},{"id":"pep.answers.statusOngoing.value","description":"Status ongoing value","defaultMessage":"Ongoing"},{"id":"pep.answers.endedStatus.label","description":"Ended label","defaultMessage":"Ended"},{"id":"pep.answers.role.label","description":"Role label","defaultMessage":"Role"},{"id":"pep.answers.country.label","description":"Country label","defaultMessage":"Country"},{"id":"pep.answers.ambassadorCountry.label","description":"Ambassador country label","defaultMessage":"Ambassador country"},{"id":"pep.answers.governmentCompanyName.label","description":"Government company name label","defaultMessage":"Company name"},{"id":"pep.answers.governmentCompanyRole.label","description":"Government company role label","defaultMessage":"Company role"},{"id":"pep.answers.companyName.label","description":"International organisation name label","defaultMessage":"Company name"},{"id":"pep.answers.companyRole.label","description":"International organisation role label","defaultMessage":"Company role"},{"id":"pep.answers.militaryRank.label","description":"Military rank label","defaultMessage":"Military rank"},{"id":"pep.answers.notpep","description":"Not pep","defaultMessage":"The person is not PEP"}]
1
+ [{"id":"pep.answers.who.label"},{"id":"pep.answers.relationship.label"},{"id":"pep.answers.businessRelationship.label"},{"id":"pep.answers.nameOfPep.label"},{"id":"pep.answers.birthdayOfPEP.label"},{"id":"pep.answers.status.label"},{"id":"pep.answers.statusEnded.value"},{"id":"pep.answers.statusOngoing.value"},{"id":"pep.answers.endedStatus.label"},{"id":"pep.answers.role.label"},{"id":"pep.answers.country.label"},{"id":"pep.answers.ambassadorCountry.label"},{"id":"pep.answers.governmentCompanyName.label"},{"id":"pep.answers.governmentCompanyRole.label"},{"id":"pep.answers.companyName.label"},{"id":"pep.answers.companyRole.label"},{"id":"pep.answers.militaryRank.label"},{"id":"pep.answers.notpep"}]
@@ -1 +1 @@
1
- [{"id":"pep.ispep.header","description":"Is PEP question header","defaultMessage":"{ \n entityType, select,\n PERSON {\n Are you or is a peer close to you a politically exposed person (PEP)?\n }\n CORPORATION {\n Is {name} or a person close to {name} a politically exposed person (PEP)?\n }\n other {}\n }"},{"id":"pep.ispep.required","description":"Required validator text","defaultMessage":"You need to choose an alternative"},{"id":"pep.ispep.NOT_PEP","description":"Not pep","defaultMessage":"No"},{"id":"pep.ispep.ME","description":"The person is pep","defaultMessage":"{ \n entityType, select,\n PERSON {\n I have a role which makes me a PEP\n }\n CORPORATION {\n {name} is PEP because of his or her role\n }\n other {}\n }"},{"id":"pep.ispep.RELATIVE","description":"I have a relationship with a person that is a PEP","defaultMessage":"{ \n entityType, select,\n PERSON {\n I have a relationship with a person that is a PEP\n }\n CORPORATION {\n {name} has a relationship with a PEP\n }\n other {}\n }"},{"id":"pep.ispep.COLLEAGUE","description":"The person has a colleague that is a PEP","defaultMessage":"{ \n entityType, select,\n PERSON {\n I work for, or have a business relationship with, a PEP\n }\n CORPORATION {\n {name} works for, or has a business relationship with, a PEP\n }\n other {}\n }"}]
1
+ [{"id":"pep.ispep.header"},{"id":"pep.ispep.required"},{"id":"pep.ispep.NOT_PEP"},{"id":"pep.ispep.ME"},{"id":"pep.ispep.RELATIVE"},{"id":"pep.ispep.COLLEAGUE"}]
@@ -1 +1 @@
1
- [{"id":"pep.ispep.next","description":"Next button","defaultMessage":"Next"}]
1
+ [{"id":"pep.ispep.next"}]
@@ -1 +1 @@
1
- [{"id":"pep.relation.relationship.header","description":"Relationship header","defaultMessage":"{ \n entityType, select,\n PERSON {\n What relationship do you have to the person in a politically exposed position?\n }\n CORPORATION {\n What relationship does {name} have to the person in a politically exposed position?\n }\n other {}\n }"},{"id":"pep.relation.relation.required","description":"Required error message","defaultMessage":"You need to choose an alternative"},{"id":"pep.relation.relation.MARRIED_PARTNER","description":"The person is married to someone who is pep","defaultMessage":"Spouse of a PEP"},{"id":"pep.relation.relation.COLIVING_PARTNER","description":"The person is a coliving partner to someone who is pep","defaultMessage":"Partner to a PEP"},{"id":"pep.relation.relation.CHILD","description":"The person is the child of someone who is pep","defaultMessage":"Child of a PEP"},{"id":"pep.relation.relation.PARENT","description":"The person is the parent of someone who is pep","defaultMessage":"Parent of a PEP"},{"id":"pep.relation.relation.CHILD_MARRIED_PARTNER","description":"The person is married to the child of someone who is pep","defaultMessage":"Spouse of the child of a PEP"},{"id":"pep.relation.relation.CHILD_COLIVING_PARTNER","description":"The person is married to someone who is pep","defaultMessage":"Partner to the child of a PEP"},{"id":"pep.relation.businessrelation.header","description":"Business relation header","defaultMessage":"{ \n entityType, select,\n PERSON {\n What relationship do you have to the person in a politically exposed position?\n }\n CORPORATION {\n What relationship does {name} have to the person in a politically exposed position?\n }\n other {}\n }"},{"id":"pep.relation.businessrelation.required","description":"Required error message","defaultMessage":"You need to choose an alternative"},{"id":"pep.relation.businessrelation.alt.CO_OWNERSHIP","description":"Co-ownership alternative","defaultMessage":"{ \n entityType, select,\n PERSON {\n I am the beneficial owner to a legal person, or a legal structure together with a PEP\n }\n CORPORATION {\n {name} is the beneficial owner to a legal person, or a legal structure together with a PEP\n }\n other {}\n }"},{"id":"pep.relation.businessrelation.alt.CLOSE_CONNECTION","description":"Close business relation","defaultMessage":"{ \n entityType, select,\n PERSON {\n I am a person that in one way or the other have or have had a close relation with a PEP\n }\n CORPORATION {\n {name} is a person that in one way or the other has or has had a close relation with a PEP\n }\n other {}\n }"},{"id":"pep.relation.businessrelation.alt.COMPANY_FOR_PEP","description":"Beneficial owner","defaultMessage":"{ \n entityType, select,\n PERSON {\n I am the beneficial owner to a legal person, or a legal structure together with a PEP\n }\n CORPORATION {\n {name} is the lone beneficial owner to a legal person, or a legal structure together with a PEP\n }\n other {}\n }"},{"id":"pep.relation.relative.name.header","description":"Relative name","defaultMessage":"{ \n entityType, select,\n PERSON {\n {\n relation, select, \n MARRIED_PARTNER {\n What is the name of your spouce?\n }\n COLIVING_PARTNER {\n What is the name of your partner?\n }\n CHILD {\n What is the name of your parent?\n }\n PARENT {\n What is the name of your child?\n }\n CHILD_MARRIED_PARTNER {\n What is the name of the parent of your spouse?\n }\n CHILD_COLIVING_PARTNER {\n What is the name of the parent of your partner?\n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select, \n MARRIED_PARTNER {\n What is the name of the spouse of {name}?\n }\n COLIVING_PARTNER {\n What is the name of the partner of {name}?\n }\n CHILD {\n What is the name of the parent of {name}?\n }\n PARENT {\n What is the name of the child of {name}?\n }\n CHILD_MARRIED_PARTNER {\n What is the name of the parent of the spouse of {name}?\n }\n CHILD_COLIVING_PARTNER {\n What is the name of the parent of the partner of {name}?\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.relation.relative.name.required","description":"Required error message","defaultMessage":"You need to choose an alternative"},{"id":"pep.relation.birthday.header","description":"Relative birthday","defaultMessage":"{ \n entityType, select,\n PERSON {\n {\n relation, select, \n MARRIED_PARTNER { \n When is your spouse born? \n } \n COLIVING_PARTNER { \n When is your partner born? \n } \n CHILD { \n When is your parent born? \n } \n PARENT { \n When is your child born? \n } \n CHILD_MARRIED_PARTNER { \n When is the parent of your spouse born?\n } \n CHILD_COLIVING_PARTNER { \n When is the parent of your partner born?\n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select, \n MARRIED_PARTNER {\n When is the spouse of {name} born?\n }\n COLIVING_PARTNER {\n When is the partner of {name} born?\n }\n CHILD {\n When is the child of {name} born?\n }\n PARENT {\n When is the parent of {name} born?\n }\n CHILD_MARRIED_PARTNER {\n When is the parent of the spouse of {name} born?\n }\n CHILD_COLIVING_PARTNER {\n When is the parent of the partner of {name} born?\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.relation.birthday.required","description":"Required error message","defaultMessage":"State the date"},{"id":"pep.relation.colleague.name.header","description":"Colleague name","defaultMessage":"{ \n entityType, select,\n PERSON {\n { \n relation, select, \n CO_OWNERSHIP { \n What is the name of the person in a politically exposed position that you have a relationship with?\n }\n CLOSE_CONNECTION { \n What is the name of the person in a politically exposed position that you have a relationship with?\n }\n COMPANY_FOR_PEP { \n What is the name of the person in a politically exposed position for whom the legal person or structure has been established for?\n }\n other {}\n }\n }\n CORPORATION {\n {\n relation, select,\n CO_OWNERSHIP { \n What is the name of the person in a politically exposed position that {name} has a relationship with?\n }\n CLOSE_CONNECTION { \n What is the name of the person in a politically exposed position that {name} has a relationship with?\n }\n COMPANY_FOR_PEP { \n What is the name of the person in a politically exposed position for whom the legal person or structure has been established for?\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.relation.colleague.name.required","description":"Required error message","defaultMessage":"You need to choose an alternative"}]
1
+ [{"id":"pep.relation.relationship.header"},{"id":"pep.relation.relation.required"},{"id":"pep.relation.relation.MARRIED_PARTNER"},{"id":"pep.relation.relation.COLIVING_PARTNER"},{"id":"pep.relation.relation.CHILD"},{"id":"pep.relation.relation.PARENT"},{"id":"pep.relation.relation.CHILD_MARRIED_PARTNER"},{"id":"pep.relation.relation.CHILD_COLIVING_PARTNER"},{"id":"pep.relation.businessrelation.header"},{"id":"pep.relation.businessrelation.required"},{"id":"pep.relation.businessrelation.alt.CO_OWNERSHIP"},{"id":"pep.relation.businessrelation.alt.CLOSE_CONNECTION"},{"id":"pep.relation.businessrelation.alt.COMPANY_FOR_PEP"},{"id":"pep.relation.relative.name.header"},{"id":"pep.relation.relative.name.required"},{"id":"pep.relation.birthday.header"},{"id":"pep.relation.birthday.required"},{"id":"pep.relation.colleague.name.header"},{"id":"pep.relation.colleague.name.required"}]
@@ -1 +1 @@
1
- [{"id":"pep.relation.next","description":"Next button","defaultMessage":"Next"}]
1
+ [{"id":"pep.relation.next"}]
@@ -1 +1 @@
1
- [{"id":"pep.role.roles.header","description":"Header","defaultMessage":"{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n State your role\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n State the role of your spouse\n }\n COLIVING_PARTNER { \n State the role of your partner\n }\n CHILD { \n State the role of your parent\n }\n PARENT { \n State the role of your child\n }\n CHILD_MARRIED_PARTNER { \n State the role of the parent of your spouce\n }\n CHILD_COLIVING_PARTNER { \n State the role of the parent of your partner\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n State the role of the person in a politically exposed position that you have a relationship with\n }\n CLOSE_CONNECTION { \n State the role of the person in a politically exposed position that you have a relationship with\n }\n COMPANY_FOR_PEP { \n State the role of the person in a politically exposed position that you have a relationship with\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n State the role of {name}\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n State the role of the spouse of {name}\n }\n COLIVING_PARTNER { \n State the role of the partner of {name}\n }\n CHILD { \n State the role of the parent of {name}\n }\n PARENT { \n State the role of the child of {name}\n }\n CHILD_MARRIED_PARTNER { \n State the role of the parent of the spouse of {name}\n }\n CHILD_COLIVING_PARTNER { \n State the role of the parent of the partner of {name}\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n State the role of the person in a politically exposed position that {name} has a relationship with\n }\n CLOSE_CONNECTION { \n State the role of the person in a politically exposed position that {name} has a relationship with\n }\n COMPANY_FOR_PEP { \n State the role of the person in a politically exposed position that {name} has a relationship with\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.role.roles.placeholder","description":"Role placeholder","defaultMessage":"Choose a role"},{"id":"pep.role.roles.required","description":"Required validation error","defaultMessage":"You need to choose a role"},{"id":"pep.role.roles.alt.HEAD_OF_GOVERNMENT","description":"Head of government alt","defaultMessage":"Head of state"},{"id":"pep.role.roles.alt.MINISTER","description":"Minister alt","defaultMessage":"Minister or Deputy Minister"},{"id":"pep.role.roles.alt.PARLIMENT_MEMBER","description":"Parlament alt","defaultMessage":"Member of the parliament"},{"id":"pep.role.roles.alt.CENTRAL_BANK_MEMBER","description":"Central bank member alt","defaultMessage":"Member of the Board of the Central Bank"},{"id":"pep.role.roles.alt.BOARD_MEMBER_POLITICAL_PARTY","description":"Political party board member alt","defaultMessage":"Member of the Board in a political party in the parliament"},{"id":"pep.role.roles.alt.JUDGE_SUPREME_COURT","description":"Supreme court judge alt","defaultMessage":"Supreme Court judge"},{"id":"pep.role.roles.alt.JUDGE_OTHER_HIGH_COURT","description":"High court judge alt","defaultMessage":"Judge in a constitutional court of law or other high-level judicial body whose decisions only exceptionally can be appealed"},{"id":"pep.role.roles.alt.REVISION_INSTITUTE","description":"Revision institute worker alt","defaultMessage":"Senior official at a governmental audit authority"},{"id":"pep.role.roles.alt.AMBASSADOR","description":"Ambassador alt","defaultMessage":"Ambassador or head of mission"},{"id":"pep.role.roles.alt.MILITARY_OFFICER","description":"Military officer alt","defaultMessage":"Senior ranking officer in the armed forces"},{"id":"pep.role.roles.alt.GOVERNMENT_COMPANY","description":"Government company leader alt","defaultMessage":"Person part of a state-owned company's administrative-, managerial- or control bopdy"},{"id":"pep.role.roles.alt.EU_HIGH_RANKING_POSITION","description":"High ranking EU position alt","defaultMessage":"Member of the European Parliament"},{"id":"pep.role.roles.alt.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP","description":"High ranking position in an international organisation alt","defaultMessage":"Senior management in an international organisation"},{"id":"pep.role.military.name.header","description":"International company name header","defaultMessage":"{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n State your rank\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n State the rank of your spouce\n }\n COLIVING_PARTNER { \n State the rank of your partner\n }\n CHILD { \n State the rank of your parent\n }\n PARENT { \n State the rank of your child\n }\n CHILD_MARRIED_PARTNER { \n State the rank of your spouce's parent\n }\n CHILD_COLIVING_PARTNER { \n State the rank of your partner's parent\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n State the rank of the person that you have a relationship with that is controlling the company and is in a politically exposed position\n }\n CLOSE_CONNECTION { \n State the rank of the person that you have or have had a close relationship with \n }\n COMPANY_FOR_PEP { \n What rank does the person have\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n State the rank of {name}\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n State the rank of the spouse of {name}\n }\n COLIVING_PARTNER { \n State the rank of the partner of {name}\n }\n CHILD { \n State the rank of the parent of {name}\n }\n PARENT { \n State the rank of the child of {name}\n }\n CHILD_MARRIED_PARTNER { \n State the rank of the parent of the spouse of {name}\n }\n CHILD_COLIVING_PARTNER { \n State the rank of the parent of the partner of {name}\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n State the rank of the person in a politically exposed position that {name} has a relationship with\n }\n CLOSE_CONNECTION { \n State the rank of the person in a politically exposed position that {name} has a relationship with\n }\n COMPANY_FOR_PEP { \n What rank does the person have\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.role.military.header","description":"Header","defaultMessage":"Choose a role"},{"id":"pep.role.military.required","description":"Required validation error","defaultMessage":"You need to choose a role"},{"id":"pep.role.military.alt.GENERAL","description":"General alt","defaultMessage":"General"},{"id":"pep.role.military.alt.LIEUTENANT_GENERAL","description":"Lieutenant general alt","defaultMessage":"Lieutenant general"},{"id":"pep.role.military.alt.MAJOR_GENERAL","description":"Major general alt","defaultMessage":"Major general"},{"id":"pep.role.military.alt.ADMIRAL","description":"Admiral alt","defaultMessage":"Admiral"},{"id":"pep.role.military.alt.VICE_ADMIRAL","description":"Vice admiral alt","defaultMessage":"Vice admiral"},{"id":"pep.role.military.alt.REAR_ADMIRAL","description":"Rear admiral alt","defaultMessage":"Conter admiral"},{"id":"pep.role.ambassador.header","description":"Ambassador header","defaultMessage":"State the country"},{"id":"pep.role.ambassador.required","description":"Ambassador required error","defaultMessage":"You need to choose a country"},{"id":"pep.role.governmentCompany.name.header","description":"Government company name header","defaultMessage":"State the name of the company"},{"id":"pep.role.governmentCompany.name.required","description":"Government company name required error","defaultMessage":"You need to state a name"},{"id":"pep.role.governmentCompany.role.header","description":"Government company role header","defaultMessage":"State role"},{"id":"pep.role.governmentCompany.role.required","description":"Government company role required error","defaultMessage":"You need to state a role"},{"id":"pep.role.intCompany.name.header","description":"International company name header","defaultMessage":"State the organization's name"},{"id":"pep.role.intCompany.name.required","description":"International company name required error","defaultMessage":"You need to state a name"},{"id":"pep.role.intCompany.role.header","description":"International company role header","defaultMessage":"State role"},{"id":"pep.role.intCompany.role.required","description":"International company role required error","defaultMessage":"You need to state a role"}]
1
+ [{"id":"pep.role.roles.header"},{"id":"pep.role.roles.placeholder"},{"id":"pep.role.roles.required"},{"id":"pep.role.roles.alt.HEAD_OF_GOVERNMENT"},{"id":"pep.role.roles.alt.MINISTER"},{"id":"pep.role.roles.alt.PARLIMENT_MEMBER"},{"id":"pep.role.roles.alt.CENTRAL_BANK_MEMBER"},{"id":"pep.role.roles.alt.BOARD_MEMBER_POLITICAL_PARTY"},{"id":"pep.role.roles.alt.JUDGE_SUPREME_COURT"},{"id":"pep.role.roles.alt.JUDGE_OTHER_HIGH_COURT"},{"id":"pep.role.roles.alt.REVISION_INSTITUTE"},{"id":"pep.role.roles.alt.AMBASSADOR"},{"id":"pep.role.roles.alt.MILITARY_OFFICER"},{"id":"pep.role.roles.alt.GOVERNMENT_COMPANY"},{"id":"pep.role.roles.alt.EU_HIGH_RANKING_POSITION"},{"id":"pep.role.roles.alt.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP"},{"id":"pep.role.military.name.header"},{"id":"pep.role.military.header"},{"id":"pep.role.military.required"},{"id":"pep.role.military.alt.GENERAL"},{"id":"pep.role.military.alt.LIEUTENANT_GENERAL"},{"id":"pep.role.military.alt.MAJOR_GENERAL"},{"id":"pep.role.military.alt.ADMIRAL"},{"id":"pep.role.military.alt.VICE_ADMIRAL"},{"id":"pep.role.military.alt.REAR_ADMIRAL"},{"id":"pep.role.ambassador.header"},{"id":"pep.role.ambassador.required"},{"id":"pep.role.governmentCompany.name.header"},{"id":"pep.role.governmentCompany.name.required"},{"id":"pep.role.governmentCompany.role.header"},{"id":"pep.role.governmentCompany.role.required"},{"id":"pep.role.intCompany.name.header"},{"id":"pep.role.intCompany.name.required"},{"id":"pep.role.intCompany.role.header"},{"id":"pep.role.intCompany.role.required"}]
@@ -1 +1 @@
1
- [{"id":"pep.role.next","description":"Next button","defaultMessage":"Next"}]
1
+ [{"id":"pep.role.next"}]
@@ -1 +1 @@
1
- [{"id":"pep.status.isongoing.header","description":"Is ongoing header","defaultMessage":"{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n Is your position ongoing or ended?\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Is your spouse's position ongoing or ended?\n }\n COLIVING_PARTNER { \n Is your partner's position ongoing or ended?\n }\n CHILD { \n Is your parent's position ongoing or ended?\n }\n PARENT { \n Is your child's position ongoing or ended?\n }\n CHILD_MARRIED_PARTNER { \n Is your spouse's parent's position ongoing or ended?\n }\n CHILD_COLIVING_PARTNER { \n Is your partner's parent's position ongoing or ended?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Is the position for the person in a politically exposed position, who is a beneficial owner in a company together with you, ongoing or ended?\n }\n CLOSE_CONNECTION { \n Is the position for the person in a politically exposed position, who you have or have had a close relationship to, ongoing or ended?\n }\n COMPANY_FOR_PEP { \n Is the position for the person in a politically exposed position, who you have a close relationship to, ongoing or ended?\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n Is the position of {name} ongoing or ended\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n Is the position of the spouse of {name} ongoing or ended?\n }\n COLIVING_PARTNER { \n Is the position of the partner of {name} ongoing or ended?\n }\n CHILD { \n Is the position of the parent of {name} ongoing or ended?\n }\n PARENT { \n Is the position of the child of {name} ongoing or ended?\n }\n CHILD_MARRIED_PARTNER { \n Is the position of the parent of the spouse of {name} ongoing or ended?\n }\n CHILD_COLIVING_PARTNER { \n Is the position of the parent of the partner of {name} ongoing or ended?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n Is the position of the person in a politically exposed position, who is the beneficial owner in a company together with {name}, ongoing or ended?\n }\n CLOSE_CONNECTION { \n Is the position for the person in a politically exposed position, who {name} have or have had a close relationship to, ongoing or ended?\n }\n COMPANY_FOR_PEP { \n Is the position for the person in a politically exposed position, who {name} have a close relationship to, ongoing or ended?\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.status.isongoing.required","description":"Is ongoing required error","defaultMessage":"You need to choose an alternative"},{"id":"pep.status.ended.header","description":"When did it end header","defaultMessage":"When did the assignment end?"},{"id":"pep.status.ended.required","description":"When did it end required error","defaultMessage":"You need to provide an end date"},{"id":"pep.status.localcountry.header","description":"What country header","defaultMessage":"What country is the position in?"},{"id":"pep.status.localcountry.required","description":"Is local country required error","defaultMessage":"You need to choose a country"},{"id":"pep.status.countryselecton.header","description":"Country selection header","defaultMessage":"{ \n entityType, select,\n PERSON {\n { \n pepType, select, \n ME { \n In what country is/was your position?\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n In what country is/was your spouse's position?\n }\n COLIVING_PARTNER { \n In what country is/was your partner's position?\n }\n CHILD { \n In what country is/was your parent's position?\n }\n PARENT { \n In what country is/was your child's position?\n }\n CHILD_MARRIED_PARTNER { \n In what country is/was your spouse's parent's position?\n }\n CHILD_COLIVING_PARTNER { \n In what country is/was your partner's parent's position?\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n In what country is/was the position of the person in a politically exposed position you have or have had a relationship to?\n }\n CLOSE_CONNECTION { \n In what country is/was the position of the person in a politically exposed position you have or have had a relationship to?\n }\n COMPANY_FOR_PEP { \n In what country is/was the position of the person in a politically exposed position you have or have had a relationship to?\n }\n other {}\n }\n }\n other {}\n }\n }\n CORPORATION {\n { \n pepType, select, \n ME { \n In what country is/was the position of {name}\n }\n RELATIVE { \n {\n relation, select,\n MARRIED_PARTNER { \n In what country is/was the position of the spouse of {name}\n }\n COLIVING_PARTNER { \n In what country is/was the position of the partner of {name}\n }\n CHILD { \n In what country is/was the position of the parent of {name}\n }\n PARENT { \n In what country is/was the position of the child of {name}\n }\n CHILD_MARRIED_PARTNER { \n In what country is/was the position of the parent of the spouse of {name}\n }\n CHILD_COLIVING_PARTNER { \n In what country is/was the position of the parent of the partner of {name}\n }\n other {}\n }\n }\n COLLEAGUE { \n {\n relation, select,\n CO_OWNERSHIP { \n In what country is/was the position of the beneficial owner that {name} has a relationship to?\n }\n CLOSE_CONNECTION { \n In what country is/was the position of the person that {name} has/had a relationship to?\n }\n COMPANY_FOR_PEP { \n In what country has/had the person in a politically exposed position, that {name} has a relationship to, his or her position?\n }\n other {}\n }\n }\n other {}\n }\n }\n other {}\n }"},{"id":"pep.status.countryselecton.required","description":"Country selection required error","defaultMessage":"You have to choose a country"},{"id":"pep.status.localcountryalt.local","description":"Local country name","defaultMessage":"{countryName}"},{"id":"pep.status.othercountryalt.other","description":"Other country","defaultMessage":"Other"},{"id":"pep.status.state.ONGOING","description":"Ongoing alt","defaultMessage":"Ongoing"},{"id":"pep.status.state.ENDED","description":"Ended alt","defaultMessage":"Ended"}]
1
+ [{"id":"pep.status.isongoing.header"},{"id":"pep.status.isongoing.required"},{"id":"pep.status.ended.header"},{"id":"pep.status.ended.required"},{"id":"pep.status.localcountry.header"},{"id":"pep.status.localcountry.required"},{"id":"pep.status.countryselecton.header"},{"id":"pep.status.countryselecton.required"},{"id":"pep.status.localcountryalt.local"},{"id":"pep.status.othercountryalt.other"},{"id":"pep.status.state.ONGOING"},{"id":"pep.status.state.ENDED"}]
@@ -1 +1 @@
1
- [{"id":"pep.status.next","description":"Next button","defaultMessage":"Next"}]
1
+ [{"id":"pep.status.next"}]
@@ -1,7 +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
+ 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;
package/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(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
- }
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
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lysaab/lysa-pep",
3
3
  "author": "Lysa AB",
4
- "version": "3.0.4",
4
+ "version": "4.0.0",
5
5
  "main": "./Exports.js",
6
6
  "dependencies": {
7
7
  "@lysaab/countries": "^3.1.1",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@formatjs/cli": "^1.1.22",
16
- "@lysaab/ui-2": "^29.18.1",
16
+ "@lysaab/ui-2": "^33.2.2",
17
17
  "@types/jest": "24.0.20",
18
18
  "@types/luxon": "^1.15.2",
19
19
  "@types/node": "12.11.7",
@@ -32,7 +32,7 @@
32
32
  "typescript": "^4.3.4"
33
33
  },
34
34
  "peerDependencies": {
35
- "@lysaab/ui-2": "^29.18.1",
35
+ "@lysaab/ui-2": "^33.2.1",
36
36
  "react": "^17.0.1",
37
37
  "react-intl": "^5.20.2",
38
38
  "react-router-dom": "^5.2.0"
@@ -1,32 +1,20 @@
1
- export declare const messages: {
2
- header: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- required: {
8
- id: string;
9
- description: string;
10
- defaultMessage: string;
11
- };
12
- NOT_PEP: {
13
- id: string;
14
- description: string;
15
- defaultMessage: string;
16
- };
17
- ME: {
18
- id: string;
19
- description: string;
20
- defaultMessage: string;
21
- };
22
- RELATIVE: {
23
- id: string;
24
- description: string;
25
- defaultMessage: string;
26
- };
27
- COLLEAGUE: {
28
- id: string;
29
- description: string;
30
- defaultMessage: string;
31
- };
32
- };
1
+ export declare const messages: {
2
+ header: {
3
+ id: string;
4
+ };
5
+ required: {
6
+ id: string;
7
+ };
8
+ NOT_PEP: {
9
+ id: string;
10
+ };
11
+ ME: {
12
+ id: string;
13
+ };
14
+ RELATIVE: {
15
+ id: string;
16
+ };
17
+ COLLEAGUE: {
18
+ id: string;
19
+ };
20
+ };