@topconsultnpm/sdkui-react-beta 6.15.41 → 6.15.42
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.
|
@@ -121,7 +121,32 @@ const TMFileManager = (props) => {
|
|
|
121
121
|
const renderTreeViewItem = useCallback((itemData) => {
|
|
122
122
|
const isSelected = selectedFolder && selectedFolder.id === itemData.id;
|
|
123
123
|
const tooltipContent = _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID" }), ": ", itemData.id] });
|
|
124
|
-
|
|
124
|
+
const onDragOver = (e) => {
|
|
125
|
+
if (e === undefined)
|
|
126
|
+
return;
|
|
127
|
+
const item = itemData.id === treeFs.id ? treeFs : findFileItems(treeFs.items, itemData.id);
|
|
128
|
+
if (item)
|
|
129
|
+
handleSelectedFolder?.(item);
|
|
130
|
+
handleDragOver(e);
|
|
131
|
+
};
|
|
132
|
+
const onDrop = (e) => {
|
|
133
|
+
if (e === undefined)
|
|
134
|
+
return;
|
|
135
|
+
const item = itemData.id === treeFs.id ? treeFs : findFileItems(treeFs.items, itemData.id);
|
|
136
|
+
if (item)
|
|
137
|
+
handleSelectedFolder?.(item);
|
|
138
|
+
handleDrop(e);
|
|
139
|
+
};
|
|
140
|
+
const onDragLeave = (e) => {
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
handleDragLeave(e);
|
|
143
|
+
};
|
|
144
|
+
return (_jsxs("div", { onDrop: onDrop, onDragOver: onDragOver, onDragLeave: onDragLeave, style: {
|
|
145
|
+
whiteSpace: "nowrap",
|
|
146
|
+
display: "flex",
|
|
147
|
+
alignItems: "center",
|
|
148
|
+
opacity: (isSelected || itemData.subFileFolderCount > 0) ? 1 : 0.5
|
|
149
|
+
}, className: isSelected ? 'treeview-selected-item-manager' : '', children: [_jsx(TMTooltip, { content: tooltipContent, children: _jsx(IconFolder, { fontSize: 24, style: { marginRight: 5, color: TMColors.iconLight } }) }), itemData.text, itemData.subFileFolderCount > 0 && ` (${itemData.subFileFolderCount})`] }));
|
|
125
150
|
}, [selectedFolder]);
|
|
126
151
|
const onBackgroundTreeViewContextMenu = useCallback((event) => {
|
|
127
152
|
if (event === undefined)
|
|
@@ -162,7 +187,6 @@ const TMFileManager = (props) => {
|
|
|
162
187
|
setIsDragging(true);
|
|
163
188
|
};
|
|
164
189
|
const handleDragLeave = (e) => {
|
|
165
|
-
e.preventDefault();
|
|
166
190
|
setIsDragging(false);
|
|
167
191
|
};
|
|
168
192
|
return _jsx(TMPanel, { title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, showHeader: showPanel, onBack: (isMobile && openDraftList) ? onBackCallback : undefined, onClose: onClosePanel, allowMaximize: !isMobile ? allowMaximize : false, onMaximize: !isMobile ? onMaximizePanel : undefined, onHeaderDoubleClick: !isMobile ? onMaximizePanel : undefined, toolbar: toolbar, children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsxs(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, children: _jsx(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "50%", isLeftPanelCollapsed ? '100%' : "50%"], children: children }, "TMWGs-panels-treeView") }), children: [_jsxs("div", { style: {
|