@truedat/dq 4.31.7 → 4.32.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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.32.2",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/plugin-transform-modules-commonjs": "^7.15.0",
|
|
32
32
|
"@babel/preset-env": "^7.15.0",
|
|
33
33
|
"@babel/preset-react": "^7.14.5",
|
|
34
|
-
"@truedat/test": "4.
|
|
34
|
+
"@truedat/test": "4.32.0",
|
|
35
35
|
"babel-jest": "^27.0.6",
|
|
36
36
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
37
37
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@apollo/client": "^3.4.10",
|
|
85
|
-
"@truedat/core": "4.
|
|
86
|
-
"@truedat/df": "4.
|
|
85
|
+
"@truedat/core": "4.32.0",
|
|
86
|
+
"@truedat/df": "4.32.1",
|
|
87
87
|
"axios": "^0.19.2",
|
|
88
88
|
"graphql": "^15.5.3",
|
|
89
89
|
"path-to-regexp": "^1.7.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"react-dom": ">= 16.8.6 < 17",
|
|
104
104
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "827680aa084932f97406bf372c08f10d826093a6"
|
|
107
107
|
}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
import { HistoryBackButton } from "@truedat/core/components";
|
|
20
20
|
import { applyTemplate } from "@truedat/df/utils";
|
|
21
21
|
import { selectDomain } from "@truedat/df/routines";
|
|
22
|
+
import { getDomainSelectorOptions } from "@truedat/bg/selectors";
|
|
22
23
|
import DynamicRuleForm from "./DynamicRuleForm";
|
|
23
24
|
|
|
24
25
|
const DomainDropdownSelector = React.lazy(() =>
|
|
@@ -345,9 +346,13 @@ export class RuleForm extends React.Component {
|
|
|
345
346
|
} = this.props;
|
|
346
347
|
const rule = this.state;
|
|
347
348
|
const { domain_id } = rule;
|
|
348
|
-
const { concept } = this.props;
|
|
349
|
+
const { concept, domainOptions } = this.props;
|
|
349
350
|
const messages = this.generateValidationMessages();
|
|
350
|
-
const
|
|
351
|
+
const hasDomainSelected = _.flow(
|
|
352
|
+
_.reject((id) => _.isNil(id) || id === ""),
|
|
353
|
+
_.negate(_.isEmpty)
|
|
354
|
+
)([domain_id]);
|
|
355
|
+
const defaultFilters = !hasDomainSelected
|
|
351
356
|
? filters
|
|
352
357
|
: { ...filters, domain_ids: [domain_id] };
|
|
353
358
|
|
|
@@ -394,7 +399,11 @@ export class RuleForm extends React.Component {
|
|
|
394
399
|
>
|
|
395
400
|
<DomainDropdownSelector
|
|
396
401
|
name="domain"
|
|
397
|
-
|
|
402
|
+
domainOptions={
|
|
403
|
+
domainOptions
|
|
404
|
+
? getDomainSelectorOptions({ domains: domainOptions })
|
|
405
|
+
: null
|
|
406
|
+
}
|
|
398
407
|
hideLabel
|
|
399
408
|
invalid={!_.isFinite(this.state.domain_id)}
|
|
400
409
|
onChange={this.handleDomainSelected}
|
|
@@ -564,6 +573,7 @@ RuleForm.propTypes = {
|
|
|
564
573
|
template: PropTypes.object,
|
|
565
574
|
match: PropTypes.object,
|
|
566
575
|
intl: PropTypes.object,
|
|
576
|
+
domainOptions: PropTypes.array,
|
|
567
577
|
};
|
|
568
578
|
|
|
569
579
|
const mapStateToProps = (state) => ({
|
|
@@ -572,6 +582,7 @@ const mapStateToProps = (state) => ({
|
|
|
572
582
|
templatesLoaded: !state.templatesLoading && !_.isEmpty(state.templates),
|
|
573
583
|
template: state.template,
|
|
574
584
|
applyTemplate: applyTemplate(state.template),
|
|
585
|
+
domainOptions: _.pathOr(null, "conceptRulesActions.domain_ids")(state),
|
|
575
586
|
});
|
|
576
587
|
|
|
577
588
|
const mapDispatchToProps = { selectDomain };
|
|
@@ -178,11 +178,11 @@ exports[`<RuleForm /> matches the latest snapshot for create 1`] = `
|
|
|
178
178
|
required={true}
|
|
179
179
|
>
|
|
180
180
|
<lazy
|
|
181
|
+
domainOptions={null}
|
|
181
182
|
hideLabel={true}
|
|
182
183
|
invalid={true}
|
|
183
184
|
name="domain"
|
|
184
185
|
onChange={[Function]}
|
|
185
|
-
scope="manage_quality_rule"
|
|
186
186
|
value={null}
|
|
187
187
|
/>
|
|
188
188
|
</FieldLabelWrapping>
|
|
@@ -412,11 +412,11 @@ exports[`<RuleForm /> matches the latest snapshot for editMode 1`] = `
|
|
|
412
412
|
required={true}
|
|
413
413
|
>
|
|
414
414
|
<lazy
|
|
415
|
+
domainOptions={null}
|
|
415
416
|
hideLabel={true}
|
|
416
417
|
invalid={true}
|
|
417
418
|
name="domain"
|
|
418
419
|
onChange={[Function]}
|
|
419
|
-
scope="manage_quality_rule"
|
|
420
420
|
value={null}
|
|
421
421
|
/>
|
|
422
422
|
</FieldLabelWrapping>
|