@finos/legend-query-builder 4.15.28 → 4.15.30
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/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/QueryBuilderState.d.ts +2 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +4 -1
- package/lib/stores/QueryBuilderState.js.map +1 -1
- 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/entitlements/QueryBuilderCheckEntitlementsState.d.ts.map +1 -1
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js +2 -2
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.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/QueryBuilderState.ts +6 -0
- package/src/stores/QueryBuilderStateBuilder.ts +0 -1
- package/src/stores/QueryLoaderState.ts +1 -1
- package/src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts +1 -4
- 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
|
@@ -275,10 +275,12 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
|
275
275
|
}),
|
|
276
276
|
[handleDrop],
|
|
277
277
|
);
|
|
278
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
279
|
+
dropConnector(ref);
|
|
278
280
|
|
|
279
281
|
return (
|
|
280
282
|
<div
|
|
281
|
-
ref={
|
|
283
|
+
ref={ref}
|
|
282
284
|
className={clsx(
|
|
283
285
|
'query-builder__lambda-editor__container query-builder__projection__column__derivation',
|
|
284
286
|
{ backdrop__element: hasParserError },
|
|
@@ -391,9 +393,9 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
391
393
|
currentRearrangeDropGapIndex,
|
|
392
394
|
setCurrentRearrangeDropGapIndex,
|
|
393
395
|
} = props;
|
|
394
|
-
const dragHandleRef = useRef<HTMLDivElement>(null);
|
|
395
396
|
const applicationStore = useApplicationStore();
|
|
396
397
|
const ref = useRef<HTMLDivElement>(null);
|
|
398
|
+
const dragHandleRef = useRef<HTMLDivElement>(null);
|
|
397
399
|
const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] =
|
|
398
400
|
useState(false);
|
|
399
401
|
const onContextMenuOpen = (): void => setIsSelectedFromContextMenu(true);
|
|
@@ -661,7 +663,6 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
661
663
|
}),
|
|
662
664
|
[projectionColumnState],
|
|
663
665
|
);
|
|
664
|
-
|
|
665
666
|
dragConnector(dragHandleRef);
|
|
666
667
|
dropConnector(ref);
|
|
667
668
|
|
|
@@ -703,7 +704,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
703
704
|
tdsState.queryBuilderState.explorerState,
|
|
704
705
|
],
|
|
705
706
|
);
|
|
706
|
-
const [{ isDragOver },
|
|
707
|
+
const [{ isDragOver }, panelDropConnector] = useDrop<
|
|
707
708
|
QueryBuilderExplorerTreeDragSource,
|
|
708
709
|
void,
|
|
709
710
|
{ isDragOver: boolean }
|
|
@@ -721,6 +722,9 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
721
722
|
}),
|
|
722
723
|
[handleDrop],
|
|
723
724
|
);
|
|
725
|
+
const panelRef = useRef<HTMLDivElement>(null);
|
|
726
|
+
panelDropConnector(panelRef);
|
|
727
|
+
|
|
724
728
|
const percentileButtonRef = useRef<HTMLButtonElement>(null);
|
|
725
729
|
const percentileInputRef = useRef<HTMLInputElement>(null);
|
|
726
730
|
const [isPercentileOpen, setIsPercentileOpen] = useState(false);
|
|
@@ -1192,7 +1196,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
1192
1196
|
</div>
|
|
1193
1197
|
<div
|
|
1194
1198
|
className="query-builder__projection__calendar__date__column"
|
|
1195
|
-
ref={
|
|
1199
|
+
ref={panelRef}
|
|
1196
1200
|
>
|
|
1197
1201
|
<PanelEntryDropZonePlaceholder
|
|
1198
1202
|
isDragOver={isDragOver}
|
|
@@ -1335,7 +1339,7 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1335
1339
|
[tdsState],
|
|
1336
1340
|
);
|
|
1337
1341
|
|
|
1338
|
-
const [{ isDragOver },
|
|
1342
|
+
const [{ isDragOver }, panelDropConnector] = useDrop<
|
|
1339
1343
|
QueryBuilderTDSPanelDropTarget,
|
|
1340
1344
|
void,
|
|
1341
1345
|
{ isDragOver: boolean }
|
|
@@ -1353,8 +1357,10 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1353
1357
|
}),
|
|
1354
1358
|
[handleDrop],
|
|
1355
1359
|
);
|
|
1360
|
+
const panelRef = useRef<HTMLInputElement>(null);
|
|
1361
|
+
panelDropConnector(panelRef);
|
|
1356
1362
|
|
|
1357
|
-
const [{ isRearrangeActive },
|
|
1363
|
+
const [{ isRearrangeActive }, dropConnector] = useDrop<
|
|
1358
1364
|
QueryBuilderProjectionColumnDragSource,
|
|
1359
1365
|
void,
|
|
1360
1366
|
{ isRearrangeActive: boolean }
|
|
@@ -1367,6 +1373,8 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1367
1373
|
}),
|
|
1368
1374
|
[],
|
|
1369
1375
|
);
|
|
1376
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
1377
|
+
dropConnector(ref);
|
|
1370
1378
|
|
|
1371
1379
|
const { isDroppable } = useDragLayer((monitor) => ({
|
|
1372
1380
|
isDroppable:
|
|
@@ -1382,9 +1390,6 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1382
1390
|
);
|
|
1383
1391
|
}, [applicationStore, tdsState]);
|
|
1384
1392
|
|
|
1385
|
-
const addProjectionRef = useRef<HTMLInputElement>(null);
|
|
1386
|
-
dropTargetConnector(addProjectionRef);
|
|
1387
|
-
|
|
1388
1393
|
return (
|
|
1389
1394
|
<PanelContent>
|
|
1390
1395
|
<div className="query-builder__projection__toolbar">
|
|
@@ -1634,7 +1639,7 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1634
1639
|
<PanelDropZone
|
|
1635
1640
|
isDragOver={isDragOver && isEmpty}
|
|
1636
1641
|
isDroppable={isDroppable && isEmpty}
|
|
1637
|
-
dropTargetConnector={
|
|
1642
|
+
dropTargetConnector={panelDropConnector}
|
|
1638
1643
|
>
|
|
1639
1644
|
{!projectionColumns.length && (
|
|
1640
1645
|
<BlankPanelPlaceholder
|
|
@@ -1647,7 +1652,7 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1647
1652
|
data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS}
|
|
1648
1653
|
className="query-builder__projection__columns"
|
|
1649
1654
|
>
|
|
1650
|
-
<div ref={
|
|
1655
|
+
<div ref={ref}>
|
|
1651
1656
|
<DragPreviewLayer
|
|
1652
1657
|
labelGetter={(
|
|
1653
1658
|
item: QueryBuilderProjectionColumnDragSource,
|
|
@@ -1683,7 +1688,7 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1683
1688
|
)}
|
|
1684
1689
|
{isDroppable && !isEmpty && (
|
|
1685
1690
|
<div
|
|
1686
|
-
ref={
|
|
1691
|
+
ref={panelRef}
|
|
1687
1692
|
className="query-builder__projection__free-drop-zone__container"
|
|
1688
1693
|
>
|
|
1689
1694
|
<PanelEntryDropZonePlaceholder
|
|
@@ -691,7 +691,7 @@ const TDSColumnReferenceEditor = observer(
|
|
|
691
691
|
},
|
|
692
692
|
[handleChange],
|
|
693
693
|
);
|
|
694
|
-
const [{ isDragOver },
|
|
694
|
+
const [{ isDragOver }, dropConnector] = useDrop<
|
|
695
695
|
QueryBuilderWindowColumnDragSource,
|
|
696
696
|
void,
|
|
697
697
|
{ isDragOver: boolean }
|
|
@@ -712,6 +712,8 @@ const TDSColumnReferenceEditor = observer(
|
|
|
712
712
|
}),
|
|
713
713
|
[handleDrop],
|
|
714
714
|
);
|
|
715
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
716
|
+
dropConnector(ref);
|
|
715
717
|
|
|
716
718
|
return (
|
|
717
719
|
<>
|
|
@@ -719,10 +721,7 @@ const TDSColumnReferenceEditor = observer(
|
|
|
719
721
|
onClick={openOpAnchor}
|
|
720
722
|
className="query-builder__olap__tds__column"
|
|
721
723
|
>
|
|
722
|
-
<div
|
|
723
|
-
ref={dropOpConnector}
|
|
724
|
-
className="query-builder__olap__tds__column-badge"
|
|
725
|
-
>
|
|
724
|
+
<div ref={ref} className="query-builder__olap__tds__column-badge">
|
|
726
725
|
<PanelEntryDropZonePlaceholder
|
|
727
726
|
isDragOver={isDragOver}
|
|
728
727
|
label="Change Column"
|
|
@@ -945,7 +944,7 @@ const QueryBuilderWindowColumnEditor = observer(
|
|
|
945
944
|
},
|
|
946
945
|
[windowColumnState],
|
|
947
946
|
);
|
|
948
|
-
const [{ isDragOver },
|
|
947
|
+
const [{ isDragOver }, operationDropConnector] = useDrop<
|
|
949
948
|
QueryBuilderWindowColumnDragSource,
|
|
950
949
|
void,
|
|
951
950
|
{ isDragOver: boolean }
|
|
@@ -966,6 +965,8 @@ const QueryBuilderWindowColumnEditor = observer(
|
|
|
966
965
|
}),
|
|
967
966
|
[handleWindowDrop],
|
|
968
967
|
);
|
|
968
|
+
const opRef = useRef<HTMLButtonElement>(null);
|
|
969
|
+
operationDropConnector(opRef);
|
|
969
970
|
|
|
970
971
|
return (
|
|
971
972
|
<PanelDnDEntry
|
|
@@ -1052,7 +1053,7 @@ const QueryBuilderWindowColumnEditor = observer(
|
|
|
1052
1053
|
</div>
|
|
1053
1054
|
<div className="query-builder__olap__column__window">
|
|
1054
1055
|
<button
|
|
1055
|
-
ref={
|
|
1056
|
+
ref={opRef}
|
|
1056
1057
|
title="Click to edit or drag and drop columns"
|
|
1057
1058
|
onClick={openWindowPopover}
|
|
1058
1059
|
className="query-builder__olap__column__window__content"
|
|
@@ -1266,7 +1267,7 @@ export const QueryBuilderTDSWindowPanel = observer(
|
|
|
1266
1267
|
[applicationStore, tdsWindowState],
|
|
1267
1268
|
);
|
|
1268
1269
|
|
|
1269
|
-
const [{ isDragOver },
|
|
1270
|
+
const [{ isDragOver }, dropConnector] = useDrop<
|
|
1270
1271
|
QueryBuilderWindowDropTarget,
|
|
1271
1272
|
void,
|
|
1272
1273
|
{ isDragOver: boolean }
|
|
@@ -1296,8 +1297,8 @@ export const QueryBuilderTDSWindowPanel = observer(
|
|
|
1296
1297
|
),
|
|
1297
1298
|
}));
|
|
1298
1299
|
|
|
1299
|
-
const
|
|
1300
|
-
|
|
1300
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
1301
|
+
dropConnector(ref);
|
|
1301
1302
|
|
|
1302
1303
|
return (
|
|
1303
1304
|
<Panel>
|
|
@@ -1328,7 +1329,7 @@ export const QueryBuilderTDSWindowPanel = observer(
|
|
|
1328
1329
|
<PanelDropZone
|
|
1329
1330
|
isDragOver={isDragOver && tdsWindowState.isEmpty}
|
|
1330
1331
|
isDroppable={isDroppable && tdsWindowState.isEmpty}
|
|
1331
|
-
dropTargetConnector={
|
|
1332
|
+
dropTargetConnector={dropConnector}
|
|
1332
1333
|
>
|
|
1333
1334
|
{tdsWindowState.isEmpty && (
|
|
1334
1335
|
<BlankPanelPlaceholder
|
|
@@ -1363,7 +1364,7 @@ export const QueryBuilderTDSWindowPanel = observer(
|
|
|
1363
1364
|
)}
|
|
1364
1365
|
{isDroppable && !tdsWindowState.isEmpty && (
|
|
1365
1366
|
<div
|
|
1366
|
-
ref={
|
|
1367
|
+
ref={ref}
|
|
1367
1368
|
className="query-builder__olap__free-drop-zone__container"
|
|
1368
1369
|
>
|
|
1369
1370
|
<PanelEntryDropZonePlaceholder
|
|
@@ -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
|
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
type QueryGridConfig,
|
|
58
58
|
type QueryExecutionContext,
|
|
59
59
|
type FunctionAnalysisInfo,
|
|
60
|
+
type GraphData,
|
|
60
61
|
GRAPH_MANAGER_EVENT,
|
|
61
62
|
CompilationError,
|
|
62
63
|
extractSourceInformationCoordinates,
|
|
@@ -73,6 +74,7 @@ import {
|
|
|
73
74
|
QueryExplicitExecutionContext,
|
|
74
75
|
attachFromQuery,
|
|
75
76
|
PackageableElementExplicitReference,
|
|
77
|
+
InMemoryGraphData,
|
|
76
78
|
} from '@finos/legend-graph';
|
|
77
79
|
import { buildLambdaFunction } from './QueryBuilderValueSpecificationBuilder.js';
|
|
78
80
|
import type {
|
|
@@ -886,6 +888,10 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
886
888
|
return undefined;
|
|
887
889
|
}
|
|
888
890
|
|
|
891
|
+
getGraphData(): GraphData {
|
|
892
|
+
return new InMemoryGraphData(this.graphManagerState.graph);
|
|
893
|
+
}
|
|
894
|
+
|
|
889
895
|
/**
|
|
890
896
|
* This method can be used to simplify the current query builder state
|
|
891
897
|
* to a basic one that can be used for testing or some special operations,
|
|
@@ -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
|
}
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
type GraphManagerState,
|
|
24
24
|
type RawLambda,
|
|
25
25
|
RuntimePointer,
|
|
26
|
-
InMemoryGraphData,
|
|
27
26
|
buildRawLambdaFromLambdaFunction,
|
|
28
27
|
} from '@finos/legend-graph';
|
|
29
28
|
import {
|
|
@@ -71,9 +70,7 @@ export class QueryBuilderCheckEntitlementsState implements Hashable {
|
|
|
71
70
|
this.queryBuilderState.parametersState.parameterStates,
|
|
72
71
|
this.queryBuilderState.graphManagerState,
|
|
73
72
|
),
|
|
74
|
-
graphData:
|
|
75
|
-
this.queryBuilderState.graphManagerState.graph,
|
|
76
|
-
),
|
|
73
|
+
graphData: this.queryBuilderState.getGraphData(),
|
|
77
74
|
},
|
|
78
75
|
);
|
|
79
76
|
}
|
|
@@ -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),
|