@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,655 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useMemo, useEffect } from 'react';
|
|
3
|
+
import { SDKUI_Localizator } from '../helper/SDKUI_Localizator';
|
|
4
|
+
import { IconPair, IconUnpair } from '../helper/TMIcons';
|
|
5
|
+
import { hasDetailRelations, hasMasterRelations } from '../helper/dcmtsHelper';
|
|
6
|
+
import { SDK_Globals, SearchEngine, RelationCacheService, RelationTypes, DcmtTypeListCacheService, SystemMIDsAsNumber, AccessLevelsEx } from '@topconsultnpm/sdk-ts';
|
|
7
|
+
import { TMSpinner, TMExceptionBoxManager, ShowAlert } from '../components';
|
|
8
|
+
export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, currentSearchResults }) => {
|
|
9
|
+
const [relatedDcmts, setRelatedDcmts] = useState(undefined);
|
|
10
|
+
const [showRelatedDcmtsChooser, setShowRelatedDcmtsChooser] = useState(false);
|
|
11
|
+
const [archiveType, setArchiveType] = useState(undefined);
|
|
12
|
+
const [isOpenDetails, setIsOpenDetails] = useState(false);
|
|
13
|
+
const [isOpenMaster, setIsOpenMaster] = useState(false);
|
|
14
|
+
const [isOpenArchiveRelationForm, setIsOpenArchiveRelationForm] = useState(false);
|
|
15
|
+
const [archiveRelatedDcmtFormTID, setArchiveRelatedDcmtFormTID] = useState(undefined);
|
|
16
|
+
const [archiveRelatedDcmtFormMids, setArchiveRelatedDcmtFormMids] = useState([]);
|
|
17
|
+
const [relatedDcmtsChooserDataSource, setRelatedDcmtsChooserDataSource] = useState(undefined);
|
|
18
|
+
const [showPairDcmtsModal, setShowPairDcmtsModal] = useState(false);
|
|
19
|
+
const [isPairingManyToMany, setIsPairingManyToMany] = useState(false);
|
|
20
|
+
const [pairedSearchResults, setPairedSearchResults] = useState([]);
|
|
21
|
+
const [manyToManyRelations, setManyToManyRelations] = useState(undefined);
|
|
22
|
+
const [selectedManyToManyRelation, setSelectedManyToManyRelation] = useState(undefined);
|
|
23
|
+
const [showManyToManyChooser, setShowManyToManyChooser] = useState(false);
|
|
24
|
+
const [manyToManyChooserDataSource, setManyToManyChooserDataSource] = useState(undefined);
|
|
25
|
+
const [showPairSearchModal, setShowPairSearchModal] = useState(false);
|
|
26
|
+
const [pairSearchModalTargetTID, setPairSearchModalTargetTID] = useState(undefined);
|
|
27
|
+
const [pairSearchModalParentTID, setPairSearchModalParentTID] = useState(undefined);
|
|
28
|
+
const [pairSearchModalParentDID, setPairSearchModalParentDID] = useState(undefined);
|
|
29
|
+
const [pairSearchModalRelation, setPairSearchModalRelation] = useState(undefined);
|
|
30
|
+
const [pairSearchModalInputMids, setPairSearchModalInputMids] = useState(undefined);
|
|
31
|
+
const [currentTIDHasDetailRelations, setCurrentTIDHasDetailRelations] = useState();
|
|
32
|
+
const [currentTIDHasMasterRelations, setCurrentTIDHasMasterRelations] = useState();
|
|
33
|
+
const [canArchiveMasterRelation, setCanArchiveMasterRelation] = useState(false);
|
|
34
|
+
const [canArchiveDetailRelation, setCanArchiveDetailRelation] = useState(false);
|
|
35
|
+
const [hasManyToManyRelation, setHasManyToManyRelation] = useState(false);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const updateRelationStates = async () => {
|
|
38
|
+
if (selectedSearchResult?.fromTID) {
|
|
39
|
+
const [hasDetail, hasMaster] = await Promise.all([
|
|
40
|
+
hasDetailRelations(selectedSearchResult.fromTID),
|
|
41
|
+
hasMasterRelations(selectedSearchResult.fromTID)
|
|
42
|
+
]);
|
|
43
|
+
setCurrentTIDHasDetailRelations(hasDetail);
|
|
44
|
+
setCurrentTIDHasMasterRelations(hasMaster);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
setCurrentTIDHasDetailRelations(undefined);
|
|
48
|
+
setCurrentTIDHasMasterRelations(undefined);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
updateRelationStates();
|
|
52
|
+
}, [selectedSearchResult?.fromTID]);
|
|
53
|
+
const openPairSearchModal = useCallback((relation, targetTID, qd) => {
|
|
54
|
+
if (!targetTID)
|
|
55
|
+
return;
|
|
56
|
+
const inputMidsFromQd = [];
|
|
57
|
+
if (qd?.where) {
|
|
58
|
+
for (const whereItem of qd.where) {
|
|
59
|
+
if (whereItem.mid && whereItem.value1) {
|
|
60
|
+
inputMidsFromQd.push({
|
|
61
|
+
mid: whereItem.mid,
|
|
62
|
+
value: whereItem.value1
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
setIsPairingManyToMany(true);
|
|
68
|
+
setPairSearchModalTargetTID(targetTID);
|
|
69
|
+
setPairSearchModalParentTID(Number(focusedItem.TID));
|
|
70
|
+
setPairSearchModalParentDID(Number(focusedItem.DID));
|
|
71
|
+
setPairSearchModalRelation(relation);
|
|
72
|
+
setPairSearchModalInputMids(inputMidsFromQd.length > 0 ? inputMidsFromQd : undefined);
|
|
73
|
+
setShowPairSearchModal(true);
|
|
74
|
+
}, [focusedItem]);
|
|
75
|
+
const createPairFloatingActionConfig = useCallback((relation, parentTID, parentDID, isPairing, onCloseModal) => ({
|
|
76
|
+
isVisible: true,
|
|
77
|
+
type: 'multi',
|
|
78
|
+
onClick: async (selected) => {
|
|
79
|
+
if (!relation || !parentTID || !parentDID)
|
|
80
|
+
return;
|
|
81
|
+
const parentIsMaster = parentTID === relation.masterTID;
|
|
82
|
+
const parentIsDetail = parentTID === relation.detailTID;
|
|
83
|
+
if (!parentIsMaster && !parentIsDetail)
|
|
84
|
+
return;
|
|
85
|
+
const tms = SDK_Globals.tmSession;
|
|
86
|
+
if (!tms)
|
|
87
|
+
return;
|
|
88
|
+
const se = new SearchEngine(tms);
|
|
89
|
+
try {
|
|
90
|
+
TMSpinner.show({ description: isPairing ? 'Abbinamento in corso...' : 'Disabbinamento in corso...' });
|
|
91
|
+
for (const doc of selected) {
|
|
92
|
+
if (!doc?.TID || !doc?.DID)
|
|
93
|
+
continue;
|
|
94
|
+
let masterTID;
|
|
95
|
+
let masterDID;
|
|
96
|
+
let detailTID;
|
|
97
|
+
let detailDID;
|
|
98
|
+
if (parentIsMaster) {
|
|
99
|
+
masterTID = parentTID;
|
|
100
|
+
masterDID = parentDID;
|
|
101
|
+
detailTID = doc.TID;
|
|
102
|
+
detailDID = doc.DID;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
masterTID = doc.TID;
|
|
106
|
+
masterDID = doc.DID;
|
|
107
|
+
detailTID = parentTID;
|
|
108
|
+
detailDID = parentDID;
|
|
109
|
+
}
|
|
110
|
+
if (isPairing) {
|
|
111
|
+
await se.ManyToManyRelateAsync(masterTID, masterDID, detailTID, detailDID);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
await se.ManyToManyUnrelateAsync(masterTID, masterDID, detailTID, detailDID);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
onCloseModal();
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
console.error('Error in onClick:', error);
|
|
121
|
+
TMExceptionBoxManager.show({ exception: error });
|
|
122
|
+
}
|
|
123
|
+
finally {
|
|
124
|
+
TMSpinner.hide();
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
iconElement: isPairing ? _jsx(IconPair, { fontSize: 26 }) : _jsx(IconUnpair, { fontSize: 26 }),
|
|
128
|
+
tooltip: isPairing ? 'Abbina' : 'Disabbina',
|
|
129
|
+
}), []);
|
|
130
|
+
const pairFloatingActionConfig = useMemo(() => createPairFloatingActionConfig(selectedManyToManyRelation, focusedItem?.TID ? Number(focusedItem.TID) : undefined, focusedItem?.DID ? Number(focusedItem.DID) : undefined, isPairingManyToMany, () => setShowPairDcmtsModal(false)), [createPairFloatingActionConfig, selectedManyToManyRelation, focusedItem, isPairingManyToMany]);
|
|
131
|
+
const pairSearchModalFloatingActionConfig = useMemo(() => createPairFloatingActionConfig(pairSearchModalRelation, pairSearchModalParentTID, pairSearchModalParentDID, true, () => setShowPairSearchModal(false)), [createPairFloatingActionConfig, pairSearchModalRelation, pairSearchModalParentTID, pairSearchModalParentDID]);
|
|
132
|
+
const getAllRelationsAsync = async () => {
|
|
133
|
+
const tmSession = SDK_Globals.tmSession;
|
|
134
|
+
try {
|
|
135
|
+
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
136
|
+
let relations = await RelationCacheService.GetAllAsync(tmSession);
|
|
137
|
+
if (!relations)
|
|
138
|
+
throw new Error("Impossibile caricare le relazioni.");
|
|
139
|
+
return relations;
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
TMExceptionBoxManager.show({ exception: error });
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
TMSpinner.hide();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const checkRelatedDcmtsArchiveCapability = useCallback(async () => {
|
|
150
|
+
const tid = selectedSearchResult?.fromTID;
|
|
151
|
+
if (!tid) {
|
|
152
|
+
setCanArchiveMasterRelation(false);
|
|
153
|
+
setCanArchiveDetailRelation(false);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
const relations = await getAllRelationsAsync();
|
|
158
|
+
if (!relations) {
|
|
159
|
+
setCanArchiveMasterRelation(false);
|
|
160
|
+
setCanArchiveDetailRelation(false);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const detailRelations = relations.filter(r => r.detailTID === tid);
|
|
164
|
+
const hasMasterWithAssociations = detailRelations.some(rel => rel.associations && rel.associations.length > 0);
|
|
165
|
+
setCanArchiveMasterRelation(hasMasterWithAssociations);
|
|
166
|
+
const masterRelations = relations.filter(r => r.masterTID === tid);
|
|
167
|
+
const hasDetailWithAssociations = masterRelations.some(rel => rel.associations && rel.associations.length > 0);
|
|
168
|
+
setCanArchiveDetailRelation(hasDetailWithAssociations);
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
console.error("Error checking archive capability:", error);
|
|
172
|
+
setCanArchiveMasterRelation(false);
|
|
173
|
+
setCanArchiveDetailRelation(false);
|
|
174
|
+
}
|
|
175
|
+
}, [selectedSearchResult?.fromTID]);
|
|
176
|
+
const checkManyToManyCapability = useCallback(async () => {
|
|
177
|
+
const tid = selectedSearchResult?.fromTID;
|
|
178
|
+
if (!tid) {
|
|
179
|
+
setHasManyToManyRelation(false);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
const relations = await getAllRelationsAsync();
|
|
184
|
+
if (!relations) {
|
|
185
|
+
setHasManyToManyRelation(false);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const manyToManyRels = relations.filter(r => r.relationType === RelationTypes.ManyToMany &&
|
|
189
|
+
(r.masterTID === tid || r.detailTID === tid));
|
|
190
|
+
setHasManyToManyRelation(manyToManyRels.length > 0);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
console.error("Error checking many-to-many capability:", error);
|
|
194
|
+
setHasManyToManyRelation(false);
|
|
195
|
+
}
|
|
196
|
+
}, [selectedSearchResult?.fromTID]);
|
|
197
|
+
const getFocusedItem = useCallback(() => {
|
|
198
|
+
if (!focusedItem || currentSearchResults.length !== 1)
|
|
199
|
+
return undefined;
|
|
200
|
+
return { mdList: currentSearchResults[0].dtdResult?.rows?.[focusedItem?.rowIndex ?? 0], mids: currentSearchResults[0].selectMIDs ?? [] };
|
|
201
|
+
}, [focusedItem, currentSearchResults]);
|
|
202
|
+
const fetchAssociatedValues = useCallback((mid) => {
|
|
203
|
+
let mdList = getFocusedItem();
|
|
204
|
+
if (!mdList)
|
|
205
|
+
return;
|
|
206
|
+
let index = mdList.mids.findIndex(m => m == mid);
|
|
207
|
+
if (index === -1)
|
|
208
|
+
return;
|
|
209
|
+
return mdList.mdList?.[index];
|
|
210
|
+
}, [getFocusedItem]);
|
|
211
|
+
const filterRelationsByType = (relations, tid, type) => {
|
|
212
|
+
return type === 'detail'
|
|
213
|
+
? relations.filter(r => r.masterTID == tid)
|
|
214
|
+
: relations.filter(r => r.detailTID == tid);
|
|
215
|
+
};
|
|
216
|
+
const filterRelationsWithAssociations = (relations) => {
|
|
217
|
+
return relations.filter(rel => rel.associations && rel.associations.length > 0);
|
|
218
|
+
};
|
|
219
|
+
const getRelatedDcmt = async (relation, type) => {
|
|
220
|
+
return await DcmtTypeListCacheService.GetAsync(type === 'detail' ? relation.detailTID : relation.masterTID);
|
|
221
|
+
};
|
|
222
|
+
const showNoRelationsAlert = (type) => {
|
|
223
|
+
ShowAlert({
|
|
224
|
+
message: type === 'detail'
|
|
225
|
+
? SDKUI_Localizator.NoDetailDocumentFoundForArchiving
|
|
226
|
+
: SDKUI_Localizator.NoMasterDocumentFoundForArchiving,
|
|
227
|
+
mode: 'info',
|
|
228
|
+
title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
|
|
229
|
+
duration: 5000
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
const showNoAssociationsAlert = (type) => {
|
|
233
|
+
ShowAlert({
|
|
234
|
+
message: type === 'detail'
|
|
235
|
+
? SDKUI_Localizator.NoMatchFoundForDetailDocuments
|
|
236
|
+
: SDKUI_Localizator.NoMatchFoundForMasterDocuments,
|
|
237
|
+
mode: 'info',
|
|
238
|
+
title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
|
|
239
|
+
duration: 5000
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
const mapAssociationsToMids = useCallback((relation, type) => {
|
|
243
|
+
return relation.associations?.map(assoc => ({
|
|
244
|
+
mid: type === 'detail' ? (assoc.item2 ?? 0) : (assoc.item1 ?? 0),
|
|
245
|
+
value: fetchAssociatedValues(type === 'detail' ? (assoc.item1 ?? 0) : (assoc.item2 ?? 0)) ?? ''
|
|
246
|
+
})) ?? [];
|
|
247
|
+
}, [fetchAssociatedValues]);
|
|
248
|
+
const archiveRelatedDcmtHandler = useCallback(async (relation, type) => {
|
|
249
|
+
const targetTID = type === 'detail' ? relation.detailTID : relation.masterTID;
|
|
250
|
+
if (!targetTID)
|
|
251
|
+
return;
|
|
252
|
+
try {
|
|
253
|
+
const dtd = await DcmtTypeListCacheService.GetWithNotGrantedAsync(targetTID, undefined);
|
|
254
|
+
if (dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed) {
|
|
255
|
+
ShowAlert({
|
|
256
|
+
message: type === 'detail'
|
|
257
|
+
? SDKUI_Localizator.YouDoNotHavePermissionsToArchiveDetailDocumentsOfThisType
|
|
258
|
+
: SDKUI_Localizator.YouDoNotHavePermissionsToArchiveMasterDocumentsOfThisType,
|
|
259
|
+
mode: 'warning',
|
|
260
|
+
title: type === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster,
|
|
261
|
+
duration: 5000
|
|
262
|
+
});
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const mids = mapAssociationsToMids(relation, type);
|
|
266
|
+
setArchiveType(type);
|
|
267
|
+
setArchiveRelatedDcmtFormTID(targetTID);
|
|
268
|
+
setArchiveRelatedDcmtFormMids(mids);
|
|
269
|
+
setIsOpenArchiveRelationForm(true);
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
console.error("Error checking archive permissions:", error);
|
|
273
|
+
TMExceptionBoxManager.show({ exception: error });
|
|
274
|
+
}
|
|
275
|
+
}, [mapAssociationsToMids]);
|
|
276
|
+
const archiveRelatedDocuments = useCallback(async (tid, type) => {
|
|
277
|
+
try {
|
|
278
|
+
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
279
|
+
const relations = await getAllRelationsAsync();
|
|
280
|
+
if (!relations || !tid)
|
|
281
|
+
return;
|
|
282
|
+
const filteredRelations = filterRelationsByType(relations, tid, type);
|
|
283
|
+
if (!filteredRelations || filteredRelations.length === 0) {
|
|
284
|
+
showNoRelationsAlert(type);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const withAssociations = filterRelationsWithAssociations(filteredRelations);
|
|
288
|
+
if (withAssociations.length === 0) {
|
|
289
|
+
showNoAssociationsAlert(type);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
setRelatedDcmts(withAssociations);
|
|
293
|
+
if (withAssociations.length > 1) {
|
|
294
|
+
const dataSourcePromises = withAssociations.map(async (rel) => {
|
|
295
|
+
const relatedDcmt = await getRelatedDcmt(rel, type);
|
|
296
|
+
return { id: rel?.id, name: relatedDcmt?.name };
|
|
297
|
+
});
|
|
298
|
+
const dataSource = await Promise.all(dataSourcePromises);
|
|
299
|
+
setRelatedDcmtsChooserDataSource(dataSource);
|
|
300
|
+
setArchiveType(type);
|
|
301
|
+
setShowRelatedDcmtsChooser(true);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
await archiveRelatedDcmtHandler(withAssociations[0], type);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
TMExceptionBoxManager.show({ exception: error });
|
|
309
|
+
}
|
|
310
|
+
finally {
|
|
311
|
+
TMSpinner.hide();
|
|
312
|
+
}
|
|
313
|
+
}, [archiveRelatedDcmtHandler]);
|
|
314
|
+
const archiveDetailDocuments = useCallback(async (tid) => {
|
|
315
|
+
await archiveRelatedDocuments(tid, 'detail');
|
|
316
|
+
}, [archiveRelatedDocuments]);
|
|
317
|
+
const archiveMasterDocuments = useCallback(async (tid) => {
|
|
318
|
+
await archiveRelatedDocuments(tid, 'master');
|
|
319
|
+
}, [archiveRelatedDocuments]);
|
|
320
|
+
const getPairedDocuments = async (relation, currentTID, currentDID, searchEngine) => {
|
|
321
|
+
if (!relation || !currentDID)
|
|
322
|
+
return null;
|
|
323
|
+
try {
|
|
324
|
+
const isMaster = currentTID === relation.masterTID;
|
|
325
|
+
const pairedResults = isMaster
|
|
326
|
+
? await searchEngine.GetAllDetailDcmtsAsync(currentTID, currentDID)
|
|
327
|
+
: await searchEngine.GetAllMasterDcmtsAsync(currentTID, currentDID);
|
|
328
|
+
if (!pairedResults || pairedResults.length === 0)
|
|
329
|
+
return null;
|
|
330
|
+
const relationResult = pairedResults.find(r => r.relationID === relation.id);
|
|
331
|
+
if (!relationResult?.dtdResult)
|
|
332
|
+
return null;
|
|
333
|
+
return relationResult;
|
|
334
|
+
}
|
|
335
|
+
catch (error) {
|
|
336
|
+
console.error('getPairedDocuments - Error:', error);
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
const extractPairedDIDs = (relationResult) => {
|
|
341
|
+
const pairedDIDs = [];
|
|
342
|
+
const rows = relationResult.dtdResult?.rows ?? [];
|
|
343
|
+
const columns = relationResult.dtdResult?.columns ?? [];
|
|
344
|
+
const didColumnIndex = columns.findIndex(col => {
|
|
345
|
+
const caption = col.caption?.toUpperCase();
|
|
346
|
+
const mid = col.extendedProperties?.["MID"];
|
|
347
|
+
const midNum = typeof mid === 'string' ? Number.parseInt(mid, 10) : mid;
|
|
348
|
+
return caption === 'DID' || midNum === 5;
|
|
349
|
+
});
|
|
350
|
+
if (didColumnIndex === -1)
|
|
351
|
+
return [];
|
|
352
|
+
for (const row of rows) {
|
|
353
|
+
const did = row[didColumnIndex];
|
|
354
|
+
if (did) {
|
|
355
|
+
const didNumber = typeof did === 'string' ? Number.parseInt(did, 10) : did;
|
|
356
|
+
if (!Number.isNaN(didNumber)) {
|
|
357
|
+
pairedDIDs.push(didNumber);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return pairedDIDs;
|
|
362
|
+
};
|
|
363
|
+
const executeManyToManyPairing = useCallback(async (relation, isPairing) => {
|
|
364
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
365
|
+
if (!focusedItem?.TID || !focusedItem?.DID) {
|
|
366
|
+
ShowAlert({
|
|
367
|
+
message: isPairing
|
|
368
|
+
? SDKUI_Localizator.NoDocumentSelectedForManyToManyMatching
|
|
369
|
+
: SDKUI_Localizator.NoDocumentSelectedForManyToManyUnmatching,
|
|
370
|
+
mode: 'warning',
|
|
371
|
+
title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
372
|
+
duration: 5000
|
|
373
|
+
});
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
setSelectedManyToManyRelation(relation);
|
|
377
|
+
let qd;
|
|
378
|
+
if (relation.detailTID === selectedSearchResult?.fromTID) {
|
|
379
|
+
qd = relation.retrieveMastersQuery;
|
|
380
|
+
}
|
|
381
|
+
if (relation.masterTID === selectedSearchResult?.fromTID) {
|
|
382
|
+
qd = relation.retrieveDetailsQuery;
|
|
383
|
+
}
|
|
384
|
+
if (!qd) {
|
|
385
|
+
ShowAlert({
|
|
386
|
+
message: isPairing
|
|
387
|
+
? SDKUI_Localizator.NoManyToManyMatchingRelationshipAssociatedWithRetrievalQuery
|
|
388
|
+
: SDKUI_Localizator.NoManyToManyUnmatchingRelationshipAssociatedWithRetrievalQuery,
|
|
389
|
+
mode: 'warning',
|
|
390
|
+
title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
391
|
+
duration: 5000
|
|
392
|
+
});
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
qd = structuredClone(qd);
|
|
396
|
+
if (qd.select) {
|
|
397
|
+
for (const s of qd.select) {
|
|
398
|
+
s.visibility = 1;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const qdRetrieveParamsValue = {
|
|
402
|
+
from: { tid: focusedItem.TID },
|
|
403
|
+
select: [],
|
|
404
|
+
where: [
|
|
405
|
+
{
|
|
406
|
+
tid: focusedItem.TID,
|
|
407
|
+
mid: 5,
|
|
408
|
+
leftBrackets: "(",
|
|
409
|
+
rightBrackets: ")",
|
|
410
|
+
operator: 0,
|
|
411
|
+
value1: focusedItem.DID.toString()
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
};
|
|
415
|
+
let notMappedMIDs = false;
|
|
416
|
+
if (qd.params && qd.params.length > 0) {
|
|
417
|
+
for (const param of qd.params) {
|
|
418
|
+
if (!param.mappedMID)
|
|
419
|
+
continue;
|
|
420
|
+
qdRetrieveParamsValue.select.push({
|
|
421
|
+
tid: param.mappedTID ?? focusedItem.TID,
|
|
422
|
+
mid: param.mappedMID,
|
|
423
|
+
visibility: 1
|
|
424
|
+
});
|
|
425
|
+
const currentRowValue = currentSearchResults[0]?.dtdResult?.rows?.[focusedItem.rowIndex];
|
|
426
|
+
const midIndex = currentSearchResults[0]?.selectMIDs?.indexOf(param.mappedMID);
|
|
427
|
+
if (currentRowValue && midIndex !== undefined && midIndex >= 0) {
|
|
428
|
+
const value = currentRowValue[midIndex];
|
|
429
|
+
param.value = value ?? '';
|
|
430
|
+
if (param.value === null || param.value === '')
|
|
431
|
+
notMappedMIDs = true;
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
notMappedMIDs = true;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
if (notMappedMIDs && qdRetrieveParamsValue.select && qdRetrieveParamsValue.select.length > 0) {
|
|
438
|
+
const paramMetadata = await searchEngine.SearchByIDAsync(qdRetrieveParamsValue);
|
|
439
|
+
if (paramMetadata?.dtdResult?.rows?.[0]) {
|
|
440
|
+
for (const param of qd.params) {
|
|
441
|
+
if (!param.mappedMID)
|
|
442
|
+
continue;
|
|
443
|
+
const colIndex = paramMetadata.selectMIDs?.indexOf(param.mappedMID);
|
|
444
|
+
if (colIndex !== undefined && colIndex >= 0) {
|
|
445
|
+
const value = paramMetadata.dtdResult.rows[0][colIndex];
|
|
446
|
+
param.value = value ?? '';
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
if (qd.where && qd.where.length > 0) {
|
|
452
|
+
for (const whereItem of qd.where) {
|
|
453
|
+
for (const param of qd.params) {
|
|
454
|
+
if (!param.name)
|
|
455
|
+
continue;
|
|
456
|
+
param.value ??= '';
|
|
457
|
+
const paramValue = param.value.toString();
|
|
458
|
+
if (whereItem.value1) {
|
|
459
|
+
whereItem.value1 = whereItem.value1.replace(param.name, paramValue);
|
|
460
|
+
}
|
|
461
|
+
if (whereItem.value2) {
|
|
462
|
+
whereItem.value2 = whereItem.value2.replace(param.name, paramValue);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
const targetTID = relation.detailTID === selectedSearchResult?.fromTID
|
|
469
|
+
? relation.masterTID
|
|
470
|
+
: relation.detailTID;
|
|
471
|
+
const systemSelects = [
|
|
472
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.DID, visibility: 0 },
|
|
473
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.TID, visibility: 0 },
|
|
474
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.OwnerID, visibility: 0 },
|
|
475
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.UpdaterID, visibility: 0 },
|
|
476
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.FileExt, visibility: 0 },
|
|
477
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.CreationTime, visibility: 0 },
|
|
478
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.LastUpdateTime, visibility: 0 },
|
|
479
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.FileCount, visibility: 0 },
|
|
480
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.FileSize, visibility: 0 },
|
|
481
|
+
{ tid: targetTID, mid: SystemMIDsAsNumber.PageCount, visibility: 0 },
|
|
482
|
+
];
|
|
483
|
+
if (qd.select) {
|
|
484
|
+
qd.select = [...systemSelects, ...qd.select];
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
qd.select = systemSelects;
|
|
488
|
+
}
|
|
489
|
+
const pairedDocumentsResult = await getPairedDocuments(relation, focusedItem.TID, focusedItem.DID, searchEngine);
|
|
490
|
+
if (!isPairing) {
|
|
491
|
+
if (!pairedDocumentsResult?.dtdResult?.rows || pairedDocumentsResult.dtdResult.rows.length === 0) {
|
|
492
|
+
ShowAlert({
|
|
493
|
+
message: SDKUI_Localizator.NoDocumentMatchFound,
|
|
494
|
+
mode: 'warning',
|
|
495
|
+
title: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
496
|
+
duration: 5000
|
|
497
|
+
});
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const pairedSq = {
|
|
501
|
+
fromTID: targetTID,
|
|
502
|
+
fromName: await DcmtTypeListCacheService.GetAsync(targetTID).then(d => d?.name ?? ''),
|
|
503
|
+
dtdResult: pairedDocumentsResult.dtdResult,
|
|
504
|
+
selectMIDs: pairedDocumentsResult.selectMIDs,
|
|
505
|
+
relationID: relation.id,
|
|
506
|
+
dcmtsReturned: pairedDocumentsResult.dtdResult.rows.length,
|
|
507
|
+
dcmtsFound: pairedDocumentsResult.dtdResult.rows.length
|
|
508
|
+
};
|
|
509
|
+
setPairedSearchResults([pairedSq]);
|
|
510
|
+
setIsPairingManyToMany(isPairing);
|
|
511
|
+
setShowPairDcmtsModal(true);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
const sq = await searchEngine.SearchByIDAsync(qd);
|
|
515
|
+
if (!sq?.dtdResult?.rows || sq.dtdResult.rows.length === 0) {
|
|
516
|
+
ShowAlert({
|
|
517
|
+
message: SDKUI_Localizator.NoDcmtFound,
|
|
518
|
+
mode: 'warning',
|
|
519
|
+
title: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
520
|
+
duration: 5000
|
|
521
|
+
});
|
|
522
|
+
openPairSearchModal(relation, targetTID, qd);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
const pairedDIDs = pairedDocumentsResult ? extractPairedDIDs(pairedDocumentsResult) : [];
|
|
526
|
+
const filteredRows = sq.dtdResult.rows.filter(row => {
|
|
527
|
+
const did = row[0];
|
|
528
|
+
const didNum = typeof did === 'string' ? Number.parseInt(did, 10) : did;
|
|
529
|
+
return !pairedDIDs.includes(didNum);
|
|
530
|
+
});
|
|
531
|
+
const filteredSq = {
|
|
532
|
+
...sq,
|
|
533
|
+
dtdResult: {
|
|
534
|
+
...sq.dtdResult,
|
|
535
|
+
rows: filteredRows
|
|
536
|
+
},
|
|
537
|
+
dcmtsReturned: filteredRows.length,
|
|
538
|
+
dcmtsFound: filteredRows.length
|
|
539
|
+
};
|
|
540
|
+
if (filteredRows.length === 0) {
|
|
541
|
+
ShowAlert({
|
|
542
|
+
message: SDKUI_Localizator.NoDocumentToMatch,
|
|
543
|
+
mode: 'warning',
|
|
544
|
+
title: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
545
|
+
duration: 5000
|
|
546
|
+
});
|
|
547
|
+
openPairSearchModal(relation, targetTID, qd);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
setPairedSearchResults([filteredSq]);
|
|
551
|
+
setIsPairingManyToMany(isPairing);
|
|
552
|
+
setShowPairDcmtsModal(true);
|
|
553
|
+
}, [focusedItem, selectedSearchResult, currentSearchResults, openPairSearchModal]);
|
|
554
|
+
const pairManyToMany = useCallback(async (isPairing) => {
|
|
555
|
+
try {
|
|
556
|
+
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
557
|
+
const relations = await getAllRelationsAsync();
|
|
558
|
+
if (!relations)
|
|
559
|
+
return;
|
|
560
|
+
if (!relations.some(r => r.relationType === RelationTypes.ManyToMany)) {
|
|
561
|
+
ShowAlert({
|
|
562
|
+
message: isPairing
|
|
563
|
+
? SDKUI_Localizator.NoManyToManyMatchingRelationshipDefined
|
|
564
|
+
: SDKUI_Localizator.NoManyToManyUnmatchingRelationshipDefined,
|
|
565
|
+
mode: 'warning',
|
|
566
|
+
title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
567
|
+
duration: 5000
|
|
568
|
+
});
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const manyToManyRels = relations.filter(r => r.relationType === RelationTypes.ManyToMany);
|
|
572
|
+
if (!manyToManyRels.some(r => r.masterTID === selectedSearchResult?.fromTID || r.detailTID === selectedSearchResult?.fromTID)) {
|
|
573
|
+
ShowAlert({
|
|
574
|
+
message: isPairing
|
|
575
|
+
? SDKUI_Localizator.NoManyToManyMatchingRelationshipDefinedForSelectedDocumentType
|
|
576
|
+
: SDKUI_Localizator.NoManyToManyUnmatchingRelationshipDefinedForSelectedDocumentType,
|
|
577
|
+
mode: 'warning',
|
|
578
|
+
title: isPairing ? SDKUI_Localizator.MatchManyDocumentsManyToMany : SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
579
|
+
duration: 5000
|
|
580
|
+
});
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
const relsManyToMany = manyToManyRels.filter(r => r.masterTID === selectedSearchResult?.fromTID || r.detailTID === selectedSearchResult?.fromTID);
|
|
584
|
+
setManyToManyRelations(relsManyToMany);
|
|
585
|
+
if (relsManyToMany.length > 1) {
|
|
586
|
+
const dataSourcePromises = relsManyToMany.map(async (rel) => {
|
|
587
|
+
const targetTID = rel.masterTID === selectedSearchResult?.fromTID ? rel.detailTID : rel.masterTID;
|
|
588
|
+
const relatedDcmt = await DcmtTypeListCacheService.GetAsync(targetTID);
|
|
589
|
+
return { id: rel?.id, name: relatedDcmt?.name };
|
|
590
|
+
});
|
|
591
|
+
const dataSource = await Promise.all(dataSourcePromises);
|
|
592
|
+
setManyToManyChooserDataSource(dataSource);
|
|
593
|
+
setIsPairingManyToMany(isPairing);
|
|
594
|
+
setShowManyToManyChooser(true);
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
await executeManyToManyPairing(relsManyToMany[0], isPairing);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
catch (error) {
|
|
601
|
+
TMExceptionBoxManager.show({ exception: error });
|
|
602
|
+
}
|
|
603
|
+
finally {
|
|
604
|
+
TMSpinner.hide();
|
|
605
|
+
}
|
|
606
|
+
}, [selectedSearchResult, executeManyToManyPairing]);
|
|
607
|
+
return {
|
|
608
|
+
relatedDcmts,
|
|
609
|
+
showRelatedDcmtsChooser,
|
|
610
|
+
archiveType,
|
|
611
|
+
isOpenDetails,
|
|
612
|
+
isOpenMaster,
|
|
613
|
+
isOpenArchiveRelationForm,
|
|
614
|
+
archiveRelatedDcmtFormTID,
|
|
615
|
+
archiveRelatedDcmtFormMids,
|
|
616
|
+
relatedDcmtsChooserDataSource,
|
|
617
|
+
showPairDcmtsModal,
|
|
618
|
+
isPairingManyToMany,
|
|
619
|
+
pairedSearchResults,
|
|
620
|
+
manyToManyRelations,
|
|
621
|
+
selectedManyToManyRelation,
|
|
622
|
+
showManyToManyChooser,
|
|
623
|
+
manyToManyChooserDataSource,
|
|
624
|
+
showPairSearchModal,
|
|
625
|
+
pairSearchModalTargetTID,
|
|
626
|
+
pairSearchModalParentTID,
|
|
627
|
+
pairSearchModalParentDID,
|
|
628
|
+
pairSearchModalRelation,
|
|
629
|
+
pairSearchModalInputMids,
|
|
630
|
+
currentTIDHasDetailRelations,
|
|
631
|
+
currentTIDHasMasterRelations,
|
|
632
|
+
canArchiveMasterRelation,
|
|
633
|
+
canArchiveDetailRelation,
|
|
634
|
+
hasManyToManyRelation,
|
|
635
|
+
setIsOpenDetails,
|
|
636
|
+
setIsOpenMaster,
|
|
637
|
+
setShowRelatedDcmtsChooser,
|
|
638
|
+
setShowManyToManyChooser,
|
|
639
|
+
setShowPairDcmtsModal,
|
|
640
|
+
setShowPairSearchModal,
|
|
641
|
+
setIsOpenArchiveRelationForm,
|
|
642
|
+
setArchiveType,
|
|
643
|
+
setArchiveRelatedDcmtFormTID,
|
|
644
|
+
setArchiveRelatedDcmtFormMids,
|
|
645
|
+
pairFloatingActionConfig,
|
|
646
|
+
pairSearchModalFloatingActionConfig,
|
|
647
|
+
archiveMasterDocuments,
|
|
648
|
+
archiveDetailDocuments,
|
|
649
|
+
pairManyToMany,
|
|
650
|
+
checkRelatedDcmtsArchiveCapability,
|
|
651
|
+
checkManyToManyCapability,
|
|
652
|
+
archiveRelatedDcmtHandler,
|
|
653
|
+
executeManyToManyPairing,
|
|
654
|
+
};
|
|
655
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
export const useResizeObserver = () => {
|
|
3
|
+
const [width, setWidth] = useState(0);
|
|
4
|
+
const ref = useRef(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const handleResize = (entries) => {
|
|
7
|
+
if (entries[0].contentRect) {
|
|
8
|
+
setWidth(entries[0].contentRect.width);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const observer = new ResizeObserver(handleResize);
|
|
12
|
+
if (ref.current) {
|
|
13
|
+
observer.observe(ref.current);
|
|
14
|
+
}
|
|
15
|
+
return () => {
|
|
16
|
+
if (ref.current) {
|
|
17
|
+
observer.unobserve(ref.current);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
return { ref, width };
|
|
22
|
+
};
|