@lysaab/lysa-pep 5.0.0 → 5.1.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.
@@ -1,222 +1,222 @@
1
- import React, { useRef, useCallback, useContext, } from "react";
2
- import { Form, PrimaryButton, RequiredValidator, TextInput, Select, Card, CountrySelect, } from "@lysaab/ui-2";
3
- import { PepContext, Role, MilitaryRank, PepType, EntityType, } from "../PepContext";
4
- import { useIntl, FormattedMessage, } from "react-intl";
5
- import { roleMessages, ambassadorMessages, governmentCompanyMessages, intCompanyMessages, militaryMessages, } from "./RoleMessages";
6
- import { formatPossessive } from "../../utils/Possession";
7
- export const RolePage = ({ language, 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
- return (React.createElement(Form, { onSubmit: () => nextPage(), lysaFormRef: formRef },
34
- React.createElement(Card, null,
35
- React.createElement(Select, { label: intl.formatMessage(roleMessages.header, {
36
- entityType,
37
- pepType: type,
38
- relation: pepContext.state.type === PepType.COLLEAGUE
39
- ? pepContext.state.businessRelation
40
- : pepContext.state.relationToPEP,
41
- name: pepContext.state.ownerName,
42
- possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
43
- }), placeholder: intl.formatMessage(roleMessages.placeholder), alternatives: roleAlternatives, value: roleAlternatives.find((alt) => alt.value === pepContext.state.role), onChange: (event) => {
44
- pepContext.setState({ role: event.value });
45
- resetRoleFields();
46
- }, validators: [
47
- new RequiredValidator(intl.formatMessage(roleMessages.required)),
48
- ] }),
49
- pepContext.state.role && pepContext.state.role === Role.AMBASSADOR ? (React.createElement(CountrySelect, { label: intl.formatMessage(ambassadorMessages.header, {
50
- entityType,
51
- pepType: type,
52
- relation: pepContext.state.type === PepType.COLLEAGUE
53
- ? pepContext.state.businessRelation
54
- : pepContext.state.relationToPEP,
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
- new RequiredValidator(intl.formatMessage(ambassadorMessages.required)),
62
- ], language: language, placeholder: intl.formatMessage(ambassadorMessages.placeholder) })) : 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.type === PepType.COLLEAGUE
69
- ? pepContext.state.businessRelation
70
- : pepContext.state.relationToPEP,
71
- name: pepContext.state.ownerName,
72
- }), value: pepContext.state.governmentCompany || "", onChange: (value) => {
73
- pepContext.setState({ governmentCompany: value });
74
- }, validators: [
75
- new RequiredValidator(intl.formatMessage(governmentCompanyMessages.nameRequired)),
76
- ] }),
77
- React.createElement(TextInput, { label: intl.formatMessage(governmentCompanyMessages.roleHeader, {
78
- entityType,
79
- pepType: type,
80
- relation: pepContext.state.type === PepType.COLLEAGUE
81
- ? pepContext.state.businessRelation
82
- : pepContext.state.relationToPEP,
83
- name: pepContext.state.ownerName,
84
- }), value: pepContext.state.governmentCompanyRole || "", onChange: (value) => {
85
- pepContext.setState({
86
- governmentCompanyRole: value,
87
- });
88
- }, validators: [
89
- new RequiredValidator(intl.formatMessage(governmentCompanyMessages.roleRequired)),
90
- ] }))) : null,
91
- pepContext.state.role &&
92
- pepContext.state.role ===
93
- Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP ? (React.createElement(React.Fragment, null,
94
- React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.nameHeader, {
95
- entityType,
96
- pepType: type,
97
- relation: pepContext.state.type === PepType.COLLEAGUE
98
- ? pepContext.state.businessRelation
99
- : pepContext.state.relationToPEP,
100
- name: pepContext.state.ownerName,
101
- }), value: pepContext.state.internationalOrganisation || "", onChange: (value) => {
102
- pepContext.setState({ internationalOrganisation: value });
103
- }, validators: [
104
- new RequiredValidator(intl.formatMessage(intCompanyMessages.nameRequired)),
105
- ] }),
106
- React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.roleHeader, {
107
- entityType,
108
- pepType: type,
109
- relation: pepContext.state.type === PepType.COLLEAGUE
110
- ? pepContext.state.businessRelation
111
- : pepContext.state.relationToPEP,
112
- name: pepContext.state.ownerName,
113
- }), value: pepContext.state.internationalOrganisationRole || "", onChange: (value) => {
114
- pepContext.setState({
115
- internationalOrganisationRole: value,
116
- });
117
- }, validators: [
118
- new RequiredValidator(intl.formatMessage(intCompanyMessages.roleRequired)),
119
- ] }))) : null,
120
- pepContext.state.role &&
121
- pepContext.state.role === Role.MILITARY_OFFICER ? (React.createElement(Select, { label: intl.formatMessage(militaryMessages.header, {
122
- entityType,
123
- pepType: type,
124
- relation: pepContext.state.type === PepType.COLLEAGUE
125
- ? pepContext.state.businessRelation
126
- : pepContext.state.relationToPEP,
127
- name: pepContext.state.ownerName,
128
- possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
129
- }), placeholder: intl.formatMessage(militaryMessages.placeholder), alternatives: militaryAlternatives, value: militaryAlternatives.find((alt) => alt.value === pepContext.state.militaryRank), onChange: (event) => {
130
- pepContext.setState({
131
- militaryRank: event.value,
132
- });
133
- }, validators: [
134
- new RequiredValidator(intl.formatMessage(militaryMessages.required)),
135
- ] })) : null),
136
- React.createElement(PrimaryButton, { block: true, type: "submit" },
137
- React.createElement(FormattedMessage, { id: "pep.role.next" }))));
138
- };
139
- export function getRoleAlts(intl) {
140
- return [
141
- {
142
- text: intl.formatMessage(roleMessages[Role.HEAD_OF_GOVERNMENT]),
143
- value: Role.HEAD_OF_GOVERNMENT,
144
- },
145
- {
146
- text: intl.formatMessage(roleMessages[Role.MINISTER]),
147
- value: Role.MINISTER,
148
- },
149
- {
150
- text: intl.formatMessage(roleMessages[Role.PARLIMENT_MEMBER]),
151
- value: Role.PARLIMENT_MEMBER,
152
- },
153
- {
154
- text: intl.formatMessage(roleMessages[Role.CENTRAL_BANK_MEMBER]),
155
- value: Role.CENTRAL_BANK_MEMBER,
156
- },
157
- {
158
- text: intl.formatMessage(roleMessages[Role.BOARD_MEMBER_POLITICAL_PARTY]),
159
- value: Role.BOARD_MEMBER_POLITICAL_PARTY,
160
- },
161
- {
162
- text: intl.formatMessage(roleMessages[Role.JUDGE_SUPREME_COURT]),
163
- value: Role.JUDGE_SUPREME_COURT,
164
- },
165
- {
166
- text: intl.formatMessage(roleMessages[Role.JUDGE_OTHER_HIGH_COURT]),
167
- value: Role.JUDGE_OTHER_HIGH_COURT,
168
- },
169
- {
170
- text: intl.formatMessage(roleMessages[Role.REVISION_INSTITUTE]),
171
- value: Role.REVISION_INSTITUTE,
172
- },
173
- {
174
- text: intl.formatMessage(roleMessages[Role.AMBASSADOR]),
175
- value: Role.AMBASSADOR,
176
- },
177
- {
178
- text: intl.formatMessage(roleMessages[Role.MILITARY_OFFICER]),
179
- value: Role.MILITARY_OFFICER,
180
- },
181
- {
182
- text: intl.formatMessage(roleMessages[Role.GOVERNMENT_COMPANY]),
183
- value: Role.GOVERNMENT_COMPANY,
184
- },
185
- {
186
- text: intl.formatMessage(roleMessages[Role.EU_HIGH_RANKING_POSITION]),
187
- value: Role.EU_HIGH_RANKING_POSITION,
188
- },
189
- {
190
- text: intl.formatMessage(roleMessages[Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP]),
191
- value: Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP,
192
- },
193
- ];
194
- }
195
- export function getMilitaryAlts(intl) {
196
- return [
197
- {
198
- text: intl.formatMessage(militaryMessages[MilitaryRank.GENERAL]),
199
- value: MilitaryRank.GENERAL,
200
- },
201
- {
202
- text: intl.formatMessage(militaryMessages[MilitaryRank.LIEUTENANT_GENERAL]),
203
- value: MilitaryRank.LIEUTENANT_GENERAL,
204
- },
205
- {
206
- text: intl.formatMessage(militaryMessages[MilitaryRank.MAJOR_GENERAL]),
207
- value: MilitaryRank.MAJOR_GENERAL,
208
- },
209
- {
210
- text: intl.formatMessage(militaryMessages[MilitaryRank.ADMIRAL]),
211
- value: MilitaryRank.ADMIRAL,
212
- },
213
- {
214
- text: intl.formatMessage(militaryMessages[MilitaryRank.VICE_ADMIRAL]),
215
- value: MilitaryRank.VICE_ADMIRAL,
216
- },
217
- {
218
- text: intl.formatMessage(militaryMessages[MilitaryRank.REAR_ADMIRAL]),
219
- value: MilitaryRank.REAR_ADMIRAL,
220
- },
221
- ];
222
- }
1
+ import React, { useRef, useCallback, useContext, } from "react";
2
+ import { Form, PrimaryButton, RequiredValidator, TextInput, Select, Card, CountrySelect, } from "@lysaab/ui-2";
3
+ import { PepContext, Role, MilitaryRank, PepType, EntityType, } from "../PepContext";
4
+ import { useIntl, FormattedMessage } from "react-intl";
5
+ import { roleMessages, ambassadorMessages, governmentCompanyMessages, intCompanyMessages, militaryMessages, } from "./RoleMessages";
6
+ import { formatPossessive } from "../../utils/Possession";
7
+ export const RolePage = ({ language, 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
+ return (React.createElement(Form, { onSubmit: () => nextPage(), lysaFormRef: formRef },
34
+ React.createElement(Card, null,
35
+ React.createElement(Select, { label: intl.formatMessage(roleMessages.header, {
36
+ entityType,
37
+ pepType: type,
38
+ relation: pepContext.state.type === PepType.COLLEAGUE
39
+ ? pepContext.state.businessRelation
40
+ : pepContext.state.relationToPEP,
41
+ name: pepContext.state.ownerName,
42
+ possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
43
+ }), placeholder: intl.formatMessage(roleMessages.placeholder), alternatives: roleAlternatives, value: roleAlternatives.find((alt) => alt.value === pepContext.state.role), onChange: (event) => {
44
+ pepContext.setState({ role: event.value });
45
+ resetRoleFields();
46
+ }, validators: [
47
+ new RequiredValidator(intl.formatMessage(roleMessages.required)),
48
+ ] }),
49
+ pepContext.state.role && pepContext.state.role === Role.AMBASSADOR ? (React.createElement(CountrySelect, { label: intl.formatMessage(ambassadorMessages.header, {
50
+ entityType,
51
+ pepType: type,
52
+ relation: pepContext.state.type === PepType.COLLEAGUE
53
+ ? pepContext.state.businessRelation
54
+ : pepContext.state.relationToPEP,
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
+ new RequiredValidator(intl.formatMessage(ambassadorMessages.required)),
62
+ ], language: language, placeholder: intl.formatMessage(ambassadorMessages.placeholder) })) : 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.type === PepType.COLLEAGUE
69
+ ? pepContext.state.businessRelation
70
+ : pepContext.state.relationToPEP,
71
+ name: pepContext.state.ownerName,
72
+ }), value: pepContext.state.governmentCompany || "", onChange: (value) => {
73
+ pepContext.setState({ governmentCompany: value });
74
+ }, validators: [
75
+ new RequiredValidator(intl.formatMessage(governmentCompanyMessages.nameRequired)),
76
+ ] }),
77
+ React.createElement(TextInput, { label: intl.formatMessage(governmentCompanyMessages.roleHeader, {
78
+ entityType,
79
+ pepType: type,
80
+ relation: pepContext.state.type === PepType.COLLEAGUE
81
+ ? pepContext.state.businessRelation
82
+ : pepContext.state.relationToPEP,
83
+ name: pepContext.state.ownerName,
84
+ }), value: pepContext.state.governmentCompanyRole || "", onChange: (value) => {
85
+ pepContext.setState({
86
+ governmentCompanyRole: value,
87
+ });
88
+ }, validators: [
89
+ new RequiredValidator(intl.formatMessage(governmentCompanyMessages.roleRequired)),
90
+ ] }))) : null,
91
+ pepContext.state.role &&
92
+ pepContext.state.role ===
93
+ Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP ? (React.createElement(React.Fragment, null,
94
+ React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.nameHeader, {
95
+ entityType,
96
+ pepType: type,
97
+ relation: pepContext.state.type === PepType.COLLEAGUE
98
+ ? pepContext.state.businessRelation
99
+ : pepContext.state.relationToPEP,
100
+ name: pepContext.state.ownerName,
101
+ }), value: pepContext.state.internationalOrganisation || "", onChange: (value) => {
102
+ pepContext.setState({ internationalOrganisation: value });
103
+ }, validators: [
104
+ new RequiredValidator(intl.formatMessage(intCompanyMessages.nameRequired)),
105
+ ] }),
106
+ React.createElement(TextInput, { label: intl.formatMessage(intCompanyMessages.roleHeader, {
107
+ entityType,
108
+ pepType: type,
109
+ relation: pepContext.state.type === PepType.COLLEAGUE
110
+ ? pepContext.state.businessRelation
111
+ : pepContext.state.relationToPEP,
112
+ name: pepContext.state.ownerName,
113
+ }), value: pepContext.state.internationalOrganisationRole || "", onChange: (value) => {
114
+ pepContext.setState({
115
+ internationalOrganisationRole: value,
116
+ });
117
+ }, validators: [
118
+ new RequiredValidator(intl.formatMessage(intCompanyMessages.roleRequired)),
119
+ ] }))) : null,
120
+ pepContext.state.role &&
121
+ pepContext.state.role === Role.MILITARY_OFFICER ? (React.createElement(Select, { label: intl.formatMessage(militaryMessages.header, {
122
+ entityType,
123
+ pepType: type,
124
+ relation: pepContext.state.type === PepType.COLLEAGUE
125
+ ? pepContext.state.businessRelation
126
+ : pepContext.state.relationToPEP,
127
+ name: pepContext.state.ownerName,
128
+ possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
129
+ }), placeholder: intl.formatMessage(militaryMessages.placeholder), alternatives: militaryAlternatives, value: militaryAlternatives.find((alt) => alt.value === pepContext.state.militaryRank), onChange: (event) => {
130
+ pepContext.setState({
131
+ militaryRank: event.value,
132
+ });
133
+ }, validators: [
134
+ new RequiredValidator(intl.formatMessage(militaryMessages.required)),
135
+ ] })) : null),
136
+ React.createElement(PrimaryButton, { block: true, type: "submit" },
137
+ React.createElement(FormattedMessage, { id: "pep.role.next" }))));
138
+ };
139
+ export function getRoleAlts(intl) {
140
+ return [
141
+ {
142
+ text: intl.formatMessage(roleMessages[Role.HEAD_OF_GOVERNMENT]),
143
+ value: Role.HEAD_OF_GOVERNMENT,
144
+ },
145
+ {
146
+ text: intl.formatMessage(roleMessages[Role.MINISTER]),
147
+ value: Role.MINISTER,
148
+ },
149
+ {
150
+ text: intl.formatMessage(roleMessages[Role.PARLIMENT_MEMBER]),
151
+ value: Role.PARLIMENT_MEMBER,
152
+ },
153
+ {
154
+ text: intl.formatMessage(roleMessages[Role.CENTRAL_BANK_MEMBER]),
155
+ value: Role.CENTRAL_BANK_MEMBER,
156
+ },
157
+ {
158
+ text: intl.formatMessage(roleMessages[Role.BOARD_MEMBER_POLITICAL_PARTY]),
159
+ value: Role.BOARD_MEMBER_POLITICAL_PARTY,
160
+ },
161
+ {
162
+ text: intl.formatMessage(roleMessages[Role.JUDGE_SUPREME_COURT]),
163
+ value: Role.JUDGE_SUPREME_COURT,
164
+ },
165
+ {
166
+ text: intl.formatMessage(roleMessages[Role.JUDGE_OTHER_HIGH_COURT]),
167
+ value: Role.JUDGE_OTHER_HIGH_COURT,
168
+ },
169
+ {
170
+ text: intl.formatMessage(roleMessages[Role.REVISION_INSTITUTE]),
171
+ value: Role.REVISION_INSTITUTE,
172
+ },
173
+ {
174
+ text: intl.formatMessage(roleMessages[Role.AMBASSADOR]),
175
+ value: Role.AMBASSADOR,
176
+ },
177
+ {
178
+ text: intl.formatMessage(roleMessages[Role.MILITARY_OFFICER]),
179
+ value: Role.MILITARY_OFFICER,
180
+ },
181
+ {
182
+ text: intl.formatMessage(roleMessages[Role.GOVERNMENT_COMPANY]),
183
+ value: Role.GOVERNMENT_COMPANY,
184
+ },
185
+ {
186
+ text: intl.formatMessage(roleMessages[Role.EU_HIGH_RANKING_POSITION]),
187
+ value: Role.EU_HIGH_RANKING_POSITION,
188
+ },
189
+ {
190
+ text: intl.formatMessage(roleMessages[Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP]),
191
+ value: Role.HIGH_RANKING_POSITION_INTERNALTIONAL_CORP,
192
+ },
193
+ ];
194
+ }
195
+ export function getMilitaryAlts(intl) {
196
+ return [
197
+ {
198
+ text: intl.formatMessage(militaryMessages[MilitaryRank.GENERAL]),
199
+ value: MilitaryRank.GENERAL,
200
+ },
201
+ {
202
+ text: intl.formatMessage(militaryMessages[MilitaryRank.LIEUTENANT_GENERAL]),
203
+ value: MilitaryRank.LIEUTENANT_GENERAL,
204
+ },
205
+ {
206
+ text: intl.formatMessage(militaryMessages[MilitaryRank.MAJOR_GENERAL]),
207
+ value: MilitaryRank.MAJOR_GENERAL,
208
+ },
209
+ {
210
+ text: intl.formatMessage(militaryMessages[MilitaryRank.ADMIRAL]),
211
+ value: MilitaryRank.ADMIRAL,
212
+ },
213
+ {
214
+ text: intl.formatMessage(militaryMessages[MilitaryRank.VICE_ADMIRAL]),
215
+ value: MilitaryRank.VICE_ADMIRAL,
216
+ },
217
+ {
218
+ text: intl.formatMessage(militaryMessages[MilitaryRank.REAR_ADMIRAL]),
219
+ value: MilitaryRank.REAR_ADMIRAL,
220
+ },
221
+ ];
222
+ }
@@ -1,51 +1,51 @@
1
- export declare const isOngoingMessages: {
2
- header: {
3
- id: string;
4
- };
5
- required: {
6
- id: string;
7
- };
8
- };
9
- export declare const endedMessages: {
10
- header: {
11
- id: string;
12
- };
13
- required: {
14
- id: string;
15
- };
16
- };
17
- export declare const isLocalCountryMessages: {
18
- header: {
19
- id: string;
20
- };
21
- required: {
22
- id: string;
23
- };
24
- };
25
- export declare const countrySelectionMessages: {
26
- header: {
27
- id: string;
28
- };
29
- required: {
30
- id: string;
31
- };
32
- placeholder: {
33
- id: string;
34
- };
35
- };
36
- export declare const localCountryAltMessages: {
37
- localCountry: {
38
- id: string;
39
- };
40
- otherCountry: {
41
- id: string;
42
- };
43
- };
44
- export declare const stateAltMessages: {
45
- ONGOING: {
46
- id: string;
47
- };
48
- ENDED: {
49
- id: string;
50
- };
51
- };
1
+ export declare const isOngoingMessages: {
2
+ header: {
3
+ id: string;
4
+ };
5
+ required: {
6
+ id: string;
7
+ };
8
+ };
9
+ export declare const endedMessages: {
10
+ header: {
11
+ id: string;
12
+ };
13
+ required: {
14
+ id: string;
15
+ };
16
+ };
17
+ export declare const isLocalCountryMessages: {
18
+ header: {
19
+ id: string;
20
+ };
21
+ required: {
22
+ id: string;
23
+ };
24
+ };
25
+ export declare const countrySelectionMessages: {
26
+ header: {
27
+ id: string;
28
+ };
29
+ required: {
30
+ id: string;
31
+ };
32
+ placeholder: {
33
+ id: string;
34
+ };
35
+ };
36
+ export declare const localCountryAltMessages: {
37
+ localCountry: {
38
+ id: string;
39
+ };
40
+ otherCountry: {
41
+ id: string;
42
+ };
43
+ };
44
+ export declare const stateAltMessages: {
45
+ ONGOING: {
46
+ id: string;
47
+ };
48
+ ENDED: {
49
+ id: string;
50
+ };
51
+ };
@@ -1,53 +1,53 @@
1
- import { defineMessages } from "react-intl";
2
- import { PepStatus } from "../PepContext";
3
- export const isOngoingMessages = defineMessages({
4
- header: {
5
- id: "pep.status.isongoing.header",
6
- },
7
- required: {
8
- id: "pep.status.isongoing.required",
9
- },
10
- });
11
- export const endedMessages = defineMessages({
12
- header: {
13
- id: "pep.status.ended.header",
14
- },
15
- required: {
16
- id: "pep.status.ended.required",
17
- },
18
- });
19
- export const isLocalCountryMessages = defineMessages({
20
- header: {
21
- id: "pep.status.localcountry.header",
22
- },
23
- required: {
24
- id: "pep.status.localcountry.required",
25
- },
26
- });
27
- export const countrySelectionMessages = defineMessages({
28
- header: {
29
- id: "pep.status.countryselecton.header",
30
- },
31
- required: {
32
- id: "pep.status.countryselecton.required",
33
- },
34
- placeholder: {
35
- id: "pep.status.countryselection.placeholder"
36
- }
37
- });
38
- export const localCountryAltMessages = defineMessages({
39
- localCountry: {
40
- id: "pep.status.localcountryalt.local",
41
- },
42
- otherCountry: {
43
- id: "pep.status.othercountryalt.other",
44
- },
45
- });
46
- export const stateAltMessages = defineMessages({
47
- [PepStatus.ONGOING]: {
48
- id: "pep.status.state.ONGOING",
49
- },
50
- [PepStatus.ENDED]: {
51
- id: "pep.status.state.ENDED",
52
- },
53
- });
1
+ import { defineMessages } from "react-intl";
2
+ import { PepStatus } from "../PepContext";
3
+ export const isOngoingMessages = defineMessages({
4
+ header: {
5
+ id: "pep.status.isongoing.header",
6
+ },
7
+ required: {
8
+ id: "pep.status.isongoing.required",
9
+ },
10
+ });
11
+ export const endedMessages = defineMessages({
12
+ header: {
13
+ id: "pep.status.ended.header",
14
+ },
15
+ required: {
16
+ id: "pep.status.ended.required",
17
+ },
18
+ });
19
+ export const isLocalCountryMessages = defineMessages({
20
+ header: {
21
+ id: "pep.status.localcountry.header",
22
+ },
23
+ required: {
24
+ id: "pep.status.localcountry.required",
25
+ },
26
+ });
27
+ export const countrySelectionMessages = defineMessages({
28
+ header: {
29
+ id: "pep.status.countryselecton.header",
30
+ },
31
+ required: {
32
+ id: "pep.status.countryselecton.required",
33
+ },
34
+ placeholder: {
35
+ id: "pep.status.countryselection.placeholder"
36
+ }
37
+ });
38
+ export const localCountryAltMessages = defineMessages({
39
+ localCountry: {
40
+ id: "pep.status.localcountryalt.local",
41
+ },
42
+ otherCountry: {
43
+ id: "pep.status.othercountryalt.other",
44
+ },
45
+ });
46
+ export const stateAltMessages = defineMessages({
47
+ [PepStatus.ONGOING]: {
48
+ id: "pep.status.state.ONGOING",
49
+ },
50
+ [PepStatus.ENDED]: {
51
+ id: "pep.status.state.ENDED",
52
+ },
53
+ });