@topconsultnpm/sdkui-react 6.20.0-dev1.36 → 6.20.0-dev1.38

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.
@@ -200,6 +200,6 @@ const TMContextMenu = ({ items, trigger = 'right', children, externalControl })
200
200
  if (e.key === 'Enter' || e.key === ' ') {
201
201
  handleClick(e);
202
202
  }
203
- }, role: "button", tabIndex: 0, style: { display: 'inline-block' }, children: children })), menuState.visible && (_jsxs(_Fragment, { children: [_jsx(S.Overlay, { onClick: handleClose }), _jsxs(S.MenuContainer, { ref: menuRef, "$x": menuState.position.x, "$y": menuState.position.y, "$openLeft": openLeft, "$openUp": openUp, "$isPositioned": isCalculated, "$externalControl": !!externalControl, 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, { "$parentRect": submenu.parentRect, "$openUp": submenu.openUp, "data-submenu": "true", onMouseEnter: handleSubmenuMouseEnter, onMouseLeave: () => handleMouseLeave(submenu.depth), children: renderMenuItems(submenu.items, submenu.depth) }, `submenu-${submenu.depth}-${idx}`)))] }))] }));
203
+ }, role: "button", tabIndex: 0, style: { display: 'inline-block' }, children: children })), menuState.visible && (_jsxs(_Fragment, { children: [_jsxs(S.MenuContainer, { ref: menuRef, "$x": menuState.position.x, "$y": menuState.position.y, "$openLeft": openLeft, "$openUp": openUp, "$isPositioned": isCalculated, "$externalControl": !!externalControl, 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, { "$parentRect": submenu.parentRect, "$openUp": submenu.openUp, "data-submenu": "true", onMouseEnter: handleSubmenuMouseEnter, onMouseLeave: () => handleMouseLeave(submenu.depth), children: renderMenuItems(submenu.items, submenu.depth) }, `submenu-${submenu.depth}-${idx}`)))] }))] }));
204
204
  };
205
205
  export default TMContextMenu;
@@ -25,7 +25,7 @@ export const MenuContainer = styled.div `
25
25
  right: ${props => props.$openLeft ? `${window.innerWidth - props.$x}px` : 'auto'};
26
26
  top: ${props => props.$openUp ? 'auto' : `${props.$y}px`};
27
27
  bottom: ${props => props.$openUp ? `${window.innerHeight - props.$y}px` : 'auto'};
28
- z-index: 10000;
28
+ z-index: 10100;
29
29
  background: #ffffff;
30
30
  border-radius: 12px;
31
31
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
@@ -223,7 +223,7 @@ export const Submenu = styled.div `
223
223
  // If openUp is true, anchor to bottom and grow upward
224
224
  return props.$openUp ? `${globalThis.innerHeight - props.$parentRect.bottom - 8}px` : 'auto';
225
225
  }};
226
- z-index: 10001;
226
+ z-index: 10101;
227
227
  background: #ffffff;
228
228
  border-radius: 12px;
