@finos/legend-extension-dsl-data-space-studio 0.1.305 → 0.1.307
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/DataSpaceEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceEditor.js +48 -4
- package/lib/components/DataSpaceEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DataSpaceEditorState.d.ts +2 -1
- package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
- package/lib/stores/DataSpaceEditorState.js +21 -1
- package/lib/stores/DataSpaceEditorState.js.map +1 -1
- package/lib/stores/DataSpaceToDataProductConverter.d.ts +2 -1
- package/lib/stores/DataSpaceToDataProductConverter.d.ts.map +1 -1
- package/lib/stores/DataSpaceToDataProductConverter.js +1 -1
- package/lib/stores/DataSpaceToDataProductConverter.js.map +1 -1
- package/package.json +11 -11
- package/src/components/DataSpaceEditor.tsx +135 -6
- package/src/stores/DataSpaceEditorState.ts +41 -1
- package/src/stores/DataSpaceToDataProductConverter.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditor.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceEditor.d.ts","sourceRoot":"","sources":["../../src/components/DataSpaceEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkCH,eAAO,MAAM,eAAe;;CAwM1B,CAAC"}
|
|
@@ -14,14 +14,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { useState } from 'react';
|
|
17
18
|
import { observer } from 'mobx-react-lite';
|
|
18
19
|
import { useEditorStore } from '@finos/legend-application-studio';
|
|
19
|
-
import { EyeIcon,
|
|
20
|
-
import { DataSpaceEditorState, onConvertDataSpaceToDataProduct, } from '../stores/DataSpaceEditorState.js';
|
|
20
|
+
import { EyeIcon, WandIcon, Panel, PanelContent, PanelHeader, Dialog, Modal, ModalHeader, ModalBody, ModalFooter, ModalFooterButton, CustomSelectorInput, } from '@finos/legend-art';
|
|
21
|
+
import { DataSpaceEditorState, onConvertDataSpaceToDataProduct, onMergeDataSpaceToDataProduct, } from '../stores/DataSpaceEditorState.js';
|
|
21
22
|
import { DataSpaceGeneralEditor } from './DataSpaceGeneralEditor/DataSpaceGeneralEditor.js';
|
|
22
23
|
import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
|
|
23
24
|
import { flowResult } from 'mobx';
|
|
24
|
-
import { isStubbed_PackageableElement } from '@finos/legend-graph';
|
|
25
|
+
import { isStubbed_PackageableElement, } from '@finos/legend-graph';
|
|
25
26
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
26
27
|
import { useApplicationNavigationContext } from '@finos/legend-application';
|
|
27
28
|
export const DataSpaceEditor = observer(() => {
|
|
@@ -43,7 +44,50 @@ export const DataSpaceEditor = observer(() => {
|
|
|
43
44
|
const convertDataSpace = () => {
|
|
44
45
|
flowResult(onConvertDataSpaceToDataProduct(dataSpace, editorStore, dataSpaceState)).catch(editorStore.applicationStore.alertUnhandledError);
|
|
45
46
|
};
|
|
47
|
+
const eligibleMergeTargets = editorStore.graphManagerState.graph.ownDataProducts.filter((dp) => dp.nativeModelAccess === undefined);
|
|
48
|
+
const mergeDataSpace = (targetDataProduct) => {
|
|
49
|
+
flowResult(onMergeDataSpaceToDataProduct(dataSpace, targetDataProduct, editorStore, dataSpaceState)).catch(editorStore.applicationStore.alertUnhandledError);
|
|
50
|
+
};
|
|
51
|
+
const [showConvertModal, setShowConvertModal] = useState(false);
|
|
52
|
+
const modeOptions = [
|
|
53
|
+
{ label: 'Merge', value: 'merge' },
|
|
54
|
+
{ label: 'Create', value: 'create' },
|
|
55
|
+
];
|
|
56
|
+
const [selectedMode, setSelectedMode] = useState(modeOptions[0] ?? null);
|
|
57
|
+
const mergeTargetOptions = eligibleMergeTargets.map((dp) => ({
|
|
58
|
+
label: dp.path,
|
|
59
|
+
value: dp,
|
|
60
|
+
}));
|
|
61
|
+
const [selectedMergeTarget, setSelectedMergeTarget] = useState(mergeTargetOptions[0] ?? null);
|
|
62
|
+
const onConvertButtonClick = () => {
|
|
63
|
+
if (eligibleMergeTargets.length === 0) {
|
|
64
|
+
convertDataSpace();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
setSelectedMode(modeOptions[0] ?? null);
|
|
68
|
+
setSelectedMergeTarget(mergeTargetOptions[0] ?? null);
|
|
69
|
+
setShowConvertModal(true);
|
|
70
|
+
};
|
|
71
|
+
const closeConvertModal = () => setShowConvertModal(false);
|
|
72
|
+
const handleConvertConfirm = () => {
|
|
73
|
+
closeConvertModal();
|
|
74
|
+
if (selectedMode?.value === 'merge' && selectedMergeTarget) {
|
|
75
|
+
mergeDataSpace(selectedMergeTarget.value);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
convertDataSpace();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
46
81
|
useApplicationNavigationContext(DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.DATA_SPACE_EDITOR);
|
|
47
|
-
return (_jsxs(Panel, { className: "dataSpace-editor", children: [_jsx(PanelHeader, { title: "Data Product", titleContent: dataSpaceState.dataSpace.name, darkMode: true, isReadOnly: dataSpaceState.isReadOnly }), _jsx(PanelHeader, { title: "General", darkMode: true, children: _jsxs("div", { className: "panel__header__actions", children: [_jsx("div", { className: "btn__dropdown-combo btn__dropdown-combo--primary", children: _jsxs("button", { className: "btn__dropdown-combo__label", onClick:
|
|
82
|
+
return (_jsxs(Panel, { className: "dataSpace-editor", children: [_jsx(PanelHeader, { title: "Data Product", titleContent: dataSpaceState.dataSpace.name, darkMode: true, isReadOnly: dataSpaceState.isReadOnly }), _jsx(PanelHeader, { title: "General", darkMode: true, children: _jsxs("div", { className: "panel__header__actions", children: [_jsx("div", { className: "btn__dropdown-combo btn__dropdown-combo--primary", children: _jsxs("button", { className: "btn__dropdown-combo__label", onClick: onConvertButtonClick, title: "Convert to Data Product", tabIndex: -1, style: { width: 'auto', whiteSpace: 'nowrap' }, children: [_jsx(WandIcon, { className: "btn__dropdown-combo__label__icon" }), _jsx("div", { className: "btn__dropdown-combo__label__title", children: "Convert to DataProduct" })] }) }), _jsx("div", { className: "btn__dropdown-combo btn__dropdown-combo--primary", children: _jsxs("button", { className: "btn__dropdown-combo__label", onClick: previewDataSpace, title: "Preview Data Product", tabIndex: -1, disabled: !validPreviewState(), children: [_jsx(EyeIcon, { className: "btn__dropdown-combo__label__icon" }), _jsx("div", { className: "btn__dropdown-combo__label__title", children: "Preview" })] }) })] }) }), _jsx(Dialog, { open: showConvertModal, onClose: closeConvertModal, children: _jsxs(Modal, { darkMode: true, children: [_jsx(ModalHeader, { title: "Convert to Data Product" }), _jsxs(ModalBody, { children: [_jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Mode" }), _jsx(CustomSelectorInput, { options: modeOptions, onChange: (val) => {
|
|
83
|
+
if (val) {
|
|
84
|
+
setSelectedMode(val);
|
|
85
|
+
if (val.value === 'merge') {
|
|
86
|
+
setSelectedMergeTarget(mergeTargetOptions[0] ?? null);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}, value: selectedMode, darkMode: true })] }), selectedMode?.value === 'merge' && (_jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Target Data Product" }), _jsx(CustomSelectorInput, { options: mergeTargetOptions, onChange: (val) => {
|
|
90
|
+
setSelectedMergeTarget(val);
|
|
91
|
+
}, value: selectedMergeTarget, darkMode: true })] }))] }), _jsxs(ModalFooter, { children: [_jsx(ModalFooterButton, { text: "Cancel", onClick: closeConvertModal, type: "secondary" }), _jsx(ModalFooterButton, { text: selectedMode?.value === 'merge' ? 'Merge' : 'Create', onClick: handleConvertConfirm, disabled: selectedMode?.value === 'merge' && !selectedMergeTarget })] })] }) }), _jsx(PanelContent, { children: _jsx(DataSpaceGeneralEditor, {}) })] }));
|
|
48
92
|
});
|
|
49
93
|
//# sourceMappingURL=DataSpaceEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditor.js","sourceRoot":"","sources":["../../src/components/DataSpaceEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EACL,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"DataSpaceEditor.js","sourceRoot":"","sources":["../../src/components/DataSpaceEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,WAAW,EACX,MAAM,EACN,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,6BAA6B,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE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E,mBAAmB,EAC1B,QAAQ,EAAE,IAAI,GACd,IACE,CACP,IACS,EACZ,MAAC,WAAW,eACV,KAAC,iBAAiB,IAChB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAC,WAAW,GAChB,EACF,KAAC,iBAAiB,IAChB,IAAI,EAAE,YAAY,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAC1D,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,YAAY,EAAE,KAAK,KAAK,OAAO,IAAI,CAAC,mBAAmB,GACjE,IACU,IACR,GACD,EAET,KAAC,YAAY,cACX,KAAC,sBAAsB,KAAG,GACb,IACT,CACT,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license @finos/legend-extension-dsl-data-space-studio v0.1.
|
|
1
|
+
/** @license @finos/legend-extension-dsl-data-space-studio v0.1.307
|
|
2
2
|
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
.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}.dataSpace-editor--dark__header{padding-left:0;background:var(--color-dark-grey-50)}.dataSpace-editor--dark__header__configs{display:flex;width:100%}.dataSpace-editor--dark__header__name{background:var(--color-dark-grey-100);border:.1rem solid var(--color-dark-grey-300);color:var(--color-light-grey-0)}.dataSpace-editor--dark__header__name::placeholder{color:var(--color-dark-grey-300)}.panel__content__form__section__list__item{background-color:var(--color-dark-grey-85);margin-bottom:.5rem;padding:.5rem;border-radius:3px;width:fit-content}.panel__content__form__section__list__item__content__label{color:var(--color-light-grey-200);font-size:1.2rem}.panel__content__form__section__list__item__content__title{color:var(--color-light-grey-200);font-size:1.2rem}.panel__content__form__section__list__item__content__form{display:flex;flex-direction:column;width:100%;margin-right:1rem}.panel__content__form__section__list__item__content__form .panel__content__form__section{margin-bottom:.5rem}.panel__content__form__section__list__item__content__form .panel__content__form__section:last-child{margin-bottom:0}.panel__content__form__section__list__item__content__actions{display:flex;align-items:center;gap:.5rem}.panel__content__form__section__list__item__content__actions__label{color:var(--color-light-grey-200);font-size:1.2rem;margin-left:.5rem}.panel__content__form__section__list__item__content__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-light-grey-200)}.panel__content__form__section__list__item__content__actions__btn:hover{color:var(--color-light-grey-100)}.panel__content__form__section__list__item__form{display:flex;flex-direction:column;margin-top:.5rem}.panel__content__form__section__list__item__form .panel__content__form__section{margin-bottom:.5rem}.panel__content__form__section__list__item__form .panel__content__form__section:last-child{margin-bottom:0}.panel__content__form__section__list__new-item__input{height:fit-content;width:40rem;padding:0}.panel__content__form__section__list__add{display:flex;align-items:center;margin-top:.5rem}.panel__content__form__section__list__add__input{flex:1}.panel__content__form__section__list__add__actions{margin-left:.5rem}.panel__content__form__section__list__add__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-light-grey-200)}.panel__content__form__section__list__add__actions__btn:hover{color:var(--color-light-grey-100)}.dataSpace-editor{background-color:var(--color-dark-grey-85)}.dataSpace-editor .panel__content{background-color:var(--color-dark-grey-85)}.dataSpace-editor .panel__header{background-color:var(--color-dark-grey-50)}.dataSpace-editor__general .panel__content__form__section__list__item{height:fit-content}.dataSpace-editor__general .panel__content__form__section__list__item__form{flex-direction:row}.dataSpace-editor__general .panel__content__form__section__list__item__content{display:flex;align-items:center}.dataSpace-editor__general .panel__content__form__section__list__item .panel__content__form__section{margin-top:0}.dataSpace-editor__general .panel__content__form__section__list__item .dataSpace-editor__general__diagrams__title{width:25rem}.dataSpace-editor__general .panel__content__form__section__list__item .dataSpace-editor__general__diagrams__description{width:40rem}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__label{width:35rem}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions-exclude{display:flex;align-items:center}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions-exclude__btn{padding:0}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions__btn{margin-left:1rem}.dataSpace-editor__general__diagrams .panel__content__form__section__list__item__content{flex-direction:column;align-items:start}.dataSpace-editor__general__diagrams .panel__content__form__section__list__item__content__actions__btn{margin-top:2.4rem}.dataSpace-editor__general__support-info__content{margin-top:1rem}.dataSpace-editor__general__support-info__new-email{display:flex;align-items:center;margin-right:.5rem}.dataSpace-editor__general .panel__content__form{max-width:unset}.dataSpace-editor__general .selector-input--dark{max-width:40rem}.execution-context-editor__form-section{display:flex;flex-direction:column;margin-bottom:1rem}.execution-context-editor__form-section__label{font-size:1.2rem;font-weight:500;margin-bottom:.5rem;color:var(--color-light-grey-200)}.execution-context-editor__form-section__content__input,.execution-context-editor__form-section__content__textarea{width:100%;padding:.5rem;background-color:var(--color-dark-grey-85);color:var(--color-light-grey-200);border:1px solid var(--color-dark-grey-200);border-radius:2px}.execution-context-editor__form-section__content__textarea{min-height:100px;resize:vertical}.service-execution-editor__configuration__items{background-color:var(--color-dark-grey-85);padding:1rem;border-radius:3px}.service-execution-editor__execution{background-color:var(--color-dark-grey-85)}.service-multi-execution-editor__panel{background-color:var(--color-dark-grey-85);overflow-y:auto}.panel__content{background-color:var(--color-dark-grey-85)}.service-execution-editor__configuration__item__dropdown{background-color:var(--color-dark-grey-85);color:var(--color-light-grey-200)}/*# sourceMappingURL=index.css.map */
|
|
17
|
+
.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}.dataSpace-editor--dark__header{padding-left:0;background:var(--color-dark-grey-50)}.dataSpace-editor--dark__header__configs{display:flex;width:100%}.dataSpace-editor--dark__header__name{background:var(--color-dark-grey-100);border:.1rem solid var(--color-dark-grey-300);color:var(--color-light-grey-0)}.dataSpace-editor--dark__header__name::placeholder{color:var(--color-dark-grey-300)}.panel__content__form__section__list__item{background-color:var(--color-dark-grey-85);margin-bottom:.5rem;padding:.5rem;border-radius:3px;width:fit-content}.panel__content__form__section__list__item__content__label{color:var(--color-light-grey-200);font-size:1.2rem}.panel__content__form__section__list__item__content__title{color:var(--color-light-grey-200);font-size:1.2rem}.panel__content__form__section__list__item__content__form{display:flex;flex-direction:column;width:100%;margin-right:1rem}.panel__content__form__section__list__item__content__form .panel__content__form__section{margin-bottom:.5rem}.panel__content__form__section__list__item__content__form .panel__content__form__section:last-child{margin-bottom:0}.panel__content__form__section__list__item__content__actions{display:flex;align-items:center;gap:.5rem}.panel__content__form__section__list__item__content__actions__label{color:var(--color-light-grey-200);font-size:1.2rem;margin-left:.5rem}.panel__content__form__section__list__item__content__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-light-grey-200)}.panel__content__form__section__list__item__content__actions__btn:hover{color:var(--color-light-grey-100)}.panel__content__form__section__list__item__form{display:flex;flex-direction:column;margin-top:.5rem}.panel__content__form__section__list__item__form .panel__content__form__section{margin-bottom:.5rem}.panel__content__form__section__list__item__form .panel__content__form__section:last-child{margin-bottom:0}.panel__content__form__section__list__new-item__input{height:fit-content;width:40rem;padding:0}.panel__content__form__section__list__add{display:flex;align-items:center;margin-top:.5rem}.panel__content__form__section__list__add__input{flex:1}.panel__content__form__section__list__add__actions{margin-left:.5rem}.panel__content__form__section__list__add__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-light-grey-200)}.panel__content__form__section__list__add__actions__btn:hover{color:var(--color-light-grey-100)}.dataSpace-editor{background-color:var(--color-dark-grey-85)}.dataSpace-editor .panel__content{background-color:var(--color-dark-grey-85)}.dataSpace-editor .panel__header{background-color:var(--color-dark-grey-50)}.dataSpace-editor .panel__header__actions{gap:.5rem}.dataSpace-editor__general .panel__content__form__section__list__item{height:fit-content}.dataSpace-editor__general .panel__content__form__section__list__item__form{flex-direction:row}.dataSpace-editor__general .panel__content__form__section__list__item__content{display:flex;align-items:center}.dataSpace-editor__general .panel__content__form__section__list__item .panel__content__form__section{margin-top:0}.dataSpace-editor__general .panel__content__form__section__list__item .dataSpace-editor__general__diagrams__title{width:25rem}.dataSpace-editor__general .panel__content__form__section__list__item .dataSpace-editor__general__diagrams__description{width:40rem}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__label{width:35rem}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions-exclude{display:flex;align-items:center}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions-exclude__btn{padding:0}.dataSpace-editor__general__elements .panel__content__form__section__list__item__content__actions__btn{margin-left:1rem}.dataSpace-editor__general__diagrams .panel__content__form__section__list__item__content{flex-direction:column;align-items:start}.dataSpace-editor__general__diagrams .panel__content__form__section__list__item__content__actions__btn{margin-top:2.4rem}.dataSpace-editor__general__support-info__content{margin-top:1rem}.dataSpace-editor__general__support-info__new-email{display:flex;align-items:center;margin-right:.5rem}.dataSpace-editor__general .panel__content__form{max-width:unset}.dataSpace-editor__general .selector-input--dark{max-width:40rem}.execution-context-editor__form-section{display:flex;flex-direction:column;margin-bottom:1rem}.execution-context-editor__form-section__label{font-size:1.2rem;font-weight:500;margin-bottom:.5rem;color:var(--color-light-grey-200)}.execution-context-editor__form-section__content__input,.execution-context-editor__form-section__content__textarea{width:100%;padding:.5rem;background-color:var(--color-dark-grey-85);color:var(--color-light-grey-200);border:1px solid var(--color-dark-grey-200);border-radius:2px}.execution-context-editor__form-section__content__textarea{min-height:100px;resize:vertical}.service-execution-editor__configuration__items{background-color:var(--color-dark-grey-85);padding:1rem;border-radius:3px}.service-execution-editor__execution{background-color:var(--color-dark-grey-85)}.service-multi-execution-editor__panel{background-color:var(--color-dark-grey-85);overflow-y:auto}.panel__content{background-color:var(--color-dark-grey-85)}.service-execution-editor__configuration__item__dropdown{background-color:var(--color-dark-grey-85);color:var(--color-light-grey-200)}/*# sourceMappingURL=index.css.map */
|
package/lib/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../style/_data-space-template-query-promotor.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss","../style/_data-space-editor.scss","../style/components/_execution-context-editor.scss"],"names":[],"mappings":"AAkBA,yBACE,YACA,kBACA,qCAEA,+BACE,2BACA,WAGF,gCACE,iBACA,0CACA,gBACA,kCACA,qBAEA,wCACE,oCACA,iBACA,oBACA,8BACA,iCAIJ,kCACE,YACA,wBAGF,wCChCA,kBACA,QACA,SACA,gCDgCE,YACA,WAGF,kCACE,iBACA,WACA,aACA,yBAIA,wCCxCF,aACA,mBACA,uBDyCI,cACA,YACA,eACA,sCACA,gCACA,gBACA,iBACA,8BAGF,yCACE,cACA,8CACA,4BAGF,mFACE,mCAGF,oFACE,qCAGF,kFACE,iCAGF,mFACE,mCAGF,gEACE,kBAIJ,gCACE,aAEA,uCC7EF,aACA,mBD+EI,YACA,sCACA,oCACA,iBACA,eACA,8BACA,iCAGF,sCC/FF,aACA,mBACA,uBDgGI,cACA,aACA,sCACA,8BAEA,0CACE,iCAIJ,6IAGE,iBAGF,uCACE,SAGF,gEACE,iBAIJ,mCACE,aEjIF,gCACE,eACA,qCAEA,yCACE,aACA,WAGF,sCACE,sCACA,8CACA,gCAGF,mDACE,iCAMJ,2CACE,2CACA,oBACA,cACA,kBACA,kBAGE,2DACE,kCACA,iBAGF,2DACE,kCACA,iBAGF,0DACE,aACA,sBACA,WACA,kBAEA,yFACE,oBAEA,oGACE,gBAKN,6DACE,aACA,mBACA,UAEA,oEACE,kCACA,iBACA,kBAGF,kEACE,gBACA,YACA,eACA,kCAEA,wEACE,kCAMR,iDACE,aACA,sBACA,iBAEA,gFACE,oBAEA,2FACE,gBAON,sDACE,mBACA,YACA,UAIJ,0CACE,aACA,mBACA,iBAEA,iDACE,OAGF,mDACE,kBAEA,wDACE,gBACA,YACA,eACA,kCAEA,8DACE,kCAOV,kBACE,2CAEA,kCACE,2CAGF,iCACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/_data-space-template-query-promotor.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss","../style/_data-space-editor.scss","../style/components/_execution-context-editor.scss"],"names":[],"mappings":"AAkBA,yBACE,YACA,kBACA,qCAEA,+BACE,2BACA,WAGF,gCACE,iBACA,0CACA,gBACA,kCACA,qBAEA,wCACE,oCACA,iBACA,oBACA,8BACA,iCAIJ,kCACE,YACA,wBAGF,wCChCA,kBACA,QACA,SACA,gCDgCE,YACA,WAGF,kCACE,iBACA,WACA,aACA,yBAIA,wCCxCF,aACA,mBACA,uBDyCI,cACA,YACA,eACA,sCACA,gCACA,gBACA,iBACA,8BAGF,yCACE,cACA,8CACA,4BAGF,mFACE,mCAGF,oFACE,qCAGF,kFACE,iCAGF,mFACE,mCAGF,gEACE,kBAIJ,gCACE,aAEA,uCC7EF,aACA,mBD+EI,YACA,sCACA,oCACA,iBACA,eACA,8BACA,iCAGF,sCC/FF,aACA,mBACA,uBDgGI,cACA,aACA,sCACA,8BAEA,0CACE,iCAIJ,6IAGE,iBAGF,uCACE,SAGF,gEACE,iBAIJ,mCACE,aEjIF,gCACE,eACA,qCAEA,yCACE,aACA,WAGF,sCACE,sCACA,8CACA,gCAGF,mDACE,iCAMJ,2CACE,2CACA,oBACA,cACA,kBACA,kBAGE,2DACE,kCACA,iBAGF,2DACE,kCACA,iBAGF,0DACE,aACA,sBACA,WACA,kBAEA,yFACE,oBAEA,oGACE,gBAKN,6DACE,aACA,mBACA,UAEA,oEACE,kCACA,iBACA,kBAGF,kEACE,gBACA,YACA,eACA,kCAEA,wEACE,kCAMR,iDACE,aACA,sBACA,iBAEA,gFACE,oBAEA,2FACE,gBAON,sDACE,mBACA,YACA,UAIJ,0CACE,aACA,mBACA,iBAEA,iDACE,OAGF,mDACE,kBAEA,wDACE,gBACA,YACA,eACA,kCAEA,8DACE,kCAOV,kBACE,2CAEA,kCACE,2CAGF,iCACE,2CAGF,0CACE,UAIA,sEACE,mBAEA,4EACE,mBAGF,+EACE,aACA,mBAGF,qGACE,aAGF,kHACE,YAGF,wHACE,YAKF,gGACE,YAIA,0GACE,aACA,mBAEA,+GACE,UAIJ,uGACE,iBAMJ,yFACE,sBACA,kBAEA,uGACE,kBAMJ,kDACE,gBAGF,oDACE,aACA,mBACA,mBAIJ,iDACE,gBAGF,iDACE,gBC5NJ,wCACE,aACA,sBACA,mBAEA,+CACE,iBACA,gBACA,oBACA,kCAIA,mHAEE,WACA,cACA,2CACA,kCACA,4CACA,kBAGF,2DACE,iBACA,gBAMR,gDACE,2CACA,aACA,kBAGF,qCACE,2CAGF,uCACE,2CACA,gBAIF,gBACE,2CAIA,yDACE,2CACA","file":"index.css"}
|
package/lib/package.json
CHANGED
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { type EditorStore, ElementEditorState } from '@finos/legend-application-studio';
|
|
17
|
-
import { type PackageableElement } from '@finos/legend-graph';
|
|
17
|
+
import { type DataProduct, type PackageableElement } from '@finos/legend-graph';
|
|
18
18
|
import { Diagram } from '@finos/legend-extension-dsl-diagram/graph';
|
|
19
19
|
import { DataSpace, type DataSpaceElement } from '@finos/legend-extension-dsl-data-space/graph';
|
|
20
20
|
import { DataSpaceExecutionContextState } from './DataSpaceExecutionContextState.js';
|
|
21
|
+
export declare const onMergeDataSpaceToDataProduct: (dataSpace: DataSpace, targetDataProduct: DataProduct, editorStore: EditorStore, dataSpaceEditorState: DataSpaceEditorState) => import("mobx/dist/internal.js").CancellablePromise<void>;
|
|
21
22
|
export declare const onConvertDataSpaceToDataProduct: (dataSpace: DataSpace, editorStore: EditorStore, dataSpaceEditorState: DataSpaceEditorState) => import("mobx/dist/internal.js").CancellablePromise<void>;
|
|
22
23
|
export declare class DataSpaceEditorState extends ElementEditorState {
|
|
23
24
|
executionContextState: DataSpaceExecutionContextState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,KAAK,WAAW,EAEhB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,KAAK,WAAW,EAEhB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EAQxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EAET,KAAK,gBAAgB,EACtB,MAAM,8CAA8C,CAAC;AAMtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAOrF,eAAO,MAAM,6BAA6B,0LAmCxC,CAAC;AAEH,eAAO,MAAM,+BAA+B,0JAmD1C,CAAC;AAEH,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,qBAAqB,EAAE,8BAA8B,CAAC;gBAE1C,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IAgBjE,uBAAuB,CACrB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,IAAI,gBAAgB;IAS9B,0BAA0B,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,gBAAgB,CAAA;KAAE,EAAE;IAc1E,6BAA6B,IAAI;QAC/B,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,kBAAkB,CAAC;KAC3B,EAAE;IAuBH,iBAAiB,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,EAAE;IAcxD,IAAI,SAAS,IAAI,SAAS,CAMzB;IAEQ,SAAS,CAChB,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,kBAAkB;CAItB"}
|
|
@@ -20,8 +20,28 @@ import { Diagram } from '@finos/legend-extension-dsl-diagram/graph';
|
|
|
20
20
|
import { DataSpace, DataSpacePackageableElementExecutable, } from '@finos/legend-extension-dsl-data-space/graph';
|
|
21
21
|
import { assertErrorThrown, guaranteeType, } from '@finos/legend-shared';
|
|
22
22
|
import { DataSpaceExecutionContextState } from './DataSpaceExecutionContextState.js';
|
|
23
|
-
import { convertDataSpaceToDataProduct } from '../stores/DataSpaceToDataProductConverter.js';
|
|
23
|
+
import { convertDataSpaceToDataProduct, convertDataSpaceToNativeModelAccess, } from '../stores/DataSpaceToDataProductConverter.js';
|
|
24
24
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
25
|
+
export const onMergeDataSpaceToDataProduct = flow(function* (dataSpace, targetDataProduct, editorStore, dataSpaceEditorState) {
|
|
26
|
+
try {
|
|
27
|
+
targetDataProduct.nativeModelAccess =
|
|
28
|
+
convertDataSpaceToNativeModelAccess(dataSpace);
|
|
29
|
+
editorStore.graphManagerState.graph.deleteElement(dataSpace);
|
|
30
|
+
const dataSpacePackage = dataSpace.package;
|
|
31
|
+
if (dataSpacePackage && dataSpacePackage.children.length === 0) {
|
|
32
|
+
editorStore.graphManagerState.graph.deleteElement(dataSpacePackage);
|
|
33
|
+
}
|
|
34
|
+
const dataProductEditorState = new DataProductEditorState(editorStore, targetDataProduct);
|
|
35
|
+
editorStore.tabManagerState.closeTab(dataSpaceEditorState);
|
|
36
|
+
editorStore.tabManagerState.openTab(dataProductEditorState);
|
|
37
|
+
yield flowResult(editorStore.explorerTreeState.build());
|
|
38
|
+
editorStore.applicationStore.notificationService.notifySuccess(`Successfully merged DataSpace ${dataSpace.name} into Data Product ${targetDataProduct.path}`);
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
assertErrorThrown(error);
|
|
42
|
+
editorStore.applicationStore.notificationService.notifyError(`Failed to merge DataSpace into Data Product: ${error.message}`);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
25
45
|
export const onConvertDataSpaceToDataProduct = flow(function* (dataSpace, editorStore, dataSpaceEditorState) {
|
|
26
46
|
try {
|
|
27
47
|
const dataProduct = convertDataSpaceToDataProduct(dataSpace);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditorState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,EACd,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAGL,OAAO,EACP,KAAK,EACL,WAAW,EACX,WAAW,EACX,OAAO,EACP,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qCAAqC,GAEtC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceEditorState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,EACd,UA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
15
15
|
*/
|
|
16
16
|
import { type DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
|
|
17
|
-
import { DataProduct } from '@finos/legend-graph';
|
|
17
|
+
import { DataProduct, NativeModelAccess } from '@finos/legend-graph';
|
|
18
18
|
export declare enum DATA_PRODUCT_SUPPORT_TYPE {
|
|
19
19
|
DOCUMENTATION = "Documentation",
|
|
20
20
|
SUPPORT = "Support",
|
|
@@ -24,5 +24,6 @@ export declare enum DATA_PRODUCT_SUPPORT_TYPE {
|
|
|
24
24
|
export declare const DATA_PRODUCT_DEFAULT_TITLE = "DataProduct Auto Generated title: Please update";
|
|
25
25
|
export declare const DATA_PRODUCT_DEFAULT_DESCRIPTION_PREFIX = "Migrated using studio converter from dataspace: ";
|
|
26
26
|
export declare const DATA_PRODUCT_NATIVE_MODEL_ACCESS_SAMPLE_QUERY_ID_PREFIX = "DATA_PRODUCT_NATIVE_MODEL_ACCESS_SAMPLE_QUERY_ID";
|
|
27
|
+
export declare const convertDataSpaceToNativeModelAccess: (dataSpace: DataSpace) => NativeModelAccess;
|
|
27
28
|
export declare const convertDataSpaceToDataProduct: (dataSpace: DataSpace) => DataProduct;
|
|
28
29
|
//# sourceMappingURL=DataSpaceToDataProductConverter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceToDataProductConverter.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceToDataProductConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"DataSpaceToDataProductConverter.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceToDataProductConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,WAAW,EAUX,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AAM7B,oBAAY,yBAAyB;IACnC,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,0BAA0B,oDACY,CAAC;AACpD,eAAO,MAAM,uCAAuC,qDACA,CAAC;AACrD,eAAO,MAAM,uDAAuD,qDAChB,CAAC;AA2IrD,eAAO,MAAM,mCAAmC,GAC9C,WAAW,SAAS,KACnB,iBAoBF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,WAAW,SAAS,KACnB,WAgBF,CAAC"}
|
|
@@ -123,7 +123,7 @@ const convertDataSpaceExecutionContextsToNativeModelExecutionContexts = (dataSpa
|
|
|
123
123
|
return nativeModelExecutionContext;
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
const convertDataSpaceToNativeModelAccess = (dataSpace) => {
|
|
126
|
+
export const convertDataSpaceToNativeModelAccess = (dataSpace) => {
|
|
127
127
|
const nativeModelAccess = new NativeModelAccess();
|
|
128
128
|
nativeModelAccess.featuredElements =
|
|
129
129
|
convertDataSpaceToFeaturedElements(dataSpace);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceToDataProductConverter.js","sourceRoot":"","sources":["../../src/stores/DataSpaceToDataProductConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,2BAA2B,GAC5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,KAAK,EACL,mBAAmB,EAEnB,iBAAiB,EACjB,iBAAiB,EACjB,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sB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AuB,CAAC,IAAI,CAAC;QAC3E,WAAW,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QACrC,IAAI,UAAU,CAAC,EAAE,EAAE,CAAC;YAClB,WAAW,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,EAAE,GAAG,GAAG,uDAAuD,IAAI,SAAS,EAAE,CAAC;YAC3F,SAAS,EAAE,CAAC;QACd,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,+DAA+D,GAAG,CACtE,SAAoB,EACpB,KAAwB,EACO,EAAE;IACjC,OAAO,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACjD,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,EAAE,CAAC;QACtE,2BAA2B,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;QAC/C,2BAA2B,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACtD,2BAA2B,CAAC,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC;QAC7D,2BAA2B,CAAC,OAAO,GAAG,KAAK,CAAC;QAC5C,OAAO,2BAA2B,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,mCAAmC,GAAG,
|
|
1
|
+
{"version":3,"file":"DataSpaceToDataProductConverter.js","sourceRoot":"","sources":["../../src/stores/DataSpaceToDataProductConverter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,2BAA2B,GAC5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,KAAK,EACL,mBAAmB,EAEnB,iBAAiB,EACj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|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.307",
|
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.0.
|
|
46
|
-
"@finos/legend-application-studio": "28.19.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
|
49
|
-
"@finos/legend-extension-dsl-data-space": "10.4.
|
|
50
|
-
"@finos/legend-graph": "32.5.
|
|
51
|
-
"@finos/legend-query-builder": "4.18.
|
|
52
|
-
"@finos/legend-server-depot": "6.1.
|
|
53
|
-
"@finos/legend-server-sdlc": "5.4.
|
|
54
|
-
"@finos/legend-shared": "11.0.
|
|
45
|
+
"@finos/legend-application": "16.0.105",
|
|
46
|
+
"@finos/legend-application-studio": "28.19.117",
|
|
47
|
+
"@finos/legend-art": "7.1.147",
|
|
48
|
+
"@finos/legend-code-editor": "2.0.167",
|
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.213",
|
|
50
|
+
"@finos/legend-graph": "32.5.3",
|
|
51
|
+
"@finos/legend-query-builder": "4.18.3",
|
|
52
|
+
"@finos/legend-server-depot": "6.1.11",
|
|
53
|
+
"@finos/legend-server-sdlc": "5.4.2",
|
|
54
|
+
"@finos/legend-shared": "11.0.24",
|
|
55
55
|
"@types/react": "19.0.10",
|
|
56
56
|
"mobx": "6.13.6",
|
|
57
57
|
"mobx-react-lite": "4.1.0",
|
|
@@ -14,23 +14,35 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { useState } from 'react';
|
|
17
18
|
import { observer } from 'mobx-react-lite';
|
|
18
19
|
import { useEditorStore } from '@finos/legend-application-studio';
|
|
19
20
|
import {
|
|
20
21
|
EyeIcon,
|
|
21
|
-
|
|
22
|
+
WandIcon,
|
|
22
23
|
Panel,
|
|
23
24
|
PanelContent,
|
|
24
25
|
PanelHeader,
|
|
26
|
+
Dialog,
|
|
27
|
+
Modal,
|
|
28
|
+
ModalHeader,
|
|
29
|
+
ModalBody,
|
|
30
|
+
ModalFooter,
|
|
31
|
+
ModalFooterButton,
|
|
32
|
+
CustomSelectorInput,
|
|
25
33
|
} from '@finos/legend-art';
|
|
26
34
|
import {
|
|
27
35
|
DataSpaceEditorState,
|
|
28
36
|
onConvertDataSpaceToDataProduct,
|
|
37
|
+
onMergeDataSpaceToDataProduct,
|
|
29
38
|
} from '../stores/DataSpaceEditorState.js';
|
|
30
39
|
import { DataSpaceGeneralEditor } from './DataSpaceGeneralEditor/DataSpaceGeneralEditor.js';
|
|
31
40
|
import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
|
|
32
41
|
import { flowResult } from 'mobx';
|
|
33
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
isStubbed_PackageableElement,
|
|
44
|
+
type DataProduct,
|
|
45
|
+
} from '@finos/legend-graph';
|
|
34
46
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
35
47
|
import { useApplicationNavigationContext } from '@finos/legend-application';
|
|
36
48
|
|
|
@@ -72,6 +84,65 @@ export const DataSpaceEditor = observer(() => {
|
|
|
72
84
|
).catch(editorStore.applicationStore.alertUnhandledError);
|
|
73
85
|
};
|
|
74
86
|
|
|
87
|
+
const eligibleMergeTargets =
|
|
88
|
+
editorStore.graphManagerState.graph.ownDataProducts.filter(
|
|
89
|
+
(dp) => dp.nativeModelAccess === undefined,
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const mergeDataSpace = (targetDataProduct: DataProduct): void => {
|
|
93
|
+
flowResult(
|
|
94
|
+
onMergeDataSpaceToDataProduct(
|
|
95
|
+
dataSpace,
|
|
96
|
+
targetDataProduct,
|
|
97
|
+
editorStore,
|
|
98
|
+
dataSpaceState,
|
|
99
|
+
),
|
|
100
|
+
).catch(editorStore.applicationStore.alertUnhandledError);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const [showConvertModal, setShowConvertModal] = useState(false);
|
|
104
|
+
|
|
105
|
+
const modeOptions: { label: string; value: string }[] = [
|
|
106
|
+
{ label: 'Merge', value: 'merge' },
|
|
107
|
+
{ label: 'Create', value: 'create' },
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
const [selectedMode, setSelectedMode] = useState<{
|
|
111
|
+
label: string;
|
|
112
|
+
value: string;
|
|
113
|
+
} | null>(modeOptions[0] ?? null);
|
|
114
|
+
|
|
115
|
+
const mergeTargetOptions = eligibleMergeTargets.map((dp) => ({
|
|
116
|
+
label: dp.path,
|
|
117
|
+
value: dp,
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
const [selectedMergeTarget, setSelectedMergeTarget] = useState<{
|
|
121
|
+
label: string;
|
|
122
|
+
value: DataProduct;
|
|
123
|
+
} | null>(mergeTargetOptions[0] ?? null);
|
|
124
|
+
|
|
125
|
+
const onConvertButtonClick = (): void => {
|
|
126
|
+
if (eligibleMergeTargets.length === 0) {
|
|
127
|
+
convertDataSpace();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
setSelectedMode(modeOptions[0] ?? null);
|
|
131
|
+
setSelectedMergeTarget(mergeTargetOptions[0] ?? null);
|
|
132
|
+
setShowConvertModal(true);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const closeConvertModal = (): void => setShowConvertModal(false);
|
|
136
|
+
|
|
137
|
+
const handleConvertConfirm = (): void => {
|
|
138
|
+
closeConvertModal();
|
|
139
|
+
if (selectedMode?.value === 'merge' && selectedMergeTarget) {
|
|
140
|
+
mergeDataSpace(selectedMergeTarget.value);
|
|
141
|
+
} else {
|
|
142
|
+
convertDataSpace();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
75
146
|
useApplicationNavigationContext(
|
|
76
147
|
DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.DATA_SPACE_EDITOR,
|
|
77
148
|
);
|
|
@@ -89,12 +160,15 @@ export const DataSpaceEditor = observer(() => {
|
|
|
89
160
|
<div className="btn__dropdown-combo btn__dropdown-combo--primary">
|
|
90
161
|
<button
|
|
91
162
|
className="btn__dropdown-combo__label"
|
|
92
|
-
onClick={
|
|
93
|
-
title="Convert Data Product"
|
|
163
|
+
onClick={onConvertButtonClick}
|
|
164
|
+
title="Convert to Data Product"
|
|
94
165
|
tabIndex={-1}
|
|
166
|
+
style={{ width: 'auto', whiteSpace: 'nowrap' }}
|
|
95
167
|
>
|
|
96
|
-
<
|
|
97
|
-
<div className="btn__dropdown-combo__label__title">
|
|
168
|
+
<WandIcon className="btn__dropdown-combo__label__icon" />
|
|
169
|
+
<div className="btn__dropdown-combo__label__title">
|
|
170
|
+
Convert to DataProduct
|
|
171
|
+
</div>
|
|
98
172
|
</button>
|
|
99
173
|
</div>
|
|
100
174
|
<div className="btn__dropdown-combo btn__dropdown-combo--primary">
|
|
@@ -112,6 +186,61 @@ export const DataSpaceEditor = observer(() => {
|
|
|
112
186
|
</div>
|
|
113
187
|
</PanelHeader>
|
|
114
188
|
|
|
189
|
+
<Dialog open={showConvertModal} onClose={closeConvertModal}>
|
|
190
|
+
<Modal darkMode={true}>
|
|
191
|
+
<ModalHeader title="Convert to Data Product" />
|
|
192
|
+
<ModalBody>
|
|
193
|
+
<div className="panel__content__form__section">
|
|
194
|
+
<div className="panel__content__form__section__header__label">
|
|
195
|
+
Mode
|
|
196
|
+
</div>
|
|
197
|
+
<CustomSelectorInput
|
|
198
|
+
options={modeOptions}
|
|
199
|
+
onChange={(val: { label: string; value: string } | null) => {
|
|
200
|
+
if (val) {
|
|
201
|
+
setSelectedMode(val);
|
|
202
|
+
if (val.value === 'merge') {
|
|
203
|
+
setSelectedMergeTarget(mergeTargetOptions[0] ?? null);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}}
|
|
207
|
+
value={selectedMode}
|
|
208
|
+
darkMode={true}
|
|
209
|
+
/>
|
|
210
|
+
</div>
|
|
211
|
+
{selectedMode?.value === 'merge' && (
|
|
212
|
+
<div className="panel__content__form__section">
|
|
213
|
+
<div className="panel__content__form__section__header__label">
|
|
214
|
+
Target Data Product
|
|
215
|
+
</div>
|
|
216
|
+
<CustomSelectorInput
|
|
217
|
+
options={mergeTargetOptions}
|
|
218
|
+
onChange={(
|
|
219
|
+
val: { label: string; value: DataProduct } | null,
|
|
220
|
+
) => {
|
|
221
|
+
setSelectedMergeTarget(val);
|
|
222
|
+
}}
|
|
223
|
+
value={selectedMergeTarget}
|
|
224
|
+
darkMode={true}
|
|
225
|
+
/>
|
|
226
|
+
</div>
|
|
227
|
+
)}
|
|
228
|
+
</ModalBody>
|
|
229
|
+
<ModalFooter>
|
|
230
|
+
<ModalFooterButton
|
|
231
|
+
text="Cancel"
|
|
232
|
+
onClick={closeConvertModal}
|
|
233
|
+
type="secondary"
|
|
234
|
+
/>
|
|
235
|
+
<ModalFooterButton
|
|
236
|
+
text={selectedMode?.value === 'merge' ? 'Merge' : 'Create'}
|
|
237
|
+
onClick={handleConvertConfirm}
|
|
238
|
+
disabled={selectedMode?.value === 'merge' && !selectedMergeTarget}
|
|
239
|
+
/>
|
|
240
|
+
</ModalFooter>
|
|
241
|
+
</Modal>
|
|
242
|
+
</Dialog>
|
|
243
|
+
|
|
115
244
|
<PanelContent>
|
|
116
245
|
<DataSpaceGeneralEditor />
|
|
117
246
|
</PanelContent>
|
|
@@ -50,9 +50,49 @@ import {
|
|
|
50
50
|
type GeneratorFn,
|
|
51
51
|
} from '@finos/legend-shared';
|
|
52
52
|
import { DataSpaceExecutionContextState } from './DataSpaceExecutionContextState.js';
|
|
53
|
-
import {
|
|
53
|
+
import {
|
|
54
|
+
convertDataSpaceToDataProduct,
|
|
55
|
+
convertDataSpaceToNativeModelAccess,
|
|
56
|
+
} from '../stores/DataSpaceToDataProductConverter.js';
|
|
54
57
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
55
58
|
|
|
59
|
+
export const onMergeDataSpaceToDataProduct = flow(function* (
|
|
60
|
+
dataSpace: DataSpace,
|
|
61
|
+
targetDataProduct: DataProduct,
|
|
62
|
+
editorStore: EditorStore,
|
|
63
|
+
dataSpaceEditorState: DataSpaceEditorState,
|
|
64
|
+
): GeneratorFn<void> {
|
|
65
|
+
try {
|
|
66
|
+
targetDataProduct.nativeModelAccess =
|
|
67
|
+
convertDataSpaceToNativeModelAccess(dataSpace);
|
|
68
|
+
|
|
69
|
+
editorStore.graphManagerState.graph.deleteElement(dataSpace);
|
|
70
|
+
|
|
71
|
+
const dataSpacePackage = dataSpace.package;
|
|
72
|
+
if (dataSpacePackage && dataSpacePackage.children.length === 0) {
|
|
73
|
+
editorStore.graphManagerState.graph.deleteElement(dataSpacePackage);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const dataProductEditorState = new DataProductEditorState(
|
|
77
|
+
editorStore,
|
|
78
|
+
targetDataProduct,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
editorStore.tabManagerState.closeTab(dataSpaceEditorState);
|
|
82
|
+
editorStore.tabManagerState.openTab(dataProductEditorState);
|
|
83
|
+
yield flowResult(editorStore.explorerTreeState.build());
|
|
84
|
+
|
|
85
|
+
editorStore.applicationStore.notificationService.notifySuccess(
|
|
86
|
+
`Successfully merged DataSpace ${dataSpace.name} into Data Product ${targetDataProduct.path}`,
|
|
87
|
+
);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
assertErrorThrown(error);
|
|
90
|
+
editorStore.applicationStore.notificationService.notifyError(
|
|
91
|
+
`Failed to merge DataSpace into Data Product: ${error.message}`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
56
96
|
export const onConvertDataSpaceToDataProduct = flow(function* (
|
|
57
97
|
dataSpace: DataSpace,
|
|
58
98
|
editorStore: EditorStore,
|
|
@@ -192,7 +192,7 @@ const convertDataSpaceExecutionContextsToNativeModelExecutionContexts = (
|
|
|
192
192
|
});
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
const convertDataSpaceToNativeModelAccess = (
|
|
195
|
+
export const convertDataSpaceToNativeModelAccess = (
|
|
196
196
|
dataSpace: DataSpace,
|
|
197
197
|
): NativeModelAccess => {
|
|
198
198
|
const nativeModelAccess = new NativeModelAccess();
|