@truedat/ie 8.6.7 → 8.7.1
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/package.json +3 -3
- package/src/ingests/api.js +1 -1
- package/src/ingests/components/EventRow.js +1 -1
- package/src/ingests/components/IngestActions.js +1 -1
- package/src/ingests/components/IngestArchiveLoader.js +1 -1
- package/src/ingests/components/IngestCompleteness.js +2 -2
- package/src/ingests/components/IngestDetails.js +1 -1
- package/src/ingests/components/IngestDuplicate.js +5 -5
- package/src/ingests/components/IngestEdit.js +3 -3
- package/src/ingests/components/IngestExecutionsLoader.js +2 -2
- package/src/ingests/components/IngestFiltersDefault.js +1 -1
- package/src/ingests/components/IngestFiltersLoader.js +2 -2
- package/src/ingests/components/IngestFiltersPublished.js +1 -1
- package/src/ingests/components/IngestForm.js +3 -3
- package/src/ingests/components/IngestRoutes.js +3 -3
- package/src/ingests/components/IngestSelectedFiltersDefault.js +2 -2
- package/src/ingests/components/IngestSelectedFiltersPending.js +2 -2
- package/src/ingests/components/IngestSelectedFiltersPublished.js +4 -4
- package/src/ingests/components/IngestsLoader.js +2 -2
- package/src/ingests/components/IngestsSelector.js +1 -1
- package/src/ingests/components/IngestsTable.js +5 -5
- package/src/ingests/components/RichTextEditor.js +3 -3
- package/src/ingests/components/__tests__/IngestArchiveLoader.spec.js +3 -3
- package/src/ingests/components/__tests__/IngestForm.spec.js +1 -1
- package/src/ingests/components/__tests__/IngestLoader.spec.js +3 -3
- package/src/ingests/components/__tests__/IngestRoutes.spec.js +1 -1
- package/src/ingests/components/__tests__/IngestSelectedFilters.spec.js +1 -1
- package/src/ingests/reducers/__tests__/ingest.spec.js +4 -4
- package/src/ingests/reducers/__tests__/ingestActions.spec.js +5 -5
- package/src/ingests/reducers/__tests__/ingestActiveFilters.spec.js +11 -11
- package/src/ingests/reducers/__tests__/ingestArchive.spec.js +5 -5
- package/src/ingests/reducers/__tests__/ingestArchiveLoading.spec.js +2 -2
- package/src/ingests/reducers/__tests__/ingestCount.spec.js +3 -3
- package/src/ingests/reducers/__tests__/ingestExecutions.spec.js +5 -5
- package/src/ingests/reducers/__tests__/ingestExecutionsLoading.spec.js +6 -2
- package/src/ingests/reducers/__tests__/ingestFilters.spec.js +2 -2
- package/src/ingests/reducers/__tests__/ingestFiltersLoading.spec.js +2 -2
- package/src/ingests/reducers/__tests__/ingestQuery.spec.js +6 -6
- package/src/ingests/reducers/__tests__/ingestSelectedFilter.spec.js +9 -9
- package/src/ingests/reducers/__tests__/ingests.spec.js +4 -4
- package/src/ingests/reducers/__tests__/ingestsActions.spec.js +3 -3
- package/src/ingests/reducers/__tests__/ingestsDownloading.spec.js +2 -2
- package/src/ingests/reducers/__tests__/previousIngestQuery.spec.js +2 -2
- package/src/ingests/reducers/ingestActiveFilters.js +1 -1
- package/src/ingests/reducers/ingestArchive.js +2 -2
- package/src/ingests/reducers/ingestExecutions.js +2 -2
- package/src/ingests/reducers/ingestFilters.js +1 -1
- package/src/ingests/reducers/ingestRedirect.js +3 -3
- package/src/ingests/reducers/ingestSelectedFilter.js +1 -1
- package/src/ingests/relations/components/IngestRelationsRoutes.js +2 -2
- package/src/ingests/relations/components/IngestToIngestForm.js +1 -1
- package/src/ingests/relations/components/IngestToStructureForm.js +2 -2
- package/src/ingests/relations/components/__tests__/IngestRelationsRoutes.spec.js +2 -2
- package/src/ingests/relations/selectors/getIngestLinks.js +7 -7
- package/src/ingests/relations/selectors/getRelations.js +4 -4
- package/src/ingests/routines.js +3 -3
- package/src/ingests/sagas/__tests__/downloadIngests.spec.js +1 -1
- package/src/ingests/sagas/__tests__/fetchIngests.spec.js +3 -3
- package/src/ingests/sagas/downloadIngests.js +1 -1
- package/src/ingests/sagas/fetchIngestFilters.js +2 -2
- package/src/ingests/sagas/index.js +2 -2
- package/src/ingests/sagas/ingestAction.js +2 -2
- package/src/ingests/sagas/ingestLinkAction.js +2 -2
- package/src/ingests/selectors/__tests__/mapSelectedFilterStateToPropsByStatus.spec.js +2 -2
- package/src/ingests/selectors/getIngestAvailableFilters.js +2 -2
- package/src/ingests/selectors/getIngestColumns.js +2 -2
- package/src/ingests/selectors/getIngestFilterTypes.js +1 -1
- package/src/ingests/selectors/getIngestSelectedFilterActiveValues.js +1 -1
- package/src/ingests/selectors/getIngestSelectedFilterValues.js +2 -2
- package/src/ingests/selectors/getIngestSelectedFilters.js +1 -1
- package/src/ingests/selectors/getTemplateFields.js +1 -1
- package/src/ingests/selectors/getTemplateGroups.js +1 -1
- package/src/ingests/selectors/mapSelectedFilterStateToPropsByStatus.js +2 -2
- package/src/messages/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/ie",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.1",
|
|
4
4
|
"description": "Truedat Web Ingests",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.3.0",
|
|
53
53
|
"@testing-library/user-event": "^14.6.1",
|
|
54
|
-
"@truedat/test": "8.
|
|
54
|
+
"@truedat/test": "8.7.1",
|
|
55
55
|
"identity-obj-proxy": "^3.0.0",
|
|
56
56
|
"jest": "^29.7.0",
|
|
57
57
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"slate-react": "^0.22.10",
|
|
88
88
|
"swr": "^2.3.3"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "f7605a6ea3f78839b42bb7d8339eec125ba49acb"
|
|
91
91
|
}
|
package/src/ingests/api.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fetchIngestArchive, clearIngestArchive } from "../routines";
|
|
|
8
8
|
export default function IngestArchiveLoader() {
|
|
9
9
|
const dispatch = useDispatch();
|
|
10
10
|
const ingestArchiveLoading = useSelector(
|
|
11
|
-
(state) => state.ingestArchiveLoading
|
|
11
|
+
(state) => state.ingestArchiveLoading,
|
|
12
12
|
);
|
|
13
13
|
const { id } = useParams();
|
|
14
14
|
|
|
@@ -17,9 +17,9 @@ export const IngestCompleteness = ({ ingest }) => {
|
|
|
17
17
|
_.includes(cardinality)(["1", "+"]) &&
|
|
18
18
|
(_.isNil(value) || _.isEmpty(value))
|
|
19
19
|
);
|
|
20
|
-
})(fields)
|
|
20
|
+
})(fields),
|
|
21
21
|
),
|
|
22
|
-
_.flatten
|
|
22
|
+
_.flatten,
|
|
23
23
|
)(ingest);
|
|
24
24
|
|
|
25
25
|
return _.isEmpty(missingRequiredFields) ||
|
|
@@ -6,7 +6,7 @@ import { FormattedMessage } from "react-intl";
|
|
|
6
6
|
import RichTextEditor from "./RichTextEditor";
|
|
7
7
|
|
|
8
8
|
const DynamicFormViewer = lazy(
|
|
9
|
-
() => import("@truedat/df/components/DynamicFormViewer")
|
|
9
|
+
() => import("@truedat/df/components/DynamicFormViewer"),
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
export const IngestDetails = ({
|
|
@@ -14,15 +14,15 @@ import { compose } from "redux";
|
|
|
14
14
|
import { connect } from "react-redux";
|
|
15
15
|
import { injectIntl, FormattedMessage } from "react-intl";
|
|
16
16
|
import { HistoryBackButton } from "@truedat/core/components";
|
|
17
|
-
import RichTextEditor from "./RichTextEditor";
|
|
18
17
|
import { selectTemplate, selectDomain } from "@truedat/df/routines";
|
|
19
18
|
import { applyTemplate } from "@truedat/df/utils";
|
|
20
19
|
import { ingestAction } from "../routines";
|
|
20
|
+
import RichTextEditor from "./RichTextEditor";
|
|
21
21
|
|
|
22
22
|
const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
|
|
23
23
|
|
|
24
24
|
const TemplateLoader = lazy(
|
|
25
|
-
() => import("@truedat/df/templates/components/TemplateLoader")
|
|
25
|
+
() => import("@truedat/df/templates/components/TemplateLoader"),
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
const actionKey = "create";
|
|
@@ -104,12 +104,12 @@ export class IngestDuplicate extends Component {
|
|
|
104
104
|
e.preventDefault();
|
|
105
105
|
const { action, applyTemplate, ingestAction } = this.props;
|
|
106
106
|
const ingestVersion = _.pick(["description", "name", "type", "domain_id"])(
|
|
107
|
-
this.state
|
|
107
|
+
this.state,
|
|
108
108
|
);
|
|
109
109
|
|
|
110
110
|
const content = applyTemplate(
|
|
111
111
|
this.state?.content,
|
|
112
|
-
ingestVersion?.domain_id
|
|
112
|
+
ingestVersion?.domain_id,
|
|
113
113
|
);
|
|
114
114
|
|
|
115
115
|
ingestAction({
|
|
@@ -216,5 +216,5 @@ const mapStateToProps = ({
|
|
|
216
216
|
|
|
217
217
|
export default compose(
|
|
218
218
|
injectIntl,
|
|
219
|
-
connect(mapStateToProps, { ingestAction, selectTemplate, selectDomain })
|
|
219
|
+
connect(mapStateToProps, { ingestAction, selectTemplate, selectDomain }),
|
|
220
220
|
)(IngestDuplicate);
|
|
@@ -14,7 +14,6 @@ import { compose } from "redux";
|
|
|
14
14
|
import { connect } from "react-redux";
|
|
15
15
|
import { injectIntl, FormattedMessage } from "react-intl";
|
|
16
16
|
import { HistoryBackButton } from "@truedat/core/components";
|
|
17
|
-
import RichTextEditor from "./RichTextEditor";
|
|
18
17
|
import {
|
|
19
18
|
selectTemplate,
|
|
20
19
|
selectDomain,
|
|
@@ -22,11 +21,12 @@ import {
|
|
|
22
21
|
} from "@truedat/df/routines";
|
|
23
22
|
import { applyTemplate } from "@truedat/df/utils";
|
|
24
23
|
import { ingestAction } from "../routines";
|
|
24
|
+
import RichTextEditor from "./RichTextEditor";
|
|
25
25
|
|
|
26
26
|
const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
|
|
27
27
|
|
|
28
28
|
const TemplateLoader = lazy(
|
|
29
|
-
() => import("@truedat/df/templates/components/TemplateLoader")
|
|
29
|
+
() => import("@truedat/df/templates/components/TemplateLoader"),
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
const actionKey = "update";
|
|
@@ -229,5 +229,5 @@ export default compose(
|
|
|
229
229
|
selectTemplate,
|
|
230
230
|
selectDomain,
|
|
231
231
|
clearTemplate,
|
|
232
|
-
})
|
|
232
|
+
}),
|
|
233
233
|
)(IngestEdit);
|
|
@@ -39,7 +39,7 @@ export class IngestExecutionsLoader extends Component {
|
|
|
39
39
|
const mapDispatchToProps = (dispatch) =>
|
|
40
40
|
bindActionCreators(
|
|
41
41
|
{ clearIngestExecutions, fetchIngestExecutions },
|
|
42
|
-
dispatch
|
|
42
|
+
dispatch,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
const mapStateToProps = ({ ingestExecutionsLoading, ingest }) => ({
|
|
@@ -49,5 +49,5 @@ const mapStateToProps = ({ ingestExecutionsLoading, ingest }) => ({
|
|
|
49
49
|
|
|
50
50
|
export default connect(
|
|
51
51
|
mapStateToProps,
|
|
52
|
-
mapDispatchToProps
|
|
52
|
+
mapDispatchToProps,
|
|
53
53
|
)(IngestExecutionsLoader);
|
|
@@ -13,7 +13,7 @@ const mapStateToProps = (state) => ({
|
|
|
13
13
|
const mapDispatchToProps = (dispatch) =>
|
|
14
14
|
bindActionCreators(
|
|
15
15
|
{ addFilter: addIngestFilter, resetFilters: resetIngestFilters },
|
|
16
|
-
dispatch
|
|
16
|
+
dispatch,
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
export default connect(mapStateToProps, mapDispatchToProps)(AvailableFilters);
|
|
@@ -7,12 +7,12 @@ import { clearIngestFilters, fetchIngestFilters } from "../routines";
|
|
|
7
7
|
const mapDispatchToProps = (dispatch) =>
|
|
8
8
|
bindActionCreators(
|
|
9
9
|
{ clearFilters: clearIngestFilters, fetchFilters: fetchIngestFilters },
|
|
10
|
-
dispatch
|
|
10
|
+
dispatch,
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const makeMapStateToProps = () => {
|
|
14
14
|
const activeFiltersSelector = makeActiveFiltersSelector(
|
|
15
|
-
"ingestActiveFilters"
|
|
15
|
+
"ingestActiveFilters",
|
|
16
16
|
);
|
|
17
17
|
const mapStateToProps = (state, props) => ({
|
|
18
18
|
selectedFilter: state.ingestSelectedFilter,
|
|
@@ -14,7 +14,7 @@ const mapStateToProps = (state) => ({
|
|
|
14
14
|
const mapDispatchToProps = (dispatch) =>
|
|
15
15
|
bindActionCreators(
|
|
16
16
|
{ addFilter: addIngestFilter, resetFilters: resetIngestFilters },
|
|
17
|
-
dispatch
|
|
17
|
+
dispatch,
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
export default connect(mapStateToProps, mapDispatchToProps)(AvailableFilters);
|
|
@@ -14,11 +14,11 @@ import { compose } from "redux";
|
|
|
14
14
|
import { connect } from "react-redux";
|
|
15
15
|
import { injectIntl, FormattedMessage } from "react-intl";
|
|
16
16
|
import { DomainSelector, HistoryBackButton } from "@truedat/core/components";
|
|
17
|
-
import RichTextEditor from "./RichTextEditor";
|
|
18
17
|
import { ingestAction } from "../routines";
|
|
18
|
+
import RichTextEditor from "./RichTextEditor";
|
|
19
19
|
|
|
20
20
|
const SelectableDynamicForm = lazy(
|
|
21
|
-
() => import("@truedat/df/components/SelectableDynamicForm")
|
|
21
|
+
() => import("@truedat/df/components/SelectableDynamicForm"),
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
const actionKey = "create";
|
|
@@ -180,5 +180,5 @@ const mapStateToProps = ({ ingestActionLoading, ingestsActions }) => ({
|
|
|
180
180
|
|
|
181
181
|
export default compose(
|
|
182
182
|
injectIntl,
|
|
183
|
-
connect(mapStateToProps, { ingestAction })
|
|
183
|
+
connect(mapStateToProps, { ingestAction }),
|
|
184
184
|
)(IngestForm);
|
|
@@ -39,13 +39,13 @@ import Ingests from "./Ingests";
|
|
|
39
39
|
import IngestsLoader from "./IngestsLoader";
|
|
40
40
|
|
|
41
41
|
const EventsLoader = React.lazy(
|
|
42
|
-
() => import("@truedat/audit/components/EventsLoader")
|
|
42
|
+
() => import("@truedat/audit/components/EventsLoader"),
|
|
43
43
|
);
|
|
44
44
|
const RelationTagsLoader = React.lazy(
|
|
45
|
-
() => import("@truedat/lm/components/RelationTagsLoader")
|
|
45
|
+
() => import("@truedat/lm/components/RelationTagsLoader"),
|
|
46
46
|
);
|
|
47
47
|
const TemplatesLoader = React.lazy(
|
|
48
|
-
() => import("@truedat/core/components/TemplatesLoader")
|
|
48
|
+
() => import("@truedat/core/components/TemplatesLoader"),
|
|
49
49
|
);
|
|
50
50
|
|
|
51
51
|
const IngestRoutes = ({ ingestLoaded, ingest_id, templatesLoaded }) => {
|
|
@@ -27,10 +27,10 @@ const mapDispatchToProps = (dispatch) =>
|
|
|
27
27
|
resetFilters: resetIngestFilters,
|
|
28
28
|
toggleFilterValue: toggleIngestFilterValue,
|
|
29
29
|
},
|
|
30
|
-
dispatch
|
|
30
|
+
dispatch,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
export default compose(
|
|
34
34
|
injectIntl,
|
|
35
|
-
connect(mapStateToProps, mapDispatchToProps)
|
|
35
|
+
connect(mapStateToProps, mapDispatchToProps),
|
|
36
36
|
)(SelectedFilters);
|
|
@@ -26,10 +26,10 @@ const mapDispatchToProps = (dispatch) =>
|
|
|
26
26
|
resetFilters: resetIngestFilters,
|
|
27
27
|
toggleFilterValue: toggleIngestFilterValue,
|
|
28
28
|
},
|
|
29
|
-
dispatch
|
|
29
|
+
dispatch,
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
export default compose(
|
|
33
33
|
injectIntl,
|
|
34
|
-
connect(mapStateToProps, mapDispatchToProps)
|
|
34
|
+
connect(mapStateToProps, mapDispatchToProps),
|
|
35
35
|
)(SelectedFilters);
|
|
@@ -33,11 +33,11 @@ export const mapStateToProps = (state, ownProps) => {
|
|
|
33
33
|
selectedFilter,
|
|
34
34
|
selectedFilters: _.flow(
|
|
35
35
|
getIngestSelectedFilters,
|
|
36
|
-
_.without(["status"])
|
|
36
|
+
_.without(["status"]),
|
|
37
37
|
)(state),
|
|
38
38
|
selectedFilterActiveValues,
|
|
39
39
|
selectedFilterValues: _.map(
|
|
40
|
-
makeOption(formatMessage, translations, selectedFilter)
|
|
40
|
+
makeOption(formatMessage, translations, selectedFilter),
|
|
41
41
|
)(selectedFilterValues),
|
|
42
42
|
};
|
|
43
43
|
};
|
|
@@ -51,10 +51,10 @@ const mapDispatchToProps = (dispatch) =>
|
|
|
51
51
|
resetFilters: resetIngestFilters,
|
|
52
52
|
toggleFilterValue: toggleIngestFilterValue,
|
|
53
53
|
},
|
|
54
|
-
dispatch
|
|
54
|
+
dispatch,
|
|
55
55
|
);
|
|
56
56
|
|
|
57
57
|
export default compose(
|
|
58
58
|
injectIntl,
|
|
59
|
-
connect(mapStateToProps, mapDispatchToProps)
|
|
59
|
+
connect(mapStateToProps, mapDispatchToProps),
|
|
60
60
|
)(SelectedFilters);
|
|
@@ -33,7 +33,7 @@ IngestsLoader.propTypes = {
|
|
|
33
33
|
const makeMapStateToProps = () => {
|
|
34
34
|
const searchQuerySelector = makeSearchQuerySelector(
|
|
35
35
|
"ingestQuery",
|
|
36
|
-
"ingestActiveFilters"
|
|
36
|
+
"ingestActiveFilters",
|
|
37
37
|
);
|
|
38
38
|
const mapStateToProps = (state, props) => ({
|
|
39
39
|
payload: searchQuerySelector(state, props),
|
|
@@ -43,5 +43,5 @@ const makeMapStateToProps = () => {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export default connect(makeMapStateToProps, { clearIngests, fetchIngests })(
|
|
46
|
-
IngestsLoader
|
|
46
|
+
IngestsLoader,
|
|
47
47
|
);
|
|
@@ -18,15 +18,15 @@ export function IngestsTable() {
|
|
|
18
18
|
const ingests = useSelector(getIngestsRows);
|
|
19
19
|
const ingestsLoading = useSelector((state) => state.ingestsLoading);
|
|
20
20
|
const ingestsSorting = useSelector((state) =>
|
|
21
|
-
_.path("ingestQuery.sort")(state)
|
|
21
|
+
_.path("ingestQuery.sort")(state),
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
const initialSortInfo = getSortInfo(ingestsSorting);
|
|
25
25
|
const [sortedColumn, setSortedColumn] = useState(
|
|
26
|
-
_.prop("column")(initialSortInfo)
|
|
26
|
+
_.prop("column")(initialSortInfo),
|
|
27
27
|
);
|
|
28
28
|
const [direction, setDirection] = useState(
|
|
29
|
-
_.prop("direction")(initialSortInfo)
|
|
29
|
+
_.prop("direction")(initialSortInfo),
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
useEffect(() => {
|
|
@@ -39,7 +39,7 @@ export function IngestsTable() {
|
|
|
39
39
|
const ingestColumns = columns.filter(
|
|
40
40
|
(column) =>
|
|
41
41
|
(pathname == INGESTS && column.name != "status") ||
|
|
42
|
-
pathname == INGESTS_PENDING
|
|
42
|
+
pathname == INGESTS_PENDING,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
const handleSortColumn = (column) => {
|
|
@@ -49,7 +49,7 @@ export function IngestsTable() {
|
|
|
49
49
|
setDirection,
|
|
50
50
|
setSortedColumn,
|
|
51
51
|
direction,
|
|
52
|
-
sortedColumn
|
|
52
|
+
sortedColumn,
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -138,7 +138,7 @@ export const RichTextEditor = ({
|
|
|
138
138
|
name,
|
|
139
139
|
}) => {
|
|
140
140
|
const [jsonValue, setJsonValue] = useState(
|
|
141
|
-
_.isEmpty(propValue) ? EMPTY_VALUE : propValue
|
|
141
|
+
_.isEmpty(propValue) ? EMPTY_VALUE : propValue,
|
|
142
142
|
);
|
|
143
143
|
const [value, setValue] = useState(Value.fromJSON(jsonValue));
|
|
144
144
|
const [editor, setEditor] = useState();
|
|
@@ -193,7 +193,7 @@ export const RichTextEditor = ({
|
|
|
193
193
|
const isType = value?.blocks.some((block) => {
|
|
194
194
|
return !!document?.getClosest(
|
|
195
195
|
block.key,
|
|
196
|
-
(parent) => parent.type == type
|
|
196
|
+
(parent) => parent.type == type,
|
|
197
197
|
);
|
|
198
198
|
});
|
|
199
199
|
|
|
@@ -205,7 +205,7 @@ export const RichTextEditor = ({
|
|
|
205
205
|
} else if (isList) {
|
|
206
206
|
editor
|
|
207
207
|
.unwrapBlock(
|
|
208
|
-
type == "bulleted-list" ? "numbered-list" : "bulleted-list"
|
|
208
|
+
type == "bulleted-list" ? "numbered-list" : "bulleted-list",
|
|
209
209
|
)
|
|
210
210
|
.wrapBlock(type);
|
|
211
211
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
+
import { useParams } from "react-router";
|
|
2
3
|
import { fetchIngestArchive, clearIngestArchive } from "../../routines";
|
|
3
4
|
import IngestArchiveLoader from "../IngestArchiveLoader";
|
|
4
|
-
import { useParams } from "react-router";
|
|
5
5
|
|
|
6
6
|
// Mock useParams
|
|
7
7
|
jest.mock("react-router", () => ({
|
|
@@ -56,7 +56,7 @@ describe("<IngestArchiveLoader />", () => {
|
|
|
56
56
|
|
|
57
57
|
// Verify fetchIngestArchive wasn't called again
|
|
58
58
|
const fetchCalls = mockDispatch.mock.calls.filter(
|
|
59
|
-
(call) => call[0].type === fetchIngestArchive.TRIGGER
|
|
59
|
+
(call) => call[0].type === fetchIngestArchive.TRIGGER,
|
|
60
60
|
);
|
|
61
61
|
expect(fetchCalls.length).toBe(1);
|
|
62
62
|
});
|
|
@@ -70,7 +70,7 @@ describe("<IngestArchiveLoader />", () => {
|
|
|
70
70
|
|
|
71
71
|
// Verify clearIngestArchive wasn't called on mount
|
|
72
72
|
const clearCallsBeforeUnmount = mockDispatch.mock.calls.filter(
|
|
73
|
-
(call) => call[0].type === clearIngestArchive.TRIGGER
|
|
73
|
+
(call) => call[0].type === clearIngestArchive.TRIGGER,
|
|
74
74
|
);
|
|
75
75
|
expect(clearCallsBeforeUnmount.length).toBe(0);
|
|
76
76
|
|
|
@@ -39,7 +39,7 @@ describe("<IngestForm />", () => {
|
|
|
39
39
|
await user.click(await rendered.findByText(/foodomain/i));
|
|
40
40
|
|
|
41
41
|
await waitFor(() =>
|
|
42
|
-
expect(rendered.queryByText(/template1/i)).toBeInTheDocument()
|
|
42
|
+
expect(rendered.queryByText(/template1/i)).toBeInTheDocument(),
|
|
43
43
|
);
|
|
44
44
|
});
|
|
45
45
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
+
import { useParams } from "react-router";
|
|
2
3
|
import { fetchIngest, clearIngest } from "../../routines";
|
|
3
4
|
import IngestLoader from "../IngestLoader";
|
|
4
|
-
import { useParams } from "react-router";
|
|
5
5
|
|
|
6
6
|
// Mock useParams
|
|
7
7
|
jest.mock("react-router", () => ({
|
|
@@ -56,7 +56,7 @@ describe("<IngestLoader />", () => {
|
|
|
56
56
|
|
|
57
57
|
// Verify fetchIngest wasn't called again
|
|
58
58
|
const fetchCalls = mockDispatch.mock.calls.filter(
|
|
59
|
-
(call) => call[0].type === fetchIngest.TRIGGER
|
|
59
|
+
(call) => call[0].type === fetchIngest.TRIGGER,
|
|
60
60
|
);
|
|
61
61
|
expect(fetchCalls.length).toBe(1);
|
|
62
62
|
});
|
|
@@ -70,7 +70,7 @@ describe("<IngestLoader />", () => {
|
|
|
70
70
|
|
|
71
71
|
// Verify clearIngest wasn't called on mount
|
|
72
72
|
const clearCallsBeforeUnmount = mockDispatch.mock.calls.filter(
|
|
73
|
-
(call) => call[0].type === clearIngest.TRIGGER
|
|
73
|
+
(call) => call[0].type === clearIngest.TRIGGER,
|
|
74
74
|
);
|
|
75
75
|
expect(clearCallsBeforeUnmount.length).toBe(0);
|
|
76
76
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
|
-
import IngestRoutes from "../IngestRoutes";
|
|
4
3
|
import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
|
|
5
4
|
import {
|
|
6
5
|
INGEST,
|
|
@@ -15,6 +14,7 @@ import {
|
|
|
15
14
|
INGESTS_NEW,
|
|
16
15
|
INGEST_EXECUTIONS,
|
|
17
16
|
} from "@truedat/core/routes";
|
|
17
|
+
import IngestRoutes from "../IngestRoutes";
|
|
18
18
|
|
|
19
19
|
jest.mock("@truedat/core/hooks/useAuthorized", () => ({
|
|
20
20
|
useAuthorized: jest.fn(() => true),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
-
import { IngestSelectedFilters } from "../IngestSelectedFilters";
|
|
3
2
|
import { INGESTS, INGESTS_PENDING } from "@truedat/core/routes";
|
|
3
|
+
import { IngestSelectedFilters } from "../IngestSelectedFilters";
|
|
4
4
|
|
|
5
5
|
// Mock all child components used in routes
|
|
6
6
|
jest.mock("../IngestSelectedFiltersDefault", () => () => (
|
|
@@ -12,13 +12,13 @@ describe("reducers: ingest", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the clearIngest.TRIGGER action", () => {
|
|
14
14
|
expect(ingest(fooState, { type: clearIngest.TRIGGER })).toEqual(
|
|
15
|
-
initialState
|
|
15
|
+
initialState,
|
|
16
16
|
);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should handle the fetchIngest.TRIGGER action", () => {
|
|
20
20
|
expect(ingest(fooState, { type: fetchIngest.TRIGGER })).toEqual(
|
|
21
|
-
initialState
|
|
21
|
+
initialState,
|
|
22
22
|
);
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -27,8 +27,8 @@ describe("reducers: ingest", () => {
|
|
|
27
27
|
expect(
|
|
28
28
|
ingest(fooState, {
|
|
29
29
|
type: fetchIngest.SUCCESS,
|
|
30
|
-
payload: { data }
|
|
31
|
-
})
|
|
30
|
+
payload: { data },
|
|
31
|
+
}),
|
|
32
32
|
).toEqual(data);
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -7,7 +7,7 @@ describe("reducers: ingestActions", () => {
|
|
|
7
7
|
const initialState = {};
|
|
8
8
|
const _actions = {
|
|
9
9
|
action1: { href: "/api/action1", method: "POST" },
|
|
10
|
-
action2: { href: "/api/action2", method: "GET" }
|
|
10
|
+
action2: { href: "/api/action2", method: "GET" },
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
it("should provide the initial state", () => {
|
|
@@ -16,13 +16,13 @@ describe("reducers: ingestActions", () => {
|
|
|
16
16
|
|
|
17
17
|
it("should handle the clearIngest.TRIGGER action", () => {
|
|
18
18
|
expect(ingestActions(fooState, { type: clearIngest.TRIGGER })).toEqual(
|
|
19
|
-
initialState
|
|
19
|
+
initialState,
|
|
20
20
|
);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
it("should handle the fetchIngest.TRIGGER action", () => {
|
|
24
24
|
expect(ingestActions(fooState, { type: fetchIngest.TRIGGER })).toEqual(
|
|
25
|
-
initialState
|
|
25
|
+
initialState,
|
|
26
26
|
);
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -30,8 +30,8 @@ describe("reducers: ingestActions", () => {
|
|
|
30
30
|
expect(
|
|
31
31
|
ingestActions(fooState, {
|
|
32
32
|
type: fetchIngest.SUCCESS,
|
|
33
|
-
payload: { _actions }
|
|
34
|
-
})
|
|
33
|
+
payload: { _actions },
|
|
34
|
+
}),
|
|
35
35
|
).toEqual(_actions);
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
closeIngestFilter,
|
|
5
5
|
removeIngestFilter,
|
|
6
6
|
resetIngestFilters,
|
|
7
|
-
toggleIngestFilterValue
|
|
7
|
+
toggleIngestFilterValue,
|
|
8
8
|
} from "../../routines";
|
|
9
9
|
import { ingestActiveFilters } from "..";
|
|
10
10
|
|
|
@@ -21,8 +21,8 @@ describe("reducers: ingestActiveFilters", () => {
|
|
|
21
21
|
expect(
|
|
22
22
|
ingestActiveFilters(fooState, {
|
|
23
23
|
type: addIngestFilter.TRIGGER,
|
|
24
|
-
payload
|
|
25
|
-
})
|
|
24
|
+
payload,
|
|
25
|
+
}),
|
|
26
26
|
).toEqual({ ...fooState, baz: [] });
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -34,8 +34,8 @@ describe("reducers: ingestActiveFilters", () => {
|
|
|
34
34
|
expect(
|
|
35
35
|
ingestActiveFilters(state, {
|
|
36
36
|
type: closeIngestFilter.TRIGGER,
|
|
37
|
-
payload
|
|
38
|
-
})
|
|
37
|
+
payload,
|
|
38
|
+
}),
|
|
39
39
|
).toEqual({ foo });
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -47,16 +47,16 @@ describe("reducers: ingestActiveFilters", () => {
|
|
|
47
47
|
expect(
|
|
48
48
|
ingestActiveFilters(state, {
|
|
49
49
|
type: removeIngestFilter.TRIGGER,
|
|
50
|
-
payload
|
|
51
|
-
})
|
|
50
|
+
payload,
|
|
51
|
+
}),
|
|
52
52
|
).toEqual({ bar });
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
it("should handle the resetIngestFilters.TRIGGER action", () => {
|
|
56
56
|
expect(
|
|
57
57
|
ingestActiveFilters(fooState, {
|
|
58
|
-
type: resetIngestFilters.TRIGGER
|
|
59
|
-
})
|
|
58
|
+
type: resetIngestFilters.TRIGGER,
|
|
59
|
+
}),
|
|
60
60
|
).toEqual(initialState);
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -68,8 +68,8 @@ describe("reducers: ingestActiveFilters", () => {
|
|
|
68
68
|
expect(
|
|
69
69
|
ingestActiveFilters(state, {
|
|
70
70
|
type: toggleIngestFilterValue.TRIGGER,
|
|
71
|
-
payload
|
|
72
|
-
})
|
|
71
|
+
payload,
|
|
72
|
+
}),
|
|
73
73
|
).toEqual({ foo: ["foo1", "foo3"], bar });
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -12,7 +12,7 @@ describe("reducers: ingestArchive", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the fetchIngestArchive.REQUEST action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
ingestArchive(fooState, { type: fetchIngestArchive.REQUEST })
|
|
15
|
+
ingestArchive(fooState, { type: fetchIngestArchive.REQUEST }),
|
|
16
16
|
).toEqual(initialState);
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -23,14 +23,14 @@ describe("reducers: ingestArchive", () => {
|
|
|
23
23
|
status: "status",
|
|
24
24
|
last_change_at: "2018-06-27T07:32:53.154377Z",
|
|
25
25
|
last_change_by: "maixu",
|
|
26
|
-
version: 1
|
|
27
|
-
}
|
|
26
|
+
version: 1,
|
|
27
|
+
},
|
|
28
28
|
];
|
|
29
29
|
expect(
|
|
30
30
|
ingestArchive(fooState, {
|
|
31
31
|
type: fetchIngestArchive.SUCCESS,
|
|
32
|
-
payload: { data }
|
|
33
|
-
})
|
|
32
|
+
payload: { data },
|
|
33
|
+
}),
|
|
34
34
|
).toEqual(data);
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -10,13 +10,13 @@ describe("reducers: ingestArchiveLoading", () => {
|
|
|
10
10
|
|
|
11
11
|
it("should be true after receiving the fetchIngest.TRIGGER action", () => {
|
|
12
12
|
expect(
|
|
13
|
-
ingestArchiveLoading(fooState, { type: fetchIngestArchive.TRIGGER })
|
|
13
|
+
ingestArchiveLoading(fooState, { type: fetchIngestArchive.TRIGGER }),
|
|
14
14
|
).toBe(true);
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
it("should be false after receiving the fetchIngest.FULFILL action", () => {
|
|
18
18
|
expect(
|
|
19
|
-
ingestArchiveLoading(fooState, { type: fetchIngestArchive.FULFILL })
|
|
19
|
+
ingestArchiveLoading(fooState, { type: fetchIngestArchive.FULFILL }),
|
|
20
20
|
).toBe(false);
|
|
21
21
|
});
|
|
22
22
|
|