@finos/legend-application-query 13.4.1 → 13.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/lib/__lib__/DSL_DataSpace_LegendQueryDocumentation.d.ts +19 -0
  2. package/lib/__lib__/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +1 -0
  3. package/lib/__lib__/DSL_DataSpace_LegendQueryDocumentation.js +20 -0
  4. package/lib/__lib__/DSL_DataSpace_LegendQueryDocumentation.js.map +1 -0
  5. package/lib/__lib__/DSL_DataSpace_LegendQueryNavigation.d.ts +53 -0
  6. package/lib/__lib__/DSL_DataSpace_LegendQueryNavigation.d.ts.map +1 -0
  7. package/lib/__lib__/DSL_DataSpace_LegendQueryNavigation.js +59 -0
  8. package/lib/__lib__/DSL_DataSpace_LegendQueryNavigation.js.map +1 -0
  9. package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -1
  10. package/lib/components/Core_LegendQueryApplicationPlugin.js +14 -1
  11. package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
  12. package/lib/components/LegendQueryWebApplication.d.ts.map +1 -1
  13. package/lib/components/LegendQueryWebApplication.js +18 -10
  14. package/lib/components/LegendQueryWebApplication.js.map +1 -1
  15. package/lib/components/QueryEditor.d.ts.map +1 -1
  16. package/lib/components/QueryEditor.js +47 -18
  17. package/lib/components/QueryEditor.js.map +1 -1
  18. package/lib/components/data-space/DataSpaceQueryCreator.d.ts +19 -0
  19. package/lib/components/data-space/DataSpaceQueryCreator.d.ts.map +1 -0
  20. package/lib/components/data-space/DataSpaceQueryCreator.js +43 -0
  21. package/lib/components/data-space/DataSpaceQueryCreator.js.map +1 -0
  22. package/lib/components/data-space/DataSpaceQuerySetup.d.ts +21 -0
  23. package/lib/components/data-space/DataSpaceQuerySetup.d.ts.map +1 -0
  24. package/lib/components/data-space/DataSpaceQuerySetup.js +64 -0
  25. package/lib/components/data-space/DataSpaceQuerySetup.js.map +1 -0
  26. package/lib/components/data-space/DataSpaceTemplateQueryCreator.d.ts +19 -0
  27. package/lib/components/data-space/DataSpaceTemplateQueryCreator.d.ts.map +1 -0
  28. package/lib/components/data-space/DataSpaceTemplateQueryCreator.js +39 -0
  29. package/lib/components/data-space/DataSpaceTemplateQueryCreator.js.map +1 -0
  30. package/lib/components/data-space/QueryDataSpaceUtil.d.ts +19 -0
  31. package/lib/components/data-space/QueryDataSpaceUtil.d.ts.map +1 -0
  32. package/lib/components/data-space/QueryDataSpaceUtil.js +25 -0
  33. package/lib/components/data-space/QueryDataSpaceUtil.js.map +1 -0
  34. package/lib/index.css +1 -1
  35. package/lib/package.json +2 -1
  36. package/lib/stores/LegendQueryApplicationPlugin.d.ts +0 -16
  37. package/lib/stores/LegendQueryApplicationPlugin.d.ts.map +1 -1
  38. package/lib/stores/LegendQueryApplicationPlugin.js.map +1 -1
  39. package/lib/stores/QueryEditorStore.d.ts +2 -0
  40. package/lib/stores/QueryEditorStore.d.ts.map +1 -1
  41. package/lib/stores/QueryEditorStore.js +96 -11
  42. package/lib/stores/QueryEditorStore.js.map +1 -1
  43. package/lib/stores/data-space/DataSpaceQueryCreatorStore.d.ts +37 -0
  44. package/lib/stores/data-space/DataSpaceQueryCreatorStore.d.ts.map +1 -0
  45. package/lib/stores/data-space/DataSpaceQueryCreatorStore.js +132 -0
  46. package/lib/stores/data-space/DataSpaceQueryCreatorStore.js.map +1 -0
  47. package/lib/stores/data-space/DataSpaceQuerySetupState.d.ts +51 -0
  48. package/lib/stores/data-space/DataSpaceQuerySetupState.d.ts.map +1 -0
  49. package/lib/stores/data-space/DataSpaceQuerySetupState.js +107 -0
  50. package/lib/stores/data-space/DataSpaceQuerySetupState.js.map +1 -0
  51. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.d.ts +36 -0
  52. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.d.ts.map +1 -0
  53. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.js +104 -0
  54. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.js.map +1 -0
  55. package/package.json +2 -1
  56. package/src/__lib__/DSL_DataSpace_LegendQueryDocumentation.ts +19 -0
  57. package/src/__lib__/DSL_DataSpace_LegendQueryNavigation.ts +123 -0
  58. package/src/components/Core_LegendQueryApplicationPlugin.tsx +18 -0
  59. package/src/components/LegendQueryWebApplication.tsx +48 -12
  60. package/src/components/QueryEditor.tsx +112 -24
  61. package/src/components/data-space/DataSpaceQueryCreator.tsx +99 -0
  62. package/src/components/data-space/DataSpaceQuerySetup.tsx +165 -0
  63. package/src/components/data-space/DataSpaceTemplateQueryCreator.tsx +82 -0
  64. package/src/components/data-space/QueryDataSpaceUtil.ts +34 -0
  65. package/src/stores/LegendQueryApplicationPlugin.ts +0 -22
  66. package/src/stores/QueryEditorStore.ts +187 -12
  67. package/src/stores/data-space/DataSpaceQueryCreatorStore.ts +286 -0
  68. package/src/stores/data-space/DataSpaceQuerySetupState.ts +208 -0
  69. package/src/stores/data-space/DataSpaceTemplateQueryCreatorStore.ts +204 -0
  70. package/tsconfig.json +10 -1
