@lysaab/lysa-pep 1.0.4-0 → 1.0.6-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 (90) hide show
  1. package/{lib/Exports.d.ts → Exports.d.ts} +7 -7
  2. package/{lib/Exports.js → Exports.js} +7 -7
  3. package/{lib/components → components}/CountrySelect.d.ts +15 -15
  4. package/{lib/components → components}/CountrySelect.js +30 -30
  5. package/{lib/components → components}/PepAnswers.d.ts +8 -8
  6. package/{lib/components → components}/PepAnswers.js +131 -131
  7. package/{lib/components → components}/PepAnswers.scss +7 -7
  8. package/messages/src/components/CountrySelect.json +1 -0
  9. package/messages/src/components/PepAnswers.json +1 -0
  10. package/messages/src/pages/IsPep/IsPepMessages.json +1 -0
  11. package/messages/src/pages/IsPep/IsPepPage.json +1 -0
  12. package/messages/src/pages/RelationPage/RelationMessages.json +1 -0
  13. package/messages/src/pages/RelationPage/RelationPage.json +1 -0
  14. package/messages/src/pages/RolePage/RoleMessages.json +1 -0
  15. package/messages/src/pages/RolePage/RolePage.json +1 -0
  16. package/messages/src/pages/StatusPage/StatusMessages.json +1 -0
  17. package/messages/src/pages/StatusPage/StatusPage.json +1 -0
  18. package/{lib/model → model}/Countries.d.ts +4 -4
  19. package/{lib/model → model}/Countries.js +1002 -1002
  20. package/model/PepModel.d.ts +7 -0
  21. package/{lib/model → model}/PepModel.js +40 -40
  22. package/{lib/model → model}/PepTexts.d.ts +380 -322
  23. package/{lib/model → model}/PepTexts.js +552 -467
  24. package/package.json +71 -57
  25. package/{lib/pages → pages}/IsPep/IsPepMessages.d.ts +32 -32
  26. package/{lib/pages → pages}/IsPep/IsPepMessages.js +66 -66
  27. package/{lib/pages → pages}/IsPep/IsPepPage.d.ts +14 -14
  28. package/{lib/pages → pages}/IsPep/IsPepPage.js +60 -60
  29. package/{lib/pages → pages}/PepContext.d.ts +80 -80
  30. package/{lib/pages → pages}/PepContext.js +88 -88
  31. package/pages/PepIsPepPage.d.ts +15 -0
  32. package/{lib/pages → pages}/PepIsPepPage.js +59 -57
  33. package/{lib/pages → pages}/PepRelationPage.d.ts +6 -6
  34. package/{lib/pages → pages}/PepRelationPage.js +79 -83
  35. package/{lib/pages → pages}/PepRolePage.d.ts +10 -9
  36. package/{lib/pages → pages}/PepRolePage.js +127 -127
  37. package/{lib/pages → pages}/PepStatusPage.d.ts +6 -6
  38. package/pages/PepStatusPage.js +58 -0
  39. package/{lib/pages → pages}/RelationPage/RelationMessages.d.ts +105 -105
  40. package/{lib/pages → pages}/RelationPage/RelationMessages.js +283 -283
  41. package/{lib/pages → pages}/RelationPage/RelationPage.d.ts +6 -6
  42. package/{lib/pages → pages}/RelationPage/RelationPage.js +154 -154
  43. package/{lib/pages → pages}/RolePage/RoleMessages.d.ts +185 -185
  44. package/{lib/pages → pages}/RolePage/RoleMessages.js +385 -385
  45. package/{lib/pages → pages}/RolePage/RolePage.d.ts +11 -11
  46. package/{lib/pages → pages}/RolePage/RolePage.js +223 -223
  47. package/{lib/pages → pages}/StatusPage/StatusMessages.d.ts +72 -72
  48. package/{lib/pages → pages}/StatusPage/StatusMessages.js +266 -266
  49. package/{lib/pages → pages}/StatusPage/StatusPage.d.ts +8 -6
  50. package/{lib/pages → pages}/StatusPage/StatusPage.js +103 -98
  51. package/{lib/utils → utils}/Possession.d.ts +1 -1
  52. package/{lib/utils → utils}/Possession.js +18 -18
  53. package/.vscode/settings.json +0 -4
  54. package/lib/model/PepModel.d.ts +0 -7
  55. package/lib/pages/PepIsPepPage.d.ts +0 -6
  56. package/lib/pages/PepStatusPage.js +0 -57
  57. package/public/favicon.ico +0 -0
  58. package/public/index.html +0 -43
  59. package/public/logo192.png +0 -0
  60. package/public/logo512.png +0 -0
  61. package/public/manifest.json +0 -25
  62. package/public/robots.txt +0 -2
  63. package/src/App.css +0 -3
  64. package/src/App.test.tsx +0 -9
  65. package/src/App.tsx +0 -25
  66. package/src/Exports.ts +0 -12
  67. package/src/components/CountrySelect.tsx +0 -47
  68. package/src/components/PepAnswers.scss +0 -7
  69. package/src/components/PepAnswers.tsx +0 -252
  70. package/src/demo/Done.tsx +0 -16
  71. package/src/demo/Pep.tsx +0 -112
  72. package/src/index.css +0 -13
  73. package/src/index.tsx +0 -12
  74. package/src/logo.svg +0 -1
  75. package/src/model/Countries.ts +0 -1002
  76. package/src/model/PepModel.ts +0 -52
  77. package/src/pages/IsPep/IsPepMessages.ts +0 -67
  78. package/src/pages/IsPep/IsPepPage.tsx +0 -118
  79. package/src/pages/PepContext.tsx +0 -144
  80. package/src/pages/RelationPage/RelationMessages.ts +0 -288
  81. package/src/pages/RelationPage/RelationPage.tsx +0 -304
  82. package/src/pages/RolePage/RoleMessages.ts +0 -393
  83. package/src/pages/RolePage/RolePage.tsx +0 -361
  84. package/src/pages/StatusPage/StatusMessages.ts +0 -272
  85. package/src/pages/StatusPage/StatusPage.tsx +0 -213
  86. package/src/react-app-env.d.ts +0 -1
  87. package/src/serviceWorker.ts +0 -143
  88. package/src/utils/Possession.ts +0 -21
  89. package/tsconfig.json +0 -25
  90. package/tsconfig_build.json +0 -19
