@finos/legend-extension-dsl-data-quality 1.0.60 → 2.0.0
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 → DSL_DataQuality_ElementDriver.d.ts} +17 -7
- package/lib/components/DSL_DataQuality_ElementDriver.d.ts.map +1 -0
- package/lib/components/{DSL_DataQuality_ClassElementDriver.js → DSL_DataQuality_ElementDriver.js} +70 -23
- package/lib/components/DSL_DataQuality_ElementDriver.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +20 -39
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/{DSL_NewDataQualityClassValidationElement.d.ts → DSL_NewDataQualityValidationElement.d.ts} +2 -2
- package/lib/components/DSL_NewDataQualityValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityValidationElement.js +80 -0
- package/lib/components/DSL_NewDataQualityValidationElement.js.map +1 -0
- package/lib/components/DataQualityRelationTrialRuns.d.ts +22 -0
- package/lib/components/DataQualityRelationTrialRuns.d.ts.map +1 -0
- package/lib/components/DataQualityRelationTrialRuns.js +87 -0
- package/lib/components/DataQualityRelationTrialRuns.js.map +1 -0
- package/lib/components/{DSL_NewDataQualityServiceValidationElement.d.ts → DataQualityRelationValidationConfigurationEditor.d.ts} +2 -2
- package/lib/components/DataQualityRelationValidationConfigurationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityRelationValidationConfigurationEditor.js +99 -0
- package/lib/components/DataQualityRelationValidationConfigurationEditor.js.map +1 -0
- package/lib/components/DataQualityRelationValidationEditor.d.ts +30 -0
- package/lib/components/DataQualityRelationValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityRelationValidationEditor.js +89 -0
- package/lib/components/DataQualityRelationValidationEditor.js.map +1 -0
- package/lib/components/DataQualityResultPanel.d.ts.map +1 -1
- package/lib/components/DataQualityResultPanel.js +1 -1
- package/lib/components/DataQualityResultPanel.js.map +1 -1
- package/lib/components/DataQualityResultValues.d.ts +0 -2
- package/lib/components/DataQualityResultValues.d.ts.map +1 -1
- package/lib/components/DataQualityResultValues.js.map +1 -1
- package/lib/components/DataQualitySideBar.js +2 -2
- package/lib/components/DataQualitySideBar.js.map +1 -1
- package/lib/components/DataQualityValidationDetailPanel.d.ts +36 -0
- package/lib/components/DataQualityValidationDetailPanel.d.ts.map +1 -0
- package/lib/components/DataQualityValidationDetailPanel.js +39 -0
- package/lib/components/DataQualityValidationDetailPanel.js.map +1 -0
- package/lib/components/DataQualityValidationParametersEditor.d.ts +15 -0
- package/lib/components/DataQualityValidationParametersEditor.d.ts.map +1 -0
- package/lib/components/DataQualityValidationParametersEditor.js +129 -0
- package/lib/components/DataQualityValidationParametersEditor.js.map +1 -0
- package/lib/components/states/ConstraintState.d.ts +2 -0
- package/lib/components/states/ConstraintState.d.ts.map +1 -1
- package/lib/components/states/ConstraintState.js +2 -0
- package/lib/components/states/ConstraintState.js.map +1 -1
- package/lib/components/states/DataQualityClassValidationState.d.ts +2 -2
- package/lib/components/states/DataQualityClassValidationState.d.ts.map +1 -1
- package/lib/components/states/DataQualityClassValidationState.js +4 -4
- package/lib/components/states/DataQualityClassValidationState.js.map +1 -1
- package/lib/components/states/DataQualityRelationResultState.d.ts +46 -0
- package/lib/components/states/DataQualityRelationResultState.d.ts.map +1 -0
- package/lib/components/states/DataQualityRelationResultState.js +194 -0
- package/lib/components/states/DataQualityRelationResultState.js.map +1 -0
- package/lib/components/states/DataQualityRelationValidationConfigurationState.d.ts +73 -0
- package/lib/components/states/DataQualityRelationValidationConfigurationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityRelationValidationConfigurationState.js +255 -0
- package/lib/components/states/DataQualityRelationValidationConfigurationState.js.map +1 -0
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.d.ts +32 -0
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.d.ts.map +1 -0
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.js +79 -0
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.js.map +1 -0
- package/lib/components/states/DataQualityRelationValidationState.d.ts +38 -0
- package/lib/components/states/DataQualityRelationValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityRelationValidationState.js +119 -0
- package/lib/components/states/DataQualityRelationValidationState.js.map +1 -0
- package/lib/components/states/DataQualityResultState.d.ts.map +1 -1
- package/lib/components/states/DataQualityResultState.js +6 -3
- package/lib/components/states/DataQualityResultState.js.map +1 -1
- package/lib/components/states/DataQualityState.js +1 -1
- package/lib/components/states/DataQualityState.js.map +1 -1
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts +5 -1
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts.map +1 -1
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js +4 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js.map +1 -1
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts.map +1 -1
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js +2 -1
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +36 -3
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +58 -4
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts +2 -1
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js +2 -1
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +13 -2
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +36 -2
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js +5 -2
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts +5 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +29 -2
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts +6 -5
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js +34 -40
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts +8 -6
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js +19 -12
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/{V1_DataQualityConstraintsConfiguration.d.ts → V1_DataQualityValidationConfiguration.d.ts} +26 -4
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/{V1_DataQualityConstraintsConfiguration.js → V1_DataQualityValidationConfiguration.js} +49 -4
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.d.ts +7 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.js +43 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.d.ts +6 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.js +39 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts +5 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +27 -9
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.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 +7 -7
- package/src/components/{DSL_DataQuality_ClassElementDriver.tsx → DSL_DataQuality_ElementDriver.tsx} +87 -18
- package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +33 -48
- package/src/components/DSL_NewDataQualityValidationElement.tsx +208 -0
- package/src/components/DataQualityRelationTrialRuns.tsx +288 -0
- package/src/components/DataQualityRelationValidationConfigurationEditor.tsx +364 -0
- package/src/components/DataQualityRelationValidationEditor.tsx +290 -0
- package/src/components/DataQualityResultPanel.tsx +1 -4
- package/src/components/DataQualityResultValues.tsx +1 -5
- package/src/components/DataQualitySideBar.tsx +2 -2
- package/src/components/DataQualityValidationDetailPanel.tsx +182 -0
- package/src/components/DataQualityValidationParametersEditor.tsx +355 -0
- package/src/components/states/ConstraintState.ts +2 -0
- package/src/components/states/DataQualityClassValidationState.ts +5 -5
- package/src/components/states/DataQualityRelationResultState.ts +274 -0
- package/src/components/states/DataQualityRelationValidationConfigurationState.ts +429 -0
- package/src/components/states/DataQualityRelationValidationLambdaEditorState.ts +138 -0
- package/src/components/states/DataQualityRelationValidationState.ts +180 -0
- package/src/components/states/DataQualityResultState.ts +6 -8
- package/src/components/states/DataQualityState.ts +1 -1
- package/src/graph/metamodel/DSL_DataQuality_HashUtils.ts +4 -0
- package/src/graph/metamodel/DSL_DataQuality_PureGraphPlugin.ts +2 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +79 -3
- package/src/graph-manager/DSL_DataQuality_GraphManagerHelper.ts +13 -0
- package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +107 -0
- package/src/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.ts +8 -0
- package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +54 -1
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.ts +5 -3
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.ts +72 -81
- package/src/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.ts +20 -23
- package/src/graph-manager/protocol/pure/v1/{V1_DataQualityConstraintsConfiguration.ts → V1_DataQualityValidationConfiguration.ts} +63 -4
- package/src/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.ts +116 -2
- package/src/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.ts +78 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +55 -8
- package/style/_data-quality-relation-validation-builder.scss +454 -0
- package/style/index.scss +6 -0
- package/tsconfig.json +13 -6
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +0 -1
- package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +0 -1
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts +0 -27
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts.map +0 -1
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js +0 -41
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js.map +0 -1
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts.map +0 -1
- package/lib/components/DSL_NewDataQualityClassValidationElement.js +0 -64
- package/lib/components/DSL_NewDataQualityClassValidationElement.js.map +0 -1
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts.map +0 -1
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js +0 -41
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js.map +0 -1
- package/src/components/DSL_DataQuality_ServiceElementDriver.tsx +0 -57
- package/src/components/DSL_NewDataQualityClassValidationElement.tsx +0 -156
- package/src/components/DSL_NewDataQualityServiceValidationElement.tsx +0 -74
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type EditorStore, NewElementDriver } from '@finos/legend-application-studio';
|
17
|
-
import {
|
17
|
+
import { type DataQualityValidationConfiguration } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
18
18
|
import { type Mapping, type PackageableRuntime } from '@finos/legend-graph';
|
19
19
|
import { type PackageableElementOption } from '@finos/legend-lego/graph-editor';
|
20
20
|
import { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
@@ -22,12 +22,18 @@ export type RuntimeOption = {
|
|
22
22
|
label: string;
|
23
23
|
value: PackageableRuntime | undefined;
|
24
24
|
};
|
25
|
-
export declare enum
|
25
|
+
export declare enum CLASS_ELEMENT_CREATION_BASIS {
|
26
26
|
MAPPING_RUNTIME_BASED = "Mapping/Runtime",
|
27
27
|
DATASPACE_BASED = "DataSpace"
|
28
28
|
}
|
29
|
-
export declare
|
30
|
-
|
29
|
+
export declare enum DQ_VALIDATION_ELEMENT_TYPE {
|
30
|
+
CLASS_VALIDATION = "ClassValidation",
|
31
|
+
SERVICE_VALIDATION = "ServiceValidation",
|
32
|
+
RELATION_VALIDATION = "RelationValidation"
|
33
|
+
}
|
34
|
+
export declare class DataQuality_ElementDriver extends NewElementDriver<DataQualityValidationConfiguration> {
|
35
|
+
dqValidationElementType: DQ_VALIDATION_ELEMENT_TYPE;
|
36
|
+
dqClassElementCreationBasis: CLASS_ELEMENT_CREATION_BASIS;
|
31
37
|
dataSpaceSelected: PackageableElementOption<DataSpace> | undefined;
|
32
38
|
mappingSelected: PackageableElementOption<Mapping> | undefined;
|
33
39
|
runtimeSelected: RuntimeOption | undefined;
|
@@ -39,8 +45,12 @@ export declare class DataQuality_ClassElementDriver extends NewElementDriver<Dat
|
|
39
45
|
setDataSpaceSelected(dataSpace: PackageableElementOption<DataSpace> | undefined): void;
|
40
46
|
setMappingSelected(mappingSelected: PackageableElementOption<Mapping> | undefined): void;
|
41
47
|
setRuntimeSelected(runtimeSelected: RuntimeOption | undefined): void;
|
42
|
-
|
48
|
+
setDqClassElementCreationBasis(dqClassElementCreationBasis: CLASS_ELEMENT_CREATION_BASIS): void;
|
49
|
+
setDqValidationElementType(dqValidationElementType: DQ_VALIDATION_ELEMENT_TYPE): void;
|
43
50
|
get isValid(): boolean;
|
44
|
-
|
51
|
+
createRelationValidationElement(name: string): DataQualityValidationConfiguration;
|
52
|
+
createServiceValidationElement(name: string): DataQualityValidationConfiguration;
|
53
|
+
createClassValidationElement(name: string): DataQualityValidationConfiguration;
|
54
|
+
createElement(name: string): DataQualityValidationConfiguration;
|
45
55
|
}
|
46
|
-
//# sourceMappingURL=
|
56
|
+
//# sourceMappingURL=DSL_DataQuality_ElementDriver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_DataQuality_ElementDriver.d.ts","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_ElementDriver.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,kCAAkC,EAOxC,MAAM,gGAAgG,CAAC;AAQxG,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,kBAAkB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,SAAS,EAEV,MAAM,8CAA8C,CAAC;AAGtD,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,oBAAY,4BAA4B;IACtC,qBAAqB,oBAAoB;IACzC,eAAe,cAAc;CAC9B;AAED,oBAAY,0BAA0B;IACpC,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_DataQuality_ClassElementDriver.js → DSL_DataQuality_ElementDriver.js}
RENAMED
@@ -14,20 +14,27 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { NewElementDriver, } from '@finos/legend-application-studio';
|
17
|
-
import { DataQualityClassValidationsConfiguration, DataSpaceDataQualityExecutionContext, MappingAndRuntimeDataQualityExecutionContext, } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
17
|
+
import { DataQualityClassValidationsConfiguration, DataQualityServiceValidationConfiguration, DataQualityRelationValidationConfiguration, DataSpaceDataQualityExecutionContext, MappingAndRuntimeDataQualityExecutionContext, DataQualityRelationQueryLambda, } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
18
18
|
import { action, computed, makeObservable, observable } from 'mobx';
|
19
19
|
import { filterByType, getNullableFirstEntry, guaranteeNonNullable, UnsupportedOperationError, } from '@finos/legend-shared';
|
20
20
|
import { getMappingCompatibleRuntimes, PackageableElementExplicitReference, getMappingCompatibleClasses, } from '@finos/legend-graph';
|
21
21
|
import { buildElementOption, } from '@finos/legend-lego/graph-editor';
|
22
22
|
import { DataSpace, resolveUsableDataSpaceClasses, } from '@finos/legend-extension-dsl-data-space/graph';
|
23
23
|
import { buildDefaultDataQualityRootGraphFetchTree } from './utils/DataQualityGraphFetchTreeUtil.js';
|
24
|
-
export var
|
25
|
-
(function (
|
26
|
-
|
27
|
-
|
28
|
-
})(
|
29
|
-
export
|
30
|
-
|
24
|
+
export var CLASS_ELEMENT_CREATION_BASIS;
|
25
|
+
(function (CLASS_ELEMENT_CREATION_BASIS) {
|
26
|
+
CLASS_ELEMENT_CREATION_BASIS["MAPPING_RUNTIME_BASED"] = "Mapping/Runtime";
|
27
|
+
CLASS_ELEMENT_CREATION_BASIS["DATASPACE_BASED"] = "DataSpace";
|
28
|
+
})(CLASS_ELEMENT_CREATION_BASIS || (CLASS_ELEMENT_CREATION_BASIS = {}));
|
29
|
+
export var DQ_VALIDATION_ELEMENT_TYPE;
|
30
|
+
(function (DQ_VALIDATION_ELEMENT_TYPE) {
|
31
|
+
DQ_VALIDATION_ELEMENT_TYPE["CLASS_VALIDATION"] = "ClassValidation";
|
32
|
+
DQ_VALIDATION_ELEMENT_TYPE["SERVICE_VALIDATION"] = "ServiceValidation";
|
33
|
+
DQ_VALIDATION_ELEMENT_TYPE["RELATION_VALIDATION"] = "RelationValidation";
|
34
|
+
})(DQ_VALIDATION_ELEMENT_TYPE || (DQ_VALIDATION_ELEMENT_TYPE = {}));
|
35
|
+
export class DataQuality_ElementDriver extends NewElementDriver {
|
36
|
+
dqValidationElementType;
|
37
|
+
dqClassElementCreationBasis;
|
31
38
|
dataSpaceSelected;
|
32
39
|
mappingSelected;
|
33
40
|
runtimeSelected;
|
@@ -37,14 +44,18 @@ export class DataQuality_ClassElementDriver extends NewElementDriver {
|
|
37
44
|
dataSpaceSelected: observable,
|
38
45
|
mappingSelected: observable,
|
39
46
|
runtimeSelected: observable,
|
40
|
-
|
47
|
+
dqValidationElementType: observable,
|
48
|
+
dqClassElementCreationBasis: observable,
|
41
49
|
setDataSpaceSelected: action,
|
42
50
|
setMappingSelected: action,
|
43
51
|
setRuntimeSelected: action,
|
44
|
-
|
52
|
+
setDqClassElementCreationBasis: action,
|
53
|
+
setDqValidationElementType: action,
|
45
54
|
runtimeOptions: computed,
|
46
55
|
});
|
47
|
-
this.
|
56
|
+
this.dqValidationElementType = DQ_VALIDATION_ELEMENT_TYPE.CLASS_VALIDATION;
|
57
|
+
this.dqClassElementCreationBasis =
|
58
|
+
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED;
|
48
59
|
this.dataSpaceSelected = getNullableFirstEntry(this.dataSpaceOptions);
|
49
60
|
this.mappingSelected = getNullableFirstEntry(this.mappingOptions);
|
50
61
|
this.runtimeSelected = getNullableFirstEntry(this.runtimeOptions);
|
@@ -74,26 +85,50 @@ export class DataQuality_ClassElementDriver extends NewElementDriver {
|
|
74
85
|
setRuntimeSelected(runtimeSelected) {
|
75
86
|
this.runtimeSelected = runtimeSelected;
|
76
87
|
}
|
77
|
-
|
78
|
-
this.
|
88
|
+
setDqClassElementCreationBasis(dqClassElementCreationBasis) {
|
89
|
+
this.dqClassElementCreationBasis = dqClassElementCreationBasis;
|
90
|
+
}
|
91
|
+
setDqValidationElementType(dqValidationElementType) {
|
92
|
+
this.dqValidationElementType = dqValidationElementType;
|
79
93
|
}
|
80
94
|
get isValid() {
|
81
|
-
if (this.
|
95
|
+
if (this.dqValidationElementType ===
|
96
|
+
DQ_VALIDATION_ELEMENT_TYPE.RELATION_VALIDATION ||
|
97
|
+
this.dqValidationElementType ===
|
98
|
+
DQ_VALIDATION_ELEMENT_TYPE.SERVICE_VALIDATION) {
|
99
|
+
return true;
|
100
|
+
}
|
101
|
+
if (this.dqClassElementCreationBasis ===
|
102
|
+
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED) {
|
82
103
|
return Boolean(this.dataSpaceSelected);
|
83
104
|
}
|
84
105
|
return Boolean(this.mappingSelected && this.runtimeSelected);
|
85
106
|
}
|
86
|
-
|
107
|
+
createRelationValidationElement(name) {
|
108
|
+
const relationValidationConfiguration = new DataQualityRelationValidationConfiguration(name);
|
109
|
+
relationValidationConfiguration.query =
|
110
|
+
new DataQualityRelationQueryLambda();
|
111
|
+
relationValidationConfiguration.query.body =
|
112
|
+
this.editorStore.graphManagerState.graphManager.createDefaultBasicRawLambda().body;
|
113
|
+
this.editorStore.graphManagerState.graphManager.createDefaultBasicRawLambda();
|
114
|
+
return relationValidationConfiguration;
|
115
|
+
}
|
116
|
+
createServiceValidationElement(name) {
|
117
|
+
return new DataQualityServiceValidationConfiguration(name);
|
118
|
+
}
|
119
|
+
createClassValidationElement(name) {
|
87
120
|
let usableClasses = [];
|
88
|
-
const
|
89
|
-
if (this.
|
121
|
+
const dataQualityClassConstraintsConfiguration = new DataQualityClassValidationsConfiguration(name);
|
122
|
+
if (this.dqClassElementCreationBasis ===
|
123
|
+
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED) {
|
90
124
|
const dataSpaceToSet = PackageableElementExplicitReference.create(this.dataSpaceSelected.value);
|
91
125
|
const dataSpaceExecutionContext = new DataSpaceDataQualityExecutionContext();
|
92
126
|
dataSpaceExecutionContext.context =
|
93
127
|
dataSpaceToSet.value.defaultExecutionContext.name;
|
94
128
|
dataSpaceExecutionContext.dataSpace = dataSpaceToSet;
|
95
|
-
|
96
|
-
|
129
|
+
dataQualityClassConstraintsConfiguration.context =
|
130
|
+
dataSpaceExecutionContext;
|
131
|
+
dataQualityClassConstraintsConfiguration.dataQualityRootGraphFetchTree =
|
97
132
|
undefined;
|
98
133
|
usableClasses = resolveUsableDataSpaceClasses(dataSpaceToSet.value, dataSpaceToSet.value.defaultExecutionContext.mapping.value, this.editorStore.graphManagerState);
|
99
134
|
}
|
@@ -107,7 +142,7 @@ export class DataQuality_ClassElementDriver extends NewElementDriver {
|
|
107
142
|
const mappingAndRuntimeExecutionContext = new MappingAndRuntimeDataQualityExecutionContext();
|
108
143
|
mappingAndRuntimeExecutionContext.mapping = mapping;
|
109
144
|
mappingAndRuntimeExecutionContext.runtime = runtimeValue;
|
110
|
-
|
145
|
+
dataQualityClassConstraintsConfiguration.context =
|
111
146
|
mappingAndRuntimeExecutionContext;
|
112
147
|
usableClasses = getMappingCompatibleClasses(mapping.value, this.editorStore.graphManagerState.usableClasses);
|
113
148
|
}
|
@@ -115,9 +150,21 @@ export class DataQuality_ClassElementDriver extends NewElementDriver {
|
|
115
150
|
if (usableClasses.length === 0) {
|
116
151
|
throw new UnsupportedOperationError('Must have at least one usable class with given mapping');
|
117
152
|
}
|
118
|
-
|
153
|
+
dataQualityClassConstraintsConfiguration.dataQualityRootGraphFetchTree =
|
119
154
|
buildDefaultDataQualityRootGraphFetchTree(usableClasses[0]);
|
120
|
-
return
|
155
|
+
return dataQualityClassConstraintsConfiguration;
|
156
|
+
}
|
157
|
+
createElement(name) {
|
158
|
+
switch (this.dqValidationElementType) {
|
159
|
+
case DQ_VALIDATION_ELEMENT_TYPE.RELATION_VALIDATION:
|
160
|
+
return this.createRelationValidationElement(name);
|
161
|
+
case DQ_VALIDATION_ELEMENT_TYPE.SERVICE_VALIDATION:
|
162
|
+
return this.createServiceValidationElement(name);
|
163
|
+
case DQ_VALIDATION_ELEMENT_TYPE.CLASS_VALIDATION:
|
164
|
+
return this.createClassValidationElement(name);
|
165
|
+
default:
|
166
|
+
throw new UnsupportedOperationError(`Can't create data quality validation configuration of type '${this.dqValidationElementType}'`);
|
167
|
+
}
|
121
168
|
}
|
122
169
|
}
|
123
|
-
//# sourceMappingURL=
|
170
|
+
//# sourceMappingURL=DSL_DataQuality_ElementDriver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_DataQuality_ElementDriver.js","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_ElementDriver.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,wCAAwC,EACxC,yCAAyC,EACzC,0CAA0C,EAC1C,oCAAoC,EACpC,4CAA4C,EAC5C,8BAA8B,GAC/B,MAAM,gGAAgG,CAAC;AACxG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIL,4BAA4B,EAC5B,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,SAAS,EACT,6BAA6B,GAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,yCAAyC,EAAE,MAAM,0CAA0C,CAAC;AAOrG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AAC;QAC/D,OAAO,wCAAwC,CAAC;IAClD,CAAC;IAED,aAAa,CAAC,IAAY;QACxB,QAAQ,IAAI,CAAC,uBAAuB,EAAE,CAAC;YACrC,KAAK,0BAA0B,CAAC,mBAAmB;gBACjD,OAAO,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;YACpD,KAAK,0BAA0B,CAAC,kBAAkB;gBAChD,OAAO,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAC;YACnD,KAAK,0BAA0B,CAAC,gBAAgB;gBAC9C,OAAO,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;YAEjD;gBACE,MAAM,IAAI,yBAAyB,CACjC,+DAA+D,IAAI,CAAC,uBAAuB,GAAG,CAC/F,CAAC;QACN,CAAC;IACH,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_DataQuality_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,2CAA2C,
|
1
|
+
{"version":3,"file":"DSL_DataQuality_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,2CAA2C,EAEhD,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAE1B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAE3B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAE/B,6BAA6B,EAE9B,MAAM,kCAAkC,CAAC;AAsB1C,qBAAa,6CACX,SAAQ,6BACR,YAAW,2CAA2C;;IAMtD,6BAA6B,IAAI,MAAM,EAAE;IAIzC,yCAAyC,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAQlE,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,+BAA+B,IAAI,sBAAsB,EAAE;IAW3D,mCAAmC,IAAI,0BAA0B,EAAE;IAiBnE,8BAA8B,IAAI,qBAAqB,EAAE;IA4BzD,kCAAkC,IAAI,yBAAyB,EAAE;IAuBjE,uCAAuC,IAAI,8BAA8B,EAAE;IAW3E,gCAAgC,IAAI,uBAAuB,EAAE;CAa9D"}
|
@@ -16,48 +16,39 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
*/
|
17
17
|
import packageJson from '../../package.json';
|
18
18
|
import { LegendStudioApplicationPlugin, PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY, } from '@finos/legend-application-studio';
|
19
|
-
import {
|
19
|
+
import {} from 'react';
|
20
|
+
import { DataQualityClassValidationsConfiguration, DataQualityServiceValidationConfiguration, DataQualityRelationValidationConfiguration, DataQualityValidationConfiguration, } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
20
21
|
import { EyeIcon } from '@finos/legend-art';
|
21
22
|
import { DataQualityClassValidationEditor } from './DataQualityClassValidationEditor.js';
|
22
|
-
import {
|
23
|
-
import { NewDataQualityServiceValidationElementEditor } from './DSL_NewDataQualityServiceValidationElement.js';
|
24
|
-
import { DataQuality_ServiceElementDriver } from './DSL_DataQuality_ServiceElementDriver.js';
|
23
|
+
import { DataQuality_ElementDriver } from './DSL_DataQuality_ElementDriver.js';
|
25
24
|
import { DataQualityServiceValidationEditor } from './DataQualityServiceValidationEditor.js';
|
26
25
|
import { DataQualityClassValidationState } from './states/DataQualityClassValidationState.js';
|
27
|
-
import {
|
28
|
-
import {} from 'react';
|
26
|
+
import { NewDataQualityValidationElementEditor } from './DSL_NewDataQualityValidationElement.js';
|
29
27
|
import { DataQualityServiceValidationState } from './states/DataQualityServiceValidationState.js';
|
30
|
-
|
31
|
-
|
32
|
-
const
|
33
|
-
const
|
28
|
+
import { DataQualityRelationValidationConfigurationState } from './states/DataQualityRelationValidationConfigurationState.js';
|
29
|
+
import { DataQualityRelationValidationConfigurationEditor } from './DataQualityRelationValidationConfigurationEditor.js';
|
30
|
+
const DATA_QUALITY_ELEMENT_TYPE = 'DATAQUALITYVALIDATION';
|
31
|
+
const DATA_QUALITY_ELEMENT_TYPE_LABEL = 'Data Quality Validation';
|
34
32
|
export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioApplicationPlugin {
|
35
33
|
constructor() {
|
36
34
|
super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
|
37
35
|
}
|
38
36
|
getExtraSupportedElementTypes() {
|
39
|
-
return [
|
40
|
-
DATA_QUALITY_ELEMENT_TYPE,
|
41
|
-
DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE,
|
42
|
-
];
|
37
|
+
return [DATA_QUALITY_ELEMENT_TYPE];
|
43
38
|
}
|
44
39
|
getExtraSupportedElementTypesWithCategory() {
|
45
40
|
const elementTypeswithCategory = new Map();
|
46
41
|
elementTypeswithCategory.set(PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY.OTHER, [
|
47
42
|
DATA_QUALITY_ELEMENT_TYPE,
|
48
|
-
// DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE,
|
49
43
|
]);
|
50
44
|
return elementTypeswithCategory;
|
51
45
|
}
|
52
46
|
getExtraElementClassifiers() {
|
53
47
|
return [
|
54
48
|
(element) => {
|
55
|
-
if (element instanceof
|
49
|
+
if (element instanceof DataQualityValidationConfiguration) {
|
56
50
|
return DATA_QUALITY_ELEMENT_TYPE;
|
57
51
|
}
|
58
|
-
if (element instanceof DataQualityServiceValidationConfiguration) {
|
59
|
-
return DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE;
|
60
|
-
}
|
61
52
|
return undefined;
|
62
53
|
},
|
63
54
|
];
|
@@ -68,9 +59,6 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
68
59
|
if (type === DATA_QUALITY_ELEMENT_TYPE) {
|
69
60
|
return (_jsx("div", { className: "icon icon--dataQuality", children: _jsx(EyeIcon, {}) }));
|
70
61
|
}
|
71
|
-
if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
|
72
|
-
return (_jsx("div", { className: "icon icon--dataQuality", children: _jsx(EyeIcon, {}) }));
|
73
|
-
}
|
74
62
|
return undefined;
|
75
63
|
},
|
76
64
|
];
|
@@ -81,9 +69,6 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
81
69
|
if (type === DATA_QUALITY_ELEMENT_TYPE) {
|
82
70
|
return DATA_QUALITY_ELEMENT_TYPE_LABEL;
|
83
71
|
}
|
84
|
-
if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
|
85
|
-
return DATA_QUALITY_SERVICE_VALIDATION_TYPE_LABEL;
|
86
|
-
}
|
87
72
|
return undefined;
|
88
73
|
},
|
89
74
|
];
|
@@ -93,12 +78,7 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
93
78
|
(type, name, state) => {
|
94
79
|
if (type === DATA_QUALITY_ELEMENT_TYPE) {
|
95
80
|
return state
|
96
|
-
.getNewElementDriver(
|
97
|
-
.createElement(name);
|
98
|
-
}
|
99
|
-
if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
|
100
|
-
return state
|
101
|
-
.getNewElementDriver(DataQuality_ServiceElementDriver)
|
81
|
+
.getNewElementDriver(DataQuality_ElementDriver)
|
102
82
|
.createElement(name);
|
103
83
|
}
|
104
84
|
return undefined;
|
@@ -114,6 +94,10 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
114
94
|
if (elementEditorState instanceof DataQualityClassValidationState) {
|
115
95
|
return (_jsx(DataQualityClassValidationEditor, {}, elementEditorState.uuid));
|
116
96
|
}
|
97
|
+
if (elementEditorState instanceof
|
98
|
+
DataQualityRelationValidationConfigurationState) {
|
99
|
+
return (_jsx(DataQualityRelationValidationConfigurationEditor, {}, elementEditorState.uuid));
|
100
|
+
}
|
117
101
|
return undefined;
|
118
102
|
},
|
119
103
|
];
|
@@ -127,6 +111,9 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
127
111
|
if (element instanceof DataQualityServiceValidationConfiguration) {
|
128
112
|
return new DataQualityServiceValidationState(editorStore, element);
|
129
113
|
}
|
114
|
+
if (element instanceof DataQualityRelationValidationConfiguration) {
|
115
|
+
return new DataQualityRelationValidationConfigurationState(editorStore, element);
|
116
|
+
}
|
130
117
|
return undefined;
|
131
118
|
},
|
132
119
|
];
|
@@ -135,10 +122,7 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
135
122
|
return [
|
136
123
|
(type) => {
|
137
124
|
if (type === DATA_QUALITY_ELEMENT_TYPE) {
|
138
|
-
return _jsx(
|
139
|
-
}
|
140
|
-
if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
|
141
|
-
return _jsx(NewDataQualityServiceValidationElementEditor, {});
|
125
|
+
return _jsx(NewDataQualityValidationElementEditor, {});
|
142
126
|
}
|
143
127
|
return undefined;
|
144
128
|
},
|
@@ -148,10 +132,7 @@ export class DSL_DataQuality_LegendStudioApplicationPlugin extends LegendStudioA
|
|
148
132
|
return [
|
149
133
|
(editorStore, type) => {
|
150
134
|
if (type === DATA_QUALITY_ELEMENT_TYPE) {
|
151
|
-
return new
|
152
|
-
}
|
153
|
-
if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
|
154
|
-
return new DataQuality_ServiceElementDriver(editorStore);
|
135
|
+
return new DataQuality_ElementDriver(editorStore);
|
155
136
|
}
|
156
137
|
return undefined;
|
157
138
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_DataQuality_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAcL,6BAA6B,EAC7B,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,wCAAwC,EACxC,yCAAyC,
|
1
|
+
{"version":3,"file":"DSL_DataQuality_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAcL,6BAA6B,EAC7B,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,wCAAwC,EACxC,yCAAyC,EACzC,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,gGAAgG,CAAC;AACxG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,+CAA+C,EAAE,MAAM,6DAA6D,CAAC;AAC9H,OAAO,EAAE,gDAAgD,EAAE,MAAM,uDAAuD,CAAC;AAEzH,MAAM,yBAAyB,GAAG,uBAAuB,CAAC;AAC1D,MAAM,+BAA+B,GAAG,yBAAyB,CAAC;AAElE,MAAM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AAC;oBACvC,OAAO,KAAC,qCAAqC,KAAG,CAAC;gBACnD,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,gCAAgC;QAC9B,OAAO;YACL,CACE,WAAwB,EACxB,IAAY,EACsC,EAAE;gBACpD,IAAI,IAAI,KAAK,yBAAyB,EAAE,CAAC;oBACvC,OAAO,IAAI,yBAAyB,CAAC,WAAW,CAAC,CAAC;gBACpD,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
export declare const
|
16
|
+
export declare const NewDataQualityValidationElementEditor: (() => import("react/jsx-runtime").JSX.Element) & {
|
17
17
|
displayName: string;
|
18
18
|
};
|
19
|
-
//# sourceMappingURL=
|
19
|
+
//# sourceMappingURL=DSL_NewDataQualityValidationElement.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_NewDataQualityValidationElement.d.ts","sourceRoot":"","sources":["../../src/components/DSL_NewDataQualityValidationElement.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmBH,eAAO,MAAM,qCAAqC;;CA8KhD,CAAC"}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { observer } from 'mobx-react-lite';
|
18
|
+
import { useEditorStore } from '@finos/legend-application-studio';
|
19
|
+
import { BaseRadioGroup, CustomSelectorInput } from '@finos/legend-art';
|
20
|
+
import { buildElementOption, } from '@finos/legend-lego/graph-editor';
|
21
|
+
import { DataQuality_ElementDriver, CLASS_ELEMENT_CREATION_BASIS, DQ_VALIDATION_ELEMENT_TYPE, } from './DSL_DataQuality_ElementDriver.js';
|
22
|
+
import { prettyCONSTName } from '@finos/legend-shared';
|
23
|
+
export const NewDataQualityValidationElementEditor = observer(() => {
|
24
|
+
const editorStore = useEditorStore();
|
25
|
+
const applicationStore = editorStore.applicationStore;
|
26
|
+
const dataQualityValidationDriver = editorStore.newElementState.getNewElementDriver(DataQuality_ElementDriver);
|
27
|
+
const dqValidationElementType = dataQualityValidationDriver.dqValidationElementType;
|
28
|
+
const dqElementCreationBasis = dataQualityValidationDriver.dqClassElementCreationBasis;
|
29
|
+
const dataSpacesOptions = dataQualityValidationDriver.dataSpaceOptions;
|
30
|
+
const mappingOptions = dataQualityValidationDriver.mappingOptions;
|
31
|
+
const runtimeOptions = dataQualityValidationDriver.compatibleMappingRuntimes.map(buildElementOption);
|
32
|
+
const dqValidationElementTypeOptions = Object.values(DQ_VALIDATION_ELEMENT_TYPE)
|
33
|
+
.filter((validation) => validation !== DQ_VALIDATION_ELEMENT_TYPE.SERVICE_VALIDATION)
|
34
|
+
.map((validationType) => ({
|
35
|
+
label: prettyCONSTName(validationType),
|
36
|
+
value: validationType,
|
37
|
+
}));
|
38
|
+
const onDataSpaceChange = (val) => {
|
39
|
+
if (val) {
|
40
|
+
dataQualityValidationDriver.setDataSpaceSelected(val);
|
41
|
+
}
|
42
|
+
};
|
43
|
+
const onMappingChange = (val) => {
|
44
|
+
if (val) {
|
45
|
+
dataQualityValidationDriver.setMappingSelected(val);
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
dataQualityValidationDriver.setMappingSelected(undefined);
|
49
|
+
}
|
50
|
+
dataQualityValidationDriver.setRuntimeSelected(dataQualityValidationDriver.runtimeOptions.length > 0
|
51
|
+
? dataQualityValidationDriver.runtimeOptions[0]
|
52
|
+
: undefined);
|
53
|
+
};
|
54
|
+
const onRuntimeChange = (val) => {
|
55
|
+
if (val) {
|
56
|
+
dataQualityValidationDriver.setRuntimeSelected(val);
|
57
|
+
}
|
58
|
+
};
|
59
|
+
const handleDQClassElementCreationBasisChange = (event) => {
|
60
|
+
const classValidationElementCreationBasis = event.target.value;
|
61
|
+
dataQualityValidationDriver.setDqClassElementCreationBasis(classValidationElementCreationBasis);
|
62
|
+
};
|
63
|
+
const handleDQValidationElementTypeChange = (val) => {
|
64
|
+
dataQualityValidationDriver.setDqValidationElementType(val.value);
|
65
|
+
};
|
66
|
+
const selectedDqValidationElementType = {
|
67
|
+
label: prettyCONSTName(dataQualityValidationDriver.dqValidationElementType),
|
68
|
+
value: dataQualityValidationDriver.dqValidationElementType,
|
69
|
+
};
|
70
|
+
return (_jsxs("div", { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Validation Type" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Type of Data Quality Validation to be configured" }), _jsx(CustomSelectorInput, { options: dqValidationElementTypeOptions, onChange: handleDQValidationElementTypeChange, value: selectedDqValidationElementType, darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, placeholder: "Choose a data quality validation type", isClearable: false, className: 'dq-validation-element-type' }), dqValidationElementType ===
|
71
|
+
DQ_VALIDATION_ELEMENT_TYPE.CLASS_VALIDATION && (_jsxs("div", { children: [_jsxs("div", { className: "element-creation-basis", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Basis of Data Quality Class Validation" }), _jsx(BaseRadioGroup, { value: dqElementCreationBasis, onChange: handleDQClassElementCreationBasisChange, row: false, options: [
|
72
|
+
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED,
|
73
|
+
CLASS_ELEMENT_CREATION_BASIS.MAPPING_RUNTIME_BASED,
|
74
|
+
], size: 2 })] }), dqElementCreationBasis ===
|
75
|
+
CLASS_ELEMENT_CREATION_BASIS.DATASPACE_BASED ? (_jsxs("div", { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "DataSpace" }), _jsx("div", { className: "data-quality-explorer__new-element-modal__driver", children: _jsx(CustomSelectorInput, { className: "data-quality-explorer__new-element-modal__driver__dropdown", options: dataSpacesOptions, onChange: onDataSpaceChange, value: dataQualityValidationDriver.dataSpaceSelected, darkMode: !applicationStore.layoutService
|
76
|
+
.TEMPORARY__isLightColorThemeEnabled }) })] })) : (_jsxs("div", { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Mapping" }), _jsx("div", { className: "data-quality-explorer__new-element-modal__driver", children: _jsx(CustomSelectorInput, { className: "data-quality-explorer__new-element-modal__driver__dropdown", options: mappingOptions, onChange: onMappingChange, value: dataQualityValidationDriver.mappingSelected, darkMode: !applicationStore.layoutService
|
77
|
+
.TEMPORARY__isLightColorThemeEnabled }) }), _jsx("div", { className: "panel__content__form__section__header__label", children: "Runtime" }), _jsx("div", { className: "data-quality-explorer__new-element-modal__driver", children: _jsx(CustomSelectorInput, { className: "data-quality-explorer__new-element-modal__driver__dropdown", options: runtimeOptions, onChange: onRuntimeChange, value: dataQualityValidationDriver.runtimeSelected, darkMode: !applicationStore.layoutService
|
78
|
+
.TEMPORARY__isLightColorThemeEnabled }) })] }))] }))] }));
|
79
|
+
});
|
80
|
+
//# sourceMappingURL=DSL_NewDataQualityValidationElement.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_NewDataQualityValidationElement.js","sourceRoot":"","sources":["../../src/components/DSL_NewDataQualityValidationElement.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAA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,GACE,EACN,cAAK,SAAS,EAAC,8CAA8C,wBAEvD,EACN,cAAK,SAAS,EAAC,kDAAkD,YAC/D,KAAC,mBAAmB,IAClB,SAAS,EAAC,4DAA4D,EACtE,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,2BAA2B,CAAC,eAAe,EAClD,QAAQ,EACN,CAAC,gBAAgB,CAAC,aAAa;yCAC5B,mCAAmC,GAExC,GACE,IACF,CACP,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
import type { DataQualityRelationValidationConfigurationState } from './states/DataQualityRelationValidationConfigurationState.js';
|
17
|
+
export declare const DataQualityRelationTrialRuns: ((props: {
|
18
|
+
dataQualityRelationValidationConfigurationState: DataQualityRelationValidationConfigurationState;
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
20
|
+
displayName: string;
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=DataQualityRelationTrialRuns.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DataQualityRelationTrialRuns.d.ts","sourceRoot":"","sources":["../../src/components/DataQualityRelationTrialRuns.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA+BH,OAAO,KAAK,EAAE,+CAA+C,EAAE,MAAM,6DAA6D,CAAC;AAEnI,eAAO,MAAM,4BAA4B,WAC/B;IACN,+CAA+C,EAAE,+CAA+C,CAAC;CAClG;;CA6OF,CAAC"}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { observer } from 'mobx-react-lite';
|
18
|
+
import { useApplicationStore } from '@finos/legend-application';
|
19
|
+
import { flowResult } from 'mobx';
|
20
|
+
import { ExecutionPlanViewer, LambdaParameterValuesEditor, } from '@finos/legend-query-builder';
|
21
|
+
import {} from '@finos/legend-graph';
|
22
|
+
import { prettyDuration } from '@finos/legend-shared';
|
23
|
+
import React, { useRef, useState } from 'react';
|
24
|
+
import { DATA_QUALITY_VALIDATION_TEST_ID } from './constants/DataQualityConstants.js';
|
25
|
+
import { BlankPanelContent, CaretDownIcon, ControlledDropdownMenu, CubesLoadingIndicator, CubesLoadingIndicatorIcon, DebugIcon, ExclamationTriangleIcon, MenuContent, MenuContentItem, MenuContentItemIcon, MenuContentItemLabel, PanelContent, PauseCircleIcon, PlayIcon, ReportIcon, } from '@finos/legend-art';
|
26
|
+
import { DataQualityResultValues } from './DataQualityResultValues.js';
|
27
|
+
export const DataQualityRelationTrialRuns = observer((props) => {
|
28
|
+
const { dataQualityRelationValidationConfigurationState } = props;
|
29
|
+
const applicationStore = useApplicationStore();
|
30
|
+
const resultState = dataQualityRelationValidationConfigurationState.resultState;
|
31
|
+
const executionResult = resultState.executionResult;
|
32
|
+
const runQuery = () => {
|
33
|
+
resultState.handleRunValidation();
|
34
|
+
};
|
35
|
+
const cancelQuery = applicationStore.guardUnhandledError(() => flowResult(resultState.cancelValidation()));
|
36
|
+
const generatePlan = applicationStore.guardUnhandledError(() => {
|
37
|
+
return flowResult(resultState.generatePlan(false));
|
38
|
+
});
|
39
|
+
const debugPlanGeneration = applicationStore.guardUnhandledError(() => flowResult(resultState.generatePlan(true)));
|
40
|
+
const isRunQueryDisabled = resultState.isGeneratingPlan || resultState.isRunningValidation;
|
41
|
+
const getResultSetDescription = (_executionResult) => {
|
42
|
+
const queryDuration = resultState.executionDuration
|
43
|
+
? prettyDuration(resultState.executionDuration, {
|
44
|
+
ms: true,
|
45
|
+
})
|
46
|
+
: undefined;
|
47
|
+
if (!queryDuration) {
|
48
|
+
return undefined;
|
49
|
+
}
|
50
|
+
return `validation ran in ${queryDuration}`;
|
51
|
+
};
|
52
|
+
const resultDescription = !resultState.isRunningValidation && executionResult
|
53
|
+
? getResultSetDescription(executionResult)
|
54
|
+
: undefined;
|
55
|
+
const [previewLimitValue, setPreviewLimitValue] = useState(resultState.previewLimit);
|
56
|
+
const changePreviewLimit = (event) => {
|
57
|
+
setPreviewLimitValue(parseInt(event.target.value, 10));
|
58
|
+
};
|
59
|
+
const inputRef = useRef(null);
|
60
|
+
const getPreviewLimit = () => {
|
61
|
+
if (isNaN(previewLimitValue) || previewLimitValue === 0) {
|
62
|
+
setPreviewLimitValue(1);
|
63
|
+
dataQualityRelationValidationConfigurationState.resultState.setPreviewLimit(1);
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
dataQualityRelationValidationConfigurationState.resultState.setPreviewLimit(previewLimitValue);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
const onKeyDown = (event) => {
|
70
|
+
if (event.code === 'Enter') {
|
71
|
+
getPreviewLimit();
|
72
|
+
inputRef.current?.focus();
|
73
|
+
}
|
74
|
+
else if (event.code === 'Escape') {
|
75
|
+
inputRef.current?.select();
|
76
|
+
}
|
77
|
+
};
|
78
|
+
const isLoading = resultState.isRunningValidation || resultState.isGeneratingPlan;
|
79
|
+
return (_jsxs("div", { "data-testid": DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_RESULT_PANEL, className: "panel data-quality-validation__result", children: [_jsxs("div", { className: "panel__header", children: [_jsxs("div", { className: "panel__header__title", children: [_jsx("div", { className: "panel__header__title__label", children: "results" }), resultState.validationToRun && (_jsx("div", { className: "panel__header__title__label", children: resultState.validationToRun.name })), resultState.isRunningValidation && (_jsx("div", { className: "panel__header__title__label__status", children: "Running Validation..." })), _jsx("div", { "data-testid": DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_RESULT_ANALYTICS, className: "data-quality-validation__result__analytics", children: resultDescription ?? '' }), executionResult && resultState.checkForStaleResults && (_jsxs("div", { className: "data-quality-validation__result__stale-status", children: [_jsx("div", { className: "data-quality-validation__result__stale-status__icon", children: _jsx(ExclamationTriangleIcon, {}) }), _jsx("div", { className: "data-quality-validation__result__stale-status__label", children: "Preview data might be stale" })] }))] }), _jsxs("div", { className: "panel__header__actions data-quality-validation__result__header__actions", children: [_jsxs("div", { className: "data-quality-validation__result__limit", children: [_jsx("div", { className: "data-quality-validation__result__limit__label", children: "preview row limit" }), _jsx("input", { ref: inputRef, className: "input--dark data-quality-validation__result__limit__input", spellCheck: false, type: "number", value: previewLimitValue, onChange: changePreviewLimit, onBlur: getPreviewLimit, onKeyDown: onKeyDown })] }), _jsx("div", { className: "data-quality-validation__result__execute-btn btn__dropdown-combo btn__dropdown-combo--primary", children: resultState.isRunningValidation ? (_jsx("button", { className: "btn__dropdown-combo__canceler data-quality-validation__result__execute-btn__btn", onClick: cancelQuery, tabIndex: -1, children: _jsxs("div", { className: "btn--dark btn--caution btn__dropdown-combo__canceler__label data-quality-validation__result__execute-btn__btn", children: [_jsx(PauseCircleIcon, {}), "Stop"] }) })) : (_jsxs(_Fragment, { children: [_jsxs("button", { className: "btn__dropdown-combo__label data-quality-validation__result__execute-btn__validation data-quality-validation__result__execute-btn__btn data-quality-validation__result__execute-btn__btn--green", onClick: runQuery, tabIndex: -1, disabled: isRunQueryDisabled, children: [_jsx(PlayIcon, {}), "Run Validation"] }), _jsx(ControlledDropdownMenu, { className: "btn__dropdown-combo__dropdown-btn data-quality-validation__result__execute-btn__btn data-quality-validation__result__execute-btn__btn--green", disabled: isRunQueryDisabled, content: _jsxs(MenuContent, { children: [_jsxs(MenuContentItem, { className: "btn__dropdown-combo__option", onClick: generatePlan, disabled: isRunQueryDisabled, children: [_jsx(MenuContentItemIcon, { children: _jsx(ReportIcon, {}) }), _jsx(MenuContentItemLabel, { children: "Generate Plan" })] }), _jsxs(MenuContentItem, { className: "btn__dropdown-combo__option", onClick: debugPlanGeneration, disabled: isRunQueryDisabled, children: [_jsx(MenuContentItemIcon, { children: _jsx(DebugIcon, {}) }), _jsx(MenuContentItemLabel, { children: "Debug" })] })] }), menuProps: {
|
80
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
81
|
+
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
82
|
+
}, children: _jsx(CaretDownIcon, {}) })] })) })] })] }), _jsxs(PanelContent, { className: "data-quality-validation__result__content", children: [_jsx(CubesLoadingIndicator, { isLoading: isLoading, children: _jsx(CubesLoadingIndicatorIcon, {}) }), !executionResult && !isLoading && (_jsx(BlankPanelContent, { children: "Click on run validation to see the validation results" })), executionResult && !isLoading && (_jsx("div", { className: "data-quality-validation__result__values", children: _jsx(DataQualityResultValues, { executionResult: executionResult }) }))] }), _jsx(ExecutionPlanViewer, { executionPlanState: resultState.executionPlanState }), dataQualityRelationValidationConfigurationState.parametersState
|
83
|
+
.parameterValuesEditorState.showModal && (_jsx(LambdaParameterValuesEditor, { graph: dataQualityRelationValidationConfigurationState.editorStore
|
84
|
+
.graphManagerState.graph, observerContext: dataQualityRelationValidationConfigurationState.editorStore
|
85
|
+
.changeDetectionState.observerContext, lambdaParametersState: dataQualityRelationValidationConfigurationState.parametersState }))] }));
|
86
|
+
});
|
87
|
+
//# sourceMappingURL=DataQualityRelationTrialRuns.js.map
|