@finos/legend-extension-dsl-data-quality 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/README.md +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts +46 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js +116 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts +30 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +161 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts +25 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js +2 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts +27 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js +41 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js +64 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js +41 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.js +29 -0
- package/lib/components/DataQualityClassValidationEditor.js.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts +39 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.js +133 -0
- package/lib/components/DataQualityConstraintsSelection.js.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts +22 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.js +101 -0
- package/lib/components/DataQualityDataSpaceBuilder.js.map +1 -0
- package/lib/components/DataQualityExplorerPanel.d.ts +29 -0
- package/lib/components/DataQualityExplorerPanel.d.ts.map +1 -0
- package/lib/components/DataQualityExplorerPanel.js +185 -0
- package/lib/components/DataQualityExplorerPanel.js.map +1 -0
- package/lib/components/DataQualityFilterPanel.d.ts +24 -0
- package/lib/components/DataQualityFilterPanel.d.ts.map +1 -0
- package/lib/components/DataQualityFilterPanel.js +32 -0
- package/lib/components/DataQualityFilterPanel.js.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts +22 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js +98 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js.map +1 -0
- package/lib/components/DataQualityResultPanel.d.ts +22 -0
- package/lib/components/DataQualityResultPanel.d.ts.map +1 -0
- package/lib/components/DataQualityResultPanel.js +110 -0
- package/lib/components/DataQualityResultPanel.js.map +1 -0
- package/lib/components/DataQualityResultValues.d.ts +24 -0
- package/lib/components/DataQualityResultValues.d.ts.map +1 -0
- package/lib/components/DataQualityResultValues.js +31 -0
- package/lib/components/DataQualityResultValues.js.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.js +29 -0
- package/lib/components/DataQualityServiceValidationEditor.js.map +1 -0
- package/lib/components/DataQualitySideBar.d.ts +40 -0
- package/lib/components/DataQualitySideBar.d.ts.map +1 -0
- package/lib/components/DataQualitySideBar.js +78 -0
- package/lib/components/DataQualitySideBar.js.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts +22 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js +50 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js.map +1 -0
- package/lib/components/DataQualityTabs.d.ts +22 -0
- package/lib/components/DataQualityTabs.d.ts.map +1 -0
- package/lib/components/DataQualityTabs.js +58 -0
- package/lib/components/DataQualityTabs.js.map +1 -0
- package/lib/components/DataQualityValidationEditor.d.ts +23 -0
- package/lib/components/DataQualityValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityValidationEditor.js +24 -0
- package/lib/components/DataQualityValidationEditor.js.map +1 -0
- package/lib/components/constants/DataQualityConstants.d.ts +24 -0
- package/lib/components/constants/DataQualityConstants.d.ts.map +1 -0
- package/lib/components/constants/DataQualityConstants.js +25 -0
- package/lib/components/constants/DataQualityConstants.js.map +1 -0
- package/lib/components/index.d.ts +19 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +19 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/states/ConstraintState.d.ts +30 -0
- package/lib/components/states/ConstraintState.d.ts.map +1 -0
- package/lib/components/states/ConstraintState.js +55 -0
- package/lib/components/states/ConstraintState.js.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts +43 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.js +162 -0
- package/lib/components/states/DataQualityClassValidationState.js.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts +34 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js +70 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.js +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.js.map +1 -0
- package/lib/components/states/DataQualityResultState.d.ts +44 -0
- package/lib/components/states/DataQualityResultState.d.ts.map +1 -0
- package/lib/components/states/DataQualityResultState.js +154 -0
- package/lib/components/states/DataQualityResultState.js.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts +25 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.js +33 -0
- package/lib/components/states/DataQualityServiceValidationState.js.map +1 -0
- package/lib/components/states/DataQualityState.d.ts +67 -0
- package/lib/components/states/DataQualityState.d.ts.map +1 -0
- package/lib/components/states/DataQualityState.js +204 -0
- package/lib/components/states/DataQualityState.js.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts +51 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js +321 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts +29 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js +30 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts +22 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js +31 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts +26 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js +44 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +47 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +75 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js +30 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +26 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +57 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts +7 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js +42 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts +24 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +98 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -0
- package/lib/graph-manager/index.d.ts +19 -0
- package/lib/graph-manager/index.d.ts.map +1 -0
- package/lib/graph-manager/index.js +19 -0
- package/lib/graph-manager/index.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts +27 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js +21 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts +25 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js +140 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js +20 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts +41 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js +95 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts +46 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js +76 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js +32 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js +31 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts +24 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js +92 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts +20 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js +56 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js +70 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts +29 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +80 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/package.json +87 -0
- package/package.json +87 -0
- package/src/components/DSL_DataQuality_ClassElementDriver.tsx +175 -0
- package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +220 -0
- package/src/components/DSL_DataQuality_LegendStudioPlugin_Extension.ts +39 -0
- package/src/components/DSL_DataQuality_ServiceElementDriver.tsx +57 -0
- package/src/components/DSL_NewDataQualityClassValidationElement.tsx +156 -0
- package/src/components/DSL_NewDataQualityServiceValidationElement.tsx +74 -0
- package/src/components/DataQualityClassValidationEditor.tsx +49 -0
- package/src/components/DataQualityConstraintsSelection.tsx +376 -0
- package/src/components/DataQualityDataSpaceBuilder.tsx +274 -0
- package/src/components/DataQualityExplorerPanel.tsx +584 -0
- package/src/components/DataQualityFilterPanel.tsx +50 -0
- package/src/components/DataQualityMappingAndRuntimeBuilder.tsx +224 -0
- package/src/components/DataQualityResultPanel.tsx +335 -0
- package/src/components/DataQualityResultValues.tsx +61 -0
- package/src/components/DataQualityServiceValidationEditor.tsx +49 -0
- package/src/components/DataQualitySideBar.tsx +216 -0
- package/src/components/DataQualityStructuralValidationsPanel.tsx +105 -0
- package/src/components/DataQualityTabs.tsx +104 -0
- package/src/components/DataQualityValidationEditor.tsx +52 -0
- package/src/components/constants/DataQualityConstants.ts +24 -0
- package/src/components/index.ts +19 -0
- package/src/components/states/ConstraintState.ts +70 -0
- package/src/components/states/DataQualityClassValidationState.ts +308 -0
- package/src/components/states/DataQualityGraphFetchTreeState.ts +125 -0
- package/src/components/states/DataQualityQueryBuilderState.ts +19 -0
- package/src/components/states/DataQualityResultState.ts +217 -0
- package/src/components/states/DataQualityServiceValidationState.ts +56 -0
- package/src/components/states/DataQualityState.ts +354 -0
- package/src/components/utils/DataQualityGraphFetchTreeUtil.ts +592 -0
- package/src/graph/metamodel/DSL_DataQuality_HashUtils.ts +29 -0
- package/src/graph/metamodel/DSL_DataQuality_PureGraphPlugin.ts +36 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.ts +55 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +107 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerHelper.ts +46 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerPreset.ts +31 -0
- package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +113 -0
- package/src/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.ts +59 -0
- package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +153 -0
- package/src/graph-manager/index.ts +19 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.ts +59 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.ts +283 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.ts +27 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.ts +246 -0
- package/src/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.ts +103 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.ts +37 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.ts +36 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.ts +241 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.ts +113 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.ts +139 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +186 -0
- package/style/_data-quality-validation-builder.scss +1660 -0
- package/style/index.scss +67 -0
- package/tsconfig.json +137 -0
- package/tsconfig.package.json +9 -0
@@ -0,0 +1,56 @@
|
|
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
|
+
|
17
|
+
import { makeObservable } from 'mobx';
|
18
|
+
import { DataQualityServiceValidationConfiguration } from '../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
19
|
+
import { DataQualityState } from './DataQualityState.js';
|
20
|
+
import type { PackageableElement } from '@finos/legend-graph';
|
21
|
+
import type {
|
22
|
+
EditorStore,
|
23
|
+
ElementEditorState,
|
24
|
+
} from '@finos/legend-application-studio';
|
25
|
+
import { guaranteeType } from '@finos/legend-shared';
|
26
|
+
|
27
|
+
export class DataQualityServiceValidationState extends DataQualityState {
|
28
|
+
constructor(
|
29
|
+
editorStore: EditorStore,
|
30
|
+
element: DataQualityServiceValidationConfiguration,
|
31
|
+
) {
|
32
|
+
super(editorStore, element);
|
33
|
+
makeObservable(this, {});
|
34
|
+
}
|
35
|
+
|
36
|
+
reprocess(
|
37
|
+
newElement: PackageableElement,
|
38
|
+
editorStore: EditorStore,
|
39
|
+
): ElementEditorState {
|
40
|
+
const element = guaranteeType(
|
41
|
+
newElement,
|
42
|
+
DataQualityServiceValidationConfiguration,
|
43
|
+
'Element inside data quality service validation editor state must be a service validation element',
|
44
|
+
);
|
45
|
+
|
46
|
+
return new DataQualityServiceValidationState(editorStore, element);
|
47
|
+
}
|
48
|
+
|
49
|
+
override get constraintsConfigurationElement(): DataQualityServiceValidationConfiguration {
|
50
|
+
return guaranteeType(
|
51
|
+
this.element,
|
52
|
+
DataQualityServiceValidationConfiguration,
|
53
|
+
'Element inside data quality service validation state must be a data quality service validation configuration element',
|
54
|
+
);
|
55
|
+
}
|
56
|
+
}
|
@@ -0,0 +1,354 @@
|
|
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
|
+
|
17
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
18
|
+
import {
|
19
|
+
type GraphManagerState,
|
20
|
+
type Runtime,
|
21
|
+
type RawLambda,
|
22
|
+
type RootGraphFetchTree,
|
23
|
+
type PackageableElement,
|
24
|
+
type Class,
|
25
|
+
buildRawLambdaFromLambdaFunction,
|
26
|
+
CORE_PURE_PATH,
|
27
|
+
FunctionType,
|
28
|
+
GenericType,
|
29
|
+
GenericTypeExplicitReference,
|
30
|
+
LambdaFunction,
|
31
|
+
LambdaFunctionInstanceValue,
|
32
|
+
Multiplicity,
|
33
|
+
observe_ValueSpecification,
|
34
|
+
PackageableElementExplicitReference,
|
35
|
+
VariableExpression,
|
36
|
+
} from '@finos/legend-graph';
|
37
|
+
import {
|
38
|
+
type EditorExtensionState,
|
39
|
+
type EditorStore,
|
40
|
+
ElementEditorState,
|
41
|
+
} from '@finos/legend-application-studio';
|
42
|
+
import type { DataSpaceExecutionContext } from '@finos/legend-extension-dsl-data-space/graph';
|
43
|
+
import { DataQualityGraphFetchTreeState } from './DataQualityGraphFetchTreeState.js';
|
44
|
+
import { DataQualityRootGraphFetchTree } from '../../graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js';
|
45
|
+
import { buildGraphFetchTreeData } from '../utils/DataQualityGraphFetchTreeUtil.js';
|
46
|
+
import {
|
47
|
+
type GeneratorFn,
|
48
|
+
ActionState,
|
49
|
+
guaranteeNonNullable,
|
50
|
+
guaranteeType,
|
51
|
+
hashArray,
|
52
|
+
isNonNullable,
|
53
|
+
} from '@finos/legend-shared';
|
54
|
+
import { type GenericLegendApplicationStore } from '@finos/legend-application';
|
55
|
+
import { DataQualityResultState } from './DataQualityResultState.js';
|
56
|
+
import { DATA_QUALITY_HASH_STRUCTURE } from '../../graph/metamodel/DSL_DataQuality_HashUtils.js';
|
57
|
+
import {
|
58
|
+
buildFilterConditionExpression,
|
59
|
+
processFilterLambda,
|
60
|
+
QueryBuilderAdvancedWorkflowState,
|
61
|
+
} from '@finos/legend-query-builder';
|
62
|
+
import { DataQualityQueryBuilderState } from './DataQualityQueryBuilderState.js';
|
63
|
+
import { getDataQualityPureGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js';
|
64
|
+
import {
|
65
|
+
dataQualityClassValidation_setDataQualityGraphFetchTree,
|
66
|
+
dataQualityClassValidation_setFilter,
|
67
|
+
} from '../../graph-manager/DSL_DataQuality_GraphModifierHelper.js';
|
68
|
+
import type { DataQualityClassValidationsConfiguration } from '../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
69
|
+
import { type DSL_DataQuality_LegendStudioPlugin_Extension } from '../DSL_DataQuality_LegendStudioPlugin_Extension.js';
|
70
|
+
|
71
|
+
export enum DATA_QUALITY_TAB {
|
72
|
+
FILTER = 'Filter ',
|
73
|
+
CONSTRAINTS_SELECTION = 'Constraints Selection',
|
74
|
+
TRIAL_RUNS = 'Trial Runs',
|
75
|
+
}
|
76
|
+
export function buildExtensionState(
|
77
|
+
editorStore: EditorStore,
|
78
|
+
dataQualityState: DataQualityState,
|
79
|
+
): EditorExtensionState | undefined {
|
80
|
+
const extensionStateBuilders = editorStore.pluginManager
|
81
|
+
.getApplicationPlugins()
|
82
|
+
.flatMap(
|
83
|
+
(plugin) =>
|
84
|
+
(
|
85
|
+
plugin as DSL_DataQuality_LegendStudioPlugin_Extension
|
86
|
+
).getExtensionStates?.() ?? [],
|
87
|
+
);
|
88
|
+
for (const stateBuilder of extensionStateBuilders) {
|
89
|
+
const state = stateBuilder(editorStore, dataQualityState);
|
90
|
+
if (state) {
|
91
|
+
return state;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
return undefined;
|
95
|
+
}
|
96
|
+
|
97
|
+
export abstract class DataQualityState extends ElementEditorState {
|
98
|
+
readonly applicationStore: GenericLegendApplicationStore;
|
99
|
+
readonly graphManagerState: GraphManagerState;
|
100
|
+
readonly loadDataSpacesState = ActionState.create();
|
101
|
+
readonly onExecutionContextChange?:
|
102
|
+
| ((val: DataSpaceExecutionContext) => void)
|
103
|
+
| undefined;
|
104
|
+
readonly onRuntimeChange?: ((val: Runtime) => void) | undefined;
|
105
|
+
readonly extensionState: EditorExtensionState | undefined;
|
106
|
+
selectedTab: string;
|
107
|
+
executionContext!: DataSpaceExecutionContext;
|
108
|
+
dataQualityGraphFetchTreeState: DataQualityGraphFetchTreeState;
|
109
|
+
structuralValidationsGraphFetchTreeState: DataQualityGraphFetchTreeState;
|
110
|
+
showRuntimeSelector = false;
|
111
|
+
dataQualityQueryBuilderState: DataQualityQueryBuilderState;
|
112
|
+
resultState: DataQualityResultState;
|
113
|
+
showStructuralValidations = false;
|
114
|
+
|
115
|
+
constructor(editorStore: EditorStore, element: PackageableElement) {
|
116
|
+
super(editorStore, element);
|
117
|
+
makeObservable(this, {
|
118
|
+
selectedTab: observable,
|
119
|
+
showRuntimeSelector: observable,
|
120
|
+
dataQualityGraphFetchTreeState: observable,
|
121
|
+
structuralValidationsGraphFetchTreeState: observable,
|
122
|
+
dataQualityQueryBuilderState: observable,
|
123
|
+
showStructuralValidations: observable,
|
124
|
+
constraintsConfigurationElement: computed,
|
125
|
+
setSelectedTab: action,
|
126
|
+
setExecutionContext: action,
|
127
|
+
setShowRuntimeSelector: action,
|
128
|
+
initializeGraphFetchTreeState: action,
|
129
|
+
initialGraphFetchTreeFromClass: action,
|
130
|
+
initializeStructuralValidationsGraphFetchTreeState: action,
|
131
|
+
setShowStructuralValidations: action,
|
132
|
+
updateElementOnClassChange: action,
|
133
|
+
fetchStructuralValidations: flow,
|
134
|
+
tabsToShow: computed,
|
135
|
+
hashCode: computed,
|
136
|
+
});
|
137
|
+
this.applicationStore = this.editorStore.applicationStore;
|
138
|
+
this.graphManagerState = this.editorStore.graphManagerState;
|
139
|
+
this.dataQualityQueryBuilderState = new DataQualityQueryBuilderState(
|
140
|
+
this.editorStore.applicationStore,
|
141
|
+
this.editorStore.graphManagerState,
|
142
|
+
QueryBuilderAdvancedWorkflowState.INSTANCE,
|
143
|
+
this.editorStore.applicationStore.config.options.queryBuilderConfig,
|
144
|
+
undefined,
|
145
|
+
);
|
146
|
+
this.selectedTab = DATA_QUALITY_TAB.CONSTRAINTS_SELECTION;
|
147
|
+
this.dataQualityGraphFetchTreeState = new DataQualityGraphFetchTreeState(
|
148
|
+
this,
|
149
|
+
);
|
150
|
+
this.structuralValidationsGraphFetchTreeState =
|
151
|
+
new DataQualityGraphFetchTreeState(this);
|
152
|
+
this.resultState = new DataQualityResultState(this);
|
153
|
+
this.extensionState = buildExtensionState(this.editorStore, this);
|
154
|
+
}
|
155
|
+
|
156
|
+
abstract get constraintsConfigurationElement(): PackageableElement;
|
157
|
+
|
158
|
+
setShowStructuralValidations(val: boolean): void {
|
159
|
+
this.showStructuralValidations = val;
|
160
|
+
}
|
161
|
+
|
162
|
+
get tabsToShow(): string[] {
|
163
|
+
const tabs: string[] = Object.values(DATA_QUALITY_TAB);
|
164
|
+
const extensionTabGetters = this.editorStore.pluginManager
|
165
|
+
.getApplicationPlugins()
|
166
|
+
.flatMap(
|
167
|
+
(plugin) =>
|
168
|
+
(
|
169
|
+
plugin as DSL_DataQuality_LegendStudioPlugin_Extension
|
170
|
+
).getAllTabs?.() ?? [],
|
171
|
+
);
|
172
|
+
for (const tabGetter of extensionTabGetters) {
|
173
|
+
tabs.push(...tabGetter());
|
174
|
+
}
|
175
|
+
return tabs;
|
176
|
+
}
|
177
|
+
|
178
|
+
*fetchStructuralValidations(): GeneratorFn<void> {
|
179
|
+
const packagePath = this.constraintsConfigurationElement.path;
|
180
|
+
const model = this.graphManagerState.graph;
|
181
|
+
const rootGraphFetchTree = (yield getDataQualityPureGraphManagerExtension(
|
182
|
+
this.graphManagerState.graphManager,
|
183
|
+
).fetchStructuralValidations(model, packagePath)) as RootGraphFetchTree;
|
184
|
+
this.initializeStructuralValidationsGraphFetchTreeState(
|
185
|
+
rootGraphFetchTree as DataQualityRootGraphFetchTree,
|
186
|
+
);
|
187
|
+
}
|
188
|
+
|
189
|
+
initialGraphFetchTreeFromClass(
|
190
|
+
rootClass: Class,
|
191
|
+
): DataQualityRootGraphFetchTree {
|
192
|
+
return new DataQualityRootGraphFetchTree(
|
193
|
+
PackageableElementExplicitReference.create(rootClass),
|
194
|
+
);
|
195
|
+
}
|
196
|
+
|
197
|
+
initializeFilterState(filterLambda: RawLambda | undefined) {
|
198
|
+
if (!filterLambda) {
|
199
|
+
return;
|
200
|
+
}
|
201
|
+
const filterSpec = observe_ValueSpecification(
|
202
|
+
this.graphManagerState.graphManager.buildValueSpecification(
|
203
|
+
this.graphManagerState.graphManager.serializeRawValueSpecification(
|
204
|
+
filterLambda,
|
205
|
+
),
|
206
|
+
this.graphManagerState.graph,
|
207
|
+
),
|
208
|
+
this.dataQualityQueryBuilderState.observerContext,
|
209
|
+
);
|
210
|
+
const compiledValueSpecification = guaranteeType(
|
211
|
+
filterSpec,
|
212
|
+
LambdaFunctionInstanceValue,
|
213
|
+
`Can't build filter state: data quality filter only support lambda`,
|
214
|
+
);
|
215
|
+
processFilterLambda(
|
216
|
+
compiledValueSpecification.values[0]!,
|
217
|
+
this.dataQualityQueryBuilderState,
|
218
|
+
);
|
219
|
+
}
|
220
|
+
|
221
|
+
initializeGraphFetchTreeState(
|
222
|
+
tree: DataQualityRootGraphFetchTree | undefined,
|
223
|
+
) {
|
224
|
+
if (!tree) {
|
225
|
+
return;
|
226
|
+
}
|
227
|
+
this.dataQualityGraphFetchTreeState.treeData = buildGraphFetchTreeData(
|
228
|
+
this.editorStore,
|
229
|
+
tree,
|
230
|
+
true,
|
231
|
+
true,
|
232
|
+
false,
|
233
|
+
);
|
234
|
+
}
|
235
|
+
|
236
|
+
updateFilterElement = (): void => {
|
237
|
+
const { filterState } = this.dataQualityQueryBuilderState;
|
238
|
+
const filterConditionExpressions = filterState.rootIds
|
239
|
+
.map((e) => guaranteeNonNullable(filterState.nodes.get(e)))
|
240
|
+
.map((e) => buildFilterConditionExpression(filterState, e))
|
241
|
+
.filter(isNonNullable);
|
242
|
+
if (!filterConditionExpressions.length) {
|
243
|
+
dataQualityClassValidation_setFilter(
|
244
|
+
this
|
245
|
+
.constraintsConfigurationElement as DataQualityClassValidationsConfiguration,
|
246
|
+
undefined,
|
247
|
+
);
|
248
|
+
return;
|
249
|
+
}
|
250
|
+
const genericType = new GenericType(
|
251
|
+
this.dataQualityQueryBuilderState.class!,
|
252
|
+
);
|
253
|
+
const genericTypeReference =
|
254
|
+
GenericTypeExplicitReference.create(genericType);
|
255
|
+
|
256
|
+
const functionType = new FunctionType(
|
257
|
+
PackageableElementExplicitReference.create(
|
258
|
+
this.dataQualityQueryBuilderState.graphManagerState.graph.getType(
|
259
|
+
CORE_PURE_PATH.ANY,
|
260
|
+
),
|
261
|
+
),
|
262
|
+
Multiplicity.ONE,
|
263
|
+
);
|
264
|
+
functionType.parameters.push(
|
265
|
+
new VariableExpression(
|
266
|
+
filterState.lambdaParameterName,
|
267
|
+
Multiplicity.ONE,
|
268
|
+
genericTypeReference,
|
269
|
+
),
|
270
|
+
);
|
271
|
+
|
272
|
+
const lambdaFunction = new LambdaFunction(functionType);
|
273
|
+
lambdaFunction.expressionSequence = filterConditionExpressions;
|
274
|
+
dataQualityClassValidation_setFilter(
|
275
|
+
this
|
276
|
+
.constraintsConfigurationElement as DataQualityClassValidationsConfiguration,
|
277
|
+
buildRawLambdaFromLambdaFunction(
|
278
|
+
lambdaFunction,
|
279
|
+
this.dataQualityQueryBuilderState.graphManagerState,
|
280
|
+
),
|
281
|
+
);
|
282
|
+
};
|
283
|
+
|
284
|
+
initializeStructuralValidationsGraphFetchTreeState(
|
285
|
+
tree: DataQualityRootGraphFetchTree | undefined,
|
286
|
+
) {
|
287
|
+
if (!tree) {
|
288
|
+
return;
|
289
|
+
}
|
290
|
+
this.structuralValidationsGraphFetchTreeState.treeData =
|
291
|
+
buildGraphFetchTreeData(this.editorStore, tree, true, true, true);
|
292
|
+
}
|
293
|
+
|
294
|
+
get sideBarClassName(): string | undefined {
|
295
|
+
return this.showRuntimeSelector
|
296
|
+
? 'data-quality-validation__setup__data-space--with-runtime'
|
297
|
+
: 'data-quality-validation__setup__data-space';
|
298
|
+
}
|
299
|
+
|
300
|
+
changeClass(val: Class): void {
|
301
|
+
this.dataQualityQueryBuilderState.changeClass(val);
|
302
|
+
this.dataQualityGraphFetchTreeState.onClassChange(val);
|
303
|
+
this.structuralValidationsGraphFetchTreeState =
|
304
|
+
new DataQualityGraphFetchTreeState(this);
|
305
|
+
this.resultState = new DataQualityResultState(this);
|
306
|
+
this.updateElementOnClassChange();
|
307
|
+
}
|
308
|
+
|
309
|
+
updateElementOnClassChange() {
|
310
|
+
dataQualityClassValidation_setDataQualityGraphFetchTree(
|
311
|
+
this
|
312
|
+
.constraintsConfigurationElement as DataQualityClassValidationsConfiguration,
|
313
|
+
this.initialGraphFetchTreeFromClass(
|
314
|
+
this.dataQualityQueryBuilderState.class!,
|
315
|
+
),
|
316
|
+
);
|
317
|
+
dataQualityClassValidation_setFilter(
|
318
|
+
this
|
319
|
+
.constraintsConfigurationElement as DataQualityClassValidationsConfiguration,
|
320
|
+
undefined,
|
321
|
+
);
|
322
|
+
}
|
323
|
+
|
324
|
+
setExecutionContext(val: DataSpaceExecutionContext): void {
|
325
|
+
this.executionContext = val;
|
326
|
+
}
|
327
|
+
|
328
|
+
get isMappingReadOnly(): boolean {
|
329
|
+
return false;
|
330
|
+
}
|
331
|
+
|
332
|
+
get isRuntimeReadOnly(): boolean {
|
333
|
+
return false;
|
334
|
+
}
|
335
|
+
|
336
|
+
get isQuerySupported(): boolean {
|
337
|
+
return true;
|
338
|
+
}
|
339
|
+
|
340
|
+
setSelectedTab(tab: string): void {
|
341
|
+
this.selectedTab = tab;
|
342
|
+
}
|
343
|
+
|
344
|
+
setShowRuntimeSelector(val: boolean): void {
|
345
|
+
this.showRuntimeSelector = val;
|
346
|
+
}
|
347
|
+
get hashCode(): string {
|
348
|
+
return hashArray([
|
349
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_STATE,
|
350
|
+
this.dataQualityGraphFetchTreeState,
|
351
|
+
this.dataQualityQueryBuilderState.filterState,
|
352
|
+
]);
|
353
|
+
}
|
354
|
+
}
|