@finos/legend-query-builder 4.14.47 → 4.14.49
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderDocumentation.d.ts +3 -1
- package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderDocumentation.js +2 -0
- package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts +1 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +59 -46
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +22 -22
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +2 -2
- package/lib/components/QueryBuilderDiffPanel.js +7 -6
- 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 +29 -10
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +3 -3
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +14 -13
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +2 -2
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +14 -24
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +1 -1
- package/lib/components/QueryBuilderTextEditor.js +8 -7
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js +4 -3
- package/lib/components/QueryBuilderUnsupportedQueryEditor.js.map +1 -1
- package/lib/components/QueryChat.d.ts +1 -1
- package/lib/components/QueryChat.js +3 -2
- package/lib/components/QueryChat.js.map +1 -1
- package/lib/components/QueryLoader.d.ts +2 -2
- package/lib/components/QueryLoader.js +25 -24
- package/lib/components/QueryLoader.js.map +1 -1
- package/lib/components/QueryUsageViewer.d.ts +1 -1
- package/lib/components/QueryUsageViewer.js +4 -3
- package/lib/components/QueryUsageViewer.js.map +1 -1
- package/lib/components/ServiceQuerySetupUtils.js +4 -3
- package/lib/components/ServiceQuerySetupUtils.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +3 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/data-access/DataAccessOverview.d.ts +1 -1
- package/lib/components/data-access/DataAccessOverview.js +17 -16
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js +4 -3
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js +3 -2
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js +4 -3
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts +3 -3
- package/lib/components/execution-plan/ExecutionPlanViewer.js +34 -33
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js +3 -2
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ImplementationViewer.js +4 -3
- package/lib/components/execution-plan/ImplementationViewer.js.map +1 -1
- package/lib/components/execution-plan/PartialClassResultViewer.js +3 -2
- package/lib/components/execution-plan/PartialClassResultViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/RelationalClassQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js +7 -6
- package/lib/components/execution-plan/RelationalCrossRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/RelationalRootQueryTempTableGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js +4 -3
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/ResultTypeViewer.js +5 -4
- package/lib/components/execution-plan/ResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js +7 -6
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js +6 -5
- package/lib/components/execution-plan/StoreMappingGlobalGraphFetchExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/TDSResultTypeViewer.js +4 -3
- package/lib/components/execution-plan/TDSResultTypeViewer.js.map +1 -1
- package/lib/components/execution-plan/TempTableStrategyViewer.js +3 -2
- package/lib/components/execution-plan/TempTableStrategyViewer.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +31 -30
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +20 -19
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/explorer/{QueryBuilderMilestoningEditor.d.ts → QueryBuilderMilestoningParameterEditor.d.ts} +6 -3
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.d.ts.map +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js +53 -0
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js.map +1 -0
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +18 -17
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js +9 -8
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +3 -3
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +24 -23
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +4 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +76 -54
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +3 -2
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +201 -29
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +9 -8
- package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +55 -36
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +29 -28
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +20 -19
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.d.ts +2 -2
- package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.js +19 -17
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +11 -10
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js +5 -4
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +9 -8
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +38 -37
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +21 -20
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +2 -2
- package/lib/components/shared/LambdaEditor.js +14 -13
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js +7 -6
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +4 -3
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +10 -9
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js +4 -3
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +2 -2
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js +15 -7
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +6 -5
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +6 -5
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +6 -5
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.d.ts +4 -0
- package/lib/graph-manager/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.js +5 -0
- package/lib/graph-manager/QueryBuilderConfig.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +3 -3
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/QueryLoaderState.d.ts +1 -0
- package/lib/stores/QueryLoaderState.d.ts.map +1 -1
- package/lib/stores/QueryLoaderState.js +1 -0
- package/lib/stores/QueryLoaderState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +8 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js +4 -2
- package/lib/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +13 -2
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +8 -1
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +25 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts +5 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js +62 -3
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +2 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +8 -1
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -0
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +7 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/package.json +4 -4
- package/src/__lib__/QueryBuilderDocumentation.ts +2 -0
- package/src/components/QueryBuilder.tsx +44 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +13 -4
- package/src/components/QueryBuilderParametersPanel.tsx +55 -0
- package/src/components/QueryBuilderSideBar.tsx +0 -42
- package/src/components/explorer/QueryBuilderMilestoningParameterEditor.tsx +114 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +143 -78
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +445 -19
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +134 -21
- package/src/components/result/QueryBuilderResultPanel.tsx +9 -1
- package/src/components/shared/QueryBuilderVariableSelector.tsx +22 -0
- package/src/graph-manager/QueryBuilderConfig.ts +6 -0
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +4 -1
- package/src/stores/QueryLoaderState.ts +1 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +11 -0
- package/src/stores/fetch-structure/tds/aggregation/operators/QueryBuilderAggregateOperator_Percentile.ts +6 -2
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +1 -0
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +1 -0
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +23 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +13 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +45 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +3 -0
- package/src/stores/milestoning/QueryBuilderMilestoningState.ts +95 -7
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +13 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +11 -0
- package/tsconfig.json +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +0 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +0 -102
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +0 -1
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +0 -364
@@ -1,364 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
import { observer } from 'mobx-react-lite';
|
18
|
-
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
19
|
-
import { useCallback } from 'react';
|
20
|
-
import {
|
21
|
-
type ValueSpecification,
|
22
|
-
type VariableExpression,
|
23
|
-
GenericType,
|
24
|
-
GenericTypeExplicitReference,
|
25
|
-
observe_PrimitiveInstanceValue,
|
26
|
-
PrimitiveInstanceValue,
|
27
|
-
PRIMITIVE_TYPE,
|
28
|
-
PrimitiveType,
|
29
|
-
} from '@finos/legend-graph';
|
30
|
-
import { guaranteeNonNullable } from '@finos/legend-shared';
|
31
|
-
import { useDrop } from 'react-dnd';
|
32
|
-
import {
|
33
|
-
Dialog,
|
34
|
-
Modal,
|
35
|
-
ModalBody,
|
36
|
-
ModalFooter,
|
37
|
-
ModalFooterButton,
|
38
|
-
ModalHeader,
|
39
|
-
PanelEntryDropZonePlaceholder,
|
40
|
-
PanelFormBooleanField,
|
41
|
-
PanelFormSection,
|
42
|
-
} from '@finos/legend-art';
|
43
|
-
import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
44
|
-
import {
|
45
|
-
BasicValueSpecificationEditor,
|
46
|
-
type QueryBuilderVariableDragSource,
|
47
|
-
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
48
|
-
} from '../shared/BasicValueSpecificationEditor.js';
|
49
|
-
import { instanceValue_setValues } from '../../stores/shared/ValueSpecificationModifierHelper.js';
|
50
|
-
import { VariableSelector } from '../shared/QueryBuilderVariableSelector.js';
|
51
|
-
|
52
|
-
const MilestoningParameterEditor = observer(
|
53
|
-
(props: {
|
54
|
-
queryBuilderState: QueryBuilderState;
|
55
|
-
parameter: ValueSpecification;
|
56
|
-
setParameter: (val: ValueSpecification) => void;
|
57
|
-
}) => {
|
58
|
-
const { queryBuilderState, parameter, setParameter } = props;
|
59
|
-
const handleDrop = useCallback(
|
60
|
-
(item: QueryBuilderVariableDragSource): void => {
|
61
|
-
setParameter(item.variable);
|
62
|
-
},
|
63
|
-
[setParameter],
|
64
|
-
);
|
65
|
-
const [{ isDragOver }, dropConnector] = useDrop<
|
66
|
-
QueryBuilderVariableDragSource,
|
67
|
-
void,
|
68
|
-
{ isDragOver: boolean }
|
69
|
-
>(
|
70
|
-
() => ({
|
71
|
-
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
72
|
-
drop: (item, monitor): void => {
|
73
|
-
if (!monitor.didDrop()) {
|
74
|
-
handleDrop(item);
|
75
|
-
}
|
76
|
-
},
|
77
|
-
collect: (monitor): { isDragOver: boolean } => ({
|
78
|
-
isDragOver: monitor.isOver({
|
79
|
-
shallow: true,
|
80
|
-
}),
|
81
|
-
}),
|
82
|
-
}),
|
83
|
-
[handleDrop],
|
84
|
-
);
|
85
|
-
const resetMilestoningParameter = (): void => {
|
86
|
-
const param = observe_PrimitiveInstanceValue(
|
87
|
-
new PrimitiveInstanceValue(
|
88
|
-
GenericTypeExplicitReference.create(
|
89
|
-
new GenericType(PrimitiveType.STRICTDATE),
|
90
|
-
),
|
91
|
-
),
|
92
|
-
queryBuilderState.observerContext,
|
93
|
-
);
|
94
|
-
instanceValue_setValues(
|
95
|
-
param,
|
96
|
-
[generateDefaultValueForPrimitiveType(PRIMITIVE_TYPE.STRICTDATE)],
|
97
|
-
queryBuilderState.observerContext,
|
98
|
-
);
|
99
|
-
setParameter(param);
|
100
|
-
};
|
101
|
-
|
102
|
-
return (
|
103
|
-
<div ref={dropConnector} className="query-builder__variable-editor">
|
104
|
-
<PanelEntryDropZonePlaceholder
|
105
|
-
isDragOver={isDragOver}
|
106
|
-
label="Change Milestoning Parameter Value"
|
107
|
-
>
|
108
|
-
<BasicValueSpecificationEditor
|
109
|
-
valueSpecification={parameter}
|
110
|
-
graph={queryBuilderState.graphManagerState.graph}
|
111
|
-
obseverContext={queryBuilderState.observerContext}
|
112
|
-
setValueSpecification={(val: ValueSpecification): void =>
|
113
|
-
setParameter(val)
|
114
|
-
}
|
115
|
-
typeCheckOption={{
|
116
|
-
expectedType: PrimitiveType.DATE,
|
117
|
-
}}
|
118
|
-
resetValue={resetMilestoningParameter}
|
119
|
-
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
120
|
-
parameter,
|
121
|
-
)}
|
122
|
-
/>
|
123
|
-
</PanelEntryDropZonePlaceholder>
|
124
|
-
</div>
|
125
|
-
);
|
126
|
-
},
|
127
|
-
);
|
128
|
-
|
129
|
-
const BiTemporalMilestoningEditor = observer(
|
130
|
-
(props: { queryBuilderState: QueryBuilderState }) => {
|
131
|
-
const { queryBuilderState } = props;
|
132
|
-
return (
|
133
|
-
<>
|
134
|
-
<PanelFormSection>
|
135
|
-
<div className="panel__content__form__section__header__label">
|
136
|
-
Processing Date
|
137
|
-
</div>
|
138
|
-
<MilestoningParameterEditor
|
139
|
-
queryBuilderState={queryBuilderState}
|
140
|
-
parameter={guaranteeNonNullable(
|
141
|
-
queryBuilderState.milestoningState.processingDate,
|
142
|
-
)}
|
143
|
-
setParameter={(val: ValueSpecification): void =>
|
144
|
-
queryBuilderState.milestoningState.setProcessingDate(val)
|
145
|
-
}
|
146
|
-
/>
|
147
|
-
</PanelFormSection>
|
148
|
-
<PanelFormSection>
|
149
|
-
<div className="panel__content__form__section__header__label">
|
150
|
-
Business Date
|
151
|
-
</div>
|
152
|
-
<MilestoningParameterEditor
|
153
|
-
queryBuilderState={queryBuilderState}
|
154
|
-
parameter={guaranteeNonNullable(
|
155
|
-
queryBuilderState.milestoningState.businessDate,
|
156
|
-
)}
|
157
|
-
setParameter={(val: ValueSpecification): void =>
|
158
|
-
queryBuilderState.milestoningState.setBusinessDate(val)
|
159
|
-
}
|
160
|
-
/>
|
161
|
-
</PanelFormSection>
|
162
|
-
</>
|
163
|
-
);
|
164
|
-
},
|
165
|
-
);
|
166
|
-
|
167
|
-
const BusinessTemporalMilestoningEditor = observer(
|
168
|
-
(props: { queryBuilderState: QueryBuilderState }) => {
|
169
|
-
const { queryBuilderState } = props;
|
170
|
-
return (
|
171
|
-
<PanelFormSection>
|
172
|
-
<div className="panel__content__form__section__header__label">
|
173
|
-
Business Date
|
174
|
-
</div>
|
175
|
-
<MilestoningParameterEditor
|
176
|
-
key="BusinessDate"
|
177
|
-
queryBuilderState={queryBuilderState}
|
178
|
-
parameter={guaranteeNonNullable(
|
179
|
-
queryBuilderState.milestoningState.businessDate,
|
180
|
-
)}
|
181
|
-
setParameter={(val: ValueSpecification): void =>
|
182
|
-
queryBuilderState.milestoningState.setBusinessDate(val)
|
183
|
-
}
|
184
|
-
/>
|
185
|
-
</PanelFormSection>
|
186
|
-
);
|
187
|
-
},
|
188
|
-
);
|
189
|
-
|
190
|
-
const ProcessingTemporalMilestoningEditor = observer(
|
191
|
-
(props: { queryBuilderState: QueryBuilderState }) => {
|
192
|
-
const { queryBuilderState } = props;
|
193
|
-
return (
|
194
|
-
<PanelFormSection>
|
195
|
-
<div className="panel__content__form__section__header__label">
|
196
|
-
Processing Date
|
197
|
-
</div>
|
198
|
-
<MilestoningParameterEditor
|
199
|
-
key="BusinessDate"
|
200
|
-
queryBuilderState={queryBuilderState}
|
201
|
-
parameter={guaranteeNonNullable(
|
202
|
-
queryBuilderState.milestoningState.processingDate,
|
203
|
-
)}
|
204
|
-
setParameter={(val: ValueSpecification): void =>
|
205
|
-
queryBuilderState.milestoningState.setProcessingDate(val)
|
206
|
-
}
|
207
|
-
/>
|
208
|
-
</PanelFormSection>
|
209
|
-
);
|
210
|
-
},
|
211
|
-
);
|
212
|
-
|
213
|
-
const TemporalMilestoningEditor: React.FC<{
|
214
|
-
queryBuilderState: QueryBuilderState;
|
215
|
-
}> = (props) => {
|
216
|
-
const { queryBuilderState } = props;
|
217
|
-
|
218
|
-
if (
|
219
|
-
queryBuilderState.milestoningState.processingDate &&
|
220
|
-
queryBuilderState.milestoningState.businessDate
|
221
|
-
) {
|
222
|
-
return (
|
223
|
-
<BiTemporalMilestoningEditor queryBuilderState={queryBuilderState} />
|
224
|
-
);
|
225
|
-
} else if (queryBuilderState.milestoningState.businessDate) {
|
226
|
-
return (
|
227
|
-
<BusinessTemporalMilestoningEditor
|
228
|
-
queryBuilderState={queryBuilderState}
|
229
|
-
/>
|
230
|
-
);
|
231
|
-
} else if (queryBuilderState.milestoningState.processingDate) {
|
232
|
-
return (
|
233
|
-
<ProcessingTemporalMilestoningEditor
|
234
|
-
queryBuilderState={queryBuilderState}
|
235
|
-
/>
|
236
|
-
);
|
237
|
-
} else {
|
238
|
-
return null;
|
239
|
-
}
|
240
|
-
};
|
241
|
-
|
242
|
-
const AllVersionsInRangelMilestoningParametersEditor = observer(
|
243
|
-
(props: { queryBuilderState: QueryBuilderState }) => {
|
244
|
-
const { queryBuilderState } = props;
|
245
|
-
|
246
|
-
return (
|
247
|
-
<div className="query-builder__milestoning-panel__all-versions-in-range-editor">
|
248
|
-
<PanelFormSection>
|
249
|
-
<div className="panel__content__form__section__header__label">
|
250
|
-
Start Date
|
251
|
-
</div>
|
252
|
-
<MilestoningParameterEditor
|
253
|
-
queryBuilderState={queryBuilderState}
|
254
|
-
parameter={guaranteeNonNullable(
|
255
|
-
queryBuilderState.milestoningState.startDate,
|
256
|
-
)}
|
257
|
-
setParameter={(val: ValueSpecification): void =>
|
258
|
-
queryBuilderState.milestoningState.setStartDate(val)
|
259
|
-
}
|
260
|
-
/>
|
261
|
-
</PanelFormSection>
|
262
|
-
<PanelFormSection>
|
263
|
-
<div className="panel__content__form__section__header__label">
|
264
|
-
End Date
|
265
|
-
</div>
|
266
|
-
<MilestoningParameterEditor
|
267
|
-
queryBuilderState={queryBuilderState}
|
268
|
-
parameter={guaranteeNonNullable(
|
269
|
-
queryBuilderState.milestoningState.endDate,
|
270
|
-
)}
|
271
|
-
setParameter={(val: ValueSpecification): void =>
|
272
|
-
queryBuilderState.milestoningState.setEndDate(val)
|
273
|
-
}
|
274
|
-
/>
|
275
|
-
</PanelFormSection>
|
276
|
-
</div>
|
277
|
-
);
|
278
|
-
},
|
279
|
-
);
|
280
|
-
|
281
|
-
export const MilestoningParametersEditor = observer(
|
282
|
-
(props: { queryBuilderState: QueryBuilderState }) => {
|
283
|
-
const { queryBuilderState } = props;
|
284
|
-
const applicationStore = queryBuilderState.applicationStore;
|
285
|
-
const milestoningState = queryBuilderState.milestoningState;
|
286
|
-
const close = (): void => milestoningState.setShowMilestoningEditor(false);
|
287
|
-
const isCompatibleMilestoningParameter = (
|
288
|
-
variable: VariableExpression,
|
289
|
-
): boolean =>
|
290
|
-
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
|
291
|
-
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.LATESTDATE ||
|
292
|
-
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATE ||
|
293
|
-
variable.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATETIME;
|
294
|
-
|
295
|
-
return (
|
296
|
-
<Dialog
|
297
|
-
open={milestoningState.showMilestoningEditor}
|
298
|
-
onClose={close}
|
299
|
-
classes={{
|
300
|
-
root: 'editor-modal__root-container',
|
301
|
-
container: 'editor-modal__container',
|
302
|
-
paper: 'editor-modal__content',
|
303
|
-
}}
|
304
|
-
>
|
305
|
-
<Modal
|
306
|
-
darkMode={
|
307
|
-
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
308
|
-
}
|
309
|
-
className="editor-modal query-builder__variables__modal"
|
310
|
-
>
|
311
|
-
<ModalHeader title="Milestoning Parameters" />
|
312
|
-
<ModalBody className="query-builder__variables__modal__body">
|
313
|
-
{milestoningState.isCurrentClassMilestoned && (
|
314
|
-
<PanelFormBooleanField
|
315
|
-
isReadOnly={false}
|
316
|
-
value={milestoningState.isAllVersionsEnabled}
|
317
|
-
name="all Versions"
|
318
|
-
prompt="Query All Milestoned Versions of the Root Class"
|
319
|
-
update={(value: boolean | undefined): void =>
|
320
|
-
milestoningState.setAllVersions(value)
|
321
|
-
}
|
322
|
-
/>
|
323
|
-
)}
|
324
|
-
{milestoningState.isAllVersionsEnabled &&
|
325
|
-
milestoningState.isCurrentClassSupportsVersionsInRange && (
|
326
|
-
<>
|
327
|
-
<PanelFormBooleanField
|
328
|
-
isReadOnly={false}
|
329
|
-
value={milestoningState.isAllVersionsInRangeEnabled}
|
330
|
-
name=" All Versions In Range"
|
331
|
-
prompt="Optionally apply a date range to get All Versions for"
|
332
|
-
update={(value: boolean | undefined): void =>
|
333
|
-
milestoningState.setAllVersionsInRange(value)
|
334
|
-
}
|
335
|
-
/>
|
336
|
-
|
337
|
-
{milestoningState.isAllVersionsInRangeEnabled && (
|
338
|
-
<AllVersionsInRangelMilestoningParametersEditor
|
339
|
-
queryBuilderState={queryBuilderState}
|
340
|
-
/>
|
341
|
-
)}
|
342
|
-
</>
|
343
|
-
)}
|
344
|
-
<TemporalMilestoningEditor queryBuilderState={queryBuilderState} />
|
345
|
-
<PanelFormSection>
|
346
|
-
<div className="panel__content__form__section__header__label">
|
347
|
-
List of compatible milestoning parameters
|
348
|
-
</div>
|
349
|
-
</PanelFormSection>
|
350
|
-
<div className="panel__content__form__section__list__items">
|
351
|
-
<VariableSelector
|
352
|
-
queryBuilderState={queryBuilderState}
|
353
|
-
filterBy={isCompatibleMilestoningParameter}
|
354
|
-
/>
|
355
|
-
</div>
|
356
|
-
</ModalBody>
|
357
|
-
<ModalFooter>
|
358
|
-
<ModalFooterButton text="Close" onClick={close} type="secondary" />
|
359
|
-
</ModalFooter>
|
360
|
-
</Modal>
|
361
|
-
</Dialog>
|
362
|
-
);
|
363
|
-
},
|
364
|
-
);
|