@lysaab/lysa-pep 3.0.3 → 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 (40) hide show
  1. package/components/PepAnswers.js +1 -35
  2. package/messages/src/components/PepAnswers.json +1 -1
  3. package/messages/src/pages/IsPep/IsPepMessages.json +1 -1
  4. package/messages/src/pages/IsPep/IsPepPage.json +1 -1
  5. package/messages/src/pages/RelationPage/RelationMessages.json +1 -1
  6. package/messages/src/pages/RelationPage/RelationPage.json +1 -1
  7. package/messages/src/pages/RolePage/RoleMessages.json +1 -1
  8. package/messages/src/pages/RolePage/RolePage.json +1 -1
  9. package/messages/src/pages/StatusPage/StatusMessages.json +1 -1
  10. package/messages/src/pages/StatusPage/StatusPage.json +1 -1
  11. package/package.json +3 -3
  12. package/pages/IsPep/IsPepMessages.d.ts +0 -12
  13. package/pages/IsPep/IsPepMessages.js +6 -66
  14. package/pages/IsPep/IsPepPage.js +1 -1
  15. package/pages/RelationPage/RelationMessages.d.ts +0 -38
  16. package/pages/RelationPage/RelationMessages.js +0 -218
  17. package/pages/RelationPage/RelationPage.js +4 -2
  18. package/pages/RolePage/RoleMessages.d.ts +0 -70
  19. package/pages/RolePage/RoleMessages.js +0 -268
  20. package/pages/RolePage/RolePage.d.ts +2 -0
  21. package/pages/RolePage/RolePage.js +4 -5
  22. package/pages/StatusPage/StatusMessages.d.ts +0 -24
  23. package/pages/StatusPage/StatusMessages.js +0 -222
  24. package/pages/StatusPage/StatusPage.d.ts +2 -0
  25. package/pages/StatusPage/StatusPage.js +4 -5
  26. package/components/CountrySelect.d.ts +0 -11
  27. package/components/CountrySelect.js +0 -41
  28. package/messages/src/components/CountrySelect.json +0 -1
  29. package/model/Countries.d.ts +0 -4
  30. package/model/Countries.js +0 -1002
  31. package/model/PepTexts.d.ts +0 -380
  32. package/model/PepTexts.js +0 -552
  33. package/pages/PepIsPepPage.d.ts +0 -15
  34. package/pages/PepIsPepPage.js +0 -59
  35. package/pages/PepRelationPage.d.ts +0 -6
  36. package/pages/PepRelationPage.js +0 -79
  37. package/pages/PepRolePage.d.ts +0 -10
  38. package/pages/PepRolePage.js +0 -127
  39. package/pages/PepStatusPage.d.ts +0 -6
  40. package/pages/PepStatusPage.js +0 -58
@@ -3,285 +3,67 @@ import { BusinessRelation, Relation } from "../PepContext";
3
3
  export const relationMessages = defineMessages({
4
4
  header: {
5
5
  id: "pep.relation.relationship.header",
6
- description: "Relationship header",
7
- defaultMessage: `{
8
- entityType, select,
9
- PERSON {
10
- What relationship do you have to the person in a politically exposed position?
11
- }
12
- CORPORATION {
13
- What relationship does {name} have to the person in a politically exposed position?
14
- }
15
- other {}
16
- }`,
17
6
  },
18
7
  required: {
19
8
  id: "pep.relation.relation.required",
20
- description: "Required error message",
21
- defaultMessage: "You need to choose an alternative",
22
9
  },
23
10
  [Relation.MARRIED_PARTNER]: {
24
11
  id: "pep.relation.relation.MARRIED_PARTNER",
25
- description: "The person is married to someone who is pep",
26
- defaultMessage: "Spouse of a PEP",
27
12
  },
28
13
  [Relation.COLIVING_PARTNER]: {
29
14
  id: "pep.relation.relation.COLIVING_PARTNER",
30
- description: "The person is a coliving partner to someone who is pep",
31
- defaultMessage: "Partner to a PEP",
32
15
  },
33
16
  [Relation.CHILD]: {
34
17
  id: "pep.relation.relation.CHILD",
35
- description: "The person is the child of someone who is pep",
36
- defaultMessage: "Child of a PEP",
37
18
  },
38
19
  [Relation.PARENT]: {
39
20
  id: "pep.relation.relation.PARENT",
40
- description: "The person is the parent of someone who is pep",
41
- defaultMessage: "Parent of a PEP",
42
21
  },
43
22
  [Relation.CHILD_MARRIED_PARTNER]: {
44
23
  id: "pep.relation.relation.CHILD_MARRIED_PARTNER",
45
- description: "The person is married to the child of someone who is pep",
46
- defaultMessage: "Spouse of the child of a PEP",
47
24
  },
48
25
  [Relation.CHILD_COLIVING_PARTNER]: {
49
26
  id: "pep.relation.relation.CHILD_COLIVING_PARTNER",
50
- description: "The person is married to someone who is pep",
51
- defaultMessage: "Partner to the child of a PEP",
52
27
  },
53
28
  });
