@finos/legend-application-studio 22.5.0 → 23.0.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 +8 -5
- package/lib/application/LegendStudio.js.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.d.ts +4 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +7 -1
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/application/LegendStudioApplicationNavigationContext.d.ts.map +1 -0
- package/lib/application/LegendStudioApplicationNavigationContext.js.map +1 -0
- package/lib/application/LegendStudioCommand.d.ts.map +1 -0
- package/lib/application/LegendStudioCommand.js.map +1 -0
- package/lib/application/LegendStudioDocumentation.d.ts.map +1 -0
- package/lib/application/LegendStudioDocumentation.js.map +1 -0
- package/lib/{stores/LegendStudioAppEvent.d.ts → application/LegendStudioEvent.d.ts} +1 -1
- package/lib/application/LegendStudioEvent.d.ts.map +1 -0
- package/lib/{stores/LegendStudioAppEvent.js → application/LegendStudioEvent.js} +1 -1
- package/lib/application/LegendStudioEvent.js.map +1 -0
- package/lib/{stores/LegendStudioEventService.d.ts → application/LegendStudioEventHelper.d.ts} +3 -6
- package/lib/application/LegendStudioEventHelper.d.ts.map +1 -0
- package/lib/{stores/LegendStudioEventService.js → application/LegendStudioEventHelper.js} +4 -11
- package/lib/application/LegendStudioEventHelper.js.map +1 -0
- package/lib/{stores/LegendStudioRouter.d.ts → application/LegendStudioNavigation.d.ts} +24 -24
- package/lib/application/LegendStudioNavigation.d.ts.map +1 -0
- package/lib/{stores/LegendStudioRouter.js → application/LegendStudioNavigation.js} +28 -28
- package/lib/application/LegendStudioNavigation.js.map +1 -0
- package/lib/{stores/LegendStudioStorage.d.ts → application/LegendStudioSetting.d.ts} +4 -2
- package/lib/application/LegendStudioSetting.d.ts.map +1 -0
- package/lib/application/LegendStudioSetting.js +29 -0
- package/lib/application/LegendStudioSetting.js.map +1 -0
- package/lib/{stores/LegendStudioTelemetry.d.ts → application/LegendStudioTelemetryHelper.d.ts} +8 -8
- package/lib/application/LegendStudioTelemetryHelper.d.ts.map +1 -0
- package/lib/application/LegendStudioTelemetryHelper.js +37 -0
- package/lib/application/LegendStudioTelemetryHelper.js.map +1 -0
- 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 +11 -6
- package/lib/components/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +4 -5
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/EmbeddedQueryBuilder.js +1 -1
- package/lib/components/EmbeddedQueryBuilder.js.map +1 -1
- package/lib/components/LegendStudioAppInfo.d.ts.map +1 -1
- package/lib/components/LegendStudioAppInfo.js +0 -1
- package/lib/components/LegendStudioAppInfo.js.map +1 -1
- package/lib/components/LegendStudioApplication.d.ts +0 -2
- package/lib/components/LegendStudioApplication.d.ts.map +1 -1
- package/lib/components/LegendStudioApplication.js +8 -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 +7 -2
- 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 +6 -2
- package/lib/components/editor/Editor.js.map +1 -1
- package/lib/components/editor/EditorStoreProvider.d.ts.map +1 -1
- package/lib/components/editor/EditorStoreProvider.js +1 -3
- package/lib/components/editor/EditorStoreProvider.js.map +1 -1
- package/lib/components/editor/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.js +5 -8
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/aux-panel/DevTool.js +2 -2
- package/lib/components/editor/aux-panel/DevTool.js.map +1 -1
- package/lib/components/editor/aux-panel/Problems.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/Problems.js +4 -10
- package/lib/components/editor/aux-panel/Problems.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/FileGenerationViewer.js +1 -1
- 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.js +2 -2
- 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 +8 -7
- 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.js +3 -3
- package/lib/components/editor/edit-panel/RuntimeEditor.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/connection-editor/DatabaseBuilder.js +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +1 -1
- 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/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.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 +1 -3
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +3 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +1 -3
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.js +2 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.js.map +1 -1
- package/{src/stores/LegendStudioStorage.ts → lib/components/editor/edit-panel/service-editor/BulkServiceRegistrationEditor.d.ts} +5 -5
- package/lib/components/editor/edit-panel/service-editor/BulkServiceRegistrationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/BulkServiceRegistrationEditor.js +98 -0
- package/lib/components/editor/edit-panel/service-editor/BulkServiceRegistrationEditor.js.map +1 -0
- 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.js +2 -2
- 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 +0 -2
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.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.js +8 -8
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js +1 -3
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js.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.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/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +4 -0
- 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 +18 -10
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
- package/lib/components/editor/side-bar/LocalChanges.js +4 -3
- package/lib/components/editor/side-bar/LocalChanges.js.map +1 -1
- package/lib/components/editor/side-bar/ProjectDependantsEditor.js +1 -1
- package/lib/components/editor/side-bar/ProjectDependantsEditor.js.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.js +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
- package/lib/components/editor/side-bar/RegisterService.d.ts +8 -0
- package/lib/components/editor/side-bar/RegisterService.d.ts.map +1 -0
- package/lib/components/editor/side-bar/RegisterService.js +35 -0
- package/lib/components/editor/side-bar/RegisterService.js.map +1 -0
- package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
- package/lib/components/editor/side-bar/SideBar.js +3 -0
- package/lib/components/editor/side-bar/SideBar.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.js +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.js +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.js.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.js +7 -4
- package/lib/components/project-viewer/ProjectViewer.js.map +1 -1
- package/lib/components/shared/ProjectSelectorUtils.js +1 -1
- package/lib/components/shared/ProjectSelectorUtils.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReview.js +1 -1
- package/lib/components/workspace-review/WorkspaceReview.js.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.js +2 -2
- package/lib/components/workspace-setup/CreateProjectModal.js.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +6 -6
- 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 +6 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/package.json +4 -4
- package/lib/stores/{LegendStudioCodeSnippets.d.ts → Core_CodeSnippets.d.ts} +1 -1
- package/lib/stores/Core_CodeSnippets.d.ts.map +1 -0
- package/lib/stores/{LegendStudioCodeSnippets.js → Core_CodeSnippets.js} +1 -1
- package/lib/stores/Core_CodeSnippets.js.map +1 -0
- package/lib/stores/DependencyProjectViewerHelper.js +1 -1
- package/lib/stores/DependencyProjectViewerHelper.js.map +1 -1
- package/lib/stores/EditorConfig.d.ts +2 -1
- package/lib/stores/EditorConfig.d.ts.map +1 -1
- package/lib/stores/EditorConfig.js +1 -0
- package/lib/stores/EditorConfig.js.map +1 -1
- package/lib/stores/EditorGraphState.d.ts +10 -71
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +46 -540
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorSDLCState.js +1 -1
- package/lib/stores/EditorSDLCState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +13 -16
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +76 -215
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/EditorStoreTestUtils.js +1 -2
- package/lib/stores/EditorStoreTestUtils.js.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +2 -1
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.js +63 -19
- package/lib/stores/EditorTabManagerState.js.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.d.ts +0 -1
- package/lib/stores/EmbeddedQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.js +10 -9
- package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
- package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/ExplorerTreeState.js +2 -2
- package/lib/stores/ExplorerTreeState.js.map +1 -1
- package/lib/stores/GraphEditFormModeState.d.ts +81 -0
- package/lib/stores/GraphEditFormModeState.d.ts.map +1 -0
- package/lib/stores/GraphEditFormModeState.js +370 -0
- package/lib/stores/GraphEditFormModeState.js.map +1 -0
- package/lib/stores/GraphEditGrammarModeState.d.ts +65 -0
- package/lib/stores/GraphEditGrammarModeState.d.ts.map +1 -0
- package/lib/stores/GraphEditGrammarModeState.js +315 -0
- package/lib/stores/GraphEditGrammarModeState.js.map +1 -0
- package/lib/stores/GraphEditorMode.d.ts +51 -0
- package/lib/stores/GraphEditorMode.d.ts.map +1 -0
- package/lib/stores/GraphEditorMode.js +35 -0
- package/lib/stores/GraphEditorMode.js.map +1 -0
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +12 -5
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendStudioBaseStore.js +25 -9
- package/lib/stores/LegendStudioBaseStore.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +2 -2
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +19 -10
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/StandardEditorMode.js +1 -1
- package/lib/stores/editor/StandardEditorMode.js.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.js +1 -1
- package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.js +1 -1
- package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/GrammarTextEditorState.js +2 -2
- package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.js +2 -2
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +1 -1
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.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/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.js +6 -3
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js.map +1 -1
- 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 +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.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 +8 -15
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- 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 -11
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +7 -14
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +3 -3
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerEditorMode.js +1 -1
- package/lib/stores/project-viewer/ProjectViewerEditorMode.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +9 -15
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/sidebar-state/BulkServiceRegistrationState.d.ts +51 -0
- package/lib/stores/sidebar-state/BulkServiceRegistrationState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/BulkServiceRegistrationState.js +237 -0
- package/lib/stores/sidebar-state/BulkServiceRegistrationState.js.map +1 -0
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +6 -3
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +45 -12
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/ProjectOverviewState.js +2 -2
- package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkflowManagerState.js +1 -1
- package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.js +2 -2
- 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 +2 -2
- package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js +2 -2
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.js +1 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js +2 -2
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
- package/package.json +13 -13
- package/src/application/LegendStudio.tsx +8 -7
- package/src/application/LegendStudioApplicationConfig.ts +7 -0
- package/src/{stores/LegendStudioEventService.ts → application/LegendStudioEventHelper.ts} +3 -13
- package/src/{stores/LegendStudioRouter.ts → application/LegendStudioNavigation.ts} +40 -39
- package/{lib/stores/LegendStudioStorage.js → src/application/LegendStudioSetting.ts} +16 -6
- package/src/{stores/LegendStudioTelemetry.ts → application/LegendStudioTelemetryHelper.ts} +14 -26
- package/src/components/Core_LegendStudioApplicationPlugin.tsx +14 -5
- package/src/components/EditorComponentTestUtils.tsx +8 -14
- package/src/components/EmbeddedQueryBuilder.tsx +1 -1
- package/src/components/LegendStudioAppInfo.tsx +0 -1
- package/src/components/LegendStudioApplication.tsx +24 -21
- package/src/components/editor/ActivityBar.tsx +7 -1
- package/src/components/editor/Editor.tsx +10 -6
- package/src/components/editor/EditorStoreProvider.tsx +1 -8
- package/src/components/editor/StatusBar.tsx +10 -9
- package/src/components/editor/aux-panel/DevTool.tsx +3 -3
- package/src/components/editor/aux-panel/Problems.tsx +5 -10
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +1 -4
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +1 -1
- package/src/components/editor/edit-panel/FunctionEditor.tsx +3 -3
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +13 -8
- package/src/components/editor/edit-panel/ModelImporter.tsx +1 -1
- package/src/components/editor/edit-panel/RuntimeEditor.tsx +3 -3
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -1
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +1 -1
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +1 -1
- package/src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx +1 -1
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +0 -1
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +1 -4
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +3 -2
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +1 -4
- package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +1 -1
- package/src/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.tsx +1 -1
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +3 -3
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/BulkServiceRegistrationEditor.tsx +283 -0
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +0 -3
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +1 -1
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +8 -8
- package/src/components/editor/edit-panel/uml-editor/ClassQueryBuilder.tsx +3 -4
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +1 -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/side-bar/CreateNewElementModal.tsx +4 -0
- package/src/components/editor/side-bar/Explorer.tsx +25 -15
- package/src/components/editor/side-bar/LocalChanges.tsx +4 -8
- package/src/components/editor/side-bar/ProjectDependantsEditor.tsx +1 -1
- package/src/components/editor/side-bar/ProjectOverview.tsx +1 -1
- package/src/components/editor/side-bar/RegisterService.tsx +139 -0
- package/src/components/editor/side-bar/SideBar.tsx +9 -0
- package/src/components/editor/side-bar/WorkspaceReview.tsx +1 -1
- package/src/components/editor/side-bar/WorkspaceUpdater.tsx +1 -1
- package/src/components/project-viewer/ProjectViewer.tsx +8 -5
- package/src/components/shared/ProjectSelectorUtils.tsx +1 -1
- package/src/components/workspace-review/WorkspaceReview.tsx +1 -1
- package/src/components/workspace-setup/CreateProjectModal.tsx +2 -2
- package/src/components/workspace-setup/CreateWorkspaceModal.tsx +1 -1
- package/src/components/workspace-setup/WorkspaceSetup.tsx +7 -7
- package/src/index.ts +9 -5
- package/src/stores/DependencyProjectViewerHelper.ts +1 -1
- package/src/stores/EditorConfig.ts +1 -0
- package/src/stores/EditorGraphState.ts +49 -798
- package/src/stores/EditorSDLCState.ts +1 -1
- package/src/stores/EditorStore.ts +104 -323
- package/src/stores/EditorStoreTestUtils.ts +0 -2
- package/src/stores/EditorTabManagerState.ts +90 -25
- package/src/stores/EmbeddedQueryBuilderState.ts +11 -11
- package/src/stores/ExplorerTreeState.ts +2 -4
- package/src/stores/GraphEditFormModeState.ts +605 -0
- package/src/stores/GraphEditGrammarModeState.ts +512 -0
- package/src/stores/GraphEditorMode.ts +77 -0
- package/src/stores/LegendStudioApplicationPlugin.ts +14 -4
- package/src/stores/LegendStudioBaseStore.ts +35 -11
- package/src/stores/editor/NewElementState.ts +36 -20
- package/src/stores/editor/StandardEditorMode.ts +1 -1
- package/src/stores/editor-state/ExternalFormatState.ts +1 -1
- package/src/stores/editor-state/FileGenerationState.ts +1 -1
- package/src/stores/editor-state/GrammarTextEditorState.ts +4 -5
- package/src/stores/editor-state/GraphGenerationState.ts +6 -2
- package/src/stores/editor-state/ModelImporterState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +5 -1
- package/src/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +12 -5
- package/src/stores/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1 -3
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +12 -21
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +6 -15
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +7 -20
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +3 -3
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +1 -1
- package/src/stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +1 -1
- package/src/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts +1 -1
- package/src/stores/project-viewer/ProjectViewerEditorMode.ts +1 -1
- package/src/stores/project-viewer/ProjectViewerStore.ts +14 -25
- package/src/stores/sidebar-state/BulkServiceRegistrationState.ts +370 -0
- package/src/stores/sidebar-state/LocalChangesState.ts +57 -16
- package/src/stores/sidebar-state/ProjectOverviewState.ts +2 -2
- package/src/stores/sidebar-state/WorkflowManagerState.ts +1 -1
- package/src/stores/sidebar-state/WorkspaceReviewState.ts +2 -2
- package/src/stores/sidebar-state/WorkspaceSyncState.ts +3 -2
- package/src/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.ts +2 -2
- package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +1 -1
- package/src/stores/workspace-review/WorkspaceReviewStore.ts +1 -1
- package/src/stores/workspace-setup/WorkspaceSetupStore.ts +2 -2
- package/tsconfig.json +16 -11
- package/tsconfig.package.json +1 -2
- package/lib/stores/LegendStudioAppEvent.d.ts.map +0 -1
- package/lib/stores/LegendStudioAppEvent.js.map +0 -1
- package/lib/stores/LegendStudioApplicationNavigationContext.d.ts.map +0 -1
- package/lib/stores/LegendStudioApplicationNavigationContext.js.map +0 -1
- package/lib/stores/LegendStudioCodeSnippets.d.ts.map +0 -1
- package/lib/stores/LegendStudioCodeSnippets.js.map +0 -1
- package/lib/stores/LegendStudioCommand.d.ts.map +0 -1
- package/lib/stores/LegendStudioCommand.js.map +0 -1
- package/lib/stores/LegendStudioDocumentation.d.ts.map +0 -1
- package/lib/stores/LegendStudioDocumentation.js.map +0 -1
- package/lib/stores/LegendStudioEventService.d.ts.map +0 -1
- package/lib/stores/LegendStudioEventService.js.map +0 -1
- package/lib/stores/LegendStudioRouter.d.ts.map +0 -1
- package/lib/stores/LegendStudioRouter.js.map +0 -1
- package/lib/stores/LegendStudioStorage.d.ts.map +0 -1
- package/lib/stores/LegendStudioStorage.js.map +0 -1
- package/lib/stores/LegendStudioTelemetry.d.ts.map +0 -1
- package/lib/stores/LegendStudioTelemetry.js +0 -37
- package/lib/stores/LegendStudioTelemetry.js.map +0 -1
- /package/lib/{stores → application}/LegendStudioApplicationNavigationContext.d.ts +0 -0
- /package/lib/{stores → application}/LegendStudioApplicationNavigationContext.js +0 -0
- /package/lib/{stores → application}/LegendStudioCommand.d.ts +0 -0
- /package/lib/{stores → application}/LegendStudioCommand.js +0 -0
- /package/lib/{stores → application}/LegendStudioDocumentation.d.ts +0 -0
- /package/lib/{stores → application}/LegendStudioDocumentation.js +0 -0
- /package/src/{stores → application}/LegendStudioApplicationNavigationContext.ts +0 -0
- /package/src/{stores → application}/LegendStudioCommand.ts +0 -0
- /package/src/{stores → application}/LegendStudioDocumentation.ts +0 -0
- /package/src/{stores/LegendStudioAppEvent.ts → application/LegendStudioEvent.ts} +0 -0
- /package/src/stores/{LegendStudioCodeSnippets.ts → Core_CodeSnippets.ts} +0 -0
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from '../../data/DataEditorState.js';
|
|
71
71
|
import { createEmbeddedData } from '../../data/EmbeddedDataState.js';
|
|
72
72
|
import type { ServiceTestSuiteState } from './ServiceTestableState.js';
|
|
73
|
-
import {
|
|
73
|
+
import { LegendStudioTelemetryHelper } from '../../../../../application/LegendStudioTelemetryHelper.js';
|
|
74
74
|
|
|
75
75
|
const buildTestDataParameters = (
|
|
76
76
|
rawLambda: RawLambda,
|
|
@@ -146,7 +146,7 @@ export class ConnectionTestDataState {
|
|
|
146
146
|
// NOTE: since we don't have a generic mechanism for test-data generation
|
|
147
147
|
// we will only report metrics around API usage, when we genericize, we will
|
|
148
148
|
// move this out
|
|
149
|
-
|
|
149
|
+
LegendStudioTelemetryHelper.logEvent_TestDataGenerationLaunched(
|
|
150
150
|
this.testDataState.editorStore.applicationStore.telemetryService,
|
|
151
151
|
);
|
|
152
152
|
const report = reportGraphAnalytics(
|
|
@@ -172,7 +172,7 @@ export class ConnectionTestDataState {
|
|
|
172
172
|
// NOTE: since we don't have a generic mechanism for test-data generation
|
|
173
173
|
// we will only report metrics around API usage, when we genericize, we will
|
|
174
174
|
// move this out
|
|
175
|
-
|
|
175
|
+
LegendStudioTelemetryHelper.logEvent_TestDataGenerationSucceeded(
|
|
176
176
|
this.editorStore.applicationStore.telemetryService,
|
|
177
177
|
report,
|
|
178
178
|
);
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
EntityDiffViewerState,
|
|
30
30
|
} from './EntityDiffEditorState.js';
|
|
31
31
|
import { type Entity, extractEntityNameFromPath } from '@finos/legend-storage';
|
|
32
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
32
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../../application/LegendStudioEvent.js';
|
|
33
33
|
import type { PackageableElement } from '@finos/legend-graph';
|
|
34
34
|
import type { EditorState } from '../EditorState.js';
|
|
35
35
|
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
UpdateProjectConfigurationCommand,
|
|
41
41
|
UpdatePlatformConfigurationsCommand,
|
|
42
42
|
} from '@finos/legend-server-sdlc';
|
|
43
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
43
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../../application/LegendStudioEvent.js';
|
|
44
44
|
import { MASTER_SNAPSHOT_ALIAS, ProjectData } from '@finos/legend-server-depot';
|
|
45
45
|
import { ProjectDependencyEditorState } from './ProjectDependencyEditorState.js';
|
|
46
46
|
|
package/src/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
RawProjectDependencyReport,
|
|
39
39
|
} from '@finos/legend-server-depot';
|
|
40
40
|
import type { TreeData, TreeNodeData } from '@finos/legend-art';
|
|
41
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
41
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../../application/LegendStudioEvent.js';
|
|
42
42
|
import type { ProjectConfiguration } from '@finos/legend-server-sdlc';
|
|
43
43
|
|
|
44
44
|
export abstract class ProjectDependencyConflictTreeNodeData
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
generateViewProjectByGAVRoute,
|
|
20
20
|
generateViewRevisionRoute,
|
|
21
21
|
generateViewVersionRoute,
|
|
22
|
-
} from '
|
|
22
|
+
} from '../../application/LegendStudioNavigation.js';
|
|
23
23
|
import { EditorMode } from '../editor/EditorMode.js';
|
|
24
24
|
import type { ProjectViewerStore } from './ProjectViewerStore.js';
|
|
25
25
|
import type { ProjectDependency } from '@finos/legend-server-sdlc';
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
generateViewVersionRoute,
|
|
32
32
|
generateViewRevisionRoute,
|
|
33
33
|
generateViewProjectRoute,
|
|
34
|
-
} from '
|
|
34
|
+
} from '../../application/LegendStudioNavigation.js';
|
|
35
35
|
import {
|
|
36
36
|
type Entity,
|
|
37
37
|
type ProjectGAVCoordinates,
|
|
@@ -46,8 +46,11 @@ import {
|
|
|
46
46
|
Version,
|
|
47
47
|
Workspace,
|
|
48
48
|
} from '@finos/legend-server-sdlc';
|
|
49
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
50
|
-
import {
|
|
49
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../application/LegendStudioEvent.js';
|
|
50
|
+
import {
|
|
51
|
+
LegendApplicationTelemetryHelper,
|
|
52
|
+
TAB_SIZE,
|
|
53
|
+
} from '@finos/legend-application';
|
|
51
54
|
import { ProjectData, resolveVersion } from '@finos/legend-server-depot';
|
|
52
55
|
import {
|
|
53
56
|
type WorkflowManagerState,
|
|
@@ -421,7 +424,7 @@ export class ProjectViewerStore {
|
|
|
421
424
|
.numberOfDependencies,
|
|
422
425
|
graph: graph_buildReport,
|
|
423
426
|
};
|
|
424
|
-
|
|
427
|
+
LegendApplicationTelemetryHelper.logEvent_GraphInitializationSucceeded(
|
|
425
428
|
this.editorStore.applicationStore.telemetryService,
|
|
426
429
|
graphBuilderReportData,
|
|
427
430
|
);
|
|
@@ -472,17 +475,12 @@ export class ProjectViewerStore {
|
|
|
472
475
|
this.editorStore.applicationStore.notificationService.notifyError(
|
|
473
476
|
`Can't build graph. Redirected to text mode for debugging. Error: ${error.message}`,
|
|
474
477
|
);
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
this.editorStore.grammarTextEditorState.setGraphGrammarText(
|
|
482
|
-
editorGrammar,
|
|
483
|
-
),
|
|
484
|
-
);
|
|
485
|
-
} catch {
|
|
478
|
+
yield flowResult(
|
|
479
|
+
this.editorStore.switchModes(GRAPH_EDITOR_MODE.GRAMMAR_TEXT, {
|
|
480
|
+
isGraphBuildFailure: true,
|
|
481
|
+
}),
|
|
482
|
+
);
|
|
483
|
+
if (this.editorStore.graphEditorMode.mode === GRAPH_EDITOR_MODE.FORM) {
|
|
486
484
|
// nothing we can do here so we will just block the user
|
|
487
485
|
this.editorStore.applicationStore.alertService.setBlockingAlert({
|
|
488
486
|
message: `Can't compose Pure code from graph models`,
|
|
@@ -490,15 +488,6 @@ export class ProjectViewerStore {
|
|
|
490
488
|
});
|
|
491
489
|
return false;
|
|
492
490
|
}
|
|
493
|
-
yield flowResult(
|
|
494
|
-
this.editorStore.setGraphEditMode(GRAPH_EDITOR_MODE.GRAMMAR_TEXT),
|
|
495
|
-
);
|
|
496
|
-
yield flowResult(
|
|
497
|
-
this.editorStore.graphState.globalCompileInTextMode({
|
|
498
|
-
ignoreBlocking: true,
|
|
499
|
-
suppressCompilationFailureMessage: true,
|
|
500
|
-
}),
|
|
501
|
-
);
|
|
502
491
|
} else {
|
|
503
492
|
this.editorStore.applicationStore.notificationService.notifyError(
|
|
504
493
|
error,
|
|
@@ -580,7 +569,7 @@ export class ProjectViewerStore {
|
|
|
580
569
|
this.initialEntityPath
|
|
581
570
|
) {
|
|
582
571
|
try {
|
|
583
|
-
this.editorStore.
|
|
572
|
+
this.editorStore.graphEditorMode.openElement(
|
|
584
573
|
this.editorStore.graphManagerState.graph.getElement(
|
|
585
574
|
this.initialEntityPath,
|
|
586
575
|
),
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { action, computed, makeObservable, observable, flow } from 'mobx';
|
|
17
|
+
import type { EditorSDLCState } from '../EditorSDLCState.js';
|
|
18
|
+
import type { EditorStore } from '../EditorStore.js';
|
|
19
|
+
import {
|
|
20
|
+
type PureExecution,
|
|
21
|
+
areMultiplicitiesEqual,
|
|
22
|
+
buildLambdaVariableExpressions,
|
|
23
|
+
generateMultiplicityString,
|
|
24
|
+
Multiplicity,
|
|
25
|
+
VariableExpression,
|
|
26
|
+
ServiceExecutionMode,
|
|
27
|
+
type BulkRegistrationResultFail,
|
|
28
|
+
BulkRegistrationResultSuccess,
|
|
29
|
+
type BulkServiceRegistrationResult,
|
|
30
|
+
} from '@finos/legend-graph';
|
|
31
|
+
import {
|
|
32
|
+
type GeneratorFn,
|
|
33
|
+
ActionState,
|
|
34
|
+
assertNonEmptyString,
|
|
35
|
+
assertTrue,
|
|
36
|
+
filterByType,
|
|
37
|
+
getNullableFirstElement,
|
|
38
|
+
guaranteeNonNullable,
|
|
39
|
+
prettyCONSTName,
|
|
40
|
+
UnsupportedOperationError,
|
|
41
|
+
assertErrorThrown,
|
|
42
|
+
LogEvent,
|
|
43
|
+
} from '@finos/legend-shared';
|
|
44
|
+
import { Version } from '@finos/legend-server-sdlc';
|
|
45
|
+
import { MINIMUM_SERVICE_OWNERS } from '../editor-state/element-editor-state/service/ServiceEditorState.js';
|
|
46
|
+
import { ServiceRegistrationEnvironmentConfig } from '../../application/LegendStudioApplicationConfig.js';
|
|
47
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../application/LegendStudioEvent.js';
|
|
48
|
+
import { generateServiceManagementUrl } from '../editor-state/element-editor-state/service/ServiceRegistrationState.js';
|
|
49
|
+
|
|
50
|
+
export const LATEST_PROJECT_REVISION = 'Latest Project Revision';
|
|
51
|
+
const getServiceExecutionMode = (mode: string): ServiceExecutionMode => {
|
|
52
|
+
switch (mode) {
|
|
53
|
+
case ServiceExecutionMode.FULL_INTERACTIVE:
|
|
54
|
+
return ServiceExecutionMode.FULL_INTERACTIVE;
|
|
55
|
+
case ServiceExecutionMode.SEMI_INTERACTIVE:
|
|
56
|
+
return ServiceExecutionMode.SEMI_INTERACTIVE;
|
|
57
|
+
case ServiceExecutionMode.PROD:
|
|
58
|
+
return ServiceExecutionMode.PROD;
|
|
59
|
+
default:
|
|
60
|
+
throw new UnsupportedOperationError(
|
|
61
|
+
`Encountered unsupported service execution mode '${mode}'`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
interface ServiceVersionOption {
|
|
66
|
+
label: string;
|
|
67
|
+
value: Version | string;
|
|
68
|
+
}
|
|
69
|
+
interface ServiceRegistrationResult {
|
|
70
|
+
successfulServices: string[];
|
|
71
|
+
failedServices: string[];
|
|
72
|
+
serviceLinks: string[];
|
|
73
|
+
}
|
|
74
|
+
export class ServiceConfigState {
|
|
75
|
+
readonly editorStore: EditorStore;
|
|
76
|
+
readonly registrationOptions: ServiceRegistrationEnvironmentConfig[] = [];
|
|
77
|
+
readonly registrationState = ActionState.create();
|
|
78
|
+
registrationResult: ServiceRegistrationResult | undefined;
|
|
79
|
+
serviceEnv?: string | undefined;
|
|
80
|
+
serviceExecutionMode?: ServiceExecutionMode | undefined;
|
|
81
|
+
projectVersion?: Version | string | undefined;
|
|
82
|
+
enableModesWithVersioning: boolean;
|
|
83
|
+
TEMPORARY__useStoreModel = false;
|
|
84
|
+
|
|
85
|
+
constructor(
|
|
86
|
+
editorStore: EditorStore,
|
|
87
|
+
registrationOptions: ServiceRegistrationEnvironmentConfig[],
|
|
88
|
+
enableModesWithVersioning: boolean,
|
|
89
|
+
) {
|
|
90
|
+
makeObservable(this, {
|
|
91
|
+
serviceEnv: observable,
|
|
92
|
+
serviceExecutionMode: observable,
|
|
93
|
+
projectVersion: observable,
|
|
94
|
+
enableModesWithVersioning: observable,
|
|
95
|
+
TEMPORARY__useStoreModel: observable,
|
|
96
|
+
executionModes: computed,
|
|
97
|
+
options: computed,
|
|
98
|
+
versionOptions: computed,
|
|
99
|
+
setServiceEnv: action,
|
|
100
|
+
setServiceExecutionMode: action,
|
|
101
|
+
setProjectVersion: action,
|
|
102
|
+
|
|
103
|
+
setUseStoreModelWithFullInteractive: action,
|
|
104
|
+
initialize: action,
|
|
105
|
+
|
|
106
|
+
updateVersion: action,
|
|
107
|
+
updateType: action,
|
|
108
|
+
updateEnv: action,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
this.editorStore = editorStore;
|
|
112
|
+
this.registrationOptions = registrationOptions;
|
|
113
|
+
this.enableModesWithVersioning = enableModesWithVersioning;
|
|
114
|
+
this.initialize();
|
|
115
|
+
this.registrationState.setMessageFormatter(prettyCONSTName);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
get options(): ServiceRegistrationEnvironmentConfig[] {
|
|
119
|
+
if (this.enableModesWithVersioning) {
|
|
120
|
+
return this.registrationOptions;
|
|
121
|
+
}
|
|
122
|
+
return this.registrationOptions
|
|
123
|
+
.map((_envConfig) => {
|
|
124
|
+
const envConfig = new ServiceRegistrationEnvironmentConfig();
|
|
125
|
+
envConfig.env = _envConfig.env;
|
|
126
|
+
envConfig.executionUrl = _envConfig.executionUrl;
|
|
127
|
+
envConfig.managementUrl = _envConfig.managementUrl;
|
|
128
|
+
// NOTE: For projects that we cannot create a version for, only fully-interactive mode is supported
|
|
129
|
+
envConfig.modes = _envConfig.modes.filter(
|
|
130
|
+
(mode) => mode === ServiceExecutionMode.FULL_INTERACTIVE,
|
|
131
|
+
);
|
|
132
|
+
return envConfig;
|
|
133
|
+
})
|
|
134
|
+
.filter((envConfig) => envConfig.modes.length);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
get executionModes(): ServiceExecutionMode[] {
|
|
138
|
+
return (
|
|
139
|
+
this.options.find((e) => e.env === this.serviceEnv)?.modes ?? []
|
|
140
|
+
).map(getServiceExecutionMode);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
get versionOptions(): ServiceVersionOption[] | undefined {
|
|
144
|
+
if (
|
|
145
|
+
this.enableModesWithVersioning &&
|
|
146
|
+
this.serviceExecutionMode !== ServiceExecutionMode.FULL_INTERACTIVE
|
|
147
|
+
) {
|
|
148
|
+
const options: ServiceVersionOption[] =
|
|
149
|
+
this.editorStore.sdlcState.projectVersions.map((version) => ({
|
|
150
|
+
label: version.id.id,
|
|
151
|
+
value: version,
|
|
152
|
+
}));
|
|
153
|
+
if (this.serviceExecutionMode !== ServiceExecutionMode.PROD) {
|
|
154
|
+
return [
|
|
155
|
+
{
|
|
156
|
+
label: prettyCONSTName(LATEST_PROJECT_REVISION),
|
|
157
|
+
value: LATEST_PROJECT_REVISION,
|
|
158
|
+
},
|
|
159
|
+
...options,
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
return options;
|
|
163
|
+
}
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
setServiceEnv(val: string | undefined): void {
|
|
168
|
+
this.serviceEnv = val;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
setServiceExecutionMode(val: ServiceExecutionMode | undefined): void {
|
|
172
|
+
this.serviceExecutionMode = val;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
setProjectVersion(val: Version | string | undefined): void {
|
|
176
|
+
this.projectVersion = val;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
setUseStoreModelWithFullInteractive(val: boolean): void {
|
|
180
|
+
this.TEMPORARY__useStoreModel = val;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
initialize(): void {
|
|
184
|
+
this.serviceEnv = getNullableFirstElement(this.registrationOptions)?.env;
|
|
185
|
+
this.serviceExecutionMode = this.executionModes[0];
|
|
186
|
+
this.updateVersion();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
updateVersion(): void {
|
|
190
|
+
if (this.serviceExecutionMode === ServiceExecutionMode.SEMI_INTERACTIVE) {
|
|
191
|
+
this.projectVersion = LATEST_PROJECT_REVISION;
|
|
192
|
+
} else if (this.serviceExecutionMode === ServiceExecutionMode.PROD) {
|
|
193
|
+
this.projectVersion = this.editorStore.sdlcState.projectVersions[0];
|
|
194
|
+
} else {
|
|
195
|
+
this.projectVersion = undefined;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
updateType(val: ServiceExecutionMode | undefined): void {
|
|
200
|
+
this.setServiceExecutionMode(val);
|
|
201
|
+
this.updateVersion();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
updateEnv(val: string | undefined): void {
|
|
205
|
+
this.setServiceEnv(val);
|
|
206
|
+
this.setServiceExecutionMode(this.executionModes[0]);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export class BulkServiceRegistrationState {
|
|
211
|
+
editorStore: EditorStore;
|
|
212
|
+
sdlcState: EditorSDLCState;
|
|
213
|
+
serviceConfigState: ServiceConfigState;
|
|
214
|
+
showSuccessModel = false;
|
|
215
|
+
|
|
216
|
+
constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
|
|
217
|
+
makeObservable(this, {
|
|
218
|
+
showSuccessModel: observable,
|
|
219
|
+
editorStore: false,
|
|
220
|
+
sdlcState: false,
|
|
221
|
+
registerServices: flow,
|
|
222
|
+
setSuccessModal: action,
|
|
223
|
+
});
|
|
224
|
+
this.editorStore = editorStore;
|
|
225
|
+
this.sdlcState = sdlcState;
|
|
226
|
+
this.serviceConfigState = new ServiceConfigState(
|
|
227
|
+
editorStore,
|
|
228
|
+
editorStore.applicationStore.config.options.TEMPORARY__serviceRegistrationConfig,
|
|
229
|
+
editorStore.sdlcServerClient.featuresConfigHasBeenFetched &&
|
|
230
|
+
editorStore.sdlcServerClient.features.canCreateVersion,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
setSuccessModal(val: boolean): void {
|
|
234
|
+
this.showSuccessModel = val;
|
|
235
|
+
}
|
|
236
|
+
*registerServices(): GeneratorFn<void> {
|
|
237
|
+
const successfulServices: string[] = [];
|
|
238
|
+
const failedServices: string[] = [];
|
|
239
|
+
const serviceManagementURL: string[] = [];
|
|
240
|
+
|
|
241
|
+
this.serviceConfigState.registrationState.inProgress();
|
|
242
|
+
this.validateServiceForRegistration();
|
|
243
|
+
try {
|
|
244
|
+
const projectConfig = guaranteeNonNullable(
|
|
245
|
+
this.editorStore.projectConfigurationEditorState.projectConfiguration,
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
const versionInput =
|
|
249
|
+
this.serviceConfigState.projectVersion instanceof Version
|
|
250
|
+
? this.serviceConfigState.projectVersion.id.id
|
|
251
|
+
: undefined;
|
|
252
|
+
|
|
253
|
+
const config = guaranteeNonNullable(
|
|
254
|
+
this.serviceConfigState.options.find(
|
|
255
|
+
(info) => info.env === this.serviceConfigState.serviceEnv,
|
|
256
|
+
),
|
|
257
|
+
);
|
|
258
|
+
const serviceRegistrationResult =
|
|
259
|
+
(yield this.editorStore.graphManagerState.graphManager.bulkServiceRegistration(
|
|
260
|
+
this.editorStore.graphManagerState.graph.ownServices,
|
|
261
|
+
this.editorStore.graphManagerState.graph,
|
|
262
|
+
projectConfig.groupId,
|
|
263
|
+
projectConfig.artifactId,
|
|
264
|
+
versionInput,
|
|
265
|
+
config.executionUrl,
|
|
266
|
+
guaranteeNonNullable(this.serviceConfigState.serviceExecutionMode),
|
|
267
|
+
{
|
|
268
|
+
TEMPORARY__useStoreModel:
|
|
269
|
+
this.serviceConfigState.TEMPORARY__useStoreModel,
|
|
270
|
+
},
|
|
271
|
+
)) as BulkServiceRegistrationResult[];
|
|
272
|
+
|
|
273
|
+
serviceRegistrationResult.forEach((result) => {
|
|
274
|
+
if (result instanceof BulkRegistrationResultSuccess) {
|
|
275
|
+
const serviceURL = generateServiceManagementUrl(
|
|
276
|
+
config.managementUrl,
|
|
277
|
+
result.pattern,
|
|
278
|
+
);
|
|
279
|
+
serviceManagementURL.push(serviceURL);
|
|
280
|
+
successfulServices.push(result.pattern);
|
|
281
|
+
} else {
|
|
282
|
+
failedServices.push(
|
|
283
|
+
`${result.servicePath} ERROR: ${
|
|
284
|
+
(result as BulkRegistrationResultFail).errorMessage
|
|
285
|
+
}`,
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
this.serviceConfigState.registrationResult = {
|
|
290
|
+
successfulServices: successfulServices,
|
|
291
|
+
serviceLinks: serviceManagementURL,
|
|
292
|
+
failedServices: failedServices,
|
|
293
|
+
};
|
|
294
|
+
this.showSuccessModel = true;
|
|
295
|
+
} catch (error) {
|
|
296
|
+
assertErrorThrown(error);
|
|
297
|
+
this.editorStore.applicationStore.logService.error(
|
|
298
|
+
LogEvent.create(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_FAILURE),
|
|
299
|
+
error,
|
|
300
|
+
);
|
|
301
|
+
this.editorStore.applicationStore.notificationService.notifyError(error);
|
|
302
|
+
} finally {
|
|
303
|
+
this.serviceConfigState.registrationState.reset();
|
|
304
|
+
this.serviceConfigState.registrationState.setMessage(undefined);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
validateServiceForRegistration(): void {
|
|
309
|
+
const services = this.editorStore.graphManagerState.graph.ownServices;
|
|
310
|
+
|
|
311
|
+
services.forEach((service) => {
|
|
312
|
+
service.owners.forEach((owner) =>
|
|
313
|
+
assertNonEmptyString(owner, `Service can't have an empty owner name`),
|
|
314
|
+
);
|
|
315
|
+
assertTrue(
|
|
316
|
+
service.owners.length >= MINIMUM_SERVICE_OWNERS,
|
|
317
|
+
`Service needs to have at least 2 owners in order to be registered`,
|
|
318
|
+
);
|
|
319
|
+
guaranteeNonNullable(
|
|
320
|
+
this.serviceConfigState.serviceEnv,
|
|
321
|
+
'Service registration environment can not be empty',
|
|
322
|
+
);
|
|
323
|
+
guaranteeNonNullable(
|
|
324
|
+
this.serviceConfigState.serviceExecutionMode,
|
|
325
|
+
'Service type can not be empty',
|
|
326
|
+
);
|
|
327
|
+
if (
|
|
328
|
+
this.serviceConfigState.serviceExecutionMode ===
|
|
329
|
+
ServiceExecutionMode.PROD ||
|
|
330
|
+
this.serviceConfigState.serviceExecutionMode ===
|
|
331
|
+
ServiceExecutionMode.SEMI_INTERACTIVE
|
|
332
|
+
) {
|
|
333
|
+
guaranteeNonNullable(
|
|
334
|
+
this.serviceConfigState.projectVersion,
|
|
335
|
+
'Service version can not be empty in Semi-interactive and Prod service type',
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// validate service parameter multiplicities
|
|
340
|
+
const SUPPORTED_SERVICE_PARAMETER_MULTIPLICITIES = [
|
|
341
|
+
Multiplicity.ONE,
|
|
342
|
+
Multiplicity.ZERO_MANY,
|
|
343
|
+
Multiplicity.ZERO_ONE,
|
|
344
|
+
];
|
|
345
|
+
const invalidParams = buildLambdaVariableExpressions(
|
|
346
|
+
(service.execution as PureExecution).func,
|
|
347
|
+
this.editorStore.graphManagerState,
|
|
348
|
+
)
|
|
349
|
+
.filter(filterByType(VariableExpression))
|
|
350
|
+
.filter(
|
|
351
|
+
(p) =>
|
|
352
|
+
!SUPPORTED_SERVICE_PARAMETER_MULTIPLICITIES.some((m) =>
|
|
353
|
+
areMultiplicitiesEqual(m, p.multiplicity),
|
|
354
|
+
),
|
|
355
|
+
);
|
|
356
|
+
assertTrue(
|
|
357
|
+
invalidParams.length === 0,
|
|
358
|
+
`Parameter(s)${invalidParams.map(
|
|
359
|
+
(p) =>
|
|
360
|
+
` ${p.name}: [${generateMultiplicityString(
|
|
361
|
+
p.multiplicity.lowerBound,
|
|
362
|
+
p.multiplicity.upperBound,
|
|
363
|
+
)}]`,
|
|
364
|
+
)} has/have unsupported multiplicity. Supported multiplicities include ${SUPPORTED_SERVICE_PARAMETER_MULTIPLICITIES.map(
|
|
365
|
+
(m) => ` [${generateMultiplicityString(m.lowerBound, m.upperBound)}]`,
|
|
366
|
+
)}.`,
|
|
367
|
+
);
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}
|
|
@@ -54,8 +54,9 @@ import {
|
|
|
54
54
|
EntityDiff,
|
|
55
55
|
EntityChange,
|
|
56
56
|
Revision,
|
|
57
|
+
EntityChangeType,
|
|
57
58
|
} from '@finos/legend-server-sdlc';
|
|
58
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
59
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../application/LegendStudioEvent.js';
|
|
59
60
|
import { WorkspaceSyncState } from './WorkspaceSyncState.js';
|
|
60
61
|
import { ACTIVITY_MODE } from '../EditorConfig.js';
|
|
61
62
|
import { EntityChangeConflictEditorState } from '../editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js';
|
|
@@ -213,7 +214,7 @@ export abstract class LocalChangesState {
|
|
|
213
214
|
const content = JSON.stringify(
|
|
214
215
|
{
|
|
215
216
|
message: '', // TODO?
|
|
216
|
-
entityChanges: this.
|
|
217
|
+
entityChanges: this.computeLocalEntityChanges(),
|
|
217
218
|
revisionId: this.sdlcState.activeRevision.id,
|
|
218
219
|
},
|
|
219
220
|
undefined,
|
|
@@ -226,7 +227,7 @@ export abstract class LocalChangesState {
|
|
|
226
227
|
if (this.hasUnpushedChanges) {
|
|
227
228
|
this.editorStore.applicationStore.alertService.setActionAlertInfo({
|
|
228
229
|
message:
|
|
229
|
-
'Unsaved changes
|
|
230
|
+
'Unsaved changes will be lost if you continue. Do you still want to proceed?',
|
|
230
231
|
type: ActionAlertType.CAUTION,
|
|
231
232
|
actions: [
|
|
232
233
|
{
|
|
@@ -262,7 +263,7 @@ export abstract class LocalChangesState {
|
|
|
262
263
|
this.sdlcState.activeRemoteWorkspaceRevision.id
|
|
263
264
|
) {
|
|
264
265
|
if (this.sdlcState.isWorkspaceOutOfSync) {
|
|
265
|
-
this.
|
|
266
|
+
this.workspaceSyncState.fetchIncomingRevisions();
|
|
266
267
|
const remoteWorkspaceEntities =
|
|
267
268
|
(yield this.editorStore.sdlcServerClient.getEntitiesByRevision(
|
|
268
269
|
this.sdlcState.activeProject.projectId,
|
|
@@ -310,14 +311,14 @@ export abstract class LocalChangesState {
|
|
|
310
311
|
|
|
311
312
|
abstract processConflicts(): GeneratorFn<void>;
|
|
312
313
|
|
|
313
|
-
abstract getLocalChanges(): EntityChange[];
|
|
314
|
-
|
|
315
314
|
abstract getCurrentHashIndexes(): Map<string, string>;
|
|
316
315
|
|
|
317
316
|
abstract stopChangeDetection(): void;
|
|
318
317
|
|
|
319
318
|
abstract restartChangeDetection(): GeneratorFn<void>;
|
|
320
319
|
|
|
320
|
+
abstract computeLocalEntityChanges(): EntityChange[];
|
|
321
|
+
|
|
321
322
|
*pushLocalChanges(pushMessage?: string): GeneratorFn<void> {
|
|
322
323
|
if (
|
|
323
324
|
this.pushChangesState.isInProgress ||
|
|
@@ -330,7 +331,7 @@ export abstract class LocalChangesState {
|
|
|
330
331
|
|
|
331
332
|
this.pushChangesState.inProgress();
|
|
332
333
|
const startTime = Date.now();
|
|
333
|
-
const localChanges = this.
|
|
334
|
+
const localChanges = this.computeLocalEntityChanges();
|
|
334
335
|
if (!localChanges.length) {
|
|
335
336
|
this.pushChangesState.complete();
|
|
336
337
|
return;
|
|
@@ -374,9 +375,9 @@ export abstract class LocalChangesState {
|
|
|
374
375
|
default: true,
|
|
375
376
|
handler: (): void => {
|
|
376
377
|
this.editorStore.setActiveActivity(ACTIVITY_MODE.LOCAL_CHANGES);
|
|
377
|
-
flowResult(
|
|
378
|
-
this.editorStore.
|
|
379
|
-
)
|
|
378
|
+
flowResult(this.workspaceSyncState.pullChanges()).catch(
|
|
379
|
+
this.editorStore.applicationStore.alertUnhandledError,
|
|
380
|
+
);
|
|
380
381
|
},
|
|
381
382
|
},
|
|
382
383
|
{
|
|
@@ -749,8 +750,48 @@ export class FormLocalChangesState extends LocalChangesState {
|
|
|
749
750
|
}
|
|
750
751
|
}
|
|
751
752
|
|
|
752
|
-
|
|
753
|
-
|
|
753
|
+
/**
|
|
754
|
+
* Get entitiy changes to prepare for syncing
|
|
755
|
+
*/
|
|
756
|
+
computeLocalEntityChanges(): EntityChange[] {
|
|
757
|
+
const baseHashesIndex = this.editorStore.isInConflictResolutionMode
|
|
758
|
+
? this.editorStore.changeDetectionState
|
|
759
|
+
.conflictResolutionHeadRevisionState.entityHashesIndex
|
|
760
|
+
: this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
|
|
761
|
+
.entityHashesIndex;
|
|
762
|
+
const originalPaths = new Set(Array.from(baseHashesIndex.keys()));
|
|
763
|
+
const entityChanges: EntityChange[] = [];
|
|
764
|
+
this.editorStore.graphManagerState.graph.allOwnElements.forEach(
|
|
765
|
+
(element) => {
|
|
766
|
+
const elementPath = element.path;
|
|
767
|
+
if (baseHashesIndex.get(elementPath) !== element.hashCode) {
|
|
768
|
+
const entity =
|
|
769
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
|
770
|
+
element,
|
|
771
|
+
{
|
|
772
|
+
pruneSourceInformation: true,
|
|
773
|
+
},
|
|
774
|
+
);
|
|
775
|
+
entityChanges.push({
|
|
776
|
+
classifierPath: entity.classifierPath,
|
|
777
|
+
entityPath: element.path,
|
|
778
|
+
content: entity.content,
|
|
779
|
+
type:
|
|
780
|
+
baseHashesIndex.get(elementPath) !== undefined
|
|
781
|
+
? EntityChangeType.MODIFY
|
|
782
|
+
: EntityChangeType.CREATE,
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
originalPaths.delete(elementPath);
|
|
786
|
+
},
|
|
787
|
+
);
|
|
788
|
+
Array.from(originalPaths).forEach((path) => {
|
|
789
|
+
entityChanges.push({
|
|
790
|
+
type: EntityChangeType.DELETE,
|
|
791
|
+
entityPath: path,
|
|
792
|
+
});
|
|
793
|
+
});
|
|
794
|
+
return entityChanges;
|
|
754
795
|
}
|
|
755
796
|
|
|
756
797
|
getCurrentHashIndexes(): Map<string, string> {
|
|
@@ -814,10 +855,6 @@ export class TextLocalChangesState extends LocalChangesState {
|
|
|
814
855
|
return;
|
|
815
856
|
}
|
|
816
857
|
|
|
817
|
-
getLocalChanges(): EntityChange[] {
|
|
818
|
-
return this.localChanges;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
858
|
getCurrentHashIndexes(): Map<string, string> {
|
|
822
859
|
return this.editorStore.changeDetectionState
|
|
823
860
|
.workspaceLocalLatestRevisionState.currentEntityHashesIndex;
|
|
@@ -827,6 +864,10 @@ export class TextLocalChangesState extends LocalChangesState {
|
|
|
827
864
|
this.localChanges = [];
|
|
828
865
|
}
|
|
829
866
|
|
|
867
|
+
computeLocalEntityChanges(): EntityChange[] {
|
|
868
|
+
return this.localChanges;
|
|
869
|
+
}
|
|
870
|
+
|
|
830
871
|
*restartChangeDetection(): GeneratorFn<void> {
|
|
831
872
|
this.editorStore.changeDetectionState.computeLocalChangesInTextMode(
|
|
832
873
|
this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
LogEvent,
|
|
25
25
|
getNullableFirstElement,
|
|
26
26
|
} from '@finos/legend-shared';
|
|
27
|
-
import { generateSetupRoute } from '
|
|
27
|
+
import { generateSetupRoute } from '../../application/LegendStudioNavigation.js';
|
|
28
28
|
import {
|
|
29
29
|
type NewVersionType,
|
|
30
30
|
CreateVersionCommand,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
Review,
|
|
37
37
|
areWorkspacesEquivalent,
|
|
38
38
|
} from '@finos/legend-server-sdlc';
|
|
39
|
-
import { LEGEND_STUDIO_APP_EVENT } from '
|
|
39
|
+
import { LEGEND_STUDIO_APP_EVENT } from '../../application/LegendStudioEvent.js';
|
|
40
40
|
import { ProjectDependantEditorState } from './ProjectDependantEditorState.js';
|
|
41
41
|
import {
|
|
42
42
|
ProjectData,
|