@topconsultnpm/sdkui-react 6.20.0-dev1.32 → 6.20.0-dev1.33

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.
@@ -728,11 +728,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
728
728
  const customButtonsItems = customButtonsLayout.customButtons
729
729
  .filter((customButton) => customButton.isForUpdate && customButton.isForUpdate > 0)
730
730
  .map((customButton) => ({
731
- icon: TMImageLibrary({ imageID: customButton.glyphID, showPath: false }),
731
+ icon: TMImageLibrary({ imageID: customButton.glyphID }),
732
732
  name: customButton.title || 'Bottone personalizzato',
733
733
  onClick: () => setCustomButton(customButton)
734
734
  }));
735
- items.push({
735
+ customButtonsItems && customButtonsItems.length > 0 && items.push({
736
736
  icon: _jsx(IconCheck, {}),
737
737
  name: SDKUI_Localizator.CustomButtons,
738
738
  submenu: customButtonsItems
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
3
3
  import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, 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, IconCheck, svgToString, TMImageLibrary, convertSearchResultDescriptorToFileItems } from '../../../helper';
6
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, IconCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems } from '../../../helper';
7
7
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
8
8
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
9
9
  import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
@@ -360,15 +360,15 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
360
360
  const customButtonMenuItems = () => {
361
361
  const customButtonsItems = customButtonsLayout?.customButtons?.filter((customButton) => customButton.isForSearchResult && customButton.isForSearchResult > 0)
362
362
  .map((customButton) => ({
363
- icon: _jsx("div", { dangerouslySetInnerHTML: { __html: svgToString(TMImageLibrary({ imageID: customButton.glyphID, showPath: false })) } }),
363
+ icon: TMImageLibrary({ imageID: customButton.glyphID }),
364
364
  name: customButton.title || 'Bottone personalizzato',
365
365
  onClick: () => setCustomButton(customButton)
366
366
  }));
367
- return {
367
+ return customButtonsItems && customButtonsItems.length > 0 ? {
368
368
  icon: _jsx(IconCheck, {}),
369
369
  name: SDKUI_Localizator.CustomButtons,
370
370
  submenu: customButtonsItems
371
- };
371
+ } : {};
372
372
  };
373
373
  const onContextMenuPreparing = (e) => {
374
374
  if (e === undefined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev1.32",
3
+ "version": "6.20.0-dev1.33",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",