@topconsultnpm/sdkui-react-beta 6.5.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/6.png +0 -0
- package/lib/assets/ImageLibrary/arrow_001.png +0 -0
- package/lib/assets/ImageLibrary/arrow_002.png +0 -0
- package/lib/assets/ImageLibrary/arrow_003.png +0 -0
- package/lib/assets/ImageLibrary/arrow_004.png +0 -0
- package/lib/assets/ImageLibrary/arrow_005.png +0 -0
- package/lib/assets/ImageLibrary/arrow_006.png +0 -0
- package/lib/assets/ImageLibrary/arrow_007.png +0 -0
- package/lib/assets/ImageLibrary/arrow_008.png +0 -0
- package/lib/assets/ImageLibrary/arrow_009.png +0 -0
- package/lib/assets/ImageLibrary/arrow_010.png +0 -0
- package/lib/assets/ImageLibrary/arrow_011.png +0 -0
- package/lib/assets/ImageLibrary/arrow_012.png +0 -0
- package/lib/assets/ImageLibrary/book_001.png +0 -0
- package/lib/assets/ImageLibrary/book_002.png +0 -0
- package/lib/assets/ImageLibrary/book_003.png +0 -0
- package/lib/assets/ImageLibrary/book_004.png +0 -0
- package/lib/assets/ImageLibrary/book_005.png +0 -0
- package/lib/assets/ImageLibrary/book_006.png +0 -0
- package/lib/assets/ImageLibrary/book_007.png +0 -0
- package/lib/assets/ImageLibrary/clock_001.png +0 -0
- package/lib/assets/ImageLibrary/clock_002.png +0 -0
- package/lib/assets/ImageLibrary/clock_003.png +0 -0
- package/lib/assets/ImageLibrary/cube_001.png +0 -0
- package/lib/assets/ImageLibrary/cube_002.png +0 -0
- package/lib/assets/ImageLibrary/cube_003.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_001.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_002.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_003.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_004.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_005.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_006.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_007.png +0 -0
- package/lib/assets/ImageLibrary/dcmt_008.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_001.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_002.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_003.png +0 -0
- package/lib/assets/ImageLibrary/emoticon_004.png +0 -0
- package/lib/assets/ImageLibrary/fld_001.png +0 -0
- package/lib/assets/ImageLibrary/fld_002.png +0 -0
- package/lib/assets/ImageLibrary/fld_003.png +0 -0
- package/lib/assets/ImageLibrary/fld_004.png +0 -0
- package/lib/assets/ImageLibrary/fld_005.png +0 -0
- package/lib/assets/ImageLibrary/fld_006.png +0 -0
- package/lib/assets/ImageLibrary/fld_007.png +0 -0
- package/lib/assets/ImageLibrary/fld_008.png +0 -0
- package/lib/assets/ImageLibrary/fld_009.png +0 -0
- package/lib/assets/ImageLibrary/fld_010.png +0 -0
- package/lib/assets/ImageLibrary/fld_011.png +0 -0
- package/lib/assets/ImageLibrary/fld_012.png +0 -0
- package/lib/assets/ImageLibrary/fld_013.png +0 -0
- package/lib/assets/ImageLibrary/fld_014.png +0 -0
- package/lib/assets/ImageLibrary/fld_015.png +0 -0
- package/lib/assets/ImageLibrary/fld_016.png +0 -0
- package/lib/assets/ImageLibrary/fld_017.png +0 -0
- package/lib/assets/ImageLibrary/fld_018.png +0 -0
- package/lib/assets/ImageLibrary/fld_019.png +0 -0
- package/lib/assets/ImageLibrary/fld_020.png +0 -0
- package/lib/assets/ImageLibrary/fld_021.png +0 -0
- package/lib/assets/ImageLibrary/fld_022.png +0 -0
- package/lib/assets/ImageLibrary/fld_023.png +0 -0
- package/lib/assets/ImageLibrary/fld_024.png +0 -0
- package/lib/assets/ImageLibrary/fld_025.png +0 -0
- package/lib/assets/ImageLibrary/fld_026.png +0 -0
- package/lib/assets/ImageLibrary/fld_027.png +0 -0
- package/lib/assets/ImageLibrary/fld_028.png +0 -0
- package/lib/assets/ImageLibrary/fld_029.png +0 -0
- package/lib/assets/ImageLibrary/fld_030.png +0 -0
- package/lib/assets/ImageLibrary/fld_031.png +0 -0
- package/lib/assets/ImageLibrary/fld_032.png +0 -0
- package/lib/assets/ImageLibrary/fld_033.png +0 -0
- package/lib/assets/ImageLibrary/gen_001.png +0 -0
- package/lib/assets/ImageLibrary/gen_002.png +0 -0
- package/lib/assets/ImageLibrary/gen_003.png +0 -0
- package/lib/assets/ImageLibrary/gen_004.png +0 -0
- package/lib/assets/ImageLibrary/gen_005.png +0 -0
- package/lib/assets/ImageLibrary/gen_006.png +0 -0
- package/lib/assets/ImageLibrary/gen_007.png +0 -0
- package/lib/assets/ImageLibrary/gen_008.png +0 -0
- package/lib/assets/ImageLibrary/gen_009.png +0 -0
- package/lib/assets/ImageLibrary/gen_010.png +0 -0
- package/lib/assets/ImageLibrary/gen_011.png +0 -0
- package/lib/assets/ImageLibrary/gen_012.png +0 -0
- package/lib/assets/ImageLibrary/gen_013.png +0 -0
- package/lib/assets/ImageLibrary/gen_014.png +0 -0
- package/lib/assets/ImageLibrary/gen_015.png +0 -0
- package/lib/assets/ImageLibrary/gen_016.png +0 -0
- package/lib/assets/ImageLibrary/gen_017.png +0 -0
- package/lib/assets/ImageLibrary/gen_018.png +0 -0
- package/lib/assets/ImageLibrary/gen_019.png +0 -0
- package/lib/assets/ImageLibrary/gen_020.png +0 -0
- package/lib/assets/ImageLibrary/gen_021.png +0 -0
- package/lib/assets/ImageLibrary/gen_022.png +0 -0
- package/lib/assets/ImageLibrary/gen_023.png +0 -0
- package/lib/assets/ImageLibrary/gen_024.png +0 -0
- package/lib/assets/ImageLibrary/gen_025.png +0 -0
- package/lib/assets/ImageLibrary/gen_026.png +0 -0
- package/lib/assets/ImageLibrary/gen_027.png +0 -0
- package/lib/assets/ImageLibrary/gen_028.png +0 -0
- package/lib/assets/ImageLibrary/gen_029.png +0 -0
- package/lib/assets/ImageLibrary/gen_030.png +0 -0
- package/lib/assets/ImageLibrary/gen_031.png +0 -0
- package/lib/assets/ImageLibrary/gen_032.png +0 -0
- package/lib/assets/ImageLibrary/gen_033.png +0 -0
- package/lib/assets/ImageLibrary/gen_034.png +0 -0
- package/lib/assets/ImageLibrary/gen_035.png +0 -0
- package/lib/assets/ImageLibrary/gen_036.png +0 -0
- package/lib/assets/ImageLibrary/gen_037.png +0 -0
- package/lib/assets/ImageLibrary/gen_038.png +0 -0
- package/lib/assets/ImageLibrary/gen_039.png +0 -0
- package/lib/assets/ImageLibrary/gen_040.png +0 -0
- package/lib/assets/ImageLibrary/gen_041.png +0 -0
- package/lib/assets/ImageLibrary/gen_042.png +0 -0
- package/lib/assets/ImageLibrary/gen_043.png +0 -0
- package/lib/assets/ImageLibrary/gen_044.png +0 -0
- package/lib/assets/ImageLibrary/gen_045.png +0 -0
- package/lib/assets/ImageLibrary/gen_046.png +0 -0
- package/lib/assets/ImageLibrary/gen_047.png +0 -0
- package/lib/assets/ImageLibrary/gen_048.png +0 -0
- package/lib/assets/ImageLibrary/gen_049.png +0 -0
- package/lib/assets/ImageLibrary/gen_050.png +0 -0
- package/lib/assets/ImageLibrary/gen_051.png +0 -0
- package/lib/assets/ImageLibrary/gen_052.png +0 -0
- package/lib/assets/ImageLibrary/hand_001.png +0 -0
- package/lib/assets/ImageLibrary/hand_002.png +0 -0
- package/lib/assets/ImageLibrary/hand_003.png +0 -0
- package/lib/assets/ImageLibrary/hand_004.png +0 -0
- package/lib/assets/ImageLibrary/hand_005.png +0 -0
- package/lib/assets/ImageLibrary/hand_006.png +0 -0
- package/lib/assets/ImageLibrary/law_001.png +0 -0
- package/lib/assets/ImageLibrary/law_002.png +0 -0
- package/lib/assets/ImageLibrary/law_003.png +0 -0
- package/lib/assets/ImageLibrary/lock_001.png +0 -0
- package/lib/assets/ImageLibrary/lock_002.png +0 -0
- package/lib/assets/ImageLibrary/lock_003.png +0 -0
- package/lib/assets/ImageLibrary/mail_001.png +0 -0
- package/lib/assets/ImageLibrary/mail_002.png +0 -0
- package/lib/assets/ImageLibrary/mail_003.png +0 -0
- package/lib/assets/ImageLibrary/mail_004.png +0 -0
- package/lib/assets/ImageLibrary/mail_005.png +0 -0
- package/lib/assets/ImageLibrary/mail_006.png +0 -0
- package/lib/assets/ImageLibrary/mail_007.png +0 -0
- package/lib/assets/ImageLibrary/mail_008.png +0 -0
- package/lib/assets/ImageLibrary/mail_009.png +0 -0
- package/lib/assets/ImageLibrary/mail_010.png +0 -0
- package/lib/assets/ImageLibrary/mail_011.png +0 -0
- package/lib/assets/ImageLibrary/mail_012.png +0 -0
- package/lib/assets/ImageLibrary/mail_013.png +0 -0
- package/lib/assets/ImageLibrary/mail_014.png +0 -0
- package/lib/assets/ImageLibrary/mail_015.png +0 -0
- package/lib/assets/ImageLibrary/net_001.png +0 -0
- package/lib/assets/ImageLibrary/net_002.png +0 -0
- package/lib/assets/ImageLibrary/net_003.png +0 -0
- package/lib/assets/ImageLibrary/net_004.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_001.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_002.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_003.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_004.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_005.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_006.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_007.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_008.png +0 -0
- package/lib/assets/ImageLibrary/nmbr_009.png +0 -0
- package/lib/assets/ImageLibrary/note_001.png +0 -0
- package/lib/assets/ImageLibrary/note_002.png +0 -0
- package/lib/assets/ImageLibrary/note_003.png +0 -0
- package/lib/assets/ImageLibrary/note_004.png +0 -0
- package/lib/assets/ImageLibrary/note_005.png +0 -0
- package/lib/assets/ImageLibrary/note_006.png +0 -0
- package/lib/assets/ImageLibrary/note_007.png +0 -0
- package/lib/assets/ImageLibrary/note_008.png +0 -0
- package/lib/assets/ImageLibrary/note_009.png +0 -0
- package/lib/assets/ImageLibrary/note_010.png +0 -0
- package/lib/assets/ImageLibrary/note_011.png +0 -0
- package/lib/assets/ImageLibrary/note_012.png +0 -0
- package/lib/assets/ImageLibrary/note_013.png +0 -0
- package/lib/assets/ImageLibrary/note_014.png +0 -0
- package/lib/assets/ImageLibrary/note_015.png +0 -0
- package/lib/assets/ImageLibrary/note_016.png +0 -0
- package/lib/assets/ImageLibrary/run_001.png +0 -0
- package/lib/assets/ImageLibrary/run_002.png +0 -0
- package/lib/assets/ImageLibrary/run_003.png +0 -0
- package/lib/assets/ImageLibrary/sem_001.png +0 -0
- package/lib/assets/ImageLibrary/sem_002.png +0 -0
- package/lib/assets/ImageLibrary/sem_003.png +0 -0
- package/lib/assets/ImageLibrary/sem_004.png +0 -0
- package/lib/assets/ImageLibrary/sem_005.png +0 -0
- package/lib/assets/ImageLibrary/star_001.png +0 -0
- package/lib/assets/ImageLibrary/star_002.png +0 -0
- package/lib/assets/ImageLibrary/star_003.png +0 -0
- package/lib/assets/ImageLibrary/star_004.png +0 -0
- package/lib/assets/ImageLibrary/star_005.png +0 -0
- package/lib/assets/ImageLibrary/star_006.png +0 -0
- package/lib/assets/ImageLibrary/state_001.png +0 -0
- package/lib/assets/ImageLibrary/state_002.png +0 -0
- package/lib/assets/ImageLibrary/state_003.png +0 -0
- package/lib/assets/ImageLibrary/state_004.png +0 -0
- package/lib/assets/ImageLibrary/state_005.png +0 -0
- package/lib/assets/ImageLibrary/study_001.png +0 -0
- package/lib/assets/ImageLibrary/study_002.png +0 -0
- package/lib/assets/ImageLibrary/user_001.png +0 -0
- package/lib/assets/ImageLibrary/user_002.png +0 -0
- package/lib/assets/ImageLibrary/user_003.png +0 -0
- package/lib/assets/ImageLibrary/user_004.png +0 -0
- package/lib/assets/ImageLibrary/user_005.png +0 -0
- package/lib/assets/ImageLibrary/user_006.png +0 -0
- package/lib/assets/ImageLibrary/user_007.png +0 -0
- package/lib/assets/ImageLibrary/user_008.png +0 -0
- package/lib/assets/ImageLibrary/user_009.png +0 -0
- package/lib/assets/ImageLibrary/user_010.png +0 -0
- package/lib/assets/ImageLibrary/user_011.png +0 -0
- package/lib/assets/ImageLibrary/user_012.png +0 -0
- package/lib/assets/ImageLibrary/user_013.png +0 -0
- package/lib/assets/ImageLibrary/user_014.png +0 -0
- package/lib/assets/ImageLibrary/user_015.png +0 -0
- package/lib/assets/ImageLibrary/user_016.png +0 -0
- package/lib/assets/ImageLibrary/user_017.png +0 -0
- package/lib/assets/ImageLibrary/user_018.png +0 -0
- package/lib/assets/ImageLibrary/user_019.png +0 -0
- package/lib/assets/ImageLibrary/user_020.png +0 -0
- package/lib/assets/ImageLibrary/user_021.png +0 -0
- package/lib/assets/ImageLibrary/user_022.png +0 -0
- package/lib/assets/ImageLibrary/user_023.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_001.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_002.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_003.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_004.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_005.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_006.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_007.png +0 -0
- package/lib/assets/ImageLibrary/vehicle_008.png +0 -0
- package/lib/assets/Metadata/DataList_32.png +0 -0
- package/lib/assets/Metadata/DynamicDataList_32.png +0 -0
- package/lib/assets/Metadata/MetadataComputed_32.png +0 -0
- package/lib/assets/Metadata/MetadataDateTime_16.png +0 -0
- package/lib/assets/Metadata/MetadataNumeric_16.png +0 -0
- package/lib/assets/Metadata/MetadataSpecial_32.png +0 -0
- package/lib/assets/Metadata/MetadataText_16.png +0 -0
- package/lib/assets/Metadata/Metadata_32.png +0 -0
- package/lib/assets/Metadata/Numerator_32.png +0 -0
- package/lib/assets/Metadata/UserLevel_Member_32.png +0 -0
- package/lib/assets/Orchestrator6.png +0 -0
- package/lib/assets/TopMediaOrchestrator6.svg +93 -0
- package/lib/assets/Toppy-generico.png +0 -0
- package/lib/assets/background-login.png +0 -0
- package/lib/assets/d.png +0 -0
- package/lib/assets/doc.jpg +0 -0
- package/lib/assets/icomoon.eot +0 -0
- package/lib/assets/icomoon.svg +97 -0
- package/lib/assets/icomoon.ttf +0 -0
- package/lib/assets/icomoon.woff +0 -0
- package/lib/assets/loading.png +0 -0
- package/lib/assets/login-bg.png +0 -0
- package/lib/assets/logo-TopConsult-footer.png +0 -0
- package/lib/assets/logo.svg +79 -0
- package/lib/assets/multipleSelectionManager.jpg +0 -0
- package/lib/assets/s.png +0 -0
- package/lib/components/base/Styled.d.ts +28 -0
- package/lib/components/base/Styled.js +117 -0
- package/lib/components/base/TMAlert.d.ts +20 -0
- package/lib/components/base/TMAlert.js +75 -0
- package/lib/components/base/TMButton.d.ts +17 -0
- package/lib/components/base/TMButton.js +163 -0
- package/lib/components/base/TMClosableList.d.ts +10 -0
- package/lib/components/base/TMClosableList.js +69 -0
- package/lib/components/base/TMContextMenu.d.ts +26 -0
- package/lib/components/base/TMContextMenu.js +56 -0
- package/lib/components/base/TMDropDown.d.ts +11 -0
- package/lib/components/base/TMDropDown.js +64 -0
- package/lib/components/base/TMDropDownMenu.d.ts +17 -0
- package/lib/components/base/TMDropDownMenu.js +39 -0
- package/lib/components/base/TMEditorBase.d.ts +31 -0
- package/lib/components/base/TMEditorBase.js +1 -0
- package/lib/components/base/TMLayout.d.ts +51 -0
- package/lib/components/base/TMLayout.js +152 -0
- package/lib/components/base/TMList.d.ts +9 -0
- package/lib/components/base/TMList.js +46 -0
- package/lib/components/base/TMListView.d.ts +24 -0
- package/lib/components/base/TMListView.js +321 -0
- package/lib/components/base/TMModal.d.ts +14 -0
- package/lib/components/base/TMModal.js +48 -0
- package/lib/components/base/TMPopUp.d.ts +26 -0
- package/lib/components/base/TMPopUp.js +136 -0
- package/lib/components/base/TMProgressBar.d.ts +11 -0
- package/lib/components/base/TMProgressBar.js +32 -0
- package/lib/components/base/TMSpinner.d.ts +13 -0
- package/lib/components/base/TMSpinner.js +23 -0
- package/lib/components/base/TMTab.d.ts +20 -0
- package/lib/components/base/TMTab.js +42 -0
- package/lib/components/base/TMToggleButton.d.ts +10 -0
- package/lib/components/base/TMToggleButton.js +58 -0
- package/lib/components/base/TMTooltip.d.ts +9 -0
- package/lib/components/base/TMTooltip.js +19 -0
- package/lib/components/base/TMVilViewer.d.ts +5 -0
- package/lib/components/base/TMVilViewer.js +22 -0
- package/lib/components/choosers/TMDataListItemChooser.d.ts +19 -0
- package/lib/components/choosers/TMDataListItemChooser.js +37 -0
- package/lib/components/choosers/TMDcmtTypeChooser.d.ts +25 -0
- package/lib/components/choosers/TMDcmtTypeChooser.js +46 -0
- package/lib/components/choosers/TMMetadataChooser.d.ts +41 -0
- package/lib/components/choosers/TMMetadataChooser.js +118 -0
- package/lib/components/choosers/TMUserChooser.d.ts +26 -0
- package/lib/components/choosers/TMUserChooser.js +82 -0
- package/lib/components/editors/TMCheckBox.d.ts +9 -0
- package/lib/components/editors/TMCheckBox.js +90 -0
- package/lib/components/editors/TMDateBox.d.ts +12 -0
- package/lib/components/editors/TMDateBox.js +78 -0
- package/lib/components/editors/TMDropDown.d.ts +10 -0
- package/lib/components/editors/TMDropDown.js +38 -0
- package/lib/components/editors/TMEditorStyled.d.ts +30 -0
- package/lib/components/editors/TMEditorStyled.js +75 -0
- package/lib/components/editors/TMRadioButton.d.ts +10 -0
- package/lib/components/editors/TMRadioButton.js +57 -0
- package/lib/components/editors/TMSummary.d.ts +18 -0
- package/lib/components/editors/TMSummary.js +62 -0
- package/lib/components/editors/TMTextBox.d.ts +20 -0
- package/lib/components/editors/TMTextBox.js +116 -0
- package/lib/components/filesystem/ProgressBar.d.ts +7 -0
- package/lib/components/filesystem/ProgressBar.js +25 -0
- package/lib/components/forms/TMApplyForm.d.ts +4 -0
- package/lib/components/forms/TMApplyForm.js +102 -0
- package/lib/components/forms/TMChooserForm.d.ts +3 -0
- package/lib/components/forms/TMChooserForm.js +56 -0
- package/lib/components/forms/TMLoginForm.d.ts +32 -0
- package/lib/components/forms/TMLoginForm.js +986 -0
- package/lib/components/forms/TMSaveForm.d.ts +4 -0
- package/lib/components/forms/TMSaveForm.js +107 -0
- package/lib/components/grids/TMValidationItemsList.d.ts +6 -0
- package/lib/components/grids/TMValidationItemsList.js +82 -0
- package/lib/components/index.d.ts +44 -0
- package/lib/components/index.js +59 -0
- package/lib/components/pages/TMPage.d.ts +39 -0
- package/lib/components/pages/TMPage.js +194 -0
- package/lib/components/query/TMQueryEditor.d.ts +27 -0
- package/lib/components/query/TMQueryEditor.js +1044 -0
- package/lib/components/query/TMQueryResult.d.ts +8 -0
- package/lib/components/query/TMQueryResult.js +47 -0
- package/lib/components/settings/SettingsAppearance.d.ts +2 -0
- package/lib/components/settings/SettingsAppearance.js +44 -0
- package/lib/components/sidebar/TMHeader.d.ts +31 -0
- package/lib/components/sidebar/TMHeader.js +228 -0
- package/lib/components/sidebar/TMSidebar.d.ts +17 -0
- package/lib/components/sidebar/TMSidebar.js +24 -0
- package/lib/components/sidebar/TMSidebarItem.d.ts +12 -0
- package/lib/components/sidebar/TMSidebarItem.js +27 -0
- package/lib/components/splitter/TMSplitterLayout.d.ts +17 -0
- package/lib/components/splitter/TMSplitterLayout.js +215 -0
- package/lib/components/viewers/TMDataListItemViewer.d.ts +9 -0
- package/lib/components/viewers/TMDataListItemViewer.js +27 -0
- package/lib/components/viewers/TMMidViewer.d.ts +26 -0
- package/lib/components/viewers/TMMidViewer.js +110 -0
- package/lib/components/viewers/TMTidViewer.d.ts +21 -0
- package/lib/components/viewers/TMTidViewer.js +398 -0
- package/lib/css/tm-sdkui.css +1 -0
- package/lib/helper/Enum_Localizator.d.ts +8 -0
- package/lib/helper/Enum_Localizator.js +125 -0
- package/lib/helper/Globalization.d.ts +14 -0
- package/lib/helper/Globalization.js +80 -0
- package/lib/helper/SDKUI_Globals.d.ts +11 -0
- package/lib/helper/SDKUI_Globals.js +8 -0
- package/lib/helper/SDKUI_Localizator.d.ts +222 -0
- package/lib/helper/SDKUI_Localizator.js +2143 -0
- package/lib/helper/TMIcons.d.ts +171 -0
- package/lib/helper/TMIcons.js +507 -0
- package/lib/helper/TMImageLibrary.d.ts +3 -0
- package/lib/helper/TMImageLibrary.js +466 -0
- package/lib/helper/helpers.d.ts +25 -0
- package/lib/helper/helpers.js +250 -0
- package/lib/helper/index.d.ts +8 -0
- package/lib/helper/index.js +8 -0
- package/lib/helper/queryHelper.d.ts +8 -0
- package/lib/helper/queryHelper.js +32 -0
- package/lib/hooks/useForm.d.ts +18 -0
- package/lib/hooks/useForm.js +111 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useOutsideClick.js +38 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +7 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +1 -0
- package/lib/services/platform_services.d.ts +17 -0
- package/lib/services/platform_services.js +334 -0
- package/lib/ts/index.d.ts +1 -0
- package/lib/ts/index.js +1 -0
- package/lib/ts/types.d.ts +152 -0
- package/lib/ts/types.js +17 -0
- package/lib/utils/theme.d.ts +58 -0
- package/lib/utils/theme.js +57 -0
- package/package.json +38 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import TabPanel, { Item } from "devextreme-react/tab-panel";
|
|
5
|
+
import { StyledDivHorizontal } from './Styled';
|
|
6
|
+
import { editorColorManager } from '../editors/TMEditorStyled';
|
|
7
|
+
import { TMCard } from './TMLayout';
|
|
8
|
+
const StyledTabItemResultType = styled.div `
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
background-color: ${(props) => props.$backgroundColor};
|
|
13
|
+
color: #fff;
|
|
14
|
+
font-size: 0.8rem;
|
|
15
|
+
padding: 0 5px;
|
|
16
|
+
border-radius: 999em;
|
|
17
|
+
line-height: 16px;
|
|
18
|
+
margin-left: 5px;
|
|
19
|
+
`;
|
|
20
|
+
export const TMTab = ({ label = '', propsToBeValidated = [], children }) => { return (_jsx("div", { children: children })); };
|
|
21
|
+
const renderTabItems = (tabItemProps, tabs, vil) => {
|
|
22
|
+
return (_jsxs(StyledDivHorizontal, { style: { fontSize: '1rem', fontWeight: '600' }, children: [_jsx("span", { children: tabItemProps.title }), tabs.map((tab, index) => { return (_jsx("div", { style: { display: 'flex' }, children: tabItemProps.title == tab.title && _jsx(TMTabItemBadge, { vil: vil?.filter(o => tab.propsToBeValidated?.some((s) => o.PropertyName == s || o.PropertyScopes.includes(s))) ?? [] }) }, index)); })] }));
|
|
23
|
+
};
|
|
24
|
+
export const TMTabItemBadge = ({ vil }) => {
|
|
25
|
+
return (_jsxs(_Fragment, { children: [" ", vil.length > 0 && _jsx(StyledTabItemResultType, { "$backgroundColor": editorColorManager(vil), children: vil.length }), " "] }));
|
|
26
|
+
};
|
|
27
|
+
const TMTabGroup = ({ children, fontSize, validationItems = [], onTabIndexChanged }) => {
|
|
28
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
29
|
+
const [tabs, setTabs] = useState(React.Children.toArray(children));
|
|
30
|
+
const [tabsTitle, setTabsTitle] = useState([]);
|
|
31
|
+
useEffect(() => { onTabIndexChanged && onTabIndexChanged(selectedIndex); }, [selectedIndex]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
let arr = [];
|
|
34
|
+
setTabs(React.Children.toArray(children));
|
|
35
|
+
for (let child of children) {
|
|
36
|
+
arr.push({ title: child.props.label, propsToBeValidated: child.props.propsToBeValidated });
|
|
37
|
+
}
|
|
38
|
+
setTabsTitle(arr);
|
|
39
|
+
}, [children]);
|
|
40
|
+
return (_jsx(TabPanel, { onSelectedIndexChange: (e) => setSelectedIndex(e), height: '100%', width: '100%', itemTitleRender: (tabItemProps) => renderTabItems(tabItemProps, tabsTitle, validationItems), showNavButtons: true, stylingMode: "primary", children: tabs.map((tab, index) => (_jsxs(Item, { title: tab.props.label, children: [" ", _jsx(TMCard, { showBorder: false, padding: true, scrollY: true, children: tab.props.children ? tab.props.children : _jsx("div", {}) }), " "] }, index))) }));
|
|
41
|
+
};
|
|
42
|
+
export default TMTabGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITMEditorBase } from './TMEditorBase';
|
|
3
|
+
import { Colors } from '../../utils/theme';
|
|
4
|
+
interface ITMToggleButton extends ITMEditorBase {
|
|
5
|
+
color?: Colors;
|
|
6
|
+
showTooltip?: boolean;
|
|
7
|
+
onValueChanged?: VoidFunction;
|
|
8
|
+
}
|
|
9
|
+
declare const TMToggleButton: React.FunctionComponent<ITMToggleButton>;
|
|
10
|
+
export default TMToggleButton;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Colors, FontSize } from '../../utils/theme';
|
|
4
|
+
import { getColor } from '../../helper';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import TMTooltip from './TMTooltip';
|
|
7
|
+
// #region Style
|
|
8
|
+
const StyledToggleButtonWrapper = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
align-items: center;
|
|
13
|
+
width: 100%;
|
|
14
|
+
`;
|
|
15
|
+
const StyledToggleButtonContainer = styled.div `
|
|
16
|
+
width: 36px;
|
|
17
|
+
height: 20px;
|
|
18
|
+
background-color: ${props => !props.$value ? 'rgb(194, 194, 194)' : getColor(props.$color)};
|
|
19
|
+
border-radius: 3px;
|
|
20
|
+
transition: all 100ms ease;
|
|
21
|
+
padding: 3px;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
position: relative;
|
|
24
|
+
`;
|
|
25
|
+
const StyledToggleButtonSwitch = styled.div `
|
|
26
|
+
width: 50%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
border-radius: 2px;
|
|
29
|
+
background-color: white;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
float: right;
|
|
34
|
+
transition: all 100ms ease;
|
|
35
|
+
z-index: 100;
|
|
36
|
+
${props => props.$value ? '' : 'float: left;'}
|
|
37
|
+
`;
|
|
38
|
+
const StyledToggleValue = styled.p `
|
|
39
|
+
font-size: 0.5rem;
|
|
40
|
+
color: black;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
`;
|
|
43
|
+
const StyledToggleButtonLabel = styled.div `
|
|
44
|
+
font-size: ${FontSize.defaultFontSize};
|
|
45
|
+
margin-left: 5px;
|
|
46
|
+
width: max-content;
|
|
47
|
+
color: ${props => getColor(props.$color)};
|
|
48
|
+
`;
|
|
49
|
+
const TMToggleButton = ({ color = 'primary', value, label, elementStyle, fontSize = FontSize.defaultFontSize, isModifiedWhen, showTooltip = false, onValueChanged }) => {
|
|
50
|
+
const [currentColor, setCurrentColor] = useState(color);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
setCurrentColor(isModifiedWhen ? 'tertiary' : color);
|
|
53
|
+
}, [isModifiedWhen, color]);
|
|
54
|
+
const renderTooltip = () => { return (showTooltip && _jsx("div", { children: label })); };
|
|
55
|
+
return (_jsx(TMTooltip, { hideAfterDelay: true, content: renderTooltip(), children: _jsxs(StyledToggleButtonWrapper, { children: [_jsx(StyledToggleButtonContainer, { "$value": value, "$color": currentColor, style: elementStyle, onClick: onValueChanged, children: _jsx(StyledToggleButtonSwitch, { "$value": value, children: _jsx(StyledToggleValue, { children: value ? 'ON' : 'OFF' }) }) }), !showTooltip && label &&
|
|
56
|
+
_jsx(StyledToggleButtonLabel, { "$color": isModifiedWhen ? Colors.tertiary : Colors.primary, children: label })] }) }));
|
|
57
|
+
};
|
|
58
|
+
export default TMToggleButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITooltipOptions } from 'devextreme-react/cjs/tooltip';
|
|
3
|
+
interface ITMTooltipProps extends ITooltipOptions {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
hideAfterDelay?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const TMTooltip: ({ children, content, hideAfterDelay }: ITMTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default TMTooltip;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Tooltip } from 'devextreme-react/cjs/tooltip';
|
|
4
|
+
import { TABLET_WIDTH, genUniqueId, useWindowWidth } from '../../helper';
|
|
5
|
+
const TMTooltip = ({ children, content, hideAfterDelay }) => {
|
|
6
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
7
|
+
const [id, setID] = useState('');
|
|
8
|
+
useEffect(() => { setID(genUniqueId()); }, [children]);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
window.addEventListener('click', () => setShowTooltip(false));
|
|
11
|
+
return () => window.removeEventListener('click', () => setShowTooltip(false));
|
|
12
|
+
}, []);
|
|
13
|
+
const width = useWindowWidth();
|
|
14
|
+
let isDesktop = width > TABLET_WIDTH;
|
|
15
|
+
return (_jsxs("div", { children: [_jsx("div", { id: `idContainerTooltip${id}`, style: { display: 'flex', alignItems: 'center', height: 'max-content', width: 'max-content' }, onMouseEnter: () => { setShowTooltip(true); }, onMouseLeave: () => { setShowTooltip(false); }, onClick: () => { if (isDesktop || !hideAfterDelay)
|
|
16
|
+
return; setTimeout(() => { setShowTooltip(false); }, 1500); }, children: children }), content &&
|
|
17
|
+
_jsx(Tooltip, { target: `#idContainerTooltip${id}`, hideOnOutsideClick: true, visible: showTooltip, onHidden: () => setShowTooltip(false), children: content })] }));
|
|
18
|
+
};
|
|
19
|
+
export default TMTooltip;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ResultTypes } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { TMColors } from '../../utils/theme';
|
|
4
|
+
import TMClosableList from './TMClosableList';
|
|
5
|
+
const TMVilViewer = ({ vil = [] }) => {
|
|
6
|
+
const renderVil = () => {
|
|
7
|
+
if (!vil)
|
|
8
|
+
return [];
|
|
9
|
+
let errItems = [];
|
|
10
|
+
let sortedVil = vil.sort((a, b) => a.ResultType.localeCompare(b.ResultType));
|
|
11
|
+
for (let i = 0; i < sortedVil.length; i++) {
|
|
12
|
+
let viColor = sortedVil[i].ResultType == ResultTypes.ERROR ? TMColors.error : sortedVil[i].ResultType == ResultTypes.INFO ? TMColors.info : TMColors.warning;
|
|
13
|
+
let msg_prefix = sortedVil.length > 1 ? `${i + 1}) ` : '';
|
|
14
|
+
errItems.push(_jsx("div", { style: { color: viColor }, children: `${msg_prefix}${sortedVil[i].Message}` }, i));
|
|
15
|
+
}
|
|
16
|
+
return errItems;
|
|
17
|
+
};
|
|
18
|
+
if (!vil || vil.length <= 0)
|
|
19
|
+
return null;
|
|
20
|
+
return (_jsx(TMClosableList, { inline: true, dataSource: renderVil(), hasPadding: false }));
|
|
21
|
+
};
|
|
22
|
+
export default TMVilViewer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataListItemDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { ITMChooserFormProps, ITMChooserProps } from '../../ts';
|
|
4
|
+
interface ITMDataListItemChooserProps extends ITMChooserProps {
|
|
5
|
+
/** id della lista dati da gestire */
|
|
6
|
+
dataListId: number | undefined;
|
|
7
|
+
/** Contiene i values selezionati */
|
|
8
|
+
values?: string[];
|
|
9
|
+
/** Visualizza il bordo */
|
|
10
|
+
showBorder?: boolean;
|
|
11
|
+
/** Se presente, visualizza il bottone Pulisci ed esegue */
|
|
12
|
+
hasClear?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const TMDataListItemChooser: React.FunctionComponent<ITMDataListItemChooserProps>;
|
|
15
|
+
export default TMDataListItemChooser;
|
|
16
|
+
interface ITMDataListItemChooserFormProps extends ITMChooserFormProps<DataListItemDescriptor> {
|
|
17
|
+
dataListId: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const TMDataListItemChooserForm: React.FunctionComponent<ITMDataListItemChooserFormProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { SDK_Localizator, DataListCacheService } from '@topconsultnpm/sdk-ts-beta';
|
|
4
|
+
import { Column } from 'devextreme-react/cjs/data-grid';
|
|
5
|
+
import { StyledDivHorizontal } from '../base/Styled';
|
|
6
|
+
import { IconSearch, SDKUI_Localizator, TMImageLibrary } from '../../helper';
|
|
7
|
+
import TMSpinner from '../base/TMSpinner';
|
|
8
|
+
import TMSummary from '../editors/TMSummary';
|
|
9
|
+
import TMChooserForm from '../forms/TMChooserForm';
|
|
10
|
+
import TMDataListItemViewer from '../viewers/TMDataListItemViewer';
|
|
11
|
+
const TMDataListItemChooser = ({ dataListId, backgroundColor, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged, hasClear }) => {
|
|
12
|
+
const [showChooser, setShowChooser] = useState(false);
|
|
13
|
+
const renderTemplate = () => {
|
|
14
|
+
return (_jsxs(StyledDivHorizontal, { style: { minWidth: '125px' }, children: [placeHolder && (!values || values.length <= 0) && _jsx("p", { children: placeHolder }), values && values.length > 0 && _jsx(TMDataListItemViewer, { dataListId: dataListId, value: values?.[0] }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }));
|
|
15
|
+
};
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, showBorder: showBorder, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick: hasClear ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
17
|
+
_jsx(TMDataListItemChooserForm, { allowMultipleSelection: allowMultipleSelection, dataListId: dataListId, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
18
|
+
};
|
|
19
|
+
export default TMDataListItemChooser;
|
|
20
|
+
const cellRenderIcon = (data) => _jsx(TMImageLibrary, { imageID: data.data?.imageID });
|
|
21
|
+
export const TMDataListItemChooserForm = (props) => {
|
|
22
|
+
const renderDataGridColumns = [
|
|
23
|
+
_jsx(Column, { dataField: "value", caption: SDKUI_Localizator.Value }, 0),
|
|
24
|
+
_jsx(Column, { dataField: "name", caption: SDKUI_Localizator.Description }, 1)
|
|
25
|
+
];
|
|
26
|
+
const getItems = async (refreshCache) => {
|
|
27
|
+
if (!props.dataListId)
|
|
28
|
+
return [];
|
|
29
|
+
if (refreshCache)
|
|
30
|
+
DataListCacheService.RemoveAll();
|
|
31
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.DataList} ...` });
|
|
32
|
+
let dataList = await DataListCacheService.GetAsync(props.dataListId);
|
|
33
|
+
TMSpinner.hide();
|
|
34
|
+
return dataList ? dataList.items ?? [] : [];
|
|
35
|
+
};
|
|
36
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.DataLists, allowMultipleSelection: props.allowMultipleSelection, width: props.width, height: props.height, keyName: 'value', showDefaultColumns: false, hasShowId: false, columns: renderDataGridColumns, selectedIDs: props.selectedIDs, cellRenderIcon: cellRenderIcon, dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => props.onChoose?.(IDs) }));
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DcmtTypeDescriptor, ITopMediaSession, TemplateTIDs } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { ITMChooserFormProps, ITMChooserProps } from '../../ts';
|
|
4
|
+
interface ITMDcmtTypeChooser extends ITMChooserProps {
|
|
5
|
+
ShowOnlyDcmtTypes?: boolean;
|
|
6
|
+
ShowOnlySAP?: boolean;
|
|
7
|
+
filterTemplateTID?: TemplateTIDs[];
|
|
8
|
+
/** Contiene i TID selezionati */
|
|
9
|
+
values?: number[];
|
|
10
|
+
/** Visualizza il bordo */
|
|
11
|
+
showBorder?: boolean;
|
|
12
|
+
borderRadius?: string;
|
|
13
|
+
/** Se presente, visualizza il bottone ed esegue */
|
|
14
|
+
hasClear?: boolean;
|
|
15
|
+
openEditorOnSummaryClick?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const TMDcmtTypeChooser: React.FunctionComponent<ITMDcmtTypeChooser>;
|
|
18
|
+
export default TMDcmtTypeChooser;
|
|
19
|
+
interface ITMDcmtTypeChooserFormProps extends ITMChooserFormProps<DcmtTypeDescriptor> {
|
|
20
|
+
ShowOnlyDcmtTypes?: boolean;
|
|
21
|
+
ShowOnlySAP?: boolean;
|
|
22
|
+
filterTemplateTID?: TemplateTIDs[];
|
|
23
|
+
tmSession?: ITopMediaSession;
|
|
24
|
+
}
|
|
25
|
+
export declare const TMDcmtTypeChooserForm: React.FunctionComponent<ITMDcmtTypeChooserFormProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { DcmtTypeListCacheService, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts-beta';
|
|
4
|
+
import TMSpinner from '../base/TMSpinner';
|
|
5
|
+
import { IconSearch, SDKUI_Localizator } from '../../helper';
|
|
6
|
+
import { StyledDivHorizontal } from '../base/Styled';
|
|
7
|
+
import TMTidViewer, { TMDcmtTypeIcon } from '../viewers/TMTidViewer';
|
|
8
|
+
import TMSummary from '../editors/TMSummary';
|
|
9
|
+
import TMChooserForm from '../forms/TMChooserForm';
|
|
10
|
+
const TMDcmtTypeChooser = ({ tmSession, dataSource, disabled, backgroundColor, borderRadius = '4px', placeHolder = `<${SDKUI_Localizator.NoneSelection}>`, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, ShowOnlyDcmtTypes, ShowOnlySAP, filterTemplateTID, values, isModifiedWhen, label, width, height, validationItems = [], onValueChanged, hasClear }) => {
|
|
11
|
+
const [showChooser, setShowChooser] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.ListDcmtTypeOrView} ...` });
|
|
14
|
+
let tms = tmSession ?? SDK_Globals.tmSession;
|
|
15
|
+
DcmtTypeListCacheService.GetFromTIDsAsync(values, false, tms).then(() => { TMSpinner.hide(); });
|
|
16
|
+
}, [values]);
|
|
17
|
+
const renderTemplate = () => {
|
|
18
|
+
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && _jsx(TMTidViewer, { tmSession: tmSession, tid: values[0], showIcon: true, showId: showId, noneSelectionText: placeHolder }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }));
|
|
19
|
+
};
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { backgroundColor: backgroundColor, showBorder: showBorder, borderRadius: borderRadius, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, width: width, height: showBorder ? height : '24px', template: renderTemplate(), openEditorOnSummaryClick: openEditorOnSummaryClick, onClearClick: hasClear ? () => { !disabled && onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
21
|
+
_jsx(TMDcmtTypeChooserForm, { tmSession: tmSession, allowMultipleSelection: allowMultipleSelection, dataSource: dataSource, selectedIDs: values, ShowOnlyDcmtTypes: ShowOnlyDcmtTypes, ShowOnlySAP: ShowOnlySAP, filterTemplateTID: filterTemplateTID, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
22
|
+
};
|
|
23
|
+
export default TMDcmtTypeChooser;
|
|
24
|
+
const cellRenderIcon = (data) => _jsx(TMDcmtTypeIcon, { dtd: data.data });
|
|
25
|
+
const cellRenderNameAndDesc = (data) => _jsx("p", { style: { textAlign: 'left', color: data.data.isView ? 'red' : '' }, children: data.value });
|
|
26
|
+
export const TMDcmtTypeChooserForm = (props) => {
|
|
27
|
+
const getItems = async (refreshCache) => {
|
|
28
|
+
let tms = props.tmSession ?? SDK_Globals.tmSession;
|
|
29
|
+
if (refreshCache)
|
|
30
|
+
DcmtTypeListCacheService.RemoveAllWithoutMetadata(tms);
|
|
31
|
+
let count = DcmtTypeListCacheService.CacheCount(true, tms);
|
|
32
|
+
if (count <= 0)
|
|
33
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.ListDcmtTypeOrView} ...` });
|
|
34
|
+
let dtdList = await DcmtTypeListCacheService.GetAllWithoutMetadataAsync(tms);
|
|
35
|
+
if (count <= 0)
|
|
36
|
+
TMSpinner.hide();
|
|
37
|
+
if (props.ShowOnlyDcmtTypes)
|
|
38
|
+
return dtdList?.filter(d => d.isView === false);
|
|
39
|
+
else if (props.ShowOnlySAP)
|
|
40
|
+
return dtdList?.filter(d => d.name?.startsWith('SAP'));
|
|
41
|
+
if (props.filterTemplateTID)
|
|
42
|
+
return dtdList?.filter(d => d.templateTID && props.filterTemplateTID?.includes(d.templateTID));
|
|
43
|
+
return dtdList;
|
|
44
|
+
};
|
|
45
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.ListDcmtTypeOrView, allowMultipleSelection: props.allowMultipleSelection, hasShowOnlySelectedItems: true, width: props.width, height: props.height, selectedIDs: props.selectedIDs, cellRenderIcon: cellRenderIcon, cellRenderNameAndDesc: cellRenderNameAndDesc, dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => props.onChoose?.(IDs) }));
|
|
46
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DcmtTypeDescriptor, MetadataDescriptor, QueryDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { ITMChooserFormProps, ITMChooserProps, TID_MID } from '../../ts';
|
|
4
|
+
import { TID_Alias } from '../../helper/queryHelper';
|
|
5
|
+
interface ITMMetadataChooserProps extends ITMChooserProps {
|
|
6
|
+
/** Consente di visualizzare anche i metadati di sistema */
|
|
7
|
+
allowSysMetadata?: boolean;
|
|
8
|
+
/** TIDs dei tipi documento da cui recuperare i metadati */
|
|
9
|
+
tids?: number[];
|
|
10
|
+
/** Lista dei tipi documento da cui recuperare i metadati */
|
|
11
|
+
inputDcmtTypesList?: DcmtTypeDescriptor[];
|
|
12
|
+
/** Qd da cui recuperare i metadati */
|
|
13
|
+
qd?: QueryDescriptor;
|
|
14
|
+
/** Contiene i TID / MID selezionati */
|
|
15
|
+
values?: TID_MID[];
|
|
16
|
+
/** Visualizza anche il nome del tipo documento */
|
|
17
|
+
showCompleteMetadataName?: boolean;
|
|
18
|
+
/** Se input è qd, visualizza solo i metadati presenti nella clausola Select */
|
|
19
|
+
qdShowOnlySelectItems?: boolean;
|
|
20
|
+
getColorIndex?: (tid: TID_Alias) => string;
|
|
21
|
+
showBorder?: boolean;
|
|
22
|
+
borderRadius?: string;
|
|
23
|
+
hasClear?: boolean;
|
|
24
|
+
openEditorOnSummaryClick?: boolean;
|
|
25
|
+
validationItems?: ValidationItem[];
|
|
26
|
+
}
|
|
27
|
+
declare const TMMetadataChooser: React.FunctionComponent<ITMMetadataChooserProps>;
|
|
28
|
+
export default TMMetadataChooser;
|
|
29
|
+
interface ITMMetadataChooserFormProps extends ITMChooserFormProps<MetadataDescriptor> {
|
|
30
|
+
allowSysMetadata?: boolean;
|
|
31
|
+
/** Lista dei tipi documento da cui recuperare i metadati */
|
|
32
|
+
inputDcmtTypesList?: DcmtTypeDescriptor[];
|
|
33
|
+
/** TIDs dei tipi documento da cui recuperare i metadati */
|
|
34
|
+
tids?: number[];
|
|
35
|
+
/** Qd da cui recuperare i metadati */
|
|
36
|
+
qd?: QueryDescriptor;
|
|
37
|
+
/** Se input è qd, visualizza solo i metadati presenti nella clausola Select */
|
|
38
|
+
qdShowOnlySelectItems?: boolean;
|
|
39
|
+
getColorIndex?: (tid: TID_Alias) => string;
|
|
40
|
+
}
|
|
41
|
+
export declare const TMMetadataChooserForm: React.FunctionComponent<ITMMetadataChooserFormProps>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { DcmtTypeDescriptor, DcmtTypeListCacheService, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts-beta';
|
|
4
|
+
import { Column, GroupItem } from 'devextreme-react/cjs/data-grid';
|
|
5
|
+
import { TMMetadataIcon, TMMidViewer, getDisplayAlias } from '../viewers/TMMidViewer';
|
|
6
|
+
import { getTIDsByQd } from '../../helper/queryHelper';
|
|
7
|
+
import { TMDcmtTypeIcon } from '../viewers/TMTidViewer';
|
|
8
|
+
import { IconSearch, SDKUI_Localizator, IconSettings } from '../../helper';
|
|
9
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
10
|
+
import { StyledBadge, StyledDivHorizontal, StyledDxGridGroupHeader } from '../base/Styled';
|
|
11
|
+
import TMButton from '../base/TMButton';
|
|
12
|
+
import TMSummary from '../editors/TMSummary';
|
|
13
|
+
import TMChooserForm from '../forms/TMChooserForm';
|
|
14
|
+
const TMMetadataChooser = ({ tmSession, dataSource, inputDcmtTypesList, disabled, validationItems, getColorIndex, showCompleteMetadataName, qdShowOnlySelectItems, borderRadius = '4px', fontSize = FontSize.defaultFontSize, backgroundColor, openEditorOnSummaryClick, showBorder = true, showId = false, elementStyle, allowMultipleSelection, allowSysMetadata, value, values, isModifiedWhen, tids, label, width, height, onValueChanged, hasClear, qd, placeHolder }) => {
|
|
15
|
+
const [showChooser, setShowChooser] = useState(false);
|
|
16
|
+
const renderTemplate = () => {
|
|
17
|
+
return (_jsxs(StyledDivHorizontal, { style: { width: 'max-content', height: '100%' }, children: [values && _jsx(TMMidViewer, { tmSession: tmSession, tid_mid: values[0], showIcon: true, showId: showId, showCompleteName: showCompleteMetadataName }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` }), (values == undefined || values.length == 0) && _jsx("p", { children: placeHolder })] }));
|
|
18
|
+
};
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { label: label, width: width, height: showBorder ? height : '24px', validationItems: validationItems, backgroundColor: backgroundColor, placeHolder: placeHolder, fontSize: fontSize, showBorder: showBorder, borderRadius: borderRadius, iconEditButton: _jsx(IconSearch, {}), openEditorOnSummaryClick: openEditorOnSummaryClick, onEditorClick: () => !disabled && setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, template: renderTemplate(), onClearClick: hasClear ? () => { onValueChanged?.([]); } : undefined }), showChooser &&
|
|
20
|
+
_jsx(TMMetadataChooserForm, { tmSession: tmSession, allowMultipleSelection: allowMultipleSelection, height: '500px', width: '600px', allowSysMetadata: allowSysMetadata, getColorIndex: getColorIndex, dataSource: dataSource, inputDcmtTypesList: inputDcmtTypesList, tids: tids, qd: qd, qdShowOnlySelectItems: qdShowOnlySelectItems, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (tid_mids) => { onValueChanged?.(tid_mids); } })] }));
|
|
21
|
+
};
|
|
22
|
+
export default TMMetadataChooser;
|
|
23
|
+
export const TMMetadataChooserForm = ({ tmSession, tids, inputDcmtTypesList, qd, qdShowOnlySelectItems, selectedIDs, dataSource, allowMultipleSelection, allowSysMetadata = true, width, height, getColorIndex, onClose, onChoose }) => {
|
|
24
|
+
const [showSysMetadata, setShowSysMetadata] = useState(false);
|
|
25
|
+
const [hasSysMetadata, setHasSysMetadata] = useState(false);
|
|
26
|
+
const [dcmtTypes, setDcmtTypes] = useState([]);
|
|
27
|
+
const getItems = async (refreshCache) => {
|
|
28
|
+
let dtdList = [];
|
|
29
|
+
let metadata = [];
|
|
30
|
+
let checkProps = qd != undefined ? dataSource != undefined || tids != undefined : dataSource != undefined && tids != undefined;
|
|
31
|
+
if (checkProps)
|
|
32
|
+
throw Error('Le props qd | tids | dataSource devono essere in alternativa');
|
|
33
|
+
if (qd) {
|
|
34
|
+
let tids = getTIDsByQd(qd);
|
|
35
|
+
if (refreshCache)
|
|
36
|
+
DcmtTypeListCacheService.RemoveWithMetadata(tids.map((item) => item.tid));
|
|
37
|
+
let dtds = await DcmtTypeListCacheService.GetFromTIDsAsync(tids.map((item) => item.tid), true, tmSession);
|
|
38
|
+
for (let i = 0; i < dtds.length; i++) {
|
|
39
|
+
const dtd = new DcmtTypeDescriptor();
|
|
40
|
+
dtd.init({ ...dtds[i] });
|
|
41
|
+
const alias = tids?.[i].alias;
|
|
42
|
+
dtd.customData2 = alias;
|
|
43
|
+
if (!qdShowOnlySelectItems) {
|
|
44
|
+
dtd.metadata?.forEach((md) => {
|
|
45
|
+
md.customData1 = dtd.id;
|
|
46
|
+
md.customData2 = alias;
|
|
47
|
+
}); //getDisplayAlias(SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name, alias)
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
let newMetadata = dtd.metadata?.filter(o => qd.select?.some(s => s.tid == dtd.id && s.mid == o.id && s.alias == alias));
|
|
51
|
+
newMetadata?.forEach((md) => {
|
|
52
|
+
md.customData1 = dtd.id;
|
|
53
|
+
md.customData2 = alias;
|
|
54
|
+
});
|
|
55
|
+
dtd.metadata = newMetadata;
|
|
56
|
+
}
|
|
57
|
+
dtdList.push(dtd);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (inputDcmtTypesList) {
|
|
61
|
+
for (let i = 0; i < inputDcmtTypesList.length; i++) {
|
|
62
|
+
const dtd = new DcmtTypeDescriptor();
|
|
63
|
+
dtd.init({ ...inputDcmtTypesList[i] });
|
|
64
|
+
dtd.metadata?.forEach((md) => { md.customData1 = dtd.id; });
|
|
65
|
+
dtdList.push(dtd);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (tids) {
|
|
69
|
+
if (tids.length <= 0)
|
|
70
|
+
return [];
|
|
71
|
+
if (refreshCache)
|
|
72
|
+
DcmtTypeListCacheService.RemoveWithMetadata(tids);
|
|
73
|
+
for (let i = 0; i < tids.length; i++) {
|
|
74
|
+
if (!tids[i])
|
|
75
|
+
continue;
|
|
76
|
+
let dtd = await DcmtTypeListCacheService.GetAsync(tids[i], true, tmSession);
|
|
77
|
+
if (!dtd)
|
|
78
|
+
throw new Error(`TID sconosciuto (${tids[i]})`);
|
|
79
|
+
dtd?.metadata?.forEach((md) => { md.customData1 = dtd?.id; });
|
|
80
|
+
dtdList.push(dtd);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
for (const dtd of dtdList) {
|
|
84
|
+
if (!dtd.metadata)
|
|
85
|
+
continue;
|
|
86
|
+
for (const md of dtd.metadata)
|
|
87
|
+
metadata.push(md);
|
|
88
|
+
}
|
|
89
|
+
setDcmtTypes(dtdList);
|
|
90
|
+
setHasSysMetadata(allowSysMetadata && metadata.findIndex(md => md.isSystem == 1) >= 0);
|
|
91
|
+
return metadata;
|
|
92
|
+
};
|
|
93
|
+
const cellRenderIcon = (data) => {
|
|
94
|
+
let md = data.data;
|
|
95
|
+
return (_jsx(TMMetadataIcon, { tid: md.customData1 ?? 0, md: md }));
|
|
96
|
+
};
|
|
97
|
+
const groupCellRender = (data) => {
|
|
98
|
+
let tid_alias = JSON.parse(data.value);
|
|
99
|
+
let dtd = dcmtTypes?.find(o => o.id == tid_alias.tid);
|
|
100
|
+
return _jsxs(StyledDxGridGroupHeader, { "$backgroundColor": getColorIndex?.(tid_alias), children: [_jsx(TMDcmtTypeIcon, { dtd: dtd }), _jsx("p", { children: getDisplayAlias(SDK_Globals.useLocalizedName ? dtd?.nameLoc : dtd?.name, tid_alias.alias) }), data.summaryItems && data.summaryItems.length > 0 && _jsx(StyledBadge, { "$backgroundColor": TMColors.info, children: data.summaryItems[0].value })] });
|
|
101
|
+
};
|
|
102
|
+
const renderDataGridColumns = [
|
|
103
|
+
_jsx(Column, { dataField: 'isSystem', visible: false, width: 30 }, 0),
|
|
104
|
+
_jsx(Column, { dataField: 'customData2', visible: false, groupIndex: dcmtTypes.length > 1 ? 0 : undefined, calculateCellValue: (rowData) => {
|
|
105
|
+
let tid_alias = { tid: rowData.customData1, alias: rowData.customData2 };
|
|
106
|
+
return JSON.stringify(tid_alias);
|
|
107
|
+
}, groupCellRender: groupCellRender }, 1)
|
|
108
|
+
];
|
|
109
|
+
const renderSummaryItems = [
|
|
110
|
+
_jsx(GroupItem, { column: "id", summaryType: "count" }, 2)
|
|
111
|
+
];
|
|
112
|
+
const renderCustomButtons = () => {
|
|
113
|
+
return (_jsx(StyledDivHorizontal, { children: hasSysMetadata && _jsx(TMButton, { caption: SDKUI_Localizator.ShowHideMetadataSystemDesc, icon: _jsx(IconSettings, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => setShowSysMetadata(!showSysMetadata) }) }));
|
|
114
|
+
};
|
|
115
|
+
const convertID = (md) => { return { tid: md.customData1, mid: md.id, aliasTID: md.customData2 }; };
|
|
116
|
+
const customFilter = (items) => { return showSysMetadata ? items : items.filter(o => o.isSystem != 1); };
|
|
117
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.Metadatas, allowMultipleSelection: allowMultipleSelection, allowSorting: false, allowGrouping: dcmtTypes.length > 1, width: width, height: height, selectedIDs: selectedIDs?.map((item) => item.mid), convertID: convertID, customFilter: customFilter, cellRenderIcon: cellRenderIcon, cellRenderNameAndDesc: (data) => { return _jsx("p", { style: { textAlign: 'left', color: data.data.isRequired == 1 ? 'red' : '' }, children: data.value }); }, dataSource: dataSource, getItems: getItems, customButtons: renderCustomButtons(), columns: renderDataGridColumns, summaryItems: renderSummaryItems, onClose: onClose, onChoose: (IDs) => onChoose?.(IDs) }));
|
|
118
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { ITMChooserFormProps, ITMChooserProps } from '../../ts';
|
|
4
|
+
interface ITMUserChooserProps extends ITMChooserProps {
|
|
5
|
+
/** Contiene i values selezionati */
|
|
6
|
+
values?: number[];
|
|
7
|
+
/** Visualizza il bordo */
|
|
8
|
+
showBorder?: boolean;
|
|
9
|
+
/** Se presente, visualizza il bottone Pulisci ed esegue */
|
|
10
|
+
hasClear?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const TMUserChooser: React.FunctionComponent<ITMUserChooserProps>;
|
|
13
|
+
export default TMUserChooser;
|
|
14
|
+
export declare const TMUserChooserForm: React.FunctionComponent<ITMChooserFormProps<UserDescriptor>>;
|
|
15
|
+
export declare const TMUserIdViewer: ({ userId, showIcon, noneSelectionText }: {
|
|
16
|
+
userId?: number;
|
|
17
|
+
showIcon?: boolean;
|
|
18
|
+
noneSelectionText?: string;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const TMUserIcon: ({ ud }: {
|
|
21
|
+
ud?: UserDescriptor;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare const TMUserTooltip: ({ ud, children }: {
|
|
24
|
+
ud?: UserDescriptor;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { SDK_Localizator, UserLevels, UserListCacheService } from '@topconsultnpm/sdk-ts-beta';
|
|
4
|
+
import { Column } from 'devextreme-react/cjs/data-grid';
|
|
5
|
+
import { SDKUI_Localizator, IconSearch, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator } from '../../helper';
|
|
6
|
+
import { StyledDivHorizontal, StyledTooltipContainer, StyledTooltipItem, StyledTooltipSeparatorItem } from '../base/Styled';
|
|
7
|
+
import TMSpinner from '../base/TMSpinner';
|
|
8
|
+
import TMTooltip from '../base/TMTooltip';
|
|
9
|
+
import TMSummary from '../editors/TMSummary';
|
|
10
|
+
import TMChooserForm from '../forms/TMChooserForm';
|
|
11
|
+
const TMUserChooser = ({ dataSource, backgroundColor, disabled = false, showBorder = true, elementStyle, allowMultipleSelection, values, isModifiedWhen, label, placeHolder, validationItems = [], onValueChanged, hasClear }) => {
|
|
12
|
+
const [showChooser, setShowChooser] = useState(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!values || values.length <= 0)
|
|
15
|
+
return;
|
|
16
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.Users} ...` });
|
|
17
|
+
UserListCacheService.GetAsync(values[0]).then(() => { TMSpinner.hide(); });
|
|
18
|
+
}, [values]);
|
|
19
|
+
const renderTemplate = () => {
|
|
20
|
+
return (_jsx(StyledDivHorizontal, { style: { minWidth: '125px' }, children: placeHolder && (!values || values.length <= 0)
|
|
21
|
+
? _jsx("p", { children: placeHolder })
|
|
22
|
+
: _jsxs(_Fragment, { children: [_jsx(TMUserIdViewer, { userId: values?.[0], showIcon: true }), values && values.length > 1 && _jsx("p", { style: { marginLeft: '10px' }, children: `(+${values.length - 1} ${values.length == 2 ? 'altro' : 'altri'})` })] }) }));
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { disabled: disabled, backgroundColor: backgroundColor, showBorder: showBorder, iconEditButton: _jsx(IconSearch, {}), onEditorClick: () => setShowChooser(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, template: renderTemplate(), onClearClick: hasClear ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
|
|
25
|
+
_jsx(TMUserChooserForm, { allowMultipleSelection: allowMultipleSelection, dataSource: dataSource, selectedIDs: values, onClose: () => setShowChooser(false), onChoose: (IDs) => { onValueChanged?.(IDs); } })] }));
|
|
26
|
+
};
|
|
27
|
+
export default TMUserChooser;
|
|
28
|
+
export const TMUserChooserForm = (props) => {
|
|
29
|
+
const renderDataGridColumns = [
|
|
30
|
+
_jsx(Column, { dataField: "domain", visibleIndex: 2, caption: SDKUI_Localizator.Domain, dataType: 'string' }, 3)
|
|
31
|
+
];
|
|
32
|
+
const getItems = async (refreshCache) => {
|
|
33
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.Users} ...` });
|
|
34
|
+
if (refreshCache)
|
|
35
|
+
UserListCacheService.RemoveAll();
|
|
36
|
+
let users = await UserListCacheService.GetAllAsync();
|
|
37
|
+
TMSpinner.hide();
|
|
38
|
+
return users;
|
|
39
|
+
};
|
|
40
|
+
return (_jsx(TMChooserForm, { title: SDK_Localizator.Users, allowMultipleSelection: props.allowMultipleSelection, hasShowOnlySelectedItems: true, width: props.width, height: props.height, manageUseLocalizedName: false, columns: renderDataGridColumns, selectedIDs: props.selectedIDs, cellRenderIcon: (data) => { return _jsx(TMUserIcon, { ud: data.data }); }, dataSource: props.dataSource, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => props.onChoose?.(IDs) }));
|
|
41
|
+
};
|
|
42
|
+
export const TMUserIdViewer = ({ userId, showIcon = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
|
|
43
|
+
const [ud, setUd] = useState();
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (!userId || userId <= 0) {
|
|
46
|
+
setUd(undefined);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.Users} ...` });
|
|
50
|
+
UserListCacheService.GetAsync(userId).then((ud) => { setUd(ud); TMSpinner.hide(); });
|
|
51
|
+
}, [userId]);
|
|
52
|
+
return (_jsxs(StyledDivHorizontal, { children: [showIcon && _jsx(TMUserIcon, { ud: ud }), _jsx("p", { style: { textAlign: 'left', marginLeft: showIcon ? '5px' : '' }, children: ud ? getCompleteUserName(ud.domain, ud.name) : noneSelectionText })] }));
|
|
53
|
+
};
|
|
54
|
+
export const TMUserIcon = ({ ud }) => {
|
|
55
|
+
if (!ud)
|
|
56
|
+
return null;
|
|
57
|
+
let icon = getUserIcon(ud.level);
|
|
58
|
+
return (_jsx(TMUserTooltip, { ud: ud, children: icon }));
|
|
59
|
+
};
|
|
60
|
+
export const TMUserTooltip = ({ ud, children }) => {
|
|
61
|
+
const renderTooltipContent = (ud) => {
|
|
62
|
+
return (!ud ? null
|
|
63
|
+
: _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${getCompleteUserName(ud.domain, ud.name)} (UserId: ${ud.id})` }), ud.level && _jsx(StyledTooltipItem, { children: ud.level }), _jsx(StyledTooltipSeparatorItem, {}), ud.description && _jsx(StyledTooltipItem, { children: ud.description }), ud.type && _jsx(StyledTooltipItem, { children: ud.type })] }));
|
|
64
|
+
};
|
|
65
|
+
return (_jsx(TMTooltip, { content: renderTooltipContent(ud), children: children }));
|
|
66
|
+
};
|
|
67
|
+
const getCompleteUserName = (domain, name) => {
|
|
68
|
+
if (!name)
|
|
69
|
+
return undefined;
|
|
70
|
+
if (!domain)
|
|
71
|
+
return name;
|
|
72
|
+
return domain + "\\" + name;
|
|
73
|
+
};
|
|
74
|
+
const getUserIcon = (userLevel) => {
|
|
75
|
+
switch (userLevel) {
|
|
76
|
+
case UserLevels.Member: return _jsx(IconUserLevelMember, {});
|
|
77
|
+
case UserLevels.Administrator: return _jsx(IconUserLevelAdministrator, {});
|
|
78
|
+
case UserLevels.SystemAdministrator: return _jsx(IconUserLevelSystemAdministrator, {});
|
|
79
|
+
case UserLevels.AutonomousAdministrator: return _jsx(IconUserLevelAutonomousAdministrator, {});
|
|
80
|
+
default: return null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
+
export interface ITMCheckBox extends ITMEditorBase {
|
|
4
|
+
label?: string;
|
|
5
|
+
value?: boolean | number | undefined;
|
|
6
|
+
onValueChanged?: (e: any) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const TMCheckBox: React.FunctionComponent<ITMCheckBox>;
|
|
9
|
+
export default TMCheckBox;
|