@finos/legend-extension-dsl-data-space 10.2.4 → 10.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.d.ts +1 -1
- package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +1 -0
- package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.js +4 -4
- package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.js.map +1 -0
- package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts +15 -0
- package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts.map +1 -0
- package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js +32 -0
- package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js.map +1 -0
- package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts +38 -0
- package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts.map +1 -0
- package/lib/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.js → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js} +33 -13
- package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js.map +1 -0
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +3 -3
- package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
- package/lib/components/index.d.ts +6 -4
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +6 -4
- package/lib/components/index.js.map +1 -1
- package/lib/components/query-builder/DataSpaceAdvancedSearchModal.d.ts.map +1 -0
- package/lib/components/query-builder/DataSpaceAdvancedSearchModal.js.map +1 -0
- package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.d.ts +2 -5
- package/lib/components/query-builder/DataSpaceQueryBuilder.d.ts.map +1 -0
- package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.js +5 -24
- package/lib/components/query-builder/DataSpaceQueryBuilder.js.map +1 -0
- package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts +1 -1
- package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +1 -0
- package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.js +4 -4
- package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -0
- package/lib/components/query-builder/QueryDataSpaceUtil.d.ts.map +1 -0
- package/lib/components/query-builder/QueryDataSpaceUtil.js.map +1 -0
- package/lib/components/{query → query-builder}/index.d.ts +3 -1
- package/lib/components/query-builder/index.d.ts.map +1 -0
- package/lib/components/{query → query-builder}/index.js +3 -1
- package/lib/components/query-builder/index.js.map +1 -0
- package/lib/components/shared/DSL_DataSpace_Icon.d.ts.map +1 -0
- package/lib/components/shared/DSL_DataSpace_Icon.js.map +1 -0
- package/lib/graph-manager/index.d.ts +4 -0
- package/lib/graph-manager/index.d.ts.map +1 -1
- package/lib/graph-manager/index.js +5 -0
- package/lib/graph-manager/index.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +3 -8
- package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceAdvancedSearchState.js +2 -3
- package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
- package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.d.ts +2 -2
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.js +3 -3
- package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -0
- package/lib/stores/shared/DataSpaceInfo.d.ts.map +1 -0
- package/lib/stores/shared/DataSpaceInfo.js.map +1 -0
- package/lib/{__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts → stores/shared/DataSpaceUtils.d.ts} +4 -5
- package/lib/stores/shared/DataSpaceUtils.d.ts.map +1 -0
- package/lib/stores/shared/DataSpaceUtils.js +32 -0
- package/lib/stores/shared/DataSpaceUtils.js.map +1 -0
- package/package.json +4 -9
- package/src/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.ts +1 -1
- package/src/__lib__/shared/DSL_DataSpace_LegendNavigation.ts +57 -0
- package/src/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.ts → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.ts} +41 -46
- package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +6 -6
- package/src/components/index.ts +15 -4
- package/src/components/{query → query-builder}/DataSpaceAdvancedSearchModal.tsx +1 -1
- package/src/components/{query → query-builder}/DataSpaceQueryBuilder.tsx +7 -68
- package/src/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +5 -5
- package/src/components/{studio → query-builder}/index.ts +7 -1
- package/src/graph-manager/index.ts +6 -0
- package/src/stores/query/DataSpaceAdvancedSearchState.ts +8 -3
- package/src/stores/{query → query-builder}/DataSpaceQueryBuilderState.ts +6 -3
- package/src/stores/shared/DataSpaceUtils.ts +42 -0
- package/tsconfig.json +12 -26
- package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts +0 -65
- package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts.map +0 -1
- package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js.map +0 -1
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +0 -17
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +0 -1
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +0 -54
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +0 -1
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts.map +0 -1
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js +0 -21
- package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js.map +0 -1
- package/lib/components/DSL_DataSpace_Icon.d.ts.map +0 -1
- package/lib/components/DSL_DataSpace_Icon.js.map +0 -1
- package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts +0 -29
- package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts.map +0 -1
- package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +0 -242
- package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +0 -1
- package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +0 -1
- package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.js.map +0 -1
- package/lib/components/query/DataSpaceAdvancedSearchModal.d.ts.map +0 -1
- package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +0 -1
- package/lib/components/query/DataSpaceQueryBuilder.d.ts.map +0 -1
- package/lib/components/query/DataSpaceQueryBuilder.js.map +0 -1
- package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +0 -1
- package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +0 -1
- package/lib/components/query/DataSpaceQueryCreator.d.ts +0 -19
- package/lib/components/query/DataSpaceQueryCreator.d.ts.map +0 -1
- package/lib/components/query/DataSpaceQueryCreator.js +0 -41
- package/lib/components/query/DataSpaceQueryCreator.js.map +0 -1
- package/lib/components/query/DataSpaceQuerySetup.d.ts +0 -21
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +0 -1
- package/lib/components/query/DataSpaceQuerySetup.js +0 -63
- package/lib/components/query/DataSpaceQuerySetup.js.map +0 -1
- package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts +0 -19
- package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts.map +0 -1
- package/lib/components/query/DataSpaceTemplateQueryCreator.js +0 -37
- package/lib/components/query/DataSpaceTemplateQueryCreator.js.map +0 -1
- package/lib/components/query/QueryDataSpaceUtil.d.ts.map +0 -1
- package/lib/components/query/QueryDataSpaceUtil.js.map +0 -1
- package/lib/components/query/index.d.ts.map +0 -1
- package/lib/components/query/index.js.map +0 -1
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +0 -39
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -207
- package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +0 -1
- package/lib/components/studio/DataSpacePreviewAction.d.ts +0 -25
- package/lib/components/studio/DataSpacePreviewAction.d.ts.map +0 -1
- package/lib/components/studio/DataSpacePreviewAction.js +0 -53
- package/lib/components/studio/DataSpacePreviewAction.js.map +0 -1
- package/lib/components/studio/DataSpaceQueryAction.d.ts +0 -22
- package/lib/components/studio/DataSpaceQueryAction.d.ts.map +0 -1
- package/lib/components/studio/DataSpaceQueryAction.js +0 -29
- package/lib/components/studio/DataSpaceQueryAction.js.map +0 -1
- package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts +0 -19
- package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts.map +0 -1
- package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js +0 -81
- package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js.map +0 -1
- package/lib/components/studio/index.d.ts +0 -17
- package/lib/components/studio/index.d.ts.map +0 -1
- package/lib/components/studio/index.js +0 -17
- package/lib/components/studio/index.js.map +0 -1
- package/lib/stores/query/DataSpaceInfo.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceInfo.js.map +0 -1
- package/lib/stores/query/DataSpaceQueryBuilderState.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceQueryBuilderState.js.map +0 -1
- package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +0 -38
- package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceQueryCreatorStore.js +0 -149
- package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +0 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +0 -51
- package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceQuerySetupStore.js +0 -107
- package/lib/stores/query/DataSpaceQuerySetupStore.js.map +0 -1
- package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts +0 -35
- package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js +0 -108
- package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js.map +0 -1
- package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts +0 -61
- package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map +0 -1
- package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js +0 -407
- package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js.map +0 -1
- package/lib/stores/studio/DataSpacePreviewState.d.ts +0 -33
- package/lib/stores/studio/DataSpacePreviewState.d.ts.map +0 -1
- package/lib/stores/studio/DataSpacePreviewState.js +0 -117
- package/lib/stores/studio/DataSpacePreviewState.js.map +0 -1
- package/src/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +0 -54
- package/src/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.ts +0 -20
- package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +0 -445
- package/src/components/query/DataSpaceQueryCreator.tsx +0 -99
- package/src/components/query/DataSpaceQuerySetup.tsx +0 -165
- package/src/components/query/DataSpaceTemplateQueryCreator.tsx +0 -82
- package/src/components/query/index.ts +0 -17
- package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -297
- package/src/components/studio/DataSpacePreviewAction.tsx +0 -136
- package/src/components/studio/DataSpaceQueryAction.tsx +0 -34
- package/src/components/studio/DataSpaceTemplateQueryPromoteReview.tsx +0 -292
- package/src/stores/query/DataSpaceQueryCreatorStore.ts +0 -308
- package/src/stores/query/DataSpaceQuerySetupStore.ts +0 -205
- package/src/stores/query/DataSpaceTemplateQueryCreatorStore.ts +0 -207
- package/src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts +0 -636
- package/src/stores/studio/DataSpacePreviewState.ts +0 -195
- /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.d.ts +0 -0
- /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.js +0 -0
- /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.d.ts +0 -0
- /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.js +0 -0
- /package/lib/components/{DSL_DataSpace_Icon.d.ts → shared/DSL_DataSpace_Icon.d.ts} +0 -0
- /package/lib/components/{DSL_DataSpace_Icon.js → shared/DSL_DataSpace_Icon.js} +0 -0
- /package/lib/stores/{query → shared}/DataSpaceInfo.d.ts +0 -0
- /package/lib/stores/{query → shared}/DataSpaceInfo.js +0 -0
- /package/src/components/{query → query-builder}/QueryDataSpaceUtil.ts +0 -0
- /package/src/components/{DSL_DataSpace_Icon.tsx → shared/DSL_DataSpace_Icon.tsx} +0 -0
- /package/src/stores/{query → shared}/DataSpaceInfo.ts +0 -0
@@ -1,99 +0,0 @@
|
|
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 { observer, useLocalObservable } from 'mobx-react-lite';
|
18
|
-
import { useApplicationStore } from '@finos/legend-application';
|
19
|
-
import { useParams } from '@finos/legend-application/browser';
|
20
|
-
import {
|
21
|
-
QueryEditor,
|
22
|
-
QueryEditorStoreContext,
|
23
|
-
useLegendQueryApplicationStore,
|
24
|
-
useLegendQueryBaseStore,
|
25
|
-
} from '@finos/legend-application-query';
|
26
|
-
import { DataSpaceQueryCreatorStore } from '../../stores/query/DataSpaceQueryCreatorStore.js';
|
27
|
-
import {
|
28
|
-
type DataSpaceQueryCreatorPathParams,
|
29
|
-
DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN,
|
30
|
-
DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN,
|
31
|
-
} from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
|
32
|
-
import { parseGAVCoordinates } from '@finos/legend-storage';
|
33
|
-
|
34
|
-
const DataSpaceQueryCreatorStoreProvider: React.FC<{
|
35
|
-
children: React.ReactNode;
|
36
|
-
gav: string;
|
37
|
-
dataSpacePath: string;
|
38
|
-
executionContext: string;
|
39
|
-
runtimePath: string | undefined;
|
40
|
-
classPath: string | undefined;
|
41
|
-
}> = ({
|
42
|
-
children,
|
43
|
-
gav,
|
44
|
-
dataSpacePath,
|
45
|
-
executionContext,
|
46
|
-
runtimePath,
|
47
|
-
classPath,
|
48
|
-
}) => {
|
49
|
-
const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
|
50
|
-
const applicationStore = useLegendQueryApplicationStore();
|
51
|
-
const baseStore = useLegendQueryBaseStore();
|
52
|
-
const store = useLocalObservable(
|
53
|
-
() =>
|
54
|
-
new DataSpaceQueryCreatorStore(
|
55
|
-
applicationStore,
|
56
|
-
baseStore.depotServerClient,
|
57
|
-
groupId,
|
58
|
-
artifactId,
|
59
|
-
versionId,
|
60
|
-
dataSpacePath,
|
61
|
-
executionContext,
|
62
|
-
runtimePath,
|
63
|
-
classPath,
|
64
|
-
),
|
65
|
-
);
|
66
|
-
return (
|
67
|
-
<QueryEditorStoreContext.Provider value={store}>
|
68
|
-
{children}
|
69
|
-
</QueryEditorStoreContext.Provider>
|
70
|
-
);
|
71
|
-
};
|
72
|
-
|
73
|
-
export const DataSpaceQueryCreator = observer(() => {
|
74
|
-
const applicationStore = useApplicationStore();
|
75
|
-
const parameters = useParams<DataSpaceQueryCreatorPathParams>();
|
76
|
-
const gav = parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV];
|
77
|
-
const dataSpacePath =
|
78
|
-
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
|
79
|
-
const executionContext =
|
80
|
-
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.EXECUTION_CONTEXT];
|
81
|
-
const runtimePath =
|
82
|
-
parameters[DATA_SPACE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.RUNTIME_PATH];
|
83
|
-
const classPath =
|
84
|
-
applicationStore.navigationService.navigator.getCurrentLocationParameterValue(
|
85
|
-
DATA_SPACE_QUERY_CREATOR_QUERY_PARAM_TOKEN.CLASS_PATH,
|
86
|
-
);
|
87
|
-
|
88
|
-
return (
|
89
|
-
<DataSpaceQueryCreatorStoreProvider
|
90
|
-
gav={gav}
|
91
|
-
dataSpacePath={dataSpacePath}
|
92
|
-
executionContext={executionContext}
|
93
|
-
runtimePath={runtimePath}
|
94
|
-
classPath={classPath}
|
95
|
-
>
|
96
|
-
<QueryEditor />
|
97
|
-
</DataSpaceQueryCreatorStoreProvider>
|
98
|
-
);
|
99
|
-
});
|
@@ -1,165 +0,0 @@
|
|
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 { observer, useLocalObservable } from 'mobx-react-lite';
|
18
|
-
import { useApplicationStore } from '@finos/legend-application';
|
19
|
-
import {
|
20
|
-
QueryEditor,
|
21
|
-
QueryEditorStoreContext,
|
22
|
-
useLegendQueryApplicationStore,
|
23
|
-
useLegendQueryBaseStore,
|
24
|
-
} from '@finos/legend-application-query';
|
25
|
-
import { useEffect, useRef } from 'react';
|
26
|
-
import { flowResult } from 'mobx';
|
27
|
-
import { QueryBuilderClassSelector } from '@finos/legend-query-builder';
|
28
|
-
import {
|
29
|
-
CustomSelectorInput,
|
30
|
-
SearchIcon,
|
31
|
-
type SelectComponent,
|
32
|
-
} from '@finos/legend-art';
|
33
|
-
import { DataSpaceIcon } from '../DSL_DataSpace_Icon.js';
|
34
|
-
import {
|
35
|
-
type DataSpaceQuerySetupState,
|
36
|
-
DataSpaceQuerySetupStore,
|
37
|
-
} from '../../stores/query/DataSpaceQuerySetupStore.js';
|
38
|
-
import {
|
39
|
-
buildDataSpaceOption,
|
40
|
-
formatDataSpaceOptionLabel,
|
41
|
-
type DataSpaceOption,
|
42
|
-
} from './DataSpaceQueryBuilder.js';
|
43
|
-
import { DataSpaceAdvancedSearchModal } from './DataSpaceAdvancedSearchModal.js';
|
44
|
-
|
45
|
-
const DataSpaceQuerySetupStoreProvider: React.FC<{
|
46
|
-
children: React.ReactNode;
|
47
|
-
}> = ({ children }) => {
|
48
|
-
const applicationStore = useLegendQueryApplicationStore();
|
49
|
-
const baseStore = useLegendQueryBaseStore();
|
50
|
-
const store = useLocalObservable(
|
51
|
-
() =>
|
52
|
-
new DataSpaceQuerySetupStore(
|
53
|
-
applicationStore,
|
54
|
-
baseStore.depotServerClient,
|
55
|
-
),
|
56
|
-
);
|
57
|
-
return (
|
58
|
-
<QueryEditorStoreContext.Provider value={store}>
|
59
|
-
{children}
|
60
|
-
</QueryEditorStoreContext.Provider>
|
61
|
-
);
|
62
|
-
};
|
63
|
-
|
64
|
-
export const DataSpaceQuerySetup = observer(() => (
|
65
|
-
<DataSpaceQuerySetupStoreProvider>
|
66
|
-
<QueryEditor />
|
67
|
-
</DataSpaceQuerySetupStoreProvider>
|
68
|
-
));
|
69
|
-
|
70
|
-
/**
|
71
|
-
* This setup panel supports cascading in order: Data-space -> Execution context (-> Runtime) -> Class
|
72
|
-
*
|
73
|
-
* In other words, we will only show:
|
74
|
-
* - For runtime selector: the list of compatible runtimes with the selected execution context mapping
|
75
|
-
* - For class selector: the list of compatible class with the selected execution context mapping
|
76
|
-
*
|
77
|
-
* See details on propagation/cascading in {@link DataSpaceQuerySetupState}
|
78
|
-
*/
|
79
|
-
const DataSpaceQuerySetupSetupPanelContent = observer(
|
80
|
-
(props: { queryBuilderState: DataSpaceQuerySetupState }) => {
|
81
|
-
const { queryBuilderState } = props;
|
82
|
-
const applicationStore = useApplicationStore();
|
83
|
-
const dataSpaceSearchRef = useRef<SelectComponent>(null);
|
84
|
-
// data space
|
85
|
-
const dataSpaceOptions =
|
86
|
-
queryBuilderState.dataSpaces.map(buildDataSpaceOption);
|
87
|
-
const selectedDataSpaceOption = null;
|
88
|
-
const onDataSpaceOptionChange = (option: DataSpaceOption): void => {
|
89
|
-
queryBuilderState.onDataSpaceChange(option.value);
|
90
|
-
};
|
91
|
-
|
92
|
-
const openDataSpaceAdvancedSearch = (): void =>
|
93
|
-
queryBuilderState.showAdvancedSearchPanel();
|
94
|
-
|
95
|
-
useEffect(() => {
|
96
|
-
flowResult(queryBuilderState.loadDataSpaces()).catch(
|
97
|
-
applicationStore.alertUnhandledError,
|
98
|
-
);
|
99
|
-
}, [queryBuilderState, applicationStore]);
|
100
|
-
|
101
|
-
useEffect(() => dataSpaceSearchRef.current?.focus());
|
102
|
-
|
103
|
-
return (
|
104
|
-
<>
|
105
|
-
<div className="query-builder__setup__config-group">
|
106
|
-
<div className="query-builder__setup__config-group__header">
|
107
|
-
<div className="query-builder__setup__config-group__header__title">
|
108
|
-
data space execution context
|
109
|
-
</div>
|
110
|
-
</div>
|
111
|
-
<div className="query-builder__setup__config-group__content">
|
112
|
-
<div className="query-builder__setup__config-group__item">
|
113
|
-
<div
|
114
|
-
className="btn--sm query-builder__setup__config-group__item__label"
|
115
|
-
title="data space"
|
116
|
-
>
|
117
|
-
<DataSpaceIcon />
|
118
|
-
</div>
|
119
|
-
<CustomSelectorInput
|
120
|
-
ref={dataSpaceSearchRef}
|
121
|
-
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
122
|
-
options={dataSpaceOptions}
|
123
|
-
isLoading={queryBuilderState.loadDataSpacesState.isInProgress}
|
124
|
-
onChange={onDataSpaceOptionChange}
|
125
|
-
value={selectedDataSpaceOption}
|
126
|
-
placeholder="Search for data space..."
|
127
|
-
escapeClearsValue={true}
|
128
|
-
darkMode={
|
129
|
-
!applicationStore.layoutService
|
130
|
-
.TEMPORARY__isLightColorThemeEnabled
|
131
|
-
}
|
132
|
-
formatOptionLabel={formatDataSpaceOptionLabel}
|
133
|
-
/>
|
134
|
-
<button
|
135
|
-
tabIndex={-1}
|
136
|
-
className="query-builder__setup__data-space-searcher__btn btn--dark"
|
137
|
-
onClick={openDataSpaceAdvancedSearch}
|
138
|
-
title="Open advanced search for data space..."
|
139
|
-
>
|
140
|
-
<SearchIcon />
|
141
|
-
</button>
|
142
|
-
{queryBuilderState.advancedSearchState && (
|
143
|
-
<DataSpaceAdvancedSearchModal
|
144
|
-
searchState={queryBuilderState.advancedSearchState}
|
145
|
-
onClose={() => queryBuilderState.hideAdvancedSearchPanel()}
|
146
|
-
/>
|
147
|
-
)}
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
<QueryBuilderClassSelector
|
152
|
-
queryBuilderState={queryBuilderState}
|
153
|
-
classes={[]}
|
154
|
-
noMatchMessage="No compatible class found"
|
155
|
-
/>
|
156
|
-
</>
|
157
|
-
);
|
158
|
-
},
|
159
|
-
);
|
160
|
-
|
161
|
-
export const renderDataSpaceQuerySetupSetupPanelContent = (
|
162
|
-
queryBuilderState: DataSpaceQuerySetupState,
|
163
|
-
): React.ReactNode => (
|
164
|
-
<DataSpaceQuerySetupSetupPanelContent queryBuilderState={queryBuilderState} />
|
165
|
-
);
|
@@ -1,82 +0,0 @@
|
|
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 { observer, useLocalObservable } from 'mobx-react-lite';
|
18
|
-
import { useParams } from '@finos/legend-application/browser';
|
19
|
-
import {
|
20
|
-
QueryEditor,
|
21
|
-
QueryEditorStoreContext,
|
22
|
-
useLegendQueryApplicationStore,
|
23
|
-
useLegendQueryBaseStore,
|
24
|
-
} from '@finos/legend-application-query';
|
25
|
-
import {
|
26
|
-
DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN,
|
27
|
-
type DataSpaceTemplateQueryCreatorPathParams,
|
28
|
-
} from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
|
29
|
-
import { parseGAVCoordinates } from '@finos/legend-storage';
|
30
|
-
import { DataSpaceTemplateQueryCreatorStore } from '../../stores/query/DataSpaceTemplateQueryCreatorStore.js';
|
31
|
-
|
32
|
-
const DataSpaceTemplateQueryCreatorStoreProvider: React.FC<{
|
33
|
-
children: React.ReactNode;
|
34
|
-
gav: string;
|
35
|
-
dataSpacePath: string;
|
36
|
-
templateQueryId: string;
|
37
|
-
}> = ({ children, gav, dataSpacePath, templateQueryId }) => {
|
38
|
-
const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
|
39
|
-
const applicationStore = useLegendQueryApplicationStore();
|
40
|
-
const baseStore = useLegendQueryBaseStore();
|
41
|
-
const store = useLocalObservable(
|
42
|
-
() =>
|
43
|
-
new DataSpaceTemplateQueryCreatorStore(
|
44
|
-
applicationStore,
|
45
|
-
baseStore.depotServerClient,
|
46
|
-
groupId,
|
47
|
-
artifactId,
|
48
|
-
versionId,
|
49
|
-
dataSpacePath,
|
50
|
-
templateQueryId,
|
51
|
-
),
|
52
|
-
);
|
53
|
-
return (
|
54
|
-
<QueryEditorStoreContext.Provider value={store}>
|
55
|
-
{children}
|
56
|
-
</QueryEditorStoreContext.Provider>
|
57
|
-
);
|
58
|
-
};
|
59
|
-
|
60
|
-
export const DataSpaceTemplateQueryCreator = observer(() => {
|
61
|
-
const parameters = useParams<DataSpaceTemplateQueryCreatorPathParams>();
|
62
|
-
const gav =
|
63
|
-
parameters[DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.GAV];
|
64
|
-
const dataSpacePath =
|
65
|
-
parameters[
|
66
|
-
DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH
|
67
|
-
];
|
68
|
-
const templateQueryId =
|
69
|
-
parameters[
|
70
|
-
DATA_SPACE_TEMPLATE_QUERY_CREATOR_ROUTE_PATTERN_TOKEN.TEMPLATE_QUERY_ID
|
71
|
-
];
|
72
|
-
|
73
|
-
return (
|
74
|
-
<DataSpaceTemplateQueryCreatorStoreProvider
|
75
|
-
gav={gav}
|
76
|
-
dataSpacePath={dataSpacePath}
|
77
|
-
templateQueryId={templateQueryId}
|
78
|
-
>
|
79
|
-
<QueryEditor />
|
80
|
-
</DataSpaceTemplateQueryCreatorStoreProvider>
|
81
|
-
);
|
82
|
-
});
|
@@ -1,17 +0,0 @@
|
|
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
|
-
export { DSL_DataSpace_LegendQueryApplicationPlugin } from './DSL_DataSpace_LegendQueryApplicationPlugin.js';
|
@@ -1,297 +0,0 @@
|
|
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 packageJson from '../../../package.json' assert { type: 'json' };
|
18
|
-
import {
|
19
|
-
type NewElementFromStateCreator,
|
20
|
-
type ElementClassifier,
|
21
|
-
type DragElementClassifier,
|
22
|
-
type ElementIconGetter,
|
23
|
-
type DSL_LegendStudioApplicationPlugin_Extension,
|
24
|
-
type NewElementState,
|
25
|
-
type ElementEditorStateCreator,
|
26
|
-
type EditorStore,
|
27
|
-
type ElementEditorState,
|
28
|
-
type PureGrammarParserElementDocumentationGetter,
|
29
|
-
type PureGrammarParserDocumentationGetter,
|
30
|
-
type PureGrammarParserKeywordSuggestionGetter,
|
31
|
-
type PureGrammarParserElementSnippetSuggestionsGetter,
|
32
|
-
UnsupportedElementEditorState,
|
33
|
-
LegendStudioApplicationPlugin,
|
34
|
-
type ExplorerContextMenuItemRendererConfiguration,
|
35
|
-
type EditorExtensionStateBuilder,
|
36
|
-
type EditorExtensionComponentRendererConfiguration,
|
37
|
-
PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY,
|
38
|
-
} from '@finos/legend-application-studio';
|
39
|
-
import {
|
40
|
-
PackageableElementExplicitReference,
|
41
|
-
stub_Mapping,
|
42
|
-
stub_PackageableRuntime,
|
43
|
-
type PackageableElement,
|
44
|
-
} from '@finos/legend-graph';
|
45
|
-
import {
|
46
|
-
DataSpace,
|
47
|
-
DataSpaceExecutionContext,
|
48
|
-
} from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
|
49
|
-
import { DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js';
|
50
|
-
import { SIMPLE_DATA_SPACE_SNIPPET } from '../../__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js';
|
51
|
-
import type {
|
52
|
-
ApplicationPageEntry,
|
53
|
-
DocumentationEntry,
|
54
|
-
} from '@finos/legend-application';
|
55
|
-
import { DataSpaceIcon } from '../DSL_DataSpace_Icon.js';
|
56
|
-
import { DataSpacePreviewState } from '../../stores/studio/DataSpacePreviewState.js';
|
57
|
-
import {
|
58
|
-
DataSpacePreviewDialog,
|
59
|
-
DataSpacePreviewAction,
|
60
|
-
} from './DataSpacePreviewAction.js';
|
61
|
-
import type { PureGrammarTextSuggestion } from '@finos/legend-lego/code-editor';
|
62
|
-
import { DataSpaceQueryAction } from './DataSpaceQueryAction.js';
|
63
|
-
import { DataSpaceTemplateQueryPromotionReviewer } from './DataSpaceTemplateQueryPromoteReview.js';
|
64
|
-
import { DATA_SPACE_QUERY_ROUTE_PATTERN } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
|
65
|
-
|
66
|
-
const DATA_SPACE_ELEMENT_TYPE = 'DATA SPACE';
|
67
|
-
const DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE =
|
68
|
-
'PROJECT_EXPLORER_DATA_SPACE';
|
69
|
-
|
70
|
-
const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = 'DataSpace';
|
71
|
-
const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = 'DataSpace';
|
72
|
-
|
73
|
-
export class DSL_DataSpace_LegendStudioApplicationPlugin
|
74
|
-
extends LegendStudioApplicationPlugin
|
75
|
-
implements DSL_LegendStudioApplicationPlugin_Extension
|
76
|
-
{
|
77
|
-
constructor() {
|
78
|
-
super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
|
79
|
-
}
|
80
|
-
|
81
|
-
override getExtraRequiredDocumentationKeys(): string[] {
|
82
|
-
return [
|
83
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_DATA_SPACE,
|
84
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
85
|
-
];
|
86
|
-
}
|
87
|
-
|
88
|
-
override getExtraApplicationPageEntries(): ApplicationPageEntry[] {
|
89
|
-
return [
|
90
|
-
{
|
91
|
-
key: 'promote-as-curated-template-query-page',
|
92
|
-
addressPatterns: [
|
93
|
-
DATA_SPACE_QUERY_ROUTE_PATTERN.PROMOTE_TEMPLATE_QUERY,
|
94
|
-
],
|
95
|
-
renderer: DataSpaceTemplateQueryPromotionReviewer,
|
96
|
-
},
|
97
|
-
];
|
98
|
-
}
|
99
|
-
|
100
|
-
override getExtraExplorerContextMenuItemRendererConfigurations(): ExplorerContextMenuItemRendererConfiguration[] {
|
101
|
-
return [
|
102
|
-
{
|
103
|
-
key: 'data-space-query',
|
104
|
-
renderer: (editorStore, element) => {
|
105
|
-
if (element instanceof DataSpace) {
|
106
|
-
return <DataSpaceQueryAction dataSpace={element} />;
|
107
|
-
}
|
108
|
-
return undefined;
|
109
|
-
},
|
110
|
-
},
|
111
|
-
{
|
112
|
-
key: 'data-space-preview',
|
113
|
-
renderer: (editorStore, element) => {
|
114
|
-
if (element instanceof DataSpace) {
|
115
|
-
return <DataSpacePreviewAction dataSpace={element} />;
|
116
|
-
}
|
117
|
-
return undefined;
|
118
|
-
},
|
119
|
-
},
|
120
|
-
];
|
121
|
-
}
|
122
|
-
|
123
|
-
override getExtraEditorExtensionStateBuilders(): EditorExtensionStateBuilder[] {
|
124
|
-
return [(editorStore) => new DataSpacePreviewState(editorStore)];
|
125
|
-
}
|
126
|
-
|
127
|
-
override getExtraEditorExtensionComponentRendererConfigurations(): EditorExtensionComponentRendererConfiguration[] {
|
128
|
-
return [
|
129
|
-
{
|
130
|
-
key: 'data-space-preview',
|
131
|
-
renderer: (editorStore) => <DataSpacePreviewDialog />,
|
132
|
-
},
|
133
|
-
];
|
134
|
-
}
|
135
|
-
|
136
|
-
getExtraPureGrammarKeywords(): string[] {
|
137
|
-
return [PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL];
|
138
|
-
}
|
139
|
-
|
140
|
-
getExtraSupportedElementTypes(): string[] {
|
141
|
-
return [DATA_SPACE_ELEMENT_TYPE];
|
142
|
-
}
|
143
|
-
|
144
|
-
getExtraSupportedElementTypesWithCategory?(): Map<string, string[]> {
|
145
|
-
const elementTypesWithCategoryMap = new Map<string, string[]>();
|
146
|
-
elementTypesWithCategoryMap.set(
|
147
|
-
PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY.QUERY,
|
148
|
-
[DATA_SPACE_ELEMENT_TYPE],
|
149
|
-
);
|
150
|
-
return elementTypesWithCategoryMap;
|
151
|
-
}
|
152
|
-
|
153
|
-
getExtraElementClassifiers(): ElementClassifier[] {
|
154
|
-
return [
|
155
|
-
(element: PackageableElement): string | undefined => {
|
156
|
-
if (element instanceof DataSpace) {
|
157
|
-
return DATA_SPACE_ELEMENT_TYPE;
|
158
|
-
}
|
159
|
-
return undefined;
|
160
|
-
},
|
161
|
-
];
|
162
|
-
}
|
163
|
-
|
164
|
-
getExtraElementIconGetters(): ElementIconGetter[] {
|
165
|
-
return [
|
166
|
-
(type: string): React.ReactNode | undefined => {
|
167
|
-
if (type === DATA_SPACE_ELEMENT_TYPE) {
|
168
|
-
return <DataSpaceIcon />;
|
169
|
-
}
|
170
|
-
return undefined;
|
171
|
-
},
|
172
|
-
];
|
173
|
-
}
|
174
|
-
|
175
|
-
getExtraNewElementFromStateCreators(): NewElementFromStateCreator[] {
|
176
|
-
return [
|
177
|
-
(
|
178
|
-
type: string,
|
179
|
-
name: string,
|
180
|
-
state: NewElementState,
|
181
|
-
): PackageableElement | undefined => {
|
182
|
-
if (type === DATA_SPACE_ELEMENT_TYPE) {
|
183
|
-
const dataSpace = new DataSpace(name);
|
184
|
-
const dataSpaceExecutionContext = new DataSpaceExecutionContext();
|
185
|
-
dataSpaceExecutionContext.name = 'dummyContext';
|
186
|
-
dataSpaceExecutionContext.mapping =
|
187
|
-
PackageableElementExplicitReference.create(stub_Mapping());
|
188
|
-
dataSpaceExecutionContext.defaultRuntime =
|
189
|
-
PackageableElementExplicitReference.create(
|
190
|
-
stub_PackageableRuntime(),
|
191
|
-
);
|
192
|
-
dataSpace.executionContexts = [dataSpaceExecutionContext];
|
193
|
-
dataSpace.defaultExecutionContext = dataSpaceExecutionContext;
|
194
|
-
return dataSpace;
|
195
|
-
}
|
196
|
-
return undefined;
|
197
|
-
},
|
198
|
-
];
|
199
|
-
}
|
200
|
-
|
201
|
-
getExtraElementEditorStateCreators(): ElementEditorStateCreator[] {
|
202
|
-
return [
|
203
|
-
(
|
204
|
-
editorStore: EditorStore,
|
205
|
-
element: PackageableElement,
|
206
|
-
): ElementEditorState | undefined => {
|
207
|
-
if (element instanceof DataSpace) {
|
208
|
-
return new UnsupportedElementEditorState(editorStore, element);
|
209
|
-
}
|
210
|
-
return undefined;
|
211
|
-
},
|
212
|
-
];
|
213
|
-
}
|
214
|
-
|
215
|
-
getExtraDragElementClassifiers(): DragElementClassifier[] {
|
216
|
-
return [
|
217
|
-
(element: PackageableElement): string | undefined => {
|
218
|
-
if (element instanceof DataSpace) {
|
219
|
-
return DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE;
|
220
|
-
}
|
221
|
-
return undefined;
|
222
|
-
},
|
223
|
-
];
|
224
|
-
}
|
225
|
-
|
226
|
-
getExtraPureGrammarTextEditorDragElementTypes(): string[] {
|
227
|
-
return [DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE];
|
228
|
-
}
|
229
|
-
|
230
|
-
getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[] {
|
231
|
-
return [
|
232
|
-
(
|
233
|
-
editorStore: EditorStore,
|
234
|
-
parserKeyword: string,
|
235
|
-
elementKeyword: string,
|
236
|
-
): DocumentationEntry | undefined => {
|
237
|
-
if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
|
238
|
-
if (elementKeyword === PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL) {
|
239
|
-
return editorStore.applicationStore.documentationService.getDocEntry(
|
240
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_DATA_SPACE,
|
241
|
-
);
|
242
|
-
}
|
243
|
-
}
|
244
|
-
return undefined;
|
245
|
-
},
|
246
|
-
];
|
247
|
-
}
|
248
|
-
|
249
|
-
getExtraPureGrammarParserDocumentationGetters(): PureGrammarParserDocumentationGetter[] {
|
250
|
-
return [
|
251
|
-
(
|
252
|
-
editorStore: EditorStore,
|
253
|
-
parserKeyword: string,
|
254
|
-
): DocumentationEntry | undefined => {
|
255
|
-
if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
|
256
|
-
return editorStore.applicationStore.documentationService.getDocEntry(
|
257
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
258
|
-
);
|
259
|
-
}
|
260
|
-
return undefined;
|
261
|
-
},
|
262
|
-
];
|
263
|
-
}
|
264
|
-
|
265
|
-
getExtraPureGrammarParserKeywordSuggestionGetters(): PureGrammarParserKeywordSuggestionGetter[] {
|
266
|
-
return [
|
267
|
-
(editorStore: EditorStore): PureGrammarTextSuggestion[] => [
|
268
|
-
{
|
269
|
-
text: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
|
270
|
-
description: `(dsl)`,
|
271
|
-
documentation:
|
272
|
-
editorStore.applicationStore.documentationService.getDocEntry(
|
273
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
274
|
-
),
|
275
|
-
insertText: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
|
276
|
-
},
|
277
|
-
],
|
278
|
-
];
|
279
|
-
}
|
280
|
-
|
281
|
-
getExtraPureGrammarParserElementSnippetSuggestionsGetters(): PureGrammarParserElementSnippetSuggestionsGetter[] {
|
282
|
-
return [
|
283
|
-
(
|
284
|
-
editorStore: EditorStore,
|
285
|
-
parserKeyword: string,
|
286
|
-
): PureGrammarTextSuggestion[] | undefined =>
|
287
|
-
parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME
|
288
|
-
? [
|
289
|
-
{
|
290
|
-
text: PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
|
291
|
-
insertText: SIMPLE_DATA_SPACE_SNIPPET,
|
292
|
-
},
|
293
|
-
]
|
294
|
-
: undefined,
|
295
|
-
];
|
296
|
-
}
|
297
|
-
}
|