@finos/legend-application-studio 28.19.73 → 28.19.75
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/editor/__test-utils__/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js +4 -0
- package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js +26 -338
- package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +9 -298
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +1 -1
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +1 -7
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.d.ts +2 -2
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +3 -3
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.js +1 -1
- package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
- package/lib/stores/editor/__test-utils__/EditorStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/editor/__test-utils__/EditorStoreTestUtils.js +4 -0
- package/lib/stores/editor/__test-utils__/EditorStoreTestUtils.js.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +0 -2
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +0 -19
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts +1 -16
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js +1 -112
- package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js.map +1 -1
- package/lib/stores/editor/panel-group/{SQLPlaygroundPanelState.d.ts → StudioSQLPlaygroundPanelState.d.ts} +8 -15
- package/lib/stores/editor/panel-group/StudioSQLPlaygroundPanelState.d.ts.map +1 -0
- package/lib/stores/editor/panel-group/{SQLPlaygroundPanelState.js → StudioSQLPlaygroundPanelState.js} +29 -44
- package/lib/stores/editor/panel-group/StudioSQLPlaygroundPanelState.js.map +1 -0
- package/package.json +13 -13
- package/src/components/editor/__test-utils__/EditorComponentTestUtils.tsx +4 -0
- package/src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx +53 -599
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +12 -576
- package/src/components/editor/side-bar/Explorer.tsx +1 -1
- package/src/stores/editor/EditorGraphState.ts +4 -11
- package/src/stores/editor/EditorStore.ts +3 -3
- package/src/stores/editor/GraphEditFormModeState.ts +1 -1
- package/src/stores/editor/__test-utils__/EditorStoreTestUtils.ts +4 -1
- package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +0 -26
- package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts +1 -178
- package/src/stores/editor/panel-group/{SQLPlaygroundPanelState.ts → StudioSQLPlaygroundPanelState.ts} +47 -60
- package/tsconfig.json +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +0 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorComponentTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/__test-utils__/EditorComponentTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,YAAY,EAKlB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAOpE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EAIf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAChC,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorComponentTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/__test-utils__/EditorComponentTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,YAAY,EAKlB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAOpE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,C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AE,CAAC;IAC3C,WAAW,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC9C,iBAAiB,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,EAAE,CAAC;IAC1D,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;IACrC,uBAAuB,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;CACnE,EACD,aAAa,OAAO,KACnB,OAAO,CAAC,YAAY,CAuBpB,CAAC"}
|
|
@@ -33,6 +33,7 @@ import {} from '../../../stores/LegendStudioBaseStore.js';
|
|
|
33
33
|
import { TEST__getLegendStudioApplicationConfig } from '../../../stores/__test-utils__/LegendStudioApplicationTestUtils.js';
|
|
34
34
|
import { Route, Routes } from '@finos/legend-application/browser';
|
|
35
35
|
import { ProjectViewer } from '../../project-view/ProjectViewer.js';
|
|
36
|
+
import { MockedMonacoEditorAPI } from '@finos/legend-lego/code-editor/test';
|
|
36
37
|
export const TEST_DATA__DefaultSDLCInfo = {
|
|
37
38
|
project: {
|
|
38
39
|
projectId: 'UAT-2689',
|
|
@@ -98,6 +99,9 @@ export const TEST__provideMockedEditorStore = (customization) => {
|
|
|
98
99
|
const pluginManager = customization?.pluginManager ?? LegendStudioPluginManager.create();
|
|
99
100
|
const applicationStore = customization?.applicationStore ??
|
|
100
101
|
new ApplicationStore(TEST__getLegendStudioApplicationConfig(), pluginManager);
|
|
102
|
+
MockedMonacoEditorAPI.createModel.mockReturnValue({
|
|
103
|
+
setValue() { },
|
|
104
|
+
});
|
|
101
105
|
const value = customization?.mock ??
|
|
102
106
|
new EditorStore(applicationStore, new SDLCServerClient({
|
|
103
107
|
env: applicationStore.config.env,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorComponentTestUtils.js","sourceRoot":"","sources":["../../../../src/components/editor/__test-utils__/EditorComponentTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAEL,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAoB,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAE9F,OAAO,EAOL,aAAa,EACb,+BAA+B,EAC/B,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAIL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,GAIlB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EACL,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAqC,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,sCAAsC,EAAE,MAAM,oEAAoE,CAAC;AAC5H,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorComponentTestUtils.js","sourceRoot":"","sources":["../../../../src/components/editor/__test-utils__/EditorComponentTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE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ditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2CH,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ProjectDependencyEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2CH,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,4BAA4B,CAAC;AAmCpC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AA4YD,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,4BAA4B,KACnC,MAwBc,CAAC;AAyclB,eAAO,MAAM,uBAAuB;;CAqDlC,CAAC"}
|
package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.js
CHANGED
|
@@ -17,12 +17,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
import { useApplicationStore, DEFAULT_TAB_SIZE, } from '@finos/legend-application';
|
|
18
18
|
import { compareLabelFn, clsx, CustomSelectorInput, TimesIcon, Dialog, ControlledDropdownMenu, CaretDownIcon, MenuContentItem, MenuContent, Modal, ModalBody, ModalFooter, ModalHeader, PanelLoadingIndicator, TreeView, ChevronDownIcon, ChevronRightIcon, ContextMenu, CompressIcon, SubjectIcon, ViewHeadlineIcon, ExpandAllIcon, BlankPanelContent, VersionsIcon, RepoIcon, ModalFooterButton, Button, Panel, PanelHeader, PanelHeaderActions, PanelHeaderActionItem, PanelContentLists, } from '@finos/legend-art';
|
|
19
19
|
import { MASTER_SNAPSHOT_ALIAS, SNAPSHOT_VERSION_ALIAS, } from '@finos/legend-server-depot';
|
|
20
|
-
import {} from '@finos/legend-server-sdlc';
|
|
21
20
|
import { ActionState, assertErrorThrown, guaranteeNonNullable, isNonNullable, LogEvent, prettyCONSTName, compareSemVerVersions, } from '@finos/legend-shared';
|
|
22
21
|
import { generateGAVCoordinates } from '@finos/legend-storage';
|
|
23
22
|
import { flowResult } from 'mobx';
|
|
24
23
|
import { observer } from 'mobx-react-lite';
|
|
25
|
-
import { forwardRef,
|
|
24
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
26
25
|
import { ProjectConfigurationEditorState } from '../../../../stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js';
|
|
27
26
|
import { ConflictTreeNodeData, ConflictVersionNodeData, buildDependencyNodeChildren, DEPENDENCY_REPORT_TAB, openAllDependencyNodesInTree, ProjectDependencyTreeNodeData, } from '../../../../stores/editor/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js';
|
|
28
27
|
import { LEGEND_STUDIO_APP_EVENT } from '../../../../__lib__/LegendStudioEvent.js';
|
|
@@ -103,94 +102,17 @@ const DependencyTreeNodeContextMenu = observer(forwardRef(function DependencyTre
|
|
|
103
102
|
}));
|
|
104
103
|
const DependencyTreeNodeContainer = (props) => {
|
|
105
104
|
const { node, level, stepPaddingInRem, onNodeSelect } = props;
|
|
106
|
-
const editorStore = useEditorStore();
|
|
107
|
-
const dependencyEditorState = editorStore.projectConfigurationEditorState.projectDependencyEditorState;
|
|
108
105
|
const isExpandable = Boolean(node.childrenIds?.length);
|
|
109
106
|
const selectNode = () => onNodeSelect?.(node);
|
|
110
107
|
const value = node.value;
|
|
111
|
-
const isExcluded = () => {
|
|
112
|
-
const coordinate = generateGAVCoordinates(value.groupId, value.artifactId, undefined);
|
|
113
|
-
const treeData = dependencyEditorState.dependencyTreeData;
|
|
114
|
-
if (!treeData) {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
const findRootNodeForCurrentNode = (nodeId) => {
|
|
118
|
-
if (treeData.rootIds.indexOf(nodeId) !== -1) {
|
|
119
|
-
return nodeId;
|
|
120
|
-
}
|
|
121
|
-
const findInSubtree = (rootId, searchId) => {
|
|
122
|
-
const rootNode = treeData.nodes.get(rootId);
|
|
123
|
-
if (!rootNode) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
const visited = {};
|
|
127
|
-
const queue = [rootId];
|
|
128
|
-
while (queue.length > 0) {
|
|
129
|
-
const currentId = queue.shift();
|
|
130
|
-
if (!currentId || visited[currentId]) {
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
visited[currentId] = true;
|
|
134
|
-
if (currentId === searchId) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
const currentNode = treeData.nodes.get(currentId);
|
|
138
|
-
if (currentNode?.childrenIds) {
|
|
139
|
-
for (let i = 0; i < currentNode.childrenIds.length; i++) {
|
|
140
|
-
queue.push(guaranteeNonNullable(currentNode.childrenIds[i]));
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return false;
|
|
145
|
-
};
|
|
146
|
-
for (let i = 0; i < treeData.rootIds.length; i++) {
|
|
147
|
-
const rootId = guaranteeNonNullable(treeData.rootIds[i]);
|
|
148
|
-
if (findInSubtree(rootId, nodeId)) {
|
|
149
|
-
return rootId;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return null;
|
|
153
|
-
};
|
|
154
|
-
const rootNodeId = findRootNodeForCurrentNode(node.id);
|
|
155
|
-
if (!rootNodeId) {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
const rootNode = treeData.nodes.get(rootNodeId);
|
|
159
|
-
if (!rootNode) {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
const currentProjectConfiguration = editorStore.projectConfigurationEditorState.currentProjectConfiguration;
|
|
163
|
-
const rootCoordinate = `${rootNode.value.groupId}:${rootNode.value.artifactId}`;
|
|
164
|
-
for (let i = 0; i < currentProjectConfiguration.projectDependencies.length; i++) {
|
|
165
|
-
const projectDep = guaranteeNonNullable(currentProjectConfiguration.projectDependencies[i]);
|
|
166
|
-
const projectDepCoordinate = generateGAVCoordinates(guaranteeNonNullable(projectDep.groupId), guaranteeNonNullable(projectDep.artifactId), undefined);
|
|
167
|
-
if (projectDepCoordinate === rootCoordinate) {
|
|
168
|
-
const exclusions = dependencyEditorState.getExclusions(projectDep.projectId);
|
|
169
|
-
for (let j = 0; j < exclusions.length; j++) {
|
|
170
|
-
if (guaranteeNonNullable(exclusions[j]).coordinate === coordinate) {
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return false;
|
|
178
|
-
};
|
|
179
|
-
const nodeIsExcluded = isExcluded();
|
|
180
108
|
const nodeExpandIcon = isExpandable ? (node.isOpen ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronRightIcon, {}))) : (_jsx("div", {}));
|
|
181
109
|
return (_jsx(ContextMenu, { content: _jsx(DependencyTreeNodeContextMenu, { node: node }), menuProps: { elevation: 7 }, children: _jsxs("div", { className: clsx('tree-view__node__container project-dependency-explorer-tree__node__container', {
|
|
182
110
|
'menu__trigger--on-menu-open': !node.isSelected,
|
|
183
111
|
}, {
|
|
184
112
|
'project-dependency-explorer-tree__node__container--selected': node.isSelected,
|
|
185
|
-
}, {
|
|
186
|
-
'project-dependency-explorer-tree__node__container--excluded': nodeIsExcluded,
|
|
187
113
|
}), style: {
|
|
188
114
|
paddingLeft: `${(level - 1) * (stepPaddingInRem ?? 1)}rem`,
|
|
189
|
-
}, onClick: selectNode, children: [_jsx("div", { className: "tree-view__node__icon project-dependency-explorer-tree__node__icon", children: _jsx("div", { className: "project-dependency-explorer-tree__node__icon__expand", children: nodeExpandIcon }) }), _jsx("button", { className:
|
|
190
|
-
'project-dependency-explorer-tree__node__label--excluded': nodeIsExcluded,
|
|
191
|
-
}), tabIndex: -1, title: nodeIsExcluded ? `${value.id} (EXCLUDED)` : value.id, children: value.artifactId }), _jsx("div", { className: "project-dependency-explorer-tree__node__version", children: _jsx("button", { className: clsx('project-dependency-explorer-tree__node__version-btn', {
|
|
192
|
-
'project-dependency-explorer-tree__node__version-btn--excluded': nodeIsExcluded,
|
|
193
|
-
}), title: value.versionId, tabIndex: -1, children: value.versionId }) })] }) }));
|
|
115
|
+
}, onClick: selectNode, children: [_jsx("div", { className: "tree-view__node__icon project-dependency-explorer-tree__node__icon", children: _jsx("div", { className: "project-dependency-explorer-tree__node__icon__expand", children: nodeExpandIcon }) }), _jsx("button", { className: "tree-view__node__label project-dependency-explorer-tree__node__label", tabIndex: -1, title: value.id, children: value.artifactId }), _jsx("div", { className: "project-dependency-explorer-tree__node__version", children: _jsx("button", { className: "project-dependency-explorer-tree__node__version-btn", title: value.versionId, tabIndex: -1, children: value.versionId }) })] }) }));
|
|
194
116
|
};
|
|
195
117
|
const DependencyTreeView = (props) => {
|
|
196
118
|
const { treeData, setTreeData } = props;
|
|
@@ -226,101 +148,19 @@ const DependencyTreeView = (props) => {
|
|
|
226
148
|
};
|
|
227
149
|
const ConflictTreeNodeContainer = (props) => {
|
|
228
150
|
const { node, level, stepPaddingInRem, onNodeSelect } = props;
|
|
229
|
-
const editorStore = useEditorStore();
|
|
230
|
-
const dependencyEditorState = editorStore.projectConfigurationEditorState.projectDependencyEditorState;
|
|
231
151
|
const isExpandable = Boolean(node.childrenIds?.length);
|
|
232
152
|
const selectNode = () => onNodeSelect?.(node);
|
|
233
|
-
const isExcluded = () => {
|
|
234
|
-
if (!(node instanceof ProjectDependencyTreeNodeData)) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
const value = node.value;
|
|
238
|
-
const coordinate = `${value.groupId}:${value.artifactId}`;
|
|
239
|
-
const treeData = dependencyEditorState.dependencyTreeData;
|
|
240
|
-
if (!treeData) {
|
|
241
|
-
return false;
|
|
242
|
-
}
|
|
243
|
-
const findRootNodeForCurrentNode = (nodeId) => {
|
|
244
|
-
if (treeData.rootIds.indexOf(nodeId) !== -1) {
|
|
245
|
-
return nodeId;
|
|
246
|
-
}
|
|
247
|
-
const findInSubtree = (rootId, searchId) => {
|
|
248
|
-
const rootNode = treeData.nodes.get(rootId);
|
|
249
|
-
if (!rootNode) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
const visited = {};
|
|
253
|
-
const queue = [rootId];
|
|
254
|
-
while (queue.length > 0) {
|
|
255
|
-
const currentId = queue.shift();
|
|
256
|
-
if (!currentId || visited[currentId]) {
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
visited[currentId] = true;
|
|
260
|
-
if (currentId === searchId) {
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
|
-
const currentNode = treeData.nodes.get(currentId);
|
|
264
|
-
if (currentNode?.childrenIds) {
|
|
265
|
-
for (let i = 0; i < currentNode.childrenIds.length; i++) {
|
|
266
|
-
queue.push(guaranteeNonNullable(currentNode.childrenIds[i]));
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return false;
|
|
271
|
-
};
|
|
272
|
-
for (let i = 0; i < treeData.rootIds.length; i++) {
|
|
273
|
-
const rootId = guaranteeNonNullable(treeData.rootIds[i]);
|
|
274
|
-
if (findInSubtree(rootId, nodeId)) {
|
|
275
|
-
return rootId;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return null;
|
|
279
|
-
};
|
|
280
|
-
const rootNodeId = findRootNodeForCurrentNode(node.id);
|
|
281
|
-
if (!rootNodeId) {
|
|
282
|
-
return false;
|
|
283
|
-
}
|
|
284
|
-
const rootNode = treeData.nodes.get(rootNodeId);
|
|
285
|
-
if (!rootNode) {
|
|
286
|
-
return false;
|
|
287
|
-
}
|
|
288
|
-
const currentProjectConfiguration = editorStore.projectConfigurationEditorState.currentProjectConfiguration;
|
|
289
|
-
const rootCoordinate = `${rootNode.value.groupId}:${rootNode.value.artifactId}`;
|
|
290
|
-
for (let i = 0; i < currentProjectConfiguration.projectDependencies.length; i++) {
|
|
291
|
-
const projectDep = guaranteeNonNullable(currentProjectConfiguration.projectDependencies[i]);
|
|
292
|
-
const projectDepCoordinate = generateGAVCoordinates(guaranteeNonNullable(projectDep.groupId), guaranteeNonNullable(projectDep.artifactId), undefined);
|
|
293
|
-
if (projectDepCoordinate === rootCoordinate) {
|
|
294
|
-
const exclusions = dependencyEditorState.getExclusions(projectDep.projectId);
|
|
295
|
-
for (let j = 0; j < exclusions.length; j++) {
|
|
296
|
-
if (guaranteeNonNullable(exclusions[j]).coordinate === coordinate) {
|
|
297
|
-
return true;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
return false;
|
|
304
|
-
};
|
|
305
153
|
const nodeExpandIcon = isExpandable ? (node.isOpen ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronRightIcon, {}))) : (_jsx("div", {}));
|
|
306
154
|
return (_jsx(ContextMenu, { content: _jsx(DependencyTreeNodeContextMenu, { node: node }), menuProps: { elevation: 7 }, children: _jsxs("div", { className: clsx('tree-view__node__container project-dependency-explorer-tree__node__container', {
|
|
307
155
|
'menu__trigger--on-menu-open': !node.isSelected,
|
|
308
156
|
}, {
|
|
309
157
|
'project-dependency-explorer-tree__node__container--selected': node.isSelected,
|
|
310
|
-
}, {
|
|
311
|
-
'project-dependency-explorer-tree__node__container--excluded': isExcluded(),
|
|
312
158
|
}), style: {
|
|
313
159
|
paddingLeft: `${(level - 1) * (stepPaddingInRem ?? 1)}rem`,
|
|
314
160
|
}, onClick: selectNode, children: [_jsxs("div", { className: clsx('tree-view__node__icon project-dependency-explorer-tree__node__icon', {
|
|
315
161
|
'tree-view__node__icon project-dependency-explorer-tree__node__icon__with__type': node instanceof ConflictTreeNodeData ||
|
|
316
162
|
node instanceof ConflictVersionNodeData,
|
|
317
|
-
}), children: [_jsx("div", { className: "project-dependency-explorer-tree__node__icon__expand", children: nodeExpandIcon }), node instanceof ConflictTreeNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__icon__type", children: _jsx(RepoIcon, {}) })), node instanceof ConflictVersionNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__icon__type", children: _jsx(VersionsIcon, {}) }))] }), _jsx("button", { className:
|
|
318
|
-
'project-dependency-explorer-tree__node__label--excluded': isExcluded(),
|
|
319
|
-
}), tabIndex: -1, title: isExcluded() ? `${node.description} (EXCLUDED)` : node.description, children: node.label }), node instanceof ProjectDependencyTreeNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__version", children: _jsx("button", { className: clsx('project-dependency-explorer-tree__node__version-btn', {
|
|
320
|
-
'project-dependency-explorer-tree__node__version-btn--excluded': isExcluded(),
|
|
321
|
-
}), title: isExcluded()
|
|
322
|
-
? `${node.value.versionId} (EXCLUDED)`
|
|
323
|
-
: node.value.versionId, tabIndex: -1, children: node.value.versionId }) }))] }) }));
|
|
163
|
+
}), children: [_jsx("div", { className: "project-dependency-explorer-tree__node__icon__expand", children: nodeExpandIcon }), node instanceof ConflictTreeNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__icon__type", children: _jsx(RepoIcon, {}) })), node instanceof ConflictVersionNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__icon__type", children: _jsx(VersionsIcon, {}) }))] }), _jsx("button", { className: "tree-view__node__label project-dependency-explorer-tree__node__label", tabIndex: -1, title: node.description, children: node.label }), node instanceof ProjectDependencyTreeNodeData && (_jsx("div", { className: "project-dependency-explorer-tree__node__version", children: _jsx("button", { className: "project-dependency-explorer-tree__node__version-btn", title: node.value.versionId, tabIndex: -1, children: node.value.versionId }) }))] }) }));
|
|
324
164
|
};
|
|
325
165
|
const ConflictDependencyTreeView = (props) => {
|
|
326
166
|
const { treeData, setTreeData } = props;
|
|
@@ -436,141 +276,8 @@ const ProjectDependencyReportModal = observer((props) => {
|
|
|
436
276
|
}), children: prettyCONSTName(tab) }, tab))) }) }), reportTab === DEPENDENCY_REPORT_TAB.EXPLORER && (_jsxs(Panel, { className: "project-dependency-explorer", children: [_jsxs(PanelHeader, { children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: "explorer" }) }), _jsxs(PanelHeaderActions, { children: [!flattenView && (_jsxs(_Fragment, { children: [_jsx(PanelHeaderActionItem, { disabled: !treeData, onClick: collapseTree, title: "Collapse Tree", children: _jsx(CompressIcon, {}) }), _jsx(PanelHeaderActionItem, { disabled: !treeData || !dependencyReport, onClick: openAllDependencyNodes, title: "Expand All Dependencies", children: _jsx(ExpandAllIcon, {}) })] })), _jsx("div", { className: "panel__header__action query-builder__functions-explorer__custom-icon", children: flattenView ? (_jsx(SubjectIcon, { title: "View as Tree", onClick: toggleViewAsListOrAsTree })) : (_jsx(ViewHeadlineIcon, { title: "View as Flatten List", onClick: toggleViewAsListOrAsTree })) })] })] }), _jsx("div", { className: "project-dependency-explorer__content", children: treeData && (_jsx(DependencyTreeView, { treeData: treeData, setTreeData: setTreeData })) })] })), reportTab === DEPENDENCY_REPORT_TAB.CONFLICTS &&
|
|
437
277
|
dependencyReport && (_jsx(ProjectDependencyConflictViewer, { report: dependencyReport, dependencyEditorState: dependencyEditorState }))] }) }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { onClick: closeModal, text: "Close", type: "secondary" }) })] }) }));
|
|
438
278
|
});
|
|
439
|
-
const ProjectDependencyInlineExclusionsSelector = observer((props) => {
|
|
440
|
-
const { projectDependency, isReadOnly } = props;
|
|
441
|
-
const editorStore = useEditorStore();
|
|
442
|
-
const applicationStore = useApplicationStore();
|
|
443
|
-
const dependencyEditorState = editorStore.projectConfigurationEditorState.projectDependencyEditorState;
|
|
444
|
-
const [selectedTransitiveDependency, setSelectedTransitiveDependency] = useState(null);
|
|
445
|
-
const [transitiveDependencyOptions, setTransitiveDependencyOptions] = useState([]);
|
|
446
|
-
const getTransitiveDependencies = useCallback(() => {
|
|
447
|
-
const dependencyReport = dependencyEditorState.dependencyReport;
|
|
448
|
-
if (!dependencyReport?.graph) {
|
|
449
|
-
return [];
|
|
450
|
-
}
|
|
451
|
-
const transitiveDeps = {};
|
|
452
|
-
const existingExclusionCoordinates = dependencyEditorState.getExclusionCoordinates(projectDependency.projectId);
|
|
453
|
-
const visitedNodes = {};
|
|
454
|
-
const traverseNode = (nodeId) => {
|
|
455
|
-
if (visitedNodes[nodeId]) {
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
visitedNodes[nodeId] = true;
|
|
459
|
-
const node = dependencyReport.graph.nodes.get(nodeId);
|
|
460
|
-
if (node?.dependencies) {
|
|
461
|
-
for (let i = 0; i < node.dependencies.length; i++) {
|
|
462
|
-
const dep = node.dependencies[i];
|
|
463
|
-
if (!dep?.groupId || !dep.artifactId) {
|
|
464
|
-
continue;
|
|
465
|
-
}
|
|
466
|
-
const coordinate = generateGAVCoordinates(dep.groupId, dep.artifactId, undefined);
|
|
467
|
-
if (existingExclusionCoordinates.indexOf(coordinate) === -1 &&
|
|
468
|
-
coordinate !==
|
|
469
|
-
`${projectDependency.groupId}:${projectDependency.artifactId}`) {
|
|
470
|
-
transitiveDeps[coordinate] = {
|
|
471
|
-
label: generateGAVCoordinates(dep.groupId, dep.artifactId, undefined),
|
|
472
|
-
value: coordinate,
|
|
473
|
-
groupId: dep.groupId,
|
|
474
|
-
artifactId: dep.artifactId,
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
traverseNode(dep.id);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
const rootNodeId = generateGAVCoordinates(guaranteeNonNullable(projectDependency.groupId), guaranteeNonNullable(projectDependency.artifactId), guaranteeNonNullable(projectDependency.versionId));
|
|
482
|
-
traverseNode(rootNodeId);
|
|
483
|
-
const transitiveDepsArray = [];
|
|
484
|
-
for (const coordinate in transitiveDeps) {
|
|
485
|
-
if (Object.prototype.hasOwnProperty.call(transitiveDeps, coordinate)) {
|
|
486
|
-
if (!transitiveDeps[coordinate]) {
|
|
487
|
-
continue;
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
transitiveDepsArray.push(transitiveDeps[coordinate]);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
return transitiveDepsArray.sort((a, b) => a.label.localeCompare(b.label));
|
|
495
|
-
}, [
|
|
496
|
-
dependencyEditorState,
|
|
497
|
-
projectDependency.projectId,
|
|
498
|
-
projectDependency.groupId,
|
|
499
|
-
projectDependency.artifactId,
|
|
500
|
-
projectDependency.versionId,
|
|
501
|
-
]);
|
|
502
|
-
useEffect(() => {
|
|
503
|
-
setTransitiveDependencyOptions(getTransitiveDependencies());
|
|
504
|
-
}, [
|
|
505
|
-
dependencyEditorState.dependencyReport,
|
|
506
|
-
projectDependency.projectId,
|
|
507
|
-
getTransitiveDependencies,
|
|
508
|
-
]);
|
|
509
|
-
const addExclusionFromDropdown = (option) => {
|
|
510
|
-
if (!option) {
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
try {
|
|
514
|
-
dependencyEditorState.addExclusionByCoordinate(projectDependency.projectId, option.value);
|
|
515
|
-
setSelectedTransitiveDependency(null);
|
|
516
|
-
setTransitiveDependencyOptions(getTransitiveDependencies());
|
|
517
|
-
flowResult(dependencyEditorState.fetchDependencyReport())
|
|
518
|
-
.then(() => {
|
|
519
|
-
setTransitiveDependencyOptions(getTransitiveDependencies());
|
|
520
|
-
})
|
|
521
|
-
.catch(applicationStore.alertUnhandledError);
|
|
522
|
-
applicationStore.notificationService.notifySuccess(`Exclusion added: ${option.value}`);
|
|
523
|
-
}
|
|
524
|
-
catch (error) {
|
|
525
|
-
assertErrorThrown(error);
|
|
526
|
-
applicationStore.notificationService.notifyError(`Failed to add exclusion: ${error.message}`);
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
if (isReadOnly) {
|
|
530
|
-
return null;
|
|
531
|
-
}
|
|
532
|
-
return (_jsx("div", { className: "project-dependency-exclusions-selector", children: _jsx(CustomSelectorInput, { className: "project-dependency-exclusions-selector__dropdown", placeholder: "Add exclusion...", options: transitiveDependencyOptions, onChange: addExclusionFromDropdown, value: selectedTransitiveDependency, isClearable: true, escapeClearsValue: true, disabled: transitiveDependencyOptions.length === 0, darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled }) }));
|
|
533
|
-
});
|
|
534
|
-
const ProjectDependencyExclusionsList = observer((props) => {
|
|
535
|
-
const { projectDependency, isReadOnly } = props;
|
|
536
|
-
const editorStore = useEditorStore();
|
|
537
|
-
const applicationStore = useApplicationStore();
|
|
538
|
-
const dependencyEditorState = editorStore.projectConfigurationEditorState.projectDependencyEditorState;
|
|
539
|
-
const [, setForceUpdate] = useState(0);
|
|
540
|
-
const exclusions = dependencyEditorState.getExclusions(projectDependency.projectId);
|
|
541
|
-
useEffect(() => {
|
|
542
|
-
setForceUpdate((prev) => prev + 1);
|
|
543
|
-
}, [
|
|
544
|
-
dependencyEditorState.dependencyReport,
|
|
545
|
-
projectDependency.projectId,
|
|
546
|
-
dependencyEditorState,
|
|
547
|
-
]);
|
|
548
|
-
useEffect(() => {
|
|
549
|
-
const interval = setInterval(() => {
|
|
550
|
-
const currentExclusions = dependencyEditorState.getExclusions(projectDependency.projectId);
|
|
551
|
-
if (currentExclusions.length !== exclusions.length) {
|
|
552
|
-
setForceUpdate((prev) => prev + 1);
|
|
553
|
-
}
|
|
554
|
-
}, 1000);
|
|
555
|
-
return () => clearInterval(interval);
|
|
556
|
-
}, [exclusions.length, dependencyEditorState, projectDependency.projectId]);
|
|
557
|
-
const removeExclusion = (exclusion) => {
|
|
558
|
-
try {
|
|
559
|
-
dependencyEditorState.removeExclusion(projectDependency.projectId, exclusion);
|
|
560
|
-
flowResult(dependencyEditorState.fetchDependencyReport()).catch(applicationStore.alertUnhandledError);
|
|
561
|
-
applicationStore.notificationService.notifySuccess(`Exclusion removed: ${exclusion.coordinate}`);
|
|
562
|
-
}
|
|
563
|
-
catch (error) {
|
|
564
|
-
assertErrorThrown(error);
|
|
565
|
-
applicationStore.notificationService.notifyError(`Failed to remove exclusion: ${error.message}`);
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
if (exclusions.length === 0) {
|
|
569
|
-
return null;
|
|
570
|
-
}
|
|
571
|
-
return (_jsxs("div", { className: "project-dependency-exclusions-list", children: [_jsx("div", { className: "project-dependency-exclusions-list__header", children: _jsxs("div", { className: "project-dependency-exclusions-list__title", children: ["Exclusions (", exclusions.length, ")"] }) }), _jsx("div", { className: "project-dependency-exclusions-list__items", children: exclusions.map((exclusion) => (_jsxs("div", { className: "project-dependency-exclusions-list__item", children: [_jsx("div", { className: "project-dependency-exclusions-list__item__coordinate", children: exclusion.coordinate }), !isReadOnly && (_jsx("button", { className: "project-dependency-exclusions-list__item__remove-btn btn--dark btn--caution", onClick: () => removeExclusion(exclusion), title: "Remove exclusion", children: _jsx(TimesIcon, {}) }))] }, exclusion.coordinate))) })] }));
|
|
572
|
-
});
|
|
573
279
|
const ProjectVersionDependencyEditor = observer((props) => {
|
|
280
|
+
// init
|
|
574
281
|
const { projectDependency, deleteValue, isReadOnly, projects } = props;
|
|
575
282
|
const projectDependencyData = projects.get(projectDependency.projectId);
|
|
576
283
|
const editorStore = useEditorStore();
|
|
@@ -588,14 +295,10 @@ const ProjectVersionDependencyEditor = observer((props) => {
|
|
|
588
295
|
: null;
|
|
589
296
|
const projectDisabled = !configState.associatedProjectsAndVersionsFetched ||
|
|
590
297
|
configState.isReadOnly;
|
|
591
|
-
const
|
|
592
|
-
configState.projects.forEach((project) => {
|
|
593
|
-
projectsArray.push(project);
|
|
594
|
-
});
|
|
595
|
-
const projectsOptions = projectsArray
|
|
298
|
+
const projectsOptions = Array.from(configState.projects.values())
|
|
596
299
|
.map(buildProjectOption)
|
|
597
300
|
.sort(compareLabelFn);
|
|
598
|
-
const onProjectSelectionChange = (val) => {
|
|
301
|
+
const onProjectSelectionChange = async (val) => {
|
|
599
302
|
if ((val !== null || selectedProjectOption !== null) &&
|
|
600
303
|
(!val ||
|
|
601
304
|
!selectedProjectOption ||
|
|
@@ -605,28 +308,21 @@ const ProjectVersionDependencyEditor = observer((props) => {
|
|
|
605
308
|
if (val) {
|
|
606
309
|
try {
|
|
607
310
|
fetchSelectedProjectVersionsStatus.inProgress();
|
|
608
|
-
editorStore.depotServerClient
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
projectDependency.setVersionId('');
|
|
618
|
-
}
|
|
619
|
-
fetchSelectedProjectVersionsStatus.reset();
|
|
620
|
-
})
|
|
621
|
-
.catch((error) => {
|
|
622
|
-
assertErrorThrown(error);
|
|
623
|
-
editorStore.applicationStore.notificationService.notifyError(error);
|
|
624
|
-
fetchSelectedProjectVersionsStatus.reset();
|
|
625
|
-
});
|
|
311
|
+
const _versions = await editorStore.depotServerClient.getVersions(guaranteeNonNullable(projectDependency.groupId), guaranteeNonNullable(projectDependency.artifactId), true);
|
|
312
|
+
configState.versions.set(val.value.coordinates, _versions);
|
|
313
|
+
if (_versions.length) {
|
|
314
|
+
projectDependency.setVersionId(guaranteeNonNullable(_versions[_versions.length - 1]));
|
|
315
|
+
flowResult(dependencyEditorState.fetchDependencyReport()).catch(applicationStore.alertUnhandledError);
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
projectDependency.setVersionId('');
|
|
319
|
+
}
|
|
626
320
|
}
|
|
627
321
|
catch (error) {
|
|
628
322
|
assertErrorThrown(error);
|
|
629
323
|
editorStore.applicationStore.notificationService.notifyError(error);
|
|
324
|
+
}
|
|
325
|
+
finally {
|
|
630
326
|
fetchSelectedProjectVersionsStatus.reset();
|
|
631
327
|
}
|
|
632
328
|
}
|
|
@@ -634,25 +330,17 @@ const ProjectVersionDependencyEditor = observer((props) => {
|
|
|
634
330
|
};
|
|
635
331
|
// version
|
|
636
332
|
const version = projectDependency.versionId;
|
|
637
|
-
const
|
|
638
|
-
.
|
|
639
|
-
.
|
|
640
|
-
const versionOptions = sortedVersions.map((v) => {
|
|
333
|
+
const versionOptions = versions
|
|
334
|
+
.toSorted((v1, v2) => compareSemVerVersions(v2, v1))
|
|
335
|
+
.map((v) => {
|
|
641
336
|
if (v === MASTER_SNAPSHOT_ALIAS) {
|
|
642
337
|
return { value: v, label: SNAPSHOT_VERSION_ALIAS };
|
|
643
338
|
}
|
|
644
339
|
return { value: v, label: v };
|
|
645
340
|
});
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
selectedVersionOption = guaranteeNonNullable(versionOptions[i]);
|
|
650
|
-
break;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
const versionDisabled = !guaranteeNonNullable(versions.length) ||
|
|
654
|
-
!guaranteeNonNullable(projectDependency.projectId.length) ||
|
|
655
|
-
!guaranteeNonNullable(configState.associatedProjectsAndVersionsFetched) ||
|
|
341
|
+
const selectedVersionOption = versionOptions.find((v) => v.value === version) ?? null;
|
|
342
|
+
const versionDisabled = Boolean(!versions.length || !projectDependency.projectId.length) ||
|
|
343
|
+
!configState.associatedProjectsAndVersionsFetched ||
|
|
656
344
|
isReadOnly;
|
|
657
345
|
const onVersionSelectionChange = (val) => {
|
|
658
346
|
if ((val !== null || selectedVersionOption !== null) &&
|
|
@@ -689,12 +377,12 @@ const ProjectVersionDependencyEditor = observer((props) => {
|
|
|
689
377
|
? 'No project version found. Please create a new one.'
|
|
690
378
|
: 'Select version';
|
|
691
379
|
return (_jsxs("div", { className: "project-dependency-editor", children: [_jsx(CustomSelectorInput, { className: "project-dependency-editor__selector", inputRef: projectSelectorRef, disabled: projectDisabled, options: projectsOptions, isClearable: true, escapeClearsValue: true, onChange: (val) => {
|
|
692
|
-
onProjectSelectionChange(val);
|
|
380
|
+
onProjectSelectionChange(val).catch(applicationStore.alertUnhandledError);
|
|
693
381
|
}, value: selectedProjectOption, isLoading: configState.fetchingProjectVersionsState.isInProgress, formatOptionLabel: formatOptionLabel, darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled }), _jsx(CustomSelectorInput, { className: "project-dependency-editor__selector", inputRef: versionSelectorRef, options: versionOptions, isClearable: true, escapeClearsValue: true, onChange: onVersionSelectionChange, value: selectedVersionOption, disabled: versionDisabled, placeholder: fetchSelectedProjectVersionsStatus.isInProgress
|
|
694
382
|
? 'Fetching project versions'
|
|
695
383
|
: projectSelectorPlaceholder, isLoading: editorStore.projectConfigurationEditorState
|
|
696
384
|
.fetchingProjectVersionsState.isInProgress ||
|
|
697
|
-
fetchSelectedProjectVersionsStatus.isInProgress, darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled }),
|
|
385
|
+
fetchSelectedProjectVersionsStatus.isInProgress, darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled }), _jsxs(ControlledDropdownMenu, { className: "project-dependency-editor__visit-project-btn__dropdown-trigger btn--medium", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { disabled: !selectedProject || !selectedVersionOption, onClick: viewProject, title: "View project", children: "Project" }), _jsx(MenuContentItem, { title: "View SDLC project", disabled: !selectedProject ||
|
|
698
386
|
!selectedVersionOption ||
|
|
699
387
|
!projectDependencyData, onClick: viewSDLCProject, children: "SDLC project" })] }), children: ["Go to... ", _jsx(CaretDownIcon, { title: "Show more options..." })] }), _jsx("button", { className: "project-dependency-editor__remove-btn btn--dark btn--caution", disabled: isReadOnly, onClick: deleteValue, tabIndex: -1, title: "Close", children: _jsx(TimesIcon, {}) })] }));
|
|
700
388
|
});
|
|
@@ -716,6 +404,6 @@ export const ProjectDependencyEditor = observer(() => {
|
|
|
716
404
|
? `Updating configuration...`
|
|
717
405
|
: configState.fetchingProjectVersionsState.isInProgress
|
|
718
406
|
? `Fetching dependency versions`
|
|
719
|
-
: 'Updating project dependency tree and potential conflicts' })), _jsx(ProjectDependencyActions, { dependencyEditorState: dependencyEditorState }), currentProjectConfiguration.projectDependencies.map((projectDependency) => (
|
|
407
|
+
: 'Updating project dependency tree and potential conflicts' })), _jsx(ProjectDependencyActions, { dependencyEditorState: dependencyEditorState }), currentProjectConfiguration.projectDependencies.map((projectDependency) => (_jsx(ProjectVersionDependencyEditor, { projectDependency: projectDependency, deleteValue: deleteProjectDependency(projectDependency), isReadOnly: isReadOnly, projects: configState.projects }, projectDependency._UUID))), dependencyEditorState.reportTab && (_jsx(ProjectDependencyReportModal, { tab: dependencyEditorState.reportTab, dependencyEditorState: dependencyEditorState }))] }));
|
|
720
408
|
});
|
|
721
409
|
//# sourceMappingURL=ProjectDependencyEditor.js.map
|