@finos/legend-extension-dsl-data-space-studio 0.1.337 → 0.1.339
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/__lib__/DSL_DataSpace_LegendStudioDocumentation.d.ts +0 -3
- package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.js +0 -4
- package/lib/__lib__/DSL_DataSpace_LegendStudioDocumentation.js.map +1 -1
- package/lib/components/DataSpaceEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceEditor.js +4 -51
- package/lib/components/DataSpaceEditor.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js +63 -3
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.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 +1 -3
- package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
- package/lib/stores/DataSpaceEditorState.js +4 -55
- package/lib/stores/DataSpaceEditorState.js.map +1 -1
- package/package.json +8 -8
- package/src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts +0 -4
- package/src/components/DataSpaceEditor.tsx +3 -158
- package/src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx +163 -8
- package/src/stores/DataSpaceEditorState.ts +2 -117
- package/tsconfig.json +0 -1
- package/lib/stores/DataSpaceToDataProductConverter.d.ts +0 -29
- package/lib/stores/DataSpaceToDataProductConverter.d.ts.map +0 -1
- package/lib/stores/DataSpaceToDataProductConverter.js +0 -153
- package/lib/stores/DataSpaceToDataProductConverter.js.map +0 -1
- package/src/stores/DataSpaceToDataProductConverter.ts +0 -239
|
@@ -21,7 +21,4 @@ export declare enum DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY {
|
|
|
21
21
|
export declare enum DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY {
|
|
22
22
|
DATA_SPACE_EDITOR = "studio.editor.data-space-editor"
|
|
23
23
|
}
|
|
24
|
-
export declare enum DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY {
|
|
25
|
-
CONVERT_DATA_SPACE_TO_DATA_PRODUCT = "studio.editor.data-space-editor.convert-data-space-to-data-product"
|
|
26
|
-
}
|
|
27
24
|
//# sourceMappingURL=DSL_DataSpace_LegendStudioDocumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_DataSpace_LegendStudioDocumentation.d.ts","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,8CAA8C;IACxD,cAAc,iCAAiC;IAC/C,0BAA0B,6CAA6C;IACvE,sBAAsB,yCAAyC;CAChE;AAED,oBAAY,+DAA+D;IACzE,iBAAiB,oCAAoC;CACtD
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendStudioDocumentation.d.ts","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,8CAA8C;IACxD,cAAc,iCAAiC;IAC/C,0BAA0B,6CAA6C;IACvE,sBAAsB,yCAAyC;CAChE;AAED,oBAAY,+DAA+D;IACzE,iBAAiB,oCAAoC;CACtD"}
|
|
@@ -23,8 +23,4 @@ export var DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY;
|
|
|
23
23
|
(function (DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY) {
|
|
24
24
|
DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY["DATA_SPACE_EDITOR"] = "studio.editor.data-space-editor";
|
|
25
25
|
})(DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY || (DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY = {}));
|
|
26
|
-
export var DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY;
|
|
27
|
-
(function (DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY) {
|
|
28
|
-
DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY["CONVERT_DATA_SPACE_TO_DATA_PRODUCT"] = "studio.editor.data-space-editor.convert-data-space-to-data-product";
|
|
29
|
-
})(DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY || (DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY = {}));
|
|
30
26
|
//# sourceMappingURL=DSL_DataSpace_LegendStudioDocumentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSL_DataSpace_LegendStudioDocumentation.js","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,8CAIX;AAJD,WAAY,8CAA8C;IACxD,iGAA+C,CAAA;IAC/C,yHAAuE,CAAA;IACvE,iHAA+D,CAAA;AACjE,CAAC,EAJW,8CAA8C,KAA9C,8CAA8C,QAIzD;AAED,MAAM,CAAN,IAAY,+DAEX;AAFD,WAAY,+DAA+D;IACzE,wHAAqD,CAAA;AACvD,CAAC,EAFW,+DAA+D,KAA/D,+DAA+D,QAE1E
|
|
1
|
+
{"version":3,"file":"DSL_DataSpace_LegendStudioDocumentation.js","sourceRoot":"","sources":["../../src/__lib__/DSL_DataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,8CAIX;AAJD,WAAY,8CAA8C;IACxD,iGAA+C,CAAA;IAC/C,yHAAuE,CAAA;IACvE,iHAA+D,CAAA;AACjE,CAAC,EAJW,8CAA8C,KAA9C,8CAA8C,QAIzD;AAED,MAAM,CAAN,IAAY,+DAEX;AAFD,WAAY,+DAA+D;IACzE,wHAAqD,CAAA;AACvD,CAAC,EAFW,+DAA+D,KAA/D,+DAA+D,QAE1E"}
|
|
@@ -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;AAaH,eAAO,MAAM,eAAe;;CAkE1B,CAAC"}
|
|
@@ -14,15 +14,14 @@ 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';
|
|
18
17
|
import { observer } from 'mobx-react-lite';
|
|
19
18
|
import { useEditorStore } from '@finos/legend-application-studio';
|
|
20
|
-
import { EyeIcon,
|
|
21
|
-
import { DataSpaceEditorState
|
|
19
|
+
import { EyeIcon, Panel, PanelContent, PanelHeader } from '@finos/legend-art';
|
|
20
|
+
import { DataSpaceEditorState } from '../stores/DataSpaceEditorState.js';
|
|
22
21
|
import { DataSpaceGeneralEditor } from './DataSpaceGeneralEditor/DataSpaceGeneralEditor.js';
|
|
23
22
|
import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
|
|
24
23
|
import { flowResult } from 'mobx';
|
|
25
|
-
import { isStubbed_PackageableElement
|
|
24
|
+
import { isStubbed_PackageableElement } from '@finos/legend-graph';
|
|
26
25
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
27
26
|
import { useApplicationNavigationContext } from '@finos/legend-application';
|
|
28
27
|
export const DataSpaceEditor = observer(() => {
|
|
@@ -41,53 +40,7 @@ export const DataSpaceEditor = observer(() => {
|
|
|
41
40
|
const previewDataSpace = () => {
|
|
42
41
|
flowResult(dataSpacePreviewState.previewDataSpace(dataSpaceState.dataSpace)).catch(editorStore.applicationStore.alertUnhandledError);
|
|
43
42
|
};
|
|
44
|
-
const convertDataSpace = () => {
|
|
45
|
-
flowResult(onConvertDataSpaceToDataProduct(dataSpace, editorStore, dataSpaceState)).catch(editorStore.applicationStore.alertUnhandledError);
|
|
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
|
-
};
|
|
81
43
|
useApplicationNavigationContext(DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.DATA_SPACE_EDITOR);
|
|
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:
|
|
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, {}) })] }));
|
|
44
|
+
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: _jsx("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: 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(PanelContent, { children: _jsx(DataSpaceGeneralEditor, {}) })] }));
|
|
92
45
|
});
|
|
93
46
|
//# 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,
|
|
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,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO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AAC;IAEF,OAAO,CACL,MAAC,KAAK,IAAC,SAAS,EAAC,kBAAkB,aACjC,KAAC,WAAW,IACV,KAAK,EAAC,cAAc,EACpB,YAAY,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,EAC3C,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,cAAc,CAAC,UAAU,GACrC,EACF,KAAC,WAAW,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,IAAI,YACzC,cAAK,SAAS,EAAC,wBAAwB,YACrC,cAAK,SAAS,EAAC,kDAAkD,YAC/D,kBACE,SAAS,EAAC,4BAA4B,EACtC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAC,sBAAsB,EAC5B,QAAQ,EAAE,CAAC,CAAC,EACZ,QAAQ,EAAE,CAAC,iBAAiB,EAAE,aAE9B,KAAC,OAAO,IAAC,SAAS,EAAC,kCAAkC,GAAG,EACxD,cAAK,SAAS,EAAC,mCAAmC,wBAAc,IACzD,GACL,GACF,GACM,EAEd,KAAC,YAAY,cACX,KAAC,sBAAsB,KAAG,GACb,IACT,CACT,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceGeneralEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceGeneralEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkCH,eAAO,MAAM,sBAAsB;;CAsLjC,CAAC"}
|
|
@@ -14,9 +14,11 @@ 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 { useEditorStore } from '@finos/legend-application-studio';
|
|
18
|
-
import { PanelContentLists, PanelForm, PanelFormTextField, } from '@finos/legend-art';
|
|
17
|
+
import { useEditorStore, LEGEND_STUDIO_DOCUMENTATION_KEY, LegendStudioTelemetryHelper, } from '@finos/legend-application-studio';
|
|
18
|
+
import { clsx, PanelContentLists, PanelForm, PanelFormTextField, PanelLoadingIndicator, SparkleIcon, } from '@finos/legend-art';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
|
+
import { useState } from 'react';
|
|
21
|
+
import { assertErrorThrown, HttpStatus, NetworkClientError, } from '@finos/legend-shared';
|
|
20
22
|
import { DataSpaceEditorState } from '../../stores/DataSpaceEditorState.js';
|
|
21
23
|
import { dataSpace_setDescription, dataSpace_setTitle, } from '../../stores/studio/DSL_DataSpace_GraphModifierHelper.js';
|
|
22
24
|
import { DataSpaceDefaultExecutionContextSection } from './DataSpaceDefaultExecutionContextSection.js';
|
|
@@ -28,6 +30,7 @@ export const DataSpaceGeneralEditor = observer(() => {
|
|
|
28
30
|
const editorStore = useEditorStore();
|
|
29
31
|
const dataSpaceState = editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
|
|
30
32
|
const dataSpace = dataSpaceState.dataSpace;
|
|
33
|
+
const isReadOnly = dataSpaceState.isReadOnly;
|
|
31
34
|
// Basic properties handlers
|
|
32
35
|
const handleTitleChange = (value) => {
|
|
33
36
|
dataSpace_setTitle(dataSpace, value);
|
|
@@ -35,6 +38,63 @@ export const DataSpaceGeneralEditor = observer(() => {
|
|
|
35
38
|
const handleDescriptionChange = (value) => {
|
|
36
39
|
dataSpace_setDescription(dataSpace, value);
|
|
37
40
|
};
|
|
38
|
-
|
|
41
|
+
// AI documentation suggestion
|
|
42
|
+
const legendAIUrl = editorStore.applicationStore.config.legendAIUrl;
|
|
43
|
+
const aiDocSuggester = legendAIUrl
|
|
44
|
+
? editorStore.pluginManager
|
|
45
|
+
.getApplicationPlugins()
|
|
46
|
+
.map((p) => p.getExtraDataSpaceDocumentationAISuggester?.bind(p))
|
|
47
|
+
.find(Boolean)
|
|
48
|
+
: undefined;
|
|
49
|
+
const [isSuggestingWithAI, setIsSuggestingWithAI] = useState(false);
|
|
50
|
+
const [aiDocSuggestion, setAIDocSuggestion] = useState(undefined);
|
|
51
|
+
const suggestDocumentationWithAI = async () => {
|
|
52
|
+
if (!aiDocSuggester || !legendAIUrl) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
LegendStudioTelemetryHelper.logEvent_DataSpaceLegendAISuggestLaunched(editorStore.applicationStore.telemetryService, dataSpace.path);
|
|
56
|
+
setIsSuggestingWithAI(true);
|
|
57
|
+
setAIDocSuggestion(undefined);
|
|
58
|
+
try {
|
|
59
|
+
const definitions = await editorStore.graphManagerState.graphManager.graphToPureCode(editorStore.graphManagerState.graph);
|
|
60
|
+
const suggestion = await aiDocSuggester({ definitions, data_space_name: dataSpace.path }, legendAIUrl);
|
|
61
|
+
setAIDocSuggestion(suggestion.description);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
assertErrorThrown(error);
|
|
65
|
+
LegendStudioTelemetryHelper.logEvent_DataSpaceLegendAISuggestFailure(editorStore.applicationStore.telemetryService, dataSpace.path, error.message);
|
|
66
|
+
if (error instanceof NetworkClientError &&
|
|
67
|
+
(error.response.status === HttpStatus.UNAUTHORIZED ||
|
|
68
|
+
error.response.status === HttpStatus.FORBIDDEN)) {
|
|
69
|
+
const docEntry = editorStore.applicationStore.documentationService.getDocEntry(LEGEND_STUDIO_DOCUMENTATION_KEY.LEGENDAI_HOW_TO_GET_ENTITLEMENTS);
|
|
70
|
+
if (docEntry?.url) {
|
|
71
|
+
error.message = `${error.message}. Please check how to get entitlements: ${docEntry.url}`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
setIsSuggestingWithAI(false);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const applyAIDocSuggestion = () => {
|
|
81
|
+
if (!aiDocSuggestion) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
LegendStudioTelemetryHelper.logEvent_DataSpaceLegendAISuggestApplied(editorStore.applicationStore.telemetryService, dataSpace.path);
|
|
85
|
+
dataSpace_setDescription(dataSpace, aiDocSuggestion);
|
|
86
|
+
setAIDocSuggestion(undefined);
|
|
87
|
+
};
|
|
88
|
+
const discardAIDocSuggestion = () => {
|
|
89
|
+
LegendStudioTelemetryHelper.logEvent_DataSpaceLegendAISuggestDiscarded(editorStore.applicationStore.telemetryService, dataSpace.path);
|
|
90
|
+
setAIDocSuggestion(undefined);
|
|
91
|
+
};
|
|
92
|
+
return (_jsx(PanelContentLists, { className: "dataSpace-editor__general", children: _jsxs(PanelForm, { children: [_jsx(PanelFormTextField, { name: "Title", value: dataSpace.title ?? '', prompt: "Provide a title for this Data Product.", update: handleTitleChange, placeholder: "Enter title" }), _jsxs("div", { className: "panel__content__form__section", children: [_jsxs("div", { className: "panel__content__form__section__header__label", children: ["Description", aiDocSuggestion && (_jsxs("span", { className: "dataSpace-editor__ai-suggestion-badge", style: { marginLeft: '0.8rem' }, children: [_jsx(SparkleIcon, {}), "AI Suggestion"] })), aiDocSuggester && !aiDocSuggestion && (_jsxs("button", { className: "dataSpace-editor__ai-suggest-btn", style: { marginLeft: '0.8rem' }, onClick: () => {
|
|
93
|
+
suggestDocumentationWithAI().catch(editorStore.applicationStore.alertUnhandledError);
|
|
94
|
+
}, disabled: isSuggestingWithAI || isReadOnly, title: "Use AI to suggest a description for this data product", children: [_jsx(SparkleIcon, {}), _jsx("span", { children: isSuggestingWithAI ? 'Suggesting...' : 'Suggest with AI' })] }))] }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Provide a description for this Data Product." }), _jsx(PanelLoadingIndicator, { isLoading: isSuggestingWithAI }), _jsx("textarea", { className: clsx('panel__content__form__section__textarea', {
|
|
95
|
+
'textarea--ai-suggested': Boolean(aiDocSuggestion),
|
|
96
|
+
}), spellCheck: false, disabled: isReadOnly, readOnly: Boolean(aiDocSuggestion), value: aiDocSuggestion ?? dataSpace.description ?? '', onChange: (event) => {
|
|
97
|
+
handleDescriptionChange(event.target.value);
|
|
98
|
+
}, placeholder: "Enter description" }), aiDocSuggestion && (_jsxs("div", { className: "dataSpace-editor__ai-suggestion__actions", children: [_jsx("button", { className: "btn btn--dark dataSpace-editor__ai-suggestion__apply-btn", onClick: applyAIDocSuggestion, title: "Apply AI suggestion to description", children: "Apply Suggestion" }), _jsx("button", { className: "btn dataSpace-editor__ai-suggestion__dismiss-btn", onClick: discardAIDocSuggestion, title: "Dismiss AI suggestion", children: "Dismiss" })] }))] }), _jsx(DataSpaceDefaultExecutionContextSection, {}), _jsx(DataSpaceDiagramsSection, {}), _jsx(DataSpaceElementsSection, {}), _jsx(DataspaceExecutablesSection, {}), _jsx(DataSpaceSupportInfoSection, {})] }) }));
|
|
39
99
|
});
|
|
40
100
|
//# sourceMappingURL=DataSpaceGeneralEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceGeneralEditor.js","sourceRoot":"","sources":["../../../src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceGeneralEditor.js","sourceRoot":"","sources":["../../../src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EACd,+BAA+B,EAC/B,2BAA2B,GAE5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC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S,EAAC,0DAA0D,EACpE,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAC,oCAAoC,iCAGnC,EACT,iBACE,SAAS,EAAC,kDAAkD,EAC5D,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAC,uBAAuB,wBAGtB,IACL,CACP,IACG,EACN,KAAC,uCAAuC,KAAG,EAC3C,KAAC,wBAAwB,KAAG,EAC5B,KAAC,wBAAwB,KAAG,EAC5B,KAAC,2BAA2B,KAAG,EAC/B,KAAC,2BAA2B,KAAG,IACrB,GACM,CACrB,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.339
|
|
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-bg-app)}.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-text-secondary);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-text-disabled)}.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-bg-selected);color:var(--color-text-primary);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-border-strong);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-bg-tag);font-family:"Roboto Mono",monospace;font-size:1.4rem;padding:0 1rem;border-radius:.2rem 0 0 .2rem;color:var(--color-text-disabled)}.template-query-promotor__input__icon{display:flex;align-items:center;justify-content:center;height:2.8rem;width:2.8rem;background:var(--color-bg-tag);border-radius:.2rem 0 0 .2rem}.template-query-promotor__input__icon svg{color:var(--color-text-disabled)}.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)}.dataSpace-editor .panel__content__form__section__list__item{background-color:var(--color-bg-panel);margin-bottom:.5rem;padding:.5rem;border-radius:3px;width:fit-content}.dataSpace-editor .panel__content__form__section__list__item__content__label{color:var(--color-text-secondary);font-size:1.2rem}.dataSpace-editor .panel__content__form__section__list__item__content__title{color:var(--color-text-secondary);font-size:1.2rem}.dataSpace-editor .panel__content__form__section__list__item__content__form{display:flex;flex-direction:column;width:100%;margin-right:1rem}.dataSpace-editor .panel__content__form__section__list__item__content__form .panel__content__form__section{margin-bottom:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__form .panel__content__form__section:last-child{margin-bottom:0}.dataSpace-editor .panel__content__form__section__list__item__content__actions{display:flex;align-items:center;gap:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__actions__label{color:var(--color-text-secondary);font-size:1.2rem;margin-left:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-text-secondary)}.dataSpace-editor .panel__content__form__section__list__item__content__actions__btn:hover{color:var(--color-text-primary)}.dataSpace-editor .panel__content__form__section__list__item__form{display:flex;flex-direction:column;margin-top:.5rem}.dataSpace-editor .panel__content__form__section__list__item__form .panel__content__form__section{margin-bottom:.5rem}.dataSpace-editor .panel__content__form__section__list__item__form .panel__content__form__section:last-child{margin-bottom:0}.dataSpace-editor .panel__content__form__section__list__new-item__input{height:fit-content;width:40rem;padding:0}.dataSpace-editor .panel__content__form__section__list__add{display:flex;align-items:center;margin-top:.5rem}.dataSpace-editor .panel__content__form__section__list__add__input{flex:1}.dataSpace-editor .panel__content__form__section__list__add__actions{margin-left:.5rem}.dataSpace-editor .panel__content__form__section__list__add__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-text-secondary)}.dataSpace-editor .panel__content__form__section__list__add__actions__btn:hover{color:var(--color-text-primary)}.dataSpace-editor{background-color:var(--color-bg-panel)}.dataSpace-editor .panel__content{background-color:var(--color-bg-panel)}.dataSpace-editor .panel__header{background-color:var(--color-bg-panel-header)}.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-bg-panel);color:var(--color-text-secondary);border:1px solid var(--color-border-default);border-radius:2px}.execution-context-editor__form-section__content__textarea{min-height:100px;resize:vertical}.service-execution-editor__configuration__items{background-color:var(--color-bg-panel);padding:1rem;border-radius:3px}.service-execution-editor__execution{background-color:var(--color-bg-panel)}.service-multi-execution-editor__panel{background-color:var(--color-bg-panel);overflow-y:auto}.service-execution-editor__configuration__item__dropdown{background-color:var(--color-bg-panel);color:var(--color-text-secondary)}/*# sourceMappingURL=index.css.map */
|
|
17
|
+
.template-query-promotor{height:100%;position:relative;background:var(--color-bg-app)}.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-text-secondary);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-text-disabled)}.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-bg-selected);color:var(--color-text-primary);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-border-strong);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-bg-tag);font-family:"Roboto Mono",monospace;font-size:1.4rem;padding:0 1rem;border-radius:.2rem 0 0 .2rem;color:var(--color-text-disabled)}.template-query-promotor__input__icon{display:flex;align-items:center;justify-content:center;height:2.8rem;width:2.8rem;background:var(--color-bg-tag);border-radius:.2rem 0 0 .2rem}.template-query-promotor__input__icon svg{color:var(--color-text-disabled)}.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)}.dataSpace-editor .panel__content__form__section__list__item{background-color:var(--color-bg-panel);margin-bottom:.5rem;padding:.5rem;border-radius:3px;width:fit-content}.dataSpace-editor .panel__content__form__section__list__item__content__label{color:var(--color-text-secondary);font-size:1.2rem}.dataSpace-editor .panel__content__form__section__list__item__content__title{color:var(--color-text-secondary);font-size:1.2rem}.dataSpace-editor .panel__content__form__section__list__item__content__form{display:flex;flex-direction:column;width:100%;margin-right:1rem}.dataSpace-editor .panel__content__form__section__list__item__content__form .panel__content__form__section{margin-bottom:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__form .panel__content__form__section:last-child{margin-bottom:0}.dataSpace-editor .panel__content__form__section__list__item__content__actions{display:flex;align-items:center;gap:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__actions__label{color:var(--color-text-secondary);font-size:1.2rem;margin-left:.5rem}.dataSpace-editor .panel__content__form__section__list__item__content__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-text-secondary)}.dataSpace-editor .panel__content__form__section__list__item__content__actions__btn:hover{color:var(--color-text-primary)}.dataSpace-editor .panel__content__form__section__list__item__form{display:flex;flex-direction:column;margin-top:.5rem}.dataSpace-editor .panel__content__form__section__list__item__form .panel__content__form__section{margin-bottom:.5rem}.dataSpace-editor .panel__content__form__section__list__item__form .panel__content__form__section:last-child{margin-bottom:0}.dataSpace-editor .panel__content__form__section__list__new-item__input{height:fit-content;width:40rem;padding:0}.dataSpace-editor .panel__content__form__section__list__add{display:flex;align-items:center;margin-top:.5rem}.dataSpace-editor .panel__content__form__section__list__add__input{flex:1}.dataSpace-editor .panel__content__form__section__list__add__actions{margin-left:.5rem}.dataSpace-editor .panel__content__form__section__list__add__actions__btn{background:none;border:none;cursor:pointer;color:var(--color-text-secondary)}.dataSpace-editor .panel__content__form__section__list__add__actions__btn:hover{color:var(--color-text-primary)}.dataSpace-editor{background-color:var(--color-bg-panel)}.dataSpace-editor .panel__content{background-color:var(--color-bg-panel)}.dataSpace-editor .panel__header{background-color:var(--color-bg-panel-header)}.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}.dataSpace-editor__general .textarea--ai-suggested{border-color:var(--color-category-ai-suggestion) !important;color:var(--color-category-ai-suggestion) !important}.dataSpace-editor__ai-suggest-btn{display:flex;align-items:center;display:inline-flex;gap:.4rem;height:2rem;padding:0 .6rem;font-size:1.2rem;border:none;border-radius:.2rem;background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.dataSpace-editor__ai-suggest-btn svg{font-size:1.2rem}.dataSpace-editor__ai-suggest-btn:hover{background:var(--color-accent-hover)}.dataSpace-editor__ai-suggest-btn[disabled]{opacity:.5;cursor:default}.dataSpace-editor__ai-suggestion-badge{display:flex;align-items:center;display:inline-flex;gap:.4rem;font-size:1rem;font-weight:500;color:var(--color-category-ai-suggestion)}.dataSpace-editor__ai-suggestion-badge svg{font-size:1.2rem}.dataSpace-editor__ai-suggestion__actions{display:flex;align-items:center;gap:.5rem;margin-top:.6rem}.dataSpace-editor__ai-suggestion__apply-btn{height:2.8rem;padding:0 1rem;font-size:1.2rem}.dataSpace-editor__ai-suggestion__dismiss-btn{height:2.8rem;padding:0 1rem;font-size:1.2rem;background:var(--color-dark-grey-200);color:var(--color-light-grey-200)}.dataSpace-editor__ai-suggestion__dismiss-btn:hover{background:var(--color-dark-grey-250)}.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-bg-panel);color:var(--color-text-secondary);border:1px solid var(--color-border-default);border-radius:2px}.execution-context-editor__form-section__content__textarea{min-height:100px;resize:vertical}.service-execution-editor__configuration__items{background-color:var(--color-bg-panel);padding:1rem;border-radius:3px}.service-execution-editor__execution{background-color:var(--color-bg-panel)}.service-multi-execution-editor__panel{background-color:var(--color-bg-panel);overflow-y:auto}.service-execution-editor__configuration__item__dropdown{background-color:var(--color-bg-panel);color:var(--color-text-secondary)}/*# 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,+BAEA,+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,oCACA,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,+BACA,oCACA,iBACA,eACA,8BACA,iCAGF,sCC/FF,aACA,mBACA,uBDgGI,cACA,aACA,+BACA,8BAEA,0CACE,iCAIJ,6IAGE,iBAGF,uCACE,SAGF,gEACE,iBAIJ,mCACE,aEjIF,gCACE,eACA,qCAEA,yCACE,aACA,WAGF,sCACE,sCACA,8CACA,gCAGF,mDACE,iCAUJ,6DACE,uCACA,oBACA,cACA,kBACA,kBAGE,6EACE,kCACA,iBAGF,6EACE,kCACA,iBAGF,4EACE,aACA,sBACA,WACA,kBAEA,2GACE,oBAEA,sHACE,gBAKN,+EACE,aACA,mBACA,UAEA,sFACE,kCACA,iBACA,kBAGF,oFACE,gBACA,YACA,eACA,kCAEA,0FACE,gCAMR,mEACE,aACA,sBACA,iBAEA,kGACE,oBAEA,6GACE,gBAON,wEACE,mBACA,YACA,UAIJ,4DACE,aACA,mBACA,iBAEA,mEACE,OAGF,qEACE,kBAEA,0EACE,gBACA,YACA,eACA,kCAEA,gFACE,gCAOV,kBACE,uCAEA,kCACE,uCAGF,iCACE,8CAGF,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,
|
|
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,+BAEA,+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,oCACA,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,+BACA,oCACA,iBACA,eACA,8BACA,iCAGF,sCC/FF,aACA,mBACA,uBDgGI,cACA,aACA,+BACA,8BAEA,0CACE,iCAIJ,6IAGE,iBAGF,uCACE,SAGF,gEACE,iBAIJ,mCACE,aEjIF,gCACE,eACA,qCAEA,yCACE,aACA,WAGF,sCACE,sCACA,8CACA,gCAGF,mDACE,iCAUJ,6DACE,uCACA,oBACA,cACA,kBACA,kBAGE,6EACE,kCACA,iBAGF,6EACE,kCACA,iBAGF,4EACE,aACA,sBACA,WACA,kBAEA,2GACE,oBAEA,sHACE,gBAKN,+EACE,aACA,mBACA,UAEA,sFACE,kCACA,iBACA,kBAGF,oFACE,gBACA,YACA,eACA,kCAEA,0FACE,gCAMR,mEACE,aACA,sBACA,iBAEA,kGACE,oBAEA,6GACE,gBAON,wEACE,mBACA,YACA,UAIJ,4DACE,aACA,mBACA,iBAEA,mEACE,OAGF,qEACE,kBAEA,0EACE,gBACA,YACA,eACA,kCAEA,gFACE,gCAOV,kBACE,uCAEA,kCACE,uCAGF,iCACE,8CAGF,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,gBAGF,mDACE,4DACA,qDAKN,kCD7NE,aACA,mBC+NA,oBACA,UACA,YACA,gBACA,iBACA,YACA,oBACA,+BACA,kCACA,eAEA,sCACE,iBAGF,wCACE,qCAGF,4CACE,WACA,eAIJ,uCDzPE,aACA,mBC2PA,oBACA,UACA,eACA,gBACA,0CAEA,2CACE,iBAIJ,0CDvQE,aACA,mBCyQA,UACA,iBAGF,4CACE,cACA,eACA,iBAGF,8CACE,cACA,eACA,iBACA,sCACA,kCAEA,oDACE,sCCzSF,wCACE,aACA,sBACA,mBAEA,+CACE,iBACA,gBACA,oBACA,kCAIA,mHAEE,WACA,cACA,uCACA,kCACA,6CACA,kBAGF,2DACE,iBACA,gBAMR,gDACE,uCACA,aACA,kBAGF,qCACE,uCAGF,uCACE,uCACA,gBAWA,yDACE,uCACA","file":"index.css"}
|
package/lib/package.json
CHANGED
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { type EditorStore, ElementEditorState } from '@finos/legend-application-studio';
|
|
17
|
-
import { type
|
|
17
|
+
import { 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>;
|
|
22
|
-
export declare const onConvertDataSpaceToDataProduct: (dataSpace: DataSpace, editorStore: EditorStore, dataSpaceEditorState: DataSpaceEditorState) => import("mobx/dist/internal.js").CancellablePromise<void>;
|
|
23
21
|
export declare class DataSpaceEditorState extends ElementEditorState {
|
|
24
22
|
executionContextState: DataSpaceExecutionContextState;
|
|
25
23
|
constructor(editorStore: EditorStore, element: PackageableElement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataSpaceEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,WAAW,EAChB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,kBAAkB,EAOxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EAET,KAAK,gBAAgB,EACtB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,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"}
|
|
@@ -13,64 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { action, computed,
|
|
17
|
-
import {
|
|
18
|
-
import { Package, Class, Enumeration, Association, Service, ConcreteFunctionDefinition,
|
|
16
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { ElementEditorState, } from '@finos/legend-application-studio';
|
|
18
|
+
import { Package, Class, Enumeration, Association, Service, ConcreteFunctionDefinition, } from '@finos/legend-graph';
|
|
19
19
|
import { Diagram } from '@finos/legend-extension-dsl-diagram/graph';
|
|
20
20
|
import { DataSpace, DataSpacePackageableElementExecutable, } from '@finos/legend-extension-dsl-data-space/graph';
|
|
21
|
-
import {
|
|
21
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
22
22
|
import { DataSpaceExecutionContextState } from './DataSpaceExecutionContextState.js';
|
|
23
|
-
import { convertDataSpaceToDataProduct, convertDataSpaceToNativeModelAccess, } from '../stores/DataSpaceToDataProductConverter.js';
|
|
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
|
-
});
|
|
45
|
-
export const onConvertDataSpaceToDataProduct = flow(function* (dataSpace, editorStore, dataSpaceEditorState) {
|
|
46
|
-
try {
|
|
47
|
-
const dataProduct = convertDataSpaceToDataProduct(dataSpace, editorStore.changeDetectionState.observerContext);
|
|
48
|
-
editorStore.graphManagerState.graph.deleteElement(dataSpace);
|
|
49
|
-
editorStore.graphManagerState.graph.addElement(dataProduct, dataSpace.package?.path.replace(/dataspace/, 'dataProduct'));
|
|
50
|
-
const dataSpacePackage = dataSpace.package;
|
|
51
|
-
if (dataSpacePackage && dataSpacePackage.children.length === 0) {
|
|
52
|
-
editorStore.graphManagerState.graph.deleteElement(dataSpacePackage);
|
|
53
|
-
}
|
|
54
|
-
const addedElement = editorStore.graphManagerState.graph.getNullableElement(dataProduct.path);
|
|
55
|
-
if (addedElement) {
|
|
56
|
-
observe_DataProduct(addedElement, editorStore.changeDetectionState.observerContext);
|
|
57
|
-
}
|
|
58
|
-
const dataProductEditorState = new DataProductEditorState(editorStore, addedElement);
|
|
59
|
-
editorStore.tabManagerState.closeTab(dataSpaceEditorState);
|
|
60
|
-
editorStore.tabManagerState.openTab(dataProductEditorState);
|
|
61
|
-
yield flowResult(editorStore.explorerTreeState.build());
|
|
62
|
-
editorStore.applicationStore.telemetryService.logEvent(DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY.CONVERT_DATA_SPACE_TO_DATA_PRODUCT, {
|
|
63
|
-
sourceInfo: editorStore.editorMode.getSourceInfo(),
|
|
64
|
-
dataSpacePath: dataSpace.path,
|
|
65
|
-
dataProductPath: dataProduct.path,
|
|
66
|
-
});
|
|
67
|
-
editorStore.applicationStore.notificationService.notifySuccess(`Successfully converted DataSpace ${dataSpace.name} to Data Product`);
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
assertErrorThrown(error);
|
|
71
|
-
editorStore.applicationStore.notificationService.notifyError(`Failed to convert DataSpace to Data Product: ${error.message}`);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
23
|
export class DataSpaceEditorState extends ElementEditorState {
|
|
75
24
|
executionContextState;
|
|
76
25
|
constructor(editorStore, element) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditorState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"DataSpaceEditorState.js","sourceRoot":"","sources":["../../src/stores/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAEL,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,OAAO,EACP,KAAK,EACL,WAAW,EACX,WAAW,EACX,OAAO,EACP,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qCAAq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,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACjB,KAAK,EAAE,OAAO,CAAC,IAAI;YACnB,KAAK,EAAE,OAAO;SACf,CAAC,CAAC,CAAC;IACR,CAAC;IAED,IAAI,SAAS;QACX,OAAO,aAAa,CAClB,IAAI,CAAC,OAAO,EACZ,SAAS,EACT,mEAAmE,CACpE,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,UAA8B,EAC9B,WAAwB;QAExB,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACnE,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.339",
|
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.0.
|
|
46
|
-
"@finos/legend-application-studio": "28.21.
|
|
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.6.
|
|
51
|
-
"@finos/legend-query-builder": "4.
|
|
45
|
+
"@finos/legend-application": "16.0.119",
|
|
46
|
+
"@finos/legend-application-studio": "28.21.30",
|
|
47
|
+
"@finos/legend-art": "7.1.159",
|
|
48
|
+
"@finos/legend-code-editor": "2.0.194",
|
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.243",
|
|
50
|
+
"@finos/legend-graph": "32.6.25",
|
|
51
|
+
"@finos/legend-query-builder": "4.19.0",
|
|
52
52
|
"@finos/legend-server-depot": "6.1.17",
|
|
53
53
|
"@finos/legend-server-sdlc": "5.4.7",
|
|
54
54
|
"@finos/legend-shared": "11.0.27",
|
|
@@ -23,7 +23,3 @@ export enum DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY {
|
|
|
23
23
|
export enum DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY {
|
|
24
24
|
DATA_SPACE_EDITOR = 'studio.editor.data-space-editor',
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
export enum DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_LOGGING_CONTEXT_KEY {
|
|
28
|
-
CONVERT_DATA_SPACE_TO_DATA_PRODUCT = 'studio.editor.data-space-editor.convert-data-space-to-data-product',
|
|
29
|
-
}
|