229
229
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
@@ -1,4 +1,5 @@
1
1
  export interface TMContextMenuItemProps {
2
+ id?: string;
2
3
  name: string;
3
4
  icon?: React.ReactNode;
4
5
  disabled?: boolean;
@@ -4,7 +4,7 @@ import { ContextMenu } from '../ContextMenu';
4
4
  import ShowAlert from '../../base/TMAlert';
5
5
  import TMTooltip from '../../base/TMTooltip';
6
6
  import * as S from './styles';
7
- import { IconApply, IconMenuKebab, IconMenuVertical, IconPencil, IconPin, SDKUI_Globals } from '../../../helper';
7
+ import { IconAdd, IconApply, IconMenuVertical, IconPencil, IconPin, IconUndo, SDKUI_Globals, SDKUI_Localizator } from '../../../helper';
8
8
  const IconDraggableDots = (props) => (_jsx("svg", { fontSize: 18, viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: _jsx("path", { d: "M9 3a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm10-18a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0zm0 9a2 2 0 11-4 0 2 2 0 014 0z" }) }));
9
9
  const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained = false, defaultPosition = { x: 100, y: 100 }, maxItems = 8, }) => {
10
10
  const getDefaultConfig = () => ({
@@ -57,6 +57,19 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
57
57
  : 'horizontal';
58
58
  // Validate itemIds
59
59
  const validItemIds = Array.isArray(settings.itemIds) ? settings.itemIds : [];
60
+ // IMPORTANT: Detect old name-based configurations and reset them
61
+ // Old configs would have saved items, but those items don't have proper IDs from menu items
62
+ // New IDs are short like 'fav', 'dl', 'open-form', etc.
63
+ // If we detect old-style data (no items have valid IDs), reset to empty
64
+ if (validItemIds.length > 0) {
65
+ // Check if any ID looks like the old format (contains language-specific text or is too long)
66
+ const hasOldFormatIds = validItemIds.some(id => typeof id === 'string' && (id.length > 20 || id.includes(' ')));
67
+ if (hasOldFormatIds) {
68
+ console.warn('FloatingMenuBar: Detected old name-based configuration, resetting to defaults');
69
+ resetFloatingBarSettings();
70
+ return getDefaultConfig();
71
+ }
72
+ }
60
73
  // Check if position was actually saved (not just the default class value)
61
74
  const hasSavedPosition = settings.position.x !== 100 || settings.position.y !== 100 || validItemIds.length > 0;
62
75
  return {
@@ -89,6 +102,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
89
102
  const floatingRef = useRef(null);
90
103
  const dragOffset = useRef({ x: 0, y: 0 });
91
104
  const [dragOverIndex, setDragOverIndex] = useState(null);
105
+ const stateSnapshot = useRef(null);
92
106
  // Use refs to track item IDs without causing re-renders
93
107
  const floatingBarItemIds = useRef(new Set());
94
108
  const floatingBarItemNames = useRef(new Set());
@@ -101,11 +115,12 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
101
115
  const flattenMenuItems = useCallback((items, parentPath = '') => {
102
116
  const result = [];
103
117
  items.forEach((item, index) => {
104
- const itemId = `${parentPath}${item.name}-${index}`;
118
+ // Use the actual item.id if available, otherwise fall back to generating from name
119
+ const itemId = item.id || `${parentPath}${item.name}-${index}`;
105
120
  // Only add items that have onClick (final actions, not submenu parents)
106
121
  if (item.onClick && !item.submenu) {
107
- // Check if item is currently in the floating bar
108
- const isPinned = state.items.some(i => i.id === itemId || i.name === item.name);
122
+ // Check if item is currently in the floating bar by ID only
123
+ const isPinned = state.items.some(i => i.id === itemId);
109
124
  result.push({
110
125
  id: itemId,
111
126
  name: item.name,
@@ -138,10 +153,10 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
138
153
  }, []); // Only run once on mount
139
154
  const togglePin = useCallback((item) => {
140
155
  setState(s => {
141
- const isInFloatingBar = s.items.some(i => i.id === item.id || i.name === item.name);
156
+ const isInFloatingBar = s.items.some(i => i.id === item.id);
142
157
  if (isInFloatingBar) {
143
158
  // Remove from floating bar
144
- const newItems = s.items.filter(i => i.id !== item.id && i.name !== item.name);
159
+ const newItems = s.items.filter(i => i.id !== item.id);
145
160
  return { ...s, items: newItems };
146
161
  }
147
162
  else {
@@ -160,11 +175,14 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
160
175
  });
161
176
  }, [maxItems]);
162
177
  // Get current item state (disabled and onClick) from contextMenuItems
163
- const getCurrentItemState = useCallback((itemName) => {
178
+ const getCurrentItemState = useCallback((itemId) => {
164
179
  const findInItems = (items) => {
165
- for (const item of items) {
166
- if (item.name === itemName)
180
+ for (let i = 0; i < items.length; i++) {
181
+ const item = items[i];
182
+ // Match by ID if the item has one
183
+ if (item.id === itemId)
167
184
  return item;
185
+ // Check in submenu
168
186
  if (item.submenu) {
169
187
  const found = findInItems(item.submenu);
170
188
  if (found)
@@ -178,34 +196,34 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
178
196
  disabled: foundItem?.disabled,
179
197
  onClick: foundItem?.onClick
180
198
  };
181
- }, [contextMenuItems]); // Enhanced context menu items with pin functionality
182
- const enhancedContextMenuItems = useCallback(() => {
199
+ }, [contextMenuItems]);
200
+ // Create context menu items for pinning (used by + button in edit mode)
201
+ const getPinContextMenuItems = useCallback(() => {
183
202
  const flatItems = flattenMenuItems(contextMenuItems);
184
- // Calculate current pinned items directly from state.items (not refs)
185
203
  const currentItemIds = new Set(state.items.map(i => i.id));
186
- const currentItemNames = new Set(state.items.map(i => i.name));
187
- const enhanceItems = (items) => {
204
+ const createPinItems = (items) => {
188
205
  return items.map(item => {
189
- const flatItem = flatItems.find(fi => fi.name === item.name);
190
- const itemId = flatItem?.id || '';
191
- // Check if item is in the floating bar using current state
192
- const isInFloatingBar = currentItemIds.has(itemId) || currentItemNames.has(item.name);
193
- const enhanced = {
206
+ const flatItem = flatItems.find(fi => fi.id === item.id);
207
+ const itemId = flatItem?.id || item.id || '';
208
+ const isAlreadyPinned = currentItemIds.has(itemId);
209
+ const pinItem = {
194
210
  ...item,
195
- rightIcon: item.onClick && !item.submenu ? (isInFloatingBar ? _jsx(IconPin, { color: "#e12a2a" }) : _jsx(IconPin, {})) : undefined,
196
- onRightIconClick: item.onClick && !item.submenu ? () => {
197
- if (flatItem) {
211
+ // Override onClick to pin instead of executing the action
212
+ onClick: item.onClick && !item.submenu ? () => {
213
+ if (flatItem && !isAlreadyPinned) {
198
214
  togglePin(flatItem);
199
215
  }
200
216
  } : undefined,
217
+ // Remove original disabled state - only disable already pinned items
218
+ disabled: isAlreadyPinned,
201
219
  };
202
220
  if (item.submenu) {
203
- enhanced.submenu = enhanceItems(item.submenu);
221
+ pinItem.submenu = createPinItems(item.submenu);
204
222
  }
205
- return enhanced;
223
+ return pinItem;
206
224
  });
207
225
  };
208
- return enhanceItems(contextMenuItems);
226
+ return createPinItems(contextMenuItems);
209
227
  }, [contextMenuItems, flattenMenuItems, togglePin, state.items]);
210
228
  const handleMouseDown = (e) => {
211
229
  if (state.isConfigMode)
@@ -230,6 +248,9 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
230
248
  }
231
249
  setState(s => ({ ...s, isDragging: true }));
232
250
  };
251
+ const handleGripDoubleClick = () => {
252
+ toggleOrientation();
253
+ };
233
254
  const handleMouseMove = useCallback((e) => {
234
255
  if (!state.isDragging || !containerRef.current || !floatingRef.current)
235
256
  return;
@@ -271,8 +292,10 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
271
292
  }
272
293
  return undefined;
273
294
  }, [state.isDragging, handleMouseMove, handleMouseUp]);
274
- // Save to SDKUI_Globals.userSettings whenever config changes (including position)
295
+ // Save to SDKUI_Globals.userSettings only when NOT in config mode (when applying changes)
275
296
  useEffect(() => {
297
+ if (state.isConfigMode)
298
+ return; // Don't save during edit mode
276
299
  try {
277
300
  // Replace the entire object to trigger the Proxy
278
301
  SDKUI_Globals.userSettings.searchSettings.floatingMenuBar = {
@@ -284,9 +307,44 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
284
307
  catch (error) {
285
308
  console.error('Failed to save FloatingMenuBar config:', error);
286
309
  }
287
- }, [state.orientation, state.items, state.position]);
310
+ }, [state.orientation, state.items, state.position, state.isConfigMode]);
288
311
  const toggleConfigMode = () => {
289
- setState(s => ({ ...s, isConfigMode: !s.isConfigMode }));
312
+ setState(s => {
313
+ if (!s.isConfigMode) {
314
+ // Entering edit mode - save snapshot
315
+ stateSnapshot.current = {
316
+ items: [...s.items],
317
+ orientation: s.orientation,
318
+ position: { ...s.position },
319
+ };
320
+ return { ...s, isConfigMode: true };
321
+ }
322
+ else {
323
+ // Exiting edit mode (applying changes) - clear snapshot
324
+ stateSnapshot.current = null;
325
+ return { ...s, isConfigMode: false };
326
+ }
327
+ });
328
+ };
329
+ const handleUndo = () => {
330
+ if (stateSnapshot.current) {
331
+ setState(s => ({
332
+ ...s,
333
+ items: [...stateSnapshot.current.items],
334
+ orientation: stateSnapshot.current.orientation,
335
+ position: { ...stateSnapshot.current.position },
336
+ isConfigMode: true, // Stay in edit mode
337
+ }));
338
+ }
339
+ };
340
+ // Check if current state has changed from snapshot
341
+ const hasChanges = () => {
342
+ if (!stateSnapshot.current)
343
+ return false;
344
+ // Check if items have changed (different IDs or different order)
345
+ const currentIds = state.items.map(i => i.id).join(',');
346
+ const snapshotIds = stateSnapshot.current.items.map(i => i.id).join(',');
347
+ return currentIds !== snapshotIds;
290
348
  };
291
349
  const toggleOrientation = () => {
292
350
  const newOrientation = state.orientation === 'horizontal' ? 'vertical' : 'horizontal';
@@ -383,9 +441,9 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
383
441
  setState(s => ({ ...s, draggedItemIndex: null }));
384
442
  setDragOverIndex(null);
385
443
  };
386
- return (_jsxs(_Fragment, { children: [_jsx(S.Overlay, { "$visible": state.isConfigMode }), _jsxs(S.FloatingContainer, { ref: floatingRef, "$x": state.position.x, "$y": state.position.y, "$orientation": state.orientation, "$isDragging": state.isDragging, "$isConfigMode": state.isConfigMode, "$isConstrained": isConstrained, children: [_jsx(S.GripHandle, { "$orientation": state.orientation, onMouseDown: handleMouseDown, children: _jsx(IconDraggableDots, {}) }), _jsx(S.Separator, { "$orientation": state.orientation }), state.items.map((item, index) => {
444
+ return (_jsxs(_Fragment, { children: [_jsx(S.Overlay, { "$visible": state.isConfigMode }), _jsxs(S.FloatingContainer, { ref: floatingRef, "$x": state.position.x, "$y": state.position.y, "$orientation": state.orientation, "$isDragging": state.isDragging, "$isConfigMode": state.isConfigMode, "$isConstrained": isConstrained, children: [_jsx(S.GripHandle, { "$orientation": state.orientation, onMouseDown: handleMouseDown, onDoubleClick: handleGripDoubleClick, children: _jsx(IconDraggableDots, {}) }), _jsx(S.Separator, { "$orientation": state.orientation }), state.items.map((item, index) => {
387
445
  // Get current state (disabled and onClick) from contextMenuItems
388
- const currentState = getCurrentItemState(item.name);
446
+ const currentState = getCurrentItemState(item.id);
389
447
  const isDisabled = currentState.disabled || false;
390
448
  const currentOnClick = currentState.onClick || item.onClick; // Fallback to stored onClick if not found
391
449
  return (_jsxs(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 ? (_jsx(S.MenuButton, { onClick: () => {
@@ -401,6 +459,6 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
401
459
  currentOnClick();
402
460
  }
403
461
  }, disabled: isDisabled, children: item.icon }) })), state.isConfigMode && (_jsx(S.RemoveButton, { onClick: () => removeItem(item.id), children: "\u00D7" }))] }, item.id));
404
- }), !state.isConfigMode && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: enhancedContextMenuItems(), trigger: "left", children: _jsx(S.ContextMenuButton, { children: _jsx(IconMenuVertical, {}) }) }, state.items.map(i => i.id).join(','))), _jsx(S.ConfigButton, { onClick: toggleConfigMode, "$isActive": state.isConfigMode, children: state.isConfigMode ? _jsx(IconApply, {}) : _jsx(IconPencil, {}) }), !state.isConfigMode && (_jsx(S.OrientationToggle, { "$orientation": state.orientation, onClick: toggleOrientation, children: _jsx(IconMenuKebab, {}) }))] })] }));
462
+ }), !state.isConfigMode && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(S.ContextMenuButton, { children: _jsx(IconMenuVertical, {}) }) })), state.isConfigMode && state.items.length < maxItems && contextMenuItems.length > 0 && (_jsx(ContextMenu, { items: getPinContextMenuItems(), trigger: "left", children: _jsx(TMTooltip, { content: SDKUI_Localizator.Add, children: _jsx(S.AddButton, { children: _jsx(IconAdd, {}) }) }) })), _jsx(S.Separator, { "$orientation": state.orientation }), _jsxs(S.ButtonGroup, { "$orientation": state.orientation, children: [state.isConfigMode && (_jsx(TMTooltip, { content: SDKUI_Localizator.Undo, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.UndoButton, { onClick: handleUndo, disabled: !hasChanges(), children: _jsx(IconUndo, { fontSize: 18 }) }) })), state.isConfigMode ? (_jsx(TMTooltip, { content: state.items.length === 0 ? 'Devi aggiungere almeno un item' : SDKUI_Localizator.ApplyAndClose, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.ApplyButton, { onClick: toggleConfigMode, disabled: state.items.length === 0, children: _jsx(IconApply, { fontSize: 20 }) }) })) : (_jsx(TMTooltip, { content: SDKUI_Localizator.Configure, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.ConfigButton, { onClick: toggleConfigMode, children: _jsx(IconPencil, {}) }) }))] })] })] }));
405
463
  };
406
464
  export default TMFloatingMenuBar;
@@ -27,20 +27,21 @@ export declare const Separator: import("styled-components/dist/types").IStyledCo
27
27
  export declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
28
28
  $isActive?: boolean;
29
29
  }>> & string;
30
- export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
31
- $isActive?: boolean;
32
- }>> & string;
30
+ export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
31
+ export declare const ApplyButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
33
32
  export declare const ContextMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$isActive"> & {