@@ -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 { observer, useLocalObservable } from 'mobx-react-lite';
18
+ import { useApplicationStore } from '@finos/legend-application';
19
+ import { useParams } from '@finos/legend-application/browser';
20
+ import { parseGAVCoordinates } from '@finos/legend-storage';
21
+ import { useLegendQueryApplicationStore, useLegendQueryBaseStore, } from '../LegendQueryFrameworkProvider.js';
22
+ import { DataSpaceQueryCreatorStore } from '../../stores/data-space/DataSpaceQueryCreatorStore.js';
23
+ import { QueryEditorStoreContext } from '../QueryEditorStoreProvider.js';
24
+ import { DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN, DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN, } from '../../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
25
+ import { QueryEditor } from '../QueryEditor.js';
26
+ const DataSpaceQueryCreatorStoreProvider = ({ children, gav, dataSpacePath, executionContext, runtimePath, classPath, }) => {
27
+ const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
28
+ const applicationStore = useLegendQueryApplicationStore();
29
+ const baseStore = useLegendQueryBaseStore();
30
+ const store = useLocalObservable(() => new DataSpaceQueryCreatorStore(applicationStore, baseStore.depotServerClient, groupId, artifactId, versionId, dataSpacePath, executionContext, runtimePath, classPath));
31
+ return (_jsx(QueryEditorStoreContext.Provider, { value: store, children: children }));
32
+ };
33
+ export const DataSpaceQueryCreator = observer(() => {
34
+ const applicationStore = useApplicationStore();
35
+ const parameters = useParams();
36
+ const gav = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV];
37
+ const dataSpacePath = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
38
+ const executionContext = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.EXECUTION_CONTEXT];
39
+ const runtimePath = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.RUNTIME_PATH];
40
+ const classPath = applicationStore.navigationService.navigator.getCurrentLocationParameterValue(DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN.CLASS_PATH);
41
+ return (_jsx(DataSpaceQueryCreatorStoreProvider, { gav: gav, dataSpacePath: dataSpacePath, executionContext: executionContext, runtimePath: runtimePath, classPath: classPath, children: _jsx(QueryEditor, {}) }));
42
+ });
43
+ //# sourceMappingURL=DataSpaceQueryCreator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceQueryCreator.js","sourceRoot":"","sources":["../../../src/components/data-space/DataSpaceQueryCreator.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACL,0CAA0C,EAC1C,4CAA4C,GAE7C,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,kCAAkC,GAOnC,CAAC,EACJ,QAAQ,EACR,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,SAAS,GACV,EAAE,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACpE,MAAM,gBAAgB,GAAG,8BAA8B,EAAE,CAAC;IAC1D,MAAM,SAAS,GAAG,uBAAuB,EAAE,CAAC;IAC5C,MAAM,KAAK,GAAG,kBAAkB,CAC9B,GAAG,EAAE,CACH,IAAI,0BAA0B,CAC5B,gBAAgB,EAChB,SAAS,CAAC,iBAAiB,EAC3B,OAAO,EACP,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,SAAS,CACV,CACJ,CAAC;IACF,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAC3C,QAAQ,GACwB,CACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,GAAG,EAAE;IACjD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,UAAU,GAAG,SAAS,EAAmC,CAAC;IAChE,MAAM,GAAG,GAAG,UAAU,CAAC,4CAA4C,CAAC,GAAG,CAAC,CAAC;IACzE,MAAM,aAAa,GACjB,UAAU,CAAC,4CAA4C,CAAC,eAAe,CAAC,CAAC;IAC3E,MAAM,gBAAgB,GACpB,UAAU,CAAC,4CAA4C,CAAC,iBAAiB,CAAC,CAAC;IAC7E,MAAM,WAAW,GACf,UAAU,CAAC,4CAA4C,CAAC,YAAY,CAAC,CAAC;IACxE,MAAM,SAAS,GACb,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,gCAAgC,CAC3E,0CAA0C,CAAC,UAAU,CACtD,CAAC;IAEJ,OAAO,CACL,KAAC,kCAAkC,IACjC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,YAEpB,KAAC,WAAW,KAAG,GACoB,CACtC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,21 @@
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 DataSpaceQuerySetupState } from '../../stores/data-space/DataSpaceQuerySetupState.js';
17
+ export declare const DataSpaceQuerySetup: (() => import("react/jsx-runtime").JSX.Element) & {
18
+ displayName: string;
19
+ };
20
+ export declare const renderDataSpaceQuerySetupSetupPanelContent: (queryBuilderState: DataSpaceQuerySetupState) => React.ReactNode;
21
+ //# sourceMappingURL=DataSpaceQuerySetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceQuerySetup.d.ts","sourceRoot":"","sources":["../../../src/components/data-space/DataSpaceQuerySetup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,qDAAqD,CAAC;AA6B7D,eAAO,MAAM,mBAAmB;;CAI9B,CAAC;AA6FH,eAAO,MAAM,0CAA0C,sBAClC,wBAAwB,KAC1C,MAAM,SAER,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { observer, useLocalObservable } from 'mobx-react-lite';
18
+ import { useApplicationStore } from '@finos/legend-application';
19
+ import { useEffect, useRef } from 'react';
20
+ import { flowResult } from 'mobx';
21
+ import { QueryBuilderClassSelector } from '@finos/legend-query-builder';
22
+ import { CustomSelectorInput, SearchIcon, } from '@finos/legend-art';
23
+ import { DataSpaceIcon } from '@finos/legend-extension-dsl-data-space/application';
24
+ import { useLegendQueryApplicationStore, useLegendQueryBaseStore, } from '../LegendQueryFrameworkProvider.js';
25
+ import { DataSpaceQuerySetupStore, } from '../../stores/data-space/DataSpaceQuerySetupState.js';
26
+ import { QueryEditorStoreContext } from '../QueryEditorStoreProvider.js';
27
+ import { QueryEditor } from '../QueryEditor.js';
28
+ import { DataSpaceAdvancedSearchModal, buildDataSpaceOption, formatDataSpaceOptionLabel, } from '@finos/legend-extension-dsl-data-space/application-query';
29
+ const DataSpaceQuerySetupStoreProvider = ({ children }) => {
30
+ const applicationStore = useLegendQueryApplicationStore();
31
+ const baseStore = useLegendQueryBaseStore();
32
+ const store = useLocalObservable(() => new DataSpaceQuerySetupStore(applicationStore, baseStore.depotServerClient));
33
+ return (_jsx(QueryEditorStoreContext.Provider, { value: store, children: children }));
34
+ };
35
+ export const DataSpaceQuerySetup = observer(() => (_jsx(DataSpaceQuerySetupStoreProvider, { children: _jsx(QueryEditor, {}) })));
36
+ /**
37
+ * This setup panel supports cascading in order: Data-space -> Execution context (-> Runtime) -> Class
38
+ *
39
+ * In other words, we will only show:
40
+ * - For runtime selector: the list of compatible runtimes with the selected execution context mapping
41
+ * - For class selector: the list of compatible class with the selected execution context mapping
42
+ *
43
+ * See details on propagation/cascading in {@link DataSpaceQuerySetupState}
44
+ */
45
+ const DataSpaceQuerySetupSetupPanelContent = observer((props) => {
46
+ const { queryBuilderState } = props;
47
+ const applicationStore = useApplicationStore();
48
+ const dataSpaceSearchRef = useRef(null);
49
+ // data space
50
+ const dataSpaceOptions = queryBuilderState.dataSpaces.map(buildDataSpaceOption);
51
+ const selectedDataSpaceOption = null;
52
+ const onDataSpaceOptionChange = (option) => {
53
+ queryBuilderState.onDataSpaceChange(option.value);
54
+ };
55
+ const openDataSpaceAdvancedSearch = () => queryBuilderState.showAdvancedSearchPanel();
56
+ useEffect(() => {
57
+ flowResult(queryBuilderState.loadDataSpaces()).catch(applicationStore.alertUnhandledError);
58
+ }, [queryBuilderState, applicationStore]);
59
+ useEffect(() => dataSpaceSearchRef.current?.focus());
60
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "query-builder__setup__config-group", children: [_jsx("div", { className: "query-builder__setup__config-group__header", children: _jsx("div", { className: "query-builder__setup__config-group__header__title", children: "data space execution context" }) }), _jsx("div", { className: "query-builder__setup__config-group__content", children: _jsxs("div", { className: "query-builder__setup__config-group__item", children: [_jsx("div", { className: "btn--sm query-builder__setup__config-group__item__label", title: "data space", children: _jsx(DataSpaceIcon, {}) }), _jsx(CustomSelectorInput, { ref: dataSpaceSearchRef, className: "panel__content__form__section__dropdown query-builder__setup__config-group__item__selector", options: dataSpaceOptions, isLoading: queryBuilderState.loadDataSpacesState.isInProgress, onChange: onDataSpaceOptionChange, value: selectedDataSpaceOption, placeholder: "Search for data space...", escapeClearsValue: true, darkMode: !applicationStore.layoutService
61
+ .TEMPORARY__isLightColorThemeEnabled, formatOptionLabel: formatDataSpaceOptionLabel }), _jsx("button", { tabIndex: -1, className: "query-builder__setup__data-space-searcher__btn btn--dark", onClick: openDataSpaceAdvancedSearch, title: "Open advanced search for data space...", children: _jsx(SearchIcon, {}) }), queryBuilderState.advancedSearchState && (_jsx(DataSpaceAdvancedSearchModal, { searchState: queryBuilderState.advancedSearchState, onClose: () => queryBuilderState.hideAdvancedSearchPanel() }))] }) })] }), _jsx(QueryBuilderClassSelector, { queryBuilderState: queryBuilderState, classes: [], noMatchMessage: "No compatible class found" })] }));
62
+ });
63
+ export const renderDataSpaceQuerySetupSetupPanelContent = (queryBuilderState) => (_jsx(DataSpaceQuerySetupSetupPanelContent, { queryBuilderState: queryBuilderState }));
64
+ //# sourceMappingURL=DataSpaceQuerySetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceQuerySetup.js","sourceRoot":"","sources":["../../../src/components/data-space/DataSpaceQuerySetup.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBA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E,gBAAgB,EACzB,SAAS,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,YAAY,EAC7D,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,uBAAuB,EAC9B,WAAW,EAAC,0BAA0B,EACtC,iBAAiB,EAAE,IAAI,EACvB,QAAQ,EACN,CAAC,gBAAgB,CAAC,aAAa;yCAC5B,mCAAmC,EAExC,iBAAiB,EAAE,0BAA0B,GAC7C,EACF,iBACE,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,0DAA0D,EACpE,OAAO,EAAE,2BAA2B,EACpC,KAAK,EAAC,wCAAwC,YAE9C,KAAC,UAAU,KAAG,GACP,EACR,iBAAiB,CAAC,mBAAmB,IAAI,CACxC,KAAC,4BAA4B,IAC3B,WAAW,EAAE,iBAAiB,CAAC,mBAAmB,EAClD,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,uBAAuB,EAAE,GAC1D,CACH,IACG,GACF,IACF,EACN,KAAC,yBAAyB,IACxB,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,EAAE,EACX,cAAc,EAAC,2BAA2B,GAC1C,IACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,CACxD,iBAA2C,EAC1B,EAAE,CAAC,CACpB,KAAC,oCAAoC,IAAC,iBAAiB,EAAE,iBAAiB,GAAI,CAC/E,CAAC"}
@@ -0,0 +1,19 @@
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 DataSpaceTemplateQueryCreator: (() => import("react/jsx-runtime").JSX.Element) & {
17
+ displayName: string;
18
+ };
19
+ //# sourceMappingURL=DataSpaceTemplateQueryCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceTemplateQueryCreator.d.ts","sourceRoot":"","sources":["../../../src/components/data-space/DataSpaceTemplateQueryCreator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA6CH,eAAO,MAAM,6BAA6B;;CAsBxC,CAAC"}
@@ -0,0 +1,39 @@
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 { observer, useLocalObservable } from 'mobx-react-lite';
18
+ import { useParams } from '@finos/legend-application/browser';
19
+ import { parseGAVCoordinates } from '@finos/legend-storage';
20
+ import { useLegendQueryApplicationStore, useLegendQueryBaseStore, } from '../LegendQueryFrameworkProvider.js';
21
+ import { DataSpaceTemplateQueryCreatorStore } from '../../stores/data-space/DataSpaceTemplateQueryCreatorStore.js';
22
+ import { QueryEditorStoreContext } from '../QueryEditorStoreProvider.js';
23
+ import { DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN, } from '../../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
24
+ import { QueryEditor } from '../QueryEditor.js';
25
+ const DataSpaceTemplateQueryCreatorStoreProvider = ({ children, gav, dataSpacePath, templateQueryId }) => {
26
+ const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
27
+ const applicationStore = useLegendQueryApplicationStore();
28
+ const baseStore = useLegendQueryBaseStore();
29
+ const store = useLocalObservable(() => new DataSpaceTemplateQueryCreatorStore(applicationStore, baseStore.depotServerClient, groupId, artifactId, versionId, dataSpacePath, templateQueryId));
30
+ return (_jsx(QueryEditorStoreContext.Provider, { value: store, children: children }));
31
+ };
32
+ export const DataSpaceTemplateQueryCreator = observer(() => {
33
+ const parameters = useParams();
34
+ const gav = parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV];
35
+ const dataSpacePath = parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
36
+ const templateQueryId = parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID];
37
+ return (_jsx(DataSpaceTemplateQueryCreatorStoreProvider, { gav: gav, dataSpacePath: dataSpacePath, templateQueryId: templateQueryId, children: _jsx(QueryEditor, {}) }));
38
+ });
39
+ //# sourceMappingURL=DataSpaceTemplateQueryCreator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceTemplateQueryCreator.js","sourceRoot":"","sources":["../../../src/components/data-space/DataSpaceTemplateQueryCreator.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,+DAA+D,CAAC;AACnH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CA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 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 Query } from '@finos/legend-graph';
17
+ export declare const getDataSpaceQueryInfo: (query: Query) => string | undefined;
18
+ export declare const isDataSpaceQuery: (query: Query) => boolean;
19
+ //# sourceMappingURL=QueryDataSpaceUtil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryDataSpaceUtil.d.ts","sourceRoot":"","sources":["../../../src/components/data-space/QueryDataSpaceUtil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAElE,eAAO,MAAM,qBAAqB,UAAW,KAAK,KAAG,MAAM,GAAG,SAQ7D,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,KAAK,KAAG,OACT,CAAC"}
@@ -0,0 +1,25 @@
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 { QUERY_PROFILE_PATH, QUERY_PROFILE_TAG_DATA_SPACE, } from '@finos/legend-extension-dsl-data-space/graph';
17
+ import { isValidFullPath } from '@finos/legend-graph';
18
+ export const getDataSpaceQueryInfo = (query) => {
19
+ const dataSpaceTaggedValue = query.taggedValues?.find((taggedValue) => taggedValue.profile === QUERY_PROFILE_PATH &&
20
+ taggedValue.tag === QUERY_PROFILE_TAG_DATA_SPACE &&
21
+ isValidFullPath(taggedValue.value));
22
+ return dataSpaceTaggedValue?.value;
23
+ };
24
+ export const isDataSpaceQuery = (query) => Boolean(getDataSpaceQueryInfo(query));
25
+ //# sourceMappingURL=QueryDataSpaceUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryDataSpaceUtil.js","sourceRoot":"","sources":["../../../src/components/data-space/QueryDataSpaceUtil.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,eAAe,EAAc,MAAM,qBAAqB,CAAC;AAElE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAsB,EAAE;IACxE,MAAM,oBAAoB,GAAG,KAAK,CAAC,YAAY,EAAE,IAAI,CACnD,CAAC,WAAW,EAAE,EAAE,CACd,WAAW,CAAC,OAAO,KAAK,kBAAkB;QAC1C,WAAW,CAAC,GAAG,KAAK,4BAA4B;QAChD,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CACrC,CAAC;IACF,OAAO,oBAAoB,EAAE,KAAK,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAW,EAAE,CACxD,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-application-query v13.4.1
1
+ /** @license @finos/legend-application-query v13.4.2
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-query",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "description": "Legend Query application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,6 +45,7 @@
45
45
  "dependencies": {
46
46
  "@finos/legend-application": "workspace:*",
47
47
  "@finos/legend-art": "workspace:*",
48
+ "@finos/legend-extension-dsl-data-space": "workspace:*",
48
49
  "@finos/legend-graph": "workspace:*",
49
50
  "@finos/legend-lego": "workspace:*",
50
51
  "@finos/legend-query-builder": "workspace:*",
@@ -59,10 +59,6 @@ export declare abstract class LegendQueryApplicationPlugin extends LegendApplica
59
59
  */
