@truedat/ie 7.5.9 → 7.5.11

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 (106) hide show
  1. package/package.json +42 -67
  2. package/src/ingests/components/EventRow.js +1 -2
  3. package/src/ingests/components/Events.js +3 -4
  4. package/src/ingests/components/FieldGroupTable.js +1 -2
  5. package/src/ingests/components/Ingest.js +1 -2
  6. package/src/ingests/components/IngestActions.js +1 -2
  7. package/src/ingests/components/IngestArchive.js +2 -3
  8. package/src/ingests/components/IngestArchiveLoader.js +16 -38
  9. package/src/ingests/components/IngestArchiveRow.js +5 -6
  10. package/src/ingests/components/IngestCompleteness.js +0 -1
  11. package/src/ingests/components/IngestCrumbs.js +2 -4
  12. package/src/ingests/components/IngestDetails.js +3 -3
  13. package/src/ingests/components/IngestDuplicate.js +5 -8
  14. package/src/ingests/components/IngestEdit.js +5 -8
  15. package/src/ingests/components/IngestExecutions.js +7 -7
  16. package/src/ingests/components/IngestExecutionsLoader.js +2 -2
  17. package/src/ingests/components/IngestFilters.js +5 -6
  18. package/src/ingests/components/IngestForm.js +4 -5
  19. package/src/ingests/components/IngestHeader.js +0 -1
  20. package/src/ingests/components/IngestLoader.js +16 -58
  21. package/src/ingests/components/IngestRoutes.js +272 -231
  22. package/src/ingests/components/IngestRow.js +4 -5
  23. package/src/ingests/components/IngestSelectedFilters.js +10 -10
  24. package/src/ingests/components/IngestSummary.js +0 -2
  25. package/src/ingests/components/IngestTabs.js +13 -13
  26. package/src/ingests/components/Ingests.js +0 -1
  27. package/src/ingests/components/IngestsActions.js +1 -2
  28. package/src/ingests/components/IngestsLabelResults.js +1 -2
  29. package/src/ingests/components/IngestsLoader.js +1 -1
  30. package/src/ingests/components/IngestsSearch.js +0 -1
  31. package/src/ingests/components/IngestsSelector.js +0 -1
  32. package/src/ingests/components/IngestsTable.js +85 -94
  33. package/src/ingests/components/IngestsTabs.js +2 -3
  34. package/src/ingests/components/__tests__/Events.spec.js +10 -10
  35. package/src/ingests/components/__tests__/Ingest.spec.js +16 -5
  36. package/src/ingests/components/__tests__/IngestActions.spec.js +7 -7
  37. package/src/ingests/components/__tests__/IngestArchive.spec.js +7 -7
  38. package/src/ingests/components/__tests__/IngestArchiveLoader.spec.js +70 -69
  39. package/src/ingests/components/__tests__/IngestArchiveRow.spec.js +10 -12
  40. package/src/ingests/components/__tests__/IngestCompleteness.spec.js +0 -1
  41. package/src/ingests/components/__tests__/IngestDetails.spec.js +10 -10
  42. package/src/ingests/components/__tests__/IngestExecutions.spec.js +7 -7
  43. package/src/ingests/components/__tests__/IngestExecutionsLoader.spec.js +38 -47
  44. package/src/ingests/components/__tests__/IngestFilters.spec.js +0 -1
  45. package/src/ingests/components/__tests__/IngestForm.spec.js +18 -40
  46. package/src/ingests/components/__tests__/IngestHeader.spec.js +9 -9
  47. package/src/ingests/components/__tests__/IngestLabelResults.spec.js +0 -1
  48. package/src/ingests/components/__tests__/IngestLoader.spec.js +70 -41
  49. package/src/ingests/components/__tests__/IngestRoutes.spec.js +176 -0
  50. package/src/ingests/components/__tests__/IngestSelectedFilters.spec.js +33 -5
  51. package/src/ingests/components/__tests__/Ingests.spec.js +32 -6
  52. package/src/ingests/components/__tests__/IngestsActions.spec.js +5 -5
  53. package/src/ingests/components/__tests__/IngestsLoader.spec.js +65 -36
  54. package/src/ingests/components/__tests__/IngestsTable.spec.js +16 -7
  55. package/src/ingests/components/__tests__/__snapshots__/Events.spec.js.snap +83 -43
  56. package/src/ingests/components/__tests__/__snapshots__/Ingest.spec.js.snap +27 -14
  57. package/src/ingests/components/__tests__/__snapshots__/IngestActions.spec.js.snap +19 -20
  58. package/src/ingests/components/__tests__/__snapshots__/IngestArchive.spec.js.snap +79 -65
  59. package/src/ingests/components/__tests__/__snapshots__/IngestArchiveLoader.spec.js.snap +1 -1
  60. package/src/ingests/components/__tests__/__snapshots__/IngestArchiveRow.spec.js.snap +30 -30
  61. package/src/ingests/components/__tests__/__snapshots__/IngestDetails.spec.js.snap +30 -13
  62. package/src/ingests/components/__tests__/__snapshots__/IngestExecutions.spec.js.snap +121 -101
  63. package/src/ingests/components/__tests__/__snapshots__/IngestExecutionsLoader.spec.js.snap +1 -1
  64. package/src/ingests/components/__tests__/__snapshots__/IngestFilters.spec.js.snap +1 -1
  65. package/src/ingests/components/__tests__/__snapshots__/IngestForm.spec.js.snap +28 -27
  66. package/src/ingests/components/__tests__/__snapshots__/IngestHeader.spec.js.snap +21 -19
  67. package/src/ingests/components/__tests__/__snapshots__/IngestLabelResults.spec.js.snap +1 -1
  68. package/src/ingests/components/__tests__/__snapshots__/IngestLoader.spec.js.snap +1 -15
  69. package/src/ingests/components/__tests__/__snapshots__/IngestRoutes.spec.js.snap +243 -0
  70. package/src/ingests/components/__tests__/__snapshots__/IngestSelectedFilters.spec.js.snap +22 -16
  71. package/src/ingests/components/__tests__/__snapshots__/Ingests.spec.js.snap +50 -33
  72. package/src/ingests/components/__tests__/__snapshots__/IngestsActions.spec.js.snap +17 -50
  73. package/src/ingests/components/__tests__/__snapshots__/IngestsLoader.spec.js.snap +1 -21
  74. package/src/ingests/components/__tests__/__snapshots__/IngestsTable.spec.js.snap +15 -24
  75. package/src/ingests/components/index.js +1 -1
  76. package/src/ingests/constants/mappings.js +6 -6
  77. package/src/ingests/relations/components/IngestLinkActions.js +0 -1
  78. package/src/ingests/relations/components/IngestLinksActions.js +1 -2
  79. package/src/ingests/relations/components/IngestRelationsRoutes.js +67 -69
  80. package/src/ingests/relations/components/IngestToDataStructureRelations.js +2 -2
  81. package/src/ingests/relations/components/IngestToIngestForm.js +4 -4
  82. package/src/ingests/relations/components/IngestToIngestRelations.js +4 -4
  83. package/src/ingests/relations/components/IngestToStructureForm.js +6 -6
  84. package/src/ingests/relations/components/__tests__/IngestRelationsRoutes.spec.js +80 -4
  85. package/src/ingests/relations/components/__tests__/IngestToIngestForm.spec.js +24 -25
  86. package/src/ingests/relations/components/__tests__/IngestToStructureForm.spec.js +42 -23
  87. package/src/ingests/relations/components/__tests__/__snapshots__/IngestRelationsRoutes.spec.js.snap +49 -23
  88. package/src/ingests/relations/components/__tests__/__snapshots__/IngestToIngestForm.spec.js.snap +85 -27
  89. package/src/ingests/relations/components/__tests__/__snapshots__/IngestToStructureForm.spec.js.snap +30 -35
  90. package/src/ingests/relations/selectors/__tests__/getIngestLinks.spec.js +20 -20
  91. package/src/ingests/relations/selectors/__tests__/getRelations.spec.js +17 -17
  92. package/src/ingests/relations/selectors/getIngestLinks.js +1 -2
  93. package/src/ingests/relations/selectors/getRelations.js +6 -6
  94. package/src/ingests/sagas/fetchIngest.js +1 -1
  95. package/src/ingests/sagas/fetchIngestArchive.js +1 -1
  96. package/src/ingests/sagas/fetchIngestExecutions.js +1 -1
  97. package/src/ingests/selectors/getIngestColumns.js +12 -13
  98. package/src/ingests/selectors/getIngestTemplate.js +1 -1
  99. package/src/ingests/selectors/getParsedEvents.js +15 -15
  100. package/src/ingests/selectors/getTemplateFields.js +3 -3
  101. package/src/ingests/selectors/getTemplateGroups.js +1 -1
  102. package/src/ingests/utils/filterOptions.js +3 -2
  103. package/src/ingests/components/__tests__/IngestDuplicate.spec.js +0 -67
  104. package/src/ingests/components/__tests__/IngestEdit.spec.js +0 -79
  105. package/src/ingests/components/__tests__/__snapshots__/IngestDuplicate.spec.js.snap +0 -85
  106. package/src/ingests/components/__tests__/__snapshots__/IngestEdit.spec.js.snap +0 -80
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@truedat/ie",
3
- "version": "7.5.9",
3
+ "version": "7.5.11",
4
4
  "description": "Truedat Web Ingests",
