@truedat/ie 6.8.1 → 6.8.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/ie",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.2",
|
|
4
4
|
"description": "Truedat Web Ingests",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "6.
|
|
37
|
+
"@truedat/test": "6.8.2",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@truedat/core": "6.8.
|
|
90
|
-
"@truedat/df": "6.8.
|
|
89
|
+
"@truedat/core": "6.8.2",
|
|
90
|
+
"@truedat/df": "6.8.2",
|
|
91
91
|
"file-saver": "^2.0.5",
|
|
92
92
|
"moment": "^2.29.4",
|
|
93
93
|
"path-to-regexp": "^1.7.0",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "be2060255c20fe0ae577185fcc990a07a3644106"
|
|
111
111
|
}
|
|
@@ -10,14 +10,14 @@ const DynamicFormViewer = React.lazy(() =>
|
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
export const IngestDetails = ({
|
|
13
|
-
ingest: {
|
|
13
|
+
ingest: { dynamic_content, description, template },
|
|
14
14
|
}) => (
|
|
15
15
|
<Segment attached="bottom">
|
|
16
16
|
<Header as="h3">
|
|
17
17
|
<FormattedMessage id="ingests.props.description" />
|
|
18
18
|
</Header>
|
|
19
19
|
<RichTextEditor readOnly value={description} />
|
|
20
|
-
<DynamicFormViewer template={template} content={
|
|
20
|
+
<DynamicFormViewer template={template} content={dynamic_content} />
|
|
21
21
|
</Segment>
|
|
22
22
|
);
|
|
23
23
|
|
|
@@ -79,12 +79,13 @@ export class IngestEdit extends React.Component {
|
|
|
79
79
|
setStateFromProps() {
|
|
80
80
|
if (
|
|
81
81
|
_.isUndefined(this.state.content) &&
|
|
82
|
-
!_.isUndefined(this.props.ingest.
|
|
82
|
+
!_.isUndefined(this.props.ingest.dynamic_content)
|
|
83
83
|
) {
|
|
84
|
-
const {
|
|
84
|
+
const { dynamic_content, domain, name, description, type } =
|
|
85
|
+
this.props.ingest;
|
|
85
86
|
const domain_id = domain.id;
|
|
86
87
|
this.setState({
|
|
87
|
-
content,
|
|
88
|
+
content: dynamic_content,
|
|
88
89
|
name,
|
|
89
90
|
description,
|
|
90
91
|
type,
|
|
@@ -4,15 +4,15 @@ import { IngestEdit } from "../IngestEdit";
|
|
|
4
4
|
|
|
5
5
|
describe("<IngestEdit />", () => {
|
|
6
6
|
const action = {};
|
|
7
|
-
const applyTemplate = x => x;
|
|
7
|
+
const applyTemplate = (x) => x;
|
|
8
8
|
const ingestAction = jest.fn();
|
|
9
9
|
const ingestActionLoading = "some action";
|
|
10
10
|
const template = { id: 1, name: "template1" };
|
|
11
11
|
const templateLoading = false;
|
|
12
12
|
const ingest = {
|
|
13
|
-
|
|
13
|
+
dynamic_content: {},
|
|
14
14
|
description: {},
|
|
15
|
-
domain: {}
|
|
15
|
+
domain: {},
|
|
16
16
|
};
|
|
17
17
|
const selectDomain = jest.fn();
|
|
18
18
|
const selectTemplate = jest.fn();
|
|
@@ -28,7 +28,7 @@ describe("<IngestEdit />", () => {
|
|
|
28
28
|
selectDomain,
|
|
29
29
|
selectTemplate,
|
|
30
30
|
history,
|
|
31
|
-
applyTemplate
|
|
31
|
+
applyTemplate,
|
|
32
32
|
};
|
|
33
33
|
it("matches the latest snapshot", () => {
|
|
34
34
|
const wrapper = shallowWithIntl(<IngestEdit {...initProps} />);
|
|
@@ -38,10 +38,7 @@ describe("<IngestEdit />", () => {
|
|
|
38
38
|
it("dispatch ingestAction when button submit is clicked", () => {
|
|
39
39
|
const e = { preventDefault: jest.fn() };
|
|
40
40
|
const wrapper = shallowWithIntl(<IngestEdit {...initProps} />);
|
|
41
|
-
wrapper
|
|
42
|
-
.find("Button")
|
|
43
|
-
.first()
|
|
44
|
-
.simulate("click", e);
|
|
41
|
+
wrapper.find("Button").first().simulate("click", e);
|
|
45
42
|
expect(ingestAction.mock.calls.length).toBe(1);
|
|
46
43
|
});
|
|
47
44
|
|
|
@@ -63,7 +60,7 @@ describe("<IngestEdit />", () => {
|
|
|
63
60
|
const clearTemplate = jest.fn();
|
|
64
61
|
const props = {
|
|
65
62
|
...initProps,
|
|
66
|
-
clearTemplate
|
|
63
|
+
clearTemplate,
|
|
67
64
|
};
|
|
68
65
|
jest.spyOn(IngestEdit.prototype, "componentWillUnmount");
|
|
69
66
|
const wrapper = shallowWithIntl(<IngestEdit {...props} />);
|
|
@@ -6,6 +6,7 @@ const initialState = {};
|
|
|
6
6
|
const pickFields = _.pick([
|
|
7
7
|
"id",
|
|
8
8
|
"content",
|
|
9
|
+
"dynamic_content",
|
|
9
10
|
"description",
|
|
10
11
|
"domain",
|
|
11
12
|
"name",
|
|
@@ -19,7 +20,7 @@ const pickFields = _.pick([
|
|
|
19
20
|
"last_change_user",
|
|
20
21
|
"graphs",
|
|
21
22
|
"completeness",
|
|
22
|
-
"in_progress"
|
|
23
|
+
"in_progress",
|
|
23
24
|
]);
|
|
24
25
|
|
|
25
26
|
export const ingest = (state = initialState, { type, payload, meta }) => {
|