@topconsultnpm/sdkui-react 6.21.0-dev3.9 → 6.21.0-dev4.3

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 (43) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +22 -1
  2. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
  3. package/lib/components/base/TMAreaManager.js +11 -0
  4. package/lib/components/base/TMDataGrid.js +12 -2
  5. package/lib/components/base/TMDataGridExportForm.js +19 -8
  6. package/lib/components/base/TMModal.js +2 -2
  7. package/lib/components/base/TMPopUp.d.ts +1 -0
  8. package/lib/components/base/TMPopUp.js +59 -2
  9. package/lib/components/base/TMSpinner.d.ts +4 -2
  10. package/lib/components/base/TMSpinner.js +33 -6
  11. package/lib/components/choosers/TMDistinctValues.js +1 -1
  12. package/lib/components/choosers/TMGroupChooser.js +1 -1
  13. package/lib/components/editors/TMEditorStyled.d.ts +4 -4
  14. package/lib/components/editors/TMFormulaEditor.d.ts +1 -0
  15. package/lib/components/editors/TMFormulaEditor.js +98 -49
  16. package/lib/components/editors/TMMetadataValues.js +23 -6
  17. package/lib/components/features/documents/TMMasterDetailDcmts.js +1 -1
  18. package/lib/components/features/documents/TMRelationViewer.js +3 -3
  19. package/lib/components/features/search/TMMetadataOutputForm.d.ts +17 -0
  20. package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
  21. package/lib/components/features/search/TMMetadataSorterForm.d.ts +17 -0
  22. package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
  23. package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
  24. package/lib/components/features/search/TMSearchResult.d.ts +1 -0
  25. package/lib/components/features/search/TMSearchResult.js +39 -18
  26. package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
  27. package/lib/components/features/search/metadataFormHelper.js +77 -0
  28. package/lib/components/forms/Login/TMLoginForm.js +15 -3
  29. package/lib/components/wizard/TMWizard.d.ts +1 -0
  30. package/lib/components/wizard/TMWizard.js +5 -3
  31. package/lib/helper/Enum_Localizator.js +1 -0
  32. package/lib/helper/SDKUI_Localizator.d.ts +4 -0
  33. package/lib/helper/SDKUI_Localizator.js +40 -0
  34. package/lib/helper/checkinCheckoutManager.js +10 -2
  35. package/lib/helper/helpers.d.ts +2 -1
  36. package/lib/helper/helpers.js +1 -0
  37. package/lib/hooks/useDataUserIdItem.js +1 -1
  38. package/lib/hooks/useDcmtOperations.js +168 -3
  39. package/lib/hooks/useDocumentOperations.js +19 -0
  40. package/lib/services/platform_services.d.ts +4 -4
  41. package/lib/ts/types.d.ts +2 -1
  42. package/lib/ts/types.js +1 -0
  43. package/package.json +62 -56
@@ -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;
@@ -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" | "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" | "$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" | "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" | "$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
@@ -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 sensitive keys from all errors.
27
+ const SENSITIVE_KEYS = ['password', 'username'];
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] = SENSITIVE_KEYS.includes(key.toLowerCase()) ? '***' : 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 };
@@ -32,7 +32,7 @@ const StyledSpinnerWrapper = styled.div `
32
32
  width: ${props => props.$width || 'fit-content'};
33
33
  height: fit-content;
34
34
  max-width: 250px;
35
- max-height: 200px;
35
+ max-height: ${props => props.$hasCancel ? '280px' : '200px'};
36
36
  padding: 10px;
37
37
  border-radius: 5px;
38
38
  background-color: ${props => props.$flat ? 'transparent' : '#fcfcfc'};
@@ -134,22 +134,49 @@ const StyledSpinnerAnimation = styled.div `
134
134
  const StyledSpinnerDescription = styled.div `
135
135
  font-size: ${props => props.$fontSize || FontSize.defaultFontSize};
136
136
  text-align: center;
137
+ white-space: pre-line;
137
138
  `;
138
- const Spinner = ({ backgroundColor = 'transparent', description = '', fontSize = FontSize.defaultFontSize, width = 'fit-content', flat = false }) => {
139
- return (_jsx(StyledSpinnerContainer, { "$backgroundColor": backgroundColor, children: _jsxs(StyledSpinnerWrapper, { "$width": width, "$flat": flat, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
139
+ // Pulsante Annulla sotto lo spinner
140
+ const StyledCancelButton = styled.button `
141
+ margin-top: 15px;
142
+ padding: 8px 20px;
143
+ font-size: 14px;
144
+ font-weight: 500;
145
+ color: #fff;
146
+ background-color: #d12a1c;
147
+ border: none;
148
+ border-radius: 5px;
149
+ cursor: pointer;
150
+ transition: background-color 0.2s ease, transform 0.1s ease;
151
+
152
+ &:hover {
153
+ background-color: #b8241a;
154
+ }
155
+
156
+ &:active {
157
+ transform: scale(0.98);
158
+ }
159
+ `;
160
+ const Spinner = ({ backgroundColor = 'transparent', description = '', fontSize = FontSize.defaultFontSize, width = 'fit-content', flat = false, onCancel, cancelText = 'Annulla' }) => {
161
+ return (_jsx(StyledSpinnerContainer, { "$backgroundColor": backgroundColor, children: _jsxs(StyledSpinnerWrapper, { "$width": width, "$flat": flat, "$hasCancel": !!onCancel, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
140
162
  position: 'absolute',
141
163
  top: '50%',
142
164
  left: '50%',
143
165
  transform: 'translate(-54%, -54%)'
144
- }, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description })] }) }));
166
+ }, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
145
167
  };
146
168
  class TMSpinner {
147
- static show({ description, backgroundColor, fontSize, flat } = { backgroundColor: 'transparent', description: '', fontSize: FontSize.defaultFontSize, flat: false }) {
169
+ static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText } = {
170
+ backgroundColor: 'transparent',
171
+ description: '',
172
+ fontSize: FontSize.defaultFontSize,
173
+ flat: false
174
+ }) {
148
175
  let container = document.createElement('div');
149
176
  container.setAttribute("id", 'tm-spinner-temporary-container');
150
177
  document.body.appendChild(container);
151
178
  const root = ReactDOM.createRoot(container);
152
- root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat }) }));
179
+ root.render(_jsx(React.StrictMode, { children: _jsx(Spinner, { backgroundColor: backgroundColor, fontSize: fontSize, description: description, flat: flat, onCancel: onCancel, cancelText: cancelText }) }));
153
180
  }
