@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,216 @@
|
|
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 {
|
18
|
+
clsx,
|
19
|
+
createFilter,
|
20
|
+
CustomSelectorInput,
|
21
|
+
PURE_ClassIcon,
|
22
|
+
} from '@finos/legend-art';
|
23
|
+
import { observer } from 'mobx-react-lite';
|
24
|
+
import { useApplicationStore } from '@finos/legend-application';
|
25
|
+
import type { DataQualityState } from './states/DataQualityState.js';
|
26
|
+
import { DataQualityDataSpaceBuilderSetupPanelContent } from './DataQualityDataSpaceBuilder.js';
|
27
|
+
import { DataQualityMappingAndRuntimeBuilder } from './DataQualityMappingAndRuntimeBuilder.js';
|
28
|
+
import { ELEMENT_CREATION_BASIS } from './DSL_DataQuality_ClassElementDriver.js';
|
29
|
+
import { type Class, isElementDeprecated } from '@finos/legend-graph';
|
30
|
+
import {
|
31
|
+
getPackageableElementOptionFormatter,
|
32
|
+
type PackageableElementOption,
|
33
|
+
} from '@finos/legend-lego/graph-editor';
|
34
|
+
import type { DataQualityClassValidationState } from './states/DataQualityClassValidationState.js';
|
35
|
+
import type { DataQualityServiceValidationState } from './states/DataQualityServiceValidationState.js';
|
36
|
+
import { DATA_QUALITY_VALIDATION_TEST_ID } from './constants/DataQualityConstants.js';
|
37
|
+
|
38
|
+
const generateClassLabel = (
|
39
|
+
val: Class,
|
40
|
+
dataQualityState: DataQualityState,
|
41
|
+
): string | React.ReactNode => {
|
42
|
+
const isDeprecatedClass = isElementDeprecated(
|
43
|
+
val,
|
44
|
+
dataQualityState.graphManagerState.graph,
|
45
|
+
);
|
46
|
+
|
47
|
+
return (
|
48
|
+
<div
|
49
|
+
className={clsx('data-quality-validation__setup__class-option-label', {
|
50
|
+
'data-quality-validation__setup__class-option-label--deprecated':
|
51
|
+
isDeprecatedClass,
|
52
|
+
})}
|
53
|
+
>
|
54
|
+
<div className="data-quality-validation__setup__class-option-label__name">
|
55
|
+
{val.name}
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
);
|
59
|
+
};
|
60
|
+
|
61
|
+
export const DataQualityClassSelector = observer(
|
62
|
+
(props: {
|
63
|
+
dataQualityState: DataQualityState;
|
64
|
+
classes: Class[];
|
65
|
+
onClassChange?: ((val: Class) => void) | undefined;
|
66
|
+
noMatchMessage?: string | undefined;
|
67
|
+
}) => {
|
68
|
+
const { dataQualityState, classes, onClassChange, noMatchMessage } = props;
|
69
|
+
const { dataQualityQueryBuilderState } = dataQualityState;
|
70
|
+
const applicationStore = useApplicationStore();
|
71
|
+
|
72
|
+
const elementFilterOption = createFilter({
|
73
|
+
ignoreCase: true,
|
74
|
+
ignoreAccents: false,
|
75
|
+
stringify: (option: PackageableElementOption<Class>): string =>
|
76
|
+
option.value.path,
|
77
|
+
});
|
78
|
+
|
79
|
+
const classOptions = classes.map((_class) => ({
|
80
|
+
value: _class,
|
81
|
+
label: generateClassLabel(_class, dataQualityState),
|
82
|
+
}));
|
83
|
+
const selectedClassOption = dataQualityQueryBuilderState.class
|
84
|
+
? {
|
85
|
+
value: dataQualityQueryBuilderState.class,
|
86
|
+
label: generateClassLabel(
|
87
|
+
dataQualityQueryBuilderState.class,
|
88
|
+
dataQualityState,
|
89
|
+
),
|
90
|
+
}
|
91
|
+
: null;
|
92
|
+
const changeClass = (val: PackageableElementOption<Class>): void => {
|
93
|
+
if (val.value === dataQualityQueryBuilderState.class) {
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
dataQualityState.changeClass(val.value);
|
97
|
+
dataQualityState.updateElementOnClassChange();
|
98
|
+
onClassChange?.(val.value);
|
99
|
+
};
|
100
|
+
|
101
|
+
return (
|
102
|
+
<div className="data-quality-validation__setup__config-group data-quality-validation__setup__config-group--class">
|
103
|
+
<div className="data-quality-validation__setup__config-group__content">
|
104
|
+
<div className="data-quality-validation__setup__config-group__item">
|
105
|
+
<div
|
106
|
+
className="btn--sm data-quality-validation__setup__config-group__item__label"
|
107
|
+
title="class"
|
108
|
+
>
|
109
|
+
<PURE_ClassIcon />
|
110
|
+
</div>
|
111
|
+
<CustomSelectorInput
|
112
|
+
className="panel__content__form__section__dropdown data-quality-validation__setup__config-group__item__selector data-quality-validation__setup__config-group__item__selector__milestoned"
|
113
|
+
placeholder={
|
114
|
+
classOptions.length
|
115
|
+
? 'Choose a class...'
|
116
|
+
: noMatchMessage ?? 'No class found'
|
117
|
+
}
|
118
|
+
disabled={
|
119
|
+
classOptions.length < 1 ||
|
120
|
+
(classOptions.length === 1 && Boolean(selectedClassOption))
|
121
|
+
}
|
122
|
+
noMatchMessage={noMatchMessage}
|
123
|
+
options={classOptions}
|
124
|
+
onChange={changeClass}
|
125
|
+
value={selectedClassOption}
|
126
|
+
darkMode={
|
127
|
+
!applicationStore.layoutService
|
128
|
+
.TEMPORARY__isLightColorThemeEnabled
|
129
|
+
}
|
130
|
+
filterOption={elementFilterOption}
|
131
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
132
|
+
darkMode:
|
133
|
+
!applicationStore.layoutService
|
134
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
135
|
+
})}
|
136
|
+
/>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
);
|
141
|
+
},
|
142
|
+
);
|
143
|
+
export const DataQualityServiceValidationSideBar = observer(
|
144
|
+
(props: {
|
145
|
+
dataQualityState: DataQualityServiceValidationState;
|
146
|
+
children: React.ReactNode;
|
147
|
+
}) => {
|
148
|
+
const { dataQualityState, children } = props;
|
149
|
+
|
150
|
+
return (
|
151
|
+
<div
|
152
|
+
className={clsx(
|
153
|
+
'data-quality-validation__side-bar',
|
154
|
+
dataQualityState.sideBarClassName,
|
155
|
+
)}
|
156
|
+
>
|
157
|
+
<div
|
158
|
+
data-testid={
|
159
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_SETUP
|
160
|
+
}
|
161
|
+
className="panel data-quality-validation__setup"
|
162
|
+
>
|
163
|
+
<div className="panel__content data-quality-validation__setup__content">
|
164
|
+
service selection to be show
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
<div className="data-quality-validation__side-bar__content">
|
168
|
+
{children}
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
);
|
172
|
+
},
|
173
|
+
);
|
174
|
+
|
175
|
+
export const DataQualityClassValidationSideBar = observer(
|
176
|
+
(props: {
|
177
|
+
dataQualityClassValidationState: DataQualityClassValidationState;
|
178
|
+
children: React.ReactNode;
|
179
|
+
}) => {
|
180
|
+
const { dataQualityClassValidationState, children } = props;
|
181
|
+
const validationElementCreationBasis =
|
182
|
+
dataQualityClassValidationState.validationElementCreationBasis;
|
183
|
+
|
184
|
+
return (
|
185
|
+
<div
|
186
|
+
className={clsx(
|
187
|
+
'data-quality-validation__side-bar',
|
188
|
+
dataQualityClassValidationState.sideBarClassName,
|
189
|
+
)}
|
190
|
+
>
|
191
|
+
<div
|
192
|
+
data-testid={
|
193
|
+
DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_SETUP
|
194
|
+
}
|
195
|
+
className="panel data-quality-validation__setup"
|
196
|
+
>
|
197
|
+
<div className="panel__content data-quality-validation__setup__content">
|
198
|
+
{validationElementCreationBasis ===
|
199
|
+
ELEMENT_CREATION_BASIS.DATASPACE_BASED ? (
|
200
|
+
<DataQualityDataSpaceBuilderSetupPanelContent
|
201
|
+
dataQualityState={dataQualityClassValidationState}
|
202
|
+
/>
|
203
|
+
) : (
|
204
|
+
<DataQualityMappingAndRuntimeBuilder
|
205
|
+
dataQualityState={dataQualityClassValidationState}
|
206
|
+
/>
|
207
|
+
)}
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
<div className="data-quality-validation__side-bar__content">
|
211
|
+
{children}
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
);
|
215
|
+
},
|
216
|
+
);
|
@@ -0,0 +1,105 @@
|
|
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 {
|
19
|
+
Dialog,
|
20
|
+
ModalBody,
|
21
|
+
ModalFooter,
|
22
|
+
Modal,
|
23
|
+
ModalFooterButton,
|
24
|
+
ModalHeader,
|
25
|
+
TreeView,
|
26
|
+
} from '@finos/legend-art';
|
27
|
+
import type { DataQualityState } from './states/DataQualityState.js';
|
28
|
+
import {
|
29
|
+
DataQualityConstraintsTreeNodeContainer,
|
30
|
+
getQueryBuilderExplorerTreeNodeSortRank,
|
31
|
+
} from './DataQualityConstraintsSelection.js';
|
32
|
+
import { DataQualityGraphFetchTreeNodeData } from './utils/DataQualityGraphFetchTreeUtil.js';
|
33
|
+
|
34
|
+
export const DataQualityStructuralValidationsPanel = observer(
|
35
|
+
(props: { dataQualityState: DataQualityState }) => {
|
36
|
+
const { dataQualityState } = props;
|
37
|
+
const { structuralValidationsGraphFetchTreeState } = dataQualityState;
|
38
|
+
const structureValidationsTree =
|
39
|
+
structuralValidationsGraphFetchTreeState.treeData;
|
40
|
+
if (!structureValidationsTree) {
|
41
|
+
return null;
|
42
|
+
}
|
43
|
+
const closePlanViewer = (): void => {
|
44
|
+
dataQualityState.setShowStructuralValidations(false);
|
45
|
+
};
|
46
|
+
const isDarkMode =
|
47
|
+
!dataQualityState.applicationStore.layoutService
|
48
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
49
|
+
|
50
|
+
const getChildNodes = (
|
51
|
+
node: DataQualityGraphFetchTreeNodeData,
|
52
|
+
): DataQualityGraphFetchTreeNodeData[] =>
|
53
|
+
node.childrenIds
|
54
|
+
.map((id) => structureValidationsTree.nodes.get(id))
|
55
|
+
.filter(
|
56
|
+
(_node): _node is DataQualityGraphFetchTreeNodeData =>
|
57
|
+
_node instanceof DataQualityGraphFetchTreeNodeData,
|
58
|
+
)
|
59
|
+
.sort((a, b) => a.label.localeCompare(b.label))
|
60
|
+
.sort(
|
61
|
+
(a, b) =>
|
62
|
+
getQueryBuilderExplorerTreeNodeSortRank(b) -
|
63
|
+
getQueryBuilderExplorerTreeNodeSortRank(a),
|
64
|
+
);
|
65
|
+
|
66
|
+
return (
|
67
|
+
<Dialog
|
68
|
+
open={dataQualityState.showStructuralValidations}
|
69
|
+
onClose={closePlanViewer}
|
70
|
+
classes={{
|
71
|
+
root: 'data-quality-editor-modal__root-container',
|
72
|
+
container: 'data-quality-editor-modal__container',
|
73
|
+
paper: 'data-quality-editor-modal__content',
|
74
|
+
}}
|
75
|
+
>
|
76
|
+
<Modal className="data-quality-editor-modal" darkMode={isDarkMode}>
|
77
|
+
<ModalHeader title="Structural Attributes" />
|
78
|
+
<ModalBody>
|
79
|
+
<div className="data-quality-validation-graph-fetch-constraints-selection__config-group__item">
|
80
|
+
<TreeView
|
81
|
+
components={{
|
82
|
+
TreeNodeContainer: DataQualityConstraintsTreeNodeContainer,
|
83
|
+
}}
|
84
|
+
className="data-quality-validation-graph-fetch-tree__container__tree"
|
85
|
+
treeData={structureValidationsTree}
|
86
|
+
getChildNodes={getChildNodes}
|
87
|
+
innerProps={{
|
88
|
+
dataQualityState,
|
89
|
+
isReadOnly: true,
|
90
|
+
}}
|
91
|
+
/>
|
92
|
+
</div>
|
93
|
+
</ModalBody>
|
94
|
+
<ModalFooter>
|
95
|
+
<ModalFooterButton
|
96
|
+
onClick={closePlanViewer}
|
97
|
+
text="Close"
|
98
|
+
type="secondary"
|
99
|
+
/>
|
100
|
+
</ModalFooter>
|
101
|
+
</Modal>
|
102
|
+
</Dialog>
|
103
|
+
);
|
104
|
+
},
|
105
|
+
);
|
@@ -0,0 +1,104 @@
|
|
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 {
|
18
|
+
type DataQualityState,
|
19
|
+
DATA_QUALITY_TAB,
|
20
|
+
} from './states/DataQualityState.js';
|
21
|
+
import { observer } from 'mobx-react-lite';
|
22
|
+
import { clsx } from '@finos/legend-art';
|
23
|
+
import { prettyCONSTName } from '@finos/legend-shared';
|
24
|
+
import { DataQualityConstraintsSelection } from './DataQualityConstraintsSelection.js';
|
25
|
+
import { DataQualityResultPanel } from './DataQualityResultPanel.js';
|
26
|
+
import { DataQualityFilterPanel } from './DataQualityFilterPanel.js';
|
27
|
+
import { type DSL_DataQuality_LegendStudioPlugin_Extension } from './DSL_DataQuality_LegendStudioPlugin_Extension.js';
|
28
|
+
|
29
|
+
export const DataQualityTabs = observer(
|
30
|
+
(props: { dataQualityState: DataQualityState }) => {
|
31
|
+
const { dataQualityState } = props;
|
32
|
+
const { selectedTab } = dataQualityState;
|
33
|
+
const changeTab =
|
34
|
+
(tab: string): (() => void) =>
|
35
|
+
(): void =>
|
36
|
+
dataQualityState.setSelectedTab(tab);
|
37
|
+
|
38
|
+
const tabsToRender = dataQualityState.tabsToShow;
|
39
|
+
const renderTabs = (): React.ReactNode => {
|
40
|
+
switch (selectedTab) {
|
41
|
+
case DATA_QUALITY_TAB.CONSTRAINTS_SELECTION:
|
42
|
+
return (
|
43
|
+
<DataQualityConstraintsSelection
|
44
|
+
dataQualityState={dataQualityState}
|
45
|
+
/>
|
46
|
+
);
|
47
|
+
case DATA_QUALITY_TAB.FILTER:
|
48
|
+
return (
|
49
|
+
<DataQualityFilterPanel
|
50
|
+
filterState={
|
51
|
+
dataQualityState.dataQualityQueryBuilderState.filterState
|
52
|
+
}
|
53
|
+
dataQualityState={dataQualityState}
|
54
|
+
/>
|
55
|
+
);
|
56
|
+
case DATA_QUALITY_TAB.TRIAL_RUNS:
|
57
|
+
return <DataQualityResultPanel dataQualityState={dataQualityState} />;
|
58
|
+
default: {
|
59
|
+
if (selectedTab) {
|
60
|
+
const extraTabRenderers = dataQualityState.editorStore.pluginManager
|
61
|
+
.getApplicationPlugins()
|
62
|
+
.flatMap(
|
63
|
+
(plugin) =>
|
64
|
+
(
|
65
|
+
plugin as DSL_DataQuality_LegendStudioPlugin_Extension
|
66
|
+
).getComponentRenderers?.() ?? [],
|
67
|
+
);
|
68
|
+
for (const extraTabRenderer of extraTabRenderers) {
|
69
|
+
const componentToRender = extraTabRenderer(
|
70
|
+
selectedTab,
|
71
|
+
dataQualityState,
|
72
|
+
);
|
73
|
+
if (componentToRender) {
|
74
|
+
return componentToRender;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
return undefined;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
};
|
82
|
+
|
83
|
+
return (
|
84
|
+
<div className="panel">
|
85
|
+
<div className="panel__header">
|
86
|
+
<div className="uml-element-editor__tabs">
|
87
|
+
{tabsToRender.map((tab) => (
|
88
|
+
<div
|
89
|
+
key={tab}
|
90
|
+
onClick={changeTab(tab)}
|
91
|
+
className={clsx('data-quality__tab', {
|
92
|
+
'data-quality__tab--active': tab === selectedTab,
|
93
|
+
})}
|
94
|
+
>
|
95
|
+
{prettyCONSTName(tab)}
|
96
|
+
</div>
|
97
|
+
))}
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<div className="panel__content">{renderTabs()}</div>
|
101
|
+
</div>
|
102
|
+
);
|
103
|
+
},
|
104
|
+
);
|
@@ -0,0 +1,52 @@
|
|
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 {
|
19
|
+
ResizablePanel,
|
20
|
+
ResizablePanelGroup,
|
21
|
+
ResizablePanelSplitter,
|
22
|
+
} from '@finos/legend-art';
|
23
|
+
import { DataQualityTabs } from './DataQualityTabs.js';
|
24
|
+
import type { DataQualityState } from './states/DataQualityState.js';
|
25
|
+
|
26
|
+
export const DataQualityValidationEditor = observer(
|
27
|
+
(props: {
|
28
|
+
dataQualityState: DataQualityState;
|
29
|
+
SideBarBasisComponent: React.ReactNode;
|
30
|
+
}) => {
|
31
|
+
const { SideBarBasisComponent, dataQualityState } = props;
|
32
|
+
return (
|
33
|
+
<div className="data-quality-validation">
|
34
|
+
<div className="data-quality-validation__body">
|
35
|
+
<div className="data-quality-validation__content">
|
36
|
+
<div className="data-quality-validation__main">
|
37
|
+
<ResizablePanelGroup orientation="vertical">
|
38
|
+
<ResizablePanel size={300} minSize={120}>
|
39
|
+
{SideBarBasisComponent}
|
40
|
+
</ResizablePanel>
|
41
|
+
<ResizablePanelSplitter />
|
42
|
+
<ResizablePanel minSize={120}>
|
43
|
+
<DataQualityTabs dataQualityState={dataQualityState} />
|
44
|
+
</ResizablePanel>
|
45
|
+
</ResizablePanelGroup>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
);
|
51
|
+
},
|
52
|
+
);
|
@@ -0,0 +1,24 @@
|
|
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
|
+
export enum DATA_QUALITY_VALIDATION_TEST_ID {
|
18
|
+
DATA_QUALITY_VALIDATION_EXPLORER = 'data-quality-validation__explorer',
|
19
|
+
DATA_QUALITY_VALIDATION_TOOLTIP_ICON = 'data-quality-validation__tooltip__icon',
|
20
|
+
DATA_QUALITY_VALIDATION_SETUP = 'data-quality-validation__setup',
|
21
|
+
DATA_QUALITY_VALIDATION_TREE = 'data-quality-validation-tree',
|
22
|
+
DATA_QUALITY_VALIDATION_RESULT_PANEL = 'data-quality-result-panel',
|
23
|
+
DATA_QUALITY_VALIDATION_RESULT_ANALYTICS = 'data-quality-result-analytics',
|
24
|
+
}
|
@@ -0,0 +1,19 @@
|
|
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
|
+
export * from './DSL_DataQuality_LegendStudioApplicationPlugin.js';
|
18
|
+
export * from '../components/states/DataQualityState.js';
|
19
|
+
export * from '../components/DSL_DataQuality_LegendStudioPlugin_Extension.js';
|
@@ -0,0 +1,70 @@
|
|
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 {
|
18
|
+
type Constraint,
|
19
|
+
buildSourceInformationSourceId,
|
20
|
+
LAMBDA_PIPE,
|
21
|
+
} from '@finos/legend-graph';
|
22
|
+
import { action, makeObservable, observable } from 'mobx';
|
23
|
+
import { uuid } from '@finos/legend-shared';
|
24
|
+
|
25
|
+
export const CONSTRAINT_SOURCE_ID_LABEL = 'constraint';
|
26
|
+
|
27
|
+
export class ConstraintState {
|
28
|
+
readonly uuid = uuid();
|
29
|
+
constraint: Constraint;
|
30
|
+
lambdaString: string;
|
31
|
+
isSelected = false;
|
32
|
+
lambdaPrefix: string = LAMBDA_PIPE;
|
33
|
+
|
34
|
+
constructor(constraint: Constraint) {
|
35
|
+
makeObservable(this, {
|
36
|
+
constraint: observable,
|
37
|
+
isSelected: observable,
|
38
|
+
lambdaString: observable,
|
39
|
+
setLambdaString: action,
|
40
|
+
setIsSelected: action,
|
41
|
+
});
|
42
|
+
|
43
|
+
this.constraint = constraint;
|
44
|
+
this.lambdaString = '';
|
45
|
+
}
|
46
|
+
|
47
|
+
setLambdaString(val: string): void {
|
48
|
+
this.lambdaString = val;
|
49
|
+
}
|
50
|
+
|
51
|
+
setIsSelected(val: boolean) {
|
52
|
+
this.isSelected = val;
|
53
|
+
}
|
54
|
+
|
55
|
+
extractLambdaString(fullLambdaString: string): string {
|
56
|
+
return fullLambdaString.substring(
|
57
|
+
fullLambdaString.indexOf(this.lambdaPrefix) + this.lambdaPrefix.length,
|
58
|
+
fullLambdaString.length,
|
59
|
+
);
|
60
|
+
}
|
61
|
+
|
62
|
+
get lambdaId(): string {
|
63
|
+
return buildSourceInformationSourceId([
|
64
|
+
this.constraint._OWNER.path,
|
65
|
+
CONSTRAINT_SOURCE_ID_LABEL,
|
66
|
+
this.constraint.name,
|
67
|
+
this.uuid, // in case of duplications
|
68
|
+
]);
|
69
|
+
}
|
70
|
+
}
|