@topconsultnpm/sdkui-react 6.21.0-dev2.8 → 6.21.0-t.2
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/TMAccordionNew.js +1 -0
- package/lib/components/base/TMAreaManager.js +19 -3
- package/lib/components/base/TMDataGrid.js +2 -2
- package/lib/components/base/TMModal.d.ts +1 -0
- package/lib/components/base/TMModal.js +2 -2
- package/lib/components/base/TMPanel.d.ts +7 -4
- package/lib/components/base/TMPanel.js +58 -26
- package/lib/components/base/TMTreeView.js +12 -2
- package/lib/components/base/TMWaitPanel.d.ts +3 -1
- package/lib/components/base/TMWaitPanel.js +14 -9
- package/lib/components/choosers/TMDistinctValues.js +35 -21
- package/lib/components/choosers/TMUserChooser.d.ts +4 -0
- package/lib/components/choosers/TMUserChooser.js +7 -5
- package/lib/components/editors/TMFormulaEditor.d.ts +2 -0
- package/lib/components/editors/TMFormulaEditor.js +75 -21
- package/lib/components/editors/TMMetadataValues.js +2 -1
- package/lib/components/editors/TMRadioButton.js +7 -5
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/features/archive/TMArchive.js +1 -1
- package/lib/components/features/documents/TMCopyToFolderForm.d.ts +24 -0
- package/lib/components/features/documents/TMCopyToFolderForm.js +401 -0
- package/lib/components/features/documents/TMDcmtForm.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtForm.js +107 -29
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +17 -2
- package/lib/components/features/documents/TMDcmtPreview.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtPreview.js +2 -2
- package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtTasks.js +2 -2
- package/lib/components/features/documents/TMDownloadRelationViewerSection.d.ts +23 -0
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +173 -0
- package/lib/components/features/documents/TMFileUploader.js +1 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +4 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +29 -9
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +26 -0
- package/lib/components/features/documents/TMMergeToPdfForm.js +293 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -0
- package/lib/components/features/documents/TMRelationViewer.js +75 -6
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +71 -0
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +304 -0
- package/lib/components/features/search/SignatureParamsManager.d.ts +70 -0
- package/lib/components/features/search/SignatureParamsManager.js +145 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSavedQuerySelector.js +3 -2
- package/lib/components/features/search/TMSearch.d.ts +6 -1
- package/lib/components/features/search/TMSearch.js +16 -10
- package/lib/components/features/search/TMSearchQueryPanel.js +1 -1
- package/lib/components/features/search/TMSearchResult.d.ts +4 -0
- package/lib/components/features/search/TMSearchResult.js +118 -22
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +3 -6
- package/lib/components/forms/Login/TMLoginForm.d.ts +9 -0
- package/lib/components/forms/Login/TMLoginForm.js +61 -0
- package/lib/components/forms/TMResultDialog.d.ts +1 -1
- package/lib/components/forms/TMResultDialog.js +4 -2
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/pages/TMPage.js +3 -1
- package/lib/components/query/TMQueryEditor.js +1 -1
- package/lib/components/viewers/TMTidViewer.js +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +15 -0
- package/lib/helper/SDKUI_Globals.js +15 -1
- package/lib/helper/SDKUI_Localizator.d.ts +106 -2
- package/lib/helper/SDKUI_Localizator.js +1060 -12
- package/lib/helper/TMPdfViewer.js +25 -24
- package/lib/helper/TMUtils.d.ts +20 -0
- package/lib/helper/TMUtils.js +17 -0
- package/lib/helper/ZipManager.d.ts +56 -0
- package/lib/helper/ZipManager.js +127 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useDataUserIdItem.js +6 -4
- package/lib/hooks/useDcmtOperations.d.ts +9 -2
- package/lib/hooks/useDcmtOperations.js +77 -34
- package/lib/hooks/useDocumentOperations.d.ts +5 -0
- package/lib/hooks/useDocumentOperations.js +238 -27
- package/lib/hooks/useForm.js +5 -2
- package/lib/hooks/useResizeObserver.d.ts +1 -1
- package/lib/hooks/useResizeObserver.js +16 -15
- package/package.json +55 -54
|
@@ -14,12 +14,13 @@ import { StyledMultiViewPanel } from '../../base/Styled';
|
|
|
14
14
|
import { useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
|
|
15
15
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
16
16
|
import { TMPanelManagerWithPersistenceProvider } from '../../layout/panelManager/TMPanelManagerWithPersistenceProvider';
|
|
17
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
17
18
|
var TMSearchViews;
|
|
18
19
|
(function (TMSearchViews) {
|
|
19
20
|
TMSearchViews[TMSearchViews["Search"] = 0] = "Search";
|
|
20
21
|
TMSearchViews[TMSearchViews["Result"] = 1] = "Result";
|
|
21
22
|
})(TMSearchViews || (TMSearchViews = {}));
|
|
22
|
-
const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, openInOffice, isVisible, inputTID, inputSqdID, inputMids, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, floatingActionConfig, onFileOpened, onRefreshAfterAddDcmtToFavs, onTaskCreateRequest, openWGsCopyMoveForm, editPdfForm = false, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, showTodoDcmtForm, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, passToArchiveCallback, onCurrentTIDChangedCallback, onlyShowSearchQueryPanel, onReferenceClick }) => {
|
|
23
|
+
const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, openInOffice, isVisible, inputTID, inputSqdID, inputMids, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, floatingActionConfig, onFileOpened, onRefreshAfterAddDcmtToFavs, onTaskCreateRequest, openWGsCopyMoveForm, editPdfForm = false, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, showTodoDcmtForm, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, passToArchiveCallback, onCurrentTIDChangedCallback, onlyShowSearchQueryPanel, onReferenceClick, refreshFavoriteSavedQueries, inputDID, formAutoOpen, mergePdfManager }) => {
|
|
23
24
|
const [allSQDs, setAllSQDs] = useState([]);
|
|
24
25
|
const [filteredByTIDSQDs, setFilteredByTIDSQDs] = useState([]);
|
|
25
26
|
const [currentSQD, setCurrentSQD] = useState();
|
|
@@ -50,13 +51,18 @@ const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTask
|
|
|
50
51
|
setCurrentSearchView(TMSearchViews.Search);
|
|
51
52
|
}, [inputTID]);
|
|
52
53
|
useEffect(() => {
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
const loadSqd = async () => {
|
|
55
|
+
try {
|
|
56
|
+
const resultSqd = await SavedQueryCacheService.GetAsync(inputSqdID);
|
|
55
57
|
await setSQDAsync(resultSqd);
|
|
56
58
|
// Mostra la vista Search per visualizzare i filtri della SavedQuery caricata
|
|
57
59
|
setCurrentSearchView(TMSearchViews.Search);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
TMExceptionBoxManager.show({ exception: err });
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
loadSqd();
|
|
60
66
|
}, [inputSqdID]);
|
|
61
67
|
useEffect(() => {
|
|
62
68
|
const newMaxDcmtsToBeReturned = SDKUI_Globals.userSettings.searchSettings?.maxDcmtsToBeReturned ?? 1000;
|
|
@@ -195,9 +201,9 @@ const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTask
|
|
|
195
201
|
} }), [fromDTD, showSearchResults, setShowSearchResults, currentSQD, isExpertMode, mruTIDs, searchResult, passToArchiveCallback, inputMids, maxDcmtsToBeReturned]);
|
|
196
202
|
const tmSavedQuerySelectorElement = useMemo(() => _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(TMSavedQuerySelectorWrapper, { allowShowSearch: false, items: filteredByTIDSQDs, selectedId: currentSQD?.id, onRefreshData: () => { loadDataSQDsAsync(true); }, onItemClick: (sqd) => {
|
|
197
203
|
onSQDItemClick(sqd, setSQDAsync);
|
|
198
|
-
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync) }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.AllFemale, children: _jsx(TMSavedQuerySelectorWrapper, { allowShowSearch: true, items: allSQDs, manageDefault: false, onItemClick: (sqd) => {
|
|
204
|
+
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? filteredByTIDSQDs.find(o => o.id == 1) : currentSQD, setSQDAsync), refreshFavoriteSavedQueries: refreshFavoriteSavedQueries }) }) : _jsx(_Fragment, {}), _jsx(Item, { title: SDKUI_Localizator.AllFemale, children: _jsx(TMSavedQuerySelectorWrapper, { allowShowSearch: true, items: allSQDs, manageDefault: false, onItemClick: (sqd) => {
|
|
199
205
|
onSQDItemClick(sqd, setSQDAsync);
|
|
200
|
-
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? undefined : currentSQD, setSQDAsync) }) })] }), [currentSQDMode, currentTID, currentSQD, fromDTD, filteredByTIDSQDs, allSQDs]);
|
|
206
|
+
}, onDeleted: (sqd) => onSQDDeleted(sqd, sqd.id == currentSQD?.id ? undefined : currentSQD, setSQDAsync), refreshFavoriteSavedQueries: refreshFavoriteSavedQueries }) })] }), [currentSQDMode, currentTID, currentSQD, fromDTD, filteredByTIDSQDs, allSQDs]);
|
|
201
207
|
// Returns the current panelLayout from user settings, falling back to an empty object if not present.
|
|
202
208
|
const getPanelLayoutSetting = () => {
|
|
203
209
|
return SDKUI_Globals.userSettings.searchSettings.panelLayout ?? {};
|
|
@@ -260,7 +266,7 @@ const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTask
|
|
|
260
266
|
toolbarOptions: { icon: _jsx(IconSavedQuery, { fontSize: 24 }), visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['TMSavedQuerySelector'] }
|
|
261
267
|
}
|
|
262
268
|
], [tmTreeSelectorElement, showSearchResults, tmRecentsManagerElement, tmSearchQueryPanelElement, tmSavedQuerySelectorElement, fromDTD, mruTIDs]);
|
|
263
|
-
return (_jsxs(_Fragment, { children: [showSearchResults ? _jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'TMRecentsManager', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true, minPanelSizePx: !isMobile ? 250 : 150 }) }) }) : tmSearchQueryPanelElement, showSearchResults && _jsx(TMSearchResult, { isVisible: isVisible && currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, floatingActionConfig: floatingActionConfig, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, openInOffice: openInOffice, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onClose: () => { onlyShowSearchQueryPanel ? setShowSearchResults(false) : setCurrentSearchView(TMSearchViews.Search); }, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, passToArchiveCallback: passToArchiveCallback, onSelectedTIDChanged: onCurrentTIDChangedCallback, showTodoDcmtForm: showTodoDcmtForm, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers })] }));
|
|
269
|
+
return (_jsxs(_Fragment, { children: [showSearchResults ? _jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'TMRecentsManager', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true, minPanelSizePx: !isMobile ? 250 : 150 }) }) }) : tmSearchQueryPanelElement, showSearchResults && _jsx(TMSearchResult, { isVisible: isVisible && currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, floatingActionConfig: floatingActionConfig, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, openInOffice: openInOffice, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onClose: () => { onlyShowSearchQueryPanel ? setShowSearchResults(false) : setCurrentSearchView(TMSearchViews.Search); }, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, passToArchiveCallback: passToArchiveCallback, onSelectedTIDChanged: onCurrentTIDChangedCallback, showTodoDcmtForm: showTodoDcmtForm, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, inputDID: inputDID, formAutoOpen: formAutoOpen, mergePdfManager: mergePdfManager })] }));
|
|
264
270
|
};
|
|
265
271
|
export default TMSearch;
|
|
266
272
|
const TMTreeSelectorWrapper = ({ isMobile, onSelectedTIDChanged }) => {
|
|
@@ -285,10 +291,10 @@ const TMSearchQueryPanelWrapper = ({ fromDTD, SQD, isExpertMode, showBackToResul
|
|
|
285
291
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
286
292
|
return (_jsx(TMSearchQueryPanel, { onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('TMSearchQueryPanel', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("TMSearchQueryPanel") : undefined, isExpertMode: isExpertMode, fromDTD: fromDTD, SQD: SQD, inputMids: inputMids, onSearchCompleted: onSearchCompleted, onSqdSaved: onSqdSaved, showBackToResultButton: showBackToResultButton, onBackToResult: onBackToResult, passToArchiveCallback: passToArchiveCallback, maxDcmtsToBeReturned: maxDcmtsToBeReturned }));
|
|
287
293
|
};
|
|
288
|
-
const TMSavedQuerySelectorWrapper = ({ items, selectedId, allowShowSearch, manageDefault, onRefreshData, onItemClick, onDeleted }) => {
|
|
294
|
+
const TMSavedQuerySelectorWrapper = ({ items, selectedId, allowShowSearch, manageDefault, onRefreshData, onItemClick, onDeleted, refreshFavoriteSavedQueries }) => {
|
|
289
295
|
const { setPanelVisibilityById } = useTMPanelManagerContext();
|
|
290
296
|
return (_jsx(TMSavedQuerySelector, { allowShowSearch: allowShowSearch, manageDefault: manageDefault, items: items, selectedId: selectedId, onRefreshData: onRefreshData, onItemClick: (sqd) => {
|
|
291
297
|
onItemClick?.(sqd);
|
|
292
298
|
setPanelVisibilityById('TMSearchQueryPanel', true);
|
|
293
|
-
}, onDeleted: onDeleted }));
|
|
299
|
+
}, onDeleted: onDeleted, refreshFavoriteSavedQueries: refreshFavoriteSavedQueries }));
|
|
294
300
|
};
|
|
@@ -327,7 +327,7 @@ const TMSearchQueryPanel = ({ fromDTD, showBackToResultButton, isExpertMode = SD
|
|
|
327
327
|
return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, onBack: onBack, onActiveChanged: handlePanelActiveChanged, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
|
|
328
328
|
_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, { color: 'white' }), showTooltip: false, onClick: () => setIsQueryPanelActive(true) }) })
|
|
329
329
|
: _jsx(_Fragment, {}) }), children: [_jsx(ConfirmQueryParamsDialog, {}), SQD
|
|
330
|
-
? _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { height: '100%', width: '100%', position: 'relative', display: 'flex', flexDirection: 'column', gap: 5 }, children: [showAdvancedSearch
|
|
330
|
+
? _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { height: '100%', width: '100%', position: 'relative', display: showSqdForm ? 'none' : 'flex', flexDirection: 'column', gap: 5 }, children: [showAdvancedSearch
|
|
331
331
|
? _jsx(TMQueryEditor, { formMode: FormModes.Update, showToolbar: false, inputData: qd, validateSelect: true, showApply: false, onQDChanged: handleQdChanged, updateIsModalOpen: updateIsModalOpen })
|
|
332
332
|
: _jsx(TMSearchQueryEditor, { qd: qd, dcmtTypesList: dcmtTypesList, isExpertMode: isExpertMode, showAllMdWhere: showAllMdWhere, onQdChanged: handleQdChanged, onFocusedMetadataChanged: setFocusedTidMid, onAdvancedMenuClick: handleAdvancedMenuClick, updateIsModalOpen: updateIsModalOpen }), _jsxs("div", { style: {
|
|
333
333
|
display: 'flex',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DcmtTypeDescriptor, HomeBlogPost, ObjectRef, SearchResultDescriptor, TaskDescriptor, WorkingGroupDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { MergePdfManagerType } from '../../../helper';
|
|
3
4
|
import { DcmtInfo, SearchResultContext, TaskContext } from '../../../ts';
|
|
4
5
|
import { TMSearchResultFloatingActionConfig } from './TMSearchResultFloatingActionButton';
|
|
5
6
|
export declare const getSearchResultCountersSingleCategory: (searchResults: SearchResultDescriptor[]) => string;
|
|
@@ -11,6 +12,8 @@ interface ITMSearchResultProps {
|
|
|
11
12
|
selectedSearchResultTID?: number;
|
|
12
13
|
floatingActionConfig?: TMSearchResultFloatingActionConfig;
|
|
13
14
|
workingGroupContext?: WorkingGroupDescriptor;
|
|
15
|
+
inputDID?: number;
|
|
16
|
+
formAutoOpen?: boolean;
|
|
14
17
|
allowFloatingBar?: boolean;
|
|
15
18
|
allowRelations?: boolean;
|
|
16
19
|
isClosable?: boolean;
|
|
@@ -29,6 +32,7 @@ interface ITMSearchResultProps {
|
|
|
29
32
|
showToppyDraggableHelpCenter?: boolean;
|
|
30
33
|
toppyHelpCenterUsePortal?: boolean;
|
|
31
34
|
showNoDcmtFoundMessage?: boolean;
|
|
35
|
+
mergePdfManager?: MergePdfManagerType;
|
|
32
36
|
onClose?: () => void;
|
|
33
37
|
openInOffice?: (selectedDcmtsOrFocused: Array<DcmtInfo>) => Promise<void>;
|
|
34
38
|
onWFOperationCompleted?: () => Promise<void>;
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { LoadIndicator } from 'devextreme-react';
|
|
5
5
|
import { AppModules, DataColumnTypes, DataListViewModes, DcmtTypeListCacheService, LayoutCacheService, LayoutModes, MetadataDataDomains, MetadataFormats, SDK_Globals, SystemMIDsAsNumber, UserListCacheService, } from '@topconsultnpm/sdk-ts';
|
|
6
|
-
import { deepCompare, generateUniqueColumnKeys, genUniqueId, getSearchToolbarVisibility, IconBoard, IconDcmtTypeSys, IconDelete, IconMenuVertical, IconPlatform, IconRefresh, IconSearchCheck, IconShow, isApprovalWorkflowView, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, SDKUI_Globals, SDKUI_Localizator, } from '../../../helper';
|
|
6
|
+
import { deepCompare, generateUniqueColumnKeys, genUniqueId, getSearchToolbarVisibility, IconBoard, IconDcmtTypeSys, IconDelete, IconMenuVertical, IconPlatform, IconRefresh, IconSearchCheck, IconShow, isApprovalWorkflowView, isSign4TopEnabled, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, SDKUI_Globals, SDKUI_Localizator, } from '../../../helper';
|
|
7
7
|
import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
|
|
8
8
|
import { DcmtOperationTypes, SearchResultContext, } from '../../../ts';
|
|
9
9
|
import { Gutters } from '../../../utils/theme';
|
|
@@ -52,9 +52,9 @@ const orderByName = (array) => {
|
|
|
52
52
|
};
|
|
53
53
|
const TMSearchResult = ({
|
|
54
54
|
// Data
|
|
55
|
-
groupId, searchResults = [], context = SearchResultContext.METADATA_SEARCH, title, selectedSearchResultTID, floatingActionConfig, workingGroupContext = undefined,
|
|
55
|
+
groupId, searchResults = [], context = SearchResultContext.METADATA_SEARCH, title, selectedSearchResultTID, floatingActionConfig, workingGroupContext = undefined, inputDID,
|
|
56
56
|
// Boolean flags to enable/disable features
|
|
57
|
-
isVisible = true, allowRelations = true, openDcmtFormAsModal = false, showSearchResultSidebar = true, showDcmtFormSidebar = true, showSelector = false, isClosable = false, allowFloatingBar = true, showToolbarHeader = true, showBackButton = true, disableAccordionIfSingleCategory = false, editPdfForm = false, openS4TViewer = false, showTodoDcmtForm = false, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, showNoDcmtFoundMessage = true, enablePinIcons = true,
|
|
57
|
+
formAutoOpen, isVisible = true, allowRelations = true, openDcmtFormAsModal = false, showSearchResultSidebar = true, showDcmtFormSidebar = true, showSelector = false, isClosable = false, allowFloatingBar = true, showToolbarHeader = true, showBackButton = true, disableAccordionIfSingleCategory = false, editPdfForm = false, openS4TViewer = false, showTodoDcmtForm = false, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, showNoDcmtFoundMessage = true, enablePinIcons = true, mergePdfManager,
|
|
58
58
|
// Callbacks (optional)
|
|
59
59
|
openInOffice, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid, onSelectedTIDChanged, onWFOperationCompleted, onClose, onFileOpened, onTaskCreateRequest, openWGsCopyMoveForm, openCommentFormCallback, openAddDocumentForm, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, passToArchiveCallback, onReferenceClick,
|
|
60
60
|
// Tasks
|
|
@@ -101,6 +101,15 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
101
101
|
// State to control the layout of the custom buttons
|
|
102
102
|
const [customButtonsLayout, setCustomButtonsLayout] = useState();
|
|
103
103
|
const [allUsers, setAllUsers] = useState([]);
|
|
104
|
+
const [isBoardDisabled, setIsBoardDisabled] = useState(true);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (!fromDTD) {
|
|
107
|
+
setIsBoardDisabled(false);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const newValue = fromDTD.hasBlog !== undefined && fromDTD.hasBlog !== 1;
|
|
111
|
+
setIsBoardDisabled(newValue);
|
|
112
|
+
}, [fromDTD]);
|
|
104
113
|
useEffect(() => {
|
|
105
114
|
const fetchAllUsers = async () => {
|
|
106
115
|
const users = await UserListCacheService.GetAllAsync();
|
|
@@ -282,7 +291,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
282
291
|
createTaskFromDocumentOrWorkItem();
|
|
283
292
|
}
|
|
284
293
|
};
|
|
285
|
-
const { operationItems, renderFloatingBar, renderDcmtOperations, features } = useDocumentOperations({
|
|
294
|
+
const { operationItems, renderFloatingBar, renderDcmtOperations, features, } = useDocumentOperations({
|
|
286
295
|
context: context,
|
|
287
296
|
documentData: {
|
|
288
297
|
dtd: fromDTD,
|
|
@@ -318,6 +327,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
318
327
|
allowFloatingBar,
|
|
319
328
|
enablePinIcons,
|
|
320
329
|
allowRelations,
|
|
330
|
+
showTodoDcmtForm
|
|
321
331
|
},
|
|
322
332
|
tasks: {
|
|
323
333
|
allTasks: allTasks,
|
|
@@ -351,8 +361,9 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
351
361
|
onTaskCreateRequest,
|
|
352
362
|
openTaskFormHandler,
|
|
353
363
|
},
|
|
364
|
+
mergePdfManager,
|
|
354
365
|
});
|
|
355
|
-
const { isOpenDcmtForm, openFormHandler, dcmtFormLayoutMode, onDcmtFormOpenChange, showSearchTMDatagrid, showExportForm, isOpenBatchUpdate, isModifiedBatchUpdate, updateBatchUpdateForm, handleSignApprove, checkoutInfo: { showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, }, dcmtOperations: { abortController, showWaitPanel, showPrimary, waitPanelTitle, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync, runOperationAsync, }, relatedDocumentsInfo: { isOpenDetails, isOpenMaster, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability, }, toppyOperations: { showApprovePopup, showRejectPopup, showReAssignPopup, showMoreInfoPopup, updateShowApprovePopup, updateShowRejectPopup, updateShowReAssignPopup, updateShowMoreInfoPopup } } = features;
|
|
366
|
+
const { isOpenDcmtForm, openFormHandler, dcmtFormLayoutMode, onDcmtFormOpenChange, showSearchTMDatagrid, showExportForm, isOpenBatchUpdate, isModifiedBatchUpdate, updateBatchUpdateForm, closeDcmtFormHandler, handleSignApprove, checkoutInfo: { showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, }, dcmtOperations: { abortController, showWaitPanel, showPrimary, waitPanelTitle, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync, runOperationAsync, }, relatedDocumentsInfo: { isOpenDetails, isOpenMaster, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability, }, toppyOperations: { showApprovePopup, showRejectPopup, showReAssignPopup, showMoreInfoPopup, updateShowApprovePopup, updateShowRejectPopup, updateShowReAssignPopup, updateShowMoreInfoPopup } } = features;
|
|
356
367
|
const deviceType = useDeviceType();
|
|
357
368
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
358
369
|
const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
@@ -366,6 +377,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
366
377
|
useEffect(() => {
|
|
367
378
|
setSelectedItems([]);
|
|
368
379
|
updateBatchUpdateForm(false);
|
|
380
|
+
closeDcmtFormHandler();
|
|
369
381
|
setCurrentSearchResults(searchResults);
|
|
370
382
|
if (searchResults.length <= 0) {
|
|
371
383
|
setSelectedSearchResult(undefined);
|
|
@@ -407,6 +419,54 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
407
419
|
// Se esiste almeno una riga, seleziona la prima
|
|
408
420
|
setFocusedItem(newDataSource && newDataSource.length > 0 ? newDataSource[0] : undefined);
|
|
409
421
|
}, [selectedSearchResult, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability]);
|
|
422
|
+
// Quando inputDID è fornito e i dati della griglia sono pronti, seleziona il documento corrispondente
|
|
423
|
+
useEffect(() => {
|
|
424
|
+
if (!inputDID || visibleItems.length === 0)
|
|
425
|
+
return;
|
|
426
|
+
const targetItem = visibleItems.find((item) => item.DID == inputDID);
|
|
427
|
+
if (targetItem && focusedItem?.DID != inputDID) {
|
|
428
|
+
setFocusedItem(targetItem);
|
|
429
|
+
}
|
|
430
|
+
else if (!targetItem) {
|
|
431
|
+
ShowAlert({
|
|
432
|
+
message: `${SDKUI_Localizator.NoDcmtFound} (DID: ${inputDID})`,
|
|
433
|
+
mode: "warning",
|
|
434
|
+
title: 'External link',
|
|
435
|
+
duration: 5000
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}, [inputDID, visibleItems]);
|
|
439
|
+
// Quando inputDID e formAutoOpen sono forniti, apri automaticamente il form del documento
|
|
440
|
+
useEffect(() => {
|
|
441
|
+
if (!inputDID || !formAutoOpen)
|
|
442
|
+
return;
|
|
443
|
+
if (focusedItem?.DID != inputDID)
|
|
444
|
+
return;
|
|
445
|
+
openFormHandler(LayoutModes.Update);
|
|
446
|
+
}, [inputDID, formAutoOpen, focusedItem]);
|
|
447
|
+
// Quando openS4TViewer è true, apri automaticamente il viewer S4T
|
|
448
|
+
useEffect(() => {
|
|
449
|
+
if (!openS4TViewer)
|
|
450
|
+
return;
|
|
451
|
+
if (!inputDID)
|
|
452
|
+
return;
|
|
453
|
+
if (!focusedItem)
|
|
454
|
+
return;
|
|
455
|
+
if (focusedItem.DID != inputDID)
|
|
456
|
+
return;
|
|
457
|
+
if (!fromDTD || !isApprovalWorkflowView(fromDTD))
|
|
458
|
+
return;
|
|
459
|
+
if (!focusedItem.FILEEXT || !fromDTD.widgets || !isSign4TopEnabled(fromDTD.widgets)) {
|
|
460
|
+
ShowAlert({
|
|
461
|
+
message: "Il documento non ha l'estensione valida per la firma.",
|
|
462
|
+
mode: "warning",
|
|
463
|
+
title: 'External link',
|
|
464
|
+
duration: 5000
|
|
465
|
+
});
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
onOpenS4TViewerRequest?.([{ TID: focusedItem.TID, DID: focusedItem.DID }]);
|
|
469
|
+
}, [openS4TViewer, inputDID, focusedItem, fromDTD]);
|
|
410
470
|
useEffect(() => {
|
|
411
471
|
if (!focusedItem)
|
|
412
472
|
return;
|
|
@@ -512,6 +572,21 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
512
572
|
return newResults;
|
|
513
573
|
});
|
|
514
574
|
};
|
|
575
|
+
/**
|
|
576
|
+
* Restituisce l'handler onBack per i pannelli, evitando duplicazione di codice.
|
|
577
|
+
* @param isMainPanel - Se true, è il pannello principale dei risultati di ricerca
|
|
578
|
+
*/
|
|
579
|
+
const getOnBackHandler = (isMainPanel = false) => {
|
|
580
|
+
// Se showBackButton è false, non mostrare mai il back
|
|
581
|
+
if (showBackButton === false)
|
|
582
|
+
return undefined;
|
|
583
|
+
// Mobile: mostra back su tutti i pannelli (se showBackButton è definito e non è closable)
|
|
584
|
+
if (isMobile) {
|
|
585
|
+
return (showBackButton !== undefined && !isClosable) ? onBack : undefined;
|
|
586
|
+
}
|
|
587
|
+
// Desktop: mostra back solo sul pannello principale dei risultati (se showBackButton è definito e non è closable)
|
|
588
|
+
return (showBackButton !== undefined && isMainPanel && !isClosable) ? onBack : undefined;
|
|
589
|
+
};
|
|
515
590
|
const removeDcmtFromFavsOrRecents = async () => {
|
|
516
591
|
switch (selectedSearchResult?.category) {
|
|
517
592
|
case "Favorites":
|
|
@@ -601,7 +676,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
601
676
|
]);
|
|
602
677
|
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID, fetchBlogDataTrigger: refreshBlogTrigger, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, allTasks, refreshBlogTrigger, handleNavigateToWGs, handleNavigateToDossiers, onRefreshBlogDatagrid]);
|
|
603
678
|
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]);
|
|
604
|
-
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { refreshPreviewTrigger: refreshPreviewTrigger, currentDcmt: currentDcmt }), [currentDcmt, refreshPreviewTrigger]);
|
|
679
|
+
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { refreshPreviewTrigger: refreshPreviewTrigger, currentDcmt: currentDcmt, onBack: getOnBackHandler() }), [currentDcmt, refreshPreviewTrigger]);
|
|
605
680
|
// Auto-fetch indexing info when drawer is open and focusedItem changes
|
|
606
681
|
useEffect(() => {
|
|
607
682
|
if (!focusedItem || !showIndexingInfo)
|
|
@@ -658,7 +733,6 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
658
733
|
}
|
|
659
734
|
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', overflow: 'hidden', width: '100%' }, children: [_jsx("div", { style: { padding: '10px', overflow: 'auto', flex: 1 }, children: _jsx("div", { dangerouslySetInnerHTML: { __html: ftExplanation } }) }), _jsxs(StyledIndexingInfoSection, { children: [_jsxs(StyledIndexingToggle, { onClick: handleToggleIndexingInfo, disabled: loadingIndexingInfo, children: [_jsx(StyledLeftContent, { children: _jsx("span", { children: SDKUI_Localizator.IndexingInformation }) }), _jsx(StyledRightContent, { children: _jsx(StyledChevron, { "$isOpen": showIndexingInfo, children: "\u25BC" }) })] }), showIndexingInfo && indexingInfo && (_jsxs(StyledIndexingInfoBox, { children: [_jsx("div", { dangerouslySetInnerHTML: { __html: indexingInfo } }), loadingIndexingInfo && (_jsxs("div", { style: { position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', background: 'rgba(255, 255, 255, 0.9)', padding: '10px', borderRadius: '4px', boxShadow: '0 2px 8px rgba(0,0,0,0.15)' }, children: [SDKUI_Localizator.Loading, "..."] }))] }))] })] }));
|
|
660
735
|
}, [selectedSearchResult, focusedItem, indexingInfo, showIndexingInfo, loadingIndexingInfo]);
|
|
661
|
-
const isBoardDisabled = useMemo(() => fromDTD?.hasBlog !== 1, [fromDTD?.hasBlog]);
|
|
662
736
|
const allInitialPanelVisibility = {
|
|
663
737
|
'tmSearchResult': true,
|
|
664
738
|
'tmBlog': false,
|
|
@@ -683,9 +757,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
683
757
|
title: getTitleHeader(),
|
|
684
758
|
showHeader: showToolbarHeader,
|
|
685
759
|
allowMaximize: !isMobile,
|
|
686
|
-
onBack:
|
|
687
|
-
? (showBackButton ? onBack : undefined)
|
|
688
|
-
: ((!isClosable && context === SearchResultContext.METADATA_SEARCH) || (isMobile && context !== SearchResultContext.METADATA_SEARCH && splitterSize[1] === '100%') ? onBack : undefined),
|
|
760
|
+
onBack: getOnBackHandler(true),
|
|
689
761
|
onClose: isClosable ? onBack : undefined,
|
|
690
762
|
toolbar: searchResutlToolbar
|
|
691
763
|
},
|
|
@@ -695,27 +767,50 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
695
767
|
{
|
|
696
768
|
id: 'tmBlog',
|
|
697
769
|
name: SDKUI_Localizator.BlogCase,
|
|
698
|
-
contentOptions: {
|
|
770
|
+
contentOptions: {
|
|
771
|
+
component: tmBlog,
|
|
772
|
+
panelContainer: {
|
|
773
|
+
title: SDKUI_Localizator.BlogCase,
|
|
774
|
+
allowMaximize: !isMobile,
|
|
775
|
+
onBack: getOnBackHandler(),
|
|
776
|
+
}
|
|
777
|
+
},
|
|
699
778
|
toolbarOptions: { icon: _jsx(IconBoard, { fontSize: 24 }), visible: getSearchToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmBlog, orderNumber: 2, isActive: allInitialPanelVisibility['tmBlog'] }
|
|
700
779
|
},
|
|
701
780
|
{
|
|
702
781
|
id: 'tmSysMetadata',
|
|
703
782
|
name: SDKUI_Localizator.MetadataSystem,
|
|
704
|
-
contentOptions: {
|
|
783
|
+
contentOptions: {
|
|
784
|
+
component: tmSysMetadata,
|
|
785
|
+
panelContainer: {
|
|
786
|
+
title: SDKUI_Localizator.MetadataSystem,
|
|
787
|
+
allowMaximize: !isMobile,
|
|
788
|
+
onBack: getOnBackHandler(),
|
|
789
|
+
}
|
|
790
|
+
},
|
|
705
791
|
toolbarOptions: { icon: _jsx(IconDcmtTypeSys, { fontSize: 24 }), visible: getSearchToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmSysMetadata, orderNumber: 3, isActive: allInitialPanelVisibility['tmSysMetadata'] }
|
|
706
792
|
},
|
|
707
793
|
...(context === SearchResultContext.FREE_SEARCH ? [
|
|
708
794
|
{
|
|
709
795
|
id: 'tmFullTextSearch',
|
|
710
796
|
name: SDKUI_Localizator.ResultDetails,
|
|
711
|
-
contentOptions: {
|
|
797
|
+
contentOptions: {
|
|
798
|
+
component: tmFullTextSearch,
|
|
799
|
+
panelContainer: {
|
|
800
|
+
title: SDKUI_Localizator.ResultDetails,
|
|
801
|
+
allowMaximize: !isMobile,
|
|
802
|
+
onBack: getOnBackHandler(),
|
|
803
|
+
}
|
|
804
|
+
},
|
|
712
805
|
toolbarOptions: { icon: _jsx(IconPlatform, { fontSize: 20 }), visible: getSearchToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmFullTextSearch, orderNumber: 4, isActive: allInitialPanelVisibility['tmFullTextSearch'] }
|
|
713
806
|
}
|
|
714
807
|
] : []),
|
|
715
808
|
{
|
|
716
809
|
id: 'tmDcmtPreview',
|
|
717
810
|
name: SDKUI_Localizator.PreviewDocument,
|
|
718
|
-
contentOptions: {
|
|
811
|
+
contentOptions: {
|
|
812
|
+
component: tmDcmtPreview
|
|
813
|
+
},
|
|
719
814
|
toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), visible: getSearchToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmDcmtPreview, orderNumber: context === SearchResultContext.FREE_SEARCH ? 5 : 4, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
|
|
720
815
|
}
|
|
721
816
|
], [tmSearchResult, tmBlog, tmSysMetadata, tmDcmtPreview, tmFullTextSearch, showToolbarHeader, context, isMobile]);
|
|
@@ -1240,22 +1335,23 @@ const TMSearchResultSelector = ({ searchResults = [], disableAccordionIfSingleCa
|
|
|
1240
1335
|
};
|
|
1241
1336
|
//#endregion TMSearchResultSelector
|
|
1242
1337
|
const PanelDisabledStateHandler = ({ isBoardDisabled }) => {
|
|
1243
|
-
const { setPanelVisibilityById, setToolbarButtonDisabled
|
|
1338
|
+
const { setPanelVisibilityById, setToolbarButtonDisabled } = useTMPanelManagerContext();
|
|
1244
1339
|
useEffect(() => {
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
// Chiude il pannello solo se è attualmente visibile e deve essere disabilitato
|
|
1248
|
-
if (isBoardDisabled && panelVisibility['tmBlog']) {
|
|
1340
|
+
if (isBoardDisabled) {
|
|
1341
|
+
setToolbarButtonDisabled('tmBlog', true);
|
|
1249
1342
|
setPanelVisibilityById('tmBlog', false);
|
|
1250
1343
|
}
|
|
1251
|
-
|
|
1344
|
+
else {
|
|
1345
|
+
setToolbarButtonDisabled('tmBlog', false);
|
|
1346
|
+
}
|
|
1347
|
+
}, [isBoardDisabled]);
|
|
1252
1348
|
return null;
|
|
1253
1349
|
};
|
|
1254
|
-
const TMDcmtPreviewWrapper = ({ refreshPreviewTrigger, currentDcmt, isVisible }) => {
|
|
1350
|
+
const TMDcmtPreviewWrapper = ({ refreshPreviewTrigger, currentDcmt, isVisible, onBack }) => {
|
|
1255
1351
|
const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels } = useTMPanelManagerContext();
|
|
1256
1352
|
const deviceType = useDeviceType();
|
|
1257
1353
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
1258
|
-
return (_jsx(TMDcmtPreview, { dcmtData: currentDcmt, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, isResizingActive: isResizingActive, isVisible: isVisible }, refreshPreviewTrigger));
|
|
1354
|
+
return (_jsx(TMDcmtPreview, { dcmtData: currentDcmt, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, onBack: onBack, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, isResizingActive: isResizingActive, isVisible: isVisible }, refreshPreviewTrigger));
|
|
1259
1355
|
};
|
|
1260
1356
|
// Styled Components
|
|
1261
1357
|
const StyledPlaceholder = styled.div `
|
|
@@ -175,14 +175,11 @@ export const parseQueryDescriptorXml = (xmlString) => {
|
|
|
175
175
|
return SearchEngine.NormalizeQueryDescriptor(queryDescriptor);
|
|
176
176
|
};
|
|
177
177
|
export const serializeQueryDescriptorXml = async (qd) => {
|
|
178
|
-
// try {
|
|
179
178
|
if (!qd)
|
|
180
179
|
return '';
|
|
180
|
+
// Per compatibilità con V5, assicurati che ogni JoinItem abbia un alias (anche se vuoto) prima della serializzazione,
|
|
181
|
+
// poiché la logica di serializzazione potrebbe aspettarsi questa proprietà.
|
|
182
|
+
qd.join?.forEach(join => { join.alias ??= ""; });
|
|
181
183
|
let xml = await SDK_Globals.tmSession?.NewDcmtPlatformEngine().UtilsSerializeQdAsync(qd) ?? '';
|
|
182
184
|
return xml;
|
|
183
|
-
// } catch (error) {
|
|
184
|
-
// console.error('Error serializing QueryDescriptor to XML:', error);
|
|
185
|
-
//TODO: gestire errore
|
|
186
|
-
// return '';
|
|
187
|
-
// }
|
|
188
185
|
};
|
|
@@ -31,6 +31,14 @@ export declare const cultureIDsDataSource: {
|
|
|
31
31
|
value: CultureIDs;
|
|
32
32
|
display: string;
|
|
33
33
|
}[];
|
|
34
|
+
export interface ITMLoginDefaultValues {
|
|
35
|
+
endpoint: string;
|
|
36
|
+
archiveId?: string;
|
|
37
|
+
authenticationMode?: AuthenticationModes;
|
|
38
|
+
username?: string;
|
|
39
|
+
behalfUsername?: string;
|
|
40
|
+
domain?: string;
|
|
41
|
+
}
|
|
34
42
|
interface ITMLoginFormProps {
|
|
35
43
|
isConnector?: boolean;
|
|
36
44
|
sdInput?: SessionDescriptor;
|
|
@@ -39,6 +47,7 @@ interface ITMLoginFormProps {
|
|
|
39
47
|
onLogged: (tmSession: ITopMediaSession) => void;
|
|
40
48
|
onChangeLanguage?: (e: CultureIDs) => void;
|
|
41
49
|
cultureID?: CultureIDs;
|
|
50
|
+
defaultLoginValues?: ITMLoginDefaultValues;
|
|
42
51
|
}
|
|
43
52
|
declare const TMLoginForm: React.FunctionComponent<ITMLoginFormProps>;
|
|
44
53
|
export default TMLoginForm;
|
|
@@ -106,6 +106,7 @@ const TMLoginForm = (props) => {
|
|
|
106
106
|
const passwordRef = useRef(null);
|
|
107
107
|
const usernameOnBehalfOfRef = useRef(null);
|
|
108
108
|
const passwordOnBehalfOfRRef = useRef(null);
|
|
109
|
+
const defaultLoginAppliedRef = useRef(false);
|
|
109
110
|
const [loginStep, setLoginStep] = useState(1);
|
|
110
111
|
const [tmServer, setTmServer] = useState();
|
|
111
112
|
const [tmSession, setTmSession] = useState();
|
|
@@ -201,6 +202,30 @@ const TMLoginForm = (props) => {
|
|
|
201
202
|
setUsername(props.sdInput.userName);
|
|
202
203
|
}
|
|
203
204
|
}, []);
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
if (!props.defaultLoginValues)
|
|
207
|
+
return;
|
|
208
|
+
const matchingEndpoint = props.endpoints.find(ep => ep.URL === props.defaultLoginValues.endpoint);
|
|
209
|
+
if (!matchingEndpoint) {
|
|
210
|
+
ShowAlert({
|
|
211
|
+
message: "Endpoint non trovato",
|
|
212
|
+
mode: "warning",
|
|
213
|
+
title: "External link",
|
|
214
|
+
duration: 5000
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
setEndpoint(matchingEndpoint);
|
|
219
|
+
if (props.defaultLoginValues.archiveId)
|
|
220
|
+
setManualArchiveID(props.defaultLoginValues.archiveId);
|
|
221
|
+
setAuthMode(props.defaultLoginValues.authenticationMode ?? AuthenticationModes.TopMedia);
|
|
222
|
+
if (props.defaultLoginValues.username)
|
|
223
|
+
setUsername(props.defaultLoginValues.username);
|
|
224
|
+
if (props.defaultLoginValues.domain)
|
|
225
|
+
setAuthDomain(props.defaultLoginValues.domain);
|
|
226
|
+
if (props.defaultLoginValues.behalfUsername)
|
|
227
|
+
setUsernameOnBehalf(props.defaultLoginValues.behalfUsername);
|
|
228
|
+
}, [props.defaultLoginValues, props.endpoints]);
|
|
204
229
|
useEffect(() => {
|
|
205
230
|
if (!hasSingleOption)
|
|
206
231
|
return;
|
|
@@ -216,6 +241,9 @@ const TMLoginForm = (props) => {
|
|
|
216
241
|
setDcmtArchive(undefined);
|
|
217
242
|
}, [isSuccess]);
|
|
218
243
|
useEffect(() => {
|
|
244
|
+
// Skip all default endpoint logic when defaultLoginValues is defined (external link)
|
|
245
|
+
if (props.defaultLoginValues)
|
|
246
|
+
return;
|
|
219
247
|
let preferredRapidAccess = localRa?.find(ar => ar.preferred === true);
|
|
220
248
|
if (preferredRapidAccess) {
|
|
221
249
|
handleRapidAccessSelection(preferredRapidAccess);
|
|
@@ -240,6 +268,36 @@ const TMLoginForm = (props) => {
|
|
|
240
268
|
useEffect(() => {
|
|
241
269
|
getArchivesAsync();
|
|
242
270
|
}, [tmSession]);
|
|
271
|
+
// Default values and step management
|
|
272
|
+
useEffect(() => {
|
|
273
|
+
if (!props.defaultLoginValues || !props.defaultLoginValues.archiveId || defaultLoginAppliedRef.current || !tmSession || !tmSession.TopMediaServer?.BaseAddress)
|
|
274
|
+
return;
|
|
275
|
+
defaultLoginAppliedRef.current = true;
|
|
276
|
+
const archiveId = props.defaultLoginValues.archiveId;
|
|
277
|
+
const validateAndAdvance = async () => {
|
|
278
|
+
try {
|
|
279
|
+
TMSpinner.show({ description: '' });
|
|
280
|
+
const archiveEngine = tmSession.NewArchiveEngine();
|
|
281
|
+
const result = await archiveEngine.RetrieveAsync(archiveId);
|
|
282
|
+
setDcmtArchive(result);
|
|
283
|
+
setLoginStep(2);
|
|
284
|
+
}
|
|
285
|
+
catch (e) {
|
|
286
|
+
ShowAlert({
|
|
287
|
+
message: "Archive id non valido",
|
|
288
|
+
mode: "warning",
|
|
289
|
+
title: "External link",
|
|
290
|
+
duration: 5000
|
|
291
|
+
});
|
|
292
|
+
setManualArchiveID('');
|
|
293
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
294
|
+
}
|
|
295
|
+
finally {
|
|
296
|
+
TMSpinner.hide();
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
validateAndAdvance();
|
|
300
|
+
}, [tmSession, props.defaultLoginValues]);
|
|
243
301
|
useEffect(() => {
|
|
244
302
|
if (!saveLoginEnable || !dcmtArchive)
|
|
245
303
|
return;
|
|
@@ -396,6 +454,9 @@ const TMLoginForm = (props) => {
|
|
|
396
454
|
if (!archives)
|
|
397
455
|
return;
|
|
398
456
|
setDcmtArchives(archives);
|
|
457
|
+
// Skip auto-selection when defaultLoginValues provides an archiveId (external link)
|
|
458
|
+
if (props.defaultLoginValues?.archiveId)
|
|
459
|
+
return;
|
|
399
460
|
if (archives.length === 1) {
|
|
400
461
|
setDcmtArchive(archives[0]);
|
|
401
462
|
return;
|
|
@@ -16,5 +16,5 @@ interface ITMResultDialogProps {
|
|
|
16
16
|
declare const TMResultDialog: React.FC<ITMResultDialogProps>;
|
|
17
17
|
export default TMResultDialog;
|
|
18
18
|
export declare class TMResultManager {
|
|
19
|
-
static show(result: ResultInfo[], title: string, id1Caption: string | undefined, id2Caption: string | undefined, customMsg?: string, customDuration?: number): void;
|
|
19
|
+
static show(result: ResultInfo[], title: string, id1Caption: string | undefined, id2Caption: string | undefined, customMsg?: string, customDuration?: number, showSuccessAlert?: boolean): void;
|
|
20
20
|
}
|
|
@@ -29,11 +29,13 @@ const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
|
|
|
29
29
|
};
|
|
30
30
|
export default TMResultDialog;
|
|
31
31
|
export class TMResultManager {
|
|
32
|
-
static show(result, title, id1Caption, id2Caption, customMsg, customDuration) {
|
|
32
|
+
static show(result, title, id1Caption, id2Caption, customMsg, customDuration, showSuccessAlert = true) {
|
|
33
33
|
const warningsCount = result.filter(o => o.resultType == ResultTypes.WARNING).length;
|
|
34
34
|
const errorsCount = result.filter(o => o.resultType == ResultTypes.ERROR).length;
|
|
35
35
|
if (warningsCount <= 0 && errorsCount <= 0) {
|
|
36
|
-
|
|
36
|
+
if (showSuccessAlert) {
|
|
37
|
+
ShowAlert({ message: customMsg && customMsg.length > 0 ? customMsg : SDKUI_Localizator.OperationSuccess, mode: 'success', duration: customDuration && customDuration > 0 ? customDuration : 3000, title: title });
|
|
38
|
+
}
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
39
41
|
let container = document.createElement('div');
|
|
@@ -71,6 +71,7 @@ export * from './features/documents/TMRelationViewer';
|
|
|
71
71
|
export * from './features/archive/TMArchive';
|
|
72
72
|
export * from './features/search/TMSearch';
|
|
73
73
|
export * from './features/search/TMSearchResult';
|
|
74
|
+
export * from './features/search/SignatureParamsManager';
|
|
74
75
|
export { default as TMTaskForm } from './features/tasks/TMTaskForm';
|
|
75
76
|
export { default as TMTasksAgenda } from './features/tasks/TMTasksAgenda';
|
|
76
77
|
export { default as TMTasksCalendar } from './features/tasks/TMTasksCalendar';
|
package/lib/components/index.js
CHANGED
|
@@ -81,6 +81,7 @@ export * from './features/archive/TMArchive';
|
|
|
81
81
|
//search
|
|
82
82
|
export * from './features/search/TMSearch';
|
|
83
83
|
export * from './features/search/TMSearchResult';
|
|
84
|
+
export * from './features/search/SignatureParamsManager';
|
|
84
85
|
// tasks
|
|
85
86
|
export { default as TMTaskForm } from './features/tasks/TMTaskForm';
|
|
86
87
|
export { default as TMTasksAgenda } from './features/tasks/TMTasksAgenda';
|
|
@@ -188,8 +188,10 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
|
|
|
188
188
|
onStatusChanged: (isModified) => { setSelectionListDisabled((formMode == FormModes.Create || formMode == FormModes.Duplicate) ? true : isModified); },
|
|
189
189
|
onSaved: async (newItem) => {
|
|
190
190
|
try {
|
|
191
|
+
console.log('Saved item', newItem);
|
|
191
192
|
const currentItems = items.map((job) => job);
|
|
192
193
|
const index = currentItems.findIndex((o) => o.id == newItem.id);
|
|
194
|
+
console.log('index', index);
|
|
193
195
|
if (index >= 0)
|
|
194
196
|
currentItems[index] = newItem;
|
|
195
197
|
else
|
|
@@ -221,6 +223,6 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
|
|
|
221
223
|
_jsx(TMLayoutItem, { children: selectedItems.length == 1 || formMode == FormModes.Create || formMode == FormModes.Duplicate ?
|
|
222
224
|
_jsx(TMToolbarCard, { onBack: deviceType === DeviceType.MOBILE ? () => setShowList(true) : undefined, title: calcSaveFormTitle(objName, formMode, selectedItems.length == 0 ? -1 : selectedItems[0].id, detailTitlePathKeys), children: getDetailFormWithProps() })
|
|
223
225
|
:
|
|
224
|
-
_jsx(MultipleSelectionManager, {}) })] }) }));
|
|
226
|
+
selectedItems.length > 0 ? _jsx(MultipleSelectionManager, {}) : _jsx(_Fragment, {}) })] }) }));
|
|
225
227
|
};
|
|
226
228
|
export default TMPage;
|
|
@@ -733,7 +733,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
// #endregion
|
|
736
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMQueryCountButton, { qd: { ...formData }, lastparams: lastQdParams, onLastQueryParamsChanged: (params) => { setLastQdParams(params); }, disabled: errorsCount > 0, showSpinner: true }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption:
|
|
736
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMQueryCountButton, { qd: { ...formData }, lastparams: lastQdParams, onLastQueryParamsChanged: (params) => { setLastQdParams(params); }, disabled: errorsCount > 0, showSpinner: true }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: SDKUI_Localizator.PassToArchive, icon: _jsx(IconArchiveDoc, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Vai a risultato", icon: _jsx(IconArrowRight, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Vai a risultato", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } })] }), showToolbar: showToolbar, showApply: showApply, showUndo: showUndo, showBack: showBack, onApply: () => applyData(), onClose: () => onClose?.(), onUndo: () => setFormData(formDataOrig), children: [_jsxs(Accordion, { elementAttr: { class: 'tm-query-dx-accordion' }, height: height, multiple: true, collapsible: true, repaintChangesOnly: true, deferRendering: false, animationDuration: 0, onContentReady: (e) => {
|
|
737
737
|
let items = e.component.option("items");
|
|
738
738
|
if (items && items.length > 0) {
|
|
739
739
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -332,7 +332,7 @@ export const renderDTDTooltipContent = (dtd) => {
|
|
|
332
332
|
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name} (${dtd.isView ? 'VID' : 'TID'}: ${dtd.id}, RootTID: ${dtd.rootTID ?? 0})` }), dtd.description && _jsx(StyledTooltipItem, { children: dtd.description }), _jsx(StyledTooltipSeparatorItem, {}), dtd.customData2 === "NOTGRANTED"
|
|
333
333
|
? _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' })
|
|
334
334
|
:
|
|
335
|
-
_jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ArchiveConstraint}: ${LocalizeArchiveConstraints(dtd.archiveConstraint)}` }), dtd.isView && dtd.parametricFilterType != ParametricFilterTypes.None && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ParametricFilter}: ${LocalizeParametricFilterTypes(dtd.parametricFilterType)}` }), dtd.isView && dtd.withCheckOption && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ViewWithCheckOption}: ${SDKUI_Localizator.Yes}` }), dtd.isLexProt && dtd.isLexProt > 0 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), dtd.isFreeSearchable && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), dtd.templateTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Template}: ${dtd.templateTID}` }), dtd.traceTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Tracing}: ${SDKUI_Localizator.Yes} - ${dtd.templateTID == TemplateTIDs.Trace_DcmtType ? SDKUI_Localizator.Destination : SDKUI_Localizator.Source} ${dtd.traceTID < 0 ? SDKUI_Localizator.Disabled : ''}` }), dtd.wfAppr && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.WorkflowApproval}: ${SDKUI_Localizator.Yes}` }),
|
|
335
|
+
_jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ArchiveConstraint}: ${LocalizeArchiveConstraints(dtd.archiveConstraint)}` }), dtd.isView && dtd.parametricFilterType != ParametricFilterTypes.None && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ParametricFilter}: ${LocalizeParametricFilterTypes(dtd.parametricFilterType)}` }), dtd.isView && dtd.withCheckOption && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ViewWithCheckOption}: ${SDKUI_Localizator.Yes}` }), dtd.isLexProt && dtd.isLexProt > 0 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), dtd.isFreeSearchable && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), dtd.templateTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Template}: ${dtd.templateTID}` }), dtd.traceTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Tracing}: ${SDKUI_Localizator.Yes} - ${dtd.templateTID == TemplateTIDs.Trace_DcmtType ? SDKUI_Localizator.Destination : SDKUI_Localizator.Source} ${dtd.traceTID < 0 ? SDKUI_Localizator.Disabled : ''}` }), dtd.wfAppr && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.WorkflowApproval}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.BlogCase}: ${dtd.hasBlog ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${dtd.cico ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), dtd.perm ?
|
|
336
336
|
_jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${mapAccessLevelToLocalizedString(dtd.perm.canArchive)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${mapAccessLevelToLocalizedString(dtd.perm.canView)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${mapAccessLevelToLocalizedString(dtd.perm.canSearch)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${mapAccessLevelToLocalizedString(dtd.perm.canUpdate)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canRetrieveFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canSubstFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canLogicalDelete)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canPhysicalDelete)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${mapAccessLevelToLocalizedString(dtd.perm.canReadBlog)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${mapAccessLevelToLocalizedString(dtd.perm.canWriteBlog)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${mapAccessLevelToLocalizedString(dtd.perm.canCICO)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canDelChron)}` })] })
|
|
337
337
|
: dtd.ownershipLevel == OwnershipLevels.DirectOwner || dtd.ownershipLevel == OwnershipLevels.IndirectOwner ?
|
|
338
338
|
_jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${SDKUI_Localizator.Yes}` })] })
|