mario-core 2.0.4 → 2.0.5-release
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/dist/Dashboard-BsDeySam.js +1 -0
- package/dist/Dashboard-C8i4BvyG.js +1 -0
- package/dist/Dashboard-CEJHkjrj.mjs +206 -0
- package/dist/Dashboard-CRRvwGed.js +1 -0
- package/dist/Dashboard-CZW-qGyN.mjs +206 -0
- package/dist/Dashboard-C_ztxjUK.mjs +206 -0
- package/dist/Dashboard-CaX-62QW.js +1 -0
- package/dist/Dashboard-DyvEA6z-.mjs +206 -0
- package/dist/Dashboard-HzY9FZ7Z.js +1 -0
- package/dist/Dashboard-ctVUb592.mjs +206 -0
- package/dist/EmailTemplateDetail-BQPspomy.mjs +417 -0
- package/dist/EmailTemplateDetail-BX_tfwoM.mjs +417 -0
- package/dist/EmailTemplateDetail-CITCgbC8.mjs +417 -0
- package/dist/EmailTemplateDetail-CNh5de_u.js +1 -0
- package/dist/EmailTemplateDetail-CdAQlzKa.mjs +417 -0
- package/dist/EmailTemplateDetail-CyTeZ6B4.js +1 -0
- package/dist/EmailTemplateDetail-D-jgcfDM.js +1 -0
- package/dist/EmailTemplateDetail-DcwJEPvb.js +1 -0
- package/dist/EmailTemplateDetail-dxSRgDcj.mjs +417 -0
- package/dist/EmailTemplateDetail-mdYeUDJg.js +1 -0
- package/dist/EmailTemplateList-9G-A6FZq.js +1 -0
- package/dist/EmailTemplateList-BBrwv30e.mjs +168 -0
- package/dist/EmailTemplateList-BUL8h6T2.mjs +168 -0
- package/dist/EmailTemplateList-BV-QOv5K.mjs +168 -0
- package/dist/EmailTemplateList-CuYu-78c.js +1 -0
- package/dist/EmailTemplateList-Cw69biiR.mjs +168 -0
- package/dist/EmailTemplateList-DATMwmRX.mjs +168 -0
- package/dist/EmailTemplateList-DPH9n1zg.js +1 -0
- package/dist/EmailTemplateList-Dgf0hucr.js +1 -0
- package/dist/EmailTemplateList-DqpO5NbB.js +1 -0
- package/dist/GalleryList-B2kxc3Uv.js +1 -0
- package/dist/GalleryList-BJ0QGyWF.mjs +329 -0
- package/dist/GalleryList-BM67p8qw.mjs +329 -0
- package/dist/GalleryList-BRIM0Ij_.mjs +329 -0
- package/dist/GalleryList-BU0as1ZP.mjs +329 -0
- package/dist/GalleryList-BYwvWx1S.js +1 -0
- package/dist/GalleryList-C2kwrrbY.js +1 -0
- package/dist/GalleryList-C46NhLPp.js +1 -0
- package/dist/GalleryList-D2_BCJq6.js +1 -0
- package/dist/GalleryList-JJbcEbTi.mjs +329 -0
- package/dist/Login-BPXlNvpX.mjs +1387 -0
- package/dist/Login-BWsVc8Np.mjs +1384 -0
- package/dist/Login-BYWZjmhv.mjs +1384 -0
- package/dist/Login-C1-QzAuV.mjs +1384 -0
- package/dist/Login-CGa7aER1.js +1 -0
- package/dist/Login-CUcmbeia.js +1 -0
- package/dist/Login-CXt0_tBl.mjs +1387 -0
- package/dist/Login-SxZya_gO.js +1 -0
- package/dist/Login-erVjidLp.js +1 -0
- package/dist/Login-fyvhErZA.js +1 -0
- package/dist/NotificationList-85ZNspu5.mjs +3878 -0
- package/dist/NotificationList-BDtxAveg.js +2 -0
- package/dist/NotificationList-BFTZrMUI.mjs +3878 -0
- package/dist/NotificationList-BmsuB956.js +2 -0
- package/dist/NotificationList-Bv_7KnH-.js +2 -0
- package/dist/NotificationList-D7Emce8u.mjs +3878 -0
- package/dist/NotificationList-DqqIOC4p.js +2 -0
- package/dist/NotificationList-RXsROL30.mjs +3878 -0
- package/dist/NotificationList-j6FB8Ea2.js +2 -0
- package/dist/NotificationList-qFV94D7S.mjs +3878 -0
- package/dist/SchoolList-CClJ_UPT.js +1 -0
- package/dist/SchoolList-JmrmL2zE.mjs +5 -0
- package/dist/SkillList-B8uw4QZF.mjs +386 -0
- package/dist/SkillList-BhVXby3M.mjs +386 -0
- package/dist/SkillList-CJyAJrM9.js +1 -0
- package/dist/SkillList-Cjt8Kney.mjs +386 -0
- package/dist/SkillList-Cs_lxx12.mjs +386 -0
- package/dist/SkillList-DF--jHTh.mjs +386 -0
- package/dist/SkillList-D_tQAQqL.js +1 -0
- package/dist/SkillList-DqlhMpSA.js +1 -0
- package/dist/SkillList-RwckcULz.js +1 -0
- package/dist/SkillList-WqwHRR6L.js +1 -0
- package/dist/TeacherSelector-BKSay316.mjs +30 -0
- package/dist/TeacherSelector-C52rXj2q.mjs +30 -0
- package/dist/TeacherSelector-CAo3E6h-.mjs +30 -0
- package/dist/TeacherSelector-CKdM3Z8y.js +1 -0
- package/dist/TeacherSelector-CeCJEF4W.js +1 -0
- package/dist/TeacherSelector-DXG3itVQ.js +1 -0
- package/dist/TeacherSelector-DXv_vBJI.js +1 -0
- package/dist/TeacherSelector-DgfugjyF.js +1 -0
- package/dist/TeacherSelector-DpcBvLY-.mjs +30 -0
- package/dist/TeacherSelector-Xd8QnKWa.mjs +30 -0
- package/dist/TheContent-BQNAOyQ1.js +1 -0
- package/dist/TheContent-BcPcCqnd.mjs +28 -0
- package/dist/TheContent-C7s0FxEV.js +1 -0
- package/dist/TheContent-CDVWxnOm.js +1 -0
- package/dist/TheContent-CtCoUbS9.js +1 -0
- package/dist/TheContent-CyIFLtrd.mjs +28 -0
- package/dist/TheContent-DlLYa4WT.js +1 -0
- package/dist/TheContent-kfDEaXOp.mjs +28 -0
- package/dist/TheContent-mTUR10lr.mjs +28 -0
- package/dist/TheContent-q6q9KswZ.mjs +28 -0
- package/dist/UserContainer-B5OwFSHh.js +5 -0
- package/dist/UserContainer-BD0grJiW.js +5 -0
- package/dist/UserContainer-BxDgQxlT.mjs +2771 -0
- package/dist/UserContainer-CCerxkEw.mjs +2771 -0
- package/dist/UserContainer-CilrSMeD.mjs +2771 -0
- package/dist/UserContainer-CsxfRZ2W.js +5 -0
- package/dist/UserContainer-DQoP15se.mjs +2771 -0
- package/dist/UserContainer-DbdoSq-Q.js +5 -0
- package/dist/UserContainer-DuoEITq2.js +5 -0
- package/dist/UserContainer-hWvp6IhQ.mjs +2771 -0
- package/dist/UserDetail-Brs13Wua.js +1 -0
- package/dist/UserDetail-CJtccXfo.mjs +902 -0
- package/dist/UserDetail-C_pmgUnE.js +1 -0
- package/dist/UserDetail-CpPTUVCj.js +1 -0
- package/dist/UserDetail-Dp4Oq_j9.mjs +902 -0
- package/dist/UserDetail-DxGAQjfn.js +1 -0
- package/dist/UserDetail-GaRReB9G.mjs +902 -0
- package/dist/UserDetail-MHs6uPbO.mjs +902 -0
- package/dist/UserDetail-XHKLiGNl.mjs +902 -0
- package/dist/UserDetail-qXX-264Q.js +1 -0
- package/dist/UserList-7gE8aU_I.js +5 -0
- package/dist/UserList-B7sk8bc6.mjs +1162 -0
- package/dist/UserList-B_kL52Yt.js +5 -0
- package/dist/UserList-CNMbjvWP.mjs +1162 -0
- package/dist/UserList-CRwZa5DB.js +5 -0
- package/dist/UserList-CftAVe0u.mjs +1162 -0
- package/dist/UserList-CkOGJbgn.mjs +1162 -0
- package/dist/UserList-CrnzZCR6.mjs +1162 -0
- package/dist/UserList-D4V-QZm0.js +5 -0
- package/dist/UserList-DGX1gVn-.js +5 -0
- package/dist/assets/Images.d.ts +14 -14
- package/dist/components/Alerts/CommonAlert.d.ts +3 -3
- package/dist/components/Alerts/EmptyDataAlert.d.ts +8 -8
- package/dist/components/Alerts/ErrorHandler.d.ts +6 -6
- package/dist/components/Alerts/SandboxAlert.d.ts +3 -0
- package/dist/components/Buttons/AddButton.d.ts +7 -7
- package/dist/components/Buttons/AddButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/CloseButton.d.ts +8 -8
- package/dist/components/Buttons/DeleteButtonIcon.d.ts +7 -6
- package/dist/components/Buttons/DetailActionButtons.d.ts +8 -8
- package/dist/components/Buttons/EditButtonIcon.d.ts +7 -6
- package/dist/components/Buttons/LinkEditButton.d.ts +7 -7
- package/dist/components/Buttons/LoginNavButton.d.ts +8 -8
- package/dist/components/Buttons/SyncButton.d.ts +8 -0
- package/dist/components/Buttons/ToggleButton.d.ts +10 -10
- package/dist/components/Buttons/UploadFileButton.d.ts +13 -13
- package/dist/components/Headers/CommonHeader.d.ts +7 -7
- package/dist/components/Image/UploadImage.d.ts +2 -3
- package/dist/components/Inputs/FileInput.d.ts +8 -8
- package/dist/components/Inputs/PasswordInput.d.ts +9 -8
- package/dist/components/Inputs/SearchBox.d.ts +10 -10
- package/dist/components/Inputs/SearchBoxContainer.d.ts +9 -10
- package/dist/components/Labels/RequiredLabel.d.ts +6 -6
- package/dist/components/Loading/Loading.d.ts +3 -3
- package/dist/components/Modals/CommonModal.d.ts +2 -3
- package/dist/components/Modals/NotificationLogoutModal.d.ts +2 -0
- package/dist/components/Modals/NotificationModal.d.ts +2 -3
- package/dist/components/Others/QuitPrompt.d.ts +5 -2
- package/dist/components/Pagination/CustomPagination.d.ts +2 -3
- package/dist/components/Scroll/ScrollToTop.d.ts +3 -0
- package/dist/components/Selectors/AcademicClassSelector.d.ts +2 -3
- package/dist/components/Selectors/CategorySelector.d.ts +2 -0
- package/dist/components/Selectors/CreatableSelector.d.ts +2 -3
- package/dist/components/Selectors/CustomSelector.d.ts +2 -3
- package/dist/components/Selectors/MailCategorySelectors.d.ts +2 -3
- package/dist/components/Selectors/QuestionCategorySelector.d.ts +2 -3
- package/dist/components/Selectors/QuestionTypeSelector.d.ts +2 -3
- package/dist/components/Selectors/StarRatingSelector.d.ts +2 -3
- package/dist/components/Selectors/SuggestionCategorySelector.d.ts +2 -3
- package/dist/components/Selectors/constants/constant.d.ts +10 -0
- package/dist/components/Selectors/hooks/useCategorySelector.d.ts +5 -0
- package/dist/components/Tabs/CustomTab.d.ts +2 -3
- package/dist/components/Tabs/TabsWithComponent.d.ts +10 -0
- package/dist/configs/editorConfig.d.ts +7 -7
- package/dist/constants-BDS_Ev5l.mjs +320 -0
- package/dist/constants-C4pJSK8g.mjs +320 -0
- package/dist/constants-CGewtxeZ.mjs +320 -0
- package/dist/constants-CNvNsffe.js +1 -0
- package/dist/constants-Clwj65ie.mjs +320 -0
- package/dist/constants-Dbpki_CG.js +1 -0
- package/dist/constants-Dk81SvKq.js +1 -0
- package/dist/constants-Dp8QZ8kV.js +1 -0
- package/dist/constants-ra-9n6_H.mjs +320 -0
- package/dist/constants-t9grLzgU.js +1 -0
- package/dist/containers/Commons/NotFound.d.ts +3 -3
- package/dist/containers/DistrictSchools/views/SchoolList.d.ts +3 -3
- package/dist/containers/EmailTemplate/components/AttachmentFile.d.ts +7 -7
- package/dist/containers/EmailTemplate/components/MailParam.d.ts +7 -7
- package/dist/containers/EmailTemplate/configs/emailTemplateSchema.d.ts +13 -13
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +28 -28
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateList.d.ts +11 -12
- package/dist/containers/EmailTemplate/views/EmailTemplateDetail.d.ts +3 -3
- package/dist/containers/EmailTemplate/views/EmailTemplateList.d.ts +3 -3
- package/dist/containers/Gallery/components/ActionModal.d.ts +2 -3
- package/dist/containers/Gallery/components/Filter.d.ts +8 -8
- package/dist/containers/Gallery/components/Media.d.ts +7 -8
- package/dist/containers/Gallery/components/MediaDetail.d.ts +6 -7
- package/dist/containers/Gallery/components/MediaList.d.ts +7 -7
- package/dist/containers/Gallery/components/MediaNav.d.ts +17 -18
- package/dist/containers/Gallery/constants/gallery.types.d.ts +21 -20
- package/dist/containers/Gallery/extensions/helpers.d.ts +4 -4
- package/dist/containers/Gallery/hooks/useGalleryList.d.ts +30 -31
- package/dist/containers/Gallery/views/GalleryList.d.ts +6 -6
- package/dist/containers/Login/constant/authConfig.d.ts +38 -0
- package/dist/containers/Login/constant/types.d.ts +34 -0
- package/dist/containers/Login/hooks/useCreatePassword.d.ts +12 -0
- package/dist/containers/Login/hooks/useForgotPassword.d.ts +22 -21
- package/dist/containers/Login/hooks/useLogin.d.ts +29 -16
- package/dist/containers/Login/hooks/useLoginTwoFactor.d.ts +4 -4
- package/dist/containers/Login/views/Dashboard.d.ts +3 -3
- package/dist/containers/Login/views/Login.d.ts +9 -9
- package/dist/containers/Login/views/block/BlockBackground.d.ts +7 -0
- package/dist/containers/Login/views/block/BlockCreatePassword.d.ts +2 -0
- package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +6 -3
- package/dist/containers/Login/views/block/BlockLogin.d.ts +21 -7
- package/dist/containers/Login/views/block/BlockResetPassword.d.ts +2 -3
- package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +10 -0
- package/dist/containers/Login/views/block/BlockTwoFactorLogin.d.ts +2 -3
- package/dist/containers/Login/views/block/CloseBlock.d.ts +6 -6
- package/dist/containers/Login/views/block/ContentHomePage.d.ts +5 -5
- package/dist/containers/Login/views/block/IconContent.d.ts +7 -7
- package/dist/containers/Login/views/block/QuoteContent.d.ts +2 -7
- package/dist/containers/Notifications/components/NotificationButton.d.ts +5 -5
- package/dist/containers/Notifications/components/NotificationStatusSelector.d.ts +6 -7
- package/dist/containers/Notifications/hooks/useNotificationList.d.ts +17 -14
- package/dist/containers/Notifications/hooks/useUnreadNotification.d.ts +4 -4
- package/dist/containers/Notifications/views/NotificationList.d.ts +2 -3
- package/dist/containers/Skill/components/SkillDetailModal.d.ts +2 -3
- package/dist/containers/Skill/components/SkillSelector.d.ts +2 -3
- package/dist/containers/Skill/hooks/useSkillDetail.d.ts +19 -20
- package/dist/containers/Skill/hooks/useSkillList.d.ts +9 -10
- package/dist/containers/Skill/views/SkillList.d.ts +3 -3
- package/dist/containers/User/components/AssignStudentModal.d.ts +20 -0
- package/dist/containers/User/components/DeleteBulkModel copy.d.ts +4 -0
- package/dist/containers/User/components/DeleteBulkModel.d.ts +3 -0
- package/dist/containers/User/components/FilterPopover.d.ts +21 -0
- package/dist/containers/User/components/HeaderCell.d.ts +19 -0
- package/dist/containers/User/components/RemoveAssistant.d.ts +3 -0
- package/dist/containers/User/components/RemoveCounselor.d.ts +3 -0
- package/dist/containers/User/components/RemoveSupportTeacher.d.ts +3 -0
- package/dist/containers/User/components/RemoveTeacher.d.ts +3 -0
- package/dist/containers/User/components/SwitchDataTeacherModel.d.ts +12 -0
- package/dist/containers/User/components/SwitchTeacherModal.d.ts +2 -0
- package/dist/containers/User/components/TableHeader.d.ts +15 -0
- package/dist/containers/User/components/TeacherSelector.d.ts +2 -0
- package/dist/containers/User/components/UploadCSVButton.d.ts +11 -0
- package/dist/containers/User/components/UserDeletedModal.d.ts +2 -0
- package/dist/containers/User/configs/changePasswordSchema.d.ts +11 -0
- package/dist/containers/User/configs/userSchema.d.ts +13 -15
- package/dist/containers/User/configs/utils.d.ts +8 -0
- package/dist/containers/User/constants/constants.d.ts +63 -0
- package/dist/containers/User/constants/types.d.ts +265 -0
- package/dist/containers/User/hooks/useAssignStudent.d.ts +44 -0
- package/dist/containers/User/hooks/useAssignStudentList.d.ts +36 -0
- package/dist/containers/User/hooks/useAssistantList.d.ts +9 -0
- package/dist/containers/User/hooks/useCSVImport.d.ts +37 -0
- package/dist/containers/User/hooks/useCSVImportTab.d.ts +45 -0
- package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
- package/dist/containers/User/hooks/useCounselorList.d.ts +9 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +5 -0
- package/dist/containers/User/hooks/useFilterPopover.d.ts +37 -0
- package/dist/containers/User/hooks/useResendMail.d.ts +5 -0
- package/dist/containers/User/hooks/useRosterUserSelector.d.ts +8 -0
- package/dist/containers/User/hooks/useSecondaryTeacherList.d.ts +9 -0
- package/dist/containers/User/hooks/useTableHeader.d.ts +20 -0
- package/dist/containers/User/hooks/useTeacherList.d.ts +9 -0
- package/dist/containers/User/hooks/useUserDeletedList.d.ts +21 -0
- package/dist/containers/User/hooks/useUserDeletedModal.d.ts +13 -0
- package/dist/containers/User/hooks/useUserDetail.d.ts +41 -22
- package/dist/containers/User/hooks/useUserList.d.ts +18 -11
- package/dist/containers/User/hooks/userFilters.d.ts +7 -0
- package/dist/containers/User/views/AssignStudentList.d.ts +2 -0
- package/dist/containers/User/views/CSVImport.d.ts +3 -0
- package/dist/containers/User/views/RosterUserSelector.d.ts +8 -0
- package/dist/containers/User/views/UserContainer.d.ts +2 -0
- package/dist/containers/User/views/UserDeletedList.d.ts +2 -0
- package/dist/containers/User/views/UserDetail.d.ts +2 -3
- package/dist/containers/User/views/UserList.d.ts +2 -3
- package/dist/hooks/useFilters.d.ts +7 -0
- package/dist/hooks/useLanguages.d.ts +9 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index-B4U_4-fu.js +15 -0
- package/dist/index-BTZpY1uf.mjs +17606 -0
- package/dist/index-BlgOYHBz.js +15 -0
- package/dist/index-CFvswiRi.mjs +17591 -0
- package/dist/index-Cmo6_CCl.js +15 -0
- package/dist/index-D-Z2VEoE.js +15 -0
- package/dist/index-DSGOm1zi.js +15 -0
- package/dist/index-DvGA0ecI.mjs +17608 -0
- package/dist/index-S9mI_rxc.mjs +17608 -0
- package/dist/index-mofrQOyf.mjs +17608 -0
- package/dist/index.css +1037 -287
- package/dist/index.d.ts +114 -101
- package/dist/index.esm-B5Zde_ik.js +1 -0
- package/dist/index.esm-B63qcj54.js +1 -0
- package/dist/index.esm-BtSbIjvM.mjs +19 -0
- package/dist/index.esm-CWv2HCrn.mjs +19 -0
- package/dist/index.esm-CryF_PoG.js +1 -0
- package/dist/index.esm-D1KTN__I.js +1 -0
- package/dist/index.esm-D6Zacg53.mjs +19 -0
- package/dist/index.esm-DMTAvOCa.js +1 -0
- package/dist/index.esm-fD-khqqa.mjs +19 -0
- package/dist/index.esm-l7AIvAYG.mjs +19 -0
- package/dist/index.js +24 -7496
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +28544 -6959
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/TheContent.d.ts +2 -3
- package/dist/mailCategoryService-B19vYJRa.js +1 -0
- package/dist/mailCategoryService-Bb3FPk-a.mjs +11 -0
- package/dist/mailCategoryService-Bdq58J2L.js +1 -0
- package/dist/mailCategoryService-By7wn1rV.mjs +11 -0
- package/dist/mailCategoryService-CEgGm2FV.js +1 -0
- package/dist/mailCategoryService-C_ZJZs-z.js +1 -0
- package/dist/mailCategoryService-Dis1n9kR.mjs +11 -0
- package/dist/mailCategoryService-M_l9miAs.mjs +11 -0
- package/dist/mailCategoryService-T_3sXv5B.mjs +11 -0
- package/dist/mailCategoryService-_WxeTzNN.js +1 -0
- package/dist/mario-core.css +1 -0
- package/dist/redux/assessments/action.d.ts +1 -1
- package/dist/redux/assessments/reducer.d.ts +10 -5
- package/dist/redux/assignment/action.d.ts +1 -1
- package/dist/redux/assignment/reducer.d.ts +4 -2
- package/dist/redux/assistants/action.d.ts +1 -1
- package/dist/redux/assistants/reducer.d.ts +4 -2
- package/dist/redux/badges/action.d.ts +1 -1
- package/dist/redux/badges/reducer.d.ts +4 -2
- package/dist/redux/bandScores/action.d.ts +1 -1
- package/dist/redux/bandScores/reducer.d.ts +4 -2
- package/dist/redux/certificate/action.d.ts +1 -1
- package/dist/redux/certificate/reducer.d.ts +4 -2
- package/dist/redux/classes/action.d.ts +1 -1
- package/dist/redux/classes/reducer.d.ts +4 -2
- package/dist/redux/commons/action.d.ts +23 -8
- package/dist/redux/commons/reducer.d.ts +4 -2
- package/dist/redux/conferenceRubrics/action.d.ts +1 -1
- package/dist/redux/conferenceRubrics/reducer.d.ts +4 -2
- package/dist/redux/customAlert/action.d.ts +1 -1
- package/dist/redux/customAlert/reducer.d.ts +4 -2
- package/dist/redux/dashboard/action.d.ts +5 -4
- package/dist/redux/dashboard/reducer.d.ts +4 -2
- package/dist/redux/dataPlayer/action.d.ts +2 -2
- package/dist/redux/dataPlayer/reducer.d.ts +4 -2
- package/dist/redux/emailTemplates/action.d.ts +1 -1
- package/dist/redux/emailTemplates/reducer.d.ts +4 -2
- package/dist/redux/faqs/action.d.ts +1 -1
- package/dist/redux/faqs/reducer.d.ts +4 -2
- package/dist/redux/feedback/action.d.ts +1 -1
- package/dist/redux/feedback/reducer.d.ts +4 -2
- package/dist/redux/gallery/action.d.ts +2 -2
- package/dist/redux/gallery/reducer.d.ts +4 -2
- package/dist/redux/goalExamples/action.d.ts +1 -1
- package/dist/redux/goalExamples/reducer.d.ts +4 -2
- package/dist/redux/improveMyClass/action.d.ts +1 -1
- package/dist/redux/improveMyClass/reducer.d.ts +4 -2
- package/dist/redux/learningStrategies/action.d.ts +1 -1
- package/dist/redux/learningStrategies/reducer.d.ts +4 -2
- package/dist/redux/learningSupportCategories/action.d.ts +1 -1
- package/dist/redux/learningSupportCategories/reducer.d.ts +4 -2
- package/dist/redux/mailCategories/action.d.ts +1 -1
- package/dist/redux/mailCategories/reducer.d.ts +4 -2
- package/dist/redux/navMobile/action.d.ts +1 -0
- package/dist/redux/navMobile/reducer.d.ts +4 -0
- package/dist/redux/notifications/action.d.ts +3 -3
- package/dist/redux/notifications/reducer.d.ts +4 -2
- package/dist/redux/questionBanks/action.d.ts +1 -1
- package/dist/redux/questionBanks/reducer.d.ts +4 -2
- package/dist/redux/questionByCategory/action.d.ts +8 -8
- package/dist/redux/questionByCategory/reducer.d.ts +4 -2
- package/dist/redux/questionCategory/action.d.ts +1 -1
- package/dist/redux/questionCategory/reducer.d.ts +4 -2
- package/dist/redux/reflectionForms/action.d.ts +1 -1
- package/dist/redux/reflectionForms/reducer.d.ts +4 -2
- package/dist/redux/reflectionResults/action.d.ts +1 -1
- package/dist/redux/reflectionResults/reducer.d.ts +4 -2
- package/dist/redux/schoolBlankDays/action.d.ts +1 -1
- package/dist/redux/schoolBlankDays/reducer.d.ts +4 -2
- package/dist/redux/semester/action.d.ts +1 -1
- package/dist/redux/semester/reducer.d.ts +4 -2
- package/dist/redux/sessionPlayers/action.d.ts +5 -4
- package/dist/redux/sessionPlayers/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplateGeneralClasses/action.d.ts +1 -1
- package/dist/redux/sessionTemplateGeneralClasses/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplates/action.d.ts +1 -1
- package/dist/redux/sessionTemplates/reducer.d.ts +4 -2
- package/dist/redux/skills/action.d.ts +1 -1
- package/dist/redux/skills/reducer.d.ts +4 -2
- package/dist/redux/subjects/action.d.ts +1 -1
- package/dist/redux/subjects/reducer.d.ts +4 -2
- package/dist/redux/suggestionBanks/action.d.ts +1 -1
- package/dist/redux/suggestionBanks/reducer.d.ts +4 -2
- package/dist/redux/teacher/myStudent/action.d.ts +1 -1
- package/dist/redux/teacher/myStudent/reducer.d.ts +4 -2
- package/dist/redux/tutorialScreen/action.d.ts +1 -1
- package/dist/redux/tutorialScreen/reducer.d.ts +10 -5
- package/dist/redux/users/action.d.ts +2 -2
- package/dist/redux/users/reducer.d.ts +4 -2
- package/dist/redux/weeklyQuests/action.d.ts +2 -0
- package/dist/redux/weeklyQuests/reducer.d.ts +12 -0
- package/dist/redux/widget/action.d.ts +1 -1
- package/dist/redux/widget/reducer.d.ts +4 -2
- package/dist/rootReducer.d.ts +106 -48
- package/dist/services/accountService.d.ts +22 -8
- package/dist/services/api.d.ts +3 -3
- package/dist/services/classService.d.ts +1 -1
- package/dist/services/csvImportService.d.ts +9 -0
- package/dist/services/csvService.d.ts +8 -0
- package/dist/services/emailTemplateService.d.ts +7 -6
- package/dist/services/fileServices.d.ts +13 -13
- package/dist/services/galleryService.d.ts +2 -2
- package/dist/services/mailCategoryService.d.ts +1 -1
- package/dist/services/notificationService.d.ts +7 -6
- package/dist/services/questionCategoryService.d.ts +3 -1
- package/dist/services/schoolService.d.ts +2 -0
- package/dist/services/skillService.d.ts +6 -6
- package/dist/services/suggestionCategoryService.d.ts +1 -1
- package/dist/services/userService.d.ts +37 -7
- package/dist/store.d.ts +3 -3
- package/dist/types/Conversation.d.ts +8 -8
- package/dist/types/ConversationMember.d.ts +5 -5
- package/dist/types/Dashboard.d.ts +5 -5
- package/dist/types/Filter.d.ts +16 -10
- package/dist/types/Language.d.ts +8 -0
- package/dist/types/Message.d.ts +13 -13
- package/dist/types/Notification.d.ts +8 -8
- package/dist/types/Payload.d.ts +17 -0
- package/dist/types/user.d.ts +3 -0
- package/dist/types-BvnbDeJF.mjs +5 -0
- package/dist/types-CTFcZUFS.js +1 -0
- package/dist/utils/canAccessRoute.d.ts +2 -2
- package/dist/utils/constants.d.ts +87 -58
- package/dist/utils/debounce.d.ts +2 -2
- package/dist/utils/domHelpers.d.ts +2 -2
- package/dist/utils/encodeParams.d.ts +2 -2
- package/dist/utils/firstCheckToken.d.ts +2 -2
- package/dist/utils/generateRandomString.d.ts +2 -2
- package/dist/utils/getAccessToken.d.ts +2 -2
- package/dist/utils/getCookieValue.d.ts +2 -0
- package/dist/utils/getFileUrl.d.ts +2 -2
- package/dist/utils/getStaticFileUrl.d.ts +2 -0
- package/dist/utils/getTextFromHTML.d.ts +2 -2
- package/dist/utils/utcToLocalTime.d.ts +1 -2
- package/package.json +79 -63
- package/dist/components/Alerts/ReactNotification.d.ts +0 -4
- package/dist/containers/Faq/components/FaqDetailModal.d.ts +0 -3
- package/dist/containers/Faq/hooks/useFaqDetail.d.ts +0 -18
- package/dist/containers/Faq/hooks/useFaqList.d.ts +0 -10
- package/dist/containers/Faq/views/FaqList.d.ts +0 -3
- package/dist/layouts/TheFooter.d.ts +0 -3
- package/dist/layouts/TheHeader.d.ts +0 -3
- package/dist/layouts/TheHeaderDropdown.d.ts +0 -3
- package/dist/layouts/TheLayout.d.ts +0 -3
- package/dist/layouts/TheSidebar.d.ts +0 -3
- package/dist/services/faqService.d.ts +0 -6
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),A=require("reactstrap"),j=require("./constants-Dp8QZ8kV.js"),J=require("react-i18next"),i=require("react"),M=require("react-redux"),ce=require("react-router-dom"),s=require("./index-BlgOYHBz.js"),ue=require("./types-CTFcZUFS.js"),G=require("./index.esm-B5Zde_ik.js"),Z=require("date-fns"),ee=require("papaparse");function me(e,a){j.requiredArgs(2,arguments);var l=j.toDate(e),m=j.toDate(a);return l.getFullYear()-m.getFullYear()}const he=()=>{const[e,a]=i.useState(j.DEFAULT_FILTER);return{filters:e,setFilters:a,changeFilters:m=>{const r={...e,...m};r.searchString&&m.searchString&&m.searchString!=e.searchString&&(r.currentPage=1),a(r)}}},pe="/admin/user",ge="/admin/create-user",ye="User list",se="/home",fe="/home",Se="/admin/home",xe="/parent",ve="/admin/schools",Ce="/list-student",Ne=()=>{const e=ce.useNavigate(),l=new URLSearchParams(location.search).get("query"),m=M.useSelector(n=>n.users.userList),r=M.useSelector(n=>n.users.totalItems),{filters:c,changeFilters:S}=he(),C=l||"",[o,N]=i.useState([]),B=window.location.host.includes("-district"),d=M.useDispatch(),{t:p}=J.useTranslation(),L=n=>{const y=o.find(b=>b==n);N(y?o.filter(b=>b!=n):o.concat([n]))},I=i.useCallback(async()=>{if(o.length!=0){N([]);return}if(c.searchBy!==void 0&&c.searchByStrings!==void 0&&c.searchByStrings.length===0){d(s.setUserList({userList:[],totalItems:0}));return}d(s.setLoading(!0));try{const n=await j.getRosterAllUserId(c);N(n.data||[])}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},[d,c,o]),_=i.useCallback(async()=>{if(c.searchBy!==void 0&&c.searchByStrings!==void 0&&c.searchByStrings.length===0){d(s.setUserList({userList:[],totalItems:0}));return}d(s.setLoading(!0));try{const n=await j.getRosterUser(c),{items:y,totalItems:b}=n.data;for(const U of y)U.roles=U.roles.map(f=>f!=s.ROLES.EDUTEACHER?f:"EduTeacher");d(s.setUserList({userList:y,totalItems:b}))}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},[d,c]),E=async()=>{d(s.setLoading(!0));try{const n=await j.syncRosterUsersApi();n.data?(d(s.setAlert({type:"success",message:`${n.data} user${n.data>1?"s have":" has"} been synchronized`})),_()):d(s.setAlert({type:"success",message:"Users synchronized"}))}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},u=n=>{if(!n)return"";const y=[],{sourcedId:b,rosterUser:U}=n;if(b&&U&&y.push(b),U){const{givenName:f,middleName:v,familyName:h,email:T}=U,w=[];h&&w.push(h),v&&w.push(v),f&&w.push(f),y.push(w.join(" ")||""),y.push(T||"")}return y.join(" / ")};i.useEffect(()=>{document.title=ye},[]),i.useEffect(()=>{S({...c,searchString:C})},[C]),i.useEffect(()=>{_()},[JSON.stringify(c)]);const x=i.useCallback(n=>{d(s.setModal({isOpen:!0,type:"warning",message:p("do_you_want_to_remove_this_user"),onConfirm:async()=>{d(s.setLoading(!0));try{await j.remove(n),d(s.setAlert({type:"success",message:"Remove user successfully"})),c.currentPage!==1?S({currentPage:1}):_()}catch(y){d(s.setAlert({type:"danger",message:y.response?.data?.title||y.message}))}d(s.setLoading(!1))}}))},[JSON.stringify(c)]),R=n=>{const y=sessionStorage.getItem(s.IS_USER_SESSION_BROWSER),{token:b,id:U,firstName:f,lastName:v,roles:h,email:T,profileImageFileName:w}=n.data;y?sessionStorage.setItem(s.ACCESS_TOKEN,b):localStorage.setItem(s.ACCESS_TOKEN,b),h.includes("Admin")&&localStorage.setItem("ROLES","Admin"),localStorage.removeItem(s.NOTIFICATION_ALERT_KEY),d(s.setUser({id:U,firstName:f,lastName:v,roles:h,email:T,profileImageFileName:w})),B?e(ve):h.includes("Admin")?e(Se):h.includes("Teacher")||h.includes("Assistant")?e(se):h.includes("Student")?e(fe):h.includes("Parent")?e(xe):h.includes("EduTeacher")?e(Ce):(h.includes("Counselor")||h.includes("SecondaryTeacher"))&&e(se)},g=i.useCallback(async n=>{try{const b=(await j.switchAccountUser(n)).data;d(s.setModal({isOpen:!0,type:"warning",message:p("do_you_want_to_impersonate_this_user"),onConfirm:async()=>{d(s.setLoading(!0));try{const U={email:b.email,password:"default",accessToken:b.token,loginType:ue.LoginType.Impersonate},f=await s.logIn(U);localStorage.clear(),R(f)}catch(U){s.setAlert({type:"danger",message:U.response?.data?.title||U.message})}d(s.setLoading(!1))}}))}catch(y){d(s.setAlert({type:"danger",message:y.response?.data?.title||y.message}))}},[c]);return{userList:m,totalItems:r,filters:c,queryName:l,fullName:C,getData:_,removeData:x,changeFilters:S,reDirectDetailPage:n=>{const y=n?`${pe}/${n}`:ge;e(y)},switchUser:g,handleSyncRosterUsers:E,rosterUserInfo:u,userIds:o,onSelectAllUser:I,onSelectUser:L}},be={fontWeight:500},Ae={height:38,background:"#316cd9"},je=({text:e,onClick:a,className:l=""})=>t.jsxs(A.Button,{onClick:a,color:"primary",style:Ae,className:`d-flex align-items-center ${l} gap-2`,children:[t.jsx(s.FaSyncAlt,{}),t.jsx("span",{style:be,children:e})]});function _e(e){return s.GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 3H5a1 1 0 0 0-1 1v2.59c0 .523.213 1.037.583 1.407L10 13.414V21a1.001 1.001 0 0 0 1.447.895l4-2c.339-.17.553-.516.553-.895v-5.586l5.417-5.417c.37-.37.583-.884.583-1.407V4a1 1 0 0 0-1-1zm-6.707 9.293A.996.996 0 0 0 14 13v5.382l-2 1V13a.996.996 0 0 0-.293-.707L6 6.59V5h14.001l.002 1.583-5.71 5.71z"}}]})(e)}function Ee(e){return s.GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.023 16.977a35.13 35.13 0 0 1-1.367-1.384c-.372-.378-.596-.653-.596-.653l-2.8-1.337A6.962 6.962 0 0 0 16 9c0-3.859-3.14-7-7-7S2 5.141 2 9s3.14 7 7 7c1.763 0 3.37-.66 4.603-1.739l1.337 2.8s.275.224.653.596c.387.363.896.854 1.384 1.367l1.358 1.392.604.646 2.121-2.121-.646-.604c-.379-.372-.885-.866-1.391-1.36zM9 14c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z"}}]})(e)}function Ie(e){return s.GenIcon({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",clipRule:"evenodd"}}]})(e)}const Ue=(e,a)=>{i.useEffect(()=>{function l(m){e.current&&!e.current.contains(m.target)&&a?.()}return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e.current])},Le=e=>{const{isOpen:a,sortBy:l,filters:m,users:r,searchBy:c,defaultOptions:S,selectedOptions:C,searchKey:o,onChangeSearchKey:N,onOptionsChange:B,onSearch:d,onClose:p,onChangeFilters:L,getOption:I}=e,[_,E]=i.useState(),[u,x]=i.useState([]),R=i.useRef(null),g=i.useRef(null);Ue(R,p);const{t:O}=J.useTranslation(),n=i.useCallback(()=>{if(!a)return;const D=o?.trim?.()??"";c!=null&&!S&&d?.(D,c),c!=null&&S&&x(S.filter($=>$.label.toLowerCase().includes(D.toLowerCase())))},[c,o,JSON.stringify(S),a]),y=()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(n,500)},b=D=>{const $=D.target.value;N($)},U=i.useCallback(()=>{B?.(_,c),p?.()},[JSON.stringify(_)]),f=i.useCallback(D=>{const $=D.target.value??"";let F=_??[],q=F.indexOf($);q>-1?F.splice(q,1):F=[...F,$],E(F==null?F:[...F])},[JSON.stringify(_)]),v=i.useCallback(D=>{const $=D.target.checked;E($?void 0:[])},[]),h=i.useCallback(()=>{L?.({...m,sortBy:l,isDescending:!0}),p?.()},[JSON.stringify(m),c]),T=i.useCallback(()=>{L?.({...m,sortBy:l,isDescending:!1}),p?.()},[JSON.stringify(m),c]),w=i.useMemo(()=>I?r.map(D=>I(D,O)):[],[JSON.stringify(r),JSON.stringify(I)]),W=m?.isDescending==!1&&m.sortBy===l,P=!!m?.isDescending&&m.sortBy===l;return i.useEffect(()=>{m?.searchBy!==c?E(void 0):E(C)},[JSON.stringify(C),m?.searchBy]),i.useEffect(()=>{x(S||[])},[JSON.stringify(S)]),i.useEffect(()=>{y()},[o,a]),{ref:R,options:w,inputRef:g,sOptions:_,isAscending:W,isDescending:P,filteredOptions:u,searchKey:o,handleSearch:n,handleApplyFilter:U,handleOptionSelected:f,handleOptionSelectedAll:v,handleSortDesc:h,handleSortAsc:T,handleChangeSearchKey:b}},Oe=e=>{const{defaultOptions:a,onClose:l,getOption:m}=e,{ref:r,inputRef:c,options:S,sOptions:C,isAscending:o,isDescending:N,filteredOptions:B,searchKey:d,handleChangeSearchKey:p,handleApplyFilter:L,handleOptionSelected:I,handleOptionSelectedAll:_,handleSortDesc:E,handleSortAsc:u}=Le(e);return t.jsx(A.Popover,{...e,hideArrow:!0,className:s.styles["popover-zindex"],children:t.jsx(A.PopoverBody,{className:"pb-3",children:t.jsxs("div",{ref:r,className:s.styles.popover,children:[t.jsxs("div",{className:`d-flex flex-column ${s.styles.popover__sort}`,children:[t.jsx(A.Label,{className:"font-weight-bold",children:"Sort"}),t.jsxs("div",{className:`px-1 ${s.styles.popover__sort__item} ${o&&s.styles["popover__sort__item--active"]}`,onClick:u,children:[t.jsx(G.AiOutlineSortAscending,{className:"mr-1"}),"Ascending"]}),t.jsxs("div",{className:`px-1 mt-1 ${s.styles.popover__sort__item} ${N&&s.styles["popover__sort__item--active"]}`,onClick:E,children:[t.jsx(G.AiOutlineSortDescending,{className:"mr-1"}),"Descending"]})]}),(typeof m<"u"||!!a)&&t.jsxs(i.Fragment,{children:[t.jsx("div",{className:"border border-top-1 border-bottom-0 mx-1 my-2"}),t.jsxs("div",{className:"d-flex flex-column",children:[t.jsx(A.Label,{className:"font-weight-bold",children:"Filter"}),t.jsxs("div",{className:`position-relative px-1 ${s.styles.popover__search}`,children:[t.jsx(Ee,{className:`position-absolute ${s.styles.popover__search__icon}`}),t.jsx(A.Input,{ref:c,className:s.styles.popover__search__input,value:d,onChange:p})]}),t.jsxs("div",{className:`mx-1 mt-2 p-2 bg-light ${s.styles.popover__options}`,children:[t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",onChange:_,checked:C==null})," ",t.jsx(A.Label,{check:!0,children:"(Select all)"})]}),!!m&&!a&&S.map(x=>t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",value:x.value,onChange:I,checked:C?.includes(x.value)||C==null})," ",t.jsx(A.Label,{check:!0,children:x.label})]},x.value)),!!a&&B.map(x=>t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",value:x.value,onChange:I,checked:C?.includes(x.value)||C==null})," ",t.jsx(A.Label,{check:!0,children:x.label})]},x.value))]})]}),t.jsxs("div",{className:"d-flex justify-content-end mt-3",style:{gap:"8px"},children:[t.jsx(A.Button,{color:"primary",className:"mr-2",size:"sm",onClick:L,children:"Apply Filter"}),t.jsx(A.Button,{color:"secondary",size:"sm",onClick:l,children:"Cancel"})]})]})]})})})},Be=({data:e,popoverId:a,filters:l,searchString:m,users:r,selectedOptions:c,onOptionsChange:S,onSearch:C,onChangeFilters:o,onOpenFilter:N,onClose:B,isCenter:d,isActive:p=!1})=>{const{t:L}=J.useTranslation(),[I,_]=i.useState(""),E=i.useMemo(()=>e.sortBy!=null?j.userOrders[e.sortBy]:"",[e.sortBy]),u=i.useMemo(()=>a===E,[E,a]),x=()=>{N?.(E,e.searchBy,I,e.sortBy)},R=g=>{_(g)};return t.jsx("th",{className:e.className,children:E&&e.sortBy!==void 0?t.jsxs("div",{className:`w-100 d-flex ${d?"justify-content-center":"justify-content-between"} align-items-center ${s.styles["table-filter-icon"]}`,children:[L(e.name),t.jsxs("div",{className:"ml-2 p-1",id:E,onClick:x,style:{cursor:"pointer"},children:[e.sortBy!==void 0&&e.sortBy===l?.sortBy&&t.jsx("span",{children:l.isDescending?t.jsx(G.AiOutlineSortDescending,{}):t.jsx(G.AiOutlineSortAscending,{})}),l?.searchByStrings?.length&&e.searchBy===l?.searchBy?t.jsx(Ie,{color:p?"#007bff":"#242424"}):t.jsx(_e,{color:p?"#007bff":"#242424"})]}),t.jsx(Oe,{placement:"bottom-end",target:E,users:r,isOpen:u,filters:l,sortBy:e.sortBy,searchKey:I,searchBy:e.searchBy,searchString:m,defaultOptions:e.options,selectedOptions:c,onClose:B,onSearch:C,getOption:e.getOption,onChangeFilters:o,onOptionsChange:S,onChangeSearchKey:R})]}):L(e.name)})},we=e=>{const{filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r,assistantOptions:c,counselorOptions:S,secondaryTeacherOptions:C}=e,[o,N]=i.useState(),[B,d]=i.useState([]),[p,L]=i.useState({...j.DEFAULT_FILTER_POPOVER,isDescending:a.isDescending,searchString:a.searchString}),I=M.useDispatch(),_=ce.useLocation(),E=i.useCallback(async O=>{try{const y=(m?await j.getStudentFilter(p):await j.getFilterRosterUser({...p,byStudent:O})).data?.items||[];d(y)}catch(n){I(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}},[JSON.stringify(p),m]),u=i.useCallback((O,n,y,b)=>{N(O),L({...p,searchBy:n,searchStringBy:y,isDescending:a.sortBy===b?a.isDescending:void 0,searchString:a.searchString})},[JSON.stringify(p),a.isDescending,a.searchString]),x=()=>{N("")},R=i.useCallback((O,n)=>{L({...p,searchBy:n,searchStringBy:O})},[JSON.stringify(p)]),g=i.useCallback((O,n)=>{n&&l?.({...a,[j.SearchBy[n]]:O})},[JSON.stringify(a)]);return i.useEffect(()=>{if(!_.pathname.includes("users/assign-student"))return;const O=y=>y.sort((b,U)=>b.localeCompare(U)),n=p.searchStringBy?.toLowerCase()||"";if(p.searchBy===j.SearchBy.Grade)d(j.GRADE);else{let y=[];switch(p.searchBy){case j.SearchBy.Name:E(!0);break;case j.SearchBy.Teacher:y=r?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.Assistant:y=c?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.Counselor:y=S?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.SecondaryTeacher:y=C?.map(v=>v.label).filter(Boolean)||[];break}const b=Array.from(new Set(y)),U=n?b.filter(v=>v.toLowerCase().includes(n)):b,f=O(U);d(f)}},[JSON.stringify(p),r,c,S,C,_.pathname]),i.useEffect(()=>{!(_.pathname.includes("users/assign-student")&&p.searchBy!==void 0)&&p.searchBy!==void 0&&E()},[JSON.stringify(p),_.pathname]),{popoverFilters:p,popoverId:o,users:B,handleFilterIcon:u,handleCloseFilter:x,handleSearch:R,handleChangeFilters:g}},oe=({headers:e,filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r=[],assistantOptions:c=[],counselorOptions:S=[],secondaryTeacherOptions:C=[]})=>{const{popoverId:o,users:N,handleFilterIcon:B,handleCloseFilter:d,handleSearch:p,handleChangeFilters:L}=we({filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r,assistantOptions:c,counselorOptions:S,secondaryTeacherOptions:C}),I=Object.entries(a).filter(([u,x])=>x!==""&&!(Array.isArray(x)&&x.length===0)&&x!==null&&x!==void 0).map(([u])=>u),_=Object.entries(j.SearchBy).filter(([u,x])=>isNaN(Number(u))),E=I.map(u=>_.find(([x])=>x===u)).filter(u=>!!u);return t.jsx("tr",{children:e.map(u=>u.onSelectAll?t.jsx("th",{className:`align-middle text-center ${u.className}`,children:t.jsx("input",{type:"checkbox",onChange:()=>u.onSelectAll?.(),checked:u.isCheckAll??!1})},u.name):t.jsx(Be,{users:N,data:u,isCenter:u.isCenter,filters:a,popoverId:o,selectedOptions:a.searchByStrings,onSearch:p,onClose:d,onOpenFilter:B,onChangeFilters:l,onOptionsChange:L,isActive:typeof u.searchBy=="number"&&E.some(([x,R])=>R===u.searchBy)},u.name))})},Re=()=>{const e=M.useDispatch(),a=M.useSelector(c=>c?.common?.user?.schoolName)||"",l=async c=>{e(s.setLoading(!0));try{const C=(await j.getRosterUserExport(c)).data,o=m(C),N=document.createElement("a");N.href=o,N.download=`${a}_Users_Report.csv`,N.click()}catch(S){e(s.setAlert({type:"danger",message:S.response?.data?.title||S.message}))}e(s.setLoading(!1))},m=c=>{let S=`First Name,Last Name,Email,Phone,Age,Grade,Role,Active Status,Create Time,Roster Sourced Id,Roster Status,Roster Family Name,Roster Middle Name,Roster Given Name,Roster Email,Roster Role,Roster Grades,Teachers,Assistants,Counselors,SupportTeachers,EduTeachers
|
|
2
|
+
`;const C=c.map(o=>{const N=o.dateOfBirth!==s.DATE_MIN_VALUE?Z.differenceInCalendarYears(new Date,Z.parseISO(o.dateOfBirth)):"";return`${r(o.firstName)},${r(o.lastName)},${r(o.email)},${r(o.phoneNumber)},${N},${r(o.grade)},${r(o.roles.join(", ").replace("SecondaryTeacher","SupportTeacher"))},${o.isActive?"Active":"Inactive"},${s.formatLocalTime(o?.createTime,"yyyy-MM-dd HH:mm")},${r(o.sourcedId)},${r(o.rosterUser?.status)},${r(o.rosterUser?.familyName)},${r(o.rosterUser?.middleName)},${r(o.rosterUser?.givenName)},${r(o.rosterUser?.email)},${r(o.rosterUser?.role)},${r(o.rosterUser?.grades)},${r(o.teachers)},${r(o.assistants)},${r(o.counselors)},${r(o.supportTeachers)},${r(o.eduTeachers)}`}).join(`
|
|
3
|
+
`);return`${j.CSV_PREFIX}${S}${encodeURIComponent(C)}`},r=c=>c?`"${c.replace(/"/g,'""').replaceAll(/\n/g," ")}"`:"";return{exportUsers:l}},ie=`${s.BASE_URL}/api/ImportCsv/csv`,V=`${s.BASE_URL}/api/Teacher`,De=(e,a)=>s.apiUpload.post(`${ie}/${a}`,e),te=e=>s.apiUpload.post(`${ie}/importClassReflection`,e),ke=(e,a)=>s.apiUpload.post(`${V}/adminImportStudentByTeacherId/${e}`,a),Te=e=>s.apiUpload.post(`${V}/adminImport`,e),$e=()=>s.api.get(`${V}/download-template-file-user`),Fe=(e,a)=>s.apiUpload.post(`${V}/validate-csv-template-student/${a}`,e);var le=(e=>(e.Students="students",e.Subjects="subjects",e.Grades="grades",e.Attendances="attendances",e.ClassReflection="classReflection",e.Others="others",e.AllUser="allUser",e))(le||{});const Y="csvupload",ne={teacherName:"",teacherEmail:"",studentIds:[],file:""},Me=()=>{const e=M.useDispatch(),a=M.useSelector(f=>f.common.isLoading),[l,m]=i.useState(null),[r,c]=i.useState(),[S,C]=i.useState([]),[o,N]=i.useState(ne),[B,d]=i.useState(),p=window.location.hostname,L=p.includes("isb")||p.includes("stage"),[I,_]=i.useState(0),[E,u]=i.useState(""),x=async()=>{e(s.setLoading(!0));try{const h=await $e();var f=new Blob([h.data.content],{type:"text/csv"});const T=window.URL.createObjectURL(f);var v=document.createElement("a");v.href=T,v.setAttribute("download",h.data.nameFile),v.click(),e(s.setAlert({type:"success",message:"Download successfully"}))}catch(h){e(s.setAlert({type:"danger",message:h.message}))}e(s.setLoading(!1))},R=i.useCallback(async f=>{if(!l||!f)return;e(s.setLoading(!0));try{const w=new FormData;if(w.append("file",f,f.name),l=="allUser"){let P=(await f.text()).trim();const D=P.split(`
|
|
4
|
+
`).map(k=>k.trim()),$=D.findIndex(k=>k.split(",").includes("FirstName"));if($===0)throw new Error("Invalid CSV: Missing header row.");P=D.slice($).join(`
|
|
5
|
+
`);const F=ee.parse(P,{header:!0,skipEmptyLines:!0}),q=F.meta.fields,X=F.data;if(!q)throw new Error("Unable to determine header from CSV file");const Q=20,z=[];for(let k=0;k<X.length;k+=Q){const K=X.slice(k,k+Q),H=ee.unparse({fields:q,data:K});z.push(H)}for(let k=0;k<z.length;k++){const K=new Blob([z[k]],{type:"text/csv"}),H=new FormData;H.append("file",K,`students_chunk${k+1}.csv`),await Te(H)}}else L?l=="classReflection"&&await te(w):await De(w,l.toString());e(s.setAlert({type:"success",message:"Import CSV successfully"}))}catch(w){e(s.setAlert({type:"danger",message:w.response?.data?.title||w.message}))}e(s.setLoading(!1));const v=document.getElementById(Y),h=document.getElementById("import-student"),T=document.getElementById("import-classReflection");v&&(v.value=""),h&&(h.value=""),T&&(T.value="")},[l]),g=async f=>{if(!I){e(s.setAlert({type:"danger",message:"Select teacher before import csv"}));return}if(!l||!f)return;e(s.setLoading(!0));try{const h=new FormData;h.append("file",f,f.name),await ke(I,h),e(s.setAlert({type:"success",message:"Import CSV successfully"}))}catch(h){e(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}e(s.setLoading(!1));const v=document.getElementById("teacherSelector");v&&(v.value="")},O=async f=>{if(!r||!r)return;e(s.setLoading(!0));try{const h=new FormData;h.append("file",r,r.name),h.append("teacherName",f.teacherName),h.append("teacherEmail",f.teacherEmail),f.studentIds.forEach(T=>{h.append("studentIds",T)}),await te(h),e(s.setAlert({type:"success",message:"Import CSV successfully"})),N(ne)}catch(h){e(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}e(s.setLoading(!1));const v=document.getElementById(Y);v&&(v.value="")},n=f=>{_(f.value)},y=f=>{d(f),u(f?.name||"")},b=()=>{if(!B){e(s.setAlert({type:"danger",message:"Select CSV to import"}));return}g(B)};return{isLoading:a,id:Y,setType:m,upload:R,initImportReflection:o,setInitImportReflection:N,onConfirm:O,CSVType:le,dataFile:r,setDataFile:c,setArrStudent:C,arrStudent:S,isCheckDomainIBS:L,onChangeTeacher:n,uploadByTeacherId:g,setDataFileImportStudent:y,onUpLoadStudentFile:b,defaultTeacher:I,fileName:E,onStudentSubmit:()=>{e(s.setModal({isOpen:!0,type:"warning",message:"Are you sure upload this file?",onConfirm:()=>{b()}}))},downloadTemplateUser:x}},Pe=()=>{const e=M.useDispatch(),a=async r=>{e(s.setLoading(!0));try{await j.postRequestResendMail(r),e(s.setAlert({type:"success",message:"Send Successfully"}))}catch(c){e(s.setAlert({type:"danger",message:c.response?.data?.title||c.message}))}e(s.setLoading(!1))};return{handleSendMultiUsers:r=>{a({userIds:[...r]})},handleSendSingleUser:r=>{a({userIds:[r]})}}},ae={fontWeight:500},re={height:38,backgroundColor:"#2eb85c",borderColor:"#2eb85c"},qe="user",de=()=>{const{queryName:e,userList:a,totalItems:l,filters:m,fullName:r,removeData:c,changeFilters:S,reDirectDetailPage:C,switchUser:o,handleSyncRosterUsers:N,rosterUserInfo:B,onSelectUser:d,userIds:p,onSelectAllUser:L}=Ne(),{handleSendMultiUsers:I}=Pe(),{upload:_}=Me(),{exportUsers:E}=Re(),{t:u}=J.useTranslation(),x=()=>E(m),R=[{name:"",isCenter:!0,onSelectAll:()=>{L()},isCheckAll:p.length==l&&l!=0}].concat(j.UserColumns);return t.jsxs("div",{className:`fadeIn animated h-100 ${s.screenWidth<=767?s.styles["p-0-12"]:""}`,children:[t.jsx("h5",{className:"mt-4 mb-2",children:u(`${qe}`)}),t.jsxs(A.Row,{className:"my-2",children:[t.jsx(A.Col,{md:8,children:t.jsx(s.SearchBoxContainer,{text:u("create_user"),onClick:()=>C(),initValue:e||"",onSearch:g=>S({searchString:g}),placeholder:u("type_something_to_search_by_user_name")})}),t.jsxs(A.Col,{md:4,className:"d-flex justify-content-end align-items-center",children:[u("total_of_users")," : ",l]}),t.jsxs(A.Col,{md:12,className:"d-flex justify-content-end my-2",style:{gap:"8px"},children:[t.jsx("button",{className:"btn btn-success d-flex align-items-center border-0",style:re,onClick:()=>I(p),children:t.jsx("p",{className:`${s.styles["button-content"]} mb-0`,style:ae,children:u("welcome_email_resend")})}),t.jsx(A.Input,{id:"import-user",className:"d-none",type:"file",onChange:g=>_(g.target.files[0]),accept:"text/csv"}),t.jsx(je,{text:u("sync_roster_users"),onClick:N}),t.jsxs("button",{className:"btn btn-success d-flex align-items-center border-0 p-0",style:re,onClick:x,children:[t.jsx("div",{className:`${s.styles["button-icon"]}`,children:t.jsx("img",{src:"images/export-icon.svg",alt:""})}),t.jsx("p",{className:`${s.styles["button-content"]} mb-0`,style:ae,children:u("export_to_csv")})]})]})]}),t.jsxs(A.Row,{className:"mb-2",children:[t.jsx(A.Col,{md:12,children:t.jsx("div",{style:{overflow:"auto"},children:t.jsxs(A.Table,{bordered:!0,hover:!0,striped:!0,size:"sm",children:[t.jsx("thead",{children:t.jsx(oe,{headers:R,filters:m,fullName:r,onChangeFilters:S})}),t.jsxs("tbody",{children:[a&&a.length>0&&a.map(g=>t.jsxs("tr",{children:[t.jsx("td",{className:"align-middle",children:t.jsx("input",{type:"checkbox",onChange:()=>d(g.id),checked:p.includes(g.id)??!1})}),t.jsx("td",{className:"align-middle",children:t.jsx(s.LinkEditButton,{label:`${g.fullName}`,onClick:()=>C(g.id)})}),t.jsx("td",{className:"align-middle",children:g.email}),t.jsx("td",{className:"align-middle",children:g.dateOfBirth!==s.DATE_MIN_VALUE&&me(new Date,new Date(g.dateOfBirth))}),t.jsx("td",{className:"align-middle",children:!!g.roles&&g.roles.map(O=>O==="SecondaryTeacher"?"SupportTeacher":O).join(", ")}),t.jsx("td",{className:"align-middle",children:g.isActive?u("active"):u("inactive")}),t.jsx("td",{className:"align-middle",children:s.formatLocalTime(g?.createTime,"yyyy-MM-dd HH:mm")}),t.jsx("td",{children:B(g)}),t.jsx("td",{className:"align-middle",children:t.jsx(s.FaUsersCog,{style:{fontSize:"18px",margin:"0 10px",cursor:"pointer"},onClick:()=>o(g.id)})}),t.jsx("td",{className:"align-middle",style:{padding:"0 15px"},children:t.jsx(s.DeleteButtonIcon,{onClick:()=>c(g.id)})})]},g.id)),(!a||!a.length)&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,className:"p-0",children:t.jsx(s.EmptyDataAlert,{className:"mb-0",label:u("user")})})})]})]})})}),t.jsx(A.Col,{md:12,children:t.jsx(s.CustomPagination,{filters:m,totalRecordCount:l,changePageSize:g=>S({pageSize:g}),changePage:g=>S({currentPage:g})})})]})]})},He=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"}));exports.TableHeader=oe;exports.UserList=de;exports.UserList$1=He;exports.validateCsvApi=Fe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),A=require("reactstrap"),j=require("./constants-Dk81SvKq.js"),J=require("react-i18next"),i=require("react"),M=require("react-redux"),ce=require("react-router-dom"),s=require("./index-Cmo6_CCl.js"),ue=require("./types-CTFcZUFS.js"),G=require("./index.esm-DMTAvOCa.js"),Z=require("date-fns"),ee=require("papaparse");function me(e,a){j.requiredArgs(2,arguments);var l=j.toDate(e),m=j.toDate(a);return l.getFullYear()-m.getFullYear()}const he=()=>{const[e,a]=i.useState(j.DEFAULT_FILTER);return{filters:e,setFilters:a,changeFilters:m=>{const r={...e,...m};r.searchString&&m.searchString&&m.searchString!=e.searchString&&(r.currentPage=1),a(r)}}},pe="/admin/user",ge="/admin/create-user",ye="User list",se="/home",fe="/home",Se="/admin/home",xe="/parent",ve="/admin/schools",Ce="/list-student",Ne=()=>{const e=ce.useNavigate(),l=new URLSearchParams(location.search).get("query"),m=M.useSelector(n=>n.users.userList),r=M.useSelector(n=>n.users.totalItems),{filters:c,changeFilters:S}=he(),C=l||"",[o,N]=i.useState([]),B=window.location.host.includes("-district"),d=M.useDispatch(),{t:p}=J.useTranslation(),L=n=>{const y=o.find(b=>b==n);N(y?o.filter(b=>b!=n):o.concat([n]))},I=i.useCallback(async()=>{if(o.length!=0){N([]);return}if(c.searchBy!==void 0&&c.searchByStrings!==void 0&&c.searchByStrings.length===0){d(s.setUserList({userList:[],totalItems:0}));return}d(s.setLoading(!0));try{const n=await j.getRosterAllUserId(c);N(n.data||[])}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},[d,c,o]),_=i.useCallback(async()=>{if(c.searchBy!==void 0&&c.searchByStrings!==void 0&&c.searchByStrings.length===0){d(s.setUserList({userList:[],totalItems:0}));return}d(s.setLoading(!0));try{const n=await j.getRosterUser(c),{items:y,totalItems:b}=n.data;for(const U of y)U.roles=U.roles.map(f=>f!=s.ROLES.EDUTEACHER?f:"EduTeacher");d(s.setUserList({userList:y,totalItems:b}))}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},[d,c]),E=async()=>{d(s.setLoading(!0));try{const n=await j.syncRosterUsersApi();n.data?(d(s.setAlert({type:"success",message:`${n.data} user${n.data>1?"s have":" has"} been synchronized`})),_()):d(s.setAlert({type:"success",message:"Users synchronized"}))}catch(n){d(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}d(s.setLoading(!1))},u=n=>{if(!n)return"";const y=[],{sourcedId:b,rosterUser:U}=n;if(b&&U&&y.push(b),U){const{givenName:f,middleName:v,familyName:h,email:T}=U,w=[];h&&w.push(h),v&&w.push(v),f&&w.push(f),y.push(w.join(" ")||""),y.push(T||"")}return y.join(" / ")};i.useEffect(()=>{document.title=ye},[]),i.useEffect(()=>{S({...c,searchString:C})},[C]),i.useEffect(()=>{_()},[JSON.stringify(c)]);const x=i.useCallback(n=>{d(s.setModal({isOpen:!0,type:"warning",message:p("do_you_want_to_remove_this_user"),onConfirm:async()=>{d(s.setLoading(!0));try{await j.remove(n),d(s.setAlert({type:"success",message:"Remove user successfully"})),c.currentPage!==1?S({currentPage:1}):_()}catch(y){d(s.setAlert({type:"danger",message:y.response?.data?.title||y.message}))}d(s.setLoading(!1))}}))},[JSON.stringify(c)]),R=n=>{const y=sessionStorage.getItem(s.IS_USER_SESSION_BROWSER),{token:b,id:U,firstName:f,lastName:v,roles:h,email:T,profileImageFileName:w}=n.data;y?sessionStorage.setItem(s.ACCESS_TOKEN,b):localStorage.setItem(s.ACCESS_TOKEN,b),h.includes("Admin")&&localStorage.setItem("ROLES","Admin"),localStorage.removeItem(s.NOTIFICATION_ALERT_KEY),d(s.setUser({id:U,firstName:f,lastName:v,roles:h,email:T,profileImageFileName:w})),B?e(ve):h.includes("Admin")?e(Se):h.includes("Teacher")||h.includes("Assistant")?e(se):h.includes("Student")?e(fe):h.includes("Parent")?e(xe):h.includes("EduTeacher")?e(Ce):(h.includes("Counselor")||h.includes("SecondaryTeacher"))&&e(se)},g=i.useCallback(async n=>{try{const b=(await j.switchAccountUser(n)).data;d(s.setModal({isOpen:!0,type:"warning",message:p("do_you_want_to_impersonate_this_user"),onConfirm:async()=>{d(s.setLoading(!0));try{const U={email:b.email,password:"default",accessToken:b.token,loginType:ue.LoginType.Impersonate},f=await s.logIn(U);localStorage.clear(),R(f)}catch(U){s.setAlert({type:"danger",message:U.response?.data?.title||U.message})}d(s.setLoading(!1))}}))}catch(y){d(s.setAlert({type:"danger",message:y.response?.data?.title||y.message}))}},[c]);return{userList:m,totalItems:r,filters:c,queryName:l,fullName:C,getData:_,removeData:x,changeFilters:S,reDirectDetailPage:n=>{const y=n?`${pe}/${n}`:ge;e(y)},switchUser:g,handleSyncRosterUsers:E,rosterUserInfo:u,userIds:o,onSelectAllUser:I,onSelectUser:L}},be={fontWeight:500},Ae={height:38,background:"#316cd9"},je=({text:e,onClick:a,className:l=""})=>t.jsxs(A.Button,{onClick:a,color:"primary",style:Ae,className:`d-flex align-items-center ${l} gap-2`,children:[t.jsx(s.FaSyncAlt,{}),t.jsx("span",{style:be,children:e})]});function _e(e){return s.GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 3H5a1 1 0 0 0-1 1v2.59c0 .523.213 1.037.583 1.407L10 13.414V21a1.001 1.001 0 0 0 1.447.895l4-2c.339-.17.553-.516.553-.895v-5.586l5.417-5.417c.37-.37.583-.884.583-1.407V4a1 1 0 0 0-1-1zm-6.707 9.293A.996.996 0 0 0 14 13v5.382l-2 1V13a.996.996 0 0 0-.293-.707L6 6.59V5h14.001l.002 1.583-5.71 5.71z"}}]})(e)}function Ee(e){return s.GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.023 16.977a35.13 35.13 0 0 1-1.367-1.384c-.372-.378-.596-.653-.596-.653l-2.8-1.337A6.962 6.962 0 0 0 16 9c0-3.859-3.14-7-7-7S2 5.141 2 9s3.14 7 7 7c1.763 0 3.37-.66 4.603-1.739l1.337 2.8s.275.224.653.596c.387.363.896.854 1.384 1.367l1.358 1.392.604.646 2.121-2.121-.646-.604c-.379-.372-.885-.866-1.391-1.36zM9 14c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z"}}]})(e)}function Ie(e){return s.GenIcon({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",clipRule:"evenodd"}}]})(e)}const Ue=(e,a)=>{i.useEffect(()=>{function l(m){e.current&&!e.current.contains(m.target)&&a?.()}return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e.current])},Le=e=>{const{isOpen:a,sortBy:l,filters:m,users:r,searchBy:c,defaultOptions:S,selectedOptions:C,searchKey:o,onChangeSearchKey:N,onOptionsChange:B,onSearch:d,onClose:p,onChangeFilters:L,getOption:I}=e,[_,E]=i.useState(),[u,x]=i.useState([]),R=i.useRef(null),g=i.useRef(null);Ue(R,p);const{t:O}=J.useTranslation(),n=i.useCallback(()=>{if(!a)return;const D=o?.trim?.()??"";c!=null&&!S&&d?.(D,c),c!=null&&S&&x(S.filter($=>$.label.toLowerCase().includes(D.toLowerCase())))},[c,o,JSON.stringify(S),a]),y=()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(n,500)},b=D=>{const $=D.target.value;N($)},U=i.useCallback(()=>{B?.(_,c),p?.()},[JSON.stringify(_)]),f=i.useCallback(D=>{const $=D.target.value??"";let F=_??[],q=F.indexOf($);q>-1?F.splice(q,1):F=[...F,$],E(F==null?F:[...F])},[JSON.stringify(_)]),v=i.useCallback(D=>{const $=D.target.checked;E($?void 0:[])},[]),h=i.useCallback(()=>{L?.({...m,sortBy:l,isDescending:!0}),p?.()},[JSON.stringify(m),c]),T=i.useCallback(()=>{L?.({...m,sortBy:l,isDescending:!1}),p?.()},[JSON.stringify(m),c]),w=i.useMemo(()=>I?r.map(D=>I(D,O)):[],[JSON.stringify(r),JSON.stringify(I)]),W=m?.isDescending==!1&&m.sortBy===l,P=!!m?.isDescending&&m.sortBy===l;return i.useEffect(()=>{m?.searchBy!==c?E(void 0):E(C)},[JSON.stringify(C),m?.searchBy]),i.useEffect(()=>{x(S||[])},[JSON.stringify(S)]),i.useEffect(()=>{y()},[o,a]),{ref:R,options:w,inputRef:g,sOptions:_,isAscending:W,isDescending:P,filteredOptions:u,searchKey:o,handleSearch:n,handleApplyFilter:U,handleOptionSelected:f,handleOptionSelectedAll:v,handleSortDesc:h,handleSortAsc:T,handleChangeSearchKey:b}},Oe=e=>{const{defaultOptions:a,onClose:l,getOption:m}=e,{ref:r,inputRef:c,options:S,sOptions:C,isAscending:o,isDescending:N,filteredOptions:B,searchKey:d,handleChangeSearchKey:p,handleApplyFilter:L,handleOptionSelected:I,handleOptionSelectedAll:_,handleSortDesc:E,handleSortAsc:u}=Le(e);return t.jsx(A.Popover,{...e,hideArrow:!0,className:s.styles["popover-zindex"],children:t.jsx(A.PopoverBody,{className:"pb-3",children:t.jsxs("div",{ref:r,className:s.styles.popover,children:[t.jsxs("div",{className:`d-flex flex-column ${s.styles.popover__sort}`,children:[t.jsx(A.Label,{className:"font-weight-bold",children:"Sort"}),t.jsxs("div",{className:`px-1 ${s.styles.popover__sort__item} ${o&&s.styles["popover__sort__item--active"]}`,onClick:u,children:[t.jsx(G.AiOutlineSortAscending,{className:"mr-1"}),"Ascending"]}),t.jsxs("div",{className:`px-1 mt-1 ${s.styles.popover__sort__item} ${N&&s.styles["popover__sort__item--active"]}`,onClick:E,children:[t.jsx(G.AiOutlineSortDescending,{className:"mr-1"}),"Descending"]})]}),(typeof m<"u"||!!a)&&t.jsxs(i.Fragment,{children:[t.jsx("div",{className:"border border-top-1 border-bottom-0 mx-1 my-2"}),t.jsxs("div",{className:"d-flex flex-column",children:[t.jsx(A.Label,{className:"font-weight-bold",children:"Filter"}),t.jsxs("div",{className:`position-relative px-1 ${s.styles.popover__search}`,children:[t.jsx(Ee,{className:`position-absolute ${s.styles.popover__search__icon}`}),t.jsx(A.Input,{ref:c,className:s.styles.popover__search__input,value:d,onChange:p})]}),t.jsxs("div",{className:`mx-1 mt-2 p-2 bg-light ${s.styles.popover__options}`,children:[t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",onChange:_,checked:C==null})," ",t.jsx(A.Label,{check:!0,children:"(Select all)"})]}),!!m&&!a&&S.map(x=>t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",value:x.value,onChange:I,checked:C?.includes(x.value)||C==null})," ",t.jsx(A.Label,{check:!0,children:x.label})]},x.value)),!!a&&B.map(x=>t.jsxs(A.FormGroup,{className:"d-flex align-items-center",check:!0,style:{gap:"8px"},children:[t.jsx(A.Input,{type:"checkbox",value:x.value,onChange:I,checked:C?.includes(x.value)||C==null})," ",t.jsx(A.Label,{check:!0,children:x.label})]},x.value))]})]}),t.jsxs("div",{className:"d-flex justify-content-end mt-3",style:{gap:"8px"},children:[t.jsx(A.Button,{color:"primary",className:"mr-2",size:"sm",onClick:L,children:"Apply Filter"}),t.jsx(A.Button,{color:"secondary",size:"sm",onClick:l,children:"Cancel"})]})]})]})})})},Be=({data:e,popoverId:a,filters:l,searchString:m,users:r,selectedOptions:c,onOptionsChange:S,onSearch:C,onChangeFilters:o,onOpenFilter:N,onClose:B,isCenter:d,isActive:p=!1})=>{const{t:L}=J.useTranslation(),[I,_]=i.useState(""),E=i.useMemo(()=>e.sortBy!=null?j.userOrders[e.sortBy]:"",[e.sortBy]),u=i.useMemo(()=>a===E,[E,a]),x=()=>{N?.(E,e.searchBy,I,e.sortBy)},R=g=>{_(g)};return t.jsx("th",{className:e.className,children:E&&e.sortBy!==void 0?t.jsxs("div",{className:`w-100 d-flex ${d?"justify-content-center":"justify-content-between"} align-items-center ${s.styles["table-filter-icon"]}`,children:[L(e.name),t.jsxs("div",{className:"ml-2 p-1",id:E,onClick:x,style:{cursor:"pointer"},children:[e.sortBy!==void 0&&e.sortBy===l?.sortBy&&t.jsx("span",{children:l.isDescending?t.jsx(G.AiOutlineSortDescending,{}):t.jsx(G.AiOutlineSortAscending,{})}),l?.searchByStrings?.length&&e.searchBy===l?.searchBy?t.jsx(Ie,{color:p?"#007bff":"#242424"}):t.jsx(_e,{color:p?"#007bff":"#242424"})]}),t.jsx(Oe,{placement:"bottom-end",target:E,users:r,isOpen:u,filters:l,sortBy:e.sortBy,searchKey:I,searchBy:e.searchBy,searchString:m,defaultOptions:e.options,selectedOptions:c,onClose:B,onSearch:C,getOption:e.getOption,onChangeFilters:o,onOptionsChange:S,onChangeSearchKey:R})]}):L(e.name)})},we=e=>{const{filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r,assistantOptions:c,counselorOptions:S,secondaryTeacherOptions:C}=e,[o,N]=i.useState(),[B,d]=i.useState([]),[p,L]=i.useState({...j.DEFAULT_FILTER_POPOVER,isDescending:a.isDescending,searchString:a.searchString}),I=M.useDispatch(),_=ce.useLocation(),E=i.useCallback(async O=>{try{const y=(m?await j.getStudentFilter(p):await j.getFilterRosterUser({...p,byStudent:O})).data?.items||[];d(y)}catch(n){I(s.setAlert({type:"danger",message:n.response?.data?.title||n.message}))}},[JSON.stringify(p),m]),u=i.useCallback((O,n,y,b)=>{N(O),L({...p,searchBy:n,searchStringBy:y,isDescending:a.sortBy===b?a.isDescending:void 0,searchString:a.searchString})},[JSON.stringify(p),a.isDescending,a.searchString]),x=()=>{N("")},R=i.useCallback((O,n)=>{L({...p,searchBy:n,searchStringBy:O})},[JSON.stringify(p)]),g=i.useCallback((O,n)=>{n&&l?.({...a,[j.SearchBy[n]]:O})},[JSON.stringify(a)]);return i.useEffect(()=>{if(!_.pathname.includes("users/assign-student"))return;const O=y=>y.sort((b,U)=>b.localeCompare(U)),n=p.searchStringBy?.toLowerCase()||"";if(p.searchBy===j.SearchBy.Grade)d(j.GRADE);else{let y=[];switch(p.searchBy){case j.SearchBy.Name:E(!0);break;case j.SearchBy.Teacher:y=r?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.Assistant:y=c?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.Counselor:y=S?.map(v=>v.label).filter(Boolean)||[];break;case j.SearchBy.SecondaryTeacher:y=C?.map(v=>v.label).filter(Boolean)||[];break}const b=Array.from(new Set(y)),U=n?b.filter(v=>v.toLowerCase().includes(n)):b,f=O(U);d(f)}},[JSON.stringify(p),r,c,S,C,_.pathname]),i.useEffect(()=>{!(_.pathname.includes("users/assign-student")&&p.searchBy!==void 0)&&p.searchBy!==void 0&&E()},[JSON.stringify(p),_.pathname]),{popoverFilters:p,popoverId:o,users:B,handleFilterIcon:u,handleCloseFilter:x,handleSearch:R,handleChangeFilters:g}},oe=({headers:e,filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r=[],assistantOptions:c=[],counselorOptions:S=[],secondaryTeacherOptions:C=[]})=>{const{popoverId:o,users:N,handleFilterIcon:B,handleCloseFilter:d,handleSearch:p,handleChangeFilters:L}=we({filters:a,onChangeFilters:l,isStudentFilter:m,teacherOptions:r,assistantOptions:c,counselorOptions:S,secondaryTeacherOptions:C}),I=Object.entries(a).filter(([u,x])=>x!==""&&!(Array.isArray(x)&&x.length===0)&&x!==null&&x!==void 0).map(([u])=>u),_=Object.entries(j.SearchBy).filter(([u,x])=>isNaN(Number(u))),E=I.map(u=>_.find(([x])=>x===u)).filter(u=>!!u);return t.jsx("tr",{children:e.map(u=>u.onSelectAll?t.jsx("th",{className:`align-middle text-center ${u.className}`,children:t.jsx("input",{type:"checkbox",onChange:()=>u.onSelectAll?.(),checked:u.isCheckAll??!1})},u.name):t.jsx(Be,{users:N,data:u,isCenter:u.isCenter,filters:a,popoverId:o,selectedOptions:a.searchByStrings,onSearch:p,onClose:d,onOpenFilter:B,onChangeFilters:l,onOptionsChange:L,isActive:typeof u.searchBy=="number"&&E.some(([x,R])=>R===u.searchBy)},u.name))})},Re=()=>{const e=M.useDispatch(),a=M.useSelector(c=>c?.common?.user?.schoolName)||"",l=async c=>{e(s.setLoading(!0));try{const C=(await j.getRosterUserExport(c)).data,o=m(C),N=document.createElement("a");N.href=o,N.download=`${a}_Users_Report.csv`,N.click()}catch(S){e(s.setAlert({type:"danger",message:S.response?.data?.title||S.message}))}e(s.setLoading(!1))},m=c=>{let S=`First Name,Last Name,Email,Phone,Age,Grade,Role,Active Status,Create Time,Roster Sourced Id,Roster Status,Roster Family Name,Roster Middle Name,Roster Given Name,Roster Email,Roster Role,Roster Grades,Teachers,Assistants,Counselors,SupportTeachers,EduTeachers
|
|
2
|
+
`;const C=c.map(o=>{const N=o.dateOfBirth!==s.DATE_MIN_VALUE?Z.differenceInCalendarYears(new Date,Z.parseISO(o.dateOfBirth)):"";return`${r(o.firstName)},${r(o.lastName)},${r(o.email)},${r(o.phoneNumber)},${N},${r(o.grade)},${r(o.roles.join(", ").replace("SecondaryTeacher","SupportTeacher"))},${o.isActive?"Active":"Inactive"},${s.formatLocalTime(o?.createTime,"yyyy-MM-dd HH:mm")},${r(o.sourcedId)},${r(o.rosterUser?.status)},${r(o.rosterUser?.familyName)},${r(o.rosterUser?.middleName)},${r(o.rosterUser?.givenName)},${r(o.rosterUser?.email)},${r(o.rosterUser?.role)},${r(o.rosterUser?.grades)},${r(o.teachers)},${r(o.assistants)},${r(o.counselors)},${r(o.supportTeachers)},${r(o.eduTeachers)}`}).join(`
|
|
3
|
+
`);return`${j.CSV_PREFIX}${S}${encodeURIComponent(C)}`},r=c=>c?`"${c.replace(/"/g,'""').replaceAll(/\n/g," ")}"`:"";return{exportUsers:l}},ie=`${s.BASE_URL}/api/ImportCsv/csv`,V=`${s.BASE_URL}/api/Teacher`,De=(e,a)=>s.apiUpload.post(`${ie}/${a}`,e),te=e=>s.apiUpload.post(`${ie}/importClassReflection`,e),ke=(e,a)=>s.apiUpload.post(`${V}/adminImportStudentByTeacherId/${e}`,a),Te=e=>s.apiUpload.post(`${V}/adminImport`,e),$e=()=>s.api.get(`${V}/download-template-file-user`),Fe=(e,a)=>s.apiUpload.post(`${V}/validate-csv-template-student/${a}`,e);var le=(e=>(e.Students="students",e.Subjects="subjects",e.Grades="grades",e.Attendances="attendances",e.ClassReflection="classReflection",e.Others="others",e.AllUser="allUser",e))(le||{});const Y="csvupload",ne={teacherName:"",teacherEmail:"",studentIds:[],file:""},Me=()=>{const e=M.useDispatch(),a=M.useSelector(f=>f.common.isLoading),[l,m]=i.useState(null),[r,c]=i.useState(),[S,C]=i.useState([]),[o,N]=i.useState(ne),[B,d]=i.useState(),p=window.location.hostname,L=p.includes("isb")||p.includes("stage"),[I,_]=i.useState(0),[E,u]=i.useState(""),x=async()=>{e(s.setLoading(!0));try{const h=await $e();var f=new Blob([h.data.content],{type:"text/csv"});const T=window.URL.createObjectURL(f);var v=document.createElement("a");v.href=T,v.setAttribute("download",h.data.nameFile),v.click(),e(s.setAlert({type:"success",message:"Download successfully"}))}catch(h){e(s.setAlert({type:"danger",message:h.message}))}e(s.setLoading(!1))},R=i.useCallback(async f=>{if(!l||!f)return;e(s.setLoading(!0));try{const w=new FormData;if(w.append("file",f,f.name),l=="allUser"){let P=(await f.text()).trim();const D=P.split(`
|
|
4
|
+
`).map(k=>k.trim()),$=D.findIndex(k=>k.split(",").includes("FirstName"));if($===0)throw new Error("Invalid CSV: Missing header row.");P=D.slice($).join(`
|
|
5
|
+
`);const F=ee.parse(P,{header:!0,skipEmptyLines:!0}),q=F.meta.fields,X=F.data;if(!q)throw new Error("Unable to determine header from CSV file");const Q=20,z=[];for(let k=0;k<X.length;k+=Q){const K=X.slice(k,k+Q),H=ee.unparse({fields:q,data:K});z.push(H)}for(let k=0;k<z.length;k++){const K=new Blob([z[k]],{type:"text/csv"}),H=new FormData;H.append("file",K,`students_chunk${k+1}.csv`),await Te(H)}}else L?l=="classReflection"&&await te(w):await De(w,l.toString());e(s.setAlert({type:"success",message:"Import CSV successfully"}))}catch(w){e(s.setAlert({type:"danger",message:w.response?.data?.title||w.message}))}e(s.setLoading(!1));const v=document.getElementById(Y),h=document.getElementById("import-student"),T=document.getElementById("import-classReflection");v&&(v.value=""),h&&(h.value=""),T&&(T.value="")},[l]),g=async f=>{if(!I){e(s.setAlert({type:"danger",message:"Select teacher before import csv"}));return}if(!l||!f)return;e(s.setLoading(!0));try{const h=new FormData;h.append("file",f,f.name),await ke(I,h),e(s.setAlert({type:"success",message:"Import CSV successfully"}))}catch(h){e(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}e(s.setLoading(!1));const v=document.getElementById("teacherSelector");v&&(v.value="")},O=async f=>{if(!r||!r)return;e(s.setLoading(!0));try{const h=new FormData;h.append("file",r,r.name),h.append("teacherName",f.teacherName),h.append("teacherEmail",f.teacherEmail),f.studentIds.forEach(T=>{h.append("studentIds",T)}),await te(h),e(s.setAlert({type:"success",message:"Import CSV successfully"})),N(ne)}catch(h){e(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}e(s.setLoading(!1));const v=document.getElementById(Y);v&&(v.value="")},n=f=>{_(f.value)},y=f=>{d(f),u(f?.name||"")},b=()=>{if(!B){e(s.setAlert({type:"danger",message:"Select CSV to import"}));return}g(B)};return{isLoading:a,id:Y,setType:m,upload:R,initImportReflection:o,setInitImportReflection:N,onConfirm:O,CSVType:le,dataFile:r,setDataFile:c,setArrStudent:C,arrStudent:S,isCheckDomainIBS:L,onChangeTeacher:n,uploadByTeacherId:g,setDataFileImportStudent:y,onUpLoadStudentFile:b,defaultTeacher:I,fileName:E,onStudentSubmit:()=>{e(s.setModal({isOpen:!0,type:"warning",message:"Are you sure upload this file?",onConfirm:()=>{b()}}))},downloadTemplateUser:x}},Pe=()=>{const e=M.useDispatch(),a=async r=>{e(s.setLoading(!0));try{await j.postRequestResendMail(r),e(s.setAlert({type:"success",message:"Send Successfully"}))}catch(c){e(s.setAlert({type:"danger",message:c.response?.data?.title||c.message}))}e(s.setLoading(!1))};return{handleSendMultiUsers:r=>{a({userIds:[...r]})},handleSendSingleUser:r=>{a({userIds:[r]})}}},ae={fontWeight:500},re={height:38,backgroundColor:"#2eb85c",borderColor:"#2eb85c"},qe="user",de=()=>{const{queryName:e,userList:a,totalItems:l,filters:m,fullName:r,removeData:c,changeFilters:S,reDirectDetailPage:C,switchUser:o,handleSyncRosterUsers:N,rosterUserInfo:B,onSelectUser:d,userIds:p,onSelectAllUser:L}=Ne(),{handleSendMultiUsers:I}=Pe(),{upload:_}=Me(),{exportUsers:E}=Re(),{t:u}=J.useTranslation(),x=()=>E(m),R=[{name:"",isCenter:!0,onSelectAll:()=>{L()},isCheckAll:p.length==l&&l!=0}].concat(j.UserColumns);return t.jsxs("div",{className:`fadeIn animated h-100 ${s.screenWidth<=767?s.styles["p-0-12"]:""}`,children:[t.jsx("h5",{className:"mt-4 mb-2",children:u(`${qe}`)}),t.jsxs(A.Row,{className:"my-2",children:[t.jsx(A.Col,{md:8,children:t.jsx(s.SearchBoxContainer,{text:u("create_user"),onClick:()=>C(),initValue:e||"",onSearch:g=>S({searchString:g}),placeholder:u("type_something_to_search_by_user_name")})}),t.jsxs(A.Col,{md:4,className:"d-flex justify-content-end align-items-center",children:[u("total_of_users")," : ",l]}),t.jsxs(A.Col,{md:12,className:"d-flex justify-content-end my-2",style:{gap:"8px"},children:[t.jsx("button",{className:"btn btn-success d-flex align-items-center border-0",style:re,onClick:()=>I(p),children:t.jsx("p",{className:`${s.styles["button-content"]} mb-0`,style:ae,children:u("welcome_email_resend")})}),t.jsx(A.Input,{id:"import-user",className:"d-none",type:"file",onChange:g=>_(g.target.files[0]),accept:"text/csv"}),t.jsx(je,{text:u("sync_roster_users"),onClick:N}),t.jsxs("button",{className:"btn btn-success d-flex align-items-center border-0 p-0",style:re,onClick:x,children:[t.jsx("div",{className:`${s.styles["button-icon"]}`,children:t.jsx("img",{src:"images/export-icon.svg",alt:""})}),t.jsx("p",{className:`${s.styles["button-content"]} mb-0`,style:ae,children:u("export_to_csv")})]})]})]}),t.jsxs(A.Row,{className:"mb-2",children:[t.jsx(A.Col,{md:12,children:t.jsx("div",{style:{overflow:"auto"},children:t.jsxs(A.Table,{bordered:!0,hover:!0,striped:!0,size:"sm",children:[t.jsx("thead",{children:t.jsx(oe,{headers:R,filters:m,fullName:r,onChangeFilters:S})}),t.jsxs("tbody",{children:[a&&a.length>0&&a.map(g=>t.jsxs("tr",{children:[t.jsx("td",{className:"align-middle",children:t.jsx("input",{type:"checkbox",onChange:()=>d(g.id),checked:p.includes(g.id)??!1})}),t.jsx("td",{className:"align-middle",children:t.jsx(s.LinkEditButton,{label:`${g.fullName}`,onClick:()=>C(g.id)})}),t.jsx("td",{className:"align-middle",children:g.email}),t.jsx("td",{className:"align-middle",children:g.dateOfBirth!==s.DATE_MIN_VALUE&&me(new Date,new Date(g.dateOfBirth))}),t.jsx("td",{className:"align-middle",children:!!g.roles&&g.roles.map(O=>O==="SecondaryTeacher"?"SupportTeacher":O).join(", ")}),t.jsx("td",{className:"align-middle",children:g.isActive?u("active"):u("inactive")}),t.jsx("td",{className:"align-middle",children:s.formatLocalTime(g?.createTime,"yyyy-MM-dd HH:mm")}),t.jsx("td",{children:B(g)}),t.jsx("td",{className:"align-middle",children:t.jsx(s.FaUsersCog,{style:{fontSize:"18px",margin:"0 10px",cursor:"pointer"},onClick:()=>o(g.id)})}),t.jsx("td",{className:"align-middle",style:{padding:"0 15px"},children:t.jsx(s.DeleteButtonIcon,{onClick:()=>c(g.id)})})]},g.id)),(!a||!a.length)&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,className:"p-0",children:t.jsx(s.EmptyDataAlert,{className:"mb-0",label:u("user")})})})]})]})})}),t.jsx(A.Col,{md:12,children:t.jsx(s.CustomPagination,{filters:m,totalRecordCount:l,changePageSize:g=>S({pageSize:g}),changePage:g=>S({currentPage:g})})})]})]})},He=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"}));exports.TableHeader=oe;exports.UserList=de;exports.UserList$1=He;exports.validateCsvApi=Fe;
|
package/dist/assets/Images.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare const Images: {
|
|
2
|
-
USER_CONVERSATION_AVATAR: string;
|
|
3
|
-
GROUP_CONVERSATION_AVATAR: string;
|
|
4
|
-
LOGO: string;
|
|
5
|
-
LOGO_HEADER: string;
|
|
6
|
-
LOGO_MINIMIZED: string;
|
|
7
|
-
DOCS_IMAGE: string;
|
|
8
|
-
AUDIO_IMAGE: string;
|
|
9
|
-
PHOTO_IMAGE: string;
|
|
10
|
-
VIDEO_IMAGE: string;
|
|
11
|
-
FOLDER_IMAGE: string;
|
|
12
|
-
UNKNOW_IMAGE: string;
|
|
13
|
-
};
|
|
14
|
-
export default Images;
|
|
1
|
+
declare const Images: {
|
|
2
|
+
USER_CONVERSATION_AVATAR: string;
|
|
3
|
+
GROUP_CONVERSATION_AVATAR: string;
|
|
4
|
+
LOGO: string;
|
|
5
|
+
LOGO_HEADER: string;
|
|
6
|
+
LOGO_MINIMIZED: string;
|
|
7
|
+
DOCS_IMAGE: string;
|
|
8
|
+
AUDIO_IMAGE: string;
|
|
9
|
+
PHOTO_IMAGE: string;
|
|
10
|
+
VIDEO_IMAGE: string;
|
|
11
|
+
FOLDER_IMAGE: string;
|
|
12
|
+
UNKNOW_IMAGE: string;
|
|
13
|
+
};
|
|
14
|
+
export default Images;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
declare const CommonAlert: FC;
|
|
3
|
-
export default CommonAlert;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
declare const CommonAlert: FC;
|
|
3
|
+
export default CommonAlert;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CSSProperties
|
|
2
|
-
interface Props {
|
|
3
|
-
label: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: CSSProperties;
|
|
6
|
-
}
|
|
7
|
-
declare const EmptyDataAlert:
|
|
8
|
-
export default EmptyDataAlert;
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
label: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
declare const EmptyDataAlert: ({ label, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default EmptyDataAlert;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
text: string;
|
|
4
|
-
}
|
|
5
|
-
declare const ErrorHandler: FC<Props>;
|
|
6
|
-
export default ErrorHandler;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ErrorHandler: FC<Props>;
|
|
6
|
+
export default ErrorHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
interface Props {
|
|
3
|
-
text?: string;
|
|
4
|
-
onClick?(): void;
|
|
5
|
-
}
|
|
6
|
-
declare const AddButton: FC<Props>;
|
|
7
|
-
export default AddButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
text?: string;
|
|
4
|
+
onClick?(): void;
|
|
5
|
+
}
|
|
6
|
+
declare const AddButton: FC<Props>;
|
|
7
|
+
export default AddButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
onClick: () => any;
|
|
4
|
-
}
|
|
5
|
-
declare const AddButtonIcon: FC<Props>;
|
|
6
|
-
export default AddButtonIcon;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
onClick: () => any;
|
|
4
|
+
}
|
|
5
|
+
declare const AddButtonIcon: FC<Props>;
|
|
6
|
+
export default AddButtonIcon;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
defaultInfo?: any;
|
|
4
|
-
userLogin?: any;
|
|
5
|
-
toggle?: any;
|
|
6
|
-
}
|
|
7
|
-
declare const CloseButton: FC<Props>;
|
|
8
|
-
export default CloseButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
defaultInfo?: any;
|
|
4
|
+
userLogin?: any;
|
|
5
|
+
toggle?: any;
|
|
6
|
+
}
|
|
7
|
+
declare const CloseButton: FC<Props>;
|
|
8
|
+
export default CloseButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
onClick?: () => any;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
onClick?: () => any;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const DeleteButtonIcon: FC<Props>;
|
|
7
|
+
export default DeleteButtonIcon;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
confirmText: string;
|
|
4
|
-
onConfirm: () => any;
|
|
5
|
-
onCancel: () => any;
|
|
6
|
-
}
|
|
7
|
-
declare const DetailActionButtons: FC<Props>;
|
|
8
|
-
export default DetailActionButtons;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
confirmText: string;
|
|
4
|
+
onConfirm: () => any;
|
|
5
|
+
onCancel: () => any;
|
|
6
|
+
}
|
|
7
|
+
declare const DetailActionButtons: FC<Props>;
|
|
8
|
+
export default DetailActionButtons;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
onClick: () => any;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
onClick: () => any;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const EditButtonIcon: FC<Props>;
|
|
7
|
+
export default EditButtonIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
label: string;
|
|
4
|
-
onClick: () => any;
|
|
5
|
-
}
|
|
6
|
-
declare const LinkEditButton: FC<Props>;
|
|
7
|
-
export default LinkEditButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => any;
|
|
5
|
+
}
|
|
6
|
+
declare const LinkEditButton: FC<Props>;
|
|
7
|
+
export default LinkEditButton;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
link?: string;
|
|
4
|
-
text?: string;
|
|
5
|
-
toggle?: any;
|
|
6
|
-
}
|
|
7
|
-
declare const LoginNavButton: FC<Props>;
|
|
8
|
-
export default LoginNavButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
link?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
toggle?: any;
|
|
6
|
+
}
|
|
7
|
+
declare const LoginNavButton: FC<Props>;
|
|
8
|
+
export default LoginNavButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
textLeft: string;
|
|
4
|
-
textRight: string;
|
|
5
|
-
isLeft: boolean;
|
|
6
|
-
clickLeft: any;
|
|
7
|
-
clickRight: any;
|
|
8
|
-
}
|
|
9
|
-
declare const ToggleButton: FC<Props>;
|
|
10
|
-
export default ToggleButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
textLeft: string;
|
|
4
|
+
textRight: string;
|
|
5
|
+
isLeft: boolean;
|
|
6
|
+
clickLeft: any;
|
|
7
|
+
clickRight: any;
|
|
8
|
+
}
|
|
9
|
+
declare const ToggleButton: FC<Props>;
|
|
10
|
+
export default ToggleButton;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
fileName?: string;
|
|
4
|
-
maxWidth?: string;
|
|
5
|
-
maxHeight?: string;
|
|
6
|
-
setFile: any;
|
|
7
|
-
onAddImage?: any;
|
|
8
|
-
canDelete?: boolean;
|
|
9
|
-
onDelete?: () => void;
|
|
10
|
-
isCheckFeedBack?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const UploadFileButton: FC<Props>;
|
|
13
|
-
export default UploadFileButton;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
fileName?: string;
|
|
4
|
+
maxWidth?: string;
|
|
5
|
+
maxHeight?: string;
|
|
6
|
+
setFile: any;
|
|
7
|
+
onAddImage?: any;
|
|
8
|
+
canDelete?: boolean;
|
|
9
|
+
onDelete?: () => void;
|
|
10
|
+
isCheckFeedBack?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const UploadFileButton: FC<Props>;
|
|
13
|
+
export default UploadFileButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
header: string;
|
|
4
|
-
rootHeader?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const CommonHeader: FC<Props>;
|
|
7
|
-
export default CommonHeader;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
header: string;
|
|
4
|
+
rootHeader?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const CommonHeader: FC<Props>;
|
|
7
|
+
export default CommonHeader;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default UploadImage;
|
|
1
|
+
declare const UploadImage: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default UploadImage;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface Props {
|
|
3
|
-
icon:
|
|
4
|
-
accept?: string | undefined;
|
|
5
|
-
callback: (fileName: string, filePath: string, fileType: string) => void;
|
|
6
|
-
}
|
|
7
|
-
declare const InputFile:
|
|
8
|
-
export default InputFile;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
accept?: string | undefined;
|
|
5
|
+
callback: (fileName: string, filePath: string, fileType: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const InputFile: ({ icon, accept, callback }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default InputFile;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
isShowPassword: boolean;
|
|
4
|
-
togglePasswordVisible: any;
|
|
5
|
-
onChange: any;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
isShowPassword: boolean;
|
|
4
|
+
togglePasswordVisible: any;
|
|
5
|
+
onChange: any;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const PasswordInput: FC<Props>;
|
|
9
|
+
export default PasswordInput;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface Props {
|
|
3
|
-
initValue: string;
|
|
4
|
-
onSearch: (searchString?: string) => any;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: CSSProperties;
|
|
8
|
-
}
|
|
9
|
-
declare const _default:
|
|
10
|
-
export default _default;
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
initValue: string;
|
|
4
|
+
onSearch: (searchString?: string) => any;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("react").NamedExoticComponent<Props>;
|
|
10
|
+
export default _default;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default SearchBoxContainer;
|
|
1
|
+
interface Props {
|
|
2
|
+
text: string;
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
initValue: string;
|
|
5
|
+
onSearch: (searchString?: string) => void;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
}
|
|
8
|
+
declare const SearchBoxContainer: ({ text, initValue, onClick, onSearch, placeholder }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SearchBoxContainer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const _default:
|
|
6
|
-
export default _default;
|
|
1
|
+
interface Props {
|
|
2
|
+
text: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("react").NamedExoticComponent<Props>;
|
|
6
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
declare const Loading: FC;
|
|
3
|
-
export default Loading;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
declare const Loading: FC;
|
|
3
|
+
export default Loading;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export default _default;
|
|
1
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
2
|
+
export default _default;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default NotificationModal;
|
|
1
|
+
declare const NotificationModal: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default NotificationModal;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default CustomPagination;
|
|
1
|
+
declare const CustomPagination: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default CustomPagination;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default AcademicClassSelector;
|
|
1
|
+
declare const AcademicClassSelector: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default AcademicClassSelector;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default CreatableSelector;
|
|
1
|
+
declare const CreatableSelector: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default CreatableSelector;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default CustomSelector;
|
|
1
|
+
declare const CustomSelector: ({ defaultValue, options, isDisabled, scrollBottom, ...rest }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default CustomSelector;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default MailCategorySelector;
|
|
1
|
+
declare const MailCategorySelector: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default MailCategorySelector;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default QuestionCategorySelector;
|
|
1
|
+
declare const QuestionCategorySelector: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default QuestionCategorySelector;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default QuestionTypeSelector;
|
|
1
|
+
declare const QuestionTypeSelector: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default QuestionTypeSelector;
|