@topconsultnpm/sdkui-react-beta 6.12.109 → 6.12.110

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.
@@ -18,9 +18,9 @@ const TMDataGrid = React.forwardRef((props, ref) => {
18
18
  // custom options
19
19
  dataColumns = [], pageSize = TMDataGridPageSize.Large, showHeaderFilter = true, showFilterPanel = false, showLoadPanel = true, showSearchPanel = true, searchPanelToolbarPosition = 'before', counterConfig = { show: false, items: new Map() },
20
20
  // events and callbacks
21
- onSelectionChanged, onFocusedRowChanged, onRowDblClick, onRowClick, onCellClick, onOptionChanged, onContentReady, onContextMenuPreparing, onInitialized, onEditorPreparing, onCellPrepared, onRowPrepared, onRowUpdating, onRowExpanded, onRowCollapsed, onRowUpdated, onSaved, onEditCanceled, onEditingStart, onEditingChange, customizeColumns, scrolling = { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 }, paging = { enabled: true, pageSize: pageSize }, pager = { visible: true, showInfo: true, showNavigationButtons: true }, selection = { mode: 'multiple', showCheckBoxesMode: "always", selectAllMode: "allPages" }, sorting, summary, stateStoring, columnChooser, grouping, groupPanel, filterRow, headerFilter, editing, rowDragging, masterDetail,
21
+ onSelectionChanged, onFocusedRowChanged, onRowDblClick, onRowClick, onCellClick, onOptionChanged, onContentReady, onContextMenuPreparing, onInitialized, onEditorPreparing, onCellPrepared, onRowPrepared, onRowUpdating, onRowExpanded, onRowCollapsed, onRowUpdated, onSaved, onEditCanceled, onEditingStart, onEditingChange, customizeColumns, scrolling = { mode: 'standard', useNative: SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar === 1 }, paging = { enabled: true, pageSize: pageSize }, pager = { visible: true, showInfo: true, showNavigationButtons: true }, selection = { mode: 'multiple', showCheckBoxesMode: "always", selectAllMode: "allPages" }, sorting, summary, stateStoring, columnChooser, grouping, groupPanel, filterRow, headerFilter, editing, rowDragging, masterDetail,
22
22
  // other properties
23
- disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showColumnLines = Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, showColumnHeaders = true, rowAlternationEnabled = false, wordWrapEnabled = false, noDataText,
23
+ disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines === 1, showColumnLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines === 1, showColumnHeaders = true, rowAlternationEnabled = false, wordWrapEnabled = false, noDataText,
24
24
  // styles
25
25
  id, width = '100%', height = '100%', } = props;
26
26
  const [counterValues, setCounterValues] = useState(new Map());
@@ -7,7 +7,7 @@ import { ContextMenu } from 'devextreme-react';
7
7
  import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconTag, IconDetails, IconCommand, IconDelete, IconRefresh, IconMenuVertical, IconDownload, IconSignature, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues } from '../../../helper';
8
8
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
9
9
  import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
10
- import { DcmtOperationTypes, FormModes, SearchResultContext } from '../../../ts';
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
13
  import ShowAlert from '../../base/TMAlert';
