@topconsultnpm/sdkui-react-beta 6.13.66 → 6.13.68

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,18 +1,19 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { getListMaxItems } from '../../helper';
2
+ import { getListMaxItems, SDKUI_Localizator } from '../../helper';
3
+ import { TMColors } from '../../utils/theme';
3
4
  import TMButton from './TMButton';
4
5
  import { useDeviceType, DeviceType } from './TMDeviceProvider';
5
6
  const TMShowAllOrMaxItemsButton = ({ showAll, dataSourceLength, onClick }) => {
6
7
  const deviceType = useDeviceType();
7
8
  let maxItems = getListMaxItems(deviceType ?? DeviceType.DESKTOP);
8
- const captionText = showAll ? "Mostra meno" : `Mostra tutti`;
9
+ const captionText = showAll ? SDKUI_Localizator.ShowLess : SDKUI_Localizator.ShowAll;
9
10
  const isMobile = deviceType === DeviceType.MOBILE;
10
11
  return (_jsx(_Fragment, { children: isMobile ?
11
12
  _jsx(TMButton, { elementStyle: { position: 'absolute', right: '10px' }, btnStyle: 'icon', caption: captionText, icon: showAll ?
12
- _jsx("div", { style: { backgroundColor: '#4A96D2', minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `-${dataSourceLength - maxItems}` }) }) :
13
- _jsx("div", { style: { backgroundColor: '#4A96D2', minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `+${dataSourceLength - maxItems}` }) }), onClick: () => onClick?.() })
13
+ _jsx("div", { style: { backgroundColor: TMColors.button_primary, minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `-${dataSourceLength - maxItems}` }) }) :
14
+ _jsx("div", { style: { backgroundColor: TMColors.button_primary, minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `+${dataSourceLength - maxItems}` }) }), onClick: () => onClick?.() })
14
15
  :
15
- _jsx(TMButton, { elementStyle: { position: 'absolute', right: '10px' }, width: 'auto', btnStyle: 'advanced', advancedColor: '#4A96D2', caption: captionText, showTooltip: false, icon: showAll
16
+ _jsx(TMButton, { elementStyle: { position: 'absolute', right: '10px' }, width: 'auto', btnStyle: 'advanced', advancedColor: TMColors.button_primary, caption: captionText, showTooltip: false, icon: showAll
16
17
  ? _jsx("p", { style: { color: 'white' }, children: `-${dataSourceLength - maxItems}` })
17
18
  : _jsx("p", { style: { color: 'white' }, children: `+${dataSourceLength - maxItems}` }), onClick: () => onClick?.() }) }));
18
19
  };
