@lysaab/lysa-pep 2.2.0 → 3.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.
@@ -17,7 +17,7 @@ const messages = defineMessages({
17
17
  placeholder: {
18
18
  id: "component.select.country",
19
19
  description: "Select a country placeholder",
20
- defaultMessage: "Välj ett land",
20
+ defaultMessage: "Select a country",
21
21
  },
22
22
  });
23
23
  export const CountrySelect = (_a) => {
@@ -1 +1 @@
1
- [{"id":"component.select.country","description":"Select a country placeholder","defaultMessage":"Välj ett land"}]
1
+ [{"id":"component.select.country","description":"Select a country placeholder","defaultMessage":"Select a country"}]
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
2
  "name": "@lysaab/lysa-pep",
3
3
  "author": "Lysa AB",
4
- "version": "2.2.0",
4
+ "version": "3.0.0",
5
5
  "main": "./Exports.js",
6
6
  "dependencies": {
7
7
  "@lysaab/countries": "^3.1.1",
8
8
  "@types/luxon": "^1.15.2",
9
9
  "@types/react-intl": "^3.0.0",
10
- "luxon": "^1.21.1",
11
- "node-sass": "^4.14.1"
10
+ "luxon": "^1.21.1"
12
11
  },
13
12
  "devDependencies": {
14
13
  "@formatjs/cli": "^1.1.22",
15
- "@lysaab/ui-2": "^24.2.1",
14
+ "@lysaab/ui-2": "^27.0.1",
16
15
  "@types/jest": "24.0.20",
17
16
  "@types/luxon": "^1.15.2",
18
17
  "@types/node": "12.11.7",
19
- "@types/react": "^16.9.23",
20
- "@types/react-dom": "^16.9.5",
18
+ "@types/react": "^17.0.0",
19
+ "@types/react-dom": "^17.0.0",
21
20
  "copyfiles": "^2.3.0",
22
21
  "eslint-plugin-formatjs": "^2.3.13",
23
22
  "luxon": "^1.21.1",
24
- "react": "^16.13.1",
25
- "react-dom": "^16.13.0",
23
+ "react": "^17.0.1",
24
+ "react-dom": "^17.0.1",
26
25
  "react-intl": "^4.5.12",
27
26
  "react-intl-translations-manager": "^5.0.3",
28
27
  "react-router-dom": "^5.2.0",
29
28
  "react-scripts": "^3.4.3",
29
+ "sass": "^1.30.0",
30
30
  "typescript": "^3.7.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@lysaab/ui-2": "^20.13.0",
34
- "react": "^16.13.1",
33
+ "@lysaab/ui-2": "^27.0.1",
34
+ "react": "^17.0.1",
35
35
  "react-intl": "^4.5.12",
36
36
  "react-router-dom": "^5.2.0"
37
37
  },
@@ -62,7 +62,14 @@ export const RelationPage = ({ next }) => {
62
62
  ? pepContext.state.businessRelation
63
63
  : pepContext.state.relationToPEP,
64
64
  possessiveName: formatPossessive(pepContext.state.ownerName, intl.locale),
65
- }), selected: pepContext.state.birthdayOfPEP, onChange: (event) => pepContext.setState({ birthdayOfPEP: event || undefined }), validators: [
65
+ }), selected: pepContext.state.birthdayOfPEP, onChange: (event) => {
66
+ if (Array.isArray(event)) {
67
+ pepContext.setState({ birthdayOfPEP: event[0] || undefined });
68
+ }
69
+ else {
70
+ pepContext.setState({ birthdayOfPEP: event || undefined });
71
+ }
72
+ }, validators: [
66
73
  new RequiredValidator(intl.formatMessage(birthdayMessages.required)),
67
74
  ], maxDate: new Date(), openToDate: pepContext.state.birthdayOfPEP || DATEPICKER_START_DATE }))) : null,
68
75
  pepContext.state.businessRelation && type === PepType.COLLEAGUE ? (React.createElement(React.Fragment, null,
@@ -49,7 +49,14 @@ export const StatusPage = ({ countryName, countryCode, next, }) => {
49
49
  new RequiredValidator(intl.formatMessage(isOngoingMessages.required)),
50
50
  ] }),
51
51
  pepContext.state.isOngoing &&
52
- pepContext.state.isOngoing === PepStatus.ENDED ? (React.createElement(Datepicker, { label: intl.formatMessage(endedMessages.header), selected: pepContext.state.ended, onChange: (event) => pepContext.setState({ ended: event || undefined }), validators: [
52
+ pepContext.state.isOngoing === PepStatus.ENDED ? (React.createElement(Datepicker, { label: intl.formatMessage(endedMessages.header), selected: pepContext.state.ended, onChange: (event) => {
53
+ if (Array.isArray(event)) {
54
+ pepContext.setState({ ended: event[0] || undefined });
55
+ }
56
+ else {
57
+ pepContext.setState({ ended: event || undefined });
58
+ }
59
+ }, validators: [
53
60
  new RequiredValidator(intl.formatMessage(endedMessages.required)),
54
61
  ], showMonthYearPicker: true, dateFormat: "yyyy-MM", maxDate: new Date() })) : null),
55
62
  React.createElement(Card, null,