154
181
  static hide() {
155
182
  let container = document.getElementById('tm-spinner-temporary-container');
@@ -11,7 +11,7 @@ import TMPanel from '../base/TMPanel';
11
11
  import TMModal from '../base/TMModal';
12
12
  import { useDataListItem } from '../../hooks/useDataListItem';
13
13
  import { useDataUserIdItem } from '../../hooks/useDataUserIdItem';
14
- const StyledDistinctValues = styled.div `display: flex; flex-direction: column; height: 100%; overflow: hidden; gap: 10px;`;
14
+ const StyledDistinctValues = styled.div `display: flex; flex-direction: column; height: 100%; overflow: hidden; gap: 10px; position: relative;`;
15
15
  const TMDistinctValues = ({ tid, mid, layoutMode = LayoutModes.None, allowAppendMode = true, showHeader = true, isModal, separator = " ", onSelectionChanged, onClosePanelCallback }) => {
16
16
  const [focusedItem, setFocusedItem] = useState();
17
17
  const [dataSource, setDataSource] = useState([]);
@@ -11,7 +11,7 @@ export const TMGroupChooserForm = (props) => {
11
11
  TMSpinner.hide();
12
12
  return items ?? [];
13
13
  };
14
- return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
14
+ return (_jsx(TMChooserForm, { title: SDK_Localizator.Groups, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, manageUseLocalizedName: props.manageUseLocalizedName ?? true, hasShowOnlySelectedItems: true, selectedIDs: props.selectedIDs, startWithShowOnlySelectedItems: false, cellRenderIcon: () => _jsx(IconUserGroup, { color: '#767676' }), dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => { props.onChoose?.(IDs); } }));
15
15
  };
16
16
  export const TMGroupIdViewer = (props) => {
17
17
  const [group, setGroup] = useState(null);
@@ -7,7 +7,7 @@ export declare const StyledEditorContainer: import("styled-components/dist/types
7
7
  }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
8
8
  $width: string;
9
9
  }, never>>> & string;
10
- export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$isMobile" | "$vil" | "$isModified" | "$maxValue"> & {
10
+ export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
11
11
  $vil: ValidationItem[];
12
12
  $width: string;
13
13
  $type: string;
@@ -17,7 +17,7 @@ export declare const StyledEditor: import("styled-components/dist/types").IStyle
17
17
  $disabled: boolean;
18
18
  $isMobile?: boolean;
19
19
  $borderRadius?: string;
20
- }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$isMobile" | "$vil" | "$isModified" | "$maxValue"> & {
20
+ }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "$width" | "$borderRadius" | "$fontSize" | "$type" | "$disabled" | "$vil" | "$isModified" | "$maxValue" | "$isMobile"> & {
21
21
  $vil: ValidationItem[];
22
22
  $width: string;
23
23
  $type: string;
@@ -50,7 +50,7 @@ export declare const StyledEditorLabel: import("styled-components/dist/types").I
50
50
  $fontSize?: string;
51
51
  $color?: string;
52
52
  }, never>>> & string;
53
- export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$isMobile" | "$vil" | "$isModified" | "$resize"> & {
53
+ export declare const StyledTextareaEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
54
54
  $vil: ValidationItem[];
55
55
  $width: string;
56
56
  $isModified: boolean;
@@ -60,7 +60,7 @@ export declare const StyledTextareaEditor: import("styled-components/dist/types"
60
60
  $maxHeight?: string;
61
61
  $borderRadius?: string;
62
62
  $resize?: boolean;
63
- }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$isMobile" | "$vil" | "$isModified" | "$resize"> & {
63
+ }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "$width" | "$maxHeight" | "$borderRadius" | "$fontSize" | "$disabled" | "$vil" | "$isModified" | "$isMobile" | "$resize"> & {
64
64
  $vil: ValidationItem[];
65
65
  $width: string;
66
66
  $isModified: boolean;
@@ -28,6 +28,7 @@ export declare class FormulaDescriptor {
28
28
  metadataDataTypeDest?: MetadataDataTypes;
29
29
  tid?: number;
30
30
  description?: string;
31
+ syntax?: string;
31
32
  }
32
33
  export declare const renderFormulaIcon: (iconType: FormulaIconTypes, tid?: number, md?: MetadataDescriptor) => import("react/jsx-runtime").JSX.Element;
33
34
  declare const TMFormulaEditor: React.FunctionComponent<ITMApplyFormProps<FormulaDescriptor>>;