@finos/legend-extension-dsl-service 1.0.169 → 1.0.170

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { LegendQueryApplicationPlugin } from '@finos/legend-application-query';
17
- import type { QueryBuilderHeaderActionConfiguration } from '@finos/legend-query-builder';
17
+ import type { QueryBuilderMenuActionConfiguration } from '@finos/legend-query-builder';
18
18
  export declare class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
19
19
  constructor();
20
- getExtraQueryBuilderHeaderActionConfigurations(): QueryBuilderHeaderActionConfiguration[];
20
+ getExtraQueryBuilderExportMenuActionConfigurations?(): QueryBuilderMenuActionConfiguration[];
21
21
  }
22
22
  //# sourceMappingURL=DSL_Service_LegendQueryApplicationPlugin.d.ts.map
@@ -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,EAAE,qCAAqC,EAAE,MAAM,6BAA6B,CAAC;AAEzF,qBAAa,wCAAyC,SAAQ,4BAA4B;;IAKxF,8CAA8C,IAAI,qCAAqC,EAAE;CAwG1F"}
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,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAC;AAEvF,qBAAa,wCAAyC,SAAQ,4BAA4B;;IAKxF,kDAAkD,CAAC,IAAI,mCAAmC,EAAE;CAoG7F"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /**
3
3
  * Copyright (c) 2020-present, Goldman Sachs
4
4
  *
@@ -16,22 +16,23 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  */
17
17
  import packageJson from '../../../package.json' assert { type: 'json' };
18
18
  import { LegendQueryApplicationPlugin, ExistingQueryEditorStore, QueryBuilderActionConfig_QueryApplication, } from '@finos/legend-application-query';
19
- import { ArrowCircleUpIcon } from '@finos/legend-art';
19
+ import { ArrowCircleUpIcon, RocketIcon } from '@finos/legend-art';
20
20
  import { generateQueryProductionizerRoute } from '../../__lib__/studio/DSL_Service_LegendStudioNavigation.js';
21
21
  import { StoreProjectData } from '@finos/legend-server-depot';
22
22
  import { parseProjectIdentifier } from '@finos/legend-storage';
23
23
  import { buildUrl } from '@finos/legend-shared';
24
- import { ServiceRegisterAction } from './ServiceRegisterModal.js';
24
+ import { ServiceRegisterModal } from './ServiceRegisterModal.js';
25
25
  export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
26
26
  constructor() {
27
27
  super(packageJson.extensions.applicationQueryPlugin, packageJson.version);
28
28
  }
