@topconsultnpm/sdkui-react 6.19.0-dev2.1 → 6.19.0-dev2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
  2. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +187 -0
  3. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +11 -0
  4. package/lib/components/NewComponents/ContextMenu/hooks.js +48 -0
  5. package/lib/components/NewComponents/ContextMenu/index.d.ts +2 -0
  6. package/lib/components/NewComponents/ContextMenu/index.js +1 -0
  7. package/lib/components/NewComponents/ContextMenu/styles.d.ts +27 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.js +308 -0
  9. package/lib/components/NewComponents/ContextMenu/types.d.ts +26 -0
  10. package/lib/components/NewComponents/ContextMenu/types.js +1 -0
  11. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +4 -0
  12. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +370 -0
  13. package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
  14. package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
  15. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +38 -0
  16. package/lib/components/NewComponents/FloatingMenuBar/styles.js +267 -0
  17. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +30 -0
  18. package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
  19. package/lib/components/NewComponents/Notification/Notification.d.ts +4 -0
  20. package/lib/components/NewComponents/Notification/Notification.js +60 -0
  21. package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +8 -0
  22. package/lib/components/NewComponents/Notification/NotificationContainer.js +33 -0
  23. package/lib/components/NewComponents/Notification/index.d.ts +2 -0
  24. package/lib/components/NewComponents/Notification/index.js +2 -0
  25. package/lib/components/NewComponents/Notification/styles.d.ts +21 -0
  26. package/lib/components/NewComponents/Notification/styles.js +180 -0
  27. package/lib/components/NewComponents/Notification/types.d.ts +18 -0
  28. package/lib/components/NewComponents/Notification/types.js +1 -0
  29. package/lib/components/features/search/TMSearchResultsMenuItems.js +12 -12
  30. package/lib/components/settings/SettingsAppearance.js +9 -1
  31. package/lib/helper/SDKUI_Globals.d.ts +2 -0
  32. package/lib/helper/SDKUI_Globals.js +9 -1
  33. package/lib/helper/SDKUI_Localizator.d.ts +25 -0
  34. package/lib/helper/SDKUI_Localizator.js +250 -0
  35. package/lib/helper/TMIcons.d.ts +1 -0
  36. package/lib/helper/TMIcons.js +3 -0
  37. package/lib/hooks/useRelatedDocuments.js +24 -24
  38. package/package.json +2 -2
