@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
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { SimpleFunctionExpression } from '@finos/legend-graph';
|
16
|
+
import { type LambdaFunction, SimpleFunctionExpression } from '@finos/legend-graph';
|
17
17
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
18
|
-
export declare const processWatermarkExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState) => void;
|
18
|
+
export declare const processWatermarkExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState, parentLambda: LambdaFunction) => void;
|
19
19
|
//# sourceMappingURL=QueryBuilderWatermarkStateBuilder.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,eAAO,MAAM,0BAA0B,eACzB,wBAAwB,qBACjB,iBAAiB,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,cAAc,EACnB,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,eAAO,MAAM,0BAA0B,eACzB,wBAAwB,qBACjB,iBAAiB,gBACtB,cAAc,KAC3B,IAsBF,CAAC"}
|
@@ -17,13 +17,13 @@ import { SimpleFunctionExpression, matchFunctionName, } from '@finos/legend-grap
|
|
17
17
|
import { assertTrue, guaranteeType } from '@finos/legend-shared';
|
18
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graphManager/QueryBuilderSupportedFunctions.js';
|
19
19
|
import { QueryBuilderValueSpecificationProcessor } from '../QueryBuilderStateBuilder.js';
|
20
|
-
export const processWatermarkExpression = (expression, queryBuilderState) => {
|
20
|
+
export const processWatermarkExpression = (expression, queryBuilderState, parentLambda) => {
|
21
21
|
// check preceding expression
|
22
22
|
const precedingExpression = guaranteeType(expression.parametersValues[0], SimpleFunctionExpression, `Can't process forWatermark() expression: only support forWatermark() immediately following an expression`);
|
23
23
|
assertTrue(matchFunctionName(precedingExpression.functionName, [
|
24
24
|
QUERY_BUILDER_SUPPORTED_FUNCTIONS.GET_ALL,
|
25
25
|
]), `Can't process forWatermark() expression: only support forWatermark() immediately following getAll()`);
|
26
|
-
QueryBuilderValueSpecificationProcessor.process(precedingExpression, queryBuilderState);
|
26
|
+
QueryBuilderValueSpecificationProcessor.process(precedingExpression, parentLambda, queryBuilderState);
|
27
27
|
const watermarkValue = expression.parametersValues[1];
|
28
28
|
queryBuilderState.watermarkState.setValue(watermarkValue);
|
29
29
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkStateBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sDAAsD,CAAC;AAEzG,OAAO,EAAE,uCAAuC,EAAE,MAAM,gCAAgC,CAAC;AAEzF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,UAAoC,EACpC,iBAAoC,EACpC,YAA4B,EACtB,EAAE;IACR,6BAA6B;IAC7B,MAAM,mBAAmB,GAAG,aAAa,CACvC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAC9B,wBAAwB,EACxB,0GAA0G,CAC3G,CAAC;IACF,UAAU,CACR,iBAAiB,CAAC,mBAAmB,CAAC,YAAY,EAAE;QAClD,iCAAiC,CAAC,OAAO;KAC1C,CAAC,EACF,qGAAqG,CACtG,CAAC;IAEF,uCAAuC,CAAC,OAAO,CAC7C,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,CAClB,CAAC;IAEF,MAAM,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACtD,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC5D,CAAC,CAAC"}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import {
|
16
|
+
import { type LambdaFunction } from '@finos/legend-graph';
|
17
17
|
import type { QueryBuilderWatermarkState } from './QueryBuilderWatermarkState.js';
|
18
|
-
export declare const buildWatermarkExpression: (watermarkState: QueryBuilderWatermarkState,
|
18
|
+
export declare const buildWatermarkExpression: (watermarkState: QueryBuilderWatermarkState, lambdaFunction: LambdaFunction) => void;
|
19
19
|
//# sourceMappingURL=QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,eAAO,MAAM,wBAAwB,mBACnB,0BAA0B,kBAC1B,cAAc,KAC7B,IAqBF,CAAC"}
|
@@ -14,17 +14,20 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { SimpleFunctionExpression, extractElementNameFromPath, } from '@finos/legend-graph';
|
17
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
17
18
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graphManager/QueryBuilderSupportedFunctions.js';
|
18
|
-
export const buildWatermarkExpression = (watermarkState,
|
19
|
+
export const buildWatermarkExpression = (watermarkState, lambdaFunction) => {
|
19
20
|
if (!watermarkState.value) {
|
20
|
-
return
|
21
|
+
return;
|
21
22
|
}
|
23
|
+
const currentExpression = guaranteeNonNullable(lambdaFunction.expressionSequence[0]);
|
22
24
|
// main filter expression
|
23
25
|
const watermarkExpression = new SimpleFunctionExpression(extractElementNameFromPath(QUERY_BUILDER_SUPPORTED_FUNCTIONS.WATERMARK));
|
24
26
|
// param [0]
|
25
|
-
watermarkExpression.parametersValues.push(
|
27
|
+
watermarkExpression.parametersValues.push(currentExpression);
|
26
28
|
// param [1]
|
27
29
|
watermarkExpression.parametersValues.push(watermarkState.value);
|
28
|
-
|
30
|
+
// replace watermark as main expression
|
31
|
+
lambdaFunction.expressionSequence[0] = watermarkExpression;
|
29
32
|
};
|
30
33
|
//# sourceMappingURL=QueryBuilderWatermarkValueSpecificationBuilder.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,0BAA0B,
|
1
|
+
{"version":3,"file":"QueryBuilderWatermarkValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAE3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,sDAAsD,CAAC;AAGzG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,cAA0C,EAC1C,cAA8B,EACxB,EAAE;IACR,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;QACzB,OAAO;KACR;IACD,MAAM,iBAAiB,GAAG,oBAAoB,CAC5C,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACrC,CAAC;IAEF,yBAAyB;IACzB,MAAM,mBAAmB,GAAG,IAAI,wBAAwB,CACtD,0BAA0B,CAAC,iCAAiC,CAAC,SAAS,CAAC,CACxE,CAAC;IAEF,YAAY;IACZ,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAE7D,YAAY;IACZ,mBAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAEhE,uCAAuC;IACvC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC;AAC7D,CAAC,CAAC"}
|
@@ -86,7 +86,7 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
86
86
|
*/
|
87
87
|
propagateExecutionContextChange(executionContext) {
|
88
88
|
const mapping = executionContext.mapping;
|
89
|
-
this.changeMapping(mapping);
|
89
|
+
this.changeMapping(mapping, { keepQueryContent: true });
|
90
90
|
this.changeRuntime(executionContext.runtimeValue);
|
91
91
|
const compatibleClasses = getMappingCompatibleClasses(mapping, this.graphManagerState.usableClasses);
|
92
92
|
// if there is no chosen class or the chosen one is not compatible
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AA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;IAED,IAAa,iBAAiB;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,+BAA+B,CAC7B,gBAAyC;QAEzC,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAQ5D,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IACpD,OAAO,CAAU;IACjB,cAAc,CAAwB;IACtC,iBAAiB,GAA8B,EAAE,CAAC;IAClD,eAAe,CAAwC;IACvD,wBAAwB,CAEnB;IAEL,oCAAoC,GAAG,GAAoB,EAAE,CACpE,0CAA0C,CAAC,IAAI,CAAC,CAAC;IAEnD,wBAAwB,CAAuC;IAE/D,YACE,gBAA+C,EAC/C,iBAAoC,EACpC,OAAgB,EAChB,cAAqC,EACrC,mBAAwC,EACxC,eAAsD,EACtD,wBAEa;QAEb,KAAK,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QAE3C,cAAc,CAAC,IAAI,EAAE;YACnB,wBAAwB,EAAE,UAAU;YACpC,2BAA2B,EAAE,MAAM;SACpC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,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"version": "0.5.0",
|
4
4
|
"description": "Legend query builder core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -44,17 +44,17 @@
|
|
44
44
|
"@ag-grid-community/client-side-row-model": "28.2.1",
|
45
45
|
"@ag-grid-community/core": "28.2.1",
|
46
46
|
"@ag-grid-community/react": "28.2.1",
|
47
|
-
"@finos/legend-application": "10.0.
|
48
|
-
"@finos/legend-art": "5.0.
|
49
|
-
"@finos/legend-graph": "20.0
|
50
|
-
"@finos/legend-server-depot": "4.1.
|
51
|
-
"@finos/legend-shared": "6.2.
|
52
|
-
"@finos/legend-storage": "3.0.
|
47
|
+
"@finos/legend-application": "10.0.9",
|
48
|
+
"@finos/legend-art": "5.0.6",
|
49
|
+
"@finos/legend-graph": "20.1.0",
|
50
|
+
"@finos/legend-server-depot": "4.1.7",
|
51
|
+
"@finos/legend-shared": "6.2.3",
|
52
|
+
"@finos/legend-storage": "3.0.18",
|
53
53
|
"@testing-library/react": "13.4.0",
|
54
54
|
"@types/papaparse": "5.3.5",
|
55
55
|
"@types/react": "18.0.25",
|
56
|
-
"@types/react-dom": "18.0.
|
57
|
-
"mobx": "6.
|
56
|
+
"@types/react-dom": "18.0.9",
|
57
|
+
"mobx": "6.7.0",
|
58
58
|
"mobx-react-lite": "3.4.0",
|
59
59
|
"monaco-editor": "0.34.1",
|
60
60
|
"papaparse": "5.3.2",
|
@@ -64,14 +64,14 @@
|
|
64
64
|
"serializr": "3.0.1"
|
65
65
|
},
|
66
66
|
"devDependencies": {
|
67
|
-
"@finos/legend-dev-utils": "2.0.
|
68
|
-
"@jest/globals": "29.3.
|
67
|
+
"@finos/legend-dev-utils": "2.0.26",
|
68
|
+
"@jest/globals": "29.3.1",
|
69
69
|
"cross-env": "7.0.3",
|
70
70
|
"eslint": "8.27.0",
|
71
|
-
"jest": "29.3.
|
71
|
+
"jest": "29.3.1",
|
72
72
|
"npm-run-all": "4.1.5",
|
73
73
|
"rimraf": "3.0.2",
|
74
|
-
"sass": "1.56.
|
74
|
+
"sass": "1.56.1",
|
75
75
|
"typescript": "4.8.4"
|
76
76
|
},
|
77
77
|
"peerDependencies": {
|
@@ -56,6 +56,7 @@ import { guaranteeType } from '@finos/legend-shared';
|
|
56
56
|
import { QueryBuilderGraphFetchTreeState } from '../stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js';
|
57
57
|
import { QueryBuilderPostTDSPanel } from './fetch-structure/QueryBuilderPostTDSPanel.js';
|
58
58
|
import { QueryBuilderWatermarkEditor } from './watermark/QueryBuilderWatermark.js';
|
59
|
+
import { QueryBuilderConstantExpressionPanel } from './QueryBuilderConstantExpressionPanel.js';
|
59
60
|
|
60
61
|
export const QUERY_BUILDER_BACKDROP_CONTAINER_ID =
|
61
62
|
'query-builder.backdrop-container';
|
@@ -187,6 +188,11 @@ export const QueryBuilder = observer(
|
|
187
188
|
!queryBuilderState.showParametersPanel,
|
188
189
|
);
|
189
190
|
};
|
191
|
+
const toggleConstantPanel = (): void => {
|
192
|
+
queryBuilderState.constantState.setShowConstantPanel(
|
193
|
+
!queryBuilderState.constantState.showConstantPanel,
|
194
|
+
);
|
195
|
+
};
|
190
196
|
const toggleShowFilterPanel = (): void => {
|
191
197
|
queryBuilderState.filterState.setShowPanel(
|
192
198
|
!queryBuilderState.filterState.showPanel,
|
@@ -305,6 +311,27 @@ export const QueryBuilder = observer(
|
|
305
311
|
</MenuContentItemLabel>
|
306
312
|
</MenuContentItem>
|
307
313
|
)}
|
314
|
+
{
|
315
|
+
<MenuContentItem
|
316
|
+
onClick={toggleConstantPanel}
|
317
|
+
disabled={
|
318
|
+
!queryBuilderState.isQuerySupported ||
|
319
|
+
queryBuilderState.constantState.constants.length >
|
320
|
+
0
|
321
|
+
}
|
322
|
+
>
|
323
|
+
<MenuContentItemIcon>
|
324
|
+
{queryBuilderState.constantState
|
325
|
+
.showConstantPanel ? (
|
326
|
+
<CheckIcon />
|
327
|
+
) : null}
|
328
|
+
</MenuContentItemIcon>
|
329
|
+
<MenuContentItemLabel className="query-builder__sub-header__menu-content">
|
330
|
+
Show Constant(s)
|
331
|
+
</MenuContentItemLabel>
|
332
|
+
</MenuContentItem>
|
333
|
+
}
|
334
|
+
|
308
335
|
<MenuContentItem
|
309
336
|
onClick={toggleShowFilterPanel}
|
310
337
|
disabled={
|
@@ -441,6 +468,17 @@ export const QueryBuilder = observer(
|
|
441
468
|
/>
|
442
469
|
</ResizablePanel>
|
443
470
|
)}
|
471
|
+
{/* constants panel */}
|
472
|
+
{queryBuilderState.constantState
|
473
|
+
.showConstantPanel && <ResizablePanelSplitter />}
|
474
|
+
{queryBuilderState.constantState
|
475
|
+
.showConstantPanel && (
|
476
|
+
<ResizablePanel minSize={40} direction={-1}>
|
477
|
+
<QueryBuilderConstantExpressionPanel
|
478
|
+
queryBuilderState={queryBuilderState}
|
479
|
+
/>
|
480
|
+
</ResizablePanel>
|
481
|
+
)}
|
444
482
|
</ResizablePanelGroup>
|
445
483
|
</QueryBuilderSidebar>
|
446
484
|
</ResizablePanel>
|
@@ -0,0 +1,284 @@
|
|
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 PackageableElementOption,
|
19
|
+
buildElementOption,
|
20
|
+
getPackageableElementOptionFormatter,
|
21
|
+
} from '@finos/legend-application';
|
22
|
+
import {
|
23
|
+
BlankPanelPlaceholder,
|
24
|
+
CustomSelectorInput,
|
25
|
+
Dialog,
|
26
|
+
InfoCircleIcon,
|
27
|
+
Modal,
|
28
|
+
ModalBody,
|
29
|
+
ModalFooter,
|
30
|
+
ModalHeader,
|
31
|
+
PanelFormSection,
|
32
|
+
PanelFormTextField,
|
33
|
+
PlusIcon,
|
34
|
+
} from '@finos/legend-art';
|
35
|
+
import {
|
36
|
+
type Type,
|
37
|
+
type ValueSpecification,
|
38
|
+
PrimitiveType,
|
39
|
+
VariableExpression,
|
40
|
+
Multiplicity,
|
41
|
+
} from '@finos/legend-graph';
|
42
|
+
import { generateEnumerableNameFromToken } from '@finos/legend-shared';
|
43
|
+
import { observer } from 'mobx-react-lite';
|
44
|
+
import { DEFAULT_CONSTANT_VARIABLE_NAME } from '../stores/QueryBuilderConfig.js';
|
45
|
+
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
46
|
+
import { QueryBuilderConstantExpressionState } from '../stores/QueryBuilderConstantsState.js';
|
47
|
+
import { buildDefaultInstanceValue } from '../stores/shared/ValueSpecificationEditorHelper.js';
|
48
|
+
import { variableExpression_setName } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
49
|
+
import { BasicValueSpecificationEditor } from './shared/BasicValueSpecificationEditor.js';
|
50
|
+
import { VariableViewer } from './shared/QueryBuilderVariableSelector.js';
|
51
|
+
|
52
|
+
// Note: We currently only allow constant variables for primitive types of multiplicity ONE.
|
53
|
+
// This is why we don't show multiplicity in the editor.
|
54
|
+
const QueryBuilderConstantExpressionEditor = observer(
|
55
|
+
(props: { constantState: QueryBuilderConstantExpressionState }) => {
|
56
|
+
const { constantState } = props;
|
57
|
+
const queryBuilderState = constantState.queryBuilderState;
|
58
|
+
const applicationStore = queryBuilderState.applicationStore;
|
59
|
+
const variableState = queryBuilderState.constantState;
|
60
|
+
const varExpression = constantState.variable;
|
61
|
+
const variableName = varExpression.name;
|
62
|
+
const allVariableNames = queryBuilderState.allVariableNames;
|
63
|
+
const isCreating = !variableState.constants.includes(constantState);
|
64
|
+
const valueSpec = constantState.value;
|
65
|
+
const variableType =
|
66
|
+
constantState.value.genericType?.value.rawType ?? PrimitiveType.STRING;
|
67
|
+
const selectedType = buildElementOption(variableType);
|
68
|
+
const close = (): void => {
|
69
|
+
variableState.setSelectedConstant(undefined);
|
70
|
+
};
|
71
|
+
const changeType = (val: PackageableElementOption<Type>): void => {
|
72
|
+
if (variableType !== val.value) {
|
73
|
+
constantState.changeValSpecType(val.value);
|
74
|
+
}
|
75
|
+
};
|
76
|
+
const typeOptions: PackageableElementOption<Type>[] =
|
77
|
+
queryBuilderState.graphManagerState.graph.primitiveTypes
|
78
|
+
.map(buildElementOption)
|
79
|
+
.concat(
|
80
|
+
queryBuilderState.graphManagerState.graph.enumerations.map(
|
81
|
+
buildElementOption,
|
82
|
+
),
|
83
|
+
);
|
84
|
+
const validationMessage = !variableName
|
85
|
+
? `Constant Name can't be empty`
|
86
|
+
: allVariableNames.filter((e) => e === variableName).length >
|
87
|
+
(isCreating ? 0 : 1)
|
88
|
+
? 'Constant Name Already Exists'
|
89
|
+
: undefined;
|
90
|
+
const onAction = (): void => {
|
91
|
+
if (isCreating) {
|
92
|
+
variableState.addConstant(constantState);
|
93
|
+
}
|
94
|
+
close();
|
95
|
+
};
|
96
|
+
const resetConstantValue = (): void => {
|
97
|
+
const valSpec = buildDefaultInstanceValue(
|
98
|
+
queryBuilderState.graphManagerState.graph,
|
99
|
+
variableType,
|
100
|
+
);
|
101
|
+
constantState.setValueSpec(valSpec);
|
102
|
+
};
|
103
|
+
|
104
|
+
return (
|
105
|
+
<Dialog
|
106
|
+
open={Boolean(constantState)}
|
107
|
+
onClose={close}
|
108
|
+
classes={{
|
109
|
+
root: 'editor-modal__root-container',
|
110
|
+
container: 'editor-modal__container',
|
111
|
+
paper: 'editor-modal__content',
|
112
|
+
}}
|
113
|
+
>
|
114
|
+
<Modal
|
115
|
+
darkMode={true}
|
116
|
+
className="editor-modal query-builder__variables__modal"
|
117
|
+
>
|
118
|
+
<ModalHeader
|
119
|
+
title={`${isCreating ? 'Create Constant' : 'Update Constant'}`}
|
120
|
+
/>
|
121
|
+
<ModalBody className="query-builder__variables__modal__body">
|
122
|
+
<PanelFormTextField
|
123
|
+
name="Constant Name"
|
124
|
+
prompt="Name of constant. Should be descriptive of its purpose."
|
125
|
+
update={(value: string | undefined): void =>
|
126
|
+
variableExpression_setName(varExpression, value ?? '')
|
127
|
+
}
|
128
|
+
value={varExpression.name}
|
129
|
+
errorMessage={validationMessage}
|
130
|
+
isReadOnly={false}
|
131
|
+
/>
|
132
|
+
<PanelFormSection>
|
133
|
+
<div className="panel__content__form__section__header__label">
|
134
|
+
Type
|
135
|
+
</div>
|
136
|
+
<div className="panel__content__form__section__header__prompt">
|
137
|
+
Data type of the parameter.
|
138
|
+
</div>
|
139
|
+
<CustomSelectorInput
|
140
|
+
placeholder="Choose a type..."
|
141
|
+
options={typeOptions}
|
142
|
+
onChange={changeType}
|
143
|
+
value={selectedType}
|
144
|
+
darkMode={!applicationStore.TEMPORARY__isLightThemeEnabled}
|
145
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
146
|
+
darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
|
147
|
+
})}
|
148
|
+
/>
|
149
|
+
</PanelFormSection>
|
150
|
+
<PanelFormSection>
|
151
|
+
<div className="panel__content__form__section__header__label">
|
152
|
+
Value
|
153
|
+
</div>
|
154
|
+
<div className="query-builder__variable-editor">
|
155
|
+
<BasicValueSpecificationEditor
|
156
|
+
valueSpecification={valueSpec}
|
157
|
+
setValueSpecification={(val: ValueSpecification): void => {
|
158
|
+
constantState.setValueSpec(val);
|
159
|
+
}}
|
160
|
+
graph={queryBuilderState.graphManagerState.graph}
|
161
|
+
obseverContext={queryBuilderState.observableContext}
|
162
|
+
typeCheckOption={{
|
163
|
+
expectedType: variableType,
|
164
|
+
match: variableType === PrimitiveType.DATETIME,
|
165
|
+
}}
|
166
|
+
resetValue={resetConstantValue}
|
167
|
+
/>
|
168
|
+
</div>
|
169
|
+
</PanelFormSection>
|
170
|
+
</ModalBody>
|
171
|
+
<ModalFooter>
|
172
|
+
{isCreating && (
|
173
|
+
<button
|
174
|
+
className="btn modal__footer__close-btn btn--dark"
|
175
|
+
onClick={onAction}
|
176
|
+
disabled={Boolean(validationMessage)}
|
177
|
+
>
|
178
|
+
Create
|
179
|
+
</button>
|
180
|
+
)}
|
181
|
+
<button className="btn modal__footer__close-btn" onClick={close}>
|
182
|
+
Close
|
183
|
+
</button>
|
184
|
+
</ModalFooter>
|
185
|
+
</Modal>
|
186
|
+
</Dialog>
|
187
|
+
);
|
188
|
+
},
|
189
|
+
);
|
190
|
+
|
191
|
+
export const QueryBuilderConstantExpressionPanel = observer(
|
192
|
+
(props: { queryBuilderState: QueryBuilderState }) => {
|
193
|
+
const { queryBuilderState } = props;
|
194
|
+
const constantState = queryBuilderState.constantState;
|
195
|
+
const graph = queryBuilderState.graphManagerState.graph;
|
196
|
+
const isReadOnly = !queryBuilderState.isQuerySupported;
|
197
|
+
const varNames = queryBuilderState.allVariableNames;
|
198
|
+
const addConstant = (): void => {
|
199
|
+
if (!isReadOnly) {
|
200
|
+
const defaultVal = buildDefaultInstanceValue(
|
201
|
+
graph,
|
202
|
+
PrimitiveType.STRING,
|
203
|
+
);
|
204
|
+
const constantName = generateEnumerableNameFromToken(
|
205
|
+
varNames,
|
206
|
+
DEFAULT_CONSTANT_VARIABLE_NAME,
|
207
|
+
);
|
208
|
+
const variableEx = new VariableExpression(
|
209
|
+
constantName,
|
210
|
+
Multiplicity.ONE,
|
211
|
+
);
|
212
|
+
variableEx.genericType = defaultVal.genericType;
|
213
|
+
const constState = new QueryBuilderConstantExpressionState(
|
214
|
+
queryBuilderState,
|
215
|
+
variableEx,
|
216
|
+
defaultVal,
|
217
|
+
);
|
218
|
+
constantState.setSelectedConstant(constState);
|
219
|
+
}
|
220
|
+
};
|
221
|
+
|
222
|
+
return (
|
223
|
+
<div className="panel query-builder__variables">
|
224
|
+
<div className="panel__header">
|
225
|
+
<div className="panel__header__title">
|
226
|
+
<div className="panel__header__title__label">constants</div>
|
227
|
+
<div
|
228
|
+
className="service-editor__pattern__parameters__header__info"
|
229
|
+
title={`Constants are static values set to a variable name that can be leveraged within your query. They remain the same for ALL executions`}
|
230
|
+
>
|
231
|
+
<InfoCircleIcon />
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
{!isReadOnly && (
|
235
|
+
<div className="panel__header__actions">
|
236
|
+
<button
|
237
|
+
className="panel__header__action"
|
238
|
+
tabIndex={-1}
|
239
|
+
onClick={addConstant}
|
240
|
+
title="Add Constant"
|
241
|
+
>
|
242
|
+
<PlusIcon />
|
243
|
+
</button>
|
244
|
+
</div>
|
245
|
+
)}
|
246
|
+
</div>
|
247
|
+
<div className="panel__content query-builder__variables__content">
|
248
|
+
<>
|
249
|
+
{Boolean(queryBuilderState.constantState.constants) &&
|
250
|
+
queryBuilderState.constantState.constants.map((constState) => (
|
251
|
+
<VariableViewer
|
252
|
+
key={constState.uuid}
|
253
|
+
variable={constState.variable}
|
254
|
+
constantValue={constState.value}
|
255
|
+
actions={{
|
256
|
+
editVariable: () =>
|
257
|
+
constantState.setSelectedConstant(constState),
|
258
|
+
deleteVariable: () =>
|
259
|
+
constantState.removeConstant(constState),
|
260
|
+
}}
|
261
|
+
isReadOnly={isReadOnly}
|
262
|
+
/>
|
263
|
+
))}
|
264
|
+
{!constantState.constants.length && (
|
265
|
+
<BlankPanelPlaceholder
|
266
|
+
text="Add a Constants"
|
267
|
+
disabled={isReadOnly}
|
268
|
+
onClick={addConstant}
|
269
|
+
clickActionType="add"
|
270
|
+
previewText="No constants"
|
271
|
+
tooltipText="Click to add a new constant"
|
272
|
+
/>
|
273
|
+
)}
|
274
|
+
</>
|
275
|
+
</div>
|
276
|
+
{constantState.selectedConstant && (
|
277
|
+
<QueryBuilderConstantExpressionEditor
|
278
|
+
constantState={constantState.selectedConstant}
|
279
|
+
/>
|
280
|
+
)}
|
281
|
+
</div>
|
282
|
+
);
|
283
|
+
},
|
284
|
+
);
|
@@ -15,7 +15,6 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import {
|
18
|
-
createPassThroughOnKeyHandler,
|
19
18
|
EDITOR_LANGUAGE,
|
20
19
|
EDITOR_THEME,
|
21
20
|
TAB_SIZE,
|
@@ -70,7 +69,6 @@ const TextDiffView = observer(
|
|
70
69
|
readOnly: true,
|
71
70
|
wordWrap: 'on',
|
72
71
|
});
|
73
|
-
_editor.getOriginalEditor().onKeyDown(createPassThroughOnKeyHandler());
|
74
72
|
setEditor(_editor);
|
75
73
|
}
|
76
74
|
}, [applicationStore, editor]);
|