@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,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
const StyledCheckBoxContainer = styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: ${props => props.$labelPosition === 'right' ? 'row-reverse' : 'row'} ;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: fit-content;
|
|
11
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
12
|
+
`;
|
|
13
|
+
const StyledCheckBoxLabel = styled.div `
|
|
14
|
+
margin-right: ${props => props.$labelPosition === 'left' ? '5px' : '0'};
|
|
15
|
+
margin-left: ${props => props.$labelPosition === 'right' ? '5px' : '0'};
|
|
16
|
+
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
17
|
+
font-size: ${props => props.$fontSize};
|
|
18
|
+
user-select: none;
|
|
19
|
+
&:focus{
|
|
20
|
+
outline: none;
|
|
21
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
22
|
+
border-bottom: 2px solid;
|
|
23
|
+
border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const StyledCheckbox = styled.input `
|
|
27
|
+
accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
|
|
28
|
+
width: 14px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
31
|
+
`;
|
|
32
|
+
const TMCheckBox = ({ isModifiedWhen, elementStyle, disabled = false, label, value, labelPosition = 'right', fontSize = FontSize.defaultFontSize, onValueChanged }) => {
|
|
33
|
+
const [initialValue, setInitialValue] = useState(value);
|
|
34
|
+
const [currentValue, setCurrentValue] = useState(value);
|
|
35
|
+
useEffect(() => { setInitialValue(value); }, []);
|
|
36
|
+
useEffect(() => { setCurrentValue(value); }, [value]);
|
|
37
|
+
useEffect(() => { toggleChecked(); }, [value]);
|
|
38
|
+
const toggleChecked = () => {
|
|
39
|
+
switch (typeof initialValue) {
|
|
40
|
+
case 'boolean':
|
|
41
|
+
setCurrentValue(!currentValue);
|
|
42
|
+
break;
|
|
43
|
+
case 'number':
|
|
44
|
+
if (initialValue === 0) {
|
|
45
|
+
if (currentValue === 0) {
|
|
46
|
+
setCurrentValue(1);
|
|
47
|
+
}
|
|
48
|
+
if (currentValue > 0) {
|
|
49
|
+
setCurrentValue(0);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (initialValue > 0) {
|
|
53
|
+
if (currentValue === 0) {
|
|
54
|
+
setCurrentValue(1);
|
|
55
|
+
}
|
|
56
|
+
if (currentValue > 0) {
|
|
57
|
+
setCurrentValue(0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
case 'undefined':
|
|
62
|
+
if (currentValue > 0) {
|
|
63
|
+
setCurrentValue(undefined);
|
|
64
|
+
}
|
|
65
|
+
if (currentValue === undefined) {
|
|
66
|
+
setCurrentValue(1);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const isChecked = () => {
|
|
72
|
+
let myBool = true;
|
|
73
|
+
switch (currentValue) {
|
|
74
|
+
case false:
|
|
75
|
+
case 0:
|
|
76
|
+
case undefined:
|
|
77
|
+
myBool = false;
|
|
78
|
+
break;
|
|
79
|
+
default:
|
|
80
|
+
myBool = true;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
return myBool;
|
|
84
|
+
};
|
|
85
|
+
const renderedCheckbox = () => {
|
|
86
|
+
return (_jsxs(StyledCheckBoxContainer, { "$disabled": disabled, "$labelPosition": labelPosition, onKeyDown: (e) => e.code === 'Space' && !disabled && onValueChanged && onValueChanged(currentValue), onClick: () => { !disabled && onValueChanged && onValueChanged(currentValue); }, children: [label && _jsx(StyledCheckBoxLabel, { tabIndex: 0, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, "$labelPosition": labelPosition, "$fontSize": fontSize, children: label }), _jsx(StyledCheckbox, { tabIndex: -1, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, type: 'checkbox', checked: !isChecked(), onChange: () => { } })] }));
|
|
87
|
+
};
|
|
88
|
+
return (_jsx("div", { style: elementStyle, children: renderedCheckbox() }));
|
|
89
|
+
};
|
|
90
|
+
export default TMCheckBox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
2
|
+
import { IDateBoxOptions } from 'devextreme-react/cjs/date-box';
|
|
3
|
+
import { DateDisplayTypes } from '../../helper';
|
|
4
|
+
interface ITMDateBoxProps extends IDateBoxOptions {
|
|
5
|
+
dateDisplayType?: DateDisplayTypes;
|
|
6
|
+
validationItems?: ValidationItem[];
|
|
7
|
+
isModifiedWhen?: boolean;
|
|
8
|
+
useDateSerializationFormat?: boolean;
|
|
9
|
+
containerElement?: Element;
|
|
10
|
+
}
|
|
11
|
+
declare const TMDateBox: (props: ITMDateBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default TMDateBox;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { DateBox } from 'devextreme-react';
|
|
4
|
+
import { DateDisplayTypes, Globalization } from '../../helper';
|
|
5
|
+
import { TMColors } from '../../utils/theme';
|
|
6
|
+
import TMVilViewer from '../base/TMVilViewer';
|
|
7
|
+
const TMDateBox = (props) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
let htmlElement = dateBoxRef?.current?.instance().element();
|
|
10
|
+
if (!htmlElement)
|
|
11
|
+
return;
|
|
12
|
+
let color = props.isModifiedWhen ? TMColors.tertiary : TMColors.border_normal;
|
|
13
|
+
let label = htmlElement.getElementsByClassName("dx-label")[0];
|
|
14
|
+
if (label) {
|
|
15
|
+
label.style.borderBottomColor = color;
|
|
16
|
+
}
|
|
17
|
+
let labelBefore = htmlElement.getElementsByClassName("dx-label-before")[0];
|
|
18
|
+
if (labelBefore) {
|
|
19
|
+
labelBefore.style.borderBottomColor = color;
|
|
20
|
+
labelBefore.style.borderTopColor = color;
|
|
21
|
+
labelBefore.style.borderInlineStartColor = color;
|
|
22
|
+
}
|
|
23
|
+
let labelAfter = htmlElement.getElementsByClassName("dx-label-after")[0];
|
|
24
|
+
if (labelAfter) {
|
|
25
|
+
labelAfter.style.borderBottomColor = color;
|
|
26
|
+
labelAfter.style.borderTopColor = color;
|
|
27
|
+
labelAfter.style.borderInlineEndColor = color;
|
|
28
|
+
}
|
|
29
|
+
}, [props.isModifiedWhen]);
|
|
30
|
+
const dateBoxRef = useRef(null);
|
|
31
|
+
// soluzione tratta da https://supportcenter.devexpress.com/ticket/details/t1025617/setting-default-time-in-datebox
|
|
32
|
+
const dropDownOptions = {
|
|
33
|
+
container: props.containerElement,
|
|
34
|
+
onShown: (e) => {
|
|
35
|
+
if (props.value != undefined)
|
|
36
|
+
return;
|
|
37
|
+
let dateBoxInstance = dateBoxRef.current?.instance();
|
|
38
|
+
const currentDate = new Date();
|
|
39
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
40
|
+
dateBoxInstance._strategy._timeView.option("value", currentDate);
|
|
41
|
+
dateBoxInstance._strategy._widget.option("value", currentDate);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getType = () => {
|
|
45
|
+
if (props.type != undefined)
|
|
46
|
+
return props.type;
|
|
47
|
+
if (!props.dateDisplayType || props.dateDisplayType == DateDisplayTypes.DateTime)
|
|
48
|
+
return "datetime";
|
|
49
|
+
return props.dateDisplayType == DateDisplayTypes.Date ? "date" : "time";
|
|
50
|
+
};
|
|
51
|
+
return (_jsxs(_Fragment, { children: [_jsx(DateBox, { ref: dateBoxRef,
|
|
52
|
+
// defaultValue={props.defaultValue}
|
|
53
|
+
dateSerializationFormat: props.useDateSerializationFormat ? 'yyyy-MM-ddTHH:mm:ss' : undefined, disabled: props.disabled, displayFormat: props.displayFormat ?? Globalization.getDateDisplayFormat(props.dateDisplayType), dropDownOptions: dropDownOptions, label: props.label, labelMode: 'static', type: getType(), useMaskBehavior: true, height: '28px', value: props.value, width: props.width, valueChangeEvent: 'keyup input change', onValueChange: (e) => { props.onValueChange?.(e); }, onKeyUp: (e) => {
|
|
54
|
+
if (e.event?.code == "Space") {
|
|
55
|
+
const currentDate = new Date();
|
|
56
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
57
|
+
e.component.option("value", currentDate.toISOString());
|
|
58
|
+
}
|
|
59
|
+
}, onValueChanged: (e) => {
|
|
60
|
+
// soluzione in https://supportcenter.devexpress.com/ticket/details/t1103734/datebox-how-to-initialize-time-to-00-00-when-key-is-pressed-instead-of-current-time
|
|
61
|
+
if (props.value != undefined)
|
|
62
|
+
return;
|
|
63
|
+
if (!e.value)
|
|
64
|
+
return;
|
|
65
|
+
const currentType = getType();
|
|
66
|
+
if (currentType !== 'datetime') {
|
|
67
|
+
const currentDate = new Date(e.value);
|
|
68
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
69
|
+
e.component.option("value", currentDate.toISOString());
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// If type is 'datetime', get the hours from the input value
|
|
73
|
+
const newValue = new Date(e.value);
|
|
74
|
+
e.component.option("value", newValue.toISOString());
|
|
75
|
+
}
|
|
76
|
+
} }), _jsx(TMVilViewer, { vil: props.validationItems })] }));
|
|
77
|
+
};
|
|
78
|
+
export default TMDateBox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
+
interface ITMDropDown extends ITMEditorBase {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
value?: string | number | undefined;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onValueChanged?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const TMDropDown: React.FC<ITMDropDown>;
|
|
10
|
+
export default TMDropDown;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
5
|
+
import { StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from "./TMEditorStyled";
|
|
6
|
+
import TMLayoutContainer, { TMLayoutItem } from "../base/TMLayout";
|
|
7
|
+
import TMVilViewer from "../base/TMVilViewer";
|
|
8
|
+
const StyledDropDown = styled.select `
|
|
9
|
+
width: ${props => props.$width};
|
|
10
|
+
padding: 5px 15px 3px 9px;
|
|
11
|
+
border: 1px solid;
|
|
12
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
13
|
+
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid ;
|
|
14
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
15
|
+
color: ${props => !props.disabled ? (props.$vil.length === 0) ? !props.$isModified ? TMColors.text_normal : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
16
|
+
border-radius: 2px;
|
|
17
|
+
min-width: 70px;
|
|
18
|
+
&:focus{
|
|
19
|
+
outline: none;
|
|
20
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
21
|
+
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
22
|
+
border-bottom: 2px solid ;
|
|
23
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
24
|
+
}
|
|
25
|
+
font-size: ${props => props.$fontSize};
|
|
26
|
+
&::placeholder {
|
|
27
|
+
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
28
|
+
font-size: ${props => props.$fontSize};
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const TMDropDown = ({ validationItems = [], disabled = false, elementStyle, isModifiedWhen, labelPosition = 'left', label, icon, width = '100%', fontSize = FontSize.defaultFontSize, dataSource, value, onValueChanged }) => {
|
|
32
|
+
const [isFocused, setIsfocused] = useState(false);
|
|
33
|
+
const renderedLeftLabelTextBox = () => {
|
|
34
|
+
return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && _jsx(StyledEditorLabel, { "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, "$fontSize": fontSize, children: label }), _jsx(StyledDropDown, { value: value, onFocus: () => setIsfocused(true), onBlur: () => setIsfocused(false), "$disabled": disabled, disabled: disabled, "$fontSize": fontSize, "$width": width, "$isModified": isModifiedWhen, "$vil": validationItems, onChange: onValueChanged, children: dataSource?.map((data, index) => (_jsx("option", { value: data.value, children: data.display }, index))) }), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
|
|
35
|
+
};
|
|
36
|
+
return (_jsx("div", { style: elementStyle, children: renderedLeftLabelTextBox() }));
|
|
37
|
+
};
|
|
38
|
+
export default TMDropDown;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ValidationItem } from '@topconsultnpm/sdk-ts-beta';
|
|
2
|
+
export declare const editorColorManager: (validationItems: ValidationItem[]) => string;
|
|
3
|
+
export declare const StyledEditorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$width: string;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
7
|
+
$vil: ValidationItem[];
|
|
8
|
+
$width: string;
|
|
9
|
+
$type: string;
|
|
10
|
+
$isModified: boolean;
|
|
11
|
+
$maxValue: number;
|
|
12
|
+
$fontSize: string;
|
|
13
|
+
$disabled: boolean;
|
|
14
|
+
$isMobile?: boolean;
|
|
15
|
+
}>> & string;
|
|
16
|
+
export declare const StyledEditorIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
|
+
$vil: ValidationItem[];
|
|
18
|
+
$disabled: boolean;
|
|
19
|
+
$isModified: boolean;
|
|
20
|
+
}>> & string;
|
|
21
|
+
export declare const StyledEditorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
22
|
+
$isFocused: boolean;
|
|
23
|
+
$labelPosition: "right" | "left" | "top";
|
|
24
|
+
$disabled: boolean;
|
|
25
|
+
$fontSize: string;
|
|
26
|
+
}>> & string;
|
|
27
|
+
export declare const StyledEditorButtonIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
28
|
+
$index: number;
|
|
29
|
+
$transform: string;
|
|
30
|
+
}>> & string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { ResultTypes } from '@topconsultnpm/sdk-ts-beta';
|
|
3
|
+
import { TMColors } from '../../utils/theme';
|
|
4
|
+
export const editorColorManager = (validationItems) => {
|
|
5
|
+
if (validationItems.find(item => item.ResultType === ResultTypes.ERROR))
|
|
6
|
+
return TMColors.error;
|
|
7
|
+
if (validationItems.find(item => item.ResultType === ResultTypes.WARNING))
|
|
8
|
+
return TMColors.warning;
|
|
9
|
+
if (validationItems.find(item => item.ResultType === ResultTypes.INFO))
|
|
10
|
+
return TMColors.info;
|
|
11
|
+
return '';
|
|
12
|
+
};
|
|
13
|
+
export const StyledEditorContainer = styled.div `
|
|
14
|
+
width: ${props => props.$width};
|
|
15
|
+
position: relative;
|
|
16
|
+
`;
|
|
17
|
+
export const StyledEditor = styled.input `
|
|
18
|
+
width: ${props => props.$width};
|
|
19
|
+
padding: ${props => props.$type === 'password' ? '5px 10px 5px 13px' : '5px 13px'};
|
|
20
|
+
border: 1px solid;
|
|
21
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
22
|
+
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid ;
|
|
23
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
24
|
+
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
25
|
+
border-radius: 2px;
|
|
26
|
+
min-width: ${props => props.$isMobile && '70px'};
|
|
27
|
+
&:focus{
|
|
28
|
+
outline: none;
|
|
29
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
30
|
+
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
31
|
+
border-bottom: 2px solid ;
|
|
32
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
font-size: ${props => props.$fontSize};
|
|
36
|
+
&::placeholder {
|
|
37
|
+
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
38
|
+
font-size: ${props => props.$fontSize};
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
export const StyledEditorIcon = styled.div `
|
|
42
|
+
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'rgb(80,80,80)' : TMColors.tertiary : editorColorManager(props.$vil) : 'rgb(180,180,180)'};
|
|
43
|
+
width: 25px;
|
|
44
|
+
height: 25px;
|
|
45
|
+
margin-right: 2px;
|
|
46
|
+
font-size: 18px;
|
|
47
|
+
user-select: none;
|
|
48
|
+
transform: translateY(18px);
|
|
49
|
+
`;
|
|
50
|
+
export const StyledEditorLabel = styled.div `
|
|
51
|
+
font-size: ${props => props.$fontSize} ;
|
|
52
|
+
color:${props => !props.$disabled ? props.$isFocused ? TMColors.primary : TMColors.label_normal : TMColors.disabled};
|
|
53
|
+
padding: 0 3px;
|
|
54
|
+
user-select: none;
|
|
55
|
+
transform: ${props => props.$labelPosition === 'left' && 'translateY(5px)'};
|
|
56
|
+
width: max-content;
|
|
57
|
+
transform: translate(10px, 6px);
|
|
58
|
+
background-color: ${TMColors.default_background};
|
|
59
|
+
position: relative;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
`;
|
|
62
|
+
export const StyledEditorButtonIcon = styled.div `
|
|
63
|
+
color: ${TMColors.button_icon};
|
|
64
|
+
position: absolute;
|
|
65
|
+
right: ${(props) => (props.$index + 1) * 10 + (10 * props.$index)}px;
|
|
66
|
+
font-size: 18px;
|
|
67
|
+
transform: ${props => `translateY(${props.$transform})`};
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
&:focus{
|
|
70
|
+
outline: none;
|
|
71
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
72
|
+
border-bottom: 2px solid;
|
|
73
|
+
border-bottom-color: ${TMColors.primary};
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
+
interface ITMRadioButton extends ITMEditorBase {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
alignment?: 'flex-start' | 'flex-end' | 'space-between' | 'center' | 'space-around';
|
|
6
|
+
direction?: 'row' | 'column';
|
|
7
|
+
onValueChanged?: (e: any) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const TMRadioButton: React.FC<ITMRadioButton>;
|
|
10
|
+
export default TMRadioButton;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { makeID } from '../../helper/helpers';
|
|
5
|
+
const StyledWrapper = styled.label `
|
|
6
|
+
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: ${props => props.$direction};
|
|
9
|
+
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
10
|
+
font-size: ${props => props.$fontSize};
|
|
11
|
+
gap: ${props => props.$direction === 'row' ? '20px' : "10px"};
|
|
12
|
+
`;
|
|
13
|
+
const StyledRadioGroupLabel = styled.div `
|
|
14
|
+
flex: ${props => props.$flexBase};
|
|
15
|
+
`;
|
|
16
|
+
const StyledRadioGroupContainer = styled.div `
|
|
17
|
+
flex: ${props => 10 - props.$flexBase};
|
|
18
|
+
`;
|
|
19
|
+
const StyledRadioButtonWrapper = styled.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: ${props => props.$direction};
|
|
22
|
+
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
gap: ${props => props.$direction === 'row' ? '10px' : '5px'};
|
|
25
|
+
`;
|
|
26
|
+
const StyledRadioButtoncontainer = styled.div `
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
gap: 5px;
|
|
32
|
+
height: 18px;
|
|
33
|
+
`;
|
|
34
|
+
const StyledRadioButton = styled.input `
|
|
35
|
+
accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
|
|
36
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
37
|
+
`;
|
|
38
|
+
const StyledradioButtonLabel = styled.label `
|
|
39
|
+
font-size: ${props => props.$fontSize};
|
|
40
|
+
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
41
|
+
user-select: none;
|
|
42
|
+
width: 100%;
|
|
43
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
44
|
+
&:focus{
|
|
45
|
+
outline: none;
|
|
46
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
47
|
+
border-bottom: 2px solid ;
|
|
48
|
+
border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const TMRadioButton = ({ isModifiedWhen, flexBase = 1, elementStyle, label, value, fontSize = FontSize.defaultFontSize, dataSource = [], direction = 'row', onValueChanged, disabled = false }) => {
|
|
52
|
+
const renderedRadioButtons = () => {
|
|
53
|
+
return (_jsx(StyledRadioButtonWrapper, { "$direction": direction, children: dataSource.map((data, index) => (_jsxs(StyledRadioButtoncontainer, { children: [_jsx(StyledRadioButton, { "$disabled": disabled, tabIndex: -1, name: makeID(8), checked: value === data.value ? true : false, onChange: () => onValueChanged(data.value), disabled: disabled, type: 'radio' }), _jsxs(StyledradioButtonLabel, { tabIndex: 0, onKeyDown: (e) => e.code === 'Space' && onValueChanged(data.value), onClick: () => onValueChanged(data.value), "$isModifiedWhen": isModifiedWhen, "$fontSize": fontSize, "$disabled": disabled, children: [" ", data.display, " "] })] }, index))) }));
|
|
54
|
+
};
|
|
55
|
+
return (_jsx("div", { style: elementStyle, children: _jsxs(StyledWrapper, { "$isModifiedWhen": isModifiedWhen, "$direction": direction, "$disabled": disabled, "$fontSize": fontSize, style: { display: 'flex', flexDirection: direction, alignItems: direction === 'row' ? 'center' : 'flex-start', fontSize: fontSize, gap: direction === 'row' ? '20px' : "10px" }, children: [label && _jsx(StyledRadioGroupLabel, { "$flexBase": flexBase, children: label }), _jsx(StyledRadioGroupContainer, { "$flexBase": flexBase, children: renderedRadioButtons() })] }) }));
|
|
56
|
+
};
|
|
57
|
+
export default TMRadioButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
+
interface ITMSummary extends ITMEditorBase {
|
|
4
|
+
showBorder?: boolean;
|
|
5
|
+
borderRadius?: string;
|
|
6
|
+
showInfo?: boolean;
|
|
7
|
+
infoTemplate?: React.ReactNode;
|
|
8
|
+
iconEditButton?: React.ReactNode;
|
|
9
|
+
template?: React.ReactNode;
|
|
10
|
+
openEditorOnSummaryClick?: boolean;
|
|
11
|
+
customBtn?: any;
|
|
12
|
+
onEditorClick?: () => void;
|
|
13
|
+
onClearClick?: () => void;
|
|
14
|
+
onCustumBtnClick?: () => void;
|
|
15
|
+
onValueChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const TMSummary: React.FunctionComponent<ITMSummary>;
|
|
18
|
+
export default TMSummary;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
4
|
+
import { StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
|
|
5
|
+
import { IconCircleInfo, IconClear, IconPencil, SDKUI_Localizator } from '../../helper';
|
|
6
|
+
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
7
|
+
import TMVilViewer from '../base/TMVilViewer';
|
|
8
|
+
import TMTooltip from '../base/TMTooltip';
|
|
9
|
+
const StyledSummaryTemplateInput = styled.div `
|
|
10
|
+
width: ${props => props.$width};
|
|
11
|
+
height: ${props => props.$height};
|
|
12
|
+
padding: ${props => !props.$showBorder ? '0px 5px' : '4px 5px 4px 13px'};
|
|
13
|
+
border: ${props => !props.$showBorder ? '' : '1px solid'};
|
|
14
|
+
background-color: ${props => props.$backgroundColor};
|
|
15
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
16
|
+
border-bottom: ${props => !props.$showBorder ? '' : (props.$vil.length > 0) ? '3px solid' : '1px solid'} ;
|
|
17
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
18
|
+
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
19
|
+
border-radius: ${props => !props.$showBorder ? props.$borderRadius : '2px'};
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
/* min-width: 70px; */
|
|
23
|
+
&:focus{
|
|
24
|
+
outline: none;
|
|
25
|
+
background-image: ${props => !props.$showBorder ? '' : 'linear-gradient(white, #E4E9F7)'};
|
|
26
|
+
border: ${props => !props.$showBorder ? '' : props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
27
|
+
border-bottom: ${props => !props.$showBorder ? '' : '2px solid'};
|
|
28
|
+
border-bottom-color: ${props => !props.$showBorder ? '' : (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
29
|
+
}
|
|
30
|
+
font-size: ${props => props.$fontSize};
|
|
31
|
+
&::placeholder {
|
|
32
|
+
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
33
|
+
font-size: ${props => props.$fontSize};
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
const StyledEditorButtonIcon2 = styled.div `
|
|
37
|
+
color: ${TMColors.button_icon};
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
position: relative;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
&:focus{
|
|
43
|
+
outline: none;
|
|
44
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
45
|
+
border-bottom: 2px solid;
|
|
46
|
+
border-bottom-color: ${TMColors.primary};
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
const TMSummary = ({ customBtn, borderRadius = '4px', validationItems = [], label = '', showInfo, infoTemplate, onClearClick, onCustumBtnClick, openEditorOnSummaryClick, onEditorClick, backgroundColor = 'transparent', showBorder = true, isModifiedWhen, elementStyle, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, icon, iconEditButton, labelPosition = 'left', template, disabled = false, onValueChanged }) => {
|
|
50
|
+
const renderTemplateField = () => {
|
|
51
|
+
return (_jsx(StyledSummaryTemplateInput, { tabIndex: 0, "$backgroundColor": backgroundColor, "$borderRadius": borderRadius, "$isModified": isModifiedWhen, "$vil": validationItems, "$disabled": disabled, "$showBorder": showBorder, "$fontSize": fontSize, "$width": width, "$height": height, onChange: onValueChanged, children: _jsxs("div", { onClick: () => openEditorOnSummaryClick && onEditorClick?.(), onDoubleClick: () => !openEditorOnSummaryClick && onEditorClick?.(), style: { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', width: '100%', minHeight: '16px', cursor: openEditorOnSummaryClick ? 'pointer' : 'default' }, children: [template, _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [!openEditorOnSummaryClick && _jsx(StyledEditorButtonIcon2, { tabIndex: disabled ? -1 : 0, onKeyDown: (e) => e.code === 'Space' && onEditorClick?.(), "$transform": '2px', onClick: onEditorClick, "$index": onCustumBtnClick && onClearClick ? 2 : onCustumBtnClick ? 1 : 0, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Update, children: iconEditButton ?? _jsx(IconPencil, {}) }) }), onClearClick && _jsx(StyledEditorButtonIcon2, { tabIndex: disabled ? -1 : 0, onKeyDown: (e) => e.code === 'Space' && onClearClick?.(), "$transform": '2px', onClick: onClearClick, "$index": onCustumBtnClick ? 1 : 0, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Clear, children: _jsx(IconClear, {}) }) }), onCustumBtnClick && _jsx(StyledEditorButtonIcon2, { tabIndex: disabled ? -1 : 0, onKeyDown: (e) => e.code === 'Space' && onCustumBtnClick?.(), "$transform": '2px', onClick: onCustumBtnClick, "$index": 0, children: customBtn })] })] }) }));
|
|
52
|
+
};
|
|
53
|
+
const renderLabel = () => {
|
|
54
|
+
return (_jsx(StyledEditorLabel, { "$isFocused": false, "$labelPosition": labelPosition, "$disabled": disabled, "$fontSize": fontSize, children: _jsxs("div", { style: { flexDirection: "row", display: "flex", alignItems: "start", justifyContent: "start" }, children: [label, showInfo &&
|
|
55
|
+
_jsx(TMTooltip, { content: infoTemplate, children: _jsx(IconCircleInfo, { style: { marginLeft: '5px' }, color: TMColors.primary }) })] }) }));
|
|
56
|
+
};
|
|
57
|
+
const renderSummary = () => {
|
|
58
|
+
return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: icon && _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && renderLabel(), renderTemplateField(), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
|
|
59
|
+
};
|
|
60
|
+
return (_jsx("div", { style: elementStyle, children: renderSummary() }));
|
|
61
|
+
};
|
|
62
|
+
export default TMSummary;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ITMEditorBase } from '../base/TMEditorBase';
|
|
3
|
+
export type TMTextBoxButtonData = {
|
|
4
|
+
icon: any;
|
|
5
|
+
text?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type TextBoxType = 'text' | 'email' | 'password' | 'number';
|
|
9
|
+
interface ITMTextBox extends ITMEditorBase {
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
buttons?: TMTextBoxButtonData[];
|
|
12
|
+
formulaItems?: string[];
|
|
13
|
+
maxValue?: number;
|
|
14
|
+
type?: TextBoxType;
|
|
15
|
+
value?: string | number;
|
|
16
|
+
onValueChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
onBlur?: (value: string | undefined) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const TMTextBox: React.FunctionComponent<ITMTextBox>;
|
|
20
|
+
export default TMTextBox;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { StyledEditor, StyledEditorButtonIcon, StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
|
|
5
|
+
import { FontSize, TMColors } from '../../utils/theme';
|
|
6
|
+
import { IconHide, IconShow, useWindowWidth } from '../../helper';
|
|
7
|
+
import TMContextMenu, { useContextMenu } from '../base/TMContextMenu';
|
|
8
|
+
import ShowAlert from '../base/TMAlert';
|
|
9
|
+
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
10
|
+
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
11
|
+
import TMVilViewer from '../base/TMVilViewer';
|
|
12
|
+
import TMTooltip from '../base/TMTooltip';
|
|
13
|
+
const StyledShowPasswordIcon = styled.div `
|
|
14
|
+
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? TMColors.text_normal : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
15
|
+
position: absolute;
|
|
16
|
+
right: 10px;
|
|
17
|
+
font-size: 18px;
|
|
18
|
+
transform: translateY(-25px);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
`;
|
|
21
|
+
const TMTextBox = ({ autoFocus, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onValueChanged, onBlur }) => {
|
|
22
|
+
const [initialType, setInitialType] = useState(type);
|
|
23
|
+
const [currentType, setCurrentType] = useState(type);
|
|
24
|
+
const [currentValue, setCurrentValue] = useState(value);
|
|
25
|
+
const [formulaMenuItems, setFormulaMenuItems] = useState([]);
|
|
26
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
27
|
+
const { clicked, setClicked, points, setPoints } = useContextMenu();
|
|
28
|
+
const inputRef = useRef(null);
|
|
29
|
+
let screenWidth = useWindowWidth();
|
|
30
|
+
useEffect(() => { setCurrentType(type); setInitialType(type); }, [type]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setCurrentValue(value);
|
|
33
|
+
}, [value]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (initialType === 'password' && !value) {
|
|
36
|
+
setCurrentType('password');
|
|
37
|
+
}
|
|
38
|
+
}, [value]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (currentType === 'number' && maxValue) {
|
|
41
|
+
if (currentValue && parseInt(currentValue) > maxValue) {
|
|
42
|
+
setCurrentValue(maxValue.toString());
|
|
43
|
+
ShowAlert({ mode: 'warning', message: `Max value is ${maxValue}`, duration: 3000, title: 'Textbox Warning' });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}, [maxValue, currentValue, currentType]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (formulaItems && formulaItems.length > 0) {
|
|
49
|
+
let menuItems = [];
|
|
50
|
+
for (const formula of formulaItems) {
|
|
51
|
+
menuItems.push({ text: formula });
|
|
52
|
+
}
|
|
53
|
+
setFormulaMenuItems(menuItems);
|
|
54
|
+
}
|
|
55
|
+
}, [formulaItems]);
|
|
56
|
+
const showPasswordIcon = () => {
|
|
57
|
+
if (initialType === 'password' && currentType === 'password') {
|
|
58
|
+
return _jsx(IconShow, {});
|
|
59
|
+
}
|
|
60
|
+
else if (initialType === 'password' && currentType === 'text') {
|
|
61
|
+
return _jsx(IconHide, {});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return _jsx(_Fragment, {});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const toggleShowPassword = () => {
|
|
68
|
+
if (initialType === 'password' && currentType === 'password') {
|
|
69
|
+
setCurrentType('text');
|
|
70
|
+
}
|
|
71
|
+
else if (initialType === 'password' && currentType === 'text') {
|
|
72
|
+
setCurrentType('password');
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const insertText = (textToInsert) => {
|
|
76
|
+
if (inputRef?.current == null)
|
|
77
|
+
return;
|
|
78
|
+
try {
|
|
79
|
+
let cursorposition = inputRef.current?.selectionStart;
|
|
80
|
+
let textbeforecursorposition = inputRef.current?.value.substring(0, cursorposition);
|
|
81
|
+
let textaftercursorposition = inputRef.current?.value.substring(cursorposition, inputRef.current?.value.length);
|
|
82
|
+
let newValue = textbeforecursorposition + textToInsert + textaftercursorposition;
|
|
83
|
+
inputRef.current.value = newValue;
|
|
84
|
+
onValueChanged?.({ target: { value: newValue } });
|
|
85
|
+
inputRef.current.focus();
|
|
86
|
+
inputRef.current.selectionStart = inputRef.current.selectionEnd = cursorposition + textToInsert.length;
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
TMExceptionBoxManager.show({ exception: e });
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const renderInputField = () => {
|
|
93
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledEditor, { ref: inputRef, autoFocus: autoFocus, readOnly: readOnly, type: currentType, disabled: disabled, value: currentValue, width: width || '100%', placeholder: placeHolder, onFocus: () => setIsFocused(true), onBlur: (e) => { setIsFocused(false); if (currentValue != value)
|
|
94
|
+
onBlur?.(currentValue); }, onChange: (e) => { setCurrentValue(e.target.value); onValueChanged?.(e); }, onContextMenu: (e) => {
|
|
95
|
+
if (formulaItems.length <= 0)
|
|
96
|
+
return;
|
|
97
|
+
// prevent default right click behavior
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
// set our click state to true when a user right clicks
|
|
100
|
+
setClicked(true);
|
|
101
|
+
const bounds = e.currentTarget.getBoundingClientRect();
|
|
102
|
+
const x = e.clientX - bounds.left;
|
|
103
|
+
const y = e.clientY - bounds.top;
|
|
104
|
+
// set the x and y coordinates of our users right click
|
|
105
|
+
setPoints({ x, y });
|
|
106
|
+
}, "$isMobile": screenWidth < 640, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType }), initialType === 'password' && currentValue && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), initialType !== 'password' &&
|
|
107
|
+
buttons.map((buttonItem, index) => {
|
|
108
|
+
return (_jsx(StyledEditorButtonIcon, { onClick: buttonItem.onClick, "$index": index, "$transform": '-26px', children: _jsx(TMTooltip, { content: buttonItem.text, children: buttonItem.icon }) }, index));
|
|
109
|
+
}), formulaItems.length > 0 && clicked && (_jsx(TMContextMenu, { menuData: formulaMenuItems, top: points.y, left: points.x, onMenuItemClick: (formula) => insertText(formula) })), _jsx(TMVilViewer, { vil: validationItems })] }));
|
|
110
|
+
};
|
|
111
|
+
const renderedLeftLabelTextBox = () => {
|
|
112
|
+
return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && _jsx(StyledEditorLabel, { "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, "$fontSize": fontSize, children: label }), renderInputField()] }) })] }));
|
|
113
|
+
};
|
|
114
|
+
return (_jsx("div", { style: elementStyle, children: renderedLeftLabelTextBox() }));
|
|
115
|
+
};
|
|
116
|
+
export default TMTextBox;
|