34
33
  $isActive?: boolean;
35
34
  }, "ref"> & {
36
35
  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]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
37
36
  }, never>> & string;
37
+ export declare const AddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
38
38
  export declare const RemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
39
- export declare const OrientationToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
40
- $orientation: "horizontal" | "vertical";
41
- }>> & string;
39
+ export declare const UndoButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
42
40
  export declare const DraggableItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
43
41
  $isDragging: boolean;
44
42
  $isDragOver: boolean;
45
43
  }>> & string;
46
44
  export declare const ContextMenuWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
45
+ export declare const ButtonGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
46
+ $orientation: "horizontal" | "vertical";
47
+ }>> & string;
@@ -41,14 +41,13 @@ export const FloatingContainer = styled.div.attrs(props => ({
41
41
  display: flex;
42
42
  flex-direction: ${props => props.$orientation === 'horizontal' ? 'row' : 'column'};
43
43
  align-items: center;
44
- background: ${props => props.$isDragging || props.$isConfigMode
45
- ? 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
46
- : 'rgba(102, 126, 234, 0.9)'};
47
- border: 1px solid rgba(255, 255, 255, 0.2);
44
+ background: linear-gradient(135deg, #0071BC 0%, #1B1464 100%);
45
+ border: 1px solid #667eea;
48
46
  border-radius: 14px;
49
47
  padding: 6px;
50
48
  gap: 3px;
51
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
49
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
50
+ 0 6px 16px rgba(0, 0, 0, 0.2);
52
51
  cursor: ${props => props.$isDragging ? 'grabbing' : 'default'};
53
52
  user-select: none;
54
53
  animation: ${props => props.$isConfigMode && css `${shake} 0.3s ease-in-out`};
@@ -62,10 +61,8 @@ export const FloatingContainer = styled.div.attrs(props => ({
62
61
  }
63
62
 
64
63
  [data-theme='dark'] & {
65
- background: ${props => props.$isDragging || props.$isConfigMode
66
- ? 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'
67
- : 'rgba(26, 26, 46, 0.9)'};
68
- border-color: rgba(255, 255, 255, 0.1);
64
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
65
+ border: 1px solid #1a1a2e;
69
66
 
70
67
  &:hover {
71
68
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
@@ -143,30 +140,29 @@ export const ConfigButton = styled.button `
143
140
  display: flex;
144
141
  align-items: center;
145
142
  justify-content: center;
146
- width: 28px;
147
- height: 28px;
148
- background: ${props => props.$isActive
149
- ? 'rgba(0, 0, 0, 0.2)'
150
- : 'rgba(0, 0, 0, 0.1)'};
151
- border: 1px solid ${props => props.$isActive
152
- ? 'rgba(255, 255, 255, 0.3)'
153
- : 'rgba(255, 255, 255, 0.15)'};
154
- border-radius: 8px;
155
- color: white;
156
- font-size: 14px;
143
+ width: 21px;
144
+ height: 21px;
145
+ background: transparent;
146
+ border: none;
147
+ border-radius: 4px;
148
+ color: rgba(255, 255, 255, 0.5);
149
+ font-size: 10px;
157
150
  cursor: pointer;
158
- transition: background 0.2s ease, border-color 0.2s ease;
159
- position: relative;
151
+ transition: all 0.2s ease;
152
+ padding: 4px;
160
153
 
161
- &:hover {
162
- background: ${props => props.$isActive
163
- ? 'rgba(0, 0, 0, 0.25)'
164
- : 'rgba(0, 0, 0, 0.15)'};
165
- border-color: rgba(255, 255, 255, 0.35);
154
+ &:hover:not(:disabled) {
155
+ background: rgba(255, 255, 255, 0.1);
156
+ color: rgba(255, 255, 255, 0.8);
166
157
  }
167
158
 
168
- &:active {
169
- opacity: 0.8;
159
+ &:active:not(:disabled) {
160
+ transform: scale(0.9);
161
+ }
162
+
163
+ &:disabled {
164
+ opacity: 0.3;
165
+ cursor: not-allowed;
170
166
  }
171
167
 
172
168
  svg {
@@ -174,11 +170,74 @@ export const ConfigButton = styled.button `
174
170
  height: 16px;
175
171
  }
176
172
  `;
173
+ export const ApplyButton = styled.button `
174
+ display: flex;
175
+ align-items: center;
176
+ justify-content: center;
177
+ width: 24px;
178
+ height: 24px;
179
+ background: transparent;
180
+ border: none;
181
+ border-radius: 4px;
182
+ color: rgba(34, 197, 94, 1);
183
+ font-size: 10px;
184
+ cursor: pointer;
185
+ transition: all 0.2s ease;
186
+ padding: 3px;
187
+
188
+ &:hover:not(:disabled) {
189
+ background: rgba(255, 255, 255, 0.1);
190
+ color: rgba(34, 197, 94, 1);
191
+ }
192
+
193
+ &:active:not(:disabled) {
194
+ transform: scale(0.9);
195
+ }
196
+
197
+ &:disabled {
198
+ opacity: 0.3;
199
+ cursor: not-allowed;
200
+ }
201
+
202
+ svg {
203
+ width: 20px;
204
+ height: 20px;
205
+ }
206
+ `;
177
207
  export const ContextMenuButton = styled(MenuButton) `
178
208
  svg {
179
209
  transform: translateY(0);
180
210
  }
181
211
  `;
212
+ export const AddButton = styled.button `
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ width: 28px;
217
+ height: 28px;
218
+ background: rgba(255, 255, 255, 0.15);
219
+ border: 1px dashed rgba(255, 255, 255, 0.4);
220
+ border-radius: 8px;
221
+ color: white;
222
+ font-size: 20px;
223
+ font-weight: bold;
224
+ line-height: 0;
225
+ cursor: pointer;
226
+ transition: all 0.2s ease;
227
+ position: relative;
228
+ margin-right: 6px;
229
+ margin-left: 8px;
230
+ padding: 0;
231
+
232
+ &:hover {
233
+ background: rgba(255, 255, 255, 0.25);
234
+ border-color: rgba(255, 255, 255, 0.6);
235
+ }
236
+
237
+ &:active {
238
+ transform: scale(0.95);
239
+ }
240
+ `;
182
241
  export const RemoveButton = styled.button `
183
242
  position: absolute;
184
243
  top: -6px;
@@ -191,7 +250,7 @@ export const RemoveButton = styled.button `
191
250
  color: white;
192
251
  font-size: 14px;
193
252
  font-weight: bold;
194
- line-height: 1;
253
+ line-height: 0;
195
254
  cursor: pointer;
196
255
  display: flex;
197
256
  align-items: center;
@@ -208,34 +267,38 @@ export const RemoveButton = styled.button `
208
267
  background: #b91c1c;
209
268
  }
210
269
  `;
211
- export const OrientationToggle = styled.button `
270
+ export const UndoButton = styled.button `
212
271
  display: flex;
213
272
  align-items: center;
214
273
  justify-content: center;
215
- width: 20px;
216
- height: 20px;
274
+ width: 24px;
275
+ height: 24px;
217
276
  background: transparent;
218
277
  border: none;
219
278
  border-radius: 4px;
220
- color: rgba(255, 255, 255, 0.5);
279
+ color: rgba(249, 115, 22, 1);
221
280
  font-size: 10px;
222
281
  cursor: pointer;
223
282
  transition: all 0.2s ease;
224
283
  padding: 2px;
225
- transform: ${props => props.$orientation === 'vertical' ? 'rotate(90deg)' : 'rotate(0deg)'};
226
284
 
227
- &:hover {
285
+ &:hover:not(:disabled) {
228
286
  background: rgba(255, 255, 255, 0.1);
229
- color: rgba(255, 255, 255, 0.8);
287
+ color: rgba(249, 115, 22, 1);
230
288
  }
231
289
 
232
- &:active {
233
- transform: ${props => props.$orientation === 'vertical' ? 'rotate(90deg) scale(0.9)' : 'scale(0.9)'};
290
+ &:active:not(:disabled) {
291
+ transform: scale(0.9);
292
+ }
293
+
294
+ &:disabled {
295
+ opacity: 0.3;
296
+ cursor: not-allowed;
234
297
  }
235
298
 
236
299
  svg {
237
- width: 10px;
238
- height: 10px;
300
+ width: 16px;
301
+ height: 16px;
239
302
  }
240
303
  `;
241
304
  export const DraggableItem = styled.div `
@@ -275,3 +338,9 @@ export const ContextMenuWrapper = styled.div `
275
338
  position: static;
276
339
  display: contents;
277
340
  `;
341
+ export const ButtonGroup = styled.div `
342
+ display: flex;
343
+ flex-direction: row;
344
+ align-items: center;
345
+ gap: 0;
346
+ `;
@@ -88,6 +88,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
88
88
  }
89
89
  const addToFavoriteMenuItem = () => {
90
90
  return {
91
+ id: 'fav',
91
92
  icon: _jsx(IconStar, {}),
92
93
  name: SDKUI_Localizator.AddTo + ' ' + SDKUI_Localizator.Favorites,
93
94
  operationType: 'multiRow',
@@ -97,6 +98,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
97
98
  };
98
99
  const addReplaceFileMenuItem = () => {
99
100
  return {
101
+ id: 'repl',
100
102
  icon: _jsx(IconSubstFile, {}),
101
103
  name: SDKUI_Localizator.AddOrSubstFile,
102
104
  operationType: 'singleRow',
@@ -106,6 +108,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
106
108
  };
107
109
  const openFormMenuItem = () => {
108
110
  return {
111
+ id: 'open-form',
109
112
  icon: _jsx(IconPreview, {}),
110
113
  name: SDKUI_Localizator.OpenForm,
111
114
  operationType: 'singleRow',
@@ -115,12 +118,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
115
118
  };
116
119
  const deletetionMenuItem = () => {
117
120
  return {
121
+ id: 'del',
118
122
  icon: _jsx(IconDelete, {}),
119
123
  name: SDKUI_Localizator.Deletion,
120
124
  operationType: 'multiRow',
121
125
  disabled: disabledForMultiRow(selectedItems, focusedItem),
122
126
  submenu: [
123
127
  {
128
+ id: 'del-log',
124
129
  icon: _jsx(IconDelete, {}),
125
130
  name: SDKUI_Localizator.LogDelete,
126
131
  operationType: 'multiRow',
@@ -131,6 +136,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
131
136
  }
132
137
  },
133
138
  {
139
+ id: 'del-rest',
134
140
  icon: _jsx(IconUndo, {}),
135
141
  name: SDKUI_Localizator.Restore,
136
142
  operationType: 'multiRow',
@@ -141,6 +147,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
141
147
  }
142
148
  },
143
149
  {
150
+ id: 'del-phys',
144
151
  icon: _jsx(IconCloseCircle, {}),
145
152
  name: SDKUI_Localizator.PhysDelete,
146
153
  operationType: 'multiRow',
@@ -152,6 +159,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
152
159
  };
153
160
  const fileCheckMenuItem = () => {
154
161
  return {
162
+ id: 'chk',
155
163
  icon: _jsx(IconCheckFile, {}),
156
164
  name: SDKUI_Localizator.FileCheck,
157
165
  operationType: 'multiRow',
@@ -161,6 +169,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
161
169
  };
162
170
  const fileConversionsMenuItem = () => {
163
171
  return {
172
+ id: 'conv',
164
173
  icon: _jsx(IconConvertFilePdf, {}),
165
174
  name: SDKUI_Localizator.FileConversion,
166
175
  operationType: 'multiRow',
@@ -176,6 +185,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
176
185
  };
177
186
  const createContextualTaskMenuItem = () => {
178
187
  return {
188
+ id: 'task',
179
189
  icon: _jsx(IconActivity, {}),
180
190
  name: SDKUI_Localizator.CreateContextualTask,
181
191
  operationType: 'singleRow',
@@ -185,6 +195,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
185
195
  };
186
196
  const downloadFileMenuItem = () => {
187
197
  return {
198
+ id: 'dl',
188
199
  icon: _jsx(IconDownload, {}),
189
200
  operationType: 'multiRow',
190
201
  disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
@@ -193,6 +204,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
193
204
  };
194
205
  const downloadXMLAttachmentsMenuItem = () => {
195
206
  return {
207
+ id: 'dl-xml',
196
208
  icon: _jsx(IconDownload, {}),
197
209
  operationType: 'singleRow',
198
210
  disabled: !isXMLFileExt(getSelectedDcmtsOrFocused(selectedItems, focusedItem)?.[0]?.FILEEXT) ? true : disabledForSingleRow(selectedItems, focusedItem),
@@ -201,6 +213,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
201
213
  };
202
214
  const duplicateDocumentMenuItem = () => {
203
215
  return {
216
+ id: 'dup',
204
217
  icon: _jsx(IconArchiveDoc, {}),
205
218
  name: SDKUI_Localizator.DuplicateDocument,
206
219
  operationType: 'singleRow',
@@ -210,6 +223,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
210
223
  };
211
224
  const batchUpdateMenuItem = () => {
212
225
  return {
226
+ id: 'batch',
213
227
  icon: _jsx(IconBatchUpdate, {}),
214
228
  name: SDKUI_Localizator.BatchUpdate,
215
229
  operationType: 'multiRow',
@@ -219,6 +233,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
219
233
  };
220
234
  const passToArchive = () => {
221
235
  return {
236
+ id: 'p2a',
222
237
  icon: _jsx(IconMenuCAArchive, { fontSize: 16, viewBox: '11 11.5 26 27', strokeWidth: 2, color: 'black' }),
223
238
  name: SDKUI_Localizator.PassToArchive,
224
239
  operationType: 'singleRow',
@@ -262,6 +277,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
262
277
  // Determine whether the menu item should be disabled
263
278
  const isDisabled = !canSubstitute || disabledForSingleRow(selectedItems, focusedItem) || !isPdf || isSigned;
264
279
  return {
280
+ id: 'pdf-ed',
265
281
  icon: _jsx(IconEdit, {}),
266
282
  name: "PDF Editor",
267
283
  operationType: 'singleRow',
@@ -271,11 +287,13 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
271
287
  };
272
288
  const signatureMenuItem = () => {
273
289
  return {
290
+ id: 'sign',
274
291
  icon: _jsx(IconSignaturePencil, {}),
275
292
  name: SDKUI_Localizator.Signature,
276
293
  disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
277
294
  submenu: [
278
295
  {
296
+ id: 'sign-do',
279
297
  icon: _jsx(IconSignaturePencil, {}),
280
298
  operationType: 'singleRow',
281
299
  disabled: disabledForSingleRow(selectedItems, focusedItem),
@@ -290,6 +308,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
290
308
  onClick: openSignSettingsForm
291
309
  }, */
292
310
  {
311
+ id: 'sign-info',
293
312
  icon: _jsx(IconCircleInfo, {}),
294
313
  name: SDKUI_Localizator.SignatureInformation,
295
314
  operationType: 'singleRow',
@@ -297,6 +316,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
297
316
  onClick: () => signatureInformationCallback(isMobile, getSelectedDcmtsOrFocused(selectedItems, focusedItem))
298
317
  },
299
318
  {
319
+ id: 'sign-verify',
300
320
  icon: _jsx(IconCheckIn, {}),
301
321
  name: SDKUI_Localizator.VerifySignature,
302
322
  operationType: 'multiRow',
@@ -313,42 +333,49 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
313
333
  const firstDoc = selectedDocs?.[0];
314
334
  const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
315
335
  return {
336
+ id: 'cico',
316
337
  icon: _jsx(IconFileDots, {}),
317
338
  name: "Check in/Check out",
318
339
  disabled: firstDoc === undefined || disabledForSingleRow(selectedItems, focusedItem),
319
340
  submenu: [
320
341
  {
321
- icon: _jsx("span", { className: "dx-icon-edit" }),
342
+ id: 'co',
343
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-edit" }),
322
344
  name: 'Check out',
323
345
  disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
324
346
  onClick: () => handleCheckOutOperationCallback(true),
325
347
  },
326
348
  {
327
- icon: _jsx("span", { className: "dx-icon-unlock" }),
349
+ id: 'ci',
350
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-unlock" }),
328
351
  name: 'Check in',
329
352
  onClick: () => handleCheckInOperationCallback(),
330
353
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
331
354
  },
332
355
  {
333
- icon: _jsx("span", { className: "dx-icon-remove" }),
356
+ id: 'co-cancel',
357
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-remove" }),
334
358
  name: SDKUI_Localizator.CancelCheckOut,
335
359
  disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
336
360
  onClick: () => handleCheckOutOperationCallback(false),
337
361
  },
338
362
  {
339
- icon: _jsx("span", { className: "dx-icon-info" }),
363
+ id: 'co-info',
364
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-info" }),
340
365
  name: SDKUI_Localizator.CheckoutInfo,
341
366
  onClick: showCheckoutInformationFormCallback,
342
367
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
343
368
  },
344
369
  {
345
- icon: _jsx("span", { className: "dx-icon-copy" }),
370
+ id: 'co-path',
371
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-copy" }),
346
372
  name: SDKUI_Localizator.CopyCheckoutPath,
347
373
  onClick: copyCheckoutPathToClipboardOperationCallback,
348
374
  disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
349
375
  },
350
376
  {
351
- icon: _jsx("span", { className: "dx-icon-clock" }),
377
+ id: 'co-hist',
378
+ icon: _jsx("span", { style: { fontSize: '18px' }, className: "dx-icon-clock" }),
352
379
  name: SDKUI_Localizator.History,
353
380
  disabled: !cicoEnabled || disabledForSingleRow(selectedItems, focusedItem),
354
381
  onClick: viewHistoryCallback,
@@ -358,12 +385,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
358
385
  };
359
386
  const relationsMenuItem = () => {
360
387
  return {
388
+ id: 'rel',
361
389
  icon: _jsx(IconRelation, {}),
362
390
  name: SDKUI_Localizator.Relations,
363
391
  operationType: 'multiRow',
364
392
  disabled: disabledForMultiRow(selectedItems, focusedItem),
365
393
  submenu: [
366
394
  {
395
+ id: 'rel-pair',
367
396
  icon: _jsx(IconPair, {}),
368
397
  name: SDKUI_Localizator.MatchManyDocumentsManyToMany,
369
398
  operationType: 'multiRow',
@@ -371,6 +400,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
371
400
  onClick: async () => await pairManyToManyDocuments?.(true)
372
401
  },
373
402
  {
403
+ id: 'rel-unpair',
374
404
  icon: _jsx(IconUnpair, {}),
375
405
  name: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
376
406
  operationType: 'multiRow',
@@ -378,6 +408,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
378
408
  onClick: async () => await pairManyToManyDocuments?.(false)
379
409
  },
380
410
  {
411
+ id: 'rel-ark-mst',
381
412
  icon: _jsx(IconArchiveMaster, {}),
382
413
  name: SDKUI_Localizator.ArchiveMasterDocument,
383
414
  operationType: 'multiRow',
@@ -386,6 +417,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
386
417
  onClick: async () => await archiveMasterDocuments?.(focusedItem?.TID)
387
418
  },
388
419
  {
420
+ id: 'rel-ark-det',
389
421
  icon: _jsx(IconArchiveDetail, {}),
390
422
  name: SDKUI_Localizator.ArchiveDetailDocument,
391
423
  operationType: 'multiRow',
@@ -393,6 +425,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
393
425
  onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
394
426
  },
395
427
  {
428
+ id: 'rel-mst',
396
429
  icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
397
430
  name: SDKUI_Localizator.DcmtsMaster,
398
431
  operationType: 'singleRow',
@@ -402,6 +435,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
402
435
  onClick: () => openMasterDcmtsFormHandler?.(true)
403
436
  },
404
437
  {
438
+ id: 'rel-det',
405
439
  icon: _jsx(IconDetailDcmts, {}),
406
440
  name: SDKUI_Localizator.DcmtsDetail,
407
441
  operationType: 'multiRow',
@@ -414,12 +448,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
414
448
  };
415
449
  const sharedDcmtsMenuItem = () => {
416
450
  return {
451
+ id: 'shr',
417
452
  icon: _jsx(IconSharedDcmt, {}),
418
453
  name: SDKUI_Localizator.SharedDocuments,
419
454
  operationType: 'multiRow',
420
455
  disabled: disabledForMultiRow(selectedItems, focusedItem),
421
456
  submenu: [
422
457
  {
458
+ id: 'shr-ark',
423
459
  icon: _jsx(IconSharedDcmt, {}),
424
460
  name: SDKUI_Localizator.SharedArchiving,
425
461
  operationType: 'singleRow',
@@ -427,6 +463,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
427
463
  onClick: async () => { await openSharedArchiveHandler(); }
428
464
  },
429
465
  {
466
+ id: 'shr-show',
430
467
  icon: _jsx(IconSharedDcmt, {}),
431
468
  name: SDKUI_Localizator.ShowSharedDocuments,
432
469
  operationType: 'multiRow',
@@ -462,12 +499,14 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
462
499
  } */
463
500
  const fullTextSearchMenuItem = () => {
464
501
  return {
502
+ id: 'ft',
465
503
  icon: _jsx(IconSearch, {}),
466
504
  name: SDKUI_Localizator.FullTextSearch,
467
505
  operationType: 'multiRow',
468
506
  disabled: disabledForMultiRow(selectedItems, focusedItem),
469
507
  submenu: [
470
508
  {
509
+ id: 'ft-info',
471
510
  icon: _jsx(IconInfo, {}),
472
511
  name: SDKUI_Localizator.IndexingInformation,
473
512
  operationType: 'singleRow',
@@ -488,6 +527,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
488
527
  }
489
528
  },
490
529
  {
530
+ id: 'ft-idx',
491
531
  icon: _jsx(IconArchiveDoc, {}),
492
532
  name: SDKUI_Localizator.IndexOrReindex,
493
533
  operationType: 'multiRow',
@@ -495,6 +535,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
495
535
  onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchReindex); }
496
536
  },
497
537
  {
538
+ id: 'ft-del',
498
539
  icon: _jsx(IconDelete, {}),
499
540
  name: SDKUI_Localizator.IndexingDelete,
500
541
  operationType: 'multiRow',
@@ -503,6 +544,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
503
544
  },
504
545
  ...(focusedItem?.FTExplanations !== undefined
505
546
  ? [{
547
+ id: 'ft-det',
506
548
  icon: _jsx(IconPlatform, {}),
507
549
  name: SDKUI_Localizator.ResultDetails,
508
550
  operationType: 'singleRow',
@@ -516,16 +558,19 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
516
558
  };
517
559
  const otherMenuItem = () => {
518
560
  return {
561
+ id: 'oth',
519
562
  icon: _jsx(IconDotsVerticalCircleOutline, {}),
520
563
  name: SDKUI_Localizator.Other,
521
564
  submenu: [
522
565
  {
566
+ id: 'oth-search',
523
567
  icon: _jsx(IconSearch, {}),
524
568
  name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
525
569
  disabled: false,
526
570
  onClick: handleToggleSearch
527
571
  },
528
572
  {
573
+ id: 'oth-exp',
529
574
  icon: _jsx(IconExportTo, {}),
530
575
  name: SDKUI_Localizator.ExportTo,
531
576
  operationType: 'multiRow',
@@ -539,6 +584,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
539
584
  // onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 })
540
585
  // },
541
586
  {
587
+ id: 'oth-float',
542
588
  icon: showFloatingBar ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
543
589
  name: showFloatingBar ? SDKUI_Localizator.HideFloatingBar : SDKUI_Localizator.ShowFloatingBar,
544
590
  disabled: false,
@@ -573,6 +619,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
573
619
  };
574
620
  const shareFromWgMenuItem = () => {
575
621
  return {
622
+ id: 'wg-share',
576
623
  icon: _jsx(IconShare, {}),
577
624
  name: SDKUI_Localizator.Share,
578
625
  visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
@@ -582,6 +629,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
582
629
  };
583
630
  const copyFromWgMenuItem = () => {
584
631
  return {
632
+ id: 'wg-copy',
585
633
  icon: _jsx(IconCopy, {}),
586
634
  name: SDKUI_Localizator.CopyToDrafts,
587
635
  operationType: 'multiRow',
@@ -592,6 +640,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
592
640
  };
593
641
  const movetofolderFromWgMenuItem = () => {
594
642
  return {
643
+ id: 'wg-move',
595
644
  icon: _jsx(IconMoveToFolder, {}),
596
645
  name: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
597
646
  operationType: 'multiRow',
@@ -602,6 +651,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
602
651
  };
603
652
  const commentFromWgMenuItem = (beginGroup) => {
604
653
  return {
654
+ id: 'wg-cmt',
605
655
  icon: _jsx("span", { className: "dx-icon-chat" }),
606
656
  name: SDKUI_Localizator.Comment,
607
657
  operationType: 'multiRow',
@@ -613,6 +663,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
613
663
  };
614
664
  const removeFromWgMenuItem = (name) => {
615
665
  return {
666
+ id: 'wg-rm',
616
667
  icon: _jsx(IconDelete, {}),
617
668
  name: name,
618
669
  operationType: 'multiRow',
@@ -647,6 +698,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
647
698
  const getDefaultMenuItems = () => {
648
699
  return [
649
700
  {
701
+ id: 'doc',
650
702
  icon: _jsx(IconFileDots, {}),
651
703
  name: !isMobile ? SDKUI_Localizator.DocumentOperations : SDKUI_Localizator.Documents,
652
704
  disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
@@ -674,6 +726,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
674
726
  fullTextSearchMenuItem(),
675
727
  otherMenuItem(),
676
728
  {
729
+ id: 'wg',
677
730
  icon: _jsx(IconUserGroupOutline, {}),
678
731
  name: !isMobile ? SDKUI_Localizator.WorkgroupOperations : SDKUI_Localizator.WorkingGroups,
679
732
  operationType: 'multiRow',
@@ -333,7 +333,7 @@ const TMSignSettingsForm = (props) => {
333
333
  fontWeight: 'bold',
334
334
  color: isModified ? MODIFIED_COLOR : '#777',
335
335
  transition: 'opacity 0.2s ease'
336
- }, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: "\u00D7" })] }));
336
+ }, onMouseEnter: (e) => { e.currentTarget.style.opacity = '0.9'; }, onMouseLeave: (e) => { e.currentTarget.style.opacity = '0.5'; }, children: _jsx("i", { className: "dx-icon-close" }) })] }));
337
337
  };
338
338
  const renderMultiSignerTag = (tagData) => {
339
339
  const handleRemoveTag = () => {
@@ -105,7 +105,7 @@ export class SearchSettings {
105
105
  export class FloatingMenuBarSettings {
106
106
  constructor() {
107
107
  this.orientation = 'horizontal';
108
- this.itemIds = [];
108
+ this.itemIds = ['rel-det', 'rel-mst', 'dl'];
109
109
  this.position = { x: 10, y: globalThis.window?.innerHeight ? globalThis.window.innerHeight - 215 : 100 };
110
110
  }
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev1.36",
3
+ "version": "6.20.0-dev1.38",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",