@finos/legend-application-studio 18.1.0 → 19.1.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/application/LegendStudio.d.ts.map +1 -1
- package/lib/application/LegendStudio.js +3 -9
- package/lib/application/LegendStudio.js.map +1 -1
- package/lib/components/Core_LegendStudioApplicationPlugin.d.ts +2 -1
- package/lib/components/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/Core_LegendStudioApplicationPlugin.js +5 -1
- package/lib/components/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +3 -3
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/LegendStudioApplication.d.ts.map +1 -1
- package/lib/components/LegendStudioApplication.js +11 -8
- package/lib/components/LegendStudioApplication.js.map +1 -1
- package/lib/components/editor/ActivityBar.d.ts.map +1 -1
- package/lib/components/editor/ActivityBar.js +13 -18
- package/lib/components/editor/ActivityBar.js.map +1 -1
- package/lib/components/editor/Editor.d.ts.map +1 -1
- package/lib/components/editor/Editor.js +58 -95
- package/lib/components/editor/Editor.js.map +1 -1
- package/lib/components/editor/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.js +4 -6
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js +1 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.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 +5 -5
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.js +2 -2
- package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +33 -7
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +4 -16
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.js +6 -32
- package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +2 -3
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.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 +14 -15
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +12 -6
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.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 +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 -4
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +7 -8
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +3 -3
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -5
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js +2 -3
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.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 +2 -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_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +2 -3
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js +2 -3
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -3
- 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 +5 -9
- 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 +12 -15
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.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 +9 -12
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.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 +4 -5
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +17 -41
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js +4 -5
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +16 -16
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +6 -7
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +9 -9
- 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 +5 -5
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.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 +4 -2
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js +2 -3
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.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 +7 -5
- 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 +12 -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 +7 -5
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +4 -5
- 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 +21 -12
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.js +3 -5
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.js +5 -32
- package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.js +2 -26
- package/lib/components/editor/side-bar/WorkspaceUpdater.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +3 -4
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.js +19 -33
- package/lib/components/project-viewer/ProjectViewer.js.map +1 -1
- package/lib/components/shared/DiffView.d.ts.map +1 -1
- package/lib/components/shared/DiffView.js +4 -19
- package/lib/components/shared/DiffView.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReview.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReview.js +8 -6
- package/lib/components/workspace-review/WorkspaceReview.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.js +2 -2
- package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js +1 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.js +10 -6
- package/lib/components/workspace-setup/CreateProjectModal.js.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js +4 -5
- package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +4 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +5 -7
- package/lib/stores/EditorConfig.d.ts +0 -28
- package/lib/stores/EditorConfig.d.ts.map +1 -1
- package/lib/stores/EditorConfig.js +0 -29
- package/lib/stores/EditorConfig.js.map +1 -1
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +8 -8
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorSDLCState.d.ts.map +1 -1
- package/lib/stores/EditorSDLCState.js +4 -2
- package/lib/stores/EditorSDLCState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +27 -30
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +183 -146
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.d.ts +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.js +7 -8
- package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
- package/lib/stores/LegendStudioBaseStore.d.ts +1 -1
- package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendStudioBaseStore.js +25 -17
- package/lib/stores/LegendStudioBaseStore.js.map +1 -1
- package/lib/stores/LegendStudioCommand.d.ts +32 -0
- package/lib/stores/LegendStudioCommand.d.ts.map +1 -0
- package/lib/stores/LegendStudioCommand.js +81 -0
- package/lib/stores/LegendStudioCommand.js.map +1 -0
- package/lib/stores/LegendStudioRouter.d.ts +15 -15
- package/lib/stores/LegendStudioRouter.d.ts.map +1 -1
- package/lib/stores/LegendStudioRouter.js +37 -24
- package/lib/stores/LegendStudioRouter.js.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.js +2 -3
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +21 -21
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js +2 -2
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
- 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 +1 -3
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +1 -3
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts +2 -4
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +45 -44
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/shared/MockDataUtils.d.ts.map +1 -1
- package/lib/stores/shared/MockDataUtils.js +3 -4
- package/lib/stores/shared/MockDataUtils.js.map +1 -1
- package/lib/stores/shared/PackageTreeUtils.d.ts +1 -0
- package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
- package/lib/stores/shared/PackageTreeUtils.js +5 -2
- package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.js +6 -6
- package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +1 -0
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +42 -25
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/ProjectOverviewState.js +3 -2
- package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.js +10 -10
- package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceSyncState.js +6 -8
- package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js +20 -17
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -7
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js +6 -6
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
- package/package.json +14 -16
- package/src/application/LegendStudio.tsx +3 -9
- package/src/components/Core_LegendStudioApplicationPlugin.tsx +9 -0
- package/src/components/EditorComponentTestUtils.tsx +8 -2
- package/src/components/LegendStudioApplication.tsx +28 -8
- package/src/components/editor/ActivityBar.tsx +35 -73
- package/src/components/editor/Editor.tsx +135 -172
- package/src/components/editor/StatusBar.tsx +16 -13
- package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +1 -1
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +12 -16
- package/src/components/editor/edit-panel/EditPanel.tsx +14 -22
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +9 -11
- package/src/components/editor/edit-panel/FunctionEditor.tsx +51 -5
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +2 -18
- package/src/components/editor/edit-panel/ModelImporter.tsx +10 -38
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +2 -2
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +32 -33
- package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +28 -23
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +8 -9
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +8 -10
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +7 -8
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +2 -2
- package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +9 -5
- package/src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx +2 -2
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +5 -3
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +2 -3
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx +2 -3
- package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +5 -9
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +23 -27
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +20 -24
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +4 -5
- package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +4 -4
- package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +4 -4
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +57 -75
- package/src/components/editor/edit-panel/service-editor/NewServiceModal.tsx +7 -5
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +16 -16
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +15 -14
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +9 -9
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +5 -5
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.tsx +4 -2
- package/src/components/editor/edit-panel/testable/TestAssertionEditor.tsx +2 -3
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +12 -5
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +17 -11
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +14 -5
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +4 -5
- package/src/components/editor/side-bar/Explorer.tsx +60 -39
- package/src/components/editor/side-bar/WorkflowManager.tsx +3 -3
- package/src/components/editor/side-bar/WorkspaceReview.tsx +5 -35
- package/src/components/editor/side-bar/WorkspaceUpdater.tsx +2 -31
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +3 -4
- package/src/components/project-viewer/ProjectViewer.tsx +65 -78
- package/src/components/shared/DiffView.tsx +3 -22
- package/src/components/workspace-review/WorkspaceReview.tsx +26 -16
- package/src/components/workspace-review/WorkspaceReviewPanel.tsx +5 -9
- package/src/components/workspace-review/WorkspaceReviewSideBar.tsx +1 -1
- package/src/components/workspace-setup/CreateProjectModal.tsx +14 -10
- package/src/components/workspace-setup/CreateWorkspaceModal.tsx +6 -5
- package/src/components/workspace-setup/WorkspaceSetup.tsx +6 -1
- package/src/index.ts +0 -1
- package/src/stores/EditorConfig.ts +0 -30
- package/src/stores/EditorGraphState.ts +9 -8
- package/src/stores/EditorSDLCState.ts +4 -2
- package/src/stores/EditorStore.ts +231 -245
- package/src/stores/EmbeddedQueryBuilderState.ts +14 -9
- package/src/stores/LegendStudioBaseStore.ts +33 -24
- package/src/stores/LegendStudioCommand.ts +83 -0
- package/src/stores/LegendStudioRouter.ts +50 -41
- package/src/stores/editor-state/GraphGenerationState.ts +3 -2
- package/src/stores/editor-state/ModelImporterState.ts +35 -23
- package/src/stores/editor-state/ProjectConfigurationEditorState.ts +2 -2
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -3
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +1 -3
- package/src/stores/editor-state/element-editor-state/testable/TestAssertionState.ts +2 -1
- package/src/stores/project-viewer/ProjectViewerStore.ts +65 -59
- package/src/stores/shared/MockDataUtils.ts +4 -3
- package/src/stores/shared/PackageTreeUtils.ts +10 -1
- package/src/stores/shared/testable/TestableUtils.ts +6 -5
- package/src/stores/sidebar-state/LocalChangesState.ts +50 -36
- package/src/stores/sidebar-state/ProjectOverviewState.ts +4 -2
- package/src/stores/sidebar-state/WorkspaceReviewState.ts +11 -10
- package/src/stores/sidebar-state/WorkspaceSyncState.ts +6 -8
- package/src/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.ts +20 -17
- package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +8 -7
- package/src/stores/workspace-setup/WorkspaceSetupStore.ts +6 -6
- package/tsconfig.json +1 -2
- package/lib/components/shared/StudioLambdaEditor.d.ts +0 -41
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +0 -1
- package/lib/components/shared/StudioLambdaEditor.js +0 -53
- package/lib/components/shared/StudioLambdaEditor.js.map +0 -1
- package/lib/components/shared/StudioTextInputEditor.d.ts +0 -28
- package/lib/components/shared/StudioTextInputEditor.d.ts.map +0 -1
- package/lib/components/shared/StudioTextInputEditor.js +0 -36
- package/lib/components/shared/StudioTextInputEditor.js.map +0 -1
- package/src/components/shared/StudioLambdaEditor.tsx +0 -146
- package/src/components/shared/StudioTextInputEditor.tsx +0 -83
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { action, computed, flow, flowResult, makeObservable, observable, } from 'mobx';
|
|
17
17
|
import { ClassEditorState } from './editor-state/element-editor-state/ClassEditorState.js';
|
|
18
18
|
import { ExplorerTreeState } from './ExplorerTreeState.js';
|
|
19
|
-
import { ACTIVITY_MODE, AUX_PANEL_MODE, GRAPH_EDITOR_MODE, EDITOR_MODE,
|
|
19
|
+
import { ACTIVITY_MODE, AUX_PANEL_MODE, GRAPH_EDITOR_MODE, EDITOR_MODE, } from './EditorConfig.js';
|
|
20
20
|
import { ElementEditorState } from './editor-state/element-editor-state/ElementEditorState.js';
|
|
21
21
|
import { MappingEditorState } from './editor-state/element-editor-state/mapping/MappingEditorState.js';
|
|
22
22
|
import { EditorGraphState, GraphBuilderStatus, } from './EditorGraphState.js';
|
|
@@ -28,7 +28,7 @@ import { WorkspaceReviewState } from './sidebar-state/WorkspaceReviewState.js';
|
|
|
28
28
|
import { LocalChangesState } from './sidebar-state/LocalChangesState.js';
|
|
29
29
|
import { WorkspaceWorkflowManagerState } from './sidebar-state/WorkflowManagerState.js';
|
|
30
30
|
import { GrammarTextEditorState } from './editor-state/GrammarTextEditorState.js';
|
|
31
|
-
import { LogEvent,
|
|
31
|
+
import { LogEvent, isNonNullable, assertErrorThrown, guaranteeType, guaranteeNonNullable, UnsupportedOperationError, assertNonNullable, assertTrue, ActionState, filterByType, AssertionError, } from '@finos/legend-shared';
|
|
32
32
|
import { UMLEditorState } from './editor-state/element-editor-state/UMLEditorState.js';
|
|
33
33
|
import { ServiceEditorState } from './editor-state/element-editor-state/service/ServiceEditorState.js';
|
|
34
34
|
import { EditorSDLCState } from './EditorSDLCState.js';
|
|
@@ -47,9 +47,9 @@ import { GenerationSpecificationEditorState } from './editor-state/GenerationSpe
|
|
|
47
47
|
import { UnsupportedElementEditorState } from './editor-state/UnsupportedElementEditorState.js';
|
|
48
48
|
import { FileGenerationViewerState } from './editor-state/FileGenerationViewerState.js';
|
|
49
49
|
import { DevToolState } from './aux-panel-state/DevToolState.js';
|
|
50
|
-
import { generateSetupRoute, generateViewProjectRoute, } from './LegendStudioRouter.js';
|
|
51
|
-
import {
|
|
52
|
-
import { ProjectConfiguration, } from '@finos/legend-server-sdlc';
|
|
50
|
+
import { generateEditorRoute, generateSetupRoute, generateViewProjectRoute, } from './LegendStudioRouter.js';
|
|
51
|
+
import { NonBlockingDialogState, PanelDisplayState } from '@finos/legend-art';
|
|
52
|
+
import { ProjectConfiguration, WorkspaceType, } from '@finos/legend-server-sdlc';
|
|
53
53
|
import { GRAPH_MANAGER_EVENT, PrimitiveType, Class, Enumeration, Profile, Association, ConcreteFunctionDefinition, Measure, Database, FlatData, Mapping, Service, PackageableRuntime, PackageableConnection, FileGenerationSpecification, GenerationSpecification, Package, DataElement, isElementReadOnly, } from '@finos/legend-graph';
|
|
54
54
|
import { ActionAlertActionType, ActionAlertType, APPLICATION_EVENT, TAB_SIZE, } from '@finos/legend-application';
|
|
55
55
|
import { LEGEND_STUDIO_APP_EVENT } from './LegendStudioAppEvent.js';
|
|
@@ -59,6 +59,7 @@ import { graph_addElement, graph_deleteElement, graph_deleteOwnElement, graph_re
|
|
|
59
59
|
import { PACKAGEABLE_ELEMENT_TYPE } from './shared/ModelClassifierUtils.js';
|
|
60
60
|
import { GlobalTestRunnerState } from './sidebar-state/testable/GlobalTestRunnerState.js';
|
|
61
61
|
import { EmbeddedQueryBuilderState } from './EmbeddedQueryBuilderState.js';
|
|
62
|
+
import { LEGEND_STUDIO_COMMAND_KEY } from './LegendStudioCommand.js';
|
|
62
63
|
export class EditorExtensionState {
|
|
63
64
|
/**
|
|
64
65
|
* This helps to better type-check for this empty abtract type
|
|
@@ -72,24 +73,12 @@ export class EditorStore {
|
|
|
72
73
|
depotServerClient;
|
|
73
74
|
pluginManager;
|
|
74
75
|
editorMode;
|
|
75
|
-
setEditorMode(val) {
|
|
76
|
-
this.editorMode = val;
|
|
77
|
-
}
|
|
78
76
|
// NOTE: once we clear up the editor store to make modes more separated
|
|
79
77
|
// we should remove these sets of functions. They are basically hacks to
|
|
80
78
|
// ensure hiding parts of the UI based on the editing mode.
|
|
81
79
|
// Instead, we will gradually move these `boolean` flags into `EditorMode`
|
|
82
80
|
// See https://github.com/finos/legend-studio/issues/317
|
|
83
81
|
mode = EDITOR_MODE.STANDARD;
|
|
84
|
-
setMode(val) {
|
|
85
|
-
this.mode = val;
|
|
86
|
-
}
|
|
87
|
-
get isInViewerMode() {
|
|
88
|
-
return this.mode === EDITOR_MODE.VIEWER;
|
|
89
|
-
}
|
|
90
|
-
get isInConflictResolutionMode() {
|
|
91
|
-
return this.mode === EDITOR_MODE.CONFLICT_RESOLUTION;
|
|
92
|
-
}
|
|
93
82
|
editorExtensionStates = [];
|
|
94
83
|
explorerTreeState;
|
|
95
84
|
sdlcState;
|
|
@@ -109,7 +98,7 @@ export class EditorStore {
|
|
|
109
98
|
devToolState;
|
|
110
99
|
embeddedQueryBuilderState;
|
|
111
100
|
newElementState;
|
|
112
|
-
|
|
101
|
+
initialEntityPath;
|
|
113
102
|
initState = ActionState.create();
|
|
114
103
|
graphEditMode = GRAPH_EDITOR_MODE.FORM;
|
|
115
104
|
// Aux Panel
|
|
@@ -126,11 +115,7 @@ export class EditorStore {
|
|
|
126
115
|
default: 300,
|
|
127
116
|
snap: 150,
|
|
128
117
|
});
|
|
129
|
-
//
|
|
130
|
-
blockGlobalHotkeys = false;
|
|
131
|
-
defaultHotkeys = [];
|
|
132
|
-
hotkeys = [];
|
|
133
|
-
// Tabs
|
|
118
|
+
// Editor Tabs
|
|
134
119
|
currentEditorState;
|
|
135
120
|
openedEditorStates = [];
|
|
136
121
|
/**
|
|
@@ -139,22 +124,15 @@ export class EditorStore {
|
|
|
139
124
|
*/
|
|
140
125
|
elementGenerationStates = [];
|
|
141
126
|
searchElementCommandState = new NonBlockingDialogState();
|
|
142
|
-
ignoreNavigationBlocking = false;
|
|
143
|
-
isDevToolEnabled = true;
|
|
144
127
|
constructor(applicationStore, sdlcServerClient, depotServerClient, graphManagerState) {
|
|
145
128
|
makeObservable(this, {
|
|
146
129
|
editorMode: observable,
|
|
147
130
|
mode: observable,
|
|
148
|
-
_isDisposed: observable,
|
|
149
131
|
graphEditMode: observable,
|
|
150
132
|
activeAuxPanelMode: observable,
|
|
151
133
|
activeActivity: observable,
|
|
152
|
-
blockGlobalHotkeys: observable,
|
|
153
|
-
hotkeys: observable,
|
|
154
134
|
currentEditorState: observable,
|
|
155
135
|
openedEditorStates: observable,
|
|
156
|
-
ignoreNavigationBlocking: observable,
|
|
157
|
-
isDevToolEnabled: observable,
|
|
158
136
|
isInViewerMode: computed,
|
|
159
137
|
isInConflictResolutionMode: computed,
|
|
160
138
|
isInitialized: computed,
|
|
@@ -167,17 +145,9 @@ export class EditorStore {
|
|
|
167
145
|
graphManagerState: false,
|
|
168
146
|
setEditorMode: action,
|
|
169
147
|
setMode: action,
|
|
170
|
-
setDevTool: action,
|
|
171
|
-
setHotkeys: action,
|
|
172
|
-
addHotKey: action,
|
|
173
|
-
resetHotkeys: action,
|
|
174
|
-
setBlockGlobalHotkeys: action,
|
|
175
148
|
setCurrentEditorState: action,
|
|
176
149
|
setActiveAuxPanelMode: action,
|
|
177
|
-
setIgnoreNavigationBlocking: action,
|
|
178
150
|
refreshCurrentEntityDiffEditorState: action,
|
|
179
|
-
setBlockingAlert: action,
|
|
180
|
-
setActionAlertInfo: action,
|
|
181
151
|
cleanUp: action,
|
|
182
152
|
reset: action,
|
|
183
153
|
setGraphEditMode: action,
|
|
@@ -234,32 +204,6 @@ export class EditorStore {
|
|
|
234
204
|
.flatMap((plugin) => plugin.getExtraEditorExtensionStateCreators?.() ?? [])
|
|
235
205
|
.map((creator) => creator(this))
|
|
236
206
|
.filter(isNonNullable);
|
|
237
|
-
// hotkeys
|
|
238
|
-
this.defaultHotkeys = [
|
|
239
|
-
// actions that need blocking
|
|
240
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.COMPILE, [LEGEND_STUDIO_HOTKEY_MAP.COMPILE], this.createGlobalHotKeyAction(() => {
|
|
241
|
-
flowResult(this.graphState.globalCompileInFormMode()).catch(applicationStore.alertUnhandledError);
|
|
242
|
-
})),
|
|
243
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.GENERATE, [LEGEND_STUDIO_HOTKEY_MAP.GENERATE], this.createGlobalHotKeyAction(() => {
|
|
244
|
-
flowResult(this.graphState.graphGenerationState.globalGenerate()).catch(applicationStore.alertUnhandledError);
|
|
245
|
-
})),
|
|
246
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.CREATE_ELEMENT, [LEGEND_STUDIO_HOTKEY_MAP.CREATE_ELEMENT], this.createGlobalHotKeyAction(() => this.newElementState.openModal())),
|
|
247
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.OPEN_ELEMENT, [LEGEND_STUDIO_HOTKEY_MAP.OPEN_ELEMENT], this.createGlobalHotKeyAction(() => this.searchElementCommandState.open())),
|
|
248
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_TEXT_MODE, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_TEXT_MODE], this.createGlobalHotKeyAction(() => {
|
|
249
|
-
flowResult(this.toggleTextMode()).catch(applicationStore.alertUnhandledError);
|
|
250
|
-
})),
|
|
251
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_MODEL_LOADER, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_MODEL_LOADER], this.createGlobalHotKeyAction(() => this.openState(this.modelImporterState))),
|
|
252
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.SYNC_WITH_WORKSPACE, [LEGEND_STUDIO_HOTKEY_MAP.SYNC_WITH_WORKSPACE], this.createGlobalHotKeyAction(() => {
|
|
253
|
-
flowResult(this.localChangesState.pushLocalChanges()).catch(applicationStore.alertUnhandledError);
|
|
254
|
-
})),
|
|
255
|
-
// simple actions (no blocking is needed)
|
|
256
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_AUX_PANEL, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_AUX_PANEL], this.createGlobalHotKeyAction(() => this.auxPanelDisplayState.toggle())),
|
|
257
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_SIDEBAR_EXPLORER, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_SIDEBAR_EXPLORER], this.createGlobalHotKeyAction(() => this.setActiveActivity(ACTIVITY_MODE.EXPLORER))),
|
|
258
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_SIDEBAR_CHANGES, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_SIDEBAR_CHANGES], this.createGlobalHotKeyAction(() => this.setActiveActivity(ACTIVITY_MODE.LOCAL_CHANGES))),
|
|
259
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_SIDEBAR_WORKSPACE_REVIEW, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_SIDEBAR_WORKSPACE_REVIEW], this.createGlobalHotKeyAction(() => this.setActiveActivity(ACTIVITY_MODE.WORKSPACE_REVIEW))),
|
|
260
|
-
new HotkeyConfiguration(LEGEND_STUDIO_HOTKEY.TOGGLE_SIDEBAR_WORKSPACE_UPDATER, [LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_SIDEBAR_WORKSPACE_UPDATER], this.createGlobalHotKeyAction(() => this.setActiveActivity(ACTIVITY_MODE.WORKSPACE_UPDATER))),
|
|
261
|
-
];
|
|
262
|
-
this.hotkeys = this.defaultHotkeys;
|
|
263
207
|
}
|
|
264
208
|
get isInitialized() {
|
|
265
209
|
return (Boolean(this.sdlcState.currentProject &&
|
|
@@ -273,64 +217,154 @@ export class EditorStore {
|
|
|
273
217
|
get isInFormMode() {
|
|
274
218
|
return this.graphEditMode === GRAPH_EDITOR_MODE.FORM;
|
|
275
219
|
}
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
-
}
|
|
279
|
-
addHotKey(val) {
|
|
280
|
-
addUniqueEntry(this.hotkeys, val);
|
|
281
|
-
}
|
|
282
|
-
resetHotkeys() {
|
|
283
|
-
this.hotkeys = this.defaultHotkeys;
|
|
284
|
-
}
|
|
285
|
-
setBlockGlobalHotkeys(val) {
|
|
286
|
-
this.blockGlobalHotkeys = val;
|
|
287
|
-
}
|
|
288
|
-
setDevTool(val) {
|
|
289
|
-
this.isDevToolEnabled = val;
|
|
290
|
-
}
|
|
291
|
-
setCurrentEditorState(val) {
|
|
292
|
-
this.currentEditorState = val;
|
|
293
|
-
}
|
|
294
|
-
setActiveAuxPanelMode(val) {
|
|
295
|
-
this.activeAuxPanelMode = val;
|
|
220
|
+
get isInViewerMode() {
|
|
221
|
+
return this.mode === EDITOR_MODE.VIEWER;
|
|
296
222
|
}
|
|
297
|
-
|
|
298
|
-
this.
|
|
223
|
+
get isInConflictResolutionMode() {
|
|
224
|
+
return this.mode === EDITOR_MODE.CONFLICT_RESOLUTION;
|
|
299
225
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
226
|
+
/**
|
|
227
|
+
* TODO?: we should really think of how we could simplify the trigger condition below
|
|
228
|
+
* after we refactor editor modes
|
|
229
|
+
*
|
|
230
|
+
* See https://github.com/finos/legend-studio/issues/317
|
|
231
|
+
*/
|
|
232
|
+
createEditorCommandTrigger(additionalChecker) {
|
|
233
|
+
return () =>
|
|
234
|
+
// we don't want to leak any hotkeys when we have embedded query builder open
|
|
235
|
+
// TODO?: we probably should come up with a more generic mechanism for this
|
|
236
|
+
!this.embeddedQueryBuilderState.queryBuilderState &&
|
|
237
|
+
(!additionalChecker || additionalChecker());
|
|
304
238
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
this.setBlockGlobalHotkeys(Boolean(alertInfo)); // block global hotkeys if alert is shown
|
|
310
|
-
this.applicationStore.setBlockingAlert(alertInfo);
|
|
239
|
+
setEditorMode(val) {
|
|
240
|
+
this.editorMode = val;
|
|
311
241
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
this.applicationStore.setActionAlertInfo(alertInfo);
|
|
242
|
+
setMode(val) {
|
|
243
|
+
this.mode = val;
|
|
317
244
|
}
|
|
318
245
|
cleanUp() {
|
|
319
246
|
// dismiss all the alerts as these are parts of application, if we don't do this, we might
|
|
320
247
|
// end up blocking other parts of the app
|
|
321
248
|
// e.g. trying going to an unknown workspace, we will be redirected to the home page
|
|
322
249
|
// but the blocking alert for not-found workspace will still block the app
|
|
323
|
-
this.setBlockingAlert(undefined);
|
|
324
|
-
this.setActionAlertInfo(undefined);
|
|
250
|
+
this.applicationStore.setBlockingAlert(undefined);
|
|
251
|
+
this.applicationStore.setActionAlertInfo(undefined);
|
|
325
252
|
// stop change detection to avoid memory-leak
|
|
326
253
|
this.changeDetectionState.stop();
|
|
327
|
-
|
|
254
|
+
}
|
|
255
|
+
registerCommands() {
|
|
256
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
257
|
+
key: LEGEND_STUDIO_COMMAND_KEY.COMPILE,
|
|
258
|
+
trigger: this.createEditorCommandTrigger(() => this.isInitialized &&
|
|
259
|
+
(!this.isInConflictResolutionMode ||
|
|
260
|
+
this.conflictResolutionState.hasResolvedAllConflicts)),
|
|
261
|
+
action: () => {
|
|
262
|
+
if (this.isInFormMode) {
|
|
263
|
+
flowResult(this.graphState.globalCompileInFormMode()).catch(this.applicationStore.alertUnhandledError);
|
|
264
|
+
}
|
|
265
|
+
else if (this.isInGrammarTextMode) {
|
|
266
|
+
flowResult(this.graphState.globalCompileInTextMode()).catch(this.applicationStore.alertUnhandledError);
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
271
|
+
key: LEGEND_STUDIO_COMMAND_KEY.GENERATE,
|
|
272
|
+
trigger: this.createEditorCommandTrigger(() => this.isInitialized &&
|
|
273
|
+
(!this.isInConflictResolutionMode ||
|
|
274
|
+
this.conflictResolutionState.hasResolvedAllConflicts)),
|
|
275
|
+
action: () => {
|
|
276
|
+
flowResult(this.graphState.graphGenerationState.globalGenerate()).catch(this.applicationStore.alertUnhandledError);
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
280
|
+
key: LEGEND_STUDIO_COMMAND_KEY.CREATE_ELEMENT,
|
|
281
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
282
|
+
action: () => this.newElementState.openModal(),
|
|
283
|
+
});
|
|
284
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
285
|
+
key: LEGEND_STUDIO_COMMAND_KEY.SEARCH_ELEMENT,
|
|
286
|
+
trigger: this.createEditorCommandTrigger(),
|
|
287
|
+
action: () => this.searchElementCommandState.open(),
|
|
288
|
+
});
|
|
289
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
290
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_TEXT_MODE,
|
|
291
|
+
trigger: this.createEditorCommandTrigger(() => this.isInitialized &&
|
|
292
|
+
(!this.isInConflictResolutionMode ||
|
|
293
|
+
this.conflictResolutionState.hasResolvedAllConflicts)),
|
|
294
|
+
action: () => {
|
|
295
|
+
flowResult(this.toggleTextMode()).catch(this.applicationStore.alertUnhandledError);
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
299
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_MODEL_LOADER,
|
|
300
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
301
|
+
action: () => this.openState(this.modelImporterState),
|
|
302
|
+
});
|
|
303
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
304
|
+
key: LEGEND_STUDIO_COMMAND_KEY.SYNC_WITH_WORKSPACE,
|
|
305
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
306
|
+
action: () => {
|
|
307
|
+
flowResult(this.localChangesState.pushLocalChanges()).catch(this.applicationStore.alertUnhandledError);
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
311
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_AUX_PANEL,
|
|
312
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
313
|
+
action: () => this.auxPanelDisplayState.toggle(),
|
|
314
|
+
});
|
|
315
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
316
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_EXPLORER,
|
|
317
|
+
trigger: this.createEditorCommandTrigger(),
|
|
318
|
+
action: () => this.setActiveActivity(ACTIVITY_MODE.EXPLORER),
|
|
319
|
+
});
|
|
320
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
321
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_LOCAL_CHANGES,
|
|
322
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
323
|
+
action: () => this.setActiveActivity(ACTIVITY_MODE.LOCAL_CHANGES),
|
|
324
|
+
});
|
|
325
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
326
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_WORKSPACE_REVIEW,
|
|
327
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
328
|
+
action: () => this.setActiveActivity(ACTIVITY_MODE.WORKSPACE_REVIEW),
|
|
329
|
+
});
|
|
330
|
+
this.applicationStore.commandCenter.registerCommand({
|
|
331
|
+
key: LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_WORKSPACE_UPDATER,
|
|
332
|
+
trigger: this.createEditorCommandTrigger(() => !this.isInViewerMode),
|
|
333
|
+
action: () => this.setActiveActivity(ACTIVITY_MODE.WORKSPACE_UPDATER),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
deregisterCommands() {
|
|
337
|
+
[
|
|
338
|
+
LEGEND_STUDIO_COMMAND_KEY.SYNC_WITH_WORKSPACE,
|
|
339
|
+
LEGEND_STUDIO_COMMAND_KEY.CREATE_ELEMENT,
|
|
340
|
+
LEGEND_STUDIO_COMMAND_KEY.SEARCH_ELEMENT,
|
|
341
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_TEXT_MODE,
|
|
342
|
+
LEGEND_STUDIO_COMMAND_KEY.GENERATE,
|
|
343
|
+
LEGEND_STUDIO_COMMAND_KEY.COMPILE,
|
|
344
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_AUX_PANEL,
|
|
345
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_MODEL_LOADER,
|
|
346
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_EXPLORER,
|
|
347
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_LOCAL_CHANGES,
|
|
348
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_WORKSPACE_REVIEW,
|
|
349
|
+
LEGEND_STUDIO_COMMAND_KEY.TOGGLE_SIDEBAR_WORKSPACE_UPDATER,
|
|
350
|
+
].forEach((key) => this.applicationStore.commandCenter.deregisterCommand(key));
|
|
328
351
|
}
|
|
329
352
|
reset() {
|
|
330
353
|
this.closeAllEditorTabs();
|
|
331
354
|
this.projectConfigurationEditorState = new ProjectConfigurationEditorState(this, this.sdlcState);
|
|
332
355
|
this.explorerTreeState = new ExplorerTreeState(this);
|
|
333
356
|
}
|
|
357
|
+
internalizeEntityPath(params) {
|
|
358
|
+
const { projectId, entityPath } = params;
|
|
359
|
+
const workspaceType = params.groupWorkspaceId
|
|
360
|
+
? WorkspaceType.GROUP
|
|
361
|
+
: WorkspaceType.USER;
|
|
362
|
+
const workspaceId = guaranteeNonNullable(params.groupWorkspaceId ?? params.workspaceId, `Workspace/group workspace ID is not provided`);
|
|
363
|
+
if (entityPath) {
|
|
364
|
+
this.initialEntityPath = entityPath;
|
|
365
|
+
this.applicationStore.navigator.updateCurrentLocation(generateEditorRoute(projectId, workspaceId, workspaceType));
|
|
366
|
+
}
|
|
367
|
+
}
|
|
334
368
|
/**
|
|
335
369
|
* This is the entry of the app logic where the initialization of editor states happens
|
|
336
370
|
* Here, we ensure the order of calls after checking existence of current project and workspace
|
|
@@ -348,7 +382,6 @@ export class EditorStore {
|
|
|
348
382
|
if (process.env.NODE_ENV === 'development') {
|
|
349
383
|
this.applicationStore.log.info(LogEvent.create(APPLICATION_EVENT.DEVELOPMENT_ISSUE), `Fast-refreshing the app - undoing cleanUp() and preventing initialize() recall in editor store...`);
|
|
350
384
|
this.changeDetectionState.start();
|
|
351
|
-
this._isDisposed = false;
|
|
352
385
|
return;
|
|
353
386
|
}
|
|
354
387
|
this.applicationStore.notifyIllegalState('Editor store is re-initialized');
|
|
@@ -369,12 +402,10 @@ export class EditorStore {
|
|
|
369
402
|
// instead, we give them the option to:
|
|
370
403
|
// - reload the page (in case they later gain access)
|
|
371
404
|
// - back to the setup page
|
|
372
|
-
this.setActionAlertInfo({
|
|
405
|
+
this.applicationStore.setActionAlertInfo({
|
|
373
406
|
message: `Project not found or inaccessible`,
|
|
374
407
|
prompt: 'Please check that the project exists and request access to it',
|
|
375
408
|
type: ActionAlertType.STANDARD,
|
|
376
|
-
onEnter: () => this.setBlockGlobalHotkeys(true),
|
|
377
|
-
onClose: () => this.setBlockGlobalHotkeys(false),
|
|
378
409
|
actions: [
|
|
379
410
|
{
|
|
380
411
|
label: 'Reload application',
|
|
@@ -423,12 +454,10 @@ export class EditorStore {
|
|
|
423
454
|
this.applicationStore.notifyError(error);
|
|
424
455
|
}
|
|
425
456
|
};
|
|
426
|
-
this.setActionAlertInfo({
|
|
457
|
+
this.applicationStore.setActionAlertInfo({
|
|
427
458
|
message: 'Workspace not found',
|
|
428
459
|
prompt: `Please note that you can check out the project in viewer mode. Workspace is only required if you need to work on the project.`,
|
|
429
460
|
type: ActionAlertType.STANDARD,
|
|
430
|
-
onEnter: () => this.setBlockGlobalHotkeys(true),
|
|
431
|
-
onClose: () => this.setBlockGlobalHotkeys(false),
|
|
432
461
|
actions: [
|
|
433
462
|
{
|
|
434
463
|
label: 'View project',
|
|
@@ -500,12 +529,10 @@ export class EditorStore {
|
|
|
500
529
|
]);
|
|
501
530
|
}
|
|
502
531
|
*initConflictResolutionMode() {
|
|
503
|
-
this.setActionAlertInfo({
|
|
532
|
+
this.applicationStore.setActionAlertInfo({
|
|
504
533
|
message: 'Failed to update workspace.',
|
|
505
534
|
prompt: 'You can discard all of your changes or review them, resolve all merge conflicts and fix any potential compilation issues as well as test failures',
|
|
506
535
|
type: ActionAlertType.CAUTION,
|
|
507
|
-
onEnter: () => this.setBlockGlobalHotkeys(true),
|
|
508
|
-
onClose: () => this.setBlockGlobalHotkeys(false),
|
|
509
536
|
actions: [
|
|
510
537
|
{
|
|
511
538
|
label: 'Discard your changes',
|
|
@@ -574,6 +601,19 @@ export class EditorStore {
|
|
|
574
601
|
// build explorer tree
|
|
575
602
|
this.explorerTreeState.buildImmutableModelTrees();
|
|
576
603
|
this.explorerTreeState.build();
|
|
604
|
+
// open element if provided an element path
|
|
605
|
+
if (this.graphManagerState.graphBuildState.hasSucceeded &&
|
|
606
|
+
this.explorerTreeState.buildState.hasCompleted &&
|
|
607
|
+
this.initialEntityPath) {
|
|
608
|
+
try {
|
|
609
|
+
this.openElement(this.graphManagerState.graph.getElement(this.initialEntityPath));
|
|
610
|
+
}
|
|
611
|
+
catch {
|
|
612
|
+
const elementPath = this.initialEntityPath;
|
|
613
|
+
this.initialEntityPath = undefined;
|
|
614
|
+
throw new AssertionError(`Can't find element with path '${elementPath}'`);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
577
617
|
// ======= (RE)START CHANGE DETECTION =======
|
|
578
618
|
this.changeDetectionState.stop();
|
|
579
619
|
yield flowResult(this.changeDetectionState.observeGraph());
|
|
@@ -601,26 +641,15 @@ export class EditorStore {
|
|
|
601
641
|
this.initState.setMessage(undefined);
|
|
602
642
|
}
|
|
603
643
|
}
|
|
644
|
+
setCurrentEditorState(val) {
|
|
645
|
+
this.currentEditorState = val;
|
|
646
|
+
}
|
|
604
647
|
getCurrentEditorState(clazz) {
|
|
605
648
|
return guaranteeType(this.currentEditorState, clazz, `Current editor state is not of the specified type (this is likely caused by calling this method at the wrong place)`);
|
|
606
649
|
}
|
|
607
650
|
getEditorExtensionState(clazz) {
|
|
608
651
|
return guaranteeNonNullable(this.editorExtensionStates.find(filterByType(clazz)), `Can't find extension editor state of the specified type: no built extension editor state available from plugins`);
|
|
609
652
|
}
|
|
610
|
-
setGraphEditMode(graphEditor) {
|
|
611
|
-
this.graphEditMode = graphEditor;
|
|
612
|
-
this.graphState.clearCompilationError();
|
|
613
|
-
}
|
|
614
|
-
setActiveActivity(activity, options) {
|
|
615
|
-
if (!this.sideBarDisplayState.isOpen) {
|
|
616
|
-
this.sideBarDisplayState.open();
|
|
617
|
-
}
|
|
618
|
-
else if (activity === this.activeActivity &&
|
|
619
|
-
!options?.keepShowingIfMatchedCurrent) {
|
|
620
|
-
this.sideBarDisplayState.close();
|
|
621
|
-
}
|
|
622
|
-
this.activeActivity = activity;
|
|
623
|
-
}
|
|
624
653
|
closeState(editorState) {
|
|
625
654
|
const elementIndex = this.openedEditorStates.findIndex((e) => e === editorState);
|
|
626
655
|
assertTrue(elementIndex !== -1, `Can't close a tab which is not opened`);
|
|
@@ -640,7 +669,7 @@ export class EditorStore {
|
|
|
640
669
|
}
|
|
641
670
|
closeAllOtherStates(editorState) {
|
|
642
671
|
assertNonNullable(this.openedEditorStates.find((e) => e === editorState), 'Editor tab should be currently opened');
|
|
643
|
-
this.
|
|
672
|
+
this.setCurrentEditorState(editorState);
|
|
644
673
|
this.openedEditorStates = [editorState];
|
|
645
674
|
this.explorerTreeState.reprocess();
|
|
646
675
|
}
|
|
@@ -672,6 +701,11 @@ export class EditorStore {
|
|
|
672
701
|
}
|
|
673
702
|
this.explorerTreeState.reprocess();
|
|
674
703
|
}
|
|
704
|
+
refreshCurrentEntityDiffEditorState() {
|
|
705
|
+
if (this.currentEditorState instanceof EntityDiffEditorState) {
|
|
706
|
+
this.currentEditorState.refresh();
|
|
707
|
+
}
|
|
708
|
+
}
|
|
675
709
|
openEntityDiff(entityDiffEditorState) {
|
|
676
710
|
const existingEditorState = this.openedEditorStates.find((editorState) => editorState instanceof EntityDiffViewState &&
|
|
677
711
|
editorState.fromEntityPath === entityDiffEditorState.fromEntityPath &&
|
|
@@ -704,6 +738,23 @@ export class EditorStore {
|
|
|
704
738
|
}
|
|
705
739
|
this.setCurrentEditorState(editorState);
|
|
706
740
|
}
|
|
741
|
+
setGraphEditMode(graphEditor) {
|
|
742
|
+
this.graphEditMode = graphEditor;
|
|
743
|
+
this.graphState.clearCompilationError();
|
|
744
|
+
}
|
|
745
|
+
setActiveActivity(activity, options) {
|
|
746
|
+
if (!this.sideBarDisplayState.isOpen) {
|
|
747
|
+
this.sideBarDisplayState.open();
|
|
748
|
+
}
|
|
749
|
+
else if (activity === this.activeActivity &&
|
|
750
|
+
!options?.keepShowingIfMatchedCurrent) {
|
|
751
|
+
this.sideBarDisplayState.close();
|
|
752
|
+
}
|
|
753
|
+
this.activeActivity = activity;
|
|
754
|
+
}
|
|
755
|
+
setActiveAuxPanelMode(val) {
|
|
756
|
+
this.activeAuxPanelMode = val;
|
|
757
|
+
}
|
|
707
758
|
createElementState(element) {
|
|
708
759
|
if (element instanceof PrimitiveType) {
|
|
709
760
|
throw new UnsupportedOperationError(`Can't create element state for primitive type`);
|
|
@@ -881,20 +932,6 @@ export class EditorStore {
|
|
|
881
932
|
}
|
|
882
933
|
this.setCurrentEditorState(generatedFileState);
|
|
883
934
|
}
|
|
884
|
-
createGlobalHotKeyAction = (handler, preventDefault = true) => (event) => {
|
|
885
|
-
if (preventDefault) {
|
|
886
|
-
event?.preventDefault();
|
|
887
|
-
}
|
|
888
|
-
// TODO: maybe we should come up with a better way to block global hot keys, this seems highly restrictive.
|
|
889
|
-
const isResolvingConflicts = this.isInConflictResolutionMode &&
|
|
890
|
-
!this.conflictResolutionState.hasResolvedAllConflicts;
|
|
891
|
-
if ((this.isInitialized &&
|
|
892
|
-
!isResolvingConflicts &&
|
|
893
|
-
!this.blockGlobalHotkeys) ||
|
|
894
|
-
this.isInViewerMode) {
|
|
895
|
-
handler(event);
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
935
|
closeAllEditorTabs() {
|
|
899
936
|
this.setCurrentEditorState(undefined);
|
|
900
937
|
this.openedEditorStates = [];
|
|
@@ -904,7 +941,7 @@ export class EditorStore {
|
|
|
904
941
|
if (this.graphState.checkIfApplicationUpdateOperationIsRunning()) {
|
|
905
942
|
return;
|
|
906
943
|
}
|
|
907
|
-
this.setBlockingAlert({
|
|
944
|
+
this.applicationStore.setBlockingAlert({
|
|
908
945
|
message: 'Switching to text mode...',
|
|
909
946
|
showLoading: true,
|
|
910
947
|
});
|
|
@@ -915,10 +952,10 @@ export class EditorStore {
|
|
|
915
952
|
catch (error) {
|
|
916
953
|
assertErrorThrown(error);
|
|
917
954
|
this.applicationStore.notifyWarning(`Can't enter text mode: transformation to grammar text failed. Error: ${error.message}`);
|
|
918
|
-
this.setBlockingAlert(undefined);
|
|
955
|
+
this.applicationStore.setBlockingAlert(undefined);
|
|
919
956
|
return;
|
|
920
957
|
}
|
|
921
|
-
this.setBlockingAlert(undefined);
|
|
958
|
+
this.applicationStore.setBlockingAlert(undefined);
|
|
922
959
|
this.setGraphEditMode(GRAPH_EDITOR_MODE.GRAMMAR_TEXT);
|
|
923
960
|
// navigate to the currently opened element immediately after entering text mode editor
|
|
924
961
|
if (this.currentEditorState instanceof ElementEditorState) {
|