@mesob/auth-react 0.4.0 → 0.4.1
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/chunk-35TCGAW3.js +98 -0
- package/dist/chunk-35TCGAW3.js.map +1 -0
- package/dist/chunk-3BZC4VVD.js +36 -0
- package/dist/chunk-3BZC4VVD.js.map +1 -0
- package/dist/chunk-45UCLKH2.js +188 -0
- package/dist/chunk-45UCLKH2.js.map +1 -0
- package/dist/chunk-55BMNC4S.js +115 -0
- package/dist/chunk-55BMNC4S.js.map +1 -0
- package/dist/chunk-5F5FZMHE.js +94 -0
- package/dist/chunk-5F5FZMHE.js.map +1 -0
- package/dist/chunk-5M7I7WNH.js +31 -0
- package/dist/chunk-5M7I7WNH.js.map +1 -0
- package/dist/chunk-72YRO3A7.js +288 -0
- package/dist/chunk-72YRO3A7.js.map +1 -0
- package/dist/chunk-7KXTL6NT.js +48 -0
- package/dist/chunk-7KXTL6NT.js.map +1 -0
- package/dist/chunk-AIMD6R6U.js +466 -0
- package/dist/chunk-AIMD6R6U.js.map +1 -0
- package/dist/chunk-BGSHXIHI.js +953 -0
- package/dist/chunk-BGSHXIHI.js.map +1 -0
- package/dist/chunk-BZ42QPXE.js +271 -0
- package/dist/chunk-BZ42QPXE.js.map +1 -0
- package/dist/chunk-C26NPUPI.js +272 -0
- package/dist/chunk-C26NPUPI.js.map +1 -0
- package/dist/chunk-C2KFZ57H.js +194 -0
- package/dist/chunk-C2KFZ57H.js.map +1 -0
- package/dist/chunk-C5ZW7FD2.js +46 -0
- package/dist/chunk-C5ZW7FD2.js.map +1 -0
- package/dist/chunk-DPH2PHK3.js +32 -0
- package/dist/chunk-DPH2PHK3.js.map +1 -0
- package/dist/chunk-EQ4346FE.js +139 -0
- package/dist/chunk-EQ4346FE.js.map +1 -0
- package/dist/chunk-FAHN63DA.js +535 -0
- package/dist/chunk-FAHN63DA.js.map +1 -0
- package/dist/chunk-FBABIA5J.js +345 -0
- package/dist/chunk-FBABIA5J.js.map +1 -0
- package/dist/chunk-FFR5UHTS.js +99 -0
- package/dist/chunk-FFR5UHTS.js.map +1 -0
- package/dist/chunk-FHOLUOOZ.js +164 -0
- package/dist/chunk-FHOLUOOZ.js.map +1 -0
- package/dist/chunk-G2AW2H36.js +11 -0
- package/dist/chunk-G2AW2H36.js.map +1 -0
- package/dist/chunk-G7SCXCCM.js +89 -0
- package/dist/chunk-G7SCXCCM.js.map +1 -0
- package/dist/chunk-GP7GIUI3.js +64 -0
- package/dist/chunk-GP7GIUI3.js.map +1 -0
- package/dist/chunk-GRT6EBR6.js +93 -0
- package/dist/chunk-GRT6EBR6.js.map +1 -0
- package/dist/chunk-GXKBVCVS.js +102 -0
- package/dist/chunk-GXKBVCVS.js.map +1 -0
- package/dist/chunk-HOO2VLNM.js +305 -0
- package/dist/chunk-HOO2VLNM.js.map +1 -0
- package/dist/chunk-II5MLBSB.js +183 -0
- package/dist/chunk-II5MLBSB.js.map +1 -0
- package/dist/chunk-ISNNPMF7.js +95 -0
- package/dist/chunk-ISNNPMF7.js.map +1 -0
- package/dist/chunk-JB6XVST4.js +141 -0
- package/dist/chunk-JB6XVST4.js.map +1 -0
- package/dist/chunk-JUHBVG5Q.js +303 -0
- package/dist/chunk-JUHBVG5Q.js.map +1 -0
- package/dist/chunk-JZZJCBAE.js +118 -0
- package/dist/chunk-JZZJCBAE.js.map +1 -0
- package/dist/chunk-KWG4DSB5.js +55 -0
- package/dist/chunk-KWG4DSB5.js.map +1 -0
- package/dist/chunk-L4CGIO2I.js +265 -0
- package/dist/chunk-L4CGIO2I.js.map +1 -0
- package/dist/chunk-LNG736CV.js +19 -0
- package/dist/chunk-LNG736CV.js.map +1 -0
- package/dist/chunk-LSYKVFJA.js +98 -0
- package/dist/chunk-LSYKVFJA.js.map +1 -0
- package/dist/chunk-LZR4YUDV.js +107 -0
- package/dist/chunk-LZR4YUDV.js.map +1 -0
- package/dist/chunk-MELNS4QH.js +255 -0
- package/dist/chunk-MELNS4QH.js.map +1 -0
- package/dist/chunk-MS2JUZ3N.js +94 -0
- package/dist/chunk-MS2JUZ3N.js.map +1 -0
- package/dist/chunk-NEO72TMH.js +32 -0
- package/dist/chunk-NEO72TMH.js.map +1 -0
- package/dist/chunk-NJPNTAAT.js +68 -0
- package/dist/chunk-NJPNTAAT.js.map +1 -0
- package/dist/chunk-NPW7D2HZ.js +16 -0
- package/dist/chunk-NPW7D2HZ.js.map +1 -0
- package/dist/chunk-OAN4EXU4.js +310 -0
- package/dist/chunk-OAN4EXU4.js.map +1 -0
- package/dist/chunk-OFLSINVU.js +138 -0
- package/dist/chunk-OFLSINVU.js.map +1 -0
- package/dist/chunk-OHIIMUQC.js +286 -0
- package/dist/chunk-OHIIMUQC.js.map +1 -0
- package/dist/chunk-OQGJX37L.js +239 -0
- package/dist/chunk-OQGJX37L.js.map +1 -0
- package/dist/chunk-OYHH7HQG.js +65 -0
- package/dist/chunk-OYHH7HQG.js.map +1 -0
- package/dist/chunk-PSRIZMWJ.js +486 -0
- package/dist/chunk-PSRIZMWJ.js.map +1 -0
- package/dist/chunk-QNCE2B5O.js +23 -0
- package/dist/chunk-QNCE2B5O.js.map +1 -0
- package/dist/chunk-RLPZFLAS.js +23 -0
- package/dist/chunk-RLPZFLAS.js.map +1 -0
- package/dist/chunk-RT5C7IAE.js +38 -0
- package/dist/chunk-RT5C7IAE.js.map +1 -0
- package/dist/chunk-S3CXCCKL.js +272 -0
- package/dist/chunk-S3CXCCKL.js.map +1 -0
- package/dist/chunk-SOCZK4CV.js +69 -0
- package/dist/chunk-SOCZK4CV.js.map +1 -0
- package/dist/chunk-T6P7UHVP.js +34 -0
- package/dist/chunk-T6P7UHVP.js.map +1 -0
- package/dist/chunk-TFVBER3Y.js +52 -0
- package/dist/chunk-TFVBER3Y.js.map +1 -0
- package/dist/chunk-UXOZ2TME.js +104 -0
- package/dist/chunk-UXOZ2TME.js.map +1 -0
- package/dist/chunk-V2W3WPCZ.js +22 -0
- package/dist/chunk-V2W3WPCZ.js.map +1 -0
- package/dist/chunk-YZ264S2L.js +286 -0
- package/dist/chunk-YZ264S2L.js.map +1 -0
- package/dist/chunk-ZESFGO3K.js +28 -0
- package/dist/chunk-ZESFGO3K.js.map +1 -0
- package/dist/chunk-ZG6WFZHX.js +143 -0
- package/dist/chunk-ZG6WFZHX.js.map +1 -0
- package/dist/components/auth/auth-card.d.ts +3 -6
- package/dist/components/auth/auth-card.js +3 -7
- package/dist/components/auth/auth-card.js.map +1 -1
- package/dist/components/auth/auth-layout.d.ts +3 -6
- package/dist/components/auth/auth-layout.js +3 -28
- package/dist/components/auth/auth-layout.js.map +1 -1
- package/dist/components/auth/countdown.d.ts +2 -5
- package/dist/components/auth/countdown.js +5 -130
- package/dist/components/auth/countdown.js.map +1 -1
- package/dist/components/auth/forgot-password.d.ts +1 -5
- package/dist/components/auth/forgot-password.js +6 -365
- package/dist/components/auth/forgot-password.js.map +1 -1
- package/dist/components/auth/reset-password-form.d.ts +2 -5
- package/dist/components/auth/reset-password-form.js +6 -487
- package/dist/components/auth/reset-password-form.js.map +1 -1
- package/dist/components/auth/set-password.d.ts +2 -5
- package/dist/components/auth/set-password.js +7 -521
- package/dist/components/auth/set-password.js.map +1 -1
- package/dist/components/auth/sign-in.d.ts +2 -5
- package/dist/components/auth/sign-in.js +7 -561
- package/dist/components/auth/sign-in.js.map +1 -1
- package/dist/components/auth/sign-up.d.ts +2 -5
- package/dist/components/auth/sign-up.js +6 -511
- package/dist/components/auth/sign-up.js.map +1 -1
- package/dist/components/auth/verification-form.d.ts +13 -2
- package/dist/components/auth/verification-form.js +5 -217
- package/dist/components/auth/verification-form.js.map +1 -1
- package/dist/components/auth/verify-email.d.ts +2 -5
- package/dist/components/auth/verify-email.js +8 -527
- package/dist/components/auth/verify-email.js.map +1 -1
- package/dist/components/auth/verify-phone.d.ts +2 -5
- package/dist/components/auth/verify-phone.js +8 -532
- package/dist/components/auth/verify-phone.js.map +1 -1
- package/dist/components/authorization/deny.d.ts +3 -6
- package/dist/components/authorization/deny.js +4 -47
- package/dist/components/authorization/deny.js.map +1 -1
- package/dist/components/authorization/grant.d.ts +3 -6
- package/dist/components/authorization/grant.js +4 -52
- package/dist/components/authorization/grant.js.map +1 -1
- package/dist/components/error-boundary.d.ts +6 -10
- package/dist/components/error-boundary.js +4 -43
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/iam/permission-selector.d.ts +3 -6
- package/dist/components/iam/permission-selector.js +3 -116
- package/dist/components/iam/permission-selector.js.map +1 -1
- package/dist/components/iam/permissions-page.d.ts +1 -0
- package/dist/components/iam/permissions-page.js +10 -0
- package/dist/components/iam/permissions-page.js.map +1 -0
- package/dist/components/iam/permissions.d.ts +1 -5
- package/dist/components/iam/permissions.js +5 -198
- package/dist/components/iam/permissions.js.map +1 -1
- package/dist/components/iam/role-detail-layout.d.ts +3 -6
- package/dist/components/iam/role-detail-layout.js +3 -131
- package/dist/components/iam/role-detail-layout.js.map +1 -1
- package/dist/components/iam/role-detail-page.d.ts +2 -5
- package/dist/components/iam/role-detail-page.js +3 -223
- package/dist/components/iam/role-detail-page.js.map +1 -1
- package/dist/components/iam/role-permissions-page.d.ts +2 -5
- package/dist/components/iam/role-permissions-page.js +4 -391
- package/dist/components/iam/role-permissions-page.js.map +1 -1
- package/dist/components/iam/roles-page.d.ts +1 -0
- package/dist/components/iam/roles-page.js +13 -0
- package/dist/components/iam/roles-page.js.map +1 -0
- package/dist/components/iam/roles.d.ts +1 -5
- package/dist/components/iam/roles.js +5 -218
- package/dist/components/iam/roles.js.map +1 -1
- package/dist/components/iam/sessions-page.d.ts +1 -0
- package/dist/components/iam/sessions-page.js +12 -0
- package/dist/components/iam/sessions-page.js.map +1 -0
- package/dist/components/iam/sessions.d.ts +1 -5
- package/dist/components/iam/sessions.js +5 -198
- package/dist/components/iam/sessions.js.map +1 -1
- package/dist/components/iam/tenants-page.d.ts +1 -0
- package/dist/components/iam/tenants-page.js +13 -0
- package/dist/components/iam/tenants-page.js.map +1 -0
- package/dist/components/iam/tenants.d.ts +1 -5
- package/dist/components/iam/tenants.js +5 -204
- package/dist/components/iam/tenants.js.map +1 -1
- package/dist/components/iam/users-page.d.ts +1 -0
- package/dist/components/iam/users-page.js +13 -0
- package/dist/components/iam/users-page.js.map +1 -0
- package/dist/components/iam/users.d.ts +1 -5
- package/dist/components/iam/users.js +5 -207
- package/dist/components/iam/users.js.map +1 -1
- package/dist/components/profile/account.d.ts +1 -5
- package/dist/components/profile/account.js +4 -151
- package/dist/components/profile/account.js.map +1 -1
- package/dist/components/profile/change-email-form.d.ts +1 -5
- package/dist/components/profile/change-email-form.js +9 -735
- package/dist/components/profile/change-email-form.js.map +1 -1
- package/dist/components/profile/change-password-form.d.ts +1 -5
- package/dist/components/profile/change-password-form.js +3 -262
- package/dist/components/profile/change-password-form.js.map +1 -1
- package/dist/components/profile/change-phone-form.d.ts +1 -5
- package/dist/components/profile/change-phone-form.js +10 -772
- package/dist/components/profile/change-phone-form.js.map +1 -1
- package/dist/components/profile/change-profile.d.ts +3 -7
- package/dist/components/profile/change-profile.js +2 -40
- package/dist/components/profile/change-profile.js.map +1 -1
- package/dist/components/profile/otp-verification-modal.d.ts +2 -5
- package/dist/components/profile/otp-verification-modal.js +6 -266
- package/dist/components/profile/otp-verification-modal.js.map +1 -1
- package/dist/components/profile/profile-layout.d.ts +4 -0
- package/dist/components/profile/profile-layout.js +10 -0
- package/dist/components/profile/profile-layout.js.map +1 -0
- package/dist/components/profile/request-change-email-form.d.ts +2 -5
- package/dist/components/profile/request-change-email-form.js +4 -285
- package/dist/components/profile/request-change-email-form.js.map +1 -1
- package/dist/components/profile/request-change-phone-form.d.ts +2 -5
- package/dist/components/profile/request-change-phone-form.js +5 -323
- package/dist/components/profile/request-change-phone-form.js.map +1 -1
- package/dist/components/profile/security.d.ts +1 -5
- package/dist/components/profile/security.js +15 -1508
- package/dist/components/profile/security.js.map +1 -1
- package/dist/components/profile/verify-change-email-form.d.ts +2 -5
- package/dist/components/profile/verify-change-email-form.js +7 -407
- package/dist/components/profile/verify-change-email-form.js.map +1 -1
- package/dist/components/profile/verify-change-phone-form.d.ts +2 -5
- package/dist/components/profile/verify-change-phone-form.js +7 -411
- package/dist/components/profile/verify-change-phone-form.js.map +1 -1
- package/dist/components/shared/data-table.d.ts +5 -8
- package/dist/components/shared/data-table.js +3 -79
- package/dist/components/shared/data-table.js.map +1 -1
- package/dist/components/skeletons/auth-form-skeleton.d.ts +1 -5
- package/dist/components/skeletons/auth-form-skeleton.js +3 -27
- package/dist/components/skeletons/auth-form-skeleton.js.map +1 -1
- package/dist/components/skeletons/profile-skeleton.d.ts +1 -5
- package/dist/components/skeletons/profile-skeleton.js +3 -28
- package/dist/components/skeletons/profile-skeleton.js.map +1 -1
- package/dist/components/skeletons/table-skeleton.d.ts +2 -5
- package/dist/components/skeletons/table-skeleton.js +3 -34
- package/dist/components/skeletons/table-skeleton.js.map +1 -1
- package/dist/constants/auth.error.codes.d.ts +5 -0
- package/dist/hooks/use-session-cookie-name.d.ts +1 -0
- package/dist/hooks/use-translator.d.ts +1 -0
- package/dist/index.d.ts +50 -92
- package/dist/index.js +147 -4936
- package/dist/index.js.map +1 -1
- package/dist/lib/query-options.d.ts +10 -0
- package/dist/lib/translations.d.ts +3 -0
- package/dist/pages/auth/forgot-password.d.ts +3 -7
- package/dist/pages/auth/forgot-password.js +8 -770
- package/dist/pages/auth/forgot-password.js.map +1 -1
- package/dist/pages/auth/layout.d.ts +3 -7
- package/dist/pages/auth/layout.js +13 -536
- package/dist/pages/auth/layout.js.map +1 -1
- package/dist/pages/auth/reset-password.d.ts +4 -7
- package/dist/pages/auth/reset-password.js +8 -888
- package/dist/pages/auth/reset-password.js.map +1 -1
- package/dist/pages/auth/set-password.d.ts +4 -7
- package/dist/pages/auth/set-password.js +9 -927
- package/dist/pages/auth/set-password.js.map +1 -1
- package/dist/pages/auth/sign-in.d.ts +4 -7
- package/dist/pages/auth/sign-in.js +9 -967
- package/dist/pages/auth/sign-in.js.map +1 -1
- package/dist/pages/auth/sign-up.d.ts +4 -7
- package/dist/pages/auth/sign-up.js +8 -915
- package/dist/pages/auth/sign-up.js.map +1 -1
- package/dist/pages/auth/verify-email.d.ts +4 -7
- package/dist/pages/auth/verify-email.js +10 -922
- package/dist/pages/auth/verify-email.js.map +1 -1
- package/dist/pages/auth/verify-phone.d.ts +4 -7
- package/dist/pages/auth/verify-phone.js +10 -927
- package/dist/pages/auth/verify-phone.js.map +1 -1
- package/dist/pages/iam/permissions/_components/permission-card.d.ts +6 -0
- package/dist/pages/iam/permissions/_components/permissions-data.d.ts +7 -0
- package/dist/pages/iam/permissions/_components/permissions-list.d.ts +14 -0
- package/dist/pages/iam/permissions.d.ts +1 -5
- package/dist/pages/iam/permissions.js +4 -302
- package/dist/pages/iam/permissions.js.map +1 -1
- package/dist/pages/iam/role-detail-layout.d.ts +3 -6
- package/dist/pages/iam/role-detail-layout.js +5 -132
- package/dist/pages/iam/role-detail-layout.js.map +1 -1
- package/dist/pages/iam/role-detail.d.ts +4 -7
- package/dist/pages/iam/role-detail.js +5 -224
- package/dist/pages/iam/role-detail.js.map +1 -1
- package/dist/pages/iam/role-permissions.d.ts +4 -7
- package/dist/pages/iam/role-permissions.js +6 -392
- package/dist/pages/iam/role-permissions.js.map +1 -1
- package/dist/pages/iam/role-users.d.ts +4 -7
- package/dist/pages/iam/role-users.js +9 -808
- package/dist/pages/iam/role-users.js.map +1 -1
- package/dist/pages/iam/roles/_components/role-card.d.ts +7 -0
- package/dist/pages/iam/roles/_components/role-form.d.ts +9 -0
- package/dist/pages/iam/roles/_components/role-selector.d.ts +11 -0
- package/dist/pages/iam/roles/_components/roles-data.d.ts +16 -0
- package/dist/pages/iam/roles/_components/roles-list.d.ts +15 -0
- package/dist/pages/iam/roles/users/_components/role-users-page.d.ts +5 -0
- package/dist/pages/iam/roles.d.ts +1 -5
- package/dist/pages/iam/roles.js +7 -678
- package/dist/pages/iam/roles.js.map +1 -1
- package/dist/pages/iam/sessions/_components/session-card.d.ts +6 -0
- package/dist/pages/iam/sessions/_components/sessions-data.d.ts +7 -0
- package/dist/pages/iam/sessions/_components/sessions-list.d.ts +14 -0
- package/dist/pages/iam/sessions.d.ts +1 -5
- package/dist/pages/iam/sessions.js +6 -309
- package/dist/pages/iam/sessions.js.map +1 -1
- package/dist/pages/iam/shared/navigation.d.ts +8 -0
- package/dist/pages/iam/shared/page-helpers.d.ts +12 -0
- package/dist/pages/iam/tenant-detail.d.ts +2 -5
- package/dist/pages/iam/tenant-detail.js +6 -174
- package/dist/pages/iam/tenant-detail.js.map +1 -1
- package/dist/pages/iam/tenants/_components/tenant-card.d.ts +6 -0
- package/dist/pages/iam/tenants/_components/tenant-form.d.ts +9 -0
- package/dist/pages/iam/tenants/_components/tenant-selector.d.ts +13 -0
- package/dist/pages/iam/tenants/_components/tenants-data.d.ts +12 -0
- package/dist/pages/iam/tenants/_components/tenants-list.d.ts +15 -0
- package/dist/pages/iam/tenants/tenant-detail-page-content.d.ts +5 -0
- package/dist/pages/iam/tenants.d.ts +1 -5
- package/dist/pages/iam/tenants.js +7 -604
- package/dist/pages/iam/tenants.js.map +1 -1
- package/dist/pages/iam/user-activity.d.ts +2 -5
- package/dist/pages/iam/user-activity.js +9 -838
- package/dist/pages/iam/user-activity.js.map +1 -1
- package/dist/pages/iam/user-detail-layout.d.ts +3 -6
- package/dist/pages/iam/user-detail-layout.js +5 -93
- package/dist/pages/iam/user-detail-layout.js.map +1 -1
- package/dist/pages/iam/user-detail.d.ts +2 -5
- package/dist/pages/iam/user-detail.js +5 -92
- package/dist/pages/iam/user-detail.js.map +1 -1
- package/dist/pages/iam/users/_components/bulk-invite-user-form.d.ts +6 -0
- package/dist/pages/iam/users/_components/invite-user-form.d.ts +6 -0
- package/dist/pages/iam/users/_components/invite-user-shared.d.ts +25 -0
- package/dist/pages/iam/users/_components/user-card.d.ts +6 -0
- package/dist/pages/iam/users/_components/user-detail-layout-content.d.ts +6 -0
- package/dist/pages/iam/users/_components/user-detail-page-content.d.ts +5 -0
- package/dist/pages/iam/users/_components/user-form.d.ts +9 -0
- package/dist/pages/iam/users/_components/user-selector.d.ts +12 -0
- package/dist/pages/iam/users/_components/users-data.d.ts +22 -0
- package/dist/pages/iam/users/_components/users-list.d.ts +15 -0
- package/dist/pages/iam/users/activity/_components/role-section.d.ts +3 -0
- package/dist/pages/iam/users/activity/user-activity-page-content.d.ts +5 -0
- package/dist/pages/iam/users.d.ts +1 -5
- package/dist/pages/iam/users.js +7 -1269
- package/dist/pages/iam/users.js.map +1 -1
- package/dist/pages/profile/_components/profile-sidebar.d.ts +1 -0
- package/dist/pages/profile/account.d.ts +1 -5
- package/dist/pages/profile/account.js +9 -158
- package/dist/pages/profile/account.js.map +1 -1
- package/dist/pages/profile/layout.d.ts +1 -8
- package/dist/pages/profile/layout.js +5 -128
- package/dist/pages/profile/layout.js.map +1 -1
- package/dist/pages/profile/security.d.ts +1 -5
- package/dist/pages/profile/security.js +20 -1515
- package/dist/pages/profile/security.js.map +1 -1
- package/dist/provider.d.ts +53 -0
- package/dist/{types-g9QcNRxT.d.ts → types.d.ts} +33 -12
- package/dist/utils/cookie.d.ts +2 -0
- package/dist/utils/custom-fetch.d.ts +2 -0
- package/dist/utils/handle-error.d.ts +7 -0
- package/dist/utils/normalize-phone.d.ts +1 -0
- package/package.json +4 -4
- package/dist/verification-form-ipSRTtQB.d.ts +0 -22
|
@@ -1,781 +1,19 @@
|
|
|
1
|
-
// src/components/auth/auth-card.tsx
|
|
2
|
-
import { Card } from "@mesob/ui/components";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
// src/components/auth/forgot-password.tsx
|
|
6
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
7
|
-
import {
|
|
8
|
-
Alert,
|
|
9
|
-
AlertDescription,
|
|
10
|
-
AlertTitle,
|
|
11
|
-
Button,
|
|
12
|
-
Form,
|
|
13
|
-
FormControl,
|
|
14
|
-
FormField,
|
|
15
|
-
FormItem,
|
|
16
|
-
FormLabel,
|
|
17
|
-
FormMessage,
|
|
18
|
-
Input
|
|
19
|
-
} from "@mesob/ui/components";
|
|
20
|
-
import { useMesob as useMesob2 } from "@mesob/ui/providers";
|
|
21
|
-
import { IconAlertCircle } from "@tabler/icons-react";
|
|
22
|
-
import { useEffect, useState as useState2 } from "react";
|
|
23
|
-
import { useForm } from "react-hook-form";
|
|
24
|
-
import { toast } from "sonner";
|
|
25
|
-
import { z } from "zod";
|
|
26
|
-
|
|
27
|
-
// src/hooks/use-translator.ts
|
|
28
|
-
import { useMesob } from "@mesob/ui/providers";
|
|
29
|
-
|
|
30
|
-
// src/lib/translations.ts
|
|
31
|
-
function createTranslator(messages, namespace) {
|
|
32
|
-
return (key, params) => {
|
|
33
|
-
const fullKey = namespace ? `${namespace}.${key}` : key;
|
|
34
|
-
const keys = fullKey.split(".");
|
|
35
|
-
let value = messages;
|
|
36
|
-
for (const k of keys) {
|
|
37
|
-
if (value && typeof value === "object" && value !== null) {
|
|
38
|
-
value = value[k];
|
|
39
|
-
} else {
|
|
40
|
-
return fullKey;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (typeof value !== "string") {
|
|
44
|
-
return fullKey;
|
|
45
|
-
}
|
|
46
|
-
if (params) {
|
|
47
|
-
return value.replace(
|
|
48
|
-
/\{(\w+)\}/g,
|
|
49
|
-
(_, param) => String(params[param] ?? `{${param}}`)
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
return value;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// src/provider.tsx
|
|
57
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
58
|
-
import { deepmerge } from "deepmerge-ts";
|
|
59
|
-
import createFetchClient from "openapi-fetch";
|
|
60
|
-
import createClient from "openapi-react-query";
|
|
61
|
-
import { createContext, useContext, useMemo, useState } from "react";
|
|
62
|
-
|
|
63
|
-
// src/utils/cookie.ts
|
|
64
|
-
var isProduction = typeof process !== "undefined" && process.env.NODE_ENV === "production";
|
|
65
|
-
|
|
66
|
-
// src/provider.tsx
|
|
67
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
68
|
-
var SessionContext = createContext(null);
|
|
69
|
-
var ApiContext = createContext(null);
|
|
70
|
-
var ConfigContext = createContext(null);
|
|
71
|
-
var queryClient = new QueryClient({
|
|
72
|
-
defaultOptions: {
|
|
73
|
-
queries: {
|
|
74
|
-
refetchOnWindowFocus: false
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
function useApi() {
|
|
79
|
-
const context = useContext(ApiContext);
|
|
80
|
-
if (!context) {
|
|
81
|
-
throw new Error("useApi must be used within MesobAuthProvider");
|
|
82
|
-
}
|
|
83
|
-
return context;
|
|
84
|
-
}
|
|
85
|
-
function useConfig() {
|
|
86
|
-
const context = useContext(ConfigContext);
|
|
87
|
-
if (!context) {
|
|
88
|
-
throw new Error("useConfig must be used within MesobAuthProvider");
|
|
89
|
-
}
|
|
90
|
-
return context;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// src/hooks/use-translator.ts
|
|
94
|
-
function useTranslator(namespace) {
|
|
95
|
-
const mesob = useMesob();
|
|
96
|
-
const { config } = useConfig();
|
|
97
|
-
if (mesob?.t) {
|
|
98
|
-
return (key, params) => {
|
|
99
|
-
const fullKey = namespace ? `${namespace}.${key}` : key;
|
|
100
|
-
return mesob.t?.(fullKey, params) ?? fullKey;
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
return createTranslator(config.messages || {}, namespace);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// src/constants/auth.error.codes.ts
|
|
107
|
-
var AUTH_ERROR_MAPPING = {
|
|
108
|
-
USER_NOT_FOUND: {
|
|
109
|
-
title: "Account Not Found",
|
|
110
|
-
description: "We could not find an account with that identifier. Please check your spelling or sign up."
|
|
111
|
-
},
|
|
112
|
-
INVALID_PASSWORD: {
|
|
113
|
-
title: "Invalid Password",
|
|
114
|
-
description: "The password you entered is incorrect. Please try again."
|
|
115
|
-
},
|
|
116
|
-
USER_EXISTS: {
|
|
117
|
-
title: "Account Already Exists",
|
|
118
|
-
description: "An account with this identifier already exists. Please sign in instead."
|
|
119
|
-
},
|
|
120
|
-
VERIFICATION_EXPIRED: {
|
|
121
|
-
title: "Verification Expired",
|
|
122
|
-
description: "The verification code or link has expired. Please request a new one."
|
|
123
|
-
},
|
|
124
|
-
VERIFICATION_MISMATCH: {
|
|
125
|
-
title: "Invalid Code",
|
|
126
|
-
description: "The verification code you entered is invalid. Please double-check and try again."
|
|
127
|
-
},
|
|
128
|
-
VERIFICATION_NOT_FOUND: {
|
|
129
|
-
title: "Verification Not Found",
|
|
130
|
-
description: "We could not find a pending verification request. Please restart the process."
|
|
131
|
-
},
|
|
132
|
-
TOO_MANY_ATTEMPTS: {
|
|
133
|
-
title: "Too Many Attempts",
|
|
134
|
-
description: "You have made too many requests recently. Please wait a moment before trying again."
|
|
135
|
-
},
|
|
136
|
-
REQUIRES_VERIFICATION: {
|
|
137
|
-
title: "Verification Required",
|
|
138
|
-
description: "You need to verify your account before you can continue. Please check your email or phone."
|
|
139
|
-
},
|
|
140
|
-
UNAUTHORIZED: {
|
|
141
|
-
title: "Unauthorized",
|
|
142
|
-
description: "You are not authorized to perform this action. Please sign in again."
|
|
143
|
-
},
|
|
144
|
-
ACCESS_DENIED: {
|
|
145
|
-
title: "Access Denied",
|
|
146
|
-
description: "You do not have permission to access this resource. Please contact support if you believe this is an error."
|
|
147
|
-
},
|
|
148
|
-
HAS_NO_PASSWORD: {
|
|
149
|
-
title: "No Password Set",
|
|
150
|
-
description: "Your account does not have a password yet. Continue to set a password before signing in."
|
|
151
|
-
},
|
|
152
|
-
PASSWORD_ALREADY_SET: {
|
|
153
|
-
title: "Password Already Set",
|
|
154
|
-
description: "This account already has a password. Use the normal sign-in form instead."
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
var validCodes = Object.keys(AUTH_ERROR_MAPPING);
|
|
158
|
-
|
|
159
|
-
// src/utils/handle-error.ts
|
|
160
|
-
function isAuthError(err) {
|
|
161
|
-
return typeof err === "object" && err !== null && "message" in err && typeof err.message === "string";
|
|
162
|
-
}
|
|
163
|
-
function extractErrorCode(err) {
|
|
164
|
-
if (err.code && validCodes.includes(err.code)) {
|
|
165
|
-
return err.code;
|
|
166
|
-
}
|
|
167
|
-
if (err.message) {
|
|
168
|
-
const messageUpper = err.message.toUpperCase().trim();
|
|
169
|
-
if (validCodes.includes(messageUpper)) {
|
|
170
|
-
return messageUpper;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return "";
|
|
174
|
-
}
|
|
175
|
-
function sanitizeErrorMessage(message) {
|
|
176
|
-
const lowerMessage = message.toLowerCase();
|
|
177
|
-
const isDatabaseError = lowerMessage.includes("failed query") || lowerMessage.includes("select") || lowerMessage.includes("insert") || lowerMessage.includes("update") || lowerMessage.includes("delete") || lowerMessage.includes("from") || lowerMessage.includes("where") || lowerMessage.includes("limit") || lowerMessage.includes("params:") || lowerMessage.includes("query") || message.includes('"iam".') || message.includes('"tenants"') || message.includes('"users"') || message.includes('"sessions"') || message.includes('"accounts"') || lowerMessage.includes("relation") || lowerMessage.includes("column") || lowerMessage.includes("syntax error") || lowerMessage.includes("database") || lowerMessage.includes("postgres") || lowerMessage.includes("sql");
|
|
178
|
-
if (isDatabaseError) {
|
|
179
|
-
return "An error occurred while processing your request";
|
|
180
|
-
}
|
|
181
|
-
return message;
|
|
182
|
-
}
|
|
183
|
-
function handleAuthError(err, setError, t) {
|
|
184
|
-
const errorCode = extractErrorCode(err);
|
|
185
|
-
if (errorCode && AUTH_ERROR_MAPPING[errorCode]) {
|
|
186
|
-
const mapping = AUTH_ERROR_MAPPING[errorCode];
|
|
187
|
-
setError({
|
|
188
|
-
title: mapping.title,
|
|
189
|
-
description: mapping.description
|
|
190
|
-
});
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
const sanitizedMessage = sanitizeErrorMessage(
|
|
194
|
-
err.message || t("errors.fallback")
|
|
195
|
-
);
|
|
196
|
-
setError({
|
|
197
|
-
title: t("errors.fallback"),
|
|
198
|
-
description: sanitizedMessage
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
function handleGenericError(err, setError, t) {
|
|
202
|
-
const rawMessage = err instanceof Error ? err.message : t("errors.fallback");
|
|
203
|
-
const sanitizedMessage = sanitizeErrorMessage(rawMessage);
|
|
204
|
-
setError({
|
|
205
|
-
title: "Error",
|
|
206
|
-
description: sanitizedMessage
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
var handleError = (err, setError, t) => {
|
|
210
|
-
if (isAuthError(err)) {
|
|
211
|
-
handleAuthError(err, setError, t);
|
|
212
|
-
} else {
|
|
213
|
-
handleGenericError(err, setError, t);
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
// src/components/auth/auth-layout.tsx
|
|
218
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
219
|
-
var AuthLayout = ({
|
|
220
|
-
title,
|
|
221
|
-
description,
|
|
222
|
-
children,
|
|
223
|
-
footer,
|
|
224
|
-
logoImage
|
|
225
|
-
}) => {
|
|
226
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
227
|
-
/* @__PURE__ */ jsx3("div", { className: "flex size-8 mb-6 w-full items-center justify-center rounded-md", children: /* @__PURE__ */ jsx3(
|
|
228
|
-
"img",
|
|
229
|
-
{
|
|
230
|
-
src: logoImage || "",
|
|
231
|
-
alt: title,
|
|
232
|
-
width: 42,
|
|
233
|
-
height: 42
|
|
234
|
-
}
|
|
235
|
-
) }),
|
|
236
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
237
|
-
/* @__PURE__ */ jsx3("h1", { className: "text-2xl font-bold tracking-tight", children: title }),
|
|
238
|
-
description && /* @__PURE__ */ jsx3("p", { className: "mt-2 text-sm text-muted-foreground", children: description })
|
|
239
|
-
] }),
|
|
240
|
-
children,
|
|
241
|
-
footer && /* @__PURE__ */ jsx3("div", { className: "mt-2 w-full", children: /* @__PURE__ */ jsx3("div", { className: "w-full text-center text-sm text-muted-foreground", children: footer }) })
|
|
242
|
-
] });
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
// src/components/auth/forgot-password.tsx
|
|
246
|
-
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
247
|
-
var forgotPasswordSchema = (t) => z.object({
|
|
248
|
-
account: z.string().min(1, t("errors.accountRequired"))
|
|
249
|
-
});
|
|
250
|
-
var ForgotPassword = () => {
|
|
251
|
-
const { hooks } = useApi();
|
|
252
|
-
const { config } = useConfig();
|
|
253
|
-
const mesob = useMesob2();
|
|
254
|
-
const t = useTranslator("Auth.forgotPassword");
|
|
255
|
-
const Link = mesob?.navigation?.Link;
|
|
256
|
-
const [isLoading, setIsLoading] = useState2(false);
|
|
257
|
-
const [error, setError] = useState2(null);
|
|
258
|
-
const forgotPasswordMutation = hooks.useMutation("post", "/password/forgot");
|
|
259
|
-
const signInLink = config.navigation?.links?.signIn || "/auth/sign-in";
|
|
260
|
-
const onNavigate = config.navigation?.onNavigate || ((path) => {
|
|
261
|
-
if (typeof window !== "undefined") {
|
|
262
|
-
window.location.href = path;
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
const logoImage = config.ui.logoImage;
|
|
266
|
-
const form = useForm({
|
|
267
|
-
resolver: zodResolver(forgotPasswordSchema(t)),
|
|
268
|
-
defaultValues: {
|
|
269
|
-
account: ""
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
useEffect(() => {
|
|
273
|
-
if (error) {
|
|
274
|
-
toast.error(error.title || "Error", {
|
|
275
|
-
description: error.description
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
}, [error]);
|
|
279
|
-
const handleSubmit = form.handleSubmit(async (values) => {
|
|
280
|
-
setIsLoading(true);
|
|
281
|
-
setError(null);
|
|
282
|
-
try {
|
|
283
|
-
const res = await forgotPasswordMutation.mutateAsync({
|
|
284
|
-
body: {
|
|
285
|
-
identifier: values.account
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
if ("verificationId" in res && res.verificationId) {
|
|
289
|
-
onNavigate(`/auth/reset-password?verificationId=${res.verificationId}`);
|
|
290
|
-
} else {
|
|
291
|
-
onNavigate(
|
|
292
|
-
`/auth/reset-password?identifier=${encodeURIComponent(values.account)}`
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
} catch (err) {
|
|
296
|
-
handleError(err, setError, t);
|
|
297
|
-
} finally {
|
|
298
|
-
setIsLoading(false);
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
let errorContent = null;
|
|
302
|
-
if (error) {
|
|
303
|
-
if (typeof error === "string") {
|
|
304
|
-
errorContent = { title: "Error", description: error };
|
|
305
|
-
} else {
|
|
306
|
-
errorContent = error;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return /* @__PURE__ */ jsxs2(
|
|
310
|
-
AuthLayout,
|
|
311
|
-
{
|
|
312
|
-
title: config.ui.name,
|
|
313
|
-
description: t("description"),
|
|
314
|
-
logoImage,
|
|
315
|
-
footer: Link ? /* @__PURE__ */ jsx4(Link, { href: signInLink, className: "text-primary hover:underline", children: t("footer.backToSignIn") }) : /* @__PURE__ */ jsx4(
|
|
316
|
-
"a",
|
|
317
|
-
{
|
|
318
|
-
href: signInLink,
|
|
319
|
-
onClick: (e) => {
|
|
320
|
-
e.preventDefault();
|
|
321
|
-
onNavigate(signInLink);
|
|
322
|
-
},
|
|
323
|
-
className: "text-primary hover:underline",
|
|
324
|
-
children: t("footer.backToSignIn")
|
|
325
|
-
}
|
|
326
|
-
),
|
|
327
|
-
children: [
|
|
328
|
-
/* @__PURE__ */ jsx4(Form, { ...form, children: /* @__PURE__ */ jsxs2(
|
|
329
|
-
"form",
|
|
330
|
-
{
|
|
331
|
-
id: "forgot-password-form",
|
|
332
|
-
onSubmit: handleSubmit,
|
|
333
|
-
className: "space-y-4",
|
|
334
|
-
children: [
|
|
335
|
-
/* @__PURE__ */ jsx4(
|
|
336
|
-
FormField,
|
|
337
|
-
{
|
|
338
|
-
control: form.control,
|
|
339
|
-
name: "account",
|
|
340
|
-
render: ({ field }) => /* @__PURE__ */ jsxs2(FormItem, { children: [
|
|
341
|
-
/* @__PURE__ */ jsx4(FormLabel, { children: t("form.accountLabel") }),
|
|
342
|
-
/* @__PURE__ */ jsx4(FormControl, { children: /* @__PURE__ */ jsx4(Input, { ...field, type: "text" }) }),
|
|
343
|
-
/* @__PURE__ */ jsx4(FormMessage, {})
|
|
344
|
-
] })
|
|
345
|
-
}
|
|
346
|
-
),
|
|
347
|
-
/* @__PURE__ */ jsx4(
|
|
348
|
-
Button,
|
|
349
|
-
{
|
|
350
|
-
type: "submit",
|
|
351
|
-
form: "forgot-password-form",
|
|
352
|
-
className: "w-full",
|
|
353
|
-
disabled: isLoading || forgotPasswordMutation.isPending,
|
|
354
|
-
loading: isLoading || forgotPasswordMutation.isPending,
|
|
355
|
-
children: isLoading || forgotPasswordMutation.isPending ? t("form.submitting") : t("form.submit")
|
|
356
|
-
}
|
|
357
|
-
)
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
) }),
|
|
361
|
-
errorContent && /* @__PURE__ */ jsxs2(Alert, { variant: "destructive", className: "mt-4", children: [
|
|
362
|
-
/* @__PURE__ */ jsx4(IconAlertCircle, { className: "h-4 w-4" }),
|
|
363
|
-
/* @__PURE__ */ jsx4(AlertTitle, { children: errorContent.title }),
|
|
364
|
-
/* @__PURE__ */ jsx4(AlertDescription, { children: errorContent.description })
|
|
365
|
-
] })
|
|
366
|
-
]
|
|
367
|
-
}
|
|
368
|
-
);
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
// src/components/auth/reset-password-form.tsx
|
|
372
|
-
import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
|
373
|
-
import {
|
|
374
|
-
Alert as Alert2,
|
|
375
|
-
AlertDescription as AlertDescription2,
|
|
376
|
-
AlertTitle as AlertTitle2,
|
|
377
|
-
Button as Button2,
|
|
378
|
-
Form as Form2,
|
|
379
|
-
FormControl as FormControl2,
|
|
380
|
-
FormField as FormField2,
|
|
381
|
-
FormItem as FormItem2,
|
|
382
|
-
FormLabel as FormLabel2,
|
|
383
|
-
FormMessage as FormMessage2,
|
|
384
|
-
Input as Input2,
|
|
385
|
-
InputOTP,
|
|
386
|
-
InputOTPGroup,
|
|
387
|
-
InputOTPSlot,
|
|
388
|
-
useFormField
|
|
389
|
-
} from "@mesob/ui/components";
|
|
390
|
-
import { useMesob as useMesob3 } from "@mesob/ui/providers";
|
|
391
|
-
import { IconAlertCircle as IconAlertCircle2, IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
392
|
-
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
393
|
-
import { useForm as useForm2 } from "react-hook-form";
|
|
394
|
-
import { toast as toast2 } from "sonner";
|
|
395
|
-
import { z as z2 } from "zod";
|
|
396
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
397
|
-
|
|
398
|
-
// src/components/auth/set-password.tsx
|
|
399
|
-
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
|
400
|
-
import {
|
|
401
|
-
Alert as Alert3,
|
|
402
|
-
AlertDescription as AlertDescription3,
|
|
403
|
-
AlertTitle as AlertTitle3,
|
|
404
|
-
Button as Button3,
|
|
405
|
-
Form as Form3,
|
|
406
|
-
FormControl as FormControl3,
|
|
407
|
-
FormField as FormField3,
|
|
408
|
-
FormItem as FormItem3,
|
|
409
|
-
FormLabel as FormLabel3,
|
|
410
|
-
FormMessage as FormMessage3,
|
|
411
|
-
Input as Input3,
|
|
412
|
-
useFormField as useFormField2
|
|
413
|
-
} from "@mesob/ui/components";
|
|
414
|
-
import { useMesob as useMesob4 } from "@mesob/ui/providers";
|
|
415
|
-
import { IconAlertCircle as IconAlertCircle3, IconEye as IconEye2, IconEyeOff as IconEyeOff2 } from "@tabler/icons-react";
|
|
416
|
-
import { useEffect as useEffect3, useEffectEvent, useState as useState4 } from "react";
|
|
417
|
-
import { useForm as useForm3 } from "react-hook-form";
|
|
418
|
-
import { toast as toast3 } from "sonner";
|
|
419
|
-
import { z as z3 } from "zod";
|
|
420
|
-
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
421
|
-
|
|
422
|
-
// src/components/auth/sign-in.tsx
|
|
423
|
-
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
424
|
-
import {
|
|
425
|
-
Alert as Alert4,
|
|
426
|
-
AlertDescription as AlertDescription4,
|
|
427
|
-
AlertTitle as AlertTitle4,
|
|
428
|
-
Button as Button4,
|
|
429
|
-
Form as Form4,
|
|
430
|
-
FormControl as FormControl4,
|
|
431
|
-
FormField as FormField4,
|
|
432
|
-
FormItem as FormItem4,
|
|
433
|
-
FormLabel as FormLabel4,
|
|
434
|
-
FormMessage as FormMessage4,
|
|
435
|
-
Input as Input4,
|
|
436
|
-
useFormField as useFormField3
|
|
437
|
-
} from "@mesob/ui/components";
|
|
438
|
-
import { useMesob as useMesob5 } from "@mesob/ui/providers";
|
|
439
|
-
import { IconAlertCircle as IconAlertCircle4, IconEye as IconEye3, IconEyeOff as IconEyeOff3 } from "@tabler/icons-react";
|
|
440
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
441
|
-
import { useForm as useForm4 } from "react-hook-form";
|
|
442
|
-
import { toast as toast4 } from "sonner";
|
|
443
|
-
import { z as z4 } from "zod";
|
|
444
|
-
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
445
|
-
|
|
446
|
-
// src/components/auth/sign-up.tsx
|
|
447
|
-
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
448
|
-
import {
|
|
449
|
-
Alert as Alert5,
|
|
450
|
-
AlertDescription as AlertDescription5,
|
|
451
|
-
AlertTitle as AlertTitle5,
|
|
452
|
-
Button as Button5,
|
|
453
|
-
Form as Form5,
|
|
454
|
-
FormControl as FormControl5,
|
|
455
|
-
FormField as FormField5,
|
|
456
|
-
FormItem as FormItem5,
|
|
457
|
-
FormLabel as FormLabel5,
|
|
458
|
-
FormMessage as FormMessage5,
|
|
459
|
-
Input as Input5,
|
|
460
|
-
useFormField as useFormField4
|
|
461
|
-
} from "@mesob/ui/components";
|
|
462
|
-
import { useMesob as useMesob6 } from "@mesob/ui/providers";
|
|
463
|
-
import { IconAlertCircle as IconAlertCircle5, IconEye as IconEye4, IconEyeOff as IconEyeOff4 } from "@tabler/icons-react";
|
|
464
|
-
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
465
|
-
import { useForm as useForm5 } from "react-hook-form";
|
|
466
|
-
import { toast as toast5 } from "sonner";
|
|
467
|
-
import { z as z5 } from "zod";
|
|
468
|
-
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
469
|
-
|
|
470
|
-
// src/components/auth/verification-form.tsx
|
|
471
|
-
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
472
|
-
import {
|
|
473
|
-
Button as Button6,
|
|
474
|
-
Form as Form6,
|
|
475
|
-
FormControl as FormControl6,
|
|
476
|
-
FormField as FormField6,
|
|
477
|
-
FormItem as FormItem6,
|
|
478
|
-
FormLabel as FormLabel6,
|
|
479
|
-
FormMessage as FormMessage6,
|
|
480
|
-
InputOTP as InputOTP2,
|
|
481
|
-
InputOTPGroup as InputOTPGroup2,
|
|
482
|
-
InputOTPSlot as InputOTPSlot2
|
|
483
|
-
} from "@mesob/ui/components";
|
|
484
|
-
import { useForm as useForm6 } from "react-hook-form";
|
|
485
|
-
import { z as z6 } from "zod";
|
|
486
|
-
|
|
487
|
-
// src/components/auth/countdown.tsx
|
|
488
|
-
import { Spinner } from "@mesob/ui/components";
|
|
489
|
-
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
490
|
-
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
491
|
-
|
|
492
|
-
// src/components/auth/verification-form.tsx
|
|
493
|
-
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
494
|
-
|
|
495
|
-
// src/components/auth/verify-email.tsx
|
|
496
|
-
import { Alert as Alert6, AlertDescription as AlertDescription6, AlertTitle as AlertTitle6 } from "@mesob/ui/components";
|
|
497
|
-
import { useMesob as useMesob7 } from "@mesob/ui/providers";
|
|
498
|
-
import { IconAlertCircle as IconAlertCircle6 } from "@tabler/icons-react";
|
|
499
|
-
import { useEffect as useEffect7, useState as useState8 } from "react";
|
|
500
|
-
import { toast as toast6 } from "sonner";
|
|
501
|
-
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
502
|
-
|
|
503
|
-
// src/components/auth/verify-phone.tsx
|
|
504
|
-
import { Alert as Alert7, AlertDescription as AlertDescription7, AlertTitle as AlertTitle7 } from "@mesob/ui/components";
|
|
505
|
-
import { useMesob as useMesob8 } from "@mesob/ui/providers";
|
|
506
|
-
import { IconAlertCircle as IconAlertCircle7 } from "@tabler/icons-react";
|
|
507
|
-
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
508
|
-
import { toast as toast7 } from "sonner";
|
|
509
|
-
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
510
|
-
|
|
511
|
-
// src/components/authorization/deny.tsx
|
|
512
|
-
import { deny as canDeny } from "@mesob/common";
|
|
513
|
-
import { Fragment as Fragment2, jsx as jsx13 } from "react/jsx-runtime";
|
|
514
|
-
|
|
515
|
-
// src/components/authorization/grant.tsx
|
|
516
|
-
import { grant as canGrant } from "@mesob/common";
|
|
517
|
-
import { Fragment as Fragment3, jsx as jsx14 } from "react/jsx-runtime";
|
|
518
|
-
|
|
519
|
-
// src/components/error-boundary.tsx
|
|
520
|
-
import { Button as Button7 } from "@mesob/ui/components";
|
|
521
|
-
import { Component } from "react";
|
|
522
|
-
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
523
|
-
|
|
524
|
-
// src/components/iam/permission-selector.tsx
|
|
525
|
-
import {
|
|
526
|
-
Badge,
|
|
527
|
-
EntitySelector,
|
|
528
|
-
useEntitySectionState
|
|
529
|
-
} from "@mesob/ui/components";
|
|
530
|
-
import { IconKey } from "@tabler/icons-react";
|
|
531
|
-
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
532
|
-
|
|
533
|
-
// src/components/iam/permissions.tsx
|
|
534
|
-
import { Badge as Badge2, Button as Button8 } from "@mesob/ui/components";
|
|
535
|
-
import { useState as useState10 } from "react";
|
|
536
|
-
|
|
537
|
-
// src/components/shared/data-table.tsx
|
|
538
|
-
import {
|
|
539
|
-
Table,
|
|
540
|
-
TableBody,
|
|
541
|
-
TableCell,
|
|
542
|
-
TableHead,
|
|
543
|
-
TableHeader,
|
|
544
|
-
TableRow
|
|
545
|
-
} from "@mesob/ui/components";
|
|
546
|
-
|
|
547
|
-
// src/components/skeletons/table-skeleton.tsx
|
|
548
|
-
import { Skeleton } from "@mesob/ui/components";
|
|
549
|
-
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
550
|
-
|
|
551
|
-
// src/components/shared/data-table.tsx
|
|
552
|
-
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
553
|
-
|
|
554
|
-
// src/components/iam/permissions.tsx
|
|
555
|
-
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
556
|
-
|
|
557
|
-
// src/components/iam/role-detail-layout.tsx
|
|
558
|
-
import {
|
|
559
|
-
EntityDetailHeader,
|
|
560
|
-
EntityEmptyState,
|
|
561
|
-
PageContainer,
|
|
562
|
-
useBreadcrumbs
|
|
563
|
-
} from "@mesob/ui/components";
|
|
564
|
-
import { IconShield } from "@tabler/icons-react";
|
|
565
|
-
import { useMemo as useMemo2 } from "react";
|
|
566
|
-
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
567
|
-
|
|
568
|
-
// src/components/iam/role-detail-page.tsx
|
|
569
|
-
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
570
|
-
import {
|
|
571
|
-
EntityFormActions,
|
|
572
|
-
Form as Form7,
|
|
573
|
-
FormControl as FormControl7,
|
|
574
|
-
FormField as FormField7,
|
|
575
|
-
FormItem as FormItem7,
|
|
576
|
-
FormLabel as FormLabel7,
|
|
577
|
-
FormMessage as FormMessage7,
|
|
578
|
-
Input as Input6,
|
|
579
|
-
LocaleInputText,
|
|
580
|
-
LocaleInputTextarea,
|
|
581
|
-
Section,
|
|
582
|
-
Skeleton as Skeleton2
|
|
583
|
-
} from "@mesob/ui/components";
|
|
584
|
-
import { useLocaleSchemas } from "@mesob/ui/providers";
|
|
585
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
586
|
-
import { useEffect as useEffect9, useMemo as useMemo3 } from "react";
|
|
587
|
-
import { useForm as useForm7 } from "react-hook-form";
|
|
588
|
-
import { toast as toast8 } from "sonner";
|
|
589
|
-
import { z as z7 } from "zod";
|
|
590
|
-
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
591
|
-
|
|
592
|
-
// src/components/iam/role-permissions-page.tsx
|
|
593
|
-
import {
|
|
594
|
-
Badge as Badge3,
|
|
595
|
-
Button as Button9,
|
|
596
|
-
DataTablePagination,
|
|
597
|
-
DeleteConfirmButton,
|
|
598
|
-
DisplayTable,
|
|
599
|
-
EntityEmptyState as EntityEmptyState2,
|
|
600
|
-
EntityFilter,
|
|
601
|
-
EntityHeader,
|
|
602
|
-
EntityLoadingState,
|
|
603
|
-
EntitySearch,
|
|
604
|
-
EntitySort,
|
|
605
|
-
EntityViewToggle,
|
|
606
|
-
PageBody,
|
|
607
|
-
Tbody,
|
|
608
|
-
Td,
|
|
609
|
-
Th,
|
|
610
|
-
Thead,
|
|
611
|
-
Tr,
|
|
612
|
-
useEntityPagination,
|
|
613
|
-
useEntityParams
|
|
614
|
-
} from "@mesob/ui/components";
|
|
615
|
-
import { IconKey as IconKey2, IconPlus, IconTrash } from "@tabler/icons-react";
|
|
616
|
-
import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
|
617
|
-
import { useMemo as useMemo4 } from "react";
|
|
618
|
-
import { toast as toast9 } from "sonner";
|
|
619
|
-
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
620
|
-
|
|
621
|
-
// src/components/iam/roles.tsx
|
|
622
|
-
import { Badge as Badge4, Button as Button10 } from "@mesob/ui/components";
|
|
623
|
-
import { useLocale } from "next-intl";
|
|
624
|
-
import { useState as useState11 } from "react";
|
|
625
|
-
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
626
|
-
|
|
627
|
-
// src/components/iam/sessions.tsx
|
|
628
|
-
import { Button as Button11 } from "@mesob/ui/components";
|
|
629
|
-
import { useState as useState12 } from "react";
|
|
630
|
-
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
631
|
-
|
|
632
|
-
// src/components/iam/tenants.tsx
|
|
633
|
-
import { Badge as Badge5, Button as Button12 } from "@mesob/ui/components";
|
|
634
|
-
import { useState as useState13 } from "react";
|
|
635
|
-
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
636
|
-
|
|
637
|
-
// src/components/iam/users.tsx
|
|
638
|
-
import { Badge as Badge6, Button as Button13 } from "@mesob/ui/components";
|
|
639
|
-
import { useState as useState14 } from "react";
|
|
640
|
-
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
641
|
-
|
|
642
|
-
// src/components/profile/account.tsx
|
|
643
|
-
import { Badge as Badge8, Card as Card2, CardContent, Separator } from "@mesob/ui/components";
|
|
644
|
-
|
|
645
|
-
// src/components/profile/change-profile.tsx
|
|
646
1
|
import {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
import { useState as useState15 } from "react";
|
|
654
|
-
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
655
|
-
|
|
656
|
-
// src/components/profile/account.tsx
|
|
657
|
-
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
658
|
-
|
|
659
|
-
// src/components/profile/security.tsx
|
|
660
|
-
import { Badge as Badge9, Card as Card3, CardContent as CardContent2, Separator as Separator2 } from "@mesob/ui/components";
|
|
661
|
-
|
|
662
|
-
// src/components/profile/change-email-form.tsx
|
|
663
|
-
import {
|
|
664
|
-
Button as Button16,
|
|
665
|
-
Collapsible,
|
|
666
|
-
CollapsibleContent,
|
|
667
|
-
CollapsibleTrigger
|
|
668
|
-
} from "@mesob/ui/components";
|
|
669
|
-
import { IconChevronDown } from "@tabler/icons-react";
|
|
670
|
-
import { useState as useState18 } from "react";
|
|
671
|
-
|
|
672
|
-
// src/components/profile/request-change-email-form.tsx
|
|
673
|
-
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
674
|
-
import { Button as Button15, Input as Input7, Label, Spinner as Spinner2 } from "@mesob/ui/components";
|
|
675
|
-
import { IconEye as IconEye5, IconEyeOff as IconEyeOff5 } from "@tabler/icons-react";
|
|
676
|
-
import { useEffect as useEffect10, useState as useState16 } from "react";
|
|
677
|
-
import { useForm as useForm8 } from "react-hook-form";
|
|
678
|
-
import { toast as toast10 } from "sonner";
|
|
679
|
-
import { z as z8 } from "zod";
|
|
680
|
-
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
681
|
-
var emailPasswordSchema = z8.object({
|
|
682
|
-
email: z8.string().email("Invalid email address"),
|
|
683
|
-
password: z8.string().min(8, "Password must be at least 8 characters").max(128, "Password too long")
|
|
684
|
-
});
|
|
685
|
-
|
|
686
|
-
// src/components/profile/verify-change-email-form.tsx
|
|
687
|
-
import { useState as useState17 } from "react";
|
|
688
|
-
import { toast as toast11 } from "sonner";
|
|
689
|
-
|
|
690
|
-
// src/components/profile/otp-verification-modal.tsx
|
|
691
|
-
import {
|
|
692
|
-
Dialog,
|
|
693
|
-
DialogContent,
|
|
694
|
-
DialogDescription,
|
|
695
|
-
DialogHeader,
|
|
696
|
-
DialogTitle
|
|
697
|
-
} from "@mesob/ui/components";
|
|
698
|
-
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
699
|
-
|
|
700
|
-
// src/components/profile/verify-change-email-form.tsx
|
|
701
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
702
|
-
|
|
703
|
-
// src/components/profile/change-email-form.tsx
|
|
704
|
-
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
705
|
-
|
|
706
|
-
// src/components/profile/change-password-form.tsx
|
|
707
|
-
import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
708
|
-
import {
|
|
709
|
-
Button as Button17,
|
|
710
|
-
Collapsible as Collapsible2,
|
|
711
|
-
CollapsibleContent as CollapsibleContent2,
|
|
712
|
-
CollapsibleTrigger as CollapsibleTrigger2,
|
|
713
|
-
Input as Input8,
|
|
714
|
-
Label as Label2,
|
|
715
|
-
Spinner as Spinner3
|
|
716
|
-
} from "@mesob/ui/components";
|
|
717
|
-
import { IconChevronDown as IconChevronDown2, IconEye as IconEye6, IconEyeOff as IconEyeOff6 } from "@tabler/icons-react";
|
|
718
|
-
import { useState as useState19 } from "react";
|
|
719
|
-
import { useForm as useForm9 } from "react-hook-form";
|
|
720
|
-
import { toast as toast12 } from "sonner";
|
|
721
|
-
import { z as z9 } from "zod";
|
|
722
|
-
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
723
|
-
var changePasswordSchema = z9.object({
|
|
724
|
-
currentPassword: z9.string().min(8, "Password must be at least 8 characters"),
|
|
725
|
-
newPassword: z9.string().min(8, "Password must be at least 8 characters"),
|
|
726
|
-
confirmPassword: z9.string().min(8, "Password must be at least 8 characters")
|
|
727
|
-
}).refine((data) => data.newPassword === data.confirmPassword, {
|
|
728
|
-
message: "Passwords don't match",
|
|
729
|
-
path: ["confirmPassword"]
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
// src/components/profile/change-phone-form.tsx
|
|
733
|
-
import {
|
|
734
|
-
Button as Button19,
|
|
735
|
-
Collapsible as Collapsible3,
|
|
736
|
-
CollapsibleContent as CollapsibleContent3,
|
|
737
|
-
CollapsibleTrigger as CollapsibleTrigger3
|
|
738
|
-
} from "@mesob/ui/components";
|
|
739
|
-
import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
740
|
-
import { useState as useState22 } from "react";
|
|
741
|
-
|
|
742
|
-
// src/components/profile/request-change-phone-form.tsx
|
|
743
|
-
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
744
|
-
import { Button as Button18, Input as Input9, Label as Label3, Spinner as Spinner4 } from "@mesob/ui/components";
|
|
745
|
-
import { IconEye as IconEye7, IconEyeOff as IconEyeOff7 } from "@tabler/icons-react";
|
|
746
|
-
import { useEffect as useEffect11, useState as useState20 } from "react";
|
|
747
|
-
import { useForm as useForm10 } from "react-hook-form";
|
|
748
|
-
import { toast as toast13 } from "sonner";
|
|
749
|
-
import { z as z10 } from "zod";
|
|
750
|
-
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
751
|
-
|
|
752
|
-
// src/components/profile/verify-change-phone-form.tsx
|
|
753
|
-
import { useState as useState21 } from "react";
|
|
754
|
-
import { toast as toast14 } from "sonner";
|
|
755
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
756
|
-
|
|
757
|
-
// src/components/profile/change-phone-form.tsx
|
|
758
|
-
import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
759
|
-
|
|
760
|
-
// src/components/profile/security.tsx
|
|
761
|
-
import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
762
|
-
|
|
763
|
-
// src/components/skeletons/auth-form-skeleton.tsx
|
|
764
|
-
import { Skeleton as Skeleton3 } from "@mesob/ui/components";
|
|
765
|
-
import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
766
|
-
|
|
767
|
-
// src/components/skeletons/profile-skeleton.tsx
|
|
768
|
-
import { Skeleton as Skeleton4 } from "@mesob/ui/components";
|
|
769
|
-
import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2
|
+
ForgotPassword
|
|
3
|
+
} from "../../chunk-FHOLUOOZ.js";
|
|
4
|
+
import "../../chunk-55BMNC4S.js";
|
|
5
|
+
import "../../chunk-DPH2PHK3.js";
|
|
6
|
+
import "../../chunk-QNCE2B5O.js";
|
|
7
|
+
import "../../chunk-72YRO3A7.js";
|
|
770
8
|
|
|
771
9
|
// src/pages/auth/forgot-password.tsx
|
|
772
|
-
import { jsx
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
773
11
|
var metadata = {
|
|
774
12
|
title: "Forgot password",
|
|
775
13
|
description: "Request a password reset link or code."
|
|
776
14
|
};
|
|
777
15
|
function ForgotPasswordPage() {
|
|
778
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(ForgotPassword, {});
|
|
779
17
|
}
|
|
780
18
|
export {
|
|
781
19
|
ForgotPasswordPage as default,
|