@finos/legend-extension-dsl-data-quality 2.0.32 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__lib__/studio/DSL_DataQuality_LegendStudioApplicationNavigationContext.d.ts +1 -2
- package/lib/__lib__/studio/DSL_DataQuality_LegendStudioApplicationNavigationContext.d.ts.map +1 -1
- package/lib/__lib__/studio/DSL_DataQuality_LegendStudioApplicationNavigationContext.js +0 -1
- package/lib/__lib__/studio/DSL_DataQuality_LegendStudioApplicationNavigationContext.js.map +1 -1
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +0 -1
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/DataQualityRelationValidationEditor.d.ts.map +1 -1
- package/lib/components/DataQualityRelationValidationEditor.js +5 -12
- package/lib/components/DataQualityRelationValidationEditor.js.map +1 -1
- package/lib/components/DataQualityValidationDetailPanel.d.ts.map +1 -1
- package/lib/components/DataQualityValidationDetailPanel.js +2 -3
- package/lib/components/DataQualityValidationDetailPanel.js.map +1 -1
- package/lib/components/states/ConstraintState.d.ts +0 -1
- package/lib/components/states/ConstraintState.d.ts.map +1 -1
- package/lib/components/states/ConstraintState.js +0 -1
- package/lib/components/states/ConstraintState.js.map +1 -1
- package/lib/components/states/DataQualityRelationValidationState.d.ts +1 -3
- package/lib/components/states/DataQualityRelationValidationState.d.ts.map +1 -1
- package/lib/components/states/DataQualityRelationValidationState.js +1 -35
- package/lib/components/states/DataQualityRelationValidationState.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +0 -1
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +0 -2
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +0 -1
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -1
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +0 -5
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +0 -1
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.d.ts +0 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.js +0 -2
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.js +0 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.js +0 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/package.json +7 -7
- package/src/__lib__/studio/DSL_DataQuality_LegendStudioApplicationNavigationContext.ts +0 -1
- package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +0 -1
- package/src/components/DataQualityRelationValidationEditor.tsx +4 -40
- package/src/components/DataQualityValidationDetailPanel.tsx +1 -25
- package/src/components/states/ConstraintState.ts +0 -1
- package/src/components/states/DataQualityRelationValidationState.ts +2 -31
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +0 -2
- package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +0 -11
- package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +0 -1
- package/src/graph-manager/protocol/pure/v1/V1_DataQualityValidationConfiguration.ts +0 -2
- package/src/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationBuilderHelper.ts +0 -7
- package/src/graph-manager/protocol/pure/v1/transformation/V1_DSL_DataQuality_ValueSpecificationTransformer.ts +0 -3
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +1 -1
- package/tsconfig.json +0 -1
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.d.ts +0 -32
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.d.ts.map +0 -1
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.js +0 -80
- package/lib/components/states/DataQualityRelationValidationLambdaEditorState.js.map +0 -1
- package/src/components/states/DataQualityRelationValidationLambdaEditorState.ts +0 -141
@@ -1,141 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import type { DataQualityRelationValidation } from '../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
17
|
-
import type { EditorStore } from '@finos/legend-application-studio';
|
18
|
-
import { makeObservable, observable } from 'mobx';
|
19
|
-
import {
|
20
|
-
type GeneratorFn,
|
21
|
-
assertErrorThrown,
|
22
|
-
hashArray,
|
23
|
-
LogEvent,
|
24
|
-
} from '@finos/legend-shared';
|
25
|
-
import {
|
26
|
-
type RawLambda,
|
27
|
-
buildSourceInformationSourceId,
|
28
|
-
GRAPH_MANAGER_EVENT,
|
29
|
-
isStubbed_RawLambda,
|
30
|
-
ParserError,
|
31
|
-
stub_RawLambda,
|
32
|
-
} from '@finos/legend-graph';
|
33
|
-
import { LambdaEditorState } from '@finos/legend-query-builder';
|
34
|
-
import { VALIDATION_ROW_MAP_ID_LABEL } from './ConstraintState.js';
|
35
|
-
import { dataQualityRelationValidation_setRowMapFunction } from '../../graph-manager/DSL_DataQuality_GraphModifierHelper.js';
|
36
|
-
import { DATA_QUALITY_HASH_STRUCTURE } from '../../graph/metamodel/DSL_DataQuality_HashUtils.js';
|
37
|
-
|
38
|
-
export class DataQualityRelationValidationLambdaEditorState extends LambdaEditorState {
|
39
|
-
relationValidation: DataQualityRelationValidation;
|
40
|
-
editorStore: EditorStore;
|
41
|
-
constructor(
|
42
|
-
relationValidation: DataQualityRelationValidation,
|
43
|
-
editorStore: EditorStore,
|
44
|
-
) {
|
45
|
-
super('', '|');
|
46
|
-
|
47
|
-
makeObservable(this, {
|
48
|
-
relationValidation: observable,
|
49
|
-
editorStore: observable,
|
50
|
-
});
|
51
|
-
|
52
|
-
this.relationValidation = relationValidation;
|
53
|
-
this.editorStore = editorStore;
|
54
|
-
}
|
55
|
-
|
56
|
-
get lambdaId(): string {
|
57
|
-
return buildSourceInformationSourceId([
|
58
|
-
VALIDATION_ROW_MAP_ID_LABEL,
|
59
|
-
this.relationValidation.name,
|
60
|
-
this.uuid, // in case of duplications
|
61
|
-
]);
|
62
|
-
}
|
63
|
-
|
64
|
-
*convertLambdaGrammarStringToObject(): GeneratorFn<void> {
|
65
|
-
const emptyFunctionDefinition = stub_RawLambda();
|
66
|
-
if (this.lambdaString) {
|
67
|
-
try {
|
68
|
-
const lambda =
|
69
|
-
(yield this.editorStore.graphManagerState.graphManager.pureCodeToLambda(
|
70
|
-
this.fullLambdaString,
|
71
|
-
this.lambdaId,
|
72
|
-
)) as RawLambda;
|
73
|
-
this.setParserError(undefined);
|
74
|
-
dataQualityRelationValidation_setRowMapFunction(
|
75
|
-
this.relationValidation,
|
76
|
-
lambda,
|
77
|
-
);
|
78
|
-
} catch (error) {
|
79
|
-
assertErrorThrown(error);
|
80
|
-
if (error instanceof ParserError) {
|
81
|
-
this.setParserError(error);
|
82
|
-
}
|
83
|
-
this.editorStore.applicationStore.logService.error(
|
84
|
-
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
85
|
-
error,
|
86
|
-
);
|
87
|
-
}
|
88
|
-
} else {
|
89
|
-
this.clearErrors();
|
90
|
-
dataQualityRelationValidation_setRowMapFunction(
|
91
|
-
this.relationValidation,
|
92
|
-
emptyFunctionDefinition,
|
93
|
-
);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
*convertLambdaObjectToGrammarString(options?: {
|
98
|
-
pretty?: boolean | undefined;
|
99
|
-
preserveCompilationError?: boolean | undefined;
|
100
|
-
}): GeneratorFn<void> {
|
101
|
-
if (
|
102
|
-
this.relationValidation.rowMapFunction &&
|
103
|
-
!isStubbed_RawLambda(this.relationValidation.rowMapFunction)
|
104
|
-
) {
|
105
|
-
try {
|
106
|
-
const lambdas = new Map<string, RawLambda>();
|
107
|
-
lambdas.set(this.lambdaId, this.relationValidation.rowMapFunction);
|
108
|
-
const isolatedLambdas =
|
109
|
-
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
110
|
-
lambdas,
|
111
|
-
options?.pretty,
|
112
|
-
)) as Map<string, string>;
|
113
|
-
const grammarText = isolatedLambdas.get(this.lambdaId);
|
114
|
-
this.setLambdaString(
|
115
|
-
grammarText !== undefined
|
116
|
-
? this.extractLambdaString(grammarText)
|
117
|
-
: '',
|
118
|
-
);
|
119
|
-
this.clearErrors({
|
120
|
-
preserveCompilationError: options?.preserveCompilationError,
|
121
|
-
});
|
122
|
-
} catch (error) {
|
123
|
-
assertErrorThrown(error);
|
124
|
-
this.editorStore.applicationStore.logService.error(
|
125
|
-
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
126
|
-
error,
|
127
|
-
);
|
128
|
-
}
|
129
|
-
} else {
|
130
|
-
this.clearErrors();
|
131
|
-
this.setLambdaString('');
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
get hashCode(): string {
|
136
|
-
return hashArray([
|
137
|
-
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION,
|
138
|
-
this.lambdaString,
|
139
|
-
]);
|
140
|
-
}
|
141
|
-
}
|