@finos/legend-query-builder 0.4.3 → 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.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.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +10 -30
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- 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/QueryBuilderSideBar.d.ts +2 -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/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/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +2 -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.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.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- 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.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.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.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.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 +17 -1
- package/lib/index.css.map +1 -1
- package/lib/package.json +8 -8
- 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/QueryBuilderResultState.d.ts +1 -2
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +7 -12
- package/lib/stores/QueryBuilderResultState.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 +32 -29
- 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/LambdaParameterState.d.ts +14 -2
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
- package/lib/stores/shared/LambdaParameterState.js +79 -6
- package/lib/stores/shared/LambdaParameterState.js.map +1 -1
- 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 +15 -15
- 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 +24 -110
- 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/QueryBuilderResultState.ts +19 -17
- package/src/stores/QueryBuilderState.ts +25 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +48 -58
- 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/LambdaParameterState.ts +151 -10
- 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
@@ -70,10 +70,6 @@ import {
|
|
70
70
|
} from '@finos/legend-shared';
|
71
71
|
import { QUERY_BUILDER_TEST_ID } from '../QueryBuilder_TestID.js';
|
72
72
|
import { useApplicationStore } from '@finos/legend-application';
|
73
|
-
import {
|
74
|
-
type QueryBuilderParameterDragSource,
|
75
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
76
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
77
73
|
import type { ValueSpecification } from '@finos/legend-graph';
|
78
74
|
import {
|
79
75
|
type QueryBuilderProjectionColumnDragSource,
|
@@ -83,7 +79,11 @@ import {
|
|
83
79
|
import type { QueryBuilderFilterOperator } from '../../stores/filter/QueryBuilderFilterOperator.js';
|
84
80
|
import { isTypeCompatibleForAssignment } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
85
81
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../../stores/QueryBuilderGroupOperationHelper.js';
|
86
|
-
import {
|
82
|
+
import {
|
83
|
+
BasicValueSpecificationEditor,
|
84
|
+
type QueryBuilderVariableDragSource,
|
85
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
86
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
87
87
|
|
88
88
|
const QueryBuilderFilterGroupConditionEditor = observer(
|
89
89
|
(props: {
|
@@ -139,6 +139,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
139
139
|
const { node, isDragOver } = props;
|
140
140
|
const graph =
|
141
141
|
node.condition.filterState.queryBuilderState.graphManagerState.graph;
|
142
|
+
const queryBuilderState = node.condition.filterState.queryBuilderState;
|
142
143
|
const applicationStore = useApplicationStore();
|
143
144
|
const changeOperator = (val: QueryBuilderFilterOperator) => (): void =>
|
144
145
|
node.condition.changeOperator(val);
|
@@ -148,19 +149,18 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
148
149
|
node.condition.changeProperty(
|
149
150
|
buildPropertyExpressionFromExplorerTreeNodeData(
|
150
151
|
propertyNode,
|
151
|
-
|
152
|
+
queryBuilderState.explorerState,
|
152
153
|
),
|
153
154
|
);
|
154
155
|
// Drag and Drop on filter condition value
|
155
156
|
const handleDrop = useCallback(
|
156
|
-
(item:
|
157
|
-
const parameterType =
|
158
|
-
item.variable.parameter.genericType?.value.rawType;
|
157
|
+
(item: QueryBuilderVariableDragSource): void => {
|
158
|
+
const parameterType = item.variable.genericType?.value.rawType;
|
159
159
|
const conditionValueType =
|
160
160
|
node.condition.propertyExpressionState.propertyExpression.func.value
|
161
161
|
.genericType.value.rawType;
|
162
162
|
if (isTypeCompatibleForAssignment(parameterType, conditionValueType)) {
|
163
|
-
node.condition.setValue(item.variable
|
163
|
+
node.condition.setValue(item.variable);
|
164
164
|
} else {
|
165
165
|
applicationStore.notifyWarning(
|
166
166
|
`Incompatible parameter type ${parameterType?.name}. ${parameterType?.name} is not compatible with type ${conditionValueType.name}.`,
|
@@ -170,12 +170,12 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
170
170
|
[applicationStore, node.condition],
|
171
171
|
);
|
172
172
|
const [{ isFilterValueDragOver }, dropConnector] = useDrop<
|
173
|
-
|
173
|
+
QueryBuilderVariableDragSource,
|
174
174
|
void,
|
175
175
|
{ isFilterValueDragOver: boolean }
|
176
176
|
>(
|
177
177
|
() => ({
|
178
|
-
accept: [
|
178
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
179
179
|
drop: (item, monitor): void => {
|
180
180
|
if (!monitor.didDrop()) {
|
181
181
|
handleDrop(item);
|
@@ -212,7 +212,6 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
212
212
|
reloadValues: debouncedTypeaheadSearch,
|
213
213
|
cleanUpReloadValues,
|
214
214
|
};
|
215
|
-
|
216
215
|
return (
|
217
216
|
<div className="query-builder-filter-tree__node__label__content">
|
218
217
|
<PanelEntryDropZonePlaceholder
|
@@ -270,10 +269,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
270
269
|
valueSpecification={node.condition.value}
|
271
270
|
setValueSpecification={changeValueSpecification}
|
272
271
|
graph={graph}
|
273
|
-
obseverContext={
|
274
|
-
node.condition.filterState.queryBuilderState
|
275
|
-
.observableContext
|
276
|
-
}
|
272
|
+
obseverContext={queryBuilderState.observableContext}
|
277
273
|
typeCheckOption={{
|
278
274
|
expectedType:
|
279
275
|
node.condition.propertyExpressionState
|
@@ -282,6 +278,9 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
282
278
|
}}
|
283
279
|
resetValue={resetNode}
|
284
280
|
selectorConfig={selectorConfig}
|
281
|
+
isConstant={queryBuilderState.constantState.isValueSpecConstant(
|
282
|
+
node.condition.value,
|
283
|
+
)}
|
285
284
|
/>
|
286
285
|
</PanelEntryDropZonePlaceholder>
|
287
286
|
</div>
|
@@ -28,6 +28,7 @@ import {
|
|
28
28
|
CustomSelectorInput,
|
29
29
|
SaveIcon,
|
30
30
|
PencilIcon,
|
31
|
+
DragPreviewLayer,
|
31
32
|
} from '@finos/legend-art';
|
32
33
|
import {
|
33
34
|
type Enum,
|
@@ -80,7 +81,7 @@ type TypeCheckOption = {
|
|
80
81
|
match?: boolean;
|
81
82
|
};
|
82
83
|
|
83
|
-
const
|
84
|
+
export const VariableInfoTooltip: React.FC<{
|
84
85
|
variable: VariableExpression;
|
85
86
|
children: React.ReactElement;
|
86
87
|
placement?: TooltipPlacement | undefined;
|
@@ -136,35 +137,55 @@ const ParameterInfoTooltip: React.FC<{
|
|
136
137
|
);
|
137
138
|
};
|
138
139
|
|
140
|
+
export const QUERY_BUILDER_VARIABLE_DND_TYPE = 'VARIABLE';
|
141
|
+
|
142
|
+
export interface QueryBuilderVariableDragSource {
|
143
|
+
variable: VariableExpression;
|
144
|
+
}
|
145
|
+
|
139
146
|
const VariableExpressionParameterEditor = observer(
|
140
147
|
(props: {
|
141
148
|
valueSpecification: VariableExpression;
|
142
|
-
className?: string | undefined;
|
143
149
|
resetValue: () => void;
|
150
|
+
className?: string | undefined;
|
151
|
+
isConstant?: boolean;
|
144
152
|
}) => {
|
145
|
-
const { valueSpecification,
|
153
|
+
const { valueSpecification, resetValue, isConstant, className } = props;
|
146
154
|
const varName = valueSpecification.name;
|
147
155
|
return (
|
148
|
-
|
149
|
-
<
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
>
|
164
|
-
<
|
165
|
-
|
156
|
+
<>
|
157
|
+
<DragPreviewLayer
|
158
|
+
labelGetter={(item: QueryBuilderVariableDragSource): string =>
|
159
|
+
item.variable.name
|
160
|
+
}
|
161
|
+
types={[QUERY_BUILDER_VARIABLE_DND_TYPE]}
|
162
|
+
/>
|
163
|
+
<div
|
164
|
+
className={clsx('value-spec-editor__variable', className, {
|
165
|
+
'value-spec-editor__variable__constant': isConstant,
|
166
|
+
})}
|
167
|
+
>
|
168
|
+
<div className="value-spec-editor__variable__icon">
|
169
|
+
{isConstant ? <div className="icon">C</div> : <DollarIcon />}
|
170
|
+
</div>
|
171
|
+
<div className="value-spec-editor__variable__label">
|
172
|
+
<div className="value-spec-editor__variable__text">{varName}</div>
|
173
|
+
<VariableInfoTooltip variable={valueSpecification}>
|
174
|
+
<div className="value-spec-editor__variable__info">
|
175
|
+
<InfoCircleIcon />
|
176
|
+
</div>
|
177
|
+
</VariableInfoTooltip>
|
178
|
+
|
179
|
+
<button
|
180
|
+
className="value-spec-editor__variable__reset-btn"
|
181
|
+
title="Reset"
|
182
|
+
onClick={resetValue}
|
183
|
+
>
|
184
|
+
<RefreshIcon />
|
185
|
+
</button>
|
186
|
+
</div>
|
166
187
|
</div>
|
167
|
-
|
188
|
+
</>
|
168
189
|
);
|
169
190
|
},
|
170
191
|
);
|
@@ -682,6 +703,7 @@ export const BasicValueSpecificationEditor: React.FC<{
|
|
682
703
|
className?: string | undefined;
|
683
704
|
setValueSpecification: (val: ValueSpecification) => void;
|
684
705
|
resetValue: () => void;
|
706
|
+
isConstant?: boolean;
|
685
707
|
selectorConfig?:
|
686
708
|
| {
|
687
709
|
values: string[] | undefined;
|
@@ -702,6 +724,7 @@ export const BasicValueSpecificationEditor: React.FC<{
|
|
702
724
|
setValueSpecification,
|
703
725
|
resetValue,
|
704
726
|
selectorConfig,
|
727
|
+
isConstant,
|
705
728
|
} = props;
|
706
729
|
if (valueSpecification instanceof PrimitiveInstanceValue) {
|
707
730
|
const _type = valueSpecification.genericType.value.rawType;
|
@@ -728,6 +751,7 @@ export const BasicValueSpecificationEditor: React.FC<{
|
|
728
751
|
case PRIMITIVE_TYPE.NUMBER:
|
729
752
|
case PRIMITIVE_TYPE.FLOAT:
|
730
753
|
case PRIMITIVE_TYPE.DECIMAL:
|
754
|
+
case PRIMITIVE_TYPE.BINARY:
|
731
755
|
case PRIMITIVE_TYPE.INTEGER:
|
732
756
|
return (
|
733
757
|
<NumberPrimitiveInstanceValueEditor
|
@@ -790,6 +814,7 @@ export const BasicValueSpecificationEditor: React.FC<{
|
|
790
814
|
valueSpecification={valueSpecification}
|
791
815
|
className={className}
|
792
816
|
resetValue={resetValue}
|
817
|
+
isConstant={Boolean(isConstant)}
|
793
818
|
/>
|
794
819
|
);
|
795
820
|
} else if (valueSpecification instanceof INTERNAL__PropagatedValue) {
|
@@ -46,7 +46,6 @@ import {
|
|
46
46
|
import { flowResult } from 'mobx';
|
47
47
|
import { ParserError, type EngineError, type Type } from '@finos/legend-graph';
|
48
48
|
import {
|
49
|
-
createPassThroughOnKeyHandler,
|
50
49
|
EDITOR_LANGUAGE,
|
51
50
|
EDITOR_THEME,
|
52
51
|
TAB_SIZE,
|
@@ -191,13 +190,6 @@ const LambdaEditorInline = observer(
|
|
191
190
|
: EDITOR_THEME.LEGEND,
|
192
191
|
...lambdaEditorOptions,
|
193
192
|
});
|
194
|
-
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
195
|
-
// else, we could risk triggering these hotkeys command multiple times
|
196
|
-
// e.g.
|
197
|
-
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
198
|
-
// onKeyDownEventDisposer.current?.dispose();
|
199
|
-
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
200
|
-
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
201
193
|
setEditor(_editor);
|
202
194
|
}
|
203
195
|
}, [editor, applicationStore, useBaseTextEditorSettings]);
|
@@ -472,13 +464,6 @@ const LambdaEditorPopUp = observer(
|
|
472
464
|
language: EDITOR_LANGUAGE.PURE,
|
473
465
|
theme: EDITOR_THEME.LEGEND,
|
474
466
|
});
|
475
|
-
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
476
|
-
// else, we could risk triggering these hotkeys command multiple times
|
477
|
-
// e.g.
|
478
|
-
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
479
|
-
// onKeyDownEventDisposer.current?.dispose();
|
480
|
-
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
481
|
-
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
482
467
|
setEditor(_editor);
|
483
468
|
}
|
484
469
|
};
|
@@ -0,0 +1,186 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
DollarIcon,
|
19
|
+
DragPreviewLayer,
|
20
|
+
InfoCircleIcon,
|
21
|
+
PanelFormListItems,
|
22
|
+
PencilIcon,
|
23
|
+
TimesIcon,
|
24
|
+
useDragPreviewLayer,
|
25
|
+
} from '@finos/legend-art';
|
26
|
+
import type {
|
27
|
+
ValueSpecification,
|
28
|
+
VariableExpression,
|
29
|
+
} from '@finos/legend-graph';
|
30
|
+
import { observer } from 'mobx-react-lite';
|
31
|
+
import { useDrag } from 'react-dnd';
|
32
|
+
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
33
|
+
import { getValueSpecificationStringValue } from '../../stores/shared/ValueSpecificationEditorHelper.js';
|
34
|
+
import {
|
35
|
+
type QueryBuilderVariableDragSource,
|
36
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
37
|
+
VariableInfoTooltip,
|
38
|
+
} from './BasicValueSpecificationEditor.js';
|
39
|
+
|
40
|
+
export const VariableViewer = observer(
|
41
|
+
(props: {
|
42
|
+
variable: VariableExpression;
|
43
|
+
isReadOnly: boolean;
|
44
|
+
constantValue?: ValueSpecification | undefined;
|
45
|
+
actions?: {
|
46
|
+
editVariable: () => void;
|
47
|
+
deleteVariable: () => void;
|
48
|
+
};
|
49
|
+
}) => {
|
50
|
+
const { variable, constantValue, actions, isReadOnly } = props;
|
51
|
+
const valueString = constantValue
|
52
|
+
? getValueSpecificationStringValue(constantValue)
|
53
|
+
: undefined;
|
54
|
+
const name = variable.name;
|
55
|
+
const variableType = variable.genericType?.value.rawType;
|
56
|
+
const typeName = variableType?.name;
|
57
|
+
const editVariable = (): void => {
|
58
|
+
actions?.editVariable();
|
59
|
+
};
|
60
|
+
const deleteVariable = (): void => {
|
61
|
+
actions?.deleteVariable();
|
62
|
+
};
|
63
|
+
const [, dragConnector, dragPreviewConnector] = useDrag(
|
64
|
+
() => ({
|
65
|
+
type: QUERY_BUILDER_VARIABLE_DND_TYPE,
|
66
|
+
item: { variable: variable },
|
67
|
+
}),
|
68
|
+
[variable],
|
69
|
+
);
|
70
|
+
useDragPreviewLayer(dragPreviewConnector);
|
71
|
+
|
72
|
+
return (
|
73
|
+
<div className="query-builder__variables__variable" ref={dragConnector}>
|
74
|
+
<DragPreviewLayer
|
75
|
+
labelGetter={(item: QueryBuilderVariableDragSource): string =>
|
76
|
+
item.variable.name === '' ? '(unknown)' : item.variable.name
|
77
|
+
}
|
78
|
+
types={[QUERY_BUILDER_VARIABLE_DND_TYPE]}
|
79
|
+
/>
|
80
|
+
<div
|
81
|
+
onClick={editVariable}
|
82
|
+
className="query-builder__variables__variable__content"
|
83
|
+
>
|
84
|
+
<div className="query-builder__variables__variable__icon">
|
85
|
+
<div className="query-builder__variables__variable-icon">
|
86
|
+
{constantValue ? (
|
87
|
+
<div className="icon query-builder__variables__variable-icon">
|
88
|
+
C
|
89
|
+
</div>
|
90
|
+
) : (
|
91
|
+
<DollarIcon />
|
92
|
+
)}
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div className="query-builder__variables__variable__label">
|
96
|
+
{name}
|
97
|
+
{valueString ? (
|
98
|
+
<div className="query-builder__constants__value">
|
99
|
+
{valueString}
|
100
|
+
</div>
|
101
|
+
) : (
|
102
|
+
<div className="query-builder__variables__variable__type">
|
103
|
+
<div className="query-builder__variables__variable__type__label">
|
104
|
+
{typeName}
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
)}
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
{actions && (
|
111
|
+
<div className="query-builder__variables__variable__actions">
|
112
|
+
<button
|
113
|
+
className="query-builder__variables__variable__action"
|
114
|
+
tabIndex={-1}
|
115
|
+
disabled={isReadOnly}
|
116
|
+
onClick={editVariable}
|
117
|
+
title="Edit"
|
118
|
+
>
|
119
|
+
<PencilIcon />
|
120
|
+
</button>
|
121
|
+
<button
|
122
|
+
className="query-builder__variables__variable__action"
|
123
|
+
tabIndex={-1}
|
124
|
+
onClick={deleteVariable}
|
125
|
+
disabled={isReadOnly}
|
126
|
+
title="Remove"
|
127
|
+
>
|
128
|
+
<TimesIcon />
|
129
|
+
</button>
|
130
|
+
<VariableInfoTooltip variable={variable}>
|
131
|
+
<div className="value-spec-editor__variable__info">
|
132
|
+
<InfoCircleIcon />
|
133
|
+
</div>
|
134
|
+
</VariableInfoTooltip>
|
135
|
+
</div>
|
136
|
+
)}
|
137
|
+
</div>
|
138
|
+
);
|
139
|
+
},
|
140
|
+
);
|
141
|
+
|
142
|
+
export const VariableSelector = observer(
|
143
|
+
(props: {
|
144
|
+
queryBuilderState: QueryBuilderState;
|
145
|
+
filterBy?: (variableExpression: VariableExpression) => boolean;
|
146
|
+
}) => {
|
147
|
+
const { queryBuilderState, filterBy } = props;
|
148
|
+
const isReadOnly = !queryBuilderState.isQuerySupported;
|
149
|
+
const filteredParameterStates =
|
150
|
+
queryBuilderState.parametersState.parameterStates.filter((p) =>
|
151
|
+
filterBy ? filterBy(p.parameter) : true,
|
152
|
+
);
|
153
|
+
const filteredConstantState =
|
154
|
+
queryBuilderState.constantState.constants.filter((c) =>
|
155
|
+
filterBy ? filterBy(c.variable) : true,
|
156
|
+
);
|
157
|
+
return (
|
158
|
+
<>
|
159
|
+
<PanelFormListItems title="Available parameters">
|
160
|
+
{filteredParameterStates.length === 0 && (
|
161
|
+
<> No available parameters </>
|
162
|
+
)}
|
163
|
+
{filteredParameterStates.map((pState) => (
|
164
|
+
<VariableViewer
|
165
|
+
key={pState.uuid}
|
166
|
+
variable={pState.parameter}
|
167
|
+
isReadOnly={isReadOnly}
|
168
|
+
/>
|
169
|
+
))}
|
170
|
+
</PanelFormListItems>
|
171
|
+
{Boolean(filteredConstantState.length) && (
|
172
|
+
<PanelFormListItems title="Available constants">
|
173
|
+
{filteredConstantState.map((constantState) => (
|
174
|
+
<VariableViewer
|
175
|
+
key={constantState.uuid}
|
176
|
+
variable={constantState.variable}
|
177
|
+
constantValue={constantState.value}
|
178
|
+
isReadOnly={isReadOnly}
|
179
|
+
/>
|
180
|
+
))}
|
181
|
+
</PanelFormListItems>
|
182
|
+
)}
|
183
|
+
</>
|
184
|
+
);
|
185
|
+
},
|
186
|
+
);
|
@@ -24,7 +24,6 @@ import {
|
|
24
24
|
ModalBody,
|
25
25
|
ModalFooter,
|
26
26
|
ModalHeader,
|
27
|
-
PanelFormListItems,
|
28
27
|
PanelFormSection,
|
29
28
|
} from '@finos/legend-art';
|
30
29
|
import {
|
@@ -37,14 +36,14 @@ import {
|
|
37
36
|
import { observer } from 'mobx-react-lite';
|
38
37
|
import { useCallback } from 'react';
|
39
38
|
import { useDrop } from 'react-dnd';
|
40
|
-
import {
|
41
|
-
type QueryBuilderParameterDragSource,
|
42
|
-
QUERY_BUILDER_PARAMETER_DND_TYPE,
|
43
|
-
} from '../../stores/QueryBuilderParametersState.js';
|
44
39
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
45
40
|
import type { QueryBuilderWatermarkState } from '../../stores/watermark/QueryBuilderWatermarkState.js';
|
46
|
-
import {
|
47
|
-
|
41
|
+
import {
|
42
|
+
BasicValueSpecificationEditor,
|
43
|
+
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
44
|
+
type QueryBuilderVariableDragSource,
|
45
|
+
} from '../shared/BasicValueSpecificationEditor.js';
|
46
|
+
import { VariableSelector } from '../shared/QueryBuilderVariableSelector.js';
|
48
47
|
|
49
48
|
const isParamaterCompatibleWithWaterMark = (
|
50
49
|
parameter: VariableExpression,
|
@@ -62,24 +61,24 @@ const WatermarkValueEditor = observer(
|
|
62
61
|
const graph = watermarkState.queryBuilderState.graphManagerState.graph;
|
63
62
|
|
64
63
|
const handleDrop = useCallback(
|
65
|
-
(item:
|
66
|
-
watermarkState.setValue(item.variable
|
64
|
+
(item: QueryBuilderVariableDragSource): void => {
|
65
|
+
watermarkState.setValue(item.variable);
|
67
66
|
},
|
68
67
|
[watermarkState],
|
69
68
|
);
|
70
69
|
|
71
70
|
const [{ isParameterValueDragOver }, dropTargetConnector] = useDrop<
|
72
|
-
|
71
|
+
QueryBuilderVariableDragSource,
|
73
72
|
void,
|
74
73
|
{ isParameterValueDragOver: boolean }
|
75
74
|
>(
|
76
75
|
() => ({
|
77
|
-
accept: [
|
76
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
78
77
|
drop: (item, monitor): void => {
|
79
78
|
if (
|
80
79
|
!monitor.didDrop() &&
|
81
80
|
// Only allows parameters with muliplicity 1 and type string
|
82
|
-
isParamaterCompatibleWithWaterMark(item.variable
|
81
|
+
isParamaterCompatibleWithWaterMark(item.variable)
|
83
82
|
) {
|
84
83
|
handleDrop(item);
|
85
84
|
} // prevent drop event propagation to accomondate for nested DnD
|
@@ -95,7 +94,7 @@ const WatermarkValueEditor = observer(
|
|
95
94
|
|
96
95
|
return (
|
97
96
|
<PanelFormSection>
|
98
|
-
<div className="query-
|
97
|
+
<div className="query-builder__variable-editor">
|
99
98
|
<PanelDropZone
|
100
99
|
isDragOver={isParameterValueDragOver}
|
101
100
|
dropTargetConnector={dropTargetConnector}
|
@@ -115,6 +114,9 @@ const WatermarkValueEditor = observer(
|
|
115
114
|
resetValue={(): void => {
|
116
115
|
watermarkState.resetValue();
|
117
116
|
}}
|
117
|
+
isConstant={watermarkState.queryBuilderState.constantState.isValueSpecConstant(
|
118
|
+
watermarkValue,
|
119
|
+
)}
|
118
120
|
/>
|
119
121
|
</PanelDropZone>
|
120
122
|
</div>
|
@@ -130,10 +132,6 @@ export const QueryBuilderWatermarkEditor = observer(
|
|
130
132
|
const handleClose = (): void => {
|
131
133
|
watermarkState.setIsEditingWatermark(false);
|
132
134
|
};
|
133
|
-
const compatibleParameters =
|
134
|
-
queryBuilderState.parametersState.parameterStates.filter((p) =>
|
135
|
-
isParamaterCompatibleWithWaterMark(p.parameter),
|
136
|
-
);
|
137
135
|
|
138
136
|
return (
|
139
137
|
<Dialog
|
@@ -162,20 +160,10 @@ export const QueryBuilderWatermarkEditor = observer(
|
|
162
160
|
watermarkValue={watermarkState.value}
|
163
161
|
/>
|
164
162
|
<PanelDivider />
|
165
|
-
<
|
166
|
-
{
|
167
|
-
|
168
|
-
|
169
|
-
{compatibleParameters.map((parameter) => (
|
170
|
-
<VariableExpressionViewer
|
171
|
-
key={parameter.uuid}
|
172
|
-
queryBuilderState={queryBuilderState}
|
173
|
-
variableExpressionState={parameter}
|
174
|
-
isReadOnly={true}
|
175
|
-
hideActions={true}
|
176
|
-
/>
|
177
|
-
))}
|
178
|
-
</PanelFormListItems>
|
163
|
+
<VariableSelector
|
164
|
+
filterBy={isParamaterCompatibleWithWaterMark}
|
165
|
+
queryBuilderState={queryBuilderState}
|
166
|
+
/>
|
179
167
|
</>
|
180
168
|
)}
|
181
169
|
</PanelForm>
|
@@ -17,6 +17,8 @@
|
|
17
17
|
export enum QUERY_BUILDER_HASH_STRUCTURE {
|
18
18
|
// parameters state
|
19
19
|
PARAMETERS_STATE = 'PARAMETERS_STATE',
|
20
|
+
CONSTANT_STATE = 'CONSTANT_STATE',
|
21
|
+
CONSTANT_EXPRESSION_STATE = 'CONSTANT_EXPRESSION_STATE',
|
20
22
|
|
21
23
|
// projection state
|
22
24
|
AGGREGATE_OPERATOR_AVERAGE = 'AGGREGATE_OPERATOR_AVERAGE',
|
@@ -21,6 +21,7 @@ export enum QUERY_BUILDER_SOURCE_ID_LABEL {
|
|
21
21
|
|
22
22
|
export const DEFAULT_LAMBDA_VARIABLE_NAME = 'x';
|
23
23
|
export const DEFAULT_VARIABLE_NAME = 'var';
|
24
|
+
export const DEFAULT_CONSTANT_VARIABLE_NAME = 'c_var';
|
24
25
|
export const DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME = 'row';
|
25
26
|
|
26
27
|
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH = 5;
|