@truedat/dq 8.7.0 → 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/components/ConceptRules.js +2 -3
- package/src/components/ConditionCell.js +9 -9
- package/src/components/ExecutionForm.js +1 -1
- package/src/components/ExecutionGroup.js +2 -2
- package/src/components/ExecutionGroupContent.js +4 -4
- package/src/components/ImplementationExecutionFilters.js +1 -1
- package/src/components/ImplementationFiltersLoader.js +2 -2
- package/src/components/ImplementationResultBar.js +1 -1
- package/src/components/ImplementationSearchResults.js +7 -7
- package/src/components/ImplementationStructureDelete.js +1 -1
- package/src/components/ImplementationStructuresNew.js +6 -3
- package/src/components/ImplementationSummary.js +2 -2
- package/src/components/Implementations.js +18 -11
- package/src/components/ImplementationsHeader.js +16 -21
- package/src/components/ImplementationsRoutes.js +7 -7
- package/src/components/MoveImplementation.js +1 -1
- package/src/components/NewBasicRuleImplementation.js +1 -1
- package/src/components/NewRuleImplementation.js +44 -44
- package/src/components/QualityEventError.js +11 -7
- package/src/components/RawContent.js +1 -1
- package/src/components/RemediationForm.js +1 -1
- package/src/components/RemediationPlan.js +2 -2
- package/src/components/Rule.js +1 -1
- package/src/components/RuleActions.js +1 -1
- package/src/components/RuleEventDecorator.js +1 -1
- package/src/components/RuleEventRow.js +1 -1
- package/src/components/RuleFilters.js +1 -1
- package/src/components/RuleFiltersLoader.js +1 -1
- package/src/components/RuleFormImplementations.js +1 -1
- package/src/components/RuleImplementationEventRow.js +1 -1
- package/src/components/RuleImplementationHistory.js +1 -1
- package/src/components/RuleImplementationProperties.js +2 -2
- package/src/components/RuleImplementationResults.js +2 -2
- package/src/components/RuleImplementationTabs.js +5 -5
- package/src/components/RuleImplementationsDownload.js +4 -4
- package/src/components/RuleImplementationsDownloadXlsx.js +6 -6
- package/src/components/RuleImplementationsLoader.js +1 -2
- package/src/components/RuleImplementationsTable.js +1 -1
- package/src/components/RuleResultDecorator.js +3 -3
- package/src/components/RuleResultDetails.js +1 -1
- package/src/components/RuleResultRemediationLoader.js +1 -1
- package/src/components/RuleResultSegments.js +3 -3
- package/src/components/RuleResultsTable.js +7 -7
- package/src/components/RuleRoutes.js +3 -3
- package/src/components/RuleSelectedFilters.js +3 -3
- package/src/components/RuleSelector.js +1 -1
- package/src/components/RuleSummary.js +3 -3
- package/src/components/Rules.js +4 -4
- package/src/components/RulesLoader.js +2 -2
- package/src/components/RulesRoutes.js +1 -1
- package/src/components/SimpleRuleImplementationsTable.js +1 -1
- package/src/components/Subscription.js +1 -1
- package/src/components/TaxonomySummary.js +1 -1
- package/src/components/__tests__/ConceptRules.spec.js +2 -2
- package/src/components/__tests__/ExecutionGroup.spec.js +3 -3
- package/src/components/__tests__/ExecutionGroupContent.spec.js +1 -1
- package/src/components/__tests__/ExecutionGroups.spec.js +1 -1
- package/src/components/__tests__/ExecutionGroupsTable.spec.js +1 -1
- package/src/components/__tests__/ImplementationExecutionFilters.spec.js +1 -1
- package/src/components/__tests__/ImplementationExecutions.spec.js +1 -1
- package/src/components/__tests__/ImplementationResultBar.spec.js +6 -6
- package/src/components/__tests__/ImplementationSearchResults.spec.js +3 -3
- package/src/components/__tests__/ImplementationStructureDelete.spec.js +1 -1
- package/src/components/__tests__/ImplementationStructureLink.spec.js +1 -1
- package/src/components/__tests__/ImplementationStructureLinksActions.spec.js +31 -27
- package/src/components/__tests__/ImplementationStructures.spec.js +6 -6
- package/src/components/__tests__/ImplementationStructuresNew.spec.js +2 -2
- package/src/components/__tests__/ImplementationSummary.spec.js +2 -2
- package/src/components/__tests__/Implementations.spec.js +1 -1
- package/src/components/__tests__/ImplementationsRoutes.spec.js +1 -1
- package/src/components/__tests__/ImplementationsUploadButton.spec.js +8 -8
- package/src/components/__tests__/MoveImplementation.spec.js +5 -5
- package/src/components/__tests__/NewBasicRuleImplementation.spec.js +4 -4
- package/src/components/__tests__/NewRuleImplementation.spec.js +14 -14
- package/src/components/__tests__/QualityRoutes.spec.js +1 -1
- package/src/components/__tests__/RemediationForm.spec.js +9 -3
- package/src/components/__tests__/RemediationPlan.spec.js +2 -2
- package/src/components/__tests__/RuleActions.spec.js +1 -1
- package/src/components/__tests__/RuleForm.spec.js +2 -2
- package/src/components/__tests__/RuleFormImplementations.spec.js +3 -3
- package/src/components/__tests__/RuleImplementation.spec.js +2 -2
- package/src/components/__tests__/RuleImplementationProperties.spec.js +3 -3
- package/src/components/__tests__/RuleImplementationResults.spec.js +2 -2
- package/src/components/__tests__/RuleImplementationsActions.spec.js +4 -4
- package/src/components/__tests__/RuleImplementationsLoader.spec.js +1 -1
- package/src/components/__tests__/RuleImplementationsOptions.spec.js +1 -1
- package/src/components/__tests__/RuleImplementationsTable.spec.js +3 -3
- package/src/components/__tests__/RuleResultDecorator.spec.js +15 -6
- package/src/components/__tests__/RuleResultDetails.spec.js +1 -1
- package/src/components/__tests__/RuleResultRemediations.spec.js +1 -1
- package/src/components/__tests__/RuleResultRoutes.spec.js +4 -4
- package/src/components/__tests__/RuleResultRow.spec.js +13 -13
- package/src/components/__tests__/RuleResultSegments.spec.js +1 -1
- package/src/components/__tests__/RuleRoutes.spec.js +1 -1
- package/src/components/__tests__/RuleRow.spec.js +4 -4
- package/src/components/__tests__/RuleSelectionForm.spec.js +5 -5
- package/src/components/__tests__/RuleSummary.spec.js +3 -3
- package/src/components/__tests__/Rules.spec.js +1 -1
- package/src/components/__tests__/RulesActions.spec.js +1 -1
- package/src/components/__tests__/RulesRoutes.spec.js +1 -1
- package/src/components/__tests__/Subscription.spec.js +11 -11
- package/src/components/ruleImplementationForm/DatasetForm.js +7 -7
- package/src/components/ruleImplementationForm/FieldModifier.js +5 -5
- package/src/components/ruleImplementationForm/FieldsGrid.js +2 -2
- package/src/components/ruleImplementationForm/FieldsGroup.js +1 -1
- package/src/components/ruleImplementationForm/FiltersField.js +4 -4
- package/src/components/ruleImplementationForm/FiltersFormGroup.js +3 -3
- package/src/components/ruleImplementationForm/FiltersGrid.js +3 -3
- package/src/components/ruleImplementationForm/FiltersGroup.js +2 -2
- package/src/components/ruleImplementationForm/InformationForm.js +1 -1
- package/src/components/ruleImplementationForm/RuleImplementationBasicForm.js +3 -3
- package/src/components/ruleImplementationForm/RuleImplementationForm.js +15 -11
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +5 -5
- package/src/components/ruleImplementationForm/__tests__/FiltersFormGroup.spec.js +1 -1
- package/src/components/ruleImplementationForm/__tests__/FiltersGroup.spec.js +1 -1
- package/src/components/ruleImplementationForm/__tests__/InformationForm.spec.js +2 -2
- package/src/components/ruleImplementationForm/__tests__/LimitsForm.spec.js +12 -12
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationBasicForm.spec.js +13 -13
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +2 -2
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +25 -25
- package/src/components/ruleImplementationForm/__tests__/ValueConditions.spec.js +1 -1
- package/src/components/ruleImplementationForm/operators.js +7 -7
- package/src/hooks/__tests__/useImplementations.spec.js +0 -1
- package/src/hooks/useImplementations.js +5 -5
- package/src/messages/en.js +0 -1
- package/src/messages/es.js +0 -1
- package/src/messages/index.js +1 -1
- package/src/reducers/__tests__/conceptRules.spec.js +3 -3
- package/src/reducers/__tests__/conceptRulesActions.spec.js +6 -6
- package/src/reducers/__tests__/implementationActions.spec.js +2 -2
- package/src/reducers/__tests__/implementationLinks.spec.js +4 -4
- package/src/reducers/__tests__/implementationsActions.spec.js +2 -2
- package/src/reducers/__tests__/previousRuleImplementationQuery.spec.js +6 -6
- package/src/reducers/__tests__/remediation.spec.js +7 -7
- package/src/reducers/__tests__/remediationActions.spec.js +3 -3
- package/src/reducers/__tests__/remediationLoading.spec.js +6 -6
- package/src/reducers/__tests__/resultsUploading.spec.js +2 -2
- package/src/reducers/__tests__/rule.spec.js +1 -1
- package/src/reducers/__tests__/ruleActiveFilters.spec.js +8 -8
- package/src/reducers/__tests__/ruleCount.spec.js +3 -3
- package/src/reducers/__tests__/ruleFiltersLoading.spec.js +2 -2
- package/src/reducers/__tests__/ruleImplementation.spec.js +2 -2
- package/src/reducers/__tests__/ruleImplementationActiveFilters.spec.js +11 -11
- package/src/reducers/__tests__/ruleImplementationCount.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationCreating.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationFilters.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationLoading.spec.js +5 -3
- package/src/reducers/__tests__/ruleImplementationQuery.spec.js +7 -7
- package/src/reducers/__tests__/ruleImplementationRedirect.spec.js +13 -13
- package/src/reducers/__tests__/ruleImplementationSaving.spec.js +4 -2
- package/src/reducers/__tests__/ruleImplementationSelectedFilter.spec.js +7 -7
- package/src/reducers/__tests__/ruleImplementations.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationsDownloading.spec.js +4 -4
- package/src/reducers/__tests__/ruleImplementationsLoading.spec.js +5 -5
- package/src/reducers/__tests__/ruleImplementationsPageSize.spec.js +4 -4
- package/src/reducers/__tests__/ruleQuery.spec.js +6 -6
- package/src/reducers/__tests__/ruleRedirect.spec.js +10 -10
- package/src/reducers/__tests__/rules.spec.js +2 -2
- package/src/reducers/__tests__/segmentResult.spec.js +3 -3
- package/src/reducers/__tests__/uploadImplementationsFile.spec.js +2 -2
- package/src/reducers/__tests__/uploadRulesFile.spec.js +2 -2
- package/src/reducers/conceptRulesActions.js +2 -2
- package/src/reducers/dqMessage.js +2 -2
- package/src/reducers/implementationsActions.js +1 -1
- package/src/reducers/previousRuleImplementationQuery.js +2 -2
- package/src/reducers/ruleFilters.js +1 -1
- package/src/reducers/ruleImplementationActiveFilters.js +1 -1
- package/src/reducers/ruleImplementationCount.js +1 -1
- package/src/reducers/ruleImplementationFilters.js +2 -2
- package/src/reducers/ruleImplementationRaw.js +1 -1
- package/src/reducers/ruleImplementationRedirect.js +3 -3
- package/src/reducers/ruleImplementationSelectedFilter.js +1 -1
- package/src/reducers/ruleImplementationsLoading.js +1 -1
- package/src/reducers/ruleImplementationsPageSize.js +1 -1
- package/src/reducers/ruleSelectedFilter.js +1 -1
- package/src/reducers/uploadingImplementationsFile.js +1 -1
- package/src/routines.js +23 -23
- package/src/sagas/__tests__/createExecutionGroup.spec.js +1 -1
- package/src/sagas/__tests__/createImplementationStructure.spec.js +1 -1
- package/src/sagas/__tests__/createRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/deleteImplementationStructure.spec.js +1 -1
- package/src/sagas/__tests__/deleteRule.spec.js +1 -3
- package/src/sagas/__tests__/downloadRuleImplementations.spec.js +1 -1
- package/src/sagas/__tests__/fetchConceptRules.spec.js +1 -1
- package/src/sagas/__tests__/fetchRule.spec.js +1 -3
- package/src/sagas/__tests__/fetchRuleFilters.spec.js +5 -5
- package/src/sagas/__tests__/fetchRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/fetchRuleImplementations.spec.js +1 -1
- package/src/sagas/__tests__/fetchRules.spec.js +4 -6
- package/src/sagas/__tests__/searchRuleImplementations.spec.js +3 -3
- package/src/sagas/__tests__/updateRule.spec.js +1 -3
- package/src/sagas/__tests__/updateRuleImplementation.spec.js +1 -1
- package/src/sagas/__tests__/uploadImplementations.spec.js +2 -2
- package/src/sagas/createExecutionGroup.js +1 -1
- package/src/sagas/createImplementationStructure.js +1 -1
- package/src/sagas/createRuleImplementation.js +2 -2
- package/src/sagas/deleteImplementationStructure.js +1 -1
- package/src/sagas/downloadRuleImplementations.js +1 -1
- package/src/sagas/downloadRuleImplementationsXlsx.js +1 -1
- package/src/sagas/fetchRuleImplementation.js +1 -1
- package/src/sagas/fetchRuleImplementationFilters.js +1 -1
- package/src/sagas/fetchRuleImplementations.js +2 -2
- package/src/sagas/searchRuleImplementations.js +2 -2
- package/src/sagas/updateRuleImplementation.js +1 -1
- package/src/sagas/uploadImplementations.js +1 -1
- package/src/sagas/uploadResults.js +1 -1
- package/src/sagas/uploadRules.js +1 -1
- package/src/selectors/__tests__/executionGroupsColumnsSelector.spec.js +2 -2
- package/src/selectors/__tests__/getImplementationStructureLinksColumns.spec.js +1 -1
- package/src/selectors/__tests__/getRuleImplementationSelectedFilterValues.spec.js +1 -1
- package/src/selectors/__tests__/ruleColumnsSelector.spec.js +1 -1
- package/src/selectors/datasetDefaultFiltersSelector.js +1 -1
- package/src/selectors/executionGroupsColumnsSelector.js +1 -1
- package/src/selectors/getExecutionGroupColumns.js +1 -1
- package/src/selectors/getExecutionQuery.js +1 -1
- package/src/selectors/getImplementationStructureLinksColumns.js +10 -10
- package/src/selectors/getImplementationStructures.js +10 -8
- package/src/selectors/getImplementationsExecution.js +1 -1
- package/src/selectors/getLinkedImplementationsToRulesColumns.js +1 -1
- package/src/selectors/getRuleAvailableFilters.js +2 -2
- package/src/selectors/getRuleFilterTypes.js +1 -1
- package/src/selectors/getRuleImplementationAvailableFilters.js +3 -3
- package/src/selectors/getRuleImplementationColumns.js +1 -1
- package/src/selectors/getRuleImplementationFilterTypes.js +1 -1
- package/src/selectors/getRuleImplementationForm.js +11 -11
- package/src/selectors/getRuleImplementationSelectedFilterActiveValues.js +2 -2
- package/src/selectors/getRuleImplementationSelectedFilterValues.js +2 -2
- package/src/selectors/getRuleImplementationSelectedFilters.js +1 -1
- package/src/selectors/getRuleSelectedFilterActiveValues.js +1 -1
- package/src/selectors/getRuleSelectedFilterValues.js +2 -2
- package/src/selectors/getRuleSelectedFilters.js +1 -1
- package/src/selectors/getSegmentResultsColumns.js +1 -1
- package/src/selectors/getStructureFields.js +3 -3
- package/src/selectors/ruleColumnsSelector.js +3 -3
- package/src/selectors/ruleResultsColumnsSelector.js +1 -1
- package/src/services/__tests__/encodeRawContent.spec.js +1 -1
- package/src/services/encodeRawContent.js +1 -1
|
@@ -36,7 +36,7 @@ describe("<RuleResultRow />", () => {
|
|
|
36
36
|
<tbody>
|
|
37
37
|
<RuleResultRow {...props} />
|
|
38
38
|
</tbody>
|
|
39
|
-
</table
|
|
39
|
+
</table>,
|
|
40
40
|
);
|
|
41
41
|
expect(queryByText("1")).toBeInTheDocument();
|
|
42
42
|
expect(queryByText("2")).toBeInTheDocument();
|
|
@@ -62,10 +62,10 @@ describe("<RuleResultRow />", () => {
|
|
|
62
62
|
<tbody>
|
|
63
63
|
<RuleResultRow {...props} />
|
|
64
64
|
</tbody>
|
|
65
|
-
</table
|
|
65
|
+
</table>,
|
|
66
66
|
);
|
|
67
67
|
expect(
|
|
68
|
-
container.querySelector("td > i.green.circle.icon")
|
|
68
|
+
container.querySelector("td > i.green.circle.icon"),
|
|
69
69
|
).toBeInTheDocument();
|
|
70
70
|
});
|
|
71
71
|
|
|
@@ -87,10 +87,10 @@ describe("<RuleResultRow />", () => {
|
|
|
87
87
|
<tbody>
|
|
88
88
|
<RuleResultRow {...props} />
|
|
89
89
|
</tbody>
|
|
90
|
-
</table
|
|
90
|
+
</table>,
|
|
91
91
|
);
|
|
92
92
|
expect(
|
|
93
|
-
container.querySelector("td > i.red.circle.icon")
|
|
93
|
+
container.querySelector("td > i.red.circle.icon"),
|
|
94
94
|
).toBeInTheDocument();
|
|
95
95
|
});
|
|
96
96
|
|
|
@@ -112,10 +112,10 @@ describe("<RuleResultRow />", () => {
|
|
|
112
112
|
<tbody>
|
|
113
113
|
<RuleResultRow {...props} />
|
|
114
114
|
</tbody>
|
|
115
|
-
</table
|
|
115
|
+
</table>,
|
|
116
116
|
);
|
|
117
117
|
expect(
|
|
118
|
-
container.querySelector("td > i.yellow.circle.icon")
|
|
118
|
+
container.querySelector("td > i.yellow.circle.icon"),
|
|
119
119
|
).toBeInTheDocument();
|
|
120
120
|
});
|
|
121
121
|
|
|
@@ -137,10 +137,10 @@ describe("<RuleResultRow />", () => {
|
|
|
137
137
|
<tbody>
|
|
138
138
|
<RuleResultRow {...props} />
|
|
139
139
|
</tbody>
|
|
140
|
-
</table
|
|
140
|
+
</table>,
|
|
141
141
|
);
|
|
142
142
|
expect(
|
|
143
|
-
container.querySelector("td > i.grey.circle.icon")
|
|
143
|
+
container.querySelector("td > i.grey.circle.icon"),
|
|
144
144
|
).toBeInTheDocument();
|
|
145
145
|
});
|
|
146
146
|
|
|
@@ -162,10 +162,10 @@ describe("<RuleResultRow />", () => {
|
|
|
162
162
|
<tbody>
|
|
163
163
|
<RuleResultRow {...props} />
|
|
164
164
|
</tbody>
|
|
165
|
-
</table
|
|
165
|
+
</table>,
|
|
166
166
|
);
|
|
167
167
|
expect(
|
|
168
|
-
container.querySelector("button.basic > i.trash.alternate.outline.icon")
|
|
168
|
+
container.querySelector("button.basic > i.trash.alternate.outline.icon"),
|
|
169
169
|
).toBeInTheDocument();
|
|
170
170
|
});
|
|
171
171
|
|
|
@@ -189,10 +189,10 @@ describe("<RuleResultRow />", () => {
|
|
|
189
189
|
<tbody>
|
|
190
190
|
<RuleResultRow {...props} />
|
|
191
191
|
</tbody>
|
|
192
|
-
</table
|
|
192
|
+
</table>,
|
|
193
193
|
);
|
|
194
194
|
expect(
|
|
195
|
-
container.querySelector("button.basic > i.trash.alternate.outline.icon")
|
|
195
|
+
container.querySelector("button.basic > i.trash.alternate.outline.icon"),
|
|
196
196
|
).not.toBeInTheDocument();
|
|
197
197
|
});
|
|
198
198
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
|
-
import { RuleRoutes } from "../RuleRoutes";
|
|
4
3
|
import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
|
|
5
4
|
import {
|
|
6
5
|
RULE,
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
RULE_IMPLEMENTATION_NEW_RAW,
|
|
11
10
|
RULE_IMPLEMENTATIONS,
|
|
12
11
|
} from "@truedat/core/routes";
|
|
12
|
+
import { RuleRoutes } from "../RuleRoutes";
|
|
13
13
|
|
|
14
14
|
jest.mock("@truedat/core/hooks/useAuthorized", () => ({
|
|
15
15
|
useAuthorized: jest.fn(() => true),
|
|
@@ -32,7 +32,7 @@ describe("<RuleRow />", () => {
|
|
|
32
32
|
<RuleRow {...props} />
|
|
33
33
|
</tbody>
|
|
34
34
|
</table>,
|
|
35
|
-
renderOpts
|
|
35
|
+
renderOpts,
|
|
36
36
|
);
|
|
37
37
|
expect(container).toMatchSnapshot();
|
|
38
38
|
});
|
|
@@ -54,7 +54,7 @@ describe("<RuleRow />", () => {
|
|
|
54
54
|
<RuleRow {...props} />
|
|
55
55
|
</tbody>
|
|
56
56
|
</table>,
|
|
57
|
-
renderOpts
|
|
57
|
+
renderOpts,
|
|
58
58
|
);
|
|
59
59
|
expect(container).toMatchSnapshot();
|
|
60
60
|
expect(queryByRole("link")).toHaveTextContent("foo is the rule name");
|
|
@@ -74,7 +74,7 @@ describe("<RuleRow />", () => {
|
|
|
74
74
|
<RuleRow {...props} />
|
|
75
75
|
</tbody>
|
|
76
76
|
</table>,
|
|
77
|
-
renderOpts
|
|
77
|
+
renderOpts,
|
|
78
78
|
);
|
|
79
79
|
expect(queryByRole("checkbox").checked).toBe(true);
|
|
80
80
|
});
|
|
@@ -92,7 +92,7 @@ describe("<RuleRow />", () => {
|
|
|
92
92
|
<RuleRow {...props} />
|
|
93
93
|
</tbody>
|
|
94
94
|
</table>,
|
|
95
|
-
renderOpts
|
|
95
|
+
renderOpts,
|
|
96
96
|
);
|
|
97
97
|
expect(queryByRole("checkbox")).toBeNull();
|
|
98
98
|
});
|
|
@@ -33,7 +33,7 @@ describe("<RuleSelectionForm />", () => {
|
|
|
33
33
|
it("matches snapshot with two options", async () => {
|
|
34
34
|
const { container, findByRole } = render(
|
|
35
35
|
<RuleSelectionForm value="1" />,
|
|
36
|
-
renderOpts
|
|
36
|
+
renderOpts,
|
|
37
37
|
);
|
|
38
38
|
await findByRole("option", { name: "foo" });
|
|
39
39
|
await findByRole("option", { name: "bar" });
|
|
@@ -46,25 +46,25 @@ describe("<RuleSelectionForm />", () => {
|
|
|
46
46
|
// Submit button should initially be disabled
|
|
47
47
|
const { getByRole, findByRole } = render(
|
|
48
48
|
<RuleSelectionForm onSubmit={(p) => onSubmit(p)} value="1" />,
|
|
49
|
-
renderOpts
|
|
49
|
+
renderOpts,
|
|
50
50
|
);
|
|
51
51
|
|
|
52
52
|
await waitFor(() =>
|
|
53
|
-
expect(getByRole("button", { name: "save" })).toBeDisabled()
|
|
53
|
+
expect(getByRole("button", { name: "save" })).toBeDisabled(),
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
userEvent.click(await findByRole("option", { name: "bar" }));
|
|
57
57
|
|
|
58
58
|
// Submit button should now be enabled
|
|
59
59
|
await waitFor(() =>
|
|
60
|
-
expect(getByRole("button", { name: "save" })).not.toBeDisabled()
|
|
60
|
+
expect(getByRole("button", { name: "save" })).not.toBeDisabled(),
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
// Submit
|
|
64
64
|
userEvent.click(await findByRole("button", { name: "save" }));
|
|
65
65
|
|
|
66
66
|
await waitFor(() =>
|
|
67
|
-
expect(onSubmit).toHaveBeenCalledWith({ rule_id: "2" })
|
|
67
|
+
expect(onSubmit).toHaveBeenCalledWith({ rule_id: "2" }),
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
70
|
});
|
|
@@ -99,15 +99,15 @@ describe("<RuleSummary />", () => {
|
|
|
99
99
|
const { container } = render(<RuleSummary {...props} />);
|
|
100
100
|
expect(container).toMatchSnapshot();
|
|
101
101
|
expect(container.querySelector(".over-goal-color")).toHaveTextContent(
|
|
102
|
-
"75%"
|
|
102
|
+
"75%",
|
|
103
103
|
);
|
|
104
104
|
expect(container.querySelector(".under-minimum-color")).toHaveTextContent(
|
|
105
|
-
"25%"
|
|
105
|
+
"25%",
|
|
106
106
|
);
|
|
107
107
|
fireEvent.click(container.querySelector(".over-goal-color"));
|
|
108
108
|
expect(container.querySelector(".over-goal-color")).toHaveTextContent("3");
|
|
109
109
|
expect(container.querySelector(".under-minimum-color")).toHaveTextContent(
|
|
110
|
-
"1"
|
|
110
|
+
"1",
|
|
111
111
|
);
|
|
112
112
|
expect(container).toMatchSnapshot();
|
|
113
113
|
});
|
|
@@ -81,7 +81,7 @@ describe("<Rules />", () => {
|
|
|
81
81
|
|
|
82
82
|
const headerCells = rendered.container.querySelectorAll("th");
|
|
83
83
|
expect(headerCells[0].getAttribute("class")).toContain(
|
|
84
|
-
"three wide descending sorted"
|
|
84
|
+
"three wide descending sorted",
|
|
85
85
|
);
|
|
86
86
|
expect(headerCells[1].getAttribute("class")).not.toContain("sorted");
|
|
87
87
|
});
|
|
@@ -29,7 +29,7 @@ describe("<RulesActions />", () => {
|
|
|
29
29
|
const rendered = render(<RulesActions {...props} />);
|
|
30
30
|
await waitForLoad(rendered);
|
|
31
31
|
expect(
|
|
32
|
-
rendered.queryByText(/quality.actions.create/i)
|
|
32
|
+
rendered.queryByText(/quality.actions.create/i),
|
|
33
33
|
).not.toBeInTheDocument();
|
|
34
34
|
});
|
|
35
35
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
|
-
import RulesRoutes from "../RulesRoutes";
|
|
4
3
|
import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
|
|
5
4
|
import { RULES } from "@truedat/core/routes";
|
|
5
|
+
import RulesRoutes from "../RulesRoutes";
|
|
6
6
|
|
|
7
7
|
jest.mock("@truedat/core/hooks/useAuthorized", () => ({
|
|
8
8
|
useAuthorized: jest.fn(() => true),
|
|
@@ -120,7 +120,7 @@ describe("<Subscription />", () => {
|
|
|
120
120
|
|
|
121
121
|
// el popup se cierra (contenido ya no está en el DOM)
|
|
122
122
|
await waitFor(() =>
|
|
123
|
-
expect(rendered.queryByText(/actions.save/i)).not.toBeInTheDocument()
|
|
123
|
+
expect(rendered.queryByText(/actions.save/i)).not.toBeInTheDocument(),
|
|
124
124
|
);
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -131,14 +131,14 @@ describe("<Subscription />", () => {
|
|
|
131
131
|
const user = userEvent.setup({ delay: null });
|
|
132
132
|
await user.click(rendered.getByRole("button"));
|
|
133
133
|
await user.click(
|
|
134
|
-
await rendered.findByText(/subscriptions.periodicity.hourly/i)
|
|
134
|
+
await rendered.findByText(/subscriptions.periodicity.hourly/i),
|
|
135
135
|
);
|
|
136
136
|
await user.click(await rendered.findByText(/actions.save/i));
|
|
137
137
|
|
|
138
138
|
expect(updateSubscription).toHaveBeenCalledWith(
|
|
139
139
|
expect.objectContaining({
|
|
140
140
|
subscription: expect.objectContaining({ periodicity: "hourly" }),
|
|
141
|
-
})
|
|
141
|
+
}),
|
|
142
142
|
);
|
|
143
143
|
});
|
|
144
144
|
|
|
@@ -149,20 +149,20 @@ describe("<Subscription />", () => {
|
|
|
149
149
|
const user = userEvent.setup({ delay: null });
|
|
150
150
|
await user.click(rendered.getByRole("button"));
|
|
151
151
|
await user.click(
|
|
152
|
-
await rendered.findByText(/ruleSubscription.actions.remove/i)
|
|
152
|
+
await rendered.findByText(/ruleSubscription.actions.remove/i),
|
|
153
153
|
);
|
|
154
154
|
|
|
155
155
|
expect(deleteSubscription).toHaveBeenCalledWith(
|
|
156
156
|
expect.objectContaining({
|
|
157
157
|
resource_id: 1,
|
|
158
158
|
resource_type: "rule",
|
|
159
|
-
})
|
|
159
|
+
}),
|
|
160
160
|
);
|
|
161
161
|
|
|
162
162
|
await waitFor(() =>
|
|
163
163
|
expect(
|
|
164
|
-
rendered.queryByText(/ruleSubscription.actions.remove/i)
|
|
165
|
-
).not.toBeInTheDocument()
|
|
164
|
+
rendered.queryByText(/ruleSubscription.actions.remove/i),
|
|
165
|
+
).not.toBeInTheDocument(),
|
|
166
166
|
);
|
|
167
167
|
});
|
|
168
168
|
|
|
@@ -197,12 +197,12 @@ describe("<Subscription />", () => {
|
|
|
197
197
|
resource_type: "implementation",
|
|
198
198
|
}),
|
|
199
199
|
}),
|
|
200
|
-
})
|
|
200
|
+
}),
|
|
201
201
|
);
|
|
202
202
|
|
|
203
203
|
await user.click(rendered.getByRole("button"));
|
|
204
204
|
await user.click(
|
|
205
|
-
await rendered.findByText(/ruleSubscription.actions.remove/i)
|
|
205
|
+
await rendered.findByText(/ruleSubscription.actions.remove/i),
|
|
206
206
|
);
|
|
207
207
|
|
|
208
208
|
expect(deleteSubscription).toHaveBeenCalledWith(
|
|
@@ -210,7 +210,7 @@ describe("<Subscription />", () => {
|
|
|
210
210
|
implementation_id: 9,
|
|
211
211
|
resource_id: 9,
|
|
212
212
|
resource_type: "implementation",
|
|
213
|
-
})
|
|
213
|
+
}),
|
|
214
214
|
);
|
|
215
215
|
});
|
|
216
216
|
|
|
@@ -225,7 +225,7 @@ describe("<Subscription />", () => {
|
|
|
225
225
|
await user.click(document.body);
|
|
226
226
|
|
|
227
227
|
await waitFor(() =>
|
|
228
|
-
expect(rendered.queryByText(/actions.save/i)).not.toBeInTheDocument()
|
|
228
|
+
expect(rendered.queryByText(/actions.save/i)).not.toBeInTheDocument(),
|
|
229
229
|
);
|
|
230
230
|
});
|
|
231
231
|
|
|
@@ -13,11 +13,11 @@ import { datasetDefaultFiltersSelector } from "../../selectors";
|
|
|
13
13
|
import "../../styles/ruleImplementationForm/DatasetForm.less";
|
|
14
14
|
|
|
15
15
|
const StructureSelectorInputField = lazy(
|
|
16
|
-
() => import("@truedat/dd/components/StructureSelectorInputField")
|
|
16
|
+
() => import("@truedat/dd/components/StructureSelectorInputField"),
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
const ReferenceDatasetSelectorInputField = lazy(
|
|
20
|
-
() => import("@truedat/dd/components/ReferenceDatasetSelectorInputField")
|
|
20
|
+
() => import("@truedat/dd/components/ReferenceDatasetSelectorInputField"),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
export const DatasetForm = ({
|
|
@@ -103,7 +103,7 @@ export const DatasetForm = ({
|
|
|
103
103
|
_.size(items) > index + 1
|
|
104
104
|
? replaceAt(
|
|
105
105
|
index + 1,
|
|
106
|
-
_.set("left", null)(_.nth(index + 1)(items))
|
|
106
|
+
_.set("left", null)(_.nth(index + 1)(items)),
|
|
107
107
|
)(items)
|
|
108
108
|
: items;
|
|
109
109
|
return dropAt(index)(structures);
|
|
@@ -111,13 +111,13 @@ export const DatasetForm = ({
|
|
|
111
111
|
|
|
112
112
|
const allStructuresSelected = _.reduce(
|
|
113
113
|
(acc, { structure }) => acc && structure,
|
|
114
|
-
true
|
|
114
|
+
true,
|
|
115
115
|
)(structures);
|
|
116
116
|
|
|
117
117
|
const referenceDatasets = _.flow(
|
|
118
118
|
_.getOr([], "referenceDatasets"),
|
|
119
119
|
_.sortBy([({ name }) => lowerDeburrTrim(name), "name"]),
|
|
120
|
-
_.map((row) => ({ ...row, id: Number(row?.id) }))
|
|
120
|
+
_.map((row) => ({ ...row, id: Number(row?.id) })),
|
|
121
121
|
)(data);
|
|
122
122
|
|
|
123
123
|
const availableReferenceDatasets = _.reject(({ id }) =>
|
|
@@ -126,7 +126,7 @@ export const DatasetForm = ({
|
|
|
126
126
|
type: "reference_dataset",
|
|
127
127
|
id,
|
|
128
128
|
},
|
|
129
|
-
})(structures)
|
|
129
|
+
})(structures),
|
|
130
130
|
)(referenceDatasets);
|
|
131
131
|
|
|
132
132
|
return (
|
|
@@ -166,7 +166,7 @@ export const DatasetForm = ({
|
|
|
166
166
|
onClick={() => setSelector(index === selector ? -1 : index)}
|
|
167
167
|
systemRequired={false}
|
|
168
168
|
/>
|
|
169
|
-
)
|
|
169
|
+
),
|
|
170
170
|
)}
|
|
171
171
|
{allStructuresSelected ? (
|
|
172
172
|
<>
|
|
@@ -6,7 +6,7 @@ import { Form, Icon, Segment } from "semantic-ui-react";
|
|
|
6
6
|
|
|
7
7
|
import { getStructureFieldOptionValue } from "@truedat/dd/selectors/getStructureFieldOptionValue";
|
|
8
8
|
const StructureFieldsDropdown = lazy(
|
|
9
|
-
() => import("@truedat/dd/components/StructureFieldsDropdown")
|
|
9
|
+
() => import("@truedat/dd/components/StructureFieldsDropdown"),
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
export default function FieldModifier({
|
|
@@ -34,7 +34,7 @@ export default function FieldModifier({
|
|
|
34
34
|
<Segment>
|
|
35
35
|
{_.getOr(
|
|
36
36
|
[],
|
|
37
|
-
"params"
|
|
37
|
+
"params",
|
|
38
38
|
)(modifier).map((param) => (
|
|
39
39
|
<Fragment key={`${param.name}`}>
|
|
40
40
|
<label>
|
|
@@ -58,7 +58,7 @@ export default function FieldModifier({
|
|
|
58
58
|
"name",
|
|
59
59
|
"parent_index",
|
|
60
60
|
"type",
|
|
61
|
-
])
|
|
61
|
+
]),
|
|
62
62
|
)(values);
|
|
63
63
|
// onChange(index, {name: modifier.name, params: _.set(param.name, pickedValues)({})}); // cambiar fields: por params.name
|
|
64
64
|
onChange({
|
|
@@ -74,8 +74,8 @@ export default function FieldModifier({
|
|
|
74
74
|
getStructureFieldOptionValue({
|
|
75
75
|
...v,
|
|
76
76
|
id: v.data_structure_id,
|
|
77
|
-
})
|
|
78
|
-
)
|
|
77
|
+
}),
|
|
78
|
+
),
|
|
79
79
|
)(value)}
|
|
80
80
|
/>
|
|
81
81
|
) : (
|
|
@@ -10,13 +10,13 @@ export const FieldsGrid = ({ rows, setRowValue, structures }) => {
|
|
|
10
10
|
const parentStructures = _.map((s) =>
|
|
11
11
|
_.isNil(_.prop("alias")(s))
|
|
12
12
|
? _.prop("structure")(s)
|
|
13
|
-
: { ..._.prop("structure")(s), alias: _.prop("alias")(s) }
|
|
13
|
+
: { ..._.prop("structure")(s), alias: _.prop("alias")(s) },
|
|
14
14
|
)(structures);
|
|
15
15
|
|
|
16
16
|
const onStructureChange = (index, value) => {
|
|
17
17
|
const structure = {
|
|
18
18
|
..._.pick(["field_type", "name", "parent_index", "type", "metadata"])(
|
|
19
|
-
value
|
|
19
|
+
value,
|
|
20
20
|
),
|
|
21
21
|
id: value.data_structure_id,
|
|
22
22
|
};
|
|
@@ -7,7 +7,7 @@ import { getStructureFieldOptionValue } from "@truedat/dd/selectors/getStructure
|
|
|
7
7
|
import { getStructureFields } from "../../selectors/getStructureFields";
|
|
8
8
|
|
|
9
9
|
const StructureFieldsDropdown = lazy(
|
|
10
|
-
() => import("@truedat/dd/components/StructureFieldsDropdown")
|
|
10
|
+
() => import("@truedat/dd/components/StructureFieldsDropdown"),
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const Field = ({
|
|
@@ -13,11 +13,11 @@ import StringListField from "./StringListField";
|
|
|
13
13
|
import FieldModifier from "./FieldModifier";
|
|
14
14
|
|
|
15
15
|
const StructureFieldsDropdown = lazy(
|
|
16
|
-
() => import("@truedat/dd/components/StructureFieldsDropdown")
|
|
16
|
+
() => import("@truedat/dd/components/StructureFieldsDropdown"),
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
const StructureSelectorInputField = lazy(
|
|
20
|
-
() => import("@truedat/dd/components/StructureSelectorInputField")
|
|
20
|
+
() => import("@truedat/dd/components/StructureSelectorInputField"),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
const DEFAULT_FILTERS = { "class.raw": ["field"] };
|
|
@@ -147,14 +147,14 @@ export const FiltersField = ({
|
|
|
147
147
|
onChange(
|
|
148
148
|
null,
|
|
149
149
|
pickFromValue(value),
|
|
150
|
-
modifier ? { name: modifier.name } : null
|
|
150
|
+
modifier ? { name: modifier.name } : null,
|
|
151
151
|
);
|
|
152
152
|
}}
|
|
153
153
|
onSelectFields={(values) => {
|
|
154
154
|
onChange(
|
|
155
155
|
null,
|
|
156
156
|
values.map((value) => pickFromValue(value)),
|
|
157
|
-
null
|
|
157
|
+
null,
|
|
158
158
|
);
|
|
159
159
|
}}
|
|
160
160
|
value={getValue(value, operator)}
|
|
@@ -11,11 +11,11 @@ import FieldModifier from "./FieldModifier";
|
|
|
11
11
|
import operatorFunctions from "./operators";
|
|
12
12
|
|
|
13
13
|
const StructureFieldsDropdown = lazy(
|
|
14
|
-
() => import("@truedat/dd/components/StructureFieldsDropdown")
|
|
14
|
+
() => import("@truedat/dd/components/StructureFieldsDropdown"),
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
const ValueConditionStructure = lazy(
|
|
18
|
-
() => import("@truedat/dd/components/ValueConditionStructure")
|
|
18
|
+
() => import("@truedat/dd/components/ValueConditionStructure"),
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
export const FiltersFormGroup = ({
|
|
@@ -46,7 +46,7 @@ export const FiltersFormGroup = ({
|
|
|
46
46
|
fieldType,
|
|
47
47
|
nestedCondition,
|
|
48
48
|
scope,
|
|
49
|
-
formatMessage
|
|
49
|
+
formatMessage,
|
|
50
50
|
);
|
|
51
51
|
return (
|
|
52
52
|
<Form.Group className="force-margin-bottom">
|
|
@@ -15,18 +15,18 @@ export const FiltersGrid = ({
|
|
|
15
15
|
const parentStructures = _.map((s) =>
|
|
16
16
|
_.isNil(_.prop("alias")(s))
|
|
17
17
|
? _.prop("structure")(s)
|
|
18
|
-
: { ..._.prop("structure")(s), alias: _.prop("alias")(s) }
|
|
18
|
+
: { ..._.prop("structure")(s), alias: _.prop("alias")(s) },
|
|
19
19
|
)(structures);
|
|
20
20
|
const allOperators = _.flow(
|
|
21
21
|
_.values,
|
|
22
22
|
_.map(_.prop("operators")),
|
|
23
|
-
_.flatten
|
|
23
|
+
_.flatten,
|
|
24
24
|
)(typeOperators);
|
|
25
25
|
|
|
26
26
|
const onStructureChange = (index, value) => {
|
|
27
27
|
const structure = {
|
|
28
28
|
..._.pick(["field_type", "name", "parent_index", "type", "metadata"])(
|
|
29
|
-
value
|
|
29
|
+
value,
|
|
30
30
|
),
|
|
31
31
|
id: value.data_structure_id,
|
|
32
32
|
};
|
|
@@ -32,7 +32,7 @@ const Filter = ({
|
|
|
32
32
|
}) => {
|
|
33
33
|
const { formatMessage } = useIntl();
|
|
34
34
|
const [activePopulation, setActivePopulation] = useState(
|
|
35
|
-
!_.isEmpty(clause?.population)
|
|
35
|
+
!_.isEmpty(clause?.population),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
const conditionApplies = (row) =>
|
|
@@ -115,7 +115,7 @@ const Filter = ({
|
|
|
115
115
|
active={activeConditionIndex === index}
|
|
116
116
|
onClick={() =>
|
|
117
117
|
setActiveConditionIndex(
|
|
118
|
-
activeConditionIndex === index ? -1 : index
|
|
118
|
+
activeConditionIndex === index ? -1 : index,
|
|
119
119
|
)
|
|
120
120
|
}
|
|
121
121
|
>
|
|
@@ -9,7 +9,7 @@ import { DomainSelector } from "@truedat/core/components";
|
|
|
9
9
|
import LimitsForm from "./LimitsForm";
|
|
10
10
|
|
|
11
11
|
const SelectableDynamicForm = lazy(
|
|
12
|
-
() => import("@truedat/df/components/SelectableDynamicForm")
|
|
12
|
+
() => import("@truedat/df/components/SelectableDynamicForm"),
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
const DomainActionsLoader = ({ id, actions, onLoad }) => {
|
|
@@ -12,7 +12,7 @@ import LimitsForm from "./LimitsForm";
|
|
|
12
12
|
import { areLimitsValid } from "./limitsValidation";
|
|
13
13
|
|
|
14
14
|
const SelectableDynamicForm = lazy(
|
|
15
|
-
() => import("@truedat/df/components/SelectableDynamicForm")
|
|
15
|
+
() => import("@truedat/df/components/SelectableDynamicForm"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
const DomainActionsLoader = ({ id, actions, onLoad }) => {
|
|
@@ -70,12 +70,12 @@ export const RuleImplementationBasicForm = ({
|
|
|
70
70
|
useEffect(() => {
|
|
71
71
|
const currentDomainActions = _.flow(
|
|
72
72
|
_.find((domain) => domain.id === String(ruleImplementation.domain_id)),
|
|
73
|
-
_.pathOr([], "actions")
|
|
73
|
+
_.pathOr([], "actions"),
|
|
74
74
|
)(domains);
|
|
75
75
|
|
|
76
76
|
_.flow(
|
|
77
77
|
_.any((action) => action == "publishImplementation"),
|
|
78
|
-
setCanPublish
|
|
78
|
+
setCanPublish,
|
|
79
79
|
)(currentDomainActions);
|
|
80
80
|
|
|
81
81
|
return () => {
|
|
@@ -85,22 +85,22 @@ export const RuleImplementationForm = ({
|
|
|
85
85
|
_.flow(
|
|
86
86
|
_.reduce((actions, domain) => _.concat(actions, domain.actions), []),
|
|
87
87
|
_.any((action) => action == "manageSegments"),
|
|
88
|
-
setCanManageSegmentsAnyDomain
|
|
88
|
+
setCanManageSegmentsAnyDomain,
|
|
89
89
|
)(domains);
|
|
90
90
|
|
|
91
91
|
const currentDomainActions = _.flow(
|
|
92
92
|
_.find((domain) => domain.id === String(ruleImplementation.domain_id)),
|
|
93
|
-
_.pathOr([], "actions")
|
|
93
|
+
_.pathOr([], "actions"),
|
|
94
94
|
)(domains);
|
|
95
95
|
|
|
96
96
|
_.flow(
|
|
97
97
|
_.any((action) => action == "manageSegments"),
|
|
98
|
-
setCanManageSegmentsCurrentDomain
|
|
98
|
+
setCanManageSegmentsCurrentDomain,
|
|
99
99
|
)(currentDomainActions);
|
|
100
100
|
|
|
101
101
|
_.flow(
|
|
102
102
|
_.any((action) => action == "publishImplementation"),
|
|
103
|
-
setCanPublishCurrentDomain
|
|
103
|
+
setCanPublishCurrentDomain,
|
|
104
104
|
)(currentDomainActions);
|
|
105
105
|
|
|
106
106
|
setIsLoadingActions(false);
|
|
@@ -140,7 +140,11 @@ export const RuleImplementationForm = ({
|
|
|
140
140
|
"structure.name",
|
|
141
141
|
]) &&
|
|
142
142
|
(i == 0 ||
|
|
143
|
-
_.flow(
|
|
143
|
+
_.flow(
|
|
144
|
+
_.nth(i),
|
|
145
|
+
_.prop("clauses"),
|
|
146
|
+
areClausesComplete,
|
|
147
|
+
)(structures)),
|
|
144
148
|
)(_.range(0, _.size(structures)));
|
|
145
149
|
|
|
146
150
|
if (!isLoadingActions) {
|
|
@@ -195,7 +199,7 @@ export const RuleImplementationForm = ({
|
|
|
195
199
|
|
|
196
200
|
const validValidations = (validationsSet) =>
|
|
197
201
|
_.every(
|
|
198
|
-
(validations) => _.negate(_.isEmpty) && validationsComplete(validations)
|
|
202
|
+
(validations) => _.negate(_.isEmpty) && validationsComplete(validations),
|
|
199
203
|
)(validationsSet);
|
|
200
204
|
|
|
201
205
|
const validationsComplete = (validations) =>
|
|
@@ -215,7 +219,7 @@ export const RuleImplementationForm = ({
|
|
|
215
219
|
mandatoryAttr(attr, item) &&
|
|
216
220
|
!emptyAttr(attr, item) &&
|
|
217
221
|
validArity(attr, item) &&
|
|
218
|
-
nestedValid(attr, item)
|
|
222
|
+
nestedValid(attr, item),
|
|
219
223
|
)(attrs) && isValidValue(attrs, item?.value);
|
|
220
224
|
|
|
221
225
|
const mandatoryAttr = (attr, item) =>
|
|
@@ -232,7 +236,7 @@ export const RuleImplementationForm = ({
|
|
|
232
236
|
const isValidValue = (attrs, value) =>
|
|
233
237
|
attrs.includes("value") && Array.isArray(value)
|
|
234
238
|
? _.every((val) => val != null && isValidReferenceDatasetField(val))(
|
|
235
|
-
value
|
|
239
|
+
value,
|
|
236
240
|
) || _.every((val) => val != null && isValidField(val))(value)
|
|
237
241
|
: true;
|
|
238
242
|
|
|
@@ -277,7 +281,7 @@ export const RuleImplementationForm = ({
|
|
|
277
281
|
|
|
278
282
|
const getNextStep = (stepName) => {
|
|
279
283
|
const currentStepIndex = _.findIndex((step) => step.name == stepName)(
|
|
280
|
-
steps
|
|
284
|
+
steps,
|
|
281
285
|
);
|
|
282
286
|
const nextStep =
|
|
283
287
|
currentStepIndex + 1 >= steps.length
|
|
@@ -298,7 +302,7 @@ export const RuleImplementationForm = ({
|
|
|
298
302
|
|
|
299
303
|
const getPreviousStep = (stepName) => {
|
|
300
304
|
const currentStepIndex = _.findIndex((step) => step.name == stepName)(
|
|
301
|
-
steps
|
|
305
|
+
steps,
|
|
302
306
|
);
|
|
303
307
|
|
|
304
308
|
const prevStep =
|
|
@@ -317,7 +321,7 @@ export const RuleImplementationForm = ({
|
|
|
317
321
|
const validStep = (stepName) => {
|
|
318
322
|
return _.flow(
|
|
319
323
|
_.find((step) => step.name == stepName),
|
|
320
|
-
_.pathOr(() => false, "isValid")
|
|
324
|
+
_.pathOr(() => false, "isValid"),
|
|
321
325
|
)(steps)();
|
|
322
326
|
};
|
|
323
327
|
|