@topconsultnpm/sdkui-react 6.20.0-dev1.14 → 6.20.0-dev1.15
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/package.json +1 -1
- package/lib/assets/IconsS4t/add.svg +0 -12
- package/lib/assets/IconsS4t/aggiorna.svg +0 -18
- package/lib/assets/IconsS4t/bookmark.svg +0 -42
- package/lib/assets/IconsS4t/cancella.svg +0 -15
- package/lib/assets/IconsS4t/check-box.svg +0 -19
- package/lib/assets/IconsS4t/down-arrow-signBook.svg +0 -40
- package/lib/assets/IconsS4t/down.svg +0 -28
- package/lib/assets/IconsS4t/edit-file.svg +0 -19
- package/lib/assets/IconsS4t/edita.svg +0 -32
- package/lib/assets/IconsS4t/firma.svg +0 -19
- package/lib/assets/IconsS4t/icona_download.svg +0 -16
- package/lib/assets/IconsS4t/info.svg +0 -51
- package/lib/assets/IconsS4t/left.svg +0 -20
- package/lib/assets/IconsS4t/line.svg +0 -40
- package/lib/assets/IconsS4t/more.svg +0 -19
- package/lib/assets/IconsS4t/new-signature.svg +0 -1
- package/lib/assets/IconsS4t/plus.svg +0 -23
- package/lib/assets/IconsS4t/printer.svg +0 -49
- package/lib/assets/IconsS4t/radio-on-button.svg +0 -25
- package/lib/assets/IconsS4t/rectangle.svg +0 -41
- package/lib/assets/IconsS4t/redo.svg +0 -19
- package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +0 -40
- package/lib/assets/IconsS4t/right-arrow-signBook.svg +0 -40
- package/lib/assets/IconsS4t/right.svg +0 -22
- package/lib/assets/IconsS4t/searchbar.svg +0 -21
- package/lib/assets/IconsS4t/text-box.svg +0 -36
- package/lib/assets/IconsS4t/tick.svg +0 -8
- package/lib/assets/IconsS4t/trash-white.svg +0 -11
- package/lib/assets/IconsS4t/trash.svg +0 -1
- package/lib/assets/IconsS4t/undo.svg +0 -19
- package/lib/assets/IconsS4t/up.svg +0 -32
- package/lib/assets/IconsS4t/video-streaming.svg +0 -2
- package/lib/assets/IconsS4t/zoom-in.svg +0 -58
- package/lib/assets/IconsS4t/zoom-out.svg +0 -56
- 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 +0 -1
- package/lib/assets/german.svg +0 -1
- package/lib/assets/icomoon.eot +0 -0
- package/lib/assets/icomoon.svg +0 -97
- package/lib/assets/icomoon.ttf +0 -0
- package/lib/assets/icomoon.woff +0 -0
- package/lib/assets/italy.svg +0 -16
- 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 +0 -1
- package/lib/assets/six.png +0 -0
- package/lib/assets/six.svg +0 -4
- package/lib/assets/spain.svg +0 -1
- 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 +0 -19
- package/lib/assets/thumbnails/index.js +0 -19
- package/lib/assets/thumbnails/index.ts +0 -39
- 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 +0 -66
- package/lib/assets/topmeida-six-bianco.svg +0 -66
- package/lib/assets/united-kingdom.svg +0 -1
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +0 -4
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +0 -187
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +0 -11
- package/lib/components/NewComponents/ContextMenu/hooks.js +0 -48
- package/lib/components/NewComponents/ContextMenu/index.d.ts +0 -2
- package/lib/components/NewComponents/ContextMenu/index.js +0 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +0 -27
- package/lib/components/NewComponents/ContextMenu/styles.js +0 -308
- package/lib/components/NewComponents/ContextMenu/types.d.ts +0 -26
- package/lib/components/NewComponents/ContextMenu/types.js +0 -1
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +0 -4
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +0 -370
- package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +0 -2
- package/lib/components/NewComponents/FloatingMenuBar/index.js +0 -2
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +0 -38
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +0 -267
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +0 -30
- package/lib/components/NewComponents/FloatingMenuBar/types.js +0 -1
- package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
- package/lib/components/NewComponents/Notification/Notification.js +0 -60
- package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
- package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
- package/lib/components/NewComponents/Notification/index.d.ts +0 -2
- package/lib/components/NewComponents/Notification/index.js +0 -2
- package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
- package/lib/components/NewComponents/Notification/styles.js +0 -180
- package/lib/components/NewComponents/Notification/types.d.ts +0 -18
- package/lib/components/NewComponents/Notification/types.js +0 -1
- package/lib/components/base/Styled.d.ts +0 -63
- package/lib/components/base/Styled.js +0 -337
- package/lib/components/base/TMAccordion.d.ts +0 -12
- package/lib/components/base/TMAccordion.js +0 -62
- package/lib/components/base/TMAccordionNew.d.ts +0 -28
- package/lib/components/base/TMAccordionNew.js +0 -326
- package/lib/components/base/TMAlert.d.ts +0 -73
- package/lib/components/base/TMAlert.js +0 -77
- package/lib/components/base/TMAreaManager.d.ts +0 -25
- package/lib/components/base/TMAreaManager.js +0 -733
- package/lib/components/base/TMButton.d.ts +0 -22
- package/lib/components/base/TMButton.js +0 -174
- package/lib/components/base/TMClosableList.d.ts +0 -10
- package/lib/components/base/TMClosableList.js +0 -70
- package/lib/components/base/TMConfirm.d.ts +0 -13
- package/lib/components/base/TMConfirm.js +0 -119
- package/lib/components/base/TMContextMenu.d.ts +0 -25
- package/lib/components/base/TMContextMenu.js +0 -109
- package/lib/components/base/TMContextMenuOLD.d.ts +0 -26
- package/lib/components/base/TMContextMenuOLD.js +0 -56
- package/lib/components/base/TMCounterBar.d.ts +0 -10
- package/lib/components/base/TMCounterBar.js +0 -43
- package/lib/components/base/TMCounterContainer.d.ts +0 -23
- package/lib/components/base/TMCounterContainer.js +0 -58
- package/lib/components/base/TMCustomButton.d.ts +0 -11
- package/lib/components/base/TMCustomButton.js +0 -118
- package/lib/components/base/TMDataGrid.d.ts +0 -56
- package/lib/components/base/TMDataGrid.js +0 -237
- package/lib/components/base/TMDataGridExportForm.d.ts +0 -15
- package/lib/components/base/TMDataGridExportForm.js +0 -215
- package/lib/components/base/TMDeviceProvider.d.ts +0 -15
- package/lib/components/base/TMDeviceProvider.js +0 -41
- package/lib/components/base/TMDropDownMenu.d.ts +0 -23
- package/lib/components/base/TMDropDownMenu.js +0 -45
- package/lib/components/base/TMEditorBase.d.ts +0 -39
- package/lib/components/base/TMEditorBase.js +0 -1
- package/lib/components/base/TMFileManager.d.ts +0 -45
- package/lib/components/base/TMFileManager.js +0 -233
- package/lib/components/base/TMFileManagerDataGridView.d.ts +0 -16
- package/lib/components/base/TMFileManagerDataGridView.js +0 -101
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +0 -18
- package/lib/components/base/TMFileManagerThumbnailItems.js +0 -148
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +0 -19
- package/lib/components/base/TMFileManagerThumbnailsView.js +0 -46
- package/lib/components/base/TMFileManagerUtils.d.ts +0 -78
- package/lib/components/base/TMFileManagerUtils.js +0 -207
- package/lib/components/base/TMFloatingToolbar.d.ts +0 -9
- package/lib/components/base/TMFloatingToolbar.js +0 -101
- package/lib/components/base/TMLayout.d.ts +0 -55
- package/lib/components/base/TMLayout.js +0 -201
- package/lib/components/base/TMList.d.ts +0 -9
- package/lib/components/base/TMList.js +0 -54
- package/lib/components/base/TMListView.d.ts +0 -42
- package/lib/components/base/TMListView.js +0 -387
- package/lib/components/base/TMModal.d.ts +0 -18
- package/lib/components/base/TMModal.js +0 -115
- package/lib/components/base/TMPanel.d.ts +0 -32
- package/lib/components/base/TMPanel.js +0 -181
- package/lib/components/base/TMPopUp.d.ts +0 -33
- package/lib/components/base/TMPopUp.js +0 -336
- package/lib/components/base/TMProgressBar.d.ts +0 -11
- package/lib/components/base/TMProgressBar.js +0 -32
- package/lib/components/base/TMResizableMenu.d.ts +0 -20
- package/lib/components/base/TMResizableMenu.js +0 -98
- package/lib/components/base/TMRightSidebar.d.ts +0 -19
- package/lib/components/base/TMRightSidebar.js +0 -80
- package/lib/components/base/TMShowAllOrMaxItemsButton.d.ts +0 -8
- package/lib/components/base/TMShowAllOrMaxItemsButton.js +0 -20
- package/lib/components/base/TMSpinner.d.ts +0 -14
- package/lib/components/base/TMSpinner.js +0 -160
- package/lib/components/base/TMTab.d.ts +0 -20
- package/lib/components/base/TMTab.js +0 -42
- package/lib/components/base/TMToggleButton.d.ts +0 -10
- package/lib/components/base/TMToggleButton.js +0 -58
- package/lib/components/base/TMToolbarCard.d.ts +0 -19
- package/lib/components/base/TMToolbarCard.js +0 -51
- package/lib/components/base/TMTooltip.d.ts +0 -14
- package/lib/components/base/TMTooltip.js +0 -20
- package/lib/components/base/TMTreeView.d.ts +0 -32
- package/lib/components/base/TMTreeView.js +0 -356
- package/lib/components/base/TMUserAvatar.d.ts +0 -8
- package/lib/components/base/TMUserAvatar.js +0 -34
- package/lib/components/base/TMVilViewer.d.ts +0 -5
- package/lib/components/base/TMVilViewer.js +0 -22
- package/lib/components/base/TMWaitPanel.d.ts +0 -32
- package/lib/components/base/TMWaitPanel.js +0 -50
- package/lib/components/choosers/TMCultureIDPicker.d.ts +0 -9
- package/lib/components/choosers/TMCultureIDPicker.js +0 -72
- package/lib/components/choosers/TMDataListItemChooser.d.ts +0 -17
- package/lib/components/choosers/TMDataListItemChooser.js +0 -49
- package/lib/components/choosers/TMDataListItemPicker.d.ts +0 -9
- package/lib/components/choosers/TMDataListItemPicker.js +0 -96
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +0 -25
- package/lib/components/choosers/TMDcmtTypeChooser.js +0 -61
- package/lib/components/choosers/TMDiskChooser.d.ts +0 -10
- package/lib/components/choosers/TMDiskChooser.js +0 -41
- package/lib/components/choosers/TMDistinctValues.d.ts +0 -21
- package/lib/components/choosers/TMDistinctValues.js +0 -140
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +0 -40
- package/lib/components/choosers/TMDynDataListItemChooser.js +0 -160
- package/lib/components/choosers/TMGroupChooser.d.ts +0 -7
- package/lib/components/choosers/TMGroupChooser.js +0 -37
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +0 -4
- package/lib/components/choosers/TMInvoiceRetrieveFormats.js +0 -22
- package/lib/components/choosers/TMMetadataChooser.d.ts +0 -54
- package/lib/components/choosers/TMMetadataChooser.js +0 -157
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +0 -4
- package/lib/components/choosers/TMOrderRetrieveFormats.js +0 -22
- package/lib/components/choosers/TMPathChooser.d.ts +0 -12
- package/lib/components/choosers/TMPathChooser.js +0 -147
- package/lib/components/choosers/TMRelationChooser.d.ts +0 -31
- package/lib/components/choosers/TMRelationChooser.js +0 -94
- package/lib/components/choosers/TMUserChooser.d.ts +0 -44
- package/lib/components/choosers/TMUserChooser.js +0 -157
- package/lib/components/editors/TMCheckBox.d.ts +0 -9
- package/lib/components/editors/TMCheckBox.js +0 -90
- package/lib/components/editors/TMDateBox.d.ts +0 -17
- package/lib/components/editors/TMDateBox.js +0 -75
- package/lib/components/editors/TMDropDown.d.ts +0 -10
- package/lib/components/editors/TMDropDown.js +0 -62
- package/lib/components/editors/TMEditorStyled.d.ts +0 -41
- package/lib/components/editors/TMEditorStyled.js +0 -90
- package/lib/components/editors/TMFormulaEditor.d.ts +0 -49
- package/lib/components/editors/TMFormulaEditor.js +0 -727
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +0 -7
- package/lib/components/editors/TMHtmlContentDisplay.js +0 -78
- package/lib/components/editors/TMHtmlEditor.d.ts +0 -38
- package/lib/components/editors/TMHtmlEditor.js +0 -203
- package/lib/components/editors/TMLocalizedTextBox.d.ts +0 -19
- package/lib/components/editors/TMLocalizedTextBox.js +0 -125
- package/lib/components/editors/TMMetadataEditor.d.ts +0 -29
- package/lib/components/editors/TMMetadataEditor.js +0 -140
- package/lib/components/editors/TMMetadataValues.d.ts +0 -46
- package/lib/components/editors/TMMetadataValues.js +0 -593
- package/lib/components/editors/TMRadioButton.d.ts +0 -10
- package/lib/components/editors/TMRadioButton.js +0 -57
- package/lib/components/editors/TMSummary.d.ts +0 -20
- package/lib/components/editors/TMSummary.js +0 -92
- package/lib/components/editors/TMTextArea.d.ts +0 -18
- package/lib/components/editors/TMTextArea.js +0 -189
- package/lib/components/editors/TMTextBox.d.ts +0 -20
- package/lib/components/editors/TMTextBox.js +0 -279
- package/lib/components/editors/TMTextExpression.d.ts +0 -25
- package/lib/components/editors/TMTextExpression.js +0 -182
- package/lib/components/editors/TMTreeDropDown.d.ts +0 -18
- package/lib/components/editors/TMTreeDropDown.js +0 -66
- package/lib/components/features/archive/TMArchive.d.ts +0 -29
- package/lib/components/features/archive/TMArchive.js +0 -193
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +0 -30
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +0 -482
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +0 -9
- package/lib/components/features/assistant/ToppySpeechBubble.js +0 -117
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +0 -19
- package/lib/components/features/blog/TMBlogCommentForm.js +0 -345
- package/lib/components/features/documents/TMBatchUpdateForm.d.ts +0 -17
- package/lib/components/features/documents/TMBatchUpdateForm.js +0 -159
- package/lib/components/features/documents/TMDcmtBlog.d.ts +0 -17
- package/lib/components/features/documents/TMDcmtBlog.js +0 -92
- package/lib/components/features/documents/TMDcmtForm.d.ts +0 -65
- package/lib/components/features/documents/TMDcmtForm.js +0 -1491
- package/lib/components/features/documents/TMDcmtIcon.d.ts +0 -18
- package/lib/components/features/documents/TMDcmtIcon.js +0 -98
- package/lib/components/features/documents/TMDcmtPreview.d.ts +0 -31
- package/lib/components/features/documents/TMDcmtPreview.js +0 -491
- package/lib/components/features/documents/TMDcmtTasks.d.ts +0 -13
- package/lib/components/features/documents/TMDcmtTasks.js +0 -24
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +0 -6
- package/lib/components/features/documents/TMDragDropOverlay.js +0 -97
- package/lib/components/features/documents/TMFileUploader.d.ts +0 -14
- package/lib/components/features/documents/TMFileUploader.js +0 -115
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +0 -26
- package/lib/components/features/documents/TMMasterDetailDcmts.js +0 -288
- package/lib/components/features/documents/TMRelationViewer.d.ts +0 -121
- package/lib/components/features/documents/TMRelationViewer.js +0 -753
- package/lib/components/features/search/TMSavedQueryForm.d.ts +0 -9
- package/lib/components/features/search/TMSavedQueryForm.js +0 -41
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +0 -16
- package/lib/components/features/search/TMSavedQuerySelector.js +0 -226
- package/lib/components/features/search/TMSearch.d.ts +0 -40
- package/lib/components/features/search/TMSearch.js +0 -253
- package/lib/components/features/search/TMSearchQueryEditor.d.ts +0 -15
- package/lib/components/features/search/TMSearchQueryEditor.js +0 -367
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +0 -29
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -437
- package/lib/components/features/search/TMSearchResult.d.ts +0 -53
- package/lib/components/features/search/TMSearchResult.js +0 -1327
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +0 -129
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +0 -16
- package/lib/components/features/search/TMSearchResultFloatingActionButton.js +0 -50
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +0 -11
- package/lib/components/features/search/TMSearchResultsMenuItems.js +0 -714
- package/lib/components/features/search/TMSignSettingsForm.d.ts +0 -9
- package/lib/components/features/search/TMSignSettingsForm.js +0 -621
- package/lib/components/features/search/TMTreeSelector.d.ts +0 -12
- package/lib/components/features/search/TMTreeSelector.js +0 -270
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +0 -18
- package/lib/components/features/search/TMViewHistoryDcmt.js +0 -285
- package/lib/components/features/tasks/TMTaskForm.d.ts +0 -38
- package/lib/components/features/tasks/TMTaskForm.js +0 -392
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +0 -17
- package/lib/components/features/tasks/TMTasksAgenda.js +0 -107
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +0 -21
- package/lib/components/features/tasks/TMTasksCalendar.js +0 -240
- package/lib/components/features/tasks/TMTasksHeader.d.ts +0 -14
- package/lib/components/features/tasks/TMTasksHeader.js +0 -37
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +0 -20
- package/lib/components/features/tasks/TMTasksPanelContent.js +0 -65
- package/lib/components/features/tasks/TMTasksUtils.d.ts +0 -133
- package/lib/components/features/tasks/TMTasksUtils.js +0 -649
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +0 -39
- package/lib/components/features/tasks/TMTasksUtilsView.js +0 -140
- package/lib/components/features/tasks/TMTasksView.d.ts +0 -40
- package/lib/components/features/tasks/TMTasksView.js +0 -566
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +0 -39
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +0 -439
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +0 -42
- package/lib/components/features/workflow/TMWorkflowPopup.js +0 -286
- package/lib/components/features/workflow/diagram/ConnectionComponent.d.ts +0 -14
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +0 -90
- package/lib/components/features/workflow/diagram/ConnectionForm.d.ts +0 -9
- package/lib/components/features/workflow/diagram/ConnectionForm.js +0 -73
- package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +0 -18
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +0 -264
- package/lib/components/features/workflow/diagram/DiagramItemForm.d.ts +0 -10
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +0 -686
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.d.ts +0 -12
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +0 -97
- package/lib/components/features/workflow/diagram/RecipientList.d.ts +0 -27
- package/lib/components/features/workflow/diagram/RecipientList.js +0 -204
- package/lib/components/features/workflow/diagram/WFDiagram.d.ts +0 -9
- package/lib/components/features/workflow/diagram/WFDiagram.js +0 -1698
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +0 -18
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +0 -97
- package/lib/components/features/workflow/diagram/interfaces.d.ts +0 -126
- package/lib/components/features/workflow/diagram/interfaces.js +0 -26
- package/lib/components/features/workflow/diagram/metadataParser.d.ts +0 -14
- package/lib/components/features/workflow/diagram/metadataParser.js +0 -54
- package/lib/components/features/workflow/diagram/queryDescriptorParser.d.ts +0 -3
- package/lib/components/features/workflow/diagram/queryDescriptorParser.js +0 -188
- package/lib/components/features/workflow/diagram/workflowHelpers.d.ts +0 -122
- package/lib/components/features/workflow/diagram/workflowHelpers.js +0 -488
- package/lib/components/features/workflow/diagram/xmlParser.d.ts +0 -10
- package/lib/components/features/workflow/diagram/xmlParser.js +0 -490
- package/lib/components/filesystem/ProgressBar.d.ts +0 -7
- package/lib/components/filesystem/ProgressBar.js +0 -25
- package/lib/components/forms/Login/ChangePassword.d.ts +0 -9
- package/lib/components/forms/Login/ChangePassword.js +0 -22
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +0 -14
- package/lib/components/forms/Login/ChangePasswordInputs.js +0 -80
- package/lib/components/forms/Login/Chooser.d.ts +0 -28
- package/lib/components/forms/Login/Chooser.js +0 -145
- package/lib/components/forms/Login/LOGINLocalizator.d.ts +0 -29
- package/lib/components/forms/Login/LOGINLocalizator.js +0 -247
- package/lib/components/forms/Login/LoginValidatorService.d.ts +0 -50
- package/lib/components/forms/Login/LoginValidatorService.js +0 -162
- package/lib/components/forms/Login/Menu.d.ts +0 -10
- package/lib/components/forms/Login/Menu.js +0 -48
- package/lib/components/forms/Login/OTPReader.d.ts +0 -14
- package/lib/components/forms/Login/OTPReader.js +0 -90
- package/lib/components/forms/Login/PasswordStrengthChecker.d.ts +0 -7
- package/lib/components/forms/Login/PasswordStrengthChecker.js +0 -45
- package/lib/components/forms/Login/RapidAccessLogin.d.ts +0 -25
- package/lib/components/forms/Login/RapidAccessLogin.js +0 -310
- package/lib/components/forms/Login/RecoverPasswordFlow.d.ts +0 -11
- package/lib/components/forms/Login/RecoverPasswordFlow.js +0 -111
- package/lib/components/forms/Login/SelectBox.d.ts +0 -23
- package/lib/components/forms/Login/SelectBox.js +0 -96
- package/lib/components/forms/Login/StepIndicator.d.ts +0 -7
- package/lib/components/forms/Login/StepIndicator.js +0 -19
- package/lib/components/forms/Login/TMLoginForm.d.ts +0 -44
- package/lib/components/forms/Login/TMLoginForm.js +0 -737
- package/lib/components/forms/Login/TextBox.d.ts +0 -27
- package/lib/components/forms/Login/TextBox.js +0 -111
- package/lib/components/forms/TMApplyForm.d.ts +0 -4
- package/lib/components/forms/TMApplyForm.js +0 -105
- package/lib/components/forms/TMChooserForm.d.ts +0 -3
- package/lib/components/forms/TMChooserForm.js +0 -94
- package/lib/components/forms/TMResultDialog.d.ts +0 -20
- package/lib/components/forms/TMResultDialog.js +0 -44
- package/lib/components/forms/TMSaveForm.d.ts +0 -31
- package/lib/components/forms/TMSaveForm.js +0 -168
- package/lib/components/grids/TMBlogAttachments.d.ts +0 -28
- package/lib/components/grids/TMBlogAttachments.js +0 -48
- package/lib/components/grids/TMBlogHeader.d.ts +0 -31
- package/lib/components/grids/TMBlogHeader.js +0 -41
- package/lib/components/grids/TMBlogsPost.d.ts +0 -91
- package/lib/components/grids/TMBlogsPost.js +0 -689
- package/lib/components/grids/TMBlogsPostUtils.d.ts +0 -114
- package/lib/components/grids/TMBlogsPostUtils.js +0 -269
- package/lib/components/grids/TMRecentsManager.d.ts +0 -13
- package/lib/components/grids/TMRecentsManager.js +0 -155
- package/lib/components/grids/TMValidationItemsList.d.ts +0 -6
- package/lib/components/grids/TMValidationItemsList.js +0 -82
- package/lib/components/index.d.ts +0 -116
- package/lib/components/index.js +0 -138
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +0 -10
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +0 -215
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +0 -39
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -257
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +0 -11
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +0 -83
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +0 -21
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +0 -64
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +0 -8
- package/lib/components/layout/panelManager/TMPanelWrapper.js +0 -59
- package/lib/components/layout/panelManager/types.d.ts +0 -42
- package/lib/components/layout/panelManager/types.js +0 -1
- package/lib/components/layout/panelManager/utils.d.ts +0 -21
- package/lib/components/layout/panelManager/utils.js +0 -208
- package/lib/components/pages/TMPage.d.ts +0 -38
- package/lib/components/pages/TMPage.js +0 -220
- package/lib/components/query/TMQueryEditor.d.ts +0 -58
- package/lib/components/query/TMQueryEditor.js +0 -1001
- package/lib/components/query/TMQuerySummary.d.ts +0 -16
- package/lib/components/query/TMQuerySummary.js +0 -35
- package/lib/components/settings/SettingsAppearance.d.ts +0 -14
- package/lib/components/settings/SettingsAppearance.js +0 -73
- package/lib/components/sidebar/TMAboutApp.d.ts +0 -8
- package/lib/components/sidebar/TMAboutApp.js +0 -14
- package/lib/components/sidebar/TMCommandsPanel.d.ts +0 -16
- package/lib/components/sidebar/TMCommandsPanel.js +0 -27
- package/lib/components/sidebar/TMHeader.d.ts +0 -43
- package/lib/components/sidebar/TMHeader.js +0 -616
- package/lib/components/sidebar/TMSidebar.d.ts +0 -21
- package/lib/components/sidebar/TMSidebar.js +0 -61
- package/lib/components/sidebar/TMSidebarItem.d.ts +0 -15
- package/lib/components/sidebar/TMSidebarItem.js +0 -39
- package/lib/components/viewers/TMDataListItemViewer.d.ts +0 -10
- package/lib/components/viewers/TMDataListItemViewer.js +0 -80
- package/lib/components/viewers/TMMidViewer.d.ts +0 -36
- package/lib/components/viewers/TMMidViewer.js +0 -128
- package/lib/components/viewers/TMTidViewer.d.ts +0 -256
- package/lib/components/viewers/TMTidViewer.js +0 -343
- package/lib/components/wizard/TMStepIndicator.d.ts +0 -11
- package/lib/components/wizard/TMStepIndicator.js +0 -165
- package/lib/components/wizard/TMWizard.d.ts +0 -18
- package/lib/components/wizard/TMWizard.js +0 -93
- package/lib/css/tm-sdkui.css +0 -1
- package/lib/helper/DeepCompareHelper.d.ts +0 -7
- package/lib/helper/DeepCompareHelper.js +0 -106
- package/lib/helper/Enum_Localizator.d.ts +0 -18
- package/lib/helper/Enum_Localizator.js +0 -247
- package/lib/helper/GlobalStyles.d.ts +0 -2
- package/lib/helper/GlobalStyles.js +0 -10
- package/lib/helper/Globalization.d.ts +0 -15
- package/lib/helper/Globalization.js +0 -110
- package/lib/helper/SDKUI_Globals.d.ts +0 -92
- package/lib/helper/SDKUI_Globals.js +0 -175
- package/lib/helper/SDKUI_Localizator.d.ts +0 -769
- package/lib/helper/SDKUI_Localizator.js +0 -7641
- package/lib/helper/TMCommandsContextMenu.d.ts +0 -14
- package/lib/helper/TMCommandsContextMenu.js +0 -6
- package/lib/helper/TMConditionalWrapper.d.ts +0 -8
- package/lib/helper/TMConditionalWrapper.js +0 -4
- package/lib/helper/TMCustomSearchBar.d.ts +0 -8
- package/lib/helper/TMCustomSearchBar.js +0 -54
- package/lib/helper/TMIcons.d.ts +0 -278
- package/lib/helper/TMIcons.js +0 -690
- package/lib/helper/TMImageLibrary.d.ts +0 -4
- package/lib/helper/TMImageLibrary.js +0 -466
- package/lib/helper/TMToppyMessage.d.ts +0 -8
- package/lib/helper/TMToppyMessage.js +0 -43
- package/lib/helper/TMUtils.d.ts +0 -69
- package/lib/helper/TMUtils.js +0 -435
- package/lib/helper/checkinCheckoutManager.d.ts +0 -55
- package/lib/helper/checkinCheckoutManager.js +0 -266
- package/lib/helper/dcmtsHelper.d.ts +0 -8
- package/lib/helper/dcmtsHelper.js +0 -82
- package/lib/helper/helpers.d.ts +0 -91
- package/lib/helper/helpers.js +0 -852
- package/lib/helper/index.d.ts +0 -14
- package/lib/helper/index.js +0 -14
- package/lib/helper/queryHelper.d.ts +0 -19
- package/lib/helper/queryHelper.js +0 -348
- package/lib/hooks/useDcmtOperations.d.ts +0 -24
- package/lib/hooks/useDcmtOperations.js +0 -486
- package/lib/hooks/useForm.d.ts +0 -24
- package/lib/hooks/useForm.js +0 -157
- package/lib/hooks/useInputDialog.d.ts +0 -9
- package/lib/hooks/useInputDialog.js +0 -105
- package/lib/hooks/useOutsideClick.d.ts +0 -2
- package/lib/hooks/useOutsideClick.js +0 -38
- package/lib/hooks/usePreventFileDrop.d.ts +0 -3
- package/lib/hooks/usePreventFileDrop.js +0 -37
- package/lib/hooks/useQueryParametersDialog.d.ts +0 -2
- package/lib/hooks/useQueryParametersDialog.js +0 -71
- package/lib/hooks/useRelatedDocuments.d.ts +0 -72
- package/lib/hooks/useRelatedDocuments.js +0 -664
- package/lib/hooks/useResizeObserver.d.ts +0 -4
- package/lib/hooks/useResizeObserver.js +0 -22
- package/lib/hooks/useWorkflowApprove.d.ts +0 -11
- package/lib/hooks/useWorkflowApprove.js +0 -57
- package/lib/index.d.ts +0 -12
- package/lib/index.js +0 -15
- package/lib/services/index.d.ts +0 -1
- package/lib/services/index.js +0 -1
- package/lib/services/platform_services.d.ts +0 -18
- package/lib/services/platform_services.js +0 -492
- package/lib/ts/index.d.ts +0 -1
- package/lib/ts/index.js +0 -1
- package/lib/ts/types.d.ts +0 -312
- package/lib/ts/types.js +0 -100
- package/lib/utils/theme.d.ts +0 -69
- package/lib/utils/theme.js +0 -81
|
@@ -1,1491 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import TMDcmtPreview from './TMDcmtPreview';
|
|
4
|
-
import { AccessLevels, ArchiveConstraints, ArchiveEngineByID, DcmtTypeListCacheService, LayoutCacheService, LayoutModes, MetadataDataTypes, ObjectClasses, ResultTypes, SDK_Globals, SDK_Localizator, SystemMIDsAsNumber, SystemTIDs, Task_States, TemplateTIDs, TID_DID, UpdateEngineByID, ValidationItem, WorkflowCacheService, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts';
|
|
5
|
-
import { ContextMenu } from 'devextreme-react';
|
|
6
|
-
import { WorkFlowApproveRejectPopUp, WorkFlowMoreInfoPopUp, WorkFlowOperationButtons, WorkFlowReAssignPopUp } from '../workflow/TMWorkflowPopup';
|
|
7
|
-
import { DownloadTypes, FormModes, DcmtOperationTypes } from '../../../ts';
|
|
8
|
-
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
9
|
-
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
10
|
-
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
11
|
-
import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
|
12
|
-
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, svgToString, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail } from '../../../helper';
|
|
13
|
-
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
14
|
-
import { Gutters, TMColors } from '../../../utils/theme';
|
|
15
|
-
import { StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledReferenceButton, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
|
|
16
|
-
import ShowAlert from '../../base/TMAlert';
|
|
17
|
-
import TMButton from '../../base/TMButton';
|
|
18
|
-
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
|
|
19
|
-
import TMSpinner, { Spinner } from '../../base/TMSpinner';
|
|
20
|
-
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
|
21
|
-
import TMDistinctValues from '../../choosers/TMDistinctValues';
|
|
22
|
-
import TMFormulaEditor, { FormulaDescriptor, FormulaHelper, FormulaTargets } from '../../editors/TMFormulaEditor';
|
|
23
|
-
import TMMetadataValues, { AdvancedMenuButtons } from '../../editors/TMMetadataValues';
|
|
24
|
-
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext, TMSaveFormButtonSave, TMSaveFormButtonUndo } from '../../forms/TMSaveForm';
|
|
25
|
-
import TMShowAllOrMaxItemsButton from '../../base/TMShowAllOrMaxItemsButton';
|
|
26
|
-
import TMFileUploader from '../../features/documents/TMFileUploader';
|
|
27
|
-
import TMMasterDetailDcmts from './TMMasterDetailDcmts';
|
|
28
|
-
import TMDcmtBlog from './TMDcmtBlog';
|
|
29
|
-
import { useInputAttachmentsDialog } from '../../../hooks/useInputDialog';
|
|
30
|
-
import TMModal from '../../base/TMModal';
|
|
31
|
-
import TMChooserForm from '../../forms/TMChooserForm';
|
|
32
|
-
import TMSearchResult from '../search/TMSearchResult';
|
|
33
|
-
import { useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
|
|
34
|
-
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
35
|
-
import { TMPanelManagerWithPersistenceProvider } from '../../layout/panelManager/TMPanelManagerWithPersistenceProvider';
|
|
36
|
-
import { useWorkflowApprove } from '../../../hooks/useWorkflowApprove';
|
|
37
|
-
import TMBlogCommentForm from '../blog/TMBlogCommentForm';
|
|
38
|
-
import WFDiagram from '../workflow/diagram/WFDiagram';
|
|
39
|
-
import TMTooltip from '../../base/TMTooltip';
|
|
40
|
-
import TMDcmtTasks from './TMDcmtTasks';
|
|
41
|
-
import TMToppyMessage from '../../../helper/TMToppyMessage';
|
|
42
|
-
import { getTaskAssignedToMe } from '../tasks/TMTasksUtils';
|
|
43
|
-
import TMCustomButton from '../../base/TMCustomButton';
|
|
44
|
-
import ToppyDraggableHelpCenter from '../assistant/ToppyDraggableHelpCenter';
|
|
45
|
-
let abortControllerLocal = new AbortController();
|
|
46
|
-
//#endregion
|
|
47
|
-
const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, showBackButton = true, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invokedByTodo = false, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, onTaskCreateRequest, inputFile = null, taskFormDialogComponent, taskMoreInfo, connectorFileSave = undefined, inputMids = [], openS4TViewer = false, onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowButtonsRefs = false, onReferenceClick, }) => {
|
|
48
|
-
const [id, setID] = useState('');
|
|
49
|
-
const [showWaitPanelLocal, setShowWaitPanelLocal] = useState(false);
|
|
50
|
-
const [waitPanelTitleLocal, setWaitPanelTitleLocal] = useState('');
|
|
51
|
-
const [showPrimaryLocal, setShowPrimaryLocal] = useState(false);
|
|
52
|
-
const [waitPanelTextPrimaryLocal, setWaitPanelTextPrimaryLocal] = useState('');
|
|
53
|
-
const [waitPanelValuePrimaryLocal, setWaitPanelValuePrimaryLocal] = useState(0);
|
|
54
|
-
const [waitPanelMaxValuePrimaryLocal, setWaitPanelMaxValuePrimaryLocal] = useState(0);
|
|
55
|
-
const [showSecondaryLocal, setShowSecondaryLocal] = useState(false);
|
|
56
|
-
const [waitPanelTextSecondaryLocal, setWaitPanelTextSecondaryLocal] = useState('');
|
|
57
|
-
const [waitPanelValueSecondaryLocal, setWaitPanelValueSecondaryLocal] = useState(0);
|
|
58
|
-
const [waitPanelMaxValueSecondaryLocal, setWaitPanelMaxValueSecondaryLocal] = useState(0);
|
|
59
|
-
const [useWaitPanelLocalState, setUseWaitPanelLocalState] = useState(false);
|
|
60
|
-
const [formData, setFormData] = useState([]);
|
|
61
|
-
const [formDataOrig, setFormDataOrig] = useState([]);
|
|
62
|
-
const [validationItems, setValidationItems] = useState([]);
|
|
63
|
-
const [fromDTD, setFromDTD] = useState();
|
|
64
|
-
const [showApprovePopup, setShowApprovePopup] = useState(false);
|
|
65
|
-
const [showRejectPopup, setShowRejectPopup] = useState(false);
|
|
66
|
-
const [showReAssignPopup, setShowReAssignPopup] = useState(false);
|
|
67
|
-
const [showMoreInfoPopup, setShowMoreInfoPopup] = useState(false);
|
|
68
|
-
const [layout, setLayout] = useState();
|
|
69
|
-
const [customButtonsLayout, setCustomButtonsLayout] = useState();
|
|
70
|
-
const [customButton, setCustomButton] = useState();
|
|
71
|
-
const appliedInputMidsRef = useRef(null);
|
|
72
|
-
// Refs per evitare stale closure nei callback
|
|
73
|
-
// I useCallback catturano i valori delle dipendenze al momento della creazione.
|
|
74
|
-
// Questi ref vengono sincronizzati tramite useEffect e permettono di accedere
|
|
75
|
-
// sempre ai valori correnti senza dover ricreare i callback ad ogni cambio di stato.
|
|
76
|
-
const formDataOrigRef = useRef([]);
|
|
77
|
-
const formDataRef = useRef([]);
|
|
78
|
-
const fromDTDRef = useRef();
|
|
79
|
-
const dcmtFileRef = useRef(null);
|
|
80
|
-
const [isOpenDetails, setIsOpenDetails] = useState(false);
|
|
81
|
-
const [isOpenMaster, setIsOpenMaster] = useState(false);
|
|
82
|
-
const [secondaryMasterDcmts, setSecondaryMasterDcmts] = useState([]);
|
|
83
|
-
const [isOpenDistinctValues, setIsOpenDistinctValues] = useState(false);
|
|
84
|
-
const [isOpenFormulaEditor, setIsOpenFormulaEditor] = useState(false);
|
|
85
|
-
const [currentTIDHasDetailRelations, setCurrentTIDHasDetailRelations] = useState();
|
|
86
|
-
const [currentTIDHasMasterRelations, setCurrentTIDHasMasterRelations] = useState();
|
|
87
|
-
const [currentDcmt, setCurrentDcmt] = useState();
|
|
88
|
-
const [dcmtFile, setDcmtFile] = useState(null);
|
|
89
|
-
const [focusedMetadataValue, setFocusedMetadataValue] = useState();
|
|
90
|
-
const [showAll, setShowAll] = useState(layoutMode === LayoutModes.Ark);
|
|
91
|
-
const [fetchError, setFetchError] = useState(false);
|
|
92
|
-
const [isWFDataLoading, setIsWFDataLoading] = useState(false);
|
|
93
|
-
const [workItems, setWorkItems] = useState([]);
|
|
94
|
-
const [workflows, setWorkflows] = useState([]);
|
|
95
|
-
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
96
|
-
const [isInitialLoading, setIsInitialLoading] = useState(true);
|
|
97
|
-
const [isNavigating, setIsNavigating] = useState(false);
|
|
98
|
-
const [dcmtReferences, setDcmtReferences] = useState(undefined);
|
|
99
|
-
// Stato per triggerare il refresh del blog dall'esterno
|
|
100
|
-
const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
|
|
101
|
-
const triggerBlogRefresh = useCallback(async () => {
|
|
102
|
-
setRefreshBlogTrigger(prev => prev + 1);
|
|
103
|
-
}, []);
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
if (!allowButtonsRefs)
|
|
106
|
-
setDcmtReferences(undefined);
|
|
107
|
-
}, [allowButtonsRefs]);
|
|
108
|
-
const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
|
|
109
|
-
const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync, runOperationAsync } = useDcmtOperations();
|
|
110
|
-
const { workflowApproveData } = useWorkflowApprove();
|
|
111
|
-
const currentSearchResults = useMemo(() => {
|
|
112
|
-
if (!formData || formData.length === 0 || !TID || !DID)
|
|
113
|
-
return [];
|
|
114
|
-
const selectMIDs = [];
|
|
115
|
-
const rowValues = [];
|
|
116
|
-
formData.forEach(md => {
|
|
117
|
-
if (md.mid !== undefined) {
|
|
118
|
-
selectMIDs.push(md.mid);
|
|
119
|
-
rowValues.push(md.value);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
const searchResult = {
|
|
123
|
-
fromTID: TID,
|
|
124
|
-
selectMIDs: selectMIDs,
|
|
125
|
-
dtdResult: {
|
|
126
|
-
rows: [rowValues],
|
|
127
|
-
columns: selectMIDs.map(mid => ({ name: `MID_${mid}` }))
|
|
128
|
-
},
|
|
129
|
-
dcmtsFound: 1,
|
|
130
|
-
dcmtsReturned: 1
|
|
131
|
-
};
|
|
132
|
-
return [searchResult];
|
|
133
|
-
}, [formData, TID, DID]);
|
|
134
|
-
const relatedDocuments = useRelatedDocuments({
|
|
135
|
-
selectedSearchResult: TID ? { fromTID: Number(TID) } : undefined,
|
|
136
|
-
focusedItem: currentDcmt ? { TID: currentDcmt.tid, DID: currentDcmt.did, rowIndex: 0 } : undefined,
|
|
137
|
-
currentSearchResults: currentSearchResults
|
|
138
|
-
});
|
|
139
|
-
const { relatedDcmts, showRelatedDcmtsChooser, archiveType, isOpenArchiveRelationForm, archiveRelatedDcmtFormTID, archiveRelatedDcmtFormMids, relatedDcmtsChooserDataSource, showManyToManyChooser, manyToManyChooserDataSource, manyToManyRelations, isPairingManyToMany, showPairDcmtsModal, pairedSearchResults, pairFloatingActionConfig, hasManyToManyRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, archiveMasterDocuments, archiveDetailDocuments, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability, setShowRelatedDcmtsChooser, setShowManyToManyChooser, setShowPairDcmtsModal, setIsOpenArchiveRelationForm, setArchiveType, setArchiveRelatedDcmtFormTID, setArchiveRelatedDcmtFormMids, archiveRelatedDcmtHandler, executeManyToManyPairing } = relatedDocuments;
|
|
140
|
-
const fetchErrorShownRef = useRef(false);
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
if (!TID)
|
|
143
|
-
return;
|
|
144
|
-
checkRelatedDcmtsArchiveCapability();
|
|
145
|
-
checkManyToManyCapability();
|
|
146
|
-
}, [TID, checkRelatedDcmtsArchiveCapability, checkManyToManyCapability]);
|
|
147
|
-
const deviceType = useDeviceType();
|
|
148
|
-
const getDcmts = useCallback(() => {
|
|
149
|
-
return [{ TID: currentDcmt?.tid, DID: currentDcmt?.did, FILEEXT: currentDcmt?.fileExt }];
|
|
150
|
-
}, [currentDcmt?.tid, currentDcmt?.did, currentDcmt?.fileExt]);
|
|
151
|
-
const handleReset = useCallback(() => {
|
|
152
|
-
setDcmtFile(null);
|
|
153
|
-
}, []);
|
|
154
|
-
const setMetadataList = useCallback(async (mdList, getMetadataResult = undefined, archived = false, currentDID) => {
|
|
155
|
-
try {
|
|
156
|
-
let did = currentDID ?? DID;
|
|
157
|
-
if (!did)
|
|
158
|
-
return;
|
|
159
|
-
TMSpinner.show({ description: 'Loading Metadata...' });
|
|
160
|
-
let res = getMetadataResult ?? await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, did, true);
|
|
161
|
-
let dtd = res?.dtdResult;
|
|
162
|
-
let rows = dtd.rows ? dtd.rows[0] : [];
|
|
163
|
-
let mids = res?.selectMIDs;
|
|
164
|
-
let metadataList = searchResultToMetadataValues(TID, dtd, rows, mids, mdList, layoutMode);
|
|
165
|
-
if (archived) {
|
|
166
|
-
// Usa setFormData con funzione callback per accedere allo stato precedente
|
|
167
|
-
// invece di dipendere da formDataOrig nell'array di dipendenze
|
|
168
|
-
setFormData(prevFormDataOrig => {
|
|
169
|
-
let tempMetadataList = [];
|
|
170
|
-
for (let md of metadataList) {
|
|
171
|
-
if (md.value === null) {
|
|
172
|
-
if (prevFormDataOrig.find(metadata => metadata.mid === md.mid)?.value === '') {
|
|
173
|
-
tempMetadataList.push({ ...md, value: '' });
|
|
174
|
-
}
|
|
175
|
-
if (prevFormDataOrig.find(metadata => metadata.mid === md.mid)?.value === undefined) {
|
|
176
|
-
tempMetadataList.push({ ...md, value: undefined });
|
|
177
|
-
}
|
|
178
|
-
if (prevFormDataOrig.find(metadata => metadata.mid === md.mid)?.value === null) {
|
|
179
|
-
tempMetadataList.push(md);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
tempMetadataList.push(md);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return tempMetadataList;
|
|
187
|
-
});
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
setFormDataOrig(structuredClone(metadataList));
|
|
191
|
-
setFormData(structuredClone(metadataList));
|
|
192
|
-
// Sincronizza il ref con i dati caricati per evitare stale closure in handleSave
|
|
193
|
-
formDataOrigRef.current = structuredClone(metadataList);
|
|
194
|
-
}
|
|
195
|
-
catch (e) {
|
|
196
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
197
|
-
}
|
|
198
|
-
finally {
|
|
199
|
-
TMSpinner.hide();
|
|
200
|
-
}
|
|
201
|
-
}, [TID, DID, layoutMode]);
|
|
202
|
-
const fetchData = useCallback(async () => {
|
|
203
|
-
try {
|
|
204
|
-
setFetchError(false);
|
|
205
|
-
if (!TID)
|
|
206
|
-
return;
|
|
207
|
-
if (!DID && layoutMode === LayoutModes.Update)
|
|
208
|
-
return;
|
|
209
|
-
// Esegui chiamate in parallelo per ottimizzare le performance
|
|
210
|
-
const parallelCalls = [
|
|
211
|
-
// 1. GetMetadataAsync - solo se layoutMode === Update
|
|
212
|
-
layoutMode === LayoutModes.Update
|
|
213
|
-
? SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, DID, true) ?? Promise.resolve(undefined)
|
|
214
|
-
: Promise.resolve(undefined),
|
|
215
|
-
// 2. Layout per il layoutMode corrente
|
|
216
|
-
LayoutCacheService.GetAsync(TID, layoutMode),
|
|
217
|
-
// 3. CustomButtonsLayout - solo se layoutMode === Update
|
|
218
|
-
layoutMode === LayoutModes.Update
|
|
219
|
-
? LayoutCacheService.GetAsync(TID, LayoutModes.None)
|
|
220
|
-
: Promise.resolve(undefined),
|
|
221
|
-
// 4. Opcionalmente FindAllReferencesAsync se abilitato nelle impostazioni e se i bottoni sono richiesti
|
|
222
|
-
(() => {
|
|
223
|
-
const refs = SDKUI_Globals?.userSettings?.searchSettings?.autoFindReferences ?? [];
|
|
224
|
-
const hasRefs = allowButtonsRefs && Array.isArray(refs) && refs.length > 0;
|
|
225
|
-
return hasRefs
|
|
226
|
-
? SDK_Globals.tmSession?.NewSearchEngine().FindAllReferencesAsync(TID, DID, refs) ?? Promise.resolve(undefined)
|
|
227
|
-
: Promise.resolve(undefined);
|
|
228
|
-
})()
|
|
229
|
-
];
|
|
230
|
-
const results = await Promise.all(parallelCalls);
|
|
231
|
-
// Destructuring: first three are always the original ones, fourth is references (or undefined)
|
|
232
|
-
const getMetadataResult = results[0];
|
|
233
|
-
const resLayout = results[1];
|
|
234
|
-
const customButtonsLayoutResult = results[2];
|
|
235
|
-
const findRefsResult = results[3];
|
|
236
|
-
// Save references result into state (may be undefined)
|
|
237
|
-
setDcmtReferences(findRefsResult);
|
|
238
|
-
// Imposta il layout e customButtonsLayout immediatamente
|
|
239
|
-
setLayout(resLayout);
|
|
240
|
-
if (layoutMode === LayoutModes.Update && customButtonsLayoutResult) {
|
|
241
|
-
setCustomButtonsLayout(customButtonsLayoutResult);
|
|
242
|
-
}
|
|
243
|
-
// Carica DTD e metadata
|
|
244
|
-
let dtd = await DcmtTypeListCacheService.GetWithNotGrantedAsync(TID, DID, getMetadataResult);
|
|
245
|
-
console.log('GetWithNotGrantedAsync DTD:', dtd);
|
|
246
|
-
setFromDTD(dtd);
|
|
247
|
-
if (layoutMode === LayoutModes.Update || (layoutMode === LayoutModes.Ark && DID)) {
|
|
248
|
-
await setMetadataList(dtd?.metadata ?? [], getMetadataResult);
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
const renderedMetadata = dtd?.metadata?.filter((metadata) => handleArchiveVisibility(metadata)) ?? [];
|
|
252
|
-
const metadataList = searchResultToMetadataValues(dtd?.id, undefined, [], [], renderedMetadata, layoutMode);
|
|
253
|
-
setFormDataOrig(structuredClone(metadataList));
|
|
254
|
-
setFormData(structuredClone(metadataList));
|
|
255
|
-
formDataOrigRef.current = structuredClone(metadataList);
|
|
256
|
-
}
|
|
257
|
-
(layoutMode === LayoutModes.Ark && !inputFile) && handleReset();
|
|
258
|
-
}
|
|
259
|
-
catch (e) {
|
|
260
|
-
setFetchError(true);
|
|
261
|
-
throw e;
|
|
262
|
-
}
|
|
263
|
-
finally {
|
|
264
|
-
setIsInitialLoading(false);
|
|
265
|
-
setIsNavigating(false);
|
|
266
|
-
}
|
|
267
|
-
}, [TID, DID, layoutMode, inputFile, setMetadataList, handleReset, allowButtonsRefs]);
|
|
268
|
-
const createChange = useCallback((mid, metadataType, modifiedValue) => {
|
|
269
|
-
return { mid, metadataType, modifiedValue };
|
|
270
|
-
}, []);
|
|
271
|
-
const getSpecificChangedKeysWithValues = useCallback((originalList, modifiedList) => {
|
|
272
|
-
const changes = [];
|
|
273
|
-
if (!originalList || !modifiedList)
|
|
274
|
-
return changes;
|
|
275
|
-
const originalMap = new Map(originalList.map(item => [item.mid, item]));
|
|
276
|
-
for (const modified of modifiedList) {
|
|
277
|
-
if (modified.mid === undefined)
|
|
278
|
-
continue;
|
|
279
|
-
const original = originalMap.get(modified.mid);
|
|
280
|
-
if (!original)
|
|
281
|
-
continue;
|
|
282
|
-
if (original.value !== modified.value) {
|
|
283
|
-
changes.push(createChange(modified.mid, modified.md?.dataType ?? MetadataDataTypes.Varchar, modified.value));
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
return changes;
|
|
287
|
-
}, [createChange]);
|
|
288
|
-
useEffect(() => { setID(genUniqueId()); }, []);
|
|
289
|
-
// Sincronizza i ref con gli stati correnti per evitare stale closure nei callback.
|
|
290
|
-
// I useCallback catturano le variabili delle dipendenze al momento della loro creazione,
|
|
291
|
-
// quindi se uno stato cambia frequentemente, il callback avrebbe sempre valori vecchi.
|
|
292
|
-
// Usando i ref, possiamo accedere sempre ai valori più recenti senza dover ricreare i callback.
|
|
293
|
-
useEffect(() => {
|
|
294
|
-
formDataRef.current = formData;
|
|
295
|
-
}, [formData]);
|
|
296
|
-
useEffect(() => {
|
|
297
|
-
fromDTDRef.current = fromDTD;
|
|
298
|
-
}, [fromDTD]);
|
|
299
|
-
useEffect(() => {
|
|
300
|
-
dcmtFileRef.current = dcmtFile;
|
|
301
|
-
}, [dcmtFile]);
|
|
302
|
-
useEffect(() => {
|
|
303
|
-
if (!inputFile || inputFile === null)
|
|
304
|
-
return;
|
|
305
|
-
setDcmtFile(inputFile);
|
|
306
|
-
}, [inputFile]);
|
|
307
|
-
useEffect(() => {
|
|
308
|
-
const run = async () => {
|
|
309
|
-
try {
|
|
310
|
-
fetchErrorShownRef.current = false; // Reset flag all'inizio
|
|
311
|
-
// Distinguish between initial load and navigation
|
|
312
|
-
if (isInitialLoading) {
|
|
313
|
-
// First load - keep isInitialLoading true
|
|
314
|
-
await fetchData();
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
// Navigation - use isNavigating instead
|
|
318
|
-
setIsNavigating(true);
|
|
319
|
-
await fetchData();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
catch (e) {
|
|
323
|
-
// Mostra l'errore solo se non è già stato mostrato (evita duplicati in StrictMode)
|
|
324
|
-
if (!fetchErrorShownRef.current) {
|
|
325
|
-
fetchErrorShownRef.current = true;
|
|
326
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
327
|
-
// Se il caricamento fallisce, chiudi il form
|
|
328
|
-
onClose?.();
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
run();
|
|
333
|
-
}, [TID, DID, fetchData]);
|
|
334
|
-
useEffect(() => {
|
|
335
|
-
if (formData.length > 0) {
|
|
336
|
-
setValidationItems(validateMetadataList(formData));
|
|
337
|
-
const newDcmt = {
|
|
338
|
-
tid: formData.find(o => o.mid == SystemMIDsAsNumber.TID)?.value,
|
|
339
|
-
did: formData.find(o => o.mid == SystemMIDsAsNumber.DID)?.value,
|
|
340
|
-
fileCount: formData.find(o => o.mid == SystemMIDsAsNumber.FileCount)?.value,
|
|
341
|
-
fileSize: formData.find(o => o.mid == SystemMIDsAsNumber.FileSize)?.value,
|
|
342
|
-
fileExt: formData.find(o => o.mid == SystemMIDsAsNumber.FileExt)?.value
|
|
343
|
-
};
|
|
344
|
-
if (!currentDcmt ||
|
|
345
|
-
currentDcmt.tid !== newDcmt.tid ||
|
|
346
|
-
currentDcmt.did !== newDcmt.did ||
|
|
347
|
-
currentDcmt.fileExt !== newDcmt.fileExt ||
|
|
348
|
-
currentDcmt.fileSize !== newDcmt.fileSize ||
|
|
349
|
-
currentDcmt.fileCount !== newDcmt.fileCount) {
|
|
350
|
-
setCurrentDcmt(newDcmt);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}, [formData, formDataOrig, getSpecificChangedKeysWithValues, currentDcmt]);
|
|
354
|
-
useEffect(() => {
|
|
355
|
-
hasDetailRelations(TID).then((value) => setCurrentTIDHasDetailRelations(value));
|
|
356
|
-
hasMasterRelations(TID).then((value) => setCurrentTIDHasMasterRelations(value));
|
|
357
|
-
}, [TID]);
|
|
358
|
-
useEffect(() => {
|
|
359
|
-
if (layoutMode !== LayoutModes.Ark)
|
|
360
|
-
return;
|
|
361
|
-
setFocusedMetadataValue(undefined);
|
|
362
|
-
appliedInputMidsRef.current = null;
|
|
363
|
-
}, [fromDTD, layoutMode]);
|
|
364
|
-
useEffect(() => {
|
|
365
|
-
if (!inputMids || inputMids.length === 0)
|
|
366
|
-
return;
|
|
367
|
-
if (layoutMode !== LayoutModes.Ark)
|
|
368
|
-
return;
|
|
369
|
-
if (!formData || formData.length === 0)
|
|
370
|
-
return;
|
|
371
|
-
if (!formDataOrig || formDataOrig.length === 0)
|
|
372
|
-
return;
|
|
373
|
-
const hasUserMetadata = formData.some(md => md.mid && md.mid > 99);
|
|
374
|
-
if (!hasUserMetadata)
|
|
375
|
-
return;
|
|
376
|
-
if (appliedInputMidsRef.current && deepCompare(appliedInputMidsRef.current, inputMids))
|
|
377
|
-
return;
|
|
378
|
-
let data = structuredClone(formData);
|
|
379
|
-
for (let md of data) {
|
|
380
|
-
if (!md.mid)
|
|
381
|
-
continue;
|
|
382
|
-
if (md.mid > 99) {
|
|
383
|
-
const defaultValue = md.md?.defaultValue;
|
|
384
|
-
if (defaultValue) {
|
|
385
|
-
if (FormulaHelper.isFormula(defaultValue)) {
|
|
386
|
-
md.value = undefined;
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
md.value = defaultValue;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
else if (formDataOrig.find(metadata => metadata.mid === md.mid)?.value === undefined) {
|
|
393
|
-
if (md.value)
|
|
394
|
-
md.value = undefined;
|
|
395
|
-
}
|
|
396
|
-
else if (md.value && md.value.length > 0) {
|
|
397
|
-
md.value = '';
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
inputMids.forEach(inputMid => {
|
|
402
|
-
const md = data.find(m => m.mid === inputMid.mid);
|
|
403
|
-
if (md) {
|
|
404
|
-
md.value = inputMid.value;
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
setFormData(data);
|
|
408
|
-
appliedInputMidsRef.current = inputMids;
|
|
409
|
-
}, [inputMids, layoutMode, formData, formDataOrig]);
|
|
410
|
-
// Memoizza solo il valore WI_SetID per evitare re-render quando altri metadata cambiano
|
|
411
|
-
const workItemSetIDValue = useMemo(() => formData.find(o => o.md?.name === WorkItemMetadataNames.WI_SetID)?.value, [formData]);
|
|
412
|
-
// Valore derivato: true se formData ha elementi validi
|
|
413
|
-
const hasFormData = useMemo(() => formData.length > 0 && formData.some(md => md.mid && md.mid > 99), [formData]);
|
|
414
|
-
useEffect(() => {
|
|
415
|
-
const loadAllWfData = async () => {
|
|
416
|
-
if (layoutMode !== LayoutModes.Update || !DID || fromDTD?.templateTID !== TemplateTIDs.WF_WIApprView) {
|
|
417
|
-
setWorkItems([]);
|
|
418
|
-
setWorkflows([]);
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
setIsWFDataLoading(true);
|
|
422
|
-
try {
|
|
423
|
-
// 1. item da processare in modo sincrono
|
|
424
|
-
const itemsToProcess = [];
|
|
425
|
-
for (const workflow of workflowApproveData) {
|
|
426
|
-
for (const dataRow of workflow.dtdResult?.rows ?? []) {
|
|
427
|
-
const did = Number(dataRow?.[1]);
|
|
428
|
-
if (did === Number(DID)) {
|
|
429
|
-
const tid = Number(dataRow?.[0]);
|
|
430
|
-
itemsToProcess.push({ tid, did });
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
if (itemsToProcess.length === 0) {
|
|
435
|
-
setWorkItems([]);
|
|
436
|
-
setWorkflows([]);
|
|
437
|
-
setIsWFDataLoading(false);
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
// promises per i setID in modo condizionale
|
|
441
|
-
let setIDPromises;
|
|
442
|
-
if (workItemSetIDValue !== undefined) {
|
|
443
|
-
// Se abbiamo il setID dal form, non facciamo chiamate di rete.
|
|
444
|
-
setIDPromises = itemsToProcess.map(() => Promise.resolve(workItemSetIDValue));
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
// Altrimenti, procediamo con le chiamate di rete come prima.
|
|
448
|
-
setIDPromises = itemsToProcess.map(item => getWorkItemSetIDAsync(item.tid, item.did));
|
|
449
|
-
}
|
|
450
|
-
// Crea un array di Promise per tutte le chiamate a GetWFInfoAsync
|
|
451
|
-
const workflowInfoPromises = itemsToProcess.map(item => WorkflowCacheService.GetWFInfoAsync(item.tid));
|
|
452
|
-
// Esegui tutte le chiamate in parallelo e attendi i risultati
|
|
453
|
-
const setIDResults = await Promise.all(setIDPromises);
|
|
454
|
-
const workflowInfoResults = await Promise.all(workflowInfoPromises);
|
|
455
|
-
// Combina i risultati
|
|
456
|
-
const finalWorkItems = itemsToProcess.map((item, index) => ({
|
|
457
|
-
...item,
|
|
458
|
-
setID: setIDResults[index],
|
|
459
|
-
}));
|
|
460
|
-
const validWorkflows = workflowInfoResults.filter(Boolean);
|
|
461
|
-
// Aggiorna lo stato una sola volta con i dati finali
|
|
462
|
-
setWorkItems(finalWorkItems);
|
|
463
|
-
setWorkflows(validWorkflows);
|
|
464
|
-
}
|
|
465
|
-
catch (error) {
|
|
466
|
-
TMExceptionBoxManager.show({ exception: error });
|
|
467
|
-
setWorkItems([]);
|
|
468
|
-
setWorkflows([]);
|
|
469
|
-
}
|
|
470
|
-
finally {
|
|
471
|
-
setIsWFDataLoading(false);
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
// Usa hasFormData invece di formDataRef.current
|
|
475
|
-
if (!hasFormData || !fromDTD?.id) {
|
|
476
|
-
// console.log("formData is empty or fromDTD not loaded, skipping loadAllWfData");
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
479
|
-
if (workItemSetIDValue !== undefined || workflowApproveData.length > 0)
|
|
480
|
-
loadAllWfData();
|
|
481
|
-
}, [hasFormData, workItemSetIDValue, workflowApproveData, DID, layoutMode, fromDTD?.templateTID, fromDTD?.id]);
|
|
482
|
-
const getSelectionDcmtInfo = useCallback(() => {
|
|
483
|
-
let dcmts = [];
|
|
484
|
-
dcmts.push({ TID: TID ?? 0, DID: DID ?? 0 });
|
|
485
|
-
return dcmts;
|
|
486
|
-
}, [TID, DID]);
|
|
487
|
-
const handleAddItem = useCallback((tid, did) => {
|
|
488
|
-
let newItem = { TID: tid ?? 0, DID: did ?? 0 };
|
|
489
|
-
setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
|
|
490
|
-
}, []);
|
|
491
|
-
const handleRemoveItem = useCallback((tid, did) => {
|
|
492
|
-
setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
|
|
493
|
-
}, []);
|
|
494
|
-
const handlePassToSearch = useCallback(() => {
|
|
495
|
-
if (!passToSearch)
|
|
496
|
-
return;
|
|
497
|
-
const outputMids = formData
|
|
498
|
-
.filter(md => md.mid && md.mid > 100 && md.value && md.value.length > 0)
|
|
499
|
-
.map(md => ({ mid: md.mid, value: md.value }));
|
|
500
|
-
passToSearch(outputMids, TID);
|
|
501
|
-
}, [passToSearch, formData, TID]);
|
|
502
|
-
const isPreviewDisabled = useMemo(() => layoutMode === LayoutModes.Ark && fromDTD?.archiveConstraint === ArchiveConstraints.OnlyMetadata, [layoutMode, fromDTD?.archiveConstraint]);
|
|
503
|
-
const isBoardDisabled = useMemo(() => layoutMode !== LayoutModes.Update || fromDTD?.hasBlog !== 1, [layoutMode, fromDTD?.hasBlog]);
|
|
504
|
-
const isSysMetadataDisabled = useMemo(() => layoutMode !== LayoutModes.Update, [layoutMode]);
|
|
505
|
-
const isDetailsDisabled = useMemo(() => layoutMode !== LayoutModes.Update || !DID, [layoutMode, DID]);
|
|
506
|
-
const isMasterDisabled = useMemo(() => layoutMode !== LayoutModes.Update || !DID, [layoutMode, DID]);
|
|
507
|
-
const isWFDisabled = useMemo(() => layoutMode !== LayoutModes.Update || fetchError || workItems.length <= 0, [layoutMode, fetchError, workItems.length]);
|
|
508
|
-
const showToppyForApprove = useMemo(() => layoutMode === LayoutModes.Update && !fetchError && workItems.length > 0 && !isOpenDetails && !isOpenMaster, [layoutMode, fetchError, workItems.length, isOpenDetails, isOpenMaster]);
|
|
509
|
-
const showToppyForCompleteMoreInfo = useMemo(() => layoutMode === LayoutModes.Update && !!isTaskMoreInfo(taskMoreInfo?.name) && taskMoreInfo?.state !== Task_States.Completed, [layoutMode, taskMoreInfo?.name, taskMoreInfo?.state]);
|
|
510
|
-
const showToppyForReferences = useMemo(() => allowButtonsRefs && layoutMode === LayoutModes.Update && !!(dcmtReferences && dcmtReferences.length > 0) && !isOpenDetails && !isOpenMaster, [allowButtonsRefs, layoutMode, dcmtReferences, isOpenDetails, isOpenMaster]);
|
|
511
|
-
const isMobile = useMemo(() => deviceType === DeviceType.MOBILE, [deviceType]);
|
|
512
|
-
const isApprView = useMemo(() => fromDTD?.templateTID === TemplateTIDs.WF_WIApprView, [fromDTD?.templateTID]);
|
|
513
|
-
const workitemSetID = useMemo(() => workItems.find(o => o.did === Number(DID))?.setID || formData.find(o => o.md?.name === WorkItemMetadataNames.WI_SetID)?.value, [workItems, DID, formData]);
|
|
514
|
-
const approvalVID = useMemo(() => workItems.length > 0 ? Number(workItems[0].tid) : -1, [workItems]);
|
|
515
|
-
//here
|
|
516
|
-
const commandsMenuItems = useMemo(() => {
|
|
517
|
-
const items = [];
|
|
518
|
-
const operationsItems = [];
|
|
519
|
-
operationsItems.push({
|
|
520
|
-
icon: svgToString(_jsx(IconDownload, {})),
|
|
521
|
-
operationType: 'singleRow',
|
|
522
|
-
disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes,
|
|
523
|
-
text: SDKUI_Localizator.DownloadFile,
|
|
524
|
-
onClick: async () => await downloadDcmtsAsync(getDcmts(), DownloadTypes.Dcmt, "download", undefined, undefined, true)
|
|
525
|
-
}, {
|
|
526
|
-
icon: svgToString(_jsx(IconDownload, {})),
|
|
527
|
-
operationType: 'singleRow',
|
|
528
|
-
disabled: !isXMLFileExt(currentDcmt?.fileExt),
|
|
529
|
-
text: SDKUI_Localizator.DownloadXMLAttachments,
|
|
530
|
-
onClick: async () => await downloadDcmtsAsync(getDcmts(), DownloadTypes.Attachment, "download", undefined, openConfirmAttachmentsDialog, true)
|
|
531
|
-
});
|
|
532
|
-
if (layoutMode === LayoutModes.Update && DID) {
|
|
533
|
-
operationsItems.push({
|
|
534
|
-
icon: svgToString(_jsx(IconStar, {})),
|
|
535
|
-
text: SDKUI_Localizator.AddTo + ' ' + SDKUI_Localizator.Favorites,
|
|
536
|
-
operationType: 'singleRow',
|
|
537
|
-
disabled: false,
|
|
538
|
-
onClick: async () => {
|
|
539
|
-
await runOperationAsync(getDcmts(), DcmtOperationTypes.AddToFavs);
|
|
540
|
-
},
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
if (onTaskCreateRequest && layoutMode === LayoutModes.Update && DID) {
|
|
544
|
-
operationsItems.push({
|
|
545
|
-
icon: svgToString(_jsx(IconActivity, {})),
|
|
546
|
-
text: SDKUI_Localizator.CreateContextualTask,
|
|
547
|
-
operationType: 'singleRow',
|
|
548
|
-
disabled: false,
|
|
549
|
-
onClick: () => {
|
|
550
|
-
const dcmt = getDcmts()[0];
|
|
551
|
-
const taskContext = {
|
|
552
|
-
document: {
|
|
553
|
-
tid: dcmt.TID,
|
|
554
|
-
did: dcmt.DID,
|
|
555
|
-
name: fromDTD?.description || ''
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
onTaskCreateRequest(taskContext);
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
if (operationsItems.length > 0) {
|
|
563
|
-
items.push({
|
|
564
|
-
icon: svgToString(_jsx(IconCheck, {})),
|
|
565
|
-
text: SDKUI_Localizator.DocumentOperations,
|
|
566
|
-
items: operationsItems
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
if (allowRelations && layoutMode === LayoutModes.Update && DID) {
|
|
570
|
-
const relationsItems = [
|
|
571
|
-
{
|
|
572
|
-
icon: svgToString(_jsx(IconPair, {})),
|
|
573
|
-
text: SDKUI_Localizator.MatchManyDocumentsManyToMany,
|
|
574
|
-
operationType: 'singleRow',
|
|
575
|
-
disabled: !hasManyToManyRelation,
|
|
576
|
-
onClick: async () => await pairManyToMany?.(true)
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
icon: svgToString(_jsx(IconUnpair, {})),
|
|
580
|
-
text: SDKUI_Localizator.UnmatchManyDocumentsManyToMany,
|
|
581
|
-
operationType: 'singleRow',
|
|
582
|
-
disabled: !hasManyToManyRelation,
|
|
583
|
-
onClick: async () => await pairManyToMany?.(false)
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
icon: svgToString(_jsx(IconArchiveMaster, {})),
|
|
587
|
-
text: SDKUI_Localizator.ArchiveMasterDocument,
|
|
588
|
-
operationType: 'singleRow',
|
|
589
|
-
beginGroup: true,
|
|
590
|
-
disabled: canArchiveMasterRelation !== true,
|
|
591
|
-
onClick: async () => { if (TID)
|
|
592
|
-
await archiveMasterDocuments?.(TID); }
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
icon: svgToString(_jsx(IconArchiveDetail, {})),
|
|
596
|
-
text: SDKUI_Localizator.ArchiveDetailDocument,
|
|
597
|
-
operationType: 'singleRow',
|
|
598
|
-
disabled: canArchiveDetailRelation !== true,
|
|
599
|
-
onClick: async () => { if (TID)
|
|
600
|
-
await archiveDetailDocuments?.(TID); }
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
icon: svgToString(_jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' })),
|
|
604
|
-
text: SDKUI_Localizator.DcmtsMaster,
|
|
605
|
-
operationType: 'singleRow',
|
|
606
|
-
visible: true,
|
|
607
|
-
beginGroup: true,
|
|
608
|
-
disabled: !currentTIDHasMasterRelations || isMasterDisabled,
|
|
609
|
-
onClick: () => { if (!isMasterDisabled)
|
|
610
|
-
setIsOpenMaster(!isOpenMaster); }
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
icon: svgToString(_jsx(IconDetailDcmts, {})),
|
|
614
|
-
text: SDKUI_Localizator.DcmtsDetail,
|
|
615
|
-
operationType: 'singleRow',
|
|
616
|
-
disabled: !currentTIDHasDetailRelations || isDetailsDisabled,
|
|
617
|
-
visible: true,
|
|
618
|
-
onClick: () => { if (!isDetailsDisabled)
|
|
619
|
-
setIsOpenDetails(!isOpenDetails); }
|
|
620
|
-
}
|
|
621
|
-
];
|
|
622
|
-
items.push({
|
|
623
|
-
icon: svgToString(_jsx(IconRelation, {})),
|
|
624
|
-
text: SDKUI_Localizator.Relations,
|
|
625
|
-
items: relationsItems
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
if (layoutMode === LayoutModes.Update && DID) {
|
|
629
|
-
const fullTextItems = [
|
|
630
|
-
{
|
|
631
|
-
icon: svgToString(_jsx(IconInfo, {})),
|
|
632
|
-
text: SDKUI_Localizator.IndexingInformation,
|
|
633
|
-
operationType: 'singleRow',
|
|
634
|
-
disabled: false,
|
|
635
|
-
onClick: async () => {
|
|
636
|
-
try {
|
|
637
|
-
TMSpinner.show({ description: `${SDKUI_Localizator.Loading}...` });
|
|
638
|
-
const dcmts = getDcmts();
|
|
639
|
-
const msg = await SDK_Globals.tmSession?.NewSearchEngine().FreeSearchGetDcmtInfoAsync(dcmts[0].TID, dcmts[0].DID);
|
|
640
|
-
TMMessageBoxManager.show({ buttons: [ButtonNames.OK], message: msg, title: SDKUI_Localizator.IndexingInformation });
|
|
641
|
-
}
|
|
642
|
-
catch (e) {
|
|
643
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
644
|
-
}
|
|
645
|
-
finally {
|
|
646
|
-
TMSpinner.hide();
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
icon: svgToString(_jsx(IconArchiveDoc, {})),
|
|
652
|
-
text: SDKUI_Localizator.IndexOrReindex,
|
|
653
|
-
operationType: 'singleRow',
|
|
654
|
-
disabled: false,
|
|
655
|
-
onClick: async () => {
|
|
656
|
-
await runOperationAsync(getDcmts(), DcmtOperationTypes.FreeSearchReindex);
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
icon: svgToString(_jsx(IconDelete, {})),
|
|
661
|
-
text: SDKUI_Localizator.IndexingDelete,
|
|
662
|
-
operationType: 'singleRow',
|
|
663
|
-
disabled: false,
|
|
664
|
-
onClick: async () => {
|
|
665
|
-
await runOperationAsync(getDcmts(), DcmtOperationTypes.FreeSearchPurge);
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
];
|
|
669
|
-
items.push({
|
|
670
|
-
icon: svgToString(_jsx(IconSearch, {})),
|
|
671
|
-
text: SDKUI_Localizator.FullTextSearch,
|
|
672
|
-
items: fullTextItems
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
// Aggiungi submenu "Bottoni personalizzati" se esistono customButtons
|
|
676
|
-
if (customButtonsLayout?.customButtons && Array.isArray(customButtonsLayout.customButtons) && customButtonsLayout.customButtons.length > 0) {
|
|
677
|
-
const customButtonsItems = customButtonsLayout.customButtons
|
|
678
|
-
.filter((customButton) => customButton.isForUpdate && customButton.isForUpdate > 0)
|
|
679
|
-
.map((customButton) => ({
|
|
680
|
-
icon: svgToString(TMImageLibrary({ imageID: customButton.glyphID, showPath: true })),
|
|
681
|
-
text: customButton.title || 'Bottone personalizzato',
|
|
682
|
-
onClick: () => setCustomButton(customButton)
|
|
683
|
-
}));
|
|
684
|
-
items.push({
|
|
685
|
-
icon: svgToString(_jsx(IconCheck, {})),
|
|
686
|
-
text: SDKUI_Localizator.CustomButtons,
|
|
687
|
-
items: customButtonsItems
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
return items;
|
|
691
|
-
}, [
|
|
692
|
-
fromDTD?.perm?.canRetrieveFile,
|
|
693
|
-
fromDTD?.description,
|
|
694
|
-
currentDcmt?.fileExt,
|
|
695
|
-
allowRelations,
|
|
696
|
-
currentTIDHasMasterRelations,
|
|
697
|
-
isMasterDisabled,
|
|
698
|
-
currentTIDHasDetailRelations,
|
|
699
|
-
isDetailsDisabled,
|
|
700
|
-
customButtonsLayout,
|
|
701
|
-
layoutMode,
|
|
702
|
-
TID,
|
|
703
|
-
DID,
|
|
704
|
-
onTaskCreateRequest,
|
|
705
|
-
hasManyToManyRelation,
|
|
706
|
-
canArchiveMasterRelation,
|
|
707
|
-
canArchiveDetailRelation,
|
|
708
|
-
pairManyToMany,
|
|
709
|
-
archiveMasterDocuments,
|
|
710
|
-
archiveDetailDocuments,
|
|
711
|
-
getDcmts,
|
|
712
|
-
downloadDcmtsAsync,
|
|
713
|
-
runOperationAsync,
|
|
714
|
-
openConfirmAttachmentsDialog
|
|
715
|
-
]);
|
|
716
|
-
const isModified = useMemo(() => calcIsModified(formData, formDataOrig), [formData, formDataOrig]);
|
|
717
|
-
const formToolbar = useMemo(() => _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowNavigation && canPrev != undefined && _jsx("p", { style: { textAlign: 'center', padding: '1px 4px', display: 'flex' }, children: `${itemIndex}/${count}` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: isModified, formMode: formMode, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: isModified, formMode: formMode, canNext: canNext, onNext: onNext }), layoutMode === LayoutModes.Update && _jsx(IconMenuVertical, { id: `commands-detail-${id}`, color: 'white', cursor: 'pointer' }), layoutMode === LayoutModes.Update && _jsx(ContextMenu, { showEvent: 'click', dataSource: commandsMenuItems, target: `#commands-detail-${id}` }), layoutMode === LayoutModes.Ark &&
|
|
718
|
-
_jsx(TMTooltip, { content: SDKUI_Localizator.PassToSearch, position: 'bottom', children: _jsx(IconSearch, { style: { cursor: 'pointer' }, onClick: handlePassToSearch }) })] }), [allowNavigation, canPrev, canNext, itemIndex, count, isModified, formMode, onPrev, onNext, layoutMode, id, commandsMenuItems, handlePassToSearch]);
|
|
719
|
-
const handleUndo = useCallback(() => {
|
|
720
|
-
setFormData(structuredClone(formDataOrig));
|
|
721
|
-
}, [formDataOrig]);
|
|
722
|
-
const handleConfirmAction = useCallback(async () => {
|
|
723
|
-
TMMessageBoxManager.show({
|
|
724
|
-
parentId: isModal ? "TMDcmtFormShowConfirmForClose-" + id : undefined,
|
|
725
|
-
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
726
|
-
message: layoutMode === LayoutModes.Update ? SDKUI_Localizator.SaveQuestion : 'Sei sicuro di voler archiviare questo documento?',
|
|
727
|
-
onButtonClick(e) {
|
|
728
|
-
if (e !== ButtonNames.YES)
|
|
729
|
-
return;
|
|
730
|
-
layoutMode === LayoutModes.Update ? handleSave() : handleArchiveCompleted();
|
|
731
|
-
},
|
|
732
|
-
});
|
|
733
|
-
}, [isModal, id, layoutMode]);
|
|
734
|
-
const handleSave = useCallback(async () => {
|
|
735
|
-
const ue = new UpdateEngineByID(SDK_Globals.tmSession);
|
|
736
|
-
ue.DID = DID;
|
|
737
|
-
ue.TID = TID;
|
|
738
|
-
ue.Metadata_ClearAll();
|
|
739
|
-
try {
|
|
740
|
-
TMSpinner.show({ description: 'Aggiornamento in corso...' });
|
|
741
|
-
// Usa i ref invece degli stati per evitare stale closure.
|
|
742
|
-
// handleSave è un useCallback che verrebbe ricreato ogni volta che formData/formDataOrig cambiano,
|
|
743
|
-
// causando problemi di performance. Usando i ref, possiamo mantenere lo stesso callback
|
|
744
|
-
// ma accedere sempre ai valori correnti tramite formDataRef.current e formDataOrigRef.current.
|
|
745
|
-
const changes = getSpecificChangedKeysWithValues(formDataOrigRef.current, formDataRef.current);
|
|
746
|
-
for (let metadata of changes) {
|
|
747
|
-
if (!metadata.modifiedValue)
|
|
748
|
-
ue.Metadata_AddNull(metadata.mid);
|
|
749
|
-
else {
|
|
750
|
-
switch (metadata.metadataType) {
|
|
751
|
-
case MetadataDataTypes.DateTime:
|
|
752
|
-
ue.Metadata_AddDateTime(metadata.mid, new Date(metadata.modifiedValue));
|
|
753
|
-
break;
|
|
754
|
-
case MetadataDataTypes.Number:
|
|
755
|
-
ue.Metadata_AddNumber(metadata.mid, metadata.modifiedValue);
|
|
756
|
-
break;
|
|
757
|
-
case MetadataDataTypes.Varchar:
|
|
758
|
-
ue.Metadata_AddString(metadata.mid, metadata.modifiedValue);
|
|
759
|
-
break;
|
|
760
|
-
default: ue.Metadata_AddNull(metadata.mid);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
await ue.UpdateAsync();
|
|
765
|
-
// Aggiorna lo stato locale immediatamente dopo il salvataggio riuscito
|
|
766
|
-
// Questo garantisce che isModified diventi false anche se il reload fallisce
|
|
767
|
-
const savedFormData = structuredClone(formDataRef.current);
|
|
768
|
-
setFormDataOrig(savedFormData);
|
|
769
|
-
formDataOrigRef.current = savedFormData;
|
|
770
|
-
// Tenta di ottenere i metadati aggiornati
|
|
771
|
-
let metadataResult = undefined;
|
|
772
|
-
let hasGetMetadataError = false;
|
|
773
|
-
try {
|
|
774
|
-
metadataResult = await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, DID, true);
|
|
775
|
-
}
|
|
776
|
-
catch (metadataError) {
|
|
777
|
-
hasGetMetadataError = true;
|
|
778
|
-
// Estrai ErrorCode dal campo detail se disponibile
|
|
779
|
-
let errorCode = undefined;
|
|
780
|
-
if (metadataError?.isApiException && metadataError?.response?.detail) {
|
|
781
|
-
try {
|
|
782
|
-
const detailObj = JSON.parse(metadataError.response.detail);
|
|
783
|
-
errorCode = detailObj?.ErrorCode;
|
|
784
|
-
}
|
|
785
|
-
catch (parseError) {
|
|
786
|
-
console.log("Impossibile parsare il detail dell'eccezione:", parseError);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
// Se ErrorCode è -5, mostra messaggio personalizzato, altrimenti mostra l'eccezione originale
|
|
790
|
-
if (errorCode === -5) {
|
|
791
|
-
TMMessageBoxManager.show({
|
|
792
|
-
message: SDKUI_Localizator.DcmtOutOfView,
|
|
793
|
-
buttons: [ButtonNames.OK],
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
else {
|
|
797
|
-
TMExceptionBoxManager.show({ exception: metadataError });
|
|
798
|
-
}
|
|
799
|
-
// Usa null per indicare al callback che c'è stato un errore e non deve ritentare
|
|
800
|
-
metadataResult = null;
|
|
801
|
-
}
|
|
802
|
-
// Esegui sempre il callback:
|
|
803
|
-
// - Se metadataResult è un oggetto: refresh normale
|
|
804
|
-
// - Se metadataResult è null: GetMetadataAsync fallito, rimuove il documento dalla griglia senza ritentare
|
|
805
|
-
// - Se metadataResult è undefined: nessun parametro passato, il callback può decidere cosa fare
|
|
806
|
-
await onSavedAsyncCallback?.(TID, DID, metadataResult === null ? null : metadataResult);
|
|
807
|
-
// Mostra messaggio di successo solo se non ci sono stati errori critici
|
|
808
|
-
if (!hasGetMetadataError) {
|
|
809
|
-
if (metadataResult && metadataResult !== null) {
|
|
810
|
-
// Usa fromDTDRef.current invece di fromDTD per evitare stale closure.
|
|
811
|
-
// fromDTD potrebbe essere undefined/vuoto nel callback se lo stato è cambiato,
|
|
812
|
-
// mentre fromDTDRef.current contiene sempre il valore corrente sincronizzato tramite useEffect.
|
|
813
|
-
await setMetadataList(fromDTDRef.current?.metadata ?? [], metadataResult);
|
|
814
|
-
}
|
|
815
|
-
ShowAlert({ mode: 'success', title: 'Form di documento', message: 'Le modifiche sono state salvate con successo', duration: 3000 });
|
|
816
|
-
}
|
|
817
|
-
else
|
|
818
|
-
onClose?.();
|
|
819
|
-
}
|
|
820
|
-
catch (e) {
|
|
821
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
822
|
-
}
|
|
823
|
-
finally {
|
|
824
|
-
TMSpinner.hide();
|
|
825
|
-
}
|
|
826
|
-
}, [DID, TID, getSpecificChangedKeysWithValues, onSavedAsyncCallback, onClose, setMetadataList]);
|
|
827
|
-
const handleArchiveCompleted = useCallback(async () => {
|
|
828
|
-
let firstBlock = true;
|
|
829
|
-
let maxFileSize = 0;
|
|
830
|
-
let operationTitle = 'Archiviazione';
|
|
831
|
-
setUseWaitPanelLocalState(true);
|
|
832
|
-
setShowWaitPanelLocal(true);
|
|
833
|
-
setShowPrimaryLocal(false);
|
|
834
|
-
setShowSecondaryLocal(true);
|
|
835
|
-
setWaitPanelTitleLocal(operationTitle);
|
|
836
|
-
abortControllerLocal = new AbortController();
|
|
837
|
-
const ae = new ArchiveEngineByID(SDK_Globals.tmSession);
|
|
838
|
-
ae.TID = TID;
|
|
839
|
-
ae.Metadata_ClearAll();
|
|
840
|
-
try {
|
|
841
|
-
// Usa formDataRef.current invece di formData per evitare stale closure.
|
|
842
|
-
// Questo garantisce di avere sempre i valori più recenti dei metadati da archiviare.
|
|
843
|
-
for (let metadata of formDataRef.current) {
|
|
844
|
-
if (!metadata.value)
|
|
845
|
-
continue;
|
|
846
|
-
switch (metadata.md?.dataType) {
|
|
847
|
-
case MetadataDataTypes.DateTime:
|
|
848
|
-
ae.Metadata_AddDateTime(metadata.mid, new Date(metadata.value));
|
|
849
|
-
break;
|
|
850
|
-
case MetadataDataTypes.Number:
|
|
851
|
-
ae.Metadata_AddNumber(metadata.mid, parseFloat(metadata.value));
|
|
852
|
-
break;
|
|
853
|
-
case MetadataDataTypes.Varchar:
|
|
854
|
-
ae.Metadata_AddString(metadata.mid, metadata.value);
|
|
855
|
-
break;
|
|
856
|
-
default: ae.Metadata_AddNull(metadata.mid);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
if (connectorFileSave) {
|
|
860
|
-
let file = await connectorFileSave();
|
|
861
|
-
ae.ArchivingFile = file;
|
|
862
|
-
}
|
|
863
|
-
else {
|
|
864
|
-
ae.ArchivingFile = dcmtFileRef.current;
|
|
865
|
-
}
|
|
866
|
-
if (isSharedDcmt && sharedSourceTID && sharedSourceDID) {
|
|
867
|
-
const sharedDcmt = new TID_DID();
|
|
868
|
-
sharedDcmt.tid = sharedSourceTID;
|
|
869
|
-
sharedDcmt.did = sharedSourceDID;
|
|
870
|
-
ae.SharedDcmt = sharedDcmt;
|
|
871
|
-
}
|
|
872
|
-
let newDID = await ae.ArchiveAsync(abortControllerLocal.signal, (pd) => {
|
|
873
|
-
if (firstBlock) {
|
|
874
|
-
maxFileSize = pd.ProgressBarMaximum ?? 0;
|
|
875
|
-
setWaitPanelMaxValueSecondaryLocal(maxFileSize);
|
|
876
|
-
firstBlock = false;
|
|
877
|
-
}
|
|
878
|
-
setWaitPanelValueSecondaryLocal(pd.ProgressBarValue);
|
|
879
|
-
setWaitPanelTextSecondaryLocal(`Archiviazione... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
|
|
880
|
-
if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
|
|
881
|
-
setWaitPanelMaxValueSecondaryLocal(0);
|
|
882
|
-
setWaitPanelValueSecondaryLocal(0);
|
|
883
|
-
setWaitPanelTextSecondaryLocal('');
|
|
884
|
-
firstBlock = true;
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
// Aggiorna lo stato locale immediatamente dopo il salvataggio riuscito
|
|
888
|
-
// Questo garantisce che isModified diventi false anche se il reload fallisce
|
|
889
|
-
const savedFormData = structuredClone(formDataRef.current);
|
|
890
|
-
setFormDataOrig(savedFormData);
|
|
891
|
-
formDataOrigRef.current = savedFormData;
|
|
892
|
-
await onSavedAsyncCallback?.(ae.TID, newDID);
|
|
893
|
-
// Usa fromDTDRef.current invece di fromDTD per evitare stale closure,
|
|
894
|
-
// garantendo di avere il descrittore del tipo documento corrente.
|
|
895
|
-
await setMetadataList(fromDTDRef.current?.metadata ?? [], undefined, true, newDID);
|
|
896
|
-
handleReset();
|
|
897
|
-
let newMruTIDS = updateMruTids(SDKUI_Globals.userSettings.archivingSettings.mruTIDs, TID);
|
|
898
|
-
SDKUI_Globals.userSettings.archivingSettings.mruTIDs = newMruTIDS;
|
|
899
|
-
onSaveRecents?.(newMruTIDS);
|
|
900
|
-
ShowAlert({ mode: 'success', title: 'Archiviazione', message: 'Il documento è stato archiviato con successo', duration: 3000 });
|
|
901
|
-
const isDuplication = layoutMode === LayoutModes.Ark && DID;
|
|
902
|
-
if (isDuplication)
|
|
903
|
-
onClose?.();
|
|
904
|
-
}
|
|
905
|
-
catch (err) {
|
|
906
|
-
TMExceptionBoxManager.show({ exception: err });
|
|
907
|
-
}
|
|
908
|
-
finally {
|
|
909
|
-
setWaitPanelTextPrimaryLocal('');
|
|
910
|
-
setWaitPanelMaxValuePrimaryLocal(0);
|
|
911
|
-
setWaitPanelValuePrimaryLocal(0);
|
|
912
|
-
setWaitPanelTextSecondaryLocal('');
|
|
913
|
-
setWaitPanelMaxValueSecondaryLocal(0);
|
|
914
|
-
setWaitPanelValueSecondaryLocal(0);
|
|
915
|
-
setShowWaitPanelLocal(false);
|
|
916
|
-
setUseWaitPanelLocalState(false);
|
|
917
|
-
}
|
|
918
|
-
}, [TID, connectorFileSave, onSavedAsyncCallback, onSaveRecents, onClose, DID, setMetadataList, handleReset, layoutMode, isSharedDcmt]);
|
|
919
|
-
const handleClearForm = useCallback(() => {
|
|
920
|
-
let data = structuredClone(formData);
|
|
921
|
-
if (!data || data.length === 0)
|
|
922
|
-
return;
|
|
923
|
-
for (let md of data) {
|
|
924
|
-
if (!md.mid)
|
|
925
|
-
continue;
|
|
926
|
-
if (md.mid > 99) {
|
|
927
|
-
const defaultValue = md.md?.defaultValue;
|
|
928
|
-
if (defaultValue) {
|
|
929
|
-
if (FormulaHelper.isFormula(defaultValue)) {
|
|
930
|
-
md.value = undefined;
|
|
931
|
-
}
|
|
932
|
-
else {
|
|
933
|
-
md.value = defaultValue;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
else if (formDataOrig.find(metadata => metadata.mid === md.mid)?.value === undefined) {
|
|
937
|
-
if (md.value)
|
|
938
|
-
md.value = undefined;
|
|
939
|
-
}
|
|
940
|
-
else if (md.value && md.value.length > 0) {
|
|
941
|
-
md.value = '';
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
setFormData(data);
|
|
946
|
-
}, [formData, formDataOrig]);
|
|
947
|
-
const clearFormBtnDisabled = useMemo(() => formData.filter(md => md.mid && md.value && md.mid > 99 && md.value.length > 0).length > 0, [formData]);
|
|
948
|
-
const archiveBtnDisabled = useMemo(() => layoutMode === LayoutModes.Update || (fromDTD?.archiveConstraint === ArchiveConstraints.ContentCompulsory && !dcmtFile) || validationItems.length > 0, [layoutMode, fromDTD?.archiveConstraint, dcmtFile, validationItems.length]);
|
|
949
|
-
const undoBtnDisabled = useMemo(() => layoutMode === LayoutModes.Update || !isModified, [layoutMode, isModified]);
|
|
950
|
-
const listMaxItems = useMemo(() => getListMaxItems(deviceType ?? DeviceType.DESKTOP), [deviceType]);
|
|
951
|
-
const totalItems = useMemo(() => formData.filter(o => o.mid && o.mid > 100).length, [formData]);
|
|
952
|
-
const metadataValuesSource = useMemo(() => {
|
|
953
|
-
return applyMetadataFilter(formData, showAll, listMaxItems, TID);
|
|
954
|
-
}, [showAll, formData, listMaxItems, TID]);
|
|
955
|
-
const metadataValuesSourceOrig = useMemo(() => {
|
|
956
|
-
return applyMetadataFilter(formDataOrig, showAll, listMaxItems, TID);
|
|
957
|
-
}, [showAll, formDataOrig, listMaxItems, TID]);
|
|
958
|
-
const handleClose = useCallback(() => {
|
|
959
|
-
if (!isModified) {
|
|
960
|
-
onClose?.();
|
|
961
|
-
return;
|
|
962
|
-
}
|
|
963
|
-
TMMessageBoxManager.show({
|
|
964
|
-
parentId: isModal ? "TMDcmtFormShowConfirmForClose-" + id : undefined,
|
|
965
|
-
message: SDKUI_Localizator.SaveQuestion, buttons: [ButtonNames.YES, ButtonNames.NO, ButtonNames.CANCEL],
|
|
966
|
-
onButtonClick: async (e) => {
|
|
967
|
-
try {
|
|
968
|
-
if (e == ButtonNames.CANCEL)
|
|
969
|
-
return;
|
|
970
|
-
if (e == ButtonNames.YES)
|
|
971
|
-
await handleSave();
|
|
972
|
-
onClose?.();
|
|
973
|
-
}
|
|
974
|
-
catch (ex) {
|
|
975
|
-
TMExceptionBoxManager.show({ exception: ex });
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
}, [isModified, onClose, isModal, id, handleSave]);
|
|
980
|
-
const getFormula = useCallback(() => {
|
|
981
|
-
let fd = new FormulaDescriptor();
|
|
982
|
-
fd.expression = FormulaHelper.isFormula(focusedMetadataValue?.value) ? FormulaHelper.removeFormulaTag(focusedMetadataValue?.value) : undefined;
|
|
983
|
-
fd.formulaTarget = FormulaTargets.BatchUpdate;
|
|
984
|
-
fd.items = FormulaHelper.TreeViewList(TID ?? 0, getSystemMetadata(true), undefined, FormulaTargets.BatchUpdate, SDK_Globals.dbBrand);
|
|
985
|
-
fd.mid = focusedMetadataValue?.mid ?? 0;
|
|
986
|
-
fd.tid = TID;
|
|
987
|
-
return fd;
|
|
988
|
-
}, [focusedMetadataValue?.value, focusedMetadataValue?.mid, TID]);
|
|
989
|
-
const handleWFOperationCompleted = useCallback(async () => {
|
|
990
|
-
await onWFOperationCompleted?.();
|
|
991
|
-
onClose?.();
|
|
992
|
-
}, [onWFOperationCompleted, onClose]);
|
|
993
|
-
// Determina se showAll deve essere automaticamente true
|
|
994
|
-
// Best practice: usa useMemo per calcolare valori derivati invece di useEffect con setState
|
|
995
|
-
const shouldShowAll = useMemo(() => {
|
|
996
|
-
// Mostra sempre tutti i metadati se:
|
|
997
|
-
// 1. È presente un layout personalizzato (per renderizzare correttamente la gerarchia)
|
|
998
|
-
// 2. È una vista di approvazione workflow
|
|
999
|
-
// 3. È il tipo documento Drafts
|
|
1000
|
-
const hasCustomLayout = layout && layout.items && layout.items.length > 0;
|
|
1001
|
-
return hasCustomLayout || isApprView || TID === SystemTIDs.Drafts;
|
|
1002
|
-
}, [layout, isApprView, TID]);
|
|
1003
|
-
// Aggiorna showAll quando shouldShowAll cambia
|
|
1004
|
-
useEffect(() => {
|
|
1005
|
-
if (shouldShowAll && !showAll) {
|
|
1006
|
-
setShowAll(true);
|
|
1007
|
-
}
|
|
1008
|
-
}, [shouldShowAll, showAll]);
|
|
1009
|
-
const afterTaskSaved = useCallback(async (task, formMode, forceRefresh = false) => {
|
|
1010
|
-
const shouldRefresh = forceRefresh || (task && task.state === Task_States.Completed) || formMode === FormModes.Create || formMode === FormModes.Duplicate;
|
|
1011
|
-
if (TID && DID && shouldRefresh) {
|
|
1012
|
-
await triggerBlogRefresh();
|
|
1013
|
-
}
|
|
1014
|
-
}, [TID, DID, triggerBlogRefresh]);
|
|
1015
|
-
const tmDcmtForm = useMemo(() => {
|
|
1016
|
-
return _jsx(_Fragment, { children: metadataValuesSource.length > 0 &&
|
|
1017
|
-
_jsxs(StyledToolbarCardContainer, { children: [_jsx(TMMetadataValues, { TID: TID, metadataValues: metadataValuesSource, metadataValuesOrig: metadataValuesSourceOrig, isExpertMode: isExpertMode, isOpenDistinctValues: isOpenDistinctValues, openChooserBySingleClick: !isOpenDistinctValues, selectedMID: focusedMetadataValue?.mid, isReadOnly: formMode === FormModes.ReadOnly, layoutMode: layoutMode, deviceType: deviceType, validationItems: validationItems, inputMids: inputMids, layout: layout, onFocusedItemChanged: (item) => { (item?.mid !== focusedMetadataValue?.mid) && setFocusedMetadataValue(item); }, onValueChanged: (newItems) => {
|
|
1018
|
-
setFormData((prevItems) => prevItems.map((item) => {
|
|
1019
|
-
const newItem = newItems.find((newItem) => newItem.tid === item.tid && newItem.mid === item.mid);
|
|
1020
|
-
return newItem ? { ...item, ...newItem } : item;
|
|
1021
|
-
}));
|
|
1022
|
-
}, onAdvancedMenuClick: (e) => {
|
|
1023
|
-
switch (e.button) {
|
|
1024
|
-
case AdvancedMenuButtons.DistinctValues:
|
|
1025
|
-
setIsOpenDistinctValues(!isOpenDistinctValues);
|
|
1026
|
-
break;
|
|
1027
|
-
case AdvancedMenuButtons.FormulaEditor:
|
|
1028
|
-
setIsOpenFormulaEditor(!isOpenFormulaEditor);
|
|
1029
|
-
break;
|
|
1030
|
-
}
|
|
1031
|
-
} }), _jsxs(StyledFormButtonsContainer, { children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: 10 }, children: _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: layoutMode === LayoutModes.Update ? _jsxs(_Fragment, { children: [_jsx(TMSaveFormButtonSave, { showTooltip: false, btnStyle: 'advanced', advancedColor: '#f09c0a', isModified: isModified, formMode: formMode, errorsCount: validationItems.filter(o => o.ResultType == ResultTypes.ERROR).length, onSaveAsync: handleConfirmAction }), _jsx(TMSaveFormButtonUndo, { btnStyle: 'toolbar', showTooltip: true, color: 'primary', isModified: isModified, formMode: formMode, onUndo: handleUndo })] }) :
|
|
1032
|
-
_jsxs(_Fragment, { children: [_jsx(TMButton, { disabled: archiveBtnDisabled, btnStyle: 'advanced', icon: _jsx(IconBoxArchiveIn, {}), width: 'auto', showTooltip: false, caption: SDKUI_Localizator.Archive, advancedColor: TMColors.success, onClick: handleConfirmAction }), _jsx(TMButton, { disabled: !clearFormBtnDisabled, btnStyle: 'advanced', icon: _jsx(IconClear, {}), width: 'auto', showTooltip: false, caption: SDKUI_Localizator.Clear, advancedColor: TMColors.tertiary, onClick: handleClearForm }), DID && _jsx(TMButton, { disabled: undoBtnDisabled, btnStyle: 'advanced', icon: _jsx(IconUndo, {}), width: '150px', showTooltip: false, caption: SDKUI_Localizator.Undo, advancedColor: TMColors.tertiary, onClick: handleUndo })] }) }) }), customButton && _jsx(TMCustomButton, { button: customButton, formData: formData, selectedItems: [], onClose: () => setCustomButton(undefined) }), totalItems > listMaxItems &&
|
|
1033
|
-
!isApprView &&
|
|
1034
|
-
TID !== SystemTIDs.Drafts &&
|
|
1035
|
-
!shouldShowAll &&
|
|
1036
|
-
_jsx(TMShowAllOrMaxItemsButton, { showAll: showAll, dataSourceLength: totalItems, onClick: () => { setShowAll(!showAll); } })] }), _jsx(ConfirmAttachmentsDialog, {})] }) });
|
|
1037
|
-
}, [
|
|
1038
|
-
TID,
|
|
1039
|
-
DID,
|
|
1040
|
-
metadataValuesSource,
|
|
1041
|
-
metadataValuesSourceOrig,
|
|
1042
|
-
isExpertMode,
|
|
1043
|
-
isOpenDistinctValues,
|
|
1044
|
-
focusedMetadataValue?.mid,
|
|
1045
|
-
formMode,
|
|
1046
|
-
layoutMode,
|
|
1047
|
-
deviceType,
|
|
1048
|
-
validationItems,
|
|
1049
|
-
inputMids,
|
|
1050
|
-
layout,
|
|
1051
|
-
isModified,
|
|
1052
|
-
archiveBtnDisabled,
|
|
1053
|
-
clearFormBtnDisabled,
|
|
1054
|
-
undoBtnDisabled,
|
|
1055
|
-
totalItems,
|
|
1056
|
-
listMaxItems,
|
|
1057
|
-
isApprView,
|
|
1058
|
-
shouldShowAll,
|
|
1059
|
-
showAll,
|
|
1060
|
-
handleConfirmAction,
|
|
1061
|
-
handleUndo,
|
|
1062
|
-
handleClearForm
|
|
1063
|
-
]);
|
|
1064
|
-
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: TID, did: DID, allTasks: allTasks, fetchBlogDataTrigger: refreshBlogTrigger, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [TID, DID, allTasks, refreshBlogTrigger]);
|
|
1065
|
-
const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: layoutMode, openChooserBySingleClick: !isOpenDistinctValues, TID: TID, isReadOnly: true, deviceType: deviceType, metadataValues: formData.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: formData.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [], inputMids: inputMids }), [TID, layoutMode, formData, deviceType, inputMids]);
|
|
1066
|
-
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt, dcmtFile: dcmtFile ?? inputFile, deviceType: deviceType, fromDTD: fromDTD, layoutMode: layoutMode, onFileUpload: (file) => {
|
|
1067
|
-
setDcmtFile(file);
|
|
1068
|
-
}, enableDragDropOverlay: enableDragDropOverlay }), [currentDcmt, dcmtFile, deviceType, fromDTD, layoutMode, inputFile, enableDragDropOverlay, setDcmtFile]);
|
|
1069
|
-
const tmWF = useMemo(() => {
|
|
1070
|
-
if (isWFDataLoading) {
|
|
1071
|
-
return (_jsx("div", { style: {
|
|
1072
|
-
display: 'flex',
|
|
1073
|
-
alignItems: 'center',
|
|
1074
|
-
justifyContent: 'center',
|
|
1075
|
-
width: '100%',
|
|
1076
|
-
height: '100%',
|
|
1077
|
-
minHeight: '200px'
|
|
1078
|
-
}, children: _jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento dati workflow'}...` })] }) }));
|
|
1079
|
-
}
|
|
1080
|
-
const isAuthorized = !!workflows?.[0]?.diagram;
|
|
1081
|
-
return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 3 }, children: [workItems.length > 0
|
|
1082
|
-
? (isAuthorized
|
|
1083
|
-
? _jsx(WFDiagram, { xmlDiagramString: workflows?.[0]?.diagram || '', allowEdit: false, currentSetID: workitemSetID })
|
|
1084
|
-
: _jsx("div", { style: {
|
|
1085
|
-
position: 'absolute',
|
|
1086
|
-
top: '50%',
|
|
1087
|
-
left: '50%',
|
|
1088
|
-
transform: 'translate(-50%, -50%)',
|
|
1089
|
-
fontSize: '1.1rem',
|
|
1090
|
-
color: TMColors.primaryColor,
|
|
1091
|
-
textAlign: 'center',
|
|
1092
|
-
}, children: SDKUI_Localizator.WorkflowDiagramNotAuthorized }))
|
|
1093
|
-
: _jsx("div", { style: {
|
|
1094
|
-
position: 'absolute',
|
|
1095
|
-
top: '50%',
|
|
1096
|
-
left: '50%',
|
|
1097
|
-
transform: 'translate(-50%, -50%)',
|
|
1098
|
-
fontSize: '1.1rem',
|
|
1099
|
-
color: TMColors.primaryColor,
|
|
1100
|
-
textAlign: 'center',
|
|
1101
|
-
}, children: SDKUI_Localizator.WorkitemsToApproveNone }), isAuthorized && !workitemSetID && workItems.length > 0 &&
|
|
1102
|
-
_jsx("div", { style: {
|
|
1103
|
-
padding: 5,
|
|
1104
|
-
backgroundColor: 'khaki',
|
|
1105
|
-
borderRadius: 8
|
|
1106
|
-
}, children: SDKUI_Localizator.WorkItemTechnicalNote_SetID })] }));
|
|
1107
|
-
}, [workflows, formData, workitemSetID, workItems, isWFDataLoading]);
|
|
1108
|
-
const tmDcmtTasks = useMemo(() => {
|
|
1109
|
-
const isReady = TID && DID && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback;
|
|
1110
|
-
if (!isReady) {
|
|
1111
|
-
return _jsx(TMToppyMessage, { message: SDKUI_Localizator.TasksEmpty });
|
|
1112
|
-
}
|
|
1113
|
-
return (_jsx(TMDcmtTasks, { taskContext: {
|
|
1114
|
-
document: {
|
|
1115
|
-
tid: Number(TID),
|
|
1116
|
-
did: Number(DID),
|
|
1117
|
-
name: fromDTD?.nameLoc ?? SDKUI_Localizator.Widget_Activities,
|
|
1118
|
-
},
|
|
1119
|
-
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, afterTaskSaved: afterTaskSaved }));
|
|
1120
|
-
}, [allTasks, TID, DID, fromDTD]);
|
|
1121
|
-
const normalizedTID = TID !== undefined ? Number(TID) : undefined;
|
|
1122
|
-
const defaultPanelDimensions = {
|
|
1123
|
-
'tmDcmtForm': { width: '16.66%', height: '100%' },
|
|
1124
|
-
'tmBlog': { width: '16.66%', height: '100%' },
|
|
1125
|
-
'tmSysMetadata': { width: '16.66%', height: '100%' },
|
|
1126
|
-
'tmDcmtPreview': { width: '16.66%', height: '100%' },
|
|
1127
|
-
'tmWF': { width: '16.66%', height: '100%' },
|
|
1128
|
-
'tmDcmtTasks': { width: '16.66%', height: '100%' },
|
|
1129
|
-
};
|
|
1130
|
-
const allInitialPanelVisibility = {
|
|
1131
|
-
'tmDcmtForm': true,
|
|
1132
|
-
'tmBlog': false,
|
|
1133
|
-
'tmSysMetadata': false,
|
|
1134
|
-
'tmDcmtPreview': true,
|
|
1135
|
-
'tmWF': false,
|
|
1136
|
-
'tmDcmtTasks': false,
|
|
1137
|
-
};
|
|
1138
|
-
const initialPanels = useMemo(() => [
|
|
1139
|
-
{
|
|
1140
|
-
id: 'tmDcmtForm',
|
|
1141
|
-
name: SDK_Localizator.Metadatas,
|
|
1142
|
-
contentOptions: {
|
|
1143
|
-
component: tmDcmtForm,
|
|
1144
|
-
isClosable: isClosable,
|
|
1145
|
-
panelContainer: {
|
|
1146
|
-
showHeader: showHeader,
|
|
1147
|
-
title: fromDTD?.nameLoc,
|
|
1148
|
-
allowMaximize: !isMobile,
|
|
1149
|
-
onBack: showBackButton ? (isClosable && deviceType !== DeviceType.MOBILE) ? undefined : handleClose : undefined,
|
|
1150
|
-
onClose: isClosable ? () => { } : undefined,
|
|
1151
|
-
toolbar: allowNavigation ? formToolbar : _jsx(_Fragment, {})
|
|
1152
|
-
},
|
|
1153
|
-
},
|
|
1154
|
-
toolbarOptions: {
|
|
1155
|
-
icon: _jsx(IconPreview, { fontSize: 24 }),
|
|
1156
|
-
visible: true,
|
|
1157
|
-
orderNumber: 1,
|
|
1158
|
-
isActive: allInitialPanelVisibility['tmDcmtForm']
|
|
1159
|
-
}
|
|
1160
|
-
},
|
|
1161
|
-
{
|
|
1162
|
-
id: 'tmBlog',
|
|
1163
|
-
name: SDKUI_Localizator.BlogCase,
|
|
1164
|
-
contentOptions: { component: tmBlog, panelContainer: { title: SDKUI_Localizator.BlogCase, allowMaximize: !isMobile } },
|
|
1165
|
-
toolbarOptions: {
|
|
1166
|
-
icon: _jsx(IconBoard, { fontSize: 24 }),
|
|
1167
|
-
visible: true,
|
|
1168
|
-
disabled: isBoardDisabled,
|
|
1169
|
-
orderNumber: 2,
|
|
1170
|
-
isActive: allInitialPanelVisibility['tmBlog']
|
|
1171
|
-
}
|
|
1172
|
-
},
|
|
1173
|
-
{
|
|
1174
|
-
id: 'tmSysMetadata',
|
|
1175
|
-
name: SDKUI_Localizator.MetadataSystem,
|
|
1176
|
-
contentOptions: { component: tmSysMetadata, panelContainer: { title: SDKUI_Localizator.MetadataSystem, allowMaximize: !isMobile } },
|
|
1177
|
-
toolbarOptions: { icon: _jsx(IconDcmtTypeSys, { fontSize: 24 }), visible: true, disabled: isSysMetadataDisabled, orderNumber: 3, isActive: allInitialPanelVisibility['tmSysMetadata'] }
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
id: 'tmDcmtPreview',
|
|
1181
|
-
name: SDKUI_Localizator.PreviewDocument,
|
|
1182
|
-
contentOptions: { component: tmDcmtPreview },
|
|
1183
|
-
toolbarOptions: { icon: _jsx(IconShow, { fontSize: 24 }), disabled: isPreviewDisabled, visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['tmDcmtPreview'] }
|
|
1184
|
-
},
|
|
1185
|
-
{
|
|
1186
|
-
id: 'tmWF',
|
|
1187
|
-
name: "Workflow",
|
|
1188
|
-
contentOptions: {
|
|
1189
|
-
component: tmWF,
|
|
1190
|
-
panelContainer: {
|
|
1191
|
-
title: "Workflow", allowMaximize: !isMobile
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
toolbarOptions: {
|
|
1195
|
-
icon: _jsx(IconWorkflow, { fontSize: 24 }),
|
|
1196
|
-
visible: true,
|
|
1197
|
-
disabled: isWFDisabled,
|
|
1198
|
-
orderNumber: 5,
|
|
1199
|
-
isActive: allInitialPanelVisibility['tmWF']
|
|
1200
|
-
}
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
id: 'tmDcmtTasks',
|
|
1204
|
-
name: SDKUI_Localizator.Widget_Activities,
|
|
1205
|
-
contentOptions: {
|
|
1206
|
-
component: tmDcmtTasks,
|
|
1207
|
-
},
|
|
1208
|
-
toolbarOptions: {
|
|
1209
|
-
icon: _jsx(IconActivity, { fontSize: 24 }),
|
|
1210
|
-
visible: layoutMode !== LayoutModes.Ark,
|
|
1211
|
-
orderNumber: 6,
|
|
1212
|
-
isActive: allInitialPanelVisibility['tmDcmtTasks'],
|
|
1213
|
-
count: (TID && DID && allTasks && allTasks.length > 0) ?
|
|
1214
|
-
getTaskAssignedToMe(allTasks).filter(task => task.iD1?.toString() === TID.toString()
|
|
1215
|
-
&& task.iD2?.toString() === DID.toString()
|
|
1216
|
-
&& task.state !== Task_States.Completed).length ?? 0
|
|
1217
|
-
: 0
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
], [fromDTD, showBackButton, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, tmDcmtTasks, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable, allTasks, DID, TID]);
|
|
1221
|
-
// Retrieves the current document form setting based on the normalized TID
|
|
1222
|
-
const getCurrentDcmtFormSetting = () => {
|
|
1223
|
-
const settings = SDKUI_Globals.userSettings.dcmtFormSettings;
|
|
1224
|
-
// Find the index of the setting that matches the normalized TID
|
|
1225
|
-
const idx = settings.findIndex(s => Number(s.TID) === normalizedTID);
|
|
1226
|
-
// Return both the index and the corresponding setting (or empty object if not found)
|
|
1227
|
-
return { idx, setting: settings[idx] ?? {} };
|
|
1228
|
-
};
|
|
1229
|
-
// Checks if there's a saved panel layout for the current context (ToDo or general)
|
|
1230
|
-
const hasSavedLayout = () => {
|
|
1231
|
-
const { setting } = getCurrentDcmtFormSetting();
|
|
1232
|
-
if (invokedByTodo) {
|
|
1233
|
-
// If invoked by ToDo, check for existence of layoutToDo and that it has keys
|
|
1234
|
-
return setting.layoutToDo !== undefined && Object.keys(setting.layoutToDo).length > 0;
|
|
1235
|
-
}
|
|
1236
|
-
else {
|
|
1237
|
-
// Otherwise, check for general layout
|
|
1238
|
-
return setting.layout !== undefined && Object.keys(setting.layout).length > 0;
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
// Persists the current panel states (layout) into user settings
|
|
1242
|
-
const persistPanelStates = (state) => {
|
|
1243
|
-
// If no valid TID or empty state, skip saving
|
|
1244
|
-
if (normalizedTID === undefined || Object.keys(state).length === 0)
|
|
1245
|
-
return;
|
|
1246
|
-
const settings = SDKUI_Globals.userSettings.dcmtFormSettings;
|
|
1247
|
-
const { idx, setting: existingSetting } = getCurrentDcmtFormSetting();
|
|
1248
|
-
// Prepare the new setting object with updated layout depending on context
|
|
1249
|
-
const newSetting = {
|
|
1250
|
-
TID: normalizedTID,
|
|
1251
|
-
layout: invokedByTodo ? (existingSetting.layout ?? {}) : state,
|
|
1252
|
-
layoutToDo: invokedByTodo ? state : (existingSetting.layoutToDo ?? {}),
|
|
1253
|
-
};
|
|
1254
|
-
// Replace existing setting if found, otherwise push a new one
|
|
1255
|
-
if (idx >= 0) {
|
|
1256
|
-
settings[idx] = newSetting;
|
|
1257
|
-
}
|
|
1258
|
-
else {
|
|
1259
|
-
settings.push(newSetting);
|
|
1260
|
-
}
|
|
1261
|
-
// Assign the updated settings array back to the global settings
|
|
1262
|
-
SDKUI_Globals.userSettings.dcmtFormSettings = [...settings];
|
|
1263
|
-
};
|
|
1264
|
-
// Retrieves the persisted panel states (layout) for the current context
|
|
1265
|
-
const getPersistedPanelStates = () => {
|
|
1266
|
-
// Do not return layout on mobile devices
|
|
1267
|
-
if (isMobile)
|
|
1268
|
-
return undefined;
|
|
1269
|
-
const settings = getCurrentDcmtFormSetting()?.setting;
|
|
1270
|
-
// Return the appropriate layout based on context
|
|
1271
|
-
return invokedByTodo ? settings?.layoutToDo : settings?.layout;
|
|
1272
|
-
};
|
|
1273
|
-
const handleCompleteMoreInfo = useCallback(async () => {
|
|
1274
|
-
try {
|
|
1275
|
-
TMSpinner.show();
|
|
1276
|
-
let newTask = { ...taskMoreInfo, state: Task_States.Completed };
|
|
1277
|
-
await SDK_Globals.tmSession?.NewTaskEngine().UpdateAsync(newTask);
|
|
1278
|
-
onTaskCompleted?.(newTask);
|
|
1279
|
-
onClose?.();
|
|
1280
|
-
ShowAlert({ mode: 'success', title: SDKUI_Localizator.MoreInformation, message: SDKUI_Localizator.MoreInfoCompleted, duration: 3000 });
|
|
1281
|
-
}
|
|
1282
|
-
catch (e) {
|
|
1283
|
-
TMSpinner.hide();
|
|
1284
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
1285
|
-
}
|
|
1286
|
-
finally {
|
|
1287
|
-
TMSpinner.hide();
|
|
1288
|
-
}
|
|
1289
|
-
}, [taskMoreInfo, onTaskCompleted, onClose]);
|
|
1290
|
-
const handleSignApprove = useCallback(() => {
|
|
1291
|
-
if (onOpenS4TViewerRequest && TID && DID) {
|
|
1292
|
-
onOpenS4TViewerRequest([{ TID, DID }]);
|
|
1293
|
-
return;
|
|
1294
|
-
}
|
|
1295
|
-
ShowAlert({
|
|
1296
|
-
message: "TODO",
|
|
1297
|
-
mode: "info",
|
|
1298
|
-
duration: 3000,
|
|
1299
|
-
title: SDKUI_Localizator.SignatureAndApprove,
|
|
1300
|
-
});
|
|
1301
|
-
}, [onOpenS4TViewerRequest, TID, DID]);
|
|
1302
|
-
const handleNavigateToReference = useCallback((ref) => {
|
|
1303
|
-
if (onReferenceClick) {
|
|
1304
|
-
try {
|
|
1305
|
-
onReferenceClick(ref);
|
|
1306
|
-
}
|
|
1307
|
-
catch (e) {
|
|
1308
|
-
console.error('onReferenceClick handler failed', e);
|
|
1309
|
-
}
|
|
1310
|
-
return;
|
|
1311
|
-
}
|
|
1312
|
-
}, [onReferenceClick]);
|
|
1313
|
-
// Mapping for objClass specific label/action. Easy to extend for future objClass types.
|
|
1314
|
-
const referenceActionMap = useMemo(() => ({
|
|
1315
|
-
[ObjectClasses.Dossier]: { label: 'Vai a pratica' },
|
|
1316
|
-
[ObjectClasses.WorkingGroup]: { label: 'Vai a gruppo di lavoro' },
|
|
1317
|
-
// add other ObjectClasses here as needed
|
|
1318
|
-
}), []);
|
|
1319
|
-
const renderDcmtForm = () => {
|
|
1320
|
-
// Show flat spinner during initial load (before component is mounted)
|
|
1321
|
-
if (isInitialLoading) {
|
|
1322
|
-
return _jsx(Spinner, { description: SDKUI_Localizator.Loading, flat: true });
|
|
1323
|
-
}
|
|
1324
|
-
return (_jsxs("div", { style: {
|
|
1325
|
-
display: 'flex',
|
|
1326
|
-
flexDirection: deviceType === DeviceType.MOBILE ? 'column' : 'row',
|
|
1327
|
-
justifyContent: 'space-between',
|
|
1328
|
-
gap: Gutters.getGutters(),
|
|
1329
|
-
width: '100%',
|
|
1330
|
-
height: '100%',
|
|
1331
|
-
position: 'relative',
|
|
1332
|
-
overflow: 'hidden'
|
|
1333
|
-
}, children: [_jsxs("div", { style: { width: '100%', height: '100%', display: isOpenDetails || isOpenMaster ? 'none' : 'flex' }, children: [isNavigating && _jsx(Spinner, { description: SDKUI_Localizator.Loading, flat: false }), (fromDTD) && _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: useWaitPanelLocalState ? showWaitPanelLocal : showWaitPanel, showWaitPanelPrimary: useWaitPanelLocalState ? showPrimaryLocal : showPrimary, showWaitPanelSecondary: useWaitPanelLocalState ? showSecondaryLocal : showSecondary, waitPanelTitle: useWaitPanelLocalState ? waitPanelTitleLocal : waitPanelTitle, waitPanelTextPrimary: useWaitPanelLocalState ? waitPanelTextPrimaryLocal : waitPanelTextPrimary, waitPanelValuePrimary: useWaitPanelLocalState ? waitPanelValuePrimaryLocal : waitPanelValuePrimary, waitPanelMaxValuePrimary: useWaitPanelLocalState ? waitPanelMaxValuePrimaryLocal : waitPanelMaxValuePrimary, waitPanelTextSecondary: useWaitPanelLocalState ? waitPanelTextSecondaryLocal : waitPanelTextSecondary, waitPanelValueSecondary: useWaitPanelLocalState ? waitPanelValueSecondaryLocal : waitPanelValueSecondary, waitPanelMaxValueSecondary: useWaitPanelLocalState ? waitPanelMaxValueSecondaryLocal : waitPanelMaxValueSecondary, isCancelable: useWaitPanelLocalState ? dcmtFile ? dcmtFile.size >= 1000000 : false : true, abortController: useWaitPanelLocalState ? abortControllerLocal : abortController, children: [(groupId && groupId.length > 0)
|
|
1334
|
-
? _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })
|
|
1335
|
-
: _jsxs(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: [_jsx(WfButtonStateHandler, { isWFDisabled: isWFDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] }), isOpenDistinctValues &&
|
|
1336
|
-
_jsx(TMDistinctValues, { tid: TID, mid: focusedMetadataValue?.mid, isModal: true, showHeader: false, layoutMode: layoutMode, onSelectionChanged: (e) => {
|
|
1337
|
-
if (!e)
|
|
1338
|
-
return;
|
|
1339
|
-
setFormData((prevItems) => prevItems.map((item) => item.tid == e.tid && item.mid === e.mid ? { ...item, value: e.newValue } : item));
|
|
1340
|
-
} }), isOpenFormulaEditor &&
|
|
1341
|
-
_jsx(TMFormulaEditor, { isModal: true, formMode: FormModes.Update, inputData: getFormula(), showBack: false, onClose: () => setIsOpenFormulaEditor(false), onApplied: (newFormula) => {
|
|
1342
|
-
setFormData((prevItems) => prevItems.map((item) => item.tid == newFormula.tid && item.mid === newFormula.mid ? { ...item, value: FormulaHelper.addFormulaTag(newFormula.expression), isSelected: true, isEditable: true } : item));
|
|
1343
|
-
setFocusedMetadataValue(prevState => ({
|
|
1344
|
-
...prevState,
|
|
1345
|
-
isSelected: true,
|
|
1346
|
-
isEditable: true,
|
|
1347
|
-
value: FormulaHelper.addFormulaTag(newFormula.expression)
|
|
1348
|
-
}));
|
|
1349
|
-
} }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowMoreInfoPopup(false) }), (isModal && onClose) && _jsx("div", { id: "TMDcmtFormShowConfirmForClose-" + id })] }), _jsx(ToppyDraggableHelpCenter, { initialIsCollapsed: false, deviceType: deviceType, isVisible: (showToppyForApprove || showToppyForCompleteMoreInfo || showToppyForReferences) && !openS4TViewer, content: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [showToppyForApprove && (workItems.length === 1 ?
|
|
1350
|
-
_jsx(WorkFlowOperationButtons, { deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onSignApprove: handleSignApprove, onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), onMoreInfo: () => setShowMoreInfoPopup(true), dtd: fromDTD })
|
|
1351
|
-
:
|
|
1352
|
-
_jsxs("div", { style: { padding: 10, color: 'white', maxWidth: '180px', borderRadius: 10, background: '#1B1464 0% 0% no-repeat padding-box', border: '1px solid #FFFFFF' }, children: [`Devi approvare ${workItems.length} workitem(s) per questo documento.`, `Vai alla sezione di approvazione.`] })), showToppyForCompleteMoreInfo && (_jsxs(_Fragment, { children: [_jsx("div", { style: { padding: 10, color: 'white', maxWidth: '180px', borderRadius: 10, background: '#1B1464 0% 0% no-repeat padding-box', border: '1px solid #FFFFFF' }, children: `${SDKUI_Localizator.MoreInfoCompleteRequestSentBy} ${taskMoreInfo?.fromName}!` }), _jsx(TMButton, { caption: SDKUI_Localizator.CommentAndComplete, color: 'success', showTooltip: false, onClick: () => {
|
|
1353
|
-
setShowCommentForm(true);
|
|
1354
|
-
} })] })), (showToppyForReferences && (dcmtReferences && dcmtReferences.length > 0)) && dcmtReferences
|
|
1355
|
-
.filter(ref => ref.objClass === ObjectClasses.Dossier || ref.objClass === ObjectClasses.WorkingGroup) // keep only known objClass types
|
|
1356
|
-
.map((ref, index, arr) => {
|
|
1357
|
-
const mapEntry = referenceActionMap[String(ref.objClass)];
|
|
1358
|
-
const label = mapEntry?.label ?? 'Vai a riferimento';
|
|
1359
|
-
return (_jsxs(React.Fragment, { children: [index === 0 && (showToppyForApprove || showToppyForCompleteMoreInfo) && (_jsx("div", { style: {
|
|
1360
|
-
height: 1,
|
|
1361
|
-
backgroundColor: 'rgba(255,255,255,0.2)',
|
|
1362
|
-
margin: '6px 0'
|
|
1363
|
-
} })), _jsxs(StyledReferenceButton, { onClick: () => handleNavigateToReference(ref), onDoubleClick: (e) => { e.preventDefault(); e.stopPropagation(); }, children: [_jsx("span", { children: label }), _jsx("span", { children: `"${ref.objName}"` })] }, `ref-${index}-${ref.objID}`)] }, `ref-frag-${index}-${ref.objID}`));
|
|
1364
|
-
})] }) })] }), (showCommentForm && TID && DID) &&
|
|
1365
|
-
_jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: TID, did: DID } }, onClose: () => setShowCommentForm(false), refreshCallback: handleCompleteMoreInfo, participants: [], showAttachmentsSection: false, allArchivedDocumentsFileItems: [] }), isOpenDetails &&
|
|
1366
|
-
_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenMaster &&
|
|
1367
|
-
_jsxs(StyledModalContainer, { children: [_jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
1368
|
-
return (_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }, `${index}-${dcmt.DID}`));
|
|
1369
|
-
})] }), taskFormDialogComponent, s4TViewerDialogComponent] }));
|
|
1370
|
-
};
|
|
1371
|
-
return (_jsxs(_Fragment, { children: [(isModal && onClose)
|
|
1372
|
-
? _jsx(TMModal, { title: titleModal, onClose: handleClose, width: widthModal ?? '100%', height: heightModal ?? '100%', hidePopup: false, askClosingConfirm: true, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block', padding: "4px", position: 'relative' }, children: renderDcmtForm() }) })
|
|
1373
|
-
: renderDcmtForm(), showRelatedDcmtsChooser && (_jsx(TMChooserForm, { dataSource: relatedDcmtsChooserDataSource, onChoose: async (selectedRelation) => {
|
|
1374
|
-
try {
|
|
1375
|
-
setShowRelatedDcmtsChooser(false);
|
|
1376
|
-
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
1377
|
-
const relation = relatedDcmts?.find(r => r.id === selectedRelation[0]);
|
|
1378
|
-
if (!relation || !archiveType)
|
|
1379
|
-
return;
|
|
1380
|
-
await archiveRelatedDcmtHandler(relation, archiveType);
|
|
1381
|
-
}
|
|
1382
|
-
catch (error) {
|
|
1383
|
-
TMExceptionBoxManager.show({ exception: error });
|
|
1384
|
-
}
|
|
1385
|
-
finally {
|
|
1386
|
-
TMSpinner.hide();
|
|
1387
|
-
}
|
|
1388
|
-
}, onClose: () => setShowRelatedDcmtsChooser(false), manageUseLocalizedName: false })), showManyToManyChooser && (_jsx(TMChooserForm, { dataSource: manyToManyChooserDataSource, onChoose: async (selectedRelation) => {
|
|
1389
|
-
try {
|
|
1390
|
-
setShowManyToManyChooser(false);
|
|
1391
|
-
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
1392
|
-
const relation = manyToManyRelations?.find(r => r.id === selectedRelation[0]);
|
|
1393
|
-
if (!relation)
|
|
1394
|
-
return;
|
|
1395
|
-
await executeManyToManyPairing(relation, isPairingManyToMany);
|
|
1396
|
-
}
|
|
1397
|
-
catch (error) {
|
|
1398
|
-
TMExceptionBoxManager.show({ exception: error });
|
|
1399
|
-
}
|
|
1400
|
-
finally {
|
|
1401
|
-
TMSpinner.hide();
|
|
1402
|
-
}
|
|
1403
|
-
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false })), isOpenArchiveRelationForm && (_jsx(TMDcmtForm, { isModal: true, titleModal: SDKUI_Localizator.Archive + ' - ' + (archiveType === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster), TID: archiveRelatedDcmtFormTID, layoutMode: LayoutModes.Ark, inputMids: archiveRelatedDcmtFormMids, showBackButton: false, allowButtonsRefs: false, onClose: () => {
|
|
1404
|
-
setIsOpenArchiveRelationForm(false);
|
|
1405
|
-
setArchiveType(undefined);
|
|
1406
|
-
setArchiveRelatedDcmtFormTID(undefined);
|
|
1407
|
-
setArchiveRelatedDcmtFormMids([]);
|
|
1408
|
-
}, onSavedAsyncCallback: async (tid, did) => {
|
|
1409
|
-
setIsOpenArchiveRelationForm(false);
|
|
1410
|
-
setArchiveType(undefined);
|
|
1411
|
-
setArchiveRelatedDcmtFormTID(undefined);
|
|
1412
|
-
setArchiveRelatedDcmtFormMids([]);
|
|
1413
|
-
await fetchData();
|
|
1414
|
-
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers })), showPairDcmtsModal && (_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshSearchAsync: async () => await fetchData(), onTaskCreateRequest: onTaskCreateRequest, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: false, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }))] }));
|
|
1415
|
-
};
|
|
1416
|
-
export default TMDcmtForm;
|
|
1417
|
-
/**
|
|
1418
|
-
* Utility function to apply metadata filtering logic
|
|
1419
|
-
* @param data - Array of metadata values to filter
|
|
1420
|
-
* @param showAll - Whether to show all items or limit to maxItems
|
|
1421
|
-
* @param listMaxItems - Maximum number of items to show when showAll is false
|
|
1422
|
-
* @param TID - Document type ID to determine specific filtering rules
|
|
1423
|
-
* @returns Filtered array of metadata values
|
|
1424
|
-
*/
|
|
1425
|
-
const applyMetadataFilter = (data, showAll, listMaxItems, TID) => {
|
|
1426
|
-
// Early return for empty data
|
|
1427
|
-
if (!data || data.length === 0)
|
|
1428
|
-
return [];
|
|
1429
|
-
// Base filter: include only metadata with mid > 100
|
|
1430
|
-
const baseFilter = (o) => Boolean(o.mid && o.mid > 100);
|
|
1431
|
-
// Special filter for Draft document type: includes base filter + system fields
|
|
1432
|
-
const draftFilter = (o) => baseFilter(o) ||
|
|
1433
|
-
o.mid === SystemMIDsAsNumber.FileExt ||
|
|
1434
|
-
o.mid === SystemMIDsAsNumber.FileSize ||
|
|
1435
|
-
o.mid === SystemMIDsAsNumber.LastUpdateTime ||
|
|
1436
|
-
o.mid === SystemMIDsAsNumber.CreationTime;
|
|
1437
|
-
// Select the appropriate filter based on document type
|
|
1438
|
-
const currentFilter = TID === SystemTIDs.Drafts ? draftFilter : baseFilter;
|
|
1439
|
-
// Apply filter once
|
|
1440
|
-
const filteredData = data.filter(currentFilter);
|
|
1441
|
-
// Return all filtered data or slice to max items
|
|
1442
|
-
return showAll ? filteredData : filteredData.slice(0, listMaxItems);
|
|
1443
|
-
};
|
|
1444
|
-
//#region Validaion
|
|
1445
|
-
export const validateMetadataList = (mvdList = []) => {
|
|
1446
|
-
if (!Array.isArray(mvdList)) {
|
|
1447
|
-
throw new TypeError("metadataList must be an array of ITMMetadataProps.");
|
|
1448
|
-
}
|
|
1449
|
-
return mvdList.reduce((validationItems, mvd) => {
|
|
1450
|
-
const value = mvd.value?.toString() ?? "";
|
|
1451
|
-
if (isValidForValidation(mvd)) {
|
|
1452
|
-
validateRequiredField(mvd, value, validationItems);
|
|
1453
|
-
validateMaxLength(mvd, value, validationItems);
|
|
1454
|
-
}
|
|
1455
|
-
return validationItems;
|
|
1456
|
-
}, []);
|
|
1457
|
-
};
|
|
1458
|
-
const isValidForValidation = (mvd) => { return mvd.mid > 99; };
|
|
1459
|
-
const validateRequiredField = (mvd, value, validationItems) => {
|
|
1460
|
-
if (mvd.isRequired === '1' && !value.trim()) {
|
|
1461
|
-
const message = SDKUI_Localizator.RequiredField;
|
|
1462
|
-
validationItems.push(new ValidationItem(ResultTypes.ERROR, mvd.md?.nameLoc ?? "", message));
|
|
1463
|
-
}
|
|
1464
|
-
};
|
|
1465
|
-
const validateMaxLength = (mvd, value, validationItems) => {
|
|
1466
|
-
const regex = /[!?[\],./*-+'<>:";]/g;
|
|
1467
|
-
const maxLength = mvd.md?.length ?? 0;
|
|
1468
|
-
const isTextOrNumber = mvd.md?.dataType === MetadataDataTypes.Varchar || mvd.md?.dataType === MetadataDataTypes.Number;
|
|
1469
|
-
const isFormula = FormulaHelper.isFormula(value);
|
|
1470
|
-
if (isTextOrNumber && !isFormula && mvd.md?.length && value.replace(regex, '').length > maxLength) {
|
|
1471
|
-
const message = `"${mvd.md.nameLoc ?? "no-name"}" ha superata massimo lunghezza di ${maxLength} caratteri.`;
|
|
1472
|
-
validationItems.push(new ValidationItem(ResultTypes.ERROR, mvd.md.nameLoc ?? "", message));
|
|
1473
|
-
}
|
|
1474
|
-
};
|
|
1475
|
-
//#endregion Validation
|
|
1476
|
-
// Questo componente non renderizza nulla (return null)
|
|
1477
|
-
// ma viene utilizzato come child del Provider per disabilitare il bottone
|
|
1478
|
-
const WfButtonStateHandler = ({ isWFDisabled }) => {
|
|
1479
|
-
const { setToolbarButtonDisabled } = useTMPanelManagerContext();
|
|
1480
|
-
useEffect(() => {
|
|
1481
|
-
setToolbarButtonDisabled('tmWF', isWFDisabled);
|
|
1482
|
-
}, [isWFDisabled, setToolbarButtonDisabled]);
|
|
1483
|
-
return null; // Non renderizza elementi nel DOM
|
|
1484
|
-
};
|
|
1485
|
-
const TMDcmtPreviewWrapper = ({ currentDcmt, layoutMode, fromDTD, dcmtFile, deviceType, isVisible, onFileUpload, enableDragDropOverlay = false }) => {
|
|
1486
|
-
const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels, panelVisibility } = useTMPanelManagerContext();
|
|
1487
|
-
const isMobile = deviceType === DeviceType.MOBILE;
|
|
1488
|
-
return (layoutMode === LayoutModes.Update ?
|
|
1489
|
-
_jsx(TMDcmtPreview, { isVisible: isVisible, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, dcmtData: currentDcmt, isResizingActive: isResizingActive }) :
|
|
1490
|
-
_jsx(TMFileUploader, { onFileUpload: onFileUpload, onClose: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, isRequired: fromDTD?.archiveConstraint === ArchiveConstraints.ContentCompulsory && dcmtFile === null, defaultBlob: dcmtFile, deviceType: deviceType, isResizingActive: isResizingActive, enableDragDropOverlay: panelVisibility['tmDcmtPreview'] && enableDragDropOverlay }));
|
|
1491
|
-
};
|