@topconsultnpm/sdkui-react-beta 6.13.67 → 6.13.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import HtmlEditor, { Toolbar, Item } from 'devextreme-react/html-editor';
4
- import TMVilViewer from '../base/TMVilViewer';
4
+ import ReactDOM from 'react-dom';
5
5
  import { SDKUI_Localizator } from '../../helper';
6
+ import TMVilViewer from '../base/TMVilViewer';
6
7
  const TMHtmlEditor = (props) => {
7
8
  const { width = "100%", height = "100%", initialMarkup = "", mentionsConfig, onValueChanged, validationItems = [], isEditorEnabled: isEditorEnabledProp = false, toolbarMode = 'compact', autoFocus = false } = props;
8
9
  // Ref for HtmlEditor instance
@@ -11,6 +12,84 @@ const TMHtmlEditor = (props) => {
11
12
  const [isEditorEnabled, setIsEditorEnabled] = useState(false);
12
13
  // State to hold HTML markup
13
14
  const [markup, setMarkup] = useState(initialMarkup);
15
+ // State to track the position (x, y coordinates) where the custom context menu should be displayed.
16
+ const [contextMenuPos, setContextMenuPos] = useState(null);
17
+ // State to indicate whether a paste operation is currently in progress
18
+ const [isPasting, setIsPasting] = useState(false);
19
+ // Function to read text from the clipboard, format it, and paste into the Quill editor
20
+ const pasteFromClipboard = async () => {
21
+ try {
22
+ // Set flag to indicate paste operation is in progress
23
+ setIsPasting(true);
24
+ // Read plain text from the clipboard asynchronously
25
+ let text = await navigator.clipboard.readText();
26
+ // Removes potentially dangerous HTML tags (script, iframe, embed, etc.) from the pasted content
27
+ text = text.replace(/<(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^>]*>/gi, '');
28
+ // Replace line breaks with HTML paragraph tags to keep formatting
29
+ text = text.replace(/\r\n/g, '</p><p>').replace(/^/, '<p>').replace(/$/, '</p>');
30
+ // Access the Quill editor instance from the HtmlEditor component reference
31
+ const quill = editorRef.current?.instance()?.getQuillInstance();
32
+ if (quill) {
33
+ // Get the current cursor position or selection range in the editor
34
+ const range = quill.getSelection(true);
35
+ if (range) {
36
+ if (range.length > 0) {
37
+ // If there is a text selection, delete the selected text from the editor
38
+ quill.deleteText(range.index, range.length);
39
+ // Use a short delay before pasting the new content, this ensures the deletion is fully processed before inserting HTML
40
+ setTimeout(() => {
41
+ // Paste the sanitized HTML content at the cursor's original position
42
+ quill.clipboard.dangerouslyPasteHTML(range.index, text);
43
+ }, 100);
44
+ }
45
+ else {
46
+ // Paste the formatted HTML content at the current cursor position
47
+ setTimeout(() => quill.clipboard.dangerouslyPasteHTML(range.index, text), 100);
48
+ }
49
+ }
50
+ }
51
+ }
52
+ catch (err) {
53
+ // Log any errors that might occur during clipboard access or pasting
54
+ console.warn('Clipboard paste failed:', err);
55
+ }
56
+ finally {
57
+ // Reset paste state after a short delay to restore UI state
58
+ setTimeout(() => setIsPasting(false), 500);
59
+ }
60
+ };
61
+ useEffect(() => {
62
+ const handleKeyDown = (e) => {
63
+ // Check if the pressed keys correspond to paste (Ctrl or Cmd + V)
64
+ const isPaste = (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'v';
65
+ if (isPaste) {
66
+ // Prevent the default paste action to handle custom pasting
67
+ e.preventDefault();
68
+ // Call the custom paste function to handle clipboard text
69
+ pasteFromClipboard();
70
+ }
71
+ };
72
+ // Add event listener on component mount
73
+ window.addEventListener('keydown', handleKeyDown);
74
+ return () => {
75
+ // Cleanup event listener on component unmount
76
+ window.removeEventListener('keydown', handleKeyDown);
77
+ };
78
+ }, []);
79
+ const handleContextMenu = (e) => {
80
+ e.preventDefault();
81
+ setContextMenuPos({ x: e.clientX, y: e.clientY });
82
+ };
83
+ const handleClickOutside = () => {
84
+ if (contextMenuPos)
85
+ setContextMenuPos(null);
86
+ };
87
+ useEffect(() => {
88
+ document.addEventListener('click', handleClickOutside);
89
+ return () => {
90
+ document.removeEventListener('click', handleClickOutside);
91
+ };
92
+ }, [contextMenuPos]);
14
93
  useEffect(() => {
15
94
  if (markup === initialMarkup)
16
95
  return;
@@ -38,10 +117,28 @@ const TMHtmlEditor = (props) => {
38
117
  }, [autoFocus]);
39
118
  // Memoized check for validation errors
40
119
  const hasValidationErrors = useMemo(() => {
41
- return validationItems && validationItems.length > 0;
120
+ return !isPasting && validationItems && validationItems.length > 0;
42
121
  }, [validationItems]);
43
- return (_jsxs("div", { style: { height: validationItems.length > 0 ? `calc(${height} - 30px)` : "100%", width: width }, children: [_jsx("div", { className: "custom-mentions-wrapper", style: { borderWidth: '1px', borderStyle: 'solid', borderColor: hasValidationErrors ? "red" : "#e0e0e0 #e0e0e0 #616161", width: "100%", height: "100%" }, children: _jsx(HtmlEditor, { ref: editorRef, placeholder: SDKUI_Localizator.TypeAMessage + "...", width: "100%", height: "100%", value: markup, onValueChange: onValueChangeCallback, mentions: mentionsConfig, style: { overflow: 'hidden', outline: "none", fontSize: '1rem' }, children: isEditorEnabled && (toolbarMode === 'compact' ?
122
+ // Handler function triggered by the context menu's "Paste" action
123
+ const handlePaste = async () => {
124
+ // Use the same clipboard reading and pasting logic as in keyboard shortcut
125
+ await pasteFromClipboard();
126
+ // Close the custom context menu after pasting
127
+ setContextMenuPos(null);
128
+ };
129
+ return (_jsxs("div", { style: { height: hasValidationErrors ? `calc(${height} - 30px)` : "100%", width: width }, onContextMenu: handleContextMenu, children: [_jsx("div", { className: "custom-mentions-wrapper", style: { borderWidth: '1px', borderStyle: 'solid', borderColor: hasValidationErrors ? "red" : "#e0e0e0 #e0e0e0 #616161", width: "100%", height: "100%" }, children: _jsx(HtmlEditor, { ref: editorRef, placeholder: SDKUI_Localizator.TypeAMessage + "...", width: "100%", height: "100%", value: markup, onValueChange: onValueChangeCallback, mentions: mentionsConfig, style: { overflow: 'hidden', outline: "none", fontSize: '1rem' }, children: isEditorEnabled && (toolbarMode === 'compact' ?
44
130
  _jsxs(Toolbar, { multiline: false, children: [_jsx(Item, { name: "undo" }), _jsx(Item, { name: "redo" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "bold" }), _jsx(Item, { name: "italic" }), _jsx(Item, { name: "strike" }), _jsx(Item, { name: "underline" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "orderedList" }), _jsx(Item, { name: "bulletList" })] }) :
45
- _jsxs(Toolbar, { children: [_jsx(Item, { name: "undo" }), _jsx(Item, { name: "redo" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "bold" }), _jsx(Item, { name: "italic" }), _jsx(Item, { name: "strike" }), _jsx(Item, { name: "underline" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "alignLeft" }), _jsx(Item, { name: "alignCenter" }), _jsx(Item, { name: "alignRight" }), _jsx(Item, { name: "alignJustify" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "color" }), _jsx(Item, { name: "background" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "link" }), _jsx(Item, { name: "image" }), _jsx(Item, { name: "separator" })] })) }) }), _jsx("div", { style: { width: "100%", height: validationItems.length > 0 ? "30px" : '0px' }, children: _jsx(TMVilViewer, { vil: validationItems }) })] }));
131
+ _jsxs(Toolbar, { children: [_jsx(Item, { name: "undo" }), _jsx(Item, { name: "redo" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "bold" }), _jsx(Item, { name: "italic" }), _jsx(Item, { name: "strike" }), _jsx(Item, { name: "underline" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "alignLeft" }), _jsx(Item, { name: "alignCenter" }), _jsx(Item, { name: "alignRight" }), _jsx(Item, { name: "alignJustify" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "color" }), _jsx(Item, { name: "background" }), _jsx(Item, { name: "separator" }), _jsx(Item, { name: "link" }), _jsx(Item, { name: "image" }), _jsx(Item, { name: "separator" })] })) }) }), !isPasting && validationItems.length > 0 && (_jsx("div", { style: { width: "100%", height: "30px" }, children: _jsx(TMVilViewer, { vil: validationItems }) })), contextMenuPos &&
132
+ ReactDOM.createPortal(_jsx("div", { style: {
133
+ position: 'fixed',
134
+ top: contextMenuPos.y,
135
+ left: contextMenuPos.x,
136
+ background: 'white',
137
+ border: '1px solid #ccc',
138
+ boxShadow: '0 2px 6px rgba(0,0,0,0.2)',
139
+ zIndex: 9999,
140
+ padding: '5px 10px',
141
+ cursor: 'pointer'
142
+ }, onClick: handlePaste, children: "Paste" }), document.body)] }));
46
143
  };
47
144
  export default TMHtmlEditor;
@@ -102,6 +102,20 @@ const TMSearchQueryPanel = ({ fromDTD, isExpertMode = SDKUI_Globals.userSettings
102
102
  }
103
103
  }
104
104
  };
105
+ useEffect(() => {
106
+ if (!qd)
107
+ return;
108
+ const handleKeyDown = async (e) => {
109
+ if (e.key === 'Enter') {
110
+ e.preventDefault();
111
+ await searchAsync(qd, showAdvancedSearch);
112
+ }
113
+ };
114
+ window.addEventListener('keydown', handleKeyDown);
115
+ return () => {
116
+ window.removeEventListener('keydown', handleKeyDown);
117
+ };
118
+ }, [qd, showAdvancedSearch]);
105
119
  const isMobile = deviceType === DeviceType.MOBILE;
106
120
  return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: !isMobile, onMaximize: isMobile ? undefined : onMaximizePanel, onHeaderDoubleClick: isMobile ? undefined : onMaximizePanel, onBack: onBack, keepActiveState: keepStatePanelIsActive, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
107
121
  _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, { color: 'white' }), showTooltip: false }), items: [
@@ -4,13 +4,12 @@ import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, M
4
4
  import styled from 'styled-components';
5
5
  import { getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
6
  import { ContextMenu } from 'devextreme-react';
7
- import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, IconSignature, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues, SDKUI_Globals, IconSearchCheck } from '../../../helper';
7
+ import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues, SDKUI_Globals, IconSearchCheck } from '../../../helper';
8
8
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
9
9
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
10
10
  import { DcmtOperationTypes, FormModes, SearchResultContext, DownloadTypes } from '../../../ts';
