@topconsultnpm/sdkui-react 6.20.0-dev2.1 → 6.20.0-dev2.3

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.
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import styled from 'styled-components';
4
- import { RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, FileFormats } from '@topconsultnpm/sdk-ts';
5
- import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline, SDKUI_Localizator, IconRefresh, IconCache } from '../../../helper';
4
+ import { RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, FileFormats, SDK_Globals } from '@topconsultnpm/sdk-ts';
5
+ import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline, SDKUI_Localizator, IconRefresh, IconCache, dcmtsFileCachePreview, CACHE_SIZE_LIMIT } from '../../../helper';
6
6
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
7
7
  import { FileExtensionHandler, FormModes } from '../../../ts';
8
8
  import { TMColors } from '../../../utils/theme';
@@ -29,7 +29,15 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
29
29
  const [error, setError] = useState('');
30
30
  const [isAbortError, setIsAbortError] = useState(false);
31
31
  const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, getDcmtFileAsync, clearDcmtsFileCache, removeDcmtsFileCache, isDcmtFileInCache } = useDcmtOperations();
32
- const cacheKey = dcmtData ? `${dcmtData.tid}-${dcmtData.did}` : '00';
32
+ const isBasketMode = !!(dcmtData?.btid !== undefined && dcmtData?.bid !== undefined && dcmtData?.bfid !== undefined);
33
+ const getCacheKey = () => {
34
+ if (!dcmtData)
35
+ return '00';
36
+ if (isBasketMode)
37
+ return `basket-${dcmtData.btid}-${dcmtData.bid}-${dcmtData.bfid}`;
38
+ return `${dcmtData.tid}-${dcmtData.did}`;
39
+ };
40
+ const cacheKey = getCacheKey();
33
41
  const [hasLoadedDataOnce, setHasLoadedDataOnce] = useState(false);
34
42
  const [lastLoadedDid, setLastLoadedDid] = useState(undefined);
35
43
  useEffect(() => {
@@ -41,10 +49,10 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
41
49
  setShowPreview(false);
42
50
  return;
43
51
  }
44
- const currentCacheKey = `${dcmtData.tid}-${dcmtData.did}`;
52
+ const currentCacheKey = isBasketMode ? `basket-${dcmtData.btid}-${dcmtData.bid}-${dcmtData.bfid}` : `${dcmtData.tid}-${dcmtData.did}`;
45
53
  const shouldFetch = isVisible && (!hasLoadedDataOnce || currentCacheKey !== lastLoadedDid);
46
54
  if (isDcmtFileInCache(currentCacheKey)) {
47
- loadDocumentWithCache();
55
+ isBasketMode ? loadBasketFile() : loadDocumentWithCache();
48
56
  setShowPreview(true);
49
57
  return;
50
58
  }
@@ -52,7 +60,11 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
52
60
  setDcmtBlob(undefined);
53
61
  setError('');
54
62
  setIsAbortError(false);
55
- if ((extensionHandler(dcmtData.fileExt) !== FileExtensionHandler.NONE) && ((dcmtData.fileSize ?? 0) <= (SDKUI_Globals.userSettings.searchSettings.previewThreshold * 1024))) {
63
+ if (isBasketMode) {
64
+ loadBasketFile();
65
+ setShowPreview(true);
66
+ }
67
+ else if ((extensionHandler(dcmtData.fileExt) !== FileExtensionHandler.NONE) && ((dcmtData.fileSize ?? 0) <= (SDKUI_Globals.userSettings.searchSettings.previewThreshold * 1024))) {
56
68
  loadDocumentWithCache();
57
69
  setShowPreview(true);
58
70
  }
@@ -63,6 +75,46 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
63
75
  setLastLoadedDid(currentCacheKey);
64
76
  }
65
77
  }, [dcmtData?.did, isVisible, hasLoadedDataOnce, lastLoadedDid]);
