@finos/legend-application-query 10.0.5 → 11.0.1
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/application/LegendQuery.d.ts.map +1 -1
- package/lib/application/LegendQuery.js +7 -4
- package/lib/application/LegendQuery.js.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.d.ts +0 -10
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.js +3 -13
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
- package/lib/application/LegendQueryApplicationNavigationContext.d.ts.map +1 -0
- package/lib/application/LegendQueryApplicationNavigationContext.js.map +1 -0
- package/lib/{stores/LegendQueryAppEvent.d.ts → application/LegendQueryEvent.d.ts} +1 -1
- package/lib/application/LegendQueryEvent.d.ts.map +1 -0
- package/lib/{stores/LegendQueryAppEvent.js → application/LegendQueryEvent.js} +1 -1
- package/lib/application/LegendQueryEvent.js.map +1 -0
- package/lib/{stores/LegendQueryEventService.d.ts → application/LegendQueryEventHelper.d.ts} +3 -6
- package/lib/application/LegendQueryEventHelper.d.ts.map +1 -0
- package/lib/application/LegendQueryEventHelper.js +22 -0
- package/lib/application/LegendQueryEventHelper.js.map +1 -0
- package/lib/{stores/LegendQueryRouter.d.ts → application/LegendQueryNavigation.d.ts} +26 -26
- package/lib/application/LegendQueryNavigation.d.ts.map +1 -0
- package/lib/{stores/LegendQueryRouter.js → application/LegendQueryNavigation.js} +27 -27
- package/lib/application/LegendQueryNavigation.js.map +1 -0
- package/lib/{stores/LegendQueryTelemetry.d.ts → application/LegendQueryTelemetryHelper.d.ts} +2 -2
- package/lib/application/LegendQueryTelemetryHelper.d.ts.map +1 -0
- package/lib/{stores/LegendQueryTelemetry.js → application/LegendQueryTelemetryHelper.js} +3 -3
- package/lib/application/LegendQueryTelemetryHelper.js.map +1 -0
- package/lib/components/CloneQueryServiceSetup.js +1 -1
- package/lib/components/CloneQueryServiceSetup.js.map +1 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.js +3 -2
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/components/CreateMappingQuerySetup.js +1 -1
- package/lib/components/CreateMappingQuerySetup.js.map +1 -1
- package/lib/components/EditExistingQuerySetup.js +1 -1
- package/lib/components/EditExistingQuerySetup.js.map +1 -1
- package/lib/components/LegendQueryApplication.js +1 -1
- package/lib/components/LegendQueryApplication.js.map +1 -1
- package/lib/components/LoadProjectServiceQuerySetup.js +2 -2
- package/lib/components/LoadProjectServiceQuerySetup.js.map +1 -1
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +18 -24
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/components/QueryEditorComponentTestUtils.js +1 -1
- package/lib/components/QueryEditorComponentTestUtils.js.map +1 -1
- package/lib/components/QueryProductionizerSetup.js +1 -1
- package/lib/components/QueryProductionizerSetup.js.map +1 -1
- package/lib/components/QuerySetup.d.ts.map +1 -1
- package/lib/components/QuerySetup.js +6 -7
- package/lib/components/QuerySetup.js.map +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.js +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +9 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib/package.json +4 -4
- package/lib/stores/CloneServiceQuerySetupStore.js +1 -1
- package/lib/stores/CloneServiceQuerySetupStore.js.map +1 -1
- package/lib/stores/CreateMappingQuerySetupStore.js +1 -1
- package/lib/stores/CreateMappingQuerySetupStore.js.map +1 -1
- package/lib/stores/LegendQueryBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendQueryBaseStore.js +3 -3
- package/lib/stores/LegendQueryBaseStore.js.map +1 -1
- package/lib/stores/LoadProjectServiceQuerySetupStore.js +1 -1
- package/lib/stores/LoadProjectServiceQuerySetupStore.js.map +1 -1
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +10 -13
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/QueryProductionizerSetupStore.js +1 -1
- package/lib/stores/QueryProductionizerSetupStore.js.map +1 -1
- package/lib/stores/QuerySetupStore.js +2 -2
- package/lib/stores/QuerySetupStore.js.map +1 -1
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js +1 -1
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js.map +1 -1
- package/package.json +12 -12
- package/src/application/LegendQuery.tsx +7 -3
- package/src/application/LegendQueryApplicationConfig.ts +1 -19
- package/src/application/LegendQueryEventHelper.ts +31 -0
- package/src/{stores/LegendQueryRouter.ts → application/LegendQueryNavigation.ts} +38 -36
- package/src/{stores/LegendQueryTelemetry.ts → application/LegendQueryTelemetryHelper.ts} +2 -2
- package/src/components/CloneQueryServiceSetup.tsx +1 -1
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +1 -1
- package/src/components/CreateMappingQuerySetup.tsx +1 -1
- package/src/components/EditExistingQuerySetup.tsx +1 -1
- package/src/components/LegendQueryApplication.tsx +1 -1
- package/src/components/LoadProjectServiceQuerySetup.tsx +1 -1
- package/src/components/QueryEditor.tsx +38 -68
- package/src/components/QueryEditorComponentTestUtils.tsx +1 -1
- package/src/components/QueryProductionizerSetup.tsx +1 -1
- package/src/components/QuerySetup.tsx +14 -28
- package/src/components/UpdateExistingServiceQuerySetup.tsx +1 -1
- package/src/index.ts +15 -17
- package/src/stores/CloneServiceQuerySetupStore.ts +1 -1
- package/src/stores/CreateMappingQuerySetupStore.ts +1 -1
- package/src/stores/LegendQueryBaseStore.ts +3 -5
- package/src/stores/LoadProjectServiceQuerySetupStore.ts +1 -1
- package/src/stores/QueryEditorStore.ts +12 -15
- package/src/stores/QueryProductionizerSetupStore.ts +1 -1
- package/src/stores/QuerySetupStore.ts +2 -2
- package/src/stores/UpdateExistingServiceQuerySetupStore.ts +1 -1
- package/tsconfig.json +6 -7
- package/tsconfig.package.json +1 -2
- package/lib/stores/LegendQueryAppEvent.d.ts.map +0 -1
- package/lib/stores/LegendQueryAppEvent.js.map +0 -1
- package/lib/stores/LegendQueryApplicationNavigationContext.d.ts.map +0 -1
- package/lib/stores/LegendQueryApplicationNavigationContext.js.map +0 -1
- package/lib/stores/LegendQueryEventService.d.ts.map +0 -1
- package/lib/stores/LegendQueryEventService.js +0 -29
- package/lib/stores/LegendQueryEventService.js.map +0 -1
- package/lib/stores/LegendQueryRouter.d.ts.map +0 -1
- package/lib/stores/LegendQueryRouter.js.map +0 -1
- package/lib/stores/LegendQueryTelemetry.d.ts.map +0 -1
- package/lib/stores/LegendQueryTelemetry.js.map +0 -1
- package/src/stores/LegendQueryEventService.ts +0 -41
- /package/lib/{stores → application}/LegendQueryApplicationNavigationContext.d.ts +0 -0
- /package/lib/{stores → application}/LegendQueryApplicationNavigationContext.js +0 -0
- /package/src/{stores → application}/LegendQueryApplicationNavigationContext.ts +0 -0
- /package/src/{stores/LegendQueryAppEvent.ts → application/LegendQueryEvent.ts} +0 -0
@@ -24,7 +24,7 @@ import {
|
|
24
24
|
} from '@finos/legend-shared';
|
25
25
|
import { generateGAVCoordinates } from '@finos/legend-storage';
|
26
26
|
|
27
|
-
export enum
|
27
|
+
export enum LEGEND_QUERY_ROUTE_PATTERN_TOKEN {
|
28
28
|
GAV = 'gav',
|
29
29
|
QUERY_ID = 'queryId',
|
30
30
|
MAPPING_PATH = 'mappingPath',
|
@@ -32,16 +32,6 @@ export enum LEGEND_QUERY_PATH_PARAM_TOKEN {
|
|
32
32
|
SERVICE_PATH = 'servicePath',
|
33
33
|
}
|
34
34
|
|
35
|
-
export enum LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN {
|
36
|
-
SHOW_ALL_GROUPS = 'showAllGroups',
|
37
|
-
SHOW_ADVANCED_ACTIONS = 'showAdvancedActions',
|
38
|
-
TAG = 'tag',
|
39
|
-
}
|
40
|
-
|
41
|
-
export enum LEGEND_QUERY_QUERY_PARAM_TOKEN {
|
42
|
-
SERVICE_EXECUTION_KEY = 'executionKey',
|
43
|
-
}
|
44
|
-
|
45
35
|
export const LEGEND_QUERY_ROUTE_PATTERN = Object.freeze({
|
46
36
|
SETUP: '/setup',
|
47
37
|
EDIT_EXISTING_QUERY_SETUP: '/setup/existing-query',
|
@@ -50,15 +40,27 @@ export const LEGEND_QUERY_ROUTE_PATTERN = Object.freeze({
|
|
50
40
|
QUERY_PRODUCTIONIZER_SETUP: '/setup/productionize-query',
|
51
41
|
UPDATE_EXISTING_SERVICE_QUERY_SETUP: '/setup/update-existing-service-query',
|
52
42
|
LOAD_PROJECT_SERVICE_QUERY_SETUP: '/setup/load-project-service-query',
|
53
|
-
CREATE_FROM_MAPPING_QUERY: `/create/manual/:${
|
54
|
-
CREATE_FROM_SERVICE_QUERY: `/create-from-service/:${
|
55
|
-
EDIT_EXISTING_QUERY: `/edit/:${
|
43
|
+
CREATE_FROM_MAPPING_QUERY: `/create/manual/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV}/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.MAPPING_PATH}/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.RUNTIME_PATH}`,
|
44
|
+
CREATE_FROM_SERVICE_QUERY: `/create-from-service/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV}/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH}`,
|
45
|
+
EDIT_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID}`,
|
56
46
|
});
|
57
47
|
|
48
|
+
export enum LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN {
|
49
|
+
SHOW_ALL_GROUPS = 'showAllGroups',
|
50
|
+
SHOW_ADVANCED_ACTIONS = 'showAdvancedActions',
|
51
|
+
TAG = 'tag',
|
52
|
+
}
|
53
|
+
|
54
|
+
export enum LEGEND_QUERY_QUERY_PARAM_TOKEN {
|
55
|
+
SERVICE_EXECUTION_KEY = 'executionKey',
|
56
|
+
}
|
57
|
+
|
58
58
|
export type QuerySetupQueryParams = {
|
59
|
-
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS]?: string;
|
60
|
-
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ADVANCED_ACTIONS]?:
|
61
|
-
|
59
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS]?: string | undefined;
|
60
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ADVANCED_ACTIONS]?:
|
61
|
+
| string
|
62
|
+
| undefined;
|
63
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.TAG]?: string | undefined;
|
62
64
|
};
|
63
65
|
|
64
66
|
export const generateQuerySetupRoute = (
|
@@ -117,20 +119,20 @@ export const generateMappingQueryCreatorRoute = (
|
|
117
119
|
runtimePath: string,
|
118
120
|
): string =>
|
119
121
|
generatePath(LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_MAPPING_QUERY, {
|
120
|
-
[
|
122
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV]: generateGAVCoordinates(
|
121
123
|
groupId,
|
122
124
|
artifactId,
|
123
125
|
versionId,
|
124
126
|
),
|
125
|
-
[
|
126
|
-
[
|
127
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.MAPPING_PATH]: mappingPath,
|
128
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.RUNTIME_PATH]: runtimePath,
|
127
129
|
});
|
128
130
|
|
129
|
-
export
|
130
|
-
[
|
131
|
-
[
|
132
|
-
[
|
133
|
-
}
|
131
|
+
export type MappingQueryCreatorPathParams = {
|
132
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV]: string;
|
133
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.MAPPING_PATH]: string;
|
134
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.RUNTIME_PATH]: string;
|
135
|
+
};
|
134
136
|
|
135
137
|
export const generateServiceQueryCreatorRoute = (
|
136
138
|
groupId: string,
|
@@ -141,12 +143,12 @@ export const generateServiceQueryCreatorRoute = (
|
|
141
143
|
): string =>
|
142
144
|
addQueryParamsStringToUrl(
|
143
145
|
generatePath(LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_SERVICE_QUERY, {
|
144
|
-
[
|
146
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV]: generateGAVCoordinates(
|
145
147
|
groupId,
|
146
148
|
artifactId,
|
147
149
|
versionId,
|
148
150
|
),
|
149
|
-
[
|
151
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH]: servicePath,
|
150
152
|
}),
|
151
153
|
stringifyQueryParams({
|
152
154
|
[LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY]: executionKey
|
@@ -155,23 +157,23 @@ export const generateServiceQueryCreatorRoute = (
|
|
155
157
|
}),
|
156
158
|
);
|
157
159
|
|
158
|
-
export
|
159
|
-
[
|
160
|
-
[
|
161
|
-
}
|
160
|
+
export type ServiceQueryCreatorPathParams = {
|
161
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV]: string;
|
162
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH]: string;
|
163
|
+
};
|
162
164
|
|
163
165
|
export type ServiceQueryCreatorQueryParams = {
|
164
|
-
[LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY]?: string;
|
166
|
+
[LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY]?: string | undefined;
|
165
167
|
};
|
166
168
|
|
167
169
|
export const generateExistingQueryEditorRoute = (queryId: string): string =>
|
168
170
|
generatePath(LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY, {
|
169
|
-
[
|
171
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID]: queryId,
|
170
172
|
});
|
171
173
|
|
172
|
-
export
|
173
|
-
[
|
174
|
-
}
|
174
|
+
export type ExistingQueryEditorPathParams = {
|
175
|
+
[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID]: string;
|
176
|
+
};
|
175
177
|
|
176
178
|
/**
|
177
179
|
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import type { TelemetryService } from '@finos/legend-application';
|
18
|
-
import { LEGEND_QUERY_APP_EVENT } from './
|
18
|
+
import { LEGEND_QUERY_APP_EVENT } from './LegendQueryEvent.js';
|
19
19
|
|
20
20
|
type Query_TelemetryData = {
|
21
21
|
query: {
|
@@ -27,7 +27,7 @@ type Query_TelemetryData = {
|
|
27
27
|
};
|
28
28
|
};
|
29
29
|
|
30
|
-
export class
|
30
|
+
export class LegendQueryTelemetryHelper {
|
31
31
|
static logEvent_ViewQuerySucceeded(
|
32
32
|
telemetryService: TelemetryService,
|
33
33
|
data: Query_TelemetryData,
|
@@ -29,7 +29,7 @@ import { useContext, useEffect } from 'react';
|
|
29
29
|
import {
|
30
30
|
generateQuerySetupRoute,
|
31
31
|
generateServiceQueryCreatorRoute,
|
32
|
-
} from '../
|
32
|
+
} from '../application/LegendQueryNavigation.js';
|
33
33
|
import {
|
34
34
|
LATEST_VERSION_ALIAS,
|
35
35
|
SNAPSHOT_VERSION_ALIAS,
|
@@ -37,7 +37,7 @@ import {
|
|
37
37
|
generateQueryProductionizerSetupRoute,
|
38
38
|
generateUpdateExistingServiceQuerySetup,
|
39
39
|
LEGEND_QUERY_ROUTE_PATTERN,
|
40
|
-
} from '../
|
40
|
+
} from '../application/LegendQueryNavigation.js';
|
41
41
|
import type { ApplicationPageEntry } from '@finos/legend-application';
|
42
42
|
import { CloneQueryServiceSetup } from './CloneQueryServiceSetup.js';
|
43
43
|
import { QueryProductionizerSetup } from './QueryProductionizerSetup.js';
|
@@ -29,7 +29,7 @@ import { useContext, useEffect } from 'react';
|
|
29
29
|
import {
|
30
30
|
generateMappingQueryCreatorRoute,
|
31
31
|
generateQuerySetupRoute,
|
32
|
-
} from '../
|
32
|
+
} from '../application/LegendQueryNavigation.js';
|
33
33
|
import {
|
34
34
|
LATEST_VERSION_ALIAS,
|
35
35
|
SNAPSHOT_VERSION_ALIAS,
|
@@ -32,7 +32,7 @@ import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
32
32
|
import {
|
33
33
|
generateExistingQueryEditorRoute,
|
34
34
|
generateQuerySetupRoute,
|
35
|
-
} from '../
|
35
|
+
} from '../application/LegendQueryNavigation.js';
|
36
36
|
import { useDepotServerClient } from '@finos/legend-server-depot';
|
37
37
|
import {
|
38
38
|
useApplicationStore,
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
18
|
-
import { LEGEND_QUERY_ROUTE_PATTERN } from '../
|
18
|
+
import { LEGEND_QUERY_ROUTE_PATTERN } from '../application/LegendQueryNavigation.js';
|
19
19
|
import { QuerySetupLandingPage } from './QuerySetup.js';
|
20
20
|
import {
|
21
21
|
MappingQueryCreator,
|
@@ -19,7 +19,7 @@ import { guaranteeType } from '@finos/legend-shared';
|
|
19
19
|
import { flowResult } from 'mobx';
|
20
20
|
import { observer, useLocalObservable } from 'mobx-react-lite';
|
21
21
|
import { useContext, useEffect } from 'react';
|
22
|
-
import { generateQuerySetupRoute } from '../
|
22
|
+
import { generateQuerySetupRoute } from '../application/LegendQueryNavigation.js';
|
23
23
|
import { useDepotServerClient } from '@finos/legend-server-depot';
|
24
24
|
import { useLegendQueryApplicationStore } from './LegendQueryBaseStoreProvider.js';
|
25
25
|
import { LoadProjectServiceQuerySetupStore } from '../stores/LoadProjectServiceQuerySetupStore.js';
|
@@ -44,24 +44,18 @@ import {
|
|
44
44
|
LightBulbIcon,
|
45
45
|
EmptyLightBulbIcon,
|
46
46
|
} from '@finos/legend-art';
|
47
|
-
import {
|
48
|
-
debounce,
|
49
|
-
getQueryParameters,
|
50
|
-
getQueryParameterValue,
|
51
|
-
sanitizeURL,
|
52
|
-
} from '@finos/legend-shared';
|
47
|
+
import { debounce } from '@finos/legend-shared';
|
53
48
|
import { observer } from 'mobx-react-lite';
|
54
49
|
import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
|
55
50
|
import {
|
56
51
|
type MappingQueryCreatorPathParams,
|
57
52
|
type ExistingQueryEditorPathParams,
|
58
53
|
type ServiceQueryCreatorPathParams,
|
59
|
-
type ServiceQueryCreatorQueryParams,
|
60
54
|
LEGEND_QUERY_QUERY_PARAM_TOKEN,
|
61
|
-
|
55
|
+
LEGEND_QUERY_ROUTE_PATTERN_TOKEN,
|
62
56
|
generateExistingQueryEditorRoute,
|
63
57
|
generateQuerySetupRoute,
|
64
|
-
} from '../
|
58
|
+
} from '../application/LegendQueryNavigation.js';
|
65
59
|
import {
|
66
60
|
type QueryEditorStore,
|
67
61
|
ExistingQueryEditorStore,
|
@@ -70,7 +64,7 @@ import {
|
|
70
64
|
createViewSDLCProjectHandler,
|
71
65
|
} from '../stores/QueryEditorStore.js';
|
72
66
|
import {
|
73
|
-
|
67
|
+
LEGEND_APPLICATION_COLOR_THEME,
|
74
68
|
useApplicationStore,
|
75
69
|
useParams,
|
76
70
|
} from '@finos/legend-application';
|
@@ -406,13 +400,12 @@ const QueryEditorHeaderContent = observer(
|
|
406
400
|
applicationStore.alertUnhandledError,
|
407
401
|
);
|
408
402
|
};
|
409
|
-
const
|
410
|
-
applicationStore.layoutService.
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
|
403
|
+
const TEMPORARY__toggleLightDarkMode = (): void => {
|
404
|
+
applicationStore.layoutService.setColorTheme(
|
405
|
+
applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
406
|
+
? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK
|
407
|
+
: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,
|
408
|
+
{ persist: true },
|
416
409
|
);
|
417
410
|
};
|
418
411
|
const saveQuery = (): void => {
|
@@ -479,24 +472,22 @@ const QueryEditorHeaderContent = observer(
|
|
479
472
|
queryBuilderState={queryBuilderState}
|
480
473
|
/>
|
481
474
|
)}
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
</button>
|
499
|
-
)}
|
475
|
+
<button
|
476
|
+
title="Toggle light/dark mode"
|
477
|
+
onClick={TEMPORARY__toggleLightDarkMode}
|
478
|
+
className="query-editor__header__action"
|
479
|
+
>
|
480
|
+
{applicationStore.layoutService
|
481
|
+
.TEMPORARY__isLightColorThemeEnabled ? (
|
482
|
+
<>
|
483
|
+
<LightBulbIcon className="query-editor__header__action__icon--bulb--light" />
|
484
|
+
</>
|
485
|
+
) : (
|
486
|
+
<>
|
487
|
+
<EmptyLightBulbIcon className="query-editor__header__action__icon--bulb--dark" />
|
488
|
+
</>
|
489
|
+
)}
|
490
|
+
</button>
|
500
491
|
|
501
492
|
<DropdownMenu
|
502
493
|
className="query-editor__header__action btn--medium"
|
@@ -570,23 +561,8 @@ export const QueryEditor = observer(() => {
|
|
570
561
|
);
|
571
562
|
}, [editorStore, applicationStore]);
|
572
563
|
|
573
|
-
useEffect(() => {
|
574
|
-
document.body.classList.toggle(
|
575
|
-
'light-theme',
|
576
|
-
applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
|
577
|
-
);
|
578
|
-
}, [applicationStore.layoutService.TEMPORARY__isLightThemeEnabled]);
|
579
|
-
|
580
564
|
return (
|
581
|
-
<div
|
582
|
-
className={clsx([
|
583
|
-
'query-editor ',
|
584
|
-
{
|
585
|
-
'query-editor--light':
|
586
|
-
applicationStore.layoutService.TEMPORARY__isLightThemeEnabled,
|
587
|
-
},
|
588
|
-
])}
|
589
|
-
>
|
565
|
+
<div className="query-editor">
|
590
566
|
<div className="query-editor__header">
|
591
567
|
<div className="query-editor__header__menu">
|
592
568
|
<DropdownMenu
|
@@ -598,7 +574,6 @@ export const QueryEditor = observer(() => {
|
|
598
574
|
}}
|
599
575
|
content={
|
600
576
|
<MenuContent>
|
601
|
-
{/* <MenuContentItem onClick={openHelp}>Help...</MenuContentItem> */}
|
602
577
|
<MenuContentItem
|
603
578
|
disabled={!appDocUrl}
|
604
579
|
onClick={goToDocumentation}
|
@@ -660,7 +635,7 @@ export const QueryEditor = observer(() => {
|
|
660
635
|
|
661
636
|
export const ExistingQueryEditor = observer(() => {
|
662
637
|
const params = useParams<ExistingQueryEditorPathParams>();
|
663
|
-
const queryId = params[
|
638
|
+
const queryId = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID];
|
664
639
|
|
665
640
|
return (
|
666
641
|
<ExistingQueryEditorStoreProvider queryId={queryId}>
|
@@ -671,18 +646,13 @@ export const ExistingQueryEditor = observer(() => {
|
|
671
646
|
|
672
647
|
export const ServiceQueryCreator = observer(() => {
|
673
648
|
const applicationStore = useApplicationStore();
|
674
|
-
const
|
675
|
-
const gav =
|
676
|
-
const servicePath =
|
677
|
-
const executionKey =
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
),
|
682
|
-
true,
|
683
|
-
),
|
684
|
-
LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY,
|
685
|
-
);
|
649
|
+
const parameters = useParams<ServiceQueryCreatorPathParams>();
|
650
|
+
const gav = parameters[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV];
|
651
|
+
const servicePath = parameters[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH];
|
652
|
+
const executionKey =
|
653
|
+
applicationStore.navigationService.navigator.getAddressParameterValue(
|
654
|
+
LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY,
|
655
|
+
);
|
686
656
|
|
687
657
|
return (
|
688
658
|
<ServiceQueryCreatorStoreProvider
|
@@ -697,9 +667,9 @@ export const ServiceQueryCreator = observer(() => {
|
|
697
667
|
|
698
668
|
export const MappingQueryCreator = observer(() => {
|
699
669
|
const params = useParams<MappingQueryCreatorPathParams>();
|
700
|
-
const gav = params[
|
701
|
-
const mappingPath = params[
|
702
|
-
const runtimePath = params[
|
670
|
+
const gav = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV];
|
671
|
+
const mappingPath = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.MAPPING_PATH];
|
672
|
+
const runtimePath = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.RUNTIME_PATH];
|
703
673
|
|
704
674
|
return (
|
705
675
|
<MappingQueryCreatorStoreProvider
|
@@ -46,7 +46,7 @@ import {
|
|
46
46
|
import { TEST__getTestLegendQueryApplicationConfig } from '../stores/QueryEditorStoreTestUtils.js';
|
47
47
|
import { LegendQueryPluginManager } from '../application/LegendQueryPluginManager.js';
|
48
48
|
import { ExistingQueryEditor } from './QueryEditor.js';
|
49
|
-
import { generateExistingQueryEditorRoute } from '../
|
49
|
+
import { generateExistingQueryEditorRoute } from '../application/LegendQueryNavigation.js';
|
50
50
|
import type { Entity } from '@finos/legend-storage';
|
51
51
|
import { ExistingQueryEditorStore } from '../stores/QueryEditorStore.js';
|
52
52
|
import { LegendQueryBaseStoreProvider } from './LegendQueryBaseStoreProvider.js';
|
@@ -41,7 +41,7 @@ import {
|
|
41
41
|
buildQueryOption,
|
42
42
|
type QueryOption,
|
43
43
|
} from '@finos/legend-query-builder';
|
44
|
-
import { generateQuerySetupRoute } from '../
|
44
|
+
import { generateQuerySetupRoute } from '../application/LegendQueryNavigation.js';
|
45
45
|
|
46
46
|
const QueryProductionizerSetupStoreProvider: React.FC<{
|
47
47
|
children: React.ReactNode;
|
@@ -32,18 +32,10 @@ import {
|
|
32
32
|
MenuContentDivider,
|
33
33
|
AssistantIcon,
|
34
34
|
} from '@finos/legend-art';
|
35
|
-
import {
|
36
|
-
getQueryParameters,
|
37
|
-
getQueryParameterValue,
|
38
|
-
guaranteeNonNullable,
|
39
|
-
sanitizeURL,
|
40
|
-
} from '@finos/legend-shared';
|
35
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
41
36
|
import { observer, useLocalObservable } from 'mobx-react-lite';
|
42
37
|
import React, { createContext, useContext, useEffect } from 'react';
|
43
|
-
import {
|
44
|
-
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN,
|
45
|
-
type QuerySetupQueryParams,
|
46
|
-
} from '../stores/LegendQueryRouter.js';
|
38
|
+
import { LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN } from '../application/LegendQueryNavigation.js';
|
47
39
|
import {
|
48
40
|
QuerySetupLandingPageStore,
|
49
41
|
type BaseQuerySetupStore,
|
@@ -261,24 +253,18 @@ export const QuerySetupLandingPage = withQuerySetupLandingPageStore(
|
|
261
253
|
observer(() => {
|
262
254
|
const setupStore = useQuerySetupLandingPageStore();
|
263
255
|
const applicationStore = useLegendQueryApplicationStore();
|
264
|
-
const
|
265
|
-
|
266
|
-
|
267
|
-
)
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS,
|
277
|
-
);
|
278
|
-
const tagToFocus = getQueryParameterValue(
|
279
|
-
params,
|
280
|
-
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.TAG,
|
281
|
-
);
|
256
|
+
const showAdvancedActions =
|
257
|
+
applicationStore.navigationService.navigator.getAddressParameterValue(
|
258
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ADVANCED_ACTIONS,
|
259
|
+
);
|
260
|
+
const showAllGroups =
|
261
|
+
applicationStore.navigationService.navigator.getAddressParameterValue(
|
262
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS,
|
263
|
+
);
|
264
|
+
const tagToFocus =
|
265
|
+
applicationStore.navigationService.navigator.getAddressParameterValue(
|
266
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.TAG,
|
267
|
+
);
|
282
268
|
const goToStudio = (): void =>
|
283
269
|
applicationStore.navigationService.navigator.visitAddress(
|
284
270
|
applicationStore.config.studioUrl,
|
@@ -24,7 +24,7 @@ import { debounce, guaranteeType } from '@finos/legend-shared';
|
|
24
24
|
import { flowResult } from 'mobx';
|
25
25
|
import { observer, useLocalObservable } from 'mobx-react-lite';
|
26
26
|
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
27
|
-
import { generateQuerySetupRoute } from '../
|
27
|
+
import { generateQuerySetupRoute } from '../application/LegendQueryNavigation.js';
|
28
28
|
import { useDepotServerClient } from '@finos/legend-server-depot';
|
29
29
|
import { useLegendQueryApplicationStore } from './LegendQueryBaseStoreProvider.js';
|
30
30
|
import { UpdateExistingServiceQuerySetupStore } from '../stores/UpdateExistingServiceQuerySetupStore.js';
|
package/src/index.ts
CHANGED
@@ -14,22 +14,19 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
// application
|
17
18
|
export * from './application/LegendQuery.js';
|
18
|
-
export * from './
|
19
|
-
export * from './
|
20
|
-
|
21
|
-
export
|
22
|
-
|
23
|
-
|
24
|
-
} from './
|
25
|
-
export { QueryEditor } from './components/QueryEditor.js';
|
26
|
-
|
27
|
-
export { LegendQueryPluginManager } from './application/LegendQueryPluginManager.js';
|
19
|
+
export * from './application/LegendQueryApplicationConfig.js';
|
20
|
+
export * from './application/LegendQueryPluginManager.js';
|
21
|
+
export * from './application/LegendQueryEvent.js';
|
22
|
+
export * from './application/LegendQueryEventHelper.js';
|
23
|
+
export { useLegendQueryApplicationStore } from './components/LegendQueryBaseStoreProvider.js';
|
24
|
+
export type { LegendQueryApplicationStore } from './stores/LegendQueryBaseStore.js';
|
25
|
+
export { generateExistingQueryEditorRoute } from './application/LegendQueryNavigation.js';
|
28
26
|
|
27
|
+
// stores
|
29
28
|
export * from './stores/LegendQueryApplicationPlugin.js';
|
30
|
-
export * from './stores/LegendQueryRouter.js';
|
31
29
|
export { BaseQuerySetupStore } from './stores/QuerySetupStore.js';
|
32
|
-
export { LegendQueryApplicationConfig } from './application/LegendQueryApplicationConfig.js';
|
33
30
|
export {
|
34
31
|
createViewProjectHandler,
|
35
32
|
createViewSDLCProjectHandler,
|
@@ -37,9 +34,10 @@ export {
|
|
37
34
|
ExistingQueryEditorStore,
|
38
35
|
type QueryExportConfiguration,
|
39
36
|
} from './stores/QueryEditorStore.js';
|
37
|
+
|
38
|
+
// components
|
40
39
|
export {
|
41
|
-
|
42
|
-
|
43
|
-
} from './
|
44
|
-
export {
|
45
|
-
export { LegendQueryEventService } from './stores/LegendQueryEventService.js';
|
40
|
+
QueryEditorStoreContext,
|
41
|
+
useQueryEditorStore,
|
42
|
+
} from './components/QueryEditorStoreProvider.js';
|
43
|
+
export { QueryEditor } from './components/QueryEditor.js';
|
@@ -31,7 +31,7 @@ import {
|
|
31
31
|
} from '@finos/legend-shared';
|
32
32
|
import type { EntitiesWithOrigin, Entity } from '@finos/legend-storage';
|
33
33
|
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
34
|
-
import { LEGEND_QUERY_APP_EVENT } from '
|
34
|
+
import { LEGEND_QUERY_APP_EVENT } from '../application/LegendQueryEvent.js';
|
35
35
|
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
36
36
|
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
37
37
|
import type { Service } from '@finos/legend-graph';
|
@@ -39,7 +39,7 @@ import {
|
|
39
39
|
makeObservable,
|
40
40
|
observable,
|
41
41
|
} from 'mobx';
|
42
|
-
import { LEGEND_QUERY_APP_EVENT } from '
|
42
|
+
import { LEGEND_QUERY_APP_EVENT } from '../application/LegendQueryEvent.js';
|
43
43
|
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
44
44
|
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
45
45
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
import type { DepotServerClient } from '@finos/legend-server-depot';
|
18
18
|
import {
|
19
19
|
type ApplicationStore,
|
20
|
-
|
20
|
+
LegendApplicationTelemetryHelper,
|
21
21
|
APPLICATION_EVENT,
|
22
22
|
} from '@finos/legend-application';
|
23
23
|
import type { LegendQueryPluginManager } from '../application/LegendQueryPluginManager.js';
|
@@ -79,9 +79,7 @@ export class LegendQueryBaseStore {
|
|
79
79
|
} catch (error) {
|
80
80
|
assertErrorThrown(error);
|
81
81
|
this.applicationStore.logService.error(
|
82
|
-
LogEvent.create(
|
83
|
-
APPLICATION_EVENT.APPLICATION_IDENTITY_AUTO_FETCH__FAILURE,
|
84
|
-
),
|
82
|
+
LogEvent.create(APPLICATION_EVENT.IDENTITY_AUTO_FETCH__FAILURE),
|
85
83
|
error,
|
86
84
|
);
|
87
85
|
this.applicationStore.notificationService.notifyWarning(error.message);
|
@@ -90,7 +88,7 @@ export class LegendQueryBaseStore {
|
|
90
88
|
// setup telemetry service
|
91
89
|
this.applicationStore.telemetryService.setup();
|
92
90
|
|
93
|
-
|
91
|
+
LegendApplicationTelemetryHelper.logEvent_ApplicationInitializationSucceeded(
|
94
92
|
this.applicationStore.telemetryService,
|
95
93
|
this.applicationStore,
|
96
94
|
);
|
@@ -27,7 +27,7 @@ import {
|
|
27
27
|
import { parseProjectIdentifier } from '@finos/legend-storage';
|
28
28
|
import { flow, makeObservable, observable } from 'mobx';
|
29
29
|
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
30
|
-
import { EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateProjectServiceQueryUrl } from '
|
30
|
+
import { EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateProjectServiceQueryUrl } from '../application/LegendQueryNavigation.js';
|
31
31
|
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
32
32
|
|
33
33
|
export class LoadProjectServiceQuerySetupStore extends BaseQuerySetupStore {
|