29
- getExtraQueryBuilderHeaderActionConfigurations() {
29
+ getExtraQueryBuilderExportMenuActionConfigurations() {
30
30
  return [
31
31
  {
32
- key: 'productionize-query',
33
- category: 1,
34
- renderer: (queryBuilderState) => {
32
+ key: 'export-as-productionized-query',
33
+ title: 'Productionize query...',
34
+ label: 'Productionized Query',
35
+ onClick: (queryBuilderState) => {
35
36
  if (queryBuilderState.workflowState.actionConfig instanceof
36
37
  QueryBuilderActionConfig_QueryApplication) {
37
38
  const editorStore = queryBuilderState.workflowState.actionConfig.editorStore;
@@ -54,29 +55,30 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
54
55
  editorStore.applicationStore.notificationService.notifyWarning(`Can't find the corresponding SDLC instance to productionize the query`);
55
56
  }
56
57
  };
57
- const proceed = () => {
58
- queryBuilderState.changeDetectionState.alertUnsavedChanges(() => {
59
- openQueryProductionizer().catch(editorStore.applicationStore.alertUnhandledError);
60
- });
61
- };
62
- return (_jsxs("button", { className: "query-editor__header__action btn--dark", tabIndex: -1, onClick: proceed, disabled: !(editorStore instanceof ExistingQueryEditorStore) ||
63
- !editorStore.queryBuilderState?.canBuildQuery, title: !(editorStore instanceof ExistingQueryEditorStore)
64
- ? 'Please save your query first before productionizing'
65
- : !editorStore.queryBuilderState?.canBuildQuery
66
- ? 'Please fix query errors before productionizing'
67
- : 'Productionize query...', children: [_jsx(ArrowCircleUpIcon, { className: "query-editor__header__action__icon--productionize" }), _jsx("div", { className: "query-editor__header__action__label", children: "Productionize Query" })] }));
58
+ queryBuilderState.changeDetectionState.alertUnsavedChanges(() => {
59
+ openQueryProductionizer().catch(editorStore.applicationStore.alertUnhandledError);
60
+ });
68
61
  }
69
- return undefined;
70
62
  },
63
+ icon: _jsx(ArrowCircleUpIcon, {}),
71
64
  },
72
65
  {
73
- key: 'register-service',
74
- category: 1,
75
- renderer: (queryBuilderState) => {
66
+ key: 'export-as-dev-service',
67
+ title: 'Register query as service',
68
+ label: 'DEV Service',
69
+ onClick: (queryBuilderState) => {
70
+ if (queryBuilderState.workflowState.actionConfig instanceof
71
+ QueryBuilderActionConfig_QueryApplication) {
72
+ const editorStore = queryBuilderState.workflowState.actionConfig.editorStore;
73
+ editorStore.setShowRegisterServiceModal(true);
74
+ }
75
+ },
76
+ icon: _jsx(RocketIcon, {}),
77
+ renderExtraComponent: (queryBuilderState) => {
76
78
  if (queryBuilderState.workflowState.actionConfig instanceof
77
79
  QueryBuilderActionConfig_QueryApplication) {
78
80
  const editorStore = queryBuilderState.workflowState.actionConfig.editorStore;
79
- return (_jsx(ServiceRegisterAction, { editorStore: editorStore, queryBuilderState: queryBuilderState }));
81
+ return (_jsx(_Fragment, { children: editorStore.showRegisterServiceModal && (_jsx(ServiceRegisterModal, { editorStore: editorStore, onClose: () => editorStore.setShowRegisterServiceModal(false), queryBuilderState: queryBuilderState })) }));
80
82
  }
81
83
  return undefined;
82
84
  },
@@ -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,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yCAAyC,GAC1C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,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,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,MAAM,OAAO,wCAAyC,SAAQ,4BAA4B;IACxF;QACE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED,8CAA8C;QAC5C,OAAO;YACL;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,CAAC,iBAAiB,EAAmB,EAAE;oBAC/C,IACE,iBAAiB,CAAC,aAAa,CAAC,YAAY;wBAC5C,yCAAyC,EACzC,CAAC;wBACD,MAAM,WAAW,GACf,iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC,WAAW,CAAC;wBAC3D,MAAM,uBAAuB,GAAG,KAAK,IAAmB,EAAE;4BACxD,I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kBACE,SAAS,EAAC,wCAAwC,EAClD,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EACN,CAAC,CAAC,WAAW,YAAY,wBAAwB,CAAC;gCAClD,CAAC,WAAW,CAAC,iBAAiB,EAAE,aAAa,EAE/C,KAAK,EACH,CAAC,CAAC,WAAW,YAAY,wBAAwB,CAAC;gCAChD,CAAC,CAAC,qDAAqD;gCACvD,CAAC,CAAC,CAAC,WAAW,CAAC,iBAAiB,EAAE,aAAa;oCAC7C,CAAC,CAAC,gDAAgD;oCAClD,CAAC,CAAC,wBAAwB,aAGhC,KAAC,iBAAiB,IAAC,SAAS,EAAC,mDAAmD,GAAG,EACnF,cAAK,SAAS,EAAC,qCAAqC,oCAE9C,IACC,CACV,CAAC;oBACJ,CAAC;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;aACF;YACD;gBACE,GAAG,EAAE,kBAAkB;gBACvB,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,CAAC,iBAAiB,EAAmB,EAAE;oBAC/C,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,KAAC,qBAAqB,IACpB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,GACpC,CACH,CAAC;oBACJ,CAAC;oBACD,OAAO,SAAS,CAAC;gBACnB,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
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,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EACL,4BAA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C;oBAChD,CAAC;gBACH,CAAC;gBACD,IAAI,EAAE,KAAC,UAAU,KAAG;gBACpB,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"}
@@ -17,8 +17,9 @@ import { type VariableExpression } from '@finos/legend-graph';
17
17
  import { type QueryEditorStore } from '@finos/legend-application-query';
18
18
  import type { QueryBuilderState } from '@finos/legend-query-builder';
19
19
  export declare const generateServiceURL: (urlPrefix: string | undefined, params: VariableExpression[] | undefined) => string;
20
- export declare const ServiceRegisterAction: ((props: {
20
+ export declare const ServiceRegisterModal: ((props: {
21
21
  editorStore: QueryEditorStore;
22
+ onClose: () => void;
22
23
  queryBuilderState: QueryBuilderState;
23
24
  }) => import("react/jsx-runtime").JSX.Element) & {
24
25
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceRegisterModal.d.ts","sourceRoot":"","sources":["../../../src/components/query/ServiceRegisterModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmCH,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAKrE,eAAO,MAAM,kBAAkB,cAClB,MAAM,GAAG,SAAS,UACrB,kBAAkB,EAAE,GAAG,SAAS,KACvC,MAMF,CAAC;AAgSF,eAAO,MAAM,qBAAqB,WACxB;IACN,WAAW,EAAE,gBAAgB,CAAC;IAC9B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;;CAqCF,CAAC"}
1
+ {"version":3,"file":"ServiceRegisterModal.d.ts","sourceRoot":"","sources":["../../../src/components/query/ServiceRegisterModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkCH,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAKrE,eAAO,MAAM,kBAAkB,cAClB,MAAM,GAAG,SAAS,UACrB,kBAAkB,EAAE,GAAG,SAAS,KACvC,MAMF,CAAC;AAEF,eAAO,MAAM,oBAAoB,WACvB;IACN,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;;CAuRF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
3
  * Copyright (c) 2020-present, Goldman Sachs
4
4
  *
@@ -19,7 +19,7 @@ import { observer } from 'mobx-react-lite';
19
19
  import { ActionState, assertErrorThrown, assertNonEmptyString, guaranteeNonNullable, LogEvent, uuid, } from '@finos/legend-shared';
20
20
  import { generateServiceManagementUrl, LEGEND_STUDIO_APP_EVENT, } from '@finos/legend-application-studio';
21
21
  import { createServiceElement } from '../../stores/studio/QueryProductionizerStore.js';
22
- import { CheckSquareIcon, clsx, CustomSelectorInput, Dialog, Modal, ModalTitle, Panel, PanelDivider, PanelFullContent, PanelLoadingIndicator, RocketIcon, SquareIcon, } from '@finos/legend-art';
22
+ import { CheckSquareIcon, clsx, CustomSelectorInput, Dialog, Modal, ModalTitle, Panel, PanelDivider, PanelFullContent, PanelLoadingIndicator, SquareIcon, } from '@finos/legend-art';
23
23
  import { ActionAlertType, ActionAlertActionType, } from '@finos/legend-application';
24
24
  import { Multiplicity, RuntimePointer, ServiceExecutionMode, validate_ServicePattern, } from '@finos/legend-graph';
25
25
  import {} from '@finos/legend-application-query';
@@ -32,7 +32,7 @@ export const generateServiceURL = (urlPrefix, params) => {
32
32
  const paramSuffix = paramNames?.length ? `/${paramNames.join('/')}` : '';
33
33
  return `${urlPrefix ?? `/${uuid()}`}${paramSuffix}`;
34
34
  };
35
- const ServiceRegisterModal = observer((props) => {
35
+ export const ServiceRegisterModal = observer((props) => {
36
36
  const { editorStore, onClose, queryBuilderState } = props;
37
37
  const [registrationState] = useState(ActionState.create());
38
38
  const [text, setText] = useState('');
@@ -134,15 +134,4 @@ const ServiceRegisterModal = observer((props) => {
134
134
  ? 'Please fix query errors before registering query as service'
135
135
  : undefined, children: "Register Service" }), _jsx("button", { className: "btn btn--dark", onClick: onClose, children: "Close" })] })] }) }));
136
136
  });
137
- export const ServiceRegisterAction = observer((props) => {
138
- const { editorStore, queryBuilderState } = props;
139
- const [showRegisterServiceModal, setShowRegisterServiceModal] = useState(false);
140
- const registerCurrentQuery = () => {
141
- setShowRegisterServiceModal(true);
142
- };
143
- const onClose = () => setShowRegisterServiceModal(false);
144
- return (_jsxs(_Fragment, { children: [_jsxs("button", { className: "query-editor__header__action btn--dark", tabIndex: -1, onClick: registerCurrentQuery, disabled: !queryBuilderState.canBuildQuery, title: !queryBuilderState.canBuildQuery
145
- ? 'Please fix query errors before registering query as service'
146
- : 'Register query as service', children: [_jsx(RocketIcon, { className: "query-editor__header__action__icon--service" }), _jsx("div", { className: "query-editor__header__action__label", children: "Register DEV Service" })] }), showRegisterServiceModal && (_jsx(ServiceRegisterModal, { editorStore: editorStore, onClose: onClose, queryBuilderState: queryBuilderState }))] }));
147
- });
148
137
  //# sourceMappingURL=ServiceRegisterModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceRegisterModal.js","sourceRoot":"","sources":["../../../src/components/query/ServiceRegisterModal.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,QAAQ,EACR,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EACL,eAAe,EACf,IAAI,EACJ,mBAAmB,EACnB,MAAM,EACN,KAAK,EACL,UAAU,EACV,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAyB,MAAM,iCAAiC,CAAC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,6BAA6B,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,SAA6B,EAC7B,MAAwC,EAChC,EAAE;IACV,MAAM,UAAU,GAAG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AK,EACH,CAAC,iBAAiB,CAAC,aAAa;gCAC9B,CAAC,CAAC,6DAA6D;gCAC/D,CAAC,CAAC,SAAS,iCAIR,EACT,iBAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,OAAO,sBAEzC,IACL,IACA,GACD,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAC3C,CAAC,KAGA,EAAE,EAAE;IACH,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAC3D,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,MAAM,oBAAoB,GAAG,GAAS,EAAE;QACtC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC;IACF,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;IAC/D,OAAO,CACL,8BACE,kBACE,SAAS,EAAC,wCAAwC,EAClD,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,CAAC,iBAAiB,CAAC,aAAa,EAC1C,KAAK,EACH,CAAC,iBAAiB,CAAC,aAAa;oBAC9B,CAAC,CAAC,6DAA6D;oBAC/D,CAAC,CAAC,2BAA2B,aAGjC,KAAC,UAAU,IAAC,SAAS,EAAC,6CAA6C,GAAG,EACtE,cAAK,SAAS,EAAC,qCAAqC,qCAE9C,IACC,EACR,wBAAwB,IAAI,CAC3B,KAAC,oBAAoB,IACnB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,iBAAiB,GACpC,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"ServiceRegisterModal.js","sourceRoot":"","sources":["../../../src/components/query/ServiceRegisterModal.tsx"],"names":[],"mappings":";AAAA;;;;;;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finos/legend-extension-dsl-service v1.0.169
1
+ /** @license @finos/legend-extension-dsl-service v1.0.170
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-service",
3
- "version": "1.0.169",
3
+ "version": "1.0.170",
4
4
  "description": "Legend extension for Service DSL",
5
5
  "keywords": [
6
6
  "legend",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-service",
3
- "version": "1.0.169",
3
+ "version": "1.0.170",
4
4
  "description": "Legend extension for Service DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -42,13 +42,13 @@
42
42
  "test:watch": "jest --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@finos/legend-application": "15.1.0",
46
- "@finos/legend-application-query": "13.4.13",
47
- "@finos/legend-application-studio": "28.16.24",
48
- "@finos/legend-art": "7.1.29",
45
+ "@finos/legend-application": "15.1.1",
46
+ "@finos/legend-application-query": "13.4.14",
47
+ "@finos/legend-application-studio": "28.16.25",
48
+ "@finos/legend-art": "7.1.30",
49
49
  "@finos/legend-graph": "31.9.15",
50
- "@finos/legend-lego": "1.2.30",
51
- "@finos/legend-query-builder": "4.14.36",
50
+ "@finos/legend-lego": "1.2.31",
51
+ "@finos/legend-query-builder": "4.14.37",
52
52
  "@finos/legend-server-depot": "6.0.40",
53
53
  "@finos/legend-server-sdlc": "5.3.11",
54
54
  "@finos/legend-shared": "10.0.35",
@@ -20,25 +20,26 @@ import {
20
20
  ExistingQueryEditorStore,
21
21
  QueryBuilderActionConfig_QueryApplication,
22
22
  } from '@finos/legend-application-query';
23
- import { ArrowCircleUpIcon } from '@finos/legend-art';
23
+ import { ArrowCircleUpIcon, RocketIcon } from '@finos/legend-art';
24
24
  import { generateQueryProductionizerRoute } from '../../__lib__/studio/DSL_Service_LegendStudioNavigation.js';
25
25
  import { StoreProjectData } from '@finos/legend-server-depot';
26
26
  import { parseProjectIdentifier } from '@finos/legend-storage';
27
27
  import { buildUrl } from '@finos/legend-shared';
28
- import { ServiceRegisterAction } from './ServiceRegisterModal.js';
29
- import type { QueryBuilderHeaderActionConfiguration } from '@finos/legend-query-builder';
28
+ import { ServiceRegisterModal } from './ServiceRegisterModal.js';
29
+ import type { QueryBuilderMenuActionConfiguration } from '@finos/legend-query-builder';
30
30
 
31
31
  export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplicationPlugin {
32
32
  constructor() {
33
33
  super(packageJson.extensions.applicationQueryPlugin, packageJson.version);
34
34
  }
35
35
 
36
- getExtraQueryBuilderHeaderActionConfigurations(): QueryBuilderHeaderActionConfiguration[] {
36
+ getExtraQueryBuilderExportMenuActionConfigurations?(): QueryBuilderMenuActionConfiguration[] {
37
37
  return [
38
38
  {
39
- key: 'productionize-query',
40
- category: 1,
41
- renderer: (queryBuilderState): React.ReactNode => {
39
+ key: 'export-as-productionized-query',
40
+ title: 'Productionize query...',
41
+ label: 'Productionized Query',
42
+ onClick: (queryBuilderState): void => {
42
43
  if (
43
44
  queryBuilderState.workflowState.actionConfig instanceof
44
45
  QueryBuilderActionConfig_QueryApplication
@@ -80,45 +81,33 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
80
81
  }
81
82
  };
82
83
 
83
- const proceed = (): void => {
84
- queryBuilderState.changeDetectionState.alertUnsavedChanges(() => {
85
- openQueryProductionizer().catch(
86
- editorStore.applicationStore.alertUnhandledError,
87
- );
88
- });
89
- };
90
-
91
- return (
92
- <button
93
- className="query-editor__header__action btn--dark"
94
- tabIndex={-1}
95
- onClick={proceed}
96
- disabled={
97
- !(editorStore instanceof ExistingQueryEditorStore) ||
98
- !editorStore.queryBuilderState?.canBuildQuery
99
- }
100
- title={
101
- !(editorStore instanceof ExistingQueryEditorStore)
102
- ? 'Please save your query first before productionizing'
103
- : !editorStore.queryBuilderState?.canBuildQuery
104
- ? 'Please fix query errors before productionizing'
105
- : 'Productionize query...'
106
- }
107
- >
108
- <ArrowCircleUpIcon className="query-editor__header__action__icon--productionize" />
109
- <div className="query-editor__header__action__label">
110
- Productionize Query
111
- </div>
112
- </button>
113
- );
84
+ queryBuilderState.changeDetectionState.alertUnsavedChanges(() => {
85
+ openQueryProductionizer().catch(
86
+ editorStore.applicationStore.alertUnhandledError,
87
+ );
88
+ });
114
89
  }
115
- return undefined;
116
90
  },
91
+ icon: <ArrowCircleUpIcon />,
117
92
  },
118
93
  {
119
- key: 'register-service',
120
- category: 1,
121
- renderer: (queryBuilderState): React.ReactNode => {
94
+ key: 'export-as-dev-service',
95
+ title: 'Register query as service',
96
+ label: 'DEV Service',
97
+ onClick: (queryBuilderState): void => {
98
+ if (
99
+ queryBuilderState.workflowState.actionConfig instanceof
100
+ QueryBuilderActionConfig_QueryApplication
101
+ ) {
102
+ const editorStore =
103
+ queryBuilderState.workflowState.actionConfig.editorStore;
104
+ editorStore.setShowRegisterServiceModal(true);
105
+ }
106
+ },
107
+ icon: <RocketIcon />,
108
+ renderExtraComponent: (
109
+ queryBuilderState,
110
+ ): React.ReactNode | undefined => {
122
111
  if (
123
112
  queryBuilderState.workflowState.actionConfig instanceof
124
113
  QueryBuilderActionConfig_QueryApplication
@@ -126,10 +115,17 @@ export class DSL_Service_LegendQueryApplicationPlugin extends LegendQueryApplica
126
115
  const editorStore =
127
116
  queryBuilderState.workflowState.actionConfig.editorStore;
128
117
  return (
129
- <ServiceRegisterAction
130
- editorStore={editorStore}
131
- queryBuilderState={queryBuilderState}
132
- />
118
+ <>
119
+ {editorStore.showRegisterServiceModal && (
120
+ <ServiceRegisterModal
121
+ editorStore={editorStore}
122
+ onClose={(): void =>
123
+ editorStore.setShowRegisterServiceModal(false)
124
+ }
125
+ queryBuilderState={queryBuilderState}
126
+ />
127
+ )}
128
+ </>
133
129
  );
134
130
  }
135
131
  return undefined;
@@ -40,7 +40,6 @@ import {
40
40
  PanelDivider,
41
41
  PanelFullContent,
42
42
  PanelLoadingIndicator,
43
- RocketIcon,
44
43
  SquareIcon,
45
44
  } from '@finos/legend-art';
46
45
  import {
@@ -72,7 +71,7 @@ export const generateServiceURL = (
72
71
  return `${urlPrefix ?? `/${uuid()}`}${paramSuffix}`;
73
72
  };
74
73
 
75
- const ServiceRegisterModal = observer(
74
+ export const ServiceRegisterModal = observer(
76
75
  (props: {
77
76
  editorStore: QueryEditorStore;
78
77
  onClose: () => void;
@@ -357,46 +356,3 @@ const ServiceRegisterModal = observer(
357
356
  );
358
357
  },
359
358
  );
360
-
361
- export const ServiceRegisterAction = observer(
362
- (props: {
363
- editorStore: QueryEditorStore;
364
- queryBuilderState: QueryBuilderState;
365
- }) => {
366
- const { editorStore, queryBuilderState } = props;
367
-
368
- const [showRegisterServiceModal, setShowRegisterServiceModal] =
369
- useState(false);
370
- const registerCurrentQuery = (): void => {
371
- setShowRegisterServiceModal(true);
372
- };
373
- const onClose = (): void => setShowRegisterServiceModal(false);
374
- return (
375
- <>
376
- <button
377
- className="query-editor__header__action btn--dark"
378
- tabIndex={-1}
379
- onClick={registerCurrentQuery}
380
- disabled={!queryBuilderState.canBuildQuery}
381
- title={
382
- !queryBuilderState.canBuildQuery
383
- ? 'Please fix query errors before registering query as service'
384
- : 'Register query as service'
385
- }
386
- >
387
- <RocketIcon className="query-editor__header__action__icon--service" />
388
- <div className="query-editor__header__action__label">
389
- Register DEV Service
390
- </div>
391
- </button>
392
- {showRegisterServiceModal && (
393
- <ServiceRegisterModal
394
- editorStore={editorStore}
395
- onClose={onClose}
396
- queryBuilderState={queryBuilderState}
397
- />
398
- )}
399
- </>
400
- );
401
- },
402
- );