@topconsultnpm/sdkui-react 6.20.0-dev2.60 → 6.20.0-dev2.63

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.
@@ -63,7 +63,7 @@ const TMDateBox = (props) => {
63
63
  return "datetime";
64
64
  return props.dateDisplayType == DateDisplayTypes.Date ? "date" : "time";
65
65
  };
66
- return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', width: '100%', padding: props.padding }, children: [props.icon && (_jsx("span", { style: { marginRight: '8px', marginTop: '8px', display: 'flex', alignItems: 'center' }, children: props.icon })), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '5px', width: '100%' }, children: [_jsx(DateBox, { readOnly: props.readOnly, ref: dateBoxRef, showClearButton: props.showClearButton, dateSerializationFormat: props.useDateSerializationFormat ? 'yyyy-MM-ddTHH:mm:ss' : undefined, disabled: props.disabled, displayFormat: props.displayFormat ?? Globalization.getDateDisplayFormat(props.dateDisplayType), dropDownOptions: dropDownOptions, label: props.label, labelMode: 'static', type: getType(), useMaskBehavior: true, height: '28px', value: props.value, width: props.width, valueChangeEvent: 'keyup input change', onValueChange: (e) => { props.onValueChange?.(e); }, onInitialized: (e) => { props.onInitialized?.(e); }, onContentReady: (e) => { props.onContentReady?.(e); }, placeholder: props.placeholder, onKeyUp: (e) => {
66
+ return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', width: '100%', padding: props.padding }, children: [props.icon && (_jsx("span", { style: { marginRight: '8px', marginTop: '8px', display: 'flex', alignItems: 'center' }, children: props.icon })), _jsxs("div", { onContextMenu: (e) => e.stopPropagation(), style: { display: 'flex', flexDirection: 'column', gap: '5px', width: '100%' }, children: [_jsx(DateBox, { readOnly: props.readOnly, ref: dateBoxRef, showClearButton: props.showClearButton, dateSerializationFormat: props.useDateSerializationFormat ? 'yyyy-MM-ddTHH:mm:ss' : undefined, disabled: props.disabled, displayFormat: props.displayFormat ?? Globalization.getDateDisplayFormat(props.dateDisplayType), dropDownOptions: dropDownOptions, label: props.label, labelMode: 'static', type: getType(), useMaskBehavior: true, height: '28px', value: props.value, width: props.width, valueChangeEvent: 'keyup input change', onValueChange: (e) => { props.onValueChange?.(e); }, onInitialized: (e) => { props.onInitialized?.(e); }, onContentReady: (e) => { props.onContentReady?.(e); }, placeholder: props.placeholder, onKeyUp: (e) => {
67
67
  if (e.event?.code == "Space") {
68
68
  const currentDate = new Date();
69
69
  currentDate.setHours(0, 0, 0, 0);
@@ -277,7 +277,7 @@ const TMTextBox = ({ autoFocus, maxLength, labelColor, precision, fromModal = fa
277
277
  return 6 + (buttonCount * buttonWidth) + 8;
278
278
  }
279
279
  };
280
- return (_jsxs("div", { style: { width: '100%', height: 'fit-content' }, id: `text-${id}`, children: [_jsx(StyledEditor, { ref: inputRef, id: `text-${label}-${id}`, name: label, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: displayedValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, autoComplete: 'off', spellCheck: false, onFocus: () => setIsFocused(true), onBlur: (e) => { setIsFocused(false); if (currentValue != value)
280
+ return (_jsxs("div", { style: { width: '100%', height: 'fit-content' }, id: `text-${id}`, children: [_jsx(StyledEditor, { ref: inputRef, onContextMenu: (e) => e.stopPropagation(), id: `text-${label}-${id}`, name: label, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: displayedValue, width: width || '100%', placeholder: placeHolder, maxLength: maxLength, autoComplete: 'off', spellCheck: false, onFocus: () => setIsFocused(true), onBlur: (e) => { setIsFocused(false); if (currentValue != value)
281
281
  onBlur?.(currentValue); }, onChange: handleInputChange, onKeyDown: (e) => {
282
282
  if (currentType === 'number') {
283
283
  if (!scale && (e.key == "." || e.key == ","))
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
2
+ import { DcmtTypeDescriptor, HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
3
3
  interface ITMArchiveProps {
4
4
  inputFile?: File | null;
5
5
  inputMids?: Array<{
@@ -24,6 +24,7 @@ interface ITMArchiveProps {
24
24
  editTaskCallback?: (task: TaskDescriptor) => Promise<void>;
25
25
  handleNavigateToWGs?: (value: HomeBlogPost | number) => Promise<void>;
26
26
  handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
27
+ openPdfEditor?: (fromDTD?: DcmtTypeDescriptor, file?: File | null, handleFile?: (file: File) => void) => void;
27
28
  }
28
29
  declare const TMArchive: React.FunctionComponent<ITMArchiveProps>;
29
30
  export default TMArchive;
@@ -12,7 +12,7 @@ import TMTreeSelector from '../search/TMTreeSelector';
12
12
  import TMPanel from '../../base/TMPanel';
13
13
  import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
14
14
  import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
15
- const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], enableDragDropOverlay = false, passToSearch, isSharedArchive = false, inputDID = undefined, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers }) => {
15
+ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], enableDragDropOverlay = false, passToSearch, isSharedArchive = false, inputDID = undefined, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, openPdfEditor }) => {
16
16
  const [currentTID, setCurrentTID] = useState(inputTID ?? 0);
17
17
  const [mruTIDs, setMruTIDs] = useState([]);
18
18
  const [currentMruTID, setCurrentMruTID] = useState(0);
@@ -77,7 +77,7 @@ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, c
77
77
  if (onDcmtTypeSelect)
78
78
  onDcmtTypeSelect(tidToUse);
79
79
  passToSearch(tidToUse, outputMids);
80
- } : undefined, isSharedDcmt: isSharedArchive, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, currentTID, currentTID === inputTID ? inputDID : undefined) }, currentTID)
80
+ } : undefined, isSharedDcmt: isSharedArchive, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, currentTID, currentTID === inputTID ? inputDID : undefined), openPdfEditor: openPdfEditor }, currentTID)
81
81
  :
82
82
  _jsx(TMPanel, { title: 'Archiviazione', allowMaximize: false, children: _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { children: SDKUI_Localizator.DcmtTypeSelect }) }), _jsx(StyledToppyImage, { src: Logo, alt: 'Toppy' })] }) }), [currentTID, deviceType, mruTIDs, inputFile, currentInputMids, enableDragDropOverlay, isSharedArchive, allTasks]);