@@ -0,0 +1,30 @@
1
+ import type { TMContextMenuItemProps } from '../ContextMenu';
2
+ export interface TMFloatingMenuItem {
3
+ id: string;
4
+ name: string;
5
+ icon: React.ReactNode;
6
+ onClick: () => void;
7
+ disabled?: boolean;
8
+ isPinned?: boolean;
9
+ originalMenuItem?: TMContextMenuItemProps;
10
+ }
11
+ export interface TMFloatingMenuBarProps {
12
+ containerRef: React.RefObject<HTMLElement | null>;
13
+ contextMenuItems?: TMContextMenuItemProps[];
14
+ storageKey?: string;
15
+ isConstrained?: boolean;
16
+ defaultPosition?: Position;
17
+ maxItems?: number;
18
+ }
19
+ export interface Position {
20
+ x: number;
21
+ y: number;
22
+ }
23
+ export interface TMFloatingMenuBarState {
24
+ position: Position;
25
+ isDragging: boolean;
26
+ isConfigMode: boolean;
27
+ orientation: 'horizontal' | 'vertical';
28
+ items: TMFloatingMenuItem[];
29
+ draggedItemIndex: number | null;
30
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { NotificationProps } from './types';
3
+ declare const Notification: React.FC<NotificationProps>;
4
+ export default Notification;
@@ -0,0 +1,60 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect, useRef } from 'react';
3
+ import * as S from './styles';
4
+ const Notification = ({ title, message, mode = 'info', position = 'top-right', duration = 3000, closable = false, stopOnMouseEnter = true, hasProgress = true, onClose, }) => {
5
+ const [state, setState] = useState({
6
+ visible: true,
7
+ isPaused: false,
8
+ progress: 100,
9
+ });
10
+ const timeoutRef = useRef(undefined);
11
+ const remainingTimeRef = useRef(duration);
12
+ const pauseTimeRef = useRef(0);
13
+ const closeNotification = () => {
14
+ setState(prev => ({ ...prev, visible: false }));
15
+ setTimeout(() => {
16
+ onClose?.();
17
+ }, 300);
18
+ };
19
+ useEffect(() => {
20
+ // Set up auto-close timer
21
+ timeoutRef.current = setTimeout(() => {
22
+ closeNotification();
23
+ }, duration);
24
+ return () => {
25
+ if (timeoutRef.current) {
26
+ clearTimeout(timeoutRef.current);
27
+ }
28
+ };
29
+ }, [duration]);
30
+ const handleMouseEnter = () => {
31
+ if (!stopOnMouseEnter)
32
+ return;
33
+ // Pause the timer
34
+ if (timeoutRef.current) {
35
+ clearTimeout(timeoutRef.current);
36
+ pauseTimeRef.current = Date.now();
37
+ }
38
+ setState(prev => ({ ...prev, isPaused: true }));
39
+ };
40
+ const handleMouseLeave = () => {
41
+ if (!stopOnMouseEnter)
42
+ return;
43
+ // Resume the timer with remaining time
44
+ const pauseDuration = Date.now() - pauseTimeRef.current;
45
+ remainingTimeRef.current = Math.max(0, remainingTimeRef.current - pauseDuration);
46
+ timeoutRef.current = setTimeout(() => {
47
+ closeNotification();
48
+ }, remainingTimeRef.current);
49
+ setState(prev => ({ ...prev, isPaused: false }));
50
+ };
51
+ const handleClose = (e) => {
52
+ e.stopPropagation();
53
+ if (timeoutRef.current) {
54
+ clearTimeout(timeoutRef.current);
55
+ }
56
+ closeNotification();
57
+ };
58
+ return (_jsxs(S.NotificationContainer, { "$position": position, "$mode": mode, "$visible": state.visible, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, role: "alert", "aria-live": "assertive", children: [_jsxs(S.NotificationContent, { children: [_jsx(S.NotificationTitle, { children: title }), _jsx(S.NotificationMessage, { children: message })] }), closable && (_jsx(S.CloseButton, { onClick: handleClose, "aria-label": "Close notification", children: "\u00D7" })), hasProgress && (_jsx(S.ProgressBar, { "$duration": duration, "$mode": mode, "$isPaused": state.isPaused }))] }));
59
+ };
60
+ export default Notification;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { NotificationPosition } from './types';
3
+ interface NotificationContainerProps {
4
+ position: NotificationPosition;
5
+ children: React.ReactNode;
6
+ }
7
+ declare const NotificationContainer: React.FC<NotificationContainerProps>;
8
+ export default NotificationContainer;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ const Container = styled.div `
4
+ position: fixed;
5
+ z-index: 10002;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 12px;
9
+ pointer-events: none;
10
+
11
+ ${props => {
12
+ const isTop = props.$position.startsWith('top');
13
+ const isBottom = props.$position.startsWith('bottom');
14
+ const isLeft = props.$position.endsWith('left');
15
+ const isRight = props.$position.endsWith('right');
16
+ const isCenter = props.$position.endsWith('center');
17
+ return `
18
+ ${isTop ? 'top: 24px;' : ''}
19
+ ${isBottom ? 'bottom: 24px;' : ''}
20
+ ${isLeft ? 'left: 24px;' : ''}
21
+ ${isRight ? 'right: 24px;' : ''}
22
+ ${isCenter ? 'left: 50%; transform: translateX(-50%);' : ''}
23
+ `;
24
+ }}
25
+
26
+ & > * {
27
+ pointer-events: auto;
28
+ }
29
+ `;
30
+ const NotificationContainer = ({ position, children }) => {
31
+ return _jsx(Container, { "$position": position, children: children });
32
+ };
33
+ export default NotificationContainer;
@@ -0,0 +1,2 @@
1
+ export { default } from './Notification';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export { default } from './Notification';
2
+ export * from './types';
@@ -0,0 +1,21 @@
1
+ import type { NotificationMode, NotificationPosition } from './types';
2
+ export declare const NotificationContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $position: NotificationPosition;
4
+ $mode: NotificationMode;
5
+ $visible: boolean;
6
+ }>> & string;
7
+ export declare const NotificationContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ export declare const NotificationTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ export declare const NotificationMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
+ export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
11
+ export declare const ProgressBar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
13
+ }>, {
14
+ $duration: number;
15
+ $mode: NotificationMode;
16
+ $isPaused: boolean;
17
+ }>, {
18
+ $duration: number;
19
+ $mode: NotificationMode;
20
+ $isPaused: boolean;
21
+ }>> & string;
@@ -0,0 +1,180 @@
1
+ import styled, { keyframes } from 'styled-components';
2
+ const slideInFromTop = keyframes `
3
+ from {
4
+ opacity: 0;
5
+ transform: translateY(-100%);
6
+ }
7
+ to {
8
+ opacity: 1;
9
+ transform: translateY(0);
10
+ }
11
+ `;
12
+ const slideInFromBottom = keyframes `
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(100%);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0);
20
+ }
21
+ `;
22
+ const slideOut = keyframes `
23
+ from {
24
+ opacity: 1;
25
+ transform: scale(1);
26
+ }
27
+ to {
28
+ opacity: 0;
29
+ transform: scale(0.9);
30
+ }
31
+ `;
32
+ const getModeColors = (mode) => {
33
+ const colors = {
34
+ success: {
35
+ bg: '#10b981',
36
+ bgDark: '#059669',
37
+ border: '#34d399',
38
+ text: '#ffffff',
39
+ },
40
+ error: {
41
+ bg: '#ef4444',
42
+ bgDark: '#dc2626',
43
+ border: '#f87171',
44
+ text: '#ffffff',
45
+ },
46
+ warning: {
47
+ bg: '#f59e0b',
48
+ bgDark: '#d97706',
49
+ border: '#fbbf24',
50
+ text: '#ffffff',
51
+ },
52
+ info: {
53
+ bg: '#3b82f6',
54
+ bgDark: '#2563eb',
55
+ border: '#60a5fa',
56
+ text: '#ffffff',
57
+ },
58
+ };
59
+ return colors[mode];
60
+ };
61
+ export const NotificationContainer = styled.div `
62
+ position: relative;
63
+ z-index: 1;
64
+ min-width: 320px;
65
+ max-width: 420px;
66
+ background: ${props => getModeColors(props.$mode).bg};
67
+ border-radius: 12px;
68
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2),
69
+ 0 4px 12px rgba(0, 0, 0, 0.15);
70
+ padding: 16px 20px;
71
+ animation: ${props => {
72
+ if (!props.$visible)
73
+ return slideOut;
74
+ return props.$position.startsWith('top') ? slideInFromTop : slideInFromBottom;
75
+ }} 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
76
+ backdrop-filter: blur(10px);
77
+ border: 2px solid ${props => getModeColors(props.$mode).border};
78
+ color: ${props => getModeColors(props.$mode).text};
79
+ overflow: hidden;
80
+
81
+ [data-theme='dark'] & {
82
+ background: ${props => getModeColors(props.$mode).bgDark};
83
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
84
+ 0 4px 12px rgba(0, 0, 0, 0.3);
85
+ }
86
+
87
+ @media (max-width: 768px) {
88
+ min-width: 280px;
89
+ max-width: calc(100vw - 48px);
90
+ }
91
+ `;
92
+ export const NotificationContent = styled.div `
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 6px;
96
+ padding-right: 24px;
97
+ `;
98
+ export const NotificationTitle = styled.div `
99
+ font-size: 16px;
100
+ font-weight: 600;
101
+ line-height: 1.4;
102
+ letter-spacing: -0.01em;
103
+ `;
104
+ export const NotificationMessage = styled.div `
105
+ font-size: 14px;
106
+ font-weight: 400;
107
+ line-height: 1.5;
108
+ opacity: 0.95;
109
+ `;
110
+ export const CloseButton = styled.button `
111
+ position: absolute;
112
+ top: 12px;
113
+ right: 12px;
114
+ background: transparent;
115
+ border: none;
116
+ color: inherit;
117
+ cursor: pointer;
118
+ width: 24px;
119
+ height: 24px;
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ border-radius: 6px;
124
+ transition: all 0.15s ease;
125
+ font-size: 18px;
126
+ line-height: 1;
127
+ padding: 0;
128
+ opacity: 0.8;
129
+
130
+ &:hover {
131
+ opacity: 1;
132
+ background: rgba(255, 255, 255, 0.2);
133
+ transform: scale(1.1);
134
+ }
135
+
136
+ &:active {
137
+ transform: scale(0.95);
138
+ }
139
+
140
+ &:focus {
141
+ outline: 2px solid rgba(255, 255, 255, 0.5);
142
+ outline-offset: 2px;
143
+ }
144
+ `;
145
+ export const ProgressBar = styled.div.attrs(props => ({
146
+ style: {
147
+ animationDuration: `${props.$duration}ms`,
148
+ },
149
+ })) `
150
+ position: absolute;
151
+ bottom: 0;
152
+ left: 0;
153
+ height: 4px;
154
+ width: 100%;
155
+ background: ${props => getModeColors(props.$mode).border};
156
+ border-radius: 0 0 0 10px;
157
+ box-shadow: 0 0 8px ${props => getModeColors(props.$mode).border};
158
+ transform-origin: left;
159
+ animation: progress-shrink linear forwards;
160
+ animation-play-state: ${props => props.$isPaused ? 'paused' : 'running'};
161
+
162
+ @keyframes progress-shrink {
163
+ from {
164
+ transform: scaleX(1);
165
+ }
166
+ to {
167
+ transform: scaleX(0);
168
+ }
169
+ }
170
+
171
+ &::after {
172
+ content: '';
173
+ position: absolute;
174
+ top: 0;
175
+ right: 0;
176
+ width: 20px;
177
+ height: 100%;
178
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
179
+ }
180
+ `;
@@ -0,0 +1,18 @@
1
+ export type NotificationMode = 'warning' | 'info' | 'error' | 'success';
2
+ export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
3
+ export interface NotificationProps {
4
+ title: string;
5
+ message: string;
6
+ mode?: NotificationMode;
7
+ position?: NotificationPosition;
8
+ duration?: number;
9
+ closable?: boolean;
10
+ stopOnMouseEnter?: boolean;
11
+ hasProgress?: boolean;
12
+ onClose?: () => void;
13
+ }
14
+ export interface NotificationState {
15
+ visible: boolean;
16
+ isPaused: boolean;
17
+ progress: number;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals, DcmtTypeListCacheService, LicenseModuleStatus } from '@topconsultnpm/sdk-ts';
3
- import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, svgToString, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt } from '../../../helper';
3
+ import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconPlatform, IconPreview, IconRelation, IconSearch, IconShow, IconStar, IconSubstFile, IconUndo, IconUserGroupOutline, SDKUI_Localizator, svgToString, searchResultToMetadataValues, IconSignaturePencil, IconArchiveMaster, IconArchiveDetail, IconDetailDcmts, isPdfEditorEnabled, IconPair, IconUnpair, IconSharedDcmt, IconShare, IconCopy, IconMoveToFolder } from '../../../helper';
4
4
  import ShowAlert from '../../base/TMAlert';
