@topconsultnpm/sdkui-react 6.21.0-dev3.4 → 6.21.0-dev3.40

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.
Files changed (67) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +22 -1
  2. package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
  3. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
  4. package/lib/components/base/TMAreaManager.js +11 -0
  5. package/lib/components/base/TMDataGrid.js +12 -2
  6. package/lib/components/base/TMDataGridExportForm.js +19 -8
  7. package/lib/components/base/TMFileManagerDataGridView.js +4 -4
  8. package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
  9. package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
  10. package/lib/components/base/TMFileManagerUtils.js +14 -1
  11. package/lib/components/base/TMModal.js +2 -2
  12. package/lib/components/base/TMPopUp.d.ts +1 -0
  13. package/lib/components/base/TMPopUp.js +59 -2
  14. package/lib/components/base/TMSpinner.d.ts +4 -2
  15. package/lib/components/base/TMSpinner.js +33 -6
  16. package/lib/components/base/TMTreeView.js +12 -15
  17. package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
  18. package/lib/components/choosers/TMGroupChooser.js +1 -1
  19. package/lib/components/editors/TMEditorStyled.d.ts +6 -6
  20. package/lib/components/editors/TMFormulaEditor.d.ts +1 -0
  21. package/lib/components/editors/TMFormulaEditor.js +98 -49
  22. package/lib/components/editors/TMMetadataEditor.js +6 -2
  23. package/lib/components/editors/TMMetadataValues.js +23 -6
  24. package/lib/components/features/blog/TMBlogCommentForm.js +5 -2
  25. package/lib/components/features/documents/TMCopyToFolderForm.js +2 -2
  26. package/lib/components/features/documents/TMDcmtIcon.js +1 -1
  27. package/lib/components/features/documents/TMMasterDetailDcmts.js +1 -1
  28. package/lib/components/features/documents/TMMergeToPdfForm.js +1 -1
  29. package/lib/components/features/documents/TMRelationViewer.js +8 -3
  30. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +0 -13
  31. package/lib/components/features/documents/copyAndMergeDcmtsShared.js +1 -39
  32. package/lib/components/features/search/TMMetadataOutputForm.d.ts +17 -0
  33. package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
  34. package/lib/components/features/search/TMMetadataSorterForm.d.ts +17 -0
  35. package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
  36. package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
  37. package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
  38. package/lib/components/features/search/TMSearchResult.d.ts +1 -0
  39. package/lib/components/features/search/TMSearchResult.js +39 -18
  40. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  41. package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
  42. package/lib/components/features/search/metadataFormHelper.js +77 -0
  43. package/lib/components/forms/Login/TMLoginForm.js +4 -3
  44. package/lib/components/grids/TMBlogAttachments.js +2 -2
  45. package/lib/components/grids/TMBlogsPost.js +5 -3
  46. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  47. package/lib/components/grids/TMBlogsPostUtils.js +3 -1
  48. package/lib/components/wizard/TMWizard.d.ts +1 -0
  49. package/lib/components/wizard/TMWizard.js +5 -3
  50. package/lib/helper/Enum_Localizator.js +1 -0
  51. package/lib/helper/SDKUI_Localizator.d.ts +4 -0
  52. package/lib/helper/SDKUI_Localizator.js +40 -0
  53. package/lib/helper/TMUtils.d.ts +23 -0
  54. package/lib/helper/TMUtils.js +55 -0
  55. package/lib/helper/checkinCheckoutManager.d.ts +4 -3
  56. package/lib/helper/checkinCheckoutManager.js +29 -11
  57. package/lib/helper/helpers.d.ts +2 -1
  58. package/lib/helper/helpers.js +1 -0
  59. package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
  60. package/lib/hooks/useDataUserIdItem.js +1 -1
  61. package/lib/hooks/useDcmtOperations.d.ts +18 -1
  62. package/lib/hooks/useDcmtOperations.js +235 -24
  63. package/lib/hooks/useDocumentOperations.js +22 -3
  64. package/lib/services/platform_services.d.ts +4 -4
  65. package/lib/ts/types.d.ts +2 -1
  66. package/lib/ts/types.js +1 -0
  67. package/package.json +13 -7
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect } from 'react';
2
+ import { useState, useRef, useEffect, useLayoutEffect } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import * as S from './styles';
5
5
  import { useIsMobile, useMenuPosition, useIsIOS } from './hooks';
