@finos/legend-application-query 8.1.2 → 9.0.0
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.
- package/lib/application/LegendQuery.d.ts.map +1 -1
- package/lib/application/LegendQuery.js +7 -9
- package/lib/application/LegendQuery.js.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.d.ts +4 -0
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.js +4 -0
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
- package/lib/components/{QuerySetupStoreProvider.d.ts → CloneQueryServiceSetup.d.ts} +2 -7
- package/lib/components/CloneQueryServiceSetup.d.ts.map +1 -0
- package/lib/components/CloneQueryServiceSetup.js +137 -0
- package/lib/components/CloneQueryServiceSetup.js.map +1 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts +24 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.js +144 -0
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -0
- package/lib/components/CreateMappingQuerySetup.d.ts +18 -0
- package/lib/components/CreateMappingQuerySetup.d.ts.map +1 -0
- package/lib/components/CreateMappingQuerySetup.js +160 -0
- package/lib/components/CreateMappingQuerySetup.js.map +1 -0
- package/lib/components/EditExistingQuerySetup.d.ts +18 -0
- package/lib/components/EditExistingQuerySetup.d.ts.map +1 -0
- package/lib/components/EditExistingQuerySetup.js +107 -0
- package/lib/components/EditExistingQuerySetup.js.map +1 -0
- package/lib/components/LegendQueryApplication.d.ts.map +1 -1
- package/lib/components/LegendQueryApplication.js +4 -2
- package/lib/components/LegendQueryApplication.js.map +1 -1
- package/lib/components/LoadProjectServiceQuerySetup.d.ts +18 -0
- package/lib/components/LoadProjectServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/LoadProjectServiceQuerySetup.js +63 -0
- package/lib/components/LoadProjectServiceQuerySetup.js.map +1 -0
- package/lib/components/QueryEditor.d.ts.map +1 -1
- package/lib/components/QueryEditor.js +31 -33
- package/lib/components/QueryEditor.js.map +1 -1
- package/lib/components/QueryProductionizerSetup.d.ts +18 -0
- package/lib/components/QueryProductionizerSetup.d.ts.map +1 -0
- package/lib/components/QueryProductionizerSetup.js +85 -0
- package/lib/components/QueryProductionizerSetup.js.map +1 -0
- package/lib/components/QuerySetup.d.ts +20 -5
- package/lib/components/QuerySetup.d.ts.map +1 -1
- package/lib/components/QuerySetup.js +69 -473
- package/lib/components/QuerySetup.js.map +1 -1
- package/lib/components/UpdateExistingServiceQuerySetup.d.ts +18 -0
- package/lib/components/UpdateExistingServiceQuerySetup.d.ts.map +1 -0
- package/lib/components/UpdateExistingServiceQuerySetup.js +69 -0
- package/lib/components/UpdateExistingServiceQuerySetup.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +5 -8
- package/lib/stores/CloneServiceQuerySetupStore.d.ts +41 -0
- package/lib/stores/CloneServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/CloneServiceQuerySetupStore.js +98 -0
- package/lib/stores/CloneServiceQuerySetupStore.js.map +1 -0
- package/lib/stores/CreateMappingQuerySetupStore.d.ts +40 -0
- package/lib/stores/CreateMappingQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/CreateMappingQuerySetupStore.js +97 -0
- package/lib/stores/CreateMappingQuerySetupStore.js.map +1 -0
- package/lib/stores/EditExistingQuerySetupStore.d.ts +33 -0
- package/lib/stores/EditExistingQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/EditExistingQuerySetupStore.js +85 -0
- package/lib/stores/EditExistingQuerySetupStore.js.map +1 -0
- package/lib/stores/LegendQueryApplicationPlugin.d.ts +21 -16
- package/lib/stores/LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendQueryApplicationPlugin.js +4 -0
- package/lib/stores/LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/stores/LegendQueryRouter.d.ts +28 -1
- package/lib/stores/LegendQueryRouter.d.ts.map +1 -1
- package/lib/stores/LegendQueryRouter.js +33 -3
- package/lib/stores/LegendQueryRouter.js.map +1 -1
- package/lib/stores/LoadProjectServiceQuerySetupStore.d.ts +27 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.js +61 -0
- package/lib/stores/LoadProjectServiceQuerySetupStore.js.map +1 -0
- package/lib/stores/QueryEditorStore.d.ts +6 -2
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +35 -17
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/QueryEditorStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/QueryEditorStoreTestUtils.js +3 -0
- package/lib/stores/QueryEditorStoreTestUtils.js.map +1 -1
- package/lib/stores/QueryProductionizerSetupStore.d.ts +32 -0
- package/lib/stores/QueryProductionizerSetupStore.d.ts.map +1 -0
- package/lib/stores/QueryProductionizerSetupStore.js +101 -0
- package/lib/stores/QueryProductionizerSetupStore.js.map +1 -0
- package/lib/stores/QuerySetupStore.d.ts +22 -85
- package/lib/stores/QuerySetupStore.d.ts.map +1 -1
- package/lib/stores/QuerySetupStore.js +78 -408
- package/lib/stores/QuerySetupStore.js.map +1 -1
- package/lib/stores/UpdateExistingServiceQuerySetupStore.d.ts +28 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.d.ts.map +1 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js +73 -0
- package/lib/stores/UpdateExistingServiceQuerySetupStore.js.map +1 -0
- package/package.json +13 -16
- package/src/application/LegendQuery.tsx +7 -8
- package/src/application/LegendQueryApplicationConfig.ts +14 -0
- package/src/components/CloneQueryServiceSetup.tsx +312 -0
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +184 -0
- package/src/components/CreateMappingQuerySetup.tsx +352 -0
- package/src/components/EditExistingQuerySetup.tsx +280 -0
- package/src/components/LegendQueryApplication.tsx +14 -2
- package/src/components/LoadProjectServiceQuerySetup.tsx +131 -0
- package/src/components/QueryEditor.tsx +127 -81
- package/src/components/QueryProductionizerSetup.tsx +206 -0
- package/src/components/QuerySetup.tsx +285 -1183
- package/src/components/UpdateExistingServiceQuerySetup.tsx +153 -0
- package/src/index.ts +3 -2
- package/src/stores/CloneServiceQuerySetupStore.ts +151 -0
- package/src/stores/CreateMappingQuerySetupStore.ts +155 -0
- package/src/stores/EditExistingQuerySetupStore.ts +111 -0
- package/src/stores/LegendQueryApplicationPlugin.ts +27 -27
- package/src/stores/LegendQueryRouter.ts +95 -12
- package/src/stores/LoadProjectServiceQuerySetupStore.ts +87 -0
- package/src/stores/QueryEditorStore.ts +90 -24
- package/src/stores/QueryEditorStoreTestUtils.ts +3 -0
- package/src/stores/QueryProductionizerSetupStore.ts +143 -0
- package/src/stores/QuerySetupStore.ts +111 -604
- package/src/stores/UpdateExistingServiceQuerySetupStore.ts +118 -0
- package/tsconfig.json +13 -1
- package/lib/components/QuerySetupStoreProvider.d.ts.map +0 -1
- package/lib/components/QuerySetupStoreProvider.js +0 -34
- package/lib/components/QuerySetupStoreProvider.js.map +0 -1
- package/src/components/QuerySetupStoreProvider.tsx +0 -56
@@ -0,0 +1,97 @@
|
|
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 { getQueryBuilderGraphManagerExtension, } from '@finos/legend-query-builder';
|
17
|
+
import { ProjectData, } from '@finos/legend-server-depot';
|
18
|
+
import { ActionState, assertErrorThrown, LogEvent, } from '@finos/legend-shared';
|
19
|
+
import { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';
|
20
|
+
import { LEGEND_QUERY_APP_EVENT } from '../LegendQueryAppEvent.js';
|
21
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
22
|
+
export class CreateMappingQuerySetupStore extends BaseQuerySetupStore {
|
23
|
+
loadProjectsState = ActionState.create();
|
24
|
+
surveyMappingRuntimeCompatibilityState = ActionState.create();
|
25
|
+
projects = [];
|
26
|
+
currentProject;
|
27
|
+
currentVersionId;
|
28
|
+
currentMapping;
|
29
|
+
currentRuntime;
|
30
|
+
mappingRuntimeCompatibilitySurveyResult = [];
|
31
|
+
constructor(applicationStore, depotServerClient) {
|
32
|
+
super(applicationStore, depotServerClient);
|
33
|
+
makeObservable(this, {
|
34
|
+
projects: observable,
|
35
|
+
currentProject: observable,
|
36
|
+
currentVersionId: observable,
|
37
|
+
currentMapping: observable,
|
38
|
+
currentRuntime: observable,
|
39
|
+
mappingRuntimeCompatibilitySurveyResult: observable,
|
40
|
+
compatibleRuntimes: computed,
|
41
|
+
setCurrentProject: action,
|
42
|
+
setCurrentVersionId: action,
|
43
|
+
setCurrentMapping: action,
|
44
|
+
setCurrentRuntime: action,
|
45
|
+
loadProjects: flow,
|
46
|
+
surveyMappingRuntimeCompatibility: flow,
|
47
|
+
});
|
48
|
+
}
|
49
|
+
setCurrentProject(val) {
|
50
|
+
this.currentProject = val;
|
51
|
+
}
|
52
|
+
setCurrentVersionId(val) {
|
53
|
+
this.currentVersionId = val;
|
54
|
+
}
|
55
|
+
setCurrentMapping(val) {
|
56
|
+
this.currentMapping = val;
|
57
|
+
}
|
58
|
+
setCurrentRuntime(val) {
|
59
|
+
this.currentRuntime = val;
|
60
|
+
}
|
61
|
+
get compatibleRuntimes() {
|
62
|
+
const currentMapping = this.currentMapping;
|
63
|
+
if (!currentMapping) {
|
64
|
+
return [];
|
65
|
+
}
|
66
|
+
return (this.mappingRuntimeCompatibilitySurveyResult.find((result) => result.mapping === currentMapping)?.runtimes ?? []);
|
67
|
+
}
|
68
|
+
*loadProjects() {
|
69
|
+
this.loadProjectsState.inProgress();
|
70
|
+
try {
|
71
|
+
this.projects = (yield this.depotServerClient.getProjects()).map((v) => ProjectData.serialization.fromJson(v));
|
72
|
+
this.loadProjectsState.pass();
|
73
|
+
}
|
74
|
+
catch (error) {
|
75
|
+
assertErrorThrown(error);
|
76
|
+
this.applicationStore.notifyError(error);
|
77
|
+
this.loadProjectsState.fail();
|
78
|
+
}
|
79
|
+
}
|
80
|
+
*surveyMappingRuntimeCompatibility(project, versionId) {
|
81
|
+
this.surveyMappingRuntimeCompatibilityState.inProgress();
|
82
|
+
try {
|
83
|
+
// fetch entities and dependencies
|
84
|
+
const entities = (yield this.depotServerClient.getEntities(project, versionId));
|
85
|
+
const dependencyEntitiesIndex = (yield flowResult(this.depotServerClient.getIndexedDependencyEntities(project, versionId)));
|
86
|
+
this.mappingRuntimeCompatibilitySurveyResult = (yield flowResult(getQueryBuilderGraphManagerExtension(this.graphManagerState.graphManager).surveyMappingRuntimeCompatibility(entities, dependencyEntitiesIndex)));
|
87
|
+
this.surveyMappingRuntimeCompatibilityState.pass();
|
88
|
+
}
|
89
|
+
catch (error) {
|
90
|
+
assertErrorThrown(error);
|
91
|
+
this.applicationStore.log.error(LogEvent.create(LEGEND_QUERY_APP_EVENT.GENERIC_FAILURE), error);
|
92
|
+
this.applicationStore.notifyError(error);
|
93
|
+
this.surveyMappingRuntimeCompatibilityState.fail();
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
//# sourceMappingURL=CreateMappingQuerySetupStore.js.map
|
@@ -0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AAC;IAED,CAAC,iCAAiC,CAChC,OAAoB,EACpB,SAAiB;QAEjB,IAAI,CAAC,sCAAsC,CAAC,UAAU,EAAE,CAAC;QACzD,IAAI;YACF,kCAAkC;YAClC,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACxD,OAAO,EACP,SAAS,CACV,CAAa,CAAC;YACf,MAAM,uBAAuB,GAAG,CAAC,MAAM,UAAU,CAC/C,IAAI,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,OAAO,EAAE,SAAS,CAAC,CACxE,CAA0B,CAAC;YAE5B,IAAI,CAAC,uCAAuC,GAAG,CAAC,MAAM,UAAU,CAC9D,oCAAoC,CAClC,IAAI,CAAC,iBAAiB,CAAC,YAAY,CACpC,CAAC,iCAAiC,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CACvE,CAAgD,CAAC;YAElD,IAAI,CAAC,sCAAsC,CAAC,IAAI,EAAE,CAAC;SACpD;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAC7B,QAAQ,CAAC,MAAM,CAAC,sBAAsB,CAAC,eAAe,CAAC,EACvD,KAAK,CACN,CAAC;YACF,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,sCAAsC,CAAC,IAAI,EAAE,CAAC;SACpD;IACH,CAAC;CACF"}
|
@@ -0,0 +1,33 @@
|
|
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 LightQuery, type QueryInfo } from '@finos/legend-graph';
|
17
|
+
import type { DepotServerClient } from '@finos/legend-server-depot';
|
18
|
+
import { ActionState, type GeneratorFn } from '@finos/legend-shared';
|
19
|
+
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
20
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
21
|
+
export declare class EditExistingQuerySetupStore extends BaseQuerySetupStore {
|
22
|
+
readonly loadQueriesState: ActionState;
|
23
|
+
readonly loadQueryState: ActionState;
|
24
|
+
queries: LightQuery[];
|
25
|
+
currentQuery?: LightQuery | undefined;
|
26
|
+
currentQueryInfo?: QueryInfo | undefined;
|
27
|
+
showCurrentUserQueriesOnly: boolean;
|
28
|
+
constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient);
|
29
|
+
setShowCurrentUserQueriesOnly(val: boolean): void;
|
30
|
+
setCurrentQuery(queryId: string | undefined): GeneratorFn<void>;
|
31
|
+
loadQueries(searchText: string): GeneratorFn<void>;
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=EditExistingQuerySetupStore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EditExistingQuerySetupStore.d.ts","sourceRoot":"","sources":["../../src/stores/EditExistingQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,WAAW,EAEX,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,2BAA4B,SAAQ,mBAAmB;IAClE,QAAQ,CAAC,gBAAgB,cAAwB;IACjD,QAAQ,CAAC,cAAc,cAAwB;IAE/C,OAAO,EAAE,UAAU,EAAE,CAAM;IAC3B,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACzC,0BAA0B,UAAS;gBAGjC,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB;IAetC,6BAA6B,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIhD,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;IAuB/D,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;CAsBpD"}
|
@@ -0,0 +1,85 @@
|
|
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 { DEFAULT_TYPEAHEAD_SEARCH_LIMIT, DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH, } from '@finos/legend-application';
|
17
|
+
import { QuerySearchSpecification, } from '@finos/legend-graph';
|
18
|
+
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
19
|
+
import { action, flow, makeObservable, observable } from 'mobx';
|
20
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
21
|
+
export class EditExistingQuerySetupStore extends BaseQuerySetupStore {
|
22
|
+
loadQueriesState = ActionState.create();
|
23
|
+
loadQueryState = ActionState.create();
|
24
|
+
queries = [];
|
25
|
+
currentQuery;
|
26
|
+
currentQueryInfo;
|
27
|
+
showCurrentUserQueriesOnly = false;
|
28
|
+
constructor(applicationStore, depotServerClient) {
|
29
|
+
super(applicationStore, depotServerClient);
|
30
|
+
makeObservable(this, {
|
31
|
+
queries: observable,
|
32
|
+
currentQuery: observable,
|
33
|
+
currentQueryInfo: observable,
|
34
|
+
showCurrentUserQueriesOnly: observable,
|
35
|
+
setShowCurrentUserQueriesOnly: action,
|
36
|
+
setCurrentQuery: flow,
|
37
|
+
loadQueries: flow,
|
38
|
+
});
|
39
|
+
}
|
40
|
+
setShowCurrentUserQueriesOnly(val) {
|
41
|
+
this.showCurrentUserQueriesOnly = val;
|
42
|
+
}
|
43
|
+
*setCurrentQuery(queryId) {
|
44
|
+
if (queryId) {
|
45
|
+
try {
|
46
|
+
this.loadQueryState.inProgress();
|
47
|
+
this.currentQuery =
|
48
|
+
(yield this.graphManagerState.graphManager.getLightQuery(queryId));
|
49
|
+
this.currentQueryInfo =
|
50
|
+
(yield this.graphManagerState.graphManager.getQueryInfo(queryId));
|
51
|
+
}
|
52
|
+
catch (error) {
|
53
|
+
assertErrorThrown(error);
|
54
|
+
this.applicationStore.notifyError(error);
|
55
|
+
}
|
56
|
+
finally {
|
57
|
+
this.loadQueryState.reset();
|
58
|
+
}
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
this.currentQuery = undefined;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
*loadQueries(searchText) {
|
65
|
+
const isValidSearchString = searchText.length >= DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH;
|
66
|
+
this.loadQueriesState.inProgress();
|
67
|
+
try {
|
68
|
+
const searchSpecification = new QuerySearchSpecification();
|
69
|
+
searchSpecification.searchTerm = isValidSearchString
|
70
|
+
? searchText
|
71
|
+
: undefined;
|
72
|
+
searchSpecification.limit = DEFAULT_TYPEAHEAD_SEARCH_LIMIT;
|
73
|
+
searchSpecification.showCurrentUserQueriesOnly =
|
74
|
+
this.showCurrentUserQueriesOnly;
|
75
|
+
this.queries = (yield this.graphManagerState.graphManager.searchQueries(searchSpecification));
|
76
|
+
this.loadQueriesState.pass();
|
77
|
+
}
|
78
|
+
catch (error) {
|
79
|
+
assertErrorThrown(error);
|
80
|
+
this.applicationStore.notifyError(error);
|
81
|
+
this.loadQueriesState.fail();
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
//# sourceMappingURL=EditExistingQuerySetupStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EditExistingQuerySetupStore.js","sourceRoot":"","sources":["../../src/stores/EditExistingQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,8BAA8B,EAC9B,8CAA8C,GAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wBAAwB,GAGzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,OAAO,2BAA4B,SAAQ,mBAAmB;IACzD,gBAAgB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IACxC,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAE/C,OAAO,GAAiB,EAAE,CAAC;IAC3B,YAAY,CAA0B;IACtC,gBAAgB,CAAyB;IACzC,0BAA0B,GAAG,KAAK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AAwB,EAAE,CAAC;YAC3D,mBAAmB,CAAC,UAAU,GAAG,mBAAmB;gBAClD,CAAC,CAAC,UAAU;gBACZ,CAAC,CAAC,SAAS,CAAC;YACd,mBAAmB,CAAC,KAAK,GAAG,8BAA8B,CAAC;YAC3D,mBAAmB,CAAC,0BAA0B;gBAC5C,IAAI,CAAC,0BAA0B,CAAC;YAClC,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,aAAa,CACrE,mBAAmB,CACpB,CAAiB,CAAC;YACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;SAC9B;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;SAC9B;IACH,CAAC;CACF"}
|
@@ -18,14 +18,27 @@ import type { Query } from '@finos/legend-graph';
|
|
18
18
|
import type { QueryBuilderState } from '@finos/legend-query-builder';
|
19
19
|
import type React from 'react';
|
20
20
|
import type { LegendQueryPluginManager } from '../application/LegendQueryPluginManager.js';
|
21
|
-
import type { ExistingQueryEditorStore
|
22
|
-
import type {
|
23
|
-
export declare
|
21
|
+
import type { ExistingQueryEditorStore } from './QueryEditorStore.js';
|
22
|
+
import type { QuerySetupLandingPageStore } from './QuerySetupStore.js';
|
23
|
+
export declare enum QuerySetupActionTag {
|
24
|
+
PRODUCTIONIZATION = "Productionization"
|
25
|
+
}
|
26
|
+
export declare type QuerySetupActionConfiguration = {
|
24
27
|
key: string;
|
25
|
-
|
28
|
+
isCreateAction: boolean;
|
29
|
+
isAdvanced: boolean;
|
30
|
+
/**
|
31
|
+
* NOTE: we could potentially support multiple tags, but for simplicity
|
32
|
+
* we will only limit this to one
|
33
|
+
*
|
34
|
+
* If no tag is provided, the action will be classified into the default group
|
35
|
+
*/
|
36
|
+
tag?: string;
|
37
|
+
label: string;
|
38
|
+
icon: React.ReactNode;
|
39
|
+
className?: string | undefined;
|
40
|
+
action: (setupStore: QuerySetupLandingPageStore) => Promise<void>;
|
26
41
|
};
|
27
|
-
export declare type QuerySetupRenderer = (setupState: QuerySetupState) => React.ReactNode | undefined;
|
28
|
-
export declare type QueryEditorHeaderLabeler = (editorStore: QueryEditorStore) => React.ReactNode | undefined;
|
29
42
|
export declare type ExistingQueryEditorStateBuilder = (query: Query, editorStore: ExistingQueryEditorStore) => QueryBuilderState | undefined;
|
30
43
|
export declare type ExistingQueryEditorActionRendererConfiguration = {
|
31
44
|
key: string;
|
@@ -39,17 +52,9 @@ export declare abstract class LegendQueryApplicationPlugin extends LegendApplica
|
|
39
52
|
private readonly _$nominalTypeBrand;
|
40
53
|
install(pluginManager: LegendQueryPluginManager): void;
|
41
54
|
/**
|
42
|
-
* Get the list of
|
43
|
-
*/
|
44
|
-
getExtraQuerySetupOptionRendererConfigurations?(): QuerySetupOptionRendererConfiguration[];
|
45
|
-
/**
|
46
|
-
* Get the list of renderers for query setup.
|
47
|
-
*/
|
48
|
-
getExtraQuerySetupRenderers?(): QuerySetupRenderer[];
|
49
|
-
/**
|
50
|
-
* Get the list of query editor header labelers.
|
55
|
+
* Get the list of actions (configurations) for query setup.
|
51
56
|
*/
|
52
|
-
|
57
|
+
getExtraQuerySetupActionConfigurations?(): QuerySetupActionConfiguration[];
|
53
58
|
/**
|
54
59
|
* Get the list of existing query editor state builders.
|
55
60
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/stores/LegendQueryApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,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nC,oBAAY,8CAA8C,GAAG;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,CACR,WAAW,EAAE,wBAAwB,EACrC,iBAAiB,EAAE,iBAAiB,KACjC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,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,wCAAwC,CAAC,IAAI,+BAA+B,EAAE;IAE9E;;OAEG;IACH,gDAAgD,CAAC,IAAI,8CAA8C,EAAE;CACtG"}
|
@@ -14,6 +14,10 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { LegendApplicationPlugin } from '@finos/legend-application';
|
17
|
+
export var QuerySetupActionTag;
|
18
|
+
(function (QuerySetupActionTag) {
|
19
|
+
QuerySetupActionTag["PRODUCTIONIZATION"] = "Productionization";
|
20
|
+
})(QuerySetupActionTag = QuerySetupActionTag || (QuerySetupActionTag = {}));
|
17
21
|
export class LegendQueryApplicationPlugin extends LegendApplicationPlugin {
|
18
22
|
/**
|
19
23
|
* This helps to better type-check for this empty abtract type
|
@@ -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;
|
1
|
+
{"version":3,"file":"LegendQueryApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendQueryApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQpE,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,8DAAuC,CAAA;AACzC,CAAC,EAFW,mBAAmB,GAAnB,mBAAmB,KAAnB,mBAAmB,QAE9B;AAqCD,MAAM,OAAgB,4BAA6B,SAAQ,uBAAuB;IAChF;;;OAGG;IACc,kBAAkB,CAAkC;IAErE,OAAO,CAAC,aAAuC;QAC7C,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CAgBF"}
|
@@ -20,22 +20,45 @@ export declare enum LEGEND_QUERY_PATH_PARAM_TOKEN {
|
|
20
20
|
RUNTIME_PATH = "runtimePath",
|
21
21
|
SERVICE_PATH = "servicePath"
|
22
22
|
}
|
23
|
+
export declare enum LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN {
|
24
|
+
SHOW_ALL_GROUPS = "showAllGroups",
|
25
|
+
SHOW_ADVANCED_ACTIONS = "showAdvancedActions",
|
26
|
+
TAG = "tag"
|
27
|
+
}
|
23
28
|
export declare enum LEGEND_QUERY_QUERY_PARAM_TOKEN {
|
24
29
|
SERVICE_EXECUTION_KEY = "executionKey"
|
25
30
|
}
|
26
31
|
export declare const LEGEND_QUERY_ROUTE_PATTERN: Readonly<{
|
27
32
|
SETUP: "/setup";
|
33
|
+
EDIT_EXISTING_QUERY_SETUP: "/setup/existing-query";
|
34
|
+
CREATE_MAPPING_QUERY_SETUP: "/setup/manual";
|
35
|
+
CLONE_SERVICE_QUERY_SETUP: "/setup/clone-service-query";
|
36
|
+
QUERY_PRODUCTIONIZER_SETUP: "/setup/productionize-query";
|
37
|
+
UPDATE_EXISTING_SERVICE_QUERY_SETUP: "/setup/update-existing-service-query";
|
38
|
+
LOAD_PROJECT_SERVICE_QUERY_SETUP: "/setup/load-project-service-query";
|
28
39
|
CREATE_FROM_MAPPING_QUERY: "/create/manual/:gav/:mappingPath/:runtimePath";
|
29
40
|
CREATE_FROM_SERVICE_QUERY: "/create-from-service/:gav/:servicePath";
|
30
41
|
EDIT_EXISTING_QUERY: "/edit/:queryId";
|
31
42
|
}>;
|
43
|
+
export interface QuerySetupQueryParams {
|
44
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS]?: string;
|
45
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ADVANCED_ACTIONS]?: string;
|
46
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.TAG]?: string;
|
47
|
+
}
|
48
|
+
export declare const generateQuerySetupRoute: (showAllGroups?: boolean | undefined, showAdvancedActions?: boolean | undefined, tag?: string | undefined) => string;
|
49
|
+
export declare const generateEditExistingQuerySetupRoute: () => string;
|
50
|
+
export declare const generateCreateMappingQuerySetupRoute: () => string;
|
51
|
+
export declare const generateCloneServiceQuerySetupRoute: () => string;
|
52
|
+
export declare const generateQueryProductionizerSetupRoute: () => string;
|
53
|
+
export declare const generateUpdateExistingServiceQuerySetup: () => string;
|
54
|
+
export declare const generateLoadProjectServiceQuerySetup: () => string;
|
32
55
|
export declare const generateMappingQueryCreatorRoute: (groupId: string, artifactId: string, versionId: string, mappingPath: string, runtimePath: string) => string;
|
33
56
|
export interface MappingQueryCreatorPathParams {
|
34
57
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.GAV]: string;
|
35
58
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.MAPPING_PATH]: string;
|
36
59
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.RUNTIME_PATH]: string;
|
37
60
|
}
|
38
|
-
export declare const generateServiceQueryCreatorRoute: (groupId: string, artifactId: string, versionId: string, servicePath: string,
|
61
|
+
export declare const generateServiceQueryCreatorRoute: (groupId: string, artifactId: string, versionId: string, servicePath: string, executionKey?: string | undefined) => string;
|
39
62
|
export interface ServiceQueryCreatorPathParams {
|
40
63
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.GAV]: string;
|
41
64
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.SERVICE_PATH]: string;
|
@@ -51,6 +74,10 @@ export interface ExistingQueryEditorPathParams {
|
|
51
74
|
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
52
75
|
*/
|
53
76
|
export declare const EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl: (studioUrl: string, groupId: string, artifactId: string, versionId: string, entityPath: string | undefined) => string;
|
77
|
+
/**
|
78
|
+
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
79
|
+
*/
|
80
|
+
export declare const EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCProjectViewUrl: (studioUrl: string, projectId: string, entityPath: string | undefined) => string;
|
54
81
|
/**
|
55
82
|
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
56
83
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryRouter.d.ts","sourceRoot":"","sources":["../../src/stores/LegendQueryRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"LegendQueryRouter.d.ts","sourceRoot":"","sources":["../../src/stores/LegendQueryRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,oBAAY,6BAA6B;IACvC,GAAG,QAAQ;IACX,QAAQ,YAAY;IACpB,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;CAC7B;AAED,oBAAY,oCAAoC;IAC9C,eAAe,kBAAkB;IACjC,qBAAqB,wBAAwB;IAC7C,GAAG,QAAQ;CACZ;AAED,oBAAY,8BAA8B;IACxC,qBAAqB,iBAAiB;CACvC;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;EAWrC,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC,CAAC,oCAAoC,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC;IAChE,CAAC,oCAAoC,CAAC,qBAAqB,CAAC,CA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C5C,CAAC,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClD;AAED;;GAEG;AACH,eAAO,MAAM,6DAA6D,cAC7D,MAAM,WACR,MAAM,cACH,MAAM,aACP,MAAM,cACL,MAAM,GAAG,SAAS,KAC7B,MAK8C,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iEAAiE,cAE/D,MAAM,aACN,MAAM,cACL,MAAM,GAAG,SAAS,KAC7B,MAGC,CAAC;AAEP;;GAEG;AACH,eAAO,MAAM,4EAA4E,cAE1E,MAAM,WACR,MAAM,cACH,MAAM,eACL,MAAM,KAClB,MAKE,CAAC;AAER;;GAEG;AACH,eAAO,MAAM,2EAA2E,cAC1E,MAAM,aAAa,MAAM,KAAG,MAC6B,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,oEAAoE,cACnE,MAAM,WAAW,MAAM,KAAG,MACoB,CAAC"}
|
@@ -13,7 +13,8 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { generatePath } from '@finos/legend-application';
|
16
|
+
import { generateExtensionUrlPattern, generatePath, } from '@finos/legend-application';
|
17
|
+
import { addQueryParamsStringToUrl, stringifyQueryParams, } from '@finos/legend-shared';
|
17
18
|
import { generateGAVCoordinates } from '@finos/legend-storage';
|
18
19
|
export var LEGEND_QUERY_PATH_PARAM_TOKEN;
|
19
20
|
(function (LEGEND_QUERY_PATH_PARAM_TOKEN) {
|
@@ -23,25 +24,50 @@ export var LEGEND_QUERY_PATH_PARAM_TOKEN;
|
|
23
24
|
LEGEND_QUERY_PATH_PARAM_TOKEN["RUNTIME_PATH"] = "runtimePath";
|
24
25
|
LEGEND_QUERY_PATH_PARAM_TOKEN["SERVICE_PATH"] = "servicePath";
|
25
26
|
})(LEGEND_QUERY_PATH_PARAM_TOKEN = LEGEND_QUERY_PATH_PARAM_TOKEN || (LEGEND_QUERY_PATH_PARAM_TOKEN = {}));
|
27
|
+
export var LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN;
|
28
|
+
(function (LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN) {
|
29
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN["SHOW_ALL_GROUPS"] = "showAllGroups";
|
30
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN["SHOW_ADVANCED_ACTIONS"] = "showAdvancedActions";
|
31
|
+
LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN["TAG"] = "tag";
|
32
|
+
})(LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN = LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN || (LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN = {}));
|
26
33
|
export var LEGEND_QUERY_QUERY_PARAM_TOKEN;
|
27
34
|
(function (LEGEND_QUERY_QUERY_PARAM_TOKEN) {
|
28
35
|
LEGEND_QUERY_QUERY_PARAM_TOKEN["SERVICE_EXECUTION_KEY"] = "executionKey";
|
29
36
|
})(LEGEND_QUERY_QUERY_PARAM_TOKEN = LEGEND_QUERY_QUERY_PARAM_TOKEN || (LEGEND_QUERY_QUERY_PARAM_TOKEN = {}));
|
30
37
|
export const LEGEND_QUERY_ROUTE_PATTERN = Object.freeze({
|
31
38
|
SETUP: '/setup',
|
39
|
+
EDIT_EXISTING_QUERY_SETUP: '/setup/existing-query',
|
40
|
+
CREATE_MAPPING_QUERY_SETUP: '/setup/manual',
|
41
|
+
CLONE_SERVICE_QUERY_SETUP: '/setup/clone-service-query',
|
42
|
+
QUERY_PRODUCTIONIZER_SETUP: '/setup/productionize-query',
|
43
|
+
UPDATE_EXISTING_SERVICE_QUERY_SETUP: '/setup/update-existing-service-query',
|
44
|
+
LOAD_PROJECT_SERVICE_QUERY_SETUP: '/setup/load-project-service-query',
|
32
45
|
CREATE_FROM_MAPPING_QUERY: `/create/manual/:${LEGEND_QUERY_PATH_PARAM_TOKEN.GAV}/:${LEGEND_QUERY_PATH_PARAM_TOKEN.MAPPING_PATH}/:${LEGEND_QUERY_PATH_PARAM_TOKEN.RUNTIME_PATH}`,
|
33
46
|
CREATE_FROM_SERVICE_QUERY: `/create-from-service/:${LEGEND_QUERY_PATH_PARAM_TOKEN.GAV}/:${LEGEND_QUERY_PATH_PARAM_TOKEN.SERVICE_PATH}`,
|
34
47
|
EDIT_EXISTING_QUERY: `/edit/:${LEGEND_QUERY_PATH_PARAM_TOKEN.QUERY_ID}`,
|
35
48
|
});
|
49
|
+
export const generateQuerySetupRoute = (showAllGroups, showAdvancedActions, tag) => addQueryParamsStringToUrl(generatePath(LEGEND_QUERY_ROUTE_PATTERN.SETUP, {}), stringifyQueryParams({
|
50
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ALL_GROUPS]: showAllGroups,
|
51
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.SHOW_ADVANCED_ACTIONS]: showAdvancedActions,
|
52
|
+
[LEGEND_QUERY_SETUP_QUERY_PARAM_TOKEN.TAG]: tag,
|
53
|
+
}));
|
54
|
+
export const generateEditExistingQuerySetupRoute = () => generatePath(LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY_SETUP, {});
|
55
|
+
export const generateCreateMappingQuerySetupRoute = () => generatePath(LEGEND_QUERY_ROUTE_PATTERN.CREATE_MAPPING_QUERY_SETUP, {});
|
56
|
+
export const generateCloneServiceQuerySetupRoute = () => generateExtensionUrlPattern(generatePath(LEGEND_QUERY_ROUTE_PATTERN.CLONE_SERVICE_QUERY_SETUP, {}));
|
57
|
+
export const generateQueryProductionizerSetupRoute = () => generateExtensionUrlPattern(generatePath(LEGEND_QUERY_ROUTE_PATTERN.QUERY_PRODUCTIONIZER_SETUP, {}));
|
58
|
+
export const generateUpdateExistingServiceQuerySetup = () => generateExtensionUrlPattern(generatePath(LEGEND_QUERY_ROUTE_PATTERN.UPDATE_EXISTING_SERVICE_QUERY_SETUP, {}));
|
59
|
+
export const generateLoadProjectServiceQuerySetup = () => generateExtensionUrlPattern(generatePath(LEGEND_QUERY_ROUTE_PATTERN.LOAD_PROJECT_SERVICE_QUERY_SETUP, {}));
|
36
60
|
export const generateMappingQueryCreatorRoute = (groupId, artifactId, versionId, mappingPath, runtimePath) => generatePath(LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_MAPPING_QUERY, {
|
37
61
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.GAV]: generateGAVCoordinates(groupId, artifactId, versionId),
|
38
62
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.MAPPING_PATH]: mappingPath,
|
39
63
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.RUNTIME_PATH]: runtimePath,
|
40
64
|
});
|
41
|
-
export const generateServiceQueryCreatorRoute = (groupId, artifactId, versionId, servicePath,
|
65
|
+
export const generateServiceQueryCreatorRoute = (groupId, artifactId, versionId, servicePath, executionKey) => addQueryParamsStringToUrl(generatePath(LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_SERVICE_QUERY, {
|
42
66
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.GAV]: generateGAVCoordinates(groupId, artifactId, versionId),
|
43
67
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.SERVICE_PATH]: servicePath,
|
44
|
-
})
|
68
|
+
}), stringifyQueryParams({
|
69
|
+
[LEGEND_QUERY_QUERY_PARAM_TOKEN.SERVICE_EXECUTION_KEY]: executionKey,
|
70
|
+
}));
|
45
71
|
export const generateExistingQueryEditorRoute = (queryId) => generatePath(LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY, {
|
46
72
|
[LEGEND_QUERY_PATH_PARAM_TOKEN.QUERY_ID]: queryId,
|
47
73
|
});
|
@@ -49,6 +75,10 @@ export const generateExistingQueryEditorRoute = (queryId) => generatePath(LEGEND
|
|
49
75
|
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
50
76
|
*/
|
51
77
|
export const EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl = (studioUrl, groupId, artifactId, versionId, entityPath) => `${studioUrl}/view/archive/${generateGAVCoordinates(groupId, artifactId, versionId)}${entityPath ? `/entity/${entityPath}` : ''}`;
|
78
|
+
/**
|
79
|
+
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
80
|
+
*/
|
81
|
+
export const EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCProjectViewUrl = (studioUrl, projectId, entityPath) => `${studioUrl}/view/${projectId}${entityPath ? `/entity/${entityPath}` : ''}`;
|
52
82
|
/**
|
53
83
|
* @external_application_navigation This depends on Legend Studio routing and is hardcoded so it's potentially brittle
|
54
84
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LegendQueryRouter.js","sourceRoot":"","sources":["../../src/stores/LegendQueryRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"LegendQueryRouter.js","sourceRoot":"","sources":["../../src/stores/LegendQueryRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,2BAA2B,EAC3B,YAAY,GACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAN,IAAY,6BAMX;AAND,WAAY,6BAA6B;IACvC,4CAAW,CAAA;IACX,qDAAoB,CAAA;IACpB,6DAA4B,CAAA;IAC5B,6DAA4B,CAAA;IAC5B,6DAA4B,CAAA;AAC9B,CAAC,EANW,6BAA6B,GAA7B,6BAA6B,KAA7B,6BAA6B,QAMxC;AAED,MAAM,CAAN,IAAY,oCAIX;AAJD,WAAY,oCAAoC;IAC9C,yEAAiC,CAAA;IACjC,qFAA6C,CAAA;IAC7C,mDAAW,CAAA;AACb,CAAC,EAJW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M,oEAAoE,GAC/E,CAAC,SAAiB,EAAE,OAAe,EAAU,EAAE,CAC7C,GAAG,SAAS,mCAAmC,OAAO,EAAE,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
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 { ProjectData, type DepotServerClient } from '@finos/legend-server-depot';
|
17
|
+
import { ActionState, type GeneratorFn } from '@finos/legend-shared';
|
18
|
+
import type { LegendQueryApplicationStore } from './LegendQueryBaseStore.js';
|
19
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
20
|
+
export declare class LoadProjectServiceQuerySetupStore extends BaseQuerySetupStore {
|
21
|
+
readonly loadProjectsState: ActionState;
|
22
|
+
projects: ProjectData[];
|
23
|
+
constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient);
|
24
|
+
loadProjects(): GeneratorFn<void>;
|
25
|
+
loadProjectServiceUpdater(project: ProjectData): Promise<void>;
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=LoadProjectServiceQuerySetupStore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LoadProjectServiceQuerySetupStore.d.ts","sourceRoot":"","sources":["../../src/stores/LoadProjectServiceQuerySetupStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EAGX,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,iCAAkC,SAAQ,mBAAmB;IACxE,QAAQ,CAAC,iBAAiB,cAAwB;IAClD,QAAQ,EAAE,WAAW,EAAE,CAAM;gBAG3B,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB;IAUrC,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAc5B,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAwBrE"}
|
@@ -0,0 +1,61 @@
|
|
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 { ProjectData, } from '@finos/legend-server-depot';
|
17
|
+
import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
18
|
+
import { parseProjectIdentifier } from '@finos/legend-storage';
|
19
|
+
import { flow, makeObservable, observable } from 'mobx';
|
20
|
+
import { EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateProjectServiceQueryUrl } from './LegendQueryRouter.js';
|
21
|
+
import { BaseQuerySetupStore } from './QuerySetupStore.js';
|
22
|
+
export class LoadProjectServiceQuerySetupStore extends BaseQuerySetupStore {
|
23
|
+
loadProjectsState = ActionState.create();
|
24
|
+
projects = [];
|
25
|
+
constructor(applicationStore, depotServerClient) {
|
26
|
+
super(applicationStore, depotServerClient);
|
27
|
+
makeObservable(this, {
|
28
|
+
projects: observable,
|
29
|
+
loadProjects: flow,
|
30
|
+
});
|
31
|
+
}
|
32
|
+
*loadProjects() {
|
33
|
+
this.loadProjectsState.inProgress();
|
34
|
+
try {
|
35
|
+
this.projects = (yield this.depotServerClient.getProjects()).map((v) => ProjectData.serialization.fromJson(v));
|
36
|
+
this.loadProjectsState.pass();
|
37
|
+
}
|
38
|
+
catch (error) {
|
39
|
+
assertErrorThrown(error);
|
40
|
+
this.applicationStore.notifyError(error);
|
41
|
+
this.loadProjectsState.fail();
|
42
|
+
}
|
43
|
+
}
|
44
|
+
async loadProjectServiceUpdater(project) {
|
45
|
+
// find the matching SDLC instance
|
46
|
+
const projectIDPrefix = parseProjectIdentifier(project.projectId).prefix;
|
47
|
+
const matchingSDLCEntry = this.applicationStore.config.studioInstances.find((entry) => entry.sdlcProjectIDPrefix === projectIDPrefix);
|
48
|
+
if (matchingSDLCEntry) {
|
49
|
+
this.applicationStore.setBlockingAlert({
|
50
|
+
message: `Loading service project...`,
|
51
|
+
prompt: 'Please do not close the application',
|
52
|
+
showLoading: true,
|
53
|
+
});
|
54
|
+
this.applicationStore.navigator.goToAddress(EXTERNAL_APPLICATION_NAVIGATION__generateStudioUpdateProjectServiceQueryUrl(matchingSDLCEntry.url, project.projectId));
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
this.applicationStore.notifyWarning(`Can't find the corresponding SDLC instance to load project '${project.projectId}'`);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
//# sourceMappingURL=LoadProjectServiceQuerySetupStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"LoadProjectServiceQuerySetupStore.js","sourceRoot":"","sources":["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,CAAC,IAAI,EAAE,CAAC;SAC/B;IACH,CAAC;IAED,KAAK,CAAC,yBAAyB,CAAC,OAAoB;QAClD,kCAAkC;QAClC,MAAM,eAAe,GAAG,sBAAsB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QACzE,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CACzE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,mBAAmB,KAAK,eAAe,CACzD,CAAC;QACF,IAAI,iBAAiB,EAAE;YACrB,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC;gBACrC,OAAO,EAAE,4BAA4B;gBACrC,MAAM,EAAE,qCAAqC;gBAC7C,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;YACH,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,WAAW,CACzC,2EAA2E,CACzE,iBAAiB,CAAC,GAAG,EACrB,OAAO,CAAC,SAAS,CAClB,CACF,CAAC;SACH;aAAM;YACL,IAAI,CAAC,gBAAgB,CAAC,aAAa,CACjC,+DAA+D,OAAO,CAAC,SAAS,GAAG,CACpF,CAAC;SACH;IACH,CAAC;CACF"}
|
@@ -15,11 +15,13 @@
|
|
15
15
|
*/
|
16
16
|
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
17
17
|
import { type LightQuery, type RawLambda, GraphManagerState, Query } from '@finos/legend-graph';
|
18
|
-
import type
|
18
|
+
import { type ProjectGAVCoordinates } from '@finos/legend-storage';
|
19
19
|
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 } from '@finos/legend-query-builder';
|
23
|
+
export declare const createViewProjectHandler: (applicationStore: LegendQueryApplicationStore) => (groupId: string, artifactId: string, versionId: string, entityPath: string | undefined) => void;
|
24
|
+
export declare const createViewSDLCProjectHandler: (applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient) => (groupId: string, artifactId: string, entityPath: string | undefined) => Promise<void>;
|
23
25
|
export interface QueryExportConfiguration {
|
24
26
|
defaultName?: string | undefined;
|
25
27
|
allowUpdate?: boolean | undefined;
|
@@ -63,6 +65,8 @@ export declare abstract class QueryEditorStore {
|
|
63
65
|
exportState?: QueryExportState | undefined;
|
64
66
|
queryLoaderState: QueryLoaderState;
|
65
67
|
constructor(applicationStore: LegendQueryApplicationStore, depotServerClient: DepotServerClient);
|
68
|
+
get isViewProjectActionDisabled(): boolean;
|
69
|
+
get isSaveActionDisabled(): boolean;
|
66
70
|
setExportState(val: QueryExportState | undefined): void;
|
67
71
|
abstract getProjectInfo(): ProjectGAVCoordinates;
|
68
72
|
/**
|
@@ -75,7 +79,7 @@ export declare abstract class QueryEditorStore {
|
|
75
79
|
protected abstract initializeQueryBuilderState(): Promise<QueryBuilderState>;
|
76
80
|
abstract getExportConfiguration(lambda: RawLambda): Promise<QueryExportConfiguration>;
|
77
81
|
initialize(): GeneratorFn<void>;
|
78
|
-
buildGraph(
|
82
|
+
buildGraph(): GeneratorFn<void>;
|
79
83
|
}
|
80
84
|
export declare class MappingQueryCreatorStore extends QueryEditorStore {
|
81
85
|
groupId: string;
|