@@ -56,7 +56,7 @@ const TMArchive = ({ inputTID }) => {
56
56
  const tmFormElement = useMemo(() => currentTID ?
57
57
  _jsx(TMDcmtForm, { TID: currentTID, DID: undefined, groupId: 'tmForm', layoutMode: LayoutModes.Ark, showPreview: deviceType !== DeviceType.MOBILE, onClose: deviceType === DeviceType.MOBILE ? () => setCurrentTID(undefined) : undefined, onSaveRecents: (TIDs) => setMruTIDs(TIDs), showDcmtFormSidebar: false })
58
58
  :
59
- _jsx(TMPanel, { title: 'Archiviazione', children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsxs(StyledToppyTextContainer, { children: [" ", _jsxs(StyledToppyText, { children: [" ", 'Selezionare un tipo documento', " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }) }), [currentTID, deviceType, mruTIDs]);
59
+ _jsx(TMPanel, { title: 'Archiviazione', children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsxs(StyledToppyTextContainer, { children: [" ", _jsxs(StyledToppyText, { children: [" ", SDKUI_Localizator.DcmtTypeSelect, " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }) }), [currentTID, deviceType, mruTIDs]);
60
60
  const allInitialPanelVisibility = {
61
61
  'tmTreeSelector': true,
62
62
  'tmRecentsManager': true,
@@ -2,7 +2,7 @@ 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
4
  import { RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, FileFormats } from '@topconsultnpm/sdk-ts-beta';
5
- import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline } from '../../../helper';
5
+ import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline, SDKUI_Localizator } from '../../../helper';
6
6
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
7
7
  import { FileExtensionHandler, FormModes } from '../../../ts';
8
8
  import { TMColors } from '../../../utils/theme';
@@ -129,7 +129,7 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
129
129
  return () => { };
130
130
  }, [fileBlob]);
131
131
  if (!fileBlob) {
132
- return _jsx("div", { children: "Caricamento file..." });
132
+ return _jsx("div", { children: `${SDKUI_Localizator.FileUpload}...` });
133
133
  }
134
134
  if (fileBlob.type.includes('image')) {
135
135
  return (_jsx(ImageViewer, { fileBlob: fileBlob, alt: '' }));
@@ -73,7 +73,7 @@ const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload
73
73
  _jsx("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: _jsxs(UploadContainer, { ref: uploaderRef, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, "$isRequired": isRequired, children: [_jsx("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: _jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }) }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? 'Clicca per sfogliare il tuo file' : 'Trascina il tuo file qui o fai doppio click per sfogliarlo' }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] }) }) :
74
74
  _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 10, width: '100%', height: '100%' }, children: [_jsxs("div", { style: { backgroundColor: 'white', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("p", { children: "File name:" }), _jsxs("div", { style: { fontWeight: 'bold' }, children: [fileName, " ", _jsxs("span", { children: [" ", ` (${formatBytes(fileSize)})`, " "] })] })] }), uploadedFile && _jsx(TMButton, { btnStyle: 'icon', color: 'error', caption: 'Pulisci', onClick: clearFile, icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
75
75
  _jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", 'Anteprima non disponibile.', fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
76
- return (_jsx(TMPanel, { title: 'Caricamento File', onBack: deviceType === DeviceType.MOBILE ? () => onClose?.() : undefined, toolbar: deviceType !== DeviceType.MOBILE ? _jsx(StyledHeaderIcon, { onClick: onClose, "$color": 'white', children: _jsx(TMTooltip, { content: SDKUI_Localizator.Close, children: _jsx(IconCloseOutline, {}) }) }) : undefined, children: _jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), content] }) }));
76
+ return (_jsx(TMPanel, { title: SDKUI_Localizator.FileUpload, onBack: deviceType === DeviceType.MOBILE ? () => onClose?.() : undefined, toolbar: deviceType !== DeviceType.MOBILE ? _jsx(StyledHeaderIcon, { onClick: onClose, "$color": 'white', children: _jsx(TMTooltip, { content: SDKUI_Localizator.Close, children: _jsx(IconCloseOutline, {}) }) }) : undefined, children: _jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), content] }) }));
77
77
  };
78
78
  const UploadContainer = styled.div `
79
79
  position: relative;
@@ -7,7 +7,6 @@ import ContextMenu from 'devextreme-react/cjs/context-menu';
7
7
  import { SDKUI_Localizator, Globalization, svgToString, IconStar, IconDelete, IconDashboard, IconSavedQuery, IconApply, IconInfo, IconCloseOutline } from '../../../helper';
8
8
  import { TMColors } from '../../../utils/theme';
9
9
  import ShowAlert from '../../base/TMAlert';
10
- import TMButton from '../../base/TMButton';
11
10
  import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
12
11
  import TMSpinner from '../../base/TMSpinner';
13
12
  import TMTooltip from '../../base/TMTooltip';
@@ -15,6 +14,7 @@ import { TMSearchBar } from '../../sidebar/TMHeader';
15
14
  import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
16
15
  import { StyledDivHorizontal, StyledOffCanvasPanel } from '../../base/Styled';
17
16
  import { useOutsideClick } from '../../../hooks/useOutsideClick';
17
+ import TMShowAllOrMaxItemsButton from '../../base/TMShowAllOrMaxItemsButton';
18
18
  const StyledSqdItem = styled.div `
19
19
  display: flex;
20
20
  flex-direction: column;
@@ -177,6 +177,7 @@ const TMSavedQuerySelector = React.memo(({ items, selectedId, allowShowSearch =
177
177
  display: 'flex',
178
178
  flexDirection: 'column',
179
179
  width: '100%',
180
+ height: 'calc(100% - 150px)',
180
181
  padding: '5px 10px',
181
182
  gap: '3px',
182
183
  overflow: 'auto'
@@ -214,8 +215,6 @@ const TMSavedQuerySelector = React.memo(({ items, selectedId, allowShowSearch =
214
215
  fontSize: '1rem',
215
216
  fontWeight: 'bold'
216
217
  }, children: _jsx(IconApply, { fontSize: 24, color: 'green' }) }), _jsx(SavedQueryContexMenu, { sqd: sqd, manageDefault: manageDefault, isMobile: isMobile, setInfoSQD: setInfoSQD, setDefaultAsync: () => setDefaultSQDAsync(sqd), deleteAsync: () => deleteSQDAsync(sqd), favManageAsync: () => favManageSQDAsync(sqd) })] }, sqd.id))) }), dataSource.length > initialSQDsMaxItems && searchText.length <= 0 &&
