@finos/legend-application-studio 13.0.3 → 13.1.2
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/command/project-search.css +1 -1
- package/lib/components/editor/command/project-search.css.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js +11 -3
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +41 -34
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +35 -54
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +2 -2
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.js +11 -20
- package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +10 -2
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +4 -8
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +3 -7
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +2 -2
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -9
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -4
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +3 -10
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +4 -10
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +7 -9
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +3 -6
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +7 -8
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +1 -3
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +5 -7
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +3 -4
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +3 -5
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +6 -4
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +6 -12
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +156 -62
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +39 -21
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +62 -9
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +4 -8
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +7 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +33 -5
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +7 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +35 -7
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +2 -3
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +8 -9
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.d.ts +1 -0
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.js +2 -2
- package/lib/components/shared/StudioLambdaEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +5 -5
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +7 -7
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +12 -5
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +0 -2
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js +1 -8
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +2 -4
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +2 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +9 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +3 -3
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +10 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js +31 -1
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +2 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +3 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/shared/DnDUtil.d.ts +1 -2
- package/lib/stores/shared/DnDUtil.d.ts.map +1 -1
- package/lib/stores/shared/DnDUtil.js +0 -2
- package/lib/stores/shared/DnDUtil.js.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.js +2 -3
- package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
- package/package.json +13 -13
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +13 -2
- package/src/components/editor/edit-panel/FunctionEditor.tsx +220 -152
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +154 -184
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +4 -5
- package/src/components/editor/edit-panel/RuntimeEditor.tsx +89 -90
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +36 -0
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +57 -40
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +1 -1
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +50 -45
- package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +36 -32
- package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +46 -41
- package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +9 -7
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +18 -21
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +39 -29
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +39 -39
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +23 -15
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +40 -38
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +1 -3
- package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +48 -45
- package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +12 -8
- package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -3
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +75 -72
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +63 -36
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +56 -45
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +812 -504
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +209 -113
- package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +184 -52
- package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +62 -39
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +137 -52
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +171 -88
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +2 -1
- package/src/components/editor/side-bar/Explorer.tsx +11 -15
- package/src/components/shared/StudioLambdaEditor.tsx +3 -0
- package/src/stores/EditorStore.ts +7 -6
- package/src/stores/editor/NewElementState.ts +12 -5
- package/src/stores/editor-state/GenerationSpecificationEditorState.ts +1 -15
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +2 -3
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +10 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -0
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +2 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +12 -3
- package/src/stores/graphModifier/DomainGraphModifierHelper.ts +92 -0
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +10 -0
- package/src/stores/shared/DnDUtil.ts +0 -2
- package/src/stores/shared/testable/TestableUtils.ts +4 -3
|
@@ -117,6 +117,7 @@ import {
|
|
|
117
117
|
PRIMITIVE_TYPE,
|
|
118
118
|
Package,
|
|
119
119
|
DataElement,
|
|
120
|
+
isElementReadOnly,
|
|
120
121
|
} from '@finos/legend-graph';
|
|
121
122
|
import type { DepotServerClient } from '@finos/legend-server-depot';
|
|
122
123
|
import type { LegendStudioPluginManager } from '../application/LegendStudioPluginManager.js';
|
|
@@ -1121,7 +1122,7 @@ export class EditorStore {
|
|
|
1121
1122
|
*deleteElement(element: PackageableElement): GeneratorFn<void> {
|
|
1122
1123
|
if (
|
|
1123
1124
|
this.graphState.checkIfApplicationUpdateOperationIsRunning() ||
|
|
1124
|
-
|
|
1125
|
+
isElementReadOnly(element)
|
|
1125
1126
|
) {
|
|
1126
1127
|
return;
|
|
1127
1128
|
}
|
|
@@ -1187,7 +1188,7 @@ export class EditorStore {
|
|
|
1187
1188
|
element: PackageableElement,
|
|
1188
1189
|
newPath: string,
|
|
1189
1190
|
): GeneratorFn<void> {
|
|
1190
|
-
if (
|
|
1191
|
+
if (isElementReadOnly(element)) {
|
|
1191
1192
|
return;
|
|
1192
1193
|
}
|
|
1193
1194
|
graph_renameElement(
|
|
@@ -1354,7 +1355,7 @@ export class EditorStore {
|
|
|
1354
1355
|
get classOptions(): PackageableElementOption<Class>[] {
|
|
1355
1356
|
return this.graphManagerState.graph.ownClasses
|
|
1356
1357
|
.concat(
|
|
1357
|
-
this.graphManagerState.
|
|
1358
|
+
this.graphManagerState.collectExposedSystemElements(
|
|
1358
1359
|
this.graphManagerState.graph.systemModel.ownClasses,
|
|
1359
1360
|
),
|
|
1360
1361
|
)
|
|
@@ -1365,7 +1366,7 @@ export class EditorStore {
|
|
|
1365
1366
|
get associationOptions(): PackageableElementOption<Association>[] {
|
|
1366
1367
|
return this.graphManagerState.graph.ownAssociations
|
|
1367
1368
|
.concat(
|
|
1368
|
-
this.graphManagerState.
|
|
1369
|
+
this.graphManagerState.collectExposedSystemElements(
|
|
1369
1370
|
this.graphManagerState.graph.systemModel.ownAssociations,
|
|
1370
1371
|
),
|
|
1371
1372
|
)
|
|
@@ -1376,7 +1377,7 @@ export class EditorStore {
|
|
|
1376
1377
|
get profileOptions(): PackageableElementOption<Profile>[] {
|
|
1377
1378
|
return this.graphManagerState.graph.ownProfiles
|
|
1378
1379
|
.concat(
|
|
1379
|
-
this.graphManagerState.
|
|
1380
|
+
this.graphManagerState.collectExposedSystemElements(
|
|
1380
1381
|
this.graphManagerState.graph.systemModel.ownProfiles,
|
|
1381
1382
|
),
|
|
1382
1383
|
)
|
|
@@ -1391,7 +1392,7 @@ export class EditorStore {
|
|
|
1391
1392
|
.concat(
|
|
1392
1393
|
this.graphManagerState.graph.ownTypes
|
|
1393
1394
|
.concat(
|
|
1394
|
-
this.graphManagerState.
|
|
1395
|
+
this.graphManagerState.collectExposedSystemElements(
|
|
1395
1396
|
this.graphManagerState.graph.systemModel.ownTypes,
|
|
1396
1397
|
),
|
|
1397
1398
|
)
|
|
@@ -190,7 +190,7 @@ export class NewPackageableRuntimeDriver extends NewElementDriver<PackageableRun
|
|
|
190
190
|
isValid: computed,
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
-
const mappings = this.editorStore.graphManagerState.graph.
|
|
193
|
+
const mappings = this.editorStore.graphManagerState.graph.mappings;
|
|
194
194
|
if (mappings.length) {
|
|
195
195
|
this.mapping = mappings[0];
|
|
196
196
|
}
|
|
@@ -240,7 +240,7 @@ export class NewPureModelConnectionDriver extends NewConnectionValueDriver<PureM
|
|
|
240
240
|
isValid: computed,
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
const classes = this.editorStore.graphManagerState.graph.
|
|
243
|
+
const classes = this.editorStore.graphManagerState.graph.classes;
|
|
244
244
|
if (classes.length) {
|
|
245
245
|
this.class = classes[0];
|
|
246
246
|
}
|
|
@@ -302,7 +302,7 @@ export class NewRelationalDatabaseConnectionDriver extends NewConnectionValueDri
|
|
|
302
302
|
if (store instanceof Database) {
|
|
303
303
|
selectedStore = store;
|
|
304
304
|
} else {
|
|
305
|
-
const dbs = this.editorStore.graphManagerState.graph.
|
|
305
|
+
const dbs = this.editorStore.graphManagerState.graph.databases;
|
|
306
306
|
selectedStore = dbs.length ? (dbs[0] as Database) : stub_Database();
|
|
307
307
|
}
|
|
308
308
|
return new RelationalDatabaseConnection(
|
|
@@ -533,6 +533,7 @@ export class NewGenerationSpecificationDriver extends NewElementDriver<Generatio
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
get isValid(): boolean {
|
|
536
|
+
// only one generation specification should exist
|
|
536
537
|
return !this.editorStore.graphManagerState.graph.ownGenerationSpecifications
|
|
537
538
|
.length;
|
|
538
539
|
}
|
|
@@ -758,8 +759,8 @@ export class NewElementState {
|
|
|
758
759
|
element = new Profile(name);
|
|
759
760
|
break;
|
|
760
761
|
// default for function -> return type: String, return Multiplicity 1
|
|
761
|
-
case PACKAGEABLE_ELEMENT_TYPE.FUNCTION:
|
|
762
|
-
|
|
762
|
+
case PACKAGEABLE_ELEMENT_TYPE.FUNCTION: {
|
|
763
|
+
const fn = new ConcreteFunctionDefinition(
|
|
763
764
|
name,
|
|
764
765
|
PackageableElementExplicitReference.create(
|
|
765
766
|
this.editorStore.graphManagerState.graph.getPrimitiveType(
|
|
@@ -770,7 +771,13 @@ export class NewElementState {
|
|
|
770
771
|
TYPICAL_MULTIPLICITY_TYPE.ONE,
|
|
771
772
|
),
|
|
772
773
|
);
|
|
774
|
+
// default to empty string
|
|
775
|
+
fn.expressionSequence =
|
|
776
|
+
this.editorStore.graphManagerState.graphManager.createDefaultBasicRawLambda()
|
|
777
|
+
.body as object[];
|
|
778
|
+
element = fn;
|
|
773
779
|
break;
|
|
780
|
+
}
|
|
774
781
|
case PACKAGEABLE_ELEMENT_TYPE.MAPPING:
|
|
775
782
|
element = new Mapping(name);
|
|
776
783
|
break;
|
|
@@ -22,13 +22,7 @@ import {
|
|
|
22
22
|
deleteEntry,
|
|
23
23
|
guaranteeNonNullable,
|
|
24
24
|
} from '@finos/legend-shared';
|
|
25
|
-
import {
|
|
26
|
-
computed,
|
|
27
|
-
observable,
|
|
28
|
-
makeObservable,
|
|
29
|
-
makeAutoObservable,
|
|
30
|
-
action,
|
|
31
|
-
} from 'mobx';
|
|
25
|
+
import { computed, observable, makeObservable, action } from 'mobx';
|
|
32
26
|
import type { EditorStore } from '../EditorStore.js';
|
|
33
27
|
import {
|
|
34
28
|
GenerationSpecification,
|
|
@@ -48,18 +42,10 @@ export type GenerationSpecNodeDropTarget = GenerationSpecNodeDragSource;
|
|
|
48
42
|
export class GenerationTreeNodeState {
|
|
49
43
|
readonly uuid = uuid();
|
|
50
44
|
node: GenerationTreeNode;
|
|
51
|
-
isBeingDragged = false;
|
|
52
45
|
|
|
53
46
|
constructor(node: GenerationTreeNode) {
|
|
54
|
-
makeAutoObservable(this, {
|
|
55
|
-
setIsBeingDragged: action,
|
|
56
|
-
});
|
|
57
47
|
this.node = node;
|
|
58
48
|
}
|
|
59
|
-
|
|
60
|
-
setIsBeingDragged(val: boolean): void {
|
|
61
|
-
this.isBeingDragged = val;
|
|
62
|
-
}
|
|
63
49
|
}
|
|
64
50
|
|
|
65
51
|
export class GenerationSpecificationEditorState extends ElementEditorState {
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
type CompilationError,
|
|
28
28
|
type PackageableElement,
|
|
29
29
|
GRAPH_MANAGER_EVENT,
|
|
30
|
+
isElementReadOnly,
|
|
30
31
|
} from '@finos/legend-graph';
|
|
31
32
|
import { TAB_SIZE } from '@finos/legend-application';
|
|
32
33
|
|
|
@@ -61,9 +62,7 @@ export abstract class ElementEditorState extends EditorState {
|
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
this.element = element;
|
|
64
|
-
this.isReadOnly =
|
|
65
|
-
editorStore.graphManagerState.isElementReadOnly(element) ||
|
|
66
|
-
editorStore.isInViewerMode;
|
|
65
|
+
this.isReadOnly = isElementReadOnly(element) || editorStore.isInViewerMode;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
get headerName(): string {
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
SnowflakePublicAuthenticationStrategy,
|
|
43
43
|
GCPApplicationDefaultCredentialsAuthenticationStrategy,
|
|
44
44
|
GCPWorkloadIdentityFederationAuthenticationStrategy,
|
|
45
|
+
MiddleTierUsernamePasswordAuthenticationStrategy,
|
|
45
46
|
EmbeddedH2DatasourceSpecification,
|
|
46
47
|
LocalH2DatasourceSpecification,
|
|
47
48
|
DatabricksDatasourceSpecification,
|
|
@@ -94,6 +95,7 @@ export enum CORE_AUTHENTICATION_STRATEGY_TYPE {
|
|
|
94
95
|
OAUTH = 'OAUTH',
|
|
95
96
|
USERNAME_PASSWORD = 'USERNAME_PASSWORD',
|
|
96
97
|
GCP_WORKLOAD_IDENTITY_FEDERATION = 'GCP_WORKLOAD_IDENTITY_FEDERATION',
|
|
98
|
+
MIDDLE_TIER_USERNAME_PASSWORD = 'MIDDLE_TIER_USERNAME_PASSWORD',
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
export class RelationalDatabaseConnectionValueState extends ConnectionValueState {
|
|
@@ -262,6 +264,10 @@ export class RelationalDatabaseConnectionValueState extends ConnectionValueState
|
|
|
262
264
|
auth instanceof GCPWorkloadIdentityFederationAuthenticationStrategy
|
|
263
265
|
) {
|
|
264
266
|
return CORE_AUTHENTICATION_STRATEGY_TYPE.GCP_WORKLOAD_IDENTITY_FEDERATION;
|
|
267
|
+
} else if (
|
|
268
|
+
auth instanceof MiddleTierUsernamePasswordAuthenticationStrategy
|
|
269
|
+
) {
|
|
270
|
+
return CORE_AUTHENTICATION_STRATEGY_TYPE.MIDDLE_TIER_USERNAME_PASSWORD;
|
|
265
271
|
}
|
|
266
272
|
|
|
267
273
|
const extraAuthenticationStrategyTypeGetters =
|
|
@@ -326,6 +332,10 @@ export class RelationalDatabaseConnectionValueState extends ConnectionValueState
|
|
|
326
332
|
authStrategy = new OAuthAuthenticationStrategy('', '');
|
|
327
333
|
break;
|
|
328
334
|
}
|
|
335
|
+
case CORE_AUTHENTICATION_STRATEGY_TYPE.MIDDLE_TIER_USERNAME_PASSWORD: {
|
|
336
|
+
authStrategy = new MiddleTierUsernamePasswordAuthenticationStrategy('');
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
329
339
|
default: {
|
|
330
340
|
const extraAuthenticationStrategyCreators =
|
|
331
341
|
this.editorStore.pluginManager
|
|
@@ -1468,7 +1468,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1468
1468
|
|
|
1469
1469
|
*createNewTest(setImplementation: SetImplementation): GeneratorFn<void> {
|
|
1470
1470
|
const query =
|
|
1471
|
-
this.editorStore.graphManagerState.graphManager.
|
|
1471
|
+
this.editorStore.graphManagerState.graphManager.createGetAllRawLambda(
|
|
1472
1472
|
setImplementation.class.value,
|
|
1473
1473
|
);
|
|
1474
1474
|
const source = getMappingElementSource(
|
|
@@ -834,7 +834,7 @@ export class MappingExecutionState {
|
|
|
834
834
|
yield flowResult(
|
|
835
835
|
this.queryState.updateLamba(
|
|
836
836
|
setImplementation
|
|
837
|
-
? this.editorStore.graphManagerState.graphManager.
|
|
837
|
+
? this.editorStore.graphManagerState.graphManager.createGetAllRawLambda(
|
|
838
838
|
guaranteeType(getMappingElementTarget(setImplementation), Class),
|
|
839
839
|
)
|
|
840
840
|
: stub_RawLambda(),
|
|
@@ -125,6 +125,7 @@ export class ServiceExecutionParameterState extends LambdaParametersState {
|
|
|
125
125
|
const parmeterState = new LambdaParameterState(
|
|
126
126
|
p,
|
|
127
127
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
128
|
+
this.executionState.editorStore.graphManagerState.graph,
|
|
128
129
|
);
|
|
129
130
|
parmeterState.mockParameterValue();
|
|
130
131
|
return parmeterState;
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
isNonNullable,
|
|
45
45
|
returnUndefOnError,
|
|
46
46
|
getNullableFirstElement,
|
|
47
|
+
uniq,
|
|
47
48
|
} from '@finos/legend-shared';
|
|
48
49
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
49
50
|
import type { EditorStore } from '../../../../EditorStore.js';
|
|
@@ -360,6 +361,6 @@ export class ServiceTestDataState {
|
|
|
360
361
|
} else if (execution instanceof PureMultiExecution) {
|
|
361
362
|
runtimes = execution.executionParameters.map((t) => t.runtime);
|
|
362
363
|
}
|
|
363
|
-
return runtimes.flatMap(getAllIdentifiedConnectionsFromRuntime);
|
|
364
|
+
return uniq(runtimes.flatMap(getAllIdentifiedConnectionsFromRuntime));
|
|
364
365
|
}
|
|
365
366
|
}
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts
CHANGED
|
@@ -136,7 +136,10 @@ export class ServiceValueSpecificationTestParameterState extends ServiceTestPara
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
resetValueSpec(): void {
|
|
139
|
-
const mockValue = generateVariableExpressionMockValue(
|
|
139
|
+
const mockValue = generateVariableExpressionMockValue(
|
|
140
|
+
this.varExpression,
|
|
141
|
+
this.editorStore.graphManagerState.graph,
|
|
142
|
+
);
|
|
140
143
|
if (mockValue) {
|
|
141
144
|
this.updateValueSpecification(mockValue);
|
|
142
145
|
}
|
|
@@ -258,7 +261,10 @@ export class ServiceTestSetupState {
|
|
|
258
261
|
addExpressionParameterValue(expression: VariableExpression): void {
|
|
259
262
|
try {
|
|
260
263
|
const mockValue = guaranteeNonNullable(
|
|
261
|
-
generateVariableExpressionMockValue(
|
|
264
|
+
generateVariableExpressionMockValue(
|
|
265
|
+
expression,
|
|
266
|
+
this.editorStore.graphManagerState.graph,
|
|
267
|
+
),
|
|
262
268
|
);
|
|
263
269
|
const paramValue = new ParameterValue();
|
|
264
270
|
paramValue.name = expression.name;
|
|
@@ -338,7 +344,10 @@ export class ServiceTestSetupState {
|
|
|
338
344
|
const varExpressions = this.queryVariableExpressions;
|
|
339
345
|
const parameterValueStates = varExpressions
|
|
340
346
|
.map((varExpression) => {
|
|
341
|
-
const mockValue = generateVariableExpressionMockValue(
|
|
347
|
+
const mockValue = generateVariableExpressionMockValue(
|
|
348
|
+
varExpression,
|
|
349
|
+
this.editorStore.graphManagerState.graph,
|
|
350
|
+
);
|
|
342
351
|
if (mockValue) {
|
|
343
352
|
const paramValue = new ParameterValue();
|
|
344
353
|
paramValue.name = varExpression.name;
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
assertTrue,
|
|
20
20
|
deleteEntry,
|
|
21
21
|
guaranteeType,
|
|
22
|
+
swapEntry,
|
|
22
23
|
} from '@finos/legend-shared';
|
|
23
24
|
import { action } from 'mobx';
|
|
24
25
|
import {
|
|
@@ -90,6 +91,12 @@ export const class_addProperty = action(
|
|
|
90
91
|
},
|
|
91
92
|
);
|
|
92
93
|
|
|
94
|
+
export const class_swapProperties = action(
|
|
95
|
+
(_class: Class, sourceProperty: Property, targetProperty: Property): void => {
|
|
96
|
+
swapEntry(_class.properties, sourceProperty, targetProperty);
|
|
97
|
+
},
|
|
98
|
+
);
|
|
99
|
+
|
|
93
100
|
export const class_deleteDerivedProperty = action(
|
|
94
101
|
(_class: Class, val: DerivedProperty): void => {
|
|
95
102
|
deleteEntry(_class.derivedProperties, val);
|
|
@@ -100,6 +107,17 @@ export const class_addDerivedProperty = action(
|
|
|
100
107
|
addUniqueEntry(_class.derivedProperties, observe_DerivedProperty(val));
|
|
101
108
|
},
|
|
102
109
|
);
|
|
110
|
+
|
|
111
|
+
export const class_swapDerivedProperties = action(
|
|
112
|
+
(
|
|
113
|
+
_class: Class,
|
|
114
|
+
sourceProperty: DerivedProperty,
|
|
115
|
+
targetProperty: DerivedProperty,
|
|
116
|
+
): void => {
|
|
117
|
+
swapEntry(_class.derivedProperties, sourceProperty, targetProperty);
|
|
118
|
+
},
|
|
119
|
+
);
|
|
120
|
+
|
|
103
121
|
export const class_addContraint = action(
|
|
104
122
|
(_class: Class, val: Constraint): void => {
|
|
105
123
|
addUniqueEntry(_class.constraints, observe_Constraint(val));
|
|
@@ -110,6 +128,16 @@ export const class_deleteConstraint = action(
|
|
|
110
128
|
deleteEntry(_class.constraints, val);
|
|
111
129
|
},
|
|
112
130
|
);
|
|
131
|
+
export const class_swapConstraints = action(
|
|
132
|
+
(
|
|
133
|
+
_class: Class,
|
|
134
|
+
sourceConstraint: Constraint,
|
|
135
|
+
targetConstraint: Constraint,
|
|
136
|
+
): void => {
|
|
137
|
+
swapEntry(_class.constraints, sourceConstraint, targetConstraint);
|
|
138
|
+
},
|
|
139
|
+
);
|
|
140
|
+
|
|
113
141
|
export const class_addSuperType = action(
|
|
114
142
|
(_class: Class, val: GenericTypeReference): void => {
|
|
115
143
|
addUniqueEntry(_class.generalizations, observe_GenericTypeReference(val));
|
|
@@ -120,6 +148,15 @@ export const class_deleteSuperType = action(
|
|
|
120
148
|
deleteEntry(_class.generalizations, val);
|
|
121
149
|
},
|
|
122
150
|
);
|
|
151
|
+
export const class_swapSuperTypes = action(
|
|
152
|
+
(
|
|
153
|
+
_class: Class,
|
|
154
|
+
sourceSuperType: GenericTypeReference,
|
|
155
|
+
targetSuperType: GenericTypeReference,
|
|
156
|
+
): void => {
|
|
157
|
+
swapEntry(_class.generalizations, sourceSuperType, targetSuperType);
|
|
158
|
+
},
|
|
159
|
+
);
|
|
123
160
|
export const class_addSubclass = action((_class: Class, val: Class): void => {
|
|
124
161
|
addUniqueEntry(_class._subclasses, val);
|
|
125
162
|
});
|
|
@@ -211,6 +248,30 @@ export const tagStereotype_setValue = action(
|
|
|
211
248
|
},
|
|
212
249
|
);
|
|
213
250
|
|
|
251
|
+
export const annotatedElement_swapTaggedValues = action(
|
|
252
|
+
(
|
|
253
|
+
annotatedElement: AnnotatedElement,
|
|
254
|
+
sourceTaggedValue: TaggedValue,
|
|
255
|
+
targetTaggedValue: TaggedValue,
|
|
256
|
+
): void => {
|
|
257
|
+
swapEntry(
|
|
258
|
+
annotatedElement.taggedValues,
|
|
259
|
+
sourceTaggedValue,
|
|
260
|
+
targetTaggedValue,
|
|
261
|
+
);
|
|
262
|
+
},
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
export const annotatedElement_swapStereotypes = action(
|
|
266
|
+
(
|
|
267
|
+
annotatedElement: AnnotatedElement,
|
|
268
|
+
sourceStereotype: StereotypeReference,
|
|
269
|
+
targetStereotype: StereotypeReference,
|
|
270
|
+
): void => {
|
|
271
|
+
swapEntry(annotatedElement.stereotypes, sourceStereotype, targetStereotype);
|
|
272
|
+
},
|
|
273
|
+
);
|
|
274
|
+
|
|
214
275
|
// --------------------------------------------- DerivedProperty -------------------------------------
|
|
215
276
|
|
|
216
277
|
export const derivedProperty_setBody = (
|
|
@@ -260,6 +321,22 @@ export const profile_deleteStereotype = action(
|
|
|
260
321
|
},
|
|
261
322
|
);
|
|
262
323
|
|
|
324
|
+
export const profile_swapTags = action(
|
|
325
|
+
(profile: Profile, sourceTag: Tag, targetTag: Tag): void => {
|
|
326
|
+
swapEntry(profile.p_tags, sourceTag, targetTag);
|
|
327
|
+
},
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
export const profile_swapStereotypes = action(
|
|
331
|
+
(
|
|
332
|
+
profile: Profile,
|
|
333
|
+
sourceStereotype: Stereotype,
|
|
334
|
+
targetStereotype: Stereotype,
|
|
335
|
+
): void => {
|
|
336
|
+
swapEntry(profile.p_stereotypes, sourceStereotype, targetStereotype);
|
|
337
|
+
},
|
|
338
|
+
);
|
|
339
|
+
|
|
263
340
|
// --------------------------------------------- Function -------------------------------------
|
|
264
341
|
|
|
265
342
|
export const function_deleteParameter = action(
|
|
@@ -283,6 +360,16 @@ export const function_setReturnMultiplicity = action(
|
|
|
283
360
|
},
|
|
284
361
|
);
|
|
285
362
|
|
|
363
|
+
export const function_swapParameters = action(
|
|
364
|
+
(
|
|
365
|
+
_func: ConcreteFunctionDefinition,
|
|
366
|
+
sourceParameter: RawVariableExpression,
|
|
367
|
+
targetParameter: RawVariableExpression,
|
|
368
|
+
): void => {
|
|
369
|
+
swapEntry(_func.parameters, sourceParameter, targetParameter);
|
|
370
|
+
},
|
|
371
|
+
);
|
|
372
|
+
|
|
286
373
|
// --------------------------------------------- Enumeration -------------------------------------
|
|
287
374
|
|
|
288
375
|
export const enum_setName = action((val: Enum, value: string): void => {
|
|
@@ -298,6 +385,11 @@ export const enum_deleteValue = action(
|
|
|
298
385
|
deleteEntry(enumeration.values, value);
|
|
299
386
|
},
|
|
300
387
|
);
|
|
388
|
+
export const enum_swapValues = action(
|
|
389
|
+
(enumeration: Enumeration, sourceEnum: Enum, targetEnum: Enum): void => {
|
|
390
|
+
swapEntry(enumeration.values, sourceEnum, targetEnum);
|
|
391
|
+
},
|
|
392
|
+
);
|
|
301
393
|
export const enumValueReference_setValue = action(
|
|
302
394
|
(ref: EnumValueReference, value: Enum): void => {
|
|
303
395
|
ref.value = observe_Enum(value);
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
type StaticDatasourceSpecification,
|
|
39
39
|
type UsernamePasswordAuthenticationStrategy,
|
|
40
40
|
type GCPWorkloadIdentityFederationAuthenticationStrategy,
|
|
41
|
+
type MiddleTierUsernamePasswordAuthenticationStrategy,
|
|
41
42
|
type ObserverContext,
|
|
42
43
|
type EnumerationMappingReference,
|
|
43
44
|
type TableAlias,
|
|
@@ -163,6 +164,15 @@ export const gcpWorkloadIdentityFederationAuthenticationStrategy_setAdditionalGc
|
|
|
163
164
|
},
|
|
164
165
|
);
|
|
165
166
|
|
|
167
|
+
export const middleTierUsernamePasswordAuthenticationStrategy_setVaultReference =
|
|
168
|
+
action(
|
|
169
|
+
(
|
|
170
|
+
v: MiddleTierUsernamePasswordAuthenticationStrategy,
|
|
171
|
+
val: string,
|
|
172
|
+
): void => {
|
|
173
|
+
v.vaultReference = val;
|
|
174
|
+
},
|
|
175
|
+
);
|
|
166
176
|
// --------------------------------------------- DatasourceSpecification -------------------------------------
|
|
167
177
|
export const staticDatasourceSpecification_setHost = action(
|
|
168
178
|
(v: StaticDatasourceSpecification, val: string): void => {
|
|
@@ -49,8 +49,6 @@ export enum CORE_DND_TYPE {
|
|
|
49
49
|
MAPPING_EXPLORER_CLASS_MAPPING = 'MAPPING_EXPLORER_CLASS_MAPPING',
|
|
50
50
|
MAPPING_EXPLORER_ENUMERATION_MAPPING = 'MAPPING_EXPLORER_ENUMERATION_MAPPING',
|
|
51
51
|
MAPPING_EXPLORER_ASSOCIATION_MAPPING = 'MAPPING_EXPLORER_ASSOCIATION_MAPPING',
|
|
52
|
-
// gen spec node
|
|
53
|
-
GENERATION_SPEC_NODE = 'GENERATION_SPEC_NODE',
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
// React DnD uses Redux under the hood and also it champions the use of plain object over class instance
|
|
@@ -63,13 +63,14 @@ export const getAllIdentifiedConnectionsFromRuntime = (
|
|
|
63
63
|
): IdentifiedConnection[] => {
|
|
64
64
|
const resolvedRuntimes: EngineRuntime[] = [];
|
|
65
65
|
if (runtime instanceof RuntimePointer) {
|
|
66
|
-
|
|
67
|
-
resolvedRuntimes.push(engineRuntime);
|
|
66
|
+
resolvedRuntimes.push(runtime.packageableRuntime.value.runtimeValue);
|
|
68
67
|
} else if (runtime instanceof EngineRuntime) {
|
|
69
68
|
resolvedRuntimes.push(runtime);
|
|
70
69
|
}
|
|
71
70
|
return resolvedRuntimes
|
|
72
|
-
.flatMap((e) =>
|
|
71
|
+
.flatMap((e) =>
|
|
72
|
+
e.connections.map((connection) => connection.storeConnections),
|
|
73
|
+
)
|
|
73
74
|
.flat();
|
|
74
75
|
};
|
|
75
76
|
|