@topconsultnpm/sdkui-react 6.21.0-dev1.10 → 6.21.0-dev1.11
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.
|
@@ -201,7 +201,7 @@ const TMSavedQuerySelector = React.memo(({ items, selectedId, allowShowSearch =
|
|
|
201
201
|
alignItems: 'center',
|
|
202
202
|
justifyContent: 'center',
|
|
203
203
|
minWidth: 0
|
|
204
|
-
}, children: [_jsx("p", { style: {
|
|
204
|
+
}, children: [_jsx("p", { title: sqd.name, style: {
|
|
205
205
|
fontSize: '1rem',
|
|
206
206
|
fontWeight: sqd.id === 1 ? 600 : 'normal',
|
|
207
207
|
whiteSpace: 'nowrap',
|
|
@@ -658,6 +658,7 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
658
658
|
}
|
|
659
659
|
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
660
|
}, [selectedSearchResult, focusedItem, indexingInfo, showIndexingInfo, loadingIndexingInfo]);
|
|
661
|
+
const isBoardDisabled = useMemo(() => fromDTD?.hasBlog !== 1, [fromDTD?.hasBlog]);
|
|
661
662
|
const allInitialPanelVisibility = {
|
|
662
663
|
'tmSearchResult': true,
|
|
663
664
|
'tmBlog': false,
|
|
@@ -726,9 +727,9 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
|
|
|
726
727
|
width: '100%',
|
|
727
728
|
height: '100%',
|
|
728
729
|
}, 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: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showCicoWaitPanel, showWaitPanelPrimary: showCicoPrimaryProgress, waitPanelTitle: cicoWaitPanelTitle, waitPanelTextPrimary: cicoPrimaryProgressText, waitPanelValuePrimary: cicoPrimaryProgressValue, waitPanelMaxValuePrimary: cicoPrimaryProgressMax, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
|
|
729
|
-
_jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
|
|
730
|
+
_jsxs(_Fragment, { children: [_jsx(PanelDisabledStateHandler, { isBoardDisabled: isBoardDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })] })
|
|
730
731
|
:
|
|
731
|
-
|
|
732
|
+
_jsxs(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmSearchResult', children: [_jsx(PanelDisabledStateHandler, { isBoardDisabled: isBoardDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })] }) }) }) }), renderDcmtOperations] }));
|
|
732
733
|
};
|
|
733
734
|
export default TMSearchResult;
|
|
734
735
|
const TMSearchResultGrid = ({ openInOffice, fromDTD, operationItems, allUsers, inputFocusedItem, allowMultipleSelection = true, showExportForm = false, onFocusedItemChanged, onDownloadDcmtsAsync, onVisibleItemChanged, inputSelectedItems = [], lastUpdateSearchTime, searchResult, onSelectionChanged, onDblClick, showSearchTMDatagrid, updateDataColumnsFromDataGrid, updateDataSourceFromDataGrid, updateSelectedRowKeysFromDataGrid }) => {
|
|
@@ -1238,6 +1239,18 @@ const TMSearchResultSelector = ({ searchResults = [], disableAccordionIfSingleCa
|
|
|
1238
1239
|
return (_jsx(TMAccordionNew, { groups: accordionGroups, selectedItem: selectedResult, onSelectedItemChange: (result) => handleSelect(result) }));
|
|
1239
1240
|
};
|
|
1240
1241
|
//#endregion TMSearchResultSelector
|
|
1242
|
+
const PanelDisabledStateHandler = ({ isBoardDisabled }) => {
|
|
1243
|
+
const { setPanelVisibilityById, setToolbarButtonDisabled, panelVisibility } = useTMPanelManagerContext();
|
|
1244
|
+
useEffect(() => {
|
|
1245
|
+
// Aggiorna lo stato disabled del bottone toolbar
|
|
1246
|
+
setToolbarButtonDisabled('tmBlog', isBoardDisabled);
|
|
1247
|
+
// Chiude il pannello solo se è attualmente visibile e deve essere disabilitato
|
|
1248
|
+
if (isBoardDisabled && panelVisibility['tmBlog']) {
|
|
1249
|
+
setPanelVisibilityById('tmBlog', false);
|
|
1250
|
+
}
|
|
1251
|
+
}, [isBoardDisabled, setPanelVisibilityById, setToolbarButtonDisabled, panelVisibility]);
|
|
1252
|
+
return null;
|
|
1253
|
+
};
|
|
1241
1254
|
const TMDcmtPreviewWrapper = ({ refreshPreviewTrigger, currentDcmt, isVisible }) => {
|
|
1242
1255
|
const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels } = useTMPanelManagerContext();
|
|
1243
1256
|
const deviceType = useDeviceType();
|
|
@@ -87,6 +87,12 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
87
87
|
IsSigned: row.IsSigned ? row.IsSigned.toString() === '1' : false,
|
|
88
88
|
};
|
|
89
89
|
});
|
|
90
|
+
// Sort by LastUpdateTime ascending
|
|
91
|
+
historyFileItems.sort((a, b) => {
|
|
92
|
+
const dateA = a.LastUpdateTime ? new Date(a.LastUpdateTime).getTime() : 0;
|
|
93
|
+
const dateB = b.LastUpdateTime ? new Date(b.LastUpdateTime).getTime() : 0;
|
|
94
|
+
return dateA - dateB;
|
|
95
|
+
});
|
|
90
96
|
return historyFileItems;
|
|
91
97
|
}
|
|
92
98
|
return [];
|