217
- _jsx(TMButton, { elementStyle: { display: 'flex', justifyContent: 'flex-end', padding: '10px' }, btnStyle: 'icon', caption: showAllRoot ? "Mostra meno" : `Mostra tutte le ricerche (+${dataSource.length - initialSQDsMaxItems})`, icon: showAllRoot ?
218
- _jsx("div", { style: { backgroundColor: TMColors.primaryColor, minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `-${dataSource.length - initialSQDsMaxItems}` }) }) :
219
- _jsx("div", { style: { backgroundColor: TMColors.primaryColor, minWidth: '30px', minHeight: '30px', borderRadius: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("p", { style: { color: 'white' }, children: `+${dataSource.length - initialSQDsMaxItems}` }) }), onClick: () => setShowAllRoot(!showAllRoot) }), _jsxs(StyledOffCanvasPanel, { ref: panelRef, "$isOpen": isMobile && infoSQD !== undefined, children: [_jsxs(StyledDivHorizontal, { style: { gap: 10, padding: '10px 8px', width: '100%', alignItems: 'center' }, children: [_jsx("p", { style: { fontSize: '1.1rem', fontWeight: 'bold' }, children: `${SDK_Localizator.SavedQuery} - ${SDKUI_Localizator.About}` }), _jsx(IconCloseOutline, { style: { marginLeft: 'auto', cursor: 'pointer' }, onClick: () => setInfoSQD(undefined) })] }), getTooltipBySqd(infoSQD)] })] }));
218
+ _jsx("div", { style: { display: 'flex', justifyContent: 'flex-end', padding: '10px', position: 'relative' }, children: _jsx(TMShowAllOrMaxItemsButton, { showAll: showAllRoot, dataSourceLength: dataSource.length, onClick: () => { setShowAllRoot(!showAllRoot); } }) }), _jsxs(StyledOffCanvasPanel, { ref: panelRef, "$isOpen": isMobile && infoSQD !== undefined, children: [_jsxs(StyledDivHorizontal, { style: { gap: 10, padding: '10px 8px', width: '100%', alignItems: 'center' }, children: [_jsx("p", { style: { fontSize: '1.1rem', fontWeight: 'bold' }, children: `${SDK_Localizator.SavedQuery} - ${SDKUI_Localizator.About}` }), _jsx(IconCloseOutline, { style: { marginLeft: 'auto', cursor: 'pointer' }, onClick: () => setInfoSQD(undefined) })] }), getTooltipBySqd(infoSQD)] })] }));
220
219
  });
221
220
  export default TMSavedQuerySelector;
@@ -102,6 +102,20 @@ const TMSearchQueryPanel = ({ fromDTD, isExpertMode = SDKUI_Globals.userSettings
102
102
  }
103
103
  }
104
104
  };
105
+ useEffect(() => {
106
+ if (!qd)
107
+ return;
108
+ const handleKeyDown = async (e) => {
109
+ if (e.key === 'Enter') {
110
+ e.preventDefault();
111
+ await searchAsync(qd, showAdvancedSearch);
112
+ }
113
+ };
114
+ window.addEventListener('keydown', handleKeyDown);
115
+ return () => {
116
+ window.removeEventListener('keydown', handleKeyDown);
117
+ };
118
+ }, [qd, showAdvancedSearch]);
105
119
  const isMobile = deviceType === DeviceType.MOBILE;
