@finos/legend-application-studio 20.1.2 → 20.2.0
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/Core_LegendStudioApplicationPlugin.js +13 -13
- package/lib/components/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +4 -4
- package/lib/components/DSL_ExternalFormat_LegendStudioDocumentation.d.ts +2 -2
- package/lib/components/DSL_ExternalFormat_LegendStudioDocumentation.js +2 -2
- package/lib/components/LegendStudioApplication.d.ts.map +1 -1
- package/lib/components/LegendStudioApplication.js +19 -19
- package/lib/components/LegendStudioApplication.js.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +52 -73
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.js +5 -5
- package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +3 -3
- 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 +3 -3
- 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 +14 -14
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.js +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.js +4 -4
- package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +3 -3
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +3 -3
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.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 -3
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +3 -3
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +5 -5
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +3 -3
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +3 -3
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.js +3 -3
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.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 +11 -9
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +2 -2
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.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 +5 -4
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js +10 -3
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.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 +2 -2
- 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 +8 -8
- 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 +2 -2
- 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 +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.js +1 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +5 -5
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/LocalChanges.js +6 -6
- package/lib/components/editor/side-bar/LocalChanges.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.js +4 -4
- package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.js +1 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.js +6 -6
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.js +6 -6
- package/lib/components/editor/side-bar/WorkspaceUpdater.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.js +16 -16
- package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js +4 -4
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/EditorGraphState.d.ts +1 -1
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +24 -44
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorSDLCState.js +3 -3
- package/lib/stores/EditorSDLCState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +19 -42
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +42 -223
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +56 -0
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -0
- package/lib/stores/EditorTabManagerState.js +144 -0
- package/lib/stores/EditorTabManagerState.js.map +1 -0
- package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/ExplorerTreeState.js +1 -1
- package/lib/stores/ExplorerTreeState.js.map +1 -1
- package/lib/stores/LegendStudioDocumentation.d.ts +14 -14
- package/lib/stores/LegendStudioDocumentation.js +14 -14
- package/lib/stores/editor-state/EditorState.d.ts +7 -6
- package/lib/stores/editor-state/EditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/EditorState.js +3 -6
- package/lib/stores/editor-state/EditorState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts +5 -4
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.js +11 -8
- package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.js +10 -16
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts +2 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +4 -1
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts +2 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js +5 -2
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +13 -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 +9 -2
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +1 -3
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +2 -3
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.d.ts +7 -6
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.js +7 -3
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +3 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +6 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts +19 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTabManagerState.js +19 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTabManagerState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +3 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +6 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +7 -0
- 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 +21 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.d.ts +5 -3
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js +8 -4
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.js +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts +7 -5
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js +19 -12
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/shared/DnDUtils.d.ts +1 -1
- package/lib/stores/shared/DnDUtils.d.ts.map +1 -1
- package/lib/stores/shared/DnDUtils.js.map +1 -1
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.d.ts +1 -0
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.js +3 -0
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.js.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +4 -4
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.js +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +6 -6
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js +7 -7
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +2 -2
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
- package/package.json +10 -10
- package/src/components/Core_LegendStudioApplicationPlugin.tsx +13 -13
- package/src/components/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +4 -4
- package/src/components/DSL_ExternalFormat_LegendStudioDocumentation.ts +2 -2
- package/src/components/LegendStudioApplication.tsx +0 -3
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +4 -1
- package/src/components/editor/edit-panel/EditPanel.tsx +74 -181
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +5 -5
- package/src/components/editor/edit-panel/FunctionEditor.tsx +3 -3
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +7 -5
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +16 -20
- package/src/components/editor/edit-panel/ModelImporter.tsx +1 -1
- package/src/components/editor/edit-panel/RuntimeEditor.tsx +6 -9
- package/src/components/editor/edit-panel/UnsupportedElementEditor.tsx +4 -3
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -1
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +3 -3
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +4 -3
- package/src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx +1 -1
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +6 -5
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +2 -1
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/ClassMappingEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +5 -5
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +14 -9
- package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +2 -2
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +1 -1
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +4 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +14 -4
- package/src/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.tsx +2 -1
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.tsx +47 -8
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +3 -2
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +12 -8
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +3 -2
- package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +2 -1
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +1 -1
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +1 -1
- package/src/components/editor/edit-panel/uml-editor/UMLEditor.tsx +2 -1
- package/src/components/editor/side-bar/Explorer.tsx +5 -5
- package/src/components/editor/side-bar/LocalChanges.tsx +6 -6
- package/src/components/editor/side-bar/WorkspaceReview.tsx +4 -4
- package/src/components/editor/side-bar/WorkspaceSyncConflictResolver.tsx +6 -6
- package/src/components/editor/side-bar/WorkspaceUpdateConflictResolver.tsx +6 -6
- package/src/components/editor/side-bar/WorkspaceUpdater.tsx +6 -6
- package/src/components/workspace-review/WorkspaceReviewPanel.tsx +20 -24
- package/src/components/workspace-review/WorkspaceReviewSideBar.tsx +4 -4
- package/src/index.ts +1 -0
- package/src/stores/EditorGraphState.ts +39 -54
- package/src/stores/EditorSDLCState.ts +3 -3
- package/src/stores/EditorStore.ts +59 -303
- package/src/stores/EditorTabManagerState.ts +175 -0
- package/src/stores/ExplorerTreeState.ts +3 -1
- package/src/stores/LegendStudioDocumentation.ts +14 -14
- package/src/stores/editor-state/EditorState.ts +9 -8
- package/src/stores/editor-state/FileGenerationViewerState.ts +12 -8
- package/src/stores/editor-state/GraphGenerationState.ts +14 -26
- package/src/stores/editor-state/ModelImporterState.ts +5 -1
- package/src/stores/editor-state/ProjectConfigurationEditorState.ts +6 -2
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +23 -2
- package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +7 -8
- package/src/stores/editor-state/element-editor-state/mapping/MappingElementState.ts +15 -6
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +7 -2
- package/src/stores/editor-state/element-editor-state/mapping/MappingTabManagerState.ts +19 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +7 -2
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +32 -0
- package/src/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts +21 -4
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.ts +1 -1
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +28 -12
- package/src/stores/project-viewer/ProjectViewerStore.ts +1 -1
- package/src/stores/shared/DnDUtils.ts +1 -1
- package/src/stores/shared/modifier/DSL_Service_GraphModifierHelper.ts +6 -0
- package/src/stores/sidebar-state/LocalChangesState.ts +4 -4
- package/src/stores/sidebar-state/WorkspaceReviewState.ts +1 -1
- package/src/stores/sidebar-state/WorkspaceSyncState.ts +6 -6
- package/src/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.ts +7 -7
- package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +2 -2
- package/tsconfig.json +2 -0
|
@@ -14,15 +14,13 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { useEffect, useState } from 'react';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import {
|
|
20
20
|
clsx,
|
|
21
21
|
DropdownMenu,
|
|
22
|
-
ContextMenu,
|
|
23
22
|
MenuContent,
|
|
24
23
|
MenuContentItem,
|
|
25
|
-
TimesIcon,
|
|
26
24
|
PlusIcon,
|
|
27
25
|
ArrowsAltHIcon,
|
|
28
26
|
useResizeDetector,
|
|
@@ -34,7 +32,6 @@ import { UMLEditorState } from '../../../stores/editor-state/element-editor-stat
|
|
|
34
32
|
import { ElementEditorState } from '../../../stores/editor-state/element-editor-state/ElementEditorState.js';
|
|
35
33
|
import { LEGEND_STUDIO_TEST_ID } from '../../LegendStudioTestID.js';
|
|
36
34
|
import { ELEMENT_NATIVE_VIEW_MODE } from '../../../stores/EditorConfig.js';
|
|
37
|
-
import type { EditorState } from '../../../stores/editor-state/EditorState.js';
|
|
38
35
|
import {
|
|
39
36
|
DIFF_VIEW_MODE,
|
|
40
37
|
EntityDiffViewState,
|
|
@@ -70,6 +67,7 @@ import type { DSL_LegendStudioApplicationPlugin_Extension } from '../../../store
|
|
|
70
67
|
import { useEditorStore } from '../EditorStoreProvider.js';
|
|
71
68
|
import { PackageableDataEditorState } from '../../../stores/editor-state/element-editor-state/data/DataEditorState.js';
|
|
72
69
|
import { DataElementEditor } from './data-editor/DataElementEditor.js';
|
|
70
|
+
import { TabManager, type TabState } from '@finos/legend-application';
|
|
73
71
|
|
|
74
72
|
export const ViewerEditPanelSplashScreen: React.FC = () => {
|
|
75
73
|
const commandListWidth = 300;
|
|
@@ -171,67 +169,26 @@ export const EditPanelSplashScreen: React.FC = () => {
|
|
|
171
169
|
);
|
|
172
170
|
};
|
|
173
171
|
|
|
174
|
-
const EditPanelHeaderTabContextMenu = observer(
|
|
175
|
-
forwardRef<
|
|
176
|
-
HTMLDivElement,
|
|
177
|
-
{
|
|
178
|
-
editorState: EditorState;
|
|
179
|
-
}
|
|
180
|
-
>(function EditPanelHeaderTabContextMenu(props, ref) {
|
|
181
|
-
const { editorState } = props;
|
|
182
|
-
const editorStore = useEditorStore();
|
|
183
|
-
const close = (): void => editorStore.closeState(editorState);
|
|
184
|
-
const closeOthers = (): void =>
|
|
185
|
-
editorStore.closeAllOtherStates(editorState);
|
|
186
|
-
const closeAll = (): void => editorStore.closeAllStates();
|
|
187
|
-
|
|
188
|
-
return (
|
|
189
|
-
<div ref={ref} className="edit-panel__header__tab__context-menu">
|
|
190
|
-
<button
|
|
191
|
-
className="edit-panel__header__tab__context-menu__item"
|
|
192
|
-
onClick={close}
|
|
193
|
-
>
|
|
194
|
-
Close
|
|
195
|
-
</button>
|
|
196
|
-
<button
|
|
197
|
-
className="edit-panel__header__tab__context-menu__item"
|
|
198
|
-
disabled={editorStore.openedEditorStates.length < 2}
|
|
199
|
-
onClick={closeOthers}
|
|
200
|
-
>
|
|
201
|
-
Close Others
|
|
202
|
-
</button>
|
|
203
|
-
<button
|
|
204
|
-
className="edit-panel__header__tab__context-menu__item"
|
|
205
|
-
onClick={closeAll}
|
|
206
|
-
>
|
|
207
|
-
Close All
|
|
208
|
-
</button>
|
|
209
|
-
</div>
|
|
210
|
-
);
|
|
211
|
-
}),
|
|
212
|
-
);
|
|
213
|
-
|
|
214
172
|
export const EditPanel = observer(() => {
|
|
215
173
|
const editorStore = useEditorStore();
|
|
216
|
-
const
|
|
217
|
-
const openedEditorStates = editorStore.openedEditorStates;
|
|
174
|
+
const currentTabState = editorStore.tabManagerState.currentTab;
|
|
218
175
|
const nativeViewModes =
|
|
219
|
-
|
|
176
|
+
currentTabState instanceof ElementEditorState
|
|
220
177
|
? Object.values(ELEMENT_NATIVE_VIEW_MODE)
|
|
221
178
|
: [];
|
|
222
179
|
const generationViewModes =
|
|
223
|
-
|
|
180
|
+
currentTabState instanceof ElementEditorState
|
|
224
181
|
? editorStore.graphState.graphGenerationState.fileGenerationConfigurations
|
|
225
182
|
.slice()
|
|
226
183
|
.sort((a, b): number => a.label.localeCompare(b.label))
|
|
227
184
|
: [];
|
|
228
185
|
|
|
229
186
|
const renderActiveElementTab = (): React.ReactNode => {
|
|
230
|
-
if (
|
|
231
|
-
if (
|
|
187
|
+
if (currentTabState instanceof ElementEditorState) {
|
|
188
|
+
if (currentTabState.generationViewMode) {
|
|
232
189
|
const elementGenerationState = editorStore.elementGenerationStates.find(
|
|
233
190
|
(state) =>
|
|
234
|
-
state.fileGenerationType ===
|
|
191
|
+
state.fileGenerationType === currentTabState.generationViewMode,
|
|
235
192
|
);
|
|
236
193
|
return (
|
|
237
194
|
<ElementGenerationEditor
|
|
@@ -239,44 +196,36 @@ export const EditPanel = observer(() => {
|
|
|
239
196
|
elementGenerationState={guaranteeNonNullable(
|
|
240
197
|
elementGenerationState,
|
|
241
198
|
)}
|
|
242
|
-
currentElementState={
|
|
199
|
+
currentElementState={currentTabState}
|
|
243
200
|
/>
|
|
244
201
|
);
|
|
245
202
|
}
|
|
246
|
-
switch (
|
|
203
|
+
switch (currentTabState.editMode) {
|
|
247
204
|
case ELEMENT_NATIVE_VIEW_MODE.FORM: {
|
|
248
|
-
if (
|
|
249
|
-
return <UMLEditor key={
|
|
250
|
-
} else if (
|
|
251
|
-
return <FunctionEditor key={
|
|
252
|
-
} else if (
|
|
253
|
-
return <MappingEditor key={
|
|
254
|
-
} else if (
|
|
255
|
-
return <ServiceEditor key={
|
|
256
|
-
} else if (
|
|
257
|
-
|
|
258
|
-
) {
|
|
259
|
-
return <PackageableRuntimeEditor key={currentEditorState.uuid} />;
|
|
260
|
-
} else if (
|
|
261
|
-
currentEditorState instanceof PackageableConnectionEditorState
|
|
262
|
-
) {
|
|
263
|
-
return (
|
|
264
|
-
<PackageableConnectionEditor key={currentEditorState.uuid} />
|
|
265
|
-
);
|
|
266
|
-
} else if (currentEditorState instanceof FileGenerationEditorState) {
|
|
267
|
-
return <FileGenerationEditor key={currentEditorState.uuid} />;
|
|
268
|
-
} else if (currentEditorState instanceof PackageableDataEditorState) {
|
|
269
|
-
return <DataElementEditor key={currentEditorState.uuid} />;
|
|
205
|
+
if (currentTabState instanceof UMLEditorState) {
|
|
206
|
+
return <UMLEditor key={currentTabState.uuid} />;
|
|
207
|
+
} else if (currentTabState instanceof FunctionEditorState) {
|
|
208
|
+
return <FunctionEditor key={currentTabState.uuid} />;
|
|
209
|
+
} else if (currentTabState instanceof MappingEditorState) {
|
|
210
|
+
return <MappingEditor key={currentTabState.uuid} />;
|
|
211
|
+
} else if (currentTabState instanceof ServiceEditorState) {
|
|
212
|
+
return <ServiceEditor key={currentTabState.uuid} />;
|
|
213
|
+
} else if (currentTabState instanceof PackageableRuntimeEditorState) {
|
|
214
|
+
return <PackageableRuntimeEditor key={currentTabState.uuid} />;
|
|
270
215
|
} else if (
|
|
271
|
-
|
|
216
|
+
currentTabState instanceof PackageableConnectionEditorState
|
|
272
217
|
) {
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
|
|
218
|
+
return <PackageableConnectionEditor key={currentTabState.uuid} />;
|
|
219
|
+
} else if (currentTabState instanceof FileGenerationEditorState) {
|
|
220
|
+
return <FileGenerationEditor key={currentTabState.uuid} />;
|
|
221
|
+
} else if (currentTabState instanceof PackageableDataEditorState) {
|
|
222
|
+
return <DataElementEditor key={currentTabState.uuid} />;
|
|
276
223
|
} else if (
|
|
277
|
-
|
|
224
|
+
currentTabState instanceof GenerationSpecificationEditorState
|
|
278
225
|
) {
|
|
279
|
-
return <
|
|
226
|
+
return <GenerationSpecificationEditor key={currentTabState.uuid} />;
|
|
227
|
+
} else if (currentTabState instanceof UnsupportedElementEditorState) {
|
|
228
|
+
return <UnsupportedElementEditor key={currentTabState.uuid} />;
|
|
280
229
|
}
|
|
281
230
|
const extraElementEditorCreators = editorStore.pluginManager
|
|
282
231
|
.getApplicationPlugins()
|
|
@@ -287,7 +236,7 @@ export const EditPanel = observer(() => {
|
|
|
287
236
|
).getExtraElementEditorRenderers?.() ?? [],
|
|
288
237
|
);
|
|
289
238
|
for (const elementEditorCreators of extraElementEditorCreators) {
|
|
290
|
-
const elementEditor = elementEditorCreators(
|
|
239
|
+
const elementEditor = elementEditorCreators(currentTabState);
|
|
291
240
|
if (elementEditor) {
|
|
292
241
|
return elementEditor;
|
|
293
242
|
}
|
|
@@ -298,88 +247,70 @@ export const EditPanel = observer(() => {
|
|
|
298
247
|
case ELEMENT_NATIVE_VIEW_MODE.GRAMMAR:
|
|
299
248
|
return (
|
|
300
249
|
<ElementNativeView
|
|
301
|
-
key={
|
|
302
|
-
currentElementState={
|
|
250
|
+
key={currentTabState.uuid}
|
|
251
|
+
currentElementState={currentTabState}
|
|
303
252
|
/>
|
|
304
253
|
);
|
|
305
254
|
default:
|
|
306
255
|
return null;
|
|
307
256
|
}
|
|
308
|
-
} else if (
|
|
257
|
+
} else if (currentTabState instanceof EntityDiffViewState) {
|
|
309
258
|
return (
|
|
310
259
|
<EntityDiffView
|
|
311
|
-
key={
|
|
312
|
-
entityDiffViewState={
|
|
260
|
+
key={currentTabState.uuid}
|
|
261
|
+
entityDiffViewState={currentTabState}
|
|
313
262
|
/>
|
|
314
263
|
);
|
|
315
|
-
} else if (
|
|
264
|
+
} else if (currentTabState instanceof EntityChangeConflictEditorState) {
|
|
316
265
|
return (
|
|
317
266
|
<EntityChangeConflictEditor
|
|
318
|
-
key={
|
|
319
|
-
conflictEditorState={
|
|
267
|
+
key={currentTabState.uuid}
|
|
268
|
+
conflictEditorState={currentTabState}
|
|
320
269
|
/>
|
|
321
270
|
);
|
|
322
|
-
} else if (
|
|
323
|
-
return <FileGenerationViewer key={
|
|
324
|
-
} else if (
|
|
271
|
+
} else if (currentTabState instanceof FileGenerationViewerState) {
|
|
272
|
+
return <FileGenerationViewer key={currentTabState.uuid} />;
|
|
273
|
+
} else if (currentTabState instanceof ModelImporterState) {
|
|
325
274
|
return <ModelImporter />;
|
|
326
|
-
} else if (
|
|
275
|
+
} else if (currentTabState instanceof ProjectConfigurationEditorState) {
|
|
327
276
|
return <ProjectConfigurationEditor />;
|
|
328
277
|
}
|
|
278
|
+
// TODO: create an editor for unsupported tab
|
|
329
279
|
return null;
|
|
330
280
|
};
|
|
331
281
|
|
|
332
|
-
const
|
|
282
|
+
const renderHeaderButtonLabel = (
|
|
283
|
+
editorState: TabState,
|
|
284
|
+
): React.ReactNode | undefined => {
|
|
333
285
|
if (editorState instanceof EntityDiffViewState) {
|
|
334
286
|
return (
|
|
335
|
-
<div className="
|
|
336
|
-
<div className="
|
|
337
|
-
|
|
338
|
-
</div>
|
|
339
|
-
<div className="edit-panel__header__tab__label__diff__text">
|
|
287
|
+
<div className="diff-tab">
|
|
288
|
+
<div className="diff-tab__element-name">{editorState.label}</div>
|
|
289
|
+
<div className="diff-tab__text">
|
|
340
290
|
({getPrettyLabelForRevision(editorState.fromRevision)}
|
|
341
291
|
</div>
|
|
342
|
-
<div className="
|
|
292
|
+
<div className="diff-tab__icon">
|
|
343
293
|
<ArrowsAltHIcon />
|
|
344
294
|
</div>
|
|
345
|
-
<div className="
|
|
295
|
+
<div className="diff-tab__text">
|
|
346
296
|
{getPrettyLabelForRevision(editorState.toRevision)})
|
|
347
297
|
</div>
|
|
348
298
|
</div>
|
|
349
299
|
);
|
|
350
300
|
} else if (editorState instanceof EntityChangeConflictEditorState) {
|
|
351
301
|
return (
|
|
352
|
-
<div className="
|
|
353
|
-
<div className="
|
|
354
|
-
|
|
355
|
-
</div>
|
|
356
|
-
<div className="edit-panel__header__tab__label__diff__text">
|
|
302
|
+
<div className="diff-tab">
|
|
303
|
+
<div className="diff-tab__element-name">{editorState.label}</div>
|
|
304
|
+
<div className="diff-tab__text">
|
|
357
305
|
{editorState.isReadOnly ? '(Merge Preview)' : '(Merged)'}
|
|
358
306
|
</div>
|
|
359
307
|
</div>
|
|
360
308
|
);
|
|
361
309
|
}
|
|
362
|
-
return editorState.
|
|
310
|
+
return editorState.label;
|
|
363
311
|
};
|
|
364
312
|
|
|
365
|
-
|
|
366
|
-
const closeTab =
|
|
367
|
-
(editorState: EditorState): React.MouseEventHandler =>
|
|
368
|
-
(event): void =>
|
|
369
|
-
editorStore.closeState(editorState);
|
|
370
|
-
const closeTabOnMiddleClick =
|
|
371
|
-
(editorState: EditorState): React.MouseEventHandler =>
|
|
372
|
-
(event): void => {
|
|
373
|
-
if (event.nativeEvent.button === 1) {
|
|
374
|
-
editorStore.closeState(editorState);
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
const openTab =
|
|
378
|
-
(editorState: EditorState): (() => void) =>
|
|
379
|
-
(): void =>
|
|
380
|
-
editorStore.openState(editorState);
|
|
381
|
-
|
|
382
|
-
if (!currentEditorState) {
|
|
313
|
+
if (!currentTabState) {
|
|
383
314
|
return editorStore.isInViewerMode ? (
|
|
384
315
|
<ViewerEditPanelSplashScreen />
|
|
385
316
|
) : (
|
|
@@ -391,54 +322,18 @@ export const EditPanel = observer(() => {
|
|
|
391
322
|
data-testid={LEGEND_STUDIO_TEST_ID.EDIT_PANEL}
|
|
392
323
|
className="panel edit-panel"
|
|
393
324
|
>
|
|
394
|
-
<
|
|
325
|
+
<div className="panel__header edit-panel__header">
|
|
395
326
|
<div
|
|
396
327
|
data-testid={LEGEND_STUDIO_TEST_ID.EDIT_PANEL__HEADER_TABS}
|
|
397
328
|
className="edit-panel__header__tabs"
|
|
398
329
|
>
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
'edit-panel__header__tab--active':
|
|
404
|
-
editorState === currentEditorState,
|
|
405
|
-
})}
|
|
406
|
-
onMouseUp={closeTabOnMiddleClick(editorState)}
|
|
407
|
-
>
|
|
408
|
-
<ContextMenu
|
|
409
|
-
content={
|
|
410
|
-
<EditPanelHeaderTabContextMenu editorState={editorState} />
|
|
411
|
-
}
|
|
412
|
-
className="edit-panel__header__tab__content"
|
|
413
|
-
>
|
|
414
|
-
<button
|
|
415
|
-
className="edit-panel__header__tab__label"
|
|
416
|
-
tabIndex={-1}
|
|
417
|
-
onClick={openTab(editorState)}
|
|
418
|
-
title={
|
|
419
|
-
editorState instanceof ElementEditorState
|
|
420
|
-
? editorState.element.path
|
|
421
|
-
: editorState instanceof EntityDiffViewState
|
|
422
|
-
? editorState.headerTooltip
|
|
423
|
-
: editorState.headerName
|
|
424
|
-
}
|
|
425
|
-
>
|
|
426
|
-
{renderHeaderLabel(editorState)}
|
|
427
|
-
</button>
|
|
428
|
-
<button
|
|
429
|
-
className="edit-panel__header__tab__close-btn"
|
|
430
|
-
onClick={closeTab(editorState)}
|
|
431
|
-
tabIndex={-1}
|
|
432
|
-
title="Close"
|
|
433
|
-
>
|
|
434
|
-
<TimesIcon />
|
|
435
|
-
</button>
|
|
436
|
-
</ContextMenu>
|
|
437
|
-
</div>
|
|
438
|
-
))}
|
|
330
|
+
<TabManager
|
|
331
|
+
tabManagerState={editorStore.tabManagerState}
|
|
332
|
+
tabRenderer={renderHeaderButtonLabel}
|
|
333
|
+
/>
|
|
439
334
|
</div>
|
|
440
335
|
<div className="edit-panel__header__actions">
|
|
441
|
-
{
|
|
336
|
+
{currentTabState instanceof ElementEditorState && (
|
|
442
337
|
<DropdownMenu
|
|
443
338
|
className="edit-panel__view-mode__type"
|
|
444
339
|
title="View as..."
|
|
@@ -459,7 +354,7 @@ export const EditPanel = observer(() => {
|
|
|
459
354
|
key={mode}
|
|
460
355
|
className="edit-panel__view-mode__option"
|
|
461
356
|
onClick={(): void =>
|
|
462
|
-
|
|
357
|
+
currentTabState.setEditMode(mode)
|
|
463
358
|
}
|
|
464
359
|
>
|
|
465
360
|
{mode}
|
|
@@ -485,9 +380,7 @@ export const EditPanel = observer(() => {
|
|
|
485
380
|
)
|
|
486
381
|
}
|
|
487
382
|
onClick={(): void =>
|
|
488
|
-
|
|
489
|
-
mode.key,
|
|
490
|
-
)
|
|
383
|
+
currentTabState.setGenerationViewMode(mode.key)
|
|
491
384
|
}
|
|
492
385
|
>
|
|
493
386
|
{mode.label}
|
|
@@ -505,15 +398,15 @@ export const EditPanel = observer(() => {
|
|
|
505
398
|
}}
|
|
506
399
|
>
|
|
507
400
|
<div className="edit-panel__view-mode__type__label">
|
|
508
|
-
{
|
|
401
|
+
{currentTabState.generationViewMode
|
|
509
402
|
? editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(
|
|
510
|
-
|
|
403
|
+
currentTabState.generationViewMode,
|
|
511
404
|
).label
|
|
512
|
-
:
|
|
405
|
+
: currentTabState.editMode}
|
|
513
406
|
</div>
|
|
514
407
|
</DropdownMenu>
|
|
515
408
|
)}
|
|
516
|
-
{
|
|
409
|
+
{currentTabState instanceof EntityDiffViewState && (
|
|
517
410
|
<DropdownMenu
|
|
518
411
|
className="edit-panel__view-mode__type"
|
|
519
412
|
title="View as..."
|
|
@@ -527,7 +420,7 @@ export const EditPanel = observer(() => {
|
|
|
527
420
|
<MenuContentItem
|
|
528
421
|
className="edit-panel__view-mode__option"
|
|
529
422
|
onClick={(): void =>
|
|
530
|
-
|
|
423
|
+
currentTabState.setDiffMode(DIFF_VIEW_MODE.GRAMMAR)
|
|
531
424
|
}
|
|
532
425
|
>
|
|
533
426
|
{DIFF_VIEW_MODE.GRAMMAR}
|
|
@@ -535,7 +428,7 @@ export const EditPanel = observer(() => {
|
|
|
535
428
|
<MenuContentItem
|
|
536
429
|
className="edit-panel__view-mode__option"
|
|
537
430
|
onClick={(): void =>
|
|
538
|
-
|
|
431
|
+
currentTabState.setDiffMode(DIFF_VIEW_MODE.JSON)
|
|
539
432
|
}
|
|
540
433
|
>
|
|
541
434
|
{DIFF_VIEW_MODE.JSON}
|
|
@@ -548,18 +441,18 @@ export const EditPanel = observer(() => {
|
|
|
548
441
|
}}
|
|
549
442
|
>
|
|
550
443
|
<div className="edit-panel__view-mode__type__label">
|
|
551
|
-
{
|
|
444
|
+
{currentTabState.diffMode}
|
|
552
445
|
</div>
|
|
553
446
|
</DropdownMenu>
|
|
554
447
|
)}
|
|
555
448
|
</div>
|
|
556
|
-
</
|
|
449
|
+
</div>
|
|
557
450
|
<div
|
|
558
451
|
// NOTE: This is one small but extremely important line. Using `key` we effectivly force-remounting the element editor
|
|
559
452
|
// component every time current element editor state is changed. This is great to control errors that has to do with stale states
|
|
560
453
|
// when we `reprocess` world or when we switch tabs between 2 elements of the same type (i.e. 2 classes, 2 mappings, etc.)
|
|
561
454
|
// See https://github.com/bvaughn/react-error-boundary/issues/23#issuecomment-425470511
|
|
562
|
-
key={
|
|
455
|
+
key={currentTabState.uuid}
|
|
563
456
|
className="panel__content edit-panel__content"
|
|
564
457
|
data-testid={LEGEND_STUDIO_TEST_ID.EDIT_PANEL_CONTENT}
|
|
565
458
|
>
|
|
@@ -18,7 +18,7 @@ import { observer } from 'mobx-react-lite';
|
|
|
18
18
|
import {
|
|
19
19
|
FileGenerationViewerState,
|
|
20
20
|
getTextContent,
|
|
21
|
-
|
|
21
|
+
getEditorLanguageForFormat,
|
|
22
22
|
} from '../../../stores/editor-state/FileGenerationViewerState.js';
|
|
23
23
|
import {
|
|
24
24
|
LockIcon,
|
|
@@ -33,17 +33,17 @@ import { TextInputEditor } from '@finos/legend-application';
|
|
|
33
33
|
|
|
34
34
|
export const FileGenerationViewer = observer(() => {
|
|
35
35
|
const editorStore = useEditorStore();
|
|
36
|
-
const generatedFileState = editorStore.getCurrentEditorState(
|
|
36
|
+
const generatedFileState = editorStore.tabManagerState.getCurrentEditorState(
|
|
37
37
|
FileGenerationViewerState,
|
|
38
38
|
);
|
|
39
|
-
const generatedFile = generatedFileState.
|
|
39
|
+
const generatedFile = generatedFileState.file;
|
|
40
40
|
const fileGeneration = generatedFile.parentId
|
|
41
41
|
? editorStore.graphManagerState.graph.getNullableFileGeneration(
|
|
42
42
|
generatedFile.parentId,
|
|
43
43
|
)
|
|
44
44
|
: undefined;
|
|
45
45
|
const visitFileGeneration = (fg: FileGenerationSpecification): void =>
|
|
46
|
-
editorStore.
|
|
46
|
+
editorStore.tabManagerState.openElementEditor(fg);
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<div className="file-generation-viewer">
|
|
@@ -96,7 +96,7 @@ export const FileGenerationViewer = observer(() => {
|
|
|
96
96
|
generatedFile.format,
|
|
97
97
|
)}
|
|
98
98
|
isReadOnly={true}
|
|
99
|
-
language={
|
|
99
|
+
language={getEditorLanguageForFormat(generatedFile.format)}
|
|
100
100
|
/>
|
|
101
101
|
</PanelContent>
|
|
102
102
|
</div>
|
|
@@ -201,7 +201,7 @@ const ParameterBasicEditor = observer(
|
|
|
201
201
|
};
|
|
202
202
|
const openElement = (): void => {
|
|
203
203
|
if (!(paramType instanceof PrimitiveType)) {
|
|
204
|
-
editorStore.
|
|
204
|
+
editorStore.tabManagerState.openElementEditor(
|
|
205
205
|
paramType instanceof Unit ? paramType.measure : paramType,
|
|
206
206
|
);
|
|
207
207
|
}
|
|
@@ -456,7 +456,7 @@ const ReturnTypeEditor = observer(
|
|
|
456
456
|
|
|
457
457
|
const openElement = (): void => {
|
|
458
458
|
if (!(returnType.value instanceof PrimitiveType)) {
|
|
459
|
-
editorStore.
|
|
459
|
+
editorStore.tabManagerState.openElementEditor(
|
|
460
460
|
returnType.value instanceof Unit
|
|
461
461
|
? returnType.value.measure
|
|
462
462
|
: returnType.value,
|
|
@@ -748,7 +748,7 @@ export const FunctionEditor = observer(() => {
|
|
|
748
748
|
const editorStore = useEditorStore();
|
|
749
749
|
const applicationStore = useApplicationStore();
|
|
750
750
|
const functionEditorState =
|
|
751
|
-
editorStore.getCurrentEditorState(FunctionEditorState);
|
|
751
|
+
editorStore.tabManagerState.getCurrentEditorState(FunctionEditorState);
|
|
752
752
|
const isReadOnly = functionEditorState.isReadOnly;
|
|
753
753
|
const functionElement = functionEditorState.functionElement;
|
|
754
754
|
const selectedTab = functionEditorState.selectedTab;
|
|
@@ -99,7 +99,7 @@ const ModelGenerationItem = observer(
|
|
|
99
99
|
const deleteNode = (): void =>
|
|
100
100
|
specState.deleteGenerationTreeNode(generationTreeNode);
|
|
101
101
|
const visitModelGeneration = (): void =>
|
|
102
|
-
editorStore.
|
|
102
|
+
editorStore.tabManagerState.openElementEditor(modelGeneration);
|
|
103
103
|
// generation id
|
|
104
104
|
const isUnique =
|
|
105
105
|
specState.spec.generationNodes.filter(
|
|
@@ -367,7 +367,8 @@ const FileGenerationItem = observer(
|
|
|
367
367
|
generationSpecificationEditorState.spec,
|
|
368
368
|
fileGeneraitonRef,
|
|
369
369
|
);
|
|
370
|
-
const visitFileGen = (): void =>
|
|
370
|
+
const visitFileGen = (): void =>
|
|
371
|
+
editorStore.tabManagerState.openElementEditor(fileGeneration);
|
|
371
372
|
return (
|
|
372
373
|
<div className="generation-spec-file-generation-editor__item">
|
|
373
374
|
<div className="btn--sm generation-spec-file-generation-editor__item__label">
|
|
@@ -507,9 +508,10 @@ const FileGenerationSpecifications = observer(
|
|
|
507
508
|
export const GenerationSpecificationEditor = observer(() => {
|
|
508
509
|
const editorStore = useEditorStore();
|
|
509
510
|
const applicationStore = useApplicationStore();
|
|
510
|
-
const generationSpecificationState =
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
const generationSpecificationState =
|
|
512
|
+
editorStore.tabManagerState.getCurrentEditorState(
|
|
513
|
+
GenerationSpecificationEditorState,
|
|
514
|
+
);
|
|
513
515
|
const modelGenerationState = editorStore.graphState.graphGenerationState;
|
|
514
516
|
const generationSpec = generationSpecificationState.spec;
|
|
515
517
|
const generate = applicationStore.guardUnhandledError(() =>
|
|
@@ -31,7 +31,6 @@ import {
|
|
|
31
31
|
getEditorValue,
|
|
32
32
|
normalizeLineEnding,
|
|
33
33
|
MoreHorizontalIcon,
|
|
34
|
-
HackerIcon,
|
|
35
34
|
PanelContent,
|
|
36
35
|
useResizeDetector,
|
|
37
36
|
setWarningMarkers,
|
|
@@ -218,27 +217,27 @@ const getParserElementDocumentation = (
|
|
|
218
217
|
case PURE_PARSER.PURE: {
|
|
219
218
|
if (elementKeyword === PURE_ELEMENT_NAME.CLASS) {
|
|
220
219
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
221
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
220
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_CLASS,
|
|
222
221
|
);
|
|
223
222
|
} else if (elementKeyword === PURE_ELEMENT_NAME.PROFILE) {
|
|
224
223
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
225
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
224
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_PROFILE,
|
|
226
225
|
);
|
|
227
226
|
} else if (elementKeyword === PURE_ELEMENT_NAME.ENUMERATION) {
|
|
228
227
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
229
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
228
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_ENUMERATION,
|
|
230
229
|
);
|
|
231
230
|
} else if (elementKeyword === PURE_ELEMENT_NAME.MEASURE) {
|
|
232
231
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
233
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
232
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_MEASURE,
|
|
234
233
|
);
|
|
235
234
|
} else if (elementKeyword === PURE_ELEMENT_NAME.ASSOCIATION) {
|
|
236
235
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
237
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
236
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_ASSOCIATION,
|
|
238
237
|
);
|
|
239
238
|
} else if (elementKeyword === PURE_ELEMENT_NAME.FUNCTION) {
|
|
240
239
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
241
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
240
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_FUNCTION,
|
|
242
241
|
);
|
|
243
242
|
}
|
|
244
243
|
return undefined;
|
|
@@ -246,7 +245,7 @@ const getParserElementDocumentation = (
|
|
|
246
245
|
case PURE_PARSER.MAPPING: {
|
|
247
246
|
if (elementKeyword === PURE_ELEMENT_NAME.MAPPING) {
|
|
248
247
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
249
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
248
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_MAPPING,
|
|
250
249
|
);
|
|
251
250
|
}
|
|
252
251
|
return undefined;
|
|
@@ -279,7 +278,7 @@ const getParserElementDocumentation = (
|
|
|
279
278
|
case PURE_PARSER.RUNTIME: {
|
|
280
279
|
if (elementKeyword === PURE_ELEMENT_NAME.RUNTIME) {
|
|
281
280
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
282
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
281
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_RUNTIME,
|
|
283
282
|
);
|
|
284
283
|
}
|
|
285
284
|
return undefined;
|
|
@@ -287,7 +286,7 @@ const getParserElementDocumentation = (
|
|
|
287
286
|
case PURE_PARSER.SERVICE: {
|
|
288
287
|
if (elementKeyword === PURE_ELEMENT_NAME.SERVICE) {
|
|
289
288
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
290
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
289
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_SERVICE,
|
|
291
290
|
);
|
|
292
291
|
}
|
|
293
292
|
return undefined;
|
|
@@ -295,7 +294,7 @@ const getParserElementDocumentation = (
|
|
|
295
294
|
case PURE_PARSER.RELATIONAL: {
|
|
296
295
|
if (elementKeyword === PURE_ELEMENT_NAME.DATABASE) {
|
|
297
296
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
298
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
297
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_DATABASE,
|
|
299
298
|
);
|
|
300
299
|
}
|
|
301
300
|
return undefined;
|
|
@@ -303,7 +302,7 @@ const getParserElementDocumentation = (
|
|
|
303
302
|
case PURE_PARSER.FILE_GENERATION_SPECIFICATION: {
|
|
304
303
|
if (elementKeyword === PURE_ELEMENT_NAME.FILE_GENERATION) {
|
|
305
304
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
306
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
305
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_FILE_GENERATION_SPECIFICATION,
|
|
307
306
|
);
|
|
308
307
|
}
|
|
309
308
|
return undefined;
|
|
@@ -311,7 +310,7 @@ const getParserElementDocumentation = (
|
|
|
311
310
|
case PURE_PARSER.GENERATION_SPECIFICATION: {
|
|
312
311
|
if (elementKeyword === PURE_ELEMENT_NAME.GENERATION_SPECIFICATION) {
|
|
313
312
|
return editorStore.applicationStore.documentationService.getDocEntry(
|
|
314
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.
|
|
313
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_GENERATION_SPECIFICATION,
|
|
315
314
|
);
|
|
316
315
|
}
|
|
317
316
|
return undefined;
|
|
@@ -1213,9 +1212,9 @@ export const GrammarTextEditor = observer(() => {
|
|
|
1213
1212
|
<div className="panel edit-panel">
|
|
1214
1213
|
<ContextMenu className="panel__header edit-panel__header" disabled={true}>
|
|
1215
1214
|
<div className="edit-panel__header__tabs">
|
|
1216
|
-
<div className="edit-
|
|
1215
|
+
<div className="edit-panel__text-mode__tab">
|
|
1217
1216
|
<button
|
|
1218
|
-
className="edit-
|
|
1217
|
+
className="edit-panel__text-mode__tab__label"
|
|
1219
1218
|
disabled={editorStore.graphState.isApplicationLeavingTextMode}
|
|
1220
1219
|
onClick={leaveTextMode}
|
|
1221
1220
|
tabIndex={-1}
|
|
@@ -1225,13 +1224,10 @@ export const GrammarTextEditor = observer(() => {
|
|
|
1225
1224
|
</button>
|
|
1226
1225
|
</div>
|
|
1227
1226
|
<ContextMenu
|
|
1228
|
-
className="edit-
|
|
1227
|
+
className="edit-panel__text-mode__tab edit-panel__text-mode__tab--active"
|
|
1229
1228
|
content={<GrammarTextEditorHeaderTabContextMenu />}
|
|
1230
1229
|
>
|
|
1231
|
-
<div className="edit-
|
|
1232
|
-
<HackerIcon />
|
|
1233
|
-
</div>
|
|
1234
|
-
<div className="edit-panel__header__tab__label">Text Mode</div>
|
|
1230
|
+
<div className="edit-panel__text-mode__tab__label">Text Mode</div>
|
|
1235
1231
|
</ContextMenu>
|
|
1236
1232
|
</div>
|
|
1237
1233
|
<div className="edit-panel__header__actions">
|
|
@@ -136,7 +136,7 @@ export const ModelImporter = observer(() => {
|
|
|
136
136
|
const editorStore = useEditorStore();
|
|
137
137
|
const applicationStore = useApplicationStore();
|
|
138
138
|
const modelImporterState =
|
|
139
|
-
editorStore.getCurrentEditorState(ModelImporterState);
|
|
139
|
+
editorStore.tabManagerState.getCurrentEditorState(ModelImporterState);
|
|
140
140
|
const nativeInputTypes = Object.values(MODEL_IMPORT_NATIVE_INPUT_TYPE);
|
|
141
141
|
const extraModelImporterExtensionsConfigs =
|
|
142
142
|
modelImporterState.extensionConfigs;
|