@joelbarron/react-web-dev-kit 0.1.0

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 (215) hide show
  1. package/README.md +236 -0
  2. package/dist/auth/client.d.ts +44 -0
  3. package/dist/auth/client.d.ts.map +1 -0
  4. package/dist/auth/client.js +354 -0
  5. package/dist/auth/constants/countryCallingCodes.d.ts +9 -0
  6. package/dist/auth/constants/countryCallingCodes.d.ts.map +1 -0
  7. package/dist/auth/constants/countryCallingCodes.js +209 -0
  8. package/dist/auth/constants/gender.d.ts +9 -0
  9. package/dist/auth/constants/gender.d.ts.map +1 -0
  10. package/dist/auth/constants/gender.js +12 -0
  11. package/dist/auth/constants/index.d.ts +3 -0
  12. package/dist/auth/constants/index.d.ts.map +1 -0
  13. package/dist/auth/constants/index.js +2 -0
  14. package/dist/auth/forms/account/AuthAccountConfirmationForm.d.ts +18 -0
  15. package/dist/auth/forms/account/AuthAccountConfirmationForm.d.ts.map +1 -0
  16. package/dist/auth/forms/account/AuthAccountConfirmationForm.js +166 -0
  17. package/dist/auth/forms/account/index.d.ts +2 -0
  18. package/dist/auth/forms/account/index.d.ts.map +1 -0
  19. package/dist/auth/forms/account/index.js +1 -0
  20. package/dist/auth/forms/errorParser.d.ts +7 -0
  21. package/dist/auth/forms/errorParser.d.ts.map +1 -0
  22. package/dist/auth/forms/errorParser.js +65 -0
  23. package/dist/auth/forms/index.d.ts +6 -0
  24. package/dist/auth/forms/index.d.ts.map +1 -0
  25. package/dist/auth/forms/index.js +5 -0
  26. package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts +12 -0
  27. package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts.map +1 -0
  28. package/dist/auth/forms/password/AuthForgotPasswordForm.js +71 -0
  29. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts +15 -0
  30. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts.map +1 -0
  31. package/dist/auth/forms/password/AuthPasswordResetConfirmForm.js +88 -0
  32. package/dist/auth/forms/password/AuthResetPasswordForm.d.ts +12 -0
  33. package/dist/auth/forms/password/AuthResetPasswordForm.d.ts.map +1 -0
  34. package/dist/auth/forms/password/AuthResetPasswordForm.js +18 -0
  35. package/dist/auth/forms/password/index.d.ts +4 -0
  36. package/dist/auth/forms/password/index.d.ts.map +1 -0
  37. package/dist/auth/forms/password/index.js +3 -0
  38. package/dist/auth/forms/sign-in/AuthOtpSignInForm.d.ts +24 -0
  39. package/dist/auth/forms/sign-in/AuthOtpSignInForm.d.ts.map +1 -0
  40. package/dist/auth/forms/sign-in/AuthOtpSignInForm.js +226 -0
  41. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts +21 -0
  42. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts.map +1 -0
  43. package/dist/auth/forms/sign-in/AuthPasswordSignInForm.js +120 -0
  44. package/dist/auth/forms/sign-in/index.d.ts +3 -0
  45. package/dist/auth/forms/sign-in/index.d.ts.map +1 -0
  46. package/dist/auth/forms/sign-in/index.js +2 -0
  47. package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts +36 -0
  48. package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts.map +1 -0
  49. package/dist/auth/forms/sign-up/AuthSignUpForm.js +164 -0
  50. package/dist/auth/forms/sign-up/index.d.ts +2 -0
  51. package/dist/auth/forms/sign-up/index.d.ts.map +1 -0
  52. package/dist/auth/forms/sign-up/index.js +1 -0
  53. package/dist/auth/fuse/createFuseAuthViews.d.ts +24 -0
  54. package/dist/auth/fuse/createFuseAuthViews.d.ts.map +1 -0
  55. package/dist/auth/fuse/createFuseAuthViews.js +360 -0
  56. package/dist/auth/fuse/fuseAdapter.d.ts +40 -0
  57. package/dist/auth/fuse/fuseAdapter.d.ts.map +1 -0
  58. package/dist/auth/fuse/fuseAdapter.js +265 -0
  59. package/dist/auth/fuse/fuseIntegration.d.ts +59 -0
  60. package/dist/auth/fuse/fuseIntegration.d.ts.map +1 -0
  61. package/dist/auth/fuse/fuseIntegration.js +85 -0
  62. package/dist/auth/fuse/index.d.ts +4 -0
  63. package/dist/auth/fuse/index.d.ts.map +1 -0
  64. package/dist/auth/fuse/index.js +3 -0
  65. package/dist/auth/index.d.ts +11 -0
  66. package/dist/auth/index.d.ts.map +1 -0
  67. package/dist/auth/index.js +10 -0
  68. package/dist/auth/provider.d.ts +35 -0
  69. package/dist/auth/provider.d.ts.map +1 -0
  70. package/dist/auth/provider.js +133 -0
  71. package/dist/auth/query.d.ts +23 -0
  72. package/dist/auth/query.d.ts.map +1 -0
  73. package/dist/auth/query.js +103 -0
  74. package/dist/auth/routes.d.ts +37 -0
  75. package/dist/auth/routes.d.ts.map +1 -0
  76. package/dist/auth/routes.js +73 -0
  77. package/dist/auth/social/providerAuth.d.ts +76 -0
  78. package/dist/auth/social/providerAuth.d.ts.map +1 -0
  79. package/dist/auth/social/providerAuth.js +130 -0
  80. package/dist/auth/storage.d.ts +3 -0
  81. package/dist/auth/storage.d.ts.map +1 -0
  82. package/dist/auth/storage.js +20 -0
  83. package/dist/auth/types.d.ts +208 -0
  84. package/dist/auth/types.d.ts.map +1 -0
  85. package/dist/auth/types.js +1 -0
  86. package/dist/auth/ui/AuthPagesMessageSection.d.ts +3 -0
  87. package/dist/auth/ui/AuthPagesMessageSection.d.ts.map +1 -0
  88. package/dist/auth/ui/AuthPagesMessageSection.js +39 -0
  89. package/dist/auth/ui/AuthPrimaryButton.d.ts +9 -0
  90. package/dist/auth/ui/AuthPrimaryButton.d.ts.map +1 -0
  91. package/dist/auth/ui/AuthPrimaryButton.js +19 -0
  92. package/dist/auth/ui/AuthRoleSelectionDialog.d.ts +14 -0
  93. package/dist/auth/ui/AuthRoleSelectionDialog.d.ts.map +1 -0
  94. package/dist/auth/ui/AuthRoleSelectionDialog.js +39 -0
  95. package/dist/auth/ui/AuthRoutePageWrapper.d.ts +12 -0
  96. package/dist/auth/ui/AuthRoutePageWrapper.d.ts.map +1 -0
  97. package/dist/auth/ui/AuthRoutePageWrapper.js +59 -0
  98. package/dist/auth/ui/AuthSecondaryButton.d.ts +7 -0
  99. package/dist/auth/ui/AuthSecondaryButton.d.ts.map +1 -0
  100. package/dist/auth/ui/AuthSecondaryButton.js +18 -0
  101. package/dist/auth/ui/AuthSocialProviderButton.d.ts +11 -0
  102. package/dist/auth/ui/AuthSocialProviderButton.d.ts.map +1 -0
  103. package/dist/auth/ui/AuthSocialProviderButton.js +30 -0
  104. package/dist/auth/ui/SignInPageTitle.d.ts +6 -0
  105. package/dist/auth/ui/SignInPageTitle.d.ts.map +1 -0
  106. package/dist/auth/ui/SignInPageTitle.js +7 -0
  107. package/dist/auth/ui/SignOutPageTitle.d.ts +6 -0
  108. package/dist/auth/ui/SignOutPageTitle.d.ts.map +1 -0
  109. package/dist/auth/ui/SignOutPageTitle.js +7 -0
  110. package/dist/auth/ui/SignUpPageTitle.d.ts +6 -0
  111. package/dist/auth/ui/SignUpPageTitle.d.ts.map +1 -0
  112. package/dist/auth/ui/SignUpPageTitle.js +7 -0
  113. package/dist/auth/ui/index.d.ts +11 -0
  114. package/dist/auth/ui/index.d.ts.map +1 -0
  115. package/dist/auth/ui/index.js +10 -0
  116. package/dist/auth/ui/types.d.ts +15 -0
  117. package/dist/auth/ui/types.d.ts.map +1 -0
  118. package/dist/auth/ui/types.js +1 -0
  119. package/dist/config/createConfig.d.ts +13 -0
  120. package/dist/config/createConfig.d.ts.map +1 -0
  121. package/dist/config/createConfig.js +104 -0
  122. package/dist/config/defaults.d.ts +3 -0
  123. package/dist/config/defaults.d.ts.map +1 -0
  124. package/dist/config/defaults.js +38 -0
  125. package/dist/config/index.d.ts +5 -0
  126. package/dist/config/index.d.ts.map +1 -0
  127. package/dist/config/index.js +4 -0
  128. package/dist/config/merge.d.ts +2 -0
  129. package/dist/config/merge.d.ts.map +1 -0
  130. package/dist/config/merge.js +18 -0
  131. package/dist/config/types.d.ts +46 -0
  132. package/dist/config/types.d.ts.map +1 -0
  133. package/dist/config/types.js +1 -0
  134. package/dist/forms/JBCheckboxField.d.ts +12 -0
  135. package/dist/forms/JBCheckboxField.d.ts.map +1 -0
  136. package/dist/forms/JBCheckboxField.js +36 -0
  137. package/dist/forms/JBDatePickerField.d.ts +12 -0
  138. package/dist/forms/JBDatePickerField.d.ts.map +1 -0
  139. package/dist/forms/JBDatePickerField.js +14 -0
  140. package/dist/forms/JBRadioGroupField.d.ts +10 -0
  141. package/dist/forms/JBRadioGroupField.d.ts.map +1 -0
  142. package/dist/forms/JBRadioGroupField.js +8 -0
  143. package/dist/forms/JBSelectField.d.ts +9 -0
  144. package/dist/forms/JBSelectField.d.ts.map +1 -0
  145. package/dist/forms/JBSelectField.js +8 -0
  146. package/dist/forms/JBSwitchField.d.ts +11 -0
  147. package/dist/forms/JBSwitchField.d.ts.map +1 -0
  148. package/dist/forms/JBSwitchField.js +10 -0
  149. package/dist/forms/JBTextField.d.ts +6 -0
  150. package/dist/forms/JBTextField.d.ts.map +1 -0
  151. package/dist/forms/JBTextField.js +8 -0
  152. package/dist/forms/JBTimePickerField.d.ts +12 -0
  153. package/dist/forms/JBTimePickerField.d.ts.map +1 -0
  154. package/dist/forms/JBTimePickerField.js +14 -0
  155. package/dist/forms/index.d.ts +11 -0
  156. package/dist/forms/index.d.ts.map +1 -0
  157. package/dist/forms/index.js +10 -0
  158. package/dist/forms/rules.d.ts +16 -0
  159. package/dist/forms/rules.d.ts.map +1 -0
  160. package/dist/forms/rules.js +21 -0
  161. package/dist/forms/types.d.ts +12 -0
  162. package/dist/forms/types.d.ts.map +1 -0
  163. package/dist/forms/types.js +1 -0
  164. package/dist/forms/utils.d.ts +5 -0
  165. package/dist/forms/utils.d.ts.map +1 -0
  166. package/dist/forms/utils.js +7 -0
  167. package/dist/grid/JBGrid.d.ts +3 -0
  168. package/dist/grid/JBGrid.d.ts.map +1 -0
  169. package/dist/grid/JBGrid.js +89 -0
  170. package/dist/grid/JBGridHeader.d.ts +3 -0
  171. package/dist/grid/JBGridHeader.d.ts.map +1 -0
  172. package/dist/grid/JBGridHeader.js +22 -0
  173. package/dist/grid/JBGridProviders.d.ts +10 -0
  174. package/dist/grid/JBGridProviders.d.ts.map +1 -0
  175. package/dist/grid/JBGridProviders.js +31 -0
  176. package/dist/grid/index.d.ts +5 -0
  177. package/dist/grid/index.d.ts.map +1 -0
  178. package/dist/grid/index.js +4 -0
  179. package/dist/grid/types.d.ts +81 -0
  180. package/dist/grid/types.d.ts.map +1 -0
  181. package/dist/grid/types.js +1 -0
  182. package/dist/hooks/index.d.ts +3 -0
  183. package/dist/hooks/index.d.ts.map +1 -0
  184. package/dist/hooks/index.js +2 -0
  185. package/dist/hooks/useJBDebouncedValue.d.ts +2 -0
  186. package/dist/hooks/useJBDebouncedValue.d.ts.map +1 -0
  187. package/dist/hooks/useJBDebouncedValue.js +11 -0
  188. package/dist/hooks/useJBRedirect.d.ts +10 -0
  189. package/dist/hooks/useJBRedirect.d.ts.map +1 -0
  190. package/dist/hooks/useJBRedirect.js +11 -0
  191. package/dist/index.d.ts +8 -0
  192. package/dist/index.d.ts.map +1 -0
  193. package/dist/index.js +7 -0
  194. package/dist/query/createQueryClient.d.ts +8 -0
  195. package/dist/query/createQueryClient.d.ts.map +1 -0
  196. package/dist/query/createQueryClient.js +25 -0
  197. package/dist/query/http.d.ts +3 -0
  198. package/dist/query/http.d.ts.map +1 -0
  199. package/dist/query/http.js +12 -0
  200. package/dist/query/index.d.ts +3 -0
  201. package/dist/query/index.d.ts.map +1 -0
  202. package/dist/query/index.js +2 -0
  203. package/dist/utils/format.d.ts +4 -0
  204. package/dist/utils/format.d.ts.map +1 -0
  205. package/dist/utils/format.js +28 -0
  206. package/dist/utils/index.d.ts +4 -0
  207. package/dist/utils/index.d.ts.map +1 -0
  208. package/dist/utils/index.js +3 -0
  209. package/dist/utils/query.d.ts +2 -0
  210. package/dist/utils/query.d.ts.map +1 -0
  211. package/dist/utils/query.js +4 -0
  212. package/dist/utils/regex.d.ts +7 -0
  213. package/dist/utils/regex.d.ts.map +1 -0
  214. package/dist/utils/regex.js +6 -0
  215. package/package.json +85 -0