@@ -439,7 +439,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
439
439
  , {
440
440
  // allowMultipleSelection={allowMultipleSelection}
441
441
  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 &&
442
- _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)); } }), _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) })] }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {})] }) }), isOpenBatchUpdate ?
442
+ _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); } }), _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) })] }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {})] }) }), isOpenBatchUpdate ?
443
443
  _jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMBatchUpdateForm, { inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => setIsOpenBatchUpdate(false), onSavedCallbackAsync: async () => {
444
444
  setIsOpenBatchUpdate(false);
445
445
  setIsModifiedBatchUpdate(false);
@@ -1,2 +1,7 @@
1
- declare const SettingsAppearance: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const SettingsAppearance: ({ landingPagesOptions }: {
2
+ landingPagesOptions?: {
3
+ display: string;
4
+ value: string;
5
+ }[];
6
+ }) => import("react/jsx-runtime").JSX.Element;
2
7
  export default SettingsAppearance;
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { FontSize } from '../../utils/theme';
4
3
  import TMLayoutContainer from '../base/TMLayout';
5
4
  import TMDropDown from '../editors/TMDropDown';
6
5
  import TMCheckBox from '../editors/TMCheckBox';
7
6
  import TMButton from '../base/TMButton';
8
- import { SDKUI_Globals, SDKUI_Localizator } from '../../helper';
7
+ import { SDKUI_Globals, SDKUI_Localizator, ThemeSettings } from '../../helper';
9
8
  const fontSizes = [
10
9
  { value: "10px", display: "10px" },
11
10
  { value: "11px", display: "11px" },
@@ -19,10 +18,13 @@ const fontSizes = [
19
18
  { value: "19px", display: "19px" },
20
19
  { value: "20px", display: "20px" }
21
20
  ];
22
- const SettingsAppearance = () => {
23
- const [, forceUpdate] = useState(0); // Dummy state to force re-renders
24
- const triggerUIUpdate = () => forceUpdate((prev) => prev + 1); // Increment dummy state to re-render
25
- return (_jsxs(TMLayoutContainer, { children: [_jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold' }, children: 'Font' }), _jsx(TMDropDown, { label: SDKUI_Localizator.Size, dataSource: fontSizes, width: '150px', value: SDKUI_Globals.userSettings.themeSettings.fontSize, onValueChanged: (e) => {
21
+ const SettingsAppearance = ({ landingPagesOptions }) => {
22
+ const [, setForceUpdate] = useState(0); // Dummy state to force re-renders
23
+ const triggerUIUpdate = () => setForceUpdate((prev) => prev + 1); // Increment dummy state to re-render
24
+ return (_jsxs(TMLayoutContainer, { children: [landingPagesOptions && _jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold', marginBottom: '5px' }, children: 'Pagina iniziale' }), landingPagesOptions && _jsx(TMDropDown, { dataSource: landingPagesOptions, value: SDKUI_Globals.userSettings.landingPage, width: '250px', onValueChanged: (e) => {
25
+ SDKUI_Globals.userSettings.landingPage = e.target.value;
26
+ triggerUIUpdate();
27
+ } }), _jsx("p", { style: { fontSize: '1.h1rem', fontWeight: 'bold', marginTop: '10px' }, children: 'Font' }), _jsx(TMDropDown, { label: SDKUI_Localizator.Size, dataSource: fontSizes, width: '150px', value: SDKUI_Globals.userSettings.themeSettings.fontSize, onValueChanged: (e) => {
26
28
  let newpx = e.target.value;
27
29
  SDKUI_Globals.userSettings.themeSettings.fontSize = newpx;
28
30
  triggerUIUpdate();
@@ -36,10 +38,7 @@ const SettingsAppearance = () => {
36
38
  SDKUI_Globals.userSettings.themeSettings.gridSettings.useNativeScrollbar = newValue;
37
39
  triggerUIUpdate();
38
40
  } }), _jsx(TMButton, { elementStyle: { marginTop: '10px' }, caption: SDKUI_Localizator.Restore, showTooltip: false, onClick: () => {
39
- SDKUI_Globals.userSettings.themeSettings.fontSize = FontSize.defaultFontSizeInPixel;
40
- SDKUI_Globals.userSettings.themeSettings.gridSettings.showRowLines = 0;
41
- SDKUI_Globals.userSettings.themeSettings.gridSettings.showColumnLines = 0;
42
- SDKUI_Globals.userSettings.themeSettings.gridSettings.useNativeScrollbar = 1;
41
+ SDKUI_Globals.userSettings.themeSettings = new ThemeSettings();
43
42
  triggerUIUpdate();
44
43
  } })] }));
45
44
  };
@@ -1,12 +1,13 @@
1
1
  import { InvoiceRetrieveFormats, OrderRetrieveFormats } from "@topconsultnpm/sdk-ts-beta";
2
2
  export declare class UserSettings {
3
- userID: number | undefined;
4
3
  archiveID: string | undefined;
5
4
  landingPage: string;
6
- themeSettings: ThemeSettings;
7
- searchSettings: SearchSettings2;
5
+ userID: number | undefined;
6
+ advancedSettings: AdvancedSettings;
8
7
  archivingSettings: ArchivingSettings;
9
8
  fullTextSettings: FullTextSettings;
9
+ searchSettings: SearchSettings2;
10
+ themeSettings: ThemeSettings;
10
11
  /** Load settings from local storage or other sources */
11
12
  static LoadSettings(userID: number | undefined, archiveID: string | undefined): UserSettings;
12
13
  /** Save settings to local storage or other sources */
@@ -32,10 +33,14 @@ export declare class SearchSettings2 {
32
33
  }
33
34
  export declare class ArchivingSettings {
34
35
  mruTIDs: number[];
36
+ defaultTree: number;
35
37
  }
36
38
  export declare class FullTextSettings {
37
39
  mruTerms: string[];
38
40
  }
41
+ export declare class AdvancedSettings {
42
+ expertMode: number;
43
+ }
39
44
  export declare class SDKUI_Globals {
40
45
  static userSettings: UserSettings;
41
46
  }
@@ -2,13 +2,14 @@ import { InvoiceRetrieveFormats, LocalStorageService, OrderRetrieveFormats } fro
2
2
  import { FontSize } from "../utils/theme";
3
3
  export class UserSettings {
4
4
  constructor() {
5
- this.userID = undefined;
6
5
  this.archiveID = undefined;
7
6
  this.landingPage = '';
8
- this.themeSettings = new ThemeSettings();
9
- this.searchSettings = new SearchSettings2();
7
+ this.userID = undefined;
8
+ this.advancedSettings = new AdvancedSettings();
10
9
  this.archivingSettings = new ArchivingSettings();
11
10
  this.fullTextSettings = new FullTextSettings();
11
+ this.searchSettings = new SearchSettings2();
12
+ this.themeSettings = new ThemeSettings();
12
13
  }
13
14
  /** Load settings from local storage or other sources */
14
15
  static LoadSettings(userID, archiveID) {
@@ -62,8 +63,8 @@ export class ThemeSettings {
62
63
  }
63
64
  export class SearchSettings2 {
64
65
  constructor() {
65
- this.invoiceRetrieveFormat = InvoiceRetrieveFormats.ASW_PDF;
66
- this.orderRetrieveFormat = OrderRetrieveFormats.ER_PDF;
66
+ this.invoiceRetrieveFormat = InvoiceRetrieveFormats.ASW_HTML;
67
+ this.orderRetrieveFormat = OrderRetrieveFormats.NSO_HTML;
67
68
  this.mruTIDs = [];
68
69
  this.defaultTree = -1;
69
70
  this.previewThreshold = 500000;
@@ -75,6 +76,7 @@ export class SearchSettings2 {
75
76
  export class ArchivingSettings {
76
77
  constructor() {
77
78
  this.mruTIDs = [];
79
+ this.defaultTree = -1;
78
80
  }
79
81
  }
80
82
  export class FullTextSettings {
@@ -82,6 +84,11 @@ export class FullTextSettings {
82
84
  this.mruTerms = [];
83
85
  }
84
86
  }
87
+ export class AdvancedSettings {
88
+ constructor() {
89
+ this.expertMode = 0;
90
+ }
91
+ }
85
92
  export class SDKUI_Globals {
86
93
  }
87
94
  SDKUI_Globals.userSettings = new UserSettings();
@@ -35,8 +35,8 @@ export function useDcmtOperations() {
35
35
  abortController = new AbortController();
36
36
  const rfo = new RetrieveFileOptions();
37
37
  rfo.retrieveReason = DcmtOpers.ShowFile;
38
- rfo.invoiceRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings?.invoiceRetrieveFormat;
39
- rfo.orderRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings?.orderRetrieveFormat;
38
+ rfo.invoiceRetrieveFormat = SDKUI_Globals.userSettings.searchSettings.invoiceRetrieveFormat;
39
+ rfo.orderRetrieveFormat = SDKUI_Globals.userSettings.searchSettings.orderRetrieveFormat;
40
40
  let result = [];
41
41
  setWaitPanelMaxValuePrimary(inputDcmts.length);
42
42
  let firstBlock = true;
@@ -50,7 +50,7 @@ TMColors._colorHeader = "black";
50
50
  class FontSize {
51
51
  }
52
52
  FontSize.defaultFontSize = '1rem';
53
- FontSize.defaultFontSizeInPixel = '12px';
53
+ FontSize.defaultFontSizeInPixel = '13px';
54
54
  class TMMargin {
55
55
  }
56
56
  TMMargin.defultMargin = '5px';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.12.109",
3
+ "version": "6.12.110",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",