@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,584 @@
|
|
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 { useEffect, useState } from 'react';
|
18
|
+
import { observer } from 'mobx-react-lite';
|
19
|
+
import { useDrag } from 'react-dnd';
|
20
|
+
import { useApplicationStore } from '@finos/legend-application';
|
21
|
+
import { guaranteeNonNullable, prettyCONSTName } from '@finos/legend-shared';
|
22
|
+
import type { DataQualityState } from './states/DataQualityState.js';
|
23
|
+
import { flowResult } from 'mobx';
|
24
|
+
import { DATA_QUALITY_VALIDATION_TEST_ID } from './constants/DataQualityConstants.js';
|
25
|
+
import {
|
26
|
+
type QueryBuilderExplorerTreeDragSource,
|
27
|
+
type QueryBuilderExplorerTreeNodeData,
|
28
|
+
QUERY_BUILDER_EXPLORER_TREE_DND_TYPE,
|
29
|
+
QueryBuilderExplorerTreePropertyNodeData,
|
30
|
+
QueryBuilderExplorerTreeRootNodeData,
|
31
|
+
QueryBuilderExplorerTreeSubTypeNodeData,
|
32
|
+
checkForDeprecatedNode,
|
33
|
+
getQueryBuilderPropertyNodeData,
|
34
|
+
getQueryBuilderSubTypeNodeData,
|
35
|
+
QueryBuilderPropertyInfoTooltip,
|
36
|
+
QueryBuilderRootClassInfoTooltip,
|
37
|
+
QueryBuilderSubclassInfoTooltip,
|
38
|
+
renderPropertyTypeIcon,
|
39
|
+
getQueryBuilderExplorerTreeNodeSortRank,
|
40
|
+
} from '@finos/legend-query-builder';
|
41
|
+
import {
|
42
|
+
type TreeNodeContainerProps,
|
43
|
+
type TreeNodeViewProps,
|
44
|
+
CheckIcon,
|
45
|
+
ChevronDownIcon,
|
46
|
+
ChevronRightIcon,
|
47
|
+
clsx,
|
48
|
+
CompressIcon,
|
49
|
+
InfoCircleIcon,
|
50
|
+
MenuContentItemIcon,
|
51
|
+
MenuContentItemLabel,
|
52
|
+
MoreVerticalIcon,
|
53
|
+
PanelHeaderActions,
|
54
|
+
BlankPanelContent,
|
55
|
+
DragPreviewLayer,
|
56
|
+
MenuContent,
|
57
|
+
MenuContentItem,
|
58
|
+
PanelHeader,
|
59
|
+
PanelHeaderActionItem,
|
60
|
+
PanelLoadingIndicator,
|
61
|
+
PURE_ClassIcon,
|
62
|
+
TreeView,
|
63
|
+
useDragPreviewLayer,
|
64
|
+
ControlledDropdownMenu,
|
65
|
+
} from '@finos/legend-art';
|
66
|
+
import {
|
67
|
+
Class,
|
68
|
+
DerivedProperty,
|
69
|
+
Enumeration,
|
70
|
+
PrimitiveType,
|
71
|
+
TYPE_CAST_TOKEN,
|
72
|
+
getAllClassDerivedProperties,
|
73
|
+
getAllClassProperties,
|
74
|
+
} from '@finos/legend-graph';
|
75
|
+
|
76
|
+
export const QueryBuilderExplorerTreeNodeContainer = observer(
|
77
|
+
(
|
78
|
+
props: TreeNodeContainerProps<
|
79
|
+
QueryBuilderExplorerTreeNodeData,
|
80
|
+
{
|
81
|
+
dataQualityState: DataQualityState;
|
82
|
+
}
|
83
|
+
>,
|
84
|
+
) => {
|
85
|
+
const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;
|
86
|
+
const { dataQualityState } = innerProps;
|
87
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
88
|
+
const [isSelectedFromContextMenu] = useState(false);
|
89
|
+
const explorerState = dataQualityQueryBuilderState.explorerState;
|
90
|
+
const [, dragConnector, dragPreviewConnector] = useDrag<{
|
91
|
+
node?: QueryBuilderExplorerTreeNodeData;
|
92
|
+
}>(
|
93
|
+
() => ({
|
94
|
+
type:
|
95
|
+
node.type instanceof Enumeration
|
96
|
+
? QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.ENUM_PROPERTY
|
97
|
+
: node.type instanceof Class
|
98
|
+
? QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.CLASS_PROPERTY
|
99
|
+
: QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
|
100
|
+
item: () =>
|
101
|
+
node instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
102
|
+
? {}
|
103
|
+
: { node },
|
104
|
+
}),
|
105
|
+
[node],
|
106
|
+
);
|
107
|
+
useDragPreviewLayer(dragPreviewConnector);
|
108
|
+
|
109
|
+
const isExpandable = Boolean(node.childrenIds.length);
|
110
|
+
const isDerivedProperty =
|
111
|
+
node instanceof QueryBuilderExplorerTreePropertyNodeData &&
|
112
|
+
node.property instanceof DerivedProperty;
|
113
|
+
const isMultiple =
|
114
|
+
(node instanceof QueryBuilderExplorerTreePropertyNodeData &&
|
115
|
+
(node.property.multiplicity.upperBound === undefined ||
|
116
|
+
node.property.multiplicity.upperBound > 1)) ||
|
117
|
+
(node instanceof QueryBuilderExplorerTreeSubTypeNodeData &&
|
118
|
+
(node.multiplicity.upperBound === undefined ||
|
119
|
+
node.multiplicity.upperBound > 1));
|
120
|
+
const allowPreview =
|
121
|
+
node.mappingData.mapped &&
|
122
|
+
node instanceof QueryBuilderExplorerTreePropertyNodeData &&
|
123
|
+
node.type instanceof PrimitiveType &&
|
124
|
+
!node.isPartOfDerivedPropertyBranch;
|
125
|
+
const nodeExpandIcon = isExpandable ? (
|
126
|
+
node.isOpen ? (
|
127
|
+
<ChevronDownIcon />
|
128
|
+
) : (
|
129
|
+
<ChevronRightIcon />
|
130
|
+
)
|
131
|
+
) : (
|
132
|
+
<div />
|
133
|
+
);
|
134
|
+
const propertyName = explorerState.humanizePropertyName
|
135
|
+
? node instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
136
|
+
? TYPE_CAST_TOKEN + prettyCONSTName(node.label)
|
137
|
+
: prettyCONSTName(node.label)
|
138
|
+
: node instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
139
|
+
? TYPE_CAST_TOKEN + node.label
|
140
|
+
: node.label;
|
141
|
+
const selectNode = (): void => onNodeSelect?.(node);
|
142
|
+
|
143
|
+
if (
|
144
|
+
!node.mappingData.mapped &&
|
145
|
+
// NOTE: we always want to show at least the root node
|
146
|
+
!(node instanceof QueryBuilderExplorerTreeRootNodeData) &&
|
147
|
+
!explorerState.showUnmappedProperties
|
148
|
+
) {
|
149
|
+
return null;
|
150
|
+
}
|
151
|
+
return (
|
152
|
+
<div
|
153
|
+
className={clsx(
|
154
|
+
'data-quality-tree-view__node__container data-quality-validation-explorer-tree__node__container',
|
155
|
+
{
|
156
|
+
'data-quality-validation-explorer-tree__node__container--selected-from-context-menu':
|
157
|
+
isSelectedFromContextMenu,
|
158
|
+
'data-quality-validation-explorer-tree__node__container--unmapped':
|
159
|
+
!node.mappingData.mapped,
|
160
|
+
'data-quality-validation-explorer-tree__node__container--selected':
|
161
|
+
node.isSelected,
|
162
|
+
},
|
163
|
+
)}
|
164
|
+
title={
|
165
|
+
!node.mappingData.mapped
|
166
|
+
? node instanceof QueryBuilderExplorerTreeRootNodeData
|
167
|
+
? 'Root class is not mapped'
|
168
|
+
: 'Property is not mapped'
|
169
|
+
: undefined
|
170
|
+
}
|
171
|
+
onClick={selectNode}
|
172
|
+
ref={node.mappingData.mapped ? dragConnector : undefined}
|
173
|
+
style={{
|
174
|
+
paddingLeft: `${(level - 1) * (stepPaddingInRem ?? 1) + 0.5}rem`,
|
175
|
+
display: 'flex',
|
176
|
+
}}
|
177
|
+
>
|
178
|
+
{node instanceof QueryBuilderExplorerTreeRootNodeData && (
|
179
|
+
<>
|
180
|
+
<div className="data-quality-tree-view__node__icon data-quality-validation-explorer-tree__node__icon">
|
181
|
+
<div className="data-quality-validation-explorer-tree__expand-icon">
|
182
|
+
{nodeExpandIcon}
|
183
|
+
</div>
|
184
|
+
<div className="data-quality-validation-explorer-tree__type-icon">
|
185
|
+
<PURE_ClassIcon />
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
<div className="data-quality-tree-view__node__label data-quality-validation-explorer-tree__node__label data-quality-validation-explorer-tree__node__label--with-action">
|
189
|
+
{node.label}
|
190
|
+
</div>
|
191
|
+
<div className="data-quality-validation-explorer-tree__node__actions">
|
192
|
+
<QueryBuilderRootClassInfoTooltip
|
193
|
+
_class={guaranteeNonNullable(
|
194
|
+
dataQualityQueryBuilderState.class,
|
195
|
+
)}
|
196
|
+
>
|
197
|
+
<div
|
198
|
+
className="data-quality-validation-explorer-tree__node__action data-quality-validation-explorer-tree__node__info"
|
199
|
+
data-testid={
|
200
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_TOOLTIP_ICON
|
201
|
+
}
|
202
|
+
>
|
203
|
+
<InfoCircleIcon />
|
204
|
+
</div>
|
205
|
+
</QueryBuilderRootClassInfoTooltip>
|
206
|
+
</div>
|
207
|
+
</>
|
208
|
+
)}
|
209
|
+
{(node instanceof QueryBuilderExplorerTreePropertyNodeData ||
|
210
|
+
node instanceof QueryBuilderExplorerTreeSubTypeNodeData) && (
|
211
|
+
<>
|
212
|
+
<div
|
213
|
+
className="data-quality-tree-view__node__icon data-quality-validation-explorer-tree__node__icon"
|
214
|
+
ref={node.elementRef}
|
215
|
+
>
|
216
|
+
<div className="data-quality-validation-explorer-tree__expand-icon">
|
217
|
+
{nodeExpandIcon}
|
218
|
+
</div>
|
219
|
+
<div className="data-quality-validation-explorer-tree__type-icon">
|
220
|
+
{renderPropertyTypeIcon(node.type)}
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
<div
|
224
|
+
className={clsx(
|
225
|
+
'data-quality-tree-view__node__label data-quality-validation-explorer-tree__node__label data-quality-validation-explorer-tree__node__label--with-action',
|
226
|
+
{
|
227
|
+
'data-quality-validation-explorer-tree__node__label--with-preview':
|
228
|
+
allowPreview,
|
229
|
+
},
|
230
|
+
{
|
231
|
+
'data-quality-validation-explorer-tree__node__label--highlight':
|
232
|
+
node.isHighlighting,
|
233
|
+
},
|
234
|
+
)}
|
235
|
+
onAnimationEnd={() => node.setIsHighlighting(false)}
|
236
|
+
>
|
237
|
+
<div
|
238
|
+
className={clsx(
|
239
|
+
'data-quality-validation-explorer-tree__node__label--property__name',
|
240
|
+
{
|
241
|
+
'data-quality-validation-explorer-tree__node__label--deprecated':
|
242
|
+
checkForDeprecatedNode(
|
243
|
+
node,
|
244
|
+
explorerState.queryBuilderState.graphManagerState.graph,
|
245
|
+
explorerState.nonNullableTreeData,
|
246
|
+
),
|
247
|
+
},
|
248
|
+
)}
|
249
|
+
>
|
250
|
+
{propertyName}
|
251
|
+
</div>
|
252
|
+
{isDerivedProperty && (
|
253
|
+
<div
|
254
|
+
className="data-quality-validation-explorer-tree__node__label__derived-property"
|
255
|
+
title="Property is derived and may require user to specify parameter values"
|
256
|
+
>
|
257
|
+
(...)
|
258
|
+
</div>
|
259
|
+
)}
|
260
|
+
{isMultiple && (
|
261
|
+
<div
|
262
|
+
className="data-quality-validation-explorer-tree__node__label__multiple"
|
263
|
+
title="Multiple values of this property can cause row explosion"
|
264
|
+
>
|
265
|
+
*
|
266
|
+
</div>
|
267
|
+
)}
|
268
|
+
</div>
|
269
|
+
<div className="data-quality-validation-explorer-tree__node__actions">
|
270
|
+
{node instanceof QueryBuilderExplorerTreePropertyNodeData && (
|
271
|
+
<QueryBuilderPropertyInfoTooltip
|
272
|
+
title={propertyName}
|
273
|
+
property={node.property}
|
274
|
+
path={node.id}
|
275
|
+
isMapped={node.mappingData.mapped}
|
276
|
+
type={node.type}
|
277
|
+
>
|
278
|
+
<div
|
279
|
+
className="data-quality-validation-explorer-tree__node__action data-quality-validation-explorer-tree__node__info"
|
280
|
+
data-testid={
|
281
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_TOOLTIP_ICON
|
282
|
+
}
|
283
|
+
>
|
284
|
+
<InfoCircleIcon />
|
285
|
+
</div>
|
286
|
+
</QueryBuilderPropertyInfoTooltip>
|
287
|
+
)}
|
288
|
+
{node instanceof QueryBuilderExplorerTreeSubTypeNodeData && (
|
289
|
+
<QueryBuilderSubclassInfoTooltip
|
290
|
+
subclass={node.subclass}
|
291
|
+
path={node.id}
|
292
|
+
isMapped={node.mappingData.mapped}
|
293
|
+
multiplicity={node.multiplicity}
|
294
|
+
>
|
295
|
+
<div
|
296
|
+
className="data-quality-validation-explorer-tree__node__action data-quality-validation-explorer-tree__node__info"
|
297
|
+
data-testid={
|
298
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_TOOLTIP_ICON
|
299
|
+
}
|
300
|
+
>
|
301
|
+
<InfoCircleIcon />
|
302
|
+
</div>
|
303
|
+
</QueryBuilderSubclassInfoTooltip>
|
304
|
+
)}
|
305
|
+
</div>
|
306
|
+
</>
|
307
|
+
)}
|
308
|
+
</div>
|
309
|
+
);
|
310
|
+
},
|
311
|
+
);
|
312
|
+
|
313
|
+
const QueryBuilderExplorerTreeNodeView = observer(
|
314
|
+
(
|
315
|
+
props: TreeNodeViewProps<
|
316
|
+
QueryBuilderExplorerTreeNodeData,
|
317
|
+
{
|
318
|
+
dataQualityState: DataQualityState;
|
319
|
+
}
|
320
|
+
>,
|
321
|
+
) => {
|
322
|
+
const {
|
323
|
+
node,
|
324
|
+
level,
|
325
|
+
onNodeSelect,
|
326
|
+
getChildNodes,
|
327
|
+
stepPaddingInRem,
|
328
|
+
innerProps,
|
329
|
+
} = props;
|
330
|
+
const { dataQualityState } = innerProps;
|
331
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
332
|
+
if (
|
333
|
+
!node.mappingData.mapped &&
|
334
|
+
// NOTE: we always want to show at least the root node
|
335
|
+
!(node instanceof QueryBuilderExplorerTreeRootNodeData) &&
|
336
|
+
!dataQualityQueryBuilderState.explorerState.showUnmappedProperties
|
337
|
+
) {
|
338
|
+
return null;
|
339
|
+
}
|
340
|
+
return (
|
341
|
+
<div className="data-quality-tree-view__node__block">
|
342
|
+
<QueryBuilderExplorerTreeNodeContainer
|
343
|
+
node={node}
|
344
|
+
level={level + 1}
|
345
|
+
stepPaddingInRem={stepPaddingInRem}
|
346
|
+
onNodeSelect={onNodeSelect}
|
347
|
+
innerProps={innerProps}
|
348
|
+
/>
|
349
|
+
{node.isOpen &&
|
350
|
+
getChildNodes(node).map((childNode) => (
|
351
|
+
<QueryBuilderExplorerTreeNodeView
|
352
|
+
key={childNode.id}
|
353
|
+
node={childNode}
|
354
|
+
level={level + 1}
|
355
|
+
onNodeSelect={onNodeSelect}
|
356
|
+
getChildNodes={getChildNodes}
|
357
|
+
innerProps={innerProps}
|
358
|
+
/>
|
359
|
+
))}
|
360
|
+
</div>
|
361
|
+
);
|
362
|
+
},
|
363
|
+
);
|
364
|
+
|
365
|
+
const QueryBuilderExplorerTree = observer(
|
366
|
+
(props: { dataQualityState: DataQualityState }) => {
|
367
|
+
const { dataQualityState } = props;
|
368
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
369
|
+
const explorerState = dataQualityQueryBuilderState.explorerState;
|
370
|
+
const treeData = explorerState.nonNullableTreeData;
|
371
|
+
const onNodeSelect = (node: QueryBuilderExplorerTreeNodeData): void => {
|
372
|
+
if (node.childrenIds.length) {
|
373
|
+
node.isOpen = !node.isOpen;
|
374
|
+
if (
|
375
|
+
node.isOpen &&
|
376
|
+
node instanceof QueryBuilderExplorerTreePropertyNodeData &&
|
377
|
+
node.type instanceof Class
|
378
|
+
) {
|
379
|
+
getAllClassProperties(node.type)
|
380
|
+
.concat(getAllClassDerivedProperties(node.type))
|
381
|
+
.forEach((property) => {
|
382
|
+
const propertyTreeNodeData = getQueryBuilderPropertyNodeData(
|
383
|
+
property,
|
384
|
+
node,
|
385
|
+
guaranteeNonNullable(
|
386
|
+
explorerState.mappingModelCoverageAnalysisResult,
|
387
|
+
),
|
388
|
+
);
|
389
|
+
if (propertyTreeNodeData) {
|
390
|
+
treeData.nodes.set(
|
391
|
+
propertyTreeNodeData.id,
|
392
|
+
propertyTreeNodeData,
|
393
|
+
);
|
394
|
+
}
|
395
|
+
});
|
396
|
+
node.type._subclasses.forEach((subclass) => {
|
397
|
+
const subTypeTreeNodeData = getQueryBuilderSubTypeNodeData(
|
398
|
+
subclass,
|
399
|
+
node,
|
400
|
+
guaranteeNonNullable(
|
401
|
+
explorerState.mappingModelCoverageAnalysisResult,
|
402
|
+
),
|
403
|
+
);
|
404
|
+
treeData.nodes.set(subTypeTreeNodeData.id, subTypeTreeNodeData);
|
405
|
+
});
|
406
|
+
}
|
407
|
+
}
|
408
|
+
explorerState.refreshTree();
|
409
|
+
};
|
410
|
+
const getChildNodes = (
|
411
|
+
node: QueryBuilderExplorerTreeNodeData,
|
412
|
+
): QueryBuilderExplorerTreeNodeData[] => {
|
413
|
+
const dataToReturn = node.childrenIds
|
414
|
+
.map((id) => treeData.nodes.get(id))
|
415
|
+
.filter(
|
416
|
+
(
|
417
|
+
childNode,
|
418
|
+
): childNode is
|
419
|
+
| QueryBuilderExplorerTreePropertyNodeData
|
420
|
+
| QueryBuilderExplorerTreeSubTypeNodeData =>
|
421
|
+
childNode instanceof QueryBuilderExplorerTreeSubTypeNodeData ||
|
422
|
+
childNode instanceof QueryBuilderExplorerTreePropertyNodeData,
|
423
|
+
)
|
424
|
+
// simple properties come first
|
425
|
+
.sort((a, b) => a.label.localeCompare(b.label))
|
426
|
+
.sort(
|
427
|
+
(a, b) =>
|
428
|
+
getQueryBuilderExplorerTreeNodeSortRank(b) -
|
429
|
+
getQueryBuilderExplorerTreeNodeSortRank(a),
|
430
|
+
);
|
431
|
+
return dataToReturn;
|
432
|
+
};
|
433
|
+
|
434
|
+
return (
|
435
|
+
<TreeView
|
436
|
+
components={{
|
437
|
+
TreeNodeContainer: QueryBuilderExplorerTreeNodeContainer,
|
438
|
+
TreeNodeView: QueryBuilderExplorerTreeNodeView,
|
439
|
+
}}
|
440
|
+
className="data-quality-validation-explorer-tree__root"
|
441
|
+
treeData={treeData}
|
442
|
+
onNodeSelect={onNodeSelect}
|
443
|
+
getChildNodes={getChildNodes}
|
444
|
+
innerProps={{
|
445
|
+
dataQualityState,
|
446
|
+
}}
|
447
|
+
/>
|
448
|
+
);
|
449
|
+
},
|
450
|
+
);
|
451
|
+
export const DataQualityExplorerPanel = observer(
|
452
|
+
(props: { dataQualityState: DataQualityState }) => {
|
453
|
+
const { dataQualityState } = props;
|
454
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
455
|
+
const explorerState = dataQualityQueryBuilderState.explorerState;
|
456
|
+
const applicationStore = useApplicationStore();
|
457
|
+
const collapseTree = (): void => {
|
458
|
+
if (explorerState.treeData) {
|
459
|
+
Array.from(explorerState.treeData.nodes.values()).forEach((node) => {
|
460
|
+
node.isOpen = false;
|
461
|
+
});
|
462
|
+
explorerState.refreshTree();
|
463
|
+
}
|
464
|
+
};
|
465
|
+
const toggleShowUnmappedProperties = (): void =>
|
466
|
+
explorerState.setShowUnmappedProperties(
|
467
|
+
!explorerState.showUnmappedProperties,
|
468
|
+
);
|
469
|
+
const toggleHumanizePropertyName = (): void =>
|
470
|
+
explorerState.setHumanizePropertyName(
|
471
|
+
!explorerState.humanizePropertyName,
|
472
|
+
);
|
473
|
+
const toggleHighlightUsedProperties = (): void =>
|
474
|
+
explorerState.setHighlightUsedProperties(
|
475
|
+
!explorerState.highlightUsedProperties,
|
476
|
+
);
|
477
|
+
|
478
|
+
useEffect(() => {
|
479
|
+
flowResult(explorerState.analyzeMappingModelCoverage()).catch((error) => {
|
480
|
+
applicationStore.alertUnhandledError(error);
|
481
|
+
});
|
482
|
+
}, [
|
483
|
+
applicationStore,
|
484
|
+
explorerState,
|
485
|
+
dataQualityQueryBuilderState.executionContextState.mapping,
|
486
|
+
]);
|
487
|
+
return (
|
488
|
+
<div
|
489
|
+
data-testid={
|
490
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_EXPLORER
|
491
|
+
}
|
492
|
+
className={clsx('panel data-quality-validation__explorer', {
|
493
|
+
backdrop__element: applicationStore.layoutService.showBackdrop,
|
494
|
+
})}
|
495
|
+
>
|
496
|
+
<PanelHeader title="explorer">
|
497
|
+
<PanelHeaderActions>
|
498
|
+
<PanelHeaderActionItem onClick={collapseTree} title="Collapse Tree">
|
499
|
+
<CompressIcon />
|
500
|
+
</PanelHeaderActionItem>
|
501
|
+
<ControlledDropdownMenu
|
502
|
+
className="panel__header__action"
|
503
|
+
title="Show Options Menu..."
|
504
|
+
content={
|
505
|
+
<MenuContent>
|
506
|
+
<MenuContentItem onClick={toggleShowUnmappedProperties}>
|
507
|
+
<MenuContentItemIcon>
|
508
|
+
{explorerState.showUnmappedProperties ? (
|
509
|
+
<CheckIcon />
|
510
|
+
) : null}
|
511
|
+
</MenuContentItemIcon>
|
512
|
+
<MenuContentItemLabel>
|
513
|
+
Show Unmapped Properties
|
514
|
+
</MenuContentItemLabel>
|
515
|
+
</MenuContentItem>
|
516
|
+
<MenuContentItem onClick={toggleHumanizePropertyName}>
|
517
|
+
<MenuContentItemIcon>
|
518
|
+
{explorerState.humanizePropertyName ? (
|
519
|
+
<CheckIcon />
|
520
|
+
) : null}
|
521
|
+
</MenuContentItemIcon>
|
522
|
+
<MenuContentItemLabel>
|
523
|
+
Humanize Property Name
|
524
|
+
</MenuContentItemLabel>
|
525
|
+
</MenuContentItem>
|
526
|
+
<MenuContentItem onClick={toggleHighlightUsedProperties}>
|
527
|
+
<MenuContentItemIcon>
|
528
|
+
{explorerState.highlightUsedProperties ? (
|
529
|
+
<CheckIcon />
|
530
|
+
) : null}
|
531
|
+
</MenuContentItemIcon>
|
532
|
+
<MenuContentItemLabel>
|
533
|
+
Highlight already used properties
|
534
|
+
</MenuContentItemLabel>
|
535
|
+
</MenuContentItem>
|
536
|
+
</MenuContent>
|
537
|
+
}
|
538
|
+
menuProps={{
|
539
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
540
|
+
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
541
|
+
elevation: 7,
|
542
|
+
}}
|
543
|
+
>
|
544
|
+
<MoreVerticalIcon className="data-quality-validation__icon__more-options" />
|
545
|
+
</ControlledDropdownMenu>
|
546
|
+
</PanelHeaderActions>
|
547
|
+
</PanelHeader>
|
548
|
+
|
549
|
+
<div className="panel__content data-quality-validation-explorer-tree__content">
|
550
|
+
<PanelLoadingIndicator
|
551
|
+
isLoading={
|
552
|
+
explorerState.mappingModelCoverageAnalysisState.isInProgress
|
553
|
+
}
|
554
|
+
/>
|
555
|
+
<DragPreviewLayer
|
556
|
+
labelGetter={(item: QueryBuilderExplorerTreeDragSource): string =>
|
557
|
+
explorerState.humanizePropertyName
|
558
|
+
? prettyCONSTName(item.node.label)
|
559
|
+
: item.node.label
|
560
|
+
}
|
561
|
+
types={Object.values(QUERY_BUILDER_EXPLORER_TREE_DND_TYPE)}
|
562
|
+
/>
|
563
|
+
{explorerState.mappingModelCoverageAnalysisState.isInProgress ? (
|
564
|
+
<BlankPanelContent>
|
565
|
+
{explorerState.mappingModelCoverageAnalysisState.message}
|
566
|
+
</BlankPanelContent>
|
567
|
+
) : (
|
568
|
+
<>
|
569
|
+
{!explorerState.treeData && (
|
570
|
+
<BlankPanelContent>
|
571
|
+
Specify the class, mapping, and runtime to start building
|
572
|
+
query
|
573
|
+
</BlankPanelContent>
|
574
|
+
)}
|
575
|
+
{explorerState.treeData && (
|
576
|
+
<QueryBuilderExplorerTree dataQualityState={dataQualityState} />
|
577
|
+
)}
|
578
|
+
</>
|
579
|
+
)}
|
580
|
+
</div>
|
581
|
+
</div>
|
582
|
+
);
|
583
|
+
},
|
584
|
+
);
|
@@ -0,0 +1,50 @@
|
|
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 { observer } from 'mobx-react-lite';
|
18
|
+
import type { DataQualityState } from './states/DataQualityState.js';
|
19
|
+
import {
|
20
|
+
type QueryBuilderFilterState,
|
21
|
+
QueryBuilderFilterPanel,
|
22
|
+
} from '@finos/legend-query-builder';
|
23
|
+
import { useEffect } from 'react';
|
24
|
+
import { reaction } from 'mobx';
|
25
|
+
|
26
|
+
export const DataQualityFilterPanel = observer(
|
27
|
+
(props: {
|
28
|
+
dataQualityState: DataQualityState;
|
29
|
+
filterState: QueryBuilderFilterState;
|
30
|
+
}) => {
|
31
|
+
const { dataQualityState } = props;
|
32
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
33
|
+
|
34
|
+
useEffect(() => {
|
35
|
+
const disposer = reaction(
|
36
|
+
() => dataQualityQueryBuilderState.filterState.hashCode,
|
37
|
+
() => {
|
38
|
+
dataQualityState.updateFilterElement();
|
39
|
+
},
|
40
|
+
);
|
41
|
+
return () => disposer();
|
42
|
+
}, [dataQualityState, dataQualityQueryBuilderState.filterState.hashCode]);
|
43
|
+
|
44
|
+
return (
|
45
|
+
<QueryBuilderFilterPanel
|
46
|
+
queryBuilderState={dataQualityQueryBuilderState}
|
47
|
+
/>
|
48
|
+
);
|
49
|
+
},
|
50
|
+
);
|