78
+ const loadBasketFile = async () => {
79
+ try {
80
+ // Check cache first
81
+ if (dcmtsFileCachePreview.has(cacheKey)) {
82
+ setDcmtBlob(dcmtsFileCachePreview.get(cacheKey));
83
+ setIsFromCache(true);
84
+ setError('');
85
+ setIsAbortError(false);
86
+ return;
87
+ }
88
+ await sleep(300);
89
+ const basketEngine = SDK_Globals.tmSession?.NewBasketEngine();
90
+ const file = await basketEngine?.RetrieveFileAsync(dcmtData?.btid, dcmtData?.bid, dcmtData?.bfid, abortController.signal);
91
+ // Store in cache
92
+ if (file) {
93
+ if (dcmtsFileCachePreview.size >= CACHE_SIZE_LIMIT) {
94
+ const oldestKey = dcmtsFileCachePreview.keys().next().value;
95
+ dcmtsFileCachePreview.delete(oldestKey);
96
+ }
97
+ dcmtsFileCachePreview.set(cacheKey, file);
98
+ }
99
+ setDcmtBlob(file);
100
+ setIsFromCache(false);
101
+ setError('');
102
+ setIsAbortError(false);
103
+ }
104
+ catch (ex) {
105
+ const err = ex;
106
+ if (err.name === 'CanceledError') {
107
+ setError('Operazione annullata.');
108
+ setIsAbortError(true);
109
+ ShowAlert({ message: err.message, mode: 'warning', duration: 3000, title: 'Abort' });
110
+ }
111
+ else {
112
+ setError(getExceptionMessage(ex));
113
+ setIsAbortError(false);
114
+ TMExceptionBoxManager.show({ exception: ex });
115
+ }
116
+ }
117
+ };
66
118
  const loadDocumentWithCache = async () => {
67
119
  const rfo = new RetrieveFileOptions();
68
120
  rfo.retrieveReason = DcmtOpers.None;
@@ -94,7 +146,7 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
94
146
  };
95
147
  const titleHandler = () => {
96
148
  let title = 'Anteprima ';
97
- if (!dcmtData?.did)
149
+ if (!dcmtData?.did && !isBasketMode)
98
150
  return title;
99
151
  let extensionInfo;
100
152
  if (dcmtData.fileExt !== null) {
@@ -120,7 +172,7 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
120
172
  setIsAbortError(false);
121
173
  setDcmtBlob(undefined);
122
174
  try {
123
- await loadDocumentWithCache();
175
+ isBasketMode ? await loadBasketFile() : await loadDocumentWithCache();
124
176
  }
125
177
  catch (error) {
126
178
  console.error('Error reopening document:', error);
@@ -132,7 +184,7 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
132
184
  ], [cacheKey, removeDcmtsFileCache, clearDcmtsFileCache, setIsFromCache]);
133
185
  return (_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(TMPanel, { padding: '0', title: titleHandler(), onClose: onClosePanel, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, toolbar: _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [onPrev && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), onNext && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(StyledHeaderIcon, { "$color": TMColors.primaryColor, children: _jsx(ContextMenu, { items: cacheMenuItems, trigger: "left", children: _jsx(IconMenuVertical, {}) }) }), _jsx(StyledHeaderIcon, { onClick: reOpenDcmt, "$color": TMColors.primaryColor, children: _jsx(TMTooltip, { content: SDKUI_Localizator.ReopenDocument, children: _jsx(IconRefresh, {}) }) })] }), children: error
134
186
  ? _jsx(ErrorContent, { error: error, isAbortError: isAbortError, onRetry: reOpenDcmt })
135
- : renderedPreview(dcmtData?.tid, dcmtData?.did, dcmtData?.fileExt, dcmtData?.fileSize, dcmtData?.fileCount, extensionHandler(dcmtData?.fileExt), showPreview, isResizingActive, () => { loadDocumentWithCache(); setShowPreview(true); }, dcmtBlob) }) }));
187
+ : renderedPreview(dcmtData?.tid, dcmtData?.did, dcmtData?.fileExt, dcmtData?.fileSize, dcmtData?.fileCount, extensionHandler(dcmtData?.fileExt), showPreview, isResizingActive, () => { isBasketMode ? loadBasketFile() : loadDocumentWithCache(); setShowPreview(true); }, dcmtBlob, isBasketMode) }) }));
136
188
  };
137
189
  export default TMDcmtPreview;
138
190
  export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
