@topconsultnpm/sdkui-react 6.20.0-dev1.36 → 6.20.0-dev1.37
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 +1 -1
- package/lib/components/NewComponents/ContextMenu/styles.js +2 -2
- package/lib/components/NewComponents/ContextMenu/types.d.ts +1 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +88 -30
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +4 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +65 -35
- package/lib/components/features/search/TMSearchResultsMenuItems.js +59 -6
- package/lib/helper/SDKUI_Globals.js +1 -1
- package/package.json +1 -1
|
@@ -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: [
|
|
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:
|
|
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:
|
|
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),
|
|
@@ -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 { IconApply, IconMenuKebab, 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
|
-
|
|
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
|
|
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
|
|
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
|
|
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((
|
|
178
|
+
const getCurrentItemState = useCallback((itemId) => {
|
|
164
179
|
const findInItems = (items) => {
|
|
165
|
-
for (
|
|
166
|
-
|
|
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]);
|
|
182
|
-
|
|
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
|
|
187
|
-
const enhanceItems = (items) => {
|
|
204
|
+
const createPinItems = (items) => {
|
|
188
205
|
return items.map(item => {
|
|
189
|
-
const flatItem = flatItems.find(fi => fi.
|
|
190
|
-
const itemId = flatItem?.id || '';
|
|
191
|
-
|
|
192
|
-
const
|
|
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
|
-
|
|
196
|
-
|
|
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
|
-
|
|
221
|
+
pinItem.submenu = createPinItems(item.submenu);
|
|
204
222
|
}
|
|
205
|
-
return
|
|
223
|
+
return pinItem;
|
|
206
224
|
});
|
|
207
225
|
};
|
|
208
|
-
return
|
|
226
|
+
return createPinItems(contextMenuItems);
|
|
209
227
|
}, [contextMenuItems, flattenMenuItems, togglePin, state.items]);
|
|
210
228
|
const handleMouseDown = (e) => {
|
|
211
229
|
if (state.isConfigMode)
|
|
@@ -271,8 +289,10 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
271
289
|
}
|
|
272
290
|
return undefined;
|
|
273
291
|
}, [state.isDragging, handleMouseMove, handleMouseUp]);
|
|
274
|
-
// Save to SDKUI_Globals.userSettings
|
|
292
|
+
// Save to SDKUI_Globals.userSettings only when NOT in config mode (when applying changes)
|
|
275
293
|
useEffect(() => {
|
|
294
|
+
if (state.isConfigMode)
|
|
295
|
+
return; // Don't save during edit mode
|
|
276
296
|
try {
|
|
277
297
|
// Replace the entire object to trigger the Proxy
|
|
278
298
|
SDKUI_Globals.userSettings.searchSettings.floatingMenuBar = {
|
|
@@ -284,9 +304,44 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
284
304
|
catch (error) {
|
|
285
305
|
console.error('Failed to save FloatingMenuBar config:', error);
|
|
286
306
|
}
|
|
287
|
-
}, [state.orientation, state.items, state.position]);
|
|
307
|
+
}, [state.orientation, state.items, state.position, state.isConfigMode]);
|
|
288
308
|
const toggleConfigMode = () => {
|
|
289
|
-
setState(s =>
|
|
309
|
+
setState(s => {
|
|
310
|
+
if (!s.isConfigMode) {
|
|
311
|
+
// Entering edit mode - save snapshot
|
|
312
|
+
stateSnapshot.current = {
|
|
313
|
+
items: [...s.items],
|
|
314
|
+
orientation: s.orientation,
|
|
315
|
+
position: { ...s.position },
|
|
316
|
+
};
|
|
317
|
+
return { ...s, isConfigMode: true };
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
// Exiting edit mode (applying changes) - clear snapshot
|
|
321
|
+
stateSnapshot.current = null;
|
|
322
|
+
return { ...s, isConfigMode: false };
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
const handleUndo = () => {
|
|
327
|
+
if (stateSnapshot.current) {
|
|
328
|
+
setState(s => ({
|
|
329
|
+
...s,
|
|
330
|
+
items: [...stateSnapshot.current.items],
|
|
331
|
+
orientation: stateSnapshot.current.orientation,
|
|
332
|
+
position: { ...stateSnapshot.current.position },
|
|
333
|
+
isConfigMode: true, // Stay in edit mode
|
|
334
|
+
}));
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
// Check if current state has changed from snapshot
|
|
338
|
+
const hasChanges = () => {
|
|
339
|
+
if (!stateSnapshot.current)
|
|
340
|
+
return false;
|
|
341
|
+
// Check if items have changed (different IDs or different order)
|
|
342
|
+
const currentIds = state.items.map(i => i.id).join(',');
|
|
343
|
+
const snapshotIds = stateSnapshot.current.items.map(i => i.id).join(',');
|
|
344
|
+
return currentIds !== snapshotIds;
|
|
290
345
|
};
|
|
291
346
|
const toggleOrientation = () => {
|
|
292
347
|
const newOrientation = state.orientation === 'horizontal' ? 'vertical' : 'horizontal';
|
|
@@ -385,7 +440,7 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
385
440
|
};
|
|
386
441
|
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) => {
|
|
387
442
|
// Get current state (disabled and onClick) from contextMenuItems
|
|
388
|
-
const currentState = getCurrentItemState(item.
|
|
443
|
+
const currentState = getCurrentItemState(item.id);
|
|
389
444
|
const isDisabled = currentState.disabled || false;
|
|
390
445
|
const currentOnClick = currentState.onClick || item.onClick; // Fallback to stored onClick if not found
|
|
391
446
|
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 +456,9 @@ const TMFloatingMenuBar = ({ containerRef, contextMenuItems = [], isConstrained
|
|
|
401
456
|
currentOnClick();
|
|
402
457
|
}
|
|
403
458
|
}, 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:
|
|
459
|
+
}), !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(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.OrientationToggle, { "$orientation": state.orientation, onClick: handleUndo, disabled: !hasChanges(), children: _jsx(IconUndo, {}) }) })) : (_jsx(TMTooltip, { content: state.orientation === 'horizontal' ? 'Verticale' : 'Orizzontale', position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(S.OrientationToggle, { "$orientation": state.orientation, onClick: toggleOrientation, children: _jsx(IconMenuKebab, {}) }) })), _jsx(S.ConfigButton, { onClick: toggleConfigMode, "$isActive": state.isConfigMode, children: state.isConfigMode ?
|
|
460
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.ApplyAndClose, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(IconApply, { fontSize: 18 }) })
|
|
461
|
+
:
|
|
462
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.Configure, position: state.orientation === 'horizontal' ? 'right' : 'top', children: _jsx(IconPencil, { fontSize: 18 }) }) })] })] })] }));
|
|
405
463
|
};
|
|
406
464
|
export default TMFloatingMenuBar;
|
|
@@ -35,6 +35,7 @@ export declare const ContextMenuButton: import("styled-components/dist/types").I
|
|
|
35
35
|
}, "ref"> & {
|
|
36
36
|
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
37
|
}, never>> & string;
|
|
38
|
+
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
39
|
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
40
|
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
41
|
$orientation: "horizontal" | "vertical";
|
|
@@ -44,3 +45,6 @@ export declare const DraggableItem: import("styled-components/dist/types").IStyl
|
|
|
44
45
|
$isDragOver: boolean;
|
|
45
46
|
}>> & string;
|
|
46
47
|
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;
|
|
48
|
+
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>, {
|
|
49
|
+
$orientation: "horizontal" | "vertical";
|
|
50
|
+
}>> & 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:
|
|
45
|
-
|
|
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
|
|
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:
|
|
66
|
-
|
|
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,35 +140,29 @@ export const ConfigButton = styled.button `
|
|
|
143
140
|
display: flex;
|
|
144
141
|
align-items: center;
|
|
145
142
|
justify-content: center;
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
148
|
-
background:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
: 'rgba(255, 255, 255, 0.15)'};
|
|
154
|
-
border-radius: 8px;
|
|
155
|
-
color: white;
|
|
156
|
-
font-size: 14px;
|
|
143
|
+
width: 20px;
|
|
144
|
+
height: 20px;
|
|
145
|
+
background: transparent;
|
|
146
|
+
border: none;
|
|
147
|
+
border-radius: 4px;
|
|
148
|
+
color: ${props => props.$isActive ? 'rgba(255, 255, 255, 0.8)' : 'rgba(255, 255, 255, 0.5)'};
|
|
149
|
+
font-size: 10px;
|
|
157
150
|
cursor: pointer;
|
|
158
|
-
transition:
|
|
159
|
-
|
|
151
|
+
transition: all 0.2s ease;
|
|
152
|
+
padding: 0px;
|
|
160
153
|
|
|
161
154
|
&:hover {
|
|
162
|
-
background:
|
|
163
|
-
|
|
164
|
-
: 'rgba(0, 0, 0, 0.15)'};
|
|
165
|
-
border-color: rgba(255, 255, 255, 0.35);
|
|
155
|
+
background: rgba(255, 255, 255, 0.1);
|
|
156
|
+
color: rgba(255, 255, 255, 0.8);
|
|
166
157
|
}
|
|
167
158
|
|
|
168
159
|
&:active {
|
|
169
|
-
|
|
160
|
+
transform: scale(0.9);
|
|
170
161
|
}
|
|
171
162
|
|
|
172
163
|
svg {
|
|
173
|
-
width:
|
|
174
|
-
height:
|
|
164
|
+
width: 14px;
|
|
165
|
+
height: 14px;
|
|
175
166
|
}
|
|
176
167
|
`;
|
|
177
168
|
export const ContextMenuButton = styled(MenuButton) `
|
|
@@ -179,6 +170,34 @@ export const ContextMenuButton = styled(MenuButton) `
|
|
|
179
170
|
transform: translateY(0);
|
|
180
171
|
}
|
|
181
172
|
`;
|
|
173
|
+
export const AddButton = styled.button `
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
width: 28px;
|
|
178
|
+
height: 28px;
|
|
179
|
+
background: rgba(255, 255, 255, 0.15);
|
|
180
|
+
border: 1px dashed rgba(255, 255, 255, 0.4);
|
|
181
|
+
border-radius: 8px;
|
|
182
|
+
color: white;
|
|
183
|
+
font-size: 20px;
|
|
184
|
+
font-weight: bold;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
transition: all 0.2s ease;
|
|
187
|
+
position: relative;
|
|
188
|
+
margin-right: 6px;
|
|
189
|
+
margin-left: 8px;
|
|
190
|
+
|
|
191
|
+
&:hover {
|
|
192
|
+
background: rgba(255, 255, 255, 0.25);
|
|
193
|
+
border-color: rgba(255, 255, 255, 0.6);
|
|
194
|
+
transform: scale(1.05);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:active {
|
|
198
|
+
transform: scale(0.95);
|
|
199
|
+
}
|
|
200
|
+
`;
|
|
182
201
|
export const RemoveButton = styled.button `
|
|
183
202
|
position: absolute;
|
|
184
203
|
top: -6px;
|
|
@@ -222,20 +241,25 @@ export const OrientationToggle = styled.button `
|
|
|
222
241
|
cursor: pointer;
|
|
223
242
|
transition: all 0.2s ease;
|
|
224
243
|
padding: 2px;
|
|
225
|
-
transform: ${props => props.$orientation === '
|
|
244
|
+
transform: ${props => props.$orientation === 'horizontal' ? 'rotate(90deg)' : 'rotate(0deg)'};
|
|
226
245
|
|
|
227
|
-
&:hover {
|
|
246
|
+
&:hover:not(:disabled) {
|
|
228
247
|
background: rgba(255, 255, 255, 0.1);
|
|
229
248
|
color: rgba(255, 255, 255, 0.8);
|
|
230
249
|
}
|
|
231
250
|
|
|
232
|
-
&:active {
|
|
233
|
-
transform: ${props => props.$orientation === '
|
|
251
|
+
&:active:not(:disabled) {
|
|
252
|
+
transform: ${props => props.$orientation === 'horizontal' ? 'rotate(90deg) scale(0.9)' : 'scale(0.9)'};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:disabled {
|
|
256
|
+
opacity: 0.3;
|
|
257
|
+
cursor: not-allowed;
|
|
234
258
|
}
|
|
235
259
|
|
|
236
260
|
svg {
|
|
237
|
-
width:
|
|
238
|
-
height:
|
|
261
|
+
width: 14px;
|
|
262
|
+
height: 14px;
|
|
239
263
|
}
|
|
240
264
|
`;
|
|
241
265
|
export const DraggableItem = styled.div `
|
|
@@ -275,3 +299,9 @@ export const ContextMenuWrapper = styled.div `
|
|
|
275
299
|
position: static;
|
|
276
300
|
display: contents;
|
|
277
301
|
`;
|
|
302
|
+
export const ButtonGroup = styled.div `
|
|
303
|
+
display: flex;
|
|
304
|
+
flex-direction: ${props => props.$orientation === 'horizontal' ? 'column' : 'row'};
|
|
305
|
+
align-items: center;
|
|
306
|
+
gap: ${props => props.$orientation === 'horizontal' ? '0px' : '4px'};
|
|
307
|
+
`;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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',
|
|
@@ -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
|
}
|