@finos/legend-application-studio 22.0.0 → 22.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/EditorComponentTestUtils.d.ts +9 -6
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +9 -6
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/EmbeddedQueryBuilder.d.ts +0 -1
- package/lib/components/EmbeddedQueryBuilder.d.ts.map +1 -1
- package/lib/components/LegendStudioApplication.d.ts +0 -1
- package/lib/components/LegendStudioApplication.d.ts.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/aux-panel/Problems.d.ts +0 -1
- package/lib/components/editor/aux-panel/Problems.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/EditPanel.js +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js.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/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 +2 -2
- 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/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/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/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 +0 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
- 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/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/DSL_ExternalFormat_BindingElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_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/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/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/MappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/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/MappingExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingExplorer.js.map +1 -1
- 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/MappingTestsExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.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/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/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/project-configuration-editor/ProjectConfigurationEditor.js +9 -141
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.d.ts +21 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.js +285 -0
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.js.map +1 -0
- 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/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/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/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/ServiceTestableEditor.js +2 -2
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +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/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/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/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/Explorer.d.ts +0 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.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/ProjectOverview.js +2 -2
- package/lib/components/editor/side-bar/ProjectOverview.js.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/shared/DiffView.d.ts +0 -1
- package/lib/components/shared/DiffView.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/WorkspaceReviewPanel.js +2 -2
- package/lib/components/workspace-review/WorkspaceReviewPanel.js.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/CreateProjectModal.d.ts +0 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts +0 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +9 -6
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +1 -1
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +1 -1
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorTabManagerState.js +1 -1
- package/lib/stores/EditorTabManagerState.js.map +1 -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 +1 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor-state/{ProjectConfigurationEditorState.d.ts → project-configuration-editor-state/ProjectConfigurationEditorState.d.ts} +6 -15
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/{ProjectConfigurationEditorState.js → project-configuration-editor-state/ProjectConfigurationEditorState.js} +7 -75
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts +52 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js +149 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js.map +1 -0
- package/package.json +15 -15
- package/src/components/EditorComponentTestUtils.tsx +12 -9
- package/src/components/editor/edit-panel/EditPanel.tsx +1 -1
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +6 -7
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +8 -17
- package/src/components/editor/edit-panel/mapping-editor/MappingExplorer.tsx +15 -33
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +14 -36
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +12 -404
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectDependencyEditor.tsx +734 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +6 -14
- package/src/components/editor/side-bar/ProjectOverview.tsx +5 -8
- package/src/components/workspace-review/WorkspaceReviewPanel.tsx +14 -21
- package/src/stores/EditorGraphState.ts +16 -10
- package/src/stores/EditorStore.ts +1 -1
- package/src/stores/EditorTabManagerState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +1 -4
- package/src/stores/editor-state/{ProjectConfigurationEditorState.ts → project-configuration-editor-state/ProjectConfigurationEditorState.ts} +13 -114
- package/src/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts +209 -0
- package/tsconfig.json +3 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +0 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +0 -1
package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx
CHANGED
|
@@ -14,47 +14,24 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { useEffect
|
|
18
|
-
import {
|
|
19
|
-
LogEvent,
|
|
20
|
-
prettyCONSTName,
|
|
21
|
-
assertErrorThrown,
|
|
22
|
-
guaranteeNonNullable,
|
|
23
|
-
} from '@finos/legend-shared';
|
|
17
|
+
import { useEffect } from 'react';
|
|
18
|
+
import { prettyCONSTName } from '@finos/legend-shared';
|
|
24
19
|
import { observer } from 'mobx-react-lite';
|
|
25
20
|
import {
|
|
26
21
|
ProjectConfigurationEditorState,
|
|
27
22
|
CONFIGURATION_EDITOR_TAB,
|
|
28
|
-
|
|
29
|
-
getDependencyTreeStringFromInfo,
|
|
30
|
-
getConflictsString,
|
|
31
|
-
} from '../../../../stores/editor-state/ProjectConfigurationEditorState.js';
|
|
23
|
+
} from '../../../../stores/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js';
|
|
32
24
|
import {
|
|
33
|
-
type SelectComponent,
|
|
34
|
-
compareLabelFn,
|
|
35
25
|
clsx,
|
|
36
|
-
CustomSelectorInput,
|
|
37
26
|
PlusIcon,
|
|
38
|
-
TimesIcon,
|
|
39
27
|
CheckCircleIcon,
|
|
40
28
|
ExclamationCircleIcon,
|
|
41
|
-
ExternalLinkSquareIcon,
|
|
42
|
-
Dialog,
|
|
43
29
|
Panel,
|
|
44
30
|
PanelForm,
|
|
45
31
|
PanelFormTextField,
|
|
46
32
|
CheckSquareIcon,
|
|
47
33
|
SquareIcon,
|
|
48
34
|
ExclamationTriangleIcon,
|
|
49
|
-
DropdownMenu,
|
|
50
|
-
CaretDownIcon,
|
|
51
|
-
MenuContentItem,
|
|
52
|
-
MenuContent,
|
|
53
|
-
Modal,
|
|
54
|
-
ModalBody,
|
|
55
|
-
ModalFooter,
|
|
56
|
-
ModalHeader,
|
|
57
|
-
PanelLoadingIndicator,
|
|
58
35
|
} from '@finos/legend-art';
|
|
59
36
|
import { flowResult } from 'mobx';
|
|
60
37
|
import {
|
|
@@ -66,37 +43,11 @@ import {
|
|
|
66
43
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
67
44
|
import {
|
|
68
45
|
DocumentationPreview,
|
|
69
|
-
EDITOR_LANGUAGE,
|
|
70
46
|
LEGEND_APPLICATION_DOCUMENTATION_KEY,
|
|
71
|
-
TextInputEditor,
|
|
72
47
|
useApplicationStore,
|
|
73
48
|
} from '@finos/legend-application';
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
SNAPSHOT_VERSION_ALIAS,
|
|
77
|
-
MASTER_SNAPSHOT_ALIAS,
|
|
78
|
-
type ProjectData,
|
|
79
|
-
type ProjectDependencyInfo,
|
|
80
|
-
} from '@finos/legend-server-depot';
|
|
81
|
-
import {
|
|
82
|
-
generateViewProjectByGAVRoute,
|
|
83
|
-
generateViewVersionRoute,
|
|
84
|
-
} from '../../../../stores/LegendStudioRouter.js';
|
|
85
|
-
import { compareSemVerVersions } from '@finos/legend-storage';
|
|
86
|
-
|
|
87
|
-
interface VersionOption {
|
|
88
|
-
label: string;
|
|
89
|
-
value: string;
|
|
90
|
-
}
|
|
91
|
-
interface ProjectOption {
|
|
92
|
-
label: string;
|
|
93
|
-
value: ProjectData;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const buildProjectOption = (project: ProjectData): ProjectOption => ({
|
|
97
|
-
label: project.coordinates,
|
|
98
|
-
value: project,
|
|
99
|
-
});
|
|
49
|
+
import { ProjectDependencyEditor } from './ProjectDependencyEditor.js';
|
|
50
|
+
import type { ProjectData } from '@finos/legend-server-depot';
|
|
100
51
|
|
|
101
52
|
const ProjectStructureEditor = observer(
|
|
102
53
|
(props: { projectConfig: ProjectConfiguration; isReadOnly: boolean }) => {
|
|
@@ -181,264 +132,6 @@ const ProjectStructureEditor = observer(
|
|
|
181
132
|
},
|
|
182
133
|
);
|
|
183
134
|
|
|
184
|
-
const formatOptionLabel = (option: ProjectOption): React.ReactNode => (
|
|
185
|
-
<div className="project-dependency-editor__label">
|
|
186
|
-
<div className="project-dependency-editor__label__tag">
|
|
187
|
-
{option.value.projectId}
|
|
188
|
-
</div>
|
|
189
|
-
<div className="project-dependency-editor__label__name">
|
|
190
|
-
{option.value.coordinates}
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
const ProjectDependencyInfoModal = observer(
|
|
196
|
-
(props: {
|
|
197
|
-
configState: ProjectConfigurationEditorState;
|
|
198
|
-
info: ProjectDependencyInfo;
|
|
199
|
-
type: DEPENDENCY_INFO_TYPE;
|
|
200
|
-
}) => {
|
|
201
|
-
const { configState, info, type } = props;
|
|
202
|
-
const closeModal = (): void =>
|
|
203
|
-
configState.setDependencyInfoModal(undefined);
|
|
204
|
-
return (
|
|
205
|
-
<Dialog
|
|
206
|
-
open={Boolean(configState.dependencyInfoModalType)}
|
|
207
|
-
onClose={closeModal}
|
|
208
|
-
classes={{
|
|
209
|
-
root: 'editor-modal__root-container',
|
|
210
|
-
container: 'editor-modal__container',
|
|
211
|
-
paper: 'editor-modal__content',
|
|
212
|
-
}}
|
|
213
|
-
>
|
|
214
|
-
<Modal darkMode={true} className="editor-modal">
|
|
215
|
-
<ModalHeader title={type} />
|
|
216
|
-
<ModalBody>
|
|
217
|
-
{type === DEPENDENCY_INFO_TYPE.DEPENDENCY_TREE ? (
|
|
218
|
-
<TextInputEditor
|
|
219
|
-
inputValue={getDependencyTreeStringFromInfo(info)}
|
|
220
|
-
isReadOnly={true}
|
|
221
|
-
language={EDITOR_LANGUAGE.TEXT}
|
|
222
|
-
showMiniMap={true}
|
|
223
|
-
/>
|
|
224
|
-
) : (
|
|
225
|
-
<TextInputEditor
|
|
226
|
-
inputValue={getConflictsString(info)}
|
|
227
|
-
isReadOnly={true}
|
|
228
|
-
language={EDITOR_LANGUAGE.TEXT}
|
|
229
|
-
showMiniMap={true}
|
|
230
|
-
/>
|
|
231
|
-
)}
|
|
232
|
-
</ModalBody>
|
|
233
|
-
<ModalFooter>
|
|
234
|
-
<button
|
|
235
|
-
className="btn modal__footer__close-btn"
|
|
236
|
-
onClick={closeModal}
|
|
237
|
-
>
|
|
238
|
-
Close
|
|
239
|
-
</button>
|
|
240
|
-
</ModalFooter>
|
|
241
|
-
</Modal>
|
|
242
|
-
</Dialog>
|
|
243
|
-
);
|
|
244
|
-
},
|
|
245
|
-
);
|
|
246
|
-
|
|
247
|
-
const ProjectDependencyEditor = observer(
|
|
248
|
-
(props: {
|
|
249
|
-
projectDependency: ProjectDependency;
|
|
250
|
-
deleteValue: () => void;
|
|
251
|
-
isReadOnly: boolean;
|
|
252
|
-
projects: Map<string, ProjectData>;
|
|
253
|
-
}) => {
|
|
254
|
-
// init
|
|
255
|
-
const { projectDependency, deleteValue, isReadOnly, projects } = props;
|
|
256
|
-
const projectDependencyData = projects.get(projectDependency.projectId);
|
|
257
|
-
const editorStore = useEditorStore();
|
|
258
|
-
const applicationStore = useApplicationStore();
|
|
259
|
-
const projectSelectorRef = useRef<SelectComponent>(null);
|
|
260
|
-
const versionSelectorRef = useRef<SelectComponent>(null);
|
|
261
|
-
const configState = editorStore.projectConfigurationEditorState;
|
|
262
|
-
// project
|
|
263
|
-
const selectedProject = configState.projects.get(
|
|
264
|
-
projectDependency.projectId,
|
|
265
|
-
);
|
|
266
|
-
const selectedProjectOption = selectedProject
|
|
267
|
-
? buildProjectOption(selectedProject)
|
|
268
|
-
: null;
|
|
269
|
-
const projectDisabled =
|
|
270
|
-
!configState.associatedProjectsAndVersionsFetched ||
|
|
271
|
-
configState.isReadOnly;
|
|
272
|
-
const projectsOptions = Array.from(configState.projects.values())
|
|
273
|
-
.map(buildProjectOption)
|
|
274
|
-
.sort(compareLabelFn);
|
|
275
|
-
const onProjectSelectionChange = (val: ProjectOption | null): void => {
|
|
276
|
-
if (
|
|
277
|
-
(val !== null || selectedProjectOption !== null) &&
|
|
278
|
-
(!val ||
|
|
279
|
-
!selectedProjectOption ||
|
|
280
|
-
val.value !== selectedProjectOption.value)
|
|
281
|
-
) {
|
|
282
|
-
projectDependency.setProjectId(val?.value.coordinates ?? '');
|
|
283
|
-
if (val) {
|
|
284
|
-
projectDependency.setVersionId(val.value.latestVersion);
|
|
285
|
-
flowResult(configState.fetchDependencyInfo()).catch(
|
|
286
|
-
applicationStore.alertUnhandledError,
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
// version
|
|
292
|
-
const version = projectDependency.versionId;
|
|
293
|
-
const versions = selectedProject?.versions ?? [];
|
|
294
|
-
let versionOptions = versions
|
|
295
|
-
.slice()
|
|
296
|
-
.sort((v1, v2) => compareSemVerVersions(v2, v1))
|
|
297
|
-
.map((v) => ({ value: v, label: v }));
|
|
298
|
-
versionOptions = [
|
|
299
|
-
{ label: SNAPSHOT_VERSION_ALIAS, value: MASTER_SNAPSHOT_ALIAS },
|
|
300
|
-
...versionOptions,
|
|
301
|
-
];
|
|
302
|
-
const selectedVersionOption: VersionOption | null =
|
|
303
|
-
versionOptions.find((v) => v.value === version) ?? null;
|
|
304
|
-
const versionDisabled =
|
|
305
|
-
Boolean(!versions.length || !projectDependency.projectId.length) ||
|
|
306
|
-
!configState.associatedProjectsAndVersionsFetched ||
|
|
307
|
-
isReadOnly;
|
|
308
|
-
|
|
309
|
-
const onVersionSelectionChange = (val: VersionOption | null): void => {
|
|
310
|
-
if (
|
|
311
|
-
(val !== null || selectedVersionOption !== null) &&
|
|
312
|
-
(!val ||
|
|
313
|
-
!selectedVersionOption ||
|
|
314
|
-
val.value !== selectedVersionOption.value)
|
|
315
|
-
) {
|
|
316
|
-
try {
|
|
317
|
-
projectDependency.setVersionId(val?.value ?? '');
|
|
318
|
-
flowResult(configState.fetchDependencyInfo()).catch(
|
|
319
|
-
applicationStore.alertUnhandledError,
|
|
320
|
-
);
|
|
321
|
-
} catch (error) {
|
|
322
|
-
assertErrorThrown(error);
|
|
323
|
-
applicationStore.log.error(
|
|
324
|
-
LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE),
|
|
325
|
-
error,
|
|
326
|
-
);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
const viewProject = (): void => {
|
|
331
|
-
if (!projectDependency.isLegacyDependency) {
|
|
332
|
-
applicationStore.navigator.visitAddress(
|
|
333
|
-
applicationStore.navigator.generateAddress(
|
|
334
|
-
generateViewProjectByGAVRoute(
|
|
335
|
-
guaranteeNonNullable(projectDependency.groupId),
|
|
336
|
-
guaranteeNonNullable(projectDependency.artifactId),
|
|
337
|
-
projectDependency.versionId === MASTER_SNAPSHOT_ALIAS
|
|
338
|
-
? SNAPSHOT_VERSION_ALIAS
|
|
339
|
-
: projectDependency.versionId,
|
|
340
|
-
),
|
|
341
|
-
),
|
|
342
|
-
);
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
// NOTE: This assumes that the dependant project is in the same studio instance as the current project
|
|
346
|
-
// In the future, the studio instance may be part of the project data
|
|
347
|
-
const viewSDLCProject = (): void => {
|
|
348
|
-
if (projectDependencyData) {
|
|
349
|
-
applicationStore.navigator.visitAddress(
|
|
350
|
-
applicationStore.navigator.generateAddress(
|
|
351
|
-
generateViewVersionRoute(projectDependencyData.projectId, version),
|
|
352
|
-
),
|
|
353
|
-
);
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
const projectSelectorPlaceholder = !projectDependency.projectId.length
|
|
357
|
-
? 'Choose project'
|
|
358
|
-
: versionDisabled
|
|
359
|
-
? 'No project version found. Please create a new one.'
|
|
360
|
-
: 'Select version';
|
|
361
|
-
|
|
362
|
-
return (
|
|
363
|
-
<div className="project-dependency-editor">
|
|
364
|
-
<CustomSelectorInput
|
|
365
|
-
className="project-dependency-editor__selector"
|
|
366
|
-
ref={projectSelectorRef}
|
|
367
|
-
disabled={projectDisabled}
|
|
368
|
-
options={projectsOptions}
|
|
369
|
-
isClearable={true}
|
|
370
|
-
escapeClearsValue={true}
|
|
371
|
-
onChange={onProjectSelectionChange}
|
|
372
|
-
value={selectedProjectOption}
|
|
373
|
-
isLoading={configState.fetchingProjectVersionsState.isInProgress}
|
|
374
|
-
formatOptionLabel={formatOptionLabel}
|
|
375
|
-
darkMode={true}
|
|
376
|
-
/>
|
|
377
|
-
<CustomSelectorInput
|
|
378
|
-
className="project-dependency-editor__selector"
|
|
379
|
-
ref={versionSelectorRef}
|
|
380
|
-
options={versionOptions}
|
|
381
|
-
isClearable={true}
|
|
382
|
-
escapeClearsValue={true}
|
|
383
|
-
onChange={onVersionSelectionChange}
|
|
384
|
-
value={selectedVersionOption}
|
|
385
|
-
disabled={versionDisabled}
|
|
386
|
-
placeholder={projectSelectorPlaceholder}
|
|
387
|
-
isLoading={
|
|
388
|
-
editorStore.projectConfigurationEditorState
|
|
389
|
-
.fetchingProjectVersionsState.isInProgress
|
|
390
|
-
}
|
|
391
|
-
darkMode={true}
|
|
392
|
-
/>
|
|
393
|
-
<div className="project-dependency-editor__visit-project-btn">
|
|
394
|
-
<button
|
|
395
|
-
className="project-dependency-editor__visit-project-btn__btn btn--dark"
|
|
396
|
-
disabled={
|
|
397
|
-
projectDependency.isLegacyDependency ||
|
|
398
|
-
!selectedProject ||
|
|
399
|
-
!selectedVersionOption
|
|
400
|
-
}
|
|
401
|
-
onClick={viewProject}
|
|
402
|
-
tabIndex={-1}
|
|
403
|
-
title="View project"
|
|
404
|
-
>
|
|
405
|
-
<ExternalLinkSquareIcon />
|
|
406
|
-
</button>
|
|
407
|
-
<DropdownMenu
|
|
408
|
-
className="project-dependency-editor__visit-project-btn__dropdown-trigger btn--dark"
|
|
409
|
-
content={
|
|
410
|
-
<MenuContent>
|
|
411
|
-
<MenuContentItem
|
|
412
|
-
disabled={
|
|
413
|
-
projectDependency.isLegacyDependency ||
|
|
414
|
-
!selectedProject ||
|
|
415
|
-
!selectedVersionOption ||
|
|
416
|
-
!projectDependencyData
|
|
417
|
-
}
|
|
418
|
-
onClick={viewSDLCProject}
|
|
419
|
-
>
|
|
420
|
-
View SDLC project
|
|
421
|
-
</MenuContentItem>
|
|
422
|
-
</MenuContent>
|
|
423
|
-
}
|
|
424
|
-
>
|
|
425
|
-
<CaretDownIcon title="Show more options..." />
|
|
426
|
-
</DropdownMenu>
|
|
427
|
-
</div>
|
|
428
|
-
<button
|
|
429
|
-
className="project-dependency-editor__remove-btn btn--dark btn--caution"
|
|
430
|
-
disabled={isReadOnly}
|
|
431
|
-
onClick={deleteValue}
|
|
432
|
-
tabIndex={-1}
|
|
433
|
-
title="Close"
|
|
434
|
-
>
|
|
435
|
-
<TimesIcon />
|
|
436
|
-
</button>
|
|
437
|
-
</div>
|
|
438
|
-
);
|
|
439
|
-
},
|
|
440
|
-
);
|
|
441
|
-
|
|
442
135
|
const PlatformDependencyViewer = observer(
|
|
443
136
|
(props: {
|
|
444
137
|
platform: PlatformConfiguration;
|
|
@@ -616,48 +309,6 @@ const ProjectPlatformVersionEditor = observer(
|
|
|
616
309
|
},
|
|
617
310
|
);
|
|
618
311
|
|
|
619
|
-
const ProjectDependencyActions = observer(
|
|
620
|
-
(props: { config: ProjectConfigurationEditorState }) => {
|
|
621
|
-
const { config } = props;
|
|
622
|
-
const hasConflicts = config.dependencyInfo?.conflicts.length;
|
|
623
|
-
const viewTree = (): void => {
|
|
624
|
-
if (config.dependencyInfo) {
|
|
625
|
-
config.setDependencyInfoModal(DEPENDENCY_INFO_TYPE.DEPENDENCY_TREE);
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
const viewConflict = (): void => {
|
|
629
|
-
if (config.dependencyInfo) {
|
|
630
|
-
config.setDependencyInfoModal(DEPENDENCY_INFO_TYPE.CONFLICTS);
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
return (
|
|
634
|
-
<div className="project-dependency-editor__info">
|
|
635
|
-
<button
|
|
636
|
-
className="btn btn--dark"
|
|
637
|
-
tabIndex={-1}
|
|
638
|
-
onClick={viewTree}
|
|
639
|
-
disabled={!config.dependencyInfo}
|
|
640
|
-
title="View dependency tree"
|
|
641
|
-
>
|
|
642
|
-
View Dependency Tree
|
|
643
|
-
</button>
|
|
644
|
-
|
|
645
|
-
{Boolean(hasConflicts) && (
|
|
646
|
-
<button
|
|
647
|
-
className="project-dependency-editor__conflicts-btn"
|
|
648
|
-
tabIndex={-1}
|
|
649
|
-
onClick={viewConflict}
|
|
650
|
-
disabled={!config.dependencyInfo?.conflicts.length}
|
|
651
|
-
title="View any conflicts in your dependencies"
|
|
652
|
-
>
|
|
653
|
-
View Conflicts
|
|
654
|
-
</button>
|
|
655
|
-
)}
|
|
656
|
-
</div>
|
|
657
|
-
);
|
|
658
|
-
},
|
|
659
|
-
);
|
|
660
|
-
|
|
661
312
|
export const ProjectConfigurationEditor = observer(() => {
|
|
662
313
|
const editorStore = useEditorStore();
|
|
663
314
|
const applicationStore = useApplicationStore();
|
|
@@ -685,14 +336,6 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
685
336
|
break;
|
|
686
337
|
}
|
|
687
338
|
const currentProjectConfiguration = configState.currentProjectConfiguration;
|
|
688
|
-
const deleteProjectDependency =
|
|
689
|
-
(val: ProjectDependency): (() => void) =>
|
|
690
|
-
(): void => {
|
|
691
|
-
currentProjectConfiguration.deleteProjectDependency(val);
|
|
692
|
-
flowResult(configState.fetchDependencyInfo()).catch(
|
|
693
|
-
applicationStore.alertUnhandledError,
|
|
694
|
-
);
|
|
695
|
-
};
|
|
696
339
|
const addValue = (): void => {
|
|
697
340
|
if (!isReadOnly) {
|
|
698
341
|
if (selectedTab === CONFIGURATION_EDITOR_TAB.PROJECT_DEPENDENCIES) {
|
|
@@ -704,9 +347,9 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
704
347
|
);
|
|
705
348
|
dependencyToAdd.setVersionId(projectToAdd.latestVersion);
|
|
706
349
|
currentProjectConfiguration.addProjectDependency(dependencyToAdd);
|
|
707
|
-
flowResult(
|
|
708
|
-
|
|
709
|
-
);
|
|
350
|
+
flowResult(
|
|
351
|
+
configState.projectDependencyEditorState.fetchDependencyReport(),
|
|
352
|
+
).catch(applicationStore.alertUnhandledError);
|
|
710
353
|
} else {
|
|
711
354
|
currentProjectConfiguration.addProjectDependency(
|
|
712
355
|
new ProjectDependency(''),
|
|
@@ -717,10 +360,6 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
717
360
|
};
|
|
718
361
|
const disableAddButton =
|
|
719
362
|
selectedTab !== CONFIGURATION_EDITOR_TAB.PROJECT_DEPENDENCIES || isReadOnly;
|
|
720
|
-
const isLoading =
|
|
721
|
-
configState.updatingConfigurationState.isInProgress ||
|
|
722
|
-
configState.fetchingProjectVersionsState.isInProgress ||
|
|
723
|
-
configState.fetchingDependencyInfoState.isInProgress;
|
|
724
363
|
const updateConfigs = (): void => {
|
|
725
364
|
editorStore.localChangesState.alertUnsavedChanges((): void => {
|
|
726
365
|
flowResult(configState.updateConfigs()).catch(
|
|
@@ -737,9 +376,9 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
737
376
|
flowResult(configState.fectchAssociatedProjectsAndVersions()).catch(
|
|
738
377
|
applicationStore.alertUnhandledError,
|
|
739
378
|
);
|
|
740
|
-
flowResult(
|
|
741
|
-
|
|
742
|
-
);
|
|
379
|
+
flowResult(
|
|
380
|
+
configState.projectDependencyEditorState.fetchDependencyReport(),
|
|
381
|
+
).catch(applicationStore.alertUnhandledError);
|
|
743
382
|
}
|
|
744
383
|
}, [applicationStore, configState, selectedTab]);
|
|
745
384
|
|
|
@@ -808,30 +447,7 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
808
447
|
/>
|
|
809
448
|
)}
|
|
810
449
|
{selectedTab === CONFIGURATION_EDITOR_TAB.PROJECT_DEPENDENCIES && (
|
|
811
|
-
<
|
|
812
|
-
<PanelLoadingIndicator isLoading={isLoading} />
|
|
813
|
-
{isLoading && (
|
|
814
|
-
<div className="project-dependency-editor__progress-msg">
|
|
815
|
-
{configState.updatingConfigurationState.isInProgress
|
|
816
|
-
? `Updating configuration...`
|
|
817
|
-
: configState.fetchingProjectVersionsState.isInProgress
|
|
818
|
-
? `Fetching dependency versions`
|
|
819
|
-
: 'Updating project dependency tree and potential conflicts'}
|
|
820
|
-
</div>
|
|
821
|
-
)}
|
|
822
|
-
<ProjectDependencyActions config={configState} />
|
|
823
|
-
{currentProjectConfiguration.projectDependencies.map(
|
|
824
|
-
(projectDependency) => (
|
|
825
|
-
<ProjectDependencyEditor
|
|
826
|
-
key={projectDependency._UUID}
|
|
827
|
-
projectDependency={projectDependency}
|
|
828
|
-
deleteValue={deleteProjectDependency(projectDependency)}
|
|
829
|
-
isReadOnly={isReadOnly}
|
|
830
|
-
projects={configState.projects}
|
|
831
|
-
/>
|
|
832
|
-
),
|
|
833
|
-
)}
|
|
834
|
-
</div>
|
|
450
|
+
<ProjectDependencyEditor />
|
|
835
451
|
)}
|
|
836
452
|
{selectedTab === CONFIGURATION_EDITOR_TAB.PLATFORM_CONFIGURATIONS && (
|
|
837
453
|
<ProjectPlatformVersionEditor
|
|
@@ -839,14 +455,6 @@ export const ProjectConfigurationEditor = observer(() => {
|
|
|
839
455
|
isReadOnly={isReadOnly}
|
|
840
456
|
/>
|
|
841
457
|
)}
|
|
842
|
-
{configState.dependencyInfo &&
|
|
843
|
-
configState.dependencyInfoModalType && (
|
|
844
|
-
<ProjectDependencyInfoModal
|
|
845
|
-
configState={configState}
|
|
846
|
-
info={configState.dependencyInfo}
|
|
847
|
-
type={configState.dependencyInfoModalType}
|
|
848
|
-
/>
|
|
849
|
-
)}
|
|
850
458
|
</div>
|
|
851
459
|
</Panel>
|
|
852
460
|
</div>
|