@truedat/dq 4.36.9 → 4.37.3
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 +26 -0
- package/package.json +4 -4
- package/src/components/ImplementationsRoutes.js +4 -0
- package/src/components/RuleEventRow.js +47 -0
- package/src/components/RuleEvents.js +31 -0
- package/src/components/RuleImplementationSelectedFilters.js +18 -0
- package/src/components/RuleImplementationsDownload.js +2 -1
- package/src/components/RuleRoutes.js +24 -0
- package/src/components/RuleSelectedFilters.js +18 -0
- package/src/components/RuleTabs.js +16 -2
- package/src/components/RulesRoutes.js +13 -1
- package/src/components/__tests__/RuleEventRow.spec.js +33 -0
- package/src/components/__tests__/RuleEvents.spec.js +64 -0
- package/src/components/__tests__/RuleImplementationEvents.spec.js +2 -3
- package/src/components/__tests__/__snapshots__/RuleEventRow.spec.js.snap +38 -0
- package/src/components/__tests__/__snapshots__/RuleEvents.spec.js.snap +78 -0
- package/src/components/__tests__/__snapshots__/RuleImplementationEvents.spec.js.snap +2 -2
- package/src/components/ruleImplementationForm/DatasetForm.js +9 -26
- package/src/components/ruleImplementationForm/FiltersField.js +2 -12
- package/src/components/ruleImplementationForm/__tests__/DataSetForm.spec.js +19 -59
- package/src/components/ruleImplementationForm/__tests__/FiltersField.spec.js +4 -18
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/DataSetForm.spec.js.snap +7 -147
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/FiltersField.spec.js.snap +7 -12
- package/src/messages/en.js +8 -0
- package/src/messages/es.js +11 -0
- package/src/reducers/__tests__/ruleActiveFilters.spec.js +19 -7
- package/src/reducers/__tests__/ruleImplementationActiveFilters.spec.js +19 -7
- package/src/reducers/index.js +0 -2
- package/src/reducers/ruleActiveFilters.js +5 -0
- package/src/reducers/ruleImplementationActiveFilters.js +7 -0
- package/src/routines.js +0 -3
- package/src/selectors/__tests__/datasetDefaultFiltersSelector.spec.js +17 -0
- package/src/selectors/__tests__/getParsedEvents.spec.js +173 -0
- package/src/selectors/datasetDefaultFiltersSelector.js +8 -0
- package/src/selectors/getParsedEvents.js +55 -0
- package/src/selectors/index.js +1 -1
- package/src/reducers/__tests__/ruleImplementationFilterValues.spec.js +0 -36
- package/src/reducers/ruleImplementationFilterValues.js +0 -20
- package/src/selectors/__tests__/getRuleImplementationFormFilters.spec.js +0 -22
- package/src/selectors/getRuleImplementationFormFilters.js +0 -19
|
@@ -5,8 +5,7 @@ import { connect } from "react-redux";
|
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { dropAt, replaceAt } from "@truedat/core/services/arrays";
|
|
7
7
|
import { Button } from "semantic-ui-react";
|
|
8
|
-
import {
|
|
9
|
-
import { getRuleImplementationFormFilters } from "../../selectors";
|
|
8
|
+
import { datasetDefaultFiltersSelector } from "../../selectors";
|
|
10
9
|
import "../../styles/ruleImplementationForm/DatasetForm.less";
|
|
11
10
|
|
|
12
11
|
const StructureSelectorInputField = React.lazy(() =>
|
|
@@ -14,10 +13,9 @@ const StructureSelectorInputField = React.lazy(() =>
|
|
|
14
13
|
);
|
|
15
14
|
|
|
16
15
|
export const DatasetForm = ({
|
|
17
|
-
|
|
16
|
+
defaultFilters,
|
|
18
17
|
structures,
|
|
19
18
|
selector,
|
|
20
|
-
setImplementationFilterValues,
|
|
21
19
|
setStructures,
|
|
22
20
|
setSelector,
|
|
23
21
|
}) => {
|
|
@@ -66,12 +64,9 @@ export const DatasetForm = ({
|
|
|
66
64
|
const setStructure = ({ index, value: param_value }) => {
|
|
67
65
|
const structureChanged = hasChangedStructure(index, param_value);
|
|
68
66
|
const value = structureChanged ? setAliasIndex(param_value) : param_value;
|
|
69
|
-
if (index
|
|
70
|
-
setStructures([value ? { ...value } : {}]);
|
|
71
|
-
setImplementationFilterValues({ value: _.get("structure")(value) });
|
|
72
|
-
} else if (_.isNil(index))
|
|
67
|
+
if (_.isNil(index)) {
|
|
73
68
|
setStructures([...structures, value ? { ...value } : {}]);
|
|
74
|
-
else if (value) {
|
|
69
|
+
} else if (value) {
|
|
75
70
|
const mergedValue = { ..._.nth(index)(structures), ...value };
|
|
76
71
|
setStructures(replaceAt(index, mergedValue)(structures));
|
|
77
72
|
} else setStructures(deleteStructure(index, structures));
|
|
@@ -88,13 +83,6 @@ export const DatasetForm = ({
|
|
|
88
83
|
return dropAt(index)(structures);
|
|
89
84
|
};
|
|
90
85
|
|
|
91
|
-
const buildDefaultFilters = (i) => {
|
|
92
|
-
const defaultFilters = { "class.raw": [""] };
|
|
93
|
-
return i == 0
|
|
94
|
-
? { defaultFilters }
|
|
95
|
-
: { defaultFilters: { ...defaultFilters, ...customFilters } };
|
|
96
|
-
};
|
|
97
|
-
|
|
98
86
|
return (
|
|
99
87
|
<>
|
|
100
88
|
{structures.map((structure, index) => (
|
|
@@ -102,7 +90,7 @@ export const DatasetForm = ({
|
|
|
102
90
|
active={index === selector}
|
|
103
91
|
joined={index > 0}
|
|
104
92
|
key={index}
|
|
105
|
-
|
|
93
|
+
defaultFilters={defaultFilters}
|
|
106
94
|
onChange={(value) => {
|
|
107
95
|
setSelector(-1);
|
|
108
96
|
onChange(index, { structure: value });
|
|
@@ -125,27 +113,22 @@ export const DatasetForm = ({
|
|
|
125
113
|
setStructure({ value: { join_type: "inner" } });
|
|
126
114
|
}}
|
|
127
115
|
>
|
|
128
|
-
{formatMessage({
|
|
129
|
-
id: "dataset.form.button.add_structure",
|
|
130
|
-
})}
|
|
116
|
+
{formatMessage({ id: "dataset.form.button.add_structure" })}
|
|
131
117
|
</Button>
|
|
132
118
|
</>
|
|
133
119
|
);
|
|
134
120
|
};
|
|
135
121
|
|
|
136
122
|
DatasetForm.propTypes = {
|
|
137
|
-
|
|
123
|
+
defaultFilters: PropTypes.object,
|
|
138
124
|
structures: PropTypes.array,
|
|
139
125
|
selector: PropTypes.number,
|
|
140
126
|
setStructures: PropTypes.func,
|
|
141
127
|
setSelector: PropTypes.func,
|
|
142
|
-
setImplementationFilterValues: PropTypes.func,
|
|
143
128
|
};
|
|
144
129
|
|
|
145
130
|
const mapStateToProps = (state) => ({
|
|
146
|
-
|
|
131
|
+
defaultFilters: datasetDefaultFiltersSelector(state),
|
|
147
132
|
});
|
|
148
133
|
|
|
149
|
-
export default connect(mapStateToProps
|
|
150
|
-
DatasetForm
|
|
151
|
-
);
|
|
134
|
+
export default connect(mapStateToProps)(DatasetForm);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import React, { useState } from "react";
|
|
3
|
-
import { connect } from "react-redux";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
|
-
import { getRuleImplementationFormFilters } from "../../selectors";
|
|
6
4
|
import { getStructureFields } from "../../selectors/getStructureFields";
|
|
7
5
|
import DateField from "./DateField";
|
|
8
6
|
import DateTimeField from "./DateTimeField";
|
|
@@ -36,7 +34,6 @@ const reducedStructureColumns = [
|
|
|
36
34
|
];
|
|
37
35
|
|
|
38
36
|
export const FiltersField = ({
|
|
39
|
-
customFilters,
|
|
40
37
|
parentStructures,
|
|
41
38
|
label,
|
|
42
39
|
operator,
|
|
@@ -97,9 +94,7 @@ export const FiltersField = ({
|
|
|
97
94
|
<StructureSelectorInputField
|
|
98
95
|
active={active}
|
|
99
96
|
joined={false}
|
|
100
|
-
|
|
101
|
-
defaultFilters: { "class.raw": ["field"], ...customFilters },
|
|
102
|
-
}}
|
|
97
|
+
defaultFilters={{ "class.raw": ["field"] }}
|
|
103
98
|
onChange={(value) => {
|
|
104
99
|
onChange(null, {
|
|
105
100
|
data_structure_id: _.prop("id")(value),
|
|
@@ -159,7 +154,6 @@ export const FiltersField = ({
|
|
|
159
154
|
};
|
|
160
155
|
|
|
161
156
|
FiltersField.propTypes = {
|
|
162
|
-
customFilters: PropTypes.object,
|
|
163
157
|
label: PropTypes.string,
|
|
164
158
|
parentStructures: PropTypes.array,
|
|
165
159
|
operator: PropTypes.object,
|
|
@@ -171,8 +165,4 @@ FiltersField.propTypes = {
|
|
|
171
165
|
typeCastModifiers: PropTypes.array,
|
|
172
166
|
};
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
customFilters: getRuleImplementationFormFilters(state),
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
export default connect(mapStateToProps)(FiltersField);
|
|
168
|
+
export default FiltersField;
|
|
@@ -1,76 +1,36 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import React, { Suspense } from "react";
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { render } from "@truedat/test/render";
|
|
4
|
+
import DatasetForm from "../DatasetForm";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const renderOpts = {
|
|
7
|
+
messages: { en: { "dataset.form.button.add_structure": "add_structure" } },
|
|
8
|
+
};
|
|
9
9
|
|
|
10
10
|
describe("<DatasetForm />", () => {
|
|
11
11
|
const setStructures = jest.fn();
|
|
12
12
|
const setSelector = jest.fn();
|
|
13
13
|
const selector = -1;
|
|
14
14
|
const setImplementationKey = jest.fn();
|
|
15
|
-
const setImplementationFilterValues = jest.fn();
|
|
16
15
|
const implementationKey = "Impl";
|
|
17
|
-
const structures = [
|
|
18
|
-
{
|
|
19
|
-
structure: {
|
|
20
|
-
id: 1,
|
|
21
|
-
name: "strcuture1",
|
|
22
|
-
path: [],
|
|
23
|
-
system: { name: "system" }
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
join_type: "inner",
|
|
28
|
-
structure: {
|
|
29
|
-
id: 2,
|
|
30
|
-
name: "structure2",
|
|
31
|
-
path: [],
|
|
32
|
-
system: { name: "system" }
|
|
33
|
-
},
|
|
34
|
-
clauses: [{ id: 100 }, { id: 200 }]
|
|
35
|
-
}
|
|
36
|
-
];
|
|
16
|
+
const structures = [1, 2];
|
|
37
17
|
|
|
38
|
-
const customFilters = { "foo.bar": ["baz"] };
|
|
39
18
|
const props = {
|
|
40
19
|
implementationKey,
|
|
41
|
-
customFilters,
|
|
42
|
-
structures,
|
|
43
|
-
setStructures,
|
|
44
|
-
setSelector,
|
|
45
20
|
selector,
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
setImplementationKey,
|
|
22
|
+
setSelector,
|
|
23
|
+
setStructures,
|
|
24
|
+
structures,
|
|
48
25
|
};
|
|
49
26
|
|
|
50
27
|
it("matches the latest snapshot", () => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
expect(selectors).toHaveLength(structures.length);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("all custom filter props are correct", () => {
|
|
62
|
-
const wrapper = shallow(<DatasetForm {...props} />);
|
|
63
|
-
const selectors = wrapper.find("lazy");
|
|
64
|
-
expect(selectors.first().prop("options")).toEqual({
|
|
65
|
-
defaultFilters: {
|
|
66
|
-
"class.raw": [""]
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
expect(selectors.last().prop("options")).toEqual({
|
|
70
|
-
defaultFilters: {
|
|
71
|
-
"class.raw": [""],
|
|
72
|
-
"foo.bar": ["baz"]
|
|
73
|
-
}
|
|
74
|
-
});
|
|
28
|
+
const { container } = render(
|
|
29
|
+
<Suspense fallback={null}>
|
|
30
|
+
<DatasetForm {...props} />
|
|
31
|
+
</Suspense>,
|
|
32
|
+
renderOpts
|
|
33
|
+
);
|
|
34
|
+
expect(container).toMatchSnapshot();
|
|
75
35
|
});
|
|
76
36
|
});
|
|
@@ -17,42 +17,28 @@ describe("<FiltersField />", () => {
|
|
|
17
17
|
id: 1,
|
|
18
18
|
name: "structure1",
|
|
19
19
|
path: ["structure1"],
|
|
20
|
-
system: { external_id: "oracle_test", id: 29, name: "Oracle" }
|
|
21
|
-
}
|
|
20
|
+
system: { external_id: "oracle_test", id: 29, name: "Oracle" },
|
|
21
|
+
},
|
|
22
22
|
];
|
|
23
23
|
|
|
24
|
-
const customFilters = { "foo.bar": ["baz"] };
|
|
25
24
|
const operator = {
|
|
26
25
|
group: "references",
|
|
27
26
|
name: "references",
|
|
28
27
|
value_type: "field",
|
|
29
28
|
value_type_filter: "any",
|
|
30
|
-
scope: "validation"
|
|
29
|
+
scope: "validation",
|
|
31
30
|
};
|
|
32
31
|
const props = {
|
|
33
|
-
customFilters,
|
|
34
32
|
parentStructures,
|
|
35
33
|
fieldType,
|
|
36
34
|
onChange,
|
|
37
35
|
name,
|
|
38
36
|
operator,
|
|
39
|
-
value
|
|
37
|
+
value,
|
|
40
38
|
};
|
|
41
39
|
|
|
42
40
|
it("matches the latest snapshot", () => {
|
|
43
41
|
const wrapper = shallow(<FiltersField {...props} />);
|
|
44
42
|
expect(wrapper).toMatchSnapshot();
|
|
45
43
|
});
|
|
46
|
-
|
|
47
|
-
it("renders StructureSelectorInputField with valid props", () => {
|
|
48
|
-
const wrapper = shallow(<FiltersField {...props} />);
|
|
49
|
-
const selectors = wrapper.find("lazy");
|
|
50
|
-
expect(selectors).toHaveLength(1);
|
|
51
|
-
expect(selectors.first().prop("options")).toEqual({
|
|
52
|
-
defaultFilters: {
|
|
53
|
-
"class.raw": ["field"],
|
|
54
|
-
"foo.bar": ["baz"]
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
44
|
});
|
package/src/components/ruleImplementationForm/__tests__/__snapshots__/DataSetForm.spec.js.snap
CHANGED
|
@@ -1,153 +1,13 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<DatasetForm /> matches the latest snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
joined={false}
|
|
8
|
-
key="0"
|
|
9
|
-
onChange={[Function]}
|
|
10
|
-
onChangeField={[Function]}
|
|
11
|
-
onClick={[Function]}
|
|
12
|
-
onDelete={[Function]}
|
|
13
|
-
options={
|
|
14
|
-
Object {
|
|
15
|
-
"defaultFilters": Object {
|
|
16
|
-
"class.raw": Array [
|
|
17
|
-
"",
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
selectedStructure={
|
|
23
|
-
Object {
|
|
24
|
-
"structure": Object {
|
|
25
|
-
"id": 1,
|
|
26
|
-
"name": "strcuture1",
|
|
27
|
-
"path": Array [],
|
|
28
|
-
"system": Object {
|
|
29
|
-
"name": "system",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
structures={
|
|
35
|
-
Array [
|
|
36
|
-
Object {
|
|
37
|
-
"structure": Object {
|
|
38
|
-
"id": 1,
|
|
39
|
-
"name": "strcuture1",
|
|
40
|
-
"path": Array [],
|
|
41
|
-
"system": Object {
|
|
42
|
-
"name": "system",
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
Object {
|
|
47
|
-
"clauses": Array [
|
|
48
|
-
Object {
|
|
49
|
-
"id": 100,
|
|
50
|
-
},
|
|
51
|
-
Object {
|
|
52
|
-
"id": 200,
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
"join_type": "inner",
|
|
56
|
-
"structure": Object {
|
|
57
|
-
"id": 2,
|
|
58
|
-
"name": "structure2",
|
|
59
|
-
"path": Array [],
|
|
60
|
-
"system": Object {
|
|
61
|
-
"name": "system",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
systemRequired={false}
|
|
68
|
-
/>
|
|
69
|
-
<lazy
|
|
70
|
-
active={false}
|
|
71
|
-
joined={true}
|
|
72
|
-
key="1"
|
|
73
|
-
onChange={[Function]}
|
|
74
|
-
onChangeField={[Function]}
|
|
75
|
-
onClick={[Function]}
|
|
76
|
-
onDelete={[Function]}
|
|
77
|
-
options={
|
|
78
|
-
Object {
|
|
79
|
-
"defaultFilters": Object {
|
|
80
|
-
"class.raw": Array [
|
|
81
|
-
"",
|
|
82
|
-
],
|
|
83
|
-
"foo.bar": Array [
|
|
84
|
-
"baz",
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
selectedStructure={
|
|
90
|
-
Object {
|
|
91
|
-
"clauses": Array [
|
|
92
|
-
Object {
|
|
93
|
-
"id": 100,
|
|
94
|
-
},
|
|
95
|
-
Object {
|
|
96
|
-
"id": 200,
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
"join_type": "inner",
|
|
100
|
-
"structure": Object {
|
|
101
|
-
"id": 2,
|
|
102
|
-
"name": "structure2",
|
|
103
|
-
"path": Array [],
|
|
104
|
-
"system": Object {
|
|
105
|
-
"name": "system",
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
structures={
|
|
111
|
-
Array [
|
|
112
|
-
Object {
|
|
113
|
-
"structure": Object {
|
|
114
|
-
"id": 1,
|
|
115
|
-
"name": "strcuture1",
|
|
116
|
-
"path": Array [],
|
|
117
|
-
"system": Object {
|
|
118
|
-
"name": "system",
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
Object {
|
|
123
|
-
"clauses": Array [
|
|
124
|
-
Object {
|
|
125
|
-
"id": 100,
|
|
126
|
-
},
|
|
127
|
-
Object {
|
|
128
|
-
"id": 200,
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
"join_type": "inner",
|
|
132
|
-
"structure": Object {
|
|
133
|
-
"id": 2,
|
|
134
|
-
"name": "structure2",
|
|
135
|
-
"path": Array [],
|
|
136
|
-
"system": Object {
|
|
137
|
-
"name": "system",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
systemRequired={false}
|
|
144
|
-
/>
|
|
145
|
-
<Button
|
|
146
|
-
as="button"
|
|
4
|
+
<div>
|
|
5
|
+
<button
|
|
6
|
+
class="ui button"
|
|
147
7
|
id="add-structure-button"
|
|
148
|
-
|
|
8
|
+
style="display: none;"
|
|
149
9
|
>
|
|
150
|
-
|
|
151
|
-
</
|
|
152
|
-
</
|
|
10
|
+
add_structure
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
153
13
|
`;
|
package/src/components/ruleImplementationForm/__tests__/__snapshots__/FiltersField.spec.js.snap
CHANGED
|
@@ -3,23 +3,18 @@
|
|
|
3
3
|
exports[`<FiltersField /> matches the latest snapshot 1`] = `
|
|
4
4
|
<lazy
|
|
5
5
|
active={false}
|
|
6
|
+
defaultFilters={
|
|
7
|
+
Object {
|
|
8
|
+
"class.raw": Array [
|
|
9
|
+
"field",
|
|
10
|
+
],
|
|
11
|
+
}
|
|
12
|
+
}
|
|
6
13
|
fieldWidth={15}
|
|
7
14
|
joined={false}
|
|
8
15
|
onChange={[Function]}
|
|
9
16
|
onClick={[Function]}
|
|
10
17
|
onDelete={[Function]}
|
|
11
|
-
options={
|
|
12
|
-
Object {
|
|
13
|
-
"defaultFilters": Object {
|
|
14
|
-
"class.raw": Array [
|
|
15
|
-
"field",
|
|
16
|
-
],
|
|
17
|
-
"foo.bar": Array [
|
|
18
|
-
"baz",
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
18
|
selectedStructure={
|
|
24
19
|
Object {
|
|
25
20
|
"structure": "1",
|
package/src/messages/en.js
CHANGED
|
@@ -132,6 +132,7 @@ export default {
|
|
|
132
132
|
"All rule implementations should be removed",
|
|
133
133
|
"rule.error.rule_name_bc_id.unique_constraint":
|
|
134
134
|
"Duplicated rule name. Edit name or associated business concept.",
|
|
135
|
+
|
|
135
136
|
"rule.form.accordion.select": "Select",
|
|
136
137
|
"rule.form.concept.label": "Concept",
|
|
137
138
|
"ruleImplementation.form.tooltip.deviation.goal":
|
|
@@ -497,6 +498,8 @@ export default {
|
|
|
497
498
|
"ruleImplementations.props.result": "Quality",
|
|
498
499
|
"ruleImplementations.props.rule": "Rule",
|
|
499
500
|
"ruleImplementations.props.template": "Template",
|
|
501
|
+
"ruleImplementations.props.rule_template": "Rule template",
|
|
502
|
+
"ruleImplementations.props.implementation_template": "Implementation template",
|
|
500
503
|
"ruleImplementations.retrieved.results": "{count} implementations found",
|
|
501
504
|
"ruleImplementations.search.results.empty": "No implementations found",
|
|
502
505
|
"ruleImplementations.searching": "Searching implementations",
|
|
@@ -539,6 +542,10 @@ export default {
|
|
|
539
542
|
"rules.actions.upload.confirmation.header": "Confirm bulk upload",
|
|
540
543
|
"rules.actions.upload.tooltip": "Upload Rules",
|
|
541
544
|
"rules.crumbs.top": "Rules",
|
|
545
|
+
"rules.events.action_created": "Rule created",
|
|
546
|
+
"rules.events.action_changed": "Field {0} changed: {1}",
|
|
547
|
+
"rules.events.action_changed_to": "Field {0} changed to: {1}",
|
|
548
|
+
"rules.events.action_updated": "Rule updated",
|
|
542
549
|
"rules.retrieved.results": "{count} rules found",
|
|
543
550
|
"rules.search.placeholder": "Search rules...",
|
|
544
551
|
"rules.searching": "Searching...",
|
|
@@ -555,6 +562,7 @@ export default {
|
|
|
555
562
|
"structureFields.dropdown.placeholder": "Fields",
|
|
556
563
|
"summary.link.and": "and",
|
|
557
564
|
"tabs.dq.rule": "Rule",
|
|
565
|
+
"tabs.dq.rule.audit": "Audit",
|
|
558
566
|
"tabs.dq.ruleImplementation": "Implementation",
|
|
559
567
|
"tabs.dq.ruleImplementation.audit": "Audit",
|
|
560
568
|
"tabs.dq.ruleImplementation.details": "Details",
|
package/src/messages/es.js
CHANGED
|
@@ -511,6 +511,8 @@ export default {
|
|
|
511
511
|
"ruleImplementations.props.rule": "Regla",
|
|
512
512
|
"ruleImplementations.props.status": "Estado",
|
|
513
513
|
"ruleImplementations.props.template": "Plantilla",
|
|
514
|
+
"ruleImplementations.props.rule_template": "Plantilla de regla",
|
|
515
|
+
"ruleImplementations.props.implementation_template": "Plantilla de implementación",
|
|
514
516
|
"ruleImplementations.retrieved.results":
|
|
515
517
|
"{count} implementaciones encontradas",
|
|
516
518
|
"ruleImplementations.search.results.empty":
|
|
@@ -554,6 +556,14 @@ export default {
|
|
|
554
556
|
"rules.actions.upload.confirmation.header": "Subir ficheros de reglas",
|
|
555
557
|
"rules.actions.upload.tooltip": "Subir reglas",
|
|
556
558
|
"rules.crumbs.top": "Reglas",
|
|
559
|
+
"rules.events.action_created": "Regla creada",
|
|
560
|
+
"rules.events.action_changed": "Campo {0} actualizado: {1}",
|
|
561
|
+
"rules.events.action_changed_to": "Campo {0} actualizado a {1}",
|
|
562
|
+
"rules.events.action_updated": "Regla actualizada",
|
|
563
|
+
"ruleImplementations.events.action_created": "Implementación creada en regla: {0}",
|
|
564
|
+
"ruleImplementations.events.action_changed": "Campo {0} actualizado a {1}",
|
|
565
|
+
"ruleImplementations.events.action_deprecated": "Implementación archivada",
|
|
566
|
+
"ruleImplementations.events.action_moved": "Implementación movida a la regla: {0}",
|
|
557
567
|
"rules.retrieved.results": "{count} reglas encontradas",
|
|
558
568
|
"rules.search.placeholder": "Buscar reglas...",
|
|
559
569
|
"rules.searching": "Buscando...",
|
|
@@ -571,6 +581,7 @@ export default {
|
|
|
571
581
|
"structureFields.dropdown.placeholder": "Campos",
|
|
572
582
|
"summary.link.and": "y",
|
|
573
583
|
"tabs.dq.rule": "Regla",
|
|
584
|
+
"tabs.dq.rule.audit": "Auditoría",
|
|
574
585
|
"tabs.dq.ruleImplementation.audit": "Auditoría",
|
|
575
586
|
"tabs.dq.ruleImplementation.details": "Detalles",
|
|
576
587
|
"tabs.dq.ruleImplementation.results": "Resultados",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { applyUserSearchFilter } from "@truedat/dd/routines";
|
|
1
2
|
import { initialState } from "../ruleActiveFilters";
|
|
2
3
|
import {
|
|
3
4
|
addRuleFilter,
|
|
4
5
|
closeRuleFilter,
|
|
5
6
|
removeRuleFilter,
|
|
6
7
|
resetRuleFilters,
|
|
7
|
-
toggleRuleFilterValue
|
|
8
|
+
toggleRuleFilterValue,
|
|
8
9
|
} from "../../routines";
|
|
9
10
|
import { ruleActiveFilters } from "..";
|
|
10
11
|
|
|
@@ -21,11 +22,22 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
21
22
|
expect(
|
|
22
23
|
ruleActiveFilters(fooState, {
|
|
23
24
|
type: addRuleFilter.TRIGGER,
|
|
24
|
-
payload
|
|
25
|
+
payload,
|
|
25
26
|
})
|
|
26
27
|
).toEqual({ ...fooState, baz: [] });
|
|
27
28
|
});
|
|
28
29
|
|
|
30
|
+
it("should handle the applyUserSearchFilter.TRIGGER action", () => {
|
|
31
|
+
const filters = { country: ["Sp"] };
|
|
32
|
+
const payload = { userFilter: { filters }, scope: "rule" };
|
|
33
|
+
expect(
|
|
34
|
+
ruleActiveFilters(fooState, {
|
|
35
|
+
type: applyUserSearchFilter.TRIGGER,
|
|
36
|
+
payload,
|
|
37
|
+
})
|
|
38
|
+
).toEqual({ ...filters });
|
|
39
|
+
});
|
|
40
|
+
|
|
29
41
|
it("should handle the closeRuleFilter.TRIGGER action", () => {
|
|
30
42
|
const foo = ["foo1"];
|
|
31
43
|
const bar = [];
|
|
@@ -34,7 +46,7 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
34
46
|
expect(
|
|
35
47
|
ruleActiveFilters(state, {
|
|
36
48
|
type: closeRuleFilter.TRIGGER,
|
|
37
|
-
payload
|
|
49
|
+
payload,
|
|
38
50
|
})
|
|
39
51
|
).toEqual({ foo });
|
|
40
52
|
});
|
|
@@ -47,7 +59,7 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
47
59
|
expect(
|
|
48
60
|
ruleActiveFilters(state, {
|
|
49
61
|
type: removeRuleFilter.TRIGGER,
|
|
50
|
-
payload
|
|
62
|
+
payload,
|
|
51
63
|
})
|
|
52
64
|
).toEqual({ bar });
|
|
53
65
|
});
|
|
@@ -55,7 +67,7 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
55
67
|
it("should handle the resetRuleFilters.TRIGGER action", () => {
|
|
56
68
|
expect(
|
|
57
69
|
ruleActiveFilters(fooState, {
|
|
58
|
-
type: resetRuleFilters.TRIGGER
|
|
70
|
+
type: resetRuleFilters.TRIGGER,
|
|
59
71
|
})
|
|
60
72
|
).toEqual(initialState);
|
|
61
73
|
});
|
|
@@ -63,7 +75,7 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
63
75
|
it("should handle the resetRuleFilters.TRIGGER action when execution filter exists", () => {
|
|
64
76
|
expect(
|
|
65
77
|
ruleActiveFilters(fooState, {
|
|
66
|
-
type: resetRuleFilters.TRIGGER
|
|
78
|
+
type: resetRuleFilters.TRIGGER,
|
|
67
79
|
})
|
|
68
80
|
).toEqual(initialState);
|
|
69
81
|
});
|
|
@@ -76,7 +88,7 @@ describe("reducers: ruleActiveFilters", () => {
|
|
|
76
88
|
expect(
|
|
77
89
|
ruleActiveFilters(state, {
|
|
78
90
|
type: toggleRuleFilterValue.TRIGGER,
|
|
79
|
-
payload
|
|
91
|
+
payload,
|
|
80
92
|
})
|
|
81
93
|
).toEqual({ foo: ["foo1", "foo3"], bar });
|
|
82
94
|
});
|