106
120
  return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: !isMobile, onMaximize: isMobile ? undefined : onMaximizePanel, onHeaderDoubleClick: isMobile ? undefined : onMaximizePanel, onBack: onBack, keepActiveState: keepStatePanelIsActive, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
107
121
  _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, { color: 'white' }), showTooltip: false }), items: [
@@ -198,7 +212,7 @@ const TMSearchQueryPanel = ({ fromDTD, isExpertMode = SDKUI_Globals.userSettings
198
212
  setQd({ ...qd, orderBy: newOrderBy });
199
213
  } })] })
200
214
  :
201
- _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsxs(StyledToppyTextContainer, { children: [" ", _jsxs(StyledToppyText, { children: [" ", 'Selezionare un tipo documento o ricerca rapida', " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }), showSqdForm &&
215
+ _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsxs(StyledToppyTextContainer, { children: [" ", _jsxs(StyledToppyText, { children: [" ", SDKUI_Localizator.DcmtTypeSelectOrQuickSearch, " "] }), " "] }), " "] }), _jsxs(TMLayoutItem, { width: 'max-content', height: 'max-content', children: [" ", _jsx("img", { src: Logo, width: 120, alt: '' }), " "] })] }), showSqdForm &&
202
216
  _jsx(StyledModalContainer, { style: { backgroundColor: `${TMColors.backgroundColorHeader}12` }, children: _jsx(TMSavedQueryForm, { height: '50%', width: '50%', id: formModeSqdForm === FormModes.Create ? -1 : SQD?.id, title: 'Ricerca rapida', formMode: formModeSqdForm, showBackButton: true, qd: qd, isAdvancedSearch: showAdvancedSearch, isModal: false, onClose: () => { setShowSqdForm(false); }, onSaved: onSqdSaved }) })] }), showDistinctValuesPanel &&
