@finos/legend-application-studio 28.18.147 → 28.18.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.js +10 -2
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/RuntimeEditor.js +3 -1
- package/lib/components/editor/editor-group/RuntimeEditor.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +3 -3
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +7 -7
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/NewElementState.d.ts +2 -0
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +10 -2
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js +3 -2
- package/lib/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/package.json +6 -6
- package/src/components/editor/editor-group/EditorGroup.tsx +19 -8
- package/src/components/editor/editor-group/RuntimeEditor.tsx +3 -1
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +3 -2
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +38 -6
- package/src/stores/editor/NewElementState.ts +13 -2
- package/src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts +3 -2
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +4 -1
- package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +1 -1
@@ -27,6 +27,7 @@ import {
|
|
27
27
|
NewServiceDriver,
|
28
28
|
CONNECTION_TYPE,
|
29
29
|
type RuntimeOption,
|
30
|
+
NewLakehouseDataProductDriver,
|
30
31
|
} from '../../../stores/editor/NewElementState.js';
|
31
32
|
import { Dialog, compareLabelFn, CustomSelectorInput } from '@finos/legend-art';
|
32
33
|
import type { EditorStore } from '../../../stores/editor/EditorStore.js';
|
@@ -89,7 +90,7 @@ export const getElementTypeLabel = (
|
|
89
90
|
case PACKAGEABLE_ELEMENT_TYPE.TEMPORARY__LOCAL_CONNECTION:
|
90
91
|
return 'local connection';
|
91
92
|
case PACKAGEABLE_ELEMENT_TYPE._DATA_PRODUCT:
|
92
|
-
return '
|
93
|
+
return 'Lakehouse Data Product';
|
93
94
|
default: {
|
94
95
|
if (type) {
|
95
96
|
const extraElementTypeLabelGetters = editorStore.pluginManager
|
@@ -440,11 +441,42 @@ const NewServiceDriverEditor = observer(() => {
|
|
440
441
|
});
|
441
442
|
|
442
443
|
const NewLakehouseDataProductEditor = observer(() => {
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
444
|
+
const editorStore = useEditorStore();
|
445
|
+
const newProductDriver = editorStore.newElementState.getNewElementDriver(
|
446
|
+
NewLakehouseDataProductDriver,
|
447
|
+
);
|
448
|
+
const handleTitleChange: React.ChangeEventHandler<HTMLInputElement> = (
|
449
|
+
event,
|
450
|
+
) => newProductDriver.setTitle(event.target.value);
|
451
|
+
const handleDescriptionChange: React.ChangeEventHandler<HTMLInputElement> = (
|
452
|
+
event,
|
453
|
+
) => newProductDriver.setDescription(event.target.value);
|
454
|
+
return (
|
455
|
+
<>
|
456
|
+
<div className="panel__content__form__section__header__label">Title</div>
|
457
|
+
<div className="explorer__new-element-modal__driver">
|
458
|
+
<input
|
459
|
+
className="input--dark explorer__new-element-modal__name-input"
|
460
|
+
spellCheck={false}
|
461
|
+
value={newProductDriver.title}
|
462
|
+
onChange={handleTitleChange}
|
463
|
+
placeholder={`Choose a title for this Data Product to display in Marketplace`}
|
464
|
+
/>
|
465
|
+
</div>
|
466
|
+
<div className="panel__content__form__section__header__label">
|
467
|
+
Description
|
468
|
+
</div>
|
469
|
+
<div className="explorer__new-element-modal__driver">
|
470
|
+
<input
|
471
|
+
className="input--dark explorer__new-element-modal__name-input"
|
472
|
+
spellCheck={false}
|
473
|
+
value={newProductDriver.description}
|
474
|
+
onChange={handleDescriptionChange}
|
475
|
+
placeholder={`Provide a meaningful description for this Data Product`}
|
476
|
+
/>
|
477
|
+
</div>
|
478
|
+
</>
|
479
|
+
);
|
448
480
|
});
|
449
481
|
|
450
482
|
const NewFileGenerationDriverEditor = observer(() => {
|
@@ -109,7 +109,10 @@ import {
|
|
109
109
|
} from '@finos/legend-lego/graph-editor';
|
110
110
|
import { EmbeddedDataType } from './editor-state/ExternalFormatState.js';
|
111
111
|
import { createEmbeddedData } from './editor-state/element-editor-state/data/EmbeddedDataState.js';
|
112
|
-
import {
|
112
|
+
import {
|
113
|
+
dataProduct_setDescription,
|
114
|
+
dataProduct_setTitle,
|
115
|
+
} from '../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
113
116
|
|
114
117
|
export const CUSTOM_LABEL = '(custom)';
|
115
118
|
|
@@ -484,27 +487,35 @@ export class NewPackageableConnectionDriver extends NewElementDriver<Packageable
|
|
484
487
|
|
485
488
|
export class NewLakehouseDataProductDriver extends NewElementDriver<DataProduct> {
|
486
489
|
title: string;
|
490
|
+
description: string;
|
487
491
|
|
488
492
|
constructor(editorStore: EditorStore) {
|
489
493
|
super(editorStore);
|
490
494
|
this.title = '';
|
495
|
+
this.description = '';
|
491
496
|
makeObservable(this, {
|
492
497
|
title: observable,
|
498
|
+
description: observable,
|
493
499
|
setTitle: action,
|
500
|
+
setDescription: action,
|
494
501
|
isValid: computed,
|
495
502
|
});
|
496
503
|
}
|
497
504
|
|
498
505
|
override get isValid(): boolean {
|
499
|
-
return
|
506
|
+
return Boolean(this.title && this.description);
|
500
507
|
}
|
501
508
|
|
502
509
|
setTitle(val: string) {
|
503
510
|
this.title = val;
|
504
511
|
}
|
512
|
+
setDescription(val: string) {
|
513
|
+
this.description = val;
|
514
|
+
}
|
505
515
|
override createElement(name: string): DataProduct {
|
506
516
|
const dataProduct = new DataProduct(name);
|
507
517
|
dataProduct_setTitle(dataProduct, this.title);
|
518
|
+
dataProduct_setDescription(dataProduct, this.description);
|
508
519
|
return dataProduct;
|
509
520
|
}
|
510
521
|
}
|
package/src/stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.ts
CHANGED
@@ -171,8 +171,9 @@ export class RelationalDatabaseConnectionValueState extends ConnectionValueState
|
|
171
171
|
};
|
172
172
|
|
173
173
|
get storeValidationResult(): ValidationIssue | undefined {
|
174
|
-
return
|
175
|
-
|
174
|
+
return !this.connection.store ||
|
175
|
+
isStubbed_PackageableElement(this.connection.store.value)
|
176
|
+
? createValidationError(['Connection database is empty'])
|
176
177
|
: undefined;
|
177
178
|
}
|
178
179
|
|
package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts
CHANGED
@@ -373,12 +373,15 @@ export class DatabaseSchemaExplorerState {
|
|
373
373
|
});
|
374
374
|
|
375
375
|
this.connection = connection;
|
376
|
-
this.database = guaranteeType(connection.store
|
376
|
+
this.database = guaranteeType(connection.store?.value, Database);
|
377
377
|
this.editorStore = editorStore;
|
378
378
|
this.targetDatabasePath = DEFAULT_DATABASE_PATH;
|
379
379
|
}
|
380
380
|
|
381
381
|
get isCreatingNewDatabase(): boolean {
|
382
|
+
if (!this.connection.store) {
|
383
|
+
return false;
|
384
|
+
}
|
382
385
|
return isStubbed_PackageableElement(this.connection.store.value);
|
383
386
|
}
|
384
387
|
|
@@ -95,7 +95,7 @@ export class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
95
95
|
this.connection = val;
|
96
96
|
if (val) {
|
97
97
|
const connection = guaranteeRelationalDatabaseConnection(val);
|
98
|
-
this.database = connection.store
|
98
|
+
this.database = connection.store?.value;
|
99
99
|
this.schemaExplorerState = new DatabaseSchemaExplorerState(
|
100
100
|
this.editorStore,
|
101
101
|
connection,
|