@finos/legend-query-builder 4.0.13 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderEvent.d.ts +3 -1
- package/lib/__lib__/QueryBuilderEvent.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderEvent.js +2 -0
- package/lib/__lib__/QueryBuilderEvent.js.map +1 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +5 -0
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.js +6 -0
- package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +7 -3
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryUsageViewer.d.ts +22 -0
- package/lib/components/QueryUsageViewer.d.ts.map +1 -0
- package/lib/components/QueryUsageViewer.js +33 -0
- package/lib/components/QueryUsageViewer.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +3 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +3 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/QueryBuilderResultState.d.ts +2 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +7 -1
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +10 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +9 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/package.json +6 -6
- package/src/__lib__/QueryBuilderEvent.ts +3 -0
- package/src/__lib__/QueryBuilderTelemetryHelper.ts +23 -0
- package/src/components/QueryBuilderResultPanel.tsx +18 -1
- package/src/components/QueryUsageViewer.tsx +111 -0
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +4 -1
- package/src/components/filter/QueryBuilderFilterPanel.tsx +4 -1
- package/src/stores/QueryBuilderResultState.ts +8 -2
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +12 -0
- package/src/stores/explorer/QueryBuilderExplorerState.ts +20 -0
- package/tsconfig.json +1 -0
@@ -38,6 +38,13 @@ export type DatasetEntitlementAccessReportActionConfiguration = {
|
|
38
38
|
) => React.ReactNode;
|
39
39
|
};
|
40
40
|
|
41
|
+
export type QueryExportUsageConfiguration = {
|
42
|
+
key: string;
|
43
|
+
title: string;
|
44
|
+
icon?: React.ReactNode | undefined;
|
45
|
+
renderer(): React.ReactNode;
|
46
|
+
};
|
47
|
+
|
41
48
|
export interface QueryBuilder_LegendApplicationPlugin_Extension
|
42
49
|
extends LegendApplicationPlugin {
|
43
50
|
/**
|
@@ -49,4 +56,9 @@ export interface QueryBuilder_LegendApplicationPlugin_Extension
|
|
49
56
|
* Get the list of dataset entitlement access report action configurations.
|
50
57
|
*/
|
51
58
|
getExtraDatasetEntitlementAccessNotGrantedReportActionConfigurations?(): DatasetEntitlementAccessReportActionConfiguration[];
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Get the list of query usage configurations
|
62
|
+
*/
|
63
|
+
getExtraQueryUsageConfigurations?(): QueryExportUsageConfiguration[];
|
52
64
|
}
|
@@ -23,6 +23,7 @@ import {
|
|
23
23
|
type GeneratorFn,
|
24
24
|
assertType,
|
25
25
|
UnsupportedOperationError,
|
26
|
+
StopWatch,
|
26
27
|
} from '@finos/legend-shared';
|
27
28
|
import {
|
28
29
|
type AbstractProperty,
|
@@ -57,6 +58,7 @@ import {
|
|
57
58
|
type ExecutionResult,
|
58
59
|
getAllSubclasses,
|
59
60
|
PropertyExplicitReference,
|
61
|
+
reportGraphAnalytics,
|
60
62
|
} from '@finos/legend-graph';
|
61
63
|
import type { QueryBuilderState } from '../QueryBuilderState.js';
|
62
64
|
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
@@ -69,6 +71,7 @@ import {
|
|
69
71
|
import { QueryBuilderPropertySearchState } from './QueryBuilderPropertySearchState.js';
|
70
72
|
import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
|
71
73
|
import { propertyExpression_setFunc } from '../shared/ValueSpecificationModifierHelper.js';
|
74
|
+
import { QueryBuilderTelemetryHelper } from '../../__lib__/QueryBuilderTelemetryHelper.js';
|
72
75
|
|
73
76
|
export enum QUERY_BUILDER_EXPLORER_TREE_DND_TYPE {
|
74
77
|
ROOT = 'ROOT',
|
@@ -669,6 +672,14 @@ export class QueryBuilderExplorerState {
|
|
669
672
|
this.mappingModelCoverageAnalysisResult?.mapping
|
670
673
|
) {
|
671
674
|
this.mappingModelCoverageAnalysisState.inProgress();
|
675
|
+
QueryBuilderTelemetryHelper.logEvent_QueryMappingModelCoverageAnalysisLaunched(
|
676
|
+
this.queryBuilderState.applicationStore.telemetryService,
|
677
|
+
);
|
678
|
+
|
679
|
+
const stopWatch = new StopWatch();
|
680
|
+
const report = reportGraphAnalytics(
|
681
|
+
this.queryBuilderState.graphManagerState.graph,
|
682
|
+
);
|
672
683
|
this.mappingModelCoverageAnalysisState.setMessage('Analyzing Mapping...');
|
673
684
|
try {
|
674
685
|
this.mappingModelCoverageAnalysisResult = (yield flowResult(
|
@@ -678,6 +689,15 @@ export class QueryBuilderExplorerState {
|
|
678
689
|
),
|
679
690
|
)) as MappingModelCoverageAnalysisResult;
|
680
691
|
this.refreshTreeData();
|
692
|
+
report.timings =
|
693
|
+
this.queryBuilderState.applicationStore.timeService.finalizeTimingsRecord(
|
694
|
+
stopWatch,
|
695
|
+
report.timings,
|
696
|
+
);
|
697
|
+
QueryBuilderTelemetryHelper.logEvent_QueryMappingModelCoverageAnalysisSucceeded(
|
698
|
+
this.queryBuilderState.applicationStore.telemetryService,
|
699
|
+
report,
|
700
|
+
);
|
681
701
|
} catch (error) {
|
682
702
|
assertErrorThrown(error);
|
683
703
|
this.queryBuilderState.applicationStore.notificationService.notifyError(
|
package/tsconfig.json
CHANGED
@@ -218,6 +218,7 @@
|
|
218
218
|
"./src/components/QueryBuilderTextEditor.tsx",
|
219
219
|
"./src/components/QueryBuilderUnsupportedQueryEditor.tsx",
|
220
220
|
"./src/components/QueryLoader.tsx",
|
221
|
+
"./src/components/QueryUsageViewer.tsx",
|
221
222
|
"./src/components/ServiceQuerySetupUtils.tsx",
|
222
223
|
"./src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx",
|
223
224
|
"./src/components/data-access/DataAccessOverview.tsx",
|