@topconsultnpm/sdkui-react-beta 6.12.81 → 6.12.83
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/base/TMFileManager.js +14 -4
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/grids/TMBlogsUtils.d.ts +2 -2
- package/lib/components/grids/TMBlogsUtils.js +2 -1
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/package.json +1 -1
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
3
3
|
import Toolbar, { Item as ToolbarItem } from 'devextreme-react/cjs/toolbar';
|
4
4
|
import TreeView from 'devextreme-react/cjs/tree-view';
|
5
5
|
import ScrollView from 'devextreme-react/cjs/scroll-view';
|
6
6
|
import { ContextMenu, Pagination } from 'devextreme-react';
|
7
|
-
import { IconFolder, SDKUI_Localizator, IconHide, IconShow, IconDashboard, IconList, getFileIcon, formatBytes, SDKUI_Globals } from '../../helper';
|
7
|
+
import { IconFolder, SDKUI_Localizator, IconHide, IconShow, IconDashboard, IconList, getFileIcon, formatBytes, SDKUI_Globals, Globalization } from '../../helper';
|
8
8
|
import { TMSearchBar } from '../sidebar/TMHeader';
|
9
9
|
import TMButton from './TMButton';
|
10
10
|
import TMDataGrid from './TMDataGrid';
|
@@ -12,6 +12,7 @@ import { TMSplitterLayout } from './TMLayout';
|
|
12
12
|
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
13
13
|
import TMToolbarCard from './TMToolbarCard';
|
14
14
|
import TMFileManagerThumbnailItems from './TMFileManagerThumbnailItems';
|
15
|
+
import TMTooltip from './TMTooltip';
|
15
16
|
export var TMFileManagerPageSize;
|
16
17
|
(function (TMFileManagerPageSize) {
|
17
18
|
TMFileManagerPageSize[TMFileManagerPageSize["Small"] = 30] = "Small";
|
@@ -205,7 +206,7 @@ const TMFileManager = (props) => {
|
|
205
206
|
display: "flex",
|
206
207
|
flexGrow: 1,
|
207
208
|
height: "calc(100% - 40px)"
|
208
|
-
}, children: _jsxs(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "50%", isLeftPanelCollapsed ? '100%' : "50%"], children: [_jsxs("div", { style: { height: "100%", width: "100%" }, onContextMenu: onTreeViewContextMenu, children: [_jsx(TreeView, { style: { marginTop: "10px" }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuDesktop', dataSource: menuItems.folder, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%" }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [_jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onContextMenu: onViewContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, contextMenuItems: menuItems.file, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewMode === 'details' && _jsx(DetailsView, { items: filteredFileItems, contextMenuItems: menuItems.file, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileContextMenuDesktop', dataSource: menuItems.file, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }, "TMWGs-panels-treeView") })] }), isMobile && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsxs(TMToolbarCard, { onBack: openDraftList ? onBackCallback : undefined, title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, children: [_jsxs("div", { style: { display: openDraftList ? 'none' : 'block', transition: 'opacity 0.3s ease-in-out' }, children: [_jsx(TreeView, { style: { marginTop: "10px", }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuMobile', dataSource: menuItems.folder, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%", display: openDraftList ? 'block' : 'none', transition: 'opacity 0.3s ease-in-out' }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [_jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onContextMenu: onViewContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, contextMenuItems: contextMenuItems?.file, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewMode === 'details' && _jsx(DetailsView, { items: filteredFileItems, contextMenuItems: contextMenuItems?.file, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: menuItems.file, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }) })] });
|
209
|
+
}, children: _jsxs(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "50%", isLeftPanelCollapsed ? '100%' : "50%"], children: [_jsxs("div", { style: { height: "100%", width: "100%" }, onContextMenu: onTreeViewContextMenu, children: [_jsx(TreeView, { style: { marginTop: "10px" }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuDesktop', dataSource: menuItems.folder, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%" }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [_jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onContextMenu: onViewContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, contextMenuItems: menuItems.file, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewMode === 'details' && _jsx(DetailsView, { userID: userID, items: filteredFileItems, contextMenuItems: menuItems.file, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileContextMenuDesktop', dataSource: menuItems.file, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }, "TMWGs-panels-treeView") })] }), isMobile && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsxs(TMToolbarCard, { onBack: openDraftList ? onBackCallback : undefined, title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, children: [_jsxs("div", { style: { display: openDraftList ? 'none' : 'block', transition: 'opacity 0.3s ease-in-out' }, children: [_jsx(TreeView, { style: { marginTop: "10px", }, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuMobile', dataSource: menuItems.folder, target: treeViewAnchor, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: { backgroundColor: "#fff", width: "100%", height: "100%", display: openDraftList ? 'block' : 'none', transition: 'opacity 0.3s ease-in-out' }, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [_jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.PreviewView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '160px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onContextMenu: onViewContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, contextMenuItems: contextMenuItems?.file, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewMode === 'details' && _jsx(DetailsView, { items: filteredFileItems, contextMenuItems: contextMenuItems?.file, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: menuItems.file, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }) })] });
|
209
210
|
};
|
210
211
|
export default TMFileManager;
|
211
212
|
const highlightText = (text, searchText, isSelected) => {
|
@@ -215,7 +216,7 @@ const highlightText = (text, searchText, isSelected) => {
|
|
215
216
|
return text.split(regex).map((part, index) => regex.test(part) ? (_jsx("span", { style: { backgroundColor: isSelected ? '#6c9023' : 'yellow' }, children: part }, index)) : (part));
|
216
217
|
};
|
217
218
|
const DetailsView = (props) => {
|
218
|
-
const { items, contextMenuItems, focusedFile, selectedFiles, searchText = '', handleFocusedFile, handleSelectedFiles, onDoubleClickHandler } = props;
|
219
|
+
const { userID, items, contextMenuItems, focusedFile, selectedFiles, searchText = '', handleFocusedFile, handleSelectedFiles, onDoubleClickHandler } = props;
|
219
220
|
const cellDefaultRender = useCallback((cellData) => {
|
220
221
|
return _jsx("div", { children: highlightText(cellData.value, searchText, false) });
|
221
222
|
}, [searchText]);
|
@@ -223,6 +224,14 @@ const DetailsView = (props) => {
|
|
223
224
|
const data = cellData.data;
|
224
225
|
return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: getFileIcon(data.ext, data.version) });
|
225
226
|
};
|
227
|
+
const cellEditOrLockRender = (cellData) => {
|
228
|
+
const { checkoutDate, checkOutUserID, checkOutUserName, version, ext, creationTime, lastUpdateTime } = cellData.data;
|
229
|
+
const checkoutUsedId = checkOutUserID;
|
230
|
+
const editMode = checkoutDate && checkoutUsedId && userID && userID === checkoutUsedId;
|
231
|
+
const lockMode = checkoutDate && checkoutUsedId && userID && userID !== checkoutUsedId;
|
232
|
+
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", checkOutUserName ?? '-', " (ID: ", checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Type }), ": ", ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(lastUpdateTime?.toString())] })] })] })] });
|
233
|
+
return _jsxs(_Fragment, { children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }) })] });
|
234
|
+
};
|
226
235
|
const cellDatetimeRender = useCallback((cellData) => {
|
227
236
|
const { value } = cellData;
|
228
237
|
const formattedDate = value ? new Date(value).toLocaleString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' }) : '';
|
@@ -232,6 +241,7 @@ const DetailsView = (props) => {
|
|
232
241
|
return [
|
233
242
|
{ dataField: "id", caption: "ID", dataType: 'string', visible: false },
|
234
243
|
{ dataField: "ext", caption: SDKUI_Localizator.Extension, cellRender: cellExtRender },
|
244
|
+
{ dataField: "isDirectory", caption: SDKUI_Localizator.Status, cellRender: cellEditOrLockRender },
|
235
245
|
{ dataField: "name", caption: SDKUI_Localizator.Name, cellRender: cellDefaultRender },
|
236
246
|
{ dataField: "version", caption: SDKUI_Localizator.Version },
|
237
247
|
{ dataField: "size", caption: SDKUI_Localizator.Size, cellRender: (cellData) => formatBytes(cellData.data.size ?? 0) },
|
@@ -81,7 +81,7 @@ const TMSearch = ({ inputTID, inputSqdID, onRefreshAfterAddDcmtToFavs, onTaskCre
|
|
81
81
|
}
|
82
82
|
let sqdCache = await SavedQueryCacheService.GetAllAsync() ?? [];
|
83
83
|
setAllSQDs(sqdCache);
|
84
|
-
let sqds = await getSQDsByTIDAsync(curTID ?? currentTID,
|
84
|
+
let sqds = await getSQDsByTIDAsync(curTID ?? currentTID, sqdCache) ?? [];
|
85
85
|
setFilteredByTIDSQDs(sqds);
|
86
86
|
setCurrentSQDMode(0);
|
87
87
|
};
|
@@ -179,7 +179,7 @@ const TMSearch = ({ inputTID, inputSqdID, onRefreshAfterAddDcmtToFavs, onTaskCre
|
|
179
179
|
}, onSqdSaved: async (newSqd) => {
|
180
180
|
await loadDataSQDsAsync(true, newSqd.masterTID);
|
181
181
|
await setSQDAsync(newSqd);
|
182
|
-
} })] }) }), _jsx(TMLayoutItem, { children: _jsx(TMToolbarCard, { title: SDK_Localizator.SavedQueries, onClose: () => setShowSavedQueryPanel(false), children: _jsxs(TabPanel, { width: "100%", height: "100%", showNavButtons: true, repaintChangesOnly: true, selectedIndex: currentSQDMode, onSelectedIndexChange: (index) => setCurrentSQDMode(index), children: [(currentTID || currentSQD) ? _jsx(Item, { title: fromDTD?.nameLoc, children: _jsx(TMSavedQuerySelector, { allowShowSearch: false, items: filteredByTIDSQDs, selectedId: currentSQD?.id, onRefreshData: () => loadDataSQDsAsync(true), onItemClick: (sqd) => onSQDItemClick(sqd, setSQDAsync), onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync) }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.Alls2, children: _jsx(TMSavedQuerySelector, { allowShowSearch: true, items: allSQDs, manageDefault: false,
|
182
|
+
} })] }) }), _jsx(TMLayoutItem, { children: _jsx(TMToolbarCard, { title: SDK_Localizator.SavedQueries, onClose: () => setShowSavedQueryPanel(false), children: _jsxs(TabPanel, { width: "100%", height: "100%", showNavButtons: true, repaintChangesOnly: true, selectedIndex: currentSQDMode, onSelectedIndexChange: (index) => setCurrentSQDMode(index), children: [(currentTID || currentSQD) ? _jsx(Item, { title: fromDTD?.nameLoc, children: _jsx(TMSavedQuerySelector, { allowShowSearch: false, items: filteredByTIDSQDs, selectedId: currentSQD?.id, onRefreshData: () => { loadDataSQDsAsync(true); }, onItemClick: (sqd) => onSQDItemClick(sqd, setSQDAsync), onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync) }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.Alls2, children: _jsx(TMSavedQuerySelector, { allowShowSearch: true, items: allSQDs, manageDefault: false,
|
183
183
|
// selectedId={currentSQD?.id}
|
184
184
|
onItemClick: (sqd) => onSQDItemClick(sqd, setSQDAsync), onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? undefined : currentSQD, setSQDAsync) }) })] }) }) })] })] }) }, 'div-1'), _jsx("div", { style: { position: (currentSearchView === TMSearchViews.Result) ? 'relative' : 'absolute', left: (currentSearchView === TMSearchViews.Result) ? '0px' : '-9999px', top: (currentSearchView === TMSearchViews.Result) ? '0px' : '-9999px', visibility: (currentSearchView === TMSearchViews.Result) ? 'visible' : 'hidden', display: "flex", flexDirection: "column", height: "100%", width: '100%' }, children: searchResult.length > 0 &&
|
185
185
|
_jsx(TMSearchResult, { context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync: async () => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { BlogPost, BlogPostAttachment, DcmtTypeDescriptor, HomeBlogPost } from "@topconsultnpm/sdk-ts-beta";
|
3
3
|
import { FileItem } from '../base/TMFileManager';
|
4
|
-
import { DcmtInfo } from '../../ts';
|
4
|
+
import { DcmtInfo, DownloadTypes } from '../../ts';
|
5
5
|
export declare const DRAFT_TYPE_TID = 6;
|
6
6
|
export declare const colors: {
|
7
7
|
DARK_BLUE: string;
|
@@ -72,7 +72,7 @@ export declare const AttachmentElement: (attachment: BlogPostAttachment, treeFs:
|
|
72
72
|
did: number;
|
73
73
|
fileExt: string;
|
74
74
|
fileSize: string;
|
75
|
-
}> | undefined, dcmtTypeDescriptors: Map<number, DcmtTypeDescriptor>, isSelected: boolean, searchText: string, color: string, handleClickAttachmentFolderFileCallback: ((folderId: number, draftId: number) => void) | undefined, downloadDcmtsAsync: (inputDcmts: Array<DcmtInfo> | undefined) => Promise<void>) => import("react/jsx-runtime").JSX.Element;
|
75
|
+
}> | undefined, dcmtTypeDescriptors: Map<number, DcmtTypeDescriptor>, isSelected: boolean, searchText: string, color: string, handleClickAttachmentFolderFileCallback: ((folderId: number, draftId: number) => void) | undefined, downloadDcmtsAsync: (inputDcmts: Array<DcmtInfo> | undefined, downloadType: DownloadTypes) => Promise<void>) => import("react/jsx-runtime").JSX.Element;
|
76
76
|
export declare const OwnerInitialsBadge: (blogPost: BlogPost | HomeBlogPost) => import("react/jsx-runtime").JSX.Element;
|
77
77
|
export declare const IconAndHeaderElement: (blogPost: BlogPost | HomeBlogPost, iconColor: string, isSelected: boolean, headerClickCallback: () => void, searchText: string) => import("react/jsx-runtime").JSX.Element;
|
78
78
|
export declare const findFileItemByDraftID: (tree: FileItem | undefined, draftID: number | undefined) => FileItem | null;
|
@@ -3,6 +3,7 @@ import styled from "styled-components";
|
|
3
3
|
import { SDK_Globals } from "@topconsultnpm/sdk-ts-beta";
|
4
4
|
import { formatBytes, getFileIcon, IconAttachment, IconUserGroup, IconWorkspace, SDKUI_Localizator } from "../../helper";
|
5
5
|
import TMTooltip from "../base/TMTooltip";
|
6
|
+
import { DownloadTypes } from '../../ts';
|
6
7
|
export const DRAFT_TYPE_TID = 6;
|
7
8
|
export const colors = {
|
8
9
|
DARK_BLUE: "#1a0dab",
|
@@ -146,7 +147,7 @@ export const AttachmentElement = (attachment, treeFs, draftLatestInfoMap, archiv
|
|
146
147
|
const archiveID = SDK_Globals.tmSession?.SessionDescr?.archiveID;
|
147
148
|
const fileName = `${removeFileExtension(name)}_${archiveID}_${attachment.tid}_${attachment.did}.${fileExt}`;
|
148
149
|
if (downloadDcmtsAsync)
|
149
|
-
downloadDcmtsAsync([{ TID: attachment.tid, DID: attachment.did, fileName }]);
|
150
|
+
downloadDcmtsAsync([{ TID: attachment.tid, DID: attachment.did, fileName }], DownloadTypes.Dcmt);
|
150
151
|
};
|
151
152
|
return _jsx("div", { onClick: onClickCallback, onDoubleClick: onDoubleClick, style: {
|
152
153
|
display: 'inline-flex',
|
@@ -353,6 +353,7 @@ export declare class SDKUI_Localizator {
|
|
353
353
|
static get StandardMode(): "Standardmodus" | "Standard mode" | "Modo estándar" | "Mode standard" | "Modo padrão" | "Modalità standard";
|
354
354
|
static get Start(): "Zum Booten" | "Start" | "Arrancar" | "Pour démarrer" | "Para inicializar" | "Avviare";
|
355
355
|
static get Statistics(): "Statistiken" | "Statistics" | "Estadística" | "Statistiques" | "Estatísticas" | "Statistiche";
|
356
|
+
static get Status(): "Status" | "Estado" | "Statut" | "Stato";
|
356
357
|
static get Summary(): "Zusammenfassung" | "Summary" | "Resumen" | "Résumé" | "Resumo" | "Riepilogo";
|
357
358
|
static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
|
358
359
|
static get Template(): "Modell des Autos" | "Template" | "Modelo" | "Modèle" | "Modello";
|
@@ -3488,6 +3488,16 @@ export class SDKUI_Localizator {
|
|
3488
3488
|
default: return "Statistiche";
|
3489
3489
|
}
|
3490
3490
|
}
|
3491
|
+
static get Status() {
|
3492
|
+
switch (this._cultureID) {
|
3493
|
+
case CultureIDs.De_DE: return "Status";
|
3494
|
+
case CultureIDs.En_US: return "Status";
|
3495
|
+
case CultureIDs.Es_ES: return "Estado";
|
3496
|
+
case CultureIDs.Fr_FR: return "Statut";
|
3497
|
+
case CultureIDs.Pt_PT: return "Estado";
|
3498
|
+
default: return "Stato";
|
3499
|
+
}
|
3500
|
+
}
|
3491
3501
|
static get Summary() {
|
3492
3502
|
switch (this._cultureID) {
|
3493
3503
|
case CultureIDs.De_DE: return "Zusammenfassung";
|