@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,17 @@
|
|
|
1
|
+
import { BlogPost, UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
2
|
+
import { FileItem } from '../../base/TMFileManagerUtils';
|
|
3
|
+
import { TMBlogContextDescriptor } from '../../grids/TMBlogsPostUtils';
|
|
4
|
+
interface TMBlogCommentFormProps {
|
|
5
|
+
context: TMBlogContextDescriptor;
|
|
6
|
+
participants: Array<UserDescriptor>;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
showAttachmentsSection?: boolean;
|
|
9
|
+
selectedAttachments?: Array<FileItem>;
|
|
10
|
+
selectedAttachmentDid?: Array<number>;
|
|
11
|
+
allFileItems?: FileItem;
|
|
12
|
+
allArchivedDocumentsFileItems?: Array<FileItem>;
|
|
13
|
+
onFilterCreated?: (predicate: (post: BlogPost) => boolean) => void;
|
|
14
|
+
refreshCallback?: () => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
declare const TMBlogCommentForm: (props: TMBlogCommentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default TMBlogCommentForm;
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { BlogPost, BlogPostAttachment, ResultTypes, SDK_Globals, SDK_Localizator, ValidationItem, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
|
+
import { SDKUI_Localizator, calcResponsiveSizes, calcIsModified, formatBytes, Globalization, getFileIcon, IconAttachment } from '../../../helper';
|
|
5
|
+
import { useSaveForm, SaveFormOptions } from '../../../hooks/useForm';
|
|
6
|
+
import { FormModes } from '../../../ts';
|
|
7
|
+
import TMButton from '../../base/TMButton';
|
|
8
|
+
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
9
|
+
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
|
|
10
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
11
|
+
import TMTooltip from '../../base/TMTooltip';
|
|
12
|
+
import TMUserAvatar from '../../base/TMUserAvatar';
|
|
13
|
+
import TMHtmlEditor, { sanitizeAndFormatComment } from '../../editors/TMHtmlEditor';
|
|
14
|
+
import TMChooserForm from '../../forms/TMChooserForm';
|
|
15
|
+
import TMSaveForm from '../../forms/TMSaveForm';
|
|
16
|
+
const getNonDirectoryFiles = (items, exclude) => {
|
|
17
|
+
const excludeIds = new Set(exclude.map(item => item.id));
|
|
18
|
+
return items.flatMap((item) => {
|
|
19
|
+
if (item.isDirectory && item.items) {
|
|
20
|
+
return getNonDirectoryFiles(item.items, exclude);
|
|
21
|
+
}
|
|
22
|
+
else if (!item.isDirectory && !excludeIds.has(item.id)) {
|
|
23
|
+
return [item];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const TMBlogCommentForm = (props) => {
|
|
31
|
+
const maxLength = 1000;
|
|
32
|
+
const { participants, selectedAttachments, selectedAttachmentDid, allFileItems, allArchivedDocumentsFileItems = [], onClose, context, showAttachmentsSection = true, onFilterCreated, refreshCallback } = props;
|
|
33
|
+
// Initialize state with combined array
|
|
34
|
+
const [dataSource, setDataSource] = useState(() => [...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems]);
|
|
35
|
+
const [isEditorEnabled, setIsEditorEnabled] = useState(true);
|
|
36
|
+
const [showAttachmentsForm, setShowAttachmentsForm] = useState(false);
|
|
37
|
+
const [mentionsConfig, setMentionsConfig] = useState([]);
|
|
38
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
39
|
+
const deviceType = useDeviceType();
|
|
40
|
+
const validator = async (params) => {
|
|
41
|
+
let vil = [];
|
|
42
|
+
const { comment } = params;
|
|
43
|
+
const cleanedMarkup = sanitizeAndFormatComment(comment);
|
|
44
|
+
// Check for empty comment
|
|
45
|
+
if (!cleanedMarkup || cleanedMarkup.trim() === "") {
|
|
46
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDK_Localizator.RequiredField}`));
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// Calcola la lunghezza effettiva del commento inserito
|
|
50
|
+
const commentLength = cleanedMarkup.length;
|
|
51
|
+
const exceededChars = commentLength - maxLength;
|
|
52
|
+
// Validate description length (max 1000)
|
|
53
|
+
if (commentLength > maxLength) {
|
|
54
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDKUI_Localizator.DescriptionLengthExceededMessage.replaceParams(exceededChars)}`));
|
|
55
|
+
}
|
|
56
|
+
// Detect dangerous HTML tags
|
|
57
|
+
const tagRegex = /<\/?(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^>]*>/gi;
|
|
58
|
+
const attrRegex = /\son\w+\s*=\s*(['"]).*?\1/gi;
|
|
59
|
+
const encodedTagRegex = /<\/?(script|iframe|embed|object|link|style|img|video|audio|svg|form|input|button|textarea|select|pre|function)[^&]*>/gi;
|
|
60
|
+
if (tagRegex.test(comment) || attrRegex.test(comment) || encodedTagRegex.test(comment)) {
|
|
61
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Comment, `${SDKUI_Localizator.CommentDoesNotMeetRequirements}`));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return vil;
|
|
65
|
+
};
|
|
66
|
+
const { formData, setFormData, formDataOrig, validationItems, exception } = useSaveForm(FormModes.Create, 0, new SaveFormOptions(), validator);
|
|
67
|
+
const [currentDraftAttachments, setCurrentDraftAttachments] = useState([]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setDataSource([...getNonDirectoryFiles(allFileItems?.items || [], []), ...allArchivedDocumentsFileItems,]);
|
|
70
|
+
}, [allFileItems, allArchivedDocumentsFileItems]);
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (selectedAttachmentDid && selectedAttachmentDid.length) {
|
|
73
|
+
const selectedFiles = dataSource.filter(file => file.did !== undefined && selectedAttachmentDid.includes(file.did));
|
|
74
|
+
if (selectedFiles.length) {
|
|
75
|
+
setCurrentDraftAttachments(selectedFiles);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [selectedAttachmentDid, dataSource]);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (selectedAttachments) {
|
|
81
|
+
setCurrentDraftAttachments(selectedAttachments);
|
|
82
|
+
}
|
|
83
|
+
;
|
|
84
|
+
}, [selectedAttachments]);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
const mentions = [{
|
|
87
|
+
dataSource: participants.map(user => ({ text: user.name || '', icon: TMUserAvatar({ displayName: user.name || '', nameForColorCalculation: user.name || '', returnType: "svg" }) })),
|
|
88
|
+
searchExpr: 'text',
|
|
89
|
+
displayExpr: 'text',
|
|
90
|
+
valueExpr: 'text',
|
|
91
|
+
itemTemplate: function (itemData) {
|
|
92
|
+
return `<div style="display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%;">
|
|
93
|
+
${itemData.icon}
|
|
94
|
+
<span>${itemData.text}</span>
|
|
95
|
+
</div>`;
|
|
96
|
+
},
|
|
97
|
+
}];
|
|
98
|
+
setMentionsConfig(mentions);
|
|
99
|
+
}, [participants]);
|
|
100
|
+
const onSaveAsync = async () => {
|
|
101
|
+
try {
|
|
102
|
+
// Show a loading spinner with a localized description
|
|
103
|
+
TMSpinner.show({ description: SDKUI_Localizator.Comment });
|
|
104
|
+
// Exit early if the engine or its required identifiers are undefined
|
|
105
|
+
if (context.object === undefined
|
|
106
|
+
|| (context.engine === 'WorkingGroupEngine' && !context.object.id)
|
|
107
|
+
|| (context.engine === 'SearchEngine' && (!context.object.tid || !context.object.did))
|
|
108
|
+
|| (context.engine === 'DossierEngine' && !context.object.id)) {
|
|
109
|
+
TMSpinner.hide();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
// Create a new BlogPost object
|
|
113
|
+
const blogPost = new BlogPost();
|
|
114
|
+
// Retrieve the comment from formData, or use an empty string if undefined
|
|
115
|
+
const comment = formData?.comment ?? "";
|
|
116
|
+
// Clean the comment using the sanitizeAndFormatComment function
|
|
117
|
+
const cleanComment = sanitizeAndFormatComment(comment);
|
|
118
|
+
// Assign the cleaned comment as the description for the blog post
|
|
119
|
+
blogPost.description = cleanComment ?? "";
|
|
120
|
+
// If there are file items (attachments), process them
|
|
121
|
+
if (currentDraftAttachments && currentDraftAttachments.length > 0) {
|
|
122
|
+
// Initialize an array to hold the blog post attachments
|
|
123
|
+
const attachment = [];
|
|
124
|
+
currentDraftAttachments.forEach((fileItem) => {
|
|
125
|
+
// Set the necessary properties for the blog post attachment
|
|
126
|
+
const blogPostAttachement = new BlogPostAttachment();
|
|
127
|
+
blogPostAttachement.did = fileItem.did;
|
|
128
|
+
blogPostAttachement.tid = fileItem.tid;
|
|
129
|
+
blogPostAttachement.draftID = fileItem.id;
|
|
130
|
+
// Add the attachment to the array
|
|
131
|
+
attachment.push(blogPostAttachement);
|
|
132
|
+
});
|
|
133
|
+
blogPost.attachments = attachment;
|
|
134
|
+
}
|
|
135
|
+
if (context.engine === 'WorkingGroupEngine' && context.object && context.object.id) {
|
|
136
|
+
// Create an instance of WorkingGroupEngine to interact with the working group
|
|
137
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
138
|
+
// Call the BlogPostAddAsync method to add the blog post to the working group
|
|
139
|
+
const newBlogPostId = await workingGroupEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
140
|
+
await refreshCallback?.();
|
|
141
|
+
if (newBlogPostId && onFilterCreated) {
|
|
142
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
143
|
+
}
|
|
144
|
+
;
|
|
145
|
+
}
|
|
146
|
+
else if (context.engine === 'SearchEngine') {
|
|
147
|
+
// Create an instance of SearchEngine
|
|
148
|
+
const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
|
|
149
|
+
const newBlogPostId = await searchEngine.BlogPostAddAsync(context.object.tid, context.object.did, cleanComment);
|
|
150
|
+
await refreshCallback?.();
|
|
151
|
+
if (newBlogPostId && onFilterCreated) {
|
|
152
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
153
|
+
}
|
|
154
|
+
;
|
|
155
|
+
}
|
|
156
|
+
else if (context.engine === 'DossierEngine' && context.object && context.object.id) {
|
|
157
|
+
// Create an instance of DossierEngine
|
|
158
|
+
const dossierEngine = SDK_Globals.tmSession?.NewDossierEngine();
|
|
159
|
+
const newBlogPostId = await dossierEngine.BlogPostAddAsync(context.object.id, blogPost);
|
|
160
|
+
await refreshCallback?.();
|
|
161
|
+
if (newBlogPostId && onFilterCreated) {
|
|
162
|
+
onFilterCreated(post => post.id === newBlogPostId);
|
|
163
|
+
}
|
|
164
|
+
;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
// If any error occurs during the try block execution, display the exception in an error box
|
|
169
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
// Hide the loading spinner and close the operation (e.g., close a modal or cleanup)
|
|
173
|
+
TMSpinner.hide();
|
|
174
|
+
onClose();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const onCloseCallback = () => {
|
|
178
|
+
if (formData && formData?.comment.length > 0) {
|
|
179
|
+
TMMessageBoxManager.show({
|
|
180
|
+
parentId: "TMSaveFormShowConfirmForClose-1",
|
|
181
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
182
|
+
message: SDKUI_Localizator.ConfirmOnCancel,
|
|
183
|
+
onButtonClick(e) {
|
|
184
|
+
if (e !== ButtonNames.YES)
|
|
185
|
+
return;
|
|
186
|
+
setFormData(undefined);
|
|
187
|
+
if (onClose)
|
|
188
|
+
onClose();
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
setFormData(undefined);
|
|
194
|
+
if (onClose)
|
|
195
|
+
onClose();
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
const toggleEditorMode = () => {
|
|
199
|
+
setIsEditorEnabled((prev) => !prev);
|
|
200
|
+
};
|
|
201
|
+
const onValueChanged = (e) => {
|
|
202
|
+
// Clean the value by:
|
|
203
|
+
// 1. Removing any <span> tags (both opening and closing) using regex
|
|
204
|
+
// 2. Replacing HTML non-breaking spaces ( ) with regular spaces
|
|
205
|
+
const cleaned = e.value.replace(/<span[^>]*>|<\/span>/g, '').replace(/ /g, ' ');
|
|
206
|
+
// Update the formData state by copying the existing data
|
|
207
|
+
// and setting the `comment` field to the cleaned value
|
|
208
|
+
setFormData({ ...formData, comment: cleaned });
|
|
209
|
+
};
|
|
210
|
+
const removeAttachment = (attachment) => {
|
|
211
|
+
setCurrentDraftAttachments(prev => prev.filter(item => item.id !== attachment.id));
|
|
212
|
+
};
|
|
213
|
+
const onChoose = (selectedDraftItemsIds) => {
|
|
214
|
+
// Find the file items corresponding to the selected IDs
|
|
215
|
+
const selectedDraftItems = selectedDraftItemsIds.map(id => dataSource.find(file => file.id === id)).filter((item) => !!item); // Filter out undefined
|
|
216
|
+
// Update the state with selected draft items
|
|
217
|
+
setCurrentDraftAttachments(selectedDraftItems);
|
|
218
|
+
};
|
|
219
|
+
return _jsx(TMSaveForm, { id: 1, title: SDKUI_Localizator.AddNewComment, showTitleFormMode: false, showErrorCount: false, customSaveButton: _jsx("i", { className: 'dx-icon-send' }), customTooltipSaveButton: SDKUI_Localizator.Send, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', formMode: FormModes.Create, validationItems: validationItems, exception: exception, isModified: calcIsModified(formData, formDataOrig), onSaveAsync: onSaveAsync, onClose: onCloseCallback, customToolbarElements: _jsx("div", { style: { display: 'flex', gap: '2px' }, children: _jsx(TMButton, { btnStyle: "toolbar", icon: isEditorEnabled ? _jsx("i", { className: 'dx-icon-font' }) : _jsx("i", { className: 'dx-icon-background' }), caption: isEditorEnabled ? SDKUI_Localizator.HideFormattingOptions : SDKUI_Localizator.ShowFormattingOptions, onClick: toggleEditorMode }) }), children: _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx("div", { style: { width: "100%", height: showAttachmentsSection ? "calc(100% - 60px)" : "100%" }, children: _jsx(TMHtmlEditor, { width: '100%', height: '100%', isEditorEnabled: isEditorEnabled, validationItems: validationItems, onValueChanged: onValueChanged, mentionsConfig: mentionsConfig, autoFocus: true, maxLength: maxLength }) }), showAttachmentsSection && _jsxs("div", { style: { display: 'flex', alignItems: 'center', height: '60px', marginTop: '10px' }, children: [_jsx("div", { style: {
|
|
220
|
+
width: 'calc(100% - 60px)',
|
|
221
|
+
overflowX: 'auto',
|
|
222
|
+
whiteSpace: 'nowrap',
|
|
223
|
+
height: '50px',
|
|
224
|
+
border: '1px solid #ccc',
|
|
225
|
+
borderRadius: '8px',
|
|
226
|
+
backgroundColor: '#fafafa',
|
|
227
|
+
display: 'flex',
|
|
228
|
+
alignItems: 'center',
|
|
229
|
+
padding: '0 8px',
|
|
230
|
+
}, children: currentDraftAttachments.length > 0 ? (currentDraftAttachments.map(draft => {
|
|
231
|
+
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", draft.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", draft.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", draft.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(draft.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.lastUpdateTime)] })] }));
|
|
232
|
+
return _jsxs("div", { style: {
|
|
233
|
+
display: 'inline-flex',
|
|
234
|
+
alignItems: 'center', // <-- this centers content vertically
|
|
235
|
+
padding: '4px 8px',
|
|
236
|
+
margin: '4px',
|
|
237
|
+
border: '1px solid #ddd',
|
|
238
|
+
borderRadius: '8px',
|
|
239
|
+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
|
|
240
|
+
cursor: 'pointer',
|
|
241
|
+
fontSize: '0.9rem',
|
|
242
|
+
backgroundColor: '#fff',
|
|
243
|
+
}, onMouseEnter: (e) => {
|
|
244
|
+
e.currentTarget.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.15)';
|
|
245
|
+
e.currentTarget.style.backgroundColor = '#cfcfcf';
|
|
246
|
+
}, onMouseLeave: (e) => {
|
|
247
|
+
e.currentTarget.style.boxShadow = '0 2px 4px rgba(0, 0, 0, 0.1)';
|
|
248
|
+
e.currentTarget.style.backgroundColor = '#fff';
|
|
249
|
+
}, children: [draft.ext ? (_jsx("span", { style: { marginRight: '10px', display: 'flex', alignItems: 'center' }, children: getFileIcon(draft.ext, undefined, tooltipContent) })) : (_jsx(IconAttachment, { style: { marginRight: '5px' } })), _jsx("span", { style: { marginRight: '8px', display: 'flex', alignItems: 'center' }, children: draft.name }), draft.version && (_jsx("span", { style: {
|
|
250
|
+
display: 'inline-flex',
|
|
251
|
+
width: '20px',
|
|
252
|
+
height: '20px',
|
|
253
|
+
alignItems: 'center',
|
|
254
|
+
justifyContent: 'center',
|
|
255
|
+
backgroundColor: '#28a745',
|
|
256
|
+
color: '#fff',
|
|
257
|
+
borderRadius: '30px',
|
|
258
|
+
fontWeight: 'bold',
|
|
259
|
+
marginRight: '8px',
|
|
260
|
+
boxShadow: '1px 1px 2px #00000020',
|
|
261
|
+
}, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: draft.version }) })), _jsx(TMTooltip, { content: SDKUI_Localizator.RemoveAttachment, children: _jsx("span", { onClick: () => removeAttachment(draft), style: {
|
|
262
|
+
display: 'inline-flex',
|
|
263
|
+
width: '20px',
|
|
264
|
+
height: '20px',
|
|
265
|
+
alignItems: 'center',
|
|
266
|
+
justifyContent: 'center',
|
|
267
|
+
color: '#000',
|
|
268
|
+
border: '1px solid #000',
|
|
269
|
+
borderRadius: '30px',
|
|
270
|
+
cursor: 'pointer',
|
|
271
|
+
boxShadow: '1px 1px 2px #00000020',
|
|
272
|
+
}, children: _jsx("span", { style: { fontSize: '15px' }, children: "\u00D7" }) }) })] }, draft.did);
|
|
273
|
+
})) : (_jsx("div", { style: { color: '#999', width: '100%', textAlign: 'center' }, children: SDKUI_Localizator.NoAttachments })) }), _jsx(TMTooltip, { content: SDKUI_Localizator.Attachments + ": " + currentDraftAttachments.length, children: _jsxs("div", { style: { position: 'relative', display: 'inline-block' }, children: [_jsx("i", { className: "dx-icon-attach", style: {
|
|
274
|
+
width: '50px',
|
|
275
|
+
height: '50px',
|
|
276
|
+
marginLeft: '10px',
|
|
277
|
+
fontSize: '20px',
|
|
278
|
+
cursor: 'pointer',
|
|
279
|
+
border: '1px solid #ccc',
|
|
280
|
+
borderRadius: '8px',
|
|
281
|
+
backgroundColor: '#f9f9f9',
|
|
282
|
+
display: 'flex',
|
|
283
|
+
alignItems: 'center',
|
|
284
|
+
justifyContent: 'center',
|
|
285
|
+
transition: 'all 0.2s ease-in-out',
|
|
286
|
+
}, onMouseOver: (e) => (e.currentTarget.style.backgroundColor = '#e6f7ff'), onMouseOut: (e) => (e.currentTarget.style.backgroundColor = '#f9f9f9'), onClick: () => setShowAttachmentsForm(true) }), currentDraftAttachments.length > 0 && (_jsx("span", { style: {
|
|
287
|
+
position: 'absolute',
|
|
288
|
+
top: '-5px',
|
|
289
|
+
right: '-5px',
|
|
290
|
+
backgroundColor: '#203E5A',
|
|
291
|
+
color: 'white',
|
|
292
|
+
borderRadius: '50%',
|
|
293
|
+
minWidth: '20px',
|
|
294
|
+
height: '20px',
|
|
295
|
+
display: 'flex',
|
|
296
|
+
alignItems: 'center',
|
|
297
|
+
justifyContent: 'center',
|
|
298
|
+
padding: '0 6px',
|
|
299
|
+
fontSize: '12px',
|
|
300
|
+
fontWeight: 'bold',
|
|
301
|
+
}, children: currentDraftAttachments.length > 99 ? '99+' : currentDraftAttachments.length }))] }) })] })] }), showAttachmentsForm && _jsx(TMAttachmentsView, { dataSource: dataSource, selectedIDs: currentDraftAttachments.map(draft => draft.id), onChoose: onChoose, onClose: () => setShowAttachmentsForm(false) })] }) });
|
|
302
|
+
};
|
|
303
|
+
export default TMBlogCommentForm;
|
|
304
|
+
const TMAttachmentsView = (props) => {
|
|
305
|
+
const { dataSource, selectedIDs, onChoose, onClose } = props;
|
|
306
|
+
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
307
|
+
const deviceType = useDeviceType();
|
|
308
|
+
const cellExtRender = useCallback((cellData) => {
|
|
309
|
+
const data = cellData.data;
|
|
310
|
+
return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: getFileIcon(data.ext, data.version) });
|
|
311
|
+
}, []);
|
|
312
|
+
const cellDatetimeRender = useCallback((cellData) => {
|
|
313
|
+
const { value } = cellData;
|
|
314
|
+
const formattedDate = value ? new Date(value).toLocaleString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit' }) : '';
|
|
315
|
+
return _jsx("div", { children: formattedDate });
|
|
316
|
+
}, []);
|
|
317
|
+
const cellSizeRender = useCallback((cellData) => {
|
|
318
|
+
const data = cellData.data;
|
|
319
|
+
return formatBytes(data.size ?? 0);
|
|
320
|
+
}, []);
|
|
321
|
+
const dataColumns = useMemo(() => {
|
|
322
|
+
return ([
|
|
323
|
+
{ dataField: "ext", caption: SDKUI_Localizator.Extension, cellRender: cellExtRender },
|
|
324
|
+
{ dataField: "name", caption: SDKUI_Localizator.Name, sortOrder: 'asc' },
|
|
325
|
+
{ dataField: "version", caption: SDKUI_Localizator.Version },
|
|
326
|
+
{ dataField: "size", caption: SDKUI_Localizator.Size, cellRender: cellSizeRender },
|
|
327
|
+
{ dataField: "updaterName", caption: SDKUI_Localizator.Author },
|
|
328
|
+
{ dataField: "lastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
329
|
+
{ dataField: "creationTime", caption: SDKUI_Localizator.CreationTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm', cellRender: cellDatetimeRender },
|
|
330
|
+
]);
|
|
331
|
+
}, []);
|
|
332
|
+
return _jsx(TMChooserForm, { title: SDKUI_Localizator.Attachments, allowMultipleSelection: true, allowApplyWithZeroSelection: true, startWithShowOnlySelectedItems: true, hasShowOnlySelectedItems: false, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: "500px", manageUseLocalizedName: false, columns: dataColumns, showDefaultColumns: false, selectedIDs: selectedIDs, dataSource: dataSource, hasShowId: true, hideRefresh: false, onClose: onClose, onChoose: onChoose });
|
|
333
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DcmtInfo } from '../../../ts';
|
|
3
|
+
interface ITMBatchUpdateFormProps {
|
|
4
|
+
inputDcmts: DcmtInfo[];
|
|
5
|
+
TID: number | undefined;
|
|
6
|
+
DID: number | undefined;
|
|
7
|
+
isExpertMode?: boolean;
|
|
8
|
+
isModal?: boolean;
|
|
9
|
+
titleModal?: string;
|
|
10
|
+
widthModal?: string;
|
|
11
|
+
heightModal?: string;
|
|
12
|
+
onBack?: () => void;
|
|
13
|
+
onSavedCallbackAsync?: () => Promise<void>;
|
|
14
|
+
onStatusChanged?: (isModified: boolean, isValid: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const TMBatchUpdateForm: React.FC<ITMBatchUpdateFormProps>;
|
|
17
|
+
export default TMBatchUpdateForm;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { AccessLevels, DcmtTypeListCacheService, LayoutModes, MetadataDataDomains, ResultTypes, SDK_Globals, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
4
|
+
import { searchResultToMetadataValues, getSystemMetadata, calcIsModified, getListMaxItems, SDKUI_Localizator, SDKUI_Globals } from '../../../helper';
|
|
5
|
+
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
6
|
+
import { DcmtOperationTypes, FormModes } from '../../../ts';
|
|
7
|
+
import { StyledToolbarCardContainer, StyledFormButtonsContainer } from '../../base/Styled';
|
|
8
|
+
import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
|
|
9
|
+
import { TMSplitterLayout } from '../../base/TMLayout';
|
|
10
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
11
|
+
import TMShowAllOrMaxItemsButton from '../../base/TMShowAllOrMaxItemsButton';
|
|
12
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
13
|
+
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
|
14
|
+
import TMDistinctValues from '../../choosers/TMDistinctValues';
|
|
15
|
+
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '../../editors/TMFormulaEditor';
|
|
16
|
+
import { useMetadataEditableList } from '../../editors/TMMetadataEditor';
|
|
17
|
+
import TMMetadataValues, { ShowCheckBoxesMode, AdvancedMenuButtons } from '../../editors/TMMetadataValues';
|
|
18
|
+
import { TMSaveFormButtonSave, TMSaveFormButtonUndo } from '../../forms/TMSaveForm';
|
|
19
|
+
import TMPanel from '../../base/TMPanel';
|
|
20
|
+
import TMModal from '../../base/TMModal';
|
|
21
|
+
import { Gutters, TMColors } from '../../../utils/theme';
|
|
22
|
+
const TMBatchUpdateForm = ({ inputDcmts, TID, DID, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", onSavedCallbackAsync, onBack, onStatusChanged }) => {
|
|
23
|
+
const [metadataValues, setMetadataValues] = useState([]);
|
|
24
|
+
const [metadataValuesOrig, setMetadataValuesOrig] = useState([]);
|
|
25
|
+
const [validationItems, setValidationItems] = useState([]);
|
|
26
|
+
const [showAll, setShowAll] = useState(false);
|
|
27
|
+
const [showDistinctValuesPanel, setShowDistinctValuesPanel] = useState(false);
|
|
28
|
+
const [showFormulaEditor, setShowFormulaEditor] = useState(false);
|
|
29
|
+
const [focusedMetadataValue, setFocusedMetadataValue] = useState();
|
|
30
|
+
const [addOrRemoveEditableList] = useMetadataEditableList();
|
|
31
|
+
const { abortController, runOperationAsync, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary } = useDcmtOperations();
|
|
32
|
+
const deviceType = useDeviceType();
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!TID)
|
|
35
|
+
return;
|
|
36
|
+
if (!DID)
|
|
37
|
+
return;
|
|
38
|
+
if (isModified)
|
|
39
|
+
return;
|
|
40
|
+
retrieveMetadataAsync();
|
|
41
|
+
}, [TID, DID]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
validateAsync();
|
|
44
|
+
onStatusChanged?.(isModified, validationItems.findIndex(o => o.ResultType != ResultTypes.SUCCESS) >= 0);
|
|
45
|
+
}, [metadataValues]);
|
|
46
|
+
const validateAsync = async () => {
|
|
47
|
+
let vil = [];
|
|
48
|
+
if (metadataValues.filter(o => o.isSelected).length <= 0)
|
|
49
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, "isSelectd", `${'Selezionare almeno un metadato da aggiornare'}`));
|
|
50
|
+
else {
|
|
51
|
+
for (const mvd of metadataValues) {
|
|
52
|
+
if (!mvd.isSelected)
|
|
53
|
+
continue;
|
|
54
|
+
if (!mvd.value && !mvd.isNull)
|
|
55
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, mvd.md?.nameLoc ?? "", `Specificare un valore (${mvd.md?.nameLoc})`));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
setValidationItems(vil);
|
|
59
|
+
};
|
|
60
|
+
const retrieveMetadataAsync = async () => {
|
|
61
|
+
try {
|
|
62
|
+
await DcmtTypeListCacheService.GetAsync(TID).then(async (dtd) => {
|
|
63
|
+
let mdList = dtd?.metadata ?? [];
|
|
64
|
+
await setMetadataListAsync(mdList);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
let err = e;
|
|
69
|
+
TMExceptionBoxManager.show({ exception: err });
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const setMetadataListAsync = async (mdList) => {
|
|
73
|
+
try {
|
|
74
|
+
TMSpinner.show({ description: 'Caricamento metadati...' });
|
|
75
|
+
let res = await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, DID, true);
|
|
76
|
+
let dtd = res?.dtdResult;
|
|
77
|
+
let rows = dtd.rows ? dtd.rows[0] : [];
|
|
78
|
+
let mids = res?.selectMIDs;
|
|
79
|
+
let metadataList = searchResultToMetadataValues(TID, dtd, rows, mids, mdList, LayoutModes.Update)
|
|
80
|
+
.filter(o => o.md?.dataDomain !== MetadataDataDomains.Computed &&
|
|
81
|
+
o.md?.perm?.canUpdate === AccessLevels.Yes &&
|
|
82
|
+
o.md.isSystem !== 1);
|
|
83
|
+
metadataList.forEach(mvd => { mvd.isSelected = false; mvd.isNull = false; });
|
|
84
|
+
setMetadataValuesOrig(structuredClone(metadataList));
|
|
85
|
+
setMetadataValues(structuredClone(metadataList));
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
89
|
+
}
|
|
90
|
+
finally {
|
|
91
|
+
TMSpinner.hide();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const onUndoHandler = () => {
|
|
95
|
+
setMetadataValues(structuredClone(metadataValuesOrig));
|
|
96
|
+
};
|
|
97
|
+
const onSavedAsync = async () => {
|
|
98
|
+
let dcmts = inputDcmts.slice();
|
|
99
|
+
dcmts.forEach(o => o.metadataValues = metadataValues);
|
|
100
|
+
await runOperationAsync(dcmts, DcmtOperationTypes.BatchUpdate, onSavedCallbackAsync);
|
|
101
|
+
};
|
|
102
|
+
const getFormula = () => {
|
|
103
|
+
let fd = new FormulaDescriptor();
|
|
104
|
+
fd.expression = FormulaHelper.isFormula(focusedMetadataValue?.value) ? FormulaHelper.removeFormulaTag(focusedMetadataValue?.value) : undefined;
|
|
105
|
+
fd.formulaTarget = FormulaTargets.BatchUpdate;
|
|
106
|
+
fd.items = FormulaHelper.TreeViewList(TID ?? 0, getSystemMetadata(true), undefined, FormulaTargets.BatchUpdate, SDK_Globals.dbBrand);
|
|
107
|
+
fd.mid = focusedMetadataValue?.mid ?? 0;
|
|
108
|
+
fd.tid = TID;
|
|
109
|
+
return fd;
|
|
110
|
+
};
|
|
111
|
+
const isModified = calcIsModified(metadataValues, metadataValuesOrig);
|
|
112
|
+
const errors = validationItems.filter(o => o.ResultType == ResultTypes.ERROR);
|
|
113
|
+
const listMaxItems = getListMaxItems(deviceType ?? DeviceType.DESKTOP);
|
|
114
|
+
const totalItems = metadataValues.filter(o => o.mid && o.mid > 100).length;
|
|
115
|
+
const metadataValuesSource = metadataValues.filter(o => o.mid && o.mid > 100).slice(0, showAll ? metadataValues.filter(o => o.mid && o.mid > 100).length : listMaxItems);
|
|
116
|
+
const metadataValuesSourceOrig = metadataValuesOrig.filter(o => o.mid && o.mid > 100).slice(0, showAll ? metadataValuesOrig.filter(o => o.mid && o.mid > 100).length : listMaxItems);
|
|
117
|
+
const renderContent = () => {
|
|
118
|
+
return (_jsx(TMLayoutWaitingContainer, { showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, isCancelable: true, abortController: abortController, children: _jsxs(TMSplitterLayout, { direction: 'horizontal', overflow: 'visible', separatorSize: Gutters.getGutters(), separatorColor: 'transparent', separatorActiveColor: 'transparent', showSeparator: showFormulaEditor, start: showFormulaEditor ? ['50%', '50%'] : ['100%', '0%'], min: ['0', '0'], children: [_jsx(TMPanel, { title: isModal ? 'Modifica i metadati' : `${SDKUI_Localizator.BatchUpdate} (${inputDcmts.length} documenti selezionati)`, onBack: deviceType === DeviceType.MOBILE ? onBack : undefined,
|
|
119
|
+
// onClose={deviceType !== DeviceType.MOBILE ? onBack : undefined}
|
|
120
|
+
allowMaximize: !isModal, showHeader: !isModal, children: _jsxs(StyledToolbarCardContainer, { children: [_jsx(TMMetadataValues, { TID: TID, isExpertMode: isExpertMode, showCheckBoxes: ShowCheckBoxesMode.Always, showNullValueCheckBoxes: true, metadataValues: metadataValuesSource, metadataValuesOrig: metadataValuesSourceOrig, validationItems: validationItems, isOpenDistinctValues: showDistinctValuesPanel, selectedMID: focusedMetadataValue?.mid, onFocusedItemChanged: (item) => { setFocusedMetadataValue(item); }, onValueChanged: (newItems) => {
|
|
121
|
+
setMetadataValues((prevItems) => prevItems.map((item) => {
|
|
122
|
+
const newItem = newItems.find((newItem) => newItem.tid === item.tid && newItem.mid === item.mid);
|
|
123
|
+
return newItem ? { ...item, ...newItem } : item;
|
|
124
|
+
}));
|
|
125
|
+
}, onAdvancedMenuClick: (e) => {
|
|
126
|
+
switch (e.button) {
|
|
127
|
+
case AdvancedMenuButtons.DistinctValues:
|
|
128
|
+
setShowDistinctValuesPanel(!showDistinctValuesPanel);
|
|
129
|
+
break;
|
|
130
|
+
case AdvancedMenuButtons.FormulaEditor:
|
|
131
|
+
setShowFormulaEditor(!showFormulaEditor);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
} }), _jsxs(StyledFormButtonsContainer, { children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: 10 }, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(TMSaveFormButtonSave, { showTooltip: false, btnStyle: 'advanced', advancedColor: '#f09c0a', isModified: errors.length <= 0 && isModified, formMode: FormModes.Update, errorsCount: errors.length, onSaveAsync: onSavedAsync }), _jsx(TMSaveFormButtonUndo, { btnStyle: 'toolbar', showTooltip: true, color: 'primary', isModified: isModified, formMode: FormModes.Update, onUndo: onUndoHandler })] }) }), totalItems > listMaxItems && _jsx(TMShowAllOrMaxItemsButton, { showAll: showAll, dataSourceLength: totalItems, onClick: () => { setShowAll(!showAll); } })] }), showDistinctValuesPanel && focusedMetadataValue &&
|
|
135
|
+
_jsx(TMDistinctValues, { isModal: true, tid: TID, mid: focusedMetadataValue?.mid, separator: ', ', allowAppendMode: false, onClosePanelCallback: () => setShowDistinctValuesPanel(false), onSelectionChanged: (e) => {
|
|
136
|
+
if (!e)
|
|
137
|
+
return;
|
|
138
|
+
setMetadataValues((prevItems) => prevItems.map((item) => item.tid == e.tid && item.mid === e.mid ? { ...item, value: e.newValue, isSelected: true } : item));
|
|
139
|
+
} })] }) }), showFormulaEditor && focusedMetadataValue &&
|
|
140
|
+
_jsx(TMPanel, { title: SDKUI_Localizator.FormulaEditorTitle + (focusedMetadataValue?.md?.nameLoc ? ` (${focusedMetadataValue?.md?.nameLoc})` : ''), allowMaximize: !isModal, showHeader: !isModal, onClose: () => setShowFormulaEditor(false), children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }, children: [isModal && (_jsxs("div", { style: { padding: '8px' }, children: [_jsx("div", { style: { fontSize: '1.2em', fontWeight: 'bold', marginBottom: '10px', color: TMColors.primaryColor, padding: '5px' }, children: SDKUI_Localizator.FormulaEditorTitle + (focusedMetadataValue?.md?.nameLoc ? ` (${focusedMetadataValue?.md?.nameLoc})` : '') }), _jsx("hr", { style: { border: 'none', borderTop: '1px solid #00A99D', margin: '0', width: '100%' } }), " "] })
|
|
141
|
+
// <div style={{ marginBottom: '10px', fontSize: '1.2em', fontWeight: 'bold', padding: '10px', color: TMColors.primaryColor, borderBottom: '1px solid #00A99D ' }}>
|
|
142
|
+
// {SDKUI_Localizator.FormulaEditorTitle + (focusedMetadataValue?.md?.nameLoc ? ` (${focusedMetadataValue?.md?.nameLoc})` : '')}
|
|
143
|
+
// </div>
|
|
144
|
+
), _jsx(TMFormulaEditor, { isModal: false, formMode: FormModes.Update, inputData: getFormula(), showBack: false, onClose: () => setShowFormulaEditor(false), onApplied: (newFormula) => {
|
|
145
|
+
setMetadataValues((prevItems) => prevItems.map((item) => item.tid == newFormula.tid && item.mid === newFormula.mid ? { ...item, value: FormulaHelper.addFormulaTag(newFormula.expression), isSelected: true, isEditable: true } : item));
|
|
146
|
+
setFocusedMetadataValue(prevState => ({
|
|
147
|
+
...prevState,
|
|
148
|
+
isSelected: true,
|
|
149
|
+
isEditable: true,
|
|
150
|
+
value: FormulaHelper.addFormulaTag(newFormula.expression)
|
|
151
|
+
}));
|
|
152
|
+
addOrRemoveEditableList(newFormula.mid);
|
|
153
|
+
} })] }) })] }) }));
|
|
154
|
+
};
|
|
155
|
+
return (_jsx(_Fragment, { children: (isModal && onBack)
|
|
156
|
+
? _jsx(TMModal, { title: titleModal, onClose: onBack, width: widthModal ?? '100%', height: heightModal ?? '100%', hidePopup: false, askClosingConfirm: true, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block', padding: "4px" }, children: renderContent() }) })
|
|
157
|
+
: renderContent() }));
|
|
158
|
+
};
|
|
159
|
+
export default TMBatchUpdateForm;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
interface ITMDcmtBlogProps {
|
|
4
|
+
blogsDatasource: HomeBlogPost[];
|
|
5
|
+
setBlogsDatasource: (posts: HomeBlogPost[]) => void;
|
|
6
|
+
hasLoadedDataOnce: boolean;
|
|
7
|
+
setHasLoadedDataOnce: (loaded: boolean) => void;
|
|
8
|
+
lastLoadedDid: number | undefined;
|
|
9
|
+
setLastLoadedDid: (did: number | undefined) => void;
|
|
10
|
+
tid: number | undefined;
|
|
11
|
+
did: number | undefined;
|
|
12
|
+
fetchBlogDataAsync: (tid: number | undefined, did: number | undefined) => Promise<void>;
|
|
13
|
+
isVisible?: boolean;
|
|
14
|
+
allTasks?: Array<TaskDescriptor>;
|
|
15
|
+
getAllTasks?: () => Promise<void>;
|
|
16
|
+
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
17
|
+
addTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
18
|
+
editTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
19
|
+
handleNavigateToWGs?: (value: HomeBlogPost | number) => Promise<void>;
|
|
20
|
+
handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
declare const TMDcmtBlog: React.FC<ITMDcmtBlogProps>;
|
|
23
|
+
export default TMDcmtBlog;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
5
|
+
import { TMNothingToShow } from './TMDcmtPreview';
|
|
6
|
+
import { IconBoard, SDKUI_Localizator } from '../../../helper';
|
|
7
|
+
import TMBlogCommentForm from '../blog/TMBlogCommentForm';
|
|
8
|
+
import TMBlogsPost from '../../grids/TMBlogsPost';
|
|
9
|
+
const TMDcmtBlog = ({ blogsDatasource, setBlogsDatasource, hasLoadedDataOnce, setHasLoadedDataOnce, lastLoadedDid, setLastLoadedDid, tid, did, fetchBlogDataAsync, isVisible, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers }) => {
|
|
10
|
+
// State to manage show comment form selected file
|
|
11
|
+
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
12
|
+
const [externalBlogPost, setExternalBlogPost] = useState(undefined);
|
|
13
|
+
const showCommentFormCallback = useCallback(() => {
|
|
14
|
+
setShowCommentForm(true);
|
|
15
|
+
}, []);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!tid || !did) {
|
|
18
|
+
setBlogsDatasource([]);
|
|
19
|
+
setLastLoadedDid(undefined); // Reset per consentire un nuovo caricamento quando tid/did diventano validi
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// Condizione per eseguire il fetch:
|
|
23
|
+
// 1. Il pannello è visibile
|
|
24
|
+
// 2. E (non abbiamo ancora caricato dati O il `did` è cambiato rispetto all'ultima volta)
|
|
25
|
+
const shouldFetch = isVisible && (!hasLoadedDataOnce || did !== lastLoadedDid);
|
|
26
|
+
// Esegui la chiamata API solo se il pannello è visibile E i dati non sono già stati caricati
|
|
27
|
+
// O, se vuoi ricaricare ogni volta che diventa visibile (ma è meno efficiente per "pesante")
|
|
28
|
+
if (shouldFetch) {
|
|
29
|
+
fetchBlogDataAsync(tid, did);
|
|
30
|
+
}
|
|
31
|
+
}, [tid, did, isVisible, hasLoadedDataOnce, lastLoadedDid]);
|
|
32
|
+
const refreshCallback = async () => {
|
|
33
|
+
await fetchBlogDataAsync(tid, did);
|
|
34
|
+
};
|
|
35
|
+
const resetExternalBlogPost = useCallback(() => {
|
|
36
|
+
setExternalBlogPost(undefined);
|
|
37
|
+
}, []);
|
|
38
|
+
const handleFilterCreated = async (predicate) => {
|
|
39
|
+
await refreshCallback();
|
|
40
|
+
const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
41
|
+
if (res && res.length > 0) {
|
|
42
|
+
setBlogsDatasource(res ?? []);
|
|
43
|
+
const firstMatchingPost = res.find(predicate);
|
|
44
|
+
if (firstMatchingPost)
|
|
45
|
+
setExternalBlogPost(firstMatchingPost);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return (_jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(StyledContainer, { children: _jsx(StyledSectionContainer, { style: { position: 'relative' }, children: _jsx(StyledBoardContainer, { children: !did ? _jsx(TMNothingToShow, { text: `${SDKUI_Localizator.NoDcmtSelected}.`, secondText: `${SDKUI_Localizator.BlogCase} - ${SDKUI_Localizator.NotAvailable}`, icon: _jsx(IconBoard, { fontSize: 96 }) }) :
|
|
49
|
+
_jsx(TMBlogsPost, { context: { engine: 'SearchEngine', object: { tid, did } }, id: "dcmt-blog", displayMode: 'chat', scrollToSelected: true, posts: blogsDatasource, showExtendedAttachments: false, showFloatingCommentButton: true, showCommentFormCallback: showCommentFormCallback, refreshCallback: refreshCallback, contextMenuParams: {
|
|
50
|
+
isShowHideFilterEnabled: true,
|
|
51
|
+
isShowHideIDEnaled: true,
|
|
52
|
+
isCommentEnabled: true,
|
|
53
|
+
isDownloadAttachmentEnabled: false,
|
|
54
|
+
isViewEditMetadata: false,
|
|
55
|
+
isDeleteEnabled: true,
|
|
56
|
+
isCopyToClipboardEnabled: true,
|
|
57
|
+
isRefreshEnabled: true,
|
|
58
|
+
isRestoreEnabled: true,
|
|
59
|
+
isCreateContextualTask: false
|
|
60
|
+
}, externalBlogPost: externalBlogPost, resetExternalBlogPost: resetExternalBlogPost, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }) }) }), (showCommentForm && tid && did) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid, did } }, onClose: () => setShowCommentForm(false), refreshCallback: refreshCallback, participants: [], showAttachmentsSection: false, allArchivedDocumentsFileItems: [], onFilterCreated: handleFilterCreated })] }));
|
|
61
|
+
};
|
|
62
|
+
export default TMDcmtBlog;
|
|
63
|
+
const StyledContainer = styled.div ` user-select: none; overflow: hidden; background-color: #ffffff; width: calc(100%); height: calc(100%); display: flex; gap: 10px; `;
|
|
64
|
+
const StyledSectionContainer = styled.div ` width: 100%; height: 100%; display:flex; flex-direction: column; `;
|
|
65
|
+
const StyledBoardContainer = styled.div `width: 100%; height: 100%;`;
|