@finos/legend-extension-dsl-service 1.0.511 → 1.0.512
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/components/query/DSL_Service_LegendQueryApplicationPlugin.d.ts +1 -1
- package/lib/components/query/DSL_Service_LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/components/query/DSL_Service_LegendQueryApplicationPlugin.js +32 -6
- package/lib/components/query/DSL_Service_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/package.json +13 -13
- package/src/components/query/DSL_Service_LegendQueryApplicationPlugin.tsx +57 -10
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { LegendQueryApplicationPlugin } from '@finos/legend-application-query';
|
|
17
|
-
import type
|
|
17
|
+
import { type QueryBuilderMenuActionConfiguration } from '@finos/legend-query-builder';
|
|
18
18
|
export declare class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
|
|
19
19
|
constructor();
|
|
20
20
|
getExtraQueryBuilderExportMenuActionConfigurations?(): QueryBuilderMenuActionConfiguration[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_Service_LegendQueryApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/query/DSL_Service_LegendQueryApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,4BAA4B,EAG7B,MAAM,iCAAiC,CAAC;AAOzC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DSL_Service_LegendQueryApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/query/DSL_Service_LegendQueryApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,4BAA4B,EAG7B,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EACL,KAAK,mCAAmC,EAEzC,MAAM,6BAA6B,CAAC;AA8CrC,qBAAa,wCAAyC,SAAQ,4BAA4B;;IAKxF,kDAAkD,CAAC,IAAI,mCAAmC,EAAE;CAgH7F"}
|
|
@@ -22,6 +22,30 @@ import { StoreProjectData } from '@finos/legend-server-depot';
|
|
|
22
22
|
import { parseProjectIdentifier } from '@finos/legend-storage';
|
|
23
23
|
import { buildUrl } from '@finos/legend-shared';
|
|
24
24
|
import { ServiceRegisterModal } from './ServiceRegisterModal.js';
|
|
25
|
+
import {} from '@finos/legend-query-builder';
|
|
26
|
+
import { QueryDataProductLakehouseExecutionContextInfo, QueryDataProductModelAccessExecutionContextInfo, QueryDataProductNativeExecutionContextInfo, QueryIngestExecutionContextInfo, } from '@finos/legend-graph';
|
|
27
|
+
const getExistingQueryEditorStore = (queryBuilderState) => {
|
|
28
|
+
if (queryBuilderState.workflowState.actionConfig instanceof
|
|
29
|
+
QueryBuilderActionConfig_QueryApplication) {
|
|
30
|
+
const editorStore = queryBuilderState.workflowState.actionConfig.editorStore;
|
|
31
|
+
if (editorStore instanceof ExistingQueryEditorStore) {
|
|
32
|
+
return editorStore;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
};
|
|
37
|
+
const isDataProductOrIngestQuery = (queryBuilderState) => {
|
|
38
|
+
const editorStore = getExistingQueryEditorStore(queryBuilderState);
|
|
39
|
+
const executionContext = editorStore?.queryInfo?.executionContext;
|
|
40
|
+
return (executionContext instanceof QueryDataProductNativeExecutionContextInfo ||
|
|
41
|
+
executionContext instanceof
|
|
42
|
+
QueryDataProductModelAccessExecutionContextInfo ||
|
|
43
|
+
executionContext instanceof QueryDataProductLakehouseExecutionContextInfo ||
|
|
44
|
+
executionContext instanceof QueryIngestExecutionContextInfo);
|
|
45
|
+
};
|
|
46
|
+
const getUnsupportedExportActionMessage = (queryBuilderState) => isDataProductOrIngestQuery(queryBuilderState)
|
|
47
|
+
? 'Not supported for Data Product or Ingest queries'
|
|
48
|
+
: 'Requires saved query';
|
|
25
49
|
export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
|
|
26
50
|
constructor() {
|
|
27
51
|
super(packageJson.extensions.applicationQueryPlugin, packageJson.version);
|
|
@@ -33,12 +57,11 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
33
57
|
title: 'Productionize query...',
|
|
34
58
|
label: 'Productionized Query',
|
|
35
59
|
disableFunc: (queryBuilderState) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return !(editorStore instanceof ExistingQueryEditorStore);
|
|
60
|
+
const editorStore = getExistingQueryEditorStore(queryBuilderState);
|
|
61
|
+
if (isDataProductOrIngestQuery(queryBuilderState)) {
|
|
62
|
+
return true;
|
|
40
63
|
}
|
|
41
|
-
return
|
|
64
|
+
return !editorStore;
|
|
42
65
|
},
|
|
43
66
|
onClick: (queryBuilderState) => {
|
|
44
67
|
if (queryBuilderState.workflowState.actionConfig instanceof
|
|
@@ -69,12 +92,14 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
69
92
|
}
|
|
70
93
|
},
|
|
71
94
|
icon: _jsx(ArrowCircleUpIcon, {}),
|
|
72
|
-
|
|
95
|
+
getDisableMessage: getUnsupportedExportActionMessage,
|
|
73
96
|
},
|
|
74
97
|
{
|
|
75
98
|
key: 'export-as-dev-service',
|
|
76
99
|
title: 'Register query as service',
|
|
77
100
|
label: 'DEV Service',
|
|
101
|
+
disableFunc: (queryBuilderState) => !getExistingQueryEditorStore(queryBuilderState) ||
|
|
102
|
+
isDataProductOrIngestQuery(queryBuilderState),
|
|
78
103
|
onClick: (queryBuilderState) => {
|
|
79
104
|
if (queryBuilderState.workflowState.actionConfig instanceof
|
|
80
105
|
QueryBuilderActionConfig_QueryApplication) {
|
|
@@ -83,6 +108,7 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
83
108
|
}
|
|
84
109
|
},
|
|
85
110
|
icon: _jsx(RocketIcon, {}),
|
|
111
|
+
getDisableMessage: getUnsupportedExportActionMessage,
|
|
86
112
|
renderExtraComponent: (queryBuilderState) => {
|
|
87
113
|
if (queryBuilderState.workflowState.actionConfig instanceof
|
|
88
114
|
QueryBuilderActionConfig_QueryApplication) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_Service_LegendQueryApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/query/DSL_Service_LegendQueryApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,GAC1C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,gCAAgC,EAAE,MAAM,4DAA4D,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"DSL_Service_LegendQueryApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/query/DSL_Service_LegendQueryApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,GAC1C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,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AC,CAAC;oBAChD,CAAC;gBACH,CAAC;gBACD,IAAI,EAAE,KAAC,UAAU,KAAG;gBACpB,iBAAiB,EAAE,iCAAiC;gBACpD,oBAAoB,EAAE,CACpB,iBAAiB,EACY,EAAE;oBAC/B,IACE,iBAAiB,CAAC,aAAa,CAAC,YAAY;wBAC5C,yCAAyC,EACzC,CAAC;wBACD,MAAM,WAAW,GACf,iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC,WAAW,CAAC;wBAC3D,OAAO,CACL,4BACG,WAAW,CAAC,wBAAwB,IAAI,CACvC,KAAC,oBAAoB,IACnB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,GAAS,EAAE,CAClB,WAAW,CAAC,2BAA2B,CAAC,KAAK,CAAC,EAEhD,iBAAiB,EAAE,iBAAiB,GACpC,CACH,GACA,CACJ,CAAC;oBACJ,CAAC;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-service",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.512",
|
|
4
4
|
"description": "Legend extension for Service DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.0.
|
|
46
|
-
"@finos/legend-application-query": "13.8.
|
|
47
|
-
"@finos/legend-application-studio": "28.21.
|
|
48
|
-
"@finos/legend-art": "7.1.
|
|
49
|
-
"@finos/legend-code-editor": "2.0.
|
|
50
|
-
"@finos/legend-graph": "32.
|
|
51
|
-
"@finos/legend-lego": "2.0.
|
|
52
|
-
"@finos/legend-query-builder": "4.19.
|
|
53
|
-
"@finos/legend-server-depot": "6.1.
|
|
54
|
-
"@finos/legend-server-sdlc": "5.4.
|
|
55
|
-
"@finos/legend-shared": "11.0.
|
|
56
|
-
"@finos/legend-storage": "3.0.
|
|
45
|
+
"@finos/legend-application": "16.0.124",
|
|
46
|
+
"@finos/legend-application-query": "13.8.53",
|
|
47
|
+
"@finos/legend-application-studio": "28.21.43",
|
|
48
|
+
"@finos/legend-art": "7.1.164",
|
|
49
|
+
"@finos/legend-code-editor": "2.0.204",
|
|
50
|
+
"@finos/legend-graph": "32.7.0",
|
|
51
|
+
"@finos/legend-lego": "2.0.224",
|
|
52
|
+
"@finos/legend-query-builder": "4.19.13",
|
|
53
|
+
"@finos/legend-server-depot": "6.1.21",
|
|
54
|
+
"@finos/legend-server-sdlc": "5.4.9",
|
|
55
|
+
"@finos/legend-shared": "11.0.29",
|
|
56
|
+
"@finos/legend-storage": "3.0.151",
|
|
57
57
|
"@types/react": "19.0.10",
|
|
58
58
|
"mobx": "6.13.6",
|
|
59
59
|
"mobx-react-lite": "4.1.0",
|
|
@@ -26,7 +26,54 @@ import { StoreProjectData } from '@finos/legend-server-depot';
|
|
|
26
26
|
import { parseProjectIdentifier } from '@finos/legend-storage';
|
|
27
27
|
import { buildUrl } from '@finos/legend-shared';
|
|
28
28
|
import { ServiceRegisterModal } from './ServiceRegisterModal.js';
|
|
29
|
-
import
|
|
29
|
+
import {
|
|
30
|
+
type QueryBuilderMenuActionConfiguration,
|
|
31
|
+
type QueryBuilderState,
|
|
32
|
+
} from '@finos/legend-query-builder';
|
|
33
|
+
import {
|
|
34
|
+
QueryDataProductLakehouseExecutionContextInfo,
|
|
35
|
+
QueryDataProductModelAccessExecutionContextInfo,
|
|
36
|
+
QueryDataProductNativeExecutionContextInfo,
|
|
37
|
+
QueryIngestExecutionContextInfo,
|
|
38
|
+
} from '@finos/legend-graph';
|
|
39
|
+
|
|
40
|
+
const getExistingQueryEditorStore = (
|
|
41
|
+
queryBuilderState: QueryBuilderState,
|
|
42
|
+
): ExistingQueryEditorStore | undefined => {
|
|
43
|
+
if (
|
|
44
|
+
queryBuilderState.workflowState.actionConfig instanceof
|
|
45
|
+
QueryBuilderActionConfig_QueryApplication
|
|
46
|
+
) {
|
|
47
|
+
const editorStore =
|
|
48
|
+
queryBuilderState.workflowState.actionConfig.editorStore;
|
|
49
|
+
if (editorStore instanceof ExistingQueryEditorStore) {
|
|
50
|
+
return editorStore;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const isDataProductOrIngestQuery = (
|
|
57
|
+
queryBuilderState: QueryBuilderState,
|
|
58
|
+
): boolean => {
|
|
59
|
+
const editorStore = getExistingQueryEditorStore(queryBuilderState);
|
|
60
|
+
const executionContext = editorStore?.queryInfo?.executionContext;
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
executionContext instanceof QueryDataProductNativeExecutionContextInfo ||
|
|
64
|
+
executionContext instanceof
|
|
65
|
+
QueryDataProductModelAccessExecutionContextInfo ||
|
|
66
|
+
executionContext instanceof QueryDataProductLakehouseExecutionContextInfo ||
|
|
67
|
+
executionContext instanceof QueryIngestExecutionContextInfo
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const getUnsupportedExportActionMessage = (
|
|
72
|
+
queryBuilderState: QueryBuilderState,
|
|
73
|
+
): string =>
|
|
74
|
+
isDataProductOrIngestQuery(queryBuilderState)
|
|
75
|
+
? 'Not supported for Data Product or Ingest queries'
|
|
76
|
+
: 'Requires saved query';
|
|
30
77
|
|
|
31
78
|
export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
|
|
32
79
|
constructor() {
|
|
@@ -40,15 +87,11 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
40
87
|
title: 'Productionize query...',
|
|
41
88
|
label: 'Productionized Query',
|
|
42
89
|
disableFunc: (queryBuilderState): boolean => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
) {
|
|
47
|
-
const editorStore =
|
|
48
|
-
queryBuilderState.workflowState.actionConfig.editorStore;
|
|
49
|
-
return !(editorStore instanceof ExistingQueryEditorStore);
|
|
90
|
+
const editorStore = getExistingQueryEditorStore(queryBuilderState);
|
|
91
|
+
if (isDataProductOrIngestQuery(queryBuilderState)) {
|
|
92
|
+
return true;
|
|
50
93
|
}
|
|
51
|
-
return
|
|
94
|
+
return !editorStore;
|
|
52
95
|
},
|
|
53
96
|
onClick: (queryBuilderState): void => {
|
|
54
97
|
if (
|
|
@@ -100,12 +143,15 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
100
143
|
}
|
|
101
144
|
},
|
|
102
145
|
icon: <ArrowCircleUpIcon />,
|
|
103
|
-
|
|
146
|
+
getDisableMessage: getUnsupportedExportActionMessage,
|
|
104
147
|
},
|
|
105
148
|
{
|
|
106
149
|
key: 'export-as-dev-service',
|
|
107
150
|
title: 'Register query as service',
|
|
108
151
|
label: 'DEV Service',
|
|
152
|
+
disableFunc: (queryBuilderState): boolean =>
|
|
153
|
+
!getExistingQueryEditorStore(queryBuilderState) ||
|
|
154
|
+
isDataProductOrIngestQuery(queryBuilderState),
|
|
109
155
|
onClick: (queryBuilderState): void => {
|
|
110
156
|
if (
|
|
111
157
|
queryBuilderState.workflowState.actionConfig instanceof
|
|
@@ -117,6 +163,7 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
|
|
|
117
163
|
}
|
|
118
164
|
},
|
|
119
165
|
icon: <RocketIcon />,
|
|
166
|
+
getDisableMessage: getUnsupportedExportActionMessage,
|
|
120
167
|
renderExtraComponent: (
|
|
121
168
|
queryBuilderState,
|
|
122
169
|
): React.ReactNode | undefined => {
|