@topconsultnpm/sdkui-react 6.22.0-t2 → 6.22.0-t3
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.
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +3 -3
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +1 -1
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +15 -15
- package/lib/components/base/Styled.js +7 -5
- package/lib/components/base/TMAccordionNew.js +7 -7
- package/lib/components/base/TMAlert.d.ts +32 -32
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -4
- package/lib/components/base/TMClosableList.js +3 -3
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.d.ts +2 -0
- package/lib/components/base/TMDataGrid.js +35 -7
- package/lib/components/base/TMDropDownMenu.js +1 -1
- package/lib/components/base/TMFileManagerDataGridView.js +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +2 -2
- package/lib/components/base/TMLayout.d.ts +2 -2
- package/lib/components/base/TMLayout.js +3 -3
- package/lib/components/base/TMList.js +1 -1
- package/lib/components/base/TMListView.js +3 -3
- package/lib/components/base/TMModal.js +1 -1
- package/lib/components/base/TMPanel.js +8 -8
- package/lib/components/base/TMPopUp.js +2 -2
- package/lib/components/base/TMResizableMenu.js +2 -2
- package/lib/components/base/TMRightSidebar.js +1 -1
- package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.js +2 -2
- package/lib/components/base/TMTabControl.d.ts +106 -0
- package/lib/components/base/TMTabControl.js +664 -0
- package/lib/components/base/TMToggleButton.js +2 -2
- package/lib/components/base/TMToolbarCard.js +3 -3
- package/lib/components/base/TMTreeView.js +35 -3
- package/lib/components/base/TMWaitPanel.js +3 -3
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMCultureIDPicker.js +2 -2
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +2 -2
- package/lib/components/choosers/TMDcmtTypeChooser.js +1 -1
- package/lib/components/choosers/TMDiskChooser.js +1 -1
- package/lib/components/choosers/TMDistinctValues.js +28 -19
- package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMImageIDChooser.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.js +2 -2
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.js +4 -4
- package/lib/components/choosers/TMQuickSearchSettingsForm.js +1 -1
- package/lib/components/choosers/TMRelationChooser.js +1 -1
- package/lib/components/choosers/TMSelectedValuesSummary.js +1 -3
- package/lib/components/choosers/TMUserChooser.js +1 -1
- package/lib/components/editors/TMCheckBox.js +1 -1
- package/lib/components/editors/TMDropDown.js +7 -7
- package/lib/components/editors/TMEditorStyled.d.ts +1 -1
- package/lib/components/editors/TMFormulaEditor.js +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
- package/lib/components/editors/TMLocalizedTextBox.js +1 -1
- package/lib/components/editors/TMMetadataValues.js +6 -6
- package/lib/components/editors/TMRadioButton.js +2 -2
- package/lib/components/editors/TMSummary.js +3 -3
- package/lib/components/editors/TMTextArea.js +3 -3
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/editors/TMTextExpression.js +1 -1
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +4 -4
- package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
- package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
- package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
- package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
- package/lib/components/features/documents/TMBatchUpdateForm.js +4 -5
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +53 -64
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +2 -2
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.js +6 -4
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
- package/lib/components/features/documents/TMFileUploader.js +7 -7
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +55 -130
- package/lib/components/features/documents/TMMasterInfoFields.js +4 -5
- package/lib/components/features/documents/TMMergeToPdfForm.js +56 -54
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +3 -6
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +4 -4
- package/lib/components/features/documents/TMRelationViewer.d.ts +16 -9
- package/lib/components/features/documents/TMRelationViewer.js +240 -168
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
- package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
- package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -1
- package/lib/components/features/search/TMSearch.js +71 -12
- package/lib/components/features/search/TMSearchQueryEditor.js +2 -2
- package/lib/components/features/search/TMSearchQueryPanel.js +1 -5
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +34 -18
- package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
- package/lib/components/features/search/TMTreeSelector.js +38 -36
- package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
- package/lib/components/features/tasks/TMTaskForm.js +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
- package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
- package/lib/components/features/tasks/TMTasksView.js +97 -102
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +92 -92
- package/lib/components/features/workflow/TMWorkflowPopup.js +2 -2
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
- package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
- package/lib/components/forms/Login/Menu.js +1 -1
- package/lib/components/forms/Login/OTPReader.js +1 -1
- package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
- package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
- package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
- package/lib/components/forms/Login/SelectBox.js +1 -1
- package/lib/components/forms/Login/StepIndicator.js +1 -1
- package/lib/components/forms/Login/TMLoginForm.js +7 -7
- package/lib/components/forms/Login/TextBox.js +1 -1
- package/lib/components/forms/TMApplyForm.js +3 -3
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.js +3 -3
- package/lib/components/grids/TMBlogAttachments.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +92 -96
- package/lib/components/grids/TMBlogsPostUtils.js +1 -1
- package/lib/components/grids/TMRecentsManager.js +4 -4
- package/lib/components/grids/TMValidationItemsList.js +1 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -3
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
- package/lib/components/layout/panelManager/TMPanelWrapper.js +1 -1
- package/lib/components/pages/TMPage.js +30 -32
- package/lib/components/query/TMQueryCountButton.js +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +3 -0
- package/lib/components/query/TMQueryEditor.js +9 -8
- package/lib/components/sidebar/TMCommandsPanel.js +1 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +9 -9
- package/lib/components/sidebar/TMSidebar.js +1 -1
- package/lib/components/sidebar/TMSidebarItem.js +1 -1
- package/lib/components/viewers/TMMidViewer.js +2 -2
- package/lib/components/viewers/TMTidViewer.js +3 -3
- package/lib/components/wizard/TMStepIndicator.js +3 -3
- package/lib/helper/Enum_Localizator.d.ts +4 -4
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +736 -712
- package/lib/helper/SDKUI_Localizator.js +240 -0
- package/lib/helper/TMAppUpdatedModal.js +2 -2
- package/lib/helper/TMIcons.js +1 -3
- package/lib/helper/TMPdfViewer.js +1 -1
- package/lib/helper/TMToppyMessage.js +1 -1
- package/lib/helper/TMUtils.js +1 -1
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.d.ts +1 -1
- package/lib/helper/checkinCheckoutManager.js +1 -1
- package/lib/helper/dcmtsHelper.d.ts +4 -2
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +2 -2
- package/lib/hooks/tmDistinctValuesGridHelper.d.ts +1 -1
- package/lib/hooks/useCaseFlowApprove.d.ts +3 -3
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +187 -179
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +16 -27
- package/lib/hooks/useInputDialog.js +1 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +1 -16
- package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useQueryParametersDialog.js +1 -1
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +47 -6
- package/lib/services/caseflow/CaseFlowService.js +82 -14
- package/lib/services/platform_services.d.ts +4 -4
- package/package.json +9 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import * as S from './styles';
|
|
@@ -488,7 +488,7 @@ const TMContextMenu = ({ items, trigger = 'right', children, target, externalCon
|
|
|
488
488
|
rightIconClickHandler = handleRightIconPropsClick;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
return (_jsxs(S.MenuItem, {
|
|
491
|
+
return (_jsxs(S.MenuItem, { $disabled: item.disabled, $hasSubmenu: !!item.submenu && item.submenu.length > 0, $beginGroup: item.beginGroup, "data-disabled": item.disabled ? "true" : undefined, onMouseDown: handleClick, onMouseEnter: (e) => !isMobile && handleMouseEnter(item, e, depth + 1), onMouseLeave: () => !isMobile && handleMouseLeave(depth + 1), title: item.tooltip, children: [_jsxs(S.MenuItemContent, { children: [item.icon && _jsx(S.IconWrapper, { children: item.icon }), _jsx(S.MenuItemName, { children: item.name })] }), rightIconElement && rightIconClickHandler ? (_jsx(S.RightIconButton, { onClick: rightIconClickHandler, onMouseDown: (e) => e.stopPropagation(), "aria-label": `Action for ${item.name}`, children: rightIconElement })) : rightIconElement ? (_jsx(S.IconWrapper, { children: rightIconElement })) : null, item.submenu && item.submenu.length > 0 && (_jsx(S.SubmenuIndicator, { $isMobile: isMobile, children: isMobile ? '›' : '▸' }))] }, itemKey));
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
494
|
const currentParentName = menuState.parentNames[menuState.parentNames.length - 1] || '';
|
|
@@ -500,6 +500,6 @@ const TMContextMenu = ({ items, trigger = 'right', children, target, externalCon
|
|
|
500
500
|
// display: 'inline-block',
|
|
501
501
|
WebkitTouchCallout: isIOS ? 'none' : undefined,
|
|
502
502
|
WebkitUserSelect: isIOS ? 'none' : undefined,
|
|
503
|
-
}, children: children })), menuState.visible && createPortal(_jsxs(_Fragment, { children: [_jsxs(S.MenuContainer, { ref: menuRef, className: "notranslate", translate: "no",
|
|
503
|
+
}, children: children })), menuState.visible && createPortal(_jsxs(_Fragment, { children: [_jsxs(S.MenuContainer, { ref: menuRef, className: "notranslate", translate: "no", $x: menuState.position.x, $y: menuState.position.y, $openLeft: openLeft, $openUp: openUp, $isPositioned: isCalculated, $externalControl: !!externalControl, $needsScroll: needsScroll, $maxHeight: maxHeight, children: [isMobile && menuState.parentNames.length > 0 && (_jsxs(S.MobileMenuHeader, { children: [_jsx(S.BackButton, { onClick: handleBack, "aria-label": "Go back", children: _jsx(IconArrowLeft, {}) }), _jsx(S.HeaderTitle, { children: currentParentName })] })), renderMenuItems(currentMenu, 0)] }), !isMobile && hoveredSubmenus.map((submenu, idx) => (_jsx(S.Submenu, { className: "notranslate", translate: "no", $parentRect: submenu.parentRect, $openUp: submenu.openUp, "data-submenu": "true", "data-open-up": submenu.openUp ? 'true' : 'false', onMouseEnter: handleSubmenuMouseEnter, onMouseLeave: () => handleMouseLeave(submenu.depth), children: renderMenuItems(submenu.items, submenu.depth) }, `submenu-${submenu.depth}-${idx}`)))] }), document.body)] }));
|
|
504
504
|
};
|
|
505
505
|
export default TMContextMenu;
|
|
@@ -6,11 +6,11 @@ interface Position {
|
|
|
6
6
|
y: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const useMenuPosition: (menuRef: React.RefObject<HTMLDivElement | null>, position: Position, itemsCount?: number) => {
|
|
9
|
-
isCalculated: boolean;
|
|
10
9
|
openLeft: boolean;
|
|
11
10
|
openUp: boolean;
|
|
12
11
|
needsScroll: boolean;
|
|
13
12
|
maxHeight: number | undefined;
|
|
13
|
+
isCalculated: boolean;
|
|
14
14
|
};
|
|
15
15
|
export declare const getContextMenuTarget: <T extends {
|
|
16
16
|
id: string;
|
|
@@ -837,13 +837,13 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
837
837
|
setState(s => ({ ...s, draggedItemIndex: null }));
|
|
838
838
|
setDragOverIndex(null);
|
|
839
839
|
};
|
|
840
|
-
return (_jsxs(S.FloatingContainer, { ref: floatingRef, className: "notranslate", translate: "no",
|
|
840
|
+
return (_jsxs(S.FloatingContainer, { ref: floatingRef, className: "notranslate", translate: "no", $x: pixelPosition.x, $y: pixelPosition.y, $orientation: state.orientation, $verticalDirection: state.verticalDirection, $isDragging: state.isDragging, $isConfigMode: false, $isConstrained: isConstrained, $isHidden: isOrientationChanging, $bgColor: bgColor, onContextMenu: undefined, children: [_jsx(ContextMenu, { items: [
|
|
841
841
|
{
|
|
842
842
|
name: state.orientation === 'horizontal' ? 'Floating bar verticale' : 'Floating bar orizzontale',
|
|
843
843
|
icon: _jsx(IconRotate, { fontSize: 16, style: { transform: state.orientation === 'horizontal' ? 'rotate(90deg)' : 'rotate(0deg)' } }),
|
|
844
844
|
onClick: toggleOrientation,
|
|
845
845
|
},
|
|
846
|
-
], trigger: "right", children: _jsx(S.GripHandle, {
|
|
846
|
+
], trigger: "right", children: _jsx(S.GripHandle, { $orientation: state.orientation, onMouseDown: handleMouseDown, onTouchStart: handleTouchStart, onDoubleClick: handleGripDoubleClick, children: _jsx(IconDraggableDots, {}) }) }), _jsx(S.Separator, { $orientation: state.orientation }), state.items.map((item, index) => {
|
|
847
847
|
// Check visibility for non-separator items
|
|
848
848
|
if (!item.isSeparator) {
|
|
849
849
|
const currentState = getCurrentItemState(item.id);
|
|
@@ -854,7 +854,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
854
854
|
}
|
|
855
855
|
// Handle separator items
|
|
856
856
|
if (item.isSeparator) {
|
|
857
|
-
return (_jsx(S.DraggableItem, {
|
|
857
|
+
return (_jsx(S.DraggableItem, { $isDragging: state.draggedItemIndex === index, $isDragOver: dragOverIndex === index && state.draggedItemIndex !== index, draggable: enableConfigMode, onDragStart: (e) => handleDragStart(e, index), onDragEnter: (e) => handleDragEnter(e, index), onDragOver: handleDragOver, onDragLeave: (e) => handleDragLeave(e, index), onDrop: (e) => handleDrop(e, index), onDragEnd: handleDragEnd, children: enableConfigMode ? (_jsx(ContextMenu, { items: getSeparatorRightClickMenuItems(index), trigger: "right", children: _jsx(S.ItemSeparator, { $orientation: state.orientation, $isConfigMode: false }) })) : (_jsx(S.ItemSeparator, { $orientation: state.orientation, $isConfigMode: false })) }, item.id));
|
|
858
858
|
}
|
|
859
859
|
// Get current state (disabled and onClick) from contextMenuItems
|
|
860
860
|
const currentState = getCurrentItemState(item.id);
|
|
@@ -863,19 +863,19 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
863
863
|
? currentState.disabled === true
|
|
864
864
|
: item.disabled === true;
|
|
865
865
|
const currentOnClick = currentState.onClick || item.onClick; // Fallback to stored onClick if not found
|
|
866
|
-
return (_jsx(S.DraggableItem, {
|
|
866
|
+
return (_jsx(S.DraggableItem, { $isDragging: state.draggedItemIndex === index, $isDragOver: dragOverIndex === index && state.draggedItemIndex !== index, draggable: enableConfigMode, onDragStart: (e) => handleDragStart(e, index), onDragEnter: (e) => handleDragEnter(e, index), onDragOver: handleDragOver, onDragLeave: (e) => handleDragLeave(e, index), onDrop: (e) => handleDrop(e, index), onDragEnd: handleDragEnd, children: enableConfigMode ? (_jsx(ContextMenu, { items: getItemRightClickMenuItems(item, index), trigger: "right", children: item.staticItem ? (_jsx("div", { children: item.staticItem })) : (_jsx(TMTooltip, { content: item.name, position: "bottom", children: _jsx(S.MenuButton, { onClick: () => {
|
|
867
867
|
if (isDisabled)
|
|
868
868
|
return;
|
|
869
869
|
if (currentOnClick) {
|
|
870
870
|
currentOnClick();
|
|
871
871
|
}
|
|
872
|
-
}, disabled: isDisabled,
|
|
872
|
+
}, disabled: isDisabled, $isActive: item.isToggle, children: item.icon }) })) })) : (item.staticItem ? (_jsx("div", { children: item.staticItem })) : (_jsx(TMTooltip, { content: item.name, position: "bottom", children: _jsx(S.MenuButton, { onClick: () => {
|
|
873
873
|
if (isDisabled)
|
|
874
874
|
return;
|
|
875
875
|
if (currentOnClick) {
|
|
876
876
|
currentOnClick();
|
|
877
877
|
}
|
|
878
|
-
}, disabled: isDisabled,
|
|
878
|
+
}, disabled: isDisabled, $isActive: item.isToggle, children: item.icon }) }))) }, item.id));
|
|
879
879
|
}), enableConfigMode && hasContextMenu && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: getContextMenuItemsWithPinIcons(), trigger: "left", keepOpenOnClick: false, children: _jsx(S.ContextMenuButton, { children: _jsx(IconMenuVertical, {}) }) }))] }));
|
|
880
880
|
};
|
|
881
881
|
export default TMFloatingMenuBar;
|
|
@@ -8,8 +8,8 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
|
|
|
8
8
|
}, {
|
|
9
9
|
$x: number;
|
|
10
10
|
$y: number;
|
|
11
|
-
$orientation:
|
|
12
|
-
$verticalDirection:
|
|
11
|
+
$orientation: 'horizontal' | 'vertical';
|
|
12
|
+
$verticalDirection: 'down' | 'up';
|
|
13
13
|
$isDragging: boolean;
|
|
14
14
|
$isConfigMode: boolean;
|
|
15
15
|
$isConstrained?: boolean;
|
|
@@ -18,20 +18,20 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
|
|
|
18
18
|
}>, {
|
|
19
19
|
$x: number;
|
|
20
20
|
$y: number;
|
|
21
|
-
$orientation:
|
|
22
|
-
$verticalDirection:
|
|
21
|
+
$orientation: 'horizontal' | 'vertical';
|
|
22
|
+
$verticalDirection: 'down' | 'up';
|
|
23
23
|
$isDragging: boolean;
|
|
24
24
|
$isConfigMode: boolean;
|
|
25
25
|
$isConstrained?: boolean;
|
|
26
26
|
$isHidden?: boolean;
|
|
27
27
|
$bgColor?: string;
|
|
28
|
-
}>, "
|
|
28
|
+
}>, "$bgColor" | "$isConfigMode" | "$isConstrained" | "$isDragging" | "$isHidden" | "$orientation" | "$verticalDirection" | "$x" | "$y" | "about" | "accessKey" | "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" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "children" | "className" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "draggable" | "enterKeyHint" | "exportparts" | "hidden" | "id" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "lang" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "part" | "prefix" | "property" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "role" | "security" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "title" | "translate" | "typeof" | "unselectable" | "vocab"> & Partial<Pick<import("styled-components/dist/types").Merged<import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
29
29
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
$x: number;
|
|
32
32
|
$y: number;
|
|
33
|
-
$orientation:
|
|
34
|
-
$verticalDirection:
|
|
33
|
+
$orientation: 'horizontal' | 'vertical';
|
|
34
|
+
$verticalDirection: 'down' | 'up';
|
|
35
35
|
$isDragging: boolean;
|
|
36
36
|
$isConfigMode: boolean;
|
|
37
37
|
$isConstrained?: boolean;
|
|
@@ -40,28 +40,28 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
|
|
|
40
40
|
}>, {
|
|
41
41
|
$x: number;
|
|
42
42
|
$y: number;
|
|
43
|
-
$orientation:
|
|
44
|
-
$verticalDirection:
|
|
43
|
+
$orientation: 'horizontal' | 'vertical';
|
|
44
|
+
$verticalDirection: 'down' | 'up';
|
|
45
45
|
$isDragging: boolean;
|
|
46
46
|
$isConfigMode: boolean;
|
|
47
47
|
$isConstrained?: boolean;
|
|
48
48
|
$isHidden?: boolean;
|
|
49
49
|
$bgColor?: string;
|
|
50
|
-
}>, "
|
|
50
|
+
}>, "$bgColor" | "$isConfigMode" | "$isConstrained" | "$isDragging" | "$isHidden" | "$orientation" | "$verticalDirection" | "$x" | "$y" | "about" | "accessKey" | "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" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "children" | "className" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "draggable" | "enterKeyHint" | "exportparts" | "hidden" | "id" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "lang" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "part" | "prefix" | "property" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "role" | "security" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "tabIndex" | "title" | "translate" | "typeof" | "unselectable" | "vocab">>> & string;
|
|
51
51
|
export declare const GripHandle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
52
52
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
53
53
|
}, {
|
|
54
|
-
$orientation:
|
|
54
|
+
$orientation: 'horizontal' | 'vertical';
|
|
55
55
|
}>> & string;
|
|
56
56
|
export declare const Separator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
57
57
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
58
58
|
}, {
|
|
59
|
-
$orientation:
|
|
59
|
+
$orientation: 'horizontal' | 'vertical';
|
|
60
60
|
}>> & string;
|
|
61
61
|
export declare const ItemSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
62
62
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
63
63
|
}, {
|
|
64
|
-
$orientation:
|
|
64
|
+
$orientation: 'horizontal' | 'vertical';
|
|
65
65
|
$isConfigMode: boolean;
|
|
66
66
|
}>> & string;
|
|
67
67
|
export declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
@@ -86,7 +86,7 @@ export declare const ContextMenuButton: import("styled-components/dist/types").I
|
|
|
86
86
|
as?: import("styled-components").WebTarget | undefined;
|
|
87
87
|
forwardedAs?: import("styled-components").WebTarget | undefined;
|
|
88
88
|
}, "ref"> & {
|
|
89
|
-
ref?: ((instance: HTMLButtonElement | 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]) |
|
|
89
|
+
ref?: import("react").RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | 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]) | null | undefined;
|
|
90
90
|
}, "style"> & {
|
|
91
91
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | (import("react").CSSProperties & {
|
|
92
92
|
[key: `--${string}`]: string | number | undefined;
|
|
@@ -113,5 +113,5 @@ export declare const ContextMenuWrapper: import("styled-components/dist/types").
|
|
|
113
113
|
export declare const ButtonGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
114
114
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
115
115
|
}, {
|
|
116
|
-
$orientation:
|
|
116
|
+
$orientation: 'horizontal' | 'vertical';
|
|
117
117
|
}>> & string;
|
|
@@ -87,11 +87,13 @@ export const StyledReferenceButton = styled.button `
|
|
|
87
87
|
export const StyledPanelPage = styled.div `
|
|
88
88
|
position: absolute;
|
|
89
89
|
width: calc(100% - 50px);
|
|
90
|
-
top:
|
|
91
|
-
left:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
top: 50px;
|
|
91
|
+
left: 50px;
|
|
92
|
+
bottom: ${(props) => props.$isOpen ? '0' : 'auto'};
|
|
93
|
+
height: ${(props) => props.$isOpen ? 'auto' : '0'};
|
|
94
|
+
visibility: ${(props) => props.$isOpen ? 'visible' : 'hidden'};
|
|
95
|
+
content-visibility: ${(props) => props.$isOpen ? 'visible' : 'hidden'};
|
|
96
|
+
border-radius: 0px;
|
|
95
97
|
background: ${(props) => props.$background ?? 'transparent'};
|
|
96
98
|
z-index: 1500;
|
|
97
99
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { LoadIndicator } from 'devextreme-react';
|
|
@@ -293,7 +293,7 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
|
|
|
293
293
|
if (group.badges && group.badges.length > 0) {
|
|
294
294
|
return (_jsx(BadgeContainer, { children: group.badges.map((badgeData, idx) => {
|
|
295
295
|
const badgeKey = `${group.id}-badge-${badgeData.badge}-${idx}`;
|
|
296
|
-
const badge = _jsx(Badge, {
|
|
296
|
+
const badge = _jsx(Badge, { $color: color, children: badgeData.badge });
|
|
297
297
|
if (badgeData.tooltip) {
|
|
298
298
|
return (_jsx(TMTooltip, { content: badgeData.tooltip, children: badge }, badgeKey));
|
|
299
299
|
}
|
|
@@ -301,7 +301,7 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
|
|
|
301
301
|
}) }));
|
|
302
302
|
}
|
|
303
303
|
if (group.dataSource && group.dataSource.length > 0) {
|
|
304
|
-
return _jsx(Badge, {
|
|
304
|
+
return _jsx(Badge, { $color: color, children: group.dataSource.length });
|
|
305
305
|
}
|
|
306
306
|
return null;
|
|
307
307
|
};
|
|
@@ -309,19 +309,19 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
|
|
|
309
309
|
const color = getGroupColor(group, index);
|
|
310
310
|
const isOpen = openAccordions[group.id] ?? true;
|
|
311
311
|
if (group.customComponent) {
|
|
312
|
-
return (_jsxs(AccordionItem, {
|
|
312
|
+
return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, $color: color, $isOpen: isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { $isOpen: isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), isOpen && (_jsx(CustomComponentContainer, { children: group.customComponent }))] }, group.id));
|
|
313
313
|
}
|
|
314
314
|
if (!group.dataSource || group.dataSource.length === 0)
|
|
315
315
|
return null;
|
|
316
316
|
if (!group.renderItem) {
|
|
317
|
-
return (_jsxs(AccordionItem, {
|
|
317
|
+
return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, $color: color, $isOpen: isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { $isOpen: isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { $isOpen: isOpen, $maxHeight: 100, children: _jsxs(ErrorMessage, { children: ["\u26A0\uFE0F renderItem function is required for \"", group.title, "\" group"] }) })] }, group.id));
|
|
318
318
|
}
|
|
319
319
|
const itemHeight = group.itemHeight || 80;
|
|
320
320
|
const maxHeight = group.dataSource.length * itemHeight + 20;
|
|
321
|
-
return (_jsxs(AccordionItem, {
|
|
321
|
+
return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, $color: color, $isOpen: isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { $isOpen: isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { $isOpen: isOpen, $maxHeight: maxHeight, children: _jsx(ItemsList, { children: group.dataSource.map((item, itemIndex) => {
|
|
322
322
|
const isSelected = selectedItem === item;
|
|
323
323
|
const isFocused = focusedItem === item;
|
|
324
|
-
return (_jsx(ListItem, { id: `accordion-item-${group.id}-${itemIndex}`, className: "tm-accordion-list-item",
|
|
324
|
+
return (_jsx(ListItem, { id: `accordion-item-${group.id}-${itemIndex}`, className: "tm-accordion-list-item", $isSelected: isSelected, $color: color, onClick: () => handleItemClick(item, group), onDoubleClick: () => handleItemDoubleClick(item, group), onMouseEnter: () => setFocusedItem(item), onMouseLeave: () => setFocusedItem(undefined), onContextMenu: (e) => handleContextMenu(e, item, group), children: group.renderItem(item, isSelected, isFocused, color) }, itemIndex * 2));
|
|
325
325
|
}) }) })] }, group.id));
|
|
326
326
|
};
|
|
327
327
|
if (!isInitialized) {
|
|
@@ -13,54 +13,54 @@ interface AlertModes {
|
|
|
13
13
|
}
|
|
14
14
|
declare const TMAlertPosition: {
|
|
15
15
|
readonly TOP_RIGHT: {
|
|
16
|
-
readonly top:
|
|
17
|
-
readonly right:
|
|
18
|
-
readonly position:
|
|
16
|
+
readonly top: '10px';
|
|
17
|
+
readonly right: '10px';
|
|
18
|
+
readonly position: 'absolute';
|
|
19
19
|
};
|
|
20
20
|
readonly TOP_CENTER: {
|
|
21
|
-
readonly top:
|
|
22
|
-
readonly left:
|
|
23
|
-
readonly transform:
|
|
24
|
-
readonly position:
|
|
21
|
+
readonly top: '10px';
|
|
22
|
+
readonly left: '50%';
|
|
23
|
+
readonly transform: 'translateX(-50%)';
|
|
24
|
+
readonly position: 'absolute';
|
|
25
25
|
};
|
|
26
26
|
readonly TOP_LEFT: {
|
|
27
|
-
readonly top:
|
|
28
|
-
readonly left:
|
|
29
|
-
readonly position:
|
|
27
|
+
readonly top: '10px';
|
|
28
|
+
readonly left: '10px';
|
|
29
|
+
readonly position: 'absolute';
|
|
30
30
|
};
|
|
31
31
|
readonly BOTTOM_RIGHT: {
|
|
32
|
-
readonly bottom:
|
|
33
|
-
readonly right:
|
|
34
|
-
readonly position:
|
|
32
|
+
readonly bottom: '10px';
|
|
33
|
+
readonly right: '10px';
|
|
34
|
+
readonly position: 'absolute';
|
|
35
35
|
};
|
|
36
36
|
readonly BOTTOM_LEFT: {
|
|
37
|
-
readonly bottom:
|
|
38
|
-
readonly left:
|
|
39
|
-
readonly position:
|
|
37
|
+
readonly bottom: '10px';
|
|
38
|
+
readonly left: '10px';
|
|
39
|
+
readonly position: 'absolute';
|
|
40
40
|
};
|
|
41
41
|
readonly BOTTOM_CENTER: {
|
|
42
|
-
readonly bottom:
|
|
43
|
-
readonly left:
|
|
44
|
-
readonly transform:
|
|
45
|
-
readonly position:
|
|
42
|
+
readonly bottom: '10px';
|
|
43
|
+
readonly left: '50%';
|
|
44
|
+
readonly transform: 'translateX(-50%)';
|
|
45
|
+
readonly position: 'absolute';
|
|
46
46
|
};
|
|
47
47
|
readonly CENTER_RIGHT: {
|
|
48
|
-
readonly top:
|
|
49
|
-
readonly right:
|
|
50
|
-
readonly transform:
|
|
51
|
-
readonly position:
|
|
48
|
+
readonly top: '50%';
|
|
49
|
+
readonly right: '10px';
|
|
50
|
+
readonly transform: 'translateY(-50%)';
|
|
51
|
+
readonly position: 'absolute';
|
|
52
52
|
};
|
|
53
53
|
readonly CENTER_LEFT: {
|
|
54
|
-
readonly top:
|
|
55
|
-
readonly left:
|
|
56
|
-
readonly transform:
|
|
57
|
-
readonly position:
|
|
54
|
+
readonly top: '50%';
|
|
55
|
+
readonly left: '10px';
|
|
56
|
+
readonly transform: 'translateY(-50%)';
|
|
57
|
+
readonly position: 'absolute';
|
|
58
58
|
};
|
|
59
59
|
readonly CENTER_CENTER: {
|
|
60
|
-
readonly top:
|
|
61
|
-
readonly left:
|
|
62
|
-
readonly transform:
|
|
63
|
-
readonly position:
|
|
60
|
+
readonly top: '50%';
|
|
61
|
+
readonly left: '50%';
|
|
62
|
+
readonly transform: 'translate(-50%, -50%)';
|
|
63
|
+
readonly position: 'absolute';
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
declare const ShowAlert: ({ mode, message, duration, title, position }: {
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
|
4
4
|
import { IconCloseCircle, IconInfo, IconSuccess, IconWarning } from '../../helper';
|
|
5
|
+
import { DeviceType, TMDeviceProvider, useDeviceType } from './TMDeviceProvider';
|
|
5
6
|
const TMAlertPosition = {
|
|
6
7
|
TOP_RIGHT: { top: '10px', right: '10px', position: 'absolute' },
|
|
7
8
|
TOP_CENTER: { top: '10px', left: '50%', transform: 'translateX(-50%)', position: 'absolute' },
|
|
@@ -45,13 +46,8 @@ const Mode = {
|
|
|
45
46
|
};
|
|
46
47
|
// const TMAlert = ({ mode, duration = 5000, message, position = 'BOTTOM_CENTER' }: { mode: keyof AlertModes, duration?: number, message: string, position?: keyof typeof TMAlertPosition }) => {
|
|
47
48
|
const TMAlert = ({ mode, duration = 1000, title, message, position = 'BOTTOM_RIGHT' }) => {
|
|
48
|
-
const
|
|
49
|
+
const deviceType = useDeviceType();
|
|
49
50
|
const [container] = useState(document.getElementsByClassName('tm-alert-temporary-container'));
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
window.addEventListener('resize', () => {
|
|
52
|
-
setCurrentWidth(window.innerWidth);
|
|
53
|
-
});
|
|
54
|
-
}, [currentWidth]);
|
|
55
51
|
useEffect(() => {
|
|
56
52
|
const tiemout = setTimeout(() => {
|
|
57
53
|
let container = document.getElementsByClassName('tm-alert-temporary-container');
|
|
@@ -63,7 +59,9 @@ const TMAlert = ({ mode, duration = 1000, title, message, position = 'BOTTOM_RIG
|
|
|
63
59
|
}, [container]);
|
|
64
60
|
// Determine the style for the alert container based on the position prop
|
|
65
61
|
const alertContainerStyle = TMAlertPosition[position];
|
|
66
|
-
|
|
62
|
+
// Su mobile l'alert e' piu' basso e con testo piu' piccolo: la versione desktop copre troppo schermo.
|
|
63
|
+
const isMobile = deviceType === DeviceType.MOBILE;
|
|
64
|
+
return (_jsx("div", { style: { width: '100%', paddingTop: '3px', ...alertContainerStyle }, children: _jsx("div", { className: 'tm-alert-animation-style', style: { animationDuration: `${duration}ms`, position: 'relative', float: 'right', zIndex: '20000999', width: isMobile ? 'min(300px, calc(100vw - 20px))' : '356px', height: isMobile ? '58px' : '86px', borderRadius: '8px', overflow: 'hidden', border: '2px white solid', boxShadow: '0px 3px 6px #00000029' }, children: _jsx("div", { className: 'tm-alert-animation-style', style: { animationDuration: `${duration}ms` }, children: _jsxs("div", { className: 'tm-alert-container', style: { background: Mode[mode].color, animationDuration: `${duration}ms` }, children: [_jsxs("div", { className: "tm-alert-context", style: { position: 'relative' }, children: [_jsx("div", { className: 'tm-alert-icon', style: { position: 'absolute', top: isMobile ? '8px' : '12px', left: isMobile ? '8px' : '12px', paddingTop: '1px' }, children: Mode[mode].icon }), _jsx("div", { style: { color: Mode[mode].textColor, position: 'absolute', top: isMobile ? '7px' : '15px', left: isMobile ? '38px' : '45px', textAlign: 'left', fontSize: isMobile ? '0.85rem' : '1.1rem', fontWeight: 'bold', maxWidth: isMobile ? 'calc(100% - 46px)' : '280px', ...(isMobile && { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }) }, children: title }), _jsx("div", { style: { color: Mode[mode].textColor, position: 'absolute', top: isMobile ? '25px' : '35px', left: isMobile ? '38px' : '45px', textAlign: 'left', fontSize: isMobile ? '0.8rem' : '1rem', maxWidth: isMobile ? 'calc(100% - 46px)' : '280px', ...(isMobile && { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }) }, children: message })] }), _jsx("div", { className: 'tm-alert-loading', style: { backgroundImage: `linear-gradient(to right, ${Mode[mode].borderColor}, ${Mode[mode].textColor})`, animationDuration: `${duration}ms` } })] }) }) }) }));
|
|
67
65
|
};
|
|
68
66
|
const ShowAlert = ({ mode, message, duration, title, position = 'BOTTOM_RIGHT' }) => {
|
|
69
67
|
let container = document.createElement('div');
|
|
@@ -72,6 +70,6 @@ const ShowAlert = ({ mode, message, duration, title, position = 'BOTTOM_RIGHT' }
|
|
|
72
70
|
// container.style.position = 'relative'
|
|
73
71
|
container.style.display = 'flex';
|
|
74
72
|
const root = ReactDOM.createRoot(container);
|
|
75
|
-
root.render(_jsx(React.StrictMode, { children: _jsx(TMAlert, { message: message, mode: mode, duration: duration, title: title, position: position }) }));
|
|
73
|
+
root.render(_jsx(React.StrictMode, { children: _jsx(TMDeviceProvider, { children: _jsx(TMAlert, { message: message, mode: mode, duration: duration, title: title, position: position }) }) }));
|
|
76
74
|
};
|
|
77
75
|
export default ShowAlert;
|