@@ -395,6 +395,27 @@ const TMContextMenu = ({ items, trigger = 'right', children, target, externalCon
395
395
  ];
396
396
  });
397
397
  };
398
+ // Caps overflowing submenus with max-height + scroll so every item stays reachable.
399
+ useLayoutEffect(() => {
400
+ if (hoveredSubmenus.length === 0)
401
+ return;
402
+ const padding = 8;
403
+ const submenus = document.querySelectorAll('[data-submenu="true"]');
404
+ submenus.forEach(el => {
405
+ const rect = el.getBoundingClientRect();
406
+ const overflowsTop = rect.top < padding;
407
+ const overflowsBottom = rect.bottom > window.innerHeight - padding;
408
+ if (!overflowsTop && !overflowsBottom)
409
+ return;
410
+ const available = overflowsTop
411
+ ? rect.bottom - padding
412
+ : window.innerHeight - rect.top - padding;
413
+ const newMax = Math.max(80, available);
414
+ el.style.maxHeight = `${newMax}px`;
415
+ el.style.overflowY = 'auto';
416
+ el.style.overflowX = 'hidden';
417
+ });
418
+ }, [hoveredSubmenus]);
398
419
  const handleMouseLeave = (depth = 0) => {
399
420
  if (isMobile)
400
421
  return;
@@ -1,4 +1,4 @@
1
- export declare const MenuContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$x" | "$y" | "$openLeft" | "$openUp" | "$isPositioned" | "$externalControl" | "$needsScroll" | "$maxHeight"> & {
1
+ export declare const MenuContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$maxHeight" | "$x" | "$y" | "$openLeft" | "$openUp" | "$isPositioned" | "$externalControl" | "$needsScroll"> & {
2
2
  $x: number;
3
3
  $y: number;
4
4
  $openLeft: boolean;
@@ -7,7 +7,7 @@ export declare const MenuContainer: import("styled-components/dist/types").IStyl
7
7
  $externalControl?: boolean;
8
8
  $needsScroll?: boolean;
9
9
  $maxHeight?: number;
10
- }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$x" | "$y" | "$openLeft" | "$openUp" | "$isPositioned" | "$externalControl" | "$needsScroll" | "$maxHeight"> & {
10
+ }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$maxHeight" | "$x" | "$y" | "$openLeft" | "$openUp" | "$isPositioned" | "$externalControl" | "$needsScroll"> & {
11
11
  $x: number;
12
12
  $y: number;
13
13
  $openLeft: boolean;
@@ -43,12 +43,12 @@ export declare const SubmenuIndicator: import("styled-components/dist/types").IS
43
43
  }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "$isMobile"> & {
44
44
  $isMobile?: boolean;
45
45
  }, never>>> & string;
46
- export declare const Submenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$openUp" | "$needsScroll" | "$maxHeight" | "$parentRect"> & {
46
+ export declare const Submenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$maxHeight" | "$openUp" | "$needsScroll" | "$parentRect"> & {
47
47
  $parentRect: DOMRect;
48
48
  $openUp?: boolean;
49
49
  $needsScroll?: boolean;
50
50
  $maxHeight?: number;
51
- }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$openUp" | "$needsScroll" | "$maxHeight" | "$parentRect"> & {
51
+ }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$maxHeight" | "$openUp" | "$needsScroll" | "$parentRect"> & {
52
52
  $parentRect: DOMRect;
53
53
  $openUp?: boolean;
54
54
  $needsScroll?: boolean;
@@ -5,7 +5,7 @@ export declare const Overlay: import("styled-components/dist/types").IStyledComp
5
5
  }, never>>> & string;
6
6
  export declare const FloatingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
7
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
- }, "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
8
+ }, "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
9
9
  $x: number;
10
10
  $y: number;