203
217
  _jsx(TMDistinctValues, { isModal: true, tid: focusedTidMid?.tid, mid: focusedTidMid?.mid, separator: ',', onClosePanelCallback: () => setShowDistinctValuesPanel(false), onSelectionChanged: (e) => {
204
218
  if (!e)
@@ -4,13 +4,12 @@ import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, M
4
4
  import styled from 'styled-components';
5
5
  import { getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
6
  import { ContextMenu } from 'devextreme-react';
7
- import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, IconSignature, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues, SDKUI_Globals, IconSearchCheck } from '../../../helper';
7
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues, SDKUI_Globals, IconSearchCheck } from '../../../helper';
8
8
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
9
9
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
10
10
  import { DcmtOperationTypes, FormModes, SearchResultContext, DownloadTypes } from '../../../ts';
11
11
  import { TMColors } from '../../../utils/theme';
12
12
  import { StyledModalContainer, StyledBadge, StyledMultiViewPanel } from '../../base/Styled';
13
- import ShowAlert from '../../base/TMAlert';
14
13
  import TMButton from '../../base/TMButton';
15
14
  import TMDataGrid, { TMDataGridPageSize } from '../../base/TMDataGrid';
16
15
  import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
@@ -342,7 +341,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
342
341
  , {
343
342
  // allowMultipleSelection={allowMultipleSelection}
344
343
  inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
345
- _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
344
+ _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
346
345
  setIsOpenBatchUpdate(false);
347
346
  }, onSavedCallbackAsync: async () => {
348
347
  setIsOpenBatchUpdate(false);
@@ -14,6 +14,7 @@ export declare class UserSettings {
14
14
  fullTextSettings: FullTextSettings;
15
15
  searchSettings: SearchSettings;
16
16
  themeSettings: ThemeSettings;
17
+ constructor(skipCssUpdate?: boolean);
17
18
  /** Load settings from local storage or other sources */
18
19
  static LoadSettings(userID: number | undefined, archiveID: string | undefined): UserSettings;
19
20
  /** Save settings to local storage or other sources */
@@ -29,7 +30,7 @@ export declare class ThemeSettings {
29
30
  fontSize: string;
30
31
  gridSettings: DataGridSettings;
31
32
  gutters: number;
32
- constructor();
33
+ constructor(skipCssUpdate?: boolean);
33
34
  }
34
35
  export declare class SearchSettings {
35
36
  invoiceRetrieveFormat: InvoiceRetrieveFormats;
@@ -8,7 +8,7 @@ export const clearDcmtsFileCache = () => { dcmtsFileCachePreview.clear(); dcmtsF
8
8
  export const removeDcmtsFileCache = (key) => { dcmtsFileCachePreview.delete(key); dcmtsFileCacheDownload.delete(key); };
9
9
  export const isDcmtFileInCache = (key) => dcmtsFileCachePreview.has(key);
10
10
  export class UserSettings {
11
- constructor() {
11
+ constructor(skipCssUpdate = false) {
12
12
  this.archiveID = undefined;
13
13
  this.landingPage = 'dashboard'; // TODO: se usiamo LandingPages errore sulle dipendenze.
14
14
  this.userID = undefined;
@@ -16,7 +16,8 @@ export class UserSettings {
16
16
  this.archivingSettings = new ArchivingSettings();
17
17
  this.fullTextSettings = new FullTextSettings();
18
18
  this.searchSettings = new SearchSettings();
19
- this.themeSettings = new ThemeSettings();
19
+ this.themeSettings = new ThemeSettings(true);
20
+ this.themeSettings = new ThemeSettings(skipCssUpdate);
20
21
  }
21
22
  /** Load settings from local storage or other sources */
22
23
  static LoadSettings(userID, archiveID) {
@@ -26,7 +27,7 @@ export class UserSettings {
26
27
  // Load settings from local storage
27
28
  const loadedSettings = LocalStorageService.getItem(`userSettings_${archiveID}_${userID}`);
28
29
  // Merge loaded settings with default settings
29
- const defaultSettings = new UserSettings();
30
+ const defaultSettings = new UserSettings(true);
30
31
  const settings = Object.assign(defaultSettings, loadedSettings);
31
32
  // Ensure userID and archiveID are set
32
33
  settings.userID = userID;
@@ -44,7 +45,7 @@ export class UserSettings {
44
45
  if (!settings.userID || !settings.archiveID) {
45
46
  throw new Error('User ID and Archive ID are required to save settings.');
46
47
  }
47
- const defaultSettings = new UserSettings();
48
+ const defaultSettings = new UserSettings(true);
48
49
  const filteredSettings = Object.fromEntries(Object.entries(settings).filter(([key, value]) => {
49
50
  const defaultValue = defaultSettings[key];
50
51
  return JSON.stringify(value) !== JSON.stringify(defaultValue);
@@ -61,12 +62,14 @@ export class DataGridSettings {
61
62
  }
62
63
  }
63
64
  export class ThemeSettings {
64
- constructor() {
65
+ constructor(skipCssUpdate = false) {
65
66
  this.fontSize = FontSize.defaultFontSizeInPixel;
66
67
  this.gridSettings = new DataGridSettings();
67
68
  this.gutters = Gutters.getGutters();
68
69
  // Automatically update the CSS variable for font size
69
- document.documentElement.style.setProperty('--base-font-size', this.fontSize);
70
+ if (!skipCssUpdate) {
71
+ document.documentElement.style.setProperty('--base-font-size', this.fontSize);
72
+ }
70
73
  }
71
74
  }
72
75
  export class SearchSettings {
@@ -113,7 +116,7 @@ export class AdvancedSettings {
113
116
  }
114
117
  export class SDKUI_Globals {
115
118
  }
116
- SDKUI_Globals.userSettings = new UserSettings();
119
+ SDKUI_Globals.userSettings = new UserSettings(true);
117
120
  function createProxy(obj, saveCallback, rootObj) {
118
121
  const root = rootObj || obj; // Use the provided root object or default to the current object
119
122
  return new Proxy(obj, {
@@ -88,6 +88,7 @@ export declare class SDKUI_Localizator {
88
88
  static get DcmtType(): "Dokumententyp" | "Document type" | "Tipo de documento" | "Type de document" | "Tipo documento";
89
89
  static get DcmtTypesSelected(): "Ausgewählte Dokumenttypen" | "Selected document types" | "Tipos de documentos seleccionados" | "Types de documents sélectionnés" | "Tipos de documentos selecionados" | "Tipi documento selezionati";
90
90
  static get DcmtTypeSelect(): "Wählen Sie einen Dokumenttyp aus" | "Select a document type" | "Seleccione un tipo de documento" | "Sélectionnez un type de document" | "Selecione um tipo de documento" | "Selezionare un tipo documento";
91
+ static get DcmtTypeSelectOrQuickSearch(): "Wählen Sie einen Dokumenttyp oder eine Schnellsuche aus" | "Select a document type or quick search" | "Seleccione un tipo de documento o búsqueda rápida" | "Sélectionnez un type de document ou une recherche rapide" | "Selecione um tipo de documento ou pesquisa rápida" | "Selezionare un tipo documento o ricerca rapida";
91
92
  static get Default(): "Standard" | "Default" | "Predeterminado" | "Defaultão";
92
93
  static get Details(): "Einzelheiten" | "Details" | "Detalles" | "Détails" | "detalhes" | "Dettagli";
93
94
  static get Delete(): "Löschen" | "Delete" | "Borrar" | "Supprimer" | "Excluir" | "Elimina";
@@ -146,6 +147,7 @@ export declare class SDKUI_Localizator {
146
147
  static get FEFormats_SDI_PDF(): "SdI Style Sheet (PDF)" | "Hoja de estilo SdI (PDF)" | "Feuille de style SdI (PDF)" | "Folha de estilo SdI (PDF)" | "Foglio di stile SdI (PDF)";
147
148
  static get FileManager_QuestionAlreadyExistsFile(): "Ziel enthält bereits eine Datei mit der Bezeichnung {{0}}, ersetzen durch die neue Datei?" | "The destination already contains a file called {{0}}, replace with the new file?" | "El destino ya contiene un archivo llamado {{0}}, ¿sustituir con el nuevo archivo?" | "La destination contient déjà un fichier appelé {{0}}, remplacer avec le nouveau fichier?" | "O destino já contém um ficheiro chamado {{0}}, substitua com o novo arquivo?" | "La destinazione contiene già un file denominato {{0}}, sostituire con il nuovo file?";
148
149
  static get FileManager_QuestionAlreadyExistsFiles(): "Ziel enthält {{0}} Datei mit dem gleichen Namen, ersetzen durch neue Dateien?" | "Destination contains {{0}} files with the same name, replace with new files?" | "El destino contiene {{0}} archivos con el mismo nombre, ¿sustituir con los nuevos archivos?" | "La destination contient {{0}} fichier portant le même nom, remplacer avec les nouveaux fichiers?" | "O destino contém ficheiros {{0}} com o mesmo nome, substitua por novos arquivos?" | "La destinazione contiene {{0}} file con lo stesso nome, sostituire con i nuovi file?";
150
+ static get FileUpload(): "Datei hochladen" | "File upload" | "Carga de archivo" | "Téléchargement de fichier" | "Carregamento de arquivo" | "Caricamento File";
149
151
  static get FolderExist(): "Ordner existiert bereits. Bitte versuchen Sie einen anderen Namen" | "Folder already exists. Please try another name" | "La carpeta ya existe. Intente con otro nombre." | "Le dossier existe déjà. Veuillez essayer un autre nom" | "A pasta já existe. Por favor tente outro nome" | "La cartella esiste già. Prova un altro nome";
150
152
  static get FolderIsEmpty(): string;
151
153
  static get ForgetPassword(): "Passwort vergessen" | "Forgot password" | "Has olvidado tu contraseña" | "Mot de passe oublié" | "Esqueceu sua senha" | "Password dimenticata";
@@ -355,6 +357,8 @@ export declare class SDKUI_Localizator {
355
357
  static get SharingModes_Public(): "Öffentlich" | "Public" | "Pública" | "Público" | "Pubblica";
356
358
  static get SharingModes_Shared(): "Geteilt" | "Shared" | "Compartida" | "Partagé" | "Partilhada" | "Condivisa";
357
359
  static get Shortcuts(): "Tastenkombinationen" | "Shortcuts" | "Atajos" | "Raccourcis" | "Atalhos" | "Scorciatoie";
360
+ static get ShowAll(): "Alle anzeigen" | "Show all" | "Mostrar todo" | "Tout afficher" | "Mostrar tudo" | "Mostra tutti";
361
+ static get ShowLess(): "Weniger anzeigen" | "Show less" | "Mostrar menos" | "Afficher moins" | "Mostra meno";
358
362
  static get Show_CompleteName(): "Vollständigen Namen anzeigen" | "View full name" | "Mostrar nombre completo" | "Afficher le nom complet" | "Mostrar nome completo" | "Visualizza nome completo";
359
363
  static get ShowDetails(): "Details anzeigen" | "Show details" | "Mostrar detalles" | "Afficher les détails" | "Mostrar detalhes" | "Mostra dettagli";
360
364
  static get ShowFilters(): string;
@@ -829,6 +829,16 @@ export class SDKUI_Localizator {
829
829
  default: return "Selezionare un tipo documento";
830
830
  }
831
831
  }
832
+ static get DcmtTypeSelectOrQuickSearch() {
833
+ switch (this._cultureID) {
834
+ case CultureIDs.De_DE: return "Wählen Sie einen Dokumenttyp oder eine Schnellsuche aus";
835
+ case CultureIDs.En_US: return "Select a document type or quick search";
836
+ case CultureIDs.Es_ES: return "Seleccione un tipo de documento o búsqueda rápida";
837
+ case CultureIDs.Fr_FR: return "Sélectionnez un type de document ou une recherche rapide";
838
+ case CultureIDs.Pt_PT: return "Selecione um tipo de documento ou pesquisa rápida";
839
+ default: return "Selezionare un tipo documento o ricerca rapida";
840
+ }
841
+ }
832
842
  static get Default() {
833
843
  switch (this._cultureID) {
834
844
  case CultureIDs.De_DE: return "Standard";
@@ -1421,6 +1431,16 @@ export class SDKUI_Localizator {
1421
1431
  default: return "La destinazione contiene {{0}} file con lo stesso nome, sostituire con i nuovi file?";
1422
1432
  }
1423
1433
  }
1434
+ static get FileUpload() {
1435
+ switch (this._cultureID) {
1436
+ case CultureIDs.De_DE: return "Datei hochladen";
1437
+ case CultureIDs.En_US: return "File upload";
1438
+ case CultureIDs.Es_ES: return "Carga de archivo";
1439
+ case CultureIDs.Fr_FR: return "Téléchargement de fichier";
1440
+ case CultureIDs.Pt_PT: return "Carregamento de arquivo";
1441
+ default: return "Caricamento File";
1442
+ }
1443
+ }
1424
1444
  static get FolderExist() {
1425
1445
  switch (this._cultureID) {
1426
1446
  case CultureIDs.De_DE: return "Ordner existiert bereits. Bitte versuchen Sie einen anderen Namen";
@@ -3508,6 +3528,26 @@ export class SDKUI_Localizator {
3508
3528
  default: return "Scorciatoie";
3509
3529
  }
3510
3530
  }
3531
+ static get ShowAll() {
3532
+ switch (this._cultureID) {
3533
+ case CultureIDs.De_DE: return "Alle anzeigen";
3534
+ case CultureIDs.En_US: return "Show all";
3535
+ case CultureIDs.Es_ES: return "Mostrar todo";
3536
+ case CultureIDs.Fr_FR: return "Tout afficher";
3537
+ case CultureIDs.Pt_PT: return "Mostrar tudo";
3538
+ default: return "Mostra tutti";
3539
+ }
3540
+ }
3541
+ static get ShowLess() {
3542
+ switch (this._cultureID) {
3543
+ case CultureIDs.De_DE: return "Weniger anzeigen";
3544
+ case CultureIDs.En_US: return "Show less";
3545
+ case CultureIDs.Es_ES: return "Mostrar menos";
3546
+ case CultureIDs.Fr_FR: return "Afficher moins";
3547
+ case CultureIDs.Pt_PT: return "Mostrar menos";
3548
+ default: return "Mostra meno";
3549
+ }
3550
+ }
3511
3551
  static get Show_CompleteName() {
3512
3552
  switch (this._cultureID) {
3513
3553
  case CultureIDs.De_DE: return "Vollständigen Namen anzeigen";
@@ -2,7 +2,7 @@ import { useState } from 'react';
2
2
  import { LocalizeDcmtOperationTypes } from '../helper/Enum_Localizator';
3
3
  import { SDK_Globals, RetrieveFileOptions, DcmtOpers, ResultTypes, RecentCategories, MetadataDataTypes, MetadataDataDomains, DataListCacheService } from '@topconsultnpm/sdk-ts-beta';
4
4
  import { ShowAlert, TMResultManager, FormulaHelper, TMExceptionBoxManager, TMSpinner } from '../components';
5
- import { Globalization, getExceptionMessage, dialogConfirmOperation, extensionHandler, downloadBase64File, SDKUI_Globals, dcmtsFileCacheDownload, CACHE_SIZE_LIMIT, clearDcmtsFileCache, dcmtsFileCachePreview, isDcmtFileInCache, removeDcmtsFileCache } from '../helper';
5
+ import { Globalization, getExceptionMessage, dialogConfirmOperation, extensionHandler, downloadBase64File, SDKUI_Globals, dcmtsFileCacheDownload, CACHE_SIZE_LIMIT, clearDcmtsFileCache, dcmtsFileCachePreview, isDcmtFileInCache, removeDcmtsFileCache, SDKUI_Localizator } from '../helper';
6
6
  import { DcmtOperationTypes, DownloadTypes, FileExtensionHandler } from '../ts';
7
7
  import { useFileDialog } from './useInputDialog';
8
8
  import { isXMLFileExt } from '../helper/dcmtsHelper';
@@ -189,7 +189,7 @@ export function useDcmtOperations() {
189
189
  break;
190
190
  }
191
191
  try {
192
- setWaitPanelTextPrimary(`Caricamento file ${i + 1} di ${inputDcmts.length}`);
192
+ setWaitPanelTextPrimary(`${SDKUI_Localizator.FileUpload} ${i + 1} di ${inputDcmts.length}`);
193
193
  const cacheKey = `${inputDcmts[i].TID}-${inputDcmts[i].DID}`;
194
194
  if (dcmtsFileCachePreview.has(cacheKey))
195
195
  removeDcmtsFileCache(cacheKey);
@@ -48,6 +48,7 @@ declare class TMColors {
48
48
  static get colorHeader(): string | undefined;
49
49
  static set colorHeader(theColorHeader: string | undefined);
50
50
  static separator: string;
51
+ static button_primary: string;
51
52
  }
52
53
  declare class FontSize {
53
54
  static defaultFontSize: string;
@@ -48,6 +48,7 @@ TMColors.card_background = "#CAD9EB";
48
48
  TMColors._backgroundColorHeader = "#CAD9EB";
49
49
  TMColors._colorHeader = "black";
50
50
  TMColors.separator = "#00A99D";
51
+ TMColors.button_primary = '#4A96D2';
51
52
  class FontSize {
52
53
  }
53
54
  FontSize.defaultFontSize = '1rem';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.13.66",
3
+ "version": "6.13.68",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -42,7 +42,7 @@
42
42
  "lib"
43
43
  ],
44
44
  "dependencies": {
45
- "@topconsultnpm/sdk-ts-beta": "^6.13.8",
45
+ "@topconsultnpm/sdk-ts-beta": "6.13.8",
46
46
  "buffer": "^6.0.3",
47
47
  "devextreme": "24.2.6",
48
48
  "devextreme-react": "24.2.6",