@lysaab/lysa-pep 1.0.0-0 → 1.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.
- package/README.md +0 -0
- package/lib/Exports.d.ts +8 -7
- package/lib/Exports.js +8 -7
- package/lib/components/CountrySelect.d.ts +22 -15
- package/lib/components/CountrySelect.js +21 -30
- package/lib/components/PepAnswers.d.ts +8 -8
- package/lib/components/PepAnswers.js +39 -131
- package/lib/components/PepAnswers.scss +0 -0
- 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 +380 -0
- package/lib/model/PepTexts.js +552 -0
- package/lib/pages/PepContext.d.ts +80 -80
- package/lib/pages/PepContext.js +88 -88
- package/lib/pages/PepIsPepPage.d.ts +15 -0
- package/lib/pages/PepIsPepPage.js +59 -0
- package/lib/pages/{StatusPage/StatusPage.d.ts → PepRelationPage.d.ts} +6 -6
- package/lib/pages/PepRelationPage.js +79 -0
- package/lib/pages/PepRolePage.d.ts +10 -0
- package/lib/pages/PepRolePage.js +127 -0
- package/lib/pages/{RelationPage/RelationPage.d.ts → PepStatusPage.d.ts} +6 -6
- package/lib/pages/PepStatusPage.js +58 -0
- package/package.json +10 -13
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -0
- package/public/robots.txt +0 -0
- package/src/App.css +0 -0
- package/src/App.test.tsx +0 -0
- package/src/App.tsx +0 -0
- package/src/Exports.ts +8 -7
- package/src/components/CountrySelect.tsx +10 -14
- package/src/components/PepAnswers.scss +0 -0
- package/src/components/PepAnswers.tsx +34 -166
- package/src/demo/Done.tsx +6 -2
- package/src/demo/Pep.tsx +81 -87
- package/src/index.css +0 -0
- package/src/index.tsx +0 -0
- package/src/logo.svg +0 -0
- package/src/model/Countries.ts +0 -0
- package/src/model/PepModel.ts +0 -0
- package/src/model/PepTexts.ts +607 -0
- package/src/pages/PepContext.tsx +0 -0
- package/src/pages/PepIsPepPage.tsx +107 -0
- package/src/pages/PepRelationPage.tsx +188 -0
- package/src/pages/PepRolePage.tsx +272 -0
- package/src/pages/PepStatusPage.tsx +157 -0
- package/src/react-app-env.d.ts +0 -0
- package/src/serviceWorker.ts +0 -0
- package/tsconfig.json +0 -0
- package/tsconfig_build.json +0 -0
- package/.vscode/settings.json +0 -3
- package/lib/pages/IsPep/IsPepMessages.d.ts +0 -32
- package/lib/pages/IsPep/IsPepMessages.js +0 -74
- package/lib/pages/IsPep/IsPepPage.d.ts +0 -14
- package/lib/pages/IsPep/IsPepPage.js +0 -39
- package/lib/pages/RelationPage/RelationMessages.d.ts +0 -105
- package/lib/pages/RelationPage/RelationMessages.js +0 -282
- package/lib/pages/RelationPage/RelationPage.js +0 -142
- package/lib/pages/RolePage/RoleMessages.d.ts +0 -185
- package/lib/pages/RolePage/RoleMessages.js +0 -381
- package/lib/pages/RolePage/RolePage.d.ts +0 -11
- package/lib/pages/RolePage/RolePage.js +0 -214
- package/lib/pages/StatusPage/StatusMessages.d.ts +0 -72
- package/lib/pages/StatusPage/StatusMessages.js +0 -74
- package/lib/pages/StatusPage/StatusPage.js +0 -75
- package/src/pages/IsPep/IsPepMessages.ts +0 -75
- package/src/pages/IsPep/IsPepPage.tsx +0 -94
- package/src/pages/RelationPage/RelationMessages.ts +0 -287
- package/src/pages/RelationPage/RelationPage.tsx +0 -269
- package/src/pages/RolePage/RoleMessages.ts +0 -389
- package/src/pages/RolePage/RolePage.tsx +0 -342
- package/src/pages/StatusPage/StatusMessages.ts +0 -80
- package/src/pages/StatusPage/StatusPage.tsx +0 -172
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from "react-intl";
|
|
2
|
-
import { Role, MilitaryRank } from "../PepContext";
|
|
3
|
-
export const roleMessages = defineMessages({
|
|
4
|
-
header: {
|
|
5
|
-
id: "pep.role.roles.header",
|
|
6
|
-
description: "Header",
|
|
7
|
-
defaultMessage: `{
|
|
8
|
-
entityType, select,
|
|
9
|
-
PERSON {
|
|
10
|
-
{
|
|
11
|
-
pepType, select,
|
|
12
|
-
ME {
|
|
13
|
-
Ange din roll
|
|
14
|
-
}
|
|
15
|
-
RELATIVE {
|
|
16
|
-
{
|
|
17
|
-
relation, select,
|
|
18
|
-
MARRIED_PARTNER {
|
|
19
|
-
Ange tjänst/roll för din make/maka
|
|
20
|
-
}
|
|
21
|
-
COLIVING_PARTNER {
|
|
22
|
-
Ange tjänst/roll för din sambo
|
|
23
|
-
}
|
|
24
|
-
CHILD {
|
|
25
|
-
Ange tjänst/roll för din förälder
|
|
26
|
-
}
|
|
27
|
-
PARENT {
|
|
28
|
-
Ange tjänst/roll för din barn
|
|
29
|
-
}
|
|
30
|
-
CHILD_MARRIED_PARTNER {
|
|
31
|
-
Ange tjänst/roll för föräldern till din make/maka
|
|
32
|
-
}
|
|
33
|
-
CHILD_COLIVING_PARTNER {
|
|
34
|
-
Ange tjänst/roll för föräldern till din sambo
|
|
35
|
-
}
|
|
36
|
-
other {}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
COLLEAGUE {
|
|
40
|
-
{
|
|
41
|
-
relation, select,
|
|
42
|
-
CO_OWNERSHIP {
|
|
43
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till
|
|
44
|
-
}
|
|
45
|
-
CLOSE_CONNECTION {
|
|
46
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till
|
|
47
|
-
}
|
|
48
|
-
COMPANY_FOR_PEP {
|
|
49
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som du har en relation till
|
|
50
|
-
}
|
|
51
|
-
other {}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
other {}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
CORPORATION {
|
|
58
|
-
{
|
|
59
|
-
pepType, select,
|
|
60
|
-
ME {
|
|
61
|
-
Ange {name} roll
|
|
62
|
-
}
|
|
63
|
-
RELATIVE {
|
|
64
|
-
{
|
|
65
|
-
relation, select,
|
|
66
|
-
MARRIED_PARTNER {
|
|
67
|
-
Ange tjänst/roll för {name} make/maka
|
|
68
|
-
}
|
|
69
|
-
COLIVING_PARTNER {
|
|
70
|
-
Ange tjänst/roll för {name} sambo
|
|
71
|
-
}
|
|
72
|
-
CHILD {
|
|
73
|
-
Ange tjänst/roll för {name} förälder
|
|
74
|
-
}
|
|
75
|
-
PARENT {
|
|
76
|
-
Ange tjänst/roll för {name} barn
|
|
77
|
-
}
|
|
78
|
-
CHILD_MARRIED_PARTNER {
|
|
79
|
-
Ange tjänst/roll för föräldern till {name} make/maka
|
|
80
|
-
}
|
|
81
|
-
CHILD_COLIVING_PARTNER {
|
|
82
|
-
Ange tjänst/roll för föräldern till {name} sambo
|
|
83
|
-
}
|
|
84
|
-
other {}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
COLLEAGUE {
|
|
88
|
-
{
|
|
89
|
-
relation, select,
|
|
90
|
-
CO_OWNERSHIP {
|
|
91
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till
|
|
92
|
-
}
|
|
93
|
-
CLOSE_CONNECTION {
|
|
94
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till
|
|
95
|
-
}
|
|
96
|
-
COMPANY_FOR_PEP {
|
|
97
|
-
Ange tjänst/roll för personen i politisk utsatt ställning som {name} har en relation till
|
|
98
|
-
}
|
|
99
|
-
other {}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
other {}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
other {}
|
|
106
|
-
}`
|
|
107
|
-
},
|
|
108
|
-
placeholder: {
|
|
109
|
-
id: "pep.role.roles.placeholder",
|
|
110
|
-
description: "Role placeholder",
|
|
111
|
-
defaultMessage: "Välj en roll"
|
|
112
|
-
},
|
|
113
|
-
required: {
|
|
114
|
-
id: "pep.role.roles.required",
|
|
115
|
-
description: "Required validation error",
|
|
116
|
-
defaultMessage: "Du måste välja roll"
|
|
117
|
-
},
|
|
118
|
-
[Role.HEAD_OF_GOVERNMENT]: {
|
|
119
|
-
id: "pep.role.roles.alt.HEAD_OF_GOVERNMENT",
|
|
120
|
-
description: "Head of government alt",
|
|
121
|
-
defaultMessage: "Stats eller regeringschef"
|
|
122
|
-
},
|
|
123
|
-
[Role.MINISTER]: {
|
|
124
|
-
id: "pep.role.roles.alt.MINISTER",
|
|
125
|
-
description: "Minister alt",
|
|
126
|
-
defaultMessage: "Minister eller Vice/Biträdande minister"
|
|
127
|
-
},
|
|
128
|
-
[Role.PARLIMENT_MEMBER]: {
|
|
129
|
-
id: "pep.role.roles.alt.PARLIMENT_MEMBER",
|
|
130
|
-
description: "Parlament alt",
|
|
131
|
-
defaultMessage: "Ledamot i parlament eller riksdag"
|
|
132
|
-
},
|
|
133
|
-
[Role.CENTRAL_BANK_MEMBER]: {
|
|
134
|
-
id: "pep.role.roles.alt.CENTRAL_BANK_MEMBER",
|
|
135
|
-
description: "Central bank member alt",
|
|
136
|
-
defaultMessage: "Ledamot i centralbanks styrande organ"
|
|
137
|
-
},
|
|
138
|
-
[Role.BOARD_MEMBER_POLITICAL_PARTY]: {
|
|
139
|
-
id: "pep.role.roles.alt.BOARD_MEMBER_POLITICAL_PARTY",
|
|
140
|
-
description: "Political party board member alt",
|
|
141
|
-
defaultMessage: "Ledamot för styrelsen i politiskt parti representerade i riksdagen"
|
|
142
|
-
},
|
|
143
|
-
[Role.JUDGE_SUPREME_COURT]: {
|
|
144
|
-
id: "pep.role.roles.alt.JUDGE_SUPREME_COURT",
|
|
145
|
-
description: "Supreme court judge alt",
|
|
146
|
-
defaultMessage: "Domare i högsta domstolen"
|
|
147
|
-
},
|
|
148
|
-
[Role.JUDGE_OTHER_HIGH_COURT]: {
|
|
149
|
-
id: "pep.role.roles.alt.JUDGE_OTHER_HIGH_COURT",
|
|
150
|
-
description: "High court judge alt",
|
|
151
|
-
defaultMessage: "Domare i konstitutionell domstol eller annat rättsligt organ på hög nivå vars beslut endast undantagsvis kan överklagas"
|
|
152
|
-
},
|
|
153
|
-
[Role.REVISION_INSTITUTE]: {
|
|
154
|
-
id: "pep.role.roles.alt.REVISION_INSTITUTE",
|
|
155
|
-
description: "Revision institute worker alt",
|
|
156
|
-
defaultMessage: "Högre tjänsteman vid revisionsmyndighet"
|
|
157
|
-
},
|
|
158
|
-
[Role.AMBASSADOR]: {
|
|
159
|
-
id: "pep.role.roles.alt.AMBASSADOR",
|
|
160
|
-
description: "Ambassador alt",
|
|
161
|
-
defaultMessage: "Ambassadör eller bestickningschef"
|
|
162
|
-
},
|
|
163
|
-
[Role.MILITARY_OFFICER]: {
|
|
164
|
-
id: "pep.role.roles.alt.MILITARY_OFFICER",
|
|
165
|
-
description: "Military officer alt",
|
|
166
|
-
defaultMessage: "Högre officer i försvarsmakt"
|
|
167
|
-
},
|
|
168
|
-
[Role.GOVERNMENT_COMPANY]: {
|
|
169
|
-
id: "pep.role.roles.alt.GOVERNMENT_COMPANY",
|
|
170
|
-
description: "Government company leader alt",
|
|
171
|
-
defaultMessage: "Person som ingår i statsägt företags förvaltnings-, lednings eller kontrollorgan"
|
|
172
|
-
},
|
|
173
|
-
[Role.EU_HIGH_RANKING_POSITION]: {
|
|
174
|
-
id: "pep.role.roles.alt.EU_HIGH_RANKING_POSITION",
|
|
175
|
-
description: "High ranking EU position alt",
|
|
176
|
-
defaultMessage: "EU-parlamentariker"
|
|
177
|
-
},
|
|
178
|
-
[Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP]: {
|
|
179
|
-
id: "pep.role.roles.alt.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP",
|
|
180
|
-
description: "High ranking position in an international organisation alt",
|
|
181
|
-
defaultMessage: "Befattning på hög nivå i en internationell organisation"
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
export const militaryMessages = defineMessages({
|
|
185
|
-
header: {
|
|
186
|
-
id: "pep.role.military.name.header",
|
|
187
|
-
description: "International company name header",
|
|
188
|
-
defaultMessage: `{
|
|
189
|
-
entityType, select,
|
|
190
|
-
PERSON {
|
|
191
|
-
{
|
|
192
|
-
pepType, select,
|
|
193
|
-
ME {
|
|
194
|
-
Ange din grad
|
|
195
|
-
}
|
|
196
|
-
RELATIVE {
|
|
197
|
-
{
|
|
198
|
-
relation, select,
|
|
199
|
-
MARRIED_PARTNER {
|
|
200
|
-
Ange din make/maka/registrerade partners grad
|
|
201
|
-
}
|
|
202
|
-
COLIVING_PARTNER {
|
|
203
|
-
Ange din sambos grad
|
|
204
|
-
}
|
|
205
|
-
CHILD {
|
|
206
|
-
Ange din förälders grad
|
|
207
|
-
}
|
|
208
|
-
PARENT {
|
|
209
|
-
Ange ditt barns grad
|
|
210
|
-
}
|
|
211
|
-
CHILD_MARRIED_PARTNER {
|
|
212
|
-
Ange din make/makas förälders grad
|
|
213
|
-
}
|
|
214
|
-
CHILD_COLIVING_PARTNER {
|
|
215
|
-
Ange din sambos grad
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
COLLEAGUE {
|
|
220
|
-
{
|
|
221
|
-
relation, select,
|
|
222
|
-
CO_OWNERSHIP {
|
|
223
|
-
Ange grad för personen som har bestämmande rätt över företaget
|
|
224
|
-
}
|
|
225
|
-
CLOSE_CONNECTION {
|
|
226
|
-
Ange grad för personen som du har eller har haft nära förbindelse
|
|
227
|
-
}
|
|
228
|
-
COMPANY_FOR_PEP {
|
|
229
|
-
Vilken grad har personen
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
other {}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
CORPORATION {
|
|
237
|
-
{
|
|
238
|
-
pepType, select,
|
|
239
|
-
ME {
|
|
240
|
-
Ange din grad
|
|
241
|
-
}
|
|
242
|
-
RELATIVE {
|
|
243
|
-
{
|
|
244
|
-
relation, select,
|
|
245
|
-
MARRIED_PARTNER {
|
|
246
|
-
Ange {name} make/maka/registrerade partners grad
|
|
247
|
-
}
|
|
248
|
-
COLIVING_PARTNER {
|
|
249
|
-
Ange {name} sambos grad
|
|
250
|
-
}
|
|
251
|
-
CHILD {
|
|
252
|
-
Ange {name} förälders grad
|
|
253
|
-
}
|
|
254
|
-
PARENT {
|
|
255
|
-
Ange {name} barns grad
|
|
256
|
-
}
|
|
257
|
-
CHILD_MARRIED_PARTNER {
|
|
258
|
-
Ange {name} make/makas förälders grad
|
|
259
|
-
}
|
|
260
|
-
CHILD_COLIVING_PARTNER {
|
|
261
|
-
Ange {name} sambos grad
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
COLLEAGUE {
|
|
266
|
-
{
|
|
267
|
-
relation, select,
|
|
268
|
-
CO_OWNERSHIP {
|
|
269
|
-
Ange grad för personen som har bestämmande rätt över företaget
|
|
270
|
-
}
|
|
271
|
-
CLOSE_CONNECTION {
|
|
272
|
-
Ange grad för personen som {name} har eller har haft nära förbindelse
|
|
273
|
-
}
|
|
274
|
-
COMPANY_FOR_PEP {
|
|
275
|
-
Vilken grad har personen
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
other {}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
other {}
|
|
283
|
-
}`
|
|
284
|
-
},
|
|
285
|
-
placeholder: {
|
|
286
|
-
id: "pep.role.military.header",
|
|
287
|
-
description: "Header",
|
|
288
|
-
defaultMessage: "Välj en roll"
|
|
289
|
-
},
|
|
290
|
-
required: {
|
|
291
|
-
id: "pep.role.military.required",
|
|
292
|
-
description: "Required validation error",
|
|
293
|
-
defaultMessage: "Du måste välja roll"
|
|
294
|
-
},
|
|
295
|
-
[MilitaryRank.GENERAL]: {
|
|
296
|
-
id: "pep.role.military.alt.GENERAL",
|
|
297
|
-
description: "General alt",
|
|
298
|
-
defaultMessage: "General"
|
|
299
|
-
},
|
|
300
|
-
[MilitaryRank.LIEUTENANT_GENERAL]: {
|
|
301
|
-
id: "pep.role.military.alt.LIEUTENANT_GENERAL",
|
|
302
|
-
description: "Lieutenant general alt",
|
|
303
|
-
defaultMessage: "Generallöjtnant"
|
|
304
|
-
},
|
|
305
|
-
[MilitaryRank.MAJOR_GENERAL]: {
|
|
306
|
-
id: "pep.role.military.alt.MAJOR_GENERAL",
|
|
307
|
-
description: "Major general alt",
|
|
308
|
-
defaultMessage: "Generalmajor"
|
|
309
|
-
},
|
|
310
|
-
[MilitaryRank.ADMIRAL]: {
|
|
311
|
-
id: "pep.role.military.alt.ADMIRAL",
|
|
312
|
-
description: "Admiral alt",
|
|
313
|
-
defaultMessage: "Amiral"
|
|
314
|
-
},
|
|
315
|
-
[MilitaryRank.VICE_ADMIRAL]: {
|
|
316
|
-
id: "pep.role.military.alt.VICE_ADMIRAL",
|
|
317
|
-
description: "Vice admiral alt",
|
|
318
|
-
defaultMessage: "Viceamiral"
|
|
319
|
-
},
|
|
320
|
-
[MilitaryRank.REAR_ADMIRAL]: {
|
|
321
|
-
id: "pep.role.military.alt.REAR_ADMIRAL",
|
|
322
|
-
description: "Rear admiral alt",
|
|
323
|
-
defaultMessage: "Konteramiral"
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
export const ambassadorMessages = defineMessages({
|
|
327
|
-
header: {
|
|
328
|
-
id: "pep.role.ambassador.header",
|
|
329
|
-
description: "Ambassador header",
|
|
330
|
-
defaultMessage: "Ange land"
|
|
331
|
-
},
|
|
332
|
-
required: {
|
|
333
|
-
id: "pep.role.ambassador.required",
|
|
334
|
-
description: "Ambassador required error",
|
|
335
|
-
defaultMessage: "Du måste välja land"
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
export const governmentCompanyMessages = defineMessages({
|
|
339
|
-
nameHeader: {
|
|
340
|
-
id: "pep.role.governmentCompany.name.header",
|
|
341
|
-
description: "Government company name header",
|
|
342
|
-
defaultMessage: "Ange namnet på företaget"
|
|
343
|
-
},
|
|
344
|
-
nameRequired: {
|
|
345
|
-
id: "pep.role.governmentCompany.name.required",
|
|
346
|
-
description: "Government company name required error",
|
|
347
|
-
defaultMessage: "Du måste ange ett namn"
|
|
348
|
-
},
|
|
349
|
-
roleHeader: {
|
|
350
|
-
id: "pep.role.governmentCompany.role.header",
|
|
351
|
-
description: "Government company role header",
|
|
352
|
-
defaultMessage: "Ange tjänst/roll"
|
|
353
|
-
},
|
|
354
|
-
roleRequired: {
|
|
355
|
-
id: "pep.role.governmentCompany.role.required",
|
|
356
|
-
description: "Government company role required error",
|
|
357
|
-
defaultMessage: "Du måste ange roll"
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
export const intCompanyMessages = defineMessages({
|
|
361
|
-
nameHeader: {
|
|
362
|
-
id: "pep.role.intCompany.name.header",
|
|
363
|
-
description: "International company name header",
|
|
364
|
-
defaultMessage: "Ange organisationens namn"
|
|
365
|
-
},
|
|
366
|
-
nameRequired: {
|
|
367
|
-
id: "pep.role.intCompany.name.required",
|
|
368
|
-
description: "International company name required error",
|
|
369
|
-
defaultMessage: "Du måste ange ett namn"
|
|
370
|
-
},
|
|
371
|
-
roleHeader: {
|
|
372
|
-
id: "pep.role.intCompany.role.header",
|
|
373
|
-
description: "International company role header",
|
|
374
|
-
defaultMessage: "Ange tjänst/roll"
|
|
375
|
-
},
|
|
376
|
-
roleRequired: {
|
|
377
|
-
id: "pep.role.intCompany.role.required",
|
|
378
|
-
description: "International company role required error",
|
|
379
|
-
defaultMessage: "Du måste ange roll"
|
|
380
|
-
}
|
|
381
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from "react";
|
|
2
|
-
import { Alternative } from "@lysaab/ui-2/components/input/InputAPI";
|
|
3
|
-
import { Role, MilitaryRank } from "../PepContext";
|
|
4
|
-
import { IntlShape } from "react-intl";
|
|
5
|
-
interface Props {
|
|
6
|
-
next: () => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const RolePage: FunctionComponent<Props>;
|
|
9
|
-
export declare function getRoleAlts(intl: IntlShape): Alternative<Role>[];
|
|
10
|
-
export declare function getMilitaryAlts(intl: IntlShape): Alternative<MilitaryRank>[];
|
|
11
|
-
export {};
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useCallback, useContext } from "react";
|
|
2
|
-
import { Form, PrimaryButton, RequiredValidator, TextInput, Select } from "@lysaab/ui-2";
|
|
3
|
-
import { PepContext, Role, MilitaryRank, PepType, EntityType } from "../PepContext";
|
|
4
|
-
import { CountrySelect } from "../../components/CountrySelect";
|
|
5
|
-
import { useIntl, FormattedMessage } from "react-intl";
|
|
6
|
-
import { roleMessages, ambassadorMessages, governmentCompanyMessages, intCompanyMessages, militaryMessages } from "./RoleMessages";
|
|
7
|
-
export const RolePage = ({ next }) => {
|
|
8
|
-
const pepContext = useContext(PepContext);
|
|
9
|
-
const formRef = useRef();
|
|
10
|
-
const intl = useIntl();
|
|
11
|
-
const entityType = pepContext.state.legalEntityType || EntityType.PERSON;
|
|
12
|
-
const type = pepContext.state.type;
|
|
13
|
-
const roleAlternatives = getRoleAlts(intl);
|
|
14
|
-
const militaryAlternatives = getMilitaryAlts(intl);
|
|
15
|
-
const nextPage = useCallback(() => {
|
|
16
|
-
if (formRef.current && formRef.current.isValid) {
|
|
17
|
-
next();
|
|
18
|
-
}
|
|
19
|
-
}, [formRef, next]);
|
|
20
|
-
const resetRoleFields = useCallback(() => {
|
|
21
|
-
pepContext.setState({
|
|
22
|
-
ambassadorCountry: undefined,
|
|
23
|
-
governmentCompany: undefined,
|
|
24
|
-
governmentCompanyRole: undefined,
|
|
25
|
-
internationalOrganisation: undefined,
|
|
26
|
-
internationalOrganisationRole: undefined,
|
|
27
|
-
militaryRank: undefined
|
|
28
|
-
});
|
|
29
|
-
}, [pepContext]);
|
|
30
|
-
if (!type || type === PepType.NOT_PEP) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
console.log({
|
|
34
|
-
entityType,
|
|
35
|
-
pepType: type,
|
|
36
|
-
relation: pepContext.state.relationToPEP || pepContext.state.businessRelation
|
|
37
|
-
});
|
|
38
|
-
return (React.createElement(Form, { onSubmit: () => nextPage(), lysaFormRef: formRef },
|
|
39
|
-
React.createElement(Select, { label: intl.formatMessage(roleMessages.header, {
|
|
40
|
-
entityType,
|
|
41
|
-
pepType: type,
|
|
42
|
-
relation: pepContext.state.relationToPEP || pepContext.state.businessRelation,
|
|
43
|
-
name: pepContext.state.ownerName
|
|
44
|
-
}), placeholder: intl.formatMessage(roleMessages.placeholder), alternatives: roleAlternatives, value: roleAlternatives.find(alt => alt.value === pepContext.state.role), onChange: event => {
|
|
45
|
-
pepContext.setState({ role: event.value });
|
|
46
|
-
resetRoleFields();
|
|
47
|
-
}, validators: [
|
|
48
|
-
RequiredValidator(intl.formatMessage(roleMessages.required))
|
|
49
|
-
] }),
|
|
50
|
-
pepContext.state.role && pepContext.state.role === Role.AMBASSADOR ? (React.createElement(CountrySelect, { label: intl.formatMessage(ambassadorMessages.header, {
|
|
51
|
-
entityType,
|
|
52
|
-
pepType: type,
|
|
53
|
-
relation: pepContext.state.relationToPEP ||
|
|
54
|
-
pepContext.state.businessRelation,
|
|
55
|
-
name: pepContext.state.ownerName
|
|
56
|
-
}), onChange: event => pepContext.setState({
|
|
57
|
-
ambassadorCountry: event.value
|
|
58
|
-
? event.value.toString()
|
|
59
|
-
: undefined
|
|
60
|
-
}), value: pepContext.state.ambassadorCountry, validators: [
|
|
61
|
-
RequiredValidator(intl.formatMessage(ambassadorMessages.required))
|
|
62
|
-
] })) : null,
|
|
63
|
-
pepContext.state.role &&
|
|
64
|
-
pepContext.state.role === Role.GOVERNMENT_COMPANY ? (React.createElement(React.Fragment, null,
|
|
65
|
-
React.createElement(TextInput, { label: intl.formatMessage(governmentCompanyMessages.nameHeader, {
|
|
66
|
-
entityType,
|
|
67
|
-
pepType: type,
|
|
68
|
-
relation: pepContext.state.relationToPEP ||
|
|
69
|
-
pepContext.state.businessRelation,
|
|
70
|
-
name: pepContext.state.ownerName
|
|
71
|
-
}), value: pepContext.state.governmentCompany || "", onChange: value => {
|
|
72
|
-
pepContext.setState({ governmentCompany: value });
|
|
73
|
-
}, validators: [
|
|
74
|
-
RequiredValidator(intl.formatMessage(governmentCompanyMessages.nameRequired))
|
|
75
|
-
] }),
|
|
76
|
-
React.createElement(TextInput, { label: intl.formatMessage(governmentCompanyMessages.roleHeader, {
|
|
77
|
-
entityType,
|
|
78
|
-
pepType: type,
|
|
79
|
-
relation: pepContext.state.relationToPEP ||
|
|
80
|
-
pepContext.state.businessRelation,
|
|
81
|
-
name: pepContext.state.ownerName
|
|
82
|
-
}), value: pepContext.state.governmentCompanyRole || "", onChange: value => {
|
|
83
|
-
pepContext.setState({
|
|
84
|
-
governmentCompanyRole: value
|
|
85
|
-
});
|
|
86
|
-
}, validators: [
|
|
87
|
-
RequiredValidator(intl.formatMessage(governmentCompanyMessages.roleRequired))
|
|
88
|
-
] }))) : null,
|
|
89
|
-
pepContext.state.role &&
|
|
90
|
-
pepContext.state.role ===
|
|
91
|
-
Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP ? (React.createElement(React.Fragment, null,
|
|
92
|
-
React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.nameHeader, {
|
|
93
|
-
entityType,
|
|
94
|
-
pepType: type,
|
|
95
|
-
relation: pepContext.state.relationToPEP ||
|
|
96
|
-
pepContext.state.businessRelation,
|
|
97
|
-
name: pepContext.state.ownerName
|
|
98
|
-
}), value: pepContext.state.internationalOrganisation || "", onChange: value => {
|
|
99
|
-
pepContext.setState({ internationalOrganisation: value });
|
|
100
|
-
}, validators: [
|
|
101
|
-
RequiredValidator(intl.formatMessage(intCompanyMessages.nameRequired))
|
|
102
|
-
] }),
|
|
103
|
-
React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.roleHeader, {
|
|
104
|
-
entityType,
|
|
105
|
-
pepType: type,
|
|
106
|
-
relation: pepContext.state.relationToPEP ||
|
|
107
|
-
pepContext.state.businessRelation,
|
|
108
|
-
name: pepContext.state.ownerName
|
|
109
|
-
}), value: pepContext.state.internationalOrganisationRole || "", onChange: value => {
|
|
110
|
-
pepContext.setState({
|
|
111
|
-
internationalOrganisationRole: value
|
|
112
|
-
});
|
|
113
|
-
}, validators: [
|
|
114
|
-
RequiredValidator(intl.formatMessage(intCompanyMessages.roleRequired))
|
|
115
|
-
] }))) : null,
|
|
116
|
-
pepContext.state.role &&
|
|
117
|
-
pepContext.state.role === Role.MILITARY_OFFICER ? (React.createElement(Select, { label: intl.formatMessage(militaryMessages.header, {
|
|
118
|
-
entityType,
|
|
119
|
-
pepType: type,
|
|
120
|
-
relation: pepContext.state.relationToPEP ||
|
|
121
|
-
pepContext.state.businessRelation,
|
|
122
|
-
name: pepContext.state.ownerName
|
|
123
|
-
}), placeholder: intl.formatMessage(militaryMessages.placeholder), alternatives: militaryAlternatives, value: militaryAlternatives.find(alt => alt.value === pepContext.state.militaryRank), onChange: event => {
|
|
124
|
-
pepContext.setState({ militaryRank: event.value });
|
|
125
|
-
}, validators: [
|
|
126
|
-
RequiredValidator(intl.formatMessage(militaryMessages.required))
|
|
127
|
-
] })) : null,
|
|
128
|
-
React.createElement(PrimaryButton, { type: "submit" },
|
|
129
|
-
React.createElement(FormattedMessage, { id: "pep.role.next", description: "Next button", defaultMessage: "G\u00E5 vidare" }))));
|
|
130
|
-
};
|
|
131
|
-
export function getRoleAlts(intl) {
|
|
132
|
-
return [
|
|
133
|
-
{
|
|
134
|
-
text: intl.formatMessage(roleMessages[Role.HEAD_OF_GOVERNMENT]),
|
|
135
|
-
value: Role.HEAD_OF_GOVERNMENT
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
text: intl.formatMessage(roleMessages[Role.MINISTER]),
|
|
139
|
-
value: Role.MINISTER
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
text: intl.formatMessage(roleMessages[Role.PARLIMENT_MEMBER]),
|
|
143
|
-
value: Role.PARLIMENT_MEMBER
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
text: intl.formatMessage(roleMessages[Role.CENTRAL_BANK_MEMBER]),
|
|
147
|
-
value: Role.CENTRAL_BANK_MEMBER
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
text: intl.formatMessage(roleMessages[Role.BOARD_MEMBER_POLITICAL_PARTY]),
|
|
151
|
-
value: Role.BOARD_MEMBER_POLITICAL_PARTY
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
text: intl.formatMessage(roleMessages[Role.JUDGE_SUPREME_COURT]),
|
|
155
|
-
value: Role.JUDGE_SUPREME_COURT
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
text: intl.formatMessage(roleMessages[Role.JUDGE_OTHER_HIGH_COURT]),
|
|
159
|
-
value: Role.JUDGE_OTHER_HIGH_COURT
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
text: intl.formatMessage(roleMessages[Role.REVISION_INSTITUTE]),
|
|
163
|
-
value: Role.REVISION_INSTITUTE
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
text: intl.formatMessage(roleMessages[Role.AMBASSADOR]),
|
|
167
|
-
value: Role.AMBASSADOR
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
text: intl.formatMessage(roleMessages[Role.MILITARY_OFFICER]),
|
|
171
|
-
value: Role.MILITARY_OFFICER
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
text: intl.formatMessage(roleMessages[Role.GOVERNMENT_COMPANY]),
|
|
175
|
-
value: Role.GOVERNMENT_COMPANY
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
text: intl.formatMessage(roleMessages[Role.EU_HIGH_RANKING_POSITION]),
|
|
179
|
-
value: Role.EU_HIGH_RANKING_POSITION
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
text: intl.formatMessage(roleMessages[Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP]),
|
|
183
|
-
value: Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP
|
|
184
|
-
}
|
|
185
|
-
];
|
|
186
|
-
}
|
|
187
|
-
export function getMilitaryAlts(intl) {
|
|
188
|
-
return [
|
|
189
|
-
{
|
|
190
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.GENERAL]),
|
|
191
|
-
value: MilitaryRank.GENERAL
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.LIEUTENANT_GENERAL]),
|
|
195
|
-
value: MilitaryRank.LIEUTENANT_GENERAL
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.MAJOR_GENERAL]),
|
|
199
|
-
value: MilitaryRank.MAJOR_GENERAL
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.ADMIRAL]),
|
|
203
|
-
value: MilitaryRank.ADMIRAL
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.VICE_ADMIRAL]),
|
|
207
|
-
value: MilitaryRank.VICE_ADMIRAL
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
text: intl.formatMessage(militaryMessages[MilitaryRank.REAR_ADMIRAL]),
|
|
211
|
-
value: MilitaryRank.REAR_ADMIRAL
|
|
212
|
-
}
|
|
213
|
-
];
|
|
214
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare const isOngoingMessages: {
|
|
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
|
-
};
|
|
13
|
-
export declare const endedMessages: {
|
|
14
|
-
header: {
|
|
15
|
-
id: string;
|
|
16
|
-
description: string;
|
|
17
|
-
defaultMessage: string;
|
|
18
|
-
};
|
|
19
|
-
required: {
|
|
20
|
-
id: string;
|
|
21
|
-
description: string;
|
|
22
|
-
defaultMessage: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export declare const isLocalCountryMessages: {
|
|
26
|
-
header: {
|
|
27
|
-
id: string;
|
|
28
|
-
description: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
};
|
|
31
|
-
required: {
|
|
32
|
-
id: string;
|
|
33
|
-
description: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export declare const countrySelectionMessages: {
|
|
38
|
-
header: {
|
|
39
|
-
id: string;
|
|
40
|
-
description: string;
|
|
41
|
-
defaultMessage: string;
|
|
42
|
-
};
|
|
43
|
-
required: {
|
|
44
|
-
id: string;
|
|
45
|
-
description: string;
|
|
46
|
-
defaultMessage: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export declare const localCountryAltMessages: {
|
|
50
|
-
localCountry: {
|
|
51
|
-
id: string;
|
|
52
|
-
description: string;
|
|
53
|
-
defaultMessage: string;
|
|
54
|
-
};
|
|
55
|
-
otherCountry: {
|
|
56
|
-
id: string;
|
|
57
|
-
description: string;
|
|
58
|
-
defaultMessage: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export declare const stateAltMessages: {
|
|
62
|
-
ONGOING: {
|
|
63
|
-
id: string;
|
|
64
|
-
description: string;
|
|
65
|
-
defaultMessage: string;
|
|
66
|
-
};
|
|
67
|
-
ENDED: {
|
|
68
|
-
id: string;
|
|
69
|
-
description: string;
|
|
70
|
-
defaultMessage: string;
|
|
71
|
-
};
|
|
72
|
-
};
|