11
11
  $orientation: "horizontal" | "vertical";
@@ -15,7 +15,7 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
15
15
  $isConstrained?: boolean;
16
16
  $isHidden?: boolean;
17
17
  $bgColor?: string;
18
- }, "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
18
+ }, "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
19
19
  $x: number;
20
20
  $y: number;
21
21
  $orientation: "horizontal" | "vertical";
@@ -25,9 +25,9 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
25
25
  $isConstrained?: boolean;
26
26
  $isHidden?: boolean;
27
27
  $bgColor?: string;
28
- }, "children" | "ref" | "title" | "accessKey" | "tabIndex" | "content" | "id" | "style" | "hidden" | "color" | "onMouseEnter" | "onMouseLeave" | "onTouchStart" | "onClick" | "onTouchEnd" | "className" | "key" | "suppressHydrationWarning" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & Partial<Pick<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
28
+ }, "children" | "ref" | "title" | "accessKey" | "tabIndex" | "content" | "id" | "style" | "hidden" | "color" | "onMouseEnter" | "onMouseLeave" | "onTouchStart" | "onClick" | "onTouchEnd" | "suppressHydrationWarning" | "className" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & Partial<Pick<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
29
29
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
30
- }, "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
30
+ }, "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
31
31
  $x: number;
32
32
  $y: number;
33
33
  $orientation: "horizontal" | "vertical";
@@ -37,7 +37,7 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
37
37
  $isConstrained?: boolean;
38
38
  $isHidden?: boolean;
39
39
  $bgColor?: string;
40
- }, "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
40
+ }, "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden"> & {
41
41
  $x: number;
42
42
  $y: number;
43
43
  $orientation: "horizontal" | "vertical";
@@ -47,7 +47,7 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
47
47
  $isConstrained?: boolean;
48
48
  $isHidden?: boolean;
49
49
  $bgColor?: string;
50
- }, "children" | "ref" | "title" | "accessKey" | "tabIndex" | "content" | "id" | "style" | "hidden" | "color" | "onMouseEnter" | "onMouseLeave" | "onTouchStart" | "onClick" | "onTouchEnd" | "className" | "key" | "suppressHydrationWarning" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "$x" | "$y" | "$bgColor" | "$orientation" | "$verticalDirection" | "$isDragging" | "$isConfigMode" | "$isConstrained" | "$isHidden">>> & string;
50
+ }, "children" | "ref" | "title" | "accessKey" | "tabIndex" | "content" | "id" | "style" | "hidden" | "color" | "onMouseEnter" | "onMouseLeave" | "onTouchStart" | "onClick" | "onTouchEnd" | "suppressHydrationWarning" | "className" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "$bgColor" | "$x" | "$y" | "$isDragging" | "$orientation" | "$verticalDirection" | "$isConfigMode" | "$isConstrained" | "$isHidden">>> & string;
51
51
  export declare const GripHandle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$orientation"> & {
52
52
  $orientation: "horizontal" | "vertical";
53
53
  }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$orientation"> & {
@@ -51,6 +51,17 @@ const StyledFileManagerWrapper = styled.div `
51
51
  display: inline-block;
52
52
  z-index: 1;
53
53
  }
54
+ /* Nodi foglia: nascondiamo il toggle (stato incoerente in DevExtreme) e riserviamo lo stesso spazio della freccia (16px expander + 8px gap = 24px). */
55
+ .dx-filemanager .dx-treeview-node-is-leaf
56
+ > .dx-treeview-item
57
+ > [class*="dx-treeview-toggle-item-visibility"] {
58
+ display: none !important;
59
+ }
60
+ .dx-filemanager .dx-treeview-node-is-leaf
61
+ > .dx-treeview-item
62
+ > .dx-treeview-item-content {
63
+ margin-inline-start: 24px;
64
+ }
54
65
  `;