5
5
  import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
6
6
  import TMSpinner from '../../base/TMSpinner';
@@ -347,21 +347,21 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
347
347
  items: [
348
348
  {
349
349
  icon: svgToString(_jsx(IconPair, {})),
350
- text: "Abbina documenti molti a molti",
350
+ text: SDKUI_Localizator.MatchManyDocumentsManyToMany,
351
351
  operationType: 'multiRow',
352
352
  disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
353
353
  onClick: async () => await pairManyToManyDocuments?.(true)
354
354
  },
355
355
  {
356
356
  icon: svgToString(_jsx(IconUnpair, {})),
357
- text: "Disabbina documenti molti a molti",
357
+ text: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
358
358
  operationType: 'multiRow',
359
359
  disabled: !hasManyToManyRelation || disabledForMultiRow(selectedItems, focusedItem),
360
360
  onClick: async () => await pairManyToManyDocuments?.(false)
361
361
  },
362
362
  {
363
363
  icon: svgToString(_jsx(IconArchiveMaster, {})),
364
- text: "Archivia documento master",
364
+ text: SDKUI_Localizator.ArchiveMasterDocument,
365
365
  operationType: 'multiRow',
366
366
  beginGroup: true,
367
367
  disabled: canArchiveMasterRelation !== true,
@@ -369,7 +369,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
369
369
  },
370
370
  {
371
371
  icon: svgToString(_jsx(IconArchiveDetail, {})),
372
- text: "Archivia documento dettaglio",
372
+ text: SDKUI_Localizator.ArchiveDetailDocument,
373
373
  operationType: 'multiRow',
374
374
  disabled: canArchiveDetailRelation !== true,
375
375
  onClick: async () => await archiveDetailDocuments?.(focusedItem?.TID)
@@ -397,22 +397,22 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
397
397
  const sharedDcmtsMenuItem = () => {
398
398
  return {
399
399
  icon: svgToString(_jsx(IconSharedDcmt, {})),
400
- text: 'Documenti condivisi',
400
+ text: SDKUI_Localizator.SharedDocuments,
401
401
  operationType: 'multiRow',
402
402
  disabled: disabledForMultiRow(selectedItems, focusedItem),
403
403
  items: [
404
404
  {
405
405
  icon: svgToString(_jsx(IconSharedDcmt, {})),
406
- text: "Archiviazione condivisa",
406
+ text: SDKUI_Localizator.SharedArchiving,
407
407
  operationType: 'singleRow',
408
408
  disabled: disabledForSingleRow(selectedItems, focusedItem),
409
409
  onClick: async () => { await openSharedArchiveHandler(); }
410
410
  },
411
411
  {
412
412
  icon: svgToString(_jsx(IconSharedDcmt, {})),
413
- text: "Mostra documenti condivisi",
413
+ text: SDKUI_Localizator.ShowSharedDocuments,
414
414
  operationType: 'multiRow',
415
- disabled: disabledForMultiRow(selectedItems, focusedItem),
415
+ disabled: disabledForSingleRow(selectedItems, focusedItem),
416
416
  onClick: async () => { await showSharedDcmtsHandler(); }
417
417
  }
418
418
  ]
@@ -555,7 +555,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
555
555
  };
556
556
  const shareFromWgMenuItem = () => {
557
557
  return {
558
- icon: "share",
558
+ icon: svgToString(_jsx(IconShare, {})),
559
559
  text: SDKUI_Localizator.Share,
560
560
  visible: workingGroupContext !== undefined && openAddDocumentForm !== undefined,
561
561
  disabled: workingGroupContext === undefined,
@@ -564,7 +564,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
564
564
  };
565
565
  const copyFromWgMenuItem = () => {
566
566
  return {
567
- icon: 'copy',
567
+ icon: svgToString(_jsx(IconCopy, {})),
568
568
  text: SDKUI_Localizator.CopyToDrafts,
569
569
  operationType: 'multiRow',
570
570
  visible: openWGsCopyMoveForm !== undefined,
@@ -574,7 +574,7 @@ export const getCommandsMenuItems = (isMobile, dtd, selectedItems, focusedItem,
574
574
  };
575
575
  const movetofolderFromWgMenuItem = () => {
576
576
  return {
577
- icon: 'movetofolder',
577
+ icon: svgToString(_jsx(IconMoveToFolder, {})),
578
578
  text: !isMobile ? SDKUI_Localizator.CopyToArchivedDocuments : SDKUI_Localizator.CopyToArchived,
579
579
  operationType: 'multiRow',
580
580
  visible: openWGsCopyMoveForm !== undefined,
@@ -18,6 +18,10 @@ const fontSizes = [
18
18
  { value: "19px", display: "19px" },
19
19
  { value: "20px", display: "20px" }
20
20
  ];
21
+ const fontFamilies = [
22
+ { value: "Inter", display: "Inter" },
23
+ { value: "Roboto", display: "Roboto" }
24
+ ];
21
25
  const SettingsAppearance = ({ landingPagesOptions, permissions = { canArchive: true, canSearch: true, dossiersLicense: true, wgGroupLicense: true, workFlowLicense: true } }) => {
22
26
  const [, setForceUpdate] = useState(0); // Dummy state to force re-renders
23
27
  const triggerUIUpdate = () => setForceUpdate((prev) => prev + 1); // Increment dummy state to re-render
@@ -43,7 +47,11 @@ const SettingsAppearance = ({ landingPagesOptions, permissions = { canArchive: t
43
47
  return (_jsxs(TMLayoutContainer, { children: [landingPagesOptions && _jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold', marginBottom: '5px' }, children: SDKUI_Localizator.LandingPage }), landingPagesOptions && _jsx(TMDropDown, { dataSource: filteredLandingPageOptopns, value: SDKUI_Globals.userSettings.landingPage, width: '230px', onValueChanged: (e) => {
44
48
  SDKUI_Globals.userSettings.landingPage = e.target.value;
45
49
  triggerUIUpdate();
46
- } }), _jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold', marginTop: '10px' }, children: 'Font' }), _jsx(TMDropDown, { label: SDKUI_Localizator.Size, dataSource: fontSizes, width: '230px', value: SDKUI_Globals.userSettings.themeSettings.fontSize, onValueChanged: (e) => {
50
+ } }), _jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold', marginTop: '10px' }, children: 'Font' }), _jsx(TMDropDown, { label: SDKUI_Localizator.Name, dataSource: fontFamilies, width: '230px', value: SDKUI_Globals.userSettings.themeSettings.fontFamily, onValueChanged: (e) => {
51
+ let newFamily = e.target.value;
52
+ SDKUI_Globals.userSettings.themeSettings.fontFamily = newFamily;
53
+ triggerUIUpdate();
54
+ } }), _jsx(TMDropDown, { label: SDKUI_Localizator.Size, dataSource: fontSizes, width: '230px', value: SDKUI_Globals.userSettings.themeSettings.fontSize, onValueChanged: (e) => {
47
55
  let newpx = e.target.value;
48
56
  SDKUI_Globals.userSettings.themeSettings.fontSize = newpx;
49
57
  triggerUIUpdate();
@@ -32,6 +32,7 @@ export declare class DataGridSettings {
32
32
  }
33
33
  export declare class ThemeSettings {
34
34
  fontSize: string;
35
+ fontFamily: string;
35
36
  gridSettings: DataGridSettings;
36
37
  constructor(skipCssUpdate?: boolean);
37
38
  /**
@@ -40,6 +41,7 @@ export declare class ThemeSettings {
40
41
  */
41
42
  toJSON(): {
42
43
  fontSize: string;
44
+ fontFamily: string;
43
45
  gridSettings: DataGridSettings;
44
46
  };
45
47
  }
@@ -36,8 +36,9 @@ export class UserSettings {
36
36
  // Ensure userID and archiveID are set
37
37
  settings.userID = userID;
38
38
  settings.archiveID = archiveID;
39
- // Update the CSS variable for font size
39
+ // Update the CSS variables for font size and font family
40
40
  document.documentElement.style.setProperty('--base-font-size', settings.themeSettings.fontSize);
41
+ document.documentElement.style.setProperty('--base-font-family', settings.themeSettings.fontFamily);
41
42
  // Wrap the settings object in a Proxy to intercept property updates
42
43
  const proxiedSettings = createProxy(settings, UserSettings.SaveSettings);
43
44
  // Automatically set the global userSettings
@@ -68,10 +69,12 @@ export class DataGridSettings {
68
69
  export class ThemeSettings {
69
70
  constructor(skipCssUpdate = false) {
70
71
  this.fontSize = FontSize.defaultFontSizeInPixel;
72
+ this.fontFamily = 'Inter';
71
73
  this.gridSettings = new DataGridSettings();
72
74
  // Automatically update the CSS variable for font size
73
75
  if (!skipCssUpdate) {
74
76
  document.documentElement.style.setProperty('--base-font-size', this.fontSize);
77
+ document.documentElement.style.setProperty('--base-font-family', this.fontFamily);
75
78
  }
76
79
  }
77
80
  /**
@@ -81,6 +84,7 @@ export class ThemeSettings {
81
84
  toJSON() {
82
85
  return {
83
86
  fontSize: this.fontSize,
87
+ fontFamily: this.fontFamily,
84
88
  gridSettings: this.gridSettings,
85
89
  };
86
90
  }
@@ -148,6 +152,10 @@ function createProxy(obj, saveCallback, rootObj) {
148
152
  if (prop === 'fontSize' && root instanceof UserSettings) {
149
153
  document.documentElement.style.setProperty('--base-font-size', value);
150
154
  }
155
+ // Handle specific property (fontFamily) updates
156
+ if (prop === 'fontFamily' && root instanceof UserSettings) {
157
+ document.documentElement.style.setProperty('--base-font-family', value);
158
+ }
151
159
  // Handle specific property (invoiceRetrieveFormat, orderRetrieveFormat) updates
152
160
  if ((prop === 'invoiceRetrieveFormat' || prop === 'orderRetrieveFormat') && root instanceof UserSettings) {
153
161
  clearDcmtsFileCache();