54
29
  export const businessRelationMessages = defineMessages({
55
30
  header: {
56
31
  id: "pep.relation.businessrelation.header",
57
- description: "Business relation header",
58
- defaultMessage: `{
59
- entityType, select,
60
- PERSON {
61
- What relationship do you have to the person in a politically exposed position?
62
- }
63
- CORPORATION {
64
- What relationship does {name} have to the person in a politically exposed position?
65
- }
66
- other {}
67
- }`,
68
32
  },
69
33
  required: {
70
34
  id: "pep.relation.businessrelation.required",
71
- description: "Required error message",
72
- defaultMessage: "You need to choose an alternative",
73
35
  },
74
36
  [BusinessRelation.CO_OWNERSHIP]: {
75
37
  id: "pep.relation.businessrelation.alt.CO_OWNERSHIP",
76
- description: "Co-ownership alternative",
77
- defaultMessage: `{
78
- entityType, select,
79
- PERSON {
80
- I am the beneficial owner to a legal person, or a legal structure together with a PEP
81
- }
82
- CORPORATION {
83
- {name} is the beneficial owner to a legal person, or a legal structure together with a PEP
84
- }
85
- other {}
86
- }`,
87
38
  },
88
39
  [BusinessRelation.CLOSE_CONNECTION]: {
89
40
  id: "pep.relation.businessrelation.alt.CLOSE_CONNECTION",
90
- description: "Close business relation",
91
- defaultMessage: `{
92
- entityType, select,
93
- PERSON {
94
- I am a person that in one way or the other have or have had a close relation with a PEP
95
- }
96
- CORPORATION {
97
- {name} is a person that in one way or the other has or has had a close relation with a PEP
98
- }
99
- other {}
100
- }`,
101
41
  },
102
42
  [BusinessRelation.COMPANY_FOR_PEP]: {
103
43
  id: "pep.relation.businessrelation.alt.COMPANY_FOR_PEP",
104
- description: "Beneficial owner",
105
- defaultMessage: `{
106
- entityType, select,
107
- PERSON {
108
- I am the beneficial owner to a legal person, or a legal structure together with a PEP
109
- }
110
- CORPORATION {
111
- {name} is the lone beneficial owner to a legal person, or a legal structure together with a PEP
112
- }
113
- other {}
114
- }`,
115
44
  },
116
45
  });
117
46
  export const relativeNameMessages = defineMessages({
118
47
  header: {
119
48
  id: "pep.relation.relative.name.header",
120
- description: "Relative name",
121
- defaultMessage: `{
122
- entityType, select,
123
- PERSON {
124
- {
125
- relation, select,
126
- MARRIED_PARTNER {
127
- What is the name of your spouce?
128
- }
129
- COLIVING_PARTNER {
130
- What is the name of your partner?
131
- }
132
- CHILD {
133
- What is the name of your parent?
134
- }
135
- PARENT {
136
- What is the name of your child?
137
- }
138
- CHILD_MARRIED_PARTNER {
139
- What is the name of the parent of your spouse?
140
- }
141
- CHILD_COLIVING_PARTNER {
142
- What is the name of the parent of your partner?
143
- }
144
- other {}
145
- }
146
- }
147
- CORPORATION {
148
- {
149
- relation, select,
150
- MARRIED_PARTNER {
151
- What is the name of the spouse of {name}?
152
- }
153
- COLIVING_PARTNER {
154
- What is the name of the partner of {name}?
155
- }
156
- CHILD {
157
- What is the name of the parent of {name}?
158
- }
159
- PARENT {
160
- What is the name of the child of {name}?
161
- }
162
- CHILD_MARRIED_PARTNER {
163
- What is the name of the parent of the spouse of {name}?
164
- }
165
- CHILD_COLIVING_PARTNER {
166
- What is the name of the parent of the partner of {name}?
167
- }
168
- other {}
169
- }
170
- }
171
- other {}
172
- }`,
173
49
  },
174
50
  required: {
175
51
  id: "pep.relation.relative.name.required",
176
- description: "Required error message",
177
- defaultMessage: "You need to choose an alternative",
178
52
  },
179
53
  });