55
66
  const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false }) => {
56
67
  // State to store the instance of CustomFileSystemProvider. It is initialized once and used for managing file system operations.
@@ -36,6 +36,8 @@ const TMDataGrid = React.forwardRef((props, ref) => {
36
36
  const [customContextMenuPosition, setCustomContextMenuPosition] = useState({ x: 0, y: 0 });
37
37
  const [customContextMenuRowKey, setCustomContextMenuRowKey] = useState(undefined);
38
38
  const gridContainerRef = useRef(null);
39
+ // Ref per evitare focus ripetuti sulla search panel
40
+ const searchPanelFocusedRef = useRef(false);
39
41
  useEffect(() => {
40
42
  const count = getRecordCount(dataSource);
41
43
  setTotalRecordCount(count);
@@ -44,10 +46,15 @@ const TMDataGrid = React.forwardRef((props, ref) => {
44
46
  useEffect(() => {
45
47
  if (!searchPanelFocusTrigger || searchPanelFocusTrigger <= 0 || !showSearchPanel || !internalRef.current)
46
48
  return;
49
+ // Reset del flag quando cambia il trigger (per permettere un nuovo focus se richiesto)
50
+ searchPanelFocusedRef.current = false;
47
51
  setTimeout(() => {
52
+ if (searchPanelFocusedRef.current)
53
+ return;
48
54
  const searchInput = internalRef.current?.instance().element().querySelector('.dx-datagrid-search-panel input');
49
55
  if (searchInput) {
50
56
  searchInput.focus();
57
+ searchPanelFocusedRef.current = true;
51
58
  }
52
59
  }, 100);
53
60
  }, [searchPanelFocusTrigger, showSearchPanel]);
@@ -305,13 +312,16 @@ const TMDataGrid = React.forwardRef((props, ref) => {
305
312
  return;
306
313
  // Update state with the current number of visible rows in the DataGrid
307
314
  setVisibleItemsCount(internalRef.current.instance()?.getVisibleRows()?.length ?? 0);
308
- // Focusing SearchPanel on content ready
309
- if (showSearchPanel && searchPanelFocusTrigger && searchPanelFocusTrigger > 0) {
315
+ // Focusing SearchPanel on content ready - solo se non è già stato fatto
316
+ if (showSearchPanel && searchPanelFocusTrigger && searchPanelFocusTrigger > 0 && !searchPanelFocusedRef.current) {
310
317
  // Use a small delay to ensure the DOM is fully rendered before trying to focus
311
318
  setTimeout(() => {
319
+ if (searchPanelFocusedRef.current)
320
+ return;
312
321
  const searchInput = internalRef.current?.instance().element().querySelector('.dx-datagrid-search-panel input');
313
322
  if (searchInput) {
314
323
  searchInput.focus();
324
+ searchPanelFocusedRef.current = true;
315
325
  }
316
326
  }, 100);
317
327
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { Workbook } from 'exceljs';
3
+ import { Workbook } from 'devextreme-exceljs-fork';
4
4
  import { buildValueToLabelMapFromDataColumns, getExceptionMessage, SDKUI_Localizator } from '../../helper';
5
5
  import TMCheckBox from '../editors/TMCheckBox';
6
6
  import TMButton from './TMButton';
@@ -69,15 +69,24 @@ const TMDataGridExportForm = (props) => {
69
69
  const selectedSet = new Set(selectedRowKeys);
70
70
  // If exporting only selected rows, filter the dataSource accordingly; otherwise use the full dataSource
71
71
  const rowsToExport = exportSelectedOnly ? dataSource.filter((item) => selectedSet.has(item.rowIndex)) : dataSource;
72
- // Filter columns to only those that are visible; optionally hide 'object' data types based on the `hideSelection` flag
72
+ // Filter columns to only those that are visible; optionally include FILEEXT column based on `exportSelectedFormatColumns` flag
73
73
  let visibleColumns = dataColumns.filter(col => {
74
74
  if (!exportSelectedFormatColumns) {
75
75
  return col.visible !== false && col.dataField !== "FILEEXT";
76
76
  }
77
77
  else {
78
- return col.visible !== false;
78
+ // Include FILEEXT even if not visible when exportSelectedFormatColumns is true
79
+ return col.visible !== false || col.dataField === "FILEEXT";
79
80
  }
80
81
  });
82
+ // If exportSelectedFormatColumns is true, move FILEEXT to be the first column (will be second after "Selected" column)
83
+ if (exportSelectedFormatColumns) {
84
+ const fileExtIndex = visibleColumns.findIndex(col => col.dataField === "FILEEXT");
85
+ if (fileExtIndex > 0) {
86
+ const [fileExtCol] = visibleColumns.splice(fileExtIndex, 1);
87
+ visibleColumns.unshift(fileExtCol);
88
+ }
89
+ }
81
90
  // Function to get the value for a column and its value in a row
82
91
  const getValue = (col, value) => {
83
92
  // Replace raw value with corresponding label from the map if applicable
@@ -164,11 +173,13 @@ const TMDataGridExportForm = (props) => {
164
173
  return;
165
174
  const headerLength = col.header.toString().length;
166
175
  // 'getColumn' accetta solo string | number, col.key è garantito perché controllato sopra
167
- const maxDataLength = worksheet.getColumn(col.key).values.reduce((max, val) => {
168
- const strVal = val !== undefined && val !== null ? val.toString() : '';
169
- const length = strVal.length;
170
- return length > max ? length : max;
171
- }, 0);
176
+ const columnValues = worksheet.getColumn(col.key).values;
177
+ const maxDataLength = Array.isArray(columnValues)
178
+ ? columnValues.reduce((max, val) => {
179
+ const strVal = val !== undefined && val !== null ? String(val) : '';
180
+ return strVal.length > max ? strVal.length : max;
181
+ }, 0)
182
+ : 0;
172
183
  col.width = Math.max(headerLength, maxDataLength) + 2;
173
184
  });
174
185
  // Apply font and border styling to all cells in all rows in a single pass
@@ -57,13 +57,13 @@ const TMFileManagerDataGridView = (props) => {
57
57
  const checkoutUsedId = checkOutUserID;
58
58
  const editMode = checkoutDate && checkoutUsedId && userID && userID === checkoutUsedId;
59
59
  const lockMode = checkoutDate && checkoutUsedId && userID && userID !== checkoutUsedId;
60
- const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(checkOutUserName, checkOutUserID) ?? '-', " (ID: ", checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Type }), ": ", ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(lastUpdateTime?.toString())] })] })] })] });
60
+ const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(checkOutUserName, checkOutUserID) ?? '-', " (ID: ", checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Extension }), ": ", ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(lastUpdateTime?.toString())] })] })] })] });
61
61
  return _jsxs("div", { style: { display: "inline-flex", alignItems: "center", gap: "4px" }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }) }), renderHighlightedText(cellData.value, searchText, false)] });
