@finos/legend-application-studio 28.18.112 → 28.18.114

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.
Files changed (53) hide show
  1. package/lib/components/ElementIconUtils.d.ts.map +1 -1
  2. package/lib/components/ElementIconUtils.js +3 -1
  3. package/lib/components/ElementIconUtils.js.map +1 -1
  4. package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
  5. package/lib/components/editor/editor-group/EditorGroup.js +5 -0
  6. package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
  7. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts +26 -0
  8. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -0
  9. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +113 -0
  10. package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -0
  11. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  12. package/lib/components/editor/side-bar/CreateNewElementModal.js +2 -0
  13. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  14. package/lib/index.css +2 -2
  15. package/lib/index.css.map +1 -1
  16. package/lib/package.json +1 -1
  17. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  18. package/lib/stores/editor/EditorGraphState.js +4 -1
  19. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  20. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  21. package/lib/stores/editor/EditorStore.js +1 -0
  22. package/lib/stores/editor/EditorStore.js.map +1 -1
  23. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  24. package/lib/stores/editor/EditorTabManagerState.js +5 -1
  25. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  26. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  27. package/lib/stores/editor/NewElementState.js +4 -1
  28. package/lib/stores/editor/NewElementState.js.map +1 -1
  29. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +54 -0
  30. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -0
  31. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +143 -0
  32. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -0
  33. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +1 -0
  34. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
  35. package/lib/stores/editor/utils/ModelClassifierUtils.js +2 -0
  36. package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
  37. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +19 -0
  38. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -0
  39. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +25 -0
  40. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -0
  41. package/package.json +13 -13
  42. package/src/components/ElementIconUtils.tsx +3 -0
  43. package/src/components/editor/editor-group/EditorGroup.tsx +4 -0
  44. package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +297 -0
  45. package/src/components/editor/side-bar/CreateNewElementModal.tsx +2 -0
  46. package/src/stores/editor/EditorGraphState.ts +3 -0
  47. package/src/stores/editor/EditorStore.ts +1 -0
  48. package/src/stores/editor/EditorTabManagerState.ts +4 -0
  49. package/src/stores/editor/NewElementState.ts +4 -0
  50. package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +216 -0
  51. package/src/stores/editor/utils/ModelClassifierUtils.ts +2 -0
  52. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +36 -0
  53. package/tsconfig.json +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA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A;IACnC,iDAAqB,CAAA;IACrB,2DAA+B,CAAA;IAC/B,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,2EAA+C,CAAA;IAC/C,qDAAyB,CAAA;IACzB,+CAAmB,CAAA;IACnB,+DAAmC,CAAA;IACnC,iFAAqD,CAAA;IACrD,2DAA+B,CAAA;IAC/B,yCAAa,CAAA;IACb,2DAA+B,CAAA;IAC/B,6DAAiC,CAAA;IAEjC,4EAAgD,CAAA;IAChD,gEAAoC,CAAA;AACtC,CAAC,EA3BW,wBAAwB,KAAxB,wBAAwB,QA2BnC;AAED,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,4EAAmC,CAAA;IACnC,kEAAyB,CAAA;IACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