5
5
  "sideEffects": false,
6
- "jsnext:main": "src/index.js",
7
6
  "module": "src/index.js",
8
7
  "files": [
9
- "src"
8
+ "src",
9
+ "index.js"
10
10
  ],
11
11
  "author": "Bluetab Solutions",
12
12
  "license": "GPL-3.0",
@@ -15,64 +15,25 @@
15
15
  },
16
16
  "scripts": {
17
17
  "clean": "rimraf yarn-error.log",
18
- "debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
19
18
  "test": "TZ=UTC jest --coverage",
20
- "test:watch": "TZ=UTC jest --watch",
21
19
  "eslint": "eslint src/**",
22
20
  "eslint:fix": "eslint --fix src/**"
23
21
  },
24
- "devDependencies": {
25
- "@babel/cli": "^7.19.3",
26
- "@babel/core": "^7.20.5",
27
- "@babel/plugin-proposal-class-properties": "^7.18.6",
28
- "@babel/plugin-proposal-object-rest-spread": "^7.20.2",
29
- "@babel/plugin-proposal-optional-chaining": "^7.18.9",
30
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
31
- "@babel/plugin-transform-modules-commonjs": "^7.19.6",
32
- "@babel/preset-env": "^7.20.2",
33
- "@babel/preset-react": "^7.18.6",
34
- "@testing-library/jest-dom": "^5.16.5",
35
- "@testing-library/react": "^12.0.0",
36
- "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "7.5.9",
38
- "babel-jest": "^28.1.0",
39
- "babel-plugin-dynamic-import-node": "^2.3.3",
40
- "babel-plugin-lodash": "^3.3.4",
41
- "babel-plugin-react-intl": "^5.1.18",
42
- "babel-plugin-transform-semantic-ui-react-imports": "^1.4.1",
43
- "enzyme": "^3.11.0",
44
- "enzyme-to-json": "^3.6.2",
45
- "identity-obj-proxy": "^3.0.0",
46
- "jest": "^29.0.0",
47
- "jest-environment-jsdom": "^29.0.0",
48
- "react": "^16.14.0",
49
- "react-dom": "^16.14.0",
50
- "redux-saga-test-plan": "^4.0.4",
51
- "rimraf": "^3.0.2",
52
- "semantic-ui-react": "^2.1.4"
53
- },
54
22
  "jest": {
55
23
  "maxWorkers": "50%",
56
24
  "testTimeout": 10000,
57
25
  "moduleDirectories": [
58
- "<rootDir>/src",
59
- "../../node_modules"
60
- ],
61
- "setupFilesAfterEnv": [
62
- "@truedat/test/setup"
26
+ "<rootDir>/src"
63
27
  ],
64
28
  "moduleNameMapper": {
65
29
  "\\.(css|less|png)$": "identity-obj-proxy",
66
30
  "^@truedat/([^/]+)$": "<rootDir>/../$1/src/index",
67
31
  "^@truedat/([^/]+)/(.*)$": "<rootDir>/../$1/src/$2"
68
32
  },
69
- "snapshotSerializers": [
70
- "enzyme-to-json/serializer"
33
+ "setupFilesAfterEnv": [
34
+ "@truedat/test/setup"
71
35
  ],
72
36
  "testEnvironment": "jsdom",
73
- "testPathIgnorePatterns": [
74
- "<rootDir>/node_modules/"
75
- ],
76
37
  "transform": {
77
38
  "\\.js$": [
78
39
  "babel-jest",
@@ -80,32 +41,46 @@
80
41
  "rootMode": "upward"
81
42
  }
82
43
  ]
83
- },
84
- "transformIgnorePatterns": [
85
- "/node_modules/(?!@truedat).*"
86
- ]
44
+ }
45
+ },
46
+ "devDependencies": {
47
+ "@testing-library/dom": "^10.4.0",
48
+ "@testing-library/jest-dom": "^6.6.3",
49
+ "@testing-library/react": "^16.2.0",
50
+ "@testing-library/user-event": "^14.6.1",
51
+ "@truedat/test": "7.5.11",
52
+ "identity-obj-proxy": "^3.0.0",
53
+ "jest": "^29.7.0",
54
+ "redux-saga-test-plan": "^4.0.6"
87
55
  },
