@finos/legend-query-builder 0.1.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +1 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/QueryBuilderComponentTestUtils.js +1 -3
- package/lib/components/QueryBuilderComponentTestUtils.js.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 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +8 -5
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +11 -8
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +6 -4
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +2 -2
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilder_TestID.d.ts +1 -0
- package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
- package/lib/components/QueryBuilder_TestID.js +1 -0
- package/lib/components/QueryBuilder_TestID.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -2
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +5 -4
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +4 -2
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +7 -4
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +53 -0
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -0
- package/lib/components/shared/BasicValueSpecificationEditor.js +323 -0
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -0
- package/lib/components/shared/CustomDatePicker.d.ts +39 -0
- package/lib/components/shared/CustomDatePicker.d.ts.map +1 -0
- package/lib/components/shared/CustomDatePicker.js +622 -0
- package/lib/components/shared/CustomDatePicker.js.map +1 -0
- package/lib/components/shared/LambdaEditor.d.ts +92 -0
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -0
- package/lib/components/shared/LambdaEditor.js +432 -0
- package/lib/components/shared/LambdaEditor.js.map +1 -0
- package/lib/{graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts → components/shared/LambdaParameterValuesEditor.d.ts} +11 -3
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -0
- package/lib/components/shared/LambdaParameterValuesEditor.js +52 -0
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -0
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts +1 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderLambdaEditor.js +3 -2
- package/lib/components/shared/QueryBuilderLambdaEditor.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +1 -2
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.d.ts → V1_QueryValueSpecificationBuilderHelper.d.ts} +3 -2
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.js → V1_QueryValueSpecificationBuilderHelper.js} +3 -2
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +7 -10
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderMilestoningState.js +6 -6
- package/lib/stores/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/QueryBuilderParametersState.d.ts +1 -1
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +1 -1
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +35 -38
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +2 -1
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +2 -2
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +5 -5
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.d.ts +1 -1
- package/lib/stores/QueryBuilderTextEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js +2 -1
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +2 -2
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +23 -20
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +10 -9
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +4 -3
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.d.ts → QueryBuilderGraphFetchTreeValueSpecificationBuilder.d.ts} +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.js → QueryBuilderGraphFetchTreeValueSpecificationBuilder.js} +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js +3 -3
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionState.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js +6 -6
- package/lib/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.d.ts → QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.js → QueryBuilderAggregateOperatorValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js +5 -5
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js +5 -5
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.js.map +1 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js +3 -3
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js +2 -2
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +10 -10
- package/lib/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts +1 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +3 -46
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/{src/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.ts → lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts} +5 -13
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js +61 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +5 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +5 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +10 -8
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +5 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js +3 -3
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js +3 -3
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +5 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js +3 -3
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +5 -4
- package/lib/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/filter/operators/{QueryBuilderFilterOperatorHelper.d.ts → QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts} +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/filter/operators/{QueryBuilderFilterOperatorHelper.js → QueryBuilderFilterOperatorValueSpecificationBuilder.js} +11 -13
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +7 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +7 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +13 -11
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +8 -7
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +8 -7
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +6 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +4 -4
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +8 -7
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +8 -7
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +7 -6
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/shared/LambdaEditorState.d.ts +40 -0
- package/lib/stores/shared/LambdaEditorState.d.ts.map +1 -0
- package/lib/stores/shared/LambdaEditorState.js +81 -0
- package/lib/stores/shared/LambdaEditorState.js.map +1 -0
- package/lib/stores/shared/LambdaParameterState.d.ts +62 -0
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -0
- package/lib/stores/shared/LambdaParameterState.js +157 -0
- package/lib/stores/shared/LambdaParameterState.js.map +1 -0
- package/lib/{graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js → stores/shared/ValueSpecificationEditorHelper.d.ts} +5 -3
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +77 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -0
- package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts +33 -0
- package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts.map +1 -0
- package/lib/stores/shared/ValueSpecificationModifierHelper.js +71 -0
- package/lib/stores/shared/ValueSpecificationModifierHelper.js.map +1 -0
- package/package.json +14 -17
- package/src/components/QueryBuilder.tsx +4 -1
- package/src/components/QueryBuilderComponentTestUtils.tsx +2 -2
- package/src/components/QueryBuilderDiffPanel.tsx +1 -1
- package/src/components/QueryBuilderParametersPanel.tsx +8 -7
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +15 -12
- package/src/components/QueryBuilderResultPanel.tsx +8 -6
- package/src/components/QueryBuilderTextEditor.tsx +2 -2
- package/src/components/QueryBuilder_TestID.ts +2 -0
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +2 -2
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +5 -3
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +6 -4
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
- package/src/components/filter/QueryBuilderFilterPanel.tsx +9 -6
- package/src/components/shared/BasicValueSpecificationEditor.tsx +837 -0
- package/src/components/shared/CustomDatePicker.tsx +1363 -0
- package/src/components/shared/LambdaEditor.tsx +858 -0
- package/src/components/shared/LambdaParameterValuesEditor.tsx +121 -0
- package/src/components/shared/QueryBuilderLambdaEditor.tsx +5 -5
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +2 -2
- package/src/graphManager/protocol/pure/v1/{V1_QueryBuilder_FunctionExpressionBuilder.ts → V1_QueryValueSpecificationBuilderHelper.ts} +9 -1
- package/src/index.ts +11 -0
- package/src/stores/QueryBuilderMilestoningState.ts +7 -7
- package/src/stores/QueryBuilderParametersState.ts +4 -4
- package/src/stores/QueryBuilderPropertyEditorState.ts +49 -56
- package/src/stores/QueryBuilderResultState.ts +2 -4
- package/src/stores/QueryBuilderState.ts +5 -5
- package/src/stores/QueryBuilderStateBuilder.ts +1 -1
- package/src/stores/QueryBuilderTextEditorState.ts +2 -1
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +5 -2
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +30 -42
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +13 -8
- package/src/stores/explorer/QueryBuilderExplorerState.ts +12 -2
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +1 -1
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +3 -3
- package/src/stores/fetch-structure/graph-fetch/{QueryBuilderGraphFetchValueSpecificationBuilder.ts → QueryBuilderGraphFetchTreeValueSpecificationBuilder.ts} +0 -1
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionColumnState.ts +3 -3
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionState.ts +1 -1
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionStateBuilder.ts +4 -4
- package/src/stores/fetch-structure/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +6 -9
- package/src/stores/fetch-structure/projection/aggregation/operators/{QueryBuilderAggregateOperatorHelper.ts → QueryBuilderAggregateOperatorValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Average.ts +3 -3
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Count.ts +3 -3
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Distinct.ts +3 -3
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_DistinctCount.ts +1 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_JoinString.ts +1 -1
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Max.ts +5 -5
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Min.ts +5 -5
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Population.ts +3 -3
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_StdDev_Sample.ts +3 -3
- package/src/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperator_Sum.ts +3 -3
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterStateBuilder.ts +2 -2
- package/src/stores/fetch-structure/projection/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +12 -10
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +2 -86
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperatorValueSpecificationBuilder.ts +104 -0
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +3 -3
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +3 -3
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +8 -7
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +4 -4
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThanEqual.ts +3 -3
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +2 -2
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +1 -1
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +4 -4
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_LessThanEqual.ts +3 -3
- package/src/stores/fetch-structure/projection/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +3 -3
- package/src/stores/filter/operators/{QueryBuilderFilterOperatorHelper.ts → QueryBuilderFilterOperatorValueSpecificationBuilder.ts} +10 -11
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -5
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -5
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +11 -10
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +7 -7
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +7 -7
- package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +5 -5
- package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +3 -3
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +7 -7
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +7 -7
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -5
- package/src/stores/shared/LambdaEditorState.ts +118 -0
- package/src/stores/shared/LambdaParameterState.ts +259 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +143 -0
- package/src/stores/shared/ValueSpecificationModifierHelper.ts +177 -0
- package/tsconfig.json +14 -7
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.d.ts.map +0 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_FunctionExpressionBuilder.js.map +0 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.d.ts.map +0 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PropertyExpressionTypeInferenceBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.d.ts.map +0 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchValueSpecificationBuilder.js.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.d.ts.map +0 -1
- package/lib/stores/fetch-structure/projection/aggregation/operators/QueryBuilderAggregateOperatorHelper.js.map +0 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.d.ts.map +0 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorHelper.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_LessThan.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_LessThan.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAG9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAc9B,qBAAa,mCACX,SAAQ,0BACR,YAAW,QAAQ;IAEnB,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,MAAM;IAI5D,uCAAuC,CACrC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAiBV,oCAAoC,CAClC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAUV,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB,GAAG,SAAS;IAmCjC,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB;IAYrB,yBAAyB,CACvB,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,wBAAwB,GACnC,oBAAoB,GAAG,SAAS;IAcnC,IAAI,QAAQ,IAAI,MAAM,CAErB;CACF"}
|
@@ -14,18 +14,19 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { QueryBuilderFilterOperator } from '../QueryBuilderFilterOperator.js';
|
17
|
-
import { PRIMITIVE_TYPE, SUPPORTED_FUNCTIONS,
|
17
|
+
import { PRIMITIVE_TYPE, SUPPORTED_FUNCTIONS, } from '@finos/legend-graph';
|
18
18
|
import { hashArray, UnsupportedOperationError, } from '@finos/legend-shared';
|
19
|
-
import { buildFilterConditionState, buildFilterConditionExpression, } from './
|
19
|
+
import { buildFilterConditionState, buildFilterConditionExpression, } from './QueryBuilderFilterOperatorValueSpecificationBuilder.js';
|
20
20
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
21
21
|
import { generateDefaultValueForPrimitiveType, getNonCollectionValueSpecificationType, isTypeCompatibleForAssignment, } from '../../QueryBuilderValueSpecificationHelper.js';
|
22
22
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
23
|
+
import { buildPrimitiveInstanceValue } from '../../shared/ValueSpecificationEditorHelper.js';
|
23
24
|
export class QueryBuilderFilterOperator_LessThan extends QueryBuilderFilterOperator {
|
24
25
|
getLabel(filterConditionState) {
|
25
26
|
return '<';
|
26
27
|
}
|
27
28
|
isCompatibleWithFilterConditionProperty(filterConditionState) {
|
28
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
29
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
29
30
|
.genericType.value.rawType;
|
30
31
|
return [
|
31
32
|
PRIMITIVE_TYPE.NUMBER,
|
@@ -40,11 +41,11 @@ export class QueryBuilderFilterOperator_LessThan extends QueryBuilderFilterOpera
|
|
40
41
|
isCompatibleWithFilterConditionValue(filterConditionState) {
|
41
42
|
return isTypeCompatibleForAssignment(filterConditionState.value
|
42
43
|
? getNonCollectionValueSpecificationType(filterConditionState.value)
|
43
|
-
: undefined, filterConditionState.propertyExpressionState.propertyExpression.func
|
44
|
+
: undefined, filterConditionState.propertyExpressionState.propertyExpression.func.value
|
44
45
|
.genericType.value.rawType);
|
45
46
|
}
|
46
47
|
getDefaultFilterConditionValue(filterConditionState) {
|
47
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
48
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
48
49
|
.genericType.value.rawType;
|
49
50
|
switch (propertyType.path) {
|
50
51
|
case PRIMITIVE_TYPE.NUMBER:
|
@@ -65,7 +66,7 @@ export class QueryBuilderFilterOperator_LessThan extends QueryBuilderFilterOpera
|
|
65
66
|
}
|
66
67
|
}
|
67
68
|
buildFilterConditionExpression(filterConditionState) {
|
68
|
-
return buildFilterConditionExpression(filterConditionState, filterConditionState.propertyExpressionState.propertyExpression.func
|
69
|
+
return buildFilterConditionExpression(filterConditionState, filterConditionState.propertyExpressionState.propertyExpression.func.value
|
69
70
|
.genericType.value.rawType.path === PRIMITIVE_TYPE.DATETIME &&
|
70
71
|
filterConditionState.value?.genericType?.value.rawType.path !==
|
71
72
|
PRIMITIVE_TYPE.DATETIME
|
@@ -73,7 +74,7 @@ export class QueryBuilderFilterOperator_LessThan extends QueryBuilderFilterOpera
|
|
73
74
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.LESS_THAN);
|
74
75
|
}
|
75
76
|
buildFilterConditionState(filterState, expression) {
|
76
|
-
return buildFilterConditionState(filterState, expression, expression.parametersValues[0].func
|
77
|
+
return buildFilterConditionState(filterState, expression, expression.parametersValues[0].func.value
|
77
78
|
.genericType.value.rawType.path === PRIMITIVE_TYPE.DATETIME &&
|
78
79
|
expression.parametersValues[1]?.genericType?.value.rawType.path !==
|
79
80
|
PRIMITIVE_TYPE.DATETIME
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_LessThan.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,cAAc,EAId,mBAAmB,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_LessThan.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,cAAc,EAId,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,SAAS,EACT,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EACL,oCAAoC,EACpC,sCAAsC,EACtC,6BAA6B,GAC9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F,MAAM,OAAO,mCACX,SAAQ,0BAA0B;IAGlC,QAAQ,CAAC,oBAA0C;QACjD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,uCAAuC,CACrC,oBAA0C;QAE1C,MAAM,YAAY,GAChB,oBAAoB,CA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IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC,CAAC,4BAA4B,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_LessThanEqual.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_LessThanEqual.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAG9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAc9B,qBAAa,wCACX,SAAQ,0BACR,YAAW,QAAQ;IAEnB,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,MAAM;IAI5D,uCAAuC,CACrC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAiBV,oCAAoC,CAClC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAUV,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB,GAAG,SAAS;IAmCjC,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB;IAYrB,yBAAyB,CACvB,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,wBAAwB,GACnC,oBAAoB,GAAG,SAAS;IAcnC,IAAI,QAAQ,IAAI,MAAM,CAIrB;CACF"}
|
@@ -14,18 +14,19 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { QueryBuilderFilterOperator } from '../QueryBuilderFilterOperator.js';
|
17
|
-
import { PRIMITIVE_TYPE, SUPPORTED_FUNCTIONS,
|
17
|
+
import { PRIMITIVE_TYPE, SUPPORTED_FUNCTIONS, } from '@finos/legend-graph';
|
18
18
|
import { UnsupportedOperationError, hashArray, } from '@finos/legend-shared';
|
19
|
-
import { buildFilterConditionState, buildFilterConditionExpression, } from './
|
19
|
+
import { buildFilterConditionState, buildFilterConditionExpression, } from './QueryBuilderFilterOperatorValueSpecificationBuilder.js';
|
20
20
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
21
21
|
import { generateDefaultValueForPrimitiveType, getNonCollectionValueSpecificationType, isTypeCompatibleForAssignment, } from '../../QueryBuilderValueSpecificationHelper.js';
|
22
22
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
23
|
+
import { buildPrimitiveInstanceValue } from '../../shared/ValueSpecificationEditorHelper.js';
|
23
24
|
export class QueryBuilderFilterOperator_LessThanEqual extends QueryBuilderFilterOperator {
|
24
25
|
getLabel(filterConditionState) {
|
25
26
|
return '<=';
|
26
27
|
}
|
27
28
|
isCompatibleWithFilterConditionProperty(filterConditionState) {
|
28
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
29
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
29
30
|
.genericType.value.rawType;
|
30
31
|
return [
|
31
32
|
PRIMITIVE_TYPE.NUMBER,
|
@@ -40,11 +41,11 @@ export class QueryBuilderFilterOperator_LessThanEqual extends QueryBuilderFilter
|
|
40
41
|
isCompatibleWithFilterConditionValue(filterConditionState) {
|
41
42
|
return isTypeCompatibleForAssignment(filterConditionState.value
|
42
43
|
? getNonCollectionValueSpecificationType(filterConditionState.value)
|
43
|
-
: undefined, filterConditionState.propertyExpressionState.propertyExpression.func
|
44
|
+
: undefined, filterConditionState.propertyExpressionState.propertyExpression.func.value
|
44
45
|
.genericType.value.rawType);
|
45
46
|
}
|
46
47
|
getDefaultFilterConditionValue(filterConditionState) {
|
47
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
48
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
48
49
|
.genericType.value.rawType;
|
49
50
|
switch (propertyType.path) {
|
50
51
|
case PRIMITIVE_TYPE.NUMBER:
|
@@ -65,7 +66,7 @@ export class QueryBuilderFilterOperator_LessThanEqual extends QueryBuilderFilter
|
|
65
66
|
}
|
66
67
|
}
|
67
68
|
buildFilterConditionExpression(filterConditionState) {
|
68
|
-
return buildFilterConditionExpression(filterConditionState, filterConditionState.propertyExpressionState.propertyExpression.func
|
69
|
+
return buildFilterConditionExpression(filterConditionState, filterConditionState.propertyExpressionState.propertyExpression.func.value
|
69
70
|
.genericType.value.rawType.path === PRIMITIVE_TYPE.DATETIME &&
|
70
71
|
filterConditionState.value?.genericType?.value.rawType.path !==
|
71
72
|
PRIMITIVE_TYPE.DATETIME
|
@@ -73,7 +74,7 @@ export class QueryBuilderFilterOperator_LessThanEqual extends QueryBuilderFilter
|
|
73
74
|
: QUERY_BUILDER_SUPPORTED_FUNCTIONS.LESS_THAN_EQUAL);
|
74
75
|
}
|
75
76
|
buildFilterConditionState(filterState, expression) {
|
76
|
-
return buildFilterConditionState(filterState, expression, expression.parametersValues[0].func
|
77
|
+
return buildFilterConditionState(filterState, expression, expression.parametersValues[0].func.value
|
77
78
|
.genericType.value.rawType.path === PRIMITIVE_TYPE.DATETIME &&
|
78
79
|
expression.parametersValues[1]?.genericType?.value.rawType.path !==
|
79
80
|
PRIMITIVE_TYPE.DATETIME
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_LessThanEqual.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,cAAc,EAId,mBAAmB,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_LessThanEqual.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,cAAc,EAId,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,yBAAyB,EACzB,SAAS,GACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EACL,oCAAoC,EACpC,sCAAsC,EACtC,6BAA6B,GAC9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F,MAAM,OAAO,wCACX,SAAQ,0BAA0B;IAGlC,QAAQ,CAAC,oBAA0C;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uCAAuC,CACrC,oBAA0C;QAE1C,MAAM,YAAY,GAChB,oBAAoB,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK;aACvE,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC;QAC/B,OACE;YACE,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|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_StartWith.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_StartWith.d.ts","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAe9B,qBAAa,oCACX,SAAQ,0BACR,YAAW,QAAQ;IAEnB,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,MAAM;IAI5D,uCAAuC,CACrC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAOV,oCAAoC,CAClC,oBAAoB,EAAE,oBAAoB,GACzC,OAAO;IAOV,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB,GAAG,SAAS;IAsBjC,8BAA8B,CAC5B,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB;IAOrB,yBAAyB,CACvB,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,wBAAwB,GACnC,oBAAoB,GAAG,SAAS;IASnC,IAAI,QAAQ,IAAI,MAAM,CAErB;CACF;AAED,qBAAa,uCAAwC,SAAQ,oCAAoC;IACtF,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,MAAM;IAI5D,8BAA8B,CACrC,oBAAoB,EAAE,oBAAoB,GACzC,kBAAkB;IAQZ,yBAAyB,CAChC,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,wBAAwB,GACnC,oBAAoB,GAAG,SAAS;IAOnC,IAAa,QAAQ,IAAI,MAAM,CAI9B;CACF"}
|
@@ -14,18 +14,19 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { QueryBuilderFilterOperator } from '../QueryBuilderFilterOperator.js';
|
17
|
-
import { PRIMITIVE_TYPE,
|
17
|
+
import { PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
18
18
|
import { UnsupportedOperationError, hashArray, } from '@finos/legend-shared';
|
19
|
-
import { buildFilterConditionState, buildFilterConditionExpression, } from './
|
19
|
+
import { buildFilterConditionState, buildFilterConditionExpression, } from './QueryBuilderFilterOperatorValueSpecificationBuilder.js';
|
20
20
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
|
21
21
|
import { buildNotExpression, generateDefaultValueForPrimitiveType, getNonCollectionValueSpecificationType, unwrapNotExpression, } from '../../QueryBuilderValueSpecificationHelper.js';
|
22
22
|
import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
|
23
|
+
import { buildPrimitiveInstanceValue } from '../../shared/ValueSpecificationEditorHelper.js';
|
23
24
|
export class QueryBuilderFilterOperator_StartWith extends QueryBuilderFilterOperator {
|
24
25
|
getLabel(filterConditionState) {
|
25
26
|
return 'starts with';
|
26
27
|
}
|
27
28
|
isCompatibleWithFilterConditionProperty(filterConditionState) {
|
28
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
29
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
29
30
|
.genericType.value.rawType;
|
30
31
|
return PRIMITIVE_TYPE.STRING === propertyType.path;
|
31
32
|
}
|
@@ -36,7 +37,7 @@ export class QueryBuilderFilterOperator_StartWith extends QueryBuilderFilterOper
|
|
36
37
|
return PRIMITIVE_TYPE.STRING === type?.path;
|
37
38
|
}
|
38
39
|
getDefaultFilterConditionValue(filterConditionState) {
|
39
|
-
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func
|
40
|
+
const propertyType = filterConditionState.propertyExpressionState.propertyExpression.func.value
|
40
41
|
.genericType.value.rawType;
|
41
42
|
switch (propertyType.path) {
|
42
43
|
case PRIMITIVE_TYPE.STRING: {
|
@@ -62,8 +63,8 @@ export class QueryBuilderFilterOperator_NotStartWith extends QueryBuilderFilterO
|
|
62
63
|
return `doesn't start with`;
|
63
64
|
}
|
64
65
|
buildFilterConditionExpression(filterConditionState) {
|
65
|
-
return buildNotExpression(filterConditionState.filterState.queryBuilderState.graphManagerState
|
66
|
-
.graph
|
66
|
+
return buildNotExpression(super.buildFilterConditionExpression(filterConditionState), filterConditionState.filterState.queryBuilderState.graphManagerState
|
67
|
+
.graph);
|
67
68
|
}
|
68
69
|
buildFilterConditionState(filterState, expression) {
|
69
70
|
const innerExpression = unwrapNotExpression(expression);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderFilterOperator_StartWith.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EACL,cAAc,
|
1
|
+
{"version":3,"file":"QueryBuilderFilterOperator_StartWith.js","sourceRoot":"","sources":["../../../../src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC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C;IAChB,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,8BAA8B;SAC5D,CAAC,CAAC;IACL,CAAC;CACF"}
|
@@ -0,0 +1,40 @@
|
|
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 GeneratorFn } from '@finos/legend-shared';
|
17
|
+
import { type ParserError, type CompilationError, SourceInformation } from '@finos/legend-graph';
|
18
|
+
/**
|
19
|
+
* This is not strictly meant for lambda. The idea is to create an editor that allows
|
20
|
+
* editing _something_ but allows user to edit via text.
|
21
|
+
*/
|
22
|
+
export declare abstract class LambdaEditorState {
|
23
|
+
readonly uuid: string;
|
24
|
+
lambdaPrefix: string;
|
25
|
+
lambdaString: string;
|
26
|
+
parserError?: ParserError | undefined;
|
27
|
+
compilationError?: CompilationError | undefined;
|
28
|
+
constructor(lambdaString: string, lambdaPrefix: string);
|
29
|
+
abstract get lambdaId(): string;
|
30
|
+
get fullLambdaString(): string;
|
31
|
+
setLambdaString(val: string): void;
|
32
|
+
clearErrors(): void;
|
33
|
+
setCompilationError(compilationError: CompilationError | undefined): void;
|
34
|
+
setParserError(parserError: ParserError | undefined): void;
|
35
|
+
processSourceInformation(sourceInformation: SourceInformation): SourceInformation;
|
36
|
+
extractLambdaString(fullLambdaString: string): string;
|
37
|
+
abstract convertLambdaGrammarStringToObject(): GeneratorFn<void>;
|
38
|
+
abstract convertLambdaObjectToGrammarString(pretty: boolean): GeneratorFn<void>;
|
39
|
+
}
|
40
|
+
//# sourceMappingURL=LambdaEditorState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LambdaEditorState.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/LambdaEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,8BAAsB,iBAAiB;IACrC,QAAQ,CAAC,IAAI,SAAU;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;gBAEpC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAmBtD,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAGhC,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,WAAW,IAAI,IAAI;IAKnB,mBAAmB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI;IAUzE,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAU1D,wBAAwB,CACtB,iBAAiB,EAAE,iBAAiB,GACnC,iBAAiB;IAcpB,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM;IAOrD,QAAQ,CAAC,kCAAkC,IAAI,WAAW,CAAC,IAAI,CAAC;IAChE,QAAQ,CAAC,kCAAkC,CACzC,MAAM,EAAE,OAAO,GACd,WAAW,CAAC,IAAI,CAAC;CACrB"}
|
@@ -0,0 +1,81 @@
|
|
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 { observable, action, computed, makeObservable, flow } from 'mobx';
|
17
|
+
import { uuid } from '@finos/legend-shared';
|
18
|
+
import { SourceInformation, } from '@finos/legend-graph';
|
19
|
+
/**
|
20
|
+
* This is not strictly meant for lambda. The idea is to create an editor that allows
|
21
|
+
* editing _something_ but allows user to edit via text.
|
22
|
+
*/
|
23
|
+
export class LambdaEditorState {
|
24
|
+
uuid = uuid();
|
25
|
+
lambdaPrefix;
|
26
|
+
lambdaString; // value shown in lambda editor which can be edited
|
27
|
+
parserError;
|
28
|
+
compilationError;
|
29
|
+
constructor(lambdaString, lambdaPrefix) {
|
30
|
+
makeObservable(this, {
|
31
|
+
lambdaString: observable,
|
32
|
+
parserError: observable,
|
33
|
+
compilationError: observable,
|
34
|
+
lambdaId: computed,
|
35
|
+
fullLambdaString: computed,
|
36
|
+
setLambdaString: action,
|
37
|
+
clearErrors: action,
|
38
|
+
setCompilationError: action,
|
39
|
+
setParserError: action,
|
40
|
+
convertLambdaGrammarStringToObject: flow,
|
41
|
+
convertLambdaObjectToGrammarString: flow,
|
42
|
+
});
|
43
|
+
this.lambdaString = lambdaString;
|
44
|
+
this.lambdaPrefix = lambdaPrefix;
|
45
|
+
}
|
46
|
+
// value shown in lambda editor with the prefix, used to send to the server to transformation from text to JSON
|
47
|
+
get fullLambdaString() {
|
48
|
+
return `${this.lambdaPrefix}${this.lambdaString}`;
|
49
|
+
}
|
50
|
+
setLambdaString(val) {
|
51
|
+
this.lambdaString = val;
|
52
|
+
}
|
53
|
+
clearErrors() {
|
54
|
+
this.setCompilationError(undefined);
|
55
|
+
this.setParserError(undefined);
|
56
|
+
}
|
57
|
+
setCompilationError(compilationError) {
|
58
|
+
// account for the lambda prefix offset in source information
|
59
|
+
if (compilationError?.sourceInformation) {
|
60
|
+
compilationError.sourceInformation = this.processSourceInformation(compilationError.sourceInformation);
|
61
|
+
}
|
62
|
+
this.compilationError = compilationError;
|
63
|
+
}
|
64
|
+
setParserError(parserError) {
|
65
|
+
// account for the lambda prefix offset in source information
|
66
|
+
if (parserError?.sourceInformation) {
|
67
|
+
parserError.sourceInformation = this.processSourceInformation(parserError.sourceInformation);
|
68
|
+
}
|
69
|
+
this.parserError = parserError;
|
70
|
+
}
|
71
|
+
processSourceInformation(sourceInformation) {
|
72
|
+
const { sourceId, startLine, startColumn, endLine, endColumn } = sourceInformation;
|
73
|
+
const lineOffset = 0;
|
74
|
+
const columnOffset = this.lambdaPrefix.length;
|
75
|
+
return new SourceInformation(sourceId, startLine + lineOffset, startColumn - (startLine === 1 ? columnOffset : 0), endLine + lineOffset, endColumn - (endLine === 1 ? columnOffset : 0));
|
76
|
+
}
|
77
|
+
extractLambdaString(fullLambdaString) {
|
78
|
+
return fullLambdaString.substring(fullLambdaString.indexOf(this.lambdaPrefix) + this.lambdaPrefix.length, fullLambdaString.length);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
//# sourceMappingURL=LambdaEditorState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LambdaEditorState.js","sourceRoot":"","sources":["../../../src/stores/shared/LambdaEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EA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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 ObserverContext, type Type, type ValueSpecification, type PureModel, VariableExpression, LambdaFunction } from '@finos/legend-graph';
|
17
|
+
import { type Hashable } from '@finos/legend-shared';
|
18
|
+
export declare enum PARAMETER_SUBMIT_ACTION {
|
19
|
+
EXECUTE = "EXECUTE",
|
20
|
+
EXPORT = "EXPORT"
|
21
|
+
}
|
22
|
+
export declare const buildParametersLetLambdaFunc: (graph: PureModel, lambdaParametersStates: LambdaParameterState[]) => LambdaFunction;
|
23
|
+
export declare class LambdaParameterState implements Hashable {
|
24
|
+
readonly uuid: string;
|
25
|
+
readonly parameter: VariableExpression;
|
26
|
+
readonly graph: PureModel;
|
27
|
+
readonly observableContext: ObserverContext;
|
28
|
+
value: ValueSpecification | undefined;
|
29
|
+
constructor(variableExpression: VariableExpression, observableContext: ObserverContext, graph: PureModel);
|
30
|
+
get hashCode(): string;
|
31
|
+
mockParameterValue(): void;
|
32
|
+
setValue(value: ValueSpecification | undefined): void;
|
33
|
+
changeVariableType(type: Type): void;
|
34
|
+
changeMultiplicity(variableExpression: VariableExpression, lowerBound: number, uppderBound: number | undefined): void;
|
35
|
+
get variableName(): string;
|
36
|
+
get variableType(): Type | undefined;
|
37
|
+
}
|
38
|
+
export declare class ParameterInstanceValuesEditorState {
|
39
|
+
showModal: boolean;
|
40
|
+
submitAction: {
|
41
|
+
handler: () => Promise<void>;
|
42
|
+
label: string;
|
43
|
+
} | undefined;
|
44
|
+
constructor();
|
45
|
+
setShowModal(val: boolean): void;
|
46
|
+
setSubmitAction(val: {
|
47
|
+
handler: () => Promise<void>;
|
48
|
+
label: string;
|
49
|
+
} | undefined): void;
|
50
|
+
open(handler: () => Promise<void>, label: string): void;
|
51
|
+
close(): void;
|
52
|
+
}
|
53
|
+
export declare abstract class LambdaParametersState implements Hashable {
|
54
|
+
parameterStates: LambdaParameterState[];
|
55
|
+
parameterValuesEditorState: ParameterInstanceValuesEditorState;
|
56
|
+
constructor();
|
57
|
+
get hashCode(): string;
|
58
|
+
addParameter(val: LambdaParameterState): void;
|
59
|
+
removeParameter(val: LambdaParameterState): void;
|
60
|
+
setParameters(val: LambdaParameterState[]): void;
|
61
|
+
}
|
62
|
+
//# sourceMappingURL=LambdaParameterState.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LambdaParameterState.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAOd,kBAAkB,EAClB,cAAc,EAQf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,QAAQ,EAKd,MAAM,sBAAsB,CAAC;AAQ9B,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAOD,eAAO,MAAM,4BAA4B,UAChC,SAAS,0BACQ,oBAAoB,EAAE,KAC7C,cAgCF,CAAC;AAEF,qBAAa,oBAAqB,YAAW,QAAQ;IACnD,QAAQ,CAAC,IAAI,SAAU;IACvB,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,eAAe,CAAC;IAE5C,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAGpC,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAA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|
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 { GenericType, GenericTypeExplicitReference, observe_ValueSpecification, observe_VariableExpression, PrimitiveInstanceValue, PRIMITIVE_TYPE, VariableExpression, LambdaFunction, TYPICAL_MULTIPLICITY_TYPE, CORE_PURE_PATH, FunctionType, SimpleFunctionExpression, SUPPORTED_FUNCTIONS, extractElementNameFromPath, PackageableElementExplicitReference, } from '@finos/legend-graph';
|
17
|
+
import { addUniqueEntry, deleteEntry, hashArray, IllegalStateError, isNonNullable, uuid, } from '@finos/legend-shared';
|
18
|
+
import { makeObservable, observable, action, computed } from 'mobx';
|
19
|
+
import { generateVariableExpressionMockValue } from './ValueSpecificationEditorHelper.js';
|
20
|
+
import { valueSpecification_setGenericType, valueSpecification_setMultiplicity, } from './ValueSpecificationModifierHelper.js';
|
21
|
+
export var PARAMETER_SUBMIT_ACTION;
|
22
|
+
(function (PARAMETER_SUBMIT_ACTION) {
|
23
|
+
PARAMETER_SUBMIT_ACTION["EXECUTE"] = "EXECUTE";
|
24
|
+
PARAMETER_SUBMIT_ACTION["EXPORT"] = "EXPORT";
|
25
|
+
})(PARAMETER_SUBMIT_ACTION = PARAMETER_SUBMIT_ACTION || (PARAMETER_SUBMIT_ACTION = {}));
|
26
|
+
var LAMABA_PARAMETER_HASH_STRUCTURE;
|
27
|
+
(function (LAMABA_PARAMETER_HASH_STRUCTURE) {
|
28
|
+
LAMABA_PARAMETER_HASH_STRUCTURE["LAMBDA_PARAMETER_STATE"] = "LAMBDA_PARAMETER_STATE";
|
29
|
+
LAMABA_PARAMETER_HASH_STRUCTURE["LAMBDA_PARAMETERS_STATE"] = "LAMBDA_PARAMETERS_STATE";
|
30
|
+
})(LAMABA_PARAMETER_HASH_STRUCTURE || (LAMABA_PARAMETER_HASH_STRUCTURE = {}));
|
31
|
+
export const buildParametersLetLambdaFunc = (graph, lambdaParametersStates) => {
|
32
|
+
const multiplicityOne = graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
|
33
|
+
const typeString = graph.getPrimitiveType(PRIMITIVE_TYPE.STRING);
|
34
|
+
const typeAny = graph.getType(CORE_PURE_PATH.ANY);
|
35
|
+
const letlambdaFunction = new LambdaFunction(new FunctionType(PackageableElementExplicitReference.create(typeAny), multiplicityOne));
|
36
|
+
letlambdaFunction.expressionSequence = lambdaParametersStates
|
37
|
+
.map((queryParamState) => {
|
38
|
+
if (queryParamState.value) {
|
39
|
+
const letFunc = new SimpleFunctionExpression(extractElementNameFromPath(SUPPORTED_FUNCTIONS.LET), multiplicityOne);
|
40
|
+
const letVar = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(typeString)), multiplicityOne);
|
41
|
+
letVar.values = [queryParamState.variableName];
|
42
|
+
letFunc.parametersValues.push(letVar);
|
43
|
+
letFunc.parametersValues.push(queryParamState.value);
|
44
|
+
return letFunc;
|
45
|
+
}
|
46
|
+
return undefined;
|
47
|
+
})
|
48
|
+
.filter(isNonNullable);
|
49
|
+
return letlambdaFunction;
|
50
|
+
};
|
51
|
+
export class LambdaParameterState {
|
52
|
+
uuid = uuid();
|
53
|
+
parameter;
|
54
|
+
graph;
|
55
|
+
observableContext;
|
56
|
+
value;
|
57
|
+
constructor(variableExpression, observableContext, graph) {
|
58
|
+
makeObservable(this, {
|
59
|
+
value: observable,
|
60
|
+
setValue: action,
|
61
|
+
mockParameterValue: action,
|
62
|
+
hashCode: computed,
|
63
|
+
});
|
64
|
+
this.observableContext = observableContext;
|
65
|
+
this.parameter = observe_VariableExpression(variableExpression);
|
66
|
+
this.graph = graph;
|
67
|
+
}
|
68
|
+
get hashCode() {
|
69
|
+
return hashArray([
|
70
|
+
LAMABA_PARAMETER_HASH_STRUCTURE.LAMBDA_PARAMETER_STATE,
|
71
|
+
this.parameter,
|
72
|
+
]);
|
73
|
+
}
|
74
|
+
mockParameterValue() {
|
75
|
+
this.setValue(generateVariableExpressionMockValue(this.parameter, this.graph));
|
76
|
+
}
|
77
|
+
setValue(value) {
|
78
|
+
if (value instanceof VariableExpression) {
|
79
|
+
throw new IllegalStateError('Can not assign a parameter to another parameter');
|
80
|
+
}
|
81
|
+
this.value = value
|
82
|
+
? observe_ValueSpecification(value, this.observableContext)
|
83
|
+
: undefined;
|
84
|
+
}
|
85
|
+
changeVariableType(type) {
|
86
|
+
if (type !== this.variableType) {
|
87
|
+
valueSpecification_setGenericType(this.parameter, GenericTypeExplicitReference.create(new GenericType(type)));
|
88
|
+
this.mockParameterValue();
|
89
|
+
}
|
90
|
+
}
|
91
|
+
changeMultiplicity(variableExpression, lowerBound, uppderBound) {
|
92
|
+
const current = this.parameter.multiplicity;
|
93
|
+
if (current.lowerBound !== lowerBound ||
|
94
|
+
current.upperBound !== uppderBound) {
|
95
|
+
valueSpecification_setMultiplicity(variableExpression, this.graph.getMultiplicity(lowerBound, uppderBound));
|
96
|
+
this.mockParameterValue();
|
97
|
+
}
|
98
|
+
}
|
99
|
+
get variableName() {
|
100
|
+
return this.parameter.name;
|
101
|
+
}
|
102
|
+
get variableType() {
|
103
|
+
return this.parameter.genericType?.value.rawType;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
export class ParameterInstanceValuesEditorState {
|
107
|
+
showModal = false;
|
108
|
+
submitAction;
|
109
|
+
constructor() {
|
110
|
+
makeObservable(this, {
|
111
|
+
showModal: observable,
|
112
|
+
submitAction: observable,
|
113
|
+
setShowModal: action,
|
114
|
+
open: action,
|
115
|
+
setSubmitAction: action,
|
116
|
+
});
|
117
|
+
}
|
118
|
+
setShowModal(val) {
|
119
|
+
this.showModal = val;
|
120
|
+
}
|
121
|
+
setSubmitAction(val) {
|
122
|
+
this.submitAction = val;
|
123
|
+
}
|
124
|
+
open(handler, label) {
|
125
|
+
this.setSubmitAction({ handler, label });
|
126
|
+
this.setShowModal(true);
|
127
|
+
}
|
128
|
+
close() {
|
129
|
+
this.setSubmitAction(undefined);
|
130
|
+
this.setShowModal(false);
|
131
|
+
}
|
132
|
+
}
|
133
|
+
export class LambdaParametersState {
|
134
|
+
parameterStates = [];
|
135
|
+
parameterValuesEditorState = new ParameterInstanceValuesEditorState();
|
136
|
+
constructor() {
|
137
|
+
makeObservable(this, {
|
138
|
+
hashCode: computed,
|
139
|
+
});
|
140
|
+
}
|
141
|
+
get hashCode() {
|
142
|
+
return hashArray([
|
143
|
+
LAMABA_PARAMETER_HASH_STRUCTURE.LAMBDA_PARAMETERS_STATE,
|
144
|
+
hashArray(this.parameterStates),
|
145
|
+
]);
|
146
|
+
}
|
147
|
+
addParameter(val) {
|
148
|
+
addUniqueEntry(this.parameterStates, val);
|
149
|
+
}
|
150
|
+
removeParameter(val) {
|
151
|
+
deleteEntry(this.parameterStates, val);
|
152
|
+
}
|
153
|
+
setParameters(val) {
|
154
|
+
this.parameterStates = val;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
//# sourceMappingURL=LambdaParameterState.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LambdaParameterState.js","sourceRoot":"","sources":["../../../src/stores/shared/LambdaParameterState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,WAAW,EACX,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,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AC,GAA2B;QACvC,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;IAC7B,CAAC;CACF"}
|
@@ -13,6 +13,8 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { InstanceValue, } from '@finos/legend-graph';
|
17
|
-
export const
|
18
|
-
|
16
|
+
import { type PureModel, type InstanceValue, type VariableExpression, Enumeration, PrimitiveInstanceValue, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
17
|
+
export declare const createMockEnumerationProperty: (enumeration: Enumeration) => string;
|
18
|
+
export declare const buildPrimitiveInstanceValue: (graph: PureModel, type: PRIMITIVE_TYPE, value: unknown) => PrimitiveInstanceValue;
|
19
|
+
export declare const generateVariableExpressionMockValue: (parameter: VariableExpression, graph: PureModel) => InstanceValue | undefined;
|
20
|
+
//# sourceMappingURL=ValueSpecificationEditorHelper.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ValueSpecificationEditorHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/ValueSpecificationEditorHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAIvB,WAAW,EAMX,sBAAsB,EAEtB,cAAc,EAEf,MAAM,qBAAqB,CAAC;AA4C7B,eAAO,MAAM,6BAA6B,gBAC3B,WAAW,KACvB,MACyE,CAAC;AAE7E,eAAO,MAAM,2BAA2B,UAC/B,SAAS,QACV,cAAc,SACb,OAAO,KACb,sBAYF,CAAC;AAEF,eAAO,MAAM,mCAAmC,cACnC,kBAAkB,SACtB,SAAS,KACf,aAAa,GAAG,SAuClB,CAAC"}
|