@finos/legend-application-studio 15.1.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application/LegendStudio.d.ts.map +1 -1
- package/lib/application/LegendStudio.js +5 -2
- package/lib/application/LegendStudio.js.map +1 -1
- package/lib/application/LegendStudioPluginManager.js +2 -2
- package/lib/application/LegendStudioPluginManager.js.map +1 -1
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts +4 -4
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js +3 -3
- package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +19 -23
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/EmbeddedQueryBuilder.d.ts +19 -0
- package/lib/components/EmbeddedQueryBuilder.d.ts.map +1 -0
- package/lib/components/EmbeddedQueryBuilder.js +80 -0
- package/lib/components/EmbeddedQueryBuilder.js.map +1 -0
- package/lib/components/LegendStudioApplication.d.ts +0 -1
- package/lib/components/LegendStudioApplication.d.ts.map +1 -1
- package/lib/components/editor/Editor.d.ts.map +1 -1
- package/lib/components/editor/Editor.js +12 -13
- package/lib/components/editor/Editor.js.map +1 -1
- package/lib/components/editor/StatusBar.d.ts +0 -1
- package/lib/components/editor/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +0 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/Console.d.ts +0 -1
- package/lib/components/editor/aux-panel/Console.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/DevTool.d.ts +0 -1
- package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts +0 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts +0 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +3 -3
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +15 -3
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.d.ts +0 -1
- package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +2 -2
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.d.ts +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.d.ts.map +1 -0
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.js +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +3 -13
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +103 -41
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +25 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +77 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +0 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +0 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +2 -5
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +40 -8
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts +18 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +38 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +40 -8
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +2 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +58 -10
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +7 -5
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +2 -2
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -7
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.d.ts +19 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js +80 -0
- package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js.map +1 -0
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +0 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +7 -4
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts +0 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +15 -8
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/LocalChanges.d.ts +0 -1
- package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.d.ts +0 -1
- package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/SideBar.d.ts +0 -1
- package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +0 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +8 -2
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -1
- package/lib/components/project-viewer/ProjectViewer.js +5 -6
- package/lib/components/project-viewer/ProjectViewer.js.map +1 -1
- package/lib/components/shared/DiffView.d.ts +0 -1
- package/lib/components/shared/DiffView.d.ts.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.d.ts +0 -1
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +0 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +0 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -1
- package/lib/components/workspace-setup/ProjectCreateModal.d.ts +0 -1
- package/lib/components/workspace-setup/ProjectCreateModal.d.ts.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +9 -9
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts +0 -18
- package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts +0 -10
- package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +1 -1
- package/lib/stores/EditorStore.d.ts +3 -9
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +6 -54
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.d.ts +40 -0
- package/lib/stores/EmbeddedQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/EmbeddedQueryBuilderState.js +80 -0
- package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.d.ts +1 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
- package/lib/stores/LegendStudioApplicationNavigationContext.js +1 -0
- package/lib/stores/LegendStudioApplicationNavigationContext.js.map +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +7 -7
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendStudioCodeSnippets.d.ts +2 -0
- package/lib/stores/LegendStudioCodeSnippets.d.ts.map +1 -1
- package/lib/stores/LegendStudioCodeSnippets.js +28 -0
- package/lib/stores/LegendStudioCodeSnippets.js.map +1 -1
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts +41 -6
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +5 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +10 -6
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +9 -2
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +40 -10
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts +30 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js +49 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts +29 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js +42 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +2 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +6 -4
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +10 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +27 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/shared/DnDUtil.js +1 -1
- package/lib/stores/shared/PackageTreeUtil.js +6 -6
- package/lib/stores/shared/PackageTreeUtil.js.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +1 -3
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +1 -4
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/package.json +17 -17
- package/src/application/LegendStudio.tsx +8 -2
- package/src/application/LegendStudioPluginManager.ts +2 -2
- package/src/components/DSLExternalFormat_LegendStudioApplicationPlugin.tsx +5 -5
- package/src/components/EditorComponentTestUtils.tsx +20 -35
- package/src/components/EmbeddedQueryBuilder.tsx +165 -0
- package/src/components/editor/Editor.tsx +77 -79
- package/src/components/editor/edit-panel/FunctionEditor.tsx +9 -2
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +24 -2
- package/src/components/editor/edit-panel/UnsupportedElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +1 -1
- package/src/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.tsx +0 -0
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +371 -172
- package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +279 -0
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +2 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +5 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +2 -9
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +88 -15
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +93 -0
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +81 -16
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +4 -3
- package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx +1 -1
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +115 -20
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +12 -5
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +3 -1
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +21 -12
- package/src/components/editor/edit-panel/uml-editor/ClassQueryBuilder.tsx +159 -0
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +7 -4
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +7 -4
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +9 -3
- package/src/components/editor/side-bar/Explorer.tsx +20 -10
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +13 -1
- package/src/components/project-viewer/ProjectViewer.tsx +36 -38
- package/src/index.ts +7 -3
- package/src/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.ts +0 -27
- package/src/stores/DSLService_LegendStudioApplicationPlugin_Extension.ts +0 -14
- package/src/stores/EditorGraphState.ts +1 -1
- package/src/stores/EditorStore.ts +5 -81
- package/src/stores/EmbeddedQueryBuilderState.ts +105 -0
- package/src/stores/LegendStudioApplicationNavigationContext.ts +1 -0
- package/src/stores/LegendStudioApplicationPlugin.ts +7 -7
- package/src/stores/LegendStudioCodeSnippets.ts +34 -0
- package/src/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.ts +74 -5
- package/src/stores/editor/NewElementState.ts +8 -7
- package/src/stores/editor-state/ModelImporterState.ts +15 -11
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +55 -9
- package/src/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.ts +73 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.ts +58 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +14 -4
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +64 -0
- package/src/stores/shared/DnDUtil.ts +1 -1
- package/src/stores/shared/PackageTreeUtil.ts +6 -6
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +2 -9
- package/tsconfig.json +10 -3
- package/tsconfig.package.json +38 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.d.ts.map +0 -1
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js.map +0 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import {
|
|
20
20
|
type MappingTestState,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
WrenchIcon,
|
|
46
46
|
PauseCircleIcon,
|
|
47
47
|
PanelDropZone,
|
|
48
|
+
PencilIcon,
|
|
48
49
|
} from '@finos/legend-art';
|
|
49
50
|
import { useDrop } from 'react-dnd';
|
|
50
51
|
import {
|
|
@@ -55,6 +56,8 @@ import {
|
|
|
55
56
|
IllegalStateError,
|
|
56
57
|
guaranteeType,
|
|
57
58
|
tryToFormatLosslessJSONString,
|
|
59
|
+
hashObject,
|
|
60
|
+
assertErrorThrown,
|
|
58
61
|
} from '@finos/legend-shared';
|
|
59
62
|
import {
|
|
60
63
|
EDITOR_LANGUAGE,
|
|
@@ -84,12 +87,13 @@ import {
|
|
|
84
87
|
DEPRECATED__validate_MappingTestAssert,
|
|
85
88
|
} from '@finos/legend-graph';
|
|
86
89
|
import { StudioTextInputEditor } from '../../../shared/StudioTextInputEditor.js';
|
|
87
|
-
import type { DSLMapping_LegendStudioApplicationPlugin_Extension } from '../../../../stores/DSLMapping_LegendStudioApplicationPlugin_Extension.js';
|
|
88
90
|
import { flatData_setData } from '../../../../stores/graphModifier/StoreFlatData_GraphModifierHelper.js';
|
|
89
91
|
import {
|
|
90
92
|
relationalInputData_setData,
|
|
91
93
|
relationalInputData_setInputType,
|
|
92
94
|
} from '../../../../stores/graphModifier/StoreRelational_GraphModifierHelper.js';
|
|
95
|
+
import type { QueryBuilderState } from '@finos/legend-query-builder';
|
|
96
|
+
import { MappingExecutionQueryBuilderState } from '../../../../stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js';
|
|
93
97
|
|
|
94
98
|
const MappingTestQueryEditor = observer(
|
|
95
99
|
(props: { testState: MappingTestState; isReadOnly: boolean }) => {
|
|
@@ -98,19 +102,73 @@ const MappingTestQueryEditor = observer(
|
|
|
98
102
|
const editorStore = useEditorStore();
|
|
99
103
|
const applicationStore = useApplicationStore();
|
|
100
104
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
// actions
|
|
106
|
+
const editWithQueryBuilder = applicationStore.guardUnhandledError(
|
|
107
|
+
async () => {
|
|
108
|
+
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
|
109
|
+
await flowResult(
|
|
110
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
|
111
|
+
setupQueryBuilderState: (): QueryBuilderState => {
|
|
112
|
+
const queryBuilderState = new MappingExecutionQueryBuilderState(
|
|
113
|
+
testState.mappingEditorState.mapping,
|
|
114
|
+
embeddedQueryBuilderState.editorStore.applicationStore,
|
|
115
|
+
embeddedQueryBuilderState.editorStore.graphManagerState,
|
|
116
|
+
);
|
|
117
|
+
queryBuilderState.initializeWithQuery(testState.queryState.query);
|
|
118
|
+
queryBuilderState.changeDetectionState.setQueryHashCode(
|
|
119
|
+
hashObject(testState.queryState.query),
|
|
120
|
+
);
|
|
121
|
+
queryBuilderState.changeDetectionState.setIsEnabled(true);
|
|
122
|
+
return queryBuilderState;
|
|
123
|
+
},
|
|
124
|
+
actionConfigs: [
|
|
125
|
+
{
|
|
126
|
+
key: 'save-query-btn',
|
|
127
|
+
renderer: (
|
|
128
|
+
queryBuilderState: QueryBuilderState,
|
|
129
|
+
): React.ReactNode => {
|
|
130
|
+
const save = applicationStore.guardUnhandledError(
|
|
131
|
+
async (): Promise<void> => {
|
|
132
|
+
try {
|
|
133
|
+
const rawLambda = queryBuilderState.buildQuery();
|
|
134
|
+
await flowResult(
|
|
135
|
+
testState.queryState.updateLamba(rawLambda),
|
|
136
|
+
);
|
|
137
|
+
applicationStore.notifySuccess(
|
|
138
|
+
`Mapping test query is updated`,
|
|
139
|
+
);
|
|
140
|
+
queryBuilderState.changeDetectionState.setQueryHashCode(
|
|
141
|
+
hashObject(rawLambda),
|
|
142
|
+
);
|
|
143
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration(
|
|
144
|
+
undefined,
|
|
145
|
+
);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
assertErrorThrown(error);
|
|
148
|
+
applicationStore.notifyError(
|
|
149
|
+
`Can't save query: ${error.message}`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
return (
|
|
155
|
+
<button
|
|
156
|
+
className="query-builder__dialog__header__custom-action"
|
|
157
|
+
tabIndex={-1}
|
|
158
|
+
disabled={isReadOnly}
|
|
159
|
+
onClick={save}
|
|
160
|
+
>
|
|
161
|
+
Save Query
|
|
162
|
+
</button>
|
|
163
|
+
);
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
disableCompile: isStubbed_RawLambda(testState.queryState.query),
|
|
168
|
+
}),
|
|
169
|
+
);
|
|
170
|
+
},
|
|
171
|
+
);
|
|
114
172
|
|
|
115
173
|
// Class mapping selector
|
|
116
174
|
const [openClassMappingSelectorModal, setOpenClassMappingSelectorModal] =
|
|
@@ -203,7 +261,14 @@ const MappingTestQueryEditor = observer(
|
|
|
203
261
|
<div className="panel__header__title__label">query</div>
|
|
204
262
|
</div>
|
|
205
263
|
<div className="panel__header__actions">
|
|
206
|
-
|
|
264
|
+
<button
|
|
265
|
+
className="panel__header__action"
|
|
266
|
+
tabIndex={-1}
|
|
267
|
+
onClick={editWithQueryBuilder}
|
|
268
|
+
title="Edit query..."
|
|
269
|
+
>
|
|
270
|
+
<PencilIcon />
|
|
271
|
+
</button>
|
|
207
272
|
<button
|
|
208
273
|
className="panel__header__action"
|
|
209
274
|
tabIndex={-1}
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
} from '@finos/legend-graph';
|
|
46
46
|
import { BASIC_SET_IMPLEMENTATION_TYPE } from '../../../../stores/shared/ModelUtil.js';
|
|
47
47
|
import {
|
|
48
|
+
buildElementOption,
|
|
48
49
|
getPackageableElementOptionFormatter,
|
|
49
50
|
type PackageableElementOption,
|
|
50
51
|
} from '@finos/legend-application';
|
|
@@ -77,9 +78,9 @@ export const NewMappingElementModal = observer(() => {
|
|
|
77
78
|
// Target
|
|
78
79
|
const targetSelectorRef = useRef<SelectComponent>(null);
|
|
79
80
|
const options: PackageableElementOption<PackageableElement>[] = [
|
|
80
|
-
...editorStore.
|
|
81
|
-
...editorStore.
|
|
82
|
-
...editorStore.
|
|
81
|
+
...editorStore.graphManagerState.usableEnumerations.map(buildElementOption),
|
|
82
|
+
...editorStore.graphManagerState.usableAssociations.map(buildElementOption),
|
|
83
|
+
...editorStore.graphManagerState.usableClasses.map(buildElementOption),
|
|
83
84
|
].sort(compareLabelFn);
|
|
84
85
|
const filterOption = createFilter({
|
|
85
86
|
ignoreCase: true,
|
package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
generateColumnTypeLabel,
|
|
37
37
|
renderColumnTypeIcon,
|
|
38
|
-
} from '
|
|
38
|
+
} from '../../connection-editor/DatabaseEditorHelper.js';
|
|
39
39
|
import {
|
|
40
40
|
type Type,
|
|
41
41
|
type Table,
|
|
@@ -68,7 +68,10 @@ import {
|
|
|
68
68
|
validate_PureExecutionMapping,
|
|
69
69
|
} from '@finos/legend-graph';
|
|
70
70
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
71
|
-
import
|
|
71
|
+
import {
|
|
72
|
+
buildElementOption,
|
|
73
|
+
type PackageableElementOption,
|
|
74
|
+
} from '@finos/legend-application';
|
|
72
75
|
|
|
73
76
|
const PureExecutionContextConfigurationEditor = observer(
|
|
74
77
|
(props: {
|
|
@@ -87,7 +90,8 @@ const PureExecutionContextConfigurationEditor = observer(
|
|
|
87
90
|
executionContext.mapping.value,
|
|
88
91
|
);
|
|
89
92
|
const mapping = executionContext.mapping.value;
|
|
90
|
-
const mappingOptions =
|
|
93
|
+
const mappingOptions =
|
|
94
|
+
editorStore.graphManagerState.usableMappings.map(buildElementOption);
|
|
91
95
|
const noMappingLabel = (
|
|
92
96
|
<div
|
|
93
97
|
className="service-execution-editor__configuration__mapping-option--empty"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import type {
|
|
20
20
|
ServicePureExecutionQueryState,
|
|
@@ -34,8 +34,9 @@ import {
|
|
|
34
34
|
CaretDownIcon,
|
|
35
35
|
MenuContentItem,
|
|
36
36
|
PauseCircleIcon,
|
|
37
|
+
PencilIcon,
|
|
37
38
|
} from '@finos/legend-art';
|
|
38
|
-
import { debounce } from '@finos/legend-shared';
|
|
39
|
+
import { assertErrorThrown, debounce, hashObject } from '@finos/legend-shared';
|
|
39
40
|
import { flowResult } from 'mobx';
|
|
40
41
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
41
42
|
import {
|
|
@@ -45,8 +46,16 @@ import {
|
|
|
45
46
|
useApplicationStore,
|
|
46
47
|
} from '@finos/legend-application';
|
|
47
48
|
import { StudioTextInputEditor } from '../../../shared/StudioTextInputEditor.js';
|
|
48
|
-
import
|
|
49
|
-
|
|
49
|
+
import {
|
|
50
|
+
type LightQuery,
|
|
51
|
+
isStubbed_PackageableElement,
|
|
52
|
+
isStubbed_RawLambda,
|
|
53
|
+
KeyedExecutionParameter,
|
|
54
|
+
} from '@finos/legend-graph';
|
|
55
|
+
import {
|
|
56
|
+
type QueryBuilderState,
|
|
57
|
+
ServiceQueryBuilderState,
|
|
58
|
+
} from '@finos/legend-query-builder';
|
|
50
59
|
|
|
51
60
|
const ServiceExecutionResultViewer = observer(
|
|
52
61
|
(props: { executionState: ServicePureExecutionState }) => {
|
|
@@ -233,22 +242,101 @@ export const ServiceExecutionQueryEditor = observer(
|
|
|
233
242
|
isReadOnly: boolean;
|
|
234
243
|
}) => {
|
|
235
244
|
const { executionState, isReadOnly } = props;
|
|
236
|
-
const queryState = executionState.queryState;
|
|
237
|
-
const editorStore = useEditorStore();
|
|
238
245
|
const applicationStore = useApplicationStore();
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
const editorStore = useEditorStore();
|
|
247
|
+
const queryState = executionState.queryState;
|
|
248
|
+
|
|
249
|
+
// actions
|
|
250
|
+
const editWithQueryBuilder = applicationStore.guardUnhandledError(
|
|
251
|
+
async () => {
|
|
252
|
+
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
|
253
|
+
executionState.setOpeningQueryEditor(true);
|
|
254
|
+
const service = executionState.serviceEditorState.service;
|
|
255
|
+
const selectedExecutionState =
|
|
256
|
+
executionState.selectedExecutionContextState;
|
|
257
|
+
if (selectedExecutionState) {
|
|
258
|
+
const mapping = selectedExecutionState.executionContext.mapping.value;
|
|
259
|
+
if (!isStubbed_PackageableElement(mapping)) {
|
|
260
|
+
await flowResult(
|
|
261
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
|
262
|
+
setupQueryBuilderState: (): QueryBuilderState => {
|
|
263
|
+
const queryBuilderState = new ServiceQueryBuilderState(
|
|
264
|
+
embeddedQueryBuilderState.editorStore.applicationStore,
|
|
265
|
+
embeddedQueryBuilderState.editorStore.graphManagerState,
|
|
266
|
+
service,
|
|
267
|
+
selectedExecutionState.executionContext instanceof
|
|
268
|
+
KeyedExecutionParameter
|
|
269
|
+
? selectedExecutionState.executionContext.key
|
|
270
|
+
: undefined,
|
|
271
|
+
);
|
|
272
|
+
queryBuilderState.initializeWithQuery(
|
|
273
|
+
executionState.execution.func,
|
|
274
|
+
);
|
|
275
|
+
queryBuilderState.changeDetectionState.setQueryHashCode(
|
|
276
|
+
hashObject(executionState.execution.func),
|
|
277
|
+
);
|
|
278
|
+
queryBuilderState.changeDetectionState.setIsEnabled(true);
|
|
279
|
+
return queryBuilderState;
|
|
280
|
+
},
|
|
281
|
+
actionConfigs: [
|
|
282
|
+
{
|
|
283
|
+
key: 'save-query-btn',
|
|
284
|
+
renderer: (
|
|
285
|
+
queryBuilderState: QueryBuilderState,
|
|
286
|
+
): React.ReactNode => {
|
|
287
|
+
const save = applicationStore.guardUnhandledError(
|
|
288
|
+
async () => {
|
|
289
|
+
try {
|
|
290
|
+
const rawLambda = queryBuilderState.buildQuery();
|
|
291
|
+
await flowResult(
|
|
292
|
+
executionState.queryState.updateLamba(rawLambda),
|
|
293
|
+
);
|
|
294
|
+
applicationStore.notifySuccess(
|
|
295
|
+
`Service query is updated`,
|
|
296
|
+
);
|
|
297
|
+
queryBuilderState.changeDetectionState.setQueryHashCode(
|
|
298
|
+
hashObject(rawLambda),
|
|
299
|
+
);
|
|
300
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration(
|
|
301
|
+
undefined,
|
|
302
|
+
);
|
|
303
|
+
} catch (error) {
|
|
304
|
+
assertErrorThrown(error);
|
|
305
|
+
applicationStore.notifyError(
|
|
306
|
+
`Can't save query: ${error.message}`,
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
);
|
|
311
|
+
|
|
312
|
+
return (
|
|
313
|
+
<button
|
|
314
|
+
className="query-builder__dialog__header__custom-action"
|
|
315
|
+
tabIndex={-1}
|
|
316
|
+
disabled={isReadOnly}
|
|
317
|
+
onClick={save}
|
|
318
|
+
>
|
|
319
|
+
Save Query
|
|
320
|
+
</button>
|
|
321
|
+
);
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
disableCompile: isStubbed_RawLambda(
|
|
326
|
+
executionState.queryState.query,
|
|
327
|
+
),
|
|
328
|
+
}),
|
|
329
|
+
);
|
|
330
|
+
executionState.setOpeningQueryEditor(false);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
applicationStore.notifyWarning(
|
|
335
|
+
'Please specify a mapping and a runtime for the execution context to edit with query builder',
|
|
336
|
+
);
|
|
337
|
+
executionState.setOpeningQueryEditor(false);
|
|
338
|
+
},
|
|
339
|
+
);
|
|
252
340
|
const importQuery = (): void => {
|
|
253
341
|
queryState.setOpenQueryImporter(true);
|
|
254
342
|
};
|
|
@@ -284,7 +372,14 @@ export const ServiceExecutionQueryEditor = observer(
|
|
|
284
372
|
</div>
|
|
285
373
|
</div>
|
|
286
374
|
<div className="panel__header__actions">
|
|
287
|
-
|
|
375
|
+
<button
|
|
376
|
+
className="panel__header__action"
|
|
377
|
+
tabIndex={-1}
|
|
378
|
+
onClick={editWithQueryBuilder}
|
|
379
|
+
title="Edit query..."
|
|
380
|
+
>
|
|
381
|
+
<PencilIcon />
|
|
382
|
+
</button>
|
|
288
383
|
<button
|
|
289
384
|
className="panel__header__action"
|
|
290
385
|
onClick={importQuery}
|
|
@@ -46,13 +46,18 @@ import type { EmbeddedDataTypeOption } from '../../../../../stores/editor-state/
|
|
|
46
46
|
import { EmbeddedDataEditor } from '../../data-editor/EmbeddedDataEditor.js';
|
|
47
47
|
import { EmbeddedDataType } from '../../../../../stores/editor-state/ExternalFormatState.js';
|
|
48
48
|
import { flowResult } from 'mobx';
|
|
49
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
buildElementOption,
|
|
51
|
+
useApplicationStore,
|
|
52
|
+
} from '@finos/legend-application';
|
|
50
53
|
import { prettyCONSTName } from '@finos/legend-shared';
|
|
51
54
|
import type { DSLData_LegendStudioApplicationPlugin_Extension } from '../../../../../stores/DSLData_LegendStudioApplicationPlugin_Extension.js';
|
|
55
|
+
import { useEditorStore } from '../../../EditorStoreProvider.js';
|
|
52
56
|
|
|
53
57
|
export const ConnectionTestDataEditor = observer(
|
|
54
58
|
(props: { connectionTestDataState: ConnectionTestDataState }) => {
|
|
55
59
|
const { connectionTestDataState } = props;
|
|
60
|
+
const applicationStore = useApplicationStore();
|
|
56
61
|
const isReadOnly =
|
|
57
62
|
connectionTestDataState.testDataState.testSuiteState.testableState
|
|
58
63
|
.serviceEditorState.isReadOnly;
|
|
@@ -66,10 +71,10 @@ export const ConnectionTestDataEditor = observer(
|
|
|
66
71
|
};
|
|
67
72
|
const generateTestData = (): void => {
|
|
68
73
|
flowResult(connectionTestDataState.generateTestData()).catch(
|
|
69
|
-
|
|
70
|
-
.alertUnhandledError,
|
|
74
|
+
applicationStore.alertUnhandledError,
|
|
71
75
|
);
|
|
72
76
|
};
|
|
77
|
+
|
|
73
78
|
return (
|
|
74
79
|
<div className="service-test-data-editor">
|
|
75
80
|
<div className="service-test-suite-editor__header">
|
|
@@ -209,7 +214,9 @@ const ConnectionTestDataItem = observer(
|
|
|
209
214
|
export const NewConnectionDataModal = observer(
|
|
210
215
|
(props: { testDataState: ServiceTestDataState }) => {
|
|
211
216
|
const { testDataState } = props;
|
|
212
|
-
const
|
|
217
|
+
const editorStore = useEditorStore();
|
|
218
|
+
const dataElementOptions =
|
|
219
|
+
editorStore.graphManagerState.usableDataElements.map(buildElementOption);
|
|
213
220
|
const newConnectionState = testDataState.newConnectionDataState;
|
|
214
221
|
const dataElement = newConnectionState.dataElement;
|
|
215
222
|
const selectedDataElement = dataElement
|
|
@@ -271,7 +278,7 @@ export const NewConnectionDataModal = observer(
|
|
|
271
278
|
value: newConnectionState.embeddedDataType.value,
|
|
272
279
|
}
|
|
273
280
|
: undefined;
|
|
274
|
-
const extraOptionTypes =
|
|
281
|
+
const extraOptionTypes = editorStore.pluginManager
|
|
275
282
|
.getApplicationPlugins()
|
|
276
283
|
.flatMap(
|
|
277
284
|
(plugin) =>
|
|
@@ -89,6 +89,7 @@ import {
|
|
|
89
89
|
getClassPropertyType,
|
|
90
90
|
} from '../../../../stores/shared/ModelUtil.js';
|
|
91
91
|
import {
|
|
92
|
+
buildElementOption,
|
|
92
93
|
useApplicationNavigationContext,
|
|
93
94
|
type PackageableElementOption,
|
|
94
95
|
} from '@finos/legend-application';
|
|
@@ -119,7 +120,8 @@ const AssociationPropertyBasicEditor = observer(
|
|
|
119
120
|
// Generic Type
|
|
120
121
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
121
122
|
// TODO: make this so that association can only refer to classes from the same graph space
|
|
122
|
-
const propertyTypeOptions =
|
|
123
|
+
const propertyTypeOptions =
|
|
124
|
+
editorStore.graphManagerState.usableClasses.map(buildElementOption);
|
|
123
125
|
const propertyType = property.genericType.value.rawType;
|
|
124
126
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
125
127
|
const filterOption = createFilter({
|
|
@@ -96,6 +96,7 @@ import {
|
|
|
96
96
|
import { StudioLambdaEditor } from '../../../shared/StudioLambdaEditor.js';
|
|
97
97
|
import {
|
|
98
98
|
ApplicationNavigationContextData,
|
|
99
|
+
buildElementOption,
|
|
99
100
|
getPackageableElementOptionFormatter,
|
|
100
101
|
useApplicationNavigationContext,
|
|
101
102
|
useApplicationStore,
|
|
@@ -167,7 +168,10 @@ const PropertyBasicEditor = observer(
|
|
|
167
168
|
};
|
|
168
169
|
// Generic Type
|
|
169
170
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
170
|
-
const propertyTypeOptions =
|
|
171
|
+
const propertyTypeOptions =
|
|
172
|
+
editorStore.graphManagerState.usableClassPropertyTypes.map(
|
|
173
|
+
buildElementOption,
|
|
174
|
+
);
|
|
171
175
|
const propertyType = property.genericType.value.rawType;
|
|
172
176
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
173
177
|
const filterOption = createFilter({
|
|
@@ -492,7 +496,10 @@ const DerivedPropertyBasicEditor = observer(
|
|
|
492
496
|
property_setName(derivedProperty, event.target.value);
|
|
493
497
|
// Generic Type
|
|
494
498
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
495
|
-
const propertyTypeOptions =
|
|
499
|
+
const propertyTypeOptions =
|
|
500
|
+
editorStore.graphManagerState.usableClassPropertyTypes.map(
|
|
501
|
+
buildElementOption,
|
|
502
|
+
);
|
|
496
503
|
const propertyType = derivedProperty.genericType.value.rawType;
|
|
497
504
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
498
505
|
const filterOption = createFilter({
|
|
@@ -998,16 +1005,18 @@ const SuperTypeEditor = observer(
|
|
|
998
1005
|
const { superType, _class, deleteSuperType, isReadOnly } = props;
|
|
999
1006
|
const editorStore = useEditorStore();
|
|
1000
1007
|
// Type
|
|
1001
|
-
const superTypeOptions = editorStore.
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1008
|
+
const superTypeOptions = editorStore.graphManagerState.usableClasses
|
|
1009
|
+
.filter(
|
|
1010
|
+
(c) =>
|
|
1011
|
+
c instanceof Class &&
|
|
1012
|
+
// Exclude current class
|
|
1013
|
+
c !== _class &&
|
|
1014
|
+
// Exclude super types of the class
|
|
1015
|
+
!getAllSuperclasses(_class).includes(c) &&
|
|
1016
|
+
// Ensure there is no loop (might be expensive)
|
|
1017
|
+
!getAllSuperclasses(c).includes(_class),
|
|
1018
|
+
)
|
|
1019
|
+
.map(buildElementOption);
|
|
1011
1020
|
|
|
1012
1021
|
// Drag and Drop
|
|
1013
1022
|
const handleHover = useCallback(
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
type Class,
|
|
19
|
+
PackageableElementExplicitReference,
|
|
20
|
+
PureSingleExecution,
|
|
21
|
+
Service,
|
|
22
|
+
} from '@finos/legend-graph';
|
|
23
|
+
import {
|
|
24
|
+
type QueryBuilderState,
|
|
25
|
+
ClassQueryBuilderState,
|
|
26
|
+
} from '@finos/legend-query-builder';
|
|
27
|
+
import { assertErrorThrown, guaranteeNonNullable } from '@finos/legend-shared';
|
|
28
|
+
import { flowResult } from 'mobx';
|
|
29
|
+
import { observer } from 'mobx-react-lite';
|
|
30
|
+
import { useState } from 'react';
|
|
31
|
+
import type { EditorStore } from '../../../../stores/EditorStore.js';
|
|
32
|
+
import type { EmbeddedQueryBuilderState } from '../../../../stores/EmbeddedQueryBuilderState.js';
|
|
33
|
+
import {
|
|
34
|
+
service_initNewService,
|
|
35
|
+
service_setExecution,
|
|
36
|
+
} from '../../../../stores/graphModifier/DSLService_GraphModifierHelper.js';
|
|
37
|
+
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
38
|
+
import { NewServiceModal } from '../service-editor/NewServiceModal.js';
|
|
39
|
+
|
|
40
|
+
const promoteQueryToService = async (
|
|
41
|
+
packagePath: string,
|
|
42
|
+
serviceName: string,
|
|
43
|
+
embeddedQueryBuilderState: EmbeddedQueryBuilderState,
|
|
44
|
+
queryBuilderState: QueryBuilderState,
|
|
45
|
+
): Promise<void> => {
|
|
46
|
+
const editorStore = embeddedQueryBuilderState.editorStore;
|
|
47
|
+
const applicationStore = editorStore.applicationStore;
|
|
48
|
+
try {
|
|
49
|
+
const mapping = guaranteeNonNullable(
|
|
50
|
+
queryBuilderState.mapping,
|
|
51
|
+
'Mapping is required to create service execution',
|
|
52
|
+
);
|
|
53
|
+
const runtime = guaranteeNonNullable(
|
|
54
|
+
queryBuilderState.runtimeValue,
|
|
55
|
+
'Runtime is required to create service execution',
|
|
56
|
+
);
|
|
57
|
+
const query = queryBuilderState.buildQuery();
|
|
58
|
+
const service = new Service(serviceName);
|
|
59
|
+
service_initNewService(service);
|
|
60
|
+
service_setExecution(
|
|
61
|
+
service,
|
|
62
|
+
new PureSingleExecution(
|
|
63
|
+
query,
|
|
64
|
+
service,
|
|
65
|
+
PackageableElementExplicitReference.create(mapping),
|
|
66
|
+
runtime,
|
|
67
|
+
),
|
|
68
|
+
editorStore.changeDetectionState.observerContext,
|
|
69
|
+
);
|
|
70
|
+
await flowResult(editorStore.addElement(service, packagePath, true));
|
|
71
|
+
await flowResult(
|
|
72
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration(undefined),
|
|
73
|
+
).catch(applicationStore.alertUnhandledError);
|
|
74
|
+
applicationStore.notifySuccess(`Service '${service.name}' created`);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
assertErrorThrown(error);
|
|
77
|
+
applicationStore.notifyError(error);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const PromoteToServiceQueryBuilderAction = observer(
|
|
82
|
+
(props: { queryBuilderState: QueryBuilderState }) => {
|
|
83
|
+
const { queryBuilderState } = props;
|
|
84
|
+
const editorStore = useEditorStore();
|
|
85
|
+
const queryBuilderExtension = editorStore.embeddedQueryBuilderState;
|
|
86
|
+
const [openNewServiceModal, setOpenNewServiceModal] = useState(false);
|
|
87
|
+
const showNewServiceModal = (): void => setOpenNewServiceModal(true);
|
|
88
|
+
const closeNewServiceModal = (): void => setOpenNewServiceModal(false);
|
|
89
|
+
const allowPromoteToService = Boolean(
|
|
90
|
+
queryBuilderState.mapping && queryBuilderState.runtimeValue,
|
|
91
|
+
);
|
|
92
|
+
const promoteToService = async (
|
|
93
|
+
packagePath: string,
|
|
94
|
+
serviceName: string,
|
|
95
|
+
): Promise<void> => {
|
|
96
|
+
if (allowPromoteToService) {
|
|
97
|
+
await promoteQueryToService(
|
|
98
|
+
packagePath,
|
|
99
|
+
serviceName,
|
|
100
|
+
queryBuilderExtension,
|
|
101
|
+
queryBuilderState,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return (
|
|
106
|
+
<>
|
|
107
|
+
<button
|
|
108
|
+
className="query-builder__dialog__header__custom-action"
|
|
109
|
+
tabIndex={-1}
|
|
110
|
+
onClick={showNewServiceModal}
|
|
111
|
+
disabled={!allowPromoteToService}
|
|
112
|
+
>
|
|
113
|
+
Promote to Service
|
|
114
|
+
</button>
|
|
115
|
+
{queryBuilderState.mapping && (
|
|
116
|
+
<NewServiceModal
|
|
117
|
+
mapping={queryBuilderState.mapping}
|
|
118
|
+
close={closeNewServiceModal}
|
|
119
|
+
showModal={openNewServiceModal}
|
|
120
|
+
promoteToService={promoteToService}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
</>
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
export const queryClass = async (
|
|
129
|
+
_class: Class,
|
|
130
|
+
editorStore: EditorStore,
|
|
131
|
+
): Promise<void> => {
|
|
132
|
+
const embeddedQueryBuilderState = editorStore.embeddedQueryBuilderState;
|
|
133
|
+
await flowResult(
|
|
134
|
+
embeddedQueryBuilderState.setEmbeddedQueryBuilderConfiguration({
|
|
135
|
+
setupQueryBuilderState: () => {
|
|
136
|
+
const queryBuilderState = new ClassQueryBuilderState(
|
|
137
|
+
embeddedQueryBuilderState.editorStore.applicationStore,
|
|
138
|
+
embeddedQueryBuilderState.editorStore.graphManagerState,
|
|
139
|
+
);
|
|
140
|
+
queryBuilderState.changeClass(_class);
|
|
141
|
+
queryBuilderState.propagateClassChange(_class);
|
|
142
|
+
return queryBuilderState;
|
|
143
|
+
},
|
|
144
|
+
// TODO: when we modularize DSL service, we will create an extension
|
|
145
|
+
// mechanism for this action config
|
|
146
|
+
// See https://github.com/finos/legend-studio/issues/65
|
|
147
|
+
actionConfigs: [
|
|
148
|
+
{
|
|
149
|
+
key: 'promote-to-service-btn',
|
|
150
|
+
renderer: (queryBuilderState: QueryBuilderState): React.ReactNode => (
|
|
151
|
+
<PromoteToServiceQueryBuilderAction
|
|
152
|
+
queryBuilderState={queryBuilderState}
|
|
153
|
+
/>
|
|
154
|
+
),
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
};
|