@topconsultnpm/sdkui-react-beta 6.13.60 → 6.13.62
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/assets/icomoon.svg +96 -96
- package/lib/assets/italy.svg +16 -16
- package/lib/assets/topmedia-six.svg +65 -65
- package/lib/assets/topmeida-six-bianco.svg +65 -65
- package/lib/components/base/TMFileManager.js +1 -2
- package/lib/components/features/documents/TMMasterDetailDcmts.js +61 -107
- package/lib/components/features/search/TMSearchResult.d.ts +1 -4
- package/lib/components/features/search/TMSearchResult.js +28 -22
- package/lib/ts/types.d.ts +2 -1
- package/lib/ts/types.js +1 -0
- package/package.json +2 -2
@@ -10,7 +10,6 @@ import TMButton from './TMButton';
|
|
10
10
|
import TMDataGrid from './TMDataGrid';
|
11
11
|
import { TMSplitterLayout } from './TMLayout';
|
12
12
|
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
13
|
-
import TMToolbarCard from './TMToolbarCard';
|
14
13
|
import TMFileManagerThumbnailItems from './TMFileManagerThumbnailItems';
|
15
14
|
import TMTooltip from './TMTooltip';
|
16
15
|
import TMPanel from './TMPanel';
|
@@ -216,7 +215,7 @@ const TMFileManager = (props) => {
|
|
216
215
|
onClick: () => setIsLeftPanelCollapsed(prev => !prev),
|
217
216
|
text: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel,
|
218
217
|
},
|
219
|
-
], target: '#TMPanel-Draft-Commands-Header' })] }), children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, 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, onItemContextMenu: handleTreeViewContextMenu }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuDesktop', dataSource: folderContextMenuItems, 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: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _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: onContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, focusedFile: focusedFile, selectedFiles: selectedFiles, searchText: searchText, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, setViewAnchor: setViewAnchor }), viewMode === 'details' && _jsx(DetailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, fileContextMenuItems: fileContextMenuItems }), viewAnchor && _jsx(ContextMenu, { id: 'fileContextMenuDesktop', dataSource: fileContextMenuItems, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }, "TMWGs-panels-treeView") }) }) }), isMobile && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsxs(
|
218
|
+
], target: '#TMPanel-Draft-Commands-Header' })] }), children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, 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, onItemContextMenu: handleTreeViewContextMenu }), treeViewAnchor && _jsx(ContextMenu, { id: 'treeViewContextMenuDesktop', dataSource: folderContextMenuItems, 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: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _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: onContextMenu, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, focusedFile: focusedFile, selectedFiles: selectedFiles, searchText: searchText, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, setViewAnchor: setViewAnchor }), viewMode === 'details' && _jsx(DetailsView, { userID: userID, items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, fileContextMenuItems: fileContextMenuItems }), viewAnchor && _jsx(ContextMenu, { id: 'fileContextMenuDesktop', dataSource: fileContextMenuItems, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }, "TMWGs-panels-treeView") }) }) }), isMobile && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsxs(TMPanel, { 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: folderContextMenuItems, 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, style: { width: "100%", height: "calc(100% - 40px)", border: isDragging ? '2px solid red' : '2px solid transparent' }, children: [viewMode === 'thumbnails' && _jsx(ThumbnailsView, { userID: userID, items: filteredFileItems, focusedFile: focusedFile, selectedFiles: selectedFiles, searchText: searchText, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler, setViewAnchor: setViewAnchor }), viewMode === 'details' && _jsx(DetailsView, { items: filteredFileItems, selectedFiles: selectedFiles, searchText: searchText, focusedFile: focusedFile, handleSelectedFiles: handleSelectedFiles, handleFocusedFile: handleFocusedFile, onDoubleClickHandler: onDoubleClickHandler }), viewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: fileContextMenuItems, target: viewAnchor, onHiding: closeViewContextMenu })] })] })] }) })] });
|
220
219
|
};
|
221
220
|
export default TMFileManager;
|
222
221
|
const highlightText = (text, searchText, isSelected) => {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useCallback, useEffect, useMemo,
|
3
|
-
import { DataColumnTypes, DcmtTypeListCacheService, MetadataDataDomains, MetadataFormats, RelationCacheService, RelationTypes, ResultTypes, SDK_Globals, SystemMIDs } from '@topconsultnpm/sdk-ts-beta';
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
3
|
+
import { DataColumnTypes, DcmtTypeListCacheService, MetadataDataDomains, MetadataFormats, RelationCacheService, RelationTypes, ResultTypes, SDK_Globals, SDK_Localizator, SystemMIDs } from '@topconsultnpm/sdk-ts-beta';
|
4
4
|
import { ContextMenu } from 'devextreme-react';
|
5
5
|
import { TMNothingToShow } from './TMDcmtPreview';
|
6
6
|
import TMDcmtForm from './TMDcmtForm';
|
7
7
|
import TMSearchResult from '../search/TMSearchResult';
|
8
|
-
import { genUniqueId, getExceptionMessage, IconFolder, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, svgToString, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMultipleSelection, IconMenuVertical, IconSearchCheck, IconDataList
|
8
|
+
import { genUniqueId, getExceptionMessage, IconFolder, IconShow, IconBoard, IconDcmtTypeSys, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, svgToString, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMultipleSelection, IconMenuVertical, IconSearchCheck, IconDataList } from '../../../helper';
|
9
9
|
import { hasDetailRelations } from '../../../helper/dcmtsHelper';
|
10
10
|
import { FormModes, SearchResultContext } from '../../../ts';
|
11
11
|
import { TMColors } from '../../../utils/theme';
|
@@ -22,20 +22,14 @@ import TMDataListItemViewer from '../../viewers/TMDataListItemViewer';
|
|
22
22
|
import { TMDcmtTypeTooltip } from '../../viewers/TMTidViewer';
|
23
23
|
import TMTreeView from '../../base/TMTreeView';
|
24
24
|
import TMDcmtIcon from './TMDcmtIcon';
|
25
|
-
import {
|
26
|
-
import
|
27
|
-
import { TMPanelToolbar } from '../../layout/panel/TMPanelToolbar';
|
28
|
-
import TMPanel from '../../base/TMPanel';
|
25
|
+
import { TMPanelManagerProvider } from '../../layout/panelManager/TMPanelManagerContext';
|
26
|
+
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
29
27
|
let abortController = new AbortController();
|
30
28
|
const TMMasterDetailDcmts = ({ deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, appendMasterDcmts, onTaskCreateRequest }) => {
|
31
29
|
const [id, setID] = useState('');
|
32
30
|
const [data, setData] = useState([]);
|
33
31
|
const [focusedItem, setFocusedItem] = useState();
|
34
32
|
const [selectedItems, setSelectedItems] = useState([]);
|
35
|
-
const [showPreview, setShowPreview] = useState(false);
|
36
|
-
const [showBoard, setShowBoard] = useState(false);
|
37
|
-
const [showSysMetadata, setShowSysMetadata] = useState(false);
|
38
|
-
const [showDcmtForm, setShowDcmtForm] = useState(true);
|
39
33
|
const [showZeroDcmts, setShowZeroDcmts] = useState(false);
|
40
34
|
const [isLoading, setIsLoading] = useState(false);
|
41
35
|
const [allowMultipleSelection, setAllowMultipleSelection] = useState(false);
|
@@ -406,55 +400,72 @@ const TMMasterDetailDcmts = ({ deviceType, inputDcmts, isForMaster, showCurrentD
|
|
406
400
|
const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(IconMenuVertical, { id: `commands-detail-${id}`, color: 'white', cursor: 'pointer' }), _jsx(ContextMenu, { showEvent: 'click', dataSource: commandsMenuItems, target: `#commands-detail-${id}` })] });
|
407
401
|
const getTitle = () => isForMaster ? `${SDKUI_Localizator.DcmtsMaster} - ${dtdMaster?.nameLoc}` : SDKUI_Localizator.DcmtsDetail;
|
408
402
|
const isMobile = deviceType === DeviceType.MOBILE;
|
409
|
-
const
|
403
|
+
const tmTreeView = useMemo(() => _jsx(_Fragment, { children: isLoading ? _jsx(_Fragment, {}) :
|
410
404
|
data.length <= 0
|
411
405
|
?
|
412
406
|
_jsx(TMNothingToShow, { text: getTitle(), secondText: SDKUI_Localizator.NoDataToDisplay, icon: isForMaster ? _jsx(IconDetailDcmts, { fontSize: 96, transform: 'scale(-1, 1)' }) : _jsx(IconDetailDcmts, { fontSize: 96 }) })
|
413
407
|
:
|
414
|
-
_jsx(TMTreeView, { dataSource: data, allowMultipleSelection: allowMultipleSelection, calculateItemsForNode: calculateItemsForNode, itemRender: renderItem, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectionChanged: handleSelectedItemsChanged, onDataChanged: (items) => setData(updateHiddenProperty(items)) }) });
|
415
|
-
const
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
408
|
+
_jsx(TMTreeView, { dataSource: data, allowMultipleSelection: allowMultipleSelection, calculateItemsForNode: calculateItemsForNode, itemRender: renderItem, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectionChanged: handleSelectedItemsChanged, onDataChanged: (items) => setData(updateHiddenProperty(items)) }) }), [data, isLoading, focusedItem, selectedItems, allowMultipleSelection, isForMaster]);
|
409
|
+
const tmFormOrResult = useMemo(() => _jsx(_Fragment, { children: focusedItem?.isDcmt ?
|
410
|
+
_jsx(TMDcmtForm, { TID: focusedItem?.tid, DID: focusedItem.did, isClosable: deviceType !== DeviceType.MOBILE, allowNavigation: false, allowRelations: deviceType !== DeviceType.MOBILE, showDcmtFormSidebar: deviceType === DeviceType.MOBILE }) :
|
411
|
+
_jsx(TMSearchResult, { groupId: 'tmFormOrResult', context: SearchResultContext.MASTER_DETAIL, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false,
|
412
|
+
// onClose={() => { setShowDcmtForm(false); }}
|
413
|
+
onClosePreviewPanel: () => { }, onTaskCreateRequest: onTaskCreateRequest }) }), [focusedItem, deviceType]);
|
414
|
+
const allInitialPanelVisibility = {
|
415
|
+
'tmTreeView': true,
|
416
|
+
'tmFormOrResult': true,
|
417
|
+
'tmSearchResult': true,
|
418
|
+
'tmBlog': false,
|
419
|
+
'tmSysMetadata': false,
|
420
|
+
'tmDcmtPreview': false,
|
421
|
+
};
|
422
|
+
const initialPanelDimensions = {
|
423
|
+
'tmTreeView': { width: '50%', height: '100%' },
|
424
|
+
'tmFormOrResult': { width: '50%', height: '100%' },
|
425
|
+
'tmSearchResult': { width: '25%', height: '100%' },
|
426
|
+
'tmBlog': { width: '25%', height: '100%' },
|
427
|
+
'tmSysMetadata': { width: '25%', height: '100%' },
|
428
|
+
'tmDcmtPreview': { width: '25%', height: '100%' },
|
429
|
+
};
|
430
|
+
const initialPanels = useMemo(() => [
|
428
431
|
{
|
429
|
-
id: '
|
430
|
-
name:
|
431
|
-
|
432
|
-
|
433
|
-
width: '50%',
|
434
|
-
height: '100%',
|
435
|
-
},
|
436
|
-
toolbarOptions: {
|
437
|
-
icon: _jsx(IconDataList, { fontSize: 24 }),
|
438
|
-
visible: true,
|
439
|
-
isActive: true
|
440
|
-
}
|
432
|
+
id: 'tmTreeView',
|
433
|
+
name: SDK_Localizator.Relations,
|
434
|
+
contentOptions: { component: tmTreeView, panelContainer: { title: getTitle(), toolbar: toolbar, allowMaximize: !isMobile } },
|
435
|
+
toolbarOptions: { icon: _jsx(IconDataList, { fontSize: 24 }), visible: true, orderNumber: 1, isActive: allInitialPanelVisibility['tmTreeView'] }
|
441
436
|
},
|
442
437
|
{
|
443
|
-
id: '
|
444
|
-
name: focusedItem?.isDcmt ?
|
445
|
-
children: [],
|
438
|
+
id: 'tmFormOrResult',
|
439
|
+
name: focusedItem?.isDcmt ? SDK_Localizator.Metadatas : SDKUI_Localizator.SearchResult,
|
446
440
|
contentOptions: {
|
447
|
-
|
448
|
-
height: '100%',
|
441
|
+
component: tmFormOrResult
|
449
442
|
},
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
443
|
+
children: [
|
444
|
+
{
|
445
|
+
id: 'tmSearchResult',
|
446
|
+
name: 'tmSearchResult',
|
447
|
+
toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: true, orderNumber: 3, isActive: allInitialPanelVisibility['tmSearchResult'] }
|
448
|
+
},
|
449
|
+
{
|
450
|
+
id: 'tmBlog',
|
451
|
+
name: SDKUI_Localizator.BlogCase,
|
452
|
+
toolbarOptions: { icon: _jsx(IconBoard, { fontSize: 24 }), visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['tmBlog'] }
|
453
|
+
},
|
454
|
+
{
|
455
|
+
id: 'tmSysMetadata',
|
456
|
+
name: SDKUI_Localizator.MetadataSystem,
|
457
|
+
toolbarOptions: { icon: _jsx(IconDcmtTypeSys, { fontSize: 24 }), visible: true, orderNumber: 5, isActive: allInitialPanelVisibility['tmSysMetadata'] }
|
458
|
+
},
|
459
|
+
{
|
460
|
+
id: 'tmDcmtPreview',
|
461
|
+
name: SDKUI_Localizator.PreviewDocument,
|
462
|
+
toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), visible: true, orderNumber: 6, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
|
463
|
+
}
|
464
|
+
],
|
465
|
+
toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: true, orderNumber: 2, isActive: allInitialPanelVisibility['tmFormOrResult'] }
|
455
466
|
}
|
456
|
-
];
|
457
|
-
return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: _jsx(
|
467
|
+
], [tmTreeView, tmFormOrResult, focusedItem]);
|
468
|
+
return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }) }));
|
458
469
|
};
|
459
470
|
export default TMMasterDetailDcmts;
|
460
471
|
function getMetadataKeys(obj) {
|
@@ -534,60 +545,3 @@ const getDisplayValueByColumn = (col, value) => {
|
|
534
545
|
export function IconBackhandIndexPointingRight(props) {
|
535
546
|
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 128 128", width: "1em", height: "1em", ...props, children: [_jsx("path", { fill: "#E0BB95", d: "M58.7 41.1c10.8.1 53.3.4 54.9.4c12.8.3 12.7 16.7.7 16.9c-1.5 0-25 1.1-32.2 1.3c5.2 2 7.5 11.9-3.1 14.9c5 2.6 6.4 12.9-4.2 14.7c3.8 2.5 4.3 10.9-6 14.2c-8.4 2.7-28.2 2-40.3-2.3c-9.1-3.3-8.4-5.8-16.7-5.6c-1.4 0-2.1-1.1-2.4-2.4c-1.3-5.9-1.9-26.3-.3-33.8c.4-1.6 1.7-1.8 2.2-1.9c2.1-.4 4.2-2.5 5-4.3c3.2-6.4 12.8-12.8 23.4-18.2c5.5-2.8 9.2-8.8 10.4-18.3c.8-6.3 8.6-7.7 11.8-2.5c2.2 3.6 2.9 7 2.9 10.4c.2 6.2-1.6 10.1-6.1 16.5" }), _jsx("defs", { children: _jsx("path", { id: "notoBackhandIndexPointingRightMediumLightSkinTone0", d: "M58.7 41.1c10.8.1 53.3.4 54.9.4c12.8.3 12.7 16.7.7 16.9c-1.5 0-25 1.1-32.2 1.3c5.2 2 7.5 11.9-3.1 14.9c5 2.6 6.4 12.9-4.2 14.7c3.8 2.5 4.3 10.9-6 14.2c-8.4 2.7-28.2 2-40.3-2.3c-9.1-3.3-8.4-5.8-16.7-5.6c-1.4 0-2.1-1.1-2.4-2.4c-1.3-5.9-1.9-26.3-.3-33.8c.4-1.6 1.7-1.8 2.2-1.9c2.1-.4 4.2-2.5 5-4.3c3.2-6.4 12.8-12.8 23.4-18.2c5.5-2.8 9.2-8.8 10.4-18.3c.8-6.3 8.6-7.7 11.8-2.5c2.2 3.6 2.9 7 2.9 10.4c.2 6.2-1.6 10.1-6.1 16.5" }) }), _jsx("clipPath", { id: "notoBackhandIndexPointingRightMediumLightSkinTone1", children: _jsx("use", { href: "#notoBackhandIndexPointingRightMediumLightSkinTone0" }) }), _jsx("g", { fill: "#D19661", clipPath: "url(#notoBackhandIndexPointingRightMediumLightSkinTone1)", children: _jsx("path", { d: "M73.3 59.5c.1 1.6 2.8 2.9 2.8 6.4c0 3.7-3 4.7-3.1 7.5c-.1 2.7 2 3.8 1.5 7.7c-.6 4.5-4.1 4-4.2 7.1c0 2.7 1.8 3.2 1.8 6.6c0 3.1-3 5.8-5.5 7s-1.2 3.4 0 3.4s11.9-1.3 14.5-8.2c3-8 11-29.6 8.8-36.9c-7.1-1-11.5-1.6-13.7-1.8c-.7-.1-2.9-.6-2.9 1.2M60.1 40.7c0 .9.1 1.5 1 1.5c1 0 43.6 2.1 51.6 2.3c9.2.2 8.7 7.6 5.9 10.1c-1.9 1.7.6 4 2.2 2.6s4.4-3.4 4.3-8.4s-4.4-8.6-8.4-8.9c-3.8-.3-56.6.8-56.6.8m-51.9 21c15.9 0 14.1-11.7 25.2-18.9c15.4-10.1 16.3-11.1 19.7-25.2c1.2-4.9 5.7-4.4 7.7-2.1s4.9-1.3 3.6-2.7s-7.8-7.7-14.8-1.1s-42 46.2-42 46.2z" }) }), _jsx("defs", { children: _jsx("use", { href: "#notoBackhandIndexPointingRightMediumLightSkinTone0", id: "notoBackhandIndexPointingRightMediumLightSkinTone2" }) }), _jsx("clipPath", { id: "notoBackhandIndexPointingRightMediumLightSkinTone3", children: _jsx("use", { href: "#notoBackhandIndexPointingRightMediumLightSkinTone2" }) }), _jsx("g", { fill: "#8D542E", clipPath: "url(#notoBackhandIndexPointingRightMediumLightSkinTone3)", children: _jsx("path", { d: "M58.7 41.1h-1.9c-.4 0-.8-.4-.2-1.3s5.8-8 5.8-15c0-3.2-.5-7.7-3.4-12.4c-.6-.9.2-1.4.9-1c.7.5 6.4 3.2 6.5 13.4s-7.7 16.3-7.7 16.3m65.1 8.8c-.5 0-1.1-.2-1.7 1c-.7 1.5-3.1 4.4-8.4 4.7s-38.1 2.5-38.9 2.5c-1.1 0-1.2 1.9.1 1.8c1.7-.1 7.2-.2 7.2-.2s30.9 1.8 36.9-.6c6.1-2.4 4.8-9.2 4.8-9.2M86.6 68.5c-.3-.1-.7-.1-1 .3c-1.5 2-4.6 3.5-10.6 3.3c-1.4 0-1.6 2.7.1 2.7c.7 0 4-.1 4-.1l6.6-.2zm-3.6 15c-.3-.1-.7-.1-1.1.4c-1.5 2-3.5 2.8-9.7 3c-1.5.1-1.4 2.6.2 2.6c1.1 0 2.4-.1 2.4-.1l7-.6zm-5.4 12.7c-.3-.1-.8-.2-1.2.4c-.8 1.1-2.9 3-7.5 4.4c-3.7 1.1-21.3 1.9-32.5-.7c-2.3-.5-9.9-3-13.6-5.3s-7.3-1.6-8.3-1.4s-6.3.7-6.3.7l2.5 3.7l27 8.6l38.5-.6z" }) })] }));
|
536
547
|
}
|
537
|
-
const TMMasterDetailPanelContent = ({ isMobile, panelTMTreeView, panelTMFormOrResult }) => {
|
538
|
-
const gutters = SDKUI_Globals.userSettings.themeSettings.gutters;
|
539
|
-
const { visibility, maximizedPanelId, getPanelDimensions, togglePanel, toggleMaximizePanel, setPanelDisabledById, setPanelVisibility, hasVisiblePanels } = useTMPanelContext();
|
540
|
-
const containerRef = useRef(null);
|
541
|
-
const { onMouseDown } = useResizablePanels(containerRef);
|
542
|
-
const { width: widthPanel1, height: heightPanel1 } = getPanelDimensions('TMTreeView');
|
543
|
-
const { width: widthPanel2, height: heightPanel2 } = getPanelDimensions('TMFormOrResult');
|
544
|
-
return (_jsxs("div", { style: { display: 'flex', height: '100%', width: '100%', flexDirection: isMobile ? 'column' : 'row', gap: gutters }, children: [_jsx("div", { style: {
|
545
|
-
display: 'flex',
|
546
|
-
flexGrow: 1,
|
547
|
-
width: `calc(100% - ${isMobile ? 0 : 70}px)`,
|
548
|
-
height: `calc(100% - ${isMobile ? 55 : 0}px)`,
|
549
|
-
flexDirection: 'row'
|
550
|
-
}, children: _jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsxs("div", { ref: containerRef, style: {
|
551
|
-
display: hasVisiblePanels() ? 'flex' : 'none',
|
552
|
-
width: '100%',
|
553
|
-
height: '100%',
|
554
|
-
}, children: [_jsx("div", { style: {
|
555
|
-
display: visibility.TMTreeView ? 'block' : 'none',
|
556
|
-
width: widthPanel1,
|
557
|
-
height: heightPanel1,
|
558
|
-
overflow: 'hidden',
|
559
|
-
}, children: panelTMTreeView() }), visibility.TMTreeView && visibility.TMFormOrResult && maximizedPanelId === null && (_jsx("div", { style: {
|
560
|
-
background: 'transparent',
|
561
|
-
cursor: 'col-resize',
|
562
|
-
width: `${gutters}px`,
|
563
|
-
height: '100%',
|
564
|
-
userSelect: 'none',
|
565
|
-
}, onMouseDown: (e) => onMouseDown(e, 'TMTreeView', 'TMFormOrResult', true) })), _jsx("div", { style: {
|
566
|
-
display: visibility.TMFormOrResult ? 'block' : 'none',
|
567
|
-
width: widthPanel2,
|
568
|
-
height: heightPanel2,
|
569
|
-
overflow: 'hidden',
|
570
|
-
}, children: panelTMFormOrResult() })] }), _jsxs("div", { style: {
|
571
|
-
display: hasVisiblePanels() ? 'none' : 'flex',
|
572
|
-
flexDirection: 'column',
|
573
|
-
width: '100%',
|
574
|
-
height: '100%',
|
575
|
-
justifyContent: 'center',
|
576
|
-
alignItems: 'center',
|
577
|
-
fontSize: '1.5rem',
|
578
|
-
fontWeight: 'bold',
|
579
|
-
color: '#888',
|
580
|
-
backgroundColor: '#fff',
|
581
|
-
borderRadius: '10px'
|
582
|
-
}, children: [_jsx(IconInfo, { style: { fontSize: 50 } }), _jsx("div", { children: SDKUI_Localizator.NoPanelSelected })] })] }) }), _jsx("div", { style: {
|
583
|
-
display: 'flex',
|
584
|
-
flexDirection: isMobile ? 'row' : 'column',
|
585
|
-
alignItems: 'center',
|
586
|
-
width: isMobile ? '100%' : '50px',
|
587
|
-
height: isMobile ? '50px' : 'max-content',
|
588
|
-
background: 'transparent linear-gradient(90deg, #CCE0F4 0%, #7EC1E7 14%, #39A6DB 28%, #1E9CD7 35%, #0075BE 78%, #005B97 99%) 0% 0% no-repeat padding-box',
|
589
|
-
borderRadius: isMobile ? '10px' : '10px 0px 0px 10px',
|
590
|
-
padding: '10px',
|
591
|
-
gap: '10px'
|
592
|
-
}, children: _jsx(TMPanelToolbar, {}) })] }));
|
593
|
-
};
|
@@ -10,13 +10,10 @@ interface ITMSearchResultProps {
|
|
10
10
|
isClosable?: boolean;
|
11
11
|
isVisible?: boolean;
|
12
12
|
openDcmtFormAsModal?: boolean;
|
13
|
-
showDcmtForm?: boolean;
|
14
|
-
showPreview?: boolean;
|
15
|
-
showBoard?: boolean;
|
16
|
-
showSysMetadata?: boolean;
|
17
13
|
showSearchResultSidebar?: boolean;
|
18
14
|
showSelector?: boolean;
|
19
15
|
showToolbarHeader?: boolean;
|
16
|
+
groupId?: string;
|
20
17
|
onClose?: () => void;
|
21
18
|
onUpdate?: () => Promise<void>;
|
22
19
|
onSelectedTIDChanged?: (TID: number) => void;
|
@@ -49,7 +49,12 @@ const orderByName = (array) => {
|
|
49
49
|
return 1;
|
50
50
|
} return 0; });
|
51
51
|
};
|
52
|
-
const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisible = true, allowRelations = true, openDcmtFormAsModal = false, searchResults = [], showSearchResultSidebar = true, showSelector = false,
|
52
|
+
const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisible = true, allowRelations = true, openDcmtFormAsModal = false, searchResults = [], showSearchResultSidebar = true, showSelector = false, groupId, onClosePreviewPanel,
|
53
|
+
// showDcmtForm = false,
|
54
|
+
// showBoard = false,
|
55
|
+
// showPreview = false,
|
56
|
+
// showSysMetadata = false,
|
57
|
+
title, isClosable = false, allowFloatingBar = true, showToolbarHeader = true, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync, onSelectedTIDChanged, onUpdate, onClose, onTaskCreateRequest }) => {
|
53
58
|
const [id, setID] = useState('');
|
54
59
|
const [showApprovePopup, setShowApprovePopup] = useState(false);
|
55
60
|
const [showRejectPopup, setShowRejectPopup] = useState(false);
|
@@ -116,7 +121,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
116
121
|
let mids = searchResults.length > 1 ? searchResults.find(res => res.fromTID == focusedItem?.TID)?.selectMIDs : searchResults[0]?.selectMIDs;
|
117
122
|
let metadataList = searchResultToMetadataValues(focusedItem?.TID, dtd, rows, mids, fromDTD?.metadata, LayoutModes.Update);
|
118
123
|
setCurrentMetadataValues(metadataList);
|
119
|
-
}, [focusedItem
|
124
|
+
}, [focusedItem]);
|
120
125
|
useEffect(() => {
|
121
126
|
setCurrentDcmt({
|
122
127
|
tid: currentMetadataValues.find(o => o.mid == SystemMIDsAsNumber.TID)?.value,
|
@@ -126,7 +131,6 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
126
131
|
fileExt: currentMetadataValues.find(o => o.mid == SystemMIDsAsNumber.FileExt)?.value
|
127
132
|
});
|
128
133
|
}, [currentMetadataValues]);
|
129
|
-
useEffect(() => { setIsOpenDcmtForm(showDcmtForm); }, [showDcmtForm]);
|
130
134
|
const openFormHandler = (layoutMode) => { setIsOpenDcmtForm(true); setDcmtFormLayoutMode(layoutMode); };
|
131
135
|
const openTaskFormHandler = (value) => {
|
132
136
|
if (selectedItems.length > 1)
|
@@ -156,6 +160,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
156
160
|
return title;
|
157
161
|
let titleHeader = 'Ricerca per metadati';
|
158
162
|
switch (context) {
|
163
|
+
case SearchResultContext.MASTER_DETAIL:
|
159
164
|
case SearchResultContext.METADATA_SEARCH:
|
160
165
|
titleHeader = `${searchResults?.length > 1 ? selectedSearchResult?.fromName : searchResults[0]?.fromName}`;
|
161
166
|
break;
|
@@ -333,8 +338,6 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
333
338
|
const handleRemoveItem = (tid, did) => {
|
334
339
|
setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
|
335
340
|
};
|
336
|
-
if (!searchResults || searchResults.length <= 0)
|
337
|
-
return _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%' }, children: [_jsx(IconBoard, { fontSize: 96 }), _jsx("div", { style: { fontSize: "15px", marginTop: "10px" }, children: SDKUI_Localizator.NoDcmtFound })] });
|
338
341
|
const isMobile = deviceType === DeviceType.MOBILE;
|
339
342
|
const tmSearchResult = useMemo(() => _jsxs(_Fragment, { children: [_jsxs(TMLayoutItem, { height: '100%', children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: SDKUI_Globals.userSettings.themeSettings.gutters, separatorActiveColor: 'transparent', separatorColor: 'transparent', min: ['0', '0'], showSeparator: showSelector && deviceType !== DeviceType.MOBILE, start: showSelector ? deviceType !== DeviceType.MOBILE ? ['25%', '75%'] : splitterSize : ['0%', '100%'], children: [showSelector ?
|
340
343
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, onSelectionChanged: onSearchResultSelectionChanged }) })
|
@@ -344,7 +347,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
344
347
|
, {
|
345
348
|
// allowMultipleSelection={allowMultipleSelection}
|
346
349
|
inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
|
347
|
-
_jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
350
|
+
_jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
348
351
|
setIsOpenBatchUpdate(false);
|
349
352
|
}, onSavedCallbackAsync: async () => {
|
350
353
|
setIsOpenBatchUpdate(false);
|
@@ -354,7 +357,6 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
354
357
|
_jsx(ToppyHelpCenter, { deviceType: deviceType,
|
355
358
|
// onClick={() => isMobile ? openConfigureMode?.() : undefined}
|
356
359
|
content: _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: _jsx(WorkFlowOperationButtons, { deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), approveDisable: disable, rejectDisable: disable, reassignDisable: disable, infoDisable: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length !== 1 }) }) })] }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {})] }), [
|
357
|
-
getTitleHeader,
|
358
360
|
searchResults,
|
359
361
|
selectedSearchResult,
|
360
362
|
lastUpdateSearchTime,
|
@@ -371,10 +373,9 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
371
373
|
isOpenMaster,
|
372
374
|
isOpenDcmtForm
|
373
375
|
]);
|
374
|
-
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID }), [focusedItem
|
375
|
-
const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: LayoutModes.Update, openChooserBySingleClick: true, TID: focusedItem?.TID, isReadOnly: true, deviceType: deviceType, metadataValues: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [] }), [focusedItem
|
376
|
+
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID }), [focusedItem]);
|
377
|
+
const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: LayoutModes.Update, openChooserBySingleClick: true, TID: focusedItem?.TID, isReadOnly: true, deviceType: deviceType, metadataValues: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [] }), [focusedItem, currentMetadataValues, deviceType]);
|
376
378
|
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }), [currentDcmt]);
|
377
|
-
// --- PANEL DEFINITIONS ---
|
378
379
|
const allInitialPanelVisibility = {
|
379
380
|
'tmSearchResult': true,
|
380
381
|
'tmBlog': false,
|
@@ -397,9 +398,9 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
397
398
|
title: getTitleHeader(),
|
398
399
|
allowMaximize: !isMobile,
|
399
400
|
onBack: (!isClosable && context === SearchResultContext.METADATA_SEARCH) || (isMobile && context !== SearchResultContext.METADATA_SEARCH && splitterSize[1] === '100%') ? onBack : undefined,
|
400
|
-
onClose: isClosable ? onBack : undefined
|
401
|
+
onClose: isClosable ? onBack : undefined,
|
402
|
+
toolbar: searchResutlToolbar
|
401
403
|
},
|
402
|
-
toolbar: searchResutlToolbar
|
403
404
|
},
|
404
405
|
toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: true, orderNumber: 1, isActive: allInitialPanelVisibility['tmSearchResult'] }
|
405
406
|
},
|
@@ -422,16 +423,21 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
422
423
|
toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
|
423
424
|
}
|
424
425
|
], [tmSearchResult, tmBlog, tmSysMetadata, tmDcmtPreview]);
|
425
|
-
return (
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
}
|
426
|
+
return ((!searchResults || searchResults.length <= 0)
|
427
|
+
? _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%' }, children: [_jsx(IconBoard, { fontSize: 96 }), _jsx("div", { style: { fontSize: "15px", marginTop: "10px" }, children: SDKUI_Localizator.NoDcmtFound })] })
|
428
|
+
: _jsxs(StyledMultiViewPanel, { "$isVisible": isVisible, children: [_jsx(StyledMultiViewPanel, { "$isVisible": !isOpenDcmtForm && !isOpenDetails && !isOpenMaster, style: {
|
429
|
+
display: 'flex',
|
430
|
+
flexDirection: isMobile ? 'column' : 'row',
|
431
|
+
justifyContent: 'space-between',
|
432
|
+
gap: SDKUI_Globals.userSettings.themeSettings.gutters,
|
433
|
+
width: '100%',
|
434
|
+
height: '100%',
|
435
|
+
}, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: (groupId && groupId.length > 0) ?
|
436
|
+
_jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
|
437
|
+
:
|
438
|
+
_jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmSearchResult', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar }) }) }) }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDetails, children: isOpenDetails && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenDetails(false) }) }), _jsxs(StyledMultiViewPanel, { "$isVisible": isOpenMaster, children: [isOpenMaster && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
439
|
+
return (_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem }) }, `${index}-${dcmt.DID}`));
|
440
|
+
})] }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDcmtForm, children: isOpenDcmtForm && _jsx(TMDcmtForm, { isModal: openDcmtFormAsModal, titleModal: fromDTD?.name ?? '', TID: focusedItem?.TID, DID: focusedItem?.DID, layoutMode: dcmtFormLayoutMode, showPreview: deviceType !== DeviceType.MOBILE, count: visibleItems.length, itemIndex: visibleItems.findIndex(o => o.rowIndex === focusedItem?.rowIndex) + 1, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onClose: () => { setIsOpenDcmtForm(false); }, onSavedAsyncCallback: async (tid, did) => { await refreshFocusedDataRowAsync(tid, did, true); } }) })] }));
|
435
441
|
};
|
436
442
|
export default TMSearchResult;
|
437
443
|
const renderDcmtIcon = (cellData) => _jsx(TMDcmtIcon, { fileExtension: cellData.data.FILEEXT, fileCount: cellData.data.FILECOUNT, isLexProt: cellData.data.IsLexProt, isMail: cellData.data.ISMAIL, isShared: cellData.data.ISSHARED, isSigned: cellData.data.ISSIGNED });
|
package/lib/ts/types.d.ts
CHANGED
@@ -45,7 +45,8 @@ export declare enum SearchResultContext {
|
|
45
45
|
METADATA_SEARCH = "metadataSearch",
|
46
46
|
WORKFLOW_APPROVE = "workflowApprove",
|
47
47
|
FAVORITES_AND_RECENTS = "favorites",
|
48
|
-
FREE_SEARCH = "freeSearch"
|
48
|
+
FREE_SEARCH = "freeSearch",
|
49
|
+
MASTER_DETAIL = "masterDetail"
|
49
50
|
}
|
50
51
|
export type TID_MID = {
|
51
52
|
tid: number | undefined;
|
package/lib/ts/types.js
CHANGED
@@ -50,6 +50,7 @@ export var SearchResultContext;
|
|
50
50
|
SearchResultContext["WORKFLOW_APPROVE"] = "workflowApprove";
|
51
51
|
SearchResultContext["FAVORITES_AND_RECENTS"] = "favorites";
|
52
52
|
SearchResultContext["FREE_SEARCH"] = "freeSearch";
|
53
|
+
SearchResultContext["MASTER_DETAIL"] = "masterDetail";
|
53
54
|
})(SearchResultContext || (SearchResultContext = {}));
|
54
55
|
export class MetadataValueDescriptorEx extends MetadataValueDescriptor {
|
55
56
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
3
|
-
"version": "6.13.
|
3
|
+
"version": "6.13.62",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"lib"
|
43
43
|
],
|
44
44
|
"dependencies": {
|
45
|
-
"@topconsultnpm/sdk-ts-beta": "6.13.8",
|
45
|
+
"@topconsultnpm/sdk-ts-beta": "^6.13.8",
|
46
46
|
"buffer": "^6.0.3",
|
47
47
|
"devextreme": "24.2.6",
|
48
48
|
"devextreme-react": "24.2.6",
|