package/package.json CHANGED
@@ -1,57 +1,71 @@
1
- {
2
- "name": "@lysaab/lysa-pep",
3
- "author": "Lysa AB",
4
- "version": "1.0.4-0",
5
- "main": "./lib/Exports.js",
6
- "dependencies": {
7
- "@types/luxon": "^1.15.2",
8
- "@types/react-intl": "^3.0.0",
9
- "luxon": "^1.21.1",
10
- "react-intl": "^4.1.1"
11
- },
12
- "devDependencies": {
13
- "@lysaab/ui-2": "^20.0.0",
14
- "@types/jest": "24.0.20",
15
- "@types/luxon": "^1.15.2",
16
- "@types/node": "12.11.7",
17
- "@types/react": "^16.9.23",
18
- "@types/react-dom": "^16.9.5",
19
- "copyfiles": "^2.1.1",
20
- "luxon": "^1.21.1",
21
- "react": "^16.13.0",
22
- "react-dom": "^16.13.0",
23
- "react-scripts": "^3.4.0",
24
- "typescript": "^3.7.2"
25
- },
26
- "peerDependencies": {
27
- "@lysaab/ui-2": "^20.0.0"
28
- },
29
- "scripts": {
30
- "start": "react-scripts start",
31
- "build": "react-scripts build",
32
- "test": "react-scripts test",
33
- "eject": "react-scripts eject",
34
- "build:lib": "tsc -p ./tsconfig_build.json ",
35
- "copyscss": "copyfiles -u 1 \"src/components/**/*.scss\" lib/",
36
- "release:patch": "npm run build:lib && npm run copyscss && npm version patch && npm publish",
37
- "release:minor": "npm run build:lib && npm run copyscss && npm version minor && npm publish",
38
- "release:major": "npm run build:lib && npm run copyscss && npm version major && npm publish",
39
- "release:premajor": "npm run build:lib && npm run copyscss && npm version premajor && npm publish",
40
- "release:prepatch": "npm run build:lib && npm run copyscss && npm version prepatch && npm publish"
41
- },
42
- "eslintConfig": {
43
- "extends": "react-app"
44
- },
45
- "browserslist": {
46
- "production": [
47
- ">0.2%",
48
- "not dead",
49
- "not op_mini all"
50
- ],
51
- "development": [
52
- "last 1 chrome version",
53
- "last 1 firefox version",
54
- "last 1 safari version"
55
- ]
56
- }
57
- }
1
+ {
2
+ "name": "@lysaab/lysa-pep",
3
+ "author": "Lysa AB",
4
+ "version": "1.0.6-0",
5
+ "main": "./Exports.js",
6
+ "dependencies": {
7
+ "@types/luxon": "^1.15.2",
8
+ "@types/react-intl": "^3.0.0",
9
+ "luxon": "^1.21.1",
10
+ "node-sass": "^4.14.1"
11
+ },
12
+ "devDependencies": {
13
+ "@formatjs/cli": "^1.1.22",
14
+ "@lysaab/ui-2": "^20.13.0",
15
+ "@types/jest": "24.0.20",
16
+ "@types/luxon": "^1.15.2",
17
+ "@types/node": "12.11.7",
18
+ "@types/react": "^16.9.23",
19
+ "@types/react-dom": "^16.9.5",
20
+ "copyfiles": "^2.3.0",
21
+ "eslint-plugin-formatjs": "^2.3.13",
22
+ "luxon": "^1.21.1",
23
+ "react": "^16.13.1",
24
+ "react-dom": "^16.13.0",
25
+ "react-router-dom": "^5.2.0",
26
+ "react-intl": "^4.5.12",
27
+ "react-intl-translations-manager": "^5.0.3",
28
+ "react-scripts": "^3.4.0",
29
+ "typescript": "^3.7.2"
30
+ },
31
+ "peerDependencies": {
32
+ "@lysaab/ui-2": "^20.13.0",
33
+ "react": "^16.13.1",
34
+ "react-intl": "^4.5.12",
35
+ "react-router-dom": "^5.2.0"
36
+ },
37
+ "scripts": {
38
+ "start": "react-scripts start",
39
+ "build": "react-scripts build",
40
+ "test": "react-scripts test",
41
+ "eject": "react-scripts eject",
42
+ "build:lib": "tsc -p ./tsconfig_build.json && npm run copyscss",
43
+ "translations:extract": "formatjs extract --messages-dir ./build/messages \"./src/**/*.tsx\" \"./src/**/*.ts\"",
44
+ "translations:manage": "node ./translationRunner.js",
45
+ "translations": "npm run translations:extract && npm run translations:manage",
46
+ "copyscss": "copyfiles -u 1 \"src/components/**/*.scss\" lib/",
47
+ "copymessages": "copyfiles -u 1 \"build/messages/**/*.json\" lib/",
48
+ "copypkgfiles": "cp README.md ./lib/ && cp package.json ./lib/",
49
+ "postversioning": "npm run translations:extract && npm run copymessages && npm run copypkgfiles && cd lib && npm publish",
50
+ "release:patch": "npm run build:lib && npm version patch && npm run postversioning",
51
+ "release:minor": "npm run build:lib && npm version minor && npm run postversioning",
52
+ "release:major": "npm run build:lib && npm version major && npm run postversioning",
53
+ "release:premajor": "npm run build:lib && npm version premajor && npm run postversioning",
54
+ "release:prepatch": "npm run build:lib && npm version prepatch && npm run postversioning"
55
+ },
56
+ "eslintConfig": {
57
+ "extends": "react-app"
58
+ },
59
+ "browserslist": {
60
+ "production": [
61
+ ">0.2%",
62
+ "not dead",
63
+ "not op_mini all"
64
+ ],
65
+ "development": [
66
+ "last 1 chrome version",
67
+ "last 1 firefox version",
68
+ "last 1 safari version"
69
+ ]
70
+ }
71
+ }
@@ -1,32 +1,32 @@
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
+ 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,66 +1,66 @@
1
- import { defineMessages } from "react-intl";
2
- import { PepType } from "../PepContext";
3
- export const messages = defineMessages({
4
- header: {
5
- id: "pep.ispep.header",
6
- description: "Not pep",
7
- defaultMessage: `{
8
- entityType, select,
9
- PERSON {
10
- Är du eller en närstående till dig en person i politisk utsatt ställning? (PEP)
11
- }
12
- CORPORATION {
13
- Är {name} eller en närstående till {name} en person i politisk utsatt ställning? (PEP)
14
- }
15
- }`,
16
- },
17
- required: {
18
- id: "pep.ispep.required",
19
- description: "Not pep",
20
- defaultMessage: "Du måste välja ett alternativ",
21
- },
22
- [PepType.NOT_PEP]: {
23
- id: "pep.ispep.NOT_PEP",
24
- description: "Not pep",
25
- defaultMessage: "Nej",
26
- },
27
- [PepType.ME]: {
28
- id: "pep.ispep.ME",
29
- description: "The person is pep",
30
- defaultMessage: `{
31
- entityType, select,
32
- PERSON {
33
- Jag har en funktion som gör mig till PEP
34
- }
35
- CORPORATION {
36
- På grund av sin funktion är {name} PEP
37
- }
38
- }`,
39
- },
40
- [PepType.RELATIVE]: {
41
- id: "pep.ispep.RELATIVE",
42
- description: "Jag har en relation med en person som är PEP",
43
- defaultMessage: `{
44
- entityType, select,
45
- PERSON {
46
- Jag har en relation med en person som är PEP
47
- }
48
- CORPORATION {
49
- {name} är medarbetare till, eller har en affärsrelation med, en person som är PEP
50
- }
51
- }`,
52
- },
53
- [PepType.COLLEAGUE]: {
54
- id: "pep.ispep.COLLEAGUE",
55
- description: "The person has a colleague that is pep",
56
- defaultMessage: `{
57
- entityType, select,
58
- PERSON {
59
- Jag är medarbetare till, eller har en affärsrelation med, en person som är PEP
60
- }
61
- CORPORATION {
62
- På grund av sin funktion är {name} PEP
63
- }
64
- }`,
65
- },
66
- });
1
+ import { defineMessages } from "react-intl";
2
+ import { PepType } from "../PepContext";
3
+ export const messages = defineMessages({
4
+ header: {
5
+ id: "pep.ispep.header",
6
+ description: "Not pep",
7
+ defaultMessage: `{
8
+ entityType, select,
9
+ PERSON {
10
+ Are you or is a peer close to you a politically exposed person? (PEP)
11
+ }
12
+ CORPORATION {
13
+ Is {name} or a person close to {name} a politically exposed person? (PEP)
14
+ }
15
+ }`,
16
+ },
17
+ required: {
18
+ id: "pep.ispep.required",
19
+ description: "Required validator text",
20
+ defaultMessage: "You need to choose an alternative",
21
+ },
22
+ [PepType.NOT_PEP]: {
23
+ id: "pep.ispep.NOT_PEP",
24
+ description: "Not pep",
25
+ defaultMessage: "No",
26
+ },
27
+ [PepType.ME]: {
28
+ id: "pep.ispep.ME",
29
+ description: "The person is pep",
30
+ defaultMessage: `{
31
+ entityType, select,
32
+ PERSON {
33
+ I have a role which makes me a PEP
34
+ }
35
+ CORPORATION {
36
+ {name} is PEP because of its role
37
+ }
38
+ }`,
39
+ },
40
+ [PepType.RELATIVE]: {
41
+ id: "pep.ispep.RELATIVE",
42
+ description: "I have a relationship with a person that is a PEP",
43
+ defaultMessage: `{
44
+ entityType, select,
45
+ PERSON {
46
+ I have a relationship with a person that is a PEP
47
+ }
48
+ CORPORATION {
49
+ {name} is a coworker to, or has a business relationship with a PEP
50
+ }
51
+ }`,
52
+ },
53
+ [PepType.COLLEAGUE]: {
54
+ id: "pep.ispep.COLLEAGUE",
55
+ description: "The person has a colleague that is a PEP",
56
+ defaultMessage: `{
57
+ entityType, select,
58
+ PERSON {
59
+ I work for, or have a business relationship with, a PEP
60
+ }
61
+ CORPORATION {
62
+ {name} is a PEP because its role
63
+ }
64
+ }`,
65
+ },
66
+ });
@@ -1,14 +1,14 @@
1
- import { FunctionComponent } from "react";
2
- import { PepType, EntityType } from "../PepContext";
3
- export interface ExternalIsPepState {
4
- ownerName: string;
5
- entityType: EntityType;
6
- type?: PepType;
7
- onChange: (type: PepType) => void;
8
- }
9
- interface Props {
10
- next?: () => void;
11
- }
12
- export declare const IsPepRadioGroup: FunctionComponent<ExternalIsPepState>;
13
- export declare const IsPepPage: FunctionComponent<Props>;
14
- export {};
1
+ import { FunctionComponent } from "react";
2
+ import { PepType, EntityType } from "../PepContext";
3
+ export interface ExternalIsPepState {
4
+ ownerName: string;
5
+ entityType: EntityType;
6
+ type?: PepType;
7
+ onChange: (type: PepType) => void;
8
+ }
9
+ interface Props {
10
+ next?: () => void;
11
+ }
12
+ export declare const IsPepRadioGroup: FunctionComponent<ExternalIsPepState>;
13
+ export declare const IsPepPage: FunctionComponent<Props>;
14
+ export {};
@@ -1,60 +1,60 @@
1
- import React, { useRef, useCallback, useContext, } from "react";
2
- import { Form, RadioGroup, RequiredValidator, PrimaryButton, Card, } from "@lysaab/ui-2";
3
- import { PepType, PepContext, EntityType } from "../PepContext";
4
- import { useIntl, FormattedMessage } from "react-intl";
5
- import { messages } from "./IsPepMessages";
6
- export const IsPepRadioGroup = ({ ownerName, entityType, type, onChange, }) => {
7
- const intl = useIntl();
8
- const IsPepAlternatives = [
9
- {
10
- text: intl.formatMessage(messages[PepType.NOT_PEP], {
11
- entityType,
12
- name: ownerName,
13
- }),
14
- value: PepType.NOT_PEP,
15
- },
16
- {
17
- text: intl.formatMessage(messages[PepType.ME], {
18
- entityType,
19
- name: ownerName,
20
- }),
21
- value: PepType.ME,
22
- },
23
- {
24
- text: intl.formatMessage(messages[PepType.RELATIVE], {
25
- entityType,
26
- name: ownerName,
27
- }),
28
- value: PepType.RELATIVE,
29
- },
30
- {
31
- text: intl.formatMessage(messages[PepType.COLLEAGUE], {
32
- entityType,
33
- name: ownerName,
34
- }),
35
- value: PepType.COLLEAGUE,
36
- },
37
- ];
38
- return (React.createElement(RadioGroup, { alternatives: IsPepAlternatives, onChange: (alt) => onChange(alt.value), value: IsPepAlternatives.find((alt) => alt.value === type), header: intl.formatMessage(messages.header, {
39
- entityType,
40
- name: ownerName,
41
- }), validators: [
42
- new RequiredValidator(intl.formatMessage(messages.required)),
43
- ], "data-test-id": "pep-ispep" }));
44
- };
45
- export const IsPepPage = ({ next }) => {
46
- const pepContext = useContext(PepContext);
47
- const formRef = useRef();
48
- const nextPage = useCallback(() => {
49
- if (formRef.current && formRef.current.isValid && next) {
50
- next();
51
- }
52
- }, [formRef, next]);
53
- return (React.createElement(Form, { onSubmit: nextPage, lysaFormRef: formRef },
54
- React.createElement(Card, null,
55
- React.createElement(IsPepRadioGroup, { entityType: pepContext.state.legalEntityType || EntityType.PERSON, ownerName: pepContext.state.ownerName || "", type: pepContext.state.type, onChange: (type) => {
56
- pepContext.setState({ type });
57
- } })),
58
- React.createElement(PrimaryButton, { block: true, type: "submit" },
59
- React.createElement(FormattedMessage, { id: "pep.ispep.next", description: "Next button", defaultMessage: "G\u00E5 vidare" }))));
60
- };
1
+ import React, { useRef, useCallback, useContext, } from "react";
2
+ import { Form, RadioGroup, RequiredValidator, PrimaryButton, Card, } from "@lysaab/ui-2";
3
+ import { PepType, PepContext, EntityType } from "../PepContext";
4
+ import { useIntl, FormattedMessage } from "react-intl";
5
+ import { messages } from "./IsPepMessages";
6
+ export const IsPepRadioGroup = ({ ownerName, entityType, type, onChange, }) => {
7
+ const intl = useIntl();
8
+ const IsPepAlternatives = [
9
+ {
10
+ text: intl.formatMessage(messages[PepType.NOT_PEP], {
11
+ entityType,
12
+ name: ownerName,
13
+ }),
14
+ value: PepType.NOT_PEP,
15
+ },
16
+ {
17
+ text: intl.formatMessage(messages[PepType.ME], {
18
+ entityType,
19
+ name: ownerName,
20
+ }),
21
+ value: PepType.ME,
22
+ },
23
+ {
24
+ text: intl.formatMessage(messages[PepType.RELATIVE], {
25
+ entityType,
26
+ name: ownerName,
27
+ }),
28
+ value: PepType.RELATIVE,
29
+ },
30
+ {
31
+ text: intl.formatMessage(messages[PepType.COLLEAGUE], {
32
+ entityType,
33
+ name: ownerName,
34
+ }),
35
+ value: PepType.COLLEAGUE,
36
+ },
37
+ ];
38
+ return (React.createElement(RadioGroup, { alternatives: IsPepAlternatives, onChange: (alt) => onChange(alt.value), value: IsPepAlternatives.find((alt) => alt.value === type), header: intl.formatMessage(messages.header, {
39
+ entityType,
40
+ name: ownerName,
41
+ }), validators: [
42
+ new RequiredValidator(intl.formatMessage(messages.required)),
43
+ ], "data-test-id": "pep-ispep" }));
44
+ };
45
+ export const IsPepPage = ({ next }) => {
46
+ const pepContext = useContext(PepContext);
47
+ const formRef = useRef();
48
+ const nextPage = useCallback(() => {
49
+ if (formRef.current && formRef.current.isValid && next) {
50
+ next();
51
+ }
52
+ }, [formRef, next]);
53
+ return (React.createElement(Form, { onSubmit: nextPage, lysaFormRef: formRef },
54
+ React.createElement(Card, null,
55
+ React.createElement(IsPepRadioGroup, { entityType: pepContext.state.legalEntityType || EntityType.PERSON, ownerName: pepContext.state.ownerName || "", type: pepContext.state.type, onChange: (type) => {
56
+ pepContext.setState({ type });
57
+ } })),
58
+ React.createElement(PrimaryButton, { block: true, type: "submit" },
59
+ React.createElement(FormattedMessage, { id: "pep.ispep.next", description: "Next button", defaultMessage: "Next" }))));
60
+ };
@@ -1,80 +1,80 @@
1
- import React from "react";
2
- export declare enum EntityType {
3
- PERSON = "PERSON",
4
- CORPORATION = "CORPORATION"
5
- }
6
- export declare enum PepType {
7
- NOT_PEP = "NOT_PEP",
8
- ME = "ME",
9
- RELATIVE = "RELATIVE",
10
- COLLEAGUE = "COLLEAGUE"
11
- }
12
- export declare enum PepStatus {
13
- ONGOING = "ONGOING",
14
- ENDED = "ENDED"
15
- }
16
- export declare enum Role {
17
- HEAD_OF_GOVERNMENT = "HEAD_OF_GOVERNMENT",
18
- MINISTER = "MINISTER",
19
- PARLIMENT_MEMBER = "PARLIMENT_MEMBER",
20
- CENTRAL_BANK_MEMBER = "CENTRAL_BANK_MEMBER",
21
- BOARD_MEMBER_POLITICAL_PARTY = "BOARD_MEMBER_POLITICAL_PARTY",
22
- JUDGE_SUPREME_COURT = "JUDGE_SUPREME_COURT",
23
- JUDGE_OTHER_HIGH_COURT = "JUDGE_OTHER_HIGH_COURT",
24
- REVISION_INSTITUTE = "REVISION_INSTITUTE",
25
- AMBASSADOR = "AMBASSADOR",
26
- MILITARY_OFFICER = "MILITARY_OFFICER",
27
- GOVERNMENT_COMPANY = "GOVERNMENT_COMPANY",
28
- EU_HIGH_RANKING_POSITION = "EU_HIGH_RANKING_POSITION",
29
- HIGH_RANKING_POSITION_INTERNALTIONAL_CORP = "HIGH_RANKING_POSITION_INTERNALTIONAL_CORP"
30
- }
31
- export declare enum Relation {
32
- MARRIED_PARTNER = "MARRIED_PARTNER",
33
- COLIVING_PARTNER = "COLIVING_PARTNER",
34
- CHILD = "CHILD",
35
- PARENT = "PARENT",
36
- CHILD_MARRIED_PARTNER = "CHILD_MARRIED_PARTNER",
37
- CHILD_COLIVING_PARTNER = "CHILD_COLIVING_PARTNER"
38
- }
39
- export declare enum BusinessRelation {
40
- CO_OWNERSHIP = "CO_OWNERSHIP",
41
- CLOSE_CONNECTION = "CLOSE_CONNECTION",
42
- COMPANY_FOR_PEP = "COMPANY_FOR_PEP"
43
- }
44
- export declare enum MilitaryRank {
45
- GENERAL = "GENERAL",
46
- LIEUTENANT_GENERAL = "LIEUTENANT_GENERAL",
47
- MAJOR_GENERAL = "MAJOR_GENERAL",
48
- ADMIRAL = "ADMIRAL",
49
- VICE_ADMIRAL = "VICE_ADMIRAL",
50
- REAR_ADMIRAL = "REAR_ADMIRAL"
51
- }
52
- export interface PepState {
53
- legalEntityType?: EntityType;
54
- type?: PepType;
55
- role?: Role;
56
- country?: string;
57
- ended?: Date;
58
- ambassadorCountry?: string;
59
- militaryRank?: MilitaryRank;
60
- governmentCompany?: string;
61
- governmentCompanyRole?: string;
62
- internationalOrganisation?: string;
63
- internationalOrganisationRole?: string;
64
- relationToPEP?: Relation;
65
- nameOfPEP?: string;
66
- birthdayOfPEP?: Date;
67
- tin?: string;
68
- businessRelation?: BusinessRelation;
69
- isOngoing?: PepStatus;
70
- isSweden?: string;
71
- ownerName?: string;
72
- }
73
- export declare const EMPTY_PEP_STATE: PepState;
74
- export interface PepContextProps {
75
- state: PepState;
76
- setState: (newState: Partial<PepState>) => void;
77
- }
78
- export declare const PepContext: React.Context<PepContextProps>;
79
- export declare const withPep: <P extends object>(Component: React.ComponentType<P>) => React.FC<Pick<P, Exclude<keyof P, "state" | "setState">>>;
80
- export declare const PepContextProvider: React.FC;
1
+ import React from "react";
2
+ export declare enum EntityType {
3
+ PERSON = "PERSON",
4
+ CORPORATION = "CORPORATION"
5
+ }
6
+ export declare enum PepType {
7
+ NOT_PEP = "NOT_PEP",
8
+ ME = "ME",
9
+ RELATIVE = "RELATIVE",
10
+ COLLEAGUE = "COLLEAGUE"
11
+ }
12
+ export declare enum PepStatus {
13
+ ONGOING = "ONGOING",
14
+ ENDED = "ENDED"
15
+ }
16
+ export declare enum Role {
17
+ HEAD_OF_GOVERNMENT = "HEAD_OF_GOVERNMENT",
18
+ MINISTER = "MINISTER",
19
+ PARLIMENT_MEMBER = "PARLIMENT_MEMBER",
20
+ CENTRAL_BANK_MEMBER = "CENTRAL_BANK_MEMBER",
21
+ BOARD_MEMBER_POLITICAL_PARTY = "BOARD_MEMBER_POLITICAL_PARTY",
22
+ JUDGE_SUPREME_COURT = "JUDGE_SUPREME_COURT",
23
+ JUDGE_OTHER_HIGH_COURT = "JUDGE_OTHER_HIGH_COURT",
24
+ REVISION_INSTITUTE = "REVISION_INSTITUTE",
25
+ AMBASSADOR = "AMBASSADOR",
26
+ MILITARY_OFFICER = "MILITARY_OFFICER",
27
+ GOVERNMENT_COMPANY = "GOVERNMENT_COMPANY",
28
+ EU_HIGH_RANKING_POSITION = "EU_HIGH_RANKING_POSITION",
29
+ HIGH_RANKING_POSITION_INTERNALTIONAL_CORP = "HIGH_RANKING_POSITION_INTERNALTIONAL_CORP"
30
+ }
31
+ export declare enum Relation {
32
+ MARRIED_PARTNER = "MARRIED_PARTNER",
33
+ COLIVING_PARTNER = "COLIVING_PARTNER",
34
+ CHILD = "CHILD",
35
+ PARENT = "PARENT",
36
+ CHILD_MARRIED_PARTNER = "CHILD_MARRIED_PARTNER",
37
+ CHILD_COLIVING_PARTNER = "CHILD_COLIVING_PARTNER"
38
+ }
39
+ export declare enum BusinessRelation {
40
+ CO_OWNERSHIP = "CO_OWNERSHIP",
41
+ CLOSE_CONNECTION = "CLOSE_CONNECTION",
42
+ COMPANY_FOR_PEP = "COMPANY_FOR_PEP"
43
+ }
44
+ export declare enum MilitaryRank {
45
+ GENERAL = "GENERAL",
46
+ LIEUTENANT_GENERAL = "LIEUTENANT_GENERAL",
47
+ MAJOR_GENERAL = "MAJOR_GENERAL",
48
+ ADMIRAL = "ADMIRAL",
49
+ VICE_ADMIRAL = "VICE_ADMIRAL",
50
+ REAR_ADMIRAL = "REAR_ADMIRAL"
51
+ }
52
+ export interface PepState {
53
+ legalEntityType?: EntityType;
54
+ type?: PepType;
55
+ role?: Role;
56
+ country?: string;
57
+ ended?: Date;
58
+ ambassadorCountry?: string;
59
+ militaryRank?: MilitaryRank;
60
+ governmentCompany?: string;
61
+ governmentCompanyRole?: string;
62
+ internationalOrganisation?: string;
63
+ internationalOrganisationRole?: string;
64
+ relationToPEP?: Relation;
65
+ nameOfPEP?: string;
66
+ birthdayOfPEP?: Date;
67
+ tin?: string;
68
+ businessRelation?: BusinessRelation;
69
+ isOngoing?: PepStatus;
70
+ isLocalCountry?: string;
71
+ ownerName?: string;
72
+ }
73
+ export declare const EMPTY_PEP_STATE: PepState;
74
+ export interface PepContextProps {
75
+ state: PepState;
76
+ setState: (newState: Partial<PepState>) => void;
77
+ }
78
+ export declare const PepContext: React.Context<PepContextProps>;
79
+ export declare const withPep: <P extends object>(Component: React.ComponentType<P>) => React.FC<Pick<P, Exclude<keyof P, "state" | "setState">>>;
80
+ export declare const PepContextProvider: React.FC;