62
62
  }, [searchText, findCheckOutUserName]);
63
63
  const cellExtRender = useCallback((cellData) => {
64
64
  const item = cellData.data;
65
- const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
66
- return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }) });
65
+ const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
66
+ return _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned });
67
67
  }, []);
68
68
  const cellDatetimeRender = useCallback((cellData) => {
69
69
  if (!cellData.value)
@@ -77,7 +77,7 @@ const TMFileManagerDataGridView = (props) => {
77
77
  const dataColumns = useMemo(() => {
78
78
  return [
79
79
  { dataField: "id", caption: "ID", dataType: 'string', visible: false },
80
- { dataField: "ext", caption: "", cellRender: cellExtRender },
80
+ { dataField: "ext", caption: "", cellRender: cellExtRender, width: 50, allowResizing: false, filterOperations: ['=', "anyof"], allowHiding: false },
81
81
  { dataField: "name", caption: SDKUI_Localizator.Name, cellRender: cellNameRender },
82
82
  { dataField: "version", caption: "V.", cellRender: cellDefaultRender },
83
83
  { dataField: "size", caption: SDKUI_Localizator.Size, cellRender: cellSizeRender },
@@ -143,9 +143,9 @@ const TMFileManagerThumbnailItems = (props) => {
143
143
  bgColor = isSelected ? colors.PRIMARY_BLUE : backgroundColors.lockMode;
144
144
  bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#fff59d";
145
145
  }
146
- const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Type }), ": ", item.ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(item.creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime?.toString())] })] })] })] });
147
- const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
148
- return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0 }, children: [_jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }), editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
146
+ const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Extension }), ": ", item.ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(item.creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime?.toString())] })] })] })] });
147
+ const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
148
+ return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0, display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsx("div", { style: { width: '40px' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned }) }), _jsxs("div", { style: { display: 'flex', justifyContent: 'center', width: '40px' }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
149
149
  }) });