60
60
  private readonly _$nominalTypeBrand;
61
61
  install(pluginManager: LegendQueryPluginManager): void;
62
- /**
63
- * Get Redirect path for root application path
64
- */
65
- getExtraRootAppRedirectPath?(): string | undefined;
66
62
  /**
67
63
  * Get the list of actions (configurations) for query setup.
68
64
  */
@@ -71,21 +67,9 @@ export declare abstract class LegendQueryApplicationPlugin extends LegendApplica
71
67
  * Get the list of query editor help menu action configurations.
72
68
  */
73
69
  getExtraQueryEditorHelpMenuActionConfigurations?(): QueryEditorHelpMenuActionConfiguration[];
74
- /**
75
- * Get the list of existing query editor state builders.
76
- */
77
- getExtraExistingQueryEditorStateBuilders?(): ExistingQueryEditorStateBuilder[];
78
70
  /**
79
71
  * Get the list of query editor action renderer configurations.
80
72
  */
81
73
  getExtraQueryEditorActionConfigurations?(editorStore: QueryEditorStore): QueryEditorActionConfiguration[];
82
- /**
83
- * Get the list of query headers
84
- */
85
- getExtraQueryHeaders?(): ((editorStore: QueryEditorStore) => React.ReactNode | undefined)[];
86
- /**
87
- * Get list of new query navigation paths
88
- */
89
- getExtraNewQueryNavigationPaths?(): NewQueryNavigationPath[];
90
74
  }
