@finos/legend-extension-dsl-data-quality 1.0.27 → 1.0.29
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +1 -1
- package/lib/components/DSL_DataQuality_ClassElementDriver.js +12 -5
- package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +1 -1
- package/lib/components/DataQualityConstraintsSelection.d.ts.map +1 -1
- package/lib/components/DataQualityConstraintsSelection.js +42 -4
- package/lib/components/DataQualityConstraintsSelection.js.map +1 -1
- package/lib/components/DataQualityResultPanel.js +3 -3
- package/lib/components/DataQualityResultPanel.js.map +1 -1
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts +2 -3
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts.map +1 -1
- package/lib/components/states/DataQualityGraphFetchTreeState.js +2 -5
- package/lib/components/states/DataQualityGraphFetchTreeState.js.map +1 -1
- package/lib/components/states/DataQualityState.d.ts +1 -2
- package/lib/components/states/DataQualityState.d.ts.map +1 -1
- package/lib/components/states/DataQualityState.js +5 -8
- package/lib/components/states/DataQualityState.js.map +1 -1
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts +2 -1
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js +14 -4
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +2 -2
- package/src/components/DSL_DataQuality_ClassElementDriver.tsx +25 -3
- package/src/components/DataQualityConstraintsSelection.tsx +74 -11
- package/src/components/DataQualityResultPanel.tsx +5 -5
- package/src/components/states/DataQualityGraphFetchTreeState.ts +2 -6
- package/src/components/states/DataQualityState.ts +12 -15
- package/src/components/utils/DataQualityGraphFetchTreeUtil.ts +42 -16
- package/style/_data-quality-validation-builder.scss +7 -2
- package/style/index.scss +1 -0
@@ -380,22 +380,27 @@ export const isConstraintsClassesTreeEmpty = (
|
|
380
380
|
treeData: DataQualityGraphFetchTreeData,
|
381
381
|
): boolean => treeData.rootIds.length === 0;
|
382
382
|
|
383
|
-
export const updateNodeConstraints = (
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
383
|
+
export const updateNodeConstraints = action(
|
384
|
+
(
|
385
|
+
treeData: DataQualityGraphFetchTreeData,
|
386
|
+
node: DataQualityGraphFetchTreeNodeData,
|
387
|
+
constraints: Constraint[],
|
388
|
+
addConstraint: boolean,
|
389
|
+
): void => {
|
390
|
+
//update the node of graph fetch tree present
|
391
|
+
const updatedTreeNode = node.tree;
|
392
|
+
if (addConstraint) {
|
393
|
+
constraints.forEach((constraint) => {
|
394
|
+
updatedTreeNode.constraints.push(constraint.name);
|
395
|
+
});
|
396
|
+
} else {
|
397
|
+
updatedTreeNode.constraints = updatedTreeNode.constraints.filter(
|
398
|
+
(constraintName) =>
|
399
|
+
!constraints.find((constraint) => constraint.name === constraintName),
|
400
|
+
);
|
401
|
+
}
|
402
|
+
},
|
403
|
+
);
|
399
404
|
|
400
405
|
export const addQueryBuilderPropertyNode = (
|
401
406
|
treeData: DataQualityGraphFetchTreeData,
|
@@ -560,3 +565,24 @@ export const addQueryBuilderPropertyNode = (
|
|
560
565
|
treeData.nodes.set(rootNodeFromTree.id, rootNodeFromTree);
|
561
566
|
}
|
562
567
|
};
|
568
|
+
|
569
|
+
export const buildDefaultDataQualityRootGraphFetchTree = action(
|
570
|
+
(selectedClass: Class): DataQualityRootGraphFetchTree => {
|
571
|
+
const dataQualityRootGraphFetchTree = new DataQualityRootGraphFetchTree(
|
572
|
+
PackageableElementExplicitReference.create(selectedClass),
|
573
|
+
);
|
574
|
+
dataQualityRootGraphFetchTree.constraints = selectedClass.constraints.map(
|
575
|
+
(constraint) => constraint.name,
|
576
|
+
);
|
577
|
+
dataQualityRootGraphFetchTree.subTrees = selectedClass.properties
|
578
|
+
.filter((property) => property.multiplicity.lowerBound > 0)
|
579
|
+
.map(
|
580
|
+
(property) =>
|
581
|
+
new DataQualityPropertyGraphFetchTree(
|
582
|
+
PropertyExplicitReference.create(property),
|
583
|
+
undefined,
|
584
|
+
),
|
585
|
+
);
|
586
|
+
return dataQualityRootGraphFetchTree;
|
587
|
+
},
|
588
|
+
);
|
@@ -1013,8 +1013,9 @@
|
|
1013
1013
|
}
|
1014
1014
|
|
1015
1015
|
&__node__icon {
|
1016
|
-
|
1017
|
-
|
1016
|
+
padding-right: 0.5rem;
|
1017
|
+
height: 2.2rem;
|
1018
|
+
@include flexCenter;
|
1018
1019
|
}
|
1019
1020
|
|
1020
1021
|
&__expand-icon,
|
@@ -1590,6 +1591,10 @@
|
|
1590
1591
|
background: var(--color-green-200);
|
1591
1592
|
}
|
1592
1593
|
}
|
1594
|
+
|
1595
|
+
&__validation {
|
1596
|
+
width: 12rem;
|
1597
|
+
}
|
1593
1598
|
}
|
1594
1599
|
|
1595
1600
|
&__export__dropdown {
|