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

Sign up to get free protection for your applications and to get access to all the features.
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,107 +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
- import { createViewProjectHandler, createViewSDLCProjectHandler, QueryEditorStore, } from '@finos/legend-application-query';
17
- import { DepotScope, LATEST_VERSION_ALIAS, } from '@finos/legend-server-depot';
18
- import {} from '@finos/legend-application';
19
- import { action, flow, makeObservable, observable } from 'mobx';
20
- import { QueryBuilderState, } from '@finos/legend-query-builder';
21
- import { ActionState, assertErrorThrown, guaranteeNonNullable, UnsupportedOperationError, } from '@finos/legend-shared';
22
- import { extractDataSpaceInfo, } from '../shared/DataSpaceInfo.js';
23
- import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js';
24
- import { generateDataSpaceQueryCreatorRoute } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
25
- import { renderDataSpaceQuerySetupSetupPanelContent } from '../../components/query/DataSpaceQuerySetup.js';
26
- import { DataSpaceAdvancedSearchState } from './DataSpaceAdvancedSearchState.js';
27
- export class DataSpaceQuerySetupState extends QueryBuilderState {
28
- depotServerClient;
29
- loadDataSpacesState = ActionState.create();
30
- onDataSpaceChange;
31
- viewProject;
32
- viewSDLCProject;
33
- TEMPORARY__setupPanelContentRenderer = () => renderDataSpaceQuerySetupSetupPanelContent(this);
34
- dataSpaces = [];
35
- showRuntimeSelector = false;
36
- advancedSearchState;
37
- constructor(applicationStore, graphManagerState, depotServerClient, onDataSpaceChange, viewProject, viewSDLCProject, config) {
38
- super(applicationStore, graphManagerState, config);
39
- makeObservable(this, {
40
- dataSpaces: observable,
41
- advancedSearchState: observable,
42
- showAdvancedSearchPanel: action,
43
- hideAdvancedSearchPanel: action,
44
- loadDataSpaces: flow,
45
- });
46
- this.depotServerClient = depotServerClient;
47
- this.onDataSpaceChange = onDataSpaceChange;
48
- this.viewProject = viewProject;
49
- this.viewSDLCProject = viewSDLCProject;
50
- }
51
- get isResultPanelHidden() {
52
- return true;
53
- }
54
- get sideBarClassName() {
55
- return 'query-builder__setup__data-space-setup';
56
- }
57
- showAdvancedSearchPanel() {
58
- this.advancedSearchState = new DataSpaceAdvancedSearchState(this.applicationStore, this.graphManagerState, this.depotServerClient, {
59
- viewProject: this.viewProject,
60
- viewSDLCProject: this.viewSDLCProject,
61
- });
62
- }
63
- hideAdvancedSearchPanel() {
64
- this.advancedSearchState = undefined;
65
- }
66
- *loadDataSpaces() {
67
- this.loadDataSpacesState.inProgress();
68
- try {
69
- this.dataSpaces = (yield this.depotServerClient.getEntitiesByClassifier(DATA_SPACE_ELEMENT_CLASSIFIER_PATH, {
70
- scope: DepotScope.RELEASES,
71
- })).map((storedEntity) => extractDataSpaceInfo(storedEntity, false));
72
- this.loadDataSpacesState.pass();
73
- }
74
- catch (error) {
75
- assertErrorThrown(error);
76
- this.loadDataSpacesState.fail();
77
- this.applicationStore.notificationService.notifyError(error);
78
- }
79
- }
80
- }
81
- export class DataSpaceQuerySetupStore extends QueryEditorStore {
82
- get isViewProjectActionDisabled() {
83
- return true;
84
- }
85
- getProjectInfo() {
86
- throw new UnsupportedOperationError();
87
- }
88
- getPersistConfiguration(lambda, options) {
89
- throw new UnsupportedOperationError();
90
- }
91
- async initializeQueryBuilderState() {
92
- const queryBuilderState = new DataSpaceQuerySetupState(this.applicationStore, this.graphManagerState, this.depotServerClient, (dataSpaceInfo) => {
93
- if (dataSpaceInfo.defaultExecutionContext) {
94
- this.applicationStore.navigationService.navigator.goToLocation(generateDataSpaceQueryCreatorRoute(guaranteeNonNullable(dataSpaceInfo.groupId), guaranteeNonNullable(dataSpaceInfo.artifactId), LATEST_VERSION_ALIAS, //always default to latest
95
- dataSpaceInfo.path, dataSpaceInfo.defaultExecutionContext, undefined, undefined));
96
- }
97
- else {
98
- this.applicationStore.notificationService.notifyWarning(`Can't switch data space: default execution context not specified`);
99
- }
100
- }, createViewProjectHandler(this.applicationStore), createViewSDLCProjectHandler(this.applicationStore, this.depotServerClient), this.applicationStore.config.options.queryBuilderConfig);
101
- return queryBuilderState;
102
- }
103
- *buildGraph() {
104
- // do nothing
105
- }
106
- }
107
- //# sourceMappingURL=DataSpaceQuerySetupStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceQuerySetupStore.js","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,GAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,UAAU,EACV,oBAAoB,GAGrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAsC,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAEL,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,GAE1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AACpI,OAAO,EAAE,kCAAkC,EAAE,MAAM,4DAA4D,CAAC;AAChH,OAAO,EAAE,0CAA0C,EAAE,MAAM,+CAA+C,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;A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,CAAC,aAAa,CAAC,OAAO,CAAC,EAC3C,oBAAoB,CAAC,aAAa,CAAC,UAAU,CAAC,EAC9C,oBAAoB,EAAE,0BAA0B;gBAChD,aAAa,CAAC,IAAI,EAClB,aAAa,CAAC,uBAAuB,EACrC,SAAS,EACT,SAAS,CACV,CACF,CAAC;aACH;iBAAM;gBACL,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CACrD,kEAAkE,CACnE,CAAC;aACH;QACH,CAAC,EACD,wBAAwB,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAC/C,4BAA4B,CAC1B,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,iBAAiB,CACvB,EACD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CACxD,CAAC;QAEF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAEQ,CAAC,UAAU;QAClB,aAAa;IACf,CAAC;CACF"}
@@ -1,35 +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
- import { type RawLambda } from '@finos/legend-graph';
17
- import { QueryEditorStore, type QueryPersistConfiguration, type LegendQueryApplicationStore } from '@finos/legend-application-query';
18
- import { type DepotServerClient } from '@finos/legend-server-depot';
19
- import type { QueryBuilderState } from '@finos/legend-query-builder';
20
- import type { ProjectGAVCoordinates } from '@finos/legend-storage';
21
- export declare class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
22
- readonly groupId: string;
23
- readonly artifactId: string;
24
- readonly versionId: string;
25
- readonly dataSpacePath: string;
26
- readonly templateQueryId: string;
27
- templateQueryTitle?: string;
28
- constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient, groupId: string, artifactId: string, versionId: string, dataSpacePath: string, templateQueryId: string);
29
- getProjectInfo(): ProjectGAVCoordinates;
30
- initializeQueryBuilderState(): Promise<QueryBuilderState>;
31
- getPersistConfiguration(lambda: RawLambda, options?: {
32
- update?: boolean | undefined;
33
- }): QueryPersistConfiguration;
34
- }
35
- //# sourceMappingURL=DataSpaceTemplateQueryCreatorStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceTemplateQueryCreatorStore.d.ts","sourceRoot":"","sources":["../../../src/stores/query/DataSpaceTemplateQueryCreatorStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAGjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAQnE,qBAAa,kCAAmC,SAAQ,gBAAgB;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;gBAG1B,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM;IAWzB,cAAc,IAAI,qBAAqB;IAQjC,2BAA2B,IAAI,OAAO,CAAC,iBAAiB,CAAC;IA0F/D,uBAAuB,CACrB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GACzC,yBAAyB;CAyB7B"}
@@ -1,108 +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
- import { extractElementNameFromPath, } from '@finos/legend-graph';
17
- import { QueryEditorStore, createViewProjectHandler, createViewSDLCProjectHandler, } from '@finos/legend-application-query';
18
- import { StoreProjectData, } from '@finos/legend-server-depot';
19
- import { filterByType, guaranteeNonNullable, uuid } from '@finos/legend-shared';
20
- import { getDataSpace } from '../../graph-manager/DSL_DataSpace_GraphManagerHelper.js';
21
- import { DataSpaceQueryBuilderState, DataSpaceProjectInfo, } from '../query-builder/DataSpaceQueryBuilderState.js';
22
- import { generateDataSpaceTemplateQueryCreatorRoute } from '../../__lib__/query/DSL_DataSpace_LegendQueryNavigation.js';
23
- import { DataSpaceExecutableTemplate, } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
24
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
25
- import { retrieveAnalyticsResultCache } from '../../graph-manager/action/analytics/DataSpaceAnalysisHelper.js';
26
- import { createQueryDataSpaceTaggedValue, createQueryClassTaggedValue, } from './DataSpaceQueryCreatorStore.js';
27
- export class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
28
- groupId;
29
- artifactId;
30
- versionId;
31
- dataSpacePath;
32
- templateQueryId;
33
- templateQueryTitle;
34
- constructor(applicationStore, depotServerClient, groupId, artifactId, versionId, dataSpacePath, templateQueryId) {
35
- super(applicationStore, depotServerClient);
36
- this.groupId = groupId;
37
- this.artifactId = artifactId;
38
- this.versionId = versionId;
39
- this.dataSpacePath = dataSpacePath;
40
- this.templateQueryId = templateQueryId;
41
- }
42
- getProjectInfo() {
43
- return {
44
- groupId: this.groupId,
45
- artifactId: this.artifactId,
46
- versionId: this.versionId,
47
- };
48
- }
49
- async initializeQueryBuilderState() {
50
- const dataSpace = getDataSpace(this.dataSpacePath, this.graphManagerState.graph);
51
- const dataSpaceExecutableTemplate = guaranteeNonNullable(dataSpace.executables
52
- ?.filter(filterByType(DataSpaceExecutableTemplate))
53
- .find((executable) => executable.id === this.templateQueryId), `Can't find template query with id '${this.templateQueryId}'`);
54
- const executionContext = guaranteeNonNullable(dataSpaceExecutableTemplate.executionContextKey
55
- ? dataSpace.executionContexts.filter((ec) => ec.name === dataSpaceExecutableTemplate.executionContextKey)[0]
56
- : dataSpace.defaultExecutionContext, `Can't find execution context '${dataSpaceExecutableTemplate.executionContextKey}'`);
57
- this.templateQueryTitle = dataSpaceExecutableTemplate.title;
58
- let dataSpaceAnalysisResult;
59
- try {
60
- const project = StoreProjectData.serialization.fromJson(await this.depotServerClient.getProject(this.groupId, this.artifactId));
61
- dataSpaceAnalysisResult = await DSL_DataSpace_getGraphManagerExtension(this.graphManagerState.graphManager).retrieveDataSpaceAnalysisFromCache(() => retrieveAnalyticsResultCache(project, this.versionId, dataSpace.path, this.depotServerClient));
62
- }
63
- catch {
64
- // do nothing
65
- }
66
- const projectInfo = new DataSpaceProjectInfo(this.groupId, this.artifactId, this.versionId, createViewProjectHandler(this.applicationStore), createViewSDLCProjectHandler(this.applicationStore, this.depotServerClient));
67
- const sourceInfo = {
68
- groupId: projectInfo.groupId,
69
- artifactId: projectInfo.artifactId,
70
- versionId: projectInfo.versionId,
71
- dataSpace: dataSpace.path,
72
- };
73
- const queryBuilderState = new DataSpaceQueryBuilderState(this.applicationStore, this.graphManagerState, this.depotServerClient, dataSpace, executionContext, (dataSpaceInfo) => {
74
- this.applicationStore.notificationService.notifyWarning(`Can't switch data space to visit current template query`);
75
- }, true, dataSpaceAnalysisResult, (ec) => {
76
- this.applicationStore.navigationService.navigator.updateCurrentLocation(generateDataSpaceTemplateQueryCreatorRoute(this.groupId, this.artifactId, this.versionId, dataSpace.path, this.templateQueryId));
77
- }, undefined, undefined, projectInfo, this.applicationStore.config.options.queryBuilderConfig, sourceInfo);
78
- queryBuilderState.setExecutionContext(executionContext);
79
- queryBuilderState.propagateExecutionContextChange(executionContext);
80
- queryBuilderState.initializeWithQuery(dataSpaceExecutableTemplate.query);
81
- return queryBuilderState;
82
- }
83
- getPersistConfiguration(lambda, options) {
84
- return {
85
- defaultName: options?.update
86
- ? `${extractElementNameFromPath(this.dataSpacePath)}`
87
- : `New Query for ${extractElementNameFromPath(this.dataSpacePath)}[${this.templateQueryId}]`,
88
- decorator: (query) => {
89
- query.id = uuid();
90
- query.groupId = this.groupId;
91
- query.artifactId = this.artifactId;
92
- query.versionId = this.versionId;
93
- if (this.queryBuilderState?.class) {
94
- query.taggedValues = [
95
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
96
- createQueryClassTaggedValue(this.queryBuilderState.class.path),
97
- ];
98
- }
99
- else {
100
- query.taggedValues = [
101
- createQueryDataSpaceTaggedValue(this.dataSpacePath),
102
- ];
103
- }
104
- },
105
- };
106
- }
107
- }
108
- //# sourceMappingURL=DataSpaceTemplateQueryCreatorStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceTemplateQueryCreatorStore.js","sourceRoot":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