88
56
  "dependencies": {
89
- "@truedat/core": "7.5.9",
90
- "@truedat/df": "7.5.9",
57
+ "@apollo/client": "^3.13.5",
58
+ "axios": "^1.8.4",
91
59
  "file-saver": "^2.0.5",
92
- "moment": "^2.29.4",
93
- "path-to-regexp": "^1.7.0",
60
+ "graphql": "^16.10.0",
61
+ "is-hotkey": "^0.2.0",
62
+ "is-url": "^1.2.4",
63
+ "lodash": "^4.17.21",
64
+ "moment": "^2.30.1",
65
+ "path-to-regexp": "^8.2.0",
94
66
  "prop-types": "^15.8.1",
95
- "react-intl": "^5.20.10",
96
- "react-moment": "^1.1.2",
97
- "react-redux": "^7.2.4",
98
- "react-router-dom": "^5.2.0",
99
- "redux": "^4.1.1",
100
- "redux-saga": "^1.2.1",
67
+ "query-string": "^7.1.2",
68
+ "react": "^19.0.0",
69
+ "react-csv": "^2.2.2",
70
+ "react-dom": "^19.0.0",
71
+ "react-dropzone": "^14.3.8",
72
+ "react-hook-form": "^7.54.2",
73
+ "react-intl": "^7.1.10",
74
+ "react-moment": "^1.1.3",
75
+ "react-redux": "^9.2.0",
76
+ "react-router": "^7.4.0",
77
+ "redux": "^5.0.1",
78
+ "redux-saga": "^1.3.0",
101
79
  "redux-saga-routines": "^3.2.3",
102
- "reselect": "^4.1.7",
103
- "semantic-ui-react": "^2.1.4"
104
- },
105
- "peerDependencies": {
106
- "react": ">= 16.8.6 < 17",
107
- "react-dom": ">= 16.8.6 < 17",
108
- "semantic-ui-react": ">= 2.0.3 < 2.2"
80
+ "reselect": "^5.1.1",
81
+ "semantic-ui-calendar-react": "^0.15.3",
82
+ "semantic-ui-react": "^3.0.0-beta.2",
83
+ "swr": "^2.3.3"
109
84
  },