@@ -382,13 +434,13 @@ const ImageViewer = ({ fileBlob, alt = 'Image', className }) => {
382
434
  export const TMNothingToShow = ({ text = '', secondText, fileExt, icon = _jsx(IconPreview, { fontSize: 96 }) }) => {
383
435
  return (_jsx(StyledAnimatedComponentOpacity, { style: { width: '100%', height: '100%' }, children: _jsxs(StyledPanelStatusContainer, { children: [icon, _jsxs(StyledPreviewNotAvailable, { children: [text && _jsx("div", { children: text }), _jsxs("div", { children: [" ", secondText ?? SDKUI_Localizator.PreviewNotAvailable, fileExt && _jsx("b", { children: ` (*.${fileExt})` })] })] })] }) }));
384
436
  };
385
- const renderedPreview = (tid, did, fileExt, fileSize, fileCount, extHandler, showPreview, isResizingActive, onDownloadShowPreviewClick, dcmtBlob) => {
386
- if (!did)
437
+ const renderedPreview = (tid, did, fileExt, fileSize, fileCount, extHandler, showPreview, isResizingActive, onDownloadShowPreviewClick, dcmtBlob, isBasketMode) => {
438
+ if (!isBasketMode && !did)
387
439
  return _jsx(TMNothingToShow, { text: `${SDKUI_Localizator.NoDcmtSelected}.` });
388
- if (fileCount == 0) {
440
+ if (!isBasketMode && fileCount == 0) {
389
441
  return _jsx(TMNothingToShow, { text: SDKUI_Localizator.MetadataOnlyDocument });
390
442
  }
391
- if (fileExt && extHandler === FileExtensionHandler.NONE) {
443
+ if (!isBasketMode && fileExt && extHandler === FileExtensionHandler.NONE) {
392
444
  return _jsx(TMNothingToShow, { fileExt: fileExt });
393
445
  }
394
446
  if (showPreview) {
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
3
3
  import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, DcmtTypeListCacheService, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
5
5
  import { getAllFieldSelectedDcmtsOrFocused, getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
- import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems, IconCustom, isApprovalWorkflowView, SDKUI_Globals, getMoreInfoTasksForDocument, IconInfo, IconCache } from '../../../helper';
6
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems, IconCustom, isApprovalWorkflowView, SDKUI_Globals, getMoreInfoTasksForDocument, IconInfo, IconCache, IconPlatform } from '../../../helper';
7
7
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
8
8
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
9
9
  import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
@@ -101,6 +101,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
101
101
  const [indexingInfoCache, setIndexingInfoCache] = useState(new Map());
102
102
  const [showIndexingInfo, setShowIndexingInfo] = useState(false);
103
103
  const [loadingIndexingInfo, setLoadingIndexingInfo] = useState(false);
104
+ const [openedDrawerItems, setOpenedDrawerItems] = useState(new Set());
104
105
  const floatingBarContainerRef = useRef(null);
105
106
  const [confirmFormat, ConfirmFormatDialog] = useInputCvtFormatDialog();
106
107
  const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
@@ -736,23 +737,49 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
736
737
  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]);
737
738
  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]);
738
739
  const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }, refreshPreviewTrigger), [currentDcmt, refreshPreviewTrigger]);
