@finos/legend-query-builder 4.1.2 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +91 -24
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.d.ts +23 -0
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js +32 -0
- package/lib/components/execution-plan/AllocationExecutionNodeViewer.js.map +1 -0
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.d.ts +23 -0
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js +35 -0
- package/lib/components/execution-plan/ConstantExecutionNodeViewer.js.map +1 -0
- package/lib/components/execution-plan/DataTypeResultTypeViewer.d.ts +21 -0
- package/lib/components/execution-plan/DataTypeResultTypeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js +31 -0
- package/lib/components/execution-plan/DataTypeResultTypeViewer.js.map +1 -0
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts +10 -4
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.js +74 -62
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.d.ts +25 -0
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js +47 -0
- package/lib/components/execution-plan/FunctionParametersValidationNodeViewer.js.map +1 -0
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.d.ts +23 -0
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js +31 -0
- package/lib/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.js.map +1 -0
- package/lib/components/execution-plan/ResultTypeViewer.d.ts +21 -0
- package/lib/components/execution-plan/ResultTypeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/ResultTypeViewer.js +33 -0
- package/lib/components/execution-plan/ResultTypeViewer.js.map +1 -0
- package/lib/components/execution-plan/SQLExecutionNodeViewer.d.ts +9 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.d.ts.map +1 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js +12 -6
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js.map +1 -1
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.d.ts +23 -0
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js +38 -0
- package/lib/components/execution-plan/SequenceExecutionNodeViewer.js.map +1 -0
- package/lib/components/execution-plan/TDSResultTypeViewer.d.ts +21 -0
- package/lib/components/execution-plan/TDSResultTypeViewer.d.ts.map +1 -0
- package/lib/components/execution-plan/TDSResultTypeViewer.js +25 -0
- package/lib/components/execution-plan/TDSResultTypeViewer.js.map +1 -0
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +3 -3
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +24 -34
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +44 -11
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +20 -32
- package/lib/components/filter/QueryBuilderFilterPanel.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/QueryBuilderResultState.d.ts +0 -3
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +2 -25
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/execution-plan/ExecutionPlanState.d.ts +14 -1
- package/lib/stores/execution-plan/ExecutionPlanState.d.ts.map +1 -1
- package/lib/stores/execution-plan/ExecutionPlanState.js +86 -3
- package/lib/stores/execution-plan/ExecutionPlanState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +3 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +11 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/package.json +5 -5
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +1 -2
- package/src/components/QueryBuilderResultPanel.tsx +146 -30
- package/src/components/execution-plan/AllocationExecutionNodeViewer.tsx +77 -0
- package/src/components/execution-plan/ConstantExecutionNodeViewer.tsx +82 -0
- package/src/components/execution-plan/DataTypeResultTypeViewer.tsx +52 -0
- package/src/components/execution-plan/ExecutionPlanViewer.tsx +205 -195
- package/src/components/execution-plan/FunctionParametersValidationNodeViewer.tsx +118 -0
- package/src/components/execution-plan/RelationalTDSInstantiationExecutionNodeViewer.tsx +68 -0
- package/src/components/execution-plan/ResultTypeViewer.tsx +37 -0
- package/src/components/execution-plan/SQLExecutionNodeViewer.tsx +50 -19
- package/src/components/execution-plan/SequenceExecutionNodeViewer.tsx +95 -0
- package/src/components/execution-plan/TDSResultTypeViewer.tsx +59 -0
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +5 -8
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +32 -61
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +77 -14
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +6 -8
- package/src/components/filter/QueryBuilderFilterPanel.tsx +45 -73
- package/src/stores/QueryBuilderResultState.ts +1 -42
- package/src/stores/execution-plan/ExecutionPlanState.ts +142 -4
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +16 -0
- package/tsconfig.json +8 -0
@@ -0,0 +1,37 @@
|
|
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 {
|
19
|
+
type ResultType,
|
20
|
+
TDSResultType,
|
21
|
+
DataTypeResultType,
|
22
|
+
} from '@finos/legend-graph';
|
23
|
+
import { DataTypeResultTypeViewer } from './DataTypeResultTypeViewer.js';
|
24
|
+
import { TDSResultTypeViewer } from './TDSResultTypeViewer.js';
|
25
|
+
|
26
|
+
export const ResultTypeViewer: React.FC<{
|
27
|
+
resultType: ResultType;
|
28
|
+
}> = observer((props) => {
|
29
|
+
const { resultType } = props;
|
30
|
+
if (resultType instanceof DataTypeResultType) {
|
31
|
+
return <DataTypeResultTypeViewer resultType={resultType} />;
|
32
|
+
} else if (resultType instanceof TDSResultType) {
|
33
|
+
return <TDSResultTypeViewer resultType={resultType} />;
|
34
|
+
} else {
|
35
|
+
return <></>;
|
36
|
+
}
|
37
|
+
});
|
@@ -19,7 +19,11 @@ import {
|
|
19
19
|
type ExecutionPlanState,
|
20
20
|
EXECUTION_PLAN_VIEW_MODE,
|
21
21
|
} from '../../stores/execution-plan/ExecutionPlanState.js';
|
22
|
-
import {
|
22
|
+
import {
|
23
|
+
type SQLResultColumn,
|
24
|
+
stringifyDataType,
|
25
|
+
type ResultType,
|
26
|
+
} from '@finos/legend-graph';
|
23
27
|
import {
|
24
28
|
PanelListItem,
|
25
29
|
CopyIcon,
|
@@ -28,6 +32,7 @@ import {
|
|
28
32
|
PanelContent,
|
29
33
|
} from '@finos/legend-art';
|
30
34
|
import { tryToFormatSql } from '../QueryBuilderResultPanel.js';
|
35
|
+
import { ResultTypeViewer } from './ResultTypeViewer.js';
|
31
36
|
import {
|
32
37
|
CodeEditor,
|
33
38
|
CODE_EDITOR_LANGUAGE,
|
@@ -40,13 +45,14 @@ import {
|
|
40
45
|
* @modularize
|
41
46
|
* See https://github.com/finos/legend-studio/issues/65
|
42
47
|
*/
|
43
|
-
|
48
|
+
|
49
|
+
export const SQLExecutionNodeViewerHelper: React.FC<{
|
44
50
|
query: string;
|
45
51
|
resultColumns: SQLResultColumn[];
|
52
|
+
resultType: ResultType;
|
46
53
|
executionPlanState: ExecutionPlanState;
|
47
54
|
}> = observer((props) => {
|
48
|
-
const { query, resultColumns, executionPlanState } = props;
|
49
|
-
|
55
|
+
const { query, resultColumns, resultType, executionPlanState } = props;
|
50
56
|
const applicationStore = executionPlanState.applicationStore;
|
51
57
|
const copyExpression = (value: string): void => {
|
52
58
|
applicationStore.clipboardService
|
@@ -60,12 +66,9 @@ export const SQLExecutionNodeViewer: React.FC<{
|
|
60
66
|
)
|
61
67
|
.catch(applicationStore.alertUnhandledError);
|
62
68
|
};
|
69
|
+
|
63
70
|
return (
|
64
|
-
|
65
|
-
darkMode={
|
66
|
-
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
67
|
-
}
|
68
|
-
>
|
71
|
+
<>
|
69
72
|
<div className="query-builder__sql__container">
|
70
73
|
<PanelDivider />
|
71
74
|
<div key={query}>
|
@@ -125,17 +128,45 @@ export const SQLExecutionNodeViewer: React.FC<{
|
|
125
128
|
</table>
|
126
129
|
</div>
|
127
130
|
</div>
|
128
|
-
<
|
131
|
+
<ResultTypeViewer resultType={resultType} />
|
132
|
+
</>
|
133
|
+
);
|
134
|
+
});
|
129
135
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
export const SQLExecutionNodeViewer: React.FC<{
|
137
|
+
query: string;
|
138
|
+
resultColumns: SQLResultColumn[];
|
139
|
+
resultType: ResultType;
|
140
|
+
executionPlanState: ExecutionPlanState;
|
141
|
+
viewJson: boolean;
|
142
|
+
}> = observer((props) => {
|
143
|
+
const { query, resultColumns, resultType, executionPlanState, viewJson } =
|
144
|
+
props;
|
145
|
+
const applicationStore = executionPlanState.applicationStore;
|
146
|
+
|
147
|
+
return (
|
148
|
+
<PanelContent
|
149
|
+
darkMode={
|
150
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
151
|
+
}
|
152
|
+
>
|
153
|
+
<SQLExecutionNodeViewerHelper
|
154
|
+
query={query}
|
155
|
+
resultColumns={resultColumns}
|
156
|
+
resultType={resultType}
|
157
|
+
executionPlanState={executionPlanState}
|
158
|
+
/>
|
159
|
+
{viewJson && (
|
160
|
+
<div className="query-builder__sql__container">
|
161
|
+
<Button
|
162
|
+
className="btn--dark execution-node-viewer__unsupported-view__to-text-mode__btn"
|
163
|
+
onClick={(): void =>
|
164
|
+
executionPlanState.setViewMode(EXECUTION_PLAN_VIEW_MODE.JSON)
|
165
|
+
}
|
166
|
+
text="View JSON"
|
167
|
+
/>
|
168
|
+
</div>
|
169
|
+
)}
|
139
170
|
<PanelDivider />
|
140
171
|
</PanelContent>
|
141
172
|
);
|
@@ -0,0 +1,95 @@
|
|
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 { generateExecutionNodeLabel } from './ExecutionPlanViewer.js';
|
19
|
+
import {
|
20
|
+
type ExecutionPlanState,
|
21
|
+
EXECUTION_PLAN_VIEW_MODE,
|
22
|
+
ExecutionPlanViewTreeNodeData,
|
23
|
+
ExecutionNodeTreeNodeData,
|
24
|
+
} from '../../stores/execution-plan/ExecutionPlanState.js';
|
25
|
+
|
26
|
+
import {
|
27
|
+
PanelListItem,
|
28
|
+
PanelDivider,
|
29
|
+
Button,
|
30
|
+
PanelContent,
|
31
|
+
} from '@finos/legend-art';
|
32
|
+
import type { ExecutionNode, SequenceExecutionNode } from '@finos/legend-graph';
|
33
|
+
import { ResultTypeViewer } from './ResultTypeViewer.js';
|
34
|
+
|
35
|
+
export const SequenceExecutionNodeViewer: React.FC<{
|
36
|
+
node: SequenceExecutionNode;
|
37
|
+
executionPlanState: ExecutionPlanState;
|
38
|
+
}> = observer((props) => {
|
39
|
+
const { node, executionPlanState } = props;
|
40
|
+
const resultType = node.resultType;
|
41
|
+
const applicationStore = executionPlanState.applicationStore;
|
42
|
+
const openExecutionNode = (child: ExecutionNode): void => {
|
43
|
+
const newNode = executionPlanState.treeData?.nodes.get(child._UUID);
|
44
|
+
if (newNode instanceof ExecutionPlanViewTreeNodeData) {
|
45
|
+
executionPlanState.transformMetadataToProtocolJson(newNode.executionPlan);
|
46
|
+
} else if (newNode instanceof ExecutionNodeTreeNodeData) {
|
47
|
+
executionPlanState.transformMetadataToProtocolJson(newNode.executionNode);
|
48
|
+
}
|
49
|
+
executionPlanState.setSelectedNode(newNode);
|
50
|
+
};
|
51
|
+
|
52
|
+
return (
|
53
|
+
<PanelContent
|
54
|
+
darkMode={
|
55
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
56
|
+
}
|
57
|
+
>
|
58
|
+
<div className="query-builder__sequence__container">
|
59
|
+
<div>
|
60
|
+
<PanelListItem className="query-builder__sequence__container__item__label">
|
61
|
+
Execution Nodes
|
62
|
+
</PanelListItem>
|
63
|
+
<PanelDivider />
|
64
|
+
{node.executionNodes.map((child, index) => (
|
65
|
+
<div
|
66
|
+
className="query-builder__sequence__container__item"
|
67
|
+
key={child._UUID}
|
68
|
+
>
|
69
|
+
<button
|
70
|
+
className="query-builder__sequence__container__item__btn"
|
71
|
+
onClick={() => openExecutionNode(child)}
|
72
|
+
tabIndex={-1}
|
73
|
+
title={`Go to ${generateExecutionNodeLabel(child)}`}
|
74
|
+
>
|
75
|
+
{`${index + 1}: ${generateExecutionNodeLabel(child)}`}
|
76
|
+
</button>
|
77
|
+
</div>
|
78
|
+
))}
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
<PanelDivider />
|
82
|
+
<ResultTypeViewer resultType={resultType} />
|
83
|
+
<div className="query-builder__execution__container">
|
84
|
+
<Button
|
85
|
+
className="btn--dark execution-node-viewer__unsupported-view__to-text-mode__btn"
|
86
|
+
onClick={(): void =>
|
87
|
+
executionPlanState.setViewMode(EXECUTION_PLAN_VIEW_MODE.JSON)
|
88
|
+
}
|
89
|
+
text="View JSON"
|
90
|
+
/>
|
91
|
+
</div>
|
92
|
+
<PanelDivider />
|
93
|
+
</PanelContent>
|
94
|
+
);
|
95
|
+
});
|
@@ -0,0 +1,59 @@
|
|
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 { PanelListItem, PanelDivider } from '@finos/legend-art';
|
19
|
+
import {
|
20
|
+
PackageableElementImplicitReference,
|
21
|
+
type TDSResultType,
|
22
|
+
} from '@finos/legend-graph';
|
23
|
+
|
24
|
+
export const TDSResultTypeViewer: React.FC<{
|
25
|
+
resultType: TDSResultType;
|
26
|
+
}> = observer((props) => {
|
27
|
+
const { resultType } = props;
|
28
|
+
|
29
|
+
return (
|
30
|
+
<div className="query-builder__result__container">
|
31
|
+
<PanelListItem className="query-builder__result__container__item__tds">
|
32
|
+
Result type: TDS
|
33
|
+
</PanelListItem>
|
34
|
+
<PanelDivider />
|
35
|
+
{
|
36
|
+
<table className="table query-builder__result__container__table">
|
37
|
+
<thead>
|
38
|
+
<tr>
|
39
|
+
<th className="table__cell--left">Label</th>
|
40
|
+
<th className="table__cell--left">Result DataType</th>
|
41
|
+
</tr>
|
42
|
+
</thead>
|
43
|
+
<tbody>
|
44
|
+
{resultType.tdsColumns.map((column) => (
|
45
|
+
<tr key={column.name}>
|
46
|
+
<td className="table__cell--left">{column.name}</td>
|
47
|
+
<td className="table__cell--left">
|
48
|
+
{column.type instanceof PackageableElementImplicitReference &&
|
49
|
+
(column.type.input ?? '')}
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
))}
|
53
|
+
</tbody>
|
54
|
+
</table>
|
55
|
+
}
|
56
|
+
<PanelDivider />
|
57
|
+
</div>
|
58
|
+
);
|
59
|
+
});
|
@@ -65,10 +65,10 @@ const MilestoningParameterEditor = observer(
|
|
65
65
|
},
|
66
66
|
[queryBuilderState, stereotype],
|
67
67
|
);
|
68
|
-
const [{
|
68
|
+
const [{ isDragOver }, dropConnector] = useDrop<
|
69
69
|
QueryBuilderVariableDragSource,
|
70
70
|
void,
|
71
|
-
{
|
71
|
+
{ isDragOver: boolean }
|
72
72
|
>(
|
73
73
|
() => ({
|
74
74
|
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
@@ -77,10 +77,8 @@ const MilestoningParameterEditor = observer(
|
|
77
77
|
handleDrop(item);
|
78
78
|
}
|
79
79
|
},
|
80
|
-
collect: (
|
81
|
-
monitor
|
82
|
-
): { isMilestoningParameterValueDragOver: boolean } => ({
|
83
|
-
isMilestoningParameterValueDragOver: monitor.isOver({
|
80
|
+
collect: (monitor): { isDragOver: boolean } => ({
|
81
|
+
isDragOver: monitor.isOver({
|
84
82
|
shallow: true,
|
85
83
|
}),
|
86
84
|
}),
|
@@ -121,9 +119,8 @@ const MilestoningParameterEditor = observer(
|
|
121
119
|
return (
|
122
120
|
<div ref={dropConnector} className="query-builder__variable-editor">
|
123
121
|
<PanelEntryDropZonePlaceholder
|
124
|
-
|
122
|
+
isDragOver={isDragOver}
|
125
123
|
label="Change Milestoning Parameter Value"
|
126
|
-
className="query-builder__dnd__placeholder"
|
127
124
|
>
|
128
125
|
<BasicValueSpecificationEditor
|
129
126
|
valueSpecification={milestoningParameter}
|
@@ -153,9 +153,9 @@ const QueryBuilderPostFilterGroupConditionEditor = observer(
|
|
153
153
|
(props: {
|
154
154
|
node: QueryBuilderPostFilterTreeGroupNodeData;
|
155
155
|
isDragOver: boolean;
|
156
|
-
|
156
|
+
isDroppable: boolean;
|
157
157
|
}) => {
|
158
|
-
const { node, isDragOver,
|
158
|
+
const { node, isDragOver, isDroppable: isDroppable } = props;
|
159
159
|
const switchOperation: React.MouseEventHandler<HTMLDivElement> = (
|
160
160
|
event,
|
161
161
|
): void => {
|
@@ -168,17 +168,10 @@ const QueryBuilderPostFilterGroupConditionEditor = observer(
|
|
168
168
|
};
|
169
169
|
return (
|
170
170
|
<div className="query-builder-post-filter-tree__node__label__content dnd__entry__container">
|
171
|
-
{showDroppableSuggestion && (
|
172
|
-
<div
|
173
|
-
className={clsx('dnd__entry--droppable__indicator ', {
|
174
|
-
'dnd__entry--droppable__indicator--dragover': isDragOver,
|
175
|
-
})}
|
176
|
-
></div>
|
177
|
-
)}
|
178
171
|
<PanelEntryDropZonePlaceholder
|
179
|
-
|
172
|
+
isDragOver={isDragOver}
|
173
|
+
isDroppable={isDroppable}
|
180
174
|
label="Add to Logical Group"
|
181
|
-
className="query-builder__dnd__placeholder"
|
182
175
|
>
|
183
176
|
<div
|
184
177
|
className={clsx('query-builder-post-filter-tree__group-node', {
|
@@ -243,9 +236,8 @@ export const QueryBuilderColumnBadge = observer(
|
|
243
236
|
return (
|
244
237
|
<div ref={dropConnector} className="query-builder-column-badge">
|
245
238
|
<PanelEntryDropZonePlaceholder
|
246
|
-
|
239
|
+
isDragOver={isDragOver}
|
247
240
|
label="Change Property"
|
248
|
-
className="query-builder__dnd__placeholder"
|
249
241
|
>
|
250
242
|
<div className="query-builder-column-badge__content">
|
251
243
|
{type && (
|
@@ -367,8 +359,8 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
367
359
|
cleanUpReloadValues,
|
368
360
|
};
|
369
361
|
|
370
|
-
const {
|
371
|
-
|
362
|
+
const { isDroppable } = useDragLayer((monitor) => ({
|
363
|
+
isDroppable:
|
372
364
|
monitor.isDragging() &&
|
373
365
|
(monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
|
374
366
|
monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
|
@@ -376,20 +368,10 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
376
368
|
|
377
369
|
return (
|
378
370
|
<div className="query-builder-post-filter-tree__node__label__content dnd__entry__container">
|
379
|
-
{showDroppableSuggestion && (
|
380
|
-
<div
|
381
|
-
className={clsx(
|
382
|
-
'dnd__entry--droppable__indicator query-builder-post-filter-tree__droppable--full',
|
383
|
-
{
|
384
|
-
'dnd__entry--droppable__indicator--dragover': isDragOver,
|
385
|
-
},
|
386
|
-
)}
|
387
|
-
></div>
|
388
|
-
)}
|
389
371
|
<PanelEntryDropZonePlaceholder
|
390
|
-
|
372
|
+
isDragOver={isDragOver}
|
373
|
+
isDroppable={isDroppable}
|
391
374
|
label="Add New Logical Group"
|
392
|
-
className="query-builder__dnd__placeholder"
|
393
375
|
>
|
394
376
|
<div className="query-builder-post-filter-tree__condition-node">
|
395
377
|
<div className="query-builder-post-filter-tree__condition-node__property">
|
@@ -433,9 +415,8 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
433
415
|
className="query-builder-post-filter-tree__condition-node__value"
|
434
416
|
>
|
435
417
|
<PanelEntryDropZonePlaceholder
|
436
|
-
|
418
|
+
isDragOver={isFilterValueDragOver}
|
437
419
|
label="Change Filter Value"
|
438
|
-
className="query-builder__dnd__placeholder"
|
439
420
|
>
|
440
421
|
<BasicValueSpecificationEditor
|
441
422
|
valueSpecification={node.condition.value}
|
@@ -467,22 +448,17 @@ const QueryBuilderPostFilterBlankConditionEditor = observer(
|
|
467
448
|
(props: {
|
468
449
|
node: QueryBuilderPostFilterTreeBlankConditionNodeData;
|
469
450
|
isDragOver: boolean;
|
470
|
-
|
451
|
+
isDroppable: boolean;
|
471
452
|
}) => {
|
472
|
-
const { isDragOver,
|
453
|
+
const { isDragOver, isDroppable } = props;
|
473
454
|
return (
|
474
455
|
<div className="query-builder-post-filter-tree__node__label__content">
|
475
456
|
<PanelEntryDropZonePlaceholder
|
476
|
-
|
457
|
+
isDragOver={isDragOver}
|
458
|
+
isDroppable={isDroppable}
|
477
459
|
label="Create Condition"
|
478
|
-
className="query-builder__dnd__placeholder"
|
479
460
|
>
|
480
|
-
<div
|
481
|
-
className={clsx('query-builder-post-filter-tree__blank-node', {
|
482
|
-
'query-builder-post-filter-tree__blank-node--droppable':
|
483
|
-
showDroppableSuggestion,
|
484
|
-
})}
|
485
|
-
>
|
461
|
+
<div className="query-builder-post-filter-tree__blank-node">
|
486
462
|
blank
|
487
463
|
</div>
|
488
464
|
</PanelEntryDropZonePlaceholder>
|
@@ -646,8 +622,8 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
646
622
|
const onContextMenuOpen = (): void => setIsSelectedFromContextMenu(true);
|
647
623
|
const onContextMenuClose = (): void => setIsSelectedFromContextMenu(false);
|
648
624
|
|
649
|
-
const {
|
650
|
-
|
625
|
+
const { isDroppable } = useDragLayer((monitor) => ({
|
626
|
+
isDroppable:
|
651
627
|
monitor.isDragging() &&
|
652
628
|
(monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
|
653
629
|
monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
|
@@ -698,16 +674,12 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
698
674
|
<div
|
699
675
|
className={clsx(
|
700
676
|
'tree-view__node__label query-builder-post-filter-tree__node__label',
|
701
|
-
{
|
702
|
-
'query-builder-post-filter-tree__node__label--expandable':
|
703
|
-
isExpandable,
|
704
|
-
},
|
705
677
|
)}
|
706
678
|
>
|
707
679
|
{node instanceof QueryBuilderPostFilterTreeGroupNodeData && (
|
708
680
|
<QueryBuilderPostFilterGroupConditionEditor
|
709
681
|
node={node}
|
710
|
-
|
682
|
+
isDroppable={isDroppable}
|
711
683
|
isDragOver={isDragOver}
|
712
684
|
/>
|
713
685
|
)}
|
@@ -722,7 +694,7 @@ const QueryBuilderPostFilterTreeNodeContainer = observer(
|
|
722
694
|
<QueryBuilderPostFilterBlankConditionEditor
|
723
695
|
node={node}
|
724
696
|
isDragOver={isDragOver}
|
725
|
-
|
697
|
+
isDroppable={isDroppable}
|
726
698
|
/>
|
727
699
|
)}
|
728
700
|
</div>
|
@@ -962,8 +934,8 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
962
934
|
const addPostFilterRef = useRef<HTMLInputElement>(null);
|
963
935
|
dropTargetConnector(addPostFilterRef);
|
964
936
|
|
965
|
-
const {
|
966
|
-
|
937
|
+
const { isDroppable } = useDragLayer((monitor) => ({
|
938
|
+
isDroppable:
|
967
939
|
monitor.isDragging() &&
|
968
940
|
(monitor.getItemType() === QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE ||
|
969
941
|
monitor.getItemType() === QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE),
|
@@ -1055,10 +1027,7 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
1055
1027
|
<PanelContent>
|
1056
1028
|
<PanelDropZone
|
1057
1029
|
isDragOver={isDragOver && postFilterState.isEmpty}
|
1058
|
-
|
1059
|
-
showDroppableSuggestion && postFilterState.isEmpty
|
1060
|
-
}
|
1061
|
-
className="query-builder__panel--droppable"
|
1030
|
+
isDroppable={isDroppable && postFilterState.isEmpty}
|
1062
1031
|
dropTargetConnector={dropTargetConnector}
|
1063
1032
|
>
|
1064
1033
|
{postFilterState.isEmpty && (
|
@@ -1078,17 +1047,19 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
1078
1047
|
<QueryBuilderPostFilterTree tdsState={tdsState} />
|
1079
1048
|
</>
|
1080
1049
|
)}
|
1081
|
-
{
|
1050
|
+
{isDroppable && !postFilterState.isEmpty && (
|
1082
1051
|
<div
|
1083
1052
|
ref={addPostFilterRef}
|
1084
|
-
className=
|
1085
|
-
'query-builder-post-filter-tree__blank-node--droppable--tall',
|
1086
|
-
{
|
1087
|
-
'dnd__entry--droppable__indicator--dragover': isDragOver,
|
1088
|
-
},
|
1089
|
-
)}
|
1053
|
+
className="query-builder-post-filter-tree__free-drop-zone__container"
|
1090
1054
|
>
|
1091
|
-
|
1055
|
+
<PanelEntryDropZonePlaceholder
|
1056
|
+
isDragOver={isDragOver}
|
1057
|
+
isDroppable={isDroppable}
|
1058
|
+
className="query-builder-post-filter-tree__free-drop-zone"
|
1059
|
+
label="Add post-filter to main group"
|
1060
|
+
>
|
1061
|
+
<></>{' '}
|
1062
|
+
</PanelEntryDropZonePlaceholder>
|
1092
1063
|
</div>
|
1093
1064
|
)}
|
1094
1065
|
</PanelDropZone>
|