180
54
  export const birthdayMessages = defineMessages({
181
55
  header: {
182
56
  id: "pep.relation.birthday.header",
183
- description: "Relative birthday",
184
- defaultMessage: `{
185
- entityType, select,
186
- PERSON {
187
- {
188
- relation, select,
189
- MARRIED_PARTNER {
190
- When is your spouse born?
191
- }
192
- COLIVING_PARTNER {
193
- When is your partner born?
194
- }
195
- CHILD {
196
- When is your parent born?
197
- }
198
- PARENT {
199
- When is your child born?
200
- }
201
- CHILD_MARRIED_PARTNER {
202
- When is the parent of your spouse born?
203
- }
204
- CHILD_COLIVING_PARTNER {
205
- When is the parent of your partner born?
206
- }
207
- other {}
208
- }
209
- }
210
- CORPORATION {
211
- {
212
- relation, select,
213
- MARRIED_PARTNER {
214
- When is the spouse of {name} born?
215
- }
216
- COLIVING_PARTNER {
217
- When is the partner of {name} born?
218
- }
219
- CHILD {
220
- When is the child of {name} born?
221
- }
222
- PARENT {
223
- When is the parent of {name} born?
224
- }
225
- CHILD_MARRIED_PARTNER {
226
- When is the parent of the spouse of {name} born?
227
- }
228
- CHILD_COLIVING_PARTNER {
229
- When is the parent of the partner of {name} born?
230
- }
231
- other {}
232
- }
233
- }
234
- other {}
235
- }`,
236
57
  },
237
58
  required: {
238
59
  id: "pep.relation.birthday.required",
239
- description: "Required error message",
240
- defaultMessage: "State the date",
241
60
  },
242
61
  });
243
62
  export const colleagueNameMessages = defineMessages({
244
63
  header: {
245
64
  id: "pep.relation.colleague.name.header",
246
- description: "Colleague name",
247
- defaultMessage: `{
248
- entityType, select,
249
- PERSON {
250
- {
251
- relation, select,
252
- CO_OWNERSHIP {
253
- What is the name of the person in a politically exposed position that you have a relationship with?
254
- }
255
- CLOSE_CONNECTION {
256
- What is the name of the person in a politically exposed position that you have a relationship with?
257
- }
258
- COMPANY_FOR_PEP {
259
- What is the name of the person in a politically exposed position for whom the legal person or structure has been established for?
260
- }
261
- other {}
262
- }
263
- }
264
- CORPORATION {
265
- {
266
- relation, select,
267
- CO_OWNERSHIP {
268
- What is the name of the person in a politically exposed position that {name} has a relationship with?
269
- }
270
- CLOSE_CONNECTION {
271
- What is the name of the person in a politically exposed position that {name} has a relationship with?
272
- }
273
- COMPANY_FOR_PEP {
274
- What is the name of the person in a politically exposed position for whom the legal person or structure has been established for?
275
- }
276
- other {}
277
- }
278
- }
279
- other {}
280
- }`,
281
65
  },
282
66
  required: {
283
67
  id: "pep.relation.colleague.name.required",
284
- description: "Required error message",
285
- defaultMessage: "You need to choose an alternative",
286
68
  },
287
69
  });
@@ -63,7 +63,9 @@ export const RelationPage = ({ next }) => {
63
63
  : pepContext.state.relationToPEP,
64
64
  possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
65
65
  }), selected: pepContext.state.birthdayOfPEP, onChange: (event) => {
66
- pepContext.setState({ birthdayOfPEP: event || undefined });
66
+ pepContext.setState({
67
+ birthdayOfPEP: event || undefined,
68
+ });
67
69
  }, validators: [
68
70
  new RequiredValidator(intl.formatMessage(birthdayMessages.required)),
69
71
  ], maxDate: new Date(), openToDate: pepContext.state.birthdayOfPEP || DATEPICKER_START_DATE }))) : null,
@@ -81,7 +83,7 @@ export const RelationPage = ({ next }) => {
81
83
  new RequiredValidator(intl.formatMessage(colleagueNameMessages.required)),
82
84
  ] }))) : null),
83
85
  React.createElement(PrimaryButton, { block: true, type: "submit" },
84
- React.createElement(FormattedMessage, { id: "pep.relation.next", description: "Next button", defaultMessage: "Next" }))));
86
+ React.createElement(FormattedMessage, { id: "pep.relation.next" }))));
85
87
  };
