@finos/legend-application-query 13.4.13 → 13.4.14
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/Core_LegendQueryApplicationPlugin.d.ts +3 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.js +69 -117
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +17 -11
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/LegendQueryApplicationPlugin.d.ts +0 -8
- package/lib/stores/LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/stores/QueryEditorStore.d.ts +2 -0
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +6 -0
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +135 -322
- package/src/components/QueryEditor.tsx +104 -62
- package/src/index.ts +0 -1
- package/src/stores/LegendQueryApplicationPlugin.tsx +0 -12
- package/src/stores/QueryEditorStore.ts +7 -0
- package/tsconfig.json +0 -2
- package/lib/__lib__/LegendQueryTesting.d.ts +0 -19
- package/lib/__lib__/LegendQueryTesting.d.ts.map +0 -1
- package/lib/__lib__/LegendQueryTesting.js +0 -20
- package/lib/__lib__/LegendQueryTesting.js.map +0 -1
- package/lib/application/LegendQueryDocumentation.d.ts +0 -19
- package/lib/application/LegendQueryDocumentation.d.ts.map +0 -1
- package/lib/application/LegendQueryDocumentation.js +0 -20
- package/lib/application/LegendQueryDocumentation.js.map +0 -1
- package/src/__lib__/LegendQueryTesting.ts +0 -19
- package/src/application/LegendQueryDocumentation.ts +0 -19
@@ -40,6 +40,9 @@ import {
|
|
40
40
|
Panel,
|
41
41
|
PanelFullContent,
|
42
42
|
CustomSelectorInput,
|
43
|
+
PencilIcon,
|
44
|
+
MoonIcon,
|
45
|
+
SunIcon,
|
43
46
|
} from '@finos/legend-art';
|
44
47
|
import { observer } from 'mobx-react-lite';
|
45
48
|
import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
|
@@ -53,7 +56,10 @@ import {
|
|
53
56
|
generateExistingQueryEditorRoute,
|
54
57
|
} from '../__lib__/LegendQueryNavigation.js';
|
55
58
|
import { ExistingQueryEditorStore } from '../stores/QueryEditorStore.js';
|
56
|
-
import {
|
59
|
+
import {
|
60
|
+
LEGEND_APPLICATION_COLOR_THEME,
|
61
|
+
useApplicationStore,
|
62
|
+
} from '@finos/legend-application';
|
57
63
|
import { useParams } from '@finos/legend-application/browser';
|
58
64
|
import {
|
59
65
|
MappingQueryCreatorStoreProvider,
|
@@ -356,6 +362,12 @@ export const QueryEditorExistingQueryHeader = observer(
|
|
356
362
|
title="Double-click to rename query"
|
357
363
|
>
|
358
364
|
{existingEditorStore.lightQuery.name}
|
365
|
+
<button
|
366
|
+
className="panel__content__form__section__list__item__edit-btn"
|
367
|
+
onClick={enableRename}
|
368
|
+
>
|
369
|
+
<PencilIcon />
|
370
|
+
</button>
|
359
371
|
</div>
|
360
372
|
)}
|
361
373
|
{existingEditorStore.updateState.saveModal && (
|
@@ -581,6 +593,15 @@ export const QueryEditor = observer(() => {
|
|
581
593
|
!engineConfig.useClientRequestPayloadCompression,
|
582
594
|
);
|
583
595
|
|
596
|
+
const TEMPORARY__toggleLightDarkMode = (): void => {
|
597
|
+
applicationStore.layoutService.setColorTheme(
|
598
|
+
applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
599
|
+
? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK
|
600
|
+
: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,
|
601
|
+
{ persist: true },
|
602
|
+
);
|
603
|
+
};
|
604
|
+
|
584
605
|
useEffect(() => {
|
585
606
|
flowResult(editorStore.initialize()).catch(
|
586
607
|
applicationStore.alertUnhandledError,
|
@@ -590,73 +611,79 @@ export const QueryEditor = observer(() => {
|
|
590
611
|
return (
|
591
612
|
<div className="query-editor">
|
592
613
|
<div className="query-editor__logo-header">
|
593
|
-
<div className="query-editor__logo-
|
594
|
-
<
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
<
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
disabled={!appDocUrl}
|
611
|
-
onClick={goToDocumentation}
|
612
|
-
>
|
613
|
-
Documentation
|
614
|
-
</MenuContentItem>
|
615
|
-
{docLinks?.map((entry) => (
|
614
|
+
<div className="query-editor__logo-header__combo">
|
615
|
+
<div className="query-editor__logo-header__combo__menu">
|
616
|
+
<DropdownMenu
|
617
|
+
className="query-editor__logo-header__combo__menu-item"
|
618
|
+
menuProps={{
|
619
|
+
anchorOrigin: { vertical: 'top', horizontal: 'right' },
|
620
|
+
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
621
|
+
elevation: 7,
|
622
|
+
}}
|
623
|
+
content={
|
624
|
+
<MenuContent>
|
625
|
+
<MenuContentItem onClick={goToQuerySetup}>
|
626
|
+
Back to query setup
|
627
|
+
</MenuContentItem>
|
628
|
+
<MenuContentItem onClick={goToReleaseLog}>
|
629
|
+
Legend Query Release Log
|
630
|
+
</MenuContentItem>
|
616
631
|
<MenuContentItem
|
617
|
-
|
618
|
-
onClick={
|
632
|
+
disabled={!appDocUrl}
|
633
|
+
onClick={goToDocumentation}
|
619
634
|
>
|
620
|
-
|
635
|
+
Documentation
|
621
636
|
</MenuContentItem>
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
637
|
+
{docLinks?.map((entry) => (
|
638
|
+
<MenuContentItem
|
639
|
+
key={entry.key}
|
640
|
+
onClick={(): void => goToDocLink(entry.url)}
|
641
|
+
>
|
642
|
+
{entry.label}
|
643
|
+
</MenuContentItem>
|
644
|
+
))}
|
645
|
+
<MenuContentDivider />
|
646
|
+
<MenuContentItem disabled={true}>Settings</MenuContentItem>
|
647
|
+
<MenuContentItem
|
648
|
+
onClick={toggleEngineClientRequestPayloadCompression}
|
649
|
+
>
|
650
|
+
<MenuContentItemIcon>
|
651
|
+
{engineConfig.useClientRequestPayloadCompression ? (
|
652
|
+
<CheckIcon />
|
653
|
+
) : null}
|
654
|
+
</MenuContentItemIcon>
|
655
|
+
<MenuContentItemLabel>
|
656
|
+
Compress request payload
|
657
|
+
</MenuContentItemLabel>
|
658
|
+
</MenuContentItem>
|
659
|
+
</MenuContent>
|
660
|
+
}
|
661
|
+
>
|
662
|
+
<MenuIcon />
|
663
|
+
</DropdownMenu>
|
664
|
+
</div>
|
665
|
+
<div className="query-editor__logo-header__combo__name">
|
666
|
+
Legend Query
|
667
|
+
</div>
|
642
668
|
</div>
|
643
|
-
<
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
/>
|
669
|
+
<button
|
670
|
+
title="Toggle light/dark mode"
|
671
|
+
onClick={TEMPORARY__toggleLightDarkMode}
|
672
|
+
className="query-editor__header__action query-editor__header__action__theme-toggler"
|
673
|
+
>
|
674
|
+
{applicationStore.layoutService
|
675
|
+
.TEMPORARY__isLightColorThemeEnabled ? (
|
676
|
+
<>
|
677
|
+
<SunIcon className="query-editor__header__action__icon--bulb--light" />
|
678
|
+
</>
|
679
|
+
) : (
|
680
|
+
<>
|
681
|
+
<MoonIcon className="query-editor__header__action__icon--bulb--dark" />
|
682
|
+
</>
|
658
683
|
)}
|
684
|
+
</button>
|
659
685
|
</div>
|
686
|
+
|
660
687
|
<div className="query-editor__content">
|
661
688
|
<PanelLoadingIndicator isLoading={isLoadingEditor} />
|
662
689
|
{!isLoadingEditor && editorStore.queryBuilderState && (
|
@@ -684,6 +711,21 @@ export const QueryEditor = observer(() => {
|
|
684
711
|
/>
|
685
712
|
)}
|
686
713
|
</div>
|
714
|
+
{editorStore.queryLoaderState.isQueryLoaderDialogOpen && (
|
715
|
+
<QueryLoaderDialog
|
716
|
+
queryLoaderState={editorStore.queryLoaderState}
|
717
|
+
title="Load query"
|
718
|
+
/>
|
719
|
+
)}
|
720
|
+
{editorStore.queryCreatorState.showCreateModal && <CreateQueryDialog />}
|
721
|
+
{isExistingQuery &&
|
722
|
+
editorStore.updateState.showQueryInfo &&
|
723
|
+
editorStore.query && (
|
724
|
+
<QueryEditorExistingQueryInfoModal
|
725
|
+
existingEditorStore={editorStore}
|
726
|
+
query={editorStore.query}
|
727
|
+
/>
|
728
|
+
)}
|
687
729
|
</div>
|
688
730
|
);
|
689
731
|
});
|
package/src/index.ts
CHANGED
@@ -97,16 +97,4 @@ export class LegendQueryApplicationPlugin
|
|
97
97
|
* Get the list of actions (configurations) for query setup.
|
98
98
|
*/
|
99
99
|
getExtraQuerySetupActionConfigurations?(): QuerySetupActionConfiguration[];
|
100
|
-
|
101
|
-
/**
|
102
|
-
* Get the list of query editor help menu action configurations.
|
103
|
-
*/
|
104
|
-
getExtraQueryEditorHelpMenuActionConfigurations?(): QueryEditorHelpMenuActionConfiguration[];
|
105
|
-
|
106
|
-
/**
|
107
|
-
* Get the list of query editor action renderer configurations.
|
108
|
-
*/
|
109
|
-
getExtraQueryEditorActionConfigurations?(
|
110
|
-
editorStore: QueryEditorStore,
|
111
|
-
): QueryEditorActionConfiguration[];
|
112
100
|
}
|
@@ -313,6 +313,7 @@ export abstract class QueryEditorStore {
|
|
313
313
|
queryBuilderState?: QueryBuilderState | undefined;
|
314
314
|
queryCreatorState: QueryCreatorState;
|
315
315
|
existingQueryName: string | undefined;
|
316
|
+
showRegisterServiceModal = false;
|
316
317
|
|
317
318
|
constructor(
|
318
319
|
applicationStore: LegendQueryApplicationStore,
|
@@ -322,9 +323,11 @@ export abstract class QueryEditorStore {
|
|
322
323
|
queryCreatorState: observable,
|
323
324
|
queryLoaderState: observable,
|
324
325
|
existingQueryName: observable,
|
326
|
+
showRegisterServiceModal: observable,
|
325
327
|
queryBuilderState: observable,
|
326
328
|
isPerformingBlockingAction: computed,
|
327
329
|
setExistingQueryName: action,
|
330
|
+
setShowRegisterServiceModal: action,
|
328
331
|
initialize: flow,
|
329
332
|
buildGraph: flow,
|
330
333
|
searchExistingQueryName: flow,
|
@@ -402,6 +405,10 @@ export abstract class QueryEditorStore {
|
|
402
405
|
this.existingQueryName = val;
|
403
406
|
}
|
404
407
|
|
408
|
+
setShowRegisterServiceModal(val: boolean): void {
|
409
|
+
this.showRegisterServiceModal = val;
|
410
|
+
}
|
411
|
+
|
405
412
|
get isPerformingBlockingAction(): boolean {
|
406
413
|
return this.queryCreatorState.createQueryState.isInProgress;
|
407
414
|
}
|
package/tsconfig.json
CHANGED
@@ -56,11 +56,9 @@
|
|
56
56
|
"./src/__lib__/LegendQueryEventHelper.ts",
|
57
57
|
"./src/__lib__/LegendQueryNavigation.ts",
|
58
58
|
"./src/__lib__/LegendQueryTelemetryHelper.ts",
|
59
|
-
"./src/__lib__/LegendQueryTesting.ts",
|
60
59
|
"./src/__lib__/LegendQueryUserDataHelper.ts",
|
61
60
|
"./src/application/Core_LegendQuery_LegendApplicationPlugin.ts",
|
62
61
|
"./src/application/LegendQueryApplicationConfig.ts",
|
63
|
-
"./src/application/LegendQueryDocumentation.ts",
|
64
62
|
"./src/application/LegendQueryPluginManager.ts",
|
65
63
|
"./src/components/data-space/QueryDataSpaceUtil.ts",
|
66
64
|
"./src/stores/CloneServiceQuerySetupStore.ts",
|
@@ -1,19 +0,0 @@
|
|
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
|
-
export declare enum QUERY_EDITOR_TEST_ID {
|
17
|
-
QUERY_EDITOR_ACTIONS = "query__editor__actions"
|
18
|
-
}
|
19
|
-
//# sourceMappingURL=LegendQueryTesting.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryTesting.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendQueryTesting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,oBAAoB;IAC9B,oBAAoB,2BAA2B;CAChD"}
|
@@ -1,20 +0,0 @@
|
|
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
|
-
export var QUERY_EDITOR_TEST_ID;
|
17
|
-
(function (QUERY_EDITOR_TEST_ID) {
|
18
|
-
QUERY_EDITOR_TEST_ID["QUERY_EDITOR_ACTIONS"] = "query__editor__actions";
|
19
|
-
})(QUERY_EDITOR_TEST_ID || (QUERY_EDITOR_TEST_ID = {}));
|
20
|
-
//# sourceMappingURL=LegendQueryTesting.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryTesting.js","sourceRoot":"","sources":["../../src/__lib__/LegendQueryTesting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,uEAA+C,CAAA;AACjD,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B"}
|
@@ -1,19 +0,0 @@
|
|
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
|
-
export declare enum QUERY_DOCUMENTATION_KEY {
|
17
|
-
TUTORIAL_QUERY_BUILDER = "tutorial.query.builder"
|
18
|
-
}
|
19
|
-
//# sourceMappingURL=LegendQueryDocumentation.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryDocumentation.d.ts","sourceRoot":"","sources":["../../src/application/LegendQueryDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,uBAAuB;IACjC,sBAAsB,2BAA2B;CAClD"}
|
@@ -1,20 +0,0 @@
|
|
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
|
-
export var QUERY_DOCUMENTATION_KEY;
|
17
|
-
(function (QUERY_DOCUMENTATION_KEY) {
|
18
|
-
QUERY_DOCUMENTATION_KEY["TUTORIAL_QUERY_BUILDER"] = "tutorial.query.builder";
|
19
|
-
})(QUERY_DOCUMENTATION_KEY || (QUERY_DOCUMENTATION_KEY = {}));
|
20
|
-
//# sourceMappingURL=LegendQueryDocumentation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryDocumentation.js","sourceRoot":"","sources":["../../src/application/LegendQueryDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IACjC,4EAAiD,CAAA;AACnD,CAAC,EAFW,uBAAuB,KAAvB,uBAAuB,QAElC"}
|
@@ -1,19 +0,0 @@
|
|
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
|
-
export enum QUERY_EDITOR_TEST_ID {
|
18
|
-
QUERY_EDITOR_ACTIONS = 'query__editor__actions',
|
19
|
-
}
|
@@ -1,19 +0,0 @@
|
|
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
|
-
export enum QUERY_DOCUMENTATION_KEY {
|
18
|
-
TUTORIAL_QUERY_BUILDER = 'tutorial.query.builder',
|
19
|
-
}
|