83
83
  const allInitialPanelVisibility = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
2
+ import { DcmtTypeDescriptor, HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
3
3
  import { DcmtInfo, FormModes, MetadataValueDescriptorEx, TaskContext } from '../../../ts';
4
4
  /**
5
5
  * Definisce il contesto da cui è stato invocato il TMDcmtForm.
@@ -71,6 +71,7 @@ interface ITMDcmtFormProps {
71
71
  sharedSourceDID?: number;
72
72
  allowButtonsRefs?: boolean;
73
73
  onReferenceClick?: (ref: ObjectRef) => void;
74
+ openPdfEditor?: (fromDTD?: DcmtTypeDescriptor, file?: File | null, handleFile?: (file: File) => void) => void;
74
75
  }
75
76
  declare const TMDcmtForm: React.FC<ITMDcmtFormProps>;
76
77
  export default TMDcmtForm;
@@ -65,7 +65,7 @@ export var InvocationContext;
65
65
  let abortControllerLocal = new AbortController();
66
66
  ;
67
67
  //#endregion
68
- const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, showBackButton = true, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invocationContext = InvocationContext.Default, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, onTaskCreateRequest, inputFile = null, taskFormDialogComponent, moreInfoTasks, connectorFileSave = undefined, inputMids = [], openS4TViewer = false, onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowButtonsRefs = false, onReferenceClick, }) => {
68
+ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, showBackButton = true, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invocationContext = InvocationContext.Default, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, onTaskCreateRequest, inputFile = null, taskFormDialogComponent, moreInfoTasks, connectorFileSave = undefined, inputMids = [], openS4TViewer = false, onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, openPdfEditor, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowButtonsRefs = false, onReferenceClick, }) => {
69
69
  const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback, refreshPreviewTrigger, showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, } = useCheckInOutOperations();
70
70
  const [id, setID] = useState('');
71
71
  const [showWaitPanelLocal, setShowWaitPanelLocal] = useState(false);
@@ -1275,9 +1275,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
1275
1275
  ]);
1276
1276
  const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: TID, did: DID, allTasks: allTasks, fetchBlogDataTrigger: refreshBlogTrigger, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [TID, DID, allTasks, refreshBlogTrigger, handleNavigateToWGs, handleNavigateToDossiers]);
1277
1277
  const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: layoutMode, openChooserBySingleClick: !isOpenDistinctValues, TID: TID, isReadOnly: true, deviceType: deviceType, metadataValues: formData.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: formData.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [], inputMids: inputMids }), [TID, layoutMode, formData, deviceType, inputMids]);
1278
- const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt, dcmtFile: dcmtFile ?? inputFile, deviceType: deviceType, fromDTD: fromDTD, layoutMode: layoutMode, onFileUpload: (file) => {
1279
- setDcmtFile(file);
1280
- }, enableDragDropOverlay: enableDragDropOverlay }, refreshPreviewTrigger), [currentDcmt, dcmtFile, deviceType, fromDTD, layoutMode, inputFile, enableDragDropOverlay, setDcmtFile]);
1278
+ const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt, dcmtFile: dcmtFile ?? inputFile, deviceType: deviceType, fromDTD: fromDTD, layoutMode: layoutMode, onFileUpload: (file) => { setDcmtFile(file); }, openPdfEditor: openPdfEditor, enableDragDropOverlay: enableDragDropOverlay }, refreshPreviewTrigger), [currentDcmt, dcmtFile, deviceType, fromDTD, layoutMode, inputFile, enableDragDropOverlay, setDcmtFile, openPdfEditor]);
1281
1279
  const tmWF = useMemo(() => {
1282
1280
  if (isWFDataLoading) {
1283
1281
  return (_jsx("div", { style: {
@@ -1441,7 +1439,13 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
1441
1439
  id: 'tmDcmtPreview',
1442
1440
  name: SDKUI_Localizator.PreviewDocument,
1443
1441
  contentOptions: { component: tmDcmtPreview },
1444
- toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), disabled: isPreviewDisabled, visible: getDcmtFormToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmDcmtPreview, orderNumber: 4, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
1442
+ toolbarOptions: {
1443
+ icon: _jsx(IconShow, { fontSize: 24 }),
1444
+ disabled: isPreviewDisabled,
1445
+ visible: getDcmtFormToolbarVisibility(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER).tmDcmtPreview,
1446
+ orderNumber: 4,
1447
+ isActive: allInitialPanelVisibility['tmDcmtPreview']
1448
+ }
1445
1449
  },
1446
1450
  {
1447
1451
  id: 'tmWF',
@@ -1768,12 +1772,12 @@ const WfButtonStateHandler = ({ isWFDisabled }) => {
1768
1772
  }, [isWFDisabled, setToolbarButtonDisabled]);
1769
1773
  return null; // Non renderizza elementi nel DOM
1770
1774
  };
1771
- const TMDcmtPreviewWrapper = ({ currentDcmt, layoutMode, fromDTD, dcmtFile, deviceType, isVisible, onFileUpload, enableDragDropOverlay = false }) => {
1775
+ const TMDcmtPreviewWrapper = ({ currentDcmt, layoutMode, fromDTD, dcmtFile, deviceType, isVisible, onFileUpload, openPdfEditor, enableDragDropOverlay = false }) => {
1772
1776
  const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels, panelVisibility } = useTMPanelManagerContext();
1773
1777
  const isMobile = deviceType === DeviceType.MOBILE;
1774
1778
  return (layoutMode === LayoutModes.Update ?
1775
1779
  _jsx(TMDcmtPreview, { isVisible: isVisible, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, dcmtData: currentDcmt, isResizingActive: isResizingActive }) :
1776
- _jsx(TMFileUploader, { onFileUpload: onFileUpload, onClose: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, isRequired: fromDTD?.archiveConstraint === ArchiveConstraints.ContentCompulsory && dcmtFile === null, defaultBlob: dcmtFile, deviceType: deviceType, isResizingActive: isResizingActive, enableDragDropOverlay: panelVisibility['tmDcmtPreview'] && enableDragDropOverlay }));
1780
+ _jsx(TMFileUploader, { fromDTD: fromDTD, onFileUpload: onFileUpload, openPdfEditor: openPdfEditor, onClose: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, isRequired: fromDTD?.archiveConstraint === ArchiveConstraints.ContentCompulsory && dcmtFile === null, defaultBlob: dcmtFile, deviceType: deviceType, isResizingActive: isResizingActive, enableDragDropOverlay: panelVisibility['tmDcmtPreview'] && enableDragDropOverlay }));
1777
1781
  };
1778
1782
  const Ribbon = styled.div `
1779
1783
  font-size: 0.85rem;
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import { DeviceType } from '../../base/TMDeviceProvider';
3
+ import { DcmtTypeDescriptor } from '@topconsultnpm/sdk-ts';
3
4
  interface ITMFileUploader {
5
+ fromDTD?: DcmtTypeDescriptor;
4
6
  onFileUpload?: (file: File | null) => void;
7
+ openPdfEditor?: (fromDTD?: DcmtTypeDescriptor, file?: File | null, handleFile?: (file: File) => void) => void;
5
8
  onClose?: () => void;
6
9
  isRequired?: boolean;
7
10
  defaultBlob?: File | null;
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useRef, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import styled from 'styled-components';
4
- import { IconFolderOpen, IconScanner, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline } from '../../../helper';
4
+ import { IconFolderOpen, IconScanner, SDKUI_Localizator, formatBytes, IconClear, extensionHandler, IconCloseOutline, IconMenuVertical, TMCommandsContextMenu, IconEdit } from '../../../helper';
5
5
  import { useBetaFeatures } from '../../../hooks/useBetaFeatures';
6
6
  import usePreventFileDrop from '../../../hooks/usePreventFileDrop';
7
7
  import { FileExtensionHandler } from '../../../ts';
@@ -13,7 +13,8 @@ import TMTooltip from '../../base/TMTooltip';
13
13
  import { TMFileViewer, StyledHeaderIcon } from './TMDcmtPreview';
14
14
  import TMPanel from '../../base/TMPanel';
15
15
  import TMDragDropOverlay from './TMDragDropOverlay';
16
- const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload, isRequired = false, defaultBlob = null, isResizingActive, showTMPanel = true, enableDragDropOverlay = false }) => {
16
+ import { LicenseModuleStatus, SDK_Globals } from '@topconsultnpm/sdk-ts';
17
+ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onFileUpload, openPdfEditor, isRequired = false, defaultBlob = null, isResizingActive, showTMPanel = true, enableDragDropOverlay = false }) => {
17
18
  const isBetaFeaturesEnabled = useBetaFeatures();
18
19
  const [dragOver, setDragOver] = useState(false);
19
20
  const [uploadedFile, setUploadedFile] = useState(defaultBlob);
@@ -90,7 +91,17 @@ const TMFileUploader = ({ deviceType = DeviceType.DESKTOP, onClose, onFileUpload
90
91
  _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(true), icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
91
92
  _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})` })] }) })] });
92
93
  const innerContent = (_jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [enableDragDropOverlay && _jsx(TMDragDropOverlay, { handleFile: handleFile, refocusAfterFileInput: refocusAfterFileInput }), content] }));
93
- return showTMPanel ? (_jsx(TMPanel, { ref: fileUploaderPanelRef, panelID: 'file-uploader-panel', 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: innerContent })) : (innerContent);
94
+ const toolbar = useMemo(() => {
95
+ const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
96
+ return (_jsxs(_Fragment, { children: [(isPdfEditorLicensed && fileExt && fileExt.toLowerCase() === 'pdf') && (_jsx(TMCommandsContextMenu, { target: "#TMPanel-FileUploader-Commands-Header", menuItems: [
97
+ {
98
+ icon: _jsx(IconEdit, {}),
99
+ text: 'PDF Editor',
100
+ onClick: () => openPdfEditor?.(fromDTD, uploadedFile, handleFile)
101
+ }
102
+ ], showEvent: "click", children: _jsx(IconMenuVertical, { id: "TMPanel-FileUploader-Commands-Header", color: "white", cursor: "pointer" }) })), deviceType !== DeviceType.MOBILE && (_jsx(StyledHeaderIcon, { onClick: onClose, "$color": "white", children: _jsx(TMTooltip, { content: SDKUI_Localizator.Close, children: _jsx(IconCloseOutline, {}) }) }))] }));
103
+ }, [deviceType, onClose]);
104
+ return showTMPanel ? (_jsx(TMPanel, { ref: fileUploaderPanelRef, panelID: 'file-uploader-panel', title: SDKUI_Localizator.FileUpload, onBack: deviceType === DeviceType.MOBILE ? () => onClose?.() : undefined, toolbar: toolbar, children: innerContent })) : (innerContent);
94
105
  };
95
106
  const UploadContainer = styled.div `
96
107
  position: relative;
@@ -656,7 +656,7 @@ export const filterTreeTask = (tasks, filtersApplied) => {
656
656
  [FilterCategoryId.AllStates]: (task) => !task.state || (Object.values(Task_States).includes(task.state)),
657
657
  [FilterCategoryId.AllPriorities]: (task) => !task.priority || (Object.values(Priorities).includes(task.priority)),
658
658
  [FilterCategoryId.NewAssignedActivities]: (task) => checkIfNew(task.fromID, task.isNew),
659
- [FilterCategoryId.Expiring]: (task) => task.state !== Task_States.Completed && task.endTime && taskIsExpiringSoon(task.endTime, task.remTime),
659
+ [FilterCategoryId.Expiring]: (task) => task.state !== Task_States.Completed && task.state !== Task_States.Closed && task.endTime && taskIsExpiringSoon(task.endTime, task.remTime),
660
660
  [FilterCategoryId.New]: (task) => task.state === undefined || task.state === Task_States.NotStarted,
661
661
  [FilterCategoryId.InProgress]: (task) => task.state === Task_States.InProgress,
662
662
  [FilterCategoryId.Completed]: (task) => task.state === Task_States.Completed,
@@ -560,6 +560,8 @@ export declare class SDKUI_Localizator {
560
560
  static get Rows(): "Linien" | "rows" | "líneas" | "lignes" | "linhas" | "righe";
561
561
  static get Save(): "Speichern" | "Save" | "Guardar" | "Enregistre" | "Salvar" | "Salva";
562
562
  static get SaveAndLogin(): string;
563
+ static get SaveAndClose(): string;
564
+ static get SavingInProgress(): string;
563
565
  static get SaveQuestion(): "Ihre Änderungen speichern?" | "Save modifications?" | "¿Guardar modificaciones aportadas?" | "Enregistrez les modifications?" | "Salve as alterações?" | "Salvare le modifiche apportate?";
564
566
  static get FormErrorsProceedQuestion(): "Es gibt Fehler im Formular. Wenn Sie fortfahren, werden die Daten nicht gespeichert. Möchten Sie trotzdem fortfahren?" | "There are errors in the form. If you continue, the data will not be saved. Do you want to proceed anyway?" | "Hay errores en el formulario. Si continúas, los datos no se guardarán. ¿Quieres proceder de todos modos?" | "Il y a des erreurs dans le formulaire. Si vous continuez, les données ne seront pas enregistrées. Voulez-vous continuer quand même?" | "Há erros no formulário. Se continuar, os dados não serão salvos. Deseja prosseguir mesmo assim?" | "Ci sono errori nel form. Se continui, i dati non saranno salvati. Vuoi comunque procedere?";
565
567
  static get SavedQueryNew(): "Neue Suche speichern" | "Save new search" | "Guardar nueva búsqueda" | "Enregistrer la nouvelle recherche" | "Guardar nova pesquisa" | "Salva nuova ricerca";
@@ -5571,6 +5571,26 @@ export class SDKUI_Localizator {
5571
5571
  default: return "Salva e accedi";
5572
5572
  }
5573
5573
  }
5574
+ static get SaveAndClose() {
5575
+ switch (this._cultureID) {
5576
+ case CultureIDs.De_DE: return "Speichern und schließen";
5577
+ case CultureIDs.En_US: return "Save and close";
5578
+ case CultureIDs.Es_ES: return "Guardar y cerrar";
5579
+ case CultureIDs.Fr_FR: return "Enregistrer et fermer";
5580
+ case CultureIDs.Pt_PT: return "Salvar e fechar";
5581
+ default: return "Salva e chiudi";
5582
+ }
5583
+ }
5584
+ static get SavingInProgress() {
5585
+ switch (this._cultureID) {
5586
+ case CultureIDs.De_DE: return "Speichern läuft";
5587
+ case CultureIDs.En_US: return "Saving in progress";
5588
+ case CultureIDs.Es_ES: return "Guardando";
5589
+ case CultureIDs.Fr_FR: return "Enregistrement en cours";
5590
+ case CultureIDs.Pt_PT: return "Salvando";
5591
+ default: return "Salvataggio in corso";
5592
+ }
5593
+ }
5574
5594
  static get SaveQuestion() {
5575
5595
  switch (this._cultureID) {
5576
5596
  case CultureIDs.De_DE: return "Ihre Änderungen speichern?";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev2.60",
3
+ "version": "6.20.0-dev2.63",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",