@finos/legend-application-query 13.5.55 → 13.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/LegendQueryNavigation.d.ts +1 -0
- package/lib/__lib__/LegendQueryNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendQueryNavigation.js +1 -0
- package/lib/__lib__/LegendQueryNavigation.js.map +1 -1
- package/lib/components/LegendQueryWebApplication.d.ts.map +1 -1
- package/lib/components/LegendQueryWebApplication.js +4 -1
- package/lib/components/LegendQueryWebApplication.js.map +1 -1
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.d.ts +22 -0
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.d.ts.map +1 -0
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.js +43 -0
- package/lib/components/data-cube/ExistingQueryDataCubeViewer.js.map +1 -0
- package/lib/components/data-cube/ExistingQueryEditorStoreProviderProvider.d.ts +23 -0
- package/lib/components/data-cube/ExistingQueryEditorStoreProviderProvider.d.ts.map +1 -0
- package/lib/components/data-cube/ExistingQueryEditorStoreProviderProvider.js +30 -0
- package/lib/components/data-cube/ExistingQueryEditorStoreProviderProvider.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/package.json +2 -1
- package/lib/stores/data-cube/ExistingQueryDataCubeViewer.d.ts +30 -0
- package/lib/stores/data-cube/ExistingQueryDataCubeViewer.d.ts.map +1 -0
- package/lib/stores/data-cube/ExistingQueryDataCubeViewer.js +59 -0
- package/lib/stores/data-cube/ExistingQueryDataCubeViewer.js.map +1 -0
- package/package.json +9 -8
- package/src/__lib__/LegendQueryNavigation.ts +1 -0
- package/src/components/LegendQueryWebApplication.tsx +9 -0
- package/src/components/data-cube/ExistingQueryDataCubeViewer.tsx +62 -0
- package/src/components/data-cube/ExistingQueryEditorStoreProviderProvider.tsx +56 -0
- package/src/stores/data-cube/ExistingQueryDataCubeViewer.ts +98 -0
- package/tsconfig.json +3 -0
@@ -32,6 +32,7 @@ export declare const LEGEND_QUERY_ROUTE_PATTERN: Readonly<{
|
|
32
32
|
CREATE_FROM_MAPPING_QUERY: "/create/manual/:gav/:mappingPath/:runtimePath";
|
33
33
|
CREATE_FROM_SERVICE_QUERY: "/create-from-service/:gav/:servicePath";
|
34
34
|
EDIT_EXISTING_QUERY: "/edit/:queryId";
|
35
|
+
DATA_CUBE_EXISTING_QUERY: "/edit/:queryId/cube";
|
35
36
|
}>;
|
36
37
|
export declare enum LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN {
|
37
38
|
SHOW_ALL_GROUPS = "showAllGroups",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryNavigation.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendQueryNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,oBAAY,gCAAgC;IAC1C,GAAG,QAAQ;IACX,QAAQ,YAAY;IACpB,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;CAC7B;AAED,eAAO,MAAM,0BAA0B
|
1
|
+
{"version":3,"file":"LegendQueryNavigation.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendQueryNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,oBAAY,gCAAgC;IAC1C,GAAG,QAAQ;IACX,QAAQ,YAAY;IACpB,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;CAC7B;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;EAarC,CAAC;AAEH,oBAAY,oCAAoC;IAC9C,eAAe,kBAAkB;IACjC,qBAAqB,wBAAwB;IAC7C,GAAG,QAAQ;CACZ;AAED,oBAAY,8BAA8B;IACxC,qBAAqB,iBAAiB;CACvC;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,oCAAoC,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5E,CAAC,oCAAoC,CAAC,qBAAqB,CAAC,CAAC,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AAO,MAAM,gCAAgC,YAAa,MAAM,KAAG,MAG/D,CAAC;AAEL,MAAM,MAAM,6BAA6B,GAAG;IAC1C,CAAC,gCAAgC,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6DAA6D,yBAClD,MAAM,WACnB,MAAM,cACH,MAAM,aACP,MAAM,cACL,MAAM,GAAG,SAAS,KAC7B,MAK8C,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iEAAiE,yBAEpD,MAAM,aACjB,MAAM,aACN,MAAM,GAAG,SAAS,cACjB,MAAM,GAAG,SAAS,KAC7B,MAG6C,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,4EAA4E,yBAE/D,MAAM,WACnB,MAAM,cACH,MAAM,eACL,MAAM,KAClB,MAKE,CAAC;AAER;;GAEG;AACH,eAAO,MAAM,2EAA2E,yBAC/D,MAAM,aAAa,MAAM,KAAG,MAC6B,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,oEAAoE,yBACxD,MAAM,WAAW,MAAM,KAAG,MACoB,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,iEAAiE,2BAElD,MAAM,WACrB,MAAM,cACH,MAAM,aACP,MAAM,iBACF,MAAM,KACpB,MAKmB,CAAC"}
|
@@ -36,6 +36,7 @@ export const LEGEND_QUERY_ROUTE_PATTERN = Object.freeze({
|
|
36
36
|
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}`,
|
37
37
|
CREATE_FROM_SERVICE_QUERY: `/create-from-service/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV}/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH}`,
|
38
38
|
EDIT_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID}`,
|
39
|
+
DATA_CUBE_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID}/cube`,
|
39
40
|
});
|
40
41
|
export var LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN;
|
41
42
|
(function (LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryNavigation.js","sourceRoot":"","sources":["../../src/__lib__/LegendQueryNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,2BAA2B,EAC3B,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAN,IAAY,gCAMX;AAND,WAAY,gCAAgC;IAC1C,+CAAW,CAAA;IACX,wDAAoB,CAAA;IACpB,gEAA4B,CAAA;IAC5B,gEAA4B,CAAA;IAC5B,gEAA4B,CAAA;AAC9B,CAAC,EANW,gCAAgC,KAAhC,gCAAgC,QAM3C;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,QAAQ;IACf,yBAAyB,EAAE,uBAAuB;IAClD,0BAA0B,EAAE,eAAe;IAC3C,yBAAyB,EAAE,4BAA4B;IACvD,0BAA0B,EAAE,4BAA4B;IACxD,mCAAmC,EAAE,sCAAsC;IAC3E,gCAAgC,EAAE,mCAAmC;IACrE,yBAAyB,EAAE,mBAAmB,gCAAgC,CAAC,GAAG,KAAK,gCAAgC,CAAC,YAAY,KAAK,gCAAgC,CAAC,YAAY,EAAE;IACxL,yBAAyB,EAAE,yBAAyB,gCAAgC,CAAC,G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xD,GAAG,oBAAoB,mCAAmC,OAAO,EAAE,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,iEAAiE,GAC5E,CACE,sBAA8B,EAC9B,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,aAAqB,EACb,EAAE,CACV,GAAG,sBAAsB,cAAc,sBAAsB,CAC3D,OAAO,EACP,UAAU,EACV,SAAS,CACV,IAAI,aAAa,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryWebApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendQueryWebApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"LegendQueryWebApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendQueryWebApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2KH,eAAO,MAAM,yBAAyB,WAC5B;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE;;CAW5B,CAAC"}
|
@@ -27,6 +27,7 @@ import { flowResult } from 'mobx';
|
|
27
27
|
import { LEGACY_DATA_SPACE_QUERY_ROUTE_PATTERN } from '../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
|
28
28
|
import { DataSpaceTemplateQueryCreator } from './data-space/DataSpaceTemplateQueryCreator.js';
|
29
29
|
import { DataSpaceQueryCreator } from './data-space/DataSpaceQueryCreator.js';
|
30
|
+
import { ExistingQueryDataCubeViewer } from './data-cube/ExistingQueryDataCubeViewer.js';
|
30
31
|
const LegendQueryWebApplicationRouter = observer(() => {
|
31
32
|
const applicationStore = useLegendQueryApplicationStore();
|
32
33
|
const baseStore = useLegendQueryBaseStore();
|
@@ -50,7 +51,9 @@ const LegendQueryWebApplicationRouter = observer(() => {
|
|
50
51
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
51
52
|
CreateMappingQuerySetup }), _jsx(Route, { exact: true, path: LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY, component:
|
52
53
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
53
|
-
ExistingQueryEditor }), _jsx(Route, { exact: true, path: LEGEND_QUERY_ROUTE_PATTERN.
|
54
|
+
ExistingQueryEditor }), _jsx(Route, { exact: true, path: LEGEND_QUERY_ROUTE_PATTERN.DATA_CUBE_EXISTING_QUERY, component:
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
56
|
+
ExistingQueryDataCubeViewer }), _jsx(Route, { exact: true, path: LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_SERVICE_QUERY, component:
|
54
57
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
55
58
|
ServiceQueryCreator }), _jsx(Route, { exact: true, path: LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_MAPPING_QUERY, component:
|
56
59
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryWebApplication.js","sourceRoot":"","sources":["../../src/components/LegendQueryWebApplication.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,KAAK,EACL,MAAM,EACN,2BAA2B,GAE5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BA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,CAAC,MAAM,yBAAyB,GAAG,QAAQ,CAC/C,CAAC,KAA0B,EAAE,EAAE;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,KAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,YAC1C,KAAC,4BAA4B,cAC3B,KAAC,+BAA+B,KAAG,GACN,GACJ,CAC9B,CAAC;AACJ,CAAC,CACF,CAAC"}
|
@@ -0,0 +1,22 @@
|
|
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 const DataCubeWrapper: (() => import("react/jsx-runtime").JSX.Element | null) & {
|
17
|
+
displayName: string;
|
18
|
+
};
|
19
|
+
export declare const ExistingQueryDataCubeViewer: (() => import("react/jsx-runtime").JSX.Element) & {
|
20
|
+
displayName: string;
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=ExistingQueryDataCubeViewer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryDataCubeViewer.d.ts","sourceRoot":"","sources":["../../../src/components/data-cube/ExistingQueryDataCubeViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkBH,eAAO,MAAM,eAAe;;CAmB1B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;CAQtC,CAAC"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { useApplicationStore } from '@finos/legend-application';
|
18
|
+
import { observer } from 'mobx-react-lite';
|
19
|
+
import { LEGEND_QUERY_ROUTE_PATTERN_TOKEN, } from '../../__lib__/LegendQueryNavigation.js';
|
20
|
+
import { useParams } from '@finos/legend-application/browser';
|
21
|
+
import { ExistingQueryDataCubeEditorStoreProvider, useExistingQueryDataCubeEditorStore, } from './ExistingQueryEditorStoreProviderProvider.js';
|
22
|
+
import { useEffect } from 'react';
|
23
|
+
import { flowResult } from 'mobx';
|
24
|
+
import { DataCube, DataCubeProvider } from '@finos/legend-data-cube';
|
25
|
+
import { QueryBuilderDataCubeApplicationEngine } from '@finos/legend-query-builder';
|
26
|
+
export const DataCubeWrapper = observer(() => {
|
27
|
+
const applicationStore = useApplicationStore();
|
28
|
+
const store = useExistingQueryDataCubeEditorStore();
|
29
|
+
useEffect(() => {
|
30
|
+
flowResult(store.initialize()).catch(applicationStore.alertUnhandledError);
|
31
|
+
}, [applicationStore, store]);
|
32
|
+
if (!store.engine) {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
const _appEngine = new QueryBuilderDataCubeApplicationEngine(applicationStore);
|
36
|
+
return (_jsx(DataCubeProvider, { application: _appEngine, engine: store.engine, children: _jsx(DataCube, {}) }));
|
37
|
+
});
|
38
|
+
export const ExistingQueryDataCubeViewer = observer(() => {
|
39
|
+
const params = useParams();
|
40
|
+
const queryId = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID];
|
41
|
+
return (_jsx(ExistingQueryDataCubeEditorStoreProvider, { queryId: queryId, children: _jsx(DataCubeWrapper, {}) }));
|
42
|
+
});
|
43
|
+
//# sourceMappingURL=ExistingQueryDataCubeViewer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryDataCubeViewer.js","sourceRoot":"","sources":["../../../src/components/data-cube/ExistingQueryDataCubeViewer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,gCAAgC,GAEjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EACL,wCAAwC,EACxC,mCAAmC,GACpC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,qCAAqC,EAAE,MAAM,6BAA6B,CAAC;AAEpF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE;IAC3C,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,KAAK,GAAG,mCAAmC,EAAE,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IAE9B,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,qCAAqC,CAC1D,gBAAgB,CACjB,CAAC;IACF,OAAO,CACL,KAAC,gBAAgB,IAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,YAC7D,KAAC,QAAQ,KAAG,GACK,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAAC,GAAG,EAAE;IACvD,MAAM,MAAM,GAAG,SAAS,EAAiC,CAAC;IAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,gCAAgC,CAAC,QAAQ,CAAC,CAAC;IAClE,OAAO,CACL,KAAC,wCAAwC,IAAC,OAAO,EAAE,OAAO,YACxD,KAAC,eAAe,KAAG,GACsB,CAC5C,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
@@ -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
|
+
import { ExistingQueryDataCubeEditorStore } from '../../stores/data-cube/ExistingQueryDataCubeViewer.js';
|
17
|
+
export declare const ExistingQueryDataCubeEditorStoreContext: import("react").Context<ExistingQueryDataCubeEditorStore | undefined>;
|
18
|
+
export declare const ExistingQueryDataCubeEditorStoreProvider: React.FC<{
|
19
|
+
children: React.ReactNode;
|
20
|
+
queryId: string;
|
21
|
+
}>;
|
22
|
+
export declare const useExistingQueryDataCubeEditorStore: () => ExistingQueryDataCubeEditorStore;
|
23
|
+
//# sourceMappingURL=ExistingQueryEditorStoreProviderProvider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryEditorStoreProviderProvider.d.ts","sourceRoot":"","sources":["../../../src/components/data-cube/ExistingQueryEditorStoreProviderProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,gCAAgC,EAAE,MAAM,uDAAuD,CAAC;AAOzG,eAAO,MAAM,uCAAuC,uEAExC,CAAC;AAEb,eAAO,MAAM,wCAAwC,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAgBA,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAC1C,gCAID,CAAC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { createContext, useContext } from 'react';
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
19
|
+
import { ExistingQueryDataCubeEditorStore } from '../../stores/data-cube/ExistingQueryDataCubeViewer.js';
|
20
|
+
import { useLegendQueryApplicationStore, useLegendQueryBaseStore, } from '../LegendQueryFrameworkProvider.js';
|
21
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
22
|
+
export const ExistingQueryDataCubeEditorStoreContext = createContext(undefined);
|
23
|
+
export const ExistingQueryDataCubeEditorStoreProvider = ({ children, queryId }) => {
|
24
|
+
const applicationStore = useLegendQueryApplicationStore();
|
25
|
+
const baseStore = useLegendQueryBaseStore();
|
26
|
+
const store = useLocalObservable(() => new ExistingQueryDataCubeEditorStore(applicationStore, baseStore.depotServerClient, queryId));
|
27
|
+
return (_jsx(ExistingQueryDataCubeEditorStoreContext.Provider, { value: store, children: children }));
|
28
|
+
};
|
29
|
+
export const useExistingQueryDataCubeEditorStore = () => guaranteeNonNullable(useContext(ExistingQueryDataCubeEditorStoreContext), `Can't find query editor store in context`);
|
30
|
+
//# sourceMappingURL=ExistingQueryEditorStoreProviderProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryEditorStoreProviderProvider.js","sourceRoot":"","sources":["../../../src/components/data-cube/ExistingQueryEditorStoreProviderProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uDAAuD,CAAC;AACzG,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,CAAC,MAAM,uCAAuC,GAAG,aAAa,CAElE,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,wCAAwC,GAGhD,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7B,MAAM,gBAAgB,GAAG,8BAA8B,EAAE,CAAC;IAC1D,MAAM,SAAS,GAAG,uBAAuB,EAAE,CAAC;IAC5C,MAAM,KAAK,GAAG,kBAAkB,CAC9B,GAAG,EAAE,CACH,IAAI,gCAAgC,CAClC,gBAAgB,EAChB,SAAS,CAAC,iBAAiB,EAC3B,OAAO,CACR,CACJ,CAAC;IACF,OAAO,CACL,KAAC,uCAAuC,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAC3D,QAAQ,GACwC,CACpD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAC9C,GAAqC,EAAE,CACrC,oBAAoB,CAClB,UAAU,CAAC,uCAAuC,CAAC,EACnD,0CAA0C,CAC3C,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-query",
|
3
|
-
"version": "13.
|
3
|
+
"version": "13.6.0",
|
4
4
|
"description": "Legend Query application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -46,6 +46,7 @@
|
|
46
46
|
"@finos/legend-application": "workspace:*",
|
47
47
|
"@finos/legend-art": "workspace:*",
|
48
48
|
"@finos/legend-code-editor": "workspace:*",
|
49
|
+
"@finos/legend-data-cube": "workspace:*",
|
49
50
|
"@finos/legend-extension-dsl-data-space": "workspace:*",
|
50
51
|
"@finos/legend-graph": "workspace:*",
|
51
52
|
"@finos/legend-lego": "workspace:*",
|
@@ -0,0 +1,30 @@
|
|
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
|
+
import type { DepotServerClient } from '@finos/legend-server-depot';
|
17
|
+
import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js';
|
18
|
+
import { GraphManagerState } from '@finos/legend-graph';
|
19
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
20
|
+
import { QueryBuilderDataCubeEngine } from '@finos/legend-query-builder';
|
21
|
+
export declare class ExistingQueryDataCubeEditorStore {
|
22
|
+
readonly applicationStore: LegendQueryApplicationStore;
|
23
|
+
readonly depotServerClient: DepotServerClient;
|
24
|
+
readonly graphManagerState: GraphManagerState;
|
25
|
+
readonly queryId: string;
|
26
|
+
engine: QueryBuilderDataCubeEngine | undefined;
|
27
|
+
constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient, queryId: string);
|
28
|
+
initialize(): GeneratorFn<void>;
|
29
|
+
}
|
30
|
+
//# sourceMappingURL=ExistingQueryDataCubeViewer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryDataCubeViewer.d.ts","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,qBAAa,gCAAgC;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;gBAG7C,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,MAAM;IAWhB,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CAiDjC"}
|
@@ -0,0 +1,59 @@
|
|
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
|
+
import { GraphManagerState, } from '@finos/legend-graph';
|
17
|
+
import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
|
18
|
+
import { assertErrorThrown } from '@finos/legend-shared';
|
19
|
+
import { QueryBuilderDataCubeEngine } from '@finos/legend-query-builder';
|
20
|
+
export class ExistingQueryDataCubeEditorStore {
|
21
|
+
applicationStore;
|
22
|
+
depotServerClient;
|
23
|
+
graphManagerState;
|
24
|
+
queryId;
|
25
|
+
engine;
|
26
|
+
constructor(applicationStore, depotServerClient, queryId) {
|
27
|
+
this.applicationStore = applicationStore;
|
28
|
+
this.depotServerClient = depotServerClient;
|
29
|
+
this.graphManagerState = new GraphManagerState(applicationStore.pluginManager, applicationStore.logService);
|
30
|
+
this.queryId = queryId;
|
31
|
+
}
|
32
|
+
*initialize() {
|
33
|
+
try {
|
34
|
+
// initialize the graph manager
|
35
|
+
yield this.graphManagerState.graphManager.initialize({
|
36
|
+
env: this.applicationStore.config.env,
|
37
|
+
tabSize: DEFAULT_TAB_SIZE,
|
38
|
+
clientConfig: {
|
39
|
+
baseUrl: this.applicationStore.config.engineServerUrl,
|
40
|
+
queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
|
41
|
+
enableCompression: true,
|
42
|
+
},
|
43
|
+
}, {
|
44
|
+
tracerService: this.applicationStore.tracerService,
|
45
|
+
});
|
46
|
+
const queryInfo = (yield this.graphManagerState.graphManager.getQueryInfo(this.queryId));
|
47
|
+
const content = queryInfo.content;
|
48
|
+
const execConext = (yield this.graphManagerState.graphManager.resolveQueryInfoExecutionContext(queryInfo, () => this.depotServerClient.getVersionEntities(queryInfo.groupId, queryInfo.artifactId, queryInfo.versionId)));
|
49
|
+
const lambda = (yield this.graphManagerState.graphManager.pureCodeToLambda(content));
|
50
|
+
const engine = new QueryBuilderDataCubeEngine(lambda, execConext.mapping, execConext.runtime, this.graphManagerState);
|
51
|
+
this.engine = engine;
|
52
|
+
}
|
53
|
+
catch (error) {
|
54
|
+
assertErrorThrown(error);
|
55
|
+
this.applicationStore.notificationService.notifyError(`Unable to initialize cube with query ${this.queryId}: ${error.message}`);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=ExistingQueryDataCubeViewer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExistingQueryDataCubeViewer.js","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAA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MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gCAAgC,CACzE,SAAS,EACT,GAAG,EAAE,CACH,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CACvC,SAAS,CAAC,OAAO,EACjB,SAAS,CAAC,UAAU,EACpB,SAAS,CAAC,SAAS,CACpB,CACJ,CAAqD,CAAC;YACzD,MAAM,MAAM,GACV,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gBAAgB,CACzD,OAAO,CACR,CAAyB,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,0BAA0B,CAC3C,MAAM,EACN,UAAU,CAAC,OAAO,EAClB,UAAU,CAAC,OAAO,EAClB,IAAI,CAAC,iBAAiB,CACvB,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACnD,wCAAwC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CACzE,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-query",
|
3
|
-
"version": "13.
|
3
|
+
"version": "13.6.0",
|
4
4
|
"description": "Legend Query application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -43,13 +43,14 @@
|
|
43
43
|
"test:watch": "jest --watch"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@finos/legend-application": "16.0.
|
47
|
-
"@finos/legend-art": "7.1.
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
49
|
-
"@finos/legend-
|
50
|
-
"@finos/legend-
|
51
|
-
"@finos/legend-
|
52
|
-
"@finos/legend-
|
46
|
+
"@finos/legend-application": "16.0.1",
|
47
|
+
"@finos/legend-art": "7.1.60",
|
48
|
+
"@finos/legend-code-editor": "2.0.2",
|
49
|
+
"@finos/legend-data-cube": "0.0.6",
|
50
|
+
"@finos/legend-extension-dsl-data-space": "10.3.78",
|
51
|
+
"@finos/legend-graph": "31.10.36",
|
52
|
+
"@finos/legend-lego": "2.0.3",
|
53
|
+
"@finos/legend-query-builder": "4.15.0",
|
53
54
|
"@finos/legend-server-depot": "6.0.61",
|
54
55
|
"@finos/legend-shared": "10.0.56",
|
55
56
|
"@finos/legend-storage": "3.0.106",
|
@@ -44,6 +44,7 @@ export const LEGEND_QUERY_ROUTE_PATTERN = Object.freeze({
|
|
44
44
|
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}`,
|
45
45
|
CREATE_FROM_SERVICE_QUERY: `/create-from-service/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.GAV}/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.SERVICE_PATH}`,
|
46
46
|
EDIT_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID}`,
|
47
|
+
DATA_CUBE_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID}/cube`,
|
47
48
|
});
|
48
49
|
|
49
50
|
export enum LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN {
|
@@ -41,6 +41,7 @@ import { flowResult } from 'mobx';
|
|
41
41
|
import { LEGACY_DATA_SPACE_QUERY_ROUTE_PATTERN } from '../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
|
42
42
|
import { DataSpaceTemplateQueryCreator } from './data-space/DataSpaceTemplateQueryCreator.js';
|
43
43
|
import { DataSpaceQueryCreator } from './data-space/DataSpaceQueryCreator.js';
|
44
|
+
import { ExistingQueryDataCubeViewer } from './data-cube/ExistingQueryDataCubeViewer.js';
|
44
45
|
|
45
46
|
const LegendQueryWebApplicationRouter = observer(() => {
|
46
47
|
const applicationStore = useLegendQueryApplicationStore();
|
@@ -114,6 +115,14 @@ const LegendQueryWebApplicationRouter = observer(() => {
|
|
114
115
|
ExistingQueryEditor as TEMPORARY__ReactRouterComponentType
|
115
116
|
}
|
116
117
|
/>
|
118
|
+
<Route
|
119
|
+
exact={true}
|
120
|
+
path={LEGEND_QUERY_ROUTE_PATTERN.DATA_CUBE_EXISTING_QUERY}
|
121
|
+
component={
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
123
|
+
ExistingQueryDataCubeViewer as TEMPORARY__ReactRouterComponentType
|
124
|
+
}
|
125
|
+
/>
|
117
126
|
<Route
|
118
127
|
exact={true}
|
119
128
|
path={LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_SERVICE_QUERY}
|
@@ -0,0 +1,62 @@
|
|
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
|
+
import { useApplicationStore } from '@finos/legend-application';
|
18
|
+
import { observer } from 'mobx-react-lite';
|
19
|
+
import {
|
20
|
+
LEGEND_QUERY_ROUTE_PATTERN_TOKEN,
|
21
|
+
type ExistingQueryEditorPathParams,
|
22
|
+
} from '../../__lib__/LegendQueryNavigation.js';
|
23
|
+
import { useParams } from '@finos/legend-application/browser';
|
24
|
+
import {
|
25
|
+
ExistingQueryDataCubeEditorStoreProvider,
|
26
|
+
useExistingQueryDataCubeEditorStore,
|
27
|
+
} from './ExistingQueryEditorStoreProviderProvider.js';
|
28
|
+
import { useEffect } from 'react';
|
29
|
+
import { flowResult } from 'mobx';
|
30
|
+
import { DataCube, DataCubeProvider } from '@finos/legend-data-cube';
|
31
|
+
import { QueryBuilderDataCubeApplicationEngine } from '@finos/legend-query-builder';
|
32
|
+
|
33
|
+
export const DataCubeWrapper = observer(() => {
|
34
|
+
const applicationStore = useApplicationStore();
|
35
|
+
const store = useExistingQueryDataCubeEditorStore();
|
36
|
+
|
37
|
+
useEffect(() => {
|
38
|
+
flowResult(store.initialize()).catch(applicationStore.alertUnhandledError);
|
39
|
+
}, [applicationStore, store]);
|
40
|
+
|
41
|
+
if (!store.engine) {
|
42
|
+
return null;
|
43
|
+
}
|
44
|
+
const _appEngine = new QueryBuilderDataCubeApplicationEngine(
|
45
|
+
applicationStore,
|
46
|
+
);
|
47
|
+
return (
|
48
|
+
<DataCubeProvider application={_appEngine} engine={store.engine}>
|
49
|
+
<DataCube />
|
50
|
+
</DataCubeProvider>
|
51
|
+
);
|
52
|
+
});
|
53
|
+
|
54
|
+
export const ExistingQueryDataCubeViewer = observer(() => {
|
55
|
+
const params = useParams<ExistingQueryEditorPathParams>();
|
56
|
+
const queryId = params[LEGEND_QUERY_ROUTE_PATTERN_TOKEN.QUERY_ID];
|
57
|
+
return (
|
58
|
+
<ExistingQueryDataCubeEditorStoreProvider queryId={queryId}>
|
59
|
+
<DataCubeWrapper />
|
60
|
+
</ExistingQueryDataCubeEditorStoreProvider>
|
61
|
+
);
|
62
|
+
});
|
@@ -0,0 +1,56 @@
|
|
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
|
+
import { createContext, useContext } from 'react';
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
19
|
+
import { ExistingQueryDataCubeEditorStore } from '../../stores/data-cube/ExistingQueryDataCubeViewer.js';
|
20
|
+
import {
|
21
|
+
useLegendQueryApplicationStore,
|
22
|
+
useLegendQueryBaseStore,
|
23
|
+
} from '../LegendQueryFrameworkProvider.js';
|
24
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
25
|
+
|
26
|
+
export const ExistingQueryDataCubeEditorStoreContext = createContext<
|
27
|
+
ExistingQueryDataCubeEditorStore | undefined
|
28
|
+
>(undefined);
|
29
|
+
|
30
|
+
export const ExistingQueryDataCubeEditorStoreProvider: React.FC<{
|
31
|
+
children: React.ReactNode;
|
32
|
+
queryId: string;
|
33
|
+
}> = ({ children, queryId }) => {
|
34
|
+
const applicationStore = useLegendQueryApplicationStore();
|
35
|
+
const baseStore = useLegendQueryBaseStore();
|
36
|
+
const store = useLocalObservable(
|
37
|
+
() =>
|
38
|
+
new ExistingQueryDataCubeEditorStore(
|
39
|
+
applicationStore,
|
40
|
+
baseStore.depotServerClient,
|
41
|
+
queryId,
|
42
|
+
),
|
43
|
+
);
|
44
|
+
return (
|
45
|
+
<ExistingQueryDataCubeEditorStoreContext.Provider value={store}>
|
46
|
+
{children}
|
47
|
+
</ExistingQueryDataCubeEditorStoreContext.Provider>
|
48
|
+
);
|
49
|
+
};
|
50
|
+
|
51
|
+
export const useExistingQueryDataCubeEditorStore =
|
52
|
+
(): ExistingQueryDataCubeEditorStore =>
|
53
|
+
guaranteeNonNullable(
|
54
|
+
useContext(ExistingQueryDataCubeEditorStoreContext),
|
55
|
+
`Can't find query editor store in context`,
|
56
|
+
);
|
@@ -0,0 +1,98 @@
|
|
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
|
+
import type { DepotServerClient } from '@finos/legend-server-depot';
|
18
|
+
import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js';
|
19
|
+
import {
|
20
|
+
GraphManagerState,
|
21
|
+
type RawLambda,
|
22
|
+
type QueryInfo,
|
23
|
+
} from '@finos/legend-graph';
|
24
|
+
import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
|
25
|
+
import { assertErrorThrown, type GeneratorFn } from '@finos/legend-shared';
|
26
|
+
import { QueryBuilderDataCubeEngine } from '@finos/legend-query-builder';
|
27
|
+
|
28
|
+
export class ExistingQueryDataCubeEditorStore {
|
29
|
+
readonly applicationStore: LegendQueryApplicationStore;
|
30
|
+
readonly depotServerClient: DepotServerClient;
|
31
|
+
readonly graphManagerState: GraphManagerState;
|
32
|
+
readonly queryId: string;
|
33
|
+
engine: QueryBuilderDataCubeEngine | undefined;
|
34
|
+
|
35
|
+
constructor(
|
36
|
+
applicationStore: LegendQueryApplicationStore,
|
37
|
+
depotServerClient: DepotServerClient,
|
38
|
+
queryId: string,
|
39
|
+
) {
|
40
|
+
this.applicationStore = applicationStore;
|
41
|
+
this.depotServerClient = depotServerClient;
|
42
|
+
this.graphManagerState = new GraphManagerState(
|
43
|
+
applicationStore.pluginManager,
|
44
|
+
applicationStore.logService,
|
45
|
+
);
|
46
|
+
this.queryId = queryId;
|
47
|
+
}
|
48
|
+
|
49
|
+
*initialize(): GeneratorFn<void> {
|
50
|
+
try {
|
51
|
+
// initialize the graph manager
|
52
|
+
yield this.graphManagerState.graphManager.initialize(
|
53
|
+
{
|
54
|
+
env: this.applicationStore.config.env,
|
55
|
+
tabSize: DEFAULT_TAB_SIZE,
|
56
|
+
clientConfig: {
|
57
|
+
baseUrl: this.applicationStore.config.engineServerUrl,
|
58
|
+
queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
|
59
|
+
enableCompression: true,
|
60
|
+
},
|
61
|
+
},
|
62
|
+
{
|
63
|
+
tracerService: this.applicationStore.tracerService,
|
64
|
+
},
|
65
|
+
);
|
66
|
+
const queryInfo = (yield this.graphManagerState.graphManager.getQueryInfo(
|
67
|
+
this.queryId,
|
68
|
+
)) as unknown as QueryInfo;
|
69
|
+
const content = queryInfo.content;
|
70
|
+
const execConext =
|
71
|
+
(yield this.graphManagerState.graphManager.resolveQueryInfoExecutionContext(
|
72
|
+
queryInfo,
|
73
|
+
() =>
|
74
|
+
this.depotServerClient.getVersionEntities(
|
75
|
+
queryInfo.groupId,
|
76
|
+
queryInfo.artifactId,
|
77
|
+
queryInfo.versionId,
|
78
|
+
),
|
79
|
+
)) as { mapping: string | undefined; runtime: string };
|
80
|
+
const lambda =
|
81
|
+
(yield this.graphManagerState.graphManager.pureCodeToLambda(
|
82
|
+
content,
|
83
|
+
)) as unknown as RawLambda;
|
84
|
+
const engine = new QueryBuilderDataCubeEngine(
|
85
|
+
lambda,
|
86
|
+
execConext.mapping,
|
87
|
+
execConext.runtime,
|
88
|
+
this.graphManagerState,
|
89
|
+
);
|
90
|
+
this.engine = engine;
|
91
|
+
} catch (error) {
|
92
|
+
assertErrorThrown(error);
|
93
|
+
this.applicationStore.notificationService.notifyError(
|
94
|
+
`Unable to initialize cube with query ${this.queryId}: ${error.message}`,
|
95
|
+
);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
package/tsconfig.json
CHANGED
@@ -73,6 +73,7 @@
|
|
73
73
|
"./src/stores/QuerySetupStore.ts",
|
74
74
|
"./src/stores/UpdateExistingServiceQuerySetupStore.ts",
|
75
75
|
"./src/stores/__test-utils__/LegendQueryApplicationTestUtils.ts",
|
76
|
+
"./src/stores/data-cube/ExistingQueryDataCubeViewer.ts",
|
76
77
|
"./src/stores/data-space/DataSpaceQueryBuilderHelper.ts",
|
77
78
|
"./src/stores/data-space/DataSpaceQueryCreatorStore.ts",
|
78
79
|
"./src/stores/data-space/DataSpaceQuerySetupState.ts",
|
@@ -93,6 +94,8 @@
|
|
93
94
|
"./src/components/QuerySetup.tsx",
|
94
95
|
"./src/components/UpdateExistingServiceQuerySetup.tsx",
|
95
96
|
"./src/components/__test-utils__/QueryEditorComponentTestUtils.tsx",
|
97
|
+
"./src/components/data-cube/ExistingQueryDataCubeViewer.tsx",
|
98
|
+
"./src/components/data-cube/ExistingQueryEditorStoreProviderProvider.tsx",
|
96
99
|
"./src/components/data-space/DataSpaceInfo.tsx",
|
97
100
|
"./src/components/data-space/DataSpaceQueryCreator.tsx",
|
98
101
|
"./src/components/data-space/DataSpaceQuerySetup.tsx",
|