150
150
  };
151
151
  export default TMFileManagerThumbnailItems;
@@ -1,5 +1,11 @@
1
1
  import React from "react";
2
2
  import { SearchResultDescriptor, UserDescriptor, WGTreeDescriptor } from "@topconsultnpm/sdk-ts";
3
+ /**
4
+ * Verifica se un'estensione indica che il file è firmato digitalmente.
5
+ * Controlla se l'estensione (es. "pdf.p7m", ".p7m", "p7m") contiene
6
+ * una delle estensioni di firma note (p7m, p7s, m7m, tsd, tsr, ts).
7
+ */
8
+ export declare const isSigned: (ext: string | null | undefined) => boolean;
3
9
  export interface FileItem {
4
10
  id: number;
5
11
  name: string;
@@ -18,6 +24,7 @@ export interface FileItem {
18
24
  checkoutDate?: Date | null;
19
25
  size?: number;
20
26
  version?: number;
27
+ isSigned?: number;
21
28
  }
22
29
  export interface TMFileManagerTreeViewDirectory {
23
30
  id: number;
@@ -1,5 +1,17 @@
1
1
  import styled from "styled-components";
2
- import { associateColumnsToRows } from "../../helper";
2
+ import { associateColumnsToRows, SIGNATURE_EXTENSIONS } from "../../helper";
3
+ /**
4
+ * Verifica se un'estensione indica che il file è firmato digitalmente.
5
+ * Controlla se l'estensione (es. "pdf.p7m", ".p7m", "p7m") contiene
6
+ * una delle estensioni di firma note (p7m, p7s, m7m, tsd, tsr, ts).
7
+ */
8
+ export const isSigned = (ext) => {
9
+ if (!ext)
10
+ return false;
11
+ const normalized = ext.trim().toLowerCase().replace(/^\./, '');
12
+ const parts = normalized.split('.');
13
+ return parts.some(part => SIGNATURE_EXTENSIONS.has(part));
14
+ };
3
15
  export var TMFileManagerPageSize;
4
16
  (function (TMFileManagerPageSize) {
5
17
  TMFileManagerPageSize[TMFileManagerPageSize["Small"] = 30] = "Small";
@@ -125,6 +137,7 @@ export const buildFolderHierarchy = (fileSystemTree, draftsFile, archivedDocumen
125
137
  checkOutUserName: checkOutUserName,
126
138
  checkoutDate: row.CheckOutDate ? new Date(row.CheckOutDate) : null,
127
139
  version,
140
+ isSigned: isSigned(row.FileExt) ? 1 : 0
128
141
  };
129
142
  if (draftInfoMap.has(draftID)) {
130
143
  // Get the current version in the map
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState, useEffect, useRef } from 'react';
3
3
  import { Popup } from 'devextreme-react';
4
4
  import styled from 'styled-components';
5
- import TMLayoutContainer, { TMCard, TMLayoutItem } from './TMLayout';
5
+ import { TMCard } from './TMLayout';
6
6
  import { FontSize, TMColors } from '../../utils/theme';
7
7
  import { IconWindowMaximize, IconWindowMinimize, svgToString } from '../../helper';
8
8
  const StyledModal = styled.div `
@@ -110,6 +110,6 @@ const TMModal = ({ resizable = true, expandable = false, isModal = true, title =
110
110
  onClick: () => setIsFullScreen(!isFullScreen)
111
111
  }
112
112
  }
113
- ] : undefined, children: _jsxs(TMLayoutContainer, { children: [toolbar && (_jsx(TMLayoutItem, { height: "40px", children: _jsx(StyledModalToolbar, { children: toolbar }) })), _jsx(TMLayoutItem, { height: toolbar ? 'calc(100% - 40px)' : '100%', children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] }) })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
113
+ ] : undefined, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }, children: [toolbar && (_jsx(StyledModalToolbar, { children: toolbar })), _jsx("div", { style: { flex: 1, overflow: 'hidden', minHeight: 0 }, children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] }) })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
114
114
  };
115
115
  export default TMModal;
@@ -24,6 +24,7 @@ interface ITMExceptionBox extends ITMPopup {
24
24
  exception?: any;
25
25
  onClose?: () => void;
26
26
  }
27
+ export declare const sanitizeException: (exception: any) => any;
27
28
  declare class TMExceptionBoxManager {
28
29
  static show({ title, exception, onClose }: ITMExceptionBox): void;
29
30
  }
@@ -23,6 +23,45 @@ export var ButtonNames;
23
23
  // Dimensioni minime di default per i popup
24
24
  const DEFAULT_MIN_WIDTH = 500;
25
25
  const DEFAULT_MIN_HEIGHT = 400;
26
+ // filtr password from all errors.
27
+ const SENSITIVE_KEY = 'password';
28
+ const redactSensitiveJsonString = (value) => {
29
+ const trimmed = value.trim();
30
+ const looksLikeJson = (trimmed.startsWith('{') && trimmed.endsWith('}')) || (trimmed.startsWith('[') && trimmed.endsWith(']'));
31
+ if (!looksLikeJson)
32
+ return value;
33
+ try {
34
+ return JSON.stringify(redactSensitiveValue(JSON.parse(value)));
35
+ }
36
+ catch {
37
+ return value;
38
+ }
39
+ };
40
+ const redactSensitiveValue = (value) => {
41
+ if (Array.isArray(value))
42
+ return value.map(redactSensitiveValue);
43
+ if (typeof value === 'string')
44
+ return redactSensitiveJsonString(value);
45
+ if (!value || typeof value !== 'object')
46
+ return value;
47
+ const result = {};
48
+ for (const key of Object.keys(value)) {
49
+ result[key] = key.toLowerCase() === SENSITIVE_KEY ? '***' : redactSensitiveValue(value[key]);
50
+ }
51
+ return result;
52
+ };
53
+ export const sanitizeException = (exception) => {
54
+ if (exception === null || exception === undefined)
55
+ return exception;
56
+ let plain;
57
+ try {
58
+ plain = JSON.parse(JSON.stringify(exception));
59
+ }
60
+ catch {
61
+ return exception;
62
+ }
63
+ return redactSensitiveValue(plain);
64
+ };
26
65
  const StyledExeptionToolbar = styled.div `
27
66
  display: flex;
28
67
  flex-direction: row;
@@ -273,6 +312,7 @@ const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.a
273
312
  let dateString = d.getDate() + '/' + d.getMonth() + 1 + '/' + d.getFullYear();
274
313
  let timeString = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds() + ':' + d.getMilliseconds();
275
314
  let message = getExceptionMessage(exception);
315
+ const safeException = useMemo(() => sanitizeException(exception), [exception]);
276
316
  let deviceType = useDeviceType();
277
317
  /**
278
318
  * Gestore chiamato quando il popup viene mostrato.
@@ -304,17 +344,34 @@ const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.a
304
344
  };
305
345
  const getFullMessage = () => {
306
346
  let fullMessage = '';
307
- fullMessage += `${d}\n${'-' + JSON.stringify(exception)}\n` + `-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`;
347
+ fullMessage += `${d}\n${'-' + JSON.stringify(safeException)}\n` + `-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`;
308
348
  return fullMessage.replaceAll('{', '').replaceAll('}', '').replaceAll(`":`, '=').replaceAll(`,"`, '\n').replaceAll(`"`, '');
309
349
  };
310
350
  const copyToClipBoard = (e) => {
311
351
  navigator.clipboard.writeText(e);
312
352
  ShowAlert({ mode: 'success', duration: 3000, message: SDKUI_Localizator.CopiedSuccessfully, title: 'Success' });
313
353
  };
354
+ const handleClose = useCallback(() => {
355
+ onClose?.();
356
+ setIsVisible(false);
357
+ }, [onClose]);
358
+ const handleKeyDown = useCallback((e) => {
359
+ if (e.key === 'Enter' || e.key === 'Escape') {
360
+ e.preventDefault();
361
+ e.stopPropagation();
362
+ handleClose();
363
+ }
364
+ }, [handleClose]);
365
+ useEffect(() => {
366
+ if (!isVisible)
367
+ return;
368
+ window.addEventListener('keydown', handleKeyDown, true);
369
+ return () => window.removeEventListener('keydown', handleKeyDown, true);
370
+ }, [isVisible, handleKeyDown]);
314
371
  const ExceptionToolbar = () => {
315
372
  return (_jsxs(StyledExeptionToolbar, { children: [_jsx(TMButton, { color: 'primaryOutline', btnStyle: 'text', onClick: () => copyToClipBoard(getFullMessage()), caption: SDKUI_Localizator.CopyToClipboard, showTooltip: false }), _jsx(TMButton, { btnStyle: 'text', onClick: () => { onClose?.(); setIsVisible(false); }, caption: SDKUI_Localizator.Close, showTooltip: false, color: 'error' })] }));
316
373
  };
317
- return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(exception).replaceAll('{', '').replaceAll('}', '').split(`,"`).map((t, index) => (_jsxs("div", { style: { padding: '5px', borderBottom: '1px solid rgb(180,180,180)' }, children: ["\u261B", ' ' + (t.toLowerCase().includes('detail') ? (t.replaceAll(`"`, '').replaceAll(`:`, ': ').replaceAll(String.fromCharCode(92), '')) : (t.replaceAll(`"`, '').replaceAll(`:`, ': ')))] }, index))) }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(JSON.stringify(exception).replaceAll('{', '').replaceAll('}', '').replaceAll(',', '\n')), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.Details, children: [_jsxs(TabContextContainer, { children: [_jsxs(StyledAppVersionText, { "$color": TMColors.primary, children: [SDK_Globals.appModule, " ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.appVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.tertiary, children: ["SDKUI: ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkuiVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.success, children: ["SDK : ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkVersion })] })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] })] }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsx(ExceptionToolbar, {}) })] }) }));
374
+ return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').split(`,"`).map((t, index) => (_jsxs("div", { style: { padding: '5px', borderBottom: '1px solid rgb(180,180,180)' }, children: ["\u261B", ' ' + (t.toLowerCase().includes('detail') ? (t.replaceAll(`"`, '').replaceAll(`:`, ': ').replaceAll(String.fromCharCode(92), '')) : (t.replaceAll(`"`, '').replaceAll(`:`, ': ')))] }, index))) }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').replaceAll(',', '\n')), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.Details, children: [_jsxs(TabContextContainer, { children: [_jsxs(StyledAppVersionText, { "$color": TMColors.primary, children: [SDK_Globals.appModule, " ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.appVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.tertiary, children: ["SDKUI: ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkuiVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.success, children: ["SDK : ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkVersion })] })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] })] }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsx(ExceptionToolbar, {}) })] }) }));
318
375
  };
319
376
  class TMExceptionBoxManager {
320
377
  static show({ title, exception, onClose }) {
@@ -4,10 +4,12 @@ interface ITMSpinner {
4
4
  description?: string;
5
5
  width?: string;
6
6
  flat?: boolean;
7
+ onCancel?: () => void;
8
+ cancelText?: string;
7
9
  }
8
- declare const Spinner: ({ backgroundColor, description, fontSize, width, flat }: ITMSpinner) => import("react/jsx-runtime").JSX.Element;
10
+ declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) => import("react/jsx-runtime").JSX.Element;
9
11
  declare class TMSpinner {
10
- static show({ description, backgroundColor, fontSize, flat }?: ITMSpinner): void;
12
+ static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText }?: ITMSpinner): void;
11
13
  static hide(): void;
12
14
  }
13
15
  export { Spinner };