11
11
  import { TMColors } from '../../../utils/theme';
12
12
  import { StyledModalContainer, StyledBadge, StyledMultiViewPanel } from '../../base/Styled';
13
- import ShowAlert from '../../base/TMAlert';
14
13
  import TMButton from '../../base/TMButton';
15
14
  import TMDataGrid, { TMDataGridPageSize } from '../../base/TMDataGrid';
16
15
  import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
@@ -342,7 +341,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
342
341
  , {
343
342
  // allowMultipleSelection={allowMultipleSelection}
344
343
  inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
345
- _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
344
+ _jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: SDKUI_Localizator.BatchUpdate, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
346
345
  setIsOpenBatchUpdate(false);
347
346
  }, onSavedCallbackAsync: async () => {
348
347
  setIsOpenBatchUpdate(false);
@@ -14,6 +14,7 @@ export declare class UserSettings {
14
14
  fullTextSettings: FullTextSettings;
15
15
  searchSettings: SearchSettings;
16
16
  themeSettings: ThemeSettings;
17
+ constructor(skipCssUpdate?: boolean);
17
18
  /** Load settings from local storage or other sources */
18
19
  static LoadSettings(userID: number | undefined, archiveID: string | undefined): UserSettings;
19
20
  /** Save settings to local storage or other sources */
@@ -29,7 +30,7 @@ export declare class ThemeSettings {
29
30
  fontSize: string;
30
31
  gridSettings: DataGridSettings;
31
32
  gutters: number;
32
- constructor();
33
+ constructor(skipCssUpdate?: boolean);
33
34
  }
34
35
  export declare class SearchSettings {
35
36
  invoiceRetrieveFormat: InvoiceRetrieveFormats;
@@ -8,7 +8,7 @@ export const clearDcmtsFileCache = () => { dcmtsFileCachePreview.clear(); dcmtsF
8
8
  export const removeDcmtsFileCache = (key) => { dcmtsFileCachePreview.delete(key); dcmtsFileCacheDownload.delete(key); };
9
9
  export const isDcmtFileInCache = (key) => dcmtsFileCachePreview.has(key);
10
10
  export class UserSettings {
11
- constructor() {
11
+ constructor(skipCssUpdate = false) {
12
12
  this.archiveID = undefined;
13
13
  this.landingPage = 'dashboard'; // TODO: se usiamo LandingPages errore sulle dipendenze.
14
14
  this.userID = undefined;
@@ -16,7 +16,8 @@ export class UserSettings {
16
16
  this.archivingSettings = new ArchivingSettings();
17
17
  this.fullTextSettings = new FullTextSettings();
18
18
  this.searchSettings = new SearchSettings();
19
- this.themeSettings = new ThemeSettings();
19
+ this.themeSettings = new ThemeSettings(true);
20
+ this.themeSettings = new ThemeSettings(skipCssUpdate);
20
21
  }
21
22
  /** Load settings from local storage or other sources */
22
23
  static LoadSettings(userID, archiveID) {
@@ -26,7 +27,7 @@ export class UserSettings {
26
27
  // Load settings from local storage
27
28
  const loadedSettings = LocalStorageService.getItem(`userSettings_${archiveID}_${userID}`);
28
29
  // Merge loaded settings with default settings
29
- const defaultSettings = new UserSettings();
30
+ const defaultSettings = new UserSettings(true);
30
31
  const settings = Object.assign(defaultSettings, loadedSettings);
31
32
  // Ensure userID and archiveID are set
32
33
  settings.userID = userID;
@@ -44,7 +45,7 @@ export class UserSettings {
44
45
  if (!settings.userID || !settings.archiveID) {
45
46
  throw new Error('User ID and Archive ID are required to save settings.');
46
47
  }
47
- const defaultSettings = new UserSettings();
48
+ const defaultSettings = new UserSettings(true);
48
49
  const filteredSettings = Object.fromEntries(Object.entries(settings).filter(([key, value]) => {
49
50
  const defaultValue = defaultSettings[key];
50
51
  return JSON.stringify(value) !== JSON.stringify(defaultValue);
@@ -61,12 +62,14 @@ export class DataGridSettings {
61
62
  }
62
63
  }
63
64
  export class ThemeSettings {
64
- constructor() {
65
+ constructor(skipCssUpdate = false) {
65
66
  this.fontSize = FontSize.defaultFontSizeInPixel;
66
67
  this.gridSettings = new DataGridSettings();
67
68
  this.gutters = Gutters.getGutters();
68
69
  // Automatically update the CSS variable for font size
69
- document.documentElement.style.setProperty('--base-font-size', this.fontSize);
70
+ if (!skipCssUpdate) {
71
+ document.documentElement.style.setProperty('--base-font-size', this.fontSize);
72
+ }
70
73
  }
71
74
  }
72
75
  export class SearchSettings {
@@ -113,7 +116,7 @@ export class AdvancedSettings {
113
116
  }
114
117
  export class SDKUI_Globals {
115
118
  }
116
- SDKUI_Globals.userSettings = new UserSettings();
119
+ SDKUI_Globals.userSettings = new UserSettings(true);
117
120
  function createProxy(obj, saveCallback, rootObj) {
118
121
  const root = rootObj || obj; // Use the provided root object or default to the current object
119
122
  return new Proxy(obj, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.13.67",
3
+ "version": "6.13.69",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -42,7 +42,7 @@
42
42
  "lib"
43
43
  ],
44
44
  "dependencies": {
45
- "@topconsultnpm/sdk-ts-beta": "^6.13.8",
45
+ "@topconsultnpm/sdk-ts-beta": "6.13.8",
46
46
  "buffer": "^6.0.3",
47
47
  "devextreme": "24.2.6",
48
48
  "devextreme-react": "24.2.6",