@truedat/dq 4.44.2 → 4.44.5
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/CHANGELOG.md +19 -1
- package/package.json +24 -17
- package/src/components/EditRule.js +1 -1
- package/src/components/ExecutionForm.js +68 -78
- package/src/components/ExecutionPopup.js +10 -6
- package/src/components/NewRule.js +1 -1
- package/src/components/NewRuleImplementation.js +85 -128
- package/src/components/RemediationForm.js +26 -64
- package/src/components/RemediationPlan.js +1 -1
- package/src/components/RuleFilters.js +1 -5
- package/src/components/RuleForm.js +76 -116
- package/src/components/RuleImplementation.js +29 -13
- package/src/components/RuleImplementationActions.js +11 -21
- package/src/components/RuleImplementationFilters.js +1 -5
- package/src/components/RuleImplementationsActions.js +1 -1
- package/src/components/RuleResultsRoutes.js +41 -56
- package/src/components/RuleRoutes.js +40 -56
- package/src/components/RulesRoutes.js +0 -5
- package/src/components/__tests__/ExecutionForm.spec.js +20 -12
- package/src/components/__tests__/ExecutionPopup.spec.js +3 -2
- package/src/components/__tests__/ImplementationResultBar.spec.js +44 -63
- package/src/components/__tests__/InformationSummary.spec.js +2 -6
- package/src/components/__tests__/NewRuleImplementation.spec.js +27 -17
- package/src/components/__tests__/RemediationForm.spec.js +16 -62
- package/src/components/__tests__/RemediationPlan.spec.js +49 -73
- package/src/components/__tests__/RuleForm.spec.js +54 -211
- package/src/components/__tests__/RuleImplementation.spec.js +45 -22
- package/src/components/__tests__/RuleImplementationsActions.spec.js +0 -1
- package/src/components/__tests__/RuleImplementationsOptions.spec.js +1 -10
- package/src/components/__tests__/RuleProperties.spec.js +39 -27
- package/src/components/__tests__/RuleResultsUpload.spec.js +1 -5
- package/src/components/__tests__/RuleSummary.spec.js +6 -11
- package/src/components/__tests__/__snapshots__/EditRule.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/ExecutionForm.spec.js.snap +74 -5
- package/src/components/__tests__/__snapshots__/NewRule.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/NewRuleImplementation.spec.js.snap +202 -2
- package/src/components/__tests__/__snapshots__/RemediationForm.spec.js.snap +79 -6
- package/src/components/__tests__/__snapshots__/RemediationPlan.spec.js.snap +40 -1
- package/src/components/__tests__/__snapshots__/RuleForm.spec.js.snap +846 -382
- package/src/components/__tests__/__snapshots__/RuleImplementation.spec.js.snap +71 -5
- package/src/components/__tests__/__snapshots__/RuleImplementationsActions.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleImplementationsSearch.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/RuleProperties.spec.js.snap +68 -56
- package/src/components/__tests__/__snapshots__/RuleSearch.spec.js.snap +1 -1
- package/src/components/index.js +0 -2
- package/src/components/ruleImplementationForm/InformationForm.js +26 -81
- package/src/components/ruleImplementationForm/RuleImplementationForm.js +41 -45
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +54 -111
- package/src/components/ruleImplementationForm/__tests__/LimitsForm.spec.js +9 -35
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +30 -53
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +175 -156
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationForm.spec.js.snap +161 -19
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +412 -159
- package/src/messages/en.js +3 -6
- package/src/messages/es.js +3 -6
- package/src/components/DynamicRuleForm.js +0 -78
- package/src/components/__tests__/DynamicRuleForm.spec.js +0 -51
- package/src/components/__tests__/__snapshots__/DynamicRuleForm.spec.js.snap +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.44.5] 2022-05-20
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- [TD-4230] Refactored components to use `SelectableDynamicForm`:
|
|
8
|
+
- `NewRuleImplementation`
|
|
9
|
+
- `RemediationForm`
|
|
10
|
+
- `RuleForm`
|
|
11
|
+
- `InformationForm`
|
|
12
|
+
- `RuleImplementationRawForm`
|
|
13
|
+
|
|
14
|
+
## [4.44.3] 2022-05-11
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- [TD-4045] Implementation execution button in implementation view
|
|
19
|
+
|
|
3
20
|
## [4.44.2] 2022-05-11
|
|
4
21
|
|
|
5
22
|
### Fixed
|
|
@@ -16,7 +33,8 @@
|
|
|
16
33
|
|
|
17
34
|
# Added
|
|
18
35
|
|
|
19
|
-
- [TD-4538] Add more coding for segments configuration and segment results for
|
|
36
|
+
- [TD-4538] Add more coding for segments configuration and segment results for
|
|
37
|
+
implementations
|
|
20
38
|
|
|
21
39
|
## [4.43.3] 2022-05-04
|
|
22
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.44.
|
|
3
|
+
"version": "4.44.5",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -22,17 +22,20 @@
|
|
|
22
22
|
"eslint:fix": "eslint --fix src/**"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/cli": "^7.
|
|
26
|
-
"@babel/core": "^7.
|
|
27
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
28
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
29
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
25
|
+
"@babel/cli": "^7.17.10",
|
|
26
|
+
"@babel/core": "^7.18.0",
|
|
27
|
+
"@babel/plugin-proposal-class-properties": "^7.17.12",
|
|
28
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.18.0",
|
|
29
|
+
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
|
|
30
30
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
31
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
33
|
-
"@babel/preset-react": "^7.
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
31
|
+
"@babel/plugin-transform-modules-commonjs": "^7.18.0",
|
|
32
|
+
"@babel/preset-env": "^7.18.0",
|
|
33
|
+
"@babel/preset-react": "^7.17.12",
|
|
34
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
35
|
+
"@testing-library/react": "^12.0.0",
|
|
36
|
+
"@testing-library/user-event": "^13.2.1",
|
|
37
|
+
"@truedat/test": "4.44.5",
|
|
38
|
+
"babel-jest": "^28.1.0",
|
|
36
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
37
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
38
41
|
"babel-plugin-react-intl": "^5.1.18",
|
|
@@ -41,7 +44,8 @@
|
|
|
41
44
|
"enzyme-adapter-react-16": "^1.15.6",
|
|
42
45
|
"enzyme-to-json": "^3.6.2",
|
|
43
46
|
"identity-obj-proxy": "^3.0.0",
|
|
44
|
-
"jest": "^
|
|
47
|
+
"jest": "^28.1.0",
|
|
48
|
+
"jest-environment-jsdom": "^28.1.0",
|
|
45
49
|
"react": "^16.14.0",
|
|
46
50
|
"react-dom": "^16.14.0",
|
|
47
51
|
"redux-saga-test-plan": "^4.0.4",
|
|
@@ -49,6 +53,8 @@
|
|
|
49
53
|
"semantic-ui-react": "^2.0.3"
|
|
50
54
|
},
|
|
51
55
|
"jest": {
|
|
56
|
+
"maxWorkers": "50%",
|
|
57
|
+
"testTimeout": 10000,
|
|
52
58
|
"moduleDirectories": [
|
|
53
59
|
"<rootDir>/src",
|
|
54
60
|
"../../node_modules"
|
|
@@ -81,15 +87,16 @@
|
|
|
81
87
|
]
|
|
82
88
|
},
|
|
83
89
|
"dependencies": {
|
|
84
|
-
"@apollo/client": "^3.4
|
|
85
|
-
"@truedat/core": "4.44.
|
|
86
|
-
"@truedat/df": "4.44.
|
|
90
|
+
"@apollo/client": "^3.6.4",
|
|
91
|
+
"@truedat/core": "4.44.5",
|
|
92
|
+
"@truedat/df": "4.44.5",
|
|
87
93
|
"axios": "^0.19.2",
|
|
88
94
|
"graphql": "^15.5.3",
|
|
89
95
|
"path-to-regexp": "^1.7.0",
|
|
90
|
-
"prop-types": "^15.
|
|
96
|
+
"prop-types": "^15.8.1",
|
|
91
97
|
"rc-slider": "^8.6.1",
|
|
92
98
|
"react-intl": "^5.20.10",
|
|
99
|
+
"react-moment": "^1.1.2",
|
|
93
100
|
"react-redux": "^7.2.4",
|
|
94
101
|
"react-router-dom": "^5.2.0",
|
|
95
102
|
"redux": "^4.1.1",
|
|
@@ -103,5 +110,5 @@
|
|
|
103
110
|
"react-dom": ">= 16.8.6 < 17",
|
|
104
111
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
105
112
|
},
|
|
106
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "5a339468198c803592b285eddd0dd0c0b0eced93"
|
|
107
114
|
}
|
|
@@ -15,7 +15,7 @@ export const EditRule = ({ rule, updateRule }) =>
|
|
|
15
15
|
<FormattedMessage id="quality.actions.edit" />
|
|
16
16
|
</Header.Content>
|
|
17
17
|
</Header>
|
|
18
|
-
<RuleForm
|
|
18
|
+
<RuleForm onSubmit={updateRule} rule={rule} editMode />
|
|
19
19
|
</Container>
|
|
20
20
|
);
|
|
21
21
|
|
|
@@ -1,48 +1,35 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { Button, Form, Header } from "semantic-ui-react";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
|
-
import { connect } from "react-redux";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
|
-
import {
|
|
6
|
+
import { TemplateSelector } from "@truedat/core/components";
|
|
7
7
|
import { validateContent } from "@truedat/df/utils";
|
|
8
|
-
import { selectTemplate } from "@truedat/df/routines";
|
|
9
|
-
|
|
10
|
-
const TemplateSelector = React.lazy(() =>
|
|
11
|
-
import("@truedat/df/templates/components/TemplateSelector")
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const TemplateLoader = React.lazy(() =>
|
|
15
|
-
import("@truedat/df/templates/components/TemplateLoader")
|
|
16
|
-
);
|
|
17
8
|
|
|
18
9
|
const DynamicForm = React.lazy(() =>
|
|
19
10
|
import("@truedat/df/components/DynamicForm")
|
|
20
11
|
);
|
|
21
12
|
|
|
22
|
-
export const ExecutionForm = ({
|
|
23
|
-
count,
|
|
24
|
-
selectTemplate,
|
|
25
|
-
template,
|
|
26
|
-
templates,
|
|
27
|
-
handleSubmit,
|
|
28
|
-
onCancel,
|
|
29
|
-
}) => {
|
|
13
|
+
export const ExecutionForm = ({ count, onSubmit, onCancel }) => {
|
|
30
14
|
const { formatMessage } = useIntl();
|
|
31
15
|
const [content, setContent] = useState({});
|
|
16
|
+
const [template, setTemplate] = useState();
|
|
17
|
+
const [templatesLoading, setTemplatesLoading] = useState(true);
|
|
32
18
|
|
|
33
19
|
const handleContentChange = (content) => setContent(content);
|
|
34
20
|
|
|
35
|
-
const
|
|
36
|
-
|
|
21
|
+
const handleTemplatesLoaded = ({ templates }) => {
|
|
22
|
+
setTemplatesLoading(false);
|
|
23
|
+
if (templates?.length === 1) {
|
|
24
|
+
setTemplate(templates[0]);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const handleTemplateSelected = (e, { template }) => setTemplate(template);
|
|
37
29
|
|
|
38
30
|
const isInvalid = () =>
|
|
39
31
|
template && !_.isEmpty(validateContent(template)(content));
|
|
40
32
|
|
|
41
|
-
if (_.size(templates) == 1) {
|
|
42
|
-
const id = _.flow(_.head, _.prop("id"))(templates);
|
|
43
|
-
selectTemplate({ id });
|
|
44
|
-
}
|
|
45
|
-
|
|
46
33
|
return (
|
|
47
34
|
<>
|
|
48
35
|
<Header
|
|
@@ -51,66 +38,69 @@ export const ExecutionForm = ({
|
|
|
51
38
|
id: "implementations.actions.execution.confirmation.header",
|
|
52
39
|
})}
|
|
53
40
|
/>
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
<Form loading={templatesLoading}>
|
|
42
|
+
<TemplateSelector
|
|
43
|
+
scope="qe"
|
|
44
|
+
selectedValue={template?.id}
|
|
45
|
+
onChange={handleTemplateSelected}
|
|
46
|
+
onLoad={handleTemplatesLoaded}
|
|
47
|
+
clearable
|
|
48
|
+
/>
|
|
49
|
+
{template?.id ? (
|
|
50
|
+
<>
|
|
51
|
+
<Header
|
|
52
|
+
as="h3"
|
|
53
|
+
content={formatMessage({
|
|
54
|
+
id: "implementations.actions.execution.confirmation.legend",
|
|
55
|
+
})}
|
|
63
56
|
/>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
57
|
+
<div
|
|
58
|
+
style={{
|
|
59
|
+
maxHeight: "calc(100vh - 550px)",
|
|
60
|
+
overflowY: "auto",
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<DynamicForm
|
|
64
|
+
onChange={handleContentChange}
|
|
65
|
+
content={content}
|
|
66
|
+
template={template}
|
|
72
67
|
/>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
</div>
|
|
69
|
+
</>
|
|
70
|
+
) : null}
|
|
71
|
+
<p>
|
|
72
|
+
{formatMessage(
|
|
73
|
+
{
|
|
74
|
+
id:
|
|
75
|
+
count === 1
|
|
76
|
+
? "implementation.actions.execution.confirmation.content"
|
|
77
|
+
: "implementations.actions.execution.confirmation.content",
|
|
78
|
+
},
|
|
79
|
+
{ implementations_count: count }
|
|
79
80
|
)}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
onClick={() => handleSubmit(content)}
|
|
96
|
-
content={formatMessage({ id: "actions.create" })}
|
|
97
|
-
/>
|
|
98
|
-
</div>
|
|
99
|
-
</Form>
|
|
100
|
-
</Suspense>
|
|
81
|
+
</p>
|
|
82
|
+
<div className="actions">
|
|
83
|
+
<Button
|
|
84
|
+
secondary
|
|
85
|
+
onClick={onCancel}
|
|
86
|
+
content={formatMessage({ id: "actions.cancel" })}
|
|
87
|
+
/>
|
|
88
|
+
<Button
|
|
89
|
+
primary
|
|
90
|
+
disabled={isInvalid()}
|
|
91
|
+
onClick={() => onSubmit(content)}
|
|
92
|
+
content={formatMessage({ id: "actions.create" })}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
</Form>
|
|
101
96
|
</>
|
|
102
97
|
);
|
|
103
98
|
};
|
|
104
99
|
|
|
105
100
|
ExecutionForm.propTypes = {
|
|
106
101
|
count: PropTypes.number,
|
|
107
|
-
|
|
108
|
-
templates: PropTypes.array,
|
|
109
|
-
selectTemplate: PropTypes.func,
|
|
110
|
-
handleSubmit: PropTypes.func,
|
|
102
|
+
onSubmit: PropTypes.func,
|
|
111
103
|
onCancel: PropTypes.func,
|
|
112
104
|
};
|
|
113
105
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export default connect(mapStateToProps, { selectTemplate })(ExecutionForm);
|
|
106
|
+
export default ExecutionForm;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _ from "lodash/fp";
|
|
2
1
|
import React, { useState } from "react";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
3
|
import { connect } from "react-redux";
|
|
@@ -10,7 +9,7 @@ export const ExecutionPopup = ({
|
|
|
10
9
|
disabled,
|
|
11
10
|
executionGroupLoading,
|
|
12
11
|
count,
|
|
13
|
-
|
|
12
|
+
onSubmit,
|
|
14
13
|
}) => {
|
|
15
14
|
const { formatMessage } = useIntl();
|
|
16
15
|
const [open, setOpen] = useState(false);
|
|
@@ -32,14 +31,17 @@ export const ExecutionPopup = ({
|
|
|
32
31
|
disabled={disabled}
|
|
33
32
|
loading={executionGroupLoading}
|
|
34
33
|
content={formatMessage({
|
|
35
|
-
id:
|
|
34
|
+
id:
|
|
35
|
+
count === 1
|
|
36
|
+
? "implementation.actions.do_execution"
|
|
37
|
+
: "implementations.actions.do_execution",
|
|
36
38
|
})}
|
|
37
39
|
/>
|
|
38
40
|
}
|
|
39
41
|
>
|
|
40
42
|
<ExecutionForm
|
|
41
43
|
count={count}
|
|
42
|
-
|
|
44
|
+
onSubmit={onSubmit}
|
|
43
45
|
onCancel={() => setOpen(false)}
|
|
44
46
|
/>
|
|
45
47
|
</Popup>
|
|
@@ -50,9 +52,11 @@ ExecutionPopup.propTypes = {
|
|
|
50
52
|
count: PropTypes.number,
|
|
51
53
|
disabled: PropTypes.bool,
|
|
52
54
|
executionGroupLoading: PropTypes.bool,
|
|
53
|
-
|
|
55
|
+
onSubmit: PropTypes.func,
|
|
54
56
|
};
|
|
55
57
|
|
|
56
|
-
const mapStateToProps =
|
|
58
|
+
const mapStateToProps = ({ executionGroupLoading }) => ({
|
|
59
|
+
executionGroupLoading,
|
|
60
|
+
});
|
|
57
61
|
|
|
58
62
|
export default connect(mapStateToProps)(ExecutionPopup);
|