91
75
  //# sourceMappingURL=LegendQueryApplicationPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendQueryApplicationPlug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M,sCAAsC,GAAG;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAEF,8BAAsB,4BAA6B,SAAQ,uBAAuB;IAChF;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAkC;IAErE,OAAO,CAAC,aAAa,EAAE,wBAAwB,GAAG,IAAI;IAItD;;OAEG;IACH,sCAAsC,CAAC,IAAI,6BAA6B,EAAE;IAE1E;;OAEG;IACH,+CAA+C,CAAC,IAAI,sCAAsC,EAAE;IAE5F;;OAEG;IACH,uCAAuC,CAAC,CACtC,WAAW,EAAE,gBAAgB,GAC5B,8BAA8B,EAAE;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LegendQueryApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendQueryApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAWpE,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,8DAAuC,CAAA;AACzC,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B;AAkDD,MAAM,OAAgB,4BAA6B,SAAQ,uBAAuB;IAChF;;;OAGG;IACc,kBAAkB,CAAkC;IAErE,OAAO,CAAC,aAAuC;QAC7C,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CAwCF"}
1
+ {"version":3,"file":"LegendQueryApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendQueryApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAWpE,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,8DAAuC,CAAA;AACzC,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B;AAkDD,MAAM,OAAgB,4BAA6B,SAAQ,uBAAuB;IAChF;;;OAGG;IACc,kBAAkB,CAAkC;IAErE,OAAO,CAAC,aAAuC;QAC7C,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CAkBF"}
@@ -20,6 +20,7 @@ import { type DepotServerClient } from '@finos/legend-server-depot';
20
20
  import type { LegendQueryPluginManager } from '../application/LegendQueryPluginManager.js';
