@finos/legend-application-studio 28.21.42 → 28.21.44
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__/LegendStudioEvent.d.ts +18 -4
- package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioEvent.js +20 -5
- package/lib/__lib__/LegendStudioEvent.js.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +177 -31
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.js +229 -72
- package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
- package/lib/__lib__/LegendStudioUserDataHelper.d.ts +18 -1
- package/lib/__lib__/LegendStudioUserDataHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioUserDataHelper.js +71 -0
- package/lib/__lib__/LegendStudioUserDataHelper.js.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.d.ts +12 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +6 -0
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/LegendStudioWebApplication.d.ts.map +1 -1
- package/lib/components/LegendStudioWebApplication.js +5 -2
- package/lib/components/LegendStudioWebApplication.js.map +1 -1
- package/lib/components/ShowcaseManager.d.ts.map +1 -1
- package/lib/components/ShowcaseManager.js +6 -4
- package/lib/components/ShowcaseManager.js.map +1 -1
- package/lib/components/editor/ActivityBar.d.ts.map +1 -1
- package/lib/components/editor/ActivityBar.js +2 -1
- package/lib/components/editor/ActivityBar.js.map +1 -1
- package/lib/components/editor/editor-group/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/GrammarTextEditor.js +7 -1
- package/lib/components/editor/editor-group/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.d.ts +37 -0
- package/lib/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.js +126 -0
- package/lib/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.js.map +1 -0
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +22 -127
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +4 -4
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/showcase/ShowcaseFeedback.d.ts +36 -0
- package/lib/components/showcase/ShowcaseFeedback.d.ts.map +1 -0
- package/lib/components/showcase/ShowcaseFeedback.js +70 -0
- package/lib/components/showcase/ShowcaseFeedback.js.map +1 -0
- package/lib/components/showcase/ShowcaseViewer.d.ts.map +1 -1
- package/lib/components/showcase/ShowcaseViewer.js +3 -1
- package/lib/components/showcase/ShowcaseViewer.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +2 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendStudioBaseStore.js +1 -0
- package/lib/stores/LegendStudioBaseStore.js.map +1 -1
- package/lib/stores/ShowcaseManagerState.d.ts +5 -3
- package/lib/stores/ShowcaseManagerState.d.ts.map +1 -1
- package/lib/stores/ShowcaseManagerState.js +44 -11
- package/lib/stores/ShowcaseManagerState.js.map +1 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +1 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.d.ts +2 -1
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +8 -2
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.js +2 -2
- package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
- package/lib/stores/editor/GraphEditGrammarModeState.d.ts +19 -0
- package/lib/stores/editor/GraphEditGrammarModeState.d.ts.map +1 -1
- package/lib/stores/editor/GraphEditGrammarModeState.js +92 -4
- package/lib/stores/editor/GraphEditGrammarModeState.js.map +1 -1
- package/lib/stores/editor/GraphEditorMode.d.ts +1 -0
- package/lib/stores/editor/GraphEditorMode.d.ts.map +1 -1
- package/lib/stores/editor/GraphEditorMode.js.map +1 -1
- package/lib/stores/editor/StandardEditorMode.d.ts +16 -5
- package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
- package/lib/stores/editor/StandardEditorMode.js +4 -2
- package/lib/stores/editor/StandardEditorMode.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +2 -14
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +5 -75
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts +0 -11
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js +2 -77
- package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +4 -4
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/LocalChangesState.d.ts +1 -0
- package/lib/stores/editor/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/LocalChangesState.js +27 -0
- package/lib/stores/editor/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.js +7 -0
- package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/dev-metadata/DevMetadataState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/dev-metadata/DevMetadataState.js +7 -2
- package/lib/stores/editor/sidebar-state/dev-metadata/DevMetadataState.js.map +1 -1
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.d.ts +1 -0
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.d.ts.map +1 -1
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.js +3 -0
- package/lib/stores/lazy-text-editor/LazyTextEditorStore.js.map +1 -1
- package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -1
- package/lib/stores/project-reviewer/ProjectReviewerStore.js +2 -0
- package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -1
- package/lib/stores/project-view/ProjectViewerEditorMode.d.ts +2 -2
- package/lib/stores/project-view/ProjectViewerEditorMode.d.ts.map +1 -1
- package/lib/stores/project-view/ProjectViewerEditorMode.js +12 -0
- package/lib/stores/project-view/ProjectViewerEditorMode.js.map +1 -1
- package/lib/stores/project-view/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-view/ProjectViewerStore.js +3 -1
- package/lib/stores/project-view/ProjectViewerStore.js.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerEditorMode.d.ts.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerEditorMode.js.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerStore.d.ts.map +1 -1
- package/lib/stores/showcase/ShowcaseViewerStore.js +7 -3
- package/lib/stores/showcase/ShowcaseViewerStore.js.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js +1 -0
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
- package/package.json +16 -16
- package/src/__lib__/LegendStudioEvent.ts +22 -6
- package/src/__lib__/LegendStudioTelemetryHelper.ts +425 -104
- package/src/__lib__/LegendStudioUserDataHelper.ts +115 -0
- package/src/application/LegendStudioApplicationConfig.ts +19 -0
- package/src/components/LegendStudioWebApplication.tsx +18 -2
- package/src/components/ShowcaseManager.tsx +24 -4
- package/src/components/editor/ActivityBar.tsx +5 -1
- package/src/components/editor/editor-group/GrammarTextEditor.tsx +18 -1
- package/src/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.tsx +285 -0
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +38 -323
- package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +4 -0
- package/src/components/showcase/ShowcaseFeedback.tsx +136 -0
- package/src/components/showcase/ShowcaseViewer.tsx +10 -0
- package/src/components/workspace-setup/WorkspaceSetup.tsx +6 -1
- package/src/index.ts +2 -0
- package/src/stores/LegendStudioBaseStore.ts +1 -0
- package/src/stores/ShowcaseManagerState.ts +67 -8
- package/src/stores/editor/EditorGraphState.ts +1 -0
- package/src/stores/editor/EditorStore.ts +26 -4
- package/src/stores/editor/GraphEditFormModeState.ts +2 -0
- package/src/stores/editor/GraphEditGrammarModeState.ts +139 -1
- package/src/stores/editor/GraphEditorMode.ts +1 -0
- package/src/stores/editor/StandardEditorMode.ts +21 -7
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +3 -119
- package/src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts +1 -136
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +4 -0
- package/src/stores/editor/sidebar-state/LocalChangesState.ts +47 -0
- package/src/stores/editor/sidebar-state/WorkspaceUpdaterState.ts +18 -0
- package/src/stores/editor/sidebar-state/dev-metadata/DevMetadataState.ts +7 -0
- package/src/stores/lazy-text-editor/LazyTextEditorStore.ts +4 -0
- package/src/stores/project-reviewer/ProjectReviewerStore.ts +4 -0
- package/src/stores/project-view/ProjectViewerEditorMode.ts +17 -4
- package/src/stores/project-view/ProjectViewerStore.ts +5 -0
- package/src/stores/showcase/ShowcaseViewerEditorMode.ts +4 -5
- package/src/stores/showcase/ShowcaseViewerStore.ts +12 -2
- package/src/stores/workspace-setup/WorkspaceSetupStore.ts +2 -0
- package/tsconfig.json +2 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { useState } from 'react';
|
|
19
|
+
import { Dialog, LongArrowRightIcon, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader, PencilEditIcon, PlusIcon, Tooltip, } from '@finos/legend-art';
|
|
20
|
+
import { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';
|
|
21
|
+
import { RelationElementEditor } from './RelationElementsDataEditor.js';
|
|
22
|
+
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
23
|
+
export const RelationElementSampleValuesEditor = observer((props) => {
|
|
24
|
+
const { title, relationElementState, isReadOnly, isBusy, hideColumnDefinitions, deleteConfirmMessage, onAdd, onDelete, hasMismatch, mismatchMessage, readOnlySource, } = props;
|
|
25
|
+
const editorStore = useEditorStore();
|
|
26
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
27
|
+
const isEditMode = Boolean(relationElementState) || Boolean(readOnlySource);
|
|
28
|
+
const closeModal = () => setIsModalOpen(false);
|
|
29
|
+
const handleClick = () => {
|
|
30
|
+
if (isEditMode) {
|
|
31
|
+
setIsModalOpen(true);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
Promise.resolve(onAdd())
|
|
35
|
+
.then(() => setIsModalOpen(true))
|
|
36
|
+
.catch(editorStore.applicationStore.alertUnhandledError);
|
|
37
|
+
};
|
|
38
|
+
const handleDelete = () => {
|
|
39
|
+
editorStore.applicationStore.alertService.setActionAlertInfo({
|
|
40
|
+
message: deleteConfirmMessage,
|
|
41
|
+
type: ActionAlertType.CAUTION,
|
|
42
|
+
actions: [
|
|
43
|
+
{
|
|
44
|
+
label: 'Confirm',
|
|
45
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
|
46
|
+
handler: () => {
|
|
47
|
+
onDelete();
|
|
48
|
+
closeModal();
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: 'Cancel',
|
|
53
|
+
type: ActionAlertActionType.PROCEED,
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const buttonStyle = {
|
|
60
|
+
cursor: isReadOnly ? 'not-allowed' : 'pointer',
|
|
61
|
+
};
|
|
62
|
+
if (relationElementState && !readOnlySource) {
|
|
63
|
+
buttonStyle.border = hasMismatch
|
|
64
|
+
? '2px solid var(--color-red-300)'
|
|
65
|
+
: '1px solid var(--color-blue-200)';
|
|
66
|
+
}
|
|
67
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { className: "access-point-editor__sample-values-btn", onClick: handleClick, disabled: isReadOnly || isBusy, title: isEditMode ? 'Edit sample values' : 'Add sample values', style: buttonStyle, children: [isEditMode ? _jsx(PencilEditIcon, {}) : _jsx(PlusIcon, {}), _jsx("span", { children: "Sample Values" })] }), isModalOpen && (_jsx(Dialog, { open: isModalOpen, onClose: closeModal, classes: {
|
|
68
|
+
root: 'editor-modal__root-container',
|
|
69
|
+
container: 'editor-modal__container',
|
|
70
|
+
paper: 'editor-modal__content',
|
|
71
|
+
}, children: _jsxs(Modal, { className: "editor-modal", darkMode: !editorStore.applicationStore.layoutService
|
|
72
|
+
.TEMPORARY__isLightColorThemeEnabled, children: [_jsx(ModalHeader, { title: title }), _jsx(ModalBody, { children: _jsx("div", { style: {
|
|
73
|
+
padding: 0,
|
|
74
|
+
height: '100%',
|
|
75
|
+
flex: 1,
|
|
76
|
+
overflowY: 'auto',
|
|
77
|
+
overflowX: 'hidden',
|
|
78
|
+
}, children: readOnlySource ? (_jsxs("div", { style: {
|
|
79
|
+
padding: '1.5rem',
|
|
80
|
+
display: 'flex',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
gap: '1rem',
|
|
84
|
+
}, children: [_jsx("span", { style: {
|
|
85
|
+
color: 'var(--color-light-grey-200)',
|
|
86
|
+
whiteSpace: 'nowrap',
|
|
87
|
+
fontSize: '1.3rem',
|
|
88
|
+
fontWeight: 600,
|
|
89
|
+
}, children: readOnlySource.message ??
|
|
90
|
+
'Sample Values already in Data Element' }), _jsxs("div", { style: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
gap: '0.5rem',
|
|
94
|
+
padding: '0.5rem 1rem',
|
|
95
|
+
background: 'var(--color-dark-grey-100)',
|
|
96
|
+
border: '1px solid var(--color-dark-grey-300)',
|
|
97
|
+
borderRadius: '0.2rem',
|
|
98
|
+
}, children: [_jsx("span", { style: {
|
|
99
|
+
fontSize: '1.3rem',
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
color: 'var(--color-light-grey-200)',
|
|
102
|
+
}, children: readOnlySource.label }), _jsx("button", { className: "btn--sm btn--dark", onClick: readOnlySource.onNavigate, tabIndex: -1, title: "Navigate to data element", style: {
|
|
103
|
+
padding: '0.3rem 0.5rem',
|
|
104
|
+
display: 'flex',
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
}, children: _jsx(LongArrowRightIcon, {}) })] })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
107
|
+
color: 'var(--color-orange-200)',
|
|
108
|
+
fontWeight: 'bold',
|
|
109
|
+
fontSize: '14px',
|
|
110
|
+
padding: '0.5rem',
|
|
111
|
+
marginBottom: '1rem',
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
backgroundColor: 'var(--color-orange-50)',
|
|
114
|
+
border: '2px solid var(--color-orange-200)',
|
|
115
|
+
borderRadius: '4px',
|
|
116
|
+
}, children: "DO NOT ADD SENSITIVE DATA" }), relationElementState && (_jsx(Tooltip, { title: mismatchMessage ?? '', arrow: true, placement: "top", disableHoverListener: !hasMismatch, children: _jsx("div", { style: {
|
|
117
|
+
border: hasMismatch
|
|
118
|
+
? '2px solid var(--color-red-300)'
|
|
119
|
+
: 'none',
|
|
120
|
+
borderRadius: '4px',
|
|
121
|
+
padding: hasMismatch ? '0.5rem' : '0',
|
|
122
|
+
}, children: _jsx(RelationElementEditor, { relationElementState: relationElementState, isReadOnly: isReadOnly, ...(hideColumnDefinitions !== undefined
|
|
123
|
+
? { hideColumnDefinitions }
|
|
124
|
+
: {}) }) }) }))] })) }) }), _jsxs(ModalFooter, { children: [!readOnlySource && (_jsx(ModalFooterButton, { title: "Delete sample values", onClick: handleDelete, text: "Delete", type: "secondary", disabled: isReadOnly })), _jsx(ModalFooterButton, { title: "Close sample values editor", onClick: closeModal, text: "Close", type: "secondary" })] })] }) }))] }));
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=RelationElementSampleValuesEditor.js.map
|
package/lib/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationElementSampleValuesEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/data-editor/RelationElementSampleValuesEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAsB,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,QAAQ,CACvD,CAAC,KAYA,EAAE,EAAE;IACH,MAAM,EACJ,KAAK,EACL,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,eAAe,EACf,cAAc,GACf,GAAG,KAAK,CAAC;IACV,MAAM,WAAW,GAAG,cAAc,E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,CAAC,CAAC,MAAM;oDACV,YAAY,EAAE,KAAK;oDACnB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG;iDACtC,YAED,KAAC,qBAAqB,IACpB,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,KAClB,CAAC,qBAAqB,KAAK,SAAS;wDACtC,CAAC,CAAC,EAAE,qBAAqB,EAAE;wDAC3B,CAAC,CAAC,EAAE,CAAC,GACP,GACE,GACE,CACX,IACA,CACJ,GACG,GACI,EACZ,MAAC,WAAW,eACT,CAAC,cAAc,IAAI,CAClB,KAAC,iBAAiB,IAChB,KAAK,EAAC,sBAAsB,EAC5B,OAAO,EAAE,YAAY,EACrB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,WAAW,EAChB,QAAQ,EAAE,UAAU,GACpB,CACH,EACD,KAAC,iBAAiB,IAChB,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,UAAU,EACnB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,WAAW,GAChB,IACU,IACR,GACD,CACV,IACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProductEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAK/B,MAAM,mGAAmG,CAAC;
|
|
1
|
+
{"version":3,"file":"DataProductEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataProductEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAK/B,MAAM,mGAAmG,CAAC;AA8K3G,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,0FAA0F,CAAC;AAIlG,oBAAY,qBAAqB;IAC/B,gBAAgB,wBAAwB;IACxC,iBAAiB,8BAA8B;IAC/C,uBAAuB,+BAA+B;IACtD,aAAa,+BAA+B;IAC5C,cAAc,qCAAqC;IACnD,oBAAoB,sCAAsC;CAC3D;AAED,eAAO,MAAM,qBAAqB,+DAC4B,CAAC;AAK/D,MAAM,MAAM,qBAAqB,GAAG;IAClC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAwQF,eAAO,MAAM,qCAAqC,WACxC;IACN,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CAChD;;CA2iBF,CAAC;AAu8DF,eAAO,MAAM,iBAAiB;;CAsK5B,CAAC"}
|
|
@@ -17,7 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
18
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
19
19
|
import { DATA_PRODUCT_TAB, DATA_PRODUCT_TYPE, DataProductEditorState, ModelAccessPointGroupState, } from '../../../../stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
|
|
20
|
-
import { BugIcon, BuildingIcon, CaretDownIcon, Checkbox, CloseEyeIcon, clsx, compressImage, ControlledDropdownMenu, CustomSelectorInput, Dialog, DragPreviewLayer, ErrorWarnIcon, EyeIcon, GroupWorkIcon, HomeIcon, IconSelectorGrid, IconSelectorIcons, InfoCircleIcon, ListEditor, LockIcon, MenuContent, MenuContentItem, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader,
|
|
20
|
+
import { BugIcon, BuildingIcon, CaretDownIcon, Checkbox, CloseEyeIcon, clsx, compressImage, ControlledDropdownMenu, CustomSelectorInput, Dialog, DragPreviewLayer, ErrorWarnIcon, EyeIcon, GroupWorkIcon, HomeIcon, IconSelectorGrid, IconSelectorIcons, InfoCircleIcon, ListEditor, LockIcon, MenuContent, MenuContentItem, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader, PanelContent, PanelDnDEntry, PanelEntryDragHandle, PanelFormTextField, PanelHeader, PanelHeaderActionItem, PanelHeaderActions, PencilEditIcon, PlusIcon, QuestionCircleIcon, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, Switch, TimesIcon, Tooltip, UploadIcon, useDragPreviewLayer, WarningIcon, LongArrowRightIcon, PURE_MappingIcon, GitBranchIcon, ListIcon, PanelLoadingIndicator, GearSuggestIcon, FlaskIcon, SparkleIcon, } from '@finos/legend-art';
|
|
21
21
|
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
22
22
|
import { assertErrorThrown, guaranteeNonNullable, guaranteeType, HttpStatus, isNonNullable, NetworkClientError, UserSearchService, } from '@finos/legend-shared';
|
|
23
23
|
import { AccessorQueryBuilderState, getCompatibleRuntimesFromAccessorOwner, InlineLambdaEditor, LineageViewer, QueryBuilderActionConfig, QueryBuilderAdvancedWorkflowState, } from '@finos/legend-query-builder';
|
|
@@ -34,7 +34,7 @@ import { useDrag, useDrop } from 'react-dnd';
|
|
|
34
34
|
import { annotatedElement_addStereotype, annotatedElement_deleteStereotype, } from '../../../../stores/graph-modifier/DomainGraphModifierHelper.js';
|
|
35
35
|
import { buildElementOption, } from '@finos/legend-lego/graph-editor';
|
|
36
36
|
import { DataProductViewerState, ProductViewer, } from '@finos/legend-extension-dsl-data-product';
|
|
37
|
-
import {
|
|
37
|
+
import { RelationElementSampleValuesEditor } from '../data-editor/RelationElementSampleValuesEditor.js';
|
|
38
38
|
import { LegendStudioTelemetryHelper } from '../../../../__lib__/LegendStudioTelemetryHelper.js';
|
|
39
39
|
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
|
40
40
|
export var AP_GROUP_MODAL_ERRORS;
|
|
@@ -133,102 +133,6 @@ const AccessPointGenerationViewer = observer((props) => {
|
|
|
133
133
|
}, children: _jsxs(Modal, { className: "editor-modal", darkMode: !editorStore.applicationStore.layoutService
|
|
134
134
|
.TEMPORARY__isLightColorThemeEnabled, children: [_jsx(ModalHeader, { title: `${accessPointState.accessPoint.id} Plan Generation` }), _jsx(ModalBody, { children: _jsx("div", { className: "panel__content execution-plan-viewer__panel__content", children: _jsx(CodeEditor, { inputValue: generationOutput, isReadOnly: true, language: CODE_EDITOR_LANGUAGE.JSON, hidePadding: true, hideMinimap: true }) }) }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { title: "Close plan generation modal", onClick: closeDebug, text: "Close", type: "secondary" }) })] }) }));
|
|
135
135
|
});
|
|
136
|
-
const SampleValuesEditorModal = observer((props) => {
|
|
137
|
-
const { accessPointState, isReadOnly } = props;
|
|
138
|
-
const editorStore = accessPointState.state.state.editorStore;
|
|
139
|
-
const dataElementPath = accessPointState.relationElementExistsinDataElementReference();
|
|
140
|
-
const closeModal = () => {
|
|
141
|
-
accessPointState.setShowSampleValuesModal(false);
|
|
142
|
-
};
|
|
143
|
-
const handleDeleteSampleValues = () => {
|
|
144
|
-
editorStore.applicationStore.alertService.setActionAlertInfo({
|
|
145
|
-
message: `Are you sure you want to delete sample values for Access Point ${accessPointState.accessPoint.id}?`,
|
|
146
|
-
type: ActionAlertType.CAUTION,
|
|
147
|
-
actions: [
|
|
148
|
-
{
|
|
149
|
-
label: 'Confirm',
|
|
150
|
-
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
|
151
|
-
handler: () => {
|
|
152
|
-
accessPointState.deleteRelationElement();
|
|
153
|
-
closeModal();
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: 'Cancel',
|
|
158
|
-
type: ActionAlertActionType.PROCEED,
|
|
159
|
-
default: true,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
const handleNavigateToDataElement = () => {
|
|
165
|
-
if (dataElementPath) {
|
|
166
|
-
const dataElement = editorStore.graphManagerState.graph.getNullableElement(dataElementPath);
|
|
167
|
-
if (dataElement) {
|
|
168
|
-
editorStore.graphEditorMode.openElement(dataElement);
|
|
169
|
-
closeModal();
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
return (_jsx(Dialog, { open: accessPointState.showSampleValuesModal, onClose: closeModal, classes: {
|
|
174
|
-
root: 'editor-modal__root-container',
|
|
175
|
-
container: 'editor-modal__container',
|
|
176
|
-
paper: 'editor-modal__content',
|
|
177
|
-
}, children: _jsxs(Modal, { className: "editor-modal", darkMode: !editorStore.applicationStore.layoutService
|
|
178
|
-
.TEMPORARY__isLightColorThemeEnabled, children: [_jsx(ModalHeader, { title: `${accessPointState.accessPoint.title ?? accessPointState.accessPoint.id} Sample Values` }), _jsx(ModalBody, { children: _jsx("div", { style: {
|
|
179
|
-
padding: 0,
|
|
180
|
-
height: '100%',
|
|
181
|
-
flex: 1,
|
|
182
|
-
overflowY: 'auto',
|
|
183
|
-
overflowX: 'hidden',
|
|
184
|
-
}, children: dataElementPath !== undefined ? (_jsxs("div", { style: {
|
|
185
|
-
padding: '1.5rem',
|
|
186
|
-
display: 'flex',
|
|
187
|
-
alignItems: 'center',
|
|
188
|
-
justifyContent: 'center',
|
|
189
|
-
gap: '1rem',
|
|
190
|
-
}, children: [_jsx("span", { style: {
|
|
191
|
-
color: 'var(--color-light-grey-200)',
|
|
192
|
-
whiteSpace: 'nowrap',
|
|
193
|
-
fontSize: '1.3rem',
|
|
194
|
-
fontWeight: 600,
|
|
195
|
-
}, children: "Sample Values already in Data Element" }), _jsxs("div", { style: {
|
|
196
|
-
display: 'flex',
|
|
197
|
-
alignItems: 'center',
|
|
198
|
-
gap: '0.5rem',
|
|
199
|
-
padding: '0.5rem 1rem',
|
|
200
|
-
background: 'var(--color-dark-grey-100)',
|
|
201
|
-
border: '1px solid var(--color-dark-grey-300)',
|
|
202
|
-
borderRadius: '0.2rem',
|
|
203
|
-
}, children: [_jsx("span", { style: {
|
|
204
|
-
fontSize: '1.3rem',
|
|
205
|
-
fontWeight: 600,
|
|
206
|
-
color: 'var(--color-light-grey-200)',
|
|
207
|
-
}, children: dataElementPath }), _jsx("button", { className: "btn--sm btn--dark", onClick: handleNavigateToDataElement, tabIndex: -1, title: "Navigate to data element", style: {
|
|
208
|
-
padding: '0.3rem 0.5rem',
|
|
209
|
-
display: 'flex',
|
|
210
|
-
alignItems: 'center',
|
|
211
|
-
}, children: _jsx(LongArrowRightIcon, {}) })] })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
212
|
-
color: 'var(--color-orange-200)',
|
|
213
|
-
fontWeight: 'bold',
|
|
214
|
-
fontSize: '14px',
|
|
215
|
-
padding: '0.5rem',
|
|
216
|
-
marginBottom: '1rem',
|
|
217
|
-
textAlign: 'center',
|
|
218
|
-
backgroundColor: 'var(--color-orange-50)',
|
|
219
|
-
border: '2px solid var(--color-orange-200)',
|
|
220
|
-
borderRadius: '4px',
|
|
221
|
-
}, children: "DO NOT ADD SENSITIVE DATA" }), accessPointState.relationElementState && (_jsx(Tooltip, { title: accessPointState.getRelationElementMismatchMessage() ??
|
|
222
|
-
'', arrow: true, placement: "top", disableHoverListener: !accessPointState.hasRelationElementMismatch, children: _jsx("div", { style: {
|
|
223
|
-
border: accessPointState.hasRelationElementMismatch
|
|
224
|
-
? '2px solid var(--color-red-300)'
|
|
225
|
-
: 'none',
|
|
226
|
-
borderRadius: '4px',
|
|
227
|
-
padding: accessPointState.hasRelationElementMismatch
|
|
228
|
-
? '0.5rem'
|
|
229
|
-
: '0',
|
|
230
|
-
}, children: _jsx(RelationElementEditor, { relationElementState: accessPointState.relationElementState, isReadOnly: isReadOnly, hideColumnDefinitions: true }) }) }))] })) }) }), _jsxs(ModalFooter, { children: [dataElementPath === undefined && (_jsx(ModalFooterButton, { title: "Delete sample values", onClick: handleDeleteSampleValues, text: "Delete", type: "secondary", disabled: isReadOnly })), _jsx(ModalFooterButton, { title: "Close sample values editor", onClick: closeModal, text: "Close", type: "secondary" })] })] }) }));
|
|
231
|
-
});
|
|
232
136
|
export const LakehouseDataProductAccessPointEditor = observer((props) => {
|
|
233
137
|
const { accessPointState, aiSuggestionMeta } = props;
|
|
234
138
|
const editorStore = useEditorStore();
|
|
@@ -368,19 +272,20 @@ export const LakehouseDataProductAccessPointEditor = observer((props) => {
|
|
|
368
272
|
maxWidth: '400px',
|
|
369
273
|
whiteSpace: 'normal',
|
|
370
274
|
wordWrap: 'break-word',
|
|
371
|
-
}, children: "Marking as \"reproducible\" means consumers can consistently retrieve the exact historical data as it existed at any specific Lakehouse batch." }), arrow: true, placement: 'top', children: _jsx("div", { children: "Reproducible" }) })] }), accessPointState.
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
275
|
+
}, children: "Marking as \"reproducible\" means consumers can consistently retrieve the exact historical data as it existed at any specific Lakehouse batch." }), arrow: true, placement: 'top', children: _jsx("div", { children: "Reproducible" }) })] }), _jsx(RelationElementSampleValuesEditor, { title: `${accessPointState.accessPoint.title ?? accessPointState.accessPoint.id} Sample Values`, relationElementState: accessPointState.relationElementState, isReadOnly: props.isReadOnly, hideColumnDefinitions: true, hasMismatch: accessPointState.hasRelationElementMismatch, mismatchMessage: accessPointState.getRelationElementMismatchMessage(), readOnlySource: (() => {
|
|
276
|
+
const dataElementPath = accessPointState.relationElementExistsinDataElementReference();
|
|
277
|
+
return dataElementPath !== undefined
|
|
278
|
+
? {
|
|
279
|
+
label: dataElementPath,
|
|
280
|
+
onNavigate: () => {
|
|
281
|
+
const dataElement = editorStore.graphManagerState.graph.getNullableElement(dataElementPath);
|
|
282
|
+
if (dataElement) {
|
|
283
|
+
editorStore.graphEditorMode.openElement(dataElement);
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
}
|
|
287
|
+
: undefined;
|
|
288
|
+
})(), deleteConfirmMessage: `Are you sure you want to delete sample values for Access Point ${accessPointState.accessPoint.id}?`, onAdd: () => flowResult(accessPointState.createAndaddRelationElement()), onDelete: () => accessPointState.deleteRelationElement() }), editorStore.applicationStore.config.options
|
|
384
289
|
.dataProductConfig && (_jsx(AccessPointClassification, { accessPoint: accessPoint, groupState: groupState })), _jsxs("div", { className: clsx('access-point-editor__type'), title: 'Change target environment', children: [_jsx("div", { className: "access-point-editor__type__label", children: accessPoint.targetEnvironment }), _jsx(ControlledDropdownMenu, { className: "access-point-editor__dropdown", content: _jsx(MenuContent, { children: Object.values(LakehouseTargetEnv).map((environment) => (_jsx(MenuContentItem, { className: "btn__dropdown-combo__option", onClick: () => updateAccessPointTargetEnvironment(environment), children: environment }, environment))) }), menuProps: {
|
|
385
290
|
anchorOrigin: {
|
|
386
291
|
vertical: 'bottom',
|
|
@@ -425,17 +330,7 @@ export const LakehouseDataProductAccessPointEditor = observer((props) => {
|
|
|
425
330
|
} })) : (_jsxs("div", { onClick: handleDescriptionEdit, title: "Click to edit access point description", className: "access-point-editor__description-container", children: [accessPoint.description ? (_jsx(HoverTextArea, { text: accessPoint.description, handleMouseOver: handleMouseOverDesc, handleMouseOut: handleMouseOutDesc })) : (_jsxs("div", { className: "access-point-editor__group-container__description--warning", onMouseOver: handleMouseOverDesc, onMouseOut: handleMouseOutDesc, children: [_jsx(ErrorWarnIcon, {}), AP_EMPTY_DESC_WARNING] })), isHoveringDesc && hoverIcon()] })), aiSuggestionMeta && (_jsx("div", { className: "data-product-editor__ai-suggestion-inline", children: aiSuggestionMeta.description })), _jsx("div", { className: "access-point-editor__content", children: _jsx("div", { className: "access-point-editor__generic-entry", children: _jsx("div", { className: "access-point-editor__entry__container", children: _jsxs("div", { className: "access-point-editor__entry", children: [_jsxs("button", { className: "access-point-editor__query-builder-btn", onClick: editLambdaInQueryBuilder, disabled: props.isReadOnly, title: "Edit lambda with query builder", children: [_jsx(PencilEditIcon, {}), _jsx("span", { children: "Query Builder" })] }), _jsx(InlineLambdaEditor, { className: 'access-point-editor__lambda-editor', disabled: lambdaEditorState.val.state.state
|
|
426
331
|
.isConvertingTransformLambdaObjects, lambdaEditorState: lambdaEditorState, forceBackdrop: Boolean(lambdaEditorState.parserError), onEditorBlur: handleEditorBlur })] }) }) }) }), _jsx(LineageViewer, { lineageState: accessPointState.lineageState })] }), _jsx("button", { className: "access-point-editor__generic-entry__remove-btn", onClick: () => {
|
|
427
332
|
handleRemoveAccessPoint();
|
|
428
|
-
}, tabIndex: -1, title: "Remove", children: _jsx(TimesIcon, {}) }), accessPointState.artifactGenerationContent && (_jsx(AccessPointGenerationViewer, { accessPointState: accessPointState, generationOutput: accessPointState.artifactGenerationContent }))
|
|
429
|
-
});
|
|
430
|
-
const DataProductDeploymentResponseModal = observer((props) => {
|
|
431
|
-
const { state } = props;
|
|
432
|
-
const applicationStore = state.editorStore.applicationStore;
|
|
433
|
-
const closeModal = () => state.setDeployResponse(undefined);
|
|
434
|
-
return (_jsx(Dialog, { open: Boolean(state.deployResponse), classes: {
|
|
435
|
-
root: 'editor-modal__root-container',
|
|
436
|
-
container: 'editor-modal__container',
|
|
437
|
-
paper: 'editor-modal__content',
|
|
438
|
-
}, onClose: closeModal, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: "editor-modal", children: [_jsx(ModalHeader, { children: _jsx(ModalTitle, { title: "Data Product Deployment Response" }) }), _jsx(ModalBody, { children: _jsx(PanelContent, { children: _jsx(CodeEditor, { inputValue: JSON.stringify(state.deployResponse?.content ?? {}, null, 2), isReadOnly: true, language: CODE_EDITOR_LANGUAGE.JSON }) }) }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { onClick: closeModal, text: "Close", type: "secondary" }) })] }) }));
|
|
333
|
+
}, tabIndex: -1, title: "Remove", children: _jsx(TimesIcon, {}) }), accessPointState.artifactGenerationContent && (_jsx(AccessPointGenerationViewer, { accessPointState: accessPointState, generationOutput: accessPointState.artifactGenerationContent }))] }) }));
|
|
439
334
|
});
|
|
440
335
|
const AccessPointGroupPublicToggle = observer((props) => {
|
|
441
336
|
const { groupState } = props;
|
|
@@ -577,7 +472,7 @@ const AccessPointGroupEditor = observer((props) => {
|
|
|
577
472
|
if (!aiDocSuggester || !legendAIUrl) {
|
|
578
473
|
return;
|
|
579
474
|
}
|
|
580
|
-
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestLaunched(editorStore.applicationStore.telemetryService, productEditorState.product.path);
|
|
475
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestLaunched(editorStore.applicationStore.telemetryService, productEditorState.product.path, editorStore.editorMode.getSourceInfo());
|
|
581
476
|
setIsSuggestingWithAI(true);
|
|
582
477
|
setAISuggestion(undefined);
|
|
583
478
|
try {
|
|
@@ -590,7 +485,7 @@ const AccessPointGroupEditor = observer((props) => {
|
|
|
590
485
|
}
|
|
591
486
|
catch (error) {
|
|
592
487
|
assertErrorThrown(error);
|
|
593
|
-
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestFailure(editorStore.applicationStore.telemetryService, productEditorState.product.path, error.message);
|
|
488
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestFailure(editorStore.applicationStore.telemetryService, productEditorState.product.path, error.message, editorStore.editorMode.getSourceInfo());
|
|
594
489
|
if (error instanceof NetworkClientError &&
|
|
595
490
|
(error.response.status === HttpStatus.UNAUTHORIZED ||
|
|
596
491
|
error.response.status === HttpStatus.FORBIDDEN)) {
|
|
@@ -611,7 +506,7 @@ const AccessPointGroupEditor = observer((props) => {
|
|
|
611
506
|
if (!aiSuggestion) {
|
|
612
507
|
return;
|
|
613
508
|
}
|
|
614
|
-
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestApplied(editorStore.applicationStore.telemetryService, productEditorState.product.path);
|
|
509
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestApplied(editorStore.applicationStore.telemetryService, productEditorState.product.path, editorStore.editorMode.getSourceInfo());
|
|
615
510
|
// Find matching group in the response
|
|
616
511
|
const gIdx = productEditorState.accessPointGroupStates.indexOf(groupState);
|
|
617
512
|
const groupMeta = aiSuggestion.access_point_groups.find((g) => g.name === groupState.value.id) ?? aiSuggestion.access_point_groups[gIdx];
|
|
@@ -635,7 +530,7 @@ const AccessPointGroupEditor = observer((props) => {
|
|
|
635
530
|
setAISuggestion(undefined);
|
|
636
531
|
};
|
|
637
532
|
const discardAISuggestion = () => {
|
|
638
|
-
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestDiscarded(editorStore.applicationStore.telemetryService, productEditorState.product.path);
|
|
533
|
+
LegendStudioTelemetryHelper.logEvent_DataProductLegendAISuggestDiscarded(editorStore.applicationStore.telemetryService, productEditorState.product.path, editorStore.editorMode.getSourceInfo());
|
|
639
534
|
setAISuggestion(undefined);
|
|
640
535
|
};
|
|
641
536
|
// Computed AI suggestion for current group
|
|
@@ -792,7 +687,7 @@ const AccessPointGroupTab = observer((props) => {
|
|
|
792
687
|
},
|
|
793
688
|
}, children: _jsx(PlusIcon, { title: disableAddGroup
|
|
794
689
|
? 'Provide all group names'
|
|
795
|
-
: 'Create new access point group' }) })] }) }), _jsx(PanelContent, { children: selectedGroupState && (_jsx(AccessPointGroupEditor, { groupState: selectedGroupState, isReadOnly: isReadOnly }, selectedGroupState.uuid)) })
|
|
690
|
+
: 'Create new access point group' }) })] }) }), _jsx(PanelContent, { children: selectedGroupState && (_jsx(AccessPointGroupEditor, { groupState: selectedGroupState, isReadOnly: isReadOnly }, selectedGroupState.uuid)) })] }));
|
|
796
691
|
});
|
|
797
692
|
const DataProductSidebar = observer((props) => {
|
|
798
693
|
const { dataProductEditorState } = props;
|