@topconsultnpm/sdkui-react 6.20.0-dev1.114 → 6.20.0-dev1.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { ContextMenu } from '../ContextMenu';
|
|
4
4
|
import ShowAlert from '../../base/TMAlert';
|
|
@@ -915,6 +915,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
915
915
|
},
|
|
916
916
|
},
|
|
917
917
|
...(!disbaleConfigMode ? [{
|
|
918
|
+
beginGroup: true,
|
|
918
919
|
name: SDKUI_Localizator.Configure,
|
|
919
920
|
icon: _jsx(IconSettings, { fontSize: 16 }),
|
|
920
921
|
onClick: () => {
|
|
@@ -930,6 +931,40 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
930
931
|
},
|
|
931
932
|
];
|
|
932
933
|
}, [state.items, state.isConfigMode, state.orientation, removeItem, createSeparator, toggleConfigMode, toggleOrientation, disbaleConfigMode]);
|
|
934
|
+
const getSeparatorRightClickMenuItems = useCallback((index) => {
|
|
935
|
+
return [
|
|
936
|
+
{
|
|
937
|
+
name: 'Rimuovi',
|
|
938
|
+
icon: _jsx(IconDelete, { fontSize: 16 }),
|
|
939
|
+
onClick: () => removeItem(state.items[index].id),
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: 'Aggiungi separatore a destra',
|
|
943
|
+
icon: _jsx(IconSeparator, { style: { transform: 'rotate(-90deg)' }, fontSize: 16 }),
|
|
944
|
+
disabled: true,
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: 'Aggiungi separatore a sinistra',
|
|
948
|
+
icon: _jsx(IconSeparator, { fontSize: 16 }),
|
|
949
|
+
disabled: true,
|
|
950
|
+
},
|
|
951
|
+
...(!disbaleConfigMode ? [{
|
|
952
|
+
beginGroup: true,
|
|
953
|
+
name: SDKUI_Localizator.Configure,
|
|
954
|
+
icon: _jsx(IconSettings, { fontSize: 16 }),
|
|
955
|
+
onClick: () => {
|
|
956
|
+
if (!state.isConfigMode) {
|
|
957
|
+
toggleConfigMode();
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
}] : []),
|
|
961
|
+
{
|
|
962
|
+
name: state.orientation === 'horizontal' ? 'Floating bar verticale' : 'Floating bar orizzontale',
|
|
963
|
+
icon: _jsx(IconRotate, { fontSize: 16 }),
|
|
964
|
+
onClick: toggleOrientation,
|
|
965
|
+
},
|
|
966
|
+
];
|
|
967
|
+
}, [state.items, state.isConfigMode, state.orientation, removeItem, toggleConfigMode, toggleOrientation, disbaleConfigMode]);
|
|
933
968
|
// Drag and drop for reordering
|
|
934
969
|
const handleDragStart = (e, index) => {
|
|
935
970
|
if (!state.isConfigMode)
|
|
@@ -1002,7 +1037,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
1002
1037
|
], trigger: "right", children: _jsx(S.GripHandle, { "$orientation": state.orientation, onMouseDown: handleMouseDown, onTouchStart: handleTouchStart, onDoubleClick: handleGripDoubleClick, children: _jsx(IconDraggableDots, {}) }) })) : (_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) => {
|
|
1003
1038
|
// Handle separator items
|
|
1004
1039
|
if (item.isSeparator) {
|
|
1005
|
-
return (
|
|
1040
|
+
return (_jsx(S.DraggableItem, { "$isDragging": state.draggedItemIndex === index, "$isDragOver": dragOverIndex === index && state.draggedItemIndex !== index, draggable: state.isConfigMode, 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: state.isConfigMode ? (_jsxs(_Fragment, { children: [_jsx(S.ItemSeparator, { "$orientation": state.orientation, "$isConfigMode": state.isConfigMode }), _jsx(S.RemoveButton, { onClick: () => removeItem(item.id), children: "\u00D7" })] })) : (_jsx(ContextMenu, { items: getSeparatorRightClickMenuItems(index), trigger: "right", children: _jsx(S.ItemSeparator, { "$orientation": state.orientation, "$isConfigMode": state.isConfigMode }) })) }, item.id));
|
|
1006
1041
|
}
|
|
1007
1042
|
// Get current state (disabled and onClick) from contextMenuItems
|
|
1008
1043
|
const currentState = getCurrentItemState(item.id);
|
|
@@ -264,7 +264,7 @@ const TMLoginForm = (props) => {
|
|
|
264
264
|
{ value: AuthenticationModes.TopMediaWithMFA, display: LOGINLocalizator.TopMediaWithMFA },
|
|
265
265
|
{ value: AuthenticationModes.TopMediaOnBehalfOf, display: SDKUI_Localizator.AuthMode_OnBehalfOf },
|
|
266
266
|
{ value: AuthenticationModes.WindowsThroughTopMedia, display: SDKUI_Localizator.AuthMode_WindowsViaTopMedia },
|
|
267
|
-
{ value: AuthenticationModes.MSAzure, display: '
|
|
267
|
+
{ value: AuthenticationModes.MSAzure, display: 'Microsoft Entra ID' }];
|
|
268
268
|
}, [props.cultureID]);
|
|
269
269
|
const accessPointAdditionalIcons = useMemo(() => {
|
|
270
270
|
return [
|