@topconsultnpm/sdkui-react 6.17.0-test9
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/assets/IconsS4t/add.svg +12 -0
- package/lib/assets/IconsS4t/aggiorna.svg +18 -0
- package/lib/assets/IconsS4t/bookmark.svg +42 -0
- package/lib/assets/IconsS4t/cancella.svg +15 -0
- package/lib/assets/IconsS4t/check-box.svg +19 -0
- package/lib/assets/IconsS4t/down-arrow-signBook.svg +40 -0
- package/lib/assets/IconsS4t/down.svg +28 -0
- package/lib/assets/IconsS4t/edit-file.svg +19 -0
- package/lib/assets/IconsS4t/edita.svg +32 -0
- package/lib/assets/IconsS4t/firma.svg +19 -0
- package/lib/assets/IconsS4t/icona_download.svg +16 -0
- package/lib/assets/IconsS4t/info.svg +51 -0
- package/lib/assets/IconsS4t/left.svg +20 -0
- package/lib/assets/IconsS4t/line.svg +40 -0
- package/lib/assets/IconsS4t/more.svg +19 -0
- package/lib/assets/IconsS4t/new-signature.svg +1 -0
- package/lib/assets/IconsS4t/plus.svg +23 -0
- package/lib/assets/IconsS4t/printer.svg +49 -0
- package/lib/assets/IconsS4t/radio-on-button.svg +25 -0
- package/lib/assets/IconsS4t/rectangle.svg +41 -0
- package/lib/assets/IconsS4t/redo.svg +19 -0
- package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +40 -0
- package/lib/assets/IconsS4t/right-arrow-signBook.svg +40 -0
- package/lib/assets/IconsS4t/right.svg +22 -0
- package/lib/assets/IconsS4t/searchbar.svg +21 -0
- package/lib/assets/IconsS4t/text-box.svg +36 -0
- package/lib/assets/IconsS4t/tick.svg +8 -0
- package/lib/assets/IconsS4t/trash-white.svg +11 -0
- package/lib/assets/IconsS4t/trash.svg +1 -0
- package/lib/assets/IconsS4t/undo.svg +19 -0
- package/lib/assets/IconsS4t/up.svg +32 -0
- package/lib/assets/IconsS4t/video-streaming.svg +2 -0
- package/lib/assets/IconsS4t/zoom-in.svg +58 -0
- package/lib/assets/IconsS4t/zoom-out.svg +56 -0
- package/lib/assets/ImageLibrary/arrow_001.png +0 -0
- package/lib/assets/ImageLibrary/arrow_002.png +0 -0
- package/lib/assets/ImageLibrary/arrow_003.png +0 -0
- package/lib/assets/ImageLibrary/arrow_004.png +0 -0
- package/lib/assets/ImageLibrary/arrow_005.png +0 -0
- package/lib/assets/ImageLibrary/arrow_006.png +0 -0
- package/lib/assets/ImageLibrary/arrow_007.png +0 -0
- package/lib/assets/ImageLibrary/arrow_008.png +0 -0
- package/lib/assets/ImageLibrary/arrow_009.png +0 -0
- package/lib/assets/ImageLibrary/arrow_010.png +0 -0
- package/lib/assets/ImageLibrary/arrow_011.png +0 -0
- package/lib/assets/ImageLibrary/arrow_012.png +0 -0
- package/lib/assets/ImageLibrary/book_001.png +0 -0
- package/lib/assets/ImageLibrary/book_002.png +0 -0
- package/lib/assets/ImageLibrary/book_003.png +0 -0
- package/lib/assets/ImageLibrary/book_004.png +0 -0
- package/lib/assets/ImageLibrary/book_005.png +0 -0
- package/lib/assets/ImageLibrary/book_006.png +0 -0
- package/lib/assets/ImageLibrary/book_007.png +0 -0
- package/lib/assets/ImageLibrary/clock_001.png +0 -0
- package/lib/assets/ImageLibrary/clock_002.png +0 -0
- package/lib/assets/ImageLibrary/clock_003.png +0 -0
- package/lib/assets/ImageLibrary/cube_001.png +0 -0
- package/lib/assets/ImageLibrary/cube_002.png +0 -0
- package/lib/assets/ImageLibrary/cube_003.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_001.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_002.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_003.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_004.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_005.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_006.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_007.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_008.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_001.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_002.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_003.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_004.png +0 -0
- package/lib/assets/ImageLibrary/fld_001.png +0 -0
- package/lib/assets/ImageLibrary/fld_002.png +0 -0
- package/lib/assets/ImageLibrary/fld_003.png +0 -0
- package/lib/assets/ImageLibrary/fld_004.png +0 -0
- package/lib/assets/ImageLibrary/fld_005.png +0 -0
- package/lib/assets/ImageLibrary/fld_006.png +0 -0
- package/lib/assets/ImageLibrary/fld_007.png +0 -0
- package/lib/assets/ImageLibrary/fld_008.png +0 -0
- package/lib/assets/ImageLibrary/fld_009.png +0 -0
- package/lib/assets/ImageLibrary/fld_010.png +0 -0
- package/lib/assets/ImageLibrary/fld_011.png +0 -0
- package/lib/assets/ImageLibrary/fld_012.png +0 -0
- package/lib/assets/ImageLibrary/fld_013.png +0 -0
- package/lib/assets/ImageLibrary/fld_014.png +0 -0
- package/lib/assets/ImageLibrary/fld_015.png +0 -0
- package/lib/assets/ImageLibrary/fld_016.png +0 -0
- package/lib/assets/ImageLibrary/fld_017.png +0 -0
- package/lib/assets/ImageLibrary/fld_018.png +0 -0
- package/lib/assets/ImageLibrary/fld_019.png +0 -0
- package/lib/assets/ImageLibrary/fld_020.png +0 -0
- package/lib/assets/ImageLibrary/fld_021.png +0 -0
- package/lib/assets/ImageLibrary/fld_022.png +0 -0
- package/lib/assets/ImageLibrary/fld_023.png +0 -0
- package/lib/assets/ImageLibrary/fld_024.png +0 -0
- package/lib/assets/ImageLibrary/fld_025.png +0 -0
- package/lib/assets/ImageLibrary/fld_026.png +0 -0
- package/lib/assets/ImageLibrary/fld_027.png +0 -0
- package/lib/assets/ImageLibrary/fld_028.png +0 -0
- package/lib/assets/ImageLibrary/fld_029.png +0 -0
- package/lib/assets/ImageLibrary/fld_030.png +0 -0
- package/lib/assets/ImageLibrary/fld_031.png +0 -0
- package/lib/assets/ImageLibrary/fld_032.png +0 -0
- package/lib/assets/ImageLibrary/fld_033.png +0 -0
- package/lib/assets/ImageLibrary/gen_001.png +0 -0
- package/lib/assets/ImageLibrary/gen_002.png +0 -0
- package/lib/assets/ImageLibrary/gen_003.png +0 -0
- package/lib/assets/ImageLibrary/gen_004.png +0 -0
- package/lib/assets/ImageLibrary/gen_005.png +0 -0
- package/lib/assets/ImageLibrary/gen_006.png +0 -0
- package/lib/assets/ImageLibrary/gen_007.png +0 -0
- package/lib/assets/ImageLibrary/gen_008.png +0 -0
- package/lib/assets/ImageLibrary/gen_009.png +0 -0
- package/lib/assets/ImageLibrary/gen_010.png +0 -0
- package/lib/assets/ImageLibrary/gen_011.png +0 -0
- package/lib/assets/ImageLibrary/gen_012.png +0 -0
- package/lib/assets/ImageLibrary/gen_013.png +0 -0
- package/lib/assets/ImageLibrary/gen_014.png +0 -0
- package/lib/assets/ImageLibrary/gen_015.png +0 -0
- package/lib/assets/ImageLibrary/gen_016.png +0 -0
- package/lib/assets/ImageLibrary/gen_017.png +0 -0
- package/lib/assets/ImageLibrary/gen_018.png +0 -0
- package/lib/assets/ImageLibrary/gen_019.png +0 -0
- package/lib/assets/ImageLibrary/gen_020.png +0 -0
- package/lib/assets/ImageLibrary/gen_021.png +0 -0
- package/lib/assets/ImageLibrary/gen_022.png +0 -0
- package/lib/assets/ImageLibrary/gen_023.png +0 -0
- package/lib/assets/ImageLibrary/gen_024.png +0 -0
- package/lib/assets/ImageLibrary/gen_025.png +0 -0
- package/lib/assets/ImageLibrary/gen_026.png +0 -0
- package/lib/assets/ImageLibrary/gen_027.png +0 -0
- package/lib/assets/ImageLibrary/gen_028.png +0 -0
- package/lib/assets/ImageLibrary/gen_029.png +0 -0
- package/lib/assets/ImageLibrary/gen_030.png +0 -0
- package/lib/assets/ImageLibrary/gen_031.png +0 -0
- package/lib/assets/ImageLibrary/gen_032.png +0 -0
- package/lib/assets/ImageLibrary/gen_033.png +0 -0
- package/lib/assets/ImageLibrary/gen_034.png +0 -0
- package/lib/assets/ImageLibrary/gen_035.png +0 -0
- package/lib/assets/ImageLibrary/gen_036.png +0 -0
- package/lib/assets/ImageLibrary/gen_037.png +0 -0
- package/lib/assets/ImageLibrary/gen_038.png +0 -0
- package/lib/assets/ImageLibrary/gen_039.png +0 -0
- package/lib/assets/ImageLibrary/gen_040.png +0 -0
- package/lib/assets/ImageLibrary/gen_041.png +0 -0
- package/lib/assets/ImageLibrary/gen_042.png +0 -0
- package/lib/assets/ImageLibrary/gen_043.png +0 -0
- package/lib/assets/ImageLibrary/gen_044.png +0 -0
- package/lib/assets/ImageLibrary/gen_045.png +0 -0
- package/lib/assets/ImageLibrary/gen_046.png +0 -0
- package/lib/assets/ImageLibrary/gen_047.png +0 -0
- package/lib/assets/ImageLibrary/gen_048.png +0 -0
- package/lib/assets/ImageLibrary/gen_049.png +0 -0
- package/lib/assets/ImageLibrary/gen_050.png +0 -0
- package/lib/assets/ImageLibrary/gen_051.png +0 -0
- package/lib/assets/ImageLibrary/gen_052.png +0 -0
- package/lib/assets/ImageLibrary/hand_001.png +0 -0
- package/lib/assets/ImageLibrary/hand_002.png +0 -0
- package/lib/assets/ImageLibrary/hand_003.png +0 -0
- package/lib/assets/ImageLibrary/hand_004.png +0 -0
- package/lib/assets/ImageLibrary/hand_005.png +0 -0
- package/lib/assets/ImageLibrary/hand_006.png +0 -0
- package/lib/assets/ImageLibrary/law_001.png +0 -0
- package/lib/assets/ImageLibrary/law_002.png +0 -0
- package/lib/assets/ImageLibrary/law_003.png +0 -0
- package/lib/assets/ImageLibrary/lock_001.png +0 -0
- package/lib/assets/ImageLibrary/lock_002.png +0 -0
- package/lib/assets/ImageLibrary/lock_003.png +0 -0
- package/lib/assets/ImageLibrary/mail_001.png +0 -0
- package/lib/assets/ImageLibrary/mail_002.png +0 -0
- package/lib/assets/ImageLibrary/mail_003.png +0 -0
- package/lib/assets/ImageLibrary/mail_004.png +0 -0
- package/lib/assets/ImageLibrary/mail_005.png +0 -0
- package/lib/assets/ImageLibrary/mail_006.png +0 -0
- package/lib/assets/ImageLibrary/mail_007.png +0 -0
- package/lib/assets/ImageLibrary/mail_008.png +0 -0
- package/lib/assets/ImageLibrary/mail_009.png +0 -0
- package/lib/assets/ImageLibrary/mail_010.png +0 -0
- package/lib/assets/ImageLibrary/mail_011.png +0 -0
- package/lib/assets/ImageLibrary/mail_012.png +0 -0
- package/lib/assets/ImageLibrary/mail_013.png +0 -0
- package/lib/assets/ImageLibrary/mail_014.png +0 -0
- package/lib/assets/ImageLibrary/mail_015.png +0 -0
- package/lib/assets/ImageLibrary/net_001.png +0 -0
- package/lib/assets/ImageLibrary/net_002.png +0 -0
- package/lib/assets/ImageLibrary/net_003.png +0 -0
- package/lib/assets/ImageLibrary/net_004.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_001.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_002.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_003.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_004.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_005.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_006.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_007.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_008.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_009.png +0 -0
- package/lib/assets/ImageLibrary/note_001.png +0 -0
- package/lib/assets/ImageLibrary/note_002.png +0 -0
- package/lib/assets/ImageLibrary/note_003.png +0 -0
- package/lib/assets/ImageLibrary/note_004.png +0 -0
- package/lib/assets/ImageLibrary/note_005.png +0 -0
- package/lib/assets/ImageLibrary/note_006.png +0 -0
- package/lib/assets/ImageLibrary/note_007.png +0 -0
- package/lib/assets/ImageLibrary/note_008.png +0 -0
- package/lib/assets/ImageLibrary/note_009.png +0 -0
- package/lib/assets/ImageLibrary/note_010.png +0 -0
- package/lib/assets/ImageLibrary/note_011.png +0 -0
- package/lib/assets/ImageLibrary/note_012.png +0 -0
- package/lib/assets/ImageLibrary/note_013.png +0 -0
- package/lib/assets/ImageLibrary/note_014.png +0 -0
- package/lib/assets/ImageLibrary/note_015.png +0 -0
- package/lib/assets/ImageLibrary/note_016.png +0 -0
- package/lib/assets/ImageLibrary/run_001.png +0 -0
- package/lib/assets/ImageLibrary/run_002.png +0 -0
- package/lib/assets/ImageLibrary/run_003.png +0 -0
- package/lib/assets/ImageLibrary/sem_001.png +0 -0
- package/lib/assets/ImageLibrary/sem_002.png +0 -0
- package/lib/assets/ImageLibrary/sem_003.png +0 -0
- package/lib/assets/ImageLibrary/sem_004.png +0 -0
- package/lib/assets/ImageLibrary/sem_005.png +0 -0
- package/lib/assets/ImageLibrary/star_001.png +0 -0
- package/lib/assets/ImageLibrary/star_002.png +0 -0
- package/lib/assets/ImageLibrary/star_003.png +0 -0
- package/lib/assets/ImageLibrary/star_004.png +0 -0
- package/lib/assets/ImageLibrary/star_005.png +0 -0
- package/lib/assets/ImageLibrary/star_006.png +0 -0
- package/lib/assets/ImageLibrary/state_001.png +0 -0
- package/lib/assets/ImageLibrary/state_002.png +0 -0
- package/lib/assets/ImageLibrary/state_003.png +0 -0
- package/lib/assets/ImageLibrary/state_004.png +0 -0
- package/lib/assets/ImageLibrary/state_005.png +0 -0
- package/lib/assets/ImageLibrary/study_001.png +0 -0
- package/lib/assets/ImageLibrary/study_002.png +0 -0
- package/lib/assets/ImageLibrary/user_001.png +0 -0
- package/lib/assets/ImageLibrary/user_002.png +0 -0
- package/lib/assets/ImageLibrary/user_003.png +0 -0
- package/lib/assets/ImageLibrary/user_004.png +0 -0
- package/lib/assets/ImageLibrary/user_005.png +0 -0
- package/lib/assets/ImageLibrary/user_006.png +0 -0
- package/lib/assets/ImageLibrary/user_007.png +0 -0
- package/lib/assets/ImageLibrary/user_008.png +0 -0
- package/lib/assets/ImageLibrary/user_009.png +0 -0
- package/lib/assets/ImageLibrary/user_010.png +0 -0
- package/lib/assets/ImageLibrary/user_011.png +0 -0
- package/lib/assets/ImageLibrary/user_012.png +0 -0
- package/lib/assets/ImageLibrary/user_013.png +0 -0
- package/lib/assets/ImageLibrary/user_014.png +0 -0
- package/lib/assets/ImageLibrary/user_015.png +0 -0
- package/lib/assets/ImageLibrary/user_016.png +0 -0
- package/lib/assets/ImageLibrary/user_017.png +0 -0
- package/lib/assets/ImageLibrary/user_018.png +0 -0
- package/lib/assets/ImageLibrary/user_019.png +0 -0
- package/lib/assets/ImageLibrary/user_020.png +0 -0
- package/lib/assets/ImageLibrary/user_021.png +0 -0
- package/lib/assets/ImageLibrary/user_022.png +0 -0
- package/lib/assets/ImageLibrary/user_023.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_001.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_002.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_003.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_004.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_005.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_006.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_007.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_008.png +0 -0
- package/lib/assets/Toppy-generico.png +0 -0
- package/lib/assets/france.svg +1 -0
- package/lib/assets/german.svg +1 -0
- package/lib/assets/icomoon.eot +0 -0
- package/lib/assets/icomoon.svg +97 -0
- package/lib/assets/icomoon.ttf +0 -0
- package/lib/assets/icomoon.woff +0 -0
- package/lib/assets/italy.svg +16 -0
- package/lib/assets/loading.png +0 -0
- package/lib/assets/login-bg.png +0 -0
- package/lib/assets/multipleSelectionManager.jpg +0 -0
- package/lib/assets/portugal.svg +1 -0
- package/lib/assets/six.png +0 -0
- package/lib/assets/six.svg +4 -0
- package/lib/assets/spain.svg +1 -0
- package/lib/assets/thumbnails/dicom.png +0 -0
- package/lib/assets/thumbnails/doc.png +0 -0
- package/lib/assets/thumbnails/docx.png +0 -0
- package/lib/assets/thumbnails/dwg.png +0 -0
- package/lib/assets/thumbnails/email.png +0 -0
- package/lib/assets/thumbnails/exe.png +0 -0
- package/lib/assets/thumbnails/folder.png +0 -0
- package/lib/assets/thumbnails/html.png +0 -0
- package/lib/assets/thumbnails/image.png +0 -0
- package/lib/assets/thumbnails/index.d.ts +19 -0
- package/lib/assets/thumbnails/index.js +19 -0
- package/lib/assets/thumbnails/index.ts +39 -0
- package/lib/assets/thumbnails/mp4.png +0 -0
- package/lib/assets/thumbnails/other.png +0 -0
- package/lib/assets/thumbnails/p7m.png +0 -0
- package/lib/assets/thumbnails/pdf.png +0 -0
- package/lib/assets/thumbnails/ppt.png +0 -0
- package/lib/assets/thumbnails/slddrw.png +0 -0
- package/lib/assets/thumbnails/txt.png +0 -0
- package/lib/assets/thumbnails/xls.png +0 -0
- package/lib/assets/thumbnails/xml.png +0 -0
- package/lib/assets/thumbnails/zip.png +0 -0
- package/lib/assets/topmedia-six.svg +66 -0
- package/lib/assets/topmeida-six-bianco.svg +66 -0
- package/lib/assets/united-kingdom.svg +1 -0
- package/lib/components/base/Styled.d.ts +63 -0
- package/lib/components/base/Styled.js +337 -0
- package/lib/components/base/TMAccordion.d.ts +12 -0
- package/lib/components/base/TMAccordion.js +62 -0
- package/lib/components/base/TMAlert.d.ts +73 -0
- package/lib/components/base/TMAlert.js +77 -0
- package/lib/components/base/TMAreaManager.d.ts +25 -0
- package/lib/components/base/TMAreaManager.js +733 -0
- package/lib/components/base/TMButton.d.ts +21 -0
- package/lib/components/base/TMButton.js +174 -0
- package/lib/components/base/TMClosableList.d.ts +10 -0
- package/lib/components/base/TMClosableList.js +70 -0
- package/lib/components/base/TMConfirm.d.ts +13 -0
- package/lib/components/base/TMConfirm.js +119 -0
- package/lib/components/base/TMContextMenu.d.ts +25 -0
- package/lib/components/base/TMContextMenu.js +109 -0
- package/lib/components/base/TMContextMenuOLD.d.ts +26 -0
- package/lib/components/base/TMContextMenuOLD.js +56 -0
- package/lib/components/base/TMCounterBar.d.ts +10 -0
- package/lib/components/base/TMCounterBar.js +43 -0
- package/lib/components/base/TMCounterContainer.d.ts +23 -0
- package/lib/components/base/TMCounterContainer.js +58 -0
- package/lib/components/base/TMCustomButton.d.ts +11 -0
- package/lib/components/base/TMCustomButton.js +116 -0
- package/lib/components/base/TMDataGrid.d.ts +56 -0
- package/lib/components/base/TMDataGrid.js +237 -0
- package/lib/components/base/TMDataGridExportForm.d.ts +15 -0
- package/lib/components/base/TMDataGridExportForm.js +215 -0
- package/lib/components/base/TMDeviceProvider.d.ts +15 -0
- package/lib/components/base/TMDeviceProvider.js +41 -0
- package/lib/components/base/TMDropDownMenu.d.ts +23 -0
- package/lib/components/base/TMDropDownMenu.js +45 -0
- package/lib/components/base/TMEditorBase.d.ts +39 -0
- package/lib/components/base/TMEditorBase.js +1 -0
- package/lib/components/base/TMFileManager.d.ts +45 -0
- package/lib/components/base/TMFileManager.js +233 -0
- package/lib/components/base/TMFileManagerDataGridView.d.ts +16 -0
- package/lib/components/base/TMFileManagerDataGridView.js +101 -0
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +18 -0
- package/lib/components/base/TMFileManagerThumbnailItems.js +148 -0
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +19 -0
- package/lib/components/base/TMFileManagerThumbnailsView.js +46 -0
- package/lib/components/base/TMFileManagerUtils.d.ts +78 -0
- package/lib/components/base/TMFileManagerUtils.js +207 -0
- package/lib/components/base/TMFloatingToolbar.d.ts +9 -0
- package/lib/components/base/TMFloatingToolbar.js +101 -0
- package/lib/components/base/TMLayout.d.ts +55 -0
- package/lib/components/base/TMLayout.js +201 -0
- package/lib/components/base/TMList.d.ts +9 -0
- package/lib/components/base/TMList.js +54 -0
- package/lib/components/base/TMListView.d.ts +42 -0
- package/lib/components/base/TMListView.js +387 -0
- package/lib/components/base/TMModal.d.ts +16 -0
- package/lib/components/base/TMModal.js +70 -0
- package/lib/components/base/TMPanel.d.ts +32 -0
- package/lib/components/base/TMPanel.js +181 -0
- package/lib/components/base/TMPopUp.d.ts +33 -0
- package/lib/components/base/TMPopUp.js +267 -0
- package/lib/components/base/TMProgressBar.d.ts +11 -0
- package/lib/components/base/TMProgressBar.js +32 -0
- package/lib/components/base/TMResizableMenu.d.ts +20 -0
- package/lib/components/base/TMResizableMenu.js +98 -0
- package/lib/components/base/TMRightSidebar.d.ts +19 -0
- package/lib/components/base/TMRightSidebar.js +80 -0
- package/lib/components/base/TMShowAllOrMaxItemsButton.d.ts +8 -0
- package/lib/components/base/TMShowAllOrMaxItemsButton.js +20 -0
- package/lib/components/base/TMSpinner.d.ts +14 -0
- package/lib/components/base/TMSpinner.js +160 -0
- package/lib/components/base/TMTab.d.ts +20 -0
- package/lib/components/base/TMTab.js +42 -0
- package/lib/components/base/TMToggleButton.d.ts +10 -0
- package/lib/components/base/TMToggleButton.js +58 -0
- package/lib/components/base/TMToolbarCard.d.ts +19 -0
- package/lib/components/base/TMToolbarCard.js +51 -0
- package/lib/components/base/TMTooltip.d.ts +14 -0
- package/lib/components/base/TMTooltip.js +20 -0
- package/lib/components/base/TMTreeView.d.ts +32 -0
- package/lib/components/base/TMTreeView.js +356 -0
- package/lib/components/base/TMUserAvatar.d.ts +8 -0
- package/lib/components/base/TMUserAvatar.js +34 -0
- package/lib/components/base/TMVilViewer.d.ts +5 -0
- package/lib/components/base/TMVilViewer.js +22 -0
- package/lib/components/base/TMWaitPanel.d.ts +32 -0
- package/lib/components/base/TMWaitPanel.js +44 -0
- package/lib/components/choosers/TMCultureIDPicker.d.ts +9 -0
- package/lib/components/choosers/TMCultureIDPicker.js +72 -0
- package/lib/components/choosers/TMDataListItemChooser.d.ts +17 -0
- package/lib/components/choosers/TMDataListItemChooser.js +49 -0
- package/lib/components/choosers/TMDataListItemPicker.d.ts +9 -0
- package/lib/components/choosers/TMDataListItemPicker.js +96 -0
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +25 -0
- package/lib/components/choosers/TMDcmtTypeChooser.js +61 -0
- package/lib/components/choosers/TMDiskChooser.d.ts +10 -0
- package/lib/components/choosers/TMDiskChooser.js +41 -0
- package/lib/components/choosers/TMDistinctValues.d.ts +21 -0
- package/lib/components/choosers/TMDistinctValues.js +140 -0
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +40 -0
- package/lib/components/choosers/TMDynDataListItemChooser.js +159 -0
- package/lib/components/choosers/TMGroupChooser.d.ts +7 -0
- package/lib/components/choosers/TMGroupChooser.js +37 -0
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +4 -0
- package/lib/components/choosers/TMInvoiceRetrieveFormats.js +22 -0
- package/lib/components/choosers/TMMetadataChooser.d.ts +54 -0
- package/lib/components/choosers/TMMetadataChooser.js +142 -0
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +4 -0
- package/lib/components/choosers/TMOrderRetrieveFormats.js +22 -0
- package/lib/components/choosers/TMPathChooser.d.ts +12 -0
- package/lib/components/choosers/TMPathChooser.js +147 -0
- package/lib/components/choosers/TMRelationChooser.d.ts +31 -0
- package/lib/components/choosers/TMRelationChooser.js +94 -0
- package/lib/components/choosers/TMUserChooser.d.ts +40 -0
- package/lib/components/choosers/TMUserChooser.js +141 -0
- package/lib/components/editors/TMCheckBox.d.ts +9 -0
- package/lib/components/editors/TMCheckBox.js +90 -0
- package/lib/components/editors/TMDateBox.d.ts +17 -0
- package/lib/components/editors/TMDateBox.js +75 -0
- package/lib/components/editors/TMDropDown.d.ts +10 -0
- package/lib/components/editors/TMDropDown.js +62 -0
- package/lib/components/editors/TMEditorStyled.d.ts +41 -0
- package/lib/components/editors/TMEditorStyled.js +90 -0
- package/lib/components/editors/TMFormulaEditor.d.ts +49 -0
- package/lib/components/editors/TMFormulaEditor.js +727 -0
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +7 -0
- package/lib/components/editors/TMHtmlContentDisplay.js +78 -0
- package/lib/components/editors/TMHtmlEditor.d.ts +38 -0
- package/lib/components/editors/TMHtmlEditor.js +203 -0
- package/lib/components/editors/TMLocalizedTextBox.d.ts +19 -0
- package/lib/components/editors/TMLocalizedTextBox.js +125 -0
- package/lib/components/editors/TMMetadataEditor.d.ts +29 -0
- package/lib/components/editors/TMMetadataEditor.js +140 -0
- package/lib/components/editors/TMMetadataValues.d.ts +46 -0
- package/lib/components/editors/TMMetadataValues.js +530 -0
- package/lib/components/editors/TMRadioButton.d.ts +10 -0
- package/lib/components/editors/TMRadioButton.js +57 -0
- package/lib/components/editors/TMSummary.d.ts +20 -0
- package/lib/components/editors/TMSummary.js +92 -0
- package/lib/components/editors/TMTextArea.d.ts +17 -0
- package/lib/components/editors/TMTextArea.js +155 -0
- package/lib/components/editors/TMTextBox.d.ts +20 -0
- package/lib/components/editors/TMTextBox.js +249 -0
- package/lib/components/editors/TMTextExpression.d.ts +25 -0
- package/lib/components/editors/TMTextExpression.js +174 -0
- package/lib/components/editors/TMTreeDropDown.d.ts +18 -0
- package/lib/components/editors/TMTreeDropDown.js +66 -0
- package/lib/components/features/archive/TMArchive.d.ts +29 -0
- package/lib/components/features/archive/TMArchive.js +193 -0
- package/lib/components/features/assistant/ToppyHelpCenter.d.ts +12 -0
- package/lib/components/features/assistant/ToppyHelpCenter.js +173 -0
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +17 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +333 -0
- package/lib/components/features/documents/TMBatchUpdateForm.d.ts +17 -0
- package/lib/components/features/documents/TMBatchUpdateForm.js +159 -0
- package/lib/components/features/documents/TMDcmtBlog.d.ts +23 -0
- package/lib/components/features/documents/TMDcmtBlog.js +65 -0
- package/lib/components/features/documents/TMDcmtForm.d.ts +64 -0
- package/lib/components/features/documents/TMDcmtForm.js +1245 -0
- package/lib/components/features/documents/TMDcmtIcon.d.ts +18 -0
- package/lib/components/features/documents/TMDcmtIcon.js +93 -0
- package/lib/components/features/documents/TMDcmtPreview.d.ts +31 -0
- package/lib/components/features/documents/TMDcmtPreview.js +446 -0
- package/lib/components/features/documents/TMDcmtTasks.d.ts +13 -0
- package/lib/components/features/documents/TMDcmtTasks.js +24 -0
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +6 -0
- package/lib/components/features/documents/TMDragDropOverlay.js +97 -0
- package/lib/components/features/documents/TMFileUploader.d.ts +14 -0
- package/lib/components/features/documents/TMFileUploader.js +115 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +26 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +288 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +121 -0
- package/lib/components/features/documents/TMRelationViewer.js +753 -0
- package/lib/components/features/search/TMSavedQueryForm.d.ts +9 -0
- package/lib/components/features/search/TMSavedQueryForm.js +41 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +16 -0
- package/lib/components/features/search/TMSavedQuerySelector.js +226 -0
- package/lib/components/features/search/TMSearch.d.ts +40 -0
- package/lib/components/features/search/TMSearch.js +253 -0
- package/lib/components/features/search/TMSearchQueryEditor.d.ts +15 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +367 -0
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +29 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +438 -0
- package/lib/components/features/search/TMSearchResult.d.ts +53 -0
- package/lib/components/features/search/TMSearchResult.js +1092 -0
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +16 -0
- package/lib/components/features/search/TMSearchResultFloatingActionButton.js +50 -0
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +11 -0
- package/lib/components/features/search/TMSearchResultsMenuItems.js +725 -0
- package/lib/components/features/search/TMTreeSelector.d.ts +12 -0
- package/lib/components/features/search/TMTreeSelector.js +270 -0
- package/lib/components/features/tasks/TMTaskForm.d.ts +38 -0
- package/lib/components/features/tasks/TMTaskForm.js +387 -0
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +17 -0
- package/lib/components/features/tasks/TMTasksAgenda.js +107 -0
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +21 -0
- package/lib/components/features/tasks/TMTasksCalendar.js +240 -0
- package/lib/components/features/tasks/TMTasksHeader.d.ts +14 -0
- package/lib/components/features/tasks/TMTasksHeader.js +37 -0
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +20 -0
- package/lib/components/features/tasks/TMTasksPanelContent.js +65 -0
- package/lib/components/features/tasks/TMTasksUtils.d.ts +132 -0
- package/lib/components/features/tasks/TMTasksUtils.js +634 -0
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +39 -0
- package/lib/components/features/tasks/TMTasksUtilsView.js +140 -0
- package/lib/components/features/tasks/TMTasksView.d.ts +40 -0
- package/lib/components/features/tasks/TMTasksView.js +560 -0
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +39 -0
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +439 -0
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +42 -0
- package/lib/components/features/workflow/TMWorkflowPopup.js +286 -0
- package/lib/components/features/workflow/diagram/ConnectionComponent.d.ts +14 -0
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +90 -0
- package/lib/components/features/workflow/diagram/ConnectionForm.d.ts +9 -0
- package/lib/components/features/workflow/diagram/ConnectionForm.js +73 -0
- package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +18 -0
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +264 -0
- package/lib/components/features/workflow/diagram/DiagramItemForm.d.ts +10 -0
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +686 -0
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.d.ts +12 -0
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +97 -0
- package/lib/components/features/workflow/diagram/RecipientList.d.ts +27 -0
- package/lib/components/features/workflow/diagram/RecipientList.js +204 -0
- package/lib/components/features/workflow/diagram/WFDiagram.d.ts +9 -0
- package/lib/components/features/workflow/diagram/WFDiagram.js +1680 -0
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +18 -0
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +97 -0
- package/lib/components/features/workflow/diagram/interfaces.d.ts +126 -0
- package/lib/components/features/workflow/diagram/interfaces.js +26 -0
- package/lib/components/features/workflow/diagram/metadataParser.d.ts +14 -0
- package/lib/components/features/workflow/diagram/metadataParser.js +54 -0
- package/lib/components/features/workflow/diagram/queryDescriptorParser.d.ts +3 -0
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +188 -0
- package/lib/components/features/workflow/diagram/workflowHelpers.d.ts +122 -0
- package/lib/components/features/workflow/diagram/workflowHelpers.js +488 -0
- package/lib/components/features/workflow/diagram/xmlParser.d.ts +10 -0
- package/lib/components/features/workflow/diagram/xmlParser.js +490 -0
- package/lib/components/filesystem/ProgressBar.d.ts +7 -0
- package/lib/components/filesystem/ProgressBar.js +25 -0
- package/lib/components/forms/Login/ChangePassword.d.ts +9 -0
- package/lib/components/forms/Login/ChangePassword.js +22 -0
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +14 -0
- package/lib/components/forms/Login/ChangePasswordInputs.js +80 -0
- package/lib/components/forms/Login/Chooser.d.ts +28 -0
- package/lib/components/forms/Login/Chooser.js +145 -0
- package/lib/components/forms/Login/LOGINLocalizator.d.ts +29 -0
- package/lib/components/forms/Login/LOGINLocalizator.js +247 -0
- package/lib/components/forms/Login/LoginValidatorService.d.ts +50 -0
- package/lib/components/forms/Login/LoginValidatorService.js +162 -0
- package/lib/components/forms/Login/Menu.d.ts +10 -0
- package/lib/components/forms/Login/Menu.js +48 -0
- package/lib/components/forms/Login/OTPReader.d.ts +14 -0
- package/lib/components/forms/Login/OTPReader.js +90 -0
- package/lib/components/forms/Login/PasswordStrengthChecker.d.ts +7 -0
- package/lib/components/forms/Login/PasswordStrengthChecker.js +45 -0
- package/lib/components/forms/Login/RapidAccessLogin.d.ts +25 -0
- package/lib/components/forms/Login/RapidAccessLogin.js +310 -0
- package/lib/components/forms/Login/RecoverPasswordFlow.d.ts +11 -0
- package/lib/components/forms/Login/RecoverPasswordFlow.js +111 -0
- package/lib/components/forms/Login/SelectBox.d.ts +23 -0
- package/lib/components/forms/Login/SelectBox.js +96 -0
- package/lib/components/forms/Login/StepIndicator.d.ts +7 -0
- package/lib/components/forms/Login/StepIndicator.js +19 -0
- package/lib/components/forms/Login/TMLoginForm.d.ts +44 -0
- package/lib/components/forms/Login/TMLoginForm.js +737 -0
- package/lib/components/forms/Login/TextBox.d.ts +27 -0
- package/lib/components/forms/Login/TextBox.js +111 -0
- package/lib/components/forms/TMApplyForm.d.ts +4 -0
- package/lib/components/forms/TMApplyForm.js +105 -0
- package/lib/components/forms/TMChooserForm.d.ts +3 -0
- package/lib/components/forms/TMChooserForm.js +94 -0
- package/lib/components/forms/TMResultDialog.d.ts +20 -0
- package/lib/components/forms/TMResultDialog.js +44 -0
- package/lib/components/forms/TMSaveForm.d.ts +31 -0
- package/lib/components/forms/TMSaveForm.js +176 -0
- package/lib/components/grids/TMBlogAttachments.d.ts +42 -0
- package/lib/components/grids/TMBlogAttachments.js +43 -0
- package/lib/components/grids/TMBlogHeader.d.ts +31 -0
- package/lib/components/grids/TMBlogHeader.js +41 -0
- package/lib/components/grids/TMBlogsPost.d.ts +87 -0
- package/lib/components/grids/TMBlogsPost.js +644 -0
- package/lib/components/grids/TMBlogsPostUtils.d.ts +113 -0
- package/lib/components/grids/TMBlogsPostUtils.js +250 -0
- package/lib/components/grids/TMRecentsManager.d.ts +13 -0
- package/lib/components/grids/TMRecentsManager.js +155 -0
- package/lib/components/grids/TMValidationItemsList.d.ts +6 -0
- package/lib/components/grids/TMValidationItemsList.js +82 -0
- package/lib/components/index.d.ts +115 -0
- package/lib/components/index.js +137 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +10 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +215 -0
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +39 -0
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +257 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +11 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +83 -0
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +21 -0
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +64 -0
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +8 -0
- package/lib/components/layout/panelManager/TMPanelWrapper.js +59 -0
- package/lib/components/layout/panelManager/types.d.ts +42 -0
- package/lib/components/layout/panelManager/types.js +1 -0
- package/lib/components/layout/panelManager/utils.d.ts +21 -0
- package/lib/components/layout/panelManager/utils.js +208 -0
- package/lib/components/pages/TMPage.d.ts +38 -0
- package/lib/components/pages/TMPage.js +220 -0
- package/lib/components/query/TMQueryEditor.d.ts +58 -0
- package/lib/components/query/TMQueryEditor.js +1001 -0
- package/lib/components/query/TMQuerySummary.d.ts +16 -0
- package/lib/components/query/TMQuerySummary.js +35 -0
- package/lib/components/settings/SettingsAppearance.d.ts +14 -0
- package/lib/components/settings/SettingsAppearance.js +73 -0
- package/lib/components/sidebar/TMAboutApp.d.ts +8 -0
- package/lib/components/sidebar/TMAboutApp.js +14 -0
- package/lib/components/sidebar/TMCommandsPanel.d.ts +16 -0
- package/lib/components/sidebar/TMCommandsPanel.js +27 -0
- package/lib/components/sidebar/TMHeader.d.ts +43 -0
- package/lib/components/sidebar/TMHeader.js +616 -0
- package/lib/components/sidebar/TMSidebar.d.ts +21 -0
- package/lib/components/sidebar/TMSidebar.js +61 -0
- package/lib/components/sidebar/TMSidebarItem.d.ts +15 -0
- package/lib/components/sidebar/TMSidebarItem.js +39 -0
- package/lib/components/viewers/TMDataListItemViewer.d.ts +10 -0
- package/lib/components/viewers/TMDataListItemViewer.js +80 -0
- package/lib/components/viewers/TMMidViewer.d.ts +36 -0
- package/lib/components/viewers/TMMidViewer.js +128 -0
- package/lib/components/viewers/TMTidViewer.d.ts +256 -0
- package/lib/components/viewers/TMTidViewer.js +343 -0
- package/lib/components/wizard/TMStepIndicator.d.ts +11 -0
- package/lib/components/wizard/TMStepIndicator.js +165 -0
- package/lib/components/wizard/TMWizard.d.ts +18 -0
- package/lib/components/wizard/TMWizard.js +93 -0
- package/lib/css/tm-sdkui.css +1 -0
- package/lib/helper/DeepCompareHelper.d.ts +7 -0
- package/lib/helper/DeepCompareHelper.js +106 -0
- package/lib/helper/Enum_Localizator.d.ts +18 -0
- package/lib/helper/Enum_Localizator.js +247 -0
- package/lib/helper/GlobalStyles.d.ts +2 -0
- package/lib/helper/GlobalStyles.js +10 -0
- package/lib/helper/Globalization.d.ts +15 -0
- package/lib/helper/Globalization.js +110 -0
- package/lib/helper/SDKUI_Globals.d.ts +96 -0
- package/lib/helper/SDKUI_Globals.js +174 -0
- package/lib/helper/SDKUI_Localizator.d.ts +738 -0
- package/lib/helper/SDKUI_Localizator.js +7288 -0
- package/lib/helper/TMCommandsContextMenu.d.ts +14 -0
- package/lib/helper/TMCommandsContextMenu.js +6 -0
- package/lib/helper/TMConditionalWrapper.d.ts +8 -0
- package/lib/helper/TMConditionalWrapper.js +4 -0
- package/lib/helper/TMCustomSearchBar.d.ts +8 -0
- package/lib/helper/TMCustomSearchBar.js +54 -0
- package/lib/helper/TMIcons.d.ts +274 -0
- package/lib/helper/TMIcons.js +673 -0
- package/lib/helper/TMImageLibrary.d.ts +4 -0
- package/lib/helper/TMImageLibrary.js +466 -0
- package/lib/helper/TMToppyMessage.d.ts +7 -0
- package/lib/helper/TMToppyMessage.js +42 -0
- package/lib/helper/TMUtils.d.ts +26 -0
- package/lib/helper/TMUtils.js +212 -0
- package/lib/helper/dcmtsHelper.d.ts +8 -0
- package/lib/helper/dcmtsHelper.js +49 -0
- package/lib/helper/helpers.d.ts +84 -0
- package/lib/helper/helpers.js +826 -0
- package/lib/helper/index.d.ts +13 -0
- package/lib/helper/index.js +13 -0
- package/lib/helper/queryHelper.d.ts +19 -0
- package/lib/helper/queryHelper.js +336 -0
- package/lib/hooks/useDcmtOperations.d.ts +24 -0
- package/lib/hooks/useDcmtOperations.js +482 -0
- package/lib/hooks/useForm.d.ts +24 -0
- package/lib/hooks/useForm.js +157 -0
- package/lib/hooks/useInputDialog.d.ts +9 -0
- package/lib/hooks/useInputDialog.js +105 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useOutsideClick.js +38 -0
- package/lib/hooks/usePreventFileDrop.d.ts +3 -0
- package/lib/hooks/usePreventFileDrop.js +37 -0
- package/lib/hooks/useQueryParametersDialog.d.ts +2 -0
- package/lib/hooks/useQueryParametersDialog.js +71 -0
- package/lib/hooks/useRelatedDocuments.d.ts +72 -0
- package/lib/hooks/useRelatedDocuments.js +655 -0
- package/lib/hooks/useResizeObserver.d.ts +4 -0
- package/lib/hooks/useResizeObserver.js +22 -0
- package/lib/hooks/useWorkflowApprove.d.ts +11 -0
- package/lib/hooks/useWorkflowApprove.js +57 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +15 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +1 -0
- package/lib/services/platform_services.d.ts +18 -0
- package/lib/services/platform_services.js +492 -0
- package/lib/ts/index.d.ts +1 -0
- package/lib/ts/index.js +1 -0
- package/lib/ts/types.d.ts +310 -0
- package/lib/ts/types.js +100 -0
- package/lib/utils/theme.d.ts +69 -0
- package/lib/utils/theme.js +81 -0
- package/package.json +54 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { extractTextsFromDirectory, findFileItems, setFolderTreeViewItems } from "./TMFileManagerUtils";
|
|
4
|
+
import { DeviceType, useDeviceType } from "./TMDeviceProvider";
|
|
5
|
+
import { formatBytes, Globalization, IconDashboard, IconFolder, IconHide, IconList, IconMenuVertical, IconRefresh, IconShow, SDKUI_Globals, SDKUI_Localizator, svgToString, TMCommandsContextMenu, TMConditionalWrapper } from "../../helper";
|
|
6
|
+
import TMTooltip from "./TMTooltip";
|
|
7
|
+
import { TMColors } from "../../utils/theme";
|
|
8
|
+
import TMPanel from "./TMPanel";
|
|
9
|
+
import { TMSplitterLayout } from "./TMLayout";
|
|
10
|
+
import { ContextMenu, TreeView } from "devextreme-react";
|
|
11
|
+
import Toolbar, { Item as ToolbarItem } from 'devextreme-react/toolbar';
|
|
12
|
+
import TMButton from "./TMButton";
|
|
13
|
+
import { TMSearchBar } from "../sidebar/TMHeader";
|
|
14
|
+
import TMFileManagerThumbnailsView from "./TMFileManagerThumbnailsView";
|
|
15
|
+
import TMFileManagerDataGridView from "./TMFileManagerDataGridView";
|
|
16
|
+
import { UserListCacheService } from "@topconsultnpm/sdk-ts";
|
|
17
|
+
const TMFileManager = (props) => {
|
|
18
|
+
// Destructure props
|
|
19
|
+
const {
|
|
20
|
+
// Required props
|
|
21
|
+
focusedFile = undefined, handleFocusedFile, selectedFiles = [], handleSelectedFiles, selectedFolder, handleFocusedFolder, refreshCallback, treeFs, folderContextMenuItems, fileContextMenuItems,
|
|
22
|
+
// Optional props
|
|
23
|
+
handleSelectedFolder, onDoubleClickHandler, userID, viewMode: initialViewMode, handleDropFileCallback, dcmtsFound = 0, showPanel = false, onClosePanel, allowMaximize = true, onMaximizePanel, } = props;
|
|
24
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
25
|
+
const deviceType = useDeviceType();
|
|
26
|
+
// This avoids unnecessary re-renders by only recalculating when deviceType changes.
|
|
27
|
+
let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
|
|
28
|
+
// State to manage the current view mode ('thumbnails' or 'details')
|
|
29
|
+
const [viewMode, setViewMode] = useState(initialViewMode ?? 'details');
|
|
30
|
+
// State to store transformed directory data for file manager
|
|
31
|
+
const [treeViewData, setTreeViewData] = useState([]);
|
|
32
|
+
// State to store the anchor element for the tree view context men
|
|
33
|
+
const [treeViewAnchor, setTreeViewAnchor] = useState(null);
|
|
34
|
+
// State to store the filtered file items after search or filtering
|
|
35
|
+
const [filteredFileItems, setFilteredFileItems] = useState([]);
|
|
36
|
+
// State to store the anchor element for draft thumbnails view
|
|
37
|
+
const [draftThumbViewAnchor, setDraftThumbViewAnchor] = useState(null);
|
|
38
|
+
// State to store the search text entered by the user
|
|
39
|
+
const [searchText, setSearchText] = useState('');
|
|
40
|
+
// State to control the collapse/expand of the left panel
|
|
41
|
+
const [isLeftPanelCollapsed, setIsLeftPanelCollapsed] = useState(false);
|
|
42
|
+
// State to control the visibility of the draft list (for mobile)
|
|
43
|
+
const [openDraftList, setOpenDraftList] = useState(false);
|
|
44
|
+
// State to store the files that are dropped into the file manager
|
|
45
|
+
const [droppedFiles, setDroppedFiles] = useState([]);
|
|
46
|
+
// State to track whether a file drag operation is in progress
|
|
47
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
48
|
+
const [allUsers, setAllUsers] = useState([]);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
const fetchAllUsers = async () => {
|
|
51
|
+
const users = await UserListCacheService.GetAllAsync();
|
|
52
|
+
setAllUsers(users ?? []);
|
|
53
|
+
};
|
|
54
|
+
fetchAllUsers();
|
|
55
|
+
}, []);
|
|
56
|
+
// useEffect runs whenever `treeFs` changes
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
// Initialize an empty array to hold tree view directory data
|
|
59
|
+
let treeViewDataDirectory = [];
|
|
60
|
+
// Push the root directory data and items into the array
|
|
61
|
+
treeViewDataDirectory.push({ id: -1, text: treeFs.name, subFileFolderCount: treeFs.items.filter(item => !item.isDirectory).length, expanded: true, items: setFolderTreeViewItems(treeFs.items) });
|
|
62
|
+
// Update the state with the constructed tree view data
|
|
63
|
+
setTreeViewData(treeViewDataDirectory);
|
|
64
|
+
}, [treeFs]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
const extractedTexts = extractTextsFromDirectory(treeViewData);
|
|
67
|
+
// Reset the selected file item if its name is not found in the extracted texts.
|
|
68
|
+
if (selectedFolder)
|
|
69
|
+
if (!extractedTexts.includes(selectedFolder.name)) {
|
|
70
|
+
handleSelectedFolder?.(undefined);
|
|
71
|
+
setIsLeftPanelCollapsed(false);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// update selectedFolder
|
|
75
|
+
const item = selectedFolder.id === treeFs.id ? treeFs : findFileItems(treeFs.items, selectedFolder.id);
|
|
76
|
+
handleSelectedFolder?.(item);
|
|
77
|
+
}
|
|
78
|
+
}, [treeViewData]);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
// Filter items whenever searchText or selectedFolder changes
|
|
81
|
+
const filterItems = () => {
|
|
82
|
+
const folderItems = selectedFolder?.items ?? [];
|
|
83
|
+
const filtered = folderItems.filter(item => !item.isDirectory &&
|
|
84
|
+
(
|
|
85
|
+
/* (item.id?.toString()?.includes(searchText.toLowerCase().trim())) || */
|
|
86
|
+
(item.name?.toLowerCase()?.includes(searchText.toLowerCase().trim())) ||
|
|
87
|
+
(item.description?.toLowerCase()?.includes(searchText.toLowerCase().trim())) ||
|
|
88
|
+
(item.ext?.toString().toLowerCase().includes(searchText.toLowerCase().trim())) ||
|
|
89
|
+
(formatBytes(item.size)?.toLowerCase().toString().includes(searchText.toLowerCase())) ||
|
|
90
|
+
(Globalization.getDateTimeDisplayValue(item.lastUpdateTime)?.toLowerCase().toString().includes(searchText.toLowerCase().trim())) ||
|
|
91
|
+
(Globalization.getDateTimeDisplayValue(item.creationTime)?.toLowerCase().toString().includes(searchText.toLowerCase().trim())) ||
|
|
92
|
+
(item.version?.toString().includes(searchText.toLowerCase().trim()))));
|
|
93
|
+
setFilteredFileItems(filtered);
|
|
94
|
+
};
|
|
95
|
+
filterItems();
|
|
96
|
+
}, [searchText, selectedFolder]);
|
|
97
|
+
// Callback to handle the "back" action (closing the draft list view)
|
|
98
|
+
const onBackCallback = useCallback(() => {
|
|
99
|
+
setOpenDraftList(false);
|
|
100
|
+
}, []);
|
|
101
|
+
const toolbar = useMemo(() => _jsxs(_Fragment, { children: [_jsx(IconMenuVertical, { id: "TMPanel-FileManager-Commands-Header", color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: '#TMPanel-FileManager-Commands-Header', menuItems: [
|
|
102
|
+
{
|
|
103
|
+
icon: isLeftPanelCollapsed ? "eyeclose" : "eyeopen",
|
|
104
|
+
onClick: () => setIsLeftPanelCollapsed(prev => !prev),
|
|
105
|
+
text: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
icon: svgToString(_jsx(IconRefresh, {})),
|
|
109
|
+
onClick: async () => await refreshCallback(),
|
|
110
|
+
text: SDKUI_Localizator.Refresh,
|
|
111
|
+
},
|
|
112
|
+
], showEvent: "click" })] }), [isLeftPanelCollapsed]);
|
|
113
|
+
// Handle closing the context menu
|
|
114
|
+
const closeTreeViewContextMenu = useCallback(() => {
|
|
115
|
+
setTreeViewAnchor(null);
|
|
116
|
+
}, []);
|
|
117
|
+
const handleTreeViewItemClick = useCallback((e) => {
|
|
118
|
+
if (!e)
|
|
119
|
+
return;
|
|
120
|
+
const clickedItemId = e.itemData.id;
|
|
121
|
+
const item = clickedItemId === treeFs.id ? treeFs : findFileItems(treeFs.items, clickedItemId);
|
|
122
|
+
if (isMobile)
|
|
123
|
+
setOpenDraftList(true);
|
|
124
|
+
handleSelectedFolder?.(item);
|
|
125
|
+
handleFocusedFolder?.(undefined);
|
|
126
|
+
handleFocusedFile?.(undefined);
|
|
127
|
+
handleSelectedFiles?.([]);
|
|
128
|
+
}, [treeFs, isMobile]);
|
|
129
|
+
// Render each TreeView item (directories) with custom styling/icons
|
|
130
|
+
const renderTreeViewItem = useCallback((itemData) => {
|
|
131
|
+
const isSelected = selectedFolder && selectedFolder.id === itemData.id;
|
|
132
|
+
const tooltipContent = _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID" }), ": ", itemData.id] });
|
|
133
|
+
const onDragOver = (e) => {
|
|
134
|
+
if (e === undefined)
|
|
135
|
+
return;
|
|
136
|
+
const item = itemData.id === treeFs.id ? treeFs : findFileItems(treeFs.items, itemData.id);
|
|
137
|
+
if (item)
|
|
138
|
+
handleSelectedFolder?.(item);
|
|
139
|
+
handleDragOver(e);
|
|
140
|
+
};
|
|
141
|
+
const onDrop = (e) => {
|
|
142
|
+
if (e === undefined)
|
|
143
|
+
return;
|
|
144
|
+
const item = itemData.id === treeFs.id ? treeFs : findFileItems(treeFs.items, itemData.id);
|
|
145
|
+
if (item)
|
|
146
|
+
handleSelectedFolder?.(item);
|
|
147
|
+
handleDrop(e);
|
|
148
|
+
};
|
|
149
|
+
const onDragLeave = (e) => {
|
|
150
|
+
e.preventDefault();
|
|
151
|
+
handleDragLeave(e);
|
|
152
|
+
};
|
|
153
|
+
return (_jsxs("div", { onDrop: onDrop, onDragOver: onDragOver, onDragLeave: onDragLeave, style: {
|
|
154
|
+
whiteSpace: "nowrap",
|
|
155
|
+
display: "flex",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
opacity: (isSelected || itemData.subFileFolderCount > 0) ? 1 : 0.5
|
|
158
|
+
}, className: isSelected ? 'treeview-selected-item-manager' : '', children: [_jsx(TMTooltip, { content: tooltipContent, children: _jsx(IconFolder, { fontSize: 24, style: { marginRight: 5, color: TMColors.iconLight } }) }), itemData.text, itemData.subFileFolderCount > 0 && ` (${itemData.subFileFolderCount})`] }));
|
|
159
|
+
}, [selectedFolder]);
|
|
160
|
+
const onBackgroundTreeViewContextMenu = useCallback((event) => {
|
|
161
|
+
if (event === undefined)
|
|
162
|
+
return;
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
setTreeViewAnchor(event.currentTarget);
|
|
165
|
+
handleFocusedFolder?.(undefined);
|
|
166
|
+
}, []);
|
|
167
|
+
const onItemTreeViewContextMenu = useCallback((contextMenuEvent) => {
|
|
168
|
+
if (contextMenuEvent === undefined || contextMenuEvent.event === undefined)
|
|
169
|
+
return;
|
|
170
|
+
contextMenuEvent.event.preventDefault();
|
|
171
|
+
const clickedItemId = contextMenuEvent.itemData.id;
|
|
172
|
+
const item = clickedItemId === treeFs.id ? treeFs : findFileItems(treeFs.items, clickedItemId);
|
|
173
|
+
handleFocusedFolder?.(item);
|
|
174
|
+
}, []);
|
|
175
|
+
const toggleViewMode = useCallback(() => {
|
|
176
|
+
handleFocusedFile(undefined);
|
|
177
|
+
setViewMode((prevViewMode) => (prevViewMode === 'details' ? 'thumbnails' : 'details'));
|
|
178
|
+
}, []);
|
|
179
|
+
// Update searchText state
|
|
180
|
+
const handleSearchChange = useCallback((value) => {
|
|
181
|
+
// setFocusedRowKey(undefined);
|
|
182
|
+
handleFocusedFile?.(undefined);
|
|
183
|
+
setSearchText(value);
|
|
184
|
+
}, []);
|
|
185
|
+
// Handle the file drop
|
|
186
|
+
const handleDrop = (e) => {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
const files = Array.from(e.dataTransfer?.files || []);
|
|
189
|
+
setDroppedFiles(files);
|
|
190
|
+
setIsDragging(false);
|
|
191
|
+
if (handleDropFileCallback)
|
|
192
|
+
handleDropFileCallback(files);
|
|
193
|
+
};
|
|
194
|
+
const handleDragOver = (e) => {
|
|
195
|
+
e.preventDefault();
|
|
196
|
+
setIsDragging(true);
|
|
197
|
+
};
|
|
198
|
+
const handleDragLeave = (e) => {
|
|
199
|
+
setIsDragging(false);
|
|
200
|
+
};
|
|
201
|
+
return _jsx(TMPanel, { title: SDKUI_Localizator.Drafts, totalItems: dcmtsFound ?? 0, showHeader: showPanel, onBack: (isMobile && openDraftList) ? onBackCallback : undefined, onClose: onClosePanel, allowMaximize: !isMobile ? allowMaximize : false, onMaximize: !isMobile ? onMaximizePanel : undefined, onHeaderDoubleClick: !isMobile ? onMaximizePanel : undefined, toolbar: toolbar, children: _jsx("div", { style: { flexDirection: "column", height: "100%", width: "100%", }, children: _jsxs(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: "flex", flexGrow: 1, height: "100%" }, children: _jsx(TMSplitterLayout, { direction: 'horizontal', showSeparator: true, separatorColor: 'transparent', separatorActiveColor: 'transparent', min: ['0', '0'], start: [isLeftPanelCollapsed ? '0%' : "32%", isLeftPanelCollapsed ? '100%' : "68%"], children: children }, "TMWGs-panels-treeView") }), children: [_jsxs("div", { style: {
|
|
202
|
+
height: "100%",
|
|
203
|
+
width: "100%",
|
|
204
|
+
...(isMobile && { display: openDraftList ? 'none' : 'block', transition: "opacity 0.3s ease-in-out" }),
|
|
205
|
+
}, onContextMenu: onBackgroundTreeViewContextMenu, children: [_jsx(TreeView, { height: "100%", width: "100%", useNativeScrolling: SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar === 1, dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick, onItemContextMenu: onItemTreeViewContextMenu }), treeViewAnchor && _jsx(ContextMenu, { id: "treeViewContextMenuDesktop", target: treeViewAnchor, dataSource: folderContextMenuItems, onHiding: closeTreeViewContextMenu })] }), _jsxs("div", { style: {
|
|
206
|
+
backgroundColor: "#fff",
|
|
207
|
+
width: "100%",
|
|
208
|
+
height: "100%",
|
|
209
|
+
...(isMobile && { display: openDraftList ? 'block' : 'none', transition: "opacity 0.3s ease-in-out" }),
|
|
210
|
+
}, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.CompactView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '200px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, style: {
|
|
211
|
+
width: "100%",
|
|
212
|
+
height: "calc(100% - 40px)",
|
|
213
|
+
position: "relative",
|
|
214
|
+
overflow: "hidden"
|
|
215
|
+
}, children: [isDragging && _jsx("div", { style: {
|
|
216
|
+
position: "absolute",
|
|
217
|
+
top: 0,
|
|
218
|
+
left: 0,
|
|
219
|
+
width: "100%",
|
|
220
|
+
height: "100%",
|
|
221
|
+
backgroundColor: "rgba(37, 89, 165, 0.8)",
|
|
222
|
+
color: "#fff",
|
|
223
|
+
display: "flex",
|
|
224
|
+
justifyContent: "center",
|
|
225
|
+
alignItems: "center",
|
|
226
|
+
fontSize: "1.2rem",
|
|
227
|
+
zIndex: 10,
|
|
228
|
+
pointerEvents: "none",
|
|
229
|
+
backdropFilter: "blur(3px)",
|
|
230
|
+
textShadow: "0 2px 4px rgba(0,0,0,0.5)"
|
|
231
|
+
}, children: SDKUI_Localizator.DropFileToShare }), viewMode === 'thumbnails' && _jsx(TMFileManagerThumbnailsView, { items: filteredFileItems ?? [], allUsers: allUsers, focusedFile: focusedFile, handleFocusedFile: handleFocusedFile, selectedFiles: selectedFiles, handleSelectedFiles: handleSelectedFiles, fileContextMenuItems: fileContextMenuItems, searchText: searchText, userID: userID, draftThumbViewAnchor: draftThumbViewAnchor, setDraftThumbViewAnchor: setDraftThumbViewAnchor, onDoubleClickHandler: onDoubleClickHandler }), viewMode === 'details' && _jsx(TMFileManagerDataGridView, { items: filteredFileItems ?? [], allUsers: allUsers, focusedFile: focusedFile, handleFocusedFile: handleFocusedFile, selectedFiles: selectedFiles, handleSelectedFiles: handleSelectedFiles, fileContextMenuItems: fileContextMenuItems, searchText: searchText, userID: userID, onDoubleClickHandler: onDoubleClickHandler })] })] })] }) }) });
|
|
232
|
+
};
|
|
233
|
+
export default TMFileManager;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FileItem, TMFileManagerContextMenuItem } from "./TMFileManagerUtils";
|
|
2
|
+
import { UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
interface TMFileManagerDataGridViewProps {
|
|
4
|
+
items: Array<FileItem>;
|
|
5
|
+
allUsers: Array<UserDescriptor>;
|
|
6
|
+
focusedFile: FileItem | undefined;
|
|
7
|
+
handleFocusedFile: (fileItem: FileItem | undefined) => void;
|
|
8
|
+
selectedFiles: Array<FileItem>;
|
|
9
|
+
handleSelectedFiles: (fileItems: Array<FileItem>) => void;
|
|
10
|
+
fileContextMenuItems: Array<TMFileManagerContextMenuItem>;
|
|
11
|
+
searchText: string;
|
|
12
|
+
userID?: number;
|
|
13
|
+
onDoubleClickHandler?: (fileItem: FileItem | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const TMFileManagerDataGridView: (props: TMFileManagerDataGridViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default TMFileManagerDataGridView;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { formatBytes, Globalization, renderHighlightedText, SDKUI_Localizator } from "../../helper";
|
|
4
|
+
import TMDataGrid from "./TMDataGrid";
|
|
5
|
+
import TMDcmtIcon from "../features/documents/TMDcmtIcon";
|
|
6
|
+
import TMTooltip from "./TMTooltip";
|
|
7
|
+
const TMFileManagerDataGridView = (props) => {
|
|
8
|
+
const { items, allUsers, focusedFile, handleFocusedFile, selectedFiles, handleSelectedFiles, fileContextMenuItems, searchText, userID, onDoubleClickHandler } = props;
|
|
9
|
+
// State hook to store the currently focused row key, initially set to undefined
|
|
10
|
+
const [focusedRowKey, setFocusedRowKey] = useState(focusedFile?.id);
|
|
11
|
+
// State to store selected row keys
|
|
12
|
+
const [selectedRowKeys, setSelectedRowKeys] = useState(selectedFiles.map(selectedFile => selectedFile.id));
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setFocusedRowKey(focusedFile ? focusedFile.id : undefined);
|
|
15
|
+
}, [focusedFile]);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setSelectedRowKeys(selectedFiles.map(selectedFile => selectedFile.id));
|
|
18
|
+
}, [selectedFiles]);
|
|
19
|
+
const findCheckOutUserName = useCallback((checkOutUserName, checkOutUserID) => {
|
|
20
|
+
if (checkOutUserName) {
|
|
21
|
+
return checkOutUserName;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
let checkOutUser = allUsers.find(user => user.id === checkOutUserID);
|
|
25
|
+
return checkOutUser ? checkOutUser.name : '-';
|
|
26
|
+
}
|
|
27
|
+
}, [allUsers]);
|
|
28
|
+
// DataGrid Callback
|
|
29
|
+
// Handles focus change in the data grid
|
|
30
|
+
const onFocusedRowChanged = useCallback((e) => {
|
|
31
|
+
setFocusedRowKey(e.row?.key);
|
|
32
|
+
if (handleFocusedFile && e.row)
|
|
33
|
+
handleFocusedFile(e.row.data);
|
|
34
|
+
}, [handleFocusedFile]);
|
|
35
|
+
// Handles selection change in the data grid
|
|
36
|
+
const onSelectionChanged = useCallback((e) => {
|
|
37
|
+
const selectedKeys = e.component.getSelectedRowKeys() ?? [];
|
|
38
|
+
setSelectedRowKeys(selectedKeys);
|
|
39
|
+
if (handleSelectedFiles) {
|
|
40
|
+
const selectedRowsData = e.component.getSelectedRowsData() ?? [];
|
|
41
|
+
handleSelectedFiles(selectedRowsData);
|
|
42
|
+
}
|
|
43
|
+
}, [handleSelectedFiles]);
|
|
44
|
+
// Handler for double-click cell event
|
|
45
|
+
const onCellDblClick = useCallback((e) => {
|
|
46
|
+
if (e.column.dataField === "ext")
|
|
47
|
+
return;
|
|
48
|
+
if (onDoubleClickHandler)
|
|
49
|
+
onDoubleClickHandler(e.data);
|
|
50
|
+
}, [onDoubleClickHandler]);
|
|
51
|
+
const onContextMenuPreparing = (e) => {
|
|
52
|
+
if (e === undefined)
|
|
53
|
+
return;
|
|
54
|
+
if (e.target === 'content') {
|
|
55
|
+
if (handleFocusedFile && e.row)
|
|
56
|
+
handleFocusedFile(e.row.data);
|
|
57
|
+
e.items = e.items || [];
|
|
58
|
+
e.items = fileContextMenuItems ? [...fileContextMenuItems] : [];
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const cellDefaultRender = useCallback((cellData) => {
|
|
62
|
+
const value = cellData.value ?? '';
|
|
63
|
+
return renderHighlightedText(value.toString(), searchText, false);
|
|
64
|
+
}, [searchText]);
|
|
65
|
+
const cellNameRender = useCallback((cellData) => {
|
|
66
|
+
const { checkoutDate, checkOutUserID, checkOutUserName, version, ext, creationTime, lastUpdateTime } = cellData.data;
|
|
67
|
+
const checkoutUsedId = checkOutUserID;
|
|
68
|
+
const editMode = checkoutDate && checkoutUsedId && userID && userID === checkoutUsedId;
|
|
69
|
+
const lockMode = checkoutDate && checkoutUsedId && userID && userID !== checkoutUsedId;
|
|
70
|
+
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(checkOutUserName, checkOutUserID) ?? '-', " (ID: ", checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Type }), ": ", ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(lastUpdateTime?.toString())] })] })] })] });
|
|
71
|
+
return _jsxs("div", { style: { display: "inline-flex", alignItems: "center", gap: "4px" }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: "#28a745", fontWeight: "bold" }, className: "dx-icon-lock" }) }), renderHighlightedText(cellData.value, searchText, false)] });
|
|
72
|
+
}, [searchText]);
|
|
73
|
+
const cellExtRender = useCallback((cellData) => {
|
|
74
|
+
const item = cellData.data;
|
|
75
|
+
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
|
|
76
|
+
return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }) });
|
|
77
|
+
}, []);
|
|
78
|
+
const cellDatetimeRender = useCallback((cellData) => {
|
|
79
|
+
if (!cellData.value)
|
|
80
|
+
return '-';
|
|
81
|
+
return renderHighlightedText(Globalization.getDateTimeDisplayValue(cellData.value).toString(), searchText, false);
|
|
82
|
+
}, [searchText]);
|
|
83
|
+
const cellSizeRender = useCallback((cellData) => {
|
|
84
|
+
const size = formatBytes(cellData.data.size ?? 0);
|
|
85
|
+
return renderHighlightedText(size.toString(), searchText, false);
|
|
86
|
+
}, [searchText]);
|
|
87
|
+
const dataColumns = useMemo(() => {
|
|
88
|
+
return [
|
|
89
|
+
{ dataField: "id", caption: "ID", dataType: 'string', visible: false },
|
|
90
|
+
{ dataField: "ext", caption: "", cellRender: cellExtRender },
|
|
91
|
+
{ dataField: "name", caption: SDKUI_Localizator.Name, cellRender: cellNameRender },
|
|
92
|
+
{ dataField: "version", caption: "V.", cellRender: cellDefaultRender },
|
|
93
|
+
{ dataField: "size", caption: SDKUI_Localizator.Size, cellRender: cellSizeRender },
|
|
94
|
+
{ dataField: "updaterName", caption: SDKUI_Localizator.Author, cellRender: cellDefaultRender },
|
|
95
|
+
{ dataField: "lastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
96
|
+
{ dataField: "creationTime", caption: SDKUI_Localizator.CreationTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
97
|
+
];
|
|
98
|
+
}, [searchText]);
|
|
99
|
+
return _jsx(TMDataGrid, { dataSource: items ?? [], dataColumns: dataColumns, focusedRowKey: focusedRowKey, selectedRowKeys: selectedRowKeys, onFocusedRowChanged: onFocusedRowChanged, onSelectionChanged: onSelectionChanged, onCellDblClick: onCellDblClick, onContextMenuPreparing: onContextMenuPreparing, showSearchPanel: false, noDataText: SDKUI_Localizator.FolderIsEmpty });
|
|
100
|
+
};
|
|
101
|
+
export default TMFileManagerDataGridView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileItem } from './TMFileManagerUtils';
|
|
3
|
+
import { UserDescriptor } from '@topconsultnpm/sdk-ts';
|
|
4
|
+
export interface TMFileManagerThumbnailItemsProps {
|
|
5
|
+
items: Array<FileItem>;
|
|
6
|
+
allUsers: Array<UserDescriptor>;
|
|
7
|
+
paginatedItems: Array<FileItem>;
|
|
8
|
+
focusedFile: FileItem | undefined;
|
|
9
|
+
handleFocusedFile: (fileItem: FileItem | undefined) => void;
|
|
10
|
+
selectedFiles: Array<FileItem>;
|
|
11
|
+
handleSelectedFiles: (fileItems: Array<FileItem>) => void;
|
|
12
|
+
searchText: string;
|
|
13
|
+
setDraftThumbViewAnchor: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
14
|
+
onDoubleClick?: (file: FileItem) => void;
|
|
15
|
+
userID?: number;
|
|
16
|
+
}
|
|
17
|
+
declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default TMFileManagerThumbnailItems;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
3
|
+
import { colors, TMFileItemContainer } from './TMFileManagerUtils';
|
|
4
|
+
import { formatBytes, Globalization, renderHighlightedText, SDKUI_Localizator } from '../../helper';
|
|
5
|
+
import TMTooltip from './TMTooltip';
|
|
6
|
+
import TMDcmtIcon from '../features/documents/TMDcmtIcon';
|
|
7
|
+
const TMFileManagerThumbnailItems = (props) => {
|
|
8
|
+
// Destructuring props for cleaner usage
|
|
9
|
+
const { items, allUsers, paginatedItems, selectedFiles, searchText, userID, onDoubleClick, handleSelectedFiles, handleFocusedFile, setDraftThumbViewAnchor } = props;
|
|
10
|
+
// Ref for the scrollable container
|
|
11
|
+
const containerRef = useRef(null);
|
|
12
|
+
// Stores index of the last selected item for shift selection
|
|
13
|
+
const lastSelectedIndexRef = useRef(null);
|
|
14
|
+
// Ref to handle click vs double click timing
|
|
15
|
+
const clickTimeoutRef = useRef(null);
|
|
16
|
+
// Automatically scrolls selected file into view
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (items.length > 0 && containerRef.current && lastSelectedIndexRef.current !== null) {
|
|
19
|
+
const lastSelected = items[lastSelectedIndexRef.current];
|
|
20
|
+
if (lastSelected && lastSelected.id) {
|
|
21
|
+
const selectedElement = document.getElementById("tm-file-manager-thumbnail-item-" + lastSelected.id.toString());
|
|
22
|
+
if (selectedElement) {
|
|
23
|
+
selectedElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, [items, lastSelectedIndexRef.current]);
|
|
28
|
+
const handleKeyUp = useCallback((event) => {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
if (event.key === 'ArrowUp' && lastSelectedIndexRef.current) {
|
|
31
|
+
const currentIndex = lastSelectedIndexRef.current - 1;
|
|
32
|
+
if (currentIndex > -1 && items[currentIndex]) {
|
|
33
|
+
handleSelectedFiles([items[currentIndex]]);
|
|
34
|
+
lastSelectedIndexRef.current = currentIndex;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, [items, lastSelectedIndexRef.current]);
|
|
38
|
+
const handleKeyDown = useCallback((event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
if (event.key === 'ArrowDown' && lastSelectedIndexRef.current !== null) {
|
|
41
|
+
const currentIndex = lastSelectedIndexRef.current + 1;
|
|
42
|
+
if (currentIndex > -1 && items[currentIndex]) {
|
|
43
|
+
handleSelectedFiles([items[currentIndex]]);
|
|
44
|
+
lastSelectedIndexRef.current = currentIndex;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (event.key === 'Enter' && selectedFiles.length === 1 && onDoubleClick) {
|
|
48
|
+
const currentItem = items.find(item => item.id === selectedFiles[0].id);
|
|
49
|
+
if (currentItem)
|
|
50
|
+
onDoubleClick(currentItem);
|
|
51
|
+
}
|
|
52
|
+
}, [items, lastSelectedIndexRef.current, selectedFiles]);
|
|
53
|
+
// Double click handler with timeout cleanup
|
|
54
|
+
const onDoubleClickHandler = useCallback((item) => {
|
|
55
|
+
if (clickTimeoutRef.current) {
|
|
56
|
+
clearTimeout(clickTimeoutRef.current);
|
|
57
|
+
clickTimeoutRef.current = null;
|
|
58
|
+
}
|
|
59
|
+
if (onDoubleClick && item)
|
|
60
|
+
onDoubleClick(item);
|
|
61
|
+
}, [onDoubleClick]);
|
|
62
|
+
const onClickHandler = useCallback((e, item) => {
|
|
63
|
+
// If a click timeout is already running, clear it (distinguish between single and double clicks)
|
|
64
|
+
if (clickTimeoutRef.current) {
|
|
65
|
+
clearTimeout(clickTimeoutRef.current);
|
|
66
|
+
clickTimeoutRef.current = null;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// Start a timeout to defer selection until we know it's not a double click
|
|
70
|
+
clickTimeoutRef.current = setTimeout(() => {
|
|
71
|
+
const clickedIndex = items.findIndex(f => f.id === item.id);
|
|
72
|
+
if (clickedIndex === -1)
|
|
73
|
+
return;
|
|
74
|
+
// Determine if Ctrl (or Cmd on Mac) or Shift is pressed
|
|
75
|
+
const isCtrlPressed = e.ctrlKey || e.metaKey;
|
|
76
|
+
const isShiftPressed = e.shiftKey;
|
|
77
|
+
// If Shift is pressed and there's a valid last selection, select a range
|
|
78
|
+
if (isShiftPressed && lastSelectedIndexRef.current !== null) {
|
|
79
|
+
const rangeStart = Math.min(lastSelectedIndexRef.current, clickedIndex);
|
|
80
|
+
const rangeEnd = Math.max(lastSelectedIndexRef.current, clickedIndex);
|
|
81
|
+
const selectedFilesRange = items.slice(rangeStart, rangeEnd + 1);
|
|
82
|
+
handleSelectedFiles(selectedFilesRange);
|
|
83
|
+
}
|
|
84
|
+
else if (isCtrlPressed) {
|
|
85
|
+
// If Ctrl/Cmd is pressed, toggle selection of this item
|
|
86
|
+
let newSelectedFiles = [];
|
|
87
|
+
const isAlreadySelected = selectedFiles.some(f => f.id === item.id);
|
|
88
|
+
if (isAlreadySelected) {
|
|
89
|
+
// Deselect if already selected
|
|
90
|
+
newSelectedFiles = selectedFiles.filter(f => f.id !== item.id);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
// Add to selection
|
|
94
|
+
newSelectedFiles = [...selectedFiles, item];
|
|
95
|
+
}
|
|
96
|
+
// Apply new selection
|
|
97
|
+
handleSelectedFiles(newSelectedFiles);
|
|
98
|
+
lastSelectedIndexRef.current = clickedIndex;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// Regular single click selection
|
|
102
|
+
lastSelectedIndexRef.current = clickedIndex;
|
|
103
|
+
handleSelectedFiles([item]);
|
|
104
|
+
}
|
|
105
|
+
clickTimeoutRef.current = null;
|
|
106
|
+
}, 200); // Short delay to allow for double click to interrupt
|
|
107
|
+
}
|
|
108
|
+
}, [selectedFiles, items]);
|
|
109
|
+
// Right-click to open context menu and set focus
|
|
110
|
+
const onContextMenu = useCallback((e, item) => {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
setDraftThumbViewAnchor(e.currentTarget);
|
|
113
|
+
handleFocusedFile(item);
|
|
114
|
+
}, []);
|
|
115
|
+
const findCheckOutUserName = useCallback((item) => {
|
|
116
|
+
if (item.checkOutUserName) {
|
|
117
|
+
return item.checkOutUserName;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
const checkOutUserID = item.checkOutUserID;
|
|
121
|
+
let checkOutUser = allUsers.find(user => user.id === checkOutUserID);
|
|
122
|
+
return checkOutUser ? checkOutUser.name : '-';
|
|
123
|
+
}
|
|
124
|
+
}, [allUsers]);
|
|
125
|
+
return _jsx("div", { style: { width: "100%", height: "100%" }, children: paginatedItems.map(item => {
|
|
126
|
+
const isSelected = selectedFiles?.map(file => file.id).includes(item.id) ?? false;
|
|
127
|
+
const checkoutDate = item.checkoutDate;
|
|
128
|
+
const checkoutUsedId = item.checkOutUserID;
|
|
129
|
+
const editMode = checkoutDate && checkoutUsedId && userID && userID === checkoutUsedId;
|
|
130
|
+
const lockMode = checkoutDate && checkoutUsedId && userID && userID !== checkoutUsedId;
|
|
131
|
+
const textColor = isSelected ? colors.WHITE : colors.BLACK;
|
|
132
|
+
const backgroundColors = { editMode: colors.LIGHT_GREEN, lockMode: colors.LIGHT_YELLOW, };
|
|
133
|
+
let bgColor = isSelected ? colors.PRIMARY_BLUE : colors.LIGHT_GRAY;
|
|
134
|
+
let bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#e0e0e0";
|
|
135
|
+
if (editMode) {
|
|
136
|
+
bgColor = isSelected ? colors.PRIMARY_BLUE : backgroundColors.editMode;
|
|
137
|
+
bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#a5d6a7";
|
|
138
|
+
}
|
|
139
|
+
if (lockMode) {
|
|
140
|
+
bgColor = isSelected ? colors.PRIMARY_BLUE : backgroundColors.lockMode;
|
|
141
|
+
bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#fff59d";
|
|
142
|
+
}
|
|
143
|
+
const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Type }), ": ", item.ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(item.creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime?.toString())] })] })] })] });
|
|
144
|
+
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
|
|
145
|
+
return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0 }, children: [_jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }), editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
|
|
146
|
+
}) });
|
|
147
|
+
};
|
|
148
|
+
export default TMFileManagerThumbnailItems;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FileItem, TMFileManagerContextMenuItem } from "./TMFileManagerUtils";
|
|
3
|
+
import { UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
4
|
+
interface TMFileManagerThumbnailsViewProps {
|
|
5
|
+
items: Array<FileItem>;
|
|
6
|
+
allUsers: Array<UserDescriptor>;
|
|
7
|
+
focusedFile: FileItem | undefined;
|
|
8
|
+
handleFocusedFile: (fileItem: FileItem | undefined) => void;
|
|
9
|
+
selectedFiles: Array<FileItem>;
|
|
10
|
+
handleSelectedFiles: (fileItems: Array<FileItem>) => void;
|
|
11
|
+
fileContextMenuItems: Array<TMFileManagerContextMenuItem>;
|
|
12
|
+
searchText: string;
|
|
13
|
+
userID?: number;
|
|
14
|
+
onDoubleClickHandler?: (fileItem: FileItem | undefined) => void;
|
|
15
|
+
draftThumbViewAnchor: HTMLElement | null;
|
|
16
|
+
setDraftThumbViewAnchor: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
17
|
+
}
|
|
18
|
+
declare const TMFileManagerThumbnailsView: (props: TMFileManagerThumbnailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default TMFileManagerThumbnailsView;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { TMFileManagerPageSize } from "./TMFileManagerUtils";
|
|
4
|
+
import { ContextMenu, Pagination, ScrollView } from "devextreme-react";
|
|
5
|
+
import TMFileManagerThumbnailItems from "./TMFileManagerThumbnailItems";
|
|
6
|
+
import { SDKUI_Localizator } from "../../helper";
|
|
7
|
+
const TMFileManagerThumbnailsView = (props) => {
|
|
8
|
+
const { items, allUsers, focusedFile, handleFocusedFile, selectedFiles = [], handleSelectedFiles, fileContextMenuItems, searchText, userID, onDoubleClickHandler, draftThumbViewAnchor, setDraftThumbViewAnchor } = props;
|
|
9
|
+
const PAGE_SIZES = [TMFileManagerPageSize.Small, TMFileManagerPageSize.Medium, TMFileManagerPageSize.Large];
|
|
10
|
+
const initPageSize = TMFileManagerPageSize.Small;
|
|
11
|
+
const showPagination = (items?.length ?? 0) > initPageSize;
|
|
12
|
+
const [pageSize, setPageSize] = useState(TMFileManagerPageSize.Small);
|
|
13
|
+
const [pageIndex, setPageIndex] = useState(1);
|
|
14
|
+
const [paginatedItems, setPaginatedItems] = useState([]);
|
|
15
|
+
// Update paginated items when pageSize or pageIndex changes
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const startIndex = (pageIndex - 1) * pageSize;
|
|
18
|
+
const endIndex = startIndex + pageSize;
|
|
19
|
+
// Slice the items array based on the current page
|
|
20
|
+
setPaginatedItems(items?.slice(startIndex, endIndex) ?? []);
|
|
21
|
+
}, [pageSize, pageIndex, items]);
|
|
22
|
+
// Handle item selection
|
|
23
|
+
const handleItemDoubleClick = useCallback((item) => {
|
|
24
|
+
if (onDoubleClickHandler)
|
|
25
|
+
onDoubleClickHandler(item);
|
|
26
|
+
}, []);
|
|
27
|
+
// Handle closing the context menu
|
|
28
|
+
const closeViewContextMenu = useCallback(() => {
|
|
29
|
+
setDraftThumbViewAnchor(null);
|
|
30
|
+
}, []);
|
|
31
|
+
const onBackgroundContextMenu = (event) => {
|
|
32
|
+
if (event === undefined)
|
|
33
|
+
return;
|
|
34
|
+
if (event.target.closest('.tm-file-manager-thumbnail-items'))
|
|
35
|
+
return;
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
setDraftThumbViewAnchor(event.currentTarget);
|
|
38
|
+
handleFocusedFile?.(undefined);
|
|
39
|
+
handleSelectedFiles?.([]);
|
|
40
|
+
};
|
|
41
|
+
return items.length > 0 ?
|
|
42
|
+
_jsxs("div", { style: { width: "100%", height: "100%" }, onContextMenu: onBackgroundContextMenu, children: [_jsx(ScrollView, { width: "100%", height: showPagination ? "calc(100% - 50px)" : "100%", useNative: true, direction: 'vertical', children: _jsx(TMFileManagerThumbnailItems, { items: items, allUsers: allUsers, paginatedItems: paginatedItems, focusedFile: focusedFile, selectedFiles: selectedFiles, userID: userID, searchText: searchText, handleFocusedFile: handleFocusedFile, handleSelectedFiles: handleSelectedFiles, onDoubleClick: handleItemDoubleClick, setDraftThumbViewAnchor: setDraftThumbViewAnchor }) }), showPagination && _jsx(Pagination, { height: "50px", showInfo: true, showNavigationButtons: true, allowedPageSizes: PAGE_SIZES, displayMode: 'compact', itemCount: items.length, pageIndex: pageIndex, pageSize: pageSize, onPageIndexChange: setPageIndex, onPageSizeChange: setPageSize }), draftThumbViewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: fileContextMenuItems, target: draftThumbViewAnchor, onHiding: closeViewContextMenu })] })
|
|
43
|
+
:
|
|
44
|
+
_jsxs("div", { onContextMenu: onBackgroundContextMenu, style: { width: "100%", height: "100%", display: 'flex', justifyContent: 'center', alignItems: 'center', marginTop: '10px' }, children: [SDKUI_Localizator.FolderIsEmpty, draftThumbViewAnchor && _jsx(ContextMenu, { id: 'fileViewContextMenuMobile', dataSource: fileContextMenuItems, target: draftThumbViewAnchor, onHiding: closeViewContextMenu })] });
|
|
45
|
+
};
|
|
46
|
+
export default TMFileManagerThumbnailsView;
|