@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
@@ -20,23 +20,15 @@ import {
|
|
20
20
|
Dialog,
|
21
21
|
BlankPanelContent,
|
22
22
|
CustomSelectorInput,
|
23
|
-
PencilIcon,
|
24
|
-
TimesIcon,
|
25
|
-
DollarIcon,
|
26
23
|
PlusIcon,
|
27
|
-
DragPreviewLayer,
|
28
|
-
useDragPreviewLayer,
|
29
24
|
BlankPanelPlaceholder,
|
30
25
|
Modal,
|
31
26
|
ModalBody,
|
32
27
|
ModalFooter,
|
33
28
|
ModalHeader,
|
34
29
|
PanelFormTextField,
|
30
|
+
InfoCircleIcon,
|
35
31
|
} from '@finos/legend-art';
|
36
|
-
import {
|
37
|
-
type QueryBuilderParameterDragSource,
|
38
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
39
|
-
} from '../stores/QueryBuilderParametersState.js';
|
40
32
|
import {
|
41
33
|
type Type,
|
42
34
|
VariableExpression,
|
@@ -52,12 +44,12 @@ import {
|
|
52
44
|
getPackageableElementOptionFormatter,
|
53
45
|
useApplicationStore,
|
54
46
|
} from '@finos/legend-application';
|
55
|
-
import { useDrag } from 'react-dnd';
|
56
47
|
import { generateEnumerableNameFromToken } from '@finos/legend-shared';
|
57
48
|
import { DEFAULT_VARIABLE_NAME } from '../stores/QueryBuilderConfig.js';
|
58
49
|
import { variableExpression_setName } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
59
50
|
import { LambdaParameterState } from '../stores/shared/LambdaParameterState.js';
|
60
51
|
import { LambdaParameterValuesEditor } from './shared/LambdaParameterValuesEditor.js';
|
52
|
+
import { VariableViewer } from './shared/QueryBuilderVariableSelector.js';
|
61
53
|
|
62
54
|
type MultiplicityOption = { label: string; value: Multiplicity };
|
63
55
|
|
@@ -147,12 +139,12 @@ const VariableExpressionEditor = observer(
|
|
147
139
|
>
|
148
140
|
<Modal
|
149
141
|
darkMode={true}
|
150
|
-
className="editor-modal query-
|
142
|
+
className="editor-modal query-builder__variables__modal"
|
151
143
|
>
|
152
144
|
<ModalHeader
|
153
145
|
title={`${isCreating ? 'Create Parameter' : 'Update Parameter'}`}
|
154
146
|
/>
|
155
|
-
<ModalBody className="query-
|
147
|
+
<ModalBody className="query-builder__variables__modal__body">
|
156
148
|
<PanelFormTextField
|
157
149
|
name="Parameter Name"
|
158
150
|
prompt="Name of the parameter. Should be descriptive of its purpose."
|
@@ -223,90 +215,6 @@ const VariableExpressionEditor = observer(
|
|
223
215
|
},
|
224
216
|
);
|
225
217
|
|
226
|
-
export const VariableExpressionViewer = observer(
|
227
|
-
(props: {
|
228
|
-
queryBuilderState: QueryBuilderState;
|
229
|
-
isReadOnly: boolean;
|
230
|
-
hideActions?: boolean;
|
231
|
-
variableExpressionState: LambdaParameterState;
|
232
|
-
}) => {
|
233
|
-
const {
|
234
|
-
queryBuilderState,
|
235
|
-
isReadOnly,
|
236
|
-
hideActions,
|
237
|
-
variableExpressionState,
|
238
|
-
} = props;
|
239
|
-
const queryParameterState = queryBuilderState.parametersState;
|
240
|
-
const variable = variableExpressionState.parameter;
|
241
|
-
const name = variable.name;
|
242
|
-
const variableType = variable.genericType?.value.rawType;
|
243
|
-
const typeName = variableType?.name;
|
244
|
-
const editVariable = (): void => {
|
245
|
-
queryParameterState.setSelectedParameter(variableExpressionState);
|
246
|
-
};
|
247
|
-
const deleteVariable = (): void =>
|
248
|
-
queryParameterState.removeParameter(variableExpressionState);
|
249
|
-
const [, dragConnector, dragPreviewConnector] = useDrag(
|
250
|
-
() => ({
|
251
|
-
type: QUERY_BUILDER_PARAMETER_DND_TYPE,
|
252
|
-
item: { variable: variableExpressionState },
|
253
|
-
}),
|
254
|
-
[variableExpressionState],
|
255
|
-
);
|
256
|
-
useDragPreviewLayer(dragPreviewConnector);
|
257
|
-
|
258
|
-
return (
|
259
|
-
<div className="query-builder__parameters__parameter" ref={dragConnector}>
|
260
|
-
<DragPreviewLayer
|
261
|
-
labelGetter={(item: QueryBuilderParameterDragSource): string =>
|
262
|
-
item.variable.variableName === ''
|
263
|
-
? '(unknown)'
|
264
|
-
: item.variable.variableName
|
265
|
-
}
|
266
|
-
types={[QUERY_BUILDER_PARAMETER_DND_TYPE]}
|
267
|
-
/>
|
268
|
-
<div className="query-builder__parameters__parameter__content">
|
269
|
-
<div className="query-builder__parameters__parameter__icon">
|
270
|
-
<div className="query-builder__parameters__parameter-icon">
|
271
|
-
<DollarIcon />
|
272
|
-
</div>
|
273
|
-
</div>
|
274
|
-
<div className="query-builder__parameters__parameter__label">
|
275
|
-
{name}
|
276
|
-
<div className="query-builder__parameters__parameter__type">
|
277
|
-
<div className="query-builder__parameters__parameter__type__label">
|
278
|
-
{typeName}
|
279
|
-
</div>
|
280
|
-
</div>
|
281
|
-
</div>
|
282
|
-
</div>
|
283
|
-
{!hideActions && (
|
284
|
-
<div className="query-builder__parameters__parameter__actions">
|
285
|
-
<button
|
286
|
-
className="query-builder__parameters__parameter__action"
|
287
|
-
tabIndex={-1}
|
288
|
-
disabled={isReadOnly}
|
289
|
-
onClick={editVariable}
|
290
|
-
title="Edit"
|
291
|
-
>
|
292
|
-
<PencilIcon />
|
293
|
-
</button>
|
294
|
-
<button
|
295
|
-
className="query-builder__parameters__parameter__action"
|
296
|
-
tabIndex={-1}
|
297
|
-
onClick={deleteVariable}
|
298
|
-
disabled={isReadOnly}
|
299
|
-
title="Remove"
|
300
|
-
>
|
301
|
-
<TimesIcon />
|
302
|
-
</button>
|
303
|
-
</div>
|
304
|
-
)}
|
305
|
-
</div>
|
306
|
-
);
|
307
|
-
},
|
308
|
-
);
|
309
|
-
|
310
218
|
export const QueryBuilderParametersPanel = observer(
|
311
219
|
(props: { queryBuilderState: QueryBuilderState }) => {
|
312
220
|
const { queryBuilderState } = props;
|
@@ -334,10 +242,16 @@ export const QueryBuilderParametersPanel = observer(
|
|
334
242
|
};
|
335
243
|
|
336
244
|
return (
|
337
|
-
<div className="panel query-
|
245
|
+
<div className="panel query-builder__variables">
|
338
246
|
<div className="panel__header">
|
339
247
|
<div className="panel__header__title">
|
340
248
|
<div className="panel__header__title__label">parameters</div>
|
249
|
+
<div
|
250
|
+
className="service-editor__pattern__parameters__header__info"
|
251
|
+
title={`Parameters are variables assigned to your query. They are dynamic in nature and can change for each execution.`}
|
252
|
+
>
|
253
|
+
<InfoCircleIcon />
|
254
|
+
</div>
|
341
255
|
</div>
|
342
256
|
{!isReadOnly && !queryBuilderState.isParameterSupportDisabled && (
|
343
257
|
<div className="panel__header__actions">
|
@@ -352,16 +266,21 @@ export const QueryBuilderParametersPanel = observer(
|
|
352
266
|
</div>
|
353
267
|
)}
|
354
268
|
</div>
|
355
|
-
<div className="panel__content query-
|
269
|
+
<div className="panel__content query-builder__variables__content">
|
356
270
|
{!queryBuilderState.isParameterSupportDisabled && (
|
357
271
|
<>
|
358
272
|
{Boolean(queryParameterState.parameterStates.length) &&
|
359
|
-
queryParameterState.parameterStates.map((
|
360
|
-
<
|
361
|
-
key={
|
362
|
-
|
273
|
+
queryParameterState.parameterStates.map((pState) => (
|
274
|
+
<VariableViewer
|
275
|
+
key={pState.uuid}
|
276
|
+
variable={pState.parameter}
|
363
277
|
isReadOnly={isReadOnly}
|
364
|
-
|
278
|
+
actions={{
|
279
|
+
editVariable: () =>
|
280
|
+
queryParameterState.setSelectedParameter(pState),
|
281
|
+
deleteVariable: () =>
|
282
|
+
queryParameterState.removeParameter(pState),
|
283
|
+
}}
|
365
284
|
/>
|
366
285
|
))}
|
367
286
|
{!queryParameterState.parameterStates.length && (
|
@@ -28,7 +28,6 @@ import {
|
|
28
28
|
} from '@finos/legend-art';
|
29
29
|
import { observer } from 'mobx-react-lite';
|
30
30
|
import {
|
31
|
-
generateMilestonedPropertyParameterValue,
|
32
31
|
generateValueSpecificationForParameter,
|
33
32
|
getPropertyPath,
|
34
33
|
type QueryBuilderDerivedPropertyExpressionState,
|
@@ -41,11 +40,6 @@ import {
|
|
41
40
|
type QueryBuilderExplorerTreePropertyNodeData,
|
42
41
|
} from '../stores/explorer/QueryBuilderExplorerState.js';
|
43
42
|
import { QueryBuilderPropertyInfoTooltip } from './shared/QueryBuilderPropertyInfoTooltip.js';
|
44
|
-
import { VariableExpressionViewer } from './QueryBuilderParametersPanel.js';
|
45
|
-
import {
|
46
|
-
type QueryBuilderParameterDragSource,
|
47
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
48
|
-
} from '../stores/QueryBuilderParametersState.js';
|
49
43
|
import {
|
50
44
|
type ValueSpecification,
|
51
45
|
type VariableExpression,
|
@@ -53,10 +47,27 @@ import {
|
|
53
47
|
Enumeration,
|
54
48
|
PrimitiveType,
|
55
49
|
isSuperType,
|
50
|
+
AbstractPropertyExpression,
|
51
|
+
INTERNAL__PropagatedValue,
|
52
|
+
getMilestoneTemporalStereotype,
|
56
53
|
} from '@finos/legend-graph';
|
57
|
-
import { guaranteeNonNullable } from '@finos/legend-shared';
|
58
|
-
import {
|
54
|
+
import { guaranteeNonNullable, guaranteeType } from '@finos/legend-shared';
|
55
|
+
import {
|
56
|
+
type QueryBuilderVariableDragSource,
|
57
|
+
BasicValueSpecificationEditor,
|
58
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
59
|
+
} from './shared/BasicValueSpecificationEditor.js';
|
59
60
|
import { functionExpression_setParameterValue } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
61
|
+
import {
|
62
|
+
ActionAlertActionType,
|
63
|
+
ActionAlertType,
|
64
|
+
} from '@finos/legend-application';
|
65
|
+
import { VariableSelector } from './shared/QueryBuilderVariableSelector.js';
|
66
|
+
import {
|
67
|
+
generateMilestonedPropertyParameterValue,
|
68
|
+
isDefaultDatePropagationSupported,
|
69
|
+
matchMilestoningParameterValue,
|
70
|
+
} from '../stores/milestoning/QueryBuilderMilestoningHelper.js';
|
60
71
|
|
61
72
|
const DerivedPropertyParameterValueEditor = observer(
|
62
73
|
(props: {
|
@@ -71,10 +82,10 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
71
82
|
derivedPropertyExpressionState.parameters[idx]?.genericType,
|
72
83
|
).value.rawType;
|
73
84
|
const handleDrop = useCallback(
|
74
|
-
(item:
|
85
|
+
(item: QueryBuilderVariableDragSource): void => {
|
75
86
|
functionExpression_setParameterValue(
|
76
87
|
derivedPropertyExpressionState.propertyExpression,
|
77
|
-
item.variable
|
88
|
+
item.variable,
|
78
89
|
idx + 1,
|
79
90
|
derivedPropertyExpressionState.queryBuilderState.observableContext,
|
80
91
|
);
|
@@ -82,14 +93,14 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
82
93
|
[derivedPropertyExpressionState, idx],
|
83
94
|
);
|
84
95
|
const [{ isParameterValueDragOver }, dropTargetConnector] = useDrop<
|
85
|
-
|
96
|
+
QueryBuilderVariableDragSource,
|
86
97
|
void,
|
87
98
|
{ isParameterValueDragOver: boolean }
|
88
99
|
>(
|
89
100
|
() => ({
|
90
|
-
accept: [
|
101
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
91
102
|
drop: (item, monitor): void => {
|
92
|
-
const itemType = item.variable.
|
103
|
+
const itemType = item.variable.genericType?.value.rawType;
|
93
104
|
if (
|
94
105
|
!monitor.didDrop() &&
|
95
106
|
// Doing a type check, which only allows dragging and dropping parameters of the same type or of child types
|
@@ -108,6 +119,76 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
108
119
|
}),
|
109
120
|
[handleDrop],
|
110
121
|
);
|
122
|
+
const queryBuilderState = derivedPropertyExpressionState.queryBuilderState;
|
123
|
+
// Resets the next property expression in the property chain for milestoned properties when the user changes
|
124
|
+
// the milestoned dates of current property expression and it propagates those dates to next property expression.
|
125
|
+
const resetNextExpression = (
|
126
|
+
nextExpression: AbstractPropertyExpression,
|
127
|
+
): void => {
|
128
|
+
const milestoningStereotype = getMilestoneTemporalStereotype(
|
129
|
+
guaranteeType(
|
130
|
+
nextExpression.func.value.genericType.value.rawType,
|
131
|
+
Class,
|
132
|
+
),
|
133
|
+
queryBuilderState.graphManagerState.graph,
|
134
|
+
);
|
135
|
+
nextExpression.parametersValues.slice(1).forEach((parameter, index) => {
|
136
|
+
if (
|
137
|
+
milestoningStereotype &&
|
138
|
+
parameter instanceof INTERNAL__PropagatedValue &&
|
139
|
+
!matchMilestoningParameterValue(
|
140
|
+
milestoningStereotype,
|
141
|
+
index,
|
142
|
+
parameter.getValue(),
|
143
|
+
queryBuilderState.milestoningState,
|
144
|
+
)
|
145
|
+
) {
|
146
|
+
const newParameterValue = new INTERNAL__PropagatedValue(() =>
|
147
|
+
guaranteeNonNullable(
|
148
|
+
queryBuilderState.milestoningState
|
149
|
+
.getMilestoningImplementation(milestoningStereotype)
|
150
|
+
.getMilestoningDate(index),
|
151
|
+
),
|
152
|
+
);
|
153
|
+
newParameterValue.isPropagatedValue = false;
|
154
|
+
functionExpression_setParameterValue(
|
155
|
+
guaranteeType(nextExpression, AbstractPropertyExpression),
|
156
|
+
guaranteeNonNullable(newParameterValue),
|
157
|
+
index + 1,
|
158
|
+
queryBuilderState.observableContext,
|
159
|
+
);
|
160
|
+
}
|
161
|
+
});
|
162
|
+
};
|
163
|
+
const checkDatePropagation = (
|
164
|
+
nextExpression: ValueSpecification | undefined,
|
165
|
+
): void => {
|
166
|
+
if (
|
167
|
+
nextExpression instanceof AbstractPropertyExpression &&
|
168
|
+
isDefaultDatePropagationSupported(nextExpression, queryBuilderState) &&
|
169
|
+
nextExpression.func.value.genericType.value.rawType instanceof Class
|
170
|
+
) {
|
171
|
+
queryBuilderState.applicationStore.setActionAlertInfo({
|
172
|
+
message:
|
173
|
+
'You have just changed a milestoning date in the property expression chain, this date will be propagated down the rest of the chain. Do you want to proceed? Otherwise, you can choose to propagate the default milestoning dates instead.',
|
174
|
+
type: ActionAlertType.CAUTION,
|
175
|
+
actions: [
|
176
|
+
{
|
177
|
+
label: 'Proceed',
|
178
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
179
|
+
default: true,
|
180
|
+
},
|
181
|
+
{
|
182
|
+
label: 'Propagate default milestoning date(s)',
|
183
|
+
type: ActionAlertActionType.PROCEED,
|
184
|
+
handler: queryBuilderState.applicationStore.guardUnhandledError(
|
185
|
+
async () => resetNextExpression(nextExpression),
|
186
|
+
),
|
187
|
+
},
|
188
|
+
],
|
189
|
+
});
|
190
|
+
}
|
191
|
+
};
|
111
192
|
const resetParameterValue = (): void => {
|
112
193
|
functionExpression_setParameterValue(
|
113
194
|
derivedPropertyExpressionState.propertyExpression,
|
@@ -123,7 +204,23 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
123
204
|
idx + 1,
|
124
205
|
derivedPropertyExpressionState.queryBuilderState.observableContext,
|
125
206
|
);
|
207
|
+
const derivedPropertyExpressionStates =
|
208
|
+
derivedPropertyExpressionState.propertyExpressionState
|
209
|
+
.derivedPropertyExpressionStates;
|
210
|
+
const currentDerivedPropertyStateindex =
|
211
|
+
derivedPropertyExpressionStates.indexOf(derivedPropertyExpressionState);
|
212
|
+
checkDatePropagation(
|
213
|
+
currentDerivedPropertyStateindex + 1 <
|
214
|
+
derivedPropertyExpressionStates.length
|
215
|
+
? derivedPropertyExpressionStates[
|
216
|
+
currentDerivedPropertyStateindex + 1
|
217
|
+
]?.propertyExpression
|
218
|
+
: undefined,
|
219
|
+
);
|
126
220
|
};
|
221
|
+
const valueSpec = guaranteeNonNullable(
|
222
|
+
derivedPropertyExpressionState.parameterValues[idx],
|
223
|
+
);
|
127
224
|
|
128
225
|
return (
|
129
226
|
<div key={variable.name} className="panel__content__form__section">
|
@@ -133,15 +230,13 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
133
230
|
<div className="panel__content__form__section__header__prompt">{`${
|
134
231
|
variable.multiplicity.lowerBound === 0 ? 'optional' : ''
|
135
232
|
}`}</div>
|
136
|
-
<div className="query-
|
233
|
+
<div className="query-builder__variable-editor">
|
137
234
|
<PanelDropZone
|
138
235
|
isDragOver={isParameterValueDragOver}
|
139
236
|
dropTargetConnector={dropTargetConnector}
|
140
237
|
>
|
141
238
|
<BasicValueSpecificationEditor
|
142
|
-
valueSpecification={
|
143
|
-
derivedPropertyExpressionState.parameterValues[idx],
|
144
|
-
)}
|
239
|
+
valueSpecification={valueSpec}
|
145
240
|
setValueSpecification={(val: ValueSpecification): void => {
|
146
241
|
functionExpression_setParameterValue(
|
147
242
|
derivedPropertyExpressionState.propertyExpression,
|
@@ -161,6 +256,9 @@ const DerivedPropertyParameterValueEditor = observer(
|
|
161
256
|
match: parameterType === PrimitiveType.DATETIME,
|
162
257
|
}}
|
163
258
|
resetValue={resetParameterValue}
|
259
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
260
|
+
valueSpec,
|
261
|
+
)}
|
164
262
|
/>
|
165
263
|
</PanelDropZone>
|
166
264
|
</div>
|
@@ -233,25 +331,10 @@ export const QueryBuilderPropertyExpressionEditor = observer(
|
|
233
331
|
/>
|
234
332
|
),
|
235
333
|
)}
|
236
|
-
<ModalBody className="query-
|
237
|
-
<
|
238
|
-
|
239
|
-
|
240
|
-
<div className="panel__content__form__section__list__items">
|
241
|
-
{propertyExpressionState.queryBuilderState.parametersState.parameterStates.map(
|
242
|
-
(parameter) => (
|
243
|
-
<VariableExpressionViewer
|
244
|
-
key={parameter.uuid}
|
245
|
-
queryBuilderState={
|
246
|
-
propertyExpressionState.queryBuilderState
|
247
|
-
}
|
248
|
-
variableExpressionState={parameter}
|
249
|
-
isReadOnly={true}
|
250
|
-
hideActions={true}
|
251
|
-
/>
|
252
|
-
),
|
253
|
-
)}
|
254
|
-
</div>
|
334
|
+
<ModalBody className="query-builder__variables__modal__body">
|
335
|
+
<VariableSelector
|
336
|
+
queryBuilderState={propertyExpressionState.queryBuilderState}
|
337
|
+
/>
|
255
338
|
</ModalBody>
|
256
339
|
</ModalBody>
|
257
340
|
<ModalFooter>
|
@@ -33,7 +33,6 @@ import {
|
|
33
33
|
type Runtime,
|
34
34
|
type ValueSpecification,
|
35
35
|
LATEST_DATE,
|
36
|
-
MILESTONING_STEREOTYPE,
|
37
36
|
PrimitiveInstanceValue,
|
38
37
|
VariableExpression,
|
39
38
|
getMilestoneTemporalStereotype,
|
@@ -51,7 +50,7 @@ import {
|
|
51
50
|
} from '@finos/legend-application';
|
52
51
|
import { MilestoningParametersEditor } from './explorer/QueryBuilderMilestoningEditor.js';
|
53
52
|
|
54
|
-
const getParameterValue = (
|
53
|
+
export const getParameterValue = (
|
55
54
|
parameter: ValueSpecification | undefined,
|
56
55
|
): string | undefined => {
|
57
56
|
if (parameter instanceof VariableExpression) {
|
@@ -87,26 +86,10 @@ const generateClassLabel = (
|
|
87
86
|
);
|
88
87
|
|
89
88
|
let milestoningTooltipText: string | undefined;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
)}`;
|
95
|
-
break;
|
96
|
-
case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL:
|
97
|
-
milestoningTooltipText = `Processing Date: ${getParameterValue(
|
98
|
-
queryBuilderState.milestoningState.processingDate,
|
99
|
-
)}`;
|
100
|
-
break;
|
101
|
-
case MILESTONING_STEREOTYPE.BITEMPORAL:
|
102
|
-
milestoningTooltipText = `Processing Date: ${getParameterValue(
|
103
|
-
queryBuilderState.milestoningState.processingDate,
|
104
|
-
)}, Business Date: ${getParameterValue(
|
105
|
-
queryBuilderState.milestoningState.businessDate,
|
106
|
-
)}`;
|
107
|
-
break;
|
108
|
-
default:
|
109
|
-
milestoningTooltipText = undefined;
|
89
|
+
if (milestoneStereotype) {
|
90
|
+
milestoningTooltipText = queryBuilderState.milestoningState
|
91
|
+
.getMilestoningImplementation(milestoneStereotype)
|
92
|
+
.getMilestoningToolTipText();
|
110
93
|
}
|
111
94
|
|
112
95
|
return (
|
@@ -16,13 +16,10 @@
|
|
16
16
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
18
18
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
19
|
-
import {
|
20
|
-
type QueryBuilderParameterDragSource,
|
21
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
22
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
23
19
|
import { useCallback } from 'react';
|
24
20
|
import {
|
25
21
|
type ValueSpecification,
|
22
|
+
type VariableExpression,
|
26
23
|
GenericType,
|
27
24
|
GenericTypeExplicitReference,
|
28
25
|
MILESTONING_STEREOTYPE,
|
@@ -33,7 +30,6 @@ import {
|
|
33
30
|
} from '@finos/legend-graph';
|
34
31
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
35
32
|
import { useDrop } from 'react-dnd';
|
36
|
-
import { VariableExpressionViewer } from '../QueryBuilderParametersPanel.js';
|
37
33
|
import {
|
38
34
|
Dialog,
|
39
35
|
Modal,
|
@@ -44,8 +40,13 @@ import {
|
|
44
40
|
PanelFormSection,
|
45
41
|
} from '@finos/legend-art';
|
46
42
|
import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
47
|
-
import {
|
43
|
+
import {
|
44
|
+
BasicValueSpecificationEditor,
|
45
|
+
type QueryBuilderVariableDragSource,
|
46
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
47
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
48
48
|
import { instanceValue_setValues } from '../../stores/shared/ValueSpecificationModifierHelper.js';
|
49
|
+
import { VariableSelector } from '../shared/QueryBuilderVariableSelector.js';
|
49
50
|
|
50
51
|
const MilestoningParameterEditor = observer(
|
51
52
|
(props: {
|
@@ -54,26 +55,22 @@ const MilestoningParameterEditor = observer(
|
|
54
55
|
}) => {
|
55
56
|
const { queryBuilderState, stereotype } = props;
|
56
57
|
const handleDrop = useCallback(
|
57
|
-
(item:
|
58
|
+
(item: QueryBuilderVariableDragSource): void => {
|
58
59
|
if (stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
|
59
|
-
queryBuilderState.milestoningState.setBusinessDate(
|
60
|
-
item.variable.parameter,
|
61
|
-
);
|
60
|
+
queryBuilderState.milestoningState.setBusinessDate(item.variable);
|
62
61
|
} else {
|
63
|
-
queryBuilderState.milestoningState.setProcessingDate(
|
64
|
-
item.variable.parameter,
|
65
|
-
);
|
62
|
+
queryBuilderState.milestoningState.setProcessingDate(item.variable);
|
66
63
|
}
|
67
64
|
},
|
68
65
|
[queryBuilderState, stereotype],
|
69
66
|
);
|
70
67
|
const [{ isMilestoningParameterValueDragOver }, dropConnector] = useDrop<
|
71
|
-
|
68
|
+
QueryBuilderVariableDragSource,
|
72
69
|
void,
|
73
70
|
{ isMilestoningParameterValueDragOver: boolean }
|
74
71
|
>(
|
75
72
|
() => ({
|
76
|
-
accept: [
|
73
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
77
74
|
drop: (item, monitor): void => {
|
78
75
|
if (!monitor.didDrop()) {
|
79
76
|
handleDrop(item);
|
@@ -119,7 +116,7 @@ const MilestoningParameterEditor = observer(
|
|
119
116
|
};
|
120
117
|
|
121
118
|
return (
|
122
|
-
<div ref={dropConnector} className="query-
|
119
|
+
<div ref={dropConnector} className="query-builder__variable-editor">
|
123
120
|
<PanelEntryDropZonePlaceholder
|
124
121
|
showPlaceholder={isMilestoningParameterValueDragOver}
|
125
122
|
label="Change Milestoning Parameter Value"
|
@@ -138,6 +135,9 @@ const MilestoningParameterEditor = observer(
|
|
138
135
|
expectedType: PrimitiveType.DATE,
|
139
136
|
}}
|
140
137
|
resetValue={resetMilestoningParameter}
|
138
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
139
|
+
milestoningParameter,
|
140
|
+
)}
|
141
141
|
/>
|
142
142
|
</PanelEntryDropZonePlaceholder>
|
143
143
|
</div>
|
@@ -243,6 +243,13 @@ export const MilestoningParametersEditor = observer(
|
|
243
243
|
const { queryBuilderState } = props;
|
244
244
|
const milestoningState = queryBuilderState.milestoningState;
|
245
245
|
const close = (): void => milestoningState.setShowMilestoningEditor(false);
|
246
|
+
const isCompatibleMilestoningParameter = (
|
247
|
+
variable: VariableExpression,
|
248
|
+
): boolean =>
|
249
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
|
250
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.LATESTDATE ||
|
251
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATE ||
|
252
|
+
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATETIME;
|
246
253
|
|
247
254
|
return (
|
248
255
|
<Dialog
|
@@ -256,36 +263,19 @@ export const MilestoningParametersEditor = observer(
|
|
256
263
|
>
|
257
264
|
<Modal
|
258
265
|
darkMode={true}
|
259
|
-
className="editor-modal query-
|
266
|
+
className="editor-modal query-builder__variables__modal"
|
260
267
|
>
|
261
268
|
<ModalHeader title="Milestoning Parameters" />
|
262
|
-
<ModalBody className="query-
|
269
|
+
<ModalBody className="query-builder__variables__modal__body">
|
263
270
|
<TemporalMilestoningEditor queryBuilderState={queryBuilderState} />
|
264
271
|
<div className="panel__content__form__section__header__label">
|
265
272
|
List of compatible milestoning parameters
|
266
273
|
</div>
|
267
274
|
<div className="panel__content__form__section__list__items">
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
PRIMITIVE_TYPE.STRICTDATE ||
|
273
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
274
|
-
PRIMITIVE_TYPE.LATESTDATE ||
|
275
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
276
|
-
PRIMITIVE_TYPE.DATE ||
|
277
|
-
parameter.parameter.genericType?.value.rawType.name ===
|
278
|
-
PRIMITIVE_TYPE.DATETIME,
|
279
|
-
)
|
280
|
-
.map((parameter) => (
|
281
|
-
<VariableExpressionViewer
|
282
|
-
key={parameter.uuid}
|
283
|
-
queryBuilderState={queryBuilderState}
|
284
|
-
variableExpressionState={parameter}
|
285
|
-
isReadOnly={true}
|
286
|
-
hideActions={true}
|
287
|
-
/>
|
288
|
-
))}
|
275
|
+
<VariableSelector
|
276
|
+
queryBuilderState={queryBuilderState}
|
277
|
+
filterBy={isCompatibleMilestoningParameter}
|
278
|
+
/>
|
289
279
|
</div>
|
290
280
|
</ModalBody>
|
291
281
|
<ModalFooter>
|
@@ -56,7 +56,7 @@ import {
|
|
56
56
|
QueryBuilderTDS_OLAPRankOperatorState,
|
57
57
|
QueryBuilderTDS_OLAPAggreationOperatorState,
|
58
58
|
QUERY_BUILDER_OLAP_COLUMN_DND_TYPE,
|
59
|
-
} from '../../stores/fetch-structure/tds/olapGroupBy/
|
59
|
+
} from '../../stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js';
|
60
60
|
import { QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
61
61
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
62
62
|
import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|