@finos/legend-application-studio 13.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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/application/LegendStudio.d.ts +26 -0
- package/lib/application/LegendStudio.d.ts.map +1 -0
- package/lib/application/LegendStudio.js +60 -0
- package/lib/application/LegendStudio.js.map +1 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts +72 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -0
- package/lib/application/LegendStudioApplicationConfig.js +79 -0
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -0
- package/lib/application/LegendStudioPluginManager.d.ts +33 -0
- package/lib/application/LegendStudioPluginManager.d.ts.map +1 -0
- package/lib/application/LegendStudioPluginManager.js +54 -0
- package/lib/application/LegendStudioPluginManager.js.map +1 -0
- package/lib/components/Core_LegendStudioApplicationPlugin.d.ts +25 -0
- package/lib/components/Core_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_LegendStudioApplicationPlugin.js +79 -0
- package/lib/components/Core_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/DSLExternalFormat_CodeSnippets.d.ts +21 -0
- package/lib/components/DSLExternalFormat_CodeSnippets.d.ts.map +1 -0
- package/lib/components/DSLExternalFormat_CodeSnippets.js +74 -0
- package/lib/components/DSLExternalFormat_CodeSnippets.js.map +1 -0
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts +41 -0
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js +289 -0
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/DSLExternalFormat_LegendStudioDocumentation.d.ts +21 -0
- package/lib/components/DSLExternalFormat_LegendStudioDocumentation.d.ts.map +1 -0
- package/lib/components/DSLExternalFormat_LegendStudioDocumentation.js +22 -0
- package/lib/components/DSLExternalFormat_LegendStudioDocumentation.js.map +1 -0
- package/lib/components/EditorComponentTestUtils.d.ts +129 -0
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -0
- package/lib/components/EditorComponentTestUtils.js +250 -0
- package/lib/components/EditorComponentTestUtils.js.map +1 -0
- package/lib/components/LegendStudioAppInfo.d.ts +21 -0
- package/lib/components/LegendStudioAppInfo.d.ts.map +1 -0
- package/lib/components/LegendStudioAppInfo.js +106 -0
- package/lib/components/LegendStudioAppInfo.js.map +1 -0
- package/lib/components/LegendStudioApplication.d.ts +28 -0
- package/lib/components/LegendStudioApplication.d.ts.map +1 -0
- package/lib/components/LegendStudioApplication.js +80 -0
- package/lib/components/LegendStudioApplication.js.map +1 -0
- package/lib/components/LegendStudioBaseStoreProvider.d.ts +25 -0
- package/lib/components/LegendStudioBaseStoreProvider.d.ts.map +1 -0
- package/lib/components/LegendStudioBaseStoreProvider.js +34 -0
- package/lib/components/LegendStudioBaseStoreProvider.js.map +1 -0
- package/lib/components/LegendStudioTestID.d.ts +47 -0
- package/lib/components/LegendStudioTestID.d.ts.map +1 -0
- package/lib/components/LegendStudioTestID.js +52 -0
- package/lib/components/LegendStudioTestID.js.map +1 -0
- package/lib/components/editor/ActivityBar.d.ts +28 -0
- package/lib/components/editor/ActivityBar.d.ts.map +1 -0
- package/lib/components/editor/ActivityBar.js +166 -0
- package/lib/components/editor/ActivityBar.js.map +1 -0
- package/lib/components/editor/Editor.d.ts +18 -0
- package/lib/components/editor/Editor.d.ts.map +1 -0
- package/lib/components/editor/Editor.js +176 -0
- package/lib/components/editor/Editor.js.map +1 -0
- package/lib/components/editor/EditorStoreProvider.d.ts +23 -0
- package/lib/components/editor/EditorStoreProvider.d.ts.map +1 -0
- package/lib/components/editor/EditorStoreProvider.js +39 -0
- package/lib/components/editor/EditorStoreProvider.js.map +1 -0
- package/lib/components/editor/StatusBar.d.ts +22 -0
- package/lib/components/editor/StatusBar.d.ts.map +1 -0
- package/lib/components/editor/StatusBar.js +145 -0
- package/lib/components/editor/StatusBar.js.map +1 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +20 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js +58 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -0
- package/lib/components/editor/aux-panel/Console.d.ts +20 -0
- package/lib/components/editor/aux-panel/Console.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/Console.js +21 -0
- package/lib/components/editor/aux-panel/Console.js.map +1 -0
- package/lib/components/editor/aux-panel/DevTool.d.ts +20 -0
- package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/DevTool.js +35 -0
- package/lib/components/editor/aux-panel/DevTool.js.map +1 -0
- package/lib/components/editor/command/project-search.css +1 -0
- package/lib/components/editor/command/project-search.css.map +1 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts +20 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.js +60 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -0
- package/lib/components/editor/edit-panel/EditPanel.d.ts +22 -0
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/EditPanel.js +212 -0
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -0
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts +20 -0
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/FileGenerationViewer.js +32 -0
- package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -0
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts +36 -0
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/FunctionEditor.js +278 -0
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +216 -0
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +892 -0
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/ModelLoader.d.ts +20 -0
- package/lib/components/editor/edit-panel/ModelLoader.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/ModelLoader.js +96 -0
- package/lib/components/editor/edit-panel/ModelLoader.js.map +1 -0
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +43 -0
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/RuntimeEditor.js +364 -0
- package/lib/components/editor/edit-panel/RuntimeEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js +38 -0
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +28 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +75 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +31 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +123 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +24 -0
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.js +26 -0
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +66 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +321 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +34 -0
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +104 -0
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts +38 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +89 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +24 -0
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +69 -0
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +31 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +449 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +31 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js +71 -0
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +25 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +71 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +23 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js +44 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts +65 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +398 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js +146 -0
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts +22 -0
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.js +57 -0
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts +31 -0
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.js +66 -0
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +153 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +36 -0
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.js +131 -0
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +33 -0
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +166 -0
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +140 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataRecordTypeTree.d.ts +22 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataRecordTypeTree.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataRecordTypeTree.js +78 -0
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataRecordTypeTree.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +30 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +270 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +38 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +118 -0
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.d.ts +21 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +115 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +65 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +266 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.d.ts +34 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +214 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +70 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +238 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts +37 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +157 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +20 -0
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +152 -0
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +24 -0
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js +100 -0
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +27 -0
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.js +149 -0
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +167 -0
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +134 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.d.ts +45 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js +205 -0
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js.map +1 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +221 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +27 -0
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js +57 -0
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +127 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +33 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +277 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +24 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +111 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js +94 -0
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +33 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +143 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +37 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +61 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +15 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js +179 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js +109 -0
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +188 -0
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +31 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +521 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +206 -0
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js +84 -0
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +25 -0
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js +92 -0
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts +26 -0
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +58 -0
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +69 -0
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +20 -0
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.js +31 -0
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.js.map +1 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +22 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.js +285 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -0
- package/lib/components/editor/side-bar/Explorer.d.ts +20 -0
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -0
- package/lib/components/editor/side-bar/Explorer.js +319 -0
- package/lib/components/editor/side-bar/Explorer.js.map +1 -0
- package/lib/components/editor/side-bar/LocalChanges.d.ts +20 -0
- package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -0
- package/lib/components/editor/side-bar/LocalChanges.js +113 -0
- package/lib/components/editor/side-bar/LocalChanges.js.map +1 -0
- package/lib/components/editor/side-bar/ProjectOverview.d.ts +23 -0
- package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -0
- package/lib/components/editor/side-bar/ProjectOverview.js +230 -0
- package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -0
- package/lib/components/editor/side-bar/SideBar.d.ts +23 -0
- package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -0
- package/lib/components/editor/side-bar/SideBar.js +57 -0
- package/lib/components/editor/side-bar/SideBar.js.map +1 -0
- package/lib/components/editor/side-bar/WorkflowManager.d.ts +23 -0
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -0
- package/lib/components/editor/side-bar/WorkflowManager.js +161 -0
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts +23 -0
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceReview.js +146 -0
- package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +20 -0
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.js +79 -0
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.js.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +20 -0
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.js +70 -0
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.js.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +20 -0
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -0
- package/lib/components/editor/side-bar/WorkspaceUpdater.js +103 -0
- package/lib/components/editor/side-bar/WorkspaceUpdater.js.map +1 -0
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +24 -0
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -0
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +129 -0
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -0
- package/lib/components/project-viewer/ProjectViewer.d.ts +18 -0
- package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -0
- package/lib/components/project-viewer/ProjectViewer.js +166 -0
- package/lib/components/project-viewer/ProjectViewer.js.map +1 -0
- package/lib/components/project-viewer/ProjectViewerStoreProvider.d.ts +23 -0
- package/lib/components/project-viewer/ProjectViewerStoreProvider.d.ts.map +1 -0
- package/lib/components/project-viewer/ProjectViewerStoreProvider.js +36 -0
- package/lib/components/project-viewer/ProjectViewerStoreProvider.js.map +1 -0
- package/lib/components/shared/DiffView.d.ts +35 -0
- package/lib/components/shared/DiffView.d.ts.map +1 -0
- package/lib/components/shared/DiffView.js +94 -0
- package/lib/components/shared/DiffView.js.map +1 -0
- package/lib/components/shared/ElementIconUtils.d.ts +21 -0
- package/lib/components/shared/ElementIconUtils.d.ts.map +1 -0
- package/lib/components/shared/ElementIconUtils.js +96 -0
- package/lib/components/shared/ElementIconUtils.js.map +1 -0
- package/lib/components/shared/MultiplicityBadge.d.ts +21 -0
- package/lib/components/shared/MultiplicityBadge.d.ts.map +1 -0
- package/lib/components/shared/MultiplicityBadge.js +25 -0
- package/lib/components/shared/MultiplicityBadge.js.map +1 -0
- package/lib/components/shared/StudioLambdaEditor.d.ts +40 -0
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -0
- package/lib/components/shared/StudioLambdaEditor.js +50 -0
- package/lib/components/shared/StudioLambdaEditor.js.map +1 -0
- package/lib/components/shared/StudioTextInputEditor.d.ts +28 -0
- package/lib/components/shared/StudioTextInputEditor.d.ts.map +1 -0
- package/lib/components/shared/StudioTextInputEditor.js +36 -0
- package/lib/components/shared/StudioTextInputEditor.js.map +1 -0
- package/lib/components/shared/TypeTree.d.ts +22 -0
- package/lib/components/shared/TypeTree.d.ts.map +1 -0
- package/lib/components/shared/TypeTree.js +165 -0
- package/lib/components/shared/TypeTree.js.map +1 -0
- package/lib/components/workspace-review/WorkspaceReview.d.ts +18 -0
- package/lib/components/workspace-review/WorkspaceReview.d.ts.map +1 -0
- package/lib/components/workspace-review/WorkspaceReview.js +84 -0
- package/lib/components/workspace-review/WorkspaceReview.js.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +20 -0
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewPanel.js +57 -0
- package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +20 -0
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js +106 -0
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.d.ts +22 -0
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.d.ts.map +1 -0
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.js +34 -0
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.js.map +1 -0
- package/lib/components/workspace-setup/ProjectCreateModal.d.ts +20 -0
- package/lib/components/workspace-setup/ProjectCreateModal.d.ts.map +1 -0
- package/lib/components/workspace-setup/ProjectCreateModal.js +203 -0
- package/lib/components/workspace-setup/ProjectCreateModal.js.map +1 -0
- package/lib/components/workspace-setup/ProjectSelector.d.ts +22 -0
- package/lib/components/workspace-setup/ProjectSelector.d.ts.map +1 -0
- package/lib/components/workspace-setup/ProjectSelector.js +65 -0
- package/lib/components/workspace-setup/ProjectSelector.js.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSelector.d.ts +22 -0
- package/lib/components/workspace-setup/WorkspaceSelector.d.ts.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSelector.js +57 -0
- package/lib/components/workspace-setup/WorkspaceSelector.js.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts +18 -0
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSetup.js +155 -0
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSetupStoreProvider.d.ts +23 -0
- package/lib/components/workspace-setup/WorkspaceSetupStoreProvider.d.ts.map +1 -0
- package/lib/components/workspace-setup/WorkspaceSetupStoreProvider.js +34 -0
- package/lib/components/workspace-setup/WorkspaceSetupStoreProvider.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +70 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +75 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +101 -0
- package/lib/stores/AbstractConflictResolutionState.d.ts +39 -0
- package/lib/stores/AbstractConflictResolutionState.d.ts.map +1 -0
- package/lib/stores/AbstractConflictResolutionState.js +32 -0
- package/lib/stores/AbstractConflictResolutionState.js.map +1 -0
- package/lib/stores/ChangeDetectionEvent.d.ts +29 -0
- package/lib/stores/ChangeDetectionEvent.d.ts.map +1 -0
- package/lib/stores/ChangeDetectionEvent.js +31 -0
- package/lib/stores/ChangeDetectionEvent.js.map +1 -0
- package/lib/stores/ChangeDetectionState.d.ts +211 -0
- package/lib/stores/ChangeDetectionState.d.ts.map +1 -0
- package/lib/stores/ChangeDetectionState.js +523 -0
- package/lib/stores/ChangeDetectionState.js.map +1 -0
- package/lib/stores/DSLData_LegendStudioApplicationPlugin_Extension.d.ts +51 -0
- package/lib/stores/DSLData_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/DSLData_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/DSLData_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/DSLGenerationSpecification_LegendStudioApplicationPlugin_Extension.d.ts +42 -0
- package/lib/stores/DSLGenerationSpecification_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/DSLGenerationSpecification_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/DSLGenerationSpecification_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts +138 -0
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts +35 -0
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/EditorConfig.d.ts +75 -0
- package/lib/stores/EditorConfig.d.ts.map +1 -0
- package/lib/stores/EditorConfig.js +81 -0
- package/lib/stores/EditorConfig.js.map +1 -0
- package/lib/stores/EditorGraphState.d.ts +133 -0
- package/lib/stores/EditorGraphState.d.ts.map +1 -0
- package/lib/stores/EditorGraphState.js +848 -0
- package/lib/stores/EditorGraphState.js.map +1 -0
- package/lib/stores/EditorSDLCState.d.ts +59 -0
- package/lib/stores/EditorSDLCState.d.ts.map +1 -0
- package/lib/stores/EditorSDLCState.js +245 -0
- package/lib/stores/EditorSDLCState.js.map +1 -0
- package/lib/stores/EditorStore.d.ts +174 -0
- package/lib/stores/EditorStore.d.ts.map +1 -0
- package/lib/stores/EditorStore.js +992 -0
- package/lib/stores/EditorStore.js.map +1 -0
- package/lib/stores/EditorStoreTestUtils.d.ts +21 -0
- package/lib/stores/EditorStoreTestUtils.d.ts.map +1 -0
- package/lib/stores/EditorStoreTestUtils.js +54 -0
- package/lib/stores/EditorStoreTestUtils.js.map +1 -0
- package/lib/stores/ExplorerTreeState.d.ts +67 -0
- package/lib/stores/ExplorerTreeState.d.ts.map +1 -0
- package/lib/stores/ExplorerTreeState.js +271 -0
- package/lib/stores/ExplorerTreeState.js.map +1 -0
- package/lib/stores/LegendStudioAppEvent.d.ts +29 -0
- package/lib/stores/LegendStudioAppEvent.d.ts.map +1 -0
- package/lib/stores/LegendStudioAppEvent.js +34 -0
- package/lib/stores/LegendStudioAppEvent.js.map +1 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.d.ts +38 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.d.ts.map +1 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.js +41 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.js.map +1 -0
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +218 -0
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/stores/LegendStudioApplicationPlugin.js +27 -0
- package/lib/stores/LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/stores/LegendStudioBaseStore.d.ts +38 -0
- package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -0
- package/lib/stores/LegendStudioBaseStore.js +159 -0
- package/lib/stores/LegendStudioBaseStore.js.map +1 -0
- package/lib/stores/LegendStudioCodeSnippets.d.ts +43 -0
- package/lib/stores/LegendStudioCodeSnippets.d.ts.map +1 -0
- package/lib/stores/LegendStudioCodeSnippets.js +307 -0
- package/lib/stores/LegendStudioCodeSnippets.js.map +1 -0
- package/lib/stores/LegendStudioDocumentation.d.ts +63 -0
- package/lib/stores/LegendStudioDocumentation.d.ts.map +1 -0
- package/lib/stores/LegendStudioDocumentation.js +73 -0
- package/lib/stores/LegendStudioDocumentation.js.map +1 -0
- package/lib/stores/LegendStudioEventService.d.ts +23 -0
- package/lib/stores/LegendStudioEventService.d.ts.map +1 -0
- package/lib/stores/LegendStudioEventService.js +29 -0
- package/lib/stores/LegendStudioEventService.js.map +1 -0
- package/lib/stores/LegendStudioRouter.d.ts +76 -0
- package/lib/stores/LegendStudioRouter.d.ts.map +1 -0
- package/lib/stores/LegendStudioRouter.js +119 -0
- package/lib/stores/LegendStudioRouter.js.map +1 -0
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts +61 -0
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/aux-panel-state/DevToolState.d.ts +21 -0
- package/lib/stores/aux-panel-state/DevToolState.d.ts.map +1 -0
- package/lib/stores/aux-panel-state/DevToolState.js +24 -0
- package/lib/stores/aux-panel-state/DevToolState.js.map +1 -0
- package/lib/stores/editor/EditorMode.d.ts +22 -0
- package/lib/stores/editor/EditorMode.d.ts.map +1 -0
- package/lib/stores/editor/EditorMode.js +18 -0
- package/lib/stores/editor/EditorMode.js.map +1 -0
- package/lib/stores/editor/NewElementState.d.ts +125 -0
- package/lib/stores/editor/NewElementState.d.ts.map +1 -0
- package/lib/stores/editor/NewElementState.js +553 -0
- package/lib/stores/editor/NewElementState.js.map +1 -0
- package/lib/stores/editor/StandardEditorMode.d.ts +23 -0
- package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -0
- package/lib/stores/editor/StandardEditorMode.js +28 -0
- package/lib/stores/editor/StandardEditorMode.js.map +1 -0
- package/lib/stores/editor-state/EditorState.d.ts +26 -0
- package/lib/stores/editor-state/EditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/EditorState.js +27 -0
- package/lib/stores/editor-state/EditorState.js.map +1 -0
- package/lib/stores/editor-state/ExternalFormatState.d.ts +42 -0
- package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -0
- package/lib/stores/editor-state/ExternalFormatState.js +74 -0
- package/lib/stores/editor-state/ExternalFormatState.js.map +1 -0
- package/lib/stores/editor-state/FileGenerationState.d.ts +44 -0
- package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -0
- package/lib/stores/editor-state/FileGenerationState.js +217 -0
- package/lib/stores/editor-state/FileGenerationState.js.map +1 -0
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts +27 -0
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -0
- package/lib/stores/editor-state/FileGenerationViewerState.js +52 -0
- package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -0
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts +40 -0
- package/lib/stores/editor-state/GenerationSpecificationEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js +73 -0
- package/lib/stores/editor-state/GenerationSpecificationEditorState.js.map +1 -0
- package/lib/stores/editor-state/GrammarTextEditorState.d.ts +31 -0
- package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/GrammarTextEditorState.js +143 -0
- package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -0
- package/lib/stores/editor-state/GraphGenerationState.d.ts +74 -0
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -0
- package/lib/stores/editor-state/GraphGenerationState.js +349 -0
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -0
- package/lib/stores/editor-state/ModelLoaderState.d.ts +52 -0
- package/lib/stores/editor-state/ModelLoaderState.d.ts.map +1 -0
- package/lib/stores/editor-state/ModelLoaderState.js +199 -0
- package/lib/stores/editor-state/ModelLoaderState.js.map +1 -0
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts +53 -0
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js +191 -0
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -0
- package/lib/stores/editor-state/UnsupportedElementEditorState.d.ts +22 -0
- package/lib/stores/editor-state/UnsupportedElementEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/UnsupportedElementEditorState.js +22 -0
- package/lib/stores/editor-state/UnsupportedElementEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts +31 -0
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.js +88 -0
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ClassState.d.ts +59 -0
- package/lib/stores/editor-state/element-editor-state/ClassState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ClassState.js +271 -0
- package/lib/stores/editor-state/element-editor-state/ClassState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +43 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +104 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts +30 -0
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +69 -0
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/FileGenerationEditorState.d.ts +27 -0
- package/lib/stores/editor-state/element-editor-state/FileGenerationEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/FileGenerationEditorState.js +43 -0
- package/lib/stores/editor-state/element-editor-state/FileGenerationEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts +46 -0
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js +156 -0
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.d.ts +115 -0
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js +522 -0
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/UMLEditorState.d.ts +35 -0
- package/lib/stores/editor-state/element-editor-state/UMLEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/UMLEditorState.js +69 -0
- package/lib/stores/editor-state/element-editor-state/UMLEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +92 -0
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +339 -0
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +76 -0
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.js +422 -0
- package/lib/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/data/DataEditorState.d.ts +47 -0
- package/lib/stores/editor-state/element-editor-state/data/DataEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/data/DataEditorState.js +65 -0
- package/lib/stores/editor-state/element-editor-state/data/DataEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +80 -0
- package/lib/stores/editor-state/element-editor-state/data/EmbeddedDataState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/data/EmbeddedDataState.js +254 -0
- package/lib/stores/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/external-format/BindingEditorState.d.ts +30 -0
- package/lib/stores/editor-state/element-editor-state/external-format/BindingEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/external-format/BindingEditorState.js +47 -0
- package/lib/stores/editor-state/element-editor-state/external-format/BindingEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.d.ts +68 -0
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.js +277 -0
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts +71 -0
- package/lib/stores/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js +236 -0
- package/lib/stores/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +111 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +888 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementDecorator.d.ts +65 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementDecorator.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementDecorator.js +389 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementDecorator.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.d.ts +46 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.js +73 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingElementState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +101 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +448 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +123 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +461 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts +55 -0
- package/lib/stores/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js +235 -0
- package/lib/stores/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/UnsupportedInstanceSetImplementationState.d.ts +22 -0
- package/lib/stores/editor-state/element-editor-state/mapping/UnsupportedInstanceSetImplementationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/UnsupportedInstanceSetImplementationState.js +25 -0
- package/lib/stores/editor-state/element-editor-state/mapping/UnsupportedInstanceSetImplementationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.d.ts +19 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js +108 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts +69 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js +225 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts +41 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +76 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +158 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +566 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +55 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +207 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceTestRunnerState.d.ts +23 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceTestRunnerState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceTestRunnerState.js +24 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceTestRunnerState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +63 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +235 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +81 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +277 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +54 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestableState.js +208 -0
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.d.ts +86 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js +230 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestableEditorState.d.ts +55 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestableEditorState.js +140 -0
- package/lib/stores/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.d.ts +92 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js +383 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts +28 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.js +43 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.js.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts +68 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts.map +1 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js +172 -0
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -0
- package/lib/stores/graphModifier/DSLData_GraphModifierHelper.d.ts +27 -0
- package/lib/stores/graphModifier/DSLData_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DSLData_GraphModifierHelper.js +50 -0
- package/lib/stores/graphModifier/DSLData_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.d.ts +33 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.js +69 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/DSLGeneration_GraphModifierHelper.d.ts +32 -0
- package/lib/stores/graphModifier/DSLGeneration_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DSLGeneration_GraphModifierHelper.js +80 -0
- package/lib/stores/graphModifier/DSLGeneration_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/DSLMapping_GraphModifierHelper.d.ts +84 -0
- package/lib/stores/graphModifier/DSLMapping_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DSLMapping_GraphModifierHelper.js +249 -0
- package/lib/stores/graphModifier/DSLMapping_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/DSLService_GraphModifierHelper.d.ts +45 -0
- package/lib/stores/graphModifier/DSLService_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DSLService_GraphModifierHelper.js +111 -0
- package/lib/stores/graphModifier/DSLService_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts +59 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js +175 -0
- package/lib/stores/graphModifier/DomainGraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/GraphModifierHelper.d.ts +22 -0
- package/lib/stores/graphModifier/GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/GraphModifierHelper.js +45 -0
- package/lib/stores/graphModifier/GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/StoreFlatData_GraphModifierHelper.d.ts +21 -0
- package/lib/stores/graphModifier/StoreFlatData_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/StoreFlatData_GraphModifierHelper.js +33 -0
- package/lib/stores/graphModifier/StoreFlatData_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +73 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +194 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/Testable_GraphModifierHelper.d.ts +22 -0
- package/lib/stores/graphModifier/Testable_GraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/Testable_GraphModifierHelper.js +35 -0
- package/lib/stores/graphModifier/Testable_GraphModifierHelper.js.map +1 -0
- package/lib/stores/graphModifier/ValueSpecificationGraphModifierHelper.d.ts +20 -0
- package/lib/stores/graphModifier/ValueSpecificationGraphModifierHelper.d.ts.map +1 -0
- package/lib/stores/graphModifier/ValueSpecificationGraphModifierHelper.js +28 -0
- package/lib/stores/graphModifier/ValueSpecificationGraphModifierHelper.js.map +1 -0
- package/lib/stores/project-viewer/ProjectViewerEditorMode.d.ts +23 -0
- package/lib/stores/project-viewer/ProjectViewerEditorMode.d.ts.map +1 -0
- package/lib/stores/project-viewer/ProjectViewerEditorMode.js +34 -0
- package/lib/stores/project-viewer/ProjectViewerEditorMode.js.map +1 -0
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts +59 -0
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -0
- package/lib/stores/project-viewer/ProjectViewerStore.js +349 -0
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -0
- package/lib/stores/shared/DnDUtil.d.ts +68 -0
- package/lib/stores/shared/DnDUtil.d.ts.map +1 -0
- package/lib/stores/shared/DnDUtil.js +78 -0
- package/lib/stores/shared/DnDUtil.js.map +1 -0
- package/lib/stores/shared/FileGenerationTreeUtil.d.ts +57 -0
- package/lib/stores/shared/FileGenerationTreeUtil.d.ts.map +1 -0
- package/lib/stores/shared/FileGenerationTreeUtil.js +221 -0
- package/lib/stores/shared/FileGenerationTreeUtil.js.map +1 -0
- package/lib/stores/shared/MockDataUtil.d.ts +25 -0
- package/lib/stores/shared/MockDataUtil.d.ts.map +1 -0
- package/lib/stores/shared/MockDataUtil.js +114 -0
- package/lib/stores/shared/MockDataUtil.js.map +1 -0
- package/lib/stores/shared/ModelUtil.d.ts +61 -0
- package/lib/stores/shared/ModelUtil.d.ts.map +1 -0
- package/lib/stores/shared/ModelUtil.js +83 -0
- package/lib/stores/shared/ModelUtil.js.map +1 -0
- package/lib/stores/shared/PackageTreeUtil.d.ts +32 -0
- package/lib/stores/shared/PackageTreeUtil.d.ts.map +1 -0
- package/lib/stores/shared/PackageTreeUtil.js +220 -0
- package/lib/stores/shared/PackageTreeUtil.js.map +1 -0
- package/lib/stores/shared/TreeUtil.d.ts +36 -0
- package/lib/stores/shared/TreeUtil.d.ts.map +1 -0
- package/lib/stores/shared/TreeUtil.js +17 -0
- package/lib/stores/shared/TreeUtil.js.map +1 -0
- package/lib/stores/shared/testable/TestableUtils.d.ts +45 -0
- package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -0
- package/lib/stores/shared/testable/TestableUtils.js +142 -0
- package/lib/stores/shared/testable/TestableUtils.js.map +1 -0
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +57 -0
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/LocalChangesState.js +409 -0
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -0
- package/lib/stores/sidebar-state/ProjectOverviewState.d.ts +49 -0
- package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/ProjectOverviewState.js +170 -0
- package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -0
- package/lib/stores/sidebar-state/WorkflowManagerState.d.ts +110 -0
- package/lib/stores/sidebar-state/WorkflowManagerState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/WorkflowManagerState.js +352 -0
- package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts +47 -0
- package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceReviewState.js +254 -0
- package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +70 -0
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceSyncState.js +382 -0
- package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.d.ts +53 -0
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js +472 -0
- package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts +36 -0
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +210 -0
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -0
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +102 -0
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -0
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +413 -0
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -0
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +45 -0
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -0
- package/lib/stores/workspace-review/WorkspaceReviewStore.js +185 -0
- package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -0
- package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts +72 -0
- package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -0
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js +240 -0
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -0
- package/package.json +101 -0
- package/src/application/LegendStudio.tsx +97 -0
- package/src/application/LegendStudioApplicationConfig.ts +148 -0
- package/src/application/LegendStudioPluginManager.ts +76 -0
- package/src/components/Core_LegendStudioApplicationPlugin.tsx +92 -0
- package/src/components/DSLExternalFormat_CodeSnippets.ts +78 -0
- package/src/components/DSLExternalFormat_LegendStudioApplicationPlugin.tsx +437 -0
- package/src/components/DSLExternalFormat_LegendStudioDocumentation.ts +21 -0
- package/src/components/EditorComponentTestUtils.tsx +452 -0
- package/src/components/LegendStudioAppInfo.tsx +312 -0
- package/src/components/LegendStudioApplication.tsx +223 -0
- package/src/components/LegendStudioBaseStoreProvider.tsx +69 -0
- package/src/components/LegendStudioTestID.ts +63 -0
- package/src/components/editor/ActivityBar.tsx +396 -0
- package/src/components/editor/Editor.tsx +317 -0
- package/src/components/editor/EditorStoreProvider.tsx +69 -0
- package/src/components/editor/StatusBar.tsx +359 -0
- package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +135 -0
- package/src/components/editor/aux-panel/Console.tsx +25 -0
- package/src/components/editor/aux-panel/DevTool.tsx +118 -0
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +146 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +578 -0
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +106 -0
- package/src/components/editor/edit-panel/FunctionEditor.tsx +838 -0
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +615 -0
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +1244 -0
- package/src/components/editor/edit-panel/ModelLoader.tsx +264 -0
- package/src/components/editor/edit-panel/RuntimeEditor.tsx +1114 -0
- package/src/components/editor/edit-panel/UnsupportedElementEditor.tsx +83 -0
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +193 -0
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +354 -0
- package/src/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.tsx +51 -0
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +1504 -0
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +383 -0
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +300 -0
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +257 -0
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +800 -0
- package/src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx +177 -0
- package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +203 -0
- package/src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx +61 -0
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +1484 -0
- package/src/components/editor/edit-panel/external-format-editor/BindingElementEditor.tsx +482 -0
- package/src/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.tsx +98 -0
- package/src/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.tsx +92 -0
- package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +583 -0
- package/src/components/editor/edit-panel/mapping-editor/ClassMappingEditor.tsx +307 -0
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +550 -0
- package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +328 -0
- package/src/components/editor/edit-panel/mapping-editor/FlatDataRecordTypeTree.tsx +160 -0
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +614 -0
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +220 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +348 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +814 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +594 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +779 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +508 -0
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +279 -0
- package/src/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.tsx +265 -0
- package/src/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.tsx +351 -0
- package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +420 -0
- package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +362 -0
- package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx +390 -0
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +529 -0
- package/src/components/editor/edit-panel/service-editor/NewServiceModal.tsx +115 -0
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +485 -0
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +889 -0
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +368 -0
- package/src/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.tsx +221 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +428 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +232 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.tsx +749 -0
- package/src/components/editor/edit-panel/testable/TestAssertionEditor.tsx +362 -0
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +569 -0
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +1534 -0
- package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +600 -0
- package/src/components/editor/edit-panel/uml-editor/ProfileEditor.tsx +250 -0
- package/src/components/editor/edit-panel/uml-editor/PropertyEditor.tsx +239 -0
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +142 -0
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +199 -0
- package/src/components/editor/edit-panel/uml-editor/UMLEditor.tsx +47 -0
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +518 -0
- package/src/components/editor/side-bar/Explorer.tsx +914 -0
- package/src/components/editor/side-bar/LocalChanges.tsx +433 -0
- package/src/components/editor/side-bar/ProjectOverview.tsx +886 -0
- package/src/components/editor/side-bar/SideBar.tsx +71 -0
- package/src/components/editor/side-bar/WorkflowManager.tsx +529 -0
- package/src/components/editor/side-bar/WorkspaceReview.tsx +341 -0
- package/src/components/editor/side-bar/WorkspaceSyncConflictResolver.tsx +276 -0
- package/src/components/editor/side-bar/WorkspaceUpdateConflictResolver.tsx +206 -0
- package/src/components/editor/side-bar/WorkspaceUpdater.tsx +279 -0
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +459 -0
- package/src/components/project-viewer/ProjectViewer.tsx +358 -0
- package/src/components/project-viewer/ProjectViewerStoreProvider.tsx +56 -0
- package/src/components/shared/DiffView.tsx +151 -0
- package/src/components/shared/ElementIconUtils.tsx +141 -0
- package/src/components/shared/MultiplicityBadge.tsx +39 -0
- package/src/components/shared/StudioLambdaEditor.tsx +140 -0
- package/src/components/shared/StudioTextInputEditor.tsx +83 -0
- package/src/components/shared/TypeTree.tsx +290 -0
- package/src/components/workspace-review/WorkspaceReview.tsx +247 -0
- package/src/components/workspace-review/WorkspaceReviewPanel.tsx +190 -0
- package/src/components/workspace-review/WorkspaceReviewSideBar.tsx +250 -0
- package/src/components/workspace-review/WorkspaceReviewStoreProvider.tsx +58 -0
- package/src/components/workspace-setup/ProjectCreateModal.tsx +756 -0
- package/src/components/workspace-setup/ProjectSelector.tsx +148 -0
- package/src/components/workspace-setup/WorkspaceSelector.tsx +135 -0
- package/src/components/workspace-setup/WorkspaceSetup.tsx +406 -0
- package/src/components/workspace-setup/WorkspaceSetupStoreProvider.tsx +56 -0
- package/src/index.ts +113 -0
- package/src/stores/AbstractConflictResolutionState.ts +55 -0
- package/src/stores/ChangeDetectionEvent.ts +34 -0
- package/src/stores/ChangeDetectionState.ts +819 -0
- package/src/stores/DSLData_LegendStudioApplicationPlugin_Extension.ts +72 -0
- package/src/stores/DSLGenerationSpecification_LegendStudioApplicationPlugin_Extension.ts +49 -0
- package/src/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.ts +230 -0
- package/src/stores/DSLService_LegendStudioApplicationPlugin_Extension.ts +46 -0
- package/src/stores/EditorConfig.ts +81 -0
- package/src/stores/EditorGraphState.ts +1243 -0
- package/src/stores/EditorSDLCState.ts +440 -0
- package/src/stores/EditorStore.ts +1463 -0
- package/src/stores/EditorStoreTestUtils.ts +73 -0
- package/src/stores/ExplorerTreeState.ts +413 -0
- package/src/stores/LegendStudioAppEvent.ts +35 -0
- package/src/stores/LegendStudioApplicationNavigationContext.ts +46 -0
- package/src/stores/LegendStudioApplicationPlugin.ts +331 -0
- package/src/stores/LegendStudioBaseStore.ts +239 -0
- package/src/stores/LegendStudioCodeSnippets.ts +350 -0
- package/src/stores/LegendStudioDocumentation.ts +84 -0
- package/src/stores/LegendStudioEventService.ts +36 -0
- package/src/stores/LegendStudioRouter.ts +222 -0
- package/src/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.ts +100 -0
- package/src/stores/aux-panel-state/DevToolState.ts +27 -0
- package/src/stores/editor/EditorMode.ts +22 -0
- package/src/stores/editor/NewElementState.ts +835 -0
- package/src/stores/editor/StandardEditorMode.ts +35 -0
- package/src/stores/editor-state/EditorState.ts +32 -0
- package/src/stores/editor-state/ExternalFormatState.ts +107 -0
- package/src/stores/editor-state/FileGenerationState.ts +319 -0
- package/src/stores/editor-state/FileGenerationViewerState.ts +70 -0
- package/src/stores/editor-state/GenerationSpecificationEditorState.ts +125 -0
- package/src/stores/editor-state/GrammarTextEditorState.ts +181 -0
- package/src/stores/editor-state/GraphGenerationState.ts +554 -0
- package/src/stores/editor-state/ModelLoaderState.ts +278 -0
- package/src/stores/editor-state/ProjectConfigurationEditorState.ts +300 -0
- package/src/stores/editor-state/UnsupportedElementEditorState.ts +28 -0
- package/src/stores/editor-state/element-editor-state/ClassEditorState.ts +140 -0
- package/src/stores/editor-state/element-editor-state/ClassState.ts +419 -0
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +159 -0
- package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +94 -0
- package/src/stores/editor-state/element-editor-state/FileGenerationEditorState.ts +69 -0
- package/src/stores/editor-state/element-editor-state/FunctionEditorState.ts +231 -0
- package/src/stores/editor-state/element-editor-state/RuntimeEditorState.ts +935 -0
- package/src/stores/editor-state/element-editor-state/UMLEditorState.ts +84 -0
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +475 -0
- package/src/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +637 -0
- package/src/stores/editor-state/element-editor-state/data/DataEditorState.ts +100 -0
- package/src/stores/editor-state/element-editor-state/data/EmbeddedDataState.ts +351 -0
- package/src/stores/editor-state/element-editor-state/external-format/BindingEditorState.ts +61 -0
- package/src/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.ts +397 -0
- package/src/stores/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.ts +397 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +1528 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingElementDecorator.ts +794 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingElementState.ts +111 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +895 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +803 -0
- package/src/stores/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.ts +349 -0
- package/src/stores/editor-state/element-editor-state/mapping/UnsupportedInstanceSetImplementationState.ts +27 -0
- package/src/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.tsx +134 -0
- package/src/stores/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.ts +350 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +114 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +907 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +312 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceTestRunnerState.ts +31 -0
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +365 -0
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +405 -0
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +293 -0
- package/src/stores/editor-state/element-editor-state/testable/TestAssertionState.ts +319 -0
- package/src/stores/editor-state/element-editor-state/testable/TestableEditorState.ts +205 -0
- package/src/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts +547 -0
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffEditorState.ts +48 -0
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +228 -0
- package/src/stores/graphModifier/DSLData_GraphModifierHelper.ts +104 -0
- package/src/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.ts +138 -0
- package/src/stores/graphModifier/DSLGeneration_GraphModifierHelper.ts +188 -0
- package/src/stores/graphModifier/DSLMapping_GraphModifierHelper.ts +563 -0
- package/src/stores/graphModifier/DSLService_GraphModifierHelper.ts +243 -0
- package/src/stores/graphModifier/DomainGraphModifierHelper.ts +349 -0
- package/src/stores/graphModifier/GraphModifierHelper.ts +80 -0
- package/src/stores/graphModifier/StoreFlatData_GraphModifierHelper.ts +60 -0
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +413 -0
- package/src/stores/graphModifier/Testable_GraphModifierHelper.ts +58 -0
- package/src/stores/graphModifier/ValueSpecificationGraphModifierHelper.ts +41 -0
- package/src/stores/project-viewer/ProjectViewerEditorMode.ts +59 -0
- package/src/stores/project-viewer/ProjectViewerStore.ts +597 -0
- package/src/stores/shared/DnDUtil.ts +102 -0
- package/src/stores/shared/FileGenerationTreeUtil.ts +340 -0
- package/src/stores/shared/MockDataUtil.ts +191 -0
- package/src/stores/shared/ModelUtil.ts +87 -0
- package/src/stores/shared/PackageTreeUtil.ts +310 -0
- package/src/stores/shared/TreeUtil.ts +49 -0
- package/src/stores/shared/testable/TestableUtils.ts +213 -0
- package/src/stores/sidebar-state/LocalChangesState.ts +689 -0
- package/src/stores/sidebar-state/ProjectOverviewState.ts +287 -0
- package/src/stores/sidebar-state/WorkflowManagerState.ts +648 -0
- package/src/stores/sidebar-state/WorkspaceReviewState.ts +384 -0
- package/src/stores/sidebar-state/WorkspaceSyncState.ts +578 -0
- package/src/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.ts +728 -0
- package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +358 -0
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +576 -0
- package/src/stores/workspace-review/WorkspaceReviewStore.ts +272 -0
- package/src/stores/workspace-setup/WorkspaceSetupStore.ts +374 -0
- package/tsconfig.json +256 -0
|
@@ -0,0 +1,1528 @@
|
|
|
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
|
+
|
|
17
|
+
import {
|
|
18
|
+
observable,
|
|
19
|
+
action,
|
|
20
|
+
computed,
|
|
21
|
+
flow,
|
|
22
|
+
makeObservable,
|
|
23
|
+
flowResult,
|
|
24
|
+
} from 'mobx';
|
|
25
|
+
import type { EditorStore } from '../../../EditorStore.js';
|
|
26
|
+
import {
|
|
27
|
+
InstanceSetImplementationState,
|
|
28
|
+
MappingElementState,
|
|
29
|
+
} from './MappingElementState.js';
|
|
30
|
+
import { PureInstanceSetImplementationState } from './PureInstanceSetImplementationState.js';
|
|
31
|
+
import { ElementEditorState } from '../../../editor-state/element-editor-state/ElementEditorState.js';
|
|
32
|
+
import {
|
|
33
|
+
MAPPING_TEST_EDITOR_TAB_TYPE,
|
|
34
|
+
MappingTestState,
|
|
35
|
+
TEST_RESULT,
|
|
36
|
+
} from './MappingTestState.js';
|
|
37
|
+
import { createMockDataForMappingElementSource } from '../../../shared/MockDataUtil.js';
|
|
38
|
+
import {
|
|
39
|
+
type GeneratorFn,
|
|
40
|
+
assertErrorThrown,
|
|
41
|
+
LogEvent,
|
|
42
|
+
deleteEntry,
|
|
43
|
+
generateEnumerableNameFromToken,
|
|
44
|
+
IllegalStateError,
|
|
45
|
+
isNonNullable,
|
|
46
|
+
assertNonNullable,
|
|
47
|
+
guaranteeNonNullable,
|
|
48
|
+
guaranteeType,
|
|
49
|
+
UnsupportedOperationError,
|
|
50
|
+
assertTrue,
|
|
51
|
+
addUniqueEntry,
|
|
52
|
+
filterByType,
|
|
53
|
+
} from '@finos/legend-shared';
|
|
54
|
+
import { MappingExecutionState } from './MappingExecutionState.js';
|
|
55
|
+
import { RootFlatDataInstanceSetImplementationState } from './FlatDataInstanceSetImplementationState.js';
|
|
56
|
+
import type { TreeNodeData, TreeData } from '@finos/legend-art';
|
|
57
|
+
import { UnsupportedInstanceSetImplementationState } from './UnsupportedInstanceSetImplementationState.js';
|
|
58
|
+
import { RootRelationalInstanceSetImplementationState } from './relational/RelationalInstanceSetImplementationState.js';
|
|
59
|
+
import {
|
|
60
|
+
type CompilationError,
|
|
61
|
+
type PackageableElement,
|
|
62
|
+
type InputData,
|
|
63
|
+
type Type,
|
|
64
|
+
type EmbeddedSetImplementation,
|
|
65
|
+
getAllClassMappings,
|
|
66
|
+
GRAPH_MANAGER_EVENT,
|
|
67
|
+
PRIMITIVE_TYPE,
|
|
68
|
+
fromElementPathToMappingElementId,
|
|
69
|
+
extractSourceInformationCoordinates,
|
|
70
|
+
getAllEnumerationMappings,
|
|
71
|
+
Class,
|
|
72
|
+
Enumeration,
|
|
73
|
+
Mapping,
|
|
74
|
+
EnumerationMapping,
|
|
75
|
+
SetImplementation,
|
|
76
|
+
PureInstanceSetImplementation,
|
|
77
|
+
MappingTest,
|
|
78
|
+
ExpectedOutputMappingTestAssert,
|
|
79
|
+
ObjectInputData,
|
|
80
|
+
ObjectInputType,
|
|
81
|
+
FlatDataInstanceSetImplementation,
|
|
82
|
+
InstanceSetImplementation,
|
|
83
|
+
EmbeddedFlatDataPropertyMapping,
|
|
84
|
+
FlatDataInputData,
|
|
85
|
+
RootFlatDataRecordType,
|
|
86
|
+
PackageableElementExplicitReference,
|
|
87
|
+
RootFlatDataRecordTypeExplicitReference,
|
|
88
|
+
RootRelationalInstanceSetImplementation,
|
|
89
|
+
EmbeddedRelationalInstanceSetImplementation,
|
|
90
|
+
AggregationAwareSetImplementation,
|
|
91
|
+
TableAlias,
|
|
92
|
+
RelationalInputData,
|
|
93
|
+
RelationalInputType,
|
|
94
|
+
OperationSetImplementation,
|
|
95
|
+
OperationType,
|
|
96
|
+
AssociationImplementation,
|
|
97
|
+
InferableMappingElementIdExplicitValue,
|
|
98
|
+
InferableMappingElementRootExplicitValue,
|
|
99
|
+
stub_Class,
|
|
100
|
+
findPropertyMapping,
|
|
101
|
+
} from '@finos/legend-graph';
|
|
102
|
+
import { LambdaEditorState } from '@finos/legend-application';
|
|
103
|
+
import type {
|
|
104
|
+
DSLMapping_LegendStudioApplicationPlugin_Extension,
|
|
105
|
+
MappingElementLabel,
|
|
106
|
+
} from '../../../DSLMapping_LegendStudioApplicationPlugin_Extension.js';
|
|
107
|
+
import type { LegendStudioApplicationPlugin } from '../../../LegendStudioApplicationPlugin.js';
|
|
108
|
+
import { flatData_setSourceRootRecordType } from '../../../graphModifier/StoreFlatData_GraphModifierHelper.js';
|
|
109
|
+
import {
|
|
110
|
+
pureInstanceSetImpl_setSrcClass,
|
|
111
|
+
mapping_addClassMapping,
|
|
112
|
+
mapping_addEnumerationMapping,
|
|
113
|
+
mapping_addTest,
|
|
114
|
+
mapping_deleteAssociationMapping,
|
|
115
|
+
mapping_deleteClassMapping,
|
|
116
|
+
mapping_deleteEnumerationMapping,
|
|
117
|
+
mapping_deleteTest,
|
|
118
|
+
setImpl_updateRootOnCreate,
|
|
119
|
+
setImpl_updateRootOnDelete,
|
|
120
|
+
} from '../../../graphModifier/DSLMapping_GraphModifierHelper.js';
|
|
121
|
+
import { BASIC_SET_IMPLEMENTATION_TYPE } from '../../../shared/ModelUtil.js';
|
|
122
|
+
import { rootRelationalSetImp_setMainTableAlias } from '../../../graphModifier/StoreRelational_GraphModifierHelper.js';
|
|
123
|
+
|
|
124
|
+
export interface MappingExplorerTreeNodeData extends TreeNodeData {
|
|
125
|
+
mappingElement: MappingElement;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export const generateMappingTestName = (mapping: Mapping): string => {
|
|
129
|
+
const generatedName = generateEnumerableNameFromToken(
|
|
130
|
+
mapping.tests.map((test) => test.name),
|
|
131
|
+
'test',
|
|
132
|
+
);
|
|
133
|
+
assertTrue(
|
|
134
|
+
!mapping.tests.find((test) => test.name === generatedName),
|
|
135
|
+
`Can't auto-generate test name for value '${generatedName}'`,
|
|
136
|
+
);
|
|
137
|
+
return generatedName;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export enum MAPPING_ELEMENT_SOURCE_ID_LABEL {
|
|
141
|
+
ENUMERATION_MAPPING = 'enumerationMapping',
|
|
142
|
+
OPERATION_CLASS_MAPPING = 'operationClassMapping',
|
|
143
|
+
PURE_INSTANCE_CLASS_MAPPING = 'pureInstanceClassMapping',
|
|
144
|
+
FLAT_DATA_CLASS_MAPPING = 'flatDataClassMapping',
|
|
145
|
+
RELATIONAL_CLASS_MAPPING = 'relationalClassMapping',
|
|
146
|
+
AGGREGATION_AWARE_CLASS_MAPPING = 'aggregationAwareClassMapping',
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export enum MAPPING_ELEMENT_TYPE {
|
|
150
|
+
CLASS = 'CLASS',
|
|
151
|
+
ENUMERATION = 'ENUMERATION',
|
|
152
|
+
ASSOCIATION = 'ASSOCIATION',
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type MappingElement =
|
|
156
|
+
| EnumerationMapping
|
|
157
|
+
| SetImplementation
|
|
158
|
+
| AssociationImplementation;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Mapping element source could be just about anything, even `undefined`
|
|
162
|
+
* We cannot really extend this type since it hinders modularity
|
|
163
|
+
*/
|
|
164
|
+
export type MappingElementSource = unknown;
|
|
165
|
+
|
|
166
|
+
export const getMappingElementTarget = (
|
|
167
|
+
mappingElement: MappingElement,
|
|
168
|
+
): PackageableElement => {
|
|
169
|
+
if (mappingElement instanceof EnumerationMapping) {
|
|
170
|
+
return mappingElement.enumeration.value;
|
|
171
|
+
} else if (mappingElement instanceof AssociationImplementation) {
|
|
172
|
+
return mappingElement.association.value;
|
|
173
|
+
} else if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
174
|
+
return mappingElement.class.value;
|
|
175
|
+
} else if (
|
|
176
|
+
mappingElement instanceof EmbeddedRelationalInstanceSetImplementation
|
|
177
|
+
) {
|
|
178
|
+
return mappingElement.class.value;
|
|
179
|
+
} else if (mappingElement instanceof SetImplementation) {
|
|
180
|
+
return mappingElement.class.value;
|
|
181
|
+
}
|
|
182
|
+
throw new UnsupportedOperationError(
|
|
183
|
+
`Can't derive target of mapping element`,
|
|
184
|
+
mappingElement,
|
|
185
|
+
);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const getMappingElementLabel = (
|
|
189
|
+
mappingElement: MappingElement,
|
|
190
|
+
editorStore: EditorStore,
|
|
191
|
+
): MappingElementLabel => {
|
|
192
|
+
if (mappingElement instanceof EnumerationMapping) {
|
|
193
|
+
return {
|
|
194
|
+
value: `${
|
|
195
|
+
fromElementPathToMappingElementId(
|
|
196
|
+
mappingElement.enumeration.value.path,
|
|
197
|
+
) === mappingElement.id.value
|
|
198
|
+
? mappingElement.enumeration.value.name
|
|
199
|
+
: `${mappingElement.enumeration.value.name} [${mappingElement.id.value}]`
|
|
200
|
+
}`,
|
|
201
|
+
root: false,
|
|
202
|
+
tooltip: mappingElement.enumeration.value.path,
|
|
203
|
+
};
|
|
204
|
+
} else if (mappingElement instanceof AssociationImplementation) {
|
|
205
|
+
return {
|
|
206
|
+
value: `${
|
|
207
|
+
fromElementPathToMappingElementId(
|
|
208
|
+
mappingElement.association.value.path,
|
|
209
|
+
) === mappingElement.id.value
|
|
210
|
+
? mappingElement.association.value.name
|
|
211
|
+
: `${mappingElement.association.value.name} [${mappingElement.id.value}]`
|
|
212
|
+
}`,
|
|
213
|
+
root: false,
|
|
214
|
+
tooltip: mappingElement.association.value.path,
|
|
215
|
+
};
|
|
216
|
+
} else if (mappingElement instanceof SetImplementation) {
|
|
217
|
+
if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
218
|
+
return {
|
|
219
|
+
value: `${mappingElement.class.value.name} [${mappingElement.property.value.name}]`,
|
|
220
|
+
root: mappingElement.root.value,
|
|
221
|
+
tooltip: mappingElement.class.value.path,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const extraSetImplementationMappingElementLabelInfoBuilders =
|
|
225
|
+
editorStore.pluginManager
|
|
226
|
+
.getApplicationPlugins()
|
|
227
|
+
.flatMap(
|
|
228
|
+
(plugin) =>
|
|
229
|
+
(
|
|
230
|
+
plugin as DSLMapping_LegendStudioApplicationPlugin_Extension
|
|
231
|
+
).getExtraSetImplementationMappingElementLabelInfoBuilders?.() ??
|
|
232
|
+
[],
|
|
233
|
+
);
|
|
234
|
+
for (const labelInfoBuilder of extraSetImplementationMappingElementLabelInfoBuilders) {
|
|
235
|
+
const labelInfo = labelInfoBuilder(mappingElement);
|
|
236
|
+
if (labelInfo) {
|
|
237
|
+
return labelInfo;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
value: `${
|
|
242
|
+
fromElementPathToMappingElementId(mappingElement.class.value.path) ===
|
|
243
|
+
mappingElement.id.value
|
|
244
|
+
? mappingElement.root.value
|
|
245
|
+
? mappingElement.class.value.name
|
|
246
|
+
: `${mappingElement.class.value.name} [default]`
|
|
247
|
+
: `${mappingElement.class.value.name} [${mappingElement.id.value}]`
|
|
248
|
+
}`,
|
|
249
|
+
root: mappingElement.root.value,
|
|
250
|
+
tooltip: mappingElement.class.value.path,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
throw new UnsupportedOperationError(
|
|
254
|
+
`Can't build label info for mapping element`,
|
|
255
|
+
mappingElement,
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const getMappingElementSource = (
|
|
260
|
+
mappingElement: MappingElement,
|
|
261
|
+
plugins: LegendStudioApplicationPlugin[],
|
|
262
|
+
): MappingElementSource | undefined => {
|
|
263
|
+
if (mappingElement instanceof OperationSetImplementation) {
|
|
264
|
+
// NOTE: we don't need to resolve operation union because at the end of the day, it uses other class mappings
|
|
265
|
+
// in the mapping, so if we use this method on all class mappings of a mapping, we don't miss anything
|
|
266
|
+
return undefined;
|
|
267
|
+
} else if (mappingElement instanceof EnumerationMapping) {
|
|
268
|
+
return mappingElement.sourceType?.value;
|
|
269
|
+
} else if (mappingElement instanceof AssociationImplementation) {
|
|
270
|
+
throw new UnsupportedOperationError();
|
|
271
|
+
} else if (mappingElement instanceof PureInstanceSetImplementation) {
|
|
272
|
+
return mappingElement.srcClass?.value;
|
|
273
|
+
} else if (mappingElement instanceof FlatDataInstanceSetImplementation) {
|
|
274
|
+
return mappingElement.sourceRootRecordType.value;
|
|
275
|
+
} else if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
276
|
+
return getMappingElementSource(
|
|
277
|
+
guaranteeType(
|
|
278
|
+
mappingElement.rootInstanceSetImplementation,
|
|
279
|
+
FlatDataInstanceSetImplementation,
|
|
280
|
+
),
|
|
281
|
+
plugins,
|
|
282
|
+
);
|
|
283
|
+
} else if (
|
|
284
|
+
mappingElement instanceof RootRelationalInstanceSetImplementation
|
|
285
|
+
) {
|
|
286
|
+
return mappingElement.mainTableAlias;
|
|
287
|
+
} else if (
|
|
288
|
+
mappingElement instanceof EmbeddedRelationalInstanceSetImplementation
|
|
289
|
+
) {
|
|
290
|
+
return mappingElement.rootInstanceSetImplementation.mainTableAlias;
|
|
291
|
+
} else if (mappingElement instanceof AggregationAwareSetImplementation) {
|
|
292
|
+
return getMappingElementSource(
|
|
293
|
+
mappingElement.mainSetImplementation,
|
|
294
|
+
plugins,
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
const extraMappingElementSourceExtractors = plugins.flatMap(
|
|
298
|
+
(plugin) =>
|
|
299
|
+
(
|
|
300
|
+
plugin as DSLMapping_LegendStudioApplicationPlugin_Extension
|
|
301
|
+
).getExtraMappingElementSourceExtractors?.() ?? [],
|
|
302
|
+
);
|
|
303
|
+
for (const extractor of extraMappingElementSourceExtractors) {
|
|
304
|
+
const mappingElementSource = extractor(mappingElement);
|
|
305
|
+
if (mappingElementSource) {
|
|
306
|
+
return mappingElementSource;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
throw new UnsupportedOperationError(
|
|
310
|
+
`Can't extract source of mapping element: no compatible extractor available from plugins`,
|
|
311
|
+
mappingElement,
|
|
312
|
+
);
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
export const getMappingElementType = (
|
|
316
|
+
mappingElement: MappingElement,
|
|
317
|
+
): MAPPING_ELEMENT_TYPE => {
|
|
318
|
+
if (mappingElement instanceof EnumerationMapping) {
|
|
319
|
+
return MAPPING_ELEMENT_TYPE.ENUMERATION;
|
|
320
|
+
} else if (mappingElement instanceof AssociationImplementation) {
|
|
321
|
+
return MAPPING_ELEMENT_TYPE.ASSOCIATION;
|
|
322
|
+
} else if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
323
|
+
return MAPPING_ELEMENT_TYPE.CLASS;
|
|
324
|
+
} else if (mappingElement instanceof SetImplementation) {
|
|
325
|
+
return MAPPING_ELEMENT_TYPE.CLASS;
|
|
326
|
+
}
|
|
327
|
+
throw new UnsupportedOperationError(
|
|
328
|
+
`Can't classify mapping element`,
|
|
329
|
+
mappingElement,
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export const createClassMapping = (
|
|
334
|
+
mapping: Mapping,
|
|
335
|
+
id: string,
|
|
336
|
+
_class: Class,
|
|
337
|
+
setImpType: BASIC_SET_IMPLEMENTATION_TYPE,
|
|
338
|
+
editorStore: EditorStore,
|
|
339
|
+
): SetImplementation | undefined => {
|
|
340
|
+
let setImp: SetImplementation;
|
|
341
|
+
// NOTE: by default when we create a new instance set implementation, we will create PURE instance set implementation
|
|
342
|
+
// we don't let users choose the various instance set implementation type as that require proper source
|
|
343
|
+
// e.g. flat data class mapping requires stubbing the source
|
|
344
|
+
switch (setImpType) {
|
|
345
|
+
case BASIC_SET_IMPLEMENTATION_TYPE.OPERATION:
|
|
346
|
+
setImp = new OperationSetImplementation(
|
|
347
|
+
InferableMappingElementIdExplicitValue.create(id, _class.path),
|
|
348
|
+
mapping,
|
|
349
|
+
PackageableElementExplicitReference.create(_class),
|
|
350
|
+
InferableMappingElementRootExplicitValue.create(false),
|
|
351
|
+
OperationType.STORE_UNION,
|
|
352
|
+
);
|
|
353
|
+
break;
|
|
354
|
+
case BASIC_SET_IMPLEMENTATION_TYPE.INSTANCE:
|
|
355
|
+
setImp = new PureInstanceSetImplementation(
|
|
356
|
+
InferableMappingElementIdExplicitValue.create(id, _class.path),
|
|
357
|
+
mapping,
|
|
358
|
+
PackageableElementExplicitReference.create(_class),
|
|
359
|
+
InferableMappingElementRootExplicitValue.create(false),
|
|
360
|
+
undefined,
|
|
361
|
+
);
|
|
362
|
+
break;
|
|
363
|
+
default:
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
setImpl_updateRootOnCreate(setImp);
|
|
367
|
+
mapping_addClassMapping(
|
|
368
|
+
mapping,
|
|
369
|
+
setImp,
|
|
370
|
+
editorStore.changeDetectionState.observerContext,
|
|
371
|
+
);
|
|
372
|
+
return setImp;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export const createEnumerationMapping = (
|
|
376
|
+
mapping: Mapping,
|
|
377
|
+
id: string,
|
|
378
|
+
enumeration: Enumeration,
|
|
379
|
+
sourceType: Type,
|
|
380
|
+
): EnumerationMapping => {
|
|
381
|
+
const enumMapping = new EnumerationMapping(
|
|
382
|
+
InferableMappingElementIdExplicitValue.create(id, enumeration.path),
|
|
383
|
+
PackageableElementExplicitReference.create(enumeration),
|
|
384
|
+
mapping,
|
|
385
|
+
PackageableElementExplicitReference.create(sourceType),
|
|
386
|
+
);
|
|
387
|
+
mapping_addEnumerationMapping(mapping, enumMapping);
|
|
388
|
+
return enumMapping;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
export const getEmbeddedSetImplementations = (
|
|
392
|
+
setImpl: InstanceSetImplementation,
|
|
393
|
+
): InstanceSetImplementation[] => {
|
|
394
|
+
const embeddedPropertyMappings = setImpl.propertyMappings.filter(
|
|
395
|
+
// NOTE: we use this convenient flag to check if something is embedded mapping or not
|
|
396
|
+
// however, in reality, we can check for presence of `propertyMappings`, or more overkill
|
|
397
|
+
// do an extension mechanism to figure this out, for example, do an extension mechanism
|
|
398
|
+
// to check if an instance set implementation is embedded or not
|
|
399
|
+
(pm) => pm._isEmbedded,
|
|
400
|
+
) as EmbeddedSetImplementation[];
|
|
401
|
+
return embeddedPropertyMappings
|
|
402
|
+
.flatMap(getEmbeddedSetImplementations)
|
|
403
|
+
.concat(embeddedPropertyMappings);
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// We only care to get `own` class mapping as embedded set implementations can only be within the
|
|
407
|
+
// current class mapping i.e current mapping.
|
|
408
|
+
const getMappingEmbeddedSetImplementations = (
|
|
409
|
+
mapping: Mapping,
|
|
410
|
+
): InstanceSetImplementation[] =>
|
|
411
|
+
mapping.classMappings
|
|
412
|
+
.filter(filterByType(InstanceSetImplementation))
|
|
413
|
+
.map(getEmbeddedSetImplementations)
|
|
414
|
+
.flat();
|
|
415
|
+
|
|
416
|
+
const getMappingElementByTypeAndId = (
|
|
417
|
+
mapping: Mapping,
|
|
418
|
+
mappingElementType: string,
|
|
419
|
+
mappingElementId: string,
|
|
420
|
+
): MappingElement | undefined => {
|
|
421
|
+
// NOTE: ID must be unique across all mapping elements of the same type
|
|
422
|
+
switch (mappingElementType) {
|
|
423
|
+
case MAPPING_ELEMENT_TYPE.CLASS:
|
|
424
|
+
return (
|
|
425
|
+
getAllClassMappings(mapping).find(
|
|
426
|
+
(classMapping) => classMapping.id.value === mappingElementId,
|
|
427
|
+
) ??
|
|
428
|
+
getMappingEmbeddedSetImplementations(mapping)
|
|
429
|
+
.filter(filterByType(EmbeddedFlatDataPropertyMapping))
|
|
430
|
+
.find((me) => me.id.value === mappingElementId)
|
|
431
|
+
);
|
|
432
|
+
case MAPPING_ELEMENT_TYPE.ASSOCIATION:
|
|
433
|
+
return mapping.associationMappings.find(
|
|
434
|
+
(associationMapping) =>
|
|
435
|
+
associationMapping.id.value === mappingElementId,
|
|
436
|
+
);
|
|
437
|
+
case MAPPING_ELEMENT_TYPE.ENUMERATION:
|
|
438
|
+
return getAllEnumerationMappings(mapping).find(
|
|
439
|
+
(enumerationMapping) =>
|
|
440
|
+
enumerationMapping.id.value === mappingElementId,
|
|
441
|
+
);
|
|
442
|
+
default:
|
|
443
|
+
return undefined;
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
// TODO?: We need to consider whther to keep this method or not, because in the future we might
|
|
448
|
+
// need to treat class mappings, enumeration mappings, and association mappings fairly differently
|
|
449
|
+
// TODO: account for mapping includes?
|
|
450
|
+
export const getAllMappingElements = (mapping: Mapping): MappingElement[] => [
|
|
451
|
+
...mapping.classMappings,
|
|
452
|
+
...mapping.associationMappings,
|
|
453
|
+
...mapping.enumerationMappings,
|
|
454
|
+
];
|
|
455
|
+
|
|
456
|
+
const constructMappingElementNodeData = (
|
|
457
|
+
mappingElement: MappingElement,
|
|
458
|
+
editorStore: EditorStore,
|
|
459
|
+
): MappingExplorerTreeNodeData => ({
|
|
460
|
+
id: `${mappingElement.id.value}`,
|
|
461
|
+
mappingElement: mappingElement,
|
|
462
|
+
label: getMappingElementLabel(mappingElement, editorStore).value,
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
const getMappingElementTreeNodeData = (
|
|
466
|
+
mappingElement: MappingElement,
|
|
467
|
+
editorStore: EditorStore,
|
|
468
|
+
): MappingExplorerTreeNodeData => {
|
|
469
|
+
const nodeData: MappingExplorerTreeNodeData = constructMappingElementNodeData(
|
|
470
|
+
mappingElement,
|
|
471
|
+
editorStore,
|
|
472
|
+
);
|
|
473
|
+
if (
|
|
474
|
+
mappingElement instanceof FlatDataInstanceSetImplementation ||
|
|
475
|
+
mappingElement instanceof EmbeddedFlatDataPropertyMapping
|
|
476
|
+
) {
|
|
477
|
+
const embedded = mappingElement.propertyMappings.filter(
|
|
478
|
+
filterByType(EmbeddedFlatDataPropertyMapping),
|
|
479
|
+
);
|
|
480
|
+
nodeData.childrenIds = embedded.map(
|
|
481
|
+
(e) => `${nodeData.id}.${e.property.value.name}`,
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
return nodeData;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
const getMappingIdentitySortString = (
|
|
488
|
+
me: MappingElement,
|
|
489
|
+
type: PackageableElement,
|
|
490
|
+
): string => `${type.name}-${type.path}-${me.id.value}`;
|
|
491
|
+
|
|
492
|
+
const getMappingElementTreeData = (
|
|
493
|
+
mapping: Mapping,
|
|
494
|
+
editorStore: EditorStore,
|
|
495
|
+
): TreeData<MappingExplorerTreeNodeData> => {
|
|
496
|
+
const rootIds: string[] = [];
|
|
497
|
+
const nodes = new Map<string, MappingExplorerTreeNodeData>();
|
|
498
|
+
const rootMappingElements = getAllMappingElements(mapping).sort((a, b) =>
|
|
499
|
+
getMappingIdentitySortString(a, getMappingElementTarget(a)).localeCompare(
|
|
500
|
+
getMappingIdentitySortString(b, getMappingElementTarget(b)),
|
|
501
|
+
),
|
|
502
|
+
);
|
|
503
|
+
rootMappingElements.forEach((mappingElement) => {
|
|
504
|
+
const mappingElementTreeNodeData = getMappingElementTreeNodeData(
|
|
505
|
+
mappingElement,
|
|
506
|
+
editorStore,
|
|
507
|
+
);
|
|
508
|
+
addUniqueEntry(rootIds, mappingElementTreeNodeData.id);
|
|
509
|
+
nodes.set(mappingElementTreeNodeData.id, mappingElementTreeNodeData);
|
|
510
|
+
});
|
|
511
|
+
return { rootIds, nodes };
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
const reprocessMappingElement = (
|
|
515
|
+
mappingElement: MappingElement,
|
|
516
|
+
treeNodes: Map<string, MappingExplorerTreeNodeData>,
|
|
517
|
+
openNodes: string[],
|
|
518
|
+
editorStore: EditorStore,
|
|
519
|
+
): MappingExplorerTreeNodeData => {
|
|
520
|
+
const nodeData: MappingExplorerTreeNodeData = constructMappingElementNodeData(
|
|
521
|
+
mappingElement,
|
|
522
|
+
editorStore,
|
|
523
|
+
);
|
|
524
|
+
if (
|
|
525
|
+
mappingElement instanceof FlatDataInstanceSetImplementation ||
|
|
526
|
+
mappingElement instanceof EmbeddedFlatDataPropertyMapping
|
|
527
|
+
) {
|
|
528
|
+
const embedded = mappingElement.propertyMappings.filter(
|
|
529
|
+
filterByType(EmbeddedFlatDataPropertyMapping),
|
|
530
|
+
);
|
|
531
|
+
nodeData.childrenIds = embedded.map(
|
|
532
|
+
(e) => `${nodeData.id}.${e.property.value.name}`,
|
|
533
|
+
);
|
|
534
|
+
if (openNodes.includes(mappingElement.id.value)) {
|
|
535
|
+
nodeData.isOpen = true;
|
|
536
|
+
embedded.forEach((e) =>
|
|
537
|
+
reprocessMappingElement(e, treeNodes, openNodes, editorStore),
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
treeNodes.set(nodeData.id, nodeData);
|
|
542
|
+
return nodeData;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
const reprocessMappingElementNodes = (
|
|
546
|
+
mapping: Mapping,
|
|
547
|
+
openNodes: string[],
|
|
548
|
+
editorStore: EditorStore,
|
|
549
|
+
): TreeData<MappingExplorerTreeNodeData> => {
|
|
550
|
+
const rootIds: string[] = [];
|
|
551
|
+
const nodes = new Map<string, MappingExplorerTreeNodeData>();
|
|
552
|
+
const rootMappingElements = getAllMappingElements(mapping).sort((a, b) =>
|
|
553
|
+
getMappingIdentitySortString(a, getMappingElementTarget(a)).localeCompare(
|
|
554
|
+
getMappingIdentitySortString(b, getMappingElementTarget(b)),
|
|
555
|
+
),
|
|
556
|
+
);
|
|
557
|
+
rootMappingElements.forEach((mappingElement) => {
|
|
558
|
+
const mappingElementTreeNodeData = reprocessMappingElement(
|
|
559
|
+
mappingElement,
|
|
560
|
+
nodes,
|
|
561
|
+
openNodes,
|
|
562
|
+
editorStore,
|
|
563
|
+
);
|
|
564
|
+
addUniqueEntry(rootIds, mappingElementTreeNodeData.id);
|
|
565
|
+
});
|
|
566
|
+
return { rootIds, nodes };
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
export interface MappingElementSpec {
|
|
570
|
+
showTarget: boolean;
|
|
571
|
+
// whether or not to open the new mapping element tab as an adjacent tab, this behavior is similar to Chrome
|
|
572
|
+
openInAdjacentTab: boolean;
|
|
573
|
+
target?: PackageableElement | undefined;
|
|
574
|
+
postSubmitAction?: (newMappingElement: MappingElement | undefined) => void;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export type MappingEditorTabState =
|
|
578
|
+
| MappingElementState
|
|
579
|
+
| MappingTestState
|
|
580
|
+
| MappingExecutionState;
|
|
581
|
+
|
|
582
|
+
export class MappingEditorState extends ElementEditorState {
|
|
583
|
+
currentTabState?: MappingEditorTabState | undefined;
|
|
584
|
+
openedTabStates: MappingEditorTabState[] = [];
|
|
585
|
+
|
|
586
|
+
mappingExplorerTreeData: TreeData<MappingExplorerTreeNodeData>;
|
|
587
|
+
newMappingElementSpec?: MappingElementSpec | undefined;
|
|
588
|
+
|
|
589
|
+
mappingTestStates: MappingTestState[] = [];
|
|
590
|
+
isRunningAllTests = false;
|
|
591
|
+
allTestRunTime = 0;
|
|
592
|
+
|
|
593
|
+
constructor(editorStore: EditorStore, element: PackageableElement) {
|
|
594
|
+
super(editorStore, element);
|
|
595
|
+
|
|
596
|
+
makeObservable<MappingEditorState, 'closeMappingElementTabState'>(this, {
|
|
597
|
+
currentTabState: observable,
|
|
598
|
+
openedTabStates: observable,
|
|
599
|
+
mappingTestStates: observable,
|
|
600
|
+
newMappingElementSpec: observable,
|
|
601
|
+
isRunningAllTests: observable,
|
|
602
|
+
allTestRunTime: observable,
|
|
603
|
+
mappingExplorerTreeData: observable.ref,
|
|
604
|
+
mapping: computed,
|
|
605
|
+
testSuiteResult: computed,
|
|
606
|
+
hasCompilationError: computed,
|
|
607
|
+
setNewMappingElementSpec: action,
|
|
608
|
+
setMappingExplorerTreeNodeData: action,
|
|
609
|
+
openMappingElement: action,
|
|
610
|
+
closeAllTabs: action,
|
|
611
|
+
createMappingElement: action,
|
|
612
|
+
reprocessMappingExplorerTree: action,
|
|
613
|
+
mappingElementsWithSimilarTarget: computed,
|
|
614
|
+
reprocess: action,
|
|
615
|
+
openTab: flow,
|
|
616
|
+
closeTab: flow,
|
|
617
|
+
closeAllOtherTabs: flow,
|
|
618
|
+
openTest: flow,
|
|
619
|
+
buildExecution: flow,
|
|
620
|
+
addTest: flow,
|
|
621
|
+
deleteTest: flow,
|
|
622
|
+
createNewTest: flow,
|
|
623
|
+
runTests: flow,
|
|
624
|
+
changeClassMappingSourceDriver: flow,
|
|
625
|
+
closeMappingElementTabState: flow,
|
|
626
|
+
deleteMappingElement: flow,
|
|
627
|
+
});
|
|
628
|
+
|
|
629
|
+
this.editorStore = editorStore;
|
|
630
|
+
this.mappingTestStates = this.mapping.tests.map(
|
|
631
|
+
(test) => new MappingTestState(editorStore, test, this),
|
|
632
|
+
);
|
|
633
|
+
this.mappingExplorerTreeData = getMappingElementTreeData(
|
|
634
|
+
this.mapping,
|
|
635
|
+
editorStore,
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
get mapping(): Mapping {
|
|
640
|
+
return guaranteeType(
|
|
641
|
+
this.element,
|
|
642
|
+
Mapping,
|
|
643
|
+
'Element inside mapping editor state must be a mapping',
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* This method is used to check if a target is being mapped multiple times, so we can make
|
|
649
|
+
* decision on things like whether we enforce the user to provide an ID for those mapping elements.
|
|
650
|
+
*/
|
|
651
|
+
get mappingElementsWithSimilarTarget(): MappingElement[] {
|
|
652
|
+
if (this.currentTabState instanceof MappingElementState) {
|
|
653
|
+
const mappingElement = this.currentTabState.mappingElement;
|
|
654
|
+
switch (getMappingElementType(mappingElement)) {
|
|
655
|
+
case MAPPING_ELEMENT_TYPE.CLASS:
|
|
656
|
+
return this.mapping.classMappings.filter(
|
|
657
|
+
(cm) =>
|
|
658
|
+
cm.class.value ===
|
|
659
|
+
(mappingElement as SetImplementation).class.value,
|
|
660
|
+
);
|
|
661
|
+
case MAPPING_ELEMENT_TYPE.ENUMERATION:
|
|
662
|
+
return this.mapping.enumerationMappings.filter(
|
|
663
|
+
(em) =>
|
|
664
|
+
em.enumeration.value ===
|
|
665
|
+
(mappingElement as EnumerationMapping).enumeration.value,
|
|
666
|
+
);
|
|
667
|
+
case MAPPING_ELEMENT_TYPE.ASSOCIATION: // NOTE: we might not even support Association Mapping
|
|
668
|
+
default:
|
|
669
|
+
return [];
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return [];
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
setNewMappingElementSpec(spec: MappingElementSpec | undefined): void {
|
|
676
|
+
this.newMappingElementSpec = spec;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// -------------------------------------- Tabs ---------------------------------------
|
|
680
|
+
|
|
681
|
+
*openTab(tabState: MappingEditorTabState): GeneratorFn<void> {
|
|
682
|
+
if (tabState !== this.currentTabState) {
|
|
683
|
+
if (tabState instanceof MappingTestState) {
|
|
684
|
+
yield flowResult(this.openTest(tabState.test));
|
|
685
|
+
} else if (tabState instanceof MappingElementState) {
|
|
686
|
+
this.openMappingElement(tabState.mappingElement, false);
|
|
687
|
+
} else if (tabState instanceof MappingExecutionState) {
|
|
688
|
+
this.currentTabState = tabState;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
*closeTab(tabState: MappingEditorTabState): GeneratorFn<void> {
|
|
694
|
+
const tabIndex = this.openedTabStates.findIndex((ts) => ts === tabState);
|
|
695
|
+
assertTrue(
|
|
696
|
+
tabIndex !== -1,
|
|
697
|
+
`Mapping editor tab should be currently opened`,
|
|
698
|
+
);
|
|
699
|
+
this.openedTabStates.splice(tabIndex, 1);
|
|
700
|
+
// if current tab is closed, we need further processing
|
|
701
|
+
if (this.currentTabState === tabState) {
|
|
702
|
+
if (this.openedTabStates.length) {
|
|
703
|
+
const openIndex = tabIndex - 1;
|
|
704
|
+
const tabStateToOpen =
|
|
705
|
+
openIndex >= 0
|
|
706
|
+
? this.openedTabStates[openIndex]
|
|
707
|
+
: this.openedTabStates.length
|
|
708
|
+
? this.openedTabStates[0]
|
|
709
|
+
: undefined;
|
|
710
|
+
if (tabStateToOpen) {
|
|
711
|
+
yield flowResult(this.openTab(tabStateToOpen));
|
|
712
|
+
} else {
|
|
713
|
+
this.currentTabState = undefined;
|
|
714
|
+
}
|
|
715
|
+
} else {
|
|
716
|
+
this.currentTabState = undefined;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
*closeAllOtherTabs(tabState: MappingEditorTabState): GeneratorFn<void> {
|
|
722
|
+
assertNonNullable(
|
|
723
|
+
this.openedTabStates.find((ts) => ts === tabState),
|
|
724
|
+
`Mapping editor tab should be currently opened`,
|
|
725
|
+
);
|
|
726
|
+
this.openedTabStates = [tabState];
|
|
727
|
+
yield flowResult(this.openTab(tabState));
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
closeAllTabs(): void {
|
|
731
|
+
this.currentTabState = undefined;
|
|
732
|
+
this.openedTabStates = [];
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// -------------------------------------- Explorer Tree ---------------------------------------
|
|
736
|
+
|
|
737
|
+
setMappingExplorerTreeNodeData(
|
|
738
|
+
data: TreeData<MappingExplorerTreeNodeData>,
|
|
739
|
+
): void {
|
|
740
|
+
this.mappingExplorerTreeData = data;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
onMappingExplorerTreeNodeExpand = (
|
|
744
|
+
node: MappingExplorerTreeNodeData,
|
|
745
|
+
): void => {
|
|
746
|
+
const mappingElement = node.mappingElement;
|
|
747
|
+
const treeData = this.mappingExplorerTreeData;
|
|
748
|
+
if (node.childrenIds?.length) {
|
|
749
|
+
node.isOpen = !node.isOpen;
|
|
750
|
+
if (
|
|
751
|
+
mappingElement instanceof FlatDataInstanceSetImplementation ||
|
|
752
|
+
mappingElement instanceof EmbeddedFlatDataPropertyMapping
|
|
753
|
+
) {
|
|
754
|
+
mappingElement.propertyMappings
|
|
755
|
+
.filter(filterByType(EmbeddedFlatDataPropertyMapping))
|
|
756
|
+
.forEach((embeddedPM) => {
|
|
757
|
+
const embeddedPropertyNode = getMappingElementTreeNodeData(
|
|
758
|
+
embeddedPM,
|
|
759
|
+
this.editorStore,
|
|
760
|
+
);
|
|
761
|
+
treeData.nodes.set(embeddedPropertyNode.id, embeddedPropertyNode);
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
this.setMappingExplorerTreeNodeData({ ...treeData });
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
onMappingExplorerTreeNodeSelect = (
|
|
769
|
+
node: MappingExplorerTreeNodeData,
|
|
770
|
+
): void => {
|
|
771
|
+
this.onMappingExplorerTreeNodeExpand(node);
|
|
772
|
+
this.openMappingElement(node.mappingElement, false);
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
getMappingExplorerTreeChildNodes = (
|
|
776
|
+
node: MappingExplorerTreeNodeData,
|
|
777
|
+
): MappingExplorerTreeNodeData[] => {
|
|
778
|
+
if (!node.childrenIds) {
|
|
779
|
+
return [];
|
|
780
|
+
}
|
|
781
|
+
const childrenNodes = node.childrenIds
|
|
782
|
+
.map((id) => this.mappingExplorerTreeData.nodes.get(id))
|
|
783
|
+
.filter(isNonNullable)
|
|
784
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
|
785
|
+
return childrenNodes;
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
reprocessMappingExplorerTree(openNodeFoCurrentTab = false): void {
|
|
789
|
+
const openedTreeNodeIds = Array.from(
|
|
790
|
+
this.mappingExplorerTreeData.nodes.values(),
|
|
791
|
+
)
|
|
792
|
+
.filter((node) => node.isOpen)
|
|
793
|
+
.map((node) => node.id);
|
|
794
|
+
this.setMappingExplorerTreeNodeData(
|
|
795
|
+
reprocessMappingElementNodes(
|
|
796
|
+
this.mapping,
|
|
797
|
+
openedTreeNodeIds,
|
|
798
|
+
this.editorStore,
|
|
799
|
+
),
|
|
800
|
+
);
|
|
801
|
+
if (openNodeFoCurrentTab) {
|
|
802
|
+
// TODO: we should follow the example of project explorer where we maintain the currentlySelectedNode
|
|
803
|
+
// instead of adaptively show the `selectedNode` based on current tab state. This is bad
|
|
804
|
+
// this.setMappingElementTreeNodeData(openNode(openElement, this.mappingElementsTreeData));
|
|
805
|
+
// const openNode = (element: EmbeddedFlatDataPropertyMapping, treeData: TreeData<MappingElementTreeNodeData>): MappingElementTreeNodeData => {
|
|
806
|
+
// if (element instanceof EmbeddedFlatDataPropertyMapping) {
|
|
807
|
+
// let currentElement: InstanceSetImplementation | undefined = element;
|
|
808
|
+
// while (currentElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
809
|
+
// const node: MappingElementTreeNodeData = treeData.nodes.get(currentElement.id) ?? addNode(currentElement, treeData);
|
|
810
|
+
// node.isOpen = true;
|
|
811
|
+
// currentElement = currentElement.owner as InstanceSetImplementation;
|
|
812
|
+
// }
|
|
813
|
+
// // create children if not created
|
|
814
|
+
// element.propertyMappings.filter((me: AbstractFlatDataPropertyMapping): me is EmbeddedFlatDataPropertyMapping => me instanceof EmbeddedFlatDataPropertyMapping)
|
|
815
|
+
// .forEach(el => treeData.nodes.get(el.id) ?? addNode(el, treeData));
|
|
816
|
+
// }
|
|
817
|
+
// return treeData;
|
|
818
|
+
// const addNode = (element: EmbeddedFlatDataPropertyMapping, treeData: TreeData<MappingElementTreeNodeData>): MappingElementTreeNodeData => {
|
|
819
|
+
// const newNode = getMappingElementTreeNodeData(element);
|
|
820
|
+
// treeData.nodes.set(newNode.id, newNode);
|
|
821
|
+
// if (element.owner instanceof FlatDataInstanceSetImplementation || element.owner instanceof EmbeddedFlatDataPropertyMapping) {
|
|
822
|
+
// const baseNode = treeData.nodes.get(element.owner.id);
|
|
823
|
+
// if (baseNode) {
|
|
824
|
+
// baseNode.isOpen = true;
|
|
825
|
+
// }
|
|
826
|
+
// } else {
|
|
827
|
+
// const parentNode = treeData.nodes.get(element.owner.id);
|
|
828
|
+
// if (parentNode) {
|
|
829
|
+
// parentNode.childrenIds = parentNode.childrenIds ? Array.from((new Set(parentNode.childrenIds)).add(newNode.id)) : [newNode.id];
|
|
830
|
+
// }
|
|
831
|
+
// }
|
|
832
|
+
// return newNode;
|
|
833
|
+
// };
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// -------------------------------------- Mapping Element ---------------------------------------
|
|
838
|
+
|
|
839
|
+
openMappingElement(
|
|
840
|
+
mappingElement: MappingElement,
|
|
841
|
+
openInAdjacentTab: boolean,
|
|
842
|
+
): void {
|
|
843
|
+
if (mappingElement instanceof AssociationImplementation) {
|
|
844
|
+
this.editorStore.applicationStore.notifyUnsupportedFeature(
|
|
845
|
+
'Association mapping editor',
|
|
846
|
+
);
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
// Open mapping element from included mapping in another mapping editor tab
|
|
850
|
+
if (mappingElement._PARENT !== this.element) {
|
|
851
|
+
this.editorStore.openElement(mappingElement._PARENT);
|
|
852
|
+
}
|
|
853
|
+
const currentMappingEditorState =
|
|
854
|
+
this.editorStore.getCurrentEditorState(MappingEditorState);
|
|
855
|
+
// If the next mapping element to be opened is not opened yet, we will find the right place to put it in the tab bar
|
|
856
|
+
if (
|
|
857
|
+
!currentMappingEditorState.openedTabStates.find(
|
|
858
|
+
(tabState) =>
|
|
859
|
+
tabState instanceof MappingElementState &&
|
|
860
|
+
tabState.mappingElement === mappingElement,
|
|
861
|
+
)
|
|
862
|
+
) {
|
|
863
|
+
const newMappingElementState = guaranteeNonNullable(
|
|
864
|
+
currentMappingEditorState.createMappingElementState(mappingElement),
|
|
865
|
+
);
|
|
866
|
+
if (openInAdjacentTab) {
|
|
867
|
+
const currentMappingElementIndex = this.openedTabStates.findIndex(
|
|
868
|
+
(tabState) => tabState === this.currentTabState,
|
|
869
|
+
);
|
|
870
|
+
if (currentMappingElementIndex !== -1) {
|
|
871
|
+
currentMappingEditorState.openedTabStates.splice(
|
|
872
|
+
currentMappingElementIndex + 1,
|
|
873
|
+
0,
|
|
874
|
+
newMappingElementState,
|
|
875
|
+
);
|
|
876
|
+
} else {
|
|
877
|
+
throw new IllegalStateError(`Can't find current mapping editor tab`);
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
currentMappingEditorState.openedTabStates.push(newMappingElementState);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
// Set current mapping element, i.e. switch to new tab
|
|
884
|
+
currentMappingEditorState.currentTabState =
|
|
885
|
+
currentMappingEditorState.openedTabStates.find(
|
|
886
|
+
(tabState) =>
|
|
887
|
+
tabState instanceof MappingElementState &&
|
|
888
|
+
tabState.mappingElement === mappingElement,
|
|
889
|
+
);
|
|
890
|
+
currentMappingEditorState.reprocessMappingExplorerTree(true);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
*changeClassMappingSourceDriver(
|
|
894
|
+
setImplementation: InstanceSetImplementation,
|
|
895
|
+
newSource: MappingElementSource | undefined,
|
|
896
|
+
): GeneratorFn<void> {
|
|
897
|
+
const currentSource = getMappingElementSource(
|
|
898
|
+
setImplementation,
|
|
899
|
+
this.editorStore.pluginManager.getApplicationPlugins(),
|
|
900
|
+
);
|
|
901
|
+
if (currentSource !== newSource) {
|
|
902
|
+
// first, we check if the current class mapping is compatible with the new source
|
|
903
|
+
// if it is, we don't need to create a new class mapping,
|
|
904
|
+
// if it is not, we would need to create a new class mapping that is compatible with the new source
|
|
905
|
+
// and as a result, we will reset all the property mappings
|
|
906
|
+
//
|
|
907
|
+
// TODO?: we might need to think of how we would handle embedded class mapping
|
|
908
|
+
let sourceUpdated = false;
|
|
909
|
+
if (setImplementation instanceof PureInstanceSetImplementation) {
|
|
910
|
+
if (newSource instanceof Class || newSource === undefined) {
|
|
911
|
+
pureInstanceSetImpl_setSrcClass(
|
|
912
|
+
setImplementation,
|
|
913
|
+
newSource
|
|
914
|
+
? PackageableElementExplicitReference.create(newSource)
|
|
915
|
+
: undefined,
|
|
916
|
+
);
|
|
917
|
+
sourceUpdated = true;
|
|
918
|
+
}
|
|
919
|
+
} else if (
|
|
920
|
+
setImplementation instanceof FlatDataInstanceSetImplementation
|
|
921
|
+
) {
|
|
922
|
+
if (
|
|
923
|
+
newSource instanceof RootFlatDataRecordType &&
|
|
924
|
+
!getEmbeddedSetImplementations(setImplementation).length
|
|
925
|
+
) {
|
|
926
|
+
flatData_setSourceRootRecordType(setImplementation, newSource);
|
|
927
|
+
sourceUpdated = true;
|
|
928
|
+
}
|
|
929
|
+
} else if (
|
|
930
|
+
setImplementation instanceof RootRelationalInstanceSetImplementation
|
|
931
|
+
) {
|
|
932
|
+
if (
|
|
933
|
+
newSource instanceof TableAlias &&
|
|
934
|
+
!getEmbeddedSetImplementations(setImplementation).length
|
|
935
|
+
) {
|
|
936
|
+
rootRelationalSetImp_setMainTableAlias(setImplementation, newSource);
|
|
937
|
+
sourceUpdated = true;
|
|
938
|
+
}
|
|
939
|
+
} else {
|
|
940
|
+
const extraInstanceSetImplementationSourceUpdaters =
|
|
941
|
+
this.editorStore.pluginManager
|
|
942
|
+
.getApplicationPlugins()
|
|
943
|
+
.flatMap(
|
|
944
|
+
(plugin) =>
|
|
945
|
+
(
|
|
946
|
+
plugin as DSLMapping_LegendStudioApplicationPlugin_Extension
|
|
947
|
+
).getExtraInstanceSetImplementationSourceUpdaters?.() ?? [],
|
|
948
|
+
);
|
|
949
|
+
for (const updater of extraInstanceSetImplementationSourceUpdaters) {
|
|
950
|
+
sourceUpdated = updater(setImplementation, newSource);
|
|
951
|
+
if (sourceUpdated) {
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// here we require a change of set implementation as the source type does not match the what the current class mapping supports
|
|
958
|
+
if (!sourceUpdated) {
|
|
959
|
+
let newSetImp: InstanceSetImplementation;
|
|
960
|
+
if (newSource instanceof Class || newSource === undefined) {
|
|
961
|
+
newSetImp = new PureInstanceSetImplementation(
|
|
962
|
+
setImplementation.id,
|
|
963
|
+
this.mapping,
|
|
964
|
+
setImplementation.class,
|
|
965
|
+
setImplementation.root,
|
|
966
|
+
newSource
|
|
967
|
+
? PackageableElementExplicitReference.create(newSource)
|
|
968
|
+
: undefined,
|
|
969
|
+
);
|
|
970
|
+
} else if (newSource instanceof RootFlatDataRecordType) {
|
|
971
|
+
newSetImp = new FlatDataInstanceSetImplementation(
|
|
972
|
+
setImplementation.id,
|
|
973
|
+
this.mapping,
|
|
974
|
+
PackageableElementExplicitReference.create(
|
|
975
|
+
setImplementation.class.value,
|
|
976
|
+
),
|
|
977
|
+
setImplementation.root,
|
|
978
|
+
RootFlatDataRecordTypeExplicitReference.create(newSource),
|
|
979
|
+
);
|
|
980
|
+
} else if (newSource instanceof TableAlias) {
|
|
981
|
+
const newRootRelationalInstanceSetImplementation =
|
|
982
|
+
new RootRelationalInstanceSetImplementation(
|
|
983
|
+
setImplementation.id,
|
|
984
|
+
this.mapping,
|
|
985
|
+
setImplementation.class,
|
|
986
|
+
setImplementation.root,
|
|
987
|
+
);
|
|
988
|
+
newRootRelationalInstanceSetImplementation.mainTableAlias = newSource;
|
|
989
|
+
newSetImp = newRootRelationalInstanceSetImplementation;
|
|
990
|
+
} else {
|
|
991
|
+
throw new UnsupportedOperationError(
|
|
992
|
+
`Can't use the specified class mapping source`,
|
|
993
|
+
newSource,
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
// replace the instance set implementation in mapping
|
|
998
|
+
const idx = guaranteeNonNullable(
|
|
999
|
+
this.mapping.classMappings.findIndex(
|
|
1000
|
+
(classMapping) => classMapping === setImplementation,
|
|
1001
|
+
),
|
|
1002
|
+
`Can't find class mapping with ID '${setImplementation.id.value}' in mapping '${this.mapping.path}'`,
|
|
1003
|
+
);
|
|
1004
|
+
this.mapping.classMappings[idx] = newSetImp;
|
|
1005
|
+
|
|
1006
|
+
// replace the instance set implementation in opened tab state
|
|
1007
|
+
const setImplStateIdx = guaranteeNonNullable(
|
|
1008
|
+
this.openedTabStates.findIndex(
|
|
1009
|
+
(tabState) =>
|
|
1010
|
+
tabState instanceof MappingElementState &&
|
|
1011
|
+
tabState.mappingElement === setImplementation,
|
|
1012
|
+
),
|
|
1013
|
+
`Can't find any mapping state for class mapping with ID '${setImplementation.id.value}'`,
|
|
1014
|
+
);
|
|
1015
|
+
const newMappingElementState = guaranteeNonNullable(
|
|
1016
|
+
this.createMappingElementState(newSetImp),
|
|
1017
|
+
);
|
|
1018
|
+
this.openedTabStates[setImplStateIdx] = newMappingElementState;
|
|
1019
|
+
this.currentTabState = newMappingElementState;
|
|
1020
|
+
|
|
1021
|
+
// close all children
|
|
1022
|
+
yield flowResult(this.closeMappingElementTabState(setImplementation));
|
|
1023
|
+
this.reprocessMappingExplorerTree(true);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
private *closeMappingElementTabState(
|
|
1029
|
+
mappingElement: MappingElement,
|
|
1030
|
+
): GeneratorFn<void> {
|
|
1031
|
+
let mappingElementsToClose = [mappingElement];
|
|
1032
|
+
if (
|
|
1033
|
+
this.editorStore.graphManagerState.isInstanceSetImplementation(
|
|
1034
|
+
mappingElement,
|
|
1035
|
+
)
|
|
1036
|
+
) {
|
|
1037
|
+
const embeddedChildren = getEmbeddedSetImplementations(mappingElement);
|
|
1038
|
+
mappingElementsToClose = mappingElementsToClose.concat(embeddedChildren);
|
|
1039
|
+
}
|
|
1040
|
+
const matchMappingElementState = (
|
|
1041
|
+
tabState: MappingEditorTabState | undefined,
|
|
1042
|
+
): boolean =>
|
|
1043
|
+
tabState instanceof MappingElementState &&
|
|
1044
|
+
mappingElementsToClose.includes(tabState.mappingElement);
|
|
1045
|
+
if (
|
|
1046
|
+
this.currentTabState &&
|
|
1047
|
+
matchMappingElementState(this.currentTabState)
|
|
1048
|
+
) {
|
|
1049
|
+
yield flowResult(this.closeTab(this.currentTabState));
|
|
1050
|
+
}
|
|
1051
|
+
this.openedTabStates = this.openedTabStates.filter(
|
|
1052
|
+
(tabState) => !matchMappingElementState(tabState),
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
*deleteMappingElement(mappingElement: MappingElement): GeneratorFn<void> {
|
|
1057
|
+
if (mappingElement instanceof EnumerationMapping) {
|
|
1058
|
+
mapping_deleteEnumerationMapping(this.mapping, mappingElement);
|
|
1059
|
+
} else if (mappingElement instanceof AssociationImplementation) {
|
|
1060
|
+
mapping_deleteAssociationMapping(this.mapping, mappingElement);
|
|
1061
|
+
} else if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
1062
|
+
deleteEntry(mappingElement._OWNER.propertyMappings, mappingElement);
|
|
1063
|
+
} else if (
|
|
1064
|
+
mappingElement instanceof EmbeddedRelationalInstanceSetImplementation
|
|
1065
|
+
) {
|
|
1066
|
+
deleteEntry(mappingElement._OWNER.propertyMappings, mappingElement);
|
|
1067
|
+
} else if (mappingElement instanceof SetImplementation) {
|
|
1068
|
+
mapping_deleteClassMapping(this.mapping, mappingElement);
|
|
1069
|
+
}
|
|
1070
|
+
if (mappingElement instanceof SetImplementation) {
|
|
1071
|
+
setImpl_updateRootOnDelete(mappingElement);
|
|
1072
|
+
}
|
|
1073
|
+
yield flowResult(this.closeMappingElementTabState(mappingElement));
|
|
1074
|
+
this.reprocessMappingExplorerTree();
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* This will determine if we need to show the new mapping element modal or not
|
|
1079
|
+
*/
|
|
1080
|
+
createMappingElement(spec: MappingElementSpec): void {
|
|
1081
|
+
if (spec.target) {
|
|
1082
|
+
const suggestedId = fromElementPathToMappingElementId(spec.target.path);
|
|
1083
|
+
const mappingIds = getAllMappingElements(this.mapping).map(
|
|
1084
|
+
(mElement) => mElement.id.value,
|
|
1085
|
+
);
|
|
1086
|
+
const showId = mappingIds.includes(suggestedId);
|
|
1087
|
+
const showClasMappingType = spec.target instanceof Class;
|
|
1088
|
+
const showNewMappingModal = [
|
|
1089
|
+
showId,
|
|
1090
|
+
spec.showTarget,
|
|
1091
|
+
showClasMappingType,
|
|
1092
|
+
].some(Boolean);
|
|
1093
|
+
if (showNewMappingModal) {
|
|
1094
|
+
this.setNewMappingElementSpec(spec);
|
|
1095
|
+
} else {
|
|
1096
|
+
let newMappingElement: MappingElement | undefined = undefined;
|
|
1097
|
+
if (spec.target instanceof Enumeration) {
|
|
1098
|
+
// We default to a source type of String when creating a new enumeration mapping
|
|
1099
|
+
newMappingElement = createEnumerationMapping(
|
|
1100
|
+
this.mapping,
|
|
1101
|
+
suggestedId,
|
|
1102
|
+
spec.target,
|
|
1103
|
+
this.editorStore.graphManagerState.graph.getPrimitiveType(
|
|
1104
|
+
PRIMITIVE_TYPE.STRING,
|
|
1105
|
+
),
|
|
1106
|
+
);
|
|
1107
|
+
}
|
|
1108
|
+
// NOTE: we don't support association now, nor do we support this for class
|
|
1109
|
+
// since class requires a step to choose the class mapping type
|
|
1110
|
+
if (newMappingElement) {
|
|
1111
|
+
this.openMappingElement(newMappingElement, true);
|
|
1112
|
+
}
|
|
1113
|
+
if (spec.postSubmitAction) {
|
|
1114
|
+
spec.postSubmitAction(newMappingElement);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
} else {
|
|
1118
|
+
this.setNewMappingElementSpec(spec);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
private createMappingElementState(
|
|
1123
|
+
mappingElement: MappingElement | undefined,
|
|
1124
|
+
): MappingElementState | undefined {
|
|
1125
|
+
if (!mappingElement) {
|
|
1126
|
+
return undefined;
|
|
1127
|
+
}
|
|
1128
|
+
if (mappingElement instanceof PureInstanceSetImplementation) {
|
|
1129
|
+
return new PureInstanceSetImplementationState(
|
|
1130
|
+
this.editorStore,
|
|
1131
|
+
mappingElement,
|
|
1132
|
+
);
|
|
1133
|
+
} else if (mappingElement instanceof FlatDataInstanceSetImplementation) {
|
|
1134
|
+
return new RootFlatDataInstanceSetImplementationState(
|
|
1135
|
+
this.editorStore,
|
|
1136
|
+
mappingElement,
|
|
1137
|
+
);
|
|
1138
|
+
} else if (mappingElement instanceof EmbeddedFlatDataPropertyMapping) {
|
|
1139
|
+
throw new UnsupportedOperationError(
|
|
1140
|
+
`Can't create mapping element state for emebdded property mapping`,
|
|
1141
|
+
);
|
|
1142
|
+
} else if (
|
|
1143
|
+
mappingElement instanceof RootRelationalInstanceSetImplementation
|
|
1144
|
+
) {
|
|
1145
|
+
return new RootRelationalInstanceSetImplementationState(
|
|
1146
|
+
this.editorStore,
|
|
1147
|
+
mappingElement,
|
|
1148
|
+
);
|
|
1149
|
+
} else if (
|
|
1150
|
+
mappingElement instanceof EmbeddedRelationalInstanceSetImplementation ||
|
|
1151
|
+
mappingElement instanceof AggregationAwareSetImplementation
|
|
1152
|
+
) {
|
|
1153
|
+
return new UnsupportedInstanceSetImplementationState(
|
|
1154
|
+
this.editorStore,
|
|
1155
|
+
mappingElement,
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
const extraMappingElementStateCreators = this.editorStore.pluginManager
|
|
1159
|
+
.getApplicationPlugins()
|
|
1160
|
+
.flatMap(
|
|
1161
|
+
(plugin) =>
|
|
1162
|
+
(
|
|
1163
|
+
plugin as DSLMapping_LegendStudioApplicationPlugin_Extension
|
|
1164
|
+
).getExtraMappingElementStateCreators?.() ?? [],
|
|
1165
|
+
);
|
|
1166
|
+
for (const elementStateCreator of extraMappingElementStateCreators) {
|
|
1167
|
+
const mappingElementState = elementStateCreator(
|
|
1168
|
+
mappingElement,
|
|
1169
|
+
this.editorStore,
|
|
1170
|
+
);
|
|
1171
|
+
if (mappingElementState) {
|
|
1172
|
+
return mappingElementState;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
return new MappingElementState(this.editorStore, mappingElement);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
// -------------------------------------- Compilation ---------------------------------------
|
|
1179
|
+
|
|
1180
|
+
reprocess(newElement: Mapping, editorStore: EditorStore): MappingEditorState {
|
|
1181
|
+
const mappingEditorState = new MappingEditorState(editorStore, newElement);
|
|
1182
|
+
|
|
1183
|
+
// process tabs
|
|
1184
|
+
mappingEditorState.openedTabStates = this.openedTabStates
|
|
1185
|
+
.map((tabState) => {
|
|
1186
|
+
if (tabState instanceof MappingElementState) {
|
|
1187
|
+
const mappingElement = getMappingElementByTypeAndId(
|
|
1188
|
+
mappingEditorState.mapping,
|
|
1189
|
+
getMappingElementType(tabState.mappingElement),
|
|
1190
|
+
tabState.mappingElement.id.value,
|
|
1191
|
+
);
|
|
1192
|
+
return this.createMappingElementState(mappingElement);
|
|
1193
|
+
} else if (tabState instanceof MappingTestState) {
|
|
1194
|
+
return mappingEditorState.mappingTestStates.find(
|
|
1195
|
+
(testState) => testState.test.name === tabState.test.name,
|
|
1196
|
+
);
|
|
1197
|
+
} else if (tabState instanceof MappingExecutionState) {
|
|
1198
|
+
// TODO?: re-consider if we would want to reprocess mapping execution tabs or not
|
|
1199
|
+
return undefined;
|
|
1200
|
+
}
|
|
1201
|
+
// TODO?: re-consider if we would want to reprocess mapping execution tabs or not
|
|
1202
|
+
return undefined;
|
|
1203
|
+
})
|
|
1204
|
+
.filter(isNonNullable);
|
|
1205
|
+
|
|
1206
|
+
// process currently opened tab
|
|
1207
|
+
if (this.currentTabState instanceof MappingElementState) {
|
|
1208
|
+
const currentlyOpenedMappingElement = getMappingElementByTypeAndId(
|
|
1209
|
+
mappingEditorState.mapping,
|
|
1210
|
+
getMappingElementType(this.currentTabState.mappingElement),
|
|
1211
|
+
this.currentTabState.mappingElement.id.value,
|
|
1212
|
+
);
|
|
1213
|
+
mappingEditorState.currentTabState = this.openedTabStates.find(
|
|
1214
|
+
(tabState) =>
|
|
1215
|
+
tabState instanceof MappingElementState &&
|
|
1216
|
+
tabState.mappingElement === currentlyOpenedMappingElement,
|
|
1217
|
+
);
|
|
1218
|
+
} else if (this.currentTabState instanceof MappingTestState) {
|
|
1219
|
+
const currentlyOpenedMappingTest =
|
|
1220
|
+
mappingEditorState.mappingTestStates.find(
|
|
1221
|
+
(testState) =>
|
|
1222
|
+
this.currentTabState instanceof MappingTestState &&
|
|
1223
|
+
testState.test.name === this.currentTabState.test.name,
|
|
1224
|
+
)?.test;
|
|
1225
|
+
mappingEditorState.currentTabState = this.openedTabStates.find(
|
|
1226
|
+
(tabState) =>
|
|
1227
|
+
tabState instanceof MappingTestState &&
|
|
1228
|
+
tabState.test === currentlyOpenedMappingTest,
|
|
1229
|
+
);
|
|
1230
|
+
} else {
|
|
1231
|
+
// TODO?: re-consider if we would want to reprocess mapping execution tab or not
|
|
1232
|
+
mappingEditorState.currentTabState = undefined;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
return mappingEditorState;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
override revealCompilationError(compilationError: CompilationError): boolean {
|
|
1239
|
+
let revealed = false;
|
|
1240
|
+
try {
|
|
1241
|
+
if (compilationError.sourceInformation) {
|
|
1242
|
+
const errorCoordinates = extractSourceInformationCoordinates(
|
|
1243
|
+
compilationError.sourceInformation,
|
|
1244
|
+
);
|
|
1245
|
+
if (errorCoordinates) {
|
|
1246
|
+
const sourceId = compilationError.sourceInformation.sourceId;
|
|
1247
|
+
assertTrue(errorCoordinates.length >= 5);
|
|
1248
|
+
const [
|
|
1249
|
+
,
|
|
1250
|
+
mappingElementType,
|
|
1251
|
+
mappingElementId,
|
|
1252
|
+
propertyName,
|
|
1253
|
+
targetPropertyId,
|
|
1254
|
+
] = errorCoordinates;
|
|
1255
|
+
const newMappingElement = getMappingElementByTypeAndId(
|
|
1256
|
+
this.mapping,
|
|
1257
|
+
guaranteeNonNullable(
|
|
1258
|
+
mappingElementType,
|
|
1259
|
+
`Can't reveal compilation error: mapping type is missing`,
|
|
1260
|
+
),
|
|
1261
|
+
guaranteeNonNullable(
|
|
1262
|
+
mappingElementId,
|
|
1263
|
+
`Can't reveal compilation error: mapping ID is missing`,
|
|
1264
|
+
),
|
|
1265
|
+
);
|
|
1266
|
+
// TODO: take care of operation mapping using systematic coordinates
|
|
1267
|
+
// See https://github.com/finos/legend-studio/issues/1168
|
|
1268
|
+
if (newMappingElement instanceof InstanceSetImplementation) {
|
|
1269
|
+
const propertyMapping = findPropertyMapping(
|
|
1270
|
+
newMappingElement,
|
|
1271
|
+
guaranteeNonNullable(
|
|
1272
|
+
propertyName,
|
|
1273
|
+
`Can't reveal compilation error: mapping property name is missing`,
|
|
1274
|
+
),
|
|
1275
|
+
targetPropertyId,
|
|
1276
|
+
);
|
|
1277
|
+
if (propertyMapping) {
|
|
1278
|
+
if (
|
|
1279
|
+
!(this.currentTabState instanceof MappingElementState) ||
|
|
1280
|
+
newMappingElement !== this.currentTabState.mappingElement
|
|
1281
|
+
) {
|
|
1282
|
+
this.openMappingElement(newMappingElement, false);
|
|
1283
|
+
}
|
|
1284
|
+
if (
|
|
1285
|
+
// TODO: take care of operation mapping using systematic coordinates
|
|
1286
|
+
// See https://github.com/finos/legend-studio/issues/1168
|
|
1287
|
+
this.currentTabState instanceof InstanceSetImplementationState
|
|
1288
|
+
) {
|
|
1289
|
+
const propertyMappingState: LambdaEditorState | undefined = (
|
|
1290
|
+
this.currentTabState.propertyMappingStates as unknown[]
|
|
1291
|
+
)
|
|
1292
|
+
.filter(filterByType(LambdaEditorState))
|
|
1293
|
+
.find((state) => state.lambdaId === sourceId);
|
|
1294
|
+
if (propertyMappingState) {
|
|
1295
|
+
propertyMappingState.setCompilationError(compilationError);
|
|
1296
|
+
revealed = true;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
} catch (error) {
|
|
1304
|
+
assertErrorThrown(error);
|
|
1305
|
+
this.editorStore.applicationStore.log.warn(
|
|
1306
|
+
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
1307
|
+
`Can't locate error, redirecting to text mode`,
|
|
1308
|
+
error,
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
return revealed;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
override get hasCompilationError(): boolean {
|
|
1315
|
+
return this.openedTabStates
|
|
1316
|
+
.filter(filterByType(InstanceSetImplementationState))
|
|
1317
|
+
.some((tabState) =>
|
|
1318
|
+
tabState.propertyMappingStates.some((pmState) =>
|
|
1319
|
+
Boolean(pmState.compilationError),
|
|
1320
|
+
),
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
override clearCompilationError(): void {
|
|
1325
|
+
this.openedTabStates
|
|
1326
|
+
.filter(filterByType(InstanceSetImplementationState))
|
|
1327
|
+
.forEach((tabState) => {
|
|
1328
|
+
tabState.propertyMappingStates.forEach((pmState) =>
|
|
1329
|
+
pmState.setCompilationError(undefined),
|
|
1330
|
+
);
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
// -------------------------------------- Execution ---------------------------------------
|
|
1335
|
+
|
|
1336
|
+
*buildExecution(setImpl: SetImplementation): GeneratorFn<void> {
|
|
1337
|
+
const executionTabStates = this.openedTabStates.filter(
|
|
1338
|
+
filterByType(MappingExecutionState),
|
|
1339
|
+
);
|
|
1340
|
+
const executionStateName = generateEnumerableNameFromToken(
|
|
1341
|
+
executionTabStates.map((tabState) => tabState.name),
|
|
1342
|
+
'execution',
|
|
1343
|
+
);
|
|
1344
|
+
assertTrue(
|
|
1345
|
+
!executionTabStates.find(
|
|
1346
|
+
(tabState) => tabState.name === executionStateName,
|
|
1347
|
+
),
|
|
1348
|
+
`Can't auto-generate execution name for value '${executionStateName}'`,
|
|
1349
|
+
);
|
|
1350
|
+
const executionState = new MappingExecutionState(
|
|
1351
|
+
this.editorStore,
|
|
1352
|
+
this,
|
|
1353
|
+
executionStateName,
|
|
1354
|
+
);
|
|
1355
|
+
yield flowResult(executionState.buildQueryWithClassMapping(setImpl));
|
|
1356
|
+
addUniqueEntry(this.openedTabStates, executionState);
|
|
1357
|
+
this.currentTabState = executionState;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
// -------------------------------------- Test ---------------------------------------
|
|
1361
|
+
|
|
1362
|
+
*openTest(
|
|
1363
|
+
test: MappingTest,
|
|
1364
|
+
openTab?: MAPPING_TEST_EDITOR_TAB_TYPE,
|
|
1365
|
+
): GeneratorFn<void> {
|
|
1366
|
+
const isOpened = Boolean(
|
|
1367
|
+
this.openedTabStates.find(
|
|
1368
|
+
(tabState) =>
|
|
1369
|
+
tabState instanceof MappingTestState && tabState.test === test,
|
|
1370
|
+
),
|
|
1371
|
+
);
|
|
1372
|
+
const testState = this.mappingTestStates.find(
|
|
1373
|
+
(mappingTestState) => mappingTestState.test === test,
|
|
1374
|
+
);
|
|
1375
|
+
assertNonNullable(
|
|
1376
|
+
testState,
|
|
1377
|
+
`Mapping test state must already been created for test '${test.name}'`,
|
|
1378
|
+
);
|
|
1379
|
+
if (
|
|
1380
|
+
!this.openedTabStates.find(
|
|
1381
|
+
(tabState) =>
|
|
1382
|
+
tabState instanceof MappingTestState && tabState.test === test,
|
|
1383
|
+
)
|
|
1384
|
+
) {
|
|
1385
|
+
addUniqueEntry(this.openedTabStates, testState);
|
|
1386
|
+
}
|
|
1387
|
+
this.currentTabState = this.openedTabStates.find(
|
|
1388
|
+
(tabState) =>
|
|
1389
|
+
tabState instanceof MappingTestState && tabState.test === test,
|
|
1390
|
+
);
|
|
1391
|
+
yield flowResult(
|
|
1392
|
+
testState.onTestStateOpen(
|
|
1393
|
+
openTab ??
|
|
1394
|
+
// This is for user's convenience.
|
|
1395
|
+
// If the test is already opened, respect is currently opened tab
|
|
1396
|
+
// otherwise, if the test has a result, switch to show the result tab
|
|
1397
|
+
(!isOpened && testState.result !== TEST_RESULT.NONE
|
|
1398
|
+
? MAPPING_TEST_EDITOR_TAB_TYPE.RESULT
|
|
1399
|
+
: undefined),
|
|
1400
|
+
),
|
|
1401
|
+
);
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
get testSuiteResult(): TEST_RESULT {
|
|
1405
|
+
const numberOfTestPassed = this.mappingTestStates.filter(
|
|
1406
|
+
(testState) => testState.result === TEST_RESULT.PASSED,
|
|
1407
|
+
).length;
|
|
1408
|
+
const numberOfTestFailed = this.mappingTestStates.filter(
|
|
1409
|
+
(testState) =>
|
|
1410
|
+
testState.result === TEST_RESULT.FAILED ||
|
|
1411
|
+
testState.result === TEST_RESULT.ERROR,
|
|
1412
|
+
).length;
|
|
1413
|
+
return numberOfTestFailed
|
|
1414
|
+
? TEST_RESULT.FAILED
|
|
1415
|
+
: numberOfTestPassed
|
|
1416
|
+
? TEST_RESULT.PASSED
|
|
1417
|
+
: TEST_RESULT.NONE;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
*runTests(): GeneratorFn<void> {
|
|
1421
|
+
const startTime = Date.now();
|
|
1422
|
+
this.isRunningAllTests = true;
|
|
1423
|
+
this.mappingTestStates.forEach((testState) =>
|
|
1424
|
+
testState.resetTestRunStatus(),
|
|
1425
|
+
);
|
|
1426
|
+
yield Promise.all(
|
|
1427
|
+
this.mappingTestStates.map((testState: MappingTestState) => {
|
|
1428
|
+
// run non-skip tests, and reset all skipped tests
|
|
1429
|
+
if (!testState.isSkipped) {
|
|
1430
|
+
return testState.runTest();
|
|
1431
|
+
}
|
|
1432
|
+
testState.resetTestRunStatus();
|
|
1433
|
+
return undefined;
|
|
1434
|
+
}),
|
|
1435
|
+
);
|
|
1436
|
+
this.isRunningAllTests = false;
|
|
1437
|
+
this.allTestRunTime = Date.now() - startTime;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
*addTest(test: MappingTest): GeneratorFn<void> {
|
|
1441
|
+
this.mappingTestStates.push(
|
|
1442
|
+
new MappingTestState(this.editorStore, test, this),
|
|
1443
|
+
);
|
|
1444
|
+
mapping_addTest(
|
|
1445
|
+
this.mapping,
|
|
1446
|
+
test,
|
|
1447
|
+
this.editorStore.changeDetectionState.observerContext,
|
|
1448
|
+
);
|
|
1449
|
+
yield flowResult(this.openTest(test));
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
*deleteTest(test: MappingTest): GeneratorFn<void> {
|
|
1453
|
+
const matchMappingTestState = (
|
|
1454
|
+
tabState: MappingEditorTabState | undefined,
|
|
1455
|
+
): boolean =>
|
|
1456
|
+
tabState instanceof MappingTestState && tabState.test === test;
|
|
1457
|
+
mapping_deleteTest(this.mapping, test);
|
|
1458
|
+
if (this.currentTabState && matchMappingTestState(this.currentTabState)) {
|
|
1459
|
+
yield flowResult(this.closeTab(this.currentTabState));
|
|
1460
|
+
}
|
|
1461
|
+
this.openedTabStates = this.openedTabStates.filter(
|
|
1462
|
+
(tabState) => !matchMappingTestState(tabState),
|
|
1463
|
+
);
|
|
1464
|
+
this.mappingTestStates = this.mappingTestStates.filter(
|
|
1465
|
+
(tabState) => !matchMappingTestState(tabState),
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
*createNewTest(setImplementation: SetImplementation): GeneratorFn<void> {
|
|
1470
|
+
const query =
|
|
1471
|
+
this.editorStore.graphManagerState.graphManager.HACKY__createGetAllLambda(
|
|
1472
|
+
setImplementation.class.value,
|
|
1473
|
+
);
|
|
1474
|
+
const source = getMappingElementSource(
|
|
1475
|
+
setImplementation,
|
|
1476
|
+
this.editorStore.pluginManager.getApplicationPlugins(),
|
|
1477
|
+
);
|
|
1478
|
+
if (setImplementation instanceof OperationSetImplementation) {
|
|
1479
|
+
this.editorStore.applicationStore.notifyWarning(
|
|
1480
|
+
`Can't auto-generate input data for operation class mapping. Please pick a concrete class mapping instead`,
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
let inputData: InputData;
|
|
1484
|
+
if (source === undefined || source instanceof Class) {
|
|
1485
|
+
inputData = new ObjectInputData(
|
|
1486
|
+
PackageableElementExplicitReference.create(source ?? stub_Class()),
|
|
1487
|
+
ObjectInputType.JSON,
|
|
1488
|
+
source
|
|
1489
|
+
? createMockDataForMappingElementSource(source, this.editorStore)
|
|
1490
|
+
: '{}',
|
|
1491
|
+
);
|
|
1492
|
+
} else if (source instanceof RootFlatDataRecordType) {
|
|
1493
|
+
inputData = new FlatDataInputData(
|
|
1494
|
+
PackageableElementExplicitReference.create(source._OWNER._OWNER),
|
|
1495
|
+
createMockDataForMappingElementSource(source, this.editorStore),
|
|
1496
|
+
);
|
|
1497
|
+
} else if (source instanceof TableAlias) {
|
|
1498
|
+
inputData = new RelationalInputData(
|
|
1499
|
+
PackageableElementExplicitReference.create(
|
|
1500
|
+
source.relation.ownerReference.value,
|
|
1501
|
+
),
|
|
1502
|
+
createMockDataForMappingElementSource(source, this.editorStore),
|
|
1503
|
+
RelationalInputType.SQL,
|
|
1504
|
+
);
|
|
1505
|
+
} else {
|
|
1506
|
+
throw new UnsupportedOperationError(
|
|
1507
|
+
`Can't create new mapping test input data with the specified source`,
|
|
1508
|
+
source,
|
|
1509
|
+
);
|
|
1510
|
+
}
|
|
1511
|
+
const newTest = new MappingTest(
|
|
1512
|
+
generateMappingTestName(this.mapping),
|
|
1513
|
+
query,
|
|
1514
|
+
[inputData],
|
|
1515
|
+
new ExpectedOutputMappingTestAssert('{}'),
|
|
1516
|
+
);
|
|
1517
|
+
mapping_addTest(
|
|
1518
|
+
this.mapping,
|
|
1519
|
+
newTest,
|
|
1520
|
+
this.editorStore.changeDetectionState.observerContext,
|
|
1521
|
+
);
|
|
1522
|
+
// open the test
|
|
1523
|
+
this.mappingTestStates.push(
|
|
1524
|
+
new MappingTestState(this.editorStore, newTest, this),
|
|
1525
|
+
);
|
|
1526
|
+
yield flowResult(this.openTest(newTest));
|
|
1527
|
+
}
|
|
1528
|
+
}
|