@finos/legend-extension-dsl-data-space-studio 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/lib/__lib__/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +17 -0
  4. package/lib/__lib__/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +1 -0
  5. package/lib/__lib__/DSL_DataSpace_LegendStudioCodeSnippet.js +54 -0
  6. package/lib/__lib__/DSL_DataSpace_LegendStudioCodeSnippet.js.map +1 -0
  7. package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.d.ts +21 -0
  8. package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.d.ts.map +1 -0
  9. package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.js +22 -0
  10. package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.js.map +1 -0
  11. package/lib/components/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +39 -0
  12. package/lib/components/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -0
  13. package/lib/components/DSL_DataSpace_LegendStudioApplicationPlugin.js +206 -0
  14. package/lib/components/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -0
  15. package/lib/components/DataSpacePreviewAction.d.ts +25 -0
  16. package/lib/components/DataSpacePreviewAction.d.ts.map +1 -0
  17. package/lib/components/DataSpacePreviewAction.js +53 -0
  18. package/lib/components/DataSpacePreviewAction.js.map +1 -0
  19. package/lib/components/DataSpaceQueryAction.d.ts +24 -0
  20. package/lib/components/DataSpaceQueryAction.d.ts.map +1 -0
  21. package/lib/components/DataSpaceQueryAction.js +52 -0
  22. package/lib/components/DataSpaceQueryAction.js.map +1 -0
  23. package/lib/components/DataSpaceTemplateQueryPromoteReview.d.ts +19 -0
  24. package/lib/components/DataSpaceTemplateQueryPromoteReview.d.ts.map +1 -0
  25. package/lib/components/DataSpaceTemplateQueryPromoteReview.js +81 -0
  26. package/lib/components/DataSpaceTemplateQueryPromoteReview.js.map +1 -0
  27. package/lib/index.css +17 -0
  28. package/lib/index.css.map +1 -0
  29. package/lib/index.d.ts +17 -0
  30. package/lib/index.d.ts.map +1 -0
  31. package/lib/index.js +17 -0
  32. package/lib/index.js.map +1 -0
  33. package/lib/package.json +75 -0
  34. package/lib/stores/DataSpacePreviewState.d.ts +33 -0
  35. package/lib/stores/DataSpacePreviewState.d.ts.map +1 -0
  36. package/lib/stores/DataSpacePreviewState.js +116 -0
  37. package/lib/stores/DataSpacePreviewState.js.map +1 -0
  38. package/lib/stores/DataSpaceTemplateQueryPromotionReviewerStore.d.ts +61 -0
  39. package/lib/stores/DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map +1 -0
  40. package/lib/stores/DataSpaceTemplateQueryPromotionReviewerStore.js +406 -0
  41. package/lib/stores/DataSpaceTemplateQueryPromotionReviewerStore.js.map +1 -0
  42. package/package.json +75 -0
  43. package/src/__lib__/DSL_DataSpace_LegendStudioCodeSnippet.ts +54 -0
  44. package/src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts +21 -0
  45. package/src/components/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +299 -0
  46. package/src/components/DataSpacePreviewAction.tsx +136 -0
  47. package/src/components/DataSpaceQueryAction.tsx +100 -0
  48. package/src/components/DataSpaceTemplateQueryPromoteReview.tsx +292 -0
  49. package/src/index.ts +17 -0
  50. package/src/stores/DataSpacePreviewState.ts +199 -0
  51. package/src/stores/DataSpaceTemplateQueryPromotionReviewerStore.ts +636 -0
  52. package/tsconfig.json +54 -0
  53. package/tsconfig.package.json +37 -0
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useApplicationStore } from '@finos/legend-application';
18
+ import { MenuContentItem, BlankPanelContent, TimesCircleIcon, PanelLoadingIndicator, Dialog, TimesIcon, Modal, ModalHeader, ModalTitle, ModalHeaderActions, } from '@finos/legend-art';
19
+ import { flowResult } from 'mobx';
20
+ import { observer } from 'mobx-react-lite';
21
+ import { useEditorStore } from '@finos/legend-application-studio';
22
+ import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
23
+ import { DataSpaceViewer } from '@finos/legend-extension-dsl-data-space/application';
24
+ export const DataSpacePreviewAction = observer((props) => {
25
+ const { dataSpace } = props;
26
+ const editorStore = useEditorStore();
27
+ const applicationStore = useApplicationStore();
28
+ const dataSpacePreviewState = DataSpacePreviewState.retrieveNullableState(editorStore);
29
+ if (!dataSpacePreviewState) {
30
+ return null;
31
+ }
32
+ const previewDataSpace = () => {
33
+ flowResult(dataSpacePreviewState.previewDataSpace(dataSpace)).catch(applicationStore.alertUnhandledError);
34
+ };
35
+ return (_jsx(MenuContentItem, { onClick: previewDataSpace, children: "Preview" }));
36
+ });
37
+ export const DataSpacePreviewDialog = observer(() => {
38
+ const editorStore = useEditorStore();
39
+ const applicationStore = editorStore.applicationStore;
40
+ const dataSpacePreviewState = DataSpacePreviewState.retrieveNullableState(editorStore);
41
+ if (!dataSpacePreviewState) {
42
+ return null;
43
+ }
44
+ const onClose = () => {
45
+ dataSpacePreviewState.setDataSpace(undefined);
46
+ };
47
+ return (_jsx(Dialog, { open: Boolean(dataSpacePreviewState.dataSpace), onClose: onClose, classes: {
48
+ root: 'editor-modal__root-container',
49
+ container: 'editor-modal__container',
50
+ paper: 'editor-modal__content data-space-preview__dialog__container__content',
51
+ }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: "editor-modal data-space-preview__dialog", children: [_jsxs(ModalHeader, { className: "data-space-preview__dialog__header", children: [_jsx(ModalTitle, { title: "Preview Data Space" }), _jsx(ModalHeaderActions, { children: _jsx("button", { className: "modal__header__action", title: "Close", onClick: onClose, children: _jsx(TimesIcon, {}) }) })] }), _jsxs("div", { className: "data-space-preview__dialog__content", children: [_jsx(PanelLoadingIndicator, { isLoading: dataSpacePreviewState.loadDataSpaceState.isInProgress }), dataSpacePreviewState.dataSpaceViewerState && (_jsx(DataSpaceViewer, { dataSpaceViewerState: dataSpacePreviewState.dataSpaceViewerState })), !dataSpacePreviewState.dataSpaceViewerState && (_jsxs(_Fragment, { children: [dataSpacePreviewState.loadDataSpaceState.isInProgress && (_jsx(BlankPanelContent, { children: dataSpacePreviewState.loadDataSpaceState.message })), dataSpacePreviewState.loadDataSpaceState.hasFailed && (_jsx(BlankPanelContent, { children: _jsxs("div", { className: "data-space-preview__dialog__content--failed", children: [_jsx("div", { className: "data-space-preview__dialog__content--failed__icon", children: _jsx(TimesCircleIcon, {}) }), _jsx("div", { className: "data-space-preview__dialog__content--failed__text", children: `Can't load data space` })] }) }))] }))] })] }) }));
52
+ });
53
+ //# sourceMappingURL=DataSpacePreviewAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpacePreviewAction.js","sourceRoot":"","sources":["../../src/components/DataSpacePreviewAction.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ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
+ * 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 EditorStore } from '@finos/legend-application-studio';
17
+ import { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
18
+ export declare const queryDataSpace: (dataSpace: DataSpace, editorStore: EditorStore) => Promise<void>;
19
+ export declare const DataSpaceQueryAction: ((props: {
20
+ dataSpace: DataSpace;
21
+ }) => import("react/jsx-runtime").JSX.Element) & {
22
+ displayName: string;
23
+ };
24
+ //# sourceMappingURL=DataSpaceQueryAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceQueryAction.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAMzE,eAAO,MAAM,cAAc,cACd,SAAS,eACP,WAAW,KACvB,QAAQ,IAAI,CAqDd,CAAC;AAEF,eAAO,MAAM,oBAAoB,WACvB;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE;;CAUjC,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { MenuContentItem } from '@finos/legend-art';
18
+ import { observer } from 'mobx-react-lite';
19
+ import { useEditorStore, } from '@finos/legend-application-studio';
20
+ import { flowResult } from 'mobx';
21
+ import { guaranteeType } from '@finos/legend-shared';
22
+ import { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
23
+ import { DataSpaceQueryBuilderState, } from '@finos/legend-extension-dsl-data-space/application';
24
+ export const queryDataSpace = async (dataSpace, editorStore) => {
25
+ const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
26
+ await flowResult(embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
27
+ setupQueryBuilderState: () => {
28
+ const sourceInfo = Object.assign({}, editorStore.editorMode.getSourceInfo(), {
29
+ dataSpace: dataSpace.path,
30
+ });
31
+ const queryBuilderState = new DataSpaceQueryBuilderState(editorStore.applicationStore, editorStore.graphManagerState, editorStore.depotServerClient, dataSpace, dataSpace.defaultExecutionContext, (dataSpaceInfo) => {
32
+ queryBuilderState.dataSpace = guaranteeType(queryBuilderState.graphManagerState.graph.getElement(dataSpaceInfo.path), DataSpace);
33
+ queryBuilderState.setExecutionContext(queryBuilderState.dataSpace.defaultExecutionContext);
34
+ queryBuilderState.propagateExecutionContextChange(queryBuilderState.dataSpace.defaultExecutionContext);
35
+ }, false, undefined, undefined, undefined, undefined, undefined, editorStore.applicationStore.config.options.queryBuilderConfig, sourceInfo);
36
+ queryBuilderState.setExecutionContext(dataSpace.defaultExecutionContext);
37
+ queryBuilderState.propagateExecutionContextChange(dataSpace.defaultExecutionContext);
38
+ return queryBuilderState;
39
+ },
40
+ actionConfigs: [],
41
+ disableCompile: true,
42
+ }));
43
+ };
44
+ export const DataSpaceQueryAction = observer((props) => {
45
+ const { dataSpace } = props;
46
+ const editorStore = useEditorStore();
47
+ const buildQuery = editorStore.applicationStore.guardUnhandledError(async () => {
48
+ await queryDataSpace(dataSpace, editorStore);
49
+ });
50
+ return _jsx(MenuContentItem, { onClick: buildQuery, children: "Query..." });
51
+ });
52
+ //# sourceMappingURL=DataSpaceQueryAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceQueryAction.js","sourceRoot":"","sources":["../../src/components/DataSpaceQueryAction.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAEL,cAAc,GACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AACzE,OAAO,EACL,0BAA0B,GAE3B,MAAM,oDAAoD,CAAC;AAE5D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,SAAoB,EACpB,WAAwB,EACT,EAAE;IACjB,MAAM,yBAAyB,GAAG,WAAW,CAAC,yBAAyB,CAAC;IACxE,MAAM,UAAU,CACd,yBAAyB,CAAC,oCAAoC,CAAC;QAC7D,sBAAsB,EAAE,GAAG,EAAE;YAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAC9B,EAAE,EACF,WAAW,CAAC,UAAU,CAAC,aAAa,EAAE,EACtC;gBACE,SAAS,EAAE,SAAS,CAAC,IAAI;aAC1B,CACF,CAAC;YACF,MAAM,iBAAiB,GAAG,IAAI,0BAA0B,CACtD,WAAW,CAAC,gBAAgB,EAC5B,WAAW,CAAC,iBAAiB,EAC7B,WAAW,CAAC,iBAAiB,EAC7B,SA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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
+ export declare const DataSpaceTemplateQueryPromotionReviewer: (() => import("react/jsx-runtime").JSX.Element) & {
17
+ displayName: string;
18
+ };
19
+ //# sourceMappingURL=DataSpaceTemplateQueryPromoteReview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceTemplateQueryPromoteReview.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceTemplateQueryPromoteReview.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiQH,eAAO,MAAM,uCAAuC;;CAoBlD,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { BlankPanelContent, GitBranchIcon, clsx } from '@finos/legend-art';
18
+ import { observer, useLocalObservable } from 'mobx-react-lite';
19
+ import { useApplicationStore } from '@finos/legend-application';
20
+ import { useParams } from '@finos/legend-application/browser';
21
+ import { ActivityBarMenu, LEGEND_STUDIO_TEST_ID, useLegendStudioApplicationStore, useLegendStudioBaseStore, } from '@finos/legend-application-studio';
22
+ import { createContext, useContext } from 'react';
23
+ import { guaranteeNonNullable } from '@finos/legend-shared';
24
+ import { flowResult } from 'mobx';
25
+ import { DocumentationLink } from '@finos/legend-lego/application';
26
+ import { DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN, } from '@finos/legend-extension-dsl-data-space/application';
27
+ import { DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
28
+ import { DataSpaceTemplateQueryPromotionReviewerStore } from '../stores/DataSpaceTemplateQueryPromotionReviewerStore.js';
29
+ const TemplateQueryPromotionReviewerStoreContext = createContext(undefined);
30
+ const DataSpaceTemplateQueryPromotionReviewerStoreProvider = ({ children, dataSpacePath, queryId }) => {
31
+ const applicationStore = useLegendStudioApplicationStore();
32
+ const baseStore = useLegendStudioBaseStore();
33
+ const store = useLocalObservable(() => new DataSpaceTemplateQueryPromotionReviewerStore(applicationStore, baseStore.sdlcServerClient, baseStore.depotServerClient));
34
+ store.initialize(queryId, dataSpacePath);
35
+ return (_jsx(TemplateQueryPromotionReviewerStoreContext.Provider, { value: store, children: children }));
36
+ };
37
+ const useTemplateQueryPromotionReviewerStore = () => guaranteeNonNullable(useContext(TemplateQueryPromotionReviewerStoreContext), `Can't find query productionizer store in context`);
38
+ const TemplateQueryPromotionReviewerContent = observer(() => {
39
+ const applicationStore = useApplicationStore();
40
+ const queryPromotionReviewerStore = useTemplateQueryPromotionReviewerStore();
41
+ const isLoadingEditor = !queryPromotionReviewerStore.initState.hasCompleted;
42
+ // workspace name
43
+ const changeWorkspaceName = (event) => queryPromotionReviewerStore.setWorkspaceName(event.target.value);
44
+ // template query
45
+ const onChangeTemplateQueryId = (event) => queryPromotionReviewerStore.setTemplateQueryId(event.target.value);
46
+ const onChangeTemplateQueryTitle = (event) => queryPromotionReviewerStore.setTemplateQueryTitle(event.target.value);
47
+ const onChangeTemplateQueryDescription = (event) => queryPromotionReviewerStore.setTemplateQueryDescription(event.target.value);
48
+ // actions
49
+ const promoteTemplateQuery = () => {
50
+ flowResult(queryPromotionReviewerStore.promoteAsTemplateQuery()).catch(applicationStore.alertUnhandledError);
51
+ };
52
+ return (_jsxs("div", { className: "app__page", children: [isLoadingEditor && (_jsx(BlankPanelContent, { children: queryPromotionReviewerStore.initState.message ??
53
+ queryPromotionReviewerStore.graphManagerState.systemBuildState
54
+ .message ??
55
+ queryPromotionReviewerStore.graphManagerState.dependenciesBuildState
56
+ .message ??
57
+ queryPromotionReviewerStore.graphManagerState.generationsBuildState
58
+ .message ??
59
+ queryPromotionReviewerStore.graphManagerState.graphBuildState
60
+ .message })), _jsxs("div", { className: "template-query-promotor", children: [_jsxs("div", { className: "template-query-promotor__body", children: [_jsx("div", { className: "activity-bar", children: _jsx(ActivityBarMenu, {}) }), _jsx("div", { className: "template-query-promotor__content", "data-testid": LEGEND_STUDIO_TEST_ID.SETUP__CONTENT, children: _jsxs("div", { className: "template-query-promotor__content__main", children: [_jsxs("div", { className: "template-query-promotor__title", children: ["Promote as Curated Template Query", _jsx(DocumentationLink, { documentationKey: DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.CURATED_TEMPLATE_QUERY })] }), _jsx("div", { className: "template-query-promotor__title__prompt", children: "We will promote this query as a curated template query in dataspace. This automated process will generate a code review and workspace. Please get the generated code review reviewed and approved." }), _jsxs("div", { className: "template-query-promotor__group template-query-promotor__group--workspace", children: [_jsx("div", { className: "template-query-promotor__group__header", children: "workspace" }), _jsx("div", { className: "template-query-promotor__group__content", children: _jsxs("div", { className: "template-query-promotor__input", children: [_jsx("div", { className: "template-query-promotor__input__icon", title: "workspace", children: _jsx(GitBranchIcon, { className: "template-query-promotor__input__icon--workspce" }) }), _jsxs("div", { className: "input-group template-query-promotor__input__input", children: [_jsx("input", { className: clsx('input input--dark input-group__input', {
61
+ 'input-group__input--error': !queryPromotionReviewerStore.isWorkspaceNameValid,
62
+ }), spellCheck: false, value: queryPromotionReviewerStore.workspaceName, placeholder: "Enter a name for your workspace", onChange: changeWorkspaceName }), !queryPromotionReviewerStore.isWorkspaceNameValid && (_jsx("div", { className: "input-group__error-message", children: "Workspace already existed" }))] })] }) })] }), _jsxs("div", { className: "template-query-promotor__group template-query-promotor__group--template", children: [_jsx("div", { className: "template-query-promotor__group__header", children: "template query" }), _jsxs("div", { className: "template-query-promotor__group__content", children: [_jsxs("div", { className: "template-query-promotor__input", children: [_jsx("div", { className: "template-query-promotor__input__label", children: "id" }), _jsxs("div", { className: "input-group template-query-promotor__input__input", children: [_jsx("input", { className: clsx('input input--dark input-group__input', {
63
+ 'input-group__input--error': !queryPromotionReviewerStore.isTemplateQueryIdValid,
64
+ }), spellCheck: false, placeholder: "Create an id for your template query", value: queryPromotionReviewerStore.templateQueryId, onChange: onChangeTemplateQueryId }), !queryPromotionReviewerStore.isTemplateQueryIdValid && (_jsx("div", { className: "input-group__error-message", children: "Invalid template query id" }))] })] }), _jsxs("div", { className: "template-query-promotor__input", children: [_jsx("div", { className: "template-query-promotor__input__label", children: "title" }), _jsx("div", { className: "input-group template-query-promotor__input__input", children: _jsx("input", { className: "input input--dark input-group__input", spellCheck: false, placeholder: "Create a title for your template query", value: queryPromotionReviewerStore.templateQueryTitle, onChange: onChangeTemplateQueryTitle }) })] }), _jsxs("div", { className: "template-query-promotor__input", children: [_jsx("div", { className: "template-query-promotor__input__label", children: "description" }), _jsx("div", { className: "input-group template-query-promotor__input__input", children: _jsx("input", { className: "input input--dark input-group__input", spellCheck: false, placeholder: "Add some descriptions for your template query", value: queryPromotionReviewerStore.templateQueryDescription, onChange: onChangeTemplateQueryDescription }) })] })] })] }), _jsx("div", { className: "template-query-promotor__actions", children: _jsx("button", { className: "template-query-promotor__next-btn btn--dark", onClick: promoteTemplateQuery, disabled: queryPromotionReviewerStore.promoteState.isInProgress ||
65
+ !queryPromotionReviewerStore.currentQuery ||
66
+ !queryPromotionReviewerStore.currentQueryInfo ||
67
+ !queryPromotionReviewerStore.currentProject ||
68
+ !queryPromotionReviewerStore
69
+ .currentProjectConfigurationStatus?.isConfigured ||
70
+ !queryPromotionReviewerStore.workspaceName ||
71
+ !queryPromotionReviewerStore.templateQueryTitle ||
72
+ !queryPromotionReviewerStore.isWorkspaceNameValid ||
73
+ !queryPromotionReviewerStore.isTemplateQueryIdValid, children: "Promote Query" }) })] }) })] }), _jsx("div", { "data-testid": LEGEND_STUDIO_TEST_ID.STATUS_BAR, className: "editor__status-bar" })] })] }));
74
+ });
75
+ export const DataSpaceTemplateQueryPromotionReviewer = observer(() => {
76
+ const parameters = useParams();
77
+ const dataSpacePath = parameters[DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
78
+ const queryId = parameters[DATA_SPACE_TEMPLATE_QUERY_PROMOTION_ROUTE_PATTERN_TOKEN.QUERY_ID];
79
+ return (_jsx(DataSpaceTemplateQueryPromotionReviewerStoreProvider, { dataSpacePath: dataSpacePath, queryId: queryId, children: _jsx(TemplateQueryPromotionReviewerContent, {}) }));
80
+ });
81
+ //# sourceMappingURL=DataSpaceTemplateQueryPromoteReview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpaceTemplateQueryPromoteReview.js","sourceRoot":"","sources":["../../src/components/DataSpaceTemplateQueryPromoteReview.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EACL,e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D,CAAC,2BAA2B,CAAC,sBAAsB,8BAI9C,GACL,IACF,GACF,IACF,EACN,6BACe,qBAAqB,CAAC,UAAU,EAC7C,SAAS,EAAC,oBAAoB,GAC9B,IACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uCAAuC,GAAG,QAAQ,CAAC,GAAG,EAAE;IACnE,MAAM,UAAU,GACd,SAAS,EAAqD,CAAC;IACjE,MAAM,aAAa,GACjB,UAAU,CACR,uDAAuD,CAAC,eAAe,CACxE,CAAC;IACJ,MAAM,OAAO,GACX,UAAU,CACR,uDAAuD,CAAC,QAAQ,CACjE,CAAC;IAEJ,OAAO,CACL,KAAC,oDAAoD,IACnD,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,YAEhB,KAAC,qCAAqC,KAAG,GACY,CACxD,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/lib/index.css ADDED
@@ -0,0 +1,17 @@
1
+ /** @license @finos/legend-extension-dsl-data-space-studio v0.1.0
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ .data-space-preview__dialog{height:calc(100vh - 4rem);width:calc(100vw - 4rem);border:none !important}.data-space-preview__dialog__container__content{max-height:100vh !important}.data-space-preview__dialog__header{display:flex;align-items:center;height:3.8rem}.data-space-preview__dialog__header__actions{display:flex;align-items:center;height:100%}.data-space-preview__dialog__header__action{display:flex;align-items:center;justify-content:center;height:100%;width:3.8rem}.data-space-preview__dialog__header__action svg{font-size:1.6rem;color:var(--color-dark-shade-300)}.data-space-preview__dialog__header__action:hover svg{color:var(--color-dark-shade-800)}.data-space-preview__dialog__content{height:calc(100% - 3.8rem);border:.1rem solid var(--color-dark-grey-80)}.data-space-preview__dialog__content--failed{display:flex;align-items:center;height:2.8rem}.data-space-preview__dialog__content--failed__icon{display:flex;align-items:center;justify-content:center;height:100%}.data-space-preview__dialog__content--failed__text{margin-left:.5rem;color:var(--color-dark-grey-300);font-weight:700;cursor:default;user-select:none;text-align:center;line-height:2.8rem}.template-query-promotor{height:100%;position:relative;background:var(--color-dark-grey-50)}.template-query-promotor__body{height:calc(100% - 2.2rem);width:100%}.template-query-promotor__title{font-size:3.6rem;font-family:"Roboto Condensed",sans-serif;font-weight:700;color:var(--color-light-grey-200);margin-bottom:1.8rem}.template-query-promotor__title__prompt{font-family:"Roboto Mono",monospace;font-size:1.4rem;padding-bottom:1rem;border-radius:.2rem 0 0 .2rem;color:var(--color-dark-grey-500)}.template-query-promotor__content{height:100%;width:calc(100% - 5rem)}.template-query-promotor__content__main{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:60vh;width:60vw}.template-query-promotor__actions{margin-top:.5rem;width:100%;display:flex;justify-content:flex-end}.template-query-promotor__group__header{display:flex;align-items:center;justify-content:center;height:1.8rem;width:13rem;padding:0 1rem;background:var(--color-dark-grey-400);color:var(--color-light-grey-0);font-weight:500;font-size:1.2rem;border-radius:.2rem .2rem 0 0}.template-query-promotor__group__content{padding:.5rem;border:.1rem solid var(--color-dark-grey-400);border-radius:0 .2rem .2rem}.template-query-promotor__group--workspace .template-query-promotor__group__header{background:var(--color-purple-400)}.template-query-promotor__group--workspace .template-query-promotor__group__content{border-color:var(--color-purple-400)}.template-query-promotor__group--template .template-query-promotor__group__header{background:var(--color-blue-200)}.template-query-promotor__group--template .template-query-promotor__group__content{border-color:var(--color-blue-200)}.template-query-promotor__group+.template-query-promotor__group{margin-top:1.5rem}.template-query-promotor__input{display:flex}.template-query-promotor__input__label{display:flex;align-items:center;width:11rem;background:var(--color-dark-grey-200);font-family:"Roboto Mono",monospace;font-size:1.4rem;padding:0 1rem;border-radius:.2rem 0 0 .2rem;color:var(--color-dark-grey-500)}.template-query-promotor__input__icon{display:flex;align-items:center;justify-content:center;height:2.8rem;width:2.8rem;background:var(--color-dark-grey-200);border-radius:.2rem 0 0 .2rem}.template-query-promotor__input__icon svg{color:var(--color-dark-grey-400)}.template-query-promotor__input__icon--query,.template-query-promotor__input__icon--project,.template-query-promotor__input__icon--workspace{font-size:1.8rem}.template-query-promotor__input__input{flex:1 0}.template-query-promotor__input+.template-query-promotor__input{margin-top:.5rem}.template-query-promotor__next-btn{padding:1rem}:root{--color-data-space: var(--color-blue-50)}.icon--data-space{color:var(--color-data-space)}/*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../style/_data-space-studio-plugin.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss","../style/_data-space-template-query-promotor.scss","../style/index.scss"],"names":[],"mappings":"AAkBA,4BACE,0BACA,yBACA,uBAEA,gDACE,4BAGF,oCCGA,aACA,mBDDE,cAGF,6CCHA,aACA,mBDKE,YAGF,4CCfA,aACA,mBACA,uBDgBE,YACA,aAEA,gDACE,iBACA,kCAGF,sDACE,kCAIJ,qCACE,2BACA,6CAEA,6CC7BF,aACA,mBD+BI,cAEA,mDCxCJ,aACA,mBACA,uBDyCM,YAGF,mDACE,kBACA,iCACA,gBACA,eACA,iBACA,kBACA,mBE3DR,yBACE,YACA,kBACA,qCAEA,+BACE,2BACA,WAGF,gCACE,iBACA,0CACA,gBACA,kCACA,qBAEA,wCACE,oCACA,iBACA,oBACA,8BACA,iCAIJ,kCACE,YACA,wBAGF,wCDhCA,kBACA,QACA,SACA,gCCgCE,YACA,WAGF,kCACE,iBACA,WACA,aACA,yBAIA,wCDxCF,aACA,mBACA,uBCyCI,cACA,YACA,eACA,sCACA,gCACA,gBACA,iBACA,8BAGF,yCACE,cACA,8CACA,4BAGF,mFACE,mCAGF,oFACE,qCAGF,kFACE,iCAGF,mFACE,mCAGF,gEACE,kBAIJ,gCACE,aAEA,uCD7EF,aACA,mBC+EI,YACA,sCACA,oCACA,iBACA,eACA,8BACA,iCAGF,sCD/FF,aACA,mBACA,uBCgGI,cACA,aACA,sCACA,8BAEA,0CACE,iCAIJ,6IAGE,iBAGF,uCACE,SAGF,gEACE,iBAIJ,mCACE,aCjIJ,MACE,yCAGF,kBACE","file":"index.css"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,17 @@
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
+ export { DSL_DataSpace_LegendStudioApplicationPlugin } from './components/DSL_DataSpace_LegendStudioApplicationPlugin.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,2CAA2C,EAAE,MAAM,6DAA6D,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,17 @@
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
+ export { DSL_DataSpace_LegendStudioApplicationPlugin } from './components/DSL_DataSpace_LegendStudioApplicationPlugin.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,2CAA2C,EAAE,MAAM,6DAA6D,CAAC"}
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@finos/legend-extension-dsl-data-space-studio",
3
+ "version": "0.1.0",
4
+ "description": "Legend extension for Data Space DSL - Studio",
5
+ "keywords": [
6
+ "legend",
7
+ "legend-extension",
8
+ "dsl",
9
+ "dsl-data-space",
10
+ "studio"
11
+ ],
12
+ "homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-extension-dsl-data-space-studio",
13
+ "bugs": {
14
+ "url": "https://github.com/finos/legend-studio/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/finos/legend-studio.git",
19
+ "directory": "packages/legend-extension-dsl-data-space-studio"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "sideEffects": false,
23
+ "type": "module",
24
+ "exports": {
25
+ ".": "./lib/index.js",
26
+ "./lib/index.css": "./lib/index.css"
27
+ },
28
+ "scripts": {
29
+ "build": "yarn clean && yarn build:sass && yarn build:ts",
30
+ "build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
31
+ "build:ts": "tsc --project ./tsconfig.build.json",
32
+ "clean": "npm-run-all clean:cache clean:lib",
33
+ "clean:cache": "rimraf \"build\"",
34
+ "clean:lib": "rimraf \"lib\"",
35
+ "dev": "npm-run-all --parallel dev:sass dev:ts",
36
+ "dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
37
+ "dev:ts": "tsc --watch --preserveWatchOutput",
38
+ "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
39
+ "publish:prepare": "node ../../scripts/release/preparePublishContent.js",
40
+ "publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
41
+ "test": "jest",
42
+ "test:watch": "jest --watch"
43
+ },
44
+ "dependencies": {
45
+ "@finos/legend-application": "workspace:*",
46
+ "@finos/legend-application-studio": "workspace:*",
47
+ "@finos/legend-art": "workspace:*",
48
+ "@finos/legend-extension-dsl-data-space": "workspace:*",
49
+ "@finos/legend-server-depot": "workspace:*",
50
+ "@finos/legend-server-sdlc": "workspace:*",
51
+ "@finos/legend-shared": "workspace:*",
52
+ "mobx": "6.10.2",
53
+ "mobx-react-lite": "4.0.5"
54
+ },
55
+ "devDependencies": {
56
+ "@finos/legend-dev-utils": "workspace:*",
57
+ "@jest/globals": "29.7.0",
58
+ "cross-env": "7.0.3",
59
+ "eslint": "8.52.0",
60
+ "jest": "29.7.0",
61
+ "npm-run-all": "4.1.5",
62
+ "rimraf": "5.0.5",
63
+ "sass": "1.69.4",
64
+ "typescript": "5.2.2"
65
+ },
66
+ "peerDependencies": {
67
+ "react": "^18.0.0"
68
+ },
69
+ "publishConfig": {
70
+ "directory": "build/publishContent"
71
+ },
72
+ "extensions": {
73
+ "applicationStudioPlugin": "@finos/legend-application-studio-plugin-dsl-data-space"
74
+ }
75
+ }
@@ -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 { EditorExtensionState, type EditorStore } from '@finos/legend-application-studio';
17
+ import { DataSpaceViewerState } from '@finos/legend-extension-dsl-data-space/application';
18
+ import { type DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
19
+ import { type GeneratorFn, ActionState } from '@finos/legend-shared';
20
+ export declare class DataSpacePreviewState extends EditorExtensionState {
21
+ private static readonly IDENTIFIER;
22
+ readonly editorStore: EditorStore;
23
+ readonly loadDataSpaceState: ActionState;
24
+ dataSpace?: DataSpace | undefined;
25
+ dataSpaceViewerState?: DataSpaceViewerState | undefined;
26
+ constructor(editorStore: EditorStore);
27
+ get INTERNAL__identifierKey(): string;
28
+ static retrieveNullableState(editorStore: EditorStore): DataSpacePreviewState | undefined;
29
+ static retrieveState(editorStore: EditorStore): DataSpacePreviewState;
30
+ setDataSpace(val: DataSpace | undefined): void;
31
+ previewDataSpace(dataSpace: DataSpace): GeneratorFn<void>;
32
+ }
33
+ //# sourceMappingURL=DataSpacePreviewState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSpacePreviewState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EAEpB,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EAErB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,KAAK,WAAW,EAEhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,qBAAsB,SAAQ,oBAAoB;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAwB;IAE1D,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,kBAAkB,cAAwB;IAEnD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;gBAE5C,WAAW,EAAE,WAAW;IAapC,IAAa,uBAAuB,IAAI,MAAM,CAE7C;IAED,MAAM,CAAC,qBAAqB,CAC1B,WAAW,EAAE,WAAW,GACvB,qBAAqB,GAAG,SAAS;IAqBpC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,qBAAqB;IAOrE,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAO7C,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;CAgG3D"}
@@ -0,0 +1,116 @@
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 { EditorExtensionState, queryClass, } from '@finos/legend-application-studio';
17
+ import { DataSpaceViewerState, EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl, } from '@finos/legend-extension-dsl-data-space/application';
18
+ import { DSL_DataSpace_getGraphManagerExtension, } from '@finos/legend-extension-dsl-data-space/graph';
19
+ import { InMemoryGraphData } from '@finos/legend-graph';
20
+ import { guaranteeNonNullable, ActionState, assertErrorThrown, } from '@finos/legend-shared';
21
+ import { action, flow, makeObservable, observable } from 'mobx';
22
+ export class DataSpacePreviewState extends EditorExtensionState {
23
+ static IDENTIFIER = 'data-space-preview';
24
+ editorStore;
25
+ loadDataSpaceState = ActionState.create();
26
+ dataSpace;
27
+ dataSpaceViewerState;
28
+ constructor(editorStore) {
29
+ super();
30
+ makeObservable(this, {
31
+ dataSpace: observable,
32
+ dataSpaceViewerState: observable,
33
+ setDataSpace: action,
34
+ previewDataSpace: flow,
35
+ });
36
+ this.editorStore = editorStore;
37
+ }
38
+ get INTERNAL__identifierKey() {
39
+ return DataSpacePreviewState.IDENTIFIER;
40
+ }
41
+ static retrieveNullableState(editorStore) {
42
+ return editorStore.extensionStates.find((extensionState) => {
43
+ if (
44
+ /**
45
+ * In development mode, when we make changes in certain areas like utils or base states, the following `instanceof`
46
+ * check will fail as if there were multiple copies of the classes with the same name, this could be caused by either
47
+ * React `fast-refresh` or `webpack HMR`; we didn't have time to really do a thorough debug here, as such,
48
+ * we will just do a simple key check to match the right state to bypass the problem for development mode.
49
+ */
50
+ // eslint-disable-next-line no-process-env
51
+ process.env.NODE_ENV === 'development') {
52
+ return (extensionState.INTERNAL__identifierKey ===
53
+ DataSpacePreviewState.IDENTIFIER);
54
+ }
55
+ return extensionState instanceof DataSpacePreviewState;
56
+ });
57
+ }
58
+ static retrieveState(editorStore) {
59
+ return guaranteeNonNullable(DataSpacePreviewState.retrieveNullableState(editorStore), `Can't find data space preview state: make sure it is added as an editor extension state`);
60
+ }
61
+ setDataSpace(val) {
62
+ this.dataSpace = val;
63
+ if (val === undefined) {
64
+ this.dataSpaceViewerState = undefined;
65
+ }
66
+ }
67
+ *previewDataSpace(dataSpace) {
68
+ this.setDataSpace(dataSpace);
69
+ this.loadDataSpaceState.inProgress();
70
+ this.loadDataSpaceState.setMessage(`Initializing...`);
71
+ try {
72
+ const groupId = this.editorStore.projectConfigurationEditorState
73
+ .currentProjectConfiguration.groupId;
74
+ const artifactId = this.editorStore.projectConfigurationEditorState
75
+ .currentProjectConfiguration.artifactId;
76
+ const versionId = 'LOCAL';
77
+ // analyze data space
78
+ const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(this.editorStore.graphManagerState.graphManager).analyzeDataSpace(dataSpace.path, async () => this.editorStore.graphManagerState.graph.allOwnElements
79
+ .map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))
80
+ .concat(this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))), undefined, this.loadDataSpaceState));
81
+ this.dataSpaceViewerState = new DataSpaceViewerState(this.editorStore.applicationStore, this.editorStore.graphManagerState, groupId, artifactId, versionId, analysisResult, {
82
+ retrieveGraphData: () => new InMemoryGraphData(this.editorStore.graphManagerState.graph),
83
+ queryDataSpace: () => {
84
+ this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
85
+ },
86
+ viewProject: () => {
87
+ this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
88
+ },
89
+ viewSDLCProject: async () => {
90
+ this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
91
+ },
92
+ queryClass: (_class) => {
93
+ queryClass(_class, this.editorStore).catch(this.editorStore.applicationStore.alertUnhandledError);
94
+ },
95
+ openServiceQuery: (servicePath) => {
96
+ if (this.editorStore.applicationStore.config.queryApplicationUrl) {
97
+ this.editorStore.applicationStore.navigationService.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl(this.editorStore.applicationStore.config.queryApplicationUrl, groupId, artifactId, versionId, servicePath));
98
+ }
99
+ else {
100
+ this.editorStore.applicationStore.notificationService.notifyWarning('Query application URL is not configured');
101
+ }
102
+ },
103
+ });
104
+ this.loadDataSpaceState.pass();
105
+ }
106
+ catch (error) {
107
+ assertErrorThrown(error);
108
+ this.loadDataSpaceState.fail();
109
+ this.editorStore.applicationStore.notificationService.notifyError(error);
110
+ }
111
+ finally {
112
+ this.loadDataSpaceState.setMessage(undefined);
113
+ }
114
+ }
115
+ }
116
+ //# sourceMappingURL=DataSpacePreviewState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataSp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