@finos/legend-extension-dsl-data-space 10.3.0 → 10.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/lib/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.d.ts → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts} +5 -20
  2. package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.d.ts.map +1 -0
  3. package/lib/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.js → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js} +34 -2
  4. package/lib/__lib__/to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.js.map +1 -0
  5. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +2 -2
  6. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  7. package/lib/components/index.d.ts +4 -4
  8. package/lib/components/index.d.ts.map +1 -1
  9. package/lib/components/index.js +4 -4
  10. package/lib/components/index.js.map +1 -1
  11. package/lib/components/query-builder/DataSpaceAdvancedSearchModal.d.ts.map +1 -0
  12. package/lib/components/query-builder/DataSpaceAdvancedSearchModal.js.map +1 -0
  13. package/lib/components/query-builder/DataSpaceQueryBuilder.d.ts.map +1 -0
  14. package/lib/components/query-builder/DataSpaceQueryBuilder.js.map +1 -0
  15. package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +1 -0
  16. package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.js +2 -2
  17. package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -0
  18. package/lib/components/query-builder/QueryDataSpaceUtil.d.ts.map +1 -0
  19. package/lib/components/query-builder/QueryDataSpaceUtil.js.map +1 -0
  20. package/lib/components/{query → query-builder}/index.d.ts +3 -1
  21. package/lib/components/query-builder/index.d.ts.map +1 -0
  22. package/lib/components/{query → query-builder}/index.js +3 -1
  23. package/lib/components/query-builder/index.js.map +1 -0
  24. package/lib/graph-manager/index.d.ts +1 -0
  25. package/lib/graph-manager/index.d.ts.map +1 -1
  26. package/lib/graph-manager/index.js +1 -0
  27. package/lib/graph-manager/index.js.map +1 -1
  28. package/lib/index.css +1 -1
  29. package/lib/package.json +3 -5
  30. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  31. package/lib/stores/query/DataSpaceAdvancedSearchState.js +1 -2
  32. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  33. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js +1 -1
  34. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -1
  35. package/lib/{components/query/DataSpaceQueryCreator.d.ts → stores/shared/DataSpaceUtils.d.ts} +4 -4
  36. package/lib/stores/shared/DataSpaceUtils.d.ts.map +1 -0
  37. package/lib/stores/shared/DataSpaceUtils.js +32 -0
  38. package/lib/stores/shared/DataSpaceUtils.js.map +1 -0
  39. package/package.json +4 -6
  40. package/src/__lib__/{query/DSL_DataSpace_LegendQueryNavigation.ts → to-delete/DSL_DataSpace_LegendQueryNavigation_to_delete.ts} +47 -18
  41. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +5 -5
  42. package/src/components/index.ts +11 -4
  43. package/src/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +3 -3
  44. package/src/components/{query → query-builder}/index.ts +7 -1
  45. package/src/graph-manager/index.ts +1 -0
  46. package/src/stores/query/DataSpaceAdvancedSearchState.ts +4 -2
  47. package/src/stores/query-builder/DataSpaceQueryBuilderState.ts +1 -1
  48. package/src/stores/shared/DataSpaceUtils.ts +42 -0
  49. package/tsconfig.json +7 -13
  50. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts.map +0 -1
  51. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js.map +0 -1
  52. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts +0 -29
  53. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts.map +0 -1
  54. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +0 -243
  55. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +0 -1
  56. package/lib/components/query/DataSpaceAdvancedSearchModal.d.ts.map +0 -1
  57. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +0 -1
  58. package/lib/components/query/DataSpaceQueryBuilder.d.ts.map +0 -1
  59. package/lib/components/query/DataSpaceQueryBuilder.js.map +0 -1
  60. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +0 -1
  61. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +0 -1
  62. package/lib/components/query/DataSpaceQueryCreator.d.ts.map +0 -1
  63. package/lib/components/query/DataSpaceQueryCreator.js +0 -41
  64. package/lib/components/query/DataSpaceQueryCreator.js.map +0 -1
  65. package/lib/components/query/DataSpaceQuerySetup.d.ts +0 -21
  66. package/lib/components/query/DataSpaceQuerySetup.d.ts.map +0 -1
  67. package/lib/components/query/DataSpaceQuerySetup.js +0 -63
  68. package/lib/components/query/DataSpaceQuerySetup.js.map +0 -1
  69. package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts +0 -19
  70. package/lib/components/query/DataSpaceTemplateQueryCreator.d.ts.map +0 -1
  71. package/lib/components/query/DataSpaceTemplateQueryCreator.js +0 -37
  72. package/lib/components/query/DataSpaceTemplateQueryCreator.js.map +0 -1
  73. package/lib/components/query/QueryDataSpaceUtil.d.ts.map +0 -1
  74. package/lib/components/query/QueryDataSpaceUtil.js.map +0 -1
  75. package/lib/components/query/index.d.ts.map +0 -1
  76. package/lib/components/query/index.js.map +0 -1
  77. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +0 -38
  78. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +0 -1
  79. package/lib/stores/query/DataSpaceQueryCreatorStore.js +0 -149
  80. package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +0 -1
  81. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +0 -51
  82. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +0 -1
  83. package/lib/stores/query/DataSpaceQuerySetupStore.js +0 -107
  84. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +0 -1
  85. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts +0 -35
  86. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.d.ts.map +0 -1
  87. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js +0 -108
  88. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js.map +0 -1
  89. package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +0 -445
  90. package/src/components/query/DataSpaceQueryCreator.tsx +0 -99
  91. package/src/components/query/DataSpaceQuerySetup.tsx +0 -165
  92. package/src/components/query/DataSpaceTemplateQueryCreator.tsx +0 -82
  93. package/src/stores/query/DataSpaceQueryCreatorStore.ts +0 -308
  94. package/src/stores/query/DataSpaceQuerySetupStore.ts +0 -208
  95. package/src/stores/query/DataSpaceTemplateQueryCreatorStore.ts +0 -207
  96. /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.d.ts +0 -0
  97. /package/lib/components/{query → query-builder}/DataSpaceAdvancedSearchModal.js +0 -0
  98. /package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.d.ts +0 -0
  99. /package/lib/components/{query → query-builder}/DataSpaceQueryBuilder.js +0 -0
  100. /package/lib/components/{query → query-builder}/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts +0 -0
  101. /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.d.ts +0 -0
  102. /package/lib/components/{query → query-builder}/QueryDataSpaceUtil.js +0 -0
  103. /package/src/components/{query → query-builder}/DataSpaceAdvancedSearchModal.tsx +0 -0
  104. /package/src/components/{query → query-builder}/DataSpaceQueryBuilder.tsx +0 -0
  105. /package/src/components/{query → query-builder}/QueryDataSpaceUtil.ts +0 -0
