@finos/legend-query-builder 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderColorTheme.d.ts +23 -0
- package/lib/__lib__/QueryBuilderColorTheme.d.ts.map +1 -0
- package/lib/__lib__/QueryBuilderColorTheme.js +24 -0
- package/lib/__lib__/QueryBuilderColorTheme.js.map +1 -0
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +17 -15
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js +3 -0
- package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -1
- package/lib/components/QueryLoader.d.ts.map +1 -1
- package/lib/components/QueryLoader.js +6 -2
- package/lib/components/QueryLoader.js.map +1 -1
- package/lib/components/data-access/DataAccessOverview.d.ts +23 -0
- package/lib/components/data-access/DataAccessOverview.d.ts.map +1 -0
- package/lib/components/data-access/DataAccessOverview.js +146 -0
- package/lib/components/data-access/DataAccessOverview.js.map +1 -0
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.js +3 -3
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js +1 -1
- package/lib/components/execution-plan/SQLExecutionNodeViewer.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +0 -18
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +34 -36
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +7 -19
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/index.css +1 -17
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +4 -2
- package/lib/stores/QueryBuilderState.d.ts +3 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +34 -18
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +9 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/data-access/DataAccessState.d.ts +56 -0
- package/lib/stores/data-access/DataAccessState.d.ts.map +1 -0
- package/lib/stores/data-access/DataAccessState.js +212 -0
- package/lib/stores/data-access/DataAccessState.js.map +1 -0
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.d.ts +4 -2
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.d.ts.map +1 -1
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js +20 -6
- package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js.map +1 -1
- package/package.json +12 -10
- package/src/__lib__/QueryBuilderColorTheme.ts +23 -0
- package/src/components/QueryBuilder.tsx +63 -47
- package/src/components/QueryBuilder_LegendApplicationPlugin.ts +4 -0
- package/src/components/QueryLoader.tsx +4 -1
- package/src/components/data-access/DataAccessOverview.tsx +308 -0
- package/src/components/execution-plan/ExecutionPlanViewer.tsx +1 -3
- package/src/components/execution-plan/SQLExecutionNodeViewer.tsx +1 -1
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +99 -102
- package/src/components/shared/LambdaEditor.tsx +4 -21
- package/src/index.ts +4 -0
- package/src/stores/QueryBuilderState.ts +65 -19
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +10 -0
- package/src/stores/data-access/DataAccessState.ts +322 -0
- package/src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts +53 -6
- package/tsconfig.json +3 -0
@@ -16,24 +16,38 @@
|
|
16
16
|
import { hashArray } from '@finos/legend-shared';
|
17
17
|
import { makeObservable, observable, action, computed } from 'mobx';
|
18
18
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../QueryBuilderStateHashUtils.js';
|
19
|
+
import { DataAccessState } from '../data-access/DataAccessState.js';
|
20
|
+
import { RuntimePointer, InMemoryGraphData, } from '@finos/legend-graph';
|
19
21
|
export class QueryBuilderCheckEntitlementsState {
|
20
22
|
queryBuilderState;
|
21
|
-
|
23
|
+
dataAccessState;
|
24
|
+
showCheckEntitlementsViewer = false;
|
22
25
|
constructor(queryBuilderState) {
|
23
26
|
makeObservable(this, {
|
24
|
-
|
25
|
-
|
27
|
+
showCheckEntitlementsViewer: observable,
|
28
|
+
dataAccessState: observable,
|
29
|
+
setShowCheckEntitlementsViewer: action,
|
26
30
|
hashCode: computed,
|
27
31
|
});
|
28
32
|
this.queryBuilderState = queryBuilderState;
|
29
33
|
}
|
30
|
-
|
31
|
-
this.
|
34
|
+
setShowCheckEntitlementsViewer(val) {
|
35
|
+
this.showCheckEntitlementsViewer = val;
|
36
|
+
this.dataAccessState = undefined;
|
37
|
+
if (this.queryBuilderState.mapping &&
|
38
|
+
this.queryBuilderState.runtimeValue instanceof RuntimePointer) {
|
39
|
+
const mappingPath = this.queryBuilderState.mapping.path;
|
40
|
+
const runtimePath = this.queryBuilderState.runtimeValue.packageableRuntime.value.path;
|
41
|
+
this.dataAccessState = new DataAccessState(this.queryBuilderState.applicationStore, this.queryBuilderState.graphManagerState, {
|
42
|
+
surveyDatasets: async () => this.queryBuilderState.graphManagerState.graphManager.surveyDatasets(mappingPath, runtimePath, this.queryBuilderState.buildQuery(), new InMemoryGraphData(this.queryBuilderState.graphManagerState.graph)),
|
43
|
+
checkDatasetEntitlements: async (datasets) => this.queryBuilderState.graphManagerState.graphManager.checkDatasetEntitlements(datasets, mappingPath, runtimePath, this.queryBuilderState.buildQuery(), new InMemoryGraphData(this.queryBuilderState.graphManagerState.graph)),
|
44
|
+
});
|
45
|
+
}
|
32
46
|
}
|
33
47
|
get hashCode() {
|
34
48
|
return hashArray([
|
35
49
|
QUERY_BUILDER_STATE_HASH_STRUCTURE.CHECK_ENTITLEMENTS_STATE,
|
36
|
-
this.
|
50
|
+
this.showCheckEntitlementsViewer,
|
37
51
|
]);
|
38
52
|
}
|
39
53
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderCheckEntitlementsState.js","sourceRoot":"","sources":["../../../src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAiB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderCheckEntitlementsState.js","sourceRoot":"","sources":["../../../src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAiB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EACL,cAAc,EAGd,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,kCAAkC;IACpC,iBAAiB,CAAoB;IAE9C,eAAe,CAA+B;IAC9C,2BAA2B,GAAG,KAAK,CAAC;IAEpC,YAAY,iBAAoC;QAC9C,cAAc,CAAC,IAAI,EAAE;YACnB,2BAA2B,EAAE,UAAU;YACvC,eAAe,EAAE,UAAU;YAC3B,8BAA8B,EAAE,MAAM;YACtC,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAED,8BAA8B,CAAC,GAAY;QACzC,IAAI,CAAC,2BAA2B,GAAG,GAAG,CAAC;QAEvC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,IACE,IAAI,CAAC,iBAAiB,CAAC,OAAO;YAC9B,IAAI,CAAC,iBAAiB,CAAC,YAAY,YAAY,cAAc,EAC7D;YACA,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC;YACxD,MAAM,WAAW,GACf,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC;YACpE,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CACxC,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EACvC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EACxC;gBACE,cAAc,EAAE,KAAK,IAAqC,EAAE,CAC1D,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,cAAc,CAClE,WAAW,EACX,WAAW,EACX,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,EACnC,IAAI,iBAAiB,CACnB,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAC/C,CACF;gBACH,wBAAwB,EAAE,KAAK,EAC7B,QAAgC,EACK,EAAE,CACvC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,wBAAwB,CAC5E,QAAQ,EACR,WAAW,EACX,WAAW,EACX,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,EACnC,IAAI,iBAAiB,CACnB,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAC/C,CACF;aACJ,CACF,CAAC;SACH;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,kCAAkC,CAAC,wBAAwB;YAC3D,IAAI,CAAC,2BAA2B;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-query-builder",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.1",
|
4
4
|
"description": "Legend query builder core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -42,20 +42,20 @@
|
|
42
42
|
"test:watch": "jest --watch"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@finos/legend-application": "15.0.
|
46
|
-
"@finos/legend-art": "7.0.
|
47
|
-
"@finos/legend-graph": "28.1.
|
48
|
-
"@finos/legend-lego": "0.
|
49
|
-
"@finos/legend-server-depot": "6.0.
|
50
|
-
"@finos/legend-shared": "10.0.
|
51
|
-
"@finos/legend-storage": "3.0.
|
45
|
+
"@finos/legend-application": "15.0.8",
|
46
|
+
"@finos/legend-art": "7.0.9",
|
47
|
+
"@finos/legend-graph": "28.1.5",
|
48
|
+
"@finos/legend-lego": "1.0.0",
|
49
|
+
"@finos/legend-server-depot": "6.0.5",
|
50
|
+
"@finos/legend-shared": "10.0.4",
|
51
|
+
"@finos/legend-storage": "3.0.54",
|
52
52
|
"@testing-library/react": "14.0.0",
|
53
53
|
"@types/react": "18.2.0",
|
54
54
|
"@types/react-dom": "18.2.1",
|
55
55
|
"mathjs": "11.8.0",
|
56
56
|
"mobx": "6.9.0",
|
57
57
|
"mobx-react-lite": "3.4.3",
|
58
|
-
"monaco-editor": "0.
|
58
|
+
"monaco-editor": "0.38.0",
|
59
59
|
"react": "18.2.0",
|
60
60
|
"react-dnd": "16.0.1",
|
61
61
|
"react-dom": "18.2.0",
|
@@ -63,12 +63,14 @@
|
|
63
63
|
"sql-formatter": "12.2.0"
|
64
64
|
},
|
65
65
|
"devDependencies": {
|
66
|
-
"@finos/legend-dev-utils": "2.0.
|
66
|
+
"@finos/legend-dev-utils": "2.0.58",
|
67
67
|
"@jest/globals": "29.5.0",
|
68
|
+
"chart.js": "4.3.0",
|
68
69
|
"cross-env": "7.0.3",
|
69
70
|
"eslint": "8.39.0",
|
70
71
|
"jest": "29.5.0",
|
71
72
|
"npm-run-all": "4.1.5",
|
73
|
+
"react-chartjs-2": "5.2.0",
|
72
74
|
"rimraf": "5.0.0",
|
73
75
|
"sass": "1.62.1",
|
74
76
|
"typescript": "5.0.4"
|
@@ -0,0 +1,23 @@
|
|
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_BUILDER_COLOR_THEME_KEY {
|
18
|
+
DATA_ACCESS_OVERVIEW__CHART__ACCESS_GRANTED = 'data-access-overview.chart.access-granted',
|
19
|
+
DATA_ACCESS_OVERVIEW__CHART__ACCESS_APPROVED = 'data-access-overview.chart.access-approved',
|
20
|
+
DATA_ACCESS_OVERVIEW__CHART__ACCESS_REQUESTED = 'data-access-overview.chart.access-requested',
|
21
|
+
DATA_ACCESS_OVERVIEW__CHART__ACCESS_NOT_GRANTED = 'data-access-overview.chart.access-not-granted',
|
22
|
+
DATA_ACCESS_OVERVIEW__CHART__UNSUPPORTED_ACCESS = 'data-access-overview.chart.unsupported-access',
|
23
|
+
}
|
@@ -40,7 +40,7 @@ import {
|
|
40
40
|
ModalHeader,
|
41
41
|
BlankPanelContent,
|
42
42
|
ModalFooterButton,
|
43
|
-
|
43
|
+
CalendarClockIcon,
|
44
44
|
} from '@finos/legend-art';
|
45
45
|
import { QueryBuilderFilterPanel } from './filter/QueryBuilderFilterPanel.js';
|
46
46
|
import { QueryBuilderExplorerPanel } from './explorer/QueryBuilderExplorerPanel.js';
|
@@ -72,6 +72,7 @@ import { QueryBuilderConstantExpressionPanel } from './QueryBuilderConstantExpre
|
|
72
72
|
import { QueryBuilder_LegendApplicationPlugin } from './QueryBuilder_LegendApplicationPlugin.js';
|
73
73
|
import { QUERY_BUILDER_SETTING_KEY } from '../__lib__/QueryBuilderSetting.js';
|
74
74
|
import { QUERY_BUILDER_COMPONENT_ELEMENT_ID } from './QueryBuilderComponentElement.js';
|
75
|
+
import { DataAccessOverview } from './data-access/DataAccessOverview.js';
|
75
76
|
|
76
77
|
const QueryBuilderStatusBar = observer(
|
77
78
|
(props: { queryBuilderState: QueryBuilderState }) => {
|
@@ -214,12 +215,16 @@ const renderCheckEntitlementsEditor = (
|
|
214
215
|
}
|
215
216
|
|
216
217
|
const handleClose = (): void => {
|
217
|
-
queryBuilderState.checkEntitlementsState.
|
218
|
+
queryBuilderState.checkEntitlementsState.setShowCheckEntitlementsViewer(
|
219
|
+
false,
|
220
|
+
);
|
218
221
|
};
|
219
222
|
|
220
223
|
return (
|
221
224
|
<Dialog
|
222
|
-
open={
|
225
|
+
open={
|
226
|
+
queryBuilderState.checkEntitlementsState.showCheckEntitlementsViewer
|
227
|
+
}
|
223
228
|
onClose={handleClose}
|
224
229
|
classes={{
|
225
230
|
root: 'editor-modal__root-container',
|
@@ -229,10 +234,20 @@ const renderCheckEntitlementsEditor = (
|
|
229
234
|
>
|
230
235
|
<Modal darkMode={true} className="editor-modal">
|
231
236
|
<ModalHeader title="Query Entitlements" />
|
232
|
-
<ModalBody>
|
233
|
-
<
|
234
|
-
|
235
|
-
|
237
|
+
<ModalBody className="query-builder__data-access-overview">
|
238
|
+
<div className="query-builder__data-access-overview__container">
|
239
|
+
{queryBuilderState.checkEntitlementsState.dataAccessState ? (
|
240
|
+
<DataAccessOverview
|
241
|
+
dataAccessState={
|
242
|
+
queryBuilderState.checkEntitlementsState.dataAccessState
|
243
|
+
}
|
244
|
+
/>
|
245
|
+
) : (
|
246
|
+
<BlankPanelContent>
|
247
|
+
No data access information available
|
248
|
+
</BlankPanelContent>
|
249
|
+
)}
|
250
|
+
</div>
|
236
251
|
</ModalBody>
|
237
252
|
<ModalFooter>
|
238
253
|
<ModalFooterButton text="Close" onClick={handleClose} />
|
@@ -347,7 +362,9 @@ export const QueryBuilder = observer(
|
|
347
362
|
};
|
348
363
|
|
349
364
|
const openCheckEntitlmentsEditor = (): void => {
|
350
|
-
queryBuilderState.checkEntitlementsState.
|
365
|
+
queryBuilderState.checkEntitlementsState.setShowCheckEntitlementsViewer(
|
366
|
+
true,
|
367
|
+
);
|
351
368
|
};
|
352
369
|
|
353
370
|
useCommands(queryBuilderState);
|
@@ -392,26 +409,25 @@ export const QueryBuilder = observer(
|
|
392
409
|
/>
|
393
410
|
<div className="query-builder__body">
|
394
411
|
<div className="query-builder__content">
|
395
|
-
<div className="query-
|
396
|
-
<div className="query-
|
412
|
+
<div className="query-builder__header">
|
413
|
+
<div className="query-builder__header__statuses">
|
397
414
|
{queryBuilderState.watermarkState.value && (
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
</button>
|
407
|
-
</>
|
415
|
+
<button
|
416
|
+
className="query-builder__header__status query-builder__header__status--action"
|
417
|
+
onClick={openWatermark}
|
418
|
+
tabIndex={-1}
|
419
|
+
title="Used watermark"
|
420
|
+
>
|
421
|
+
<WaterDropIcon />
|
422
|
+
</button>
|
408
423
|
)}
|
409
424
|
{queryBuilderState.isCalendarEnabled && (
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
425
|
+
<div
|
426
|
+
className="query-builder__header__status"
|
427
|
+
title="Used calendar aggregation"
|
428
|
+
>
|
429
|
+
<CalendarClockIcon className="query-builder__header__status__icon--calendar" />
|
430
|
+
</div>
|
415
431
|
)}
|
416
432
|
{queryBuilderState.watermarkState.isEditingWatermark && (
|
417
433
|
<QueryBuilderWatermarkEditor
|
@@ -419,9 +435,9 @@ export const QueryBuilder = observer(
|
|
419
435
|
/>
|
420
436
|
)}
|
421
437
|
</div>
|
422
|
-
<div className="query-
|
438
|
+
<div className="query-builder__header__actions">
|
423
439
|
<DropdownMenu
|
424
|
-
className="query-
|
440
|
+
className="query-builder__header__advanced-dropdown"
|
425
441
|
title="Show Advanced Menu..."
|
426
442
|
content={
|
427
443
|
<MenuContent>
|
@@ -434,7 +450,7 @@ export const QueryBuilder = observer(
|
|
434
450
|
<CheckIcon />
|
435
451
|
) : null}
|
436
452
|
</MenuContentItemIcon>
|
437
|
-
<MenuContentItemLabel
|
453
|
+
<MenuContentItemLabel>
|
438
454
|
Show Function(s)
|
439
455
|
</MenuContentItemLabel>
|
440
456
|
</MenuContentItem>
|
@@ -452,7 +468,7 @@ export const QueryBuilder = observer(
|
|
452
468
|
<CheckIcon />
|
453
469
|
) : null}
|
454
470
|
</MenuContentItemIcon>
|
455
|
-
<MenuContentItemLabel
|
471
|
+
<MenuContentItemLabel>
|
456
472
|
Show Parameter(s)
|
457
473
|
</MenuContentItemLabel>
|
458
474
|
</MenuContentItem>
|
@@ -471,7 +487,7 @@ export const QueryBuilder = observer(
|
|
471
487
|
<CheckIcon />
|
472
488
|
) : null}
|
473
489
|
</MenuContentItemIcon>
|
474
|
-
<MenuContentItemLabel
|
490
|
+
<MenuContentItemLabel>
|
475
491
|
Show Constant(s)
|
476
492
|
</MenuContentItemLabel>
|
477
493
|
</MenuContentItem>
|
@@ -490,10 +506,9 @@ export const QueryBuilder = observer(
|
|
490
506
|
<CheckIcon />
|
491
507
|
) : null}
|
492
508
|
</MenuContentItemIcon>
|
493
|
-
<MenuContentItemLabel
|
494
|
-
Show Filter
|
495
|
-
</MenuContentItemLabel>
|
509
|
+
<MenuContentItemLabel>Show Filter</MenuContentItemLabel>
|
496
510
|
</MenuContentItem>
|
511
|
+
<MenuContentDivider />
|
497
512
|
<MenuContentItem
|
498
513
|
onClick={toggleShowOLAPGroupByPanel}
|
499
514
|
disabled={
|
@@ -516,8 +531,8 @@ export const QueryBuilder = observer(
|
|
516
531
|
<CheckIcon />
|
517
532
|
) : null}
|
518
533
|
</MenuContentItemIcon>
|
519
|
-
<MenuContentItemLabel
|
520
|
-
Show Window
|
534
|
+
<MenuContentItemLabel>
|
535
|
+
Show Window Function(s)
|
521
536
|
</MenuContentItemLabel>
|
522
537
|
</MenuContentItem>
|
523
538
|
<MenuContentItem
|
@@ -541,13 +556,13 @@ export const QueryBuilder = observer(
|
|
541
556
|
<CheckIcon />
|
542
557
|
) : null}
|
543
558
|
</MenuContentItemIcon>
|
544
|
-
<MenuContentItemLabel
|
559
|
+
<MenuContentItemLabel>
|
545
560
|
Show Post-Filter
|
546
561
|
</MenuContentItemLabel>
|
547
562
|
</MenuContentItem>
|
548
563
|
<MenuContentItem onClick={openWatermark}>
|
549
564
|
<MenuContentItemIcon>{null}</MenuContentItemIcon>
|
550
|
-
<MenuContentItemLabel
|
565
|
+
<MenuContentItemLabel>
|
551
566
|
Show Watermark
|
552
567
|
</MenuContentItemLabel>
|
553
568
|
</MenuContentItem>
|
@@ -566,7 +581,7 @@ export const QueryBuilder = observer(
|
|
566
581
|
<CheckIcon />
|
567
582
|
) : null}
|
568
583
|
</MenuContentItemIcon>
|
569
|
-
<MenuContentItemLabel
|
584
|
+
<MenuContentItemLabel>
|
570
585
|
Enable Calendar
|
571
586
|
</MenuContentItemLabel>
|
572
587
|
</MenuContentItem>
|
@@ -581,20 +596,20 @@ export const QueryBuilder = observer(
|
|
581
596
|
.projectionColumns.length === 0
|
582
597
|
}
|
583
598
|
>
|
584
|
-
<MenuContentItemIcon
|
585
|
-
<MenuContentItemLabel
|
599
|
+
<MenuContentItemIcon />
|
600
|
+
<MenuContentItemLabel>
|
586
601
|
Check Entitlements
|
587
602
|
</MenuContentItemLabel>
|
588
603
|
</MenuContentItem>
|
589
604
|
<MenuContentItem onClick={editQueryInPure}>
|
590
|
-
<MenuContentItemIcon
|
591
|
-
<MenuContentItemLabel
|
605
|
+
<MenuContentItemIcon />
|
606
|
+
<MenuContentItemLabel>
|
592
607
|
Edit Query in Pure
|
593
608
|
</MenuContentItemLabel>
|
594
609
|
</MenuContentItem>
|
595
610
|
<MenuContentItem onClick={showQueryProtocol}>
|
596
|
-
<MenuContentItemIcon
|
597
|
-
<MenuContentItemLabel
|
611
|
+
<MenuContentItemIcon />
|
612
|
+
<MenuContentItemLabel>
|
598
613
|
Show Query Protocol
|
599
614
|
</MenuContentItemLabel>
|
600
615
|
</MenuContentItem>
|
@@ -606,10 +621,10 @@ export const QueryBuilder = observer(
|
|
606
621
|
elevation: 7,
|
607
622
|
}}
|
608
623
|
>
|
609
|
-
<div className="query-
|
624
|
+
<div className="query-builder__header__advanced-dropdown__label">
|
610
625
|
Advanced
|
611
626
|
</div>
|
612
|
-
<CaretDownIcon className="query-
|
627
|
+
<CaretDownIcon className="query-builder__header__advanced-dropdown__icon" />
|
613
628
|
</DropdownMenu>
|
614
629
|
</div>
|
615
630
|
</div>
|
@@ -709,7 +724,8 @@ export const QueryBuilder = observer(
|
|
709
724
|
{queryBuilderState.textEditorState.mode && (
|
710
725
|
<QueryBuilderTextEditor queryBuilderState={queryBuilderState} />
|
711
726
|
)}
|
712
|
-
{queryBuilderState.checkEntitlementsState
|
727
|
+
{queryBuilderState.checkEntitlementsState
|
728
|
+
.showCheckEntitlementsViewer &&
|
713
729
|
renderCheckEntitlementsEditor(
|
714
730
|
queryBuilderState,
|
715
731
|
applicationStore.pluginManager
|
@@ -28,6 +28,7 @@ import { QUERY_BUILDER_SETTING_CONFIG } from '../__lib__/QueryBuilderSetting.js'
|
|
28
28
|
import { QUERY_BUILDER_COMMAND_CONFIG } from '../stores/QueryBuilderCommand.js';
|
29
29
|
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
30
30
|
import { configureDataGridComponent } from '@finos/legend-lego/data-grid';
|
31
|
+
import { Chart as ChartJS, ArcElement, Tooltip } from 'chart.js';
|
31
32
|
|
32
33
|
export type CheckEntitlementEditorRender = (
|
33
34
|
queryBuilderState: QueryBuilderState,
|
@@ -50,6 +51,9 @@ export class QueryBuilder_LegendApplicationPlugin extends LegendApplicationPlugi
|
|
50
51
|
return [
|
51
52
|
async (applicationStore) => {
|
52
53
|
configureDataGridComponent();
|
54
|
+
|
55
|
+
// configure chart component
|
56
|
+
ChartJS.register(ArcElement, Tooltip);
|
53
57
|
},
|
54
58
|
];
|
55
59
|
}
|
@@ -86,7 +86,6 @@ const QueryPreviewViewer = observer(
|
|
86
86
|
}
|
87
87
|
isReadOnly={true}
|
88
88
|
language={CODE_EDITOR_LANGUAGE.PURE}
|
89
|
-
showMiniMap={true}
|
90
89
|
/>
|
91
90
|
</ModalBody>
|
92
91
|
<ModalFooter>
|
@@ -324,12 +323,16 @@ export const QueryLoader = observer(
|
|
324
323
|
onChange={changeQueryNameInputValue}
|
325
324
|
onKeyDown={(event) => {
|
326
325
|
if (event.code === 'Enter') {
|
326
|
+
event.stopPropagation();
|
327
327
|
renameQuery(query)();
|
328
328
|
} else if (event.code === 'Escape') {
|
329
|
+
event.stopPropagation();
|
329
330
|
hideEditQueryNameInput();
|
330
331
|
}
|
331
332
|
}}
|
332
333
|
onBlur={() => hideEditQueryNameInput()}
|
334
|
+
// avoid clicking on the input causing the call to load query
|
335
|
+
onClick={(event) => event.stopPropagation()}
|
333
336
|
/>
|
334
337
|
</div>
|
335
338
|
) : (
|