@topconsultnpm/sdkui-react-beta 6.10.55 → 6.10.57

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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from 'react';
2
+ import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import FileManager, { Column, Details, ItemView, Permissions, Notifications, ContextMenu, Toolbar, Item } from 'devextreme-react/file-manager';
4
4
  import { FileDescriptor, FileFormats, FileTransferModes, SDK_Localizator, SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
5
5
  import CustomFileSystemProvider from 'devextreme/file_management/custom_provider';
@@ -12,6 +12,7 @@ import { TMExceptionBoxManager } from './TMPopUp';
12
12
  import ShowAlert from './TMAlert';
13
13
  import { TMLayoutWaitingContainer } from './TMWaitPanel';
14
14
  import TMCounterContainer, { CounterItemKey } from './TMCounterContainer';
15
+ import { IconFolder, IconPdf, IconTxt, IconXls, IconDocx, IconImage, IconZip, IconXml, IconMp4, IconEmail, IconPpt, IconSigned, IconExe, IconHtml, IconDwg, IconDicom, IconSlddrw } from '../../assets/thumbnails';
15
16
  export class TMFileSystemItem {
16
17
  constructor() {
17
18
  this.name = "";
@@ -573,49 +574,49 @@ const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false
573
574
  }
574
575
  setFocusedFileSystemItem(e.item);
575
576
  };
576
- /* const customizeIcon = useCallback((fileSystemItem: FileSystemItem) => {
577
+ const customizeIcon = useCallback((fileSystemItem) => {
577
578
  if (fileSystemItem.isDirectory) {
578
- return IconFolder
579
+ return IconFolder;
579
580
  }
580
581
  else {
581
- const fileExtension = fileSystemItem.getFileExtension()
582
+ const fileExtension = fileSystemItem.getFileExtension();
582
583
  switch (fileExtension.toLowerCase()) {
583
584
  case '.pdf':
584
- return IconPdf
585
+ return IconPdf;
585
586
  case '.xls':
586
587
  case '.xlsx':
587
588
  case '.csv':
588
- return IconXls
589
+ return IconXls;
589
590
  case '.txt':
590
- return IconTxt
591
+ return IconTxt;
591
592
  case '.xml':
592
- return IconXml
593
+ return IconXml;
593
594
  case '.dwg':
594
- return IconDwg
595
+ return IconDwg;
595
596
  case '.dcm':
596
- return IconDicom
597
+ return IconDicom;
597
598
  case '.slddrw':
598
- return IconSlddrw
599
+ return IconSlddrw;
599
600
  case '.mp4':
600
- return IconMp4
601
+ return IconMp4;
601
602
  case '.doc':
602
603
  case '.docx':
603
604
  case '.dotx':
604
605
  case '.rtf':
605
- return IconDocx
606
+ return IconDocx;
606
607
  case '.ppt':
607
608
  case '.pptx':
608
- return IconPpt
609
+ return IconPpt;
609
610
  case '.msg':
610
611
  case '.eml':
611
- return IconEmail
612
+ return IconEmail;
612
613
  case '.exe':
613
- return IconExe
614
+ return IconExe;
614
615
  case '.htm':
615
616
  case '.html':
616
- return IconHtml
617
+ return IconHtml;
617
618
  case '.p7m':
618
- return IconSigned
619
+ return IconSigned;
619
620
  case '.png':
620
621
  case '.jpg':
621
622
  case '.jpeg':
@@ -625,16 +626,16 @@ const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false
625
626
  case '.ico':
626
627
  case '.gif':
627
628
  case '.webp':
628
- return IconImage
629
+ return IconImage;
629
630
  case '.zip':
630
631
  case '.rar':
631
632
  case '.7z':
632
- return IconZip
633
+ return IconZip;
633
634
  default:
634
- return IconTxt
635
+ return IconTxt;
635
636
  }
636
637
  }
637
- }, []); */
638
+ }, []);
638
639
  const onSelectedFileOpened = async (e) => {
639
640
  if (props.isPathChooser)
640
641
  props.areaChoose();
@@ -666,9 +667,7 @@ const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false
666
667
  alert(`"${e.name}" ${SDKUI_Localizator.FolderExist}`, SDKUI_Localizator.Attention);
667
668
  }
668
669
  };
669
- return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsxs(FileManager, { width: props.width, ref: fileManagerRef, height: `calc(${props.height} - 30px)`, onItemMoving: onItemCopying, onItemCopying: onItemCopying, onFileUploading: onFileUploading, fileSystemProvider: areaProvider,
670
- // customizeThumbnail={customizeIcon}
671
- rootFolderName: SDK_Localizator.Areas, onSelectionChanged: onSelectionChanged, onDirectoryCreating: onDirectoryCreating, onFocusedItemChanged: onFocusedItemChanged, onSelectedFileOpened: onSelectedFileOpened, onContextMenuItemClick: onContextMenuItemClick,
670
+ return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsxs(FileManager, { width: props.width, ref: fileManagerRef, height: `calc(${props.height} - 30px)`, onItemMoving: onItemCopying, onItemCopying: onItemCopying, onFileUploading: onFileUploading, fileSystemProvider: areaProvider, customizeThumbnail: customizeIcon, rootFolderName: SDK_Localizator.Areas, onSelectionChanged: onSelectionChanged, onDirectoryCreating: onDirectoryCreating, onFocusedItemChanged: onFocusedItemChanged, onSelectedFileOpened: onSelectedFileOpened, onContextMenuItemClick: onContextMenuItemClick,
672
671
  /* onItemMoved={() => setCounter(counter => counter + 1)}
673
672
  onItemCopied={() => setCounter(counter => counter + 1)}
674
673
  onItemDeleted={() => setCounter(counter => counter - 1)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.10.55",
3
+ "version": "6.10.57",
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.10.8",
45
+ "@topconsultnpm/sdk-ts-beta": "^6.10.9",
46
46
  "buffer": "^6.0.3",
47
47
  "devextreme": "24.2.3",
48
48
  "devextreme-react": "24.2.3",