@finos/legend-query-builder 4.15.29 → 4.15.31
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.js +4 -4
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +2 -2
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +1 -1
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js +0 -2
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -1
- package/lib/components/QueryLoader.js +1 -1
- package/lib/components/QueryLoader.js.map +1 -1
- package/lib/components/data-access/DataAccessOverview.d.ts.map +1 -1
- package/lib/components/data-access/DataAccessOverview.js +56 -30
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.js +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +3 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +7 -3
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js +4 -2
- package/lib/components/explorer/QueryBuilderMilestoningParameterEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +4 -2
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderAggParam.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderAggParam.js +5 -2
- package/lib/components/fetch-structure/QueryBuilderAggParam.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +2 -2
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +11 -9
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +2 -2
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +16 -10
- 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 +13 -9
- 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 +14 -16
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts +2 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +7 -62
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js +4 -2
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +12 -13
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +0 -1
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryLoaderState.js +1 -1
- package/lib/stores/QueryLoaderState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +1 -3
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +0 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/package.json +22 -23
- package/src/components/QueryBuilder.tsx +4 -4
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +2 -2
- package/src/components/QueryBuilderSideBar.tsx +1 -1
- package/src/components/QueryBuilder_LegendApplicationPlugin.ts +0 -3
- package/src/components/QueryLoader.tsx +1 -1
- package/src/components/data-access/DataAccessOverview.tsx +62 -36
- package/src/components/execution-plan/ExecutionPlanViewer.tsx +1 -1
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +3 -3
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +7 -6
- package/src/components/explorer/QueryBuilderMilestoningParameterEditor.tsx +5 -2
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +4 -3
- package/src/components/fetch-structure/QueryBuilderAggParam.tsx +5 -4
- package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +2 -2
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +13 -10
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +2 -2
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +18 -13
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +13 -12
- package/src/components/filter/QueryBuilderFilterPanel.tsx +15 -23
- package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +4 -5
- package/src/components/result/tds/QueryBuilderTDSSimpleGridResult.tsx +19 -57
- package/src/components/shared/BasicValueSpecificationEditor.tsx +2 -2
- package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +1 -1
- package/src/components/shared/QueryBuilderVariableSelector.tsx +4 -2
- package/src/stores/QueryBuilderStateBuilder.ts +0 -1
- package/src/stores/QueryLoaderState.ts +1 -1
- package/src/stores/explorer/QueryBuilderExplorerState.ts +1 -1
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +1 -1
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +13 -15
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +0 -1
@@ -962,6 +962,8 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
962
962
|
}),
|
963
963
|
[handleDrop],
|
964
964
|
);
|
965
|
+
const ref = useRef<HTMLDivElement>(null);
|
966
|
+
dropConnector(ref);
|
965
967
|
|
966
968
|
const { isFilterValueDroppable } = useDragLayer((monitor) => ({
|
967
969
|
isFilterValueDroppable:
|
@@ -1022,7 +1024,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
1022
1024
|
) {
|
1023
1025
|
return (
|
1024
1026
|
<div
|
1025
|
-
ref={
|
1027
|
+
ref={ref}
|
1026
1028
|
data-testid={
|
1027
1029
|
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_FILTER_TREE_CONDITION_NODE_VALUE
|
1028
1030
|
}
|
@@ -1059,7 +1061,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
1059
1061
|
) {
|
1060
1062
|
return (
|
1061
1063
|
<div
|
1062
|
-
ref={
|
1064
|
+
ref={ref}
|
1063
1065
|
className="query-builder-filter-tree__condition-node__value"
|
1064
1066
|
>
|
1065
1067
|
<PanelEntryDropZonePlaceholder
|
@@ -1219,7 +1221,7 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
1219
1221
|
) => {
|
1220
1222
|
const { node, onNodeSelect, innerProps } = props;
|
1221
1223
|
const { queryBuilderState } = innerProps;
|
1222
|
-
const
|
1224
|
+
const ref = useRef<HTMLDivElement>(null);
|
1223
1225
|
const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] =
|
1224
1226
|
useState(false);
|
1225
1227
|
const applicationStore = useApplicationStore();
|
@@ -1293,19 +1295,9 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
1293
1295
|
applicationStore.notificationService.notifyWarning(error.message);
|
1294
1296
|
return;
|
1295
1297
|
}
|
1296
|
-
if (
|
1297
|
-
|
1298
|
-
|
1299
|
-
filterState,
|
1300
|
-
node,
|
1301
|
-
);
|
1302
|
-
} else if (node instanceof QueryBuilderFilterTreeConditionNodeData) {
|
1303
|
-
buildFilterTree(
|
1304
|
-
filterConditionState.propertyExpressionState.propertyExpression,
|
1305
|
-
filterState,
|
1306
|
-
node,
|
1307
|
-
);
|
1308
|
-
} else if (
|
1298
|
+
if (
|
1299
|
+
node instanceof QueryBuilderFilterTreeOperationNodeData ||
|
1300
|
+
node instanceof QueryBuilderFilterTreeConditionNodeData ||
|
1309
1301
|
node instanceof QueryBuilderFilterTreeBlankConditionNodeData
|
1310
1302
|
) {
|
1311
1303
|
buildFilterTree(
|
@@ -1357,7 +1349,7 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
1357
1349
|
}),
|
1358
1350
|
[node, filterState],
|
1359
1351
|
);
|
1360
|
-
dragConnector(dropConnector(
|
1352
|
+
dragConnector(dropConnector(ref));
|
1361
1353
|
useDragPreviewLayer(dragPreviewConnector);
|
1362
1354
|
|
1363
1355
|
const { isDroppable } = useDragLayer((monitor) => ({
|
@@ -1421,7 +1413,7 @@ const QueryBuilderFilterTreeNodeContainer = observer(
|
|
1421
1413
|
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_FILTER_TREE_NODE_CONTENT
|
1422
1414
|
}
|
1423
1415
|
className="query-builder-filter-tree__node__content"
|
1424
|
-
ref={
|
1416
|
+
ref={ref}
|
1425
1417
|
onClick={
|
1426
1418
|
node instanceof QueryBuilderFilterTreeConditionNodeData ||
|
1427
1419
|
node instanceof QueryBuilderFilterTreeBlankConditionNodeData
|
@@ -1697,7 +1689,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
1697
1689
|
[applicationStore, filterState, queryBuilderState.observerContext],
|
1698
1690
|
);
|
1699
1691
|
|
1700
|
-
const [{ isDragOver },
|
1692
|
+
const [{ isDragOver }, dropConnector] = useDrop<
|
1701
1693
|
QueryBuilderExplorerTreeDragSource,
|
1702
1694
|
void,
|
1703
1695
|
{ isDragOver: boolean }
|
@@ -1719,8 +1711,8 @@ export const QueryBuilderFilterPanel = observer(
|
|
1719
1711
|
[handleDrop],
|
1720
1712
|
);
|
1721
1713
|
|
1722
|
-
const
|
1723
|
-
|
1714
|
+
const ref = useRef<HTMLInputElement>(null);
|
1715
|
+
dropConnector(ref);
|
1724
1716
|
|
1725
1717
|
return (
|
1726
1718
|
<div
|
@@ -1818,7 +1810,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
1818
1810
|
<PanelDropZone
|
1819
1811
|
isDragOver={isDragOver && filterState.isEmpty}
|
1820
1812
|
isDroppable={isDroppable && filterState.isEmpty}
|
1821
|
-
dropTargetConnector={
|
1813
|
+
dropTargetConnector={dropConnector}
|
1822
1814
|
>
|
1823
1815
|
{filterState.isEmpty && (
|
1824
1816
|
<BlankPanelPlaceholder
|
@@ -1839,7 +1831,7 @@ export const QueryBuilderFilterPanel = observer(
|
|
1839
1831
|
)}
|
1840
1832
|
{isDroppable && !filterState.isEmpty && (
|
1841
1833
|
<div
|
1842
|
-
ref={
|
1834
|
+
ref={ref}
|
1843
1835
|
className="query-builder-filter-tree__free-drop-zone__container"
|
1844
1836
|
>
|
1845
1837
|
<PanelEntryDropZonePlaceholder
|
@@ -28,6 +28,7 @@ import {
|
|
28
28
|
type DataGridIRowNode,
|
29
29
|
type DataGridMenuItemDef,
|
30
30
|
type DataGridIAggFuncParams,
|
31
|
+
type DataGridDefaultMenuItem,
|
31
32
|
} from '@finos/legend-lego/data-grid';
|
32
33
|
import {
|
33
34
|
getRowDataFromExecutionResult,
|
@@ -334,8 +335,8 @@ export const QueryBuilderTDSGridResult = observer(
|
|
334
335
|
const getContextMenuItems = useCallback(
|
335
336
|
(
|
336
337
|
params: DataGridGetContextMenuItemsParams<QueryBuilderTDSRowDataType>,
|
337
|
-
)
|
338
|
-
let result: (
|
338
|
+
) => {
|
339
|
+
let result: (DataGridDefaultMenuItem | DataGridMenuItemDef)[] = [];
|
339
340
|
const fetchStructureImplementation =
|
340
341
|
resultState.queryBuilderState.fetchStructureState.implementation;
|
341
342
|
if (fetchStructureImplementation instanceof QueryBuilderTDSState) {
|
@@ -569,9 +570,7 @@ export const QueryBuilderTDSGridResult = observer(
|
|
569
570
|
suppressClipboardPaste={false}
|
570
571
|
suppressContextMenu={false}
|
571
572
|
columnDefs={colDefs}
|
572
|
-
getContextMenuItems={(params)
|
573
|
-
getContextMenuItems(params)
|
574
|
-
}
|
573
|
+
getContextMenuItems={(params) => getContextMenuItems(params)}
|
575
574
|
/>
|
576
575
|
)}
|
577
576
|
{resultState.wavgAggregationState?.isApplyingWavg && (
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { ContextMenu, clsx } from '@finos/legend-art';
|
17
|
+
import { ContextMenu, WarningIcon, clsx } from '@finos/legend-art';
|
18
18
|
import { observer } from 'mobx-react-lite';
|
19
19
|
import type { QueryBuilderState } from '../../../stores/QueryBuilderState.js';
|
20
20
|
import {
|
@@ -25,6 +25,7 @@ import {
|
|
25
25
|
import {
|
26
26
|
DataGrid,
|
27
27
|
type DataGridColumnDefinition,
|
28
|
+
type DataGridCustomHeaderProps,
|
28
29
|
} from '@finos/legend-lego/data-grid';
|
29
30
|
import {
|
30
31
|
getRowDataFromExecutionResult,
|
@@ -50,66 +51,26 @@ import { QUERY_BUILDER_TEST_ID } from '../../../__lib__/QueryBuilderTesting.js';
|
|
50
51
|
|
51
52
|
export const MAXIMUM_FRACTION_DIGITS = 4;
|
52
53
|
|
53
|
-
export const
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
class="ag-header-icon ag-header-cell-menu-button"
|
58
|
-
></span>
|
59
|
-
<span
|
60
|
-
data-ref="eFilterButton"
|
61
|
-
class="ag-header-icon ag-header-cell-filter-button"
|
62
|
-
></span>
|
63
|
-
<div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
|
64
|
-
<span
|
65
|
-
data-ref="eSortOrder"
|
66
|
-
class="ag-header-icon ag-sort-order ag-hidden"
|
67
|
-
></span>
|
68
|
-
<span
|
69
|
-
data-ref="eSortAsc"
|
70
|
-
class="ag-header-icon ag-sort-ascending-icon ag-hidden"
|
71
|
-
></span>
|
72
|
-
<span
|
73
|
-
data-ref="eSortDesc"
|
74
|
-
class="ag-header-icon ag-sort-descending-icon ag-hidden"
|
75
|
-
></span>
|
76
|
-
<span
|
77
|
-
data-ref="eSortMixed"
|
78
|
-
class="ag-header-icon ag-sort-mixed-icon ag-hidden"
|
79
|
-
></span>
|
80
|
-
<span
|
81
|
-
data-ref="eSortNone"
|
82
|
-
class="ag-header-icon ag-sort-none-icon ag-hidden"
|
83
|
-
></span>
|
84
|
-
<span
|
85
|
-
data-ref="eText"
|
86
|
-
class="ag-header-cell-text"
|
87
|
-
role="columnheader"
|
88
|
-
></span>
|
89
|
-
<span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>
|
90
|
-
</div>
|
54
|
+
export const FloatGridColumnCustomHeader = (
|
55
|
+
props: DataGridCustomHeaderProps,
|
56
|
+
) => {
|
57
|
+
return (
|
91
58
|
<div
|
92
|
-
data-testid=
|
93
|
-
|
59
|
+
data-testid={
|
60
|
+
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_RESULT_GRID_CUSTOM_HEADER
|
61
|
+
}
|
62
|
+
className="query-builder__result__values__table__custom-header"
|
94
63
|
>
|
95
64
|
<div
|
96
|
-
|
65
|
+
className="query-builder__result__values__table__custom-header__icon"
|
97
66
|
title="some values have been rounded using en-us format in this preview grid (defaults to max 4 decimal places)"
|
98
67
|
>
|
99
|
-
<
|
100
|
-
stroke="currentColor"
|
101
|
-
fill="currentColor"
|
102
|
-
stroke-width="0"
|
103
|
-
viewBox="0 0 576 512"
|
104
|
-
height="1em"
|
105
|
-
width="1em"
|
106
|
-
xmlns="http://www.w3.org/2000/svg"
|
107
|
-
>
|
108
|
-
<path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path>
|
109
|
-
</svg>
|
68
|
+
<WarningIcon />
|
110
69
|
</div>
|
70
|
+
<div>{props.displayName}</div>
|
111
71
|
</div>
|
112
|
-
|
72
|
+
);
|
73
|
+
};
|
113
74
|
|
114
75
|
export const getTDSColumnCustomizations = (
|
115
76
|
result: TDSExecutionResult,
|
@@ -138,11 +99,11 @@ export const getTDSColumnCustomizations = (
|
|
138
99
|
case PRIMITIVE_TYPE.DECIMAL:
|
139
100
|
case PRIMITIVE_TYPE.FLOAT:
|
140
101
|
return isTruncated(colValues)
|
141
|
-
? {
|
102
|
+
? ({
|
142
103
|
headerComponentParams: {
|
143
|
-
|
104
|
+
innerHeaderComponent: FloatGridColumnCustomHeader,
|
144
105
|
},
|
145
|
-
}
|
106
|
+
} satisfies DataGridColumnDefinition)
|
146
107
|
: {};
|
147
108
|
default:
|
148
109
|
return {};
|
@@ -472,6 +433,7 @@ export const QueryBuilderTDSSimpleGridResult = observer(
|
|
472
433
|
resizable: true,
|
473
434
|
field: colName,
|
474
435
|
flex: 1,
|
436
|
+
headerName: colName,
|
475
437
|
...getTDSColumnCustomizations(executionResult, colName),
|
476
438
|
cellRenderer: QueryResultCellRenderer,
|
477
439
|
cellRendererParams: {
|
@@ -1385,7 +1385,7 @@ const DateInstanceValueEditor = observer(
|
|
1385
1385
|
* See https://github.com/finos/legend-studio/pull/1021
|
1386
1386
|
*/
|
1387
1387
|
export const BasicValueSpecificationEditor = forwardRef<
|
1388
|
-
HTMLInputElement,
|
1388
|
+
HTMLInputElement | null,
|
1389
1389
|
{
|
1390
1390
|
valueSpecification: ValueSpecification;
|
1391
1391
|
graph: PureModel;
|
@@ -1402,7 +1402,7 @@ export const BasicValueSpecificationEditor = forwardRef<
|
|
1402
1402
|
| undefined;
|
1403
1403
|
displayDateEditorAsEditableValue?: boolean | undefined;
|
1404
1404
|
}
|
1405
|
-
>(function
|
1405
|
+
>(function _BasicValueSpecificationEditor(props, ref) {
|
1406
1406
|
const {
|
1407
1407
|
className,
|
1408
1408
|
valueSpecification,
|
@@ -122,7 +122,7 @@ export const QueryBuilderBaseInfoTooltip: React.FC<{
|
|
122
122
|
data: {
|
123
123
|
label: string;
|
124
124
|
value: string;
|
125
|
-
actionButton?:
|
125
|
+
actionButton?: React.ReactNode | undefined;
|
126
126
|
}[];
|
127
127
|
placement?: TooltipPlacement | undefined;
|
128
128
|
children: React.ReactElement;
|
@@ -44,7 +44,7 @@ import {
|
|
44
44
|
} from './BasicValueSpecificationEditor.js';
|
45
45
|
import { buildDatePickerOption } from './CustomDatePicker.js';
|
46
46
|
import { QueryBuilderSimpleConstantExpressionState } from '../../stores/QueryBuilderConstantsState.js';
|
47
|
-
import { forwardRef, useState } from 'react';
|
47
|
+
import { forwardRef, useRef, useState } from 'react';
|
48
48
|
|
49
49
|
const CALCULATED = '(calculated)';
|
50
50
|
|
@@ -184,10 +184,12 @@ export const VariableViewer = observer(
|
|
184
184
|
}),
|
185
185
|
[variable],
|
186
186
|
);
|
187
|
+
const ref = useRef<HTMLDivElement>(null);
|
188
|
+
dragConnector(ref);
|
187
189
|
useDragPreviewLayer(dragPreviewConnector);
|
188
190
|
|
189
191
|
return (
|
190
|
-
<div className="query-builder__variables__variable" ref={
|
192
|
+
<div className="query-builder__variables__variable" ref={ref}>
|
191
193
|
<ContextMenu
|
192
194
|
content={
|
193
195
|
<QueryBuilderVariableContextMenu
|
@@ -315,7 +315,7 @@ export class QueryLoaderState {
|
|
315
315
|
searchSpecification,
|
316
316
|
)) as LightQuery[];
|
317
317
|
if (!querySearchSortBy) {
|
318
|
-
this.queries = this.queries.
|
318
|
+
this.queries = this.queries.toSorted((a, b) =>
|
319
319
|
a.name.localeCompare(b.name),
|
320
320
|
);
|
321
321
|
}
|
@@ -106,7 +106,7 @@ export abstract class QueryBuilderExplorerTreeNodeData implements TreeNodeData {
|
|
106
106
|
isPartOfDerivedPropertyBranch: boolean;
|
107
107
|
type: Type;
|
108
108
|
mappingData: QueryBuilderExplorerTreeNodeMappingData;
|
109
|
-
elementRef: React.RefObject<HTMLDivElement>;
|
109
|
+
elementRef: React.RefObject<HTMLDivElement | null>;
|
110
110
|
|
111
111
|
constructor(
|
112
112
|
id: string,
|
@@ -178,7 +178,7 @@ const buildRootGraphFetchSubTree = (
|
|
178
178
|
*/
|
179
179
|
export const buildGraphFetchTreeData = (
|
180
180
|
tree: RootGraphFetchTree,
|
181
|
-
displayRoot
|
181
|
+
displayRoot = false,
|
182
182
|
): QueryBuilderGraphFetchTreeData => {
|
183
183
|
const rootIds: string[] = [];
|
184
184
|
const nodes = new Map<string, QueryBuilderGraphFetchTreeNodeData>();
|
@@ -611,21 +611,19 @@ export class QueryBuilderTDSState
|
|
611
611
|
|
612
612
|
if (!options?.skipSorting) {
|
613
613
|
// sort columns: aggregate columns go last
|
614
|
-
this.projectionColumns = this.projectionColumns
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
)
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
)
|
626
|
-
|
627
|
-
: 0),
|
628
|
-
);
|
614
|
+
this.projectionColumns = this.projectionColumns.toSorted(
|
615
|
+
(colA, colB) =>
|
616
|
+
(this.aggregationState.columns.find(
|
617
|
+
(column) => column.projectionColumnState === colA,
|
618
|
+
)
|
619
|
+
? 1
|
620
|
+
: 0) -
|
621
|
+
(this.aggregationState.columns.find(
|
622
|
+
(column) => column.projectionColumnState === colB,
|
623
|
+
)
|
624
|
+
? 1
|
625
|
+
: 0),
|
626
|
+
);
|
629
627
|
}
|
630
628
|
}
|
631
629
|
|
@@ -474,7 +474,6 @@ export class PostFilterConditionState implements Hashable {
|
|
474
474
|
this.rightConditionValue instanceof PostFilterValueSpecConditionValueState
|
475
475
|
) {
|
476
476
|
this.rightConditionValue.setValue(val);
|
477
|
-
return;
|
478
477
|
} else {
|
479
478
|
this.setRightConditionVal(
|
480
479
|
new PostFilterValueSpecConditionValueState(this, val),
|