@@ -1,208 +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 {
18
- createViewProjectHandler,
19
- createViewSDLCProjectHandler,
20
- QueryEditorStore,
21
- type QueryPersistConfiguration,
22
- } from '@finos/legend-application-query';
23
- import {
24
- DepotScope,
25
- LATEST_VERSION_ALIAS,
26
- type DepotServerClient,
27
- type StoredEntity,
28
- } from '@finos/legend-server-depot';
29
- import type { GraphManagerState, RawLambda } from '@finos/legend-graph';
30
- import { type GenericLegendApplicationStore } from '@finos/legend-application';
31
- import { action, flow, makeObservable, observable } from 'mobx';
32
- import {
33
- type QueryBuilderConfig,
34
- QueryBuilderState,
35
- } from '@finos/legend-query-builder';
36
- import type { ProjectGAVCoordinates } from '@finos/legend-storage';
37
- import {
38
- ActionState,
39
- assertErrorThrown,
40
- guaranteeNonNullable,
41
- UnsupportedOperationError,
42
- type GeneratorFn,
43
- } from '@finos/legend-shared';
44
- import {
45
- type DataSpaceInfo,
46
- extractDataSpaceInfo,
47
- } from '../shared/DataSpaceInfo.js';
48
- import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
49
- import { generateDataSpaceQueryCreatorRoute } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
50
- import { renderDataSpaceQuerySetupSetupPanelContent } from '../../components/query/DataSpaceQuerySetup.js';
51
- import { DataSpaceAdvancedSearchState } from './DataSpaceAdvancedSearchState.js';
52
-
53
- export class DataSpaceQuerySetupState extends QueryBuilderState {
54
- readonly depotServerClient: DepotServerClient;
55
- readonly loadDataSpacesState = ActionState.create();
56
- readonly onDataSpaceChange: (val: DataSpaceInfo) => void;
57
- readonly viewProject: (
58
- groupId: string,
59
- artifactId: string,
60
- versionId: string,
61
- entityPath: string | undefined,
62
- ) => void;
63
- readonly viewSDLCProject: (
64
- groupId: string,
65
- artifactId: string,
66
- entityPath: string | undefined,
67
- ) => Promise<void>;
68
-
69
- override TEMPORARY__setupPanelContentRenderer = (): React.ReactNode =>
70
- renderDataSpaceQuerySetupSetupPanelContent(this);
71
-
72
- dataSpaces: DataSpaceInfo[] = [];
73
- showRuntimeSelector = false;
74
- advancedSearchState?: DataSpaceAdvancedSearchState | undefined;
75
-
76
- constructor(
77
- applicationStore: GenericLegendApplicationStore,
78
- graphManagerState: GraphManagerState,
79
- depotServerClient: DepotServerClient,
80
- onDataSpaceChange: (val: DataSpaceInfo) => void,
81
- viewProject: (
82
- groupId: string,
83
- artifactId: string,
84
- versionId: string,
85
- entityPath: string | undefined,
86
- ) => void,
87
- viewSDLCProject: (
88
- groupId: string,
89
- artifactId: string,
90
- entityPath: string | undefined,
91
- ) => Promise<void>,
92
- config: QueryBuilderConfig | undefined,
93
- ) {
94
- super(applicationStore, graphManagerState, config);
95
-
96
- makeObservable(this, {
97
- dataSpaces: observable,
98
- advancedSearchState: observable,
99
- showAdvancedSearchPanel: action,
100
- hideAdvancedSearchPanel: action,
101
- loadDataSpaces: flow,
102
- });
103
-
104
- this.depotServerClient = depotServerClient;
105
- this.onDataSpaceChange = onDataSpaceChange;
106
- this.viewProject = viewProject;
107
- this.viewSDLCProject = viewSDLCProject;
108
- }
109
-
110
- override get isResultPanelHidden(): boolean {
111
- return true;
112
- }
113
-
114
- override get sideBarClassName(): string | undefined {
115
- return 'query-builder__setup__data-space-setup';
116
- }
117
-
118
- showAdvancedSearchPanel(): void {
119
- this.advancedSearchState = new DataSpaceAdvancedSearchState(
120
- this.applicationStore,
121
- this.graphManagerState,
122
- this.depotServerClient,
123
- {
124
- viewProject: this.viewProject,
125
- viewSDLCProject: this.viewSDLCProject,
126
- },
127
- );
128
- }
129
-
130
- hideAdvancedSearchPanel(): void {
131
- this.advancedSearchState = undefined;
132
- }
133
-
134
- *loadDataSpaces(): GeneratorFn<void> {
135
- this.loadDataSpacesState.inProgress();
136
- try {
137
- this.dataSpaces = (
138
- (yield this.depotServerClient.getEntitiesByClassifier(
139
- DATA_SPACE_ELEMENT_CLASSIFIER_PATH,
140
- {
141
- scope: DepotScope.RELEASES,
142
- },
143
- )) as StoredEntity[]
144
- ).map((storedEntity) => extractDataSpaceInfo(storedEntity, false));
145
- this.loadDataSpacesState.pass();
146
- } catch (error) {
147
- assertErrorThrown(error);
148
- this.loadDataSpacesState.fail();
149
- this.applicationStore.notificationService.notifyError(error);
150
- }
151
- }
152
- }
153
-
154
- export class DataSpaceQuerySetupStore extends QueryEditorStore {
155
- override get isViewProjectActionDisabled(): boolean {
156
- return true;
157
- }
158
-
159
- getProjectInfo(): ProjectGAVCoordinates {
160
- throw new UnsupportedOperationError();
161
- }
162
-
163
- getPersistConfiguration(
164
- lambda: RawLambda,
165
- options?: { update?: boolean | undefined },
166
- ): QueryPersistConfiguration {
167
- throw new UnsupportedOperationError();
168
- }
169
-
170
- async initializeQueryBuilderState(): Promise<QueryBuilderState> {
171
- const queryBuilderState = new DataSpaceQuerySetupState(
172
- this.applicationStore,
173
- this.graphManagerState,
174
- this.depotServerClient,
175
- (dataSpaceInfo: DataSpaceInfo) => {
176
- if (dataSpaceInfo.defaultExecutionContext) {
177
- this.applicationStore.navigationService.navigator.goToLocation(
178
- generateDataSpaceQueryCreatorRoute(
179
- guaranteeNonNullable(dataSpaceInfo.groupId),
180
- guaranteeNonNullable(dataSpaceInfo.artifactId),
181
- LATEST_VERSION_ALIAS, //always default to latest
182
- dataSpaceInfo.path,
183
- dataSpaceInfo.defaultExecutionContext,
184
- undefined,
185
- undefined,
186
- ),
187
- );
188
- } else {
189
- this.applicationStore.notificationService.notifyWarning(
190
- `Can't switch data space: default execution context not specified`,
191
- );
192
- }
193
- },
194
- createViewProjectHandler(this.applicationStore),
195
- createViewSDLCProjectHandler(
196
- this.applicationStore,
197
- this.depotServerClient,
198
- ),
199
- this.applicationStore.config.options.queryBuilderConfig,
200
- );
201
-
202
- return queryBuilderState;
203
- }
204
-
205
- override *buildGraph(): GeneratorFn<void> {
206
- // do nothing
207
- }
208
- }
@@ -1,207 +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 {
18
- extractElementNameFromPath,
19
- type Query,
20
- type RawLambda,
21
- } from '@finos/legend-graph';
22
- import {
23
- QueryEditorStore,
24
- type QueryPersistConfiguration,
25
- type LegendQueryApplicationStore,
26
- createViewProjectHandler,
27
- createViewSDLCProjectHandler,
28
- } from '@finos/legend-application-query';
29
- import {
30
- type DepotServerClient,
31
- StoreProjectData,
32
- } from '@finos/legend-server-depot';
33
- import { filterByType, guaranteeNonNullable, uuid } from '@finos/legend-shared';
34
-
35
- import { getDataSpace } from '../../graph-manager/DSL_DataSpace_GraphManagerHelper.js';
36
- import {
37
- DataSpaceQueryBuilderState,
38
- DataSpaceProjectInfo,
39
- } from '../query-builder/DataSpaceQueryBuilderState.js';
40
- import type { DataSpaceInfo } from '../shared/DataSpaceInfo.js';
41
- import { generateDataSpaceTemplateQueryCreatorRoute } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
42
- import {
43
- DataSpaceExecutableTemplate,
44
- type DataSpaceExecutionContext,
45
- } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
46
- import type { QueryBuilderState } from '@finos/legend-query-builder';
47
- import type { ProjectGAVCoordinates } from '@finos/legend-storage';
48
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
49
- import { retrieveAnalyticsResultCache } from '../../graph-manager/action/analytics/DataSpaceAnalysisHelper.js';
50
- import {
51
- createQueryDataSpaceTaggedValue,
52
- createQueryClassTaggedValue,
53
- } from './DataSpaceQueryCreatorStore.js';
54
-
55
- export class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
56
- readonly groupId: string;
57
- readonly artifactId: string;
58
- readonly versionId: string;
59
- readonly dataSpacePath: string;
60
- readonly templateQueryId: string;
61
- templateQueryTitle?: string;
62
-
63
- constructor(
64
- applicationStore: LegendQueryApplicationStore,
65
- depotServerClient: DepotServerClient,
66
- groupId: string,
67
- artifactId: string,
68
- versionId: string,
69
- dataSpacePath: string,
70
- templateQueryId: string,
71
- ) {
72
- super(applicationStore, depotServerClient);
73
-
74
- this.groupId = groupId;
75
- this.artifactId = artifactId;
76
- this.versionId = versionId;
77
- this.dataSpacePath = dataSpacePath;
78
- this.templateQueryId = templateQueryId;
79
- }
80
-
81
- getProjectInfo(): ProjectGAVCoordinates {
82
- return {
83
- groupId: this.groupId,
84
- artifactId: this.artifactId,
85
- versionId: this.versionId,
86
- };
87
- }
88
-
89
- async initializeQueryBuilderState(): Promise<QueryBuilderState> {
90
- const dataSpace = getDataSpace(
91
- this.dataSpacePath,
92
- this.graphManagerState.graph,
93
- );
94
- const dataSpaceExecutableTemplate = guaranteeNonNullable(
95
- dataSpace.executables
96
- ?.filter(filterByType(DataSpaceExecutableTemplate))
97
- .find((executable) => executable.id === this.templateQueryId),
98
- `Can't find template query with id '${this.templateQueryId}'`,
99
- );
100
- const executionContext = guaranteeNonNullable(
101
- dataSpaceExecutableTemplate.executionContextKey
102
- ? dataSpace.executionContexts.filter(
103
- (ec) => ec.name === dataSpaceExecutableTemplate.executionContextKey,
104
- )[0]
105
- : dataSpace.defaultExecutionContext,
106
- `Can't find execution context '${dataSpaceExecutableTemplate.executionContextKey}'`,
107
- );
108
- this.templateQueryTitle = dataSpaceExecutableTemplate.title;
109
- let dataSpaceAnalysisResult;
110
- try {
111
- const project = StoreProjectData.serialization.fromJson(
112
- await this.depotServerClient.getProject(this.groupId, this.artifactId),
113
- );
114
- dataSpaceAnalysisResult = await DSL_DataSpace_getGraphManagerExtension(
115
- this.graphManagerState.graphManager,
116
- ).retrieveDataSpaceAnalysisFromCache(() =>
117
- retrieveAnalyticsResultCache(
118
- project,
119
- this.versionId,
120
- dataSpace.path,
121
- this.depotServerClient,
122
- ),
123
- );
124
- } catch {
125
- // do nothing
126
- }
127
- const projectInfo = new DataSpaceProjectInfo(
128
- this.groupId,
129
- this.artifactId,
130
- this.versionId,
131
- createViewProjectHandler(this.applicationStore),
132
- createViewSDLCProjectHandler(
133
- this.applicationStore,
134
- this.depotServerClient,
135
- ),
136
- );
137
- const sourceInfo = {
138
- groupId: projectInfo.groupId,
139
- artifactId: projectInfo.artifactId,
140
- versionId: projectInfo.versionId,
141
- dataSpace: dataSpace.path,
142
- };
143
- const queryBuilderState = new DataSpaceQueryBuilderState(
144
- this.applicationStore,
145
- this.graphManagerState,
146
- this.depotServerClient,
147
- dataSpace,
148
- executionContext,
149
- (dataSpaceInfo: DataSpaceInfo) => {
150
- this.applicationStore.notificationService.notifyWarning(
151
- `Can't switch data space to visit current template query`,
152
- );
153
- },
154
- true,
155
- dataSpaceAnalysisResult,
156
- (ec: DataSpaceExecutionContext) => {
157
- this.applicationStore.navigationService.navigator.updateCurrentLocation(
158
- generateDataSpaceTemplateQueryCreatorRoute(
159
- this.groupId,
160
- this.artifactId,
161
- this.versionId,
162
- dataSpace.path,
163
- this.templateQueryId,
164
- ),
165
- );
166
- },
167
- undefined,
168
- undefined,
169
- projectInfo,
170
- this.applicationStore.config.options.queryBuilderConfig,
171
- sourceInfo,
172
- );
173
- queryBuilderState.setExecutionContext(executionContext);
174
- queryBuilderState.propagateExecutionContextChange(executionContext);
175
- queryBuilderState.initializeWithQuery(dataSpaceExecutableTemplate.query);
176
- return queryBuilderState;
177
- }
178
-
179
- getPersistConfiguration(
180
- lambda: RawLambda,
181
- options?: { update?: boolean | undefined },
182
- ): QueryPersistConfiguration {
183
- return {
184
- defaultName: options?.update
185
- ? `${extractElementNameFromPath(this.dataSpacePath)}`
186
- : `New Query for ${extractElementNameFromPath(this.dataSpacePath)}[${
187
- this.templateQueryId
188
- }]`,
189
- decorator: (query: Query): void => {
190
- query.id = uuid();
191
- query.groupId = this.groupId;
192
- query.artifactId = this.artifactId;
193
- query.versionId = this.versionId;
194
- if (this.queryBuilderState?.class) {
195
- query.taggedValues = [
196
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
197
- createQueryClassTaggedValue(this.queryBuilderState.class.path),
198
- ];
199
- } else {
200
- query.taggedValues = [
201
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
202
- ];
203
- }
204
- },
205
- };
206
- }
207
- }