@mesob/auth-react 0.4.0 → 0.4.2

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.
Files changed (371) hide show
  1. package/dist/chunk-35TCGAW3.js +98 -0
  2. package/dist/chunk-35TCGAW3.js.map +1 -0
  3. package/dist/chunk-3BZC4VVD.js +36 -0
  4. package/dist/chunk-3BZC4VVD.js.map +1 -0
  5. package/dist/chunk-45UCLKH2.js +188 -0
  6. package/dist/chunk-45UCLKH2.js.map +1 -0
  7. package/dist/chunk-55BMNC4S.js +115 -0
  8. package/dist/chunk-55BMNC4S.js.map +1 -0
  9. package/dist/chunk-5F5FZMHE.js +94 -0
  10. package/dist/chunk-5F5FZMHE.js.map +1 -0
  11. package/dist/chunk-5M7I7WNH.js +31 -0
  12. package/dist/chunk-5M7I7WNH.js.map +1 -0
  13. package/dist/chunk-72YRO3A7.js +288 -0
  14. package/dist/chunk-72YRO3A7.js.map +1 -0
  15. package/dist/chunk-7KXTL6NT.js +48 -0
  16. package/dist/chunk-7KXTL6NT.js.map +1 -0
  17. package/dist/chunk-AIMD6R6U.js +466 -0
  18. package/dist/chunk-AIMD6R6U.js.map +1 -0
  19. package/dist/chunk-BGSHXIHI.js +953 -0
  20. package/dist/chunk-BGSHXIHI.js.map +1 -0
  21. package/dist/chunk-BZ42QPXE.js +271 -0
  22. package/dist/chunk-BZ42QPXE.js.map +1 -0
  23. package/dist/chunk-C26NPUPI.js +272 -0
  24. package/dist/chunk-C26NPUPI.js.map +1 -0
  25. package/dist/chunk-C2KFZ57H.js +194 -0
  26. package/dist/chunk-C2KFZ57H.js.map +1 -0
  27. package/dist/chunk-C5ZW7FD2.js +46 -0
  28. package/dist/chunk-C5ZW7FD2.js.map +1 -0
  29. package/dist/chunk-DPH2PHK3.js +32 -0
  30. package/dist/chunk-DPH2PHK3.js.map +1 -0
  31. package/dist/chunk-EQ4346FE.js +139 -0
  32. package/dist/chunk-EQ4346FE.js.map +1 -0
  33. package/dist/chunk-FAHN63DA.js +535 -0
  34. package/dist/chunk-FAHN63DA.js.map +1 -0
  35. package/dist/chunk-FFR5UHTS.js +99 -0
  36. package/dist/chunk-FFR5UHTS.js.map +1 -0
  37. package/dist/chunk-FHOLUOOZ.js +164 -0
  38. package/dist/chunk-FHOLUOOZ.js.map +1 -0
  39. package/dist/chunk-G2AW2H36.js +11 -0
  40. package/dist/chunk-G2AW2H36.js.map +1 -0
  41. package/dist/chunk-G7SCXCCM.js +89 -0
  42. package/dist/chunk-G7SCXCCM.js.map +1 -0
  43. package/dist/chunk-GP7GIUI3.js +64 -0
  44. package/dist/chunk-GP7GIUI3.js.map +1 -0
  45. package/dist/chunk-GRT6EBR6.js +93 -0
  46. package/dist/chunk-GRT6EBR6.js.map +1 -0
  47. package/dist/chunk-GXKBVCVS.js +102 -0
  48. package/dist/chunk-GXKBVCVS.js.map +1 -0
  49. package/dist/chunk-HB2RZTHS.js +338 -0
  50. package/dist/chunk-HB2RZTHS.js.map +1 -0
  51. package/dist/chunk-HOO2VLNM.js +305 -0
  52. package/dist/chunk-HOO2VLNM.js.map +1 -0
  53. package/dist/chunk-II5MLBSB.js +183 -0
  54. package/dist/chunk-II5MLBSB.js.map +1 -0
  55. package/dist/chunk-ISNNPMF7.js +95 -0
  56. package/dist/chunk-ISNNPMF7.js.map +1 -0
  57. package/dist/chunk-JB6XVST4.js +141 -0
  58. package/dist/chunk-JB6XVST4.js.map +1 -0
  59. package/dist/chunk-JUHBVG5Q.js +303 -0
  60. package/dist/chunk-JUHBVG5Q.js.map +1 -0
  61. package/dist/chunk-JZZJCBAE.js +118 -0
  62. package/dist/chunk-JZZJCBAE.js.map +1 -0
  63. package/dist/chunk-KWG4DSB5.js +55 -0
  64. package/dist/chunk-KWG4DSB5.js.map +1 -0
  65. package/dist/chunk-L4CGIO2I.js +265 -0
  66. package/dist/chunk-L4CGIO2I.js.map +1 -0
  67. package/dist/chunk-LNG736CV.js +19 -0
  68. package/dist/chunk-LNG736CV.js.map +1 -0
  69. package/dist/chunk-LSYKVFJA.js +98 -0
  70. package/dist/chunk-LSYKVFJA.js.map +1 -0
  71. package/dist/chunk-LZR4YUDV.js +107 -0
  72. package/dist/chunk-LZR4YUDV.js.map +1 -0
  73. package/dist/chunk-MELNS4QH.js +255 -0
  74. package/dist/chunk-MELNS4QH.js.map +1 -0
  75. package/dist/chunk-MS2JUZ3N.js +94 -0
  76. package/dist/chunk-MS2JUZ3N.js.map +1 -0
  77. package/dist/chunk-NEO72TMH.js +32 -0
  78. package/dist/chunk-NEO72TMH.js.map +1 -0
  79. package/dist/chunk-NJPNTAAT.js +68 -0
  80. package/dist/chunk-NJPNTAAT.js.map +1 -0
  81. package/dist/chunk-NPW7D2HZ.js +16 -0
  82. package/dist/chunk-NPW7D2HZ.js.map +1 -0
  83. package/dist/chunk-OAN4EXU4.js +310 -0
  84. package/dist/chunk-OAN4EXU4.js.map +1 -0
  85. package/dist/chunk-OFLSINVU.js +138 -0
  86. package/dist/chunk-OFLSINVU.js.map +1 -0
  87. package/dist/chunk-OHIIMUQC.js +286 -0
  88. package/dist/chunk-OHIIMUQC.js.map +1 -0
  89. package/dist/chunk-OQGJX37L.js +239 -0
  90. package/dist/chunk-OQGJX37L.js.map +1 -0
  91. package/dist/chunk-OYHH7HQG.js +65 -0
  92. package/dist/chunk-OYHH7HQG.js.map +1 -0
  93. package/dist/chunk-PSRIZMWJ.js +486 -0
  94. package/dist/chunk-PSRIZMWJ.js.map +1 -0
  95. package/dist/chunk-QNCE2B5O.js +23 -0
  96. package/dist/chunk-QNCE2B5O.js.map +1 -0
  97. package/dist/chunk-RLPZFLAS.js +23 -0
  98. package/dist/chunk-RLPZFLAS.js.map +1 -0
  99. package/dist/chunk-RT5C7IAE.js +38 -0
  100. package/dist/chunk-RT5C7IAE.js.map +1 -0
  101. package/dist/chunk-S3CXCCKL.js +272 -0
  102. package/dist/chunk-S3CXCCKL.js.map +1 -0
  103. package/dist/chunk-SOCZK4CV.js +69 -0
  104. package/dist/chunk-SOCZK4CV.js.map +1 -0
  105. package/dist/chunk-T6P7UHVP.js +34 -0
  106. package/dist/chunk-T6P7UHVP.js.map +1 -0
  107. package/dist/chunk-TFVBER3Y.js +52 -0
  108. package/dist/chunk-TFVBER3Y.js.map +1 -0
  109. package/dist/chunk-UXOZ2TME.js +104 -0
  110. package/dist/chunk-UXOZ2TME.js.map +1 -0
  111. package/dist/chunk-V2W3WPCZ.js +22 -0
  112. package/dist/chunk-V2W3WPCZ.js.map +1 -0
  113. package/dist/chunk-YZ264S2L.js +286 -0
  114. package/dist/chunk-YZ264S2L.js.map +1 -0
  115. package/dist/chunk-ZESFGO3K.js +28 -0
  116. package/dist/chunk-ZESFGO3K.js.map +1 -0
  117. package/dist/chunk-ZG6WFZHX.js +143 -0
  118. package/dist/chunk-ZG6WFZHX.js.map +1 -0
  119. package/dist/components/auth/auth-card.d.ts +3 -6
  120. package/dist/components/auth/auth-card.js +3 -7
  121. package/dist/components/auth/auth-card.js.map +1 -1
  122. package/dist/components/auth/auth-layout.d.ts +3 -6
  123. package/dist/components/auth/auth-layout.js +3 -28
  124. package/dist/components/auth/auth-layout.js.map +1 -1
  125. package/dist/components/auth/countdown.d.ts +2 -5
  126. package/dist/components/auth/countdown.js +5 -130
  127. package/dist/components/auth/countdown.js.map +1 -1
  128. package/dist/components/auth/forgot-password.d.ts +1 -5
  129. package/dist/components/auth/forgot-password.js +6 -365
  130. package/dist/components/auth/forgot-password.js.map +1 -1
  131. package/dist/components/auth/reset-password-form.d.ts +2 -5
  132. package/dist/components/auth/reset-password-form.js +6 -487
  133. package/dist/components/auth/reset-password-form.js.map +1 -1
  134. package/dist/components/auth/set-password.d.ts +2 -5
  135. package/dist/components/auth/set-password.js +7 -521
  136. package/dist/components/auth/set-password.js.map +1 -1
  137. package/dist/components/auth/sign-in.d.ts +2 -5
  138. package/dist/components/auth/sign-in.js +7 -561
  139. package/dist/components/auth/sign-in.js.map +1 -1
  140. package/dist/components/auth/sign-up.d.ts +2 -5
  141. package/dist/components/auth/sign-up.js +6 -511
  142. package/dist/components/auth/sign-up.js.map +1 -1
  143. package/dist/components/auth/verification-form.d.ts +13 -2
  144. package/dist/components/auth/verification-form.js +5 -217
  145. package/dist/components/auth/verification-form.js.map +1 -1
  146. package/dist/components/auth/verify-email.d.ts +2 -5
  147. package/dist/components/auth/verify-email.js +8 -527
  148. package/dist/components/auth/verify-email.js.map +1 -1
  149. package/dist/components/auth/verify-phone.d.ts +2 -5
  150. package/dist/components/auth/verify-phone.js +8 -532
  151. package/dist/components/auth/verify-phone.js.map +1 -1
  152. package/dist/components/authorization/deny.d.ts +3 -6
  153. package/dist/components/authorization/deny.js +4 -47
  154. package/dist/components/authorization/deny.js.map +1 -1
  155. package/dist/components/authorization/grant.d.ts +3 -6
  156. package/dist/components/authorization/grant.js +4 -52
  157. package/dist/components/authorization/grant.js.map +1 -1
  158. package/dist/components/error-boundary.d.ts +6 -10
  159. package/dist/components/error-boundary.js +4 -43
  160. package/dist/components/error-boundary.js.map +1 -1
  161. package/dist/components/iam/permission-selector.d.ts +3 -6
  162. package/dist/components/iam/permission-selector.js +3 -116
  163. package/dist/components/iam/permission-selector.js.map +1 -1
  164. package/dist/components/iam/permissions-page.d.ts +1 -0
  165. package/dist/components/iam/permissions-page.js +10 -0
  166. package/dist/components/iam/permissions-page.js.map +1 -0
  167. package/dist/components/iam/permissions.d.ts +1 -5
  168. package/dist/components/iam/permissions.js +5 -198
  169. package/dist/components/iam/permissions.js.map +1 -1
  170. package/dist/components/iam/role-detail-layout.d.ts +3 -6
  171. package/dist/components/iam/role-detail-layout.js +3 -131
  172. package/dist/components/iam/role-detail-layout.js.map +1 -1
  173. package/dist/components/iam/role-detail-page.d.ts +2 -5
  174. package/dist/components/iam/role-detail-page.js +3 -223
  175. package/dist/components/iam/role-detail-page.js.map +1 -1
  176. package/dist/components/iam/role-permissions-page.d.ts +2 -5
  177. package/dist/components/iam/role-permissions-page.js +4 -391
  178. package/dist/components/iam/role-permissions-page.js.map +1 -1
  179. package/dist/components/iam/roles-page.d.ts +1 -0
  180. package/dist/components/iam/roles-page.js +13 -0
  181. package/dist/components/iam/roles-page.js.map +1 -0
  182. package/dist/components/iam/roles.d.ts +1 -5
  183. package/dist/components/iam/roles.js +5 -218
  184. package/dist/components/iam/roles.js.map +1 -1
  185. package/dist/components/iam/sessions-page.d.ts +1 -0
  186. package/dist/components/iam/sessions-page.js +12 -0
  187. package/dist/components/iam/sessions-page.js.map +1 -0
  188. package/dist/components/iam/sessions.d.ts +1 -5
  189. package/dist/components/iam/sessions.js +5 -198
  190. package/dist/components/iam/sessions.js.map +1 -1
  191. package/dist/components/iam/tenants-page.d.ts +1 -0
  192. package/dist/components/iam/tenants-page.js +13 -0
  193. package/dist/components/iam/tenants-page.js.map +1 -0
  194. package/dist/components/iam/tenants.d.ts +1 -5
  195. package/dist/components/iam/tenants.js +5 -204
  196. package/dist/components/iam/tenants.js.map +1 -1
  197. package/dist/components/iam/users-page.d.ts +1 -0
  198. package/dist/components/iam/users-page.js +13 -0
  199. package/dist/components/iam/users-page.js.map +1 -0
  200. package/dist/components/iam/users.d.ts +1 -5
  201. package/dist/components/iam/users.js +5 -207
  202. package/dist/components/iam/users.js.map +1 -1
  203. package/dist/components/profile/account.d.ts +1 -5
  204. package/dist/components/profile/account.js +4 -151
  205. package/dist/components/profile/account.js.map +1 -1
  206. package/dist/components/profile/change-email-form.d.ts +1 -5
  207. package/dist/components/profile/change-email-form.js +9 -735
  208. package/dist/components/profile/change-email-form.js.map +1 -1
  209. package/dist/components/profile/change-password-form.d.ts +1 -5
  210. package/dist/components/profile/change-password-form.js +3 -262
  211. package/dist/components/profile/change-password-form.js.map +1 -1
  212. package/dist/components/profile/change-phone-form.d.ts +1 -5
  213. package/dist/components/profile/change-phone-form.js +10 -772
  214. package/dist/components/profile/change-phone-form.js.map +1 -1
  215. package/dist/components/profile/change-profile.d.ts +3 -7
  216. package/dist/components/profile/change-profile.js +2 -40
  217. package/dist/components/profile/change-profile.js.map +1 -1
  218. package/dist/components/profile/otp-verification-modal.d.ts +2 -5
  219. package/dist/components/profile/otp-verification-modal.js +6 -266
  220. package/dist/components/profile/otp-verification-modal.js.map +1 -1
  221. package/dist/components/profile/profile-layout.d.ts +4 -0
  222. package/dist/components/profile/profile-layout.js +10 -0
  223. package/dist/components/profile/profile-layout.js.map +1 -0
  224. package/dist/components/profile/request-change-email-form.d.ts +2 -5
  225. package/dist/components/profile/request-change-email-form.js +4 -285
  226. package/dist/components/profile/request-change-email-form.js.map +1 -1
  227. package/dist/components/profile/request-change-phone-form.d.ts +2 -5
  228. package/dist/components/profile/request-change-phone-form.js +5 -323
  229. package/dist/components/profile/request-change-phone-form.js.map +1 -1
  230. package/dist/components/profile/security.d.ts +1 -5
  231. package/dist/components/profile/security.js +15 -1508
  232. package/dist/components/profile/security.js.map +1 -1
  233. package/dist/components/profile/verify-change-email-form.d.ts +2 -5
  234. package/dist/components/profile/verify-change-email-form.js +7 -407
  235. package/dist/components/profile/verify-change-email-form.js.map +1 -1
  236. package/dist/components/profile/verify-change-phone-form.d.ts +2 -5
  237. package/dist/components/profile/verify-change-phone-form.js +7 -411
  238. package/dist/components/profile/verify-change-phone-form.js.map +1 -1
  239. package/dist/components/shared/data-table.d.ts +5 -8
  240. package/dist/components/shared/data-table.js +3 -79
  241. package/dist/components/shared/data-table.js.map +1 -1
  242. package/dist/components/skeletons/auth-form-skeleton.d.ts +1 -5
  243. package/dist/components/skeletons/auth-form-skeleton.js +3 -27
  244. package/dist/components/skeletons/auth-form-skeleton.js.map +1 -1
  245. package/dist/components/skeletons/profile-skeleton.d.ts +1 -5
  246. package/dist/components/skeletons/profile-skeleton.js +3 -28
  247. package/dist/components/skeletons/profile-skeleton.js.map +1 -1
  248. package/dist/components/skeletons/table-skeleton.d.ts +2 -5
  249. package/dist/components/skeletons/table-skeleton.js +3 -34
  250. package/dist/components/skeletons/table-skeleton.js.map +1 -1
  251. package/dist/constants/auth.error.codes.d.ts +5 -0
  252. package/dist/hooks/use-session-cookie-name.d.ts +1 -0
  253. package/dist/hooks/use-translator.d.ts +1 -0
  254. package/dist/index.d.ts +50 -92
  255. package/dist/index.js +147 -4936
  256. package/dist/index.js.map +1 -1
  257. package/dist/lib/query-options.d.ts +10 -0
  258. package/dist/lib/translations.d.ts +3 -0
  259. package/dist/pages/auth/forgot-password.d.ts +3 -7
  260. package/dist/pages/auth/forgot-password.js +8 -770
  261. package/dist/pages/auth/forgot-password.js.map +1 -1
  262. package/dist/pages/auth/layout.d.ts +3 -7
  263. package/dist/pages/auth/layout.js +13 -536
  264. package/dist/pages/auth/layout.js.map +1 -1
  265. package/dist/pages/auth/reset-password.d.ts +4 -7
  266. package/dist/pages/auth/reset-password.js +8 -888
  267. package/dist/pages/auth/reset-password.js.map +1 -1
  268. package/dist/pages/auth/set-password.d.ts +4 -7
  269. package/dist/pages/auth/set-password.js +9 -927
  270. package/dist/pages/auth/set-password.js.map +1 -1
  271. package/dist/pages/auth/sign-in.d.ts +4 -7
  272. package/dist/pages/auth/sign-in.js +9 -967
  273. package/dist/pages/auth/sign-in.js.map +1 -1
  274. package/dist/pages/auth/sign-up.d.ts +4 -7
  275. package/dist/pages/auth/sign-up.js +8 -915
  276. package/dist/pages/auth/sign-up.js.map +1 -1
  277. package/dist/pages/auth/verify-email.d.ts +4 -7
  278. package/dist/pages/auth/verify-email.js +10 -922
  279. package/dist/pages/auth/verify-email.js.map +1 -1
  280. package/dist/pages/auth/verify-phone.d.ts +4 -7
  281. package/dist/pages/auth/verify-phone.js +10 -927
  282. package/dist/pages/auth/verify-phone.js.map +1 -1
  283. package/dist/pages/iam/permissions/_components/permission-card.d.ts +6 -0
  284. package/dist/pages/iam/permissions/_components/permissions-data.d.ts +7 -0
  285. package/dist/pages/iam/permissions/_components/permissions-list.d.ts +14 -0
  286. package/dist/pages/iam/permissions.d.ts +1 -5
  287. package/dist/pages/iam/permissions.js +4 -302
  288. package/dist/pages/iam/permissions.js.map +1 -1
  289. package/dist/pages/iam/role-detail-layout.d.ts +3 -6
  290. package/dist/pages/iam/role-detail-layout.js +5 -132
  291. package/dist/pages/iam/role-detail-layout.js.map +1 -1
  292. package/dist/pages/iam/role-detail.d.ts +4 -7
  293. package/dist/pages/iam/role-detail.js +5 -224
  294. package/dist/pages/iam/role-detail.js.map +1 -1
  295. package/dist/pages/iam/role-permissions.d.ts +4 -7
  296. package/dist/pages/iam/role-permissions.js +6 -392
  297. package/dist/pages/iam/role-permissions.js.map +1 -1
  298. package/dist/pages/iam/role-users.d.ts +4 -7
  299. package/dist/pages/iam/role-users.js +9 -808
  300. package/dist/pages/iam/role-users.js.map +1 -1
  301. package/dist/pages/iam/roles/_components/role-card.d.ts +7 -0
  302. package/dist/pages/iam/roles/_components/role-form.d.ts +9 -0
  303. package/dist/pages/iam/roles/_components/role-selector.d.ts +11 -0
  304. package/dist/pages/iam/roles/_components/roles-data.d.ts +16 -0
  305. package/dist/pages/iam/roles/_components/roles-list.d.ts +15 -0
  306. package/dist/pages/iam/roles/users/_components/role-users-page.d.ts +5 -0
  307. package/dist/pages/iam/roles.d.ts +1 -5
  308. package/dist/pages/iam/roles.js +7 -678
  309. package/dist/pages/iam/roles.js.map +1 -1
  310. package/dist/pages/iam/sessions/_components/session-card.d.ts +6 -0
  311. package/dist/pages/iam/sessions/_components/sessions-data.d.ts +7 -0
  312. package/dist/pages/iam/sessions/_components/sessions-list.d.ts +14 -0
  313. package/dist/pages/iam/sessions.d.ts +1 -5
  314. package/dist/pages/iam/sessions.js +6 -309
  315. package/dist/pages/iam/sessions.js.map +1 -1
  316. package/dist/pages/iam/shared/navigation.d.ts +8 -0
  317. package/dist/pages/iam/shared/page-helpers.d.ts +12 -0
  318. package/dist/pages/iam/tenant-detail.d.ts +2 -5
  319. package/dist/pages/iam/tenant-detail.js +6 -174
  320. package/dist/pages/iam/tenant-detail.js.map +1 -1
  321. package/dist/pages/iam/tenants/_components/tenant-card.d.ts +6 -0
  322. package/dist/pages/iam/tenants/_components/tenant-form.d.ts +9 -0
  323. package/dist/pages/iam/tenants/_components/tenant-selector.d.ts +13 -0
  324. package/dist/pages/iam/tenants/_components/tenants-data.d.ts +12 -0
  325. package/dist/pages/iam/tenants/_components/tenants-list.d.ts +15 -0
  326. package/dist/pages/iam/tenants/tenant-detail-page-content.d.ts +5 -0
  327. package/dist/pages/iam/tenants.d.ts +1 -5
  328. package/dist/pages/iam/tenants.js +7 -604
  329. package/dist/pages/iam/tenants.js.map +1 -1
  330. package/dist/pages/iam/user-activity.d.ts +2 -5
  331. package/dist/pages/iam/user-activity.js +9 -838
  332. package/dist/pages/iam/user-activity.js.map +1 -1
  333. package/dist/pages/iam/user-detail-layout.d.ts +3 -6
  334. package/dist/pages/iam/user-detail-layout.js +5 -93
  335. package/dist/pages/iam/user-detail-layout.js.map +1 -1
  336. package/dist/pages/iam/user-detail.d.ts +2 -5
  337. package/dist/pages/iam/user-detail.js +5 -92
  338. package/dist/pages/iam/user-detail.js.map +1 -1
  339. package/dist/pages/iam/users/_components/bulk-invite-user-form.d.ts +6 -0
  340. package/dist/pages/iam/users/_components/invite-user-form.d.ts +6 -0
  341. package/dist/pages/iam/users/_components/invite-user-shared.d.ts +25 -0
  342. package/dist/pages/iam/users/_components/user-card.d.ts +6 -0
  343. package/dist/pages/iam/users/_components/user-detail-layout-content.d.ts +6 -0
  344. package/dist/pages/iam/users/_components/user-detail-page-content.d.ts +5 -0
  345. package/dist/pages/iam/users/_components/user-form.d.ts +9 -0
  346. package/dist/pages/iam/users/_components/user-selector.d.ts +12 -0
  347. package/dist/pages/iam/users/_components/users-data.d.ts +22 -0
  348. package/dist/pages/iam/users/_components/users-list.d.ts +15 -0
  349. package/dist/pages/iam/users/activity/_components/role-section.d.ts +3 -0
  350. package/dist/pages/iam/users/activity/user-activity-page-content.d.ts +5 -0
  351. package/dist/pages/iam/users.d.ts +1 -5
  352. package/dist/pages/iam/users.js +7 -1269
  353. package/dist/pages/iam/users.js.map +1 -1
  354. package/dist/pages/profile/_components/profile-sidebar.d.ts +1 -0
  355. package/dist/pages/profile/account.d.ts +1 -5
  356. package/dist/pages/profile/account.js +9 -158
  357. package/dist/pages/profile/account.js.map +1 -1
  358. package/dist/pages/profile/layout.d.ts +1 -8
  359. package/dist/pages/profile/layout.js +5 -128
  360. package/dist/pages/profile/layout.js.map +1 -1
  361. package/dist/pages/profile/security.d.ts +1 -5
  362. package/dist/pages/profile/security.js +20 -1515
  363. package/dist/pages/profile/security.js.map +1 -1
  364. package/dist/provider.d.ts +53 -0
  365. package/dist/{types-g9QcNRxT.d.ts → types.d.ts} +33 -12
  366. package/dist/utils/cookie.d.ts +2 -0
  367. package/dist/utils/custom-fetch.d.ts +2 -0
  368. package/dist/utils/handle-error.d.ts +7 -0
  369. package/dist/utils/normalize-phone.d.ts +1 -0
  370. package/package.json +4 -4
  371. package/dist/verification-form-ipSRTtQB.d.ts +0 -22