@@ -0,0 +1,209 @@
1
+ export const COUNTRY_CALLING_CODE_OPTIONS = [
2
+ { value: '+1', label: "🇺🇸 United States (+1)", iso2: 'us', countryName: "United States", dialCode: '+1' },
3
+ { value: '+52', label: "🇲🇽 Mexico (+52)", iso2: 'mx', countryName: "Mexico", dialCode: '+52' },
4
+ { value: '+44', label: "🇬🇧 United Kingdom (+44)", iso2: 'gb', countryName: "United Kingdom", dialCode: '+44' },
5
+ { value: '+34', label: "🇪🇸 Spain (+34)", iso2: 'es', countryName: "Spain", dialCode: '+34' },
6
+ { value: '+57', label: "🇨🇴 Colombia (+57)", iso2: 'co', countryName: "Colombia", dialCode: '+57' },
7
+ { value: '+54', label: "🇦🇷 Argentina (+54)", iso2: 'ar', countryName: "Argentina", dialCode: '+54' },
8
+ { value: '+55', label: "🇧🇷 Brazil (+55)", iso2: 'br', countryName: "Brazil", dialCode: '+55' },
9
+ { value: '+49', label: "🇩🇪 Germany (+49)", iso2: 'de', countryName: "Germany", dialCode: '+49' },
10
+ { value: '+33', label: "🇫🇷 France (+33)", iso2: 'fr', countryName: "France", dialCode: '+33' },
11
+ { value: '+39', label: "🇮🇹 Italy (+39)", iso2: 'it', countryName: "Italy", dialCode: '+39' },
12
+ { value: '+91', label: "🇮🇳 India (+91)", iso2: 'in', countryName: "India", dialCode: '+91' },
13
+ { value: '+86', label: "🇨🇳 China (+86)", iso2: 'cn', countryName: "China", dialCode: '+86' },
14
+ { value: '+81', label: "🇯🇵 Japan (+81)", iso2: 'jp', countryName: "Japan", dialCode: '+81' },
15
+ { value: '+61', label: "🇦🇺 Australia (+61)", iso2: 'au', countryName: "Australia", dialCode: '+61' },
16
+ { value: '+56', label: "🇨🇱 Chile (+56)", iso2: 'cl', countryName: "Chile", dialCode: '+56' },
17
+ { value: '+51', label: "🇵🇪 Peru (+51)", iso2: 'pe', countryName: "Peru", dialCode: '+51' },
18
+ { value: '+93', label: "🇦🇫 Afghanistan (+93)", iso2: 'af', countryName: "Afghanistan", dialCode: '+93' },
19
+ { value: '+358', label: "🇦🇽 Åland Islands (+358)", iso2: 'ax', countryName: "Åland Islands", dialCode: '+358' },
20
+ { value: '+355', label: "🇦🇱 Albania (+355)", iso2: 'al', countryName: "Albania", dialCode: '+355' },
21
+ { value: '+213', label: "🇩🇿 Algeria (+213)", iso2: 'dz', countryName: "Algeria", dialCode: '+213' },
22
+ { value: '+376', label: "🇦🇩 Andorra (+376)", iso2: 'ad', countryName: "Andorra", dialCode: '+376' },
23
+ { value: '+244', label: "🇦🇴 Angola (+244)", iso2: 'ao', countryName: "Angola", dialCode: '+244' },
24
+ { value: '+374', label: "🇦🇲 Armenia (+374)", iso2: 'am', countryName: "Armenia", dialCode: '+374' },
25
+ { value: '+297', label: "🇦🇼 Aruba (+297)", iso2: 'aw', countryName: "Aruba", dialCode: '+297' },
26
+ { value: '+247', label: "🇦🇨 Ascension Island (+247)", iso2: 'ac', countryName: "Ascension Island", dialCode: '+247' },
27
+ { value: '+43', label: "🇦🇹 Austria (+43)", iso2: 'at', countryName: "Austria", dialCode: '+43' },
28
+ { value: '+994', label: "🇦🇿 Azerbaijan (+994)", iso2: 'az', countryName: "Azerbaijan", dialCode: '+994' },
29
+ { value: '+973', label: "🇧🇭 Bahrain (+973)", iso2: 'bh', countryName: "Bahrain", dialCode: '+973' },
30
+ { value: '+880', label: "🇧🇩 Bangladesh (+880)", iso2: 'bd', countryName: "Bangladesh", dialCode: '+880' },
31
+ { value: '+375', label: "🇧🇾 Belarus (+375)", iso2: 'by', countryName: "Belarus", dialCode: '+375' },
32
+ { value: '+32', label: "🇧🇪 Belgium (+32)", iso2: 'be', countryName: "Belgium", dialCode: '+32' },
33
+ { value: '+501', label: "🇧🇿 Belize (+501)", iso2: 'bz', countryName: "Belize", dialCode: '+501' },
34
+ { value: '+229', label: "🇧🇯 Benin (+229)", iso2: 'bj', countryName: "Benin", dialCode: '+229' },
35
+ { value: '+975', label: "🇧🇹 Bhutan (+975)", iso2: 'bt', countryName: "Bhutan", dialCode: '+975' },
36
+ { value: '+591', label: "🇧🇴 Bolivia (+591)", iso2: 'bo', countryName: "Bolivia", dialCode: '+591' },
37
+ { value: '+387', label: "🇧🇦 Bosnia and Herzegovina (+387)", iso2: 'ba', countryName: "Bosnia and Herzegovina", dialCode: '+387' },
38
+ { value: '+267', label: "🇧🇼 Botswana (+267)", iso2: 'bw', countryName: "Botswana", dialCode: '+267' },
39
+ { value: '+246', label: "🇮🇴 British Indian Ocean Territory (+246)", iso2: 'io', countryName: "British Indian Ocean Territory", dialCode: '+246' },
40
+ { value: '+673', label: "🇧🇳 Brunei (+673)", iso2: 'bn', countryName: "Brunei", dialCode: '+673' },
41
+ { value: '+359', label: "🇧🇬 Bulgaria (+359)", iso2: 'bg', countryName: "Bulgaria", dialCode: '+359' },
42
+ { value: '+226', label: "🇧🇫 Burkina Faso (+226)", iso2: 'bf', countryName: "Burkina Faso", dialCode: '+226' },
43
+ { value: '+257', label: "🇧🇮 Burundi (+257)", iso2: 'bi', countryName: "Burundi", dialCode: '+257' },
44
+ { value: '+855', label: "🇰🇭 Cambodia (+855)", iso2: 'kh', countryName: "Cambodia", dialCode: '+855' },
45
+ { value: '+237', label: "🇨🇲 Cameroon (+237)", iso2: 'cm', countryName: "Cameroon", dialCode: '+237' },
46
+ { value: '+238', label: "🇨🇻 Cape Verde (+238)", iso2: 'cv', countryName: "Cape Verde", dialCode: '+238' },
47
+ { value: '+599', label: "🇧🇶 Caribbean Netherlands (+599)", iso2: 'bq', countryName: "Caribbean Netherlands", dialCode: '+599' },
48
+ { value: '+236', label: "🇨🇫 Central African Republic (+236)", iso2: 'cf', countryName: "Central African Republic", dialCode: '+236' },
49
+ { value: '+235', label: "🇹🇩 Chad (+235)", iso2: 'td', countryName: "Chad", dialCode: '+235' },
50
+ { value: '+269', label: "🇰🇲 Comoros (+269)", iso2: 'km', countryName: "Comoros", dialCode: '+269' },
51
+ { value: '+242', label: "🇨🇬 Congo (Brazzaville) (+242)", iso2: 'cg', countryName: "Congo (Brazzaville)", dialCode: '+242' },
52
+ { value: '+243', label: "🇨🇩 Congo (Kinshasa) (+243)", iso2: 'cd', countryName: "Congo (Kinshasa)", dialCode: '+243' },
53
+ { value: '+682', label: "🇨🇰 Cook Islands (+682)", iso2: 'ck', countryName: "Cook Islands", dialCode: '+682' },
54
+ { value: '+506', label: "🇨🇷 Costa Rica (+506)", iso2: 'cr', countryName: "Costa Rica", dialCode: '+506' },
55
+ { value: '+225', label: "🇨🇮 Côte d'Ivoire (+225)", iso2: 'ci', countryName: "Côte d'Ivoire", dialCode: '+225' },
56
+ { value: '+385', label: "🇭🇷 Croatia (+385)", iso2: 'hr', countryName: "Croatia", dialCode: '+385' },
57
+ { value: '+53', label: "🇨🇺 Cuba (+53)", iso2: 'cu', countryName: "Cuba", dialCode: '+53' },
58
+ { value: '+357', label: "🇨🇾 Cyprus (+357)", iso2: 'cy', countryName: "Cyprus", dialCode: '+357' },
59
+ { value: '+420', label: "🇨🇿 Czech Republic (+420)", iso2: 'cz', countryName: "Czech Republic", dialCode: '+420' },
60
+ { value: '+45', label: "🇩🇰 Denmark (+45)", iso2: 'dk', countryName: "Denmark", dialCode: '+45' },
61
+ { value: '+253', label: "🇩🇯 Djibouti (+253)", iso2: 'dj', countryName: "Djibouti", dialCode: '+253' },
62
+ { value: '+593', label: "🇪🇨 Ecuador (+593)", iso2: 'ec', countryName: "Ecuador", dialCode: '+593' },
63
+ { value: '+20', label: "🇪🇬 Egypt (+20)", iso2: 'eg', countryName: "Egypt", dialCode: '+20' },
64
+ { value: '+503', label: "🇸🇻 El Salvador (+503)", iso2: 'sv', countryName: "El Salvador", dialCode: '+503' },
65
+ { value: '+240', label: "🇬🇶 Equatorial Guinea (+240)", iso2: 'gq', countryName: "Equatorial Guinea", dialCode: '+240' },
66
+ { value: '+291', label: "🇪🇷 Eritrea (+291)", iso2: 'er', countryName: "Eritrea", dialCode: '+291' },
67
+ { value: '+372', label: "🇪🇪 Estonia (+372)", iso2: 'ee', countryName: "Estonia", dialCode: '+372' },
68
+ { value: '+268', label: "🇸🇿 Eswatini (+268)", iso2: 'sz', countryName: "Eswatini", dialCode: '+268' },
69
+ { value: '+251', label: "🇪🇹 Ethiopia (+251)", iso2: 'et', countryName: "Ethiopia", dialCode: '+251' },
70
+ { value: '+500', label: "🇫🇰 Falkland Islands (Malvinas) (+500)", iso2: 'fk', countryName: "Falkland Islands (Malvinas)", dialCode: '+500' },
71
+ { value: '+298', label: "🇫🇴 Faroe Islands (+298)", iso2: 'fo', countryName: "Faroe Islands", dialCode: '+298' },
72
+ { value: '+679', label: "🇫🇯 Fiji (+679)", iso2: 'fj', countryName: "Fiji", dialCode: '+679' },
73
+ { value: '+594', label: "🇬🇫 French Guiana (+594)", iso2: 'gf', countryName: "French Guiana", dialCode: '+594' },
74
+ { value: '+689', label: "🇵🇫 French Polynesia (+689)", iso2: 'pf', countryName: "French Polynesia", dialCode: '+689' },
75
+ { value: '+241', label: "🇬🇦 Gabon (+241)", iso2: 'ga', countryName: "Gabon", dialCode: '+241' },
76
+ { value: '+220', label: "🇬🇲 Gambia (+220)", iso2: 'gm', countryName: "Gambia", dialCode: '+220' },
77
+ { value: '+995', label: "🇬🇪 Georgia (+995)", iso2: 'ge', countryName: "Georgia", dialCode: '+995' },
78
+ { value: '+233', label: "🇬🇭 Ghana (+233)", iso2: 'gh', countryName: "Ghana", dialCode: '+233' },
79
+ { value: '+350', label: "🇬🇮 Gibraltar (+350)", iso2: 'gi', countryName: "Gibraltar", dialCode: '+350' },
80
+ { value: '+30', label: "🇬🇷 Greece (+30)", iso2: 'gr', countryName: "Greece", dialCode: '+30' },
81
+ { value: '+299', label: "🇬🇱 Greenland (+299)", iso2: 'gl', countryName: "Greenland", dialCode: '+299' },
82
+ { value: '+590', label: "🇬🇵 Guadeloupe (+590)", iso2: 'gp', countryName: "Guadeloupe", dialCode: '+590' },
83
+ { value: '+502', label: "🇬🇹 Guatemala (+502)", iso2: 'gt', countryName: "Guatemala", dialCode: '+502' },
84
+ { value: '+224', label: "🇬🇳 Guinea (+224)", iso2: 'gn', countryName: "Guinea", dialCode: '+224' },
85
+ { value: '+245', label: "🇬🇼 Guinea-Bissau (+245)", iso2: 'gw', countryName: "Guinea-Bissau", dialCode: '+245' },
86
+ { value: '+592', label: "🇬🇾 Guyana (+592)", iso2: 'gy', countryName: "Guyana", dialCode: '+592' },
87
+ { value: '+509', label: "🇭🇹 Haiti (+509)", iso2: 'ht', countryName: "Haiti", dialCode: '+509' },
88
+ { value: '+504', label: "🇭🇳 Honduras (+504)", iso2: 'hn', countryName: "Honduras", dialCode: '+504' },
89
+ { value: '+852', label: "🇭🇰 Hong Kong SAR China (+852)", iso2: 'hk', countryName: "Hong Kong SAR China", dialCode: '+852' },
90
+ { value: '+36', label: "🇭🇺 Hungary (+36)", iso2: 'hu', countryName: "Hungary", dialCode: '+36' },
91
+ { value: '+354', label: "🇮🇸 Iceland (+354)", iso2: 'is', countryName: "Iceland", dialCode: '+354' },
92
+ { value: '+62', label: "🇮🇩 Indonesia (+62)", iso2: 'id', countryName: "Indonesia", dialCode: '+62' },
93
+ { value: '+98', label: "🇮🇷 Iran (+98)", iso2: 'ir', countryName: "Iran", dialCode: '+98' },
94
+ { value: '+964', label: "🇮🇶 Iraq (+964)", iso2: 'iq', countryName: "Iraq", dialCode: '+964' },
95
+ { value: '+353', label: "🇮🇪 Ireland (+353)", iso2: 'ie', countryName: "Ireland", dialCode: '+353' },
96
+ { value: '+972', label: "🇮🇱 Israel (+972)", iso2: 'il', countryName: "Israel", dialCode: '+972' },
97
+ { value: '+962', label: "🇯🇴 Jordan (+962)", iso2: 'jo', countryName: "Jordan", dialCode: '+962' },
98
+ { value: '+7', label: "🇰🇿 Kazakhstan (+7)", iso2: 'kz', countryName: "Kazakhstan", dialCode: '+7' },
99
+ { value: '+254', label: "🇰🇪 Kenya (+254)", iso2: 'ke', countryName: "Kenya", dialCode: '+254' },
100
+ { value: '+686', label: "🇰🇮 Kiribati (+686)", iso2: 'ki', countryName: "Kiribati", dialCode: '+686' },
101
+ { value: '+383', label: "🇽🇰 Kosovo (+383)", iso2: 'xk', countryName: "Kosovo", dialCode: '+383' },
102
+ { value: '+965', label: "🇰🇼 Kuwait (+965)", iso2: 'kw', countryName: "Kuwait", dialCode: '+965' },
103
+ { value: '+996', label: "🇰🇬 Kyrgyzstan (+996)", iso2: 'kg', countryName: "Kyrgyzstan", dialCode: '+996' },
104
+ { value: '+856', label: "🇱🇦 Laos (+856)", iso2: 'la', countryName: "Laos", dialCode: '+856' },
105
+ { value: '+371', label: "🇱🇻 Latvia (+371)", iso2: 'lv', countryName: "Latvia", dialCode: '+371' },
106
+ { value: '+961', label: "🇱🇧 Lebanon (+961)", iso2: 'lb', countryName: "Lebanon", dialCode: '+961' },
107
+ { value: '+266', label: "🇱🇸 Lesotho (+266)", iso2: 'ls', countryName: "Lesotho", dialCode: '+266' },
108
+ { value: '+231', label: "🇱🇷 Liberia (+231)", iso2: 'lr', countryName: "Liberia", dialCode: '+231' },
109
+ { value: '+218', label: "🇱🇾 Libya (+218)", iso2: 'ly', countryName: "Libya", dialCode: '+218' },
110
+ { value: '+423', label: "🇱🇮 Liechtenstein (+423)", iso2: 'li', countryName: "Liechtenstein", dialCode: '+423' },
111
+ { value: '+370', label: "🇱🇹 Lithuania (+370)", iso2: 'lt', countryName: "Lithuania", dialCode: '+370' },
112
+ { value: '+352', label: "🇱🇺 Luxembourg (+352)", iso2: 'lu', countryName: "Luxembourg", dialCode: '+352' },
113
+ { value: '+853', label: "🇲🇴 Macao SAR China (+853)", iso2: 'mo', countryName: "Macao SAR China", dialCode: '+853' },
114
+ { value: '+261', label: "🇲🇬 Madagascar (+261)", iso2: 'mg', countryName: "Madagascar", dialCode: '+261' },
115
+ { value: '+265', label: "🇲🇼 Malawi (+265)", iso2: 'mw', countryName: "Malawi", dialCode: '+265' },
116
+ { value: '+60', label: "🇲🇾 Malaysia (+60)", iso2: 'my', countryName: "Malaysia", dialCode: '+60' },
117
+ { value: '+960', label: "🇲🇻 Maldives (+960)", iso2: 'mv', countryName: "Maldives", dialCode: '+960' },
118
+ { value: '+223', label: "🇲🇱 Mali (+223)", iso2: 'ml', countryName: "Mali", dialCode: '+223' },
119
+ { value: '+356', label: "🇲🇹 Malta (+356)", iso2: 'mt', countryName: "Malta", dialCode: '+356' },
120
+ { value: '+692', label: "🇲🇭 Marshall Islands (+692)", iso2: 'mh', countryName: "Marshall Islands", dialCode: '+692' },
121
+ { value: '+596', label: "🇲🇶 Martinique (+596)", iso2: 'mq', countryName: "Martinique", dialCode: '+596' },
122
+ { value: '+222', label: "🇲🇷 Mauritania (+222)", iso2: 'mr', countryName: "Mauritania", dialCode: '+222' },
123
+ { value: '+230', label: "🇲🇺 Mauritius (+230)", iso2: 'mu', countryName: "Mauritius", dialCode: '+230' },
124
+ { value: '+262', label: "🇾🇹 Mayotte (+262)", iso2: 'yt', countryName: "Mayotte", dialCode: '+262' },
125
+ { value: '+691', label: "🇫🇲 Micronesia (+691)", iso2: 'fm', countryName: "Micronesia", dialCode: '+691' },
126
+ { value: '+373', label: "🇲🇩 Moldova (+373)", iso2: 'md', countryName: "Moldova", dialCode: '+373' },
127
+ { value: '+377', label: "🇲🇨 Monaco (+377)", iso2: 'mc', countryName: "Monaco", dialCode: '+377' },
128
+ { value: '+976', label: "🇲🇳 Mongolia (+976)", iso2: 'mn', countryName: "Mongolia", dialCode: '+976' },
129
+ { value: '+382', label: "🇲🇪 Montenegro (+382)", iso2: 'me', countryName: "Montenegro", dialCode: '+382' },
130
+ { value: '+212', label: "🇲🇦 Morocco (+212)", iso2: 'ma', countryName: "Morocco", dialCode: '+212' },
131
+ { value: '+258', label: "🇲🇿 Mozambique (+258)", iso2: 'mz', countryName: "Mozambique", dialCode: '+258' },
132
+ { value: '+95', label: "🇲🇲 Myanmar (Burma) (+95)", iso2: 'mm', countryName: "Myanmar (Burma)", dialCode: '+95' },
133
+ { value: '+264', label: "🇳🇦 Namibia (+264)", iso2: 'na', countryName: "Namibia", dialCode: '+264' },
134
+ { value: '+674', label: "🇳🇷 Nauru (+674)", iso2: 'nr', countryName: "Nauru", dialCode: '+674' },
135
+ { value: '+977', label: "🇳🇵 Nepal (+977)", iso2: 'np', countryName: "Nepal", dialCode: '+977' },
136
+ { value: '+31', label: "🇳🇱 Netherlands (+31)", iso2: 'nl', countryName: "Netherlands", dialCode: '+31' },
137
+ { value: '+687', label: "🇳🇨 New Caledonia (+687)", iso2: 'nc', countryName: "New Caledonia", dialCode: '+687' },
138
+ { value: '+64', label: "🇳🇿 New Zealand (+64)", iso2: 'nz', countryName: "New Zealand", dialCode: '+64' },
139
+ { value: '+505', label: "🇳🇮 Nicaragua (+505)", iso2: 'ni', countryName: "Nicaragua", dialCode: '+505' },
140
+ { value: '+227', label: "🇳🇪 Niger (+227)", iso2: 'ne', countryName: "Niger", dialCode: '+227' },
141
+ { value: '+234', label: "🇳🇬 Nigeria (+234)", iso2: 'ng', countryName: "Nigeria", dialCode: '+234' },
142
+ { value: '+683', label: "🇳🇺 Niue (+683)", iso2: 'nu', countryName: "Niue", dialCode: '+683' },
143
+ { value: '+672', label: "🇳🇫 Norfolk Island (+672)", iso2: 'nf', countryName: "Norfolk Island", dialCode: '+672' },
144
+ { value: '+850', label: "🇰🇵 North Korea (+850)", iso2: 'kp', countryName: "North Korea", dialCode: '+850' },
145
+ { value: '+389', label: "🇲🇰 North Macedonia (+389)", iso2: 'mk', countryName: "North Macedonia", dialCode: '+389' },
146
+ { value: '+47', label: "🇳🇴 Norway (+47)", iso2: 'no', countryName: "Norway", dialCode: '+47' },
147
+ { value: '+968', label: "🇴🇲 Oman (+968)", iso2: 'om', countryName: "Oman", dialCode: '+968' },
148
+ { value: '+92', label: "🇵🇰 Pakistan (+92)", iso2: 'pk', countryName: "Pakistan", dialCode: '+92' },
149
+ { value: '+680', label: "🇵🇼 Palau (+680)", iso2: 'pw', countryName: "Palau", dialCode: '+680' },
150
+ { value: '+970', label: "🇵🇸 Palestinian Territories (+970)", iso2: 'ps', countryName: "Palestinian Territories", dialCode: '+970' },
151
+ { value: '+507', label: "🇵🇦 Panama (+507)", iso2: 'pa', countryName: "Panama", dialCode: '+507' },
152
+ { value: '+675', label: "🇵🇬 Papua New Guinea (+675)", iso2: 'pg', countryName: "Papua New Guinea", dialCode: '+675' },
153
+ { value: '+595', label: "🇵🇾 Paraguay (+595)", iso2: 'py', countryName: "Paraguay", dialCode: '+595' },
154
+ { value: '+63', label: "🇵🇭 Philippines (+63)", iso2: 'ph', countryName: "Philippines", dialCode: '+63' },
155
+ { value: '+48', label: "🇵🇱 Poland (+48)", iso2: 'pl', countryName: "Poland", dialCode: '+48' },
156
+ { value: '+351', label: "🇵🇹 Portugal (+351)", iso2: 'pt', countryName: "Portugal", dialCode: '+351' },
157
+ { value: '+974', label: "🇶🇦 Qatar (+974)", iso2: 'qa', countryName: "Qatar", dialCode: '+974' },
158
+ { value: '+40', label: "🇷🇴 Romania (+40)", iso2: 'ro', countryName: "Romania", dialCode: '+40' },
159
+ { value: '+250', label: "🇷🇼 Rwanda (+250)", iso2: 'rw', countryName: "Rwanda", dialCode: '+250' },
160
+ { value: '+685', label: "🇼🇸 Samoa (+685)", iso2: 'ws', countryName: "Samoa", dialCode: '+685' },
161
+ { value: '+378', label: "🇸🇲 San Marino (+378)", iso2: 'sm', countryName: "San Marino", dialCode: '+378' },
162
+ { value: '+239', label: "🇸🇹 São Tomé & Príncipe (+239)", iso2: 'st', countryName: "São Tomé & Príncipe", dialCode: '+239' },
163
+ { value: '+966', label: "🇸🇦 Saudi Arabia (+966)", iso2: 'sa', countryName: "Saudi Arabia", dialCode: '+966' },
164
+ { value: '+221', label: "🇸🇳 Senegal (+221)", iso2: 'sn', countryName: "Senegal", dialCode: '+221' },
165
+ { value: '+381', label: "🇷🇸 Serbia (+381)", iso2: 'rs', countryName: "Serbia", dialCode: '+381' },
166
+ { value: '+248', label: "🇸🇨 Seychelles (+248)", iso2: 'sc', countryName: "Seychelles", dialCode: '+248' },
167
+ { value: '+232', label: "🇸🇱 Sierra Leone (+232)", iso2: 'sl', countryName: "Sierra Leone", dialCode: '+232' },
168
+ { value: '+65', label: "🇸🇬 Singapore (+65)", iso2: 'sg', countryName: "Singapore", dialCode: '+65' },
169
+ { value: '+421', label: "🇸🇰 Slovakia (+421)", iso2: 'sk', countryName: "Slovakia", dialCode: '+421' },
170
+ { value: '+386', label: "🇸🇮 Slovenia (+386)", iso2: 'si', countryName: "Slovenia", dialCode: '+386' },
171
+ { value: '+677', label: "🇸🇧 Solomon Islands (+677)", iso2: 'sb', countryName: "Solomon Islands", dialCode: '+677' },
172
+ { value: '+252', label: "🇸🇴 Somalia (+252)", iso2: 'so', countryName: "Somalia", dialCode: '+252' },
173
+ { value: '+27', label: "🇿🇦 South Africa (+27)", iso2: 'za', countryName: "South Africa", dialCode: '+27' },
174
+ { value: '+82', label: "🇰🇷 South Korea (+82)", iso2: 'kr', countryName: "South Korea", dialCode: '+82' },
175
+ { value: '+211', label: "🇸🇸 South Sudan (+211)", iso2: 'ss', countryName: "South Sudan", dialCode: '+211' },
176
+ { value: '+94', label: "🇱🇰 Sri Lanka (+94)", iso2: 'lk', countryName: "Sri Lanka", dialCode: '+94' },
177
+ { value: '+290', label: "🇸🇭 St. Helena (+290)", iso2: 'sh', countryName: "St. Helena", dialCode: '+290' },
178
+ { value: '+508', label: "🇵🇲 St. Pierre & Miquelon (+508)", iso2: 'pm', countryName: "St. Pierre & Miquelon", dialCode: '+508' },
179
+ { value: '+249', label: "🇸🇩 Sudan (+249)", iso2: 'sd', countryName: "Sudan", dialCode: '+249' },
180
+ { value: '+597', label: "🇸🇷 Suriname (+597)", iso2: 'sr', countryName: "Suriname", dialCode: '+597' },
181
+ { value: '+46', label: "🇸🇪 Sweden (+46)", iso2: 'se', countryName: "Sweden", dialCode: '+46' },
182
+ { value: '+41', label: "🇨🇭 Switzerland (+41)", iso2: 'ch', countryName: "Switzerland", dialCode: '+41' },
183
+ { value: '+963', label: "🇸🇾 Syria (+963)", iso2: 'sy', countryName: "Syria", dialCode: '+963' },
184
+ { value: '+886', label: "🇹🇼 Taiwan (+886)", iso2: 'tw', countryName: "Taiwan", dialCode: '+886' },
185
+ { value: '+992', label: "🇹🇯 Tajikistan (+992)", iso2: 'tj', countryName: "Tajikistan", dialCode: '+992' },
186
+ { value: '+255', label: "🇹🇿 Tanzania (+255)", iso2: 'tz', countryName: "Tanzania", dialCode: '+255' },
187
+ { value: '+66', label: "🇹🇭 Thailand (+66)", iso2: 'th', countryName: "Thailand", dialCode: '+66' },
188
+ { value: '+670', label: "🇹🇱 Timor-Leste (+670)", iso2: 'tl', countryName: "Timor-Leste", dialCode: '+670' },
189
+ { value: '+228', label: "🇹🇬 Togo (+228)", iso2: 'tg', countryName: "Togo", dialCode: '+228' },
190
+ { value: '+690', label: "🇹🇰 Tokelau (+690)", iso2: 'tk', countryName: "Tokelau", dialCode: '+690' },
191
+ { value: '+676', label: "🇹🇴 Tonga (+676)", iso2: 'to', countryName: "Tonga", dialCode: '+676' },
192
+ { value: '+216', label: "🇹🇳 Tunisia (+216)", iso2: 'tn', countryName: "Tunisia", dialCode: '+216' },
193
+ { value: '+90', label: "🇹🇷 Turkey (+90)", iso2: 'tr', countryName: "Turkey", dialCode: '+90' },
194
+ { value: '+993', label: "🇹🇲 Turkmenistan (+993)", iso2: 'tm', countryName: "Turkmenistan", dialCode: '+993' },
195
+ { value: '+688', label: "🇹🇻 Tuvalu (+688)", iso2: 'tv', countryName: "Tuvalu", dialCode: '+688' },
196
+ { value: '+256', label: "🇺🇬 Uganda (+256)", iso2: 'ug', countryName: "Uganda", dialCode: '+256' },
197
+ { value: '+380', label: "🇺🇦 Ukraine (+380)", iso2: 'ua', countryName: "Ukraine", dialCode: '+380' },
198
+ { value: '+971', label: "🇦🇪 United Arab Emirates (+971)", iso2: 'ae', countryName: "United Arab Emirates", dialCode: '+971' },
199
+ { value: '+598', label: "🇺🇾 Uruguay (+598)", iso2: 'uy', countryName: "Uruguay", dialCode: '+598' },
200
+ { value: '+998', label: "🇺🇿 Uzbekistan (+998)", iso2: 'uz', countryName: "Uzbekistan", dialCode: '+998' },
201
+ { value: '+678', label: "🇻🇺 Vanuatu (+678)", iso2: 'vu', countryName: "Vanuatu", dialCode: '+678' },
202
+ { value: '+58', label: "🇻🇪 Venezuela (+58)", iso2: 've', countryName: "Venezuela", dialCode: '+58' },
203
+ { value: '+84', label: "🇻🇳 Vietnam (+84)", iso2: 'vn', countryName: "Vietnam", dialCode: '+84' },
204
+ { value: '+681', label: "🇼🇫 Wallis & Futuna (+681)", iso2: 'wf', countryName: "Wallis & Futuna", dialCode: '+681' },
205
+ { value: '+967', label: "🇾🇪 Yemen (+967)", iso2: 'ye', countryName: "Yemen", dialCode: '+967' },
206
+ { value: '+260', label: "🇿🇲 Zambia (+260)", iso2: 'zm', countryName: "Zambia", dialCode: '+260' },
207
+ { value: '+263', label: "🇿🇼 Zimbabwe (+263)", iso2: 'zw', countryName: "Zimbabwe", dialCode: '+263' },
208
+ ];
209
+ export const DEFAULT_OTP_COUNTRY_CODE = '+52';
@@ -0,0 +1,9 @@
1
+ export declare const GENDERS: readonly ["MALE", "FEMALE", "OTHER", "PREFER_NOT_TO_SAY"];
2
+ export type Gender = (typeof GENDERS)[number];
3
+ export declare const DEFAULT_GENDER: Gender;
4
+ export declare const GENDER_LABELS: Record<Gender, string>;
5
+ export declare const GENDER_SELECT_OPTIONS: {
6
+ value: "MALE" | "FEMALE" | "OTHER" | "PREFER_NOT_TO_SAY";
7
+ label: string;
8
+ }[];
9
+ //# sourceMappingURL=gender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gender.d.ts","sourceRoot":"","sources":["../../../src/auth/constants/gender.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2DAA4D,CAAC;AAEjF,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc,EAAE,MAAgB,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKhD,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;GAG/B,CAAC"}
@@ -0,0 +1,12 @@
1
+ export const GENDERS = ['MALE', 'FEMALE', 'OTHER', 'PREFER_NOT_TO_SAY'];
2
+ export const DEFAULT_GENDER = 'OTHER';
3
+ export const GENDER_LABELS = {
4
+ MALE: 'Masculino',
5
+ FEMALE: 'Femenino',
6
+ OTHER: 'Otro',
7
+ PREFER_NOT_TO_SAY: 'Prefiero no decirlo'
8
+ };
9
+ export const GENDER_SELECT_OPTIONS = GENDERS.map((value) => ({
10
+ value,
11
+ label: GENDER_LABELS[value]
12
+ }));
@@ -0,0 +1,3 @@
1
+ export * from './gender';
2
+ export * from './countryCallingCodes';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './gender';
2
+ export * from './countryCallingCodes';
@@ -0,0 +1,18 @@
1
+ export type AuthAccountConfirmationFormValues = {
2
+ uid: string;
3
+ token: string;
4
+ };
5
+ export type AuthAccountConfirmationFormProps = {
6
+ defaultValues?: Partial<AuthAccountConfirmationFormValues>;
7
+ defaultEmail?: string;
8
+ onGoToSignIn?: () => void;
9
+ resendCooldownSeconds?: number;
10
+ signInRedirectSeconds?: number;
11
+ autoSubmit?: boolean;
12
+ onSubmit: (values: AuthAccountConfirmationFormValues) => unknown | Promise<unknown>;
13
+ onResend?: (values: {
14
+ email: string;
15
+ }) => unknown | Promise<unknown>;
16
+ };
17
+ export declare function AuthAccountConfirmationForm(props: AuthAccountConfirmationFormProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=AuthAccountConfirmationForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthAccountConfirmationForm.d.ts","sourceRoot":"","sources":["../../../../src/auth/forms/account/AuthAccountConfirmationForm.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,iCAAiC,GAAG;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC,iCAAiC,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,iCAAiC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,2CA4QlF"}
@@ -0,0 +1,166 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Alert from '@mui/material/Alert';
3
+ import Button from '@mui/material/Button';
4
+ import CircularProgress from '@mui/material/CircularProgress';
5
+ import Stack from '@mui/material/Stack';
6
+ import Typography from '@mui/material/Typography';
7
+ import { useEffect, useRef, useState } from 'react';
8
+ import { AuthPrimaryButton, AuthSecondaryButton } from '../../ui';
9
+ import { parseAuthError } from '../errorParser';
10
+ export function AuthAccountConfirmationForm(props) {
11
+ const { defaultValues, defaultEmail, onGoToSignIn, resendCooldownSeconds = 30, signInRedirectSeconds = 5, autoSubmit = true, onSubmit, onResend } = props;
12
+ const uid = defaultValues?.uid ?? '';
13
+ const token = defaultValues?.token ?? '';
14
+ const email = defaultEmail?.trim() ?? '';
15
+ const hasValues = Boolean(uid && token);
16
+ const canResendFromSignup = !hasValues && Boolean(email) && Boolean(onResend);
17
+ const hasAutoSubmittedRef = useRef(false);
18
+ const hasInitializedCooldownRef = useRef(false);
19
+ const [loading, setLoading] = useState(false);
20
+ const [resending, setResending] = useState(false);
21
+ const [isSuccess, setIsSuccess] = useState(false);
22
+ const [isExpiredVerificationError, setIsExpiredVerificationError] = useState(false);
23
+ const [errorMessage, setErrorMessage] = useState(null);
24
+ const [resendMessage, setResendMessage] = useState(null);
25
+ const [resendCooldown, setResendCooldown] = useState(0);
26
+ const [signInRedirectCountdown, setSignInRedirectCountdown] = useState(null);
27
+ const shouldAutoRedirectToSignIn = Boolean(isSuccess && hasValues);
28
+ const canResendFromExpiredLink = hasValues && isExpiredVerificationError && Boolean(email) && Boolean(onResend);
29
+ const isExpiredMessage = (message) => {
30
+ const normalized = message
31
+ .normalize('NFD')
32
+ .replace(/[\u0300-\u036f]/g, '')
33
+ .toLowerCase();
34
+ return normalized.includes('expir') || normalized.includes('invalid') || normalized.includes('invalido');
35
+ };
36
+ const submit = async () => {
37
+ if (!hasValues) {
38
+ setErrorMessage('El enlace no es válido o está incompleto.');
39
+ return;
40
+ }
41
+ try {
42
+ setLoading(true);
43
+ setErrorMessage(null);
44
+ setIsExpiredVerificationError(false);
45
+ await onSubmit({ uid, token });
46
+ setIsSuccess(true);
47
+ setSignInRedirectCountdown(signInRedirectSeconds);
48
+ }
49
+ catch (error) {
50
+ setIsSuccess(false);
51
+ const parsed = parseAuthError(error);
52
+ const resolvedMessage = parsed.rootMessage || 'No se pudo verificar la cuenta. El enlace puede haber expirado.';
53
+ setErrorMessage(resolvedMessage);
54
+ setIsExpiredVerificationError(isExpiredMessage(resolvedMessage));
55
+ }
56
+ finally {
57
+ setLoading(false);
58
+ }
59
+ };
60
+ const resend = async () => {
61
+ if (!onResend || !email || resendCooldown > 0) {
62
+ return;
63
+ }
64
+ try {
65
+ setResendMessage(null);
66
+ setErrorMessage(null);
67
+ setResending(true);
68
+ await onResend({ email });
69
+ setResendMessage('Correo de verificación reenviado.');
70
+ setResendCooldown(resendCooldownSeconds);
71
+ }
72
+ catch {
73
+ setErrorMessage('No se pudo reenviar el correo de verificación.');
74
+ }
75
+ finally {
76
+ setResending(false);
77
+ }
78
+ };
79
+ useEffect(() => {
80
+ if (!canResendFromSignup || hasInitializedCooldownRef.current) {
81
+ return;
82
+ }
83
+ hasInitializedCooldownRef.current = true;
84
+ setResendCooldown(resendCooldownSeconds);
85
+ }, [canResendFromSignup, resendCooldownSeconds]);
86
+ useEffect(() => {
87
+ if (resendCooldown <= 0) {
88
+ return;
89
+ }
90
+ const timeoutId = window.setTimeout(() => {
91
+ setResendCooldown((currentValue) => Math.max(0, currentValue - 1));
92
+ }, 1000);
93
+ return () => window.clearTimeout(timeoutId);
94
+ }, [resendCooldown]);
95
+ useEffect(() => {
96
+ if (!shouldAutoRedirectToSignIn || !onGoToSignIn || !signInRedirectCountdown || signInRedirectCountdown <= 0) {
97
+ return;
98
+ }
99
+ const timeoutId = window.setTimeout(() => {
100
+ setSignInRedirectCountdown((currentValue) => {
101
+ if (!currentValue) {
102
+ return 0;
103
+ }
104
+ return currentValue - 1;
105
+ });
106
+ }, 1000);
107
+ return () => window.clearTimeout(timeoutId);
108
+ }, [shouldAutoRedirectToSignIn, onGoToSignIn, signInRedirectCountdown]);
109
+ useEffect(() => {
110
+ if (!shouldAutoRedirectToSignIn || !onGoToSignIn || signInRedirectCountdown !== 0) {
111
+ return;
112
+ }
113
+ onGoToSignIn();
114
+ }, [shouldAutoRedirectToSignIn, onGoToSignIn, signInRedirectCountdown]);
115
+ const formatCooldown = (seconds) => {
116
+ const minutes = Math.floor(seconds / 60)
117
+ .toString()
118
+ .padStart(2, '0');
119
+ const remainingSeconds = (seconds % 60).toString().padStart(2, '0');
120
+ return `${minutes}:${remainingSeconds}`;
121
+ };
122
+ useEffect(() => {
123
+ if (!autoSubmit || !hasValues || hasAutoSubmittedRef.current) {
124
+ return;
125
+ }
126
+ hasAutoSubmittedRef.current = true;
127
+ void submit();
128
+ }, [autoSubmit, hasValues, uid, token]);
129
+ useEffect(() => {
130
+ hasAutoSubmittedRef.current = false;
131
+ setLoading(false);
132
+ setResending(false);
133
+ setErrorMessage(null);
134
+ setResendMessage(null);
135
+ setIsExpiredVerificationError(false);
136
+ if (canResendFromSignup) {
137
+ hasInitializedCooldownRef.current = true;
138
+ setResendCooldown(resendCooldownSeconds);
139
+ }
140
+ else {
141
+ hasInitializedCooldownRef.current = false;
142
+ setResendCooldown(0);
143
+ }
144
+ if (!hasValues) {
145
+ setIsSuccess(false);
146
+ setSignInRedirectCountdown(null);
147
+ }
148
+ }, [uid, token, email, hasValues, canResendFromSignup, resendCooldownSeconds]);
149
+ return (_jsxs(Stack, { spacing: 2, children: [!hasValues && email ? (_jsx(Alert, { severity: "info", children: "Tu cuenta fue creada. Revisa tu correo para verificar tu cuenta." })) : null, !hasValues && !email ? (_jsx(Alert, { severity: "warning", children: "Falta informaci\u00F3n del enlace de verificaci\u00F3n." })) : null, loading ? (_jsx(Alert, { severity: "info", children: _jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(CircularProgress, { size: 16, color: "inherit" }), _jsx(Typography, { variant: "body2", children: "Verificando tu cuenta..." })] }) })) : null, isSuccess ? _jsx(Alert, { severity: "success", children: "Tu cuenta fue verificada correctamente." }) : null, resendMessage ? _jsx(Alert, { severity: "success", children: resendMessage }) : null, errorMessage ? _jsx(Alert, { severity: "error", children: errorMessage }) : null, !isSuccess && hasValues && !canResendFromExpiredLink ? (_jsx(Button, { variant: "contained", onClick: () => {
150
+ void submit();
151
+ }, disabled: loading, children: "Reintentar verificaci\u00F3n" })) : null, canResendFromSignup ? (_jsxs(Stack, { sx: { mt: 1.5 }, children: [_jsx(AuthPrimaryButton, { type: "button", onClick: onGoToSignIn, children: "Ir a iniciar sesi\u00F3n" }), _jsx(AuthSecondaryButton, { sx: { mt: 1.5 }, type: "button", onClick: () => {
152
+ void resend();
153
+ }, disabled: resending || resendCooldown > 0, children: resending
154
+ ? 'Reenviando...'
155
+ : resendCooldown > 0
156
+ ? `Reenviar verificación (${formatCooldown(resendCooldown)})`
157
+ : 'Reenviar verificación' })] })) : null, canResendFromExpiredLink ? (_jsx(Stack, { sx: { mt: 1.5 }, children: _jsx(AuthSecondaryButton, { type: "button", onClick: () => {
158
+ void resend();
159
+ }, disabled: resending || resendCooldown > 0, children: resending
160
+ ? 'Reenviando...'
161
+ : resendCooldown > 0
162
+ ? `Reenviar verificación (${formatCooldown(resendCooldown)})`
163
+ : 'Reenviar verificación' }) })) : null, isSuccess && !canResendFromSignup && !canResendFromExpiredLink ? (_jsx(Stack, { sx: { mt: 1.5 }, children: _jsx(AuthPrimaryButton, { type: "button", onClick: onGoToSignIn, children: `Ir a iniciar sesión${typeof signInRedirectCountdown === 'number' && signInRedirectCountdown > 0
164
+ ? ` (${signInRedirectCountdown}s)`
165
+ : ''}` }) })) : null] }));
166
+ }
@@ -0,0 +1,2 @@
1
+ export * from './AuthAccountConfirmationForm';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/forms/account/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './AuthAccountConfirmationForm';
@@ -0,0 +1,7 @@
1
+ type ParsedAuthError = {
2
+ fieldErrors: Record<string, string>;
3
+ rootMessage?: string;
4
+ };
5
+ export declare const parseAuthError: (error: unknown, fieldAliases?: Record<string, string>) => ParsedAuthError;
6
+ export {};
7
+ //# sourceMappingURL=errorParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorParser.d.ts","sourceRoot":"","sources":["../../../src/auth/forms/errorParser.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoBF,eAAO,MAAM,cAAc,GACzB,OAAO,OAAO,EACd,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACpC,eAwDF,CAAC"}
@@ -0,0 +1,65 @@
1
+ const toCamelCase = (value) => value.replace(/_([a-z])/g, (_, char) => char.toUpperCase());
2
+ const readMessage = (value) => {
3
+ if (!value)
4
+ return undefined;
5
+ if (typeof value === 'string')
6
+ return value;
7
+ if (Array.isArray(value)) {
8
+ const first = value.find((item) => typeof item === 'string');
9
+ return typeof first === 'string' ? first : undefined;
10
+ }
11
+ if (typeof value === 'object') {
12
+ const record = value;
13
+ if (typeof record.message === 'string')
14
+ return record.message;
15
+ if (typeof record.detail === 'string')
16
+ return record.detail;
17
+ }
18
+ return undefined;
19
+ };
20
+ export const parseAuthError = (error, fieldAliases) => {
21
+ const raw = error;
22
+ const responseData = (raw.response?.data ?? raw.data);
23
+ const parsed = { fieldErrors: {} };
24
+ const normalizeField = (key) => {
25
+ const camelKey = toCamelCase(key);
26
+ return fieldAliases?.[camelKey] ?? camelKey;
27
+ };
28
+ const legacyErrors = responseData?.data;
29
+ if (Array.isArray(legacyErrors)) {
30
+ legacyErrors.forEach((entry) => {
31
+ const item = entry;
32
+ if (!item?.type || !item?.message)
33
+ return;
34
+ const field = normalizeField(item.type);
35
+ if (field === 'root') {
36
+ parsed.rootMessage = item.message;
37
+ return;
38
+ }
39
+ parsed.fieldErrors[field] = item.message;
40
+ });
41
+ }
42
+ if (typeof responseData === 'string' && !parsed.rootMessage) {
43
+ parsed.rootMessage = responseData;
44
+ }
45
+ if (responseData && typeof responseData === 'object' && !Array.isArray(responseData)) {
46
+ const data = responseData;
47
+ const detailMessage = readMessage(data.detail);
48
+ const nonFieldMessage = readMessage(data.non_field_errors);
49
+ const message = readMessage(data.message);
50
+ parsed.rootMessage = parsed.rootMessage ?? detailMessage ?? nonFieldMessage ?? message;
51
+ Object.entries(data).forEach(([key, value]) => {
52
+ if (['detail', 'non_field_errors', 'message', 'code', 'status'].includes(key)) {
53
+ return;
54
+ }
55
+ const fieldMessage = readMessage(value);
56
+ if (!fieldMessage)
57
+ return;
58
+ parsed.fieldErrors[normalizeField(key)] = fieldMessage;
59
+ });
60
+ }
61
+ if (!parsed.rootMessage && Object.keys(parsed.fieldErrors).length === 0 && raw.message) {
62
+ parsed.rootMessage = raw.message;
63
+ }
64
+ return parsed;
65
+ };
@@ -0,0 +1,6 @@
1
+ export * from './sign-in';
2
+ export * from './sign-up';
3
+ export * from './password';
4
+ export * from './account';
5
+ export * from './errorParser';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './sign-in';
2
+ export * from './sign-up';
3
+ export * from './password';
4
+ export * from './account';
5
+ export * from './errorParser';
@@ -0,0 +1,12 @@
1
+ export type AuthForgotPasswordFormValues = {
2
+ email: string;
3
+ };
4
+ export type AuthForgotPasswordFormProps = {
5
+ defaultValues?: Partial<AuthForgotPasswordFormValues>;
6
+ loading?: boolean;
7
+ submitLabel?: string;
8
+ successMessage?: string;
9
+ onSubmit: (values: AuthForgotPasswordFormValues) => unknown | Promise<unknown>;
10
+ };
11
+ export declare function AuthForgotPasswordForm(props: AuthForgotPasswordFormProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=AuthForgotPasswordForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/auth/forms/password/AuthForgotPasswordForm.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChF,CAAC;AAMF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,2CAkHxE"}