21
21
  import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
22
22
  import { type QueryBuilderState, type QueryBuilderDiffViewState, QueryLoaderState } from '@finos/legend-query-builder';
23
+ import { DataSpaceQueryBuilderState } from '@finos/legend-extension-dsl-data-space/application';
23
24
  export declare const createViewProjectHandler: (applicationStore: LegendQueryApplicationStore) => (groupId: string, artifactId: string, versionId: string, entityPath: string | undefined) => void;
24
25
  export declare const createViewSDLCProjectHandler: (applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient) => (groupId: string, artifactId: string, entityPath: string | undefined) => Promise<void>;
25
26
  export interface QueryPersistConfiguration {
@@ -130,6 +131,7 @@ export declare class ExistingQueryEditorStore extends QueryEditorStore {
130
131
  setQuery(val: Query): void;
131
132
  getProjectInfo(): ProjectGAVCoordinates;
132
133
  setUpEditorState(): Promise<void>;
134
+ buildDataspaceBuilderState(query: Query): Promise<DataSpaceQueryBuilderState | undefined>;
133
135
  initializeQueryBuilderState(stopWatch: StopWatch): Promise<QueryBuilderState>;
134
136
  getPersistConfiguration(lambda: RawLambda, options?: {
135
137
  update?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"QueryEditorStore.d.ts","sourceRoot":"","sources":["../../src/stores/QueryEditorStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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ier, } from '@finos/legend-storage';
22
22
  import { resolveVersion, StoreProjectData, LATEST_VERSION_ALIAS, VersionedProjectData, } from '@finos/legend-server-depot';
23
- import { DEFAULT_TAB_SIZE, DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH, } from '@finos/legend-application';
23
+ import { ActionAlertActionType, ActionAlertType, DEFAULT_TAB_SIZE, DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH, } from '@finos/legend-application';
24
24
  import { LegendQueryEventHelper } from '../__lib__/LegendQueryEventHelper.js';
25
25
  import { ClassQueryBuilderState, MappingQueryBuilderState, ServiceQueryBuilderState, QueryLoaderState, } from '@finos/legend-query-builder';
26
26
  import { LegendQueryUserDataHelper } from '../__lib__/LegendQueryUserDataHelper.js';
27
27
  import { LegendQueryTelemetryHelper } from '../__lib__/LegendQueryTelemetryHelper.js';
28
+ import { DataSpaceProjectInfo, DataSpaceQueryBuilderState, } from '@finos/legend-extension-dsl-data-space/application';
29
+ import { getDataSpaceQueryInfo } from '../components/data-space/QueryDataSpaceUtil.js';
30
+ import { DSL_DataSpace_getGraphManagerExtension, getOwnDataSpace, retrieveAnalyticsResultCache, } from '@finos/legend-extension-dsl-data-space/graph';
31
+ import { generateDataSpaceQueryCreatorRoute } from '../__lib__/DSL_DataSpace_LegendQueryNavigation.js';
28
32
  export const createViewProjectHandler = (applicationStore) => (groupId, artifactId, versionId, entityPath) => applicationStore.navigationService.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl(applicationStore.config.studioApplicationUrl, groupId, artifactId, versionId, entityPath));
29
33
  export const createViewSDLCProjectHandler = (applicationStore, depotServerClient) => async (groupId, artifactId, entityPath) => {
30
34
  // fetch project data
@@ -561,6 +565,16 @@ export class ExistingQueryUpdateState {
561
565
  }
562
566
  }
563
567
  }
568
+ const resolveExecutionContext = (dataSpace, queryMapping, queryRuntime) => {
569
+ const matchingExecContexts = dataSpace.executionContexts.filter((ec) => ec.mapping.value === queryMapping);
570
+ if (matchingExecContexts.length > 1) {
571
+ const matchRuntime = matchingExecContexts.find((exec) => exec.defaultRuntime.value.path === queryRuntime.path);
572
+ // TODO: we will safely do this for now. Long term we should save exec context key into query store
573
+ // we should make runtime/mapping optional
574
+ return matchRuntime ?? matchingExecContexts[0];
575
+ }
576
+ return matchingExecContexts[0];
577
+ };
564
578
  export class ExistingQueryEditorStore extends QueryEditorStore {
565
579
  queryId;
566
580
  _lightQuery;
@@ -616,20 +630,90 @@ export class ExistingQueryEditorStore extends QueryEditorStore {
616
630
  async setUpEditorState() {
617
631
  this.setLightQuery(await this.graphManagerState.graphManager.getLightQuery(this.queryId));
618
632
  }
633
+ async buildDataspaceBuilderState(query) {
634
+ const dataSpacePath = getDataSpaceQueryInfo(query);
635
+ if (dataSpacePath) {
636
+ const dataSpace = getOwnDataSpace(dataSpacePath, this.graphManagerState.graph);
637
+ const mapping = query.mapping.value;
638
+ const matchingExecutionContext = resolveExecutionContext(dataSpace, mapping, query.runtime.value);
639
+ if (!matchingExecutionContext) {
640
+ // if a matching execution context is not found, it means this query is not
641
+ // properly created from a data space, therefore, we cannot support this case
642
+ return undefined;
643
+ }
644
+ let dataSpaceAnalysisResult;
645
+ try {
646
+ const project = StoreProjectData.serialization.fromJson(await this.depotServerClient.getProject(query.groupId, query.artifactId));
647
+ dataSpaceAnalysisResult = await DSL_DataSpace_getGraphManagerExtension(this.graphManagerState.graphManager).retrieveDataSpaceAnalysisFromCache(() => retrieveAnalyticsResultCache(project, query.versionId, dataSpace.path, this.depotServerClient));
648
+ }
649
+ catch {
650
+ // do nothing
651
+ }
652
+ const projectInfo = new DataSpaceProjectInfo(query.groupId, query.artifactId, query.versionId, createViewProjectHandler(this.applicationStore), createViewSDLCProjectHandler(this.applicationStore, this.depotServerClient));
653
+ const sourceInfo = {
654
+ groupId: projectInfo.groupId,
655
+ artifactId: projectInfo.artifactId,
656
+ versionId: projectInfo.versionId,
657
+ dataSpace: dataSpace.path,
658
+ };
659
+ const dataSpaceQueryBuilderState = new DataSpaceQueryBuilderState(this.applicationStore, this.graphManagerState, this.depotServerClient, dataSpace, matchingExecutionContext, (dataSpaceInfo) => {
660
+ if (dataSpaceInfo.defaultExecutionContext) {
661
+ const proceed = () => this.applicationStore.navigationService.navigator.goToLocation(generateDataSpaceQueryCreatorRoute(guaranteeNonNullable(dataSpaceInfo.groupId), guaranteeNonNullable(dataSpaceInfo.artifactId), LATEST_VERSION_ALIAS, //always default to latest
662
+ dataSpaceInfo.path, guaranteeNonNullable(dataSpaceInfo.defaultExecutionContext), undefined, undefined));
663
+ const updateQueryAndProceed = async () => {
664
+ try {
665
+ await flowResult(this.updateState.updateQuery(undefined, undefined));
666
+ proceed();
667
+ }
668
+ catch (error) {
669
+ assertErrorThrown(error);
670
+ this.applicationStore.logService.error(LogEvent.create(LEGEND_QUERY_APP_EVENT.GENERIC_FAILURE), error);
671
+ this.applicationStore.notificationService.notifyError(error);
672
+ }
673
+ };
674
+ if (!query.isCurrentUserQuery ||
675
+ !this.queryBuilderState?.changeDetectionState.hasChanged) {
676
+ proceed();
677
+ }
678
+ else {
679
+ this.applicationStore.alertService.setActionAlertInfo({
680
+ message: `To change the data space, you need to save the current query
681
+ to proceed`,
682
+ type: ActionAlertType.CAUTION,
683
+ actions: [
684
+ {
685
+ label: 'Save query and Proceed',
686
+ type: ActionAlertActionType.PROCEED_WITH_CAUTION,
687
+ handler: () => {
688
+ updateQueryAndProceed().catch(this.applicationStore.alertUnhandledError);
689
+ },
690
+ },
691
+ {
692
+ label: 'Abort',
693
+ type: ActionAlertActionType.PROCEED,
694
+ default: true,
695
+ },
696
+ ],
697
+ });
698
+ }
699
+ }
700
+ else {
701
+ this.applicationStore.notificationService.notifyWarning(`Can't switch data space: default execution context not specified`);
702
+ }
703
+ }, true, dataSpaceAnalysisResult, undefined, undefined, undefined, projectInfo, this.applicationStore.config.options.queryBuilderConfig, sourceInfo);
704
+ const mappingModelCoverageAnalysisResult = dataSpaceAnalysisResult?.executionContextsIndex.get(matchingExecutionContext.name)?.mappingModelCoverageAnalysisResult;
705
+ if (mappingModelCoverageAnalysisResult) {
706
+ dataSpaceQueryBuilderState.explorerState.mappingModelCoverageAnalysisResult =
707
+ mappingModelCoverageAnalysisResult;
708
+ }
709
+ return dataSpaceQueryBuilderState;
710
+ }
711
+ return undefined;
712
+ }
619
713
  async initializeQueryBuilderState(stopWatch) {
620
714
  const query = await this.graphManagerState.graphManager.getQuery(this.queryId, this.graphManagerState.graph);
621
715
  this.setQuery(query);
622
716
  LegendQueryUserDataHelper.addRecentlyViewedQuery(this.applicationStore.userDataService, query.id);
623
- let queryBuilderState;
624
- const existingQueryEditorStateBuilders = this.applicationStore.pluginManager
625
- .getApplicationPlugins()
626
- .flatMap((plugin) => plugin.getExtraExistingQueryEditorStateBuilders?.() ?? []);
627
- for (const builder of existingQueryEditorStateBuilders) {
628
- queryBuilderState = await builder(query, this);
629
- if (queryBuilderState) {
630
- break;
631
- }
632
- }
633
717
  // if no extension found, fall back to basic `class -> mapping -> runtime` mode
634
718
  const projectInfo = this.getProjectInfo();
635
719
  const sourceInfo = {
@@ -637,6 +721,7 @@ export class ExistingQueryEditorStore extends QueryEditorStore {
637
721
  artifactId: projectInfo.artifactId,
638
722
  versionId: projectInfo.versionId,
639
723
  };
724
+ let queryBuilderState = await this.buildDataspaceBuilderState(query);
640
725
  queryBuilderState =
641
726
  queryBuilderState ??
642
727
  new ClassQueryBuilderState(this.applicationStore, this.graphManagerState, this.applicationStore.config.options.queryBuilderConfig, sourceInfo);