@topconsultnpm/sdkui-react 6.22.0-dev3.36 → 6.22.0-dev3.37

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.
@@ -515,7 +515,6 @@ export const refreshLastSearch = async (qd) => {
515
515
  return;
516
516
  let searchResults = [];
517
517
  try {
518
- TMSpinner.show({ description: `${SDKUI_Localizator.Search} ...`, backgroundColor: 'transparent' });
519
518
  let result = await SDK_Globals.tmSession?.NewSearchEngine().SearchByIDAsync(qd);
520
519
  let dcmtsFound = result?.dcmtsFound ?? 0;
521
520
  if (dcmtsFound <= 0)
@@ -526,9 +525,6 @@ export const refreshLastSearch = async (qd) => {
526
525
  catch (ex) {
527
526
  TMExceptionBoxManager.show({ title: SDKUI_Localizator.Search, exception: ex });
528
527
  }
529
- finally {
530
- TMSpinner.hide();
531
- }
532
528
  return searchResults;
533
529
  };
534
530
  // =============================================================================
@@ -320,6 +320,15 @@ handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, graphome
320
320
  createTaskFromDocumentOrWorkItem();
321
321
  }
322
322
  };
323
+ const handleRefreshClick = onRefreshSearchAsyncDatagrid ? async () => {
324
+ TMSpinner.show({ description: `${SDKUI_Localizator.UpdateInProgress}`, backgroundColor: 'transparent' });
325
+ try {
326
+ await onRefreshSearchAsyncDatagrid();
327
+ }
328
+ finally {
329
+ TMSpinner.hide();
330
+ }
331
+ } : undefined;
323
332
  const { operationItems, selectedDcmtInfos, renderFloatingBar, renderDcmtOperations, features, } = useDocumentOperations({
324
333
  context: context,
325
334
  documentData: {
@@ -333,7 +342,7 @@ handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, graphome
333
342
  searchResult: selectedSearchResult,
334
343
  datagridUtility: {
335
344
  visibleItems,
336
- onRefreshSearchAsyncDatagrid,
345
+ onRefreshSearchAsyncDatagrid: handleRefreshClick,
337
346
  onRefreshDataRowsAsync,
338
347
  refreshFocusedDataRowAsync,
339
348
  onRefreshBlogDatagrid,
@@ -763,17 +772,6 @@ handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, graphome
763
772
  && !openS4TViewer
764
773
  && !showTodoDcmtForm);
765
774
  }, [showToppyForApprove, showToppyDraggableHelpCenter, selectedDocs, showApprovePopup, showRejectPopup, showReAssignPopup, showMoreInfoPopup, editPdfForm, openS4TViewer, showTodoDcmtForm]);
766
- const handleRefreshClick = async () => {
767
- if (!onRefreshSearchAsyncDatagrid)
768
- return;
769
- TMSpinner.show({ description: `${SDKUI_Localizator.UpdateInProgress}`, backgroundColor: 'transparent' });
770
- try {
771
- await onRefreshSearchAsyncDatagrid();
772
- }
773
- finally {
774
- TMSpinner.hide();
775
- }
776
- };
777
775
  const searchResutlToolbar = _jsxs(_Fragment, { children: [context === SearchResultContext.FAVORITES_AND_RECENTS &&
778
776
  _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: handleRefreshClick }), _jsx(TMContextMenu, { items: operationItems, trigger: "left", children: _jsx(IconMenuVertical, { color: 'white', cursor: 'pointer' }) }), showToolbarCloseButton && onClose &&
779
777
  _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconCloseOutline, { color: 'white' }), caption: SDKUI_Localizator.Close, onClick: onClose })] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.22.0-dev3.36",
3
+ "version": "6.22.0-dev3.37",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",