1
+ {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,IAAI,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,8CAAuB,CAAA;AACzB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAU,EAAuB,EAAE;IACtE,IAAI,IAAI,YAAY,aAAa,EAAE,CAAC;QAClC,OAAO,mBAAmB,CAAC,SAAS,CAAC;IACvC,CAAC;SAAM,IAAI,IAAI,YAAY,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ACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { type AccessPoint, type DataProduct } from '@finos/legend-graph';
17
+ export declare const dataProduct_deleteAccessPoint: (product: DataProduct, accessPoint: AccessPoint) => void;
18
+ export declare const dataProduct_addAccessPoint: (product: DataProduct, accessPoint: AccessPoint) => void;
19
+ //# sourceMappingURL=DSL_DataProduct_GraphModifierHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSL_DataProduct_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,6BAA6B,YAC9B,WAAW,eAAe,WAAW,SAGhD,CAAC;AAEF,eAAO,MAAM,0BAA0B,YAC3B,WAAW,eAAe,WAAW,SAGhD,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { observe_AccessPoint, } from '@finos/legend-graph';
17
+ import { addUniqueEntry, deleteEntry } from '@finos/legend-shared';
18
+ import { action } from 'mobx';
19
+ export const dataProduct_deleteAccessPoint = action((product, accessPoint) => {
20
+ deleteEntry(product.accessPoints, accessPoint);
21
+ });
22
+ export const dataProduct_addAccessPoint = action((product, accessPoint) => {
23
+ addUniqueEntry(product.accessPoints, observe_AccessPoint(accessPoint));
24
+ });
25
+ //# sourceMappingURL=DSL_DataProduct_GraphModifierHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSL_DataProduct_GraphModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CACjD,CAAC,OAAoB,EAAE,WAAwB,EAAE,EAAE;IACjD,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AACjD,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAC9C,CAAC,OAAoB,EAAE,WAAwB,EAAE,EAAE;IACjD,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;AACzE,CAAC,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-studio",
3
- "version": "28.18.112",
3
+ "version": "28.18.114",
4
4
  "description": "Legend Studio application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,18 +45,18 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@finos/legend-application": "16.0.34",
49
- "@finos/legend-art": "7.1.91",
50
- "@finos/legend-code-editor": "2.0.59",
51
- "@finos/legend-data-cube": "0.1.22",
52
- "@finos/legend-graph": "32.1.17",
53
- "@finos/legend-lego": "2.0.63",
54
- "@finos/legend-query-builder": "4.16.23",
55
- "@finos/legend-server-depot": "6.0.87",
56
- "@finos/legend-server-sdlc": "5.3.55",
57
- "@finos/legend-server-showcase": "0.2.51",
58
- "@finos/legend-shared": "11.0.10",
59
- "@finos/legend-storage": "3.0.129",
48
+ "@finos/legend-application": "16.0.36",
49
+ "@finos/legend-art": "7.1.93",
50
+ "@finos/legend-code-editor": "2.0.61",
51
+ "@finos/legend-data-cube": "0.1.24",
52
+ "@finos/legend-graph": "32.1.19",
53
+ "@finos/legend-lego": "2.0.65",
54
+ "@finos/legend-query-builder": "4.16.25",
55
+ "@finos/legend-server-depot": "6.0.88",
56
+ "@finos/legend-server-sdlc": "5.3.56",
57
+ "@finos/legend-server-showcase": "0.2.52",
58
+ "@finos/legend-shared": "11.0.11",
59
+ "@finos/legend-storage": "3.0.130",
60
60
  "@testing-library/dom": "10.4.0",
61
61
  "@testing-library/react": "16.2.0",
62
62
  "@types/react": "19.0.10",
@@ -44,6 +44,7 @@ import {
44
44
  PURE_SnowflakeAppIcon,
45
45
  LaunchIcon,
46
46
  LinkIcon,
47
+ PURE_DataProductIcon,
47
48
  } from '@finos/legend-art';
48
49
  import { PACKAGEABLE_ELEMENT_TYPE } from '../stores/editor/utils/ModelClassifierUtils.js';
49
50
 
@@ -90,6 +91,8 @@ export const getElementTypeIcon = (
90
91
  return <PURE_ServiceIcon />;
91
92
  case PACKAGEABLE_ELEMENT_TYPE.CONNECTION:
92
93
  return <PURE_ConnectionIcon />;
94
+ case PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT:
95
+ return <PURE_DataProductIcon />;
93
96
  case PACKAGEABLE_ELEMENT_TYPE.TEMPORARY__LOCAL_CONNECTION:
94
97
  return <LinkIcon />;
95
98
  case PACKAGEABLE_ELEMENT_TYPE.RUNTIME:
@@ -88,6 +88,8 @@ import {
88
88
  } from '../../workspace-setup/WorkspaceSetup.js';
89
89
  import { HostedServiceFunctionActivatorEditorState } from '../../../stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js';
90
90
  import { HostedServiceFunctionActivatorEditor } from './function-activator/HostedServiceFunctionActivatorEditor.js';
91
+ import { DataProductEditorState } from '../../../stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
92
+ import { DataProductEditor } from './dataProduct/DataPoductEditor.js';
91
93
 
92
94
  export const ViewerEditorGroupSplashScreen: React.FC = () => {
93
95
  const commandListWidth = 300;
@@ -274,6 +276,8 @@ export const EditorGroup = observer(() => {
274
276
  return <MappingEditor key={currentTabState.uuid} />;
275
277
  } else if (currentTabState instanceof ServiceEditorState) {
276
278
  return <ServiceEditor key={currentTabState.uuid} />;
279
+ } else if (currentTabState instanceof DataProductEditorState) {
280
+ return <DataProductEditor key={currentTabState.uuid} />;
277
281
  } else if (currentTabState instanceof PackageableRuntimeEditorState) {
278
282
  return <PackageableRuntimeEditor key={currentTabState.uuid} />;
279
283
  } else if (
@@ -0,0 +1,297 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import { useEditorStore } from '../../EditorStoreProvider.js';
19
+ import {
20
+ DataProductEditorState,
21
+ LakehouseAccessPointState,
22
+ } from '../../../../stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
23
+ import {
24
+ clsx,
25
+ LockIcon,
26
+ PanelContent,
27
+ PanelHeader,
28
+ PanelHeaderActions,
29
+ Dialog,
30
+ PanelDivider,
31
+ InputWithInlineValidation,
32
+ useResizeDetector,
33
+ AccessPointIcon,
34
+ TimesIcon,
35
+ PlusIcon,
36
+ PanelHeaderActionItem,
37
+ } from '@finos/legend-art';
38
+ import { useRef, useState, useEffect } from 'react';
39
+ import { filterByType } from '@finos/legend-shared';
40
+ import { InlineLambdaEditor } from '@finos/legend-query-builder';
41
+
42
+ const NewAccessPointAccessPOint = observer(
43
+ (props: { dataProductEditorState: DataProductEditorState }) => {
44
+ const { dataProductEditorState: dataProductEditorState } = props;
45
+ const accessPointInputRef = useRef<HTMLInputElement>(null);
46
+ const [id, setId] = useState<string | undefined>(undefined);
47
+ const handleIdChange: React.ChangeEventHandler<HTMLInputElement> = (
48
+ event,
49
+ ) => setId(event.target.value);
50
+ const handleClose = () => {
51
+ dataProductEditorState.setAccessPointModal(false);
52
+ };
53
+ const handleSubmit = () => {
54
+ if (id) {
55
+ dataProductEditorState.addAccessPoint(id);
56
+ handleClose();
57
+ }
58
+ };
59
+ const handleEnter = (): void => {
60
+ accessPointInputRef.current?.focus();
61
+ };
62
+ const disableCreateButton =
63
+ id === '' ||
64
+ id === undefined ||
65
+ dataProductEditorState.accessPointStates
66
+ .map((e) => e.accessPoint.id)
67
+ .includes(id);
68
+ const errors =
69
+ id === ''
70
+ ? `ID is empty`
71
+ : dataProductEditorState.accessPointStates
72
+ .map((e) => e.accessPoint.id)
73
+ .includes(id ?? '')
74
+ ? `ID already exists`
75
+ : undefined;
76
+ return (
77
+ <Dialog
78
+ open={true}
79
+ onClose={handleClose}
80
+ TransitionProps={{
81
+ onEnter: handleEnter,
82
+ }}
83
+ classes={{
84
+ container: 'search-modal__container',
85
+ }}
86
+ PaperProps={{
87
+ classes: {
88
+ root: 'search-modal__inner-container',
89
+ },
90
+ }}
91
+ >
92
+ <form
93
+ onSubmit={(event) => {
94
+ event.preventDefault();
95
+ handleSubmit();
96
+ }}
97
+ className={clsx('modal search-modal', {
98
+ 'modal--dark': true,
99
+ })}
100
+ >
101
+ <div className="modal__title">New Access Point</div>
102
+ <div>
103
+ <InputWithInlineValidation
104
+ className={clsx('input new-access-point-modal__id-input', {
105
+ 'input--dark': true,
106
+ })}
107
+ ref={accessPointInputRef}
108
+ spellCheck={false}
109
+ value={id}
110
+ onChange={handleIdChange}
111
+ placeholder="Access Point ID"
112
+ error={errors}
113
+ />
114
+ </div>
115
+ <PanelDivider />
116
+ <div className="search-modal__actions">
117
+ <button
118
+ className={clsx('btn btn--primary', {
119
+ 'btn--dark': true,
120
+ })}
121
+ disabled={disableCreateButton}
122
+ >
123
+ Create
124
+ </button>
125
+ </div>
126
+ </form>
127
+ </Dialog>
128
+ );
129
+ },
130
+ );
131
+
132
+ export const LakehouseDataProductAcccessPointEditor = observer(
133
+ (props: {
134
+ accessPointState: LakehouseAccessPointState;
135
+ isReadOnly: boolean;
136
+ }) => {
137
+ const { accessPointState } = props;
138
+ const accessPoint = accessPointState.accessPoint;
139
+ const productEditorState = accessPointState.state;
140
+ const lambdaEditorState = accessPointState.lambdaState;
141
+ const propertyHasParserError = productEditorState.accessPointStates
142
+ .filter(filterByType(LakehouseAccessPointState))
143
+ .find((pm) => pm.lambdaState.parserError);
144
+ return (
145
+ <div
146
+ className={clsx('access-point-editor', {
147
+ backdrop__element: propertyHasParserError,
148
+ })}
149
+ >
150
+ <div className="access-point-editor__metadata">
151
+ <div className={clsx('access-point-editor__name', {})}>
152
+ <div className="access-point-editor__name__label">
153
+ {accessPoint.id}
154
+ </div>
155
+ </div>
156
+ <div className="access-point-editor__info">
157
+ <div
158
+ className={clsx('access-point-editor__type')}
159
+ title={accessPoint.targetEnvironment}
160
+ >
161
+ <div className="access-point-editor__type__label">
162
+ {accessPoint.targetEnvironment}
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ <div className="access-point-editor__content">
168
+ <div className="access-point-editor__generic-entry">
169
+ <div className="access-point-editor__entry__container">
170
+ <div className="access-point-editor__entry">
171
+ <InlineLambdaEditor
172
+ className={'access-point-editor__lambda-editor'}
173
+ disabled={false}
174
+ lambdaEditorState={lambdaEditorState}
175
+ forceBackdrop={Boolean(lambdaEditorState.parserError)}
176
+ />
177
+ </div>
178
+ </div>
179
+ <button
180
+ className="access-point-editor__generic-entry__remove-btn"
181
+ onClick={() => {
182
+ productEditorState.deleteAccessPoint(accessPointState);
183
+ }}
184
+ tabIndex={-1}
185
+ title="Remove"
186
+ >
187
+ <TimesIcon />
188
+ </button>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ );
193
+ },
194
+ );
195
+
196
+ const DataProductEditorSplashScreen = observer(
197
+ (props: { dataProductEditorState: DataProductEditorState }) => {
198
+ const { dataProductEditorState } = props;
199
+ const logoWidth = 280;
200
+ const logoHeight = 270;
201
+ const [showLogo, setShowLogo] = useState(false);
202
+ const { ref, height, width } = useResizeDetector<HTMLDivElement>();
203
+
204
+ useEffect(() => {
205
+ setShowLogo((width ?? 0) > logoWidth && (height ?? 0) > logoHeight);
206
+ }, [height, width]);
207
+
208
+ return (
209
+ <div ref={ref} className="data-product-editor__splash-screen">
210
+ <div
211
+ onClick={() => dataProductEditorState.setAccessPointModal(true)}
212
+ className="data-product-editor__splash-screen__label"
213
+ >
214
+ Add Access Point
215
+ </div>
216
+ <div className="data-product-editor__splash-screen__spacing"></div>
217
+ <div
218
+ onClick={() => dataProductEditorState.setAccessPointModal(true)}
219
+ title="Add new Access Point"
220
+ className={clsx('data-product-editor__splash-screen__logo', {
221
+ 'data-product-editor__splash-screen__logo--hidden': !showLogo,
222
+ })}
223
+ >
224
+ <AccessPointIcon />
225
+ </div>
226
+ </div>
227
+ );
228
+ },
229
+ );
230
+
231
+ export const DataProductEditor = observer(() => {
232
+ const editorStore = useEditorStore();
233
+ const dataProductEditorState =
234
+ editorStore.tabManagerState.getCurrentEditorState(DataProductEditorState);
235
+ const product = dataProductEditorState.product;
236
+ const accessPointStates = dataProductEditorState.accessPointStates;
237
+ const isReadOnly = dataProductEditorState.isReadOnly;
238
+ const openNewModal = () => {
239
+ dataProductEditorState.setAccessPointModal(true);
240
+ };
241
+ return (
242
+ <div className="data-product-editor">
243
+ <div className="panel">
244
+ <div className="panel__header">
245
+ <div className="panel__header__title">
246
+ {isReadOnly && (
247
+ <div className="uml-element-editor__header__lock">
248
+ <LockIcon />
249
+ </div>
250
+ )}
251
+ <div className="panel__header__title__label">data product</div>
252
+ <div className="panel__header__title__content">{product.name}</div>
253
+ </div>
254
+ </div>
255
+ <div className="panel">
256
+ <PanelHeader>
257
+ <div className="panel__header__title">
258
+ <div className="panel__header__title__content">ACCESS POINTS</div>
259
+ </div>
260
+ <PanelHeaderActions>
261
+ <PanelHeaderActionItem
262
+ className="panel__header__action"
263
+ onClick={openNewModal}
264
+ disabled={isReadOnly}
265
+ title="Create new access point"
266
+ >
267
+ <PlusIcon />
268
+ </PanelHeaderActionItem>
269
+ </PanelHeaderActions>
270
+ </PanelHeader>
271
+ <PanelContent>
272
+ {!isReadOnly &&
273
+ accessPointStates
274
+ .filter(filterByType(LakehouseAccessPointState))
275
+ .map((apState) => (
276
+ <LakehouseDataProductAcccessPointEditor
277
+ key={apState.accessPoint.id}
278
+ isReadOnly={isReadOnly}
279
+ accessPointState={apState}
280
+ />
281
+ ))}
282
+ {!accessPointStates.length && (
283
+ <DataProductEditorSplashScreen
284
+ dataProductEditorState={dataProductEditorState}
285
+ />
286
+ )}
287
+ </PanelContent>
288
+ {dataProductEditorState.accessPointModal && (
289
+ <NewAccessPointAccessPOint
290
+ dataProductEditorState={dataProductEditorState}
291
+ />
292
+ )}
293
+ </div>
294
+ </div>
295
+ </div>
296
+ );
297
+ });
@@ -88,6 +88,8 @@ export const getElementTypeLabel = (
88
88
  return 'data';
89
89
  case PACKAGEABLE_ELEMENT_TYPE.TEMPORARY__LOCAL_CONNECTION:
90
90
  return 'local connection';
91
+ case PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT:
92
+ return 'lakehouse data product';
91
93
  default: {
92
94
  if (type) {
93
95
  const extraElementTypeLabelGetters = editorStore.pluginManager
@@ -90,6 +90,7 @@ import {
90
90
  SnowflakeApp,
91
91
  GraphEntities,
92
92
  HostedService,
93
+ DataProduct,
93
94
  } from '@finos/legend-graph';
94
95
  import { CONFIGURATION_EDITOR_TAB } from './editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js';
95
96
  import { PACKAGEABLE_ELEMENT_TYPE } from './utils/ModelClassifierUtils.js';
@@ -854,6 +855,8 @@ export class EditorGraphState {
854
855
  return PACKAGEABLE_ELEMENT_TYPE.SNOWFLAKE_APP;
855
856
  } else if (element instanceof HostedService) {
856
857
  return PACKAGEABLE_ELEMENT_TYPE.HOSTED_SERVICE;
858
+ } else if (element instanceof DataProduct) {
859
+ return PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT;
857
860
  }
858
861
  const extraElementTypeLabelGetters = this.editorStore.pluginManager
859
862
  .getApplicationPlugins()
@@ -1161,6 +1161,7 @@ export class EditorStore implements CommandRegistrar {
1161
1161
  PACKAGEABLE_ELEMENT_TYPE.RUNTIME,
1162
1162
  PACKAGEABLE_ELEMENT_TYPE.MAPPING,
1163
1163
  PACKAGEABLE_ELEMENT_TYPE.SERVICE,
1164
+ PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT,
1164
1165
  this.applicationStore.config.options
1165
1166
  .TEMPORARY__enableLocalConnectionBuilder
1166
1167
  ? PACKAGEABLE_ELEMENT_TYPE.TEMPORARY__LOCAL_CONNECTION
@@ -35,6 +35,7 @@ import {
35
35
  INTERNAL__UnknownFunctionActivator,
36
36
  SnowflakeApp,
37
37
  HostedService,
38
+ DataProduct,
38
39
  } from '@finos/legend-graph';
39
40
  import {
40
41
  type Clazz,
@@ -64,6 +65,7 @@ import { INTERNAL__UnknownFunctionActivatorEdtiorState } from './editor-state/el
64
65
  import { SnowflakeAppFunctionActivatorEdtiorState } from './editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js';
65
66
  import { HostedServiceFunctionActivatorEditorState } from './editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js';
66
67
  import { ArtifactGenerationViewerState } from './editor-state/ArtifactGenerationViewerState.js';
68
+ import { DataProductEditorState } from './editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
67
69
 
68
70
  export class EditorTabManagerState extends TabManagerState {
69
71
  readonly editorStore: EditorStore;
@@ -173,6 +175,8 @@ export class EditorTabManagerState extends TabManagerState {
173
175
  return new MappingEditorState(this.editorStore, element);
174
176
  } else if (element instanceof Service) {
175
177
  return new ServiceEditorState(this.editorStore, element);
178
+ } else if (element instanceof DataProduct) {
179
+ return new DataProductEditorState(this.editorStore, element);
176
180
  } else if (element instanceof GenerationSpecification) {
177
181
  return new GenerationSpecificationEditorState(this.editorStore, element);
178
182
  } else if (element instanceof FileGenerationSpecification) {
@@ -84,6 +84,7 @@ import {
84
84
  RuntimePointer,
85
85
  GenericTypeExplicitReference,
86
86
  GenericType,
87
+ DataProduct,
87
88
  } from '@finos/legend-graph';
88
89
  import type { DSL_Mapping_LegendStudioApplicationPlugin_Extension } from '../extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
89
90
  import {
@@ -999,6 +1000,9 @@ export class NewElementState {
999
1000
  case PACKAGEABLE_ELEMENT_TYPE.GENERATION_SPECIFICATION:
1000
1001
  element = new GenerationSpecification(name);
1001
1002
  break;
1003
+ case PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT:
1004
+ element = new DataProduct(name);
1005
+ break;
1002
1006
  default: {
1003
1007
  const extraNewElementFromStateCreators = this.editorStore.pluginManager
1004
1008
  .getApplicationPlugins()