740
+ useEffect(() => {
741
+ if (!focusedItem)
742
+ return;
743
+ const cacheKey = `${focusedItem.TID}-${focusedItem.DID}`;
744
+ setShowIndexingInfo(openedDrawerItems.has(cacheKey));
745
+ }, [focusedItem, openedDrawerItems]);
739
746
  const handleToggleIndexingInfo = async () => {
740
747
  if (!focusedItem)
741
748
  return;
749
+ const cacheKey = `${focusedItem.TID}-${focusedItem.DID}`;
742
750
  if (showIndexingInfo) {
751
+ setOpenedDrawerItems(prev => {
752
+ const newSet = new Set(prev);
753
+ newSet.delete(cacheKey);
754
+ return newSet;
755
+ });
743
756
  setShowIndexingInfo(false);
744
757
  return;
745
758
  }
746
- const cacheKey = `${focusedItem.TID}-${focusedItem.DID}`;
747
- if (indexingInfoCache.has(cacheKey)) {
748
- setShowIndexingInfo(true);
749
- return;
759
+ setOpenedDrawerItems(prev => new Set(prev).add(cacheKey));
760
+ setShowIndexingInfo(true);
761
+ if (!indexingInfoCache.has(cacheKey)) {
762
+ try {
763
+ setLoadingIndexingInfo(true);
764
+ const msg = await SDK_Globals.tmSession?.NewSearchEngine().FreeSearchGetDcmtInfoAsync(focusedItem.TID, focusedItem.DID);
765
+ setIndexingInfoCache(prev => new Map(prev).set(cacheKey, msg ?? ''));
766
+ }
767
+ catch (e) {
768
+ TMExceptionBoxManager.show({ exception: e });
769
+ }
770
+ finally {
771
+ setLoadingIndexingInfo(false);
772
+ }
750
773
  }
774
+ };
775
+ const handleRefreshIndexingInfo = async () => {
776
+ if (!focusedItem)
777
+ return;
778
+ const cacheKey = `${focusedItem.TID}-${focusedItem.DID}`;
751
779
  try {
752
780
  setLoadingIndexingInfo(true);
753
781
  const msg = await SDK_Globals.tmSession?.NewSearchEngine().FreeSearchGetDcmtInfoAsync(focusedItem.TID, focusedItem.DID);
754
782
  setIndexingInfoCache(prev => new Map(prev).set(cacheKey, msg ?? ''));
755
- setShowIndexingInfo(true);
756
783
  }
757
784
  catch (e) {
758
785
  TMExceptionBoxManager.show({ exception: e });
@@ -780,21 +807,21 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
780
807
  }
781
808
  const cacheKey = `${focusedItem.TID}-${focusedItem.DID}`;
782
809
  const cachedInfo = indexingInfoCache.get(cacheKey);
783
- return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', overflow: 'hidden' }, 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: [_jsxs(StyledLeftContent, { children: [_jsx(IconInfo, {}), _jsx("span", { children: showIndexingInfo ? 'Nascondi info' : SDKUI_Localizator.IndexingInformation })] }), _jsxs(StyledRightContent, { children: [cachedInfo && (_jsx(TMTooltip, { content: "Da cache", children: _jsx(StyledCachedIcon, { children: _jsx(IconCache, {}) }) })), _jsx(StyledChevron, { "$isOpen": showIndexingInfo, children: "\u25BC" })] })] }), loadingIndexingInfo && (_jsxs("div", { style: { marginTop: '10px', color: '#666' }, children: [SDKUI_Localizator.Loading, "..."] })), showIndexingInfo && cachedInfo && !loadingIndexingInfo && (_jsx(StyledIndexingInfoBox, { children: _jsx("div", { dangerouslySetInnerHTML: { __html: cachedInfo } }) }))] })] }));
810
+ 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: [_jsxs(StyledLeftContent, { children: [_jsx(IconInfo, {}), _jsx("span", { children: showIndexingInfo ? 'Nascondi' : SDKUI_Localizator.IndexingInformation })] }), _jsxs(StyledRightContent, { children: [cachedInfo && (_jsxs(_Fragment, { children: [_jsx(TMTooltip, { content: "Aggiorna", children: _jsx(StyledRefreshIcon, { onClick: (e) => { e.stopPropagation(); handleRefreshIndexingInfo(); }, children: _jsx(IconRefresh, {}) }) }), _jsx(TMTooltip, { content: "Da cache", children: _jsx(StyledCachedIcon, { children: _jsx(IconCache, {}) }) })] })), _jsx(StyledChevron, { "$isOpen": showIndexingInfo, children: "\u25BC" })] })] }), loadingIndexingInfo && !cachedInfo && (_jsxs("div", { style: { marginTop: '10px', color: '#666' }, children: [SDKUI_Localizator.Loading, "..."] })), showIndexingInfo && cachedInfo && (_jsxs(StyledIndexingInfoBox, { children: [_jsx("div", { dangerouslySetInnerHTML: { __html: cachedInfo } }), 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, "..."] }))] }))] })] }));
784
811
  }, [selectedSearchResult, focusedItem, indexingInfoCache, showIndexingInfo, loadingIndexingInfo]);
785
812
  const allInitialPanelVisibility = {
786
813
  'tmSearchResult': true,
787
814
  'tmBlog': false,
788
815
  'tmSysMetadata': false,
789
816
  'tmDcmtPreview': false,
790
- // 'tmFullTextSearch': false,
817
+ 'tmFullTextSearch': false,
791
818
  };
