@finos/legend-query-builder 4.14.72 → 4.14.73
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +108 -36
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.js +3 -1
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/index.css +1 -17
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConfig.d.ts +2 -1
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +2 -1
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +4 -1
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +4 -3
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +22 -7
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderFuzzySearchAdvancedConfigState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderFuzzySearchAdvancedConfigState.js +1 -1
- package/lib/stores/explorer/QueryBuilderFuzzySearchAdvancedConfigState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts +7 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderPropertySearchState.js +160 -74
- package/lib/stores/explorer/QueryBuilderPropertySearchState.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 +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +3 -3
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +249 -226
- package/src/components/result/QueryBuilderResultPanel.tsx +3 -1
- package/src/stores/QueryBuilderConfig.ts +2 -1
- package/src/stores/QueryBuilderResultState.ts +4 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +58 -5
- package/src/stores/explorer/QueryBuilderFuzzySearchAdvancedConfigState.ts +1 -1
- package/src/stores/explorer/QueryBuilderPropertySearchState.ts +194 -92
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +4 -3
- package/src/stores/filter/QueryBuilderFilterState.ts +5 -4
@@ -14,6 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
import { useState } from 'react';
|
17
18
|
import {
|
18
19
|
clsx,
|
19
20
|
CheckSquareIcon,
|
@@ -257,6 +258,7 @@ const QueryBuilderTreeNodeViewer = observer(
|
|
257
258
|
node instanceof QueryBuilderExplorerTreePropertyNodeData
|
258
259
|
? { node }
|
259
260
|
: {},
|
261
|
+
canDrag: () => !(node.type instanceof Class),
|
260
262
|
collect: (monitor) => ({
|
261
263
|
isDragging: monitor.isDragging(),
|
262
264
|
}),
|
@@ -312,9 +314,11 @@ const QueryBuilderTreeNodeViewer = observer(
|
|
312
314
|
);
|
313
315
|
|
314
316
|
const propertyName =
|
315
|
-
parentNode instanceof
|
316
|
-
?
|
317
|
-
:
|
317
|
+
parentNode?.type instanceof Class && level > 1
|
318
|
+
? prettyCONSTName(node.label)
|
319
|
+
: parentNode instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
320
|
+
? prettyPropertyNameForSubType(node.id, true)
|
321
|
+
: prettyPropertyNameFromNodeId(node.id, true);
|
318
322
|
|
319
323
|
const nodeExpandIcon = isExpandable ? (
|
320
324
|
node.isOpen ? (
|
@@ -345,6 +349,8 @@ const QueryBuilderTreeNodeViewer = observer(
|
|
345
349
|
)
|
346
350
|
: null;
|
347
351
|
|
352
|
+
const isMultiple = propertySearchState.isNodeMultiple(node);
|
353
|
+
|
348
354
|
return (
|
349
355
|
<>
|
350
356
|
<div
|
@@ -377,6 +383,14 @@ const QueryBuilderTreeNodeViewer = observer(
|
|
377
383
|
QUERY_BUILDER_PROPERTY_SEARCH_LABEL_TEXT_CLASS,
|
378
384
|
node.id,
|
379
385
|
)}
|
386
|
+
{isMultiple && (
|
387
|
+
<div
|
388
|
+
className="query-builder-explorer-tree__node__label__multiple"
|
389
|
+
title="Multiple values of this property can cause row explosion"
|
390
|
+
>
|
391
|
+
*
|
392
|
+
</div>
|
393
|
+
)}
|
380
394
|
</div>
|
381
395
|
<div className="tree-view__node__label query-builder-property-search-panel__node__doc">
|
382
396
|
{formattedDocText}
|
@@ -434,21 +448,119 @@ const QueryBuilderTreeNodeViewer = observer(
|
|
434
448
|
</div>
|
435
449
|
</div>
|
436
450
|
{node.isOpen &&
|
437
|
-
getChildrenNodes()
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
451
|
+
getChildrenNodes()
|
452
|
+
.filter((childNode) =>
|
453
|
+
propertySearchState.isNodeIncludedInFilter(childNode),
|
454
|
+
)
|
455
|
+
.sort((nodeA, nodeB) => nodeA.label.localeCompare(nodeB.label))
|
456
|
+
.map((childNode) => (
|
457
|
+
<QueryBuilderTreeNodeViewer
|
458
|
+
key={`${node.id}>${childNode.id}`}
|
459
|
+
node={childNode}
|
460
|
+
queryBuilderState={queryBuilderState}
|
461
|
+
level={level + 1}
|
462
|
+
stepPaddingInRem={2}
|
463
|
+
explorerState={queryBuilderState.explorerState}
|
464
|
+
/>
|
465
|
+
))}
|
447
466
|
</>
|
448
467
|
);
|
449
468
|
},
|
450
469
|
);
|
451
470
|
|
471
|
+
const QueryBuilderSearchConfigToggleButton = observer(
|
472
|
+
(props: {
|
473
|
+
label: string;
|
474
|
+
enabled: boolean;
|
475
|
+
onClick: () => void;
|
476
|
+
showOnlyButton?: boolean;
|
477
|
+
onOnlyButtonClick?: (() => void) | undefined;
|
478
|
+
}) => {
|
479
|
+
const { label, enabled, onClick, showOnlyButton, onOnlyButtonClick } =
|
480
|
+
props;
|
481
|
+
|
482
|
+
const [isMouseOver, setIsMouseOver] = useState(false);
|
483
|
+
|
484
|
+
return (
|
485
|
+
<div
|
486
|
+
className="query-builder-property-search-panel__form__section__toggler__btn__container"
|
487
|
+
onMouseEnter={() => setIsMouseOver(true)}
|
488
|
+
onMouseLeave={() => setIsMouseOver(false)}
|
489
|
+
>
|
490
|
+
<button
|
491
|
+
className={clsx(
|
492
|
+
'query-builder-property-search-panel__form__section__toggler__btn',
|
493
|
+
{
|
494
|
+
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
495
|
+
enabled,
|
496
|
+
},
|
497
|
+
)}
|
498
|
+
onClick={onClick}
|
499
|
+
tabIndex={-1}
|
500
|
+
>
|
501
|
+
{enabled ? <CheckSquareIcon /> : <SquareIcon />}
|
502
|
+
<div className="query-builder-property-search-panel__form__section__toggler__prompt">
|
503
|
+
{label}
|
504
|
+
</div>
|
505
|
+
</button>
|
506
|
+
{showOnlyButton && isMouseOver && (
|
507
|
+
<button
|
508
|
+
className="query-builder-property-search-panel__form__section__toggler__only-btn"
|
509
|
+
onClick={onOnlyButtonClick}
|
510
|
+
>
|
511
|
+
only
|
512
|
+
</button>
|
513
|
+
)}
|
514
|
+
</div>
|
515
|
+
);
|
516
|
+
},
|
517
|
+
);
|
518
|
+
|
519
|
+
const QueryBuilderSearchConfigToggleButtonGroup = observer(
|
520
|
+
(props: {
|
521
|
+
header: string;
|
522
|
+
headerTooltipText?: string;
|
523
|
+
buttons: {
|
524
|
+
label: string;
|
525
|
+
enabled: boolean;
|
526
|
+
onClick: () => void;
|
527
|
+
onOnlyButtonClick?: () => void;
|
528
|
+
}[];
|
529
|
+
}) => {
|
530
|
+
const { header, headerTooltipText, buttons } = props;
|
531
|
+
|
532
|
+
return (
|
533
|
+
<div className="query-builder-property-search-panel__form__section">
|
534
|
+
<div className="query-builder-property-search-panel__form__section__header__label">
|
535
|
+
{header}
|
536
|
+
{headerTooltipText && (
|
537
|
+
<Tooltip
|
538
|
+
TransitionProps={{
|
539
|
+
timeout: 0,
|
540
|
+
}}
|
541
|
+
title={<div>{headerTooltipText}</div>}
|
542
|
+
>
|
543
|
+
<div className="query-builder-property-search-panel__tagged-values__tooltip">
|
544
|
+
<InfoCircleIcon />
|
545
|
+
</div>
|
546
|
+
</Tooltip>
|
547
|
+
)}
|
548
|
+
</div>
|
549
|
+
{buttons.map(({ label, enabled, onClick, onOnlyButtonClick }) => (
|
550
|
+
<QueryBuilderSearchConfigToggleButton
|
551
|
+
key={label}
|
552
|
+
label={label}
|
553
|
+
enabled={enabled}
|
554
|
+
onClick={onClick}
|
555
|
+
showOnlyButton={buttons.length > 1}
|
556
|
+
onOnlyButtonClick={onOnlyButtonClick}
|
557
|
+
/>
|
558
|
+
))}
|
559
|
+
</div>
|
560
|
+
);
|
561
|
+
},
|
562
|
+
);
|
563
|
+
|
452
564
|
export const QueryBuilderPropertySearchPanel = observer(
|
453
565
|
(props: {
|
454
566
|
queryBuilderState: QueryBuilderState;
|
@@ -568,234 +680,145 @@ export const QueryBuilderPropertySearchPanel = observer(
|
|
568
680
|
/>
|
569
681
|
</div>
|
570
682
|
</div>
|
571
|
-
<
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
</div>
|
619
|
-
<div className="query-builder-property-search-panel__filter__element">
|
620
|
-
<button
|
621
|
-
className={clsx(
|
622
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
623
|
-
{
|
624
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
625
|
-
propertySearchState.searchConfigurationState
|
626
|
-
.includeSubTypes,
|
627
|
-
},
|
628
|
-
)}
|
629
|
-
onClick={handleToggleIncludeSubTypes}
|
630
|
-
tabIndex={-1}
|
631
|
-
>
|
632
|
-
{propertySearchState.searchConfigurationState
|
633
|
-
.includeSubTypes ? (
|
634
|
-
<CheckSquareIcon />
|
635
|
-
) : (
|
636
|
-
<SquareIcon />
|
637
|
-
)}
|
638
|
-
</button>
|
639
|
-
<div className="query-builder-property-search-panel__form__section__toggler__prompt">
|
640
|
-
Include
|
641
|
-
</div>
|
642
|
-
</div>
|
643
|
-
</div>
|
644
|
-
<div className="query-builder-property-search-panel__form__section">
|
645
|
-
<div className="query-builder-property-search-panel__form__section__header__label">
|
646
|
-
By type
|
647
|
-
</div>
|
648
|
-
<div className="query-builder-property-search-panel__filter__element">
|
649
|
-
<button
|
650
|
-
className={clsx(
|
651
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
652
|
-
{
|
653
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
654
|
-
propertySearchState.typeFilters.includes(
|
655
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS,
|
656
|
-
),
|
657
|
-
},
|
658
|
-
)}
|
659
|
-
onClick={(): void => {
|
683
|
+
<QueryBuilderSearchConfigToggleButtonGroup
|
684
|
+
header="One-Many rows"
|
685
|
+
buttons={[
|
686
|
+
{
|
687
|
+
label: 'Include',
|
688
|
+
enabled: propertySearchState.includeOneMany,
|
689
|
+
onClick: () =>
|
690
|
+
propertySearchState.setIncludeOneMany(
|
691
|
+
!propertySearchState.includeOneMany,
|
692
|
+
),
|
693
|
+
},
|
694
|
+
]}
|
695
|
+
/>
|
696
|
+
<QueryBuilderSearchConfigToggleButtonGroup
|
697
|
+
header="Documentation"
|
698
|
+
headerTooltipText={`Include "doc" type tagged values in search results`}
|
699
|
+
buttons={[
|
700
|
+
{
|
701
|
+
label: 'Include',
|
702
|
+
enabled:
|
703
|
+
propertySearchState.searchConfigurationState
|
704
|
+
.includeDocumentation,
|
705
|
+
onClick: handleToggleIncludeDocumentation,
|
706
|
+
},
|
707
|
+
]}
|
708
|
+
/>
|
709
|
+
<QueryBuilderSearchConfigToggleButtonGroup
|
710
|
+
header="Sub-types"
|
711
|
+
buttons={[
|
712
|
+
{
|
713
|
+
label: 'Include',
|
714
|
+
enabled:
|
715
|
+
propertySearchState.searchConfigurationState
|
716
|
+
.includeSubTypes,
|
717
|
+
onClick: handleToggleIncludeSubTypes,
|
718
|
+
},
|
719
|
+
]}
|
720
|
+
/>
|
721
|
+
<QueryBuilderSearchConfigToggleButtonGroup
|
722
|
+
header="By type"
|
723
|
+
buttons={[
|
724
|
+
{
|
725
|
+
label: 'Class',
|
726
|
+
enabled: propertySearchState.typeFilters.includes(
|
727
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS,
|
728
|
+
),
|
729
|
+
onClick: () => {
|
660
730
|
propertySearchState.toggleFilterForType(
|
661
731
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS,
|
662
732
|
);
|
663
|
-
}
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
</div>
|
677
|
-
</div>
|
678
|
-
<div className="query-builder-property-search-panel__filter__element">
|
679
|
-
<button
|
680
|
-
className={clsx(
|
681
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
682
|
-
{
|
683
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
684
|
-
propertySearchState.typeFilters.includes(
|
685
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING,
|
686
|
-
),
|
687
|
-
},
|
688
|
-
)}
|
689
|
-
onClick={(): void => {
|
733
|
+
},
|
734
|
+
onOnlyButtonClick: () => {
|
735
|
+
propertySearchState.setFilterOnlyType(
|
736
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.CLASS,
|
737
|
+
);
|
738
|
+
},
|
739
|
+
},
|
740
|
+
{
|
741
|
+
label: 'Enumeration',
|
742
|
+
enabled: propertySearchState.typeFilters.includes(
|
743
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.ENUMERATION,
|
744
|
+
),
|
745
|
+
onClick: () => {
|
690
746
|
propertySearchState.toggleFilterForType(
|
691
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.
|
747
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.ENUMERATION,
|
748
|
+
);
|
749
|
+
},
|
750
|
+
onOnlyButtonClick: () => {
|
751
|
+
propertySearchState.setFilterOnlyType(
|
752
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.ENUMERATION,
|
692
753
|
);
|
693
|
-
}
|
694
|
-
|
695
|
-
|
696
|
-
|
754
|
+
},
|
755
|
+
},
|
756
|
+
{
|
757
|
+
label: 'String',
|
758
|
+
enabled: propertySearchState.typeFilters.includes(
|
697
759
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING,
|
698
|
-
)
|
699
|
-
|
700
|
-
) : (
|
701
|
-
<SquareIcon />
|
702
|
-
)}
|
703
|
-
</button>
|
704
|
-
<div className="query-builder-property-search-panel__form__section__toggler__prompt">
|
705
|
-
String
|
706
|
-
</div>
|
707
|
-
</div>
|
708
|
-
<div className="query-builder-property-search-panel__filter__element">
|
709
|
-
<button
|
710
|
-
className={clsx(
|
711
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
712
|
-
{
|
713
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
714
|
-
propertySearchState.typeFilters.includes(
|
715
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
716
|
-
),
|
717
|
-
},
|
718
|
-
)}
|
719
|
-
onClick={(): void => {
|
760
|
+
),
|
761
|
+
onClick: () => {
|
720
762
|
propertySearchState.toggleFilterForType(
|
721
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.
|
763
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING,
|
764
|
+
);
|
765
|
+
},
|
766
|
+
onOnlyButtonClick: () => {
|
767
|
+
propertySearchState.setFilterOnlyType(
|
768
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.STRING,
|
722
769
|
);
|
723
|
-
}
|
724
|
-
|
725
|
-
|
726
|
-
|
770
|
+
},
|
771
|
+
},
|
772
|
+
{
|
773
|
+
label: 'Boolean',
|
774
|
+
enabled: propertySearchState.typeFilters.includes(
|
727
775
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
728
|
-
)
|
729
|
-
|
730
|
-
) : (
|
731
|
-
<SquareIcon />
|
732
|
-
)}
|
733
|
-
</button>
|
734
|
-
<div className="query-builder-property-search-panel__form__section__toggler__prompt">
|
735
|
-
Boolean
|
736
|
-
</div>
|
737
|
-
</div>
|
738
|
-
<div className="query-builder-property-search-panel__filter__element">
|
739
|
-
<button
|
740
|
-
className={clsx(
|
741
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
742
|
-
{
|
743
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
744
|
-
propertySearchState.typeFilters.includes(
|
745
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
746
|
-
),
|
747
|
-
},
|
748
|
-
)}
|
749
|
-
onClick={(): void => {
|
776
|
+
),
|
777
|
+
onClick: () => {
|
750
778
|
propertySearchState.toggleFilterForType(
|
751
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.
|
779
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
752
780
|
);
|
753
|
-
}
|
754
|
-
|
755
|
-
|
756
|
-
|
781
|
+
},
|
782
|
+
onOnlyButtonClick: () => {
|
783
|
+
propertySearchState.setFilterOnlyType(
|
784
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.BOOLEAN,
|
785
|
+
);
|
786
|
+
},
|
787
|
+
},
|
788
|
+
{
|
789
|
+
label: 'Number',
|
790
|
+
enabled: propertySearchState.typeFilters.includes(
|
757
791
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
758
|
-
)
|
759
|
-
|
760
|
-
) : (
|
761
|
-
<SquareIcon />
|
762
|
-
)}
|
763
|
-
</button>
|
764
|
-
<div className="query-builder-property-search-panel__form__section__toggler__prompt">
|
765
|
-
Number
|
766
|
-
</div>
|
767
|
-
</div>
|
768
|
-
<div className="query-builder-property-search-panel__filter__element">
|
769
|
-
<button
|
770
|
-
className={clsx(
|
771
|
-
'query-builder-property-search-panel__form__section__toggler__btn',
|
772
|
-
{
|
773
|
-
'query-builder-property-search-panel__form__section__toggler__btn--toggled':
|
774
|
-
propertySearchState.typeFilters.includes(
|
775
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
776
|
-
),
|
777
|
-
},
|
778
|
-
)}
|
779
|
-
onClick={(): void => {
|
792
|
+
),
|
793
|
+
onClick: () => {
|
780
794
|
propertySearchState.toggleFilterForType(
|
781
|
-
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.
|
795
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
796
|
+
);
|
797
|
+
},
|
798
|
+
onOnlyButtonClick: () => {
|
799
|
+
propertySearchState.setFilterOnlyType(
|
800
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.NUMBER,
|
782
801
|
);
|
783
|
-
}
|
784
|
-
|
785
|
-
|
786
|
-
|
802
|
+
},
|
803
|
+
},
|
804
|
+
{
|
805
|
+
label: 'Date',
|
806
|
+
enabled: propertySearchState.typeFilters.includes(
|
787
807
|
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
788
|
-
)
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
808
|
+
),
|
809
|
+
onClick: () => {
|
810
|
+
propertySearchState.toggleFilterForType(
|
811
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
812
|
+
);
|
813
|
+
},
|
814
|
+
onOnlyButtonClick: () => {
|
815
|
+
propertySearchState.setFilterOnlyType(
|
816
|
+
QUERY_BUILDER_PROPERTY_SEARCH_TYPE.DATE,
|
817
|
+
);
|
818
|
+
},
|
819
|
+
},
|
820
|
+
]}
|
821
|
+
/>
|
799
822
|
</div>
|
800
823
|
</ResizablePanel>
|
801
824
|
<ResizablePanelSplitter>
|
@@ -403,7 +403,9 @@ export const QueryBuilderResultPanel = observer(
|
|
403
403
|
};
|
404
404
|
const resultDescription = executionResult
|
405
405
|
? getResultSetDescription(executionResult)
|
406
|
-
:
|
406
|
+
: resultState.executionError
|
407
|
+
? 'fail to execute'
|
408
|
+
: undefined;
|
407
409
|
|
408
410
|
const [previewLimitValue, setPreviewLimitValue] = useState(
|
409
411
|
resultState.previewLimit,
|
@@ -25,12 +25,13 @@ export const DEFAULT_VARIABLE_NAME = 'var';
|
|
25
25
|
export const DEFAULT_CONSTANT_VARIABLE_NAME = 'c_var';
|
26
26
|
export const DEFAULT_POST_FILTER_LAMBDA_VARIABLE_NAME = 'row';
|
27
27
|
|
28
|
-
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH =
|
28
|
+
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_DEPTH = 10;
|
29
29
|
export const QUERY_BUILDER_PROPERTY_SEARCH_MAX_NODES = 10000;
|
30
30
|
export const QUERY_BUILDER_PROPERTY_SEARCH_RESULTS_LIMIT = 100;
|
31
31
|
|
32
32
|
export enum QUERY_BUILDER_PROPERTY_SEARCH_TYPE {
|
33
33
|
CLASS = 'CLASS',
|
34
|
+
ENUMERATION = 'ENUMERATION',
|
34
35
|
STRING = 'STRING',
|
35
36
|
BOOLEAN = 'BOOLEAN',
|
36
37
|
NUMBER = 'NUMBER',
|
@@ -38,6 +38,7 @@ import {
|
|
38
38
|
reportGraphAnalytics,
|
39
39
|
TDSExecutionResult,
|
40
40
|
V1_ZIPKIN_TRACE_HEADER,
|
41
|
+
ExecutionError,
|
41
42
|
} from '@finos/legend-graph';
|
42
43
|
import { buildLambdaFunction } from './QueryBuilderValueSpecificationBuilder.js';
|
43
44
|
import {
|
@@ -536,6 +537,9 @@ export class QueryBuilderResultState {
|
|
536
537
|
error,
|
537
538
|
);
|
538
539
|
this.setExecutionError(error);
|
540
|
+
if (error instanceof ExecutionError && error.executionTraceId) {
|
541
|
+
this.setExecutionTraceId(error.executionTraceId);
|
542
|
+
}
|
539
543
|
}
|
540
544
|
} finally {
|
541
545
|
this.setIsRunningQuery(false);
|