@finos/legend-application-query 13.6.0 → 13.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/CloneQueryServiceSetup.d.ts.map +1 -1
- package/lib/components/CloneQueryServiceSetup.js +6 -2
- package/lib/components/CloneQueryServiceSetup.js.map +1 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.js +4 -4
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/components/CreateMappingQuerySetup.d.ts.map +1 -1
- package/lib/components/CreateMappingQuerySetup.js +6 -2
- package/lib/components/CreateMappingQuerySetup.js.map +1 -1
- package/lib/components/LegendQueryWebApplication.d.ts.map +1 -1
- package/lib/components/LegendQueryWebApplication.js +4 -32
- package/lib/components/LegendQueryWebApplication.js.map +1 -1
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +8 -8
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/components/QueryEdtiorExistingQueryVersionRevertModal.d.ts.map +1 -1
- package/lib/components/QueryEdtiorExistingQueryVersionRevertModal.js +1 -1
- package/lib/components/QueryEdtiorExistingQueryVersionRevertModal.js.map +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.js +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.js.map +1 -1
- package/lib/components/__test-utils__/QueryEditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryEditorComponentTestUtils.js +3 -1
- package/lib/components/__test-utils__/QueryEditorComponentTestUtils.js.map +1 -1
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.d.ts.map +1 -1
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.js +2 -1
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.js.map +1 -1
- package/lib/components/data-space/DataSpaceQueryCreator.d.ts.map +1 -1
- package/lib/components/data-space/DataSpaceQueryCreator.js +3 -3
- package/lib/components/data-space/DataSpaceQueryCreator.js.map +1 -1
- package/lib/components/data-space/DataSpaceQuerySetup.js +1 -1
- package/lib/components/data-space/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/data-space/DataSpaceTemplateQueryCreator.d.ts.map +1 -1
- package/lib/components/data-space/DataSpaceTemplateQueryCreator.js +4 -3
- package/lib/components/data-space/DataSpaceTemplateQueryCreator.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +5 -5
- package/package.json +17 -17
- package/src/components/CloneQueryServiceSetup.tsx +10 -2
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +4 -4
- package/src/components/CreateMappingQuerySetup.tsx +10 -2
- package/src/components/LegendQueryWebApplication.tsx +31 -85
- package/src/components/QueryEditor.tsx +24 -10
- package/src/components/QueryEdtiorExistingQueryVersionRevertModal.tsx +1 -3
- package/src/components/UpdateExistingServiceQuerySetup.tsx +1 -1
- package/src/components/__test-utils__/QueryEditorComponentTestUtils.tsx +14 -2
- package/src/components/data-cube/ExistingQueryDataCubeViewer.tsx +6 -1
- package/src/components/data-space/DataSpaceQueryCreator.tsx +4 -6
- package/src/components/data-space/DataSpaceQuerySetup.tsx +1 -1
- package/src/components/data-space/DataSpaceTemplateQueryCreator.tsx +10 -6
@@ -44,6 +44,11 @@ import {
|
|
44
44
|
import { LegendQueryFrameworkProvider } from '../LegendQueryFrameworkProvider.js';
|
45
45
|
import { TEST__BrowserEnvironmentProvider } from '@finos/legend-application/test';
|
46
46
|
import { Core_LegendQueryApplicationPlugin } from '../Core_LegendQueryApplicationPlugin.js';
|
47
|
+
import { Route, Routes } from '@finos/legend-application/browser';
|
48
|
+
import {
|
49
|
+
generateExistingQueryEditorRoute,
|
50
|
+
LEGEND_QUERY_ROUTE_PATTERN,
|
51
|
+
} from '../../__lib__/LegendQueryNavigation.js';
|
47
52
|
|
48
53
|
const TEST_QUERY_ID = 'test-query-id';
|
49
54
|
export const TEST_QUERY_NAME = 'MyTestQuery';
|
@@ -170,9 +175,16 @@ export const TEST__setUpQueryEditor = async (
|
|
170
175
|
|
171
176
|
const renderResult = render(
|
172
177
|
<ApplicationStoreProvider store={MOCK__editorStore.applicationStore}>
|
173
|
-
<TEST__BrowserEnvironmentProvider
|
178
|
+
<TEST__BrowserEnvironmentProvider
|
179
|
+
initialEntries={[generateExistingQueryEditorRoute(lightQuery.id)]}
|
180
|
+
>
|
174
181
|
<LegendQueryFrameworkProvider>
|
175
|
-
<
|
182
|
+
<Routes>
|
183
|
+
<Route
|
184
|
+
path={LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY}
|
185
|
+
element={<ExistingQueryEditor />}
|
186
|
+
/>
|
187
|
+
</Routes>
|
176
188
|
</LegendQueryFrameworkProvider>
|
177
189
|
</TEST__BrowserEnvironmentProvider>
|
178
190
|
</ApplicationStoreProvider>,
|
@@ -29,6 +29,7 @@ import { useEffect } from 'react';
|
|
29
29
|
import { flowResult } from 'mobx';
|
30
30
|
import { DataCube, DataCubeProvider } from '@finos/legend-data-cube';
|
31
31
|
import { QueryBuilderDataCubeApplicationEngine } from '@finos/legend-query-builder';
|
32
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
32
33
|
|
33
34
|
export const DataCubeWrapper = observer(() => {
|
34
35
|
const applicationStore = useApplicationStore();
|
@@ -44,6 +45,7 @@ export const DataCubeWrapper = observer(() => {
|
|
44
45
|
const _appEngine = new QueryBuilderDataCubeApplicationEngine(
|
45
46
|
applicationStore,
|
46
47
|
);
|
48
|
+
|
47
49
|
return (
|
48
50
|
<DataCubeProvider application={_appEngine} engine={store.engine}>
|
49
51
|
<DataCube />
|
@@ -53,7 +55,10 @@ export const DataCubeWrapper = observer(() => {
|
|
53
55
|
|
54
56
|
export const ExistingQueryDataCubeViewer = observer(() => {
|
55
57
|
const params = useParams<ExistingQueryEditorPathParams>();
|
56
|
-
const queryId =
|
58
|
+
const queryId = guaranteeNonNullable(
|
59
|
+
params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID],
|
60
|
+
);
|
61
|
+
|
57
62
|
return (
|
58
63
|
<ExistingQueryDataCubeEditorStoreProvider queryId={queryId}>
|
59
64
|
<DataCubeWrapper />
|
@@ -88,14 +88,12 @@ const DataSpaceQueryCreatorStoreProvider: React.FC<{
|
|
88
88
|
|
89
89
|
export const DataSpaceQueryCreator = observer(() => {
|
90
90
|
const applicationStore = useApplicationStore();
|
91
|
-
const parameters = useParams<DataSpaceQueryCreatorPathParams
|
92
|
-
const gav = parameters
|
91
|
+
const parameters = useParams<DataSpaceQueryCreatorPathParams>();
|
92
|
+
const gav = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV];
|
93
93
|
const dataSpacePath =
|
94
|
-
parameters
|
94
|
+
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
|
95
95
|
const executionContext =
|
96
|
-
parameters
|
97
|
-
DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.EXECUTION_CONTEXT
|
98
|
-
];
|
96
|
+
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.EXECUTION_CONTEXT];
|
99
97
|
const runtimePath =
|
100
98
|
applicationStore.navigationService.navigator.getCurrentLocationParameterValue(
|
101
99
|
DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN.RUNTIME_PATH,
|
@@ -82,7 +82,7 @@ const DataSpaceQuerySetupSetupPanelContent = observer(
|
|
82
82
|
</label>
|
83
83
|
<CustomSelectorInput
|
84
84
|
inputId="query-builder__setup__data-space-selector"
|
85
|
-
|
85
|
+
inputRef={dataSpaceSearchRef}
|
86
86
|
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
87
87
|
options={dataSpaceOptions}
|
88
88
|
isLoading={queryBuilderState.loadDataSpacesState.isInProgress}
|
@@ -28,6 +28,7 @@ import {
|
|
28
28
|
type DataSpaceTemplateQueryCreatorPathParams,
|
29
29
|
} from '../../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
|
30
30
|
import { QueryEditor } from '../QueryEditor.js';
|
31
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
31
32
|
|
32
33
|
const DataSpaceTemplateQueryCreatorStoreProvider: React.FC<{
|
33
34
|
children: React.ReactNode;
|
@@ -59,16 +60,19 @@ const DataSpaceTemplateQueryCreatorStoreProvider: React.FC<{
|
|
59
60
|
|
60
61
|
export const DataSpaceTemplateQueryCreator = observer(() => {
|
61
62
|
const parameters = useParams<DataSpaceTemplateQueryCreatorPathParams>();
|
62
|
-
const gav =
|
63
|
-
parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV]
|
64
|
-
|
63
|
+
const gav = guaranteeNonNullable(
|
64
|
+
parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV],
|
65
|
+
);
|
66
|
+
const dataSpacePath = guaranteeNonNullable(
|
65
67
|
parameters[
|
66
68
|
DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH
|
67
|
-
]
|
68
|
-
|
69
|
+
],
|
70
|
+
);
|
71
|
+
const templateQueryId = guaranteeNonNullable(
|
69
72
|
parameters[
|
70
73
|
DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID
|
71
|
-
]
|
74
|
+
],
|
75
|
+
);
|
72
76
|
|
73
77
|
return (
|
74
78
|
<DataSpaceTemplateQueryCreatorStoreProvider
|