792
819
  const initialPanelDimensions = {
793
820
  'tmSearchResult': { width: '25%', height: '100%' },
794
821
  'tmBlog': { width: '25%', height: '100%' },
795
822
  'tmSysMetadata': { width: '25%', height: '100%' },
796
823
  'tmDcmtPreview': { width: '25%', height: '100%' },
797
- // 'tmFullTextSearch': { width: '25%', height: '100%' },
824
+ 'tmFullTextSearch': { width: '25%', height: '100%' },
798
825
  };
799
826
  const initialPanels = useMemo(() => [
800
827
  {
@@ -833,14 +860,14 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
833
860
  contentOptions: { component: tmDcmtPreview },
834
861
  toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
835
862
  },
836
- // ...(context === SearchResultContext.FREE_SEARCH ? [
837
- // {
838
- // id: 'tmFullTextSearch',
839
- // name: 'Ricerca FullText',
840
- // contentOptions: { component: tmFullTextSearch, panelContainer: { title: 'Ricerca FullText', allowMaximize: !isMobile } },
841
- // toolbarOptions: { icon: <IconMenuFullTextSearch fontSize={24} />, visible: true, orderNumber: 5, isActive: allInitialPanelVisibility['tmFullTextSearch'] }
842
- // }
843
- // ] : [])
863
+ ...(context === SearchResultContext.FREE_SEARCH ? [
864
+ {
865
+ id: 'tmFullTextSearch',
866
+ name: SDKUI_Localizator.ResultDetails,
867
+ contentOptions: { component: tmFullTextSearch, panelContainer: { title: SDKUI_Localizator.ResultDetails, allowMaximize: !isMobile } },
868
+ toolbarOptions: { icon: _jsx(IconPlatform, { fontSize: 24 }), visible: true, orderNumber: 5, isActive: allInitialPanelVisibility['tmFullTextSearch'] }
869
+ }
870
+ ] : [])
844
871
  ], [tmSearchResult, tmBlog, tmSysMetadata, tmDcmtPreview, tmFullTextSearch, showToolbarHeader, context, isMobile]);
845
872
  return (_jsxs(StyledMultiViewPanel, { "$isVisible": isVisible, children: [_jsx(StyledMultiViewPanel, { "$isVisible": !isOpenDcmtForm && !isOpenDetails && !isOpenMaster, style: {
846
873
  display: 'flex',
@@ -1413,6 +1440,23 @@ const StyledCachedIcon = styled.div `
1413
1440
  color: #4CAF50;
1414
1441
  }
1415
1442
  `;
1443
+ const StyledRefreshIcon = styled.div `
1444
+ display: flex;
1445
+ align-items: center;
1446
+ justify-content: center;
1447
+ color: #2196F3;
1448
+ font-size: 16px;
1449
+ cursor: pointer;
1450
+ transition: transform 0.2s ease;
1451
+
1452
+ &:hover {
1453
+ transform: rotate(180deg);
1454
+ }
1455
+
1456
+ svg {
1457
+ color: #2196F3;
1458
+ }
1459
+ `;
1416
1460
  const StyledChevron = styled.span `
1417
1461
  transition: transform 0.2s ease;
1418
1462
  transform: ${props => props.$isOpen ? 'rotate(180deg)' : 'rotate(0deg)'};
@@ -1420,6 +1464,7 @@ const StyledChevron = styled.span `
1420
1464
  font-size: 12px;
1421
1465
  `;
1422
1466
  const StyledIndexingInfoBox = styled.div `
1467
+ position: relative;
1423
1468
  background: white;
1424
1469
  border: 1px solid #e0e0e0;
1425
1470
  border-radius: 6px;
package/lib/ts/types.d.ts CHANGED
@@ -297,6 +297,9 @@ export interface ITMDcmt {
297
297
  fileExt?: string;
298
298
  fileSize?: number;
299
299
  fileCount?: number;
300
+ btid?: number;
301
+ bid?: number;
302
+ bfid?: number;
300
303
  }
301
304
  export declare enum moduleTypes {
302
305
  SDK = "SDK",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev2.1",
3
+ "version": "6.20.0-dev2.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1",