@@ -1,932 +1,14 @@
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
-
248
- // src/components/auth/reset-password-form.tsx
249
- import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
250
- import {
251
- Alert as Alert2,
252
- AlertDescription as AlertDescription2,
253
- AlertTitle as AlertTitle2,
254
- Button as Button2,
255
- Form as Form2,
256
- FormControl as FormControl2,
257
- FormField as FormField2,
258
- FormItem as FormItem2,
259
- FormLabel as FormLabel2,
260
- FormMessage as FormMessage2,
261
- Input as Input2,
262
- InputOTP,
263
- InputOTPGroup,
264
- InputOTPSlot,
265
- useFormField
266
- } from "@mesob/ui/components";
267
- import { useMesob as useMesob3 } from "@mesob/ui/providers";
268
- import { IconAlertCircle as IconAlertCircle2, IconEye, IconEyeOff } from "@tabler/icons-react";
269
- import { useEffect as useEffect2, useState as useState3 } from "react";
270
- import { useForm as useForm2 } from "react-hook-form";
271
- import { toast as toast2 } from "sonner";
272
- import { z as z2 } from "zod";
273
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
274
-
275
- // src/components/auth/set-password.tsx
276
- import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
277
- import {
278
- Alert as Alert3,
279
- AlertDescription as AlertDescription3,
280
- AlertTitle as AlertTitle3,
281
- Button as Button3,
282
- Form as Form3,
283
- FormControl as FormControl3,
284
- FormField as FormField3,
285
- FormItem as FormItem3,
286
- FormLabel as FormLabel3,
287
- FormMessage as FormMessage3,
288
- Input as Input3,
289
- useFormField as useFormField2
290
- } from "@mesob/ui/components";
291
- import { useMesob as useMesob4 } from "@mesob/ui/providers";
292
- import { IconAlertCircle as IconAlertCircle3, IconEye as IconEye2, IconEyeOff as IconEyeOff2 } from "@tabler/icons-react";
293
- import { useEffect as useEffect3, useEffectEvent, useState as useState4 } from "react";
294
- import { useForm as useForm3 } from "react-hook-form";
295
- import { toast as toast3 } from "sonner";
296
- import { z as z3 } from "zod";
297
-
298
- // src/utils/normalize-phone.ts
299
- function normalizePhone(phone) {
300
- const cleaned = phone.trim().replace(/\s/g, "");
301
- if (cleaned.startsWith("+2519") || cleaned.startsWith("+2517")) {
302
- return cleaned;
303
- }
304
- if (cleaned.startsWith("2519") || cleaned.startsWith("2517")) {
305
- return `+${cleaned}`;
306
- }
307
- if (cleaned.startsWith("09") || cleaned.startsWith("07")) {
308
- return `+251${cleaned.slice(1)}`;
309
- }
310
- if ((cleaned.startsWith("9") || cleaned.startsWith("7")) && cleaned.length === 9) {
311
- return `+251${cleaned}`;
312
- }
313
- return cleaned;
314
- }
315
-
316
- // src/components/auth/set-password.tsx
317
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
318
- function PasswordInput({ field, show, onToggle }) {
319
- const { formItemId, error } = useFormField2();
320
- return /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
321
- /* @__PURE__ */ jsx6(
322
- Input3,
323
- {
324
- ...field,
325
- id: formItemId,
326
- type: show ? "text" : "password",
327
- "aria-invalid": !!error,
328
- className: "pr-10"
329
- }
330
- ),
331
- /* @__PURE__ */ jsx6(
332
- Button3,
333
- {
334
- type: "button",
335
- variant: "ghost",
336
- size: "icon",
337
- className: "absolute right-0 top-0 h-full px-3 text-muted-foreground hover:text-foreground",
338
- onClick: onToggle,
339
- "aria-label": show ? "Hide password" : "Show password",
340
- children: show ? /* @__PURE__ */ jsx6(IconEyeOff2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx6(IconEye2, { className: "h-4 w-4" })
341
- }
342
- )
343
- ] });
344
- }
345
- var setPasswordSchema = (t) => z3.object({
346
- password: z3.string().min(8, t("errors.passwordLength")).max(128, t("errors.longPasswordError")),
347
- confirmPassword: z3.string()
348
- }).refine((data) => data.password === data.confirmPassword, {
349
- message: t("errors.passwordsMismatch"),
350
- path: ["confirmPassword"]
351
- });
352
- var getPhoneRegex = (phoneRegex) => {
353
- if (typeof phoneRegex === "string") {
354
- return new RegExp(phoneRegex);
355
- }
356
- return phoneRegex || /^(\+2519|\+2517|2519|2517|09|07)\d{8}$/;
357
- };
358
- var normalizeIdentifier = (identifier, phoneRegex) => {
359
- const resolvedPhoneRegex = getPhoneRegex(phoneRegex);
360
- return resolvedPhoneRegex.test(identifier) ? normalizePhone(identifier) : identifier;
361
- };
362
- var SetPassword = function SetPassword2({
363
- identifier,
364
- redirectUrl
365
- } = {}) {
366
- const { hooks, setAuth } = useApi();
367
- const { config } = useConfig();
368
- const mesob = useMesob4();
369
- const t = useTranslator("Auth.setPassword");
370
- const Link = mesob?.navigation?.Link;
371
- const [error, setError] = useState4(null);
372
- const [isLoading, setIsLoading] = useState4(false);
373
- const [isChecking, setIsChecking] = useState4(true);
374
- const [showPassword, setShowPassword] = useState4(false);
375
- const [showConfirmPassword, setShowConfirmPassword] = useState4(false);
376
- const [account, setAccount] = useState4(null);
377
- const checkAccountMutation = hooks.useMutation("post", "/check-account");
378
- const setPasswordMutation = hooks.useMutation("post", "/password/set");
379
- const onNavigate = config.navigation?.onNavigate || ((path) => {
380
- if (typeof window !== "undefined") {
381
- window.location.href = path;
382
- }
383
- });
384
- const signInLink = config.navigation?.links?.signIn || "/auth/sign-in";
385
- const logoImage = config.ui.logoImage;
386
- const defaultRedirect = redirectUrl || config.navigation?.defaultRedirectUrl || "/";
387
- const form = useForm3({
388
- resolver: zodResolver3(setPasswordSchema(t)),
389
- defaultValues: {
390
- password: "",
391
- confirmPassword: ""
392
- }
393
- });
394
- useEffect3(() => {
395
- if (error) {
396
- toast3.error(error.title || "Error", {
397
- description: error.description
398
- });
399
- }
400
- }, [error]);
401
- const loadAccount = useEffectEvent(async () => {
402
- if (!identifier) {
403
- setError({
404
- title: t("errors.fallback"),
405
- description: t("errors.missingIdentifier")
406
- });
407
- setIsChecking(false);
408
- return;
409
- }
410
- try {
411
- const normalizedIdentifier = normalizeIdentifier(
412
- identifier,
413
- config.phoneRegex
414
- );
415
- const res = await checkAccountMutation.mutateAsync({
416
- body: { username: normalizedIdentifier }
417
- });
418
- if (!(res.exists && res.account && res.requiresPasswordSetup)) {
419
- setError({
420
- title: t("errors.fallback"),
421
- description: t("errors.accountNotEligible")
422
- });
423
- setIsChecking(false);
424
- return;
425
- }
426
- setAccount({
427
- fullName: res.account.fullName,
428
- email: res.account.email,
429
- phone: res.account.phone
430
- });
431
- } catch {
432
- setError({
433
- title: t("errors.fallback"),
434
- description: t("errors.accountLookupFailed")
435
- });
436
- } finally {
437
- setIsChecking(false);
438
- }
439
- });
440
- useEffect3(() => {
441
- loadAccount().catch(() => {
442
- setIsChecking(false);
443
- });
444
- }, [identifier]);
445
- const handleSubmit = form.handleSubmit(async (values) => {
446
- if (!identifier) {
447
- return;
448
- }
449
- setIsLoading(true);
450
- setError(null);
451
- try {
452
- const normalizedIdentifier = normalizeIdentifier(
453
- identifier,
454
- config.phoneRegex
455
- );
456
- const res = await setPasswordMutation.mutateAsync({
457
- body: {
458
- identifier: normalizedIdentifier,
459
- password: values.password
460
- }
461
- });
462
- if ("user" in res && "session" in res) {
463
- setAuth(res);
464
- }
465
- onNavigate(defaultRedirect);
466
- } catch (err) {
467
- handleError(err, setError, t);
468
- } finally {
469
- setIsLoading(false);
470
- }
471
- });
472
- const accountLabel = account?.email ? t("form.emailLabel") : t("form.phoneLabel");
473
- const accountValue = account?.email || account?.phone || identifier || "";
474
- let errorContent = null;
475
- if (error) {
476
- errorContent = typeof error === "string" ? { title: "Error", description: error } : error;
477
- }
478
- const showError = !isChecking && !!errorContent;
479
- const errorAlert = showError && errorContent && /* @__PURE__ */ jsxs4(Alert3, { variant: "destructive", className: "mt-4", children: [
480
- /* @__PURE__ */ jsx6(IconAlertCircle3, { className: "h-4 w-4" }),
481
- /* @__PURE__ */ jsx6(AlertTitle3, { children: errorContent.title }),
482
- /* @__PURE__ */ jsx6(AlertDescription3, { children: errorContent.description })
483
- ] });
484
- return /* @__PURE__ */ jsxs4(
485
- AuthLayout,
486
- {
487
- title: config.ui.name,
488
- description: t("description"),
489
- logoImage,
490
- footer: /* @__PURE__ */ jsxs4("p", { children: [
491
- t("footer.hasPassword"),
492
- " ",
493
- Link ? /* @__PURE__ */ jsx6(Link, { href: signInLink, className: "text-primary hover:underline", children: t("footer.signInCta") }) : /* @__PURE__ */ jsx6(
494
- "a",
495
- {
496
- href: signInLink,
497
- onClick: (e) => {
498
- e.preventDefault();
499
- onNavigate(signInLink);
500
- },
501
- className: "text-primary hover:underline",
502
- children: t("footer.signInCta")
503
- }
504
- )
505
- ] }),
506
- children: [
507
- /* @__PURE__ */ jsx6(Form3, { ...form, children: /* @__PURE__ */ jsxs4(
508
- "form",
509
- {
510
- id: "set-password-form",
511
- onSubmit: handleSubmit,
512
- className: "space-y-4",
513
- children: [
514
- /* @__PURE__ */ jsxs4(FormItem3, { children: [
515
- /* @__PURE__ */ jsx6(FormLabel3, { children: t("form.fullNameLabel") }),
516
- /* @__PURE__ */ jsx6(FormControl3, { children: /* @__PURE__ */ jsx6(Input3, { value: account?.fullName || "", disabled: true }) })
517
- ] }),
518
- /* @__PURE__ */ jsxs4(FormItem3, { children: [
519
- /* @__PURE__ */ jsx6(FormLabel3, { children: accountLabel }),
520
- /* @__PURE__ */ jsx6(FormControl3, { children: /* @__PURE__ */ jsx6(Input3, { value: accountValue, disabled: true }) })
521
- ] }),
522
- /* @__PURE__ */ jsx6(
523
- FormField3,
524
- {
525
- control: form.control,
526
- name: "password",
527
- render: ({ field }) => /* @__PURE__ */ jsxs4(FormItem3, { children: [
528
- /* @__PURE__ */ jsx6(FormLabel3, { children: t("form.passwordLabel") }),
529
- /* @__PURE__ */ jsx6(
530
- PasswordInput,
531
- {
532
- field,
533
- show: showPassword,
534
- onToggle: () => setShowPassword(!showPassword)
535
- }
536
- ),
537
- /* @__PURE__ */ jsx6(FormMessage3, {})
538
- ] })
539
- }
540
- ),
541
- /* @__PURE__ */ jsx6(
542
- FormField3,
543
- {
544
- control: form.control,
545
- name: "confirmPassword",
546
- render: ({ field }) => /* @__PURE__ */ jsxs4(FormItem3, { children: [
547
- /* @__PURE__ */ jsx6(FormLabel3, { children: t("form.confirmPasswordLabel") }),
548
- /* @__PURE__ */ jsx6(
549
- PasswordInput,
550
- {
551
- field,
552
- show: showConfirmPassword,
553
- onToggle: () => setShowConfirmPassword(!showConfirmPassword)
554
- }
555
- ),
556
- /* @__PURE__ */ jsx6(FormMessage3, {})
557
- ] })
558
- }
559
- ),
560
- /* @__PURE__ */ jsx6(
561
- Button3,
562
- {
563
- type: "submit",
564
- form: "set-password-form",
565
- className: "w-full",
566
- disabled: isChecking || !account || isLoading || setPasswordMutation.isPending,
567
- children: isLoading || setPasswordMutation.isPending ? t("form.submitting") : t("form.submit")
568
- }
569
- )
570
- ]
571
- }
572
- ) }),
573
- errorAlert
574
- ]
575
- }
576
- );
577
- };
578
-
579
- // src/components/auth/sign-in.tsx
580
- import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
581
- import {
582
- Alert as Alert4,
583
- AlertDescription as AlertDescription4,
584
- AlertTitle as AlertTitle4,
585
- Button as Button4,
586
- Form as Form4,
587
- FormControl as FormControl4,
588
- FormField as FormField4,
589
- FormItem as FormItem4,
590
- FormLabel as FormLabel4,
591
- FormMessage as FormMessage4,
592
- Input as Input4,
593
- useFormField as useFormField3
594
- } from "@mesob/ui/components";
595
- import { useMesob as useMesob5 } from "@mesob/ui/providers";
596
- import { IconAlertCircle as IconAlertCircle4, IconEye as IconEye3, IconEyeOff as IconEyeOff3 } from "@tabler/icons-react";
597
- import { useEffect as useEffect4, useState as useState5 } from "react";
598
- import { useForm as useForm4 } from "react-hook-form";
599
- import { toast as toast4 } from "sonner";
600
- import { z as z4 } from "zod";
601
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
602
-
603
- // src/components/auth/sign-up.tsx
604
- import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
605
- import {
606
- Alert as Alert5,
607
- AlertDescription as AlertDescription5,
608
- AlertTitle as AlertTitle5,
609
- Button as Button5,
610
- Form as Form5,
611
- FormControl as FormControl5,
612
- FormField as FormField5,
613
- FormItem as FormItem5,
614
- FormLabel as FormLabel5,
615
- FormMessage as FormMessage5,
616
- Input as Input5,
617
- useFormField as useFormField4
618
- } from "@mesob/ui/components";
619
- import { useMesob as useMesob6 } from "@mesob/ui/providers";
620
- import { IconAlertCircle as IconAlertCircle5, IconEye as IconEye4, IconEyeOff as IconEyeOff4 } from "@tabler/icons-react";
621
- import { useEffect as useEffect5, useState as useState6 } from "react";
622
- import { useForm as useForm5 } from "react-hook-form";
623
- import { toast as toast5 } from "sonner";
624
- import { z as z5 } from "zod";
625
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
626
-
627
- // src/components/auth/verification-form.tsx
628
- import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
629
- import {
630
- Button as Button6,
631
- Form as Form6,
632
- FormControl as FormControl6,
633
- FormField as FormField6,
634
- FormItem as FormItem6,
635
- FormLabel as FormLabel6,
636
- FormMessage as FormMessage6,
637
- InputOTP as InputOTP2,
638
- InputOTPGroup as InputOTPGroup2,
639
- InputOTPSlot as InputOTPSlot2
640
- } from "@mesob/ui/components";
641
- import { useForm as useForm6 } from "react-hook-form";
642
- import { z as z6 } from "zod";
643
-
644
- // src/components/auth/countdown.tsx
645
- import { Spinner } from "@mesob/ui/components";
646
- import { useEffect as useEffect6, useState as useState7 } from "react";
647
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
648
-
649
- // src/components/auth/verification-form.tsx
650
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
651
-
652
- // src/components/auth/verify-email.tsx
653
- import { Alert as Alert6, AlertDescription as AlertDescription6, AlertTitle as AlertTitle6 } from "@mesob/ui/components";
654
- import { useMesob as useMesob7 } from "@mesob/ui/providers";
655
- import { IconAlertCircle as IconAlertCircle6 } from "@tabler/icons-react";
656
- import { useEffect as useEffect7, useState as useState8 } from "react";
657
- import { toast as toast6 } from "sonner";
658
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
659
-
660
- // src/components/auth/verify-phone.tsx
661
- import { Alert as Alert7, AlertDescription as AlertDescription7, AlertTitle as AlertTitle7 } from "@mesob/ui/components";
662
- import { useMesob as useMesob8 } from "@mesob/ui/providers";
663
- import { IconAlertCircle as IconAlertCircle7 } from "@tabler/icons-react";
664
- import { useEffect as useEffect8, useState as useState9 } from "react";
665
- import { toast as toast7 } from "sonner";
666
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
667
-
668
- // src/components/authorization/deny.tsx
669
- import { deny as canDeny } from "@mesob/common";
670
- import { Fragment as Fragment2, jsx as jsx13 } from "react/jsx-runtime";
671
-
672
- // src/components/authorization/grant.tsx
673
- import { grant as canGrant } from "@mesob/common";
674
- import { Fragment as Fragment3, jsx as jsx14 } from "react/jsx-runtime";
675
-
676
- // src/components/error-boundary.tsx
677
- import { Button as Button7 } from "@mesob/ui/components";
678
- import { Component } from "react";
679
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
680
-
681
- // src/components/iam/permission-selector.tsx
682
- import {
683
- Badge,
684
- EntitySelector,
685
- useEntitySectionState
686
- } from "@mesob/ui/components";
687
- import { IconKey } from "@tabler/icons-react";
688
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
689
-
690
- // src/components/iam/permissions.tsx
691
- import { Badge as Badge2, Button as Button8 } from "@mesob/ui/components";
692
- import { useState as useState10 } from "react";
693
-
694
- // src/components/shared/data-table.tsx
695
1
  import {
696
- Table,
697
- TableBody,
698
- TableCell,
699
- TableHead,
700
- TableHeader,
701
- TableRow
702
- } from "@mesob/ui/components";
703
-
704
- // src/components/skeletons/table-skeleton.tsx
705
- import { Skeleton } from "@mesob/ui/components";
706
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
707
-
708
- // src/components/shared/data-table.tsx
709
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
710
-
711
- // src/components/iam/permissions.tsx
712
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
713
-
714
- // src/components/iam/role-detail-layout.tsx
715
- import {
716
- EntityDetailHeader,
717
- EntityEmptyState,
718
- PageContainer,
719
- useBreadcrumbs
720
- } from "@mesob/ui/components";
721
- import { IconShield } from "@tabler/icons-react";
722
- import { useMemo as useMemo2 } from "react";
723
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
724
-
725
- // src/components/iam/role-detail-page.tsx
726
- import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
727
- import {
728
- EntityFormActions,
729
- Form as Form7,
730
- FormControl as FormControl7,
731
- FormField as FormField7,
732
- FormItem as FormItem7,
733
- FormLabel as FormLabel7,
734
- FormMessage as FormMessage7,
735
- Input as Input6,
736
- LocaleInputText,
737
- LocaleInputTextarea,
738
- Section,
739
- Skeleton as Skeleton2
740
- } from "@mesob/ui/components";
741
- import { useLocaleSchemas } from "@mesob/ui/providers";
742
- import { useQueryClient } from "@tanstack/react-query";
743
- import { useEffect as useEffect9, useMemo as useMemo3 } from "react";
744
- import { useForm as useForm7 } from "react-hook-form";
745
- import { toast as toast8 } from "sonner";
746
- import { z as z7 } from "zod";
747
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
748
-
749
- // src/components/iam/role-permissions-page.tsx
750
- import {
751
- Badge as Badge3,
752
- Button as Button9,
753
- DataTablePagination,
754
- DeleteConfirmButton,
755
- DisplayTable,
756
- EntityEmptyState as EntityEmptyState2,
757
- EntityFilter,
758
- EntityHeader,
759
- EntityLoadingState,
760
- EntitySearch,
761
- EntitySort,
762
- EntityViewToggle,
763
- PageBody,
764
- Tbody,
765
- Td,
766
- Th,
767
- Thead,
768
- Tr,
769
- useEntityPagination,
770
- useEntityParams
771
- } from "@mesob/ui/components";
772
- import { IconKey as IconKey2, IconPlus, IconTrash } from "@tabler/icons-react";
773
- import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
774
- import { useMemo as useMemo4 } from "react";
775
- import { toast as toast9 } from "sonner";
776
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
777
-
778
- // src/components/iam/roles.tsx
779
- import { Badge as Badge4, Button as Button10 } from "@mesob/ui/components";
780
- import { useLocale } from "next-intl";
781
- import { useState as useState11 } from "react";
782
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
783
-
784
- // src/components/iam/sessions.tsx
785
- import { Button as Button11 } from "@mesob/ui/components";
786
- import { useState as useState12 } from "react";
787
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
788
-
789
- // src/components/iam/tenants.tsx
790
- import { Badge as Badge5, Button as Button12 } from "@mesob/ui/components";
791
- import { useState as useState13 } from "react";
792
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
793
-
794
- // src/components/iam/users.tsx
795
- import { Badge as Badge6, Button as Button13 } from "@mesob/ui/components";
796
- import { useState as useState14 } from "react";
797
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
798
-
799
- // src/components/profile/account.tsx
800
- import { Badge as Badge8, Card as Card2, CardContent, Separator } from "@mesob/ui/components";
801
-
802
- // src/components/profile/change-profile.tsx
803
- import {
804
- Avatar,
805
- AvatarFallback,
806
- AvatarImage,
807
- Badge as Badge7,
808
- Button as Button14
809
- } from "@mesob/ui/components";
810
- import { useState as useState15 } from "react";
811
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
812
-
813
- // src/components/profile/account.tsx
814
- import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
815
-
816
- // src/components/profile/security.tsx
817
- import { Badge as Badge9, Card as Card3, CardContent as CardContent2, Separator as Separator2 } from "@mesob/ui/components";
818
-
819
- // src/components/profile/change-email-form.tsx
820
- import {
821
- Button as Button16,
822
- Collapsible,
823
- CollapsibleContent,
824
- CollapsibleTrigger
825
- } from "@mesob/ui/components";
826
- import { IconChevronDown } from "@tabler/icons-react";
827
- import { useState as useState18 } from "react";
828
-
829
- // src/components/profile/request-change-email-form.tsx
830
- import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
831
- import { Button as Button15, Input as Input7, Label, Spinner as Spinner2 } from "@mesob/ui/components";
832
- import { IconEye as IconEye5, IconEyeOff as IconEyeOff5 } from "@tabler/icons-react";
833
- import { useEffect as useEffect10, useState as useState16 } from "react";
834
- import { useForm as useForm8 } from "react-hook-form";
835
- import { toast as toast10 } from "sonner";
836
- import { z as z8 } from "zod";
837
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
838
- var emailPasswordSchema = z8.object({
839
- email: z8.string().email("Invalid email address"),
840
- password: z8.string().min(8, "Password must be at least 8 characters").max(128, "Password too long")
841
- });
842
-
843
- // src/components/profile/verify-change-email-form.tsx
844
- import { useState as useState17 } from "react";
845
- import { toast as toast11 } from "sonner";
846
-
847
- // src/components/profile/otp-verification-modal.tsx
848
- import {
849
- Dialog,
850
- DialogContent,
851
- DialogDescription,
852
- DialogHeader,
853
- DialogTitle
854
- } from "@mesob/ui/components";
855
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
856
-
857
- // src/components/profile/verify-change-email-form.tsx
858
- import { jsx as jsx31 } from "react/jsx-runtime";
859
-
860
- // src/components/profile/change-email-form.tsx
861
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
862
-
863
- // src/components/profile/change-password-form.tsx
864
- import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
865
- import {
866
- Button as Button17,
867
- Collapsible as Collapsible2,
868
- CollapsibleContent as CollapsibleContent2,
869
- CollapsibleTrigger as CollapsibleTrigger2,
870
- Input as Input8,
871
- Label as Label2,
872
- Spinner as Spinner3
873
- } from "@mesob/ui/components";
874
- import { IconChevronDown as IconChevronDown2, IconEye as IconEye6, IconEyeOff as IconEyeOff6 } from "@tabler/icons-react";
875
- import { useState as useState19 } from "react";
876
- import { useForm as useForm9 } from "react-hook-form";
877
- import { toast as toast12 } from "sonner";
878
- import { z as z9 } from "zod";
879
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
880
- var changePasswordSchema = z9.object({
881
- currentPassword: z9.string().min(8, "Password must be at least 8 characters"),
882
- newPassword: z9.string().min(8, "Password must be at least 8 characters"),
883
- confirmPassword: z9.string().min(8, "Password must be at least 8 characters")
884
- }).refine((data) => data.newPassword === data.confirmPassword, {
885
- message: "Passwords don't match",
886
- path: ["confirmPassword"]
887
- });
888
-
889
- // src/components/profile/change-phone-form.tsx
890
- import {
891
- Button as Button19,
892
- Collapsible as Collapsible3,
893
- CollapsibleContent as CollapsibleContent3,
894
- CollapsibleTrigger as CollapsibleTrigger3
895
- } from "@mesob/ui/components";
896
- import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
897
- import { useState as useState22 } from "react";
898
-
899
- // src/components/profile/request-change-phone-form.tsx
900
- import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
901
- import { Button as Button18, Input as Input9, Label as Label3, Spinner as Spinner4 } from "@mesob/ui/components";
902
- import { IconEye as IconEye7, IconEyeOff as IconEyeOff7 } from "@tabler/icons-react";
903
- import { useEffect as useEffect11, useState as useState20 } from "react";
904
- import { useForm as useForm10 } from "react-hook-form";
905
- import { toast as toast13 } from "sonner";
906
- import { z as z10 } from "zod";
907
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
908
-
909
- // src/components/profile/verify-change-phone-form.tsx
910
- import { useState as useState21 } from "react";
911
- import { toast as toast14 } from "sonner";
912
- import { jsx as jsx35 } from "react/jsx-runtime";
913
-
914
- // src/components/profile/change-phone-form.tsx
915
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
916
-
917
- // src/components/profile/security.tsx
918
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
919
-
920
- // src/components/skeletons/auth-form-skeleton.tsx
921
- import { Skeleton as Skeleton3 } from "@mesob/ui/components";
922
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
923
-
924
- // src/components/skeletons/profile-skeleton.tsx
925
- import { Skeleton as Skeleton4 } from "@mesob/ui/components";
926
- import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
2
+ SetPassword
3
+ } from "../../chunk-HOO2VLNM.js";
4
+ import "../../chunk-V2W3WPCZ.js";
5
+ import "../../chunk-55BMNC4S.js";
6
+ import "../../chunk-DPH2PHK3.js";
7
+ import "../../chunk-QNCE2B5O.js";
8
+ import "../../chunk-72YRO3A7.js";
927
9
 
928
10
  // src/pages/auth/set-password.tsx
929
- import { jsx as jsx40 } from "react/jsx-runtime";
11
+ import { jsx } from "react/jsx-runtime";
930
12
  var metadata = {
931
13
  title: "Set password",
932
14
  description: "Set a password for your account."
@@ -937,7 +19,7 @@ async function SetPasswordPage({ searchParams }) {
937
19
  const redirectParam = params.redirect;
938
20
  const identifier = typeof identifierParam === "string" ? identifierParam : void 0;
939
21
  const redirectUrl = typeof redirectParam === "string" ? redirectParam : void 0;
940
- return /* @__PURE__ */ jsx40(SetPassword, { identifier, redirectUrl });
22
+ return /* @__PURE__ */ jsx(SetPassword, { identifier, redirectUrl });
941
23
  }
942
24
  export {
943
25
  SetPasswordPage as default,