86
88
  function getRelationAlternatives(intl, entityType, pepContext) {
87
89
  return [
@@ -1,185 +1,115 @@
1
1
  export declare const roleMessages: {
2
2
  header: {
3
3
  id: string;
4
- description: string;
5
- defaultMessage: string;
6
4
  };
7
5
  placeholder: {
8
6
  id: string;
9
- description: string;
10
- defaultMessage: string;
11
7
  };
12
8
  required: {
13
9
  id: string;
14
- description: string;
15
- defaultMessage: string;
16
10
  };
17
11
  HEAD_OF_GOVERNMENT: {
18
12
  id: string;
19
- description: string;
20
- defaultMessage: string;
21
13
  };
22
14
  MINISTER: {
23
15
  id: string;
24
- description: string;
25
- defaultMessage: string;
26
16
  };
27
17
  PARLIMENT_MEMBER: {
28
18
  id: string;
29
- description: string;
30
- defaultMessage: string;
31
19
  };
32
20
  CENTRAL_BANK_MEMBER: {
33
21
  id: string;
34
- description: string;
35
- defaultMessage: string;
36
22
  };
37
23
  BOARD_MEMBER_POLITICAL_PARTY: {
38
24
  id: string;
39
- description: string;
40
- defaultMessage: string;
41
25
  };
42
26
  JUDGE_SUPREME_COURT: {
43
27
  id: string;
44
- description: string;
45
- defaultMessage: string;
46
28
  };
47
29
  JUDGE_OTHER_HIGH_COURT: {
48
30
  id: string;
49
- description: string;
50
- defaultMessage: string;
51
31
  };
52
32
  REVISION_INSTITUTE: {
53
33
  id: string;
54
- description: string;
55
- defaultMessage: string;
56
34
  };
57
35
  AMBASSADOR: {
58
36
  id: string;
59
- description: string;
60
- defaultMessage: string;
61
37
  };
62
38
  MILITARY_OFFICER: {
63
39
  id: string;
64
- description: string;
65
- defaultMessage: string;
66
40
  };
67
41
  GOVERNMENT_COMPANY: {
68
42
  id: string;
69
- description: string;
70
- defaultMessage: string;
71
43
  };
72
44
  EU_HIGH_RANKING_POSITION: {
73
45
  id: string;
74
- description: string;
75
- defaultMessage: string;
76
46
  };
77
47
  HIGH_RANKING_POSITION_INTERNALTIONAL_CORP: {
78
48
  id: string;
79
- description: string;
80
- defaultMessage: string;
81
49
  };
82
50
  };
83
51
  export declare const militaryMessages: {
84
52
  header: {
85
53
  id: string;
86
- description: string;
87
- defaultMessage: string;
88
54
  };
89
55
  placeholder: {
90
56
  id: string;
91
- description: string;
92
- defaultMessage: string;
93
57
  };
94
58
  required: {
95
59
  id: string;
96
- description: string;
97
- defaultMessage: string;
98
60
  };
99
61
  GENERAL: {
100
62
  id: string;
101
- description: string;
102
- defaultMessage: string;
103
63
  };
104
64
  LIEUTENANT_GENERAL: {
105
65
  id: string;
106
- description: string;
107
- defaultMessage: string;
108
66
  };
109
67
  MAJOR_GENERAL: {
110
68
  id: string;
111
- description: string;
112
- defaultMessage: string;
113
69
  };
114
70
  ADMIRAL: {
115
71
  id: string;
116
- description: string;
117
- defaultMessage: string;
118
72
  };
119
73
  VICE_ADMIRAL: {
120
74
  id: string;
121
- description: string;
122
- defaultMessage: string;
123
75
  };
124
76
  REAR_ADMIRAL: {
125
77
  id: string;
126
- description: string;
127
- defaultMessage: string;
128
78
  };
129
79
  };
130
80
  export declare const ambassadorMessages: {
131
81
  header: {
132
82
  id: string;
133
- description: string;
134
- defaultMessage: string;
135
83
  };
136
84
  required: {
137
85
  id: string;
138
- description: string;
139
- defaultMessage: string;
140
86
  };
141
87
  };
142
88
  export declare const governmentCompanyMessages: {
143
89
  nameHeader: {
144
90
  id: string;
145
- description: string;
146
- defaultMessage: string;
147
91
  };
148
92
  nameRequired: {
149
93
  id: string;
150
- description: string;
151
- defaultMessage: string;
152
94
  };
153
95
  roleHeader: {
154
96
  id: string;
155
- description: string;
156
- defaultMessage: string;
157
97
  };
158
98
  roleRequired: {
159
99
  id: string;
160
- description: string;
161
- defaultMessage: string;
162
100
  };
163
101
  };
164
102
  export declare const intCompanyMessages: {
165
103
  nameHeader: {
166
104
  id: string;
167
- description: string;
168
- defaultMessage: string;
169
105
  };
170
106
  nameRequired: {
171
107
  id: string;
172
- description: string;
173
- defaultMessage: string;
174
108
  };
175
109
  roleHeader: {
176
110
  id: string;
177
- description: string;
178
- defaultMessage: string;
179
111
  };
180
112
  roleRequired: {
181
113
  id: string;
182
- description: string;
183
- defaultMessage: string;
184
114
  };
185
115
  };