@finos/legend-query-builder 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts +1 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +11 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js +104 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +1 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +8 -26
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +1 -0
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +60 -12
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +1 -0
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +3 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +6 -14
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +1 -0
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -0
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +12 -18
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +3 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.js → QueryBuilderOLAPGroupByPanel.js} +2 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +9 -11
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -0
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +1 -0
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -0
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +36 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +50 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +9 -11
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/QueryBuilderConfig.d.ts +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +1 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +43 -0
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderConstantsState.js +116 -0
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -0
- package/lib/stores/QueryBuilderParametersState.d.ts +0 -4
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +0 -1
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +3 -10
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +6 -140
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +9 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +19 -4
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +50 -42
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +23 -25
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +4 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +6 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +20 -20
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +58 -2
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +13 -13
- package/src/components/QueryBuilder.tsx +38 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +284 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +22 -103
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
- package/src/components/QueryBuilderSideBar.tsx +5 -22
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
- package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
- package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +186 -0
- package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
- package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
- package/src/stores/QueryBuilderConfig.ts +1 -0
- package/src/stores/QueryBuilderConstantsState.ts +173 -0
- package/src/stores/QueryBuilderParametersState.ts +0 -6
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
- package/src/stores/QueryBuilderState.ts +25 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +34 -51
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +10 -29
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
- package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +55 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
- package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
- package/tsconfig.json +14 -6
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
@@ -15,6 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import {
|
18
|
+
type LambdaFunction,
|
18
19
|
GraphFetchTreeInstanceValue,
|
19
20
|
matchFunctionName,
|
20
21
|
RootGraphFetchTree,
|
@@ -31,6 +32,7 @@ import { buildGraphFetchTreeData } from './QueryBuilderGraphFetchTreeUtil.js';
|
|
31
32
|
export const processGraphFetchExpression = (
|
32
33
|
expression: SimpleFunctionExpression,
|
33
34
|
queryBuilderState: QueryBuilderState,
|
35
|
+
parentLambda: LambdaFunction,
|
34
36
|
): void => {
|
35
37
|
const functionName = expression.functionName;
|
36
38
|
|
@@ -55,6 +57,7 @@ export const processGraphFetchExpression = (
|
|
55
57
|
);
|
56
58
|
QueryBuilderValueSpecificationProcessor.process(
|
57
59
|
precedingExpression,
|
60
|
+
parentLambda,
|
58
61
|
queryBuilderState,
|
59
62
|
);
|
60
63
|
|
@@ -77,6 +80,7 @@ export const processGraphFetchExpression = (
|
|
77
80
|
export const processGraphFetchSerializeExpression = (
|
78
81
|
expression: SimpleFunctionExpression,
|
79
82
|
queryBuilderState: QueryBuilderState,
|
83
|
+
parentLambda: LambdaFunction,
|
80
84
|
): void => {
|
81
85
|
// update fetch-structure
|
82
86
|
queryBuilderState.fetchStructureState.changeImplementation(
|
@@ -104,6 +108,7 @@ export const processGraphFetchSerializeExpression = (
|
|
104
108
|
);
|
105
109
|
QueryBuilderValueSpecificationProcessor.process(
|
106
110
|
precedingExpression,
|
111
|
+
parentLambda,
|
107
112
|
queryBuilderState,
|
108
113
|
);
|
109
114
|
|
@@ -91,9 +91,9 @@ import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecifi
|
|
91
91
|
import { appendProjection } from './projection/QueryBuilderProjectionValueSpecificationBuilder.js';
|
92
92
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
93
93
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
94
|
-
import { QueryBuilderOLAPGroupByState } from './olapGroupBy/
|
94
|
+
import { QueryBuilderOLAPGroupByState } from './olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
95
95
|
import type { QueryBuilderTDS_OLAPOperator } from './olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js';
|
96
|
-
import { getQueryBuilderCoreOLAPGroupByOperators } from './olapGroupBy/
|
96
|
+
import { getQueryBuilderCoreOLAPGroupByOperators } from './olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js';
|
97
97
|
import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
|
98
98
|
|
99
99
|
export class QueryBuilderTDSState
|
@@ -15,6 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import {
|
18
|
+
type LambdaFunction,
|
18
19
|
CollectionInstanceValue,
|
19
20
|
LambdaFunctionInstanceValue,
|
20
21
|
matchFunctionName,
|
@@ -41,6 +42,7 @@ export const processTDSAggregateExpression = (
|
|
41
42
|
expression: SimpleFunctionExpression,
|
42
43
|
parentExpression: SimpleFunctionExpression | undefined,
|
43
44
|
queryBuilderState: QueryBuilderState,
|
45
|
+
parentLambda: LambdaFunction,
|
44
46
|
): void => {
|
45
47
|
// check parent expression
|
46
48
|
assertTrue(
|
@@ -65,6 +67,7 @@ export const processTDSAggregateExpression = (
|
|
65
67
|
// TODO?: do we want to do more validation here for the shape of the column lambda?
|
66
68
|
guaranteeNonNullable(expression.parametersValues[0]),
|
67
69
|
expression,
|
70
|
+
parentLambda,
|
68
71
|
queryBuilderState,
|
69
72
|
);
|
70
73
|
|
@@ -137,6 +140,7 @@ export const processTDSAggregateExpression = (
|
|
137
140
|
export const processTDSGroupByExpression = (
|
138
141
|
expression: SimpleFunctionExpression,
|
139
142
|
queryBuilderState: QueryBuilderState,
|
143
|
+
parentLambda: LambdaFunction,
|
140
144
|
): void => {
|
141
145
|
// update fetch-structureTABULAR_DATA_STRUCTURE
|
142
146
|
queryBuilderState.fetchStructureState.changeImplementation(
|
@@ -164,6 +168,7 @@ export const processTDSGroupByExpression = (
|
|
164
168
|
);
|
165
169
|
QueryBuilderValueSpecificationProcessor.process(
|
166
170
|
precedingExpression,
|
171
|
+
parentLambda,
|
167
172
|
queryBuilderState,
|
168
173
|
);
|
169
174
|
|
@@ -178,6 +183,7 @@ export const processTDSGroupByExpression = (
|
|
178
183
|
QueryBuilderValueSpecificationProcessor.processChild(
|
179
184
|
value,
|
180
185
|
expression,
|
186
|
+
parentLambda,
|
181
187
|
queryBuilderState,
|
182
188
|
),
|
183
189
|
);
|
@@ -193,6 +199,7 @@ export const processTDSGroupByExpression = (
|
|
193
199
|
QueryBuilderValueSpecificationProcessor.processChild(
|
194
200
|
value,
|
195
201
|
expression,
|
202
|
+
parentLambda,
|
196
203
|
queryBuilderState,
|
197
204
|
),
|
198
205
|
);
|
File without changes
|
File without changes
|
@@ -44,11 +44,12 @@ import {
|
|
44
44
|
QueryBuilderOLAPGroupByColumnState,
|
45
45
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
46
46
|
QueryBuilderTDS_OLAPRankOperatorState,
|
47
|
-
} from './
|
47
|
+
} from './QueryBuilderOLAPGroupByState.js';
|
48
48
|
|
49
49
|
export const processTDS_OLAPGroupByExpression = (
|
50
50
|
expression: SimpleFunctionExpression,
|
51
51
|
queryBuilderState: QueryBuilderState,
|
52
|
+
parentLambda: LambdaFunction,
|
52
53
|
): void => {
|
53
54
|
// check parameters
|
54
55
|
const parametersLength = expression.parametersValues.length;
|
@@ -90,6 +91,7 @@ export const processTDS_OLAPGroupByExpression = (
|
|
90
91
|
);
|
91
92
|
QueryBuilderValueSpecificationProcessor.process(
|
92
93
|
precedingExpression,
|
94
|
+
parentLambda,
|
93
95
|
queryBuilderState,
|
94
96
|
);
|
95
97
|
|
@@ -34,7 +34,7 @@ import {
|
|
34
34
|
type QueryBuilderOLAPGroupByColumnState,
|
35
35
|
type QueryBuilderOLAPGroupByState,
|
36
36
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
37
|
-
} from './
|
37
|
+
} from './QueryBuilderOLAPGroupByState.js';
|
38
38
|
|
39
39
|
const appendOLAPGroupByColumnState = (
|
40
40
|
olapGroupByColumnState: QueryBuilderOLAPGroupByColumnState,
|
package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
import { Multiplicity } from '@finos/legend-graph';
|
18
18
|
import { UnsupportedOperationError } from '@finos/legend-shared';
|
19
19
|
import { QueryBuilderAggregateColumnState } from '../../aggregation/QueryBuilderAggregationState.js';
|
20
|
-
import { QueryBuilderOLAPGroupByColumnState } from '../../olapGroupBy/
|
20
|
+
import { QueryBuilderOLAPGroupByColumnState } from '../../olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
21
21
|
import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
|
22
22
|
import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
|
23
23
|
|
@@ -17,6 +17,7 @@
|
|
17
17
|
import {
|
18
18
|
type INTERNAL__UnknownValueSpecification,
|
19
19
|
type ValueSpecification,
|
20
|
+
type LambdaFunction,
|
20
21
|
AbstractPropertyExpression,
|
21
22
|
CollectionInstanceValue,
|
22
23
|
DerivedProperty,
|
@@ -59,6 +60,7 @@ import {
|
|
59
60
|
export const processTDSProjectExpression = (
|
60
61
|
expression: SimpleFunctionExpression,
|
61
62
|
queryBuilderState: QueryBuilderState,
|
63
|
+
parentLambda: LambdaFunction,
|
62
64
|
): void => {
|
63
65
|
// update fetch-structure
|
64
66
|
queryBuilderState.fetchStructureState.changeImplementation(
|
@@ -87,6 +89,7 @@ export const processTDSProjectExpression = (
|
|
87
89
|
);
|
88
90
|
QueryBuilderValueSpecificationProcessor.process(
|
89
91
|
precedingExpression,
|
92
|
+
parentLambda,
|
90
93
|
queryBuilderState,
|
91
94
|
);
|
92
95
|
|
@@ -101,6 +104,7 @@ export const processTDSProjectExpression = (
|
|
101
104
|
QueryBuilderValueSpecificationProcessor.processChild(
|
102
105
|
value,
|
103
106
|
expression,
|
107
|
+
parentLambda,
|
104
108
|
queryBuilderState,
|
105
109
|
),
|
106
110
|
);
|
@@ -236,6 +240,7 @@ export const processTDSProjectionDerivationExpression = (
|
|
236
240
|
export const processTDSTakeExpression = (
|
237
241
|
expression: SimpleFunctionExpression,
|
238
242
|
queryBuilderState: QueryBuilderState,
|
243
|
+
parentLambda: LambdaFunction,
|
239
244
|
): void => {
|
240
245
|
// check parameters
|
241
246
|
assertTrue(
|
@@ -263,6 +268,7 @@ export const processTDSTakeExpression = (
|
|
263
268
|
);
|
264
269
|
QueryBuilderValueSpecificationProcessor.process(
|
265
270
|
precedingExpression,
|
271
|
+
parentLambda,
|
266
272
|
queryBuilderState,
|
267
273
|
);
|
268
274
|
|
@@ -283,6 +289,7 @@ export const processTDSTakeExpression = (
|
|
283
289
|
export const processTDSDistinctExpression = (
|
284
290
|
expression: SimpleFunctionExpression,
|
285
291
|
queryBuilderState: QueryBuilderState,
|
292
|
+
parentLambda: LambdaFunction,
|
286
293
|
): void => {
|
287
294
|
// check parameters
|
288
295
|
assertTrue(
|
@@ -309,6 +316,7 @@ export const processTDSDistinctExpression = (
|
|
309
316
|
);
|
310
317
|
QueryBuilderValueSpecificationProcessor.process(
|
311
318
|
precedingExpression,
|
319
|
+
parentLambda,
|
312
320
|
queryBuilderState,
|
313
321
|
);
|
314
322
|
|
@@ -326,6 +334,7 @@ export const processTDSDistinctExpression = (
|
|
326
334
|
export const processTDSSortExpression = (
|
327
335
|
expression: SimpleFunctionExpression,
|
328
336
|
queryBuilderState: QueryBuilderState,
|
337
|
+
parentLambda: LambdaFunction,
|
329
338
|
): void => {
|
330
339
|
// check parameters
|
331
340
|
assertTrue(
|
@@ -353,6 +362,7 @@ export const processTDSSortExpression = (
|
|
353
362
|
);
|
354
363
|
QueryBuilderValueSpecificationProcessor.process(
|
355
364
|
precedingExpression,
|
365
|
+
parentLambda,
|
356
366
|
queryBuilderState,
|
357
367
|
);
|
358
368
|
|
@@ -367,6 +377,7 @@ export const processTDSSortExpression = (
|
|
367
377
|
QueryBuilderValueSpecificationProcessor.processChild(
|
368
378
|
value,
|
369
379
|
expression,
|
380
|
+
parentLambda,
|
370
381
|
queryBuilderState,
|
371
382
|
),
|
372
383
|
);
|
package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts
CHANGED
@@ -47,7 +47,7 @@ import {
|
|
47
47
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
|
48
48
|
import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
|
49
49
|
import { buildPropertyExpressionChain } from '../../../QueryBuilderValueSpecificationBuilderHelper.js';
|
50
|
-
import { appendOLAPGroupByState } from '../olapGroupBy/
|
50
|
+
import { appendOLAPGroupByState } from '../olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js';
|
51
51
|
import { appendPostFilter } from '../post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
|
52
52
|
|
53
53
|
const buildSortExpression = (
|
@@ -17,6 +17,7 @@
|
|
17
17
|
import { isNonNullable, guaranteeNonNullable } from '@finos/legend-shared';
|
18
18
|
import {
|
19
19
|
type ValueSpecification,
|
20
|
+
type LambdaFunction,
|
20
21
|
extractElementNameFromPath,
|
21
22
|
SimpleFunctionExpression,
|
22
23
|
} from '@finos/legend-graph';
|
@@ -80,22 +81,25 @@ const buildFilterConditionExpression = (
|
|
80
81
|
|
81
82
|
export const buildFilterExpression = (
|
82
83
|
filterState: QueryBuilderFilterState,
|
83
|
-
|
84
|
-
):
|
84
|
+
lambdaFunction: LambdaFunction,
|
85
|
+
): void => {
|
85
86
|
const filterConditionExpressions = filterState.rootIds
|
86
87
|
.map((e) => guaranteeNonNullable(filterState.nodes.get(e)))
|
87
88
|
.map((e) => buildFilterConditionExpression(filterState, e))
|
88
89
|
.filter(isNonNullable);
|
89
90
|
|
90
91
|
if (!filterConditionExpressions.length) {
|
91
|
-
return
|
92
|
+
return;
|
92
93
|
}
|
93
94
|
// main filter expression
|
94
95
|
const filterExpression = new SimpleFunctionExpression(
|
95
96
|
extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.FILTER),
|
96
97
|
);
|
98
|
+
const currentExpression = guaranteeNonNullable(
|
99
|
+
lambdaFunction.expressionSequence[0],
|
100
|
+
);
|
97
101
|
// param [0]
|
98
|
-
filterExpression.parametersValues.push(
|
102
|
+
filterExpression.parametersValues.push(currentExpression);
|
99
103
|
// param [1]
|
100
104
|
filterExpression.parametersValues.push(
|
101
105
|
buildGenericLambdaFunctionInstanceValue(
|
@@ -104,5 +108,6 @@ export const buildFilterExpression = (
|
|
104
108
|
filterState.queryBuilderState.graphManagerState.graph,
|
105
109
|
),
|
106
110
|
);
|
107
|
-
|
111
|
+
// reprocess filter as main expression
|
112
|
+
lambdaFunction.expressionSequence[0] = filterExpression;
|
108
113
|
};
|
@@ -0,0 +1,165 @@
|
|
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 ValueSpecification,
|
19
|
+
PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
|
20
|
+
BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
|
21
|
+
type SimpleFunctionExpression,
|
22
|
+
AbstractPropertyExpression,
|
23
|
+
MILESTONING_STEREOTYPE,
|
24
|
+
INTERNAL__PropagatedValue,
|
25
|
+
} from '@finos/legend-graph';
|
26
|
+
import {
|
27
|
+
assertTrue,
|
28
|
+
guaranteeNonNullable,
|
29
|
+
guaranteeType,
|
30
|
+
} from '@finos/legend-shared';
|
31
|
+
import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
|
32
|
+
import type { QueryBuilderDerivedPropertyExpressionState } from '../QueryBuilderPropertyEditorState.js';
|
33
|
+
import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
|
34
|
+
|
35
|
+
export class QueryBuilderBitemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
|
36
|
+
getMilestoningDate(index?: number): ValueSpecification | undefined {
|
37
|
+
if (index === 0) {
|
38
|
+
return this.milestoningState.processingDate;
|
39
|
+
} else {
|
40
|
+
return this.milestoningState.businessDate;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
getMilestoningToolTipText(): string {
|
45
|
+
return `Processing Date: ${getParameterValue(
|
46
|
+
this.getMilestoningDate(0),
|
47
|
+
)}, Business Date: ${getParameterValue(this.getMilestoningDate(1))}`;
|
48
|
+
}
|
49
|
+
|
50
|
+
initializeMilestoningParameters(force?: boolean): void {
|
51
|
+
if (!this.milestoningState.processingDate || force) {
|
52
|
+
this.milestoningState.setProcessingDate(
|
53
|
+
this.milestoningState.buildMilestoningParameter(
|
54
|
+
PROCESSING_DATE_MILESTONING_PROPERTY_NAME,
|
55
|
+
),
|
56
|
+
);
|
57
|
+
}
|
58
|
+
if (!this.milestoningState.businessDate || force) {
|
59
|
+
this.milestoningState.setBusinessDate(
|
60
|
+
this.milestoningState.buildMilestoningParameter(
|
61
|
+
BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
|
62
|
+
),
|
63
|
+
);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
processGetAllParamaters(parameterValues: ValueSpecification[]): void {
|
68
|
+
assertTrue(
|
69
|
+
parameterValues.length === 3,
|
70
|
+
`Can't process getAll() expression: when used with a bitemporal milestoned class getAll() expects two parameters`,
|
71
|
+
);
|
72
|
+
this.milestoningState.setProcessingDate(parameterValues[1]);
|
73
|
+
this.milestoningState.setBusinessDate(parameterValues[2]);
|
74
|
+
}
|
75
|
+
|
76
|
+
buildGetAllParameters(getAllFunction: SimpleFunctionExpression): void {
|
77
|
+
getAllFunction.parametersValues.push(
|
78
|
+
guaranteeNonNullable(
|
79
|
+
this.getMilestoningDate(0),
|
80
|
+
`Milestoning class should have a parameter of type 'Date'`,
|
81
|
+
),
|
82
|
+
);
|
83
|
+
getAllFunction.parametersValues.push(
|
84
|
+
guaranteeNonNullable(
|
85
|
+
this.getMilestoningDate(1),
|
86
|
+
`Milestoning class should have a parameter of type 'Date'`,
|
87
|
+
),
|
88
|
+
);
|
89
|
+
}
|
90
|
+
|
91
|
+
generateMilestoningDate(
|
92
|
+
isDatePropagationSupported: boolean,
|
93
|
+
hasDefaultMilestoningDate: boolean,
|
94
|
+
prevPropertyExpression: AbstractPropertyExpression | undefined,
|
95
|
+
temporalSource: MILESTONING_STEREOTYPE | undefined,
|
96
|
+
idx?: number,
|
97
|
+
derivedPropertyExpressionState?: QueryBuilderDerivedPropertyExpressionState,
|
98
|
+
): ValueSpecification {
|
99
|
+
this.initializeMilestoningParameters();
|
100
|
+
if (idx === 0) {
|
101
|
+
if (
|
102
|
+
temporalSource === MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL &&
|
103
|
+
derivedPropertyExpressionState?.parameterValues.length === 1
|
104
|
+
) {
|
105
|
+
return new INTERNAL__PropagatedValue(() =>
|
106
|
+
guaranteeNonNullable(
|
107
|
+
guaranteeType(prevPropertyExpression, AbstractPropertyExpression)
|
108
|
+
.parametersValues[1],
|
109
|
+
),
|
110
|
+
);
|
111
|
+
}
|
112
|
+
let parameter;
|
113
|
+
if (
|
114
|
+
isDatePropagationSupported &&
|
115
|
+
prevPropertyExpression &&
|
116
|
+
!hasDefaultMilestoningDate
|
117
|
+
) {
|
118
|
+
parameter = new INTERNAL__PropagatedValue(() =>
|
119
|
+
guaranteeNonNullable(prevPropertyExpression.parametersValues[1]),
|
120
|
+
);
|
121
|
+
} else {
|
122
|
+
parameter = new INTERNAL__PropagatedValue(() =>
|
123
|
+
guaranteeNonNullable(this.getMilestoningDate(idx)),
|
124
|
+
);
|
125
|
+
parameter.isPropagatedValue = hasDefaultMilestoningDate
|
126
|
+
? false
|
127
|
+
: isDatePropagationSupported;
|
128
|
+
}
|
129
|
+
return parameter;
|
130
|
+
} else {
|
131
|
+
if (
|
132
|
+
temporalSource === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL &&
|
133
|
+
derivedPropertyExpressionState?.parameterValues.length === 1
|
134
|
+
) {
|
135
|
+
return new INTERNAL__PropagatedValue(() =>
|
136
|
+
guaranteeNonNullable(
|
137
|
+
guaranteeType(
|
138
|
+
derivedPropertyExpressionState.propertyExpression
|
139
|
+
.parametersValues[0],
|
140
|
+
AbstractPropertyExpression,
|
141
|
+
).parametersValues[1],
|
142
|
+
),
|
143
|
+
);
|
144
|
+
}
|
145
|
+
let parameter;
|
146
|
+
if (
|
147
|
+
isDatePropagationSupported &&
|
148
|
+
prevPropertyExpression &&
|
149
|
+
!hasDefaultMilestoningDate
|
150
|
+
) {
|
151
|
+
parameter = new INTERNAL__PropagatedValue(() =>
|
152
|
+
guaranteeNonNullable(prevPropertyExpression.parametersValues[2]),
|
153
|
+
);
|
154
|
+
} else {
|
155
|
+
parameter = new INTERNAL__PropagatedValue(() =>
|
156
|
+
guaranteeNonNullable(this.getMilestoningDate(idx)),
|
157
|
+
);
|
158
|
+
parameter.isPropagatedValue = hasDefaultMilestoningDate
|
159
|
+
? false
|
160
|
+
: isDatePropagationSupported;
|
161
|
+
}
|
162
|
+
return parameter;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
@@ -0,0 +1,96 @@
|
|
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 ValueSpecification,
|
19
|
+
BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
|
20
|
+
type SimpleFunctionExpression,
|
21
|
+
type AbstractPropertyExpression,
|
22
|
+
MILESTONING_STEREOTYPE,
|
23
|
+
INTERNAL__PropagatedValue,
|
24
|
+
} from '@finos/legend-graph';
|
25
|
+
import { assertTrue, guaranteeNonNullable } from '@finos/legend-shared';
|
26
|
+
import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
|
27
|
+
import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
|
28
|
+
|
29
|
+
export class QueryBuilderBusinessTemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
|
30
|
+
getMilestoningDate(): ValueSpecification | undefined {
|
31
|
+
return this.milestoningState.businessDate;
|
32
|
+
}
|
33
|
+
|
34
|
+
getMilestoningToolTipText(): string {
|
35
|
+
return `Business Date: ${getParameterValue(this.getMilestoningDate())}`;
|
36
|
+
}
|
37
|
+
|
38
|
+
initializeMilestoningParameters(force?: boolean): void {
|
39
|
+
if (!this.milestoningState.businessDate || force) {
|
40
|
+
this.milestoningState.setBusinessDate(
|
41
|
+
this.milestoningState.buildMilestoningParameter(
|
42
|
+
BUSINESS_DATE_MILESTONING_PROPERTY_NAME,
|
43
|
+
),
|
44
|
+
);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
processGetAllParamaters(parameterValues: ValueSpecification[]): void {
|
49
|
+
assertTrue(
|
50
|
+
parameterValues.length === 2,
|
51
|
+
`Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`,
|
52
|
+
);
|
53
|
+
this.milestoningState.setBusinessDate(parameterValues[1]);
|
54
|
+
}
|
55
|
+
|
56
|
+
buildGetAllParameters(getAllFunction: SimpleFunctionExpression): void {
|
57
|
+
getAllFunction.parametersValues.push(
|
58
|
+
guaranteeNonNullable(
|
59
|
+
this.getMilestoningDate(),
|
60
|
+
`Milestoning class should have a parameter of type 'Date'`,
|
61
|
+
),
|
62
|
+
);
|
63
|
+
}
|
64
|
+
|
65
|
+
generateMilestoningDate(
|
66
|
+
isDatePropagationSupported: boolean,
|
67
|
+
hasDefaultMilestoningDate: boolean,
|
68
|
+
prevPropertyExpression: AbstractPropertyExpression | undefined,
|
69
|
+
temporalSource: MILESTONING_STEREOTYPE | undefined,
|
70
|
+
): ValueSpecification {
|
71
|
+
this.initializeMilestoningParameters();
|
72
|
+
if (
|
73
|
+
isDatePropagationSupported &&
|
74
|
+
prevPropertyExpression &&
|
75
|
+
!hasDefaultMilestoningDate
|
76
|
+
) {
|
77
|
+
if (temporalSource === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
|
78
|
+
return new INTERNAL__PropagatedValue(() =>
|
79
|
+
guaranteeNonNullable(prevPropertyExpression.parametersValues[1]),
|
80
|
+
);
|
81
|
+
} else {
|
82
|
+
return new INTERNAL__PropagatedValue(() =>
|
83
|
+
guaranteeNonNullable(prevPropertyExpression.parametersValues[2]),
|
84
|
+
);
|
85
|
+
}
|
86
|
+
} else {
|
87
|
+
const milestoningDate = new INTERNAL__PropagatedValue(() =>
|
88
|
+
guaranteeNonNullable(this.getMilestoningDate()),
|
89
|
+
);
|
90
|
+
milestoningDate.isPropagatedValue = hasDefaultMilestoningDate
|
91
|
+
? false
|
92
|
+
: isDatePropagationSupported;
|
93
|
+
return milestoningDate;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|