110
- "gitHead": "03770e3241daa955de2e6e40fdaea91e3d147860"
85
+ "gitHead": "cbb92d5206752fe2add4195432b0401da17a0f23"
111
86
  }
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { FormattedMessage, useIntl } from "react-intl";
5
4
  import Moment from "react-moment";
@@ -39,7 +38,7 @@ EventRow.propTypes = {
39
38
  user_name: PropTypes.string,
40
39
  event: PropTypes.string,
41
40
  ts: PropTypes.string,
42
- payload: PropTypes.array
41
+ payload: PropTypes.array,
43
42
  };
44
43
 
45
44
  export default EventRow;
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { Feed, Segment } from "semantic-ui-react";
4
3
  import { connect } from "react-redux";
@@ -18,12 +17,12 @@ export const Events = ({ events, eventsLoading }) =>
18
17
 
19
18
  Events.propTypes = {
20
19
  events: PropTypes.array,
21
- eventsLoading: PropTypes.bool
20
+ eventsLoading: PropTypes.bool,
22
21
  };
23
22
 
24
- const mapStateToProps = state => ({
23
+ const mapStateToProps = (state) => ({
25
24
  events: getParsedEvents(state),
26
- eventsLoading: state.eventsLoading
25
+ eventsLoading: state.eventsLoading,
27
26
  });
28
27
 
29
28
  export default connect(mapStateToProps)(Events);
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { Table } from "semantic-ui-react";
4
3
 
@@ -13,7 +12,7 @@ const FieldValue = ({ field, value }, i) => (
13
12
 
14
13
  FieldValue.propTypes = {
15
14
  field: PropTypes.string,
16
- value: PropTypes.string
15
+ value: PropTypes.string,
17
16
  };
18
17
 
19
18
  export const FieldGroupTable = ([groupName, fieldValues], i) => (
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { connect } from "react-redux";
5
4
  import { Grid } from "semantic-ui-react";
@@ -23,7 +22,7 @@ export const Ingest = ({ ingest }) =>
23
22
  );
24
23
 
25
24
  Ingest.propTypes = {
26
- ingest: PropTypes.object
25
+ ingest: PropTypes.object,
27
26
  };
28
27
 
29
28
  const mapStateToProps = ({ ingest }) => ({ ingest });
@@ -1,10 +1,9 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { connect } from "react-redux";
5
4
  import { bindActionCreators } from "redux";
5
+ import { Link } from "react-router";
6
6
  import { Button, Grid, Icon } from "semantic-ui-react";
7
- import { Link } from "react-router-dom";
8
7
  import { FormattedMessage } from "react-intl";
9
8
  import { ConfirmModal, GroupActions } from "@truedat/core/components";
10
9
  import { linkTo } from "@truedat/core/routes";
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { connect } from "react-redux";
5
4
  import { Segment, Grid, Table } from "semantic-ui-react";
@@ -47,11 +46,11 @@ export const IngestArchive = ({ ingestArchive }) => (
47
46
  );
48
47
 
49
48
  IngestArchive.propTypes = {
50
- ingestArchive: PropTypes.array
49
+ ingestArchive: PropTypes.array,
51
50
  };
52
51
 
53
52
  const mapStateToProps = ({ ingestArchive }) => ({
54
- ingestArchive
53
+ ingestArchive,
55
54
  });
56
55
 
57
56
  export default connect(mapStateToProps)(IngestArchive);
@@ -1,48 +1,26 @@
1
- import React from "react";
2
- import { withRouter } from "react-router-dom";
1
+ import { useEffect } from "react";
2
+ import { useParams } from "react-router";
3
3
  import PropTypes from "prop-types";
4
- import { compose } from "redux";
5
- import { connect } from "react-redux";
4
+ import { useDispatch, useSelector } from "react-redux";
6
5
  import { Loading } from "@truedat/core/components";
7
6
  import { fetchIngestArchive, clearIngestArchive } from "../routines";
8
7
 
9
- export class IngestArchiveLoader extends React.Component {
10
- static propTypes = {
11
- fetchIngestArchive: PropTypes.func,
12
- clearIngestArchive: PropTypes.func,
13
- ingestArchiveLoading: PropTypes.bool,
14
- match: PropTypes.object,
15
- };
8
+ export default function IngestArchiveLoader() {
9
+ const dispatch = useDispatch();
10
+ const ingestArchiveLoading = useSelector(
11
+ (state) => state.ingestArchiveLoading
12
+ );
13
+ const { id } = useParams();
16
14
 
17
- componentDidMount() {
18
- const { fetchIngestArchive, match } = this.props;
19
- const { id } = match.params;
15
+ useEffect(() => {
20
16
  if (id) {
21
- fetchIngestArchive({ id });
17
+ dispatch(fetchIngestArchive({ id }));
22
18
  }
23
- }
24
19
 
25
- componentWillUnmount() {
26
- const { clearIngestArchive } = this.props;
27
- clearIngestArchive();
28
- }
20
+ return () => {
21
+ dispatch(clearIngestArchive());
22
+ };
23
+ }, [id]);
29
24
 
30
- render() {
31
- const { ingestArchiveLoading } = this.props;
32
-
33
- if (ingestArchiveLoading) {
34
- return <Loading />;
35
- } else {
36
- return null;
37
- }
38
- }
25
+ return ingestArchiveLoading ? <Loading /> : null;
39
26
  }
40
-
41
- const mapStateToProps = ({ ingestArchiveLoading }) => ({
42
- ingestArchiveLoading,
43
- });
44
-
45
- export default compose(
46
- withRouter,
47
- connect(mapStateToProps, { clearIngestArchive, fetchIngestArchive })
48
- )(IngestArchiveLoader);
@@ -1,6 +1,5 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
- import { useHistory } from "react-router-dom";
2
+ import { useNavigate } from "react-router";
4
3
  import { Table } from "semantic-ui-react";
5
4
  import { FormattedMessage } from "react-intl";
6
5
  import { DateTime } from "@truedat/core/components";
@@ -11,11 +10,11 @@ export const IngestArchiveRow = ({
11
10
  status,
12
11
  last_change_at,
13
12
  last_change_by,
14
- version
13
+ version,
15
14
  }) => {
16
- const history = useHistory();
15
+ const navigate = useNavigate();
17
16
  return (
18
- <Table.Row onClick={() => history.push(linkTo.INGEST({ id }))}>
17
+ <Table.Row onClick={() => navigate(linkTo.INGEST({ id }))}>
19
18
  <Table.Cell
20
19
  content={<FormattedMessage id={`ingests.status.${status}`} />}
21
20
  />
@@ -31,7 +30,7 @@ IngestArchiveRow.propTypes = {
31
30
  status: PropTypes.string,
32
31
  last_change_at: PropTypes.string,
33
32
  last_change_by: PropTypes.string,
34
- version: PropTypes.number
33
+ version: PropTypes.number,
35
34
  };
36
35
 
37
36
  export default IngestArchiveRow;
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
3
  import { connect } from "react-redux";
5
4
  import { List, Header, Segment, Icon } from "semantic-ui-react";
@@ -1,8 +1,7 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { Breadcrumb } from "semantic-ui-react";
4
3
  import { connect } from "react-redux";
5
- import { Link } from "react-router-dom";
4
+ import { Link } from "react-router";
6
5
  import { FormattedMessage } from "react-intl";
7
6
  import { INGESTS, linkTo } from "@truedat/core/routes";
8
7
 
@@ -28,7 +27,6 @@ export const IngestCrumbs = ({ name, ingestAction, id }) =>
28
27
  )}
29
28
  </>
30
29
  )}
31
-
32
30
  {ingestAction && (
33
31
  <>
34
32
  <Breadcrumb.Divider icon="right angle" />
@@ -43,7 +41,7 @@ export const IngestCrumbs = ({ name, ingestAction, id }) =>
43
41
  IngestCrumbs.propTypes = {
44
42
  name: PropTypes.string,
45
43
  ingestAction: PropTypes.string,
46
- id: PropTypes.number
44
+ id: PropTypes.number,
47
45
  };
48
46
 
49
47
  const mapStateToProps = ({ ingest }) => ({ ...ingest });
@@ -1,12 +1,12 @@
1
- import React from "react";
1
+ import { lazy } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { connect } from "react-redux";
4
4
  import { Segment, Header } from "semantic-ui-react";
5
5
  import { FormattedMessage } from "react-intl";
6
6
  import { RichTextEditor } from "@truedat/core/components";
7
7
 
8
- const DynamicFormViewer = React.lazy(() =>
9
- import("@truedat/df/components/DynamicFormViewer")
8
+ const DynamicFormViewer = lazy(
9
+ () => import("@truedat/df/components/DynamicFormViewer")
10
10
  );
11
11
 
12
12
  export const IngestDetails = ({
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
2
+ import { lazy, Component } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import {
5
5
  Button,
@@ -18,12 +18,10 @@ import { selectTemplate, selectDomain } from "@truedat/df/routines";
18
18
  import { applyTemplate } from "@truedat/df/utils";
19
19
  import { ingestAction } from "../routines";
20
20
 
21
- const DynamicForm = React.lazy(() =>
22
- import("@truedat/df/components/DynamicForm")
23
- );
21
+ const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
24
22
 
25
- const TemplateLoader = React.lazy(() =>
26
- import("@truedat/df/templates/components/TemplateLoader")
23
+ const TemplateLoader = lazy(
24
+ () => import("@truedat/df/templates/components/TemplateLoader")
27
25
  );
28
26
 
29
27
  const actionKey = "create";
@@ -42,7 +40,7 @@ const isValid = _.conforms({
42
40
  description: _.negate(_.isEmpty),
43
41
  });
44
42
 
45
- export class IngestDuplicate extends React.Component {
43
+ export class IngestDuplicate extends Component {
46
44
  static propTypes = {
47
45
  action: PropTypes.object,
48
46
  applyTemplate: PropTypes.func,
@@ -158,7 +156,6 @@ export class IngestDuplicate extends React.Component {
158
156
  </label>
159
157
  <Form.Input name="name" value={name} onChange={this.handleChange} />
160
158
  </Form.Field>
161
-
162
159
  <Form.Field required>
163
160
  <label>
164
161
  {formatMessage({ id: "ingests.props.description" })}
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
2
+ import { lazy, Component } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import {
5
5
  Button,
@@ -22,12 +22,10 @@ import {
22
22
  import { applyTemplate } from "@truedat/df/utils";
23
23
  import { ingestAction } from "../routines";
24
24
 
25
- const DynamicForm = React.lazy(() =>
26
- import("@truedat/df/components/DynamicForm")
27
- );
25
+ const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
28
26
 
29
- const TemplateLoader = React.lazy(() =>
30
- import("@truedat/df/templates/components/TemplateLoader")
27
+ const TemplateLoader = lazy(
28
+ () => import("@truedat/df/templates/components/TemplateLoader")
31
29
  );
32
30
 
33
31
  const actionKey = "update";
@@ -46,7 +44,7 @@ const isValid = _.conforms({
46
44
  description: _.negate(_.isEmpty),
47
45
  });
48
46
 
49
- export class IngestEdit extends React.Component {
47
+ export class IngestEdit extends Component {
50
48
  static propTypes = {
51
49
  action: PropTypes.object,
52
50
  applyTemplate: PropTypes.func,
@@ -166,7 +164,6 @@ export class IngestEdit extends React.Component {
166
164
  </label>
167
165
  <Form.Input name="name" value={name} onChange={this.handleChange} />
168
166
  </Form.Field>
169
-
170
167
  <Form.Field required>
171
168
  <label>
172
169
  {formatMessage({ id: "ingests.props.description" })}
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
2
+ import { Fragment } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { connect } from "react-redux";
5
5
  import { FormattedMessage } from "react-intl";
@@ -16,7 +16,7 @@ const formatBytes = (bytes, separator = " ") => {
16
16
  : `${(bytes / 1024 ** i).toFixed(1)}${separator}${sizes[i]}`;
17
17
  };
18
18
 
19
- const getRecords = num => {
19
+ const getRecords = (num) => {
20
20
  if (!isNaN(parseFloat(num)) && isFinite(num)) {
21
21
  return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
22
22
  }
@@ -60,7 +60,7 @@ const IngestExecutionRow = ({ ingest }) => (
60
60
  export const IngestExecutions = ({ ingestExecutions }) => {
61
61
  if (!_.isEmpty(ingestExecutions)) {
62
62
  return (
63
- <React.Fragment>
63
+ <Fragment>
64
64
  <Segment attached="bottom">
65
65
  <Grid>
66
66
  <Grid.Row>
@@ -120,11 +120,11 @@ export const IngestExecutions = ({ ingestExecutions }) => {
120
120
  </Grid.Row>
121
121
  </Grid>
122
122
  </Segment>
123
- </React.Fragment>
123
+ </Fragment>
124
124
  );
125
125
  } else {
126
126
  return (
127
- <React.Fragment>
127
+ <Fragment>
128
128
  <Segment attached="bottom">
129
129
  <Grid>
130
130
  <Grid.Row>
@@ -138,13 +138,13 @@ export const IngestExecutions = ({ ingestExecutions }) => {
138
138
  </Grid.Row>
139
139
  </Grid>
140
140
  </Segment>
141
- </React.Fragment>
141
+ </Fragment>
142
142
  );
143
143
  }
144
144
  };
145
145
 
146
146
  IngestExecutions.propTypes = {
147
- ingestExecutions: PropTypes.array
147
+ ingestExecutions: PropTypes.array,
148
148
  };
149
149
 
150
150
  const mapStateToProps = ({ ingestExecutions }) => ({ ingestExecutions });
@@ -1,11 +1,11 @@
1
- import React from "react";
1
+ import { Component } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { bindActionCreators } from "redux";
4
4
  import { connect } from "react-redux";
5
5
  import { Loading } from "@truedat/core/components";
6
6
  import { fetchIngestExecutions, clearIngestExecutions } from "../routines";
7
7
 
8
- export class IngestExecutionsLoader extends React.Component {
8
+ export class IngestExecutionsLoader extends Component {
9
9
  static propTypes = {
10
10
  fetchIngestExecutions: PropTypes.func,
11
11
  clearIngestExecutions: PropTypes.func,
@@ -1,14 +1,13 @@
1
- import React from "react";
2
- import { Route, Switch } from "react-router-dom";
1
+ import { Route, Routes } from "react-router";
3
2
  import { INGESTS } from "@truedat/core/routes";
4
3
  import IngestFiltersDefault from "./IngestFiltersDefault";
5
4
  import IngestFiltersPublished from "./IngestFiltersPublished";
6
5
 
7
6
  export const IngestFilters = () => (
8
- <Switch>
9
- <Route exact path={INGESTS} render={() => <IngestFiltersPublished />} />
10
- <Route render={() => <IngestFiltersDefault />} />
11
- </Switch>
7
+ <Routes>
8
+ <Route path={INGESTS} element={<IngestFiltersPublished />} />
9
+ <Route path="*" element={<IngestFiltersDefault />} />
10
+ </Routes>
12
11
  );
13
12
 
14
13
  export default IngestFilters;
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
2
+ import { lazy, Component } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import {
5
5
  Button,
@@ -20,8 +20,8 @@ import {
20
20
  } from "@truedat/core/components";
21
21
  import { ingestAction } from "../routines";
22
22
 
23
- const SelectableDynamicForm = React.lazy(() =>
24
- import("@truedat/df/components/SelectableDynamicForm")
23
+ const SelectableDynamicForm = lazy(
24
+ () => import("@truedat/df/components/SelectableDynamicForm")
25
25
  );
26
26
 
27
27
  const actionKey = "create";
@@ -43,7 +43,7 @@ const isValid = _.conforms({
43
43
  type: isNonEmptyString,
44
44
  });
45
45
 
46
- export class IngestForm extends React.Component {
46
+ export class IngestForm extends Component {
47
47
  static propTypes = {
48
48
  action: PropTypes.object,
49
49
  ingestAction: PropTypes.func,
@@ -150,7 +150,6 @@ export class IngestForm extends React.Component {
150
150
  onChange={this.handleEditorChange}
151
151
  />
152
152
  </Form.Field>
153
-
154
153
  <SelectableDynamicForm
155
154
  scope="ie"
156
155
  domainIds={_.isNil(domain_id) ? null : [domain_id]}
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { FormattedMessage } from "react-intl";
4
3
  import { connect } from "react-redux";